Skip to content

Commit

Permalink
feat: Adding nickname to edit expense form (#3030)
Browse files Browse the repository at this point in the history
* Adding nickname to edit expense form

* Display corporate card nickname edit expense form for card expenses
  • Loading branch information
neohacker18 authored May 30, 2024
1 parent ff42842 commit 2e81bd0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/app/core/models/matchedCCCTransaction.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ export interface MatchedCCCTransaction {
corporate_credit_card_account_number?: string;
displayObject?: string;
status?: TransactionStatus;
corporate_card_nickname?: string;
}
1 change: 1 addition & 0 deletions src/app/core/models/v1/transaction.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,5 +134,6 @@ export interface Transaction {
orig_amount: number;
orig_currency: string;
status: TransactionStatus;
corporate_card_nickname?: string;
}[];
}
3 changes: 3 additions & 0 deletions src/app/fyle/add-edit-expense/add-edit-expense.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@
<div class="add-edit-expense--card-container__value">
{{ cardNumber ? (cardNumber | maskNumber) : '-' }}
</div>
<div class="add-edit-expense--card-container__label">
{{ cardNickname ? '(' + cardNickname + ')' : ''}}
</div>
</ion-col>
<ion-col>
<div class="add-edit-expense--card-container__label">Spend Date</div>
Expand Down
3 changes: 3 additions & 0 deletions src/app/fyle/add-edit-expense/add-edit-expense.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,8 @@ export class AddEditExpensePage implements OnInit {

cardNumber: string;

cardNickname: string;

policyDetails: IndividualExpensePolicyState[];

source = 'MOBILE';
Expand Down Expand Up @@ -2792,6 +2794,7 @@ export class AddEditExpensePage implements OnInit {

if (this.selectedCCCTransaction) {
this.cardNumber = this.selectedCCCTransaction.card_or_account_number;
this.cardNickname = this.selectedCCCTransaction.corporate_card_nickname;
}
}

Expand Down

0 comments on commit 2e81bd0

Please sign in to comment.