@zeniai/web-cockpit-ui 1.14.12-prod → 1.14.13-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/ACHDetailsPage-DVi_fb5U-BWoXmLUY.js +21 -0
- package/dist/assets/{AIPerformancePage-C459GJxs-DDVbkYhC.js → AIPerformancePage-C-orwzaK-DOCKSZSl.js} +44 -44
- package/dist/assets/{AccountInfoPage-DWqJj9l6-Cbq_B2Gd.js → AccountInfoPage-DvhQOLM6-C0wQ6YRZ.js} +3 -3
- package/dist/assets/{AccountInfoPageContent-Ca328DM4-BoBBm2eT.js → AccountInfoPageContent-B1BJnQNd-Dywp_u_s.js} +18 -18
- package/dist/assets/{AccountReconDetailsDrawerPage-BqIo4mya-8jnme6Tg.js → AccountReconDetailsDrawerPage-C8EtTwZE-BoEh8Ely.js} +13 -13
- package/dist/assets/{AccountRow-Bk3xWobY-B9GPlHQB.js → AccountRow-m3N4T8ro-CB7I5u10.js} +27 -27
- package/dist/assets/{AccountsPromoCardStack-Co90dxxm-DJwvfgg4.js → AccountsPromoCardStack-DGHAcZ7D-BqYytjsB.js} +28 -28
- package/dist/assets/{AddAddressForCardDrawer-XNGsKMvs-CVOvZj44.js → AddAddressForCardDrawer-B_1jj1h7-Cu6_XTQ0.js} +2 -2
- package/dist/assets/{AddToWalletPage-BiQWQXvz-Dja3V_rU.js → AddToWalletPage-DL1Bk4bd-ClBCUS3g.js} +21 -21
- package/dist/assets/{AgingReportsPage-ClR6ctjm-Cfdqgqs-.js → AgingReportsPage-DQ4P7iSR-BaDY7W1-.js} +8 -8
- package/dist/assets/{AllUserItems-RFWkNfw--CjDEoogo.js → AllUserItems-BSWk_1pR-BC2mjTTt.js} +13 -13
- package/dist/assets/{ApAgingDetailPage-F-pd4-We-DEfvotPI.js → ApAgingDetailPage-0i8K1czh-BtF7tRtB.js} +2 -2
- package/dist/assets/{AppBasePage-B9-FGKn--hgna65ij.js → AppBasePage-CV3kU-Ax-HUIuRSgH.js} +7 -7
- package/dist/assets/{AppDrawerContent-C6P8rk3y-Da2OtBCB.js → AppDrawerContent-DA8q-1_m-Ip7rRN25.js} +19 -19
- package/dist/assets/{ApprovalRulesSettingsPage-CPNEEGTF-C0zXmi9a.js → ApprovalRulesSettingsPage-CRlqbhea-CnWEhcBd.js} +7 -7
- package/dist/assets/{ArAgingChart-D9qmMVoC-C7_7BRFM.js → ArAgingChart-CiJNNObG-DOT8YGoK.js} +6 -6
- package/dist/assets/{ArAgingDetailPage-DMuZM6P_-ClopoFOj.js → ArAgingDetailPage-2I9R_J97-CEWBavmC.js} +1 -1
- package/dist/assets/{AttachmentView-B2ZOED0q-ee9lrIw2.js → AttachmentView-D0naVbDk-BMIJVqWj.js} +7 -7
- package/dist/assets/{BankAccountSection-C8G4yj75-DdOLLfNd.js → BankAccountSection-CYYTnOEW-ta40gqBk.js} +6 -6
- package/dist/assets/BankAccountWarningSection--b6oxmO3-bf21H1-K.js +51 -0
- package/dist/assets/{BankConnectionsSettingsPage-B5IQ5w6f-DMsLVdXW.js → BankConnectionsSettingsPage-BzwCu93j-CCEpUgq7.js} +49 -49
- package/dist/assets/{BillDetailPage-B-PMkZ44-bIK6xUHc.js → BillDetailPage-OzI0RkQ_-Bav1HJG-.js} +16 -16
- package/dist/assets/{BillPayApprovalRuleDetailPage-CdLKENJ--RLdpGq9U.js → BillPayApprovalRuleDetailPage-DIQW7KY9-C0xmBCct.js} +1 -1
- package/dist/assets/{BillPayApprovalRulesPage-BueljBn0-Bf7hfEuS.js → BillPayApprovalRulesPage-BMmJ4cuT-CLahxDlm.js} +9 -9
- package/dist/assets/{BillPayPromoPage-WXntEliq-D_QROeBX.js → BillPayPromoPage-CN5LKQzn-T_t_dz_s.js} +8 -8
- package/dist/assets/{BillPaySetUpPage-By7rYetf-CeRSgDq5.js → BillPaySetUpPage-DMKmupPw-CmltaH2A.js} +2 -2
- package/dist/assets/{BillingSettingsPage-D-XtlyVU-Cx-l00Il.js → BillingSettingsPage-Bt_0mrqR-CgkXOlNp.js} +8 -8
- package/dist/assets/{BillsBulkReviewDrawerPage-P8siJ8lO-DdRAIHzS.js → BillsBulkReviewDrawerPage-GFME_IXw-CmxfCt6F.js} +1 -1
- package/dist/assets/{BoxItem-Bcy7IYuZ-BKqgXMbg.js → BoxItem-nvtPdCwS-CiJFmSMj.js} +1 -1
- package/dist/assets/BusinessVerificationPage-_E3jrLwS-D28zK5AA.js +140 -0
- package/dist/assets/{CardNumberSubText-VsMOF0Xv-BXhxDioS.js → CardNumberSubText-DBpF1pjJ-BDHubHrk.js} +1 -1
- package/dist/assets/{CashbackDetailPage-DNbRs50r-DGmDyCg3.js → CashbackDetailPage-DrdbDPXK-BHacfWCb.js} +30 -30
- package/dist/assets/{ChargeCardDetailPage-BSDS8Kqb-U4i4-RaN.js → ChargeCardDetailPage-DvY3CSB4-DTju6vUj.js} +54 -54
- package/dist/assets/{ChargeCardListPage-Bzr8qMC0-IbAzxN57.js → ChargeCardListPage-BE5yGbg8-B5XQaFqy.js} +14 -14
- package/dist/assets/{ChargeCardListTable-CTp6TFBR-CeVbldJj.js → ChargeCardListTable-B-scLCAt-DWKxrdfC.js} +37 -37
- package/dist/assets/ChargeCardPromoPage-2OheDHbA-BAFEqKdK.js +222 -0
- package/dist/assets/{ChargeCardSetupPage-B1wzJjgH-BBhf5rqO.js → ChargeCardSetupPage-FNCK1n4W-DRpaATuu.js} +1 -1
- package/dist/assets/{ChargeCardStatementsPage-CePfbLPp-iDyGSKYa.js → ChargeCardStatementsPage-1fuIth_h-DUYP62lN.js} +9 -9
- package/dist/assets/{ChargeCardUtils-DC2v2EHU-CC66ls3Y.js → ChargeCardUtils-CErWBcYS-DYGG4Kg0.js} +1 -1
- package/dist/assets/{ChaseOverlay-B-Sx71yo-Thk2BACZ.js → ChaseOverlay-9_ms5LgM-DLbFcFUT.js} +7 -7
- package/dist/assets/CheckDepositDrawerPage-DEFEMwuI-FYtd8ETj.js +206 -0
- package/dist/assets/{CollapsableReportTable-mEqm05fp-CUcsGi4N.js → CollapsableReportTable-DX-FpwE7-MJq_0H8T.js} +59 -59
- package/dist/assets/CompanyOfficerDetailsSection-BEgNqg-b-BZkAjfXP.js +260 -0
- package/dist/assets/{CompanyPassportCard-Ct6tCZqT-5nR77uHb.js → CompanyPassportCard-BZXE3iJL-D0vVN1yd.js} +4 -4
- package/dist/assets/{CompanyPassportPage-D9NQ4bXl-CsJ1uZgg.js → CompanyPassportPage-BYZC3G4H-Dyir7GPA.js} +22 -22
- package/dist/assets/CompleteProfile-mCKLQjGe-D37b51yU.js +52 -0
- package/dist/assets/{ConfettiBurst-DqSwVGBC-BVzEX0ox.js → ConfettiBurst-BEoFHjQ0-BZkigu9v.js} +1 -1
- package/dist/assets/{CreateOrEditVendorPage-D27A1926-Bj04MSDS.js → CreateOrEditVendorPage-6sohsdle-DulmpRQu.js} +11 -11
- package/dist/assets/{CreditCardPaymentDrawerPage-BI37dSwx-BipcUtpo.js → CreditCardPaymentDrawerPage-6oVDS3D8-BG57VbJ5.js} +21 -21
- package/dist/assets/{CreditCardPaymentPlgSection-CAsn4Ae6-KEtkArBz.js → CreditCardPaymentPlgSection-DX1BieKp-CaB1ZnNz.js} +11 -12
- package/dist/assets/{CurrencySelectField-5uG4FfJ9-8SqcpktO.js → CurrencySelectField-F2P1iCLk-DqZUsNYq.js} +5 -5
- package/dist/assets/{CustomerOnboardingActivationPage-Be-GrAiK-B75Mje9v.js → CustomerOnboardingActivationPage-CNJkyjta-BXFLHGd8.js} +8 -8
- package/dist/assets/CustomerOnboardingContainerPage-D6yeERaX-CnXYVWPD.js +1 -0
- package/dist/assets/{CustomerOnboardingDetailPageSkeleton-DhGp71bj-hz8cq6ev.js → CustomerOnboardingDetailPageSkeleton-B_MgUg-5-Bgdn7kSU.js} +12 -12
- package/dist/assets/{CustomerOnboardingNoStepsPage-CdOGTNXC-C9i5EKaE.js → CustomerOnboardingNoStepsPage-B49-4wZk-KyTxoYIy.js} +9 -9
- package/dist/assets/{CustomerOnboardingPage-ClPsywa3-CeQwicZf.js → CustomerOnboardingPage-4FPXG220-Bhtz8R34.js} +7 -7
- package/dist/assets/{CustomerOnboardingProductSuitePage-pnHglqXq-8KyJVU1M.js → CustomerOnboardingProductSuitePage-cJPPvh-5-CdfdHVAA.js} +9 -9
- package/dist/assets/{Dashboard-avtbjFLf-BsfTTLt8.js → Dashboard-BBy_mQ8p-zBP8Z7QF.js} +260 -242
- package/dist/assets/{DashboardReportPage-CqJAu5WP-CSiSRP9H.js → DashboardReportPage-DYttySr4-ICoa42Db.js} +6 -6
- package/dist/assets/{DepositAccTransactionItem-Da0GWYei-DaDMj8eg.js → DepositAccTransactionItem-PNTL0e8v-Bf5t1weD.js} +6 -6
- package/dist/assets/DepositAccTransactionListPage-DUwVnkwy-91dKQsy5.js +66 -0
- package/dist/assets/{DomesticWireDetailsPage-DGcVKriv-CAGyxOGA.js → DomesticWireDetailsPage-BhwTfZwI-lG3b6Dqd.js} +1 -1
- package/dist/assets/{DownloadOverlay-BdGiqnp7-DStgGthq.js → DownloadOverlay-CUbv29mo-Cm7YvHGd.js} +21 -21
- package/dist/assets/{DrawerPage-DCfm1BVs-BjLjeoWD.js → DrawerPage-2_QOgQ1m-jFj08QrD.js} +11 -11
- package/dist/assets/EditPeoplePage-CtTYiqg3-C_rRpXUg.js +55 -0
- package/dist/assets/{EditReimbursementDetailPage-C-nYgUua-C1qTcfcR.js → EditReimbursementDetailPage-C_jRh7w0-BjxLHuhj.js} +61 -61
- package/dist/assets/{EntityDetailPage-4HX_rHUf-xDLdueS9.js → EntityDetailPage-BhQsnCgQ-BJqshBB_.js} +3 -3
- package/dist/assets/{EntitySummarySection-C9VeOBpT-BTsQfMwI.js → EntitySummarySection-CKkXzM76-JNV3nj4B.js} +12 -12
- package/dist/assets/{ExpenseAutomationOverviewPage-8jTkscWa-bIf05Fhx.js → ExpenseAutomationOverviewPage-ZuB3Aiv2-g-beRD6J.js} +26 -26
- package/dist/assets/{ExpenseAutomationPage-D1wcc9GW-BZm22R7G.js → ExpenseAutomationPage-BUic8zfk-CY9AnIj2.js} +41 -41
- package/dist/assets/{ExpressPayPage-Cj6cvMwQ-BJmICkVH.js → ExpressPayPage-DEkJ_H0W-D2MJYEqV.js} +12 -12
- package/dist/assets/FeaturePreviewPage-CtK7L5vk-zb1RibOL.js +11 -0
- package/dist/assets/{FollowStepsSection-DjfnVH8N-B5jFIUn7.js → FollowStepsSection-CWw764ZM-BMjBkJvU.js} +9 -9
- package/dist/assets/{GlobalReviewListPage-CEOzc0We-D9YAcarq.js → GlobalReviewListPage-CZctHM7r-C-SmU9tc.js} +12 -12
- package/dist/assets/{HelpButton-BdhMFvtG-C54ST6PE.js → HelpButton-Dpx0Yoel-1C4sAmaf.js} +4 -4
- package/dist/assets/{InformationCardStack-DFOumIBr-gjF_ZQhk.js → InformationCardStack-BGpHl4yb-D2VMsFIF.js} +5 -5
- package/dist/assets/InsightsCardStack-BbMJEahw-XjHe58kA.js +79 -0
- package/dist/assets/InsightsSection-CYkuQHcj-B18a-FIC.js +27 -0
- package/dist/assets/{IntegrationsSettingsPage-DF-jcHzr-WMJTJEtS.js → IntegrationsSettingsPage-CMjSCRm_-C9xmqHS7.js} +8 -8
- package/dist/assets/{InternationalWireSwiftDetailsPage-BFMqW1oQ-CdCE1RD1.js → InternationalWireSwiftDetailsPage-BTbTUt8U-DHwEWLr_.js} +15 -15
- package/dist/assets/{InternationalWireVerificationPage-Cq7swzrt-C0L5yCuY.js → InternationalWireVerificationPage-DAW2eMTg-BGhWwB2B.js} +22 -22
- package/dist/assets/{InviteFormPage-DXl2sEn9-B2Ez35Mj.js → InviteFormPage-CCbyacPR-DUt2JWiG.js} +20 -20
- package/dist/assets/{InvitePageListView-B5fRPcOg-CjFdA4G8.js → InvitePageListView-mHkALr5o-BpwevZSI.js} +62 -62
- package/dist/assets/InvitePeoplePage-r6PLBiEv-CRU1obhZ.js +12 -0
- package/dist/assets/{InvoiceUploadSection-opkVsXZH-CXWs7XL1.js → InvoiceUploadSection-BsjeicP1-CxRipy2m.js} +41 -41
- package/dist/assets/{IssueChargeCardPage-CZU1qbHO-BdEtPimR.js → IssueChargeCardPage-C3esnkQg-Bt2ncw32.js} +33 -33
- package/dist/assets/{LabeledAddressValue-CCd3y8zQ-BJNbO-Fn.js → LabeledAddressValue-CeeoKoY4-C81fNRY2.js} +1 -1
- package/dist/assets/{LabeledAddressValueField-XuFlx-oK-BMP_E_ys.js → LabeledAddressValueField-B6eeRCSM-BGM6iGCs.js} +3 -3
- package/dist/assets/{LabeledControlledCheckBoxField-CCQn4-_S-C2xp_EVs.js → LabeledControlledCheckBoxField-CK8YBqJ7-dH7h4-c9.js} +1 -1
- package/dist/assets/{LabeledCreatableSingleSelectField-uQKngCdt-DJ4lsiO3.js → LabeledCreatableSingleSelectField-BSKL8pA3-y22U9yzT.js} +6 -6
- package/dist/assets/LabeledDocumentField-BEyArLK3-Bbt820GM.js +41 -0
- package/dist/assets/{LabeledDropDownFormattedTextField-BrUNxsKy-B8W5l8Iz.js → LabeledDropDownFormattedTextField-DikXPnxD-3H5194hi.js} +7 -7
- package/dist/assets/{LabeledText-ByqI7uq0-BqhwXzjW.js → LabeledText-qSjyNZO1-BMO1teu9.js} +1 -1
- package/dist/assets/{LabeledUserSingleSelectWithSubtitlesField-Dg1Lpwl0-D5r53n-D.js → LabeledUserSingleSelectWithSubtitlesField-x87S_Azj-BPP3i4wb.js} +16 -16
- package/dist/assets/{LabeledZeniRolesDropDownField-DZL4GZtE-Bl91YXKB.js → LabeledZeniRolesDropDownField-nm5bG2up-B-C-v8v9.js} +17 -17
- package/dist/assets/{LinkJETransactionPage-CJlBllrr-RkOKGfby.js → LinkJETransactionPage-p7wdZbtp-BamvjpR7.js} +13 -13
- package/dist/assets/{LowBalancePopup-BEvuAR0Z-D9Mm46kU.js → LowBalancePopup-DHk6xd2B-V5eEOh0a.js} +7 -7
- package/dist/assets/{MagicLinkACHDetailsPage-DloX1GWg-BSJJfYX3.js → MagicLinkACHDetailsPage-DRQ8oej8-B79oZw1R.js} +1 -1
- package/dist/assets/{MagicLinkDomesticWireDetailsPage-DewjvM4v-CjyLi2R0.js → MagicLinkDomesticWireDetailsPage-BxXU9Opg-BdNHmjDj.js} +1 -1
- package/dist/assets/{MagicLinkInternationalWireDetailsPage-CVhazlxQ-CdUPSdVq.js → MagicLinkInternationalWireDetailsPage-DYN1baIc-DT4ZdIcR.js} +1 -1
- package/dist/assets/MagicLinkSuccessPage-CX3bJ5_B-Bgn3-P2S.js +31 -0
- package/dist/assets/{MagicLinkTitleSection-d1edBt3w-BuhlKpVM.js → MagicLinkTitleSection-K2cZQVzq-CIEidPVy.js} +4 -4
- package/dist/assets/MailingDetailsSection--zHyCquq-Cn3SWfKt.js +21 -0
- package/dist/assets/{MeetingCalenderPopup-MtSyJ1AS-BwRcYCw3.js → MeetingCalenderPopup-DbFlQ8Km-9ZxBnjo6.js} +1 -1
- package/dist/assets/{Menu-BV79l8xf-CT05aLZH.js → Menu-LLL9taEz-CtH4c9eF.js} +2 -2
- package/dist/assets/{MyBankConnectionsSettingsPage-D-xDtURG-a5WJJsgd.js → MyBankConnectionsSettingsPage-BfDsHVZw-aWZVlaCb.js} +15 -15
- package/dist/assets/{MyPendingActivationChargeCardListPage-VEhml0PW-C7lDm9On.js → MyPendingActivationChargeCardListPage-vag56A65-DvFj3aDV.js} +1 -1
- package/dist/assets/{MyProfileSettingsPage-DPJ0fJdQ-BVaOzJZE.js → MyProfileSettingsPage-DCKqWh-p-Ca4URKq-.js} +8 -8
- package/dist/assets/NavBarWithPicker-Cvi89wZV-3CVqu6ha.js +30 -0
- package/dist/assets/{NavigationArrow-BwXNdvOg-Bw7XRwN0.js → NavigationArrow-CHmddDC--CUC3t4BZ.js} +2 -2
- package/dist/assets/NavigationDots-1wpj484Z-By9SVfKB.js +15 -0
- package/dist/assets/{NewGlobalMerchantPage-IeE86L-X-C4OUiP9X.js → NewGlobalMerchantPage-B0FywA12-BRuJ6OhE.js} +13 -13
- package/dist/assets/{NoDataChart-C9yfE8vY-D5FBma0Z.js → NoDataChart-D43mhDJW-B9CXfEvp.js} +1 -1
- package/dist/assets/{NoDataTable-DF9QNT4a-DSZJ4vGD.js → NoDataTable-BOfUxs9D-8iqVCaVk.js} +1 -1
- package/dist/assets/{NotFoundPage-DSaizJve-BAhgScCF.js → NotFoundPage-DFioH5Rt-BQR0ORs3.js} +1 -1
- package/dist/assets/{NotificationSettingsPage-DeAeFHmj-CaUz1tWX.js → NotificationSettingsPage-y4g1rAal-BJEuhBam.js} +13 -13
- package/dist/assets/{NotificationsListConfig-DuzDckh--BqtRxON_.js → NotificationsListConfig-sybPesiv-FmaZBisq.js} +1 -1
- package/dist/assets/{NotificationsPage-B7ZC7ezP-DEJagd6q.js → NotificationsPage-C88YOjuY-Ds4zz6jH.js} +31 -32
- package/dist/assets/{OpExByVendorPage-DzODetHf-DB9TWTaj.js → OpExByVendorPage-qBWbJhv9-Cs148Yzz.js} +7 -7
- package/dist/assets/{OverlayContainerPage-GWXnlbZH-CXhqDEmM.js → OverlayContainerPage-Dres4Grh-BoM1wcb9.js} +1 -1
- package/dist/assets/{PandLWithForecastPage-FEi5USqF-Cvmw-ezu.js → PandLWithForecastPage-uiaHrci6-ClUgwvyo.js} +8 -8
- package/dist/assets/{PaymentAccountSetupBillingAddressSection-BbL4x5pQ-CQ4mDWcj.js → PaymentAccountSetupBillingAddressSection-BepDUdA0-DvE7tkJU.js} +11 -11
- package/dist/assets/{PeoplePage-B35T31YZ-DghEF7WY.js → PeoplePage-oF6C1uyM-DLFAgG_p.js} +20 -20
- package/dist/assets/{PortfolioAllocationFormPage-D3FP_MRr-DOEDYQct.js → PortfolioAllocationFormPage-C5O3GLqz-BYzrfMTu.js} +4 -4
- package/dist/assets/{PortfolioDetails-Dtz3YEPu-BMRrMf3q.js → PortfolioDetails-BkGNpmoO-B3KzDtEL.js} +31 -31
- package/dist/assets/{ProductsCarousel-DIlEuuqg-DrIeQsxl.js → ProductsCarousel-C_tmo4EA-BDn6T3LG.js} +6 -6
- package/dist/assets/{PromoBaseCards-DTsaas8S-CPDQ_Ck-.js → PromoBaseCards-Bq5-q2ew-oeM6E2Gs.js} +5 -5
- package/dist/assets/{QBOConnectionDialog-Cvt38cmU-p0xTPV2f.js → QBOConnectionDialog-BXNWjeYB-CT3y8ZPP.js} +9 -9
- package/dist/assets/QBOSetupSection-D3sIWrh1-Dt8ceji3.js +79 -0
- package/dist/assets/ReimbursementApprovalRuleDetailPage-ClgCUbVP-DfTW4OAe.js +26 -0
- package/dist/assets/{ReimbursementApprovalRulesPage-BG8uMxNw-D1uyrGH4.js → ReimbursementApprovalRulesPage-hjja5JFq-1dF9j3jn.js} +8 -8
- package/dist/assets/{ReimbursementDetailPage-Cs7XeZrC-OHz7BSRY.js → ReimbursementDetailPage-sXYC_aoR-CngyEl5D.js} +19 -19
- package/dist/assets/{ReimbursementPromoPage-CKITZNUc-79ijnfiq.js → ReimbursementPromoPage-C9zs7VRV-DY_b0K3o.js} +24 -24
- package/dist/assets/{ReimbursementSetUpPage-DD5P181p-CxWIYZnN.js → ReimbursementSetUpPage-Ban56LOC-Cen4aYhY.js} +11 -11
- package/dist/assets/{ReimbursementsBulkReviewDrawerPage-C0eORL7o-iqE8m4Np.js → ReimbursementsBulkReviewDrawerPage-CsRwI-rl-KeeGuW4E.js} +1 -1
- package/dist/assets/{ReloadCard-CZ4IXHy1-Dtuzk5Rl.js → ReloadCard-EBXtqdt5-e0DLVF2o.js} +5 -5
- package/dist/assets/{ReportTableViewSelector-Do0yQJxY-BXH3sbob.js → ReportTableViewSelector-Ae5lGopA-CZicNwDg.js} +10 -10
- package/dist/assets/{ReportsPage-BUi475EG-CQaz0teT.js → ReportsPage-Dh3DhbEK-DCmUMwXx.js} +5 -5
- package/dist/assets/{RevenueChart-DPNqxQ4n-mVhaMXTb.js → RevenueChart-C5qfXMEg-D1BQhist.js} +1 -1
- package/dist/assets/{ReviewDetailsPage-DTCC2C0D-C6Ojy72F.js → ReviewDetailsPage-DjcJd2VM-CMmXdVTb.js} +17 -17
- package/dist/assets/{ReviewOverlay-CPN-RHG--BufZJNs3.js → ReviewOverlay-Dmrea9EK-DOxs4FI1.js} +14 -14
- package/dist/assets/RoleWithToolTip-CqeM8Bh0-BSEMOUZO.js +22 -0
- package/dist/assets/{ScheduleDetailsFixedAssetsPage-BSz5BdJ4-BcAVniZz.js → ScheduleDetailsFixedAssetsPage-CQGRrdSx-BKHIJc5L.js} +8 -8
- package/dist/assets/{ScheduleDetailsPage-DKVlaW9e-ChemaS_v.js → ScheduleDetailsPage-D5OBZ80r-BSViQYwc.js} +3 -3
- package/dist/assets/{ScheduleSequenceTable-BhpHoReF-DVT0PeVe.js → ScheduleSequenceTable-fgV8zz4I-B96Fw2cP.js} +49 -49
- package/dist/assets/{ScreenRoutes-CUNOProC.js → ScreenRoutes-Bs8GRIgm.js} +62 -62
- package/dist/assets/{SetUpAccountSection-Blh-Vipv-Ec9w8zf3.js → SetUpAccountSection-4-gtB3I4-CmDUZ7Ps.js} +24 -24
- package/dist/assets/{SetUpDefaultSection-DsyZbNsv-BcyPPYMa.js → SetUpDefaultSection-DSslQOgJ-y5lEHYNN.js} +12 -12
- package/dist/assets/{SignIn-DehOoUba-_IFKRKFV.js → SignIn-CgXxIawW-DSrGSPuV.js} +17 -17
- package/dist/assets/{SignInScreen-BXQkh3gn.js → SignInScreen-DSt7uixJ.js} +1 -1
- package/dist/assets/{SpendManagementListViewPage-C23fDDXZ-e5NI-MjJ.js → SpendManagementListViewPage-SkhzkIYZ-CI28gjhv.js} +11 -11
- package/dist/assets/{SpendManagementPerTabPage-Cx0sB3qO-C92A_6wt.js → SpendManagementPerTabPage-CofY1YYQ-C9YpxBTZ.js} +55 -55
- package/dist/assets/{SpendManagementSection-DbZYpbtO-DTrbPW3G.js → SpendManagementSection-DbC93chQ-CmYHf5ne.js} +13 -13
- package/dist/assets/{SpendMgmtSetupAccountSection-BkUIdz9m-ClfpmeIa.js → SpendMgmtSetupAccountSection-_8G7bMAw-CYWZUz0n.js} +22 -22
- package/dist/assets/{StatementItem-BF8L0fc_-DkDCxyQq.js → StatementItem-7ezfuDl--CcU7F4Hj.js} +5 -5
- package/dist/assets/{StatementsPage-96e3ZbSU-BP5FaF_u.js → StatementsPage-C4ziRzkU-Cl2Heiw2.js} +6 -6
- package/dist/assets/{StatusSwitcher-jwpQ49F7-BGzqIV7p.js → StatusSwitcher-0rVfFE-a-CheRZPfP.js} +7 -7
- package/dist/assets/{SubTabSwitcher-B8H6McwL-CAGUZLqm.js → SubTabSwitcher-aoWbkCmT-CaMIdf8x.js} +1 -1
- package/dist/assets/{SummaryCard-Bv4ja9yJ-BQ3Vm3Ml.js → SummaryCard-6V1G-Yln-AkNgJPj0.js} +1 -1
- package/dist/assets/{TaskManagementPage-D7tD4WRl-D829_k0m.js → TaskManagementPage-DjQma5Cr-DLhPVic-.js} +18 -18
- package/dist/assets/{TimeRangeSwitcher-Cr-ObvZ9-BpkXiM1i.js → TimeRangeSwitcher-DeIRg5zY-Bi--_Fx4.js} +5 -5
- package/dist/assets/{TimeframeSwitcher-YkFxZedG-C9WakH79.js → TimeframeSwitcher-Cop4G4gx-DupejW9U.js} +5 -5
- package/dist/assets/TimeframeSwitcherWithToggle-BhoniKOB-DuZjqpvb.js +31 -0
- package/dist/assets/{TopExCard-DtrsuLFD-rsSVK-ay.js → TopExCard-BKirBv7q-BKzGhACE.js} +6 -6
- package/dist/assets/{TopExDetailPage-HMRdJt_a-Cuky-W3B.js → TopExDetailPage-DcVunE8d-BJAugcNm.js} +11 -11
- package/dist/assets/{TransactionDetailPage-CkWEdpTW-BX9Cs2dn.js → TransactionDetailPage-TJf3D0K6-ChXVy1nH.js} +26 -26
- package/dist/assets/{TransactionList-8rOZr8BD-DZQflEIq.js → TransactionList-fn6VXYIJ-XKKmCfLI.js} +4 -4
- package/dist/assets/{TransactionListBig-DGx1qy2c-WusOBIcK.js → TransactionListBig-B_hNDFjS-Bc3M6sby.js} +25 -25
- package/dist/assets/{TransactionListPage-CnbufCaM-Crj6dxSk.js → TransactionListPage-BbXZWbie-DmTuImVR.js} +6 -6
- package/dist/assets/{TransactionVendorDetailPage-UpZX_EgR-Mzs4hwfT.js → TransactionVendorDetailPage-C6qJ5ncL-DRKEGbRL.js} +6 -6
- package/dist/assets/TransferDrawerPage-BtYoqKi--BK8jkNir.js +362 -0
- package/dist/assets/{TreasuryOverviewPage-DoPe6v4O-dHNFdpx5.js → TreasuryOverviewPage-DOV8Hanc-BzuaF_Oy.js} +53 -53
- package/dist/assets/{TreasuryPromoPage-Db20FO_G-DajsAZcT.js → TreasuryPromoPage-C9O7G72q-D0fVcP3x.js} +30 -29
- package/dist/assets/TreasurySetupPage-CNzkkEjw-Dh78QFWy.js +146 -0
- package/dist/assets/{TreasuryStatementsPage-BONCF7O1-C2wksa5Y.js → TreasuryStatementsPage-Ts6D6F-l-CQAmEMl1.js} +5 -5
- package/dist/assets/{TreasuryTaxLetterPage-NCZ0Y4yr-8hmlID6w.js → TreasuryTaxLetterPage-CM93_rS4-CfzYhIka.js} +5 -5
- package/dist/assets/TreasuryTransferOrReviewPage-C8-tbCUQ-DHGOUHuT.js +506 -0
- package/dist/assets/{TrendChart-DQXhBbqy-u2beI5NW.js → TrendChart-BXjPAYgk-DjYRl65V.js} +5 -5
- package/dist/assets/{TrendWithTransactions-Du-a-c_9-Um_fvL6F.js → TrendWithTransactions-BlGX9aVa-DUrKUprM.js} +8 -8
- package/dist/assets/{UncategorizedAccountsMappingPage-mSPC4LpU-DSNIKC_z.js → UncategorizedAccountsMappingPage--PnxDLIj-DgyLI8TV.js} +12 -12
- package/dist/assets/{UnitIntegrationPage-B5O9G4QH-y6cPvP8r.js → UnitIntegrationPage-D5mzaVVL-B87wl-C8.js} +4 -4
- package/dist/assets/{UploadAdditionalDocumentOverlay-CnjzAGYo-CBf_BQlS.js → UploadAdditionalDocumentOverlay-BXS2l5kF-4XXbIdgY.js} +1 -1
- package/dist/assets/{Vendor2FAPopup-CYcCB8tr-CtNb2at2.js → Vendor2FAPopup-jXN-6kcB-WQjywdob.js} +1 -1
- package/dist/assets/{VendorACHDetailsPage-C6EuQBcH-DtIAcatA.js → VendorACHDetailsPage-CHfX_7tk-CseZDy3t.js} +1 -1
- package/dist/assets/{VendorDetailPage-CnSXWVCg-BL1omixq.js → VendorDetailPage-CZuQaTCe-00z-DC1U.js} +13 -13
- package/dist/assets/{VendorDomesticWireDetailsPage-CVTkzHFB-BOarRjTv.js → VendorDomesticWireDetailsPage-dBmyAkGL-BzziQHyn.js} +1 -1
- package/dist/assets/{VendorFiling1099EditablePage-TJb9mpk0-qwt68m34.js → VendorFiling1099EditablePage-C6KWbHaM-FdVjec5X.js} +7 -7
- package/dist/assets/{VendorFirstReviewPage-gBLVMddY-3lz9ZyKl.js → VendorFirstReviewPage-DLaCXLH8-Bp3HVWXV.js} +30 -30
- package/dist/assets/{VendorInternationalWireDetailsPage-Bhm7j6HC-C_fJSHjY.js → VendorInternationalWireDetailsPage-DgCH9Rad-DD-YZWBN.js} +10 -10
- package/dist/assets/{VendorInternationalWireSwiftDetailsPage-MgN7VFET-JLytJhuc.js → VendorInternationalWireSwiftDetailsPage-CprymE3v-BXc-3kQm.js} +1 -1
- package/dist/assets/{VendorsAccountsSection-Cn-8Yemv-QU3Ugu9k.js → VendorsAccountsSection-CpkfwFDJ-DeHCyl4j.js} +15 -15
- package/dist/assets/VerifyDevice-CSIkEBig-DzQ9uYAN.js +67 -0
- package/dist/assets/{WarningsDrawerPage-Cc_Rty0A-CiWJTjUM.js → WarningsDrawerPage-DeqbJ2Le-CygSrVz8.js} +12 -12
- package/dist/assets/{ZeniAccountDetailPage-BU2TTiDP-Caxfo2QU.js → ZeniAccountDetailPage-kwKoeRAb-yy2D4Oyh.js} +29 -29
- package/dist/assets/{ZeniAccountListViewPage-DbcnkYvX-ai9PY1nW.js → ZeniAccountListViewPage-15LxhIiI-3EkZXZhB.js} +19 -19
- package/dist/assets/ZeniAccountNavBarPieces-C0pq95hS-D_BEJJwy.js +14 -0
- package/dist/assets/{ZeniAccountPromoPage-D-5ArrRO-yroK6L0e.js → ZeniAccountPromoPage-DvlAb5YA-BxPQZ-TN.js} +33 -33
- package/dist/assets/{ZeniAccountSetupPage-DXYR0Ipo-69zJLoPG.js → ZeniAccountSetupPage-BjpvTfF5-DJqm4qSs.js} +3 -3
- package/dist/assets/{ZeniCopyright-DPd1ifIT-CsDQSNsH.js → ZeniCopyright-BYJFIZ_X-DJl-W8Ni.js} +1 -1
- package/dist/assets/ZeniTransferAmountSlider-Did4Chpj-CHnHwXGw.js +63 -0
- package/dist/assets/{analyticsHelper-DrNmU0vn-cbtpMVPt.js → analyticsHelper-BRyA7WLX-Ch8yhvbw.js} +1 -1
- package/dist/assets/{analyticsHelper-DYztlfoV.js → analyticsHelper-DEjyvXKA.js} +1 -1
- package/dist/assets/{chartTypes-YTQv3tre-BaZWty8J.js → chartTypes-CWEoqL4g-Bo1GQ9Y0.js} +1 -1
- package/dist/assets/{commonDimensions-BtmBVXgZ-DngS5_m0.js → commonDimensions-UvndzJjv-DkCvzihA.js} +1 -1
- package/dist/assets/{detailCommon-hHyz3hj3-CgkqfxsC.js → detailCommon-C3ymS8dg-BusgYXoD.js} +2 -2
- package/dist/assets/{downloadPdf-CDvgLzWC-C6NI1uz3.js → downloadPdf-CHwWcCR1-BQYdnkG1.js} +1 -1
- package/dist/assets/{index-CVo0uMzO.js → index-DYVNUtTS.js} +4129 -3984
- package/dist/assets/{mapLoadingInProgressToTreeNode-BfoqmoAq-n6edsobL.js → mapLoadingInProgressToTreeNode-BV9ky97n-C6-bn_qJ.js} +1 -1
- package/dist/assets/{mapSectionWithAcOnlyToTreeNode-BjtxR9iQ-qzW1C6Un.js → mapSectionWithAcOnlyToTreeNode-WivyN4Y7-DeEMrm9i.js} +1 -1
- package/dist/assets/{mapSpacerToTreeNode-D8o529OP-C6pXOMvN.js → mapSpacerToTreeNode-AXNRptLX-B0rl0_Lw.js} +1 -1
- package/dist/assets/{mapTimeframeBalancesToTreeNode-BirMnIzY-C4aRbhHq.js → mapTimeframeBalancesToTreeNode-DUac2vK4-jK2oIVF4.js} +1 -1
- package/dist/assets/{mapTimeframeBalancesToTreeNode-NA69l84M-PrspUuQP.js → mapTimeframeBalancesToTreeNode-JTl35sFx-B-SNtaen.js} +1 -1
- package/dist/assets/{mapTimeframeHeaderLoadingInProgressToTreeNode-BCqRt8GN-Bw8svqkv.js → mapTimeframeHeaderLoadingInProgressToTreeNode-DtkeOXnf-Dl0F4JWH.js} +1 -1
- package/dist/assets/{play-icon-DyIc5aGx-CIOaxH3w.js → play-icon-HSIOzxQm-DtUz8FwI.js} +1 -1
- package/dist/assets/{toCOABalancesWithID-2jQJLb8S-DW8RIFP8.js → toCOABalancesWithID-CkjYSysY-DF7YtxZI.js} +1 -1
- package/dist/assets/{toChartData-Dsjd8dGe-B64jG2hW.js → toChartData-BhKlnyso-CKLUlraQ.js} +1 -1
- package/dist/assets/{treasuryColorHelper-EG8VpBia-DN3Bvuhd.js → treasuryColorHelper-yIAXBrrM-D_iAl7kS.js} +1 -1
- package/dist/assets/{uploadAttachment-CVUM4FN--B0G4nXtQ.js → uploadAttachment-CWaYLqwb-DAXv_gFj.js} +32 -32
- package/dist/assets/{uploadReceipts-D80JLNY4-CvtBPjYq.js → uploadReceipts-C6Ld_WLK-CscO-OGr.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/ACHDetailsPage-BQBpkHfF-BwEQR3Ry.js +0 -21
- package/dist/assets/BankAccountWarningSection-CWXa-X6f-Bo2YdlXb.js +0 -51
- package/dist/assets/BusinessVerificationPage-BoSLJbyU-BJPGiqTw.js +0 -140
- package/dist/assets/ChargeCardPromoPage-dIg8OIlx-I5SeyfVO.js +0 -219
- package/dist/assets/CheckDepositDrawerPage-uABg3PMN-BdzopMYU.js +0 -206
- package/dist/assets/CompanyOfficerDetailsSection-BzYsDrr2-uFzN5DGM.js +0 -232
- package/dist/assets/CompleteProfile-CN_hAW-2-D9tT8MoO.js +0 -36
- package/dist/assets/CustomerOnboardingContainerPage-B9qcJNx5-UVumagoc.js +0 -1
- package/dist/assets/DepositAccTransactionListPage-Db90ITIq-oTkCmI07.js +0 -66
- package/dist/assets/DocumentSecurityBanner-Bxg3ctYZ-39503B9W.js +0 -29
- package/dist/assets/EditPeoplePage-CBPmCcoG-DAdjecZc.js +0 -55
- package/dist/assets/FeaturePreviewPage-BBkfKvIu-CqzyD_TL.js +0 -11
- package/dist/assets/InsightsCardStack-rByhzgji-FDbIdVTC.js +0 -79
- package/dist/assets/InsightsSection-jnWJ877y-CXGce558.js +0 -27
- package/dist/assets/InvitePeoplePage-DvGON1va-BYLNeXQs.js +0 -12
- package/dist/assets/LabeledDocumentField-TFmz23mS-CYnZhFdz.js +0 -41
- package/dist/assets/MagicLinkSuccessPage-dxBSlbub-CRDPtPi_.js +0 -31
- package/dist/assets/MailingDetailsSection-CsK09X11-DZ9sqO1E.js +0 -21
- package/dist/assets/NavBarWithPicker-CuJe05iJ-BuKAIj_v.js +0 -30
- package/dist/assets/NavigationDots-BQfoX9p0-BmnKz8T-.js +0 -14
- package/dist/assets/QBOSetupSection-Dijb03ZX-CFOO-p_z.js +0 -79
- package/dist/assets/ReimbursementApprovalRuleDetailPage-bkJIpwyU-DTXj9skr.js +0 -26
- package/dist/assets/RoleWithToolTip-Bst2IdUy-DaFvOxA_.js +0 -22
- package/dist/assets/TimeframeSwitcherWithToggle-4h9WX4z9-DfbkXFml.js +0 -31
- package/dist/assets/TransferDrawerPage-cUyg27nq-DoY6rZbB.js +0 -362
- package/dist/assets/TreasurySetupPage-BoVhd65r-DAl3tLzo.js +0 -152
- package/dist/assets/TreasuryTransferOrReviewPage-DAmZboLO-qe3kHbZ0.js +0 -506
- package/dist/assets/ZeniAccountNavBarPieces-CeJHAl4O-D-T_tdRo.js +0 -14
- package/dist/assets/ZeniTransferAmountSlider-di46G5TN-D3ij5oCv.js +0 -63
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{X as U,u as G,M as y,w as he,l as _,j as r,_ as k,be as fe,aX as me,aV as ge,C as v,o as C,a6 as _e,c as be,bf as Se,q as w,D as B,H as J,bg as we,a8 as Ce,aC as ye,a_ as xe}from"./index-CVo0uMzO.js";import{b as P,f as K,n as b}from"./vendor-CnQcJ2Lu.js";import{m as z,l as Z}from"./analyticsHelper-DrNmU0vn-cbtpMVPt.js";import{h as Oe}from"./ReportTableViewSelector-Do0yQJxY-BXH3sbob.js";import{a as Q,p as Re}from"./TimeRangeSwitcher-Cr-ObvZ9-BpkXiM1i.js";import{M as Ae}from"./TimeframeSwitcherWithToggle-4h9WX4z9-DfbkXFml.js";import{DownloadOverlayButton as Be}from"./DownloadOverlay-BdGiqnp7-DStgGthq.js";import{R as ve,W as F,x as ee}from"./CollapsableReportTable-mEqm05fp-CUcsGi4N.js";import{T as te,I as se,L as j,D as Le,g as ne}from"./mapSectionWithAcOnlyToTreeNode-BjtxR9iQ-qzW1C6Un.js";import{s as Y}from"./mapTimeframeBalancesToTreeNode-BirMnIzY-C4aRbhHq.js";import{d as Te,l as Pe}from"./mapTimeframeHeaderLoadingInProgressToTreeNode-BCqRt8GN-Bw8svqkv.js";import{d as ke}from"./mapLoadingInProgressToTreeNode-BfoqmoAq-n6edsobL.js";import"./mui-C5LQ0bMa.js";import"./analytics-CBL_L82S.js";import"./routing-Cpaypegg.js";import"./sentry-HDxG13yk.js";import"./redux-ByjIRbhZ.js";import"./liveblocks-sSQ9JElv.js";import"./crypto-BURQLTgV.js";import"./TimeframeSwitcher-YkFxZedG-C9WakH79.js";import"./page-detail-CWX5S47F-B6DjZ3Gi.js";import"./AccountRow-Bk3xWobY-B9GPlHQB.js";function oe({section:e,sectionId:t,numOfBalances:o,config:a}){return ee("no_filter",a.filterAccountsWithNilBalances,a.filterAccountGroupsWithNilBalances).compactedAccountGroupsSelector(e.accountGroups).map(n=>Ie({accountGroup:n,sectionType:t,numOfBalances:o,title:n.accountGroupName,isLastNode:!0,config:a}))}function Ie({accountGroup:e,sectionType:t,numOfBalances:o,title:a,isLastNode:n,config:d}){const p=F("section",[],a+t),l={children:[],id:p,isLastNode:n,reportElementData:{element:{kind:"section",title:a,sectionType:t,data:e,numOfBalances:o},config:d}},i=ee("no_filter",d.filterAccountsWithNilBalances,d.filterAccountGroupsWithNilBalances).compactedAccountsSelectorVariant(e.accounts),u=i.map((g,h)=>ne({account:g,sectionType:t,numOfBalances:o,title:g.account.accountName,config:d,isLastNode:h===i.length-1,parentNodeIDs:[p],ancestorMetadata:{subAccountAncestorMetadata:[{depth:0,hasSibling:i.length>1,hasChildren:g.children.length>0,isLastNode:h===i.length-1}]}}));return l.children.push(...u),l}function ae({sectionWithAcOnly:e,sectionType:t,numOfBalances:o,config:a}){return e.accounts.map((n,d)=>ne({account:n,sectionType:t,numOfBalances:o,title:n.account.accountName,config:a,isLastNode:d===e.accounts.length-1,parentNodeIDs:[],ancestorMetadata:{subAccountAncestorMetadata:[{depth:0,hasSibling:e.accounts.length>1,hasChildren:n.children.length>0,isLastNode:d===e.accounts.length-1}]}}))}function ie({balances:e,config:t,nodeId:o}){return{children:[],id:o??F("timeframe_header",[]),isLastNode:!1,reportElementData:{element:{kind:t.mode==="actual_vs_forecast"?"timeframe_headers_with_forecast":"timeframe_headers",title:"",data:e,numOfBalances:e.length},config:t}}}function Ne(e,t,o,a=!0){Object.assign(e.config,t);const n=ce(o),d=Y({balances:n,config:t});return{config:t,headerNodes:a?[d]:[],contentNodes:[d,...e.contentNodes.slice(1)]}}const ce=e=>{switch(e.reportId){case"profit_and_loss":{const t=e;return t.sections.expenses.balances.length>0?[...t.sections.expenses.balances,...t.sections.expenses.additionalBalances]:[...t.sections.income.balances,...t.sections.income.additionalBalances]}case"profit_and_loss_by_classes":{const t=e;return t.sections.expenses.balances.length>0?[...t.sections.expenses.balances,...t.sections.expenses.additionalBalances]:[...t.sections.income.balances,...t.sections.income.additionalBalances]}case"cash_flow":{const t=e;return[...t.calculatedSections.operatingActivitiesTotal.balances,...t.calculatedSections.operatingActivitiesTotal.additionalBalances]}case"balance_sheet":{const t=e;let o=[];return Object.keys(t.sections).forEach(a=>{t.sections[a].balances.length>0&&(o=[...t.sections[a].balances,...t.sections[a].additionalBalances])}),o}default:return[]}};function Me(e,t,o=!0){const a=y.getLocalizedStrings().reports.sections,n=y.getLocalizedStrings().reports.balanceSheet,d=ce(e),p=t.mode!=null&&t.mode==="this_period_vs_period_before"&&d.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1,l=ie({balances:d,config:t}),i=[];return i.push(l),Object.keys(e.rootSectionsWithSubSectionIds).forEach(u=>{const g=F("title_string_only",[],u),h={children:[],id:g,isLastNode:!0,reportElementData:{element:{kind:"title_string_only",title:a[u],data:void 0,numOfBalances:0},config:t}};i.push(h),e.rootSectionsWithSubSectionIds[u].forEach(s=>{if(_.isBalanceSheetReportViewSectionID(s)===!0)if(e.sections[s].accountGroups.length>0)if(s==="equity"){const c=oe({sectionId:s,section:e.sections[s],numOfBalances:p,config:t});i.push(...c)}else i.push(te({section:e.sections[s],sectionType:s,numOfBalances:p,title:n[s],isLastNode:!0,config:t}));else if(s==="equity"){const c=ae({sectionWithAcOnly:e.sections[s],sectionType:s,numOfBalances:p,config:t});i.push(...c)}else{const c=e.sections[s];i.push(se({sectionWithAcOnly:c,sectionType:s,numOfBalances:p,title:n[s],isLastNode:!0,config:t}))}else _.isBalanceSheetReportViewCalculatedSectionID(s)===!0&&i.push(j({calculatedSection:e.calculatedSections[s],numOfBalances:p,title:n[s],isLastNode:!0,config:t}))})}),{config:t,headerNodes:o?[l]:[],contentNodes:i}}function Fe({calculatedSection:e,numOfBalances:t,title:o,isLastNode:a,config:n}){return{children:[],id:F("calculated_section_type1",[],o),isLastNode:a,reportElementData:{element:{kind:"calculated_section_type1",title:o,data:e,numOfBalances:t},config:n}}}function $e(e,t,o=!0){const a=y.getLocalizedStrings().reports.sections,n=y.getLocalizedStrings().reports.cashFlow,d=[...e.calculatedSections.operatingActivitiesTotal.balances,...e.calculatedSections.operatingActivitiesTotal.additionalBalances],p=t.mode!=null&&t.mode==="this_period_vs_period_before"&&d.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1,l=ie({balances:d,config:t}),i=[];return Object.keys(e.rootSectionsWithSubSectionIds).forEach(u=>{const g=F("title_string_only",[],u),h={children:[],id:g,isLastNode:!0,reportElementData:{element:{kind:"title_string_only",title:a[u],data:void 0,numOfBalances:0},config:t}};i.push(h),e.rootSectionsWithSubSectionIds[u].forEach(s=>{if(_.isCashFlowReportViewSectionID(s)===!0)if(e.sections[s].accountGroups.length>0){const c=oe({sectionId:s,section:e.sections[s],numOfBalances:p,config:t});i.push(...c)}else{const c=ae({sectionWithAcOnly:e.sections[s],sectionType:s,numOfBalances:p,config:t});i.push(...c)}else _.isCashFlowReportViewCalculatedSectionType1ID(s)===!0?i.push(Fe({calculatedSection:e.calculatedSections[s],numOfBalances:p,title:n[s],isLastNode:!0,config:t})):_.isCashFlowReportViewCalculatedSectionID(s)===!0&&i.push(j({calculatedSection:e.calculatedSections[s],numOfBalances:p,title:n[s],isLastNode:!0,config:t}))})}),{config:t,headerNodes:o?[l]:[],contentNodes:[l,...i]}}function je(e,t,o=!0,a=!1){const n=y.getLocalizedStrings().reports,d=y.getLocalizedStrings().common;let p=[];const l=[];let i=[];if(a===!0){const u=Te({title:d.loading,balances:[],config:t});u.reportElementData.element.numOfBalances=6,o&&(i=[u]),l.push(u),[...Array(8)].forEach((g,h)=>{const s=h%4;let c=Pe[s];const x=ke({title:`${h}+${c}`,balances:p,config:t});x.reportElementData.element.numOfBalances=6,l.push(x)})}else{const u=e.sections.expenses.balances.length>0?[...e.sections.expenses.balances,...e.sections.expenses.additionalBalances]:e.sections.income.balances.length>0?[...e.sections.income.balances,...e.sections.income.additionalBalances]:e.sections.cogs.balances.length>0?[...e.sections.cogs.balances,...e.sections.cogs.additionalBalances]:e.sections.otherIncome.balances.length>0?[...e.sections.otherIncome.balances,...e.sections.otherIncome.additionalBalances]:e.sections.otherExpenses.balances.length>0?[...e.sections.otherExpenses.balances,...e.sections.otherExpenses.additionalBalances]:[],g=Y({balances:u,config:t}),h=t.mode!=null&&t.mode==="this_period_vs_period_before"&&u.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1;l.push(g),o&&(i=[g]),e.idsInOrder.forEach(s=>{if(_.isPandLReportViewSectionID(s)===!0){const c=e.sections[s];c!=null&&l.push(Le({section:c,sectionType:s,numOfBalances:h,title:n.sections[s],isLastNode:!0,config:t}))}else if(_.isPandLReportViewCalculatedSectionID(s)===!0){const c=e.calculatedSections[s];c!=null&&l.push(j({calculatedSection:c,numOfBalances:h,title:n.sections[s],isLastNode:!0,config:t}))}})}return{config:t,headerNodes:i,contentNodes:l}}function Ee(e,t,o=!0){const a=y.getLocalizedStrings().reports,n=e.sections.expenses!=null&&e.sections.expenses.balances.length>0?[...e.sections.expenses.balances,...e.sections.expenses.additionalBalances]:e.sections.income!=null&&e.sections.income.balances.length>0?[...e.sections.income.balances,...e.sections.income.additionalBalances]:e.sections.cogs!=null&&e.sections.cogs.balances.length>0?[...e.sections.cogs.balances,...e.sections.cogs.additionalBalances]:e.sections.otherIncome!=null&&e.sections.otherIncome.balances.length>0?[...e.sections.otherIncome.balances,...e.sections.otherIncome.additionalBalances]:e.sections.otherExpenses!=null&&e.sections.otherExpenses.balances.length>0?[...e.sections.otherExpenses.balances,...e.sections.otherExpenses.additionalBalances]:[],d=t.mode!=null&&t.mode==="this_period_vs_period_before"&&n.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1,p=Y({balances:n,config:t}),l=[];return l.push(p),e.idsInOrder.forEach(i=>{if(_.isPandLReportViewSectionID(i)===!0&&(e.sections[i].accountGroups.length>0?l.push(te({section:e.sections[i],sectionType:i,numOfBalances:d,title:a.sections[i],isLastNode:!0,config:t})):l.push(se({sectionWithAcOnly:e.sections[i],sectionType:i,numOfBalances:d,title:a.sections[i],isLastNode:!0,config:t}))),_.isPandLReportViewCalculatedSectionID(i)===!0){const u=e.calculatedSections[i];u!=null&&l.push(j({calculatedSection:u,numOfBalances:d,title:a.sections[i],isLastNode:!0,config:t}))}}),{config:t,headerNodes:o?[p]:[],contentNodes:l}}const q={contentPaddingLeft:new v(w[0],w[0],w[0]),contentPaddingRight:new v(w[3],w[3],w[8])},Ve=b.div`
|
|
1
|
+
import{X as U,u as G,B as y,Y as he,l as _,j as r,$ as k,bf as fe,aY as me,aW as ge,C as v,o as C,a6 as _e,h as be,bg as Se,s as w,I as B,K as Q,bh as we,a8 as Ce,aD as ye,a$ as xe}from"./index-DYVNUtTS.js";import{b as P,f as K,n as b}from"./vendor-CnQcJ2Lu.js";import{m as z,l as Z}from"./analyticsHelper-BRyA7WLX-Ch8yhvbw.js";import{h as Oe}from"./ReportTableViewSelector-Ae5lGopA-CZicNwDg.js";import{a as X,p as Re}from"./TimeRangeSwitcher-DeIRg5zY-Bi--_Fx4.js";import{M as Ae}from"./TimeframeSwitcherWithToggle-BhoniKOB-DuZjqpvb.js";import{DownloadOverlayButton as Be}from"./DownloadOverlay-CUbv29mo-Cm7YvHGd.js";import{R as ve,W as F,x as ee}from"./CollapsableReportTable-DX-FpwE7-MJq_0H8T.js";import{T as te,I as se,L as j,D as Le,g as ne}from"./mapSectionWithAcOnlyToTreeNode-WivyN4Y7-DeEMrm9i.js";import{s as Y}from"./mapTimeframeBalancesToTreeNode-DUac2vK4-jK2oIVF4.js";import{d as Te,l as Pe}from"./mapTimeframeHeaderLoadingInProgressToTreeNode-DtkeOXnf-Dl0F4JWH.js";import{d as ke}from"./mapLoadingInProgressToTreeNode-BV9ky97n-C6-bn_qJ.js";import"./mui-C5LQ0bMa.js";import"./analytics-CBL_L82S.js";import"./routing-Cpaypegg.js";import"./sentry-HDxG13yk.js";import"./redux-ByjIRbhZ.js";import"./liveblocks-sSQ9JElv.js";import"./crypto-BURQLTgV.js";import"./TimeframeSwitcher-Cop4G4gx-DupejW9U.js";import"./page-detail-CWX5S47F-B6DjZ3Gi.js";import"./AccountRow-m3N4T8ro-CB7I5u10.js";function oe({section:e,sectionId:t,numOfBalances:o,config:a}){return ee("no_filter",a.filterAccountsWithNilBalances,a.filterAccountGroupsWithNilBalances).compactedAccountGroupsSelector(e.accountGroups).map(n=>Ie({accountGroup:n,sectionType:t,numOfBalances:o,title:n.accountGroupName,isLastNode:!0,config:a}))}function Ie({accountGroup:e,sectionType:t,numOfBalances:o,title:a,isLastNode:n,config:d}){const p=F("section",[],a+t),l={children:[],id:p,isLastNode:n,reportElementData:{element:{kind:"section",title:a,sectionType:t,data:e,numOfBalances:o},config:d}},i=ee("no_filter",d.filterAccountsWithNilBalances,d.filterAccountGroupsWithNilBalances).compactedAccountsSelectorVariant(e.accounts),u=i.map((g,h)=>ne({account:g,sectionType:t,numOfBalances:o,title:g.account.accountName,config:d,isLastNode:h===i.length-1,parentNodeIDs:[p],ancestorMetadata:{subAccountAncestorMetadata:[{depth:0,hasSibling:i.length>1,hasChildren:g.children.length>0,isLastNode:h===i.length-1}]}}));return l.children.push(...u),l}function ae({sectionWithAcOnly:e,sectionType:t,numOfBalances:o,config:a}){return e.accounts.map((n,d)=>ne({account:n,sectionType:t,numOfBalances:o,title:n.account.accountName,config:a,isLastNode:d===e.accounts.length-1,parentNodeIDs:[],ancestorMetadata:{subAccountAncestorMetadata:[{depth:0,hasSibling:e.accounts.length>1,hasChildren:n.children.length>0,isLastNode:d===e.accounts.length-1}]}}))}function ie({balances:e,config:t,nodeId:o}){return{children:[],id:o??F("timeframe_header",[]),isLastNode:!1,reportElementData:{element:{kind:t.mode==="actual_vs_forecast"?"timeframe_headers_with_forecast":"timeframe_headers",title:"",data:e,numOfBalances:e.length},config:t}}}function Ne(e,t,o,a=!0){Object.assign(e.config,t);const n=ce(o),d=Y({balances:n,config:t});return{config:t,headerNodes:a?[d]:[],contentNodes:[d,...e.contentNodes.slice(1)]}}const ce=e=>{switch(e.reportId){case"profit_and_loss":{const t=e;return t.sections.expenses.balances.length>0?[...t.sections.expenses.balances,...t.sections.expenses.additionalBalances]:[...t.sections.income.balances,...t.sections.income.additionalBalances]}case"profit_and_loss_by_classes":{const t=e;return t.sections.expenses.balances.length>0?[...t.sections.expenses.balances,...t.sections.expenses.additionalBalances]:[...t.sections.income.balances,...t.sections.income.additionalBalances]}case"cash_flow":{const t=e;return[...t.calculatedSections.operatingActivitiesTotal.balances,...t.calculatedSections.operatingActivitiesTotal.additionalBalances]}case"balance_sheet":{const t=e;let o=[];return Object.keys(t.sections).forEach(a=>{t.sections[a].balances.length>0&&(o=[...t.sections[a].balances,...t.sections[a].additionalBalances])}),o}default:return[]}};function Me(e,t,o=!0){const a=y.getLocalizedStrings().reports.sections,n=y.getLocalizedStrings().reports.balanceSheet,d=ce(e),p=t.mode!=null&&t.mode==="this_period_vs_period_before"&&d.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1,l=ie({balances:d,config:t}),i=[];return i.push(l),Object.keys(e.rootSectionsWithSubSectionIds).forEach(u=>{const g=F("title_string_only",[],u),h={children:[],id:g,isLastNode:!0,reportElementData:{element:{kind:"title_string_only",title:a[u],data:void 0,numOfBalances:0},config:t}};i.push(h),e.rootSectionsWithSubSectionIds[u].forEach(s=>{if(_.isBalanceSheetReportViewSectionID(s)===!0)if(e.sections[s].accountGroups.length>0)if(s==="equity"){const c=oe({sectionId:s,section:e.sections[s],numOfBalances:p,config:t});i.push(...c)}else i.push(te({section:e.sections[s],sectionType:s,numOfBalances:p,title:n[s],isLastNode:!0,config:t}));else if(s==="equity"){const c=ae({sectionWithAcOnly:e.sections[s],sectionType:s,numOfBalances:p,config:t});i.push(...c)}else{const c=e.sections[s];i.push(se({sectionWithAcOnly:c,sectionType:s,numOfBalances:p,title:n[s],isLastNode:!0,config:t}))}else _.isBalanceSheetReportViewCalculatedSectionID(s)===!0&&i.push(j({calculatedSection:e.calculatedSections[s],numOfBalances:p,title:n[s],isLastNode:!0,config:t}))})}),{config:t,headerNodes:o?[l]:[],contentNodes:i}}function Fe({calculatedSection:e,numOfBalances:t,title:o,isLastNode:a,config:n}){return{children:[],id:F("calculated_section_type1",[],o),isLastNode:a,reportElementData:{element:{kind:"calculated_section_type1",title:o,data:e,numOfBalances:t},config:n}}}function $e(e,t,o=!0){const a=y.getLocalizedStrings().reports.sections,n=y.getLocalizedStrings().reports.cashFlow,d=[...e.calculatedSections.operatingActivitiesTotal.balances,...e.calculatedSections.operatingActivitiesTotal.additionalBalances],p=t.mode!=null&&t.mode==="this_period_vs_period_before"&&d.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1,l=ie({balances:d,config:t}),i=[];return Object.keys(e.rootSectionsWithSubSectionIds).forEach(u=>{const g=F("title_string_only",[],u),h={children:[],id:g,isLastNode:!0,reportElementData:{element:{kind:"title_string_only",title:a[u],data:void 0,numOfBalances:0},config:t}};i.push(h),e.rootSectionsWithSubSectionIds[u].forEach(s=>{if(_.isCashFlowReportViewSectionID(s)===!0)if(e.sections[s].accountGroups.length>0){const c=oe({sectionId:s,section:e.sections[s],numOfBalances:p,config:t});i.push(...c)}else{const c=ae({sectionWithAcOnly:e.sections[s],sectionType:s,numOfBalances:p,config:t});i.push(...c)}else _.isCashFlowReportViewCalculatedSectionType1ID(s)===!0?i.push(Fe({calculatedSection:e.calculatedSections[s],numOfBalances:p,title:n[s],isLastNode:!0,config:t})):_.isCashFlowReportViewCalculatedSectionID(s)===!0&&i.push(j({calculatedSection:e.calculatedSections[s],numOfBalances:p,title:n[s],isLastNode:!0,config:t}))})}),{config:t,headerNodes:o?[l]:[],contentNodes:[l,...i]}}function je(e,t,o=!0,a=!1){const n=y.getLocalizedStrings().reports,d=y.getLocalizedStrings().common;let p=[];const l=[];let i=[];if(a===!0){const u=Te({title:d.loading,balances:[],config:t});u.reportElementData.element.numOfBalances=6,o&&(i=[u]),l.push(u),[...Array(8)].forEach((g,h)=>{const s=h%4;let c=Pe[s];const x=ke({title:`${h}+${c}`,balances:p,config:t});x.reportElementData.element.numOfBalances=6,l.push(x)})}else{const u=e.sections.expenses.balances.length>0?[...e.sections.expenses.balances,...e.sections.expenses.additionalBalances]:e.sections.income.balances.length>0?[...e.sections.income.balances,...e.sections.income.additionalBalances]:e.sections.cogs.balances.length>0?[...e.sections.cogs.balances,...e.sections.cogs.additionalBalances]:e.sections.otherIncome.balances.length>0?[...e.sections.otherIncome.balances,...e.sections.otherIncome.additionalBalances]:e.sections.otherExpenses.balances.length>0?[...e.sections.otherExpenses.balances,...e.sections.otherExpenses.additionalBalances]:[],g=Y({balances:u,config:t}),h=t.mode!=null&&t.mode==="this_period_vs_period_before"&&u.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1;l.push(g),o&&(i=[g]),e.idsInOrder.forEach(s=>{if(_.isPandLReportViewSectionID(s)===!0){const c=e.sections[s];c!=null&&l.push(Le({section:c,sectionType:s,numOfBalances:h,title:n.sections[s],isLastNode:!0,config:t}))}else if(_.isPandLReportViewCalculatedSectionID(s)===!0){const c=e.calculatedSections[s];c!=null&&l.push(j({calculatedSection:c,numOfBalances:h,title:n.sections[s],isLastNode:!0,config:t}))}})}return{config:t,headerNodes:i,contentNodes:l}}function Ee(e,t,o=!0){const a=y.getLocalizedStrings().reports,n=e.sections.expenses!=null&&e.sections.expenses.balances.length>0?[...e.sections.expenses.balances,...e.sections.expenses.additionalBalances]:e.sections.income!=null&&e.sections.income.balances.length>0?[...e.sections.income.balances,...e.sections.income.additionalBalances]:e.sections.cogs!=null&&e.sections.cogs.balances.length>0?[...e.sections.cogs.balances,...e.sections.cogs.additionalBalances]:e.sections.otherIncome!=null&&e.sections.otherIncome.balances.length>0?[...e.sections.otherIncome.balances,...e.sections.otherIncome.additionalBalances]:e.sections.otherExpenses!=null&&e.sections.otherExpenses.balances.length>0?[...e.sections.otherExpenses.balances,...e.sections.otherExpenses.additionalBalances]:[],d=t.mode!=null&&t.mode==="this_period_vs_period_before"&&n.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1,p=Y({balances:n,config:t}),l=[];return l.push(p),e.idsInOrder.forEach(i=>{if(_.isPandLReportViewSectionID(i)===!0&&(e.sections[i].accountGroups.length>0?l.push(te({section:e.sections[i],sectionType:i,numOfBalances:d,title:a.sections[i],isLastNode:!0,config:t})):l.push(se({sectionWithAcOnly:e.sections[i],sectionType:i,numOfBalances:d,title:a.sections[i],isLastNode:!0,config:t}))),_.isPandLReportViewCalculatedSectionID(i)===!0){const u=e.calculatedSections[i];u!=null&&l.push(j({calculatedSection:u,numOfBalances:d,title:a.sections[i],isLastNode:!0,config:t}))}}),{config:t,headerNodes:o?[p]:[],contentNodes:l}}const q={contentPaddingLeft:new v(w[0],w[0],w[0]),contentPaddingRight:new v(w[3],w[3],w[8])},Ve=b.div`
|
|
2
2
|
height: ${e=>e.height}px;
|
|
3
3
|
width: 99.9%;
|
|
4
4
|
margin-top: ${C.sp2};
|
|
5
5
|
background-color: ${e=>e.theme.colors.grey4};
|
|
6
|
-
`;function De({report:e,displayOrder:t,reportFormat:o,analytics:a,isZeniUser:n,onAdditionalBalanceSelectionChanged:d,onAccountBalanceClick:p,onTableScroll:l,onElementCollapseStateChanged:i,isCompareModeOn:u,isPageFetchInProgress:g=!1}){const h=U(),s=G(),[c,x]=P.useState(void 0),[O,E]=P.useState(void 0),L=!(h==="small"||h==="medium-compact"),V="name+balances_actual",$=u===!0?"this_period_vs_period_before":"none",R=()=>{let m=[];switch(e.reportId){case"profit_and_loss":{const f=e;m=(f.sections.expenses.balances.length>0?f.sections.expenses:f.sections.income).additionalBalances.map(D=>_.toTimeframeTick(D));break}case"profit_and_loss_by_classes":{const f=e,D=(f.sections.expenses?.balances?.length??0)>0?f.sections.expenses:null,pe=(f.sections.income?.balances?.length??0)>0?f.sections.income:null,H=D??pe;H?.additionalBalances!=null&&(m=H.additionalBalances.map(ue=>_.toTimeframeTick(ue)));break}case"cash_flow":{m=e.calculatedSections.investingActivitiesTotal.additionalBalances.map(f=>_.toTimeframeTick(f));break}case"balance_sheet":{m=e.sections.equity.additionalBalances.map(f=>_.toTimeframeTick(f));break}}return m.length>0&&m.find(f=>f.balanceType==="this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent"};P.useEffect(()=>{const m={reportId:e.reportId,bookCloseDate:e.bookCloseDate,mode:$,firstMonthOfFY:e.firstMonthOfFY,filterAccountsWithNilBalances:"filter_actual_nil_balances",filterAccountGroupsWithNilBalances:"filter_actual_forecast_empty_account_group_balances",displayOrder:t,reportFormat:o,dataAvailable:e.dataAvailable,showNegativeAmountInParenthesis:xe(),showClassAccountNumber:n};if(c==null||!
|
|
6
|
+
`;function De({report:e,displayOrder:t,reportFormat:o,analytics:a,isZeniUser:n,onAdditionalBalanceSelectionChanged:d,onAccountBalanceClick:p,onTableScroll:l,onElementCollapseStateChanged:i,isCompareModeOn:u,isPageFetchInProgress:g=!1}){const h=U(),s=G(),[c,x]=P.useState(void 0),[O,E]=P.useState(void 0),L=!(h==="small"||h==="medium-compact"),V="name+balances_actual",$=u===!0?"this_period_vs_period_before":"none",R=()=>{let m=[];switch(e.reportId){case"profit_and_loss":{const f=e;m=(f.sections.expenses.balances.length>0?f.sections.expenses:f.sections.income).additionalBalances.map(D=>_.toTimeframeTick(D));break}case"profit_and_loss_by_classes":{const f=e,D=(f.sections.expenses?.balances?.length??0)>0?f.sections.expenses:null,pe=(f.sections.income?.balances?.length??0)>0?f.sections.income:null,H=D??pe;H?.additionalBalances!=null&&(m=H.additionalBalances.map(ue=>_.toTimeframeTick(ue)));break}case"cash_flow":{m=e.calculatedSections.investingActivitiesTotal.additionalBalances.map(f=>_.toTimeframeTick(f));break}case"balance_sheet":{m=e.sections.equity.additionalBalances.map(f=>_.toTimeframeTick(f));break}}return m.length>0&&m.find(f=>f.balanceType==="this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent"};P.useEffect(()=>{const m={reportId:e.reportId,bookCloseDate:e.bookCloseDate,mode:$,firstMonthOfFY:e.firstMonthOfFY,filterAccountsWithNilBalances:"filter_actual_nil_balances",filterAccountGroupsWithNilBalances:"filter_actual_forecast_empty_account_group_balances",displayOrder:t,reportFormat:o,dataAvailable:e.dataAvailable,showNegativeAmountInParenthesis:xe(),showClassAccountNumber:n};if(c==null||!Q(O,e)||g===!0){const f=ze(e,m,L,g);E(e),x(f)}else{const f=Ne(c,m,e,L);x(f)}},[u,e,g]);const[A,N]=P.useState(5),M=m=>{const f=m+135;N(f)},de=m=>m?.trackPageLoaded(We(e));return c!=null?r.jsxs(r.Fragment,{children:[r.jsx(we,{analytics:a,onLoad:de}),r.jsx(Ve,{height:A,children:r.jsx(ve,{backgroundColor:new Ce(s.colors.grey4),rootNodes:c,type:V,compareMode:R(),isSticky:{isStickyHeader:L,isStickyName:L},treeNodePadding:{left:q.contentPaddingLeft.value(h),right:q.contentPaddingRight.value(h)},onAccountClick:p==null?void 0:(m,f)=>{p(m,f)},nodeOpenStatus:e.uiState.nodeCollapseState,scrollPosition:e.uiState.scrollPosition,onCompareModeChanged:m=>d?.(m==="compare_mode_amount"?"this_period_vs_last_period":"this_period_vs_last_period_percent","dropdown"),onNodeCollapseToggled:(m,f)=>i?.(e.reportId,m,f),onReportTableHeightChanged:M,onScroll:m=>l?.(e.reportId,m)})})]}):null}const ze=(e,t,o=!0,a=!1)=>{switch(e.reportId){case"profit_and_loss":return Ee(e,t,o);case"profit_and_loss_by_classes":return je(e,t,o,a);case"cash_flow":return $e(e,t,o);case"balance_sheet":return Me(e,t,o);default:return}},We=e=>{switch(e.reportId){case"profit_and_loss":case"profit_and_loss_by_classes":return B.Event.profitAndLoss;case"cash_flow":return B.Event.cashFlow;case"balance_sheet":return B.Event.balanceSheet;default:return B.Event.reports}},Ue=b.div`
|
|
7
7
|
display: flex;
|
|
8
8
|
flex-direction: row;
|
|
9
9
|
border-bottom: 1px solid ${e=>e.theme.colors.grey3};
|
|
@@ -49,7 +49,7 @@ import{X as U,u as G,M as y,w as he,l as _,j as r,_ as k,be as fe,aX as me,aV as
|
|
|
49
49
|
width: 160px;
|
|
50
50
|
left: 63%;
|
|
51
51
|
}
|
|
52
|
-
`;function Ze({reportId:e,isSelected:t,onClick:o}){const a=n=>{switch(n){case"profit_and_loss":case"profit_and_loss_by_classes":case"balance_sheet":case"cash_flow":return y.getLocalizedStrings().reportTitleById[n];default:return console.warn("Unsupported report"),""}};return r.jsx(Ye,{"data-testid":k("reportSwitcher",e),onClick:()=>{t===!1&&o(e)},isSelected:t,spaceAround:e==="balance_sheet",children:a(e)})}function qe({reportIds:e,selectedReport:t,onReportSelectionChanged:o}){const a=n=>{o?.(n)};return r.jsx(Ue,{"data-testid":k("report-switcher-container"),children:r.jsx(Ge,{"data-testid":k("report-switcher-content"),children:e.map(n=>n!=="profit_and_loss_by_classes"&&r.jsxs("div",{children:[r.jsx(Ze,{reportId:n,isSelected:t===n,onClick:a}),r.jsx(He,{className:`Slider ${t}`})]},`reportSegment-${n}`))})})}const I={contentContainerLeftRightMargin:new v(w[3],w[3],w[8]),contentRightPadding:new v(w[3],w[3],w[8]),tickSkelectionContainerWidth:new v(343,600,905,1240)},
|
|
52
|
+
`;function Ze({reportId:e,isSelected:t,onClick:o}){const a=n=>{switch(n){case"profit_and_loss":case"profit_and_loss_by_classes":case"balance_sheet":case"cash_flow":return y.getLocalizedStrings().reportTitleById[n];default:return console.warn("Unsupported report"),""}};return r.jsx(Ye,{"data-testid":k("reportSwitcher",e),onClick:()=>{t===!1&&o(e)},isSelected:t,spaceAround:e==="balance_sheet",children:a(e)})}function qe({reportIds:e,selectedReport:t,onReportSelectionChanged:o}){const a=n=>{o?.(n)};return r.jsx(Ue,{"data-testid":k("report-switcher-container"),children:r.jsx(Ge,{"data-testid":k("report-switcher-content"),children:e.map(n=>n!=="profit_and_loss_by_classes"&&r.jsxs("div",{children:[r.jsx(Ze,{reportId:n,isSelected:t===n,onClick:a}),r.jsx(He,{className:`Slider ${t}`})]},`reportSegment-${n}`))})})}const I={contentContainerLeftRightMargin:new v(w[3],w[3],w[8]),contentRightPadding:new v(w[3],w[3],w[8]),tickSkelectionContainerWidth:new v(343,600,905,1240)},Je=new v(4,4),Qe=new v(4,4),Ke={selectedNumberOfPeriods:(e,t)=>e?Qe.value(t):Je.value(t)},Xe=b.div`
|
|
53
53
|
display: flex;
|
|
54
54
|
flex: 1 1 auto;
|
|
55
55
|
min-height: 100%;
|
|
@@ -98,7 +98,7 @@ import{X as U,u as G,M as y,w as he,l as _,j as r,_ as k,be as fe,aX as me,aV as
|
|
|
98
98
|
`,at=b(_e)`
|
|
99
99
|
margin-top: ${C.sp3};
|
|
100
100
|
color: ${e=>e.theme.colors.hero};
|
|
101
|
-
`,re=({style:e,isLoading:t})=>t?r.jsx(tt,{style:e,children:r.jsx(be,{size:"ExtraLarge",start:!0})}):null,S=e=>{switch(e.selectedReport){case"cash_flow":return e.cashFlowReport;case"balance_sheet":return e.balanceSheetReport;case"profit_and_loss_by_classes":return e.profitAndLossClassesViewReport;case"profit_and_loss":default:return e.profitAndLossReport}},W=({selectedReport:e,isCompareModeOn:t,windowSize:o})=>{const a=e.availableNumberOfPeriods;let n=Ke.selectedNumberOfPeriods(t,o);return a!=null&&(n=Math.min(n,a)),n};function jt(e){const t=U(),o=G(),{onUpdateAccountViewMode:a,onUpdateClassesToFilterOut:n,onAdditionalBalanceSelectionChanged:d,onTimeframeSelectionChanged:p,isCompareMode:l,selectedReportAndTimeframeFetchState:i,onClickMenuIcon:u}=e,g=(R,A)=>{R!==h?.accountViewMode&&a?.(R),A&&n?.(A)};P.useEffect(()=>{if(e.fetchState==="Completed"){const R=S(e).filter.additionalBalances;e.onUpdateHighlightedNumberOfPeriods?.(R,e.isCompareMode,W({selectedReport:S(e),isCompareModeOn:e.isCompareMode,windowSize:t}),e.balancesInTimeframe)}},[t,e.fetchState]);const h=rt(e),s=y.getLocalizedStrings().reports.common,c=he(),x=c!=null&&_.hasInvestorBankerLevelAccess(c.loggedInUserRole)?"detailed":"more_detailed",O=c!=null&&_.hasInvestorBankerLevelAccess(c.loggedInUserRole)?["more_detailed"]:[];e.showAccountGroups===!1&&h?.accountViewMode==="account_group"&&O.push("detailed");const[E,L]=K.useState(O.includes("more_detailed")?"detailed":"more_detailed"),V={selectedFormat:E,disabledFormatForRole:O,roleBasedClassesSelectedFormat:x,setSelectedFormat:L};if(i.fetchState==="Error"||e.fetchState==="Error")return r.jsxs(nt,{"data-testid":k("report-page-error-reload-page"),children:[r.jsx(ot,{"data-testid":k("report-page-error-reload-icon"),onClick:e.onReloadReport,children:r.jsx(fe,{})}),r.jsx(at,{children:s.failed})]});const $=e.fetchState;if(i.fetchState!=="Completed"&&($==="In-Progress"||$==="Not-Started"))return r.jsx(re,{isLoading:!0});{const R=r.jsx(me,{downloadReportOptions:{type:"detailed_menu",downloadMenu:{detailedMenu:h!=null&&e.dataAvailable!=null?r.jsx(Be,{defaultOptions:h,analytics:e.analytics,referrer:T(e.selectedReport),dataAvailable:e.dataAvailable,downloadState:e.downloadState,statementEndPoint:e.statementEndPoint,authParams:e.authParams,currentTenantCompanyName:e.currentTenantCompanyName,classesFetchState:e.profitAndLossClassesViewReport.fetchState,showAccountGroups:e.showAccountGroups,reportFormatProps:V,updateDownloadStateHandler:e.updateDownloadStateHandler,onUpdateDisplayOrder:e.onUpdateDisplayOrder,onUpdateReportFormat:e.onUpdateReportFormat,onClose:()=>null,onOpenAccountViewMode:e.onOpenAccountViewMode,onSaveClickHandler:g,onThisPeriodChanged:e.onThisPeriodChanged,onAdditionalBalanceSelectionChanged:(A,N,M)=>{d(l,A,N,M)},onTimeframeSelectionChanged:(A,N,M)=>{p?.(A,N,M)}}):r.jsx(r.Fragment,{})}}});return r.jsxs(Qe,{children:[r.jsx(ge,{title:y.getLocalizedStrings().reports.title,backgroundColor:o.colors.grey4,onBackClick:e.onBackClick,showMenuIcon:t==="medium-compact"||t==="small",onClickMenuIcon:u,rightSideComponent:R,downloadPresent:!0,source:"ReportsPage",hideSearchBtn:!0}),r.jsx(it,{...e})]})}}function it(e){const t=U(),o=G(),a=P.useRef(null),{selectedReportAndTimeframeFetchState:n}=e,d=["month","quarter","year"],p=(s,c)=>{e.analytics?.trackCompareFilterChange(s==="this_period_vs_last_period_percent"?"percentage":"amount",T(e.selectedReport),z(e.selectedTimeframe),c);const x=Array.from(new Set(s==="this_period_vs_last_period_percent"?[...S(e).filter.additionalBalances,"this_period_vs_last_period_percent"].filter(O=>O!=="this_period_vs_last_period"):[...S(e).filter.additionalBalances,"this_period_vs_last_period"].filter(O=>O!=="this_period_vs_last_period_percent")));e.onAdditionalBalanceSelectionChanged?.(e.isCompareMode,x,W({selectedReport:S(e),isCompareModeOn:e.isCompareMode,windowSize:t}))},l=(s,c)=>{s!==e.profitAndLossClassesViewReport?.uiState.accountViewMode&&e.onUpdateAccountViewMode?.(s),c&&e.onUpdateClassesToFilterOut?.(c)},i=S(e),u=a.current?.clientWidth??I.tickSkelectionContainerWidth.value(t),g=_.reduceAllFetchState([e.reportsResyncFetchState,e.profitAndLossClassesViewReport]).fetchState==="In-Progress"&&e.profitAndLossClassesViewReport.uiState.accountViewMode==="classes",h=n.fetchState==="In-Progress";return r.jsxs(et,{windowSize:t,"data-testid":k("reports-page-content-container"),children:[r.jsx(pt,{windowSize:t,ref:a,children:r.jsx(Ae,{timeframe:{allowedTimeframes:d,selectedTimeframe:e.selectedTimeframe,onTimeframeSelectionChanged:s=>{e.analytics?.trackTimeframeSwitch(z(s),T(e.selectedReport)),e.onTimeframeSelectionChanged?.(s,!0)}},toggle:{label:y.getLocalizedStrings().compareSwitchLabel,isOn:e.isCompareMode,onValueChanged:s=>{e.analytics?.trackCompareMode(s,T(e.selectedReport),z(e.selectedTimeframe));const c=S(e).filter;e.onAdditionalBalanceSelectionChanged?.(s,c.additionalBalances,c.balancesRange.numberOfPeriods)}}})}),n.fetchState==="Not-Started"||n.fetchState==="In-Progress"?r.jsx(ht,{windowSize:t,children:r.jsx(ft,{children:r.jsx(Se,{width:u,height:Q-w[2],backgroundColor:o.colors.grey3,style:{borderRadius:C.sp2}})})}):r.jsx(ut,{windowSize:t,children:r.jsx(Re,{firstMonthOfFY:i.firstMonthOfFY,timeframe:e.selectedTimeframe,timeframeTicks:e.allTimeframeTicks,selection:{selectedTicks:X(e.allTimeframeTicks,e.selectedCOABalancesRange),highlightedOfSelectedTicks:X(e.allTimeframeTicks,e.selectedCOABalancesRange)},onClick:(s,c)=>{e.analytics?.trackDateRangeFilterChange(T(e.selectedReport),"range filter",e.isCompareMode,Z(i.firstMonthOfFY,e.selectedTimeframe,c)),e.onThisPeriodChanged?.(c,W({selectedReport:S(e),isCompareModeOn:e.isCompareMode,windowSize:t}))},onSelectionChanged:s=>{const c=ct(e.allTimeframeTicks,s.fromEnd);e.analytics?.trackDateRangeFilterChange(T(e.selectedReport),"range filter",e.isCompareMode,Z(i.firstMonthOfFY,e.selectedTimeframe,c.thisPeriod)),e.onCOABalancesRangeChanged?.(c)}})}),r.jsx(mt,{windowSize:t,children:r.jsx(qe,{reportIds:["profit_and_loss","balance_sheet","cash_flow","profit_and_loss_by_classes"],selectedReport:e.selectedReport,onReportSelectionChanged:s=>{e.analytics?.trackPageLoaded(lt(s)),s==="profit_and_loss"&&e.profitAndLossClassesViewReport?.uiState.accountViewMode==="classes"?e.onReportSelectionChanged?.("profit_and_loss_by_classes"):e.onReportSelectionChanged?.(s)}})}),n.fetchState==="Not-Started"||n.fetchState==="In-Progress"?r.jsx(re,{style:{boxShadow:"none",backgroundColor:"inherit"},isLoading:h}):r.jsxs(r.Fragment,{children:[r.jsx(le,{report:S(e),displayOrder:e.displayOrder,reportFormat:e.reportFormat,analytics:e.analytics,onAdditionalBalanceSelectionChanged:p,onAccountBalanceClick:e.onAccountBalanceClick,onElementCollapseStateChanged:e.onElementCollapseStateChanged,onTableScroll:e.onTableScroll,isCompareModeOn:e.isCompareMode,isZeniUser:e.isZeniUser,isPageFetchInProgress:g}),_.isPAndLReport(e.selectedReport)?r.jsx(st,{windowSize:t,children:r.jsx(Oe,{reportId:e.selectedReport,firstMonthOfFY:e.profitAndLossClassesViewReport.firstMonthOfFY,nodes:e.profitAndLossClassesViewReport?.classHierarchy,classesListFetchState:e.profitAndLossClassesViewReport?.fetchState,selectedView:e.profitAndLossClassesViewReport?.uiState.accountViewMode,showClassAccountNumber:e.isZeniUser,showAccountGroups:e.showAccountGroups,onSaveClick:l,classesToBeFilteredOut:e.profitAndLossClassesViewReport?.classesToFilterOut,onOpenAccountViewMode:e.onOpenAccountViewMode,onResyncReports:e.onResyncReports,isPageFetchInProgress:g,lastRefreshSuccessTime:e.profitAndLossClassesViewReport?.status?.lastRefreshSuccessTime})}):null]})]})}const X=(e,t)=>{if(t.orderBy!=="ascending_date")throw new Error("Invalid ordering of dates!!");let o=e.length-1;return t.thisPeriod!=null&&(o=e.findIndex(a=>a.startDate.isSame(t.thisPeriod.startDate,"date")&&a.endDate.isSameOrBefore(t.thisPeriod.endDate))),{startIndex:Math.max(o+1-t.numberOfPeriods,0),length:t.numberOfPeriods}},ct=(e,t)=>{const o=e.length-1-t.offsetFromEnd;return{thisPeriod:e[o],numberOfPeriods:t.length,orderBy:"ascending_date"}};function rt(e){let t=e.selectedCOABalancesRange.thisPeriod;if(t==null){const p=e.displayOrder,l=e.profitAndLossReport.sections.expenses!=null&&e.profitAndLossReport.sections.expenses.balances.length>0?e.profitAndLossReport.sections.expenses:e.profitAndLossReport.sections.income;if(l!=null&&l.balances.length>0){const i=p==="ascending_date"?l.balances.length-1:0;t=l.balances[i]}}const o=S(e).firstMonthOfFY,a=S(e).bookCloseDate,n=S(e).dataAvailable,d=S(e).filter.additionalBalances;if(t!=null)return{localeId:y.getAppLocaleID(),showNegativeAmountInParenthesis:!0,filterAccountsWithNilBalances:"filter_actual_nil_balances",filterAccountGroupsWithNilBalances:"filter_actual_forecast_empty_account_group_balances",includeCoverPage:!0,companyName:e.currentTenantCompanyName,statementFileType:"pdf",statements:e.profitAndLossClassesViewReport.uiState.accountViewMode==="account_group"?["profit_and_loss","balance_sheet","cash_flow"]:["profit_and_loss_by_classes","balance_sheet","cash_flow"],firstMonthOfFY:o,bookCloseDate:a,dataAvailable:n,timeframe:e.selectedTimeframe,additionalBalances:d,format:e.reportFormat,balancesFilter:{thisPeriod:t,numberOfPeriods:e.selectedCOABalancesRange.numberOfPeriods,orderBy:e.displayOrder},accountViewMode:e.profitAndLossClassesViewReport.uiState.accountViewMode,nestedClassHierarchy:e.profitAndLossClassesViewReport?.classHierarchy,classesToFilterOut:e.profitAndLossClassesViewReport.classesToFilterOut,showClassAccountNumber:e.isZeniUser,isZeniCOAUsed:e.isZeniCOAUsed}}const T=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}},lt=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":return B.Event.profitAndLoss;case"cash_flow":return B.Event.cashFlow;case"balance_sheet":return B.Event.balanceSheet;default:return B.Event.reports}},le=K.memo(De,(e,t)=>dt(e,t,["report","analytics","isCompareModeOn","isZeniUser","isPageFetchInProgress"]));le.displayName="Reports table";const dt=(e,t,o)=>o.reduce((a,n)=>a===!0&&J(e[`${n}`],t[`${n}`]),!0),pt=b.div`
|
|
101
|
+
`,re=({style:e,isLoading:t})=>t?r.jsx(tt,{style:e,children:r.jsx(be,{size:"ExtraLarge",start:!0})}):null,S=e=>{switch(e.selectedReport){case"cash_flow":return e.cashFlowReport;case"balance_sheet":return e.balanceSheetReport;case"profit_and_loss_by_classes":return e.profitAndLossClassesViewReport;case"profit_and_loss":default:return e.profitAndLossReport}},W=({selectedReport:e,isCompareModeOn:t,windowSize:o})=>{const a=e.availableNumberOfPeriods;let n=Ke.selectedNumberOfPeriods(t,o);return a!=null&&(n=Math.min(n,a)),n};function jt(e){const t=U(),o=G(),{onUpdateAccountViewMode:a,onUpdateClassesToFilterOut:n,onAdditionalBalanceSelectionChanged:d,onTimeframeSelectionChanged:p,isCompareMode:l,selectedReportAndTimeframeFetchState:i,onClickMenuIcon:u}=e,g=(R,A)=>{R!==h?.accountViewMode&&a?.(R),A&&n?.(A)};P.useEffect(()=>{if(e.fetchState==="Completed"){const R=S(e).filter.additionalBalances;e.onUpdateHighlightedNumberOfPeriods?.(R,e.isCompareMode,W({selectedReport:S(e),isCompareModeOn:e.isCompareMode,windowSize:t}),e.balancesInTimeframe)}},[t,e.fetchState]);const h=rt(e),s=y.getLocalizedStrings().reports.common,c=he(),x=c!=null&&_.hasInvestorBankerLevelAccess(c.loggedInUserRole)?"detailed":"more_detailed",O=c!=null&&_.hasInvestorBankerLevelAccess(c.loggedInUserRole)?["more_detailed"]:[];e.showAccountGroups===!1&&h?.accountViewMode==="account_group"&&O.push("detailed");const[E,L]=K.useState(O.includes("more_detailed")?"detailed":"more_detailed"),V={selectedFormat:E,disabledFormatForRole:O,roleBasedClassesSelectedFormat:x,setSelectedFormat:L};if(i.fetchState==="Error"||e.fetchState==="Error")return r.jsxs(nt,{"data-testid":k("report-page-error-reload-page"),children:[r.jsx(ot,{"data-testid":k("report-page-error-reload-icon"),onClick:e.onReloadReport,children:r.jsx(fe,{})}),r.jsx(at,{children:s.failed})]});const $=e.fetchState;if(i.fetchState!=="Completed"&&($==="In-Progress"||$==="Not-Started"))return r.jsx(re,{isLoading:!0});{const R=r.jsx(me,{downloadReportOptions:{type:"detailed_menu",downloadMenu:{detailedMenu:h!=null&&e.dataAvailable!=null?r.jsx(Be,{defaultOptions:h,analytics:e.analytics,referrer:T(e.selectedReport),dataAvailable:e.dataAvailable,downloadState:e.downloadState,statementEndPoint:e.statementEndPoint,authParams:e.authParams,currentTenantCompanyName:e.currentTenantCompanyName,classesFetchState:e.profitAndLossClassesViewReport.fetchState,showAccountGroups:e.showAccountGroups,reportFormatProps:V,updateDownloadStateHandler:e.updateDownloadStateHandler,onUpdateDisplayOrder:e.onUpdateDisplayOrder,onUpdateReportFormat:e.onUpdateReportFormat,onClose:()=>null,onOpenAccountViewMode:e.onOpenAccountViewMode,onSaveClickHandler:g,onThisPeriodChanged:e.onThisPeriodChanged,onAdditionalBalanceSelectionChanged:(A,N,M)=>{d(l,A,N,M)},onTimeframeSelectionChanged:(A,N,M)=>{p?.(A,N,M)}}):r.jsx(r.Fragment,{})}}});return r.jsxs(Xe,{children:[r.jsx(ge,{title:y.getLocalizedStrings().reports.title,backgroundColor:o.colors.grey4,onBackClick:e.onBackClick,showMenuIcon:t==="medium-compact"||t==="small",onClickMenuIcon:u,rightSideComponent:R,downloadPresent:!0,source:"ReportsPage",hideSearchBtn:!0}),r.jsx(it,{...e})]})}}function it(e){const t=U(),o=G(),a=P.useRef(null),{selectedReportAndTimeframeFetchState:n}=e,d=["month","quarter","year"],p=(s,c)=>{e.analytics?.trackCompareFilterChange(s==="this_period_vs_last_period_percent"?"percentage":"amount",T(e.selectedReport),z(e.selectedTimeframe),c);const x=Array.from(new Set(s==="this_period_vs_last_period_percent"?[...S(e).filter.additionalBalances,"this_period_vs_last_period_percent"].filter(O=>O!=="this_period_vs_last_period"):[...S(e).filter.additionalBalances,"this_period_vs_last_period"].filter(O=>O!=="this_period_vs_last_period_percent")));e.onAdditionalBalanceSelectionChanged?.(e.isCompareMode,x,W({selectedReport:S(e),isCompareModeOn:e.isCompareMode,windowSize:t}))},l=(s,c)=>{s!==e.profitAndLossClassesViewReport?.uiState.accountViewMode&&e.onUpdateAccountViewMode?.(s),c&&e.onUpdateClassesToFilterOut?.(c)},i=S(e),u=a.current?.clientWidth??I.tickSkelectionContainerWidth.value(t),g=_.reduceAllFetchState([e.reportsResyncFetchState,e.profitAndLossClassesViewReport]).fetchState==="In-Progress"&&e.profitAndLossClassesViewReport.uiState.accountViewMode==="classes",h=n.fetchState==="In-Progress";return r.jsxs(et,{windowSize:t,"data-testid":k("reports-page-content-container"),children:[r.jsx(pt,{windowSize:t,ref:a,children:r.jsx(Ae,{timeframe:{allowedTimeframes:d,selectedTimeframe:e.selectedTimeframe,onTimeframeSelectionChanged:s=>{e.analytics?.trackTimeframeSwitch(z(s),T(e.selectedReport)),e.onTimeframeSelectionChanged?.(s,!0)}},toggle:{label:y.getLocalizedStrings().compareSwitchLabel,isOn:e.isCompareMode,onValueChanged:s=>{e.analytics?.trackCompareMode(s,T(e.selectedReport),z(e.selectedTimeframe));const c=S(e).filter;e.onAdditionalBalanceSelectionChanged?.(s,c.additionalBalances,c.balancesRange.numberOfPeriods)}}})}),n.fetchState==="Not-Started"||n.fetchState==="In-Progress"?r.jsx(ht,{windowSize:t,children:r.jsx(ft,{children:r.jsx(Se,{width:u,height:X-w[2],backgroundColor:o.colors.grey3,style:{borderRadius:C.sp2}})})}):r.jsx(ut,{windowSize:t,children:r.jsx(Re,{firstMonthOfFY:i.firstMonthOfFY,timeframe:e.selectedTimeframe,timeframeTicks:e.allTimeframeTicks,selection:{selectedTicks:J(e.allTimeframeTicks,e.selectedCOABalancesRange),highlightedOfSelectedTicks:J(e.allTimeframeTicks,e.selectedCOABalancesRange)},onClick:(s,c)=>{e.analytics?.trackDateRangeFilterChange(T(e.selectedReport),"range filter",e.isCompareMode,Z(i.firstMonthOfFY,e.selectedTimeframe,c)),e.onThisPeriodChanged?.(c,W({selectedReport:S(e),isCompareModeOn:e.isCompareMode,windowSize:t}))},onSelectionChanged:s=>{const c=ct(e.allTimeframeTicks,s.fromEnd);e.analytics?.trackDateRangeFilterChange(T(e.selectedReport),"range filter",e.isCompareMode,Z(i.firstMonthOfFY,e.selectedTimeframe,c.thisPeriod)),e.onCOABalancesRangeChanged?.(c)}})}),r.jsx(mt,{windowSize:t,children:r.jsx(qe,{reportIds:["profit_and_loss","balance_sheet","cash_flow","profit_and_loss_by_classes"],selectedReport:e.selectedReport,onReportSelectionChanged:s=>{e.analytics?.trackPageLoaded(lt(s)),s==="profit_and_loss"&&e.profitAndLossClassesViewReport?.uiState.accountViewMode==="classes"?e.onReportSelectionChanged?.("profit_and_loss_by_classes"):e.onReportSelectionChanged?.(s)}})}),n.fetchState==="Not-Started"||n.fetchState==="In-Progress"?r.jsx(re,{style:{boxShadow:"none",backgroundColor:"inherit"},isLoading:h}):r.jsxs(r.Fragment,{children:[r.jsx(le,{report:S(e),displayOrder:e.displayOrder,reportFormat:e.reportFormat,analytics:e.analytics,onAdditionalBalanceSelectionChanged:p,onAccountBalanceClick:e.onAccountBalanceClick,onElementCollapseStateChanged:e.onElementCollapseStateChanged,onTableScroll:e.onTableScroll,isCompareModeOn:e.isCompareMode,isZeniUser:e.isZeniUser,isPageFetchInProgress:g}),_.isPAndLReport(e.selectedReport)?r.jsx(st,{windowSize:t,children:r.jsx(Oe,{reportId:e.selectedReport,firstMonthOfFY:e.profitAndLossClassesViewReport.firstMonthOfFY,nodes:e.profitAndLossClassesViewReport?.classHierarchy,classesListFetchState:e.profitAndLossClassesViewReport?.fetchState,selectedView:e.profitAndLossClassesViewReport?.uiState.accountViewMode,showClassAccountNumber:e.isZeniUser,showAccountGroups:e.showAccountGroups,onSaveClick:l,classesToBeFilteredOut:e.profitAndLossClassesViewReport?.classesToFilterOut,onOpenAccountViewMode:e.onOpenAccountViewMode,onResyncReports:e.onResyncReports,isPageFetchInProgress:g,lastRefreshSuccessTime:e.profitAndLossClassesViewReport?.status?.lastRefreshSuccessTime})}):null]})]})}const J=(e,t)=>{if(t.orderBy!=="ascending_date")throw new Error("Invalid ordering of dates!!");let o=e.length-1;return t.thisPeriod!=null&&(o=e.findIndex(a=>a.startDate.isSame(t.thisPeriod.startDate,"date")&&a.endDate.isSameOrBefore(t.thisPeriod.endDate))),{startIndex:Math.max(o+1-t.numberOfPeriods,0),length:t.numberOfPeriods}},ct=(e,t)=>{const o=e.length-1-t.offsetFromEnd;return{thisPeriod:e[o],numberOfPeriods:t.length,orderBy:"ascending_date"}};function rt(e){let t=e.selectedCOABalancesRange.thisPeriod;if(t==null){const p=e.displayOrder,l=e.profitAndLossReport.sections.expenses!=null&&e.profitAndLossReport.sections.expenses.balances.length>0?e.profitAndLossReport.sections.expenses:e.profitAndLossReport.sections.income;if(l!=null&&l.balances.length>0){const i=p==="ascending_date"?l.balances.length-1:0;t=l.balances[i]}}const o=S(e).firstMonthOfFY,a=S(e).bookCloseDate,n=S(e).dataAvailable,d=S(e).filter.additionalBalances;if(t!=null)return{localeId:y.getAppLocaleID(),showNegativeAmountInParenthesis:!0,filterAccountsWithNilBalances:"filter_actual_nil_balances",filterAccountGroupsWithNilBalances:"filter_actual_forecast_empty_account_group_balances",includeCoverPage:!0,companyName:e.currentTenantCompanyName,statementFileType:"pdf",statements:e.profitAndLossClassesViewReport.uiState.accountViewMode==="account_group"?["profit_and_loss","balance_sheet","cash_flow"]:["profit_and_loss_by_classes","balance_sheet","cash_flow"],firstMonthOfFY:o,bookCloseDate:a,dataAvailable:n,timeframe:e.selectedTimeframe,additionalBalances:d,format:e.reportFormat,balancesFilter:{thisPeriod:t,numberOfPeriods:e.selectedCOABalancesRange.numberOfPeriods,orderBy:e.displayOrder},accountViewMode:e.profitAndLossClassesViewReport.uiState.accountViewMode,nestedClassHierarchy:e.profitAndLossClassesViewReport?.classHierarchy,classesToFilterOut:e.profitAndLossClassesViewReport.classesToFilterOut,showClassAccountNumber:e.isZeniUser,isZeniCOAUsed:e.isZeniCOAUsed}}const T=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}},lt=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":return B.Event.profitAndLoss;case"cash_flow":return B.Event.cashFlow;case"balance_sheet":return B.Event.balanceSheet;default:return B.Event.reports}},le=K.memo(De,(e,t)=>dt(e,t,["report","analytics","isCompareModeOn","isZeniUser","isPageFetchInProgress"]));le.displayName="Reports table";const dt=(e,t,o)=>o.reduce((a,n)=>a===!0&&Q(e[`${n}`],t[`${n}`]),!0),pt=b.div`
|
|
102
102
|
padding-right: ${e=>I.contentRightPadding.valuePx(e.windowSize)};
|
|
103
103
|
`,ut=b.div`
|
|
104
104
|
margin-top: ${C.sp3};
|
|
@@ -110,7 +110,7 @@ import{X as U,u as G,M as y,w as he,l as _,j as r,_ as k,be as fe,aX as me,aV as
|
|
|
110
110
|
display: flex;
|
|
111
111
|
flex-direction: row;
|
|
112
112
|
justify-content: flex-start;
|
|
113
|
-
min-height: ${
|
|
113
|
+
min-height: ${X}px;
|
|
114
114
|
box-sizing: content-box;
|
|
115
115
|
width: 100%;
|
|
116
116
|
align-items: center;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{u as A,j as a,
|
|
1
|
+
import{u as A,j as a,B as S,X as de,$ as Ae,aj as Q,b6 as Te,s as E,b7 as J,aw as ee,v as M,av as ae,ab as re,b8 as oe,b9 as ge,o as m,ba as te,d as g,K as Fe,bb as pe,bc as me,C as xe,bd as fe,m as R,be as F,ap as V}from"./index-DYVNUtTS.js";import{b as P,f as le,n as x}from"./vendor-CnQcJ2Lu.js";import{p as b,d as ne,y as W,b as N,g as ce,u as T}from"./chartTypes-CWEoqL4g-Bo1GQ9Y0.js";import{i as K,h as se,c as I}from"./toCOABalancesWithID-CkjYSysY-DF7YtxZI.js";import{V as Z}from"./toChartData-BhKlnyso-CKLUlraQ.js";const q={legendLabelMarginLeft:new xe(2,2),legendLabelMarginRight:new xe(E[3],E[4])},Ve=x.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
`,He=x.div`
|
|
4
4
|
margin: ${m.sp2} ${m.sp0} ${m.sp2} ${m.sp0};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{X as vt,w as Tt,C as y,cB as jt,M as St,cC as Ct,cD as Dt,j as t,cE as It,cF as le,cG as Pt,l as d,cH as kt,cI as At,_ as j,cJ as Mt,a0 as A,cK as Bt,cL as Nt,cM as Ae,cN as Me,cO as Be,f as G,cP as O,cQ as z,cR as _,g as S,cS as Rt,cT as Ft,cU as Et,cV as Lt,bs as Ne,o as n,a4 as Ot,q as c,r as zt,bo as _t,Q as Wt,h as Ut,cW as Ht,bH as Zt,e as se,m as de,cX as Vt,cY as Yt,aB as Gt,k as Kt,ao as Xt,Z as qe,b4 as qt,v as Qe,aO as Qt,cZ as Jt}from"./index-CVo0uMzO.js";import{b as U,n as i}from"./vendor-CnQcJ2Lu.js";import{t as en,o as tn}from"./LowBalancePopup-BEvuAR0Z-D9Mm46kU.js";import{S as W}from"./LabeledText-ByqI7uq0-BqhwXzjW.js";import"./mui-C5LQ0bMa.js";import"./analytics-CBL_L82S.js";import"./routing-Cpaypegg.js";import"./sentry-HDxG13yk.js";import"./redux-ByjIRbhZ.js";import"./liveblocks-sSQ9JElv.js";import"./crypto-BURQLTgV.js";const Je=["small","medium-compact","medium-regular"],p={largeLabelWidth:new y(150,215,215),infoMinWidth:new y(0,0,0,142,142),infoMarginRight:new y(0,0,0,c[2],c[2]),footerButtonWidth:new y(120,165),iconContainerMarginTop:new y(6,c[1]),navBarContainerPaddingTop:new y(10,c[3]),sectionTitleMarginLeft:new y(c[3],c[0]),reviewContainerMarginLeft:new y(c[3],c[6]),reviewContainerMarginRight:new y(c[3],c[8]),footerRightIconMarginRight:new y(c[0],c[0],c[7]),infoLabelPaddingRight:new y(c[0],c[3]),infoLabelMarginTop:new y(c[1],c[0])},nn={sectionTitle:new Wt("h6Medium","h5Medium")},{dateFormat:Re,common:{currency:T,labels:Fe,edit:an,strings:{empty:h}},spendManagement:{billPay:ln}}=St.getLocalizedStrings(),{billDetails:a,paymentDetails:Ee}=ln,Le=({attachment:e})=>{const[w,x]=U.useState(!1),M=()=>{x(!1)},C=e.fileId?.length===0;return t.jsxs(Bn,{isDisabled:e.fileId?.length===0,"data-testid":j("attachment-tag",e.fileName),onClick:()=>C===!1?x(!0):null,children:[w&&e?.fileDownloadUrl!=null?t.jsx(Vt,{title:e.fileName,file:e,onCrossClick:()=>M(),setShowFullScreenView:x}):null,t.jsx(Nn,{children:t.jsx(Yt,{contentType:e.contentType})})]})},ti=({billDetails:e,billpayApprovalView:w,isBillPayCommentingEnabled:x,currentTenant:M,isInternationalPaymentShaVsOurEnabled:C,isLocalCurrencyEnabled:et,style:tt,analytics:$,isRecurringBillsFeatureEnabled:nt,isApprovalRequiredForMarkAsPaid:it,isDetectInsufficientFundsEnabled:at,billId:f,onClickEdit:ce,discardBillDetailsFromLocalStore:me,saveBillDetails:pe,discardOutsideZeniPaymentData:lt,updateBillDetailSaveBillCode:ue,redirectToBillsScreen:ye,onAttachmentClick:Q,retryPayment:ot})=>{const s=vt(),m=Tt(),B={application:"dashboard",companyId:m.currentTenant?.companyId,tab:"bill",entityId:f},N=x&&f!=null,R=`dashboard_${m.currentTenant?.companyId}`,F=p.largeLabelWidth.value(s),E=e.saveStatus,J=e.zeniAssistRetryStatus,ee=e.vendor?.vendorCurrencyCode,o=jt(C,et,e.billPayConfigList.filter(l=>l.method.includes(e.paymentDetailsSection?.withdrawFrom?.accType??"depositAccount")),e.paymentDetailsSection?.internationalTransferFeeBearerPaymentMethod,e.paymentDetailsSection?.paymentType,ee),D=Re.visual.MMMDCommaYYYYformat,he={amount:e.recipientTotalAmount.amount/(e.paymentDetailsSection?.conversionRate??1)*100/100,currencyCode:T.currencyCode,currencySymbol:T.currencySymbol},u={amount:o?.method.includes("international")===!0?Ct(he,o):e.recipientTotalAmount.amount+(o?.fee.amount??0),currencyCode:T.currencyCode,currencySymbol:T.currencySymbol},L={amount:o?.method.includes("international")===!0?Dt(he,o):o?.fee.amount??0,currencyCode:T.currencyCode,currencySymbol:T.currencySymbol},[rt,ge]=U.useState(!1),[st,xe]=U.useState(!1),fe=()=>ge(!1),dt=()=>{$.trackBillPayMagicLinkPreviewEmail("review_bill"),ge(!0)},ct=e.isCollectToAccountInfoFromVendorContact?t.jsxs(t.Fragment,{children:[`${a.magicLink.collectFrom} ${e.toAccountVendorEmail}`,t.jsx(kn,{size:s,children:t.jsx(Pn,{})})]}):It(e.paymentDetailsSection?.paymentTo);U.useEffect(()=>{(E?.fetchState==="Completed"||J?.fetchState==="Completed")&&(me(),ue(),ye())},[E,J,ye,me,ue]);const v=e.billPayInfo?.stage,P=e.billPayInfo?.billStatus,H=e.billPayInfo?.billPaymentStatus,mt=e.billPayInfo?.billPaymentRefundStatus,te=v?.code==="paid"?v:P?.code=="approved"&&H?.code?H:P,pt=e.billPayInfo?.isRefundInitiated===!0?mt:P?.code=="approved"&&H?.code?H:P,ne=()=>{ce()},be=()=>{ce()},Z=e.paymentDetailsSection?.paymentDate,ie=le(o?.method??""),we=ie.replace("Same Day",""),ut=e.isCollectToAccountInfoFromVendorContact?t.jsx(Pt,{paymentTypeLabel:we,onClick:dt}):a.addedByZeni,V=w.allApprovalRules.length>0,yt=d.toAmount(o?.method!=null&&(o.method.includes(d.NEW_INTERNATIONAL_METHOD_SUBTEXT)||o?.fee.amount!=null&&o.fee.amount!==0)?u.amount-L.amount:u.amount,o?.fee.currencyCode??d.defaultVendorCurrency.currencyCode,o?.fee.currencySymbol??d.defaultVendorCurrency.currencySymbol),g=d.isPaymentMethodOutsideZeni(e.paymentDetailsSection?.paymentType?.method),ht=l=>{$.trackBillPayMarkAsPaidSubmit(l.paymentMode??"other",v?.code??"draft",te?.code??""),pe(!0,l)},$e=()=>{xe(!0),$.trackBillPayMarkAsPaid(v?.code??"draft",te?.code??"")},gt=()=>{lt(),xe(!1)},k=g&&(v?.code!=null?v.code==="draft"||P?.code==="approved":!0),b=k&&!it,ve=Oe(b,V,e.isBillMarkedForRetry),xt=()=>g?b?void 0:a.paymentOutsideZeni.reviewInfo:o?.method!=null&&o.method.includes(d.NEW_INTERNATIONAL_METHOD_SUBTEXT)&&e.paymentDetailsSection?.internationalTransferFeeBearerPaymentMethod!=null&&C&&ee===T.currencyCode?Ft(e.paymentDetailsSection.internationalTransferFeeBearerPaymentMethod):void 0,ae=at&&e.paymentDetailsSection!=null?kt(u,e.paymentDetailsSection.withdrawFrom,e.paymentDetailsSection.paymentDate):void 0,ft=()=>{const l=e.paymentDetailsSection?.paymentDate,r=e.isCollectToAccountInfoFromVendorContact,I=e.recurringConfig,wt=e.recipientTotalAmount;if(e.isInvoiceDateAutoUpdated===!0&&$.trackBillPayAutoDateChange(f??"new_bill"),o?.method!=null&&l!=null){const $t=g?a.paymentOutsideZeni.offline:le(o.method);if($.trackBillPaySendForApproval($t,l.format(Re.analytics.MMMDashDDDashYYYYFormat),r,e.isRecurring,f,e.paymentDetailsSection?.internationalTransferFeeBearerPaymentMethod,{startDate:d.zeniDate(I?.startDate?.toString()??"").format(D),endDate:d.zeniDate(I?.endDate?.toString()??"").format(D),frequency:I?.frequency??"monthly",totalAmount:wt.amount,totalPaymentCycles:I?.totalPaymentCycles??0,isApprovalRequired:I?.isApprovalRequired??!1,updateCurrentBill:e.recurringConfig?.id!=null?I?.updateRecurringBills==="current":void 0,updateFutureRecurringBills:e.recurringConfig?.id!=null?I?.updateRecurringBills==="all":void 0}),ae!=null){const Se=v?.code??"draft",Ce=P?.code??"",De=e.isRecurring?["Recurring"]:["One-Time"],Ie=e.invoiceNumber??"",Pe=Jt(m.loggedInUser),ke=e.paymentDetailsSection?.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account";ve===a.scheduleBill?$.trackLowBalanceAccountSchedule(Se,Ce,De,Ie,Pe,ke):ve===a.sendForApproval&&$.trackLowBalanceAccountSentForApproval(Se,Ce,De,Ie,Pe,ke)}}},Te=()=>{je===!0&&Y(!1),e.isBillMarkedForRetry===!0?(ot(),$.trackRetryConfirmClick(te?.code??"",v?.code??"",pt?.description??"",e.isRecurring?["Recurring"]:["One-Time"],e.invoiceNumber??"")):e.vendor!=null&&(ft(),pe(!1,{}))},bt=d.checkIfCreatorIsApprover(u.amount,w.allApprovalRules,m.loggedInUser),[je,Y]=U.useState(!1);return t.jsxs(hn,{children:[st?t.jsx(en,{onCancel:gt,onProceedForMarkAsPaid:ht,saveDetailsFetchState:E?.fetchState,paymentData:e.outsideZeniPaymentInfo}):null,je?t.jsx(tn,{withdrawFrom:e.paymentDetailsSection?.withdrawFrom,paymentDate:e.paymentDetailsSection?.paymentDate,onOkClick:Te,onCancelClick:()=>{Y(!1),ne()},onClickAway:()=>{Y(!1)}}):null,t.jsx(At,{anchor:"right",open:rt,onClose:fe,transitionDuration:250,"data-testid":j("vendor-email-preview-drawer"),children:t.jsx(Mt,{companyName:Bt(M.company?.companyInfo),vendor:e.vendor?.name,paymentDate:Z?.format(D)??"",paymentType:we,amount:A("0,0[.]00",u),isInvoiceAttached:!!e.file,onClose:fe})}),t.jsxs(gn,{windowSize:s,style:tt,children:[s==="small"?t.jsxs(In,{windowSize:s,children:[t.jsx(Ve,{onClick:be,"data-testid":j("review-detail-nav-bar-small-back")}),t.jsx(We,{windowSize:s,children:a.oneLastLook})]}):t.jsx(Dn,{"data-testid":j("review-details-nav-bar-back"),children:t.jsx(Ve,{onClick:be})}),s!=="small"?t.jsx(fn,{children:t.jsx(We,{windowSize:s,children:a.oneLastLook})}):null,e.duplicateBillTransactions.length>0?t.jsxs(bn,{children:[t.jsxs(wn,{children:[t.jsx(zn,{}),t.jsxs($n,{children:[t.jsx(Tn,{children:a.duplicateBillPayWarning}),t.jsxs(vn,{children:[a.duplicateBillPayWarningSubHeading,t.jsxs("span",{"data-testid":j("review-detail-attachment-button"),onClick:()=>Q(e.duplicateBillTransactions[0].id,e.duplicateBillTransactions[0].billPayInfo.stage.code),style:{textDecoration:"underline",cursor:"pointer"},children:[a.viewBill,e.duplicateBillTransactions[0].documentId]})]})]})]}),t.jsxs(En,{children:[t.jsx(On,{children:a.duplicateInvoiceFound}),e.duplicateBillTransactions.map(l=>{const r=Nt(l);return l!=null?t.jsx(Ln,{children:Je.includes(s)?t.jsxs(Ue,{windowSize:s,children:[t.jsxs(jn,{children:[t.jsxs(Sn,{children:[l.attachments&&l.attachments.length>0?t.jsx(Le,{attachment:l.attachments[0]}):t.jsx(Ye,{children:t.jsx(Ge,{})}),t.jsx(X,{children:t.jsxs(t.Fragment,{children:[l.documentId!=null?a.invoiceNo:null,l.documentId]})})]}),t.jsx(Ke,{windowSize:s,children:A("0,0[.]00",l.recipientTotalAmount)})]}),t.jsxs(Rn,{"data-testid":j("review-detail-mobile-info"),onClick:()=>Q(l.id,l.billPayInfo.stage.code),children:[t.jsxs(X,{children:[l.dueDate!=null?a.due:null," ",l.dueDate?.format(D)]}),t.jsx(Xe,{children:r!=null?Ae.includes(r.code)?t.jsx(Me,{style:{padding:"2px 5px"},title:r.value,placement:"top",children:t.jsx(q,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value})}):t.jsx(q,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value}):null})]})]}):t.jsxs(Ue,{windowSize:s,children:[l.attachments&&l.attachments.length>0?t.jsx(Le,{attachment:l.attachments[0]}):t.jsx(Ye,{children:t.jsx(Ge,{})}),t.jsxs(Fn,{"data-testid":j("review-detail-info"),onClick:()=>Q(l.id,l.billPayInfo.stage.code),children:[t.jsx(X,{style:{width:"50%"},children:t.jsxs("div",{children:[l.documentId!=null?a.invoiceNo:null," ",l.documentId]})}),t.jsxs(X,{style:{width:"25%"},children:[l.dueDate!=null?a.due:null," ",l.dueDate?.format(D)]}),t.jsx(Ke,{style:{width:"25%"},windowSize:s,children:A("0,0[.]00",l.amount)})]}),t.jsx(Xe,{children:r!=null?Ae.includes(r.code)?t.jsx(Me,{style:{padding:"2px 5px"},title:r.value,placement:"top",children:t.jsx(q,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value})}):t.jsx(q,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value}):null})]})},l.id):null})]})]}):null,t.jsxs(Cn,{children:[t.jsx(He,{children:a.pay}),t.jsx(Ze,{children:t.jsx(Be,{amount:yt,integerStyles:G.largeMedium.cssObject,decimalStyles:G.smallMedium.cssObject})}),t.jsx(He,{children:a.to}),t.jsx(Ze,{children:e.vendor?.name})]}),t.jsxs(xn,{children:[g?null:t.jsxs(t.Fragment,{children:[t.jsx(O,{isThreadAllowed:N,entityId:f,dashboardTabKey:_({type:"details",key:"withdrawFrom"}),roomId:R,companyId:m.currentTenant?.companyId??h,companyName:m.currentTenant?.companyName??h,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${z("withdrawFrom")}`},children:t.jsx(W,{label:{label:a.withdrawFrom,width:F},style:{width:"auto"},value:e.paymentDetailsSection?.withdrawFrom!=null?Rt(e.paymentDetailsSection.withdrawFrom,s):h,infoLabelStyle:{textAlign:s==="small"?"left":"right",paddingRight:p.infoLabelPaddingRight.valuePx(s),marginTop:p.infoLabelMarginTop.valuePx(s),color:S.brandColorGoldDark},additionalInfoLabel:ae})}),t.jsx(K,{})]}),t.jsx(O,{isThreadAllowed:N,entityId:f,dashboardTabKey:_({type:"details",key:"paymentType"}),roomId:R,companyId:m.currentTenant?.companyId??h,companyName:m.currentTenant?.companyName??h,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${z("paymentType")}`},children:t.jsx(W,{label:{label:a.paymentMethod,width:F},style:{width:"auto"},value:le(o?.method??""),additionalInfoLabel:xt()})}),t.jsx(K,{}),!g&&Z!=null?t.jsxs(t.Fragment,{children:[t.jsx(O,{isThreadAllowed:N,entityId:f,dashboardTabKey:_({type:"details",key:"paymentDate"}),roomId:R,companyId:m.currentTenant?.companyId??h,companyName:m.currentTenant?.companyName??h,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${z("paymentDate")}`},children:t.jsx(W,{label:{label:a.paymentDate,width:F},style:{width:"auto"},value:Z.format(D),additionalInfoLabel:`${a.estimatedArrival}${d.zeniDate(d.getNextNthWorkingDay(Z.toDate(),[0,6],o?.maxPeriod.value??0).toDateString()).format(D)} - (${ie.length>0?`${ie} `:""}${a.deliveryTimeLabel} = ${o?.maxPeriod.value??"0"} ${a.deliveryTimeUnits})`})}),t.jsx(K,{})]}):null,g?null:t.jsx(O,{isThreadAllowed:N,entityId:f,dashboardTabKey:_({type:"details",key:"paymentTo"}),roomId:R,companyId:m.currentTenant?.companyId??h,companyName:m.currentTenant?.companyName??h,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${z("paymentTo")}`},children:t.jsx(W,{label:{label:a.paymentTo,width:F},style:{width:"auto"},value:ct??"",additionalInfoLabel:ut})}),g||nt?t.jsxs(t.Fragment,{children:[t.jsx(K,{}),t.jsx(O,{isThreadAllowed:N,entityId:f,dashboardTabKey:_({type:"details",key:"recurringPaymentType"}),roomId:R,companyId:m.currentTenant?.companyId??h,companyName:m.currentTenant?.companyName??h,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${z("recurringPaymentType")}`},children:t.jsx(W,{label:{label:a.paymentType,width:F},style:{width:"auto"},value:Lt(e.isRecurring,g,e.recurringBillInstance??1,e.recurringConfig?.totalPaymentCycles??0),additionalInfoLabel:Et(s,e.isRecurring,g,e.recurringConfig)})})]}):null]}),!g&&o?.method!=null&&(o.method.includes(d.NEW_INTERNATIONAL_METHOD_SUBTEXT)||o?.fee.amount!=null&&o.fee.amount!==0)?t.jsx(mn,{children:t.jsxs(pn,{windowSize:s,children:[t.jsxs(un,{children:[t.jsx(sn,{children:a.total}),t.jsx(Ne,{style:{padding:`12px ${n.sp3}`,lineHeight:"18px"},maxWidth:"312px",title:t.jsxs(cn,{children:[t.jsxs(_e,{children:[t.jsx(re,{children:o.method.includes(d.NEW_INTERNATIONAL_METHOD_SUBTEXT)&&ee!==T.currencyCode?Ee.conversionAmountColon:Fe.invoiceAmount}),t.jsx(oe,{children:A("0,0[.]00",{amount:u.amount-L.amount,currencySymbol:L.currencySymbol})})]}),t.jsxs(_e,{children:[t.jsx(re,{children:Ee.transactionFee}),t.jsx(oe,{children:A("0,0[.]00",{amount:L.amount,currencySymbol:L.currencySymbol})})]}),t.jsx(dn,{}),t.jsxs(rn,{children:[t.jsx(re,{children:Fe.total}),t.jsx(oe,{children:A("0,0[.]00",{amount:u.amount,currencyCode:u.currencyCode,currencySymbol:u.currencySymbol})})]})]}),placement:"top-end",children:t.jsx(on,{})})]}),t.jsx(yn,{children:t.jsx(Be,{amount:d.toAmount(u.amount,u.currencyCode,u.currencySymbol),integerStyles:G.h6Medium.cssObject,decimalStyles:G.standardMedium.cssObject})})]})}):null]}),t.jsx(Ot,{cancelBtn:{label:k&&!b?a.paymentOutsideZeni.markAsPaid:a.editBill,onClick:k&&!b?$e:ne,style:{width:ze(!1,k,b,V,s)}},primaryBtn:{label:Oe(b,V,e.isBillMarkedForRetry),isLoading:E?.fetchState==="In-Progress"||J?.fetchState==="In-Progress",onClick:b?$e:()=>{bt&&ae!=null?Y(!0):Te()},style:{width:ze(!0,k,b,V,s)}},rightSideComponent:k&&!b&&E.fetchState!=="In-Progress"?t.jsx(_n,{windowSize:s,children:t.jsx(Ne,{style:{color:S.heroDark,padding:`2px ${n.sp2}`},display:"flex",title:an,placement:"top",children:t.jsx(Un,{onClick:ne,"data-testid":j("review-detail-edit-bill-button"),children:t.jsx(Wn,{})})})}):null,style:{minHeight:e.paymentDetailsSection?.paymentType?.method!=null&&e.paymentDetailsSection.paymentType.method.includes(d.NEW_INTERNATIONAL_METHOD_SUBTEXT)?127:62,...e.paymentDetailsSection?.paymentType?.method!=null&&e.paymentDetailsSection.paymentType.method.includes(d.NEW_INTERNATIONAL_METHOD_SUBTEXT)&&{padding:n.sp3,rowGap:n.sp3}},children:e.paymentDetailsSection?.paymentType?.method!=null&&e.paymentDetailsSection.paymentType.method.includes(d.NEW_INTERNATIONAL_METHOD_SUBTEXT)?t.jsxs(An,{children:[a.internationalText1,t.jsx(Mn,{href:"https://www.nium.com/legal/end-customer-terms",target:"_Blank",rel:"noopener noreferrer",children:a.internationalTerms}),a.internationalText2]}):null})]})},Oe=(e,w,x)=>e?a.paymentOutsideZeni.markAsPaid:x===!0?a.retryPayment:w?a.sendForApproval:a.scheduleBill,ze=(e,w,x,M,C)=>x?128:w&&!e&&C==="small"?"auto":M?165:p.footerButtonWidth.value(C),on=i(qt)`
|
|
1
|
+
import{X as Tt,Y as vt,C as y,cF as jt,B as St,cG as Ct,cH as Dt,j as t,cI as It,cJ as le,cK as Pt,l as d,cL as kt,cM as At,$ as j,cN as Mt,a0 as A,cO as Bt,cP as Nt,cQ as Ae,cR as Me,cS as Be,v as X,cT as O,cU as z,cV as _,d as S,cW as Rt,cX as Ft,cY as Lt,cZ as Et,bx as Ne,o as n,a4 as Ot,s as c,p as zt,bt as _t,J as Wt,g as Ut,c_ as Yt,bL as Zt,m as se,M as de,c$ as Ht,d0 as Vt,aC as Xt,k as Kt,ao as Gt,Z as qe,b5 as qt,w as Je,aP as Jt,d1 as Qt}from"./index-DYVNUtTS.js";import{b as U,n as i}from"./vendor-CnQcJ2Lu.js";import{t as en,o as tn}from"./LowBalancePopup-DHk6xd2B-V5eEOh0a.js";import{S as W}from"./LabeledText-qSjyNZO1-BMO1teu9.js";import"./mui-C5LQ0bMa.js";import"./analytics-CBL_L82S.js";import"./routing-Cpaypegg.js";import"./sentry-HDxG13yk.js";import"./redux-ByjIRbhZ.js";import"./liveblocks-sSQ9JElv.js";import"./crypto-BURQLTgV.js";const Qe=["small","medium-compact","medium-regular"],p={largeLabelWidth:new y(150,215,215),infoMinWidth:new y(0,0,0,142,142),infoMarginRight:new y(0,0,0,c[2],c[2]),footerButtonWidth:new y(120,165),iconContainerMarginTop:new y(6,c[1]),navBarContainerPaddingTop:new y(10,c[3]),sectionTitleMarginLeft:new y(c[3],c[0]),reviewContainerMarginLeft:new y(c[3],c[6]),reviewContainerMarginRight:new y(c[3],c[8]),footerRightIconMarginRight:new y(c[0],c[0],c[7]),infoLabelPaddingRight:new y(c[0],c[3]),infoLabelMarginTop:new y(c[1],c[0])},nn={sectionTitle:new Wt("h6Medium","h5Medium")},{dateFormat:Re,common:{currency:v,labels:Fe,edit:an,strings:{empty:h}},spendManagement:{billPay:ln}}=St.getLocalizedStrings(),{billDetails:a,paymentDetails:Le}=ln,Ee=({attachment:e})=>{const[w,x]=U.useState(!1),M=()=>{x(!1)},C=e.fileId?.length===0;return t.jsxs(Bn,{isDisabled:e.fileId?.length===0,"data-testid":j("attachment-tag",e.fileName),onClick:()=>C===!1?x(!0):null,children:[w&&e?.fileDownloadUrl!=null?t.jsx(Ht,{title:e.fileName,file:e,onCrossClick:()=>M(),setShowFullScreenView:x}):null,t.jsx(Nn,{children:t.jsx(Vt,{contentType:e.contentType})})]})},ti=({billDetails:e,billpayApprovalView:w,isBillPayCommentingEnabled:x,currentTenant:M,isInternationalPaymentShaVsOurEnabled:C,isLocalCurrencyEnabled:et,style:tt,analytics:$,isRecurringBillsFeatureEnabled:nt,isApprovalRequiredForMarkAsPaid:it,isDetectInsufficientFundsEnabled:at,billId:f,onClickEdit:ce,discardBillDetailsFromLocalStore:me,saveBillDetails:pe,discardOutsideZeniPaymentData:lt,updateBillDetailSaveBillCode:ue,redirectToBillsScreen:ye,onAttachmentClick:J,retryPayment:ot})=>{const s=Tt(),m=vt(),B={application:"dashboard",companyId:m.currentTenant?.companyId,tab:"bill",entityId:f},N=x&&f!=null,R=`dashboard_${m.currentTenant?.companyId}`,F=p.largeLabelWidth.value(s),L=e.saveStatus,Q=e.zeniAssistRetryStatus,ee=e.vendor?.vendorCurrencyCode,o=jt(C,et,e.billPayConfigList.filter(l=>l.method.includes(e.paymentDetailsSection?.withdrawFrom?.accType??"depositAccount")),e.paymentDetailsSection?.internationalTransferFeeBearerPaymentMethod,e.paymentDetailsSection?.paymentType,ee),D=Re.visual.MMMDCommaYYYYformat,he={amount:e.recipientTotalAmount.amount/(e.paymentDetailsSection?.conversionRate??1)*100/100,currencyCode:v.currencyCode,currencySymbol:v.currencySymbol},u={amount:o?.method.includes("international")===!0?Ct(he,o):e.recipientTotalAmount.amount+(o?.fee.amount??0),currencyCode:v.currencyCode,currencySymbol:v.currencySymbol},E={amount:o?.method.includes("international")===!0?Dt(he,o):o?.fee.amount??0,currencyCode:v.currencyCode,currencySymbol:v.currencySymbol},[rt,ge]=U.useState(!1),[st,xe]=U.useState(!1),fe=()=>ge(!1),dt=()=>{$.trackBillPayMagicLinkPreviewEmail("review_bill"),ge(!0)},ct=e.isCollectToAccountInfoFromVendorContact?t.jsxs(t.Fragment,{children:[`${a.magicLink.collectFrom} ${e.toAccountVendorEmail}`,t.jsx(kn,{size:s,children:t.jsx(Pn,{})})]}):It(e.paymentDetailsSection?.paymentTo);U.useEffect(()=>{(L?.fetchState==="Completed"||Q?.fetchState==="Completed")&&(me(),ue(),ye())},[L,Q,ye,me,ue]);const T=e.billPayInfo?.stage,P=e.billPayInfo?.billStatus,Y=e.billPayInfo?.billPaymentStatus,mt=e.billPayInfo?.billPaymentRefundStatus,te=T?.code==="paid"?T:P?.code=="approved"&&Y?.code?Y:P,pt=e.billPayInfo?.isRefundInitiated===!0?mt:P?.code=="approved"&&Y?.code?Y:P,ne=()=>{ce()},be=()=>{ce()},Z=e.paymentDetailsSection?.paymentDate,ie=le(o?.method??""),we=ie.replace("Same Day",""),ut=e.isCollectToAccountInfoFromVendorContact?t.jsx(Pt,{paymentTypeLabel:we,onClick:dt}):a.addedByZeni,H=w.allApprovalRules.length>0,yt=d.toAmount(o?.method!=null&&(o.method.includes(d.NEW_INTERNATIONAL_METHOD_SUBTEXT)||o?.fee.amount!=null&&o.fee.amount!==0)?u.amount-E.amount:u.amount,o?.fee.currencyCode??d.defaultVendorCurrency.currencyCode,o?.fee.currencySymbol??d.defaultVendorCurrency.currencySymbol),g=d.isPaymentMethodOutsideZeni(e.paymentDetailsSection?.paymentType?.method),ht=l=>{$.trackBillPayMarkAsPaidSubmit(l.paymentMode??"other",T?.code??"draft",te?.code??""),pe(!0,l)},$e=()=>{xe(!0),$.trackBillPayMarkAsPaid(T?.code??"draft",te?.code??"")},gt=()=>{lt(),xe(!1)},k=g&&(T?.code!=null?T.code==="draft"||P?.code==="approved":!0),b=k&&!it,Te=Oe(b,H,e.isBillMarkedForRetry),xt=()=>g?b?void 0:a.paymentOutsideZeni.reviewInfo:o?.method!=null&&o.method.includes(d.NEW_INTERNATIONAL_METHOD_SUBTEXT)&&e.paymentDetailsSection?.internationalTransferFeeBearerPaymentMethod!=null&&C&&ee===v.currencyCode?Ft(e.paymentDetailsSection.internationalTransferFeeBearerPaymentMethod):void 0,ae=at&&e.paymentDetailsSection!=null?kt(u,e.paymentDetailsSection.withdrawFrom,e.paymentDetailsSection.paymentDate):void 0,ft=()=>{const l=e.paymentDetailsSection?.paymentDate,r=e.isCollectToAccountInfoFromVendorContact,I=e.recurringConfig,wt=e.recipientTotalAmount;if(e.isInvoiceDateAutoUpdated===!0&&$.trackBillPayAutoDateChange(f??"new_bill"),o?.method!=null&&l!=null){const $t=g?a.paymentOutsideZeni.offline:le(o.method);if($.trackBillPaySendForApproval($t,l.format(Re.analytics.MMMDashDDDashYYYYFormat),r,e.isRecurring,f,e.paymentDetailsSection?.internationalTransferFeeBearerPaymentMethod,{startDate:d.zeniDate(I?.startDate?.toString()??"").format(D),endDate:d.zeniDate(I?.endDate?.toString()??"").format(D),frequency:I?.frequency??"monthly",totalAmount:wt.amount,totalPaymentCycles:I?.totalPaymentCycles??0,isApprovalRequired:I?.isApprovalRequired??!1,updateCurrentBill:e.recurringConfig?.id!=null?I?.updateRecurringBills==="current":void 0,updateFutureRecurringBills:e.recurringConfig?.id!=null?I?.updateRecurringBills==="all":void 0}),ae!=null){const Se=T?.code??"draft",Ce=P?.code??"",De=e.isRecurring?["Recurring"]:["One-Time"],Ie=e.invoiceNumber??"",Pe=Qt(m.loggedInUser),ke=e.paymentDetailsSection?.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account";Te===a.scheduleBill?$.trackLowBalanceAccountSchedule(Se,Ce,De,Ie,Pe,ke):Te===a.sendForApproval&&$.trackLowBalanceAccountSentForApproval(Se,Ce,De,Ie,Pe,ke)}}},ve=()=>{je===!0&&V(!1),e.isBillMarkedForRetry===!0?(ot(),$.trackRetryConfirmClick(te?.code??"",T?.code??"",pt?.description??"",e.isRecurring?["Recurring"]:["One-Time"],e.invoiceNumber??"")):e.vendor!=null&&(ft(),pe(!1,{}))},bt=d.checkIfCreatorIsApprover(u.amount,w.allApprovalRules,m.loggedInUser),[je,V]=U.useState(!1);return t.jsxs(hn,{children:[st?t.jsx(en,{onCancel:gt,onProceedForMarkAsPaid:ht,saveDetailsFetchState:L?.fetchState,paymentData:e.outsideZeniPaymentInfo}):null,je?t.jsx(tn,{withdrawFrom:e.paymentDetailsSection?.withdrawFrom,paymentDate:e.paymentDetailsSection?.paymentDate,onOkClick:ve,onCancelClick:()=>{V(!1),ne()},onClickAway:()=>{V(!1)}}):null,t.jsx(At,{anchor:"right",open:rt,onClose:fe,transitionDuration:250,"data-testid":j("vendor-email-preview-drawer"),children:t.jsx(Mt,{companyName:Bt(M.company?.companyInfo),vendor:e.vendor?.name,paymentDate:Z?.format(D)??"",paymentType:we,amount:A("0,0[.]00",u),isInvoiceAttached:!!e.file,onClose:fe})}),t.jsxs(gn,{windowSize:s,style:tt,children:[s==="small"?t.jsxs(In,{windowSize:s,children:[t.jsx(He,{onClick:be,"data-testid":j("review-detail-nav-bar-small-back")}),t.jsx(We,{windowSize:s,children:a.oneLastLook})]}):t.jsx(Dn,{"data-testid":j("review-details-nav-bar-back"),children:t.jsx(He,{onClick:be})}),s!=="small"?t.jsx(fn,{children:t.jsx(We,{windowSize:s,children:a.oneLastLook})}):null,e.duplicateBillTransactions.length>0?t.jsxs(bn,{children:[t.jsxs(wn,{children:[t.jsx(zn,{}),t.jsxs($n,{children:[t.jsx(vn,{children:a.duplicateBillPayWarning}),t.jsxs(Tn,{children:[a.duplicateBillPayWarningSubHeading,t.jsxs("span",{"data-testid":j("review-detail-attachment-button"),onClick:()=>J(e.duplicateBillTransactions[0].id,e.duplicateBillTransactions[0].billPayInfo.stage.code),style:{textDecoration:"underline",cursor:"pointer"},children:[a.viewBill,e.duplicateBillTransactions[0].documentId]})]})]})]}),t.jsxs(Ln,{children:[t.jsx(On,{children:a.duplicateInvoiceFound}),e.duplicateBillTransactions.map(l=>{const r=Nt(l);return l!=null?t.jsx(En,{children:Qe.includes(s)?t.jsxs(Ue,{windowSize:s,children:[t.jsxs(jn,{children:[t.jsxs(Sn,{children:[l.attachments&&l.attachments.length>0?t.jsx(Ee,{attachment:l.attachments[0]}):t.jsx(Ve,{children:t.jsx(Xe,{})}),t.jsx(G,{children:t.jsxs(t.Fragment,{children:[l.documentId!=null?a.invoiceNo:null,l.documentId]})})]}),t.jsx(Ke,{windowSize:s,children:A("0,0[.]00",l.recipientTotalAmount)})]}),t.jsxs(Rn,{"data-testid":j("review-detail-mobile-info"),onClick:()=>J(l.id,l.billPayInfo.stage.code),children:[t.jsxs(G,{children:[l.dueDate!=null?a.due:null," ",l.dueDate?.format(D)]}),t.jsx(Ge,{children:r!=null?Ae.includes(r.code)?t.jsx(Me,{style:{padding:"2px 5px"},title:r.value,placement:"top",children:t.jsx(q,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value})}):t.jsx(q,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value}):null})]})]}):t.jsxs(Ue,{windowSize:s,children:[l.attachments&&l.attachments.length>0?t.jsx(Ee,{attachment:l.attachments[0]}):t.jsx(Ve,{children:t.jsx(Xe,{})}),t.jsxs(Fn,{"data-testid":j("review-detail-info"),onClick:()=>J(l.id,l.billPayInfo.stage.code),children:[t.jsx(G,{style:{width:"50%"},children:t.jsxs("div",{children:[l.documentId!=null?a.invoiceNo:null," ",l.documentId]})}),t.jsxs(G,{style:{width:"25%"},children:[l.dueDate!=null?a.due:null," ",l.dueDate?.format(D)]}),t.jsx(Ke,{style:{width:"25%"},windowSize:s,children:A("0,0[.]00",l.amount)})]}),t.jsx(Ge,{children:r!=null?Ae.includes(r.code)?t.jsx(Me,{style:{padding:"2px 5px"},title:r.value,placement:"top",children:t.jsx(q,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value})}):t.jsx(q,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value}):null})]})},l.id):null})]})]}):null,t.jsxs(Cn,{children:[t.jsx(Ye,{children:a.pay}),t.jsx(Ze,{children:t.jsx(Be,{amount:yt,integerStyles:X.largeMedium.cssObject,decimalStyles:X.smallMedium.cssObject})}),t.jsx(Ye,{children:a.to}),t.jsx(Ze,{children:e.vendor?.name})]}),t.jsxs(xn,{children:[g?null:t.jsxs(t.Fragment,{children:[t.jsx(O,{isThreadAllowed:N,entityId:f,dashboardTabKey:_({type:"details",key:"withdrawFrom"}),roomId:R,companyId:m.currentTenant?.companyId??h,companyName:m.currentTenant?.companyName??h,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${z("withdrawFrom")}`},children:t.jsx(W,{label:{label:a.withdrawFrom,width:F},style:{width:"auto"},value:e.paymentDetailsSection?.withdrawFrom!=null?Rt(e.paymentDetailsSection.withdrawFrom,s):h,infoLabelStyle:{textAlign:s==="small"?"left":"right",paddingRight:p.infoLabelPaddingRight.valuePx(s),marginTop:p.infoLabelMarginTop.valuePx(s),color:S.brandColorGoldDark},additionalInfoLabel:ae})}),t.jsx(K,{})]}),t.jsx(O,{isThreadAllowed:N,entityId:f,dashboardTabKey:_({type:"details",key:"paymentType"}),roomId:R,companyId:m.currentTenant?.companyId??h,companyName:m.currentTenant?.companyName??h,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${z("paymentType")}`},children:t.jsx(W,{label:{label:a.paymentMethod,width:F},style:{width:"auto"},value:le(o?.method??""),additionalInfoLabel:xt()})}),t.jsx(K,{}),!g&&Z!=null?t.jsxs(t.Fragment,{children:[t.jsx(O,{isThreadAllowed:N,entityId:f,dashboardTabKey:_({type:"details",key:"paymentDate"}),roomId:R,companyId:m.currentTenant?.companyId??h,companyName:m.currentTenant?.companyName??h,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${z("paymentDate")}`},children:t.jsx(W,{label:{label:a.paymentDate,width:F},style:{width:"auto"},value:Z.format(D),additionalInfoLabel:`${a.estimatedArrival}${d.zeniDate(d.getNextNthWorkingDay(Z.toDate(),[0,6],o?.maxPeriod.value??0).toDateString()).format(D)} - (${ie.length>0?`${ie} `:""}${a.deliveryTimeLabel} = ${o?.maxPeriod.value??"0"} ${a.deliveryTimeUnits})`})}),t.jsx(K,{})]}):null,g?null:t.jsx(O,{isThreadAllowed:N,entityId:f,dashboardTabKey:_({type:"details",key:"paymentTo"}),roomId:R,companyId:m.currentTenant?.companyId??h,companyName:m.currentTenant?.companyName??h,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${z("paymentTo")}`},children:t.jsx(W,{label:{label:a.paymentTo,width:F},style:{width:"auto"},value:ct??"",additionalInfoLabel:ut})}),g||nt?t.jsxs(t.Fragment,{children:[t.jsx(K,{}),t.jsx(O,{isThreadAllowed:N,entityId:f,dashboardTabKey:_({type:"details",key:"recurringPaymentType"}),roomId:R,companyId:m.currentTenant?.companyId??h,companyName:m.currentTenant?.companyName??h,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${z("recurringPaymentType")}`},children:t.jsx(W,{label:{label:a.paymentType,width:F},style:{width:"auto"},value:Et(e.isRecurring,g,e.recurringBillInstance??1,e.recurringConfig?.totalPaymentCycles??0),additionalInfoLabel:Lt(s,e.isRecurring,g,e.recurringConfig)})})]}):null]}),!g&&o?.method!=null&&(o.method.includes(d.NEW_INTERNATIONAL_METHOD_SUBTEXT)||o?.fee.amount!=null&&o.fee.amount!==0)?t.jsx(mn,{children:t.jsxs(pn,{windowSize:s,children:[t.jsxs(un,{children:[t.jsx(sn,{children:a.total}),t.jsx(Ne,{style:{padding:`12px ${n.sp3}`,lineHeight:"18px"},maxWidth:"312px",title:t.jsxs(cn,{children:[t.jsxs(_e,{children:[t.jsx(re,{children:o.method.includes(d.NEW_INTERNATIONAL_METHOD_SUBTEXT)&&ee!==v.currencyCode?Le.conversionAmountColon:Fe.invoiceAmount}),t.jsx(oe,{children:A("0,0[.]00",{amount:u.amount-E.amount,currencySymbol:E.currencySymbol})})]}),t.jsxs(_e,{children:[t.jsx(re,{children:Le.transactionFee}),t.jsx(oe,{children:A("0,0[.]00",{amount:E.amount,currencySymbol:E.currencySymbol})})]}),t.jsx(dn,{}),t.jsxs(rn,{children:[t.jsx(re,{children:Fe.total}),t.jsx(oe,{children:A("0,0[.]00",{amount:u.amount,currencyCode:u.currencyCode,currencySymbol:u.currencySymbol})})]})]}),placement:"top-end",children:t.jsx(on,{})})]}),t.jsx(yn,{children:t.jsx(Be,{amount:d.toAmount(u.amount,u.currencyCode,u.currencySymbol),integerStyles:X.h6Medium.cssObject,decimalStyles:X.standardMedium.cssObject})})]})}):null]}),t.jsx(Ot,{cancelBtn:{label:k&&!b?a.paymentOutsideZeni.markAsPaid:a.editBill,onClick:k&&!b?$e:ne,style:{width:ze(!1,k,b,H,s)}},primaryBtn:{label:Oe(b,H,e.isBillMarkedForRetry),isLoading:L?.fetchState==="In-Progress"||Q?.fetchState==="In-Progress",onClick:b?$e:()=>{bt&&ae!=null?V(!0):ve()},style:{width:ze(!0,k,b,H,s)}},rightSideComponent:k&&!b&&L.fetchState!=="In-Progress"?t.jsx(_n,{windowSize:s,children:t.jsx(Ne,{style:{color:S.heroDark,padding:`2px ${n.sp2}`},display:"flex",title:an,placement:"top",children:t.jsx(Un,{onClick:ne,"data-testid":j("review-detail-edit-bill-button"),children:t.jsx(Wn,{})})})}):null,style:{minHeight:e.paymentDetailsSection?.paymentType?.method!=null&&e.paymentDetailsSection.paymentType.method.includes(d.NEW_INTERNATIONAL_METHOD_SUBTEXT)?127:62,...e.paymentDetailsSection?.paymentType?.method!=null&&e.paymentDetailsSection.paymentType.method.includes(d.NEW_INTERNATIONAL_METHOD_SUBTEXT)&&{padding:n.sp3,rowGap:n.sp3}},children:e.paymentDetailsSection?.paymentType?.method!=null&&e.paymentDetailsSection.paymentType.method.includes(d.NEW_INTERNATIONAL_METHOD_SUBTEXT)?t.jsxs(An,{children:[a.internationalText1,t.jsx(Mn,{href:"https://www.nium.com/legal/end-customer-terms",target:"_Blank",rel:"noopener noreferrer",children:a.internationalTerms}),a.internationalText2]}):null})]})},Oe=(e,w,x)=>e?a.paymentOutsideZeni.markAsPaid:x===!0?a.retryPayment:w?a.sendForApproval:a.scheduleBill,ze=(e,w,x,M,C)=>x?128:w&&!e&&C==="small"?"auto":M?165:p.footerButtonWidth.value(C),on=i(qt)`
|
|
2
2
|
width: ${n.sp3};
|
|
3
3
|
height: ${n.sp3};
|
|
4
4
|
color: ${e=>e.theme.colors.hero};
|
|
5
5
|
&:hover {
|
|
6
6
|
color: ${e=>e.theme.colors.primary};
|
|
7
7
|
}
|
|
8
|
-
`,_e=i(
|
|
8
|
+
`,_e=i(Je)`
|
|
9
9
|
display: flex;
|
|
10
10
|
justify-content: space-between;
|
|
11
11
|
padding-bottom: ${n.sp1};
|
|
@@ -13,7 +13,7 @@ import{X as vt,w as Tt,C as y,cB as jt,M as St,cC as Ct,cD as Dt,j as t,cE as It
|
|
|
13
13
|
color: ${e=>e.theme.colors.brandColorPearl};
|
|
14
14
|
`,re=i.div`
|
|
15
15
|
color: ${e=>e.theme.colors.hero};
|
|
16
|
-
`,rn=i(
|
|
16
|
+
`,rn=i(Je)`
|
|
17
17
|
display: flex;
|
|
18
18
|
justify-content: space-between;
|
|
19
19
|
padding-top: ${n.sp1};
|
|
@@ -99,15 +99,15 @@ import{X as vt,w as Tt,C as y,cB as jt,M as St,cC as Ct,cD as Dt,j as t,cE as It
|
|
|
99
99
|
display: flex;
|
|
100
100
|
flex-direction: column;
|
|
101
101
|
padding-left: ${n.sp2};
|
|
102
|
-
`,
|
|
102
|
+
`,Tn=i(se)`
|
|
103
103
|
padding-bottom: ${n.sp3};
|
|
104
104
|
color: ${S.brandColorGoldDark};
|
|
105
|
-
`,
|
|
105
|
+
`,vn=i(Zt)`
|
|
106
106
|
padding-top: ${n.sp3};
|
|
107
107
|
color: ${S.brandColorGoldDark};
|
|
108
108
|
`,Ue=i.div`
|
|
109
109
|
display: flex;
|
|
110
|
-
flex-direction: ${e=>
|
|
110
|
+
flex-direction: ${e=>Qe.includes(e.windowSize)?"column":"row"};
|
|
111
111
|
width: 100%;
|
|
112
112
|
`,jn=i.div`
|
|
113
113
|
display: flex;
|
|
@@ -121,15 +121,15 @@ import{X as vt,w as Tt,C as y,cB as jt,M as St,cC as Ct,cD as Dt,j as t,cE as It
|
|
|
121
121
|
`,Cn=i.div`
|
|
122
122
|
display: flex;
|
|
123
123
|
padding-top: ${n.sp3};
|
|
124
|
-
`,
|
|
124
|
+
`,Ye=i(Kt)`
|
|
125
125
|
display: flex;
|
|
126
126
|
color: ${e=>e.theme.colors.hero};
|
|
127
127
|
margin-right: ${n.sp1};
|
|
128
|
-
`,Ze=i(
|
|
128
|
+
`,Ze=i(Gt)`
|
|
129
129
|
display: flex;
|
|
130
130
|
color: ${e=>e.theme.colors.primary};
|
|
131
131
|
margin-right: ${n.sp1};
|
|
132
|
-
`,
|
|
132
|
+
`,He=i(_t)`
|
|
133
133
|
cursor: pointer;
|
|
134
134
|
color: ${e=>e.theme.colors.hero};
|
|
135
135
|
width: 20px;
|
|
@@ -193,17 +193,17 @@ import{X as vt,w as Tt,C as y,cB as jt,M as St,cC as Ct,cD as Dt,j as t,cE as It
|
|
|
193
193
|
width: ${n.sp4};
|
|
194
194
|
height: ${n.sp4};
|
|
195
195
|
display: flex;
|
|
196
|
-
`,
|
|
196
|
+
`,Ve=i.div`
|
|
197
197
|
cursor: default;
|
|
198
198
|
display: flex;
|
|
199
199
|
align-items: center;
|
|
200
200
|
margin-right: ${n.sp1};
|
|
201
|
-
`,
|
|
201
|
+
`,Xe=i(Xt)`
|
|
202
202
|
cursor: pointer;
|
|
203
203
|
width: ${n.sp4};
|
|
204
204
|
height: ${n.sp4};
|
|
205
205
|
color: ${e=>e.theme.colors.hero};
|
|
206
|
-
`,
|
|
206
|
+
`,G=i(se)`
|
|
207
207
|
display: flex;
|
|
208
208
|
color: ${e=>e.theme.colors.hero};
|
|
209
209
|
align-items: center;
|
|
@@ -221,7 +221,7 @@ import{X as vt,w as Tt,C as y,cB as jt,M as St,cC as Ct,cD as Dt,j as t,cE as It
|
|
|
221
221
|
cursor: pointer;
|
|
222
222
|
column-gap: ${n.sp1};
|
|
223
223
|
margin-left: ${n.sp5};
|
|
224
|
-
`,
|
|
224
|
+
`,Ge=i.div`
|
|
225
225
|
width: 120px;
|
|
226
226
|
display: flex;
|
|
227
227
|
justify-content: flex-end;
|
|
@@ -247,10 +247,10 @@ import{X as vt,w as Tt,C as y,cB as jt,M as St,cC as Ct,cD as Dt,j as t,cE as It
|
|
|
247
247
|
padding: 1px 6px;
|
|
248
248
|
border: ${e=>`1px solid ${e.borderColor}`};
|
|
249
249
|
border-radius: ${n.sp1};
|
|
250
|
-
`,
|
|
250
|
+
`,Ln=i.div`
|
|
251
251
|
display: flex;
|
|
252
252
|
flex-direction: column;
|
|
253
|
-
`,
|
|
253
|
+
`,En=i.div`
|
|
254
254
|
display: flex;
|
|
255
255
|
width: 100%;
|
|
256
256
|
flex-flow: column;
|
|
@@ -260,7 +260,7 @@ import{X as vt,w as Tt,C as y,cB as jt,M as St,cC as Ct,cD as Dt,j as t,cE as It
|
|
|
260
260
|
`,On=i(de)`
|
|
261
261
|
margin-top: ${n.sp3};
|
|
262
262
|
color: ${S.alert};
|
|
263
|
-
`,zn=i(
|
|
263
|
+
`,zn=i(Yt)`
|
|
264
264
|
min-width: ${n.sp4};
|
|
265
265
|
height: ${n.sp4};
|
|
266
266
|
width: ${n.sp4};
|
|
@@ -271,7 +271,7 @@ import{X as vt,w as Tt,C as y,cB as jt,M as St,cC as Ct,cD as Dt,j as t,cE as It
|
|
|
271
271
|
display: flex;
|
|
272
272
|
justify-content: flex-end;
|
|
273
273
|
margin-right: ${e=>p.footerRightIconMarginRight.valuePx(e.windowSize)};
|
|
274
|
-
`,Wn=i(
|
|
274
|
+
`,Wn=i(Jt)`
|
|
275
275
|
cursor: pointer;
|
|
276
276
|
color: ${e=>e.theme.colors.hero};
|
|
277
277
|
width: ${n.sp4};
|
package/dist/assets/{ReviewOverlay-CPN-RHG--BufZJNs3.js → ReviewOverlay-Dmrea9EK-DOxs4FI1.js}
RENAMED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import{X as B,j as e
|
|
1
|
+
import{X as B,j as e,$ as m,o as r,a4 as L,C as d,a3 as M,J as C,g as W,d as s,m as y,c3 as R,h as I,w as j,aB as D,s as n,eh as G,az as J,jn as X,jo as A}from"./index-DYVNUtTS.js";import{n as t}from"./vendor-CnQcJ2Lu.js";const a={containerMarginTop:new d(0,n[2]),containerMarginLeft:new d(n[3],n[8]),containerMarginRight:new d(n[3],n[8]),subTitleMarginBottom:new d(n[2],n[2]),titleMarginBotom:new d(n[0],n[2]),titleMarginRight:new d(n[0],n[3]),navBarHeight:new d(62,62,62),navBarPaddingLeft:new d(n[3],n[3],n[8]),navBarPaddingRight:new d(n[3],n[3],n[8])},F={title:new C("h6Regular","h5Regular")},mi=({title:i,description:p,reviewItems:S,showFooter:b,footerProps:{primaryButton:z,cancelButton:T,hideCancel:E},onCloseOverlay:k,onCloseReviewItem:P})=>{const l=B();return e.jsxs(H,{children:[e.jsx(V,{windowSize:l,children:e.jsx(Y,{children:e.jsx(Z,{windowSize:l,children:e.jsx(ii,{children:e.jsx(ei,{onClick:k,"data-testid":m("review-overlay-close",i)})})})})}),e.jsxs(O,{windowSize:l,children:[e.jsxs(_,{windowSize:l,children:[e.jsx(K,{children:e.jsx(N,{windowSize:l,children:i})}),e.jsx(Q,{isError:p.isError,windowSize:l,children:p.content})]}),e.jsx(U,{windowSize:l,children:S.map(o=>{const h=o.reviewStatus.code==="error",c=o.reviewStatus.code==="warning"||o.reviewStatus.code==="low-balance";return e.jsxs(ri,{isLoading:!1,isActive:!0,isWarning:c,isError:h,children:[c?e.jsx(ci,{onClick:()=>P(o.id),"data-testid":m("review-close",o.id)}):null,e.jsxs(ti,{children:[e.jsxs(ni,{children:[e.jsx(di,{children:q(o)}),e.jsxs(oi,{children:[e.jsxs(x,{children:[e.jsx(u,{style:{marginLeft:r.sp2},isWarning:c,isError:h,children:o.leftSideText.title}),e.jsx(u,{isWarning:c,isError:h,children:o.rightSideText.title})]}),e.jsxs(x,{children:[e.jsx(si,{style:{marginLeft:r.sp2},children:o.leftSideText.subTitle}),l!=="small"?e.jsxs(w,{windowSize:l,children:[e.jsx(g,{isError:h,isWarning:c,children:e.jsxs(e.Fragment,{children:[o.rightSideText.showThunderIcon===!0?e.jsx(f,{children:e.jsx($,{})}):null,o.rightSideText.subTitle]})}),e.jsx(g,{isWarning:!0,isError:!1,children:o.rightSideText.additonalInfo})]}):null]})]})]}),l==="small"?e.jsxs(w,{windowSize:l,children:[e.jsx(g,{style:{marginLeft:r.sp5,marginTop:r.sp0},isError:h,isWarning:c,children:e.jsxs(e.Fragment,{children:[o.rightSideText.showThunderIcon===!0?e.jsx(f,{children:e.jsx($,{})}):null,o.rightSideText.subTitle]})}),e.jsx(g,{style:{marginLeft:r.sp5,marginTop:r.sp0},isWarning:c,isError:h,children:o.rightSideText.additonalInfo})]}):null]})]},o.id)})})]}),b?e.jsx(L,{primaryBtn:z,cancelBtn:T,showCancel:!E}):null]})},q=i=>i.reviewStatus.isLoading?e.jsx(I,{size:"Small",style:{display:"flex",width:r.sp4,height:r.sp4,alignItems:"center",justifyContent:"center"},start:!0}):i.reviewStatus.code==="error"?e.jsx(v,{isError:!0}):i.reviewStatus.code==="warning"?e.jsx(v,{isError:!1}):i.reviewStatus.code==="valid"?e.jsx(li,{}):i.reviewStatus.code==="low-balance"?e.jsx(hi,{}):e.jsx(ai,{}),H=t.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
background-color: ${i=>i.theme.colors.grey4};
|
|
5
|
-
`,
|
|
5
|
+
`,O=t.div`
|
|
6
6
|
min-height: 100vh;
|
|
7
7
|
display: flex;
|
|
8
8
|
flex-direction: column;
|
|
9
9
|
margin-top: ${i=>a.containerMarginTop.valuePx(i.windowSize)};
|
|
10
10
|
margin-bottom: ${r.sp8};
|
|
11
|
-
`,
|
|
11
|
+
`,_=t.div`
|
|
12
12
|
position: sticky;
|
|
13
13
|
top: ${r.sp0};
|
|
14
14
|
background-color: ${i=>i.theme.colors.grey4};
|
|
15
15
|
z-index: 1;
|
|
16
16
|
padding-left: ${i=>a.containerMarginLeft.valuePx(i.windowSize)};
|
|
17
17
|
padding-right: ${i=>a.containerMarginRight.valuePx(i.windowSize)};
|
|
18
|
-
`,
|
|
18
|
+
`,K=t.div`
|
|
19
19
|
display: flex;
|
|
20
20
|
align-items: center;
|
|
21
|
-
`,
|
|
22
|
-
${i=>`${
|
|
21
|
+
`,N=t(W)`
|
|
22
|
+
${i=>`${F.title.style(i.windowSize)}`};
|
|
23
23
|
color: ${i=>i.theme.colors.primary};
|
|
24
24
|
margin-top: ${r.sp2};
|
|
25
25
|
margin-bottom: ${i=>a.titleMarginBotom.valuePx(i.windowSize)};
|
|
26
26
|
margin-right: ${i=>a.titleMarginRight.valuePx(i.windowSize)};
|
|
27
|
-
`,
|
|
27
|
+
`,Q=t(y)`
|
|
28
28
|
margin-bottom: ${i=>a.subTitleMarginBottom.valuePx(i.windowSize)};
|
|
29
29
|
color: ${i=>i.isError?s.important:i.theme.colors.hero};
|
|
30
30
|
`,U=t.div`
|
|
@@ -88,7 +88,7 @@ import{X as B,j as e,_ as x,o as r,a4 as L,C as d,a3 as M,Q as C,h as W,g as s,e
|
|
|
88
88
|
flex-direction: column;
|
|
89
89
|
width: 100%;
|
|
90
90
|
align-items: center;
|
|
91
|
-
`,
|
|
91
|
+
`,x=t.div`
|
|
92
92
|
display: flex;
|
|
93
93
|
width: 100%;
|
|
94
94
|
justify-content: space-between;
|
|
@@ -96,7 +96,7 @@ import{X as B,j as e,_ as x,o as r,a4 as L,C as d,a3 as M,Q as C,h as W,g as s,e
|
|
|
96
96
|
display: flex;
|
|
97
97
|
flex-direction: column;
|
|
98
98
|
align-items: ${i=>i.windowSize==="small"?"self-start":"self-end"};
|
|
99
|
-
`,u=t(
|
|
99
|
+
`,u=t(y)`
|
|
100
100
|
color: ${i=>i.isError||i.isWarning?i.theme.mode==="dark"?s.neutralGrey4Dark:i.isWarning:i.theme.colors.primary};
|
|
101
101
|
`,si=t(j)`
|
|
102
102
|
margin-top: -5px;
|
|
@@ -109,11 +109,11 @@ import{X as B,j as e,_ as x,o as r,a4 as L,C as d,a3 as M,Q as C,h as W,g as s,e
|
|
|
109
109
|
width: ${r.sp4};
|
|
110
110
|
height: ${r.sp4};
|
|
111
111
|
color: ${i=>i.isError?s.important:s.brandColorGoldDark};
|
|
112
|
-
`,li=t(
|
|
112
|
+
`,li=t(J)`
|
|
113
113
|
width: ${r.sp4};
|
|
114
114
|
height: ${r.sp4};
|
|
115
115
|
color: ${s.success};
|
|
116
|
-
`,ai=t(
|
|
116
|
+
`,ai=t(A)`
|
|
117
117
|
width: ${r.sp4};
|
|
118
118
|
height: ${r.sp4};
|
|
119
119
|
color: ${i=>i.theme.colors.grey2};
|
|
@@ -141,12 +141,12 @@ import{X as B,j as e,_ as x,o as r,a4 as L,C as d,a3 as M,Q as C,h as W,g as s,e
|
|
|
141
141
|
align-items: center;
|
|
142
142
|
justify-content: center;
|
|
143
143
|
margin-right: ${r.sp1};
|
|
144
|
-
|
|
144
|
+
`,$=t(D)`
|
|
145
145
|
color: ${i=>i.theme.colors.brandColorJade};
|
|
146
146
|
width: ${r.sp3};
|
|
147
147
|
height: ${r.sp3};
|
|
148
|
-
`,hi=t(
|
|
148
|
+
`,hi=t(X)`
|
|
149
149
|
color: ${i=>i.theme.colors.brandColorGoldDark};
|
|
150
150
|
width: ${r.sp4};
|
|
151
151
|
height: ${r.sp4};
|
|
152
|
-
`;export{
|
|
152
|
+
`;export{mi as m};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import{eM as h,eN as x,j as t,bx as m,o as n,$ as o,B as g,q as j,w as p}from"./index-DYVNUtTS.js";import{n as s}from"./vendor-CnQcJ2Lu.js";const{hyphen:a}=g.getLocalizedStrings().common.strings,y=s.div``,f=s.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
min-width: 192px;
|
|
4
|
+
justify-content: space-between;
|
|
5
|
+
`,w=s(p)`
|
|
6
|
+
color: ${e=>e.theme.colors.hero};
|
|
7
|
+
`,b=s(p)`
|
|
8
|
+
color: ${e=>e.theme.colors.brandColorPearl};
|
|
9
|
+
`,d=s.div`
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
`,u=s(j)`
|
|
13
|
+
border-radius: ${n.sp12};
|
|
14
|
+
border: 1px solid ${e=>e.theme.colors.grey1};
|
|
15
|
+
display: flex;
|
|
16
|
+
height: 18px;
|
|
17
|
+
width: 18px;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
color: 1px solid ${e=>e.theme.colors.grey1};
|
|
21
|
+
margin-left: ${n.sp1};
|
|
22
|
+
`,D=({roles:e})=>{let r=a,l=[];r=h(e),l=x(e);const c=()=>l.length>0?t.jsx(y,{children:l.map(i=>t.jsxs(f,{children:[t.jsx(w,{children:i[0]}),t.jsx(b,{children:i[1]})]},i.join(",")))}):t.jsx(t.Fragment,{children:a});return l.length>0?t.jsx(m,{enterDelay:600,"data-testid":o("roles-tooltip",r),title:c(),placement:"top-end",style:{marginLeft:n.sp1,padding:"6px 12px"},maxWidth:"264px",children:t.jsxs(d,{"data-testid":o("roles-label-wrapper",r),children:[r,t.jsx(u,{className:"roles-count-wrapper","data-testid":o("roles-count-wrapper",r),children:l.length})]})}):t.jsx(d,{"data-testid":o("roles-label-wrapper",r),children:r})};export{D as T};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a2 as H,l as me,
|
|
1
|
+
import{a2 as H,l as me,hO as ee,g6 as fe,ew as we,hP as Je,a as Me,hQ as Ve,c7 as _e,c8 as Pe,j as a,B as be,F as Fe,bS as $e,bU as Ne,bV as qe,a4 as Be,hR as Re,hS as Ue,T as he,hT as Se,hU as ze,ck as We,X as Ge,i6 as He,gb as re,s as B,d as De,C as Ce,ca as Xe,hV as Ze,hW as Ke,hX as Ye,o as _}from"./index-DYVNUtTS.js";import{b as m,n as U}from"./vendor-CnQcJ2Lu.js";import{i as Qe,r as et,n as tt,o as lt}from"./ScheduleSequenceTable-fgV8zz4I-B96Fw2cP.js";import"./mui-C5LQ0bMa.js";import"./analytics-CBL_L82S.js";import"./routing-Cpaypegg.js";import"./sentry-HDxG13yk.js";import"./redux-ByjIRbhZ.js";import"./liveblocks-sSQ9JElv.js";import"./crypto-BURQLTgV.js";const R={labelWidth:new Ce(160,160,160),depCategoryLabelWidth:new Ce(200,280,280)},at=U.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
width: 100%;
|
|
@@ -9,29 +9,29 @@ import{a2 as H,l as me,hK as ee,g3 as fe,es as we,hL as Je,a as Me,hM as Ve,c3 a
|
|
|
9
9
|
border-top-right-radius: ${_.sp2};
|
|
10
10
|
border-bottom-left-radius: ${_.sp0};
|
|
11
11
|
border-bottom-right-radius: ${_.sp0};
|
|
12
|
-
`,
|
|
12
|
+
`,X=U.div`
|
|
13
13
|
display: flex;
|
|
14
14
|
flex: 1;
|
|
15
15
|
background-color: ${t=>t.theme.colors.grey3};
|
|
16
16
|
min-height: 1px;
|
|
17
|
-
`,st=
|
|
17
|
+
`,st=U.div`
|
|
18
18
|
display: flex;
|
|
19
19
|
flex-direction: column;
|
|
20
20
|
margin: ${_.sp4} ${_.sp8} ${_.sp0} ${_.sp8};
|
|
21
|
-
`,V=(t,d)=>`${t}.${d}`;function ot({sectionId:t,jeScheduledTransaction:d,updateStatus:g,allAccountOptions:l,allAccountList:s,allClassList:u,allClassOptions:c,allDepreciationAccountList:p,allDepreciationAccountOptions:y,allMonthOptions:v,uncategorizedAccounts:k,selectedAccount:
|
|
21
|
+
`,V=(t,d)=>`${t}.${d}`;function ot({sectionId:t,jeScheduledTransaction:d,updateStatus:g,allAccountOptions:l,allAccountList:s,allClassList:u,allClassOptions:c,allDepreciationAccountList:p,allDepreciationAccountOptions:y,allMonthOptions:v,uncategorizedAccounts:k,selectedAccount:A,selectedClass:P,selectedAccumulatedDepreciationCategory:F,assetId:L,selectedDate:w,selectedMonths:O,selectedPostingDay:E,lastDayOfMonth:T,isDisabled:h,allowCreateSchedule:J,onCreateSchedule:i,onDelete:ae,onMarkAsComplete:K}){const{resetField:f}=We(),se=V(t,"scheduleExpenseCategory"),oe=V(t,"scheduleClass"),ne=V(t,"accumulatedDepreciationCategory"),de=V(t,"assetId"),Y=V(t,"startDate"),S=V(t,"postingDate"),r=V(t,"months"),e=be.getLocalizedStrings().jeSchedules.scheduleDetails.scheduleDetailsSection,b=o=>s.filter(N=>N.qboId===o)[0]?.qboId,x=o=>p.filter(N=>N.qboId===o)[0]?.qboId,ie=o=>u.filter(N=>N.classId===o)[0]?.accountingClassNumber,Z={valueContainer:o=>({...o,overflow:"unset"})},I=Ge(),z=He({startDate:d.baseTransaction.date,endDate:d.baseTransaction.date.add(1,"year")}),W=()=>{f(S)},G=E==null&&T==null?void 0:T===!0?"lastDayOfMonth":"day",$=o=>[k.expense?.qboId,k.income?.qboId].includes(o),Q=()=>{d.jeScheduleId!=null&&ae(d.jeScheduleId)},D=d.scheduledJournalEntry.flatMap(o=>o.error);return a.jsxs(st,{children:[a.jsx(tt,{status:d.status.code,jeScheduleId:d.jeScheduleId,allowCreateSchedule:J,onDelete:Q,isUpdating:g==="In-Progress",onMarkAsComplete:K,onCreateSchedule:i}),a.jsx(he,{controller:J===!0,children:a.jsxs(at,{children:[a.jsx(re,{isDisabled:D.includes("debit_category_deleted")?void 0:h,isLoading:!1,label:{label:e.expenseCategory,width:R.labelWidth.value(I)},groupedSingleSelectField:{customPlaceholderColor:D.includes("debit_category_deleted")?De.brandColorGoldDark:void 0,shouldShowChevronIcon:!1,name:se,placeholder:e.expenseCategoryPlaceholder,valueToId:o=>b(o),defaultValue:{selectedOption:A,allOptions:l},registerOptions:{required:!0,validate:o=>!!o.selectedOption},customStyleConfig:Z},disableCurrentOption:$,style:{borderTopLeftRadius:B[2],borderTopRightRadius:B[2]}}),a.jsx(X,{}),a.jsx(re,{isDisabled:h,isLoading:!1,label:{label:e.class,width:R.labelWidth.value(I)},groupedSingleSelectField:{shouldShowChevronIcon:!1,name:oe,placeholder:e.classPlaceholder,valueToId:o=>ie(o),defaultValue:{selectedOption:P,allOptions:c},registerOptions:{required:!0,validate:o=>!!o.selectedOption},customStyleConfig:Z},style:{borderTopLeftRadius:B[0],borderTopRightRadius:B[0]}}),a.jsx(X,{}),a.jsx(re,{isDisabled:D.includes("credit_category_deleted")?void 0:h,isLoading:!1,label:{label:e.accumulatedDepreciationCategory,width:R.depCategoryLabelWidth.value(I)},groupedSingleSelectField:{customPlaceholderColor:D.includes("credit_category_deleted")?De.brandColorGoldDark:void 0,shouldShowChevronIcon:!1,name:ne,placeholder:e.accumulatedDepreciationCategoryPlaceholder,valueToId:o=>x(o),defaultValue:{selectedOption:F,allOptions:y},registerOptions:{required:!0,validate:o=>!!o.selectedOption},customStyleConfig:Z},disableCurrentOption:$,style:{borderTopLeftRadius:B[0],borderTopRightRadius:B[0]}}),a.jsx(X,{}),a.jsx(Xe,{label:{label:e.assetId,width:R.labelWidth.value(I)},style:{width:"auto"},text:{type:"text",name:de,defaultValue:L,placeholder:e.assetIdPlaceholder,autoComplete:"new-password",options:{maxLength:B[3],required:!0,validate:o=>!!o}},isDisabled:h}),a.jsx(X,{}),a.jsx(Ze,{label:{label:e.startMonth,width:R.labelWidth.value(I)},monthSelectorField:{name:Y,placeholder:e.startMonthPlaceholder,defaultValue:w,showDownChevron:!1,isDisabled:h,monthsAndYears:z},isDisabled:h}),a.jsx(X,{}),a.jsx(lt,{label:{label:e.postingDate,width:R.labelWidth.value(I)},isDisabled:h,dayOfMonthField:{placeholder:e.postingDatePlaceholder,name:S,defaultValue:{type:G,dayOfMonth:E},onSaveClick:()=>{},onCancelClick:W}}),a.jsx(X,{}),a.jsx(Ke,{label:{label:e.months,width:R.labelWidth.value(I)},singleSelectNumericField:{name:r,isDisabled:h,placeholder:e.monthsPlaceholder,defaultValue:{selectedOption:O!=null?v[O-1]:void 0,allOptions:v},registerOptions:{required:!0,validate:o=>!!o.selectedOption}}})]})}),a.jsx(he,{controller:J===!1,children:a.jsx(Ye,{text:e.scheduleMarkedAsCompleted})})]})}const nt=U.div`
|
|
22
22
|
display: flex;
|
|
23
23
|
flex-direction: column;
|
|
24
24
|
width: 100%;
|
|
25
25
|
height: 100%;
|
|
26
26
|
min-height: 100vh;
|
|
27
27
|
background-color: ${t=>t.theme.colors.grey4};
|
|
28
|
-
`,dt=
|
|
28
|
+
`,dt=U.div`
|
|
29
29
|
display: flex;
|
|
30
30
|
z-index: 2;
|
|
31
|
-
`,it=
|
|
31
|
+
`,it=U.div`
|
|
32
32
|
display: flex;
|
|
33
33
|
flex-direction: column;
|
|
34
|
-
`,ct=
|
|
34
|
+
`,ct=U.div`
|
|
35
35
|
display: flex;
|
|
36
36
|
justify-content: center;
|
|
37
|
-
`,ge="scheduleDetailsPage",te="scheduleDetailsFixedAssetsSection",le="scheduleDetailsListSection",rt=be.getLocalizedStrings(),{common:M,jeSchedules:{scheduleDetails:ut}}=rt;function Et({analytics:t,controllerUserDetails:d,expenseAutomationSelectedPeriod:g,scheduleDetailsView:l,vendorSearchAutoCompleteActions:s,vendorSearchAutoCompleteData:u,usedInExpenseAutomation:c,onNavigateBack:p,onEditAmount:y,onJELinkClick:v,onSave:k,onDelete:T,onDetailPageChange:F,onViewLinkedJE:P,onTransactionClick:L,onMarkAsComplete:w,removeJeScheduleTransactionKey:A}){const[E,j]=m.useState(!1),h=H(l.updateStatus.fetchState),J=H(l.selectedJEScheduleTransaction?.status.code),i=H(l.deleteStatus.fetchState),[ae,Y]=m.useState(!1),f=l.scheduleDetailsLocalData.fixed_assets,se=H(f.jeScheduleDetails.length),oe=H(f.selectedDate),ne=H(f.selectedDayOfMonth),[de,Q]=m.useState(!0),S=l.selectedJEScheduleTransaction?.vendor,r=l.selectedJEScheduleTransaction?.baseTransaction,e=l.selectedJEScheduleTransaction,b=me.getFirstControllerEmail(d.controllers),x=me.getFirstControllerId(d.controllerUserIds),ie={onOkClick:()=>{j(!1),p()},onCancelClick:()=>{j(!1)}},X=n=>{const C=e?.scheduledJournalEntry[n];r!=null&&C!=null&&e!=null&&t.trackScheduleDetailsLinkJournalEntry({scheduleType:"fixed_assets",transaction:{...Ue(r)},scheduleExpenseCategoryAndClass:{expenseCategory:e.jeDebit.account?.accountName??null,expenseClass:e.jeDebit.accountingClass?.className??null},journalEntryDetails:{...Se(C)},vendorName:S!=null?S.name:M.strings.hyphen,controllerEmails:b,controllerUserIds:x,fixedAssetsDetails:{accumulatedDepreciationCategory:e.jeCredit.account?.accountName??null,assetId:e.otherAttributes.assetId??null}}),v(n)},I=(n,C)=>{const O=e?.scheduledJournalEntry[C];r!=null&&O!=null&&e!=null&&t.trackScheduleDetailsViewJournalEntry({scheduleType:"fixed_assets",scheduleExpenseCategoryAndClass:{expenseCategory:e.jeDebit.account?.accountName??null,expenseClass:e.jeDebit.accountingClass?.className??null},journalEntryDetails:Se(O),controllerEmails:b,controllerUserIds:x,fixedAssetsDetails:{accumulatedDepreciationCategory:e.jeCredit.account?.accountName??null,assetId:e.otherAttributes.assetId??null}}),P(n)};m.useEffect(()=>{h==="In-Progress"&&l.updateStatus.fetchState==="Completed"&&(r!=null&&e!=null&&t.trackScheduleDetailsSaved(ee({jeScheduleTransaction:e,scheduleTab:"fixed_assets",transaction:r,vendor:S,controllerEmails:b,controllerUserIds:x})),c===!0&&e?.jeScheduleTransactionKey!=null&&J==="draft"&&l.selectedJEScheduleTransaction?.status.code==="ongoing"&&A(e.jeScheduleTransactionKey,{month:g.month,year:g.year}),p())},[g,J,l.selectedJEScheduleTransaction?.status.code,t,p,h,A,c,l.updateStatus,e,r,S,b,x]),m.useEffect(()=>{i==="In-Progress"&&l.deleteStatus.fetchState==="Completed"&&p()},[i,l.deleteStatus,p]);const U=fe(l.accountListNestedAccountHierarchy),W=fe(l.allDepreciationAccountListNestedAccountHierarchy),G=we(l.classListNestedAccountHierarchy),$=Je("fixed_assets"),Z=m.useRef(),D=Me({mode:"all",reValidateMode:"onChange",defaultValues:ue(l,U,G,W,$,u.entityAutoCompleteView),resetOptions:{keepDirtyValues:!0,keepErrors:!0},values:ue(l,U,G,W,$,u.entityAutoCompleteView)}),o=D.watch("scheduleDetailsFixedAssetsSection.vendor");m.useEffect(()=>{u.entityAutoCompleteView.fetchState==="Completed"&&Z.current?.(Ve(u.entityAutoCompleteView))},[u.entityAutoCompleteView.fetchState]);const N=(n,C)=>{s.onAutoCompleteInputChange?.(n,"vendor"),Z.current=C},xe=D.handleSubmit(()=>{k(l.selectedJEScheduleTransaction?.jeScheduleId)}),ve=async(n,C)=>{const O=C[te].vendor;if(n.includes("vendor")){const ce=O?.defaultOptions.map(q=>q.value);if(O?.selectedOption!=null&&ce?.includes(O.selectedOption)!==!0){const q=u.entityAutoCompleteView.vendor.find(Le=>Le.id===O.selectedOption);q!=null&&D.setValue("scheduleDetailsFixedAssetsSection.vendor.defaultOptions",[{label:q.name??"",value:q.id}])}}const ke=n.includes("amount");if(F(C,ke),n.includes("amount")){const ce=n.split(".")[1],q=parseInt(ce);Y(!0),y(q,l.selectedJEScheduleTransaction?.jeScheduleId)}};m.useEffect(()=>{const n=D.watch((C,{name:O})=>{O!=null&&C!=null&&_e(()=>ve(O,C))});return()=>{n.unsubscribe()}}),m.useEffect(()=>{(se!==f.jeScheduleDetails.length||oe!==f.selectedDate||ne!==f.selectedDayOfMonth)&&ae===!0&&(D.resetField(le,{defaultValue:ue(l,U,G,W,$,u.entityAutoCompleteView)[le],keepDirty:!1}),Y(!1))},[f.jeScheduleDetails.length,f.selectedDate,f.selectedDayOfMonth]),m.useEffect(()=>{l.selectedJEScheduleTransaction?.status.code==="marked_as_completed"&&Q(!1)},[l.selectedJEScheduleTransaction?.status.code]);const pe=(Fe(D.formState.dirtyFields)||l.selectedJEScheduleTransaction?.status.code==="draft")&&f.jeScheduleDetails.length>0,Ee=()=>{pe===!0?j(!0):(r!=null&&e!=null&&t.trackScheduleDetailsCanceled(ee({jeScheduleTransaction:e,scheduleTab:"fixed_assets",transaction:r,vendor:S,controllerEmails:b,controllerUserIds:x})),p())},je=()=>{l.selectedJEScheduleTransaction!=null&&L({id:l.selectedJEScheduleTransaction.baseTransaction.id,type:l.selectedJEScheduleTransaction.baseTransaction.type})},Oe=m.useCallback(()=>{Q(!0)},[]),Te=m.useCallback(()=>{r!=null&&e!=null&&t.trackScheduleDetailsMarkedAsCompleted(ee({jeScheduleTransaction:e,scheduleTab:"fixed_assets",transaction:r,vendor:S,controllerEmails:b,controllerUserIds:x})),w()},[t,b,x,e,w,r,S]),Ae=m.useCallback(n=>{r!=null&&e!=null&&t.trackScheduleDetailsDeleted(ee({jeScheduleTransaction:e,scheduleTab:"fixed_assets",transaction:r,vendor:S,controllerEmails:b,controllerUserIds:x})),T(n)},[t,b,x,e,T,r,S]),Ie=(l.selectedJEScheduleTransaction?.scheduledJournalEntry.flatMap(n=>n.error??[]).filter(n=>!!n)??[])?.includes("vendor_deleted")===!0?o?.defaultOptions.find(n=>n.value===o?.selectedOption)?.[0]?.label:l?.selectedJEScheduleTransaction?.vendor?.name;return a.jsxs(nt,{children:[a.jsx(ht,{title:Ie??M.strings.empty,onNavigateBack:Ee,onTransactionClick:je}),a.jsx(dt,{children:a.jsx(Pe,{...D,children:a.jsxs("form",{style:{width:"100%"},id:ye(ge),onSubmit:xe,children:[a.jsx(pt,{vendorLoadOptions:N,vendorField:o,vendorSearchAutoCompleteActions:s,vendorSearchAutoCompleteData:u,scheduleDetailsView:l,allAccountOptions:U,allClassOptions:G,allMonthOptions:$,allDepAccountOptions:W,onEditAmount:y,onDelete:Ae,onJELinkClick:X,onViewLinkedJE:I,onMarkAsComplete:Te,allowCreateSchedule:de,onCreateSchedule:Oe}),E===!0?a.jsx($e,{titleComponent:a.jsx(qe,{children:M.confirmationPopup.discardTitle}),descriptionComponent:a.jsx(Ne,{children:M.confirmationPopup.discardDescription}),primaryButtonText:M.confirmationPopup.discard,secondaryButtonText:M.confirmationPopup.cancel,proceedButtonVariant:"danger",action:ie}):null,pe===!0?a.jsx(Re,{formId:ye(ge),primaryBtn:{label:M.footer.save,style:{minWidth:"82px"},isLoading:l.updateStatus.fetchState==="In-Progress",isDisabled:l.updateStatus.fetchState==="In-Progress"},cancelBtn:{label:M.footer.cancel,shouldResetOnCancel:!0,onClick:()=>{j(!0)},style:{minWidth:"82px"}}}):null]})})})]})}function ht({onNavigateBack:t,onTransactionClick:d,title:g}){return a.jsx(Be,{title:g,tooltipTextOnLaunch:ut.showTransactionTooltip,onBackClick:t,onLaunchClick:d,style:{zIndex:3}})}function pt({vendorField:t,vendorLoadOptions:d,vendorSearchAutoCompleteActions:g,vendorSearchAutoCompleteData:l,scheduleDetailsView:s,allAccountOptions:u,allClassOptions:c,allDepAccountOptions:p,allMonthOptions:y,allowCreateSchedule:v,onCreateSchedule:k,onEditAmount:T,onDelete:F,onJELinkClick:P,onViewLinkedJE:L,onMarkAsComplete:w}){const A=s.selectedJEScheduleTransaction?.scheduledJournalEntry.flatMap(E=>E.error).filter(E=>!!E)??[];return s.selectedJEScheduleTransaction!=null?a.jsxs(it,{children:[a.jsx(ct,{children:a.jsx(Ze,{vendorLoadOptions:d,vendorField:t,vendorFieldName:V(te,"vendor"),vendorSearchAutoCompleteActions:g,vendorSearchAutoCompleteData:l,errors:A,transaction:s.selectedJEScheduleTransaction.baseTransaction,vendor:s.selectedJEScheduleTransaction.vendor})}),a.jsx(ot,{sectionId:te,jeScheduledTransaction:s.selectedJEScheduleTransaction,allAccountOptions:u,allAccountList:s.allAccountList,allClassList:s.allClassList,allClassOptions:c,allDepreciationAccountOptions:p,allDepreciationAccountList:s.allDepreciationAccountList,allMonthOptions:y,uncategorizedAccounts:s.uncategorizedAccounts,lastDayOfMonth:s.scheduleDetailsLocalData.fixed_assets.lastDayOfMonth,assetId:s.scheduleDetailsLocalData.fixed_assets.assetId,selectedPostingDay:s.scheduleDetailsLocalData.fixed_assets.selectedDayOfMonth,selectedMonths:s.scheduleDetailsLocalData.fixed_assets.selectedMonths,isDisabled:s.selectedJEScheduleTransaction.jeScheduleId!=null&&s.selectedJEScheduleTransaction.status.code!=="draft"&&s.selectedJEScheduleTransaction.status.code!=="marked_as_completed"?"disabled":void 0,updateStatus:s.deleteStatus.fetchState,allowCreateSchedule:v,onDelete:F,onMarkAsComplete:w,onCreateSchedule:k}),a.jsx(he,{controller:v===!0,children:a.jsx(et,{sectionId:le,totalAmount:s.selectedJEScheduleTransaction.baseTransaction.amount.amount,listFetchState:s.fetchState,scheduleJournalEntries:s.selectedJEScheduleTransaction.scheduledJournalEntry,hideMemoField:s.selectedJEScheduleTransaction.jeScheduleId==null,localData:s.scheduleDetailsLocalData.fixed_assets.jeScheduleDetails,uiState:s.uiState,onEditAmount:T,onJELinkClick:P,onViewLinkedJE:L,jeScheduleId:s.selectedJEScheduleTransaction.baseTransaction.id})})]}):null}const ye=t=>`${t}_form`,ue=(t,d,g,l,s,u)=>{const c=t.scheduleDetailsLocalData.fixed_assets,p=c.selectedAccount,y=c.selectedVendor,v=y!=null?u.vendor.find(i=>i.zeniId===y.id):void 0,k=p!=null?t.allAccountList.find(i=>i.accountId===p):void 0,T=c.selectedAccumulatedDepreciationCategory,F=T!=null?t.allDepreciationAccountList.find(i=>i.accountId===T):void 0,P=c.assetId,L=c.selectedClass,w=L!=null?t.allClassList.find(i=>i.classId===L):void 0,A=c.selectedMonths,E=c.jeScheduleDetails.map(i=>({postingDate:i.postingDate,amount:i.amount.amount,runningBalance:i.runningBalance.amount,postingStatus:i.postingStatus,jeLink:i.jeLink.thirdPartyTransactionId})),j=c.selectedDayOfMonth,h=c.lastDayOfMonth,J=j==null&&h==null?void 0:h===!0?"lastDayOfMonth":"day";return{[te]:{scheduleExpenseCategory:{selectedOption:k?.qboId,allOptions:d},accumulatedDepreciationCategory:{selectedOption:F?.qboId,allOptions:l},assetId:P,scheduleClass:{selectedOption:w?.classId,allOptions:g},startDate:c.selectedDate,months:{selectedOption:A,allOptions:s},vendor:{selectedOption:v?.id??y?.id,defaultOptions:ze(u,v??y)},postingDate:{type:J,dayOfMonth:j}},[le]:E}};export{Et as default};
|
|
37
|
+
`,ge="scheduleDetailsPage",te="scheduleDetailsFixedAssetsSection",le="scheduleDetailsListSection",rt=be.getLocalizedStrings(),{common:M,jeSchedules:{scheduleDetails:ut}}=rt;function Et({analytics:t,controllerUserDetails:d,expenseAutomationSelectedPeriod:g,scheduleDetailsView:l,vendorSearchAutoCompleteActions:s,vendorSearchAutoCompleteData:u,usedInExpenseAutomation:c,onNavigateBack:p,onEditAmount:y,onJELinkClick:v,onSave:k,onDelete:A,onDetailPageChange:P,onViewLinkedJE:F,onTransactionClick:L,onMarkAsComplete:w,removeJeScheduleTransactionKey:O}){const[E,T]=m.useState(!1),h=H(l.updateStatus.fetchState),J=H(l.selectedJEScheduleTransaction?.status.code),i=H(l.deleteStatus.fetchState),[ae,K]=m.useState(!1),f=l.scheduleDetailsLocalData.fixed_assets,se=H(f.jeScheduleDetails.length),oe=H(f.selectedDate),ne=H(f.selectedDayOfMonth),[de,Y]=m.useState(!0),S=l.selectedJEScheduleTransaction?.vendor,r=l.selectedJEScheduleTransaction?.baseTransaction,e=l.selectedJEScheduleTransaction,b=me.getFirstControllerEmail(d.controllers),x=me.getFirstControllerId(d.controllerUserIds),ie={onOkClick:()=>{T(!1),p()},onCancelClick:()=>{T(!1)}},Z=n=>{const C=e?.scheduledJournalEntry[n];r!=null&&C!=null&&e!=null&&t.trackScheduleDetailsLinkJournalEntry({scheduleType:"fixed_assets",transaction:{...ze(r)},scheduleExpenseCategoryAndClass:{expenseCategory:e.jeDebit.account?.accountName??null,expenseClass:e.jeDebit.accountingClass?.className??null},journalEntryDetails:{...Se(C)},vendorName:S!=null?S.name:M.strings.hyphen,controllerEmails:b,controllerUserIds:x,fixedAssetsDetails:{accumulatedDepreciationCategory:e.jeCredit.account?.accountName??null,assetId:e.otherAttributes.assetId??null}}),v(n)},I=(n,C)=>{const j=e?.scheduledJournalEntry[C];r!=null&&j!=null&&e!=null&&t.trackScheduleDetailsViewJournalEntry({scheduleType:"fixed_assets",scheduleExpenseCategoryAndClass:{expenseCategory:e.jeDebit.account?.accountName??null,expenseClass:e.jeDebit.accountingClass?.className??null},journalEntryDetails:Se(j),controllerEmails:b,controllerUserIds:x,fixedAssetsDetails:{accumulatedDepreciationCategory:e.jeCredit.account?.accountName??null,assetId:e.otherAttributes.assetId??null}}),F(n)};m.useEffect(()=>{h==="In-Progress"&&l.updateStatus.fetchState==="Completed"&&(r!=null&&e!=null&&t.trackScheduleDetailsSaved(ee({jeScheduleTransaction:e,scheduleTab:"fixed_assets",transaction:r,vendor:S,controllerEmails:b,controllerUserIds:x})),c===!0&&e?.jeScheduleTransactionKey!=null&&J==="draft"&&l.selectedJEScheduleTransaction?.status.code==="ongoing"&&O(e.jeScheduleTransactionKey,{month:g.month,year:g.year}),p())},[g,J,l.selectedJEScheduleTransaction?.status.code,t,p,h,O,c,l.updateStatus,e,r,S,b,x]),m.useEffect(()=>{i==="In-Progress"&&l.deleteStatus.fetchState==="Completed"&&p()},[i,l.deleteStatus,p]);const z=fe(l.accountListNestedAccountHierarchy),W=fe(l.allDepreciationAccountListNestedAccountHierarchy),G=we(l.classListNestedAccountHierarchy),$=Je("fixed_assets"),Q=m.useRef(),D=Me({mode:"all",reValidateMode:"onChange",defaultValues:ue(l,z,G,W,$,u.entityAutoCompleteView),resetOptions:{keepDirtyValues:!0,keepErrors:!0},values:ue(l,z,G,W,$,u.entityAutoCompleteView)}),o=D.watch("scheduleDetailsFixedAssetsSection.vendor");m.useEffect(()=>{u.entityAutoCompleteView.fetchState==="Completed"&&Q.current?.(Ve(u.entityAutoCompleteView))},[u.entityAutoCompleteView.fetchState]);const N=(n,C)=>{s.onAutoCompleteInputChange?.(n,"vendor"),Q.current=C},xe=D.handleSubmit(()=>{k(l.selectedJEScheduleTransaction?.jeScheduleId)}),ve=async(n,C)=>{const j=C[te].vendor;if(n.includes("vendor")){const ce=j?.defaultOptions.map(q=>q.value);if(j?.selectedOption!=null&&ce?.includes(j.selectedOption)!==!0){const q=u.entityAutoCompleteView.vendor.find(Le=>Le.id===j.selectedOption);q!=null&&D.setValue("scheduleDetailsFixedAssetsSection.vendor.defaultOptions",[{label:q.name??"",value:q.id}])}}const ke=n.includes("amount");if(P(C,ke),n.includes("amount")){const ce=n.split(".")[1],q=parseInt(ce);K(!0),y(q,l.selectedJEScheduleTransaction?.jeScheduleId)}};m.useEffect(()=>{const n=D.watch((C,{name:j})=>{j!=null&&C!=null&&_e(()=>ve(j,C))});return()=>{n.unsubscribe()}}),m.useEffect(()=>{(se!==f.jeScheduleDetails.length||oe!==f.selectedDate||ne!==f.selectedDayOfMonth)&&ae===!0&&(D.resetField(le,{defaultValue:ue(l,z,G,W,$,u.entityAutoCompleteView)[le],keepDirty:!1}),K(!1))},[f.jeScheduleDetails.length,f.selectedDate,f.selectedDayOfMonth]),m.useEffect(()=>{l.selectedJEScheduleTransaction?.status.code==="marked_as_completed"&&Y(!1)},[l.selectedJEScheduleTransaction?.status.code]);const pe=(Pe(D.formState.dirtyFields)||l.selectedJEScheduleTransaction?.status.code==="draft")&&f.jeScheduleDetails.length>0,Ee=()=>{pe===!0?T(!0):(r!=null&&e!=null&&t.trackScheduleDetailsCanceled(ee({jeScheduleTransaction:e,scheduleTab:"fixed_assets",transaction:r,vendor:S,controllerEmails:b,controllerUserIds:x})),p())},Te=()=>{l.selectedJEScheduleTransaction!=null&&L({id:l.selectedJEScheduleTransaction.baseTransaction.id,type:l.selectedJEScheduleTransaction.baseTransaction.type})},je=m.useCallback(()=>{Y(!0)},[]),Ae=m.useCallback(()=>{r!=null&&e!=null&&t.trackScheduleDetailsMarkedAsCompleted(ee({jeScheduleTransaction:e,scheduleTab:"fixed_assets",transaction:r,vendor:S,controllerEmails:b,controllerUserIds:x})),w()},[t,b,x,e,w,r,S]),Oe=m.useCallback(n=>{r!=null&&e!=null&&t.trackScheduleDetailsDeleted(ee({jeScheduleTransaction:e,scheduleTab:"fixed_assets",transaction:r,vendor:S,controllerEmails:b,controllerUserIds:x})),A(n)},[t,b,x,e,A,r,S]),Ie=(l.selectedJEScheduleTransaction?.scheduledJournalEntry.flatMap(n=>n.error??[]).filter(n=>!!n)??[])?.includes("vendor_deleted")===!0?o?.defaultOptions.find(n=>n.value===o?.selectedOption)?.[0]?.label:l?.selectedJEScheduleTransaction?.vendor?.name;return a.jsxs(nt,{children:[a.jsx(ht,{title:Ie??M.strings.empty,onNavigateBack:Ee,onTransactionClick:Te}),a.jsx(dt,{children:a.jsx(Fe,{...D,children:a.jsxs("form",{style:{width:"100%"},id:ye(ge),onSubmit:xe,children:[a.jsx(pt,{vendorLoadOptions:N,vendorField:o,vendorSearchAutoCompleteActions:s,vendorSearchAutoCompleteData:u,scheduleDetailsView:l,allAccountOptions:z,allClassOptions:G,allMonthOptions:$,allDepAccountOptions:W,onEditAmount:y,onDelete:Oe,onJELinkClick:Z,onViewLinkedJE:I,onMarkAsComplete:Ae,allowCreateSchedule:de,onCreateSchedule:je}),E===!0?a.jsx($e,{titleComponent:a.jsx(qe,{children:M.confirmationPopup.discardTitle}),descriptionComponent:a.jsx(Ne,{children:M.confirmationPopup.discardDescription}),primaryButtonText:M.confirmationPopup.discard,secondaryButtonText:M.confirmationPopup.cancel,proceedButtonVariant:"danger",action:ie}):null,pe===!0?a.jsx(Be,{formId:ye(ge),primaryBtn:{label:M.footer.save,style:{minWidth:"82px"},isLoading:l.updateStatus.fetchState==="In-Progress",isDisabled:l.updateStatus.fetchState==="In-Progress"},cancelBtn:{label:M.footer.cancel,shouldResetOnCancel:!0,onClick:()=>{T(!0)},style:{minWidth:"82px"}}}):null]})})})]})}function ht({onNavigateBack:t,onTransactionClick:d,title:g}){return a.jsx(Ue,{title:g,tooltipTextOnLaunch:ut.showTransactionTooltip,onBackClick:t,onLaunchClick:d,style:{zIndex:3}})}function pt({vendorField:t,vendorLoadOptions:d,vendorSearchAutoCompleteActions:g,vendorSearchAutoCompleteData:l,scheduleDetailsView:s,allAccountOptions:u,allClassOptions:c,allDepAccountOptions:p,allMonthOptions:y,allowCreateSchedule:v,onCreateSchedule:k,onEditAmount:A,onDelete:P,onJELinkClick:F,onViewLinkedJE:L,onMarkAsComplete:w}){const O=s.selectedJEScheduleTransaction?.scheduledJournalEntry.flatMap(E=>E.error).filter(E=>!!E)??[];return s.selectedJEScheduleTransaction!=null?a.jsxs(it,{children:[a.jsx(ct,{children:a.jsx(Qe,{vendorLoadOptions:d,vendorField:t,vendorFieldName:V(te,"vendor"),vendorSearchAutoCompleteActions:g,vendorSearchAutoCompleteData:l,errors:O,transaction:s.selectedJEScheduleTransaction.baseTransaction,vendor:s.selectedJEScheduleTransaction.vendor})}),a.jsx(ot,{sectionId:te,jeScheduledTransaction:s.selectedJEScheduleTransaction,allAccountOptions:u,allAccountList:s.allAccountList,allClassList:s.allClassList,allClassOptions:c,allDepreciationAccountOptions:p,allDepreciationAccountList:s.allDepreciationAccountList,allMonthOptions:y,uncategorizedAccounts:s.uncategorizedAccounts,lastDayOfMonth:s.scheduleDetailsLocalData.fixed_assets.lastDayOfMonth,assetId:s.scheduleDetailsLocalData.fixed_assets.assetId,selectedPostingDay:s.scheduleDetailsLocalData.fixed_assets.selectedDayOfMonth,selectedMonths:s.scheduleDetailsLocalData.fixed_assets.selectedMonths,isDisabled:s.selectedJEScheduleTransaction.jeScheduleId!=null&&s.selectedJEScheduleTransaction.status.code!=="draft"&&s.selectedJEScheduleTransaction.status.code!=="marked_as_completed"?"disabled":void 0,updateStatus:s.deleteStatus.fetchState,allowCreateSchedule:v,onDelete:P,onMarkAsComplete:w,onCreateSchedule:k}),a.jsx(he,{controller:v===!0,children:a.jsx(et,{sectionId:le,totalAmount:s.selectedJEScheduleTransaction.baseTransaction.amount.amount,listFetchState:s.fetchState,scheduleJournalEntries:s.selectedJEScheduleTransaction.scheduledJournalEntry,hideMemoField:s.selectedJEScheduleTransaction.jeScheduleId==null,localData:s.scheduleDetailsLocalData.fixed_assets.jeScheduleDetails,uiState:s.uiState,onEditAmount:A,onJELinkClick:F,onViewLinkedJE:L,jeScheduleId:s.selectedJEScheduleTransaction.baseTransaction.id})})]}):null}const ye=t=>`${t}_form`,ue=(t,d,g,l,s,u)=>{const c=t.scheduleDetailsLocalData.fixed_assets,p=c.selectedAccount,y=c.selectedVendor,v=y!=null?u.vendor.find(i=>i.zeniId===y.id):void 0,k=p!=null?t.allAccountList.find(i=>i.accountId===p):void 0,A=c.selectedAccumulatedDepreciationCategory,P=A!=null?t.allDepreciationAccountList.find(i=>i.accountId===A):void 0,F=c.assetId,L=c.selectedClass,w=L!=null?t.allClassList.find(i=>i.classId===L):void 0,O=c.selectedMonths,E=c.jeScheduleDetails.map(i=>({postingDate:i.postingDate,amount:i.amount.amount,runningBalance:i.runningBalance.amount,postingStatus:i.postingStatus,jeLink:i.jeLink.thirdPartyTransactionId})),T=c.selectedDayOfMonth,h=c.lastDayOfMonth,J=T==null&&h==null?void 0:h===!0?"lastDayOfMonth":"day";return{[te]:{scheduleExpenseCategory:{selectedOption:k?.qboId,allOptions:d},accumulatedDepreciationCategory:{selectedOption:P?.qboId,allOptions:l},assetId:F,scheduleClass:{selectedOption:w?.classId,allOptions:g},startDate:c.selectedDate,months:{selectedOption:O,allOptions:s},vendor:{selectedOption:v?.id??y?.id,defaultOptions:Re(u,v??y)},postingDate:{type:J,dayOfMonth:T}},[le]:E}};export{Et as default};
|