diff --git a/src/app/fyle/my-expenses/add-txn-to-report-dialog/add-txn-to-report-dialog.component.html b/src/app/fyle/my-expenses/add-txn-to-report-dialog/add-txn-to-report-dialog.component.html index 8da31cda7a..3c2512f8e2 100644 --- a/src/app/fyle/my-expenses/add-txn-to-report-dialog/add-txn-to-report-dialog.component.html +++ b/src/app/fyle/my-expenses/add-txn-to-report-dialog/add-txn-to-report-dialog.component.html @@ -1,5 +1,6 @@
+ @@ -9,7 +10,7 @@ class="report-list--header--row-icon" > - Add to Report + Add to Report
- - + + + + +
{{ report.purpose }}
{{ report.num_expenses }} Expense{{ report.num_expenses > 1 ? 's' : '' }}
-
-
{{ reportCurrencySymbol }} - {{ - report.amount || 0 | humanizeCurrency : report.currency : true - }} + + {{ { value: report.amount || 0, currencyCode: report.currency, skipSymbol: true } | exactCurrency }} +
+
+
{{ report.state | reportState : data.isNewReportsFlowEnabled | snakeCaseToSpaceCase | titlecase }} diff --git a/src/app/fyle/my-expenses/add-txn-to-report-dialog/add-txn-to-report-dialog.component.scss b/src/app/fyle/my-expenses/add-txn-to-report-dialog/add-txn-to-report-dialog.component.scss index 54c7dc3ebe..24234fd847 100644 --- a/src/app/fyle/my-expenses/add-txn-to-report-dialog/add-txn-to-report-dialog.component.scss +++ b/src/app/fyle/my-expenses/add-txn-to-report-dialog/add-txn-to-report-dialog.component.scss @@ -3,16 +3,21 @@ $reports_sent_back_color: #da1e28; .report-list { &--header { - font-size: 24px; + font-size: 18px; line-height: 1.3; color: $black; - margin-bottom: 24px; font-weight: 500; + border-bottom: 1px solid $grey; &--row-icon-container { display: flex; align-items: center; justify-content: center; + font-size: 20px; + } + + &--handle-bar-icon { + margin: 0 0 2px 0; } } @@ -20,21 +25,26 @@ $reports_sent_back_color: #da1e28; margin-top: 10px; } + &--list-icon { + width: 16px; + height: 16px; + } + &--currency-amount-container { - margin-bottom: 4px; + margin: 10px 0 4px 0; } &--currency { color: $black-light; font-weight: 500; - font-size: 14px; + font-size: 16px; line-height: 1.3; margin-right: 2px; } &--amount { color: $black; - font-size: 20px; + font-size: 16px; line-height: 1.3; font-weight: 500; } @@ -42,19 +52,24 @@ $reports_sent_back_color: #da1e28; &--purpose { font-weight: 500; color: $black; - font-size: 18px; + font-size: 14px; line-height: 1.3; } &--count { - color: $blue-black; + color: $dark-grey; + font-size: 12px; line-height: 1.3; margin-top: 2px; } + &--report-card { + padding-top: 6px; + } + &--divider { border-bottom: 1px solid $grey-lighter; - margin-bottom: 14px; + margin-bottom: 6px; } &--state { diff --git a/src/app/fyle/my-expenses/add-txn-to-report-dialog/add-txn-to-report-dialog.component.spec.ts b/src/app/fyle/my-expenses/add-txn-to-report-dialog/add-txn-to-report-dialog.component.spec.ts index 0ea0386428..ae603ad8a6 100644 --- a/src/app/fyle/my-expenses/add-txn-to-report-dialog/add-txn-to-report-dialog.component.spec.ts +++ b/src/app/fyle/my-expenses/add-txn-to-report-dialog/add-txn-to-report-dialog.component.spec.ts @@ -15,6 +15,7 @@ import { ReportState } from 'src/app/shared/pipes/report-state.pipe'; import { SnakeCaseToSpaceCase } from 'src/app/shared/pipes/snake-case-to-space-case.pipe'; import { AddTxnToReportDialogComponent } from './add-txn-to-report-dialog.component'; import { expectedReportsSinglePage } from 'src/app/core/mock-data/platform-report.data'; +import { ExactCurrencyPipe } from 'src/app/shared/pipes/exact-currency.pipe'; describe('AddTxnToReportDialogComponent', () => { let component: AddTxnToReportDialogComponent; @@ -32,6 +33,7 @@ describe('AddTxnToReportDialogComponent', () => { AddTxnToReportDialogComponent, FyZeroStateComponent, HumanizeCurrencyPipe, + ExactCurrencyPipe, ReportState, SnakeCaseToSpaceCase, ], diff --git a/src/app/fyle/my-expenses/my-expenses.page.html b/src/app/fyle/my-expenses/my-expenses.page.html index c30ce4e4c5..407b4556d3 100644 --- a/src/app/fyle/my-expenses/my-expenses.page.html +++ b/src/app/fyle/my-expenses/my-expenses.page.html @@ -65,12 +65,12 @@ - - {{allExpensesStats?.count}} {{(allExpensesStats?.count > 1) ? 'expenses' : 'expense'}} +
+ {{allExpensesStats?.count}} {{(allExpensesStats?.count > 1) ? 'expenses' : 'expense'}} - ({{(allExpensesStats.amount || 0) | humanizeCurrency: homeCurrency }}) + ({{ { value: allExpensesStats.amount || 0, currencyCode: homeCurrency } | exactCurrency }}) - +
@@ -121,6 +121,7 @@ @@ -212,6 +213,7 @@ diff --git a/src/app/fyle/my-expenses/my-expenses.page.scss b/src/app/fyle/my-expenses/my-expenses.page.scss index 66f62f5cca..9df0de97cd 100644 --- a/src/app/fyle/my-expenses/my-expenses.page.scss +++ b/src/app/fyle/my-expenses/my-expenses.page.scss @@ -37,12 +37,17 @@ } &--multiselect-title { - padding-left: 12px; - padding-right: 0px; + display: flex; + align-items: center; + flex-wrap: wrap; + color: $blue-black; + padding: 20px 0px 20px 12px; + font-size: 18px; + gap: 4px; } &--multiselect-amount { - font-size: 16px; + font-size: 14px; font-weight: 400; } @@ -294,8 +299,9 @@ &--footer-conatiner { display: flex; justify-content: space-around; - padding: 14px 36px; + padding: 16px; position: fixed; + gap: 16px; bottom: 0; width: 100%; background-color: $pure-white; @@ -312,10 +318,13 @@ height: auto; background-color: transparent; color: $black; - font-size: 16px; + font-size: 14px; line-height: 1.25; + border: 1px solid $grey; + border-radius: 4px; + &__disabled { - opacity: 0.2; + opacity: 0.6; } } @@ -326,7 +335,6 @@ font-size: 14px; line-height: 1.3; border-radius: 4px; - width: 100%; &__disabled { opacity: 0.8; diff --git a/src/app/shared/components/create-new-report-v2/create-new-report.component.html b/src/app/shared/components/create-new-report-v2/create-new-report.component.html index 2777b65f82..b5b3b0cea0 100644 --- a/src/app/shared/components/create-new-report-v2/create-new-report.component.html +++ b/src/app/shared/components/create-new-report-v2/create-new-report.component.html @@ -5,8 +5,10 @@
Create new report
- {{ selectedElements.length }} {{ selectedElements.length > 1 ? 'Expenses' : 'Expense' }} - - {{ selectedTotalAmount || 0 | humanizeCurrency : homeCurrency }} + {{ selectedElements.length }} {{ selectedElements.length > 1 ? 'expenses' : 'expense' }} +
+
+ {{ { value: selectedTotalAmount || 0, currencyCode: homeCurrency } | exactCurrency }}
@@ -40,7 +42,7 @@
Please enter report name.
-
EXPENSES
+
Expenses
{ 'create', ]); const humanizeCurrencyPipeSpy = jasmine.createSpyObj('HumanizeCurrency', ['transform']); + const exactCurrencyPipeSpy = jasmine.createSpyObj('ExactCurrency', ['transform']); const fyCurrencyPipeSpy = jasmine.createSpyObj('FyCurrencyPipe', ['transform']); TestBed.configureTestingModule({ - declarations: [CreateNewReportComponent, HumanizeCurrencyPipe, FyCurrencyPipe], + declarations: [CreateNewReportComponent, HumanizeCurrencyPipe, ExactCurrencyPipe, FyCurrencyPipe], imports: [ IonicModule.forRoot(), MatIconModule, @@ -59,6 +61,7 @@ describe('CreateNewReportComponent', () => { { provide: CurrencyService, useValue: currencyService }, { provide: ExpenseFieldsService, useValue: expenseFieldsService }, { provide: HumanizeCurrencyPipe, useValue: humanizeCurrencyPipeSpy }, + { provide: ExactCurrencyPipe, useValue: exactCurrencyPipeSpy }, { provide: FyCurrencyPipe, useValue: fyCurrencyPipeSpy }, { provide: SpenderReportsService, useValue: spenderReportsService }, ], diff --git a/src/app/shared/components/expenses-card-v2/expenses-card.component.html b/src/app/shared/components/expenses-card-v2/expenses-card.component.html index 2ef71768af..d61b3dfbf4 100644 --- a/src/app/shared/components/expenses-card-v2/expenses-card.component.html +++ b/src/app/shared/components/expenses-card-v2/expenses-card.component.html @@ -22,13 +22,15 @@
+
+
@@ -51,6 +53,7 @@
+
+ +
@@ -134,6 +141,7 @@ + @@ -165,8 +173,10 @@ +
+
+
-
- {{ expenseFields?.project_id[0]?.field_name }}: - {{ expense?.project?.display_name ? expense?.project?.display_name : 'Unspecified' }} + + +
+
+ + {{ (expense.currency | currencySymbol : 'wide') || (homeCurrency | currencySymbol : 'wide') }} + + + + {{ { value: expense.amount, currencyCode: expense.currency, skipSymbol: true } | exactCurrency }} + + + {{ { value: expense.amount, currencyCode: homeCurrency, skipSymbol: true } | exactCurrency }} + + + +
+ +
+ ({{ expense.foreign_amount | humanizeCurrency : expense.foreign_currency }} at + {{ expense.amount / expense.foreign_amount | currency : expense.currency : 'code' }})
+ +
-
Expense information
-
missing
-
-
-
- - {{ (expense.currency | currencySymbol : 'wide') || (homeCurrency | currencySymbol : 'wide') }} - +
Expense information missing
- - - {{ expense.amount | humanizeCurrency : expense.currency : true }} - - - {{ expense.amount | humanizeCurrency : homeCurrency : true }} - - - -
+ +
+
+ + {{ (expense.currency | currencySymbol : 'wide') || (homeCurrency | currencySymbol : 'wide') }} + -
- ({{ expense.foreign_amount | humanizeCurrency : expense.foreign_currency }} at - {{ expense.amount / expense.foreign_amount | currency : expense.currency : 'code' }}) + + + {{ expense.amount | humanizeCurrency : expense.currency : true }} + + + {{ expense.amount | humanizeCurrency : homeCurrency : true }} + + + +
+ +
+ ({{ expense.foreign_amount | humanizeCurrency : expense.foreign_currency }} at + {{ expense.amount / expense.foreign_amount | currency : expense.currency : 'code' }}) +
+
-
+ +
+
{{ expense.state | expenseState | titlecase }} 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 532908672d..ee3ae5eb83 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 @@ -2,7 +2,7 @@ .expenses-card { &--date { - color: $grey-light; + color: $black-light; font-size: 14px; padding: 12px 0 12px 12px; background-color: $white; @@ -27,12 +27,19 @@ width: 100%; overflow: hidden; text-overflow: ellipsis; + padding: 4px 0; + } + + &--vertical-dotted-border { + border-left: 2px dashed $border-tertiary; + height: auto; + margin: 0 8px; } &--checkbox-container { margin-top: auto; margin-bottom: auto; - margin-right: 16px; + margin-right: 8px; } &--checkbox { @@ -104,35 +111,38 @@ &--receipt-container { background-color: $light-grey; border-radius: 8px; - height: 74px; padding: 20px; - min-width: 74px; + height: 72px; + width: 56px; + justify-content: center; + align-items: center; } &--receipt-image-container { background-color: $light-grey; border-radius: 8px; - height: 74px; - min-width: 75px; + height: 72px; + width: 56px; display: flex; justify-content: center; align-items: center; } &--receipt-image { - height: 70px; - width: 80px; + height: auto; + max-width: 56px; } &--with-image { background-size: cover; background-repeat: no-repeat; background-position: center; + width: 56px; } &--receipt-icon { - height: 35px; - width: 35px; + height: 20px; + width: 20px; color: $black-light; &__pdf { @@ -146,20 +156,21 @@ } &--receipt-thumbnail { - height: 74px; + height: 72px; margin-left: auto; margin-right: auto; } &--category-vendor-project-container { - padding: 3px 20px 4px 11px; width: 100%; overflow: hidden; text-overflow: ellipsis; + display: flex; + flex-direction: column; + &__align-vertical-center { display: flex; flex-direction: column; - justify-content: center; } &__error { @@ -171,27 +182,28 @@ } &--category-icon-container { - max-width: 170px; width: 100%; } &--category { color: $black; - font-size: 16px; + font-size: 14px; font-weight: 500; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; - max-width: 126px; + max-width: 80%; + padding-right: 4px; } &--icons { display: flex; align-items: center; + padding-right: 4px; + gap: 4px; &__policy-violated-icon { - margin-left: 4px; width: 16px; height: 16px; color: $red; @@ -199,7 +211,6 @@ } &__split-icon { - margin-left: 4px; width: 16px; height: 16px; color: $brand-primary-light; @@ -208,7 +219,6 @@ &__duplicate-icon { width: 16px; height: 16px; - margin-left: 4px; color: $dark-yellow; } } @@ -222,8 +232,8 @@ } &--vendor { - color: $blue-black; - font-size: 14px; + color: $dark-grey; + font-size: 12px; line-height: 1.2; margin-top: 2px; white-space: nowrap; @@ -254,13 +264,16 @@ flex-direction: column; } - &--currency-amount-container { - width: 100%; - white-space: nowrap; + &--currency-amount-exchange-rate-container { + display: flex; + align-items: center; + gap: 4px; + margin-top: 10px; + flex-wrap: wrap; } &--currency { - color: $black-light; + color: $black; font-weight: 500; font-size: 16px; line-height: 1.25; @@ -269,7 +282,7 @@ &--amount { color: $black; - font-size: 20px; + font-size: 16px; line-height: 1.3; margin-right: 6px; font-weight: 500; @@ -304,7 +317,6 @@ } &--state-container { - margin-top: 4px; align-self: flex-end; &__center { diff --git a/src/assets/svg/notch.svg b/src/assets/svg/notch.svg index cb688eb262..83b64c0fe1 100755 --- a/src/assets/svg/notch.svg +++ b/src/assets/svg/notch.svg @@ -1,3 +1,3 @@ - - + + \ No newline at end of file diff --git a/src/global.scss b/src/global.scss index 12ce0ea772..1d756ac10e 100644 --- a/src/global.scss +++ b/src/global.scss @@ -87,7 +87,7 @@ ion-popover.error-popover { } .mat-bottom-sheet-1 { - padding: 24px 16px !important; + padding: 16px 12px 12px 12px !important; border-radius: 16px 16px 0px 0px !important; } @@ -528,9 +528,9 @@ mat-checkbox { } .mat-checkbox-label { - margin-left: 10px !important; font-size: 14px; - color: $black; + font-weight: 400; + color: $blue-black; } } @@ -1389,13 +1389,14 @@ ion-toggle.toggle-checked::before { border: 1px solid $brand-primary; border-radius: 14px; color: $brand-primary; - font-size: 12px; + font-size: 10px; font-weight: 500; display: inline-block; - line-height: 1; - padding: 5px 12px; + line-height: 18px; + padding: 2px 10px; text-align: center; text-transform: uppercase; + white-space: nowrap; height: max-content; //get state keys for generating state class