@zeniai/web-cockpit-ui 1.15.34-dev → 1.15.35-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-DSufuSEI-BugcK5ko.js → ACHDetailsPage-CdyuCPU8-0VceC4Oh.js} +1 -1
- package/dist/assets/{AIPerformancePage-Df0tJkyd-C5l4T96t.js → AIPerformancePage-GW2UlhRu-Bfc988ot.js} +1 -1
- package/dist/assets/AccountInfoPage-BQksD-qN-CQrQ5LJ4.js +18 -0
- package/dist/assets/{AccountInfoPageContent-C7Xs6ju3-CvFu_KWB.js → AccountInfoPageContent-Dn6yodzf-C1aQIT5z.js} +7 -7
- package/dist/assets/{AccountLockedInfoModal-D5rAyYPe-cRoXMFrB.js → AccountLockedInfoModal-7MLTBsWb-kQqWsBqk.js} +1 -1
- package/dist/assets/{AccountReconDetailsDrawerPage-BvnBJmol-BxGJXQpl.js → AccountReconDetailsDrawerPage-CUvBGVmt-CY2NmAYD.js} +1 -1
- package/dist/assets/{AccountRow-DtE1mQFq-sRlcgWT1.js → AccountRow-t-WESYF_-BZd9LxDz.js} +14 -14
- package/dist/assets/{AccountsPromoCardStack-D14FDzTY-CAlFlxNB.js → AccountsPromoCardStack-C0Ht_d_M-1zanAeyR.js} +1 -1
- package/dist/assets/{AddAddressForCardDrawer-C9_gjvsQ-xMzrtCOD.js → AddAddressForCardDrawer-CpDfjROc-B4piq4St.js} +1 -1
- package/dist/assets/{AddToWalletPage-B_7pqvLH-CAYlL9WC.js → AddToWalletPage-CPYp6JZP-Cgen85QG.js} +1 -1
- package/dist/assets/{AgingReportsPage-CRFlM3H1-DhYuRisV.js → AgingReportsPage-BRChA3Xv-BV6vq-Aj.js} +3 -3
- package/dist/assets/{AllUserItems-LlhM8bBU-N-OwUUn2.js → AllUserItems-CUlWgl79-RT_0EGEc.js} +1 -1
- package/dist/assets/{ApAgingDetailPage-CTxNOPhD-DrGk4MjA.js → ApAgingDetailPage-D7u_ghQp-CmtSt3LQ.js} +6 -6
- package/dist/assets/{AppBasePage-DRQ76rXe-BbmVnMJF.js → AppBasePage-bvoaHTtg-Bi873Eqq.js} +1 -1
- package/dist/assets/{AppDrawerContent-CIXhnJBJ-DkcT-gQA.js → AppDrawerContent-DYDi-djG-Cr9HlceI.js} +1 -1
- package/dist/assets/{ApprovalRulesSettingsPage-DYrcZm5--Di4DgXFx.js → ApprovalRulesSettingsPage-CGO_GK8B-C3p-mE2c.js} +1 -1
- package/dist/assets/{ArAgingChart-BwEspm7G-DNjHaENA.js → ArAgingChart-DBuqIeaR-C9LO_snS.js} +4 -4
- package/dist/assets/{ArAgingDetailPage-Dy9woFr0-Dwalts78.js → ArAgingDetailPage-ALGyVMJV-BsdNBEqd.js} +4 -4
- package/dist/assets/{AttachmentView-CF6Tiq1u-ScD4RZ91.js → AttachmentView-BIeDapyc-BG8BqDh9.js} +1 -1
- package/dist/assets/{BankAccountSection-DyPS4RZK-Bc2VKdEG.js → BankAccountSection-BQKaKFnm-DHGgFmbL.js} +1 -1
- package/dist/assets/{BankAccountWarningSection-Dr8XVfsN-Bh1VpxWI.js → BankAccountWarningSection-DeUkht1G--scnEmUk.js} +1 -1
- package/dist/assets/{BankConnectionsSettingsPage-h7ZnZhy5-EKV1mb1Z.js → BankConnectionsSettingsPage-qldLiM1M-CPdyIAUt.js} +1 -1
- package/dist/assets/{BillDetailPage-KSkeLjtu-DDizjGfx.js → BillDetailPage-BPqPHZcD-BcX87XdC.js} +1 -1
- package/dist/assets/{BillPayApprovalRuleDetailPage-C3VQacD2-ndVmYW9Y.js → BillPayApprovalRuleDetailPage-FW3E7XSE-Bj7z3Fiz.js} +5 -5
- package/dist/assets/{BillPayApprovalRulesPage-DMmnARE3-BHk6XaxH.js → BillPayApprovalRulesPage-BGotlrLK-C4wvOhcK.js} +1 -1
- package/dist/assets/{BillPayPromoPage-CZ34fQRr-h45OCD6V.js → BillPayPromoPage-DvoccD5_-9WUX2zRh.js} +5 -5
- package/dist/assets/{BillPaySetUpPage-DF-cMiJC-Ccb6fwyP.js → BillPaySetUpPage-DhjIDy8h-D7gIdBq_.js} +1 -1
- package/dist/assets/{BillingSettingsPage-DNmOo0mj-BgBv8nRa.js → BillingSettingsPage-CmO4DZ-a-TmRopedQ.js} +1 -1
- package/dist/assets/{BillsBulkReviewDrawerPage-CM1RYrRS-7XSi35in.js → BillsBulkReviewDrawerPage-4vzF3bG9-C3VxBwnG.js} +1 -1
- package/dist/assets/{BoxItem-Dy41mKN9-CZiGGLPk.js → BoxItem-B6i9yx2h-8tTsCvCc.js} +1 -1
- package/dist/assets/{BusinessVerificationPage-BSL5f5yW-Ccd_M7Ux.js → BusinessVerificationPage-DuEh8MkZ-CPUH1p9f.js} +1 -1
- package/dist/assets/{CardNumberSubText--wffxyL2-Dzc9wag1.js → CardNumberSubText-BEVRq2PI-CBvs6qd9.js} +1 -1
- package/dist/assets/{CashbackDetailPage-BuywSIvA-Dj0FTjqV.js → CashbackDetailPage--SHtNWGE-D0op8BJu.js} +1 -1
- package/dist/assets/{ChargeCardDetailPage-Fx1upN8E-BfETR_eB.js → ChargeCardDetailPage-EFRUpv7y-BxiQ-wFB.js} +1 -1
- package/dist/assets/{ChargeCardListPage-CkqWU4gN-CkHuHVFN.js → ChargeCardListPage-CFB5EHCZ-DwRWhMet.js} +1 -1
- package/dist/assets/{ChargeCardListTable-lwxY_gLZ-DZ2VoxeT.js → ChargeCardListTable-DM_h-dzr-CxMVtKFB.js} +1 -1
- package/dist/assets/{ChargeCardPaymentHistoryPage-CvTW120H-ByJ1xGtA.js → ChargeCardPaymentHistoryPage-CPZj9te2-acCaXNd-.js} +1 -1
- package/dist/assets/ChargeCardPromoPage-BWwBfycu-CAS6um23.js +222 -0
- package/dist/assets/{ChargeCardSetupPage-D_LWSQOa-BwUtTkP2.js → ChargeCardSetupPage-Epn4xe2x-CkUn76sD.js} +3 -3
- package/dist/assets/{ChargeCardStatementsPage-B7qX0zl3-C66Fu0LS.js → ChargeCardStatementsPage-Bu7OdYhw-oLOXCaTu.js} +1 -1
- package/dist/assets/{CheckDepositDrawerPage-oWf5X7rL-5KpdpyEY.js → CheckDepositDrawerPage-DQnqizMV-eQHX-470.js} +1 -1
- package/dist/assets/{CollapsableReportTable-Cfh-EfEQ-CKv-H0OC.js → CollapsableReportTable-CSVzLWq_-CmmDaO6f.js} +271 -271
- package/dist/assets/{CompanyOfficerDetailsSection-CFg0p5uA-CJ156x7J.js → CompanyOfficerDetailsSection-Pwtunf36-D6txAI6l.js} +1 -1
- package/dist/assets/{CompanyPassportCard-C5j_KoZL-CPJCD4ZW.js → CompanyPassportCard-DfPPft95-Clb_fVZP.js} +4 -4
- package/dist/assets/{CompanyPassportPage-DtEQ7a68-BZL6spEi.js → CompanyPassportPage-aNL_m3a2-r2mVOoQ8.js} +1 -1
- package/dist/assets/{CompleteProfile-DLNtc5N7-B7HW7ybq.js → CompleteProfile-DmeE0Xjt-BcBZ6wma.js} +1 -1
- package/dist/assets/{ConfettiBurst-B4gz9uC9-BhJEyb5s.js → ConfettiBurst-s04ELXDS-BW01uxDM.js} +1 -1
- package/dist/assets/{ConstrainedInnerElement-BeIpAPjB-C3jCz_Fx.js → ConstrainedInnerElement-BeIpAPjB-CaoYd0_P.js} +1 -1
- package/dist/assets/{CreateOrEditVendorPage-Bd61yH0G-DpW83MJ2.js → CreateOrEditVendorPage-D3oCIz1P-DTzyUV9b.js} +1 -1
- package/dist/assets/{CreditCardPaymentDrawerPage-NtnEWUdG-DLELauiu.js → CreditCardPaymentDrawerPage-DPXaPj4B-1z2GwFLS.js} +1 -1
- package/dist/assets/{CurrencySelectField-CaQgbP8P-Cqqb_KBc.js → CurrencySelectField-CtKQBmBI-q57973By.js} +1 -1
- package/dist/assets/{CustomerOnboardingActivationPage-BnBFEWaX-Dn3wQumA.js → CustomerOnboardingActivationPage-DCQvUK8d-CVTcQu6u.js} +1 -1
- package/dist/assets/CustomerOnboardingContainerPage-Dm4ySQZZ-BvOTc4ng.js +1 -0
- package/dist/assets/{CustomerOnboardingDetailPageSkeleton-Deaz4PM6-BDZvJWDz.js → CustomerOnboardingDetailPageSkeleton-BVJ6jsqR-BsJw-Ope.js} +1 -1
- package/dist/assets/{CustomerOnboardingNoStepsPage-C8cmsaOC-BJyq1bJL.js → CustomerOnboardingNoStepsPage-DQcf1Pyg-DdjDIchQ.js} +1 -1
- package/dist/assets/{CustomerOnboardingPage-CSSgj26J-N4cabpr0.js → CustomerOnboardingPage-CLNt38t0-D5-M1y80.js} +1 -1
- package/dist/assets/{CustomerOnboardingProductSuitePage-DU7qzP1f-2w9ZQcUU.js → CustomerOnboardingProductSuitePage-SyWJAHJ5-DCcbBC8z.js} +1 -1
- package/dist/assets/{Dashboard-DPXzM2TM-6t8lQHvd.js → Dashboard-DW6P3oLC-D1tHml1O.js} +1 -1
- package/dist/assets/{DashboardReportPage-CWgH0Bn9-BvMXyb8g.js → DashboardReportPage-Cp04-QUV-B7AXOtvv.js} +1 -1
- package/dist/assets/{DashboardSidebarBackgroundAnimation-DL2Awq0k-CURcbn_K.js → DashboardSidebarBackgroundAnimation-CKoyjUHm-DewB5pFB.js} +1 -1
- package/dist/assets/{DepositAccTransactionItem-CuWxNHSp-Da2H1v88.js → DepositAccTransactionItem-kZL4La9A-C6fVz6NV.js} +1 -1
- package/dist/assets/{DepositAccTransactionListPage-BHs8-LpV-C7V5-8Rf.js → DepositAccTransactionListPage-C_GPoFDS-Bnscj1hg.js} +3 -3
- package/dist/assets/{DomesticWireDetailsPage-CRfm0oqJ-C4r-lW_y.js → DomesticWireDetailsPage-CL-gGug5-Dmorx9NL.js} +1 -1
- package/dist/assets/{DownloadOverlay--ICWviQz-Q6tZiS37.js → DownloadOverlay-JdIA_Qvk-wAu7AAW1.js} +1 -1
- package/dist/assets/{DrawerPage-DoJkjp69-BGpDDN7R.js → DrawerPage-_F2zRGIo-CQDApgUJ.js} +1 -1
- package/dist/assets/{EditPeoplePage-B-zEdQqt-BrFyNgmY.js → EditPeoplePage-Cqd73zkA-moU29OZ-.js} +1 -1
- package/dist/assets/{EditReimbursementDetailPage-BdfJj8-u-BwPuRwof.js → EditReimbursementDetailPage--T5T_fJG-CaXN1fuc.js} +1 -1
- package/dist/assets/EntityDetailPage-CAu9l8_o-DQd9jfhM.js +18 -0
- package/dist/assets/{EntitySummarySection-BYP9LNlh-CHZV8J2r.js → EntitySummarySection-D1QM7cY6-BWMV3RUk.js} +1 -1
- package/dist/assets/{ExpenseAutomationOverviewPage-UKPGezFZ-ynbYpvOr.js → ExpenseAutomationOverviewPage-pciCiajG-DOlwLojR.js} +1 -1
- package/dist/assets/{ExpenseAutomationPage-5qqhqwjY-BNjM9KYY.js → ExpenseAutomationPage-CYKu1ufk-BgHRQ_o6.js} +21 -21
- package/dist/assets/{ExpressPayPage-BaLCnmxC-DyZ_NbAE.js → ExpressPayPage-BCMf-60G-DgcplXv5.js} +8 -8
- package/dist/assets/{FeaturePreviewPage-DJvcim4v-B-0y2hox.js → FeaturePreviewPage-Dj5OXPVN-2xodjQZz.js} +1 -1
- package/dist/assets/{FollowStepsSection-DiAM2oU9-DVhX1hhq.js → FollowStepsSection-ZwhfJWnC-WC244m2S.js} +1 -1
- package/dist/assets/GlobalReviewListPage-AZtnVYVQ-HrXervPX.js +291 -0
- package/dist/assets/{InformationCardStack-bDJV8MEl-DKR8Zvn9.js → InformationCardStack-D8cmcS4k-ucNvTFnG.js} +1 -1
- package/dist/assets/{InsightsCardStack-Ba7C5_Ql-1E6nbw33.js → InsightsCardStack-CRbYGyti-BG-J4zTW.js} +2 -2
- package/dist/assets/{InsightsSection-BFviX80K-CRFJKeH_.js → InsightsSection-B7cEUOjq-CHOA81kF.js} +2 -2
- package/dist/assets/{IntegrationsSettingsPage--kXCS3f1-HcQyCW82.js → IntegrationsSettingsPage-Cu70a3gO-qesbn3EL.js} +2 -2
- package/dist/assets/{InternationalWireSwiftDetailsPage-DfKrYbaB-DwvyB1Uq.js → InternationalWireSwiftDetailsPage-D_RuMP2E-CqXJrwow.js} +1 -1
- package/dist/assets/{InternationalWireVerificationPage-DU6447M_-YLqWsFbY.js → InternationalWireVerificationPage-CqpE7nR5-BRwgb-BA.js} +1 -1
- package/dist/assets/{InviteFormPage-D3FNgm9B-BwvxtcvY.js → InviteFormPage-BU3bkjN3-DJZLZema.js} +1 -1
- package/dist/assets/{InvitePageListView-D4wRSwJW-DPbFsvfR.js → InvitePageListView-BfRPKPse-BUIcdEL2.js} +1 -1
- package/dist/assets/{InvitePeoplePage-DSFk8lEF-DpuHc0lh.js → InvitePeoplePage-DFfZPbsO-DIubZIn-.js} +1 -1
- package/dist/assets/{InvoiceUploadSection-DaS4D1em-CK_Ayuq4.js → InvoiceUploadSection-BwqSfbYC-EOja7gNg.js} +1 -1
- package/dist/assets/{IssueChargeCardPage-CrbIqdSx-Bp9X1BXe.js → IssueChargeCardPage-BB83Aeyd-D9TAck5s.js} +1 -1
- package/dist/assets/{LabeledAddressValue-CUr2BnHq-DfiyDPyB.js → LabeledAddressValue-CK-YJ1cO-BIV6IRFP.js} +1 -1
- package/dist/assets/{LabeledAddressValueField-DL3wJoZC-CMggf1RU.js → LabeledAddressValueField-BppwMtJ1-Dgoqu5O4.js} +1 -1
- package/dist/assets/{LabeledControlledCheckBoxField-DQUXZSFS-CPn0l33X.js → LabeledControlledCheckBoxField-zpbzob1x-DTorn_1A.js} +1 -1
- package/dist/assets/{LabeledCountryMultiSelectField-C6IWrKo4-CcQcxFW7.js → LabeledCountryMultiSelectField-DrZ69tWB--r4Tq0BJ.js} +1 -1
- package/dist/assets/{LabeledCreatableSingleSelectField-m_D3aJpG-DPOvsRA4.js → LabeledCreatableSingleSelectField-D-rSPg1Y-ak5nvuiq.js} +1 -1
- package/dist/assets/{LabeledDocumentField-B19zNNVZ-Du4OcR6Y.js → LabeledDocumentField-CBQeAeRc-D56y9oeO.js} +1 -1
- package/dist/assets/{LabeledDropDownFormattedTextField-D4cHrsba-DGjSp6HD.js → LabeledDropDownFormattedTextField-5t5k_pgq-CfuE84-6.js} +1 -1
- package/dist/assets/{LabeledText-H1pSTEtd-BHLnDTFr.js → LabeledText-tLPpd4Wp-Cw2ZTitB.js} +1 -1
- package/dist/assets/{LabeledUserSingleSelectWithSubtitlesField-C0bJoy6U-CBE1zspu.js → LabeledUserSingleSelectWithSubtitlesField-D5zZUAVV-DVMrLokL.js} +3 -3
- package/dist/assets/{LabeledZeniRolesDropDownField-D0KIAWFW-CQ1uXRKO.js → LabeledZeniRolesDropDownField-DZ9boJMt-KCvascmZ.js} +1 -1
- package/dist/assets/{LinkJETransactionPage-LfkM9DYO-CSpsV_Z3.js → LinkJETransactionPage-C99UMrwp-9iiMpHD1.js} +1 -1
- package/dist/assets/{LockCardPage-lTzQY_pw-BYsKWV6j.js → LockCardPage-DE5Zw1p--CmfozmOj.js} +6 -6
- package/dist/assets/{LowBalancePopup-DXPPHYS1-CB0hADnS.js → LowBalancePopup-BD9saCcf-C9aiJowo.js} +1 -1
- package/dist/assets/MagicLinkACHDetailsPage-pyI_8fZk-CbyceRk3.js +1 -0
- package/dist/assets/MagicLinkDomesticWireDetailsPage-leEpcwab-DAkBv8v1.js +1 -0
- package/dist/assets/MagicLinkInternationalWireDetailsPage-CJRYlkvp-pCJgKy6F.js +1 -0
- package/dist/assets/{MagicLinkSuccessPage-BrQk5kYZ-Dws1_rIA.js → MagicLinkSuccessPage-BxXyF-Sp-BUdh8eIy.js} +1 -1
- package/dist/assets/{MagicLinkTitleSection-vHYX92L1-B1QKRjFr.js → MagicLinkTitleSection-DajyP-ys-Be4ZqDQL.js} +1 -1
- package/dist/assets/{MailingDetailsSection-vydT4UOr-DSxQiRSi.js → MailingDetailsSection-F1i0rBkv-CZo5kIPL.js} +1 -1
- package/dist/assets/{MyBankConnectionsSettingsPage-BtT9OQ_b-D1PjSf7q.js → MyBankConnectionsSettingsPage-BE1pUnaR-BPnyB1YE.js} +1 -1
- package/dist/assets/{MyPendingActivationChargeCardListPage-5E28yAfQ-DZoHwB3h.js → MyPendingActivationChargeCardListPage-CviCM09N-BNRf9wnQ.js} +1 -1
- package/dist/assets/{MyProfileSettingsPage-DQBSh-S5-C_KLZ_rh.js → MyProfileSettingsPage-iREvm7LK-BHFViMqO.js} +1 -1
- package/dist/assets/{NavBarWithPicker-1UPJ_fiE-iY8P9Wot.js → NavBarWithPicker-r-K_Pjsb-CmAh3bpT.js} +1 -1
- package/dist/assets/{NavigationArrow-CeYvXgly-CXWFEDMQ.js → NavigationArrow-CKhWji3v-aZKiVTlV.js} +1 -1
- package/dist/assets/{NavigationDots-CXAszOHQ-HtQg6iz5.js → NavigationDots-OShASt5i-Bc5YcJG5.js} +1 -1
- package/dist/assets/{NewGlobalMerchantPage-DXSlGPbc-DidlOClT.js → NewGlobalMerchantPage-2-kYqTDF-CV5JZ9Yl.js} +1 -1
- package/dist/assets/{NoDataChart-BQdJyfHh-BLmune73.js → NoDataChart-BN3zyJkX-DustlDSJ.js} +1 -1
- package/dist/assets/{NoDataTable-B__TVPte-CetA5lza.js → NoDataTable-D0cyK_1j-BWgbh49q.js} +1 -1
- package/dist/assets/{NotFoundPage-Cs25xsWz-DnZv-DIM.js → NotFoundPage-yrt6kuPH-CdqbIt8C.js} +6 -6
- package/dist/assets/{NotificationSettingsPage-Dm3zOscr-DKDyywX2.js → NotificationSettingsPage-CX3Hkg6o-D8A68okq.js} +1 -1
- package/dist/assets/{NotificationsListConfig-D0knaijJ-NyDzwfbC.js → NotificationsListConfig-Cyzhla-8-CBrC2O9h.js} +1 -1
- package/dist/assets/{NotificationsPage-czQmfW2r-DksNFGUv.js → NotificationsPage-O7M0pMnc-Bp7VY2al.js} +1 -1
- package/dist/assets/OpExByVendorPage-DpMGBmkQ-DaQIIDYq.js +100 -0
- package/dist/assets/{OverlayContainerPage-D4QU0p4o-li8hzYjf.js → OverlayContainerPage-D4QU0p4o-BcMNtftY.js} +1 -1
- package/dist/assets/{PandLWithForecastPage-B7cwWwMK-BW6yjf-v.js → PandLWithForecastPage-Cbt0YlVL-B7KI2QNo.js} +2 -2
- package/dist/assets/{PaymentAccountSetupBillingAddressSection-CkYtTRY5-DMMQt9qf.js → PaymentAccountSetupBillingAddressSection-B2xEqKKc-DTCpk1kt.js} +1 -1
- package/dist/assets/{PeoplePage-DNTbzljs-Bfp0W5JF.js → PeoplePage-CUr5cz1w-B26v5CzR.js} +1 -1
- package/dist/assets/{Preview-BsIYoVSv.js → Preview-CEK51ZCO.js} +1 -1
- package/dist/assets/{ProductsCarousel-CTiD9zA7-D7cEl2bl.js → ProductsCarousel-t8HIs4J6-6BwcwXGL.js} +1 -1
- package/dist/assets/{PromoBaseCards-BmtlcPBm-DdDmICph.js → PromoBaseCards-6Uh8eokP-Cj1KOyAw.js} +1 -1
- package/dist/assets/{QBOConnectionDialog-B1y3hDGT-B8UGOz7A.js → QBOConnectionDialog-BbmqcpYW-rlXtEwUQ.js} +1 -1
- package/dist/assets/{QBOSetupSection-DevcmmCv-C2NxYIUb.js → QBOSetupSection-u5dKqaH8-Cw9rFHWf.js} +1 -1
- package/dist/assets/ReimbursementApprovalRuleDetailPage-DxSrYBkv-sfO_zxiL.js +32 -0
- package/dist/assets/{ReimbursementApprovalRulesPage-CvFHaDmE-Bk4uKO7k.js → ReimbursementApprovalRulesPage-BL2GpJIG-ByiCWQ8P.js} +1 -1
- package/dist/assets/{ReimbursementDetailPage-CMplGhml--7oTvGch.js → ReimbursementDetailPage-D3qTbpPg-6N8BmeyZ.js} +1 -1
- package/dist/assets/{ReimbursementPromoPage-0d-lo-ve-BFl3c8SE.js → ReimbursementPromoPage-DuwxKGGm-DVNFf58G.js} +1 -1
- package/dist/assets/{ReimbursementSetUpPage-T3ErpIj4-BkNsUy2n.js → ReimbursementSetUpPage-Du4kRXbO-IZ-1Hd0h.js} +7 -7
- package/dist/assets/{ReimbursementsBulkReviewDrawerPage-CnyiYR81-D8NoJfkg.js → ReimbursementsBulkReviewDrawerPage-BmlYoVy4-BYNrk6QR.js} +1 -1
- package/dist/assets/{ReloadCard-CI-iJa1w-CU7osnQb.js → ReloadCard-BSiXuJWg-S2NiaAjj.js} +1 -1
- package/dist/assets/{ReportTableViewSelector-CM11mXKF-DKJl505X.js → ReportTableViewSelector-KgvX6wt6-CFIrG4n5.js} +1 -1
- package/dist/assets/{ReportsPage-DzuQNoMA-ORn4o7l_.js → ReportsPage-Bt24BITW-DoLBuKPr.js} +5 -5
- package/dist/assets/{RevenueChart-iDdrXSzX-BD1q5u9E.js → RevenueChart-iH_Xl63n-Bobzdvk9.js} +14 -14
- package/dist/assets/{ReviewDetailsPage-DdS8Ssmq-CpId9CQp.js → ReviewDetailsPage-CwPsM3uL-DU9meW3Q.js} +53 -53
- package/dist/assets/{ReviewOverlay-D39FMx3p-DPQk54i4.js → ReviewOverlay-DOqgOSnM-DIJSsTrl.js} +1 -1
- package/dist/assets/{RoleWithToolTip-BMEgXHWf-CYv1exk7.js → RoleWithToolTip-D6q4Wd6X-D2UbaxXJ.js} +1 -1
- package/dist/assets/{ScheduleDetailsFixedAssetsPage-YdBRhUc0-1nXwHDMr.js → ScheduleDetailsFixedAssetsPage-_bJob_HD-ZRo-OTit.js} +1 -1
- package/dist/assets/{ScheduleDetailsPage-OCqSWMz4-Dg0s24kG.js → ScheduleDetailsPage-BDZm6We--BmYpydGa.js} +3 -3
- package/dist/assets/{ScheduleSequenceTable-OEJBqdqG-CB3cYmnz.js → ScheduleSequenceTable-DgG11IBi-DBLZmDeR.js} +1 -1
- package/dist/assets/{ScreenRoutes-Bkl-MWfY.js → ScreenRoutes-kiA8eL9x.js} +2 -2
- package/dist/assets/{SetUpAccountSection-o86ErvD_-Celwp-jA.js → SetUpAccountSection-n5OCUAL3-B-YthnQt.js} +1 -1
- package/dist/assets/{SignIn-BEJNYyp4-O46sF-k3.js → SignIn-uBHaDram-Pp2K_nnI.js} +6 -6
- package/dist/assets/{SignInScreen-Dm8Ez_qK.js → SignInScreen-DkxtF7d-.js} +1 -1
- package/dist/assets/{SpendManagementListViewPage-BTQU2jwO-CQyGDfX4.js → SpendManagementListViewPage-ErBiPjGh-DVBcFgz6.js} +3 -3
- package/dist/assets/{SpendManagementPerTabPage-BtUS4aqA-vNlgv2e5.js → SpendManagementPerTabPage-BIxGrbmz-CpTcg38p.js} +1 -1
- package/dist/assets/{SpendManagementSection-DiQ2QBwA-CGsThSZ0.js → SpendManagementSection-B01H6LCd-7KGohVSJ.js} +1 -1
- package/dist/assets/{StatementItem-DGRjrvUi-C8hx1_Sf.js → StatementItem-BJJHaw9s-DKXMQrB-.js} +5 -5
- package/dist/assets/{StatementsPage-QqtqM0qv-BBLWtN99.js → StatementsPage-rFpr0w_W-p2OTDAub.js} +1 -1
- package/dist/assets/{StatusSwitcher-CfZOeqZf-Bq7fUYSl.js → StatusSwitcher-DnuyzbQo-uFTkU_Rq.js} +1 -1
- package/dist/assets/{SubTabSwitcher-Be1lLunR-CsxeYIuC.js → SubTabSwitcher-Bk10VIFM-DuWTd5Gf.js} +1 -1
- package/dist/assets/{SummaryCard-DgBWIctW-CRmTCkt0.js → SummaryCard-CHqc9QHC-DLmlONgW.js} +1 -1
- package/dist/assets/{TaskManagementPage-CpjN2Ver-BJrGG5WR.js → TaskManagementPage-Cr_KAM2z-B-N5lqS1.js} +7 -7
- package/dist/assets/{TimeRangeSwitcher-B7KdhPH9-Djft8PYe.js → TimeRangeSwitcher-DkNMcmBm-BHsVOUJA.js} +11 -11
- package/dist/assets/TimeframeSwitcher-CULpyCRj-DpaezwVo.js +31 -0
- package/dist/assets/{TimeframeSwitcherWithToggle-DEjdiR9x-CpK-qiop.js → TimeframeSwitcherWithToggle-BSx_ynUp-DCoChT3Y.js} +9 -9
- package/dist/assets/{TopExCard-Do6O7snc-DLvwuAod.js → TopExCard-B29o-5e0-BWjMLd0Z.js} +10 -10
- package/dist/assets/{TopExDetailPage-DFil6Qwx-BWbjM88A.js → TopExDetailPage-TVxgKbn8-Dea8Ndm8.js} +6 -6
- package/dist/assets/{TransactionActivityLogPage-C49lAwDF-BGLm3dPj.js → TransactionActivityLogPage-0wmqwFMQ-CtP3S4Ck.js} +1 -1
- package/dist/assets/{TransactionDetailPage-CyTyj91G-B7vb07HE.js → TransactionDetailPage-B9pzvWO8-DN9EJI4L.js} +1 -1
- package/dist/assets/{TransactionList-BFDau1I7-BXGXYBFK.js → TransactionList-dUcT29oF-CA_JHn5F.js} +1 -1
- package/dist/assets/{TransactionListBig-CVBiekZl-DrGGpH9X.js → TransactionListBig-DMnQfRkS-D1Tzrdsg.js} +1 -1
- package/dist/assets/{TransactionListPage-LGgMtr7O-CsGWQiN-.js → TransactionListPage-BB452Nj4-Be3PUtFs.js} +2 -2
- package/dist/assets/{TransactionVendorDetailPage-3p4MoiV3-DA73bE6t.js → TransactionVendorDetailPage-BCkXd3P2-Dn9bmHZD.js} +1 -1
- package/dist/assets/{TransferDrawerPage-BCr2Qlvp-BIuuD9Kn.js → TransferDrawerPage-6Rt1ZlJA-J8WRDfD_.js} +1 -1
- package/dist/assets/{TreasuryOverviewPage-CEnHQlwT-Cp9jfBpw.js → TreasuryOverviewPage-CuSfgvcS-Cr1ZHZCL.js} +9 -9
- package/dist/assets/{TreasuryPromoPage-oQKxGxSx-CJpdFyVJ.js → TreasuryPromoPage-DUi2uBW8-DFXwMQFM.js} +1 -1
- package/dist/assets/{TreasuryStatementsPage-DKCFzvzb-D5fkSJdQ.js → TreasuryStatementsPage-DNhwcfdJ-DHWXKCq1.js} +1 -1
- package/dist/assets/{TreasuryTaxLetterPage-D3pc6Eyc-DWhE-bsu.js → TreasuryTaxLetterPage-BLIGs8oG-B-EAsmsV.js} +1 -1
- package/dist/assets/{TrendChart-JHlBVwXJ-p0u3PrEr.js → TrendChart-KoCvlYmC-ji_PFFB-.js} +1 -1
- package/dist/assets/{TrendWithTransactions-Bh619hxZ-B7JEOzSv.js → TrendWithTransactions-Vqr8x7E_-Ch_SpSv4.js} +1 -1
- package/dist/assets/{UncategorizedAccountsMappingPage-BuM9GG4e-DMx8_LFD.js → UncategorizedAccountsMappingPage-BKdvN3Lh-CF1FrkBZ.js} +1 -1
- package/dist/assets/{UnitIntegrationPage-D4BoW10T-IfJ4B9AI.js → UnitIntegrationPage-CQ7270p--BJrqtQBc.js} +1 -1
- package/dist/assets/{UploadAdditionalDocumentOverlay-CMqblFXF-CGuab5Cf.js → UploadAdditionalDocumentOverlay-CcH5BomT-DAavyljg.js} +1 -1
- package/dist/assets/{Vendor2FAPopup-ANEIs-J6-BItEW5IN.js → Vendor2FAPopup-DtT11B4h-DSs5WQFV.js} +1 -1
- package/dist/assets/VendorACHDetailsPage-Cvek1Tr4-vPAILiGh.js +1 -0
- package/dist/assets/{VendorDetailPage-BLZ1wOuB-t2P37a0b.js → VendorDetailPage-2rTQcqZl-BGHBoCgZ.js} +1 -1
- package/dist/assets/VendorDomesticWireDetailsPage-j-06hvAA-CbgEb_pw.js +1 -0
- package/dist/assets/{VendorFiling1099EditablePage-BtU7EZH1-Cdwalb8n.js → VendorFiling1099EditablePage-Cgkipd6r-BOi4aIsg.js} +32 -32
- package/dist/assets/VendorFirstReviewPage-Va76j7QY-Ce_x6xNG.js +730 -0
- package/dist/assets/{VendorInternationalWireDetailsPage-BbCN0JV0-Wsg-mPRx.js → VendorInternationalWireDetailsPage-D0IeqYQZ-CBSHQbo0.js} +1 -1
- package/dist/assets/{VendorInternationalWireSwiftDetailsPage-CDShInCp-CKPYmRJ2.js → VendorInternationalWireSwiftDetailsPage-DZusODVt-CB9jvgle.js} +1 -1
- package/dist/assets/{VendorsAccountsSection-lmuNbtLw-BehIg0cT.js → VendorsAccountsSection-CTmdfJi_-2OXKGXSP.js} +1 -1
- package/dist/assets/{VerifyDevice-vhZNITmO-B_CyFx_O.js → VerifyDevice-DFCNFtDD-BiKT2y-c.js} +1 -1
- package/dist/assets/{VideoPlayer-DIXs3y0r-C0i3s9oa.js → VideoPlayer-CIr6pCWx-BWEj8qhe.js} +2 -2
- package/dist/assets/{VideoPopup-CYL6r3Cb-B0pmnpWo.js → VideoPopup-CoeVMP5D-CZp7ggfX.js} +2 -2
- package/dist/assets/{WarningsDrawerPage-CJ9a931n-DAFMV5EF.js → WarningsDrawerPage-CNBphx6e-DgBF9BD1.js} +1 -1
- package/dist/assets/{ZeniAccountDetailPage-P86nU628-RfL02yuR.js → ZeniAccountDetailPage-ysMCIpFe-BBrtmzdb.js} +1 -1
- package/dist/assets/{ZeniAccountListViewPage-GYsnktmQ-DlegmFE9.js → ZeniAccountListViewPage-DUalD7AP-CyveDoV_.js} +15 -15
- package/dist/assets/{ZeniAccountNavBarPieces-Cz7DjDo7-avwd16fX.js → ZeniAccountNavBarPieces-B8jILUl8-De6cgOXp.js} +1 -1
- package/dist/assets/{ZeniAccountPromoPage-iCmw1i20-lqXeJDxF.js → ZeniAccountPromoPage-CUJm-42a-CXuQd7VV.js} +1 -1
- package/dist/assets/{ZeniAccountSetupPage-B42Dq1gO-oMRu-INk.js → ZeniAccountSetupPage-BTurLFPN-CK5iO6d7.js} +1 -1
- package/dist/assets/{ZeniCopyright-Baiyxesc-CHFltgTl.js → ZeniCopyright-BTFZ48gh-CtnEsi71.js} +1 -1
- package/dist/assets/{ZeniTransferAmountSlider-9-2DcdrJ-q0SmjKL2.js → ZeniTransferAmountSlider-f0nRZPzG-dUb4Mhul.js} +1 -1
- package/dist/assets/{add-to-wallet-DgdBD8_G-DdT9Rn3y.js → add-to-wallet-DgdBD8_G-D1teIsf6.js} +1 -1
- package/dist/assets/{analytics-Dm6Rdmk5.js → analytics-DvsRx7_o.js} +1 -1
- package/dist/assets/{analyticsHelper-DPMmqDhf.js → analyticsHelper-Bk8gqeLI.js} +1 -1
- package/dist/assets/{analyticsHelper-B32z3Cdy-Dk9sCdyO.js → analyticsHelper-lunHUd8g-D5OYaAmT.js} +1 -1
- package/dist/assets/{arrow-south-east-round-PEovUgvH-Cy4oQH64.js → arrow-south-east-round-PEovUgvH-CIyEcJYf.js} +1 -1
- package/dist/assets/{auto-transfer-rule-mbafm5D3-B6gY8maM.js → auto-transfer-rule-mbafm5D3-CtO92HdQ.js} +1 -1
- package/dist/assets/{chartTypes-DL1AC5R1-CSQ4LZOa.js → chartTypes-DESZubWD-Bq3-3C2k.js} +1 -1
- package/dist/assets/{commonDimensions-BNYeCJ44-DwWQhbOM.js → commonDimensions-Cpv8YIix-Dpl_2njg.js} +1 -1
- package/dist/assets/{commonTypes-DwuUdRAc-CVoF2D5n.js → commonTypes-B1gKMzJK-DEpai8h5.js} +1 -1
- package/dist/assets/{constants-MHF6sRcJ.js → constants-B-YZmhKw.js} +1 -1
- package/dist/assets/{core-XAP_yXKl.js → core-HDqpewC7.js} +1 -1
- package/dist/assets/{dash.all.min-DatMhMWc.js → dash.all.min-kOXiIFTN.js} +1 -1
- package/dist/assets/{detailCommon-CzjlHNNr-OLPVPNMD.js → detailCommon-DyrMcL2E-DbZbdMac.js} +2 -2
- package/dist/assets/{downloadPdf-CPfBtFli-C5o4QyFD.js → downloadPdf-D2sIdMDR-D6_l0NHH.js} +1 -1
- package/dist/assets/{empty-vcyFM9nz.js → empty-DfoIHPwJ.js} +1 -1
- package/dist/assets/{empty-Cs2gdmIo.js → empty-Dx0imdfu.js} +1 -1
- package/dist/assets/{epic-B8nKq-i6.js → epic-BE_WS1px.js} +1 -1
- package/dist/assets/{gift-box-Cmt9OgIZ-RzjSa1iy.js → gift-box-Cmt9OgIZ-xM5zrgW4.js} +1 -1
- package/dist/assets/{graphic-no-data-l-DU4J8fDt-CQ6Ol9_s.js → graphic-no-data-l-DU4J8fDt-B9Rqv9_n.js} +1 -1
- package/dist/assets/{graphic-no-data-net-burn-l-CzmycA0m-CI6u9HfU.js → graphic-no-data-net-burn-l-CzmycA0m-DYb8EeBA.js} +1 -1
- package/dist/assets/{handshake-BPg58FML-FDeEnKd2.js → handshake-BPg58FML-B6X0918N.js} +1 -1
- package/dist/assets/{helper-T710NLca-BU35xGXS.js → helper-i78O9ew8-BuDifB0X.js} +1 -1
- package/dist/assets/{index-LuFlN8FP.js → index-B7uDjLxh.js} +1 -1
- package/dist/assets/{index-CrlTOcjY.js → index-Bdy6x472.js} +1 -1
- package/dist/assets/{index-DSJ6HKL8.js → index-BmIGxAWd.js} +1 -1
- package/dist/assets/{index-t-uTuAYw.js → index-D0CQgP0w.js} +1 -1
- package/dist/assets/{index-D9vmx-FC.js → index-DAitESaL.js} +1 -1
- package/dist/assets/{index-DIT7C2zP.js → index-Depa7Syu.js} +1 -1
- package/dist/assets/{index-C9hDAJ7o.js → index-Dw_MX6AZ.js} +11 -11
- package/dist/assets/{lexical-CgNStNGD.js → lexical-CWcQ8pGO.js} +1 -1
- package/dist/assets/{liveblocks-NP7ye8lf.js → liveblocks-Dv7Vdu8a.js} +1 -1
- package/dist/assets/{lottie-DhXcx4Hv.js → lottie-V1lTNkDB.js} +1 -1
- package/dist/assets/mapLoadingInProgressToTreeNode-COG82OfJ-0ZJxCNAO.js +1 -0
- package/dist/assets/{mapSectionWithAcOnlyToTreeNode-Co9d6d-V-n_IPqL-W.js → mapSectionWithAcOnlyToTreeNode-CjVZw324-Cy37hN-j.js} +1 -1
- package/dist/assets/mapSpacerToTreeNode-DZFRqtKk-B07ADlac.js +1 -0
- package/dist/assets/mapTimeframeBalancesToTreeNode-Cm_MiRXt-C6UHQCJ6.js +1 -0
- package/dist/assets/mapTimeframeBalancesToTreeNode-DnvhN4Go-CXn5QSNs.js +1 -0
- package/dist/assets/mapTimeframeHeaderLoadingInProgressToTreeNode-40rewm2_-C-ELqPB7.js +1 -0
- package/dist/assets/{mui-BQR0Ruo4.js → mui-DdxImnN0.js} +1 -1
- package/dist/assets/{page-detail-CWX5S47F-BBbQvoIw.js → page-detail-CWX5S47F-5PyHJMJh.js} +1 -1
- package/dist/assets/{panelSelectedMixin-Cddsb26L-V1yMMv-q.js → panelSelectedMixin-Cddsb26L-gr9HWaHB.js} +1 -1
- package/dist/assets/{radio-default-CiSgisfh-OYLDx768.js → radio-default-CiSgisfh-LTUMKU8Y.js} +1 -1
- package/dist/assets/{react-BL2s-aF_.js → react-BNr0aXGm.js} +1 -1
- package/dist/assets/{react-CvT9aEmE.js → react-CUY5EDxC.js} +1 -1
- package/dist/assets/{react-Cp-6oWln.js → react-Cjks14mZ.js} +1 -1
- package/dist/assets/{react-DcMbwERn.js → react-DYqwvMeX.js} +2 -2
- package/dist/assets/{react-Du36QLI3.js → react-DbLm8gms.js} +1 -1
- package/dist/assets/{react-CUdUBRF6.js → react-OxQ1eBeR.js} +1 -1
- package/dist/assets/{react-72w_Kluy.js → react-omDkrKl-.js} +1 -1
- package/dist/assets/{react-CX9OzKa9.js → react-pyJg34N2.js} +1 -1
- package/dist/assets/{recharts-DkFolWRg.js → recharts-Djp9a38d.js} +1 -1
- package/dist/assets/{sentry-Ckvw8Zf1.js → sentry-DBSEoG3b.js} +1 -1
- package/dist/assets/{shield-DOlUxcFf-rM_NpNHL.js → shield-DOlUxcFf-BOPfGBnx.js} +1 -1
- package/dist/assets/toCOABalancesWithID-DxETcMNK-ChqFn7jZ.js +1 -0
- package/dist/assets/{toChartData-8r0AvOIP-Dhy8B0ZL.js → toChartData-BQYX2C7n-DbxCO4-E.js} +1 -1
- package/dist/assets/{uploadAttachment-CTXeI85v-BVATkq8k.js → uploadAttachment-C3cElL9m-QbAR0kQd.js} +1 -1
- package/dist/assets/{uploadReceipts-Dge0cNF1-nRZK_a0M.js → uploadReceipts-Dge0cNF1-BifC32F3.js} +1 -1
- package/dist/assets/{url-D8pFj_Ts.js → url-BmxmWAZl.js} +1 -1
- package/dist/assets/{url-DCwOBFCk.js → url-DITb-guK.js} +1 -1
- package/dist/assets/{useLongPress-GCK2COYQ-BkrNXw3e.js → useLongPress-GCK2COYQ-CaFh8omD.js} +1 -1
- package/dist/assets/{usp-line-BBd1wKwW-54Q8nh58.js → usp-line-BBd1wKwW-CpqqX4MO.js} +1 -1
- package/dist/assets/{utils-B4eJ0QQL.js → utils-rIQAYtge.js} +1 -1
- package/dist/assets/{zeni-epic-state-BnsQ52n7.js → zeni-epic-state-1oOVJQJ4.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/dist/assets/AccountInfoPage-CwOgUpjY-CG0ESFTT.js +0 -18
- package/dist/assets/ChargeCardPromoPage-CSx0tLTh-BsQndE31.js +0 -222
- package/dist/assets/CustomerOnboardingContainerPage-BRmWV-NF-CTVp5vU-.js +0 -1
- package/dist/assets/EntityDetailPage-C6UdR7oJ-COx1heor.js +0 -18
- package/dist/assets/GlobalReviewListPage-DFhcVK4y-DV_nZHys.js +0 -291
- package/dist/assets/MagicLinkACHDetailsPage-DhFoinUr-BKHQrprB.js +0 -1
- package/dist/assets/MagicLinkDomesticWireDetailsPage-BUX5Ve2X-CKqNdN5U.js +0 -1
- package/dist/assets/MagicLinkInternationalWireDetailsPage-BmtqDOUO-CMDMqnYA.js +0 -1
- package/dist/assets/OpExByVendorPage-D1ehVVFD-Dc7GFqIq.js +0 -100
- package/dist/assets/ReimbursementApprovalRuleDetailPage-BRUlJa_D-yH6i72Z5.js +0 -32
- package/dist/assets/TimeframeSwitcher-C26tc1sm-Eg22Wb7g.js +0 -31
- package/dist/assets/VendorACHDetailsPage-BNcSYRzd-Kp1xh3I0.js +0 -1
- package/dist/assets/VendorDomesticWireDetailsPage-KZSt69vF-CigCqUX0.js +0 -1
- package/dist/assets/VendorFirstReviewPage-DJap4HA2-DP0KML1b.js +0 -730
- package/dist/assets/mapLoadingInProgressToTreeNode-DWJx3AOd-DyMnZ_nG.js +0 -1
- package/dist/assets/mapSpacerToTreeNode-CKbbOrFj-B8jOHJ4H.js +0 -1
- package/dist/assets/mapTimeframeBalancesToTreeNode-BpaMuUED-DrbIaTMF.js +0 -1
- package/dist/assets/mapTimeframeBalancesToTreeNode-jq979PpH-D251JRiH.js +0 -1
- package/dist/assets/mapTimeframeHeaderLoadingInProgressToTreeNode-6A-QxQzl-WsH6ynl8.js +0 -1
- package/dist/assets/toCOABalancesWithID-CxmuqRLi-BeWRvmKl.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o,bW as ar,J as Te,gl as Ba,gm as Fa,V as t,cr as sr,bC as rr,aa as Ue,aS as Pa,u as x,F as Ae,cs as lr,x as ae,y as mt,bD as cr,i9 as dr,aP as Ze,bU as Ce,dk as eo,bw as ur,ga as hr,ab as F,i7 as pr,am as Ve,h1 as mr,gV as za,bx as gr,bQ as Ht,b8 as Na,aj as Et,bL as Va,p as tt,km as xr,an as bt,a9 as an,bP as qo,ad as sn,kn as fr,ko as yr,kp as Cr,kq as vn,kr as Ha,ks as Wa,kt as wr,ku as vi,kv as br,go as Ua,dn as qa,kw as vr,kx as Sr,ky as jr,kz as kr,kA as Ir,kB as $r,kC as Lr,kD as Tr,kE as Ar,kF as Er,kG as Ka,kH as Rr,kI as Dr,kJ as Or,kK as Mr,gD as Ko,ce as Tn,b4 as to,cv as no,k as Jo,I as Ja,q as Ga,cH as An,dW as Go,b as _r,gn as Br,bp as Fr,cl as Pr,c3 as zr,eI as En,c0 as Yo,ar as Nr,c as Vr,fE as Hr,aF as Ya,kL as Wr,aW as Zo,aR as Si,gX as Za,kM as Ur,kN as qr,kO as Kr,bG as Qa,aU as Jr,dS as Rt,gL as Vt,hZ as ro,eF as Jn,cL as Qo,az as Gr,eG as Xa,dq as Yr,gy as Zr,fT as Qr,h4 as Xr,iV as el,co as Xo,cB as oo,cE as io,iC as it,w as Nt,hM as tl,gE as Gn,jk as ji,dl as es,d3 as In,kP as nl,a_ as ol,du as ts,i as $n,it as ns,iD as Bo,kQ as mn,eh as os,ej as is,iY as Fo,iZ as as,kR as il,d1 as ao,iu as ss,fs as rs,kS as al,ew as lo,ij as sl,aL as Po,kT as rl,cQ as ll,aZ as ls,iK as cl,dU as dl,ap as $t,kU as ul,kV as hl,b2 as co,es as pl,dR as ml,kW as gl,fN as xl,kX as fl,dQ as yl,hB as Cl,a8 as wl,et as bl,eu as vl,ev as Sl,ey as ki,ez as Ii,eA as jl,kY as kl,b0 as Il,eK as $l,eL as Ll,eM as Tl}from"./index-
|
|
1
|
+
import{o,bW as ar,J as Te,gl as Ba,gm as Fa,V as t,cr as sr,bC as rr,aa as Ue,aS as Pa,u as x,F as Ae,cs as lr,x as ae,y as mt,bD as cr,i9 as dr,aP as Ze,bU as Ce,dk as eo,bw as ur,ga as hr,ab as F,i7 as pr,am as Ve,h1 as mr,gV as za,bx as gr,bQ as Ht,b8 as Na,aj as Et,bL as Va,p as tt,km as xr,an as bt,a9 as an,bP as qo,ad as sn,kn as fr,ko as yr,kp as Cr,kq as vn,kr as Ha,ks as Wa,kt as wr,ku as vi,kv as br,go as Ua,dn as qa,kw as vr,kx as Sr,ky as jr,kz as kr,kA as Ir,kB as $r,kC as Lr,kD as Tr,kE as Ar,kF as Er,kG as Ka,kH as Rr,kI as Dr,kJ as Or,kK as Mr,gD as Ko,ce as Tn,b4 as to,cv as no,k as Jo,I as Ja,q as Ga,cH as An,dW as Go,b as _r,gn as Br,bp as Fr,cl as Pr,c3 as zr,eI as En,c0 as Yo,ar as Nr,c as Vr,fE as Hr,aF as Ya,kL as Wr,aW as Zo,aR as Si,gX as Za,kM as Ur,kN as qr,kO as Kr,bG as Qa,aU as Jr,dS as Rt,gL as Vt,hZ as ro,eF as Jn,cL as Qo,az as Gr,eG as Xa,dq as Yr,gy as Zr,fT as Qr,h4 as Xr,iV as el,co as Xo,cB as oo,cE as io,iC as it,w as Nt,hM as tl,gE as Gn,jk as ji,dl as es,d3 as In,kP as nl,a_ as ol,du as ts,i as $n,it as ns,iD as Bo,kQ as mn,eh as os,ej as is,iY as Fo,iZ as as,kR as il,d1 as ao,iu as ss,fs as rs,kS as al,ew as lo,ij as sl,aL as Po,kT as rl,cQ as ll,aZ as ls,iK as cl,dU as dl,ap as $t,kU as ul,kV as hl,b2 as co,es as pl,dR as ml,kW as gl,fN as xl,kX as fl,dQ as yl,hB as Cl,a8 as wl,et as bl,eu as vl,ev as Sl,ey as ki,ez as Ii,eA as jl,kY as kl,b0 as Il,eK as $l,eL as Ll,eM as Tl}from"./index-Dw_MX6AZ.js";import{a as i,P as Al}from"./sentry-DBSEoG3b.js";import{n as s,c as Se,k as ei}from"./mui-DdxImnN0.js";import{bh as uo,Gu as $i,Gv as Ln,Gw as El,Gx as Rl,cx as Dl,bL as zo,cy as Ol,ET as Li,cz as Ml,cA as _l,la as Sn,bE as Qt,Gy as Ti,c4 as cs,Gz as Bl,bY as ds,bo as Xt,GA as Fl,GB as us,GC as hs,GD as ps,GE as ms,GF as gs,GG as ti,kW as Pl}from"./zeni-epic-state-1oOVJQJ4.js";import{t as ni}from"./panelSelectedMixin-Cddsb26L-gr9HWaHB.js";import{h as xs,I as fs,n as gn,R as wt}from"./CollapsableReportTable-CSVzLWq_-CmmDaO6f.js";import{D as ho}from"./AccountRow-t-WESYF_-BZd9LxDz.js";import{o as ys}from"./mapTimeframeBalancesToTreeNode-Cm_MiRXt-C6UHQCJ6.js";import{d as Ai}from"./mapLoadingInProgressToTreeNode-COG82OfJ-0ZJxCNAO.js";import{h as zl}from"./VendorsAccountsSection-CTmdfJi_-2OXKGXSP.js";import{u as Nl,c as Ei,d as Vl,m as Hl}from"./uploadAttachment-C3cElL9m-QbAR0kQd.js";import{r as Wl}from"./core-HDqpewC7.js";import"./liveblocks-Dv7Vdu8a.js";import"./recharts-Djp9a38d.js";import"./lottie-V1lTNkDB.js";import"./analytics-DvsRx7_o.js";import"./lexical-CWcQ8pGO.js";import"./utils-rIQAYtge.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="daa6b577-03e9-4a1f-aec8-861101d7d8dd",e._sentryDebugIdIdentifier="sentry-dbid-daa6b577-03e9-4a1f-aec8-861101d7d8dd")}catch{}})();const{common:{navBar:{back:Ul},texts:{refresh:ql,close:Kl,copy:Jl,copied:Gl,open:Yl}},expenseAutomation:{common:{numbers:{maximumCount:Zl}}}}=Ae.getLocalizedStrings(),Ql=s(Zr)`
|
|
2
2
|
display: flex;
|
|
3
3
|
width: ${o.sp4};
|
|
4
4
|
height: ${o.sp4};
|
|
@@ -151,7 +151,7 @@ import{o,bW as ar,J as Te,gl as Ba,gm as Fa,V as t,cr as sr,bC as rr,aa as Ue,aS
|
|
|
151
151
|
}
|
|
152
152
|
text-decoration-color: ${e=>e.theme.colors.primary};
|
|
153
153
|
}
|
|
154
|
-
`,Di={subSectionContainerLeftRightPadding:new ae(x[3],x[6],x[8])},Cc=({onAllThreadsClick:e,companyId:n,companyName:l})=>{const r={application:"cockpit",companyId:n,entityId:n,tab:"expense_automation",isGlobalComment:!1,entityType:"expense_automation.monthEndEmail",companyName:l,url:window.location.href},{url:h,...p}=r,a={...p},{threads:d,isLoading:c}=Br(a,!1,!1),m=d.filter(u=>u.id.includes(Ua)===!1);return t.jsxs(Xl,{isDisabled:c,onClick:e,"data-testid":F("comment-icon"),children:[t.jsx(Fr,{count:m.length,isLoading:c}),t.jsx(Ql,{})]})},wc=({headerData:e,refreshStatus:n,searchText:l,companyName:r,companyId:h,isZeniUser:p,onAllThreadsClick:a,onClose:d,onRefresh:c,onSearchTextChanged:m})=>{const u=()=>{n!=="In-Progress"&&c()};return t.jsx(nc,{children:e.rightSection.map((g,f)=>{switch(g){case"search":return t.jsx(pr,{isSearchOpen:(l.length??0)>0,searchPlaceHolder:e.searchPlaceholder,searchText:l,searchTextBoxStyle:{position:"initial",height:"fit-content"},styledSearchIconContainerStyle:{height:o.sp4},searchIconMarginRight:o.sp0,onSearchTextChanged:
|
|
154
|
+
`,Di={subSectionContainerLeftRightPadding:new ae(x[3],x[6],x[8])},Cc=({onAllThreadsClick:e,companyId:n,companyName:l})=>{const r={application:"cockpit",companyId:n,entityId:n,tab:"expense_automation",isGlobalComment:!1,entityType:"expense_automation.monthEndEmail",companyName:l,url:window.location.href},{url:h,...p}=r,a={...p},{threads:d,isLoading:c}=Br(a,!1,!1),m=d.filter(u=>u.id.includes(Ua)===!1);return t.jsxs(Xl,{isDisabled:c,onClick:e,"data-testid":F("comment-icon"),children:[t.jsx(Fr,{count:m.length,isLoading:c}),t.jsx(Ql,{})]})},wc=({headerData:e,refreshStatus:n,searchText:l,companyName:r,companyId:h,isZeniUser:p,onAllThreadsClick:a,onClose:d,onRefresh:c,onSearchTextChanged:m})=>{const u=()=>{n!=="In-Progress"&&c()};return t.jsx(nc,{children:e.rightSection.map((g,f)=>{switch(g){case"search":return t.jsx(pr,{isSearchOpen:(l.length??0)>0,searchPlaceHolder:e.searchPlaceholder,searchText:l,searchTextBoxStyle:{position:"initial",height:"fit-content"},styledSearchIconContainerStyle:{height:o.sp4},searchIconMarginRight:o.sp0,onSearchTextChanged:y=>{m(y)},downloadPresent:!1},f+g);case"refresh":return t.jsx(Ce,{display:"block",placement:"bottom",title:ql,style:{marginTop:"2px"},enterDelay:600,children:t.jsx(lc,{onClick:u,$spinning:n==="In-Progress","data-testid":F("refresh-icon")})},f+g);case"comment":return p===!1?null:t.jsx(Cc,{companyId:h,companyName:r,onAllThreadsClick:a});case"close":default:return t.jsx(Ce,{display:"block",placement:"bottom",title:Kl,enterDelay:600,style:{marginTop:"2px"},children:t.jsx(sc,{onClick:d,"data-testid":F("close-icon")})},f+g)}})})},bc=({headerData:e,onBack:n})=>t.jsx(oc,{children:e.leftSection.map((l,r)=>{switch(l){case"back":default:return t.jsx(Ce,{display:"block",placement:"bottom",title:Ul,enterDelay:600,style:{marginTop:"-14px"},children:t.jsx(rc,{onClick:n,"data-testid":F("back-button")})},r+l)}})}),Oi=({text:e,linkText:n,windowSize:l,isCopied:r,onLinkClick:h})=>{if(n==null||!n)return t.jsxs(_n,{windowSize:l,children:[e," "]});const p=e.indexOf(n);if(p===-1)return t.jsxs(_n,{windowSize:l,children:[e," "]});const a=e.substring(0,p),d=e.substring(p+n.length);return t.jsxs(t.Fragment,{children:[a?t.jsxs(_n,{windowSize:l,children:[a.trim()," "]}):null,t.jsx(Ce,{display:"flex",placement:"right",title:za.test(n)?r?Gl:Jl:Yl,enterTouchDelay:600,children:t.jsxs(yc,{onClick:()=>h?.(n),"data-testid":F("pre-link"),children:[n,r?t.jsx(ac,{className:"success-icon"}):t.jsx(ic,{className:"copy-icon"})]})}),d?t.jsxs(_n,{windowSize:l,children:[d," "]}):null]})},Mi=({subTitles:e})=>{const n=Te(),[,l]=mr(),[r,h]=i.useState(!1),p=i.useRef(null),a=i.useCallback(d=>{za.test(d)?(l(d),h(!0),p.current&&clearTimeout(p.current),p.current=setTimeout(()=>{h(!1)},2e3)):window.open(d,"_blank","noopener,noreferrer")},[l]);return i.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]),t.jsx(gc,{children:e.map((d,c)=>t.jsxs(mc,{children:[d.pre?t.jsx(Oi,{text:d.pre,linkText:d.preLink,windowSize:n,isCopied:r,onLinkClick:a}):null,d.prefixIconName?t.jsx(t.Fragment,{children:d.prefixIconName==="zeniAIIcon"?t.jsx(xc,{}):t.jsx(t.Fragment,{})}):null,d.bold?t.jsx(t.Fragment,{children:t.jsxs(fc,{windowSize:n,children:[d.bold," "]})}):null,d.post?t.jsx(Oi,{text:d.post,linkText:d.postLink,windowSize:n,isCopied:r,onLinkClick:a}):null]},c+d.bold+d.pre+d.post))})};function vc(e){const{headerData:n,currentTab:l,completionStatus:r,onUpdateTab:h,selectedReconAccountId:p,getTabCountAndFetchState:a,reconcileDetailPageFetchState:d,forceShowSubtitle:c,currentSelectedView:m,onReconTabUpdate:u,currentRecontab:g,navBarCustomElement:f,titleStyle:y={}}=e,w=a("autoCategorized")?.count??0,v=a("review")?.count??0,k=a("reconcile")?.count??0,C=n.tabs.length>0||n.subTitle.length>0,R=m==="transaction_categorization"&&l==="autoCategorized",I=m==="reconciliation"&&g==="review"&&p!=null,S=m==="reconciliation"&&g==="reconcile"&&p!=null,T=R?w>0:I?d==="In-Progress"?!0:v>0:S?d==="In-Progress"?!0:k>0:r!=="complete",D=mt(),A=Te();let O=[];return n.tabs.length>0&&(O=n.tabs.map(b=>({label:b.label,id:b.id,countDetails:a(b.id)}))),t.jsxs(ec,{children:[t.jsx(cr,{title:n.title,subTitle:n.subText,titleTextStyles:{flex:"1 1 0px"},backgroundColor:D.colors.grey4,onBackClick:()=>null,titleStyle:y,ignoreScrollAction:m!=="month_end_insights",keepBackgroundOnScroll:m!=="month_end_insights",leftSideComponent:t.jsx(bc,{...e}),rightSideComponent:t.jsx(wc,{...e}),source:"NavBarWithHeader"}),f??null,t.jsx(Ue,{controller:C===!0,children:t.jsx(tc,{windowSize:A,children:n.tabs.length>0?t.jsxs(t.Fragment,{children:[t.jsx(dc,{windowSize:A,children:t.jsx(dr,{allTabs:O,selectedTab:m==="transaction_categorization"?l??O[0].id:g??O[0].id,onTabChange:b=>{if(m==="transaction_categorization"){const $=El(b.id);$!=null&&h($)}else if(m==="reconciliation"){const $=Rl(b.id);$!=null&&u($)}},maximumCountLimit:Zl})}),t.jsx(hc,{windowSize:A}),t.jsx(pc,{}),t.jsx(Ue,{controller:T===!0||c===!0,children:t.jsx(Ri,{windowSize:A,children:n.tabs.map((b,$)=>(m==="reconciliation"?b.id===g:b.id===l)?t.jsx(uc,{children:t.jsx(Mi,{subTitles:b.subTitle})},$+b.id):null)})})]}):t.jsx(Ue,{controller:T===!0||c===!0,children:t.jsx(Ri,{windowSize:A,children:t.jsx(Mi,{subTitles:n.subTitle})})})})})]})}const Sc=1;function jc({name:e,checkBoxes:n,mode:l,isDisabled:r,style:h,labelStyle:p,labelCheckBoxStyle:a,checkBoxStyle:d,width:c,registerOptions:m,checkedIconColor:u,checkBoxIconStyle:g,checkBoxContainerStyle:f,draggable:y=!1,selectionLimit:w,infoIconContainerStyle:v,onDragStart:k,rowHeight:C=40,initialScrollOffSet:R,onScroll:I}){const S=Te(),T=i.useRef(null),{control:D}=Qo(),A=n.find(M=>M.groupLabel),O=n.filter(M=>!M.groupLabel),b=[];for(const M of O)if(M.isException||b.push(M.value),w!=null&&b.length===w+1)break;const $=n.filter(M=>M.defaultChecked).map(M=>M.value);return t.jsx(Xa,{control:D,name:e,rules:m,defaultValue:$,render:({field:{value:M,ref:N,onChange:G}})=>{const z=V=>{Ic({event:V,value:M,allCheckBoxValues:b,groupLabelCheckBox:A,onChange:G})};return t.jsxs($c,{style:h,windowSize:S,children:[A&&t.jsx(oi,{checkBox:A,index:0,value:M,allCheckBoxValues:b,mode:l,name:e,checkBoxContainerStyle:f,checkBoxIconStyle:g,checkBoxStyle:d,labelCheckBoxStyle:a,labelStyle:p,width:c,draggable:y,groupLabelCheckBox:A,infoIconContainerStyle:v,checkedIconColor:u,isDisabled:r,selectionLimit:w,onDragStart:k,ref:N,onChangeHandler:z}),t.jsx(Lc,{children:t.jsx(to,{style:{height:"100%",width:"100%"},children:({height:V,width:de})=>t.jsx(no,{ref:T,height:V,width:de,itemCount:O.length,itemSize:()=>C,estimatedItemSize:C,initialScrollOffset:R??0,onScroll:({scrollOffset:_})=>{I?.(_)},overscanCount:Sc,itemKey:_=>O[_].value,itemData:{checkBoxes:O,value:M,allCheckBoxValues:b,mode:l,name:e,checkBoxContainerStyle:f,checkBoxIconStyle:g,checkBoxStyle:d,labelCheckBoxStyle:a,labelStyle:p,width:c,draggable:y,groupLabelCheckBox:A,infoIconContainerStyle:v,checkedIconColor:u,isDisabled:r,selectionLimit:w,onDragStart:k,ref:N,onChange:G,handleChangeEvent:z,rowHeight:C},children:kc})})})]})}})}const kc=({index:e,style:n,data:l})=>{const r=i.useRef(null),{checkBoxes:h,value:p,allCheckBoxValues:a,mode:d,name:c,checkBoxContainerStyle:m,checkBoxIconStyle:u,checkBoxStyle:g,labelCheckBoxStyle:f,labelStyle:y,width:w,draggable:v,groupLabelCheckBox:k,infoIconContainerStyle:C,checkedIconColor:R,isDisabled:I,selectionLimit:S,onDragStart:T,ref:D,handleChangeEvent:A}=l,O=h[e];return t.jsx(Oc,{style:{...n,width:"100%"},ref:r,children:t.jsx(oi,{checkBox:O,index:e,value:p,allCheckBoxValues:a,mode:d,name:c,checkBoxContainerStyle:m,checkBoxIconStyle:u,checkBoxStyle:g,labelCheckBoxStyle:f,labelStyle:y,width:w,draggable:v,groupLabelCheckBox:k,infoIconContainerStyle:C,checkedIconColor:R,isDisabled:I,selectionLimit:S,onDragStart:T,ref:D,onChangeHandler:A})})},oi=i.forwardRef((e,n)=>{const{value:l,checkBox:r,groupLabelCheckBox:h,allCheckBoxValues:p,selectionLimit:a,mode:d,checkBoxStyle:c,labelCheckBoxStyle:m,isDisabled:u,draggable:g,checkBoxContainerStyle:f,infoIconContainerStyle:y,name:w,index:v,width:k,checkedIconColor:C,checkBoxIconStyle:R,labelStyle:I,onDragStart:S,onChangeHandler:T}=e,D=Te(),A=M=>{typeof n=="function"?n(M):n&&(n.current=M)};let O=l.includes(r.value);const b=Array.from(new Set([...l,r.value]));h?.value===r.value&&l.length>0&&(a!=null?O=b.length===p.length||b.length===a+1:O=p.every(M=>b.includes(M)===!0));const $=()=>d==="off"||r.isException?D==="small"?{display:"none",...c}:{visibility:"hidden",...c}:r.groupLabel?p.length===1&&p[0]===h?.value?{visibility:"hidden",...m}:m:c;return t.jsxs(Ac,{mode:d,draggable:g===!0,onDragStart:M=>{S?.(M,r.value)},style:f,isDisabled:u,isSelected:O,exceptionMode:r.exceptionMode,children:[r.prefix?t.jsx(Tc,{className:"prefix-box",children:r.prefix}):null,r.isException?t.jsx(Ec,{style:y,className:"checkbox-alert",children:t.jsx(Ce,{style:{padding:`12px ${o.sp3}`},title:r.exceptionInfo??"",placement:"bottom-start",children:r.exceptionType==="info"?t.jsx(Rc,{}):t.jsx(Dc,{})})}):t.jsx(rl,{name:`${w}.${r.value}`,checkBoxValue:r.value,value:O,checkedIconColor:C,isDisabled:u||!r.groupLabel&&!O&&a!=null&&b.length===a+1?"disabled":void 0,checkBoxStyle:$(),checkBoxIconStyle:R,ref:A,onChange:T}),typeof r.label=="string"&&r.label?t.jsx(ll,{isDisabled:u,label:r.label,labelStyle:I,htmlFor:`${w}.${r.value}`,style:{display:"flex",flex:1,minHeight:o.sp4,marginLeft:o.sp2,width:k,backgroundColor:"inherit",...I}}):r.label]},`${r.value}_${v}`)});oi.displayName="CheckBoxWithLabel";const Ic=({event:e,value:n,allCheckBoxValues:l,groupLabelCheckBox:r,onChange:h})=>{const p=e.currentTarget.value,a=e.currentTarget.checked,d=r?.value,c=new Set(n);if(p===d){h(a?Array.from(new Set([d,...l])):[]);return}a?c.add(p):c.delete(p);const m=l.every(u=>c.has(u));d!=null&&(m&&!c.has(d)?c.add(d):!m&&c.has(d)&&c.delete(d)),h(Array.from(c))},$c=s.div`
|
|
155
155
|
display: flex;
|
|
156
156
|
flex-direction: column;
|
|
157
157
|
width: 100%;
|
|
@@ -366,7 +366,7 @@ import{o,bW as ar,J as Te,gl as Ba,gm as Fa,V as t,cr as sr,bC as rr,aa as Ue,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
|
-
`,Jd=Ae.getLocalizedStrings(),{common:{all:Ni,strings:{empty:Vi}}}=Jd,Hi="selectedTransactionIds",Gd="expenseAutomationBankReconReconcilePage",Yd=e=>`${e}_form`;function Zd({currentFooterFormId:e,localData:n,matchedTransactions:l,sortConfig:r,onSaveReconciliation:h,selectedAccountId:p,onReconTabColumnSortConfigChanged:a,onUpdateReconcileTabLocalData:d,setCurrentFooterFormId:c}){const m=an({mode:"all",defaultValues:{selectedTransactionIds:n.selectedTransactionIds},values:{selectedTransactionIds:n.selectedTransactionIds}}),u={label:t.jsx(Ed,{onReconTabColumnSortConfigChanged:a,sortConfig:r}),value:Ni.toLocaleLowerCase(),defaultChecked:!1,groupLabel:!0},g=l.map(v=>({label:t.jsx(Vd,{transaction:v,selectedTransactionIds:n.selectedTransactionIds,transactionId:v.id}),value:v.id,defaultChecked:!1,groupLabel:!1})),f=[u,...g],
|
|
369
|
+
`,Jd=Ae.getLocalizedStrings(),{common:{all:Ni,strings:{empty:Vi}}}=Jd,Hi="selectedTransactionIds",Gd="expenseAutomationBankReconReconcilePage",Yd=e=>`${e}_form`;function Zd({currentFooterFormId:e,localData:n,matchedTransactions:l,sortConfig:r,onSaveReconciliation:h,selectedAccountId:p,onReconTabColumnSortConfigChanged:a,onUpdateReconcileTabLocalData:d,setCurrentFooterFormId:c}){const m=an({mode:"all",defaultValues:{selectedTransactionIds:n.selectedTransactionIds},values:{selectedTransactionIds:n.selectedTransactionIds}}),u={label:t.jsx(Ed,{onReconTabColumnSortConfigChanged:a,sortConfig:r}),value:Ni.toLocaleLowerCase(),defaultChecked:!1,groupLabel:!0},g=l.map(v=>({label:t.jsx(Vd,{transaction:v,selectedTransactionIds:n.selectedTransactionIds,transactionId:v.id}),value:v.id,defaultChecked:!1,groupLabel:!1})),f=[u,...g],y=async v=>{const k=v[Hi].filter(C=>C!=Ni.toLocaleLowerCase());d(k)};i.useEffect(()=>{const v=m.watch(k=>{k!=null&&An(()=>y(k))});return()=>{v.unsubscribe()}}),i.useEffect(()=>(e!=="expenseAutomationBankReconReconcilePage"&&c("expenseAutomationBankReconReconcilePage"),()=>{c("expenseAutomationPage")}),[]);const w=i.useCallback(()=>{h({reconcileAction:"reconcile"})},[h]);if(l.length===0){const v=Je("reconciliation",void 0,p).tabs.find(k=>k.id==="reconcile")?.allDoneText;return t.jsx(tu,{children:t.jsx(Tt,{tab:"missing_receipts",title:v?.title??Vi,subTitle:v?.subTitle??Vi})})}return t.jsx(Qd,{children:t.jsx(sn,{...m,children:t.jsx(Xd,{onSubmit:m.handleSubmit(w),id:Yd(Gd),children:t.jsx(eu,{children:t.jsx(jc,{name:Hi,checkBoxes:f,checkBoxStyle:{padding:20},labelCheckBoxStyle:{padding:20},rowHeight:Nd,mode:n.selectedTransactionIds.length>0?"always_on":"checked_or_hover",checkBoxContainerStyle:{boxSizing:"border-box"}})})})})})}const Qd=s.div``,Xd=s.form``,eu=s.div`
|
|
370
370
|
height: calc(100vh - 350px);
|
|
371
371
|
`,tu=s.div`
|
|
372
372
|
height: 100%;
|
|
@@ -575,7 +575,7 @@ import{o,bW as ar,J as Te,gl as Ba,gm as Fa,V as t,cr as sr,bC as rr,aa as Ue,aS
|
|
|
575
575
|
height: 12px;
|
|
576
576
|
cursor: pointer;
|
|
577
577
|
color: ${e=>e.theme.colors.hero};
|
|
578
|
-
`,ht="accountReconReviewTableSection",{dateFormat:mu,expenseAutomation:gu,common:Ct}=Ae.getLocalizedStrings(),{visual:js}=mu,{accountRecon:be}=gu,ks=e=>[{label:be.review.formLabels.allBankAccounts,options:e.map(n=>({label:n.accountName,value:n.accountId}))}],Is=e=>[{label:be.review.formLabels.allCreditCards,options:e.map(n=>({label:n.accountName,value:n.accountId}))}],Wi=e=>`${ht}_${e}_form`,Re=(e,n)=>`${ht}.${e}.${n}`,xu=e=>{const{sortKey:n,sortOrder:l,accountReconEntity:r,entitySearchAutoCompleteActions:h,allAccountList:p,classList:a,localData:d,accountListNestedAccountHierarchy:c,classListNestedAccountHierarchy:m,selectedAccountId:u,entitySearchAutoCompleteData:g,excludeFetchById:f,saveFetchById:C,reviewTabSelectedVendorByTransactionId:w,refreshStatus:v,updateLocalData:k,onColumnSortConfigChanged:y,onSaveReconciliation:R,onSaveReconciliationReview:I,onReconMatchedTransactionClick:S,bankAccounts:T,creditCards:D}=e,{transactionsToReview:A,account:{accountType:O}}=r,b=i.useRef(null),[$,M]=i.useState(null),N=z=>{const V=A[z],de=us(V),_=hs(V),H=ps(V,O??"bank"),ie=ms(V,O??"bank"),he=gs(V),xe=ti(V),ge=V.recommendedAction.recommendedTransactions[0]?.merchantName!=null;return V.transactionId===$?_||H||ie||he||xe?275+(ge?25:0):de?185+V.recommendedAction.recommendedTransactions.length*40+(ge?25:0):146:72},G=i.useMemo(()=>({onColumnSortConfigChanged:y,sortConfig:{sortKey:n,sortOrder:l}}),[y,n,l]);if(i.useEffect(()=>{M(A[0]?.transactionId??null),b.current?.resetAfterIndex(0)},[n,l]),i.useEffect(()=>{b.current?.resetAfterIndex(0)},[$]),i.useEffect(()=>{b.current?.resetAfterIndex(0)},[A.length]),i.useEffect(()=>{v.fetchState==="Completed"&&b.current?.resetAfterIndex(0)},[v]),A.length===0){const z=Je("reconciliation",void 0,u).tabs.find(V=>V.id==="review")?.allDoneText;return t.jsx(Fu,{children:t.jsx(Tt,{tab:"reconciliation",title:z?.title??Ct.strings.empty,subTitle:z?.subTitle??Ct.strings.empty})})}return t.jsx(ju,{children:t.jsx($s.Provider,{value:G,children:t.jsx(to,{children:({height:z,width:V})=>t.jsx(no,{width:V,height:z,innerElementType:Ls,ref:b,itemCount:A.length,itemSize:N,itemKey:de=>A[de].transactionId,overscanCount:el,itemData:{transactionsList:A,expandedRowId:$,allAccountList:p,classList:a,accountListNestedAccountHierarchy:c,classListNestedAccountHierarchy:m,localData:d,entitySearchAutoCompleteData:g,entitySearchAutoCompleteActions:h,excludeFetchById:f,saveFetchById:C,reviewTabSelectedVendorByTransactionId:w,bankAccounts:T,creditCards:D,accountType:O,updateLocalData:k,setExpandedRowId:M,onSaveReconciliation:R,onSaveReconciliationReview:I,onReconMatchedTransactionClick:S},initialScrollOffset:0,children:fu})})})})},$s=i.createContext(void 0),Ls=i.forwardRef((e,n)=>{const{children:l,style:r,...h}=e,p=i.useContext($s);return t.jsxs(ku,{ref:n,style:{...r,width:"auto",maxWidth:"var(--side-panel-list-width, 100%)",padding:`${o.sp0} ${o.sp8}`},...h,children:[p!=null&&t.jsx(su,{onColumnSortConfigChanged:p.onColumnSortConfigChanged,sortConfig:p.sortConfig}),t.jsx(Iu,{children:l})]})});Ls.displayName="Account recon review table inner element type";const fu=({index:e,style:n,data:l})=>{const{selectedTransactionId:r}=eo(),{transactionsList:h,expandedRowId:p,setExpandedRowId:a,entitySearchAutoCompleteActions:d,allAccountList:c,classList:m,localData:u,updateLocalData:g,accountListNestedAccountHierarchy:f,classListNestedAccountHierarchy:C,entitySearchAutoCompleteData:w,onSaveReconciliation:v,onSaveReconciliationReview:k,onReconMatchedTransactionClick:y,excludeFetchById:R,saveFetchById:I,reviewTabSelectedVendorByTransactionId:S,bankAccounts:T,creditCards:D,accountType:A}=l,O=h[e],b=r!=null&&r===O.transactionId;return t.jsx(Su,{isPanelSelected:b,style:{...n,width:"100%"},children:t.jsx(yu,{transaction:O,expandedRowId:p,setExpandedRowId:a,entitySearchAutoCompleteActions:d,accountListNestedAccountHierarchy:f,allAccountList:c,classList:m,localData:u,updateLocalData:g,entitySearchAutoCompleteData:w,classListNestedAccountHierarchy:C,onSaveReconciliation:v,onSaveReconciliationReview:k,onReconMatchedTransactionClick:y,excludeFetchById:R,saveFetchById:I,selectedVendor:S[O.transactionId],bankAccounts:T,creditCards:D,accountType:A})})},yu=({transaction:e,expandedRowId:n,accountListNestedAccountHierarchy:l,entitySearchAutoCompleteActions:r,allAccountList:h,classList:p,classListNestedAccountHierarchy:a,localData:d,entitySearchAutoCompleteData:c,excludeFetchById:m,saveFetchById:u,selectedVendor:g,bankAccounts:f,creditCards:C,accountType:w,setExpandedRowId:v,updateLocalData:k,onSaveReconciliation:y,onSaveReconciliationReview:R,onReconMatchedTransactionClick:I})=>{const S=n===e.transactionId,T=Te(),D=Rt(),A=d[e.transactionId],O=e.recommendedAction.action==="record_bill_payment",b=e.recommendedAction.action==="record_expense",$=ti(e),M=h.find(z=>z.accountId===e.recommendedAction.recommendedTransactions[0]?.accountId),N=z=>z.recommendedAction.recommendedTransactions.length>0&&z.recommendedAction.recommendedTransactions[0].merchantName!=null?z.recommendedAction.recommendedTransactions[0].merchantName:Ct.strings.hyphen,G=e.recommendedAction.recommendedTransactions[0]?.merchantName;return t.jsxs(wu,{className:"recon-row-card",isQuickViewMode:D,isExpanded:S,children:[t.jsxs(bu,{isExpanded:S,onClick:()=>v(e.transactionId),"data-testid":F("account-reconciliation-review-row",e.transactionId),children:[D?null:t.jsx(un,{windowSize:T,responsiveWidth:Lt[0].width,children:t.jsx(dn,{children:e.transactionDate.format(js.MMMDCommaYYYYformat)})}),t.jsx(un,{windowSize:T,responsiveWidth:D?Vo[0].width:Lt[1].width,children:t.jsx(dn,{children:t.jsx(it,{itemTextStyle:{...Nt.standardRegular.cssObject,color:"inherit"},text:N(e)})})}),D?null:t.jsxs(t.Fragment,{children:[t.jsx(un,{windowSize:T,responsiveWidth:Lt[2].width,children:t.jsx(dn,{children:t.jsx(it,{itemTextStyle:{...Nt.standardRegular.cssObject,color:"inherit"},text:e.memo})})}),t.jsx(un,{windowSize:T,responsiveWidth:Lt[3].width,children:t.jsx(dn,{style:{textTransform:"capitalize"},children:e.transactionDirection})}),t.jsxs(un,{windowSize:T,responsiveWidth:Lt[4].width,children:[t.jsx(Ue,{controller:O,children:t.jsx(Pu,{children:t.jsx(zu,{children:be.review.matchesCount.replace("__count__",e.recommendedAction.recommendedTransactions.length.toString())})})}),t.jsx(Ue,{controller:!O,children:t.jsx(dn,{children:M!=null?t.jsxs(t.Fragment,{children:[t.jsx(Ts,{}),t.jsx(it,{itemTextStyle:{...Nt.standardRegular.cssObject,color:"inherit"},text:M.accountName})]}):Ct.strings.hyphen})})]})]}),t.jsx(un,{windowSize:T,isLastColumn:!0,responsiveWidth:D?Vo[1].width:Lt[5].width,children:t.jsx(dn,{children:ls("0,0.00",e.amount.amount,e.amount.currencySymbol)})})]}),t.jsxs(Ue,{controller:S&&A!=null,children:[t.jsx(Cu,{onSaveReconciliation:y,onSaveReconciliationReview:R,updateLocalData:k,saveFetchById:u,excludeFetchById:m,localData:A,classListNestedAccountHierarchy:a,allAccountList:h,classList:p,transaction:e,accountListNestedAccountHierarchy:l,entitySearchAutoCompleteActions:r,entitySearchAutoCompleteData:c,selectedVendor:g,bankAccounts:f,creditCards:C,accountType:w,onReconMatchedTransactionClick:I}),t.jsx(Ue,{controller:(O||b||$)&&G!=null,children:t.jsx(Vu,{children:t.jsxs(Hu,{children:[w==="credit_card"?be.review.creditCardDetail:be.review.bankDetail,Ct.strings.colon," ",G]})})})]})]})},Cu=({transaction:e,accountListNestedAccountHierarchy:n,entitySearchAutoCompleteActions:l,allAccountList:r,classList:h,classListNestedAccountHierarchy:p,localData:a,entitySearchAutoCompleteData:d,excludeFetchById:c,saveFetchById:m,selectedVendor:u,bankAccounts:g,creditCards:f,accountType:C,updateLocalData:w,onSaveReconciliation:v,onSaveReconciliationReview:k,onReconMatchedTransactionClick:y})=>{const R=mt(),I=Rt(),[S,T]=i.useState(!a.vendor?.id),[D,A]=i.useState(!a.customer?.id),[O,b]=i.useState(a.categoryId==null),[$,M]=i.useState(a.classId==null),[N,G]=i.useState(a.bankAccountId==null),[z,V]=i.useState(a.creditCardId==null),[de,_]=i.useState(!a.memo),H=us(e),ie=hs(e),he=ms(e,C??"bank"),xe=ps(e,C??"bank"),ge=gs(e),q=ti(e),K=i.useMemo(()=>{if(!ie&&!q)return Vt(n);if(u!=null&&u.id!==e.recommendedAction.recommendedTransactions[0]?.merchantId)return Vt(n,u?.recommendations);const j=r.find(je=>je.accountId===e.recommendedAction.recommendedTransactions[0]?.accountId),se=j!=null?{...j,reason:be.review.zeniGptRecommendation,min:0,max:0}:void 0;return Vt(n,[{account:se}])},[ie,q,u,e.recommendedAction.recommendedTransactions,r,n]),Y=i.useMemo(()=>{if(!ie&&!q)return Jn(p);if(u!=null&&u.id!==e.recommendedAction.recommendedTransactions[0]?.merchantId)return Jn(p,u?.recommendations);const j=h.find(je=>je.classId===e.recommendedAction.recommendedTransactions[0]?.classId),se=j!=null?{...j,reason:be.review.zeniGptRecommendation,min:0,max:0}:void 0;return Jn(p,[{class:se}])},[ie,q,u,e.recommendedAction.recommendedTransactions,h,p]),B=an({mode:"onSubmit",reValidateMode:"onSubmit",shouldFocusError:!0,defaultValues:i.useMemo(()=>Ui(e,a,K,r,Y,g,f,d),[e,a,Y,r,K,g,f,d]),values:i.useMemo(()=>Ui(e,a,K,r,Y,g,f,d),[e,a,Y,r,K,g,f,d])}),E=async(j,se)=>{j.includes("memo")||w(qi(se,e,d,r),e.transactionId,j.includes("vendor"))};i.useEffect(()=>{const j=B.watch((se,{name:je})=>{je!=null&&se!=null&&An(()=>E(je,se))});return()=>{j.unsubscribe()}});const Z=i.useCallback(j=>{if(!I){if(ie||ge||q){if((ie||q)&&a.vendor==null){T(!1),B.setError(Re(e.transactionId,"vendor"),{type:"required"});return}if(ge&&a.customer==null){A(!1),B.setError(Re(e.transactionId,"customer"),{type:"required"});return}if(a.categoryId==null){b(!1),B.setError(Re(e.transactionId,"category"),{type:"required"});return}}w(qi(j,e,d,r),e.transactionId,!1),k(e.transactionId)}},[I,ie,q,ge,w,e,d,r,k,a.categoryId,a.vendor,a.customer]),P=B.watch(Re(e.transactionId,"vendor")),X=B.watch(Re(e.transactionId,"customer")),J=i.useRef(),W=i.useMemo(()=>ie||q?"vendor":ge?"customer":null,[ie,q,ge]),U=(j,se)=>{W!=null&&l.onAutoCompleteInputChange?.(j,W),J.current=se};i.useEffect(()=>{d.entityAutoCompleteView.fetchState==="Completed"&&((ie||q)&&J.current?.(ns(d.entityAutoCompleteView)),ge&&J.current?.(hl(d.entityAutoCompleteView)))},[d.entityAutoCompleteView,ge,ie,q]);const L=j=>h.filter(se=>se.classId===j)[0]?.accountingClassNumber??void 0,ne=j=>r.filter(se=>se.qboId===j)[0]?.qboId,ee=i.useMemo(()=>{if(C==="bank")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"]}else switch(e.transactionDirection){case"payment":return["record_expense"];case"deposit":return["record_cc_credit","record_cc_payment"];default:return[]}},[C,e.recommendedAction.action,e.transactionDirection]),Q=()=>{I||b(!1)},pe=()=>{I||G(!1)},Ie=()=>{I||V(!1)};return i.useEffect(()=>{O===!1&&a.categoryId==null&&B.setFocus(Re(e.transactionId,"category"))},[O]),i.useEffect(()=>{$===!1&&a.classId==null&&B.setFocus(Re(e.transactionId,"class"))},[$]),i.useEffect(()=>{S===!1&&a.vendor==null&&B.setFocus(Re(e.transactionId,"vendor"))},[S]),i.useEffect(()=>{D===!1&&a.customer==null&&B.setFocus(Re(e.transactionId,"customer"))},[D]),i.useEffect(()=>{N===!1&&a.bankAccountId==null&&B.setFocus(Re(e.transactionId,"bankAccount"))},[N]),i.useEffect(()=>{z===!1&&a.creditCardId==null&&B.setFocus(Re(e.transactionId,"creditCard"))},[z]),t.jsx(sn,{...B,children:t.jsx("form",{onSubmit:B.handleSubmit(Z),id:Wi(e.transactionId),children:t.jsxs(vu,{children:[t.jsxs($u,{children:[t.jsxs(Au,{children:[t.jsxs(Eu,{children:[t.jsx(Ts,{}),t.jsx(co,{label:{label:H?be.review.formLabels.match:be.review.formLabels.categorize},radioField:{name:Re(e.transactionId,"match_radio"),id:H?"match":"categorize",value:H?"match":"categorize",checked:!0,style:{width:o.sp3,height:o.sp3,padding:"2px"}},style:{width:"auto"}})]}),t.jsx(Ue,{controller:!H,children:t.jsxs(t.Fragment,{children:[t.jsx(Ki,{}),ee.map(j=>t.jsx(co,{label:{label:be.review.formLabels[j]},style:{width:"auto"},isDisabled:"readonly",changeLabelColorInDisableMode:!0,radioField:{name:Re(e.transactionId,"recommendedActionType"),id:j,value:j,style:{width:o.sp3,height:o.sp3,padding:"2px"}}},j))]})})]}),t.jsxs(Tu,{children:[t.jsx($n,{variant:"secondary",size:"small",label:be.review.formLabels.exclude,loading:c[e.transactionId]?.fetchState==="In-Progress","data-testid":F("account-reconciliation-review-exclude-button",e.transactionId),style:{width:o.sp10},reverseSpinnerColor:!1,onClick:()=>{I||v({reconcileAction:"exclude",excludeTransactionId:e.transactionId})}}),t.jsx($n,{form:Wi(e.transactionId),"data-testid":F("account-reconciliation-review-save-button",e.transactionId),label:Ct.footer.save,style:{width:o.sp10},variant:"primary",size:"small",type:"submit",loading:m[e.transactionId]?.fetchState==="In-Progress"})]})]}),t.jsx(Ue,{controller:ie||ge||q,children:t.jsxs(mo,{children:[t.jsx(Ue,{controller:ie||q,children:t.jsx($t,{onClickAway:()=>{a.vendor==null&&S===!1&&T(!0)},children:t.jsx(oe,{style:{flex:1,padding:x[0],justifyContent:"center"},showHoverEffect:!0,forceHoverEffect:!1,children:t.jsxs(yt,{className:"hover-background",style:{padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(ce,{style:{display:"flex",alignItems:"center",gap:x[1]},children:Ct.texts.vendor}),t.jsx(ue,{style:{gap:x[3]},className:"item-value-container",children:t.jsx(t.Fragment,{children:S===!0?t.jsxs(fe,{onClick:j=>{j.stopPropagation(),!I&&T(!1)},"data-testid":F("account-reconciliation-review-add-vendor-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:x[1],color:R.colors.champion,cursor:"pointer"},children:[t.jsx(Zt,{}),be.review.formLabels.addVendor]}):t.jsx(Bo,{name:Re(e.transactionId,"vendor"),allowEmpty:!1,placeholder:be.review.formLabels.addVendor,valueToId:j=>j,defaultValue:{selectedOption:P?.selectedOption,defaultOptions:P?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:o.sp4})},registerOptions:{required:!0,validate:j=>!!j.selectedOption},loadOptions:U})})})]})})})}),t.jsx(Ue,{controller:ge,children:t.jsx($t,{onClickAway:()=>{a.customer==null&&D===!1&&A(!0)},children:t.jsx(oe,{style:{flex:1,padding:x[0],justifyContent:"center"},showHoverEffect:!0,forceHoverEffect:!1,children:t.jsxs(yt,{className:"hover-background",style:{padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(ce,{style:{display:"flex",alignItems:"center",gap:x[1]},children:Ct.texts.customer}),t.jsx(ue,{style:{gap:x[3]},className:"item-value-container",children:t.jsx(t.Fragment,{children:D===!0?t.jsxs(fe,{onClick:j=>{j.stopPropagation(),!I&&A(!1)},"data-testid":F("account-reconciliation-review-add-customer-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:x[1],color:R.colors.champion,cursor:"pointer"},children:[t.jsx(Zt,{}),be.review.formLabels.addCustomer]}):t.jsx(Bo,{name:Re(e.transactionId,"customer"),allowEmpty:!1,placeholder:be.review.formLabels.addCustomer,valueToId:j=>j,defaultValue:{selectedOption:X?.selectedOption,defaultOptions:X?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:o.sp4})},registerOptions:{required:!0,validate:j=>!!j.selectedOption},loadOptions:U})})})]})})})}),t.jsx($t,{onClickAway:()=>{a.categoryId==null&&O===!1&&b(!0)},children:t.jsx(oe,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(yt,{className:"hover-background",children:[t.jsx(ce,{style:{display:"flex",alignItems:"center",gap:x[1]},children:Ct.texts.category}),t.jsx(ue,{className:"item-value-container",children:t.jsx(t.Fragment,{children:O===!0?t.jsxs(fe,{onClick:j=>{j.stopPropagation(),!I&&Q()},"data-testid":F("account-reconciliation-review-add-category-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:x[1],color:R.colors.champion,cursor:"pointer"},children:[t.jsx(Zt,{}),be.review.formLabels.addCategory]}):t.jsx(mn,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Re(e.transactionId,"category"),placeholder:be.review.formLabels.addCategory,valueToId:j=>ne(j),defaultValue:{allOptions:K,selectedOption:r.find(j=>j.accountId===a.categoryId)?.qboId},registerOptions:{required:!0,validate:j=>!!j.selectedOption},customStyleConfig:Vn})})})]})})}),t.jsx($t,{onClickAway:()=>{a.classId==null&&$===!1&&M(!0)},children:t.jsx(oe,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(yt,{className:"hover-background",children:[t.jsx(ce,{style:{display:"flex",alignItems:"center",gap:x[1]},children:Ct.texts.class}),t.jsx(ue,{className:"item-value-container",children:t.jsx(t.Fragment,{children:$===!0?t.jsxs(fe,{onClick:j=>{j.stopPropagation(),!I&&M(!1)},"data-testid":F("account-reconciliation-review-add-class-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:x[1],color:R.colors.champion,cursor:"pointer"},children:[t.jsx(Zt,{}),be.review.formLabels.addClass]}):t.jsx(mn,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Re(e.transactionId,"class"),placeholder:be.review.formLabels.addClass,valueToId:j=>L(j),defaultValue:{allOptions:Y,selectedOption:a.classId},registerOptions:{required:!0,validate:j=>!!j.selectedOption},customStyleConfig:Vn})})})]})})})]})}),t.jsx(Ue,{controller:H,children:t.jsxs(Ru,{children:[t.jsxs(Du,{children:[t.jsx("span",{className:"matched-text",children:`${be.review.matchedFoundCount.replace("__count__",e.recommendedAction.recommendedTransactions.length.toString())} `}),be.review.matchesFoundFullInfo]}),t.jsx(Mu,{children:e.recommendedAction.recommendedTransactions.map(j=>j.bookTransactionId!=null?t.jsxs(_u,{children:[t.jsx(co,{label:{label:t.jsxs(Ou,{children:[t.jsx(Ve,{children:j.date.format(js.MMMDCommaYYYYformat)}),t.jsx(Ve,{children:j.memo})]})},style:{width:"auto"},isDisabled:void 0,changeLabelColorInDisableMode:!0,radioField:{name:Re(e.transactionId,"matchedTransaction"),registerOptions:{required:!0},id:j.bookTransactionId,value:j.bookTransactionId,style:{width:o.sp3,height:o.sp3,padding:"2px"}}}),t.jsxs(Nu,{"data-testid":F("account-reconciliation-review-matched-transaction-amount",j.bookTransactionId),onClick:()=>{j.bookTransactionId!=null&&y(j.bookTransactionId)},children:[t.jsx(Bu,{children:ls("0,0.00",j.amount.amount,j.amount.currencySymbol)}),t.jsx(Ki,{})]})]},j.bookTransactionId):null)})]})}),t.jsx(Ue,{controller:he,children:t.jsx(mo,{children:t.jsx($t,{onClickAway:()=>{a.bankAccountId==null&&N===!1&&G(!0)},children:t.jsx(oe,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(yt,{className:"hover-background",children:[t.jsx(ce,{style:{display:"flex",alignItems:"center",gap:x[1]},children:C==="credit_card"?be.review.formLabels.selectAccount:be.review.formLabels.transferTo}),t.jsx(ue,{className:"item-value-container",children:t.jsx(t.Fragment,{children:N===!0?t.jsxs(fe,{onClick:j=>{j.stopPropagation(),!I&&pe()},"data-testid":F("account-reconciliation-review-add-account-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:x[1],color:R.colors.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(Zt,{}),be.review.formLabels.selectAccount]}):t.jsx(mn,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Re(e.transactionId,"bankAccount"),placeholder:be.review.formLabels.selectAccount,defaultValue:{allOptions:ks(g),selectedOption:a.bankAccountId},registerOptions:{required:!0,validate:j=>!!j.selectedOption},customStyleConfig:Vn})})})]})})})})}),t.jsx(Ue,{controller:xe,children:t.jsx(mo,{children:t.jsx($t,{onClickAway:()=>{a.creditCardId==null&&z===!1&&V(!0)},children:t.jsx(oe,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(yt,{className:"hover-background",children:[t.jsx(ce,{style:{display:"flex",alignItems:"center",gap:x[1]},children:be.review.formLabels.creditCard}),t.jsx(ue,{className:"item-value-container",children:t.jsx(t.Fragment,{children:z===!0?t.jsxs(fe,{onClick:j=>{j.stopPropagation(),!I&&Ie()},"data-testid":F("account-reconciliation-review-add-credit-card-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:x[1],color:R.colors.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(Zt,{}),be.review.formLabels.selectCard]}):t.jsx(mn,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Re(e.transactionId,"creditCard"),placeholder:be.review.formLabels.selectCard,defaultValue:{allOptions:Is(f),selectedOption:a.creditCardId},registerOptions:{required:!0,validate:j=>!!j.selectedOption},customStyleConfig:Vn})})})]})})})})}),t.jsx(Ue,{controller:!H,children:t.jsx(Lu,{children:t.jsx(oe,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",width:"100%"},children:t.jsxs(yt,{className:"hover-background",children:[t.jsx(ce,{style:{display:"flex",alignItems:"center",gap:x[1]},children:be.review.header.memo}),t.jsx(ue,{className:"item-value-container",children:t.jsx(t.Fragment,{children:de===!0?t.jsxs(fe,{onClick:j=>{j.stopPropagation(),!I&&_(!1)},"data-testid":F("account-reconciliation-review-add-memo-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:x[1],color:R.colors.champion,cursor:"pointer"},children:[t.jsx(Zt,{}),be.review.formLabels.addMemo]}):t.jsx(pl,{name:Re(e.transactionId,"memo"),placeholder:be.review.formLabels.addMemo,type:"text",style:{padding:0,textAlign:"left",width:"100%",background:"transparent"}})})})]})})})})]})})})},Vn={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}`})},Ui=(e,n,l,r,h,p,a,d)=>{const c=r.find(m=>m.accountId===n.categoryId);return{[ht]:{[e.transactionId]:{category:{selectedOption:c?.qboId,allOptions:l},class:{selectedOption:n?.classId,allOptions:h},bankAccount:{selectedOption:n?.bankAccountId,allOptions:ks(p)},creditCard:{selectedOption:n?.creditCardId,allOptions:Is(a)},memo:n?.memo,recommendedActionType:e.recommendedAction.action,matchedTransaction:n?.matchedTransactionId,vendor:{selectedOption:n?.vendor?.id,defaultOptions:ss(d.entityAutoCompleteView,n?.vendor)},customer:{selectedOption:n?.customer?.id,defaultOptions:kl(n?.customer,d.entityAutoCompleteView)}}}}},qi=(e,n,l,r)=>{const{vendor:h,customer:p}=e[ht][n.transactionId];let a;if(h.selectedOption!=null){const c=h.defaultOptions.find(m=>m.value===h.selectedOption);if(c!=null)a={id:h.selectedOption,name:c.label};else{const m=l.entityAutoCompleteView.vendor.find(u=>u.id===h.selectedOption||u.zeniId===h.selectedOption);m!=null&&(a={id:m.zeniId,name:m.name})}}let d;if(p.selectedOption!=null){const c=p.defaultOptions.find(m=>m.value===p.selectedOption);if(c!=null)d={id:p.selectedOption,name:c.label};else{const m=l.entityAutoCompleteView.customer.find(u=>u.id===p.selectedOption||u.zeniId===p.selectedOption);m!=null&&(d={id:m.zeniId,name:m.name})}}return{categoryId:r.find(c=>c.qboId===e[ht][n.transactionId].category.selectedOption)?.accountId??e[ht][n.transactionId].category.selectedOption,classId:e[ht][n.transactionId].class.selectedOption,memo:e[ht][n.transactionId].memo,matchedTransactionId:e[ht][n.transactionId].matchedTransaction,vendor:a,bankAccountId:e[ht][n.transactionId].bankAccount.selectedOption,creditCardId:e[ht][n.transactionId].creditCard.selectedOption,customer:d}},dn=s(Ve)`
|
|
578
|
+
`,ht="accountReconReviewTableSection",{dateFormat:mu,expenseAutomation:gu,common:Ct}=Ae.getLocalizedStrings(),{visual:js}=mu,{accountRecon:be}=gu,ks=e=>[{label:be.review.formLabels.allBankAccounts,options:e.map(n=>({label:n.accountName,value:n.accountId}))}],Is=e=>[{label:be.review.formLabels.allCreditCards,options:e.map(n=>({label:n.accountName,value:n.accountId}))}],Wi=e=>`${ht}_${e}_form`,Re=(e,n)=>`${ht}.${e}.${n}`,xu=e=>{const{sortKey:n,sortOrder:l,accountReconEntity:r,entitySearchAutoCompleteActions:h,allAccountList:p,classList:a,localData:d,accountListNestedAccountHierarchy:c,classListNestedAccountHierarchy:m,selectedAccountId:u,entitySearchAutoCompleteData:g,excludeFetchById:f,saveFetchById:y,reviewTabSelectedVendorByTransactionId:w,refreshStatus:v,updateLocalData:k,onColumnSortConfigChanged:C,onSaveReconciliation:R,onSaveReconciliationReview:I,onReconMatchedTransactionClick:S,bankAccounts:T,creditCards:D}=e,{transactionsToReview:A,account:{accountType:O}}=r,b=i.useRef(null),[$,M]=i.useState(null),N=z=>{const V=A[z],de=us(V),_=hs(V),H=ps(V,O??"bank"),ie=ms(V,O??"bank"),he=gs(V),xe=ti(V),ge=V.recommendedAction.recommendedTransactions[0]?.merchantName!=null;return V.transactionId===$?_||H||ie||he||xe?275+(ge?25:0):de?185+V.recommendedAction.recommendedTransactions.length*40+(ge?25:0):146:72},G=i.useMemo(()=>({onColumnSortConfigChanged:C,sortConfig:{sortKey:n,sortOrder:l}}),[C,n,l]);if(i.useEffect(()=>{M(A[0]?.transactionId??null),b.current?.resetAfterIndex(0)},[n,l]),i.useEffect(()=>{b.current?.resetAfterIndex(0)},[$]),i.useEffect(()=>{b.current?.resetAfterIndex(0)},[A.length]),i.useEffect(()=>{v.fetchState==="Completed"&&b.current?.resetAfterIndex(0)},[v]),A.length===0){const z=Je("reconciliation",void 0,u).tabs.find(V=>V.id==="review")?.allDoneText;return t.jsx(Fu,{children:t.jsx(Tt,{tab:"reconciliation",title:z?.title??Ct.strings.empty,subTitle:z?.subTitle??Ct.strings.empty})})}return t.jsx(ju,{children:t.jsx($s.Provider,{value:G,children:t.jsx(to,{children:({height:z,width:V})=>t.jsx(no,{width:V,height:z,innerElementType:Ls,ref:b,itemCount:A.length,itemSize:N,itemKey:de=>A[de].transactionId,overscanCount:el,itemData:{transactionsList:A,expandedRowId:$,allAccountList:p,classList:a,accountListNestedAccountHierarchy:c,classListNestedAccountHierarchy:m,localData:d,entitySearchAutoCompleteData:g,entitySearchAutoCompleteActions:h,excludeFetchById:f,saveFetchById:y,reviewTabSelectedVendorByTransactionId:w,bankAccounts:T,creditCards:D,accountType:O,updateLocalData:k,setExpandedRowId:M,onSaveReconciliation:R,onSaveReconciliationReview:I,onReconMatchedTransactionClick:S},initialScrollOffset:0,children:fu})})})})},$s=i.createContext(void 0),Ls=i.forwardRef((e,n)=>{const{children:l,style:r,...h}=e,p=i.useContext($s);return t.jsxs(ku,{ref:n,style:{...r,width:"auto",maxWidth:"var(--side-panel-list-width, 100%)",padding:`${o.sp0} ${o.sp8}`},...h,children:[p!=null&&t.jsx(su,{onColumnSortConfigChanged:p.onColumnSortConfigChanged,sortConfig:p.sortConfig}),t.jsx(Iu,{children:l})]})});Ls.displayName="Account recon review table inner element type";const fu=({index:e,style:n,data:l})=>{const{selectedTransactionId:r}=eo(),{transactionsList:h,expandedRowId:p,setExpandedRowId:a,entitySearchAutoCompleteActions:d,allAccountList:c,classList:m,localData:u,updateLocalData:g,accountListNestedAccountHierarchy:f,classListNestedAccountHierarchy:y,entitySearchAutoCompleteData:w,onSaveReconciliation:v,onSaveReconciliationReview:k,onReconMatchedTransactionClick:C,excludeFetchById:R,saveFetchById:I,reviewTabSelectedVendorByTransactionId:S,bankAccounts:T,creditCards:D,accountType:A}=l,O=h[e],b=r!=null&&r===O.transactionId;return t.jsx(Su,{isPanelSelected:b,style:{...n,width:"100%"},children:t.jsx(yu,{transaction:O,expandedRowId:p,setExpandedRowId:a,entitySearchAutoCompleteActions:d,accountListNestedAccountHierarchy:f,allAccountList:c,classList:m,localData:u,updateLocalData:g,entitySearchAutoCompleteData:w,classListNestedAccountHierarchy:y,onSaveReconciliation:v,onSaveReconciliationReview:k,onReconMatchedTransactionClick:C,excludeFetchById:R,saveFetchById:I,selectedVendor:S[O.transactionId],bankAccounts:T,creditCards:D,accountType:A})})},yu=({transaction:e,expandedRowId:n,accountListNestedAccountHierarchy:l,entitySearchAutoCompleteActions:r,allAccountList:h,classList:p,classListNestedAccountHierarchy:a,localData:d,entitySearchAutoCompleteData:c,excludeFetchById:m,saveFetchById:u,selectedVendor:g,bankAccounts:f,creditCards:y,accountType:w,setExpandedRowId:v,updateLocalData:k,onSaveReconciliation:C,onSaveReconciliationReview:R,onReconMatchedTransactionClick:I})=>{const S=n===e.transactionId,T=Te(),D=Rt(),A=d[e.transactionId],O=e.recommendedAction.action==="record_bill_payment",b=e.recommendedAction.action==="record_expense",$=ti(e),M=h.find(z=>z.accountId===e.recommendedAction.recommendedTransactions[0]?.accountId),N=z=>z.recommendedAction.recommendedTransactions.length>0&&z.recommendedAction.recommendedTransactions[0].merchantName!=null?z.recommendedAction.recommendedTransactions[0].merchantName:Ct.strings.hyphen,G=e.recommendedAction.recommendedTransactions[0]?.merchantName;return t.jsxs(wu,{className:"recon-row-card",isQuickViewMode:D,isExpanded:S,children:[t.jsxs(bu,{isExpanded:S,onClick:()=>v(e.transactionId),"data-testid":F("account-reconciliation-review-row",e.transactionId),children:[D?null:t.jsx(un,{windowSize:T,responsiveWidth:Lt[0].width,children:t.jsx(dn,{children:e.transactionDate.format(js.MMMDCommaYYYYformat)})}),t.jsx(un,{windowSize:T,responsiveWidth:D?Vo[0].width:Lt[1].width,children:t.jsx(dn,{children:t.jsx(it,{itemTextStyle:{...Nt.standardRegular.cssObject,color:"inherit"},text:N(e)})})}),D?null:t.jsxs(t.Fragment,{children:[t.jsx(un,{windowSize:T,responsiveWidth:Lt[2].width,children:t.jsx(dn,{children:t.jsx(it,{itemTextStyle:{...Nt.standardRegular.cssObject,color:"inherit"},text:e.memo})})}),t.jsx(un,{windowSize:T,responsiveWidth:Lt[3].width,children:t.jsx(dn,{style:{textTransform:"capitalize"},children:e.transactionDirection})}),t.jsxs(un,{windowSize:T,responsiveWidth:Lt[4].width,children:[t.jsx(Ue,{controller:O,children:t.jsx(Pu,{children:t.jsx(zu,{children:be.review.matchesCount.replace("__count__",e.recommendedAction.recommendedTransactions.length.toString())})})}),t.jsx(Ue,{controller:!O,children:t.jsx(dn,{children:M!=null?t.jsxs(t.Fragment,{children:[t.jsx(Ts,{}),t.jsx(it,{itemTextStyle:{...Nt.standardRegular.cssObject,color:"inherit"},text:M.accountName})]}):Ct.strings.hyphen})})]})]}),t.jsx(un,{windowSize:T,isLastColumn:!0,responsiveWidth:D?Vo[1].width:Lt[5].width,children:t.jsx(dn,{children:ls("0,0.00",e.amount.amount,e.amount.currencySymbol)})})]}),t.jsxs(Ue,{controller:S&&A!=null,children:[t.jsx(Cu,{onSaveReconciliation:C,onSaveReconciliationReview:R,updateLocalData:k,saveFetchById:u,excludeFetchById:m,localData:A,classListNestedAccountHierarchy:a,allAccountList:h,classList:p,transaction:e,accountListNestedAccountHierarchy:l,entitySearchAutoCompleteActions:r,entitySearchAutoCompleteData:c,selectedVendor:g,bankAccounts:f,creditCards:y,accountType:w,onReconMatchedTransactionClick:I}),t.jsx(Ue,{controller:(O||b||$)&&G!=null,children:t.jsx(Vu,{children:t.jsxs(Hu,{children:[w==="credit_card"?be.review.creditCardDetail:be.review.bankDetail,Ct.strings.colon," ",G]})})})]})]})},Cu=({transaction:e,accountListNestedAccountHierarchy:n,entitySearchAutoCompleteActions:l,allAccountList:r,classList:h,classListNestedAccountHierarchy:p,localData:a,entitySearchAutoCompleteData:d,excludeFetchById:c,saveFetchById:m,selectedVendor:u,bankAccounts:g,creditCards:f,accountType:y,updateLocalData:w,onSaveReconciliation:v,onSaveReconciliationReview:k,onReconMatchedTransactionClick:C})=>{const R=mt(),I=Rt(),[S,T]=i.useState(!a.vendor?.id),[D,A]=i.useState(!a.customer?.id),[O,b]=i.useState(a.categoryId==null),[$,M]=i.useState(a.classId==null),[N,G]=i.useState(a.bankAccountId==null),[z,V]=i.useState(a.creditCardId==null),[de,_]=i.useState(!a.memo),H=us(e),ie=hs(e),he=ms(e,y??"bank"),xe=ps(e,y??"bank"),ge=gs(e),q=ti(e),K=i.useMemo(()=>{if(!ie&&!q)return Vt(n);if(u!=null&&u.id!==e.recommendedAction.recommendedTransactions[0]?.merchantId)return Vt(n,u?.recommendations);const j=r.find(je=>je.accountId===e.recommendedAction.recommendedTransactions[0]?.accountId),se=j!=null?{...j,reason:be.review.zeniGptRecommendation,min:0,max:0}:void 0;return Vt(n,[{account:se}])},[ie,q,u,e.recommendedAction.recommendedTransactions,r,n]),Y=i.useMemo(()=>{if(!ie&&!q)return Jn(p);if(u!=null&&u.id!==e.recommendedAction.recommendedTransactions[0]?.merchantId)return Jn(p,u?.recommendations);const j=h.find(je=>je.classId===e.recommendedAction.recommendedTransactions[0]?.classId),se=j!=null?{...j,reason:be.review.zeniGptRecommendation,min:0,max:0}:void 0;return Jn(p,[{class:se}])},[ie,q,u,e.recommendedAction.recommendedTransactions,h,p]),B=an({mode:"onSubmit",reValidateMode:"onSubmit",shouldFocusError:!0,defaultValues:i.useMemo(()=>Ui(e,a,K,r,Y,g,f,d),[e,a,Y,r,K,g,f,d]),values:i.useMemo(()=>Ui(e,a,K,r,Y,g,f,d),[e,a,Y,r,K,g,f,d])}),E=async(j,se)=>{j.includes("memo")||w(qi(se,e,d,r),e.transactionId,j.includes("vendor"))};i.useEffect(()=>{const j=B.watch((se,{name:je})=>{je!=null&&se!=null&&An(()=>E(je,se))});return()=>{j.unsubscribe()}});const Z=i.useCallback(j=>{if(!I){if(ie||ge||q){if((ie||q)&&a.vendor==null){T(!1),B.setError(Re(e.transactionId,"vendor"),{type:"required"});return}if(ge&&a.customer==null){A(!1),B.setError(Re(e.transactionId,"customer"),{type:"required"});return}if(a.categoryId==null){b(!1),B.setError(Re(e.transactionId,"category"),{type:"required"});return}}w(qi(j,e,d,r),e.transactionId,!1),k(e.transactionId)}},[I,ie,q,ge,w,e,d,r,k,a.categoryId,a.vendor,a.customer]),P=B.watch(Re(e.transactionId,"vendor")),X=B.watch(Re(e.transactionId,"customer")),J=i.useRef(),W=i.useMemo(()=>ie||q?"vendor":ge?"customer":null,[ie,q,ge]),U=(j,se)=>{W!=null&&l.onAutoCompleteInputChange?.(j,W),J.current=se};i.useEffect(()=>{d.entityAutoCompleteView.fetchState==="Completed"&&((ie||q)&&J.current?.(ns(d.entityAutoCompleteView)),ge&&J.current?.(hl(d.entityAutoCompleteView)))},[d.entityAutoCompleteView,ge,ie,q]);const L=j=>h.filter(se=>se.classId===j)[0]?.accountingClassNumber??void 0,ne=j=>r.filter(se=>se.qboId===j)[0]?.qboId,ee=i.useMemo(()=>{if(y==="bank")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"]}else switch(e.transactionDirection){case"payment":return["record_expense"];case"deposit":return["record_cc_credit","record_cc_payment"];default:return[]}},[y,e.recommendedAction.action,e.transactionDirection]),Q=()=>{I||b(!1)},pe=()=>{I||G(!1)},Ie=()=>{I||V(!1)};return i.useEffect(()=>{O===!1&&a.categoryId==null&&B.setFocus(Re(e.transactionId,"category"))},[O]),i.useEffect(()=>{$===!1&&a.classId==null&&B.setFocus(Re(e.transactionId,"class"))},[$]),i.useEffect(()=>{S===!1&&a.vendor==null&&B.setFocus(Re(e.transactionId,"vendor"))},[S]),i.useEffect(()=>{D===!1&&a.customer==null&&B.setFocus(Re(e.transactionId,"customer"))},[D]),i.useEffect(()=>{N===!1&&a.bankAccountId==null&&B.setFocus(Re(e.transactionId,"bankAccount"))},[N]),i.useEffect(()=>{z===!1&&a.creditCardId==null&&B.setFocus(Re(e.transactionId,"creditCard"))},[z]),t.jsx(sn,{...B,children:t.jsx("form",{onSubmit:B.handleSubmit(Z),id:Wi(e.transactionId),children:t.jsxs(vu,{children:[t.jsxs($u,{children:[t.jsxs(Au,{children:[t.jsxs(Eu,{children:[t.jsx(Ts,{}),t.jsx(co,{label:{label:H?be.review.formLabels.match:be.review.formLabels.categorize},radioField:{name:Re(e.transactionId,"match_radio"),id:H?"match":"categorize",value:H?"match":"categorize",checked:!0,style:{width:o.sp3,height:o.sp3,padding:"2px"}},style:{width:"auto"}})]}),t.jsx(Ue,{controller:!H,children:t.jsxs(t.Fragment,{children:[t.jsx(Ki,{}),ee.map(j=>t.jsx(co,{label:{label:be.review.formLabels[j]},style:{width:"auto"},isDisabled:"readonly",changeLabelColorInDisableMode:!0,radioField:{name:Re(e.transactionId,"recommendedActionType"),id:j,value:j,style:{width:o.sp3,height:o.sp3,padding:"2px"}}},j))]})})]}),t.jsxs(Tu,{children:[t.jsx($n,{variant:"secondary",size:"small",label:be.review.formLabels.exclude,loading:c[e.transactionId]?.fetchState==="In-Progress","data-testid":F("account-reconciliation-review-exclude-button",e.transactionId),style:{width:o.sp10},reverseSpinnerColor:!1,onClick:()=>{I||v({reconcileAction:"exclude",excludeTransactionId:e.transactionId})}}),t.jsx($n,{form:Wi(e.transactionId),"data-testid":F("account-reconciliation-review-save-button",e.transactionId),label:Ct.footer.save,style:{width:o.sp10},variant:"primary",size:"small",type:"submit",loading:m[e.transactionId]?.fetchState==="In-Progress"})]})]}),t.jsx(Ue,{controller:ie||ge||q,children:t.jsxs(mo,{children:[t.jsx(Ue,{controller:ie||q,children:t.jsx($t,{onClickAway:()=>{a.vendor==null&&S===!1&&T(!0)},children:t.jsx(oe,{style:{flex:1,padding:x[0],justifyContent:"center"},showHoverEffect:!0,forceHoverEffect:!1,children:t.jsxs(yt,{className:"hover-background",style:{padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(ce,{style:{display:"flex",alignItems:"center",gap:x[1]},children:Ct.texts.vendor}),t.jsx(ue,{style:{gap:x[3]},className:"item-value-container",children:t.jsx(t.Fragment,{children:S===!0?t.jsxs(fe,{onClick:j=>{j.stopPropagation(),!I&&T(!1)},"data-testid":F("account-reconciliation-review-add-vendor-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:x[1],color:R.colors.champion,cursor:"pointer"},children:[t.jsx(Zt,{}),be.review.formLabels.addVendor]}):t.jsx(Bo,{name:Re(e.transactionId,"vendor"),allowEmpty:!1,placeholder:be.review.formLabels.addVendor,valueToId:j=>j,defaultValue:{selectedOption:P?.selectedOption,defaultOptions:P?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:o.sp4})},registerOptions:{required:!0,validate:j=>!!j.selectedOption},loadOptions:U})})})]})})})}),t.jsx(Ue,{controller:ge,children:t.jsx($t,{onClickAway:()=>{a.customer==null&&D===!1&&A(!0)},children:t.jsx(oe,{style:{flex:1,padding:x[0],justifyContent:"center"},showHoverEffect:!0,forceHoverEffect:!1,children:t.jsxs(yt,{className:"hover-background",style:{padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(ce,{style:{display:"flex",alignItems:"center",gap:x[1]},children:Ct.texts.customer}),t.jsx(ue,{style:{gap:x[3]},className:"item-value-container",children:t.jsx(t.Fragment,{children:D===!0?t.jsxs(fe,{onClick:j=>{j.stopPropagation(),!I&&A(!1)},"data-testid":F("account-reconciliation-review-add-customer-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:x[1],color:R.colors.champion,cursor:"pointer"},children:[t.jsx(Zt,{}),be.review.formLabels.addCustomer]}):t.jsx(Bo,{name:Re(e.transactionId,"customer"),allowEmpty:!1,placeholder:be.review.formLabels.addCustomer,valueToId:j=>j,defaultValue:{selectedOption:X?.selectedOption,defaultOptions:X?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:o.sp4})},registerOptions:{required:!0,validate:j=>!!j.selectedOption},loadOptions:U})})})]})})})}),t.jsx($t,{onClickAway:()=>{a.categoryId==null&&O===!1&&b(!0)},children:t.jsx(oe,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(yt,{className:"hover-background",children:[t.jsx(ce,{style:{display:"flex",alignItems:"center",gap:x[1]},children:Ct.texts.category}),t.jsx(ue,{className:"item-value-container",children:t.jsx(t.Fragment,{children:O===!0?t.jsxs(fe,{onClick:j=>{j.stopPropagation(),!I&&Q()},"data-testid":F("account-reconciliation-review-add-category-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:x[1],color:R.colors.champion,cursor:"pointer"},children:[t.jsx(Zt,{}),be.review.formLabels.addCategory]}):t.jsx(mn,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Re(e.transactionId,"category"),placeholder:be.review.formLabels.addCategory,valueToId:j=>ne(j),defaultValue:{allOptions:K,selectedOption:r.find(j=>j.accountId===a.categoryId)?.qboId},registerOptions:{required:!0,validate:j=>!!j.selectedOption},customStyleConfig:Vn})})})]})})}),t.jsx($t,{onClickAway:()=>{a.classId==null&&$===!1&&M(!0)},children:t.jsx(oe,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(yt,{className:"hover-background",children:[t.jsx(ce,{style:{display:"flex",alignItems:"center",gap:x[1]},children:Ct.texts.class}),t.jsx(ue,{className:"item-value-container",children:t.jsx(t.Fragment,{children:$===!0?t.jsxs(fe,{onClick:j=>{j.stopPropagation(),!I&&M(!1)},"data-testid":F("account-reconciliation-review-add-class-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:x[1],color:R.colors.champion,cursor:"pointer"},children:[t.jsx(Zt,{}),be.review.formLabels.addClass]}):t.jsx(mn,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Re(e.transactionId,"class"),placeholder:be.review.formLabels.addClass,valueToId:j=>L(j),defaultValue:{allOptions:Y,selectedOption:a.classId},registerOptions:{required:!0,validate:j=>!!j.selectedOption},customStyleConfig:Vn})})})]})})})]})}),t.jsx(Ue,{controller:H,children:t.jsxs(Ru,{children:[t.jsxs(Du,{children:[t.jsx("span",{className:"matched-text",children:`${be.review.matchedFoundCount.replace("__count__",e.recommendedAction.recommendedTransactions.length.toString())} `}),be.review.matchesFoundFullInfo]}),t.jsx(Mu,{children:e.recommendedAction.recommendedTransactions.map(j=>j.bookTransactionId!=null?t.jsxs(_u,{children:[t.jsx(co,{label:{label:t.jsxs(Ou,{children:[t.jsx(Ve,{children:j.date.format(js.MMMDCommaYYYYformat)}),t.jsx(Ve,{children:j.memo})]})},style:{width:"auto"},isDisabled:void 0,changeLabelColorInDisableMode:!0,radioField:{name:Re(e.transactionId,"matchedTransaction"),registerOptions:{required:!0},id:j.bookTransactionId,value:j.bookTransactionId,style:{width:o.sp3,height:o.sp3,padding:"2px"}}}),t.jsxs(Nu,{"data-testid":F("account-reconciliation-review-matched-transaction-amount",j.bookTransactionId),onClick:()=>{j.bookTransactionId!=null&&C(j.bookTransactionId)},children:[t.jsx(Bu,{children:ls("0,0.00",j.amount.amount,j.amount.currencySymbol)}),t.jsx(Ki,{})]})]},j.bookTransactionId):null)})]})}),t.jsx(Ue,{controller:he,children:t.jsx(mo,{children:t.jsx($t,{onClickAway:()=>{a.bankAccountId==null&&N===!1&&G(!0)},children:t.jsx(oe,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(yt,{className:"hover-background",children:[t.jsx(ce,{style:{display:"flex",alignItems:"center",gap:x[1]},children:y==="credit_card"?be.review.formLabels.selectAccount:be.review.formLabels.transferTo}),t.jsx(ue,{className:"item-value-container",children:t.jsx(t.Fragment,{children:N===!0?t.jsxs(fe,{onClick:j=>{j.stopPropagation(),!I&&pe()},"data-testid":F("account-reconciliation-review-add-account-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:x[1],color:R.colors.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(Zt,{}),be.review.formLabels.selectAccount]}):t.jsx(mn,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Re(e.transactionId,"bankAccount"),placeholder:be.review.formLabels.selectAccount,defaultValue:{allOptions:ks(g),selectedOption:a.bankAccountId},registerOptions:{required:!0,validate:j=>!!j.selectedOption},customStyleConfig:Vn})})})]})})})})}),t.jsx(Ue,{controller:xe,children:t.jsx(mo,{children:t.jsx($t,{onClickAway:()=>{a.creditCardId==null&&z===!1&&V(!0)},children:t.jsx(oe,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(yt,{className:"hover-background",children:[t.jsx(ce,{style:{display:"flex",alignItems:"center",gap:x[1]},children:be.review.formLabels.creditCard}),t.jsx(ue,{className:"item-value-container",children:t.jsx(t.Fragment,{children:z===!0?t.jsxs(fe,{onClick:j=>{j.stopPropagation(),!I&&Ie()},"data-testid":F("account-reconciliation-review-add-credit-card-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:x[1],color:R.colors.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(Zt,{}),be.review.formLabels.selectCard]}):t.jsx(mn,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Re(e.transactionId,"creditCard"),placeholder:be.review.formLabels.selectCard,defaultValue:{allOptions:Is(f),selectedOption:a.creditCardId},registerOptions:{required:!0,validate:j=>!!j.selectedOption},customStyleConfig:Vn})})})]})})})})}),t.jsx(Ue,{controller:!H,children:t.jsx(Lu,{children:t.jsx(oe,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",width:"100%"},children:t.jsxs(yt,{className:"hover-background",children:[t.jsx(ce,{style:{display:"flex",alignItems:"center",gap:x[1]},children:be.review.header.memo}),t.jsx(ue,{className:"item-value-container",children:t.jsx(t.Fragment,{children:de===!0?t.jsxs(fe,{onClick:j=>{j.stopPropagation(),!I&&_(!1)},"data-testid":F("account-reconciliation-review-add-memo-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:x[1],color:R.colors.champion,cursor:"pointer"},children:[t.jsx(Zt,{}),be.review.formLabels.addMemo]}):t.jsx(pl,{name:Re(e.transactionId,"memo"),placeholder:be.review.formLabels.addMemo,type:"text",style:{padding:0,textAlign:"left",width:"100%",background:"transparent"}})})})]})})})})]})})})},Vn={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}`})},Ui=(e,n,l,r,h,p,a,d)=>{const c=r.find(m=>m.accountId===n.categoryId);return{[ht]:{[e.transactionId]:{category:{selectedOption:c?.qboId,allOptions:l},class:{selectedOption:n?.classId,allOptions:h},bankAccount:{selectedOption:n?.bankAccountId,allOptions:ks(p)},creditCard:{selectedOption:n?.creditCardId,allOptions:Is(a)},memo:n?.memo,recommendedActionType:e.recommendedAction.action,matchedTransaction:n?.matchedTransactionId,vendor:{selectedOption:n?.vendor?.id,defaultOptions:ss(d.entityAutoCompleteView,n?.vendor)},customer:{selectedOption:n?.customer?.id,defaultOptions:kl(n?.customer,d.entityAutoCompleteView)}}}}},qi=(e,n,l,r)=>{const{vendor:h,customer:p}=e[ht][n.transactionId];let a;if(h.selectedOption!=null){const c=h.defaultOptions.find(m=>m.value===h.selectedOption);if(c!=null)a={id:h.selectedOption,name:c.label};else{const m=l.entityAutoCompleteView.vendor.find(u=>u.id===h.selectedOption||u.zeniId===h.selectedOption);m!=null&&(a={id:m.zeniId,name:m.name})}}let d;if(p.selectedOption!=null){const c=p.defaultOptions.find(m=>m.value===p.selectedOption);if(c!=null)d={id:p.selectedOption,name:c.label};else{const m=l.entityAutoCompleteView.customer.find(u=>u.id===p.selectedOption||u.zeniId===p.selectedOption);m!=null&&(d={id:m.zeniId,name:m.name})}}return{categoryId:r.find(c=>c.qboId===e[ht][n.transactionId].category.selectedOption)?.accountId??e[ht][n.transactionId].category.selectedOption,classId:e[ht][n.transactionId].class.selectedOption,memo:e[ht][n.transactionId].memo,matchedTransactionId:e[ht][n.transactionId].matchedTransaction,vendor:a,bankAccountId:e[ht][n.transactionId].bankAccount.selectedOption,creditCardId:e[ht][n.transactionId].creditCard.selectedOption,customer:d}},dn=s(Ve)`
|
|
579
579
|
display: flex;
|
|
580
580
|
align-items: center;
|
|
581
581
|
column-gap: ${o.sp1};
|
|
@@ -727,7 +727,7 @@ import{o,bW as ar,J as Te,gl as Ba,gm as Fa,V as t,cr as sr,bC as rr,aa as Ue,aS
|
|
|
727
727
|
path {
|
|
728
728
|
stroke-width: 2;
|
|
729
729
|
}
|
|
730
|
-
`,Wu=({reconciliation:e,entitySearchAutoCompleteData:n,selectedAccountId:l,currentFooterFormId:r,entitySearchAutoCompleteActions:h,onUpdateReconcileTabLocalData:p,setCurrentFooterFormId:a,onReconTabColumnSortConfigChanged:d,updateReviewTabLocalData:c,onReconReviewTabColumnSortConfigChanged:m,onSaveReconciliation:u,onSaveReconciliationReview:g,onReconMatchedTransactionClick:f})=>{const{accountReconciliationsByAccountID:
|
|
730
|
+
`,Wu=({reconciliation:e,entitySearchAutoCompleteData:n,selectedAccountId:l,currentFooterFormId:r,entitySearchAutoCompleteActions:h,onUpdateReconcileTabLocalData:p,setCurrentFooterFormId:a,onReconTabColumnSortConfigChanged:d,updateReviewTabLocalData:c,onReconReviewTabColumnSortConfigChanged:m,onSaveReconciliation:u,onSaveReconciliationReview:g,onReconMatchedTransactionClick:f})=>{const{accountReconciliationsByAccountID:y,reconciliationTabsState:{reconcile:{uiState:{sortKey:w,sortOrder:v}}},selectedReconAccount:k}=e,C=y[l],{transactionFetchState:R}=k??{};return R?.fetchState==="In-Progress"||R?.fetchState==="Not-Started"?t.jsxs(Ji,{style:{paddingLeft:x[8],paddingRight:x[8]},children:[t.jsx(Uu,{children:Lt.map(I=>t.jsx(Ht,{width:I.loaderWidth,height:18},I.key))}),t.jsxs(Ku,{children:[...Array(3).fill(0).map((I,S)=>t.jsx(qu,{children:Lt.map(T=>t.jsx(Ht,{width:T.loaderWidth,height:x[4]},T.key))},`${S}_${I}`))]})]}):t.jsx(Ji,{children:e.selectedTab==="reconcile"?t.jsx(Zd,{selectedAccountId:l,currentFooterFormId:r,setCurrentFooterFormId:a,onUpdateReconcileTabLocalData:p,onReconTabColumnSortConfigChanged:d,onSaveReconciliation:u,sortConfig:{sortKey:w,sortOrder:v},localData:e.reconciliationTabsState.reconcile.localData,matchedTransactions:C?.accountReconEntity.transactionsToReconcile}):t.jsx(xu,{localData:e.reconciliationTabsState.review.localData,reviewTabSelectedVendorByTransactionId:e.reviewTabSelectedVendorByTransactionId,refreshStatus:e.accountReconciliationsByAccountID[l]?.refreshStatus??{fetchState:"Not-Started",error:null},accountReconEntity:e.accountReconciliationsByAccountID[l].accountReconEntity,accountListNestedAccountHierarchy:e.accountListNestedAccountHierarchy,classListNestedAccountHierarchy:e.classListNestedAccountHierarchy,allAccountList:e.allAccountList,classList:e.allClassList,bankAccounts:e.bankAccounts,creditCards:e.creditCards,entitySearchAutoCompleteData:n,updateLocalData:c,entitySearchAutoCompleteActions:h,onColumnSortConfigChanged:m,onSaveReconciliation:u,onSaveReconciliationReview:g,onReconMatchedTransactionClick:f,excludeFetchById:e.actionFetchStates.excludeFetchById,saveFetchById:e.actionFetchStates.saveReconciliationReviewFetch,selectedAccountId:l,sortKey:e.reconciliationTabsState.review.uiState.sortKey,sortOrder:e.reconciliationTabsState.review.uiState.sortOrder})})},Ji=s.div`
|
|
731
731
|
width: 100%;
|
|
732
732
|
height: 100%;
|
|
733
733
|
`,Uu=s.div`
|
|
@@ -748,7 +748,7 @@ import{o,bW as ar,J as Te,gl as Ba,gm as Fa,V as t,cr as sr,bC as rr,aa as Ue,aS
|
|
|
748
748
|
display: flex;
|
|
749
749
|
gap: ${o.sp3};
|
|
750
750
|
flex-direction: column;
|
|
751
|
-
`;function Ju({title:e,config:n,nodeId:l}){return{children:[],id:l??wt("loading_in_progress",[],e),isLastNode:!1,reportElementData:{element:{kind:"loading_in_progress",title:"",data:[],numOfBalances:0},config:n}}}function Gu({account:e,numOfBalances:n,title:l,isLastNode:r,index:h,config:p}){const a=wt("ac_group_report",[],l);return{children:[],id:a,isLastNode:r,reportElementData:{element:{kind:"ac_group_report",title:l,index:h,data:e,numOfBalances:n},config:p}}}function Yu({title:e,section:n,config:l,numOfBalances:r,nodeId:h}){return{children:[],id:h??wt("total",[]),isLastNode:!1,reportElementData:{element:{kind:"total",title:e,data:n,numOfBalances:r},config:l}}}function Gi({section:e,allAccountReconciliations:n,title:l,subTitle:r,isLastNode:h,isTitleRowRequired:p,config:a}){const d=wt("section",[],l),c={children:[],id:d,isLastNode:h,reportElementData:{element:{kind:"section",title:l,data:e,numOfBalances:0},config:a}};if(p){const u=wt("title_string_only",[],l),g={children:[],id:u,isLastNode:!0,reportElementData:{element:{kind:"title_string_only",title:l,data:e,numOfBalances:0},config:a}};c.children.push(g)}const m=Yu({title:r,section:e,config:a,numOfBalances:0});return c.children.push(m),e.accountIDs.forEach((u,g)=>{const f=n[u],
|
|
751
|
+
`;function Ju({title:e,config:n,nodeId:l}){return{children:[],id:l??wt("loading_in_progress",[],e),isLastNode:!1,reportElementData:{element:{kind:"loading_in_progress",title:"",data:[],numOfBalances:0},config:n}}}function Gu({account:e,numOfBalances:n,title:l,isLastNode:r,index:h,config:p}){const a=wt("ac_group_report",[],l);return{children:[],id:a,isLastNode:r,reportElementData:{element:{kind:"ac_group_report",title:l,index:h,data:e,numOfBalances:n},config:p}}}function Yu({title:e,section:n,config:l,numOfBalances:r,nodeId:h}){return{children:[],id:h??wt("total",[]),isLastNode:!1,reportElementData:{element:{kind:"total",title:e,data:n,numOfBalances:r},config:l}}}function Gi({section:e,allAccountReconciliations:n,title:l,subTitle:r,isLastNode:h,isTitleRowRequired:p,config:a}){const d=wt("section",[],l),c={children:[],id:d,isLastNode:h,reportElementData:{element:{kind:"section",title:l,data:e,numOfBalances:0},config:a}};if(p){const u=wt("title_string_only",[],l),g={children:[],id:u,isLastNode:!0,reportElementData:{element:{kind:"title_string_only",title:l,data:e,numOfBalances:0},config:a}};c.children.push(g)}const m=Yu({title:r,section:e,config:a,numOfBalances:0});return c.children.push(m),e.accountIDs.forEach((u,g)=>{const f=n[u],y=Gu({account:f,numOfBalances:0,index:g,title:f.accountReconEntity.account.accountName,isLastNode:g===e.accountIDs.length-1,config:a});c.children.push(y)}),c}function As({config:e,accountReconForSection:n,nodeId:l}){return{children:[],id:l??wt("timeframe_header",[]),isLastNode:!1,reportElementData:{element:{kind:"timeframe_headers",title:"",data:n,numOfBalances:0},config:e}}}function Zu(e,n){return n?ho("section")+ho("total")+e*ho("ac_group_report"):1/0}const Qu=(e,n,l,r,h=!0,p="assets")=>{const a=p==="liabilities"&&e.accountReconciliationBySectionID.liabilities.accountIDs.length>0?e.accountReconciliationBySectionID.liabilities:e.accountReconciliationBySectionID.assets,d=As({config:n,accountReconForSection:a}),c=[];c.push(d);const m=Array.isArray(l[r])?l[r]:[],{expenseAutomation:{accountRecon:{reconciliation:u}},common:{loading:g}}=Ae.getLocalizedStrings(),f=e.fetchStatus.fetchState==="Not-Started"||e.fetchStatus.fetchState==="In-Progress",y=w=>w.filter(v=>!m.includes(v));if(f)[...Array(3)].forEach((w,v)=>{c.push(Ju({title:`${v}+${g}`,config:n}))});else{const w=y(e.accountReconciliationBySectionID.assets.accountIDs),v=Gi({section:{...e.accountReconciliationBySectionID.assets,accountIDs:w},allAccountReconciliations:e.accountReconciliationsByAccountID,title:u.headers.section.assets.title,subTitle:u.headers.section.assets.subTitle,isLastNode:!1,isTitleRowRequired:!1,config:n});if(c.push(v),e.accountReconciliationBySectionID.liabilities.accountIDs.length>0){const k=y(e.accountReconciliationBySectionID.liabilities.accountIDs),C=Gi({section:{...e.accountReconciliationBySectionID.liabilities,accountIDs:k},allAccountReconciliations:e.accountReconciliationsByAccountID,title:u.headers.section.liabilities.title,subTitle:u.headers.section.liabilities.subTitle,isLastNode:!1,isTitleRowRequired:!0,config:n});c.push(C)}}return{config:n,headerNodes:h?[d]:[],contentNodes:c}};function Xu(e,n,l,r=!1,h="assets"){Object.assign(e.config,l);const p=h==="liabilities"&&n.accountReconciliationBySectionID.liabilities.accountIDs.length>0?n.accountReconciliationBySectionID.liabilities:n.accountReconciliationBySectionID.assets,a=As({config:l,accountReconForSection:p});return{config:l,headerNodes:r?[a]:[],contentNodes:[a,...e.contentNodes.slice(1)]}}const Ho={wrapperPadding:new ae(x[2],x[2],x[2],x[8]),contentPaddingLeft:new ae(x[2],x[2],x[2],x[2]),contentPaddingRight:new ae(x[2],x[2],x[2],x[2])},eh=s.div`
|
|
752
752
|
display: flex;
|
|
753
753
|
height: 100%;
|
|
754
754
|
width: 100%;
|
|
@@ -766,7 +766,7 @@ import{o,bW as ar,J as Te,gl as Ba,gm as Fa,V as t,cr as sr,bC as rr,aa as Ue,aS
|
|
|
766
766
|
`,nh=s.div`
|
|
767
767
|
width: 100%;
|
|
768
768
|
height: 100%;
|
|
769
|
-
`,{common:oh}=Ae.getLocalizedStrings();function ih({reconciliation:e,companyId:n,onReload:l,onReviewClicked:r,setOpenDrawerClicked:h,onFetchLinkTokenClick:p,onEstablishConnectionClick:a,onAddStatementClick:d}){const[c,m]=i.useState(void 0),[u,g]=i.useState(void 0),f=e.plaidConnectionDetails.link_account_no_microdeposit,
|
|
769
|
+
`,{common:oh}=Ae.getLocalizedStrings();function ih({reconciliation:e,companyId:n,onReload:l,onReviewClicked:r,setOpenDrawerClicked:h,onFetchLinkTokenClick:p,onEstablishConnectionClick:a,onAddStatementClick:d}){const[c,m]=i.useState(void 0),[u,g]=i.useState(void 0),f=e.plaidConnectionDetails.link_account_no_microdeposit,y=e.plaidConnectionDetails.update_account,w=u==="update_account"?y:f,[v,k]=i.useState(w.linkToken??null),[C,R]=i.useState(!1),{useDynamicConfig:I}=Ja(),{configValue:S}=I(Ga.accountReconGLAccountsConfig),T=i.useCallback(W=>{m(W),g("link_account_no_microdeposit")},[]),D=i.useCallback(W=>{const U=$.current.accountReconciliationsByAccountID[W]?.paymentAccountId;m(W),g("update_account"),p("update_account",U)},[]),A=i.useCallback(W=>{h(W)},[]),O=i.useRef(c),b=i.useRef(u),$=i.useRef(e);i.useEffect(()=>{O.current=c},[c]),i.useEffect(()=>{b.current=u},[u]),i.useEffect(()=>{$.current=e},[e]);const M=i.useCallback(W=>{a(W,O.current??"",b.current),m(void 0),g(void 0),R(!1)},[a]),N=i.useCallback((W,U)=>{W!=null&&console.log("Plaid Connection Error",W,U),m(void 0),g(void 0),R(!1)},[]),{open:G,ready:z}=Hr({token:v,onSuccess:M,onExit:N});i.useEffect(()=>{(zo(new Date().toISOString()).isAfter(w.expiration)||w.linkToken==null)&&w.fetchStatus.fetchState==="Not-Started"&&p("link_account_no_microdeposit")},[w.fetchStatus.fetchState]),i.useEffect(()=>{!C&&u!=null&&w.linkToken===v&&w.fetchStatus.fetchState==="Completed"&&z&&R(!0)},[z,v,w.fetchStatus.fetchState,w.linkToken,u,C]),i.useEffect(()=>{w.fetchStatus.fetchState==="Completed"&&w.linkToken!=null&&w.linkToken!==v&&k(w.linkToken)},[w.fetchStatus.fetchState,w.linkToken,v]),i.useEffect(()=>{C&&G()},[C,G]);const[V,de]=i.useState(void 0),[_,H]=i.useState(void 0),[ie,he]=i.useState("assets"),xe=zo("2025-03-31"),ge=1,q="account_reconciliation",K=Te(),Y=mt();Tn({componentName:"expense_automation.account_reconciliation_list",enabled:e.fetchStatus.fetchState==="Completed"});const B=!0,E=Array.isArray(S?.[n])?S[n]:[],Z=e.accountReconciliationBySectionID.assets.accountIDs.filter(W=>!E.includes(W)).length,P=e.accountReconciliationBySectionID.liabilities.accountIDs.length>0,X=Zu(Z,P),J=i.useCallback(W=>{const U=W.scrollTop>=X?"liabilities":"assets";U!==ie&&he(U)},[X,ie]);return i.useEffect(()=>{const W={reportId:q,mode:"none",displayOrder:"ascending_date",reportFormat:"more_detailed",bookCloseDate:xe,firstMonthOfFY:ge,filterAccountsWithNilBalances:"off",filterAccountGroupsWithNilBalances:"off",showNegativeAmountInParenthesis:!1,dataAvailable:void 0,accountReconciliationConfig:{selectedDrawerAccountId:e.selectedDrawerAccountId,onReviewClicked:r,onConnectClicked:T,onReconnectClicked:D,onOpenDrawerClicked:A,onStatementAddClicked:d}};if(V==null||!Ya(_,e)){const U=Qu(e,W,S,n,B,ie);H(e),de(U)}else{const U=Xu(V,e,W,B,ie);de(U)}},[e,ie]),e.fetchStatus.fetchState==="Error"?t.jsx(eh,{children:t.jsx(Wr,{onReload:l,message:oh.errorMessage.somethingWentWrong})}):t.jsx(th,{windowSize:K,children:V!=null?t.jsx(nh,{windowSize:K,children:t.jsx(fs,{backgroundColor:new Zo(Y.colors.grey4),rootNodes:V,type:"name+balances_actual",compareMode:"compare_mode_percent",isSticky:{isStickyHeader:B,isStickyName:B},treeNodePadding:{left:Ho.contentPaddingLeft.value(K),right:Ho.contentPaddingRight.value(K)},nodeOpenStatus:{},scrollPosition:e.reconListUIState.scrollPosition,onCompareModeChanged:()=>{},onScroll:J})}):null})}function ah({currentFooterFormId:e,vendorSearchAutoCompleteData:n,vendorSearchAutoCompleteActions:l,reconciliation:r,companyId:h,onReconTabColumnSortConfigChanged:p,updateReconReviewTabLocalData:a,onUpdateReconcileTabLocalData:d,setCurrentFooterFormId:c,onReloadReconciliationListPage:m,onReviewClicked:u,onFetchLinkTokenClick:g,onEstablishConnectionClick:f,onAddStatementClick:y,onReconReviewTabColumnSortConfigChanged:w,onSaveReconciliation:v,onSaveReconciliationReview:k,setOpenDrawerClicked:C,onReconMatchedTransactionClick:R}){return r.selectedAccountId==null?t.jsx(ih,{companyId:h,reconciliation:r,onReload:m,onReviewClicked:u,onFetchLinkTokenClick:g,onEstablishConnectionClick:f,setOpenDrawerClicked:C,onAddStatementClick:y}):t.jsx(Wu,{currentFooterFormId:e,setCurrentFooterFormId:c,onUpdateReconcileTabLocalData:d,onReconTabColumnSortConfigChanged:p,reconciliation:r,updateReviewTabLocalData:a,entitySearchAutoCompleteActions:l,onReconReviewTabColumnSortConfigChanged:w,entitySearchAutoCompleteData:n,selectedAccountId:r.selectedAccountId,onSaveReconciliation:v,onSaveReconciliationReview:k,onReconMatchedTransactionClick:R})}function sh({accountAndClassReport:e,numOfBalances:n,title:l,isLastNode:r,isFirstNode:h,config:p,parentNodeIDs:a,ancestorMetadata:d}){let c="";return e.accountBase&&e.classBase?c=`${e.accountBase.accountId}_${e.classBase.classId}`:e.accountBase?c=e.accountBase.accountId:e.classBase&&(c=e.classBase.classId),{children:[],id:wt("flux_vendor_account_class_row",a,c),isLastNode:r,isFirstNode:h,reportElementData:{element:{kind:"flux_vendor_account_class_row",title:l,data:e,metadata:d,numOfBalances:n},config:p}}}function rh({config:e,isLastNode:n,numOfBalances:l,parentNodeIDs:r,title:h,vendorRowIndex:p,vendorView:a}){const d=wt("flux_vendor_row",r,a.vendor.id),c={children:[],id:d,isLastNode:n,reportElementData:{element:{kind:"flux_vendor_row",title:h,data:a,numOfBalances:l,index:p},config:e}},m=a.vendorAccountsAndClasses;return c.children=m.map((u,g)=>sh({accountAndClassReport:u,numOfBalances:l,title:u.accountBase?.accountName??"",config:e,isLastNode:g===m.length-1,isFirstNode:g===0,parentNodeIDs:[...r,d],ancestorMetadata:{accountAndClassRowMetadata:{depth:0,hasSibling:m.length>1,hasChildren:!1,isLastNode:g===m.length-1,isFirstNode:g===0,name:u.accountBase?.accountName},isVendorLastChild:n,vendorId:a.vendor.id}})),c}function lh({section:e,numOfBalances:n,title:l,isLastNode:r,config:h,vendorIndexOffset:p}){const a=e.sectionId,d={children:[],id:a,isLastNode:r,reportElementData:{element:{kind:"section",title:l,data:e,numOfBalances:n,sectionType:e.sectionId},config:h}},c=(e.vendors??[]).map((m,u)=>rh({config:h,isLastNode:u===e.vendors.length-1,numOfBalances:n,parentNodeIDs:[a],title:m.vendor.name,vendorRowIndex:p+u,vendorView:m}));return d.children.push(...c),d}function ch({title:e,balances:n,config:l,nodeId:r}){return{children:[],id:r??wt("headers_loading_in_progress",[],e),isLastNode:!1,reportElementData:{element:{kind:"headers_loading_in_progress",title:"",data:n,numOfBalances:n.length},config:l}}}function dh({title:e,data:n,isLastNode:l,config:r,numOfBalances:h}){const p=wt("total",[],e);return{children:[],id:p,isLastNode:l,reportElementData:{element:{kind:"total",title:e,data:n,numOfBalances:h},config:r}}}const{common:Hn,expenseAutomation:{fluxAnalysis:uh}}=Ae.getLocalizedStrings(),hh=(e,n,l=!0)=>{const r=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?gn(e.sections.generalExpense.balancesByMonth):e.sections.reimbursement.balancesByMonth?gn(e.sections.reimbursement.balancesByMonth):[],p=ys({balances:h,config:n}),a=[],d=e.sections.generalExpense.fetchStatus.fetchState==="In-Progress"&&e.uiState.paginationInfoByGroup.generalExpense.pageToken==null,c=e.sections.generalExpense.fetchStatus.fetchState==="In-Progress"&&e.uiState.paginationInfoByGroup.generalExpense.pageToken!=null||e.sections.reimbursement.fetchStatus.fetchState==="In-Progress";if(d===!0)a.push(ch({title:`${Hn.loading}`,balances:h,config:n})),[...Array(10)].forEach((m,u)=>{a.push(Ai({title:`${u}+${Hn.loading}`,balances:h,config:n}))});else{a.push(p);const m=["generalExpense","reimbursement"];let u=0;if(m.forEach(g=>{const f=e.sections[g];if(f.vendors.length>0||f.fetchStatus.fetchState==="Completed"){const y=gn(f.balancesByMonth);a.push(lh({section:{sectionId:g,reportId:"flux_analysis_operating_expense",balances:y,vendors:f.vendors,varianceAmount:f.varianceAmount,variancePercentage:f.variancePercentage,currency:e.currency},numOfBalances:r,title:ph(g),isLastNode:!1,config:n,vendorIndexOffset:u})),u+=f.vendors.length}}),e.totalBalancesAndVariance){const g=e.totalBalancesAndVariance.balancesByMonth?gn(e.totalBalancesAndVariance.balancesByMonth):[],f=dh({title:Hn.texts.total,data:{balances:g,varianceAmount:e.totalBalancesAndVariance.varianceAmount,variancePercentage:e.totalBalancesAndVariance.variancePercentage,currency:e.currency},config:n,isLastNode:!0,numOfBalances:r});a.push(f)}c===!0&&[...Array(1)].forEach((g,f)=>{a.push(Ai({title:`${f}+${Hn.loading}`,balances:h,config:n}))})}return{config:n,headerNodes:l&&!d?[p]:[],contentNodes:a}},ph=e=>uh.sectionTitle[e];function mh(e,n,l,r=!0){Object.assign(e.config,n);const h=gh(l),p=ys({balances:h,config:n});return{config:n,headerNodes:r?[p]:[],contentNodes:[p,...e.contentNodes.slice(1)]}}const gh=e=>e.sections.generalExpense.balancesByMonth?gn(e.sections.generalExpense.balancesByMonth):e.sections.reimbursement.balancesByMonth?gn(e.sections.reimbursement.balancesByMonth):[],Wo={contentPaddingLeft:new ae(x[0],x[0],x[0]),contentPaddingRight:new ae(x[3],x[3],x[8]),wrapperPadding:new ae(x[3],x[3],x[8])},xh=s.div`
|
|
770
770
|
display: flex;
|
|
771
771
|
position: sticky;
|
|
772
772
|
width: 100%;
|
|
@@ -777,10 +777,10 @@ import{o,bW as ar,J as Te,gl as Ba,gm as Fa,V as t,cr as sr,bC as rr,aa as Ue,aS
|
|
|
777
777
|
`,fh=s.div`
|
|
778
778
|
width: 100%;
|
|
779
779
|
height: calc(100vh - ${o.sp11});
|
|
780
|
-
`,yh=e=>{const{fluxView:n,handleRedirectToVendorDetailPage:l,updateOperatingExpensesIdsForReview:r,updateSectionIdsForReview:h,onSortOrderChanged:p,updateNodeCollapsableStatus:a,fetchReimbursementView:d,fetchGeneralExpenseView:c}=e,m=Te(),u=mt(),[g,f]=i.useState(null),[
|
|
780
|
+
`,yh=e=>{const{fluxView:n,handleRedirectToVendorDetailPage:l,updateOperatingExpensesIdsForReview:r,updateSectionIdsForReview:h,onSortOrderChanged:p,updateNodeCollapsableStatus:a,fetchReimbursementView:d,fetchGeneralExpenseView:c}=e,m=Te(),u=mt(),[g,f]=i.useState(null),[y,w]=i.useState(null),[v,k]=i.useState(null),C=Li([n.sections.generalExpense.fetchStatus,n.sections.reimbursement.fetchStatus]).fetchState,[R,I]=i.useState(!1),S=Si(C),T=Si(n.refreshStatus.fetchState),D=i.useRef(!1),[A,O]=i.useState(!1),b=i.useRef(_=>{_&&!D.current&&(D.current=!0,O(!0))});Tn({componentName:"expense_automation.flux_analysis",enabled:A});const $=()=>{n.uiState.collapsableStatus.generalExpense?n.uiState.paginationInfoByGroup.generalExpense.hasMore===!0&&n.sections.generalExpense.fetchStatus.fetchState==="Completed"?c(n.uiState.paginationInfoByGroup.generalExpense.pageToken):n.sections.reimbursement.fetchStatus.fetchState==="Not-Started"&&d(n.uiState.paginationInfoByGroup.reimbursement.pageToken):n.uiState.collapsableStatus.reimbursement&&n.uiState.paginationInfoByGroup.reimbursement.hasMore===!0&&n.sections.reimbursement.fetchStatus.fetchState==="Completed"&&d(n.uiState.paginationInfoByGroup.reimbursement.pageToken)},M=()=>Object.keys(n.uiState.collapsableStatus).reduce((_,H)=>(_[H]=n.uiState.collapsableStatus[H],_),{}),N=i.useCallback(_=>{const H=!(n.uiState.collapsableStatus[_]??!0);a({...n.uiState.collapsableStatus,[_]:H})},[n.uiState.collapsableStatus,a]),G=i.useCallback((_,H)=>{let ie=n.reviewOperatingExpensesIds;const he=[];let xe=n.selectedSectionIds;const ge=n.sections[_].vendors;he.push(...ge.map(K=>K.fluxAnalysisEntityId));let q=xs-ie.length;H?(he.forEach(K=>{!ie.includes(K)&&q>0&&(ie=[...ie,K],q--)}),xe=[...xe,_]):(ie=ie.filter(K=>!he.includes(K)),xe=xe.filter(K=>K!==_)),r(ie),h(xe)},[n.reviewOperatingExpensesIds,n.selectedSectionIds,n.sections,r,h]),z=i.useCallback(_=>{const H=n.uiState.collapsableStatus[_]===!1;_==="generalExpense"&&!H&&n.sections.reimbursement.fetchStatus.fetchState==="Not-Started"&&d(n.uiState.paginationInfoByGroup.reimbursement.pageToken),N(_)},[n.uiState.collapsableStatus,n.sections.reimbursement.fetchStatus.fetchState,n.uiState.paginationInfoByGroup.reimbursement.pageToken,d,N]),V=n.sections.generalExpense.vendors.length+n.sections.reimbursement.vendors.length,de=_=>_<V;return i.useEffect(()=>{const _={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:I,onSectionRowClick:z,updateNodeCollapsableStatus:N,updateOperatingExpensesIdsForReview:r,handleRedirectToVendorDetailPage:l,onSectionCheckboxClick:G,onSortOrderChanged:p}};if(g==null||!Ya(y,n)){const H=hh(n,_,!0);w(n),f(H)}else{const H=mh(g,_,n,!0);f(H)}},[n,y,l,G,z,p,N,r]),t.jsx(xh,{windowSize:m,children:t.jsx(fh,{children:g?t.jsx(Ch,{ref:b.current,children:t.jsx(fs,{backgroundColor:new Zo(u.colors.grey4),rootNodes:g,type:"name+balances_actual",isSticky:{isStickyHeader:!0,isStickyName:!0},treeNodePadding:{left:Wo.contentPaddingLeft.value(m),right:Wo.contentPaddingRight.value(m)},nodeOpenStatus:M(),compareMode:"compare_mode_amount",infiniteLoadingProps:{isItemLoaded:de,itemCount:V,loadMoreItems:$},variableNodeHeightTree:{prevFetchState:S??"Not-Started",fetchState:n.fetchStatus.fetchState,isSortApplied:R,setIsSortApplied:I,reducedFetchState:Li([n.sections.generalExpense.fetchStatus,n.sections.reimbursement.fetchStatus]).fetchState,prevRefreshFetchState:T??"Not-Started",refreshFetchState:n.refreshStatus.fetchState},hoveredParentIdProps:{hoveredParentId:v,setHoveredParentId:k}})}):null})})},Ch=s.div`
|
|
781
781
|
height: 100%;
|
|
782
782
|
width: 100%;
|
|
783
|
-
`,wh="expenseAutomationFluxPage",{reports:{common:bh}}=Ae.getLocalizedStrings(),vh=({selectedPeriod:e,fluxAnalysis:n,onFetchFluxViewList:l,markAsReview:r,onReloadPage:h,setCurrentFooterFormId:p,updateOperatingExpensesIdsForReview:a,updateSectionIdsForReview:d,onUpdateFluxAnalysisUIState:c,redirectToVendorDetailPage:m,fetchFluxViewOnScroll:u,onFetchReimbursementView:g})=>{const{fetchStatus:f,reviewOperatingExpensesIds:
|
|
783
|
+
`,wh="expenseAutomationFluxPage",{reports:{common:bh}}=Ae.getLocalizedStrings(),vh=({selectedPeriod:e,fluxAnalysis:n,onFetchFluxViewList:l,markAsReview:r,onReloadPage:h,setCurrentFooterFormId:p,updateOperatingExpensesIdsForReview:a,updateSectionIdsForReview:d,onUpdateFluxAnalysisUIState:c,redirectToVendorDetailPage:m,fetchFluxViewOnScroll:u,onFetchReimbursementView:g})=>{const{fetchStatus:f,reviewOperatingExpensesIds:y,uiState:w}=n,v=i.useRef(null),k=i.useRef(!1),C=an({mode:"all",reValidateMode:"onChange",resetOptions:{keepDefaultValues:!0},defaultValues:Sh(y)}),R=Te();i.useEffect(()=>()=>{p("expenseAutomationPage")},[p]),i.useEffect(()=>{k.current&&v?.current?.scrollLeft!=null&&w.scrollPosition?.scrollLeft!==v.current.scrollLeft&&w.scrollPosition!=null&&c({scrollPosition:{scrollTop:w.scrollPosition?.scrollTop,scrollLeft:v.current.scrollLeft}})},[w.scrollPosition?.scrollLeft,v.current?.scrollLeft,w.scrollPosition,c]),i.useEffect(()=>{p(y.length>0?"expenseAutomationFluxPage":"expenseAutomationPage")},[y,p]);const I=A=>{m(A)},S=A=>{u(e,A)},T=(A,O)=>{c({sortOrder:A,sortKey:O}),l(),g(e,null,!1)},D=()=>{const A=Es(n.sections,y);r(y,A===!0?"review":"unreview",e,!0)};if(f.fetchState==="Error")return t.jsxs(kh,{children:[t.jsx(Ih,{onClick:h,children:t.jsx(qo,{})}),t.jsx($h,{children:bh.failed})]});{const A=b=>{c({collapsableStatus:b})},O=b=>{g(e,b,!0)};return t.jsx(sn,{...C,children:t.jsx("form",{id:fr(wh),onSubmit:C.handleSubmit(D),style:{height:"100%",width:"100%"},children:t.jsx(jh,{windowSize:R,children:t.jsx(yh,{fluxView:n,handleRedirectToVendorDetailPage:I,onSortOrderChanged:T,updateOperatingExpensesIdsForReview:a,updateNodeCollapsableStatus:A,fetchReimbursementView:O,updateSectionIdsForReview:d,fetchGeneralExpenseView:S,reportId:"flux_analysis_operating_expense"})})})})}},Es=(e,n)=>{const l=[...e.generalExpense.vendors,...e.reimbursement.vendors].filter(h=>h.status==="Pending Review");let r;return l.forEach(h=>{n.includes(h.fluxAnalysisEntityId)&&(r=!0)}),r},Sh=e=>({fluxAnalysisRowIds:e}),jh=s.div`
|
|
784
784
|
display: flex;
|
|
785
785
|
flex: 1 1 auto;
|
|
786
786
|
min-height: 100%;
|
|
@@ -832,7 +832,7 @@ import{o,bW as ar,J as Te,gl as Ba,gm as Fa,V as t,cr as sr,bC as rr,aa as Ue,aS
|
|
|
832
832
|
`,$h=s(Et)`
|
|
833
833
|
margin-top: ${o.sp3};
|
|
834
834
|
color: ${e=>e.theme.colors.hero};
|
|
835
|
-
`,Lh="expenseAutomationJEAccountSettingsPage",Rs="vendorsAccountSection",Th=e=>`${e}_form`;function Ah({accountSettings:e,currentFooterFormId:n,onSaveJeAccountSettingsClick:l,setIsJeAccountSettingsOpened:r,onJeAccountSettingsChange:h,setResetJeAccountSettingsForm:p,setCurrentFooterFormId:a}){const d=e.prepaidExpensesRecommendations,c=e.fixedAssetsRecommendations,m=e.accruedExpensesRecommendations,u=i.useMemo(()=>Vt(e.prepaidExpensesAccountHierarchy,d,"Accounts"),[e.prepaidExpensesAccountHierarchy,d]),g=i.useMemo(()=>Vt(e.fixedAssetsAccountHierarchy,c,"Accounts"),[e.fixedAssetsAccountHierarchy,c]),f=i.useMemo(()=>Vt(e.accruedExpensesAccountHierarchy,m,"Accounts"),[e.accruedExpensesAccountHierarchy,m]),
|
|
835
|
+
`,Lh="expenseAutomationJEAccountSettingsPage",Rs="vendorsAccountSection",Th=e=>`${e}_form`;function Ah({accountSettings:e,currentFooterFormId:n,onSaveJeAccountSettingsClick:l,setIsJeAccountSettingsOpened:r,onJeAccountSettingsChange:h,setResetJeAccountSettingsForm:p,setCurrentFooterFormId:a}){const d=e.prepaidExpensesRecommendations,c=e.fixedAssetsRecommendations,m=e.accruedExpensesRecommendations,u=i.useMemo(()=>Vt(e.prepaidExpensesAccountHierarchy,d,"Accounts"),[e.prepaidExpensesAccountHierarchy,d]),g=i.useMemo(()=>Vt(e.fixedAssetsAccountHierarchy,c,"Accounts"),[e.fixedAssetsAccountHierarchy,c]),f=i.useMemo(()=>Vt(e.accruedExpensesAccountHierarchy,m,"Accounts"),[e.accruedExpensesAccountHierarchy,m]),y=i.useMemo(()=>Rh(e,u,g,f),[e,u,g,f]),w=an({mode:"all",reValidateMode:"onBlur",defaultValues:y,values:y,resetOptions:{keepDefaultValues:!0}}),v=w.handleSubmit(C=>{l(C)}),k=async C=>{h(C)};return i.useEffect(()=>{const C=w.watch(R=>{R!=null&&An(()=>k(R))});return()=>{C.unsubscribe()}}),i.useEffect(()=>(p(()=>w.reset),r(!0),()=>{a("expenseAutomationPage"),r(!1)}),[]),i.useEffect(()=>{const{selectedPrepaidExpensesAccountIds:C,previousPrepaidExpensesAccount:R,selectedFixedAssetsAccountIds:I,previousFixedAssetsAccount:S,selectedAccruedExpensesAccountIds:T,previousAccruedExpensesAccount:D}=e.accountSettingsLocalData,A=ro(C,R)||ro(I,S)||ro(T,D);A===!0&&n!="expenseAutomationJEAccountSettingsPage"?a("expenseAutomationJEAccountSettingsPage"):A===!1&&n!=="expenseAutomationPage"&&a("expenseAutomationPage")},[e,n,a]),t.jsx(Eh,{children:t.jsx(sn,{...w,children:t.jsx("form",{id:Th(Lh),onSubmit:v,children:t.jsx(zl,{showTitle:!1,sectionId:Rs,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 Eh=s.div`
|
|
836
836
|
padding-top: ${o.sp3};
|
|
837
837
|
display: flex;
|
|
838
838
|
align-items: center;
|
|
@@ -851,7 +851,7 @@ import{o,bW as ar,J as Te,gl as Ba,gm as Fa,V as t,cr as sr,bC as rr,aa as Ue,aS
|
|
|
851
851
|
color: ${e=>e.theme.colors.brandColorSapphire};
|
|
852
852
|
`,Ph=s(Ve)`
|
|
853
853
|
color: ${e=>e.theme.colors.primary};
|
|
854
|
-
`,{jeSchedules:{scheduleDetails:{scheduleTransactionsHeader:{addVendor:Zi}}},expenseAutomation:{jeSchedules:We},common:{currency:ft,retry:zh,strings:{hyphen:Ge,empty:Qi},texts:hn},dateFormat:Xi}=Ae.getLocalizedStrings(),{common:Nh,timeframe:{month:ea}}=Ae.getLocalizedStrings(),ot="jeSchedulePage",ta=e=>`${e}_form`,di=(e,n)=>`${e}.${n}`,na=di(ot,"vendor"),oa=di(ot,"scheduleExpenseCategory"),ia=di(ot,"accumulatedDepreciationCategory"),Vh=({allAccountGroupedOptions:e,allAccountList:n,allClassGroupedOptions:l,allClassList:r,allDepAccountGroupedOptions:h,allDepAccountList:p,draft:a,localData:d,postStatus:c,uncategorizedAccounts:m,vendorSearchAutoCompleteActions:u,vendorSearchAutoCompleteData:g,jeScheduleClickHandler:f,onFormDataChange:C,onPostJESchedule:w})=>{const{updatedAccumulatedDepreciationCategoryID:v,updatedCategoryId:k,updatedVendor:y}=d,R={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"},I=i.useRef(),S=an({mode:"all",reValidateMode:"onChange",defaultValues:aa(d,e,l,h,n,r,p,g.entityAutoCompleteView),values:aa(d,e,l,h,n,r,p,g.entityAutoCompleteView)}),T={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:o.sp4}),menu:()=>({width:300})},D={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:o.sp4}),menu:()=>({width:350})},A=(a?.scheduledJournalEntry.error??[]).every(E=>{const Z=R[E];return!(d!=null&&Z&&(Z==="updatedAccumulatedDepreciationCategoryID"&&d.updatedAccumulatedDepreciationCategoryID==null||Z==="updatedCategoryId"&&d.updatedCategoryId==null||Z==="updatedVendor"&&(d.updatedVendor?.id==null||d.updatedVendor?.id===""||d.updatedVendor?.name==null||d.updatedVendor?.name==="")))}),O=async(E,Z)=>{if(E!=null){const P=Z[ot],{scheduledJournalEntryID:X,vendor:J}=P;if(E.includes("vendor")){const W=J?.defaultOptions.map(U=>U.value);if(J?.selectedOption!=null&&W?.includes(J.selectedOption)!==!0){const U=g.entityAutoCompleteView.vendor.find(L=>L.id===J.selectedOption);U!=null&&S.setValue(`${ot}.vendor.defaultOptions`,[{label:U.name??Nh.strings.empty,value:U.id}])}else J?.selectedOption==null&&J?.defaultOptions.length!==0&&S.setValue(`${ot}.vendor`,{selectedOption:void 0,defaultOptions:[]})}C(X,{...P,vendor:J})}};i.useEffect(()=>{const E=S.watch((Z,{name:P})=>{P!=null&&Z!=null&&An(()=>O(P,Z))});return()=>{E.unsubscribe()}}),i.useEffect(()=>{g.entityAutoCompleteView.fetchState==="Completed"&&I.current?.(ns(g.entityAutoCompleteView))},[g.entityAutoCompleteView.fetchState]);const b=S.handleSubmit(()=>{w(a.scheduledJournalEntry.scheduledJournalEntryID,a.jeScheduleTransactionKey)}),$=E=>n.filter(Z=>Z.qboId===E)[0]?.qboId,M=E=>p.filter(Z=>Z.qboId===E)[0]?.qboId,N=E=>[m.expense?.qboId,m.income?.qboId].includes(E),G=S.watch("jeSchedulePage.vendor"),z=(E,Z)=>{u.onAutoCompleteInputChange?.(E,"vendor"),I.current=Z},V=a.scheduledJournalEntry.error?.includes("vendor_deleted")===!0,de=a.scheduledJournalEntry.error?.includes("debit_category_deleted")===!0,_=a.scheduledJournalEntry.error?.includes("credit_category_deleted")===!0,H=a.vendor.name.split("(deleted)")[0]?.toString(),ie=a.jeDebit.account?.accountName.split("(deleted)")?.[0]?.toString()??Qi,he=a.jeCredit.account?.accountName.split("(deleted)")[0]?.toString()??Qi,[xe,ge]=i.useState(de===!0&&k==null),[q,K]=i.useState(_===!0&&v==null),[Y,B]=i.useState(V&&(y?.id==null||y?.id==""));return i.useEffect(()=>{xe===!1&&d.updatedCategoryId==null&&S.setFocus(oa),q===!1&&d.updatedAccumulatedDepreciationCategoryID==null&&S.setFocus(ia),Y===!1&&d.updatedVendor?.id==null&&S.setFocus(na)},[xe,q,Y,d,S]),t.jsx(sn,{...S,children:t.jsx("form",{style:{width:"100%"},id:ta(`${ot}_${a.jeScheduleId}`),onSubmit:b,children:t.jsx(ri,{showBorder:A,onClick:E=>{a.jeScheduleType!=null&&a.jeScheduleId!=null&&f(E,a.jeScheduleId,a.jeScheduleTransactionKey,a.jeScheduleType)},"data-testid":F("je-schedule-resolve-component-schedule",`${ot}_${a.jeScheduleId}`),children:t.jsxs(si,{children:[t.jsxs(ci,{children:[t.jsxs(ii,{children:[V===!0?t.jsx(oe,{style:{width:ye.COLUMN_ONE,padding:x[0],justifyContent:"center"},showHoverEffect:V,forceHoverEffect:Y===!1&&(d?.updatedVendor?.id==null||d?.updatedVendor?.id==""),children:t.jsxs(yt,{className:"hover-background",style:{padding:`${o.sp2} ${o.sp3}`},children:[t.jsxs(ce,{style:{display:"flex",alignItems:"center",gap:x[1]},children:[hn.vendor,t.jsx(Ce,{display:"flex",placement:"top-start",title:t.jsx(Yn,{children:We.tooltipText.missingVendor.replace("_deleted_vendor_",H)}),children:t.jsx(xo,{})})]}),t.jsx(ue,{style:{gap:x[3],marginLeft:-2},className:"item-value-container",children:t.jsx(t.Fragment,{children:Y===!0?t.jsxs(fe,{onClick:E=>{E.stopPropagation(),B(!1)},"data-testid":F("je-schedule-resolve-component-add-vendor-button",`${ot}_${a.jeScheduleId}`),style:{display:"inline-flex",alignItems:"center",gap:x[2],color:tt.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(go,{}),Zi]}):t.jsx(Bo,{name:na,placeholder:Zi,valueToId:E=>E,defaultValue:{selectedOption:G?.selectedOption,defaultOptions:G?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:o.sp4})},registerOptions:{required:!0,validate:E=>!!E.selectedOption},loadOptions:z})})})]})}):t.jsxs(oe,{style:{width:ye.COLUMN_ONE,padding:`${o.sp2} ${o.sp0} ${o.sp2} ${o.sp3}`},children:[t.jsx(ce,{children:hn.vendor}),t.jsx(ue,{children:t.jsxs(t.Fragment,{children:[a.vendor.logo?.href!=null?t.jsx(ts,{photoUrl:a.vendor.logo.href,styles:{width:x[4],height:x[4]}}):t.jsx(In,{name:a.vendor.name}),t.jsx(Ce,{display:"block",placement:"bottom",style:{width:"100%"},title:a.vendor.name!==null?t.jsx(Ye,{children:a.vendor.name}):t.jsx(t.Fragment,{}),children:t.jsx(fe,{className:"highlight",children:a.vendor.name??Ge})})]})})]}),t.jsxs(oe,{children:[t.jsx(ce,{children:We.scheduleHeaders.scheduleCategory}),t.jsx(ue,{children:t.jsx(Ce,{display:"block",placement:"bottom",style:{width:"100%"},title:a.baseTransaction.account.accountName!=null?t.jsx(Ye,{children:a.baseTransaction.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(fe,{className:"highlight",children:a.baseTransaction.account.accountName??Ge})})})]}),t.jsxs(oe,{style:{width:ye.COLUMN_THREE},children:[t.jsx(ce,{children:We.scheduleHeaders.startMonth}),t.jsx(ue,{children:t.jsx(fe,{className:"highlight",children:a.startDate?.format(Xi.visual.MMMCommaYYYYFormat)??Ge})})]}),t.jsxs(oe,{style:{width:ye.COLUMN_FOUR,paddingLeft:x[3]},children:[t.jsx(ce,{children:We.scheduleHeaders.period}),t.jsx(ue,{children:t.jsx(fe,{className:"highlight",children:a.period!=null?`${a.period} ${a.period===1?ea.slice(0,-1):ea}`:Ge})})]}),t.jsxs(oe,{style:{alignItems:"flex-end",width:ye.COLUMN_FIVE},children:[t.jsx(ce,{children:hn.totalAmount}),t.jsx(ue,{children:t.jsx(Ce,{display:"block",placement:"bottom",title:t.jsx(Ye,{children:Ze("0,0.[00]",Xt(a.baseTransaction.amount.amount,ft.currencyCode,ft.currencySymbol))??Ge}),children:t.jsx(fe,{className:"highlight",children:Ze("0,0.[00]",Xt(a.baseTransaction.amount.amount,ft.currencyCode,ft.currencySymbol))??Ge})})})]})]}),t.jsxs(ai,{children:[de===!0?t.jsx(oe,{showHoverEffect:de===!0,forceHoverEffect:d?.updatedCategoryId==null&&xe===!1,style:{padding:"unset",justifyContent:"center",width:ye.COLUMN_ONE},children:t.jsxs(yt,{className:"hover-background",children:[t.jsxs(ce,{style:{display:"flex",alignItems:"center",gap:x[1]},children:[hn.category,de===!0?t.jsx(Ce,{display:"flex",placement:"top-start",title:t.jsx(Yn,{children:We.tooltipText.missingCategory.replace("_deleted_category_",ie)}),children:t.jsx(xo,{})}):null]}),t.jsx(ue,{className:"item-value-container",style:{marginLeft:de===!0?-2:0},children:de===!0?t.jsx(t.Fragment,{children:xe===!0?t.jsxs(fe,{onClick:E=>{E.stopPropagation(),ge(!1)},style:{display:"inline-flex",alignItems:"center",gap:x[1],color:tt.brandColorGoldDark,cursor:"pointer"},"data-testid":F("je-schedule-resolve-component-add-category-button",`${ot}_${a.jeScheduleId}`),children:[t.jsx(go,{}),We.addCategory]}):t.jsx(mn,{shouldShowChevronIcon:!1,name:oa,placeholder:We.addCategory,valueToId:E=>$(E),defaultValue:{allOptions:e},registerOptions:{required:!0,validate:E=>!!E.selectedOption},disableCurrentOption:N,customStyleConfig:T})}):t.jsx(Ce,{display:"block",placement:"bottom",style:{width:"100%"},title:a.jeDebit.account?.accountName!=null?t.jsx(Ye,{children:a.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(fe,{className:"highlight",children:a.jeDebit.account?.accountName??Ge})})})]})}):t.jsxs(oe,{style:{width:ye.COLUMN_ONE,padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(ce,{style:{display:"flex",alignItems:"center",gap:x[1]},children:hn.category}),t.jsx(ue,{className:"item-value-container",children:t.jsx(Ce,{display:"block",placement:"bottom",style:{width:"100%"},title:a.jeDebit.account?.accountName!=null?t.jsx(Ye,{children:a.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(fe,{className:"highlight",children:a.jeDebit.account?.accountName??Ge})})})]}),t.jsxs(oe,{children:[t.jsx(ce,{style:{display:"flex",alignItems:"center",gap:x[1]},children:hn.classText}),t.jsx(ue,{children:t.jsx(Ce,{display:"block",placement:"bottom",style:{width:"100%"},title:a.jeDebit.accountingClass?.className!=null?t.jsx(Ye,{children:a.jeDebit.accountingClass.className}):t.jsx(t.Fragment,{}),children:t.jsx(fe,{className:"highlight",children:a.jeDebit.accountingClass?.className??Ge})})})]}),t.jsxs(oe,{style:{width:ye.COLUMN_THREE},children:[t.jsx(ce,{children:We.scheduleHeaders.type}),t.jsx(ue,{className:"test",children:t.jsx(fe,{className:"highlight",style:{width:"unset"},children:t.jsx(Ss,{children:We.scheduleTypes[a.jeScheduleType??"prepaid_expenses"]})})})]}),a.jeScheduleType==="fixed_assets"?t.jsx(t.Fragment,{children:_===!0?t.jsx(oe,{style:{width:ye.COLUMN_FOUR,padding:"unset",justifyContent:"center"},showHoverEffect:_,forceHoverEffect:d.updatedAccumulatedDepreciationCategoryID==null&&q===!1,children:t.jsxs(yt,{className:"hover-background",style:{padding:x[2],paddingLeft:x[3]},children:[t.jsxs(ce,{style:{display:"flex",alignItems:"center",gap:x[1]},children:[We.scheduleHeaders.accumulatedCategory,_===!0?t.jsx(Ce,{display:"flex",placement:"top-end",title:t.jsx(Yn,{children:We.tooltipText.missingDepCategory.replace("_deleted_dep_category_",he)}),children:t.jsx(xo,{})}):null]}),t.jsx(ue,{className:"item-value-container",style:{marginLeft:_===!0?-2:0},children:_===!0?t.jsx(t.Fragment,{children:q===!0?t.jsxs(fe,{onClick:E=>{E.stopPropagation(),K(!1)},style:{display:"inline-flex",alignItems:"center",gap:x[1],color:tt.brandColorGoldDark,cursor:"pointer"},"data-testid":F("je-schedule-resolve-component-add-depreciation-category-button",`${ot}_${a.jeScheduleId}`),children:[t.jsx(go,{}),We.addDepCategory]}):t.jsx(mn,{shouldShowChevronIcon:!1,showDownChevronWithValue:!1,name:ia,placeholder:We.addDepCategory,valueToId:E=>M(E),defaultValue:{allOptions:h},registerOptions:{required:!0,validate:E=>!!E.selectedOption},customStyleConfig:D,disableCurrentOption:N})}):t.jsx(Ce,{display:"block",placement:"bottom",title:a.jeCredit.account?.accountName!=null?t.jsx(Ye,{children:a.jeCredit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(fe,{className:"highlight",children:a.jeCredit.account?.accountName??Ge})})})]})}):t.jsxs(oe,{style:{width:ye.COLUMN_FOUR,padding:`${o.sp2} ${o.sp2} ${o.sp2} ${o.sp3}`,justifyContent:"center"},children:[t.jsx(ce,{style:{display:"flex",alignItems:"center",gap:x[1]},children:We.scheduleHeaders.accumulatedCategory}),t.jsx(Ce,{display:"block",placement:"bottom",title:a.jeCredit.account?.accountName!=null?t.jsx(Ye,{children:a.jeCredit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(fe,{className:"highlight",children:a.jeCredit.account?.accountName??Ge})})]})}):null,a.jeScheduleType!=="fixed_assets"?t.jsx(oe,{style:{width:ye.COLUMN_FOUR}}):null,t.jsx(oe,{style:{width:ye.COLUMN_FIVE}})]}),t.jsxs(nu,{children:[t.jsx(oe,{style:{padding:"unset",width:ye.COLUMN_ONE},children:t.jsxs(ou,{children:[t.jsx(ce,{children:We.scheduleHeaders.jePostingDate}),t.jsx(ue,{children:t.jsx(fe,{className:"highlight",children:a.scheduledJournalEntry.expectedPostDate.format(Xi.visual.MMMDCommaYYFormat)??Ge})})]})}),t.jsxs(oe,{children:[t.jsx(ce,{children:We.scheduleHeaders.balance}),t.jsx(ue,{children:t.jsx(Ce,{display:"block",placement:"bottom",style:{width:"100%"},title:t.jsx(Ye,{children:Ze("0,0.[00]",Xt(a?.scheduledJournalEntry?.runningBalance?.amount??0,ft.currencyCode,ft.currencySymbol))??Ge}),children:t.jsx(fe,{className:"highlight",children:Ze("0,0.[00]",Xt(a?.scheduledJournalEntry?.runningBalance?.amount??0,ft.currencyCode,ft.currencySymbol))??Ge})})})]}),t.jsxs(oe,{style:{width:ye.COLUMN_THREE},children:[t.jsx(ce,{children:We.scheduleHeaders.months}),t.jsx(ue,{children:t.jsxs(fe,{className:"highlight",children:[a.scheduledJournalEntry.expectedPostDate.diff(a.startDate,"month")+1,"/",a.period]})})]}),t.jsx(oe,{style:{width:ye.COLUMN_FOUR}}),t.jsxs(oe,{style:{alignItems:"flex-end",width:ye.COLUMN_FIVE},children:[t.jsx(ce,{children:We.scheduleHeaders.amountForMonth}),t.jsx(ue,{children:t.jsx(fe,{className:"highlight",children:Ze("0,0.[00]",Xt(a.scheduledJournalEntry.amount?.amount??0,ft.currencyCode,ft.currencySymbol))??Ge})})]})]})]}),t.jsx(li,{children:t.jsx($n,{form:ta(`${ot}_${a.jeScheduleId}`),label:zh,variant:"primary",className:"item-value-container",type:"submit",loading:c?.fetchState==="In-Progress",size:"small",disabled:!A,style:{minWidth:No}})})]})})})})},aa=(e,n,l,r,h,p,a,d)=>{const c=e.updatedCategoryId,m=e.updatedVendor,u=m!=null?d.vendor.find(k=>k.zeniId===m.id):void 0,g=e.updatedAccumulatedDepreciationCategoryID,f=e.updatedClassId,C=c!=null?h.find(k=>k.accountId===c):void 0,w=g!=null?a.find(k=>k.accountId===g):void 0,v=f!=null?p.find(k=>k.classId===f):void 0;return{[ot]:{jeScheduleID:e.jeScheduleID,scheduledJournalEntryID:e.scheduledJournalEntryID,jeScheduleType:e.jeScheduleType,scheduleExpenseCategory:{selectedOption:C?.qboId,allOptions:n},accumulatedDepreciationCategory:{selectedOption:w?.qboId,allOptions:r},vendor:{selectedOption:u?.id??m?.id,defaultOptions:ss(d,u??m)},scheduleClass:{selectedOption:v?.classId,allOptions:l}}}},go=s(ao)`
|
|
854
|
+
`,{jeSchedules:{scheduleDetails:{scheduleTransactionsHeader:{addVendor:Zi}}},expenseAutomation:{jeSchedules:We},common:{currency:ft,retry:zh,strings:{hyphen:Ge,empty:Qi},texts:hn},dateFormat:Xi}=Ae.getLocalizedStrings(),{common:Nh,timeframe:{month:ea}}=Ae.getLocalizedStrings(),ot="jeSchedulePage",ta=e=>`${e}_form`,di=(e,n)=>`${e}.${n}`,na=di(ot,"vendor"),oa=di(ot,"scheduleExpenseCategory"),ia=di(ot,"accumulatedDepreciationCategory"),Vh=({allAccountGroupedOptions:e,allAccountList:n,allClassGroupedOptions:l,allClassList:r,allDepAccountGroupedOptions:h,allDepAccountList:p,draft:a,localData:d,postStatus:c,uncategorizedAccounts:m,vendorSearchAutoCompleteActions:u,vendorSearchAutoCompleteData:g,jeScheduleClickHandler:f,onFormDataChange:y,onPostJESchedule:w})=>{const{updatedAccumulatedDepreciationCategoryID:v,updatedCategoryId:k,updatedVendor:C}=d,R={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"},I=i.useRef(),S=an({mode:"all",reValidateMode:"onChange",defaultValues:aa(d,e,l,h,n,r,p,g.entityAutoCompleteView),values:aa(d,e,l,h,n,r,p,g.entityAutoCompleteView)}),T={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:o.sp4}),menu:()=>({width:300})},D={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:o.sp4}),menu:()=>({width:350})},A=(a?.scheduledJournalEntry.error??[]).every(E=>{const Z=R[E];return!(d!=null&&Z&&(Z==="updatedAccumulatedDepreciationCategoryID"&&d.updatedAccumulatedDepreciationCategoryID==null||Z==="updatedCategoryId"&&d.updatedCategoryId==null||Z==="updatedVendor"&&(d.updatedVendor?.id==null||d.updatedVendor?.id===""||d.updatedVendor?.name==null||d.updatedVendor?.name==="")))}),O=async(E,Z)=>{if(E!=null){const P=Z[ot],{scheduledJournalEntryID:X,vendor:J}=P;if(E.includes("vendor")){const W=J?.defaultOptions.map(U=>U.value);if(J?.selectedOption!=null&&W?.includes(J.selectedOption)!==!0){const U=g.entityAutoCompleteView.vendor.find(L=>L.id===J.selectedOption);U!=null&&S.setValue(`${ot}.vendor.defaultOptions`,[{label:U.name??Nh.strings.empty,value:U.id}])}else J?.selectedOption==null&&J?.defaultOptions.length!==0&&S.setValue(`${ot}.vendor`,{selectedOption:void 0,defaultOptions:[]})}y(X,{...P,vendor:J})}};i.useEffect(()=>{const E=S.watch((Z,{name:P})=>{P!=null&&Z!=null&&An(()=>O(P,Z))});return()=>{E.unsubscribe()}}),i.useEffect(()=>{g.entityAutoCompleteView.fetchState==="Completed"&&I.current?.(ns(g.entityAutoCompleteView))},[g.entityAutoCompleteView.fetchState]);const b=S.handleSubmit(()=>{w(a.scheduledJournalEntry.scheduledJournalEntryID,a.jeScheduleTransactionKey)}),$=E=>n.filter(Z=>Z.qboId===E)[0]?.qboId,M=E=>p.filter(Z=>Z.qboId===E)[0]?.qboId,N=E=>[m.expense?.qboId,m.income?.qboId].includes(E),G=S.watch("jeSchedulePage.vendor"),z=(E,Z)=>{u.onAutoCompleteInputChange?.(E,"vendor"),I.current=Z},V=a.scheduledJournalEntry.error?.includes("vendor_deleted")===!0,de=a.scheduledJournalEntry.error?.includes("debit_category_deleted")===!0,_=a.scheduledJournalEntry.error?.includes("credit_category_deleted")===!0,H=a.vendor.name.split("(deleted)")[0]?.toString(),ie=a.jeDebit.account?.accountName.split("(deleted)")?.[0]?.toString()??Qi,he=a.jeCredit.account?.accountName.split("(deleted)")[0]?.toString()??Qi,[xe,ge]=i.useState(de===!0&&k==null),[q,K]=i.useState(_===!0&&v==null),[Y,B]=i.useState(V&&(C?.id==null||C?.id==""));return i.useEffect(()=>{xe===!1&&d.updatedCategoryId==null&&S.setFocus(oa),q===!1&&d.updatedAccumulatedDepreciationCategoryID==null&&S.setFocus(ia),Y===!1&&d.updatedVendor?.id==null&&S.setFocus(na)},[xe,q,Y,d,S]),t.jsx(sn,{...S,children:t.jsx("form",{style:{width:"100%"},id:ta(`${ot}_${a.jeScheduleId}`),onSubmit:b,children:t.jsx(ri,{showBorder:A,onClick:E=>{a.jeScheduleType!=null&&a.jeScheduleId!=null&&f(E,a.jeScheduleId,a.jeScheduleTransactionKey,a.jeScheduleType)},"data-testid":F("je-schedule-resolve-component-schedule",`${ot}_${a.jeScheduleId}`),children:t.jsxs(si,{children:[t.jsxs(ci,{children:[t.jsxs(ii,{children:[V===!0?t.jsx(oe,{style:{width:ye.COLUMN_ONE,padding:x[0],justifyContent:"center"},showHoverEffect:V,forceHoverEffect:Y===!1&&(d?.updatedVendor?.id==null||d?.updatedVendor?.id==""),children:t.jsxs(yt,{className:"hover-background",style:{padding:`${o.sp2} ${o.sp3}`},children:[t.jsxs(ce,{style:{display:"flex",alignItems:"center",gap:x[1]},children:[hn.vendor,t.jsx(Ce,{display:"flex",placement:"top-start",title:t.jsx(Yn,{children:We.tooltipText.missingVendor.replace("_deleted_vendor_",H)}),children:t.jsx(xo,{})})]}),t.jsx(ue,{style:{gap:x[3],marginLeft:-2},className:"item-value-container",children:t.jsx(t.Fragment,{children:Y===!0?t.jsxs(fe,{onClick:E=>{E.stopPropagation(),B(!1)},"data-testid":F("je-schedule-resolve-component-add-vendor-button",`${ot}_${a.jeScheduleId}`),style:{display:"inline-flex",alignItems:"center",gap:x[2],color:tt.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(go,{}),Zi]}):t.jsx(Bo,{name:na,placeholder:Zi,valueToId:E=>E,defaultValue:{selectedOption:G?.selectedOption,defaultOptions:G?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:o.sp4})},registerOptions:{required:!0,validate:E=>!!E.selectedOption},loadOptions:z})})})]})}):t.jsxs(oe,{style:{width:ye.COLUMN_ONE,padding:`${o.sp2} ${o.sp0} ${o.sp2} ${o.sp3}`},children:[t.jsx(ce,{children:hn.vendor}),t.jsx(ue,{children:t.jsxs(t.Fragment,{children:[a.vendor.logo?.href!=null?t.jsx(ts,{photoUrl:a.vendor.logo.href,styles:{width:x[4],height:x[4]}}):t.jsx(In,{name:a.vendor.name}),t.jsx(Ce,{display:"block",placement:"bottom",style:{width:"100%"},title:a.vendor.name!==null?t.jsx(Ye,{children:a.vendor.name}):t.jsx(t.Fragment,{}),children:t.jsx(fe,{className:"highlight",children:a.vendor.name??Ge})})]})})]}),t.jsxs(oe,{children:[t.jsx(ce,{children:We.scheduleHeaders.scheduleCategory}),t.jsx(ue,{children:t.jsx(Ce,{display:"block",placement:"bottom",style:{width:"100%"},title:a.baseTransaction.account.accountName!=null?t.jsx(Ye,{children:a.baseTransaction.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(fe,{className:"highlight",children:a.baseTransaction.account.accountName??Ge})})})]}),t.jsxs(oe,{style:{width:ye.COLUMN_THREE},children:[t.jsx(ce,{children:We.scheduleHeaders.startMonth}),t.jsx(ue,{children:t.jsx(fe,{className:"highlight",children:a.startDate?.format(Xi.visual.MMMCommaYYYYFormat)??Ge})})]}),t.jsxs(oe,{style:{width:ye.COLUMN_FOUR,paddingLeft:x[3]},children:[t.jsx(ce,{children:We.scheduleHeaders.period}),t.jsx(ue,{children:t.jsx(fe,{className:"highlight",children:a.period!=null?`${a.period} ${a.period===1?ea.slice(0,-1):ea}`:Ge})})]}),t.jsxs(oe,{style:{alignItems:"flex-end",width:ye.COLUMN_FIVE},children:[t.jsx(ce,{children:hn.totalAmount}),t.jsx(ue,{children:t.jsx(Ce,{display:"block",placement:"bottom",title:t.jsx(Ye,{children:Ze("0,0.[00]",Xt(a.baseTransaction.amount.amount,ft.currencyCode,ft.currencySymbol))??Ge}),children:t.jsx(fe,{className:"highlight",children:Ze("0,0.[00]",Xt(a.baseTransaction.amount.amount,ft.currencyCode,ft.currencySymbol))??Ge})})})]})]}),t.jsxs(ai,{children:[de===!0?t.jsx(oe,{showHoverEffect:de===!0,forceHoverEffect:d?.updatedCategoryId==null&&xe===!1,style:{padding:"unset",justifyContent:"center",width:ye.COLUMN_ONE},children:t.jsxs(yt,{className:"hover-background",children:[t.jsxs(ce,{style:{display:"flex",alignItems:"center",gap:x[1]},children:[hn.category,de===!0?t.jsx(Ce,{display:"flex",placement:"top-start",title:t.jsx(Yn,{children:We.tooltipText.missingCategory.replace("_deleted_category_",ie)}),children:t.jsx(xo,{})}):null]}),t.jsx(ue,{className:"item-value-container",style:{marginLeft:de===!0?-2:0},children:de===!0?t.jsx(t.Fragment,{children:xe===!0?t.jsxs(fe,{onClick:E=>{E.stopPropagation(),ge(!1)},style:{display:"inline-flex",alignItems:"center",gap:x[1],color:tt.brandColorGoldDark,cursor:"pointer"},"data-testid":F("je-schedule-resolve-component-add-category-button",`${ot}_${a.jeScheduleId}`),children:[t.jsx(go,{}),We.addCategory]}):t.jsx(mn,{shouldShowChevronIcon:!1,name:oa,placeholder:We.addCategory,valueToId:E=>$(E),defaultValue:{allOptions:e},registerOptions:{required:!0,validate:E=>!!E.selectedOption},disableCurrentOption:N,customStyleConfig:T})}):t.jsx(Ce,{display:"block",placement:"bottom",style:{width:"100%"},title:a.jeDebit.account?.accountName!=null?t.jsx(Ye,{children:a.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(fe,{className:"highlight",children:a.jeDebit.account?.accountName??Ge})})})]})}):t.jsxs(oe,{style:{width:ye.COLUMN_ONE,padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(ce,{style:{display:"flex",alignItems:"center",gap:x[1]},children:hn.category}),t.jsx(ue,{className:"item-value-container",children:t.jsx(Ce,{display:"block",placement:"bottom",style:{width:"100%"},title:a.jeDebit.account?.accountName!=null?t.jsx(Ye,{children:a.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(fe,{className:"highlight",children:a.jeDebit.account?.accountName??Ge})})})]}),t.jsxs(oe,{children:[t.jsx(ce,{style:{display:"flex",alignItems:"center",gap:x[1]},children:hn.classText}),t.jsx(ue,{children:t.jsx(Ce,{display:"block",placement:"bottom",style:{width:"100%"},title:a.jeDebit.accountingClass?.className!=null?t.jsx(Ye,{children:a.jeDebit.accountingClass.className}):t.jsx(t.Fragment,{}),children:t.jsx(fe,{className:"highlight",children:a.jeDebit.accountingClass?.className??Ge})})})]}),t.jsxs(oe,{style:{width:ye.COLUMN_THREE},children:[t.jsx(ce,{children:We.scheduleHeaders.type}),t.jsx(ue,{className:"test",children:t.jsx(fe,{className:"highlight",style:{width:"unset"},children:t.jsx(Ss,{children:We.scheduleTypes[a.jeScheduleType??"prepaid_expenses"]})})})]}),a.jeScheduleType==="fixed_assets"?t.jsx(t.Fragment,{children:_===!0?t.jsx(oe,{style:{width:ye.COLUMN_FOUR,padding:"unset",justifyContent:"center"},showHoverEffect:_,forceHoverEffect:d.updatedAccumulatedDepreciationCategoryID==null&&q===!1,children:t.jsxs(yt,{className:"hover-background",style:{padding:x[2],paddingLeft:x[3]},children:[t.jsxs(ce,{style:{display:"flex",alignItems:"center",gap:x[1]},children:[We.scheduleHeaders.accumulatedCategory,_===!0?t.jsx(Ce,{display:"flex",placement:"top-end",title:t.jsx(Yn,{children:We.tooltipText.missingDepCategory.replace("_deleted_dep_category_",he)}),children:t.jsx(xo,{})}):null]}),t.jsx(ue,{className:"item-value-container",style:{marginLeft:_===!0?-2:0},children:_===!0?t.jsx(t.Fragment,{children:q===!0?t.jsxs(fe,{onClick:E=>{E.stopPropagation(),K(!1)},style:{display:"inline-flex",alignItems:"center",gap:x[1],color:tt.brandColorGoldDark,cursor:"pointer"},"data-testid":F("je-schedule-resolve-component-add-depreciation-category-button",`${ot}_${a.jeScheduleId}`),children:[t.jsx(go,{}),We.addDepCategory]}):t.jsx(mn,{shouldShowChevronIcon:!1,showDownChevronWithValue:!1,name:ia,placeholder:We.addDepCategory,valueToId:E=>M(E),defaultValue:{allOptions:h},registerOptions:{required:!0,validate:E=>!!E.selectedOption},customStyleConfig:D,disableCurrentOption:N})}):t.jsx(Ce,{display:"block",placement:"bottom",title:a.jeCredit.account?.accountName!=null?t.jsx(Ye,{children:a.jeCredit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(fe,{className:"highlight",children:a.jeCredit.account?.accountName??Ge})})})]})}):t.jsxs(oe,{style:{width:ye.COLUMN_FOUR,padding:`${o.sp2} ${o.sp2} ${o.sp2} ${o.sp3}`,justifyContent:"center"},children:[t.jsx(ce,{style:{display:"flex",alignItems:"center",gap:x[1]},children:We.scheduleHeaders.accumulatedCategory}),t.jsx(Ce,{display:"block",placement:"bottom",title:a.jeCredit.account?.accountName!=null?t.jsx(Ye,{children:a.jeCredit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(fe,{className:"highlight",children:a.jeCredit.account?.accountName??Ge})})]})}):null,a.jeScheduleType!=="fixed_assets"?t.jsx(oe,{style:{width:ye.COLUMN_FOUR}}):null,t.jsx(oe,{style:{width:ye.COLUMN_FIVE}})]}),t.jsxs(nu,{children:[t.jsx(oe,{style:{padding:"unset",width:ye.COLUMN_ONE},children:t.jsxs(ou,{children:[t.jsx(ce,{children:We.scheduleHeaders.jePostingDate}),t.jsx(ue,{children:t.jsx(fe,{className:"highlight",children:a.scheduledJournalEntry.expectedPostDate.format(Xi.visual.MMMDCommaYYFormat)??Ge})})]})}),t.jsxs(oe,{children:[t.jsx(ce,{children:We.scheduleHeaders.balance}),t.jsx(ue,{children:t.jsx(Ce,{display:"block",placement:"bottom",style:{width:"100%"},title:t.jsx(Ye,{children:Ze("0,0.[00]",Xt(a?.scheduledJournalEntry?.runningBalance?.amount??0,ft.currencyCode,ft.currencySymbol))??Ge}),children:t.jsx(fe,{className:"highlight",children:Ze("0,0.[00]",Xt(a?.scheduledJournalEntry?.runningBalance?.amount??0,ft.currencyCode,ft.currencySymbol))??Ge})})})]}),t.jsxs(oe,{style:{width:ye.COLUMN_THREE},children:[t.jsx(ce,{children:We.scheduleHeaders.months}),t.jsx(ue,{children:t.jsxs(fe,{className:"highlight",children:[a.scheduledJournalEntry.expectedPostDate.diff(a.startDate,"month")+1,"/",a.period]})})]}),t.jsx(oe,{style:{width:ye.COLUMN_FOUR}}),t.jsxs(oe,{style:{alignItems:"flex-end",width:ye.COLUMN_FIVE},children:[t.jsx(ce,{children:We.scheduleHeaders.amountForMonth}),t.jsx(ue,{children:t.jsx(fe,{className:"highlight",children:Ze("0,0.[00]",Xt(a.scheduledJournalEntry.amount?.amount??0,ft.currencyCode,ft.currencySymbol))??Ge})})]})]})]}),t.jsx(li,{children:t.jsx($n,{form:ta(`${ot}_${a.jeScheduleId}`),label:zh,variant:"primary",className:"item-value-container",type:"submit",loading:c?.fetchState==="In-Progress",size:"small",disabled:!A,style:{minWidth:No}})})]})})})})},aa=(e,n,l,r,h,p,a,d)=>{const c=e.updatedCategoryId,m=e.updatedVendor,u=m!=null?d.vendor.find(k=>k.zeniId===m.id):void 0,g=e.updatedAccumulatedDepreciationCategoryID,f=e.updatedClassId,y=c!=null?h.find(k=>k.accountId===c):void 0,w=g!=null?a.find(k=>k.accountId===g):void 0,v=f!=null?p.find(k=>k.classId===f):void 0;return{[ot]:{jeScheduleID:e.jeScheduleID,scheduledJournalEntryID:e.scheduledJournalEntryID,jeScheduleType:e.jeScheduleType,scheduleExpenseCategory:{selectedOption:y?.qboId,allOptions:n},accumulatedDepreciationCategory:{selectedOption:w?.qboId,allOptions:r},vendor:{selectedOption:u?.id??m?.id,defaultOptions:ss(d,u??m)},scheduleClass:{selectedOption:v?.classId,allOptions:l}}}},go=s(ao)`
|
|
855
855
|
width: ${o.sp3};
|
|
856
856
|
height: ${o.sp3};
|
|
857
857
|
`,xo=s(rs)`
|
|
@@ -860,7 +860,7 @@ import{o,bW as ar,J as Te,gl as Ba,gm as Fa,V as t,cr as sr,bC as rr,aa as Ue,aS
|
|
|
860
860
|
color: ${tt.important};
|
|
861
861
|
`;function Ds(){return t.jsx(Cs,{children:t.jsxs(ws,{children:[t.jsxs(bs,{children:[t.jsx(ze,{width:x[9],height:27,style:{marginBottom:x[2]}}),t.jsx(sa,{})]}),t.jsxs(vs,{children:[t.jsx(ze,{width:x[9],height:27,style:{marginBottom:x[2]}}),t.jsx(sa,{})]})]})})}const sa=()=>t.jsx(ri,{style:{minWidth:1088},children:t.jsxs(si,{children:[t.jsxs(ci,{children:[t.jsxs(ii,{children:[t.jsxs(oe,{style:{width:ye.COLUMN_ONE,padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(ce,{children:t.jsx(ze,{width:x[10],height:14})}),t.jsxs(ue,{style:{gap:x[2]},children:[t.jsx(Xo,{height:x[4],width:x[4]}),t.jsx(ze,{height:x[4],width:x[10]})]})]}),t.jsxs(oe,{children:[t.jsx(ce,{children:t.jsx(ze,{width:101,height:14})}),t.jsx(ue,{children:t.jsx(ze,{height:x[4],width:203})})]}),t.jsxs(oe,{style:{width:ye.COLUMN_THREE},children:[t.jsx(ce,{children:t.jsx(ze,{width:x[9],height:14})}),t.jsx(ue,{children:t.jsx(ze,{height:x[4],width:71})})]}),t.jsxs(oe,{style:{width:ye.COLUMN_FOUR,paddingLeft:x[3]},children:[t.jsx(ce,{children:t.jsx(ze,{width:107,height:14})}),t.jsx(ze,{height:x[4],width:68})]}),t.jsxs(oe,{style:{alignItems:"flex-end",width:ye.COLUMN_FIVE},children:[t.jsx(ce,{children:t.jsx(ze,{width:73,height:14})}),t.jsx(ue,{children:t.jsx(ze,{height:x[4],width:49})})]})]}),t.jsxs(ai,{children:[t.jsxs(oe,{style:{width:ye.COLUMN_ONE,padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(ce,{children:t.jsx(ze,{width:49,height:14})}),t.jsx(ue,{children:t.jsx(ze,{height:x[4],width:158})})]}),t.jsxs(oe,{children:[t.jsx(ce,{children:t.jsx(ze,{width:36,height:14})}),t.jsx(ue,{children:t.jsx(ze,{height:x[4],width:88})})]}),t.jsxs(oe,{style:{width:ye.COLUMN_THREE},children:[t.jsx(ce,{children:t.jsx(ze,{width:36,height:14})}),t.jsx(ue,{children:t.jsx(ze,{height:x[4],width:100})})]}),t.jsx(oe,{style:{width:ye.COLUMN_FOUR,paddingLeft:x[3]}}),t.jsx(oe,{style:{width:ye.COLUMN_FIVE}})]})]}),t.jsxs(li,{children:[t.jsx(ze,{height:29,width:53,style:{margin:`${o.sp0} ${o.sp3}`}}),t.jsx(ze,{height:29,width:53,style:{margin:`${o.sp0} ${o.sp3}`}})]})]})}),ze=s(Ht)`
|
|
862
862
|
border-radius: ${o.sp1};
|
|
863
|
-
`,{common:{create:Hh,resolve:Wh}}=Ae.getLocalizedStrings();function Uh({jeSchedules:e,vendorSearchAutoCompleteData:n,handleJeScheduleClick:l,onJESchedulesFormDataChange:r,onPostJESchedule:h,ignoreRecommendedJeSchedule:p,vendorSearchAutoCompleteActions:a,setCurrentFooterFormId:d}){const c=e.draftSchedules,m=e.jeScheduleLocalDataById,u=e.postStatusById,g=e.ignoreStatusById,f=i.useRef(!1),[
|
|
863
|
+
`,{common:{create:Hh,resolve:Wh}}=Ae.getLocalizedStrings();function Uh({jeSchedules:e,vendorSearchAutoCompleteData:n,handleJeScheduleClick:l,onJESchedulesFormDataChange:r,onPostJESchedule:h,ignoreRecommendedJeSchedule:p,vendorSearchAutoCompleteActions:a,setCurrentFooterFormId:d}){const c=e.draftSchedules,m=e.jeScheduleLocalDataById,u=e.postStatusById,g=e.ignoreStatusById,f=i.useRef(!1),[y,w]=i.useState(!1),v=i.useRef($=>{$&&!f.current&&(f.current=!0,w(!0))});Tn({componentName:"expense_automation.je_schedules",enabled:y});const k=e.resolveSchedules,C=e.uncategorizedAccounts,{allAccountList:R,allClassList:I,allDepreciationAccountList:S}=e,T=Vt(e.accountListNestedAccountHierarchy),D=Vt(e.allDepreciationAccountListNestedAccountHierarchy),A=Jn(e.classListNestedAccountHierarchy),O=($,M,N)=>{l($,M,N)},b=($,M,N,G)=>{let z=$.target;for(;z;){if(z.classList.contains("item-value-container")||z.classList.contains("hover-background")||z.classList.contains("auto-complete-single-select-field__input")||z.classList.contains("auto-complete-single-select-field__option")||z.classList.contains("grouped-single-select-field__input")||z.classList.contains("grouped-single-select-field__menu"))return;z=z.parentElement}l(M,N,G)};return i.useEffect(()=>{if(k.length!==0){for(const $ in m)if(Object.prototype.hasOwnProperty.call(m,$)){const{updatedAccumulatedDepreciationCategoryID:M,updatedCategoryId:N,updatedVendor:G}=m[$];if(M!=null||N!=null||G!=null&&G?.id!==""){d("expenseAutomationJESchedulePage");break}else d("expenseAutomationPage")}}else k.length===0&&d("expenseAutomationPage")}),i.useEffect(()=>()=>{d("expenseAutomationPage")},[]),e.fetchState==="In-Progress"?t.jsx(Ds,{}):c.length!==0||k.length!==0?t.jsx(Cs,{children:t.jsxs(ws,{children:[c.length>0?t.jsxs(bs,{children:[t.jsxs(ca,{children:[Hh,t.jsx(da,{isCircular:c.length<10,children:t.jsx(ua,{children:c.length})})]}),t.jsx(ra,{"data-testid":F("expense-automation","draft-je-schedules"),children:c.map(($,M)=>t.jsx(la,{ref:v.current,children:t.jsx(_h,{ignoreStatus:g[$.jeScheduleTransactionKey],ignoreRecommendedJeSchedule:p,onReviewClickHandler:O,jeScheduleClickHandler:b,draft:$})},`${M}_${$.jeScheduleId}`))})]}):null,k.length>0?t.jsxs(vs,{children:[t.jsxs(ca,{children:[Wh,t.jsx(da,{isCircular:k.length<10,children:t.jsx(ua,{children:k.length})})]}),t.jsx(ra,{"data-testid":F("expense-automation","resolve-je-schedules"),children:k.map(($,M)=>m[$.scheduledJournalEntry.scheduledJournalEntryID]==null?null:t.jsx(la,{ref:v.current,children:t.jsx(Vh,{vendorSearchAutoCompleteActions:a,vendorSearchAutoCompleteData:n,jeScheduleClickHandler:b,onPostJESchedule:h,uncategorizedAccounts:C,allAccountList:R,allAccountGroupedOptions:T,allClassGroupedOptions:A,allClassList:I,allDepAccountGroupedOptions:D,allDepAccountList:S,draft:$,postStatus:u[$.scheduledJournalEntry.scheduledJournalEntryID],localData:m[$.scheduledJournalEntry.scheduledJournalEntryID],onFormDataChange:r})},`${M}_${$.jeScheduleTransactionKey}`))})]}):null]})}):null}const ra=s.div`
|
|
864
864
|
display: flex;
|
|
865
865
|
flex-direction: column;
|
|
866
866
|
gap: ${o.sp4};
|
|
@@ -893,7 +893,7 @@ import{o,bW as ar,J as Te,gl as Ba,gm as Fa,V as t,cr as sr,bC as rr,aa as Ue,aS
|
|
|
893
893
|
align-items: center;
|
|
894
894
|
justify-content: center;
|
|
895
895
|
color: inherit;
|
|
896
|
-
`;function qh({expenseAutomationViewSelector:e,currentFooterFormId:n,setResetJeAccountSettingsForm:l,vendorSearchAutoCompleteData:r,onJESchedulesFormDataChange:h,onPostJESchedule:p,handleJeScheduleClick:a,onJeAccountSettingsChange:d,onSaveJeAccountSettingsClick:c,ignoreRecommendedJeSchedule:m,vendorSearchAutoCompleteActions:u,setCurrentFooterFormId:g,setIsJeAccountSettingsOpened:f}){const{jeSchedules:
|
|
896
|
+
`;function qh({expenseAutomationViewSelector:e,currentFooterFormId:n,setResetJeAccountSettingsForm:l,vendorSearchAutoCompleteData:r,onJESchedulesFormDataChange:h,onPostJESchedule:p,handleJeScheduleClick:a,onJeAccountSettingsChange:d,onSaveJeAccountSettingsClick:c,ignoreRecommendedJeSchedule:m,vendorSearchAutoCompleteActions:u,setCurrentFooterFormId:g,setIsJeAccountSettingsOpened:f}){const{jeSchedules:y}=e;return y.fetchState==="In-Progress"||y.accountSettingsView.fetchState==="In-Progress"?t.jsx(Ds,{}):y.accountSettingsView.fetchState==="Completed"&&y.accountSettingsView.accountSettingsLocalData.previousPrepaidExpensesAccount.length===0&&y.accountSettingsView.accountSettingsLocalData.previousFixedAssetsAccount.length===0?t.jsx(Ah,{setIsJeAccountSettingsOpened:f,setResetJeAccountSettingsForm:l,currentFooterFormId:n,onJeAccountSettingsChange:d,onSaveJeAccountSettingsClick:c,accountSettings:y.accountSettingsView,setCurrentFooterFormId:g}):y.fetchState==="Completed"&&y.draftSchedules.length===0&&y.resolveSchedules.length===0?t.jsx(Tt,{tab:e.currentSelectedView,title:Je(e.currentSelectedView).allDoneText.title,subTitle:Je(e.currentSelectedView).allDoneText.subTitle}):y.fetchState==="Completed"?t.jsx(Uh,{setCurrentFooterFormId:g,handleJeScheduleClick:a,ignoreRecommendedJeSchedule:m,jeSchedules:e.jeSchedules,onJESchedulesFormDataChange:h,onPostJESchedule:p,vendorSearchAutoCompleteActions:u,vendorSearchAutoCompleteData:r}):null}const Kh=72,Os=50,Jh=1,Gh=["receipts"],ha=e=>cs(e,Gh),{common:{texts:{vendor:Yh,amount:Zh,receipts:Qh,category:Xh,classText:ep,date:tp}}}=Ae.getLocalizedStrings(),Ms={key:"vendor",value:Yh,sortOrder:"ascending",width:new ae(18,18)},np={key:"category",value:Xh,sortOrder:"ascending",width:new ae(18,18)},op={key:"class",value:ep,sortOrder:"ascending",width:new ae(18,18)},ip={key:"date",value:tp,sortOrder:"descending",width:new ae(11,11)},ap={key:"receipts",value:Qh,sortOrder:"descending",width:new ae(6,6)},_s={key:"amount",value:Zh,sortOrder:"ascending",width:new ae(10,10)},jn=[Ms,np,op,ip,ap,_s],Bs=[{...Ms,width:new ae(65,65)},{..._s,width:new ae(30,30)}],fo={sortKey:"date",sortOrder:"descending"},pa={containerPaddingLeftRight:new ae(x[3],x[4])},Fs=({sortConfig:e,isDisabled:n,onColumnSortConfigChanged:l})=>{const r=Te(),h=Rt(),p=h?Bs:jn,[a,d]=i.useState(p);i.useEffect(()=>{const u=[...p];for(const g of u)g.key===e.sortKey?g.sortOrder=e.sortOrder:g.sortOrder="ascending";d(u)},[e.sortKey,e.sortOrder,h]);const c=(u,g)=>{let f=g;e.sortKey===u&&(f=g==="ascending"?"descending":"ascending"),l(u,f)},m=u=>{ha(u.key)==null&&c(Bl(u.key),u.sortOrder)};return t.jsx(sp,{windowSize:r,children:a.map((u,g)=>{const f=n!=null||ha(u.key)!=null;return t.jsxs(rp,{sortDataValue:e.sortKey,actualDataValue:u.key,wrapperWidth:u.width,isSortDisabled:f,windowSize:r,isLastItem:g===a.length-1,style:u.key==="receipts"?{justifyContent:"center"}:void 0,children:[t.jsxs(hp,{onClick:()=>f?null:m(u),isSortDisabled:f,children:[t.jsx(pp,{children:u.value}),f?null:t.jsx(cp,{sortConfig:e,headerData:u,children:t.jsx(up,{})})]}),f?null:t.jsx(dp,{isSortDisabled:f,sortDataValue:e.sortKey,isVisible:e.sortKey===u.key&&e.sortKey!==fo.sortKey,children:t.jsx(lp,{onClick:()=>{f||c(fo.sortKey,fo.sortOrder)},"data-testid":F("missing-receipts-header-close-icon",u.key)})})]},u.key)})})},sp=s.div`
|
|
897
897
|
top: ${o.sp0};
|
|
898
898
|
left: ${o.sp0};
|
|
899
899
|
height: ${Os}px;
|
|
@@ -946,7 +946,7 @@ import{o,bW as ar,J as Te,gl as Ba,gm as Fa,V as t,cr as sr,bC as rr,aa as Ue,aS
|
|
|
946
946
|
}
|
|
947
947
|
`,pp=s(bt)`
|
|
948
948
|
display: flex;
|
|
949
|
-
`,{common:{strings:{underscore:Ps,hyphen:yo,empty:ma},documents:{singleFileUploadSizeErrorMessage:mp,multipleFileUploadSizeErrorMessage:gp},snackBar:{missing_receipts_attachment:{failed:xp}},tooltips:{addMissingReceipt:fp}},dateFormat:yp}=Ae.getLocalizedStrings(),qn={containerPaddingLeftRight:new ae(x[3],x[4]),containerPaddingTopBottom:new ae(x[2],x[3])},Cp=({transaction:e,uploadReceiptsFetchState:n,receiptUploadEndpoint:l,authParams:r,selectedPeriod:h,onUploadReceiptComplete:p,onMissingReceiptsRowClick:a,onUploadReceiptFetchStatus:d,onUploadReceiptAttachment:c})=>{const m=Te(),u=Rt(),g=i.useRef(null),f=i.useCallback(async(k,
|
|
949
|
+
`,{common:{strings:{underscore:Ps,hyphen:yo,empty:ma},documents:{singleFileUploadSizeErrorMessage:mp,multipleFileUploadSizeErrorMessage:gp},snackBar:{missing_receipts_attachment:{failed:xp}},tooltips:{addMissingReceipt:fp}},dateFormat:yp}=Ae.getLocalizedStrings(),qn={containerPaddingLeftRight:new ae(x[3],x[4]),containerPaddingTopBottom:new ae(x[2],x[3])},Cp=({transaction:e,uploadReceiptsFetchState:n,receiptUploadEndpoint:l,authParams:r,selectedPeriod:h,onUploadReceiptComplete:p,onMissingReceiptsRowClick:a,onUploadReceiptFetchStatus:d,onUploadReceiptAttachment:c})=>{const m=Te(),u=Rt(),g=i.useRef(null),f=i.useCallback(async(k,C,R,I,S)=>{d(e.id,"In-Progress"),await Nl(k,C,R,I,S).then(({uploadResponse:T,errorMessage:D})=>{T!=null?T.transaction.attachments!=null&&(c(T.transaction),setTimeout(()=>p(T.transaction,h),2e3)):d(e.id,"Error",{code:500,message:xp},D)}).catch(T=>{d(e.id,"Error",T)})},[e.id,h,c,p,d]),y=i.useCallback(k=>{if(k.target.files!=null){const C=k.target.files,R=[],I=[];for(let S=0;S<C.length;S++)R.push(C[S].name),I.push(C[S]);f(l,r,C[0],C[0].name,{id:e.id,type:e.type})}},[r,f,l,e.id,e.type]),w=i.useCallback(()=>{u||g.current?.click()},[g,u]),v=u?Bs:jn;return t.jsx(zs,{className:"missing-receipts-row-card",windowSize:m,isQuickViewMode:u,onClick:()=>a(e.id,e.type),"data-testid":F("missing-receipts-list-row",e.id),children:v.map((k,C)=>{const R=`${e.id}${Ps}${k.key}`;switch(k.key){case"vendor":default:return t.jsx(en,{windowSize:m,wrapperWidth:k.width,children:t.jsx(tn,{windowSize:m,isLastItem:C===v.length-1,children:t.jsxs(Zn,{children:[t.jsx(es,{photoUrl:e.vendorId!=null?e.logo?.toString()??ma:ma,styles:{width:o.sp4,height:o.sp4,borderRadius:o.sp0},placeholder:{width:x[4],height:x[4]},fallbackAvatar:t.jsx(Ip,{children:t.jsx(In,{name:e.vendorName??e.description,size:o.sp4})})}),t.jsx(it,{text:e.vendorName??e.description,itemTextStyle:{...Nt.standardRegular.cssObject,color:"inherit"}})]})})},R);case"category":case"class":{const I=e.lines!=null&&e.lines.length>0&&e.lines[0]?.account!=null&&e.lines[0].account.accountName?e.lines[0].account.accountName:yo,S=e.lines!=null&&e.lines.length>0&&e.lines[0]?.class!=null&&e.lines[0].class.className?e.lines[0].class.className:yo,T=k.key==="category"?I:S;return t.jsx(en,{windowSize:m,wrapperWidth:k.width,children:t.jsx(tn,{windowSize:m,isLastItem:C===v.length-1,children:t.jsx(Zn,{children:T!==yo?t.jsx(it,{text:T,itemTextStyle:{...Nt.standardRegular.cssObject,color:"inherit"}}):t.jsx(kp,{children:T})})})},R)}case"date":return t.jsx(en,{windowSize:m,wrapperWidth:k.width,children:t.jsx(tn,{windowSize:m,isLastItem:C===v.length-1,children:t.jsx(Zn,{children:t.jsx(it,{text:e.date.format(yp.visual.MMMDCommaYYYYformat),itemTextStyle:{...Nt.standardRegular.cssObject,color:"inherit"}})})})},R);case"receipts":return t.jsx(en,{windowSize:m,wrapperWidth:k.width,children:t.jsx(tn,{windowSize:m,isLastItem:C===v.length-1,style:{justifyContent:"center"},children:n.fetchState==="In-Progress"?t.jsx(Jo,{size:"Small",style:{display:"flex"},start:!0}):n.fetchState==="Completed"||e.attachments!=null&&e.attachments.length>0?t.jsx(tl,{shouldDisplay:!0,width:x[4],height:x[4],animationInLoop:!1,shouldFade:!1,onAnimationComplete:()=>null}):t.jsxs(t.Fragment,{children:[t.jsx(jp,{onClick:I=>{I.stopPropagation()},children:t.jsx(Ko,{"data-testid":F("missing-receipts-file-input",e.id),name:`missing-receipts-${e.id}`,fileRef:g,sizeLimit:Gn,multiple:!1,acceptableTypes:[...ds],onFileChange:y,onFileSizeError:(I,S)=>{I&&d(e.id,"Error",{code:500,message:S===!0?mp.replace("__maxFileSize__",ji(Gn,0)):gp.replace("__maxFileSize__",ji(Gn,0))})}})}),t.jsx(Ce,{display:"flex",placement:"bottom",title:fp,enterDelay:600,children:t.jsx(Sp,{onClick:I=>{I.stopPropagation(),w()}})})]})})},R);case"amount":{const I=Ze("0,0.[00]",e.amount);return t.jsx(en,{windowSize:m,wrapperWidth:k.width,children:t.jsx(tn,{windowSize:m,isLastItem:C===v.length-1,children:t.jsx(it,{text:e.amount.amount<0?`-${I}`:I,itemTextStyle:{...Nt.standardRegular.cssObject,color:"inherit"}})})},R)}}})})},wp=()=>{const e=Te(),n=i.useRef(null),[l,r]=i.useState(0);return i.useLayoutEffect(()=>{n.current&&r(n.current.offsetWidth)},[e]),t.jsx(zs,{windowSize:e,isQuickViewMode:!1,ref:n,children:jn.map((h,p)=>{const a=`${p}${Ps}${h.key}`;switch(h.key){case"vendor":return t.jsx(en,{windowSize:e,wrapperWidth:h.width,children:t.jsx(tn,{windowSize:e,isLastItem:p===jn.length-1,children:t.jsxs(Zn,{children:[t.jsx(Xo,{width:x[4],height:x[4]}),t.jsx(Ht,{width:l*h.width.value(e)/100,height:x[4],style:{display:"flex",alignItems:"center"}})]})})},a);default:return t.jsx(en,{windowSize:e,wrapperWidth:h.width,children:t.jsx(tn,{windowSize:e,isLastItem:p===jn.length-1,children:t.jsx(Ht,{width:l*h.width.value(e)/100,height:x[4],style:{display:"flex",alignItems:"center"}})})},a)}})})},zs=s.div`
|
|
950
950
|
display: flex;
|
|
951
951
|
background-color: ${e=>e.theme.colors.grey5};
|
|
952
952
|
padding-left: ${e=>qn.containerPaddingLeftRight.valuePx(e.windowSize)};
|
|
@@ -1019,7 +1019,7 @@ import{o,bW as ar,J as Te,gl as Ba,gm as Fa,V as t,cr as sr,bC as rr,aa as Ue,aS
|
|
|
1019
1019
|
min-height: 100%;
|
|
1020
1020
|
flex-direction: column;
|
|
1021
1021
|
row-gap: ${o.sp3};
|
|
1022
|
-
`,{common:Ap}=Ae.getLocalizedStrings(),Ep=({missingReceipts:e,receiptUploadEndpoint:n,authParams:l,selectedPeriod:r,isDisabled:h,onMissingReceiptsRowClick:p,onUploadReceiptComplete:a,onUploadReceiptAttachment:d,onUploadReceiptFetchStatus:c,onUpdateMissingReceiptsUIState:m,onFetchMissingReceiptsList:u})=>{const g=Te(),{fetchState:f,uiState:
|
|
1022
|
+
`,{common:Ap}=Ae.getLocalizedStrings(),Ep=({missingReceipts:e,receiptUploadEndpoint:n,authParams:l,selectedPeriod:r,isDisabled:h,onMissingReceiptsRowClick:p,onUploadReceiptComplete:a,onUploadReceiptAttachment:d,onUploadReceiptFetchStatus:c,onUpdateMissingReceiptsUIState:m,onFetchMissingReceiptsList:u})=>{const g=Te(),{fetchState:f,uiState:y,transactions:w}=e;Tn({componentName:"expense_automation.missing_receipts",enabled:f==="Completed"});const v=i.useRef(null),[k,C]=i.useState(!1);i.useEffect(()=>{v.current?.resetAfterIndex(0)},[g,v]),i.useEffect(()=>{f==="Completed"&&C(!1)},[f]);const R=S=>Kh,I=(S,T)=>{m({sortOrder:T,sortKey:S})};return t.jsxs(Op,{children:[t.jsx(Mp,{windowSize:g,children:f==="Error"?t.jsxs(Bp,{windowSize:g,children:[t.jsx(Fp,{onClick:()=>u(),"data-testid":F("missing-receipts-list-table-reload-button"),children:t.jsx(qo,{})}),t.jsx(Pp,{children:Ap.reloadPage.label})]}):f==="Completed"&&w.length===0?t.jsx(Tt,{tab:"missing_receipts",title:Je("missing_receipts").allDoneText.title,subTitle:Je("missing_receipts").allDoneText.subTitle}):f==="Not-Started"||f==="In-Progress"&&w.length===0?t.jsx($p,{sortConfig:{sortKey:y.sortKey,sortOrder:y.sortOrder},fetchState:f,onColumnSortConfigChanged:I}):t.jsx(_p,{windowSize:g,children:t.jsx(to,{children:({height:S,width:T})=>t.jsxs(Np,{style:{height:S,width:T},children:[t.jsx(Dp,{children:t.jsx(Fs,{sortConfig:{sortKey:y.sortKey,sortOrder:y.sortOrder},isDisabled:f==="In-Progress"?"readonly":h,onColumnSortConfigChanged:I})}),t.jsx(no,{ref:v,height:S-Os,innerElementType:Ns,itemCount:w.length,itemData:{missingReceipts:e,receiptUploadEndpoint:n,authParams:l,isDisabled:h,selectedPeriod:r,onMissingReceiptsRowClick:p,onUploadReceiptComplete:a,onUploadReceiptAttachment:d,onUploadReceiptFetchStatus:c},itemSize:R,width:T,style:{willChange:"auto"},overscanCount:Jh,onScroll:({scrollOffset:D})=>{m({scrollPosition:{scrollTop:D}})},initialScrollOffset:y.scrollPosition?.scrollTop,children:Rp})]})})})}),t.jsx(Ue,{controller:k===!0,children:t.jsx(Vp,{children:t.jsx(Jo,{size:"Small",start:!0})})})]})},Rp=({index:e,style:n,data:l})=>{const{selectedTransactionId:r}=eo(),{missingReceipts:h,receiptUploadEndpoint:p,authParams:a,onMissingReceiptsRowClick:d,onUploadReceiptComplete:c,onUploadReceiptAttachment:m,onUploadReceiptFetchStatus:u,selectedPeriod:g}=l,f=h.transactions[e],y=r!=null&&r===f.id;return t.jsx(zp,{isPanelSelected:y,style:{...n,width:"100%"},children:t.jsx(Cp,{transaction:f,receiptUploadEndpoint:p,authParams:a,selectedPeriod:g,onMissingReceiptsRowClick:d,onUploadReceiptComplete:c,onUploadReceiptAttachment:m,onUploadReceiptFetchStatus:u,uploadReceiptsFetchState:h.uploadReceiptStatusById[f.id]??{fetchState:"Not-Started",error:void 0}},f.id)})},Dp=s.div`
|
|
1023
1023
|
width: auto;
|
|
1024
1024
|
max-width: var(--side-panel-list-width, 100%);
|
|
1025
1025
|
padding-right: var(--side-panel-list-item-pr, 0px);
|
|
@@ -1184,7 +1184,7 @@ import{o,bW as ar,J as Te,gl as Ba,gm as Fa,V as t,cr as sr,bC as rr,aa as Ue,aS
|
|
|
1184
1184
|
z-index: ${x[2]};
|
|
1185
1185
|
min-width: ${Wa}px;
|
|
1186
1186
|
max-width: ${Ha}px;
|
|
1187
|
-
`,Qn="monthEndReportFormSection",xa="monthEndReportPage",Xe=Ae.getLocalizedStrings();function am({companyId:e,enableZeniGPTFeature:n,monthEndReportView:l,previewMode:r,customerRequestData:h,allThreadsSectionOpen:p,filterMetaData:a,newThreadMetadata:d,isZeniUser:c,selectedPeriod:m,improveUsingZeniGPTClick:u,onRemoveFileAttachment:g,onUpdateFileAttachment:f,onCloseAllThreadsSection:C,previewMonthEndReport:w,saveMonthEndReport:v,onEditClick:k,onOpenFileAttachmentSnackBar:y,onClickCustomerRequest:R,sendMonthEndReport:I}){const S=mt(),[T,D]=i.useState(),[A,O]=i.useState(0),[b,$]=i.useState(0),M=i.useRef(),N=i.useRef(null),G=i.useRef(null),{html:z,subject:V,improveUsingZeniGPTStatus:de}=l,[_,H]=i.useState(),[ie,he]=i.useState(!1),[xe,ge]=i.useState(!1),q=i.useRef(null),K=i.useRef(null),Y=yr(p,250),B=l.fetchState==="Not-Started"||l.fetchState==="In-Progress"||l.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||l.companyMonthEndReportTemplatesData.fetchState==="In-Progress",{threadsRefs:E,sortedThreads:Z,threadsPositions:P,observer:X,unresolvedThreadsMap:J,handleRemoveFloatingThread:W}=Cr(a,q,!r,B,c),U=i.useCallback(()=>{p?K.current!=null&&$(Math.min((K.current.offsetWidth-vn-x[4])/2,K.current.offsetWidth-vn-Ha-x[4])):K.current!=null&&O(Math.min((K.current.offsetWidth-vn-x[4])/2,K.current.offsetWidth-vn-Wa-x[4]))},[p]);i.useEffect(()=>{U()},[p,U]),i.useEffect(()=>(window.addEventListener("resize",U),()=>{window.removeEventListener("resize",U)}),[U]);const L=c?Ba:Fa,{openThread:ne,addThread:ee,setOpenThread:Q}=i.useContext(L),pe=wr(vi,!1,!r),Ie=q.current?.getBoundingClientRect(),j=pe!=null&&pe.coords&&Ie?{left:pe.coords.left-Ie.left,top:pe.coords.top-Ie.top}:void 0,se=i.useCallback(()=>{const $e=window.getSelection()?.getRangeAt(0),re=br();if(!$e||re==null)return;const Le={...d,...re,startPath:re.startPath.join(),endPath:re.endPath.join()},le=`${qa()}${Ua}`,_e=`cockpit_${e}`;ee(le,{type:"thread",id:le,roomId:_e,createdAt:new Date,comments:[],metadata:Le,updatedAt:new Date,resolved:!1}),Q(le)},[ee,e,d,Q]);i.useEffect(()=>{ne!=null&&p&&C()},[p,ne,C]);const je=de.fetchState==="In-Progress",Ne=an({mode:"all",defaultValues:fa(l),values:fa(l)}),Ee=Ne.handleSubmit($e=>{const{recipientEmailList:re,subject:Le}=$e[Qn];if(r===!0)I?.(_?.id);else{const le=T?.replace(vr,Xe.common.strings.empty);re!=null&&Le!=null&&w(re,Le,_?.id,le!=null&&le.length>0?T:void 0)}}),Oe=()=>{N.current!=null&&N.current.click()},we=()=>{_!==void 0&&_!=null&&(g([_.id]),H(void 0),he(!1))},at=$e=>{const re=$e.target.files?$e.target.files[0]:null;if(re)if(!Ml(re.type)||xe)console.warn("Please select a valid file.");else{const Le=new FileReader;Le.onload=function(le){const _e=le.target?.result;if(typeof _e=="string"){const dt={data:_e.split(",")[1],name:re.name,id:_l(e,re.name)};H(dt),he(!0),f([dt])}},Le.readAsDataURL(re)}},st=()=>{G.current&&G.current.scrollIntoView({behavior:"smooth"})},qe=()=>{const $e=Ne.getValues(),{recipientEmailList:re,subject:Le}=$e[Qn];re!=null&&Le!=null&&v(re,Le,_?.id,T)};i.useEffect(()=>{D(l.zeniRequestsHtml)},[l.zeniRequestsHtml]),i.useEffect(()=>{M.current=_},[_]),i.useEffect(()=>{H(Dl(l.attachmentFile)),he(!1)},[l.attachmentFile]),i.useEffect(()=>{xe&&y()},[xe,y]);const me=zo(`${m.year}-${m.month}-01`).format(Xe.dateFormat.visual.MMMMFormat),Me=z!=null?z.split(Sr):[],Ot=l.concatenatedHtml,gt=()=>l.lastDraftSavedDate!=null&&r===!1?t.jsx(Kr,{time:l.lastDraftSavedDate,user:l.reportLastSavedByUser,timeStampLabel:Xe.cockpit.monthEndReport.timeStampLabel}):null,Ut=()=>c===!0?Y?t.jsxs(t.Fragment,{children:[t.jsx(im,{allThreadsSectionOpen:p,children:t.jsx(Ur,{autoExpand:!0,autoFocus:!1,style:{borderLeft:`1px solid ${S.colors.grey3}`,boxShadow:`${o.sp0} 1px 2px ${o.sp0} ${tt.boxShadowElevation}`},drawerSectionStyle:{width:`calc(100% - ${o.sp5} - ${o.sp5})`,backgroundColor:S.colors.background},threadsContainerStyle:{paddingBottom:r?"160px":o.sp12},collapsibleThreadStyle:{width:`calc(100% - ${o.sp4})`},allowComposer:!1,drawerTitle:Xe.common.texts.comments,filter:a,textOverrides:{},preventResolvedThreadClick:!0,onThreadClick:($e,re)=>{Q(re);const Le=Z.findIndex(le=>le[0]===re);C(),E.current?.[Le]?.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},onCloseAllThreadsDrawer:()=>C()})}),t.jsx(Co,{availableWidth:A})]}):t.jsx(qr,{observer:X,canvasContainerRef:q,sortedThreads:Z,threadsPositions:P,threadsRefs:E,unresolvedThreadsMap:J,editorMode:!r,style:{minWidth:`${A}px`,position:"relative",height:"fit-content",top:`${q.current?.offsetTop}px`,minHeight:o.sp12},handleRemoveFloatingThread:W}):t.jsx(Co,{availableWidth:A}),xt=(l.zeniRequestsData??[]).length+jr(l.companyMonthEndReportTemplatesData).length;return t.jsxs(t.Fragment,{children:[t.jsxs(qp,{ref:K,children:[t.jsx(Co,{availableWidth:p?b:A}),t.jsxs(Up,{children:[t.jsx(sn,{...Ne,children:t.jsx("form",{id:ya(xa),onSubmit:Ee,children:t.jsxs(tm,{children:[t.jsx(kr,{sectionId:Qn,previewMode:r,subject:V}),!r&&xt>0?t.jsx(Ir,{totalItems:xt,onClickCustomerRequest:R}):null,t.jsxs(Gp,{id:vi,ref:q,children:[t.jsxs(Yp,{className:"monthEndReportCanvasWrapper",children:[_!=null||xe?t.jsx(Zp,{"data-testid":F("email-attachment-container"),onClick:st,children:t.jsx($r,{fileSizeError:xe,setFileSizeError:ge,loading:!1,showAnimation:!r&&ie})}):null,r?t.jsx(ga,{dangerouslySetInnerHTML:{__html:Lr(Ot)}}):t.jsxs(t.Fragment,{children:[t.jsxs(Jp,{id:Tr,children:[t.jsx(Ve,{dangerouslySetInnerHTML:{__html:Me[0]!=null?Me[0]+"</body></html>":Xe.common.strings.empty}}),t.jsxs(Kp,{children:[t.jsx(em,{children:Xe.cockpit.monthEndReport.editorTitle}),t.jsx(Xp,{children:Xe.cockpit.monthEndReport.editorNote})]})]}),t.jsx(Qp,{id:Ar,children:t.jsx(Er,{handleFileInputClick:Oe,fileAttached:_!=null,enableZeniGPTFeature:n,isZeniGPTResponseLoading:je,initialHtmlString:l.zeniRequestsHtml,improveUsingZeniGPTClick:u,setZeniRequestsHtml:D,customerRequestData:h})}),t.jsx(ga,{id:Ka,dangerouslySetInnerHTML:{__html:Me[1]!=null?"<html><body>"+Me[1]:Xe.common.strings.empty}})]}),_!=null?t.jsx(Rr,{ref:G,fileName:_.name,fileSize:Dr(_.data),onRemove:we,isRemovable:!r}):null]}),j?t.jsx(Or,{style:{zIndex:15},coords:j,alignment:pe.alignment,onClick:se}):null,t.jsx(Mr,{canvasContainerRef:q,sortedThreads:Z,editorMode:!r,isZeniUser:c})]})]})})}),t.jsx(Ko,{name:_?.name??Xe.common.strings.empty,fileRef:N,sizeLimit:Wp,acceptableTypes:Hp,onFileChange:async $e=>{at($e)},onFileSizeError:$e=>ge($e),multiple:!1})]}),Ut()]}),t.jsx(Pa,{style:{zIndex:10},leftSideComponent:gt(),formId:ya(xa),cancelBtn:{isDisabled:je,label:r===!0?Xe.cockpit.monthEndReport.editButtonLabel:Xe.cockpit.monthEndReport.saveChanges,onClick:r===!0?k:qe,style:{width:"136px",padding:`${o.sp0} ${o.sp3}`,boxSizing:"border-box"},size:"medium",isLoading:l.saveMonthEndReportStatus.fetchState==="In-Progress",reverseSpinnerColor:!1},primaryBtn:{isDisabled:je,isLoading:r===!0?l.sendMonthEndReportStatus.fetchState==="In-Progress":l.previewMonthEndReportStatus.fetchState==="In-Progress",style:{width:r===!0?"unset":"136px"},label:r===!0?Xe.cockpit.monthEndReport.sendEmailButtonLabel.replace("__month__",me):Xe.cockpit.monthEndReport.preview,size:"medium"}})]})}const fa=e=>({[Qn]:{recipientEmailList:e.recipientEmailList,subject:e.subject??Xe.common.strings.empty}}),ya=e=>`${e}_form`;Nt.smallBold.lineHeightValue;const sm=1,rm=50,Ca=56,lm=["memo_and_receipt","activity","paymentAccount","receipt"],wa=e=>cs(e,lm),wo=905,cm=1240,dm=1440,um=1920;function Dt(e,n,l,r){const h=n,p=Math.round(n*cm/wo),a=Math.round(n*dm/wo),d=Math.round(n*um/wo),c=l??a,m=r??c;return new ae(e,n,h,Math.min(p,c),Math.min(a,c),Math.min(d,m))}const{common:{strings:{empty:hm}},expenseAutomation:{transactions:{header:{vendors:pm,category:mm,classText:gm,date:xm,type:fm,amount:ym,paymentAccount:Cm,memoReceipt:wm}}}}=Ae.getLocalizedStrings(),Vs={key:"vendor",value:pm,sortOrder:"ascending",width:Dt(200,200,220,360),customStyle:{common:{paddingLeft:x[7]}}},bm={key:"payment_account",value:Cm,sortOrder:"ascending",width:Dt(180,180,200,320),customStyle:{common:{paddingLeft:x[0]}}},vm={key:"category",value:mm,sortOrder:"ascending",width:Dt(200,200,220,360),customStyle:{common:{paddingLeft:x[6]}}},Sm={key:"class",value:gm,sortOrder:"ascending",width:Dt(200,200,220,360),customStyle:{common:{paddingLeft:x[6]}}},jm={key:"date",value:xm,sortOrder:"descending",width:Dt(108,108,130,144),customStyle:{common:{paddingLeft:x[0]}}},km={key:"transaction_type",value:fm,sortOrder:"descending",width:Dt(108,108,130,144),customStyle:{common:{paddingLeft:0}}},Im={key:"memo_and_receipt",value:wm,sortOrder:"ascending",width:Dt(108,108,108,120),customStyle:{common:{paddingLeft:0,justifyContent:"center",display:"flex",alignItems:"center"}}},Hs={key:"amount",value:ym,sortOrder:"ascending",width:Dt(108,108,140,156),customStyle:{common:{paddingRight:x[0],justifyContent:"flex-end",display:"flex",alignItems:"center"}}},$m={key:"activity",value:hm,sortOrder:"ascending",width:Dt(x[6],x[6],48,54),customStyle:{common:{}}},ui=e=>{const n=[Vs,bm,vm,Sm,jm,km,Im,Hs];return e===!0&&n.push($m),n},hi=[{...Vs,width:new ae(65,65)},{...Hs,width:new ae(30,30)}],bo={sortKey:"date",sortOrder:"descending"},Ws=({sortConfig:e,isDisabled:n,isTransactionActivityEnabled:l,onColumnSortConfigChanged:r})=>{const h=Te(),p=Rt(),a=p?hi:ui(l),[d,c]=i.useState(Po(a));i.useEffect(()=>{const g=Po(a);for(const f of g)f.key===e.sortKey?f.sortOrder=e.sortOrder:f.sortOrder="ascending";c(g)},[e.sortKey,e.sortOrder,p]);const m=(g,f)=>{let C=f;e.sortKey===g&&(C=f==="ascending"?"descending":"ascending"),r(g,C)},u=g=>{wa(g.key)==null&&m(Pl(g.key),g.sortOrder)};return t.jsx(Lm,{windowSize:h,isQuickViewMode:p,"data-testid":F("transaction-categorization-header-container"),children:d.map((g,f)=>{const C=n!=null||wa(g.key)!=null;return t.jsxs(Tm,{sortDataValue:e.sortKey,actualDataValue:g.key,wrapperWidth:g.width,style:g.customStyle?.common,isSortDisabled:C,isQuickViewMode:p,windowSize:h,isLastItem:f===d.length-1,"data-testid":F("transaction-categorization-header-wrapper",g.key),children:[t.jsxs(Om,{"data-testid":F("transaction-categorization-header",g.value?g.value:g.key),onClick:()=>u(g),isSortDisabled:C,children:[t.jsx(Mm,{children:g.value}),C?null:t.jsx(Em,{sortConfig:e,headerData:g,"data-testid":F("transaction-categorization-sort-icon",g.key),children:t.jsx(Dm,{})})]}),C?null:t.jsx(Rm,{isSortDisabled:C,sortDataValue:e.sortKey,isVisible:e.sortKey===g.key&&e.sortKey!==bo.sortKey,"data-testid":F("transaction-categorization-close-icon",g.key),children:t.jsx(Am,{onClick:()=>{m(bo.sortKey,bo.sortOrder)},"data-testid":F("transaction-categorization-close-icon-button",g.key)})})]},g.key)})})},Lm=s.div`
|
|
1187
|
+
`,Qn="monthEndReportFormSection",xa="monthEndReportPage",Xe=Ae.getLocalizedStrings();function am({companyId:e,enableZeniGPTFeature:n,monthEndReportView:l,previewMode:r,customerRequestData:h,allThreadsSectionOpen:p,filterMetaData:a,newThreadMetadata:d,isZeniUser:c,selectedPeriod:m,improveUsingZeniGPTClick:u,onRemoveFileAttachment:g,onUpdateFileAttachment:f,onCloseAllThreadsSection:y,previewMonthEndReport:w,saveMonthEndReport:v,onEditClick:k,onOpenFileAttachmentSnackBar:C,onClickCustomerRequest:R,sendMonthEndReport:I}){const S=mt(),[T,D]=i.useState(),[A,O]=i.useState(0),[b,$]=i.useState(0),M=i.useRef(),N=i.useRef(null),G=i.useRef(null),{html:z,subject:V,improveUsingZeniGPTStatus:de}=l,[_,H]=i.useState(),[ie,he]=i.useState(!1),[xe,ge]=i.useState(!1),q=i.useRef(null),K=i.useRef(null),Y=yr(p,250),B=l.fetchState==="Not-Started"||l.fetchState==="In-Progress"||l.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||l.companyMonthEndReportTemplatesData.fetchState==="In-Progress",{threadsRefs:E,sortedThreads:Z,threadsPositions:P,observer:X,unresolvedThreadsMap:J,handleRemoveFloatingThread:W}=Cr(a,q,!r,B,c),U=i.useCallback(()=>{p?K.current!=null&&$(Math.min((K.current.offsetWidth-vn-x[4])/2,K.current.offsetWidth-vn-Ha-x[4])):K.current!=null&&O(Math.min((K.current.offsetWidth-vn-x[4])/2,K.current.offsetWidth-vn-Wa-x[4]))},[p]);i.useEffect(()=>{U()},[p,U]),i.useEffect(()=>(window.addEventListener("resize",U),()=>{window.removeEventListener("resize",U)}),[U]);const L=c?Ba:Fa,{openThread:ne,addThread:ee,setOpenThread:Q}=i.useContext(L),pe=wr(vi,!1,!r),Ie=q.current?.getBoundingClientRect(),j=pe!=null&&pe.coords&&Ie?{left:pe.coords.left-Ie.left,top:pe.coords.top-Ie.top}:void 0,se=i.useCallback(()=>{const $e=window.getSelection()?.getRangeAt(0),re=br();if(!$e||re==null)return;const Le={...d,...re,startPath:re.startPath.join(),endPath:re.endPath.join()},le=`${qa()}${Ua}`,_e=`cockpit_${e}`;ee(le,{type:"thread",id:le,roomId:_e,createdAt:new Date,comments:[],metadata:Le,updatedAt:new Date,resolved:!1}),Q(le)},[ee,e,d,Q]);i.useEffect(()=>{ne!=null&&p&&y()},[p,ne,y]);const je=de.fetchState==="In-Progress",Ne=an({mode:"all",defaultValues:fa(l),values:fa(l)}),Ee=Ne.handleSubmit($e=>{const{recipientEmailList:re,subject:Le}=$e[Qn];if(r===!0)I?.(_?.id);else{const le=T?.replace(vr,Xe.common.strings.empty);re!=null&&Le!=null&&w(re,Le,_?.id,le!=null&&le.length>0?T:void 0)}}),Oe=()=>{N.current!=null&&N.current.click()},we=()=>{_!==void 0&&_!=null&&(g([_.id]),H(void 0),he(!1))},at=$e=>{const re=$e.target.files?$e.target.files[0]:null;if(re)if(!Ml(re.type)||xe)console.warn("Please select a valid file.");else{const Le=new FileReader;Le.onload=function(le){const _e=le.target?.result;if(typeof _e=="string"){const dt={data:_e.split(",")[1],name:re.name,id:_l(e,re.name)};H(dt),he(!0),f([dt])}},Le.readAsDataURL(re)}},st=()=>{G.current&&G.current.scrollIntoView({behavior:"smooth"})},qe=()=>{const $e=Ne.getValues(),{recipientEmailList:re,subject:Le}=$e[Qn];re!=null&&Le!=null&&v(re,Le,_?.id,T)};i.useEffect(()=>{D(l.zeniRequestsHtml)},[l.zeniRequestsHtml]),i.useEffect(()=>{M.current=_},[_]),i.useEffect(()=>{H(Dl(l.attachmentFile)),he(!1)},[l.attachmentFile]),i.useEffect(()=>{xe&&C()},[xe,C]);const me=zo(`${m.year}-${m.month}-01`).format(Xe.dateFormat.visual.MMMMFormat),Me=z!=null?z.split(Sr):[],Ot=l.concatenatedHtml,gt=()=>l.lastDraftSavedDate!=null&&r===!1?t.jsx(Kr,{time:l.lastDraftSavedDate,user:l.reportLastSavedByUser,timeStampLabel:Xe.cockpit.monthEndReport.timeStampLabel}):null,Ut=()=>c===!0?Y?t.jsxs(t.Fragment,{children:[t.jsx(im,{allThreadsSectionOpen:p,children:t.jsx(Ur,{autoExpand:!0,autoFocus:!1,style:{borderLeft:`1px solid ${S.colors.grey3}`,boxShadow:`${o.sp0} 1px 2px ${o.sp0} ${tt.boxShadowElevation}`},drawerSectionStyle:{width:`calc(100% - ${o.sp5} - ${o.sp5})`,backgroundColor:S.colors.background},threadsContainerStyle:{paddingBottom:r?"160px":o.sp12},collapsibleThreadStyle:{width:`calc(100% - ${o.sp4})`},allowComposer:!1,drawerTitle:Xe.common.texts.comments,filter:a,textOverrides:{},preventResolvedThreadClick:!0,onThreadClick:($e,re)=>{Q(re);const Le=Z.findIndex(le=>le[0]===re);y(),E.current?.[Le]?.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},onCloseAllThreadsDrawer:()=>y()})}),t.jsx(Co,{availableWidth:A})]}):t.jsx(qr,{observer:X,canvasContainerRef:q,sortedThreads:Z,threadsPositions:P,threadsRefs:E,unresolvedThreadsMap:J,editorMode:!r,style:{minWidth:`${A}px`,position:"relative",height:"fit-content",top:`${q.current?.offsetTop}px`,minHeight:o.sp12},handleRemoveFloatingThread:W}):t.jsx(Co,{availableWidth:A}),xt=(l.zeniRequestsData??[]).length+jr(l.companyMonthEndReportTemplatesData).length;return t.jsxs(t.Fragment,{children:[t.jsxs(qp,{ref:K,children:[t.jsx(Co,{availableWidth:p?b:A}),t.jsxs(Up,{children:[t.jsx(sn,{...Ne,children:t.jsx("form",{id:ya(xa),onSubmit:Ee,children:t.jsxs(tm,{children:[t.jsx(kr,{sectionId:Qn,previewMode:r,subject:V}),!r&&xt>0?t.jsx(Ir,{totalItems:xt,onClickCustomerRequest:R}):null,t.jsxs(Gp,{id:vi,ref:q,children:[t.jsxs(Yp,{className:"monthEndReportCanvasWrapper",children:[_!=null||xe?t.jsx(Zp,{"data-testid":F("email-attachment-container"),onClick:st,children:t.jsx($r,{fileSizeError:xe,setFileSizeError:ge,loading:!1,showAnimation:!r&&ie})}):null,r?t.jsx(ga,{dangerouslySetInnerHTML:{__html:Lr(Ot)}}):t.jsxs(t.Fragment,{children:[t.jsxs(Jp,{id:Tr,children:[t.jsx(Ve,{dangerouslySetInnerHTML:{__html:Me[0]!=null?Me[0]+"</body></html>":Xe.common.strings.empty}}),t.jsxs(Kp,{children:[t.jsx(em,{children:Xe.cockpit.monthEndReport.editorTitle}),t.jsx(Xp,{children:Xe.cockpit.monthEndReport.editorNote})]})]}),t.jsx(Qp,{id:Ar,children:t.jsx(Er,{handleFileInputClick:Oe,fileAttached:_!=null,enableZeniGPTFeature:n,isZeniGPTResponseLoading:je,initialHtmlString:l.zeniRequestsHtml,improveUsingZeniGPTClick:u,setZeniRequestsHtml:D,customerRequestData:h})}),t.jsx(ga,{id:Ka,dangerouslySetInnerHTML:{__html:Me[1]!=null?"<html><body>"+Me[1]:Xe.common.strings.empty}})]}),_!=null?t.jsx(Rr,{ref:G,fileName:_.name,fileSize:Dr(_.data),onRemove:we,isRemovable:!r}):null]}),j?t.jsx(Or,{style:{zIndex:15},coords:j,alignment:pe.alignment,onClick:se}):null,t.jsx(Mr,{canvasContainerRef:q,sortedThreads:Z,editorMode:!r,isZeniUser:c})]})]})})}),t.jsx(Ko,{name:_?.name??Xe.common.strings.empty,fileRef:N,sizeLimit:Wp,acceptableTypes:Hp,onFileChange:async $e=>{at($e)},onFileSizeError:$e=>ge($e),multiple:!1})]}),Ut()]}),t.jsx(Pa,{style:{zIndex:10},leftSideComponent:gt(),formId:ya(xa),cancelBtn:{isDisabled:je,label:r===!0?Xe.cockpit.monthEndReport.editButtonLabel:Xe.cockpit.monthEndReport.saveChanges,onClick:r===!0?k:qe,style:{width:"136px",padding:`${o.sp0} ${o.sp3}`,boxSizing:"border-box"},size:"medium",isLoading:l.saveMonthEndReportStatus.fetchState==="In-Progress",reverseSpinnerColor:!1},primaryBtn:{isDisabled:je,isLoading:r===!0?l.sendMonthEndReportStatus.fetchState==="In-Progress":l.previewMonthEndReportStatus.fetchState==="In-Progress",style:{width:r===!0?"unset":"136px"},label:r===!0?Xe.cockpit.monthEndReport.sendEmailButtonLabel.replace("__month__",me):Xe.cockpit.monthEndReport.preview,size:"medium"}})]})}const fa=e=>({[Qn]:{recipientEmailList:e.recipientEmailList,subject:e.subject??Xe.common.strings.empty}}),ya=e=>`${e}_form`;Nt.smallBold.lineHeightValue;const sm=1,rm=50,Ca=56,lm=["memo_and_receipt","activity","paymentAccount","receipt"],wa=e=>cs(e,lm),wo=905,cm=1240,dm=1440,um=1920;function Dt(e,n,l,r){const h=n,p=Math.round(n*cm/wo),a=Math.round(n*dm/wo),d=Math.round(n*um/wo),c=l??a,m=r??c;return new ae(e,n,h,Math.min(p,c),Math.min(a,c),Math.min(d,m))}const{common:{strings:{empty:hm}},expenseAutomation:{transactions:{header:{vendors:pm,category:mm,classText:gm,date:xm,type:fm,amount:ym,paymentAccount:Cm,memoReceipt:wm}}}}=Ae.getLocalizedStrings(),Vs={key:"vendor",value:pm,sortOrder:"ascending",width:Dt(200,200,220,360),customStyle:{common:{paddingLeft:x[7]}}},bm={key:"payment_account",value:Cm,sortOrder:"ascending",width:Dt(180,180,200,320),customStyle:{common:{paddingLeft:x[0]}}},vm={key:"category",value:mm,sortOrder:"ascending",width:Dt(200,200,220,360),customStyle:{common:{paddingLeft:x[6]}}},Sm={key:"class",value:gm,sortOrder:"ascending",width:Dt(200,200,220,360),customStyle:{common:{paddingLeft:x[6]}}},jm={key:"date",value:xm,sortOrder:"descending",width:Dt(108,108,130,144),customStyle:{common:{paddingLeft:x[0]}}},km={key:"transaction_type",value:fm,sortOrder:"descending",width:Dt(108,108,130,144),customStyle:{common:{paddingLeft:0}}},Im={key:"memo_and_receipt",value:wm,sortOrder:"ascending",width:Dt(108,108,108,120),customStyle:{common:{paddingLeft:0,justifyContent:"center",display:"flex",alignItems:"center"}}},Hs={key:"amount",value:ym,sortOrder:"ascending",width:Dt(108,108,140,156),customStyle:{common:{paddingRight:x[0],justifyContent:"flex-end",display:"flex",alignItems:"center"}}},$m={key:"activity",value:hm,sortOrder:"ascending",width:Dt(x[6],x[6],48,54),customStyle:{common:{}}},ui=e=>{const n=[Vs,bm,vm,Sm,jm,km,Im,Hs];return e===!0&&n.push($m),n},hi=[{...Vs,width:new ae(65,65)},{...Hs,width:new ae(30,30)}],bo={sortKey:"date",sortOrder:"descending"},Ws=({sortConfig:e,isDisabled:n,isTransactionActivityEnabled:l,onColumnSortConfigChanged:r})=>{const h=Te(),p=Rt(),a=p?hi:ui(l),[d,c]=i.useState(Po(a));i.useEffect(()=>{const g=Po(a);for(const f of g)f.key===e.sortKey?f.sortOrder=e.sortOrder:f.sortOrder="ascending";c(g)},[e.sortKey,e.sortOrder,p]);const m=(g,f)=>{let y=f;e.sortKey===g&&(y=f==="ascending"?"descending":"ascending"),r(g,y)},u=g=>{wa(g.key)==null&&m(Pl(g.key),g.sortOrder)};return t.jsx(Lm,{windowSize:h,isQuickViewMode:p,"data-testid":F("transaction-categorization-header-container"),children:d.map((g,f)=>{const y=n!=null||wa(g.key)!=null;return t.jsxs(Tm,{sortDataValue:e.sortKey,actualDataValue:g.key,wrapperWidth:g.width,style:g.customStyle?.common,isSortDisabled:y,isQuickViewMode:p,windowSize:h,isLastItem:f===d.length-1,"data-testid":F("transaction-categorization-header-wrapper",g.key),children:[t.jsxs(Om,{"data-testid":F("transaction-categorization-header",g.value?g.value:g.key),onClick:()=>u(g),isSortDisabled:y,children:[t.jsx(Mm,{children:g.value}),y?null:t.jsx(Em,{sortConfig:e,headerData:g,"data-testid":F("transaction-categorization-sort-icon",g.key),children:t.jsx(Dm,{})})]}),y?null:t.jsx(Rm,{isSortDisabled:y,sortDataValue:e.sortKey,isVisible:e.sortKey===g.key&&e.sortKey!==bo.sortKey,"data-testid":F("transaction-categorization-close-icon",g.key),children:t.jsx(Am,{onClick:()=>{m(bo.sortKey,bo.sortOrder)},"data-testid":F("transaction-categorization-close-icon-button",g.key)})})]},g.key)})})},Lm=s.div`
|
|
1188
1188
|
top: ${o.sp0};
|
|
1189
1189
|
left: ${o.sp0};
|
|
1190
1190
|
height: ${rm}px;
|
|
@@ -1249,7 +1249,7 @@ import{o,bW as ar,J as Te,gl as Ba,gm as Fa,V as t,cr as sr,bC as rr,aa as Ue,aS
|
|
|
1249
1249
|
}
|
|
1250
1250
|
`,Mm=s(bt)`
|
|
1251
1251
|
display: flex;
|
|
1252
|
-
`,vo="expenseAutomationTransactionsPage",on="transactionCategorizationListTable",De="account",et="class",pt="lineEntitySelection",_m="lineEntity",Bm="recommendations",Us="lineInfo",Fm="vendorDetails",Pm="customerDetails",Xn="selectedTransactionIds",Bt=(e,n,l)=>`${e}.${l}.${n}`,zm=e=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M4.85022 13.5836L5.52057 12.9133C5.63229 12.8016 5.77164 12.7217 5.92438 12.6815C6.07712 12.6413 6.23779 12.6424 6.38999 12.6846C6.54218 12.7268 6.68046 12.8086 6.7907 12.9217C6.90094 13.0348 6.97919 13.1751 7.01747 13.3283L7.08174 13.5836L7.8119 13.0972C7.98361 12.9827 8.1897 12.9312 8.39508 12.9515C8.60046 12.9719 8.79245 13.0628 8.93837 13.2087L9.31326 13.5836H11.0985",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M17.4206 6H2.24629C2.12792 6 2.01441 6.04702 1.93071 6.13072C1.84701 6.21442 1.79999 6.32794 1.79999 6.4463V17.1576C1.79999 17.276 1.84701 17.3895 1.93071 17.4732C2.01441 17.5569 2.12792 17.6039 2.24629 17.6039H21.8837C22.0021 17.6039 22.1156 17.5569 22.1993 17.4732C22.283 17.3895 22.33 17.276 22.33 17.1576V6.4463C22.33 6.32794 22.283 6.21442 22.1993 6.13072C22.1156 6.04702 22.0021 6 21.8837 6H17.4206Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M16.0854 9.6521H19.6559V12.0656H16.0854V9.6521Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),qs=e=>i.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M0.929688 8.00813C0.929688 8.675 1.02283 9.32014 1.19683 9.93121M2.20132 3.98138C3.46937 2.17826 5.566 1 7.93783 1C11.8083 1 14.946 4.13765 14.946 8.00813C14.946 10.2186 13.9226 12.1901 12.3237 13.4745M2.01692 11.7591C2.35672 12.2943 2.7671 12.7804 3.23498 13.2041M4.80209 14.2773C5.39521 14.5746 6.03636 14.7901 6.7108 14.9092M8.65531 14.98C9.34096 14.9103 9.99736 14.7418 10.6101 14.4888",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M8 4.66602V7.93891L11.0228 10.9322",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M4.1813 4.23989L1.83594 4.24014V1.89453",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"})),Nm=e=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.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"}),i.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"}),i.createElement("path",{d:"M14.055 8.06982L5.80499 8.06982",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M10.305 12.5698L5.80499 12.5698",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Vm=e=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M20.25 19.5H6.75C6.55109 19.5 6.36032 19.421 6.21967 19.2803C6.07902 19.1397 6 18.9489 6 18.75V2.25C6 2.05109 6.07902 1.86032 6.21967 1.71967C6.36032 1.57902 6.55109 1.5 6.75 1.5H15.75L21 6.75V18.75C21 18.9489 20.921 19.1397 20.7803 19.2803C20.6397 19.421 20.4489 19.5 20.25 19.5Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M15.75 1.5V6.75H21",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M10.4941 11.2559H16.4941",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M10.4941 14.2559H16.4941",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M16.5 22.5H3V5.85315",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),{common:{strings:{underscore:Hm,hyphen:Ft,empty:zt,colon:ba},tooltips:{addReceipt:Wm,viewReceipt:Um,viewReceipts:qm}},expenseAutomation:{transactions:ut},dateFormat:Km}=Ae.getLocalizedStrings(),At={containerPaddingLeftRight:new ae(x[3],x[4]),containerPaddingTopBottom:new ae(x[1],x[2]),containerPaddingTopBottomEmpty:new ae(x[2],x[3]),nameLogoWidth:new ae(x[2],x[4]),nameLogoHeight:new ae(x[2],x[4])},Jm=({transactionView:e,transaction:n,sectionId:l,vendorSearchAutoCompleteData:r,vendorSearchAutoCompleteActions:h,selectedTab:p,containerRef:a,listContainerRef:d,isCOTEnabled:c,cotTracking:m,onTransactionCategorizationRowClick:u,setCurrentTransactionInAction:g,vendorLoadOptions:f,openTooltipId:C,setOpenTooltipId:w,isUncategorizedExpenseCategoryEnabled:v,setActivityLogTransactionId:k,isTransactionActivityEnabled:y,authParams:R,onUploadTransactionReceipt:I})=>{const S=Te(),T=Rt(),[D,A]=i.useState(!1),[O,b]=i.useState(!1),{lineItemById:$,sortedLineItems:M}=n.transactionReviewLocalData,N=n.transactionReviewLocalData.tabSpecificLineItems?.[p]||[],G=M.filter(L=>N.indexOf(L)!==-1),z=[];G.forEach(L=>{z.push($[L])});const{accountList:V,accountsHierarchyList:de,classHierarchyList:_,classList:H,uncategorizedAccounts:ie,transactions:he,selectedCheckBoxTransactionIds:xe}=e,ge=e.uploadReceiptStatusById,q=xe.includes(n.transactionId),K=mt(),Y={control:()=>({marginLeft:-2,backgroundColor:D?K.colors.background:K.colors.grey5}),valueContainer:()=>({justifyContent:"flex-start",paddingLeft:x[0]}),menu:()=>({width:"150%",background:K.colors.grey5}),singleValue:()=>({color:D||q?K.colors.primary:K.colors.hero,paddingLeft:x[2]}),input:L=>({...L,color:D||q?K.colors.primary:K.colors.hero,textAlign:"left",paddingLeft:x[2]}),menuPortal:L=>({...L,zIndex:10})},B={...Y,singleValue:L=>({...L,color:D||q?K.colors.primary:K.colors.hero}),menu:()=>({marginTop:x[1],marginLeft:-8}),input:L=>({...L,color:D||q?K.colors.primary:K.colors.hero,textAlign:"left"})},E=he.find(L=>L.id===n.transactionId),Z=(L,ne)=>{const{transactionType:ee}=ne.transactionReviewLocalData;let Q=L.target;for(;Q;){if(Q.classList.contains("select-value-container")||Q.classList.contains("item-value-container")||Q.classList.contains("grouped-single-select-field__value-container")||Q.classList.contains("auto-complete-grouped-creatable-single-custom-group-select-field__option")||Q.classList.contains("grouped-single-select-field__input")||Q.classList.contains("grouped-single-select-field__menu"))return;Q=Q.parentElement}ee!=null&&u(ne.transactionId,ee)},P=i.useRef(null),[X,J]=i.useState(void 0),[W,U]=i.useState("bottom");return i.useEffect(()=>{if(X===void 0)return;const L=d?.current?._outerRef??null,ne=()=>{const ee=P.current;if(ee==null||L==null)return;const Q=ee.getBoundingClientRect(),pe=L.getBoundingClientRect(),Ie=L.scrollTop+(Q.bottom-pe.top),j=L.scrollHeight-Ie;U(j>=288?"bottom":"top")};return ne(),window.addEventListener("resize",ne),L?.addEventListener("scroll",ne),()=>{window.removeEventListener("resize",ne),L?.removeEventListener("scroll",ne)}},[d,X]),t.jsxs(Ym,{onMouseEnter:T?void 0:()=>A(!0),onMouseLeave:T?void 0:()=>A(!1),children:[t.jsx(Qm,{className:"categorization-row-card",windowSize:S,isSelected:q,isQuickViewMode:T,isHovered:D,children:t.jsx(Xm,{children:z.map((L,ne)=>t.jsx(e1,{ref:X===ne?P:void 0,"data-testid":F("transaction-categorization-list-row",L.lineId),windowSize:S,isQuickViewMode:T,onClick:ee=>Z(ee,n),children:t.jsx(Gm,{isTransactionActivityEnabled:y,line:L,isHovered:D||q,isSelected:q,isQuickViewMode:T,lineIndex:ne,sectionId:l,transaction:n,currentTransaction:E,windowSize:S,accountsHierarchyList:de,classHierarchyList:_,allAccountList:V,allClassList:H,uncategorizedAccounts:ie,vendorSearchAutoCompleteData:r,vendorSearchAutoCompleteActions:h,setCurrentTransactionInAction:g,vendorLoadOptions:f,customStyle:Y,customStyleAutoComplete:B,recommendations:L.recommendationsWithCOT,selectedTab:p,isCOTEnabled:c,menuPlacement:W,cotTracking:m,openTooltipId:C,setOpenTooltipId:w,isUncategorizedExpenseCategoryEnabled:v,authParams:R,uploadReceiptStatus:ge?.[n.transactionId],onUploadTransactionReceipt:I,onDropdownClose:()=>J(void 0),onDropdownOpen:()=>J(ne)})},`${n.transactionId}.${L.lineId}`))},n.transactionId)},n.transactionId),y===!0&&!T&&t.jsx(w1,{className:"activity-log-icon",onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),onClick:L=>{L.stopPropagation(),k(n.transactionId)},children:t.jsx(Ce,{title:ut.header.activity,placement:"bottom",children:t.jsx(b1,{style:{color:O?K.colors.primary:K.colors.hero}})})})]})},Gm=({accountsHierarchyList:e,allAccountList:n,allClassList:l,classHierarchyList:r,customStyle:h,customStyleAutoComplete:p,line:a,lineIndex:d,transaction:c,currentTransaction:m,windowSize:u,uncategorizedAccounts:g,isHovered:f=!1,isSelected:C=!1,isQuickViewMode:w=!1,sectionId:v,recommendations:k,vendorSearchAutoCompleteData:y,selectedTab:R,isCOTEnabled:I,menuPlacement:S,cotTracking:T,openTooltipId:D,setCurrentTransactionInAction:A,vendorLoadOptions:O,setOpenTooltipId:b,isUncategorizedExpenseCategoryEnabled:$,isTransactionActivityEnabled:M,onDropdownClose:N,onDropdownOpen:G,authParams:z,uploadReceiptStatus:V,onUploadTransactionReceipt:de})=>{const{transactionDate:_,transactionType:H,transactionTypeName:ie,memo:he}=c.transactionReviewLocalData,{setValue:xe}=Qo(),ge=i.useCallback((te,ve)=>{T?.onCOTView!=null&&T.onCOTView(a.lineId,c.transactionId,te,ve)},[T,a.lineId,c.transactionId]),q=a.lineDescription,K=i.useMemo(()=>{if(q||he)return[{title:ut.description,description:q||Ft},{title:ut.header.memo,description:he||Ft}]},[he,q]),Y=Bt(v,pt,d.toString()),B=Bt(v,De,d.toString()),E=Bt(v,et,d.toString()),Z=(te,ve)=>{if(w)return;let ke;switch(ve){case"vendor":ke=Y;break;case"category":ke=B;break;case"class":ke=E;break;default:return}xe(`${ke}.selectedOption`,te,{shouldValidate:!0,shouldDirty:!0})},P=mt(),X=i.useMemo(()=>m!=null&&Qt(m)===!0?{id:c.transactionReviewLocalData.customer?.id??"",logo:c.transactionReviewLocalData.customer?.logo,name:c.transactionReviewLocalData.customer?.name??""}:{id:a.customer?.id??"",logo:a.customer?.logo,name:a.customer?.name??""},[m,a.customer?.id,a.customer?.logo,a.customer?.name,c.transactionReviewLocalData.customer?.id,c.transactionReviewLocalData.customer?.logo,c.transactionReviewLocalData.customer?.name]),J=i.useMemo(()=>m!=null&&Qt(m)===!0?{id:c.transactionReviewLocalData.vendor?.id??"",logo:c.transactionReviewLocalData.vendor?.logo,name:c.transactionReviewLocalData.vendor?.name??""}:{id:a.vendor?.id??"",logo:a.vendor?.logo,name:a.vendor?.name??""},[m,a.vendor?.id,a.vendor?.logo,a.vendor?.name,c.transactionReviewLocalData.vendor?.id,c.transactionReviewLocalData.vendor?.logo,c.transactionReviewLocalData.vendor?.name]),W=a[et]?.classId,U=a[De]?.qboId??a[De]?.accountId,L=X?.id,ne=J?.id,ee=J?.name,[Q,pe]=i.useState(!W),[Ie,j]=i.useState(!U||a[De]?.qboId!=null&&Sn(g,a[De].qboId,$===!0?["income"]:void 0)===!0),[se,je]=i.useState(!ne||!L),Ne=te=>k?.find(ve=>ve.vendor?.qboId===te||ve.vendor?.id===te||ve.vendor?.name===te)?.vendor?.reason??"",Ee=c.transactionReviewLocalData.lineItemById[a.lineId]?.recommendationsWithCOT||[],Oe=is(e,Ee),we=os(r,Ee),at=te=>n.filter(ve=>ve.qboId===te)[0]?.qboId,st=te=>l.filter(ve=>ve.classId===te)[0]?.accountingClassNumber??void 0,qe=i.useCallback(te=>Sn(g,te,$===!0?["income"]:void 0),[g,$]),[me,Me]=i.useState(!1),[Ot,gt]=i.useState(!1),[Ut,xt]=i.useState(!1),[$e,re]=i.useState(0),[Le,le]=i.useState(null),[_e,dt]=i.useState([]),[vt,He]=i.useState(void 0),rn=i.useRef(null),[ln,Mt]=i.useState(0),[qt,Kt]=i.useState(0),cn=al()?.url,[Rn,yn]=i.useState(!1),Zs=(te,ve)=>{A({transactionId:c.transactionId,lineItemId:a.lineId}),O(te,ve)},pi=()=>{je(!(ne||L)),Me(!1),N?.()},mi=()=>{U&&a[De]?.qboId!=null&&Sn(g,a[De].qboId,$===!0?["income"]:void 0)===!1?j(!1):j(!0),yn(!1),N?.()},gi=()=>{pe(!W),gt(!1),N?.()},Qs=()=>{w||(ne||L)&&(Me(!0),G?.())},Xs=()=>{w||(gt(!0),G?.())},er=()=>{w||(yn(!0),G?.())};i.useEffect(()=>{U&&a[De]?.qboId!=null&&Sn(g,a[De].qboId,$===!0?["income"]:void 0)===!1?j(!1):j(!0)},[U]),i.useEffect(()=>{pe(!W)},[W]),i.useEffect(()=>{je(!(ne||L))},[ne,L]);const tr=c.transactionReviewLocalData.selectedEntity,nr=c.transactionReviewLocalData.lineItemById[a.lineId].selectedEntityLine,Ke=m!=null&&Qt(m)===!0?tr:nr,Dn=i.useMemo(()=>{const te=c.transactionReviewLocalData.lineItemById[a.lineId]?.recommendationsWithCOT||[],ve=y.entityAutoCompleteView;return{selectedOption:Ke?.qboId??Ke?.id,defaultOptions:Go(ve,Ke,te??[])}},[Ke,c.transactionReviewLocalData.lineItemById,a.lineId,y.entityAutoCompleteView]),or=()=>Ke!=null&&Ke.logo!=null?t.jsx(es,{photoUrl:Ke.logo.toString(),styles:{width:At.nameLogoWidth.valuePx(u),height:At.nameLogoHeight.valuePx(u)},fallbackAvatar:t.jsx(ja,{children:t.jsx(In,{name:Ke.name,size:o.sp4})})}):Ke!=null&&Ke.name!=null?t.jsx(ja,{children:t.jsx(In,{name:Ke.name,size:o.sp4})}):null,xi=(te,ve)=>{if(ve==null||!ve)return;let ke=[];return te.forEach(jt=>{ke=ke.concat(jt.options)}),ke.find(jt=>jt.value===ve)?.label??ve},fi=xi(we,W),yi=xi(Oe,U),St=R==="review",Ci=lo("vendor",Dn.defaultOptions,Dn.selectedOption),wi=lo("category",Oe,U),bi=lo("class",we,W),ir=te=>{const ve=w?hi:ui(te);return ve.map((ke,jt)=>{const lt=`${c.transactionId}_${ke.key}_${a.lineId}`;if(d>0&&m!=null&&Qt(m)===!0&&ke.key==="vendor")return t.jsx(nt,{windowSize:u,wrapperWidth:ke.width,isQuickViewMode:w},lt);if(d>0&&(ke.key==="transaction_type"||ke.key==="payment_account"||ke.key==="memo_and_receipt"))return t.jsx(nt,{windowSize:u,wrapperWidth:ke.width,isQuickViewMode:w},lt);switch(ke.key){case"activity":return t.jsx(Js,{},lt);case"vendor":default:return t.jsxs(nt,{windowSize:u,wrapperWidth:ke.width,isQuickViewMode:w,className:"item-value-container",children:[!w&&t.jsx(So,{isCOTEnabled:I,recommendations:Ee,type:"vendor",isFirstColumn:!0,isEnabled:!!Ke?.isPreFilled,isMisCategorized:Ci,onRecommendationClick:Z,selectedValue:ne,selectedValueLabel:ee,isReviewTab:St,isAccountOptionDisabled:qe,existingOption:{label:m!=null&&Qt(m)===!0?m?.vendor?.name:void 0,value:m!=null&&Qt(m)===!0?m?.vendor?.id:void 0},cotTracking:T,lineId:a.lineId,transactionId:c.transactionId,openTooltipId:D,setOpenTooltipId:b}),t.jsx(Lo,{children:se===!0?t.jsx(Io,{isHovered:f,isQuickViewMode:w,children:t.jsxs(ko,{onClick:Be=>{Be.stopPropagation(),!w&&(G?.(),je(!1),Me(!0))},"data-testid":F("add-vendor-button",v),style:{display:"inline-flex",alignItems:"center",color:tt.brandColorGoldDark,cursor:"pointer",height:o.sp6},children:[t.jsx(Kn,{}),ut.addPayee]})}):me===!0?t.jsx($t,{onClickAway:pi,children:t.jsx(f1,{"data-testid":F("vendor-selection-dropdown-container",Bt(v,pt,d.toString())),children:t.jsx(ul,{name:Y,placeholder:ut.addPayee,valueToInfo:Ne,defaultValue:{selectedOption:Dn.selectedOption,defaultOptions:Dn.defaultOptions},type:"vendor",autoFocus:!se,style:{width:"100%"},pageSource:"list_page",transactionStatus:St?"pending_review":"auto_categorized",isOptionRemovable:!1,customStyleConfig:p,menuIsOpen:me,onMenuClose:pi,registerOptions:{required:!1},loadOptions:Zs,showCOT:I,onCOTView:ge,menuPlacement:S})})}):t.jsx(C1,{children:t.jsxs($o,{isHovered:f,isQuickViewMode:w,showOutline:!w&&Ci&&Ke?.isPreFilled!==!0&&!C&&St,children:[or(),t.jsx(x1,{onClick:Qs,"data-testid":F("vendor-name-text",v),children:Ke!=null&&Ke.name?t.jsx(it,{text:Ke.name,itemTextStyle:{color:f?P.colors.primary:P.colors.hero}}):t.jsx(y1,{children:Ft})})]})})})]},lt);case"category":{const Be=m?.lines!=null?m?.lines[d]:void 0;return t.jsxs(nt,{windowSize:u,wrapperWidth:ke.width,className:"item-value-container",children:[t.jsx(So,{isCOTEnabled:I,recommendations:Ee,type:"category",isFirstColumn:!1,isReviewTab:St,isEnabled:!!a[De]?.isPreFilled,isAccountOptionDisabled:qe,isMisCategorized:wi,onRecommendationClick:Z,selectedValue:U,selectedValueLabel:yi,existingOption:{label:Be?.account?.accountName,value:Be?.account?.qboId??Be?.account?.accountId},cotTracking:T,lineId:a.lineId,transactionId:c.transactionId,openTooltipId:D,setOpenTooltipId:b}),t.jsx(Lo,{children:Ie===!0?t.jsx(Io,{isHovered:f,children:t.jsxs(ko,{onClick:Qe=>{Qe.stopPropagation(),!w&&(G?.(),j(!1),yn(!0))},"data-testid":F("category-selection-field",B),style:{display:"inline-flex",alignItems:"center",color:tt.brandColorGoldDark,cursor:"pointer",height:o.sp6},children:[t.jsx(Kn,{}),ut.addCategory]})}):Rn===!0?t.jsx($t,{onClickAway:mi,children:t.jsx(ka,{isHovered:f,"data-testid":F("category-selection-dropdown-container",B),children:t.jsx(Ei,{name:B,placeholder:ut.addCategory,valueToId:Qe=>at(Qe),type:"category",pageSource:"list_page",transactionStatus:St?"pending_review":"auto_categorized",showCOT:I,defaultValue:{selectedOption:U,allOptions:Oe},style:{display:"flex",flexGrow:1,width:"100%",cursor:"inherit"},registerOptions:{required:!1},menuIsOpen:Rn,autoFocus:!Ie&&(!U||a[De]?.qboId!=null&&[g.expense?.qboId,g.income?.qboId].includes(a[De].qboId)),onMenuClose:mi,customStyleConfig:h,disableCurrentOption:qe,menuPlacement:S,onCOTView:ge})})}):t.jsx($o,{isHovered:f,showOutline:wi&&a[De]?.isPreFilled!==!0&&!C&&St,children:t.jsx(Ia,{onClick:er,"data-testid":F("category-label-text",B),children:t.jsx(it,{text:yi??"",itemTextStyle:{color:f?P.colors.primary:P.colors.hero}})})})})]},lt)}case"class":{const Be=m?.lines!=null?m?.lines[d]:void 0;return t.jsxs(nt,{windowSize:u,wrapperWidth:ke.width,className:"item-value-container",children:[t.jsx(So,{isCOTEnabled:I,recommendations:Ee,type:"class",isFirstColumn:!1,isReviewTab:St,isEnabled:!!a[et]?.isPreFilled,isAccountOptionDisabled:qe,isMisCategorized:bi,onRecommendationClick:Z,selectedValue:W,selectedValueLabel:fi,existingOption:{label:Be?.class?.className,value:Be?.class?.classId},cotTracking:T,lineId:a.lineId,transactionId:c.transactionId,openTooltipId:D,setOpenTooltipId:b}),t.jsx(Lo,{children:Q===!0?t.jsx(Io,{isHovered:f,children:t.jsxs(ko,{onClick:Qe=>{Qe.stopPropagation(),!w&&(G?.(),pe(!1),gt(!0))},"data-testid":F("class-selection-field",E),style:{display:"inline-flex",alignItems:"center",color:tt.brandColorGoldDark,cursor:"pointer",height:o.sp6},children:[t.jsx(Kn,{}),ut.addClass]})}):Ot===!0?t.jsx($t,{onClickAway:gi,children:t.jsx(ka,{isHovered:f,"data-testid":F("class-selection-dropdown-container",E),children:t.jsx(Ei,{name:E,placeholder:ut.addClass,valueToId:Qe=>st(Qe),type:"class",showCOT:I,defaultValue:{selectedOption:W,allOptions:we},pageSource:"list_page",transactionStatus:St?"pending_review":"auto_categorized",menuIsOpen:Ot,registerOptions:{required:!1},style:{width:"100%"},autoFocus:!Q&&!W,customStyleConfig:h,onMenuClose:gi,menuPlacement:S,onCOTView:ge})})}):t.jsx($o,{isHovered:f,showOutline:bi&&a[et]?.isPreFilled!==!0&&!C&&St,children:t.jsx(Ia,{"data-testid":F("class-selection-field",E),onClick:Xs,children:t.jsx(it,{text:fi??"",itemTextStyle:{color:f?P.colors.primary:P.colors.hero}})})})})]},lt)}case"date":return t.jsx(nt,{windowSize:u,wrapperWidth:ke.width,children:t.jsx(nn,{windowSize:u,isLastItem:jt===ve.length-1,children:t.jsx(Uo,{"data-testid":F("date-field",Bt(v,et,d.toString())),children:t.jsx(jo,{style:{color:f?P.colors.primary:P.colors.hero},children:_!=null?_.format(Km.visual.MMMDCommaYYYYformat):null})})})},lt);case"transaction_type":return t.jsx(nt,{windowSize:u,wrapperWidth:ke.width,children:t.jsx(nn,{windowSize:u,"data-testid":F("transaction-type-field",Bt(v,et,d.toString())),isLastItem:jt===ve.length-1,children:ie!=null?t.jsx(cl,{textColor:f?new Zo(P.colors.primary):dl(void 0,P),text:ie??H}):null})},lt);case"amount":{const Be=Ze("0,0.[00]",a.amount,!0);return t.jsx(nt,{windowSize:u,style:{marginRight:te&&!w?x[0]:x[4]},wrapperWidth:ke.width,isQuickViewMode:w,children:t.jsx(nn,{windowSize:u,isLastItem:jt===ve.length-1,style:{justifyContent:"flex-end"},children:t.jsx(Uo,{"data-testid":F("transaction-amount-field",Bt(v,et,d.toString())),style:{color:f?P.colors.primary:P.colors.hero},children:Be})})},lt)}case"payment_account":{if(!(H==="expense"||H==="check"||H==="bill_payment"||H==="vendor_credit"||H==="credit_card_credit"||H==="deposit"||H==="sales_receipt"||H==="refund"||H==="payment"))return t.jsx(nt,{windowSize:u,wrapperWidth:ke.width,children:t.jsx(nn,{windowSize:u,isLastItem:jt===ve.length-1,children:t.jsx(jo,{style:{textAlign:"center",width:"100%"},children:Ft})})},lt);const Be=m?.account?.accountName,Qe=m?.paymentType,Cn=m?.paymentTypeName,On=Qe==="credit_card"?o1:Qe==="cash"?i1:Qe==="check"?s1:Qe==="ach"?k1:a1,ct={title:zt,items:[{text:ut.paymentAccountTooltip.accountLabel+ba,amount:Be??Ft},...Cn!=null?[{text:ut.paymentAccountTooltip.methodLabel+ba,amount:Cn}]:[]]};return t.jsx(nt,{windowSize:u,wrapperWidth:ke.width,children:t.jsx(nn,{windowSize:u,isLastItem:jt===ve.length-1,children:t.jsx(Ce,{display:"flex",placement:"bottom",variant:"list-description",data:ct,title:Be??Ft,enterDelay:600,style:{overflow:"hidden",minWidth:0},children:t.jsxs(n1,{style:{color:f?P.colors.primary:P.colors.hero},children:[On!=null&&t.jsx(On,{style:{color:f?P.colors.primary:P.colors.hero}}),t.jsx(jo,{style:{color:"inherit",whiteSpace:"pre-wrap"},children:Be??Ft})]})})})},lt)}case"memo_and_receipt":{const Be=m?.attachments??[],Qe=V?.fetchState==="In-Progress",Cn=ct=>{if(ct.stopPropagation(),Be.length===0||m==null)return;if(cn==null){console.warn("webV2MicroServiceEndpoint is not available, cannot fetch attachments.");return}He(Be[0]),re(0),xt(!0);const wn=Be.map(Jt=>Jt.id),Mn=`${cn}/transaction_attachments`;gl(Mn,z,{transaction_key:{transaction_id:m.id,transaction_type:m.type},attachment_ids:wn}).then(Jt=>{dt(Jt),Jt.length>0&&le(Jt[0])})},On=ct=>{ct.stopPropagation(),rn.current?.click()};return t.jsx(nt,{windowSize:u,wrapperWidth:ke.width,"data-testid":F("memo-field",Bt(v,et,d.toString())),children:t.jsxs(v1,{onClick:ct=>ct.stopPropagation(),children:[K!=null?t.jsx(Ce,{display:"flex",placement:"bottom",data:K,variant:"multi-information-points",style:{maxHeight:"min(60vh, 360px)",overflowY:"auto",overflowX:"hidden"},children:t.jsx(l1,{style:{color:f?P.colors.primary:P.colors.hero}})}):t.jsx(r1,{style:{margin:0},children:Ft}),Qe?t.jsx(Jo,{size:"Small",style:{display:"flex"},start:!0}):Be.length===0?t.jsx(Ce,{display:"flex",placement:"bottom",title:Wm,enterDelay:600,children:t.jsx(Kn,{style:{margin:0},onClick:ct=>{ct.stopPropagation(),On(ct)}})}):Be.length===1?t.jsx(Ce,{display:"flex",placement:"bottom",title:Um,enterDelay:600,children:t.jsx(S1,{style:{color:f?P.colors.primary:P.colors.hero},onClick:Cn})}):t.jsx(Ce,{display:"flex",placement:"bottom",title:qm,enterDelay:600,children:t.jsx(j1,{style:{color:f?P.colors.primary:P.colors.hero},onClick:Cn})}),t.jsx(Ko,{name:`transaction-receipt-${c.transactionId}`,fileRef:rn,sizeLimit:Gn,multiple:!0,acceptableTypes:[...ds],onFileChange:ct=>{const wn=ct.target.files;if(wn!=null&&wn.length>0){const Mn=Array.from(wn);de(R,c.transactionId,H??zt,Mn,Mn.map(Jt=>Jt.name))}},onFileSizeError:()=>{}})]})},lt)}}})},rt=m?.attachments??[],so=vt??rt[0];return t.jsxs(t.Fragment,{children:[ir(M),Ut&&rt.length>0&&so!=null?Wl.createPortal(t.jsx(sl,{allFiles:_e,fileSource:Le,file:so,title:so.fileName,attachments:rt,showNavigation:!1,setFileSource:le,setShowFullScreenView:xt,onCrossClick:()=>{xt(!1),le(null),dt([]),He(void 0),re(0)},onNextClick:()=>{const te=($e+1)%rt.length;re(te),He(rt[te]),_e[te]!=null&&le(_e[te])},onPreviousClick:()=>{const te=($e-1+rt.length)%rt.length;re(te),He(rt[te]),_e[te]!=null&&le(_e[te])},setSelectedFileAttachment:te=>{He(typeof te=="function"?ve=>te(ve??rt[0]):te)},handleTouchStart:te=>Mt(te.targetTouches[0].clientX),handleTouchMove:te=>Kt(te.targetTouches[0].clientX),handleTouchEnd:()=>{if(ln-qt>50&&qt!==0&&$e<rt.length-1){const te=$e+1;re(te),He(rt[te]),_e[te]!=null&&le(_e[te]),Mt(0),Kt(0)}else if(ln-qt<-50&&qt!==0&&$e>0){const te=$e-1;re(te),He(rt[te]),_e[te]!=null&&le(_e[te]),Mt(0),Kt(0)}}}),document.body):null]})},va=({isEnabled:e,isReviewTab:n,isMisCategorized:l,hasRecommendations:r,isTooltipVisible:h=!1})=>e?n?h?t.jsx(u1,{}):t.jsx(c1,{}):h?t.jsx(d1,{}):t.jsx(h1,{className:"ai-icon-selected-plain"}):!e&&l||r?h?t.jsx(m1,{}):t.jsx(p1,{}):null,Sa=({isFirstColumn:e,children:n})=>t.jsx(Gs,{isFirstColumn:e,children:n}),So=({recommendations:e,isCOTEnabled:n,type:l,isReviewTab:r,selectedValueLabel:h,isFirstColumn:p,isEnabled:a=!1,isMisCategorized:d=!1,selectedValue:c,existingOption:m,cotTracking:u,lineId:g,openTooltipId:f,transactionId:C,isAccountOptionDisabled:w,onRecommendationClick:v,setOpenTooltipId:k})=>{const y=i.useMemo(()=>`${C}:${g}:${l}`,[C,g,l]),R=f===y,I=wl().analytics,{createAlternateRecommendationCallback:S}=bl(),T=i.useCallback(N=>{const G=e[1],z=e[0];S(l,{currentValue:h??zt,transactionCurrentStatus:r?"pending_review":"auto_categorized",transactionPage:"list_page",cotTracking:u?{transactionId:C,lineId:g,onCOTView:(V,de,_,H)=>{u.onCOTView?.(V,de,_,H)}}:void 0},G,z)(N)},[S,e,h,r,l,u,g,C]),D=vl(e,l,n,m,"list_page",r?"pending_review":"auto_categorized",v,T,c,w),A=Sl(e,l),O=i.useCallback(()=>{k(y);const N=D?.recommendations[0]?.cot??[],G=D?.recommendations[1]?.cot??[],z=G.length>0;if(I.trackTransactionCotView({recommendationFor:l,currentValue:h??zt,recommendation:D?.recommendations[0]?.name??zt,recommendationCot:N,isRecommendationCotAvailable:N.length>0,recommendationReason:D?.recommendations[0]?.reason??zt,recommendationConfidencePercentage:D?.recommendations[0]?.confidencePercentage??null,recommendationConfidenceLevel:ki(Ii(D?.recommendations[0]?.confidencePercentage).toLocaleLowerCase()),alternativeRecommendation:D?.recommendations[1]?.name??zt,alternativeRecommendationCot:G,isAlternativeRecommendationCotAvailable:z,alternativeRecommendationReason:D?.recommendations[1]?.reason??zt,alternativeRecommendationConfidencePercentage:D?.recommendations[1]?.confidencePercentage??null,alternativeRecommendationConfidenceLevel:z?ki(Ii(D?.recommendations[1]?.confidencePercentage).toLocaleLowerCase()):null,transactionCurrentStatus:r?"pending_review":"auto_categorized",transactionPage:"list_page"}),u?.onCOTView!=null){const V=jl(D);V!=null&&u.onCOTView(g,C,l,V)}},[I,D,r,h,l,g,C,y,k]),b=i.useCallback(()=>{f===y&&k(void 0)},[f,y,k]),$=i.useMemo(()=>!c||!A?!1:e.some(N=>l==="vendor"&&N.vendor!=null?N.vendor.id===c||N.vendor.qboId===c:l==="category"&&N.account!=null?N.account.qboId===c||N.account.accountId===c:l==="class"&&N.class!=null?N.class.classId===c:!1),[c,A,e,l]);if(!A)return t.jsx(Gs,{isFirstColumn:p});const M=a||$;return D?t.jsx(Sa,{isFirstColumn:p,children:t.jsx(Ce,{variant:"chain-of-thought",data:D,placement:"bottom-start",disableIntersectionObserver:!0,position:"static",display:"block",open:R,style:{width:"auto",height:"auto"},leaveDelay:200,onOpen:O,onClose:b,children:t.jsx(g1,{children:t.jsx(va,{isEnabled:M,isReviewTab:r,isMisCategorized:d,hasRecommendations:A,isTooltipVisible:R})})})}):t.jsx(Sa,{isFirstColumn:p,children:t.jsx(va,{isEnabled:M,isReviewTab:r,isMisCategorized:d,hasRecommendations:A,isTooltipVisible:R})})},Ks=({isTransactionActivityEnabled:e})=>{const n=Te(),l=Rt(),r=l?hi:ui(e);return t.jsx(Zm,{windowSize:n,isQuickViewMode:l,isTransactionActivityEnabled:e,children:r.map((h,p)=>{const a=`${p}${Hm}${h.key}`;switch(h.key){case"activity":return t.jsx(Js,{},a);case"vendor":return t.jsx(nt,{windowSize:n,wrapperWidth:h.width,isQuickViewMode:l,style:l?{paddingLeft:o.sp0}:{paddingLeft:o.sp3},children:t.jsx(nn,{windowSize:n,isLastItem:p===r.length-1,children:t.jsxs(Uo,{children:[t.jsx(Xo,{width:x[4],height:x[4]}),t.jsx(Ht,{width:"100%",height:x[4],style:{display:"flex",alignItems:"center"}})]})})},a);default:{const d=p===r.length-1;return t.jsx(nt,{windowSize:n,wrapperWidth:h.width,isQuickViewMode:l,style:{marginRight:d&&l?x[4]:void 0},children:t.jsx(nn,{windowSize:n,isLastItem:d,children:t.jsx(Ht,{width:"100%",height:x[4],style:{display:"flex",alignItems:"center"}})})},a)}}})})},Js=s.div`
|
|
1252
|
+
`,vo="expenseAutomationTransactionsPage",on="transactionCategorizationListTable",De="account",et="class",pt="lineEntitySelection",_m="lineEntity",Bm="recommendations",Us="lineInfo",Fm="vendorDetails",Pm="customerDetails",Xn="selectedTransactionIds",Bt=(e,n,l)=>`${e}.${l}.${n}`,zm=e=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M4.85022 13.5836L5.52057 12.9133C5.63229 12.8016 5.77164 12.7217 5.92438 12.6815C6.07712 12.6413 6.23779 12.6424 6.38999 12.6846C6.54218 12.7268 6.68046 12.8086 6.7907 12.9217C6.90094 13.0348 6.97919 13.1751 7.01747 13.3283L7.08174 13.5836L7.8119 13.0972C7.98361 12.9827 8.1897 12.9312 8.39508 12.9515C8.60046 12.9719 8.79245 13.0628 8.93837 13.2087L9.31326 13.5836H11.0985",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M17.4206 6H2.24629C2.12792 6 2.01441 6.04702 1.93071 6.13072C1.84701 6.21442 1.79999 6.32794 1.79999 6.4463V17.1576C1.79999 17.276 1.84701 17.3895 1.93071 17.4732C2.01441 17.5569 2.12792 17.6039 2.24629 17.6039H21.8837C22.0021 17.6039 22.1156 17.5569 22.1993 17.4732C22.283 17.3895 22.33 17.276 22.33 17.1576V6.4463C22.33 6.32794 22.283 6.21442 22.1993 6.13072C22.1156 6.04702 22.0021 6 21.8837 6H17.4206Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M16.0854 9.6521H19.6559V12.0656H16.0854V9.6521Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),qs=e=>i.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M0.929688 8.00813C0.929688 8.675 1.02283 9.32014 1.19683 9.93121M2.20132 3.98138C3.46937 2.17826 5.566 1 7.93783 1C11.8083 1 14.946 4.13765 14.946 8.00813C14.946 10.2186 13.9226 12.1901 12.3237 13.4745M2.01692 11.7591C2.35672 12.2943 2.7671 12.7804 3.23498 13.2041M4.80209 14.2773C5.39521 14.5746 6.03636 14.7901 6.7108 14.9092M8.65531 14.98C9.34096 14.9103 9.99736 14.7418 10.6101 14.4888",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M8 4.66602V7.93891L11.0228 10.9322",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M4.1813 4.23989L1.83594 4.24014V1.89453",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"})),Nm=e=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.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"}),i.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"}),i.createElement("path",{d:"M14.055 8.06982L5.80499 8.06982",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M10.305 12.5698L5.80499 12.5698",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Vm=e=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M20.25 19.5H6.75C6.55109 19.5 6.36032 19.421 6.21967 19.2803C6.07902 19.1397 6 18.9489 6 18.75V2.25C6 2.05109 6.07902 1.86032 6.21967 1.71967C6.36032 1.57902 6.55109 1.5 6.75 1.5H15.75L21 6.75V18.75C21 18.9489 20.921 19.1397 20.7803 19.2803C20.6397 19.421 20.4489 19.5 20.25 19.5Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M15.75 1.5V6.75H21",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M10.4941 11.2559H16.4941",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M10.4941 14.2559H16.4941",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M16.5 22.5H3V5.85315",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),{common:{strings:{underscore:Hm,hyphen:Ft,empty:zt,colon:ba},tooltips:{addReceipt:Wm,viewReceipt:Um,viewReceipts:qm}},expenseAutomation:{transactions:ut},dateFormat:Km}=Ae.getLocalizedStrings(),At={containerPaddingLeftRight:new ae(x[3],x[4]),containerPaddingTopBottom:new ae(x[1],x[2]),containerPaddingTopBottomEmpty:new ae(x[2],x[3]),nameLogoWidth:new ae(x[2],x[4]),nameLogoHeight:new ae(x[2],x[4])},Jm=({transactionView:e,transaction:n,sectionId:l,vendorSearchAutoCompleteData:r,vendorSearchAutoCompleteActions:h,selectedTab:p,containerRef:a,listContainerRef:d,isCOTEnabled:c,cotTracking:m,onTransactionCategorizationRowClick:u,setCurrentTransactionInAction:g,vendorLoadOptions:f,openTooltipId:y,setOpenTooltipId:w,isUncategorizedExpenseCategoryEnabled:v,setActivityLogTransactionId:k,isTransactionActivityEnabled:C,authParams:R,onUploadTransactionReceipt:I})=>{const S=Te(),T=Rt(),[D,A]=i.useState(!1),[O,b]=i.useState(!1),{lineItemById:$,sortedLineItems:M}=n.transactionReviewLocalData,N=n.transactionReviewLocalData.tabSpecificLineItems?.[p]||[],G=M.filter(L=>N.indexOf(L)!==-1),z=[];G.forEach(L=>{z.push($[L])});const{accountList:V,accountsHierarchyList:de,classHierarchyList:_,classList:H,uncategorizedAccounts:ie,transactions:he,selectedCheckBoxTransactionIds:xe}=e,ge=e.uploadReceiptStatusById,q=xe.includes(n.transactionId),K=mt(),Y={control:()=>({marginLeft:-2,backgroundColor:D?K.colors.background:K.colors.grey5}),valueContainer:()=>({justifyContent:"flex-start",paddingLeft:x[0]}),menu:()=>({width:"150%",background:K.colors.grey5}),singleValue:()=>({color:D||q?K.colors.primary:K.colors.hero,paddingLeft:x[2]}),input:L=>({...L,color:D||q?K.colors.primary:K.colors.hero,textAlign:"left",paddingLeft:x[2]}),menuPortal:L=>({...L,zIndex:10})},B={...Y,singleValue:L=>({...L,color:D||q?K.colors.primary:K.colors.hero}),menu:()=>({marginTop:x[1],marginLeft:-8}),input:L=>({...L,color:D||q?K.colors.primary:K.colors.hero,textAlign:"left"})},E=he.find(L=>L.id===n.transactionId),Z=(L,ne)=>{const{transactionType:ee}=ne.transactionReviewLocalData;let Q=L.target;for(;Q;){if(Q.classList.contains("select-value-container")||Q.classList.contains("item-value-container")||Q.classList.contains("grouped-single-select-field__value-container")||Q.classList.contains("auto-complete-grouped-creatable-single-custom-group-select-field__option")||Q.classList.contains("grouped-single-select-field__input")||Q.classList.contains("grouped-single-select-field__menu"))return;Q=Q.parentElement}ee!=null&&u(ne.transactionId,ee)},P=i.useRef(null),[X,J]=i.useState(void 0),[W,U]=i.useState("bottom");return i.useEffect(()=>{if(X===void 0)return;const L=d?.current?._outerRef??null,ne=()=>{const ee=P.current;if(ee==null||L==null)return;const Q=ee.getBoundingClientRect(),pe=L.getBoundingClientRect(),Ie=L.scrollTop+(Q.bottom-pe.top),j=L.scrollHeight-Ie;U(j>=288?"bottom":"top")};return ne(),window.addEventListener("resize",ne),L?.addEventListener("scroll",ne),()=>{window.removeEventListener("resize",ne),L?.removeEventListener("scroll",ne)}},[d,X]),t.jsxs(Ym,{onMouseEnter:T?void 0:()=>A(!0),onMouseLeave:T?void 0:()=>A(!1),children:[t.jsx(Qm,{className:"categorization-row-card",windowSize:S,isSelected:q,isQuickViewMode:T,isHovered:D,children:t.jsx(Xm,{children:z.map((L,ne)=>t.jsx(e1,{ref:X===ne?P:void 0,"data-testid":F("transaction-categorization-list-row",L.lineId),windowSize:S,isQuickViewMode:T,onClick:ee=>Z(ee,n),children:t.jsx(Gm,{isTransactionActivityEnabled:C,line:L,isHovered:D||q,isSelected:q,isQuickViewMode:T,lineIndex:ne,sectionId:l,transaction:n,currentTransaction:E,windowSize:S,accountsHierarchyList:de,classHierarchyList:_,allAccountList:V,allClassList:H,uncategorizedAccounts:ie,vendorSearchAutoCompleteData:r,vendorSearchAutoCompleteActions:h,setCurrentTransactionInAction:g,vendorLoadOptions:f,customStyle:Y,customStyleAutoComplete:B,recommendations:L.recommendationsWithCOT,selectedTab:p,isCOTEnabled:c,menuPlacement:W,cotTracking:m,openTooltipId:y,setOpenTooltipId:w,isUncategorizedExpenseCategoryEnabled:v,authParams:R,uploadReceiptStatus:ge?.[n.transactionId],onUploadTransactionReceipt:I,onDropdownClose:()=>J(void 0),onDropdownOpen:()=>J(ne)})},`${n.transactionId}.${L.lineId}`))},n.transactionId)},n.transactionId),C===!0&&!T&&t.jsx(w1,{className:"activity-log-icon",onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),onClick:L=>{L.stopPropagation(),k(n.transactionId)},children:t.jsx(Ce,{title:ut.header.activity,placement:"bottom",children:t.jsx(b1,{style:{color:O?K.colors.primary:K.colors.hero}})})})]})},Gm=({accountsHierarchyList:e,allAccountList:n,allClassList:l,classHierarchyList:r,customStyle:h,customStyleAutoComplete:p,line:a,lineIndex:d,transaction:c,currentTransaction:m,windowSize:u,uncategorizedAccounts:g,isHovered:f=!1,isSelected:y=!1,isQuickViewMode:w=!1,sectionId:v,recommendations:k,vendorSearchAutoCompleteData:C,selectedTab:R,isCOTEnabled:I,menuPlacement:S,cotTracking:T,openTooltipId:D,setCurrentTransactionInAction:A,vendorLoadOptions:O,setOpenTooltipId:b,isUncategorizedExpenseCategoryEnabled:$,isTransactionActivityEnabled:M,onDropdownClose:N,onDropdownOpen:G,authParams:z,uploadReceiptStatus:V,onUploadTransactionReceipt:de})=>{const{transactionDate:_,transactionType:H,transactionTypeName:ie,memo:he}=c.transactionReviewLocalData,{setValue:xe}=Qo(),ge=i.useCallback((te,ve)=>{T?.onCOTView!=null&&T.onCOTView(a.lineId,c.transactionId,te,ve)},[T,a.lineId,c.transactionId]),q=a.lineDescription,K=i.useMemo(()=>{if(q||he)return[{title:ut.description,description:q||Ft},{title:ut.header.memo,description:he||Ft}]},[he,q]),Y=Bt(v,pt,d.toString()),B=Bt(v,De,d.toString()),E=Bt(v,et,d.toString()),Z=(te,ve)=>{if(w)return;let ke;switch(ve){case"vendor":ke=Y;break;case"category":ke=B;break;case"class":ke=E;break;default:return}xe(`${ke}.selectedOption`,te,{shouldValidate:!0,shouldDirty:!0})},P=mt(),X=i.useMemo(()=>m!=null&&Qt(m)===!0?{id:c.transactionReviewLocalData.customer?.id??"",logo:c.transactionReviewLocalData.customer?.logo,name:c.transactionReviewLocalData.customer?.name??""}:{id:a.customer?.id??"",logo:a.customer?.logo,name:a.customer?.name??""},[m,a.customer?.id,a.customer?.logo,a.customer?.name,c.transactionReviewLocalData.customer?.id,c.transactionReviewLocalData.customer?.logo,c.transactionReviewLocalData.customer?.name]),J=i.useMemo(()=>m!=null&&Qt(m)===!0?{id:c.transactionReviewLocalData.vendor?.id??"",logo:c.transactionReviewLocalData.vendor?.logo,name:c.transactionReviewLocalData.vendor?.name??""}:{id:a.vendor?.id??"",logo:a.vendor?.logo,name:a.vendor?.name??""},[m,a.vendor?.id,a.vendor?.logo,a.vendor?.name,c.transactionReviewLocalData.vendor?.id,c.transactionReviewLocalData.vendor?.logo,c.transactionReviewLocalData.vendor?.name]),W=a[et]?.classId,U=a[De]?.qboId??a[De]?.accountId,L=X?.id,ne=J?.id,ee=J?.name,[Q,pe]=i.useState(!W),[Ie,j]=i.useState(!U||a[De]?.qboId!=null&&Sn(g,a[De].qboId,$===!0?["income"]:void 0)===!0),[se,je]=i.useState(!ne||!L),Ne=te=>k?.find(ve=>ve.vendor?.qboId===te||ve.vendor?.id===te||ve.vendor?.name===te)?.vendor?.reason??"",Ee=c.transactionReviewLocalData.lineItemById[a.lineId]?.recommendationsWithCOT||[],Oe=is(e,Ee),we=os(r,Ee),at=te=>n.filter(ve=>ve.qboId===te)[0]?.qboId,st=te=>l.filter(ve=>ve.classId===te)[0]?.accountingClassNumber??void 0,qe=i.useCallback(te=>Sn(g,te,$===!0?["income"]:void 0),[g,$]),[me,Me]=i.useState(!1),[Ot,gt]=i.useState(!1),[Ut,xt]=i.useState(!1),[$e,re]=i.useState(0),[Le,le]=i.useState(null),[_e,dt]=i.useState([]),[vt,He]=i.useState(void 0),rn=i.useRef(null),[ln,Mt]=i.useState(0),[qt,Kt]=i.useState(0),cn=al()?.url,[Rn,yn]=i.useState(!1),Zs=(te,ve)=>{A({transactionId:c.transactionId,lineItemId:a.lineId}),O(te,ve)},pi=()=>{je(!(ne||L)),Me(!1),N?.()},mi=()=>{U&&a[De]?.qboId!=null&&Sn(g,a[De].qboId,$===!0?["income"]:void 0)===!1?j(!1):j(!0),yn(!1),N?.()},gi=()=>{pe(!W),gt(!1),N?.()},Qs=()=>{w||(ne||L)&&(Me(!0),G?.())},Xs=()=>{w||(gt(!0),G?.())},er=()=>{w||(yn(!0),G?.())};i.useEffect(()=>{U&&a[De]?.qboId!=null&&Sn(g,a[De].qboId,$===!0?["income"]:void 0)===!1?j(!1):j(!0)},[U]),i.useEffect(()=>{pe(!W)},[W]),i.useEffect(()=>{je(!(ne||L))},[ne,L]);const tr=c.transactionReviewLocalData.selectedEntity,nr=c.transactionReviewLocalData.lineItemById[a.lineId].selectedEntityLine,Ke=m!=null&&Qt(m)===!0?tr:nr,Dn=i.useMemo(()=>{const te=c.transactionReviewLocalData.lineItemById[a.lineId]?.recommendationsWithCOT||[],ve=C.entityAutoCompleteView;return{selectedOption:Ke?.qboId??Ke?.id,defaultOptions:Go(ve,Ke,te??[])}},[Ke,c.transactionReviewLocalData.lineItemById,a.lineId,C.entityAutoCompleteView]),or=()=>Ke!=null&&Ke.logo!=null?t.jsx(es,{photoUrl:Ke.logo.toString(),styles:{width:At.nameLogoWidth.valuePx(u),height:At.nameLogoHeight.valuePx(u)},fallbackAvatar:t.jsx(ja,{children:t.jsx(In,{name:Ke.name,size:o.sp4})})}):Ke!=null&&Ke.name!=null?t.jsx(ja,{children:t.jsx(In,{name:Ke.name,size:o.sp4})}):null,xi=(te,ve)=>{if(ve==null||!ve)return;let ke=[];return te.forEach(jt=>{ke=ke.concat(jt.options)}),ke.find(jt=>jt.value===ve)?.label??ve},fi=xi(we,W),yi=xi(Oe,U),St=R==="review",Ci=lo("vendor",Dn.defaultOptions,Dn.selectedOption),wi=lo("category",Oe,U),bi=lo("class",we,W),ir=te=>{const ve=w?hi:ui(te);return ve.map((ke,jt)=>{const lt=`${c.transactionId}_${ke.key}_${a.lineId}`;if(d>0&&m!=null&&Qt(m)===!0&&ke.key==="vendor")return t.jsx(nt,{windowSize:u,wrapperWidth:ke.width,isQuickViewMode:w},lt);if(d>0&&(ke.key==="transaction_type"||ke.key==="payment_account"||ke.key==="memo_and_receipt"))return t.jsx(nt,{windowSize:u,wrapperWidth:ke.width,isQuickViewMode:w},lt);switch(ke.key){case"activity":return t.jsx(Js,{},lt);case"vendor":default:return t.jsxs(nt,{windowSize:u,wrapperWidth:ke.width,isQuickViewMode:w,className:"item-value-container",children:[!w&&t.jsx(So,{isCOTEnabled:I,recommendations:Ee,type:"vendor",isFirstColumn:!0,isEnabled:!!Ke?.isPreFilled,isMisCategorized:Ci,onRecommendationClick:Z,selectedValue:ne,selectedValueLabel:ee,isReviewTab:St,isAccountOptionDisabled:qe,existingOption:{label:m!=null&&Qt(m)===!0?m?.vendor?.name:void 0,value:m!=null&&Qt(m)===!0?m?.vendor?.id:void 0},cotTracking:T,lineId:a.lineId,transactionId:c.transactionId,openTooltipId:D,setOpenTooltipId:b}),t.jsx(Lo,{children:se===!0?t.jsx(Io,{isHovered:f,isQuickViewMode:w,children:t.jsxs(ko,{onClick:Be=>{Be.stopPropagation(),!w&&(G?.(),je(!1),Me(!0))},"data-testid":F("add-vendor-button",v),style:{display:"inline-flex",alignItems:"center",color:tt.brandColorGoldDark,cursor:"pointer",height:o.sp6},children:[t.jsx(Kn,{}),ut.addPayee]})}):me===!0?t.jsx($t,{onClickAway:pi,children:t.jsx(f1,{"data-testid":F("vendor-selection-dropdown-container",Bt(v,pt,d.toString())),children:t.jsx(ul,{name:Y,placeholder:ut.addPayee,valueToInfo:Ne,defaultValue:{selectedOption:Dn.selectedOption,defaultOptions:Dn.defaultOptions},type:"vendor",autoFocus:!se,style:{width:"100%"},pageSource:"list_page",transactionStatus:St?"pending_review":"auto_categorized",isOptionRemovable:!1,customStyleConfig:p,menuIsOpen:me,onMenuClose:pi,registerOptions:{required:!1},loadOptions:Zs,showCOT:I,onCOTView:ge,menuPlacement:S})})}):t.jsx(C1,{children:t.jsxs($o,{isHovered:f,isQuickViewMode:w,showOutline:!w&&Ci&&Ke?.isPreFilled!==!0&&!y&&St,children:[or(),t.jsx(x1,{onClick:Qs,"data-testid":F("vendor-name-text",v),children:Ke!=null&&Ke.name?t.jsx(it,{text:Ke.name,itemTextStyle:{color:f?P.colors.primary:P.colors.hero}}):t.jsx(y1,{children:Ft})})]})})})]},lt);case"category":{const Be=m?.lines!=null?m?.lines[d]:void 0;return t.jsxs(nt,{windowSize:u,wrapperWidth:ke.width,className:"item-value-container",children:[t.jsx(So,{isCOTEnabled:I,recommendations:Ee,type:"category",isFirstColumn:!1,isReviewTab:St,isEnabled:!!a[De]?.isPreFilled,isAccountOptionDisabled:qe,isMisCategorized:wi,onRecommendationClick:Z,selectedValue:U,selectedValueLabel:yi,existingOption:{label:Be?.account?.accountName,value:Be?.account?.qboId??Be?.account?.accountId},cotTracking:T,lineId:a.lineId,transactionId:c.transactionId,openTooltipId:D,setOpenTooltipId:b}),t.jsx(Lo,{children:Ie===!0?t.jsx(Io,{isHovered:f,children:t.jsxs(ko,{onClick:Qe=>{Qe.stopPropagation(),!w&&(G?.(),j(!1),yn(!0))},"data-testid":F("category-selection-field",B),style:{display:"inline-flex",alignItems:"center",color:tt.brandColorGoldDark,cursor:"pointer",height:o.sp6},children:[t.jsx(Kn,{}),ut.addCategory]})}):Rn===!0?t.jsx($t,{onClickAway:mi,children:t.jsx(ka,{isHovered:f,"data-testid":F("category-selection-dropdown-container",B),children:t.jsx(Ei,{name:B,placeholder:ut.addCategory,valueToId:Qe=>at(Qe),type:"category",pageSource:"list_page",transactionStatus:St?"pending_review":"auto_categorized",showCOT:I,defaultValue:{selectedOption:U,allOptions:Oe},style:{display:"flex",flexGrow:1,width:"100%",cursor:"inherit"},registerOptions:{required:!1},menuIsOpen:Rn,autoFocus:!Ie&&(!U||a[De]?.qboId!=null&&[g.expense?.qboId,g.income?.qboId].includes(a[De].qboId)),onMenuClose:mi,customStyleConfig:h,disableCurrentOption:qe,menuPlacement:S,onCOTView:ge})})}):t.jsx($o,{isHovered:f,showOutline:wi&&a[De]?.isPreFilled!==!0&&!y&&St,children:t.jsx(Ia,{onClick:er,"data-testid":F("category-label-text",B),children:t.jsx(it,{text:yi??"",itemTextStyle:{color:f?P.colors.primary:P.colors.hero}})})})})]},lt)}case"class":{const Be=m?.lines!=null?m?.lines[d]:void 0;return t.jsxs(nt,{windowSize:u,wrapperWidth:ke.width,className:"item-value-container",children:[t.jsx(So,{isCOTEnabled:I,recommendations:Ee,type:"class",isFirstColumn:!1,isReviewTab:St,isEnabled:!!a[et]?.isPreFilled,isAccountOptionDisabled:qe,isMisCategorized:bi,onRecommendationClick:Z,selectedValue:W,selectedValueLabel:fi,existingOption:{label:Be?.class?.className,value:Be?.class?.classId},cotTracking:T,lineId:a.lineId,transactionId:c.transactionId,openTooltipId:D,setOpenTooltipId:b}),t.jsx(Lo,{children:Q===!0?t.jsx(Io,{isHovered:f,children:t.jsxs(ko,{onClick:Qe=>{Qe.stopPropagation(),!w&&(G?.(),pe(!1),gt(!0))},"data-testid":F("class-selection-field",E),style:{display:"inline-flex",alignItems:"center",color:tt.brandColorGoldDark,cursor:"pointer",height:o.sp6},children:[t.jsx(Kn,{}),ut.addClass]})}):Ot===!0?t.jsx($t,{onClickAway:gi,children:t.jsx(ka,{isHovered:f,"data-testid":F("class-selection-dropdown-container",E),children:t.jsx(Ei,{name:E,placeholder:ut.addClass,valueToId:Qe=>st(Qe),type:"class",showCOT:I,defaultValue:{selectedOption:W,allOptions:we},pageSource:"list_page",transactionStatus:St?"pending_review":"auto_categorized",menuIsOpen:Ot,registerOptions:{required:!1},style:{width:"100%"},autoFocus:!Q&&!W,customStyleConfig:h,onMenuClose:gi,menuPlacement:S,onCOTView:ge})})}):t.jsx($o,{isHovered:f,showOutline:bi&&a[et]?.isPreFilled!==!0&&!y&&St,children:t.jsx(Ia,{"data-testid":F("class-selection-field",E),onClick:Xs,children:t.jsx(it,{text:fi??"",itemTextStyle:{color:f?P.colors.primary:P.colors.hero}})})})})]},lt)}case"date":return t.jsx(nt,{windowSize:u,wrapperWidth:ke.width,children:t.jsx(nn,{windowSize:u,isLastItem:jt===ve.length-1,children:t.jsx(Uo,{"data-testid":F("date-field",Bt(v,et,d.toString())),children:t.jsx(jo,{style:{color:f?P.colors.primary:P.colors.hero},children:_!=null?_.format(Km.visual.MMMDCommaYYYYformat):null})})})},lt);case"transaction_type":return t.jsx(nt,{windowSize:u,wrapperWidth:ke.width,children:t.jsx(nn,{windowSize:u,"data-testid":F("transaction-type-field",Bt(v,et,d.toString())),isLastItem:jt===ve.length-1,children:ie!=null?t.jsx(cl,{textColor:f?new Zo(P.colors.primary):dl(void 0,P),text:ie??H}):null})},lt);case"amount":{const Be=Ze("0,0.[00]",a.amount,!0);return t.jsx(nt,{windowSize:u,style:{marginRight:te&&!w?x[0]:x[4]},wrapperWidth:ke.width,isQuickViewMode:w,children:t.jsx(nn,{windowSize:u,isLastItem:jt===ve.length-1,style:{justifyContent:"flex-end"},children:t.jsx(Uo,{"data-testid":F("transaction-amount-field",Bt(v,et,d.toString())),style:{color:f?P.colors.primary:P.colors.hero},children:Be})})},lt)}case"payment_account":{if(!(H==="expense"||H==="check"||H==="bill_payment"||H==="vendor_credit"||H==="credit_card_credit"||H==="deposit"||H==="sales_receipt"||H==="refund"||H==="payment"))return t.jsx(nt,{windowSize:u,wrapperWidth:ke.width,children:t.jsx(nn,{windowSize:u,isLastItem:jt===ve.length-1,children:t.jsx(jo,{style:{textAlign:"center",width:"100%"},children:Ft})})},lt);const Be=m?.account?.accountName,Qe=m?.paymentType,Cn=m?.paymentTypeName,On=Qe==="credit_card"?o1:Qe==="cash"?i1:Qe==="check"?s1:Qe==="ach"?k1:a1,ct={title:zt,items:[{text:ut.paymentAccountTooltip.accountLabel+ba,amount:Be??Ft},...Cn!=null?[{text:ut.paymentAccountTooltip.methodLabel+ba,amount:Cn}]:[]]};return t.jsx(nt,{windowSize:u,wrapperWidth:ke.width,children:t.jsx(nn,{windowSize:u,isLastItem:jt===ve.length-1,children:t.jsx(Ce,{display:"flex",placement:"bottom",variant:"list-description",data:ct,title:Be??Ft,enterDelay:600,style:{overflow:"hidden",minWidth:0},children:t.jsxs(n1,{style:{color:f?P.colors.primary:P.colors.hero},children:[On!=null&&t.jsx(On,{style:{color:f?P.colors.primary:P.colors.hero}}),t.jsx(jo,{style:{color:"inherit",whiteSpace:"pre-wrap"},children:Be??Ft})]})})})},lt)}case"memo_and_receipt":{const Be=m?.attachments??[],Qe=V?.fetchState==="In-Progress",Cn=ct=>{if(ct.stopPropagation(),Be.length===0||m==null)return;if(cn==null){console.warn("webV2MicroServiceEndpoint is not available, cannot fetch attachments.");return}He(Be[0]),re(0),xt(!0);const wn=Be.map(Jt=>Jt.id),Mn=`${cn}/transaction_attachments`;gl(Mn,z,{transaction_key:{transaction_id:m.id,transaction_type:m.type},attachment_ids:wn}).then(Jt=>{dt(Jt),Jt.length>0&&le(Jt[0])})},On=ct=>{ct.stopPropagation(),rn.current?.click()};return t.jsx(nt,{windowSize:u,wrapperWidth:ke.width,"data-testid":F("memo-field",Bt(v,et,d.toString())),children:t.jsxs(v1,{onClick:ct=>ct.stopPropagation(),children:[K!=null?t.jsx(Ce,{display:"flex",placement:"bottom",data:K,variant:"multi-information-points",style:{maxHeight:"min(60vh, 360px)",overflowY:"auto",overflowX:"hidden"},children:t.jsx(l1,{style:{color:f?P.colors.primary:P.colors.hero}})}):t.jsx(r1,{style:{margin:0},children:Ft}),Qe?t.jsx(Jo,{size:"Small",style:{display:"flex"},start:!0}):Be.length===0?t.jsx(Ce,{display:"flex",placement:"bottom",title:Wm,enterDelay:600,children:t.jsx(Kn,{style:{margin:0},onClick:ct=>{ct.stopPropagation(),On(ct)}})}):Be.length===1?t.jsx(Ce,{display:"flex",placement:"bottom",title:Um,enterDelay:600,children:t.jsx(S1,{style:{color:f?P.colors.primary:P.colors.hero},onClick:Cn})}):t.jsx(Ce,{display:"flex",placement:"bottom",title:qm,enterDelay:600,children:t.jsx(j1,{style:{color:f?P.colors.primary:P.colors.hero},onClick:Cn})}),t.jsx(Ko,{name:`transaction-receipt-${c.transactionId}`,fileRef:rn,sizeLimit:Gn,multiple:!0,acceptableTypes:[...ds],onFileChange:ct=>{const wn=ct.target.files;if(wn!=null&&wn.length>0){const Mn=Array.from(wn);de(R,c.transactionId,H??zt,Mn,Mn.map(Jt=>Jt.name))}},onFileSizeError:()=>{}})]})},lt)}}})},rt=m?.attachments??[],so=vt??rt[0];return t.jsxs(t.Fragment,{children:[ir(M),Ut&&rt.length>0&&so!=null?Wl.createPortal(t.jsx(sl,{allFiles:_e,fileSource:Le,file:so,title:so.fileName,attachments:rt,showNavigation:!1,setFileSource:le,setShowFullScreenView:xt,onCrossClick:()=>{xt(!1),le(null),dt([]),He(void 0),re(0)},onNextClick:()=>{const te=($e+1)%rt.length;re(te),He(rt[te]),_e[te]!=null&&le(_e[te])},onPreviousClick:()=>{const te=($e-1+rt.length)%rt.length;re(te),He(rt[te]),_e[te]!=null&&le(_e[te])},setSelectedFileAttachment:te=>{He(typeof te=="function"?ve=>te(ve??rt[0]):te)},handleTouchStart:te=>Mt(te.targetTouches[0].clientX),handleTouchMove:te=>Kt(te.targetTouches[0].clientX),handleTouchEnd:()=>{if(ln-qt>50&&qt!==0&&$e<rt.length-1){const te=$e+1;re(te),He(rt[te]),_e[te]!=null&&le(_e[te]),Mt(0),Kt(0)}else if(ln-qt<-50&&qt!==0&&$e>0){const te=$e-1;re(te),He(rt[te]),_e[te]!=null&&le(_e[te]),Mt(0),Kt(0)}}}),document.body):null]})},va=({isEnabled:e,isReviewTab:n,isMisCategorized:l,hasRecommendations:r,isTooltipVisible:h=!1})=>e?n?h?t.jsx(u1,{}):t.jsx(c1,{}):h?t.jsx(d1,{}):t.jsx(h1,{className:"ai-icon-selected-plain"}):!e&&l||r?h?t.jsx(m1,{}):t.jsx(p1,{}):null,Sa=({isFirstColumn:e,children:n})=>t.jsx(Gs,{isFirstColumn:e,children:n}),So=({recommendations:e,isCOTEnabled:n,type:l,isReviewTab:r,selectedValueLabel:h,isFirstColumn:p,isEnabled:a=!1,isMisCategorized:d=!1,selectedValue:c,existingOption:m,cotTracking:u,lineId:g,openTooltipId:f,transactionId:y,isAccountOptionDisabled:w,onRecommendationClick:v,setOpenTooltipId:k})=>{const C=i.useMemo(()=>`${y}:${g}:${l}`,[y,g,l]),R=f===C,I=wl().analytics,{createAlternateRecommendationCallback:S}=bl(),T=i.useCallback(N=>{const G=e[1],z=e[0];S(l,{currentValue:h??zt,transactionCurrentStatus:r?"pending_review":"auto_categorized",transactionPage:"list_page",cotTracking:u?{transactionId:y,lineId:g,onCOTView:(V,de,_,H)=>{u.onCOTView?.(V,de,_,H)}}:void 0},G,z)(N)},[S,e,h,r,l,u,g,y]),D=vl(e,l,n,m,"list_page",r?"pending_review":"auto_categorized",v,T,c,w),A=Sl(e,l),O=i.useCallback(()=>{k(C);const N=D?.recommendations[0]?.cot??[],G=D?.recommendations[1]?.cot??[],z=G.length>0;if(I.trackTransactionCotView({recommendationFor:l,currentValue:h??zt,recommendation:D?.recommendations[0]?.name??zt,recommendationCot:N,isRecommendationCotAvailable:N.length>0,recommendationReason:D?.recommendations[0]?.reason??zt,recommendationConfidencePercentage:D?.recommendations[0]?.confidencePercentage??null,recommendationConfidenceLevel:ki(Ii(D?.recommendations[0]?.confidencePercentage).toLocaleLowerCase()),alternativeRecommendation:D?.recommendations[1]?.name??zt,alternativeRecommendationCot:G,isAlternativeRecommendationCotAvailable:z,alternativeRecommendationReason:D?.recommendations[1]?.reason??zt,alternativeRecommendationConfidencePercentage:D?.recommendations[1]?.confidencePercentage??null,alternativeRecommendationConfidenceLevel:z?ki(Ii(D?.recommendations[1]?.confidencePercentage).toLocaleLowerCase()):null,transactionCurrentStatus:r?"pending_review":"auto_categorized",transactionPage:"list_page"}),u?.onCOTView!=null){const V=jl(D);V!=null&&u.onCOTView(g,y,l,V)}},[I,D,r,h,l,g,y,C,k]),b=i.useCallback(()=>{f===C&&k(void 0)},[f,C,k]),$=i.useMemo(()=>!c||!A?!1:e.some(N=>l==="vendor"&&N.vendor!=null?N.vendor.id===c||N.vendor.qboId===c:l==="category"&&N.account!=null?N.account.qboId===c||N.account.accountId===c:l==="class"&&N.class!=null?N.class.classId===c:!1),[c,A,e,l]);if(!A)return t.jsx(Gs,{isFirstColumn:p});const M=a||$;return D?t.jsx(Sa,{isFirstColumn:p,children:t.jsx(Ce,{variant:"chain-of-thought",data:D,placement:"bottom-start",disableIntersectionObserver:!0,position:"static",display:"block",open:R,style:{width:"auto",height:"auto"},leaveDelay:200,onOpen:O,onClose:b,children:t.jsx(g1,{children:t.jsx(va,{isEnabled:M,isReviewTab:r,isMisCategorized:d,hasRecommendations:A,isTooltipVisible:R})})})}):t.jsx(Sa,{isFirstColumn:p,children:t.jsx(va,{isEnabled:M,isReviewTab:r,isMisCategorized:d,hasRecommendations:A,isTooltipVisible:R})})},Ks=({isTransactionActivityEnabled:e})=>{const n=Te(),l=Rt(),r=l?hi:ui(e);return t.jsx(Zm,{windowSize:n,isQuickViewMode:l,isTransactionActivityEnabled:e,children:r.map((h,p)=>{const a=`${p}${Hm}${h.key}`;switch(h.key){case"activity":return t.jsx(Js,{},a);case"vendor":return t.jsx(nt,{windowSize:n,wrapperWidth:h.width,isQuickViewMode:l,style:l?{paddingLeft:o.sp0}:{paddingLeft:o.sp3},children:t.jsx(nn,{windowSize:n,isLastItem:p===r.length-1,children:t.jsxs(Uo,{children:[t.jsx(Xo,{width:x[4],height:x[4]}),t.jsx(Ht,{width:"100%",height:x[4],style:{display:"flex",alignItems:"center"}})]})})},a);default:{const d=p===r.length-1;return t.jsx(nt,{windowSize:n,wrapperWidth:h.width,isQuickViewMode:l,style:{marginRight:d&&l?x[4]:void 0},children:t.jsx(nn,{windowSize:n,isLastItem:d,children:t.jsx(Ht,{width:"100%",height:x[4],style:{display:"flex",alignItems:"center"}})})},a)}}})})},Js=s.div`
|
|
1253
1253
|
width: ${o.sp0};
|
|
1254
1254
|
height: ${o.sp0};
|
|
1255
1255
|
`,Ym=s.div`
|
|
@@ -1562,7 +1562,7 @@ import{o,bW as ar,J as Te,gl as Ba,gm as Fa,V as t,cr as sr,bC as rr,aa as Ue,aS
|
|
|
1562
1562
|
min-height: 100%;
|
|
1563
1563
|
flex-direction: column;
|
|
1564
1564
|
row-gap: ${o.sp3};
|
|
1565
|
-
`,{common:T1,transactionDetail:{notCategorizedTooltipText:A1}}=Ae.getLocalizedStrings(),To={rowGap:new ae(x[0],x[2],x[3])},E1=({selectedTab:e,transactionView:n,authParams:l,sectionId:r,isCOTEnabled:h,isDisabled:p,vendorSearchAutoCompleteActions:a,isTransactionActivityEnabled:d,vendorSearchAutoCompleteData:c,setCurrentTransactionInAction:m,vendorLoadOptions:u,onTransactionCategorizationRowClick:g,onUpdateTransactionCategorizationUIState:f,onUpdateScrollYOffSetTransactionCategorizationUIState:
|
|
1565
|
+
`,{common:T1,transactionDetail:{notCategorizedTooltipText:A1}}=Ae.getLocalizedStrings(),To={rowGap:new ae(x[0],x[2],x[3])},E1=({selectedTab:e,transactionView:n,authParams:l,sectionId:r,isCOTEnabled:h,isDisabled:p,vendorSearchAutoCompleteActions:a,isTransactionActivityEnabled:d,vendorSearchAutoCompleteData:c,setCurrentTransactionInAction:m,vendorLoadOptions:u,onTransactionCategorizationRowClick:g,onUpdateTransactionCategorizationUIState:f,onUpdateScrollYOffSetTransactionCategorizationUIState:y,onFetchTransactionCategorizationList:w,containerRef:v,cotTracking:k,isUncategorizedExpenseCategoryEnabled:C,setActivityLogTransactionId:R,onUploadTransactionReceipt:I})=>{const S=Te(),T=Rt(),[D,A]=i.useState(void 0),{fetchState:O,uiState:b,transactionLocalData:$,selectedCheckBoxTransactionIds:M,transactionIdsWithUnsavedData:N,transactions:G,uncategorizedAccounts:z}=n;Tn({componentName:`expense_automation.transaction_categorization.${e}`,enabled:O==="Completed"});const V=i.useRef(null),de=i.useRef({}),{control:_}=Qo();i.useEffect(()=>{V.current?.resetAfterIndex(0,!0)},[S,V,$]),i.useEffect(()=>{V.current?.scrollTo(b.scrollPosition?.scrollTop??0)},[e]);const H=i.useCallback(L=>{if(de.current?.[L]!=null){const Q=S==="small"&&b.pageToken==null&&L===$.length-1?To.rowGap.value("medium-regular"):To.rowGap.value(S);return de.current[L]+Q}if($[L]==null)return 0;const ne=$[L].transactionReviewLocalData,ee=Object.keys(ne.lineItemById).length;return ee!=null&&!isNaN(ee)&&ee>1?Ca*ee+To.rowGap.value(S)*(ee-1):Ca},[$,S,b.pageToken,b.sortKey,b.sortOrder]),ie=i.useCallback((L,ne)=>{de.current={...de.current,[L]:ne},V.current?.resetAfterIndex(0,!0)},[S,V,$,b.sortKey,b.sortOrder]),he=i.useCallback(()=>{(b.pageToken!=null&&n.refreshStatus.fetchState!=="In-Progress"||n.refreshStatus.fetchState==="Completed")&&w(e,b.searchString,!0,b.pageToken,!0,!1)},[n.refreshStatus.fetchState,w,e,b.pageToken,b.searchString,b.sortKey,b.sortOrder]),xe=i.useCallback(()=>{b.pageToken!=null&&he()},[he,b.pageToken,b.sortKey,b.sortOrder]),ge=Gr(L=>y(e,{scrollPosition:{scrollTop:L}}),1e3,{trailing:!0}),q=L=>L<n.transactionLocalData.length,K=(L,ne)=>{f(e,{sortOrder:ne,sortKey:L}),w(e,b.searchString,!1,null,!1,!0)},Y=L=>{if(e==="autoCategorized")return!M.includes(L);const ne=$.find(Q=>Q.transactionId===L)?.transactionReviewLocalData,ee=G.find(Q=>Q.id===L);return ee!=null&&ne!=null?Fl(ee,ne,z,C)?C===!0&&Ti(z,ne.lineItemById,["expense"])?N.includes(L)===!1:!1:!0:M.length===0?!0:!M.includes(L)};let B=[],E=[];(O==="Completed"||n.transactionLocalData.length>0)&&(E=n.transactionLocalData.map((L,ne)=>{const ee=Y(L.transactionId);let Q=!1;C===!0&&ee===!0&&e==="review"&&Ti(z,L.transactionReviewLocalData.lineItemById,["expense"])&&(Q=!N.includes(L.transactionId));const pe=L.transactionReviewLocalData;return{label:t.jsx(Jm,{isTransactionActivityEnabled:d,transactionView:n,sectionId:`${r}.${ne}.${Us}`,transaction:L,authParams:l,onTransactionCategorizationRowClick:g,vendorLoadOptions:u,setCurrentTransactionInAction:m,vendorSearchAutoCompleteActions:a,vendorSearchAutoCompleteData:c,selectedTab:e,containerRef:v,listContainerRef:V,isCOTEnabled:h,cotTracking:k,openTooltipId:D,setOpenTooltipId:A,isUncategorizedExpenseCategoryEnabled:C,setActivityLogTransactionId:R,onUploadTransactionReceipt:I},`${L.transactionId}.${pe.transactionType}`),value:L.transactionId,defaultChecked:!1,groupLabel:!1,isException:Q,exceptionMode:Q===!0?"checked_or_hover":void 0,isSticky:!0,isDisabled:ee===!0?"readonly":void 0,exceptionType:Q===!0?"alert":void 0,exceptionInfo:Q===!0?A1:void 0,exceptionTooltipStyle:{textAlign:"center",maxWidth:"250px",padding:`12px ${o.sp2}`}}}),B=E.map(L=>L.value));const Z={label:"All",value:"allTransactionOptionId",defaultChecked:!1,groupLabel:!1},{title:P,subTitle:X}=Je("transaction_categorization").allDoneText,J=$.map(L=>L.transactionId),W=i.useMemo(()=>n.totalCountByTab[e],[e,n.totalCountByTab]),U=i.useMemo(()=>$.reduce((L,ne)=>{const ee=Object.keys(ne.transactionReviewLocalData.lineItemById).length;return L+(ee>0?ee:1)},0)<n.totalCountByTab[e]?$.length+1:$.length,[$,n.totalCountByTab,e]);return t.jsx(_1,{windowSize:S,"data-testid":F("transaction-categorization-list-wrapper"),children:t.jsx(B1,{windowSize:S,"data-testid":F("transaction-categorization-list-container"),children:O==="Error"?t.jsxs(P1,{windowSize:S,"data-testid":F("transaction-categorization-reload-page"),children:[t.jsx(z1,{onClick:()=>w(e,void 0,!0,null,!1,!0),"data-testid":F("transaction-categorization-reload-icon"),children:t.jsx(qo,{})}),t.jsx(N1,{"data-testid":F("transaction-categorization-reload-label"),children:T1.reloadPage.label})]}):O==="Completed"&&$.length===0?t.jsx(Tt,{tab:"transaction_categorization",title:P,subTitle:X,"data-testid":F("transaction-categorization-empty-table-section")}):O==="Not-Started"||O==="In-Progress"&&$.length===0?t.jsx(I1,{sortConfig:{sortKey:b.sortKey,sortOrder:b.sortOrder},fetchState:O,onColumnSortConfigChanged:K,"data-testid":F("transaction-categorization-list-empty-table"),isTransactionActivityEnabled:d}):t.jsx(F1,{windowSize:S,"data-testid":F("transaction-categorization-list-view"),children:t.jsx(Xa,{control:_,name:"selectedTransactionIds",defaultValue:[],render:({field:{value:L,ref:ne,onChange:ee}})=>t.jsx(Ys.Provider,{value:{value:L,mode:"off",allCheckBoxValues:B,index:0,isQuickViewMode:T,sortKey:b.sortKey,sortOrder:b.sortOrder,fetchState:O,isDisabled:p,groupLabelCheckBox:Z,isTransactionActivityEnabled:d,onColumnSortConfigChanged:K,ref:ne,onChange:ee,selectedTab:e},children:t.jsx(to,{children:({height:Q,width:pe})=>t.jsx(Yr,{isItemLoaded:q,itemCount:W,loadMoreItems:xe,children:({onItemsRendered:Ie,ref:j})=>t.jsx(no,{ref:se=>{j(se),V.current=se},height:Q,itemCount:U,itemKey:se=>`${$[se]?.transactionId??""}-row-${se}`,innerElementType:R1,onItemsRendered:Ie,width:pe,style:{willChange:"auto"},overscanCount:sm,itemSize:H,itemData:{checkboxes:E,value:L,allCheckBoxValues:B,groupLabelCheckBox:Z,categorizationGroupValue:J,transactionLocalData:$,isQuickViewMode:T,mode:"always_on",setRowHeight:ie,isItemLoaded:q,ref:j,onChange:ee,selectedCheckBoxTransactionIds:M,isTransactionActivityEnabled:d},initialScrollOffset:n.uiState.scrollPosition?.scrollTop,onScroll:({scrollOffset:se})=>{ge(se)},children:O1})})})})})})})})},R1=e=>{const{isQuickViewMode:n,value:l,allCheckBoxValues:r,groupLabelCheckBox:h,index:p,isDisabled:a,fetchState:d,sortKey:c,sortOrder:m,mode:u,isTransactionActivityEnabled:g,ref:f,onChange:y,onColumnSortConfigChanged:w}=D1(),v=mt(),{children:k,style:C,...R}=e;return d==="Completed"?t.jsxs(V1,{ref:f,style:{...C,width:"auto",maxWidth:"var(--side-panel-list-width, 100%)"},...R,children:[t.jsx(H1,{children:t.jsx(Fo,{selectionLimit:Ln,value:l,checkBoxContainerStyle:{width:"auto",backgroundColor:v.colors.grey4},checkBox:{label:t.jsx(M1,{isQuickViewMode:n,children:t.jsx(Ws,{isTransactionActivityEnabled:g,sortConfig:{sortKey:c,sortOrder:m},isDisabled:a,onColumnSortConfigChanged:w})}),value:"allTransactionOptionId",defaultChecked:!1,groupLabel:!1},isDisabled:"disabled",groupLabelCheckBox:h,allCheckBoxValues:r,mode:n?"off":u,draggable:!1,checkBoxStyle:n?{display:"none"}:{padding:20},labelCheckBoxStyle:{padding:o.sp3},name:"transactionCategorizationHeader",index:p,onChangeHandler:I=>as({event:I,value:l,allCheckBoxValues:r,groupLabelCheckBox:h,onChange:y}),ref:f})}),t.jsx(W1,{children:k})]},`${r[p]}-${p}`):null},Ys=i.createContext(void 0),D1=()=>{const e=i.useContext(Ys);if(!e)throw new Error("useStickyContext must be used within a StickyProvider");return e},O1=({index:e,style:n,data:l})=>{const{selectedTransactionId:r}=eo(),{checkboxes:h,value:p,groupLabelCheckBox:a,categorizationGroupValue:d,allCheckBoxValues:c,transactionLocalData:m,isQuickViewMode:u,isItemLoaded:g,setRowHeight:f,ref:y,onChange:w,selectedCheckBoxTransactionIds:v,isTransactionActivityEnabled:k}=l,C=i.useRef(null),R=Te();if(i.useEffect(()=>{C.current?.firstElementChild!=null&&f(e,C.current.firstElementChild.clientHeight)},[e,C,R,m[e]?.transactionReviewLocalData]),g(e)===!0){const I=h[e],S=r!=null&&r===d[e];return t.jsx($a,{isPanelSelected:S,isQuickViewMode:u,style:{...n,paddingBottom:o.sp0,width:"100%",flex:"1"},ref:C,children:t.jsx(Fo,{selectionLimit:Ln,checkBox:u===!0?{...I,isException:!1}:I,value:p,groupLabelCheckBox:a,allCheckBoxValues:c,mode:u===!0||I.isDisabled==="readonly"||v.includes(I.value)===!1&&v.length>=Ln?"off":"always_on",draggable:!1,isDisabled:I.isDisabled,checkBoxStyle:u===!0?{display:"none"}:{padding:20},labelCheckBoxStyle:{padding:o.sp3},infoIconContainerStyle:u===!0?{display:"none"}:{padding:20},name:`${on}.${p}`,ref:y,index:e,onChangeHandler:T=>as({event:T,value:p,allCheckBoxValues:c,groupLabelCheckBox:a,onChange:w})})},d[e])}else return t.jsx($a,{isQuickViewMode:u,style:{...n,paddingBottom:o.sp0,width:"100%",flex:"1"},ref:C,children:t.jsx(Fo,{checkBox:{label:t.jsx(Ks,{isTransactionActivityEnabled:k}),value:"loading",defaultChecked:!1,groupLabel:!1},value:p,groupLabelCheckBox:a,allCheckBoxValues:c,mode:"off",draggable:!1,checkBoxStyle:u===!0?{display:"none"}:{padding:20},labelCheckBoxStyle:{padding:o.sp3},infoIconContainerStyle:u===!0?{display:"none"}:{padding:20},name:"loading-placeholder",index:e,onChangeHandler:()=>{}})},qa())},M1=s.div`
|
|
1566
1566
|
flex: 1;
|
|
1567
1567
|
width: auto;
|
|
1568
1568
|
padding-left: ${({isQuickViewMode:e})=>e===!0?o.sp8:o.sp0};
|
|
@@ -1631,7 +1631,7 @@ import{o,bW as ar,J as Te,gl as Ba,gm as Fa,V as t,cr as sr,bC as rr,aa as Ue,aS
|
|
|
1631
1631
|
position: relative;
|
|
1632
1632
|
width: auto;
|
|
1633
1633
|
height: 100%;
|
|
1634
|
-
`,U1=({selectedTab:e,transactionView:n,authParams:l,sectionId:r,vendorSearchAutoCompleteData:h,vendorSearchAutoCompleteActions:p,isCOTEnabled:a,isTransactionActivityEnabled:d,setCurrentFooterFormId:c,setLocalDataForCategoryAndClass:m,onTransactionCategorizationRowClick:u,onUpdateTransactionCategorizationUIState:g,onUpdateScrollYOffSetTransactionCategorizationUIState:f,onFetchTransactionCategorizationList:
|
|
1634
|
+
`,U1=({selectedTab:e,transactionView:n,authParams:l,sectionId:r,vendorSearchAutoCompleteData:h,vendorSearchAutoCompleteActions:p,isCOTEnabled:a,isTransactionActivityEnabled:d,setCurrentFooterFormId:c,setLocalDataForCategoryAndClass:m,onTransactionCategorizationRowClick:u,onUpdateTransactionCategorizationUIState:g,onUpdateScrollYOffSetTransactionCategorizationUIState:f,onFetchTransactionCategorizationList:y,onSaveUpdateTransactionCategorization:w,onUpdateSelectedCheckboxTransactionIds:v,onFetchRecommendationsForEntityCategorization:k,onFetchRecommendationsForEntityCategorizationWithCustomer:C,setActivityLogTransactionId:R,onUploadTransactionReceipt:I})=>{const[S,T]=i.useState({transactionId:void 0,lineItemId:void 0}),D=i.useRef(),A=i.useRef({}),{useDynamicConfig:O}=Ja(),{configValue:b}=O(Ga.enableUncategorizedExpenseCategory),$=b?.uncategorized_expense_category_enabled===!0,M=(Y,B,E,Z)=>{const P={...A.current};P[B]==null&&(P[B]=[]);let X=P[B].findIndex(J=>J.lineId===Y);if(X===-1){const J={lineId:Y,category:{recommendationTypesViewed:[]},class:{recommendationTypesViewed:[]},vendor:{recommendationTypesViewed:[]}};P[B].push(J),X=P[B].length-1}else{const J=P[B][X];P[B][X]={...J,category:{...J.category,recommendationTypesViewed:[...J.category.recommendationTypesViewed]},class:{...J.class,recommendationTypesViewed:[...J.class.recommendationTypesViewed]},vendor:{...J.vendor,recommendationTypesViewed:[...J.vendor.recommendationTypesViewed]}}}Z!=null&&Z!==""&&!P[B][X][E].recommendationTypesViewed.includes(Z)&&P[B][X][E].recommendationTypesViewed.push(Z),A.current=P},{transactions:N,transactionLocalData:G,accountsHierarchyList:z,classHierarchyList:V,accountList:de,classList:_,selectedCheckBoxTransactionIds:H,uncategorizedAccounts:ie}=n,he=an({mode:"all",reValidateMode:"onChange",defaultValues:i.useMemo(()=>Ta(H,G,z,V,h.entityAutoCompleteView),[z,V,H,G,h.entityAutoCompleteView]),values:i.useMemo(()=>Ta(H,G,z,V,h.entityAutoCompleteView),[z,V,H,G,h.entityAutoCompleteView]),resetOptions:{keepDefaultValues:!0,keepDirty:!1}});i.useEffect(()=>()=>{c("expenseAutomationPage")},[]),i.useEffect(()=>{H.length>0?c(vo):c("expenseAutomationPage")},[H,c]);const xe=he.handleSubmit(Y=>{const B=Y[Xn],E=A.current;w(e,B,E),B.forEach(Z=>{delete A.current[Z]})}),ge=async(Y,B)=>{if(Y!=null){if(Y===Xn){const E=he.getValues(Xn);if(E.length<H.length){v(e,E);return}if(E.length===Ln){v(e,E);return}const Z=E[E.length-1],P=B[on].findIndex(J=>J.transactionId===Z),X=he.getValues(`${on}.${P}.lineInfo`);if(X!=null){let J=!1;if(X.every(W=>(J=Sn(ie,W[De].selectedOption,$?["income"]:void 0),!!W[De].selectedOption&&W[De].selectedOption!=null&&!J&&!!W[et].selectedOption&&!!W[pt].selectedOption))===!0){v(e,E);return}else{const W=E.filter(U=>U!==Z);v(e,W);return}}return}if(Y.includes(De)===!0||Y.includes(et)===!0){const E=parseInt(Y.split(".")[1]),Z=parseInt(Y.split(".")[3]),P=he.getValues(`${on}.${E}.lineInfo`),X=P[Z];if(Y.includes(De)||Y.includes(et)){const{transactionId:J,lineId:W,recommendations:U}=X;if(P!=null){const L=X[De].selectedOption,ne=X[et].selectedOption,ee=X[pt].selectedOption,Q=X[pt].selectedOption,pe=X[pt].defaultOptions,Ie=pe?.find(me=>me.options?.find(Me=>Me.value===ee))?.options?.find(me=>me.value===ee)?.label,j=pe?.find(me=>me.options?.find(Me=>Me.value===Q))?.options?.find(me=>me.value===Q)?.label,se=h.entityAutoCompleteView.vendor.find(me=>me.qboId===ee),je=h.entityAutoCompleteView.customer.find(me=>me.qboId===Q),Ne=U.find(me=>me.vendor?.qboId===ee)?.vendor,Ee=ee||se?.qboId||Ne?.qboId?{id:ee??se?.qboId??Ne?.qboId??"",name:Ie??se?.name??Ne?.name??"",logo:se?.logo??Ne?.logo}:void 0,Oe=Q||je?.qboId?{id:Q??je?.qboId??"",name:j??je?.name??"",logo:je?.logo}:void 0,we=de.find(me=>me.qboId===L),at=_.find(me=>me.classId===ne),st=n.transactionLocalData.find(me=>me.transactionId===J)?.transactionReviewLocalData.lineItemById[W].account,qe=n.transactionLocalData.find(me=>me.transactionId===J)?.transactionReviewLocalData.lineItemById[W].class;m(e,J,W,N,Ee?.id,Oe?.id,Y.includes(De)&&we!=null?{...we,isPreFilled:!1}:st,Y.includes(et)&&at!=null?{...at,isPreFilled:!1}:qe,void 0,U,$)}return}}if(Y.includes(pt)){const E=parseInt(Y.split(".")[1]),Z=parseInt(Y.split(".")[3]),P=he.getValues(`${on}.${E}.lineInfo`);if(P!=null){const X=P[Z],{transactionId:J,recommendations:W}=X,U=X[pt].selectedOption,L=X[pt].selectedOption,ne=X[pt].defaultOptions,ee=ne?.flatMap(we=>we.options)?.find(we=>we.value===U)?.label,Q=ne?.flatMap(we=>we.options)?.find(we=>we.value===L)?.label,pe=h.entityAutoCompleteView.vendor.find(we=>we.qboId===U),Ie=h.entityAutoCompleteView.customer.find(we=>we.qboId===L),j=W.find(we=>we.vendor?.qboId===U)?.vendor,se=U!==""&&U!=null?U:ee!==""&&ee!=null?ee:"",je=(pe?.qboId!=null&&pe.qboId!==""?pe.qboId:null)??(j?.qboId!=null&&j.qboId!==""?j.qboId:null)??(U!=null&&U!==""?U:null),Ne={id:je??ee??"",name:ee??pe?.name??j?.name??"",logo:pe?.logo??j?.logo},Ee=Ie?.qboId!=null&&Ie.qboId!==""?{id:Ie.qboId??L??"",name:Q??Ie.name??"",logo:Ie.logo}:void 0,Oe=N.find(we=>we.id===J);if(Oe!=null){const we=n.transactionLocalData.find(Me=>Me.transactionId===Oe.id)?.transactionReviewLocalData,at=we?.lineItemById[X.lineId],st=Qt(Oe)===!0?we?.selectedEntity:at?.selectedEntityLine,qe=Ee?.id!=null&&Ee.id!==""?{id:Ee.id,name:Ee.name,type:"customer",qboId:Ee.id,zeniId:Ee.id,logo:Ee.logo}:Ne.id!==""&&Ne.id!=null?{id:se,name:ee??se,type:"vendor",qboId:se,zeniId:se,logo:Ne.logo,isPreFilled:st?.id===je&&st?.isPreFilled}:void 0,me={transactionId:{id:Oe.id,type:Oe.type},transaction:Oe,lineIds:Oe.type!=="journal_entry"?Oe.lines?.map(Me=>Me.id)??[]:[X.lineId]};qe?.type==="customer"?C(X.amount.amount,me,!1,e,qe,Ee,$):k(X.amount.amount,me,!1,e,qe,Ne,$)}}p.onCancelAutoComplete?.();return}}};i.useEffect(()=>{const Y=he.watch((B,{name:E})=>{E!=null&&B!=null&&An(()=>ge(E,B))});return()=>{Y.unsubscribe()}}),i.useEffect(()=>{if(h.entityAutoCompleteView.fetchState==="Completed"){const Y=n.transactionLocalData.find(B=>B.transactionId===S.transactionId);if(Y){const{transactionReviewLocalData:B}=Y,{selectedEntity:E}=B,Z=S?.lineItemId??B.sortedLineItems[0],P=B.lineItemById[Z],X=P.selectedEntityLine;D.current?.(Go(h.entityAutoCompleteView,E??X,P?.recommendationsWithCOT??[]))}T({transactionId:void 0,lineItemId:void 0})}},[h.entityAutoCompleteView.fetchState]);const q=(Y,B)=>{p.onAutoCompleteInputChange?.(Y),D.current=B},K=i.useRef(null);return t.jsx(K1,{ref:K,"data-testid":F("transaction-categorization-list-page"),children:t.jsx(sn,{...he,children:t.jsx("form",{id:La(vo),onSubmit:xe,style:{height:"100%",width:"100%"},"data-testid":F(La(vo)),children:t.jsx(E1,{isTransactionActivityEnabled:d,selectedTab:e,sectionId:r,transactionView:n,authParams:l,setCurrentTransactionInAction:T,onUpdateTransactionCategorizationUIState:g,onUpdateScrollYOffSetTransactionCategorizationUIState:f,onFetchTransactionCategorizationList:y,onTransactionCategorizationRowClick:u,vendorLoadOptions:q,vendorSearchAutoCompleteData:h,vendorSearchAutoCompleteActions:p,containerRef:K,isCOTEnabled:a,cotTracking:{onCOTView:M},isUncategorizedExpenseCategoryEnabled:$,setActivityLogTransactionId:R,onUploadTransactionReceipt:I})})})})},La=e=>`${e}_form`,Ta=(e,n,l,r,h)=>({[on]:n.map(p=>q1(p.transactionId,p.transactionReviewLocalData,l,r,h)),[Xn]:e}),q1=(e,n,l,r,h)=>{const{lineItemById:p,sortedLineItems:a,selectedEntity:d}=n,c=Object.values(p).sort((u,g)=>a.indexOf(u.lineId)-a.indexOf(g.lineId)),m=c[0]?.lineId;return{[Us]:c.map(u=>{const g=u.account?.qboId??u.account?.accountId,f=u.class?.classId,y=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,[De]:{selectedOption:g,allOptions:is(l,u.recommendationsWithCOT)},[et]:{selectedOption:f,allOptions:os(r,u.recommendationsWithCOT)},[pt]:{selectedOption:d?.id??y?.id??d?.name??y?.name,defaultOptions:Go(h,d??y,n.lineItemById[m]?.recommendationsWithCOT??[])},[_m]:u.lineEntity,[Bm]:u.recommendationsWithCOT??[]}}),transactionId:e,[Fm]:n.vendorDetails!=null&&n.vendorDetails.id!=null?{id:n.vendorDetails.id,qboId:n.vendorDetails.qboId,name:n.vendorDetails.name}:void 0,[Pm]:n.customerDetails!=null&&n.customerDetails.id!=null?{id:n.customerDetails.id,qboId:n.customerDetails.qboId,name:n.customerDetails.name}:void 0}},K1=s.div`
|
|
1635
1635
|
display: flex;
|
|
1636
1636
|
min-height: 100%;
|
|
1637
1637
|
width: 100%;
|
|
@@ -1651,7 +1651,7 @@ import{o,bW as ar,J as Te,gl as Ba,gm as Fa,V as t,cr as sr,bC as rr,aa as Ue,aS
|
|
|
1651
1651
|
display: flex;
|
|
1652
1652
|
flex-direction: column;
|
|
1653
1653
|
width: 100%;
|
|
1654
|
-
`,Y1=e=>{const{currentFooterFormId:n,onJeAccountSettingsChange:l,onSaveJeAccountSettingsClick:r,setResetJeAccountSettingsForm:h,expenseAutomationViewSelector:p,isTransactionActivityEnabled:a,authParams:d,receiptUploadEndpoint:c,companyId:m,vendorSearchAutoCompleteActions:u,vendorSearchAutoCompleteData:g,enableMonthEndInsightsZeniGPTFeature:f,monthEndInsightsPreviewMode:C,monthEndInsightsCustomerRequestData:w,allThreadsSectionOpen:v,loggedInUser:k,isCOTEnabled:y,setCurrentFooterFormId:R,onFetchRecommendationsForEntityCategorization:I,onFetchRecommendationsForEntityCategorizationWithCustomer:S,onTransactionCategorizationRowClick:T,onFetchMissingReceiptsList:D,onMissingReceiptsRowClick:A,onUploadReceiptAttachment:O,onUploadReceiptComplete:b,onUploadReceiptFetchStatus:$,onReconTabColumnSortConfigChanged:M,onReloadReconciliationListPage:N,onUpdateReconcileTabLocalData:G,onUpdateMissingReceiptsUIState:z,onFetchTransactionCategorizationList:V,onUpdateTransactionCategorizationUIState:de,onUpdateScrollYOffSetTransactionCategorizationUIState:_,handleJeScheduleClick:H,ignoreRecommendedJeSchedule:ie,onJESchedulesFormDataChange:he,onPostJESchedule:xe,setLocalDataForCategoryAndClass:ge,resetTransactionCategorizationLocalData:q,updateSelectedVendorForTransaction:K,onSaveUpdateTransactionCategorization:Y,onUpdateSelectedCheckboxTransactionIds:B,improveMonthEndInsightsUsingZeniGPTClick:E,onRemoveFileAttachment:Z,onUpdateFileAttachment:P,onCloseAllThreadsSection:X,onEditMonthEndInsightsClick:J,previewMonthEndReport:W,saveMonthEndReport:U,onOpenFileAttachmentSnackBar:L,onCloseFileAttachmentSnackBar:ne,onClickCustomerRequest:ee,sendMonthEndReport:Q,markAsReview:pe,onReloadPage:Ie,updateOperatingExpensesIdsForReview:j,onFetchReimbursementView:se,updateSectionIdsForReview:je,onUpdateFluxAnalysisUIState:Ne,fetchFluxViewOnScroll:Ee,onFetchFluxViewList:Oe,setIsJeAccountSettingsOpened:we,onReviewClicked:at,setOpenDrawerClicked:st,onEstablishConnectionClick:qe,onFetchLinkTokenClick:me,updateReconReviewTabLocalData:Me,onReconReviewTabColumnSortConfigChanged:Ot,onSaveReconciliation:gt,onSaveReconciliationReview:Ut,onReconMatchedTransactionClick:xt,onAddStatementClick:$e,redirectToVendorDetailPage:re,setActivityLogTransactionId:Le}=e,{currentSelectedView:le,missingReceipts:_e,transactionView:dt,selectedPeriod:vt,monthEndInsights:He,selectedTransactionCategorizationTab:rn,reconciliation:ln}=p;switch(le){case"transaction_categorization":return dt.fetchState==="Completed"&&dt.transactionLocalData.length===0?t.jsx(Tt,{tab:le,title:Je(le).allDoneText.title,subTitle:Je(le).allDoneText.subTitle}):t.jsx(U1,{setCurrentFooterFormId:R,selectedPeriod:vt,selectedTab:rn,sectionId:on,transactionView:dt,authParams:d,isTransactionActivityEnabled:a,onUpdateTransactionCategorizationUIState:de,onUpdateScrollYOffSetTransactionCategorizationUIState:_,onFetchTransactionCategorizationList:V,onTransactionCategorizationRowClick:T,setLocalDataForCategoryAndClass:ge,resetTransactionCategorizationLocalData:q,updateSelectedVendorForTransaction:K,onSaveUpdateTransactionCategorization:Y,onUpdateSelectedCheckboxTransactionIds:B,vendorSearchAutoCompleteActions:u,vendorSearchAutoCompleteData:g,onFetchRecommendationsForEntityCategorization:I,onFetchRecommendationsForEntityCategorizationWithCustomer:S,isCOTEnabled:y,setActivityLogTransactionId:Le,onUploadTransactionReceipt:e.onUploadTransactionReceipt});case"je_schedules":return t.jsx(qh,{setIsJeAccountSettingsOpened:we,expenseAutomationViewSelector:p,setResetJeAccountSettingsForm:h,currentFooterFormId:n,onJeAccountSettingsChange:l,onSaveJeAccountSettingsClick:r,setCurrentFooterFormId:R,handleJeScheduleClick:H,ignoreRecommendedJeSchedule:ie,onJESchedulesFormDataChange:he,onPostJESchedule:xe,vendorSearchAutoCompleteActions:u,vendorSearchAutoCompleteData:g});case"missing_receipts":return _e.fetchState==="Completed"&&_e.transactions.length===0?t.jsx(Tt,{tab:le,title:Je(le).allDoneText.title,subTitle:Je(le).allDoneText.subTitle}):t.jsx(Ep,{onUpdateMissingReceiptsUIState:z,onFetchMissingReceiptsList:D,missingReceipts:_e,receiptUploadEndpoint:c,authParams:d,selectedPeriod:vt,onMissingReceiptsRowClick:A,onUploadReceiptComplete:b,onUploadReceiptFetchStatus:$,onUploadReceiptAttachment:O});case"month_end_insights":if(He!=null&&p.monthEndCloseChecksView.monthEndCloseChecks!=null){if(He.fetchState==="Not-Started"||He.fetchState==="In-Progress"||He.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||He.companyMonthEndReportTemplatesData.fetchState==="In-Progress")return t.jsx(hr,{fetchState:"In-Progress"});{const Mt={application:"cockpit",companyId:m,entityId:m,tab:"expense_automation",isGlobalComment:!1,entityType:"expense_automation.monthEndEmail",companyName:He.companyName,url:window.location.href},{url:qt,...Kt}=Mt,cn={...Kt};return t.jsx(G1,{children:t.jsx(am,{allThreadsSectionOpen:v,customerRequestData:w,companyId:m,enableZeniGPTFeature:f,filterMetaData:cn,selectedPeriod:p.selectedPeriod,improveUsingZeniGPTClick:E,isZeniUser:k?.userEmail?.includes("zeni.ai")??!1,monthEndReportView:He,newThreadMetadata:Mt,onClickCustomerRequest:ee,onCloseAllThreadsSection:X,onCloseFileAttachmentSnackBar:ne,onOpenFileAttachmentSnackBar:L,onRemoveFileAttachment:Z,onUpdateFileAttachment:P,previewMode:C,previewMonthEndReport:W,saveMonthEndReport:U,onEditClick:J,sendMonthEndReport:Q})})}}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(Tt,{tab:le,title:Je(le).allDoneText.title,subTitle:Je(le).allDoneText.subTitle}):t.jsx(vh,{fluxAnalysis:p.fluxAnalysis,selectedPeriod:p.selectedPeriod,markAsReview:pe,onReloadPage:Ie,updateOperatingExpensesIdsForReview:j,updateSectionIdsForReview:je,onUpdateFluxAnalysisUIState:Ne,setCurrentFooterFormId:R,fetchFluxViewOnScroll:Ee,onFetchFluxViewList:Oe,onFetchReimbursementView:se,redirectToVendorDetailPage:re});case"reconciliation":return t.jsx(ah,{onReloadReconciliationListPage:N,currentFooterFormId:n,reconciliation:ln,companyId:m,vendorSearchAutoCompleteActions:u,vendorSearchAutoCompleteData:g,onReviewClicked:at,setOpenDrawerClicked:st,setCurrentFooterFormId:R,onReconTabColumnSortConfigChanged:M,onUpdateReconcileTabLocalData:G,onEstablishConnectionClick:qe,onFetchLinkTokenClick:me,updateReconReviewTabLocalData:Me,onReconReviewTabColumnSortConfigChanged:Ot,onSaveReconciliation:gt,onSaveReconciliationReview:Ut,onReconMatchedTransactionClick:xt,onAddStatementClick:$e});default:return t.jsx(Tt,{tab:le,title:Je(le).allDoneText.title,subTitle:Je(le).allDoneText.subTitle})}};function Z1(e){const n=Te(),{currentSelectedView:l}=e.expenseAutomationViewSelector,r=e.expenseAutomationViewSelector.currentSelectedView==="transaction_categorization",h=e.expenseAutomationViewSelector.currentSelectedView!=="month_end_insights"&&e.expenseAutomationViewSelector.currentSelectedView!=="flux_analysis";return t.jsx(J1,{windowSize:n,style:{...h===!0?{paddingLeft:Aa.subSectionContainerLeftRightPadding.value(n),paddingRight:Aa.subSectionContainerLeftRightPadding.value(n)}:{paddingLeft:x[0],paddingRight:x[0]},...r===!0||l==="reconciliation"?{paddingLeft:x[0],paddingRight:x[0]}:{}},children:t.jsx(Y1,{...e})})}const Q1=e=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M22.9902 12.0403L1.12726 12.0403",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M7.68994 5.60718L1.00953 12.0402L7.68994 18.4732",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),X1=e=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.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"}),i.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"}),i.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"}),i.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"}),i.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"}),i.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"}),i.createElement("path",{d:"M17.1504 8.40656V7.6875",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M17.1504 14.8753V14.1562",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),eg=s.div`
|
|
1654
|
+
`,Y1=e=>{const{currentFooterFormId:n,onJeAccountSettingsChange:l,onSaveJeAccountSettingsClick:r,setResetJeAccountSettingsForm:h,expenseAutomationViewSelector:p,isTransactionActivityEnabled:a,authParams:d,receiptUploadEndpoint:c,companyId:m,vendorSearchAutoCompleteActions:u,vendorSearchAutoCompleteData:g,enableMonthEndInsightsZeniGPTFeature:f,monthEndInsightsPreviewMode:y,monthEndInsightsCustomerRequestData:w,allThreadsSectionOpen:v,loggedInUser:k,isCOTEnabled:C,setCurrentFooterFormId:R,onFetchRecommendationsForEntityCategorization:I,onFetchRecommendationsForEntityCategorizationWithCustomer:S,onTransactionCategorizationRowClick:T,onFetchMissingReceiptsList:D,onMissingReceiptsRowClick:A,onUploadReceiptAttachment:O,onUploadReceiptComplete:b,onUploadReceiptFetchStatus:$,onReconTabColumnSortConfigChanged:M,onReloadReconciliationListPage:N,onUpdateReconcileTabLocalData:G,onUpdateMissingReceiptsUIState:z,onFetchTransactionCategorizationList:V,onUpdateTransactionCategorizationUIState:de,onUpdateScrollYOffSetTransactionCategorizationUIState:_,handleJeScheduleClick:H,ignoreRecommendedJeSchedule:ie,onJESchedulesFormDataChange:he,onPostJESchedule:xe,setLocalDataForCategoryAndClass:ge,resetTransactionCategorizationLocalData:q,updateSelectedVendorForTransaction:K,onSaveUpdateTransactionCategorization:Y,onUpdateSelectedCheckboxTransactionIds:B,improveMonthEndInsightsUsingZeniGPTClick:E,onRemoveFileAttachment:Z,onUpdateFileAttachment:P,onCloseAllThreadsSection:X,onEditMonthEndInsightsClick:J,previewMonthEndReport:W,saveMonthEndReport:U,onOpenFileAttachmentSnackBar:L,onCloseFileAttachmentSnackBar:ne,onClickCustomerRequest:ee,sendMonthEndReport:Q,markAsReview:pe,onReloadPage:Ie,updateOperatingExpensesIdsForReview:j,onFetchReimbursementView:se,updateSectionIdsForReview:je,onUpdateFluxAnalysisUIState:Ne,fetchFluxViewOnScroll:Ee,onFetchFluxViewList:Oe,setIsJeAccountSettingsOpened:we,onReviewClicked:at,setOpenDrawerClicked:st,onEstablishConnectionClick:qe,onFetchLinkTokenClick:me,updateReconReviewTabLocalData:Me,onReconReviewTabColumnSortConfigChanged:Ot,onSaveReconciliation:gt,onSaveReconciliationReview:Ut,onReconMatchedTransactionClick:xt,onAddStatementClick:$e,redirectToVendorDetailPage:re,setActivityLogTransactionId:Le}=e,{currentSelectedView:le,missingReceipts:_e,transactionView:dt,selectedPeriod:vt,monthEndInsights:He,selectedTransactionCategorizationTab:rn,reconciliation:ln}=p;switch(le){case"transaction_categorization":return dt.fetchState==="Completed"&&dt.transactionLocalData.length===0?t.jsx(Tt,{tab:le,title:Je(le).allDoneText.title,subTitle:Je(le).allDoneText.subTitle}):t.jsx(U1,{setCurrentFooterFormId:R,selectedPeriod:vt,selectedTab:rn,sectionId:on,transactionView:dt,authParams:d,isTransactionActivityEnabled:a,onUpdateTransactionCategorizationUIState:de,onUpdateScrollYOffSetTransactionCategorizationUIState:_,onFetchTransactionCategorizationList:V,onTransactionCategorizationRowClick:T,setLocalDataForCategoryAndClass:ge,resetTransactionCategorizationLocalData:q,updateSelectedVendorForTransaction:K,onSaveUpdateTransactionCategorization:Y,onUpdateSelectedCheckboxTransactionIds:B,vendorSearchAutoCompleteActions:u,vendorSearchAutoCompleteData:g,onFetchRecommendationsForEntityCategorization:I,onFetchRecommendationsForEntityCategorizationWithCustomer:S,isCOTEnabled:C,setActivityLogTransactionId:Le,onUploadTransactionReceipt:e.onUploadTransactionReceipt});case"je_schedules":return t.jsx(qh,{setIsJeAccountSettingsOpened:we,expenseAutomationViewSelector:p,setResetJeAccountSettingsForm:h,currentFooterFormId:n,onJeAccountSettingsChange:l,onSaveJeAccountSettingsClick:r,setCurrentFooterFormId:R,handleJeScheduleClick:H,ignoreRecommendedJeSchedule:ie,onJESchedulesFormDataChange:he,onPostJESchedule:xe,vendorSearchAutoCompleteActions:u,vendorSearchAutoCompleteData:g});case"missing_receipts":return _e.fetchState==="Completed"&&_e.transactions.length===0?t.jsx(Tt,{tab:le,title:Je(le).allDoneText.title,subTitle:Je(le).allDoneText.subTitle}):t.jsx(Ep,{onUpdateMissingReceiptsUIState:z,onFetchMissingReceiptsList:D,missingReceipts:_e,receiptUploadEndpoint:c,authParams:d,selectedPeriod:vt,onMissingReceiptsRowClick:A,onUploadReceiptComplete:b,onUploadReceiptFetchStatus:$,onUploadReceiptAttachment:O});case"month_end_insights":if(He!=null&&p.monthEndCloseChecksView.monthEndCloseChecks!=null){if(He.fetchState==="Not-Started"||He.fetchState==="In-Progress"||He.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||He.companyMonthEndReportTemplatesData.fetchState==="In-Progress")return t.jsx(hr,{fetchState:"In-Progress"});{const Mt={application:"cockpit",companyId:m,entityId:m,tab:"expense_automation",isGlobalComment:!1,entityType:"expense_automation.monthEndEmail",companyName:He.companyName,url:window.location.href},{url:qt,...Kt}=Mt,cn={...Kt};return t.jsx(G1,{children:t.jsx(am,{allThreadsSectionOpen:v,customerRequestData:w,companyId:m,enableZeniGPTFeature:f,filterMetaData:cn,selectedPeriod:p.selectedPeriod,improveUsingZeniGPTClick:E,isZeniUser:k?.userEmail?.includes("zeni.ai")??!1,monthEndReportView:He,newThreadMetadata:Mt,onClickCustomerRequest:ee,onCloseAllThreadsSection:X,onCloseFileAttachmentSnackBar:ne,onOpenFileAttachmentSnackBar:L,onRemoveFileAttachment:Z,onUpdateFileAttachment:P,previewMode:y,previewMonthEndReport:W,saveMonthEndReport:U,onEditClick:J,sendMonthEndReport:Q})})}}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(Tt,{tab:le,title:Je(le).allDoneText.title,subTitle:Je(le).allDoneText.subTitle}):t.jsx(vh,{fluxAnalysis:p.fluxAnalysis,selectedPeriod:p.selectedPeriod,markAsReview:pe,onReloadPage:Ie,updateOperatingExpensesIdsForReview:j,updateSectionIdsForReview:je,onUpdateFluxAnalysisUIState:Ne,setCurrentFooterFormId:R,fetchFluxViewOnScroll:Ee,onFetchFluxViewList:Oe,onFetchReimbursementView:se,redirectToVendorDetailPage:re});case"reconciliation":return t.jsx(ah,{onReloadReconciliationListPage:N,currentFooterFormId:n,reconciliation:ln,companyId:m,vendorSearchAutoCompleteActions:u,vendorSearchAutoCompleteData:g,onReviewClicked:at,setOpenDrawerClicked:st,setCurrentFooterFormId:R,onReconTabColumnSortConfigChanged:M,onUpdateReconcileTabLocalData:G,onEstablishConnectionClick:qe,onFetchLinkTokenClick:me,updateReconReviewTabLocalData:Me,onReconReviewTabColumnSortConfigChanged:Ot,onSaveReconciliation:gt,onSaveReconciliationReview:Ut,onReconMatchedTransactionClick:xt,onAddStatementClick:$e});default:return t.jsx(Tt,{tab:le,title:Je(le).allDoneText.title,subTitle:Je(le).allDoneText.subTitle})}};function Z1(e){const n=Te(),{currentSelectedView:l}=e.expenseAutomationViewSelector,r=e.expenseAutomationViewSelector.currentSelectedView==="transaction_categorization",h=e.expenseAutomationViewSelector.currentSelectedView!=="month_end_insights"&&e.expenseAutomationViewSelector.currentSelectedView!=="flux_analysis";return t.jsx(J1,{windowSize:n,style:{...h===!0?{paddingLeft:Aa.subSectionContainerLeftRightPadding.value(n),paddingRight:Aa.subSectionContainerLeftRightPadding.value(n)}:{paddingLeft:x[0],paddingRight:x[0]},...r===!0||l==="reconciliation"?{paddingLeft:x[0],paddingRight:x[0]}:{}},children:t.jsx(Y1,{...e})})}const Q1=e=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M22.9902 12.0403L1.12726 12.0403",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M7.68994 5.60718L1.00953 12.0402L7.68994 18.4732",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),X1=e=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.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"}),i.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"}),i.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"}),i.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"}),i.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"}),i.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"}),i.createElement("path",{d:"M17.1504 8.40656V7.6875",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M17.1504 14.8753V14.1562",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),eg=s.div`
|
|
1655
1655
|
width: 100%;
|
|
1656
1656
|
height: 100vh;
|
|
1657
1657
|
display: flex;
|
|
@@ -1680,7 +1680,7 @@ import{o,bW as ar,J as Te,gl as Ba,gm as Fa,V as t,cr as sr,bC as rr,aa as Ue,aS
|
|
|
1680
1680
|
width: ${o.sp3};
|
|
1681
1681
|
cursor: pointer;
|
|
1682
1682
|
color: inherit;
|
|
1683
|
-
`,{common:{footer:Fe,texts:{maxLimitReached:ng,confirmAction:og},headers:ig,create:ag,strings:kn,texts:xn,cancel:sg,confirm:rg,monthsByIndex:lg},dateFormat:{visual:{MMMDCommaYYYYformat:Da}},expenseAutomation:fn}=Ae.getLocalizedStrings(),cg=({setActivityLogTransactionId:e})=>{const{selectedTransactionId:n}=eo(),l=mt(),[r,h]=i.useState(!1);return n==null?null:t.jsx(Ce,{title:fn.transactions.header.activity,placement:"bottom",children:t.jsx(Lg,{onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),onClick:p=>{p.stopPropagation(),e(n)},children:t.jsx(Tg,{style:{color:r?l.colors.primary:l.colors.hero}})})})},Jg=e=>{const{expenseAutomationViewSelector:n,isDisabled:l,isRealtimeInsightsFeatureEnabled:r,isUncategorizedExpenseCategoryEnabled:h,isCOTEnabled:p,onUpdateTab:a,onReconTabUpdate:d,onUpdateStep:c,onSearchTextChanged:m,onRefresh:u,onClose:g,onBack:f,resetTransactionCategorizationLocalData:C,updateOperatingExpensesIdsForReview:w,clearJeScheduleLocalData:v,onSaveReconciliation:k}=e,{currentSelectedView:y,allSteps:R,missingReceipts:I,jeSchedules:S,fluxAnalysis:T,monthEndInsights:D,transactionView:A,selectedTransactionCategorizationTab:O,reconciliation:b,selectedPeriod:$}=n,[M,N]=i.useState("expenseAutomationPage"),[G,z]=i.useState(()=>{}),[V,de]=i.useState(!1),_=Te(),H=!!e.loggedInUser?.userEmail?.includes("zeni.ai"),ie=H?Ba:Fa,{openThread:he,setOpenThread:xe}=i.useContext(ie),[ge,q]=i.useState(!1),[K,Y]=i.useState(!1),B=R.find(re=>re.step===y),{nextStep:E,previousStep:Z}=hg(R,y),{uiState:{searchString:P,pageToken:X},totalCountByTab:J,transactions:W,fetchStateByTransactionTabs:U,transactionLocalData:L}=A,{selectedReconAccount:ne,reconciliationTabsState:{reconcile:{localData:{selectedTransactionIds:ee}}}}=b;let Q="Not-Started",pe="complete";switch(y){case"missing_receipts":Q=I.refreshStatus.fetchState,pe=I.completionStatus;break;case"je_schedules":Q=S.refreshStatus.fetchState,pe=S.completionStatus;break;case"month_end_insights":D!=null&&(Q=D?.fetchState);break;case"flux_analysis":Q=T.refreshStatus.fetchState,pe=T.completionStatus;break;case"transaction_categorization":Q=A.refreshStatus.fetchState,pe=A.completionStatus;break;case"reconciliation":ne==null?(Q=b.refreshStatus.fetchState,pe=b.completionStatus):(Q=b.selectedReconAccount?.refreshStatus.fetchState??"Not-Started",pe=b.completionStatus)}const Ie=()=>{G()},{saveStatus:j,selectedCheckBoxTransactionIds:se}=A,je=()=>{const re=Es(n.fluxAnalysis.sections,n.fluxAnalysis.reviewOperatingExpensesIds),Le=uo(),{month:le,year:_e}=$,dt=uo().set("month",le-1).set("year",_e).endOf("month");switch(M){case"expenseAutomationFluxPage":return{formId:"expenseAutomationFluxPage",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:re===!0?Fe.markAsReviewed:xn.undo,style:{justifyContent:"space-evenly"},isLoading:n.fluxAnalysis.bulkReviewStatus.fetchState==="In-Progress",isDisabled:!1},leftSideComponent:Ao(n.fluxAnalysis.reviewOperatingExpensesIds.length,xs,_,xn.vendor,y),cancelBtn:{label:Fe.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>{w([])}}};case"expenseAutomationTransactionsPage":return{formId:"expenseAutomationTransactionsPage",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Fe.save,style:{minWidth:"96px",justifyContent:"space-evenly"},isLoading:j.fetchState==="In-Progress",isDisabled:!1},leftSideComponent:Ao(se.length,Ln,_,xn.transaction,y),cancelBtn:{label:Fe.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>{C(O,W.map(vt=>vt.id),$,!1,J[O],$i(L,O),h,X)}}};case"expenseAutomationJESchedulePage":return{formId:"expenseAutomationJESchedulePage",nextBtnLabel:Fe.next,backBtnLabel:Fe.back,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Fe.next,style:{justifyContent:"space-evenly"},isDisabled:l||B?.isNextDisabled,suffixIcon:t.jsx(Ea,{}),onClick:()=>{c(E.step)}},cancelBtn:{label:Fe.back,isDisabled:l||B?.isPrevDisabled,style:{width:"96px",justifyContent:"space-evenly"},prefixIcon:t.jsx(Ra,{}),onClick:()=>{c(Z.step)}}};case"expenseAutomationBankReconReconcilePage":return{formId:"expenseAutomationBankReconReconcilePage",nextBtnLabel:Fe.reconcile,backBtnLabel:Fe.saveForLater,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Fe.reconcile,onClick:()=>{k({reconcileAction:"reconcile"})},isDisabled:!(b.reconciliationTabsState.balances.variance.amount===0&&Le.isAfter(dt)),isLoading:b.actionFetchStates.reconcileFetch.fetchState==="In-Progress",style:{justifyContent:"space-evenly",minWidth:132}},leftSideComponent:Ao(ee.length,1/0,_,xn.transaction,y),cancelBtn:{onClick:()=>{k({reconcileAction:"save_reconcile_for_later"})},reverseSpinnerColor:!1,isLoading:b.actionFetchStates.saveForLaterFetch.fetchState==="In-Progress",label:Fe.saveForLater,style:{minWidth:132,justifyContent:"space-evenly"}}};case"expenseAutomationJEAccountSettingsPage":return{formId:"expenseAutomationJEAccountSettingsPage",nextBtnLabel:Fe.save,backBtnLabel:Fe.cancel,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Fe.save,isLoading:S.accountSettingsView.saveState.fetchState==="In-Progress",style:{justifyContent:"space-evenly",minWidth:82}},cancelBtn:{onClick:()=>Ie(),label:Fe.cancel,style:{minWidth:82,justifyContent:"space-evenly"}}};default:{const vt=y==="reconciliation"&&n.reconciliation.selectedTab==="review"&&n.reconciliation.selectedAccountId!=null,He=y==="reconciliation"&&n.reconciliation.selectedAccountId==null,rn=y==="reconciliation"&&n.reconciliation.selectedTab==="reconcile"&&n.reconciliation.selectedAccountId!=null,ln=E.step==="month_end_insights"&&(y==="flux_analysis"&&(n.fluxAnalysis.sections.generalExpense?.balancesByMonth!=null||n.fluxAnalysis.sections.reimbursement?.balancesByMonth!=null)||He),Mt=y==="transaction_categorization"&&n.selectedTransactionCategorizationTab==="review",qt=y==="transaction_categorization"&&n.selectedTransactionCategorizationTab==="autoCategorized",Kt=n.monthEndCloseChecksView.monthEndCloseChecks?.monthEndCloseCheckList.find(yn=>yn.id==="month_end_insights"),cn=n.monthEndCloseChecksView.monthEndCloseChecks?.reportEmailSentDate==null&&Kt?.isDisabled===!1&&(r||B?.isNextDisabled===!1),Rn=E.step==="month_end_insights"&&(He||y==="flux_analysis")?!cn:B?.isNextDisabled===!0;return{formId:"expenseAutomationPage",nextBtnLabel:Fe.next,backBtnLabel:Fe.back,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:ln===!0?ug(n.selectedPeriod.month):Fe.next,style:{justifyContent:"space-evenly"},isDisabled:Rn,suffixIcon:t.jsx(Ea,{}),onClick:()=>{Mt?a("autoCategorized"):vt?d("reconcile"):c(E.step)}},cancelBtn:{label:Fe.back,isDisabled:l||B?.isPrevDisabled,style:{width:"96px",justifyContent:"space-evenly"},prefixIcon:t.jsx(Ra,{}),onClick:()=>{qt?a("review"):rn?d("review"):vt?f():c(Z.step)}}}}}},Ne=()=>{switch(M){case"expenseAutomationFluxPage":return{confirmAction:()=>{q(!1),w([]),g()}};case"expenseAutomationTransactionsPage":return{confirmAction:()=>{q(!1),C(O,W.map(re=>re.id),$,!1,J[O],$i(L,O),h,X),g()}};case"expenseAutomationJESchedulePage":return{confirmAction:()=>{q(!1),v(),g()}};default:return{confirmAction:()=>{q(!1)},confirmationDescription:kn.empty}}},Ee=()=>{M==="expenseAutomationFluxPage"||M==="expenseAutomationJESchedulePage"||M==="expenseAutomationTransactionsPage"?q(!0):g()},{primaryBtn:Oe,cancelBtn:we,leftSideComponent:at}=je(),{confirmAction:st}=Ne(),qe=re=>{if(y==="transaction_categorization"&&(re==="autoCategorized"||re==="review"))return{hideCountInTab:J[re]>fn.common.numbers.maximumCount,count:J[re],isFetching:U[re].fetchState==="In-Progress"};if(y==="reconciliation"){const{reconciliation:Le}=n,{selectedAccountId:le}=Le;return le==null?{count:0,isFetching:!1}:re==="review"?{count:Le.accountReconciliationsByAccountID[le]?.accountReconEntity?.transactionsToReview.length,isFetching:Le.accountReconciliationsByAccountID[le]?.transactionFetchState.fetchState==="In-Progress"}:{count:Le.accountReconciliationsByAccountID[le]?.accountReconEntity?.transactionsToReconcile.length,isFetching:Le.accountReconciliationsByAccountID[le]?.transactionFetchState.fetchState==="In-Progress"}}},me=y==="reconciliation"&&b.selectedAccountId!=null&&b.selectedReconAccount!=null,{month:Me,year:Ot}=$,gt=uo().set("month",Me-1).set("year",Ot),Ut=gt.startOf("month").format(Da),xt=gt.endOf("month").format(Da),$e=`${Ut} ${kn.hyphen} ${xt}`;return t.jsxs(eg,{children:[ge?t.jsx(sr,{containerStyle:{width:356},titleComponent:t.jsx(yg,{children:og}),primaryButtonText:rg,secondaryButtonText:sg,proceedButtonVariant:"danger",action:{onOkClick:()=>{st()},onCancelClick:()=>q(!1)},descriptionComponent:t.jsx(Cg,{children:fn.confirmationDescription})}):null,t.jsx(rr,{isOpen:e.sidePanelIsOpen??!1,isFullView:e.sidePanelIsFullView??!1,panelContent:e.panelContent,panelActionBarContent:e.isTransactionActivityEnabled?t.jsx(cg,{setActivityLogTransactionId:e.setActivityLogTransactionId}):null,headerContent:t.jsx(vc,{onBack:f,navBarCustomElement:y==="reconciliation"&&b.selectedAccountId!=null?t.jsx(dg,{reconciliation:b}):void 0,onReconTabUpdate:d,currentRecontab:b.selectedTab,reconcileDetailPageFetchState:b.selectedAccountId!=null?b.accountReconciliationsByAccountID[b.selectedAccountId]?.transactionFetchState.fetchState:"Not-Started",selectedReconAccountId:me?b.selectedAccountId:void 0,currentSelectedView:y,titleStyle:{justifyContent:"center",marginLeft:o.sp0},headerData:Je(y,J.autoCategorized,me?b.selectedAccountId:void 0,me?b.selectedReconAccount?.accountReconEntity?.account.accountName:void 0,me?$e:void 0),searchText:P,currentTab:O,getTabCountAndFetchState:qe,completionStatus:pe,forceShowSubtitle:V===!0||y==="je_schedules"&&(S.fetchState==="In-Progress"||S.accountSettingsView.fetchState==="In-Progress"),refreshStatus:Q,companyId:e.companyId,companyName:n.monthEndInsights?.companyName??kn.empty,isZeniUser:H,onAllThreadsClick:()=>{he!=null&&xe(null),Y(!0)},onUpdateTab:a,onSearchTextChanged:m,onRefresh:u,onClose:Ee}),listContent:t.jsxs(tg,{children:[t.jsx(Z1,{...e,isCOTEnabled:p,setIsJeAccountSettingsOpened:de,setResetJeAccountSettingsForm:z,allThreadsSectionOpen:K,setCurrentFooterFormId:N,currentFooterFormId:M,onCloseAllThreadsSection:()=>Y(!1)}),t.jsx(Ue,{controller:y!=="month_end_insights"&&e.sidePanelIsOpen!==!0,children:t.jsx(Pa,{style:{width:"-webkit-fill-available",maxHeight:x[8]},formId:pg(M),primaryBtn:Oe,leftSideComponent:at,cancelBtn:we,separatorStyle:{marginRight:o.sp4}})})]})})]})},dg=({reconciliation:e})=>{const n=mt(),{clearedBalance:l,variance:r,variancePercentage:h,deposits:p,payments:a}=e.reconciliationTabsState.balances,{balance:d}=e.selectedReconAccount?.accountReconEntity??{},{selectedReconAccount:c}=e,{transactionFetchState:m}=c??{};return t.jsx(wg,{children:t.jsxs(bg,{children:[t.jsxs(Eo,{style:{justifyContent:"flex-end",width:"50%"},children:[t.jsx(Ro,{children:t.jsx(vg,{})}),t.jsx(Do,{children:m?.fetchState==="In-Progress"?t.jsxs(_o,{children:[t.jsx(pn,{height:25,width:120}),t.jsx(pn,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsx(Mo,{children:Ze("0,0.00",d)}),t.jsx(Oo,{children:fn.accountRecon.reconciliation.headers.bankBalance})]})})]}),t.jsxs(Eo,{children:[t.jsx(Ro,{children:t.jsx(jg,{})}),t.jsx(Do,{children:m?.fetchState==="In-Progress"?t.jsxs(_o,{children:[t.jsx(pn,{height:25,width:120}),t.jsx(pn,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsx(Mo,{children:Ze("0,0.00",l)}),t.jsxs(Ig,{children:[t.jsx(Oo,{children:fn.accountRecon.reconciliation.headers.clearedBalance}),t.jsx(Ce,{placement:"bottom",title:t.jsxs($g,{children:[t.jsxs(Oa,{children:[t.jsxs(Ma,{children:[a.count," ",xn.payments]}),t.jsx(_a,{children:Ze("0,0.[00]",a.totalAmount)})]}),t.jsxs(Oa,{children:[t.jsxs(Ma,{children:[p.count," ",xn.deposits]}),t.jsx(_a,{children:Ze("0,0.[00]",p.totalAmount)})]})]}),display:"flex",children:t.jsx(kg,{})})]})]})})]}),t.jsxs(Eo,{style:{justifyContent:"flex-start",width:"50%"},children:[t.jsx(Ro,{children:t.jsx(Sg,{})}),t.jsx(Do,{children:m?.fetchState==="In-Progress"?t.jsxs(_o,{children:[t.jsx(pn,{height:25,width:120}),t.jsx(pn,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsxs(Mo,{children:[t.jsx("span",{style:{color:r.amount===0?n.colors.brandColorJadeDark:n.colors.primary},children:Ze("0,0.00",r)}),h!=null&&r.amount!==0?t.jsx("span",{style:{color:n.colors.primary,marginLeft:2},children:`(${h.toFixed(2)}%)`}):null]}),t.jsx(Oo,{children:fn.accountRecon.reconciliation.headers.variance})]})})]})]})})},Ao=(e,n,l,r,h)=>{const p=r,a=(e>1?p+"s":p)+" selected";return e>0?t.jsxs(mg,{currentView:h,style:l==="small"?{position:"absolute",top:o.sp2,left:`-${o.sp5}`}:{},children:[t.jsx(gg,{multiDigit:e>=5,children:e}),t.jsx(xg,{children:a}),e===n?t.jsx(fg,{children:`(${ng})`}):null]}):null},ug=e=>{const n=lg[e];return`${ag}${kn.space}${n}${kn.space}${ig.insights}`};function hg(e,n){const l=e.findIndex(d=>d.step===n);if(l===-1)throw new Error("currentStep not found in allSteps array");const r=(l+1)%e.length,h=(l-1+e.length)%e.length,p=e[r],a=e[h];return{nextStep:p,previousStep:a}}const pg=e=>`${e}_form`,mg=s.div`
|
|
1683
|
+
`,{common:{footer:Fe,texts:{maxLimitReached:ng,confirmAction:og},headers:ig,create:ag,strings:kn,texts:xn,cancel:sg,confirm:rg,monthsByIndex:lg},dateFormat:{visual:{MMMDCommaYYYYformat:Da}},expenseAutomation:fn}=Ae.getLocalizedStrings(),cg=({setActivityLogTransactionId:e})=>{const{selectedTransactionId:n}=eo(),l=mt(),[r,h]=i.useState(!1);return n==null?null:t.jsx(Ce,{title:fn.transactions.header.activity,placement:"bottom",children:t.jsx(Lg,{onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),onClick:p=>{p.stopPropagation(),e(n)},children:t.jsx(Tg,{style:{color:r?l.colors.primary:l.colors.hero}})})})},Jg=e=>{const{expenseAutomationViewSelector:n,isDisabled:l,isRealtimeInsightsFeatureEnabled:r,isUncategorizedExpenseCategoryEnabled:h,isCOTEnabled:p,onUpdateTab:a,onReconTabUpdate:d,onUpdateStep:c,onSearchTextChanged:m,onRefresh:u,onClose:g,onBack:f,resetTransactionCategorizationLocalData:y,updateOperatingExpensesIdsForReview:w,clearJeScheduleLocalData:v,onSaveReconciliation:k}=e,{currentSelectedView:C,allSteps:R,missingReceipts:I,jeSchedules:S,fluxAnalysis:T,monthEndInsights:D,transactionView:A,selectedTransactionCategorizationTab:O,reconciliation:b,selectedPeriod:$}=n,[M,N]=i.useState("expenseAutomationPage"),[G,z]=i.useState(()=>{}),[V,de]=i.useState(!1),_=Te(),H=!!e.loggedInUser?.userEmail?.includes("zeni.ai"),ie=H?Ba:Fa,{openThread:he,setOpenThread:xe}=i.useContext(ie),[ge,q]=i.useState(!1),[K,Y]=i.useState(!1),B=R.find(re=>re.step===C),{nextStep:E,previousStep:Z}=hg(R,C),{uiState:{searchString:P,pageToken:X},totalCountByTab:J,transactions:W,fetchStateByTransactionTabs:U,transactionLocalData:L}=A,{selectedReconAccount:ne,reconciliationTabsState:{reconcile:{localData:{selectedTransactionIds:ee}}}}=b;let Q="Not-Started",pe="complete";switch(C){case"missing_receipts":Q=I.refreshStatus.fetchState,pe=I.completionStatus;break;case"je_schedules":Q=S.refreshStatus.fetchState,pe=S.completionStatus;break;case"month_end_insights":D!=null&&(Q=D?.fetchState);break;case"flux_analysis":Q=T.refreshStatus.fetchState,pe=T.completionStatus;break;case"transaction_categorization":Q=A.refreshStatus.fetchState,pe=A.completionStatus;break;case"reconciliation":ne==null?(Q=b.refreshStatus.fetchState,pe=b.completionStatus):(Q=b.selectedReconAccount?.refreshStatus.fetchState??"Not-Started",pe=b.completionStatus)}const Ie=()=>{G()},{saveStatus:j,selectedCheckBoxTransactionIds:se}=A,je=()=>{const re=Es(n.fluxAnalysis.sections,n.fluxAnalysis.reviewOperatingExpensesIds),Le=uo(),{month:le,year:_e}=$,dt=uo().set("month",le-1).set("year",_e).endOf("month");switch(M){case"expenseAutomationFluxPage":return{formId:"expenseAutomationFluxPage",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:re===!0?Fe.markAsReviewed:xn.undo,style:{justifyContent:"space-evenly"},isLoading:n.fluxAnalysis.bulkReviewStatus.fetchState==="In-Progress",isDisabled:!1},leftSideComponent:Ao(n.fluxAnalysis.reviewOperatingExpensesIds.length,xs,_,xn.vendor,C),cancelBtn:{label:Fe.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>{w([])}}};case"expenseAutomationTransactionsPage":return{formId:"expenseAutomationTransactionsPage",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Fe.save,style:{minWidth:"96px",justifyContent:"space-evenly"},isLoading:j.fetchState==="In-Progress",isDisabled:!1},leftSideComponent:Ao(se.length,Ln,_,xn.transaction,C),cancelBtn:{label:Fe.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>{y(O,W.map(vt=>vt.id),$,!1,J[O],$i(L,O),h,X)}}};case"expenseAutomationJESchedulePage":return{formId:"expenseAutomationJESchedulePage",nextBtnLabel:Fe.next,backBtnLabel:Fe.back,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Fe.next,style:{justifyContent:"space-evenly"},isDisabled:l||B?.isNextDisabled,suffixIcon:t.jsx(Ea,{}),onClick:()=>{c(E.step)}},cancelBtn:{label:Fe.back,isDisabled:l||B?.isPrevDisabled,style:{width:"96px",justifyContent:"space-evenly"},prefixIcon:t.jsx(Ra,{}),onClick:()=>{c(Z.step)}}};case"expenseAutomationBankReconReconcilePage":return{formId:"expenseAutomationBankReconReconcilePage",nextBtnLabel:Fe.reconcile,backBtnLabel:Fe.saveForLater,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Fe.reconcile,onClick:()=>{k({reconcileAction:"reconcile"})},isDisabled:!(b.reconciliationTabsState.balances.variance.amount===0&&Le.isAfter(dt)),isLoading:b.actionFetchStates.reconcileFetch.fetchState==="In-Progress",style:{justifyContent:"space-evenly",minWidth:132}},leftSideComponent:Ao(ee.length,1/0,_,xn.transaction,C),cancelBtn:{onClick:()=>{k({reconcileAction:"save_reconcile_for_later"})},reverseSpinnerColor:!1,isLoading:b.actionFetchStates.saveForLaterFetch.fetchState==="In-Progress",label:Fe.saveForLater,style:{minWidth:132,justifyContent:"space-evenly"}}};case"expenseAutomationJEAccountSettingsPage":return{formId:"expenseAutomationJEAccountSettingsPage",nextBtnLabel:Fe.save,backBtnLabel:Fe.cancel,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Fe.save,isLoading:S.accountSettingsView.saveState.fetchState==="In-Progress",style:{justifyContent:"space-evenly",minWidth:82}},cancelBtn:{onClick:()=>Ie(),label:Fe.cancel,style:{minWidth:82,justifyContent:"space-evenly"}}};default:{const vt=C==="reconciliation"&&n.reconciliation.selectedTab==="review"&&n.reconciliation.selectedAccountId!=null,He=C==="reconciliation"&&n.reconciliation.selectedAccountId==null,rn=C==="reconciliation"&&n.reconciliation.selectedTab==="reconcile"&&n.reconciliation.selectedAccountId!=null,ln=E.step==="month_end_insights"&&(C==="flux_analysis"&&(n.fluxAnalysis.sections.generalExpense?.balancesByMonth!=null||n.fluxAnalysis.sections.reimbursement?.balancesByMonth!=null)||He),Mt=C==="transaction_categorization"&&n.selectedTransactionCategorizationTab==="review",qt=C==="transaction_categorization"&&n.selectedTransactionCategorizationTab==="autoCategorized",Kt=n.monthEndCloseChecksView.monthEndCloseChecks?.monthEndCloseCheckList.find(yn=>yn.id==="month_end_insights"),cn=n.monthEndCloseChecksView.monthEndCloseChecks?.reportEmailSentDate==null&&Kt?.isDisabled===!1&&(r||B?.isNextDisabled===!1),Rn=E.step==="month_end_insights"&&(He||C==="flux_analysis")?!cn:B?.isNextDisabled===!0;return{formId:"expenseAutomationPage",nextBtnLabel:Fe.next,backBtnLabel:Fe.back,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:ln===!0?ug(n.selectedPeriod.month):Fe.next,style:{justifyContent:"space-evenly"},isDisabled:Rn,suffixIcon:t.jsx(Ea,{}),onClick:()=>{Mt?a("autoCategorized"):vt?d("reconcile"):c(E.step)}},cancelBtn:{label:Fe.back,isDisabled:l||B?.isPrevDisabled,style:{width:"96px",justifyContent:"space-evenly"},prefixIcon:t.jsx(Ra,{}),onClick:()=>{qt?a("review"):rn?d("review"):vt?f():c(Z.step)}}}}}},Ne=()=>{switch(M){case"expenseAutomationFluxPage":return{confirmAction:()=>{q(!1),w([]),g()}};case"expenseAutomationTransactionsPage":return{confirmAction:()=>{q(!1),y(O,W.map(re=>re.id),$,!1,J[O],$i(L,O),h,X),g()}};case"expenseAutomationJESchedulePage":return{confirmAction:()=>{q(!1),v(),g()}};default:return{confirmAction:()=>{q(!1)},confirmationDescription:kn.empty}}},Ee=()=>{M==="expenseAutomationFluxPage"||M==="expenseAutomationJESchedulePage"||M==="expenseAutomationTransactionsPage"?q(!0):g()},{primaryBtn:Oe,cancelBtn:we,leftSideComponent:at}=je(),{confirmAction:st}=Ne(),qe=re=>{if(C==="transaction_categorization"&&(re==="autoCategorized"||re==="review"))return{hideCountInTab:J[re]>fn.common.numbers.maximumCount,count:J[re],isFetching:U[re].fetchState==="In-Progress"};if(C==="reconciliation"){const{reconciliation:Le}=n,{selectedAccountId:le}=Le;return le==null?{count:0,isFetching:!1}:re==="review"?{count:Le.accountReconciliationsByAccountID[le]?.accountReconEntity?.transactionsToReview.length,isFetching:Le.accountReconciliationsByAccountID[le]?.transactionFetchState.fetchState==="In-Progress"}:{count:Le.accountReconciliationsByAccountID[le]?.accountReconEntity?.transactionsToReconcile.length,isFetching:Le.accountReconciliationsByAccountID[le]?.transactionFetchState.fetchState==="In-Progress"}}},me=C==="reconciliation"&&b.selectedAccountId!=null&&b.selectedReconAccount!=null,{month:Me,year:Ot}=$,gt=uo().set("month",Me-1).set("year",Ot),Ut=gt.startOf("month").format(Da),xt=gt.endOf("month").format(Da),$e=`${Ut} ${kn.hyphen} ${xt}`;return t.jsxs(eg,{children:[ge?t.jsx(sr,{containerStyle:{width:356},titleComponent:t.jsx(yg,{children:og}),primaryButtonText:rg,secondaryButtonText:sg,proceedButtonVariant:"danger",action:{onOkClick:()=>{st()},onCancelClick:()=>q(!1)},descriptionComponent:t.jsx(Cg,{children:fn.confirmationDescription})}):null,t.jsx(rr,{isOpen:e.sidePanelIsOpen??!1,isFullView:e.sidePanelIsFullView??!1,panelContent:e.panelContent,panelActionBarContent:e.isTransactionActivityEnabled?t.jsx(cg,{setActivityLogTransactionId:e.setActivityLogTransactionId}):null,headerContent:t.jsx(vc,{onBack:f,navBarCustomElement:C==="reconciliation"&&b.selectedAccountId!=null?t.jsx(dg,{reconciliation:b}):void 0,onReconTabUpdate:d,currentRecontab:b.selectedTab,reconcileDetailPageFetchState:b.selectedAccountId!=null?b.accountReconciliationsByAccountID[b.selectedAccountId]?.transactionFetchState.fetchState:"Not-Started",selectedReconAccountId:me?b.selectedAccountId:void 0,currentSelectedView:C,titleStyle:{justifyContent:"center",marginLeft:o.sp0},headerData:Je(C,J.autoCategorized,me?b.selectedAccountId:void 0,me?b.selectedReconAccount?.accountReconEntity?.account.accountName:void 0,me?$e:void 0),searchText:P,currentTab:O,getTabCountAndFetchState:qe,completionStatus:pe,forceShowSubtitle:V===!0||C==="je_schedules"&&(S.fetchState==="In-Progress"||S.accountSettingsView.fetchState==="In-Progress"),refreshStatus:Q,companyId:e.companyId,companyName:n.monthEndInsights?.companyName??kn.empty,isZeniUser:H,onAllThreadsClick:()=>{he!=null&&xe(null),Y(!0)},onUpdateTab:a,onSearchTextChanged:m,onRefresh:u,onClose:Ee}),listContent:t.jsxs(tg,{children:[t.jsx(Z1,{...e,isCOTEnabled:p,setIsJeAccountSettingsOpened:de,setResetJeAccountSettingsForm:z,allThreadsSectionOpen:K,setCurrentFooterFormId:N,currentFooterFormId:M,onCloseAllThreadsSection:()=>Y(!1)}),t.jsx(Ue,{controller:C!=="month_end_insights"&&e.sidePanelIsOpen!==!0,children:t.jsx(Pa,{style:{width:"-webkit-fill-available",maxHeight:x[8]},formId:pg(M),primaryBtn:Oe,leftSideComponent:at,cancelBtn:we,separatorStyle:{marginRight:o.sp4}})})]})})]})},dg=({reconciliation:e})=>{const n=mt(),{clearedBalance:l,variance:r,variancePercentage:h,deposits:p,payments:a}=e.reconciliationTabsState.balances,{balance:d}=e.selectedReconAccount?.accountReconEntity??{},{selectedReconAccount:c}=e,{transactionFetchState:m}=c??{};return t.jsx(wg,{children:t.jsxs(bg,{children:[t.jsxs(Eo,{style:{justifyContent:"flex-end",width:"50%"},children:[t.jsx(Ro,{children:t.jsx(vg,{})}),t.jsx(Do,{children:m?.fetchState==="In-Progress"?t.jsxs(_o,{children:[t.jsx(pn,{height:25,width:120}),t.jsx(pn,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsx(Mo,{children:Ze("0,0.00",d)}),t.jsx(Oo,{children:fn.accountRecon.reconciliation.headers.bankBalance})]})})]}),t.jsxs(Eo,{children:[t.jsx(Ro,{children:t.jsx(jg,{})}),t.jsx(Do,{children:m?.fetchState==="In-Progress"?t.jsxs(_o,{children:[t.jsx(pn,{height:25,width:120}),t.jsx(pn,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsx(Mo,{children:Ze("0,0.00",l)}),t.jsxs(Ig,{children:[t.jsx(Oo,{children:fn.accountRecon.reconciliation.headers.clearedBalance}),t.jsx(Ce,{placement:"bottom",title:t.jsxs($g,{children:[t.jsxs(Oa,{children:[t.jsxs(Ma,{children:[a.count," ",xn.payments]}),t.jsx(_a,{children:Ze("0,0.[00]",a.totalAmount)})]}),t.jsxs(Oa,{children:[t.jsxs(Ma,{children:[p.count," ",xn.deposits]}),t.jsx(_a,{children:Ze("0,0.[00]",p.totalAmount)})]})]}),display:"flex",children:t.jsx(kg,{})})]})]})})]}),t.jsxs(Eo,{style:{justifyContent:"flex-start",width:"50%"},children:[t.jsx(Ro,{children:t.jsx(Sg,{})}),t.jsx(Do,{children:m?.fetchState==="In-Progress"?t.jsxs(_o,{children:[t.jsx(pn,{height:25,width:120}),t.jsx(pn,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsxs(Mo,{children:[t.jsx("span",{style:{color:r.amount===0?n.colors.brandColorJadeDark:n.colors.primary},children:Ze("0,0.00",r)}),h!=null&&r.amount!==0?t.jsx("span",{style:{color:n.colors.primary,marginLeft:2},children:`(${h.toFixed(2)}%)`}):null]}),t.jsx(Oo,{children:fn.accountRecon.reconciliation.headers.variance})]})})]})]})})},Ao=(e,n,l,r,h)=>{const p=r,a=(e>1?p+"s":p)+" selected";return e>0?t.jsxs(mg,{currentView:h,style:l==="small"?{position:"absolute",top:o.sp2,left:`-${o.sp5}`}:{},children:[t.jsx(gg,{multiDigit:e>=5,children:e}),t.jsx(xg,{children:a}),e===n?t.jsx(fg,{children:`(${ng})`}):null]}):null},ug=e=>{const n=lg[e];return`${ag}${kn.space}${n}${kn.space}${ig.insights}`};function hg(e,n){const l=e.findIndex(d=>d.step===n);if(l===-1)throw new Error("currentStep not found in allSteps array");const r=(l+1)%e.length,h=(l-1+e.length)%e.length,p=e[r],a=e[h];return{nextStep:p,previousStep:a}}const pg=e=>`${e}_form`,mg=s.div`
|
|
1684
1684
|
display: flex;
|
|
1685
1685
|
justify-content: flex-start;
|
|
1686
1686
|
align-items: center;
|