diff --git a/src/app/fyle/view-team-report/view-team-report.page.spec.ts b/src/app/fyle/view-team-report/view-team-report.page.spec.ts index 35f967d00d..f474a85ac1 100644 --- a/src/app/fyle/view-team-report/view-team-report.page.spec.ts +++ b/src/app/fyle/view-team-report/view-team-report.page.spec.ts @@ -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', diff --git a/src/app/fyle/view-team-report/view-team-report.page.ts b/src/app/fyle/view-team-report/view-team-report.page.ts index dce4c1164e..726fcc273c 100644 --- a/src/app/fyle/view-team-report/view-team-report.page.ts +++ b/src/app/fyle/view-team-report/view-team-report.page.ts @@ -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: {