Skip to content

Commit

Permalink
fix popup alert
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunaj5 committed Nov 30, 2023
1 parent cdd74d5 commit 9523e37
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -664,9 +664,9 @@ describe('ViewTeamReportPage', () => {

expect(popoverController.create).toHaveBeenCalledOnceWith({
componentProps: {
etxns: etxncListData.data,
title: 'Approve Report',
message: '3 expenses of amount undefined will be approved',
flaggedExpensesCount: 2,
primaryCta: {
text: 'Approve',
action: 'approve',
Expand Down
3 changes: 2 additions & 1 deletion src/app/fyle/view-team-report/view-team-report.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -417,9 +417,10 @@ export class ViewTeamReportPage implements OnInit {
const etxns = await this.etxns$.toPromise();

const rpAmount = this.humanizeCurrency.transform(erpt.rp_amount, erpt.rp_currency, false);
const flaggedExpensesCount = etxns.filter((expense) => expense.tx_policy_flag || expense.tx_manual_flag).length;
const popover = await this.popoverController.create({
componentProps: {
etxns,
flaggedExpensesCount,
title: 'Approve Report',
message: erpt.rp_num_transactions + ' expenses of amount ' + rpAmount + ' will be approved',
primaryCta: {
Expand Down

0 comments on commit 9523e37

Please sign in to comment.