@zeniai/web-cockpit-ui 1.14.44-qa → 1.14.45-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-CmrHphBc-BSc57asr.js → ACHDetailsPage-Dt6biYUe-x9rtHiTM.js} +1 -1
- package/dist/assets/{AIPerformancePage-DVLZQQLx-TJL1UOFJ.js → AIPerformancePage-CM9AM70q-CVnEii0f.js} +10 -10
- package/dist/assets/{AccountInfoPage-imteGSK1-C7FNjZiy.js → AccountInfoPage-CPF9bJN8-D7BCOq_s.js} +4 -4
- package/dist/assets/{AccountInfoPageContent-DIjQnfrv-Bx8ZGbnv.js → AccountInfoPageContent-BpnR6Xwt-DVOag3Ni.js} +19 -19
- package/dist/assets/{AccountLockedInfoModal-LYiLlZrv-W5eyNZln.js → AccountLockedInfoModal-ZoEeOTMM-CFpvfMaR.js} +1 -1
- package/dist/assets/{AccountReconDetailsDrawerPage-CSzw7Xdo-BUbqervM.js → AccountReconDetailsDrawerPage-CfQ2mY97-Dg9-ZXo-.js} +1 -1
- package/dist/assets/{AccountRow-DnMX1pTV-Dch-yrS1.js → AccountRow-B8_6Pf4a-BXi7G1sU.js} +13 -13
- package/dist/assets/{AccountsPromoCardStack-BY9-YdTi-DAKDIFdR.js → AccountsPromoCardStack-BiCUsUG_-CKpOKtGv.js} +11 -11
- package/dist/assets/{AddAddressForCardDrawer-BY8rla0d-DwYWRebM.js → AddAddressForCardDrawer-Dqd20TwG-CLEU-fTU.js} +1 -1
- package/dist/assets/{AddToWalletPage-BND3tkMk-B2Q1vX5B.js → AddToWalletPage-Dztl0YPb-CTUWx1Uw.js} +10 -10
- package/dist/assets/{AgingReportsPage-C1HG4wzc-BP7ywoVs.js → AgingReportsPage-B4XxsXj8-qCOhN7V-.js} +14 -14
- package/dist/assets/{AllUserItems-rYc34keO-eneNLhbV.js → AllUserItems-B0rWTi3M-q17-8wHB.js} +4 -4
- package/dist/assets/{ApAgingDetailPage-CNG6prpn-zUDMXulF.js → ApAgingDetailPage-Y9K0Ueeu-fEOm7-dZ.js} +2 -2
- package/dist/assets/{AppBasePage-Dk4672v_-BU3yLG7X.js → AppBasePage-Co9r45oA-_5jrWDUp.js} +3 -3
- package/dist/assets/{AppDrawerContent-Y99P1DCR-BotvEcVh.js → AppDrawerContent-BBI2DM1O-BZ9TCfuC.js} +13 -13
- package/dist/assets/{ApprovalRulesSettingsPage-CO8-E7dA-D4Ayb7gE.js → ApprovalRulesSettingsPage-DP26gqoH-S91hGwuF.js} +1 -1
- package/dist/assets/{ArAgingChart-CsuanjH1-C1MocSZP.js → ArAgingChart-D07CrcX6-Bb-ubg6P.js} +1 -1
- package/dist/assets/{ArAgingDetailPage-D6CHRGxo-CwwmVZk4.js → ArAgingDetailPage-GZw1b2sA-z9jAw9p9.js} +1 -1
- package/dist/assets/{AttachmentView-B3p8mkIi-BrJeaiQh.js → AttachmentView-xH7J89rG-DOMjMRfr.js} +6 -6
- package/dist/assets/{BankAccountSection--gqsJj6B-Cl0xvfi6.js → BankAccountSection-C74XNBn5-CY0uI2wa.js} +6 -6
- package/dist/assets/{BankAccountWarningSection-BM-Bu8CI-NIomJVMY.js → BankAccountWarningSection-DISZecgw-BXaqSDbn.js} +8 -8
- package/dist/assets/{BankConnectionsSettingsPage-B_RVLsvX-Bh3jK4p-.js → BankConnectionsSettingsPage-DVfrZI5k-y_eb2M3D.js} +7 -7
- package/dist/assets/{BillDetailPage-Bu20m9VL-x6bX1pWj.js → BillDetailPage-BB2dqRCc-DDaLt-vn.js} +5 -5
- package/dist/assets/{BillPayApprovalRuleDetailPage-CR168utn-D04RgUHd.js → BillPayApprovalRuleDetailPage-DULz7z7T-DY6u14Tx.js} +1 -1
- package/dist/assets/{BillPayApprovalRulesPage-DQbLEENj-BXlH5X6q.js → BillPayApprovalRulesPage-BRy0P1G6-VP3zI7Gw.js} +5 -5
- package/dist/assets/{BillPayPromoPage-DqUNPVeq-BY__dpe7.js → BillPayPromoPage-CbJdDHD0-DZ-M6IZC.js} +4 -4
- package/dist/assets/{BillPaySetUpPage-BO8V-KVh-BVLQO0ZS.js → BillPaySetUpPage-DqnFvCOb-BeutT-e1.js} +2 -2
- package/dist/assets/{BillingSettingsPage-clzpJwrI-aUUpavsg.js → BillingSettingsPage-BC-uZXJ5-lq1RYTMm.js} +5 -5
- package/dist/assets/{BillsBulkReviewDrawerPage-CFldRiX8-CF_81QlR.js → BillsBulkReviewDrawerPage-GdAORV0l-CHEn6W3_.js} +1 -1
- package/dist/assets/{BoxItem-CnpQOIVn-QBDxILBm.js → BoxItem-BVzRQmWm-DnawUpOb.js} +1 -1
- package/dist/assets/{BusinessVerificationPage-DKmaCoDK-BokUPZc8.js → BusinessVerificationPage-Vmjh5B5Q-DyyMw-EQ.js} +6 -6
- package/dist/assets/{CardNumberSubText-uaXIushe-mziisRlF.js → CardNumberSubText-Rjo6M8UU-CcXRlHUY.js} +1 -1
- package/dist/assets/{CashbackDetailPage-DrW60zjw-CAOfeHjk.js → CashbackDetailPage-CiSuiJsI-CCZeXshW.js} +16 -16
- package/dist/assets/{ChargeCardDetailPage-X1HoUp96-Dq0xewvB.js → ChargeCardDetailPage-RTQvA6Uw-C4pe-icE.js} +41 -41
- package/dist/assets/{ChargeCardListPage-_0lUmAxM-FS4GdQcB.js → ChargeCardListPage-ByQZiwkP-DXG0mm5T.js} +15 -15
- package/dist/assets/{ChargeCardListTable-mfIUvL0A-BZYAUn-T.js → ChargeCardListTable-BIiwOFhF-DyaZW1I2.js} +13 -13
- package/dist/assets/{ChargeCardPromoPage-Bo2JJ5g4-Cbfgp8i_.js → ChargeCardPromoPage-DDs4hLZ8-yzbnAU_m.js} +10 -10
- package/dist/assets/{ChargeCardSetupPage-D9IikPGO-DQ37eBAM.js → ChargeCardSetupPage-C5Ay4ZmX-SxGdOPuA.js} +1 -1
- package/dist/assets/{ChargeCardStatementsPage-Ck3qug5N-PNsbLhik.js → ChargeCardStatementsPage-5htSDEnC-Nw5bKfZm.js} +4 -4
- package/dist/assets/{ChargeCardUtils-BEBqV4Ri-CPRRvpNp.js → ChargeCardUtils-D8nxmniw-0B3L7zeg.js} +1 -1
- package/dist/assets/{ChaseOverlay-CauClKmi-CmKTvW2Q.js → ChaseOverlay-BsUhQ0Hl-DFaxFI1c.js} +10 -10
- package/dist/assets/CheckDepositDrawerPage-CpQke8aO-CtJ3A36H.js +206 -0
- package/dist/assets/{CollapsableReportTable-CHthdzdj-DiXbx-o4.js → CollapsableReportTable-s_gsuEBP-C1aC-SHP.js} +85 -85
- package/dist/assets/{CompanyOfficerDetailsSection-BEb3_zYO-Dqtv0jSU.js → CompanyOfficerDetailsSection-BgVQxl1Y-CwOozNod.js} +15 -15
- package/dist/assets/{CompanyPassportCard-FhjZyorS-BrEmcU5l.js → CompanyPassportCard-BA3ilbJb-BLkylNR4.js} +1 -1
- package/dist/assets/{CompanyPassportPage-BlhNB8Ah-CKfKsscn.js → CompanyPassportPage-CAsHDLIg-DHWATnhm.js} +21 -21
- package/dist/assets/{CompleteProfile-Bk9Oyn1_-DoR6qaZF.js → CompleteProfile-CYCDpreV-BIRl_rEJ.js} +1 -1
- package/dist/assets/{ConfettiBurst-DZLI1m4w-Dpj1p9Kd.js → ConfettiBurst-C6h5WEkY-CkKDQczO.js} +1 -1
- package/dist/assets/{CreateOrEditVendorPage-C3CFRcUl-aaHtvw8x.js → CreateOrEditVendorPage-PQOg943K-BIJqg_Xb.js} +4 -4
- package/dist/assets/{CreditCardPaymentDrawerPage-Drl9yZi5-CKvSiGF-.js → CreditCardPaymentDrawerPage-DKW50EM6-DVNOyIoX.js} +10 -10
- package/dist/assets/{CreditCardPaymentPlgSection-D-Ptzdeo-BK_hLYo8.js → CreditCardPaymentPlgSection-C5Qn4uPW--juf3I9b.js} +8 -8
- package/dist/assets/{CurrencySelectField-CTAalWEI-iuON3W6y.js → CurrencySelectField-CQuKsZt--4BzRH7ns.js} +2 -2
- package/dist/assets/{CustomerOnboardingActivationPage-BkPgpEPw-Cxokqqc5.js → CustomerOnboardingActivationPage-DltZPaG9-CuOVbV8z.js} +6 -6
- package/dist/assets/CustomerOnboardingContainerPage-BLfK3HuK-D58EIOXR.js +1 -0
- package/dist/assets/{CustomerOnboardingDetailPageSkeleton-DzG4nVbk-DUDJYwqd.js → CustomerOnboardingDetailPageSkeleton-BX1ALiCI-pRGEY_jl.js} +8 -8
- package/dist/assets/{CustomerOnboardingNoStepsPage-Czttv30c-CPtfEMDH.js → CustomerOnboardingNoStepsPage-D-_NhEaR-DoNrEgc_.js} +7 -7
- package/dist/assets/{CustomerOnboardingPage-CNXBzMG5-DzdSjywh.js → CustomerOnboardingPage-Cxw6ju1Q-iVE3rRJz.js} +1 -1
- package/dist/assets/{CustomerOnboardingProductSuitePage-BArjfUBb-DiIVJ-QZ.js → CustomerOnboardingProductSuitePage-B7D59sC_-ClANKKoE.js} +5 -5
- package/dist/assets/{Dashboard-DyA5sBz3-CRkt-_C_.js → Dashboard-BNvsGTf3-DfRYC8MF.js} +1 -1
- package/dist/assets/{DashboardReportPage-DvUvM8lA-TbzG3eRo.js → DashboardReportPage-CUDj-apD-ts1UyW1y.js} +1 -1
- package/dist/assets/{DashboardSidebarBackgroundAnimation-CAa8yETt-DQCrZOMm.js → DashboardSidebarBackgroundAnimation-CqoYqd3k-CpbMxsi5.js} +1 -1
- package/dist/assets/{DepositAccTransactionItem-VZZvr2Gl-DJKdJrGG.js → DepositAccTransactionItem-By315-ia-B67a47Nt.js} +1 -1
- package/dist/assets/{DepositAccTransactionListPage-xt11Y65Z-XwfRqCiv.js → DepositAccTransactionListPage-BmdduHVH-CuW0haDa.js} +1 -1
- package/dist/assets/{DomesticWireDetailsPage-DmE3TVQk-C-QBeWMe.js → DomesticWireDetailsPage-BycRPXWv-BEmLm9iF.js} +1 -1
- package/dist/assets/{DownloadOverlay-DBhAvmRv-Cj3ahlAG.js → DownloadOverlay-CD44fdp2-CcGw9J34.js} +12 -12
- package/dist/assets/{DrawerPage-BSy9zQ8e-VOTcl_Us.js → DrawerPage-DttoShZY-B4SEX4Vc.js} +1 -1
- package/dist/assets/{EditPeoplePage-DyaHesFS-Bus9x57q.js → EditPeoplePage-Cwz1PxMH-D0oC_7he.js} +3 -3
- package/dist/assets/{EditReimbursementDetailPage-EEKR__zQ-BoWF0JFB.js → EditReimbursementDetailPage-B8EIR_aw-BLg2ffib.js} +1 -1
- package/dist/assets/{EntityDetailPage-BECoxBfR-BiJ_8Jzz.js → EntityDetailPage-BSRVaRvy-DmyuhLfY.js} +3 -3
- package/dist/assets/{EntitySummarySection-wzMCZjZE-2-RWnlxw.js → EntitySummarySection-D3_1EeVb-4HGU6F7u.js} +1 -1
- package/dist/assets/{ExpenseAutomationOverviewPage-MlPZZ_Mz-C8FIABO0.js → ExpenseAutomationOverviewPage-BumVHdQ7-Dr0SJny6.js} +13 -13
- package/dist/assets/{ExpenseAutomationPage-mdYWsafr-BLvFXWYb.js → ExpenseAutomationPage-DL86YKcI-D7VmjVTK.js} +55 -55
- package/dist/assets/{ExpressPayPage-Dg03hVzu-Bd-Xf2bN.js → ExpressPayPage-B2ZL_U_8-Ct1T6Hqd.js} +7 -7
- package/dist/assets/{FeaturePreviewPage-BePsYONK-DM7rJpB4.js → FeaturePreviewPage-abZRtNJ_-DtOlQ1ve.js} +1 -1
- package/dist/assets/{FollowStepsSection-BqqrsOIP-DLXO6q5D.js → FollowStepsSection-UY5sAJeD-D9y-FlM_.js} +9 -9
- package/dist/assets/{GlobalReviewListPage-BVpHhHli-BA06L24b.js → GlobalReviewListPage-ao32krvU-CyxgvmBU.js} +10 -10
- package/dist/assets/{HelpButton-DXDj1Qju-6dCR8Tek.js → HelpButton-Dz3Ra_Sl-C1T3rERY.js} +4 -4
- package/dist/assets/{InformationCardStack-CauWOEJQ-DKSteiOb.js → InformationCardStack-CeLIUYk5-Cx3xXrtg.js} +1 -1
- package/dist/assets/{InsightsCardStack-C-52awo8-BWPPl14z.js → InsightsCardStack-CabSexOm-CpBekjTt.js} +8 -8
- package/dist/assets/{InsightsSection-Bq2ZlQ8--AuQEFpFd.js → InsightsSection-CaYMAnck-vZ6q8Jpt.js} +1 -1
- package/dist/assets/{IntegrationsSettingsPage-CQCxjOHh-B1T5nZLs.js → IntegrationsSettingsPage-BI7RHtQ2-DWoQgO4y.js} +1 -1
- package/dist/assets/{InternationalWireSwiftDetailsPage-Bi3ERJ96-C62elPax.js → InternationalWireSwiftDetailsPage-iR-F32ot-BUfcTb0n.js} +6 -6
- package/dist/assets/{InternationalWireVerificationPage-DhX_OpJ6-DhDVwdIK.js → InternationalWireVerificationPage--IRCwUc5-BK__pdsC.js} +5 -5
- package/dist/assets/{InviteFormPage-BJkMxjIE-DGYtt6Bs.js → InviteFormPage-D-YEfvJT-B46eQD-N.js} +8 -8
- package/dist/assets/{InvitePageListView-0zD-YAJA-DGIFJ6Lx.js → InvitePageListView-CNvU2ppT-BsPD9T0R.js} +20 -20
- package/dist/assets/{InvitePeoplePage-CvQNFpjb-MEqiKB1j.js → InvitePeoplePage-CteRDO3k-CzXdrj66.js} +3 -3
- package/dist/assets/{InvoiceUploadSection-BrnUjxIH-BMdRzxGt.js → InvoiceUploadSection-BQXqcLvW-YGmVjGWZ.js} +3 -3
- package/dist/assets/{IssueChargeCardPage-agEqgGPg-BMz7PYBf.js → IssueChargeCardPage-BIgcCnpo-PcUOQWwy.js} +1 -1
- package/dist/assets/{LabeledAddressValue-DphNZz4y-D0KCXzO6.js → LabeledAddressValue-CiDQX1xa-x9cH1NH3.js} +1 -1
- package/dist/assets/{LabeledAddressValueField-DBlBlkO_-DoPRS3as.js → LabeledAddressValueField-C5jrFFUs-CwCL74Dg.js} +1 -1
- package/dist/assets/{LabeledControlledCheckBoxField-CBRqbUDe-UzdHSUCG.js → LabeledControlledCheckBoxField-jqiHQZso-Y1bdaQMv.js} +1 -1
- package/dist/assets/{LabeledCreatableSingleSelectField-DOjtbusw-TXDXUD5J.js → LabeledCreatableSingleSelectField-DGZvzuxH-BpSZ7zl7.js} +7 -7
- package/dist/assets/{LabeledDocumentField-Bxggz66t-Cn_PeJ5g.js → LabeledDocumentField-hUiqS32j-vbaQx3SD.js} +4 -4
- package/dist/assets/{LabeledDropDownFormattedTextField-1dqcE0E4-t0ucdhBH.js → LabeledDropDownFormattedTextField-CZdzpmL1-pUn4RDCV.js} +5 -5
- package/dist/assets/{LabeledText-BJFW2h6S-G87zH92R.js → LabeledText-DopMzeZ3-CYS48zTu.js} +1 -1
- package/dist/assets/{LabeledUserSingleSelectWithSubtitlesField-CLzwYw4O-Cs6PJnR2.js → LabeledUserSingleSelectWithSubtitlesField-CkRg249v-BoH-kRZ0.js} +5 -5
- package/dist/assets/{LabeledZeniRolesDropDownField-DGsJbILm-CWOq9g0f.js → LabeledZeniRolesDropDownField-CwkMUU9L-CBkGnuEd.js} +11 -11
- package/dist/assets/{LinkJETransactionPage-CvdbDO5J-Dcaiimar.js → LinkJETransactionPage-CcnQYwcu-Cpho8XzH.js} +3 -3
- package/dist/assets/{LowBalancePopup-BhLxnyK0-C1-HIC13.js → LowBalancePopup-_1OrPez7-DZkbi_Py.js} +2 -2
- package/dist/assets/{MagicLinkACHDetailsPage-CcD-_iOV-Cmloa6Sl.js → MagicLinkACHDetailsPage-DXP0qFGK-DoB9MNyO.js} +1 -1
- package/dist/assets/{MagicLinkDomesticWireDetailsPage-C-YfhiNr-DU52Xxm4.js → MagicLinkDomesticWireDetailsPage-BycJq6br-DGH4aq0c.js} +1 -1
- package/dist/assets/{MagicLinkInternationalWireDetailsPage-DXZBFcUc-DORqbysw.js → MagicLinkInternationalWireDetailsPage-NjVjY4fp-D6XTRyzt.js} +1 -1
- package/dist/assets/{MagicLinkSuccessPage-OikwemO4-2MjmaIoT.js → MagicLinkSuccessPage-y19ecMSL-Bjh9JkfG.js} +1 -1
- package/dist/assets/{MagicLinkTitleSection-CcsVjT5g-m8-ZbWiA.js → MagicLinkTitleSection-CdijIZYn-kUHi3mP3.js} +4 -4
- package/dist/assets/{MailingDetailsSection-ClULuPML-c4uvK-xV.js → MailingDetailsSection-Cw-CO-oE-9IZJYTUD.js} +1 -1
- package/dist/assets/{MeetingCalenderPopup-DJHrBVXi-YYH5fhwe.js → MeetingCalenderPopup-CQ2sUCtg-BBwyYnnQ.js} +1 -1
- package/dist/assets/{Menu-C3EXvt9P-HAcVl0uR.js → Menu-Cz6zGt86-BijWmw2b.js} +3 -3
- package/dist/assets/{MyBankConnectionsSettingsPage-Cn-dlR5V-D5W9TQDI.js → MyBankConnectionsSettingsPage-DRmOdZ9_-D1GaIeKu.js} +7 -7
- package/dist/assets/{MyPendingActivationChargeCardListPage-B3xeafnf-LCbTSPzT.js → MyPendingActivationChargeCardListPage-CtFUm3NW-ChKpZI-w.js} +1 -1
- package/dist/assets/{MyProfileSettingsPage-CcyS0ijJ-CTU0B5fO.js → MyProfileSettingsPage-ejULQTzV-CUdJEZnq.js} +7 -7
- package/dist/assets/{NavBarWithPicker-C3MsVwsg-BuAxA6W9.js → NavBarWithPicker-C-QfNv7i-BGeKGKav.js} +3 -3
- package/dist/assets/{NavigationArrow-DSMn_azz-Bn7cke7g.js → NavigationArrow-kQmX-M7U-Qn8Td-4a.js} +1 -1
- package/dist/assets/{NavigationDots-BiiEFlFj-xZJ5-o7_.js → NavigationDots-nUALE4y--DPaRfQ3k.js} +1 -1
- package/dist/assets/{NewGlobalMerchantPage-DJ0zT8Xy-Cj0gRV8r.js → NewGlobalMerchantPage-D1NQ_h-e-CCmfop3O.js} +5 -5
- package/dist/assets/{NoDataChart-O6Mg_gf4-BzMtzTAz.js → NoDataChart-BmcrokSp-mktpp4Ge.js} +4 -4
- package/dist/assets/{NoDataTable-BgKg_U0s-CmmkF752.js → NoDataTable-BKAiKOOM-BMD8AGW2.js} +1 -1
- package/dist/assets/{NotFoundPage-DA6cvlNW-DlMJJWcU.js → NotFoundPage-B-wGvM-5-CoGsI8QE.js} +3 -3
- package/dist/assets/{NotificationSettingsPage-BwqCG-6J-DWqf_cVg.js → NotificationSettingsPage-BKQcK-_r-CZ2o6aQV.js} +4 -4
- package/dist/assets/{NotificationsListConfig-DqM-Z8oE-CAKzU3R_.js → NotificationsListConfig-C5pyiij--CMy_5rqB.js} +1 -1
- package/dist/assets/{NotificationsPage-iYF222-C-DUKthO_-.js → NotificationsPage-kpBbd-do-DQ3PZPcz.js} +13 -13
- package/dist/assets/{OpExByVendorPage-BwekpbHo-BjGBd6JN.js → OpExByVendorPage-CWi3CBRt-C5BCEXdz.js} +4 -4
- package/dist/assets/{OverlayContainerPage-Bmu909Fo-BQsfSCAm.js → OverlayContainerPage-Bmu909Fo-A-nPKfyl.js} +1 -1
- package/dist/assets/{PandLWithForecastPage-B7IxSSMo-BTaoWXQH.js → PandLWithForecastPage-DyWdR8ii-sU4Bj-a8.js} +5 -5
- package/dist/assets/{PaymentAccountSetupBillingAddressSection-CJk4EUwr-ABl4cOzL.js → PaymentAccountSetupBillingAddressSection-Cq7pdtPH-CzJADBF9.js} +8 -8
- package/dist/assets/{PeoplePage-97Qe6dqr-DdMIC7eB.js → PeoplePage-CPaoZBpL-Dgke3QJy.js} +25 -25
- package/dist/assets/{PortfolioAllocationFormPage-Df2lZK30-l0pxfNTg.js → PortfolioAllocationFormPage-DX6o84wl-DSlUdRlT.js} +3 -3
- package/dist/assets/{PortfolioDetails-CGVqC5q--CSueTA8J.js → PortfolioDetails-C1iLJHLZ-CesK17A1.js} +1 -1
- package/dist/assets/{ProductsCarousel-DqvLLayZ-CS-GjIhF.js → ProductsCarousel-DjFdVKD1-hE-u6a08.js} +1 -1
- package/dist/assets/{PromoBaseCards-Bq-mwvkh-p9T1FVNn.js → PromoBaseCards-CizR6Pvp-CqSOUop-.js} +2 -2
- package/dist/assets/{QBOConnectionDialog-DWZd5o0q-K6Wt7Neh.js → QBOConnectionDialog-2HqFAb-Q-sQRSSCIF.js} +4 -4
- package/dist/assets/{QBOSetupSection-B_V2Y6DW-BLaB9-z0.js → QBOSetupSection-9O9ML9R8-BXn0JWS0.js} +4 -4
- package/dist/assets/{ReimbursementApprovalRuleDetailPage-hWUoXT59-Y3oG-ekm.js → ReimbursementApprovalRuleDetailPage-CQOS4wJ2-zxPk7wqx.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRulesPage-C20mPnJH-DBrdoBR7.js → ReimbursementApprovalRulesPage-VuQN7m71-BZUH-GLu.js} +4 -4
- package/dist/assets/{ReimbursementDetailPage-DAVdVUp0-DebCxtKg.js → ReimbursementDetailPage-D2pO4hgr-vjcNMRqh.js} +6 -6
- package/dist/assets/{ReimbursementPromoPage-TKdLARUD-DsJNpIcv.js → ReimbursementPromoPage-D3p8iwHa-z2IAojJU.js} +9 -9
- package/dist/assets/{ReimbursementSetUpPage-CW10ZPs7-CIw76iEF.js → ReimbursementSetUpPage-OR8ECt9X-Bx512tje.js} +4 -4
- package/dist/assets/{ReimbursementsBulkReviewDrawerPage-_rgixsBG-BMXQONLy.js → ReimbursementsBulkReviewDrawerPage-DhjfNcO4-DvhEuIE0.js} +1 -1
- package/dist/assets/{ReloadCard-Bzt6gIzi-D5O4Gcf_.js → ReloadCard-NvfxlEQu-BnXQfMVk.js} +1 -1
- package/dist/assets/{ReportTableViewSelector-CPc3yRAI-BKmgR9zr.js → ReportTableViewSelector-B599qAeN-BwwOFFi3.js} +1 -1
- package/dist/assets/{ReportsPage-DIHjl3Xd-DULYM4bB.js → ReportsPage-Bc-rf7lL-BubUWknL.js} +1 -1
- package/dist/assets/{RevenueChart-MkoD0EoE-D92CgGXq.js → RevenueChart-BtTx8haN-Ci6KFTHz.js} +12 -12
- package/dist/assets/{ReviewDetailsPage-B96vIWt9-BUkzSnt4.js → ReviewDetailsPage-Bm9qlI1L-DnX2Wm0A.js} +5 -5
- package/dist/assets/{ReviewOverlay-CKOAcLzJ-BPHtj3ml.js → ReviewOverlay-C90OnldQ-BJwck8Vp.js} +9 -9
- package/dist/assets/{RoleWithToolTip-BiydziFE-VYITxPfh.js → RoleWithToolTip-Cav6Dtwi-DQjRjWwX.js} +1 -1
- package/dist/assets/{ScheduleDetailsFixedAssetsPage-Ce2BDLCX-CXENWEZF.js → ScheduleDetailsFixedAssetsPage-BIbtbzlS-Dq-JIBXg.js} +3 -3
- package/dist/assets/{ScheduleDetailsPage-ClK-ymjD-DRsYGv0y.js → ScheduleDetailsPage-BSVBoMe5-DfcysezY.js} +3 -3
- package/dist/assets/{ScheduleSequenceTable-BOFaTbv5-CCscivOS.js → ScheduleSequenceTable-C9IcAd6X-B0s-FwXu.js} +5 -5
- package/dist/assets/{ScreenRoutes-CUUBxQES.js → ScreenRoutes-C_yyAtD4.js} +1 -1
- package/dist/assets/{SetUpAccountSection-DPEjJt-s-BxHjDLDI.js → SetUpAccountSection-Daj9lEze-CHRC6PUj.js} +4 -4
- package/dist/assets/{SetUpDefaultSection-Br-a1ECs-BuLgUcqJ.js → SetUpDefaultSection-CKg9xvyM-V31Vr9Jm.js} +2 -2
- package/dist/assets/{SignIn-B7p2vrI4-CBu4DRgp.js → SignIn-BFm1M4_6-R5KiOJ_3.js} +18 -18
- package/dist/assets/{SignInScreen-Dum3srgp.js → SignInScreen-CPbq6PuC.js} +1 -1
- package/dist/assets/{SpendManagementListViewPage-Ds1WRCNc-B03dml86.js → SpendManagementListViewPage-D6fZPLMz-Z_0NC1QS.js} +3 -3
- package/dist/assets/{SpendManagementPerTabPage-uBi60ESx-Dq7iQQx4.js → SpendManagementPerTabPage-jQjzrKl2-CR9tWVBr.js} +18 -18
- package/dist/assets/{SpendManagementSection-CESND8ho-DCrlaUqA.js → SpendManagementSection-BaiWgwp--Dp3HO5CH.js} +5 -5
- package/dist/assets/{SpendMgmtSetupAccountSection-CiPoUdg_-CelUMY-y.js → SpendMgmtSetupAccountSection-BUSFBsmA-Wg-n8Wde.js} +7 -7
- package/dist/assets/{StatementItem-BSfAH9fl-diu3-gbg.js → StatementItem-BeGyTVOf-Ccqz_NBL.js} +4 -4
- package/dist/assets/{StatementsPage-BQ-wkg9f-DMW87IGZ.js → StatementsPage-2uPMvTEy-De7Uac1v.js} +1 -1
- package/dist/assets/{StatusSwitcher-CoX1TvcC-B2wGlPZJ.js → StatusSwitcher-CwLbXjIU-CJO3kP8v.js} +1 -1
- package/dist/assets/{SubTabSwitcher-C4Kvmep7-DJj8T55V.js → SubTabSwitcher-D3bFqk8P-DL4oUfiQ.js} +1 -1
- package/dist/assets/{SummaryCard-Cdh_w38m-yg2TCiEc.js → SummaryCard-BNrQ7g3--CGMMw0Tk.js} +1 -1
- package/dist/assets/{TaskManagementPage-CCiARHPO-CeRR-xF8.js → TaskManagementPage-Y58wtgRN-CUHNN86c.js} +15 -15
- package/dist/assets/{TimeRangeSwitcher-CMNnx0hW-DfOU0-FY.js → TimeRangeSwitcher-CQd079aU-C6Twt9kC.js} +1 -1
- package/dist/assets/{TimeframeSwitcher-BAkn3cys-dF_t-50z.js → TimeframeSwitcher-Du60ffZv-BeSFHMlL.js} +1 -1
- package/dist/assets/{TimeframeSwitcherWithToggle-Bp8FBsnD-NXYHSu6I.js → TimeframeSwitcherWithToggle-DPManiX8-CS5OwAMc.js} +1 -1
- package/dist/assets/{TopExCard-CH7QX8Xe-Dq7lj8sK.js → TopExCard-sH5ZVrBJ-i2TO4vcJ.js} +2 -2
- package/dist/assets/{TopExDetailPage-CJuOpApW-D7FKWD-V.js → TopExDetailPage-DiOHO_q9-BJm1edqQ.js} +11 -11
- package/dist/assets/{TransactionDetailPage-280hbOwA-B8cgDD3N.js → TransactionDetailPage-NaMbYUr8-Da3GPc9Y.js} +13 -13
- package/dist/assets/{TransactionList-BV18tWaE-BQKRF29H.js → TransactionList-Bsma20IC-CJ7iiCLF.js} +4 -4
- package/dist/assets/{TransactionListBig-DmVgWxvf-DHGIWOoC.js → TransactionListBig-BwMUiFzK-_BeDx_E5.js} +10 -10
- package/dist/assets/{TransactionListPage-CE61eqZh-vtVmAgv2.js → TransactionListPage-BRKVdJ4P-D3ULhVil.js} +4 -4
- package/dist/assets/{TransactionVendorDetailPage-CKRUJzG5-D3thb3cP.js → TransactionVendorDetailPage-DuJ1piCd-Z4okEL-Q.js} +3 -3
- package/dist/assets/{TransferDrawerPage-DdIXX8dR-DrExDhl3.js → TransferDrawerPage-PmiYXfAU-BQhQZtnl.js} +15 -15
- package/dist/assets/{TreasuryOverviewPage-D9NcFBhg-iy_GLL-M.js → TreasuryOverviewPage-M6fv3b34-CcznAXU3.js} +101 -104
- package/dist/assets/{TreasuryPromoPage-BKXMayjO-B4uiGon7.js → TreasuryPromoPage-D48c4Ulh-B2QYQTc4.js} +12 -12
- package/dist/assets/{TreasurySetupPage-Bo24F7wL-DuPfGbF_.js → TreasurySetupPage-BPsw-DhK-BqfOjb-x.js} +4 -4
- package/dist/assets/{TreasuryStatementsPage-DUKtmwwf-D1_Zhdj-.js → TreasuryStatementsPage-BEun-dwQ-D-vCxxYM.js} +1 -1
- package/dist/assets/{TreasuryTaxLetterPage-vqThZpY5-DG75nAAt.js → TreasuryTaxLetterPage-CsQ5biUP-CG-uin7p.js} +1 -1
- package/dist/assets/{TreasuryTransferOrReviewPage-1Kqod57a-DA3XAHpW.js → TreasuryTransferOrReviewPage-CxhE8fh7-Cf05TRJh.js} +39 -39
- package/dist/assets/{TrendChart-uCE73Vf8-XEufcUTW.js → TrendChart-CkUKN6L9-CYj8AG4h.js} +3 -3
- package/dist/assets/{TrendWithTransactions-lNYrtUkf-CsE_Q_OW.js → TrendWithTransactions-4pDf20tw-Bfat4sT9.js} +4 -4
- package/dist/assets/{UncategorizedAccountsMappingPage-CbLMkBab-DyTfUg06.js → UncategorizedAccountsMappingPage-DZBy-Goh-5f67nsQo.js} +7 -7
- package/dist/assets/{UnitIntegrationPage-DzfchgLS-CZgF7SP-.js → UnitIntegrationPage-DG-KGQDb-BLUtVLjp.js} +2 -2
- package/dist/assets/{UploadAdditionalDocumentOverlay-CJwjYpvy-DECImHlx.js → UploadAdditionalDocumentOverlay-DrZAnHqz-c6P-4NDi.js} +1 -1
- package/dist/assets/{Vendor2FAPopup-BDatjVhv-DiVAW67d.js → Vendor2FAPopup-CaiUvPMo-By8aU9uB.js} +1 -1
- package/dist/assets/{VendorACHDetailsPage-BTo9s38E-DN6GrIjX.js → VendorACHDetailsPage-CHoh0E0P-EqmntQKd.js} +1 -1
- package/dist/assets/{VendorDetailPage-DOdRZKwE-DrZ4pQ2p.js → VendorDetailPage-CroHdVMA-C-Wc1kYJ.js} +9 -9
- package/dist/assets/{VendorDomesticWireDetailsPage-Ch_HedkY-DDDapGI9.js → VendorDomesticWireDetailsPage-DC17Qom9-C3oEikuC.js} +1 -1
- package/dist/assets/{VendorFiling1099EditablePage-ChgTi2cq-osgHnUPX.js → VendorFiling1099EditablePage-Bom6X8Sg-DHjxnakQ.js} +14 -14
- package/dist/assets/{VendorFirstReviewPage-C_HBOo29-Cun14S2s.js → VendorFirstReviewPage-6eptnez2-B7div4WL.js} +1 -1
- package/dist/assets/{VendorInternationalWireDetailsPage-Ct42LbtQ-DOq8ZA0S.js → VendorInternationalWireDetailsPage-C_CH7xDF-fHUjobrM.js} +9 -9
- package/dist/assets/{VendorInternationalWireSwiftDetailsPage-CalHOqYH-DlK1SL0S.js → VendorInternationalWireSwiftDetailsPage-BEzPWQbD-DdQpKH5i.js} +1 -1
- package/dist/assets/{VendorsAccountsSection-Briqd_pt-BkWk4En6.js → VendorsAccountsSection-Z-ebKmVQ-DbcI_-8-.js} +2 -2
- package/dist/assets/{VerifyDevice-DxP4a4YR-hED-bTkI.js → VerifyDevice-76nFunfs-3WPg6QL8.js} +1 -1
- package/dist/assets/{VideoPlayer-DqRss8fV-B4rpzoFE.js → VideoPlayer-CV7o-_bq-BWNDFwag.js} +1 -1
- package/dist/assets/{VideoPopup-CwEiOVHQ-SE5re7pU.js → VideoPopup-CbaFtkFn-BG3oU3yl.js} +1 -1
- package/dist/assets/{WarningsDrawerPage-Cdd0mag5-Bja6dfag.js → WarningsDrawerPage-Bg7iDQqy-BITRncLa.js} +1 -1
- package/dist/assets/{ZeniAccountDetailPage-5sn9Wphj-CqKMTn67.js → ZeniAccountDetailPage-DYidbJtT-qtM4JbUS.js} +14 -14
- package/dist/assets/{ZeniAccountListViewPage-BLCYWphf-DSieyxJQ.js → ZeniAccountListViewPage-CVkzRUil-DQ8A3VZl.js} +7 -7
- package/dist/assets/{ZeniAccountNavBarPieces-Cwo5QtoT-0DDIjO4b.js → ZeniAccountNavBarPieces-DaHGosco-D-yA-Drc.js} +1 -1
- package/dist/assets/{ZeniAccountPromoPage-CKQOu6Ab-B0_2BOIj.js → ZeniAccountPromoPage-CXr_ud4S-C9YOWT8M.js} +10 -10
- package/dist/assets/{ZeniAccountSetupPage-BW1l7qJf-KyzYMO16.js → ZeniAccountSetupPage-Bqng7laZ-DKzqXw5c.js} +4 -4
- package/dist/assets/{ZeniCopyright-B6fSw5kZ-BEYdzvFL.js → ZeniCopyright-1d-n5uOX-ChnFnWfn.js} +1 -1
- package/dist/assets/{ZeniTransferAmountSlider-DgkjDK9D-C-vYTTkf.js → ZeniTransferAmountSlider-C63JbsJx-BbpyFTKu.js} +4 -4
- package/dist/assets/{analyticsHelper-sMuDd6mq.js → analyticsHelper-Cjbr9XB0.js} +1 -1
- package/dist/assets/{analyticsHelper-BIYs-BU5-DiR7zn-J.js → analyticsHelper-I0lsXzXl-DMfD2BoN.js} +1 -1
- package/dist/assets/{chartTypes-BFc-FQm9-DH8jC-PX.js → chartTypes-D1Bn4xHa-xYwPwpPb.js} +1 -1
- package/dist/assets/{commonDimensions-B_ShoU61-DERccKE1.js → commonDimensions-0W6wokPG-Cd83l0QX.js} +1 -1
- package/dist/assets/{detailCommon-CoFrLjgw-DYR8VDfk.js → detailCommon-CtOYz9rQ-C2GqRiaA.js} +6 -6
- package/dist/assets/{downloadPdf-yID9qiGz-DQvfiOaT.js → downloadPdf-BZd85Ssn-CFK_x6gO.js} +1 -1
- package/dist/assets/{index-BKug3-eP.js → index-0QGih61V.js} +1871 -1871
- package/dist/assets/{mapLoadingInProgressToTreeNode-xaG_j34l-BbRC2p3V.js → mapLoadingInProgressToTreeNode-CMYVZuQF-Dz_C0WS4.js} +1 -1
- package/dist/assets/{mapSectionWithAcOnlyToTreeNode-Cf1Q8iLQ-Dl9HYo3q.js → mapSectionWithAcOnlyToTreeNode-DTb8IvgM-B1dWpiWC.js} +1 -1
- package/dist/assets/{mapSpacerToTreeNode-CiLMcagY-B9z3eGZE.js → mapSpacerToTreeNode-B_jfScE8-BZjIqfg0.js} +1 -1
- package/dist/assets/{mapTimeframeBalancesToTreeNode-VuMYRsaA-Bkr18cUs.js → mapTimeframeBalancesToTreeNode-BEOhNOy1-DAEXm4ZG.js} +1 -1
- package/dist/assets/{mapTimeframeBalancesToTreeNode-BpcCExFt-aaQ9hedR.js → mapTimeframeBalancesToTreeNode-Gxa-yiq_-Dyh-lexC.js} +1 -1
- package/dist/assets/{mapTimeframeHeaderLoadingInProgressToTreeNode-Cfz6o8XS-DipjgrJy.js → mapTimeframeHeaderLoadingInProgressToTreeNode-BD4cN4l4-6Aq9xydh.js} +1 -1
- package/dist/assets/{toCOABalancesWithID-CL2W-2Ks-BJ5hpOjH.js → toCOABalancesWithID-BVyQC9pt-C2mN3lRp.js} +1 -1
- package/dist/assets/{toChartData-CD4rOlNx-CQ_TJxU1.js → toChartData-BRdwPc1X-CHkEigWV.js} +1 -1
- package/dist/assets/{treasuryColorHelper-DHqBe6al-lMeWD10s.js → treasuryColorHelper-DrayAnYl-DEH_6Uhe.js} +1 -1
- package/dist/assets/{uploadAttachment-Bqf6VI3L-BGJCHQ2n.js → uploadAttachment-Cx3js1c7-BXnz9UFJ.js} +16 -16
- package/dist/assets/{uploadReceipts-dxsKhm9I-DS2NFPcM.js → uploadReceipts-dxsKhm9I-DUj1wGX2.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/CheckDepositDrawerPage-DmszT7bh-1ikOwRZW.js +0 -206
- package/dist/assets/CustomerOnboardingContainerPage-BAZbPHa2-AeHBObO9.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as G,u as U,R as y,Y as he,l as _,j as r,W as k,bg as fe,aZ as me,aX as ge,C as v,o as C,a6 as _e,m as be,bh as Se,q as w,I as B,J as Q,bi as we,a8 as Ce,aD as ye,b0 as xe}from"./index-BKug3-eP.js";import{b as P,f as X,n as b}from"./vendor-rkTZJa59.js";import{m as z,l as H}from"./analyticsHelper-BIYs-BU5-DiR7zn-J.js";import{h as Oe}from"./ReportTableViewSelector-CPc3yRAI-BKmgR9zr.js";import{a as K,p as Re}from"./TimeRangeSwitcher-CMNnx0hW-DfOU0-FY.js";import{M as Ae}from"./TimeframeSwitcherWithToggle-Bp8FBsnD-NXYHSu6I.js";import{DownloadOverlayButton as Be}from"./DownloadOverlay-DBhAvmRv-Cj3ahlAG.js";import{R as ve,W as F,x as ee}from"./CollapsableReportTable-CHthdzdj-DiXbx-o4.js";import{T as te,I as se,L as j,D as Te,g as ne}from"./mapSectionWithAcOnlyToTreeNode-Cf1Q8iLQ-Dl9HYo3q.js";import{s as Y}from"./mapTimeframeBalancesToTreeNode-VuMYRsaA-Bkr18cUs.js";import{d as Le,l as Pe}from"./mapTimeframeHeaderLoadingInProgressToTreeNode-Cfz6o8XS-DipjgrJy.js";import{d as ke}from"./mapLoadingInProgressToTreeNode-xaG_j34l-BbRC2p3V.js";import"./mui-C42whWwM.js";import"./analytics-CcevxdRy.js";import"./routing-CH3KJxCW.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-CK3r1iTV.js";import"./TimeframeSwitcher-BAkn3cys-dF_t-50z.js";import"./page-detail-CWX5S47F-BBa5wfAm.js";import"./AccountRow-DnMX1pTV-Dch-yrS1.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=Le({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(Te({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{e as G,u as U,R as y,Y as he,l as _,j as r,W as k,bg as fe,aZ as me,aX as ge,C as v,o as C,a6 as _e,m as be,bh as Se,q as w,I as B,J as Q,bi as we,a8 as Ce,aD as ye,b0 as xe}from"./index-0QGih61V.js";import{b as P,f as X,n as b}from"./vendor-rkTZJa59.js";import{m as z,l as H}from"./analyticsHelper-I0lsXzXl-DMfD2BoN.js";import{h as Oe}from"./ReportTableViewSelector-B599qAeN-BwwOFFi3.js";import{a as K,p as Re}from"./TimeRangeSwitcher-CQd079aU-C6Twt9kC.js";import{M as Ae}from"./TimeframeSwitcherWithToggle-DPManiX8-CS5OwAMc.js";import{DownloadOverlayButton as Be}from"./DownloadOverlay-CD44fdp2-CcGw9J34.js";import{R as ve,W as F,x as ee}from"./CollapsableReportTable-s_gsuEBP-C1aC-SHP.js";import{T as te,I as se,L as j,D as Te,g as ne}from"./mapSectionWithAcOnlyToTreeNode-DTb8IvgM-B1dWpiWC.js";import{s as Y}from"./mapTimeframeBalancesToTreeNode-BEOhNOy1-DAEXm4ZG.js";import{d as Le,l as Pe}from"./mapTimeframeHeaderLoadingInProgressToTreeNode-BD4cN4l4-6Aq9xydh.js";import{d as ke}from"./mapLoadingInProgressToTreeNode-CMYVZuQF-Dz_C0WS4.js";import"./mui-C42whWwM.js";import"./analytics-CcevxdRy.js";import"./routing-CH3KJxCW.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-CK3r1iTV.js";import"./TimeframeSwitcher-Du60ffZv-BeSFHMlL.js";import"./page-detail-CWX5S47F-BBa5wfAm.js";import"./AccountRow-B8_6Pf4a-BXi7G1sU.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=Le({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(Te({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};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{u as A,j as a,R as S,e as de,W as Ae,aj as
|
|
1
|
+
import{u as A,j as a,R as S,e as de,W as Ae,aj as Q,b7 as Te,q as E,b8 as J,aw as ee,v as M,av as ae,ab as re,b9 as oe,ba as ge,o as m,bb as te,f as g,J as Fe,bc as pe,bd as me,C as xe,be as fe,x as P,bf as F,ap as V}from"./index-0QGih61V.js";import{b as R,f as le,n as x}from"./vendor-rkTZJa59.js";import{p as b,d as ne,y as W,b as N,g as se,u as T}from"./chartTypes-D1Bn4xHa-xYwPwpPb.js";import{i as K,h as ce,c as I}from"./toCOABalancesWithID-BVyQC9pt-C2mN3lRp.js";import{V as Z}from"./toChartData-BRdwPc1X-CHkEigWV.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};
|
|
@@ -27,9 +27,9 @@ import{u as A,j as a,R as S,e as de,W as Ae,aj as Z,b7 as Te,q as E,b8 as J,aw a
|
|
|
27
27
|
margin-right: ${m.sp2};
|
|
28
28
|
`,Xe=x(P)`
|
|
29
29
|
text-align: left;
|
|
30
|
-
`,
|
|
30
|
+
`,Ze=x(P)`
|
|
31
31
|
text-align: right;
|
|
32
|
-
`,
|
|
32
|
+
`,Qe=({active:e,payload:r})=>{const t=[];return r?.forEach(n=>{const o=n.name;if(e===!0){const l=n.payload,i=n.color,h=o!=null&&l.record[o]!=null?l.record[o].amount:void 0;t.push({barName:S.getLocalizedStrings().chartCard.cashInCashOut[N(o)],value:h,color:i})}}),t},be=e=>e.map((r,t)=>a.jsxs(qe,{color:r.color,children:[a.jsxs(Xe,{children:[a.jsx(Ue,{color:r.color}),`${r.barName}:`]}),a.jsx(Ze,{children:`${T(r.value)}`})]},r.barName+t)),Je=e=>{const r=Qe({...e});return r.length===0?null:a.jsx(Ve,{children:a.jsxs(Ye,{children:[be(r.slice(0,r.length-1)),r.length?a.jsx(He,{}):null,be(r.slice(-1))]})})},ea=le.memo(Je),aa=(e,r,t,n,o)=>{let l=[],i=[],h=[];t!=null&&t.balances.length>0&&(l=K("cash_in","actual",t)),n!=null&&n.balances.length>0&&(i=K("cash_out","actual",n)),o!=null&&o.balances.length>0&&(h=ce("net_cash_flow","actual",o));const c=b("cash_in","actual"),s=b("cash_out","actual"),f=b("net_cash_flow","actual"),p=l.length>0?c:i.length>0?s:void 0,d={};return d[c]=l,d[s]=i,d[f]=h,p!=null?Z(e,r,p,d):void 0},ye=[b("cash_in","actual"),b("cash_out","actual"),b("net_cash_flow","actual")],ra=x.div`
|
|
33
33
|
width: ${e=>e.width}px;
|
|
34
34
|
height: ${e=>e.height}px;
|
|
35
35
|
|
|
@@ -42,7 +42,7 @@ import{u as A,j as a,R as S,e as de,W as Ae,aj as Z,b7 as Te,q as E,b8 as J,aw a
|
|
|
42
42
|
`,oa=x(fe)`
|
|
43
43
|
margin-left: ${e=>q.legendLabelMarginLeft.valuePx(e.windowSize)};
|
|
44
44
|
color: ${e=>e.theme.colors.primary};
|
|
45
|
-
`;function Rr({selectedRangeReport:e,timeframe:r,highlightedRange:t,width:n,height:o,showBarHoverBackground:l,isDetailPage:i,onCOABalancesRangeChanged:h}){const c=A(),s=R.useRef(!1);R.useEffect(()=>{s.current=!0},[]);const f=[c.colors.graphColor33,c.colors.graphColor36,c.colors.graphColor35],p=(_,w=c.colors.graphColor08)=>_<f.length?f[_]:w,d=aa(e.firstMonthOfFY,ye,e.cashIn,e.cashOut,e.netCashFlow),y=()=>{const _=[];return ye.forEach((w,C)=>{const L=i===!0&&!s.current;_.push(a.jsx(te,{name:w,animationDuration:L?500:void 0,style:{cursor:"pointer"},legendType:"square",dataKey:$=>{const k=$.record;return(k[w]!=null&&k[w].amount!=null?k[w].amount:void 0)?.amount??0},fill:p(C)},w))}),_};return d==null?null:a.jsx(ta,{chartData:d,timeframe:r,showBarHoverBackground:l,barElements:y(),customToolTipContent:({active:_,payload:w})=>a.jsx(ea,{active:_,payload:w}),width:n,height:o,onCOABalancesRangeChanged:h,highlightedRange:t,isDetailPage:i===!0})}const ta=({chartData:e,timeframe:r,barElements:t,customToolTipContent:n,highlightedRange:o,width:l,height:i,showBarHoverBackground:h,isDetailPage:c,onCOABalancesRangeChanged:s})=>{const f=de(),p=A(),d=e.timeseries,y=ne(e),_=d.map($=>$.label),w=h!==!1,C=$=>{if(!c||$?.activePayload==null||$?.activePayload.length===0)return;const k=$.activePayload[0];if(k?.payload?.timeLabel?.label==null)return;const v=$.activeTooltipIndex,O=k.payload.timeLabel.label;if(o==null)return;const u=se(O,_,o.numberOfPeriods),j=u[1]===void 0?_.length-1:_.indexOf(u[1]),D={...o,thisPeriod:{startDate:d[j].startDate,endDate:d[j].endDate}};s?.(d[v],r,D)},L=c?(l-60)/W.cash_in_cash_out*(W.cash_in_cash_out-e.recordByTimeseries.length):20;return a.jsx(ra,{"data-testid":Ae("dashboard-cash-in-cash-out-timeframe",r),width:l,height:i,windowSize:f,children:a.jsx(
|
|
45
|
+
`;function Rr({selectedRangeReport:e,timeframe:r,highlightedRange:t,width:n,height:o,showBarHoverBackground:l,isDetailPage:i,onCOABalancesRangeChanged:h}){const c=A(),s=R.useRef(!1);R.useEffect(()=>{s.current=!0},[]);const f=[c.colors.graphColor33,c.colors.graphColor36,c.colors.graphColor35],p=(_,w=c.colors.graphColor08)=>_<f.length?f[_]:w,d=aa(e.firstMonthOfFY,ye,e.cashIn,e.cashOut,e.netCashFlow),y=()=>{const _=[];return ye.forEach((w,C)=>{const L=i===!0&&!s.current;_.push(a.jsx(te,{name:w,animationDuration:L?500:void 0,style:{cursor:"pointer"},legendType:"square",dataKey:$=>{const k=$.record;return(k[w]!=null&&k[w].amount!=null?k[w].amount:void 0)?.amount??0},fill:p(C)},w))}),_};return d==null?null:a.jsx(ta,{chartData:d,timeframe:r,showBarHoverBackground:l,barElements:y(),customToolTipContent:({active:_,payload:w})=>a.jsx(ea,{active:_,payload:w}),width:n,height:o,onCOABalancesRangeChanged:h,highlightedRange:t,isDetailPage:i===!0})}const ta=({chartData:e,timeframe:r,barElements:t,customToolTipContent:n,highlightedRange:o,width:l,height:i,showBarHoverBackground:h,isDetailPage:c,onCOABalancesRangeChanged:s})=>{const f=de(),p=A(),d=e.timeseries,y=ne(e),_=d.map($=>$.label),w=h!==!1,C=$=>{if(!c||$?.activePayload==null||$?.activePayload.length===0)return;const k=$.activePayload[0];if(k?.payload?.timeLabel?.label==null)return;const v=$.activeTooltipIndex,O=k.payload.timeLabel.label;if(o==null)return;const u=se(O,_,o.numberOfPeriods),j=u[1]===void 0?_.length-1:_.indexOf(u[1]),D={...o,thisPeriod:{startDate:d[j].startDate,endDate:d[j].endDate}};s?.(d[v],r,D)},L=c?(l-60)/W.cash_in_cash_out*(W.cash_in_cash_out-e.recordByTimeseries.length):20;return a.jsx(ra,{"data-testid":Ae("dashboard-cash-in-cash-out-timeframe",r),width:l,height:i,windowSize:f,children:a.jsx(Q,{children:({height:$,width:k})=>a.jsxs(Te,{data:e.recordByTimeseries,barCategoryGap:c?void 0:"12%",maxBarSize:c?E[10]:22,barGap:c?void 0:2,margin:{top:5,right:L,left:0,bottom:E[4]},height:$,width:k,style:{display:"flex",flex:"1 1 auto"},onClick:C,children:[a.jsx(J,{horizontal:!0,vertical:!1,strokeWidth:.5,stroke:p.colors.grey3}),a.jsx(ee,{dataKey:v=>v.timeLabel.label,type:"category",axisLine:{stroke:p.colors.grey3,strokeWidth:.5},tickLine:!1,tick:{color:p.colors.hero,...M.extraSmallRegular.cssObject}}),a.jsx(ae,{type:"number",axisLine:!1,tickLine:!1,tick:{color:p.colors.hero,...M.extraSmallRegular.cssObject},tickFormatter:v=>re("0,0.[00]a",v,y)}),a.jsx(oe,{wrapperStyle:{zIndex:2},cursor:w?{stroke:p.colors.background,strokeDasharray:"1, 1",strokeWidth:1,fill:p.colors.background}:!1,content:n,allowEscapeViewBox:{x:!1,y:!0}}),t,c?a.jsx(ge,{verticalAlign:"bottom",wrapperStyle:{width:"100%",display:"flex",justifyContent:"center",left:"initial",bottom:m.sp0},formatter:v=>a.jsx(oa,{windowSize:f,children:S.getLocalizedStrings().chartCard.cashInCashOut[N(v)]})}):null]})})})},la=x.div`
|
|
46
46
|
display: flex;
|
|
47
47
|
`,na=x.div`
|
|
48
48
|
flex: display;
|
|
@@ -57,10 +57,10 @@ import{u as A,j as a,R as S,e as de,W as Ae,aj as Z,b7 as Te,q as E,b8 as J,aw a
|
|
|
57
57
|
display: flex;
|
|
58
58
|
align-items: center;
|
|
59
59
|
justify-content: space-between;
|
|
60
|
-
`,ca=({active:e,payload:r})=>{const t=[];return r?.forEach(n=>{const o=n.name;if(e===!0){const l=n.payload,i=n.color,h=o!=null&&l.record[o]!=null?l.record[o].amount:void 0;t.push({barName:S.getLocalizedStrings().reportTitleById.cash_position,value:h,color:i})}}),t},ia=e=>{const r=ca(e);return r.length===0?null:a.jsx(la,{children:a.jsx(na,{children:r.map((t,n)=>a.jsx(sa,{color:t.color,children:`${t.barName}: ${T(t.value)}`},t.barName+n))})})},ua=le.memo(ia),ha=(e,r,t)=>{let n=[];t!=null&&t.balances.length>0&&(n=I("cash_position","actual",t));const o=b("cash_position","actual"),l={};return l[o]=n,n.length>0?
|
|
60
|
+
`,ca=({active:e,payload:r})=>{const t=[];return r?.forEach(n=>{const o=n.name;if(e===!0){const l=n.payload,i=n.color,h=o!=null&&l.record[o]!=null?l.record[o].amount:void 0;t.push({barName:S.getLocalizedStrings().reportTitleById.cash_position,value:h,color:i})}}),t},ia=e=>{const r=ca(e);return r.length===0?null:a.jsx(la,{children:a.jsx(na,{children:r.map((t,n)=>a.jsx(sa,{color:t.color,children:`${t.barName}: ${T(t.value)}`},t.barName+n))})})},ua=le.memo(ia),ha=(e,r,t)=>{let n=[];t!=null&&t.balances.length>0&&(n=I("cash_position","actual",t));const o=b("cash_position","actual"),l={};return l[o]=n,n.length>0?Z(e,r,o,l):void 0},da=x.div`
|
|
61
61
|
width: ${e=>e.width}px;
|
|
62
62
|
height: ${e=>e.height}px;
|
|
63
|
-
`,Ce=[b("cash_position","actual")];function Pr({selectedRangeReport:e,timeframe:r,highlightedRange:t,width:n,height:o,showBarHoverBackground:l,isDetailPage:i,onCOABalancesRangeChanged:h}){const c=A(),s=R.useRef(!1);R.useEffect(()=>{s.current=!0},[]);const f=ha(e.firstMonthOfFY,Ce,e.cashPosition),p=()=>{const d=[];return Ce.forEach(y=>{const _=i===!0&&!s.current;d.push(a.jsx(te,{name:y,animationDuration:_?500:void 0,style:{cursor:"pointer"},dataKey:w=>{const C=w.record;return(C[y]!=null&&C[y].amount!=null?C[y].amount:void 0)?.amount??0},fill:c.colors.graphColor17},y))}),d};return f==null?null:a.jsx(ga,{chartData:f,timeframe:r,showBarHoverBackground:l,barElements:p(),customToolTipContent:({active:d,payload:y})=>a.jsx(ua,{active:d,payload:y}),width:n,height:o,onCOABalancesRangeChanged:h,highlightedRange:t,isDetailPage:i===!0})}const ga=({chartData:e,timeframe:r,barElements:t,customToolTipContent:n,highlightedRange:o,width:l,height:i,showBarHoverBackground:h,isDetailPage:c,onCOABalancesRangeChanged:s})=>{const f=A(),p=e.timeseries,d=ne(e),y=p.map(L=>L.label),_=h!==!1,w=L=>{if(!c||L?.activePayload==null||L?.activePayload.length===0)return;const $=L.activePayload[0];if($?.payload?.timeLabel?.label==null)return;const k=L.activeTooltipIndex,v=$.payload.timeLabel.label;if(o==null)return;const O=se(v,y,o.numberOfPeriods),u=O[1]===void 0?y.length-1:y.indexOf(O[1]),j={...o,thisPeriod:{startDate:p[u].startDate,endDate:p[u].endDate}};s?.(p[k],r,j)},C=c?(l-60)/W.cash_position*(W.cash_position-e.recordByTimeseries.length):20;return a.jsx(da,{width:l,height:i,children:a.jsx(
|
|
63
|
+
`,Ce=[b("cash_position","actual")];function Pr({selectedRangeReport:e,timeframe:r,highlightedRange:t,width:n,height:o,showBarHoverBackground:l,isDetailPage:i,onCOABalancesRangeChanged:h}){const c=A(),s=R.useRef(!1);R.useEffect(()=>{s.current=!0},[]);const f=ha(e.firstMonthOfFY,Ce,e.cashPosition),p=()=>{const d=[];return Ce.forEach(y=>{const _=i===!0&&!s.current;d.push(a.jsx(te,{name:y,animationDuration:_?500:void 0,style:{cursor:"pointer"},dataKey:w=>{const C=w.record;return(C[y]!=null&&C[y].amount!=null?C[y].amount:void 0)?.amount??0},fill:c.colors.graphColor17},y))}),d};return f==null?null:a.jsx(ga,{chartData:f,timeframe:r,showBarHoverBackground:l,barElements:p(),customToolTipContent:({active:d,payload:y})=>a.jsx(ua,{active:d,payload:y}),width:n,height:o,onCOABalancesRangeChanged:h,highlightedRange:t,isDetailPage:i===!0})}const ga=({chartData:e,timeframe:r,barElements:t,customToolTipContent:n,highlightedRange:o,width:l,height:i,showBarHoverBackground:h,isDetailPage:c,onCOABalancesRangeChanged:s})=>{const f=A(),p=e.timeseries,d=ne(e),y=p.map(L=>L.label),_=h!==!1,w=L=>{if(!c||L?.activePayload==null||L?.activePayload.length===0)return;const $=L.activePayload[0];if($?.payload?.timeLabel?.label==null)return;const k=L.activeTooltipIndex,v=$.payload.timeLabel.label;if(o==null)return;const O=se(v,y,o.numberOfPeriods),u=O[1]===void 0?y.length-1:y.indexOf(O[1]),j={...o,thisPeriod:{startDate:p[u].startDate,endDate:p[u].endDate}};s?.(p[k],r,j)},C=c?(l-60)/W.cash_position*(W.cash_position-e.recordByTimeseries.length):20;return a.jsx(da,{width:l,height:i,children:a.jsx(Q,{children:({height:L,width:$})=>a.jsxs(Te,{width:$,height:L,data:e.recordByTimeseries,barCategoryGap:"25%",maxBarSize:c?E[10]:30,margin:{top:5,right:C,left:0,bottom:5},style:{display:"flex",flex:"1 1 auto"},onClick:w,children:[a.jsx(J,{horizontal:!0,vertical:!1,strokeWidth:.5,stroke:f.colors.grey3}),a.jsx(ee,{dataKey:k=>k.timeLabel.label,type:"category",axisLine:{stroke:f.colors.grey3,strokeWidth:.5},tickLine:!1,tick:{color:f.colors.hero,...M.extraSmallRegular.cssObject}}),a.jsx(ae,{type:"number",axisLine:!1,tickLine:!1,tick:{color:f.colors.hero,...M.extraSmallRegular.cssObject},tickFormatter:k=>re("0,0.[00]a",k,d)}),a.jsx(oe,{wrapperStyle:{zIndex:2},cursor:_?{stroke:f.colors.background,strokeDasharray:"1, 1",strokeWidth:1,fill:f.colors.background}:!1,content:n,allowEscapeViewBox:{x:!1,y:!0}}),t]})})})},pa=x.div`
|
|
64
64
|
display: flex;
|
|
65
65
|
`,ma=x.div`
|
|
66
66
|
display: flex;
|
|
@@ -128,7 +128,7 @@ import{u as A,j as a,R as S,e as de,W as Ae,aj as Z,b7 as Te,q as E,b8 as J,aw a
|
|
|
128
128
|
`,ve=x(V)`
|
|
129
129
|
display: flex;
|
|
130
130
|
flex-direction: column;
|
|
131
|
-
`,ke=x(H)``,ka=(e,r)=>{const t=b(N(e),"forecast");if(r.record[t]==null)return;const n=r.record[e].amount,o=r.record[t].amount,l=Math.floor((n.amount-o.amount)*100/100),i={...n,amount:l},h=o.amount!==0?Math.floor((n.amount-o.amount)/o.amount*100)/100:void 0;return{value:o,change:i,percent:h,forecastPercent:r.record[t].percentValue}},$a=({active:e,payload:r,mode:t})=>{const n=[],o={barName:S.getLocalizedStrings().chartCard.netBurnOrIncome.gross_burn,actual:void 0,color:g.neutralGrey2Dark,forecast:void 0};let l={amount:0,currencyCode:"",currencySymbol:""},i={amount:0,currencyCode:"",currencySymbol:""};const h=b("income","actual"),c=b("cogs","actual"),s=b("expenses","actual"),f=b("net_burn_or_income","actual");return r?.forEach(p=>{const d=p.name;if(e===!0){const y=p.payload,_=p.color,w=d!=null&&y.record[d]!=null?y.record[d].amount:void 0;let C;if(d.includes("forecast")!==!0)switch(t==="forecast_mode"&&(C=y.record[d]!=null?ka(d,y):void 0),d){case c:case s:w!=null&&(l.currencyCode===""?l={...w}:l.amount=l.amount+w.amount),C!=null&&(i.currencyCode===""?i={...C.value}:i.amount=i.amount+C.value.amount),n.push({barName:S.getLocalizedStrings().chartCard.netBurnOrIncome[N(d)],actual:w,forecast:C,color:_});break;case f:{const L=w!=null&&w.amount>=0?S.getLocalizedStrings().chartCard.netBurnOrIncome.net_income:S.getLocalizedStrings().chartCard.netBurnOrIncome.net_burn;n.push({barName:L,actual:w,color:_,percent:y.record[d]?.percentValue,forecast:C});break}case h:default:n.push({barName:S.getLocalizedStrings().chartCard.netBurnOrIncome[N(d)],actual:w,color:_,forecast:C})}}}),o.actual=l,o.forecast=i!=null&&l!=null?{value:i,change:{...l,amount:Math.floor((l.amount-i.amount)*100/100)},percent:i.amount!==0?Math.floor((l.amount-i.amount)/i.amount*100)/100:0}:void 0,e===!0&&n.splice(n.length-1,0,o),n},$e=e=>e.map((r,t)=>a.jsxs(Ne,{color:r.color,showPercent:r.percent!=null,children:[a.jsxs(Ca,{children:[a.jsx(Ee,{color:r.barName===S.getLocalizedStrings().chartCard.netBurnOrIncome.gross_burn?"transparent":r.color}),`${r.barName}:`]}),a.jsxs(va,{children:[a.jsx(je,{children:`${T(r.actual)}`}),r.percent!=null?a.jsx(je,{children:F("0,0.0%",r.percent)}):null]})]},r.barName+t)),we=e=>e.map((r,t)=>a.jsxs(Ne,{color:r.color,showPercent:r.percent!=null,children:[a.jsxs(ja,{children:[a.jsx(Ee,{color:r.barName===S.getLocalizedStrings().chartCard.netBurnOrIncome.gross_burn?"transparent":r.color}),`${r.barName}:`]}),a.jsx(H,{children:a.jsxs(ve,{children:[r.actual!=null?`${T(r.actual)}`:"-",a.jsx(ke,{children:r.percent!=null?F("0,0.0%",r.percent):null})]})}),a.jsx(H,{children:a.jsxs(ve,{children:[r.forecast!=null?`${T(r.forecast.value)}`:"-",a.jsx(ke,{children:r.forecast!=null&&r.forecast.forecastPercent!=null?F("0,0.0%",r.forecast.forecastPercent):null})]})}),r.forecast!=null?a.jsx(H,{isChange:!0,children:`${T(r.forecast.change)}`}):a.jsx(H,{children:"-"}),r.forecast!=null?a.jsx(H,{isChange:!0,children:F("0,0.0%",r.forecast.percent)}):a.jsx(H,{children:"-"})]},r.barName+t)),wa=e=>{if(e.length>0){for(const r of e)if(r.actual!=null)return r.actual.currencySymbol}return""},_a=({barLabelsWithValues:e})=>a.jsxs(ma,{children:[a.jsxs(fa,{children:[a.jsx(xa,{}),a.jsx(ie,{children:S.getLocalizedStrings().chartCard.tooltip.actual}),a.jsx(ie,{children:S.getLocalizedStrings().chartCard.tooltip.forecast}),a.jsxs(ie,{children:[S.getLocalizedStrings().chartCard.tooltip.change," ",wa(e)]}),a.jsx(ie,{children:S.getLocalizedStrings().chartCard.tooltip.change_percent})]}),a.jsxs(ya,{children:[we(e.slice(0,e.length-2)),e.length?a.jsx(We,{}):null,we(e.slice(-2))]})]}),La=({barLabelsWithValues:e})=>a.jsx(pa,{children:a.jsxs(ba,{children:[$e(e.slice(0,e.length-2)),e.length?a.jsx(We,{}):null,$e(e.slice(-2))]})}),Sa=e=>{const r=$a({...e});return r.length===0?null:a.jsx(a.Fragment,{children:e.mode==="forecast_mode"?a.jsx(_a,{barLabelsWithValues:r}):a.jsx(La,{barLabelsWithValues:r})})},Da=le.memo(Sa),Ba=(e,r,t,n,o,l,i)=>{let h=[],c=[],s=[],f=[];n!=null&&n.balances.length>0&&(h=K("income","actual",n)),o!=null&&o.balances.length>0&&(c=K("cogs","actual",o)),l!=null&&l.balances.length>0&&(s=I("expenses","actual",l)),i!=null&&i.balances.length>0&&(f=ce("net_burn_or_income","actual",i));const p=b("income","actual"),d=b("cogs","actual"),y=b("expenses","actual"),_=b("net_burn_or_income","actual"),w=h.length>0?p:c.length>0?d:s.length>0?y:void 0,C={};return C[p]=h,C[d]=c,C[y]=s,C[_]=f,t==="forecast_mode"&&Object.assign(C,Oa(n,o,l,i)),w!=null?
|
|
131
|
+
`,ke=x(H)``,ka=(e,r)=>{const t=b(N(e),"forecast");if(r.record[t]==null)return;const n=r.record[e].amount,o=r.record[t].amount,l=Math.floor((n.amount-o.amount)*100/100),i={...n,amount:l},h=o.amount!==0?Math.floor((n.amount-o.amount)/o.amount*100)/100:void 0;return{value:o,change:i,percent:h,forecastPercent:r.record[t].percentValue}},$a=({active:e,payload:r,mode:t})=>{const n=[],o={barName:S.getLocalizedStrings().chartCard.netBurnOrIncome.gross_burn,actual:void 0,color:g.neutralGrey2Dark,forecast:void 0};let l={amount:0,currencyCode:"",currencySymbol:""},i={amount:0,currencyCode:"",currencySymbol:""};const h=b("income","actual"),c=b("cogs","actual"),s=b("expenses","actual"),f=b("net_burn_or_income","actual");return r?.forEach(p=>{const d=p.name;if(e===!0){const y=p.payload,_=p.color,w=d!=null&&y.record[d]!=null?y.record[d].amount:void 0;let C;if(d.includes("forecast")!==!0)switch(t==="forecast_mode"&&(C=y.record[d]!=null?ka(d,y):void 0),d){case c:case s:w!=null&&(l.currencyCode===""?l={...w}:l.amount=l.amount+w.amount),C!=null&&(i.currencyCode===""?i={...C.value}:i.amount=i.amount+C.value.amount),n.push({barName:S.getLocalizedStrings().chartCard.netBurnOrIncome[N(d)],actual:w,forecast:C,color:_});break;case f:{const L=w!=null&&w.amount>=0?S.getLocalizedStrings().chartCard.netBurnOrIncome.net_income:S.getLocalizedStrings().chartCard.netBurnOrIncome.net_burn;n.push({barName:L,actual:w,color:_,percent:y.record[d]?.percentValue,forecast:C});break}case h:default:n.push({barName:S.getLocalizedStrings().chartCard.netBurnOrIncome[N(d)],actual:w,color:_,forecast:C})}}}),o.actual=l,o.forecast=i!=null&&l!=null?{value:i,change:{...l,amount:Math.floor((l.amount-i.amount)*100/100)},percent:i.amount!==0?Math.floor((l.amount-i.amount)/i.amount*100)/100:0}:void 0,e===!0&&n.splice(n.length-1,0,o),n},$e=e=>e.map((r,t)=>a.jsxs(Ne,{color:r.color,showPercent:r.percent!=null,children:[a.jsxs(Ca,{children:[a.jsx(Ee,{color:r.barName===S.getLocalizedStrings().chartCard.netBurnOrIncome.gross_burn?"transparent":r.color}),`${r.barName}:`]}),a.jsxs(va,{children:[a.jsx(je,{children:`${T(r.actual)}`}),r.percent!=null?a.jsx(je,{children:F("0,0.0%",r.percent)}):null]})]},r.barName+t)),we=e=>e.map((r,t)=>a.jsxs(Ne,{color:r.color,showPercent:r.percent!=null,children:[a.jsxs(ja,{children:[a.jsx(Ee,{color:r.barName===S.getLocalizedStrings().chartCard.netBurnOrIncome.gross_burn?"transparent":r.color}),`${r.barName}:`]}),a.jsx(H,{children:a.jsxs(ve,{children:[r.actual!=null?`${T(r.actual)}`:"-",a.jsx(ke,{children:r.percent!=null?F("0,0.0%",r.percent):null})]})}),a.jsx(H,{children:a.jsxs(ve,{children:[r.forecast!=null?`${T(r.forecast.value)}`:"-",a.jsx(ke,{children:r.forecast!=null&&r.forecast.forecastPercent!=null?F("0,0.0%",r.forecast.forecastPercent):null})]})}),r.forecast!=null?a.jsx(H,{isChange:!0,children:`${T(r.forecast.change)}`}):a.jsx(H,{children:"-"}),r.forecast!=null?a.jsx(H,{isChange:!0,children:F("0,0.0%",r.forecast.percent)}):a.jsx(H,{children:"-"})]},r.barName+t)),wa=e=>{if(e.length>0){for(const r of e)if(r.actual!=null)return r.actual.currencySymbol}return""},_a=({barLabelsWithValues:e})=>a.jsxs(ma,{children:[a.jsxs(fa,{children:[a.jsx(xa,{}),a.jsx(ie,{children:S.getLocalizedStrings().chartCard.tooltip.actual}),a.jsx(ie,{children:S.getLocalizedStrings().chartCard.tooltip.forecast}),a.jsxs(ie,{children:[S.getLocalizedStrings().chartCard.tooltip.change," ",wa(e)]}),a.jsx(ie,{children:S.getLocalizedStrings().chartCard.tooltip.change_percent})]}),a.jsxs(ya,{children:[we(e.slice(0,e.length-2)),e.length?a.jsx(We,{}):null,we(e.slice(-2))]})]}),La=({barLabelsWithValues:e})=>a.jsx(pa,{children:a.jsxs(ba,{children:[$e(e.slice(0,e.length-2)),e.length?a.jsx(We,{}):null,$e(e.slice(-2))]})}),Sa=e=>{const r=$a({...e});return r.length===0?null:a.jsx(a.Fragment,{children:e.mode==="forecast_mode"?a.jsx(_a,{barLabelsWithValues:r}):a.jsx(La,{barLabelsWithValues:r})})},Da=le.memo(Sa),Ba=(e,r,t,n,o,l,i)=>{let h=[],c=[],s=[],f=[];n!=null&&n.balances.length>0&&(h=K("income","actual",n)),o!=null&&o.balances.length>0&&(c=K("cogs","actual",o)),l!=null&&l.balances.length>0&&(s=I("expenses","actual",l)),i!=null&&i.balances.length>0&&(f=ce("net_burn_or_income","actual",i));const p=b("income","actual"),d=b("cogs","actual"),y=b("expenses","actual"),_=b("net_burn_or_income","actual"),w=h.length>0?p:c.length>0?d:s.length>0?y:void 0,C={};return C[p]=h,C[d]=c,C[y]=s,C[_]=f,t==="forecast_mode"&&Object.assign(C,Oa(n,o,l,i)),w!=null?Z(e,r,w,C):void 0},Oa=(e,r,t,n)=>{let o=[],l=[],i=[],h=[];e!=null&&e.balances.length>0&&(o=K("income","forecast",e)),r!=null&&r.balances.length>0&&(l=K("cogs","forecast",r)),t!=null&&t.balances.length>0&&(i=I("expenses","forecast",t)),n!=null&&n.balances.length>0&&(h=ce("net_burn_or_income","forecast",n));const c=b("income","forecast"),s=b("cogs","forecast"),f=b("expenses","forecast"),p=b("net_burn_or_income","forecast"),d={};return d[c]=o,d[s]=l,d[f]=i,d[p]=h,d},za=[b("income","actual"),b("cogs","actual"),b("expenses","actual"),b("net_burn_or_income","actual")],Ra=[b("income","actual"),b("cogs","actual"),b("expenses","actual"),b("net_burn_or_income","actual"),b("income","forecast"),b("cogs","forecast"),b("expenses","forecast"),b("net_burn_or_income","forecast")],Pa=x.div`
|
|
132
132
|
width: ${e=>e.width}px;
|
|
133
133
|
height: ${e=>e.height}px;
|
|
134
134
|
|
|
@@ -141,7 +141,7 @@ import{u as A,j as a,R as S,e as de,W as Ae,aj as Z,b7 as Te,q as E,b8 as J,aw a
|
|
|
141
141
|
`,Ta=x(fe)`
|
|
142
142
|
margin-left: ${e=>q.legendLabelMarginLeft.valuePx(e.windowSize)};
|
|
143
143
|
color: ${e=>e.theme.colors.primary};
|
|
144
|
-
`;function Tr({selectedRangeReport:e,timeframe:r,highlightedRange:t,width:n,height:o,showBarHoverBackground:l,isDetailPage:i,mode:h,onCOABalancesRangeChanged:c}){const s=A(),f=R.useRef(!1);R.useEffect(()=>{f.current=!0},[]);const p=[s.colors.graphColor36,s.colors.graphColor06,s.colors.graphColor31,s.colors.graphColor12],d=[s.colors.graphColor04,s.colors.graphColor10,s.colors.graphColor32,s.colors.graphColor13,s.colors.graphColor04Dark,s.colors.graphColor10Dark,s.colors.graphColor32Dark,s.colors.graphColor13Dark],y=h==="forecast_mode"?d:p,_=h==="forecast_mode"?Ra:za,w=(u,j=s.colors.graphColor04)=>u<y.length?y[u]:j,C=(e.reportId,Ba(e.firstMonthOfFY,_,h,e.sections.income,e.sections.cogs,e.sections.expenses,e.calculatedSections.netBurnOrIncome)),L=u=>{const{cx:j,cy:D,fill:B,stroke:z,value:G}=u;return G==null?a.jsx(a.Fragment,{}):a.jsx("circle",{cx:j,cy:D,r:4,stroke:B,strokeWidth:2,fill:z})},$=u=>{const{cx:j,cy:D,fill:B,stroke:z,value:G}=u;return G==null?a.jsx(a.Fragment,{}):a.jsx("circle",{cx:j,cy:D,r:5,stroke:z,strokeWidth:2,fill:B})},k=(u,j)=>a.jsx(pe,{name:u,type:"monotone",legendType:"plainline",isAnimationActive:!1,dataKey:D=>{const B=D.record;return(B[u]!=null&&B[u].amount!=null?B[u].amount:void 0)?.amount},dot:a.jsx(L,{}),strokeWidth:1.5,stroke:w(j),strokeDasharray:"3 3",activeDot:a.jsx($,{})},u),v=(u,j,D)=>a.jsx(te,{name:u,animationDuration:D?500:void 0,style:{cursor:"pointer"},legendType:"square",dataKey:B=>{const z=B.record;return(z[u]!=null&&z[u].amount!=null?z[u].amount:void 0)?.amount??0},fill:w(j)},u),O=()=>{const u=[];return _.forEach((j,D)=>{const B=i===!0&&!f.current;j.endsWith("_forecast")?u.push(k(j,D)):u.push(v(j,D,B))}),u};return C==null?null:a.jsx(Wa,{chartData:C,timeframe:r,showBarHoverBackground:l,barElements:O(),customToolTipContent:({active:u,payload:j})=>a.jsx(Da,{active:u,payload:j,mode:h}),width:n,height:o,onCOABalancesRangeChanged:c,highlightedRange:t,isDetailPage:i===!0})}const Wa=({chartData:e,timeframe:r,barElements:t,customToolTipContent:n,highlightedRange:o,width:l,height:i,showBarHoverBackground:h,isDetailPage:c,onCOABalancesRangeChanged:s})=>{const f=de(),p=A(),d=ne(e),y=e.timeseries,_=y.map($=>$.label),w=h!==!1,C=$=>{if(!c||$?.activePayload==null||$?.activePayload.length===0)return;const k=$.activePayload[0];if(k?.payload?.timeLabel?.label==null)return;const v=$.activeTooltipIndex,O=k.payload.timeLabel.label;if(o==null)return;const u=se(O,_,o.numberOfPeriods),j=u[1]===void 0?_.length-1:_.indexOf(u[1]),D={...o,thisPeriod:{startDate:y[j].startDate,endDate:y[j].endDate}};s?.(y[v],r,D)},L=c?(l-60)/W.net_burn_or_income*(W.net_burn_or_income-e.recordByTimeseries.length):20;return a.jsx(Pa,{width:l,height:i,windowSize:f,children:a.jsx(
|
|
144
|
+
`;function Tr({selectedRangeReport:e,timeframe:r,highlightedRange:t,width:n,height:o,showBarHoverBackground:l,isDetailPage:i,mode:h,onCOABalancesRangeChanged:c}){const s=A(),f=R.useRef(!1);R.useEffect(()=>{f.current=!0},[]);const p=[s.colors.graphColor36,s.colors.graphColor06,s.colors.graphColor31,s.colors.graphColor12],d=[s.colors.graphColor04,s.colors.graphColor10,s.colors.graphColor32,s.colors.graphColor13,s.colors.graphColor04Dark,s.colors.graphColor10Dark,s.colors.graphColor32Dark,s.colors.graphColor13Dark],y=h==="forecast_mode"?d:p,_=h==="forecast_mode"?Ra:za,w=(u,j=s.colors.graphColor04)=>u<y.length?y[u]:j,C=(e.reportId,Ba(e.firstMonthOfFY,_,h,e.sections.income,e.sections.cogs,e.sections.expenses,e.calculatedSections.netBurnOrIncome)),L=u=>{const{cx:j,cy:D,fill:B,stroke:z,value:G}=u;return G==null?a.jsx(a.Fragment,{}):a.jsx("circle",{cx:j,cy:D,r:4,stroke:B,strokeWidth:2,fill:z})},$=u=>{const{cx:j,cy:D,fill:B,stroke:z,value:G}=u;return G==null?a.jsx(a.Fragment,{}):a.jsx("circle",{cx:j,cy:D,r:5,stroke:z,strokeWidth:2,fill:B})},k=(u,j)=>a.jsx(pe,{name:u,type:"monotone",legendType:"plainline",isAnimationActive:!1,dataKey:D=>{const B=D.record;return(B[u]!=null&&B[u].amount!=null?B[u].amount:void 0)?.amount},dot:a.jsx(L,{}),strokeWidth:1.5,stroke:w(j),strokeDasharray:"3 3",activeDot:a.jsx($,{})},u),v=(u,j,D)=>a.jsx(te,{name:u,animationDuration:D?500:void 0,style:{cursor:"pointer"},legendType:"square",dataKey:B=>{const z=B.record;return(z[u]!=null&&z[u].amount!=null?z[u].amount:void 0)?.amount??0},fill:w(j)},u),O=()=>{const u=[];return _.forEach((j,D)=>{const B=i===!0&&!f.current;j.endsWith("_forecast")?u.push(k(j,D)):u.push(v(j,D,B))}),u};return C==null?null:a.jsx(Wa,{chartData:C,timeframe:r,showBarHoverBackground:l,barElements:O(),customToolTipContent:({active:u,payload:j})=>a.jsx(Da,{active:u,payload:j,mode:h}),width:n,height:o,onCOABalancesRangeChanged:c,highlightedRange:t,isDetailPage:i===!0})}const Wa=({chartData:e,timeframe:r,barElements:t,customToolTipContent:n,highlightedRange:o,width:l,height:i,showBarHoverBackground:h,isDetailPage:c,onCOABalancesRangeChanged:s})=>{const f=de(),p=A(),d=ne(e),y=e.timeseries,_=y.map($=>$.label),w=h!==!1,C=$=>{if(!c||$?.activePayload==null||$?.activePayload.length===0)return;const k=$.activePayload[0];if(k?.payload?.timeLabel?.label==null)return;const v=$.activeTooltipIndex,O=k.payload.timeLabel.label;if(o==null)return;const u=se(O,_,o.numberOfPeriods),j=u[1]===void 0?_.length-1:_.indexOf(u[1]),D={...o,thisPeriod:{startDate:y[j].startDate,endDate:y[j].endDate}};s?.(y[v],r,D)},L=c?(l-60)/W.net_burn_or_income*(W.net_burn_or_income-e.recordByTimeseries.length):20;return a.jsx(Pa,{width:l,height:i,windowSize:f,children:a.jsx(Q,{children:({height:$,width:k})=>a.jsxs(me,{data:e.recordByTimeseries,barCategoryGap:c?void 0:"12%",maxBarSize:c?E[10]:22,barGap:c?void 0:2,margin:{top:5,right:L,left:0,bottom:E[4]},height:$,width:k,style:{display:"flex",flex:"1 1 auto"},onClick:C,children:[a.jsx(J,{horizontal:!0,vertical:!1,strokeWidth:.5,stroke:p.colors.grey3}),a.jsx(ee,{dataKey:v=>v.timeLabel.label,type:"category",axisLine:{stroke:p.colors.grey3,strokeWidth:.5},tickLine:!1,tick:{color:p.colors.hero,...M.extraSmallRegular.cssObject}}),a.jsx(ae,{type:"number",axisLine:!1,tickLine:!1,tick:{color:p.colors.hero,...M.extraSmallRegular.cssObject},tickFormatter:v=>re("0,0.[00]a",v,d)}),a.jsx(oe,{wrapperStyle:{zIndex:2},cursor:w?{stroke:p.colors.background,strokeWidth:(k-60)/W.net_burn_or_income,fill:p.colors.background}:!1,content:n,allowEscapeViewBox:{x:!1,y:!0}}),t,c?a.jsx(ge,{verticalAlign:"bottom",wrapperStyle:{width:"100%",display:"flex",justifyContent:"center",left:"initial",bottom:m.sp0},iconSize:E[3],formatter:v=>a.jsx(Ta,{windowSize:f,children:v.endsWith("_forecast")===!0?S.getLocalizedStrings().chartCard.netBurnOrIncome[v]:S.getLocalizedStrings().chartCard.netBurnOrIncome[N(v)]})}):null]})})})},Na=x.div`
|
|
145
145
|
display: flex;
|
|
146
146
|
`,Ea=x.div`
|
|
147
147
|
flex: display;
|
|
@@ -192,10 +192,10 @@ import{u as A,j as a,R as S,e as de,W as Ae,aj as Z,b7 as Te,q as E,b8 as J,aw a
|
|
|
192
192
|
`,U=x(V)`
|
|
193
193
|
text-align: right;
|
|
194
194
|
flex: 1;
|
|
195
|
-
`,Va=({active:e,payload:r,barName:t})=>{const n=[];if(r!=null&&e===!0){const o=r.filter(c=>c.name==t)[0],l=o.payload,i=o.color,h=t!=null&&l.record[t]!=null?l.record[t].amount:void 0;if(!t?.endsWith("_forecast")){let c;if(t.includes("forecast")!==!0){c=l.record[t]!=null?Ha(t,l):void 0;const s={amount:0,currencyCode:"",currencySymbol:""},f={amount:0,currencyCode:"",currencySymbol:""};let p;for(p in l.record){const C=l.record[p].amount;p.endsWith("_actual")?(s.amount+=l.record[p].amount?.amount??0,s.currencyCode=C!=null?C.currencyCode:s.currencyCode,s.currencySymbol=C!=null?C.currencySymbol:s.currencySymbol):p.endsWith("_forecast")&&(f.amount+=l.record[p].amount?.amount??0,f.currencyCode=C!=null?C.currencyCode:f.currencyCode,f.currencySymbol=C!=null?C.currencySymbol:f.currencySymbol)}const d=Math.floor((s?.amount-f?.amount)*100/100),y={...s,amount:d},_=f.amount!==0?Math.floor((s.amount-f.amount)/f.amount*100)/100:0,w={value:f,change:y,percent:_};n.push({barName:N(t),actual:h,forecast:c,color:i}),n.push({barName:S.getLocalizedStrings().chartCard.total,actual:s,forecast:w,color:g.neutralGrey1Light})}}}return n},Ha=(e,r)=>{const t=b(N(e),"forecast");if(r.record[t]==null)return;const n=r.record[e].amount,o=r.record[t].amount,l={...n,amount:o!=null?Math.floor((n.amount-o.amount)*100/100):n.amount},i=o!=null&&o.amount!==0?Math.floor((n.amount-o.amount)/o.amount*100)/100:void 0;return{value:o,change:l,percent:i}},Le=e=>a.jsxs(Ia,{color:e.color,children:[a.jsx(Fa,{children:`${e.barName}:`}),a.jsx(U,{children:e.actual!=null?`${T(e.actual)}`:"-"}),a.jsx(U,{children:e.forecast!=null?`${T(e.forecast.value)}`:"-"}),e.forecast!=null?a.jsx(U,{isChange:!0,children:`${T(e.forecast.change)}`}):a.jsx(U,{children:"-"}),e.forecast!=null?a.jsx(U,{isChange:!0,children:F("0,0.0%",e.forecast.percent)}):a.jsx(U,{children:"-"})]}),Ya=e=>{if(e.length>0){for(const r of e)if(r.actual!=null)return r.actual.currencySymbol}return""},qa=({barLabelsWithValues:e})=>a.jsx(Na,{children:a.jsxs(Ea,{children:[a.jsx(_e,{color:e[0].color,children:`${e[0].barName}: ${T(e[0].actual)}`}),a.jsx(Ge,{}),a.jsx(_e,{children:`${S.getLocalizedStrings().chartCard.total}: ${T(e[1].actual)}`})]})}),Ua=({barLabelsWithValues:e})=>a.jsxs(Ma,{children:[a.jsxs(Ka,{children:[a.jsx(Ga,{}),a.jsx(ue,{children:S.getLocalizedStrings().chartCard.tooltip.actual}),a.jsx(ue,{children:S.getLocalizedStrings().chartCard.tooltip.forecast}),a.jsxs(ue,{children:[S.getLocalizedStrings().chartCard.tooltip.change," ",Ya(e)]}),a.jsx(ue,{children:S.getLocalizedStrings().chartCard.tooltip.change_percent})]}),a.jsxs(Aa,{children:[Le(e[0]),a.jsx(Ge,{}),Le(e[1])]})]}),Xa=e=>{const r=Va({...e});return r.length===0?null:a.jsx(a.Fragment,{children:e.mode==="forecast_mode"?a.jsx(Ua,{barLabelsWithValues:r}):a.jsx(qa,{barLabelsWithValues:r})})},
|
|
195
|
+
`,Va=({active:e,payload:r,barName:t})=>{const n=[];if(r!=null&&e===!0){const o=r.filter(c=>c.name==t)[0],l=o.payload,i=o.color,h=t!=null&&l.record[t]!=null?l.record[t].amount:void 0;if(!t?.endsWith("_forecast")){let c;if(t.includes("forecast")!==!0){c=l.record[t]!=null?Ha(t,l):void 0;const s={amount:0,currencyCode:"",currencySymbol:""},f={amount:0,currencyCode:"",currencySymbol:""};let p;for(p in l.record){const C=l.record[p].amount;p.endsWith("_actual")?(s.amount+=l.record[p].amount?.amount??0,s.currencyCode=C!=null?C.currencyCode:s.currencyCode,s.currencySymbol=C!=null?C.currencySymbol:s.currencySymbol):p.endsWith("_forecast")&&(f.amount+=l.record[p].amount?.amount??0,f.currencyCode=C!=null?C.currencyCode:f.currencyCode,f.currencySymbol=C!=null?C.currencySymbol:f.currencySymbol)}const d=Math.floor((s?.amount-f?.amount)*100/100),y={...s,amount:d},_=f.amount!==0?Math.floor((s.amount-f.amount)/f.amount*100)/100:0,w={value:f,change:y,percent:_};n.push({barName:N(t),actual:h,forecast:c,color:i}),n.push({barName:S.getLocalizedStrings().chartCard.total,actual:s,forecast:w,color:g.neutralGrey1Light})}}}return n},Ha=(e,r)=>{const t=b(N(e),"forecast");if(r.record[t]==null)return;const n=r.record[e].amount,o=r.record[t].amount,l={...n,amount:o!=null?Math.floor((n.amount-o.amount)*100/100):n.amount},i=o!=null&&o.amount!==0?Math.floor((n.amount-o.amount)/o.amount*100)/100:void 0;return{value:o,change:l,percent:i}},Le=e=>a.jsxs(Ia,{color:e.color,children:[a.jsx(Fa,{children:`${e.barName}:`}),a.jsx(U,{children:e.actual!=null?`${T(e.actual)}`:"-"}),a.jsx(U,{children:e.forecast!=null?`${T(e.forecast.value)}`:"-"}),e.forecast!=null?a.jsx(U,{isChange:!0,children:`${T(e.forecast.change)}`}):a.jsx(U,{children:"-"}),e.forecast!=null?a.jsx(U,{isChange:!0,children:F("0,0.0%",e.forecast.percent)}):a.jsx(U,{children:"-"})]}),Ya=e=>{if(e.length>0){for(const r of e)if(r.actual!=null)return r.actual.currencySymbol}return""},qa=({barLabelsWithValues:e})=>a.jsx(Na,{children:a.jsxs(Ea,{children:[a.jsx(_e,{color:e[0].color,children:`${e[0].barName}: ${T(e[0].actual)}`}),a.jsx(Ge,{}),a.jsx(_e,{children:`${S.getLocalizedStrings().chartCard.total}: ${T(e[1].actual)}`})]})}),Ua=({barLabelsWithValues:e})=>a.jsxs(Ma,{children:[a.jsxs(Ka,{children:[a.jsx(Ga,{}),a.jsx(ue,{children:S.getLocalizedStrings().chartCard.tooltip.actual}),a.jsx(ue,{children:S.getLocalizedStrings().chartCard.tooltip.forecast}),a.jsxs(ue,{children:[S.getLocalizedStrings().chartCard.tooltip.change," ",Ya(e)]}),a.jsx(ue,{children:S.getLocalizedStrings().chartCard.tooltip.change_percent})]}),a.jsxs(Aa,{children:[Le(e[0]),a.jsx(Ge,{}),Le(e[1])]})]}),Xa=e=>{const r=Va({...e});return r.length===0?null:a.jsx(a.Fragment,{children:e.mode==="forecast_mode"?a.jsx(Ua,{barLabelsWithValues:r}):a.jsx(qa,{barLabelsWithValues:r})})},Za=le.memo(Xa),Qa=(e,r)=>{const t=[],n={};let o;return r!=null&&r.classes.length!=0&&r.classes.forEach(l=>{const i=I(l.class.className,"actual",l.childrenBalancesTotal),h=b(l.class.className,"actual");n[h]=i,t.push(h),o==null&&i.length>0&&(o=b(l.class.className,"actual"))}),o!=null?Z(e,t,o,n):void 0},Se=[g.graphColor34,g.graphColor05,g.graphColor08,g.graphColor11,g.graphColor13,g.graphColor19,g.graphColor29,g.graphColor28,g.graphColor20,g.graphColor21,g.graphColor22,g.graphColor14,g.graphColor35,g.graphColor31,g.graphColor33,g.graphColor32,g.graphColor36,g.graphColor02,g.graphColor06,g.graphColor04,g.graphColor10,g.graphColor12,g.graphColor15,g.graphColor18,g.graphColor17,g.graphColor07,g.graphColor34Dark,g.graphColor05Dark,g.graphColor08Dark,g.graphColor11Dark,g.graphColor13Dark,g.graphColor19Dark,g.graphColor29Dark,g.graphColor28Dark,g.graphColor20Dark,g.graphColor21Dark,g.graphColor22Dark,g.graphColor14Dark,g.graphColor35Dark,g.graphColor31Dark,g.graphColor33Dark,g.graphColor32Dark,g.graphColor36Dark,g.graphColor02Dark,g.graphColor06Dark,g.graphColor04Dark,g.graphColor10Dark,g.graphColor12Dark,g.graphColor15Dark,g.graphColor18Dark,g.graphColor17Dark,g.graphColor07Dark];class Y{_barColors;_barColorsKeyWise;_defaultColor;constructor(){this._defaultColor=g.graphColor34,this._barColors=Se.slice(),this._barColorsKeyWise=new Map}static#e=new Y;getBarColor(r){const t=Y.instance();return t._barColorsKeyWise.has(r)||(t._barColors.length===0&&(t._barColors=Se.slice()),t._barColorsKeyWise.set(r,t._barColors.shift()??t._defaultColor)),t._barColorsKeyWise.get(r)}shouldUpdate(r){const t=Y.instance(),n=Array.from(t._barColorsKeyWise.keys()).sort();return!Fe(n,r)}static init(){return this.#e=new Y,this.#e}static instance(){return this.#e}}const Ja=Y.instance(),er=(e,r,t)=>{const n=[],o={};let l,i=!1;if(t!=null&&t.accountGroups.length!=0?t.accountGroups.forEach(h=>{const c=I(h.accountGroupName,"actual",h),s=b(h.accountGroupName,"actual");o[s]=c,n.push(s),l==null&&c.length>0&&(l=b(h.accountGroupName,"actual"))}):t!=null&&t.accounts.length!=0&&(i=!0,t.accounts.forEach(h=>{const c=I(h.account.accountName,"actual",h.account.balancesInTimeframe),s=b(h.account.accountName,"actual");o[s]=c,n.push(s),l==null&&c.length>0&&(l=b(h.account.accountName,"actual"))})),t!=null&&t.accountGroups.length===0&&t.accounts.length===0){const h=S.getLocalizedStrings().chartCard.total,c=I(h,"actual",t);if(c.length!==0){const s=b(h,"actual");o[s]=c,l=s,n.push(s)}}return r==="forecast_mode"&&Object.assign(o,ar(n,t)),l!=null?Z(e,n,l,o,i):void 0},ar=(e,r)=>{const t={};let n;if(r!=null&&r.accountGroups.length!=0?r.accountGroups.forEach(o=>{const l=I(o.accountGroupName,"forecast",o),i=b(o.accountGroupName,"forecast");t[i]=l,e.push(i),n==null&&l.length>0&&(n=b(o.accountGroupName,"forecast"))}):r!=null&&r.accounts.length!=0&&r.accounts.forEach(o=>{const l=I(o.account.accountName,"forecast",o.account.balancesInTimeframe),i=b(o.account.accountName,"forecast");t[i]=l,e.push(i),n==null&&l.length>0&&(n=b(o.account.accountName,"forecast"))}),r!=null&&r.accountGroups.length===0&&r.accounts.length===0){const o=S.getLocalizedStrings().chartCard.total,l=I(o,"forecast",r);if(l.length!==0){const i=b(o,"forecast");t[i]=l,n=i,e.push(i)}}return t},rr=x.div`
|
|
196
196
|
width: ${e=>e.width}px;
|
|
197
197
|
height: ${e=>e.height}px;
|
|
198
|
-
`,or=e=>{const{cx:r,cy:t,fill:n,stroke:o,value:l}=e;return l==null?a.jsx(a.Fragment,{}):a.jsx("circle",{cx:r,cy:t,r:4,stroke:n,strokeWidth:2,fill:o})},tr=e=>{const{cx:r,cy:t,fill:n,stroke:o,value:l}=e;return l==null?a.jsx(a.Fragment,{}):a.jsx("circle",{cx:r,cy:t,r:5,stroke:o,strokeWidth:2,fill:n})};function Wr({selectedRangeReport:e,timeframe:r,highlightedRange:t,width:n,height:o,showBarHoverBackground:l,isDetailPage:i,mode:h,onCOABalancesRangeChanged:c}){const s=R.useRef(!1),[f,p]=R.useState(Ja),[d,y]=R.useState(void 0),_=A(),w=R.useRef([]);R.useEffect(()=>{s.current=!0},[]),R.useEffect(()=>{f.shouldUpdate(w.current)===!0&&p(Y.init())},[]),R.useEffect(()=>{let k=[];if(e.reportId==="operating_expenses"){const v=e.sections.expenses;v.accountGroups.length===0&&v.accounts.length===0?k.push(S.getLocalizedStrings().chartCard.total):v.accountGroups.length!=0?k=v.accountGroups.map(O=>O.accountGroupName).sort():k=v.accounts.map(O=>O.account).map(O=>O.accountName).sort()}else k=e.sections.expenses.classes.map(v=>v.class.className).sort();w.current=k},[e,f]);const C=R.useMemo(()=>e.reportId==="operating_expenses"?er(e.firstMonthOfFY,h,e.sections.expenses):
|
|
198
|
+
`,or=e=>{const{cx:r,cy:t,fill:n,stroke:o,value:l}=e;return l==null?a.jsx(a.Fragment,{}):a.jsx("circle",{cx:r,cy:t,r:4,stroke:n,strokeWidth:2,fill:o})},tr=e=>{const{cx:r,cy:t,fill:n,stroke:o,value:l}=e;return l==null?a.jsx(a.Fragment,{}):a.jsx("circle",{cx:r,cy:t,r:5,stroke:o,strokeWidth:2,fill:n})};function Wr({selectedRangeReport:e,timeframe:r,highlightedRange:t,width:n,height:o,showBarHoverBackground:l,isDetailPage:i,mode:h,onCOABalancesRangeChanged:c}){const s=R.useRef(!1),[f,p]=R.useState(Ja),[d,y]=R.useState(void 0),_=A(),w=R.useRef([]);R.useEffect(()=>{s.current=!0},[]),R.useEffect(()=>{f.shouldUpdate(w.current)===!0&&p(Y.init())},[]),R.useEffect(()=>{let k=[];if(e.reportId==="operating_expenses"){const v=e.sections.expenses;v.accountGroups.length===0&&v.accounts.length===0?k.push(S.getLocalizedStrings().chartCard.total):v.accountGroups.length!=0?k=v.accountGroups.map(O=>O.accountGroupName).sort():k=v.accounts.map(O=>O.account).map(O=>O.accountName).sort()}else k=e.sections.expenses.classes.map(v=>v.class.className).sort();w.current=k},[e,f]);const C=R.useMemo(()=>e.reportId==="operating_expenses"?er(e.firstMonthOfFY,h,e.sections.expenses):Qa(e.firstMonthOfFY,e.sections.expenses),[e,h]),L=R.useCallback(()=>{const k=u=>a.jsx(pe,{name:u,type:"monotone",legendType:"plainline",isAnimationActive:!1,dot:a.jsx(or,{}),activeDot:a.jsx(tr,{}),dataKey:j=>{const D=j.record;let B,z;for(z in D)if(z.endsWith("_forecast")){const G=D[z].amount;G!=null&&(B==null?B={...G}:B.amount+=G.amount)}return B?.amount},stroke:_.colors.grey1,strokeDasharray:"3 3",strokeWidth:1.5},u),v=(u,j)=>a.jsx(te,{name:u,animationDuration:j?500:void 0,style:{cursor:"pointer"},dataKey:D=>{const B=D.record;return(B[u]!=null&&B[u].amount!=null?B[u].amount:void 0)?.amount??0},stackId:"a",fill:f.getBarColor(N(u)),onMouseEnter:()=>{d!==u&&y(u)},onMouseLeave:()=>{d!=null&&y(void 0)}},u),O=[];return C?.orderedKeys.forEach(u=>{const j=!s.current;u.endsWith("_forecast")?O.push(k(u)):O.push(v(u,j))}),O},[C]),$=({active:k,payload:v})=>v?.find(O=>O.name===d)!=null&&d!=null&&k===!0?a.jsx(Za,{active:k,payload:v,mode:h,barName:d}):null;return C==null?null:a.jsx(lr,{chartData:C,timeframe:r,showBarHoverBackground:l,barElements:L(),customToolTipContent:a.jsx($,{}),width:n,height:o,onCOABalancesRangeChanged:c,highlightedRange:t,isDetailPage:i===!0})}const lr=({chartData:e,timeframe:r,barElements:t,customToolTipContent:n,highlightedRange:o,width:l,height:i,showBarHoverBackground:h,isDetailPage:c,onCOABalancesRangeChanged:s})=>{const f=A(),p=ne(e),d=e.timeseries,y=d.map(L=>L.label),_=h!==!1,w=L=>{if(!c||L?.activePayload==null||L?.activePayload.length===0)return;const $=L.activePayload[0];if($?.payload?.timeLabel?.label==null)return;const k=L.activeTooltipIndex,v=$.payload.timeLabel.label;if(o==null)return;const O=se(v,y,o.numberOfPeriods),u=O[1]===void 0?y.length-1:y.indexOf(O[1]),j={...o,thisPeriod:{startDate:d[u].startDate,endDate:d[u].endDate}};s?.(d[k],r,j)},C=c?(l-60)/W.operating_expenses*(W.operating_expenses-e.recordByTimeseries.length):20;return a.jsx(rr,{width:l,height:i,children:a.jsx(Q,{children:({height:L,width:$})=>a.jsxs(me,{width:$,height:L,stackOffset:"sign",data:e.recordByTimeseries,barCategoryGap:"25%",maxBarSize:c?E[10]:30,margin:{top:5,right:C,left:0,bottom:5},style:{display:"flex",flex:"1 1 auto"},onClick:w,children:[a.jsx(J,{horizontal:!0,vertical:!1,strokeWidth:.5,stroke:f.colors.grey3}),a.jsx(ee,{dataKey:k=>k.timeLabel.label,type:"category",axisLine:{stroke:f.colors.grey3,strokeWidth:.5},tickLine:!1,tick:{color:f.colors.hero,...M.extraSmallRegular.cssObject}}),a.jsx(ae,{type:"number",axisLine:!1,tickLine:!1,tick:{color:f.colors.hero,...M.extraSmallRegular.cssObject},tickFormatter:k=>re("0,0.[00]a",k,p)}),a.jsx(oe,{wrapperStyle:{zIndex:2},cursor:_?{stroke:f.colors.background,strokeWidth:($-60)/W.operating_expenses,fill:f.colors.background}:!1,content:n,allowEscapeViewBox:{x:!1,y:!0}}),t]})})})},nr=x.div`
|
|
199
199
|
display: flex;
|
|
200
200
|
`,sr=x.div`
|
|
201
201
|
display: flex;
|
|
@@ -263,7 +263,7 @@ import{u as A,j as a,R as S,e as de,W as Ae,aj as Z,b7 as Te,q as E,b8 as J,aw a
|
|
|
263
263
|
`,Be=x(V)`
|
|
264
264
|
display: flex;
|
|
265
265
|
flex-direction: column;
|
|
266
|
-
`,Oe=x(V)``,mr=(e,r)=>{const t=b(N(e),"forecast");if(r.record[t]==null)return;const n=r.record[e].amount,o=r.record[t].amount,l={...n,amount:Math.floor((n.amount-o.amount)*100/100)},i=o.amount!==0?Math.floor((n.amount-o.amount)/o.amount*100)/100:void 0;return{value:o,change:l,percent:i,forecastPercent:r.record[t].percentValue}},fr=({active:e,payload:r,mode:t})=>{const n=[];let o={amount:0,currencyCode:""},l={amount:0,currencyCode:""};const i=b("gross_margin","actual");return r?.forEach(h=>{const c=h.name;if(e===!0){const s=h.payload,f=h.color,p=c!=null&&s.record[c]!=null?s.record[c].amount:void 0;let d;if(c.includes("forecast")!==!0)switch(t==="forecast_mode"&&(d=s.record[c]!=null?mr(c,s):void 0),c){case i:p!=null&&(o.currencyCode===""?o={...p}:o.amount=o.amount+p.amount),d!=null&&(l.currencyCode===""?l={...d.value}:l.amount=l.amount+d.value.amount),n.push({barName:S.getLocalizedStrings().chartCard.revenue[N(c)],actual:p,forecast:d,percent:s.record[c]!=null?s.record[c].percentValue??0:0,color:f});break;default:n.push({barName:S.getLocalizedStrings().chartCard.revenue[N(c)],actual:p,color:f,forecast:d});break}}}),n},ze=e=>e.map((r,t)=>a.jsxs(Me,{color:r.color,showPercent:r.percent!=null,children:[a.jsxs(gr,{children:[a.jsx(Ke,{color:r.color}),`${r.barName}:`]}),a.jsxs(pr,{children:[a.jsx(De,{children:`${T(r.actual)}`}),r.percent!=null?a.jsx(De,{children:F("0,0.0%",r.percent)}):null]})]},r.barName+t)),Re=e=>e.map((r,t)=>a.jsxs(Me,{color:r.color,showPercent:r.percent!=null,children:[a.jsxs(hr,{children:[a.jsx(Ke,{color:r.color}),`${r.barName}:`]}),a.jsx(X,{children:a.jsxs(Be,{children:[r.actual!=null?`${T(r.actual)}`:"-",a.jsx(Oe,{children:r.percent!=null?F("0,0.0%",r.percent):null})]})}),a.jsx(X,{children:a.jsxs(Be,{children:[r.forecast!=null?`${T(r.forecast.value)}`:"-",a.jsx(Oe,{children:r.forecast!=null&&r.forecast.forecastPercent!=null?F("0,0.0%",r.forecast.forecastPercent):null})]})}),r.forecast!=null?a.jsx(X,{isChange:!0,children:`${T(r.forecast.change)}`}):a.jsx(X,{children:"-"}),r.forecast!=null?a.jsx(X,{isChange:!0,children:F("0,0.0%",r.forecast.percent)}):a.jsx(X,{children:"-"})]},r.barName+t)),xr=e=>{if(e.length>0){for(const r of e)if(r.actual!=null)return r.actual.currencySymbol}return""},br=({barLabelsWithValues:e})=>a.jsxs(sr,{children:[a.jsxs(cr,{children:[a.jsx(ir,{}),a.jsx(he,{children:S.getLocalizedStrings().chartCard.tooltip.actual}),a.jsx(he,{children:S.getLocalizedStrings().chartCard.tooltip.forecast}),a.jsxs(he,{children:[S.getLocalizedStrings().chartCard.tooltip.change," ",xr(e)]}),a.jsx(he,{children:S.getLocalizedStrings().chartCard.tooltip.change_percent})]}),a.jsxs(ur,{children:[Re(e.slice(0,e.length-1)),e.length?a.jsx(Ie,{}):null,Re(e.slice(-1))]})]}),yr=({barLabelsWithValues:e})=>a.jsx(nr,{children:a.jsxs(dr,{children:[ze(e.slice(0,e.length-1)),e.length?a.jsx(Ie,{}):null,ze(e.slice(-1))]})}),Cr=e=>{const r=fr({...e});return r.length===0?null:a.jsx(a.Fragment,{children:e.mode==="forecast_mode"?a.jsx(br,{barLabelsWithValues:r}):a.jsx(yr,{barLabelsWithValues:r})})},jr=le.memo(Cr),Pe=(e,r,t,n,o,l)=>{let i=[],h=[],c=[];n!=null&&n.balances.length>0&&(i=K("income","actual",n)),o!=null&&o.balances.length>0&&(h=K("cogs","actual",o)),l!=null&&l.balances.length>0&&(c=ce("gross_margin","actual",l));const s=b("income","actual"),f=b("cogs","actual"),p=b("gross_margin","actual"),d=i.length>0?s:h.length>0?f:p,y={};return y[s]=i,y[f]=h,y[p]=c,t==="forecast_mode"&&Object.assign(y,vr(n,o,l)),d!=null?
|
|
266
|
+
`,Oe=x(V)``,mr=(e,r)=>{const t=b(N(e),"forecast");if(r.record[t]==null)return;const n=r.record[e].amount,o=r.record[t].amount,l={...n,amount:Math.floor((n.amount-o.amount)*100/100)},i=o.amount!==0?Math.floor((n.amount-o.amount)/o.amount*100)/100:void 0;return{value:o,change:l,percent:i,forecastPercent:r.record[t].percentValue}},fr=({active:e,payload:r,mode:t})=>{const n=[];let o={amount:0,currencyCode:""},l={amount:0,currencyCode:""};const i=b("gross_margin","actual");return r?.forEach(h=>{const c=h.name;if(e===!0){const s=h.payload,f=h.color,p=c!=null&&s.record[c]!=null?s.record[c].amount:void 0;let d;if(c.includes("forecast")!==!0)switch(t==="forecast_mode"&&(d=s.record[c]!=null?mr(c,s):void 0),c){case i:p!=null&&(o.currencyCode===""?o={...p}:o.amount=o.amount+p.amount),d!=null&&(l.currencyCode===""?l={...d.value}:l.amount=l.amount+d.value.amount),n.push({barName:S.getLocalizedStrings().chartCard.revenue[N(c)],actual:p,forecast:d,percent:s.record[c]!=null?s.record[c].percentValue??0:0,color:f});break;default:n.push({barName:S.getLocalizedStrings().chartCard.revenue[N(c)],actual:p,color:f,forecast:d});break}}}),n},ze=e=>e.map((r,t)=>a.jsxs(Me,{color:r.color,showPercent:r.percent!=null,children:[a.jsxs(gr,{children:[a.jsx(Ke,{color:r.color}),`${r.barName}:`]}),a.jsxs(pr,{children:[a.jsx(De,{children:`${T(r.actual)}`}),r.percent!=null?a.jsx(De,{children:F("0,0.0%",r.percent)}):null]})]},r.barName+t)),Re=e=>e.map((r,t)=>a.jsxs(Me,{color:r.color,showPercent:r.percent!=null,children:[a.jsxs(hr,{children:[a.jsx(Ke,{color:r.color}),`${r.barName}:`]}),a.jsx(X,{children:a.jsxs(Be,{children:[r.actual!=null?`${T(r.actual)}`:"-",a.jsx(Oe,{children:r.percent!=null?F("0,0.0%",r.percent):null})]})}),a.jsx(X,{children:a.jsxs(Be,{children:[r.forecast!=null?`${T(r.forecast.value)}`:"-",a.jsx(Oe,{children:r.forecast!=null&&r.forecast.forecastPercent!=null?F("0,0.0%",r.forecast.forecastPercent):null})]})}),r.forecast!=null?a.jsx(X,{isChange:!0,children:`${T(r.forecast.change)}`}):a.jsx(X,{children:"-"}),r.forecast!=null?a.jsx(X,{isChange:!0,children:F("0,0.0%",r.forecast.percent)}):a.jsx(X,{children:"-"})]},r.barName+t)),xr=e=>{if(e.length>0){for(const r of e)if(r.actual!=null)return r.actual.currencySymbol}return""},br=({barLabelsWithValues:e})=>a.jsxs(sr,{children:[a.jsxs(cr,{children:[a.jsx(ir,{}),a.jsx(he,{children:S.getLocalizedStrings().chartCard.tooltip.actual}),a.jsx(he,{children:S.getLocalizedStrings().chartCard.tooltip.forecast}),a.jsxs(he,{children:[S.getLocalizedStrings().chartCard.tooltip.change," ",xr(e)]}),a.jsx(he,{children:S.getLocalizedStrings().chartCard.tooltip.change_percent})]}),a.jsxs(ur,{children:[Re(e.slice(0,e.length-1)),e.length?a.jsx(Ie,{}):null,Re(e.slice(-1))]})]}),yr=({barLabelsWithValues:e})=>a.jsx(nr,{children:a.jsxs(dr,{children:[ze(e.slice(0,e.length-1)),e.length?a.jsx(Ie,{}):null,ze(e.slice(-1))]})}),Cr=e=>{const r=fr({...e});return r.length===0?null:a.jsx(a.Fragment,{children:e.mode==="forecast_mode"?a.jsx(br,{barLabelsWithValues:r}):a.jsx(yr,{barLabelsWithValues:r})})},jr=le.memo(Cr),Pe=(e,r,t,n,o,l)=>{let i=[],h=[],c=[];n!=null&&n.balances.length>0&&(i=K("income","actual",n)),o!=null&&o.balances.length>0&&(h=K("cogs","actual",o)),l!=null&&l.balances.length>0&&(c=ce("gross_margin","actual",l));const s=b("income","actual"),f=b("cogs","actual"),p=b("gross_margin","actual"),d=i.length>0?s:h.length>0?f:p,y={};return y[s]=i,y[f]=h,y[p]=c,t==="forecast_mode"&&Object.assign(y,vr(n,o,l)),d!=null?Z(e,r,d,y):void 0},vr=(e,r,t)=>{let n=[],o=[],l=[];e!=null&&e.balances.length>0&&(n=K("income","forecast",e)),r!=null&&r.balances.length>0&&(o=K("cogs","forecast",r)),t!=null&&t.balances.length>0&&(l=ce("gross_margin","forecast",t));const i=b("income","forecast"),h=b("cogs","forecast"),c=b("gross_margin","forecast"),s={};return s[i]=n,s[h]=o,s[c]=l,s},kr=[b("income","actual"),b("cogs","actual"),b("gross_margin","actual")],$r=[b("income","actual"),b("cogs","actual"),b("gross_margin","actual"),b("income","forecast"),b("cogs","forecast"),b("gross_margin","forecast")],wr=x.div`
|
|
267
267
|
width: ${e=>e.width}px;
|
|
268
268
|
height: ${e=>e.height}px;
|
|
269
269
|
|
|
@@ -277,4 +277,4 @@ import{u as A,j as a,R as S,e as de,W as Ae,aj as Z,b7 as Te,q as E,b8 as J,aw a
|
|
|
277
277
|
margin-left: ${e=>q.legendLabelMarginLeft.valuePx(e.windowSize)};
|
|
278
278
|
margin-right: ${e=>q.legendLabelMarginRight.valuePx(e.windowSize)};
|
|
279
279
|
color: ${e=>e.theme.colors.primary};
|
|
280
|
-
`;function Nr({selectedRangeReport:e,timeframe:r,highlightedRange:t,width:n,height:o,showBarHoverBackground:l,isDetailPage:i,mode:h,onCOABalancesRangeChanged:c}){const s=A(),f=R.useRef(!1);R.useEffect(()=>{f.current=!0},[]);const p=[s.colors.graphColor26,s.colors.graphColor17,s.colors.graphColor12],d=[s.colors.graphColor28,s.colors.graphColor17,s.colors.graphColor10,s.colors.graphColor28Dark,s.colors.graphColor17Dark,s.colors.graphColor10Dark],y=h==="forecast_mode"?d:p,_=h==="forecast_mode"?$r:kr,w=(u,j=s.colors.graphColor28)=>u<y.length?y[u]:j,C=e.reportId==="revenue"?Pe(e.firstMonthOfFY,_,h,e.sections?.income,e.sections?.cogs,e.calculatedSections?.grossMargin):Pe(e.firstMonthOfFY,_,h,e.sections.income,e.sections.cogs,e.calculatedSections.grossMargin),L=u=>{const{cx:j,cy:D,fill:B,stroke:z,value:G}=u;return G==null?a.jsx(a.Fragment,{}):a.jsx("circle",{cx:j,cy:D,r:4,stroke:B,strokeWidth:2,fill:z})},$=u=>{const{cx:j,cy:D,fill:B,stroke:z,value:G}=u;return G==null?a.jsx(a.Fragment,{}):a.jsx("circle",{cx:j,cy:D,r:5,stroke:z,strokeWidth:2,fill:B})},k=(u,j)=>a.jsx(pe,{name:u,type:"monotone",legendType:"plainline",isAnimationActive:!1,dot:a.jsx(L,{}),activeDot:a.jsx($,{}),dataKey:D=>{const B=D.record;return(B[u]!=null&&B[u].amount!=null?B[u].amount:void 0)?.amount},stroke:w(j),strokeDasharray:"3 3",strokeWidth:1.5},u),v=(u,j,D)=>a.jsx(te,{name:u,animationDuration:D?500:void 0,style:{cursor:"pointer"},legendType:"square",dataKey:B=>{const z=B.record;return(z[u]!=null&&z[u].amount!=null?z[u].amount:void 0)?.amount??0},fill:w(j)},u),O=()=>{const u=[];return _.forEach((j,D)=>{const B=i===!0&&!f.current;j.endsWith("_forecast")?u.push(k(j,D)):u.push(v(j,D,B))}),u};return C==null?null:a.jsx(Lr,{chartData:C,timeframe:r,showBarHoverBackground:l,barElements:O(),customToolTipContent:({active:u,payload:j})=>a.jsx(jr,{active:u,payload:j,mode:h}),width:n,height:o,onCOABalancesRangeChanged:c,highlightedRange:t,isDetailPage:i===!0})}const Lr=({chartData:e,timeframe:r,barElements:t,customToolTipContent:n,highlightedRange:o,width:l,height:i,showBarHoverBackground:h,isDetailPage:c,onCOABalancesRangeChanged:s})=>{const f=de(),p=A(),d=ne(e),y=e.timeseries,_=y.map($=>$.label),w=h!==!1,C=$=>{if(!c||$?.activePayload==null||$?.activePayload.length===0)return;const k=$.activePayload[0];if(k?.payload?.timeLabel?.label==null)return;const v=$.activeTooltipIndex,O=k.payload.timeLabel.label;if(o==null)return;const u=se(O,_,o.numberOfPeriods),j=u[1]===void 0?_.length-1:_.indexOf(u[1]),D={...o,thisPeriod:{startDate:y[j].startDate,endDate:y[j].endDate}};s?.(y[v],r,D)},L=c?(l-60)/W.revenue*(W.revenue-e.recordByTimeseries.length):20;return a.jsx(wr,{width:l,height:i,windowSize:f,children:a.jsx(
|
|
280
|
+
`;function Nr({selectedRangeReport:e,timeframe:r,highlightedRange:t,width:n,height:o,showBarHoverBackground:l,isDetailPage:i,mode:h,onCOABalancesRangeChanged:c}){const s=A(),f=R.useRef(!1);R.useEffect(()=>{f.current=!0},[]);const p=[s.colors.graphColor26,s.colors.graphColor17,s.colors.graphColor12],d=[s.colors.graphColor28,s.colors.graphColor17,s.colors.graphColor10,s.colors.graphColor28Dark,s.colors.graphColor17Dark,s.colors.graphColor10Dark],y=h==="forecast_mode"?d:p,_=h==="forecast_mode"?$r:kr,w=(u,j=s.colors.graphColor28)=>u<y.length?y[u]:j,C=e.reportId==="revenue"?Pe(e.firstMonthOfFY,_,h,e.sections?.income,e.sections?.cogs,e.calculatedSections?.grossMargin):Pe(e.firstMonthOfFY,_,h,e.sections.income,e.sections.cogs,e.calculatedSections.grossMargin),L=u=>{const{cx:j,cy:D,fill:B,stroke:z,value:G}=u;return G==null?a.jsx(a.Fragment,{}):a.jsx("circle",{cx:j,cy:D,r:4,stroke:B,strokeWidth:2,fill:z})},$=u=>{const{cx:j,cy:D,fill:B,stroke:z,value:G}=u;return G==null?a.jsx(a.Fragment,{}):a.jsx("circle",{cx:j,cy:D,r:5,stroke:z,strokeWidth:2,fill:B})},k=(u,j)=>a.jsx(pe,{name:u,type:"monotone",legendType:"plainline",isAnimationActive:!1,dot:a.jsx(L,{}),activeDot:a.jsx($,{}),dataKey:D=>{const B=D.record;return(B[u]!=null&&B[u].amount!=null?B[u].amount:void 0)?.amount},stroke:w(j),strokeDasharray:"3 3",strokeWidth:1.5},u),v=(u,j,D)=>a.jsx(te,{name:u,animationDuration:D?500:void 0,style:{cursor:"pointer"},legendType:"square",dataKey:B=>{const z=B.record;return(z[u]!=null&&z[u].amount!=null?z[u].amount:void 0)?.amount??0},fill:w(j)},u),O=()=>{const u=[];return _.forEach((j,D)=>{const B=i===!0&&!f.current;j.endsWith("_forecast")?u.push(k(j,D)):u.push(v(j,D,B))}),u};return C==null?null:a.jsx(Lr,{chartData:C,timeframe:r,showBarHoverBackground:l,barElements:O(),customToolTipContent:({active:u,payload:j})=>a.jsx(jr,{active:u,payload:j,mode:h}),width:n,height:o,onCOABalancesRangeChanged:c,highlightedRange:t,isDetailPage:i===!0})}const Lr=({chartData:e,timeframe:r,barElements:t,customToolTipContent:n,highlightedRange:o,width:l,height:i,showBarHoverBackground:h,isDetailPage:c,onCOABalancesRangeChanged:s})=>{const f=de(),p=A(),d=ne(e),y=e.timeseries,_=y.map($=>$.label),w=h!==!1,C=$=>{if(!c||$?.activePayload==null||$?.activePayload.length===0)return;const k=$.activePayload[0];if(k?.payload?.timeLabel?.label==null)return;const v=$.activeTooltipIndex,O=k.payload.timeLabel.label;if(o==null)return;const u=se(O,_,o.numberOfPeriods),j=u[1]===void 0?_.length-1:_.indexOf(u[1]),D={...o,thisPeriod:{startDate:y[j].startDate,endDate:y[j].endDate}};s?.(y[v],r,D)},L=c?(l-60)/W.revenue*(W.revenue-e.recordByTimeseries.length):20;return a.jsx(wr,{width:l,height:i,windowSize:f,children:a.jsx(Q,{children:({height:$,width:k})=>a.jsxs(me,{data:e.recordByTimeseries,barCategoryGap:c?void 0:"12%",maxBarSize:c?E[10]:22,barGap:c?void 0:2,margin:{top:5,right:L,left:0,bottom:E[4]},height:$,width:k,style:{display:"flex",flex:"1 1 auto"},onClick:C,children:[a.jsx(J,{horizontal:!0,vertical:!1,strokeWidth:.5,stroke:p.colors.grey3}),a.jsx(ee,{dataKey:v=>v.timeLabel.label,type:"category",axisLine:{stroke:p.colors.grey3,strokeWidth:.5},tickLine:!1,tick:{color:p.colors.hero,...M.extraSmallRegular.cssObject}}),a.jsx(ae,{type:"number",axisLine:!1,tickLine:!1,tick:{color:p.colors.hero,...M.extraSmallRegular.cssObject},tickFormatter:v=>re("0,0.[00]a",v,d)}),a.jsx(oe,{wrapperStyle:{zIndex:2},cursor:w?{stroke:p.colors.background,strokeWidth:(k-60)/W.revenue,fill:p.colors.background}:!1,content:n,allowEscapeViewBox:{x:!1,y:!0}}),t,c?a.jsx(ge,{verticalAlign:"bottom",wrapperStyle:{width:"100%",display:"flex",justifyContent:"center",left:"initial",bottom:m.sp0},iconSize:E[3],formatter:v=>a.jsx(_r,{windowSize:f,children:v.endsWith("_forecast")===!0?S.getLocalizedStrings().chartCard.revenue[v]:S.getLocalizedStrings().chartCard.revenue[N(v)]})}):null]})})})};export{Pr as G,Wr as H,Rr as N,Tr as P,Nr as Y};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{e as Tt,Y as vt,C as y,cI as jt,R as St,cJ as Ct,cK as Dt,j as t,cL as It,cM as le,cN as Pt,l as d,cO as kt,cP as At,W as j,cQ as Mt,a0 as A,cR as Bt,cS as Nt,cT as Ae,cU as Me,cV as Be,v as q,cW as O,cX as z,cY as _,f as S,cZ as Rt,c_ as Et,c$ as Ft,d0 as Lt,bp as Ne,o as n,a4 as Ot,q as c,h as zt,by as _t,X as Wt,g as Ut,d1 as Yt,bO as Zt,y as se,n as de,d2 as Ht,d3 as Vt,aC as qt,T as Gt,ao as Kt,r as Xe,b6 as Xt,w as Qe,aP as Qt,d4 as Jt}from"./index-BKug3-eP.js";import{b as U,n as i}from"./vendor-rkTZJa59.js";import{t as en,o as tn}from"./LowBalancePopup-BhLxnyK0-C1-HIC13.js";import{S as W}from"./LabeledText-BJFW2h6S-G87zH92R.js";import"./mui-C42whWwM.js";import"./analytics-CcevxdRy.js";import"./routing-CH3KJxCW.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-CK3r1iTV.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:v,labels:Ee,edit:an,strings:{empty:h}},spendManagement:{billPay:ln}}=St.getLocalizedStrings(),{billDetails:a,paymentDetails:Fe}=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(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:Q,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}`,E=p.largeLabelWidth.value(s),F=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: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},L={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(()=>{(F?.fetchState==="Completed"||J?.fetchState==="Completed")&&(me(),ue(),ye())},[F,J,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-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",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?Et(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=Jt(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:F?.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:()=>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(Fn,{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(Ve,{children:t.jsx(qe,{})}),t.jsx(K,{children:t.jsxs(t.Fragment,{children:[l.documentId!=null?a.invoiceNo:null,l.documentId]})})]}),t.jsx(Ge,{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(K,{children:[l.dueDate!=null?a.due:null," ",l.dueDate?.format(D)]}),t.jsx(Ke,{children:r!=null?Ae.includes(r.code)?t.jsx(Me,{style:{padding:"2px 5px"},title:r.value,placement:"top",children:t.jsx(X,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value})}):t.jsx(X,{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(Ve,{children:t.jsx(qe,{})}),t.jsxs(En,{"data-testid":j("review-detail-info"),onClick:()=>Q(l.id,l.billPayInfo.stage.code),children:[t.jsx(K,{style:{width:"50%"},children:t.jsxs("div",{children:[l.documentId!=null?a.invoiceNo:null," ",l.documentId]})}),t.jsxs(K,{style:{width:"25%"},children:[l.dueDate!=null?a.due:null," ",l.dueDate?.format(D)]}),t.jsx(Ge,{style:{width:"25%"},windowSize:s,children:A("0,0[.]00",l.amount)})]}),t.jsx(Ke,{children:r!=null?Ae.includes(r.code)?t.jsx(Me,{style:{padding:"2px 5px"},title:r.value,placement:"top",children:t.jsx(X,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value})}):t.jsx(X,{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:q.largeMedium.cssObject,decimalStyles:q.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:E},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(G,{})]}),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:E},style:{width:"auto"},value:le(o?.method??""),additionalInfoLabel:xt()})}),t.jsx(G,{}),!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:E},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(G,{})]}):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:E},style:{width:"auto"},value:ct??"",additionalInfoLabel:ut})}),g||nt?t.jsxs(t.Fragment,{children:[t.jsx(G,{}),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:E},style:{width:"auto"},value:Lt(e.isRecurring,g,e.recurringBillInstance??1,e.recurringConfig?.totalPaymentCycles??0),additionalInfoLabel:Ft(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?Fe.conversionAmountColon:Ee.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:Fe.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:Ee.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:q.h6Medium.cssObject,decimalStyles:q.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:F?.fetchState==="In-Progress"||J?.fetchState==="In-Progress",onClick:b?$e:()=>{bt&&ae!=null?V(!0):ve()},style:{width:ze(!0,k,b,H,s)}},rightSideComponent:k&&!b&&F.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(Xt)`
|
|
1
|
+
import{e as Tt,Y as vt,C as y,cI as jt,R as St,cJ as Ct,cK as Dt,j as t,cL as It,cM as le,cN as Pt,l as d,cO as kt,cP as At,W as j,cQ as Mt,a0 as A,cR as Bt,cS as Nt,cT as Ae,cU as Me,cV as Be,v as q,cW as O,cX as z,cY as _,f as S,cZ as Rt,c_ as Et,c$ as Ft,d0 as Lt,bp as Ne,o as n,a4 as Ot,q as c,y as zt,by as _t,X as Wt,g as Ut,d1 as Yt,bO as Zt,x as se,n as de,d2 as Ht,d3 as Vt,aC as qt,T as Gt,ao as Kt,r as Xe,b6 as Xt,w as Je,aP as Jt,d4 as Qt}from"./index-0QGih61V.js";import{b as U,n as i}from"./vendor-rkTZJa59.js";import{t as en,o as tn}from"./LowBalancePopup-_1OrPez7-DZkbi_Py.js";import{S as W}from"./LabeledText-DopMzeZ3-CYS48zTu.js";import"./mui-C42whWwM.js";import"./analytics-CcevxdRy.js";import"./routing-CH3KJxCW.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-CK3r1iTV.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:Ee,edit:an,strings:{empty:h}},spendManagement:{billPay:ln}}=St.getLocalizedStrings(),{billDetails:a,paymentDetails:Fe}=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(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}`,E=p.largeLabelWidth.value(s),F=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},L={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(()=>{(F?.fetchState==="Completed"||Q?.fetchState==="Completed")&&(me(),ue(),ye())},[F,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-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",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?Et(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:F?.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(Fn,{children:[t.jsx(On,{children:a.duplicateInvoiceFound}),e.duplicateBillTransactions.map(l=>{const r=Nt(l);return l!=null?t.jsx(Ln,{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(Le,{attachment:l.attachments[0]}):t.jsx(Ve,{children:t.jsx(qe,{})}),t.jsx(K,{children:t.jsxs(t.Fragment,{children:[l.documentId!=null?a.invoiceNo:null,l.documentId]})})]}),t.jsx(Ge,{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(K,{children:[l.dueDate!=null?a.due:null," ",l.dueDate?.format(D)]}),t.jsx(Ke,{children:r!=null?Ae.includes(r.code)?t.jsx(Me,{style:{padding:"2px 5px"},title:r.value,placement:"top",children:t.jsx(X,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value})}):t.jsx(X,{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(Ve,{children:t.jsx(qe,{})}),t.jsxs(En,{"data-testid":j("review-detail-info"),onClick:()=>J(l.id,l.billPayInfo.stage.code),children:[t.jsx(K,{style:{width:"50%"},children:t.jsxs("div",{children:[l.documentId!=null?a.invoiceNo:null," ",l.documentId]})}),t.jsxs(K,{style:{width:"25%"},children:[l.dueDate!=null?a.due:null," ",l.dueDate?.format(D)]}),t.jsx(Ge,{style:{width:"25%"},windowSize:s,children:A("0,0[.]00",l.amount)})]}),t.jsx(Ke,{children:r!=null?Ae.includes(r.code)?t.jsx(Me,{style:{padding:"2px 5px"},title:r.value,placement:"top",children:t.jsx(X,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value})}):t.jsx(X,{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:q.largeMedium.cssObject,decimalStyles:q.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:E},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(G,{})]}),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:E},style:{width:"auto"},value:le(o?.method??""),additionalInfoLabel:xt()})}),t.jsx(G,{}),!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:E},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(G,{})]}):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:E},style:{width:"auto"},value:ct??"",additionalInfoLabel:ut})}),g||nt?t.jsxs(t.Fragment,{children:[t.jsx(G,{}),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:E},style:{width:"auto"},value:Lt(e.isRecurring,g,e.recurringBillInstance??1,e.recurringConfig?.totalPaymentCycles??0),additionalInfoLabel:Ft(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?Fe.conversionAmountColon:Ee.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:Fe.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:Ee.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:q.h6Medium.cssObject,decimalStyles:q.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:F?.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&&F.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(Xt)`
|
|
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{e as Tt,Y as vt,C as y,cI as jt,R as St,cJ as Ct,cK as Dt,j as t,cL 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};
|
|
@@ -107,7 +107,7 @@ import{e as Tt,Y as vt,C as y,cI as jt,R as St,cJ as Ct,cK as Dt,j as t,cL as It
|
|
|
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;
|
|
@@ -271,7 +271,7 @@ import{e as Tt,Y as vt,C as y,cI as jt,R as St,cJ as Ct,cK as Dt,j as t,cL 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-CKOAcLzJ-BPHtj3ml.js → ReviewOverlay-C90OnldQ-BJwck8Vp.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as B,j as e,W as x,o as r,a4 as L,C as d,a3 as M,X as C,g as W,f as s,
|
|
1
|
+
import{e as B,j as e,W as x,o as r,a4 as L,C as d,a3 as M,X as C,g as W,f as s,x as j,c6 as R,m as I,w as y,aB as D,q as n,ej as G,az as A,jj as F,jk as J}from"./index-0QGih61V.js";import{n as t}from"./vendor-rkTZJa59.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])},X={title:new C("h6Regular","h5Regular")},xi=({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":x("review-overlay-close",i)})})})})}),e.jsxs(O,{windowSize:l,children:[e.jsxs(Q,{windowSize:l,children:[e.jsx(_,{children:e.jsx(K,{windowSize:l,children:i})}),e.jsx(N,{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":x("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(m,{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(m,{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};
|
|
@@ -19,12 +19,12 @@ import{e as B,j as e,W as x,o as r,a4 as L,C as d,a3 as M,X as C,g as W,f as s,y
|
|
|
19
19
|
display: flex;
|
|
20
20
|
align-items: center;
|
|
21
21
|
`,K=t(W)`
|
|
22
|
-
${i=>`${
|
|
22
|
+
${i=>`${X.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
|
-
`,N=t(
|
|
27
|
+
`,N=t(j)`
|
|
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`
|
|
@@ -96,12 +96,12 @@ import{e as B,j as e,W as x,o as r,a4 as L,C as d,a3 as M,X as C,g as W,f as s,y
|
|
|
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(j)`
|
|
100
100
|
color: ${i=>i.isError||i.isWarning?i.theme.mode==="dark"?s.neutralGrey4Dark:i.isWarning:i.theme.colors.primary};
|
|
101
|
-
`,si=t(
|
|
101
|
+
`,si=t(y)`
|
|
102
102
|
margin-top: -5px;
|
|
103
103
|
color: ${i=>i.theme.mode==="dark"?s.neutralGrey1Dark:i.theme.colors.primary};
|
|
104
|
-
`,g=t(
|
|
104
|
+
`,g=t(y)`
|
|
105
105
|
display: flex;
|
|
106
106
|
margin-top: -5px;
|
|
107
107
|
color: ${i=>i.isError?s.important:i.isWarning?s.brandColorGoldDark:i.theme.colors.primary};
|
|
@@ -109,11 +109,11 @@ import{e as B,j as e,W as x,o as r,a4 as L,C as d,a3 as M,X as C,g as W,f as s,y
|
|
|
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(A)`
|
|
113
113
|
width: ${r.sp4};
|
|
114
114
|
height: ${r.sp4};
|
|
115
115
|
color: ${s.success};
|
|
116
|
-
`,ai=t(
|
|
116
|
+
`,ai=t(J)`
|
|
117
117
|
width: ${r.sp4};
|
|
118
118
|
height: ${r.sp4};
|
|
119
119
|
color: ${i=>i.theme.colors.grey2};
|
|
@@ -145,7 +145,7 @@ import{e as B,j as e,W as x,o as r,a4 as L,C as d,a3 as M,X as C,g as W,f as s,y
|
|
|
145
145
|
color: ${i=>i.theme.colors.brandColorJade};
|
|
146
146
|
width: ${r.sp3};
|
|
147
147
|
height: ${r.sp3};
|
|
148
|
-
`,hi=t(
|
|
148
|
+
`,hi=t(F)`
|
|
149
149
|
color: ${i=>i.theme.colors.brandColorGoldDark};
|
|
150
150
|
width: ${r.sp4};
|
|
151
151
|
height: ${r.sp4};
|
package/dist/assets/{RoleWithToolTip-BiydziFE-VYITxPfh.js → RoleWithToolTip-Cav6Dtwi-DQjRjWwX.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{eO as h,eP as x,j as t,bp as m,o as n,W as o,R as g,s as j,w as p}from"./index-
|
|
1
|
+
import{eO as h,eP as x,j as t,bp as m,o as n,W as o,R as g,s as j,w as p}from"./index-0QGih61V.js";import{n as r}from"./vendor-rkTZJa59.js";const{hyphen:a}=g.getLocalizedStrings().common.strings,y=r.div``,f=r.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-width: 192px;
|
|
4
4
|
justify-content: space-between;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a2 as Y,l as me,hK as ee,ga as fe,ey as we,hL as Je,a as Me,hM as Ve,ca as _e,cb as Pe,j as a,R as be,F as Fe,bV as Ne,bX as qe,bY as Re,a4 as We,hN as Be,hO as Ue,_ as he,hP as Se,hQ as $e,cn as ze,e as Ke,i2 as Ye,gf as re,q as W,f as De,C as Ce,cd as Ge,hR as He,hS as Qe,hT as Xe,o as _}from"./index-
|
|
1
|
+
import{a2 as Y,l as me,hK as ee,ga as fe,ey as we,hL as Je,a as Me,hM as Ve,ca as _e,cb as Pe,j as a,R as be,F as Fe,bV as Ne,bX as qe,bY as Re,a4 as We,hN as Be,hO as Ue,_ as he,hP as Se,hQ as $e,cn as ze,e as Ke,i2 as Ye,gf as re,q as W,f as De,C as Ce,cd as Ge,hR as He,hS as Qe,hT as Xe,o as _}from"./index-0QGih61V.js";import{b as m,n as U}from"./vendor-rkTZJa59.js";import{i as Ze,r as et,n as tt,o as lt}from"./ScheduleSequenceTable-C9IcAd6X-B0s-FwXu.js";import"./mui-C42whWwM.js";import"./analytics-CcevxdRy.js";import"./routing-CH3KJxCW.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-CK3r1iTV.js";const B={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%;
|
|
@@ -18,7 +18,7 @@ import{a2 as Y,l as me,hK as ee,ga as fe,ey as we,hL as Je,a as Me,hM as Ve,ca a
|
|
|
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:O,selectedClass:P,selectedAccumulatedDepreciationCategory:F,assetId:L,selectedDate:w,selectedMonths:T,selectedPostingDay:
|
|
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:O,selectedClass:P,selectedAccumulatedDepreciationCategory:F,assetId:L,selectedDate:w,selectedMonths:T,selectedPostingDay:E,lastDayOfMonth:j,isDisabled:h,allowCreateSchedule:J,onCreateSchedule:i,onDelete:ae,onMarkAsComplete:Q}){const{resetField:f}=ze(),se=V(t,"scheduleExpenseCategory"),oe=V(t,"scheduleClass"),ne=V(t,"accumulatedDepreciationCategory"),de=V(t,"assetId"),X=V(t,"startDate"),S=V(t,"postingDate"),r=V(t,"months"),e=be.getLocalizedStrings().jeSchedules.scheduleDetails.scheduleDetailsSection,b=o=>s.filter(q=>q.qboId===o)[0]?.qboId,x=o=>p.filter(q=>q.qboId===o)[0]?.qboId,ie=o=>u.filter(q=>q.classId===o)[0]?.accountingClassNumber,H={valueContainer:o=>({...o,overflow:"unset"})},I=Ke(),$=Ye({startDate:d.baseTransaction.date,endDate:d.baseTransaction.date.add(1,"year")}),z=()=>{f(S)},K=E==null&&j==null?void 0:j===!0?"lastDayOfMonth":"day",N=o=>[k.expense?.qboId,k.income?.qboId].includes(o),Z=()=>{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:Z,isUpdating:g==="In-Progress",onMarkAsComplete:Q,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:B.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:O,allOptions:l},registerOptions:{required:!0,validate:o=>!!o.selectedOption},customStyleConfig:H},disableCurrentOption:N,style:{borderTopLeftRadius:W[2],borderTopRightRadius:W[2]}}),a.jsx(G,{}),a.jsx(re,{isDisabled:h,isLoading:!1,label:{label:e.class,width:B.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:H},style:{borderTopLeftRadius:W[0],borderTopRightRadius:W[0]}}),a.jsx(G,{}),a.jsx(re,{isDisabled:D.includes("credit_category_deleted")?void 0:h,isLoading:!1,label:{label:e.accumulatedDepreciationCategory,width:B.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:H},disableCurrentOption:N,style:{borderTopLeftRadius:W[0],borderTopRightRadius:W[0]}}),a.jsx(G,{}),a.jsx(Ge,{label:{label:e.assetId,width:B.labelWidth.value(I)},style:{width:"auto"},text:{type:"text",name:de,defaultValue:L,placeholder:e.assetIdPlaceholder,autoComplete:"new-password",options:{maxLength:W[3],required:!0,validate:o=>!!o}},isDisabled:h}),a.jsx(G,{}),a.jsx(He,{label:{label:e.startMonth,width:B.labelWidth.value(I)},monthSelectorField:{name:X,placeholder:e.startMonthPlaceholder,defaultValue:w,showDownChevron:!1,isDisabled:h,monthsAndYears:$},isDisabled:h}),a.jsx(G,{}),a.jsx(lt,{label:{label:e.postingDate,width:B.labelWidth.value(I)},isDisabled:h,dayOfMonthField:{placeholder:e.postingDatePlaceholder,name:S,defaultValue:{type:K,dayOfMonth:E},onSaveClick:()=>{},onCancelClick:z}}),a.jsx(G,{}),a.jsx(Qe,{label:{label:e.months,width:B.labelWidth.value(I)},singleSelectNumericField:{name:r,isDisabled:h,placeholder:e.monthsPlaceholder,defaultValue:{selectedOption:T!=null?v[T-1]:void 0,allOptions:v},registerOptions:{required:!0,validate:o=>!!o.selectedOption}}})]})}),a.jsx(he,{controller:J===!1,children:a.jsx(Xe,{text:e.scheduleMarkedAsCompleted})})]})}const nt=U.div`
|
|
22
22
|
display: flex;
|
|
23
23
|
flex-direction: column;
|
|
24
24
|
width: 100%;
|
|
@@ -34,4 +34,4 @@ import{a2 as Y,l as me,hK as ee,ga as fe,ey as we,hL as Je,a as Me,hM as Ve,ca a
|
|
|
34
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 jt({analytics:t,controllerUserDetails:d,expenseAutomationSelectedPeriod:g,scheduleDetailsView:l,vendorSearchAutoCompleteActions:s,vendorSearchAutoCompleteData:u,usedInExpenseAutomation:c,onNavigateBack:p,onEditAmount:y,onJELinkClick:v,onSave:k,onDelete:O,onDetailPageChange:P,onViewLinkedJE:F,onTransactionClick:L,onMarkAsComplete:w,removeJeScheduleTransactionKey:T}){const[j,E]=m.useState(!1),h=Y(l.updateStatus.fetchState),J=Y(l.selectedJEScheduleTransaction?.status.code),i=Y(l.deleteStatus.fetchState),[ae,Q]=m.useState(!1),f=l.scheduleDetailsLocalData.fixed_assets,se=Y(f.jeScheduleDetails.length),oe=Y(f.selectedDate),ne=Y(f.selectedDayOfMonth),[de,X]=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:()=>{E(!1),p()},onCancelClick:()=>{E(!1)}},H=n=>{const C=e?.scheduledJournalEntry[n];r!=null&&C!=null&&e!=null&&t.trackScheduleDetailsLinkJournalEntry({scheduleType:"fixed_assets",transaction:{...$e(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 A=e?.scheduledJournalEntry[C];r!=null&&A!=null&&e!=null&&t.trackScheduleDetailsViewJournalEntry({scheduleType:"fixed_assets",scheduleExpenseCategoryAndClass:{expenseCategory:e.jeDebit.account?.accountName??null,expenseClass:e.jeDebit.accountingClass?.className??null},journalEntryDetails:Se(A),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"&&T(e.jeScheduleTransactionKey,{month:g.month,year:g.year}),p())},[g,J,l.selectedJEScheduleTransaction?.status.code,t,p,h,T,c,l.updateStatus,e,r,S,b,x]),m.useEffect(()=>{i==="In-Progress"&&l.deleteStatus.fetchState==="Completed"&&p()},[i,l.deleteStatus,p]);const $=fe(l.accountListNestedAccountHierarchy),z=fe(l.allDepreciationAccountListNestedAccountHierarchy),K=we(l.classListNestedAccountHierarchy),N=Je("fixed_assets"),Z=m.useRef(),D=Me({mode:"all",reValidateMode:"onChange",defaultValues:ue(l,$,K,z,N,u.entityAutoCompleteView),resetOptions:{keepDirtyValues:!0,keepErrors:!0},values:ue(l,$,K,z,N,u.entityAutoCompleteView)}),o=D.watch("scheduleDetailsFixedAssetsSection.vendor");m.useEffect(()=>{u.entityAutoCompleteView.fetchState==="Completed"&&Z.current?.(Ve(u.entityAutoCompleteView))},[u.entityAutoCompleteView.fetchState]);const q=(n,C)=>{s.onAutoCompleteInputChange?.(n,"vendor"),Z.current=C},xe=D.handleSubmit(()=>{k(l.selectedJEScheduleTransaction?.jeScheduleId)}),ve=async(n,C)=>{const A=C[te].vendor;if(n.includes("vendor")){const ce=A?.defaultOptions.map(R=>R.value);if(A?.selectedOption!=null&&ce?.includes(A.selectedOption)!==!0){const R=u.entityAutoCompleteView.vendor.find(Le=>Le.id===A.selectedOption);R!=null&&D.setValue("scheduleDetailsFixedAssetsSection.vendor.defaultOptions",[{label:R.name??"",value:R.id}])}}const ke=n.includes("amount");if(P(C,ke),n.includes("amount")){const ce=n.split(".")[1],R=parseInt(ce);Q(!0),y(R,l.selectedJEScheduleTransaction?.jeScheduleId)}};m.useEffect(()=>{const n=D.watch((C,{name:A})=>{A!=null&&C!=null&&_e(()=>ve(A,C))});return()=>{n.unsubscribe()}}),m.useEffect(()=>{(se!==f.jeScheduleDetails.length||oe!==f.selectedDate||ne!==f.selectedDayOfMonth)&&ae===!0&&(D.resetField(le,{defaultValue:ue(l,$,K,z,N,u.entityAutoCompleteView)[le],keepDirty:!1}),Q(!1))},[f.jeScheduleDetails.length,f.selectedDate,f.selectedDayOfMonth]),m.useEffect(()=>{l.selectedJEScheduleTransaction?.status.code==="marked_as_completed"&&X(!1)},[l.selectedJEScheduleTransaction?.status.code]);const pe=(Pe(D.formState.dirtyFields)||l.selectedJEScheduleTransaction?.status.code==="draft")&&f.jeScheduleDetails.length>0,je=()=>{pe===!0?E(!0):(r!=null&&e!=null&&t.trackScheduleDetailsCanceled(ee({jeScheduleTransaction:e,scheduleTab:"fixed_assets",transaction:r,vendor:S,controllerEmails:b,controllerUserIds:x})),p())},Ee=()=>{l.selectedJEScheduleTransaction!=null&&L({id:l.selectedJEScheduleTransaction.baseTransaction.id,type:l.selectedJEScheduleTransaction.baseTransaction.type})},Ae=m.useCallback(()=>{X(!0)},[]),Oe=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]),Te=m.useCallback(n=>{r!=null&&e!=null&&t.trackScheduleDetailsDeleted(ee({jeScheduleTransaction:e,scheduleTab:"fixed_assets",transaction:r,vendor:S,controllerEmails:b,controllerUserIds:x})),O(n)},[t,b,x,e,O,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:je,onTransactionClick:Ee}),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:q,vendorField:o,vendorSearchAutoCompleteActions:s,vendorSearchAutoCompleteData:u,scheduleDetailsView:l,allAccountOptions:$,allClassOptions:K,allMonthOptions:N,allDepAccountOptions:z,onEditAmount:y,onDelete:Te,onJELinkClick:H,onViewLinkedJE:I,onMarkAsComplete:Oe,allowCreateSchedule:de,onCreateSchedule:Ae}),j===!0?a.jsx(Ne,{titleComponent:a.jsx(Re,{children:M.confirmationPopup.discardTitle}),descriptionComponent:a.jsx(qe,{children:M.confirmationPopup.discardDescription}),primaryButtonText:M.confirmationPopup.discard,secondaryButtonText:M.confirmationPopup.cancel,proceedButtonVariant:"danger",action:ie}):null,pe===!0?a.jsx(We,{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:()=>{E(!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:O,onDelete:P,onJELinkClick:F,onViewLinkedJE:L,onMarkAsComplete:w}){const T=s.selectedJEScheduleTransaction?.scheduledJournalEntry.flatMap(j=>j.error).filter(j=>!!j)??[];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:T,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:O,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,O=c.selectedAccumulatedDepreciationCategory,P=O!=null?t.allDepreciationAccountList.find(i=>i.accountId===O):void 0,F=c.assetId,L=c.selectedClass,w=L!=null?t.allClassList.find(i=>i.classId===L):void 0,T=c.selectedMonths,j=c.jeScheduleDetails.map(i=>({postingDate:i.postingDate,amount:i.amount.amount,runningBalance:i.runningBalance.amount,postingStatus:i.postingStatus,jeLink:i.jeLink.thirdPartyTransactionId})),E=c.selectedDayOfMonth,h=c.lastDayOfMonth,J=E==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:T,allOptions:s},vendor:{selectedOption:v?.id??y?.id,defaultOptions:Be(u,v??y)},postingDate:{type:J,dayOfMonth:E}},[le]:j}};export{jt 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:O,onDetailPageChange:P,onViewLinkedJE:F,onTransactionClick:L,onMarkAsComplete:w,removeJeScheduleTransactionKey:T}){const[E,j]=m.useState(!1),h=Y(l.updateStatus.fetchState),J=Y(l.selectedJEScheduleTransaction?.status.code),i=Y(l.deleteStatus.fetchState),[ae,Q]=m.useState(!1),f=l.scheduleDetailsLocalData.fixed_assets,se=Y(f.jeScheduleDetails.length),oe=Y(f.selectedDate),ne=Y(f.selectedDayOfMonth),[de,X]=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)}},H=n=>{const C=e?.scheduledJournalEntry[n];r!=null&&C!=null&&e!=null&&t.trackScheduleDetailsLinkJournalEntry({scheduleType:"fixed_assets",transaction:{...$e(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 A=e?.scheduledJournalEntry[C];r!=null&&A!=null&&e!=null&&t.trackScheduleDetailsViewJournalEntry({scheduleType:"fixed_assets",scheduleExpenseCategoryAndClass:{expenseCategory:e.jeDebit.account?.accountName??null,expenseClass:e.jeDebit.accountingClass?.className??null},journalEntryDetails:Se(A),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"&&T(e.jeScheduleTransactionKey,{month:g.month,year:g.year}),p())},[g,J,l.selectedJEScheduleTransaction?.status.code,t,p,h,T,c,l.updateStatus,e,r,S,b,x]),m.useEffect(()=>{i==="In-Progress"&&l.deleteStatus.fetchState==="Completed"&&p()},[i,l.deleteStatus,p]);const $=fe(l.accountListNestedAccountHierarchy),z=fe(l.allDepreciationAccountListNestedAccountHierarchy),K=we(l.classListNestedAccountHierarchy),N=Je("fixed_assets"),Z=m.useRef(),D=Me({mode:"all",reValidateMode:"onChange",defaultValues:ue(l,$,K,z,N,u.entityAutoCompleteView),resetOptions:{keepDirtyValues:!0,keepErrors:!0},values:ue(l,$,K,z,N,u.entityAutoCompleteView)}),o=D.watch("scheduleDetailsFixedAssetsSection.vendor");m.useEffect(()=>{u.entityAutoCompleteView.fetchState==="Completed"&&Z.current?.(Ve(u.entityAutoCompleteView))},[u.entityAutoCompleteView.fetchState]);const q=(n,C)=>{s.onAutoCompleteInputChange?.(n,"vendor"),Z.current=C},xe=D.handleSubmit(()=>{k(l.selectedJEScheduleTransaction?.jeScheduleId)}),ve=async(n,C)=>{const A=C[te].vendor;if(n.includes("vendor")){const ce=A?.defaultOptions.map(R=>R.value);if(A?.selectedOption!=null&&ce?.includes(A.selectedOption)!==!0){const R=u.entityAutoCompleteView.vendor.find(Le=>Le.id===A.selectedOption);R!=null&&D.setValue("scheduleDetailsFixedAssetsSection.vendor.defaultOptions",[{label:R.name??"",value:R.id}])}}const ke=n.includes("amount");if(P(C,ke),n.includes("amount")){const ce=n.split(".")[1],R=parseInt(ce);Q(!0),y(R,l.selectedJEScheduleTransaction?.jeScheduleId)}};m.useEffect(()=>{const n=D.watch((C,{name:A})=>{A!=null&&C!=null&&_e(()=>ve(A,C))});return()=>{n.unsubscribe()}}),m.useEffect(()=>{(se!==f.jeScheduleDetails.length||oe!==f.selectedDate||ne!==f.selectedDayOfMonth)&&ae===!0&&(D.resetField(le,{defaultValue:ue(l,$,K,z,N,u.entityAutoCompleteView)[le],keepDirty:!1}),Q(!1))},[f.jeScheduleDetails.length,f.selectedDate,f.selectedDayOfMonth]),m.useEffect(()=>{l.selectedJEScheduleTransaction?.status.code==="marked_as_completed"&&X(!1)},[l.selectedJEScheduleTransaction?.status.code]);const pe=(Pe(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})},Ae=m.useCallback(()=>{X(!0)},[]),Oe=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]),Te=m.useCallback(n=>{r!=null&&e!=null&&t.trackScheduleDetailsDeleted(ee({jeScheduleTransaction:e,scheduleTab:"fixed_assets",transaction:r,vendor:S,controllerEmails:b,controllerUserIds:x})),O(n)},[t,b,x,e,O,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(Fe,{...D,children:a.jsxs("form",{style:{width:"100%"},id:ye(ge),onSubmit:xe,children:[a.jsx(pt,{vendorLoadOptions:q,vendorField:o,vendorSearchAutoCompleteActions:s,vendorSearchAutoCompleteData:u,scheduleDetailsView:l,allAccountOptions:$,allClassOptions:K,allMonthOptions:N,allDepAccountOptions:z,onEditAmount:y,onDelete:Te,onJELinkClick:H,onViewLinkedJE:I,onMarkAsComplete:Oe,allowCreateSchedule:de,onCreateSchedule:Ae}),E===!0?a.jsx(Ne,{titleComponent:a.jsx(Re,{children:M.confirmationPopup.discardTitle}),descriptionComponent:a.jsx(qe,{children:M.confirmationPopup.discardDescription}),primaryButtonText:M.confirmationPopup.discard,secondaryButtonText:M.confirmationPopup.cancel,proceedButtonVariant:"danger",action:ie}):null,pe===!0?a.jsx(We,{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(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:O,onDelete:P,onJELinkClick:F,onViewLinkedJE:L,onMarkAsComplete:w}){const T=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:T,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:O,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,O=c.selectedAccumulatedDepreciationCategory,P=O!=null?t.allDepreciationAccountList.find(i=>i.accountId===O):void 0,F=c.assetId,L=c.selectedClass,w=L!=null?t.allClassList.find(i=>i.classId===L):void 0,T=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:P?.qboId,allOptions:l},assetId:F,scheduleClass:{selectedOption:w?.classId,allOptions:g},startDate:c.selectedDate,months:{selectedOption:T,allOptions:s},vendor:{selectedOption:v?.id??y?.id,defaultOptions:Be(u,v??y)},postingDate:{type:J,dayOfMonth:j}},[le]:E}};export{Et as default};
|