@zeniai/web-cockpit-ui 1.14.62-qa → 1.14.63-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-C9GD0hCH-BjgIixGR.js → ACHDetailsPage-QkOAxB4j-BwmsngrU.js} +1 -1
- package/dist/assets/{AIPerformancePage-B0Adp0wg-BENvGSD8.js → AIPerformancePage-POiv6dgZ-BKgnVS14.js} +1 -1
- package/dist/assets/{AccountInfoPage-BSxUquf3-CVXqrpiM.js → AccountInfoPage-DpzAjyd0-CKJdFzLl.js} +3 -3
- package/dist/assets/{AccountInfoPageContent-8V3PDzEc-Co1a4vxf.js → AccountInfoPageContent-BrPhtN53-CjBlOxg5.js} +15 -15
- package/dist/assets/{AccountLockedInfoModal-7bhpExx3-DWUCsu-t.js → AccountLockedInfoModal-D1ZHYvRy-C9tYFXcu.js} +4 -4
- package/dist/assets/{AccountReconDetailsDrawerPage-jTH8M9iA-Aoa7lkw7.js → AccountReconDetailsDrawerPage-CubIO376-CtKM65LB.js} +12 -12
- package/dist/assets/{AccountRow-BpoPw0Cq-6rjrYRQx.js → AccountRow-DTdcfEa8-U3MpTECA.js} +12 -12
- package/dist/assets/{AccountsPromoCardStack-gsG5tf8_-DHp17pPu.js → AccountsPromoCardStack-CwDbKaNJ-1hCsTiEX.js} +9 -9
- package/dist/assets/{AddAddressForCardDrawer-CMF3Il-u-Cpb6hsZ-.js → AddAddressForCardDrawer-CniAAcX8-D363vOD8.js} +2 -2
- package/dist/assets/{AddToWalletPage-CpWP7Kpn-CSqVUMRE.js → AddToWalletPage-DOG6ubAY-BGRDDIey.js} +12 -12
- package/dist/assets/{AgingReportsPage-DEQ2pO0Y-yRrwplt0.js → AgingReportsPage-Dbtn1PKG-CbUghZ5Y.js} +5 -5
- package/dist/assets/{AllUserItems-D0SR0Oue-DtcPCB6_.js → AllUserItems-Dth5Uovp-tGFNdHax.js} +6 -6
- package/dist/assets/{ApAgingDetailPage-BA-wKCiF-DQrPP1v5.js → ApAgingDetailPage-C6C-aYG7-Dbv3SH4D.js} +2 -2
- package/dist/assets/{AppBasePage-DFn4TCyI-Cc5DLAg0.js → AppBasePage-CtnXt_EV-BSPuX6dn.js} +6 -6
- package/dist/assets/{AppDrawerContent-CBG4Ybue-ByqvB6J0.js → AppDrawerContent-DnrQdYVp-D2qog1EV.js} +2 -2
- package/dist/assets/{ApprovalRulesSettingsPage-CpjHazzI-Cks7NfZS.js → ApprovalRulesSettingsPage-BEOQl822-CbUsx0mD.js} +4 -4
- package/dist/assets/{ArAgingChart-BDISnDae-CyesneCU.js → ArAgingChart-B9rpCcBM-q8jdb__E.js} +5 -5
- package/dist/assets/{ArAgingDetailPage-Cgqf_0fL-Cq89JxEo.js → ArAgingDetailPage-BKsCQCpu-jNIcx6Tl.js} +1 -1
- package/dist/assets/{AttachmentView-X1k01Vtr-B7_QU-hD.js → AttachmentView-DEE6AWkv-B1086jMd.js} +1 -1
- package/dist/assets/{BankAccountSection-CrxSDsgw-ktUyjJcn.js → BankAccountSection-D8_5fjrd-BCE6WYWF.js} +4 -4
- package/dist/assets/{BankAccountWarningSection-Dpt8yOKi-CoN6e059.js → BankAccountWarningSection-CMrRr8aa-BT7FUFGR.js} +7 -7
- package/dist/assets/{BankConnectionsSettingsPage-Uzhaoi7g-mD1d5FDq.js → BankConnectionsSettingsPage-BUwkPoK_-Baxx5R77.js} +41 -41
- package/dist/assets/{BillDetailPage-DcyikS7i-BdNFKGGl.js → BillDetailPage-DcGxex6B-g3MH8yQi.js} +10 -10
- package/dist/assets/{BillPayApprovalRuleDetailPage-aM8F15Nu-CKOcRZID.js → BillPayApprovalRuleDetailPage-B4OuTcAA-Bkq-QU-5.js} +1 -1
- package/dist/assets/{BillPayApprovalRulesPage-B46FwPVR-D-g0Yiyo.js → BillPayApprovalRulesPage-DaCdVMRx-DKi7a9ar.js} +4 -4
- package/dist/assets/{BillPayPromoPage-DtVzdlsy-C9OmQlVi.js → BillPayPromoPage-DBlGsv9D-BevFRtNT.js} +8 -8
- package/dist/assets/{BillPaySetUpPage-BKdNiQf7-Cc4m50Uo.js → BillPaySetUpPage-A4zcT_mP-BkNiC1Xc.js} +2 -2
- package/dist/assets/{BillingSettingsPage-3AgPTFzN-DilAG0t1.js → BillingSettingsPage-CujTn-BW-DGU5_gJ4.js} +1 -1
- package/dist/assets/BillsBulkReviewDrawerPage-Cs779Xc4-D5R5rhwS.js +1 -0
- package/dist/assets/{BoxItem-Dsoq6QyZ-B-WatMIw.js → BoxItem-imggFWL_-C8e_yZct.js} +1 -1
- package/dist/assets/{BusinessVerificationPage-DSkBV_II-D7barBYM.js → BusinessVerificationPage-U_lU2O0k-B63nfdcn.js} +4 -4
- package/dist/assets/{CardNumberSubText-Crk5WDQr-DYNdDxcR.js → CardNumberSubText-Ct0mJOMk-DQXdeyZe.js} +2 -2
- package/dist/assets/{CashbackDetailPage-BZAFRMGW-DHwMsEnN.js → CashbackDetailPage-GMncsgDy-DzCIgTYK.js} +17 -17
- package/dist/assets/ChargeCardDetailPage-BQvjt_rh-Dc8yPFPr.js +1462 -0
- package/dist/assets/{ChargeCardListPage-CIV1XQK1-D6N1OvLo.js → ChargeCardListPage-BJgzJ53p-D4N85pU_.js} +9 -9
- package/dist/assets/{ChargeCardListTable-Dxn8Y17P-YJscyrM8.js → ChargeCardListTable-BD4N2FtO-DrTuKtln.js} +49 -49
- package/dist/assets/{ChargeCardPromoPage-B6yTGsIY-DmZGR1jp.js → ChargeCardPromoPage-BQMfHfHp-DuUPUl6t.js} +1 -1
- package/dist/assets/{ChargeCardSetupPage-HHFdpsmJ-D4Ma056g.js → ChargeCardSetupPage-DO1cXZF4-CWlYdj31.js} +1 -1
- package/dist/assets/{ChargeCardStatementsPage-tuV67f3k-CgpUYkHr.js → ChargeCardStatementsPage-0rBvkIU1-NpKk50PX.js} +5 -5
- package/dist/assets/ChargeCardUtils-Cy5rZlIH-BILI0sIl.js +1 -0
- package/dist/assets/{ChaseOverlay-B2pqFXTT-Df2Ezv28.js → ChaseOverlay-Dqg_bWdn-C8vTlyWM.js} +6 -6
- package/dist/assets/{CheckDepositDrawerPage-DDXZ3m54-qWYP5ABn.js → CheckDepositDrawerPage-BzzWhLjb-CVED41XL.js} +15 -15
- package/dist/assets/{CollapsableReportTable-BLDh7Osv-DfaYwLVz.js → CollapsableReportTable-CwhNUlX5-CGrdBCh6.js} +1 -1
- package/dist/assets/{CompanyOfficerDetailsSection-Dg3sn5Sh-Cu3GX4FJ.js → CompanyOfficerDetailsSection-BHXF7g6M-BrZ1ZKbF.js} +1 -1
- package/dist/assets/{CompanyPassportCard-2HnVDVVi-zGfwT0EU.js → CompanyPassportCard-Dd4Modb9-C23aPg6a.js} +6 -6
- package/dist/assets/{CompanyPassportPage-DlGllnaL-QVy4YULg.js → CompanyPassportPage-Bh2JSIAW-rjC4pxXL.js} +20 -20
- package/dist/assets/{CompleteProfile-kFGIESms-Dkk-z6t0.js → CompleteProfile-CAtziP70-DuSPFP1s.js} +1 -1
- package/dist/assets/{ConfettiBurst-D5IgJ5P3-E65_x1se.js → ConfettiBurst-DvSGcRZX-C_PjMyTg.js} +1 -1
- package/dist/assets/{CreateOrEditVendorPage-D8IFFcdA-StbUiZfz.js → CreateOrEditVendorPage-Csorfbun-CNt6xuOL.js} +9 -9
- package/dist/assets/{CreditCardPaymentDrawerPage-Xu0psAw0-D0gZCtxQ.js → CreditCardPaymentDrawerPage-DAw1GyrP-BNs6qoGC.js} +12 -12
- package/dist/assets/{CreditCardPaymentPlgSection-CqvgalYj-CUdjrO8S.js → CreditCardPaymentPlgSection-HikR7OVv-BCZXDr8I.js} +6 -6
- package/dist/assets/{CurrencySelectField-hwgVPqTt-B9olol6q.js → CurrencySelectField-BW71th1E-DHxO3UVa.js} +1 -1
- package/dist/assets/{CustomerOnboardingActivationPage-CBFhWSJz-D-QIEuJy.js → CustomerOnboardingActivationPage-t4YirGGH-BQcXqlYq.js} +7 -7
- package/dist/assets/CustomerOnboardingContainerPage-BFE2DU3a-C9v_itD5.js +1 -0
- package/dist/assets/{CustomerOnboardingDetailPageSkeleton-B2q2tdnD-Dfe_cett.js → CustomerOnboardingDetailPageSkeleton-CWWXhhJn-DacLmheB.js} +10 -10
- package/dist/assets/{CustomerOnboardingNoStepsPage-BsNq90nq-DjNSGy04.js → CustomerOnboardingNoStepsPage-YdWEMnwL-BhhMIya_.js} +2 -2
- package/dist/assets/{CustomerOnboardingPage-BbGV3jtT-Bcwahrb4.js → CustomerOnboardingPage-C-WAF_MK-0e07LkOq.js} +5 -5
- package/dist/assets/{CustomerOnboardingProductSuitePage-R2PJEOqZ-BTVhd0Re.js → CustomerOnboardingProductSuitePage-CxwXw5lA-8eL0zyfM.js} +10 -10
- package/dist/assets/{Dashboard-Cw4u8_9e-DbBlW7ig.js → Dashboard-Cp0UY0M3-DrmBKQin.js} +1 -1
- package/dist/assets/{DashboardReportPage-ls_MMfAh-Cmzgt21g.js → DashboardReportPage-Bsr_1Vfu-CrZaa5CE.js} +6 -6
- package/dist/assets/{DashboardSidebarBackgroundAnimation-C_9jGJQn-CW-EldD9.js → DashboardSidebarBackgroundAnimation-BvgNiAXF-CXiqzdPm.js} +1 -1
- package/dist/assets/{DepositAccTransactionItem-BLgpyexV-DDsSN6D0.js → DepositAccTransactionItem-Cm5lhc_H-Db7mfK10.js} +2 -2
- package/dist/assets/{DepositAccTransactionListPage-r4UVSUOl-WIgqF2oB.js → DepositAccTransactionListPage-CHwS-_Nr-DFBxFwkp.js} +3 -3
- package/dist/assets/{DomesticWireDetailsPage-BSXsHwf5-CyInh1Li.js → DomesticWireDetailsPage-mqJgiAC--4FLLq-KS.js} +1 -1
- package/dist/assets/{DownloadOverlay-DKpj3Vwl-jr69kEjZ.js → DownloadOverlay-DwPR_SsY-EUTGOsKd.js} +21 -21
- package/dist/assets/{DrawerPage-Cxz5I3Mb-CqHagX_L.js → DrawerPage-CR2L2ry3-DOZs2EHb.js} +14 -14
- package/dist/assets/{EditPeoplePage-Dbsa013z-BNUYit4n.js → EditPeoplePage-DiNxeKXK-BiaRAv0O.js} +5 -5
- package/dist/assets/{EditReimbursementDetailPage-Clpj3Hjz-CVKUzeEp.js → EditReimbursementDetailPage-5TJ4Spw1-CpwzkfQj.js} +64 -64
- package/dist/assets/{EntityDetailPage-C73BtWIp-D8wpNNd0.js → EntityDetailPage-CYDIH-NA-wQQfd0jW.js} +3 -3
- package/dist/assets/{EntitySummarySection-BQA0g-pF-CbGAmbu8.js → EntitySummarySection-Cv7t21-t-DI0hIJYP.js} +5 -5
- package/dist/assets/{ExpenseAutomationOverviewPage-BxEr0k8F-BHqR9wAC.js → ExpenseAutomationOverviewPage-Cwl9dV2--DfcmKBVV.js} +17 -17
- package/dist/assets/{ExpenseAutomationPage-BS4M9nkW-ufxTsQbf.js → ExpenseAutomationPage-LMBRJxAv-Vn9lo85n.js} +26 -26
- package/dist/assets/{ExpressPayPage-Buxb2M1i-B9fAQlVA.js → ExpressPayPage-CCF0jSlI-C7_sWp9b.js} +6 -6
- package/dist/assets/{FeaturePreviewPage-ClfFYnHb--gXnRz9K.js → FeaturePreviewPage-POKsqSnu-BhWwdsL7.js} +2 -2
- package/dist/assets/{FollowStepsSection-CkQ-g4YK-dr6FAmOd.js → FollowStepsSection-BZdlZelr-Dgb2aUZZ.js} +21 -21
- package/dist/assets/{GlobalReviewListPage-C_DbsHsA-C6phfeex.js → GlobalReviewListPage-BnmMh-Bc-CYAA0kUn.js} +13 -13
- package/dist/assets/{HelpButton-B0ZBXPeh-BorgPtfn.js → HelpButton-Cp2LXxyy-C5Y06Y1n.js} +4 -4
- package/dist/assets/{InformationCardStack-DYdCt7zr-r9qdYJzs.js → InformationCardStack-CiYqiW7_-CbY8PLVD.js} +4 -4
- package/dist/assets/{InsightsCardStack-BSHQznep-BMkYmRhd.js → InsightsCardStack-BnVrehfR-CN-oMur2.js} +2 -2
- package/dist/assets/{InsightsSection-C37BKIiK-RNlgGAPQ.js → InsightsSection-BpVW6ov6-CBRdcxmz.js} +5 -5
- package/dist/assets/{IntegrationsSettingsPage-DHAdlHrq-CMWIwf7T.js → IntegrationsSettingsPage-CaAahFPb-BYVW6C7U.js} +8 -8
- package/dist/assets/{InternationalWireSwiftDetailsPage-B64WNt28-uVg2-6eP.js → InternationalWireSwiftDetailsPage-DcwbldkC-BB32EMRa.js} +8 -8
- package/dist/assets/{InternationalWireVerificationPage-D7ttGovC-D_Anpl8k.js → InternationalWireVerificationPage-7XDbU2GY-Dyfkxo3B.js} +7 -7
- package/dist/assets/{InviteFormPage-BhbGM4dC-C9bKqONR.js → InviteFormPage-Dgv7jdgF-DVviW_Nt.js} +1 -1
- package/dist/assets/{InvitePageListView-CyRlLv60-B6D8YcCC.js → InvitePageListView-DlpINjRJ-BMeTuOsJ.js} +11 -11
- package/dist/assets/InvitePeoplePage-0YsY4Il7-B0pE52_Y.js +12 -0
- package/dist/assets/{InvoiceUploadSection-BPPgbS-r-BHrBDY3d.js → InvoiceUploadSection-DzzjJVfz-KKaBZftU.js} +5 -5
- package/dist/assets/{IssueChargeCardPage-D_qQkkfo-CSsCg8Db.js → IssueChargeCardPage-BeB9egJS-Buw9rvK5.js} +20 -20
- package/dist/assets/{LabeledAddressValue-EshVNGGW-Cb2uc0dZ.js → LabeledAddressValue-D6advpnC-6YH6AS3A.js} +1 -1
- package/dist/assets/{LabeledAddressValueField-kgieouBM-DzNGhdp0.js → LabeledAddressValueField-DRBoA2eb-CWryzMa2.js} +2 -2
- package/dist/assets/{LabeledControlledCheckBoxField-CWABc6OK-ClMxBsh8.js → LabeledControlledCheckBoxField-Bu2WHgAQ-BgnuqupP.js} +1 -1
- package/dist/assets/{LabeledCreatableSingleSelectField-B5o1KUJj-BE5hL6KZ.js → LabeledCreatableSingleSelectField-DcdF286I-C7Y6s3yv.js} +7 -7
- package/dist/assets/{LabeledDocumentField-BrXpwWfM-CV_EVAk8.js → LabeledDocumentField-B25RLa6I-jFD7YVyX.js} +1 -1
- package/dist/assets/{LabeledDropDownFormattedTextField-Cepl3y9a-BvaaA7qv.js → LabeledDropDownFormattedTextField-DoK5Zfc1-HbMH9wCe.js} +1 -1
- package/dist/assets/{LabeledText-BmFLymPb-D54qw5X_.js → LabeledText-depbwNsM-DXrsYHkA.js} +1 -1
- package/dist/assets/{LabeledUserSingleSelectWithSubtitlesField-CBbnTiwl-DEzr-9kh.js → LabeledUserSingleSelectWithSubtitlesField-BURpXN_N-Xj7wxd7w.js} +8 -8
- package/dist/assets/{LabeledZeniRolesDropDownField-Da9mc-0B-C30aMHy1.js → LabeledZeniRolesDropDownField-TbyaA8M3-DTROc_uU.js} +7 -7
- package/dist/assets/{LinkJETransactionPage-DIhsx2g--Cp1GItTZ.js → LinkJETransactionPage-BITHs1CJ-Y1_ePi-m.js} +7 -7
- package/dist/assets/{LockCardPage-BA4Lj9Iy-DqX49N3M.js → LockCardPage-DPBKHSos-D1Lau_ZJ.js} +15 -15
- package/dist/assets/{LowBalancePopup-B1pTBmAF-DMsL8GAq.js → LowBalancePopup-D2G3wpXv-BCydjVKG.js} +3 -3
- package/dist/assets/{MagicLinkACHDetailsPage-BxzbJBWO-Wf8wA2-U.js → MagicLinkACHDetailsPage-Be7GMhBd-D3Y_9hTy.js} +1 -1
- package/dist/assets/{MagicLinkDomesticWireDetailsPage-DB2tBUoV-BR3Unx7y.js → MagicLinkDomesticWireDetailsPage-C9d2Ea6m-DiWMiwF8.js} +1 -1
- package/dist/assets/{MagicLinkInternationalWireDetailsPage-0B5pD_Iw-BHMic-Rc.js → MagicLinkInternationalWireDetailsPage-B2M9WztX-B6F5ppQ2.js} +1 -1
- package/dist/assets/{MagicLinkSuccessPage-3I1CRYrj-Ca4cu0D0.js → MagicLinkSuccessPage-DPb0UoGh-y5M5nnWg.js} +1 -1
- package/dist/assets/{MagicLinkTitleSection-BKgwdBLy-BT7ZZklR.js → MagicLinkTitleSection-Cc-MU2bJ-DSi2szeX.js} +1 -1
- package/dist/assets/{MailingDetailsSection-BwEd_J6R-DkUc8Lj3.js → MailingDetailsSection-8mj7Lslp--SKJjx0D.js} +1 -1
- package/dist/assets/{MeetingCalenderPopup-BpRpGSe6-DG2NWgbm.js → MeetingCalenderPopup-Be-tan9_-CK9Gr3Pd.js} +1 -1
- package/dist/assets/{Menu-De_gaVnj-BIvr4lYg.js → Menu-ndvXF6cX-B4y3KuMr.js} +1 -1
- package/dist/assets/{MyBankConnectionsSettingsPage-lChXBDCb-DU5DVhxi.js → MyBankConnectionsSettingsPage-DuZFVLYx-VAbH3B5M.js} +4 -4
- package/dist/assets/{MyPendingActivationChargeCardListPage-D3di8BeS-DKJC-Hoj.js → MyPendingActivationChargeCardListPage-DDIlU_fs-C-bYuxLR.js} +2 -2
- package/dist/assets/{MyProfileSettingsPage-CYI4yK6I-lkqzLNrj.js → MyProfileSettingsPage-CccRK9mD-BRFADFUO.js} +3 -3
- package/dist/assets/{NavBarWithPicker-DcELUvq0-C5N2yjZ3.js → NavBarWithPicker-D_MqRubB-D8dMZBv7.js} +6 -6
- package/dist/assets/{NavigationArrow-W1nVj2KC-CB3-WbW2.js → NavigationArrow-CfMVfLD8-BQnWEdPn.js} +1 -1
- package/dist/assets/{NavigationDots-BKVFhe2Y-BXA4iaa-.js → NavigationDots-E2eEHB86-BK4Og9YA.js} +1 -1
- package/dist/assets/{NewGlobalMerchantPage-DRrjJgZt-B35zjD-s.js → NewGlobalMerchantPage-vXrz_DRg-Wc9088Ea.js} +7 -7
- package/dist/assets/{NoDataChart-BzSCComh-TCsmvHP1.js → NoDataChart-CpocQ1Pa-ChFzAJ2R.js} +1 -1
- package/dist/assets/{NoDataTable-CGWMbvak-D6mzGtG9.js → NoDataTable-937mkn0a-D0ksTITz.js} +2 -2
- package/dist/assets/{NotFoundPage-DfRFngFV-Cvi4-w7R.js → NotFoundPage-BmxF81mT-B9r6velH.js} +1 -1
- package/dist/assets/{NotificationSettingsPage-BTJH62-O-BjEAiv3V.js → NotificationSettingsPage-DyOyHW6d-DehMDImE.js} +20 -20
- package/dist/assets/{NotificationsListConfig-DPutUxp3-B-f9mabS.js → NotificationsListConfig-DVs7cr0d-wmSn6l3s.js} +1 -1
- package/dist/assets/{NotificationsPage-xu6A1hVF-PuoNi3-5.js → NotificationsPage-ntuZjRm--CaQvtRPb.js} +24 -24
- package/dist/assets/{OpExByVendorPage-BeO7iMry-ChO0CL0F.js → OpExByVendorPage-1MOdxG9V-BhrPpCQQ.js} +5 -5
- package/dist/assets/{OverlayContainerPage-CU1AAMcq-C97TuWW_.js → OverlayContainerPage-CU1AAMcq-lFQCSe-G.js} +1 -1
- package/dist/assets/{PandLWithForecastPage-1qSy3_Ke-BkoKktpJ.js → PandLWithForecastPage-n4fiElGl-BTwNmE3c.js} +8 -8
- package/dist/assets/{PaymentAccountSetupBillingAddressSection-DnObHdjD-Dxj4lh2G.js → PaymentAccountSetupBillingAddressSection-CXcwA0ON-KeSy0gEv.js} +8 -8
- package/dist/assets/{PeoplePage-CPqz8R9j-B70ykgrs.js → PeoplePage-BvZkMpjW-D7ElTICV.js} +13 -13
- package/dist/assets/{PortfolioAllocationFormPage-C9ZM9oUf-DJFvzQ8r.js → PortfolioAllocationFormPage-B7AKufjq-BCZV66E3.js} +3 -3
- package/dist/assets/{PortfolioDetails-BJBNPfcI-BtgJ2hbs.js → PortfolioDetails-C85yA52O-BcnUojwW.js} +7 -7
- package/dist/assets/{ProductsCarousel-Ctx00P5D-BTEQtLvG.js → ProductsCarousel-ixHCR9AW-BHD947gD.js} +4 -4
- package/dist/assets/{PromoBaseCards-BGYdfmx6-Dtat0fyc.js → PromoBaseCards-DiefKKcS-CVepNaw-.js} +1 -1
- package/dist/assets/{QBOConnectionDialog-B9yKv9hq-DoLz2hIj.js → QBOConnectionDialog-DV-xC7Yc-6uoxl-nC.js} +1 -1
- package/dist/assets/{QBOSetupSection-CTMSCXwv-CxubTHdL.js → QBOSetupSection-CI8cHWjq-CNHezBrT.js} +8 -8
- package/dist/assets/{ReimbursementApprovalRuleDetailPage-BtZUsK7H-Dzk_bMVd.js → ReimbursementApprovalRuleDetailPage-CqnCqZ5F-MbrRP60p.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRulesPage-DNBHPoIZ-BlN6Jytr.js → ReimbursementApprovalRulesPage-DxoNMA62-DOLuIxNO.js} +2 -2
- package/dist/assets/{ReimbursementDetailPage-BxZ5ijHe-zurm2_Gr.js → ReimbursementDetailPage-CTvPAxMB-BlP7rQJ5.js} +7 -7
- package/dist/assets/{ReimbursementPromoPage-D284EkRZ-BcIIXtzk.js → ReimbursementPromoPage-DcxPNTHd-asHPfKWE.js} +9 -9
- package/dist/assets/{ReimbursementSetUpPage-BzR91_eW-CldLpq0B.js → ReimbursementSetUpPage-SQo-xrwo-BuAAGp_P.js} +7 -7
- package/dist/assets/{ReimbursementsBulkReviewDrawerPage-BMo9fFp7-CeRLlDSr.js → ReimbursementsBulkReviewDrawerPage-y4v-8gQs-b-mXMP5z.js} +1 -1
- package/dist/assets/{ReloadCard-CGUNX_x4-Dbmvt1Tw.js → ReloadCard-CWZU9IDv-lCmqRueL.js} +3 -3
- package/dist/assets/{ReportTableViewSelector-BVAek1Ui-C_slHbQ8.js → ReportTableViewSelector-t3pgCiJb-DU7QbDSE.js} +5 -5
- package/dist/assets/{ReportsPage-BzKbMWV4-nYQmduZj.js → ReportsPage-D82gQH-e-Ckp9VR2p.js} +1 -1
- package/dist/assets/{RevenueChart-CPUrVR7y-BAuj7ArI.js → RevenueChart-BMgI2BHK-I-njStGG.js} +13 -13
- package/dist/assets/{ReviewDetailsPage-B74yrCe2-VCXhCYb5.js → ReviewDetailsPage-Dc7dY-VA-CxSy8KVL.js} +3 -3
- package/dist/assets/{ReviewOverlay-DQvXSDYM-DyF1UXZO.js → ReviewOverlay-Bra2W5Jg-C_PWInnU.js} +4 -4
- package/dist/assets/{RoleWithToolTip-MwI_BmVq-Ds1A2gyK.js → RoleWithToolTip-DJ15AsI3-p10xCSND.js} +2 -2
- package/dist/assets/{ScheduleDetailsFixedAssetsPage-CbkRYKjG-CqEHYps-.js → ScheduleDetailsFixedAssetsPage-DoH2eyLG-BrozO2ME.js} +8 -8
- package/dist/assets/{ScheduleDetailsPage-CCRspH3Y-CPpcmXd0.js → ScheduleDetailsPage-BM1Paa1W-C0ySlnA2.js} +3 -3
- package/dist/assets/{ScheduleSequenceTable-55zYXNwF-DUs0PlZE.js → ScheduleSequenceTable-C8UB3y1y-CNI-a_wl.js} +7 -7
- package/dist/assets/{ScreenRoutes-Ba12Q0HX.js → ScreenRoutes-_3xGjUU-.js} +41 -41
- package/dist/assets/{SetUpAccountSection-IgQjKWEr-Bxp6vD4c.js → SetUpAccountSection-BGdUkQz3-D6CAjYv7.js} +7 -7
- package/dist/assets/{SetUpDefaultSection-shC3qOy6-C49ph3xE.js → SetUpDefaultSection-C4NnRO65-C0fyZc92.js} +10 -10
- package/dist/assets/{SignIn-CZGmLYjH-DHcDyA10.js → SignIn-BrHA4sLj-DDyEN7b5.js} +1 -1
- package/dist/assets/SignInScreen-Cx7qc3RP.js +1 -0
- package/dist/assets/{SpendManagementListViewPage-BhTnQtma-CCGqdAUI.js → SpendManagementListViewPage-Dqb0zspN-DreMX5hh.js} +4 -4
- package/dist/assets/{SpendManagementPerTabPage-DpnIM6Nc-1ZBcChPe.js → SpendManagementPerTabPage-D5xIpojr-P0_AnHoz.js} +14 -14
- package/dist/assets/{SpendManagementSection-Hjvwgkt0-D6Yvpvz4.js → SpendManagementSection-C2iof2aM-Bp9C8eeM.js} +7 -7
- package/dist/assets/{SpendMgmtSetupAccountSection-CAWyEGGM-D_Y5M2MY.js → SpendMgmtSetupAccountSection-Dz3vQC2g-P6jfr6Bz.js} +6 -6
- package/dist/assets/{StatementItem-D8v_Laju-B8GfRoNo.js → StatementItem-BOgmKBTq-DcvmbOpL.js} +5 -5
- package/dist/assets/{StatementsPage-CEw-9UyR-BcqGoaDU.js → StatementsPage-ClMtBDGf-DWR5BFTu.js} +4 -4
- package/dist/assets/{StatusSwitcher-DoSCydJG-CoBpz-TS.js → StatusSwitcher-QwlvHg3_-DRNWj6rt.js} +2 -2
- package/dist/assets/{SubTabSwitcher-Ct1DqfgC-Bibz1hGv.js → SubTabSwitcher-CiJ1FPk5-CEwKyb-x.js} +1 -1
- package/dist/assets/{SummaryCard-CHUbuF_0-CaC0zRzW.js → SummaryCard-D1B_1H2X-Lh7q95p7.js} +1 -1
- package/dist/assets/{TaskManagementPage-Ddox5Vwh-D5D4JTV5.js → TaskManagementPage-DibwJCOk-BF0_AhRU.js} +14 -14
- package/dist/assets/{TimeRangeSwitcher-CiOSsTU--CLsRcOaL.js → TimeRangeSwitcher-Ci3SxLOE-anbVhnvw.js} +1 -1
- package/dist/assets/{TimeframeSwitcher-D1k1Zf_U-DTp5-FTG.js → TimeframeSwitcher-DSRKJTq1-BG9pQPgY.js} +1 -1
- package/dist/assets/{TimeframeSwitcherWithToggle-DXbaoDe6-yq3iZa4P.js → TimeframeSwitcherWithToggle-D_BNOfdQ-BKTbCmic.js} +1 -1
- package/dist/assets/{TopExCard-D4ZDqXZg--brQ_iDE.js → TopExCard-C5622MiP-2KEQHijQ.js} +4 -4
- package/dist/assets/{TopExDetailPage-BdPAcKwH-BWvPRR7r.js → TopExDetailPage-qOhQ-KAG-fVnbyWbs.js} +6 -6
- package/dist/assets/{TransactionDetailPage-BcjGxHy8-CFPVJudJ.js → TransactionDetailPage-DaCUZuc0-DAUodm_m.js} +13 -13
- package/dist/assets/{TransactionList-BSuMEtB3-CoYwx3Sx.js → TransactionList-CzdU-NQx-D6gdr6x7.js} +6 -6
- package/dist/assets/{TransactionListBig-MY_ZxyR3-BlvU2xVi.js → TransactionListBig-Bq7XI_xx-DjK27aH5.js} +11 -11
- package/dist/assets/{TransactionListPage-CWGrWDjK-1Jg_-UFD.js → TransactionListPage-CZDewehT-BcmO71OJ.js} +6 -6
- package/dist/assets/{TransactionVendorDetailPage-DDNK9KrI-navYrc-G.js → TransactionVendorDetailPage-Bf5UUIC6-DQ0SU60H.js} +3 -3
- package/dist/assets/{TransferDrawerPage-vK0YoMro-D8CyUH8N.js → TransferDrawerPage-yQE7GKl_-BiU7RlMv.js} +17 -17
- package/dist/assets/{TreasuryOverviewPage-CQsUti1c-Ba68New5.js → TreasuryOverviewPage-CisB53k8-CkomXNIa.js} +20 -20
- package/dist/assets/{TreasuryPromoPage-Bp72hKEs-NvukScyd.js → TreasuryPromoPage-BfISVj15-BKUZCqqQ.js} +11 -11
- package/dist/assets/{TreasurySetupPage-BUKsU3nh-kC1qSXYk.js → TreasurySetupPage-SN-3mAFw-C_4PPIWf.js} +2 -2
- package/dist/assets/{TreasuryStatementsPage-Cryv1PNX-DcPIDQHV.js → TreasuryStatementsPage-DGyug1wv-CZKI-qyS.js} +5 -5
- package/dist/assets/{TreasuryTaxLetterPage-BMYTdYa5-Dj8UaOnF.js → TreasuryTaxLetterPage-BRvcOhJZ-BeVUPN4i.js} +5 -5
- package/dist/assets/{TreasuryTransferOrReviewPage-B9VwyDJa-CRkrhgNd.js → TreasuryTransferOrReviewPage-H5ohs_5r-DHIAJoBr.js} +30 -30
- package/dist/assets/{TrendChart-CqYeWLeV-htWF6W-p.js → TrendChart-ohr8bK1l-B5dRIvEy.js} +4 -4
- package/dist/assets/{TrendWithTransactions-xn1fvlLO-CerDbg3P.js → TrendWithTransactions-D5eTj9Ca-BjYM3mpG.js} +3 -3
- package/dist/assets/{UncategorizedAccountsMappingPage-B_aOzm4v-h1El0pw_.js → UncategorizedAccountsMappingPage-3NGCCdAA-DC14oDOB.js} +1 -1
- package/dist/assets/{UnitIntegrationPage-B6LF_f7C-DF3yoEHz.js → UnitIntegrationPage-B6FOsf88-BTafkfwm.js} +3 -3
- package/dist/assets/{UploadAdditionalDocumentOverlay-BlKvE3tT-BlWsi76J.js → UploadAdditionalDocumentOverlay-CH9x8nx2-CEXAXlCj.js} +1 -1
- package/dist/assets/Vendor2FAPopup-D7455GFK-DU0-h-ac.js +1 -0
- package/dist/assets/{VendorACHDetailsPage-CncDplWQ-DgiLqsWr.js → VendorACHDetailsPage-CXoxi6Qp-CrJbaYWf.js} +1 -1
- package/dist/assets/{VendorDetailPage-POan4Fo8-Y_NsPNBu.js → VendorDetailPage-C6BgYb-c-BaTlvY1P.js} +6 -6
- package/dist/assets/{VendorDomesticWireDetailsPage-B1bT0W9o-NrQ5VuHO.js → VendorDomesticWireDetailsPage-DXfnCFu1-Bhf2lnL-.js} +1 -1
- package/dist/assets/{VendorFiling1099EditablePage-C25iYV4w-DxH6WOrq.js → VendorFiling1099EditablePage-ByESLoQK-C5wgo9Qc.js} +14 -14
- package/dist/assets/{VendorFirstReviewPage-DY035p5C-B1sylU9C.js → VendorFirstReviewPage-iNPtUFNw-BbgJ63Tq.js} +27 -27
- package/dist/assets/{VendorInternationalWireDetailsPage-DN_mcAqY-DOkydboS.js → VendorInternationalWireDetailsPage-CqgGFU1K-CKX6n49-.js} +11 -11
- package/dist/assets/{VendorInternationalWireSwiftDetailsPage-BaXgGRdu-BQ0UaHHd.js → VendorInternationalWireSwiftDetailsPage-CNzft0dg-D-n290kY.js} +1 -1
- package/dist/assets/{VendorsAccountsSection-C2UiqXC0-BiErhc3o.js → VendorsAccountsSection-DCWhoqAP-DHjXIFFo.js} +2 -2
- package/dist/assets/{VerifyDevice-C7BWrAZ3-DJDQCedc.js → VerifyDevice-DvJEmcUq-BD1k6-81.js} +4 -4
- package/dist/assets/{VideoPlayer-BYkDTMkS-BkX7RMiM.js → VideoPlayer-Cp5DBUTp-n0gfwB0a.js} +1 -1
- package/dist/assets/{VideoPopup-Chye3pds-BhmRCag7.js → VideoPopup-97jTEw9t-C5kzDaxd.js} +1 -1
- package/dist/assets/{WarningsDrawerPage-Cx-gJdnW-Cid-1Ovb.js → WarningsDrawerPage-CMy4FFqt-zNFC-DvY.js} +7 -7
- package/dist/assets/{ZeniAccountDetailPage-BrXe6Kao-DZTAFx3o.js → ZeniAccountDetailPage-mzHK5HUV-B2AMGiBu.js} +1 -1
- package/dist/assets/{ZeniAccountListViewPage-CJnHvk5a-BNB1bM3y.js → ZeniAccountListViewPage-BeN4AKFd-B0XSIJvm.js} +1 -1
- package/dist/assets/{ZeniAccountNavBarPieces-BdLOT9UG-Cokn4oEN.js → ZeniAccountNavBarPieces-Db9bLk29-BybXcA-l.js} +2 -2
- package/dist/assets/{ZeniAccountPromoPage-B1I9l833-BElJ8cLy.js → ZeniAccountPromoPage-By02sVg0-BAnhqfjw.js} +11 -11
- package/dist/assets/{ZeniAccountSetupPage-CitVJnZC-B9X3YQBI.js → ZeniAccountSetupPage-DeDgKig1-lQnp_HAL.js} +1 -1
- package/dist/assets/{ZeniCopyright-DbQka65R-7ZVyc7Yg.js → ZeniCopyright-Bfc0Yl56-xItwPVZ8.js} +1 -1
- package/dist/assets/{ZeniTransferAmountSlider-Dzxu82Xw-Ml8lBAJZ.js → ZeniTransferAmountSlider-DzeU3D5r-Dnm1GguJ.js} +6 -6
- package/dist/assets/{analyticsHelper-BDL8_RGj.js → analyticsHelper-CuIvasD7.js} +1 -1
- package/dist/assets/{analyticsHelper-DgJDMdal-DIavhrOw.js → analyticsHelper-Cx9PlTZt-BYpG33i-.js} +1 -1
- package/dist/assets/{chartTypes-D1j_l919-8QXMvJet.js → chartTypes-BoA9fCCZ-7xW-fVbz.js} +1 -1
- package/dist/assets/{commonDimensions-DDu54g8x-D5ikJlMO.js → commonDimensions-BCUrWcBL-vTG5ZzmA.js} +1 -1
- package/dist/assets/{detailCommon-DXjUFoA1-D9_LRSFU.js → detailCommon-CFA4p6RP-B16mjiFN.js} +4 -4
- package/dist/assets/{downloadPdf-DChYYVaW-ZZ55IYdY.js → downloadPdf-DZ5WQt0r-Bylb-lK-.js} +1 -1
- package/dist/assets/{index-BqKtrbrP.js → index-6DHFBk74.js} +1721 -1710
- package/dist/assets/{mapLoadingInProgressToTreeNode-BC5IH44--JB4URfny.js → mapLoadingInProgressToTreeNode-DQf-1sg7-B5MxQ8jl.js} +1 -1
- package/dist/assets/{mapSectionWithAcOnlyToTreeNode-CUXssP6r-DZ4GfGRq.js → mapSectionWithAcOnlyToTreeNode-D0W1f0wZ-D3CjHikv.js} +1 -1
- package/dist/assets/{mapSpacerToTreeNode-sdzfy8cu-ofjZ3Daw.js → mapSpacerToTreeNode-Dzbv_N4o-CAPOe3mv.js} +1 -1
- package/dist/assets/{mapTimeframeBalancesToTreeNode-DgOZfixy-Cw5iWKMh.js → mapTimeframeBalancesToTreeNode-2yWiGglp-Dy8oBMmS.js} +1 -1
- package/dist/assets/{mapTimeframeBalancesToTreeNode-BROieqal-BJxVRna_.js → mapTimeframeBalancesToTreeNode-COS_auLN-CKgStlR5.js} +1 -1
- package/dist/assets/{mapTimeframeHeaderLoadingInProgressToTreeNode-bXb7WXAq-D3DuUS-Q.js → mapTimeframeHeaderLoadingInProgressToTreeNode-NCujclSc-BUwl6Oy8.js} +1 -1
- package/dist/assets/{toCOABalancesWithID-DqhuI8hD-CWs6fXMS.js → toCOABalancesWithID--3a-7Ohb-Dq8zIbZX.js} +1 -1
- package/dist/assets/{toChartData-DZPFiNsp-WPnYC-7p.js → toChartData-KZ92y9KA-BJN5TA9Q.js} +1 -1
- package/dist/assets/{treasuryColorHelper-D5AxfiPH-CHzWVnh9.js → treasuryColorHelper-ChFJTPyg--ivM0q9A.js} +1 -1
- package/dist/assets/{uploadAttachment-D04Fz4F1-CuQRw56o.js → uploadAttachment-BzeeOF-1-oKdmjDH7.js} +14 -14
- package/dist/assets/{uploadReceipts-9DTOr0BG-BFe5S3is.js → uploadReceipts-9DTOr0BG-BAqIaRxY.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/BillsBulkReviewDrawerPage-CFK7g3R1-CNk8ph3a.js +0 -1
- package/dist/assets/ChargeCardDetailPage-DXUoIbZa-_LUfh5la.js +0 -1813
- package/dist/assets/ChargeCardUtils-BeG5m9OQ-BnJ39MTB.js +0 -1
- package/dist/assets/CustomerOnboardingContainerPage-D4zUp7hX-DHmsrQe_.js +0 -1
- package/dist/assets/InvitePeoplePage-DYpb33z0-YHgrNKtY.js +0 -12
- package/dist/assets/SignInScreen-DqIw82_G.js +0 -1
- package/dist/assets/Vendor2FAPopup-BLzf9zxl-u_Gb4R4i.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o,c7 as Us,q as Se,gr as Ni,gs as Vi,l as q,
|
|
1
|
+
import{o,c7 as Us,q as Se,gr as Ni,gs as Vi,l as q,O as je,j as t,cD as Ws,ab as Ne,aQ as Hi,u as g,cE as qs,c as vt,bF as Ks,i5 as Js,aN as Ke,c5 as fe,y as X,bz as Gs,aM as z,i3 as Zs,am as ze,fX as Ys,gY as Ui,bA as Xs,b_ as Rt,b6 as Wi,ai as St,bP as qi,h as Xe,k9 as Qs,gh as ea,an as gt,A as ta,gt as na,gu as Ki,bs as oa,cy as ia,cg as sa,eT as un,cd as po,aa as Ht,bZ as mo,ad as Ut,ka as aa,kb as ra,kc as la,kd as an,ke as Ji,kf as Gi,kg as ca,kh as da,dE as Zi,ki as ua,kj as ha,kk as pa,kl as ma,km as ga,kn as To,ko as xa,kp as fa,kq as ya,kr as Ca,ks as wa,kt as Yi,ku as ba,kv as va,kw as Sa,kx as ja,gI as Xi,b3 as Tn,cH as An,P as Qi,Q as es,m as ts,cS as hn,e9 as go,gE as ka,fJ as Ia,fZ as $a,ar as La,s as Ta,fG as Aa,aC as ns,ky as Ea,aU as xo,aP as Ao,kz as Ra,kA as Da,g_ as os,kB as Oa,bJ as is,aS as Fa,gO as Et,hT as On,eR as jn,d3 as fo,az as Ma,kC as Eo,dc as ss,dG as za,iP as Ba,dL as yo,cM as En,cP as Rn,iy as nt,C as Tt,hI as Pa,gJ as Fn,jb as Ro,dC as as,df as cn,kD as _a,a_ as Na,dK as rs,n as dn,ip as ls,iz as ro,kE as Qt,ef as cs,eg as ds,iS as us,iT as hs,kF as Va,dd as Dn,iq as ps,fB as ms,eJ as Mn,aJ as Co,kG as Ha,d9 as Ua,aX as gs,iG as Wa,e7 as qa,ap as yt,kH as Ka,kI as Ja,b1 as zn,dn as Ga,a9 as Za,eG as Ya,eH as Xa,eI as Qa,eK as Do,eL as Oo,eM as er,kJ as tr,a$ as nr,eV as or,eW as ir,eX as sr}from"./index-6DHFBk74.js";import{n as a,b as s,i as Ye,k as wo,w as xs}from"./vendor-Bs1fkIUX.js";import{r as fs,I as ys,n as en,R as mt}from"./CollapsableReportTable-CwhNUlX5-CGrdBCh6.js";import{o as Cs}from"./mapTimeframeBalancesToTreeNode-2yWiGglp-Dy8oBMmS.js";import{d as Fo}from"./mapLoadingInProgressToTreeNode-DQf-1sg7-B5MxQ8jl.js";import{h as ar}from"./VendorsAccountsSection-DCWhoqAP-DHjXIFFo.js";import{u as rr,c as Mo,d as lr,m as cr}from"./uploadAttachment-BzeeOF-1-oKdmjDH7.js";import"./mui-Ty75qFQF.js";import"./analytics-CcevxdRy.js";import"./routing-Dk1A2KYI.js";import"./sentry-BE5FTzpq.js";import"./redux-CEhZD0hA.js";import"./liveblocks-8ht9CoL5.js";import"./crypto-cQYYQPTZ.js";import"./AccountRow-DTdcfEa8-U3MpTECA.js";const{common:{navBar:{back:dr},texts:{refresh:ur,close:hr,copy:pr,copied:mr,open:gr}},expenseAutomation:{common:{numbers:{maximumCount:xr}}}}=je.getLocalizedStrings(),fr=a(ka)`
|
|
2
2
|
display: flex;
|
|
3
3
|
width: ${o.sp4};
|
|
4
4
|
height: ${o.sp4};
|
|
@@ -151,7 +151,7 @@ import{o,c7 as Us,q as Se,gr as Ni,gs as Vi,l as q,F as je,j as t,cD as Ws,ab as
|
|
|
151
151
|
}
|
|
152
152
|
text-decoration-color: ${e=>e.theme.colors.primary};
|
|
153
153
|
}
|
|
154
|
-
`,Bo={subSectionContainerLeftRightPadding:new X(g[3],g[6],g[8])},Br=({onAllThreadsClick:e,companyId:n,companyName:d})=>{const c={application:"cockpit",companyId:n,entityId:n,tab:"expense_automation",isGlobalComment:!1,entityType:"expense_automation.monthEndEmail",companyName:d,url:window.location.href},{url:h,...p}=c,i={...p},{threads:l,isLoading:r}=na(i,!1,!1),m=l.filter(u=>u.id.includes(Ki)===!1);return t.jsxs(yr,{isDisabled:r,onClick:e,"data-testid":z("comment-icon"),children:[t.jsx(oa,{count:m.length,isLoading:r}),t.jsx(fr,{})]})},Pr=({headerData:e,refreshStatus:n,searchText:d,companyName:c,companyId:h,isZeniUser:p,onAllThreadsClick:i,onClose:l,onRefresh:r,onSearchTextChanged:m})=>{const u=()=>{n!=="In-Progress"&&r()};return t.jsx(br,{children:e.rightSection.map((x,y)=>{switch(x){case"search":return t.jsx(
|
|
154
|
+
`,Bo={subSectionContainerLeftRightPadding:new X(g[3],g[6],g[8])},Br=({onAllThreadsClick:e,companyId:n,companyName:d})=>{const c={application:"cockpit",companyId:n,entityId:n,tab:"expense_automation",isGlobalComment:!1,entityType:"expense_automation.monthEndEmail",companyName:d,url:window.location.href},{url:h,...p}=c,i={...p},{threads:l,isLoading:r}=na(i,!1,!1),m=l.filter(u=>u.id.includes(Ki)===!1);return t.jsxs(yr,{isDisabled:r,onClick:e,"data-testid":z("comment-icon"),children:[t.jsx(oa,{count:m.length,isLoading:r}),t.jsx(fr,{})]})},Pr=({headerData:e,refreshStatus:n,searchText:d,companyName:c,companyId:h,isZeniUser:p,onAllThreadsClick:i,onClose:l,onRefresh:r,onSearchTextChanged:m})=>{const u=()=>{n!=="In-Progress"&&r()};return t.jsx(br,{children:e.rightSection.map((x,y)=>{switch(x){case"search":return t.jsx(Zs,{isSearchOpen:(d.length??0)>0,searchPlaceHolder:e.searchPlaceholder,searchText:d,searchTextBoxStyle:{position:"initial",height:"fit-content"},styledSearchIconContainerStyle:{height:o.sp4},searchIconMarginRight:o.sp0,onSearchTextChanged:C=>{m(C)},downloadPresent:!1},y+x);case"refresh":return t.jsx(fe,{display:"block",placement:"bottom",title:ur,style:{marginTop:"2px"},enterDelay:600,children:t.jsx($r,{onClick:u,$spinning:n==="In-Progress","data-testid":z("refresh-icon")})},y+x);case"comment":return p===!1?null:t.jsx(Br,{companyId:h,companyName:c,onAllThreadsClick:i});case"close":default:return t.jsx(fe,{display:"block",placement:"bottom",title:hr,enterDelay:600,style:{marginTop:"2px"},children:t.jsx(kr,{onClick:l,"data-testid":z("close-icon")})},y+x)}})})},_r=({headerData:e,onBack:n})=>t.jsx(vr,{children:e.leftSection.map((d,c)=>{switch(d){case"back":default:return t.jsx(fe,{display:"block",placement:"bottom",title:dr,enterDelay:600,style:{marginTop:"-14px"},children:t.jsx(Ir,{onClick:n,"data-testid":z("back-button")})},c+d)}})}),Po=({text:e,linkText:n,windowSize:d,isCopied:c,onLinkClick:h})=>{if(n==null||!n)return t.jsxs(pn,{windowSize:d,children:[e," "]});const p=e.indexOf(n);if(p===-1)return t.jsxs(pn,{windowSize:d,children:[e," "]});const i=e.substring(0,p),l=e.substring(p+n.length);return t.jsxs(t.Fragment,{children:[i?t.jsxs(pn,{windowSize:d,children:[i.trim()," "]}):null,t.jsx(fe,{display:"flex",placement:"right",title:Ui.test(n)?c?mr:pr:gr,enterTouchDelay:600,children:t.jsxs(zr,{onClick:()=>h?.(n),"data-testid":z("pre-link"),children:[n,c?t.jsx(jr,{className:"success-icon"}):t.jsx(Sr,{className:"copy-icon"})]})}),l?t.jsxs(pn,{windowSize:d,children:[l," "]}):null]})},_o=({subTitles:e})=>{const n=Se(),[,d]=Ys(),[c,h]=s.useState(!1),p=s.useRef(null),i=s.useCallback(l=>{Ui.test(l)?(d(l),h(!0),p.current&&clearTimeout(p.current),p.current=setTimeout(()=>{h(!1)},2e3)):window.open(l,"_blank","noopener,noreferrer")},[d]);return s.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]),t.jsx(Or,{children:e.map((l,r)=>t.jsxs(Dr,{children:[l.pre?t.jsx(Po,{text:l.pre,linkText:l.preLink,windowSize:n,isCopied:c,onLinkClick:i}):null,l.prefixIconName?t.jsx(t.Fragment,{children:l.prefixIconName==="zeniAIIcon"?t.jsx(Fr,{}):t.jsx(t.Fragment,{})}):null,l.bold?t.jsx(t.Fragment,{children:t.jsxs(Mr,{windowSize:n,children:[l.bold," "]})}):null,l.post?t.jsx(Po,{text:l.post,linkText:l.postLink,windowSize:n,isCopied:c,onLinkClick:i}):null]},r+l.bold+l.pre+l.post))})};function Nr(e){const{headerData:n,currentTab:d,completionStatus:c,onUpdateTab:h,selectedReconAccountId:p,getTabCountAndFetchState:i,reconcileDetailPageFetchState:l,forceShowSubtitle:r,currentSelectedView:m,onReconTabUpdate:u,currentRecontab:x,navBarCustomElement:y,titleStyle:C={}}=e,S=i("autoCategorized")?.count??0,w=i("review")?.count??0,I=i("reconcile")?.count??0,f=n.tabs.length>0||n.subTitle.length>0,$=m==="transaction_categorization"&&d==="autoCategorized",R=m==="reconciliation"&&x==="review"&&p!=null,T=m==="reconciliation"&&x==="reconcile"&&p!=null,F=$?S>0:R?l==="In-Progress"?!0:w>0:T?l==="In-Progress"?!0:I>0:c!=="complete",v=vt(),k=Se();let A=[];return n.tabs.length>0&&(A=n.tabs.map(L=>({label:L.label,id:L.id,countDetails:i(L.id)}))),t.jsxs(Cr,{children:[t.jsx(Ks,{title:n.title,subTitle:n.subText,titleTextStyles:{flex:"1 1 0px"},backgroundColor:v.colors.grey4,onBackClick:()=>null,titleStyle:C,ignoreScrollAction:m!=="month_end_insights",keepBackgroundOnScroll:m!=="month_end_insights",leftSideComponent:t.jsx(_r,{...e}),rightSideComponent:t.jsx(Pr,{...e}),source:"NavBarWithHeader"}),y??null,t.jsx(Ne,{controller:f===!0,children:t.jsx(wr,{windowSize:k,children:n.tabs.length>0?t.jsxs(t.Fragment,{children:[t.jsx(Tr,{windowSize:k,children:t.jsx(Js,{allTabs:A,selectedTab:m==="transaction_categorization"?d??A[0].id:x??A[0].id,onTabChange:L=>{if(m==="transaction_categorization"){const N=q.toExpenseAutomationTransactionsTabKey(L.id);N!=null&&h(N)}else if(m==="reconciliation"){const N=q.toReconciliationTabsType(L.id);N!=null&&u(N)}},maximumCountLimit:xr})}),t.jsx(Er,{windowSize:k}),t.jsx(Rr,{}),t.jsx(Ne,{controller:F===!0||r===!0,children:t.jsx(zo,{windowSize:k,children:n.tabs.map((L,N)=>(m==="reconciliation"?L.id===x:L.id===d)?t.jsx(Ar,{children:t.jsx(_o,{subTitles:L.subTitle})},N+L.id):null)})})]}):t.jsx(Ne,{controller:F===!0||r===!0,children:t.jsx(zo,{windowSize:k,children:t.jsx(_o,{subTitles:n.subTitle})})})})})]})}const Vr=1;function Hr({name:e,checkBoxes:n,mode:d,isDisabled:c,style:h,labelStyle:p,labelCheckBoxStyle:i,checkBoxStyle:l,width:r,registerOptions:m,checkedIconColor:u,checkBoxIconStyle:x,checkBoxContainerStyle:y,draggable:C=!1,selectionLimit:S,infoIconContainerStyle:w,onDragStart:I,rowHeight:f=40,initialScrollOffSet:$,onScroll:R}){const T=Se(),F=s.useRef(null),{control:v}=fo(),k=n.find(M=>M.groupLabel),A=n.filter(M=>!M.groupLabel),L=[];for(const M of A)if(M.isException||L.push(M.value),S!=null&&L.length===S+1)break;const N=n.filter(M=>M.defaultChecked).map(M=>M.value);return t.jsx(ss,{control:v,name:e,rules:m,defaultValue:N,render:({field:{value:M,ref:K,onChange:B}})=>{const V=J=>{Wr({event:J,value:M,allCheckBoxValues:L,groupLabelCheckBox:k,onChange:B})};return t.jsxs(qr,{style:h,windowSize:T,children:[k&&t.jsx(bo,{checkBox:k,index:0,value:M,allCheckBoxValues:L,mode:d,name:e,checkBoxContainerStyle:y,checkBoxIconStyle:x,checkBoxStyle:l,labelCheckBoxStyle:i,labelStyle:p,width:r,draggable:C,groupLabelCheckBox:k,infoIconContainerStyle:w,checkedIconColor:u,isDisabled:c,selectionLimit:S,onDragStart:I,ref:K,onChangeHandler:V}),t.jsx(Kr,{children:t.jsx(Tn,{style:{height:"100%",width:"100%"},children:({height:J,width:G})=>t.jsx(An,{ref:F,height:J,width:G,itemCount:A.length,itemSize:()=>f,estimatedItemSize:f,initialScrollOffset:$??0,onScroll:({scrollOffset:O})=>{R?.(O)},overscanCount:Vr,itemKey:O=>A[O].value,itemData:{checkBoxes:A,value:M,allCheckBoxValues:L,mode:d,name:e,checkBoxContainerStyle:y,checkBoxIconStyle:x,checkBoxStyle:l,labelCheckBoxStyle:i,labelStyle:p,width:r,draggable:C,groupLabelCheckBox:k,infoIconContainerStyle:w,checkedIconColor:u,isDisabled:c,selectionLimit:S,onDragStart:I,ref:K,onChange:B,handleChangeEvent:V,rowHeight:f},children:Ur})})})]})}})}const Ur=({index:e,style:n,data:d})=>{const c=s.useRef(null),{checkBoxes:h,value:p,allCheckBoxValues:i,mode:l,name:r,checkBoxContainerStyle:m,checkBoxIconStyle:u,checkBoxStyle:x,labelCheckBoxStyle:y,labelStyle:C,width:S,draggable:w,groupLabelCheckBox:I,infoIconContainerStyle:f,checkedIconColor:$,isDisabled:R,selectionLimit:T,onDragStart:F,ref:v,handleChangeEvent:k}=d,A=h[e];return t.jsx(Qr,{style:{...n,width:"100%"},ref:c,children:t.jsx(bo,{checkBox:A,index:e,value:p,allCheckBoxValues:i,mode:l,name:r,checkBoxContainerStyle:m,checkBoxIconStyle:u,checkBoxStyle:x,labelCheckBoxStyle:y,labelStyle:C,width:S,draggable:w,groupLabelCheckBox:I,infoIconContainerStyle:f,checkedIconColor:$,isDisabled:R,selectionLimit:T,onDragStart:F,ref:v,onChangeHandler:k})})},bo=s.forwardRef((e,n)=>{const{value:d,checkBox:c,groupLabelCheckBox:h,allCheckBoxValues:p,selectionLimit:i,mode:l,checkBoxStyle:r,labelCheckBoxStyle:m,isDisabled:u,draggable:x,checkBoxContainerStyle:y,infoIconContainerStyle:C,name:S,index:w,width:I,checkedIconColor:f,checkBoxIconStyle:$,labelStyle:R,onDragStart:T,onChangeHandler:F}=e,v=Se(),k=M=>{typeof n=="function"?n(M):n&&(n.current=M)};let A=d.includes(c.value);const L=Array.from(new Set([...d,c.value]));h?.value===c.value&&d.length>0&&(i!=null?A=L.length===p.length||L.length===i+1:A=p.every(M=>L.includes(M)===!0));const N=()=>l==="off"||c.isException?v==="small"?{display:"none",...r}:{visibility:"hidden",...r}:c.groupLabel?p.length===1&&p[0]===h?.value?{visibility:"hidden",...m}:m:r;return t.jsxs(Gr,{mode:l,draggable:x===!0,onDragStart:M=>{T?.(M,c.value)},style:y,isDisabled:u,isSelected:A,exceptionMode:c.exceptionMode,children:[c.prefix?t.jsx(Jr,{className:"prefix-box",children:c.prefix}):null,c.isException?t.jsx(Zr,{style:C,className:"checkbox-alert",children:t.jsx(fe,{style:{padding:`12px ${o.sp3}`},title:c.exceptionInfo??"",placement:"bottom-start",children:c.exceptionType==="info"?t.jsx(Yr,{}):t.jsx(Xr,{})})}):t.jsx(Ha,{name:`${S}.${c.value}`,checkBoxValue:c.value,value:A,checkedIconColor:f,isDisabled:u||!c.groupLabel&&!A&&i!=null&&L.length===i+1?"disabled":void 0,checkBoxStyle:N(),checkBoxIconStyle:$,ref:k,onChange:F}),typeof c.label=="string"&&c.label?t.jsx(Ua,{isDisabled:u,label:c.label,labelStyle:R,htmlFor:`${S}.${c.value}`,style:{display:"flex",flex:1,minHeight:o.sp4,marginLeft:o.sp2,width:I,backgroundColor:"inherit",...R}}):c.label]},`${c.value}_${w}`)});bo.displayName="CheckBoxWithLabel";const Wr=({event:e,value:n,allCheckBoxValues:d,groupLabelCheckBox:c,onChange:h})=>{const p=e.currentTarget.value,i=e.currentTarget.checked,l=c?.value,r=new Set(n);if(p===l){h(i?Array.from(new Set([l,...d])):[]);return}i?r.add(p):r.delete(p);const m=d.every(u=>r.has(u));l!=null&&(m&&!r.has(l)?r.add(l):!m&&r.has(l)&&r.delete(l)),h(Array.from(r))},qr=a.div`
|
|
155
155
|
display: flex;
|
|
156
156
|
flex-direction: column;
|
|
157
157
|
width: 100%;
|
|
@@ -161,7 +161,7 @@ import{o,c7 as Us,q as Se,gr as Ni,gs as Vi,l as q,F as je,j as t,cD as Ws,ab as
|
|
|
161
161
|
overflow: hidden;
|
|
162
162
|
`,Jr=a.div`
|
|
163
163
|
opacity: 0;
|
|
164
|
-
`,
|
|
164
|
+
`,Gr=a.div`
|
|
165
165
|
display: flex;
|
|
166
166
|
align-items: center;
|
|
167
167
|
flex-direction: row;
|
|
@@ -222,7 +222,7 @@ import{o,c7 as Us,q as Se,gr as Ni,gs as Vi,l as q,F as je,j as t,cD as Ws,ab as
|
|
|
222
222
|
opacity: 1;
|
|
223
223
|
}
|
|
224
224
|
`}
|
|
225
|
-
`,
|
|
225
|
+
`,Zr=a.div`
|
|
226
226
|
cursor: pointer;
|
|
227
227
|
`,Yr=a(qi)`
|
|
228
228
|
height: ${o.sp3};
|
|
@@ -269,7 +269,7 @@ import{o,c7 as Us,q as Se,gr as Ni,gs as Vi,l as q,F as je,j as t,cD as Ws,ab as
|
|
|
269
269
|
color: ${e=>e.theme.colors.brandColorJade};
|
|
270
270
|
`,ul=a(Ta)`
|
|
271
271
|
color: ${e=>e.theme.colors.primary};
|
|
272
|
-
`,hl=e=>{const{tab:n}=e;switch(n){case"transaction_categorization":return t.jsx(sl,{});case"je_schedules":case"reconciliation":return t.jsx(ll,{});case"flux_analysis":return t.jsx(rl,{});case"missing_receipts":default:return t.jsx(al,{})}};function bt(e){const{title:n,subTitle:d}=e;return t.jsx(il,{children:t.jsxs(cl,{children:[t.jsx(hl,{...e}),t.jsx(dl,{children:n}),t.jsx(ul,{children:d})]})})}const{common:{headers:{transactions:pl,jeSchedules:ml,fluxAnalysis:gl,missingReceipts:xl,insights:fl,reconciliation:No},strings:{empty:zt}},expenseAutomation:{transactions:{tabs:Vo,subTitles:{review:{item1:mn,item2:gn},autoCategorized:{item1:xn,item2:yl}},searchPlaceholder:Cl,allDoneText:wl},jeSchedules:{subTitles:{item1:bl,item2:vl},searchPlaceholder:Sl,allDoneText:jl},missingReceipts:{subTitles:kl,searchPlaceholder:Il,allDoneText:$l},fluxAnalysis:{subTitles:{item1:Ll,item2:Tl},searchPlaceholder:Al,emptyPageTexts:{youDidIt:El,allReviewed:Rl}},accountRecon:{review:{allDoneText:Ho},reconcile:{allDoneText:Dl},tabs:Uo,titles:{item1:Ol,item2:Fl},subTitles:{review:{item1:Ml,item2:fn},reconcile:{item1:yn,item2:zl}}}}}=je.getLocalizedStrings(),Ue=(e,n,d,c,h)=>{switch(e){case"transaction_categorization":return{key:"transaction_categorization",title:pl,subTitle:[],tabs:[{label:Vo.review,id:"review",subTitle:[{pre:mn.pre,bold:mn.bold,prefixIconName:mn.prefixIconName,post:mn.post},{pre:gn.pre,bold:gn.bold,prefixIconName:gn.prefixIconName,post:gn.post}]},{label:Vo.autoCategorized,id:"autoCategorized",subTitle:[{pre:xn.pre,bold:xn.bold,prefixIconName:xn.prefixIconName,post:xn.post.replace("#number",n!=null&&n!=0?n.toString():"")},yl]}],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Cl,allDoneText:wl};case"je_schedules":return{key:"je_schedules",title:ml,subTitle:[bl,vl],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Sl,allDoneText:jl};case"missing_receipts":return{key:"missing_receipts",title:xl,subTitle:[kl],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Il,allDoneText:$l};case"flux_analysis":return{key:"flux_analysis",title:gl,subTitle:[Ll,Tl],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Al,allDoneText:{title:El,subTitle:Rl}};case"month_end_insights":return{key:"month_end_insights",title:fl,subTitle:[],tabs:[],rightSection:["comment","refresh","close"],leftSection:[],searchPlaceholder:zt,allDoneText:{title:zt,subTitle:zt}};case"reconciliation":return d==null?{key:"reconciliation",title:No,subTitle:[Ol,Fl],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:zt,allDoneText:{title:zt,subTitle:zt}}:{key:"reconciliation",title:c??No,subText:h??void 0,subTitle:[],tabs:[{label:Uo.review,id:"review",subTitle:[Ml,{pre:fn.pre,bold:fn.bold,prefixIconName:fn.prefixIconName,post:fn.post}],allDoneText:Ho},{label:Uo.reconcile,id:"reconcile",subTitle:[{pre:yn.pre,bold:yn.bold,prefixIconName:yn.prefixIconName,post:yn.post},zl],allDoneText:Dl}],rightSection:["refresh"],leftSection:["back"],searchPlaceholder:zt,allDoneText:Ho}}},{common:{strings:{empty:Bl}},expenseAutomation:{accountRecon:{reconcile:{header:Dt}}}}=je.getLocalizedStrings(),Pl={key:"date",value:Dt.date,sortOrder:"ascending",width:new X(12.75,12.75,12.75),customStyle:{marginLeft:g[4],marginRight:g[3]}},_l={key:"clearedDate",value:Dt.clearedDate,sortOrder:"ascending",width:new X(12.75,12.75,12.75),customStyle:{marginRight:g[3],display:"none"}},Nl={key:"type",value:Dt.type,sortOrder:"ascending",width:new X(12.75,12.75,12.75),customStyle:{marginRight:g[3]}},Vl={key:"payee",value:Dt.payee,sortOrder:"ascending",width:new X(12.75,12.75,12.75),customStyle:{marginRight:g[3]}},Hl={key:"account",value:Dt.account,sortOrder:"ascending",width:new X(12.75,12.75,12.75),customStyle:{marginRight:g[3]}},Ul={key:"transactionDirection",value:Dt.direction,sortOrder:"ascending",width:new X(12.75,12.75,12.75),customStyle:{marginRight:g[3]}},Wl={key:"memo",value:Dt.memo,sortOrder:"ascending",width:new X(12.75,12.75,12.75),customStyle:{marginRight:g[3]}},ql={key:"amount",value:Dt.amount,sortOrder:"ascending",width:new X(12.75,12.75,12.75),customStyle:{marginRight:g[3]}},Kl={key:"recommended",value:Bl,sortOrder:"ascending",width:new X(1.25,1.25,1.25),customStyle:{marginRight:g[4],marginLeft:g[0]}},Oe=[Pl,_l,Nl,Vl,Hl,Ul,Wl,ql,Kl],Jl=50,sn={sortKey:"date",sortOrder:"descending"};function
|
|
272
|
+
`,hl=e=>{const{tab:n}=e;switch(n){case"transaction_categorization":return t.jsx(sl,{});case"je_schedules":case"reconciliation":return t.jsx(ll,{});case"flux_analysis":return t.jsx(rl,{});case"missing_receipts":default:return t.jsx(al,{})}};function bt(e){const{title:n,subTitle:d}=e;return t.jsx(il,{children:t.jsxs(cl,{children:[t.jsx(hl,{...e}),t.jsx(dl,{children:n}),t.jsx(ul,{children:d})]})})}const{common:{headers:{transactions:pl,jeSchedules:ml,fluxAnalysis:gl,missingReceipts:xl,insights:fl,reconciliation:No},strings:{empty:zt}},expenseAutomation:{transactions:{tabs:Vo,subTitles:{review:{item1:mn,item2:gn},autoCategorized:{item1:xn,item2:yl}},searchPlaceholder:Cl,allDoneText:wl},jeSchedules:{subTitles:{item1:bl,item2:vl},searchPlaceholder:Sl,allDoneText:jl},missingReceipts:{subTitles:kl,searchPlaceholder:Il,allDoneText:$l},fluxAnalysis:{subTitles:{item1:Ll,item2:Tl},searchPlaceholder:Al,emptyPageTexts:{youDidIt:El,allReviewed:Rl}},accountRecon:{review:{allDoneText:Ho},reconcile:{allDoneText:Dl},tabs:Uo,titles:{item1:Ol,item2:Fl},subTitles:{review:{item1:Ml,item2:fn},reconcile:{item1:yn,item2:zl}}}}}=je.getLocalizedStrings(),Ue=(e,n,d,c,h)=>{switch(e){case"transaction_categorization":return{key:"transaction_categorization",title:pl,subTitle:[],tabs:[{label:Vo.review,id:"review",subTitle:[{pre:mn.pre,bold:mn.bold,prefixIconName:mn.prefixIconName,post:mn.post},{pre:gn.pre,bold:gn.bold,prefixIconName:gn.prefixIconName,post:gn.post}]},{label:Vo.autoCategorized,id:"autoCategorized",subTitle:[{pre:xn.pre,bold:xn.bold,prefixIconName:xn.prefixIconName,post:xn.post.replace("#number",n!=null&&n!=0?n.toString():"")},yl]}],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Cl,allDoneText:wl};case"je_schedules":return{key:"je_schedules",title:ml,subTitle:[bl,vl],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Sl,allDoneText:jl};case"missing_receipts":return{key:"missing_receipts",title:xl,subTitle:[kl],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Il,allDoneText:$l};case"flux_analysis":return{key:"flux_analysis",title:gl,subTitle:[Ll,Tl],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Al,allDoneText:{title:El,subTitle:Rl}};case"month_end_insights":return{key:"month_end_insights",title:fl,subTitle:[],tabs:[],rightSection:["comment","refresh","close"],leftSection:[],searchPlaceholder:zt,allDoneText:{title:zt,subTitle:zt}};case"reconciliation":return d==null?{key:"reconciliation",title:No,subTitle:[Ol,Fl],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:zt,allDoneText:{title:zt,subTitle:zt}}:{key:"reconciliation",title:c??No,subText:h??void 0,subTitle:[],tabs:[{label:Uo.review,id:"review",subTitle:[Ml,{pre:fn.pre,bold:fn.bold,prefixIconName:fn.prefixIconName,post:fn.post}],allDoneText:Ho},{label:Uo.reconcile,id:"reconcile",subTitle:[{pre:yn.pre,bold:yn.bold,prefixIconName:yn.prefixIconName,post:yn.post},zl],allDoneText:Dl}],rightSection:["refresh"],leftSection:["back"],searchPlaceholder:zt,allDoneText:Ho}}},{common:{strings:{empty:Bl}},expenseAutomation:{accountRecon:{reconcile:{header:Dt}}}}=je.getLocalizedStrings(),Pl={key:"date",value:Dt.date,sortOrder:"ascending",width:new X(12.75,12.75,12.75),customStyle:{marginLeft:g[4],marginRight:g[3]}},_l={key:"clearedDate",value:Dt.clearedDate,sortOrder:"ascending",width:new X(12.75,12.75,12.75),customStyle:{marginRight:g[3],display:"none"}},Nl={key:"type",value:Dt.type,sortOrder:"ascending",width:new X(12.75,12.75,12.75),customStyle:{marginRight:g[3]}},Vl={key:"payee",value:Dt.payee,sortOrder:"ascending",width:new X(12.75,12.75,12.75),customStyle:{marginRight:g[3]}},Hl={key:"account",value:Dt.account,sortOrder:"ascending",width:new X(12.75,12.75,12.75),customStyle:{marginRight:g[3]}},Ul={key:"transactionDirection",value:Dt.direction,sortOrder:"ascending",width:new X(12.75,12.75,12.75),customStyle:{marginRight:g[3]}},Wl={key:"memo",value:Dt.memo,sortOrder:"ascending",width:new X(12.75,12.75,12.75),customStyle:{marginRight:g[3]}},ql={key:"amount",value:Dt.amount,sortOrder:"ascending",width:new X(12.75,12.75,12.75),customStyle:{marginRight:g[3]}},Kl={key:"recommended",value:Bl,sortOrder:"ascending",width:new X(1.25,1.25,1.25),customStyle:{marginRight:g[4],marginLeft:g[0]}},Oe=[Pl,_l,Nl,Vl,Hl,Ul,Wl,ql,Kl],Jl=50,sn={sortKey:"date",sortOrder:"descending"};function Gl({sortConfig:e,onReconTabColumnSortConfigChanged:n}){const d=Se(),[c,h]=s.useState(Co(Oe));s.useEffect(()=>{const l=[...c];for(const r of l)r.key===e.sortKey?r.sortOrder=e.sortOrder:r.sortOrder="ascending";h(l)},[e.sortKey,e.sortOrder]);const p=(l,r)=>{let m=r;e.sortKey===l&&(m=r==="ascending"?"descending":"ascending"),n(l,m)},i=l=>{p(l.key,l.sortOrder)};return t.jsx(Ql,{headerHeight:Jl,children:c.map(l=>t.jsx(Yl,{columnWidth:l.width,windowSize:d,sortDataValue:e.sortKey,actualDataValue:l.key,style:l.customStyle,children:t.jsxs(ic,{isVisible:l.key!=="recommended",children:[t.jsx(Xl,{"data-testid":z("reconcile-tab-list-sort",l.value),onClick:()=>i(l),children:t.jsx(gt,{children:l.value})}),t.jsx(ec,{sortConfig:e,headerData:l,children:t.jsx(tc,{})}),t.jsx(nc,{isVisible:e.sortKey===l.key&&(e.sortKey!==sn.sortKey||e.sortOrder!==sn.sortOrder),children:t.jsx(oc,{"data-testid":z("reconcile-tab-list-reset-sort",sn.sortKey),onClick:()=>n(sn.sortKey,sn.sortOrder)})})]})},l.key))})}const Zl=xs.memo(Gl),Yl=a.div`
|
|
273
273
|
color: ${e=>e.sortDataValue===e.actualDataValue?e.theme.colors.primary:e.theme.colors.grey1};
|
|
274
274
|
:hover {
|
|
275
275
|
color: ${e=>e.theme.colors.primary};
|
|
@@ -366,7 +366,7 @@ import{o,c7 as Us,q as Se,gr as Ni,gs as Vi,l as q,F as je,j as t,cD as Ws,ab as
|
|
|
366
366
|
padding: 1px 6px;
|
|
367
367
|
border-radius: ${o.sp1};
|
|
368
368
|
border: ${e=>`1px solid ${e.isSelected?e.theme.colors.primary:e.theme.colors.hero}`};
|
|
369
|
-
`,pc=je.getLocalizedStrings(),{common:{all:qo,strings:{empty:Ko}}}=pc,Jo="selectedTransactionIds",mc="expenseAutomationBankReconReconcilePage",gc=e=>`${e}_form`;function xc({currentFooterFormId:e,localData:n,matchedTransactions:d,sortConfig:c,onSaveReconciliation:h,selectedAccountId:p,onReconTabColumnSortConfigChanged:i,onUpdateReconcileTabLocalData:l,setCurrentFooterFormId:r}){const m=Ht({mode:"all",defaultValues:{selectedTransactionIds:n.selectedTransactionIds},values:{selectedTransactionIds:n.selectedTransactionIds}}),u={label:t.jsx(
|
|
369
|
+
`,pc=je.getLocalizedStrings(),{common:{all:qo,strings:{empty:Ko}}}=pc,Jo="selectedTransactionIds",mc="expenseAutomationBankReconReconcilePage",gc=e=>`${e}_form`;function xc({currentFooterFormId:e,localData:n,matchedTransactions:d,sortConfig:c,onSaveReconciliation:h,selectedAccountId:p,onReconTabColumnSortConfigChanged:i,onUpdateReconcileTabLocalData:l,setCurrentFooterFormId:r}){const m=Ht({mode:"all",defaultValues:{selectedTransactionIds:n.selectedTransactionIds},values:{selectedTransactionIds:n.selectedTransactionIds}}),u={label:t.jsx(Zl,{onReconTabColumnSortConfigChanged:i,sortConfig:c}),value:qo.toLocaleLowerCase(),defaultChecked:!1,groupLabel:!0},x=d.map(w=>({label:t.jsx(rc,{transaction:w,selectedTransactionIds:n.selectedTransactionIds,transactionId:w.id}),value:w.id,defaultChecked:!1,groupLabel:!1})),y=[u,...x],C=async w=>{const I=w[Jo].filter(f=>f!=qo.toLocaleLowerCase());l(I)};s.useEffect(()=>{const w=m.watch(I=>{I!=null&&hn(()=>C(I))});return()=>{w.unsubscribe()}}),s.useEffect(()=>(e!=="expenseAutomationBankReconReconcilePage"&&r("expenseAutomationBankReconReconcilePage"),()=>{r("expenseAutomationPage")}),[]);const S=s.useCallback(()=>{h({reconcileAction:"reconcile"})},[h]);if(d.length===0){const w=Ue("reconciliation",void 0,p).tabs.find(I=>I.id==="reconcile")?.allDoneText;return t.jsx(wc,{children:t.jsx(bt,{tab:"missing_receipts",title:w?.title??Ko,subTitle:w?.subTitle??Ko})})}return t.jsx(fc,{children:t.jsx(Ut,{...m,children:t.jsx(yc,{onSubmit:m.handleSubmit(S),id:gc(mc),children:t.jsx(Cc,{children:t.jsx(Hr,{name:Jo,checkBoxes:y,checkBoxStyle:{padding:20},labelCheckBoxStyle:{padding:20},rowHeight:ac,mode:n.selectedTransactionIds.length>0?"always_on":"checked_or_hover",checkBoxContainerStyle:{boxSizing:"border-box"}})})})})})}const fc=a.div``,yc=a.form``,Cc=a.div`
|
|
370
370
|
height: calc(100vh - 350px);
|
|
371
371
|
`,wc=a.div`
|
|
372
372
|
height: 100%;
|
|
@@ -575,7 +575,7 @@ import{o,c7 as Us,q as Se,gr as Ni,gs as Vi,l as q,F as je,j as t,cD as Ws,ab as
|
|
|
575
575
|
height: 12px;
|
|
576
576
|
cursor: pointer;
|
|
577
577
|
color: ${e=>e.theme.colors.hero};
|
|
578
|
-
`,rt="accountReconReviewTableSection",{dateFormat:Dc,expenseAutomation:Oc,common:pt}=je.getLocalizedStrings(),{visual:ks}=Dc,{accountRecon:ge}=Oc,Is=e=>[{label:ge.review.formLabels.allBankAccounts,options:e.map(n=>({label:n.accountName,value:n.accountId}))}],$s=e=>[{label:ge.review.formLabels.allCreditCards,options:e.map(n=>({label:n.accountName,value:n.accountId}))}],Zo=e=>`${rt}_${e}_form`,Ee=(e,n)=>`${rt}.${e}.${n}`,Fc=e=>{const{sortKey:n,sortOrder:d,accountReconEntity:c,entitySearchAutoCompleteActions:h,allAccountList:p,classList:i,localData:l,accountListNestedAccountHierarchy:r,classListNestedAccountHierarchy:m,selectedAccountId:u,entitySearchAutoCompleteData:x,excludeFetchById:y,saveFetchById:C,reviewTabSelectedVendorByTransactionId:S,refreshStatus:w,updateLocalData:I,onColumnSortConfigChanged:f,onSaveReconciliation:$,onSaveReconciliationReview:R,onReconMatchedTransactionClick:T,bankAccounts:F,creditCards:v}=e,{transactionsToReview:k}=c,A=s.useRef(null),[L,N]=s.useState(null),M=B=>{const V=k[B],J=q.isReviewTransactionBillPaymentType(V),Z=q.isReviewTransactionExpenseType(V),O=q.isReviewTransactionCreditCardPaymentType(V),ie=q.isReviewTransactionBankTransferType(V),ye=q.isReviewTransactionDepositType(V),U=V.recommendedAction.recommendedTransactions[0]?.merchantName!=null;return V.transactionId===L?Z||O||ie||ye?275+(U?25:0):J?185+V.recommendedAction.recommendedTransactions.length*40+(U?25:0):146:72},K=s.useMemo(()=>({onColumnSortConfigChanged:f,sortConfig:{sortKey:n,sortOrder:d}}),[f,n,d]);if(s.useEffect(()=>{N(k[0]?.transactionId??null),A.current?.resetAfterIndex(0)},[n,d]),s.useEffect(()=>{A.current?.resetAfterIndex(0)},[L]),s.useEffect(()=>{A.current?.resetAfterIndex(0)},[k.length]),s.useEffect(()=>{w.fetchState==="Completed"&&A.current?.resetAfterIndex(0)},[w]),k.length===0){const B=Ue("reconciliation",void 0,u).tabs.find(V=>V.id==="review")?.allDoneText;return t.jsx(od,{children:t.jsx(bt,{tab:"reconciliation",title:B?.title??pt.strings.empty,subTitle:B?.subTitle??pt.strings.empty})})}return t.jsx(Hc,{children:t.jsx(Ls.Provider,{value:K,children:t.jsx(Tn,{children:({height:B,width:V})=>t.jsx(An,{width:V,height:B,innerElementType:Ts,ref:A,itemCount:k.length,itemSize:M,itemKey:J=>k[J].transactionId,overscanCount:Ba,itemData:{transactionsList:k,expandedRowId:L,allAccountList:p,classList:i,accountListNestedAccountHierarchy:r,classListNestedAccountHierarchy:m,localData:l,entitySearchAutoCompleteData:x,entitySearchAutoCompleteActions:h,excludeFetchById:y,saveFetchById:C,reviewTabSelectedVendorByTransactionId:S,bankAccounts:F,creditCards:v,updateLocalData:I,setExpandedRowId:N,onSaveReconciliation:$,onSaveReconciliationReview:R,onReconMatchedTransactionClick:T},initialScrollOffset:0,children:Mc})})})})},Ls=s.createContext(void 0),Ts=s.forwardRef((e,n)=>{const{children:d,style:c,...h}=e,{sortConfig:p,onColumnSortConfigChanged:i}=s.useContext(Ls);return t.jsxs(Uc,{ref:n,style:{...c,width:"auto",padding:`${o.sp0} ${o.sp8}`},...h,children:[t.jsx(kc,{onColumnSortConfigChanged:i,sortConfig:p}),t.jsx(Wc,{children:d})]})});Ts.displayName="Account recon review table inner element type";const Mc=({index:e,style:n,data:d})=>{const{transactionsList:c,expandedRowId:h,setExpandedRowId:p,entitySearchAutoCompleteActions:i,allAccountList:l,classList:r,localData:m,updateLocalData:u,accountListNestedAccountHierarchy:x,classListNestedAccountHierarchy:y,entitySearchAutoCompleteData:C,onSaveReconciliation:S,onSaveReconciliationReview:w,onReconMatchedTransactionClick:I,excludeFetchById:f,saveFetchById:$,reviewTabSelectedVendorByTransactionId:R,bankAccounts:T,creditCards:F}=d,v=c[e];return t.jsx(Vc,{style:{...n,width:"100%"},children:t.jsx(zc,{transaction:v,expandedRowId:h,setExpandedRowId:p,entitySearchAutoCompleteActions:i,accountListNestedAccountHierarchy:x,allAccountList:l,classList:r,localData:m,updateLocalData:u,entitySearchAutoCompleteData:C,classListNestedAccountHierarchy:y,onSaveReconciliation:S,onSaveReconciliationReview:w,onReconMatchedTransactionClick:I,excludeFetchById:f,saveFetchById:$,selectedVendor:R[v.transactionId],bankAccounts:T,creditCards:F})})},zc=({transaction:e,expandedRowId:n,accountListNestedAccountHierarchy:d,entitySearchAutoCompleteActions:c,allAccountList:h,classList:p,classListNestedAccountHierarchy:i,localData:l,entitySearchAutoCompleteData:r,excludeFetchById:m,saveFetchById:u,selectedVendor:x,bankAccounts:y,creditCards:C,setExpandedRowId:S,updateLocalData:w,onSaveReconciliation:I,onSaveReconciliationReview:f,onReconMatchedTransactionClick:$})=>{const R=n===e.transactionId,T=Se(),F=l[e.transactionId],v=e.recommendedAction.action==="record_bill_payment",k=e.recommendedAction.action==="record_expense",A=h.find(M=>M.accountId===e.recommendedAction.recommendedTransactions[0]?.accountId),L=M=>M.recommendedAction.recommendedTransactions.length>0&&M.recommendedAction.recommendedTransactions[0].merchantName!=null?M.recommendedAction.recommendedTransactions[0].merchantName:pt.strings.hyphen,N=e.recommendedAction.recommendedTransactions[0]?.merchantName;return t.jsxs(Pc,{isExpanded:R,children:[t.jsxs(_c,{isExpanded:R,onClick:()=>S(e.transactionId),"data-testid":z("account-reconciliation-review-row",e.transactionId),children:[t.jsx(Jt,{windowSize:T,responsiveWidth:Ct[0].width,children:t.jsx(Kt,{children:e.transactionDate.format(ks.MMMDCommaYYYYformat)})}),t.jsx(Jt,{windowSize:T,responsiveWidth:Ct[1].width,children:t.jsx(Kt,{children:t.jsx(nt,{itemTextStyle:{...Tt.standardRegular.cssObject,color:"inherit"},text:L(e)})})}),t.jsx(Jt,{windowSize:T,responsiveWidth:Ct[2].width,children:t.jsx(Kt,{children:t.jsx(nt,{itemTextStyle:{...Tt.standardRegular.cssObject,color:"inherit"},text:e.memo})})}),t.jsx(Jt,{windowSize:T,responsiveWidth:Ct[3].width,children:t.jsx(Kt,{style:{textTransform:"capitalize"},children:e.transactionDirection})}),t.jsxs(Jt,{windowSize:T,responsiveWidth:Ct[4].width,children:[t.jsx(Ne,{controller:v,children:t.jsx(id,{children:t.jsx(sd,{children:ge.review.matchesCount.replace("__count__",e.recommendedAction.recommendedTransactions.length.toString())})})}),t.jsx(Ne,{controller:!v,children:t.jsx(Kt,{children:A!=null?t.jsxs(t.Fragment,{children:[t.jsx(As,{}),t.jsx(nt,{itemTextStyle:{...Tt.standardRegular.cssObject,color:"inherit"},text:A.accountName})]}):pt.strings.hyphen})})]}),t.jsx(Jt,{windowSize:T,isLastColumn:!0,responsiveWidth:Ct[5].width,children:t.jsx(Kt,{children:gs("0,0.00",e.amount.amount,e.amount.currencySymbol)})})]}),t.jsxs(Ne,{controller:R&&F!=null,children:[t.jsx(Bc,{onSaveReconciliation:I,onSaveReconciliationReview:f,updateLocalData:w,saveFetchById:u,excludeFetchById:m,localData:F,classListNestedAccountHierarchy:i,allAccountList:h,classList:p,transaction:e,accountListNestedAccountHierarchy:d,entitySearchAutoCompleteActions:c,entitySearchAutoCompleteData:r,selectedVendor:x,bankAccounts:y,creditCards:C,onReconMatchedTransactionClick:$}),t.jsx(Ne,{controller:(v||k)&&N!=null,children:t.jsx(rd,{children:t.jsxs(ld,{children:[ge.review.bankDetail,pt.strings.colon," ",N]})})})]})]})},Bc=({transaction:e,accountListNestedAccountHierarchy:n,entitySearchAutoCompleteActions:d,allAccountList:c,classList:h,classListNestedAccountHierarchy:p,localData:i,entitySearchAutoCompleteData:l,excludeFetchById:r,saveFetchById:m,selectedVendor:u,bankAccounts:x,creditCards:y,updateLocalData:C,onSaveReconciliation:S,onSaveReconciliationReview:w,onReconMatchedTransactionClick:I})=>{const f=vt(),[$,R]=s.useState(!i.vendor?.id),[T,F]=s.useState(!i.customer?.id),[v,k]=s.useState(i.categoryId==null),[A,L]=s.useState(i.classId==null),[N,M]=s.useState(i.bankAccountId==null),[K,B]=s.useState(i.creditCardId==null),[V,J]=s.useState(!i.memo),Z=q.isReviewTransactionBillPaymentType(e),O=q.isReviewTransactionExpenseType(e),ie=q.isReviewTransactionBankTransferType(e),ye=q.isReviewTransactionCreditCardPaymentType(e),U=q.isReviewTransactionDepositType(e),he=s.useMemo(()=>{if(!O)return Et(n);if(u!=null&&u.id!==e.recommendedAction.recommendedTransactions[0]?.merchantId)return Et(n,u?.recommendations);const j=c.find(be=>be.accountId===e.recommendedAction.recommendedTransactions[0]?.accountId),G=j!=null?{...j,reason:ge.review.zeniGptRecommendation,min:0,max:0}:void 0;return Et(n,[{account:G}])},[O,u,e.recommendedAction.recommendedTransactions,c,n]),Ce=s.useMemo(()=>{if(!O)return jn(p);if(u!=null&&u.id!==e.recommendedAction.recommendedTransactions[0]?.merchantId)return jn(p,u?.recommendations);const j=h.find(be=>be.classId===e.recommendedAction.recommendedTransactions[0]?.classId),G=j!=null?{...j,reason:ge.review.zeniGptRecommendation,min:0,max:0}:void 0;return jn(p,[{class:G}])},[O,u,e.recommendedAction.recommendedTransactions,h,p]),b=Ht({mode:"onSubmit",reValidateMode:"onSubmit",shouldFocusError:!0,defaultValues:s.useMemo(()=>Go(e,i,he,c,Ce,x,y,l),[e,i,Ce,c,he,x,y,l]),values:s.useMemo(()=>Go(e,i,he,c,Ce,x,y,l),[e,i,Ce,c,he,x,y,l])}),P=async(j,G)=>{j.includes("memo")||C(Yo(G,e,l,c),e.transactionId,j.includes("vendor"))};s.useEffect(()=>{const j=b.watch((G,{name:be})=>{be!=null&&G!=null&&hn(()=>P(be,G))});return()=>{j.unsubscribe()}});const W=s.useCallback(j=>{if(O||U){if(O&&i.vendor==null){R(!1),b.setError(Ee(e.transactionId,"vendor"),{type:"required"});return}if(U&&i.customer==null){F(!1),b.setError(Ee(e.transactionId,"customer"),{type:"required"});return}if(i.categoryId==null){k(!1),b.setError(Ee(e.transactionId,"category"),{type:"required"});return}}C(Yo(j,e,l,c),e.transactionId,!1),w(e.transactionId)},[O,U,C,e,l,c,w,i.categoryId,i.vendor,i.customer]),_=b.watch(Ee(e.transactionId,"vendor")),E=b.watch(Ee(e.transactionId,"customer")),H=s.useRef(),ee=s.useMemo(()=>O?"vendor":U?"customer":null,[O,U]),me=(j,G)=>{ee!=null&&d.onAutoCompleteInputChange?.(j,ee),H.current=G};s.useEffect(()=>{l.entityAutoCompleteView.fetchState==="Completed"&&(O&&H.current?.(ls(l.entityAutoCompleteView)),U&&H.current?.(Ja(l.entityAutoCompleteView)))},[l.entityAutoCompleteView,U,O]);const D=j=>h.filter(G=>G.classId===j)[0]?.accountingClassNumber??void 0,re=j=>c.filter(G=>G.qboId===j)[0]?.qboId,Q=s.useMemo(()=>{switch(e.recommendedAction.action){case"record_bill_payment":return["record_bill_payment"];case"record_cc_payment":case"record_expense":case"record_transfer":return["record_expense","record_transfer","record_cc_payment"];default:return["record_deposit","record_cc_credit"]}},[e.recommendedAction.action]),te=()=>{k(!1)},we=()=>{M(!1)},ke=()=>{B(!1)};return s.useEffect(()=>{v===!1&&i.categoryId==null&&b.setFocus(Ee(e.transactionId,"category"))},[v]),s.useEffect(()=>{A===!1&&i.classId==null&&b.setFocus(Ee(e.transactionId,"class"))},[A]),s.useEffect(()=>{$===!1&&i.vendor==null&&b.setFocus(Ee(e.transactionId,"vendor"))},[$]),s.useEffect(()=>{T===!1&&i.customer==null&&b.setFocus(Ee(e.transactionId,"customer"))},[T]),s.useEffect(()=>{N===!1&&i.bankAccountId==null&&b.setFocus(Ee(e.transactionId,"bankAccount"))},[N]),s.useEffect(()=>{K===!1&&i.creditCardId==null&&b.setFocus(Ee(e.transactionId,"creditCard"))},[K]),t.jsx(Ut,{...b,children:t.jsx("form",{onSubmit:b.handleSubmit(W),id:Zo(e.transactionId),children:t.jsxs(Nc,{children:[t.jsxs(qc,{children:[t.jsxs(Zc,{children:[t.jsxs(Gc,{children:[t.jsx(As,{}),t.jsx(zn,{label:{label:Z?ge.review.formLabels.match:ge.review.formLabels.categorize},radioField:{name:Ee(e.transactionId,"match_radio"),id:Z?"match":"categorize",value:Z?"match":"categorize",checked:!0,style:{width:o.sp3,height:o.sp3,padding:"2px"}},style:{width:"auto"}})]}),t.jsx(Ne,{controller:!Z,children:t.jsxs(t.Fragment,{children:[t.jsx(Xo,{}),Q.map(j=>t.jsx(zn,{label:{label:ge.review.formLabels[j]},style:{width:"auto"},isDisabled:"readonly",changeLabelColorInDisableMode:!0,radioField:{name:Ee(e.transactionId,"recommendedActionType"),id:j,value:j,style:{width:o.sp3,height:o.sp3,padding:"2px"}}},j))]})})]}),t.jsxs(Jc,{children:[t.jsx(dn,{variant:"secondary",size:"small",label:ge.review.formLabels.exclude,loading:r[e.transactionId]?.fetchState==="In-Progress","data-testid":z("account-reconciliation-review-exclude-button",e.transactionId),style:{width:o.sp10},reverseSpinnerColor:!1,onClick:()=>{S({reconcileAction:"exclude",excludeTransactionId:e.transactionId})}}),t.jsx(dn,{form:Zo(e.transactionId),"data-testid":z("account-reconciliation-review-save-button",e.transactionId),label:pt.footer.save,style:{width:o.sp10},variant:"primary",size:"small",type:"submit",loading:m[e.transactionId]?.fetchState==="In-Progress"})]})]}),t.jsx(Ne,{controller:O||U,children:t.jsxs(Pn,{children:[t.jsx(Ne,{controller:O,children:t.jsx(yt,{onClickAway:()=>{i.vendor==null&&$===!1&&R(!0)},children:t.jsx(Y,{style:{flex:1,padding:g[0],justifyContent:"center"},showHoverEffect:!0,forceHoverEffect:!1,children:t.jsxs(ut,{className:"hover-background",style:{padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(ne,{style:{display:"flex",alignItems:"center",gap:g[1]},children:pt.texts.vendor}),t.jsx(ae,{style:{gap:g[3]},className:"item-value-container",children:t.jsx(t.Fragment,{children:$===!0?t.jsxs(ce,{onClick:j=>{j.stopPropagation(),R(!1)},"data-testid":z("account-reconciliation-review-add-vendor-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:f.colors.champion,cursor:"pointer"},children:[t.jsx(Pt,{}),ge.review.formLabels.addVendor]}):t.jsx(ro,{name:Ee(e.transactionId,"vendor"),allowEmpty:!1,placeholder:ge.review.formLabels.addVendor,valueToId:j=>j,defaultValue:{selectedOption:_?.selectedOption,defaultOptions:_?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:o.sp4})},registerOptions:{required:!0,validate:j=>!!j.selectedOption},loadOptions:me})})})]})})})}),t.jsx(Ne,{controller:U,children:t.jsx(yt,{onClickAway:()=>{i.customer==null&&T===!1&&F(!0)},children:t.jsx(Y,{style:{flex:1,padding:g[0],justifyContent:"center"},showHoverEffect:!0,forceHoverEffect:!1,children:t.jsxs(ut,{className:"hover-background",style:{padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(ne,{style:{display:"flex",alignItems:"center",gap:g[1]},children:pt.texts.customer}),t.jsx(ae,{style:{gap:g[3]},className:"item-value-container",children:t.jsx(t.Fragment,{children:T===!0?t.jsxs(ce,{onClick:j=>{j.stopPropagation(),F(!1)},"data-testid":z("account-reconciliation-review-add-customer-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:f.colors.champion,cursor:"pointer"},children:[t.jsx(Pt,{}),ge.review.formLabels.addCustomer]}):t.jsx(ro,{name:Ee(e.transactionId,"customer"),allowEmpty:!1,placeholder:ge.review.formLabels.addCustomer,valueToId:j=>j,defaultValue:{selectedOption:E?.selectedOption,defaultOptions:E?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:o.sp4})},registerOptions:{required:!0,validate:j=>!!j.selectedOption},loadOptions:me})})})]})})})}),t.jsx(yt,{onClickAway:()=>{i.categoryId==null&&v===!1&&k(!0)},children:t.jsx(Y,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(ut,{className:"hover-background",children:[t.jsx(ne,{style:{display:"flex",alignItems:"center",gap:g[1]},children:pt.texts.category}),t.jsx(ae,{className:"item-value-container",children:t.jsx(t.Fragment,{children:v===!0?t.jsxs(ce,{onClick:j=>{j.stopPropagation(),te()},"data-testid":z("account-reconciliation-review-add-category-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:f.colors.champion,cursor:"pointer"},children:[t.jsx(Pt,{}),ge.review.formLabels.addCategory]}):t.jsx(Qt,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Ee(e.transactionId,"category"),placeholder:ge.review.formLabels.addCategory,valueToId:j=>re(j),defaultValue:{allOptions:he,selectedOption:c.find(j=>j.accountId===i.categoryId)?.qboId},registerOptions:{required:!0,validate:j=>!!j.selectedOption},customStyleConfig:Cn})})})]})})}),t.jsx(yt,{onClickAway:()=>{i.classId==null&&A===!1&&L(!0)},children:t.jsx(Y,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(ut,{className:"hover-background",children:[t.jsx(ne,{style:{display:"flex",alignItems:"center",gap:g[1]},children:pt.texts.class}),t.jsx(ae,{className:"item-value-container",children:t.jsx(t.Fragment,{children:A===!0?t.jsxs(ce,{onClick:j=>{j.stopPropagation(),L(!1)},"data-testid":z("account-reconciliation-review-add-class-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:f.colors.champion,cursor:"pointer"},children:[t.jsx(Pt,{}),ge.review.formLabels.addClass]}):t.jsx(Qt,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Ee(e.transactionId,"class"),placeholder:ge.review.formLabels.addClass,valueToId:j=>D(j),defaultValue:{allOptions:Ce,selectedOption:i.classId},registerOptions:{required:!0,validate:j=>!!j.selectedOption},customStyleConfig:Cn})})})]})})})]})}),t.jsx(Ne,{controller:Z,children:t.jsxs(Yc,{children:[t.jsxs(Xc,{children:[t.jsx("span",{className:"matched-text",children:`${ge.review.matchedFoundCount.replace("__count__",e.recommendedAction.recommendedTransactions.length.toString())} `}),ge.review.matchesFoundFullInfo]}),t.jsx(ed,{children:e.recommendedAction.recommendedTransactions.map(j=>j.bookTransactionId!=null?t.jsxs(td,{children:[t.jsx(zn,{label:{label:t.jsxs(Qc,{children:[t.jsx(ze,{children:j.date.format(ks.MMMDCommaYYYYformat)}),t.jsx(ze,{children:j.memo})]})},style:{width:"auto"},isDisabled:void 0,changeLabelColorInDisableMode:!0,radioField:{name:Ee(e.transactionId,"matchedTransaction"),registerOptions:{required:!0},id:j.bookTransactionId,value:j.bookTransactionId,style:{width:o.sp3,height:o.sp3,padding:"2px"}}}),t.jsxs(ad,{"data-testid":z("account-reconciliation-review-matched-transaction-amount",j.bookTransactionId),onClick:()=>{j.bookTransactionId!=null&&I(j.bookTransactionId)},children:[t.jsx(nd,{children:gs("0,0.00",j.amount.amount,j.amount.currencySymbol)}),t.jsx(Xo,{})]})]},j.bookTransactionId):null)})]})}),t.jsx(Ne,{controller:ie,children:t.jsx(Pn,{children:t.jsx(yt,{onClickAway:()=>{i.bankAccountId==null&&N===!1&&M(!0)},children:t.jsx(Y,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(ut,{className:"hover-background",children:[t.jsx(ne,{style:{display:"flex",alignItems:"center",gap:g[1]},children:ge.review.formLabels.transferTo}),t.jsx(ae,{className:"item-value-container",children:t.jsx(t.Fragment,{children:N===!0?t.jsxs(ce,{onClick:j=>{j.stopPropagation(),we()},"data-testid":z("account-reconciliation-review-add-account-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:f.colors.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(Pt,{}),ge.review.formLabels.selectAccount]}):t.jsx(Qt,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Ee(e.transactionId,"bankAccount"),placeholder:ge.review.formLabels.selectAccount,defaultValue:{allOptions:Is(x),selectedOption:i.bankAccountId},registerOptions:{required:!0,validate:j=>!!j.selectedOption},customStyleConfig:Cn})})})]})})})})}),t.jsx(Ne,{controller:ye,children:t.jsx(Pn,{children:t.jsx(yt,{onClickAway:()=>{i.creditCardId==null&&K===!1&&B(!0)},children:t.jsx(Y,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(ut,{className:"hover-background",children:[t.jsx(ne,{style:{display:"flex",alignItems:"center",gap:g[1]},children:ge.review.formLabels.creditCard}),t.jsx(ae,{className:"item-value-container",children:t.jsx(t.Fragment,{children:K===!0?t.jsxs(ce,{onClick:j=>{j.stopPropagation(),ke()},"data-testid":z("account-reconciliation-review-add-credit-card-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:f.colors.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(Pt,{}),ge.review.formLabels.selectCard]}):t.jsx(Qt,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Ee(e.transactionId,"creditCard"),placeholder:ge.review.formLabels.selectCard,defaultValue:{allOptions:$s(y),selectedOption:i.creditCardId},registerOptions:{required:!0,validate:j=>!!j.selectedOption},customStyleConfig:Cn})})})]})})})})}),t.jsx(Ne,{controller:!Z,children:t.jsx(Kc,{children:t.jsx(Y,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",width:"100%"},children:t.jsxs(ut,{className:"hover-background",children:[t.jsx(ne,{style:{display:"flex",alignItems:"center",gap:g[1]},children:ge.review.header.memo}),t.jsx(ae,{className:"item-value-container",children:t.jsx(t.Fragment,{children:V===!0?t.jsxs(ce,{onClick:j=>{j.stopPropagation(),J(!1)},"data-testid":z("account-reconciliation-review-add-memo-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:f.colors.champion,cursor:"pointer"},children:[t.jsx(Pt,{}),ge.review.formLabels.addMemo]}):t.jsx(Za,{name:Ee(e.transactionId,"memo"),placeholder:ge.review.formLabels.addMemo,type:"text",style:{padding:0,textAlign:"left",width:"100%",background:"transparent"}})})})]})})})})]})})})},Cn={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:o.sp4}),singleValue:()=>({margin:0}),menuPortal:()=>({zIndex:9999}),menu:()=>({width:`calc(100% + ${o.sp5})`,marginRight:`-${o.sp3}`,marginLeft:`-${o.sp3}`})},Go=(e,n,d,c,h,p,i,l)=>{const r=c.find(m=>m.accountId===n.categoryId);return{[rt]:{[e.transactionId]:{category:{selectedOption:r?.qboId,allOptions:d},class:{selectedOption:n?.classId,allOptions:h},bankAccount:{selectedOption:n?.bankAccountId,allOptions:Is(p)},creditCard:{selectedOption:n?.creditCardId,allOptions:$s(i)},memo:n?.memo,recommendedActionType:e.recommendedAction.action,matchedTransaction:n?.matchedTransactionId,vendor:{selectedOption:n?.vendor?.id,defaultOptions:ps(l.entityAutoCompleteView,n?.vendor)},customer:{selectedOption:n?.customer?.id,defaultOptions:tr(n?.customer,l.entityAutoCompleteView)}}}}},Yo=(e,n,d,c)=>{const{vendor:h,customer:p}=e[rt][n.transactionId];let i;if(h.selectedOption!=null){const r=h.defaultOptions.find(m=>m.value===h.selectedOption);if(r!=null)i={id:h.selectedOption,name:r.label};else{const m=d.entityAutoCompleteView.vendor.find(u=>u.id===h.selectedOption||u.zeniId===h.selectedOption);m!=null&&(i={id:m.zeniId,name:m.name})}}let l;if(p.selectedOption!=null){const r=p.defaultOptions.find(m=>m.value===p.selectedOption);if(r!=null)l={id:p.selectedOption,name:r.label};else{const m=d.entityAutoCompleteView.customer.find(u=>u.id===p.selectedOption||u.zeniId===p.selectedOption);m!=null&&(l={id:m.zeniId,name:m.name})}}return{categoryId:c.find(r=>r.qboId===e[rt][n.transactionId].category.selectedOption)?.accountId??e[rt][n.transactionId].category.selectedOption,classId:e[rt][n.transactionId].class.selectedOption,memo:e[rt][n.transactionId].memo,matchedTransactionId:e[rt][n.transactionId].matchedTransaction,vendor:i,bankAccountId:e[rt][n.transactionId].bankAccount.selectedOption,creditCardId:e[rt][n.transactionId].creditCard.selectedOption,customer:l}},Kt=a(ze)`
|
|
578
|
+
`,rt="accountReconReviewTableSection",{dateFormat:Dc,expenseAutomation:Oc,common:pt}=je.getLocalizedStrings(),{visual:ks}=Dc,{accountRecon:ge}=Oc,Is=e=>[{label:ge.review.formLabels.allBankAccounts,options:e.map(n=>({label:n.accountName,value:n.accountId}))}],$s=e=>[{label:ge.review.formLabels.allCreditCards,options:e.map(n=>({label:n.accountName,value:n.accountId}))}],Go=e=>`${rt}_${e}_form`,Ee=(e,n)=>`${rt}.${e}.${n}`,Fc=e=>{const{sortKey:n,sortOrder:d,accountReconEntity:c,entitySearchAutoCompleteActions:h,allAccountList:p,classList:i,localData:l,accountListNestedAccountHierarchy:r,classListNestedAccountHierarchy:m,selectedAccountId:u,entitySearchAutoCompleteData:x,excludeFetchById:y,saveFetchById:C,reviewTabSelectedVendorByTransactionId:S,refreshStatus:w,updateLocalData:I,onColumnSortConfigChanged:f,onSaveReconciliation:$,onSaveReconciliationReview:R,onReconMatchedTransactionClick:T,bankAccounts:F,creditCards:v}=e,{transactionsToReview:k}=c,A=s.useRef(null),[L,N]=s.useState(null),M=B=>{const V=k[B],J=q.isReviewTransactionBillPaymentType(V),G=q.isReviewTransactionExpenseType(V),O=q.isReviewTransactionCreditCardPaymentType(V),ie=q.isReviewTransactionBankTransferType(V),ye=q.isReviewTransactionDepositType(V),U=V.recommendedAction.recommendedTransactions[0]?.merchantName!=null;return V.transactionId===L?G||O||ie||ye?275+(U?25:0):J?185+V.recommendedAction.recommendedTransactions.length*40+(U?25:0):146:72},K=s.useMemo(()=>({onColumnSortConfigChanged:f,sortConfig:{sortKey:n,sortOrder:d}}),[f,n,d]);if(s.useEffect(()=>{N(k[0]?.transactionId??null),A.current?.resetAfterIndex(0)},[n,d]),s.useEffect(()=>{A.current?.resetAfterIndex(0)},[L]),s.useEffect(()=>{A.current?.resetAfterIndex(0)},[k.length]),s.useEffect(()=>{w.fetchState==="Completed"&&A.current?.resetAfterIndex(0)},[w]),k.length===0){const B=Ue("reconciliation",void 0,u).tabs.find(V=>V.id==="review")?.allDoneText;return t.jsx(od,{children:t.jsx(bt,{tab:"reconciliation",title:B?.title??pt.strings.empty,subTitle:B?.subTitle??pt.strings.empty})})}return t.jsx(Hc,{children:t.jsx(Ls.Provider,{value:K,children:t.jsx(Tn,{children:({height:B,width:V})=>t.jsx(An,{width:V,height:B,innerElementType:Ts,ref:A,itemCount:k.length,itemSize:M,itemKey:J=>k[J].transactionId,overscanCount:Ba,itemData:{transactionsList:k,expandedRowId:L,allAccountList:p,classList:i,accountListNestedAccountHierarchy:r,classListNestedAccountHierarchy:m,localData:l,entitySearchAutoCompleteData:x,entitySearchAutoCompleteActions:h,excludeFetchById:y,saveFetchById:C,reviewTabSelectedVendorByTransactionId:S,bankAccounts:F,creditCards:v,updateLocalData:I,setExpandedRowId:N,onSaveReconciliation:$,onSaveReconciliationReview:R,onReconMatchedTransactionClick:T},initialScrollOffset:0,children:Mc})})})})},Ls=s.createContext(void 0),Ts=s.forwardRef((e,n)=>{const{children:d,style:c,...h}=e,{sortConfig:p,onColumnSortConfigChanged:i}=s.useContext(Ls);return t.jsxs(Uc,{ref:n,style:{...c,width:"auto",padding:`${o.sp0} ${o.sp8}`},...h,children:[t.jsx(kc,{onColumnSortConfigChanged:i,sortConfig:p}),t.jsx(Wc,{children:d})]})});Ts.displayName="Account recon review table inner element type";const Mc=({index:e,style:n,data:d})=>{const{transactionsList:c,expandedRowId:h,setExpandedRowId:p,entitySearchAutoCompleteActions:i,allAccountList:l,classList:r,localData:m,updateLocalData:u,accountListNestedAccountHierarchy:x,classListNestedAccountHierarchy:y,entitySearchAutoCompleteData:C,onSaveReconciliation:S,onSaveReconciliationReview:w,onReconMatchedTransactionClick:I,excludeFetchById:f,saveFetchById:$,reviewTabSelectedVendorByTransactionId:R,bankAccounts:T,creditCards:F}=d,v=c[e];return t.jsx(Vc,{style:{...n,width:"100%"},children:t.jsx(zc,{transaction:v,expandedRowId:h,setExpandedRowId:p,entitySearchAutoCompleteActions:i,accountListNestedAccountHierarchy:x,allAccountList:l,classList:r,localData:m,updateLocalData:u,entitySearchAutoCompleteData:C,classListNestedAccountHierarchy:y,onSaveReconciliation:S,onSaveReconciliationReview:w,onReconMatchedTransactionClick:I,excludeFetchById:f,saveFetchById:$,selectedVendor:R[v.transactionId],bankAccounts:T,creditCards:F})})},zc=({transaction:e,expandedRowId:n,accountListNestedAccountHierarchy:d,entitySearchAutoCompleteActions:c,allAccountList:h,classList:p,classListNestedAccountHierarchy:i,localData:l,entitySearchAutoCompleteData:r,excludeFetchById:m,saveFetchById:u,selectedVendor:x,bankAccounts:y,creditCards:C,setExpandedRowId:S,updateLocalData:w,onSaveReconciliation:I,onSaveReconciliationReview:f,onReconMatchedTransactionClick:$})=>{const R=n===e.transactionId,T=Se(),F=l[e.transactionId],v=e.recommendedAction.action==="record_bill_payment",k=e.recommendedAction.action==="record_expense",A=h.find(M=>M.accountId===e.recommendedAction.recommendedTransactions[0]?.accountId),L=M=>M.recommendedAction.recommendedTransactions.length>0&&M.recommendedAction.recommendedTransactions[0].merchantName!=null?M.recommendedAction.recommendedTransactions[0].merchantName:pt.strings.hyphen,N=e.recommendedAction.recommendedTransactions[0]?.merchantName;return t.jsxs(Pc,{isExpanded:R,children:[t.jsxs(_c,{isExpanded:R,onClick:()=>S(e.transactionId),"data-testid":z("account-reconciliation-review-row",e.transactionId),children:[t.jsx(Jt,{windowSize:T,responsiveWidth:Ct[0].width,children:t.jsx(Kt,{children:e.transactionDate.format(ks.MMMDCommaYYYYformat)})}),t.jsx(Jt,{windowSize:T,responsiveWidth:Ct[1].width,children:t.jsx(Kt,{children:t.jsx(nt,{itemTextStyle:{...Tt.standardRegular.cssObject,color:"inherit"},text:L(e)})})}),t.jsx(Jt,{windowSize:T,responsiveWidth:Ct[2].width,children:t.jsx(Kt,{children:t.jsx(nt,{itemTextStyle:{...Tt.standardRegular.cssObject,color:"inherit"},text:e.memo})})}),t.jsx(Jt,{windowSize:T,responsiveWidth:Ct[3].width,children:t.jsx(Kt,{style:{textTransform:"capitalize"},children:e.transactionDirection})}),t.jsxs(Jt,{windowSize:T,responsiveWidth:Ct[4].width,children:[t.jsx(Ne,{controller:v,children:t.jsx(id,{children:t.jsx(sd,{children:ge.review.matchesCount.replace("__count__",e.recommendedAction.recommendedTransactions.length.toString())})})}),t.jsx(Ne,{controller:!v,children:t.jsx(Kt,{children:A!=null?t.jsxs(t.Fragment,{children:[t.jsx(As,{}),t.jsx(nt,{itemTextStyle:{...Tt.standardRegular.cssObject,color:"inherit"},text:A.accountName})]}):pt.strings.hyphen})})]}),t.jsx(Jt,{windowSize:T,isLastColumn:!0,responsiveWidth:Ct[5].width,children:t.jsx(Kt,{children:gs("0,0.00",e.amount.amount,e.amount.currencySymbol)})})]}),t.jsxs(Ne,{controller:R&&F!=null,children:[t.jsx(Bc,{onSaveReconciliation:I,onSaveReconciliationReview:f,updateLocalData:w,saveFetchById:u,excludeFetchById:m,localData:F,classListNestedAccountHierarchy:i,allAccountList:h,classList:p,transaction:e,accountListNestedAccountHierarchy:d,entitySearchAutoCompleteActions:c,entitySearchAutoCompleteData:r,selectedVendor:x,bankAccounts:y,creditCards:C,onReconMatchedTransactionClick:$}),t.jsx(Ne,{controller:(v||k)&&N!=null,children:t.jsx(rd,{children:t.jsxs(ld,{children:[ge.review.bankDetail,pt.strings.colon," ",N]})})})]})]})},Bc=({transaction:e,accountListNestedAccountHierarchy:n,entitySearchAutoCompleteActions:d,allAccountList:c,classList:h,classListNestedAccountHierarchy:p,localData:i,entitySearchAutoCompleteData:l,excludeFetchById:r,saveFetchById:m,selectedVendor:u,bankAccounts:x,creditCards:y,updateLocalData:C,onSaveReconciliation:S,onSaveReconciliationReview:w,onReconMatchedTransactionClick:I})=>{const f=vt(),[$,R]=s.useState(!i.vendor?.id),[T,F]=s.useState(!i.customer?.id),[v,k]=s.useState(i.categoryId==null),[A,L]=s.useState(i.classId==null),[N,M]=s.useState(i.bankAccountId==null),[K,B]=s.useState(i.creditCardId==null),[V,J]=s.useState(!i.memo),G=q.isReviewTransactionBillPaymentType(e),O=q.isReviewTransactionExpenseType(e),ie=q.isReviewTransactionBankTransferType(e),ye=q.isReviewTransactionCreditCardPaymentType(e),U=q.isReviewTransactionDepositType(e),he=s.useMemo(()=>{if(!O)return Et(n);if(u!=null&&u.id!==e.recommendedAction.recommendedTransactions[0]?.merchantId)return Et(n,u?.recommendations);const j=c.find(be=>be.accountId===e.recommendedAction.recommendedTransactions[0]?.accountId),Z=j!=null?{...j,reason:ge.review.zeniGptRecommendation,min:0,max:0}:void 0;return Et(n,[{account:Z}])},[O,u,e.recommendedAction.recommendedTransactions,c,n]),Ce=s.useMemo(()=>{if(!O)return jn(p);if(u!=null&&u.id!==e.recommendedAction.recommendedTransactions[0]?.merchantId)return jn(p,u?.recommendations);const j=h.find(be=>be.classId===e.recommendedAction.recommendedTransactions[0]?.classId),Z=j!=null?{...j,reason:ge.review.zeniGptRecommendation,min:0,max:0}:void 0;return jn(p,[{class:Z}])},[O,u,e.recommendedAction.recommendedTransactions,h,p]),b=Ht({mode:"onSubmit",reValidateMode:"onSubmit",shouldFocusError:!0,defaultValues:s.useMemo(()=>Zo(e,i,he,c,Ce,x,y,l),[e,i,Ce,c,he,x,y,l]),values:s.useMemo(()=>Zo(e,i,he,c,Ce,x,y,l),[e,i,Ce,c,he,x,y,l])}),P=async(j,Z)=>{j.includes("memo")||C(Yo(Z,e,l,c),e.transactionId,j.includes("vendor"))};s.useEffect(()=>{const j=b.watch((Z,{name:be})=>{be!=null&&Z!=null&&hn(()=>P(be,Z))});return()=>{j.unsubscribe()}});const W=s.useCallback(j=>{if(O||U){if(O&&i.vendor==null){R(!1),b.setError(Ee(e.transactionId,"vendor"),{type:"required"});return}if(U&&i.customer==null){F(!1),b.setError(Ee(e.transactionId,"customer"),{type:"required"});return}if(i.categoryId==null){k(!1),b.setError(Ee(e.transactionId,"category"),{type:"required"});return}}C(Yo(j,e,l,c),e.transactionId,!1),w(e.transactionId)},[O,U,C,e,l,c,w,i.categoryId,i.vendor,i.customer]),_=b.watch(Ee(e.transactionId,"vendor")),E=b.watch(Ee(e.transactionId,"customer")),H=s.useRef(),ee=s.useMemo(()=>O?"vendor":U?"customer":null,[O,U]),me=(j,Z)=>{ee!=null&&d.onAutoCompleteInputChange?.(j,ee),H.current=Z};s.useEffect(()=>{l.entityAutoCompleteView.fetchState==="Completed"&&(O&&H.current?.(ls(l.entityAutoCompleteView)),U&&H.current?.(Ja(l.entityAutoCompleteView)))},[l.entityAutoCompleteView,U,O]);const D=j=>h.filter(Z=>Z.classId===j)[0]?.accountingClassNumber??void 0,re=j=>c.filter(Z=>Z.qboId===j)[0]?.qboId,Q=s.useMemo(()=>{switch(e.recommendedAction.action){case"record_bill_payment":return["record_bill_payment"];case"record_cc_payment":case"record_expense":case"record_transfer":return["record_expense","record_transfer","record_cc_payment"];default:return["record_deposit","record_cc_credit"]}},[e.recommendedAction.action]),te=()=>{k(!1)},we=()=>{M(!1)},ke=()=>{B(!1)};return s.useEffect(()=>{v===!1&&i.categoryId==null&&b.setFocus(Ee(e.transactionId,"category"))},[v]),s.useEffect(()=>{A===!1&&i.classId==null&&b.setFocus(Ee(e.transactionId,"class"))},[A]),s.useEffect(()=>{$===!1&&i.vendor==null&&b.setFocus(Ee(e.transactionId,"vendor"))},[$]),s.useEffect(()=>{T===!1&&i.customer==null&&b.setFocus(Ee(e.transactionId,"customer"))},[T]),s.useEffect(()=>{N===!1&&i.bankAccountId==null&&b.setFocus(Ee(e.transactionId,"bankAccount"))},[N]),s.useEffect(()=>{K===!1&&i.creditCardId==null&&b.setFocus(Ee(e.transactionId,"creditCard"))},[K]),t.jsx(Ut,{...b,children:t.jsx("form",{onSubmit:b.handleSubmit(W),id:Go(e.transactionId),children:t.jsxs(Nc,{children:[t.jsxs(qc,{children:[t.jsxs(Gc,{children:[t.jsxs(Zc,{children:[t.jsx(As,{}),t.jsx(zn,{label:{label:G?ge.review.formLabels.match:ge.review.formLabels.categorize},radioField:{name:Ee(e.transactionId,"match_radio"),id:G?"match":"categorize",value:G?"match":"categorize",checked:!0,style:{width:o.sp3,height:o.sp3,padding:"2px"}},style:{width:"auto"}})]}),t.jsx(Ne,{controller:!G,children:t.jsxs(t.Fragment,{children:[t.jsx(Xo,{}),Q.map(j=>t.jsx(zn,{label:{label:ge.review.formLabels[j]},style:{width:"auto"},isDisabled:"readonly",changeLabelColorInDisableMode:!0,radioField:{name:Ee(e.transactionId,"recommendedActionType"),id:j,value:j,style:{width:o.sp3,height:o.sp3,padding:"2px"}}},j))]})})]}),t.jsxs(Jc,{children:[t.jsx(dn,{variant:"secondary",size:"small",label:ge.review.formLabels.exclude,loading:r[e.transactionId]?.fetchState==="In-Progress","data-testid":z("account-reconciliation-review-exclude-button",e.transactionId),style:{width:o.sp10},reverseSpinnerColor:!1,onClick:()=>{S({reconcileAction:"exclude",excludeTransactionId:e.transactionId})}}),t.jsx(dn,{form:Go(e.transactionId),"data-testid":z("account-reconciliation-review-save-button",e.transactionId),label:pt.footer.save,style:{width:o.sp10},variant:"primary",size:"small",type:"submit",loading:m[e.transactionId]?.fetchState==="In-Progress"})]})]}),t.jsx(Ne,{controller:O||U,children:t.jsxs(Pn,{children:[t.jsx(Ne,{controller:O,children:t.jsx(yt,{onClickAway:()=>{i.vendor==null&&$===!1&&R(!0)},children:t.jsx(Y,{style:{flex:1,padding:g[0],justifyContent:"center"},showHoverEffect:!0,forceHoverEffect:!1,children:t.jsxs(ut,{className:"hover-background",style:{padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(ne,{style:{display:"flex",alignItems:"center",gap:g[1]},children:pt.texts.vendor}),t.jsx(ae,{style:{gap:g[3]},className:"item-value-container",children:t.jsx(t.Fragment,{children:$===!0?t.jsxs(ce,{onClick:j=>{j.stopPropagation(),R(!1)},"data-testid":z("account-reconciliation-review-add-vendor-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:f.colors.champion,cursor:"pointer"},children:[t.jsx(Pt,{}),ge.review.formLabels.addVendor]}):t.jsx(ro,{name:Ee(e.transactionId,"vendor"),allowEmpty:!1,placeholder:ge.review.formLabels.addVendor,valueToId:j=>j,defaultValue:{selectedOption:_?.selectedOption,defaultOptions:_?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:o.sp4})},registerOptions:{required:!0,validate:j=>!!j.selectedOption},loadOptions:me})})})]})})})}),t.jsx(Ne,{controller:U,children:t.jsx(yt,{onClickAway:()=>{i.customer==null&&T===!1&&F(!0)},children:t.jsx(Y,{style:{flex:1,padding:g[0],justifyContent:"center"},showHoverEffect:!0,forceHoverEffect:!1,children:t.jsxs(ut,{className:"hover-background",style:{padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(ne,{style:{display:"flex",alignItems:"center",gap:g[1]},children:pt.texts.customer}),t.jsx(ae,{style:{gap:g[3]},className:"item-value-container",children:t.jsx(t.Fragment,{children:T===!0?t.jsxs(ce,{onClick:j=>{j.stopPropagation(),F(!1)},"data-testid":z("account-reconciliation-review-add-customer-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:f.colors.champion,cursor:"pointer"},children:[t.jsx(Pt,{}),ge.review.formLabels.addCustomer]}):t.jsx(ro,{name:Ee(e.transactionId,"customer"),allowEmpty:!1,placeholder:ge.review.formLabels.addCustomer,valueToId:j=>j,defaultValue:{selectedOption:E?.selectedOption,defaultOptions:E?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:o.sp4})},registerOptions:{required:!0,validate:j=>!!j.selectedOption},loadOptions:me})})})]})})})}),t.jsx(yt,{onClickAway:()=>{i.categoryId==null&&v===!1&&k(!0)},children:t.jsx(Y,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(ut,{className:"hover-background",children:[t.jsx(ne,{style:{display:"flex",alignItems:"center",gap:g[1]},children:pt.texts.category}),t.jsx(ae,{className:"item-value-container",children:t.jsx(t.Fragment,{children:v===!0?t.jsxs(ce,{onClick:j=>{j.stopPropagation(),te()},"data-testid":z("account-reconciliation-review-add-category-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:f.colors.champion,cursor:"pointer"},children:[t.jsx(Pt,{}),ge.review.formLabels.addCategory]}):t.jsx(Qt,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Ee(e.transactionId,"category"),placeholder:ge.review.formLabels.addCategory,valueToId:j=>re(j),defaultValue:{allOptions:he,selectedOption:c.find(j=>j.accountId===i.categoryId)?.qboId},registerOptions:{required:!0,validate:j=>!!j.selectedOption},customStyleConfig:Cn})})})]})})}),t.jsx(yt,{onClickAway:()=>{i.classId==null&&A===!1&&L(!0)},children:t.jsx(Y,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(ut,{className:"hover-background",children:[t.jsx(ne,{style:{display:"flex",alignItems:"center",gap:g[1]},children:pt.texts.class}),t.jsx(ae,{className:"item-value-container",children:t.jsx(t.Fragment,{children:A===!0?t.jsxs(ce,{onClick:j=>{j.stopPropagation(),L(!1)},"data-testid":z("account-reconciliation-review-add-class-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:f.colors.champion,cursor:"pointer"},children:[t.jsx(Pt,{}),ge.review.formLabels.addClass]}):t.jsx(Qt,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Ee(e.transactionId,"class"),placeholder:ge.review.formLabels.addClass,valueToId:j=>D(j),defaultValue:{allOptions:Ce,selectedOption:i.classId},registerOptions:{required:!0,validate:j=>!!j.selectedOption},customStyleConfig:Cn})})})]})})})]})}),t.jsx(Ne,{controller:G,children:t.jsxs(Yc,{children:[t.jsxs(Xc,{children:[t.jsx("span",{className:"matched-text",children:`${ge.review.matchedFoundCount.replace("__count__",e.recommendedAction.recommendedTransactions.length.toString())} `}),ge.review.matchesFoundFullInfo]}),t.jsx(ed,{children:e.recommendedAction.recommendedTransactions.map(j=>j.bookTransactionId!=null?t.jsxs(td,{children:[t.jsx(zn,{label:{label:t.jsxs(Qc,{children:[t.jsx(ze,{children:j.date.format(ks.MMMDCommaYYYYformat)}),t.jsx(ze,{children:j.memo})]})},style:{width:"auto"},isDisabled:void 0,changeLabelColorInDisableMode:!0,radioField:{name:Ee(e.transactionId,"matchedTransaction"),registerOptions:{required:!0},id:j.bookTransactionId,value:j.bookTransactionId,style:{width:o.sp3,height:o.sp3,padding:"2px"}}}),t.jsxs(ad,{"data-testid":z("account-reconciliation-review-matched-transaction-amount",j.bookTransactionId),onClick:()=>{j.bookTransactionId!=null&&I(j.bookTransactionId)},children:[t.jsx(nd,{children:gs("0,0.00",j.amount.amount,j.amount.currencySymbol)}),t.jsx(Xo,{})]})]},j.bookTransactionId):null)})]})}),t.jsx(Ne,{controller:ie,children:t.jsx(Pn,{children:t.jsx(yt,{onClickAway:()=>{i.bankAccountId==null&&N===!1&&M(!0)},children:t.jsx(Y,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(ut,{className:"hover-background",children:[t.jsx(ne,{style:{display:"flex",alignItems:"center",gap:g[1]},children:ge.review.formLabels.transferTo}),t.jsx(ae,{className:"item-value-container",children:t.jsx(t.Fragment,{children:N===!0?t.jsxs(ce,{onClick:j=>{j.stopPropagation(),we()},"data-testid":z("account-reconciliation-review-add-account-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:f.colors.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(Pt,{}),ge.review.formLabels.selectAccount]}):t.jsx(Qt,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Ee(e.transactionId,"bankAccount"),placeholder:ge.review.formLabels.selectAccount,defaultValue:{allOptions:Is(x),selectedOption:i.bankAccountId},registerOptions:{required:!0,validate:j=>!!j.selectedOption},customStyleConfig:Cn})})})]})})})})}),t.jsx(Ne,{controller:ye,children:t.jsx(Pn,{children:t.jsx(yt,{onClickAway:()=>{i.creditCardId==null&&K===!1&&B(!0)},children:t.jsx(Y,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(ut,{className:"hover-background",children:[t.jsx(ne,{style:{display:"flex",alignItems:"center",gap:g[1]},children:ge.review.formLabels.creditCard}),t.jsx(ae,{className:"item-value-container",children:t.jsx(t.Fragment,{children:K===!0?t.jsxs(ce,{onClick:j=>{j.stopPropagation(),ke()},"data-testid":z("account-reconciliation-review-add-credit-card-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:f.colors.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(Pt,{}),ge.review.formLabels.selectCard]}):t.jsx(Qt,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Ee(e.transactionId,"creditCard"),placeholder:ge.review.formLabels.selectCard,defaultValue:{allOptions:$s(y),selectedOption:i.creditCardId},registerOptions:{required:!0,validate:j=>!!j.selectedOption},customStyleConfig:Cn})})})]})})})})}),t.jsx(Ne,{controller:!G,children:t.jsx(Kc,{children:t.jsx(Y,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",width:"100%"},children:t.jsxs(ut,{className:"hover-background",children:[t.jsx(ne,{style:{display:"flex",alignItems:"center",gap:g[1]},children:ge.review.header.memo}),t.jsx(ae,{className:"item-value-container",children:t.jsx(t.Fragment,{children:V===!0?t.jsxs(ce,{onClick:j=>{j.stopPropagation(),J(!1)},"data-testid":z("account-reconciliation-review-add-memo-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:f.colors.champion,cursor:"pointer"},children:[t.jsx(Pt,{}),ge.review.formLabels.addMemo]}):t.jsx(Ga,{name:Ee(e.transactionId,"memo"),placeholder:ge.review.formLabels.addMemo,type:"text",style:{padding:0,textAlign:"left",width:"100%",background:"transparent"}})})})]})})})})]})})})},Cn={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:o.sp4}),singleValue:()=>({margin:0}),menuPortal:()=>({zIndex:9999}),menu:()=>({width:`calc(100% + ${o.sp5})`,marginRight:`-${o.sp3}`,marginLeft:`-${o.sp3}`})},Zo=(e,n,d,c,h,p,i,l)=>{const r=c.find(m=>m.accountId===n.categoryId);return{[rt]:{[e.transactionId]:{category:{selectedOption:r?.qboId,allOptions:d},class:{selectedOption:n?.classId,allOptions:h},bankAccount:{selectedOption:n?.bankAccountId,allOptions:Is(p)},creditCard:{selectedOption:n?.creditCardId,allOptions:$s(i)},memo:n?.memo,recommendedActionType:e.recommendedAction.action,matchedTransaction:n?.matchedTransactionId,vendor:{selectedOption:n?.vendor?.id,defaultOptions:ps(l.entityAutoCompleteView,n?.vendor)},customer:{selectedOption:n?.customer?.id,defaultOptions:tr(n?.customer,l.entityAutoCompleteView)}}}}},Yo=(e,n,d,c)=>{const{vendor:h,customer:p}=e[rt][n.transactionId];let i;if(h.selectedOption!=null){const r=h.defaultOptions.find(m=>m.value===h.selectedOption);if(r!=null)i={id:h.selectedOption,name:r.label};else{const m=d.entityAutoCompleteView.vendor.find(u=>u.id===h.selectedOption||u.zeniId===h.selectedOption);m!=null&&(i={id:m.zeniId,name:m.name})}}let l;if(p.selectedOption!=null){const r=p.defaultOptions.find(m=>m.value===p.selectedOption);if(r!=null)l={id:p.selectedOption,name:r.label};else{const m=d.entityAutoCompleteView.customer.find(u=>u.id===p.selectedOption||u.zeniId===p.selectedOption);m!=null&&(l={id:m.zeniId,name:m.name})}}return{categoryId:c.find(r=>r.qboId===e[rt][n.transactionId].category.selectedOption)?.accountId??e[rt][n.transactionId].category.selectedOption,classId:e[rt][n.transactionId].class.selectedOption,memo:e[rt][n.transactionId].memo,matchedTransactionId:e[rt][n.transactionId].matchedTransaction,vendor:i,bankAccountId:e[rt][n.transactionId].bankAccount.selectedOption,creditCardId:e[rt][n.transactionId].creditCard.selectedOption,customer:l}},Kt=a(ze)`
|
|
579
579
|
display: flex;
|
|
580
580
|
align-items: center;
|
|
581
581
|
column-gap: ${o.sp1};
|
|
@@ -647,12 +647,12 @@ import{o,c7 as Us,q as Se,gr as Ni,gs as Vi,l as q,F as je,j as t,cD as Ws,ab as
|
|
|
647
647
|
flex-direction: row;
|
|
648
648
|
align-items: center;
|
|
649
649
|
column-gap: ${o.sp3};
|
|
650
|
-
`,
|
|
650
|
+
`,Gc=a.div`
|
|
651
651
|
display: flex;
|
|
652
652
|
flex-direction: row;
|
|
653
653
|
align-items: center;
|
|
654
654
|
column-gap: ${o.sp6};
|
|
655
|
-
`,
|
|
655
|
+
`,Zc=a.div`
|
|
656
656
|
display: flex;
|
|
657
657
|
flex-direction: row;
|
|
658
658
|
align-items: center;
|
|
@@ -760,7 +760,7 @@ import{o,c7 as Us,q as Se,gr as Ni,gs as Vi,l as q,F as je,j as t,cD as Ws,ab as
|
|
|
760
760
|
`,wd=a.div`
|
|
761
761
|
width: 100%;
|
|
762
762
|
height: 100%;
|
|
763
|
-
`,{common:bd}=je.getLocalizedStrings();function vd({reconciliation:e,companyId:n,onScroll:d,onReload:c,onReviewClicked:h,setOpenDrawerClicked:p,onFetchLinkTokenClick:i,onEstablishConnectionClick:l,onAddStatementClick:r}){const[m,u]=s.useState(void 0),[x,y]=s.useState(void 0),C=e.plaidConnectionDetails.link_account_no_microdeposit,S=e.plaidConnectionDetails.update_account,w=x==="update_account"?S:C,[I,f]=s.useState(w.linkToken??null),[$,R]=s.useState(!1),{useDynamicConfig:T}=es(),{configValue:F}=T(ts.accountReconGLAccountsConfig),v=s.useCallback(_=>{u(_),y("link_account_no_microdeposit")},[]),k=s.useCallback(_=>{const E=M.current.accountReconciliationsByAccountID[_]?.paymentAccountId;u(_),y("update_account"),i("update_account",E)},[]),A=s.useCallback(_=>{p(_)},[]),L=s.useRef(m),N=s.useRef(x),M=s.useRef(e);s.useEffect(()=>{L.current=m},[m]),s.useEffect(()=>{N.current=x},[x]),s.useEffect(()=>{M.current=e},[e]);const K=s.useCallback(_=>{l(_,L.current??"",N.current),u(void 0),y(void 0),R(!1)},[l]),B=s.useCallback((_,E)=>{_!=null&&console.log("Plaid Connection Error",_,E),u(void 0),y(void 0),R(!1)},[]),{open:V,ready:J}=Aa({token:I,onSuccess:K,onExit:B});s.useEffect(()=>{(q.zeniDate(new Date().toISOString()).isAfter(w.expiration)||w.linkToken==null)&&w.fetchStatus.fetchState==="Not-Started"&&i("link_account_no_microdeposit")},[w.fetchStatus.fetchState]),s.useEffect(()=>{!$&&x!=null&&w.linkToken===I&&w.fetchStatus.fetchState==="Completed"&&J&&R(!0)},[J,I,w.fetchStatus.fetchState,w.linkToken,x,$]),s.useEffect(()=>{w.fetchStatus.fetchState==="Completed"&&w.linkToken!=null&&w.linkToken!==I&&f(w.linkToken)},[w.fetchStatus.fetchState,w.linkToken,I]),s.useEffect(()=>{$&&V()},[$,V]);const[
|
|
763
|
+
`,{common:bd}=je.getLocalizedStrings();function vd({reconciliation:e,companyId:n,onScroll:d,onReload:c,onReviewClicked:h,setOpenDrawerClicked:p,onFetchLinkTokenClick:i,onEstablishConnectionClick:l,onAddStatementClick:r}){const[m,u]=s.useState(void 0),[x,y]=s.useState(void 0),C=e.plaidConnectionDetails.link_account_no_microdeposit,S=e.plaidConnectionDetails.update_account,w=x==="update_account"?S:C,[I,f]=s.useState(w.linkToken??null),[$,R]=s.useState(!1),{useDynamicConfig:T}=es(),{configValue:F}=T(ts.accountReconGLAccountsConfig),v=s.useCallback(_=>{u(_),y("link_account_no_microdeposit")},[]),k=s.useCallback(_=>{const E=M.current.accountReconciliationsByAccountID[_]?.paymentAccountId;u(_),y("update_account"),i("update_account",E)},[]),A=s.useCallback(_=>{p(_)},[]),L=s.useRef(m),N=s.useRef(x),M=s.useRef(e);s.useEffect(()=>{L.current=m},[m]),s.useEffect(()=>{N.current=x},[x]),s.useEffect(()=>{M.current=e},[e]);const K=s.useCallback(_=>{l(_,L.current??"",N.current),u(void 0),y(void 0),R(!1)},[l]),B=s.useCallback((_,E)=>{_!=null&&console.log("Plaid Connection Error",_,E),u(void 0),y(void 0),R(!1)},[]),{open:V,ready:J}=Aa({token:I,onSuccess:K,onExit:B});s.useEffect(()=>{(q.zeniDate(new Date().toISOString()).isAfter(w.expiration)||w.linkToken==null)&&w.fetchStatus.fetchState==="Not-Started"&&i("link_account_no_microdeposit")},[w.fetchStatus.fetchState]),s.useEffect(()=>{!$&&x!=null&&w.linkToken===I&&w.fetchStatus.fetchState==="Completed"&&J&&R(!0)},[J,I,w.fetchStatus.fetchState,w.linkToken,x,$]),s.useEffect(()=>{w.fetchStatus.fetchState==="Completed"&&w.linkToken!=null&&w.linkToken!==I&&f(w.linkToken)},[w.fetchStatus.fetchState,w.linkToken,I]),s.useEffect(()=>{$&&V()},[$,V]);const[G,O]=s.useState(void 0),[ie,ye]=s.useState(void 0),U=q.zeniDate("2025-03-31"),he=1,Ce="account_reconciliation",b=Se(),P=vt(),W=!0;return s.useEffect(()=>{const _={reportId:Ce,mode:"none",displayOrder:"ascending_date",reportFormat:"more_detailed",bookCloseDate:U,firstMonthOfFY:he,filterAccountsWithNilBalances:"off",filterAccountGroupsWithNilBalances:"off",showNegativeAmountInParenthesis:!1,dataAvailable:void 0,accountReconciliationConfig:{selectedDrawerAccountId:e.selectedDrawerAccountId,onReviewClicked:h,onConnectClicked:v,onReconnectClicked:k,onOpenDrawerClicked:A,onStatementAddClicked:r}};if(G==null||!ns(ie,e)){const E=xd(e,_,F,n,W);ye(e),O(E)}else{const E=fd(G,e,_,W);O(E)}},[e]),e.fetchStatus.fetchState==="Error"?t.jsx(yd,{children:t.jsx(Ea,{onReload:c,message:bd.errorMessage.somethingWentWrong})}):t.jsx(Cd,{windowSize:b,children:G!=null?t.jsx(wd,{windowSize:b,children:t.jsx(ys,{backgroundColor:new xo(P.colors.grey4),rootNodes:G,type:"name+balances_actual",compareMode:"compare_mode_percent",isSticky:{isStickyHeader:W,isStickyName:W},treeNodePadding:{left:co.contentPaddingLeft.value(b),right:co.contentPaddingRight.value(b)},nodeOpenStatus:{},scrollPosition:e.reconListUIState.scrollPosition,onCompareModeChanged:()=>{},onScroll:d})}):null})}function Sd({currentFooterFormId:e,vendorSearchAutoCompleteData:n,vendorSearchAutoCompleteActions:d,reconciliation:c,companyId:h,onReconTabColumnSortConfigChanged:p,updateReconReviewTabLocalData:i,onUpdateReconcileTabLocalData:l,setCurrentFooterFormId:r,onReloadReconciliationListPage:m,onReviewClicked:u,onFetchLinkTokenClick:x,onEstablishConnectionClick:y,onAddStatementClick:C,onReconReviewTabColumnSortConfigChanged:S,onSaveReconciliation:w,onSaveReconciliationReview:I,setOpenDrawerClicked:f,onReconMatchedTransactionClick:$,onReconListPageScroll:R}){return c.selectedAccountId==null?t.jsx(vd,{companyId:h,onScroll:R,reconciliation:c,onReload:m,onReviewClicked:u,onFetchLinkTokenClick:x,onEstablishConnectionClick:y,setOpenDrawerClicked:f,onAddStatementClick:C}):t.jsx(cd,{currentFooterFormId:e,setCurrentFooterFormId:r,onUpdateReconcileTabLocalData:l,onReconTabColumnSortConfigChanged:p,reconciliation:c,updateReviewTabLocalData:i,entitySearchAutoCompleteActions:d,onReconReviewTabColumnSortConfigChanged:S,entitySearchAutoCompleteData:n,selectedAccountId:c.selectedAccountId,onSaveReconciliation:w,onSaveReconciliationReview:I,onReconMatchedTransactionClick:$})}function jd({accountAndClassReport:e,numOfBalances:n,title:d,isLastNode:c,isFirstNode:h,config:p,parentNodeIDs:i,ancestorMetadata:l}){let r="";return e.accountBase&&e.classBase?r=`${e.accountBase.accountId}_${e.classBase.classId}`:e.accountBase?r=e.accountBase.accountId:e.classBase&&(r=e.classBase.classId),{children:[],id:mt("flux_vendor_account_class_row",i,r),isLastNode:c,isFirstNode:h,reportElementData:{element:{kind:"flux_vendor_account_class_row",title:d,data:e,metadata:l,numOfBalances:n},config:p}}}function kd({vendorView:e,numOfBalances:n,title:d,isLastNode:c,config:h,parentNodeIDs:p}){const i=mt("flux_vendor_row",p,e.vendor.id),l={children:[],id:i,isLastNode:c,reportElementData:{element:{kind:"flux_vendor_row",title:d,data:e,numOfBalances:n},config:h}},r=e.vendorAccountsAndClasses;return l.children=r.map((m,u)=>jd({accountAndClassReport:m,numOfBalances:n,title:m.accountBase?.accountName??"",config:h,isLastNode:u===r.length-1,isFirstNode:u===0,parentNodeIDs:[...p,i],ancestorMetadata:{accountAndClassRowMetadata:{depth:0,hasSibling:r.length>1,hasChildren:!1,isLastNode:u===r.length-1,isFirstNode:u===0,name:m.accountBase?.accountName},isVendorLastChild:c,vendorId:e.vendor.id}})),l}function Id({section:e,numOfBalances:n,title:d,isLastNode:c,config:h}){const p=e.sectionId,i={children:[],id:p,isLastNode:c,reportElementData:{element:{kind:"section",title:d,data:e,numOfBalances:n,sectionType:e.sectionId},config:h}},l=(e.vendors??[]).map((r,m)=>kd({vendorView:r,numOfBalances:n,title:r.vendor.name,isLastNode:m===e.vendors.length-1,config:h,parentNodeIDs:[p]}));return i.children.push(...l),i}function $d({title:e,balances:n,config:d,nodeId:c}){return{children:[],id:c??mt("headers_loading_in_progress",[],e),isLastNode:!1,reportElementData:{element:{kind:"headers_loading_in_progress",title:"",data:n,numOfBalances:n.length},config:d}}}function Ld({title:e,data:n,isLastNode:d,config:c,numOfBalances:h}){const p=mt("total",[],e);return{children:[],id:p,isLastNode:d,reportElementData:{element:{kind:"total",title:e,data:n,numOfBalances:h},config:c}}}const{common:wn,expenseAutomation:{fluxAnalysis:Td}}=je.getLocalizedStrings(),Ad=(e,n,d=!0)=>{const c=e.sections.generalExpense.balancesByMonth?Object.keys(e.sections.generalExpense.balancesByMonth).length:e.sections.reimbursement.balancesByMonth?Object.keys(e.sections.reimbursement.balancesByMonth).length:2,h=e.sections.generalExpense.balancesByMonth?en(e.sections.generalExpense.balancesByMonth):e.sections.reimbursement.balancesByMonth?en(e.sections.reimbursement.balancesByMonth):[],p=Cs({balances:h,config:n}),i=[],l=e.sections.generalExpense.fetchStatus.fetchState==="In-Progress"&&e.uiState.paginationInfoByGroup.generalExpense.pageToken==null,r=e.sections.generalExpense.fetchStatus.fetchState==="In-Progress"&&e.uiState.paginationInfoByGroup.generalExpense.pageToken!=null||e.sections.reimbursement.fetchStatus.fetchState==="In-Progress";if(l===!0)i.push($d({title:`${wn.loading}`,balances:h,config:n})),[...Array(10)].forEach((m,u)=>{i.push(Fo({title:`${u}+${wn.loading}`,balances:h,config:n}))});else{if(i.push(p),["generalExpense","reimbursement"].forEach(m=>{const u=e.sections[m];if(u.vendors.length>0||u.fetchStatus.fetchState==="Completed"){const x=en(u.balancesByMonth);i.push(Id({section:{sectionId:m,reportId:"flux_analysis_operating_expense",balances:x,vendors:u.vendors,varianceAmount:u.varianceAmount,variancePercentage:u.variancePercentage,currency:e.currency},numOfBalances:c,title:Ed(m),isLastNode:!1,config:n}))}}),e.totalBalancesAndVariance){const m=e.totalBalancesAndVariance.balancesByMonth?en(e.totalBalancesAndVariance.balancesByMonth):[],u=Ld({title:wn.texts.total,data:{balances:m,varianceAmount:e.totalBalancesAndVariance.varianceAmount,variancePercentage:e.totalBalancesAndVariance.variancePercentage,currency:e.currency},config:n,isLastNode:!0,numOfBalances:c});i.push(u)}r===!0&&[...Array(1)].forEach((m,u)=>{i.push(Fo({title:`${u}+${wn.loading}`,balances:h,config:n}))})}return{config:n,headerNodes:d&&!l?[p]:[],contentNodes:i}},Ed=e=>Td.sectionTitle[e];function Rd(e,n,d,c=!0){Object.assign(e.config,n);const h=Dd(d),p=Cs({balances:h,config:n});return{config:n,headerNodes:c?[p]:[],contentNodes:[p,...e.contentNodes.slice(1)]}}const Dd=e=>e.sections.generalExpense.balancesByMonth?en(e.sections.generalExpense.balancesByMonth):e.sections.reimbursement.balancesByMonth?en(e.sections.reimbursement.balancesByMonth):[],uo={contentPaddingLeft:new X(g[0],g[0],g[0]),contentPaddingRight:new X(g[3],g[3],g[8]),wrapperPadding:new X(g[3],g[3],g[8])},Od=a.div`
|
|
764
764
|
display: flex;
|
|
765
765
|
position: sticky;
|
|
766
766
|
width: 100%;
|
|
@@ -771,7 +771,7 @@ import{o,c7 as Us,q as Se,gr as Ni,gs as Vi,l as q,F as je,j as t,cD as Ws,ab as
|
|
|
771
771
|
`,Fd=a.div`
|
|
772
772
|
width: 100%;
|
|
773
773
|
height: calc(100vh - ${o.sp11});
|
|
774
|
-
`,Md=e=>{const{fluxView:n,handleRedirectToVendorDetailPage:d,updateOperatingExpensesIdsForReview:c,updateSectionIdsForReview:h,onSortOrderChanged:p,updateNodeCollapsableStatus:i,fetchReimbursementView:l,fetchGeneralExpenseView:r}=e,m=Se(),u=vt(),[x,y]=s.useState(null),[C,S]=s.useState(null),[w,I]=s.useState(null),f=q.reduceAllFetchState([n.sections.generalExpense.fetchStatus,n.sections.reimbursement.fetchStatus]).fetchState,[$,R]=s.useState(!1),T=Ao(f),F=Ao(n.refreshStatus.fetchState),v=()=>{n.uiState.collapsableStatus.generalExpense?n.uiState.paginationInfoByGroup.generalExpense.hasMore===!0&&n.sections.generalExpense.fetchStatus.fetchState==="Completed"?r(n.uiState.paginationInfoByGroup.generalExpense.pageToken):n.sections.reimbursement.fetchStatus.fetchState==="Not-Started"&&l(n.uiState.paginationInfoByGroup.reimbursement.pageToken):n.uiState.collapsableStatus.reimbursement&&n.uiState.paginationInfoByGroup.reimbursement.hasMore===!0&&n.sections.reimbursement.fetchStatus.fetchState==="Completed"&&l(n.uiState.paginationInfoByGroup.reimbursement.pageToken)},k=()=>Object.keys(n.uiState.collapsableStatus).reduce((B,V)=>(B[V]=n.uiState.collapsableStatus[V],B),{}),A=s.useCallback(B=>{const V=!(n.uiState.collapsableStatus[B]??!0);i({...n.uiState.collapsableStatus,[B]:V})},[n.uiState.collapsableStatus,i]),L=s.useCallback((B,V)=>{let J=n.reviewOperatingExpensesIds;const
|
|
774
|
+
`,Md=e=>{const{fluxView:n,handleRedirectToVendorDetailPage:d,updateOperatingExpensesIdsForReview:c,updateSectionIdsForReview:h,onSortOrderChanged:p,updateNodeCollapsableStatus:i,fetchReimbursementView:l,fetchGeneralExpenseView:r}=e,m=Se(),u=vt(),[x,y]=s.useState(null),[C,S]=s.useState(null),[w,I]=s.useState(null),f=q.reduceAllFetchState([n.sections.generalExpense.fetchStatus,n.sections.reimbursement.fetchStatus]).fetchState,[$,R]=s.useState(!1),T=Ao(f),F=Ao(n.refreshStatus.fetchState),v=()=>{n.uiState.collapsableStatus.generalExpense?n.uiState.paginationInfoByGroup.generalExpense.hasMore===!0&&n.sections.generalExpense.fetchStatus.fetchState==="Completed"?r(n.uiState.paginationInfoByGroup.generalExpense.pageToken):n.sections.reimbursement.fetchStatus.fetchState==="Not-Started"&&l(n.uiState.paginationInfoByGroup.reimbursement.pageToken):n.uiState.collapsableStatus.reimbursement&&n.uiState.paginationInfoByGroup.reimbursement.hasMore===!0&&n.sections.reimbursement.fetchStatus.fetchState==="Completed"&&l(n.uiState.paginationInfoByGroup.reimbursement.pageToken)},k=()=>Object.keys(n.uiState.collapsableStatus).reduce((B,V)=>(B[V]=n.uiState.collapsableStatus[V],B),{}),A=s.useCallback(B=>{const V=!(n.uiState.collapsableStatus[B]??!0);i({...n.uiState.collapsableStatus,[B]:V})},[n.uiState.collapsableStatus,i]),L=s.useCallback((B,V)=>{let J=n.reviewOperatingExpensesIds;const G=[];let O=n.selectedSectionIds;const ie=n.sections[B].vendors;G.push(...ie.map(U=>U.fluxAnalysisEntityId));let ye=fs-J.length;V?(G.forEach(U=>{!J.includes(U)&&ye>0&&(J=[...J,U],ye--)}),O=[...O,B]):(J=J.filter(U=>!G.includes(U)),O=O.filter(U=>U!==B)),c(J),h(O)},[n.reviewOperatingExpensesIds,n.selectedSectionIds,n.sections,c,h]),N=s.useCallback(B=>{const V=n.uiState.collapsableStatus[B]===!1;B==="generalExpense"&&!V&&n.sections.reimbursement.fetchStatus.fetchState==="Not-Started"&&l(n.uiState.paginationInfoByGroup.reimbursement.pageToken),A(B)},[n.uiState.collapsableStatus,n.sections.reimbursement.fetchStatus.fetchState,n.uiState.paginationInfoByGroup.reimbursement.pageToken,l,A]),M=n.sections.generalExpense.vendors.length+n.sections.reimbursement.vendors.length,K=B=>B<M;return s.useEffect(()=>{const B={reportId:"flux_analysis_operating_expense",mode:"none",displayOrder:"ascending_date",reportFormat:"summary",firstMonthOfFY:1,filterAccountsWithNilBalances:"off",filterAccountGroupsWithNilBalances:"off",showNegativeAmountInParenthesis:!1,fluxAnalysisConfig:{sortOrder:n.uiState.sortOrder,sortKey:n.uiState.sortKey,sortOrSearchInProgress:!1,reviewOpExIds:n.reviewOperatingExpensesIds,reviewSectionIds:n.selectedSectionIds,fetchStatus:n.fetchStatus.fetchState,setIsSortApplied:R,onSectionRowClick:N,updateNodeCollapsableStatus:A,updateOperatingExpensesIdsForReview:c,handleRedirectToVendorDetailPage:d,onSectionCheckboxClick:L,onSortOrderChanged:p}};if(x==null||!ns(C,n)){const V=Ad(n,B,!0);S(n),y(V)}else{const V=Rd(x,B,n,!0);y(V)}},[n,C,d,L,N,p,A,c]),t.jsx(Od,{windowSize:m,children:t.jsx(Fd,{children:x?t.jsx(ys,{backgroundColor:new xo(u.colors.grey4),rootNodes:x,type:"name+balances_actual",isSticky:{isStickyHeader:!0,isStickyName:!0},treeNodePadding:{left:uo.contentPaddingLeft.value(m),right:uo.contentPaddingRight.value(m)},nodeOpenStatus:k(),compareMode:"compare_mode_amount",infiniteLoadingProps:{isItemLoaded:K,itemCount:M,loadMoreItems:v},variableNodeHeightTree:{prevFetchState:T??"Not-Started",fetchState:n.fetchStatus.fetchState,isSortApplied:$,setIsSortApplied:R,reducedFetchState:q.reduceAllFetchState([n.sections.generalExpense.fetchStatus,n.sections.reimbursement.fetchStatus]).fetchState,prevRefreshFetchState:F??"Not-Started",refreshFetchState:n.refreshStatus.fetchState},hoveredParentIdProps:{hoveredParentId:w,setHoveredParentId:I}}):null})})},zd="expenseAutomationFluxPage",{reports:{common:Bd}}=je.getLocalizedStrings(),Pd=({selectedPeriod:e,fluxAnalysis:n,onFetchFluxViewList:d,markAsReview:c,onReloadPage:h,setCurrentFooterFormId:p,updateOperatingExpensesIdsForReview:i,updateSectionIdsForReview:l,onUpdateFluxAnalysisUIState:r,redirectToVendorDetailPage:m,fetchFluxViewOnScroll:u,onFetchReimbursementView:x})=>{const{fetchStatus:y,reviewOperatingExpensesIds:C,uiState:S}=n,w=s.useRef(null),I=s.useRef(!1),f=Ht({mode:"all",reValidateMode:"onChange",resetOptions:{keepDefaultValues:!0},defaultValues:_d(C)}),$=Se();s.useEffect(()=>()=>{p("expenseAutomationPage")},[p]),s.useEffect(()=>{I.current&&w?.current?.scrollLeft!=null&&S.scrollPosition?.scrollLeft!==w.current.scrollLeft&&S.scrollPosition!=null&&r({scrollPosition:{scrollTop:S.scrollPosition?.scrollTop,scrollLeft:w.current.scrollLeft}})},[S.scrollPosition?.scrollLeft,w.current?.scrollLeft,S.scrollPosition,r]),s.useEffect(()=>{p(C.length>0?"expenseAutomationFluxPage":"expenseAutomationPage")},[C,p]);const R=k=>{m(k)},T=k=>{u(e,k)},F=(k,A)=>{r({sortOrder:k,sortKey:A}),d(),x(e,null,!1)},v=()=>{const k=Rs(n.sections,C);c(C,k===!0?"review":"unreview",e,!0)};if(y.fetchState==="Error")return t.jsxs(Vd,{children:[t.jsx(Hd,{onClick:h,children:t.jsx(mo,{})}),t.jsx(Ud,{children:Bd.failed})]});{const k=L=>{r({collapsableStatus:L})},A=L=>{x(e,L,!0)};return t.jsx(Ut,{...f,children:t.jsx("form",{id:aa(zd),onSubmit:f.handleSubmit(v),style:{height:"100%",width:"100%"},children:t.jsx(Nd,{windowSize:$,children:t.jsx(Md,{fluxView:n,handleRedirectToVendorDetailPage:R,onSortOrderChanged:F,updateOperatingExpensesIdsForReview:i,updateNodeCollapsableStatus:k,fetchReimbursementView:A,updateSectionIdsForReview:l,fetchGeneralExpenseView:T,reportId:"flux_analysis_operating_expense"})})})})}},Rs=(e,n)=>{const d=[...e.generalExpense.vendors,...e.reimbursement.vendors].filter(h=>h.status==="Pending Review");let c;return d.forEach(h=>{n.includes(h.fluxAnalysisEntityId)&&(c=!0)}),c},_d=e=>({fluxAnalysisRowIds:e}),Nd=a.div`
|
|
775
775
|
display: flex;
|
|
776
776
|
flex: 1 1 auto;
|
|
777
777
|
min-height: 100%;
|
|
@@ -823,7 +823,7 @@ import{o,c7 as Us,q as Se,gr as Ni,gs as Vi,l as q,F as je,j as t,cD as Ws,ab as
|
|
|
823
823
|
`,Ud=a(St)`
|
|
824
824
|
margin-top: ${o.sp3};
|
|
825
825
|
color: ${e=>e.theme.colors.hero};
|
|
826
|
-
`,Wd="expenseAutomationJEAccountSettingsPage",Ds="vendorsAccountSection",qd=e=>`${e}_form`;function Kd({accountSettings:e,currentFooterFormId:n,onSaveJeAccountSettingsClick:d,setIsJeAccountSettingsOpened:c,onJeAccountSettingsChange:h,setResetJeAccountSettingsForm:p,setCurrentFooterFormId:i}){const l=e.prepaidExpensesRecommendations,r=e.fixedAssetsRecommendations,m=e.accruedExpensesRecommendations,u=s.useMemo(()=>Et(e.prepaidExpensesAccountHierarchy,l,"Accounts"),[e.prepaidExpensesAccountHierarchy,l]),x=s.useMemo(()=>Et(e.fixedAssetsAccountHierarchy,r,"Accounts"),[e.fixedAssetsAccountHierarchy,r]),y=s.useMemo(()=>Et(e.accruedExpensesAccountHierarchy,m,"Accounts"),[e.accruedExpensesAccountHierarchy,m]),C=s.useMemo(()=>
|
|
826
|
+
`,Wd="expenseAutomationJEAccountSettingsPage",Ds="vendorsAccountSection",qd=e=>`${e}_form`;function Kd({accountSettings:e,currentFooterFormId:n,onSaveJeAccountSettingsClick:d,setIsJeAccountSettingsOpened:c,onJeAccountSettingsChange:h,setResetJeAccountSettingsForm:p,setCurrentFooterFormId:i}){const l=e.prepaidExpensesRecommendations,r=e.fixedAssetsRecommendations,m=e.accruedExpensesRecommendations,u=s.useMemo(()=>Et(e.prepaidExpensesAccountHierarchy,l,"Accounts"),[e.prepaidExpensesAccountHierarchy,l]),x=s.useMemo(()=>Et(e.fixedAssetsAccountHierarchy,r,"Accounts"),[e.fixedAssetsAccountHierarchy,r]),y=s.useMemo(()=>Et(e.accruedExpensesAccountHierarchy,m,"Accounts"),[e.accruedExpensesAccountHierarchy,m]),C=s.useMemo(()=>Gd(e,u,x,y),[e,u,x,y]),S=Ht({mode:"all",reValidateMode:"onBlur",defaultValues:C,values:C,resetOptions:{keepDefaultValues:!0}}),w=S.handleSubmit(f=>{d(f)}),I=async f=>{h(f)};return s.useEffect(()=>{const f=S.watch($=>{$!=null&&hn(()=>I($))});return()=>{f.unsubscribe()}}),s.useEffect(()=>(p(()=>S.reset),c(!0),()=>{i("expenseAutomationPage"),c(!1)}),[]),s.useEffect(()=>{const{selectedPrepaidExpensesAccountIds:f,previousPrepaidExpensesAccount:$,selectedFixedAssetsAccountIds:R,previousFixedAssetsAccount:T,selectedAccruedExpensesAccountIds:F,previousAccruedExpensesAccount:v}=e.accountSettingsLocalData,k=On(f,$)||On(R,T)||On(F,v);k===!0&&n!="expenseAutomationJEAccountSettingsPage"?i("expenseAutomationJEAccountSettingsPage"):k===!1&&n!=="expenseAutomationPage"&&i("expenseAutomationPage")},[e,n,i]),t.jsx(Jd,{children:t.jsx(Ut,{...S,children:t.jsx("form",{id:qd(Wd),onSubmit:w,children:t.jsx(ar,{showTitle:!1,sectionId:Ds,vendorAccountMappingSection:{accruedExpensesAccountHierarchy:e.accruedExpensesAccountHierarchy,accruedExpensesAccountList:e.accruedExpensesAccountList,accruedExpensesRecommendations:e.accruedExpensesRecommendations,fixedAssetsAccountHierarchy:e.fixedAssetsAccountHierarchy,fixedAssetsAccountList:e.fixedAssetsAccountList,fixedAssetsRecommendations:e.fixedAssetsRecommendations,prepaidExpensesAccountHierarchy:e.prepaidExpensesAccountHierarchy,prepaidExpensesAccountList:e.prepaidExpensesAccountList,prepaidExpensesRecommendations:e.prepaidExpensesRecommendations,selectedAccruedExpensesAccountIds:e.accountSettingsLocalData?.selectedAccruedExpensesAccountIds??[],selectedFixedAssetsAccountIds:e.accountSettingsLocalData?.selectedFixedAssetsAccountIds??[],selectedPrepaidExpensesAccountIds:e.accountSettingsLocalData?.selectedPrepaidExpensesAccountIds??[]},isAccruedExpensesFeatureEnabled:!1})})})})}const Jd=a.div`
|
|
827
827
|
padding-top: ${o.sp3};
|
|
828
828
|
display: flex;
|
|
829
829
|
align-items: center;
|
|
@@ -831,7 +831,7 @@ import{o,c7 as Us,q as Se,gr as Ni,gs as Vi,l as q,F as je,j as t,cD as Ws,ab as
|
|
|
831
831
|
flex-direction: column;
|
|
832
832
|
width: 100%;
|
|
833
833
|
background-color: ${e=>e.theme.colors.grey4};
|
|
834
|
-
`,
|
|
834
|
+
`,Gd=(e,n,d,c)=>{const h=e.prepaidExpensesAccountList.filter(u=>e.accountSettingsLocalData.selectedPrepaidExpensesAccountIds.includes(u.accountId)),p=e.fixedAssetsAccountList.filter(u=>e.accountSettingsLocalData.selectedFixedAssetsAccountIds.includes(u.accountId)),i=e.accruedExpensesAccountList.filter(u=>e.accountSettingsLocalData.selectedAccruedExpensesAccountIds.includes(u.accountId)),l=h.map(u=>u.qboId).filter(u=>u!=null),r=p.map(u=>u.qboId).filter(u=>u!=null),m=i.map(u=>u.qboId).filter(u=>u!=null);return{[Ds]:{prepaidExpensesAccount:{selectedOptions:l,allOptions:n},fixedAssetsAccount:{selectedOptions:r,allOptions:d},accruedExpensesAccount:{selectedOptions:m,allOptions:c}}}},{expenseAutomation:{jeSchedules:$t},common:{currency:bn,review:Zd,ignore:Yd,strings:{hyphen:ft},texts:vn},dateFormat:Xd,timeframe:{month:ti}}=je.getLocalizedStrings(),Qd=({draft:e,ignoreStatus:n,ignoreRecommendedJeSchedule:d,jeScheduleClickHandler:c,onReviewClickHandler:h})=>t.jsxs(ko,{onClick:p=>{e.jeScheduleType!=null&&e.jeScheduleId!=null&&c(p,e.jeScheduleId,e.jeScheduleTransactionKey,e.jeScheduleType)},"data-testid":z("je-schedule-draft-component",e.jeScheduleId),children:[t.jsxs(jo,{children:[t.jsxs($o,{children:[t.jsxs(vo,{children:[t.jsxs(Y,{style:{width:ue.COLUMN_ONE,padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(ne,{children:vn.vendor}),t.jsxs(ae,{style:{gap:g[2]},children:[e.vendor.logo!=null?t.jsx(rs,{photoUrl:e.vendor.logo.href,styles:{width:g[4],height:g[4]}}):t.jsx(cn,{name:e.vendor.name}),t.jsx(fe,{display:"block",placement:"bottom",style:{width:"100%"},title:e.vendor.name!=null?t.jsx(qe,{children:e.vendor.name}):t.jsx(t.Fragment,{}),children:t.jsx(ce,{className:"highlight",children:e.vendor.name??ft})})]})]}),t.jsxs(Y,{children:[t.jsx(ne,{children:$t.scheduleHeaders.scheduleCategory}),t.jsx(ae,{children:t.jsx(fe,{display:"block",placement:"bottom",style:{width:"100%"},title:e.baseTransaction.account.accountName!=null?t.jsx(qe,{children:e.baseTransaction.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(ce,{className:"highlight",children:e.baseTransaction.account.accountName??ft})})})]}),t.jsxs(Y,{style:{width:ue.COLUMN_THREE},children:[t.jsx(ne,{children:$t.scheduleHeaders.startMonth}),t.jsx(ae,{children:t.jsx(ce,{className:"highlight",children:e.startDate?.format(Xd.visual.MMMCommaYYYYFormat)??ft})})]}),t.jsxs(Y,{style:{width:ue.COLUMN_FOUR,paddingLeft:g[3]},children:[t.jsx(ne,{children:$t.scheduleHeaders.period}),t.jsx(ae,{children:t.jsx(ce,{className:"highlight",children:e.period!=null?`${e.period} ${e.period===1?ti.slice(0,-1):ti}`:ft})})]}),t.jsxs(Y,{style:{alignItems:"flex-end",width:ue.COLUMN_FIVE},children:[t.jsx(ne,{children:vn.totalAmount}),t.jsx(ae,{children:t.jsx(fe,{display:"block",placement:"bottom",style:{width:"100%"},title:t.jsx(qe,{children:Ke("0,0.[00]",q.toAmount(e.baseTransaction.amount.amount,bn.currencyCode,bn.currencySymbol))??ft}),children:t.jsx(ce,{className:"highlight",children:Ke("0,0.[00]",q.toAmount(e.baseTransaction.amount.amount,bn.currencyCode,bn.currencySymbol))??ft})})})]})]}),t.jsxs(So,{children:[t.jsxs(Y,{style:{width:ue.COLUMN_ONE,padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(ne,{children:vn.category}),t.jsx(ae,{children:t.jsx(fe,{display:"block",placement:"bottom",style:{width:"100%"},title:e.jeDebit.account?.accountName!=null?t.jsx(qe,{children:e.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(ce,{className:"highlight",children:e.jeDebit.account?.accountName??ft})})})]}),t.jsxs(Y,{children:[t.jsx(ne,{children:vn.classText}),t.jsx(ae,{children:t.jsx(fe,{display:"block",placement:"bottom",style:{width:"100%"},title:e.jeDebit.accountingClass?.className!=null?t.jsx(qe,{children:e.jeDebit.accountingClass.className}):t.jsx(t.Fragment,{}),children:t.jsx(ce,{className:"highlight",children:e.jeDebit.accountingClass?.className??ft})})})]}),t.jsxs(Y,{style:{width:ue.COLUMN_THREE},children:[t.jsx(ne,{children:$t.scheduleHeaders.type}),t.jsx(ae,{children:t.jsx(ce,{className:"highlight",style:{width:"unset"},children:t.jsx(js,{children:$t.scheduleTypes[e.jeScheduleType??"prepaid_expenses"]})})})]}),e.jeScheduleType==="fixed_assets"?t.jsxs(Y,{style:{width:ue.COLUMN_FOUR,paddingLeft:g[3]},children:[t.jsx(ne,{children:$t.scheduleHeaders.accumulatedCategory}),t.jsx(ae,{children:t.jsx(fe,{display:"block",placement:"bottom",title:e.jeCredit.account?.accountName!=null?t.jsx(qe,{children:e.jeCredit.account?.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(ce,{className:"highlight",children:e.jeCredit.account?.accountName??ft})})})]}):null,e.jeScheduleType!=="fixed_assets"?t.jsx(Y,{style:{width:ue.COLUMN_FOUR}}):null,t.jsx(Y,{style:{width:ue.COLUMN_FIVE}})]})]}),t.jsxs(Io,{children:[t.jsx(dn,{onClick:()=>{e.jeScheduleId!=null&&e.jeScheduleType!=null&&h(e.jeScheduleId,e.jeScheduleTransactionKey,e.jeScheduleType)},"data-testid":z("je-schedule-draft-component-review-button",e.jeScheduleId),label:Zd,variant:"primary",size:"small",className:"item-value-container",style:{minWidth:lo}}),t.jsx(dn,{"data-testid":z("je-schedule-draft-component-ignore-button",e.jeScheduleId),className:"item-value-container",label:Yd,size:"small",reverseSpinnerColor:!1,loading:n?.fetchState==="In-Progress",onClick:()=>{e.jeScheduleType!=null&&d(e.jeScheduleTransactionKey,e.jeScheduleType)},style:{minWidth:lo}})]})]}),t.jsxs(Sc,{children:[t.jsx(eu,{}),t.jsx(tu,{children:$t.aiAccountant}),t.jsx(nu,{children:$t.zeniGPTText})]})]}),eu=a(un)`
|
|
835
835
|
height: ${o.sp3};
|
|
836
836
|
width: ${o.sp3};
|
|
837
837
|
margin-right: ${o.sp1};
|
|
@@ -842,7 +842,7 @@ import{o,c7 as Us,q as Se,gr as Ni,gs as Vi,l as q,F as je,j as t,cD as Ws,ab as
|
|
|
842
842
|
color: ${e=>e.theme.colors.brandColorSapphire};
|
|
843
843
|
`,nu=a(ze)`
|
|
844
844
|
color: ${e=>e.theme.colors.primary};
|
|
845
|
-
`,{jeSchedules:{scheduleDetails:{scheduleTransactionsHeader:{addVendor:ni}}},expenseAutomation:{jeSchedules:Pe},common:{currency:dt,retry:ou,strings:{hyphen:We,empty:oi},texts:Zt},dateFormat:ii}=je.getLocalizedStrings(),{common:iu,timeframe:{month:si}}=je.getLocalizedStrings(),tt="jeSchedulePage",ai=e=>`${e}_form`,Lo=(e,n)=>`${e}.${n}`,ri=Lo(tt,"vendor"),li=Lo(tt,"scheduleExpenseCategory"),ci=Lo(tt,"accumulatedDepreciationCategory"),su=({allAccountGroupedOptions:e,allAccountList:n,allClassGroupedOptions:d,allClassList:c,allDepAccountGroupedOptions:h,allDepAccountList:p,draft:i,localData:l,postStatus:r,uncategorizedAccounts:m,vendorSearchAutoCompleteActions:u,vendorSearchAutoCompleteData:x,jeScheduleClickHandler:y,onFormDataChange:C,onPostJESchedule:S})=>{const{updatedAccumulatedDepreciationCategoryID:w,updatedCategoryId:I,updatedVendor:f}=l,$={vendor_deleted:"updatedVendor",debit_category_deleted:"updatedCategoryId",credit_category_deleted:"updatedAccumulatedDepreciationCategoryID",qbo_authorization_error:"jeScheduleID",qbo_book_close_date_error:"jeScheduleID",qbo_error:"jeScheduleID",qbo_invalid_company_status_error:"jeScheduleID"},R=s.useRef(),T=Ht({mode:"all",reValidateMode:"onChange",defaultValues:di(l,e,d,h,n,c,p,x.entityAutoCompleteView),values:di(l,e,d,h,n,c,p,x.entityAutoCompleteView)}),F={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:o.sp4}),menu:()=>({width:300})},v={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:o.sp4}),menu:()=>({width:350})},k=(i?.scheduledJournalEntry.error??[]).every(E=>{const H=$[E];return!(l!=null&&H&&(H==="updatedAccumulatedDepreciationCategoryID"&&l.updatedAccumulatedDepreciationCategoryID==null||H==="updatedCategoryId"&&l.updatedCategoryId==null||H==="updatedVendor"&&(l.updatedVendor?.id==null||l.updatedVendor?.id===""||l.updatedVendor?.name==null||l.updatedVendor?.name==="")))}),A=async(E,H)=>{if(E!=null){const ee=H[tt],{scheduledJournalEntryID:me,vendor:D}=ee;if(E.includes("vendor")){const re=D?.defaultOptions.map(Q=>Q.value);if(D?.selectedOption!=null&&re?.includes(D.selectedOption)!==!0){const Q=x.entityAutoCompleteView.vendor.find(te=>te.id===D.selectedOption);Q!=null&&T.setValue(`${tt}.vendor.defaultOptions`,[{label:Q.name??iu.strings.empty,value:Q.id}])}else D?.selectedOption==null&&D?.defaultOptions.length!==0&&T.setValue(`${tt}.vendor`,{selectedOption:void 0,defaultOptions:[]})}C(me,{...ee,vendor:D})}};s.useEffect(()=>{const E=T.watch((H,{name:ee})=>{ee!=null&&H!=null&&hn(()=>A(ee,H))});return()=>{E.unsubscribe()}}),s.useEffect(()=>{x.entityAutoCompleteView.fetchState==="Completed"&&R.current?.(ls(x.entityAutoCompleteView))},[x.entityAutoCompleteView.fetchState]);const L=T.handleSubmit(()=>{S(i.scheduledJournalEntry.scheduledJournalEntryID,i.jeScheduleTransactionKey)}),N=E=>n.filter(H=>H.qboId===E)[0]?.qboId,M=E=>p.filter(H=>H.qboId===E)[0]?.qboId,K=E=>[m.expense?.qboId,m.income?.qboId].includes(E),B=T.watch("jeSchedulePage.vendor"),V=(E,H)=>{u.onAutoCompleteInputChange?.(E,"vendor"),R.current=H},J=i.scheduledJournalEntry.error?.includes("vendor_deleted")===!0,Z=i.scheduledJournalEntry.error?.includes("debit_category_deleted")===!0,O=i.scheduledJournalEntry.error?.includes("credit_category_deleted")===!0,ie=i.vendor.name.split("(deleted)")[0]?.toString(),ye=i.jeDebit.account?.accountName.split("(deleted)")?.[0]?.toString()??oi,U=i.jeCredit.account?.accountName.split("(deleted)")[0]?.toString()??oi,[he,Ce]=s.useState(Z===!0&&I==null),[b,P]=s.useState(O===!0&&w==null),[W,_]=s.useState(J&&(f?.id==null||f?.id==""));return s.useEffect(()=>{he===!1&&l.updatedCategoryId==null&&T.setFocus(li),b===!1&&l.updatedAccumulatedDepreciationCategoryID==null&&T.setFocus(ci),W===!1&&l.updatedVendor?.id==null&&T.setFocus(ri)},[he,b,W,l,T]),t.jsx(Ut,{...T,children:t.jsx("form",{style:{width:"100%"},id:ai(`${tt}_${i.jeScheduleId}`),onSubmit:L,children:t.jsx(ko,{showBorder:k,onClick:E=>{i.jeScheduleType!=null&&i.jeScheduleId!=null&&y(E,i.jeScheduleId,i.jeScheduleTransactionKey,i.jeScheduleType)},"data-testid":z("je-schedule-resolve-component-schedule",`${tt}_${i.jeScheduleId}`),children:t.jsxs(jo,{children:[t.jsxs($o,{children:[t.jsxs(vo,{children:[J===!0?t.jsx(Y,{style:{width:ue.COLUMN_ONE,padding:g[0],justifyContent:"center"},showHoverEffect:J,forceHoverEffect:W===!1&&(l?.updatedVendor?.id==null||l?.updatedVendor?.id==""),children:t.jsxs(ut,{className:"hover-background",style:{padding:`${o.sp2} ${o.sp3}`},children:[t.jsxs(ne,{style:{display:"flex",alignItems:"center",gap:g[1]},children:[Zt.vendor,t.jsx(fe,{display:"flex",placement:"top-start",title:t.jsx(kn,{children:Pe.tooltipText.missingVendor.replace("_deleted_vendor_",ie)}),children:t.jsx(Nn,{})})]}),t.jsx(ae,{style:{gap:g[3],marginLeft:-2},className:"item-value-container",children:t.jsx(t.Fragment,{children:W===!0?t.jsxs(ce,{onClick:E=>{E.stopPropagation(),_(!1)},"data-testid":z("je-schedule-resolve-component-add-vendor-button",`${tt}_${i.jeScheduleId}`),style:{display:"inline-flex",alignItems:"center",gap:g[2],color:Xe.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(_n,{}),ni]}):t.jsx(ro,{name:ri,placeholder:ni,valueToId:E=>E,defaultValue:{selectedOption:B?.selectedOption,defaultOptions:B?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:o.sp4})},registerOptions:{required:!0,validate:E=>!!E.selectedOption},loadOptions:V})})})]})}):t.jsxs(Y,{style:{width:ue.COLUMN_ONE,padding:`${o.sp2} ${o.sp0} ${o.sp2} ${o.sp3}`},children:[t.jsx(ne,{children:Zt.vendor}),t.jsx(ae,{children:t.jsxs(t.Fragment,{children:[i.vendor.logo?.href!=null?t.jsx(rs,{photoUrl:i.vendor.logo.href,styles:{width:g[4],height:g[4]}}):t.jsx(cn,{name:i.vendor.name}),t.jsx(fe,{display:"block",placement:"bottom",style:{width:"100%"},title:i.vendor.name!==null?t.jsx(qe,{children:i.vendor.name}):t.jsx(t.Fragment,{}),children:t.jsx(ce,{className:"highlight",children:i.vendor.name??We})})]})})]}),t.jsxs(Y,{children:[t.jsx(ne,{children:Pe.scheduleHeaders.scheduleCategory}),t.jsx(ae,{children:t.jsx(fe,{display:"block",placement:"bottom",style:{width:"100%"},title:i.baseTransaction.account.accountName!=null?t.jsx(qe,{children:i.baseTransaction.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(ce,{className:"highlight",children:i.baseTransaction.account.accountName??We})})})]}),t.jsxs(Y,{style:{width:ue.COLUMN_THREE},children:[t.jsx(ne,{children:Pe.scheduleHeaders.startMonth}),t.jsx(ae,{children:t.jsx(ce,{className:"highlight",children:i.startDate?.format(ii.visual.MMMCommaYYYYFormat)??We})})]}),t.jsxs(Y,{style:{width:ue.COLUMN_FOUR,paddingLeft:g[3]},children:[t.jsx(ne,{children:Pe.scheduleHeaders.period}),t.jsx(ae,{children:t.jsx(ce,{className:"highlight",children:i.period!=null?`${i.period} ${i.period===1?si.slice(0,-1):si}`:We})})]}),t.jsxs(Y,{style:{alignItems:"flex-end",width:ue.COLUMN_FIVE},children:[t.jsx(ne,{children:Zt.totalAmount}),t.jsx(ae,{children:t.jsx(fe,{display:"block",placement:"bottom",title:t.jsx(qe,{children:Ke("0,0.[00]",q.toAmount(i.baseTransaction.amount.amount,dt.currencyCode,dt.currencySymbol))??We}),children:t.jsx(ce,{className:"highlight",children:Ke("0,0.[00]",q.toAmount(i.baseTransaction.amount.amount,dt.currencyCode,dt.currencySymbol))??We})})})]})]}),t.jsxs(So,{children:[Z===!0?t.jsx(Y,{showHoverEffect:Z===!0,forceHoverEffect:l?.updatedCategoryId==null&&he===!1,style:{padding:"unset",justifyContent:"center",width:ue.COLUMN_ONE},children:t.jsxs(ut,{className:"hover-background",children:[t.jsxs(ne,{style:{display:"flex",alignItems:"center",gap:g[1]},children:[Zt.category,Z===!0?t.jsx(fe,{display:"flex",placement:"top-start",title:t.jsx(kn,{children:Pe.tooltipText.missingCategory.replace("_deleted_category_",ye)}),children:t.jsx(Nn,{})}):null]}),t.jsx(ae,{className:"item-value-container",style:{marginLeft:Z===!0?-2:0},children:Z===!0?t.jsx(t.Fragment,{children:he===!0?t.jsxs(ce,{onClick:E=>{E.stopPropagation(),Ce(!1)},style:{display:"inline-flex",alignItems:"center",gap:g[1],color:Xe.brandColorGoldDark,cursor:"pointer"},"data-testid":z("je-schedule-resolve-component-add-category-button",`${tt}_${i.jeScheduleId}`),children:[t.jsx(_n,{}),Pe.addCategory]}):t.jsx(Qt,{shouldShowChevronIcon:!1,name:li,placeholder:Pe.addCategory,valueToId:E=>N(E),defaultValue:{allOptions:e},registerOptions:{required:!0,validate:E=>!!E.selectedOption},disableCurrentOption:K,customStyleConfig:F})}):t.jsx(fe,{display:"block",placement:"bottom",style:{width:"100%"},title:i.jeDebit.account?.accountName!=null?t.jsx(qe,{children:i.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(ce,{className:"highlight",children:i.jeDebit.account?.accountName??We})})})]})}):t.jsxs(Y,{style:{width:ue.COLUMN_ONE,padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(ne,{style:{display:"flex",alignItems:"center",gap:g[1]},children:Zt.category}),t.jsx(ae,{className:"item-value-container",children:t.jsx(fe,{display:"block",placement:"bottom",style:{width:"100%"},title:i.jeDebit.account?.accountName!=null?t.jsx(qe,{children:i.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(ce,{className:"highlight",children:i.jeDebit.account?.accountName??We})})})]}),t.jsxs(Y,{children:[t.jsx(ne,{style:{display:"flex",alignItems:"center",gap:g[1]},children:Zt.classText}),t.jsx(ae,{children:t.jsx(fe,{display:"block",placement:"bottom",style:{width:"100%"},title:i.jeDebit.accountingClass?.className!=null?t.jsx(qe,{children:i.jeDebit.accountingClass.className}):t.jsx(t.Fragment,{}),children:t.jsx(ce,{className:"highlight",children:i.jeDebit.accountingClass?.className??We})})})]}),t.jsxs(Y,{style:{width:ue.COLUMN_THREE},children:[t.jsx(ne,{children:Pe.scheduleHeaders.type}),t.jsx(ae,{className:"test",children:t.jsx(ce,{className:"highlight",style:{width:"unset"},children:t.jsx(js,{children:Pe.scheduleTypes[i.jeScheduleType??"prepaid_expenses"]})})})]}),i.jeScheduleType==="fixed_assets"?t.jsx(t.Fragment,{children:O===!0?t.jsx(Y,{style:{width:ue.COLUMN_FOUR,padding:"unset",justifyContent:"center"},showHoverEffect:O,forceHoverEffect:l.updatedAccumulatedDepreciationCategoryID==null&&b===!1,children:t.jsxs(ut,{className:"hover-background",style:{padding:g[2],paddingLeft:g[3]},children:[t.jsxs(ne,{style:{display:"flex",alignItems:"center",gap:g[1]},children:[Pe.scheduleHeaders.accumulatedCategory,O===!0?t.jsx(fe,{display:"flex",placement:"top-end",title:t.jsx(kn,{children:Pe.tooltipText.missingDepCategory.replace("_deleted_dep_category_",U)}),children:t.jsx(Nn,{})}):null]}),t.jsx(ae,{className:"item-value-container",style:{marginLeft:O===!0?-2:0},children:O===!0?t.jsx(t.Fragment,{children:b===!0?t.jsxs(ce,{onClick:E=>{E.stopPropagation(),P(!1)},style:{display:"inline-flex",alignItems:"center",gap:g[1],color:Xe.brandColorGoldDark,cursor:"pointer"},"data-testid":z("je-schedule-resolve-component-add-depreciation-category-button",`${tt}_${i.jeScheduleId}`),children:[t.jsx(_n,{}),Pe.addDepCategory]}):t.jsx(Qt,{shouldShowChevronIcon:!1,showDownChevronWithValue:!1,name:ci,placeholder:Pe.addDepCategory,valueToId:E=>M(E),defaultValue:{allOptions:h},registerOptions:{required:!0,validate:E=>!!E.selectedOption},customStyleConfig:v,disableCurrentOption:K})}):t.jsx(fe,{display:"block",placement:"bottom",title:i.jeCredit.account?.accountName!=null?t.jsx(qe,{children:i.jeCredit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(ce,{className:"highlight",children:i.jeCredit.account?.accountName??We})})})]})}):t.jsxs(Y,{style:{width:ue.COLUMN_FOUR,padding:`${o.sp2} ${o.sp2} ${o.sp2} ${o.sp3}`,justifyContent:"center"},children:[t.jsx(ne,{style:{display:"flex",alignItems:"center",gap:g[1]},children:Pe.scheduleHeaders.accumulatedCategory}),t.jsx(fe,{display:"block",placement:"bottom",title:i.jeCredit.account?.accountName!=null?t.jsx(qe,{children:i.jeCredit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(ce,{className:"highlight",children:i.jeCredit.account?.accountName??We})})]})}):null,i.jeScheduleType!=="fixed_assets"?t.jsx(Y,{style:{width:ue.COLUMN_FOUR}}):null,t.jsx(Y,{style:{width:ue.COLUMN_FIVE}})]}),t.jsxs(bc,{children:[t.jsx(Y,{style:{padding:"unset",width:ue.COLUMN_ONE},children:t.jsxs(vc,{children:[t.jsx(ne,{children:Pe.scheduleHeaders.jePostingDate}),t.jsx(ae,{children:t.jsx(ce,{className:"highlight",children:i.scheduledJournalEntry.expectedPostDate.format(ii.visual.MMMDCommaYYFormat)??We})})]})}),t.jsxs(Y,{children:[t.jsx(ne,{children:Pe.scheduleHeaders.balance}),t.jsx(ae,{children:t.jsx(fe,{display:"block",placement:"bottom",style:{width:"100%"},title:t.jsx(qe,{children:Ke("0,0.[00]",q.toAmount(i?.scheduledJournalEntry?.runningBalance?.amount??0,dt.currencyCode,dt.currencySymbol))??We}),children:t.jsx(ce,{className:"highlight",children:Ke("0,0.[00]",q.toAmount(i?.scheduledJournalEntry?.runningBalance?.amount??0,dt.currencyCode,dt.currencySymbol))??We})})})]}),t.jsxs(Y,{style:{width:ue.COLUMN_THREE},children:[t.jsx(ne,{children:Pe.scheduleHeaders.months}),t.jsx(ae,{children:t.jsxs(ce,{className:"highlight",children:[i.scheduledJournalEntry.expectedPostDate.diff(i.startDate,"month")+1,"/",i.period]})})]}),t.jsx(Y,{style:{width:ue.COLUMN_FOUR}}),t.jsxs(Y,{style:{alignItems:"flex-end",width:ue.COLUMN_FIVE},children:[t.jsx(ne,{children:Pe.scheduleHeaders.amountForMonth}),t.jsx(ae,{children:t.jsx(ce,{className:"highlight",children:Ke("0,0.[00]",q.toAmount(i.scheduledJournalEntry.amount?.amount??0,dt.currencyCode,dt.currencySymbol))??We})})]})]})]}),t.jsx(Io,{children:t.jsx(dn,{form:ai(`${tt}_${i.jeScheduleId}`),label:ou,variant:"primary",className:"item-value-container",type:"submit",loading:r?.fetchState==="In-Progress",size:"small",disabled:!k,style:{minWidth:lo}})})]})})})})},di=(e,n,d,c,h,p,i,l)=>{const r=e.updatedCategoryId,m=e.updatedVendor,u=m!=null?l.vendor.find(I=>I.zeniId===m.id):void 0,x=e.updatedAccumulatedDepreciationCategoryID,y=e.updatedClassId,C=r!=null?h.find(I=>I.accountId===r):void 0,S=x!=null?i.find(I=>I.accountId===x):void 0,w=y!=null?p.find(I=>I.classId===y):void 0;return{[tt]:{jeScheduleID:e.jeScheduleID,scheduledJournalEntryID:e.scheduledJournalEntryID,jeScheduleType:e.jeScheduleType,scheduleExpenseCategory:{selectedOption:C?.qboId,allOptions:n},accumulatedDepreciationCategory:{selectedOption:S?.qboId,allOptions:c},vendor:{selectedOption:u?.id??m?.id,defaultOptions:ps(l,u??m)},scheduleClass:{selectedOption:w?.classId,allOptions:d}}}},_n=a(Dn)`
|
|
845
|
+
`,{jeSchedules:{scheduleDetails:{scheduleTransactionsHeader:{addVendor:ni}}},expenseAutomation:{jeSchedules:Pe},common:{currency:dt,retry:ou,strings:{hyphen:We,empty:oi},texts:Gt},dateFormat:ii}=je.getLocalizedStrings(),{common:iu,timeframe:{month:si}}=je.getLocalizedStrings(),tt="jeSchedulePage",ai=e=>`${e}_form`,Lo=(e,n)=>`${e}.${n}`,ri=Lo(tt,"vendor"),li=Lo(tt,"scheduleExpenseCategory"),ci=Lo(tt,"accumulatedDepreciationCategory"),su=({allAccountGroupedOptions:e,allAccountList:n,allClassGroupedOptions:d,allClassList:c,allDepAccountGroupedOptions:h,allDepAccountList:p,draft:i,localData:l,postStatus:r,uncategorizedAccounts:m,vendorSearchAutoCompleteActions:u,vendorSearchAutoCompleteData:x,jeScheduleClickHandler:y,onFormDataChange:C,onPostJESchedule:S})=>{const{updatedAccumulatedDepreciationCategoryID:w,updatedCategoryId:I,updatedVendor:f}=l,$={vendor_deleted:"updatedVendor",debit_category_deleted:"updatedCategoryId",credit_category_deleted:"updatedAccumulatedDepreciationCategoryID",qbo_authorization_error:"jeScheduleID",qbo_book_close_date_error:"jeScheduleID",qbo_error:"jeScheduleID",qbo_invalid_company_status_error:"jeScheduleID"},R=s.useRef(),T=Ht({mode:"all",reValidateMode:"onChange",defaultValues:di(l,e,d,h,n,c,p,x.entityAutoCompleteView),values:di(l,e,d,h,n,c,p,x.entityAutoCompleteView)}),F={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:o.sp4}),menu:()=>({width:300})},v={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:o.sp4}),menu:()=>({width:350})},k=(i?.scheduledJournalEntry.error??[]).every(E=>{const H=$[E];return!(l!=null&&H&&(H==="updatedAccumulatedDepreciationCategoryID"&&l.updatedAccumulatedDepreciationCategoryID==null||H==="updatedCategoryId"&&l.updatedCategoryId==null||H==="updatedVendor"&&(l.updatedVendor?.id==null||l.updatedVendor?.id===""||l.updatedVendor?.name==null||l.updatedVendor?.name==="")))}),A=async(E,H)=>{if(E!=null){const ee=H[tt],{scheduledJournalEntryID:me,vendor:D}=ee;if(E.includes("vendor")){const re=D?.defaultOptions.map(Q=>Q.value);if(D?.selectedOption!=null&&re?.includes(D.selectedOption)!==!0){const Q=x.entityAutoCompleteView.vendor.find(te=>te.id===D.selectedOption);Q!=null&&T.setValue(`${tt}.vendor.defaultOptions`,[{label:Q.name??iu.strings.empty,value:Q.id}])}else D?.selectedOption==null&&D?.defaultOptions.length!==0&&T.setValue(`${tt}.vendor`,{selectedOption:void 0,defaultOptions:[]})}C(me,{...ee,vendor:D})}};s.useEffect(()=>{const E=T.watch((H,{name:ee})=>{ee!=null&&H!=null&&hn(()=>A(ee,H))});return()=>{E.unsubscribe()}}),s.useEffect(()=>{x.entityAutoCompleteView.fetchState==="Completed"&&R.current?.(ls(x.entityAutoCompleteView))},[x.entityAutoCompleteView.fetchState]);const L=T.handleSubmit(()=>{S(i.scheduledJournalEntry.scheduledJournalEntryID,i.jeScheduleTransactionKey)}),N=E=>n.filter(H=>H.qboId===E)[0]?.qboId,M=E=>p.filter(H=>H.qboId===E)[0]?.qboId,K=E=>[m.expense?.qboId,m.income?.qboId].includes(E),B=T.watch("jeSchedulePage.vendor"),V=(E,H)=>{u.onAutoCompleteInputChange?.(E,"vendor"),R.current=H},J=i.scheduledJournalEntry.error?.includes("vendor_deleted")===!0,G=i.scheduledJournalEntry.error?.includes("debit_category_deleted")===!0,O=i.scheduledJournalEntry.error?.includes("credit_category_deleted")===!0,ie=i.vendor.name.split("(deleted)")[0]?.toString(),ye=i.jeDebit.account?.accountName.split("(deleted)")?.[0]?.toString()??oi,U=i.jeCredit.account?.accountName.split("(deleted)")[0]?.toString()??oi,[he,Ce]=s.useState(G===!0&&I==null),[b,P]=s.useState(O===!0&&w==null),[W,_]=s.useState(J&&(f?.id==null||f?.id==""));return s.useEffect(()=>{he===!1&&l.updatedCategoryId==null&&T.setFocus(li),b===!1&&l.updatedAccumulatedDepreciationCategoryID==null&&T.setFocus(ci),W===!1&&l.updatedVendor?.id==null&&T.setFocus(ri)},[he,b,W,l,T]),t.jsx(Ut,{...T,children:t.jsx("form",{style:{width:"100%"},id:ai(`${tt}_${i.jeScheduleId}`),onSubmit:L,children:t.jsx(ko,{showBorder:k,onClick:E=>{i.jeScheduleType!=null&&i.jeScheduleId!=null&&y(E,i.jeScheduleId,i.jeScheduleTransactionKey,i.jeScheduleType)},"data-testid":z("je-schedule-resolve-component-schedule",`${tt}_${i.jeScheduleId}`),children:t.jsxs(jo,{children:[t.jsxs($o,{children:[t.jsxs(vo,{children:[J===!0?t.jsx(Y,{style:{width:ue.COLUMN_ONE,padding:g[0],justifyContent:"center"},showHoverEffect:J,forceHoverEffect:W===!1&&(l?.updatedVendor?.id==null||l?.updatedVendor?.id==""),children:t.jsxs(ut,{className:"hover-background",style:{padding:`${o.sp2} ${o.sp3}`},children:[t.jsxs(ne,{style:{display:"flex",alignItems:"center",gap:g[1]},children:[Gt.vendor,t.jsx(fe,{display:"flex",placement:"top-start",title:t.jsx(kn,{children:Pe.tooltipText.missingVendor.replace("_deleted_vendor_",ie)}),children:t.jsx(Nn,{})})]}),t.jsx(ae,{style:{gap:g[3],marginLeft:-2},className:"item-value-container",children:t.jsx(t.Fragment,{children:W===!0?t.jsxs(ce,{onClick:E=>{E.stopPropagation(),_(!1)},"data-testid":z("je-schedule-resolve-component-add-vendor-button",`${tt}_${i.jeScheduleId}`),style:{display:"inline-flex",alignItems:"center",gap:g[2],color:Xe.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(_n,{}),ni]}):t.jsx(ro,{name:ri,placeholder:ni,valueToId:E=>E,defaultValue:{selectedOption:B?.selectedOption,defaultOptions:B?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:o.sp4})},registerOptions:{required:!0,validate:E=>!!E.selectedOption},loadOptions:V})})})]})}):t.jsxs(Y,{style:{width:ue.COLUMN_ONE,padding:`${o.sp2} ${o.sp0} ${o.sp2} ${o.sp3}`},children:[t.jsx(ne,{children:Gt.vendor}),t.jsx(ae,{children:t.jsxs(t.Fragment,{children:[i.vendor.logo?.href!=null?t.jsx(rs,{photoUrl:i.vendor.logo.href,styles:{width:g[4],height:g[4]}}):t.jsx(cn,{name:i.vendor.name}),t.jsx(fe,{display:"block",placement:"bottom",style:{width:"100%"},title:i.vendor.name!==null?t.jsx(qe,{children:i.vendor.name}):t.jsx(t.Fragment,{}),children:t.jsx(ce,{className:"highlight",children:i.vendor.name??We})})]})})]}),t.jsxs(Y,{children:[t.jsx(ne,{children:Pe.scheduleHeaders.scheduleCategory}),t.jsx(ae,{children:t.jsx(fe,{display:"block",placement:"bottom",style:{width:"100%"},title:i.baseTransaction.account.accountName!=null?t.jsx(qe,{children:i.baseTransaction.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(ce,{className:"highlight",children:i.baseTransaction.account.accountName??We})})})]}),t.jsxs(Y,{style:{width:ue.COLUMN_THREE},children:[t.jsx(ne,{children:Pe.scheduleHeaders.startMonth}),t.jsx(ae,{children:t.jsx(ce,{className:"highlight",children:i.startDate?.format(ii.visual.MMMCommaYYYYFormat)??We})})]}),t.jsxs(Y,{style:{width:ue.COLUMN_FOUR,paddingLeft:g[3]},children:[t.jsx(ne,{children:Pe.scheduleHeaders.period}),t.jsx(ae,{children:t.jsx(ce,{className:"highlight",children:i.period!=null?`${i.period} ${i.period===1?si.slice(0,-1):si}`:We})})]}),t.jsxs(Y,{style:{alignItems:"flex-end",width:ue.COLUMN_FIVE},children:[t.jsx(ne,{children:Gt.totalAmount}),t.jsx(ae,{children:t.jsx(fe,{display:"block",placement:"bottom",title:t.jsx(qe,{children:Ke("0,0.[00]",q.toAmount(i.baseTransaction.amount.amount,dt.currencyCode,dt.currencySymbol))??We}),children:t.jsx(ce,{className:"highlight",children:Ke("0,0.[00]",q.toAmount(i.baseTransaction.amount.amount,dt.currencyCode,dt.currencySymbol))??We})})})]})]}),t.jsxs(So,{children:[G===!0?t.jsx(Y,{showHoverEffect:G===!0,forceHoverEffect:l?.updatedCategoryId==null&&he===!1,style:{padding:"unset",justifyContent:"center",width:ue.COLUMN_ONE},children:t.jsxs(ut,{className:"hover-background",children:[t.jsxs(ne,{style:{display:"flex",alignItems:"center",gap:g[1]},children:[Gt.category,G===!0?t.jsx(fe,{display:"flex",placement:"top-start",title:t.jsx(kn,{children:Pe.tooltipText.missingCategory.replace("_deleted_category_",ye)}),children:t.jsx(Nn,{})}):null]}),t.jsx(ae,{className:"item-value-container",style:{marginLeft:G===!0?-2:0},children:G===!0?t.jsx(t.Fragment,{children:he===!0?t.jsxs(ce,{onClick:E=>{E.stopPropagation(),Ce(!1)},style:{display:"inline-flex",alignItems:"center",gap:g[1],color:Xe.brandColorGoldDark,cursor:"pointer"},"data-testid":z("je-schedule-resolve-component-add-category-button",`${tt}_${i.jeScheduleId}`),children:[t.jsx(_n,{}),Pe.addCategory]}):t.jsx(Qt,{shouldShowChevronIcon:!1,name:li,placeholder:Pe.addCategory,valueToId:E=>N(E),defaultValue:{allOptions:e},registerOptions:{required:!0,validate:E=>!!E.selectedOption},disableCurrentOption:K,customStyleConfig:F})}):t.jsx(fe,{display:"block",placement:"bottom",style:{width:"100%"},title:i.jeDebit.account?.accountName!=null?t.jsx(qe,{children:i.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(ce,{className:"highlight",children:i.jeDebit.account?.accountName??We})})})]})}):t.jsxs(Y,{style:{width:ue.COLUMN_ONE,padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(ne,{style:{display:"flex",alignItems:"center",gap:g[1]},children:Gt.category}),t.jsx(ae,{className:"item-value-container",children:t.jsx(fe,{display:"block",placement:"bottom",style:{width:"100%"},title:i.jeDebit.account?.accountName!=null?t.jsx(qe,{children:i.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(ce,{className:"highlight",children:i.jeDebit.account?.accountName??We})})})]}),t.jsxs(Y,{children:[t.jsx(ne,{style:{display:"flex",alignItems:"center",gap:g[1]},children:Gt.classText}),t.jsx(ae,{children:t.jsx(fe,{display:"block",placement:"bottom",style:{width:"100%"},title:i.jeDebit.accountingClass?.className!=null?t.jsx(qe,{children:i.jeDebit.accountingClass.className}):t.jsx(t.Fragment,{}),children:t.jsx(ce,{className:"highlight",children:i.jeDebit.accountingClass?.className??We})})})]}),t.jsxs(Y,{style:{width:ue.COLUMN_THREE},children:[t.jsx(ne,{children:Pe.scheduleHeaders.type}),t.jsx(ae,{className:"test",children:t.jsx(ce,{className:"highlight",style:{width:"unset"},children:t.jsx(js,{children:Pe.scheduleTypes[i.jeScheduleType??"prepaid_expenses"]})})})]}),i.jeScheduleType==="fixed_assets"?t.jsx(t.Fragment,{children:O===!0?t.jsx(Y,{style:{width:ue.COLUMN_FOUR,padding:"unset",justifyContent:"center"},showHoverEffect:O,forceHoverEffect:l.updatedAccumulatedDepreciationCategoryID==null&&b===!1,children:t.jsxs(ut,{className:"hover-background",style:{padding:g[2],paddingLeft:g[3]},children:[t.jsxs(ne,{style:{display:"flex",alignItems:"center",gap:g[1]},children:[Pe.scheduleHeaders.accumulatedCategory,O===!0?t.jsx(fe,{display:"flex",placement:"top-end",title:t.jsx(kn,{children:Pe.tooltipText.missingDepCategory.replace("_deleted_dep_category_",U)}),children:t.jsx(Nn,{})}):null]}),t.jsx(ae,{className:"item-value-container",style:{marginLeft:O===!0?-2:0},children:O===!0?t.jsx(t.Fragment,{children:b===!0?t.jsxs(ce,{onClick:E=>{E.stopPropagation(),P(!1)},style:{display:"inline-flex",alignItems:"center",gap:g[1],color:Xe.brandColorGoldDark,cursor:"pointer"},"data-testid":z("je-schedule-resolve-component-add-depreciation-category-button",`${tt}_${i.jeScheduleId}`),children:[t.jsx(_n,{}),Pe.addDepCategory]}):t.jsx(Qt,{shouldShowChevronIcon:!1,showDownChevronWithValue:!1,name:ci,placeholder:Pe.addDepCategory,valueToId:E=>M(E),defaultValue:{allOptions:h},registerOptions:{required:!0,validate:E=>!!E.selectedOption},customStyleConfig:v,disableCurrentOption:K})}):t.jsx(fe,{display:"block",placement:"bottom",title:i.jeCredit.account?.accountName!=null?t.jsx(qe,{children:i.jeCredit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(ce,{className:"highlight",children:i.jeCredit.account?.accountName??We})})})]})}):t.jsxs(Y,{style:{width:ue.COLUMN_FOUR,padding:`${o.sp2} ${o.sp2} ${o.sp2} ${o.sp3}`,justifyContent:"center"},children:[t.jsx(ne,{style:{display:"flex",alignItems:"center",gap:g[1]},children:Pe.scheduleHeaders.accumulatedCategory}),t.jsx(fe,{display:"block",placement:"bottom",title:i.jeCredit.account?.accountName!=null?t.jsx(qe,{children:i.jeCredit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(ce,{className:"highlight",children:i.jeCredit.account?.accountName??We})})]})}):null,i.jeScheduleType!=="fixed_assets"?t.jsx(Y,{style:{width:ue.COLUMN_FOUR}}):null,t.jsx(Y,{style:{width:ue.COLUMN_FIVE}})]}),t.jsxs(bc,{children:[t.jsx(Y,{style:{padding:"unset",width:ue.COLUMN_ONE},children:t.jsxs(vc,{children:[t.jsx(ne,{children:Pe.scheduleHeaders.jePostingDate}),t.jsx(ae,{children:t.jsx(ce,{className:"highlight",children:i.scheduledJournalEntry.expectedPostDate.format(ii.visual.MMMDCommaYYFormat)??We})})]})}),t.jsxs(Y,{children:[t.jsx(ne,{children:Pe.scheduleHeaders.balance}),t.jsx(ae,{children:t.jsx(fe,{display:"block",placement:"bottom",style:{width:"100%"},title:t.jsx(qe,{children:Ke("0,0.[00]",q.toAmount(i?.scheduledJournalEntry?.runningBalance?.amount??0,dt.currencyCode,dt.currencySymbol))??We}),children:t.jsx(ce,{className:"highlight",children:Ke("0,0.[00]",q.toAmount(i?.scheduledJournalEntry?.runningBalance?.amount??0,dt.currencyCode,dt.currencySymbol))??We})})})]}),t.jsxs(Y,{style:{width:ue.COLUMN_THREE},children:[t.jsx(ne,{children:Pe.scheduleHeaders.months}),t.jsx(ae,{children:t.jsxs(ce,{className:"highlight",children:[i.scheduledJournalEntry.expectedPostDate.diff(i.startDate,"month")+1,"/",i.period]})})]}),t.jsx(Y,{style:{width:ue.COLUMN_FOUR}}),t.jsxs(Y,{style:{alignItems:"flex-end",width:ue.COLUMN_FIVE},children:[t.jsx(ne,{children:Pe.scheduleHeaders.amountForMonth}),t.jsx(ae,{children:t.jsx(ce,{className:"highlight",children:Ke("0,0.[00]",q.toAmount(i.scheduledJournalEntry.amount?.amount??0,dt.currencyCode,dt.currencySymbol))??We})})]})]})]}),t.jsx(Io,{children:t.jsx(dn,{form:ai(`${tt}_${i.jeScheduleId}`),label:ou,variant:"primary",className:"item-value-container",type:"submit",loading:r?.fetchState==="In-Progress",size:"small",disabled:!k,style:{minWidth:lo}})})]})})})})},di=(e,n,d,c,h,p,i,l)=>{const r=e.updatedCategoryId,m=e.updatedVendor,u=m!=null?l.vendor.find(I=>I.zeniId===m.id):void 0,x=e.updatedAccumulatedDepreciationCategoryID,y=e.updatedClassId,C=r!=null?h.find(I=>I.accountId===r):void 0,S=x!=null?i.find(I=>I.accountId===x):void 0,w=y!=null?p.find(I=>I.classId===y):void 0;return{[tt]:{jeScheduleID:e.jeScheduleID,scheduledJournalEntryID:e.scheduledJournalEntryID,jeScheduleType:e.jeScheduleType,scheduleExpenseCategory:{selectedOption:C?.qboId,allOptions:n},accumulatedDepreciationCategory:{selectedOption:S?.qboId,allOptions:c},vendor:{selectedOption:u?.id??m?.id,defaultOptions:ps(l,u??m)},scheduleClass:{selectedOption:w?.classId,allOptions:d}}}},_n=a(Dn)`
|
|
846
846
|
width: ${o.sp3};
|
|
847
847
|
height: ${o.sp3};
|
|
848
848
|
`,Nn=a(ms)`
|
|
@@ -1010,7 +1010,7 @@ import{o,c7 as Us,q as Se,gr as Ni,gs as Vi,l as q,F as je,j as t,cD as Ws,ab as
|
|
|
1010
1010
|
min-height: 100%;
|
|
1011
1011
|
flex-direction: column;
|
|
1012
1012
|
row-gap: ${o.sp3};
|
|
1013
|
-
`,{common:
|
|
1013
|
+
`,{common:Gu}=je.getLocalizedStrings(),Zu=({missingReceipts:e,receiptUploadEndpoint:n,authParams:d,selectedPeriod:c,isDisabled:h,onMissingReceiptsRowClick:p,onUploadReceiptComplete:i,onUploadReceiptAttachment:l,onUploadReceiptFetchStatus:r,onUpdateMissingReceiptsUIState:m,onFetchMissingReceiptsList:u})=>{const x=Se(),{fetchState:y,uiState:C,transactions:S}=e,w=s.useRef(null),[I,f]=s.useState(!1);s.useEffect(()=>{w.current?.resetAfterIndex(0)},[x,w]),s.useEffect(()=>{y==="Completed"&&f(!1)},[y]);const $=T=>du,R=(T,F)=>{m({sortOrder:F,sortKey:T})};return t.jsxs(Qu,{children:[t.jsx(eh,{windowSize:x,children:y==="Error"?t.jsxs(nh,{windowSize:x,children:[t.jsx(oh,{onClick:()=>u(),"data-testid":z("missing-receipts-list-table-reload-button"),children:t.jsx(mo,{})}),t.jsx(ih,{children:Gu.reloadPage.label})]}):y==="Completed"&&S.length===0?t.jsx(bt,{tab:"missing_receipts",title:Ue("missing_receipts").allDoneText.title,subTitle:Ue("missing_receipts").allDoneText.subTitle}):y==="Not-Started"||y==="In-Progress"&&S.length===0?t.jsx(qu,{sortConfig:{sortKey:C.sortKey,sortOrder:C.sortOrder},fetchState:y,onColumnSortConfigChanged:R}):t.jsx(th,{windowSize:x,children:t.jsx(Tn,{children:({height:T,width:F})=>t.jsxs(ah,{style:{height:T,width:F},children:[t.jsx(Xu,{children:t.jsx(Ms,{sortConfig:{sortKey:C.sortKey,sortOrder:C.sortOrder},isDisabled:y==="In-Progress"?"readonly":h,onColumnSortConfigChanged:R})}),t.jsx(An,{ref:w,height:T-Fs,itemCount:S.length,itemData:{missingReceipts:e,receiptUploadEndpoint:n,authParams:d,isDisabled:h,selectedPeriod:c,onMissingReceiptsRowClick:p,onUploadReceiptComplete:i,onUploadReceiptAttachment:l,onUploadReceiptFetchStatus:r},itemSize:$,width:F,style:{willChange:"auto"},overscanCount:uu,onScroll:({scrollOffset:v})=>{m({scrollPosition:{scrollTop:v}})},initialScrollOffset:C.scrollPosition?.scrollTop,children:Yu})]})})})}),t.jsx(Ne,{controller:I===!0,children:t.jsx(rh,{children:t.jsx(Qi,{size:"Small",start:!0})})})]})},Yu=({index:e,style:n,data:d})=>{const{missingReceipts:c,receiptUploadEndpoint:h,authParams:p,onMissingReceiptsRowClick:i,onUploadReceiptComplete:l,onUploadReceiptAttachment:r,onUploadReceiptFetchStatus:m,selectedPeriod:u}=d,x=c.transactions[e];return t.jsx(sh,{style:{...n,width:"100%"},children:t.jsx(Bu,{transaction:x,receiptUploadEndpoint:h,authParams:p,selectedPeriod:u,onMissingReceiptsRowClick:i,onUploadReceiptComplete:l,onUploadReceiptAttachment:r,onUploadReceiptFetchStatus:m,uploadReceiptsFetchState:c.uploadReceiptStatusById[x.id]??{fetchState:"Not-Started",error:void 0}},x.id)})},Xu=a.div`
|
|
1014
1014
|
width: auto;
|
|
1015
1015
|
`,Qu=a.div`
|
|
1016
1016
|
width: 100%;
|
|
@@ -1165,9 +1165,9 @@ import{o,c7 as Us,q as Se,gr as Ni,gs as Vi,l as q,F as je,j as t,cD as Ws,ab as
|
|
|
1165
1165
|
right: ${o.sp0};
|
|
1166
1166
|
top: ${o.sp0};
|
|
1167
1167
|
z-index: ${g[2]};
|
|
1168
|
-
min-width: ${
|
|
1168
|
+
min-width: ${Gi}px;
|
|
1169
1169
|
max-width: ${Ji}px;
|
|
1170
|
-
`,$n="monthEndReportFormSection",wi="monthEndReportPage",
|
|
1170
|
+
`,$n="monthEndReportFormSection",wi="monthEndReportPage",Ge=je.getLocalizedStrings();function jh({companyId:e,enableZeniGPTFeature:n,monthEndReportView:d,previewMode:c,customerRequestData:h,allThreadsSectionOpen:p,filterMetaData:i,newThreadMetadata:l,isZeniUser:r,selectedPeriod:m,improveUsingZeniGPTClick:u,onRemoveFileAttachment:x,onUpdateFileAttachment:y,onCloseAllThreadsSection:C,previewMonthEndReport:S,saveMonthEndReport:w,onEditClick:I,onOpenFileAttachmentSnackBar:f,onClickCustomerRequest:$,sendMonthEndReport:R}){const T=vt(),[F,v]=s.useState(),[k,A]=s.useState(0),[L,N]=s.useState(0),M=s.useRef(),K=s.useRef(null),B=s.useRef(null),{html:V,subject:J,improveUsingZeniGPTStatus:G}=d,[O,ie]=s.useState(),[ye,U]=s.useState(!1),[he,Ce]=s.useState(!1),b=s.useRef(null),P=s.useRef(null),W=ra(p,250),_=d.fetchState==="Not-Started"||d.fetchState==="In-Progress"||d.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||d.companyMonthEndReportTemplatesData.fetchState==="In-Progress",{threadsRefs:E,sortedThreads:H,threadsPositions:ee,observer:me,unresolvedThreadsMap:D,handleRemoveFloatingThread:re}=la(i,b,!c,_,r),Q=s.useCallback(()=>{p?P.current!=null&&N(Math.min((P.current.offsetWidth-an-g[4])/2,P.current.offsetWidth-an-Ji-g[4])):P.current!=null&&A(Math.min((P.current.offsetWidth-an-g[4])/2,P.current.offsetWidth-an-Gi-g[4]))},[p]);s.useEffect(()=>{Q()},[p,Q]),s.useEffect(()=>(window.addEventListener("resize",Q),()=>{window.removeEventListener("resize",Q)}),[Q]);const te=r?Ni:Vi,{openThread:we,addThread:ke,setOpenThread:j}=s.useContext(te),Z=ca(To,!1,!c),be=b.current?.getBoundingClientRect(),Me=Z!=null&&Z.coords&&be?{left:Z.coords.left-be.left,top:Z.coords.top-be.top}:void 0,_e=s.useCallback(()=>{const le=window.getSelection()?.getRangeAt(0),oe=da();if(!le||oe==null)return;const ve={...l,...oe,startPath:oe.startPath.join(),endPath:oe.endPath.join()},Ie=`${Zi()}${Ki}`,$e=`cockpit_${e}`;ke(Ie,{type:"thread",id:Ie,roomId:$e,createdAt:new Date,comments:[],metadata:ve,updatedAt:new Date,resolved:!1}),j(Ie)},[ke,e,l,j]);s.useEffect(()=>{we!=null&&p&&C()},[p,we,C]);const Le=G.fetchState==="In-Progress",Ae=Ht({mode:"all",defaultValues:bi(d),values:bi(d)}),pe=Ae.handleSubmit(le=>{const{recipientEmailList:oe,subject:ve}=le[$n];if(c===!0)R?.(O?.id);else{const Ie=F?.replace(ua,Ge.common.strings.empty);oe!=null&&ve!=null&&S(oe,ve,O?.id,Ie!=null&&Ie.length>0?F:void 0)}}),Qe=()=>{K.current!=null&&K.current.click()},Je=()=>{O!==void 0&&O!=null&&(x([O.id]),ie(void 0),U(!1))},et=le=>{const oe=le.target.files?le.target.files[0]:null;if(oe)if(!q.toSupportedAttachmentFileType(oe.type)||he)console.warn("Please select a valid file.");else{const ve=new FileReader;ve.onload=function(Ie){const $e=Ie.target?.result;if(typeof $e=="string"){const st={data:$e.split(",")[1],name:oe.name,id:q.getAttachmentFileIdByFileName(e,oe.name)};ie(st),U(!0),y([st])}},ve.readAsDataURL(oe)}},de=()=>{B.current&&B.current.scrollIntoView({behavior:"smooth"})},Ve=()=>{const le=Ae.getValues(),{recipientEmailList:oe,subject:ve}=le[$n];oe!=null&&ve!=null&&w(oe,ve,O?.id,F)};s.useEffect(()=>{v(d.zeniRequestsHtml)},[d.zeniRequestsHtml]),s.useEffect(()=>{M.current=O},[O]),s.useEffect(()=>{ie(q.mapAttachmentFileToAttachmentFilePayload(d.attachmentFile)),U(!1)},[d.attachmentFile]),s.useEffect(()=>{he&&f()},[he,f]);const it=q.zeniDate(`${m.year}-${m.month}-01`).format(Ge.dateFormat.visual.MMMMFormat),ct=V!=null?V.split(ha):[],Ot=d.concatenatedHtml,jt=()=>d.lastDraftSavedDate!=null&&c===!1?t.jsx(Oa,{time:d.lastDraftSavedDate,user:d.reportLastSavedByUser,timeStampLabel:Ge.cockpit.monthEndReport.timeStampLabel}):null,Ft=()=>r===!0?W?t.jsxs(t.Fragment,{children:[t.jsx(Sh,{allThreadsSectionOpen:p,children:t.jsx(Ra,{autoExpand:!0,autoFocus:!1,style:{borderLeft:`1px solid ${T.colors.grey3}`,boxShadow:`${o.sp0} 1px 2px ${o.sp0} ${Xe.boxShadowElevation}`},drawerSectionStyle:{width:`calc(100% - ${o.sp5} - ${o.sp5})`,backgroundColor:T.colors.background},threadsContainerStyle:{paddingBottom:c?"160px":o.sp12},collapsibleThreadStyle:{width:`calc(100% - ${o.sp4})`},allowComposer:!1,drawerTitle:Ge.common.texts.comments,filter:i,textOverrides:{},preventResolvedThreadClick:!0,onThreadClick:(le,oe)=>{j(oe);const ve=H.findIndex(Ie=>Ie[0]===oe);C(),E.current?.[ve]?.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},onCloseAllThreadsDrawer:()=>C()})}),t.jsx(Un,{availableWidth:k})]}):t.jsx(Da,{observer:me,canvasContainerRef:b,sortedThreads:H,threadsPositions:ee,threadsRefs:E,unresolvedThreadsMap:D,editorMode:!c,style:{minWidth:`${k}px`,position:"relative",height:"fit-content",top:`${b.current?.offsetTop}px`,minHeight:o.sp12},handleRemoveFloatingThread:re}):t.jsx(Un,{availableWidth:k}),kt=(d.zeniRequestsData??[]).length+pa(d.companyMonthEndReportTemplatesData).length;return t.jsxs(t.Fragment,{children:[t.jsxs(uh,{ref:P,children:[t.jsx(Un,{availableWidth:p?L:k}),t.jsxs(dh,{children:[t.jsx(Ut,{...Ae,children:t.jsx("form",{id:vi(wi),onSubmit:pe,children:t.jsxs(wh,{children:[t.jsx(ma,{sectionId:$n,previewMode:c,subject:J}),!c&&kt>0?t.jsx(ga,{totalItems:kt,onClickCustomerRequest:$}):null,t.jsxs(mh,{id:To,ref:b,children:[t.jsxs(gh,{className:"monthEndReportCanvasWrapper",children:[O!=null||he?t.jsx(xh,{"data-testid":z("email-attachment-container"),onClick:de,children:t.jsx(xa,{fileSizeError:he,setFileSizeError:Ce,loading:!1,showAnimation:!c&&ye})}):null,c?t.jsx(Ci,{dangerouslySetInnerHTML:{__html:fa(Ot)}}):t.jsxs(t.Fragment,{children:[t.jsxs(ph,{id:ya,children:[t.jsx(ze,{dangerouslySetInnerHTML:{__html:ct[0]!=null?ct[0]+"</body></html>":Ge.common.strings.empty}}),t.jsxs(hh,{children:[t.jsx(Ch,{children:Ge.cockpit.monthEndReport.editorTitle}),t.jsx(yh,{children:Ge.cockpit.monthEndReport.editorNote})]})]}),t.jsx(fh,{id:Ca,children:t.jsx(wa,{handleFileInputClick:Qe,fileAttached:O!=null,enableZeniGPTFeature:n,isZeniGPTResponseLoading:Le,initialHtmlString:d.zeniRequestsHtml,improveUsingZeniGPTClick:u,setZeniRequestsHtml:v,customerRequestData:h})}),t.jsx(Ci,{id:Yi,dangerouslySetInnerHTML:{__html:ct[1]!=null?"<html><body>"+ct[1]:Ge.common.strings.empty}})]}),O!=null?t.jsx(ba,{ref:B,fileName:O.name,fileSize:va(O.data),onRemove:Je,isRemovable:!c}):null]}),Me?t.jsx(Sa,{style:{zIndex:15},coords:Me,alignment:Z.alignment,onClick:_e}):null,t.jsx(ja,{canvasContainerRef:b,sortedThreads:H,editorMode:!c,isZeniUser:r})]})]})})}),t.jsx(Xi,{name:O?.name??Ge.common.strings.empty,fileRef:K,sizeLimit:ch,acceptableTypes:lh,onFileChange:async le=>{et(le)},onFileSizeError:le=>Ce(le),multiple:!1})]}),Ft()]}),t.jsx(Hi,{style:{zIndex:10},leftSideComponent:jt(),formId:vi(wi),cancelBtn:{isDisabled:Le,label:c===!0?Ge.cockpit.monthEndReport.editButtonLabel:Ge.cockpit.monthEndReport.saveChanges,onClick:c===!0?I:Ve,style:{width:"136px",padding:`${o.sp0} ${o.sp3}`,boxSizing:"border-box"},size:"medium",isLoading:d.saveMonthEndReportStatus.fetchState==="In-Progress",reverseSpinnerColor:!1},primaryBtn:{isDisabled:Le,isLoading:c===!0?d.sendMonthEndReportStatus.fetchState==="In-Progress":d.previewMonthEndReportStatus.fetchState==="In-Progress",style:{width:c===!0?"unset":"136px"},label:c===!0?Ge.cockpit.monthEndReport.sendEmailButtonLabel.replace("__month__",it):Ge.cockpit.monthEndReport.preview,size:"medium"}})]})}const bi=e=>({[$n]:{recipientEmailList:e.recipientEmailList,subject:e.subject??Ge.common.strings.empty}}),vi=e=>`${e}_form`;Tt.smallBold.lineHeightValue;const kh=1,Ih=50,Si=56,$h=["memo"],ji=e=>q.stringToUnionStrict(e,$h),{expenseAutomation:{transactions:{header:{vendors:Lh,category:Th,classText:Ah,date:Eh,type:Rh,amount:Dh,memo:Oh}}}}=je.getLocalizedStrings(),Fh={key:"vendor",value:Lh,sortOrder:"ascending",width:new X(18,18),customStyle:{common:{paddingLeft:g[8]}}},Mh={key:"category",value:Th,sortOrder:"ascending",width:new X(20,20),customStyle:{common:{paddingLeft:g[7]}}},zh={key:"class",value:Ah,sortOrder:"ascending",width:new X(18,18),customStyle:{common:{paddingLeft:g[7]}}},Bh={key:"date",value:Eh,sortOrder:"descending",width:new X(11,11),customStyle:{common:{}}},Ph={key:"transaction_type",value:Rh,sortOrder:"descending",width:new X(13,13),customStyle:{common:{}}},_h={key:"memo",value:Oh,sortOrder:"ascending",width:new X(6,6),customStyle:{common:{}}},Nh={key:"amount",value:Dh,sortOrder:"ascending",width:new X(10,10),customStyle:{common:{paddingRight:g[4]}}},wt=[Fh,Mh,zh,Bh,Ph,_h,Nh],Wn={sortKey:"date",sortOrder:"descending"},Ps=({sortConfig:e,isDisabled:n,onColumnSortConfigChanged:d})=>{const c=Se(),[h,p]=s.useState(Co(wt));s.useEffect(()=>{const r=[...h];for(const m of r)m.key===e.sortKey?m.sortOrder=e.sortOrder:m.sortOrder="ascending";p(r)},[e.sortKey,e.sortOrder]);const i=(r,m)=>{let u=m;e.sortKey===r&&(u=m==="ascending"?"descending":"ascending"),d(r,u)},l=r=>{ji(r.key)==null&&i(q.toTransactionsSortKey(r.key),r.sortOrder)};return t.jsx(Vh,{windowSize:c,"data-testid":z("transaction-categorization-header-container"),children:h.map((r,m)=>{const u=n!=null||ji(r.key)!=null;return t.jsxs(Hh,{sortDataValue:e.sortKey,actualDataValue:r.key,wrapperWidth:r.width,style:r.customStyle?.common,isSortDisabled:u,windowSize:c,isLastItem:m===h.length-1,"data-testid":z("transaction-categorization-header-wrapper",r.key),children:[t.jsxs(Jh,{"data-testid":z("transaction-categorization-header",r.value),onClick:()=>l(r),isSortDisabled:u,children:[t.jsx(Gh,{children:r.value}),u?null:t.jsx(Wh,{sortConfig:e,headerData:r,"data-testid":z("transaction-categorization-sort-icon",r.key),children:t.jsx(Kh,{})})]}),u?null:t.jsx(qh,{isSortDisabled:u,sortDataValue:e.sortKey,isVisible:e.sortKey===r.key&&e.sortKey!==Wn.sortKey,"data-testid":z("transaction-categorization-close-icon",r.key),children:t.jsx(Uh,{onClick:()=>{i(Wn.sortKey,Wn.sortOrder)},"data-testid":z("transaction-categorization-close-icon-button",r.key)})})]},r.key)})})},Vh=a.div`
|
|
1171
1171
|
top: ${o.sp0};
|
|
1172
1172
|
left: ${o.sp0};
|
|
1173
1173
|
height: ${Ih}px;
|
|
@@ -1217,9 +1217,9 @@ import{o,c7 as Us,q as Se,gr as Ni,gs as Vi,l as q,F as je,j as t,cD as Ws,ab as
|
|
|
1217
1217
|
&:hover {
|
|
1218
1218
|
color: ${e=>e.isSortDisabled?e.theme.colors.grey1:e.theme.colors.primary};
|
|
1219
1219
|
}
|
|
1220
|
-
`,
|
|
1220
|
+
`,Gh=a(gt)`
|
|
1221
1221
|
display: flex;
|
|
1222
|
-
`,qn="expenseAutomationTransactionsPage",Vt="transactionCategorizationListTable",Re="account",Ge="class",lt="lineEntitySelection",Gh="lineEntity",Yh="recommendations",_s="lineInfo",Xh="vendorDetails",Qh="customerDetails",Ln="selectedTransactionIds",Lt=(e,n,d)=>`${e}.${d}.${n}`,ep=e=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M21.7995 14.6384L14.7656 21.6723L11.3086 22.3637L12 18.9067L19.0339 11.8728C19.3997 11.5071 19.8958 11.3016 20.413 11.3016C20.9303 11.3016 21.4263 11.5071 21.7922 11.8728L21.7995 11.8811C21.9808 12.062 22.1246 12.2769 22.2227 12.5134C22.3208 12.75 22.3713 13.0036 22.3713 13.2597C22.3713 13.5158 22.3208 13.7694 22.2227 14.006C22.1246 14.2426 21.9808 14.4575 21.7995 14.6384Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M8.54295 19.5981H3.0117C2.82886 19.6026 2.64701 19.57 2.47718 19.5021C2.30735 19.4342 2.15309 19.3325 2.02376 19.2032C1.89444 19.0739 1.79275 18.9196 1.72487 18.7498C1.65699 18.58 1.62433 18.3981 1.62888 18.2153V4.48579C1.61644 4.10613 1.75499 3.73703 2.01419 3.45934C2.27339 3.18165 2.63209 3.01804 3.0117 3.00433H16.8398C17.2194 3.01804 17.5781 3.18165 17.8373 3.45934C18.0965 3.73703 18.2351 4.10613 18.2226 4.48579V8.53558",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M14.055 8.06982L5.80499 8.06982",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M10.305 12.5698L5.80499 12.5698",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),{common:{strings:{underscore:tp,hyphen:ki,empty:Gt}},expenseAutomation:{transactions:Yt},dateFormat:np}=je.getLocalizedStrings(),At={containerPaddingLeftRight:new X(g[3],g[4]),containerPaddingTopBottom:new X(g[1],g[2]),containerPaddingTopBottomEmpty:new X(g[2],g[3]),nameLogoWidth:new X(g[2],g[4]),nameLogoHeight:new X(g[2],g[4])},op=({transactionView:e,transaction:n,sectionId:d,vendorSearchAutoCompleteData:c,vendorSearchAutoCompleteActions:h,selectedTab:p,containerRef:i,isCOTEnabled:l,cotTracking:r,onTransactionCategorizationRowClick:m,setCurrentTransactionInAction:u,vendorLoadOptions:x,openTooltipId:y,setOpenTooltipId:C,isUncategorizedExpenseCategoryEnabled:S})=>{const w=Se(),[I,f]=s.useState(!1),{lineItemById:$,sortedLineItems:R}=n.transactionReviewLocalData,T=n.transactionReviewLocalData.tabSpecificLineItems?.[p]||[],F=R.filter(b=>T.indexOf(b)!==-1),v=[];F.forEach(b=>{v.push($[b])});const{accountList:k,accountsHierarchyList:A,classHierarchyList:L,classList:N,uncategorizedAccounts:M,transactions:K,selectedCheckBoxTransactionIds:B}=e,V=B.includes(n.transactionId),J=vt(),Z={control:()=>({marginLeft:-2,backgroundColor:I?J.colors.background:J.colors.grey5}),valueContainer:()=>({justifyContent:"flex-start",paddingLeft:g[0]}),menu:()=>({width:"150%",background:J.colors.grey5}),singleValue:()=>({color:I||V?J.colors.primary:J.colors.hero,paddingLeft:g[2]}),input:b=>({...b,color:I||V?J.colors.primary:J.colors.hero,textAlign:"left",paddingLeft:g[2]}),menuPortal:b=>({...b,zIndex:10})},O={...Z,singleValue:b=>({...b,color:I||V?J.colors.primary:J.colors.hero}),menu:()=>({marginTop:g[1],marginLeft:-8}),input:b=>({...b,color:I||V?J.colors.primary:J.colors.hero,textAlign:"left"})},ie=K.find(b=>b.id===n.transactionId),ye=(b,P)=>{const{transactionType:W}=P.transactionReviewLocalData;let _=b.target;for(;_;){if(_.classList.contains("select-value-container")||_.classList.contains("item-value-container")||_.classList.contains("grouped-single-select-field__value-container")||_.classList.contains("auto-complete-grouped-creatable-single-custom-group-select-field__option")||_.classList.contains("grouped-single-select-field__input")||_.classList.contains("grouped-single-select-field__menu"))return;_=_.parentElement}W!=null&&m(P.transactionId,W)},U=s.useRef(null),[he,Ce]=s.useState("auto");return s.useEffect(()=>{const b=()=>{if(i.current!=null&&U.current!=null){const P=i.current.getBoundingClientRect(),W=U.current.getBoundingClientRect().top-P.top;Ce(W>285?"top":"bottom")}};return b(),window.addEventListener("resize",b),window.addEventListener("scroll",b),()=>{window.removeEventListener("resize",b),window.removeEventListener("scroll",b)}},[i]),t.jsx(ap,{onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),windowSize:w,isSelected:V,isHovered:I,children:t.jsx(rp,{children:v.map((b,P)=>t.jsx(lp,{ref:U,"data-testid":z("transaction-categorization-list-row",b.lineId),windowSize:w,onClick:W=>ye(W,n),children:t.jsx(ip,{line:b,isHovered:I||V,isSelected:V,lineIndex:P,sectionId:d,transaction:n,currentTransaction:ie,windowSize:w,accountsHierarchyList:A,classHierarchyList:L,allAccountList:k,allClassList:N,uncategorizedAccounts:M,vendorSearchAutoCompleteData:c,vendorSearchAutoCompleteActions:h,setCurrentTransactionInAction:u,vendorLoadOptions:x,customStyle:Z,customStyleAutoComplete:O,recommendations:b.recommendationsWithCOT,selectedTab:p,isCOTEnabled:l,menuPlacement:he,cotTracking:r,openTooltipId:y,setOpenTooltipId:C,isUncategorizedExpenseCategoryEnabled:S})},`${n.transactionId}.${b.lineId}`))},n.transactionId)},n.transactionId)},ip=({accountsHierarchyList:e,allAccountList:n,allClassList:d,classHierarchyList:c,customStyle:h,customStyleAutoComplete:p,line:i,lineIndex:l,transaction:r,currentTransaction:m,windowSize:u,uncategorizedAccounts:x,isHovered:y=!1,isSelected:C=!1,sectionId:S,recommendations:w,vendorSearchAutoCompleteData:I,selectedTab:f,isCOTEnabled:$,menuPlacement:R,cotTracking:T,openTooltipId:F,setCurrentTransactionInAction:v,vendorLoadOptions:k,setOpenTooltipId:A,isUncategorizedExpenseCategoryEnabled:L})=>{const{transactionDate:N,transactionType:M,transactionTypeName:K,memo:B}=r.transactionReviewLocalData,{setValue:V}=fo(),J=s.useCallback((se,xe)=>{T?.onCOTView!=null&&T.onCOTView(i.lineId,r.transactionId,se,xe)},[T,i.lineId,r.transactionId]),Z=Lt(S,lt,l.toString()),O=Lt(S,Re,l.toString()),ie=Lt(S,Ge,l.toString()),ye=(se,xe)=>{let Te;switch(xe){case"vendor":Te=Z;break;case"category":Te=O;break;case"class":Te=ie;break;default:return}V(`${Te}.selectedOption`,se,{shouldValidate:!0,shouldDirty:!0})},U=vt(),he=s.useMemo(()=>m!=null&&q.isVendorTransaction(m)===!0?{id:r.transactionReviewLocalData.customer?.id??"",logo:r.transactionReviewLocalData.customer?.logo,name:r.transactionReviewLocalData.customer?.name??""}:{id:i.customer?.id??"",logo:i.customer?.logo,name:i.customer?.name??""},[m,i.customer?.id,i.customer?.logo,i.customer?.name,r.transactionReviewLocalData.customer?.id,r.transactionReviewLocalData.customer?.logo,r.transactionReviewLocalData.customer?.name]),Ce=s.useMemo(()=>m!=null&&q.isVendorTransaction(m)===!0?{id:r.transactionReviewLocalData.vendor?.id??"",logo:r.transactionReviewLocalData.vendor?.logo,name:r.transactionReviewLocalData.vendor?.name??""}:{id:i.vendor?.id??"",logo:i.vendor?.logo,name:i.vendor?.name??""},[m,i.vendor?.id,i.vendor?.logo,i.vendor?.name,r.transactionReviewLocalData.vendor?.id,r.transactionReviewLocalData.vendor?.logo,r.transactionReviewLocalData.vendor?.name]),b=i[Ge]?.classId,P=i[Re]?.qboId??i[Re]?.accountId,W=he?.id,_=Ce?.id,E=Ce?.name,[H,ee]=s.useState(!b),[me,D]=s.useState(!P||i[Re]?.qboId!=null&&q.isAccountUncategorized(x,i[Re].qboId,L===!0?["income"]:void 0)===!0),[re,Q]=s.useState(!_||!W),te=se=>w?.find(xe=>xe.vendor?.qboId===se||xe.vendor?.id===se||xe.vendor?.name===se)?.vendor?.reason??"",we=r.transactionReviewLocalData.lineItemById[i.lineId]?.recommendationsWithCOT||[],ke=ds(e,we),j=cs(c,we),G=se=>n.filter(xe=>xe.qboId===se)[0]?.qboId,be=se=>d.filter(xe=>xe.classId===se)[0]?.accountingClassNumber??void 0,Me=s.useCallback(se=>q.isAccountUncategorized(x,se,L===!0?["income"]:void 0),[x,L]),[_e,Le]=s.useState(!1),[Ae,pe]=s.useState(!1),[Qe,Je]=s.useState(!1),et=(se,xe)=>{v({transactionId:r.transactionId,lineItemId:i.lineId}),k(se,xe)},de=()=>{Q(!(_||W)),Le(!1)},Ve=()=>{P&&i[Re]?.qboId!=null&&q.isAccountUncategorized(x,i[Re].qboId,L===!0?["income"]:void 0)===!1?D(!1):D(!0),Je(!1)},it=()=>{ee(!b),pe(!1)},ct=()=>{(_||W)&&Le(!0)},Ot=()=>{pe(!0)},jt=()=>{Je(!0)};s.useEffect(()=>{P&&i[Re]?.qboId!=null&&q.isAccountUncategorized(x,i[Re].qboId,L===!0?["income"]:void 0)===!1?D(!1):D(!0)},[P]),s.useEffect(()=>{ee(!b)},[b]),s.useEffect(()=>{Q(!(_||W))},[_,W]);const Ft=r.transactionReviewLocalData.selectedEntity,kt=r.transactionReviewLocalData.lineItemById[i.lineId].selectedEntityLine,le=m!=null&&q.isVendorTransaction(m)===!0?Ft:kt,oe=s.useMemo(()=>{const se=r.transactionReviewLocalData.lineItemById[i.lineId]?.recommendationsWithCOT||[],xe=I.entityAutoCompleteView;return{selectedOption:le?.qboId??le?.id,defaultOptions:go(xe,le,se??[])}},[le,r.transactionReviewLocalData.lineItemById,i.lineId,I.entityAutoCompleteView]),ve=()=>le!=null&&le.logo!=null?t.jsx(as,{photoUrl:le.logo.toString(),styles:{width:At.nameLogoWidth.valuePx(u),height:At.nameLogoHeight.valuePx(u)},fallbackAvatar:t.jsx(Li,{children:t.jsx(cn,{name:le.name,size:o.sp4})})}):le!=null&&le.name!=null?t.jsx(Li,{children:t.jsx(cn,{name:le.name,size:o.sp4})}):null,Ie=(se,xe)=>{if(xe==null||!xe)return;let Te=[];return se.forEach(He=>{Te=Te.concat(He.options)}),Te.find(He=>He.value===xe)?.label??xe},$e=Ie(j,b),st=Ie(ke,P),Be=f==="review",It=Mn("vendor",oe.defaultOptions,oe.selectedOption),ot=Mn("category",ke,P),Wt=Mn("class",j,b),on=()=>wt.map((se,xe)=>{const Te=`${r.transactionId}_${se.key}_${i.lineId}`;if(l>0&&m!=null&&q.isVendorTransaction(m)===!0&&se.key==="vendor")return t.jsx(at,{windowSize:u,wrapperWidth:se.width},Te);if(l>0&&se.key==="transaction_type")return t.jsx(at,{windowSize:u,wrapperWidth:se.width},Te);switch(se.key){case"vendor":default:return t.jsxs(at,{windowSize:u,wrapperWidth:se.width,className:"item-value-container",children:[t.jsx(Kn,{isCOTEnabled:$,recommendations:we,type:"vendor",isFirstColumn:!0,isEnabled:!!le?.isPreFilled,isMisCategorized:It,onRecommendationClick:ye,selectedValue:_,selectedValueLabel:E,isReviewTab:Be,isAccountOptionDisabled:Me,existingOption:{label:m!=null&&q.isVendorTransaction(m)===!0?m?.vendor?.name:void 0,value:m!=null&&q.isVendorTransaction(m)===!0?m?.vendor?.id:void 0},cotTracking:T,lineId:i.lineId,transactionId:r.transactionId,openTooltipId:F,setOpenTooltipId:A}),t.jsx(Xn,{children:re===!0?t.jsx(Gn,{isHovered:y,children:t.jsxs(Jn,{onClick:He=>{He.stopPropagation(),Q(!1),Le(!0)},"data-testid":z("add-vendor-button",S),style:{display:"inline-flex",alignItems:"center",color:Xe.brandColorGoldDark,cursor:"pointer",height:o.sp6},children:[t.jsx(Zn,{}),Yt.addPayee]})}):_e===!0?t.jsx(yt,{onClickAway:de,children:t.jsx(bp,{"data-testid":z("vendor-selection-dropdown-container",Lt(S,lt,l.toString())),children:t.jsx(Ka,{name:Z,placeholder:Yt.addPayee,valueToInfo:te,defaultValue:{selectedOption:oe.selectedOption,defaultOptions:oe.defaultOptions},type:"vendor",autoFocus:!re,style:{width:"100%"},pageSource:"list_page",transactionStatus:Be?"pending_review":"auto_categorized",isOptionRemovable:!1,customStyleConfig:p,menuIsOpen:_e,onMenuClose:de,registerOptions:{required:!1},loadOptions:et,showCOT:$,onCOTView:J,menuPlacement:R})})}):t.jsx(Sp,{children:t.jsxs(Yn,{isHovered:y,showOutline:It&&le?.isPreFilled!==!0&&!C&&Be,children:[ve(),t.jsx(wp,{onClick:ct,"data-testid":z("vendor-name-text",S),children:le!=null&&le.name?t.jsx(nt,{text:le.name,itemTextStyle:{color:y?U.colors.primary:U.colors.hero}}):t.jsx(vp,{children:ki})})]})})})]},Te);case"category":{const He=m?.lines!=null?m?.lines[l]:void 0;return t.jsxs(at,{windowSize:u,wrapperWidth:se.width,className:"item-value-container",children:[t.jsx(Kn,{isCOTEnabled:$,recommendations:we,type:"category",isFirstColumn:!1,isReviewTab:Be,isEnabled:!!i[Re]?.isPreFilled,isAccountOptionDisabled:Me,isMisCategorized:ot,onRecommendationClick:ye,selectedValue:P,selectedValueLabel:st,existingOption:{label:He?.account?.accountName,value:He?.account?.qboId??He?.account?.accountId},cotTracking:T,lineId:i.lineId,transactionId:r.transactionId,openTooltipId:F,setOpenTooltipId:A}),t.jsx(Xn,{children:me===!0?t.jsx(Gn,{isHovered:y,children:t.jsxs(Jn,{onClick:Mt=>{Mt.stopPropagation(),D(!1),Je(!0)},"data-testid":z("category-selection-field",O),style:{display:"inline-flex",alignItems:"center",color:Xe.brandColorGoldDark,cursor:"pointer",height:o.sp6},children:[t.jsx(Zn,{}),Yt.addCategory]})}):Qe===!0?t.jsx(yt,{onClickAway:Ve,children:t.jsx(Ti,{isHovered:y,"data-testid":z("category-selection-dropdown-container",O),children:t.jsx(Mo,{name:O,placeholder:Yt.addCategory,valueToId:Mt=>G(Mt),type:"category",pageSource:"list_page",transactionStatus:Be?"pending_review":"auto_categorized",showCOT:$,defaultValue:{selectedOption:P,allOptions:ke},style:{display:"flex",flexGrow:1,width:"100%",cursor:"inherit"},registerOptions:{required:!1},menuIsOpen:Qe,autoFocus:!me&&(!P||i[Re]?.qboId!=null&&[x.expense?.qboId,x.income?.qboId].includes(i[Re].qboId)),onMenuClose:Ve,customStyleConfig:h,disableCurrentOption:Me,menuPlacement:R,onCOTView:J})})}):t.jsx(Yn,{isHovered:y,showOutline:ot&&i[Re]?.isPreFilled!==!0&&!C&&Be,children:t.jsx(Ai,{onClick:jt,"data-testid":z("category-label-text",O),children:t.jsx(nt,{text:st??"",itemTextStyle:{color:y?U.colors.primary:U.colors.hero}})})})})]},Te)}case"class":{const He=m?.lines!=null?m?.lines[l]:void 0;return t.jsxs(at,{windowSize:u,wrapperWidth:se.width,className:"item-value-container",children:[t.jsx(Kn,{isCOTEnabled:$,recommendations:we,type:"class",isFirstColumn:!1,isReviewTab:Be,isEnabled:!!i[Ge]?.isPreFilled,isAccountOptionDisabled:Me,isMisCategorized:Wt,onRecommendationClick:ye,selectedValue:b,selectedValueLabel:$e,existingOption:{label:He?.class?.className,value:He?.class?.classId},cotTracking:T,lineId:i.lineId,transactionId:r.transactionId,openTooltipId:F,setOpenTooltipId:A}),t.jsx(Xn,{children:H===!0?t.jsx(Gn,{isHovered:y,children:t.jsxs(Jn,{onClick:Mt=>{Mt.stopPropagation(),ee(!1),pe(!0)},"data-testid":z("class-selection-field",ie),style:{display:"inline-flex",alignItems:"center",color:Xe.brandColorGoldDark,cursor:"pointer",height:o.sp6},children:[t.jsx(Zn,{}),Yt.addClass]})}):Ae===!0?t.jsx(yt,{onClickAway:it,children:t.jsx(Ti,{isHovered:y,"data-testid":z("class-selection-dropdown-container",ie),children:t.jsx(Mo,{name:ie,placeholder:Yt.addClass,valueToId:Mt=>be(Mt),type:"class",showCOT:$,defaultValue:{selectedOption:b,allOptions:j},pageSource:"list_page",transactionStatus:Be?"pending_review":"auto_categorized",menuIsOpen:Ae,registerOptions:{required:!1},style:{width:"100%"},autoFocus:!H&&!b,customStyleConfig:h,onMenuClose:it,menuPlacement:R,onCOTView:J})})}):t.jsx(Yn,{isHovered:y,showOutline:Wt&&i[Ge]?.isPreFilled!==!0&&!C&&Be,children:t.jsx(Ai,{"data-testid":z("class-selection-field",ie),onClick:Ot,children:t.jsx(nt,{text:$e??"",itemTextStyle:{color:y?U.colors.primary:U.colors.hero}})})})})]},Te)}case"date":return t.jsx(at,{windowSize:u,wrapperWidth:se.width,children:t.jsx(tn,{windowSize:u,isLastItem:xe===wt.length-1,children:t.jsx(ho,{"data-testid":z("date-field",Lt(S,Ge,l.toString())),children:t.jsx(dp,{style:{color:y?U.colors.primary:U.colors.hero},children:N!=null?N.format(np.visual.MMMDCommaYYYYformat):null})})})},Te);case"transaction_type":return t.jsx(at,{windowSize:u,wrapperWidth:se.width,children:t.jsx(tn,{windowSize:u,"data-testid":z("transaction-type-field",Lt(S,Ge,l.toString())),isLastItem:xe===wt.length-1,children:K!=null?t.jsx(Wa,{textColor:y?new xo(U.colors.primary):qa(void 0,U),text:K??M}):null})},Te);case"memo":return t.jsx(at,{windowSize:u,wrapperWidth:se.width,children:t.jsx(tn,{style:{lineHeight:o.sp3},windowSize:u,isLastItem:xe===wt.length-1,"data-testid":z("memo-field",Lt(S,Ge,l.toString())),children:B&&l==0?t.jsx(fe,{placement:"bottom",title:B,children:t.jsx(hp,{style:{color:y?U.colors.primary:U.colors.hero}})}):l==0?t.jsx(up,{children:ki}):null})},Te);case"amount":{const He=Ke("0,0.[00]",i.amount,!0);return t.jsx(at,{windowSize:u,style:{paddingRight:g[4]},wrapperWidth:se.width,children:t.jsx(tn,{windowSize:u,isLastItem:xe===wt.length-1,children:t.jsx(ho,{"data-testid":z("transaction-amount-field",Lt(S,Ge,l.toString())),style:{color:y?U.colors.primary:U.colors.hero},children:He})})},Te)}}});return t.jsx(t.Fragment,{children:on()})},Ii=({isEnabled:e,isReviewTab:n,isMisCategorized:d,hasRecommendations:c,isTooltipVisible:h=!1})=>e?n?h?t.jsx(gp,{}):t.jsx(pp,{}):h?t.jsx(mp,{}):t.jsx(xp,{className:"ai-icon-selected-plain"}):!e&&d||c?h?t.jsx(yp,{}):t.jsx(fp,{}):null,$i=({isFirstColumn:e,children:n})=>t.jsx(Vs,{isFirstColumn:e,children:n}),Kn=({recommendations:e,isCOTEnabled:n,type:d,isReviewTab:c,selectedValueLabel:h,isFirstColumn:p,isEnabled:i=!1,isMisCategorized:l=!1,selectedValue:r,existingOption:m,cotTracking:u,lineId:x,openTooltipId:y,transactionId:C,isAccountOptionDisabled:S,onRecommendationClick:w,setOpenTooltipId:I})=>{const f=s.useMemo(()=>`${C}:${x}:${d}`,[C,x,d]),$=y===f,R=Ga().analytics,{createAlternateRecommendationCallback:T}=Ya(),F=s.useCallback(K=>{const B=e[1],V=e[0];T(d,{currentValue:h??Gt,transactionCurrentStatus:c?"pending_review":"auto_categorized",transactionPage:"list_page",cotTracking:u?{transactionId:C,lineId:x,onCOTView:(J,Z,O,ie)=>{u.onCOTView?.(J,Z,O,ie)}}:void 0},B,V)(K)},[T,e,h,c,d,u,x,C]),v=Xa(e,d,n,m,"list_page",c?"pending_review":"auto_categorized",w,F,r,S),k=Qa(e,d),A=s.useCallback(()=>{I(f);const K=v?.recommendations[0]?.cot??[],B=v?.recommendations[1]?.cot??[],V=B.length>0;if(R.trackTransactionCotView({recommendationFor:d,currentValue:h??Gt,recommendation:v?.recommendations[0]?.name??Gt,recommendationCot:K,isRecommendationCotAvailable:K.length>0,recommendationReason:v?.recommendations[0]?.reason??Gt,recommendationConfidencePercentage:v?.recommendations[0]?.confidencePercentage??null,recommendationConfidenceLevel:Do(Oo(v?.recommendations[0]?.confidencePercentage).toLocaleLowerCase()),alternativeRecommendation:v?.recommendations[1]?.name??Gt,alternativeRecommendationCot:B,isAlternativeRecommendationCotAvailable:V,alternativeRecommendationReason:v?.recommendations[1]?.reason??Gt,alternativeRecommendationConfidencePercentage:v?.recommendations[1]?.confidencePercentage??null,alternativeRecommendationConfidenceLevel:V?Do(Oo(v?.recommendations[1]?.confidencePercentage).toLocaleLowerCase()):null,transactionCurrentStatus:c?"pending_review":"auto_categorized",transactionPage:"list_page"}),u?.onCOTView!=null){const J=er(v);J!=null&&u.onCOTView(x,C,d,J)}},[R,v,c,h,d,x,C,f,I]),L=s.useCallback(()=>{y===f&&I(void 0)},[y,f,I]),N=s.useMemo(()=>!r||!k?!1:e.some(K=>d==="vendor"&&K.vendor!=null?K.vendor.id===r||K.vendor.qboId===r:d==="category"&&K.account!=null?K.account.qboId===r||K.account.accountId===r:d==="class"&&K.class!=null?K.class.classId===r:!1),[r,k,e,d]);if(!k)return t.jsx(Vs,{isFirstColumn:p});const M=i||N;return v?t.jsx($i,{isFirstColumn:p,children:t.jsx(fe,{variant:"chain-of-thought",data:v,placement:"bottom-start",disableIntersectionObserver:!0,position:"static",display:"block",open:$,style:{width:"auto",height:"auto"},leaveDelay:200,onOpen:A,onClose:L,children:t.jsx(Cp,{children:t.jsx(Ii,{isEnabled:M,isReviewTab:c,isMisCategorized:l,hasRecommendations:k,isTooltipVisible:$})})})}):t.jsx($i,{isFirstColumn:p,children:t.jsx(Ii,{isEnabled:M,isReviewTab:c,isMisCategorized:l,hasRecommendations:k,isTooltipVisible:$})})},Ns=()=>{const e=Se(),n=s.useRef(null),[d,c]=s.useState(0);return s.useLayoutEffect(()=>{n.current&&c(n.current.offsetWidth)},[e]),t.jsx(sp,{windowSize:e,ref:n,children:wt.map((h,p)=>{const i=`${p}${tp}${h.key}`;switch(h.key){case"vendor":return t.jsx(at,{windowSize:e,wrapperWidth:h.width,children:t.jsx(tn,{windowSize:e,isLastItem:p===wt.length-1,children:t.jsxs(ho,{children:[t.jsx(yo,{width:g[4],height:g[4]}),t.jsx(Rt,{width:d*h.width.value(e)/100,height:g[4],style:{display:"flex",alignItems:"center"}})]})})},i);default:return t.jsx(at,{windowSize:e,wrapperWidth:h.width,children:t.jsx(tn,{windowSize:e,isLastItem:p===wt.length-1,children:t.jsx(Rt,{width:d*h.width.value(e)/100,height:g[4],style:{display:"flex",alignItems:"center"}})})},i)}})})},sp=a.div`
|
|
1222
|
+
`,qn="expenseAutomationTransactionsPage",Vt="transactionCategorizationListTable",Re="account",Ze="class",lt="lineEntitySelection",Zh="lineEntity",Yh="recommendations",_s="lineInfo",Xh="vendorDetails",Qh="customerDetails",Ln="selectedTransactionIds",Lt=(e,n,d)=>`${e}.${d}.${n}`,ep=e=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M21.7995 14.6384L14.7656 21.6723L11.3086 22.3637L12 18.9067L19.0339 11.8728C19.3997 11.5071 19.8958 11.3016 20.413 11.3016C20.9303 11.3016 21.4263 11.5071 21.7922 11.8728L21.7995 11.8811C21.9808 12.062 22.1246 12.2769 22.2227 12.5134C22.3208 12.75 22.3713 13.0036 22.3713 13.2597C22.3713 13.5158 22.3208 13.7694 22.2227 14.006C22.1246 14.2426 21.9808 14.4575 21.7995 14.6384Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M8.54295 19.5981H3.0117C2.82886 19.6026 2.64701 19.57 2.47718 19.5021C2.30735 19.4342 2.15309 19.3325 2.02376 19.2032C1.89444 19.0739 1.79275 18.9196 1.72487 18.7498C1.65699 18.58 1.62433 18.3981 1.62888 18.2153V4.48579C1.61644 4.10613 1.75499 3.73703 2.01419 3.45934C2.27339 3.18165 2.63209 3.01804 3.0117 3.00433H16.8398C17.2194 3.01804 17.5781 3.18165 17.8373 3.45934C18.0965 3.73703 18.2351 4.10613 18.2226 4.48579V8.53558",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M14.055 8.06982L5.80499 8.06982",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M10.305 12.5698L5.80499 12.5698",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),{common:{strings:{underscore:tp,hyphen:ki,empty:Zt}},expenseAutomation:{transactions:Yt},dateFormat:np}=je.getLocalizedStrings(),At={containerPaddingLeftRight:new X(g[3],g[4]),containerPaddingTopBottom:new X(g[1],g[2]),containerPaddingTopBottomEmpty:new X(g[2],g[3]),nameLogoWidth:new X(g[2],g[4]),nameLogoHeight:new X(g[2],g[4])},op=({transactionView:e,transaction:n,sectionId:d,vendorSearchAutoCompleteData:c,vendorSearchAutoCompleteActions:h,selectedTab:p,containerRef:i,isCOTEnabled:l,cotTracking:r,onTransactionCategorizationRowClick:m,setCurrentTransactionInAction:u,vendorLoadOptions:x,openTooltipId:y,setOpenTooltipId:C,isUncategorizedExpenseCategoryEnabled:S})=>{const w=Se(),[I,f]=s.useState(!1),{lineItemById:$,sortedLineItems:R}=n.transactionReviewLocalData,T=n.transactionReviewLocalData.tabSpecificLineItems?.[p]||[],F=R.filter(b=>T.indexOf(b)!==-1),v=[];F.forEach(b=>{v.push($[b])});const{accountList:k,accountsHierarchyList:A,classHierarchyList:L,classList:N,uncategorizedAccounts:M,transactions:K,selectedCheckBoxTransactionIds:B}=e,V=B.includes(n.transactionId),J=vt(),G={control:()=>({marginLeft:-2,backgroundColor:I?J.colors.background:J.colors.grey5}),valueContainer:()=>({justifyContent:"flex-start",paddingLeft:g[0]}),menu:()=>({width:"150%",background:J.colors.grey5}),singleValue:()=>({color:I||V?J.colors.primary:J.colors.hero,paddingLeft:g[2]}),input:b=>({...b,color:I||V?J.colors.primary:J.colors.hero,textAlign:"left",paddingLeft:g[2]}),menuPortal:b=>({...b,zIndex:10})},O={...G,singleValue:b=>({...b,color:I||V?J.colors.primary:J.colors.hero}),menu:()=>({marginTop:g[1],marginLeft:-8}),input:b=>({...b,color:I||V?J.colors.primary:J.colors.hero,textAlign:"left"})},ie=K.find(b=>b.id===n.transactionId),ye=(b,P)=>{const{transactionType:W}=P.transactionReviewLocalData;let _=b.target;for(;_;){if(_.classList.contains("select-value-container")||_.classList.contains("item-value-container")||_.classList.contains("grouped-single-select-field__value-container")||_.classList.contains("auto-complete-grouped-creatable-single-custom-group-select-field__option")||_.classList.contains("grouped-single-select-field__input")||_.classList.contains("grouped-single-select-field__menu"))return;_=_.parentElement}W!=null&&m(P.transactionId,W)},U=s.useRef(null),[he,Ce]=s.useState("auto");return s.useEffect(()=>{const b=()=>{if(i.current!=null&&U.current!=null){const P=i.current.getBoundingClientRect(),W=U.current.getBoundingClientRect().top-P.top;Ce(W>285?"top":"bottom")}};return b(),window.addEventListener("resize",b),window.addEventListener("scroll",b),()=>{window.removeEventListener("resize",b),window.removeEventListener("scroll",b)}},[i]),t.jsx(ap,{onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),windowSize:w,isSelected:V,isHovered:I,children:t.jsx(rp,{children:v.map((b,P)=>t.jsx(lp,{ref:U,"data-testid":z("transaction-categorization-list-row",b.lineId),windowSize:w,onClick:W=>ye(W,n),children:t.jsx(ip,{line:b,isHovered:I||V,isSelected:V,lineIndex:P,sectionId:d,transaction:n,currentTransaction:ie,windowSize:w,accountsHierarchyList:A,classHierarchyList:L,allAccountList:k,allClassList:N,uncategorizedAccounts:M,vendorSearchAutoCompleteData:c,vendorSearchAutoCompleteActions:h,setCurrentTransactionInAction:u,vendorLoadOptions:x,customStyle:G,customStyleAutoComplete:O,recommendations:b.recommendationsWithCOT,selectedTab:p,isCOTEnabled:l,menuPlacement:he,cotTracking:r,openTooltipId:y,setOpenTooltipId:C,isUncategorizedExpenseCategoryEnabled:S})},`${n.transactionId}.${b.lineId}`))},n.transactionId)},n.transactionId)},ip=({accountsHierarchyList:e,allAccountList:n,allClassList:d,classHierarchyList:c,customStyle:h,customStyleAutoComplete:p,line:i,lineIndex:l,transaction:r,currentTransaction:m,windowSize:u,uncategorizedAccounts:x,isHovered:y=!1,isSelected:C=!1,sectionId:S,recommendations:w,vendorSearchAutoCompleteData:I,selectedTab:f,isCOTEnabled:$,menuPlacement:R,cotTracking:T,openTooltipId:F,setCurrentTransactionInAction:v,vendorLoadOptions:k,setOpenTooltipId:A,isUncategorizedExpenseCategoryEnabled:L})=>{const{transactionDate:N,transactionType:M,transactionTypeName:K,memo:B}=r.transactionReviewLocalData,{setValue:V}=fo(),J=s.useCallback((se,xe)=>{T?.onCOTView!=null&&T.onCOTView(i.lineId,r.transactionId,se,xe)},[T,i.lineId,r.transactionId]),G=Lt(S,lt,l.toString()),O=Lt(S,Re,l.toString()),ie=Lt(S,Ze,l.toString()),ye=(se,xe)=>{let Te;switch(xe){case"vendor":Te=G;break;case"category":Te=O;break;case"class":Te=ie;break;default:return}V(`${Te}.selectedOption`,se,{shouldValidate:!0,shouldDirty:!0})},U=vt(),he=s.useMemo(()=>m!=null&&q.isVendorTransaction(m)===!0?{id:r.transactionReviewLocalData.customer?.id??"",logo:r.transactionReviewLocalData.customer?.logo,name:r.transactionReviewLocalData.customer?.name??""}:{id:i.customer?.id??"",logo:i.customer?.logo,name:i.customer?.name??""},[m,i.customer?.id,i.customer?.logo,i.customer?.name,r.transactionReviewLocalData.customer?.id,r.transactionReviewLocalData.customer?.logo,r.transactionReviewLocalData.customer?.name]),Ce=s.useMemo(()=>m!=null&&q.isVendorTransaction(m)===!0?{id:r.transactionReviewLocalData.vendor?.id??"",logo:r.transactionReviewLocalData.vendor?.logo,name:r.transactionReviewLocalData.vendor?.name??""}:{id:i.vendor?.id??"",logo:i.vendor?.logo,name:i.vendor?.name??""},[m,i.vendor?.id,i.vendor?.logo,i.vendor?.name,r.transactionReviewLocalData.vendor?.id,r.transactionReviewLocalData.vendor?.logo,r.transactionReviewLocalData.vendor?.name]),b=i[Ze]?.classId,P=i[Re]?.qboId??i[Re]?.accountId,W=he?.id,_=Ce?.id,E=Ce?.name,[H,ee]=s.useState(!b),[me,D]=s.useState(!P||i[Re]?.qboId!=null&&q.isAccountUncategorized(x,i[Re].qboId,L===!0?["income"]:void 0)===!0),[re,Q]=s.useState(!_||!W),te=se=>w?.find(xe=>xe.vendor?.qboId===se||xe.vendor?.id===se||xe.vendor?.name===se)?.vendor?.reason??"",we=r.transactionReviewLocalData.lineItemById[i.lineId]?.recommendationsWithCOT||[],ke=ds(e,we),j=cs(c,we),Z=se=>n.filter(xe=>xe.qboId===se)[0]?.qboId,be=se=>d.filter(xe=>xe.classId===se)[0]?.accountingClassNumber??void 0,Me=s.useCallback(se=>q.isAccountUncategorized(x,se,L===!0?["income"]:void 0),[x,L]),[_e,Le]=s.useState(!1),[Ae,pe]=s.useState(!1),[Qe,Je]=s.useState(!1),et=(se,xe)=>{v({transactionId:r.transactionId,lineItemId:i.lineId}),k(se,xe)},de=()=>{Q(!(_||W)),Le(!1)},Ve=()=>{P&&i[Re]?.qboId!=null&&q.isAccountUncategorized(x,i[Re].qboId,L===!0?["income"]:void 0)===!1?D(!1):D(!0),Je(!1)},it=()=>{ee(!b),pe(!1)},ct=()=>{(_||W)&&Le(!0)},Ot=()=>{pe(!0)},jt=()=>{Je(!0)};s.useEffect(()=>{P&&i[Re]?.qboId!=null&&q.isAccountUncategorized(x,i[Re].qboId,L===!0?["income"]:void 0)===!1?D(!1):D(!0)},[P]),s.useEffect(()=>{ee(!b)},[b]),s.useEffect(()=>{Q(!(_||W))},[_,W]);const Ft=r.transactionReviewLocalData.selectedEntity,kt=r.transactionReviewLocalData.lineItemById[i.lineId].selectedEntityLine,le=m!=null&&q.isVendorTransaction(m)===!0?Ft:kt,oe=s.useMemo(()=>{const se=r.transactionReviewLocalData.lineItemById[i.lineId]?.recommendationsWithCOT||[],xe=I.entityAutoCompleteView;return{selectedOption:le?.qboId??le?.id,defaultOptions:go(xe,le,se??[])}},[le,r.transactionReviewLocalData.lineItemById,i.lineId,I.entityAutoCompleteView]),ve=()=>le!=null&&le.logo!=null?t.jsx(as,{photoUrl:le.logo.toString(),styles:{width:At.nameLogoWidth.valuePx(u),height:At.nameLogoHeight.valuePx(u)},fallbackAvatar:t.jsx(Li,{children:t.jsx(cn,{name:le.name,size:o.sp4})})}):le!=null&&le.name!=null?t.jsx(Li,{children:t.jsx(cn,{name:le.name,size:o.sp4})}):null,Ie=(se,xe)=>{if(xe==null||!xe)return;let Te=[];return se.forEach(He=>{Te=Te.concat(He.options)}),Te.find(He=>He.value===xe)?.label??xe},$e=Ie(j,b),st=Ie(ke,P),Be=f==="review",It=Mn("vendor",oe.defaultOptions,oe.selectedOption),ot=Mn("category",ke,P),Wt=Mn("class",j,b),on=()=>wt.map((se,xe)=>{const Te=`${r.transactionId}_${se.key}_${i.lineId}`;if(l>0&&m!=null&&q.isVendorTransaction(m)===!0&&se.key==="vendor")return t.jsx(at,{windowSize:u,wrapperWidth:se.width},Te);if(l>0&&se.key==="transaction_type")return t.jsx(at,{windowSize:u,wrapperWidth:se.width},Te);switch(se.key){case"vendor":default:return t.jsxs(at,{windowSize:u,wrapperWidth:se.width,className:"item-value-container",children:[t.jsx(Kn,{isCOTEnabled:$,recommendations:we,type:"vendor",isFirstColumn:!0,isEnabled:!!le?.isPreFilled,isMisCategorized:It,onRecommendationClick:ye,selectedValue:_,selectedValueLabel:E,isReviewTab:Be,isAccountOptionDisabled:Me,existingOption:{label:m!=null&&q.isVendorTransaction(m)===!0?m?.vendor?.name:void 0,value:m!=null&&q.isVendorTransaction(m)===!0?m?.vendor?.id:void 0},cotTracking:T,lineId:i.lineId,transactionId:r.transactionId,openTooltipId:F,setOpenTooltipId:A}),t.jsx(Xn,{children:re===!0?t.jsx(Zn,{isHovered:y,children:t.jsxs(Jn,{onClick:He=>{He.stopPropagation(),Q(!1),Le(!0)},"data-testid":z("add-vendor-button",S),style:{display:"inline-flex",alignItems:"center",color:Xe.brandColorGoldDark,cursor:"pointer",height:o.sp6},children:[t.jsx(Gn,{}),Yt.addPayee]})}):_e===!0?t.jsx(yt,{onClickAway:de,children:t.jsx(bp,{"data-testid":z("vendor-selection-dropdown-container",Lt(S,lt,l.toString())),children:t.jsx(Ka,{name:G,placeholder:Yt.addPayee,valueToInfo:te,defaultValue:{selectedOption:oe.selectedOption,defaultOptions:oe.defaultOptions},type:"vendor",autoFocus:!re,style:{width:"100%"},pageSource:"list_page",transactionStatus:Be?"pending_review":"auto_categorized",isOptionRemovable:!1,customStyleConfig:p,menuIsOpen:_e,onMenuClose:de,registerOptions:{required:!1},loadOptions:et,showCOT:$,onCOTView:J,menuPlacement:R})})}):t.jsx(Sp,{children:t.jsxs(Yn,{isHovered:y,showOutline:It&&le?.isPreFilled!==!0&&!C&&Be,children:[ve(),t.jsx(wp,{onClick:ct,"data-testid":z("vendor-name-text",S),children:le!=null&&le.name?t.jsx(nt,{text:le.name,itemTextStyle:{color:y?U.colors.primary:U.colors.hero}}):t.jsx(vp,{children:ki})})]})})})]},Te);case"category":{const He=m?.lines!=null?m?.lines[l]:void 0;return t.jsxs(at,{windowSize:u,wrapperWidth:se.width,className:"item-value-container",children:[t.jsx(Kn,{isCOTEnabled:$,recommendations:we,type:"category",isFirstColumn:!1,isReviewTab:Be,isEnabled:!!i[Re]?.isPreFilled,isAccountOptionDisabled:Me,isMisCategorized:ot,onRecommendationClick:ye,selectedValue:P,selectedValueLabel:st,existingOption:{label:He?.account?.accountName,value:He?.account?.qboId??He?.account?.accountId},cotTracking:T,lineId:i.lineId,transactionId:r.transactionId,openTooltipId:F,setOpenTooltipId:A}),t.jsx(Xn,{children:me===!0?t.jsx(Zn,{isHovered:y,children:t.jsxs(Jn,{onClick:Mt=>{Mt.stopPropagation(),D(!1),Je(!0)},"data-testid":z("category-selection-field",O),style:{display:"inline-flex",alignItems:"center",color:Xe.brandColorGoldDark,cursor:"pointer",height:o.sp6},children:[t.jsx(Gn,{}),Yt.addCategory]})}):Qe===!0?t.jsx(yt,{onClickAway:Ve,children:t.jsx(Ti,{isHovered:y,"data-testid":z("category-selection-dropdown-container",O),children:t.jsx(Mo,{name:O,placeholder:Yt.addCategory,valueToId:Mt=>Z(Mt),type:"category",pageSource:"list_page",transactionStatus:Be?"pending_review":"auto_categorized",showCOT:$,defaultValue:{selectedOption:P,allOptions:ke},style:{display:"flex",flexGrow:1,width:"100%",cursor:"inherit"},registerOptions:{required:!1},menuIsOpen:Qe,autoFocus:!me&&(!P||i[Re]?.qboId!=null&&[x.expense?.qboId,x.income?.qboId].includes(i[Re].qboId)),onMenuClose:Ve,customStyleConfig:h,disableCurrentOption:Me,menuPlacement:R,onCOTView:J})})}):t.jsx(Yn,{isHovered:y,showOutline:ot&&i[Re]?.isPreFilled!==!0&&!C&&Be,children:t.jsx(Ai,{onClick:jt,"data-testid":z("category-label-text",O),children:t.jsx(nt,{text:st??"",itemTextStyle:{color:y?U.colors.primary:U.colors.hero}})})})})]},Te)}case"class":{const He=m?.lines!=null?m?.lines[l]:void 0;return t.jsxs(at,{windowSize:u,wrapperWidth:se.width,className:"item-value-container",children:[t.jsx(Kn,{isCOTEnabled:$,recommendations:we,type:"class",isFirstColumn:!1,isReviewTab:Be,isEnabled:!!i[Ze]?.isPreFilled,isAccountOptionDisabled:Me,isMisCategorized:Wt,onRecommendationClick:ye,selectedValue:b,selectedValueLabel:$e,existingOption:{label:He?.class?.className,value:He?.class?.classId},cotTracking:T,lineId:i.lineId,transactionId:r.transactionId,openTooltipId:F,setOpenTooltipId:A}),t.jsx(Xn,{children:H===!0?t.jsx(Zn,{isHovered:y,children:t.jsxs(Jn,{onClick:Mt=>{Mt.stopPropagation(),ee(!1),pe(!0)},"data-testid":z("class-selection-field",ie),style:{display:"inline-flex",alignItems:"center",color:Xe.brandColorGoldDark,cursor:"pointer",height:o.sp6},children:[t.jsx(Gn,{}),Yt.addClass]})}):Ae===!0?t.jsx(yt,{onClickAway:it,children:t.jsx(Ti,{isHovered:y,"data-testid":z("class-selection-dropdown-container",ie),children:t.jsx(Mo,{name:ie,placeholder:Yt.addClass,valueToId:Mt=>be(Mt),type:"class",showCOT:$,defaultValue:{selectedOption:b,allOptions:j},pageSource:"list_page",transactionStatus:Be?"pending_review":"auto_categorized",menuIsOpen:Ae,registerOptions:{required:!1},style:{width:"100%"},autoFocus:!H&&!b,customStyleConfig:h,onMenuClose:it,menuPlacement:R,onCOTView:J})})}):t.jsx(Yn,{isHovered:y,showOutline:Wt&&i[Ze]?.isPreFilled!==!0&&!C&&Be,children:t.jsx(Ai,{"data-testid":z("class-selection-field",ie),onClick:Ot,children:t.jsx(nt,{text:$e??"",itemTextStyle:{color:y?U.colors.primary:U.colors.hero}})})})})]},Te)}case"date":return t.jsx(at,{windowSize:u,wrapperWidth:se.width,children:t.jsx(tn,{windowSize:u,isLastItem:xe===wt.length-1,children:t.jsx(ho,{"data-testid":z("date-field",Lt(S,Ze,l.toString())),children:t.jsx(dp,{style:{color:y?U.colors.primary:U.colors.hero},children:N!=null?N.format(np.visual.MMMDCommaYYYYformat):null})})})},Te);case"transaction_type":return t.jsx(at,{windowSize:u,wrapperWidth:se.width,children:t.jsx(tn,{windowSize:u,"data-testid":z("transaction-type-field",Lt(S,Ze,l.toString())),isLastItem:xe===wt.length-1,children:K!=null?t.jsx(Wa,{textColor:y?new xo(U.colors.primary):qa(void 0,U),text:K??M}):null})},Te);case"memo":return t.jsx(at,{windowSize:u,wrapperWidth:se.width,children:t.jsx(tn,{style:{lineHeight:o.sp3},windowSize:u,isLastItem:xe===wt.length-1,"data-testid":z("memo-field",Lt(S,Ze,l.toString())),children:B&&l==0?t.jsx(fe,{placement:"bottom",title:B,children:t.jsx(hp,{style:{color:y?U.colors.primary:U.colors.hero}})}):l==0?t.jsx(up,{children:ki}):null})},Te);case"amount":{const He=Ke("0,0.[00]",i.amount,!0);return t.jsx(at,{windowSize:u,style:{paddingRight:g[4]},wrapperWidth:se.width,children:t.jsx(tn,{windowSize:u,isLastItem:xe===wt.length-1,children:t.jsx(ho,{"data-testid":z("transaction-amount-field",Lt(S,Ze,l.toString())),style:{color:y?U.colors.primary:U.colors.hero},children:He})})},Te)}}});return t.jsx(t.Fragment,{children:on()})},Ii=({isEnabled:e,isReviewTab:n,isMisCategorized:d,hasRecommendations:c,isTooltipVisible:h=!1})=>e?n?h?t.jsx(gp,{}):t.jsx(pp,{}):h?t.jsx(mp,{}):t.jsx(xp,{className:"ai-icon-selected-plain"}):!e&&d||c?h?t.jsx(yp,{}):t.jsx(fp,{}):null,$i=({isFirstColumn:e,children:n})=>t.jsx(Vs,{isFirstColumn:e,children:n}),Kn=({recommendations:e,isCOTEnabled:n,type:d,isReviewTab:c,selectedValueLabel:h,isFirstColumn:p,isEnabled:i=!1,isMisCategorized:l=!1,selectedValue:r,existingOption:m,cotTracking:u,lineId:x,openTooltipId:y,transactionId:C,isAccountOptionDisabled:S,onRecommendationClick:w,setOpenTooltipId:I})=>{const f=s.useMemo(()=>`${C}:${x}:${d}`,[C,x,d]),$=y===f,R=Za().analytics,{createAlternateRecommendationCallback:T}=Ya(),F=s.useCallback(K=>{const B=e[1],V=e[0];T(d,{currentValue:h??Zt,transactionCurrentStatus:c?"pending_review":"auto_categorized",transactionPage:"list_page",cotTracking:u?{transactionId:C,lineId:x,onCOTView:(J,G,O,ie)=>{u.onCOTView?.(J,G,O,ie)}}:void 0},B,V)(K)},[T,e,h,c,d,u,x,C]),v=Xa(e,d,n,m,"list_page",c?"pending_review":"auto_categorized",w,F,r,S),k=Qa(e,d),A=s.useCallback(()=>{I(f);const K=v?.recommendations[0]?.cot??[],B=v?.recommendations[1]?.cot??[],V=B.length>0;if(R.trackTransactionCotView({recommendationFor:d,currentValue:h??Zt,recommendation:v?.recommendations[0]?.name??Zt,recommendationCot:K,isRecommendationCotAvailable:K.length>0,recommendationReason:v?.recommendations[0]?.reason??Zt,recommendationConfidencePercentage:v?.recommendations[0]?.confidencePercentage??null,recommendationConfidenceLevel:Do(Oo(v?.recommendations[0]?.confidencePercentage).toLocaleLowerCase()),alternativeRecommendation:v?.recommendations[1]?.name??Zt,alternativeRecommendationCot:B,isAlternativeRecommendationCotAvailable:V,alternativeRecommendationReason:v?.recommendations[1]?.reason??Zt,alternativeRecommendationConfidencePercentage:v?.recommendations[1]?.confidencePercentage??null,alternativeRecommendationConfidenceLevel:V?Do(Oo(v?.recommendations[1]?.confidencePercentage).toLocaleLowerCase()):null,transactionCurrentStatus:c?"pending_review":"auto_categorized",transactionPage:"list_page"}),u?.onCOTView!=null){const J=er(v);J!=null&&u.onCOTView(x,C,d,J)}},[R,v,c,h,d,x,C,f,I]),L=s.useCallback(()=>{y===f&&I(void 0)},[y,f,I]),N=s.useMemo(()=>!r||!k?!1:e.some(K=>d==="vendor"&&K.vendor!=null?K.vendor.id===r||K.vendor.qboId===r:d==="category"&&K.account!=null?K.account.qboId===r||K.account.accountId===r:d==="class"&&K.class!=null?K.class.classId===r:!1),[r,k,e,d]);if(!k)return t.jsx(Vs,{isFirstColumn:p});const M=i||N;return v?t.jsx($i,{isFirstColumn:p,children:t.jsx(fe,{variant:"chain-of-thought",data:v,placement:"bottom-start",disableIntersectionObserver:!0,position:"static",display:"block",open:$,style:{width:"auto",height:"auto"},leaveDelay:200,onOpen:A,onClose:L,children:t.jsx(Cp,{children:t.jsx(Ii,{isEnabled:M,isReviewTab:c,isMisCategorized:l,hasRecommendations:k,isTooltipVisible:$})})})}):t.jsx($i,{isFirstColumn:p,children:t.jsx(Ii,{isEnabled:M,isReviewTab:c,isMisCategorized:l,hasRecommendations:k,isTooltipVisible:$})})},Ns=()=>{const e=Se(),n=s.useRef(null),[d,c]=s.useState(0);return s.useLayoutEffect(()=>{n.current&&c(n.current.offsetWidth)},[e]),t.jsx(sp,{windowSize:e,ref:n,children:wt.map((h,p)=>{const i=`${p}${tp}${h.key}`;switch(h.key){case"vendor":return t.jsx(at,{windowSize:e,wrapperWidth:h.width,children:t.jsx(tn,{windowSize:e,isLastItem:p===wt.length-1,children:t.jsxs(ho,{children:[t.jsx(yo,{width:g[4],height:g[4]}),t.jsx(Rt,{width:d*h.width.value(e)/100,height:g[4],style:{display:"flex",alignItems:"center"}})]})})},i);default:return t.jsx(at,{windowSize:e,wrapperWidth:h.width,children:t.jsx(tn,{windowSize:e,isLastItem:p===wt.length-1,children:t.jsx(Rt,{width:d*h.width.value(e)/100,height:g[4],style:{display:"flex",alignItems:"center"}})})},i)}})})},sp=a.div`
|
|
1223
1223
|
display: flex;
|
|
1224
1224
|
background-color: ${e=>e.theme.colors.grey5};
|
|
1225
1225
|
padding-left: ${e=>At.containerPaddingLeftRight.valuePx(e.windowSize)};
|
|
@@ -1318,7 +1318,7 @@ import{o,c7 as Us,q as Se,gr as Ni,gs as Vi,l as q,F as je,j as t,cD as Ws,ab as
|
|
|
1318
1318
|
color: ${e=>e.theme.colors.hero};
|
|
1319
1319
|
`,Jn=a(ze)`
|
|
1320
1320
|
color: ${e=>e.theme.colors.hero};
|
|
1321
|
-
`,
|
|
1321
|
+
`,Gn=a(Dn)`
|
|
1322
1322
|
width: ${o.sp3};
|
|
1323
1323
|
height: ${o.sp3};
|
|
1324
1324
|
margin: ${o.sp1};
|
|
@@ -1382,7 +1382,7 @@ import{o,c7 as Us,q as Se,gr as Ni,gs as Vi,l as q,F as je,j as t,cD as Ws,ab as
|
|
|
1382
1382
|
display: flex;
|
|
1383
1383
|
align-items: center;
|
|
1384
1384
|
flex-direction: row;
|
|
1385
|
-
`,
|
|
1385
|
+
`,Zn=a.div`
|
|
1386
1386
|
padding: ${o.sp0} ${o.sp2};
|
|
1387
1387
|
border-radius: ${o.sp1};
|
|
1388
1388
|
margin-left: ${o.sp0};
|
|
@@ -1430,7 +1430,7 @@ import{o,c7 as Us,q as Se,gr as Ni,gs as Vi,l as q,F as je,j as t,cD as Ws,ab as
|
|
|
1430
1430
|
min-height: 100%;
|
|
1431
1431
|
flex-direction: column;
|
|
1432
1432
|
row-gap: ${o.sp3};
|
|
1433
|
-
`,{common:$p,transactionDetail:{notCategorizedTooltipText:Lp}}=je.getLocalizedStrings(),Qn={rowGap:new X(g[0],g[2],g[3])},Tp=({selectedTab:e,transactionView:n,receiptUploadEndpoint:d,authParams:c,sectionId:h,isCOTEnabled:p,isDisabled:i,vendorSearchAutoCompleteActions:l,vendorSearchAutoCompleteData:r,setCurrentTransactionInAction:m,vendorLoadOptions:u,onTransactionCategorizationRowClick:x,onUpdateTransactionCategorizationUIState:y,onUpdateScrollYOffSetTransactionCategorizationUIState:C,onFetchTransactionCategorizationList:S,containerRef:w,cotTracking:I,isUncategorizedExpenseCategoryEnabled:f})=>{const $=Se(),[R,T]=s.useState(void 0),{fetchState:F,uiState:v,transactionLocalData:k,selectedCheckBoxTransactionIds:A,transactionIdsWithUnsavedData:L,transactions:N,uncategorizedAccounts:M}=n,K=s.useRef(null),B=s.useRef({}),{control:V}=fo();s.useEffect(()=>{K.current?.resetAfterIndex(0,!0)},[$,K,k]),s.useEffect(()=>{K.current?.scrollTo(v.scrollPosition?.scrollTop??0)},[e]);const J=s.useCallback(D=>{if(B.current?.[D]!=null){const te=$==="small"&&v.pageToken==null&&D===k.length-1?Qn.rowGap.value("medium-regular"):Qn.rowGap.value($);return B.current[D]+te}if(k[D]==null)return 0;const re=k[D].transactionReviewLocalData,Q=Object.keys(re.lineItemById).length;return Q!=null&&!isNaN(Q)&&Q>1?Si*Q+Qn.rowGap.value($)*(Q-1):Si},[k,$,v.pageToken,v.sortKey,v.sortOrder]),
|
|
1433
|
+
`,{common:$p,transactionDetail:{notCategorizedTooltipText:Lp}}=je.getLocalizedStrings(),Qn={rowGap:new X(g[0],g[2],g[3])},Tp=({selectedTab:e,transactionView:n,receiptUploadEndpoint:d,authParams:c,sectionId:h,isCOTEnabled:p,isDisabled:i,vendorSearchAutoCompleteActions:l,vendorSearchAutoCompleteData:r,setCurrentTransactionInAction:m,vendorLoadOptions:u,onTransactionCategorizationRowClick:x,onUpdateTransactionCategorizationUIState:y,onUpdateScrollYOffSetTransactionCategorizationUIState:C,onFetchTransactionCategorizationList:S,containerRef:w,cotTracking:I,isUncategorizedExpenseCategoryEnabled:f})=>{const $=Se(),[R,T]=s.useState(void 0),{fetchState:F,uiState:v,transactionLocalData:k,selectedCheckBoxTransactionIds:A,transactionIdsWithUnsavedData:L,transactions:N,uncategorizedAccounts:M}=n,K=s.useRef(null),B=s.useRef({}),{control:V}=fo();s.useEffect(()=>{K.current?.resetAfterIndex(0,!0)},[$,K,k]),s.useEffect(()=>{K.current?.scrollTo(v.scrollPosition?.scrollTop??0)},[e]);const J=s.useCallback(D=>{if(B.current?.[D]!=null){const te=$==="small"&&v.pageToken==null&&D===k.length-1?Qn.rowGap.value("medium-regular"):Qn.rowGap.value($);return B.current[D]+te}if(k[D]==null)return 0;const re=k[D].transactionReviewLocalData,Q=Object.keys(re.lineItemById).length;return Q!=null&&!isNaN(Q)&&Q>1?Si*Q+Qn.rowGap.value($)*(Q-1):Si},[k,$,v.pageToken,v.sortKey,v.sortOrder]),G=s.useCallback((D,re)=>{B.current={...B.current,[D]:re},K.current?.resetAfterIndex(0,!0)},[$,K,k,v.sortKey,v.sortOrder]),O=s.useCallback(()=>{(v.pageToken!=null&&n.refreshStatus.fetchState!=="In-Progress"||n.refreshStatus.fetchState==="Completed")&&S(e,v.searchString,!0,v.pageToken,!0,!1)},[n.refreshStatus.fetchState,S,e,v.pageToken,v.searchString,v.sortKey,v.sortOrder]),ie=s.useCallback(()=>{v.pageToken!=null&&O()},[O,v.pageToken,v.sortKey,v.sortOrder]),ye=Ma(D=>C(e,{scrollPosition:{scrollTop:D}}),1e3,{trailing:!0}),U=D=>D<n.transactionLocalData.length,he=(D,re)=>{y(e,{sortOrder:re,sortKey:D}),S(e,v.searchString,!1,null,!1,!0)},Ce=D=>{if(e==="autoCategorized")return!A.includes(D);const re=k.find(te=>te.transactionId===D)?.transactionReviewLocalData,Q=N.find(te=>te.id===D);return Q!=null&&re!=null?q.checkIfAllLineItemsAreCategoryClassFilled(Q,re,M,f)?f===!0&&Eo.isAnyItemWithUncategorizedExpenseAccount(M,re.lineItemById,["expense"])?L.includes(D)===!1:!1:!0:A.length===0?!0:!A.includes(D)};let b=[],P=[];(F==="Completed"||n.transactionLocalData.length>0)&&(P=n.transactionLocalData.map((D,re)=>{const Q=Ce(D.transactionId);let te=!1;f===!0&&Q===!0&&e==="review"&&Eo.isAnyItemWithUncategorizedExpenseAccount(M,D.transactionReviewLocalData.lineItemById,["expense"])&&(te=!L.includes(D.transactionId));const we=D.transactionReviewLocalData;return{label:t.jsx(op,{transactionView:n,sectionId:`${h}.${re}.${_s}`,transaction:D,receiptUploadEndpoint:d,authParams:c,onTransactionCategorizationRowClick:x,vendorLoadOptions:u,setCurrentTransactionInAction:m,vendorSearchAutoCompleteActions:l,vendorSearchAutoCompleteData:r,selectedTab:e,containerRef:w,isCOTEnabled:p,cotTracking:I,openTooltipId:R,setOpenTooltipId:T,isUncategorizedExpenseCategoryEnabled:f},`${D.transactionId}.${we.transactionType}`),value:D.transactionId,defaultChecked:!1,groupLabel:!1,isException:te,exceptionMode:te===!0?"checked_or_hover":void 0,isSticky:!0,isDisabled:Q===!0?"readonly":void 0,exceptionType:te===!0?"alert":void 0,exceptionInfo:te===!0?Lp:void 0}}),b=P.map(D=>D.value));const W={label:"All",value:"allTransactionOptionId",defaultChecked:!1,groupLabel:!1},{title:_,subTitle:E}=Ue("transaction_categorization").allDoneText,H=k.map(D=>D.transactionId),ee=s.useMemo(()=>n.totalCountByTab[e],[e,n.totalCountByTab]),me=s.useMemo(()=>k.reduce((D,re)=>{const Q=Object.keys(re.transactionReviewLocalData.lineItemById).length;return D+(Q>0?Q:1)},0)<n.totalCountByTab[e]?k.length+1:k.length,[k,n.totalCountByTab,e]);return t.jsx(Op,{windowSize:$,"data-testid":z("transaction-categorization-list-wrapper"),children:t.jsx(Fp,{windowSize:$,"data-testid":z("transaction-categorization-list-container"),children:F==="Error"?t.jsxs(zp,{windowSize:$,"data-testid":z("transaction-categorization-reload-page"),children:[t.jsx(Bp,{onClick:()=>S(e,void 0,!0,null,!1,!0),"data-testid":z("transaction-categorization-reload-icon"),children:t.jsx(mo,{})}),t.jsx(Pp,{"data-testid":z("transaction-categorization-reload-label"),children:$p.reloadPage.label})]}):F==="Completed"&&k.length===0?t.jsx(bt,{tab:"transaction_categorization",title:_,subTitle:E,"data-testid":z("transaction-categorization-empty-table-section")}):F==="Not-Started"||F==="In-Progress"&&k.length===0?t.jsx(jp,{sortConfig:{sortKey:v.sortKey,sortOrder:v.sortOrder},fetchState:F,onColumnSortConfigChanged:he,"data-testid":z("transaction-categorization-list-empty-table")}):t.jsx(Mp,{windowSize:$,"data-testid":z("transaction-categorization-list-view"),children:t.jsx(ss,{control:V,name:"selectedTransactionIds",defaultValue:[],render:({field:{value:D,ref:re,onChange:Q}})=>t.jsx(Hs.Provider,{value:{value:D,mode:"off",allCheckBoxValues:b,index:0,sortKey:v.sortKey,sortOrder:v.sortOrder,fetchState:F,isDisabled:i,groupLabelCheckBox:W,onColumnSortConfigChanged:he,ref:re,onChange:Q,selectedTab:e},children:t.jsx(Tn,{children:({height:te,width:we})=>t.jsx(za,{isItemLoaded:U,itemCount:ee,loadMoreItems:ie,children:({onItemsRendered:ke,ref:j})=>t.jsx(An,{ref:Z=>{j(Z),K.current=Z},height:te,itemCount:me,itemKey:Z=>k[Z]?.transactionId,innerElementType:Ap,onItemsRendered:ke,width:we,style:{willChange:"auto"},overscanCount:kh,itemSize:J,itemData:{checkboxes:P,value:D,allCheckBoxValues:b,groupLabelCheckBox:W,categorizationGroupValue:H,transactionLocalData:k,mode:"always_on",setRowHeight:G,isItemLoaded:U,ref:j,onChange:Q,selectedCheckBoxTransactionIds:A},initialScrollOffset:n.uiState.scrollPosition?.scrollTop,onScroll:({scrollOffset:Z})=>{ye(Z)},children:Rp})})})})})})})})},Ap=e=>{const{value:n,allCheckBoxValues:d,groupLabelCheckBox:c,index:h,isDisabled:p,fetchState:i,sortKey:l,sortOrder:r,mode:m,ref:u,onChange:x,onColumnSortConfigChanged:y}=Ep(),{children:C,style:S,...w}=e;return i==="Completed"?t.jsxs(_p,{ref:u,style:{...S,width:"auto"},...w,children:[t.jsx(Np,{children:t.jsx(us,{selectionLimit:q.MAX_SELECTION_LIMIT,value:n,checkBox:{label:t.jsx(Dp,{children:t.jsx(Ps,{sortConfig:{sortKey:l,sortOrder:r},isDisabled:p,onColumnSortConfigChanged:y})}),value:"allTransactionOptionId",defaultChecked:!1,groupLabel:!1},isDisabled:"disabled",groupLabelCheckBox:c,allCheckBoxValues:d,mode:m,draggable:!1,checkBoxStyle:{padding:20},labelCheckBoxStyle:{padding:o.sp3},name:"transactionCategorizationHeader",index:h,onChangeHandler:I=>hs({event:I,value:n,allCheckBoxValues:d,groupLabelCheckBox:c,onChange:x}),ref:u})}),t.jsx(Vp,{children:C})]},`${d[h]}-${h}`):null},Hs=s.createContext(void 0),Ep=()=>{const e=s.useContext(Hs);if(!e)throw new Error("useStickyContext must be used within a StickyProvider");return e},Rp=({index:e,style:n,data:d})=>{const{checkboxes:c,value:h,groupLabelCheckBox:p,categorizationGroupValue:i,allCheckBoxValues:l,transactionLocalData:r,isItemLoaded:m,setRowHeight:u,ref:x,onChange:y,selectedCheckBoxTransactionIds:C}=d,S=s.useRef(null),w=Se();if(s.useEffect(()=>{S.current?.firstElementChild!=null&&u(e,S.current.firstElementChild.clientHeight)},[e,S,w,r[e]?.transactionReviewLocalData]),m(e)===!0){const I=c[e];return t.jsx(Ei,{style:{...n,paddingBottom:o.sp0,paddingRight:o.sp8,width:"100%",flex:"1"},ref:S,children:t.jsx(us,{selectionLimit:q.MAX_SELECTION_LIMIT,checkBox:I,value:h,groupLabelCheckBox:p,allCheckBoxValues:l,mode:I.isDisabled==="readonly"||C.includes(I.value)===!1&&C.length>=q.MAX_SELECTION_LIMIT?"off":"always_on",draggable:!1,isDisabled:I.isDisabled,checkBoxStyle:{padding:20},labelCheckBoxStyle:{padding:o.sp3},infoIconContainerStyle:{padding:20},name:`${Vt}.${h}`,ref:x,index:e,onChangeHandler:f=>hs({event:f,value:h,allCheckBoxValues:l,groupLabelCheckBox:p,onChange:y})})},i[e])}else return t.jsx(Ei,{style:{...n,paddingBottom:o.sp0,paddingRight:o.sp8,width:"100%",flex:"1"},ref:S,children:t.jsx(Hp,{children:t.jsx(Ns,{})})},Zi())},Dp=a.div`
|
|
1434
1434
|
flex: 1;
|
|
1435
1435
|
width: auto;
|
|
1436
1436
|
padding-right: ${o.sp8};
|
|
@@ -1493,7 +1493,7 @@ import{o,c7 as Us,q as Se,gr as Ni,gs as Vi,l as q,F as je,j as t,cD as Ws,ab as
|
|
|
1493
1493
|
height: 100%;
|
|
1494
1494
|
`,Hp=a.div`
|
|
1495
1495
|
padding-left: ${o.sp8};
|
|
1496
|
-
`,Up=({selectedTab:e,transactionView:n,receiptUploadEndpoint:d,authParams:c,sectionId:h,vendorSearchAutoCompleteData:p,vendorSearchAutoCompleteActions:i,isCOTEnabled:l,setCurrentFooterFormId:r,setLocalDataForCategoryAndClass:m,onTransactionCategorizationRowClick:u,onUpdateTransactionCategorizationUIState:x,onUpdateScrollYOffSetTransactionCategorizationUIState:y,onFetchTransactionCategorizationList:C,onSaveUpdateTransactionCategorization:S,onUpdateSelectedCheckboxTransactionIds:w,onFetchRecommendationsForEntityCategorization:I,onFetchRecommendationsForEntityCategorizationWithCustomer:f})=>{const[$,R]=s.useState({transactionId:void 0,lineItemId:void 0}),T=s.useRef(),F=s.useRef({}),{useDynamicConfig:v}=es(),{configValue:k}=v(ts.enableUncategorizedExpenseCategory),A=k?.uncategorized_expense_category_enabled===!0,L=(b,P,W,_)=>{const E={...F.current};E[P]==null&&(E[P]=[]);let H=E[P].findIndex(ee=>ee.lineId===b);if(H===-1){const ee={lineId:b,category:{recommendationTypesViewed:[]},class:{recommendationTypesViewed:[]},vendor:{recommendationTypesViewed:[]}};E[P].push(ee),H=E[P].length-1}else{const ee=E[P][H];E[P][H]={...ee,category:{...ee.category,recommendationTypesViewed:[...ee.category.recommendationTypesViewed]},class:{...ee.class,recommendationTypesViewed:[...ee.class.recommendationTypesViewed]},vendor:{...ee.vendor,recommendationTypesViewed:[...ee.vendor.recommendationTypesViewed]}}}_!=null&&_!==""&&!E[P][H][W].recommendationTypesViewed.includes(_)&&E[P][H][W].recommendationTypesViewed.push(_),F.current=E},{transactions:N,transactionLocalData:M,accountsHierarchyList:K,classHierarchyList:B,accountList:V,classList:J,selectedCheckBoxTransactionIds:
|
|
1496
|
+
`,Up=({selectedTab:e,transactionView:n,receiptUploadEndpoint:d,authParams:c,sectionId:h,vendorSearchAutoCompleteData:p,vendorSearchAutoCompleteActions:i,isCOTEnabled:l,setCurrentFooterFormId:r,setLocalDataForCategoryAndClass:m,onTransactionCategorizationRowClick:u,onUpdateTransactionCategorizationUIState:x,onUpdateScrollYOffSetTransactionCategorizationUIState:y,onFetchTransactionCategorizationList:C,onSaveUpdateTransactionCategorization:S,onUpdateSelectedCheckboxTransactionIds:w,onFetchRecommendationsForEntityCategorization:I,onFetchRecommendationsForEntityCategorizationWithCustomer:f})=>{const[$,R]=s.useState({transactionId:void 0,lineItemId:void 0}),T=s.useRef(),F=s.useRef({}),{useDynamicConfig:v}=es(),{configValue:k}=v(ts.enableUncategorizedExpenseCategory),A=k?.uncategorized_expense_category_enabled===!0,L=(b,P,W,_)=>{const E={...F.current};E[P]==null&&(E[P]=[]);let H=E[P].findIndex(ee=>ee.lineId===b);if(H===-1){const ee={lineId:b,category:{recommendationTypesViewed:[]},class:{recommendationTypesViewed:[]},vendor:{recommendationTypesViewed:[]}};E[P].push(ee),H=E[P].length-1}else{const ee=E[P][H];E[P][H]={...ee,category:{...ee.category,recommendationTypesViewed:[...ee.category.recommendationTypesViewed]},class:{...ee.class,recommendationTypesViewed:[...ee.class.recommendationTypesViewed]},vendor:{...ee.vendor,recommendationTypesViewed:[...ee.vendor.recommendationTypesViewed]}}}_!=null&&_!==""&&!E[P][H][W].recommendationTypesViewed.includes(_)&&E[P][H][W].recommendationTypesViewed.push(_),F.current=E},{transactions:N,transactionLocalData:M,accountsHierarchyList:K,classHierarchyList:B,accountList:V,classList:J,selectedCheckBoxTransactionIds:G,uncategorizedAccounts:O}=n,ie=Ht({mode:"all",reValidateMode:"onChange",defaultValues:s.useMemo(()=>Di(G,M,K,B,p.entityAutoCompleteView),[K,B,G,M,p.entityAutoCompleteView]),values:s.useMemo(()=>Di(G,M,K,B,p.entityAutoCompleteView),[K,B,G,M,p.entityAutoCompleteView]),resetOptions:{keepDefaultValues:!0,keepDirty:!1}});s.useEffect(()=>()=>{r("expenseAutomationPage")},[]),s.useEffect(()=>{G.length>0?r(qn):r("expenseAutomationPage")},[G,r]);const ye=ie.handleSubmit(b=>{const P=b[Ln],W=F.current;S(e,P,W),P.forEach(_=>{delete F.current[_]})}),U=async(b,P)=>{if(b!=null){if(b===Ln){const W=ie.getValues(Ln);if(W.length<G.length){w(e,W);return}if(W.length===q.MAX_SELECTION_LIMIT){w(e,W);return}const _=W[W.length-1],E=P[Vt].findIndex(ee=>ee.transactionId===_),H=ie.getValues(`${Vt}.${E}.lineInfo`);if(H!=null){let ee=!1;if(H.every(me=>(ee=q.isAccountUncategorized(O,me[Re].selectedOption,A?["income"]:void 0),!!me[Re].selectedOption&&me[Re].selectedOption!=null&&!ee&&!!me[Ze].selectedOption&&!!me[lt].selectedOption))===!0){w(e,W);return}else{const me=W.filter(D=>D!==_);w(e,me);return}}return}if(b.includes(Re)===!0||b.includes(Ze)===!0){const W=parseInt(b.split(".")[1]),_=parseInt(b.split(".")[3]),E=ie.getValues(`${Vt}.${W}.lineInfo`),H=E[_];if(b.includes(Re)||b.includes(Ze)){const{transactionId:ee,lineId:me,recommendations:D}=H;if(E!=null){const re=H[Re].selectedOption,Q=H[Ze].selectedOption,te=H[lt].selectedOption,we=H[lt].selectedOption,ke=H[lt].defaultOptions,j=ke?.find(de=>de.options?.find(Ve=>Ve.value===te))?.options?.find(de=>de.value===te)?.label,Z=ke?.find(de=>de.options?.find(Ve=>Ve.value===we))?.options?.find(de=>de.value===we)?.label,be=p.entityAutoCompleteView.vendor.find(de=>de.qboId===te),Me=p.entityAutoCompleteView.customer.find(de=>de.qboId===we),_e=D.find(de=>de.vendor?.qboId===te)?.vendor,Le=te||be?.qboId||_e?.qboId?{id:te??be?.qboId??_e?.qboId??"",name:j??be?.name??_e?.name??"",logo:be?.logo??_e?.logo}:void 0,Ae=we||Me?.qboId?{id:we??Me?.qboId??"",name:Z??Me?.name??"",logo:Me?.logo}:void 0,pe=V.find(de=>de.qboId===re),Qe=J.find(de=>de.classId===Q),Je=n.transactionLocalData.find(de=>de.transactionId===ee)?.transactionReviewLocalData.lineItemById[me].account,et=n.transactionLocalData.find(de=>de.transactionId===ee)?.transactionReviewLocalData.lineItemById[me].class;m(e,ee,me,N,Le?.id,Ae?.id,b.includes(Re)&&pe!=null?{...pe,isPreFilled:!1}:Je,b.includes(Ze)&&Qe!=null?{...Qe,isPreFilled:!1}:et,void 0,D,A)}return}}if(b.includes(lt)){const W=parseInt(b.split(".")[1]),_=parseInt(b.split(".")[3]),E=ie.getValues(`${Vt}.${W}.lineInfo`);if(E!=null){const H=E[_],{transactionId:ee,recommendations:me}=H,D=H[lt].selectedOption,re=H[lt].selectedOption,Q=H[lt].defaultOptions,te=Q?.flatMap(pe=>pe.options)?.find(pe=>pe.value===D)?.label,we=Q?.flatMap(pe=>pe.options)?.find(pe=>pe.value===re)?.label,ke=p.entityAutoCompleteView.vendor.find(pe=>pe.qboId===D),j=p.entityAutoCompleteView.customer.find(pe=>pe.qboId===re),Z=me.find(pe=>pe.vendor?.qboId===D)?.vendor,be=D!==""&&D!=null?D:te!==""&&te!=null?te:"",Me=(ke?.qboId!=null&&ke.qboId!==""?ke.qboId:null)??(Z?.qboId!=null&&Z.qboId!==""?Z.qboId:null)??(D!=null&&D!==""?D:null),_e={id:Me??te??"",name:te??ke?.name??Z?.name??"",logo:ke?.logo??Z?.logo},Le=j?.qboId!=null&&j.qboId!==""?{id:j.qboId??re??"",name:we??j.name??"",logo:j.logo}:void 0,Ae=N.find(pe=>pe.id===ee);if(Ae!=null){const pe=n.transactionLocalData.find(Ve=>Ve.transactionId===Ae.id)?.transactionReviewLocalData,Qe=pe?.lineItemById[H.lineId],Je=q.isVendorTransaction(Ae)===!0?pe?.selectedEntity:Qe?.selectedEntityLine,et=_e.id!==""?{id:be,name:te??be,type:"vendor",qboId:be,zeniId:be,logo:_e.logo,isPreFilled:Je?.id===Me&&Je?.isPreFilled}:Le?.id!=null&&Le.id!==""?{id:Le.id,name:Le.name,type:"customer",qboId:Le.id,zeniId:Le.id,logo:Le.logo}:void 0,de={transactionId:{id:Ae.id,type:Ae.type},transaction:Ae,lineIds:Ae.type!=="journal_entry"?Ae.lines?.map(Ve=>Ve.id)??[]:[H.lineId]};et?.type==="customer"?f(H.amount.amount,de,!1,e,et,Le,A):I(H.amount.amount,de,!1,e,et,_e,A)}}i.onCancelAutoComplete?.();return}}};s.useEffect(()=>{const b=ie.watch((P,{name:W})=>{W!=null&&P!=null&&hn(()=>U(W,P))});return()=>{b.unsubscribe()}}),s.useEffect(()=>{if(p.entityAutoCompleteView.fetchState==="Completed"){const b=n.transactionLocalData.find(P=>P.transactionId===$.transactionId);if(b){const{transactionReviewLocalData:P}=b,{selectedEntity:W}=P,_=$?.lineItemId??P.sortedLineItems[0],E=P.lineItemById[_],H=E.selectedEntityLine;T.current?.(go(p.entityAutoCompleteView,W??H,E?.recommendationsWithCOT??[]))}R({transactionId:void 0,lineItemId:void 0})}},[p.entityAutoCompleteView.fetchState]);const he=(b,P)=>{i.onAutoCompleteInputChange?.(b),T.current=P},Ce=s.useRef(null);return t.jsx(qp,{ref:Ce,"data-testid":z("transaction-categorization-list-page"),children:t.jsx(Ut,{...ie,children:t.jsx("form",{id:Ri(qn),onSubmit:ye,style:{height:"100%",width:"100%"},"data-testid":z(Ri(qn)),children:t.jsx(Tp,{selectedTab:e,sectionId:h,transactionView:n,receiptUploadEndpoint:d,authParams:c,setCurrentTransactionInAction:R,onUpdateTransactionCategorizationUIState:x,onUpdateScrollYOffSetTransactionCategorizationUIState:y,onFetchTransactionCategorizationList:C,onTransactionCategorizationRowClick:u,vendorLoadOptions:he,vendorSearchAutoCompleteData:p,vendorSearchAutoCompleteActions:i,containerRef:Ce,isCOTEnabled:l,cotTracking:{onCOTView:L},isUncategorizedExpenseCategoryEnabled:A})})})})},Ri=e=>`${e}_form`,Di=(e,n,d,c,h)=>({[Vt]:n.map(p=>Wp(p.transactionId,p.transactionReviewLocalData,d,c,h)),[Ln]:e}),Wp=(e,n,d,c,h)=>{const{lineItemById:p,sortedLineItems:i,selectedEntity:l}=n,r=Object.values(p).sort((u,x)=>i.indexOf(u.lineId)-i.indexOf(x.lineId)),m=r[0]?.lineId;return{[_s]:r.map(u=>{const x=u.account?.qboId??u.account?.accountId,y=u.class?.classId,C=u.selectedEntityLine;return{id:u.id,transactionId:u.transactionId,type:u.type,amount:u.amount,lineDetailType:u.lineDetailType,platformLineDetailType:u.platformLineDetailType,lineTransactionType:u.lineTransactionType,postingType:u.postingType,postingTypeName:u.postingTypeName,customer:u.customer,vendor:u.vendor,billable:u.billable,item:u.item,isCategoryMiscategorized:u.isCategoryMiscategorized,isClassMiscategorized:u.isClassMiscategorized,lineId:u.id,[Re]:{selectedOption:x,allOptions:ds(d,u.recommendationsWithCOT)},[Ze]:{selectedOption:y,allOptions:cs(c,u.recommendationsWithCOT)},[lt]:{selectedOption:l?.id??C?.id??l?.name??C?.name,defaultOptions:go(h,l??C,n.lineItemById[m]?.recommendationsWithCOT??[])},[Zh]:u.lineEntity,[Yh]:u.recommendationsWithCOT??[]}}),transactionId:e,[Xh]:n.vendorDetails!=null&&n.vendorDetails.id!=null?{id:n.vendorDetails.id,qboId:n.vendorDetails.qboId,name:n.vendorDetails.name}:void 0,[Qh]:n.customerDetails!=null&&n.customerDetails.id!=null?{id:n.customerDetails.id,qboId:n.customerDetails.qboId,name:n.customerDetails.name}:void 0}},qp=a.div`
|
|
1497
1497
|
display: flex;
|
|
1498
1498
|
min-height: 100%;
|
|
1499
1499
|
width: 100%;
|
|
@@ -1513,7 +1513,7 @@ import{o,c7 as Us,q as Se,gr as Ni,gs as Vi,l as q,F as je,j as t,cD as Ws,ab as
|
|
|
1513
1513
|
display: flex;
|
|
1514
1514
|
flex-direction: column;
|
|
1515
1515
|
width: 100%;
|
|
1516
|
-
`,Zp=e=>{const{currentFooterFormId:n,onJeAccountSettingsChange:d,onSaveJeAccountSettingsClick:c,setResetJeAccountSettingsForm:h,expenseAutomationViewSelector:p,authParams:i,receiptUploadEndpoint:l,companyId:r,vendorSearchAutoCompleteActions:m,vendorSearchAutoCompleteData:u,enableMonthEndInsightsZeniGPTFeature:x,monthEndInsightsPreviewMode:y,monthEndInsightsCustomerRequestData:C,allThreadsSectionOpen:S,loggedInUser:w,isCOTEnabled:I,setCurrentFooterFormId:f,onFetchRecommendationsForEntityCategorization:$,onFetchRecommendationsForEntityCategorizationWithCustomer:R,onTransactionCategorizationRowClick:T,onFetchMissingReceiptsList:F,onMissingReceiptsRowClick:v,onUploadReceiptAttachment:k,onUploadReceiptComplete:A,onUploadReceiptFetchStatus:L,onReconTabColumnSortConfigChanged:N,onReloadReconciliationListPage:M,onUpdateReconcileTabLocalData:K,onUpdateMissingReceiptsUIState:B,onFetchTransactionCategorizationList:V,onUpdateTransactionCategorizationUIState:J,onUpdateScrollYOffSetTransactionCategorizationUIState:Z,handleJeScheduleClick:O,ignoreRecommendedJeSchedule:ie,onJESchedulesFormDataChange:ye,onPostJESchedule:U,setLocalDataForCategoryAndClass:he,resetTransactionCategorizationLocalData:Ce,updateSelectedVendorForTransaction:b,onSaveUpdateTransactionCategorization:P,onUpdateSelectedCheckboxTransactionIds:W,improveMonthEndInsightsUsingZeniGPTClick:_,onRemoveFileAttachment:E,onUpdateFileAttachment:H,onCloseAllThreadsSection:ee,onEditMonthEndInsightsClick:me,previewMonthEndReport:D,saveMonthEndReport:re,onOpenFileAttachmentSnackBar:Q,onCloseFileAttachmentSnackBar:te,onClickCustomerRequest:we,sendMonthEndReport:ke,markAsReview:j,onReloadPage:G,onBackClick:be,updateOperatingExpensesIdsForReview:Me,updateSectionCollapseStatus:_e,onFetchReimbursementView:Le,redirectToVendorDetailPage:Ae,updateSectionIdsForReview:pe,onUpdateFluxAnalysisUIState:Qe,fetchFluxViewOnScroll:Je,onFetchFluxViewList:et,setIsJeAccountSettingsOpened:de,onReviewClicked:Ve,setOpenDrawerClicked:it,onEstablishConnectionClick:ct,onFetchLinkTokenClick:Ot,updateReconReviewTabLocalData:jt,onReconReviewTabColumnSortConfigChanged:Ft,onSaveReconciliation:kt,onSaveReconciliationReview:le,onReconMatchedTransactionClick:oe,onReconListPageScroll:ve,onAddStatementClick:Ie}=e,{currentSelectedView:$e,missingReceipts:st,transactionView:Be,selectedPeriod:It,monthEndInsights:ot,selectedTransactionCategorizationTab:Wt,reconciliation:on}=p;switch($e){case"transaction_categorization":return Be.fetchState==="Completed"&&Be.transactionLocalData.length===0?t.jsx(bt,{tab:$e,title:Ue($e).allDoneText.title,subTitle:Ue($e).allDoneText.subTitle}):t.jsx(Up,{setCurrentFooterFormId:f,selectedPeriod:It,selectedTab:Wt,sectionId:Vt,transactionView:Be,receiptUploadEndpoint:l,authParams:i,onUpdateTransactionCategorizationUIState:J,onUpdateScrollYOffSetTransactionCategorizationUIState:Z,onFetchTransactionCategorizationList:V,onTransactionCategorizationRowClick:T,setLocalDataForCategoryAndClass:he,resetTransactionCategorizationLocalData:Ce,updateSelectedVendorForTransaction:b,onSaveUpdateTransactionCategorization:P,onUpdateSelectedCheckboxTransactionIds:W,vendorSearchAutoCompleteActions:m,vendorSearchAutoCompleteData:u,onFetchRecommendationsForEntityCategorization:$,onFetchRecommendationsForEntityCategorizationWithCustomer:R,isCOTEnabled:I});case"je_schedules":return t.jsx(cu,{setIsJeAccountSettingsOpened:de,expenseAutomationViewSelector:p,setResetJeAccountSettingsForm:h,currentFooterFormId:n,onJeAccountSettingsChange:d,onSaveJeAccountSettingsClick:c,setCurrentFooterFormId:f,handleJeScheduleClick:O,ignoreRecommendedJeSchedule:ie,onJESchedulesFormDataChange:ye,onPostJESchedule:U,vendorSearchAutoCompleteActions:m,vendorSearchAutoCompleteData:u});case"missing_receipts":return st.fetchState==="Completed"&&st.transactions.length===0?t.jsx(bt,{tab:$e,title:Ue($e).allDoneText.title,subTitle:Ue($e).allDoneText.subTitle}):t.jsx(Gu,{onUpdateMissingReceiptsUIState:B,onFetchMissingReceiptsList:F,missingReceipts:st,receiptUploadEndpoint:l,authParams:i,selectedPeriod:It,onMissingReceiptsRowClick:v,onUploadReceiptComplete:A,onUploadReceiptFetchStatus:L,onUploadReceiptAttachment:k});case"month_end_insights":if(ot!=null&&p.monthEndCloseChecksView.monthEndCloseChecks!=null){if(ot.fetchState==="Not-Started"||ot.fetchState==="In-Progress"||ot.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||ot.companyMonthEndReportTemplatesData.fetchState==="In-Progress")return t.jsx(ea,{fetchState:"In-Progress"});{const se={application:"cockpit",companyId:r,entityId:r,tab:"expense_automation",isGlobalComment:!1,entityType:"expense_automation.monthEndEmail",companyName:ot.companyName,url:window.location.href},{url:xe,...Te}=se,He={...Te};return t.jsx(Jp,{children:t.jsx(jh,{allThreadsSectionOpen:S,customerRequestData:C,companyId:r,enableZeniGPTFeature:x,filterMetaData:He,selectedPeriod:p.selectedPeriod,improveUsingZeniGPTClick:_,isZeniUser:w.userEmail?.includes("zeni.ai")??!1,monthEndReportView:ot,newThreadMetadata:se,onClickCustomerRequest:we,onCloseAllThreadsSection:ee,onCloseFileAttachmentSnackBar:te,onOpenFileAttachmentSnackBar:Q,onRemoveFileAttachment:E,onUpdateFileAttachment:H,previewMode:y,previewMonthEndReport:D,saveMonthEndReport:re,onEditClick:me,sendMonthEndReport:ke})})}}else return null;case"flux_analysis":return p.fluxAnalysis.fetchStatus.fetchState==="Completed"&&p.fluxAnalysis.sections.generalExpense.vendors.length===0&&p.fluxAnalysis.sections.reimbursement.vendors.length===0?t.jsx(bt,{tab:$e,title:Ue($e).allDoneText.title,subTitle:Ue($e).allDoneText.subTitle}):t.jsx(Pd,{fluxAnalysis:p.fluxAnalysis,selectedPeriod:p.selectedPeriod,markAsReview:j,onReloadPage:G,onBackClick:be,updateOperatingExpensesIdsForReview:Me,updateSectionIdsForReview:pe,onUpdateFluxAnalysisUIState:Qe,setCurrentFooterFormId:f,fetchFluxViewOnScroll:Je,onFetchFluxViewList:et,updateSectionCollapseStatus:_e,onFetchReimbursementView:Le,redirectToVendorDetailPage:Ae});case"reconciliation":return t.jsx(Sd,{onReconListPageScroll:ve,onReloadReconciliationListPage:M,currentFooterFormId:n,reconciliation:on,companyId:r,vendorSearchAutoCompleteActions:m,vendorSearchAutoCompleteData:u,onReviewClicked:Ve,setOpenDrawerClicked:it,setCurrentFooterFormId:f,onReconTabColumnSortConfigChanged:N,onUpdateReconcileTabLocalData:K,onEstablishConnectionClick:ct,onFetchLinkTokenClick:Ot,updateReconReviewTabLocalData:jt,onReconReviewTabColumnSortConfigChanged:Ft,onSaveReconciliation:kt,onSaveReconciliationReview:le,onReconMatchedTransactionClick:oe,onAddStatementClick:Ie});default:return t.jsx(bt,{tab:$e,title:Ue($e).allDoneText.title,subTitle:Ue($e).allDoneText.subTitle})}};function Gp(e){const n=Se(),{currentSelectedView:d}=e.expenseAutomationViewSelector,c=e.expenseAutomationViewSelector.currentSelectedView==="transaction_categorization",h=e.expenseAutomationViewSelector.currentSelectedView!=="month_end_insights"&&e.expenseAutomationViewSelector.currentSelectedView!=="flux_analysis";return t.jsx(Kp,{windowSize:n,style:{...h===!0?{paddingLeft:Oi.subSectionContainerLeftRightPadding.value(n),paddingRight:Oi.subSectionContainerLeftRightPadding.value(n)}:{paddingLeft:g[0],paddingRight:g[0]},...c===!0||d==="reconciliation"?{paddingLeft:g[0],paddingRight:g[0]}:{}},children:t.jsx(Zp,{...e})})}const Yp=e=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M22.9902 12.0403L1.12726 12.0403",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M7.68994 5.60718L1.00953 12.0402L7.68994 18.4732",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Xp=e=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M12 22.0619L11.4825 21.5444C9.66604 19.7284 7.20261 18.7082 4.63406 18.7084H2.17687C1.92268 18.7082 1.67898 18.607 1.49932 18.4272C1.31966 18.2474 1.21875 18.0036 1.21875 17.7494V2.89563C1.21875 2.64152 1.3197 2.39781 1.49938 2.21813C1.67906 2.03845 1.92276 1.9375 2.17687 1.9375H3.94219C5.53731 1.93666 7.10793 2.32989 8.51448 3.08223C9.92104 3.83457 11.12 4.92273 12.0047 6.25L12 22.0619Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M12 22.0619L12.5175 21.5444C14.334 19.7284 16.7974 18.7082 19.3659 18.7084H21.8231C22.0773 18.7082 22.321 18.607 22.5007 18.4272C22.6803 18.2474 22.7813 18.0036 22.7812 17.7494V2.89563C22.7812 2.64152 22.6803 2.39781 22.5006 2.21813C22.3209 2.03845 22.0772 1.9375 21.8231 1.9375H20.0625C18.4674 1.93666 16.8968 2.32989 15.4902 3.08223C14.0837 3.83457 12.8847 4.92273 12 6.25V22.0619Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M4.07031 6.47765C5.88047 6.33155 7.68276 6.84169 9.14781 7.91484",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M4.07031 10.3118C5.88051 10.1652 7.68295 10.6754 9.14781 11.7489",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M4.07031 14.1435C5.88058 13.9978 7.68285 14.5083 9.14781 15.5817",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M18.5882 8.40625H16.6392C16.3407 8.40684 16.0516 8.51125 15.8217 8.70157C15.5917 8.8919 15.4351 9.15629 15.3786 9.44943C15.3222 9.74258 15.3695 10.0462 15.5125 10.3083C15.6554 10.5704 15.885 10.7746 16.162 10.8859L18.1392 11.6762C18.4162 11.7876 18.6458 11.9918 18.7887 12.2539C18.9316 12.516 18.9789 12.8196 18.9225 13.1128C18.8661 13.4059 18.7095 13.6703 18.4795 13.8606C18.2495 14.0509 17.9605 14.1553 17.662 14.1559H15.7129",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M17.1504 8.40656V7.6875",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M17.1504 14.8753V14.1562",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Qp=a.div`
|
|
1516
|
+
`,Gp=e=>{const{currentFooterFormId:n,onJeAccountSettingsChange:d,onSaveJeAccountSettingsClick:c,setResetJeAccountSettingsForm:h,expenseAutomationViewSelector:p,authParams:i,receiptUploadEndpoint:l,companyId:r,vendorSearchAutoCompleteActions:m,vendorSearchAutoCompleteData:u,enableMonthEndInsightsZeniGPTFeature:x,monthEndInsightsPreviewMode:y,monthEndInsightsCustomerRequestData:C,allThreadsSectionOpen:S,loggedInUser:w,isCOTEnabled:I,setCurrentFooterFormId:f,onFetchRecommendationsForEntityCategorization:$,onFetchRecommendationsForEntityCategorizationWithCustomer:R,onTransactionCategorizationRowClick:T,onFetchMissingReceiptsList:F,onMissingReceiptsRowClick:v,onUploadReceiptAttachment:k,onUploadReceiptComplete:A,onUploadReceiptFetchStatus:L,onReconTabColumnSortConfigChanged:N,onReloadReconciliationListPage:M,onUpdateReconcileTabLocalData:K,onUpdateMissingReceiptsUIState:B,onFetchTransactionCategorizationList:V,onUpdateTransactionCategorizationUIState:J,onUpdateScrollYOffSetTransactionCategorizationUIState:G,handleJeScheduleClick:O,ignoreRecommendedJeSchedule:ie,onJESchedulesFormDataChange:ye,onPostJESchedule:U,setLocalDataForCategoryAndClass:he,resetTransactionCategorizationLocalData:Ce,updateSelectedVendorForTransaction:b,onSaveUpdateTransactionCategorization:P,onUpdateSelectedCheckboxTransactionIds:W,improveMonthEndInsightsUsingZeniGPTClick:_,onRemoveFileAttachment:E,onUpdateFileAttachment:H,onCloseAllThreadsSection:ee,onEditMonthEndInsightsClick:me,previewMonthEndReport:D,saveMonthEndReport:re,onOpenFileAttachmentSnackBar:Q,onCloseFileAttachmentSnackBar:te,onClickCustomerRequest:we,sendMonthEndReport:ke,markAsReview:j,onReloadPage:Z,onBackClick:be,updateOperatingExpensesIdsForReview:Me,updateSectionCollapseStatus:_e,onFetchReimbursementView:Le,redirectToVendorDetailPage:Ae,updateSectionIdsForReview:pe,onUpdateFluxAnalysisUIState:Qe,fetchFluxViewOnScroll:Je,onFetchFluxViewList:et,setIsJeAccountSettingsOpened:de,onReviewClicked:Ve,setOpenDrawerClicked:it,onEstablishConnectionClick:ct,onFetchLinkTokenClick:Ot,updateReconReviewTabLocalData:jt,onReconReviewTabColumnSortConfigChanged:Ft,onSaveReconciliation:kt,onSaveReconciliationReview:le,onReconMatchedTransactionClick:oe,onReconListPageScroll:ve,onAddStatementClick:Ie}=e,{currentSelectedView:$e,missingReceipts:st,transactionView:Be,selectedPeriod:It,monthEndInsights:ot,selectedTransactionCategorizationTab:Wt,reconciliation:on}=p;switch($e){case"transaction_categorization":return Be.fetchState==="Completed"&&Be.transactionLocalData.length===0?t.jsx(bt,{tab:$e,title:Ue($e).allDoneText.title,subTitle:Ue($e).allDoneText.subTitle}):t.jsx(Up,{setCurrentFooterFormId:f,selectedPeriod:It,selectedTab:Wt,sectionId:Vt,transactionView:Be,receiptUploadEndpoint:l,authParams:i,onUpdateTransactionCategorizationUIState:J,onUpdateScrollYOffSetTransactionCategorizationUIState:G,onFetchTransactionCategorizationList:V,onTransactionCategorizationRowClick:T,setLocalDataForCategoryAndClass:he,resetTransactionCategorizationLocalData:Ce,updateSelectedVendorForTransaction:b,onSaveUpdateTransactionCategorization:P,onUpdateSelectedCheckboxTransactionIds:W,vendorSearchAutoCompleteActions:m,vendorSearchAutoCompleteData:u,onFetchRecommendationsForEntityCategorization:$,onFetchRecommendationsForEntityCategorizationWithCustomer:R,isCOTEnabled:I});case"je_schedules":return t.jsx(cu,{setIsJeAccountSettingsOpened:de,expenseAutomationViewSelector:p,setResetJeAccountSettingsForm:h,currentFooterFormId:n,onJeAccountSettingsChange:d,onSaveJeAccountSettingsClick:c,setCurrentFooterFormId:f,handleJeScheduleClick:O,ignoreRecommendedJeSchedule:ie,onJESchedulesFormDataChange:ye,onPostJESchedule:U,vendorSearchAutoCompleteActions:m,vendorSearchAutoCompleteData:u});case"missing_receipts":return st.fetchState==="Completed"&&st.transactions.length===0?t.jsx(bt,{tab:$e,title:Ue($e).allDoneText.title,subTitle:Ue($e).allDoneText.subTitle}):t.jsx(Zu,{onUpdateMissingReceiptsUIState:B,onFetchMissingReceiptsList:F,missingReceipts:st,receiptUploadEndpoint:l,authParams:i,selectedPeriod:It,onMissingReceiptsRowClick:v,onUploadReceiptComplete:A,onUploadReceiptFetchStatus:L,onUploadReceiptAttachment:k});case"month_end_insights":if(ot!=null&&p.monthEndCloseChecksView.monthEndCloseChecks!=null){if(ot.fetchState==="Not-Started"||ot.fetchState==="In-Progress"||ot.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||ot.companyMonthEndReportTemplatesData.fetchState==="In-Progress")return t.jsx(ea,{fetchState:"In-Progress"});{const se={application:"cockpit",companyId:r,entityId:r,tab:"expense_automation",isGlobalComment:!1,entityType:"expense_automation.monthEndEmail",companyName:ot.companyName,url:window.location.href},{url:xe,...Te}=se,He={...Te};return t.jsx(Jp,{children:t.jsx(jh,{allThreadsSectionOpen:S,customerRequestData:C,companyId:r,enableZeniGPTFeature:x,filterMetaData:He,selectedPeriod:p.selectedPeriod,improveUsingZeniGPTClick:_,isZeniUser:w.userEmail?.includes("zeni.ai")??!1,monthEndReportView:ot,newThreadMetadata:se,onClickCustomerRequest:we,onCloseAllThreadsSection:ee,onCloseFileAttachmentSnackBar:te,onOpenFileAttachmentSnackBar:Q,onRemoveFileAttachment:E,onUpdateFileAttachment:H,previewMode:y,previewMonthEndReport:D,saveMonthEndReport:re,onEditClick:me,sendMonthEndReport:ke})})}}else return null;case"flux_analysis":return p.fluxAnalysis.fetchStatus.fetchState==="Completed"&&p.fluxAnalysis.sections.generalExpense.vendors.length===0&&p.fluxAnalysis.sections.reimbursement.vendors.length===0?t.jsx(bt,{tab:$e,title:Ue($e).allDoneText.title,subTitle:Ue($e).allDoneText.subTitle}):t.jsx(Pd,{fluxAnalysis:p.fluxAnalysis,selectedPeriod:p.selectedPeriod,markAsReview:j,onReloadPage:Z,onBackClick:be,updateOperatingExpensesIdsForReview:Me,updateSectionIdsForReview:pe,onUpdateFluxAnalysisUIState:Qe,setCurrentFooterFormId:f,fetchFluxViewOnScroll:Je,onFetchFluxViewList:et,updateSectionCollapseStatus:_e,onFetchReimbursementView:Le,redirectToVendorDetailPage:Ae});case"reconciliation":return t.jsx(Sd,{onReconListPageScroll:ve,onReloadReconciliationListPage:M,currentFooterFormId:n,reconciliation:on,companyId:r,vendorSearchAutoCompleteActions:m,vendorSearchAutoCompleteData:u,onReviewClicked:Ve,setOpenDrawerClicked:it,setCurrentFooterFormId:f,onReconTabColumnSortConfigChanged:N,onUpdateReconcileTabLocalData:K,onEstablishConnectionClick:ct,onFetchLinkTokenClick:Ot,updateReconReviewTabLocalData:jt,onReconReviewTabColumnSortConfigChanged:Ft,onSaveReconciliation:kt,onSaveReconciliationReview:le,onReconMatchedTransactionClick:oe,onAddStatementClick:Ie});default:return t.jsx(bt,{tab:$e,title:Ue($e).allDoneText.title,subTitle:Ue($e).allDoneText.subTitle})}};function Zp(e){const n=Se(),{currentSelectedView:d}=e.expenseAutomationViewSelector,c=e.expenseAutomationViewSelector.currentSelectedView==="transaction_categorization",h=e.expenseAutomationViewSelector.currentSelectedView!=="month_end_insights"&&e.expenseAutomationViewSelector.currentSelectedView!=="flux_analysis";return t.jsx(Kp,{windowSize:n,style:{...h===!0?{paddingLeft:Oi.subSectionContainerLeftRightPadding.value(n),paddingRight:Oi.subSectionContainerLeftRightPadding.value(n)}:{paddingLeft:g[0],paddingRight:g[0]},...c===!0||d==="reconciliation"?{paddingLeft:g[0],paddingRight:g[0]}:{}},children:t.jsx(Gp,{...e})})}const Yp=e=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M22.9902 12.0403L1.12726 12.0403",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M7.68994 5.60718L1.00953 12.0402L7.68994 18.4732",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Xp=e=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M12 22.0619L11.4825 21.5444C9.66604 19.7284 7.20261 18.7082 4.63406 18.7084H2.17687C1.92268 18.7082 1.67898 18.607 1.49932 18.4272C1.31966 18.2474 1.21875 18.0036 1.21875 17.7494V2.89563C1.21875 2.64152 1.3197 2.39781 1.49938 2.21813C1.67906 2.03845 1.92276 1.9375 2.17687 1.9375H3.94219C5.53731 1.93666 7.10793 2.32989 8.51448 3.08223C9.92104 3.83457 11.12 4.92273 12.0047 6.25L12 22.0619Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M12 22.0619L12.5175 21.5444C14.334 19.7284 16.7974 18.7082 19.3659 18.7084H21.8231C22.0773 18.7082 22.321 18.607 22.5007 18.4272C22.6803 18.2474 22.7813 18.0036 22.7812 17.7494V2.89563C22.7812 2.64152 22.6803 2.39781 22.5006 2.21813C22.3209 2.03845 22.0772 1.9375 21.8231 1.9375H20.0625C18.4674 1.93666 16.8968 2.32989 15.4902 3.08223C14.0837 3.83457 12.8847 4.92273 12 6.25V22.0619Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M4.07031 6.47765C5.88047 6.33155 7.68276 6.84169 9.14781 7.91484",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M4.07031 10.3118C5.88051 10.1652 7.68295 10.6754 9.14781 11.7489",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M4.07031 14.1435C5.88058 13.9978 7.68285 14.5083 9.14781 15.5817",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M18.5882 8.40625H16.6392C16.3407 8.40684 16.0516 8.51125 15.8217 8.70157C15.5917 8.8919 15.4351 9.15629 15.3786 9.44943C15.3222 9.74258 15.3695 10.0462 15.5125 10.3083C15.6554 10.5704 15.885 10.7746 16.162 10.8859L18.1392 11.6762C18.4162 11.7876 18.6458 11.9918 18.7887 12.2539C18.9316 12.516 18.9789 12.8196 18.9225 13.1128C18.8661 13.4059 18.7095 13.6703 18.4795 13.8606C18.2495 14.0509 17.9605 14.1553 17.662 14.1559H15.7129",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M17.1504 8.40656V7.6875",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M17.1504 14.8753V14.1562",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Qp=a.div`
|
|
1517
1517
|
width: 100%;
|
|
1518
1518
|
height: 100vh;
|
|
1519
1519
|
display: flex;
|
|
@@ -1533,7 +1533,7 @@ import{o,c7 as Us,q as Se,gr as Ni,gs as Vi,l as q,F as je,j as t,cD as Ws,ab as
|
|
|
1533
1533
|
width: 100%;
|
|
1534
1534
|
padding-left: ${o.sp0};
|
|
1535
1535
|
}
|
|
1536
|
-
`,Fi=a(
|
|
1536
|
+
`,Fi=a(Gs)`
|
|
1537
1537
|
height: ${o.sp3};
|
|
1538
1538
|
width: ${o.sp3};
|
|
1539
1539
|
cursor: pointer;
|
|
@@ -1543,7 +1543,7 @@ import{o,c7 as Us,q as Se,gr as Ni,gs as Vi,l as q,F as je,j as t,cD as Ws,ab as
|
|
|
1543
1543
|
width: ${o.sp3};
|
|
1544
1544
|
cursor: pointer;
|
|
1545
1545
|
color: inherit;
|
|
1546
|
-
`,{common:{footer:De,texts:{maxLimitReached:tm,confirmAction:nm},headers:om,create:im,strings:rn,texts:nn,cancel:sm,confirm:am,monthsByIndex:rm},dateFormat:{visual:{MMMDCommaYYYYformat:zi}},expenseAutomation:ln}=je.getLocalizedStrings(),Nm=e=>{const{expenseAutomationViewSelector:n,isDisabled:d,isRealtimeInsightsFeatureEnabled:c,isUncategorizedExpenseCategoryEnabled:h,isCOTEnabled:p,onUpdateTab:i,onReconTabUpdate:l,onUpdateStep:r,onSearchTextChanged:m,onRefresh:u,onClose:x,onBack:y,resetTransactionCategorizationLocalData:C,updateOperatingExpensesIdsForReview:S,clearJeScheduleLocalData:w,onSaveReconciliation:I}=e,{currentSelectedView:f,allSteps:$,missingReceipts:R,jeSchedules:T,fluxAnalysis:F,monthEndInsights:v,transactionView:k,selectedTransactionCategorizationTab:A,reconciliation:L,selectedPeriod:N}=n,[M,K]=s.useState("expenseAutomationPage"),[B,V]=s.useState(()=>{}),[J,Z]=s.useState(!1),O=Se(),ie=!!e.loggedInUser.userEmail?.includes("zeni.ai"),ye=ie?Ni:Vi,{openThread:U,setOpenThread:he}=s.useContext(ye),[Ce,b]=s.useState(!1),[P,W]=s.useState(!1),_=$.find(oe=>oe.step===f),{nextStep:E,previousStep:H}=dm($,f),{uiState:{searchString:ee,pageToken:me},totalCountByTab:D,transactions:re,fetchStateByTransactionTabs:Q,transactionLocalData:te}=k,{selectedReconAccount:we,reconciliationTabsState:{reconcile:{localData:{selectedTransactionIds:ke}}}}=L;let j="Not-Started",G="complete";switch(f){case"missing_receipts":j=R.refreshStatus.fetchState,G=R.completionStatus;break;case"je_schedules":j=T.refreshStatus.fetchState,G=T.completionStatus;break;case"month_end_insights":v!=null&&(j=v?.fetchState);break;case"flux_analysis":j=F.refreshStatus.fetchState,G=F.completionStatus;break;case"transaction_categorization":j=k.refreshStatus.fetchState,G=k.completionStatus;break;case"reconciliation":we==null?(j=L.refreshStatus.fetchState,G=L.completionStatus):(j=L.selectedReconAccount?.refreshStatus.fetchState??"Not-Started",G=L.completionStatus)}const be=()=>{B()},{saveStatus:Me,selectedCheckBoxTransactionIds:_e}=k,Le=()=>{const oe=Rs(n.fluxAnalysis.sections,n.fluxAnalysis.reviewOperatingExpensesIds),ve=q.dateNow(),{month:Ie,year:$e}=N,st=q.dateNow().set("month",Ie-1).set("year",$e).endOf("month");switch(M){case"expenseAutomationFluxPage":return{formId:"expenseAutomationFluxPage",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:oe===!0?De.markAsReviewed:nn.undo,style:{justifyContent:"space-evenly"},isLoading:n.fluxAnalysis.bulkReviewStatus.fetchState==="In-Progress",isDisabled:!1},leftSideComponent:eo(n.fluxAnalysis.reviewOperatingExpensesIds.length,fs,O,nn.vendor,f),cancelBtn:{label:De.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>{S([])}}};case"expenseAutomationTransactionsPage":return{formId:"expenseAutomationTransactionsPage",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:De.save,style:{minWidth:"96px",justifyContent:"space-evenly"},isLoading:Me.fetchState==="In-Progress",isDisabled:!1},leftSideComponent:eo(_e.length,q.MAX_SELECTION_LIMIT,O,nn.transaction,f),cancelBtn:{label:De.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>{C(A,re.map(Be=>Be.id),N,!1,D[A],q.getLineItemsByTransactionIdsFromLocalData(te,A),h,me)}}};case"expenseAutomationJESchedulePage":return{formId:"expenseAutomationJESchedulePage",nextBtnLabel:De.next,backBtnLabel:De.back,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:De.next,style:{justifyContent:"space-evenly"},isDisabled:d||_?.isNextDisabled,suffixIcon:t.jsx(Fi,{}),onClick:()=>{r(E.step)}},cancelBtn:{label:De.back,isDisabled:d||_?.isPrevDisabled,style:{width:"96px",justifyContent:"space-evenly"},prefixIcon:t.jsx(Mi,{}),onClick:()=>{r(H.step)}}};case"expenseAutomationBankReconReconcilePage":return{formId:"expenseAutomationBankReconReconcilePage",nextBtnLabel:De.reconcile,backBtnLabel:De.saveForLater,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:De.reconcile,onClick:()=>{I({reconcileAction:"reconcile"})},isDisabled:!(L.reconciliationTabsState.balances.variance.amount===0&&ve.isAfter(st)),isLoading:L.actionFetchStates.reconcileFetch.fetchState==="In-Progress",style:{justifyContent:"space-evenly",minWidth:132}},leftSideComponent:eo(ke.length,1/0,O,nn.transaction,f),cancelBtn:{onClick:()=>{I({reconcileAction:"save_reconcile_for_later"})},reverseSpinnerColor:!1,isLoading:L.actionFetchStates.saveForLaterFetch.fetchState==="In-Progress",label:De.saveForLater,style:{minWidth:132,justifyContent:"space-evenly"}}};case"expenseAutomationJEAccountSettingsPage":return{formId:"expenseAutomationJEAccountSettingsPage",nextBtnLabel:De.save,backBtnLabel:De.cancel,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:De.save,isLoading:T.accountSettingsView.saveState.fetchState==="In-Progress",style:{justifyContent:"space-evenly",minWidth:82}},cancelBtn:{onClick:()=>be(),label:De.cancel,style:{minWidth:82,justifyContent:"space-evenly"}}};default:{const Be=f==="reconciliation"&&n.reconciliation.selectedTab==="review"&&n.reconciliation.selectedAccountId!=null,It=f==="reconciliation"&&n.reconciliation.selectedAccountId==null,ot=f==="reconciliation"&&n.reconciliation.selectedTab==="reconcile"&&n.reconciliation.selectedAccountId!=null,Wt=E.step==="month_end_insights"&&(f==="flux_analysis"&&(n.fluxAnalysis.sections.generalExpense?.balancesByMonth!=null||n.fluxAnalysis.sections.reimbursement?.balancesByMonth!=null)||It),on=f==="transaction_categorization"&&n.selectedTransactionCategorizationTab==="review",se=f==="transaction_categorization"&&n.selectedTransactionCategorizationTab==="autoCategorized",xe=n.monthEndCloseChecksView.monthEndCloseChecks?.reportEmailSentDate==null&&(c||_?.isNextDisabled===!1),Te=E.step==="month_end_insights"&&(It||f==="flux_analysis")?!xe:_?.isNextDisabled===!0;return{formId:"expenseAutomationPage",nextBtnLabel:De.next,backBtnLabel:De.back,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Wt===!0?cm(n.selectedPeriod.month):De.next,style:{justifyContent:"space-evenly"},isDisabled:Te,suffixIcon:t.jsx(Fi,{}),onClick:()=>{on?i("autoCategorized"):Be?l("reconcile"):r(E.step)}},cancelBtn:{label:De.back,isDisabled:d||_?.isPrevDisabled,style:{width:"96px",justifyContent:"space-evenly"},prefixIcon:t.jsx(Mi,{}),onClick:()=>{se?i("review"):ot?l("review"):Be?y():r(H.step)}}}}}},Ae=()=>{switch(M){case"expenseAutomationFluxPage":return{confirmAction:()=>{b(!1),S([]),x()}};case"expenseAutomationTransactionsPage":return{confirmAction:()=>{b(!1),C(A,re.map(oe=>oe.id),N,!1,D[A],q.getLineItemsByTransactionIdsFromLocalData(te,A),h,me),x()}};case"expenseAutomationJESchedulePage":return{confirmAction:()=>{b(!1),w(),x()}};default:return{confirmAction:()=>{b(!1)},confirmationDescription:rn.empty}}},pe=()=>{M==="expenseAutomationFluxPage"||M==="expenseAutomationJESchedulePage"||M==="expenseAutomationTransactionsPage"?b(!0):x()},{primaryBtn:Qe,cancelBtn:Je,leftSideComponent:et}=Le(),{confirmAction:de}=Ae(),Ve=oe=>{if(f==="transaction_categorization"&&(oe==="autoCategorized"||oe==="review"))return{hideCountInTab:D[oe]>ln.common.numbers.maximumCount,count:D[oe],isFetching:Q[oe].fetchState==="In-Progress"};if(f==="reconciliation"){const{reconciliation:ve}=n,{selectedAccountId:Ie}=ve;return Ie==null?{count:0,isFetching:!1}:oe==="review"?{count:ve.accountReconciliationsByAccountID[Ie]?.accountReconEntity?.transactionsToReview.length,isFetching:ve.accountReconciliationsByAccountID[Ie]?.transactionFetchState.fetchState==="In-Progress"}:{count:ve.accountReconciliationsByAccountID[Ie]?.accountReconEntity?.transactionsToReconcile.length,isFetching:ve.accountReconciliationsByAccountID[Ie]?.transactionFetchState.fetchState==="In-Progress"}}},it=f==="reconciliation"&&L.selectedAccountId!=null&&L.selectedReconAccount!=null,{month:ct,year:Ot}=N,jt=q.dateNow().set("month",ct-1).set("year",Ot),Ft=jt.startOf("month").format(zi),kt=jt.endOf("month").format(zi),le=`${Ft} ${rn.hyphen} ${kt}`;return t.jsxs(Qp,{children:[Ce?t.jsx(Ws,{containerStyle:{width:356},titleComponent:t.jsx(xm,{children:nm}),primaryButtonText:am,secondaryButtonText:sm,proceedButtonVariant:"danger",action:{onOkClick:()=>{de()},onCancelClick:()=>b(!1)},descriptionComponent:t.jsx(fm,{children:ln.confirmationDescription})}):null,t.jsxs(em,{children:[t.jsx(Nr,{onBack:y,navBarCustomElement:f==="reconciliation"&&L.selectedAccountId!=null?t.jsx(lm,{reconciliation:L}):void 0,onReconTabUpdate:l,currentRecontab:L.selectedTab,reconcileDetailPageFetchState:L.selectedAccountId!=null?L.accountReconciliationsByAccountID[L.selectedAccountId]?.transactionFetchState.fetchState:"Not-Started",selectedReconAccountId:it?L.selectedAccountId:void 0,currentSelectedView:f,titleStyle:{justifyContent:"center",marginLeft:o.sp0},headerData:Ue(f,D.autoCategorized,it?L.selectedAccountId:void 0,it?L.selectedReconAccount?.accountReconEntity?.account.accountName:void 0,it?le:void 0),searchText:ee,currentTab:A,getTabCountAndFetchState:Ve,completionStatus:G,forceShowSubtitle:J===!0||f==="je_schedules"&&(T.fetchState==="In-Progress"||T.accountSettingsView.fetchState==="In-Progress"),refreshStatus:j,companyId:e.companyId,companyName:n.monthEndInsights?.companyName??rn.empty,isZeniUser:ie,onAllThreadsClick:()=>{U!=null&&he(null),W(!0)},onUpdateTab:i,onSearchTextChanged:m,onRefresh:u,onClose:pe}),t.jsx(Gp,{...e,isCOTEnabled:p,setIsJeAccountSettingsOpened:Z,setResetJeAccountSettingsForm:V,allThreadsSectionOpen:P,setCurrentFooterFormId:K,currentFooterFormId:M,onCloseAllThreadsSection:()=>W(!1)}),t.jsx(Ne,{controller:f!=="month_end_insights",children:t.jsx(Hi,{style:{width:"-webkit-fill-available",maxHeight:g[8]},formId:um(M),primaryBtn:Qe,leftSideComponent:et,cancelBtn:Je,separatorStyle:{marginRight:o.sp4}})})]})]})},lm=({reconciliation:e})=>{const n=vt(),{clearedBalance:d,variance:c,variancePercentage:h,deposits:p,payments:i}=e.reconciliationTabsState.balances,{balance:l}=e.selectedReconAccount?.accountReconEntity??{},{selectedReconAccount:r}=e,{transactionFetchState:m}=r??{};return t.jsx(ym,{children:t.jsxs(Cm,{children:[t.jsxs(to,{style:{justifyContent:"flex-end",width:"50%"},children:[t.jsx(no,{children:t.jsx(wm,{})}),t.jsx(oo,{children:m?.fetchState==="In-Progress"?t.jsxs(ao,{children:[t.jsx(Xt,{height:25,width:120}),t.jsx(Xt,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsx(so,{children:Ke("0,0.00",l)}),t.jsx(io,{children:ln.accountRecon.reconciliation.headers.bankBalance})]})})]}),t.jsxs(to,{children:[t.jsx(no,{children:t.jsx(vm,{})}),t.jsx(oo,{children:m?.fetchState==="In-Progress"?t.jsxs(ao,{children:[t.jsx(Xt,{height:25,width:120}),t.jsx(Xt,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsx(so,{children:Ke("0,0.00",d)}),t.jsxs(jm,{children:[t.jsx(io,{children:ln.accountRecon.reconciliation.headers.clearedBalance}),t.jsx(fe,{placement:"bottom",title:t.jsxs(km,{children:[t.jsxs(Bi,{children:[t.jsxs(Pi,{children:[i.count," ",nn.payments]}),t.jsx(_i,{children:Ke("0,0.[00]",i.totalAmount)})]}),t.jsxs(Bi,{children:[t.jsxs(Pi,{children:[p.count," ",nn.deposits]}),t.jsx(_i,{children:Ke("0,0.[00]",p.totalAmount)})]})]}),display:"flex",children:t.jsx(Sm,{})})]})]})})]}),t.jsxs(to,{style:{justifyContent:"flex-start",width:"50%"},children:[t.jsx(no,{children:t.jsx(bm,{})}),t.jsx(oo,{children:m?.fetchState==="In-Progress"?t.jsxs(ao,{children:[t.jsx(Xt,{height:25,width:120}),t.jsx(Xt,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsxs(so,{children:[t.jsx("span",{style:{color:c.amount===0?n.colors.brandColorJadeDark:n.colors.primary},children:Ke("0,0.00",c)}),h!=null&&c.amount!==0?t.jsx("span",{style:{color:n.colors.primary,marginLeft:2},children:`(${h.toFixed(2)}%)`}):null]}),t.jsx(io,{children:ln.accountRecon.reconciliation.headers.variance})]})})]})]})})},eo=(e,n,d,c,h)=>{const p=c,i=(e>1?p+"s":p)+" selected";return e>0?t.jsxs(hm,{currentView:h,style:d==="small"?{position:"absolute",top:o.sp2,left:`-${o.sp5}`}:{},children:[t.jsx(pm,{multiDigit:e>=5,children:e}),t.jsx(mm,{children:i}),e===n?t.jsx(gm,{children:`(${tm})`}):null]}):null},cm=e=>{const n=rm[e];return`${im}${rn.space}${n}${rn.space}${om.insights}`};function dm(e,n){const d=e.findIndex(l=>l.step===n);if(d===-1)throw new Error("currentStep not found in allSteps array");const c=(d+1)%e.length,h=(d-1+e.length)%e.length,p=e[c],i=e[h];return{nextStep:p,previousStep:i}}const um=e=>`${e}_form`,hm=a.div`
|
|
1546
|
+
`,{common:{footer:De,texts:{maxLimitReached:tm,confirmAction:nm},headers:om,create:im,strings:rn,texts:nn,cancel:sm,confirm:am,monthsByIndex:rm},dateFormat:{visual:{MMMDCommaYYYYformat:zi}},expenseAutomation:ln}=je.getLocalizedStrings(),Nm=e=>{const{expenseAutomationViewSelector:n,isDisabled:d,isRealtimeInsightsFeatureEnabled:c,isUncategorizedExpenseCategoryEnabled:h,isCOTEnabled:p,onUpdateTab:i,onReconTabUpdate:l,onUpdateStep:r,onSearchTextChanged:m,onRefresh:u,onClose:x,onBack:y,resetTransactionCategorizationLocalData:C,updateOperatingExpensesIdsForReview:S,clearJeScheduleLocalData:w,onSaveReconciliation:I}=e,{currentSelectedView:f,allSteps:$,missingReceipts:R,jeSchedules:T,fluxAnalysis:F,monthEndInsights:v,transactionView:k,selectedTransactionCategorizationTab:A,reconciliation:L,selectedPeriod:N}=n,[M,K]=s.useState("expenseAutomationPage"),[B,V]=s.useState(()=>{}),[J,G]=s.useState(!1),O=Se(),ie=!!e.loggedInUser.userEmail?.includes("zeni.ai"),ye=ie?Ni:Vi,{openThread:U,setOpenThread:he}=s.useContext(ye),[Ce,b]=s.useState(!1),[P,W]=s.useState(!1),_=$.find(oe=>oe.step===f),{nextStep:E,previousStep:H}=dm($,f),{uiState:{searchString:ee,pageToken:me},totalCountByTab:D,transactions:re,fetchStateByTransactionTabs:Q,transactionLocalData:te}=k,{selectedReconAccount:we,reconciliationTabsState:{reconcile:{localData:{selectedTransactionIds:ke}}}}=L;let j="Not-Started",Z="complete";switch(f){case"missing_receipts":j=R.refreshStatus.fetchState,Z=R.completionStatus;break;case"je_schedules":j=T.refreshStatus.fetchState,Z=T.completionStatus;break;case"month_end_insights":v!=null&&(j=v?.fetchState);break;case"flux_analysis":j=F.refreshStatus.fetchState,Z=F.completionStatus;break;case"transaction_categorization":j=k.refreshStatus.fetchState,Z=k.completionStatus;break;case"reconciliation":we==null?(j=L.refreshStatus.fetchState,Z=L.completionStatus):(j=L.selectedReconAccount?.refreshStatus.fetchState??"Not-Started",Z=L.completionStatus)}const be=()=>{B()},{saveStatus:Me,selectedCheckBoxTransactionIds:_e}=k,Le=()=>{const oe=Rs(n.fluxAnalysis.sections,n.fluxAnalysis.reviewOperatingExpensesIds),ve=q.dateNow(),{month:Ie,year:$e}=N,st=q.dateNow().set("month",Ie-1).set("year",$e).endOf("month");switch(M){case"expenseAutomationFluxPage":return{formId:"expenseAutomationFluxPage",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:oe===!0?De.markAsReviewed:nn.undo,style:{justifyContent:"space-evenly"},isLoading:n.fluxAnalysis.bulkReviewStatus.fetchState==="In-Progress",isDisabled:!1},leftSideComponent:eo(n.fluxAnalysis.reviewOperatingExpensesIds.length,fs,O,nn.vendor,f),cancelBtn:{label:De.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>{S([])}}};case"expenseAutomationTransactionsPage":return{formId:"expenseAutomationTransactionsPage",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:De.save,style:{minWidth:"96px",justifyContent:"space-evenly"},isLoading:Me.fetchState==="In-Progress",isDisabled:!1},leftSideComponent:eo(_e.length,q.MAX_SELECTION_LIMIT,O,nn.transaction,f),cancelBtn:{label:De.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>{C(A,re.map(Be=>Be.id),N,!1,D[A],q.getLineItemsByTransactionIdsFromLocalData(te,A),h,me)}}};case"expenseAutomationJESchedulePage":return{formId:"expenseAutomationJESchedulePage",nextBtnLabel:De.next,backBtnLabel:De.back,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:De.next,style:{justifyContent:"space-evenly"},isDisabled:d||_?.isNextDisabled,suffixIcon:t.jsx(Fi,{}),onClick:()=>{r(E.step)}},cancelBtn:{label:De.back,isDisabled:d||_?.isPrevDisabled,style:{width:"96px",justifyContent:"space-evenly"},prefixIcon:t.jsx(Mi,{}),onClick:()=>{r(H.step)}}};case"expenseAutomationBankReconReconcilePage":return{formId:"expenseAutomationBankReconReconcilePage",nextBtnLabel:De.reconcile,backBtnLabel:De.saveForLater,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:De.reconcile,onClick:()=>{I({reconcileAction:"reconcile"})},isDisabled:!(L.reconciliationTabsState.balances.variance.amount===0&&ve.isAfter(st)),isLoading:L.actionFetchStates.reconcileFetch.fetchState==="In-Progress",style:{justifyContent:"space-evenly",minWidth:132}},leftSideComponent:eo(ke.length,1/0,O,nn.transaction,f),cancelBtn:{onClick:()=>{I({reconcileAction:"save_reconcile_for_later"})},reverseSpinnerColor:!1,isLoading:L.actionFetchStates.saveForLaterFetch.fetchState==="In-Progress",label:De.saveForLater,style:{minWidth:132,justifyContent:"space-evenly"}}};case"expenseAutomationJEAccountSettingsPage":return{formId:"expenseAutomationJEAccountSettingsPage",nextBtnLabel:De.save,backBtnLabel:De.cancel,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:De.save,isLoading:T.accountSettingsView.saveState.fetchState==="In-Progress",style:{justifyContent:"space-evenly",minWidth:82}},cancelBtn:{onClick:()=>be(),label:De.cancel,style:{minWidth:82,justifyContent:"space-evenly"}}};default:{const Be=f==="reconciliation"&&n.reconciliation.selectedTab==="review"&&n.reconciliation.selectedAccountId!=null,It=f==="reconciliation"&&n.reconciliation.selectedAccountId==null,ot=f==="reconciliation"&&n.reconciliation.selectedTab==="reconcile"&&n.reconciliation.selectedAccountId!=null,Wt=E.step==="month_end_insights"&&(f==="flux_analysis"&&(n.fluxAnalysis.sections.generalExpense?.balancesByMonth!=null||n.fluxAnalysis.sections.reimbursement?.balancesByMonth!=null)||It),on=f==="transaction_categorization"&&n.selectedTransactionCategorizationTab==="review",se=f==="transaction_categorization"&&n.selectedTransactionCategorizationTab==="autoCategorized",xe=n.monthEndCloseChecksView.monthEndCloseChecks?.reportEmailSentDate==null&&(c||_?.isNextDisabled===!1),Te=E.step==="month_end_insights"&&(It||f==="flux_analysis")?!xe:_?.isNextDisabled===!0;return{formId:"expenseAutomationPage",nextBtnLabel:De.next,backBtnLabel:De.back,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Wt===!0?cm(n.selectedPeriod.month):De.next,style:{justifyContent:"space-evenly"},isDisabled:Te,suffixIcon:t.jsx(Fi,{}),onClick:()=>{on?i("autoCategorized"):Be?l("reconcile"):r(E.step)}},cancelBtn:{label:De.back,isDisabled:d||_?.isPrevDisabled,style:{width:"96px",justifyContent:"space-evenly"},prefixIcon:t.jsx(Mi,{}),onClick:()=>{se?i("review"):ot?l("review"):Be?y():r(H.step)}}}}}},Ae=()=>{switch(M){case"expenseAutomationFluxPage":return{confirmAction:()=>{b(!1),S([]),x()}};case"expenseAutomationTransactionsPage":return{confirmAction:()=>{b(!1),C(A,re.map(oe=>oe.id),N,!1,D[A],q.getLineItemsByTransactionIdsFromLocalData(te,A),h,me),x()}};case"expenseAutomationJESchedulePage":return{confirmAction:()=>{b(!1),w(),x()}};default:return{confirmAction:()=>{b(!1)},confirmationDescription:rn.empty}}},pe=()=>{M==="expenseAutomationFluxPage"||M==="expenseAutomationJESchedulePage"||M==="expenseAutomationTransactionsPage"?b(!0):x()},{primaryBtn:Qe,cancelBtn:Je,leftSideComponent:et}=Le(),{confirmAction:de}=Ae(),Ve=oe=>{if(f==="transaction_categorization"&&(oe==="autoCategorized"||oe==="review"))return{hideCountInTab:D[oe]>ln.common.numbers.maximumCount,count:D[oe],isFetching:Q[oe].fetchState==="In-Progress"};if(f==="reconciliation"){const{reconciliation:ve}=n,{selectedAccountId:Ie}=ve;return Ie==null?{count:0,isFetching:!1}:oe==="review"?{count:ve.accountReconciliationsByAccountID[Ie]?.accountReconEntity?.transactionsToReview.length,isFetching:ve.accountReconciliationsByAccountID[Ie]?.transactionFetchState.fetchState==="In-Progress"}:{count:ve.accountReconciliationsByAccountID[Ie]?.accountReconEntity?.transactionsToReconcile.length,isFetching:ve.accountReconciliationsByAccountID[Ie]?.transactionFetchState.fetchState==="In-Progress"}}},it=f==="reconciliation"&&L.selectedAccountId!=null&&L.selectedReconAccount!=null,{month:ct,year:Ot}=N,jt=q.dateNow().set("month",ct-1).set("year",Ot),Ft=jt.startOf("month").format(zi),kt=jt.endOf("month").format(zi),le=`${Ft} ${rn.hyphen} ${kt}`;return t.jsxs(Qp,{children:[Ce?t.jsx(Ws,{containerStyle:{width:356},titleComponent:t.jsx(xm,{children:nm}),primaryButtonText:am,secondaryButtonText:sm,proceedButtonVariant:"danger",action:{onOkClick:()=>{de()},onCancelClick:()=>b(!1)},descriptionComponent:t.jsx(fm,{children:ln.confirmationDescription})}):null,t.jsxs(em,{children:[t.jsx(Nr,{onBack:y,navBarCustomElement:f==="reconciliation"&&L.selectedAccountId!=null?t.jsx(lm,{reconciliation:L}):void 0,onReconTabUpdate:l,currentRecontab:L.selectedTab,reconcileDetailPageFetchState:L.selectedAccountId!=null?L.accountReconciliationsByAccountID[L.selectedAccountId]?.transactionFetchState.fetchState:"Not-Started",selectedReconAccountId:it?L.selectedAccountId:void 0,currentSelectedView:f,titleStyle:{justifyContent:"center",marginLeft:o.sp0},headerData:Ue(f,D.autoCategorized,it?L.selectedAccountId:void 0,it?L.selectedReconAccount?.accountReconEntity?.account.accountName:void 0,it?le:void 0),searchText:ee,currentTab:A,getTabCountAndFetchState:Ve,completionStatus:Z,forceShowSubtitle:J===!0||f==="je_schedules"&&(T.fetchState==="In-Progress"||T.accountSettingsView.fetchState==="In-Progress"),refreshStatus:j,companyId:e.companyId,companyName:n.monthEndInsights?.companyName??rn.empty,isZeniUser:ie,onAllThreadsClick:()=>{U!=null&&he(null),W(!0)},onUpdateTab:i,onSearchTextChanged:m,onRefresh:u,onClose:pe}),t.jsx(Zp,{...e,isCOTEnabled:p,setIsJeAccountSettingsOpened:G,setResetJeAccountSettingsForm:V,allThreadsSectionOpen:P,setCurrentFooterFormId:K,currentFooterFormId:M,onCloseAllThreadsSection:()=>W(!1)}),t.jsx(Ne,{controller:f!=="month_end_insights",children:t.jsx(Hi,{style:{width:"-webkit-fill-available",maxHeight:g[8]},formId:um(M),primaryBtn:Qe,leftSideComponent:et,cancelBtn:Je,separatorStyle:{marginRight:o.sp4}})})]})]})},lm=({reconciliation:e})=>{const n=vt(),{clearedBalance:d,variance:c,variancePercentage:h,deposits:p,payments:i}=e.reconciliationTabsState.balances,{balance:l}=e.selectedReconAccount?.accountReconEntity??{},{selectedReconAccount:r}=e,{transactionFetchState:m}=r??{};return t.jsx(ym,{children:t.jsxs(Cm,{children:[t.jsxs(to,{style:{justifyContent:"flex-end",width:"50%"},children:[t.jsx(no,{children:t.jsx(wm,{})}),t.jsx(oo,{children:m?.fetchState==="In-Progress"?t.jsxs(ao,{children:[t.jsx(Xt,{height:25,width:120}),t.jsx(Xt,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsx(so,{children:Ke("0,0.00",l)}),t.jsx(io,{children:ln.accountRecon.reconciliation.headers.bankBalance})]})})]}),t.jsxs(to,{children:[t.jsx(no,{children:t.jsx(vm,{})}),t.jsx(oo,{children:m?.fetchState==="In-Progress"?t.jsxs(ao,{children:[t.jsx(Xt,{height:25,width:120}),t.jsx(Xt,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsx(so,{children:Ke("0,0.00",d)}),t.jsxs(jm,{children:[t.jsx(io,{children:ln.accountRecon.reconciliation.headers.clearedBalance}),t.jsx(fe,{placement:"bottom",title:t.jsxs(km,{children:[t.jsxs(Bi,{children:[t.jsxs(Pi,{children:[i.count," ",nn.payments]}),t.jsx(_i,{children:Ke("0,0.[00]",i.totalAmount)})]}),t.jsxs(Bi,{children:[t.jsxs(Pi,{children:[p.count," ",nn.deposits]}),t.jsx(_i,{children:Ke("0,0.[00]",p.totalAmount)})]})]}),display:"flex",children:t.jsx(Sm,{})})]})]})})]}),t.jsxs(to,{style:{justifyContent:"flex-start",width:"50%"},children:[t.jsx(no,{children:t.jsx(bm,{})}),t.jsx(oo,{children:m?.fetchState==="In-Progress"?t.jsxs(ao,{children:[t.jsx(Xt,{height:25,width:120}),t.jsx(Xt,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsxs(so,{children:[t.jsx("span",{style:{color:c.amount===0?n.colors.brandColorJadeDark:n.colors.primary},children:Ke("0,0.00",c)}),h!=null&&c.amount!==0?t.jsx("span",{style:{color:n.colors.primary,marginLeft:2},children:`(${h.toFixed(2)}%)`}):null]}),t.jsx(io,{children:ln.accountRecon.reconciliation.headers.variance})]})})]})]})})},eo=(e,n,d,c,h)=>{const p=c,i=(e>1?p+"s":p)+" selected";return e>0?t.jsxs(hm,{currentView:h,style:d==="small"?{position:"absolute",top:o.sp2,left:`-${o.sp5}`}:{},children:[t.jsx(pm,{multiDigit:e>=5,children:e}),t.jsx(mm,{children:i}),e===n?t.jsx(gm,{children:`(${tm})`}):null]}):null},cm=e=>{const n=rm[e];return`${im}${rn.space}${n}${rn.space}${om.insights}`};function dm(e,n){const d=e.findIndex(l=>l.step===n);if(d===-1)throw new Error("currentStep not found in allSteps array");const c=(d+1)%e.length,h=(d-1+e.length)%e.length,p=e[c],i=e[h];return{nextStep:p,previousStep:i}}const um=e=>`${e}_form`,hm=a.div`
|
|
1547
1547
|
display: flex;
|
|
1548
1548
|
justify-content: flex-start;
|
|
1549
1549
|
align-items: center;
|