From d06a626086dfb983fa4165b360fa5a62d4d86444 Mon Sep 17 00:00:00 2001 From: Dimple K H <31147415+Dimple16@users.noreply.github.com> Date: Mon, 20 Nov 2023 11:56:10 +0530 Subject: [PATCH 1/2] feat: Standardize icons - Milestone-3 (#2576) Co-authored-by: Dimple --- .../my-view-report-etxn-card.component.html | 35 ------- .../my-view-report-etxn-card.component.scss | 72 -------------- ...my-view-report-etxn-card.component.spec.ts | 65 ------------- .../my-view-report-etxn-card.component.ts | 30 ------ .../my-view-report/my-view-report.module.ts | 11 +-- .../view-team-report-etxn-card.component.html | 36 ------- .../view-team-report-etxn-card.component.scss | 62 ------------ ...ew-team-report-etxn-card.component.spec.ts | 65 ------------- .../view-team-report-etxn-card.component.ts | 30 ------ .../view-team-report.module.ts | 3 +- .../fy-category-icon.component.html | 31 ------ .../fy-category-icon.component.scss | 7 -- .../fy-category-icon.component.spec.ts | 26 ----- .../fy-category-icon.component.ts | 14 --- src/app/shared/icon/icon.module.ts | 20 ---- src/app/shared/shared.module.ts | 3 - src/assets/svg/bike.svg | 5 - src/assets/svg/bus.svg | 7 -- src/assets/svg/entertainment.svg | 10 -- src/assets/svg/flight.svg | 10 -- src/assets/svg/food.svg | 10 -- src/assets/svg/fy-bike.svg | 58 ----------- src/assets/svg/fy-cyclist.svg | 3 - src/assets/svg/fy-electric-car.svg | 95 ------------------- src/assets/svg/gas.svg | 11 --- src/assets/svg/hotel.svg | 11 --- src/assets/svg/mail.svg | 9 -- src/assets/svg/mileage.svg | 7 -- src/assets/svg/office-supplies.svg | 10 -- src/assets/svg/parking.svg | 9 -- src/assets/svg/per_diem.svg | 6 -- src/assets/svg/phone.svg | 10 -- src/assets/svg/software.svg | 7 -- src/assets/svg/taxi.svg | 7 -- src/assets/svg/train.svg | 7 -- src/assets/svg/utility.svg | 9 -- 36 files changed, 3 insertions(+), 808 deletions(-) delete mode 100644 src/app/fyle/my-view-report/my-view-report-etxn-card/my-view-report-etxn-card.component.html delete mode 100644 src/app/fyle/my-view-report/my-view-report-etxn-card/my-view-report-etxn-card.component.scss delete mode 100644 src/app/fyle/my-view-report/my-view-report-etxn-card/my-view-report-etxn-card.component.spec.ts delete mode 100644 src/app/fyle/my-view-report/my-view-report-etxn-card/my-view-report-etxn-card.component.ts delete mode 100644 src/app/fyle/view-team-report/view-team-report-etxn-card/view-team-report-etxn-card.component.html delete mode 100644 src/app/fyle/view-team-report/view-team-report-etxn-card/view-team-report-etxn-card.component.scss delete mode 100644 src/app/fyle/view-team-report/view-team-report-etxn-card/view-team-report-etxn-card.component.spec.ts delete mode 100644 src/app/fyle/view-team-report/view-team-report-etxn-card/view-team-report-etxn-card.component.ts delete mode 100644 src/app/shared/components/fy-category-icon/fy-category-icon.component.html delete mode 100644 src/app/shared/components/fy-category-icon/fy-category-icon.component.scss delete mode 100644 src/app/shared/components/fy-category-icon/fy-category-icon.component.spec.ts delete mode 100644 src/app/shared/components/fy-category-icon/fy-category-icon.component.ts delete mode 100644 src/assets/svg/bike.svg delete mode 100755 src/assets/svg/bus.svg delete mode 100755 src/assets/svg/entertainment.svg delete mode 100755 src/assets/svg/flight.svg delete mode 100755 src/assets/svg/food.svg delete mode 100644 src/assets/svg/fy-bike.svg delete mode 100644 src/assets/svg/fy-cyclist.svg delete mode 100644 src/assets/svg/fy-electric-car.svg delete mode 100755 src/assets/svg/gas.svg delete mode 100644 src/assets/svg/hotel.svg delete mode 100755 src/assets/svg/mail.svg delete mode 100755 src/assets/svg/mileage.svg delete mode 100755 src/assets/svg/office-supplies.svg delete mode 100755 src/assets/svg/parking.svg delete mode 100644 src/assets/svg/per_diem.svg delete mode 100755 src/assets/svg/phone.svg delete mode 100755 src/assets/svg/software.svg delete mode 100755 src/assets/svg/taxi.svg delete mode 100755 src/assets/svg/train.svg delete mode 100755 src/assets/svg/utility.svg diff --git a/src/app/fyle/my-view-report/my-view-report-etxn-card/my-view-report-etxn-card.component.html b/src/app/fyle/my-view-report/my-view-report-etxn-card/my-view-report-etxn-card.component.html deleted file mode 100644 index bd461f726f..0000000000 --- a/src/app/fyle/my-view-report/my-view-report-etxn-card/my-view-report-etxn-card.component.html +++ /dev/null @@ -1,35 +0,0 @@ -
-
- - {{ etxn?.tx_txn_dt | date: 'EEEE, MMM dd, YYYY' }} - -
-
-
- -
-
-
- - {{ etxn.tx_currency }} - - - - {{ etxn.tx_amount | currency: etxn.tx_currency:'' }} - - -
-
- {{ etxn.vendor | ellipsis: 12 }} -
-
- {{ etxn.tx_org_category | ellipsis: 12 }} -
-
-
- warning -
-
-
diff --git a/src/app/fyle/my-view-report/my-view-report-etxn-card/my-view-report-etxn-card.component.scss b/src/app/fyle/my-view-report/my-view-report-etxn-card/my-view-report-etxn-card.component.scss deleted file mode 100644 index ff00883c0f..0000000000 --- a/src/app/fyle/my-view-report/my-view-report-etxn-card/my-view-report-etxn-card.component.scss +++ /dev/null @@ -1,72 +0,0 @@ -.etxn-card { - &--date { - color: #ababab; - font-size: 16px; - padding: 8px; - } - - &--details { - display: flex; - padding-left: 8px; - } - - &--body { - display: flex; - align-items: center; - margin: 0 8px 8px 8px; - padding: 8px; - } - - &--icon { - width: 20%; - margin: 6px; - } - - &--non-reimbursable { - text-decoration: line-through; - - &-amount { - color: #ababab; - } - } - - &--details { - width: 60%; - display: flex; - flex-direction: column; - } - - &--violation { - width: 20%; - text-align: center; - } - - &--vendor { - font-size: 16px; - } - - &--currency { - color: #ababab; - font-size: 16px; - } - - &--amount { - font-size: 18px; - font-weight: 700; - color: #4a4a4a; - padding-left: 8px; - } - - &--category { - font-size: 16px; - color: #ababab; - } - - &--violation { - color: orange; - } - - &--distance-unit { - text-transform: lowercase; - } -} diff --git a/src/app/fyle/my-view-report/my-view-report-etxn-card/my-view-report-etxn-card.component.spec.ts b/src/app/fyle/my-view-report/my-view-report-etxn-card/my-view-report-etxn-card.component.spec.ts deleted file mode 100644 index 1b0c1540c2..0000000000 --- a/src/app/fyle/my-view-report/my-view-report-etxn-card/my-view-report-etxn-card.component.spec.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { CurrencyPipe, DatePipe } from '@angular/common'; -import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; -import { MatIconModule } from '@angular/material/icon'; -import { MatIconTestingModule } from '@angular/material/icon/testing'; -import { IonicModule } from '@ionic/angular'; -import { FyCategoryIconComponent } from 'src/app/shared/components/fy-category-icon/fy-category-icon.component'; -import { EllipsisPipe } from 'src/app/shared/pipes/ellipses.pipe'; -import { expenseData1 } from 'src/app/core/mock-data/expense.data'; -import { MyViewReportEtxnCardComponent } from './my-view-report-etxn-card.component'; -import { click, getElementBySelector, getTextContent } from 'src/app/core/dom-helpers'; - -describe('MyViewReportEtxnCardComponent', () => { - let component: MyViewReportEtxnCardComponent; - let fixture: ComponentFixture; - - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [MyViewReportEtxnCardComponent, FyCategoryIconComponent, EllipsisPipe, DatePipe, CurrencyPipe], - imports: [IonicModule.forRoot(), MatIconModule, MatIconTestingModule], - }).compileComponents(); - - fixture = TestBed.createComponent(MyViewReportEtxnCardComponent); - component = fixture.componentInstance; - component.etxn = expenseData1; - fixture.detectChanges(); - })); - - it('should create', () => { - expect(component).toBeTruthy(); - }); - - it('goToTransactionClicked(): should emit event when clicked on transaction', () => { - component.etxnIndex = 1; - fixture.detectChanges(); - const goToTxnSpy = spyOn(component.goToTransaciton, 'emit'); - - const goToTxnButton = getElementBySelector(fixture, '.etxn-card--body') as HTMLElement; - click(goToTxnButton); - expect(goToTxnSpy).toHaveBeenCalledOnceWith({ etxn: expenseData1, etxnIndex: 1 }); - }); - - it('should show txn data properly', () => { - expect(getTextContent(getElementBySelector(fixture, '.etxn-card--currency'))).toEqual(expenseData1.tx_currency); - expect(getTextContent(getElementBySelector(fixture, '.etxn-card--amount'))).toEqual(`${expenseData1.tx_amount}.00`); - expect(getTextContent(getElementBySelector(fixture, '.etxn-card--vendor'))).toEqual(``); - expect(getTextContent(getElementBySelector(fixture, '.etxn-card--category'))).toEqual( - `${expenseData1.tx_org_category}` - ); - }); - - it('should show date if txn date not equal to previous date', () => { - component.prevDate = new Date(); - fixture.detectChanges(); - - expect(getTextContent(getElementBySelector(fixture, '.etxn-card--date'))).toEqual('Wednesday, Nov 30, 2022'); - }); - - it('should not show date if txn date equal to previous date', () => { - component.prevDate = new Date(expenseData1.tx_txn_dt); - fixture.detectChanges(); - component.ngOnInit(); - expect(getTextContent(getElementBySelector(fixture, '.etxn-card--date'))).toEqual('Wednesday, Nov 30, 2022'); - expect(component.showDate).toBeFalse(); - }); -}); diff --git a/src/app/fyle/my-view-report/my-view-report-etxn-card/my-view-report-etxn-card.component.ts b/src/app/fyle/my-view-report/my-view-report-etxn-card/my-view-report-etxn-card.component.ts deleted file mode 100644 index 7562a50b0d..0000000000 --- a/src/app/fyle/my-view-report/my-view-report-etxn-card/my-view-report-etxn-card.component.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; - -@Component({ - selector: 'app-my-view-report-etxn-card', - templateUrl: './my-view-report-etxn-card.component.html', - styleUrls: ['./my-view-report-etxn-card.component.scss'], -}) -export class MyViewReportEtxnCardComponent implements OnInit { - @Input() etxn: any; - - @Input() prevDate: Date; - - @Input() etxnIndex: number; - - @Output() goToTransaciton: EventEmitter = new EventEmitter(); - - showDate = true; - - constructor() {} - - ngOnInit() { - this.showDate = - (this.etxn && new Date(this.etxn.tx_txn_dt).toDateString()) !== - (this.prevDate && new Date(this.prevDate).toDateString()); - } - - goToTransactionClicked() { - this.goToTransaciton.emit({ etxn: this.etxn, etxnIndex: this.etxnIndex }); - } -} diff --git a/src/app/fyle/my-view-report/my-view-report.module.ts b/src/app/fyle/my-view-report/my-view-report.module.ts index befbb8a617..8bba38ccb5 100644 --- a/src/app/fyle/my-view-report/my-view-report.module.ts +++ b/src/app/fyle/my-view-report/my-view-report.module.ts @@ -1,12 +1,11 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { FormsModule } from '@angular/forms'; import { IonicModule } from '@ionic/angular'; import { MyViewReportPageRoutingModule } from './my-view-report-routing.module'; import { MyViewReportPage } from './my-view-report.page'; import { SharedModule } from 'src/app/shared/shared.module'; import { MatIconModule } from '@angular/material/icon'; -import { MyViewReportEtxnCardComponent } from './my-view-report-etxn-card/my-view-report-etxn-card.component'; import { MatButtonModule } from '@angular/material/button'; import { MatRippleModule } from '@angular/material/core'; import { ShareReportComponent } from './share-report/share-report.component'; @@ -32,12 +31,6 @@ import { MatCheckboxModule } from '@angular/material/checkbox'; MatSnackBarModule, MatCheckboxModule, ], - declarations: [ - MyViewReportPage, - MyViewReportEtxnCardComponent, - ShareReportComponent, - EditReportNamePopoverComponent, - AddExpensesToReportComponent, - ], + declarations: [MyViewReportPage, ShareReportComponent, EditReportNamePopoverComponent, AddExpensesToReportComponent], }) export class MyViewReportPageModule {} diff --git a/src/app/fyle/view-team-report/view-team-report-etxn-card/view-team-report-etxn-card.component.html b/src/app/fyle/view-team-report/view-team-report-etxn-card/view-team-report-etxn-card.component.html deleted file mode 100644 index e7c06b859f..0000000000 --- a/src/app/fyle/view-team-report/view-team-report-etxn-card/view-team-report-etxn-card.component.html +++ /dev/null @@ -1,36 +0,0 @@ -
-
- {{ etxn?.tx_txn_dt | date: 'EEEE' }} , - - {{ etxn?.tx_txn_dt | date: 'MMM dd, YYYY' }} - -
-
-
- -
-
-
- - {{ etxn.tx_currency }} - - - - {{ etxn.tx_amount | currency: etxn.tx_currency:'' }} - - -
-
- {{ etxn.vendor }} -
-
- {{ etxn.tx_org_category }} -
-
-
- warning -
-
-
diff --git a/src/app/fyle/view-team-report/view-team-report-etxn-card/view-team-report-etxn-card.component.scss b/src/app/fyle/view-team-report/view-team-report-etxn-card/view-team-report-etxn-card.component.scss deleted file mode 100644 index b8cefe324d..0000000000 --- a/src/app/fyle/view-team-report/view-team-report-etxn-card/view-team-report-etxn-card.component.scss +++ /dev/null @@ -1,62 +0,0 @@ -.etxn-card { - &--date { - color: #ababab; - font-size: 16px; - } - - &--details { - display: flex; - } - - &--body { - display: flex; - align-items: center; - margin: 8px; - padding: 8px 0; - } - - &--icon { - width: 20%; - color: #4a4a4a; - } - - &--non-reimbursable { - text-decoration: line-through; - - &-amount { - color: #ababab; - } - } - - &--details { - width: 60%; - display: flex; - flex-direction: column; - color: #4a4a4a; - padding-left: 8px; - font-size: 16px; - } - - &--violation { - width: 20%; - text-align: center; - } - - &--currency { - color: #ababab; - } - - &--amount { - font-size: 18px; - font-weight: 700; - color: #4a4a4a; - } - - &--category { - color: #ababab; - } - - &--violation { - color: orange; - } -} diff --git a/src/app/fyle/view-team-report/view-team-report-etxn-card/view-team-report-etxn-card.component.spec.ts b/src/app/fyle/view-team-report/view-team-report-etxn-card/view-team-report-etxn-card.component.spec.ts deleted file mode 100644 index 2cb4ec9486..0000000000 --- a/src/app/fyle/view-team-report/view-team-report-etxn-card/view-team-report-etxn-card.component.spec.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { DatePipe, CurrencyPipe } from '@angular/common'; -import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; -import { MatIconModule } from '@angular/material/icon'; -import { MatIconTestingModule } from '@angular/material/icon/testing'; -import { IonicModule } from '@ionic/angular'; -import { getElementBySelector, click, getTextContent } from 'src/app/core/dom-helpers'; -import { expenseData1 } from 'src/app/core/mock-data/expense.data'; -import { FyCategoryIconComponent } from 'src/app/shared/components/fy-category-icon/fy-category-icon.component'; -import { EllipsisPipe } from 'src/app/shared/pipes/ellipses.pipe'; -import { ViewTeamReportEtxnCardComponent } from './view-team-report-etxn-card.component'; - -describe('ViewTeamReportEtxnCardComponent', () => { - let component: ViewTeamReportEtxnCardComponent; - let fixture: ComponentFixture; - - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [ViewTeamReportEtxnCardComponent, FyCategoryIconComponent, EllipsisPipe, DatePipe, CurrencyPipe], - imports: [IonicModule.forRoot(), MatIconModule, MatIconTestingModule], - }).compileComponents(); - - fixture = TestBed.createComponent(ViewTeamReportEtxnCardComponent); - component = fixture.componentInstance; - component.etxn = expenseData1; - fixture.detectChanges(); - })); - - it('should create', () => { - expect(component).toBeTruthy(); - }); - - it('goToTransactionClicked(): should emit event when clicked on transaction', () => { - component.etxnIndex = 1; - fixture.detectChanges(); - const goToTxnSpy = spyOn(component.goToTransaciton, 'emit'); - - const goToTxnButton = getElementBySelector(fixture, '.etxn-card--body') as HTMLElement; - click(goToTxnButton); - expect(goToTxnSpy).toHaveBeenCalledOnceWith({ etxn: expenseData1, etxnIndex: 1 }); - }); - - it('should show txn data properly', () => { - expect(getTextContent(getElementBySelector(fixture, '.etxn-card--currency'))).toEqual(expenseData1.tx_currency); - expect(getTextContent(getElementBySelector(fixture, '.etxn-card--amount'))).toEqual(`${expenseData1.tx_amount}.00`); - expect(getTextContent(getElementBySelector(fixture, '.etxn-card--vendor'))).toEqual(``); - expect(getTextContent(getElementBySelector(fixture, '.etxn-card--category'))).toEqual( - `${expenseData1.tx_org_category}` - ); - }); - - it('should show date if txn date not equal to previous date', () => { - component.prevDate = new Date(); - fixture.detectChanges(); - - expect(getTextContent(getElementBySelector(fixture, '.etxn-card--date'))).toEqual('Wednesday , Nov 30, 2022'); - }); - - it('should not show date if txn date equal to previous date', () => { - component.prevDate = new Date(expenseData1.tx_txn_dt); - fixture.detectChanges(); - component.ngOnInit(); - expect(getTextContent(getElementBySelector(fixture, '.etxn-card--date'))).toEqual('Wednesday , Nov 30, 2022'); - expect(component.showDate).toBeFalse(); - }); -}); diff --git a/src/app/fyle/view-team-report/view-team-report-etxn-card/view-team-report-etxn-card.component.ts b/src/app/fyle/view-team-report/view-team-report-etxn-card/view-team-report-etxn-card.component.ts deleted file mode 100644 index 5e1f9fece3..0000000000 --- a/src/app/fyle/view-team-report/view-team-report-etxn-card/view-team-report-etxn-card.component.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; - -@Component({ - selector: 'app-view-team-report-etxn-card', - templateUrl: './view-team-report-etxn-card.component.html', - styleUrls: ['./view-team-report-etxn-card.component.scss'], -}) -export class ViewTeamReportEtxnCardComponent implements OnInit { - @Input() etxn: any; - - @Input() prevDate: Date; - - @Input() etxnIndex: number; - - @Output() goToTransaciton: EventEmitter = new EventEmitter(); - - showDate = true; - - constructor() {} - - ngOnInit() { - this.showDate = - (this.etxn && new Date(this.etxn.tx_txn_dt).toDateString()) !== - (this.prevDate && new Date(this.prevDate).toDateString()); - } - - goToTransactionClicked() { - this.goToTransaciton.emit({ etxn: this.etxn, etxnIndex: this.etxnIndex }); - } -} diff --git a/src/app/fyle/view-team-report/view-team-report.module.ts b/src/app/fyle/view-team-report/view-team-report.module.ts index e0ef3249c5..a14d0a05bf 100644 --- a/src/app/fyle/view-team-report/view-team-report.module.ts +++ b/src/app/fyle/view-team-report/view-team-report.module.ts @@ -7,7 +7,6 @@ import { ViewTeamReportPage } from './view-team-report.page'; import { MatIconModule } from '@angular/material/icon'; import { MatButtonModule } from '@angular/material/button'; import { MatRippleModule } from '@angular/material/core'; -import { ViewTeamReportEtxnCardComponent } from './view-team-report-etxn-card/view-team-report-etxn-card.component'; import { SharedModule } from 'src/app/shared/shared.module'; import { ShareReportComponent } from './share-report/share-report.component'; import { MatFormFieldModule } from '@angular/material/form-field'; @@ -26,6 +25,6 @@ import { MatSnackBarModule } from '@angular/material/snack-bar'; MatFormFieldModule, MatSnackBarModule, ], - declarations: [ViewTeamReportPage, ViewTeamReportEtxnCardComponent, ShareReportComponent], + declarations: [ViewTeamReportPage, ShareReportComponent], }) export class ViewTeamReportPageModule {} diff --git a/src/app/shared/components/fy-category-icon/fy-category-icon.component.html b/src/app/shared/components/fy-category-icon/fy-category-icon.component.html deleted file mode 100644 index 3767b4eff6..0000000000 --- a/src/app/shared/components/fy-category-icon/fy-category-icon.component.html +++ /dev/null @@ -1,31 +0,0 @@ - -
- - - - - - - - - - - - - - - - - - - - - - - -
-
diff --git a/src/app/shared/components/fy-category-icon/fy-category-icon.component.scss b/src/app/shared/components/fy-category-icon/fy-category-icon.component.scss deleted file mode 100644 index a17671bffe..0000000000 --- a/src/app/shared/components/fy-category-icon/fy-category-icon.component.scss +++ /dev/null @@ -1,7 +0,0 @@ -.icon-container { - &--icon { - fill: #818a91 !important; - height: 46px; - width: 46px; - } -} diff --git a/src/app/shared/components/fy-category-icon/fy-category-icon.component.spec.ts b/src/app/shared/components/fy-category-icon/fy-category-icon.component.spec.ts deleted file mode 100644 index 57e71814ff..0000000000 --- a/src/app/shared/components/fy-category-icon/fy-category-icon.component.spec.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; -import { MatIconModule } from '@angular/material/icon'; -import { MatIconTestingModule } from '@angular/material/icon/testing'; -import { IonicModule } from '@ionic/angular'; - -import { FyCategoryIconComponent } from './fy-category-icon.component'; - -describe('FyCategoryIconComponent', () => { - let fyCategoryIconComponent: FyCategoryIconComponent; - let fixture: ComponentFixture; - - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [FyCategoryIconComponent], - imports: [IonicModule.forRoot(), MatIconModule, MatIconTestingModule], - }).compileComponents(); - - fixture = TestBed.createComponent(FyCategoryIconComponent); - fyCategoryIconComponent = fixture.componentInstance; - fixture.detectChanges(); - })); - - it('should create', () => { - expect(fyCategoryIconComponent).toBeTruthy(); - }); -}); diff --git a/src/app/shared/components/fy-category-icon/fy-category-icon.component.ts b/src/app/shared/components/fy-category-icon/fy-category-icon.component.ts deleted file mode 100644 index 092afc7396..0000000000 --- a/src/app/shared/components/fy-category-icon/fy-category-icon.component.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Component, OnInit, Input } from '@angular/core'; - -@Component({ - selector: 'app-fy-category-icon', - templateUrl: './fy-category-icon.component.html', - styleUrls: ['./fy-category-icon.component.scss'], -}) -export class FyCategoryIconComponent implements OnInit { - @Input() category: string; - - constructor() {} - - ngOnInit() {} -} diff --git a/src/app/shared/icon/icon.module.ts b/src/app/shared/icon/icon.module.ts index 29f8a46c97..6a9a589f42 100644 --- a/src/app/shared/icon/icon.module.ts +++ b/src/app/shared/icon/icon.module.ts @@ -18,9 +18,7 @@ export class IconModule { 'add-report.svg', 'add-to-list.svg', 'attachment.svg', - 'bike.svg', 'bulk.svg', - 'bus.svg', 'building.svg', 'bulk-mode.svg', 'car.svg', @@ -40,21 +38,17 @@ export class IconModule { 'camera-pointer-bottom-right.svg', 'danger.svg', 'duplicate.svg', - 'entertainment.svg', 'expense.svg', 'expense-rule.svg', 'error.svg', 'edit.svg', 'error-filled.svg', - 'flight.svg', - 'food.svg', 'flash-off.svg', 'flash-on.svg', 'fy-add-new-expense.svg', 'fy-advances-new.svg', 'fy-arrow-down.svg', 'fy-attachment.svg', - 'fy-bike.svg', 'fy-bot.svg', 'fy-bus.svg', 'fy-calendar.svg', @@ -67,14 +61,12 @@ export class IconModule { 'fy-classify-ccc.svg', 'fy-close.svg', 'fy-corporate-card.svg', - 'fy-cyclist.svg', 'fy-dashboard-new.svg', 'fy-delegate-switch.svg', 'fy-delete.svg', 'fy-dismiss.svg', 'fy-done.svg', 'fy-edit-gradient', - 'fy-electric-car.svg', 'fy-email.svg', 'fy-expense.svg', 'fy-expenses-new.svg', @@ -120,24 +112,16 @@ export class IconModule { 'flag.svg', 'fy-unmatched.svg', 'fy-location.svg', - 'gas.svg', 'gallery.svg', - 'hotel.svg', 'insta-fyle.svg', 'ionic-log-out-outline.svg', 'information.svg', 'logo-icon-white.svg', 'logo-white.svg', 'list.svg', - 'mail.svg', - 'mileage.svg', 'navigate-left.svg', 'navigate-right.svg', 'no-attachment.svg', - 'office-supplies.svg', - 'parking.svg', - 'per_diem.svg', - 'phone.svg', 'professional-service.svg', 'plus.svg', 'profile.svg', @@ -146,7 +130,6 @@ export class IconModule { 'search.svg', 'settings.svg', 'single.svg', - 'software.svg', 'split-expense.svg', 'send.svg', 'send-back.svg', @@ -156,12 +139,9 @@ export class IconModule { 'single-mode.svg', 'tag.svg', 'tax.svg', - 'taxi.svg', 'tick-circle-outline-white.svg', 'toll-charge.svg', - 'train.svg', 'tick-square-filled.svg', - 'utility.svg', 'warning-inverted.svg', 'warning.svg', 'fy-merge.svg', diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts index 420a5baabc..b3b64ec422 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -31,7 +31,6 @@ import { FyAlertComponent } from './components/fy-alert/fy-alert.component'; import { AdvanceState } from './pipes/advance-state.pipe'; import { InitialsPipe } from './pipes/initials.pipe'; import { ApproverDialogComponent } from './components/fy-approver/add-approvers-popover/approver-dialog/approver-dialog.component'; -import { FyCategoryIconComponent } from './components/fy-category-icon/fy-category-icon.component'; import { FyMenuIconComponent } from './components/fy-menu-icon/fy-menu-icon.component'; import { FyViewAttachmentComponent } from './components/fy-view-attachment/fy-view-attachment.component'; import { FyHighlightTextComponent } from './components/fy-highlight-text/fy-highlight-text.component'; @@ -174,7 +173,6 @@ import { AutofocusDirective } from './directive/autofocus.directive'; FyPopupComponent, FyApproverComponent, ApproverDialogComponent, - FyCategoryIconComponent, FyMenuIconComponent, FyPolicyViolationInfoComponent, FyAddToReportComponent, @@ -314,7 +312,6 @@ import { AutofocusDirective } from './directive/autofocus.directive'; FyZeroStateComponent, FyPopupComponent, FyApproverComponent, - FyCategoryIconComponent, FyMenuIconComponent, FyPolicyViolationInfoComponent, FyAddToReportComponent, diff --git a/src/assets/svg/bike.svg b/src/assets/svg/bike.svg deleted file mode 100644 index 7250a44c2f..0000000000 --- a/src/assets/svg/bike.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/src/assets/svg/bus.svg b/src/assets/svg/bus.svg deleted file mode 100755 index c3aef2c170..0000000000 --- a/src/assets/svg/bus.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/src/assets/svg/entertainment.svg b/src/assets/svg/entertainment.svg deleted file mode 100755 index 6a19c785f6..0000000000 --- a/src/assets/svg/entertainment.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/src/assets/svg/flight.svg b/src/assets/svg/flight.svg deleted file mode 100755 index 4a51d878f9..0000000000 --- a/src/assets/svg/flight.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/src/assets/svg/food.svg b/src/assets/svg/food.svg deleted file mode 100755 index f5eb85df40..0000000000 --- a/src/assets/svg/food.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/src/assets/svg/fy-bike.svg b/src/assets/svg/fy-bike.svg deleted file mode 100644 index 13311ad1f0..0000000000 --- a/src/assets/svg/fy-bike.svg +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/assets/svg/fy-cyclist.svg b/src/assets/svg/fy-cyclist.svg deleted file mode 100644 index cc3d4028d6..0000000000 --- a/src/assets/svg/fy-cyclist.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/assets/svg/fy-electric-car.svg b/src/assets/svg/fy-electric-car.svg deleted file mode 100644 index 5d1b8a12c4..0000000000 --- a/src/assets/svg/fy-electric-car.svg +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/assets/svg/gas.svg b/src/assets/svg/gas.svg deleted file mode 100755 index ee3702dc4d..0000000000 --- a/src/assets/svg/gas.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/src/assets/svg/hotel.svg b/src/assets/svg/hotel.svg deleted file mode 100644 index ff62096da6..0000000000 --- a/src/assets/svg/hotel.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/src/assets/svg/mail.svg b/src/assets/svg/mail.svg deleted file mode 100755 index 1e166d5e08..0000000000 --- a/src/assets/svg/mail.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/src/assets/svg/mileage.svg b/src/assets/svg/mileage.svg deleted file mode 100755 index 139d5d02b1..0000000000 --- a/src/assets/svg/mileage.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/src/assets/svg/office-supplies.svg b/src/assets/svg/office-supplies.svg deleted file mode 100755 index 4aa9a96d9b..0000000000 --- a/src/assets/svg/office-supplies.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/src/assets/svg/parking.svg b/src/assets/svg/parking.svg deleted file mode 100755 index 86cd629082..0000000000 --- a/src/assets/svg/parking.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/src/assets/svg/per_diem.svg b/src/assets/svg/per_diem.svg deleted file mode 100644 index 9b3c8c322f..0000000000 --- a/src/assets/svg/per_diem.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/assets/svg/phone.svg b/src/assets/svg/phone.svg deleted file mode 100755 index 9b13636d7c..0000000000 --- a/src/assets/svg/phone.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/src/assets/svg/software.svg b/src/assets/svg/software.svg deleted file mode 100755 index 4e87ac47c1..0000000000 --- a/src/assets/svg/software.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/src/assets/svg/taxi.svg b/src/assets/svg/taxi.svg deleted file mode 100755 index 4532f19dbf..0000000000 --- a/src/assets/svg/taxi.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/src/assets/svg/train.svg b/src/assets/svg/train.svg deleted file mode 100755 index 516facff0e..0000000000 --- a/src/assets/svg/train.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/src/assets/svg/utility.svg b/src/assets/svg/utility.svg deleted file mode 100755 index fa94768f95..0000000000 --- a/src/assets/svg/utility.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - From e26e73eca58d8b1babbe31b8f1255062488e0475 Mon Sep 17 00:00:00 2001 From: Dimple K H <31147415+Dimple16@users.noreply.github.com> Date: Mon, 20 Nov 2023 12:18:41 +0530 Subject: [PATCH 2/2] feat: Standardize icons - Milestone-2 (#2575) --- src/app/core/mock-data/sidemenu.data.ts | 6 +++--- .../add-edit-advance-request.page.html | 2 +- .../add-edit-expense.page.html | 2 +- .../my-view-advance-request.page.html | 2 +- .../my-view-advance/my-view-advance.page.html | 2 +- .../expense-preview.component.scss | 1 + .../expenses-card.component.html | 5 ++++- .../expenses-card.component.scss | 5 +++++ .../expenses-card.component.spec.ts | 4 ++-- .../expenses-card.component.html | 5 ++++- .../expenses-card.component.scss | 5 +++++ .../expenses-card.component.spec.ts | 4 ++-- .../fy-statistic/fy-statistic.component.scss | 2 +- .../sidemenu/sidemenu.component.spec.ts | 2 +- .../components/sidemenu/sidemenu.component.ts | 2 +- src/app/shared/icon/icon.module.ts | 3 +-- src/assets/images/add-to-list.png | Bin 825 -> 0 bytes src/assets/svg/add-receipt.svg | 18 ------------------ src/assets/svg/add-report.svg | 6 ------ src/assets/svg/add-to-list.svg | 18 ------------------ src/assets/svg/advances.svg | 6 ------ src/assets/svg/attachment.svg | 4 ++-- src/assets/svg/wallet.svg | 6 ++++++ 23 files changed, 42 insertions(+), 68 deletions(-) delete mode 100644 src/assets/images/add-to-list.png delete mode 100644 src/assets/svg/add-receipt.svg delete mode 100644 src/assets/svg/add-report.svg delete mode 100644 src/assets/svg/add-to-list.svg delete mode 100644 src/assets/svg/advances.svg create mode 100644 src/assets/svg/wallet.svg diff --git a/src/app/core/mock-data/sidemenu.data.ts b/src/app/core/mock-data/sidemenu.data.ts index dd75c91711..74d258442f 100644 --- a/src/app/core/mock-data/sidemenu.data.ts +++ b/src/app/core/mock-data/sidemenu.data.ts @@ -51,7 +51,7 @@ export const PrimaryOptionsRes1: Partial[] = [ { title: 'Advances', isVisible: true, - icon: 'advances', + icon: 'wallet', route: ['/', 'enterprise', 'my_advances'], disabled: false, }, @@ -110,7 +110,7 @@ export const getPrimarySidemenuOptionsRes1 = [ { title: 'Advances', isVisible: true, - icon: 'advances', + icon: 'wallet', route: ['/', 'enterprise', 'my_advances'], disabled: false, }, @@ -177,7 +177,7 @@ export const setSideMenuRes: Partial[] = [ { title: 'Advances', isVisible: true, - icon: 'advances', + icon: 'wallet', route: ['/', 'enterprise', 'my_advances'], disabled: false, }, diff --git a/src/app/fyle/add-edit-advance-request/add-edit-advance-request.page.html b/src/app/fyle/add-edit-advance-request/add-edit-advance-request.page.html index 62d5e44bfb..d66ef7463a 100644 --- a/src/app/fyle/add-edit-advance-request/add-edit-advance-request.page.html +++ b/src/app/fyle/add-edit-advance-request/add-edit-advance-request.page.html @@ -47,7 +47,7 @@
- +
diff --git a/src/app/fyle/add-edit-expense/add-edit-expense.page.html b/src/app/fyle/add-edit-expense/add-edit-expense.page.html index 4978561647..e6e84bf1ef 100644 --- a/src/app/fyle/add-edit-expense/add-edit-expense.page.html +++ b/src/app/fyle/add-edit-expense/add-edit-expense.page.html @@ -198,7 +198,7 @@ class="add-edit-expense--receipt-image" > - +
diff --git a/src/app/shared/components/expenses-card-v2/expenses-card.component.scss b/src/app/shared/components/expenses-card-v2/expenses-card.component.scss index ba479eefa5..b12d9ffd5b 100644 --- a/src/app/shared/components/expenses-card-v2/expenses-card.component.scss +++ b/src/app/shared/components/expenses-card-v2/expenses-card.component.scss @@ -133,11 +133,16 @@ &--receipt-icon { height: 35px; width: 35px; + stroke: $black-light; &__pdf { stroke: none; color: $black-light; } + + &__image { + stroke: none; + } } &--receipt-thumbnail { diff --git a/src/app/shared/components/expenses-card-v2/expenses-card.component.spec.ts b/src/app/shared/components/expenses-card-v2/expenses-card.component.spec.ts index b852000c76..d388d9084a 100644 --- a/src/app/shared/components/expenses-card-v2/expenses-card.component.spec.ts +++ b/src/app/shared/components/expenses-card-v2/expenses-card.component.spec.ts @@ -76,7 +76,7 @@ describe('ExpensesCardComponent', () => { 'post', ]); - fileServiceSpy.downloadUrl.and.returnValue(of('/assets/images/add-to-list.png')); + fileServiceSpy.downloadUrl.and.returnValue(of('/assets/svg/list-plus.svg')); const popoverControllerSpy = jasmine.createSpyObj('PopoverController', ['create']); const networkServiceSpy = jasmine.createSpyObj('NetworkService', ['connectivityWatcher', 'isOnline']); const transactionsOutboxServiceSpy = jasmine.createSpyObj('TransactionsOutboxService', [ @@ -664,7 +664,7 @@ describe('ExpensesCardComponent', () => { describe('attachReceipt(): ', () => { it('should attach the receipt to the thumbnail when receipt is not a pdf', fakeAsync(() => { - const dataUrl = '/assets/images/add-to-list.png'; + const dataUrl = '/assets/svg/list-plus.svg'; const attachmentType = 'png'; const receiptDetailsaRes = { dataUrl, diff --git a/src/app/shared/components/expenses-card/expenses-card.component.html b/src/app/shared/components/expenses-card/expenses-card.component.html index 28bc75e0b3..87c67d28a9 100644 --- a/src/app/shared/components/expenses-card/expenses-card.component.html +++ b/src/app/shared/components/expenses-card/expenses-card.component.html @@ -43,7 +43,10 @@
diff --git a/src/app/shared/components/expenses-card/expenses-card.component.scss b/src/app/shared/components/expenses-card/expenses-card.component.scss index ba479eefa5..b12d9ffd5b 100644 --- a/src/app/shared/components/expenses-card/expenses-card.component.scss +++ b/src/app/shared/components/expenses-card/expenses-card.component.scss @@ -133,11 +133,16 @@ &--receipt-icon { height: 35px; width: 35px; + stroke: $black-light; &__pdf { stroke: none; color: $black-light; } + + &__image { + stroke: none; + } } &--receipt-thumbnail { diff --git a/src/app/shared/components/expenses-card/expenses-card.component.spec.ts b/src/app/shared/components/expenses-card/expenses-card.component.spec.ts index b9d1a285ce..aad204b432 100644 --- a/src/app/shared/components/expenses-card/expenses-card.component.spec.ts +++ b/src/app/shared/components/expenses-card/expenses-card.component.spec.ts @@ -73,7 +73,7 @@ describe('ExpensesCardComponent', () => { 'post', ]); - fileServiceSpy.downloadUrl.and.returnValue(of('/assets/images/add-to-list.png')); + fileServiceSpy.downloadUrl.and.returnValue(of('/assets/svg/list-plus.svg')); const popoverControllerSpy = jasmine.createSpyObj('PopoverController', ['create']); const networkServiceSpy = jasmine.createSpyObj('NetworkService', ['connectivityWatcher', 'isOnline']); const transactionsOutboxServiceSpy = jasmine.createSpyObj('TransactionsOutboxService', [ @@ -636,7 +636,7 @@ describe('ExpensesCardComponent', () => { describe('attachReceipt(): ', () => { it('should attach the receipt to the thumbnail when receipt is not a pdf', fakeAsync(() => { - const dataUrl = '/assets/images/add-to-list.png'; + const dataUrl = '/assets/svg/list-plus.svg'; const attachmentType = 'png'; const receiptDetailsaRes = { dataUrl, diff --git a/src/app/shared/components/fy-statistic/fy-statistic.component.scss b/src/app/shared/components/fy-statistic/fy-statistic.component.scss index 7d501f4256..4a4290f5f7 100644 --- a/src/app/shared/components/fy-statistic/fy-statistic.component.scss +++ b/src/app/shared/components/fy-statistic/fy-statistic.component.scss @@ -20,7 +20,7 @@ } &--icon-container__icon { - color: $grey-light; + fill: $grey-light; height: 22px; width: 22px; margin: auto; diff --git a/src/app/shared/components/sidemenu/sidemenu.component.spec.ts b/src/app/shared/components/sidemenu/sidemenu.component.spec.ts index 4001a6691a..e8fd560dd2 100644 --- a/src/app/shared/components/sidemenu/sidemenu.component.spec.ts +++ b/src/app/shared/components/sidemenu/sidemenu.component.spec.ts @@ -332,7 +332,7 @@ describe('SidemenuComponent', () => { { title: 'Advances', isVisible: component.orgSettings.advance_requests.enabled, - icon: 'advances', + icon: 'wallet', route: ['/', 'enterprise', 'my_advances'], disabled: false, }, diff --git a/src/app/shared/components/sidemenu/sidemenu.component.ts b/src/app/shared/components/sidemenu/sidemenu.component.ts index 5d0d69d49f..226c05059d 100644 --- a/src/app/shared/components/sidemenu/sidemenu.component.ts +++ b/src/app/shared/components/sidemenu/sidemenu.component.ts @@ -239,7 +239,7 @@ export class SidemenuComponent implements OnInit { { title: 'Advances', isVisible: this.orgSettings.advances.enabled || this.orgSettings.advance_requests.enabled, - icon: 'advances', + icon: 'wallet', route: ['/', 'enterprise', 'my_advances'], disabled: !isConnected, }, diff --git a/src/app/shared/icon/icon.module.ts b/src/app/shared/icon/icon.module.ts index 6a9a589f42..1e4bd9162e 100644 --- a/src/app/shared/icon/icon.module.ts +++ b/src/app/shared/icon/icon.module.ts @@ -15,8 +15,6 @@ export class IconModule { svgImageArray = [ 'arrow-prev.svg', 'arrow-next.svg', - 'add-report.svg', - 'add-to-list.svg', 'attachment.svg', 'bulk.svg', 'building.svg', @@ -150,6 +148,7 @@ export class IconModule { 'list-plus.svg', 'user-two.svg', 'vertical-dots-menu.svg', + 'wallet.svg', ]; constructor(private domSanitizer: DomSanitizer, private matIconRegistry: MatIconRegistry) { diff --git a/src/assets/images/add-to-list.png b/src/assets/images/add-to-list.png deleted file mode 100644 index 81bdfe3d02c0bc681e9871a21a00a4720f6c3e1a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 825 zcmV-91IGM`P)En1v4OZ!+};R6Jak9#!fXfKsR9PP^n?-(1Ct} z<|8SB%n9w9&hQiAO~fq1Tj zI{WC>nuBz(`%h_Mbpr_;HZ1T1j}Saa3AQg#d$S1D!~N~eTS-eVR*!j^AnH?E=vOEO}I&~Uh28k>C&x=`l zyxh8$nd;;>5=rM5S9iFvJH2wA2<(IXt-ZJ~w*fg}GMNAcnqkSzE+BI|AoE=Jxr&>g z*3S}2IdjiQP^(vNhOR#4`wvV3=wzz?JquQ@29|sZ!9+70QP|V?X}u|z5s=@jLReA<|u`HSi~p%XikkD zq@3{4Bci?D!TL^812aHz_bBr145S1Ro*rFi{Qrl)mHZ{-^{m(!00000NkvXXu0mjf D*UfFj diff --git a/src/assets/svg/add-receipt.svg b/src/assets/svg/add-receipt.svg deleted file mode 100644 index 77906dddbf..0000000000 --- a/src/assets/svg/add-receipt.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/src/assets/svg/add-report.svg b/src/assets/svg/add-report.svg deleted file mode 100644 index d812784a88..0000000000 --- a/src/assets/svg/add-report.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/assets/svg/add-to-list.svg b/src/assets/svg/add-to-list.svg deleted file mode 100644 index 839ac1cb7d..0000000000 --- a/src/assets/svg/add-to-list.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/src/assets/svg/advances.svg b/src/assets/svg/advances.svg deleted file mode 100644 index 311b1be6f1..0000000000 --- a/src/assets/svg/advances.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/assets/svg/attachment.svg b/src/assets/svg/attachment.svg index 4d6c1f000c..9809f5eb3d 100644 --- a/src/assets/svg/attachment.svg +++ b/src/assets/svg/attachment.svg @@ -1,3 +1,3 @@ - - + + diff --git a/src/assets/svg/wallet.svg b/src/assets/svg/wallet.svg new file mode 100644 index 0000000000..237b2c1fe3 --- /dev/null +++ b/src/assets/svg/wallet.svg @@ -0,0 +1,6 @@ + + + + + +