@zeniai/web-cockpit-ui 1.15.64-qa → 1.15.65-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-BShpKoIj-DBPKn0sX.js +21 -0
- package/dist/assets/{AIPerformancePage-Da3gFo8A-CSXeuStb.js → AIPerformancePage-CFErwUsE-BYOi4eif.js} +22 -22
- package/dist/assets/AccountInfoPage-B8upbXj9-DVCxjo1L.js +18 -0
- package/dist/assets/{AccountInfoPageContent-DqErO8FH-mViOCowa.js → AccountInfoPageContent-CKpeDot5-C4xEct6y.js} +23 -23
- package/dist/assets/{AccountLockedInfoModal-BJjCuLHa-lkS-zBaJ.js → AccountLockedInfoModal-c30P9O_3-BXRFFhii.js} +9 -9
- package/dist/assets/{AccountReconDetailsDrawerPage-CVjH1p0d-khdb66DL.js → AccountReconDetailsDrawerPage-CO9BYPWm-Det_iJaE.js} +51 -51
- package/dist/assets/AccountRow-BrW_eEjE-HoBl8v8H.js +298 -0
- package/dist/assets/{AccountsPromoCardStack-D7xvgmOH-n7Og3oU6.js → AccountsPromoCardStack-De2yNNuZ-C74RtM0g.js} +22 -22
- package/dist/assets/AddAddressForCardDrawer-riOPLnxb-hTaoKUhW.js +6 -0
- package/dist/assets/{AddToWalletPage-zJy9QCjx-C2VBVH37.js → AddToWalletPage-CsOmzC7v-XA_Ukf0G.js} +23 -23
- package/dist/assets/{AgingReportsPage-wAvQb1d8-BVhKyC9n.js → AgingReportsPage-D9I9afnB-j70-fH52.js} +8 -8
- package/dist/assets/{AllUserItems-DEv_CXOA-Cnm0jwbR.js → AllUserItems-Dq7NcP-o-bQnq3Yy5.js} +7 -7
- package/dist/assets/ApAgingDetailPage-Z5JgfH-e-DlNnTpGB.js +46 -0
- package/dist/assets/AppBasePage-B5sDynhi-B6PJcirc.js +71 -0
- package/dist/assets/AppDrawerContent-D9Q8ir0T-BlV3y7qg.js +92 -0
- package/dist/assets/ApprovalRulesSettingsPage-DVGvJsQG-g3c3aBsx.js +47 -0
- package/dist/assets/{ArAgingChart-m-Xp3HAW-BFbIzkgu.js → ArAgingChart-Tcu0Lja_-DlvMwgJ3.js} +5 -5
- package/dist/assets/ArAgingDetailPage-B5vqkc3v-xHE7Qc0m.js +46 -0
- package/dist/assets/{AttachmentView-DB_V1qT1-DuTWI9WZ.js → AttachmentView-CiYfninr-BohG7XjP.js} +7 -7
- package/dist/assets/BalancesInsightWithToolTip-tiQUQUbX-C692_oh-.js +38 -0
- package/dist/assets/{BankAccountSection-BabhrBM7-Hm-Yu2sT.js → BankAccountSection-EZtscP2z-aKL8vcpJ.js} +7 -7
- package/dist/assets/{BankAccountWarningSection-yT2UAd12-X-VL5grc.js → BankAccountWarningSection-DCfyIUlu-DyMLU3Tg.js} +7 -7
- package/dist/assets/{BankConnectionsSettingsPage-CbxXykMM-BVq9Jf6S.js → BankConnectionsSettingsPage-CQWy9jvt-B-n6frCU.js} +32 -32
- package/dist/assets/BillDetailPage-pt1k5AQf-BM9-GtkV.js +266 -0
- package/dist/assets/{BillPayApprovalRuleDetailPage-COyDRpaF-IRQNMkGr.js → BillPayApprovalRuleDetailPage-Drh7Bhi8-CDpJ0g2R.js} +2 -2
- package/dist/assets/{BillPayApprovalRulesPage-9pxkgFAT-BBE0uhiX.js → BillPayApprovalRulesPage-Cmyo59xB-pg1tP0xq.js} +15 -15
- package/dist/assets/BillPayPromoPage-Dgpz2TLG-BFCcBeGF.js +84 -0
- package/dist/assets/{BillPaySetUpPage-Cs5rkWBu-B8WDufb0.js → BillPaySetUpPage-B6Pd_eBf-BC27u6lI.js} +4 -4
- package/dist/assets/{BillingSettingsPage-CQ117tT9-BAwGu5cG.js → BillingSettingsPage-CYsvBrFV-BWO0QWBs.js} +7 -7
- package/dist/assets/{BillsBulkReviewDrawerPage-DRkGQQAe-RZgdY8zQ.js → BillsBulkReviewDrawerPage-DNnAmqWz-BQr-aBSF.js} +1 -1
- package/dist/assets/{BoxItem-DRwx0M5a-5_z4KYJ3.js → BoxItem-B06DK4G--CNFqY3pV.js} +1 -1
- package/dist/assets/{BusinessVerificationPage-1h0z3N9u-Bd2Dv1xV.js → BusinessVerificationPage-Dgk5gyMv-BdAKTgt0.js} +11 -11
- package/dist/assets/CardNumberSubText-CcH9jUoZ-BGeGZCAA.js +21 -0
- package/dist/assets/{CashbackDetailPage-ChdQcvkC-BQq0-Z8K.js → CashbackDetailPage-5eysaHGf-qWx0m6gR.js} +30 -30
- package/dist/assets/{ChargeCardDetailPage-DFOKlPNG-DdvX9ays.js → ChargeCardDetailPage-Diwf-gwZ-DmopcUlO.js} +1 -1
- package/dist/assets/{ChargeCardListPage-DhLUsUhd-CPt3fT_S.js → ChargeCardListPage-C-RTGkKK-Bb-QwUsn.js} +23 -23
- package/dist/assets/{ChargeCardListTable-DE72YU_i-UK8ppaLR.js → ChargeCardListTable-B-bNbtZQ-Bfw8s7pe.js} +60 -60
- package/dist/assets/{ChargeCardPaymentHistoryPage-CbGR18s--CGJF0r4n.js → ChargeCardPaymentHistoryPage-Cu-zT5tO-C6SEcidH.js} +36 -36
- package/dist/assets/{ChargeCardPromoPage-CPpNh89o-ur53P9tl.js → ChargeCardPromoPage-Cz3rNFwM-N71PCrPp.js} +38 -38
- package/dist/assets/{ChargeCardSetupPage-ITi25kUD-D46LZ2gE.js → ChargeCardSetupPage-BcTB9Yy5-DkE42DK5.js} +3 -3
- package/dist/assets/{ChargeCardStatementsPage-CTJc1BCc-C1ya3GFy.js → ChargeCardStatementsPage-B_ERvgmB-DFHNpOVz.js} +5 -5
- package/dist/assets/{CheckDepositDrawerPage-BrzeSj-3-dYFak2DM.js → CheckDepositDrawerPage-D7_usOVn-C_GuSSOC.js} +17 -17
- package/dist/assets/CollapsableReportTable-h0vIfI8o-Bg2RfRDJ.js +2982 -0
- package/dist/assets/{CompanyOfficerDetailsSection-BaPhFsLx-CpwNpffC.js → CompanyOfficerDetailsSection-CWADX4kZ-IHJvDX6-.js} +30 -30
- package/dist/assets/{CompanyPassportCard-B9ymV6Az-DhiSwK7x.js → CompanyPassportCard-DF9LFrFD-DjueOJ3s.js} +9 -9
- package/dist/assets/{CompanyPassportPage-BQ68t7oK-25GyAr8e.js → CompanyPassportPage-BtAopyLq-DbU6xdRd.js} +30 -30
- package/dist/assets/{CompleteProfile-C5n9b8gQ-D0ag80PT.js → CompleteProfile-CsbsHQ0p-BLF2mnNn.js} +4 -4
- package/dist/assets/ConfettiBurst-duD341Gp-Bb3-s_zN.js +1 -0
- package/dist/assets/{ConstrainedInnerElement-BeIpAPjB-Cd8lINA1.js → ConstrainedInnerElement-hv51KpGg-DTOZooRA.js} +1 -1
- package/dist/assets/{CreateOrEditVendorPage-BIfOA5Nr-C8DeTqzS.js → CreateOrEditVendorPage-C2xU6c51-DT9rwnbq.js} +14 -14
- package/dist/assets/{CreditCardPaymentDrawerPage-CCpS-31h-BiN9aJFe.js → CreditCardPaymentDrawerPage-CeagMaCu-D6hhhd3N.js} +22 -22
- package/dist/assets/CurrencySelectField-B8EoF2aF-uavVFTum.js +139 -0
- package/dist/assets/{CustomerOnboardingActivationPage-6VlMI4oY-BsSHWzKa.js → CustomerOnboardingActivationPage-CIeR2XvU-B59q7JSL.js} +29 -29
- package/dist/assets/CustomerOnboardingContainerPage-DVL4s-eV-Betf7XiO.js +1 -0
- package/dist/assets/{CustomerOnboardingDetailPageSkeleton-BzbZb27J-C2NLa27a.js → CustomerOnboardingDetailPageSkeleton-kUbwh2r2-zrrFUTGk.js} +14 -14
- package/dist/assets/CustomerOnboardingNoStepsPage-Br0jy7Pu-C04-tCb6.js +66 -0
- package/dist/assets/{CustomerOnboardingPage-DkW66A-p-q-1ALWKT.js → CustomerOnboardingPage-Dm2Si769-DsN6K-ie.js} +16 -16
- package/dist/assets/{CustomerOnboardingProductSuitePage-Ba0yotpP-IunY7NMf.js → CustomerOnboardingProductSuitePage-Cz81Q5jC-eSuGAIqK.js} +8 -8
- package/dist/assets/{Dashboard-bX3cWkmP-gpZTlRVX.js → Dashboard-DReG_aaf-C4aSoq3o.js} +33 -33
- package/dist/assets/{DashboardReportPage-DuZ4d4CE-BtgBO5CE.js → DashboardReportPage-BXSlwsR7-4jSB_qXZ.js} +38 -38
- package/dist/assets/DashboardSidebarBackgroundAnimation-B3dtVAe2-BBvO3tiT.js +12 -0
- package/dist/assets/DepositAccTransactionItem-YuSXjbLh-dhpmj79R.js +76 -0
- package/dist/assets/DepositAccTransactionListPage-C-FAvZwD-5kKsnSxM.js +66 -0
- package/dist/assets/DomesticWireDetailsPage-BaiSpc0N-BaNvy8Dj.js +21 -0
- package/dist/assets/DownloadOverlay-BpRKCn-0-GQtzMlpD.js +439 -0
- package/dist/assets/{DrawerPage-CaG-xx5d-Ch3FAk_-.js → DrawerPage-DQ3Xuekx-71bFG_xW.js} +12 -12
- package/dist/assets/EditPeoplePage-8DalSMWH-BO--FbCf.js +55 -0
- package/dist/assets/EditReimbursementDetailPage-CC2BjMkR-BrDBl4Nx.js +865 -0
- package/dist/assets/EntityDetailPage-fmWuxHTZ-BEOMoyTE.js +18 -0
- package/dist/assets/{EntitySummarySection-LEA5m6mN-Bkfqomfq.js → EntitySummarySection-vsEMiXYh-UA5Y35sl.js} +17 -17
- package/dist/assets/{ExpenseAutomationOverviewPage-Dmhn7gfp-KHS19Js4.js → ExpenseAutomationOverviewPage-B3HPfIsK-4ZtjmO8G.js} +50 -50
- package/dist/assets/ExpenseAutomationPage-4LJefgNh-YH8canW3.js +3015 -0
- package/dist/assets/{ExpressPayPage-C-nqret2-CHVy3vEu.js → ExpressPayPage-BH7oCW_F-HW0llOdu.js} +17 -17
- package/dist/assets/{FeaturePreviewPage-BHjUZ7s6-CoLeq4Tz.js → FeaturePreviewPage-DSv61BhF-rk5VNvfQ.js} +2 -2
- package/dist/assets/{FollowStepsSection-0eFMS0c5-DAdCYPIL.js → FollowStepsSection-Bgy9MpO4-DCiZAX41.js} +7 -7
- package/dist/assets/GlobalReviewListPage-VRq_gimm-D4JxkgEf.js +291 -0
- package/dist/assets/{InformationCardStack-C7XJCUlh-BO56UWI6.js → InformationCardStack-rx0fypl3-C50dsns2.js} +4 -4
- package/dist/assets/{InsightsCardStack-fBAbQwhK-DuPgw9sX.js → InsightsCardStack-uJWMkIZL-k2gW7JtA.js} +9 -9
- package/dist/assets/InsightsSection-ByFf2oGn-BaSZhycl.js +27 -0
- package/dist/assets/{IntegrationsSettingsPage-BD5jqAv8--mAzs_NR.js → IntegrationsSettingsPage-Cj01Nub6-JLccDpyu.js} +6 -6
- package/dist/assets/{InternationalWireSwiftDetailsPage-BftrE612-De_WHxi6.js → InternationalWireSwiftDetailsPage-C2PM97sv-CXe5WYRW.js} +24 -24
- package/dist/assets/InternationalWireVerificationPage-Cr3sDrT--Bq6HNEU0.js +65 -0
- package/dist/assets/{InviteFormPage-E2igwKEh-BEncV13R.js → InviteFormPage-dsMpScvq-CF55W3d2.js} +18 -18
- package/dist/assets/{InvitePageListView-Cuq9dlgu-B0_SeEmy.js → InvitePageListView-e7vGSbFa-wcp0OLc4.js} +43 -43
- package/dist/assets/InvitePeoplePage-BT_YVCP4-yRtlk6wv.js +12 -0
- package/dist/assets/InvoiceUploadSection-Dg1-uunA-DejmnF3G.js +140 -0
- package/dist/assets/{IssueChargeCardPage-CK6fnO24-Db0v77bJ.js → IssueChargeCardPage-CyF9wrb0-DIt_LpMY.js} +31 -31
- package/dist/assets/{LabeledAddressValue-Ma1WURjK-DlrMcsdg.js → LabeledAddressValue-3l0Bv00--DmuSRVDq.js} +2 -2
- package/dist/assets/LabeledAddressValueField-F9kvUR_r-BCeaFKsb.js +45 -0
- package/dist/assets/LabeledControlledCheckBoxField-BgC8y0D6-Cxk0wWCO.js +16 -0
- package/dist/assets/{LabeledCountryMultiSelectField-sj8p7Rne-BCnpPBJo.js → LabeledCountryMultiSelectField-3qI_4noU-BCLCbVPc.js} +5 -5
- package/dist/assets/{LabeledCreatableSingleSelectField-DUTQh416-DhVqlBC1.js → LabeledCreatableSingleSelectField-BV3h9bh7-BAj07yW-.js} +7 -7
- package/dist/assets/LabeledDocumentField-rriEcsdr-CkxtZhMI.js +41 -0
- package/dist/assets/LabeledDropDownFormattedTextField-DoVSg3nZ-Be0l5Q_z.js +59 -0
- package/dist/assets/{LabeledText-DvzVOku6-Dn53TfaN.js → LabeledText-DGZ7hxY4-IuE8fmYf.js} +6 -6
- package/dist/assets/{LabeledUserSingleSelectWithSubtitlesField-DCv1Q5qb-BqVEyHXC.js → LabeledUserSingleSelectWithSubtitlesField-DI07Eicg-DgE4V-VP.js} +18 -18
- package/dist/assets/{LabeledZeniRolesDropDownField-kWC0ShEy-CPUGdXpK.js → LabeledZeniRolesDropDownField-jIrTovp--Bw9Copum.js} +29 -29
- package/dist/assets/{LinkJETransactionPage-WufhDGDQ-azPG9MUe.js → LinkJETransactionPage-Bvbqpltz-Bc-21K8g.js} +18 -18
- package/dist/assets/{LockCardPage-BBIVLYVD-419LPSiD.js → LockCardPage-DyEQBJYx-BLiE9GBP.js} +64 -64
- package/dist/assets/{LowBalancePopup-ScEqPY9J-C060z0nB.js → LowBalancePopup-C2vHKMNF-PKO6ElPE.js} +6 -6
- package/dist/assets/MagicLinkACHDetailsPage-lAAwAtH7-SJ0jUK4M.js +1 -0
- package/dist/assets/MagicLinkDomesticWireDetailsPage-cv823ASo-DimLQOFo.js +1 -0
- package/dist/assets/{MagicLinkInternationalWireDetailsPage-fSY3JGpz-B9llfoRD.js → MagicLinkInternationalWireDetailsPage-C_SjsgC9-Bvgil6AB.js} +1 -1
- package/dist/assets/MagicLinkSuccessPage-B1LBYM2F-BYLLbXss.js +31 -0
- package/dist/assets/{MagicLinkTitleSection-ZnbKPIvJ-BocBRFlv.js → MagicLinkTitleSection-ClAnBBt9-CxQuR-QP.js} +5 -5
- package/dist/assets/MailingDetailsSection-9_XLl4bT-BB3mmWQ9.js +21 -0
- package/dist/assets/{MyBankConnectionsSettingsPage-aQDVaEG1-BGCx9EU3.js → MyBankConnectionsSettingsPage-CBNYcuP4-DwZ11Kbp.js} +16 -16
- package/dist/assets/MyPendingActivationChargeCardListPage-n71n40uQ-DzAksyAj.js +6 -0
- package/dist/assets/MyProfileSettingsPage-BUMIjZYc-CtFmjBIE.js +85 -0
- package/dist/assets/{NavBarWithPicker-zmvBmWS1-B7DVgWCo.js → NavBarWithPicker-CbjFNysh-BLH7wXCB.js} +5 -5
- package/dist/assets/{NavigationArrow-D26UG3p--B1OMUVaF.js → NavigationArrow-Dpc7u6y4-94AYlIy-.js} +7 -7
- package/dist/assets/{NavigationDots-Bv4tBDN3-BOJfNTon.js → NavigationDots-DCpslVnm-BIAw9fTc.js} +3 -3
- package/dist/assets/{NewGlobalMerchantPage-vOn2O6B9-BmAEPvzQ.js → NewGlobalMerchantPage-B10sY6Q_-Owh-T5As.js} +37 -37
- package/dist/assets/{NoDataChart-CgT19fV7-CW6QHLgR.js → NoDataChart-9-bhq204-jF2VPuzU.js} +2 -2
- package/dist/assets/{NoDataTable-CPjJmo4s-DSMgo6Qg.js → NoDataTable-C6Q2Anpz-DB9htpIj.js} +1 -1
- package/dist/assets/{NotFoundPage-CP2i3FTm-C5pv1EYn.js → NotFoundPage-4mPhXD5--Dq1iR5VQ.js} +4 -4
- package/dist/assets/{NotificationSettingsPage-CT9Dnb03-BP21fQ3b.js → NotificationSettingsPage-BTxCoB_b-BHZscHCj.js} +28 -28
- package/dist/assets/NotificationsListConfig-CylnViXd-Dg2fm6St.js +1 -0
- package/dist/assets/NotificationsPage-D41h0mS6-Dzdq9z4a.js +685 -0
- package/dist/assets/OpExByVendorPage-BV_uJSCh-BHuftqJi.js +100 -0
- package/dist/assets/{OverlayContainerPage-D4QU0p4o-DypUO3LF.js → OverlayContainerPage-CkUYOhlh-ChB_ia4V.js} +1 -1
- package/dist/assets/PandLWithForecastPage-Cj3UWjG4-Ufv6uGVt.js +123 -0
- package/dist/assets/{PaymentAccountSetupBillingAddressSection-JPO-rPAd-AJNZCxIB.js → PaymentAccountSetupBillingAddressSection-BWFl695q-DUUCCWV6.js} +15 -15
- package/dist/assets/PeoplePage-DcGqWtAP-CfVqJS-U.js +727 -0
- package/dist/assets/{Preview-MsotgVZx.js → Preview-DHku7oFH.js} +1 -1
- package/dist/assets/{ProductsCarousel-7R3cvGiS-B-idYuEE.js → ProductsCarousel-C9JoJQeH-7TCp-gr7.js} +8 -8
- package/dist/assets/{PromoBaseCards-DdCMZIc7-DYaNktKG.js → PromoBaseCards-mFk7SsOr-cB2eyHgD.js} +3 -3
- package/dist/assets/{QBOConnectionDialog-Ca36jKz2-BROTAV6b.js → QBOConnectionDialog-CJsIrEZq-Djdbh1G7.js} +5 -5
- package/dist/assets/{QBOSetupSection-CzBfIVqR-CxeYM05R.js → QBOSetupSection-C_fqHza_-B8WpC_yY.js} +13 -13
- package/dist/assets/{ReimbursementApprovalRuleDetailPage-DUVSGQJ6-C0TdrujH.js → ReimbursementApprovalRuleDetailPage-BMZnKpsk-CX5NlTL7.js} +2 -2
- package/dist/assets/{ReimbursementApprovalRulesPage-B48x1gPM-CTKI435W.js → ReimbursementApprovalRulesPage-C2zNa8dT-CGtrNpR7.js} +9 -9
- package/dist/assets/ReimbursementDetailPage-B1o8ea57-BrBovHlf.js +314 -0
- package/dist/assets/ReimbursementPromoPage-Df5QmXzC-CzrrekBH.js +84 -0
- package/dist/assets/{ReimbursementSetUpPage-B_c-ZgFT-IXOGqCsl.js → ReimbursementSetUpPage-D450RVsP-BNS45RtV.js} +10 -10
- package/dist/assets/ReimbursementsBulkReviewDrawerPage-DwgKrhlQ-BYy6jU6w.js +1 -0
- package/dist/assets/{ReloadCard-DKGn1uxF-BSvLgeuK.js → ReloadCard-D5cvzWxe-BSJWwb6T.js} +6 -6
- package/dist/assets/ReportTableViewSelector-Ig41fOPb-DyEm5Q02.js +151 -0
- package/dist/assets/ReportsPage-CRAVAUTO-D_QRWGM1.js +269 -0
- package/dist/assets/{RevenueChart-SvdhwBcE-DnuVU969.js → RevenueChart-DtQu0KAn-DJYGsojB.js} +13 -13
- package/dist/assets/{ReviewDetailsPage-tT1l4R2r-J1IzgUZg.js → ReviewDetailsPage-vui4TqeA-gjxKkEYH.js} +24 -24
- package/dist/assets/{ReviewOverlay-BoM41t8W-DMbdGoKm.js → ReviewOverlay-CUnL7H-a-BjFaE0id.js} +25 -25
- package/dist/assets/RoleWithToolTip-x2rnvWn9-BzchKu5T.js +22 -0
- package/dist/assets/ScheduleDetailsFixedAssetsPage-D_Cls2jC-CNWyfY4t.js +37 -0
- package/dist/assets/ScheduleDetailsPage-DmSLuM8g-5vyMikmE.js +37 -0
- package/dist/assets/ScheduleSequenceTable-js9_P_Lo-CeLb4ONW.js +326 -0
- package/dist/assets/{ScreenRoutes-zIYoYF9j.js → ScreenRoutes-ziq-yiHW.js} +29 -51
- package/dist/assets/{SetUpAccountSection-sfIB1h4i-Bxp4_1Ay.js → SetUpAccountSection-DYRWWXcL-D3Lz2J4N.js} +13 -13
- package/dist/assets/SignIn-CUJkZb3S-DEoVYbuM.js +491 -0
- package/dist/assets/SignInScreen-CMKiwyNN.js +1 -0
- package/dist/assets/SpendManagementListViewPage-BieufnDb-DWfo1rZv.js +134 -0
- package/dist/assets/SpendManagementPerTabPage-BmUp80QX-D3VMwaS-.js +754 -0
- package/dist/assets/{SpendManagementSection-dT-N4bSQ-C-KttH_X.js → SpendManagementSection-DKZNTYXT-mbKmW3pW.js} +25 -25
- package/dist/assets/{StatementItem-g5tfNBjV-Bi-hDsRm.js → StatementItem-Dyt5Q0eR-DHmcaJ-e.js} +4 -4
- package/dist/assets/StatementsPage-CbtnJM5y-COycJvfL.js +58 -0
- package/dist/assets/{StatusSwitcher-CaoFw0cf-GiyQU_ap.js → StatusSwitcher-BfQ9VbBH-DC0t3Flj.js} +5 -5
- package/dist/assets/SubTabSwitcher-CzGiuhk3-DLbV8WBg.js +58 -0
- package/dist/assets/{SummaryCard-B9wqNSwM-11v6O9yh.js → SummaryCard-D61xzK3a-DMSW9KNv.js} +1 -1
- package/dist/assets/TaskManagementPage-ucVAdv7x-AkXJlFwQ.js +508 -0
- package/dist/assets/TimeRangeSwitcher-C3jXm39I-tjiVSjZN.js +64 -0
- package/dist/assets/TimeframeSwitcher-CcYg-YQJ-C2j1iPoK.js +31 -0
- package/dist/assets/TimeframeSwitcherWithToggle-w4YJno-p-Bi4h2wB2.js +53 -0
- package/dist/assets/{TopExCard-BUjnGDUB-BeOEz96L.js → TopExCard-D2PRxvFc-DTkmCs_e.js} +6 -6
- package/dist/assets/{TopExDetailPage-CNDkfc3u-VyEyAB3F.js → TopExDetailPage-C0uHdU7N-CkEVyz2B.js} +16 -16
- package/dist/assets/{TransactionActivityLogPage-kSQqJVpX-D8owbjDl.js → TransactionActivityLogPage-CqYb19tY-v__opMvt.js} +17 -17
- package/dist/assets/TransactionDetailPage-D-NR_yZG-DdONq5Tf.js +921 -0
- package/dist/assets/TransactionList-f6yB-byH-Oxgdaak4.js +157 -0
- package/dist/assets/{TransactionListBig-Bx_Rm9ho-BGW14qc7.js → TransactionListBig-BrDWayQS-C0zQ3f5X.js} +18 -18
- package/dist/assets/TransactionListPage-C-Z62y2d-DnIWNXku.js +35 -0
- package/dist/assets/{TransactionVendorDetailPage-MjSH5hfq-DTvgMHfi.js → TransactionVendorDetailPage-CQQuAR6V-Dt6j0ppt.js} +6 -6
- package/dist/assets/{TransferDrawerPage-BayVa6po-BJ6bZeVh.js → TransferDrawerPage-DfFm-1-3-Dp1b_ezH.js} +36 -36
- package/dist/assets/TreasuryOverviewPage-CKSanlUG-BJ3RsJkb.js +725 -0
- package/dist/assets/{TreasuryPromoPage-BCjz1EKX-BpLLMqaI.js → TreasuryPromoPage-Dyip3H10-ClQVvPZy.js} +131 -131
- package/dist/assets/TreasuryStatementsPage-mljf2Van-DInZXjo_.js +58 -0
- package/dist/assets/TreasuryTaxLetterPage-D3cV3a-8-CcMHT6vj.js +58 -0
- package/dist/assets/{TrendChart-JTOG0a7B-BX9AXLFe.js → TrendChart-fFlHCvNx-DADa9lxz.js} +5 -5
- package/dist/assets/TrendWithTransactions-It4KDov3-BNez-K-6.js +116 -0
- package/dist/assets/{UncategorizedAccountsMappingPage-TGKYpC5A-BKFDwlEW.js → UncategorizedAccountsMappingPage-BxBz2Ce0-BSZYER7A.js} +15 -15
- package/dist/assets/{UnitIntegrationPage-mt2IjA5X-B32skQ8E.js → UnitIntegrationPage-gVgsk2ji-Dz79ORBq.js} +7 -7
- package/dist/assets/UploadAdditionalDocumentOverlay-C5m8jqup-5PpZVQjf.js +38 -0
- package/dist/assets/{Vendor2FAPopup-DAOf5cJD-DwjPPjyx.js → Vendor2FAPopup-DRwBzOwn-C-SwMKWw.js} +1 -1
- package/dist/assets/VendorACHDetailsPage-By2Ya2bv-CjVBmCig.js +1 -0
- package/dist/assets/VendorDetailPage-jci1LqX3-QbESQx0s.js +257 -0
- package/dist/assets/VendorDomesticWireDetailsPage-uIDE-n5v-CEtT0uGT.js +1 -0
- package/dist/assets/{VendorFiling1099EditablePage-CRnO7Ubw-pmmo56yS.js → VendorFiling1099EditablePage-8pYT3u-X-D-wgniGH.js} +14 -14
- package/dist/assets/VendorFirstReviewPage-CafakxA1-CDJXyRr2.js +730 -0
- package/dist/assets/{VendorInternationalWireDetailsPage-HUtNyn9Z-DG0LXpvu.js → VendorInternationalWireDetailsPage-DJeI-ZFW-DlATitk5.js} +20 -20
- package/dist/assets/VendorInternationalWireSwiftDetailsPage-Co-5nTam-Dq9Sjb3M.js +1 -0
- package/dist/assets/{VendorsAccountsSection-D6Qa1zf9-DAvIVphi.js → VendorsAccountsSection-YX2g8ETe-D60z7JWq.js} +2 -2
- package/dist/assets/{VerifyDevice-B6B_nk3v-KukwEAKH.js → VerifyDevice-DeHW4GAi-COYWduJ8.js} +9 -9
- package/dist/assets/{VideoPlayer-BRAgZThr-DwdwG0wP.js → VideoPlayer-DxIfGrPu-_quRL0IB.js} +2 -2
- package/dist/assets/{VideoPopup-C_SkBI9U-CKyfSxdc.js → VideoPopup-CUP7ctgS-CvuTwYjE.js} +3 -3
- package/dist/assets/{WarningsDrawerPage-B3gB3wW7-U-65Uxte.js → WarningsDrawerPage--s6b380L-kLxITMYx.js} +10 -10
- package/dist/assets/ZeniAccountDetailPage-7NdkdSg3-DUqxr3Vg.js +300 -0
- package/dist/assets/ZeniAccountListViewPage-B-cs_xnc-yymuGC8c.js +443 -0
- package/dist/assets/ZeniAccountNavBarPieces-CjRip0v9-CWaUJ8t5.js +33 -0
- package/dist/assets/{ZeniAccountPromoPage-BgYCHYLO-7ZsLis8J.js → ZeniAccountPromoPage-BikXtkeH-CZNOzkma.js} +23 -23
- package/dist/assets/ZeniAccountSetupPage-BRBsijVt-4J2hs6F_.js +36 -0
- package/dist/assets/{ZeniCopyright-BlLvlGZV-De808LkJ.js → ZeniCopyright-DDGvdmLF-BbItEQ1K.js} +1 -1
- package/dist/assets/{ZeniTransferAmountSlider-BNYgPwHs-D5MCod30.js → ZeniTransferAmountSlider-Cdg0TlHk-C5Juk6O6.js} +4 -4
- package/dist/assets/{add-to-wallet-DgdBD8_G-9o7lYnfw.js → add-to-wallet-DgdBD8_G-BPAwAHT2.js} +1 -1
- package/dist/assets/{analytics-DmFOON3n.js → analytics-B3XlZNQ8.js} +1 -1
- package/dist/assets/{analyticsHelper-DVXRlTVd.js → analyticsHelper-Bnej6boJ.js} +1 -1
- package/dist/assets/{analyticsHelper-CYr5V2MV-Bn9Jn6Ph.js → analyticsHelper-D9xdJK4b-C8beHKtm.js} +1 -1
- package/dist/assets/{arrow-south-east-round-PEovUgvH-DnOaYGVH.js → arrow-south-east-round-PEovUgvH-DYcTfV8-.js} +1 -1
- package/dist/assets/{auto-transfer-rule-mbafm5D3-iayeyD23.js → auto-transfer-rule-mbafm5D3-C0L9GopF.js} +1 -1
- package/dist/assets/chartTypes-Dq3hUz_T-D0weDXco.js +1 -0
- package/dist/assets/commonDimensions-CGHIQ2To-BXIDDuOd.js +1 -0
- package/dist/assets/{commonTypes-DsWS6Ccc-CTYDMfWt.js → commonTypes-BAJPaPYg-BqOkop1Y.js} +1 -1
- package/dist/assets/{constants-Dzfmb5Ph.js → constants-BcG8RJNm.js} +1 -1
- package/dist/assets/{core-0bnVVABN.js → core-DTlL91ob.js} +3 -53
- package/dist/assets/{dash.all.min-DHsg-lqM.js → dash.all.min-wCYxg1-F.js} +1 -1
- package/dist/assets/downloadPdf-BI2Y41h2-DmQ3wa5x.js +1 -0
- package/dist/assets/{empty-CBAa3J1a.js → empty-9h6tGMxX.js} +1 -1
- package/dist/assets/{empty-D_bRDFaE.js → empty-DTLC6acq.js} +1 -1
- package/dist/assets/epic-CSBGbcOS.js +2 -0
- package/dist/assets/{gift-box-Cmt9OgIZ-DQBnQfK-.js → gift-box-Cmt9OgIZ-CvfvQG3y.js} +1 -1
- package/dist/assets/{graphic-no-data-l-DU4J8fDt-DeDC5YLL.js → graphic-no-data-l-DU4J8fDt-ChqWps-8.js} +1 -1
- package/dist/assets/{graphic-no-data-net-burn-l-CzmycA0m-CmCQCnC3.js → graphic-no-data-net-burn-l-CzmycA0m-1sZH3huZ.js} +1 -1
- package/dist/assets/{handshake-BPg58FML-DpmiuH3j.js → handshake-BPg58FML-C8qC_oIS.js} +1 -1
- package/dist/assets/{helper-BMiMbXMj-BAbwbOYZ.js → helper-z5-P4a-y-DCqj7mqg.js} +5 -5
- package/dist/assets/{index-CHSGbJVi.js → index-BRlvHWYX.js} +1 -1
- package/dist/assets/{index-iH933ICY.js → index-BTxAEBwp.js} +2 -8
- package/dist/assets/{index-CDxchNCh.js → index-CTllXPEB.js} +1 -1
- package/dist/assets/{index-mb2rrTlK.js → index-CXoFWELS.js} +1 -1
- package/dist/assets/{index-BOf3FulF.js → index-DA1Z8sqg.js} +1 -1
- package/dist/assets/{index-BN9gOVoX.js → index-DivE10Xm.js} +1 -1
- package/dist/assets/{index-B6YQjyMc.js → index-nssLOVFu.js} +5040 -5105
- package/dist/assets/{lexical-aEmQVmum.js → lexical-CoKvBbaA.js} +1 -1
- package/dist/assets/liveblocks-offUbtxr.js +54 -0
- package/dist/assets/lottie-Cqel28AC.js +2 -0
- package/dist/assets/mapLoadingInProgressToTreeNode-DrC2Zs2y-BuaBdgp1.js +1 -0
- package/dist/assets/{mapSectionWithAcOnlyToTreeNode-BkPRWtaj-sINzyEMC.js → mapSectionWithAcOnlyToTreeNode-dsBogxKz-D78gQ4Dn.js} +1 -1
- package/dist/assets/mapSpacerToTreeNode-DMDEaLzQ-ibbyX8vz.js +1 -0
- package/dist/assets/mapTimeframeBalancesToTreeNode-CW_wzI5T-he6bfb8d.js +1 -0
- package/dist/assets/mapTimeframeBalancesToTreeNode-DvfKBCs5-GyIWCN5D.js +1 -0
- package/dist/assets/{mapTimeframeHeaderLoadingInProgressToTreeNode-Ch2rvcz4-LpLxG78D.js → mapTimeframeHeaderLoadingInProgressToTreeNode-CGdkzFsp-DlA9TyjC.js} +1 -1
- package/dist/assets/{mui-BMACe6Rq.js → mui-BVCBQYdL.js} +1 -9
- package/dist/assets/{page-detail-CWX5S47F-BHiPg_uV.js → page-detail-CWX5S47F-D1vlmLcE.js} +1 -1
- package/dist/assets/panelSelectedMixin-Cddsb26L-CSqoRxwG.js +3 -0
- package/dist/assets/{radio-default-CiSgisfh-DS1u1o7i.js → radio-default-CiSgisfh-BGMZB5pj.js} +1 -1
- package/dist/assets/{react-Bq4TJ-7l.js → react-BEal1Iuh.js} +2 -12
- package/dist/assets/{react-BM9QcOkQ.js → react-BXvNRT2q.js} +2 -12
- package/dist/assets/{react-CVtyWQMs.js → react-CLksnFSH.js} +2 -12
- package/dist/assets/{react-CtbvVn8_.js → react-CSBaF2r0.js} +2 -12
- package/dist/assets/{react-TZk5oBcm.js → react-C_JPVQ2C.js} +2 -12
- package/dist/assets/{react-DPF6cpPb.js → react-DRddHEvz.js} +2 -12
- package/dist/assets/react-QuNdLWH0.js +19 -0
- package/dist/assets/{react-gzX4tXLY.js → react-jkd7J1Kg.js} +3 -13
- package/dist/assets/{recharts-BogDwoBa.js → recharts-DAsNs3BU.js} +36 -44
- package/dist/assets/{sentry-PE_t7E3E.js → sentry-Fca4mdIl.js} +2 -17
- package/dist/assets/{shield-DOlUxcFf-DZBeAJz1.js → shield-DOlUxcFf-CRgtaaqW.js} +1 -1
- package/dist/assets/toCOABalancesWithID-P7keEtAg-DZcYuHA-.js +1 -0
- package/dist/assets/toChartData-BUf5HHim-DGDFToOH.js +1 -0
- package/dist/assets/upload-reimbursement-receipt-O2N8vcO7-BVwF7gzx.js +1 -0
- package/dist/assets/{uploadAttachment-BlLqRIXe-BKyY67pY.js → uploadAttachment-DJA30WSD-CHN4VO1K.js} +32 -32
- package/dist/assets/uploadReceipts-CqDftTRt-Bj47leio.js +1 -0
- package/dist/assets/{url-DVzciwrr.js → url-DdD720VJ.js} +1 -1
- package/dist/assets/{url-syTA0K_c.js → url-DkjikAwv.js} +1 -1
- package/dist/assets/{useLongPress-GCK2COYQ-BtTqIKk8.js → useLongPress-GCK2COYQ-DXicXlES.js} +1 -1
- package/dist/assets/{usp-line-BBd1wKwW-sua1EB0C.js → usp-line-BBd1wKwW-BQlBhf7H.js} +1 -1
- package/dist/assets/{utils-hiWEDg_f.js → utils-Cgs4R-d4.js} +4 -38
- package/dist/assets/zeni-epic-state-BZv12Eez.js +14 -0
- package/dist/index.html +1 -1
- package/package.json +6 -6
- package/dist/assets/ACHDetailsPage-fOu5grd7-Bx2C4blB.js +0 -21
- package/dist/assets/AccountInfoPage-o7hTXtgZ-B74V9GXq.js +0 -18
- package/dist/assets/AccountRow-CpftykFx-1CclEkfP.js +0 -298
- package/dist/assets/AddAddressForCardDrawer-vecchYEf-DPMrCTyq.js +0 -6
- package/dist/assets/ApAgingDetailPage-BOV1WFVF-_lX-suFq.js +0 -46
- package/dist/assets/AppBasePage-DMlomvFS-BTCiknIH.js +0 -71
- package/dist/assets/AppDrawerContent-Dc2sHnR3-D8okbvYL.js +0 -92
- package/dist/assets/ApprovalRulesSettingsPage-BnbPSy4U-DSt1190C.js +0 -47
- package/dist/assets/ArAgingDetailPage-b_NpDpWj-DH_prAGq.js +0 -46
- package/dist/assets/BillDetailPage-7TMkWo3V-S7BIfZxn.js +0 -266
- package/dist/assets/BillPayPromoPage-AGffhbY3-BjWg1E0M.js +0 -84
- package/dist/assets/CardNumberSubText-DqtLT1w5-B46iNAOk.js +0 -21
- package/dist/assets/CollapsableReportTable-CDEe9s_E-D9cKaH7m.js +0 -2844
- package/dist/assets/ConfettiBurst-BizTW0hz-vSY8T_bA.js +0 -1
- package/dist/assets/CurrencySelectField-KvKyemY6-CJmA3Wvi.js +0 -139
- package/dist/assets/CustomerOnboardingContainerPage-CRjwWFLJ-DO7DyeYZ.js +0 -1
- package/dist/assets/CustomerOnboardingNoStepsPage-CWF_00EM-CXYa-GDt.js +0 -66
- package/dist/assets/DashboardSidebarBackgroundAnimation-UV2CZToG-B6y2S4Cq.js +0 -12
- package/dist/assets/DepositAccTransactionItem-BY_OvuKg-dj2FrVtH.js +0 -76
- package/dist/assets/DepositAccTransactionListPage-a__bpCOB-BluH7tQU.js +0 -66
- package/dist/assets/DomesticWireDetailsPage-BumMT4QM-CJrvKjn9.js +0 -21
- package/dist/assets/DownloadOverlay-DqiL3-FB-B8nIxgA_.js +0 -439
- package/dist/assets/EditPeoplePage-BcsdEp_d-DZzsTLqP.js +0 -55
- package/dist/assets/EditReimbursementDetailPage-DNUmwdsH-B4a1wTnV.js +0 -865
- package/dist/assets/EntityDetailPage-DtX5TjBc-Cz9GurHm.js +0 -18
- package/dist/assets/ExpenseAutomationPage-B8C4BxoV-u_k6mu8a.js +0 -1703
- package/dist/assets/GlobalReviewListPage-4eiopkzw-S_0cIn_Q.js +0 -291
- package/dist/assets/InsightsSection-De9zu_me-wp-DJULP.js +0 -27
- package/dist/assets/InternationalWireVerificationPage-CDf7equc-C1nheAmV.js +0 -65
- package/dist/assets/InvitePeoplePage-Db4P4ZEq-Bqa6PJOp.js +0 -12
- package/dist/assets/InvoiceUploadSection-DYCjz9CI-Di7iZ3rh.js +0 -140
- package/dist/assets/LabeledAddressValueField-C6-hVsPb-CtbiD4R7.js +0 -45
- package/dist/assets/LabeledControlledCheckBoxField-CgZg0uOW-wOvZo1jz.js +0 -16
- package/dist/assets/LabeledDocumentField-Bp9m-OrP-6oGXwzm5.js +0 -41
- package/dist/assets/LabeledDropDownFormattedTextField-3-KekP79-BGZG_uLh.js +0 -59
- package/dist/assets/MagicLinkACHDetailsPage-C494txw0-CtQxqwR2.js +0 -1
- package/dist/assets/MagicLinkDomesticWireDetailsPage-CONBCbOQ-u4Z3GzMp.js +0 -1
- package/dist/assets/MagicLinkSuccessPage-BDRXSAO4-1yGDs4x9.js +0 -31
- package/dist/assets/MailingDetailsSection-DZT7JPlI-BX3TaQM5.js +0 -21
- package/dist/assets/MyPendingActivationChargeCardListPage-BJrk56oA-Bz1XOWUw.js +0 -6
- package/dist/assets/MyProfileSettingsPage-L9WuP6HZ-Bt0r3vIg.js +0 -85
- package/dist/assets/NotificationsListConfig-Bn1zmx6b-Byv3SuTE.js +0 -1
- package/dist/assets/NotificationsPage-DDwdR_Jq-CH4xdkvF.js +0 -685
- package/dist/assets/OpExByVendorPage-DukFYlqO-DkROpQmO.js +0 -100
- package/dist/assets/PandLWithForecastPage-Bgflh9Om-CgCfrHLq.js +0 -107
- package/dist/assets/PeoplePage-CDvKreQl-B9V6YZRP.js +0 -675
- package/dist/assets/ReimbursementDetailPage-oIC9QEyF-Uf6XrKw7.js +0 -314
- package/dist/assets/ReimbursementPromoPage-BKgsJieE-Ba5GJbn1.js +0 -84
- package/dist/assets/ReimbursementsBulkReviewDrawerPage-CeyGWbKR-CiYOGkop.js +0 -1
- package/dist/assets/ReportTableViewSelector-CXDvZEbR-D-19omxr.js +0 -150
- package/dist/assets/ReportsPage-BoUyXSBC-BPepWXQn.js +0 -121
- package/dist/assets/RoleWithToolTip-C8x5yXaK-CQXsYwpy.js +0 -22
- package/dist/assets/ScheduleDetailsFixedAssetsPage-Bkp0mCOn-DeRr8BY-.js +0 -37
- package/dist/assets/ScheduleDetailsPage-Dg9rYJbn-CdqlXj9r.js +0 -37
- package/dist/assets/ScheduleSequenceTable-J6Eja8XA-DQymfbIV.js +0 -324
- package/dist/assets/SignIn-Cu2nzuEC-BHDNnRC4.js +0 -491
- package/dist/assets/SignInScreen-CvmuZ_lu.js +0 -1
- package/dist/assets/SpendManagementListViewPage-9V9u1jPF-C5LGJAJr.js +0 -134
- package/dist/assets/SpendManagementPerTabPage-COvEPq7V-AOv-04sa.js +0 -754
- package/dist/assets/StatementsPage-DaFrVUeK-BtS_jxBA.js +0 -58
- package/dist/assets/SubTabSwitcher-zrkVj1aP-CypqPMQM.js +0 -58
- package/dist/assets/TaskManagementPage-dAK9tl2b-DQNorVRE.js +0 -508
- package/dist/assets/TimeRangeSwitcher-r1TNqVRb-DyxsJ7t-.js +0 -64
- package/dist/assets/TimeframeSwitcher-DHfHCTa4-pMvLfkus.js +0 -31
- package/dist/assets/TimeframeSwitcherWithToggle-DvBvguRl-p_rilr-D.js +0 -31
- package/dist/assets/TransactionDetailPage-f7vWtXWL-DikOynRj.js +0 -903
- package/dist/assets/TransactionList-3-mUZOsw-6t-FD8kN.js +0 -153
- package/dist/assets/TransactionListPage-q6x4_jni-BvfvZkop.js +0 -35
- package/dist/assets/TreasuryOverviewPage-CuqWmrO5-CcwdLzTa.js +0 -708
- package/dist/assets/TreasuryStatementsPage-CGr00SXF-Ddcqn0VF.js +0 -58
- package/dist/assets/TreasuryTaxLetterPage-D9_qnlK4-DQDhOxJb.js +0 -58
- package/dist/assets/TrendWithTransactions-CTJhTpAM-CBPz9x-U.js +0 -116
- package/dist/assets/UploadAdditionalDocumentOverlay-DZfpwE5J-CmJMJ8QJ.js +0 -38
- package/dist/assets/VendorACHDetailsPage-CCOupiSZ-CMh3oX0P.js +0 -1
- package/dist/assets/VendorDetailPage-DufNphGD-CHkH3Fl_.js +0 -257
- package/dist/assets/VendorDomesticWireDetailsPage-BayV34Rt-a9y8S9df.js +0 -1
- package/dist/assets/VendorFirstReviewPage-DA0EL4RJ-C2ni5B1z.js +0 -730
- package/dist/assets/VendorInternationalWireSwiftDetailsPage-DRVMUeXi-BUPq8BsG.js +0 -1
- package/dist/assets/ZeniAccountDetailPage-Dp-eo-Vq-DVqZeKKS.js +0 -300
- package/dist/assets/ZeniAccountListViewPage-S-XmAYqD-CVsdQb-e.js +0 -441
- package/dist/assets/ZeniAccountNavBarPieces-DhjBxfEr-B3kNTCpc.js +0 -14
- package/dist/assets/ZeniAccountSetupPage-CvnIMdcY-Dd6KWWuP.js +0 -36
- package/dist/assets/chartTypes-40RenddT-cfd9O-7K.js +0 -1
- package/dist/assets/commonDimensions-BMnB1-xU-Dv2z_hsS.js +0 -1
- package/dist/assets/detailCommon-CrcyqWtZ-3mnJnM3j.js +0 -38
- package/dist/assets/downloadPdf-CUUx8PWn-DWs7sODc.js +0 -1
- package/dist/assets/epic-BDsnfsiq.js +0 -2
- package/dist/assets/liveblocks-t9znRICt.js +0 -67
- package/dist/assets/lottie-CQ9eYGiF.js +0 -9
- package/dist/assets/mapLoadingInProgressToTreeNode-DGnyXKBT-CjYqP6ia.js +0 -1
- package/dist/assets/mapSpacerToTreeNode-CvGdU9Ma-DuWN8s0E.js +0 -1
- package/dist/assets/mapTimeframeBalancesToTreeNode-BCOsOvxo-DzqHbBKU.js +0 -1
- package/dist/assets/mapTimeframeBalancesToTreeNode-DIqYP3NK-AJxyBrea.js +0 -1
- package/dist/assets/panelSelectedMixin-CzfD5-Zs-BQG398jA.js +0 -4
- package/dist/assets/react-DCKkBuNc.js +0 -37
- package/dist/assets/toCOABalancesWithID-DkMGvlEt-Bl2QmqAg.js +0 -1
- package/dist/assets/toChartData-C6s-eBzE-DllwI7S_.js +0 -1
- package/dist/assets/uploadReceipts-Dge0cNF1-BGDnYNyn.js +0 -1
- package/dist/assets/zeni-epic-state-DBzXvQ_H.js +0 -151
|
@@ -0,0 +1,3015 @@
|
|
|
1
|
+
import{o as n,c3 as Fl,X as be,bQ as tr,bR as nr,V as t,cy as Bl,bD as _l,ab as Ze,aT as ir,u as f,O as me,ak as st,an as Re,cz as Vl,ac as O,x as G,y as Tt,bE as Nl,ir as Ul,aQ as it,c1 as xe,dv as Fi,eK as Wl,bx as Hl,p as he,au as ql,f2 as Qt,L as qn,e6 as Xe,b5 as Kn,dC as or,bt as Kl,gu as Jl,ip as Ql,hg as Gl,h8 as sr,by as Zl,bW as ot,b9 as Jn,bM as ar,kB as Yl,ao as Ye,ce as Xl,n as rr,bb as lr,as as No,aa as xn,bT as Uo,ae as fn,kC as ec,kD as tc,kE as nc,kF as _n,kG as cr,kH as dr,kI as ic,kJ as ps,kK as oc,e9 as ur,dA as hr,kL as sc,kM as ac,kN as rc,kO as lc,kP as cc,kQ as dc,kR as uc,kS as hc,kT as pc,kU as mc,kV as pr,kW as gc,kX as xc,kY as fc,kZ as yc,gR as Wo,cl as Qn,cC as Bi,v as mr,A as gr,cQ as Gn,ec as Ho,c as qo,dx as wc,bq as Cc,cs as bc,cc as vc,c9 as Zn,cv as Yn,cI as Xn,cL as ei,k_ as Sc,dU as qe,w as yt,dy as ti,dc as Jt,iA as xr,fY as kc,aG as fr,k$ as jc,aX as Ko,aS as ms,ha as yr,l0 as $c,l1 as Ic,l2 as Tc,bH as wr,aV as Lc,gZ as Kt,id as Ki,e$ as Ti,cU as Jo,aA as Ac,f0 as Cr,bV as Rc,gb as Ec,hk as br,e as Dc,l3 as Mc,gU as gs,j2 as xs,aq as $t,e4 as vr,l4 as Sr,j8 as Oc,i0 as Pc,gS as Li,jz as fs,l5 as zc,a$ as Fc,dG as kr,b as Wn,iJ as jr,iS as Eo,l6 as In,eA as $r,eC as Ir,jb as Do,jc as Tr,a_ as Qo,k1 as Bc,k2 as _c,l7 as Vc,da as _i,iK as Lr,fM as Ar,l8 as Nc,eS as Ji,aM as Mo,d9 as Rr,l9 as Uc,cZ as Wc,iZ as Hc,ea as qc,la as Kc,gX as Jc,b3 as Qi,eM as Qc,g5 as Gc,lb as Zc,e3 as Yc,hR as Xc,a9 as ed,eP as td,eQ as nd,eR as id,eU as ys,eV as ws,eW as od,h0 as sd,b1 as ad,f4 as rd,f5 as ld,f6 as cd}from"./index-nssLOVFu.js";import{a as s,P as dd}from"./sentry-Fca4mdIl.js";import{n as o,c as re,k as Vi}from"./mui-BVCBQYdL.js";import{bh as ud,kP as hd,Hk as Cs,Hl as Hn,Hm as pd,Hn as md,cy as gd,bI as Oi,cz as xd,c3 as Go,Ho as fd,FJ as bs,cA as yd,cB as wd,l$ as Vn,bT as ln,Hp as vs,Hq as Cd,b_ as Er,bo as cn,Hr as bd,Hs as Dr,Ht as Mr,Hu as Or,Hv as Pr,Hw as zr,Hx as Zo,lo as vd}from"./zeni-epic-state-BZv12Eez.js";import{t as Yo}from"./panelSelectedMixin-Cddsb26L-CSqoRxwG.js";import{m as Fr,n as Br,a as Tn,t as Mt}from"./CollapsableReportTable-h0vIfI8o-Bg2RfRDJ.js";import{N as Gi}from"./AccountRow-BrW_eEjE-HoBl8v8H.js";import{o as _r}from"./mapTimeframeBalancesToTreeNode-DvfKBCs5-GyIWCN5D.js";import{d as Ss}from"./mapLoadingInProgressToTreeNode-DrC2Zs2y-BuaBdgp1.js";import{h as Sd}from"./VendorsAccountsSection-YX2g8ETe-D60z7JWq.js";import{u as kd,c as ks,d as jd,m as $d}from"./uploadAttachment-DJA30WSD-CHN4VO1K.js";import{r as Pi}from"./core-DTlL91ob.js";import{t as Id}from"./upload-reimbursement-receipt-O2N8vcO7-BVwF7gzx.js";import"./liveblocks-offUbtxr.js";import"./lottie-Cqel28AC.js";import"./recharts-DAsNs3BU.js";import"./analytics-B3XlZNQ8.js";import"./lexical-CoKvBbaA.js";import"./utils-Cgs4R-d4.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new e.Error().stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="e0522cfb-2a87-47bd-a4a1-b46e13e37488",e._sentryDebugIdIdentifier="sentry-dbid-e0522cfb-2a87-47bd-a4a1-b46e13e37488")}catch{}})();const{common:{navBar:{back:Td},texts:{refresh:Ld,close:Ad,copy:Rd,copied:Ed,open:Dd}},expenseAutomation:{common:{numbers:{maximumCount:Md}}}}=me.getLocalizedStrings(),Od=o(Rc)`
|
|
2
|
+
display: flex;
|
|
3
|
+
width: ${n.sp4};
|
|
4
|
+
height: ${n.sp4};
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
`,Pd=o.div`
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
position: relative;
|
|
12
|
+
cursor: ${e=>e.isDisabled?"not-allowed":"pointer"};
|
|
13
|
+
color: ${e=>e.theme.colors.hero};
|
|
14
|
+
&:hover {
|
|
15
|
+
color: ${e=>e.theme.colors.primary};
|
|
16
|
+
}
|
|
17
|
+
`,zd=o.div`
|
|
18
|
+
width: 100%;
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-shrink: 0;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
background: ${e=>e.theme.colors.grey4};
|
|
23
|
+
box-sizing: border-box;
|
|
24
|
+
position: sticky;
|
|
25
|
+
top: 0;
|
|
26
|
+
z-index: 6;
|
|
27
|
+
`,js=o.div`
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
align-items: center;
|
|
31
|
+
padding-left: ${e=>Is.subSectionContainerLeftRightPadding.valuePx(e.windowSize)};
|
|
32
|
+
padding-right: ${e=>Is.subSectionContainerLeftRightPadding.valuePx(e.windowSize)};
|
|
33
|
+
`,Fd=o.div`
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: baseline;
|
|
36
|
+
justify-content: end;
|
|
37
|
+
gap: ${n.sp4};
|
|
38
|
+
flex: 1 1 ${n.sp0};
|
|
39
|
+
`,Bd=o.div`
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: baseline;
|
|
42
|
+
justify-content: start;
|
|
43
|
+
gap: ${n.sp4};
|
|
44
|
+
flex: 1 1 ${n.sp0};
|
|
45
|
+
`,_d=o(br)`
|
|
46
|
+
width: ${n.sp3};
|
|
47
|
+
height: ${n.sp3};
|
|
48
|
+
cursor: pointer;
|
|
49
|
+
margin-left: ${n.sp1};
|
|
50
|
+
color: inherit;
|
|
51
|
+
`,Vd=o(Ec)`
|
|
52
|
+
width: ${n.sp3};
|
|
53
|
+
height: ${n.sp3};
|
|
54
|
+
margin-left: ${n.sp1};
|
|
55
|
+
color: ${he.success};
|
|
56
|
+
`,Nd=o(qo)`
|
|
57
|
+
cursor: pointer;
|
|
58
|
+
width: ${n.sp4};
|
|
59
|
+
height: ${n.sp4};
|
|
60
|
+
color: ${e=>e.theme.colors.hero};
|
|
61
|
+
&:hover {
|
|
62
|
+
color: ${e=>e.theme.colors.primary};
|
|
63
|
+
}
|
|
64
|
+
`,Ud=o(vc)`
|
|
65
|
+
cursor: pointer;
|
|
66
|
+
width: ${n.sp4};
|
|
67
|
+
height: ${n.sp4};
|
|
68
|
+
color: ${e=>e.theme.colors.hero};
|
|
69
|
+
&:hover {
|
|
70
|
+
color: ${e=>e.theme.colors.primary};
|
|
71
|
+
}
|
|
72
|
+
`,Wd=o(bc,{shouldForwardProp:e=>typeof e=="string"&&e!=="$spinning"})`
|
|
73
|
+
cursor: pointer;
|
|
74
|
+
width: ${n.sp4};
|
|
75
|
+
height: ${n.sp4};
|
|
76
|
+
color: ${e=>e.theme.colors.hero};
|
|
77
|
+
animation: ${e=>e.$spinning?re`
|
|
78
|
+
${Hd} 2s linear infinite;
|
|
79
|
+
`:"none"};
|
|
80
|
+
&:hover {
|
|
81
|
+
color: ${e=>e.theme.colors.primary};
|
|
82
|
+
}
|
|
83
|
+
`,Hd=Vi`
|
|
84
|
+
0% {
|
|
85
|
+
transform: rotate(0deg);
|
|
86
|
+
}
|
|
87
|
+
100% {
|
|
88
|
+
transform: rotate(360deg);
|
|
89
|
+
}
|
|
90
|
+
`,qd=o.div`
|
|
91
|
+
width: 100%;
|
|
92
|
+
`,Kd=o.div`
|
|
93
|
+
padding-top: ${n.sp0};
|
|
94
|
+
padding-bottom: ${n.sp0};
|
|
95
|
+
`,$s=o(Re)`
|
|
96
|
+
color: ${e=>e.theme.colors.hero};
|
|
97
|
+
text-align: center;
|
|
98
|
+
display: flex;
|
|
99
|
+
align-items: center;
|
|
100
|
+
justify-content: center;
|
|
101
|
+
flex-direction: column;
|
|
102
|
+
padding-bottom: ${n.sp4};
|
|
103
|
+
`,Jd=o.div`
|
|
104
|
+
display: flex;
|
|
105
|
+
`,Qd=o.div`
|
|
106
|
+
border: 1px solid ${e=>e.theme.colors.grey3};
|
|
107
|
+
width: 100%;
|
|
108
|
+
margin-top: -2px;
|
|
109
|
+
border-top-right-radius: ${n.sp2};
|
|
110
|
+
border-top-left-radius: ${n.sp2};
|
|
111
|
+
border-bottom-right-radius: ${n.sp2};
|
|
112
|
+
border-bottom-left-radius: ${n.sp2};
|
|
113
|
+
`,Gd=o.div`
|
|
114
|
+
display: flex;
|
|
115
|
+
height: ${n.sp4};
|
|
116
|
+
`,Zd=o.div`
|
|
117
|
+
text-align: center;
|
|
118
|
+
display: flex;
|
|
119
|
+
align-items: center;
|
|
120
|
+
justify-content: center;
|
|
121
|
+
flex-wrap: wrap;
|
|
122
|
+
`,Yd=o.div`
|
|
123
|
+
display: flex;
|
|
124
|
+
flex-direction: column;
|
|
125
|
+
`,Xd=o(Qt)`
|
|
126
|
+
width: ${n.sp3};
|
|
127
|
+
height: ${n.sp3};
|
|
128
|
+
margin-right: ${n.sp1};
|
|
129
|
+
path {
|
|
130
|
+
stroke-width: 2;
|
|
131
|
+
}
|
|
132
|
+
`,ui=o.span`
|
|
133
|
+
font-weight: ${Zn.regular};
|
|
134
|
+
color: ${e=>e.theme.colors.primary};
|
|
135
|
+
`,eu=o.span`
|
|
136
|
+
font-weight: ${Zn.medium};
|
|
137
|
+
color: ${e=>e.theme.colors.primary};
|
|
138
|
+
`,tu=o.span`
|
|
139
|
+
color: ${e=>e.theme.colors.primary};
|
|
140
|
+
text-decoration: underline;
|
|
141
|
+
text-decoration-color: ${e=>e.theme.colors.grey2};
|
|
142
|
+
cursor: pointer;
|
|
143
|
+
display: flex;
|
|
144
|
+
align-items: center;
|
|
145
|
+
transition: text-decoration-color 0.2s;
|
|
146
|
+
.copy-icon {
|
|
147
|
+
color: ${e=>e.theme.colors.hero};
|
|
148
|
+
transition: color 0.2s;
|
|
149
|
+
}
|
|
150
|
+
&:hover {
|
|
151
|
+
.copy-icon {
|
|
152
|
+
color: ${e=>e.theme.colors.primary};
|
|
153
|
+
}
|
|
154
|
+
text-decoration-color: ${e=>e.theme.colors.primary};
|
|
155
|
+
}
|
|
156
|
+
`,Is={subSectionContainerLeftRightPadding:new G(f[3],f[6],f[8])},nu=({onAllThreadsClick:e,companyId:i,companyName:l})=>{const r={application:"cockpit",companyId:i,entityId:i,tab:"expense_automation",isGlobalComment:!1,entityType:"expense_automation.monthEndEmail",companyName:l,url:window.location.href},{url:h,...d}=r,a={...d},{threads:c,isLoading:u}=wc(a,!1,!1),m=c.filter(p=>p.id.includes(ur)===!1);return t.jsxs(Pd,{isDisabled:u,onClick:e,"data-testid":O("comment-icon"),children:[t.jsx(Cc,{count:m.length,isLoading:u}),t.jsx(Od,{})]})},iu=({headerData:e,refreshStatus:i,searchText:l,companyName:r,companyId:h,isZeniUser:d,onAllThreadsClick:a,onClose:c,onRefresh:u,onSearchTextChanged:m})=>{const p=()=>{i!=="In-Progress"&&u()};return t.jsx(Fd,{children:e.rightSection.map((g,x)=>{switch(g){case"search":return t.jsx(Ql,{isSearchOpen:(l.length??0)>0,searchPlaceHolder:e.searchPlaceholder,searchText:l,searchTextBoxStyle:{position:"initial",height:"fit-content"},styledSearchIconContainerStyle:{height:n.sp4},searchIconMarginRight:n.sp0,onSearchTextChanged:y=>{m(y)},downloadPresent:!1},x+g);case"refresh":return t.jsx(xe,{display:"block",placement:"bottom",title:Ld,style:{marginTop:"2px"},enterDelay:600,children:t.jsx(Wd,{onClick:p,$spinning:i==="In-Progress","data-testid":O("refresh-icon")})},x+g);case"comment":return d===!1?null:t.jsx(nu,{companyId:h,companyName:r,onAllThreadsClick:a});case"close":default:return t.jsx(xe,{display:"block",placement:"bottom",title:Ad,enterDelay:600,style:{marginTop:"2px"},children:t.jsx(Nd,{onClick:c,"data-testid":O("close-icon")})},x+g)}})})},ou=({headerData:e,onBack:i})=>t.jsx(Bd,{children:e.leftSection.map((l,r)=>{switch(l){case"back":default:return t.jsx(xe,{display:"block",placement:"bottom",title:Td,enterDelay:600,style:{marginTop:"-14px"},children:t.jsx(Ud,{onClick:i,"data-testid":O("back-button")})},r+l)}})}),Ts=({text:e,linkText:i,windowSize:l,isCopied:r,onLinkClick:h})=>{if(i==null||!i)return t.jsxs(ui,{windowSize:l,children:[e," "]});const d=e.indexOf(i);if(d===-1)return t.jsxs(ui,{windowSize:l,children:[e," "]});const a=e.substring(0,d),c=e.substring(d+i.length);return t.jsxs(t.Fragment,{children:[a?t.jsxs(ui,{windowSize:l,children:[a.trim()," "]}):null,t.jsx(xe,{display:"flex",placement:"right",title:sr.test(i)?r?Ed:Rd:Dd,enterTouchDelay:600,children:t.jsxs(tu,{onClick:()=>h?.(i),"data-testid":O("pre-link"),children:[i,r?t.jsx(Vd,{className:"success-icon"}):t.jsx(_d,{className:"copy-icon"})]})}),c?t.jsxs(ui,{windowSize:l,children:[c," "]}):null]})},Ls=({subTitles:e})=>{const i=be(),[,l]=Gl(),[r,h]=s.useState(!1),d=s.useRef(null),a=s.useCallback(c=>{sr.test(c)?(l(c),h(!0),d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{h(!1)},2e3)):window.open(c,"_blank","noopener,noreferrer")},[l]);return s.useEffect(()=>()=>{d.current&&clearTimeout(d.current)},[]),t.jsx(Yd,{children:e.map((c,u)=>t.jsxs(Zd,{"data-testid":O("subtitle-item",u.toString()),children:[c.pre?t.jsx(Ts,{text:c.pre,linkText:c.preLink,windowSize:i,isCopied:r,onLinkClick:a}):null,c.prefixIconName?t.jsx(t.Fragment,{children:c.prefixIconName==="zeniAIIcon"?t.jsx(Xd,{}):t.jsx(t.Fragment,{})}):null,c.bold?t.jsx(t.Fragment,{children:t.jsxs(eu,{windowSize:i,children:[c.bold," "]})}):null,c.post?t.jsx(Ts,{text:c.post,linkText:c.postLink,windowSize:i,isCopied:r,onLinkClick:a}):null]},u+c.bold+c.pre+c.post))})};function su(e){const{headerData:i,currentTab:l,completionStatus:r,onUpdateTab:h,selectedReconAccountId:d,getTabCountAndFetchState:a,reconcileDetailPageFetchState:c,forceShowSubtitle:u,currentSelectedView:m,currentMissingReceiptsTab:p,onMissingReceiptsTabUpdate:g,onReconTabUpdate:x,currentRecontab:y,navBarCustomElement:C,titleStyle:v={},hideEmptyDivBelowTabs:I=!1,belowTabsSlot:k}=e,T=a("autoCategorized")?.count??0,$=a("review")?.count??0,w=a("reconcile")?.count??0,S=i.tabs.length>0||i.subTitle.length>0,j=m==="transaction_categorization"&&l==="autoCategorized",b=m==="reconciliation"&&y==="review"&&d!=null,z=m==="reconciliation"&&y==="reconcile"&&d!=null,A=j?T>0:b?c==="In-Progress"?!0:$>0:z?c==="In-Progress"?!0:w>0:r!=="complete",M=Tt(),_=be();let W=[];i.tabs.length>0&&(W=i.tabs.map(L=>({label:L.label,id:L.id,countDetails:a(L.id)})));const H=i.tabs.some(L=>(m==="reconciliation"?L.id===y:m==="missing_receipts"?L.id===p:L.id===l)&&L.subTitle.length>0);return t.jsxs(zd,{children:[t.jsx(Nl,{title:i.title,subTitle:i.subText,titleTextStyles:{flex:"1 1 0px"},backgroundColor:M.colors.grey4,onBackClick:()=>null,titleStyle:v,ignoreScrollAction:m!=="month_end_insights",keepBackgroundOnScroll:m!=="month_end_insights",leftSideComponent:t.jsx(ou,{...e}),rightSideComponent:t.jsx(iu,{...e}),source:"NavBarWithHeader"}),C??null,t.jsx(Ze,{controller:S===!0,children:t.jsx(js,{windowSize:_,children:i.tabs.length>0?t.jsxs(t.Fragment,{children:[t.jsx(Kd,{windowSize:_,children:t.jsx(Ul,{allTabs:W,selectedTab:m==="transaction_categorization"?l??W[0].id:m==="missing_receipts"?p??W[0].id:y??W[0].id,onTabChange:L=>{if(m==="transaction_categorization"){const P=pd(L.id);P!=null&&h(P)}else if(m==="reconciliation"){const P=md(L.id);P!=null&&x(P)}else m==="missing_receipts"&&g?.(L.id)},maximumCountLimit:Md})}),t.jsx(Qd,{windowSize:_}),I!==!0?t.jsx(Gd,{}):null,t.jsx(Ze,{controller:(A===!0||u===!0)&&H,children:t.jsx($s,{windowSize:_,"data-testid":O("subtitle-container"),children:i.tabs.map((L,P)=>(m==="reconciliation"?L.id===y:m==="missing_receipts"?L.id===p:L.id===l)?t.jsx(Jd,{"data-testid":O("subtitle-wrapper",L.id),children:t.jsx(Ls,{subTitles:L.subTitle})},P+L.id):null)})})]}):t.jsx(Ze,{controller:A===!0||u===!0,children:t.jsx($s,{windowSize:_,children:t.jsx(Ls,{subTitles:i.subTitle})})})})}),k!=null?t.jsx(js,{windowSize:_,children:t.jsx(qd,{children:k})}):null]})}const au=1;function ru({name:e,checkBoxes:i,mode:l,isDisabled:r,style:h,labelStyle:d,labelCheckBoxStyle:a,checkBoxStyle:c,width:u,registerOptions:m,checkedIconColor:p,checkBoxIconStyle:g,checkBoxContainerStyle:x,draggable:y=!1,selectionLimit:C,infoIconContainerStyle:v,onDragStart:I,rowHeight:k=40,initialScrollOffSet:T,onScroll:$}){const w=be(),S=s.useRef(null),{control:j}=Jo(),b=i.find(_=>_.groupLabel),z=i.filter(_=>!_.groupLabel),A=[];for(const _ of z)if(_.isException||A.push(_.value),C!=null&&A.length===C+1)break;const M=i.filter(_=>_.defaultChecked).map(_=>_.value);return t.jsx(Cr,{control:j,name:e,rules:m,defaultValue:M,render:({field:{value:_,ref:W,onChange:H}})=>{const L=P=>{cu({event:P,value:_,allCheckBoxValues:A,groupLabelCheckBox:b,onChange:H})};return t.jsxs(du,{style:h,windowSize:w,children:[b&&t.jsx(Xo,{checkBox:b,index:0,value:_,allCheckBoxValues:A,mode:l,name:e,checkBoxContainerStyle:x,checkBoxIconStyle:g,checkBoxStyle:c,labelCheckBoxStyle:a,labelStyle:d,width:u,draggable:y,groupLabelCheckBox:b,infoIconContainerStyle:v,checkedIconColor:p,isDisabled:r,selectionLimit:C,onDragStart:I,ref:W,onChangeHandler:L}),t.jsx(uu,{children:t.jsx(Kn,{style:{height:"100%",width:"100%"},children:({height:P,width:ae})=>t.jsx(Bi,{ref:S,height:P,width:ae,itemCount:z.length,itemSize:()=>k,estimatedItemSize:k,initialScrollOffset:T??0,onScroll:({scrollOffset:V})=>{$?.(V)},overscanCount:au,itemKey:V=>z[V].value,itemData:{checkBoxes:z,value:_,allCheckBoxValues:A,mode:l,name:e,checkBoxContainerStyle:x,checkBoxIconStyle:g,checkBoxStyle:c,labelCheckBoxStyle:a,labelStyle:d,width:u,draggable:y,groupLabelCheckBox:b,infoIconContainerStyle:v,checkedIconColor:p,isDisabled:r,selectionLimit:C,onDragStart:I,ref:W,onChange:H,handleChangeEvent:L,rowHeight:k},children:lu})})})]})}})}const lu=({index:e,style:i,data:l})=>{const r=s.useRef(null),{checkBoxes:h,value:d,allCheckBoxValues:a,mode:c,name:u,checkBoxContainerStyle:m,checkBoxIconStyle:p,checkBoxStyle:g,labelCheckBoxStyle:x,labelStyle:y,width:C,draggable:v,groupLabelCheckBox:I,infoIconContainerStyle:k,checkedIconColor:T,isDisabled:$,selectionLimit:w,onDragStart:S,ref:j,handleChangeEvent:b}=l,z=h[e];return t.jsx(fu,{style:{...i,width:"100%"},ref:r,children:t.jsx(Xo,{checkBox:z,index:e,value:d,allCheckBoxValues:a,mode:c,name:u,checkBoxContainerStyle:m,checkBoxIconStyle:p,checkBoxStyle:g,labelCheckBoxStyle:x,labelStyle:y,width:C,draggable:v,groupLabelCheckBox:I,infoIconContainerStyle:k,checkedIconColor:T,isDisabled:$,selectionLimit:w,onDragStart:S,ref:j,onChangeHandler:b})})},Xo=s.forwardRef((e,i)=>{const{value:l,checkBox:r,groupLabelCheckBox:h,allCheckBoxValues:d,selectionLimit:a,mode:c,checkBoxStyle:u,labelCheckBoxStyle:m,isDisabled:p,draggable:g,checkBoxContainerStyle:x,infoIconContainerStyle:y,name:C,index:v,width:I,checkedIconColor:k,checkBoxIconStyle:T,labelStyle:$,onDragStart:w,onChangeHandler:S}=e,j=be(),b=_=>{typeof i=="function"?i(_):i&&(i.current=_)};let z=l.includes(r.value);const A=Array.from(new Set([...l,r.value]));h?.value===r.value&&l.length>0&&(a!=null?z=A.length===d.length||A.length===a+1:z=d.every(_=>A.includes(_)===!0));const M=()=>c==="off"||r.isException?j==="small"?{display:"none",...u}:{visibility:"hidden",...u}:r.groupLabel?d.length===1&&d[0]===h?.value?{visibility:"hidden",...m}:m:u;return t.jsxs(pu,{mode:c,draggable:g===!0,onDragStart:_=>{w?.(_,r.value)},style:x,isDisabled:p,isSelected:z,exceptionMode:r.exceptionMode,children:[r.prefix?t.jsx(hu,{className:"prefix-box",children:r.prefix}):null,r.isException?t.jsx(mu,{style:y,className:"checkbox-alert",children:t.jsx(xe,{style:{padding:`12px ${n.sp3}`},title:r.exceptionInfo??"",placement:"bottom-start",children:r.exceptionType==="info"?t.jsx(gu,{}):t.jsx(xu,{})})}):t.jsx(Uc,{name:`${C}.${r.value}`,checkBoxValue:r.value,value:z,checkedIconColor:k,isDisabled:p||!r.groupLabel&&!z&&a!=null&&A.length===a+1?"disabled":void 0,checkBoxStyle:M(),checkBoxIconStyle:T,ref:b,onChange:S}),typeof r.label=="string"&&r.label?t.jsx(Wc,{isDisabled:p,label:r.label,labelStyle:$,htmlFor:`${C}.${r.value}`,style:{display:"flex",flex:1,minHeight:n.sp4,marginLeft:n.sp2,width:I,backgroundColor:"inherit",...$}}):r.label]},`${r.value}_${v}`)});Xo.displayName="CheckBoxWithLabel";const cu=({event:e,value:i,allCheckBoxValues:l,groupLabelCheckBox:r,onChange:h})=>{const d=e.currentTarget.value,a=e.currentTarget.checked,c=r?.value,u=new Set(i);if(d===c){h(a?Array.from(new Set([c,...l])):[]);return}a?u.add(d):u.delete(d);const m=l.every(p=>u.has(p));c!=null&&(m&&!u.has(c)?u.add(c):!m&&u.has(c)&&u.delete(c)),h(Array.from(u))},du=o.div`
|
|
157
|
+
display: flex;
|
|
158
|
+
flex-direction: column;
|
|
159
|
+
width: 100%;
|
|
160
|
+
height: 100%;
|
|
161
|
+
`,uu=o.div`
|
|
162
|
+
flex: 1;
|
|
163
|
+
overflow: hidden;
|
|
164
|
+
`,hu=o.div`
|
|
165
|
+
opacity: 0;
|
|
166
|
+
`,pu=o.div`
|
|
167
|
+
display: flex;
|
|
168
|
+
align-items: center;
|
|
169
|
+
flex-direction: row;
|
|
170
|
+
width: 100%;
|
|
171
|
+
min-height: ${n.sp4};
|
|
172
|
+
|
|
173
|
+
${e=>e.mode==="checked_or_hover"&&re`
|
|
174
|
+
input:not(:checked) ~ .unchecked-icon {
|
|
175
|
+
opacity: 0;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
:hover {
|
|
179
|
+
input:not(:checked) ~ .unchecked-icon,
|
|
180
|
+
.prefix-box {
|
|
181
|
+
opacity: 1;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
`};
|
|
185
|
+
|
|
186
|
+
${e=>e.mode==="hover_only"&&re`
|
|
187
|
+
input:not(:checked) ~ .unchecked-icon,
|
|
188
|
+
input:checked ~ .checked-icon {
|
|
189
|
+
opacity: 0;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
:hover {
|
|
193
|
+
input:not(:checked) ~ .unchecked-icon,
|
|
194
|
+
input:checked ~ .checked-icon,
|
|
195
|
+
.prefix-box {
|
|
196
|
+
opacity: 1;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
`};
|
|
200
|
+
|
|
201
|
+
label {
|
|
202
|
+
color: ${e=>e.isSelected?e.theme.colors.primary:e.theme.colors.hero};
|
|
203
|
+
${e=>e.isDisabled==="disabled"&&re`
|
|
204
|
+
color: ${e.theme.colors.grey2};
|
|
205
|
+
`};
|
|
206
|
+
cursor: ${e=>e.isDisabled==="disabled"?"not-allowed":"pointer"};
|
|
207
|
+
pointer-events: ${e=>e.isDisabled==="disabled"||e.isDisabled==="readonly"?"none":"initial"};
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.checkbox-alert {
|
|
211
|
+
opacity: 0;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
${e=>e.exceptionMode==="hover_only"&&re`
|
|
215
|
+
:hover {
|
|
216
|
+
.checkbox-alert {
|
|
217
|
+
opacity: 1;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
`}
|
|
221
|
+
|
|
222
|
+
${e=>e.exceptionMode==="checked_or_hover"&&re`
|
|
223
|
+
.checkbox-alert {
|
|
224
|
+
opacity: 1;
|
|
225
|
+
}
|
|
226
|
+
`}
|
|
227
|
+
`,mu=o.div`
|
|
228
|
+
cursor: pointer;
|
|
229
|
+
`,gu=o(ar)`
|
|
230
|
+
height: ${n.sp3};
|
|
231
|
+
width: ${n.sp3};
|
|
232
|
+
color: ${e=>e.theme.colors.hero};
|
|
233
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
234
|
+
border-radius: 50%;
|
|
235
|
+
`,xu=o(Ar)`
|
|
236
|
+
height: ${n.sp3};
|
|
237
|
+
width: ${n.sp3};
|
|
238
|
+
color: ${e=>e.theme.colors.hero};
|
|
239
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
240
|
+
border-radius: 50%;
|
|
241
|
+
`,fu=o.div`
|
|
242
|
+
width: 100%;
|
|
243
|
+
box-sizing: border-box;
|
|
244
|
+
`,yu=e=>s.createElement("svg",{width:90,height:90,viewBox:"0 0 90 90",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M72.4185 11.061C72.4185 14.6835 75.357 17.622 78.9795 17.622C80.481 17.649 83.25 17.1 84.717 14.2515H78.912C78.912 14.2515 75.8025 13.9815 75.8025 11.142C75.8025 8.0325 78.912 8.0325 78.912 8.0325H84.798L84.1185 6.984C82.917 5.472 81.063 4.5 78.9795 4.5C75.357 4.5 72.4185 7.4385 72.4185 11.061Z",stroke:"#97C3B9",strokeWidth:.9,strokeMiterlimit:10}),s.createElement("path",{d:"M85.4682 8.03232H78.9117C77.1944 8.03232 75.8022 9.42348 75.8022 11.1396C75.8022 12.8557 77.1944 14.2468 78.9117 14.2468H85.4682C87.1856 14.2468 88.5777 12.8557 88.5777 11.1396C88.5777 9.42348 87.1856 8.03232 85.4682 8.03232Z",stroke:"#97C3B9",strokeWidth:.9,strokeMiterlimit:10}),s.createElement("path",{d:"M28.4263 14.2469H24.0028C22.2883 14.2469 20.8933 12.8564 20.8933 11.1374C20.8933 9.41842 22.2838 8.02792 24.0028 8.02792H28.2625C28.2625 8.02792 26.5813 10.8629 27.9763 14.2424L28.4263 14.2469Z",stroke:"#97C3B9",strokeWidth:.9,strokeMiterlimit:10}),s.createElement("path",{d:"M53.9688 68.3098H15.3093C11.5473 68.3098 8.49634 65.2588 8.49634 61.4968C8.49634 57.7348 11.5473 54.6838 15.3093 54.6838H51.4263",stroke:"#97C3B9",strokeWidth:.9,strokeMiterlimit:10}),s.createElement("path",{d:"M65.6235 45.9497L77.8365 18.1982H33.3135L15.7905 54.6572C15.7905 54.6572 37.872 54.6752 51.435 54.6842",stroke:"#97C3B9",strokeWidth:.9,strokeMiterlimit:10}),s.createElement("g",{opacity:.2},s.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M85.8128 16.0468C84.7317 18.3797 82.3687 19.998 79.6276 19.998L78.7323 20.0077L67.0499 46.8002L65.4818 47.8361C65.6694 47.9711 65.8535 48.1339 66.0367 48.296C66.4128 48.6286 66.7851 48.9578 67.1764 49.0365C67.5728 49.1158 68.0543 48.9552 68.537 48.7942C69.0956 48.6079 69.6559 48.4211 70.0879 48.6045C70.5193 48.7877 70.7584 49.309 70.996 49.8271C71.202 50.2763 71.4068 50.723 71.7349 50.9445C72.0683 51.1703 72.5689 51.1942 73.0687 51.2181C73.6349 51.2452 74.2002 51.2723 74.5204 51.5925C74.8415 51.9136 74.8691 52.4809 74.8968 53.0485C74.9211 53.5469 74.9454 54.0456 75.1684 54.378C75.3909 54.7076 75.8415 54.9157 76.2933 55.1244C76.8101 55.3631 77.3283 55.6025 77.5084 56.025C77.6876 56.4455 77.5053 56.9915 77.3211 57.5433C77.1583 58.0308 76.9941 58.5228 77.0764 58.9365C77.1553 59.3307 77.4857 59.7039 77.8189 60.0802C78.2085 60.5202 78.6019 60.9645 78.6019 61.452C78.6019 61.9403 78.2072 62.3866 77.817 62.8278L77.8169 62.8279C77.4844 63.2039 77.1551 63.5762 77.0764 63.9675C76.9971 64.3639 77.1577 64.8454 77.3187 65.3282C77.505 65.8867 77.6919 66.447 77.5084 66.879C77.3253 67.3104 76.8039 67.5495 76.2859 67.7871C75.8367 67.9931 75.3899 68.1979 75.1684 68.526C74.9454 68.8564 74.9211 69.355 74.8968 69.854C74.8691 70.4221 74.8414 70.9905 74.5204 71.3115C74.1994 71.6326 73.6321 71.6602 73.0645 71.6879C72.5661 71.7122 72.0674 71.7365 71.7349 71.9595C71.4054 72.182 71.1972 72.6326 70.9886 73.0844C70.7504 73.6 70.5116 74.117 70.0909 74.2982L69.9433 86.6701C69.9388 86.9896 69.6013 87.2011 69.3133 87.0616L63.9853 84.5191C63.8593 84.4561 63.7108 84.4606 63.5848 84.5281L59.0443 87.0031C58.7518 87.1606 58.3963 86.9491 58.3963 86.6161V73.2221C58.375 73.1765 58.3539 73.1307 58.3328 73.0849C58.1243 72.6329 57.9162 72.1818 57.5869 71.9595C57.2565 71.7365 56.7579 71.7122 56.2589 71.6879C55.6909 71.6602 55.1224 71.6325 54.8014 71.3115C54.5284 71.0386 54.4676 70.5876 54.4385 70.1098H16.2094C13.4696 70.1098 11.1069 68.4916 10.0252 66.159H5.3595C3.64217 66.159 2.25 64.7678 2.25 63.0517C2.25 61.3356 3.64217 59.9445 5.3595 59.9445H10.2772C11.4475 57.8784 13.6659 56.4838 16.2094 56.4838H16.8914L34.0978 20.2418C32.0553 19.6588 30.3782 18.0406 29.5344 16.0459L29.3264 16.0469H24.9029C23.1884 16.0469 21.7934 14.6564 21.7934 12.9374C21.7934 11.2184 23.1839 9.82792 24.9029 9.82792H29.8292C31.0005 7.76679 33.2164 6.37645 35.7571 6.37645H78.8745C79.1951 6.32719 79.5233 6.30112 79.8574 6.30002L79.8794 6.29999C82.4104 6.29999 84.6067 7.73319 85.701 9.83231H86.3681C88.0855 9.83231 89.4776 11.2235 89.4776 12.9396C89.4776 14.6557 88.0855 16.0468 86.3681 16.0468H85.8128Z",fill:"#97C3B9"})),s.createElement("path",{d:"M64.1251 65.7C67.7288 65.7 70.6501 62.7787 70.6501 59.175C70.6501 55.5713 67.7288 52.65 64.1251 52.65C60.5214 52.65 57.6001 55.5713 57.6001 59.175C57.6001 62.7787 60.5214 65.7 64.1251 65.7Z",stroke:"#EEBA7D",strokeWidth:.9,strokeMiterlimit:10,strokeLinecap:"round"}),s.createElement("path",{d:"M61.2 59.4484L63.4903 61.65L67.5 56.7",stroke:"#EEBA7D",strokeWidth:.9,strokeMiterlimit:10,strokeLinecap:"round"}),s.createElement("path",{d:"M33.6736 27.0088H66.7216",stroke:"#EEBA7D",strokeWidth:.9,strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M30.2854 35.8198H63.3334",stroke:"#EEBA7D",strokeWidth:.9,strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M26.8962 43.875H59.9442",stroke:"#EEBA7D",strokeWidth:.9,strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M50.27 59.202C50.27 58.2975 51.6245 57.537 51.7955 56.6865C51.971 55.8045 51.0215 54.5805 51.3635 53.775C51.7055 52.9695 53.2265 52.8345 53.7035 52.128C54.1805 51.4215 53.7485 49.9455 54.3515 49.3425C54.9545 48.7395 56.426 49.1715 57.137 48.6945C57.848 48.2175 57.992 46.692 58.784 46.3545C59.576 46.017 60.8135 46.962 61.6955 46.7865C62.5505 46.6155 63.3065 45.261 64.211 45.261C65.1155 45.261 65.876 46.6155 66.7265 46.7865C67.5815 46.9575 68.8325 46.0125 69.638 46.3545C70.4435 46.6965 70.5785 48.2175 71.285 48.6945C71.996 49.176 73.4675 48.7395 74.0705 49.3425C74.6735 49.9455 74.2415 51.417 74.7185 52.128C75.1955 52.8345 76.721 52.983 77.0585 53.775C77.396 54.567 76.451 55.8045 76.6265 56.6865C76.7975 57.5415 78.152 58.2975 78.152 59.202C78.152 60.1065 76.7975 60.867 76.6265 61.7175C76.4555 62.5725 77.4005 63.8235 77.0585 64.629C76.7165 65.4345 75.1955 65.5695 74.7185 66.276C74.2415 66.9825 74.6735 68.4585 74.0705 69.0615C73.4675 69.6645 71.996 69.2325 71.285 69.7095C70.5785 70.1865 70.43 71.712 69.638 72.0495C68.846 72.387 67.6085 71.442 66.7265 71.6175C65.8715 71.7885 65.1155 73.143 64.211 73.143C63.3065 73.143 62.546 71.7885 61.6955 71.6175C60.845 71.4465 59.5895 72.3915 58.784 72.0495C57.992 71.7165 57.8435 70.1865 57.137 69.7095C56.4305 69.2325 54.9545 69.6645 54.3515 69.0615C53.7485 68.4585 54.1805 66.987 53.7035 66.276C53.2265 65.565 51.701 65.421 51.3635 64.629C51.026 63.837 51.971 62.5995 51.7955 61.7175C51.6245 60.8625 50.27 60.1065 50.27 59.202Z",stroke:"#97C3B9",strokeWidth:.9,strokeMiterlimit:10}),s.createElement("path",{d:"M57.9463 70.5151V84.8161C57.9463 85.1491 58.3018 85.3606 58.5943 85.2031L63.1348 82.7281C63.2608 82.6606 63.4093 82.6561 63.5353 82.7191L68.8633 85.2616C69.1513 85.4011 69.4888 85.1896 69.4933 84.8701L69.6463 72.0496",stroke:"#97C3B9",strokeWidth:.9,strokeMiterlimit:10}),s.createElement("path",{d:"M78.228 18.1215C78.1965 18.1215 78.165 18.1215 78.138 18.1215H34.263C30.501 18.1215 27.45 15.0705 27.45 11.3085C27.45 7.5465 30.501 4.5 34.263 4.5C34.263 4.5 78.138 4.5 78.147 4.5",stroke:"#97C3B9",strokeWidth:.9,strokeMiterlimit:10}),s.createElement("path",{d:"M9.38255 64.2645H4.90955C3.19505 64.2645 1.80005 62.874 1.80005 61.155C1.80005 59.436 3.19055 58.05 4.90955 58.05H9.22955",stroke:"#97C3B9",strokeWidth:.9,strokeMiterlimit:10})),wu=e=>s.createElement("svg",{viewBox:"0 0 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M178 14L19 65L53 76M178 14L123 123.5L90.5 91M178 14L53 76M178 14L78.5 79M78.5 79L62 104M78.5 79L90.5 91M62 104L90.5 91M62 104L53 76",stroke:"#97C3B9",strokeWidth:2}),s.createElement("path",{opacity:.2,d:"M21 68L180 17L125 126.5L92.5 94L64 107L55 79L21 68Z",fill:"#97C3B9"}),s.createElement("path",{d:"M94.495 135.259C83.8632 135.259 75.2592 143.863 75.2592 154.495C75.2592 143.863 66.6318 135.259 56 135.259C66.6318 135.259 75.2592 126.632 75.2592 116C75.2592 126.632 83.8632 135.259 94.495 135.259Z",stroke:"#EEBA7D",strokeWidth:2,strokeMiterlimit:10}),s.createElement("path",{d:"M180.481 94.79C173.445 94.79 167.748 100.506 167.748 107.565C167.748 100.506 162.036 94.79 155 94.79C162.036 94.79 167.748 89.0591 167.748 82C167.748 89.0591 173.445 94.79 180.481 94.79Z",stroke:"#EEBA7D",strokeWidth:2,strokeMiterlimit:10,strokeLinejoin:"round"}),s.createElement("path",{d:"M42 35.0047C37.582 35.0047 34.0047 38.582 34.0047 43C34.0047 38.582 30.418 35.0047 26 35.0047C30.418 35.0047 34.0047 31.418 34.0047 27C34.0047 31.418 37.582 35.0047 42 35.0047Z",stroke:"#EEBA7D",strokeWidth:2,strokeMiterlimit:10,strokeLinejoin:"round"}),s.createElement("path",{d:"M21.5625 129.486C22.3958 127.153 24.8625 121.586 28.0625 117.986",stroke:"#97C3B9",strokeWidth:2}),s.createElement("path",{d:"M35.5631 109.486C37.3272 107.746 41.5625 103.486 45.7381 101.468",stroke:"#97C3B9",strokeWidth:2}),s.createElement("path",{d:"M19.0623 140.486C18.8956 142.653 18.9623 148.286 20.5623 153.486",stroke:"#97C3B9",strokeWidth:2}),s.createElement("path",{d:"M26.5625 162.986C28.0625 164.82 32.3625 168.886 37.5625 170.486M48.0625 173.986C50.7292 174.32 57.1625 174.986 61.5625 174.986",stroke:"#97C3B9",strokeWidth:2}),s.createElement("path",{d:"M72.0625 175.486H85.5625M96.0625 175.486H110.562M121.062 175.486H135.062",stroke:"#97C3B9",strokeWidth:2}),s.createElement("path",{d:"M145.562 176.486C148.229 176.486 154.662 176.786 159.062 177.986",stroke:"#97C3B9",strokeWidth:2}),s.createElement("path",{d:"M169.562 180.986C172.062 181.653 178.062 183.686 182.062 186.486",stroke:"#97C3B9",strokeWidth:2})),Cu=e=>s.createElement("svg",{viewBox:"0 0 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M197 140.889C186.368 140.889 177.764 149.493 177.764 160.124C177.764 149.493 169.137 140.889 158.505 140.889C169.137 140.889 177.764 132.261 177.764 121.629C177.764 132.261 186.368 140.889 197 140.889Z",stroke:"#EEBA7D",strokeWidth:2,strokeMiterlimit:10}),s.createElement("path",{d:"M43.2928 47.6752C32.661 47.6752 24.0571 56.2792 24.0571 66.911C24.0571 56.2792 15.4297 47.6752 4.79785 47.6752C15.4297 47.6752 24.0571 39.0479 24.0571 28.416C24.0571 39.0479 32.661 47.6752 43.2928 47.6752Z",stroke:"#EEBA7D",strokeWidth:2,strokeMiterlimit:10}),s.createElement("path",{d:"M76.2983 17.0808C70.0153 17.0808 64.9279 22.1681 64.9279 28.4511C64.9279 22.1681 59.8289 17.0808 53.5459 17.0808C59.8289 17.0808 64.9279 11.9817 64.9279 5.69873C64.9279 11.9817 70.0153 17.0808 76.2983 17.0808Z",stroke:"#EEBA7D",strokeWidth:2,strokeMiterlimit:10}),s.createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M112.065 93.8122C112.065 93.8122 118.524 67.2385 125.499 46.9477C132.473 26.657 141.968 12.825 147.899 9.73043C153.831 6.63583 162.341 5.32297 166.631 15.9196C170.429 25.2738 166.608 36.3393 166.608 36.3393C166.608 36.3393 163.712 48.7295 148.825 70.462C139.647 83.8603 132.626 93.8122 132.626 93.8122H166.76C169.022 93.8122 170.851 95.6408 170.851 97.9032C170.851 100.166 169.022 101.994 166.76 101.994H142.641L143.093 102.006L153.69 178.914C155.284 185.97 147.688 187.916 147.688 187.916C147.688 187.916 144.195 192.441 105.841 192.687C89.1723 192.793 70.6985 190.038 62.9268 187.74C55.1551 185.443 56.9251 174.319 56.9251 174.319L63.4165 119.209C58.0319 119.224 55.4195 115.095 54.4752 107.023C54.2796 105.351 54.2251 103.546 54.3058 101.643L54.276 102.018V102.006H42.1554C39.8931 102.006 38.0645 100.177 38.0645 97.9149C38.0645 95.6526 39.8931 93.8239 42.1554 93.8239H55.2855C57.1676 84.4084 61.6018 73.8826 68.0493 65.2575H68.061C68.061 65.2575 75.4693 56.3253 84.1319 57.2162C94.2714 58.2712 100.308 62.3504 100.308 62.3504L100.11 63.0914L105.841 93.8122H112.065ZM90.1921 93.8122H90.1837L90.1322 93.9283L90.1921 93.8122Z",fill:"#97C3B9"}),s.createElement("path",{d:"M101.841 90.8122L96.5003 60.5H96.0003C96.0003 60.5 91.4672 78.8323 86.2861 90.5894L101.841 90.8122Z",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10}),s.createElement("path",{d:"M64.0607 62.2576C64.0607 62.2576 71.469 53.3254 80.1316 54.2163C90.2711 55.2713 96.3079 59.3505 96.3079 59.3505L92.3576 74.1437L86.2856 90.5779C86.2856 90.5779 78.2795 109.415 67.3429 114.162C56.4063 118.91 51.7995 115.346 50.4749 104.023C49.1504 92.6995 54.2963 75.3041 64.049 62.2576H64.0607Z",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10}),s.createElement("path",{d:"M114.126 90.812L127.595 50.4532C127.595 50.4532 134.511 27.5602 142.587 17.8544C150.745 8.05481 159.502 15.6272 154.707 30.901C150.406 44.6157 133.631 70.4275 121.37 90.812H114.126Z",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10}),s.createElement("path",{d:"M108.065 90.8122C108.065 90.8122 114.524 64.2385 121.499 43.9477C128.473 23.657 137.968 9.82504 143.9 6.73043C149.831 3.63583 158.341 2.32297 162.631 12.9196C166.429 22.2738 162.608 33.3393 162.608 33.3393C162.608 33.3393 159.712 45.7295 144.826 67.462C135.647 80.8603 128.626 90.8122 128.626 90.8122H108.077H108.065Z",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10}),s.createElement("path",{d:"M86.1926 90.812H162.761C165.023 90.812 166.852 92.6406 166.852 94.903C166.852 97.1653 165.023 98.994 162.761 98.994H81.9727",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10}),s.createElement("path",{d:"M50.276 99.0057H38.1554C35.8931 99.0057 34.0645 97.1771 34.0645 94.9147C34.0645 92.6524 35.8931 90.8237 38.1554 90.8237H51.4247L50.7683 93.9652L50.4752 96.5089L50.276 99.0174V99.0057Z",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10}),s.createElement("path",{d:"M59.9937 117.105L52.9253 171.319C52.9253 171.319 51.1553 182.443 58.927 184.74C66.6986 187.038 85.1725 189.793 101.841 189.687C140.195 189.441 143.689 184.916 143.689 184.916C143.689 184.916 151.284 182.97 149.69 175.914L139.094 99.0059H81.9021C81.9021 99.0059 76.0119 113.988 59.9937 117.105Z",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10}),s.createElement("path",{d:"M60.7893 119.993L60.799 119.476H140.794L140.851 119.765L60.7893 119.993Z",fill:"#231F20",stroke:"#97C3B9",strokeWidth:2})),bu=e=>s.createElement("svg",{viewBox:"0 0 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M8.54492 149.483C8.54492 149.483 31.4705 136.963 39.2741 116.167C39.2741 116.167 43.7687 99.3912 46.3662 81.1928C46.3662 81.1928 47.0668 72.2067 47.5519 68.9204C48.0369 65.6341 50.5483 62.1431 53.2644 62.2401C55.9806 62.3371 57.0368 66.1082 57.4249 68.1446C57.5326 68.7102 57.386 69.962 57.118 71.4755C58.1719 66.7819 59.2474 61.7944 59.4512 60.1175C59.947 56.0339 60.8093 51.2176 63.9027 48.6963C66.9961 46.175 69.2272 45.7979 71.1673 45.8841C71.1673 45.8841 73.3014 40.4644 78.3349 40.2705C78.3349 40.2705 81.5253 39.8826 83.5624 42.4039C83.5624 42.4039 87.6259 40.0766 90.9241 43.7615C94.2222 47.4464 95.0845 52.0903 95.4725 60.5054C95.564 62.4897 95.58 64.8514 95.551 67.3023C96.4299 61.724 98.2955 55.6981 100.161 53.3186C104.86 47.3064 108.396 48.8579 108.396 48.8579C108.396 48.8579 110.573 43.309 114.744 42.8133C118.915 42.3177 118.139 46.2289 118.139 46.2289C120.683 43.9016 123.475 44.5049 123.475 44.5049C126.676 45.2053 128.336 47.5757 126.751 56.2063C125.167 64.8368 127.549 69.7931 127.549 69.7931C135.094 63.9425 137.605 69.1898 138.166 72.3683C138.279 72.9998 138.264 73.8438 138.243 75.1149C138.199 77.7258 138.125 82.1383 139.06 90.2112C140.451 102.214 143.124 105.878 143.124 105.878C144.783 108.353 146.57 110.433 148.29 112.148C148.295 112.041 148.297 111.933 148.297 111.825C148.297 111.825 151.897 107.612 156.898 109.994C159.836 111.392 164.068 115.762 168.352 120.184C171.36 123.29 174.394 126.422 177.022 128.569C177.304 128.8 177.579 129.024 177.849 129.244C183.67 133.994 186.768 136.522 193.804 145.151C193.804 145.151 195.959 147.5 198.805 149.666L162.051 191.569C162.051 191.569 141.316 174.666 118.316 149.666C118.316 149.666 121.603 148.5 125.547 145.509C121.267 140.784 115.527 134.794 110.767 131.047C102.326 124.402 99.325 120.466 99.0785 120.134C96.0268 123.958 90.4968 130.202 83.1636 135.627C83.1636 135.627 74.9289 143.955 68.4511 154.795C61.9733 165.634 50.4405 176.376 44.0489 179.577L8.54492 149.483ZM90.439 96.2235C90.4595 96.2104 90.4799 96.1972 90.5001 96.1839L90.5273 96.1764C90.4685 96.2087 90.439 96.2235 90.439 96.2235Z",fill:"#97C3B9"}),s.createElement("path",{d:"M4.5459 145.483C4.5459 145.483 27.4715 132.963 35.2751 112.168C35.2751 112.168 39.7696 95.3917 42.3672 77.1933C42.3672 77.1933 43.0678 68.2072 43.5528 64.9209C44.0379 61.6346 46.5492 58.1436 49.2654 58.2406C51.9815 58.3376 53.0378 62.1087 53.4258 64.1451C53.8139 66.1815 50.9037 77.1179 50.9037 77.1179C50.9037 77.1179 55.0318 59.5766 55.4522 56.118C55.948 52.0344 56.8102 47.2181 59.9036 44.6968C62.997 42.1755 65.2282 41.7984 67.1683 41.8846C67.1683 41.8846 69.3024 36.4649 74.3359 36.271C74.3359 36.271 77.5263 35.8831 79.5634 38.4044C79.5634 38.4044 83.6269 36.077 86.925 39.762C90.2232 43.4469 91.0855 48.0908 91.4735 56.5059C91.8615 64.9209 90.8915 80.124 90.8915 80.124C90.8915 80.124 90.6975 89.5087 86.44 92.224C86.44 92.224 90.1154 90.3815 97.186 82.8392C104.257 75.2969 105.895 75.674 108.805 76.0619C111.715 76.4498 114.13 79.5422 111.996 87.774C109.861 96.0059 97.7573 112.556 97.7573 112.556C97.7573 112.556 90.6867 123.104 79.1646 131.627C79.1646 131.627 70.9299 139.956 64.4521 150.795C57.9743 161.635 46.4414 172.377 40.0499 175.577",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),s.createElement("path",{d:"M60.0654 79.2617C60.0654 79.2617 64.1073 66.1812 64.4738 59.4471C64.8403 52.7129 65.5516 44.5133 67.1684 41.8735",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),s.createElement("path",{d:"M71.1992 80.8566C71.1992 80.8566 75.1118 73.8854 75.974 61.419C76.8363 48.9527 76.5237 45.6557 76.8255 43.0805C77.3106 38.9215 79.5632 38.4043 79.5632 38.4043",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),s.createElement("path",{d:"M44.8614 135.143C51.6486 134.887 56.9589 129.594 56.7222 123.32C56.4855 117.047 50.7915 112.168 44.0042 112.424C37.217 112.68 31.9067 117.973 32.1434 124.247C32.3801 130.52 38.0742 135.399 44.8614 135.143Z",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),s.createElement("path",{d:"M44.9719 137.801C53.0975 137.495 59.4577 131.23 59.1777 123.809C58.8977 116.388 52.0836 110.62 43.9579 110.927C35.8323 111.233 29.4721 117.498 29.7521 124.919C30.0321 132.34 36.8462 138.108 44.9719 137.801Z",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),s.createElement("path",{d:"M39.6943 121.046L43.4452 127.026L48.7266 119.117",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),s.createElement("path",{d:"M30.2517 119.117L24.2589 125.614C24.2589 125.614 24.1619 129.676 30.2517 129.773C30.2517 129.773 28.3223 124.602 30.2517 119.117Z",fill:"#97C3B9"}),s.createElement("path",{d:"M55.0212 114.14C55.0212 114.14 57.3385 114.959 60.9062 119.516C60.9062 119.516 71.1564 121.854 77.5588 135.15C77.5588 135.15 71.7708 145.914 67.6103 148.242C67.6103 148.242 57.3601 139.309 52.8871 138.9C52.8871 138.9 49.0284 143.264 40.5997 141.335C32.171 139.406 29.2285 129.763 29.2285 129.763H30.2417C30.2417 129.763 37.3877 141.292 50.214 136.691C50.214 136.691 57.6619 134.03 58.869 127.015C60.0762 120.001 56.6487 116.144 55.0104 114.129L55.0212 114.14Z",fill:"#97C3B9"}),s.createElement("path",{d:"M68.9787 127.92C68.9787 127.92 68.4613 132.844 63.1152 136.885",stroke:"#FAFAFA",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),s.createElement("path",{d:"M72.7079 132.402C72.7079 132.402 71.824 135.29 70.1318 136.087",stroke:"#FAFAFA",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),s.createElement("path",{d:"M152.91 114.667C152.91 114.667 145.171 110.896 139.124 101.878C139.124 101.878 136.451 98.2143 135.061 86.2113C133.67 74.2083 134.511 70.2971 134.166 68.3684C133.606 65.1899 131.094 59.9426 123.549 65.7933C123.549 65.7933 121.167 60.8369 122.752 52.2064C124.336 43.5759 122.676 41.2054 119.475 40.5051C119.475 40.5051 116.684 39.9017 114.14 42.229C114.14 42.229 114.916 38.3178 110.745 38.8134C106.573 39.3091 104.396 44.858 104.396 44.858C104.396 44.858 100.861 43.3065 96.1616 49.3188C94.2861 51.7107 92.4107 57.7877 91.5377 63.3905L91.1389 75.3935C91.1389 75.3935 91.5592 88.1939 86.4287 92.2021C86.4287 92.2021 91.958 88.6787 99.0717 80.8455C106.185 73.0123 111.025 75.8892 112.372 79.2509C113.72 82.6126 113.536 88.2154 106.94 98.5268C100.344 108.838 95.0622 116.111 95.0622 116.111C95.0622 116.111 97.94 120.098 106.768 127.047C115.595 133.997 127.796 148.661 127.796 148.661C127.796 148.661 143.867 134.676 152.888 114.657L152.91 114.667Z",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),s.createElement("path",{d:"M111.058 108.612C111.058 108.612 111.252 98.1068 115.919 91.4588C115.919 91.4588 118.236 87.2028 118.204 79.8545C118.161 70.4051 123.561 65.772 123.561 65.772",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),s.createElement("path",{d:"M114.151 42.2183C114.151 42.2183 110.216 45.2352 108.772 52.9822C106.724 63.9939 107.382 72.8184 107.382 72.8184",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),s.createElement("path",{d:"M99.3845 78.1522C99.3845 78.1522 98.8671 67.7546 99.8695 59.0271C100.872 50.2996 104.407 44.8584 104.407 44.8584",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),s.createElement("path",{d:"M92.4217 79.1864C92.4217 79.1864 91.3223 63.8002 92.1953 59.6304",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),s.createElement("path",{d:"M152.91 114.667C156.09 108.332 150.075 108.623 150.075 108.623",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),s.createElement("path",{d:"M118.16 137.833C118.16 137.833 109.699 149.319 119.68 151.194C119.68 151.194 125.856 150.493 127.818 148.672L118.16 137.833Z",fill:"#97C3B9"}),s.createElement("path",{d:"M158.051 187.569C158.051 187.569 139.65 173 116.65 148C116.65 148 124.15 160 140.978 134.256C140.978 134.256 152.263 119.236 152.511 114.01C152.511 114.01 147.284 111.36 144.298 107.826C144.298 107.826 147.898 103.613 152.899 105.994C157.9 108.375 166.652 119.365 173.022 124.569C179.392 129.774 182.443 132.122 189.804 141.152C189.804 141.152 191.96 143.501 194.805 145.666",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),s.createElement("path",{d:"M160.746 81.6538C160.746 81.6538 182.443 82.699 184.868 83.3885",stroke:"#EEBA7D",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),s.createElement("path",{d:"M145.99 53.8984L169.25 44.8584",stroke:"#EEBA7D",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),s.createElement("path",{d:"M122.041 30.474L139.922 14.1719",stroke:"#EEBA7D",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),s.createElement("path",{d:"M82.4735 30.474C82.4735 30.474 75.3597 15.9066 62.167 9.48486",stroke:"#EEBA7D",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),s.createElement("path",{d:"M40.9985 49.3833C40.9985 49.3833 33.3674 39.3305 23.1172 37.0786",stroke:"#EEBA7D",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),s.createElement("path",{d:"M28.3231 74.5425C28.3231 74.5425 8.71728 83.2269 1.59277 93.7214",stroke:"#EEBA7D",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"})),vu=o.div`
|
|
245
|
+
width: 100%;
|
|
246
|
+
display: flex;
|
|
247
|
+
justify-content: center;
|
|
248
|
+
align-items: center;
|
|
249
|
+
flex: 1;
|
|
250
|
+
background: ${e=>e.theme.colors.grey4};
|
|
251
|
+
box-sizing: border-box;
|
|
252
|
+
`,Su=o(wu)`
|
|
253
|
+
width: 90px;
|
|
254
|
+
height: 90px;
|
|
255
|
+
`,ku=o(Cu)`
|
|
256
|
+
width: 90px;
|
|
257
|
+
height: 90px;
|
|
258
|
+
`,ju=o(yu)`
|
|
259
|
+
width: 90px;
|
|
260
|
+
height: 90px;
|
|
261
|
+
`,$u=o(bu)`
|
|
262
|
+
width: 90px;
|
|
263
|
+
height: 90px;
|
|
264
|
+
`,Iu=o.div`
|
|
265
|
+
display: flex;
|
|
266
|
+
align-items: center;
|
|
267
|
+
justify-content: center;
|
|
268
|
+
flex-direction: column;
|
|
269
|
+
`,Tu=o(No)`
|
|
270
|
+
margin-top: ${n.sp2};
|
|
271
|
+
color: ${e=>e.theme.colors.brandColorJade};
|
|
272
|
+
`,Lu=o(rr)`
|
|
273
|
+
color: ${e=>e.theme.colors.primary};
|
|
274
|
+
`,Au=e=>{const{tab:i}=e;switch(i){case"transaction_categorization":return t.jsx(Su,{});case"je_schedules":case"reconciliation":return t.jsx($u,{});case"flux_analysis":return t.jsx(ju,{});case"missing_receipts":default:return t.jsx(ku,{})}};function It(e){const{title:i,subTitle:l}=e;return t.jsx(vu,{children:t.jsxs(Iu,{children:[t.jsx(Au,{...e}),t.jsx(Tu,{children:i}),t.jsx(Lu,{children:l})]})})}const{common:{headers:{transactions:Ru,jeSchedules:Eu,fluxAnalysis:Du,missingReceipts:Mu,insights:Ou,reconciliation:As},strings:{empty:sn}},uncategorizedTransactionList:{missingReceipt:{bulkUpload:{missing:Pu,unmatched:zu,completed:Fu}}},expenseAutomation:{transactions:{tabs:Rs,subTitles:{review:{item1:hi,item2:pi},autoCategorized:{item1:mi,item2:Bu}},searchPlaceholder:_u,allDoneText:Vu},jeSchedules:{subTitles:{item1:Nu,item2:Uu},searchPlaceholder:Wu,allDoneText:Hu},missingReceipts:{subTitles:qu,searchPlaceholder:Ku,allDoneText:Zi},fluxAnalysis:{subTitles:{item1:Ju,item2:Qu},searchPlaceholder:Gu,emptyPageTexts:{youDidIt:Zu,allReviewed:Yu}},accountRecon:{review:{allDoneText:Es},reconcile:{allDoneText:Xu},tabs:Ds,titles:{item1:eh,item2:th},subTitles:{review:{item1:nh,item2:gi},reconcile:{item1:xi,item2:ih}}}}}=me.getLocalizedStrings(),He=(e,i,l,r,h,d)=>{switch(e){case"transaction_categorization":return{key:"transaction_categorization",title:Ru,subTitle:[],tabs:[{label:Rs.review,id:"review",subTitle:[{pre:hi.pre,bold:hi.bold,prefixIconName:hi.prefixIconName,post:hi.post},{pre:pi.pre,bold:pi.bold,prefixIconName:pi.prefixIconName,post:pi.post}]},{label:Rs.autoCategorized,id:"autoCategorized",subTitle:[{pre:mi.pre,bold:mi.bold,prefixIconName:mi.prefixIconName,post:mi.post.replace("#number",i!=null&&i!=0?i.toString():"")},Bu]}],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:_u,allDoneText:Vu};case"je_schedules":return{key:"je_schedules",title:Eu,subTitle:[Nu,Uu],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Wu,allDoneText:Hu};case"missing_receipts":{const a=d?.includeBulkUploadTabs!==!1;return{key:"missing_receipts",title:d?.navTitle??Mu,subTitle:[qu],tabs:a?[{label:Pu,id:"missing",subTitle:[],allDoneText:Zi},{label:zu,id:"unmatched",subTitle:[]},{label:Fu,id:"completed",subTitle:[],allDoneText:Zi}]:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Ku,allDoneText:Zi}}case"flux_analysis":return{key:"flux_analysis",title:Du,subTitle:[Ju,Qu],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Gu,allDoneText:{title:Zu,subTitle:Yu}};case"month_end_insights":return{key:"month_end_insights",title:Ou,subTitle:[],tabs:[],rightSection:["comment","refresh","close"],leftSection:[],searchPlaceholder:sn,allDoneText:{title:sn,subTitle:sn}};case"reconciliation":return l==null?{key:"reconciliation",title:As,subTitle:[eh,th],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:sn,allDoneText:{title:sn,subTitle:sn}}:{key:"reconciliation",title:r??As,subText:h??void 0,subTitle:[],tabs:[{label:Ds.review,id:"review",subTitle:[nh,{pre:gi.pre,bold:gi.bold,prefixIconName:gi.prefixIconName,post:gi.post}],allDoneText:Es},{label:Ds.reconcile,id:"reconcile",subTitle:[{pre:xi.pre,bold:xi.bold,prefixIconName:xi.prefixIconName,post:xi.post},ih],allDoneText:Xu}],rightSection:["refresh"],leftSection:["back"],searchPlaceholder:sn,allDoneText:Es}}},{common:{strings:{empty:oh}},expenseAutomation:{accountRecon:{reconcile:{header:Gt}}}}=me.getLocalizedStrings(),sh={key:"date",value:Gt.date,sortOrder:"ascending",width:new G(12.75,12.75,12.75),customStyle:{marginLeft:f[4],marginRight:f[3]}},ah={key:"clearedDate",value:Gt.clearedDate,sortOrder:"ascending",width:new G(12.75,12.75,12.75),customStyle:{marginRight:f[3],display:"none"}},rh={key:"type",value:Gt.type,sortOrder:"ascending",width:new G(12.75,12.75,12.75),customStyle:{marginRight:f[3]}},lh={key:"payee",value:Gt.payee,sortOrder:"ascending",width:new G(12.75,12.75,12.75),customStyle:{marginRight:f[3]}},ch={key:"account",value:Gt.account,sortOrder:"ascending",width:new G(12.75,12.75,12.75),customStyle:{marginRight:f[3]}},dh={key:"transactionDirection",value:Gt.direction,sortOrder:"ascending",width:new G(12.75,12.75,12.75),customStyle:{marginRight:f[3]}},uh={key:"memo",value:Gt.memo,sortOrder:"ascending",width:new G(12.75,12.75,12.75),customStyle:{marginRight:f[3]}},hh={key:"amount",value:Gt.amount,sortOrder:"ascending",width:new G(12.75,12.75,12.75),customStyle:{marginRight:f[3]}},ph={key:"recommended",value:oh,sortOrder:"ascending",width:new G(1.25,1.25,1.25),customStyle:{marginRight:f[4],marginLeft:f[0]}},Ne=[sh,ah,rh,lh,ch,dh,uh,hh,ph],mh=50,Fn={sortKey:"date",sortOrder:"descending"};function gh({sortConfig:e,onReconTabColumnSortConfigChanged:i}){const l=be(),[r,h]=s.useState(Mo(Ne));s.useEffect(()=>{const c=[...r];for(const u of c)u.key===e.sortKey?u.sortOrder=e.sortOrder:u.sortOrder="ascending";h(c)},[e.sortKey,e.sortOrder]);const d=(c,u)=>{let m=u;e.sortKey===c&&(m=u==="ascending"?"descending":"ascending"),i(c,m)},a=c=>{d(c.key,c.sortOrder)};return t.jsx(wh,{headerHeight:mh,children:r.map(c=>t.jsx(fh,{columnWidth:c.width,windowSize:l,sortDataValue:e.sortKey,actualDataValue:c.key,style:c.customStyle,children:t.jsxs(kh,{isVisible:c.key!=="recommended",children:[t.jsx(yh,{"data-testid":O("reconcile-tab-list-sort",c.value),onClick:()=>a(c),children:t.jsx(Ye,{children:c.value})}),t.jsx(Ch,{sortConfig:e,headerData:c,children:t.jsx(bh,{})}),t.jsx(vh,{isVisible:e.sortKey===c.key&&(e.sortKey!==Fn.sortKey||e.sortOrder!==Fn.sortOrder),children:t.jsx(Sh,{"data-testid":O("reconcile-tab-list-reset-sort",Fn.sortKey),onClick:()=>i(Fn.sortKey,Fn.sortOrder)})})]})},c.key))})}const xh=dd.memo(gh),fh=o.div`
|
|
275
|
+
color: ${e=>e.sortDataValue===e.actualDataValue?e.theme.colors.primary:e.theme.colors.grey1};
|
|
276
|
+
:hover {
|
|
277
|
+
color: ${e=>e.theme.colors.primary};
|
|
278
|
+
}
|
|
279
|
+
width: ${e=>e.columnWidth.valuePercentage(e.windowSize)};
|
|
280
|
+
display: flex;
|
|
281
|
+
align-items: center;
|
|
282
|
+
height: 100%;
|
|
283
|
+
justify-content: flex-start;
|
|
284
|
+
gap: 6px;
|
|
285
|
+
z-index: auto;
|
|
286
|
+
position: relative;
|
|
287
|
+
`,yh=o.div`
|
|
288
|
+
display: flex;
|
|
289
|
+
gap: 5px;
|
|
290
|
+
cursor: pointer;
|
|
291
|
+
`,wh=o(st)`
|
|
292
|
+
width: fit-content;
|
|
293
|
+
height: ${e=>`${e.headerHeight}px`};
|
|
294
|
+
width: calc(100% - 20px);
|
|
295
|
+
z-index: 6;
|
|
296
|
+
display: flex;
|
|
297
|
+
align-items: center;
|
|
298
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
299
|
+
box-sizing: border-box;
|
|
300
|
+
padding: ${n.sp3} ${n.sp8} ${n.sp3} ${n.sp0};
|
|
301
|
+
position: sticky;
|
|
302
|
+
color: ${e=>e.theme.colors.grey1};
|
|
303
|
+
`,Ch=o.div`
|
|
304
|
+
display: flex;
|
|
305
|
+
align-items: center;
|
|
306
|
+
transform: ${e=>e.headerData.sortOrder==="descending"?"rotate(180deg)":"rotate(0deg)"};
|
|
307
|
+
${e=>e.headerData.sortOrder==="ascending"?"padding-top: 2px":"padding-bottom: 2px"};
|
|
308
|
+
`,bh=o(Xn)`
|
|
309
|
+
width: ${n.sp2};
|
|
310
|
+
height: ${n.sp2};
|
|
311
|
+
`,vh=o.div`
|
|
312
|
+
display: ${e=>e.isVisible?"flex":"none"};
|
|
313
|
+
align-items: center;
|
|
314
|
+
padding-top: 2px;
|
|
315
|
+
cursor: pointer;
|
|
316
|
+
color: ${e=>e.theme.colors.grey1};
|
|
317
|
+
&:hover {
|
|
318
|
+
color: ${e=>e.theme.colors.primary};
|
|
319
|
+
}
|
|
320
|
+
`,Sh=o(ei)`
|
|
321
|
+
width: 12px;
|
|
322
|
+
height: 12px;
|
|
323
|
+
`,kh=o.div`
|
|
324
|
+
display: ${e=>e.isVisible?"flex":"none"};
|
|
325
|
+
`,jh=54,$h=72,{common:{strings:{hyphen:Yi}}}=me.getLocalizedStrings(),{dateFormat:Ms}=me.getLocalizedStrings();function Ih({selectedTransactionIds:e,transaction:i,transactionId:l}){const r=be(),h=Tt(),[d,a]=s.useState(!1),c=e.includes(l),u=d||c;return t.jsx(Th,{id:l,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:t.jsxs(Lh,{isSelected:u,totalHeight:jh,children:[t.jsx(Pt,{windowSize:r,responsiveWidth:Ne[0].width,style:Ne[0].customStyle,children:t.jsx(an,{isSelected:u,children:i.date.format(Ms.visual.MMMDCommaYYYYformat)})}),Ne[1].customStyle.display!=="none"?t.jsx(Pt,{windowSize:r,responsiveWidth:Ne[1].width,style:Ne[1].customStyle,children:t.jsx(an,{isSelected:u,children:i.clearedDate!=null?i.clearedDate.format(Ms.visual.MMMDCommaYYYYformat):t.jsx("span",{children:Yi})})}):null,t.jsx(Pt,{windowSize:r,style:Ne[2].customStyle,responsiveWidth:Ne[2].width,children:t.jsx(Eh,{isSelected:u,children:t.jsx(Ah,{isSelected:u,children:Vc(i.type)})})}),t.jsx(Pt,{windowSize:r,style:Ne[3].customStyle,responsiveWidth:Ne[3].width,children:i.merchantName!=null&&i.merchantName.length>0?t.jsx(qe,{text:i.merchantName,itemTextStyle:{color:u?h.colors.primary:h.colors.hero}}):t.jsx(an,{isSelected:u,children:t.jsx("span",{children:Yi})})}),t.jsx(Pt,{windowSize:r,style:Ne[4].customStyle,responsiveWidth:Ne[4].width,children:i.accountName!=null&&i.accountName.length>0?t.jsx(qe,{text:i.accountName,itemTextStyle:{color:u?h.colors.primary:h.colors.hero}}):t.jsx(an,{isSelected:u,children:t.jsx("span",{children:Yi})})}),t.jsx(Pt,{windowSize:r,style:Ne[5].customStyle,responsiveWidth:Ne[5].width,children:t.jsx(an,{isSelected:u,style:{textTransform:"capitalize"},children:i.transactionDirection})}),t.jsx(Pt,{windowSize:r,style:Ne[6].customStyle,responsiveWidth:Ne[6].width,children:t.jsx(qe,{text:i.memo,itemTextStyle:{color:u?h.colors.primary:h.colors.hero}})}),t.jsx(Pt,{windowSize:r,style:Ne[7].customStyle,responsiveWidth:Ne[7].width,children:t.jsx(an,{isSelected:u,children:it("0,0.[00]",i.amount)})}),t.jsx(Pt,{windowSize:r,responsiveWidth:Ne[8].width,style:Ne[8].customStyle,children:t.jsx(an,{isSelected:u,children:i.isZeniRecommended?t.jsx(Rh,{}):null})})]})})}const Th=o.div`
|
|
326
|
+
box-sizing: border-box;
|
|
327
|
+
width: 100%;
|
|
328
|
+
display: flex;
|
|
329
|
+
padding-right: ${n.sp8};
|
|
330
|
+
`,Lh=o.div`
|
|
331
|
+
cursor: pointer;
|
|
332
|
+
display: flex;
|
|
333
|
+
border-radius: ${n.sp2};
|
|
334
|
+
width: 100%;
|
|
335
|
+
align-items: center;
|
|
336
|
+
height: ${e=>`${e.totalHeight}px`};
|
|
337
|
+
background-color: ${e=>e.theme.colors.grey5};
|
|
338
|
+
border: ${e=>`1px solid ${e.theme.colors.grey3}`};
|
|
339
|
+
border-color: ${e=>e.isSelected===!0?e.theme.colors.primary:"none"};
|
|
340
|
+
box-shadow: ${e=>`${n.sp0} 2px ${n.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
341
|
+
:hover {
|
|
342
|
+
border: ${e=>`1px solid ${e.theme.colors.primary}`};
|
|
343
|
+
}
|
|
344
|
+
`,Pt=o.div`
|
|
345
|
+
width: ${e=>e.responsiveWidth.valuePercentage(e.windowSize)};
|
|
346
|
+
display: flex;
|
|
347
|
+
align-items: center;
|
|
348
|
+
justify-content: flex-start;
|
|
349
|
+
height: 100%;
|
|
350
|
+
z-index: auto;
|
|
351
|
+
position: relative;
|
|
352
|
+
`,an=o(Re)`
|
|
353
|
+
color: ${e=>e.isSelected===!0?e.theme.colors.primary:e.theme.colors.hero};
|
|
354
|
+
span {
|
|
355
|
+
padding-left: ${n.sp3};
|
|
356
|
+
}
|
|
357
|
+
`,Ah=o(Ye)`
|
|
358
|
+
text-transform: capitalize;
|
|
359
|
+
color: ${e=>e.isSelected===!0?e.theme.colors.primary:e.theme.colors.hero};
|
|
360
|
+
`,Rh=o(Qt)`
|
|
361
|
+
width: ${n.sp3};
|
|
362
|
+
height: ${n.sp3};
|
|
363
|
+
margin-right: ${n.sp1};
|
|
364
|
+
path {
|
|
365
|
+
stroke-width: 2;
|
|
366
|
+
}
|
|
367
|
+
`,Eh=o.div`
|
|
368
|
+
padding: 1px 6px;
|
|
369
|
+
border-radius: ${n.sp1};
|
|
370
|
+
border: ${e=>`1px solid ${e.isSelected?e.theme.colors.primary:e.theme.colors.hero}`};
|
|
371
|
+
`,Dh=me.getLocalizedStrings(),{common:{all:Os,strings:{empty:Ps}}}=Dh,zs="selectedTransactionIds",Mh="expenseAutomationBankReconReconcilePage",Oh=e=>`${e}_form`;function Ph({currentFooterFormId:e,localData:i,matchedTransactions:l,sortConfig:r,onSaveReconciliation:h,selectedAccountId:d,onReconTabColumnSortConfigChanged:a,onUpdateReconcileTabLocalData:c,setCurrentFooterFormId:u}){const m=xn({mode:"all",defaultValues:{selectedTransactionIds:i.selectedTransactionIds},values:{selectedTransactionIds:i.selectedTransactionIds}}),p={label:t.jsx(xh,{onReconTabColumnSortConfigChanged:a,sortConfig:r}),value:Os.toLocaleLowerCase(),defaultChecked:!1,groupLabel:!0},g=l.map(v=>({label:t.jsx(Ih,{transaction:v,selectedTransactionIds:i.selectedTransactionIds,transactionId:v.id}),value:v.id,defaultChecked:!1,groupLabel:!1})),x=[p,...g],y=async v=>{const I=v[zs].filter(k=>k!=Os.toLocaleLowerCase());c(I)};s.useEffect(()=>{const v=m.watch(I=>{I!=null&&Gn(()=>y(I))});return()=>{v.unsubscribe()}}),s.useEffect(()=>(e!=="expenseAutomationBankReconReconcilePage"&&u("expenseAutomationBankReconReconcilePage"),()=>{u("expenseAutomationPage")}),[]);const C=s.useCallback(()=>{h({reconcileAction:"reconcile"})},[h]);if(l.length===0){const v=He("reconciliation",void 0,d).tabs.find(I=>I.id==="reconcile")?.allDoneText;return t.jsx(_h,{children:t.jsx(It,{tab:"missing_receipts",title:v?.title??Ps,subTitle:v?.subTitle??Ps})})}return t.jsx(zh,{children:t.jsx(fn,{...m,children:t.jsx(Fh,{onSubmit:m.handleSubmit(C),id:Oh(Mh),children:t.jsx(Bh,{children:t.jsx(ru,{name:zs,checkBoxes:x,checkBoxStyle:{padding:20},labelCheckBoxStyle:{padding:20},rowHeight:$h,mode:i.selectedTransactionIds.length>0?"always_on":"checked_or_hover",checkBoxContainerStyle:{boxSizing:"border-box"}})})})})})}const zh=o.div``,Fh=o.form``,Bh=o.div`
|
|
372
|
+
height: calc(100vh - 350px);
|
|
373
|
+
`,_h=o.div`
|
|
374
|
+
height: 100%;
|
|
375
|
+
display: flex;
|
|
376
|
+
justify-content: center;
|
|
377
|
+
align-items: center;
|
|
378
|
+
`,Oo=69,Ce={COLUMN_ONE:187,COLUMN_THREE:136,COLUMN_FOUR:240,COLUMN_FIVE:146},Vr=o.div`
|
|
379
|
+
display: flex;
|
|
380
|
+
flex-direction: column;
|
|
381
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
382
|
+
width: 100%;
|
|
383
|
+
min-height: 100%;
|
|
384
|
+
height: calc(100vh - 500px);
|
|
385
|
+
overflow-x: scroll;
|
|
386
|
+
align-items: center;
|
|
387
|
+
`,Nr=o.div`
|
|
388
|
+
display: flex;
|
|
389
|
+
flex-direction: column;
|
|
390
|
+
gap: ${n.sp5};
|
|
391
|
+
align-items: flex-start;
|
|
392
|
+
padding-bottom: ${n.sp9};
|
|
393
|
+
width: 100%;
|
|
394
|
+
`,Ur=o.div`
|
|
395
|
+
width: 100%;
|
|
396
|
+
`,Wr=o.div`
|
|
397
|
+
width: 100%;
|
|
398
|
+
`,es=o.div`
|
|
399
|
+
display: flex;
|
|
400
|
+
flex-direction: row;
|
|
401
|
+
padding: ${n.sp2};
|
|
402
|
+
padding-right: ${n.sp3};
|
|
403
|
+
justify-content: space-between;
|
|
404
|
+
border-bottom: ${e=>`1px solid ${e.theme.colors.grey3}`};
|
|
405
|
+
`,ts=o.div`
|
|
406
|
+
display: flex;
|
|
407
|
+
flex-direction: row;
|
|
408
|
+
justify-content: space-between;
|
|
409
|
+
padding: ${n.sp2};
|
|
410
|
+
padding-right: ${n.sp3};
|
|
411
|
+
`,Vh=o.div`
|
|
412
|
+
border-top: ${e=>`1px solid ${e.theme.colors.grey3}`};
|
|
413
|
+
display: flex;
|
|
414
|
+
flex-direction: row;
|
|
415
|
+
justify-content: space-between;
|
|
416
|
+
padding: ${n.sp2};
|
|
417
|
+
padding-right: ${n.sp3};
|
|
418
|
+
`,Nh=o.div`
|
|
419
|
+
padding: ${n.sp2} ${n.sp3};
|
|
420
|
+
`,ns=o.div`
|
|
421
|
+
display: flex;
|
|
422
|
+
`,Uh=o.div`
|
|
423
|
+
display: flex;
|
|
424
|
+
align-items: center;
|
|
425
|
+
justify-content: center;
|
|
426
|
+
gap: ${n.sp1};
|
|
427
|
+
padding: ${n.sp2} ${n.sp0};
|
|
428
|
+
background-color: ${e=>e.theme.colors.grey3};
|
|
429
|
+
border-bottom-left-radius: ${n.sp2};
|
|
430
|
+
border-bottom-right-radius: ${n.sp2};
|
|
431
|
+
`,is=o.div`
|
|
432
|
+
display: flex;
|
|
433
|
+
flex-direction: column;
|
|
434
|
+
border: ${e=>`1px solid ${e.theme.colors.grey3}`};
|
|
435
|
+
border-radius: ${n.sp2};
|
|
436
|
+
background-color: ${e=>e.theme.colors.grey5};
|
|
437
|
+
box-shadow: ${e=>e.theme.colors.elevation1};
|
|
438
|
+
cursor: pointer;
|
|
439
|
+
border: ${e=>`1px solid ${e.showBorder===!0?e.theme.colors.primary:e.theme.colors.grey3}`};
|
|
440
|
+
.highlight {
|
|
441
|
+
color: ${e=>e.showBorder===!0?e.theme.colors.primary:e.theme.colors.hero};
|
|
442
|
+
}
|
|
443
|
+
:hover {
|
|
444
|
+
border: ${e=>`1px solid ${e.theme.colors.primary}`};
|
|
445
|
+
}
|
|
446
|
+
:hover .highlight {
|
|
447
|
+
color: ${e=>e.theme.colors.primary};
|
|
448
|
+
}
|
|
449
|
+
`,se=o.div`
|
|
450
|
+
display: flex;
|
|
451
|
+
flex-direction: column;
|
|
452
|
+
width: 180px;
|
|
453
|
+
padding: ${n.sp2};
|
|
454
|
+
.hover-background {
|
|
455
|
+
border-radius: ${n.sp1};
|
|
456
|
+
background-color: ${e=>e.forceHoverEffect===!0?e.theme.colors.background:"unset"};
|
|
457
|
+
.select-control {
|
|
458
|
+
background-color: ${e=>e.forceHoverEffect===!0?e.theme.colors.background:"unset"};
|
|
459
|
+
}
|
|
460
|
+
:hover {
|
|
461
|
+
background-color: ${e=>`${e.showHoverEffect===!0?e.theme.colors.background:"unset"}`};
|
|
462
|
+
.select-control {
|
|
463
|
+
background-color: ${e=>e.theme.colors.background};
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
:focus-within {
|
|
467
|
+
background-color: ${e=>`${e.showHoverEffect===!0?e.theme.colors.background:"unset"}`};
|
|
468
|
+
.select-control {
|
|
469
|
+
background-color: ${e=>e.theme.colors.background};
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
.item-value-container {
|
|
474
|
+
.grouped-single-select-field__menu {
|
|
475
|
+
margin-top: ${n.sp2};
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
`,Rt=o.div`
|
|
479
|
+
padding: ${n.sp2} ${n.sp3};
|
|
480
|
+
`,ue=o(Ye)`
|
|
481
|
+
color: ${e=>e.theme.colors.hero};
|
|
482
|
+
`,we=o(Re)`
|
|
483
|
+
width: 100%;
|
|
484
|
+
color: ${e=>e.theme.colors.hero};
|
|
485
|
+
white-space: nowrap;
|
|
486
|
+
overflow: hidden;
|
|
487
|
+
text-overflow: ellipsis;
|
|
488
|
+
`,pe=o.div`
|
|
489
|
+
display: flex;
|
|
490
|
+
gap: ${n.sp1};
|
|
491
|
+
color: ${e=>e.theme.colors.primary};
|
|
492
|
+
.select-value-container {
|
|
493
|
+
.auto-complete-single-select-field__input-container {
|
|
494
|
+
.auto-complete-single-select-field__input {
|
|
495
|
+
text-align: left;
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
.grouped-single-select-field__input-container {
|
|
499
|
+
.grouped-single-select-field__input {
|
|
500
|
+
text-align: left;
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
`,os=o.div`
|
|
505
|
+
border-left: ${e=>`1px solid ${e.theme.colors.grey3}`};
|
|
506
|
+
display: flex;
|
|
507
|
+
flex-direction: column;
|
|
508
|
+
gap: ${n.sp3};
|
|
509
|
+
align-items: center;
|
|
510
|
+
justify-content: center;
|
|
511
|
+
padding: ${n.sp0} 42px;
|
|
512
|
+
`,ss=o.div`
|
|
513
|
+
flex: 1;
|
|
514
|
+
`,Hr=o(Ye)`
|
|
515
|
+
padding: ${n.sp0} 6px;
|
|
516
|
+
color: ${he.info};
|
|
517
|
+
border: 1px solid ${he.info};
|
|
518
|
+
border-radius: ${n.sp1};
|
|
519
|
+
margin-top: ${n.sp1};
|
|
520
|
+
`,Ai=o(st)`
|
|
521
|
+
padding: ${n.sp2};
|
|
522
|
+
color: ${e=>e.theme.colors.hero};
|
|
523
|
+
background: ${e=>e.theme.colors.overlayColor};
|
|
524
|
+
border-radius: ${n.sp1};
|
|
525
|
+
`,rt=o(Ai)`
|
|
526
|
+
padding: 2px ${n.sp2};
|
|
527
|
+
`,Ht=me.getLocalizedStrings().expenseAutomation.accountRecon.review.header,Ft=[{key:"date",value:Ht.date,sortOrder:"ascending",width:new G(20,20),loaderWidth:120},{key:"payee",value:Ht.payee,sortOrder:"ascending",width:new G(20,20),loaderWidth:212},{key:"memo",value:Ht.memo,sortOrder:"ascending",width:new G(20,20),loaderWidth:192},{key:"direction",value:Ht.direction,sortOrder:"ascending",width:new G(15,15),loaderWidth:84},{key:"match",value:Ht.match,sortOrder:"ascending",width:new G(15,15),loaderWidth:152},{key:"amount",value:Ht.amount,sortOrder:"ascending",width:new G(10,10),loaderWidth:64}],Po=[{key:"payee",value:Ht.payee,sortOrder:"ascending",width:new G(65,65),loaderWidth:212},{key:"amount",value:Ht.amount,sortOrder:"ascending",width:new G(30,30),loaderWidth:64}],Wh=e=>{const{sortConfig:i,onColumnSortConfigChanged:l}=e,r=be(),h=Xe()?Po:Ft,[d,a]=s.useState(()=>h.map(u=>({...u,sortOrder:u.key===i.sortKey?i.sortOrder:"ascending"})));s.useEffect(()=>{a(h.map(u=>({...u,sortOrder:u.key===i.sortKey?i.sortOrder:"ascending"})))},[i.sortKey,i.sortOrder,h]);const c=(u,m)=>{let p=m;i.sortKey===u&&(p=m==="ascending"?"descending":"ascending"),l(u,p)};return t.jsx(qh,{children:d.map(u=>t.jsxs(Kh,{sortDataValue:i.sortKey,actualDataValue:u.key,wrapperWidth:u.width,windowSize:r,isLastColumn:u.key==="amount",children:[t.jsxs(Jh,{"data-testid":O("account-reconciliation-review-header",u.value),sortKey:u.key,onClick:()=>c(u.key,u.sortOrder),children:[t.jsx(Ye,{children:u.value}),t.jsx(Qh,{sortDataValue:i.sortKey,headerData:u,children:t.jsx(Gh,{})})]}),t.jsx(Zh,{sortDataValue:i.sortKey,windowSize:r,isVisible:i.sortKey===u.key&&(i.sortKey!=="date"||i.sortOrder==="ascending"),children:t.jsx(Yh,{"data-testid":O("account-reconciliation-review-sort-by-date"),onClick:()=>c("date","ascending")})})]},u.key))})},Hh=s.memo(Wh),qh=o(st)`
|
|
528
|
+
top: 0;
|
|
529
|
+
left: 0;
|
|
530
|
+
width: fit-content;
|
|
531
|
+
min-width: 100%;
|
|
532
|
+
z-index: 6;
|
|
533
|
+
display: flex;
|
|
534
|
+
align-items: center;
|
|
535
|
+
box-sizing: border-box;
|
|
536
|
+
padding: ${n.sp3} ${n.sp4};
|
|
537
|
+
position: sticky;
|
|
538
|
+
color: ${e=>e.theme.colors.grey1};
|
|
539
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
540
|
+
`,Kh=o.div`
|
|
541
|
+
color: ${e=>e.sortDataValue===e.actualDataValue?e.theme.colors.primary:e.theme.colors.grey1};
|
|
542
|
+
width: ${e=>e.wrapperWidth.valuePercentage(e.windowSize)};
|
|
543
|
+
min-width: ${e=>e.isLastColumn===!0?"auto":e.wrapperWidth.valuePercentage(e.windowSize)};
|
|
544
|
+
display: flex;
|
|
545
|
+
align-items: center;
|
|
546
|
+
gap: 5px;
|
|
547
|
+
left: ${n.sp0};
|
|
548
|
+
justify-content: ${e=>e.isLastColumn===!0?"flex-end":"flex-start"};
|
|
549
|
+
`,Jh=o.div`
|
|
550
|
+
display: flex;
|
|
551
|
+
cursor: pointer;
|
|
552
|
+
gap: ${n.sp1};
|
|
553
|
+
&:hover {
|
|
554
|
+
color: ${e=>e.theme.colors.primary};
|
|
555
|
+
}
|
|
556
|
+
white-space: nowrap;
|
|
557
|
+
`,Qh=o.div`
|
|
558
|
+
display: flex;
|
|
559
|
+
align-items: center;
|
|
560
|
+
transform: ${e=>e.sortDataValue===e.headerData.key&&e.headerData.sortOrder==="descending"?"rotate(180deg)":"rotate(0deg)"};
|
|
561
|
+
${e=>e.headerData.sortOrder==="ascending"?re`
|
|
562
|
+
padding-top: 2px;
|
|
563
|
+
`:re`
|
|
564
|
+
padding-bottom: 2px;
|
|
565
|
+
`}
|
|
566
|
+
`,Gh=o(Xn)`
|
|
567
|
+
width: ${n.sp2};
|
|
568
|
+
height: ${n.sp2};
|
|
569
|
+
cursor: pointer;
|
|
570
|
+
color: inherit;
|
|
571
|
+
`,Zh=o.div`
|
|
572
|
+
display: ${e=>e.isVisible?"flex":"none"};
|
|
573
|
+
align-items: center;
|
|
574
|
+
padding-top: 2px;
|
|
575
|
+
`,Yh=o(ei)`
|
|
576
|
+
width: 12px;
|
|
577
|
+
height: 12px;
|
|
578
|
+
cursor: pointer;
|
|
579
|
+
color: ${e=>e.theme.colors.hero};
|
|
580
|
+
`,kt="accountReconReviewTableSection",{dateFormat:Xh,expenseAutomation:ep,common:Et}=me.getLocalizedStrings(),{visual:qr}=Xh,{accountRecon:Se}=ep,Kr=e=>[{label:Se.review.formLabels.allBankAccounts,options:e.map(i=>({label:i.accountName,value:i.accountId}))}],Jr=e=>[{label:Se.review.formLabels.allCreditCards,options:e.map(i=>({label:i.accountName,value:i.accountId}))}],Fs=e=>`${kt}_${e}_form`,Oe=(e,i)=>`${kt}.${e}.${i}`,tp=e=>{const{sortKey:i,sortOrder:l,accountReconEntity:r,entitySearchAutoCompleteActions:h,allAccountList:d,classList:a,localData:c,accountListNestedAccountHierarchy:u,classListNestedAccountHierarchy:m,selectedAccountId:p,entitySearchAutoCompleteData:g,excludeFetchById:x,saveFetchById:y,reviewTabSelectedVendorByTransactionId:C,refreshStatus:v,updateLocalData:I,onColumnSortConfigChanged:k,onSaveReconciliation:T,onSaveReconciliationReview:$,onReconMatchedTransactionClick:w,bankAccounts:S,creditCards:j}=e,{transactionsToReview:b,account:{accountType:z}}=r,A=s.useRef(null),[M,_]=s.useState(null),W=L=>{const P=b[L],ae=Dr(P),V=Mr(P),B=Or(P,z??"bank"),Q=Pr(P,z??"bank"),de=zr(P),le=Zo(P),ge=P.recommendedAction.recommendedTransactions[0]?.merchantName!=null;return P.transactionId===M?V||B||Q||de||le?275+(ge?25:0):ae?185+P.recommendedAction.recommendedTransactions.length*40+(ge?25:0):146:72},H=s.useMemo(()=>({onColumnSortConfigChanged:k,sortConfig:{sortKey:i,sortOrder:l}}),[k,i,l]);if(s.useEffect(()=>{_(b[0]?.transactionId??null),A.current?.resetAfterIndex(0)},[i,l]),s.useEffect(()=>{A.current?.resetAfterIndex(0)},[M]),s.useEffect(()=>{A.current?.resetAfterIndex(0)},[b.length]),s.useEffect(()=>{v.fetchState==="Completed"&&A.current?.resetAfterIndex(0)},[v]),b.length===0){const L=He("reconciliation",void 0,p).tabs.find(P=>P.id==="review")?.allDoneText;return t.jsx(Sp,{children:t.jsx(It,{tab:"reconciliation",title:L?.title??Et.strings.empty,subTitle:L?.subTitle??Et.strings.empty})})}return t.jsx(cp,{children:t.jsx(Qr.Provider,{value:H,children:t.jsx(Kn,{children:({height:L,width:P})=>t.jsx(Bi,{width:P,height:L,innerElementType:Gr,ref:A,itemCount:b.length,itemSize:W,itemKey:ae=>b[ae].transactionId,overscanCount:Oc,itemData:{transactionsList:b,expandedRowId:M,allAccountList:d,classList:a,accountListNestedAccountHierarchy:u,classListNestedAccountHierarchy:m,localData:c,entitySearchAutoCompleteData:g,entitySearchAutoCompleteActions:h,excludeFetchById:x,saveFetchById:y,reviewTabSelectedVendorByTransactionId:C,bankAccounts:S,creditCards:j,accountType:z,updateLocalData:I,setExpandedRowId:_,onSaveReconciliation:T,onSaveReconciliationReview:$,onReconMatchedTransactionClick:w},initialScrollOffset:0,children:np})})})})},Qr=s.createContext(void 0),Gr=s.forwardRef((e,i)=>{const{children:l,style:r,...h}=e,d=s.useContext(Qr);return t.jsxs(dp,{ref:i,style:{...r,width:"auto",maxWidth:"var(--side-panel-list-width, 100%)",padding:`${n.sp0} ${n.sp8}`},...h,children:[d!=null&&t.jsx(Hh,{onColumnSortConfigChanged:d.onColumnSortConfigChanged,sortConfig:d.sortConfig}),t.jsx(up,{children:l})]})});Gr.displayName="Account recon review table inner element type";const np=({index:e,style:i,data:l})=>{const{selectedTransactionId:r}=Fi(),{transactionsList:h,expandedRowId:d,setExpandedRowId:a,entitySearchAutoCompleteActions:c,allAccountList:u,classList:m,localData:p,updateLocalData:g,accountListNestedAccountHierarchy:x,classListNestedAccountHierarchy:y,entitySearchAutoCompleteData:C,onSaveReconciliation:v,onSaveReconciliationReview:I,onReconMatchedTransactionClick:k,excludeFetchById:T,saveFetchById:$,reviewTabSelectedVendorByTransactionId:w,bankAccounts:S,creditCards:j,accountType:b}=l,z=h[e],A=r!=null&&r===z.transactionId;return t.jsx(lp,{isPanelSelected:A,style:{...i,width:"100%"},children:t.jsx(ip,{transaction:z,expandedRowId:d,setExpandedRowId:a,entitySearchAutoCompleteActions:c,accountListNestedAccountHierarchy:x,allAccountList:u,classList:m,localData:p,updateLocalData:g,entitySearchAutoCompleteData:C,classListNestedAccountHierarchy:y,onSaveReconciliation:v,onSaveReconciliationReview:I,onReconMatchedTransactionClick:k,excludeFetchById:T,saveFetchById:$,selectedVendor:w[z.transactionId],bankAccounts:S,creditCards:j,accountType:b})})},ip=({transaction:e,expandedRowId:i,accountListNestedAccountHierarchy:l,entitySearchAutoCompleteActions:r,allAccountList:h,classList:d,classListNestedAccountHierarchy:a,localData:c,entitySearchAutoCompleteData:u,excludeFetchById:m,saveFetchById:p,selectedVendor:g,bankAccounts:x,creditCards:y,accountType:C,setExpandedRowId:v,updateLocalData:I,onSaveReconciliation:k,onSaveReconciliationReview:T,onReconMatchedTransactionClick:$})=>{const w=i===e.transactionId,S=be(),j=Xe(),b=c[e.transactionId],z=e.recommendedAction.action==="record_bill_payment",A=e.recommendedAction.action==="record_expense",M=Zo(e),_=h.find(L=>L.accountId===e.recommendedAction.recommendedTransactions[0]?.accountId),W=L=>L.recommendedAction.recommendedTransactions.length>0&&L.recommendedAction.recommendedTransactions[0].merchantName!=null?L.recommendedAction.recommendedTransactions[0].merchantName:Et.strings.hyphen,H=e.recommendedAction.recommendedTransactions[0]?.merchantName;return t.jsxs(sp,{className:"recon-row-card",isQuickViewMode:j,isExpanded:w,children:[t.jsxs(ap,{isExpanded:w,onClick:()=>v(e.transactionId),"data-testid":O("account-reconciliation-review-row",e.transactionId),children:[j?null:t.jsx(vn,{windowSize:S,responsiveWidth:Ft[0].width,children:t.jsx(bn,{children:e.transactionDate.format(qr.MMMDCommaYYYYformat)})}),t.jsx(vn,{windowSize:S,responsiveWidth:j?Po[0].width:Ft[1].width,children:t.jsx(bn,{children:t.jsx(qe,{itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"},text:W(e)})})}),j?null:t.jsxs(t.Fragment,{children:[t.jsx(vn,{windowSize:S,responsiveWidth:Ft[2].width,children:t.jsx(bn,{children:t.jsx(qe,{itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"},text:e.memo})})}),t.jsx(vn,{windowSize:S,responsiveWidth:Ft[3].width,children:t.jsx(bn,{style:{textTransform:"capitalize"},children:e.transactionDirection})}),t.jsxs(vn,{windowSize:S,responsiveWidth:Ft[4].width,children:[t.jsx(Ze,{controller:z,children:t.jsx(kp,{children:t.jsx(jp,{children:Se.review.matchesCount.replace("__count__",e.recommendedAction.recommendedTransactions.length.toString())})})}),t.jsx(Ze,{controller:!z,children:t.jsx(bn,{children:_!=null?t.jsxs(t.Fragment,{children:[t.jsx(Zr,{}),t.jsx(qe,{itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"},text:_.accountName})]}):Et.strings.hyphen})})]})]}),t.jsx(vn,{windowSize:S,isLastColumn:!0,responsiveWidth:j?Po[1].width:Ft[5].width,children:t.jsx(bn,{children:Qo("0,0.00",e.amount.amount,e.amount.currencySymbol)})})]}),t.jsxs(Ze,{controller:w&&b!=null,children:[t.jsx(op,{onSaveReconciliation:k,onSaveReconciliationReview:T,updateLocalData:I,saveFetchById:p,excludeFetchById:m,localData:b,classListNestedAccountHierarchy:a,allAccountList:h,classList:d,transaction:e,accountListNestedAccountHierarchy:l,entitySearchAutoCompleteActions:r,entitySearchAutoCompleteData:u,selectedVendor:g,bankAccounts:x,creditCards:y,accountType:C,onReconMatchedTransactionClick:$}),t.jsx(Ze,{controller:(z||A||M)&&H!=null,children:t.jsx(Ip,{children:t.jsxs(Tp,{children:[C==="credit_card"?Se.review.creditCardDetail:Se.review.bankDetail,Et.strings.colon," ",H]})})})]})]})},op=({transaction:e,accountListNestedAccountHierarchy:i,entitySearchAutoCompleteActions:l,allAccountList:r,classList:h,classListNestedAccountHierarchy:d,localData:a,entitySearchAutoCompleteData:c,excludeFetchById:u,saveFetchById:m,selectedVendor:p,bankAccounts:g,creditCards:x,accountType:y,updateLocalData:C,onSaveReconciliation:v,onSaveReconciliationReview:I,onReconMatchedTransactionClick:k})=>{const T=Tt(),$=Xe(),[w,S]=s.useState(!a.vendor?.id),[j,b]=s.useState(!a.customer?.id),[z,A]=s.useState(a.categoryId==null),[M,_]=s.useState(a.classId==null),[W,H]=s.useState(a.bankAccountId==null),[L,P]=s.useState(a.creditCardId==null),[ae,V]=s.useState(!a.memo),B=Dr(e),Q=Mr(e),de=Pr(e,y??"bank"),le=Or(e,y??"bank"),ge=zr(e),te=Zo(e),K=s.useMemo(()=>{if(!Q&&!te)return Kt(i);if(p!=null&&p.id!==e.recommendedAction.recommendedTransactions[0]?.merchantId)return Kt(i,p?.recommendations);const E=r.find(je=>je.accountId===e.recommendedAction.recommendedTransactions[0]?.accountId),ce=E!=null?{...E,reason:Se.review.zeniGptRecommendation,min:0,max:0}:void 0;return Kt(i,[{account:ce}])},[Q,te,p,e.recommendedAction.recommendedTransactions,r,i]),Z=s.useMemo(()=>{if(!Q&&!te)return Ti(d);if(p!=null&&p.id!==e.recommendedAction.recommendedTransactions[0]?.merchantId)return Ti(d,p?.recommendations);const E=h.find(je=>je.classId===e.recommendedAction.recommendedTransactions[0]?.classId),ce=E!=null?{...E,reason:Se.review.zeniGptRecommendation,min:0,max:0}:void 0;return Ti(d,[{class:ce}])},[Q,te,p,e.recommendedAction.recommendedTransactions,h,d]),D=xn({mode:"onSubmit",reValidateMode:"onSubmit",shouldFocusError:!0,defaultValues:s.useMemo(()=>Bs(e,a,K,r,Z,g,x,c),[e,a,Z,r,K,g,x,c]),values:s.useMemo(()=>Bs(e,a,K,r,Z,g,x,c),[e,a,Z,r,K,g,x,c])}),R=async(E,ce)=>{E.includes("memo")||C(_s(ce,e,c,r),e.transactionId,E.includes("vendor"))};s.useEffect(()=>{const E=D.watch((ce,{name:je})=>{je!=null&&ce!=null&&Gn(()=>R(je,ce))});return()=>{E.unsubscribe()}});const J=s.useCallback(E=>{if(!$){if(Q||ge||te){if((Q||te)&&a.vendor==null){S(!1),D.setError(Oe(e.transactionId,"vendor"),{type:"required"});return}if(ge&&a.customer==null){b(!1),D.setError(Oe(e.transactionId,"customer"),{type:"required"});return}if(a.categoryId==null){A(!1),D.setError(Oe(e.transactionId,"category"),{type:"required"});return}}C(_s(E,e,c,r),e.transactionId,!1),I(e.transactionId)}},[$,Q,te,ge,C,e,c,r,I,a.categoryId,a.vendor,a.customer]),N=D.watch(Oe(e.transactionId,"vendor")),Y=D.watch(Oe(e.transactionId,"customer")),ne=s.useRef(),q=s.useMemo(()=>Q||te?"vendor":ge?"customer":null,[Q,te,ge]),U=(E,ce)=>{q!=null&&l.onAutoCompleteInputChange?.(E,q),ne.current=ce};s.useEffect(()=>{c.entityAutoCompleteView.fetchState==="Completed"&&((Q||te)&&ne.current?.(jr(c.entityAutoCompleteView)),ge&&ne.current?.(Jc(c.entityAutoCompleteView)))},[c.entityAutoCompleteView,ge,Q,te]);const F=E=>h.filter(ce=>ce.classId===E)[0]?.accountingClassNumber??void 0,oe=E=>r.filter(ce=>ce.qboId===E)[0]?.qboId,ee=s.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]),X=()=>{$||A(!1)},ke=()=>{$||H(!1)},Ie=()=>{$||P(!1)};return s.useEffect(()=>{z===!1&&a.categoryId==null&&D.setFocus(Oe(e.transactionId,"category"))},[z]),s.useEffect(()=>{M===!1&&a.classId==null&&D.setFocus(Oe(e.transactionId,"class"))},[M]),s.useEffect(()=>{w===!1&&a.vendor==null&&D.setFocus(Oe(e.transactionId,"vendor"))},[w]),s.useEffect(()=>{j===!1&&a.customer==null&&D.setFocus(Oe(e.transactionId,"customer"))},[j]),s.useEffect(()=>{W===!1&&a.bankAccountId==null&&D.setFocus(Oe(e.transactionId,"bankAccount"))},[W]),s.useEffect(()=>{L===!1&&a.creditCardId==null&&D.setFocus(Oe(e.transactionId,"creditCard"))},[L]),t.jsx(fn,{...D,children:t.jsx("form",{onSubmit:D.handleSubmit(J),id:Fs(e.transactionId),children:t.jsxs(rp,{children:[t.jsxs(hp,{children:[t.jsxs(gp,{children:[t.jsxs(xp,{children:[t.jsx(Zr,{}),t.jsx(Qi,{label:{label:B?Se.review.formLabels.match:Se.review.formLabels.categorize},radioField:{name:Oe(e.transactionId,"match_radio"),id:B?"match":"categorize",value:B?"match":"categorize",checked:!0,style:{width:n.sp3,height:n.sp3,padding:"2px"}},style:{width:"auto"}})]}),t.jsx(Ze,{controller:!B,children:t.jsxs(t.Fragment,{children:[t.jsx(Vs,{}),ee.map(E=>t.jsx(Qi,{label:{label:Se.review.formLabels[E]},style:{width:"auto"},isDisabled:"readonly",changeLabelColorInDisableMode:!0,radioField:{name:Oe(e.transactionId,"recommendedActionType"),id:E,value:E,style:{width:n.sp3,height:n.sp3,padding:"2px"}}},E))]})})]}),t.jsxs(mp,{children:[t.jsx(Wn,{variant:"secondary",size:"small",label:Se.review.formLabels.exclude,loading:u[e.transactionId]?.fetchState==="In-Progress","data-testid":O("account-reconciliation-review-exclude-button",e.transactionId),style:{width:n.sp10},reverseSpinnerColor:!1,onClick:()=>{$||v({reconcileAction:"exclude",excludeTransactionId:e.transactionId})}}),t.jsx(Wn,{form:Fs(e.transactionId),"data-testid":O("account-reconciliation-review-save-button",e.transactionId),label:Et.footer.save,style:{width:n.sp10},variant:"primary",size:"small",type:"submit",loading:m[e.transactionId]?.fetchState==="In-Progress"})]})]}),t.jsx(Ze,{controller:Q||ge||te,children:t.jsxs(Xi,{children:[t.jsx(Ze,{controller:Q||te,children:t.jsx($t,{onClickAway:()=>{a.vendor==null&&w===!1&&S(!0)},children:t.jsx(se,{style:{flex:1,padding:f[0],justifyContent:"center"},showHoverEffect:!0,forceHoverEffect:!1,children:t.jsxs(Rt,{className:"hover-background",style:{padding:`${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:Et.texts.vendor}),t.jsx(pe,{style:{gap:f[3]},className:"item-value-container",children:t.jsx(t.Fragment,{children:w===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!$&&S(!1)},"data-testid":O("account-reconciliation-review-add-vendor-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:f[1],color:T.colors.champion,cursor:"pointer"},children:[t.jsx(rn,{}),Se.review.formLabels.addVendor]}):t.jsx(Eo,{name:Oe(e.transactionId,"vendor"),allowEmpty:!1,placeholder:Se.review.formLabels.addVendor,valueToId:E=>E,defaultValue:{selectedOption:N?.selectedOption,defaultOptions:N?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:n.sp4})},registerOptions:{required:!0,validate:E=>!!E.selectedOption},loadOptions:U})})})]})})})}),t.jsx(Ze,{controller:ge,children:t.jsx($t,{onClickAway:()=>{a.customer==null&&j===!1&&b(!0)},children:t.jsx(se,{style:{flex:1,padding:f[0],justifyContent:"center"},showHoverEffect:!0,forceHoverEffect:!1,children:t.jsxs(Rt,{className:"hover-background",style:{padding:`${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:Et.texts.customer}),t.jsx(pe,{style:{gap:f[3]},className:"item-value-container",children:t.jsx(t.Fragment,{children:j===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!$&&b(!1)},"data-testid":O("account-reconciliation-review-add-customer-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:f[1],color:T.colors.champion,cursor:"pointer"},children:[t.jsx(rn,{}),Se.review.formLabels.addCustomer]}):t.jsx(Eo,{name:Oe(e.transactionId,"customer"),allowEmpty:!1,placeholder:Se.review.formLabels.addCustomer,valueToId:E=>E,defaultValue:{selectedOption:Y?.selectedOption,defaultOptions:Y?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:n.sp4})},registerOptions:{required:!0,validate:E=>!!E.selectedOption},loadOptions:U})})})]})})})}),t.jsx($t,{onClickAway:()=>{a.categoryId==null&&z===!1&&A(!0)},children:t.jsx(se,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(Rt,{className:"hover-background",children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:Et.texts.category}),t.jsx(pe,{className:"item-value-container",children:t.jsx(t.Fragment,{children:z===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!$&&X()},"data-testid":O("account-reconciliation-review-add-category-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:f[1],color:T.colors.champion,cursor:"pointer"},children:[t.jsx(rn,{}),Se.review.formLabels.addCategory]}):t.jsx(In,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Oe(e.transactionId,"category"),placeholder:Se.review.formLabels.addCategory,valueToId:E=>oe(E),defaultValue:{allOptions:K,selectedOption:r.find(E=>E.accountId===a.categoryId)?.qboId},registerOptions:{required:!0,validate:E=>!!E.selectedOption},customStyleConfig:fi})})})]})})}),t.jsx($t,{onClickAway:()=>{a.classId==null&&M===!1&&_(!0)},children:t.jsx(se,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(Rt,{className:"hover-background",children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:Et.texts.class}),t.jsx(pe,{className:"item-value-container",children:t.jsx(t.Fragment,{children:M===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!$&&_(!1)},"data-testid":O("account-reconciliation-review-add-class-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:f[1],color:T.colors.champion,cursor:"pointer"},children:[t.jsx(rn,{}),Se.review.formLabels.addClass]}):t.jsx(In,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Oe(e.transactionId,"class"),placeholder:Se.review.formLabels.addClass,valueToId:E=>F(E),defaultValue:{allOptions:Z,selectedOption:a.classId},registerOptions:{required:!0,validate:E=>!!E.selectedOption},customStyleConfig:fi})})})]})})})]})}),t.jsx(Ze,{controller:B,children:t.jsxs(fp,{children:[t.jsxs(yp,{children:[t.jsx("span",{className:"matched-text",children:`${Se.review.matchedFoundCount.replace("__count__",e.recommendedAction.recommendedTransactions.length.toString())} `}),Se.review.matchesFoundFullInfo]}),t.jsx(Cp,{children:e.recommendedAction.recommendedTransactions.map(E=>E.bookTransactionId!=null?t.jsxs(bp,{children:[t.jsx(Qi,{label:{label:t.jsxs(wp,{children:[t.jsx(Re,{children:E.date.format(qr.MMMDCommaYYYYformat)}),t.jsx(Re,{children:E.memo})]})},style:{width:"auto"},isDisabled:void 0,changeLabelColorInDisableMode:!0,radioField:{name:Oe(e.transactionId,"matchedTransaction"),registerOptions:{required:!0},id:E.bookTransactionId,value:E.bookTransactionId,style:{width:n.sp3,height:n.sp3,padding:"2px"}}}),t.jsxs($p,{"data-testid":O("account-reconciliation-review-matched-transaction-amount",E.bookTransactionId),onClick:()=>{E.bookTransactionId!=null&&k(E.bookTransactionId)},children:[t.jsx(vp,{children:Qo("0,0.00",E.amount.amount,E.amount.currencySymbol)}),t.jsx(Vs,{})]})]},E.bookTransactionId):null)})]})}),t.jsx(Ze,{controller:de,children:t.jsx(Xi,{children:t.jsx($t,{onClickAway:()=>{a.bankAccountId==null&&W===!1&&H(!0)},children:t.jsx(se,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(Rt,{className:"hover-background",children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:y==="credit_card"?Se.review.formLabels.selectAccount:Se.review.formLabels.transferTo}),t.jsx(pe,{className:"item-value-container",children:t.jsx(t.Fragment,{children:W===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!$&&ke()},"data-testid":O("account-reconciliation-review-add-account-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:f[1],color:T.colors.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(rn,{}),Se.review.formLabels.selectAccount]}):t.jsx(In,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Oe(e.transactionId,"bankAccount"),placeholder:Se.review.formLabels.selectAccount,defaultValue:{allOptions:Kr(g),selectedOption:a.bankAccountId},registerOptions:{required:!0,validate:E=>!!E.selectedOption},customStyleConfig:fi})})})]})})})})}),t.jsx(Ze,{controller:le,children:t.jsx(Xi,{children:t.jsx($t,{onClickAway:()=>{a.creditCardId==null&&L===!1&&P(!0)},children:t.jsx(se,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(Rt,{className:"hover-background",children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:Se.review.formLabels.creditCard}),t.jsx(pe,{className:"item-value-container",children:t.jsx(t.Fragment,{children:L===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!$&&Ie()},"data-testid":O("account-reconciliation-review-add-credit-card-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:f[1],color:T.colors.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(rn,{}),Se.review.formLabels.selectCard]}):t.jsx(In,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Oe(e.transactionId,"creditCard"),placeholder:Se.review.formLabels.selectCard,defaultValue:{allOptions:Jr(x),selectedOption:a.creditCardId},registerOptions:{required:!0,validate:E=>!!E.selectedOption},customStyleConfig:fi})})})]})})})})}),t.jsx(Ze,{controller:!B,children:t.jsx(pp,{children:t.jsx(se,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",width:"100%"},children:t.jsxs(Rt,{className:"hover-background",children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:Se.review.header.memo}),t.jsx(pe,{className:"item-value-container",children:t.jsx(t.Fragment,{children:ae===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!$&&V(!1)},"data-testid":O("account-reconciliation-review-add-memo-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:f[1],color:T.colors.champion,cursor:"pointer"},children:[t.jsx(rn,{}),Se.review.formLabels.addMemo]}):t.jsx(Qc,{name:Oe(e.transactionId,"memo"),placeholder:Se.review.formLabels.addMemo,type:"text",style:{padding:0,textAlign:"left",width:"100%",background:"transparent"}})})})]})})})})]})})})},fi={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:n.sp4}),singleValue:()=>({margin:0}),menuPortal:()=>({zIndex:9999}),menu:()=>({width:`calc(100% + ${n.sp5})`,marginRight:`-${n.sp3}`,marginLeft:`-${n.sp3}`})},Bs=(e,i,l,r,h,d,a,c)=>{const u=r.find(m=>m.accountId===i.categoryId);return{[kt]:{[e.transactionId]:{category:{selectedOption:u?.qboId,allOptions:l},class:{selectedOption:i?.classId,allOptions:h},bankAccount:{selectedOption:i?.bankAccountId,allOptions:Kr(d)},creditCard:{selectedOption:i?.creditCardId,allOptions:Jr(a)},memo:i?.memo,recommendedActionType:e.recommendedAction.action,matchedTransaction:i?.matchedTransactionId,vendor:{selectedOption:i?.vendor?.id,defaultOptions:Lr(c.entityAutoCompleteView,i?.vendor)},customer:{selectedOption:i?.customer?.id,defaultOptions:sd(i?.customer,c.entityAutoCompleteView)}}}}},_s=(e,i,l,r)=>{const{vendor:h,customer:d}=e[kt][i.transactionId];let a;if(h.selectedOption!=null){const u=h.defaultOptions.find(m=>m.value===h.selectedOption);if(u!=null)a={id:h.selectedOption,name:u.label};else{const m=l.entityAutoCompleteView.vendor.find(p=>p.id===h.selectedOption||p.zeniId===h.selectedOption);m!=null&&(a={id:m.zeniId,name:m.name})}}let c;if(d.selectedOption!=null){const u=d.defaultOptions.find(m=>m.value===d.selectedOption);if(u!=null)c={id:d.selectedOption,name:u.label};else{const m=l.entityAutoCompleteView.customer.find(p=>p.id===d.selectedOption||p.zeniId===d.selectedOption);m!=null&&(c={id:m.zeniId,name:m.name})}}return{categoryId:r.find(u=>u.qboId===e[kt][i.transactionId].category.selectedOption)?.accountId??e[kt][i.transactionId].category.selectedOption,classId:e[kt][i.transactionId].class.selectedOption,memo:e[kt][i.transactionId].memo,matchedTransactionId:e[kt][i.transactionId].matchedTransaction,vendor:a,bankAccountId:e[kt][i.transactionId].bankAccount.selectedOption,creditCardId:e[kt][i.transactionId].creditCard.selectedOption,customer:c}},bn=o(Re)`
|
|
581
|
+
display: flex;
|
|
582
|
+
align-items: center;
|
|
583
|
+
column-gap: ${n.sp1};
|
|
584
|
+
`,vn=o.div`
|
|
585
|
+
width: ${e=>e.responsiveWidth.valuePercentage(e.windowSize)};
|
|
586
|
+
display: flex;
|
|
587
|
+
justify-content: ${e=>e.isLastColumn===!0?"flex-end":"flex-start"};
|
|
588
|
+
`,sp=o.div`
|
|
589
|
+
display: flex;
|
|
590
|
+
flex-direction: column;
|
|
591
|
+
box-sizing: border-box;
|
|
592
|
+
position: relative;
|
|
593
|
+
background: ${e=>e.theme.colors.grey5};
|
|
594
|
+
border: 1px solid
|
|
595
|
+
${e=>e.isExpanded?e.theme.colors.primary:e.theme.colors.grey3};
|
|
596
|
+
color: ${e=>e.isExpanded?e.theme.colors.primary:e.theme.colors.hero};
|
|
597
|
+
&:hover {
|
|
598
|
+
border: 1px solid ${e=>e.theme.colors.primary};
|
|
599
|
+
color: ${e=>e.theme.colors.primary};
|
|
600
|
+
}
|
|
601
|
+
box-shadow: ${e=>e.theme.colors.elevation1};
|
|
602
|
+
border-radius: ${n.sp2};
|
|
603
|
+
`,ap=o.div`
|
|
604
|
+
display: flex;
|
|
605
|
+
flex-direction: row;
|
|
606
|
+
align-items: center;
|
|
607
|
+
cursor: pointer;
|
|
608
|
+
padding: ${n.sp3} ${n.sp4};
|
|
609
|
+
column-gap: ${n.sp2};
|
|
610
|
+
|
|
611
|
+
border-bottom: ${e=>e.isExpanded?"1px solid "+e.theme.colors.primary:"none"};
|
|
612
|
+
`,rp=o.div`
|
|
613
|
+
padding: ${n.sp2} ${n.sp4};
|
|
614
|
+
display: flex;
|
|
615
|
+
flex-direction: column;
|
|
616
|
+
row-gap: ${n.sp2};
|
|
617
|
+
`,lp=o.div`
|
|
618
|
+
top: ${n.sp0};
|
|
619
|
+
left: ${n.sp0};
|
|
620
|
+
padding-right: var(--side-panel-list-item-pr, 0px);
|
|
621
|
+
box-sizing: border-box;
|
|
622
|
+
${e=>e.isPanelSelected===!0&&re`
|
|
623
|
+
.recon-row-card {
|
|
624
|
+
${Yo(e.theme)}
|
|
625
|
+
}
|
|
626
|
+
`}
|
|
627
|
+
`,cp=o.div`
|
|
628
|
+
height: calc(100vh - 350px);
|
|
629
|
+
max-width: 99.9%;
|
|
630
|
+
padding: ${n.sp0};
|
|
631
|
+
`,dp=o.div``,up=o.div`
|
|
632
|
+
position: relative;
|
|
633
|
+
width: auto;
|
|
634
|
+
height: 100%;
|
|
635
|
+
display: flex;
|
|
636
|
+
flex-direction: column;
|
|
637
|
+
row-gap: ${n.sp3};
|
|
638
|
+
`,hp=o.div`
|
|
639
|
+
display: flex;
|
|
640
|
+
flex-direction: row;
|
|
641
|
+
align-items: center;
|
|
642
|
+
justify-content: space-between;
|
|
643
|
+
padding: 12px ${n.sp3};
|
|
644
|
+
background-color: ${e=>e.theme.colors.background};
|
|
645
|
+
border-radius: ${n.sp2};
|
|
646
|
+
`,Xi=o.div`
|
|
647
|
+
display: flex;
|
|
648
|
+
flex-direction: row;
|
|
649
|
+
align-items: center;
|
|
650
|
+
column-gap: ${n.sp3};
|
|
651
|
+
`,pp=o.div`
|
|
652
|
+
width: 100%;
|
|
653
|
+
`,mp=o.div`
|
|
654
|
+
display: flex;
|
|
655
|
+
flex-direction: row;
|
|
656
|
+
align-items: center;
|
|
657
|
+
column-gap: ${n.sp3};
|
|
658
|
+
`,gp=o.div`
|
|
659
|
+
display: flex;
|
|
660
|
+
flex-direction: row;
|
|
661
|
+
align-items: center;
|
|
662
|
+
column-gap: ${n.sp6};
|
|
663
|
+
`,xp=o.div`
|
|
664
|
+
display: flex;
|
|
665
|
+
flex-direction: row;
|
|
666
|
+
align-items: center;
|
|
667
|
+
column-gap: ${n.sp1};
|
|
668
|
+
`,rn=o(_i)`
|
|
669
|
+
width: ${n.sp3};
|
|
670
|
+
height: ${n.sp3};
|
|
671
|
+
`,Vs=o(ad)`
|
|
672
|
+
width: ${n.sp3};
|
|
673
|
+
height: ${n.sp3};
|
|
674
|
+
color: ${e=>e.theme.colors.hero};
|
|
675
|
+
`,fp=o.div`
|
|
676
|
+
display: flex;
|
|
677
|
+
flex-direction: column;
|
|
678
|
+
row-gap: ${n.sp3};
|
|
679
|
+
padding: ${n.sp0} 12px;
|
|
680
|
+
`,yp=o(Re)`
|
|
681
|
+
color: ${e=>e.theme.colors.primary};
|
|
682
|
+
|
|
683
|
+
.matched-text {
|
|
684
|
+
font-weight: ${Zn.bold};
|
|
685
|
+
}
|
|
686
|
+
`,wp=o.div`
|
|
687
|
+
display: flex;
|
|
688
|
+
align-items: center;
|
|
689
|
+
column-gap: ${n.sp2};
|
|
690
|
+
`,Cp=o.div`
|
|
691
|
+
display: flex;
|
|
692
|
+
flex-direction: column;
|
|
693
|
+
row-gap: ${n.sp2};
|
|
694
|
+
`,bp=o.div`
|
|
695
|
+
display: flex;
|
|
696
|
+
flex-direction: row;
|
|
697
|
+
align-items: center;
|
|
698
|
+
justify-content: space-between;
|
|
699
|
+
padding-bottom: ${n.sp2};
|
|
700
|
+
border-bottom: 1px solid ${e=>e.theme.colors.grey3};
|
|
701
|
+
`,vp=o(Re)`
|
|
702
|
+
color: ${e=>e.theme.colors.hero};
|
|
703
|
+
`,Sp=o.div`
|
|
704
|
+
height: 100%;
|
|
705
|
+
display: flex;
|
|
706
|
+
justify-content: center;
|
|
707
|
+
align-items: center;
|
|
708
|
+
`,kp=o.div`
|
|
709
|
+
border: 1px solid ${e=>e.theme.colors.grey2};
|
|
710
|
+
padding: ${n.sp0} ${n.sp1};
|
|
711
|
+
border-radius: ${n.sp1};
|
|
712
|
+
`,jp=o(Ye)`
|
|
713
|
+
color: ${e=>e.theme.colors.hero};
|
|
714
|
+
`,$p=o.div`
|
|
715
|
+
display: flex;
|
|
716
|
+
align-items: center;
|
|
717
|
+
column-gap: 20px;
|
|
718
|
+
cursor: pointer;
|
|
719
|
+
`,Ip=o.div`
|
|
720
|
+
text-align: center;
|
|
721
|
+
padding: ${n.sp1} ${n.sp0};
|
|
722
|
+
border-top: 1px solid ${e=>e.theme.colors.grey3};
|
|
723
|
+
`,Tp=o(Ye)`
|
|
724
|
+
color: ${e=>e.theme.colors.hero};
|
|
725
|
+
`,Zr=o(Qt)`
|
|
726
|
+
width: ${n.sp3};
|
|
727
|
+
height: ${n.sp3};
|
|
728
|
+
margin-right: ${n.sp1};
|
|
729
|
+
path {
|
|
730
|
+
stroke-width: 2;
|
|
731
|
+
}
|
|
732
|
+
`,Lp=({reconciliation:e,entitySearchAutoCompleteData:i,selectedAccountId:l,currentFooterFormId:r,entitySearchAutoCompleteActions:h,onUpdateReconcileTabLocalData:d,setCurrentFooterFormId:a,onReconTabColumnSortConfigChanged:c,updateReviewTabLocalData:u,onReconReviewTabColumnSortConfigChanged:m,onSaveReconciliation:p,onSaveReconciliationReview:g,onReconMatchedTransactionClick:x})=>{const{accountReconciliationsByAccountID:y,reconciliationTabsState:{reconcile:{uiState:{sortKey:C,sortOrder:v}}},selectedReconAccount:I}=e,k=y[l],{transactionFetchState:T}=I??{};return T?.fetchState==="In-Progress"||T?.fetchState==="Not-Started"?t.jsxs(Ns,{style:{paddingLeft:f[8],paddingRight:f[8]},children:[t.jsx(Ap,{children:Ft.map($=>t.jsx(ot,{width:$.loaderWidth,height:18},$.key))}),t.jsxs(Ep,{children:[...Array(3).fill(0).map(($,w)=>t.jsx(Rp,{children:Ft.map(S=>t.jsx(ot,{width:S.loaderWidth,height:f[4]},S.key))},`${w}_${$}`))]})]}):t.jsx(Ns,{children:e.selectedTab==="reconcile"?t.jsx(Ph,{selectedAccountId:l,currentFooterFormId:r,setCurrentFooterFormId:a,onUpdateReconcileTabLocalData:d,onReconTabColumnSortConfigChanged:c,onSaveReconciliation:p,sortConfig:{sortKey:C,sortOrder:v},localData:e.reconciliationTabsState.reconcile.localData,matchedTransactions:k?.accountReconEntity.transactionsToReconcile}):t.jsx(tp,{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:i,updateLocalData:u,entitySearchAutoCompleteActions:h,onColumnSortConfigChanged:m,onSaveReconciliation:p,onSaveReconciliationReview:g,onReconMatchedTransactionClick:x,excludeFetchById:e.actionFetchStates.excludeFetchById,saveFetchById:e.actionFetchStates.saveReconciliationReviewFetch,selectedAccountId:l,sortKey:e.reconciliationTabsState.review.uiState.sortKey,sortOrder:e.reconciliationTabsState.review.uiState.sortOrder})})},Ns=o.div`
|
|
733
|
+
width: 100%;
|
|
734
|
+
height: 100%;
|
|
735
|
+
`,Ap=o.div`
|
|
736
|
+
display: flex;
|
|
737
|
+
justify-content: space-between;
|
|
738
|
+
padding: ${n.sp3} ${n.sp4};
|
|
739
|
+
column-gap: ${n.sp6};
|
|
740
|
+
`,Rp=o.div`
|
|
741
|
+
display: flex;
|
|
742
|
+
justify-content: space-between;
|
|
743
|
+
padding: ${n.sp3} ${n.sp4};
|
|
744
|
+
background-color: ${e=>e.theme.colors.grey5};
|
|
745
|
+
border-radius: ${n.sp2};
|
|
746
|
+
border: ${e=>`1px solid ${e.theme.colors.grey3}`};
|
|
747
|
+
box-shadow: ${e=>e.theme.colors.elevation1};
|
|
748
|
+
column-gap: ${n.sp6};
|
|
749
|
+
`,Ep=o.div`
|
|
750
|
+
display: flex;
|
|
751
|
+
gap: ${n.sp3};
|
|
752
|
+
flex-direction: column;
|
|
753
|
+
`;function Dp({title:e,config:i,nodeId:l}){return{children:[],id:l??Mt("loading_in_progress",[],e),isLastNode:!1,reportElementData:{element:{kind:"loading_in_progress",title:"",data:[],numOfBalances:0},config:i}}}function Mp({account:e,numOfBalances:i,title:l,isLastNode:r,config:h}){const d=Mt("ac_group_report",[],l);return{children:[],id:d,isLastNode:r,reportElementData:{element:{kind:"ac_group_report",title:l,data:e,numOfBalances:i},config:h}}}function Op({title:e,section:i,config:l,numOfBalances:r,nodeId:h}){return{children:[],id:h??Mt("total",[]),isLastNode:!1,reportElementData:{element:{kind:"total",title:e,data:i,numOfBalances:r},config:l}}}function Us({section:e,allAccountReconciliations:i,title:l,subTitle:r,isLastNode:h,isTitleRowRequired:d,config:a}){const c=Mt("section",[],l),u={children:[],id:c,isLastNode:h,reportElementData:{element:{kind:"section",title:l,data:e,numOfBalances:0},config:a}};if(d){const p=Mt("title_string_only",[],l),g={children:[],id:p,isLastNode:!0,reportElementData:{element:{kind:"title_string_only",title:l,data:e,numOfBalances:0},config:a}};u.children.push(g)}const m=Op({title:r,section:e,config:a,numOfBalances:0});return u.children.push(m),e.accountIDs.forEach((p,g)=>{const x=i[p],y=Mp({account:x,numOfBalances:0,title:x.accountReconEntity.account.accountName,isLastNode:g===e.accountIDs.length-1,config:a});u.children.push(y)}),u}function Yr({config:e,accountReconForSection:i,nodeId:l}){return{children:[],id:l??Mt("timeframe_header",[]),isLastNode:!1,reportElementData:{element:{kind:"timeframe_headers",title:"",data:i,numOfBalances:0},config:e}}}function Pp(e,i){return i?Gi("section")+Gi("total")+e*Gi("ac_group_report"):1/0}const zp=(e,i,l,r,h=!0,d="assets")=>{const a=d==="liabilities"&&e.accountReconciliationBySectionID.liabilities.accountIDs.length>0?e.accountReconciliationBySectionID.liabilities:e.accountReconciliationBySectionID.assets,c=Yr({config:i,accountReconForSection:a}),u=[];u.push(c);const m=Array.isArray(l[r])?l[r]:[],{expenseAutomation:{accountRecon:{reconciliation:p}},common:{loading:g}}=me.getLocalizedStrings(),x=e.fetchStatus.fetchState==="Not-Started"||e.fetchStatus.fetchState==="In-Progress",y=C=>C.filter(v=>!m.includes(v));if(x)[...Array(3)].forEach((C,v)=>{u.push(Dp({title:`${v}+${g}`,config:i}))});else{const C=y(e.accountReconciliationBySectionID.assets.accountIDs),v=Us({section:{...e.accountReconciliationBySectionID.assets,accountIDs:C},allAccountReconciliations:e.accountReconciliationsByAccountID,title:p.headers.section.assets.title,subTitle:p.headers.section.assets.subTitle,isLastNode:!1,isTitleRowRequired:!1,config:i});if(u.push(v),e.accountReconciliationBySectionID.liabilities.accountIDs.length>0){const I=y(e.accountReconciliationBySectionID.liabilities.accountIDs),k=Us({section:{...e.accountReconciliationBySectionID.liabilities,accountIDs:I},allAccountReconciliations:e.accountReconciliationsByAccountID,title:p.headers.section.liabilities.title,subTitle:p.headers.section.liabilities.subTitle,isLastNode:!1,isTitleRowRequired:!0,config:i});u.push(k)}}return{config:i,headerNodes:h?[c]:[],contentNodes:u}};function Fp(e,i,l,r=!1,h="assets"){Object.assign(e.config,l);const d=h==="liabilities"&&i.accountReconciliationBySectionID.liabilities.accountIDs.length>0?i.accountReconciliationBySectionID.liabilities:i.accountReconciliationBySectionID.assets,a=Yr({config:l,accountReconForSection:d});return{config:l,headerNodes:r?[a]:[],contentNodes:[a,...e.contentNodes.slice(1)]}}const zo={wrapperPadding:new G(f[2],f[2],f[2],f[8]),contentPaddingLeft:new G(f[2],f[2],f[2],f[2]),contentPaddingRight:new G(f[2],f[2],f[2],f[2])},Bp=o.div`
|
|
754
|
+
display: flex;
|
|
755
|
+
height: 100%;
|
|
756
|
+
width: 100%;
|
|
757
|
+
justify-content: center;
|
|
758
|
+
align-items: center;
|
|
759
|
+
`,_p=o.div`
|
|
760
|
+
display: flex;
|
|
761
|
+
height: 100%;
|
|
762
|
+
min-height: 100%;
|
|
763
|
+
flex: 1 1 auto;
|
|
764
|
+
width: 100%;
|
|
765
|
+
justify-content: center;
|
|
766
|
+
padding-left: ${e=>zo.wrapperPadding.valuePx(e.windowSize)};
|
|
767
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
768
|
+
`,Vp=o.div`
|
|
769
|
+
width: 100%;
|
|
770
|
+
height: 100%;
|
|
771
|
+
`,{common:Np}=me.getLocalizedStrings();function Up({reconciliation:e,companyId:i,onReload:l,onReviewClicked:r,setOpenDrawerClicked:h,onFetchLinkTokenClick:d,onEstablishConnectionClick:a,onAddStatementClick:c}){const[u,m]=s.useState(void 0),[p,g]=s.useState(void 0),x=e.plaidConnectionDetails.link_account_no_microdeposit,y=e.plaidConnectionDetails.update_account,C=p==="update_account"?y:x,[v,I]=s.useState(C.linkToken??null),[k,T]=s.useState(!1),{useDynamicConfig:$}=mr(),{configValue:w}=$(gr.accountReconGLAccountsConfig),S=s.useCallback(q=>{m(q),g("link_account_no_microdeposit")},[]),j=s.useCallback(q=>{const U=M.current.accountReconciliationsByAccountID[q]?.paymentAccountId;m(q),g("update_account"),d("update_account",U)},[]),b=s.useCallback(q=>{h(q)},[]),z=s.useRef(u),A=s.useRef(p),M=s.useRef(e);s.useEffect(()=>{z.current=u},[u]),s.useEffect(()=>{A.current=p},[p]),s.useEffect(()=>{M.current=e},[e]);const _=s.useCallback(q=>{a(q,z.current??"",A.current),m(void 0),g(void 0),T(!1)},[a]),W=s.useCallback((q,U)=>{q!=null&&console.log("Plaid Connection Error",q,U),m(void 0),g(void 0),T(!1)},[]),{open:H,ready:L}=kc({token:v,onSuccess:_,onExit:W});s.useEffect(()=>{(Oi(new Date().toISOString()).isAfter(C.expiration)||C.linkToken==null)&&C.fetchStatus.fetchState==="Not-Started"&&d("link_account_no_microdeposit")},[C.fetchStatus.fetchState]),s.useEffect(()=>{!k&&p!=null&&C.linkToken===v&&C.fetchStatus.fetchState==="Completed"&&L&&T(!0)},[L,v,C.fetchStatus.fetchState,C.linkToken,p,k]),s.useEffect(()=>{C.fetchStatus.fetchState==="Completed"&&C.linkToken!=null&&C.linkToken!==v&&I(C.linkToken)},[C.fetchStatus.fetchState,C.linkToken,v]),s.useEffect(()=>{k&&H()},[k,H]);const[P,ae]=s.useState(void 0),[V,B]=s.useState(void 0),[Q,de]=s.useState("assets"),le=Oi("2025-03-31"),ge=1,te="account_reconciliation",K=be(),Z=Tt();Qn({componentName:"expense_automation.account_reconciliation_list",enabled:e.fetchStatus.fetchState==="Completed"});const D=!0,R=Array.isArray(w?.[i])?w[i]:[],J=e.accountReconciliationBySectionID.assets.accountIDs.filter(q=>!R.includes(q)).length,N=e.accountReconciliationBySectionID.liabilities.accountIDs.length>0,Y=Pp(J,N),ne=s.useCallback(q=>{const U=q.scrollTop>=Y?"liabilities":"assets";U!==Q&&de(U)},[Y,Q]);return s.useEffect(()=>{const q={reportId:te,mode:"none",displayOrder:"ascending_date",reportFormat:"more_detailed",bookCloseDate:le,firstMonthOfFY:ge,filterAccountsWithNilBalances:"off",filterAccountGroupsWithNilBalances:"off",showNegativeAmountInParenthesis:!1,dataAvailable:void 0,accountReconciliationConfig:{selectedDrawerAccountId:e.selectedDrawerAccountId,onReviewClicked:r,onConnectClicked:S,onReconnectClicked:j,onOpenDrawerClicked:b,onStatementAddClicked:c}};if(P==null||!fr(V,e)){const U=zp(e,q,w,i,D,Q);B(e),ae(U)}else{const U=Fp(P,e,q,D,Q);ae(U)}},[e,Q]),e.fetchStatus.fetchState==="Error"?t.jsx(Bp,{children:t.jsx(jc,{onReload:l,message:Np.errorMessage.somethingWentWrong})}):t.jsx(_p,{windowSize:K,children:P!=null?t.jsx(Vp,{windowSize:K,children:t.jsx(Br,{backgroundColor:new Ko(Z.colors.grey4),rootNodes:P,type:"name+balances_actual",compareMode:"compare_mode_percent",isSticky:{isStickyHeader:D,isStickyName:D},treeNodePadding:{left:zo.contentPaddingLeft.value(K),right:zo.contentPaddingRight.value(K)},nodeOpenStatus:{},scrollPosition:e.reconListUIState.scrollPosition,onCompareModeChanged:()=>{},onScroll:ne})}):null})}function Wp({currentFooterFormId:e,vendorSearchAutoCompleteData:i,vendorSearchAutoCompleteActions:l,reconciliation:r,companyId:h,onReconTabColumnSortConfigChanged:d,updateReconReviewTabLocalData:a,onUpdateReconcileTabLocalData:c,setCurrentFooterFormId:u,onReloadReconciliationListPage:m,onReviewClicked:p,onFetchLinkTokenClick:g,onEstablishConnectionClick:x,onAddStatementClick:y,onReconReviewTabColumnSortConfigChanged:C,onSaveReconciliation:v,onSaveReconciliationReview:I,setOpenDrawerClicked:k,onReconMatchedTransactionClick:T}){return r.selectedAccountId==null?t.jsx(Up,{companyId:h,reconciliation:r,onReload:m,onReviewClicked:p,onFetchLinkTokenClick:g,onEstablishConnectionClick:x,setOpenDrawerClicked:k,onAddStatementClick:y}):t.jsx(Lp,{currentFooterFormId:e,setCurrentFooterFormId:u,onUpdateReconcileTabLocalData:c,onReconTabColumnSortConfigChanged:d,reconciliation:r,updateReviewTabLocalData:a,entitySearchAutoCompleteActions:l,onReconReviewTabColumnSortConfigChanged:C,entitySearchAutoCompleteData:i,selectedAccountId:r.selectedAccountId,onSaveReconciliation:v,onSaveReconciliationReview:I,onReconMatchedTransactionClick:T})}function Hp({accountAndClassReport:e,numOfBalances:i,title:l,isLastNode:r,isFirstNode:h,config:d,parentNodeIDs:a,ancestorMetadata:c}){let u="";return e.accountBase&&e.classBase?u=`${e.accountBase.accountId}_${e.classBase.classId}`:e.accountBase?u=e.accountBase.accountId:e.classBase&&(u=e.classBase.classId),{children:[],id:Mt("flux_vendor_account_class_row",a,u),isLastNode:r,isFirstNode:h,reportElementData:{element:{kind:"flux_vendor_account_class_row",title:l,data:e,metadata:c,numOfBalances:i},config:d}}}function qp({config:e,isLastNode:i,numOfBalances:l,parentNodeIDs:r,title:h,vendorRowIndex:d,vendorView:a}){const c=Mt("flux_vendor_row",r,a.vendor.id),u={children:[],id:c,isLastNode:i,reportElementData:{element:{kind:"flux_vendor_row",title:h,data:a,numOfBalances:l,index:d},config:e}},m=a.vendorAccountsAndClasses;return u.children=m.map((p,g)=>Hp({accountAndClassReport:p,numOfBalances:l,title:p.accountBase?.accountName??"",config:e,isLastNode:g===m.length-1,isFirstNode:g===0,parentNodeIDs:[...r,c],ancestorMetadata:{accountAndClassRowMetadata:{depth:0,hasSibling:m.length>1,hasChildren:!1,isLastNode:g===m.length-1,isFirstNode:g===0,name:p.accountBase?.accountName},isVendorLastChild:i,vendorId:a.vendor.id}})),u}function Kp({section:e,numOfBalances:i,title:l,isLastNode:r,config:h,vendorIndexOffset:d}){const a=e.sectionId,c={children:[],id:a,isLastNode:r,reportElementData:{element:{kind:"section",title:l,data:e,numOfBalances:i,sectionType:e.sectionId},config:h}},u=(e.vendors??[]).map((m,p)=>qp({config:h,isLastNode:p===e.vendors.length-1,numOfBalances:i,parentNodeIDs:[a],title:m.vendor.name,vendorRowIndex:d+p,vendorView:m}));return c.children.push(...u),c}function Jp({title:e,balances:i,config:l,nodeId:r}){return{children:[],id:r??Mt("headers_loading_in_progress",[],e),isLastNode:!1,reportElementData:{element:{kind:"headers_loading_in_progress",title:"",data:i,numOfBalances:i.length},config:l}}}function Qp({title:e,data:i,isLastNode:l,config:r,numOfBalances:h}){const d=Mt("total",[],e);return{children:[],id:d,isLastNode:l,reportElementData:{element:{kind:"total",title:e,data:i,numOfBalances:h},config:r}}}const{common:yi,expenseAutomation:{fluxAnalysis:Gp}}=me.getLocalizedStrings(),Zp=(e,i,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?Tn(e.sections.generalExpense.balancesByMonth):e.sections.reimbursement.balancesByMonth?Tn(e.sections.reimbursement.balancesByMonth):[],d=_r({balances:h,config:i}),a=[],c=e.sections.generalExpense.fetchStatus.fetchState==="In-Progress"&&e.uiState.paginationInfoByGroup.generalExpense.pageToken==null,u=e.sections.generalExpense.fetchStatus.fetchState==="In-Progress"&&e.uiState.paginationInfoByGroup.generalExpense.pageToken!=null||e.sections.reimbursement.fetchStatus.fetchState==="In-Progress";if(c===!0)a.push(Jp({title:`${yi.loading}`,balances:h,config:i})),[...Array(10)].forEach((m,p)=>{a.push(Ss({title:`${p}+${yi.loading}`,balances:h,config:i}))});else{a.push(d);const m=["generalExpense","reimbursement"];let p=0;if(m.forEach(g=>{const x=e.sections[g];if(x.vendors.length>0||x.fetchStatus.fetchState==="Completed"){const y=Tn(x.balancesByMonth);a.push(Kp({section:{sectionId:g,reportId:"flux_analysis_operating_expense",balances:y,vendors:x.vendors,varianceAmount:x.varianceAmount,variancePercentage:x.variancePercentage,currency:e.currency},numOfBalances:r,title:Yp(g),isLastNode:!1,config:i,vendorIndexOffset:p})),p+=x.vendors.length}}),e.totalBalancesAndVariance){const g=e.totalBalancesAndVariance.balancesByMonth?Tn(e.totalBalancesAndVariance.balancesByMonth):[],x=Qp({title:yi.texts.total,data:{balances:g,varianceAmount:e.totalBalancesAndVariance.varianceAmount,variancePercentage:e.totalBalancesAndVariance.variancePercentage,currency:e.currency},config:i,isLastNode:!0,numOfBalances:r});a.push(x)}u===!0&&[...Array(1)].forEach((g,x)=>{a.push(Ss({title:`${x}+${yi.loading}`,balances:h,config:i}))})}return{config:i,headerNodes:l&&!c?[d]:[],contentNodes:a}},Yp=e=>Gp.sectionTitle[e];function Xp(e,i,l,r=!0){Object.assign(e.config,i);const h=em(l),d=_r({balances:h,config:i});return{config:i,headerNodes:r?[d]:[],contentNodes:[d,...e.contentNodes.slice(1)]}}const em=e=>e.sections.generalExpense.balancesByMonth?Tn(e.sections.generalExpense.balancesByMonth):e.sections.reimbursement.balancesByMonth?Tn(e.sections.reimbursement.balancesByMonth):[],Fo={contentPaddingLeft:new G(f[0],f[0],f[0]),contentPaddingRight:new G(f[3],f[3],f[8]),wrapperPadding:new G(f[3],f[3],f[8])},tm=o.div`
|
|
772
|
+
display: flex;
|
|
773
|
+
position: sticky;
|
|
774
|
+
width: 100%;
|
|
775
|
+
justify-content: center;
|
|
776
|
+
padding-top: ${e=>Fo.wrapperPadding.valuePx(e.windowSize)};
|
|
777
|
+
padding-left: 20px;
|
|
778
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
779
|
+
`,nm=o.div`
|
|
780
|
+
width: 100%;
|
|
781
|
+
height: calc(100vh - ${n.sp11});
|
|
782
|
+
`,im=e=>{const{fluxView:i,handleRedirectToVendorDetailPage:l,updateOperatingExpensesIdsForReview:r,updateSectionIdsForReview:h,onSortOrderChanged:d,updateNodeCollapsableStatus:a,fetchReimbursementView:c,fetchGeneralExpenseView:u}=e,m=be(),p=Tt(),[g,x]=s.useState(null),[y,C]=s.useState(null),[v,I]=s.useState(null),k=bs([i.sections.generalExpense.fetchStatus,i.sections.reimbursement.fetchStatus]).fetchState,[T,$]=s.useState(!1),w=ms(k),S=ms(i.refreshStatus.fetchState),j=s.useRef(!1),[b,z]=s.useState(!1),A=s.useRef(V=>{V&&!j.current&&(j.current=!0,z(!0))});Qn({componentName:"expense_automation.flux_analysis",enabled:b});const M=()=>{i.uiState.collapsableStatus.generalExpense?i.uiState.paginationInfoByGroup.generalExpense.hasMore===!0&&i.sections.generalExpense.fetchStatus.fetchState==="Completed"?u(i.uiState.paginationInfoByGroup.generalExpense.pageToken):i.sections.reimbursement.fetchStatus.fetchState==="Not-Started"&&c(i.uiState.paginationInfoByGroup.reimbursement.pageToken):i.uiState.collapsableStatus.reimbursement&&i.uiState.paginationInfoByGroup.reimbursement.hasMore===!0&&i.sections.reimbursement.fetchStatus.fetchState==="Completed"&&c(i.uiState.paginationInfoByGroup.reimbursement.pageToken)},_=()=>Object.keys(i.uiState.collapsableStatus).reduce((V,B)=>(V[B]=i.uiState.collapsableStatus[B],V),{}),W=s.useCallback(V=>{const B=!(i.uiState.collapsableStatus[V]??!0);a({...i.uiState.collapsableStatus,[V]:B})},[i.uiState.collapsableStatus,a]),H=s.useCallback((V,B)=>{let Q=i.reviewOperatingExpensesIds;const de=[];let le=i.selectedSectionIds;const ge=i.sections[V].vendors;de.push(...ge.map(K=>K.fluxAnalysisEntityId));let te=Fr-Q.length;B?(de.forEach(K=>{!Q.includes(K)&&te>0&&(Q=[...Q,K],te--)}),le=[...le,V]):(Q=Q.filter(K=>!de.includes(K)),le=le.filter(K=>K!==V)),r(Q),h(le)},[i.reviewOperatingExpensesIds,i.selectedSectionIds,i.sections,r,h]),L=s.useCallback(V=>{const B=i.uiState.collapsableStatus[V]===!1;V==="generalExpense"&&!B&&i.sections.reimbursement.fetchStatus.fetchState==="Not-Started"&&c(i.uiState.paginationInfoByGroup.reimbursement.pageToken),W(V)},[i.uiState.collapsableStatus,i.sections.reimbursement.fetchStatus.fetchState,i.uiState.paginationInfoByGroup.reimbursement.pageToken,c,W]),P=i.sections.generalExpense.vendors.length+i.sections.reimbursement.vendors.length,ae=V=>V<P;return s.useEffect(()=>{const V={reportId:"flux_analysis_operating_expense",mode:"none",displayOrder:"ascending_date",reportFormat:"summary",firstMonthOfFY:1,filterAccountsWithNilBalances:"off",filterAccountGroupsWithNilBalances:"off",showNegativeAmountInParenthesis:!1,fluxAnalysisConfig:{sortOrder:i.uiState.sortOrder,sortKey:i.uiState.sortKey,sortOrSearchInProgress:!1,reviewOpExIds:i.reviewOperatingExpensesIds,reviewSectionIds:i.selectedSectionIds,fetchStatus:i.fetchStatus.fetchState,setIsSortApplied:$,onSectionRowClick:L,updateNodeCollapsableStatus:W,updateOperatingExpensesIdsForReview:r,handleRedirectToVendorDetailPage:l,onSectionCheckboxClick:H,onSortOrderChanged:d}};if(g==null||!fr(y,i)){const B=Zp(i,V,!0);C(i),x(B)}else{const B=Xp(g,V,i,!0);x(B)}},[i,y,l,H,L,d,W,r]),t.jsx(tm,{windowSize:m,children:t.jsx(nm,{children:g?t.jsx(om,{ref:A.current,children:t.jsx(Br,{backgroundColor:new Ko(p.colors.grey4),rootNodes:g,type:"name+balances_actual",isSticky:{isStickyHeader:!0,isStickyName:!0},treeNodePadding:{left:Fo.contentPaddingLeft.value(m),right:Fo.contentPaddingRight.value(m)},nodeOpenStatus:_(),compareMode:"compare_mode_amount",infiniteLoadingProps:{isItemLoaded:ae,itemCount:P,loadMoreItems:M},variableNodeHeightTree:{prevFetchState:w??"Not-Started",fetchState:i.fetchStatus.fetchState,isSortApplied:T,setIsSortApplied:$,reducedFetchState:bs([i.sections.generalExpense.fetchStatus,i.sections.reimbursement.fetchStatus]).fetchState,prevRefreshFetchState:S??"Not-Started",refreshFetchState:i.refreshStatus.fetchState},hoveredParentIdProps:{hoveredParentId:v,setHoveredParentId:I}})}):null})})},om=o.div`
|
|
783
|
+
height: 100%;
|
|
784
|
+
width: 100%;
|
|
785
|
+
`,sm="expenseAutomationFluxPage",{reports:{common:am}}=me.getLocalizedStrings(),rm=({selectedPeriod:e,fluxAnalysis:i,onFetchFluxViewList:l,markAsReview:r,onReloadPage:h,setCurrentFooterFormId:d,updateOperatingExpensesIdsForReview:a,updateSectionIdsForReview:c,onUpdateFluxAnalysisUIState:u,redirectToVendorDetailPage:m,fetchFluxViewOnScroll:p,onFetchReimbursementView:g})=>{const{fetchStatus:x,reviewOperatingExpensesIds:y,uiState:C}=i,v=s.useRef(null),I=s.useRef(!1),k=xn({mode:"all",reValidateMode:"onChange",resetOptions:{keepDefaultValues:!0},defaultValues:lm(y)}),T=be();s.useEffect(()=>()=>{d("expenseAutomationPage")},[d]),s.useEffect(()=>{I.current&&v?.current?.scrollLeft!=null&&C.scrollPosition?.scrollLeft!==v.current.scrollLeft&&C.scrollPosition!=null&&u({scrollPosition:{scrollTop:C.scrollPosition?.scrollTop,scrollLeft:v.current.scrollLeft}})},[C.scrollPosition?.scrollLeft,v.current?.scrollLeft,C.scrollPosition,u]),s.useEffect(()=>{d(y.length>0?"expenseAutomationFluxPage":"expenseAutomationPage")},[y,d]);const $=b=>{m(b)},w=b=>{p(e,b)},S=(b,z)=>{u({sortOrder:b,sortKey:z}),l(),g(e,null,!1)},j=()=>{const b=Xr(i.sections,y);r(y,b===!0?"review":"unreview",e,!0)};if(x.fetchState==="Error")return t.jsxs(dm,{children:[t.jsx(um,{onClick:h,children:t.jsx(Uo,{})}),t.jsx(hm,{children:am.failed})]});{const b=A=>{u({collapsableStatus:A})},z=A=>{g(e,A,!0)};return t.jsx(fn,{...k,children:t.jsx("form",{id:ec(sm),onSubmit:k.handleSubmit(j),style:{height:"100%",width:"100%"},children:t.jsx(cm,{windowSize:T,children:t.jsx(im,{fluxView:i,handleRedirectToVendorDetailPage:$,onSortOrderChanged:S,updateOperatingExpensesIdsForReview:a,updateNodeCollapsableStatus:b,fetchReimbursementView:z,updateSectionIdsForReview:c,fetchGeneralExpenseView:w,reportId:"flux_analysis_operating_expense"})})})})}},Xr=(e,i)=>{const l=[...e.generalExpense.vendors,...e.reimbursement.vendors].filter(h=>h.status==="Pending Review");let r;return l.forEach(h=>{i.includes(h.fluxAnalysisEntityId)&&(r=!0)}),r},lm=e=>({fluxAnalysisRowIds:e}),cm=o.div`
|
|
786
|
+
display: flex;
|
|
787
|
+
flex: 1 1 auto;
|
|
788
|
+
min-height: 100%;
|
|
789
|
+
flex-direction: column;
|
|
790
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
791
|
+
padding: ${n.sp0};
|
|
792
|
+
gap: 2px;
|
|
793
|
+
height: 100%;
|
|
794
|
+
.flux-vendor-name-sticky,
|
|
795
|
+
.flux-vendor-header-sticky,
|
|
796
|
+
.flux-section-name-container,
|
|
797
|
+
.flux-class-and-account-value-container,
|
|
798
|
+
.flux-vendor-name-container,
|
|
799
|
+
.flux-total-row {
|
|
800
|
+
border-right: 1px solid transparent;
|
|
801
|
+
}
|
|
802
|
+
&:hover {
|
|
803
|
+
.flux-vendor-name-sticky,
|
|
804
|
+
.flux-vendor-header-sticky,
|
|
805
|
+
.flux-section-name-container,
|
|
806
|
+
.flux-class-and-account-value-container,
|
|
807
|
+
.flux-vendor-name-container,
|
|
808
|
+
.flux-total-row {
|
|
809
|
+
border-right: ${e=>` 1px solid ${e.theme.colors.grey3}`};
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
`,dm=o.div`
|
|
813
|
+
display: flex;
|
|
814
|
+
width: 100%;
|
|
815
|
+
height: 100vh;
|
|
816
|
+
flex-direction: column;
|
|
817
|
+
justify-content: center;
|
|
818
|
+
align-items: center;
|
|
819
|
+
`,um=o.div`
|
|
820
|
+
height: 96px;
|
|
821
|
+
width: 96px;
|
|
822
|
+
background: ${e=>e.theme.colors.background};
|
|
823
|
+
border-radius: 50%;
|
|
824
|
+
cursor: pointer;
|
|
825
|
+
& svg {
|
|
826
|
+
margin: ${n.sp5};
|
|
827
|
+
color: ${e=>e.theme.colors.grey1};
|
|
828
|
+
}
|
|
829
|
+
&:hover {
|
|
830
|
+
& svg {
|
|
831
|
+
color: ${e=>e.theme.colors.primary};
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
`,hm=o(st)`
|
|
835
|
+
margin-top: ${n.sp3};
|
|
836
|
+
color: ${e=>e.theme.colors.hero};
|
|
837
|
+
`,pm="expenseAutomationJEAccountSettingsPage",el="vendorsAccountSection",mm=e=>`${e}_form`;function gm({accountSettings:e,currentFooterFormId:i,onSaveJeAccountSettingsClick:l,setIsJeAccountSettingsOpened:r,onJeAccountSettingsChange:h,setResetJeAccountSettingsForm:d,setCurrentFooterFormId:a}){const c=e.prepaidExpensesRecommendations,u=e.fixedAssetsRecommendations,m=e.accruedExpensesRecommendations,p=s.useMemo(()=>Kt(e.prepaidExpensesAccountHierarchy,c,"Accounts"),[e.prepaidExpensesAccountHierarchy,c]),g=s.useMemo(()=>Kt(e.fixedAssetsAccountHierarchy,u,"Accounts"),[e.fixedAssetsAccountHierarchy,u]),x=s.useMemo(()=>Kt(e.accruedExpensesAccountHierarchy,m,"Accounts"),[e.accruedExpensesAccountHierarchy,m]),y=s.useMemo(()=>fm(e,p,g,x),[e,p,g,x]),C=xn({mode:"all",reValidateMode:"onBlur",defaultValues:y,values:y,resetOptions:{keepDefaultValues:!0}}),v=C.handleSubmit(k=>{l(k)}),I=async k=>{h(k)};return s.useEffect(()=>{const k=C.watch(T=>{T!=null&&Gn(()=>I(T))});return()=>{k.unsubscribe()}}),s.useEffect(()=>(d(()=>C.reset),r(!0),()=>{a("expenseAutomationPage"),r(!1)}),[]),s.useEffect(()=>{const{selectedPrepaidExpensesAccountIds:k,previousPrepaidExpensesAccount:T,selectedFixedAssetsAccountIds:$,previousFixedAssetsAccount:w,selectedAccruedExpensesAccountIds:S,previousAccruedExpensesAccount:j}=e.accountSettingsLocalData,b=Ki(k,T)||Ki($,w)||Ki(S,j);b===!0&&i!="expenseAutomationJEAccountSettingsPage"?a("expenseAutomationJEAccountSettingsPage"):b===!1&&i!=="expenseAutomationPage"&&a("expenseAutomationPage")},[e,i,a]),t.jsx(xm,{children:t.jsx(fn,{...C,children:t.jsx("form",{id:mm(pm),onSubmit:v,children:t.jsx(Sd,{showTitle:!1,sectionId:el,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 xm=o.div`
|
|
838
|
+
padding-top: ${n.sp3};
|
|
839
|
+
display: flex;
|
|
840
|
+
align-items: center;
|
|
841
|
+
min-height: 100%;
|
|
842
|
+
flex-direction: column;
|
|
843
|
+
width: 100%;
|
|
844
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
845
|
+
`,fm=(e,i,l,r)=>{const h=e.prepaidExpensesAccountList.filter(p=>e.accountSettingsLocalData.selectedPrepaidExpensesAccountIds.includes(p.accountId)),d=e.fixedAssetsAccountList.filter(p=>e.accountSettingsLocalData.selectedFixedAssetsAccountIds.includes(p.accountId)),a=e.accruedExpensesAccountList.filter(p=>e.accountSettingsLocalData.selectedAccruedExpensesAccountIds.includes(p.accountId)),c=h.map(p=>p.qboId).filter(p=>p!=null),u=d.map(p=>p.qboId).filter(p=>p!=null),m=a.map(p=>p.qboId).filter(p=>p!=null);return{[el]:{prepaidExpensesAccount:{selectedOptions:c,allOptions:i},fixedAssetsAccount:{selectedOptions:u,allOptions:l},accruedExpensesAccount:{selectedOptions:m,allOptions:r}}}},{expenseAutomation:{jeSchedules:Nt},common:{currency:wi,review:ym,ignore:wm,strings:{hyphen:zt},texts:Ci},dateFormat:Cm,timeframe:{month:Ws}}=me.getLocalizedStrings(),bm=({draft:e,ignoreStatus:i,ignoreRecommendedJeSchedule:l,jeScheduleClickHandler:r,onReviewClickHandler:h})=>t.jsxs(is,{onClick:d=>{e.jeScheduleType!=null&&e.jeScheduleId!=null&&r(d,e.jeScheduleId,e.jeScheduleTransactionKey,e.jeScheduleType)},"data-testid":O("je-schedule-draft-component",e.jeScheduleId),children:[t.jsxs(ns,{children:[t.jsxs(ss,{children:[t.jsxs(es,{children:[t.jsxs(se,{style:{width:Ce.COLUMN_ONE,padding:`${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{children:Ci.vendor}),t.jsxs(pe,{style:{gap:f[2]},children:[e.vendor.logo!=null?t.jsx(kr,{photoUrl:e.vendor.logo.href,styles:{width:f[4],height:f[4]}}):t.jsx(Jt,{name:e.vendor.name}),t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:e.vendor.name!=null?t.jsx(rt,{children:e.vendor.name}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:e.vendor.name??zt})})]})]}),t.jsxs(se,{children:[t.jsx(ue,{children:Nt.scheduleHeaders.scheduleCategory}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:e.baseTransaction.account.accountName!=null?t.jsx(rt,{children:e.baseTransaction.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:e.baseTransaction.account.accountName??zt})})})]}),t.jsxs(se,{style:{width:Ce.COLUMN_THREE},children:[t.jsx(ue,{children:Nt.scheduleHeaders.startMonth}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",children:e.startDate?.format(Cm.visual.MMMCommaYYYYFormat)??zt})})]}),t.jsxs(se,{style:{width:Ce.COLUMN_FOUR,paddingLeft:f[3]},children:[t.jsx(ue,{children:Nt.scheduleHeaders.period}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",children:e.period!=null?`${e.period} ${e.period===1?Ws.slice(0,-1):Ws}`:zt})})]}),t.jsxs(se,{style:{alignItems:"flex-end",width:Ce.COLUMN_FIVE},children:[t.jsx(ue,{children:Ci.totalAmount}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:t.jsx(rt,{children:it("0,0.[00]",cn(e.baseTransaction.amount.amount,wi.currencyCode,wi.currencySymbol))??zt}),children:t.jsx(we,{className:"highlight",children:it("0,0.[00]",cn(e.baseTransaction.amount.amount,wi.currencyCode,wi.currencySymbol))??zt})})})]})]}),t.jsxs(ts,{children:[t.jsxs(se,{style:{width:Ce.COLUMN_ONE,padding:`${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{children:Ci.category}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:e.jeDebit.account?.accountName!=null?t.jsx(rt,{children:e.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:e.jeDebit.account?.accountName??zt})})})]}),t.jsxs(se,{children:[t.jsx(ue,{children:Ci.classText}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:e.jeDebit.accountingClass?.className!=null?t.jsx(rt,{children:e.jeDebit.accountingClass.className}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:e.jeDebit.accountingClass?.className??zt})})})]}),t.jsxs(se,{style:{width:Ce.COLUMN_THREE},children:[t.jsx(ue,{children:Nt.scheduleHeaders.type}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",style:{width:"unset"},children:t.jsx(Hr,{children:Nt.scheduleTypes[e.jeScheduleType??"prepaid_expenses"]})})})]}),e.jeScheduleType==="fixed_assets"?t.jsxs(se,{style:{width:Ce.COLUMN_FOUR,paddingLeft:f[3]},children:[t.jsx(ue,{children:Nt.scheduleHeaders.accumulatedCategory}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",title:e.jeCredit.account?.accountName!=null?t.jsx(rt,{children:e.jeCredit.account?.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:e.jeCredit.account?.accountName??zt})})})]}):null,e.jeScheduleType!=="fixed_assets"?t.jsx(se,{style:{width:Ce.COLUMN_FOUR}}):null,t.jsx(se,{style:{width:Ce.COLUMN_FIVE}})]})]}),t.jsxs(os,{children:[t.jsx(Wn,{onClick:()=>{e.jeScheduleId!=null&&e.jeScheduleType!=null&&h(e.jeScheduleId,e.jeScheduleTransactionKey,e.jeScheduleType)},"data-testid":O("je-schedule-draft-component-review-button",e.jeScheduleId),label:ym,variant:"primary",size:"small",className:"item-value-container",style:{minWidth:Oo}}),t.jsx(Wn,{"data-testid":O("je-schedule-draft-component-ignore-button",e.jeScheduleId),className:"item-value-container",label:wm,size:"small",reverseSpinnerColor:!1,loading:i?.fetchState==="In-Progress",onClick:()=>{e.jeScheduleType!=null&&l(e.jeScheduleTransactionKey,e.jeScheduleType)},style:{minWidth:Oo}})]})]}),t.jsxs(Uh,{children:[t.jsx(vm,{}),t.jsx(Sm,{children:Nt.aiAccountant}),t.jsx(km,{children:Nt.zeniGPTText})]})]}),vm=o(Qt)`
|
|
846
|
+
height: ${n.sp3};
|
|
847
|
+
width: ${n.sp3};
|
|
848
|
+
margin-right: ${n.sp1};
|
|
849
|
+
path {
|
|
850
|
+
stroke-width: 2;
|
|
851
|
+
}
|
|
852
|
+
`,Sm=o(yr)`
|
|
853
|
+
color: ${e=>e.theme.colors.brandColorSapphire};
|
|
854
|
+
`,km=o(Re)`
|
|
855
|
+
color: ${e=>e.theme.colors.primary};
|
|
856
|
+
`,{jeSchedules:{scheduleDetails:{scheduleTransactionsHeader:{addVendor:Hs}}},expenseAutomation:{jeSchedules:Je},common:{currency:At,retry:jm,strings:{hyphen:at,empty:qs},texts:Sn},dateFormat:Ks}=me.getLocalizedStrings(),{common:$m,timeframe:{month:Js}}=me.getLocalizedStrings(),gt="jeSchedulePage",Qs=e=>`${e}_form`,as=(e,i)=>`${e}.${i}`,Gs=as(gt,"vendor"),Zs=as(gt,"scheduleExpenseCategory"),Ys=as(gt,"accumulatedDepreciationCategory"),Im=({allAccountGroupedOptions:e,allAccountList:i,allClassGroupedOptions:l,allClassList:r,allDepAccountGroupedOptions:h,allDepAccountList:d,draft:a,localData:c,postStatus:u,uncategorizedAccounts:m,vendorSearchAutoCompleteActions:p,vendorSearchAutoCompleteData:g,jeScheduleClickHandler:x,onFormDataChange:y,onPostJESchedule:C})=>{const{updatedAccumulatedDepreciationCategoryID:v,updatedCategoryId:I,updatedVendor:k}=c,T={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"},$=s.useRef(),w=xn({mode:"all",reValidateMode:"onChange",defaultValues:Xs(c,e,l,h,i,r,d,g.entityAutoCompleteView),values:Xs(c,e,l,h,i,r,d,g.entityAutoCompleteView)}),S={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:n.sp4}),menu:()=>({width:300})},j={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:n.sp4}),menu:()=>({width:350})},b=(a?.scheduledJournalEntry.error??[]).every(R=>{const J=T[R];return!(c!=null&&J&&(J==="updatedAccumulatedDepreciationCategoryID"&&c.updatedAccumulatedDepreciationCategoryID==null||J==="updatedCategoryId"&&c.updatedCategoryId==null||J==="updatedVendor"&&(c.updatedVendor?.id==null||c.updatedVendor?.id===""||c.updatedVendor?.name==null||c.updatedVendor?.name==="")))}),z=async(R,J)=>{if(R!=null){const N=J[gt],{scheduledJournalEntryID:Y,vendor:ne}=N;if(R.includes("vendor")){const q=ne?.defaultOptions.map(U=>U.value);if(ne?.selectedOption!=null&&q?.includes(ne.selectedOption)!==!0){const U=g.entityAutoCompleteView.vendor.find(F=>F.id===ne.selectedOption);U!=null&&w.setValue(`${gt}.vendor.defaultOptions`,[{label:U.name??$m.strings.empty,value:U.id}])}else ne?.selectedOption==null&&ne?.defaultOptions.length!==0&&w.setValue(`${gt}.vendor`,{selectedOption:void 0,defaultOptions:[]})}y(Y,{...N,vendor:ne})}};s.useEffect(()=>{const R=w.watch((J,{name:N})=>{N!=null&&J!=null&&Gn(()=>z(N,J))});return()=>{R.unsubscribe()}}),s.useEffect(()=>{g.entityAutoCompleteView.fetchState==="Completed"&&$.current?.(jr(g.entityAutoCompleteView))},[g.entityAutoCompleteView.fetchState]);const A=w.handleSubmit(()=>{C(a.scheduledJournalEntry.scheduledJournalEntryID,a.jeScheduleTransactionKey)}),M=R=>i.filter(J=>J.qboId===R)[0]?.qboId,_=R=>d.filter(J=>J.qboId===R)[0]?.qboId,W=R=>[m.expense?.qboId,m.income?.qboId].includes(R),H=w.watch("jeSchedulePage.vendor"),L=(R,J)=>{p.onAutoCompleteInputChange?.(R,"vendor"),$.current=J},P=a.scheduledJournalEntry.error?.includes("vendor_deleted")===!0,ae=a.scheduledJournalEntry.error?.includes("debit_category_deleted")===!0,V=a.scheduledJournalEntry.error?.includes("credit_category_deleted")===!0,B=a.vendor.name.split("(deleted)")[0]?.toString(),Q=a.jeDebit.account?.accountName.split("(deleted)")?.[0]?.toString()??qs,de=a.jeCredit.account?.accountName.split("(deleted)")[0]?.toString()??qs,[le,ge]=s.useState(ae===!0&&I==null),[te,K]=s.useState(V===!0&&v==null),[Z,D]=s.useState(P&&(k?.id==null||k?.id==""));return s.useEffect(()=>{le===!1&&c.updatedCategoryId==null&&w.setFocus(Zs),te===!1&&c.updatedAccumulatedDepreciationCategoryID==null&&w.setFocus(Ys),Z===!1&&c.updatedVendor?.id==null&&w.setFocus(Gs)},[le,te,Z,c,w]),t.jsx(fn,{...w,children:t.jsx("form",{style:{width:"100%"},id:Qs(`${gt}_${a.jeScheduleId}`),onSubmit:A,children:t.jsx(is,{showBorder:b,onClick:R=>{a.jeScheduleType!=null&&a.jeScheduleId!=null&&x(R,a.jeScheduleId,a.jeScheduleTransactionKey,a.jeScheduleType)},"data-testid":O("je-schedule-resolve-component-schedule",`${gt}_${a.jeScheduleId}`),children:t.jsxs(ns,{children:[t.jsxs(ss,{children:[t.jsxs(es,{children:[P===!0?t.jsx(se,{style:{width:Ce.COLUMN_ONE,padding:f[0],justifyContent:"center"},showHoverEffect:P,forceHoverEffect:Z===!1&&(c?.updatedVendor?.id==null||c?.updatedVendor?.id==""),children:t.jsxs(Rt,{className:"hover-background",style:{padding:`${n.sp2} ${n.sp3}`},children:[t.jsxs(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:[Sn.vendor,t.jsx(xe,{display:"flex",placement:"top-start",title:t.jsx(Ai,{children:Je.tooltipText.missingVendor.replace("_deleted_vendor_",B)}),children:t.jsx(to,{})})]}),t.jsx(pe,{style:{gap:f[3],marginLeft:-2},className:"item-value-container",children:t.jsx(t.Fragment,{children:Z===!0?t.jsxs(we,{onClick:R=>{R.stopPropagation(),D(!1)},"data-testid":O("je-schedule-resolve-component-add-vendor-button",`${gt}_${a.jeScheduleId}`),style:{display:"inline-flex",alignItems:"center",gap:f[2],color:he.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(eo,{}),Hs]}):t.jsx(Eo,{name:Gs,placeholder:Hs,valueToId:R=>R,defaultValue:{selectedOption:H?.selectedOption,defaultOptions:H?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:n.sp4})},registerOptions:{required:!0,validate:R=>!!R.selectedOption},loadOptions:L})})})]})}):t.jsxs(se,{style:{width:Ce.COLUMN_ONE,padding:`${n.sp2} ${n.sp0} ${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{children:Sn.vendor}),t.jsx(pe,{children:t.jsxs(t.Fragment,{children:[a.vendor.logo?.href!=null?t.jsx(kr,{photoUrl:a.vendor.logo.href,styles:{width:f[4],height:f[4]}}):t.jsx(Jt,{name:a.vendor.name}),t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:a.vendor.name!==null?t.jsx(rt,{children:a.vendor.name}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:a.vendor.name??at})})]})})]}),t.jsxs(se,{children:[t.jsx(ue,{children:Je.scheduleHeaders.scheduleCategory}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:a.baseTransaction.account.accountName!=null?t.jsx(rt,{children:a.baseTransaction.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:a.baseTransaction.account.accountName??at})})})]}),t.jsxs(se,{style:{width:Ce.COLUMN_THREE},children:[t.jsx(ue,{children:Je.scheduleHeaders.startMonth}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",children:a.startDate?.format(Ks.visual.MMMCommaYYYYFormat)??at})})]}),t.jsxs(se,{style:{width:Ce.COLUMN_FOUR,paddingLeft:f[3]},children:[t.jsx(ue,{children:Je.scheduleHeaders.period}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",children:a.period!=null?`${a.period} ${a.period===1?Js.slice(0,-1):Js}`:at})})]}),t.jsxs(se,{style:{alignItems:"flex-end",width:Ce.COLUMN_FIVE},children:[t.jsx(ue,{children:Sn.totalAmount}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",title:t.jsx(rt,{children:it("0,0.[00]",cn(a.baseTransaction.amount.amount,At.currencyCode,At.currencySymbol))??at}),children:t.jsx(we,{className:"highlight",children:it("0,0.[00]",cn(a.baseTransaction.amount.amount,At.currencyCode,At.currencySymbol))??at})})})]})]}),t.jsxs(ts,{children:[ae===!0?t.jsx(se,{showHoverEffect:ae===!0,forceHoverEffect:c?.updatedCategoryId==null&&le===!1,style:{padding:"unset",justifyContent:"center",width:Ce.COLUMN_ONE},children:t.jsxs(Rt,{className:"hover-background",children:[t.jsxs(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:[Sn.category,ae===!0?t.jsx(xe,{display:"flex",placement:"top-start",title:t.jsx(Ai,{children:Je.tooltipText.missingCategory.replace("_deleted_category_",Q)}),children:t.jsx(to,{})}):null]}),t.jsx(pe,{className:"item-value-container",style:{marginLeft:ae===!0?-2:0},children:ae===!0?t.jsx(t.Fragment,{children:le===!0?t.jsxs(we,{onClick:R=>{R.stopPropagation(),ge(!1)},style:{display:"inline-flex",alignItems:"center",gap:f[1],color:he.brandColorGoldDark,cursor:"pointer"},"data-testid":O("je-schedule-resolve-component-add-category-button",`${gt}_${a.jeScheduleId}`),children:[t.jsx(eo,{}),Je.addCategory]}):t.jsx(In,{shouldShowChevronIcon:!1,name:Zs,placeholder:Je.addCategory,valueToId:R=>M(R),defaultValue:{allOptions:e},registerOptions:{required:!0,validate:R=>!!R.selectedOption},disableCurrentOption:W,customStyleConfig:S})}):t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:a.jeDebit.account?.accountName!=null?t.jsx(rt,{children:a.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:a.jeDebit.account?.accountName??at})})})]})}):t.jsxs(se,{style:{width:Ce.COLUMN_ONE,padding:`${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:Sn.category}),t.jsx(pe,{className:"item-value-container",children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:a.jeDebit.account?.accountName!=null?t.jsx(rt,{children:a.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:a.jeDebit.account?.accountName??at})})})]}),t.jsxs(se,{children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:Sn.classText}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:a.jeDebit.accountingClass?.className!=null?t.jsx(rt,{children:a.jeDebit.accountingClass.className}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:a.jeDebit.accountingClass?.className??at})})})]}),t.jsxs(se,{style:{width:Ce.COLUMN_THREE},children:[t.jsx(ue,{children:Je.scheduleHeaders.type}),t.jsx(pe,{className:"test",children:t.jsx(we,{className:"highlight",style:{width:"unset"},children:t.jsx(Hr,{children:Je.scheduleTypes[a.jeScheduleType??"prepaid_expenses"]})})})]}),a.jeScheduleType==="fixed_assets"?t.jsx(t.Fragment,{children:V===!0?t.jsx(se,{style:{width:Ce.COLUMN_FOUR,padding:"unset",justifyContent:"center"},showHoverEffect:V,forceHoverEffect:c.updatedAccumulatedDepreciationCategoryID==null&&te===!1,children:t.jsxs(Rt,{className:"hover-background",style:{padding:f[2],paddingLeft:f[3]},children:[t.jsxs(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:[Je.scheduleHeaders.accumulatedCategory,V===!0?t.jsx(xe,{display:"flex",placement:"top-end",title:t.jsx(Ai,{children:Je.tooltipText.missingDepCategory.replace("_deleted_dep_category_",de)}),children:t.jsx(to,{})}):null]}),t.jsx(pe,{className:"item-value-container",style:{marginLeft:V===!0?-2:0},children:V===!0?t.jsx(t.Fragment,{children:te===!0?t.jsxs(we,{onClick:R=>{R.stopPropagation(),K(!1)},style:{display:"inline-flex",alignItems:"center",gap:f[1],color:he.brandColorGoldDark,cursor:"pointer"},"data-testid":O("je-schedule-resolve-component-add-depreciation-category-button",`${gt}_${a.jeScheduleId}`),children:[t.jsx(eo,{}),Je.addDepCategory]}):t.jsx(In,{shouldShowChevronIcon:!1,showDownChevronWithValue:!1,name:Ys,placeholder:Je.addDepCategory,valueToId:R=>_(R),defaultValue:{allOptions:h},registerOptions:{required:!0,validate:R=>!!R.selectedOption},customStyleConfig:j,disableCurrentOption:W})}):t.jsx(xe,{display:"block",placement:"bottom",title:a.jeCredit.account?.accountName!=null?t.jsx(rt,{children:a.jeCredit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:a.jeCredit.account?.accountName??at})})})]})}):t.jsxs(se,{style:{width:Ce.COLUMN_FOUR,padding:`${n.sp2} ${n.sp2} ${n.sp2} ${n.sp3}`,justifyContent:"center"},children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:Je.scheduleHeaders.accumulatedCategory}),t.jsx(xe,{display:"block",placement:"bottom",title:a.jeCredit.account?.accountName!=null?t.jsx(rt,{children:a.jeCredit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:a.jeCredit.account?.accountName??at})})]})}):null,a.jeScheduleType!=="fixed_assets"?t.jsx(se,{style:{width:Ce.COLUMN_FOUR}}):null,t.jsx(se,{style:{width:Ce.COLUMN_FIVE}})]}),t.jsxs(Vh,{children:[t.jsx(se,{style:{padding:"unset",width:Ce.COLUMN_ONE},children:t.jsxs(Nh,{children:[t.jsx(ue,{children:Je.scheduleHeaders.jePostingDate}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",children:a.scheduledJournalEntry.expectedPostDate.format(Ks.visual.MMMDCommaYYFormat)??at})})]})}),t.jsxs(se,{children:[t.jsx(ue,{children:Je.scheduleHeaders.balance}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:t.jsx(rt,{children:it("0,0.[00]",cn(a?.scheduledJournalEntry?.runningBalance?.amount??0,At.currencyCode,At.currencySymbol))??at}),children:t.jsx(we,{className:"highlight",children:it("0,0.[00]",cn(a?.scheduledJournalEntry?.runningBalance?.amount??0,At.currencyCode,At.currencySymbol))??at})})})]}),t.jsxs(se,{style:{width:Ce.COLUMN_THREE},children:[t.jsx(ue,{children:Je.scheduleHeaders.months}),t.jsx(pe,{children:t.jsxs(we,{className:"highlight",children:[a.scheduledJournalEntry.expectedPostDate.diff(a.startDate,"month")+1,"/",a.period]})})]}),t.jsx(se,{style:{width:Ce.COLUMN_FOUR}}),t.jsxs(se,{style:{alignItems:"flex-end",width:Ce.COLUMN_FIVE},children:[t.jsx(ue,{children:Je.scheduleHeaders.amountForMonth}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",children:it("0,0.[00]",cn(a.scheduledJournalEntry.amount?.amount??0,At.currencyCode,At.currencySymbol))??at})})]})]})]}),t.jsx(os,{children:t.jsx(Wn,{form:Qs(`${gt}_${a.jeScheduleId}`),label:jm,variant:"primary",className:"item-value-container",type:"submit",loading:u?.fetchState==="In-Progress",size:"small",disabled:!b,style:{minWidth:Oo}})})]})})})})},Xs=(e,i,l,r,h,d,a,c)=>{const u=e.updatedCategoryId,m=e.updatedVendor,p=m!=null?c.vendor.find(I=>I.zeniId===m.id):void 0,g=e.updatedAccumulatedDepreciationCategoryID,x=e.updatedClassId,y=u!=null?h.find(I=>I.accountId===u):void 0,C=g!=null?a.find(I=>I.accountId===g):void 0,v=x!=null?d.find(I=>I.classId===x):void 0;return{[gt]:{jeScheduleID:e.jeScheduleID,scheduledJournalEntryID:e.scheduledJournalEntryID,jeScheduleType:e.jeScheduleType,scheduleExpenseCategory:{selectedOption:y?.qboId,allOptions:i},accumulatedDepreciationCategory:{selectedOption:C?.qboId,allOptions:r},vendor:{selectedOption:p?.id??m?.id,defaultOptions:Lr(c,p??m)},scheduleClass:{selectedOption:v?.classId,allOptions:l}}}},eo=o(_i)`
|
|
857
|
+
width: ${n.sp3};
|
|
858
|
+
height: ${n.sp3};
|
|
859
|
+
`,to=o(Ar)`
|
|
860
|
+
width: 12px;
|
|
861
|
+
height: 12px;
|
|
862
|
+
color: ${he.important};
|
|
863
|
+
`;function tl(){return t.jsx(Vr,{children:t.jsxs(Nr,{children:[t.jsxs(Ur,{children:[t.jsx(Ue,{width:f[9],height:27,style:{marginBottom:f[2]}}),t.jsx(ea,{})]}),t.jsxs(Wr,{children:[t.jsx(Ue,{width:f[9],height:27,style:{marginBottom:f[2]}}),t.jsx(ea,{})]})]})})}const ea=()=>t.jsx(is,{style:{minWidth:1088},children:t.jsxs(ns,{children:[t.jsxs(ss,{children:[t.jsxs(es,{children:[t.jsxs(se,{style:{width:Ce.COLUMN_ONE,padding:`${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{children:t.jsx(Ue,{width:f[10],height:14})}),t.jsxs(pe,{style:{gap:f[2]},children:[t.jsx(Yn,{height:f[4],width:f[4]}),t.jsx(Ue,{height:f[4],width:f[10]})]})]}),t.jsxs(se,{children:[t.jsx(ue,{children:t.jsx(Ue,{width:101,height:14})}),t.jsx(pe,{children:t.jsx(Ue,{height:f[4],width:203})})]}),t.jsxs(se,{style:{width:Ce.COLUMN_THREE},children:[t.jsx(ue,{children:t.jsx(Ue,{width:f[9],height:14})}),t.jsx(pe,{children:t.jsx(Ue,{height:f[4],width:71})})]}),t.jsxs(se,{style:{width:Ce.COLUMN_FOUR,paddingLeft:f[3]},children:[t.jsx(ue,{children:t.jsx(Ue,{width:107,height:14})}),t.jsx(Ue,{height:f[4],width:68})]}),t.jsxs(se,{style:{alignItems:"flex-end",width:Ce.COLUMN_FIVE},children:[t.jsx(ue,{children:t.jsx(Ue,{width:73,height:14})}),t.jsx(pe,{children:t.jsx(Ue,{height:f[4],width:49})})]})]}),t.jsxs(ts,{children:[t.jsxs(se,{style:{width:Ce.COLUMN_ONE,padding:`${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{children:t.jsx(Ue,{width:49,height:14})}),t.jsx(pe,{children:t.jsx(Ue,{height:f[4],width:158})})]}),t.jsxs(se,{children:[t.jsx(ue,{children:t.jsx(Ue,{width:36,height:14})}),t.jsx(pe,{children:t.jsx(Ue,{height:f[4],width:88})})]}),t.jsxs(se,{style:{width:Ce.COLUMN_THREE},children:[t.jsx(ue,{children:t.jsx(Ue,{width:36,height:14})}),t.jsx(pe,{children:t.jsx(Ue,{height:f[4],width:100})})]}),t.jsx(se,{style:{width:Ce.COLUMN_FOUR,paddingLeft:f[3]}}),t.jsx(se,{style:{width:Ce.COLUMN_FIVE}})]})]}),t.jsxs(os,{children:[t.jsx(Ue,{height:29,width:53,style:{margin:`${n.sp0} ${n.sp3}`}}),t.jsx(Ue,{height:29,width:53,style:{margin:`${n.sp0} ${n.sp3}`}})]})]})}),Ue=o(ot)`
|
|
864
|
+
border-radius: ${n.sp1};
|
|
865
|
+
`,{common:{create:Tm,resolve:Lm}}=me.getLocalizedStrings();function Am({jeSchedules:e,vendorSearchAutoCompleteData:i,handleJeScheduleClick:l,onJESchedulesFormDataChange:r,onPostJESchedule:h,ignoreRecommendedJeSchedule:d,vendorSearchAutoCompleteActions:a,setCurrentFooterFormId:c}){const u=e.draftSchedules,m=e.jeScheduleLocalDataById,p=e.postStatusById,g=e.ignoreStatusById,x=s.useRef(!1),[y,C]=s.useState(!1),v=s.useRef(M=>{M&&!x.current&&(x.current=!0,C(!0))});Qn({componentName:"expense_automation.je_schedules",enabled:y});const I=e.resolveSchedules,k=e.uncategorizedAccounts,{allAccountList:T,allClassList:$,allDepreciationAccountList:w}=e,S=Kt(e.accountListNestedAccountHierarchy),j=Kt(e.allDepreciationAccountListNestedAccountHierarchy),b=Ti(e.classListNestedAccountHierarchy),z=(M,_,W)=>{l(M,_,W)},A=(M,_,W,H)=>{let L=M.target;for(;L;){if(L.classList.contains("item-value-container")||L.classList.contains("hover-background")||L.classList.contains("auto-complete-single-select-field__input")||L.classList.contains("auto-complete-single-select-field__option")||L.classList.contains("grouped-single-select-field__input")||L.classList.contains("grouped-single-select-field__menu"))return;L=L.parentElement}l(_,W,H)};return s.useEffect(()=>{if(I.length!==0){for(const M in m)if(Object.prototype.hasOwnProperty.call(m,M)){const{updatedAccumulatedDepreciationCategoryID:_,updatedCategoryId:W,updatedVendor:H}=m[M];if(_!=null||W!=null||H!=null&&H?.id!==""){c("expenseAutomationJESchedulePage");break}else c("expenseAutomationPage")}}else I.length===0&&c("expenseAutomationPage")}),s.useEffect(()=>()=>{c("expenseAutomationPage")},[]),e.fetchState==="In-Progress"?t.jsx(tl,{}):u.length!==0||I.length!==0?t.jsx(Vr,{children:t.jsxs(Nr,{children:[u.length>0?t.jsxs(Ur,{children:[t.jsxs(ia,{children:[Tm,t.jsx(oa,{isCircular:u.length<10,children:t.jsx(sa,{children:u.length})})]}),t.jsx(ta,{"data-testid":O("expense-automation","draft-je-schedules"),children:u.map((M,_)=>t.jsx(na,{ref:v.current,children:t.jsx(bm,{ignoreStatus:g[M.jeScheduleTransactionKey],ignoreRecommendedJeSchedule:d,onReviewClickHandler:z,jeScheduleClickHandler:A,draft:M})},`${_}_${M.jeScheduleId}`))})]}):null,I.length>0?t.jsxs(Wr,{children:[t.jsxs(ia,{children:[Lm,t.jsx(oa,{isCircular:I.length<10,children:t.jsx(sa,{children:I.length})})]}),t.jsx(ta,{"data-testid":O("expense-automation","resolve-je-schedules"),children:I.map((M,_)=>m[M.scheduledJournalEntry.scheduledJournalEntryID]==null?null:t.jsx(na,{ref:v.current,children:t.jsx(Im,{vendorSearchAutoCompleteActions:a,vendorSearchAutoCompleteData:i,jeScheduleClickHandler:A,onPostJESchedule:h,uncategorizedAccounts:k,allAccountList:T,allAccountGroupedOptions:S,allClassGroupedOptions:b,allClassList:$,allDepAccountGroupedOptions:j,allDepAccountList:w,draft:M,postStatus:p[M.scheduledJournalEntry.scheduledJournalEntryID],localData:m[M.scheduledJournalEntry.scheduledJournalEntryID],onFormDataChange:r})},`${_}_${M.jeScheduleTransactionKey}`))})]}):null]})}):null}const ta=o.div`
|
|
866
|
+
display: flex;
|
|
867
|
+
flex-direction: column;
|
|
868
|
+
gap: ${n.sp4};
|
|
869
|
+
min-width: 1088px;
|
|
870
|
+
`,na=o.div``,ia=o(Jn)`
|
|
871
|
+
color: ${e=>e.theme.colors.primary};
|
|
872
|
+
padding: ${n.sp2} ${n.sp0};
|
|
873
|
+
display: flex;
|
|
874
|
+
align-items: center;
|
|
875
|
+
gap: ${n.sp1};
|
|
876
|
+
`,oa=o.div`
|
|
877
|
+
border-radius: ${n.sp12};
|
|
878
|
+
display: flex;
|
|
879
|
+
justify-content: center;
|
|
880
|
+
border: ${e=>`1px solid ${e.theme.colors.grey1}`};
|
|
881
|
+
color: ${e=>e.theme.colors.hero};
|
|
882
|
+
${e=>e.isCircular?re`
|
|
883
|
+
height: ${n.sp3};
|
|
884
|
+
width: ${n.sp3};
|
|
885
|
+
padding: ${n.sp0};
|
|
886
|
+
`:re`
|
|
887
|
+
height: 18px;
|
|
888
|
+
padding: ${zc.padding};
|
|
889
|
+
`}
|
|
890
|
+
`,sa=o(Fc)`
|
|
891
|
+
color: ${e=>e.theme.colors.hero};
|
|
892
|
+
height: 100%;
|
|
893
|
+
width: 100%;
|
|
894
|
+
display: flex;
|
|
895
|
+
align-items: center;
|
|
896
|
+
justify-content: center;
|
|
897
|
+
color: inherit;
|
|
898
|
+
`;function Rm({expenseAutomationViewSelector:e,currentFooterFormId:i,setResetJeAccountSettingsForm:l,vendorSearchAutoCompleteData:r,onJESchedulesFormDataChange:h,onPostJESchedule:d,handleJeScheduleClick:a,onJeAccountSettingsChange:c,onSaveJeAccountSettingsClick:u,ignoreRecommendedJeSchedule:m,vendorSearchAutoCompleteActions:p,setCurrentFooterFormId:g,setIsJeAccountSettingsOpened:x}){const{jeSchedules:y}=e;return y.fetchState==="In-Progress"||y.accountSettingsView.fetchState==="In-Progress"?t.jsx(tl,{}):y.accountSettingsView.fetchState==="Completed"&&y.accountSettingsView.accountSettingsLocalData.previousPrepaidExpensesAccount.length===0&&y.accountSettingsView.accountSettingsLocalData.previousFixedAssetsAccount.length===0?t.jsx(gm,{setIsJeAccountSettingsOpened:x,setResetJeAccountSettingsForm:l,currentFooterFormId:i,onJeAccountSettingsChange:c,onSaveJeAccountSettingsClick:u,accountSettings:y.accountSettingsView,setCurrentFooterFormId:g}):y.fetchState==="Completed"&&y.draftSchedules.length===0&&y.resolveSchedules.length===0?t.jsx(It,{tab:e.currentSelectedView,title:He(e.currentSelectedView).allDoneText.title,subTitle:He(e.currentSelectedView).allDoneText.subTitle}):y.fetchState==="Completed"?t.jsx(Am,{setCurrentFooterFormId:g,handleJeScheduleClick:a,ignoreRecommendedJeSchedule:m,jeSchedules:e.jeSchedules,onJESchedulesFormDataChange:h,onPostJESchedule:d,vendorSearchAutoCompleteActions:p,vendorSearchAutoCompleteData:r}):null}const Em=72,nl=50,Dm=1,Mm=["receipts"],aa=e=>Go(e,Mm),{common:{texts:{vendor:Om,amount:Pm,receipts:zm,category:Fm,classText:Bm,date:_m}}}=me.getLocalizedStrings(),il={key:"vendor",value:Om,sortOrder:"ascending",width:new G(18,18)},Vm={key:"category",value:Fm,sortOrder:"ascending",width:new G(18,18)},Nm={key:"class",value:Bm,sortOrder:"ascending",width:new G(18,18)},Um={key:"date",value:_m,sortOrder:"descending",width:new G(11,11)},Wm={key:"receipts",value:zm,sortOrder:"descending",width:new G(6,6)},ol={key:"amount",value:Pm,sortOrder:"ascending",width:new G(10,10)},Nn=[il,Vm,Nm,Um,Wm,ol],sl=[{...il,width:new G(65,65)},{...ol,width:new G(30,30)}],no={sortKey:"date",sortOrder:"descending"},al=({sortConfig:e,isDisabled:i,onColumnSortConfigChanged:l})=>{const r=be(),h=Xe(),d=h?sl:Nn,[a,c]=s.useState(d);s.useEffect(()=>{const p=[...d];for(const g of p)g.key===e.sortKey?g.sortOrder=e.sortOrder:g.sortOrder="ascending";c(p)},[e.sortKey,e.sortOrder,h]);const u=(p,g)=>{let x=g;e.sortKey===p&&(x=g==="ascending"?"descending":"ascending"),l(p,x)},m=p=>{aa(p.key)==null&&u(Cd(p.key),p.sortOrder)};return t.jsx(Hm,{windowSize:r,isQuickViewMode:h,children:a.map((p,g)=>{const x=i!=null||aa(p.key)!=null;return t.jsxs(qm,{sortDataValue:e.sortKey,actualDataValue:p.key,wrapperWidth:p.width,isSortDisabled:x,windowSize:r,isQuickViewMode:h,isLastItem:g===a.length-1,style:p.key==="receipts"?{justifyContent:"center"}:void 0,children:[t.jsxs(Zm,{onClick:()=>x?null:m(p),isSortDisabled:x,children:[t.jsx(Ym,{children:p.value}),x?null:t.jsx(Jm,{sortConfig:e,headerData:p,children:t.jsx(Gm,{})})]}),x?null:t.jsx(Qm,{isSortDisabled:x,sortDataValue:e.sortKey,isVisible:e.sortKey===p.key&&e.sortKey!==no.sortKey,children:t.jsx(Km,{onClick:()=>{x||u(no.sortKey,no.sortOrder)},"data-testid":O("missing-receipts-header-close-icon",p.key)})})]},p.key)})})},Hm=o.div`
|
|
899
|
+
top: ${n.sp0};
|
|
900
|
+
left: ${n.sp0};
|
|
901
|
+
height: ${nl}px;
|
|
902
|
+
z-index: 2;
|
|
903
|
+
display: flex;
|
|
904
|
+
flex-wrap: nowrap;
|
|
905
|
+
align-items: center;
|
|
906
|
+
box-sizing: border-box;
|
|
907
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
908
|
+
position: sticky;
|
|
909
|
+
width: 100%;
|
|
910
|
+
justify-content: space-between;
|
|
911
|
+
|
|
912
|
+
${e=>e.isQuickViewMode===!0?re`
|
|
913
|
+
width: 32%;
|
|
914
|
+
max-width: var(--side-panel-list-width, 100%);
|
|
915
|
+
`:re`
|
|
916
|
+
padding: ${n.sp0} ${n.sp3};
|
|
917
|
+
`}
|
|
918
|
+
`,qm=o.div`
|
|
919
|
+
color: ${e=>e.sortDataValue===e.actualDataValue&&!e.isSortDisabled?e.theme.colors.primary:e.theme.colors.grey1};
|
|
920
|
+
padding-left: ${n.sp0};
|
|
921
|
+
left: ${n.sp0};
|
|
922
|
+
display: flex;
|
|
923
|
+
align-items: center;
|
|
924
|
+
gap: 6px;
|
|
925
|
+
justify-content: ${e=>e.isLastItem?"flex-end":"flex-start"};
|
|
926
|
+
position: static;
|
|
927
|
+
z-index: 0;
|
|
928
|
+
box-sizing: border-box;
|
|
929
|
+
flex-shrink: 0;
|
|
930
|
+
${e=>e.isQuickViewMode===!0?re`
|
|
931
|
+
width: calc(
|
|
932
|
+
${e.wrapperWidth.valuePercentage(e.windowSize)} -
|
|
933
|
+
${n.sp4}
|
|
934
|
+
);
|
|
935
|
+
min-width: calc(
|
|
936
|
+
${e.wrapperWidth.valuePercentage(e.windowSize)} -
|
|
937
|
+
${n.sp4}
|
|
938
|
+
);
|
|
939
|
+
max-width: calc(
|
|
940
|
+
${e.wrapperWidth.valuePercentage(e.windowSize)} -
|
|
941
|
+
${n.sp4}
|
|
942
|
+
);
|
|
943
|
+
`:re`
|
|
944
|
+
width: ${e.wrapperWidth.valuePercentage(e.windowSize)};
|
|
945
|
+
min-width: ${e.wrapperWidth.valuePercentage(e.windowSize)};
|
|
946
|
+
max-width: ${e.wrapperWidth.valuePercentage(e.windowSize)};
|
|
947
|
+
`}
|
|
948
|
+
`,Km=o(ei)`
|
|
949
|
+
width: ${n.sp2};
|
|
950
|
+
height: ${n.sp2};
|
|
951
|
+
cursor: pointer;
|
|
952
|
+
`,Jm=o.div`
|
|
953
|
+
display: flex;
|
|
954
|
+
align-items: center;
|
|
955
|
+
transform: ${e=>e.headerData.sortOrder==="descending"?"rotate(180deg)":"rotate(0deg)"};
|
|
956
|
+
`,Qm=o.div`
|
|
957
|
+
display: ${e=>e.isVisible?"flex":"none"};
|
|
958
|
+
align-items: center;
|
|
959
|
+
cursor: ${e=>e.isSortDisabled===!0?"not-allowed":"pointer"};
|
|
960
|
+
&:hover {
|
|
961
|
+
color: ${e=>e.isSortDisabled?e.theme.colors.grey1:e.theme.colors.primary};
|
|
962
|
+
}
|
|
963
|
+
`,Gm=o(Xn)`
|
|
964
|
+
width: ${n.sp2};
|
|
965
|
+
height: ${n.sp2};
|
|
966
|
+
`,Zm=o.div`
|
|
967
|
+
display: flex;
|
|
968
|
+
cursor: ${e=>e.isSortDisabled===!0?"not-allowed":"pointer"};
|
|
969
|
+
gap: 6px;
|
|
970
|
+
&:hover {
|
|
971
|
+
color: ${e=>e.isSortDisabled?e.theme.colors.grey1:e.theme.colors.primary};
|
|
972
|
+
}
|
|
973
|
+
`,Ym=o(Ye)`
|
|
974
|
+
display: flex;
|
|
975
|
+
`,{common:{strings:{underscore:rl,hyphen:io,empty:ra},documents:{singleFileUploadSizeErrorMessage:Xm,multipleFileUploadSizeErrorMessage:eg},snackBar:{missing_receipts_attachment:{failed:tg}},tooltips:{addMissingReceipt:ng}},dateFormat:ig}=me.getLocalizedStrings(),kn={containerPaddingLeftRight:new G(f[3],f[4]),containerPaddingTopBottom:new G(f[2],f[3])},og=({transaction:e,uploadReceiptsFetchState:i,receiptUploadEndpoint:l,authParams:r,selectedPeriod:h,onUploadReceiptComplete:d,onMissingReceiptsRowClick:a,onUploadReceiptFetchStatus:c,onUploadReceiptAttachment:u})=>{const m=be(),p=Xe(),g=s.useRef(null),x=s.useCallback(async(I,k,T,$,w)=>{c(e.id,"In-Progress"),await kd(I,k,T,$,w).then(({uploadResponse:S,errorMessage:j})=>{S!=null?S.transaction.attachments!=null&&(u(S.transaction),setTimeout(()=>d(S.transaction,h),2e3)):c(e.id,"Error",{code:500,message:tg},j)}).catch(S=>{c(e.id,"Error",S)})},[e.id,h,u,d,c]),y=s.useCallback(I=>{if(I.target.files!=null){const k=I.target.files,T=[],$=[];for(let w=0;w<k.length;w++)T.push(k[w].name),$.push(k[w]);x(l,r,k[0],k[0].name,{id:e.id,type:e.type})}},[r,x,l,e.id,e.type]),C=s.useCallback(()=>{p||g.current?.click()},[g,p]),v=p?sl:Nn;return t.jsx(ll,{className:"missing-receipts-row-card",windowSize:m,isQuickViewMode:p,onClick:()=>a(e.id,e.type),"data-testid":O("missing-receipts-list-row",e.id),children:v.map((I,k)=>{const T=`${e.id}${rl}${I.key}`;switch(I.key){case"vendor":default:return t.jsx(dn,{windowSize:m,wrapperWidth:I.width,isQuickViewMode:p,children:t.jsx(un,{windowSize:m,isLastItem:k===v.length-1,children:t.jsxs(Ri,{children:[t.jsx(ti,{photoUrl:e.vendorId!=null?e.logo?.toString()??ra:ra,styles:{width:n.sp4,height:n.sp4,borderRadius:n.sp0},placeholder:{width:f[4],height:f[4]},fallbackAvatar:t.jsx(ug,{children:t.jsx(Jt,{name:e.vendorName??e.description,size:n.sp4})})}),t.jsx(qe,{text:e.vendorName??e.description,itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"}})]})})},T);case"category":case"class":{const $=e.lines!=null&&e.lines.length>0&&e.lines[0]?.account!=null&&e.lines[0].account.accountName?e.lines[0].account.accountName:io,w=e.lines!=null&&e.lines.length>0&&e.lines[0]?.class!=null&&e.lines[0].class.className?e.lines[0].class.className:io,S=I.key==="category"?$:w;return t.jsx(dn,{windowSize:m,wrapperWidth:I.width,isQuickViewMode:p,children:t.jsx(un,{windowSize:m,isLastItem:k===v.length-1,children:t.jsx(Ri,{children:S!==io?t.jsx(qe,{text:S,itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"}}):t.jsx(dg,{children:S})})})},T)}case"date":return t.jsx(dn,{windowSize:m,wrapperWidth:I.width,isQuickViewMode:p,children:t.jsx(un,{windowSize:m,isLastItem:k===v.length-1,children:t.jsx(Ri,{children:t.jsx(qe,{text:e.date.format(ig.visual.MMMDCommaYYYYformat),itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"}})})})},T);case"receipts":return t.jsx(dn,{windowSize:m,wrapperWidth:I.width,isQuickViewMode:p,children:t.jsx(un,{windowSize:m,isLastItem:k===v.length-1,style:{justifyContent:"center"},children:i.fetchState==="In-Progress"?t.jsx(qn,{size:"Small",style:{display:"flex"},start:!0}):i.fetchState==="Completed"||e.attachments!=null&&e.attachments.length>0?t.jsx(Pc,{shouldDisplay:!0,width:f[4],height:f[4],animationInLoop:!1,shouldFade:!1,onAnimationComplete:()=>null}):t.jsxs(t.Fragment,{children:[t.jsx(cg,{onClick:$=>{$.stopPropagation()},children:t.jsx(Wo,{"data-testid":O("missing-receipts-file-input",e.id),name:`missing-receipts-${e.id}`,fileRef:g,sizeLimit:Li,multiple:!1,acceptableTypes:[...Er],onFileChange:y,onFileSizeError:($,w)=>{$&&c(e.id,"Error",{code:500,message:w===!0?Xm.replace("__maxFileSize__",fs(Li,0)):eg.replace("__maxFileSize__",fs(Li,0))})}})}),t.jsx(xe,{display:"flex",placement:"bottom",title:ng,enterDelay:600,children:t.jsx(lg,{onClick:$=>{$.stopPropagation(),C()}})})]})})},T);case"amount":{const $=it("0,0.[00]",e.amount);return t.jsx(dn,{windowSize:m,wrapperWidth:I.width,isQuickViewMode:p,children:t.jsx(un,{windowSize:m,isLastItem:k===v.length-1,children:t.jsx(qe,{text:e.amount.amount<0?`-${$}`:$,itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"}})})},T)}}})})},sg=()=>{const e=be(),i=Xe(),l=s.useRef(null),[r,h]=s.useState(0);return s.useLayoutEffect(()=>{l.current&&h(l.current.offsetWidth)},[e]),t.jsx(ll,{windowSize:e,isQuickViewMode:i,ref:l,children:Nn.map((d,a)=>{const c=`${a}${rl}${d.key}`;switch(d.key){case"vendor":return t.jsx(dn,{windowSize:e,wrapperWidth:d.width,isQuickViewMode:i,children:t.jsx(un,{windowSize:e,isLastItem:a===Nn.length-1,children:t.jsxs(Ri,{children:[t.jsx(Yn,{width:f[4],height:f[4]}),t.jsx(ot,{width:r*d.width.value(e)/100,height:f[4],style:{display:"flex",alignItems:"center"}})]})})},c);default:return t.jsx(dn,{windowSize:e,wrapperWidth:d.width,isQuickViewMode:i,children:t.jsx(un,{windowSize:e,isLastItem:a===Nn.length-1,children:t.jsx(ot,{width:r*d.width.value(e)/100,height:f[4],style:{display:"flex",alignItems:"center"}})})},c)}})})},ll=o.div`
|
|
976
|
+
display: flex;
|
|
977
|
+
height: 100%;
|
|
978
|
+
background-color: ${e=>e.theme.colors.grey5};
|
|
979
|
+
padding-top: ${e=>kn.containerPaddingTopBottom.valuePx(e.windowSize)};
|
|
980
|
+
padding-bottom: ${e=>kn.containerPaddingTopBottom.valuePx(e.windowSize)};
|
|
981
|
+
border: ${e=>`1px solid ${e.theme.colors.grey3}`};
|
|
982
|
+
box-shadow: ${e=>`${n.sp0} 2px ${n.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
983
|
+
border-radius: ${n.sp2};
|
|
984
|
+
color: ${e=>e.theme.colors.hero};
|
|
985
|
+
cursor: pointer;
|
|
986
|
+
&:hover {
|
|
987
|
+
border-color: ${e=>e.theme.colors.primary};
|
|
988
|
+
color: ${e=>e.theme.colors.primary};
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
box-sizing: border-box;
|
|
992
|
+
align-items: center;
|
|
993
|
+
justify-content: space-between;
|
|
994
|
+
${e=>e.isQuickViewMode?re`
|
|
995
|
+
flex: 1;
|
|
996
|
+
padding-left: ${kn.containerPaddingLeftRight.valuePx(e.windowSize)};
|
|
997
|
+
padding-right: ${kn.containerPaddingLeftRight.valuePx(e.windowSize)};
|
|
998
|
+
width: 95%;
|
|
999
|
+
`:re`
|
|
1000
|
+
min-width: min-content;
|
|
1001
|
+
padding-left: ${kn.containerPaddingLeftRight.valuePx(e.windowSize)};
|
|
1002
|
+
padding-right: ${kn.containerPaddingLeftRight.valuePx(e.windowSize)};
|
|
1003
|
+
`}
|
|
1004
|
+
`,dn=o.div`
|
|
1005
|
+
display: flex;
|
|
1006
|
+
align-items: center;
|
|
1007
|
+
position: relative;
|
|
1008
|
+
:last-of-type {
|
|
1009
|
+
padding-right: ${n.sp0};
|
|
1010
|
+
}
|
|
1011
|
+
${e=>e.isQuickViewMode===!0?re`
|
|
1012
|
+
width: calc(
|
|
1013
|
+
${e.wrapperWidth.valuePercentage(e.windowSize)} -
|
|
1014
|
+
${n.sp4}
|
|
1015
|
+
);
|
|
1016
|
+
min-width: calc(
|
|
1017
|
+
${e.wrapperWidth.valuePercentage(e.windowSize)} -
|
|
1018
|
+
${n.sp4}
|
|
1019
|
+
);
|
|
1020
|
+
`:re`
|
|
1021
|
+
width: ${e.wrapperWidth.valuePercentage(e.windowSize)};
|
|
1022
|
+
min-width: ${e.wrapperWidth.valuePercentage(e.windowSize)};
|
|
1023
|
+
`}
|
|
1024
|
+
`,ag=re`
|
|
1025
|
+
word-break: break-all;
|
|
1026
|
+
white-space: normal;
|
|
1027
|
+
-webkit-line-clamp: 1;
|
|
1028
|
+
-webkit-box-orient: vertical;
|
|
1029
|
+
overflow: hidden;
|
|
1030
|
+
text-overflow: ellipsis;
|
|
1031
|
+
display: -webkit-box;
|
|
1032
|
+
`,rg=re`
|
|
1033
|
+
height: ${n.sp3};
|
|
1034
|
+
width: ${n.sp3};
|
|
1035
|
+
cursor: pointer;
|
|
1036
|
+
`,lg=o(_i)`
|
|
1037
|
+
${rg};
|
|
1038
|
+
color: ${e=>e.theme.colors.brandColorJadeDark};
|
|
1039
|
+
&:hover {
|
|
1040
|
+
color: ${e=>e.theme.colors.primary};
|
|
1041
|
+
}
|
|
1042
|
+
`,un=o(Re)`
|
|
1043
|
+
overflow: hidden;
|
|
1044
|
+
justify-content: ${e=>e.isLastItem?"flex-end":"flex-start"};
|
|
1045
|
+
display: flex;
|
|
1046
|
+
width: 100%;
|
|
1047
|
+
align-items: center;
|
|
1048
|
+
`,cg=o.div``,Ri=o.div`
|
|
1049
|
+
display: flex;
|
|
1050
|
+
flex-direction: row;
|
|
1051
|
+
column-gap: ${n.sp2};
|
|
1052
|
+
align-items: center;
|
|
1053
|
+
`,dg=o(Re)`
|
|
1054
|
+
${ag};
|
|
1055
|
+
color: inherit;
|
|
1056
|
+
`,ug=o.div`
|
|
1057
|
+
display: flex;
|
|
1058
|
+
`,hg=({sortConfig:e,fetchState:i,isDisabled:l,onColumnSortConfigChanged:r})=>{const h=be(),d=Xe();return t.jsxs(pg,{windowSize:h,children:[t.jsx(mg,{isQuickViewMode:d,children:t.jsx(al,{sortConfig:e,isDisabled:i==="In-Progress"?"readonly":l,onColumnSortConfigChanged:r})}),t.jsx(gg,{windowSize:h,children:[...Array(3)].map((a,c)=>t.jsx(sg,{},c))})]})},pg=o.div`
|
|
1059
|
+
display: block;
|
|
1060
|
+
min-height: 100%;
|
|
1061
|
+
flex-direction: column;
|
|
1062
|
+
width: 100%;
|
|
1063
|
+
`,mg=o.div`
|
|
1064
|
+
flex: 1;
|
|
1065
|
+
width: auto;
|
|
1066
|
+
padding-left: ${({isQuickViewMode:e})=>e===!0?n.sp8:n.sp0};
|
|
1067
|
+
`,gg=o.div`
|
|
1068
|
+
display: flex;
|
|
1069
|
+
min-height: 100%;
|
|
1070
|
+
flex-direction: column;
|
|
1071
|
+
row-gap: ${n.sp3};
|
|
1072
|
+
`,{common:xg}=me.getLocalizedStrings(),fg=({missingReceipts:e,receiptUploadEndpoint:i,authParams:l,selectedPeriod:r,isDisabled:h,onMissingReceiptsRowClick:d,onUploadReceiptComplete:a,onUploadReceiptAttachment:c,onUploadReceiptFetchStatus:u,onUpdateMissingReceiptsUIState:m,onFetchMissingReceiptsList:p})=>{const g=be(),x=Xe(),{fetchState:y,uiState:C,transactions:v}=e;Qn({componentName:"expense_automation.missing_receipts",enabled:y==="Completed"});const I=s.useRef(null),[k,T]=s.useState(!1);s.useEffect(()=>{I.current?.resetAfterIndex(0)},[g,I]),s.useEffect(()=>{y==="Completed"&&T(!1)},[y]);const $=S=>Em,w=(S,j)=>{m({sortOrder:j,sortKey:S})};return t.jsxs(Cg,{children:[t.jsx(bg,{windowSize:g,children:y==="Error"?t.jsxs(Sg,{windowSize:g,children:[t.jsx(kg,{onClick:()=>p(),"data-testid":O("missing-receipts-list-table-reload-button"),children:t.jsx(Uo,{})}),t.jsx(jg,{children:xg.reloadPage.label})]}):y==="Completed"&&v.length===0?t.jsx(It,{tab:"missing_receipts",title:He("missing_receipts").allDoneText.title,subTitle:He("missing_receipts").allDoneText.subTitle}):y==="Not-Started"||y==="In-Progress"&&v.length===0?t.jsx(hg,{sortConfig:{sortKey:C.sortKey,sortOrder:C.sortOrder},fetchState:y,onColumnSortConfigChanged:w}):t.jsx(vg,{windowSize:g,children:t.jsx(Kn,{children:({height:S,width:j})=>t.jsxs(Ig,{style:{height:S,width:j},children:[t.jsx(wg,{isQuickViewMode:x,children:t.jsx(al,{sortConfig:{sortKey:C.sortKey,sortOrder:C.sortOrder},isDisabled:y==="In-Progress"?"readonly":h,onColumnSortConfigChanged:w})}),t.jsx(Bi,{ref:I,height:S-nl,innerElementType:cl,itemCount:v.length,itemData:{missingReceipts:e,receiptUploadEndpoint:i,authParams:l,isDisabled:h,isQuickViewMode:x,selectedPeriod:r,onMissingReceiptsRowClick:d,onUploadReceiptComplete:a,onUploadReceiptAttachment:c,onUploadReceiptFetchStatus:u},itemSize:$,width:j,style:{willChange:"auto"},overscanCount:Dm,onScroll:({scrollOffset:b})=>{m({scrollPosition:{scrollTop:b}})},initialScrollOffset:C.scrollPosition?.scrollTop,children:yg})]})})})}),t.jsx(Ze,{controller:k===!0,children:t.jsx(Tg,{children:t.jsx(qn,{size:"Small",start:!0})})})]})},yg=({index:e,style:i,data:l})=>{const{selectedTransactionId:r}=Fi(),{missingReceipts:h,receiptUploadEndpoint:d,authParams:a,isQuickViewMode:c,onMissingReceiptsRowClick:u,onUploadReceiptComplete:m,onUploadReceiptAttachment:p,onUploadReceiptFetchStatus:g,selectedPeriod:x}=l,y=h.transactions[e],C=r!=null&&r===y.id;return t.jsx($g,{isPanelSelected:C,isQuickViewMode:c,style:{...i,width:"100%"},children:t.jsx(og,{transaction:y,receiptUploadEndpoint:d,authParams:a,selectedPeriod:x,onMissingReceiptsRowClick:u,onUploadReceiptComplete:m,onUploadReceiptAttachment:p,onUploadReceiptFetchStatus:g,uploadReceiptsFetchState:h.uploadReceiptStatusById[y.id]??{fetchState:"Not-Started",error:void 0}},y.id)})},wg=o.div`
|
|
1073
|
+
flex: 1;
|
|
1074
|
+
width: auto;
|
|
1075
|
+
`,Cg=o.div`
|
|
1076
|
+
width: 100%;
|
|
1077
|
+
height: 100%;
|
|
1078
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
1079
|
+
`,bg=o.div`
|
|
1080
|
+
height: 100%;
|
|
1081
|
+
`,vg=o.div`
|
|
1082
|
+
height: 100%;
|
|
1083
|
+
display: flex;
|
|
1084
|
+
flex-direction: column;
|
|
1085
|
+
max-width: 99.9%;
|
|
1086
|
+
`,Sg=o.div`
|
|
1087
|
+
display: flex;
|
|
1088
|
+
width: 100%;
|
|
1089
|
+
height: ${e=>`calc(100% - ${wr.valuePx(e.windowSize)})`};
|
|
1090
|
+
flex-direction: column;
|
|
1091
|
+
justify-content: center;
|
|
1092
|
+
align-items: center;
|
|
1093
|
+
`,kg=o.div`
|
|
1094
|
+
height: 96px;
|
|
1095
|
+
width: 96px;
|
|
1096
|
+
background: ${e=>e.theme.colors.background};
|
|
1097
|
+
border-radius: 50%;
|
|
1098
|
+
cursor: pointer;
|
|
1099
|
+
& svg {
|
|
1100
|
+
margin: ${n.sp5};
|
|
1101
|
+
color: ${e=>e.theme.colors.grey1};
|
|
1102
|
+
}
|
|
1103
|
+
&:hover {
|
|
1104
|
+
& svg {
|
|
1105
|
+
color: ${e=>e.theme.colors.primary};
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
`,jg=o(Lc)`
|
|
1109
|
+
margin-top: ${n.sp3};
|
|
1110
|
+
color: ${e=>e.theme.colors.hero};
|
|
1111
|
+
`,$g=o.div`
|
|
1112
|
+
top: ${n.sp0};
|
|
1113
|
+
left: ${n.sp0};
|
|
1114
|
+
padding-bottom: ${n.sp3};
|
|
1115
|
+
box-sizing: border-box;
|
|
1116
|
+
${e=>e.isPanelSelected===!0&&re`
|
|
1117
|
+
.missing-receipts-row-card {
|
|
1118
|
+
${Yo(e.theme)}
|
|
1119
|
+
}
|
|
1120
|
+
`}
|
|
1121
|
+
`,Ig=o.div`
|
|
1122
|
+
position: relative;
|
|
1123
|
+
`,cl=s.forwardRef((e,i)=>{const{style:l,...r}=e;return t.jsx("div",{ref:i,style:{...l,width:"auto",maxWidth:"var(--side-panel-list-width, 100%)",position:"relative"},...r})});cl.displayName="Missing receipts inner element type";const Tg=o.div`
|
|
1124
|
+
display: flex;
|
|
1125
|
+
width: 100%;
|
|
1126
|
+
height: ${n.sp3};
|
|
1127
|
+
flex-direction: row;
|
|
1128
|
+
justify-content: center;
|
|
1129
|
+
align-items: center;
|
|
1130
|
+
margin-top: ${n.sp3};
|
|
1131
|
+
margin-bottom: ${n.sp3};
|
|
1132
|
+
`,Lg=[...xd],Ag=7*1024*100,Rg=o.div`
|
|
1133
|
+
width: ${_n}px;
|
|
1134
|
+
`,oo=o.div`
|
|
1135
|
+
width: ${e=>`${e.availableWidth}px`};
|
|
1136
|
+
min-width: auto;
|
|
1137
|
+
position: relative;
|
|
1138
|
+
height: fit-content;
|
|
1139
|
+
min-height: ${n.sp12};
|
|
1140
|
+
`,Eg=o.div`
|
|
1141
|
+
flex-grow: 1;
|
|
1142
|
+
overflow: auto;
|
|
1143
|
+
min-height: 2em;
|
|
1144
|
+
display: flex;
|
|
1145
|
+
flex-direction: row;
|
|
1146
|
+
position: relative;
|
|
1147
|
+
|
|
1148
|
+
pointer-events: auto;
|
|
1149
|
+
user-select: text;
|
|
1150
|
+
justify-content: space-between;
|
|
1151
|
+
margin-bottom: ${n.sp2};
|
|
1152
|
+
|
|
1153
|
+
// Disable select for Zeni Logo and File Separator
|
|
1154
|
+
#${pr} img[alt*="company logo"],
|
|
1155
|
+
.attachFileSeparator {
|
|
1156
|
+
user-select: none;
|
|
1157
|
+
}
|
|
1158
|
+
`,Dg=o.div`
|
|
1159
|
+
display: flex;
|
|
1160
|
+
column-gap: ${n.sp2};
|
|
1161
|
+
align-items: flex-end;
|
|
1162
|
+
margin-top: ${n.sp2};
|
|
1163
|
+
margin-bottom: ${n.sp3};
|
|
1164
|
+
`,Mg=o.div`
|
|
1165
|
+
position: relative;
|
|
1166
|
+
`,la=o(Re)`
|
|
1167
|
+
position: relative;
|
|
1168
|
+
`,Og=o.div`
|
|
1169
|
+
background-color: ${e=>e.theme.colors.grey5};
|
|
1170
|
+
border: ${e=>`1px solid ${e.theme.colors.background}`};
|
|
1171
|
+
border-radius: ${n.sp2};
|
|
1172
|
+
box-shadow: ${e=>`${n.sp0} 2px ${n.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
1173
|
+
padding: ${n.sp5};
|
|
1174
|
+
color: ${e=>e.theme.colors.primary};
|
|
1175
|
+
position: relative;
|
|
1176
|
+
.lexicalEditor__nestedListItem {
|
|
1177
|
+
list-style-type: none;
|
|
1178
|
+
}
|
|
1179
|
+
user-select: text;
|
|
1180
|
+
|
|
1181
|
+
.monthEndReportCanvasWrapper > * {
|
|
1182
|
+
isolation: isolate;
|
|
1183
|
+
z-index: ${f[1]};
|
|
1184
|
+
}
|
|
1185
|
+
`,Pg=o.div`
|
|
1186
|
+
user-select: text;
|
|
1187
|
+
`,zg=o.div`
|
|
1188
|
+
position: absolute;
|
|
1189
|
+
top: ${n.sp4}; // Attachment icon position from the top
|
|
1190
|
+
right: -${n.sp3}; // To show attachment icon on the edge
|
|
1191
|
+
`,Fg=o.div`
|
|
1192
|
+
margin-top: ${n.sp2};
|
|
1193
|
+
display: flex;
|
|
1194
|
+
flex-direction: column;
|
|
1195
|
+
row-gap: ${n.sp3};
|
|
1196
|
+
margin-bottom: ${n.sp4};
|
|
1197
|
+
position: relative;
|
|
1198
|
+
|
|
1199
|
+
.toolbar {
|
|
1200
|
+
user-select: none;
|
|
1201
|
+
}
|
|
1202
|
+
`,Bg=o(st)`
|
|
1203
|
+
color: ${e=>e.theme.colors.grey1};
|
|
1204
|
+
user-select: none;
|
|
1205
|
+
`,_g=o(yr)`
|
|
1206
|
+
color: ${e=>e.theme.colors.primary};
|
|
1207
|
+
`,Vg=o.div`
|
|
1208
|
+
flex-direction: column;
|
|
1209
|
+
row-gap: ${n.sp3};
|
|
1210
|
+
display: flex;
|
|
1211
|
+
`,Ng=Vi`
|
|
1212
|
+
0% {
|
|
1213
|
+
transform: translateX(100%);
|
|
1214
|
+
}
|
|
1215
|
+
100% {
|
|
1216
|
+
transform: translateX(0)
|
|
1217
|
+
}
|
|
1218
|
+
`,Ug=Vi`
|
|
1219
|
+
0% {
|
|
1220
|
+
transform: translateX(0)
|
|
1221
|
+
}
|
|
1222
|
+
100% {
|
|
1223
|
+
transform: translateX(100%)
|
|
1224
|
+
}
|
|
1225
|
+
`,Wg=o.div`
|
|
1226
|
+
animation: ${e=>e.allThreadsSectionOpen?Ng:Ug}
|
|
1227
|
+
0.5s forwards;
|
|
1228
|
+
height: 100vh;
|
|
1229
|
+
position: fixed;
|
|
1230
|
+
right: ${n.sp0};
|
|
1231
|
+
top: ${n.sp0};
|
|
1232
|
+
z-index: ${f[2]};
|
|
1233
|
+
min-width: ${dr}px;
|
|
1234
|
+
max-width: ${cr}px;
|
|
1235
|
+
`,Ei="monthEndReportFormSection",ca="monthEndReportPage",dt=me.getLocalizedStrings();function Hg({companyId:e,enableZeniGPTFeature:i,monthEndReportView:l,previewMode:r,customerRequestData:h,allThreadsSectionOpen:d,filterMetaData:a,newThreadMetadata:c,isZeniUser:u,selectedPeriod:m,improveUsingZeniGPTClick:p,onRemoveFileAttachment:g,onUpdateFileAttachment:x,onCloseAllThreadsSection:y,previewMonthEndReport:C,saveMonthEndReport:v,onEditClick:I,onOpenFileAttachmentSnackBar:k,onClickCustomerRequest:T,sendMonthEndReport:$}){const w=Tt(),[S,j]=s.useState(),[b,z]=s.useState(0),[A,M]=s.useState(0),_=s.useRef(),W=s.useRef(null),H=s.useRef(null),{html:L,subject:P,improveUsingZeniGPTStatus:ae}=l,[V,B]=s.useState(),[Q,de]=s.useState(!1),[le,ge]=s.useState(!1),te=s.useRef(null),K=s.useRef(null),Z=tc(d,250),D=l.fetchState==="Not-Started"||l.fetchState==="In-Progress"||l.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||l.companyMonthEndReportTemplatesData.fetchState==="In-Progress",{threadsRefs:R,sortedThreads:J,threadsPositions:N,observer:Y,unresolvedThreadsMap:ne,handleRemoveFloatingThread:q}=nc(a,te,!r,D,u),U=s.useCallback(()=>{d?K.current!=null&&M(Math.min((K.current.offsetWidth-_n-f[4])/2,K.current.offsetWidth-_n-cr-f[4])):K.current!=null&&z(Math.min((K.current.offsetWidth-_n-f[4])/2,K.current.offsetWidth-_n-dr-f[4]))},[d]);s.useEffect(()=>{U()},[d,U]),s.useEffect(()=>(window.addEventListener("resize",U),()=>{window.removeEventListener("resize",U)}),[U]);const F=u?tr:nr,{openThread:oe,addThread:ee,setOpenThread:X}=s.useContext(F),ke=ic(ps,!1,!r),Ie=te.current?.getBoundingClientRect(),E=ke!=null&&ke.coords&&Ie?{left:ke.coords.left-Ie.left,top:ke.coords.top-Ie.top}:void 0,ce=s.useCallback(()=>{const Ee=window.getSelection()?.getRangeAt(0),$e=oc();if(!Ee||$e==null)return;const Ke={...c,...$e,startPath:$e.startPath.join(),endPath:$e.endPath.join()},ye=`${hr()}${ur}`,_e=`cockpit_${e}`;ee(ye,{type:"thread",id:ye,roomId:_e,createdAt:new Date,comments:[],metadata:Ke,updatedAt:new Date,resolved:!1}),X(ye)},[ee,e,c,X]);s.useEffect(()=>{oe!=null&&d&&y()},[d,oe,y]);const je=ae.fetchState==="In-Progress",Me=xn({mode:"all",defaultValues:da(l),values:da(l)}),De=Me.handleSubmit(Ee=>{const{recipientEmailList:$e,subject:Ke}=Ee[Ei];if(r===!0)$?.(V?.id);else{const ye=S?.replace(sc,dt.common.strings.empty);$e!=null&&Ke!=null&&C($e,Ke,V?.id,ye!=null&&ye.length>0?S:void 0)}}),Fe=()=>{W.current!=null&&W.current.click()},ve=()=>{V!==void 0&&V!=null&&(g([V.id]),B(void 0),de(!1))},et=Ee=>{const $e=Ee.target.files?Ee.target.files[0]:null;if($e)if(!yd($e.type)||le)console.warn("Please select a valid file.");else{const Ke=new FileReader;Ke.onload=function(ye){const _e=ye.target?.result;if(typeof _e=="string"){const wt={data:_e.split(",")[1],name:$e.name,id:wd(e,$e.name)};B(wt),de(!0),x([wt])}},Ke.readAsDataURL($e)}},ht=()=>{H.current&&H.current.scrollIntoView({behavior:"smooth"})},tt=()=>{const Ee=Me.getValues(),{recipientEmailList:$e,subject:Ke}=Ee[Ei];$e!=null&&Ke!=null&&v($e,Ke,V?.id,S)};s.useEffect(()=>{j(l.zeniRequestsHtml)},[l.zeniRequestsHtml]),s.useEffect(()=>{_.current=V},[V]),s.useEffect(()=>{B(gd(l.attachmentFile)),de(!1)},[l.attachmentFile]),s.useEffect(()=>{le&&k()},[le,k]);const fe=Oi(`${m.year}-${m.month}-01`).format(dt.dateFormat.visual.MMMMFormat),Be=L!=null?L.split(ac):[],Vt=l.concatenatedHtml,nt=()=>l.lastDraftSavedDate!=null&&r===!1?t.jsx(Tc,{time:l.lastDraftSavedDate,user:l.reportLastSavedByUser,timeStampLabel:dt.cockpit.monthEndReport.timeStampLabel}):null,pt=()=>u===!0?Z?t.jsxs(t.Fragment,{children:[t.jsx(Wg,{allThreadsSectionOpen:d,children:t.jsx($c,{autoExpand:!0,autoFocus:!1,style:{borderLeft:`1px solid ${w.colors.grey3}`,boxShadow:`${n.sp0} 1px 2px ${n.sp0} ${he.boxShadowElevation}`},drawerSectionStyle:{width:`calc(100% - ${n.sp5} - ${n.sp5})`,backgroundColor:w.colors.background},threadsContainerStyle:{paddingBottom:r?"160px":n.sp12},collapsibleThreadStyle:{width:`calc(100% - ${n.sp4})`},allowComposer:!1,drawerTitle:dt.common.texts.comments,filter:a,textOverrides:{},preventResolvedThreadClick:!0,onThreadClick:(Ee,$e)=>{X($e);const Ke=J.findIndex(ye=>ye[0]===$e);y(),R.current?.[Ke]?.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},onCloseAllThreadsDrawer:()=>y()})}),t.jsx(oo,{availableWidth:b})]}):t.jsx(Ic,{observer:Y,canvasContainerRef:te,sortedThreads:J,threadsPositions:N,threadsRefs:R,unresolvedThreadsMap:ne,editorMode:!r,style:{minWidth:`${b}px`,position:"relative",height:"fit-content",top:`${te.current?.offsetTop}px`,minHeight:n.sp12},handleRemoveFloatingThread:q}):t.jsx(oo,{availableWidth:b}),Lt=(l.zeniRequestsData??[]).length+rc(l.companyMonthEndReportTemplatesData).length;return t.jsxs(t.Fragment,{children:[t.jsxs(Eg,{ref:K,children:[t.jsx(oo,{availableWidth:d?A:b}),t.jsxs(Rg,{children:[t.jsx(fn,{...Me,children:t.jsx("form",{id:ua(ca),onSubmit:De,children:t.jsxs(Vg,{children:[t.jsx(lc,{sectionId:Ei,previewMode:r,subject:P}),!r&&Lt>0?t.jsx(cc,{totalItems:Lt,onClickCustomerRequest:T}):null,t.jsxs(Og,{id:ps,ref:te,children:[t.jsxs(Pg,{className:"monthEndReportCanvasWrapper",children:[V!=null||le?t.jsx(zg,{"data-testid":O("email-attachment-container"),onClick:ht,children:t.jsx(dc,{fileSizeError:le,setFileSizeError:ge,loading:!1,showAnimation:!r&&Q})}):null,r?t.jsx(la,{dangerouslySetInnerHTML:{__html:uc(Vt)}}):t.jsxs(t.Fragment,{children:[t.jsxs(Mg,{id:hc,children:[t.jsx(Re,{dangerouslySetInnerHTML:{__html:Be[0]!=null?Be[0]+"</body></html>":dt.common.strings.empty}}),t.jsxs(Dg,{children:[t.jsx(_g,{children:dt.cockpit.monthEndReport.editorTitle}),t.jsx(Bg,{children:dt.cockpit.monthEndReport.editorNote})]})]}),t.jsx(Fg,{id:pc,children:t.jsx(mc,{handleFileInputClick:Fe,fileAttached:V!=null,enableZeniGPTFeature:i,isZeniGPTResponseLoading:je,initialHtmlString:l.zeniRequestsHtml,improveUsingZeniGPTClick:p,setZeniRequestsHtml:j,customerRequestData:h})}),t.jsx(la,{id:pr,dangerouslySetInnerHTML:{__html:Be[1]!=null?"<html><body>"+Be[1]:dt.common.strings.empty}})]}),V!=null?t.jsx(gc,{ref:H,fileName:V.name,fileSize:xc(V.data),onRemove:ve,isRemovable:!r}):null]}),E?t.jsx(fc,{style:{zIndex:15},coords:E,alignment:ke.alignment,onClick:ce}):null,t.jsx(yc,{canvasContainerRef:te,sortedThreads:J,editorMode:!r,isZeniUser:u})]})]})})}),t.jsx(Wo,{name:V?.name??dt.common.strings.empty,fileRef:W,sizeLimit:Ag,acceptableTypes:Lg,onFileChange:async Ee=>{et(Ee)},onFileSizeError:Ee=>ge(Ee),multiple:!1})]}),pt()]}),t.jsx(ir,{style:{zIndex:10},leftSideComponent:nt(),formId:ua(ca),cancelBtn:{isDisabled:je,label:r===!0?dt.cockpit.monthEndReport.editButtonLabel:dt.cockpit.monthEndReport.saveChanges,onClick:r===!0?I:tt,style:{width:"136px",padding:`${n.sp0} ${n.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?dt.cockpit.monthEndReport.sendEmailButtonLabel.replace("__month__",fe):dt.cockpit.monthEndReport.preview,size:"medium"}})]})}const da=e=>({[Ei]:{recipientEmailList:e.recipientEmailList,subject:e.subject??dt.common.strings.empty}}),ua=e=>`${e}_form`;yt.smallBold.lineHeightValue;const qg=1,Kg=50,ha=56,Jg=["memo_and_receipt","activity","paymentAccount","receipt"],pa=e=>Go(e,Jg),so=905,Qg=1240,Gg=1440,Zg=1920;function _t(e,i,l,r){const h=i,d=Math.round(i*Qg/so),a=Math.round(i*Gg/so),c=Math.round(i*Zg/so),u=l??a,m=r??u;return new G(e,i,h,Math.min(d,u),Math.min(a,u),Math.min(c,m))}const{common:{strings:{empty:Yg}},expenseAutomation:{transactions:{header:{vendors:Xg,category:e1,classText:t1,date:n1,type:i1,amount:o1,paymentAccount:s1,memoReceipt:a1}}}}=me.getLocalizedStrings(),dl={key:"vendor",value:Xg,sortOrder:"ascending",width:_t(200,200,220,360),customStyle:{common:{paddingLeft:f[7]}}},r1={key:"payment_account",value:s1,sortOrder:"ascending",width:_t(180,180,200,320),customStyle:{common:{paddingLeft:f[0]}}},l1={key:"category",value:e1,sortOrder:"ascending",width:_t(200,200,220,360),customStyle:{common:{paddingLeft:f[6]}}},c1={key:"class",value:t1,sortOrder:"ascending",width:_t(200,200,220,360),customStyle:{common:{paddingLeft:f[6]}}},d1={key:"date",value:n1,sortOrder:"descending",width:_t(108,108,130,144),customStyle:{common:{paddingLeft:f[0]}}},u1={key:"transaction_type",value:i1,sortOrder:"descending",width:_t(108,108,130,144),customStyle:{common:{paddingLeft:0}}},h1={key:"memo_and_receipt",value:a1,sortOrder:"ascending",width:_t(108,108,108,120),customStyle:{common:{paddingLeft:0,justifyContent:"center",display:"flex",alignItems:"center"}}},ul={key:"amount",value:o1,sortOrder:"ascending",width:_t(108,108,140,156),customStyle:{common:{paddingRight:f[0],justifyContent:"flex-end",display:"flex",alignItems:"center"}}},p1={key:"activity",value:Yg,sortOrder:"ascending",width:_t(f[6],f[6],48,54),customStyle:{common:{}}},rs=e=>{const i=[dl,r1,l1,c1,d1,u1,h1,ul];return e===!0&&i.push(p1),i},ls=[{...dl,width:new G(65,65)},{...ul,width:new G(30,30)}],ao={sortKey:"date",sortOrder:"descending"},hl=({sortConfig:e,isDisabled:i,isTransactionActivityEnabled:l,onColumnSortConfigChanged:r})=>{const h=be(),d=Xe(),a=d?ls:rs(l),[c,u]=s.useState(Mo(a));s.useEffect(()=>{const g=Mo(a);for(const x of g)x.key===e.sortKey?x.sortOrder=e.sortOrder:x.sortOrder="ascending";u(g)},[e.sortKey,e.sortOrder,d]);const m=(g,x)=>{let y=x;e.sortKey===g&&(y=x==="ascending"?"descending":"ascending"),r(g,y)},p=g=>{pa(g.key)==null&&m(vd(g.key),g.sortOrder)};return t.jsx(m1,{windowSize:h,isQuickViewMode:d,"data-testid":O("transaction-categorization-header-container"),children:c.map((g,x)=>{const y=i!=null||pa(g.key)!=null;return t.jsxs(g1,{sortDataValue:e.sortKey,actualDataValue:g.key,wrapperWidth:g.width,style:g.customStyle?.common,isSortDisabled:y,isQuickViewMode:d,windowSize:h,isLastItem:x===c.length-1,"data-testid":O("transaction-categorization-header-wrapper",g.key),children:[t.jsxs(C1,{"data-testid":O("transaction-categorization-header",g.value?g.value:g.key),onClick:()=>p(g),isSortDisabled:y,children:[t.jsx(b1,{children:g.value}),y?null:t.jsx(f1,{sortConfig:e,headerData:g,"data-testid":O("transaction-categorization-sort-icon",g.key),children:t.jsx(w1,{})})]}),y?null:t.jsx(y1,{isSortDisabled:y,sortDataValue:e.sortKey,isVisible:e.sortKey===g.key&&e.sortKey!==ao.sortKey,"data-testid":O("transaction-categorization-close-icon",g.key),children:t.jsx(x1,{onClick:()=>{m(ao.sortKey,ao.sortOrder)},"data-testid":O("transaction-categorization-close-icon-button",g.key)})})]},g.key)})})},m1=o.div`
|
|
1236
|
+
top: ${n.sp0};
|
|
1237
|
+
left: ${n.sp0};
|
|
1238
|
+
height: ${Kg}px;
|
|
1239
|
+
z-index: 2;
|
|
1240
|
+
display: flex;
|
|
1241
|
+
flex-wrap: nowrap;
|
|
1242
|
+
align-items: center;
|
|
1243
|
+
box-sizing: border-box;
|
|
1244
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
1245
|
+
position: sticky;
|
|
1246
|
+
${e=>e.isQuickViewMode?re`
|
|
1247
|
+
width: 100%;
|
|
1248
|
+
justify-content: space-between;
|
|
1249
|
+
`:re`
|
|
1250
|
+
column-gap: ${n.sp4};
|
|
1251
|
+
width: max-content;
|
|
1252
|
+
min-width: 100%;
|
|
1253
|
+
`}
|
|
1254
|
+
`,g1=o.div`
|
|
1255
|
+
color: ${e=>e.sortDataValue===e.actualDataValue&&!e.isSortDisabled?e.theme.colors.primary:e.theme.colors.grey1};
|
|
1256
|
+
padding-left: ${n.sp0};
|
|
1257
|
+
left: ${n.sp0};
|
|
1258
|
+
display: flex;
|
|
1259
|
+
align-items: center;
|
|
1260
|
+
gap: 6px;
|
|
1261
|
+
justify-content: ${e=>e.isLastItem?"flex-end":"flex-start"};
|
|
1262
|
+
position: static;
|
|
1263
|
+
z-index: 0;
|
|
1264
|
+
box-sizing: border-box;
|
|
1265
|
+
${e=>e.isQuickViewMode?re`
|
|
1266
|
+
width: ${e.wrapperWidth.valuePercentage(e.windowSize)};
|
|
1267
|
+
max-width: ${e.wrapperWidth.valuePercentage(e.windowSize)};
|
|
1268
|
+
`:re`
|
|
1269
|
+
width: ${e.wrapperWidth.valuePx(e.windowSize)};
|
|
1270
|
+
max-width: ${e.wrapperWidth.valuePx(e.windowSize)};
|
|
1271
|
+
`}
|
|
1272
|
+
`,x1=o(ei)`
|
|
1273
|
+
width: 12px;
|
|
1274
|
+
height: 12px;
|
|
1275
|
+
`,f1=o.div`
|
|
1276
|
+
display: flex;
|
|
1277
|
+
align-items: center;
|
|
1278
|
+
transform: ${e=>e.headerData.sortOrder==="descending"?"rotate(180deg)":"rotate(0deg)"};
|
|
1279
|
+
${e=>e.headerData.sortOrder==="ascending"?"padding-top: 2px":"padding-bottom: 2px"};
|
|
1280
|
+
`,y1=o.div`
|
|
1281
|
+
display: ${e=>e.isVisible?"flex":"none"};
|
|
1282
|
+
align-items: center;
|
|
1283
|
+
padding-top: 2px;
|
|
1284
|
+
cursor: ${e=>e.isSortDisabled===!0?"not-allowed":"pointer"};
|
|
1285
|
+
&:hover {
|
|
1286
|
+
color: ${e=>e.isSortDisabled?e.theme.colors.grey1:e.theme.colors.primary};
|
|
1287
|
+
}
|
|
1288
|
+
`,w1=o(Xn)`
|
|
1289
|
+
width: ${n.sp2};
|
|
1290
|
+
height: ${n.sp2};
|
|
1291
|
+
`,C1=o.div`
|
|
1292
|
+
display: flex;
|
|
1293
|
+
cursor: ${e=>e.isSortDisabled===!0?"not-allowed":"pointer"};
|
|
1294
|
+
gap: 6px;
|
|
1295
|
+
&:hover {
|
|
1296
|
+
color: ${e=>e.isSortDisabled?e.theme.colors.grey1:e.theme.colors.primary};
|
|
1297
|
+
}
|
|
1298
|
+
`,b1=o(Ye)`
|
|
1299
|
+
display: flex;
|
|
1300
|
+
`,ro="expenseAutomationTransactionsPage",mn="transactionCategorizationListTable",ze="account",ut="class",jt="lineEntitySelection",v1="lineEntity",S1="recommendations",pl="lineInfo",k1="vendorDetails",j1="customerDetails",Di="selectedTransactionIds",Ut=(e,i,l)=>`${e}.${l}.${i}`,$1=e=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.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"}),s.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"}),s.createElement("path",{d:"M16.0854 9.6521H19.6559V12.0656H16.0854V9.6521Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),ml=e=>s.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.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"}),s.createElement("path",{d:"M8 4.66602V7.93891L11.0228 10.9322",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M4.1813 4.23989L1.83594 4.24014V1.89453",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"})),I1=e=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M21.7995 14.6384L14.7656 21.6723L11.3086 22.3637L12 18.9067L19.0339 11.8728C19.3997 11.5071 19.8958 11.3016 20.413 11.3016C20.9303 11.3016 21.4263 11.5071 21.7922 11.8728L21.7995 11.8811C21.9808 12.062 22.1246 12.2769 22.2227 12.5134C22.3208 12.75 22.3713 13.0036 22.3713 13.2597C22.3713 13.5158 22.3208 13.7694 22.2227 14.006C22.1246 14.2426 21.9808 14.4575 21.7995 14.6384Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M8.54295 19.5981H3.0117C2.82886 19.6026 2.64701 19.57 2.47718 19.5021C2.30735 19.4342 2.15309 19.3325 2.02376 19.2032C1.89444 19.0739 1.79275 18.9196 1.72487 18.7498C1.65699 18.58 1.62433 18.3981 1.62888 18.2153V4.48579C1.61644 4.10613 1.75499 3.73703 2.01419 3.45934C2.27339 3.18165 2.63209 3.01804 3.0117 3.00433H16.8398C17.2194 3.01804 17.5781 3.18165 17.8373 3.45934C18.0965 3.73703 18.2351 4.10613 18.2226 4.48579V8.53558",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M14.055 8.06982L5.80499 8.06982",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M10.305 12.5698L5.80499 12.5698",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),T1=e=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.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"}),s.createElement("path",{d:"M15.75 1.5V6.75H21",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M10.4941 11.2559H16.4941",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M10.4941 14.2559H16.4941",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M16.5 22.5H3V5.85315",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),{common:{strings:{underscore:L1,hyphen:Wt,empty:qt,colon:ma},tooltips:{addReceipt:A1,viewReceipt:R1,viewReceipts:E1}},expenseAutomation:{transactions:St},dateFormat:D1}=me.getLocalizedStrings(),Bt={containerPaddingLeftRight:new G(f[3],f[4]),containerPaddingTopBottom:new G(f[1],f[2]),containerPaddingTopBottomEmpty:new G(f[2],f[3]),nameLogoWidth:new G(f[2],f[4]),nameLogoHeight:new G(f[2],f[4])},M1=({transactionView:e,transaction:i,sectionId:l,vendorSearchAutoCompleteData:r,vendorSearchAutoCompleteActions:h,selectedTab:d,containerRef:a,listContainerRef:c,isCOTEnabled:u,cotTracking:m,onTransactionCategorizationRowClick:p,setCurrentTransactionInAction:g,vendorLoadOptions:x,openTooltipId:y,setOpenTooltipId:C,isUncategorizedExpenseCategoryEnabled:v,setActivityLogTransactionId:I,isTransactionActivityEnabled:k,authParams:T,onUploadTransactionReceipt:$})=>{const w=be(),S=Xe(),[j,b]=s.useState(!1),[z,A]=s.useState(!1),{lineItemById:M,sortedLineItems:_}=i.transactionReviewLocalData,W=i.transactionReviewLocalData.tabSpecificLineItems?.[d]||[],H=_.filter(F=>W.indexOf(F)!==-1),L=[];H.forEach(F=>{L.push(M[F])});const{accountList:P,accountsHierarchyList:ae,classHierarchyList:V,classList:B,uncategorizedAccounts:Q,transactions:de,selectedCheckBoxTransactionIds:le}=e,ge=e.uploadReceiptStatusById,te=le.includes(i.transactionId),K=Tt(),Z={control:()=>({marginLeft:-2,backgroundColor:j?K.colors.background:K.colors.grey5}),valueContainer:()=>({justifyContent:"flex-start",paddingLeft:f[0]}),menu:()=>({width:"150%",background:K.colors.grey5}),singleValue:()=>({color:j||te?K.colors.primary:K.colors.hero,paddingLeft:f[2]}),input:F=>({...F,color:j||te?K.colors.primary:K.colors.hero,textAlign:"left",paddingLeft:f[2]}),menuPortal:F=>({...F,zIndex:10})},D={...Z,singleValue:F=>({...F,color:j||te?K.colors.primary:K.colors.hero}),menu:()=>({marginTop:f[1],marginLeft:-8}),input:F=>({...F,color:j||te?K.colors.primary:K.colors.hero,textAlign:"left"})},R=de.find(F=>F.id===i.transactionId),J=(F,oe)=>{const{transactionType:ee}=oe.transactionReviewLocalData;let X=F.target;for(;X;){if(X.classList.contains("select-value-container")||X.classList.contains("item-value-container")||X.classList.contains("grouped-single-select-field__value-container")||X.classList.contains("auto-complete-grouped-creatable-single-custom-group-select-field__option")||X.classList.contains("grouped-single-select-field__input")||X.classList.contains("grouped-single-select-field__menu"))return;X=X.parentElement}ee!=null&&p(oe.transactionId,ee)},N=s.useRef(null),[Y,ne]=s.useState(void 0),[q,U]=s.useState("bottom");return s.useEffect(()=>{if(Y===void 0)return;const F=c?.current?._outerRef??null,oe=()=>{const ee=N.current;if(ee==null||F==null)return;const X=ee.getBoundingClientRect(),ke=F.getBoundingClientRect(),Ie=F.scrollTop+(X.bottom-ke.top),E=F.scrollHeight-Ie;U(E>=288?"bottom":"top")};return oe(),window.addEventListener("resize",oe),F?.addEventListener("scroll",oe),()=>{window.removeEventListener("resize",oe),F?.removeEventListener("scroll",oe)}},[c,Y]),t.jsxs(P1,{onMouseEnter:S?void 0:()=>b(!0),onMouseLeave:S?void 0:()=>b(!1),children:[t.jsx(F1,{className:"categorization-row-card",windowSize:w,isSelected:te,isQuickViewMode:S,isHovered:j,children:t.jsx(B1,{children:L.map((F,oe)=>t.jsx(_1,{ref:Y===oe?N:void 0,"data-testid":O("transaction-categorization-list-row",F.lineId),windowSize:w,isQuickViewMode:S,onClick:ee=>J(ee,i),children:t.jsx(O1,{isTransactionActivityEnabled:k,line:F,isHovered:j||te,isSelected:te,isQuickViewMode:S,lineIndex:oe,sectionId:l,transaction:i,currentTransaction:R,windowSize:w,accountsHierarchyList:ae,classHierarchyList:V,allAccountList:P,allClassList:B,uncategorizedAccounts:Q,vendorSearchAutoCompleteData:r,vendorSearchAutoCompleteActions:h,setCurrentTransactionInAction:g,vendorLoadOptions:x,customStyle:Z,customStyleAutoComplete:D,recommendations:F.recommendationsWithCOT,selectedTab:d,isCOTEnabled:u,menuPlacement:q,cotTracking:m,openTooltipId:y,setOpenTooltipId:C,isUncategorizedExpenseCategoryEnabled:v,authParams:T,uploadReceiptStatus:ge?.[i.transactionId],onUploadTransactionReceipt:$,onDropdownClose:()=>ne(void 0),onDropdownOpen:()=>ne(oe)})},`${i.transactionId}.${F.lineId}`))},i.transactionId)},i.transactionId),k===!0&&!S&&t.jsx(ax,{className:"activity-log-icon","data-testid":O("activity-log-icon",i.transactionId),onMouseEnter:()=>A(!0),onMouseLeave:()=>A(!1),onClick:F=>{F.stopPropagation(),I(i.transactionId)},children:t.jsx(xe,{title:St.header.activity,placement:"bottom",children:t.jsx(rx,{style:{color:z?K.colors.primary:K.colors.hero}})})})]})},O1=({accountsHierarchyList:e,allAccountList:i,allClassList:l,classHierarchyList:r,customStyle:h,customStyleAutoComplete:d,line:a,lineIndex:c,transaction:u,currentTransaction:m,windowSize:p,uncategorizedAccounts:g,isHovered:x=!1,isSelected:y=!1,isQuickViewMode:C=!1,sectionId:v,recommendations:I,vendorSearchAutoCompleteData:k,selectedTab:T,isCOTEnabled:$,menuPlacement:w,cotTracking:S,openTooltipId:j,setCurrentTransactionInAction:b,vendorLoadOptions:z,setOpenTooltipId:A,isUncategorizedExpenseCategoryEnabled:M,isTransactionActivityEnabled:_,onDropdownClose:W,onDropdownOpen:H,authParams:L,uploadReceiptStatus:P,onUploadTransactionReceipt:ae})=>{const{transactionDate:V,transactionType:B,transactionTypeName:Q,memo:de}=u.transactionReviewLocalData,{setValue:le}=Jo(),ge=s.useCallback((ie,Te)=>{S?.onCOTView!=null&&S.onCOTView(a.lineId,u.transactionId,ie,Te)},[S,a.lineId,u.transactionId]),te=a.lineDescription,K=s.useMemo(()=>{if(te||de)return[{title:St.description,description:te||Wt},{title:St.header.memo,description:de||Wt}]},[de,te]),Z=Ut(v,jt,c.toString()),D=Ut(v,ze,c.toString()),R=Ut(v,ut,c.toString()),J=(ie,Te)=>{if(C)return;let Ae;switch(Te){case"vendor":Ae=Z;break;case"category":Ae=D;break;case"class":Ae=R;break;default:return}le(`${Ae}.selectedOption`,ie,{shouldValidate:!0,shouldDirty:!0})},N=Tt(),Y=s.useMemo(()=>m!=null&&ln(m)===!0?{id:u.transactionReviewLocalData.customer?.id??"",logo:u.transactionReviewLocalData.customer?.logo,name:u.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,u.transactionReviewLocalData.customer?.id,u.transactionReviewLocalData.customer?.logo,u.transactionReviewLocalData.customer?.name]),ne=s.useMemo(()=>m!=null&&ln(m)===!0?{id:u.transactionReviewLocalData.vendor?.id??"",logo:u.transactionReviewLocalData.vendor?.logo,name:u.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,u.transactionReviewLocalData.vendor?.id,u.transactionReviewLocalData.vendor?.logo,u.transactionReviewLocalData.vendor?.name]),q=a[ut]?.classId,U=a[ze]?.qboId??a[ze]?.accountId,F=Y?.id,oe=ne?.id,ee=ne?.name,[X,ke]=s.useState(!q),[Ie,E]=s.useState(!U||a[ze]?.qboId!=null&&Vn(g,a[ze].qboId,M===!0?["income"]:void 0)===!0),[ce,je]=s.useState(!oe||!F),Me=ie=>I?.find(Te=>Te.vendor?.qboId===ie||Te.vendor?.id===ie||Te.vendor?.name===ie)?.vendor?.reason??"",De=u.transactionReviewLocalData.lineItemById[a.lineId]?.recommendationsWithCOT||[],Fe=Ir(e,De),ve=$r(r,De),et=ie=>i.filter(Te=>Te.qboId===ie)[0]?.qboId,ht=ie=>l.filter(Te=>Te.classId===ie)[0]?.accountingClassNumber??void 0,tt=s.useCallback(ie=>Vn(g,ie,M===!0?["income"]:void 0),[g,M]),[fe,Be]=s.useState(!1),[Vt,nt]=s.useState(!1),[pt,Lt]=s.useState(!1),[Ee,$e]=s.useState(0),[Ke,ye]=s.useState(null),[_e,wt]=s.useState([]),[yn,Qe]=s.useState(void 0),wn=s.useRef(null),[Cn,Ct]=s.useState(0),[Zt,Yt]=s.useState(0),Xt=Nc()?.url,[ni,Dn]=s.useState(!1),Ni=(ie,Te)=>{b({transactionId:u.transactionId,lineItemId:a.lineId}),z(ie,Te)},en=()=>{je(!(oe||F)),Be(!1),W?.()},tn=()=>{U&&a[ze]?.qboId!=null&&Vn(g,a[ze].qboId,M===!0?["income"]:void 0)===!1?E(!1):E(!0),Dn(!1),W?.()},Mn=()=>{ke(!q),nt(!1),W?.()},ii=()=>{C||(oe||F)&&(Be(!0),H?.())},oi=()=>{C||(nt(!0),H?.())},Ui=()=>{C||(Dn(!0),H?.())};s.useEffect(()=>{U&&a[ze]?.qboId!=null&&Vn(g,a[ze].qboId,M===!0?["income"]:void 0)===!1?E(!1):E(!0)},[U]),s.useEffect(()=>{ke(!q)},[q]),s.useEffect(()=>{je(!(oe||F))},[oe,F]);const Wi=u.transactionReviewLocalData.selectedEntity,si=u.transactionReviewLocalData.lineItemById[a.lineId].selectedEntityLine,We=m!=null&&ln(m)===!0?Wi:si,nn=s.useMemo(()=>{const ie=u.transactionReviewLocalData.lineItemById[a.lineId]?.recommendationsWithCOT||[],Te=k.entityAutoCompleteView;return{selectedOption:We?.qboId??We?.id,defaultOptions:Ho(Te,We,ie??[])}},[We,u.transactionReviewLocalData.lineItemById,a.lineId,k.entityAutoCompleteView]),Hi=()=>We!=null&&We.logo!=null?t.jsx(ti,{photoUrl:We.logo.toString(),styles:{width:Bt.nameLogoWidth.valuePx(p),height:Bt.nameLogoHeight.valuePx(p)},fallbackAvatar:t.jsx(fa,{children:t.jsx(Jt,{name:We.name,size:n.sp4})})}):We!=null&&We.name!=null?t.jsx(fa,{children:t.jsx(Jt,{name:We.name,size:n.sp4})}):null,Le=(ie,Te)=>{if(Te==null||!Te)return;let Ae=[];return ie.forEach(Ot=>{Ae=Ae.concat(Ot.options)}),Ae.find(Ot=>Ot.value===Te)?.label??Te},Ge=Le(ve,q),bt=Le(Fe,U),vt=T==="review",ai=Ji("vendor",nn.defaultOptions,nn.selectedOption),ri=Ji("category",Fe,U),li=Ji("class",ve,q),qi=ie=>{const Te=C?ls:rs(ie);return Te.map((Ae,Ot)=>{const xt=`${u.transactionId}_${Ae.key}_${a.lineId}`;if(c>0&&m!=null&&ln(m)===!0&&Ae.key==="vendor")return t.jsx(mt,{windowSize:p,wrapperWidth:Ae.width,isQuickViewMode:C},xt);if(c>0&&(Ae.key==="transaction_type"||Ae.key==="payment_account"||Ae.key==="memo_and_receipt"))return t.jsx(mt,{windowSize:p,wrapperWidth:Ae.width,isQuickViewMode:C},xt);switch(Ae.key){case"activity":return t.jsx(xl,{},xt);case"vendor":default:return t.jsxs(mt,{windowSize:p,wrapperWidth:Ae.width,isQuickViewMode:C,className:"item-value-container",children:[!C&&t.jsx(lo,{isCOTEnabled:$,recommendations:De,type:"vendor",isFirstColumn:!0,isEnabled:!!We?.isPreFilled,isMisCategorized:ai,onRecommendationClick:J,selectedValue:oe,selectedValueLabel:ee,isReviewTab:vt,isAccountOptionDisabled:tt,existingOption:{label:m!=null&&ln(m)===!0?m?.vendor?.name:void 0,value:m!=null&&ln(m)===!0?m?.vendor?.id:void 0},cotTracking:S,lineId:a.lineId,transactionId:u.transactionId,openTooltipId:j,setOpenTooltipId:A}),t.jsx(mo,{children:ce===!0?t.jsx(ho,{isHovered:x,isQuickViewMode:C,children:t.jsxs(uo,{onClick:Ve=>{Ve.stopPropagation(),!C&&(H?.(),je(!1),Be(!0))},"data-testid":O("add-vendor-button",v),style:{display:"inline-flex",alignItems:"center",color:he.brandColorGoldDark,cursor:"pointer",height:n.sp6},children:[t.jsx(bi,{}),St.addPayee]})}):fe===!0?t.jsx($t,{onClickAway:en,children:t.jsx(ix,{"data-testid":O("vendor-selection-dropdown-container",Ut(v,jt,c.toString())),children:t.jsx(Kc,{name:Z,placeholder:St.addPayee,valueToInfo:Me,defaultValue:{selectedOption:nn.selectedOption,defaultOptions:nn.defaultOptions},type:"vendor",autoFocus:!ce,style:{width:"100%"},pageSource:"list_page",transactionStatus:vt?"pending_review":"auto_categorized",isOptionRemovable:!1,customStyleConfig:d,menuIsOpen:fe,onMenuClose:en,registerOptions:{required:!1},loadOptions:Ni,showCOT:$,onCOTView:ge,menuPlacement:w})})}):t.jsx(sx,{children:t.jsxs(po,{isHovered:x,isQuickViewMode:C,showOutline:!C&&ai&&We?.isPreFilled!==!0&&!y&&vt,children:[Hi(),t.jsx(nx,{onClick:ii,"data-testid":O("vendor-name-text",v),children:We!=null&&We.name?t.jsx(qe,{text:We.name,itemTextStyle:{color:x?N.colors.primary:N.colors.hero}}):t.jsx(ox,{children:Wt})})]})})})]},xt);case"category":{const Ve=m?.lines!=null?m?.lines[c]:void 0;return t.jsxs(mt,{windowSize:p,wrapperWidth:Ae.width,className:"item-value-container",children:[t.jsx(lo,{isCOTEnabled:$,recommendations:De,type:"category",isFirstColumn:!1,isReviewTab:vt,isEnabled:!!a[ze]?.isPreFilled,isAccountOptionDisabled:tt,isMisCategorized:ri,onRecommendationClick:J,selectedValue:U,selectedValueLabel:bt,existingOption:{label:Ve?.account?.accountName,value:Ve?.account?.qboId??Ve?.account?.accountId},cotTracking:S,lineId:a.lineId,transactionId:u.transactionId,openTooltipId:j,setOpenTooltipId:A}),t.jsx(mo,{children:Ie===!0?t.jsx(ho,{isHovered:x,children:t.jsxs(uo,{onClick:ct=>{ct.stopPropagation(),!C&&(H?.(),E(!1),Dn(!0))},"data-testid":O("category-selection-field",D),style:{display:"inline-flex",alignItems:"center",color:he.brandColorGoldDark,cursor:"pointer",height:n.sp6},children:[t.jsx(bi,{}),St.addCategory]})}):ni===!0?t.jsx($t,{onClickAway:tn,children:t.jsx(ya,{isHovered:x,"data-testid":O("category-selection-dropdown-container",D),children:t.jsx(ks,{name:D,placeholder:St.addCategory,valueToId:ct=>et(ct),type:"category",pageSource:"list_page",transactionStatus:vt?"pending_review":"auto_categorized",showCOT:$,defaultValue:{selectedOption:U,allOptions:Fe},style:{display:"flex",flexGrow:1,width:"100%",cursor:"inherit"},registerOptions:{required:!1},menuIsOpen:ni,autoFocus:!Ie&&(!U||a[ze]?.qboId!=null&&[g.expense?.qboId,g.income?.qboId].includes(a[ze].qboId)),onMenuClose:tn,customStyleConfig:h,disableCurrentOption:tt,menuPlacement:w,onCOTView:ge})})}):t.jsx(po,{isHovered:x,showOutline:ri&&a[ze]?.isPreFilled!==!0&&!y&&vt,children:t.jsx(wa,{onClick:Ui,"data-testid":O("category-label-text",D),children:t.jsx(qe,{text:bt??"",itemTextStyle:{color:x?N.colors.primary:N.colors.hero}})})})})]},xt)}case"class":{const Ve=m?.lines!=null?m?.lines[c]:void 0;return t.jsxs(mt,{windowSize:p,wrapperWidth:Ae.width,className:"item-value-container",children:[t.jsx(lo,{isCOTEnabled:$,recommendations:De,type:"class",isFirstColumn:!1,isReviewTab:vt,isEnabled:!!a[ut]?.isPreFilled,isAccountOptionDisabled:tt,isMisCategorized:li,onRecommendationClick:J,selectedValue:q,selectedValueLabel:Ge,existingOption:{label:Ve?.class?.className,value:Ve?.class?.classId},cotTracking:S,lineId:a.lineId,transactionId:u.transactionId,openTooltipId:j,setOpenTooltipId:A}),t.jsx(mo,{children:X===!0?t.jsx(ho,{isHovered:x,children:t.jsxs(uo,{onClick:ct=>{ct.stopPropagation(),!C&&(H?.(),ke(!1),nt(!0))},"data-testid":O("class-selection-field",R),style:{display:"inline-flex",alignItems:"center",color:he.brandColorGoldDark,cursor:"pointer",height:n.sp6},children:[t.jsx(bi,{}),St.addClass]})}):Vt===!0?t.jsx($t,{onClickAway:Mn,children:t.jsx(ya,{isHovered:x,"data-testid":O("class-selection-dropdown-container",R),children:t.jsx(ks,{name:R,placeholder:St.addClass,valueToId:ct=>ht(ct),type:"class",showCOT:$,defaultValue:{selectedOption:q,allOptions:ve},pageSource:"list_page",transactionStatus:vt?"pending_review":"auto_categorized",menuIsOpen:Vt,registerOptions:{required:!1},style:{width:"100%"},autoFocus:!X&&!q,customStyleConfig:h,onMenuClose:Mn,menuPlacement:w,onCOTView:ge})})}):t.jsx(po,{isHovered:x,showOutline:li&&a[ut]?.isPreFilled!==!0&&!y&&vt,children:t.jsx(wa,{"data-testid":O("class-selection-field",R),onClick:oi,children:t.jsx(qe,{text:Ge??"",itemTextStyle:{color:x?N.colors.primary:N.colors.hero}})})})})]},xt)}case"date":return t.jsx(mt,{windowSize:p,wrapperWidth:Ae.width,children:t.jsx(hn,{windowSize:p,isLastItem:Ot===Te.length-1,children:t.jsx(Bo,{"data-testid":O("date-field",Ut(v,ut,c.toString())),children:t.jsx(co,{style:{color:x?N.colors.primary:N.colors.hero},children:V!=null?V.format(D1.visual.MMMDCommaYYYYformat):null})})})},xt);case"transaction_type":return t.jsx(mt,{windowSize:p,wrapperWidth:Ae.width,children:t.jsx(hn,{windowSize:p,"data-testid":O("transaction-type-field",Ut(v,ut,c.toString())),isLastItem:Ot===Te.length-1,children:Q!=null?t.jsx(Hc,{textColor:x?new Ko(N.colors.primary):qc(void 0,N),text:Q??B}):null})},xt);case"amount":{const Ve=it("0,0.[00]",a.amount,!0);return t.jsx(mt,{windowSize:p,style:{marginRight:ie&&!C?f[0]:f[4]},wrapperWidth:Ae.width,isQuickViewMode:C,children:t.jsx(hn,{windowSize:p,isLastItem:Ot===Te.length-1,style:{justifyContent:"flex-end"},children:t.jsx(Bo,{"data-testid":O("transaction-amount-field",Ut(v,ut,c.toString())),style:{color:x?N.colors.primary:N.colors.hero},children:Ve})})},xt)}case"payment_account":{if(!(B==="expense"||B==="check"||B==="bill_payment"||B==="vendor_credit"||B==="credit_card_credit"||B==="deposit"||B==="sales_receipt"||B==="refund"||B==="payment"))return t.jsx(mt,{windowSize:p,wrapperWidth:Ae.width,children:t.jsx(hn,{windowSize:p,isLastItem:Ot===Te.length-1,children:t.jsx(co,{style:{textAlign:"center",width:"100%"},children:Wt})})},xt);const Ve=m?.account?.accountName,ct=m?.paymentType,Pn=m?.paymentTypeName,ci=ct==="credit_card"?U1:ct==="cash"?W1:ct==="check"?q1:ct==="ach"?ux:H1,ft={title:qt,items:[{text:St.paymentAccountTooltip.accountLabel+ma,amount:Ve??Wt},...Pn!=null?[{text:St.paymentAccountTooltip.methodLabel+ma,amount:Pn}]:[]]};return t.jsx(mt,{windowSize:p,wrapperWidth:Ae.width,children:t.jsx(hn,{windowSize:p,isLastItem:Ot===Te.length-1,children:t.jsx(xe,{display:"flex",placement:"bottom",variant:"list-description",data:ft,title:Ve??Wt,enterDelay:600,style:{overflow:"hidden",minWidth:0},children:t.jsxs(N1,{"data-testid":O("payment-account",v),style:{color:x?N.colors.primary:N.colors.hero},children:[ci!=null&&t.jsx(ci,{style:{color:x?N.colors.primary:N.colors.hero}}),t.jsx(co,{style:{color:"inherit",whiteSpace:"pre-wrap"},children:Ve??Wt})]})})})},xt)}case"memo_and_receipt":{const Ve=m?.attachments??[],ct=P?.fetchState==="In-Progress",Pn=ft=>{if(ft.stopPropagation(),Ve.length===0||m==null)return;if(Xt==null){console.warn("webV2MicroServiceEndpoint is not available, cannot fetch attachments.");return}Qe(Ve[0]),$e(0),Lt(!0);const zn=Ve.map(on=>on.id),di=`${Xt}/transaction_attachments`;Sr(di,L,{transaction_key:{transaction_id:m.id,transaction_type:m.type},attachment_ids:zn}).then(on=>{wt(on),on.length>0&&ye(on[0])})},ci=ft=>{ft.stopPropagation(),wn.current?.click()};return t.jsx(mt,{windowSize:p,wrapperWidth:Ae.width,"data-testid":O("memo-field",Ut(v,ut,c.toString())),children:t.jsxs(lx,{onClick:ft=>ft.stopPropagation(),children:[K!=null?t.jsx(xe,{display:"flex",placement:"bottom",data:K,variant:"multi-information-points",style:{maxHeight:"min(60vh, 360px)",overflowY:"auto",overflowX:"hidden"},children:t.jsx(J1,{"data-testid":O("memo-icon",v),style:{color:x?N.colors.primary:N.colors.hero}})}):t.jsx(K1,{style:{margin:0},children:Wt}),ct?t.jsx(qn,{size:"Small",style:{display:"flex"},start:!0}):Ve.length===0?t.jsx(xe,{display:"flex",placement:"bottom",title:A1,enterDelay:600,children:t.jsx(bi,{"data-testid":O("upload-receipt-icon",v),style:{margin:0},onClick:ft=>{ft.stopPropagation(),ci(ft)}})}):Ve.length===1?t.jsx(xe,{display:"flex",placement:"bottom",title:R1,enterDelay:600,children:t.jsx(cx,{"data-testid":O("view-receipt-icon",v),style:{color:x?N.colors.primary:N.colors.hero},onClick:Pn})}):t.jsx(xe,{display:"flex",placement:"bottom",title:E1,enterDelay:600,children:t.jsx(dx,{"data-testid":O("view-receipts-icon",v),style:{color:x?N.colors.primary:N.colors.hero},onClick:Pn})}),t.jsx(Wo,{name:`transaction-receipt-${u.transactionId}`,fileRef:wn,sizeLimit:Li,multiple:!0,acceptableTypes:[...Er],onFileChange:ft=>{const zn=ft.target.files;if(zn!=null&&zn.length>0){const di=Array.from(zn);ae(T,u.transactionId,B??qt,di,di.map(on=>on.name))}},onFileSizeError:()=>{}})]})},xt)}}})},lt=m?.attachments??[],On=yn??lt[0];return t.jsxs(t.Fragment,{children:[qi(_),pt&<.length>0&&On!=null?Pi.createPortal(t.jsx(xr,{allFiles:_e,fileSource:Ke,file:On,title:On.fileName,attachments:lt,showNavigation:!1,setFileSource:ye,setShowFullScreenView:Lt,onCrossClick:()=>{Lt(!1),ye(null),wt([]),Qe(void 0),$e(0)},onNextClick:()=>{const ie=(Ee+1)%lt.length;$e(ie),Qe(lt[ie]),_e[ie]!=null&&ye(_e[ie])},onPreviousClick:()=>{const ie=(Ee-1+lt.length)%lt.length;$e(ie),Qe(lt[ie]),_e[ie]!=null&&ye(_e[ie])},setSelectedFileAttachment:ie=>{Qe(typeof ie=="function"?Te=>ie(Te??lt[0]):ie)},handleTouchStart:ie=>Ct(ie.targetTouches[0].clientX),handleTouchMove:ie=>Yt(ie.targetTouches[0].clientX),handleTouchEnd:()=>{if(Cn-Zt>50&&Zt!==0&&Ee<lt.length-1){const ie=Ee+1;$e(ie),Qe(lt[ie]),_e[ie]!=null&&ye(_e[ie]),Ct(0),Yt(0)}else if(Cn-Zt<-50&&Zt!==0&&Ee>0){const ie=Ee-1;$e(ie),Qe(lt[ie]),_e[ie]!=null&&ye(_e[ie]),Ct(0),Yt(0)}}}),document.body):null]})},ga=({isEnabled:e,isReviewTab:i,isMisCategorized:l,hasRecommendations:r,isTooltipVisible:h=!1,type:d})=>e?i?h?t.jsx(Z1,{"data-testid":O("recommendation-icon",d)}):t.jsx(Q1,{"data-testid":O("recommendation-icon",d)}):h?t.jsx(G1,{"data-testid":O("recommendation-icon",d)}):t.jsx(Y1,{className:"ai-icon-selected-plain","data-testid":O("recommendation-icon",d)}):!e&&l||r?h?t.jsx(ex,{"data-testid":O("recommendation-icon",d)}):t.jsx(X1,{"data-testid":O("recommendation-icon",d)}):null,xa=({isFirstColumn:e,children:i})=>t.jsx(fl,{isFirstColumn:e,children:i}),lo=({recommendations:e,isCOTEnabled:i,type:l,isReviewTab:r,selectedValueLabel:h,isFirstColumn:d,isEnabled:a=!1,isMisCategorized:c=!1,selectedValue:u,existingOption:m,cotTracking:p,lineId:g,openTooltipId:x,transactionId:y,isAccountOptionDisabled:C,onRecommendationClick:v,setOpenTooltipId:I})=>{const k=s.useMemo(()=>`${y}:${g}:${l}`,[y,g,l]),T=x===k,$=ed().analytics,{createAlternateRecommendationCallback:w}=td(),S=s.useCallback(W=>{const H=e[1],L=e[0];w(l,{currentValue:h??qt,transactionCurrentStatus:r?"pending_review":"auto_categorized",transactionPage:"list_page",cotTracking:p?{transactionId:y,lineId:g,onCOTView:(P,ae,V,B)=>{p.onCOTView?.(P,ae,V,B)}}:void 0},H,L)(W)},[w,e,h,r,l,p,g,y]),j=nd(e,l,i,m,"list_page",r?"pending_review":"auto_categorized",v,S,u,C),b=id(e,l),z=s.useCallback(()=>{I(k);const W=j?.recommendations[0]?.cot??[],H=j?.recommendations[1]?.cot??[],L=H.length>0;if($.trackTransactionCotView({recommendationFor:l,currentValue:h??qt,recommendation:j?.recommendations[0]?.name??qt,recommendationCot:W,isRecommendationCotAvailable:W.length>0,recommendationReason:j?.recommendations[0]?.reason??qt,recommendationConfidencePercentage:j?.recommendations[0]?.confidencePercentage??null,recommendationConfidenceLevel:ys(ws(j?.recommendations[0]?.confidencePercentage).toLocaleLowerCase()),alternativeRecommendation:j?.recommendations[1]?.name??qt,alternativeRecommendationCot:H,isAlternativeRecommendationCotAvailable:L,alternativeRecommendationReason:j?.recommendations[1]?.reason??qt,alternativeRecommendationConfidencePercentage:j?.recommendations[1]?.confidencePercentage??null,alternativeRecommendationConfidenceLevel:L?ys(ws(j?.recommendations[1]?.confidencePercentage).toLocaleLowerCase()):null,transactionCurrentStatus:r?"pending_review":"auto_categorized",transactionPage:"list_page"}),p?.onCOTView!=null){const P=od(j);P!=null&&p.onCOTView(g,y,l,P)}},[$,j,r,h,l,g,y,k,I]),A=s.useCallback(()=>{x===k&&I(void 0)},[x,k,I]),M=s.useMemo(()=>!u||!b?!1:e.some(W=>l==="vendor"&&W.vendor!=null?W.vendor.id===u||W.vendor.qboId===u:l==="category"&&W.account!=null?W.account.qboId===u||W.account.accountId===u:l==="class"&&W.class!=null?W.class.classId===u:!1),[u,b,e,l]);if(!b)return t.jsx(fl,{isFirstColumn:d});const _=a||M;return j?t.jsx(xa,{isFirstColumn:d,children:t.jsx(xe,{variant:"chain-of-thought",data:j,placement:"bottom-start",disableIntersectionObserver:!0,position:"static",display:"block",open:T,style:{width:"auto",height:"auto"},leaveDelay:200,onOpen:z,onClose:A,children:t.jsx(tx,{"data-testid":O("recommendation-icon",l),children:t.jsx(ga,{isEnabled:_,isReviewTab:r,isMisCategorized:c,hasRecommendations:b,isTooltipVisible:T})})})}):t.jsx(xa,{isFirstColumn:d,children:t.jsx(ga,{isEnabled:_,isReviewTab:r,isMisCategorized:c,hasRecommendations:b,isTooltipVisible:T,type:l})})},gl=({isTransactionActivityEnabled:e})=>{const i=be(),l=Xe(),r=l?ls:rs(e);return t.jsx(z1,{windowSize:i,isQuickViewMode:l,isTransactionActivityEnabled:e,children:r.map((h,d)=>{const a=`${d}${L1}${h.key}`;switch(h.key){case"activity":return t.jsx(xl,{},a);case"vendor":return t.jsx(mt,{windowSize:i,wrapperWidth:h.width,isQuickViewMode:l,style:l?{paddingLeft:n.sp0}:{paddingLeft:n.sp3},children:t.jsx(hn,{windowSize:i,isLastItem:d===r.length-1,children:t.jsxs(Bo,{children:[t.jsx(Yn,{width:f[4],height:f[4]}),t.jsx(ot,{width:"100%",height:f[4],style:{display:"flex",alignItems:"center"}})]})})},a);default:{const c=d===r.length-1;return t.jsx(mt,{windowSize:i,wrapperWidth:h.width,isQuickViewMode:l,style:{marginRight:c&&l?f[4]:void 0},children:t.jsx(hn,{windowSize:i,isLastItem:c,children:t.jsx(ot,{width:"100%",height:f[4],style:{display:"flex",alignItems:"center"}})})},a)}}})})},xl=o.div`
|
|
1301
|
+
width: ${n.sp0};
|
|
1302
|
+
height: ${n.sp0};
|
|
1303
|
+
`,P1=o.div`
|
|
1304
|
+
display: flex;
|
|
1305
|
+
height: 100%;
|
|
1306
|
+
flex: 1;
|
|
1307
|
+
align-items: center;
|
|
1308
|
+
|
|
1309
|
+
&:hover .activity-log-icon {
|
|
1310
|
+
visibility: visible;
|
|
1311
|
+
}
|
|
1312
|
+
`,z1=o.div`
|
|
1313
|
+
display: flex;
|
|
1314
|
+
flex-direction: row;
|
|
1315
|
+
flex-wrap: nowrap;
|
|
1316
|
+
background-color: ${e=>e.theme.colors.grey5};
|
|
1317
|
+
padding-right: ${e=>e.isTransactionActivityEnabled?n.sp0:Bt.containerPaddingLeftRight.valuePx(e.windowSize)};
|
|
1318
|
+
padding-top: ${e=>Bt.containerPaddingTopBottomEmpty.valuePx(e.windowSize)};
|
|
1319
|
+
padding-bottom: ${e=>Bt.containerPaddingTopBottomEmpty.valuePx(e.windowSize)};
|
|
1320
|
+
border: ${e=>`1px solid ${e.theme.colors.grey3}`};
|
|
1321
|
+
box-shadow: ${e=>`${n.sp0} 2px ${n.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
1322
|
+
border-radius: ${n.sp2};
|
|
1323
|
+
color: ${e=>e.theme.colors.hero};
|
|
1324
|
+
cursor: pointer;
|
|
1325
|
+
&:hover {
|
|
1326
|
+
border-color: ${e=>e.theme.colors.primary};
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
box-sizing: border-box;
|
|
1330
|
+
align-items: center;
|
|
1331
|
+
${e=>e.isQuickViewMode?re`
|
|
1332
|
+
flex: 1;
|
|
1333
|
+
justify-content: space-between;
|
|
1334
|
+
padding-left: ${Bt.containerPaddingLeftRight.valuePx(e.windowSize)};
|
|
1335
|
+
`:re`
|
|
1336
|
+
column-gap: ${n.sp4};
|
|
1337
|
+
min-width: min-content;
|
|
1338
|
+
`}
|
|
1339
|
+
`,F1=o.div`
|
|
1340
|
+
display: flex;
|
|
1341
|
+
height: 100%;
|
|
1342
|
+
background-color: ${e=>e.theme.colors.grey5};
|
|
1343
|
+
border: ${e=>`1px solid ${e.theme.colors.grey3}`};
|
|
1344
|
+
box-shadow: ${e=>`${n.sp0} 2px ${n.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
1345
|
+
border-radius: ${n.sp2};
|
|
1346
|
+
color: ${e=>e.theme.colors.hero};
|
|
1347
|
+
border-color: ${e=>e.isSelected?e.theme.colors.primary:"none"};
|
|
1348
|
+
cursor: pointer;
|
|
1349
|
+
${e=>e.isQuickViewMode?re`
|
|
1350
|
+
flex: 1;
|
|
1351
|
+
padding-left: ${Bt.containerPaddingLeftRight.valuePx(e.windowSize)};
|
|
1352
|
+
`:re`
|
|
1353
|
+
min-width: min-content;
|
|
1354
|
+
`}
|
|
1355
|
+
&:hover {
|
|
1356
|
+
border-color: ${e=>e.theme.colors.primary};
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
box-sizing: border-box;
|
|
1360
|
+
align-items: center;
|
|
1361
|
+
justify-content: space-between;
|
|
1362
|
+
|
|
1363
|
+
.ai-icon-selected-plain {
|
|
1364
|
+
color: ${e=>e.theme.colors.hero};
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1367
|
+
${({isHovered:e,theme:i})=>e?re`
|
|
1368
|
+
.ai-icon-selected-plain {
|
|
1369
|
+
color: ${i.colors.primary};
|
|
1370
|
+
}
|
|
1371
|
+
`:null};
|
|
1372
|
+
`,B1=o.div`
|
|
1373
|
+
display: flex;
|
|
1374
|
+
flex: 1;
|
|
1375
|
+
flex-direction: column;
|
|
1376
|
+
min-width: min-content;
|
|
1377
|
+
box-sizing: border-box;
|
|
1378
|
+
align-items: stretch;
|
|
1379
|
+
`,_1=o.div`
|
|
1380
|
+
display: flex;
|
|
1381
|
+
flex: 1;
|
|
1382
|
+
flex-direction: row;
|
|
1383
|
+
flex-wrap: nowrap;
|
|
1384
|
+
align-items: center;
|
|
1385
|
+
height: ${n.sp8};
|
|
1386
|
+
padding-top: ${e=>Bt.containerPaddingTopBottom.valuePx(e.windowSize)};
|
|
1387
|
+
padding-bottom: ${e=>Bt.containerPaddingTopBottom.valuePx(e.windowSize)};
|
|
1388
|
+
${e=>e.isQuickViewMode===!0?re`
|
|
1389
|
+
width: 100%;
|
|
1390
|
+
justify-content: space-between;
|
|
1391
|
+
`:re`
|
|
1392
|
+
min-width: min-content;
|
|
1393
|
+
column-gap: ${n.sp4};
|
|
1394
|
+
`}
|
|
1395
|
+
`,mt=o.div`
|
|
1396
|
+
display: flex;
|
|
1397
|
+
align-items: center;
|
|
1398
|
+
flex-direction: row;
|
|
1399
|
+
position: relative;
|
|
1400
|
+
:last-of-type {
|
|
1401
|
+
padding-right: ${n.sp0};
|
|
1402
|
+
}
|
|
1403
|
+
${e=>e.isQuickViewMode===!0?re`
|
|
1404
|
+
width: calc(
|
|
1405
|
+
${e.wrapperWidth.valuePercentage(e.windowSize)} -
|
|
1406
|
+
${n.sp4}
|
|
1407
|
+
);
|
|
1408
|
+
min-width: calc(
|
|
1409
|
+
${e.wrapperWidth.valuePercentage(e.windowSize)} -
|
|
1410
|
+
${n.sp4}
|
|
1411
|
+
);
|
|
1412
|
+
`:re`
|
|
1413
|
+
box-sizing: border-box;
|
|
1414
|
+
width: ${e.wrapperWidth.valuePx(e.windowSize)};
|
|
1415
|
+
min-width: ${e.wrapperWidth.valuePx(e.windowSize)};
|
|
1416
|
+
max-width: ${e.wrapperWidth.valuePx(e.windowSize)};
|
|
1417
|
+
`}
|
|
1418
|
+
`,V1=re`
|
|
1419
|
+
word-break: break-word;
|
|
1420
|
+
white-space: nowrap;
|
|
1421
|
+
-webkit-line-clamp: 1;
|
|
1422
|
+
-webkit-box-orient: vertical;
|
|
1423
|
+
overflow: hidden;
|
|
1424
|
+
text-overflow: ellipsis;
|
|
1425
|
+
display: -webkit-box;
|
|
1426
|
+
`,hn=o(Re)`
|
|
1427
|
+
overflow: hidden;
|
|
1428
|
+
justify-content: ${e=>e.isLastItem?"flex-end":"flex-start"};
|
|
1429
|
+
display: flex;
|
|
1430
|
+
width: 100%;
|
|
1431
|
+
align-items: center;
|
|
1432
|
+
`,Bo=o.div`
|
|
1433
|
+
display: flex;
|
|
1434
|
+
flex-direction: row;
|
|
1435
|
+
column-gap: ${n.sp2};
|
|
1436
|
+
align-items: center;
|
|
1437
|
+
`,co=o(Re)`
|
|
1438
|
+
${V1};
|
|
1439
|
+
min-width: 0;
|
|
1440
|
+
color: ${e=>e.theme.colors.hero};
|
|
1441
|
+
`,uo=o(Re)`
|
|
1442
|
+
color: ${e=>e.theme.colors.hero};
|
|
1443
|
+
`,N1=o.div`
|
|
1444
|
+
display: flex;
|
|
1445
|
+
align-items: center;
|
|
1446
|
+
gap: ${n.sp2};
|
|
1447
|
+
cursor: default;
|
|
1448
|
+
overflow: hidden;
|
|
1449
|
+
min-width: 0;
|
|
1450
|
+
`,U1=o(Gc)`
|
|
1451
|
+
width: ${n.sp3};
|
|
1452
|
+
height: ${n.sp3};
|
|
1453
|
+
flex-shrink: 0;
|
|
1454
|
+
`,W1=o(Zc)`
|
|
1455
|
+
width: ${n.sp3};
|
|
1456
|
+
height: ${n.sp3};
|
|
1457
|
+
flex-shrink: 0;
|
|
1458
|
+
`,H1=o(Xc)`
|
|
1459
|
+
width: ${n.sp3};
|
|
1460
|
+
height: ${n.sp3};
|
|
1461
|
+
flex-shrink: 0;
|
|
1462
|
+
`,q1=o($1)`
|
|
1463
|
+
width: ${n.sp3};
|
|
1464
|
+
height: ${n.sp3};
|
|
1465
|
+
flex-shrink: 0;
|
|
1466
|
+
`,bi=o(_i)`
|
|
1467
|
+
width: ${n.sp3};
|
|
1468
|
+
height: ${n.sp3};
|
|
1469
|
+
margin: ${n.sp1};
|
|
1470
|
+
cursor: pointer;
|
|
1471
|
+
color: ${e=>e.theme.colors.brandColorGoldDark};
|
|
1472
|
+
&:hover {
|
|
1473
|
+
color: ${e=>e.theme.colors.primary};
|
|
1474
|
+
}
|
|
1475
|
+
`,K1=o.div`
|
|
1476
|
+
margin: ${n.sp3};
|
|
1477
|
+
`,J1=o(I1)`
|
|
1478
|
+
width: ${n.sp3};
|
|
1479
|
+
height: ${n.sp3};
|
|
1480
|
+
`,Q1=o(ld)`
|
|
1481
|
+
width: ${n.sp5};
|
|
1482
|
+
height: ${n.sp5};
|
|
1483
|
+
`,G1=o(jd)`
|
|
1484
|
+
width: ${n.sp5};
|
|
1485
|
+
height: ${n.sp5};
|
|
1486
|
+
`,Z1=o(rd)`
|
|
1487
|
+
width: ${n.sp5};
|
|
1488
|
+
height: ${n.sp5};
|
|
1489
|
+
`,Y1=o($d)`
|
|
1490
|
+
width: ${n.sp5};
|
|
1491
|
+
height: ${n.sp5};
|
|
1492
|
+
`,X1=o(Qt)`
|
|
1493
|
+
width: ${n.sp3};
|
|
1494
|
+
height: ${n.sp3};
|
|
1495
|
+
path {
|
|
1496
|
+
stroke-width: 2;
|
|
1497
|
+
}
|
|
1498
|
+
`,ex=o(cd)`
|
|
1499
|
+
width: ${n.sp3};
|
|
1500
|
+
height: ${n.sp3};
|
|
1501
|
+
`,fl=o.div`
|
|
1502
|
+
display: flex;
|
|
1503
|
+
align-items: center;
|
|
1504
|
+
justify-content: center;
|
|
1505
|
+
width: ${n.sp5};
|
|
1506
|
+
margin-left: ${e=>e.isFirstColumn?n.sp2:n.sp0};
|
|
1507
|
+
height: 100%;
|
|
1508
|
+
`,tx=o.div`
|
|
1509
|
+
display: flex;
|
|
1510
|
+
align-items: center;
|
|
1511
|
+
justify-content: center;
|
|
1512
|
+
width: auto;
|
|
1513
|
+
cursor: pointer;
|
|
1514
|
+
`,nx=o(Re)`
|
|
1515
|
+
display: flex;
|
|
1516
|
+
max-width: calc(100% - ${n.sp6});
|
|
1517
|
+
flex: 1 1 auto;
|
|
1518
|
+
color: ${e=>e.theme.colors.primary};
|
|
1519
|
+
text-align: center;
|
|
1520
|
+
align-items: center;
|
|
1521
|
+
overflow: hidden;
|
|
1522
|
+
display: flex;
|
|
1523
|
+
`,fa=o.div`
|
|
1524
|
+
display: flex;
|
|
1525
|
+
`,ix=o.div`
|
|
1526
|
+
width: 100%;
|
|
1527
|
+
padding-left: 10px;
|
|
1528
|
+
margin-left: ${n.sp0};
|
|
1529
|
+
border-radius: ${n.sp1};
|
|
1530
|
+
background-color: ${e=>e.theme.colors.background};
|
|
1531
|
+
display: flex;
|
|
1532
|
+
align-items: center;
|
|
1533
|
+
flex-direction: row;
|
|
1534
|
+
`,ho=o.div`
|
|
1535
|
+
padding: ${n.sp0} ${n.sp2};
|
|
1536
|
+
border-radius: ${n.sp1};
|
|
1537
|
+
margin-left: ${n.sp0};
|
|
1538
|
+
width: 100%;
|
|
1539
|
+
background-color: ${e=>e.isQuickViewMode===!0?"transparent":e.isHovered?e.theme.colors.background:e.theme.colors.grey5};
|
|
1540
|
+
`,ya=o.div`
|
|
1541
|
+
width: 100%;
|
|
1542
|
+
border-radius: ${n.sp1};
|
|
1543
|
+
padding-left: 2px;
|
|
1544
|
+
background-color: ${e=>e.theme.colors.background};
|
|
1545
|
+
background-color: ${e=>e.isHovered?e.theme.colors.background:e.theme.colors.grey5};
|
|
1546
|
+
display: flex;
|
|
1547
|
+
align-items: center;
|
|
1548
|
+
flex-direction: row;
|
|
1549
|
+
`,ox=o(Re)``,sx=o.div`
|
|
1550
|
+
width: 100%;
|
|
1551
|
+
display: flex;
|
|
1552
|
+
padding-left: ${n.sp0};
|
|
1553
|
+
`,po=o.div`
|
|
1554
|
+
width: 100%;
|
|
1555
|
+
display: flex;
|
|
1556
|
+
flex-direction: row;
|
|
1557
|
+
align-items: center;
|
|
1558
|
+
gap: ${n.sp2};
|
|
1559
|
+
padding: ${n.sp2};
|
|
1560
|
+
padding-left: ${n.sp2};
|
|
1561
|
+
border-radius: ${n.sp1};
|
|
1562
|
+
background-color: ${e=>e.isQuickViewMode===!0?"transparent":e.isHovered?e.theme.colors.background:e.theme.colors.grey5};
|
|
1563
|
+
outline: ${e=>e.showOutline?`1px dashed ${e.theme.colors.grey1}`:"none"};
|
|
1564
|
+
outline-color: ${e=>e.isHovered&&e.theme.colors.primary};
|
|
1565
|
+
`,wa=o.div``,mo=o.div`
|
|
1566
|
+
display: flex;
|
|
1567
|
+
align-items: center;
|
|
1568
|
+
width: calc(100% - ${n.sp5});
|
|
1569
|
+
`,ax=o.div`
|
|
1570
|
+
display: flex;
|
|
1571
|
+
align-items: center;
|
|
1572
|
+
justify-content: center;
|
|
1573
|
+
cursor: pointer;
|
|
1574
|
+
visibility: hidden;
|
|
1575
|
+
flex-shrink: 0;
|
|
1576
|
+
margin-left: ${n.sp3};
|
|
1577
|
+
`,rx=o(ml)`
|
|
1578
|
+
width: ${n.sp3};
|
|
1579
|
+
height: ${n.sp3};
|
|
1580
|
+
`,lx=o.div`
|
|
1581
|
+
display: flex;
|
|
1582
|
+
align-items: center;
|
|
1583
|
+
justify-content: center;
|
|
1584
|
+
width: 100%;
|
|
1585
|
+
gap: ${n.sp5};
|
|
1586
|
+
`,cx=o(vr)`
|
|
1587
|
+
width: ${n.sp3};
|
|
1588
|
+
height: ${n.sp3};
|
|
1589
|
+
cursor: pointer;
|
|
1590
|
+
`,dx=o(T1)`
|
|
1591
|
+
width: ${n.sp3};
|
|
1592
|
+
height: ${n.sp3};
|
|
1593
|
+
cursor: pointer;
|
|
1594
|
+
`,ux=o(Yc)`
|
|
1595
|
+
width: ${n.sp3};
|
|
1596
|
+
height: ${n.sp3};
|
|
1597
|
+
cursor: pointer;
|
|
1598
|
+
`,hx=({sortConfig:e,fetchState:i,isDisabled:l,isTransactionActivityEnabled:r,onColumnSortConfigChanged:h})=>{const d=be();return t.jsxs(px,{windowSize:d,children:[t.jsx(hl,{isTransactionActivityEnabled:r,sortConfig:e,isDisabled:i==="In-Progress"?"readonly":l,onColumnSortConfigChanged:h,"data-testid":O("transaction-categorization-list-empty-table-header")}),t.jsx(mx,{windowSize:d,"data-testid":O("transaction-categorization-list-empty-rows-container"),children:[...Array(3)].map((a,c)=>t.jsx(gl,{isTransactionActivityEnabled:r,"data-testid":O("transaction-categorization-list-empty-row",c.toString())},c))})]})},px=o.div`
|
|
1599
|
+
display: block;
|
|
1600
|
+
min-height: 100%;
|
|
1601
|
+
flex-direction: column;
|
|
1602
|
+
width: 100%;
|
|
1603
|
+
box-sizing: border-box;
|
|
1604
|
+
overflow-x: auto;
|
|
1605
|
+
padding-left: ${n.sp8};
|
|
1606
|
+
padding-right: ${n.sp8};
|
|
1607
|
+
`,mx=o.div`
|
|
1608
|
+
display: flex;
|
|
1609
|
+
flex: 1;
|
|
1610
|
+
min-height: 100%;
|
|
1611
|
+
flex-direction: column;
|
|
1612
|
+
row-gap: ${n.sp3};
|
|
1613
|
+
`,{common:gx,transactionDetail:{notCategorizedTooltipText:xx}}=me.getLocalizedStrings(),go={rowGap:new G(f[0],f[2],f[3])},fx=({selectedTab:e,transactionView:i,authParams:l,sectionId:r,isCOTEnabled:h,isDisabled:d,vendorSearchAutoCompleteActions:a,isTransactionActivityEnabled:c,vendorSearchAutoCompleteData:u,setCurrentTransactionInAction:m,vendorLoadOptions:p,onTransactionCategorizationRowClick:g,onUpdateTransactionCategorizationUIState:x,onUpdateScrollYOffSetTransactionCategorizationUIState:y,onFetchTransactionCategorizationList:C,containerRef:v,cotTracking:I,isUncategorizedExpenseCategoryEnabled:k,setActivityLogTransactionId:T,onUploadTransactionReceipt:$})=>{const w=be(),S=Xe(),[j,b]=s.useState(void 0),{fetchState:z,uiState:A,transactionLocalData:M,selectedCheckBoxTransactionIds:_,transactionIdsWithUnsavedData:W,transactions:H,uncategorizedAccounts:L}=i;Qn({componentName:`expense_automation.transaction_categorization.${e}`,enabled:z==="Completed"});const P=s.useRef(null),ae=s.useRef({}),{control:V}=Jo();s.useEffect(()=>{P.current?.resetAfterIndex(0,!0)},[w,P,M]),s.useEffect(()=>{P.current?.scrollTo(A.scrollPosition?.scrollTop??0)},[e]);const B=s.useCallback(F=>{if(ae.current?.[F]!=null){const X=w==="small"&&A.pageToken==null&&F===M.length-1?go.rowGap.value("medium-regular"):go.rowGap.value(w);return ae.current[F]+X}if(M[F]==null)return 0;const oe=M[F].transactionReviewLocalData,ee=Object.keys(oe.lineItemById).length;return ee!=null&&!isNaN(ee)&&ee>1?ha*ee+go.rowGap.value(w)*(ee-1):ha},[M,w,A.pageToken,A.sortKey,A.sortOrder]),Q=s.useCallback((F,oe)=>{ae.current={...ae.current,[F]:oe},P.current?.resetAfterIndex(0,!0)},[w,P,M,A.sortKey,A.sortOrder]),de=s.useCallback(()=>{(A.pageToken!=null&&i.refreshStatus.fetchState!=="In-Progress"||i.refreshStatus.fetchState==="Completed")&&C(e,A.searchString,!0,A.pageToken,!0,!1)},[i.refreshStatus.fetchState,C,e,A.pageToken,A.searchString,A.sortKey,A.sortOrder]),le=s.useCallback(()=>{A.pageToken!=null&&de()},[de,A.pageToken,A.sortKey,A.sortOrder]),ge=Ac(F=>y(e,{scrollPosition:{scrollTop:F}}),1e3,{trailing:!0}),te=F=>F<i.transactionLocalData.length,K=(F,oe)=>{x(e,{sortOrder:oe,sortKey:F}),C(e,A.searchString,!1,null,!1,!0)},Z=F=>{if(e==="autoCategorized")return!_.includes(F);const oe=M.find(X=>X.transactionId===F)?.transactionReviewLocalData,ee=H.find(X=>X.id===F);return ee!=null&&oe!=null?bd(ee,oe,L,k)?k===!0&&vs(L,oe.lineItemById,["expense"])?W.includes(F)===!1:!1:!0:_.length===0?!0:!_.includes(F)};let D=[],R=[];(z==="Completed"||i.transactionLocalData.length>0)&&(R=i.transactionLocalData.map((F,oe)=>{const ee=Z(F.transactionId);let X=!1;k===!0&&ee===!0&&e==="review"&&vs(L,F.transactionReviewLocalData.lineItemById,["expense"])&&(X=!W.includes(F.transactionId));const ke=F.transactionReviewLocalData;return{label:t.jsx(M1,{isTransactionActivityEnabled:c,transactionView:i,sectionId:`${r}.${oe}.${pl}`,transaction:F,authParams:l,onTransactionCategorizationRowClick:g,vendorLoadOptions:p,setCurrentTransactionInAction:m,vendorSearchAutoCompleteActions:a,vendorSearchAutoCompleteData:u,selectedTab:e,containerRef:v,listContainerRef:P,isCOTEnabled:h,cotTracking:I,openTooltipId:j,setOpenTooltipId:b,isUncategorizedExpenseCategoryEnabled:k,setActivityLogTransactionId:T,onUploadTransactionReceipt:$},`${F.transactionId}.${ke.transactionType}`),value:F.transactionId,defaultChecked:!1,groupLabel:!1,isException:X,exceptionMode:X===!0?"checked_or_hover":void 0,isSticky:!0,isDisabled:ee===!0?"readonly":void 0,exceptionType:X===!0?"alert":void 0,exceptionInfo:X===!0?xx:void 0,exceptionTooltipStyle:{textAlign:"center",maxWidth:"250px",padding:`12px ${n.sp2}`}}}),D=R.map(F=>F.value));const J={label:"All",value:"allTransactionOptionId",defaultChecked:!1,groupLabel:!1},{title:N,subTitle:Y}=He("transaction_categorization").allDoneText,ne=M.map(F=>F.transactionId),q=s.useMemo(()=>i.totalCountByTab[e],[e,i.totalCountByTab]),U=s.useMemo(()=>M.reduce((F,oe)=>{const ee=Object.keys(oe.transactionReviewLocalData.lineItemById).length;return F+(ee>0?ee:1)},0)<i.totalCountByTab[e]?M.length+1:M.length,[M,i.totalCountByTab,e]);return t.jsx(vx,{windowSize:w,"data-testid":O("transaction-categorization-list-wrapper"),children:t.jsx(Sx,{windowSize:w,"data-testid":O("transaction-categorization-list-container"),children:z==="Error"?t.jsxs(jx,{windowSize:w,"data-testid":O("transaction-categorization-reload-page"),children:[t.jsx($x,{onClick:()=>C(e,void 0,!0,null,!1,!0),"data-testid":O("transaction-categorization-reload-icon"),children:t.jsx(Uo,{})}),t.jsx(Ix,{"data-testid":O("transaction-categorization-reload-label"),children:gx.reloadPage.label})]}):z==="Completed"&&M.length===0?t.jsx(It,{tab:"transaction_categorization",title:N,subTitle:Y,"data-testid":O("transaction-categorization-empty-table-section")}):z==="Not-Started"||z==="In-Progress"&&M.length===0?t.jsx(hx,{sortConfig:{sortKey:A.sortKey,sortOrder:A.sortOrder},fetchState:z,onColumnSortConfigChanged:K,"data-testid":O("transaction-categorization-list-empty-table"),isTransactionActivityEnabled:c}):t.jsx(kx,{windowSize:w,"data-testid":O("transaction-categorization-list-view"),children:t.jsx(Cr,{control:V,name:"selectedTransactionIds",defaultValue:[],render:({field:{value:F,ref:oe,onChange:ee}})=>t.jsx(yl.Provider,{value:{value:F,mode:"off",allCheckBoxValues:D,index:0,isQuickViewMode:S,sortKey:A.sortKey,sortOrder:A.sortOrder,fetchState:z,isDisabled:d,groupLabelCheckBox:J,isTransactionActivityEnabled:c,onColumnSortConfigChanged:K,ref:oe,onChange:ee,selectedTab:e},children:t.jsx(Kn,{children:({height:X,width:ke})=>t.jsx(or,{isItemLoaded:te,itemCount:q,loadMoreItems:le,children:({onItemsRendered:Ie,ref:E})=>t.jsx(Bi,{ref:ce=>{E(ce),P.current=ce},height:X,itemCount:U,itemKey:ce=>`${M[ce]?.transactionId??""}-row-${ce}`,innerElementType:yx,onItemsRendered:Ie,width:ke,style:{willChange:"auto"},overscanCount:qg,itemSize:B,itemData:{checkboxes:R,value:F,allCheckBoxValues:D,groupLabelCheckBox:J,categorizationGroupValue:ne,transactionLocalData:M,isQuickViewMode:S,mode:"always_on",setRowHeight:Q,isItemLoaded:te,ref:E,onChange:ee,selectedCheckBoxTransactionIds:_,isTransactionActivityEnabled:c},initialScrollOffset:i.uiState.scrollPosition?.scrollTop,onScroll:({scrollOffset:ce})=>{ge(ce)},children:Cx})})})})})})})})},yx=e=>{const{isQuickViewMode:i,value:l,allCheckBoxValues:r,groupLabelCheckBox:h,index:d,isDisabled:a,fetchState:c,sortKey:u,sortOrder:m,mode:p,isTransactionActivityEnabled:g,ref:x,onChange:y,onColumnSortConfigChanged:C}=wx(),v=Tt(),{children:I,style:k,...T}=e;return c==="Completed"?t.jsxs(Tx,{ref:x,style:{...k,width:"auto",maxWidth:"var(--side-panel-list-width, 100%)"},...T,children:[t.jsx(Lx,{children:t.jsx(Do,{selectionLimit:Hn,value:l,checkBoxContainerStyle:{width:"auto",backgroundColor:v.colors.grey4},checkBox:{label:t.jsx(bx,{isQuickViewMode:i,children:t.jsx(hl,{isTransactionActivityEnabled:g,sortConfig:{sortKey:u,sortOrder:m},isDisabled:a,onColumnSortConfigChanged:C})}),value:"allTransactionOptionId",defaultChecked:!1,groupLabel:!1},isDisabled:"disabled",groupLabelCheckBox:h,allCheckBoxValues:r,mode:i?"off":p,draggable:!1,checkBoxStyle:i?{display:"none"}:{padding:20},labelCheckBoxStyle:{padding:n.sp3},name:"transactionCategorizationHeader",index:d,onChangeHandler:$=>Tr({event:$,value:l,allCheckBoxValues:r,groupLabelCheckBox:h,onChange:y}),ref:x})}),t.jsx(Ax,{children:I})]},`${r[d]}-${d}`):null},yl=s.createContext(void 0),wx=()=>{const e=s.useContext(yl);if(!e)throw new Error("useStickyContext must be used within a StickyProvider");return e},Cx=({index:e,style:i,data:l})=>{const{selectedTransactionId:r}=Fi(),{checkboxes:h,value:d,groupLabelCheckBox:a,categorizationGroupValue:c,allCheckBoxValues:u,transactionLocalData:m,isQuickViewMode:p,isItemLoaded:g,setRowHeight:x,ref:y,onChange:C,selectedCheckBoxTransactionIds:v,isTransactionActivityEnabled:I}=l,k=s.useRef(null),T=be();if(s.useEffect(()=>{k.current?.firstElementChild!=null&&x(e,k.current.firstElementChild.clientHeight)},[e,k,T,m[e]?.transactionReviewLocalData]),g(e)===!0){const $=h[e],w=r!=null&&r===c[e];return t.jsx(Ca,{isPanelSelected:w,isQuickViewMode:p,style:{...i,paddingBottom:n.sp0,width:"100%",flex:"1"},ref:k,children:t.jsx(Do,{selectionLimit:Hn,checkBox:p===!0?{...$,isException:!1}:$,value:d,groupLabelCheckBox:a,allCheckBoxValues:u,mode:p===!0||$.isDisabled==="readonly"||v.includes($.value)===!1&&v.length>=Hn?"off":"always_on",draggable:!1,isDisabled:$.isDisabled,checkBoxStyle:p===!0?{display:"none"}:{padding:20},labelCheckBoxStyle:{padding:n.sp3},infoIconContainerStyle:p===!0?{display:"none"}:{padding:20},name:`${mn}.${d}`,ref:y,index:e,onChangeHandler:S=>Tr({event:S,value:d,allCheckBoxValues:u,groupLabelCheckBox:a,onChange:C})})},c[e])}else return t.jsx(Ca,{isQuickViewMode:p,style:{...i,paddingBottom:n.sp0,width:"100%",flex:"1"},ref:k,children:t.jsx(Do,{checkBox:{label:t.jsx(gl,{isTransactionActivityEnabled:I}),value:"loading",defaultChecked:!1,groupLabel:!1},value:d,groupLabelCheckBox:a,allCheckBoxValues:u,mode:"off",draggable:!1,checkBoxStyle:p===!0?{display:"none"}:{padding:20},labelCheckBoxStyle:{padding:n.sp3},infoIconContainerStyle:p===!0?{display:"none"}:{padding:20},name:"loading-placeholder",index:e,onChangeHandler:()=>{}})},hr())},bx=o.div`
|
|
1614
|
+
flex: 1;
|
|
1615
|
+
width: auto;
|
|
1616
|
+
padding-left: ${({isQuickViewMode:e})=>e===!0?n.sp8:n.sp0};
|
|
1617
|
+
padding-right: ${({isQuickViewMode:e})=>e===!0?n.sp0:n.sp8};
|
|
1618
|
+
`,vx=o.div`
|
|
1619
|
+
width: 100%;
|
|
1620
|
+
height: 100%;
|
|
1621
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
1622
|
+
`,Sx=o.div`
|
|
1623
|
+
height: 100%;
|
|
1624
|
+
`,kx=o.div`
|
|
1625
|
+
height: 100%;
|
|
1626
|
+
display: flex;
|
|
1627
|
+
flex-direction: column;
|
|
1628
|
+
max-width: 99.9%;
|
|
1629
|
+
`,jx=o.div`
|
|
1630
|
+
display: flex;
|
|
1631
|
+
width: 100%;
|
|
1632
|
+
height: ${e=>`calc(100% - ${wr.valuePx(e.windowSize)})`};
|
|
1633
|
+
flex-direction: column;
|
|
1634
|
+
justify-content: center;
|
|
1635
|
+
align-items: center;
|
|
1636
|
+
`,$x=o.div`
|
|
1637
|
+
height: 96px;
|
|
1638
|
+
width: 96px;
|
|
1639
|
+
background: ${e=>e.theme.colors.background};
|
|
1640
|
+
border-radius: 50%;
|
|
1641
|
+
cursor: pointer;
|
|
1642
|
+
& svg {
|
|
1643
|
+
margin: ${n.sp5};
|
|
1644
|
+
color: ${e=>e.theme.colors.grey1};
|
|
1645
|
+
}
|
|
1646
|
+
&:hover {
|
|
1647
|
+
& svg {
|
|
1648
|
+
color: ${e=>e.theme.colors.primary};
|
|
1649
|
+
}
|
|
1650
|
+
}
|
|
1651
|
+
`,Ix=o(st)`
|
|
1652
|
+
margin-top: ${n.sp3};
|
|
1653
|
+
color: ${e=>e.theme.colors.hero};
|
|
1654
|
+
`,Ca=o.div`
|
|
1655
|
+
top: ${n.sp0};
|
|
1656
|
+
left: ${n.sp0};
|
|
1657
|
+
padding-bottom: ${n.sp3};
|
|
1658
|
+
padding-left: ${({isQuickViewMode:e})=>e===!0?n.sp8:n.sp0};
|
|
1659
|
+
padding-right: ${({isQuickViewMode:e})=>e===!0?n.sp0:n.sp8};
|
|
1660
|
+
box-sizing: border-box;
|
|
1661
|
+
${e=>e.isPanelSelected===!0&&re`
|
|
1662
|
+
.categorization-row-card {
|
|
1663
|
+
${Yo(e.theme)}
|
|
1664
|
+
}
|
|
1665
|
+
`}
|
|
1666
|
+
`,Tx=o.div`
|
|
1667
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
1668
|
+
`,Lx=o.div`
|
|
1669
|
+
top: 0;
|
|
1670
|
+
left: 0;
|
|
1671
|
+
width: 100%;
|
|
1672
|
+
min-width: 100%;
|
|
1673
|
+
z-index: 11;
|
|
1674
|
+
display: flex;
|
|
1675
|
+
align-items: center;
|
|
1676
|
+
position: sticky;
|
|
1677
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
1678
|
+
`,Ax=o.div`
|
|
1679
|
+
position: relative;
|
|
1680
|
+
width: auto;
|
|
1681
|
+
height: 100%;
|
|
1682
|
+
`,Rx=({selectedTab:e,transactionView:i,authParams:l,sectionId:r,vendorSearchAutoCompleteData:h,vendorSearchAutoCompleteActions:d,isCOTEnabled:a,isTransactionActivityEnabled:c,setCurrentFooterFormId:u,setLocalDataForCategoryAndClass:m,onTransactionCategorizationRowClick:p,onUpdateTransactionCategorizationUIState:g,onUpdateScrollYOffSetTransactionCategorizationUIState:x,onFetchTransactionCategorizationList:y,onSaveUpdateTransactionCategorization:C,onUpdateSelectedCheckboxTransactionIds:v,onFetchRecommendationsForEntityCategorization:I,onFetchRecommendationsForEntityCategorizationWithCustomer:k,setActivityLogTransactionId:T,onUploadTransactionReceipt:$})=>{const[w,S]=s.useState({transactionId:void 0,lineItemId:void 0}),j=s.useRef(),b=s.useRef({}),{useDynamicConfig:z}=mr(),{configValue:A}=z(gr.enableUncategorizedExpenseCategory),M=A?.uncategorized_expense_category_enabled===!0,_=(Z,D,R,J)=>{const N={...b.current};N[D]==null&&(N[D]=[]);let Y=N[D].findIndex(ne=>ne.lineId===Z);if(Y===-1){const ne={lineId:Z,category:{recommendationTypesViewed:[]},class:{recommendationTypesViewed:[]},vendor:{recommendationTypesViewed:[]}};N[D].push(ne),Y=N[D].length-1}else{const ne=N[D][Y];N[D][Y]={...ne,category:{...ne.category,recommendationTypesViewed:[...ne.category.recommendationTypesViewed]},class:{...ne.class,recommendationTypesViewed:[...ne.class.recommendationTypesViewed]},vendor:{...ne.vendor,recommendationTypesViewed:[...ne.vendor.recommendationTypesViewed]}}}J!=null&&J!==""&&!N[D][Y][R].recommendationTypesViewed.includes(J)&&N[D][Y][R].recommendationTypesViewed.push(J),b.current=N},{transactions:W,transactionLocalData:H,accountsHierarchyList:L,classHierarchyList:P,accountList:ae,classList:V,selectedCheckBoxTransactionIds:B,uncategorizedAccounts:Q}=i,de=xn({mode:"all",reValidateMode:"onChange",defaultValues:s.useMemo(()=>va(B,H,L,P,h.entityAutoCompleteView),[L,P,B,H,h.entityAutoCompleteView]),values:s.useMemo(()=>va(B,H,L,P,h.entityAutoCompleteView),[L,P,B,H,h.entityAutoCompleteView]),resetOptions:{keepDefaultValues:!0,keepDirty:!1}});s.useEffect(()=>()=>{u("expenseAutomationPage")},[]),s.useEffect(()=>{B.length>0?u(ro):u("expenseAutomationPage")},[B,u]);const le=de.handleSubmit(Z=>{const D=Z[Di],R=b.current;C(e,D,R),D.forEach(J=>{delete b.current[J]})}),ge=async(Z,D)=>{if(Z!=null){if(Z===Di){const R=de.getValues(Di);if(R.length<B.length){v(e,R);return}if(R.length===Hn){v(e,R);return}const J=R[R.length-1],N=D[mn].findIndex(ne=>ne.transactionId===J),Y=de.getValues(`${mn}.${N}.lineInfo`);if(Y!=null){let ne=!1;if(Y.every(q=>(ne=Vn(Q,q[ze].selectedOption,M?["income"]:void 0),!!q[ze].selectedOption&&q[ze].selectedOption!=null&&!ne&&!!q[ut].selectedOption&&!!q[jt].selectedOption))===!0){v(e,R);return}else{const q=R.filter(U=>U!==J);v(e,q);return}}return}if(Z.includes(ze)===!0||Z.includes(ut)===!0){const R=parseInt(Z.split(".")[1]),J=parseInt(Z.split(".")[3]),N=de.getValues(`${mn}.${R}.lineInfo`),Y=N[J];if(Z.includes(ze)||Z.includes(ut)){const{transactionId:ne,lineId:q,recommendations:U}=Y;if(N!=null){const F=Y[ze].selectedOption,oe=Y[ut].selectedOption,ee=Y[jt].selectedOption,X=Y[jt].selectedOption,ke=Y[jt].defaultOptions,Ie=ke?.find(fe=>fe.options?.find(Be=>Be.value===ee))?.options?.find(fe=>fe.value===ee)?.label,E=ke?.find(fe=>fe.options?.find(Be=>Be.value===X))?.options?.find(fe=>fe.value===X)?.label,ce=h.entityAutoCompleteView.vendor.find(fe=>fe.qboId===ee),je=h.entityAutoCompleteView.customer.find(fe=>fe.qboId===X),Me=U.find(fe=>fe.vendor?.qboId===ee)?.vendor,De=ee||ce?.qboId||Me?.qboId?{id:ee??ce?.qboId??Me?.qboId??"",name:Ie??ce?.name??Me?.name??"",logo:ce?.logo??Me?.logo}:void 0,Fe=X||je?.qboId?{id:X??je?.qboId??"",name:E??je?.name??"",logo:je?.logo}:void 0,ve=ae.find(fe=>fe.qboId===F),et=V.find(fe=>fe.classId===oe),ht=i.transactionLocalData.find(fe=>fe.transactionId===ne)?.transactionReviewLocalData.lineItemById[q].account,tt=i.transactionLocalData.find(fe=>fe.transactionId===ne)?.transactionReviewLocalData.lineItemById[q].class;m(e,ne,q,W,De?.id,Fe?.id,Z.includes(ze)&&ve!=null?{...ve,isPreFilled:!1}:ht,Z.includes(ut)&&et!=null?{...et,isPreFilled:!1}:tt,void 0,U,M)}return}}if(Z.includes(jt)){const R=parseInt(Z.split(".")[1]),J=parseInt(Z.split(".")[3]),N=de.getValues(`${mn}.${R}.lineInfo`);if(N!=null){const Y=N[J],{transactionId:ne,recommendations:q}=Y,U=Y[jt].selectedOption,F=Y[jt].selectedOption,oe=Y[jt].defaultOptions,ee=oe?.flatMap(ve=>ve.options)?.find(ve=>ve.value===U)?.label,X=oe?.flatMap(ve=>ve.options)?.find(ve=>ve.value===F)?.label,ke=h.entityAutoCompleteView.vendor.find(ve=>ve.qboId===U),Ie=h.entityAutoCompleteView.customer.find(ve=>ve.qboId===F),E=q.find(ve=>ve.vendor?.qboId===U)?.vendor,ce=U!==""&&U!=null?U:ee!==""&&ee!=null?ee:"",je=(ke?.qboId!=null&&ke.qboId!==""?ke.qboId:null)??(E?.qboId!=null&&E.qboId!==""?E.qboId:null)??(U!=null&&U!==""?U:null),Me={id:je??ee??"",name:ee??ke?.name??E?.name??"",logo:ke?.logo??E?.logo},De=Ie?.qboId!=null&&Ie.qboId!==""?{id:Ie.qboId??F??"",name:X??Ie.name??"",logo:Ie.logo}:void 0,Fe=W.find(ve=>ve.id===ne);if(Fe!=null){const ve=i.transactionLocalData.find(Be=>Be.transactionId===Fe.id)?.transactionReviewLocalData,et=ve?.lineItemById[Y.lineId],ht=ln(Fe)===!0?ve?.selectedEntity:et?.selectedEntityLine,tt=De?.id!=null&&De.id!==""?{id:De.id,name:De.name,type:"customer",qboId:De.id,zeniId:De.id,logo:De.logo}:Me.id!==""&&Me.id!=null?{id:ce,name:ee??ce,type:"vendor",qboId:ce,zeniId:ce,logo:Me.logo,isPreFilled:ht?.id===je&&ht?.isPreFilled}:void 0,fe={transactionId:{id:Fe.id,type:Fe.type},transaction:Fe,lineIds:Fe.type!=="journal_entry"?Fe.lines?.map(Be=>Be.id)??[]:[Y.lineId]};tt?.type==="customer"?k(Y.amount.amount,fe,!1,e,tt,De,M):I(Y.amount.amount,fe,!1,e,tt,Me,M)}}d.onCancelAutoComplete?.();return}}};s.useEffect(()=>{const Z=de.watch((D,{name:R})=>{R!=null&&D!=null&&Gn(()=>ge(R,D))});return()=>{Z.unsubscribe()}}),s.useEffect(()=>{if(h.entityAutoCompleteView.fetchState==="Completed"){const Z=i.transactionLocalData.find(D=>D.transactionId===w.transactionId);if(Z){const{transactionReviewLocalData:D}=Z,{selectedEntity:R}=D,J=w?.lineItemId??D.sortedLineItems[0],N=D.lineItemById[J],Y=N.selectedEntityLine;j.current?.(Ho(h.entityAutoCompleteView,R??Y,N?.recommendationsWithCOT??[]))}S({transactionId:void 0,lineItemId:void 0})}},[h.entityAutoCompleteView.fetchState]);const te=(Z,D)=>{d.onAutoCompleteInputChange?.(Z),j.current=D},K=s.useRef(null);return t.jsx(Dx,{ref:K,"data-testid":O("transaction-categorization-list-page"),children:t.jsx(fn,{...de,children:t.jsx("form",{id:ba(ro),onSubmit:le,style:{height:"100%",width:"100%"},"data-testid":O(ba(ro)),children:t.jsx(fx,{isTransactionActivityEnabled:c,selectedTab:e,sectionId:r,transactionView:i,authParams:l,setCurrentTransactionInAction:S,onUpdateTransactionCategorizationUIState:g,onUpdateScrollYOffSetTransactionCategorizationUIState:x,onFetchTransactionCategorizationList:y,onTransactionCategorizationRowClick:p,vendorLoadOptions:te,vendorSearchAutoCompleteData:h,vendorSearchAutoCompleteActions:d,containerRef:K,isCOTEnabled:a,cotTracking:{onCOTView:_},isUncategorizedExpenseCategoryEnabled:M,setActivityLogTransactionId:T,onUploadTransactionReceipt:$})})})})},ba=e=>`${e}_form`,va=(e,i,l,r,h)=>({[mn]:i.map(d=>Ex(d.transactionId,d.transactionReviewLocalData,l,r,h)),[Di]:e}),Ex=(e,i,l,r,h)=>{const{lineItemById:d,sortedLineItems:a,selectedEntity:c}=i,u=Object.values(d).sort((p,g)=>a.indexOf(p.lineId)-a.indexOf(g.lineId)),m=u[0]?.lineId;return{[pl]:u.map(p=>{const g=p.account?.qboId??p.account?.accountId,x=p.class?.classId,y=p.selectedEntityLine;return{id:p.id,transactionId:p.transactionId,type:p.type,amount:p.amount,lineDetailType:p.lineDetailType,platformLineDetailType:p.platformLineDetailType,lineTransactionType:p.lineTransactionType,postingType:p.postingType,postingTypeName:p.postingTypeName,customer:p.customer,vendor:p.vendor,billable:p.billable,item:p.item,isCategoryMiscategorized:p.isCategoryMiscategorized,isClassMiscategorized:p.isClassMiscategorized,lineId:p.id,[ze]:{selectedOption:g,allOptions:Ir(l,p.recommendationsWithCOT)},[ut]:{selectedOption:x,allOptions:$r(r,p.recommendationsWithCOT)},[jt]:{selectedOption:c?.id??y?.id??c?.name??y?.name,defaultOptions:Ho(h,c??y,i.lineItemById[m]?.recommendationsWithCOT??[])},[v1]:p.lineEntity,[S1]:p.recommendationsWithCOT??[]}}),transactionId:e,[k1]:i.vendorDetails!=null&&i.vendorDetails.id!=null?{id:i.vendorDetails.id,qboId:i.vendorDetails.qboId,name:i.vendorDetails.name}:void 0,[j1]:i.customerDetails!=null&&i.customerDetails.id!=null?{id:i.customerDetails.id,qboId:i.customerDetails.qboId,name:i.customerDetails.name}:void 0}},Dx=o.div`
|
|
1683
|
+
display: flex;
|
|
1684
|
+
min-height: 100%;
|
|
1685
|
+
width: 100%;
|
|
1686
|
+
height: 100%;
|
|
1687
|
+
flex-direction: column;
|
|
1688
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
1689
|
+
z-index: 2;
|
|
1690
|
+
`,Sa={subSectionContainerLeftRightPadding:new G(f[3],f[6],f[8])},Mx=o.div`
|
|
1691
|
+
width: 100%;
|
|
1692
|
+
display: flex;
|
|
1693
|
+
justify-content: center;
|
|
1694
|
+
align-items: center;
|
|
1695
|
+
flex: 1;
|
|
1696
|
+
background: ${e=>e.theme.colors.grey4};
|
|
1697
|
+
box-sizing: border-box;
|
|
1698
|
+
`,Ox=o.div`
|
|
1699
|
+
display: flex;
|
|
1700
|
+
flex-direction: column;
|
|
1701
|
+
width: 100%;
|
|
1702
|
+
`,Px=e=>{const{currentFooterFormId:i,onJeAccountSettingsChange:l,onSaveJeAccountSettingsClick:r,setResetJeAccountSettingsForm:h,expenseAutomationViewSelector:d,isTransactionActivityEnabled:a,authParams:c,receiptUploadEndpoint:u,companyId:m,vendorSearchAutoCompleteActions:p,vendorSearchAutoCompleteData:g,enableMonthEndInsightsZeniGPTFeature:x,monthEndInsightsPreviewMode:y,monthEndInsightsCustomerRequestData:C,allThreadsSectionOpen:v,loggedInUser:I,isCOTEnabled:k,setCurrentFooterFormId:T,onFetchRecommendationsForEntityCategorization:$,onFetchRecommendationsForEntityCategorizationWithCustomer:w,onTransactionCategorizationRowClick:S,onFetchMissingReceiptsList:j,onMissingReceiptsRowClick:b,onUploadReceiptAttachment:z,onUploadReceiptComplete:A,onUploadReceiptFetchStatus:M,onReconTabColumnSortConfigChanged:_,onReloadReconciliationListPage:W,onUpdateReconcileTabLocalData:H,onUpdateMissingReceiptsUIState:L,onFetchTransactionCategorizationList:P,onUpdateTransactionCategorizationUIState:ae,onUpdateScrollYOffSetTransactionCategorizationUIState:V,handleJeScheduleClick:B,ignoreRecommendedJeSchedule:Q,onJESchedulesFormDataChange:de,onPostJESchedule:le,setLocalDataForCategoryAndClass:ge,resetTransactionCategorizationLocalData:te,updateSelectedVendorForTransaction:K,onSaveUpdateTransactionCategorization:Z,onUpdateSelectedCheckboxTransactionIds:D,improveMonthEndInsightsUsingZeniGPTClick:R,onRemoveFileAttachment:J,onUpdateFileAttachment:N,onCloseAllThreadsSection:Y,onEditMonthEndInsightsClick:ne,previewMonthEndReport:q,saveMonthEndReport:U,onOpenFileAttachmentSnackBar:F,onCloseFileAttachmentSnackBar:oe,onClickCustomerRequest:ee,sendMonthEndReport:X,markAsReview:ke,onReloadPage:Ie,updateOperatingExpensesIdsForReview:E,onFetchReimbursementView:ce,updateSectionIdsForReview:je,onUpdateFluxAnalysisUIState:Me,fetchFluxViewOnScroll:De,onFetchFluxViewList:Fe,setIsJeAccountSettingsOpened:ve,onReviewClicked:et,setOpenDrawerClicked:ht,onEstablishConnectionClick:tt,onFetchLinkTokenClick:fe,updateReconReviewTabLocalData:Be,onReconReviewTabColumnSortConfigChanged:Vt,onSaveReconciliation:nt,onSaveReconciliationReview:pt,onReconMatchedTransactionClick:Lt,onAddStatementClick:Ee,redirectToVendorDetailPage:$e,setActivityLogTransactionId:Ke}=e,{currentSelectedView:ye,missingReceipts:_e,transactionView:wt,selectedPeriod:yn,monthEndInsights:Qe,selectedTransactionCategorizationTab:wn,reconciliation:Cn}=d;switch(ye){case"transaction_categorization":return wt.fetchState==="Completed"&&wt.transactionLocalData.length===0?t.jsx(It,{tab:ye,title:He(ye).allDoneText.title,subTitle:He(ye).allDoneText.subTitle}):t.jsx(Rx,{setCurrentFooterFormId:T,selectedPeriod:yn,selectedTab:wn,sectionId:mn,transactionView:wt,authParams:c,isTransactionActivityEnabled:a,onUpdateTransactionCategorizationUIState:ae,onUpdateScrollYOffSetTransactionCategorizationUIState:V,onFetchTransactionCategorizationList:P,onTransactionCategorizationRowClick:S,setLocalDataForCategoryAndClass:ge,resetTransactionCategorizationLocalData:te,updateSelectedVendorForTransaction:K,onSaveUpdateTransactionCategorization:Z,onUpdateSelectedCheckboxTransactionIds:D,vendorSearchAutoCompleteActions:p,vendorSearchAutoCompleteData:g,onFetchRecommendationsForEntityCategorization:$,onFetchRecommendationsForEntityCategorizationWithCustomer:w,isCOTEnabled:k,setActivityLogTransactionId:Ke,onUploadTransactionReceipt:e.onUploadTransactionReceipt});case"je_schedules":return t.jsx(Rm,{setIsJeAccountSettingsOpened:ve,expenseAutomationViewSelector:d,setResetJeAccountSettingsForm:h,currentFooterFormId:i,onJeAccountSettingsChange:l,onSaveJeAccountSettingsClick:r,setCurrentFooterFormId:T,handleJeScheduleClick:B,ignoreRecommendedJeSchedule:Q,onJESchedulesFormDataChange:de,onPostJESchedule:le,vendorSearchAutoCompleteActions:p,vendorSearchAutoCompleteData:g});case"missing_receipts":return _e.fetchState==="Completed"&&_e.transactions.length===0?t.jsx(It,{tab:ye,title:He(ye).allDoneText.title,subTitle:He(ye).allDoneText.subTitle}):t.jsx(fg,{onUpdateMissingReceiptsUIState:L,onFetchMissingReceiptsList:j,missingReceipts:_e,receiptUploadEndpoint:u,authParams:c,selectedPeriod:yn,onMissingReceiptsRowClick:b,onUploadReceiptComplete:A,onUploadReceiptFetchStatus:M,onUploadReceiptAttachment:z});case"month_end_insights":if(Qe!=null&&d.monthEndCloseChecksView.monthEndCloseChecks!=null){if(Qe.fetchState==="Not-Started"||Qe.fetchState==="In-Progress"||Qe.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||Qe.companyMonthEndReportTemplatesData.fetchState==="In-Progress")return t.jsx(Jl,{fetchState:"In-Progress"});{const Ct={application:"cockpit",companyId:m,entityId:m,tab:"expense_automation",isGlobalComment:!1,entityType:"expense_automation.monthEndEmail",companyName:Qe.companyName,url:window.location.href},{url:Zt,...Yt}=Ct,Xt={...Yt};return t.jsx(Ox,{children:t.jsx(Hg,{allThreadsSectionOpen:v,customerRequestData:C,companyId:m,enableZeniGPTFeature:x,filterMetaData:Xt,selectedPeriod:d.selectedPeriod,improveUsingZeniGPTClick:R,isZeniUser:I?.userEmail?.includes("zeni.ai")??!1,monthEndReportView:Qe,newThreadMetadata:Ct,onClickCustomerRequest:ee,onCloseAllThreadsSection:Y,onCloseFileAttachmentSnackBar:oe,onOpenFileAttachmentSnackBar:F,onRemoveFileAttachment:J,onUpdateFileAttachment:N,previewMode:y,previewMonthEndReport:q,saveMonthEndReport:U,onEditClick:ne,sendMonthEndReport:X})})}}else return null;case"flux_analysis":return d.fluxAnalysis.fetchStatus.fetchState==="Completed"&&d.fluxAnalysis.sections.generalExpense.vendors.length===0&&d.fluxAnalysis.sections.reimbursement.vendors.length===0?t.jsx(It,{tab:ye,title:He(ye).allDoneText.title,subTitle:He(ye).allDoneText.subTitle}):t.jsx(rm,{fluxAnalysis:d.fluxAnalysis,selectedPeriod:d.selectedPeriod,markAsReview:ke,onReloadPage:Ie,updateOperatingExpensesIdsForReview:E,updateSectionIdsForReview:je,onUpdateFluxAnalysisUIState:Me,setCurrentFooterFormId:T,fetchFluxViewOnScroll:De,onFetchFluxViewList:Fe,onFetchReimbursementView:ce,redirectToVendorDetailPage:$e});case"reconciliation":return t.jsx(Wp,{onReloadReconciliationListPage:W,currentFooterFormId:i,reconciliation:Cn,companyId:m,vendorSearchAutoCompleteActions:p,vendorSearchAutoCompleteData:g,onReviewClicked:et,setOpenDrawerClicked:ht,setCurrentFooterFormId:T,onReconTabColumnSortConfigChanged:_,onUpdateReconcileTabLocalData:H,onEstablishConnectionClick:tt,onFetchLinkTokenClick:fe,updateReconReviewTabLocalData:Be,onReconReviewTabColumnSortConfigChanged:Vt,onSaveReconciliation:nt,onSaveReconciliationReview:pt,onReconMatchedTransactionClick:Lt,onAddStatementClick:Ee});default:return t.jsx(It,{tab:ye,title:He(ye).allDoneText.title,subTitle:He(ye).allDoneText.subTitle})}};function wl(e){const i=be(),{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(Mx,{windowSize:i,style:{...h===!0?{paddingLeft:Sa.subSectionContainerLeftRightPadding.value(i),paddingRight:Sa.subSectionContainerLeftRightPadding.value(i)}:{paddingLeft:f[0],paddingRight:f[0]},...r===!0||l==="reconciliation"?{paddingLeft:f[0],paddingRight:f[0]}:{}},children:t.jsx(Px,{...e})})}const zx=70,Cl=50,Fx=3,Bx=["receipts"],ka=e=>Go(e,Bx),{common:{texts:{vendor:_x,amount:Vx,receipts:Nx,category:Ux,classText:Wx,date:Hx}}}=me.getLocalizedStrings(),bl={key:"vendor",value:_x,sortOrder:"ascending",width:new G(18,18)},qx={key:"category",value:Ux,sortOrder:"ascending",width:new G(18,18)},Kx={key:"class",value:Wx,sortOrder:"ascending",width:new G(18,18)},Jx={key:"date",value:Hx,sortOrder:"descending",width:new G(11,11)},Qx={key:"receipts",value:Nx,sortOrder:"descending",width:new G(6,6)},vl={key:"amount",value:Vx,sortOrder:"ascending",width:new G(10,10)},cs=[bl,qx,Kx,Jx,Qx,vl],ds=[{...bl,width:new G(65,65)},{...vl,width:new G(30,30)}],xo={sortKey:"date",sortOrder:"descending"},Sl=({sortConfig:e,isDisabled:i,onColumnSortConfigChanged:l})=>{const r=be(),h=Xe(),d=h?ds:cs,[a,c]=s.useState(()=>d.map(p=>({...p,sortOrder:p.key===e.sortKey?e.sortOrder:"ascending"})));s.useEffect(()=>{c(d.map(p=>({...p,sortOrder:p.key===e.sortKey?e.sortOrder:"ascending"})))},[e.sortKey,e.sortOrder,h,d]);const u=(p,g)=>{let x=g;e.sortKey===p&&(x=g==="ascending"?"descending":"ascending"),l(p,x)},m=p=>{ka(p.key)==null&&u(fd(p.key),p.sortOrder)};return t.jsx(Gx,{windowSize:r,isQuickViewMode:h,children:a.map((p,g)=>{const x=i!=null||ka(p.key)!=null;return t.jsxs(Zx,{sortDataValue:e.sortKey,actualDataValue:p.key,wrapperWidth:p.width,isSortDisabled:x,windowSize:r,isQuickViewMode:h,isLastItem:g===a.length-1,style:p.key==="receipts"?{justifyContent:"center"}:void 0,children:[t.jsxs(nf,{onClick:()=>x?null:m(p),isSortDisabled:x,children:[t.jsx(of,{children:p.value}),x?null:t.jsx(Xx,{sortConfig:e,headerData:p,children:t.jsx(tf,{})})]}),x?null:t.jsx(ef,{isSortDisabled:x,sortDataValue:e.sortKey,isVisible:e.sortKey===p.key&&e.sortKey!==xo.sortKey,children:t.jsx(Yx,{onClick:()=>{x||u(xo.sortKey,xo.sortOrder)},"data-testid":O("completed-tab-header-close-icon",p.key)})})]},p.key)})})},Gx=o.div`
|
|
1703
|
+
top: ${n.sp0};
|
|
1704
|
+
left: ${n.sp0};
|
|
1705
|
+
height: ${Cl}px;
|
|
1706
|
+
z-index: 2;
|
|
1707
|
+
display: flex;
|
|
1708
|
+
flex-wrap: nowrap;
|
|
1709
|
+
align-items: center;
|
|
1710
|
+
box-sizing: border-box;
|
|
1711
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
1712
|
+
position: sticky;
|
|
1713
|
+
width: 100%;
|
|
1714
|
+
justify-content: space-between;
|
|
1715
|
+
${e=>e.isQuickViewMode===!0?re`
|
|
1716
|
+
width: 32%;
|
|
1717
|
+
max-width: var(--side-panel-list-width, 100%);
|
|
1718
|
+
`:re`
|
|
1719
|
+
padding: ${n.sp0} ${n.sp3};
|
|
1720
|
+
`}
|
|
1721
|
+
`,Zx=o.div`
|
|
1722
|
+
color: ${e=>e.sortDataValue===e.actualDataValue&&!e.isSortDisabled?e.theme.colors.primary:e.theme.colors.grey1};
|
|
1723
|
+
padding-left: ${n.sp0};
|
|
1724
|
+
left: ${n.sp0};
|
|
1725
|
+
display: flex;
|
|
1726
|
+
align-items: center;
|
|
1727
|
+
gap: 6px;
|
|
1728
|
+
justify-content: ${e=>e.isLastItem?"flex-end":"flex-start"};
|
|
1729
|
+
position: static;
|
|
1730
|
+
z-index: 0;
|
|
1731
|
+
box-sizing: border-box;
|
|
1732
|
+
flex-shrink: 0;
|
|
1733
|
+
${e=>e.isQuickViewMode===!0?re`
|
|
1734
|
+
width: calc(
|
|
1735
|
+
${e.wrapperWidth.valuePercentage(e.windowSize)} -
|
|
1736
|
+
${n.sp4}
|
|
1737
|
+
);
|
|
1738
|
+
min-width: calc(
|
|
1739
|
+
${e.wrapperWidth.valuePercentage(e.windowSize)} -
|
|
1740
|
+
${n.sp4}
|
|
1741
|
+
);
|
|
1742
|
+
max-width: calc(
|
|
1743
|
+
${e.wrapperWidth.valuePercentage(e.windowSize)} -
|
|
1744
|
+
${n.sp4}
|
|
1745
|
+
);
|
|
1746
|
+
`:re`
|
|
1747
|
+
width: ${e.wrapperWidth.valuePercentage(e.windowSize)};
|
|
1748
|
+
min-width: ${e.wrapperWidth.valuePercentage(e.windowSize)};
|
|
1749
|
+
max-width: ${e.wrapperWidth.valuePercentage(e.windowSize)};
|
|
1750
|
+
`}
|
|
1751
|
+
`,Yx=o(ei)`
|
|
1752
|
+
width: ${n.sp2};
|
|
1753
|
+
height: ${n.sp2};
|
|
1754
|
+
cursor: pointer;
|
|
1755
|
+
`,Xx=o.div`
|
|
1756
|
+
display: flex;
|
|
1757
|
+
align-items: center;
|
|
1758
|
+
transform: ${e=>e.headerData.sortOrder==="descending"?"rotate(180deg)":"rotate(0deg)"};
|
|
1759
|
+
`,ef=o.div`
|
|
1760
|
+
display: ${e=>e.isVisible?"flex":"none"};
|
|
1761
|
+
align-items: center;
|
|
1762
|
+
cursor: ${e=>e.isSortDisabled===!0?"not-allowed":"pointer"};
|
|
1763
|
+
&:hover {
|
|
1764
|
+
color: ${e=>e.isSortDisabled?e.theme.colors.grey1:e.theme.colors.primary};
|
|
1765
|
+
}
|
|
1766
|
+
`,tf=o(Xn)`
|
|
1767
|
+
width: ${n.sp2};
|
|
1768
|
+
height: ${n.sp2};
|
|
1769
|
+
`,nf=o.div`
|
|
1770
|
+
display: flex;
|
|
1771
|
+
cursor: ${e=>e.isSortDisabled===!0?"not-allowed":"pointer"};
|
|
1772
|
+
gap: 6px;
|
|
1773
|
+
&:hover {
|
|
1774
|
+
color: ${e=>e.isSortDisabled?e.theme.colors.grey1:e.theme.colors.primary};
|
|
1775
|
+
}
|
|
1776
|
+
`,of=o(Ye)`
|
|
1777
|
+
display: flex;
|
|
1778
|
+
`,{dateFormat:sf,common:{strings:{underscore:kl,hyphen:jn,empty:ja}}}=me.getLocalizedStrings(),vi={containerPaddingLeftRight:new G(f[3],f[4])},af=({transaction:e,authParams:i,transactionAttachmentsEndpoint:l,onMissingReceiptsRowClick:r})=>{const h=be(),d=Xe(),a=d?ds:cs,[c,u]=s.useState(!1),[m,p]=s.useState([]),[g,x]=s.useState(null),y=e.attachments?.filter(w=>w.contentType!=null&&Sc.includes(w.contentType))??[],[C,v]=s.useState(y[0]),I=e.attachments!=null&&e.attachments.length>0,k=e.date?.format?.(sf.visual.MMMDCommaYYYYformat)??jn,T=()=>{u(!0),v(y[0]);const w=y.map(S=>S.id);Sr(l,i,{transaction_key:{transaction_id:e.id,transaction_type:e.type},attachment_ids:w}).then(S=>{p(S),S.length>0&&x(S[0])})},$=()=>{u(!1),x(null),p([]),y.length>0&&v(y[0])};return t.jsxs(jl,{windowSize:h,isQuickViewMode:d,onClick:()=>r(e.id,e.type),"data-testid":O("completed-tab-list-row",e.id),children:[a.map((w,S)=>{const j=`${e.id}${kl}${w.key}`;switch(w.key){case"vendor":default:return t.jsx(pn,{windowSize:h,wrapperWidth:w.width,isQuickViewMode:d,children:t.jsx(Ln,{windowSize:h,isLastItem:S===a.length-1,children:t.jsxs(Mi,{children:[t.jsx(ti,{photoUrl:e.vendorId!=null?e.logo?.toString()??ja:ja,styles:{width:n.sp4,height:n.sp4,borderRadius:n.sp0},placeholder:{width:f[4],height:f[4]},fallbackAvatar:t.jsx(cf,{children:t.jsx(Jt,{name:e.vendorName??e.description??jn,size:n.sp4})})}),t.jsx(qe,{text:e.vendorName??e.description??jn,itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"}})]})})},j);case"category":case"class":{const b=e.lines!=null&&e.lines.length>0&&e.lines[0]?.account!=null&&e.lines[0].account.accountName?e.lines[0].account.accountName:jn,z=e.lines!=null&&e.lines.length>0&&e.lines[0]?.class!=null&&e.lines[0].class.className?e.lines[0].class.className:jn,A=w.key==="category"?b:z;return t.jsx(pn,{windowSize:h,wrapperWidth:w.width,isQuickViewMode:d,children:t.jsx(Ln,{windowSize:h,isLastItem:S===a.length-1,children:t.jsx(Mi,{children:A!==jn?t.jsx(qe,{text:A,itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"}}):t.jsx(lf,{children:A})})})},j)}case"date":return t.jsx(pn,{windowSize:h,wrapperWidth:w.width,isQuickViewMode:d,children:t.jsx(Ln,{windowSize:h,isLastItem:S===a.length-1,children:t.jsx(Mi,{children:t.jsx(qe,{text:k,itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"}})})})},j);case"receipts":return t.jsx(pn,{windowSize:h,wrapperWidth:w.width,isQuickViewMode:d,style:{justifyContent:"center"},children:I?t.jsx(df,{onClick:b=>{b.stopPropagation(),T()}}):null},j);case"amount":{const b=it("0,0.[00]",e.amount);return t.jsx(pn,{windowSize:h,wrapperWidth:w.width,isQuickViewMode:d,children:t.jsx(Ln,{windowSize:h,isLastItem:S===a.length-1,children:t.jsx(qe,{text:e.amount!=null&&e.amount.amount<0?`-${b}`:b,itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"}})})},j)}}}),c&&y.length>0?Pi.createPortal(t.jsx(xr,{allFiles:m,fileSource:g,file:C,title:C.fileName,attachments:y,setFileSource:x,setShowFullScreenView:u,onCrossClick:$,setSelectedFileAttachment:v,handleTouchStart:()=>{},handleTouchMove:()=>{},handleTouchEnd:()=>{}}),document.body):null]})},rf=()=>{const e=be(),i=Xe(),l=i?ds:cs,r=s.useRef(null),[h,d]=s.useState(0);return s.useLayoutEffect(()=>{r.current&&d(r.current.offsetWidth)},[e]),t.jsx(jl,{windowSize:e,isQuickViewMode:i,ref:r,children:l.map((a,c)=>{const u=`${c}${kl}${a.key}`;switch(a.key){case"vendor":return t.jsx(pn,{windowSize:e,wrapperWidth:a.width,isQuickViewMode:i,children:t.jsx(Ln,{windowSize:e,isLastItem:c===l.length-1,children:t.jsxs(Mi,{children:[t.jsx(Yn,{width:f[4],height:f[4]}),t.jsx(ot,{width:h*a.width.value(e)/100,height:f[4],style:{display:"flex",alignItems:"center"}})]})})},u);default:return t.jsx(pn,{windowSize:e,wrapperWidth:a.width,isQuickViewMode:i,children:t.jsx(Ln,{windowSize:e,isLastItem:c===l.length-1,children:t.jsx(ot,{width:h*a.width.value(e)/100,height:f[4],style:{display:"flex",alignItems:"center"}})})},u)}})})},jl=o.div`
|
|
1779
|
+
display: flex;
|
|
1780
|
+
height: 100%;
|
|
1781
|
+
background-color: ${e=>e.theme.colors.grey5};
|
|
1782
|
+
padding: ${n.sp3};
|
|
1783
|
+
border: ${e=>`1px solid ${e.theme.colors.grey3}`};
|
|
1784
|
+
box-shadow: ${e=>`${n.sp0} 2px ${n.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
1785
|
+
border-radius: ${n.sp2};
|
|
1786
|
+
color: ${e=>e.theme.colors.hero};
|
|
1787
|
+
cursor: pointer;
|
|
1788
|
+
&:hover {
|
|
1789
|
+
border-color: ${e=>e.theme.colors.primary};
|
|
1790
|
+
color: ${e=>e.theme.colors.primary};
|
|
1791
|
+
}
|
|
1792
|
+
box-sizing: border-box;
|
|
1793
|
+
align-items: center;
|
|
1794
|
+
justify-content: space-between;
|
|
1795
|
+
${e=>e.isQuickViewMode?re`
|
|
1796
|
+
flex: 1;
|
|
1797
|
+
padding-left: ${vi.containerPaddingLeftRight.valuePx(e.windowSize)};
|
|
1798
|
+
padding-right: ${vi.containerPaddingLeftRight.valuePx(e.windowSize)};
|
|
1799
|
+
width: 95%;
|
|
1800
|
+
`:re`
|
|
1801
|
+
min-width: min-content;
|
|
1802
|
+
padding-left: ${vi.containerPaddingLeftRight.valuePx(e.windowSize)};
|
|
1803
|
+
padding-right: ${vi.containerPaddingLeftRight.valuePx(e.windowSize)};
|
|
1804
|
+
`}
|
|
1805
|
+
`,pn=o.div`
|
|
1806
|
+
display: flex;
|
|
1807
|
+
align-items: center;
|
|
1808
|
+
position: relative;
|
|
1809
|
+
:last-of-type {
|
|
1810
|
+
padding-right: ${n.sp0};
|
|
1811
|
+
}
|
|
1812
|
+
${e=>e.isQuickViewMode===!0?re`
|
|
1813
|
+
width: calc(
|
|
1814
|
+
${e.wrapperWidth.valuePercentage(e.windowSize)} -
|
|
1815
|
+
${n.sp4}
|
|
1816
|
+
);
|
|
1817
|
+
min-width: calc(
|
|
1818
|
+
${e.wrapperWidth.valuePercentage(e.windowSize)} -
|
|
1819
|
+
${n.sp4}
|
|
1820
|
+
);
|
|
1821
|
+
`:re`
|
|
1822
|
+
width: ${e.wrapperWidth.valuePercentage(e.windowSize)};
|
|
1823
|
+
min-width: ${e.wrapperWidth.valuePercentage(e.windowSize)};
|
|
1824
|
+
`}
|
|
1825
|
+
`,Ln=o(Re)`
|
|
1826
|
+
overflow: hidden;
|
|
1827
|
+
justify-content: ${e=>e.isLastItem?"flex-end":"flex-start"};
|
|
1828
|
+
display: flex;
|
|
1829
|
+
width: 100%;
|
|
1830
|
+
align-items: center;
|
|
1831
|
+
`,Mi=o.div`
|
|
1832
|
+
display: flex;
|
|
1833
|
+
flex-direction: row;
|
|
1834
|
+
column-gap: ${n.sp2};
|
|
1835
|
+
align-items: center;
|
|
1836
|
+
`,lf=o(Re)`
|
|
1837
|
+
word-break: break-all;
|
|
1838
|
+
white-space: normal;
|
|
1839
|
+
-webkit-line-clamp: 1;
|
|
1840
|
+
-webkit-box-orient: vertical;
|
|
1841
|
+
overflow: hidden;
|
|
1842
|
+
text-overflow: ellipsis;
|
|
1843
|
+
display: -webkit-box;
|
|
1844
|
+
color: inherit;
|
|
1845
|
+
`,cf=o.div`
|
|
1846
|
+
display: flex;
|
|
1847
|
+
`,df=o(vr)`
|
|
1848
|
+
width: 16px;
|
|
1849
|
+
height: 16px;
|
|
1850
|
+
color: inherit;
|
|
1851
|
+
`,uf=({sortConfig:e,fetchState:i,isDisabled:l,onColumnSortConfigChanged:r})=>{const h=be(),d=Xe();return t.jsxs(hf,{windowSize:h,children:[t.jsx(pf,{isQuickViewMode:d,children:t.jsx(Sl,{sortConfig:e,isDisabled:i.fetchState==="In-Progress"?"readonly":l,onColumnSortConfigChanged:r})}),t.jsx(mf,{windowSize:h,children:[...Array(3)].map((a,c)=>t.jsx(rf,{},c))})]})},hf=o.div`
|
|
1852
|
+
display: block;
|
|
1853
|
+
min-height: 100%;
|
|
1854
|
+
flex-direction: column;
|
|
1855
|
+
width: 100%;
|
|
1856
|
+
`,pf=o.div`
|
|
1857
|
+
flex: 1;
|
|
1858
|
+
width: auto;
|
|
1859
|
+
padding-left: ${({isQuickViewMode:e})=>e===!0?n.sp8:n.sp0};
|
|
1860
|
+
`,mf=o.div`
|
|
1861
|
+
display: flex;
|
|
1862
|
+
min-height: 100%;
|
|
1863
|
+
flex-direction: column;
|
|
1864
|
+
row-gap: ${n.sp3};
|
|
1865
|
+
`,gf=({authParams:e,fetchState:i,nextPageToken:l,sortKey:r,sortOrder:h,totalCount:d,transactionAttachmentsEndpoint:a,transactions:c,onFetchMore:u,onMissingReceiptsRowClick:m,onSortConfigChanged:p,onSortReset:g})=>{const x=be(),y=Xe(),C=s.useRef(null),v=(j,b)=>{p?.(j,b)},I=s.useCallback(j=>j<c.length,[c.length]),k=s.useCallback(()=>{l!=null&&i.fetchState!=="In-Progress"&&u(l)},[l,i.fetchState,u]),T=s.useMemo(()=>d,[d]),$=s.useMemo(()=>c.length<d?c.length+1:c.length,[c.length,d]),w=i.fetchState==="Completed"&&c.length===0,S=i.fetchState==="Not-Started"||i.fetchState==="In-Progress"&&c.length===0;return t.jsx(ff,{children:t.jsx(yf,{windowSize:x,children:w?t.jsx(It,{tab:"missing_receipts",title:He("missing_receipts").allDoneText.title,subTitle:He("missing_receipts").allDoneText.subTitle}):S?t.jsx(uf,{sortConfig:{sortKey:r??"date",sortOrder:h},fetchState:i,onColumnSortConfigChanged:v}):t.jsx(wf,{windowSize:x,children:t.jsx(Kn,{children:({height:j,width:b})=>t.jsxs(bf,{style:{height:j,width:b},children:[t.jsx(Cf,{isQuickViewMode:y,children:t.jsx(Sl,{sortConfig:{sortKey:r??"date",sortOrder:h},isDisabled:i.fetchState==="In-Progress"?"readonly":void 0,onColumnSortConfigChanged:v})}),t.jsx(or,{isItemLoaded:I,itemCount:T,loadMoreItems:k,children:({onItemsRendered:z,ref:A})=>t.jsx(Kl,{ref:M=>{A(M),C.current=M},height:j-Cl,innerElementType:$l,itemCount:$,itemSize:zx,width:b,style:{willChange:"auto"},overscanCount:Fx,onItemsRendered:z,itemKey:M=>c[M]?.id??`loading-${M}`,itemData:{transactions:c,isItemLoaded:I,authParams:e,isQuickViewMode:y,transactionAttachmentsEndpoint:a,onMissingReceiptsRowClick:m},children:xf})})]})})})})})},xf=({index:e,style:i,data:l})=>{const{transactions:r,isItemLoaded:h,authParams:d,isQuickViewMode:a,transactionAttachmentsEndpoint:c,onMissingReceiptsRowClick:u}=l;if(h(e)===!1)return t.jsx($a,{isQuickViewMode:a,style:{...i,width:"100%"},children:t.jsx(vf,{})});const m=r[e];return t.jsx($a,{isQuickViewMode:a,style:{...i,width:"100%"},children:t.jsx(af,{transaction:m,authParams:d,transactionAttachmentsEndpoint:c,onMissingReceiptsRowClick:u},m.id)})},ff=o.div`
|
|
1866
|
+
display: flex;
|
|
1867
|
+
flex-direction: column;
|
|
1868
|
+
flex: 1;
|
|
1869
|
+
overflow: hidden;
|
|
1870
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
1871
|
+
`,yf=o.div`
|
|
1872
|
+
flex: 1;
|
|
1873
|
+
display: flex;
|
|
1874
|
+
flex-direction: column;
|
|
1875
|
+
overflow: hidden;
|
|
1876
|
+
`,wf=o.div`
|
|
1877
|
+
height: 100%;
|
|
1878
|
+
display: flex;
|
|
1879
|
+
flex-direction: column;
|
|
1880
|
+
max-width: 99.9%;
|
|
1881
|
+
`,Cf=o.div`
|
|
1882
|
+
flex: 1;
|
|
1883
|
+
width: auto;
|
|
1884
|
+
`,bf=o.div`
|
|
1885
|
+
position: relative;
|
|
1886
|
+
`,$a=o.div`
|
|
1887
|
+
top: ${n.sp0};
|
|
1888
|
+
left: ${n.sp0};
|
|
1889
|
+
padding-bottom: ${n.sp3};
|
|
1890
|
+
box-sizing: border-box;
|
|
1891
|
+
`,$l=s.forwardRef((e,i)=>{const{style:l,...r}=e;return t.jsx("div",{ref:i,style:{...l,width:"auto",maxWidth:"var(--side-panel-list-width, 100%)",position:"relative"},...r})});$l.displayName="Completed tab inner element type";const vf=o.div`
|
|
1892
|
+
display: flex;
|
|
1893
|
+
align-items: center;
|
|
1894
|
+
justify-content: space-between;
|
|
1895
|
+
box-sizing: border-box;
|
|
1896
|
+
padding: ${n.sp3} ${n.sp4};
|
|
1897
|
+
background-color: ${e=>e.theme.colors.grey5};
|
|
1898
|
+
border: 1px solid ${e=>e.theme.colors.grey3};
|
|
1899
|
+
border-radius: ${n.sp2};
|
|
1900
|
+
height: 58px;
|
|
1901
|
+
animation: pulse 1.5s ease-in-out infinite;
|
|
1902
|
+
|
|
1903
|
+
@keyframes pulse {
|
|
1904
|
+
0%,
|
|
1905
|
+
100% {
|
|
1906
|
+
opacity: 1;
|
|
1907
|
+
}
|
|
1908
|
+
50% {
|
|
1909
|
+
opacity: 0.4;
|
|
1910
|
+
}
|
|
1911
|
+
}
|
|
1912
|
+
`;function Il(e){const{bulkUploadSelector:i,isUploading:l}=e;if(i==null)return!1;const r=(i.unmatchedFiles?.length??0)>0||(i.pastUnmatchedFiles?.length??0)>0;if(r)return!1;const h=i.batchListFetchState?.fetchState,d=i.batchDetailsPaginationState?.fetchState,a=h==="In-Progress"||h==="Not-Started",c=d==="In-Progress",u=i.batchList?.length??0,m=i.hasMoreBatchDetails===!0,p=h==="Completed"&&d==="Not-Started"&&(m||u>0);return l===!0||a||c||p||m===!0&&!r}const Bn=420,Si="cubic-bezier(0.42, 0, 0.58, 1)",Sf=16,kf=({children:e,onExitComplete:i})=>{const l=s.useRef(i);l.current=i;const[r,h]=s.useState(null),[d,a]=s.useState(!1),c=s.useRef(null),u=s.useRef({}),m=s.useRef(null),p=s.useRef(!1),g=s.useCallback(C=>{m.current=C,C!=null&&p.current===!1&&(p.current=!0,h(C.offsetHeight))},[]);s.useLayoutEffect(()=>{if(typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches){l.current();return}if(r!=null)return u.current.outer=requestAnimationFrame(()=>{u.current.inner=requestAnimationFrame(()=>{a(!0)})}),()=>{const{inner:C,outer:v}=u.current;v!=null&&cancelAnimationFrame(v),C!=null&&cancelAnimationFrame(C),u.current={}}},[r]),s.useLayoutEffect(()=>{if(d)return c.current=setTimeout(()=>{l.current()},Bn+80),()=>{c.current!=null&&(clearTimeout(c.current),c.current=null)}},[d]);const x=()=>{c.current!=null&&(clearTimeout(c.current),c.current=null),l.current()},y=C=>{C.target===C.currentTarget&&C.propertyName==="height"&&x()};return t.jsx(jf,{onTransitionEnd:y,style:r==null?void 0:{height:d?0:r,marginTop:d?0:void 0,transition:`height ${Bn}ms ${Si}, margin-top ${Bn}ms ${Si}`},children:t.jsx($f,{ref:g,style:{opacity:d?0:1,transform:d?`translateY(-${Sf}px)`:"translateY(0)",transition:`opacity ${Bn}ms ${Si}, transform ${Bn}ms ${Si}`,pointerEvents:d?"none":"auto"},children:e})})},jf=o.div`
|
|
1913
|
+
overflow: hidden;
|
|
1914
|
+
width: 100%;
|
|
1915
|
+
flex-shrink: 0;
|
|
1916
|
+
min-height: 0;
|
|
1917
|
+
will-change: height, margin-top;
|
|
1918
|
+
backface-visibility: hidden;
|
|
1919
|
+
`,$f=o.div`
|
|
1920
|
+
width: 100%;
|
|
1921
|
+
min-width: 0;
|
|
1922
|
+
will-change: opacity, transform;
|
|
1923
|
+
backface-visibility: hidden;
|
|
1924
|
+
`,_o=5,If=`calc(
|
|
1925
|
+
${_o} * (${n.sp4} + 2 * ${n.sp3}) +
|
|
1926
|
+
(${_o} - 1) * ${n.sp3}
|
|
1927
|
+
)`,us=o.div`
|
|
1928
|
+
display: flex;
|
|
1929
|
+
flex-direction: column;
|
|
1930
|
+
gap: ${n.sp3};
|
|
1931
|
+
min-height: 0;
|
|
1932
|
+
max-height: ${If};
|
|
1933
|
+
overflow-y: auto;
|
|
1934
|
+
overflow-x: hidden;
|
|
1935
|
+
overscroll-behavior: contain;
|
|
1936
|
+
scrollbar-width: thin;
|
|
1937
|
+
scrollbar-color: ${e=>e.theme.colors.grey1} transparent;
|
|
1938
|
+
width: 100%;
|
|
1939
|
+
`,fo=[new G(50,50),new G(25,25),new G(25,25)],Tl=()=>t.jsx(Mf,{children:t.jsx(ot,{width:"100%",height:f[3],style:{borderRadius:n.sp1,height:f[4],display:"block"}})}),Tf=()=>{const e=be(),i=s.useRef(null),[l,r]=s.useState(0);return s.useLayoutEffect(()=>{i.current&&r(i.current.offsetWidth)},[e]),t.jsx(Of,{children:t.jsxs(Pf,{ref:i,children:[t.jsx(zf,{children:t.jsxs(Ff,{children:[t.jsx(Yn,{width:f[4],height:f[4]}),t.jsx(ot,{width:l>0?l*fo[0].value(e)/100:"100%",height:f[4],style:{display:"flex",alignItems:"center"}})]})}),t.jsx(Bf,{children:t.jsx(ot,{width:l>0?l*fo[1].value(e)/100:"100%",height:f[4],style:{display:"flex",alignItems:"center"}})}),t.jsx(_f,{children:t.jsx(ot,{width:l>0?l*fo[2].value(e)/100:"100%",height:f[4],style:{display:"flex",alignItems:"center"}})})]})})},Ll=({rowCount:e=_o})=>t.jsx(us,{"aria-hidden":!0,children:Array.from({length:e},(i,l)=>t.jsx(Tf,{},l))}),Lf=()=>t.jsxs(Rf,{children:[t.jsx(Ef,{children:t.jsx(ot,{width:200,height:31,style:{display:"block",borderRadius:n.sp1}})}),t.jsx(Tl,{}),t.jsx(Ll,{rowCount:2})]}),Af=()=>t.jsxs(Df,{children:[t.jsx(Tl,{}),t.jsx(Ll,{rowCount:1})]}),Rf=o.div`
|
|
1940
|
+
display: flex;
|
|
1941
|
+
flex-direction: column;
|
|
1942
|
+
gap: ${n.sp3};
|
|
1943
|
+
min-width: 0;
|
|
1944
|
+
align-items: start;
|
|
1945
|
+
margin-top: ${n.sp6};
|
|
1946
|
+
`;o.div`
|
|
1947
|
+
display: flex;
|
|
1948
|
+
flex-direction: column;
|
|
1949
|
+
gap: ${n.sp2};
|
|
1950
|
+
min-width: 0;
|
|
1951
|
+
`;const Ef=o.div``;o.div`
|
|
1952
|
+
display: flex;
|
|
1953
|
+
align-items: center;
|
|
1954
|
+
flex: 1;
|
|
1955
|
+
min-width: 0;
|
|
1956
|
+
height: ${n.sp6};
|
|
1957
|
+
padding: ${n.sp2} 12px;
|
|
1958
|
+
border-radius: ${n.sp2};
|
|
1959
|
+
box-sizing: border-box;
|
|
1960
|
+
background-color: ${e=>e.theme.colors.background};
|
|
1961
|
+
`;const Df=o.div`
|
|
1962
|
+
display: flex;
|
|
1963
|
+
flex-direction: column;
|
|
1964
|
+
gap: ${n.sp2};
|
|
1965
|
+
margin-top: ${n.sp1};
|
|
1966
|
+
`,Mf=o.div`
|
|
1967
|
+
width: 100%;
|
|
1968
|
+
box-sizing: border-box;
|
|
1969
|
+
`,Of=o.div`
|
|
1970
|
+
display: flex;
|
|
1971
|
+
align-items: center;
|
|
1972
|
+
gap: ${n.sp3};
|
|
1973
|
+
`,Pf=o.div`
|
|
1974
|
+
display: flex;
|
|
1975
|
+
align-items: center;
|
|
1976
|
+
flex: 1;
|
|
1977
|
+
min-width: 0;
|
|
1978
|
+
padding: ${n.sp3} ${n.sp3};
|
|
1979
|
+
background-color: ${e=>e.theme.colors.grey5};
|
|
1980
|
+
border: 1px solid ${e=>e.theme.colors.grey3};
|
|
1981
|
+
border-radius: ${n.sp2};
|
|
1982
|
+
box-shadow: ${e=>e.theme.colors.elevation1};
|
|
1983
|
+
`,zf=o.div`
|
|
1984
|
+
flex: 2;
|
|
1985
|
+
display: flex;
|
|
1986
|
+
align-items: center;
|
|
1987
|
+
gap: ${n.sp1};
|
|
1988
|
+
min-width: 0;
|
|
1989
|
+
`,Ff=o.div`
|
|
1990
|
+
display: flex;
|
|
1991
|
+
flex-direction: row;
|
|
1992
|
+
column-gap: ${n.sp2};
|
|
1993
|
+
align-items: center;
|
|
1994
|
+
min-width: 0;
|
|
1995
|
+
flex: 1;
|
|
1996
|
+
`,Bf=o.div`
|
|
1997
|
+
flex: 1;
|
|
1998
|
+
min-width: 0;
|
|
1999
|
+
padding: ${n.sp0} ${n.sp5};
|
|
2000
|
+
`,_f=o.div`
|
|
2001
|
+
flex: 1;
|
|
2002
|
+
min-width: 0;
|
|
2003
|
+
padding: ${n.sp0} ${n.sp5};
|
|
2004
|
+
text-align: right;
|
|
2005
|
+
`,Vf="0,0.[00]";function Al(){return me.getLocalizedStrings().dateFormat.visual.MMMDCommaYYYYformat}function Nf(e){return e.format(Al())}function Rl(e){if(e==null||String(e).trim()==="")return"";const i=String(e).trim(),l=Al(),r=Oi(i);return r!=null&&typeof r.isValid=="function"&&r.isValid()?r.format(l):i}function Uf(e){if(e==null||e==="")return"";if(!/^[A-Z]{3}$/.test(e))return e;try{return new Intl.NumberFormat("en",{style:"currency",currency:e,currencyDisplay:"narrowSymbol"}).formatToParts(0).find(i=>i.type==="currency")?.value??e}catch{return e}}function El(e,i){return Qo(Vf,e,Uf(i))}const{common:{texts:{vendor:Wf,amount:Hf,date:qf}},uncategorizedTransactionList:{missingReceipt:{bulkUpload:yo}}}=me.getLocalizedStrings(),Kf=({hasCandidates:e,interactionLocked:i=!1,isLoadingMore:l,isSearching:r,manualSearchNextPageToken:h,searchResults:d,selectedTransactionId:a,onClearSelection:c,onSearch:u,onSelectionChange:m,onLoadMore:p})=>{const[g,x]=s.useState(""),y=s.useRef(null),C=s.useRef(null),v=s.useRef(!1),I=s.useCallback(w=>{const[S]=w;i!==!0&&S.isIntersecting&&h!=null&&l!==!0&&r!==!0&&p!=null&&p()},[i,l,r,h,p]);s.useEffect(()=>{const w=y.current,S=C.current;if(w==null||S==null||h==null||p==null)return;const j=new IntersectionObserver(I,{root:w,rootMargin:"120px"});return j.observe(S),()=>j.disconnect()},[I,h,p,d?.length]),s.useEffect(()=>{const w=y.current,S=C.current;if(w==null||S==null||h==null||p==null){v.current=l===!0;return}const j=v.current===!0&&l!==!0;if(v.current=l===!0,!j)return;const b=w.getBoundingClientRect(),z=S.getBoundingClientRect();z.top<b.bottom&&z.bottom>b.top&&z.left<b.right&&z.right>b.left&&requestAnimationFrame(()=>{p()})},[l,h,p,d?.length]);const k=s.useCallback(w=>{i||w.key==="Enter"&&g.trim().length>=2&&u(g.trim())},[i,g,u]),T=s.useCallback(w=>{if(i)return;const S=w.target.value;x(S);const j=S.trim();j.length>=2?u(j):u("")},[i,u]),$=s.useCallback(()=>{i||(x(""),c(),u(""))},[i,c,u]);return t.jsxs(Jf,{hasCandidates:e,$interactionLocked:i,children:[t.jsx(Qf,{children:t.jsx(Jn,{children:e?yo.orSearchManually:yo.searchManually})}),t.jsxs(Gf,{children:[t.jsx(Zf,{}),t.jsx(Yf,{type:"text",placeholder:yo.searchByVendorDateAmount,value:g,onChange:T,onKeyDown:k,disabled:i,"data-testid":O("manual-search-input")}),g.length>0?t.jsx(Xf,{type:"button",disabled:i,onClick:$,children:t.jsx(e0,{})}):null]}),d!=null&&d.length>0?t.jsxs(t0,{children:[t.jsxs(n0,{children:[t.jsx(wo,{style:{flex:2},children:t.jsx(Ye,{children:Wf})}),t.jsx(wo,{children:t.jsx(Ye,{children:qf})}),t.jsx(wo,{style:{textAlign:"right"},children:t.jsx(Ye,{children:Hf})})]}),t.jsxs(us,{ref:y,children:[d.map(w=>t.jsxs(i0,{onClick:()=>{i||m(w.transactionId,w.transactionType)},"data-testid":O("search-result",w.transactionId),children:[t.jsx(s0,{children:t.jsx(a0,{type:"radio",name:"manual-search-result",checked:a===w.transactionId,disabled:i,onChange:()=>{i||m(w.transactionId,w.transactionType)}})}),t.jsxs(o0,{isSelected:a===w.transactionId,children:[t.jsxs(r0,{children:[t.jsx(ti,{photoUrl:w.vendorLogo??"",styles:{width:n.sp4,height:n.sp4,borderRadius:"50%"},placeholder:{width:f[4],height:f[4]},fallbackAvatar:t.jsx(Jt,{name:w.vendorName,size:n.sp4})}),t.jsx(qe,{text:w.vendorName,maxWidth:"120px"})]}),t.jsx(l0,{children:t.jsx(st,{children:Rl(w.transactionDate)})}),t.jsx(c0,{children:t.jsx(st,{children:El(w.amount,w.currencyCode)})})]})]},w.transactionId)),h!=null?t.jsx(d0,{ref:C,"aria-hidden":!0}):null]})]}):r===!0?t.jsx(Af,{}):null]})},Jf=o.div`
|
|
2006
|
+
display: flex;
|
|
2007
|
+
flex-direction: column;
|
|
2008
|
+
gap: ${n.sp2};
|
|
2009
|
+
padding-top: ${e=>e.hasCandidates?n.sp4:n.sp0};
|
|
2010
|
+
pointer-events: ${e=>e.$interactionLocked?"none":"auto"};
|
|
2011
|
+
opacity: ${e=>e.$interactionLocked?.65:1};
|
|
2012
|
+
`,Qf=o.div``,Gf=o.div`
|
|
2013
|
+
display: flex;
|
|
2014
|
+
align-items: center;
|
|
2015
|
+
gap: ${n.sp1};
|
|
2016
|
+
height: ${n.sp6};
|
|
2017
|
+
padding: ${n.sp2} 12px;
|
|
2018
|
+
border-radius: ${n.sp2};
|
|
2019
|
+
background-color: ${e=>e.theme.colors.background};
|
|
2020
|
+
box-sizing: border-box;
|
|
2021
|
+
`,Zf=o(Bc)`
|
|
2022
|
+
width: ${n.sp3};
|
|
2023
|
+
height: ${n.sp3};
|
|
2024
|
+
color: ${e=>e.theme.colors.hero};
|
|
2025
|
+
flex-shrink: 0;
|
|
2026
|
+
`,Yf=o(_c)`
|
|
2027
|
+
flex: 1;
|
|
2028
|
+
border: none;
|
|
2029
|
+
outline: none;
|
|
2030
|
+
color: ${e=>e.theme.colors.grey1};
|
|
2031
|
+
background-color: transparent;
|
|
2032
|
+
`,Xf=o.button`
|
|
2033
|
+
display: flex;
|
|
2034
|
+
align-items: center;
|
|
2035
|
+
justify-content: center;
|
|
2036
|
+
background: none;
|
|
2037
|
+
border: none;
|
|
2038
|
+
cursor: pointer;
|
|
2039
|
+
padding: 0;
|
|
2040
|
+
flex-shrink: 0;
|
|
2041
|
+
`,e0=o(qo)`
|
|
2042
|
+
width: ${n.sp3};
|
|
2043
|
+
height: ${n.sp3};
|
|
2044
|
+
color: ${e=>e.theme.colors.hero};
|
|
2045
|
+
|
|
2046
|
+
&:hover {
|
|
2047
|
+
color: ${e=>e.theme.colors.primary};
|
|
2048
|
+
}
|
|
2049
|
+
`,t0=o.div`
|
|
2050
|
+
display: flex;
|
|
2051
|
+
flex-direction: column;
|
|
2052
|
+
gap: ${n.sp3};
|
|
2053
|
+
margin-top: ${n.sp2};
|
|
2054
|
+
margin-left: -${n.sp5};
|
|
2055
|
+
`,n0=o.div`
|
|
2056
|
+
display: flex;
|
|
2057
|
+
align-items: center;
|
|
2058
|
+
padding: ${n.sp0} ${n.sp3};
|
|
2059
|
+
margin-left: ${n.sp5};
|
|
2060
|
+
`,wo=o.div`
|
|
2061
|
+
flex: 1;
|
|
2062
|
+
color: ${e=>e.theme.colors.hero};
|
|
2063
|
+
`,i0=o.div`
|
|
2064
|
+
display: flex;
|
|
2065
|
+
align-items: center;
|
|
2066
|
+
gap: ${n.sp2};
|
|
2067
|
+
cursor: pointer;
|
|
2068
|
+
`,o0=o.div`
|
|
2069
|
+
display: flex;
|
|
2070
|
+
align-items: center;
|
|
2071
|
+
flex: 1;
|
|
2072
|
+
padding: ${n.sp3} ${n.sp3};
|
|
2073
|
+
background-color: ${e=>e.theme.colors.grey5};
|
|
2074
|
+
border: 1px solid
|
|
2075
|
+
${e=>e.isSelected?e.theme.colors.primary:e.theme.colors.grey3};
|
|
2076
|
+
border-radius: ${n.sp2};
|
|
2077
|
+
box-shadow: ${e=>e.theme.colors.elevation1};
|
|
2078
|
+
transition: border-color 0.15s ease;
|
|
2079
|
+
|
|
2080
|
+
&:hover {
|
|
2081
|
+
border-color: ${e=>e.theme.colors.primary};
|
|
2082
|
+
}
|
|
2083
|
+
`,s0=o.div`
|
|
2084
|
+
flex-shrink: 0;
|
|
2085
|
+
display: flex;
|
|
2086
|
+
align-items: center;
|
|
2087
|
+
`,a0=o.input`
|
|
2088
|
+
accent-color: ${e=>e.theme.colors.primary};
|
|
2089
|
+
width: ${n.sp3};
|
|
2090
|
+
height: ${n.sp3};
|
|
2091
|
+
cursor: pointer;
|
|
2092
|
+
`,r0=o.div`
|
|
2093
|
+
flex: 2;
|
|
2094
|
+
display: flex;
|
|
2095
|
+
align-items: center;
|
|
2096
|
+
gap: ${n.sp1};
|
|
2097
|
+
`,l0=o.div`
|
|
2098
|
+
flex: 1;
|
|
2099
|
+
color: ${e=>e.theme.colors.hero};
|
|
2100
|
+
`,c0=o.div`
|
|
2101
|
+
flex: 1;
|
|
2102
|
+
text-align: right;
|
|
2103
|
+
`,d0=o.div`
|
|
2104
|
+
height: 1px;
|
|
2105
|
+
width: 100%;
|
|
2106
|
+
flex-shrink: 0;
|
|
2107
|
+
`,{common:{texts:{vendor:u0,amount:h0,date:p0}},uncategorizedTransactionList:{missingReceipt:{bulkUpload:Ia}}}=me.getLocalizedStrings(),m0=({attachmentId:e,candidates:i,selectedTransactionId:l,interactionLocked:r=!1,onSelectionChange:h})=>{const d=[...i].sort((c,u)=>u.matchScore-c.matchScore),a=i.length===1?Ia.possibleMatch:Ia.possibleMatches.replace("__count__",i.length.toString());return t.jsxs(g0,{$interactionLocked:r,children:[t.jsx(x0,{children:t.jsx(Jn,{children:a})}),t.jsxs(f0,{children:[t.jsx(Co,{style:{flex:2},children:t.jsx(Ye,{children:u0})}),t.jsx(Co,{children:t.jsx(Ye,{children:p0})}),t.jsx(Co,{style:{textAlign:"right"},children:t.jsx(Ye,{children:h0})})]}),t.jsx(us,{children:d.map(c=>t.jsxs(y0,{onClick:()=>h(c.transactionId,c.transactionType),"data-testid":O("candidate-row",c.transactionId),children:[t.jsx(C0,{children:t.jsx(b0,{type:"radio",name:`match-${e}`,checked:l===c.transactionId,onChange:()=>h(c.transactionId,c.transactionType)})}),t.jsxs(w0,{isSelected:l===c.transactionId,children:[t.jsxs(v0,{children:[t.jsx(ti,{photoUrl:c.vendorLogo??"",styles:{width:n.sp4,height:n.sp4,borderRadius:"50%"},placeholder:{width:f[4],height:f[4]},fallbackAvatar:t.jsx(Jt,{name:c.vendorName,size:n.sp4})}),t.jsx(qe,{text:c.vendorName,maxWidth:"120px"})]}),t.jsx(S0,{children:t.jsx(st,{children:Rl(c.transactionDate)})}),t.jsx(k0,{children:t.jsx(st,{children:El(c.amount,c.currencyCode)})})]})]},c.transactionId))})]})},g0=o.div`
|
|
2108
|
+
display: flex;
|
|
2109
|
+
flex-direction: column;
|
|
2110
|
+
gap: ${n.sp3};
|
|
2111
|
+
pointer-events: ${e=>e.$interactionLocked?"none":"auto"};
|
|
2112
|
+
opacity: ${e=>e.$interactionLocked?.65:1};
|
|
2113
|
+
`,x0=o.div``,f0=o.div`
|
|
2114
|
+
display: flex;
|
|
2115
|
+
align-items: center;
|
|
2116
|
+
padding: ${n.sp0} ${n.sp3};
|
|
2117
|
+
`,Co=o.div`
|
|
2118
|
+
flex: 1;
|
|
2119
|
+
color: ${e=>e.theme.colors.hero};
|
|
2120
|
+
`,y0=o.div`
|
|
2121
|
+
display: flex;
|
|
2122
|
+
align-items: center;
|
|
2123
|
+
gap: ${n.sp2};
|
|
2124
|
+
cursor: pointer;
|
|
2125
|
+
`,w0=o.div`
|
|
2126
|
+
display: flex;
|
|
2127
|
+
align-items: center;
|
|
2128
|
+
flex: 1;
|
|
2129
|
+
padding: ${n.sp3} ${n.sp3};
|
|
2130
|
+
background-color: ${e=>e.theme.colors.grey5};
|
|
2131
|
+
border: 1px solid
|
|
2132
|
+
${e=>e.isSelected?e.theme.colors.primary:e.theme.colors.grey3};
|
|
2133
|
+
border-radius: ${n.sp2};
|
|
2134
|
+
box-shadow: ${e=>e.theme.colors.elevation1};
|
|
2135
|
+
transition: border-color 0.15s ease;
|
|
2136
|
+
|
|
2137
|
+
&:hover {
|
|
2138
|
+
border-color: ${e=>e.theme.colors.primary};
|
|
2139
|
+
}
|
|
2140
|
+
`,C0=o.div`
|
|
2141
|
+
flex-shrink: 0;
|
|
2142
|
+
display: flex;
|
|
2143
|
+
align-items: center;
|
|
2144
|
+
`,b0=o.input`
|
|
2145
|
+
accent-color: ${e=>e.theme.colors.primary};
|
|
2146
|
+
width: ${n.sp3};
|
|
2147
|
+
height: ${n.sp3};
|
|
2148
|
+
cursor: pointer;
|
|
2149
|
+
`,v0=o.div`
|
|
2150
|
+
flex: 2;
|
|
2151
|
+
display: flex;
|
|
2152
|
+
align-items: center;
|
|
2153
|
+
gap: ${n.sp1};
|
|
2154
|
+
`,S0=o.div`
|
|
2155
|
+
flex: 1;
|
|
2156
|
+
color: ${e=>e.theme.colors.hero};
|
|
2157
|
+
`,k0=o.div`
|
|
2158
|
+
flex: 1;
|
|
2159
|
+
text-align: right;
|
|
2160
|
+
`,j0=48,Dt=new Map,bo=new Map;function $0(e,i,l){return i!=null&&i!==""?`${e}::att::${i}`:`${e}::url::${l}`}function I0(e){const i=Dt.get(e);return i!=null&&(Dt.delete(e),Dt.set(e,i)),i}function T0(){for(;Dt.size>j0;){const e=Dt.keys().next().value;if(e===void 0)break;const i=Dt.get(e);Dt.delete(e),i!=null&&URL.revokeObjectURL(i)}}function L0(e,i){const l=Dt.get(e);l!=null&&l!==i&&URL.revokeObjectURL(l),Dt.delete(e),Dt.set(e,i),T0()}function Dl(e){return I0(e)}function A0(e,i,l){return fetch(e,{method:"GET",headers:{"zeni-user-id":i.userId,"zeni-tenant-id":i.tenantId,"zeni-session-id":i.sessionId}}).then(r=>{if(!r.ok)throw new Error(`File fetch failed: ${r.status}`);return r.blob()})}function R0(e,i,l,r){const h=Dl(e);if(h!=null)return Promise.resolve(h);const d=bo.get(e);if(d!=null)return d;const a=A0(i,l).then(c=>{const u=URL.createObjectURL(c);return L0(e,u),u}).finally(()=>{bo.delete(e)});return bo.set(e,a),a}const{uncategorizedTransactionList:{missingReceipt:{bulkUpload:E0}}}=me.getLocalizedStrings(),D0=me.getLocalizedStrings().spendManagement.reimbursement.reimbursementDetail;function M0(e){return e.toLowerCase().endsWith(".pdf")}function O0(e,i,l){const[r,h]=s.useState(null);return s.useLayoutEffect(()=>{if(e==null){h(null);return}const d=$0(i.tenantId,l,e),a=Dl(d);if(a!=null){h(a);return}let c=!1;return R0(d,e,i).then(u=>{c||h(u)}).catch(u=>{(u instanceof Error?u.name:"")!=="AbortError"&&console.error("Failed to fetch file with auth:",u)}),()=>{c=!0}},[e,i.userId,i.tenantId,i.sessionId,l,i]),r}function Ta({title:e,windowSize:i,onDeleteClick:l,deleteDataTestId:r}){const h=l!=null;return t.jsxs(B0,{children:[t.jsx(_0,{children:e}),h?t.jsx(V0,{className:"actionIcons",children:i==="small"?t.jsx(U0,{"data-testid":r,onClick:d=>{d.stopPropagation(),l?.()}}):t.jsx(xe,{enterDelay:600,display:"flex",title:D0.delete,placement:"top",children:t.jsx(N0,{"data-testid":r,onClick:d=>{d.stopPropagation(),l?.()}})})}):null]})}const P0=({authParams:e,attachmentTitle:i,attachmentId:l,fileDownloadUrl:r,filename:h,filePreviewUrl:d,onDeleteClick:a})=>{const[c,u]=s.useState(!1),m=be(),p=O0(r,e,l),g=d??p,x=p??d,y=M0(h),C=O("receipt-card-delete",l??h),v=s.useCallback(()=>{x!=null&&u(!0)},[x]),I=s.useCallback(()=>{u(!1)},[]);return y&&x!=null?t.jsxs(t.Fragment,{children:[t.jsx(z0,{"data-testid":O("receipt-pdf-preview",h),children:t.jsx(gs,{fileUrl:x,isFullScreen:!1,setShowFullScreenView:u,showTitlebar:!0,pdfTitle:i,showTitlebarIcon:a!=null,showReplaceIcon:!1,onDeleteClick:a,deleteAttachmentDataTestId:a!=null?C:void 0})}),c?Pi.createPortal(t.jsxs(La,{children:[t.jsxs(Aa,{children:[t.jsx(xs,{children:h}),t.jsx(Ra,{onClick:I,"data-testid":O("close-receipt-preview",h),children:t.jsx(Ea,{})})]}),t.jsx($t,{onClickAway:I,children:t.jsx(Da,{children:t.jsx(gs,{fileUrl:x,isFullScreen:!0,setShowFullScreenView:u,onCrossClick:I})})})]}),document.body):null]}):g!=null&&g!==""?t.jsxs(t.Fragment,{children:[t.jsxs(F0,{windowSize:m,children:[t.jsx(Ta,{title:i,windowSize:m,onDeleteClick:a,deleteDataTestId:C}),t.jsx(W0,{children:t.jsx(H0,{src:g,alt:h,onClick:v,"data-testid":O("receipt-img-preview",h)})})]}),c&&x!=null?Pi.createPortal(t.jsxs(La,{children:[t.jsxs(Aa,{children:[t.jsx(xs,{children:h}),t.jsx(Ra,{onClick:I,"data-testid":O("close-receipt-preview",h),children:t.jsx(Ea,{})})]}),t.jsx($t,{onClickAway:I,children:t.jsx(Da,{children:t.jsx(J0,{src:x,alt:h})})})]}),document.body):null]}):t.jsxs(q0,{windowSize:m,children:[t.jsx(Ta,{title:i,windowSize:m,onDeleteClick:a,deleteDataTestId:C}),t.jsx(K0,{children:t.jsx(st,{children:E0.noPreview})})]})},z0=o.div`
|
|
2161
|
+
width: 100%;
|
|
2162
|
+
min-height: 300px;
|
|
2163
|
+
max-height: 650px;
|
|
2164
|
+
overflow: hidden;
|
|
2165
|
+
background-color: ${e=>e.theme.colors.grey3};
|
|
2166
|
+
border-radius: 0;
|
|
2167
|
+
`,F0=o.div`
|
|
2168
|
+
display: flex;
|
|
2169
|
+
flex-direction: column;
|
|
2170
|
+
width: 100%;
|
|
2171
|
+
min-height: 300px;
|
|
2172
|
+
overflow: hidden;
|
|
2173
|
+
box-sizing: border-box;
|
|
2174
|
+
padding: ${n.sp3};
|
|
2175
|
+
cursor: pointer;
|
|
2176
|
+
background-color: ${e=>e.theme.colors.grey3};
|
|
2177
|
+
border-radius: 0;
|
|
2178
|
+
|
|
2179
|
+
.actionIcons {
|
|
2180
|
+
${e=>e.windowSize==="small"&&`
|
|
2181
|
+
display: flex;
|
|
2182
|
+
`}
|
|
2183
|
+
}
|
|
2184
|
+
&:hover {
|
|
2185
|
+
.actionIcons {
|
|
2186
|
+
display: flex;
|
|
2187
|
+
}
|
|
2188
|
+
}
|
|
2189
|
+
`,B0=o.div`
|
|
2190
|
+
position: sticky;
|
|
2191
|
+
background: ${e=>e.theme.colors.grey3};
|
|
2192
|
+
z-index: 1;
|
|
2193
|
+
width: 100%;
|
|
2194
|
+
top: 0;
|
|
2195
|
+
display: flex;
|
|
2196
|
+
flex-direction: row;
|
|
2197
|
+
justify-content: space-between;
|
|
2198
|
+
align-items: center;
|
|
2199
|
+
padding-bottom: ${n.sp3};
|
|
2200
|
+
cursor: default;
|
|
2201
|
+
flex-shrink: 0;
|
|
2202
|
+
`,_0=o(lr)``,V0=o.div`
|
|
2203
|
+
display: none;
|
|
2204
|
+
flex-direction: row;
|
|
2205
|
+
`,N0=o(Rr)`
|
|
2206
|
+
cursor: pointer;
|
|
2207
|
+
width: ${n.sp3};
|
|
2208
|
+
height: ${n.sp3};
|
|
2209
|
+
color: ${e=>e.theme.colors.grey1};
|
|
2210
|
+
:hover {
|
|
2211
|
+
color: ${he.important};
|
|
2212
|
+
}
|
|
2213
|
+
`,U0=o(Rr)`
|
|
2214
|
+
cursor: pointer;
|
|
2215
|
+
width: ${n.sp3};
|
|
2216
|
+
height: ${n.sp3};
|
|
2217
|
+
color: ${he.important};
|
|
2218
|
+
`,W0=o.div`
|
|
2219
|
+
box-sizing: border-box;
|
|
2220
|
+
width: 100%;
|
|
2221
|
+
flex: 1;
|
|
2222
|
+
min-height: 0;
|
|
2223
|
+
display: flex;
|
|
2224
|
+
align-items: center;
|
|
2225
|
+
justify-content: center;
|
|
2226
|
+
overflow: auto;
|
|
2227
|
+
max-height: 650px;
|
|
2228
|
+
`,H0=o.img`
|
|
2229
|
+
width: 100%;
|
|
2230
|
+
height: auto;
|
|
2231
|
+
object-fit: contain;
|
|
2232
|
+
cursor: pointer;
|
|
2233
|
+
display: block;
|
|
2234
|
+
max-height: 650px;
|
|
2235
|
+
`,q0=o.div`
|
|
2236
|
+
width: 100%;
|
|
2237
|
+
min-height: 300px;
|
|
2238
|
+
max-height: 650px;
|
|
2239
|
+
display: flex;
|
|
2240
|
+
flex-direction: column;
|
|
2241
|
+
box-sizing: border-box;
|
|
2242
|
+
padding: ${n.sp3};
|
|
2243
|
+
background-color: ${e=>e.theme.colors.grey3};
|
|
2244
|
+
border-radius: 0;
|
|
2245
|
+
color: ${e=>e.theme.colors.grey2};
|
|
2246
|
+
|
|
2247
|
+
.actionIcons {
|
|
2248
|
+
${e=>e.windowSize==="small"&&`
|
|
2249
|
+
display: flex;
|
|
2250
|
+
`}
|
|
2251
|
+
}
|
|
2252
|
+
&:hover {
|
|
2253
|
+
.actionIcons {
|
|
2254
|
+
display: flex;
|
|
2255
|
+
}
|
|
2256
|
+
}
|
|
2257
|
+
`,K0=o.div`
|
|
2258
|
+
flex: 1;
|
|
2259
|
+
display: flex;
|
|
2260
|
+
align-items: center;
|
|
2261
|
+
justify-content: center;
|
|
2262
|
+
min-height: 200px;
|
|
2263
|
+
`,La=o.div`
|
|
2264
|
+
position: fixed;
|
|
2265
|
+
top: 0;
|
|
2266
|
+
left: 0;
|
|
2267
|
+
width: 100%;
|
|
2268
|
+
height: 100%;
|
|
2269
|
+
z-index: 1201;
|
|
2270
|
+
display: flex;
|
|
2271
|
+
flex-direction: column;
|
|
2272
|
+
background: ${he.overlayDark};
|
|
2273
|
+
`,Aa=o.div`
|
|
2274
|
+
width: 100%;
|
|
2275
|
+
height: 59px;
|
|
2276
|
+
display: flex;
|
|
2277
|
+
align-items: center;
|
|
2278
|
+
justify-content: space-between;
|
|
2279
|
+
padding: ${n.sp0} ${n.sp8};
|
|
2280
|
+
color: ${he.neutralGrey5Light};
|
|
2281
|
+
box-sizing: border-box;
|
|
2282
|
+
flex-shrink: 0;
|
|
2283
|
+
`,Ra=o.button`
|
|
2284
|
+
background: none;
|
|
2285
|
+
border: none;
|
|
2286
|
+
cursor: pointer;
|
|
2287
|
+
padding: ${n.sp0};
|
|
2288
|
+
display: flex;
|
|
2289
|
+
align-items: center;
|
|
2290
|
+
`,Ea=o(qo)`
|
|
2291
|
+
width: ${n.sp4};
|
|
2292
|
+
height: ${n.sp4};
|
|
2293
|
+
color: ${he.neutralGrey5Light};
|
|
2294
|
+
|
|
2295
|
+
&:hover {
|
|
2296
|
+
color: ${he.primaryDark};
|
|
2297
|
+
}
|
|
2298
|
+
`,Da=o.div`
|
|
2299
|
+
flex: 1;
|
|
2300
|
+
display: flex;
|
|
2301
|
+
align-items: center;
|
|
2302
|
+
justify-content: center;
|
|
2303
|
+
overflow: auto;
|
|
2304
|
+
max-width: 90%;
|
|
2305
|
+
margin: 0 auto;
|
|
2306
|
+
`,J0=o.img`
|
|
2307
|
+
max-width: 100%;
|
|
2308
|
+
max-height: 100%;
|
|
2309
|
+
object-fit: contain;
|
|
2310
|
+
`,{uncategorizedTransactionList:{missingReceipt:{bulkUpload:Ma}}}=me.getLocalizedStrings(),Q0=({authParams:e,file:i,index:l,isLoadingMoreManualSearch:r,isSearching:h,manualSearchUiResetKey:d=0,isConfirmMatchInProgress:a=!1,manualSearchNextPageToken:c,manualSearchTotalCount:u,selectedTransactionId:m,onClearSelection:p,onDelete:g,onLoadMoreManualSearch:x,onSearchTransactions:y,onSelectionChange:C,searchResults:v})=>{const I=i.status==="possible_matches",k=i.status==="no_match",T=I&&i.candidates!=null&&i.candidates.length>0,$=be(),w=i.candidates?.map(b=>({amount:b.transaction.amount.amount,currencyCode:b.transaction.amount.currencySymbol||b.transaction.amount.currencyCode||"",matchScore:b.matchScore,transactionDate:Nf(b.transaction.date),transactionId:b.transaction.id,transactionType:b.transaction.type??"",vendorName:b.transaction.vendorName??"",vendorLogo:b.transaction.logo?.href})),S=s.useCallback((b,z)=>{a||C(b,z)},[a,C]),j=`${i.attachmentId}-${d}`;return t.jsxs(G0,{windowSize:$,"data-testid":O("receipt-card",i.attachmentId),children:[t.jsx(Z0,{children:t.jsx(Y0,{children:t.jsx(P0,{authParams:e,attachmentId:i.attachmentId,attachmentTitle:`#${l+1} ${i.filename}`,fileDownloadUrl:i.fileDownloadUrl,filename:i.filename,filePreviewUrl:i.filePreviewUrl,onDeleteClick:g!=null?()=>g(i.attachmentId):void 0})})}),t.jsxs(X0,{children:[T&&w!=null?t.jsx(m0,{attachmentId:i.attachmentId,candidates:w,interactionLocked:a,selectedTransactionId:m,onSelectionChange:S}):null,k?t.jsxs(ey,{children:[t.jsx(ty,{children:t.jsx(Jn,{children:Ma.noPossibleMatch})}),t.jsx(ny,{children:t.jsx(st,{children:Ma.noMatchFound})})]}):null,I||k?t.jsx(Kf,{hasCandidates:T,interactionLocked:a,isLoadingMore:r,isSearching:h,manualSearchNextPageToken:c,manualSearchTotalCount:u,searchResults:v,selectedTransactionId:m,onClearSelection:p,onLoadMore:x,onSearch:y??(()=>{}),onSelectionChange:S},j):null]})]})},G0=o.div`
|
|
2311
|
+
display: grid;
|
|
2312
|
+
grid-template-columns: ${e=>e.windowSize==="small"?"1fr":"1fr 1fr"};
|
|
2313
|
+
grid-template-rows: ${e=>e.windowSize==="small"?"1fr 1fr 1fr 1fr":"auto"};
|
|
2314
|
+
align-items: start;
|
|
2315
|
+
gap: ${n.sp4};
|
|
2316
|
+
min-width: 0;
|
|
2317
|
+
`,Z0=o.div`
|
|
2318
|
+
display: flex;
|
|
2319
|
+
flex-direction: column;
|
|
2320
|
+
min-width: 0;
|
|
2321
|
+
max-width: 94%;
|
|
2322
|
+
`,Y0=o.div`
|
|
2323
|
+
display: flex;
|
|
2324
|
+
flex-direction: column;
|
|
2325
|
+
width: 100%;
|
|
2326
|
+
background-color: ${e=>e.theme.colors.grey3};
|
|
2327
|
+
border-radius: ${n.sp2};
|
|
2328
|
+
overflow: hidden;
|
|
2329
|
+
max-height: 650px;
|
|
2330
|
+
`,X0=o.div`
|
|
2331
|
+
display: flex;
|
|
2332
|
+
flex-direction: column;
|
|
2333
|
+
min-width: 0;
|
|
2334
|
+
gap: ${n.sp5};
|
|
2335
|
+
margin-top: ${n.sp3};
|
|
2336
|
+
`,ey=o.div`
|
|
2337
|
+
display: flex;
|
|
2338
|
+
flex-direction: column;
|
|
2339
|
+
gap: ${n.sp3};
|
|
2340
|
+
`,ty=o.div`
|
|
2341
|
+
color: ${e=>e.theme.colors.primary};
|
|
2342
|
+
`,ny=o.div`
|
|
2343
|
+
display: flex;
|
|
2344
|
+
align-items: center;
|
|
2345
|
+
justify-content: center;
|
|
2346
|
+
padding: ${n.sp4} ${n.sp0};
|
|
2347
|
+
width: 100%;
|
|
2348
|
+
background-color: ${e=>e.theme.colors.background};
|
|
2349
|
+
border-radius: ${n.sp2};
|
|
2350
|
+
color: ${e=>e.theme.colors.grey1};
|
|
2351
|
+
`,iy=()=>t.jsx(oy,{children:t.jsxs(sy,{children:[t.jsxs(ay,{children:[t.jsx(cy,{children:t.jsx(ot,{width:286,height:27,style:{display:"block",borderRadius:n.sp1}})}),t.jsx(ry,{children:t.jsx(ly,{children:t.jsx(dy,{children:t.jsx(qn,{size:"Large",start:!0})})})})]}),t.jsx(uy,{children:t.jsx(Lf,{})})]})}),oy=o.div`
|
|
2352
|
+
display: flex;
|
|
2353
|
+
flex-direction: column;
|
|
2354
|
+
flex: 1;
|
|
2355
|
+
min-height: 0;
|
|
2356
|
+
width: 100%;
|
|
2357
|
+
`,sy=o.div`
|
|
2358
|
+
display: grid;
|
|
2359
|
+
grid-template-columns: minmax(0, 50%) minmax(0, 1fr);
|
|
2360
|
+
align-items: start;
|
|
2361
|
+
gap: ${n.sp7};
|
|
2362
|
+
width: 100%;
|
|
2363
|
+
min-width: 0;
|
|
2364
|
+
`,ay=o.div`
|
|
2365
|
+
display: flex;
|
|
2366
|
+
flex-direction: column;
|
|
2367
|
+
min-width: 0;
|
|
2368
|
+
`,ry=o.div`
|
|
2369
|
+
display: flex;
|
|
2370
|
+
flex-direction: column;
|
|
2371
|
+
width: 100%;
|
|
2372
|
+
background-color: ${e=>e.theme.colors.grey3};
|
|
2373
|
+
border-radius: ${n.sp2};
|
|
2374
|
+
overflow: hidden;
|
|
2375
|
+
`,ly=o.div`
|
|
2376
|
+
display: flex;
|
|
2377
|
+
flex-direction: column;
|
|
2378
|
+
width: 100%;
|
|
2379
|
+
min-height: 480px;
|
|
2380
|
+
max-height: 540px;
|
|
2381
|
+
box-sizing: border-box;
|
|
2382
|
+
padding: ${n.sp3};
|
|
2383
|
+
margin-top: ${n.sp6};
|
|
2384
|
+
background-color: ${e=>e.theme.colors.grey3};
|
|
2385
|
+
`,cy=o.div`
|
|
2386
|
+
display: flex;
|
|
2387
|
+
align-items: center;
|
|
2388
|
+
padding-bottom: ${n.sp3};
|
|
2389
|
+
flex-shrink: 0;
|
|
2390
|
+
margin-top: ${n.sp4};
|
|
2391
|
+
`,dy=o.div`
|
|
2392
|
+
flex: 1;
|
|
2393
|
+
min-height: 200px;
|
|
2394
|
+
display: flex;
|
|
2395
|
+
align-items: center;
|
|
2396
|
+
justify-content: center;
|
|
2397
|
+
background-color: ${e=>e.theme.colors.grey5};
|
|
2398
|
+
border: 1px solid ${e=>e.theme.colors.grey3};
|
|
2399
|
+
border-radius: ${n.sp2};
|
|
2400
|
+
box-sizing: border-box;
|
|
2401
|
+
color: ${e=>e.theme.colors.grey1};
|
|
2402
|
+
`,uy=o.div`
|
|
2403
|
+
display: flex;
|
|
2404
|
+
flex-direction: column;
|
|
2405
|
+
gap: ${n.sp5};
|
|
2406
|
+
min-width: 0;
|
|
2407
|
+
margin-top: ${n.sp8};
|
|
2408
|
+
`;function hy(e,i,l){const r=i.findIndex(a=>a.attachmentId===e);if(r>=0)return{file:i[r],index:r,section:"primary"};const h=l??[],d=h.findIndex(a=>a.attachmentId===e);return d>=0?{file:h[d],index:d,section:"past"}:null}function Oa(e,i,l){if(i==null||i.section!==l)return e;const r=i.file.attachmentId;if(e.some(a=>a.attachmentId===r))return e;const h=Math.min(i.index,e.length),d=[...e];return d.splice(h,0,i.file),d}const py=e=>s.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M22.7737 11.8149C22.781 14.6922 21.6539 17.4563 19.6368 19.5081C17.6197 21.5598 14.8751 22.7338 11.9982 22.7756C10.5931 22.7967 9.19783 22.5387 7.89323 22.0165C6.58864 21.4942 5.40071 20.7182 4.39835 19.7333C3.39598 18.7484 2.59913 17.5743 2.05399 16.2791C1.50886 14.9839 1.2263 13.5934 1.2227 12.1882C1.21466 9.31044 2.34142 6.54556 4.35861 4.49316C6.3758 2.44076 9.12077 1.26633 11.9982 1.22458C13.4035 1.20356 14.799 1.46178 16.1037 1.98426C17.4084 2.50673 18.5964 3.28306 19.5988 4.26821C20.6012 5.25337 21.398 6.42774 21.943 7.72322C22.488 9.0187 22.7704 10.4095 22.7737 11.8149Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M12 13.8571V7",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M11.9902 16.8164C11.9582 16.8169 11.9266 16.8238 11.8972 16.8367C11.8679 16.8496 11.8415 16.8682 11.8195 16.8915C11.7975 16.9148 11.7804 16.9423 11.7691 16.9723C11.7579 17.0023 11.7528 17.0342 11.7541 17.0662C11.7564 17.1305 11.7835 17.1914 11.8297 17.2361C11.8759 17.2809 11.9376 17.306 12.0019 17.3062C12.0339 17.3056 12.0655 17.2986 12.0947 17.2856C12.124 17.2727 12.1504 17.254 12.1723 17.2308C12.1943 17.2075 12.2114 17.1801 12.2227 17.1502C12.234 17.1203 12.2392 17.0884 12.238 17.0564C12.2361 16.9935 12.2103 16.9338 12.1659 16.8892C12.1215 16.8446 12.0619 16.8186 11.999 16.8164H11.9941",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),{uncategorizedTransactionList:{missingReceipt:{bulkUpload:Pa}}}=me.getLocalizedStrings(),my=({authParams:e,unmatchedFiles:i,pastUnmatchedFiles:l,hasMoreBatchDetails:r,isLoading:h,isLoadingMore:d,isLoadingMoreManualSearch:a,isSearching:c,manualSearchNextPageToken:u,manualSearchTotalCount:m,manualSearchUiResetKey:p=0,confirmMatchFetchState:g="Not-Started",isConfirmMatchInProgress:x=!1,pendingMatchAttachmentId:y,pendingMatchTransactionId:C,onDelete:v,onLoadMoreBatchDetails:I,onLoadMoreManualSearch:k,onPendingMatchChange:T,onSearchTransactions:$,manualSearchResultsAttachmentId:w,scrollRoot:S,searchResults:j})=>{const b=s.useRef(null),z=s.useRef(!1),[A,M]=s.useState(null),_=w??A,W=s.useCallback((D,R)=>{x||(R.trim().length>=2&&M(D),$?.(R))},[x,$]);s.useEffect(()=>{w==null&&(j?.length??0)===0&&c!==!0&&M(null)},[j,c,w]);const H=s.useRef(null),[L,P]=s.useState(null),ae=s.useCallback(()=>{P(null)},[]);s.useLayoutEffect(()=>{if(g==="In-Progress"&&y!=null){const D=hy(y,i,l);D!=null&&(H.current=D)}},[g,y,i,l]),s.useLayoutEffect(()=>{if(g==="Completed"&&L==null){const D=H.current;D!=null&&(P(D),H.current=null)}},[g,L]),s.useLayoutEffect(()=>{g==="Error"&&(H.current=null,P(null))},[g]);const V=s.useMemo(()=>Oa(i,L,"primary"),[i,L]),B=s.useMemo(()=>Oa(l??[],L,"past"),[l,L]),Q=s.useCallback(D=>{const[R]=D;R.isIntersecting&&r===!0&&d!==!0&&I?.()},[r,d,I]);if(s.useEffect(()=>{if(h===!0||S==null)return;const D=b.current;if(D==null)return;const R=new IntersectionObserver(Q,{root:S,rootMargin:"200px"});return R.observe(D),()=>R.disconnect()},[Q,h,S]),s.useEffect(()=>{if(h===!0||S==null||r!==!0){z.current=d===!0;return}const D=z.current===!0&&d!==!0;if(z.current=d===!0,!D)return;const R=b.current;if(R==null)return;const J=S.getBoundingClientRect(),N=R.getBoundingClientRect();N.top<J.bottom&&N.bottom>J.top&&N.left<J.right&&N.right>J.left&&requestAnimationFrame(()=>{I?.()})},[h,d,r,S,I]),h===!0)return t.jsx(iy,{});const de=V.length>0,le=B.length>0;if(!de&&!le&&r!==!0&&d!==!0){const{title:D,subTitle:R}=He("missing_receipts").allDoneText;return t.jsx(gy,{children:t.jsx(fy,{children:t.jsx(It,{tab:"missing_receipts",title:D,subTitle:R})})})}const ge=le,te=Pa.unmatchedReceipts.replace("__count__",V.length.toString()),K=V.length>0,Z=(D,R,J)=>{const N=`${D.batchId}-${D.attachmentId}`,Y=L!=null&&L.section===J&&L.file.attachmentId===D.attachmentId,ne=t.jsx(Q0,{authParams:e,file:D,index:R,isLoadingMoreManualSearch:a,isSearching:c===!0&&_===D.attachmentId,manualSearchNextPageToken:u,manualSearchTotalCount:m,selectedTransactionId:y===D.attachmentId?C:null,onClearSelection:()=>T(null),onDelete:v,onLoadMoreManualSearch:k,onSearchTransactions:$!=null?q=>W(D.attachmentId,q):void 0,onSelectionChange:(q,U)=>{x||T({batchId:D.batchId,attachmentId:D.attachmentId,fileName:D.filename,transactionId:q,transactionType:U})},searchResults:_===D.attachmentId?j:void 0,manualSearchUiResetKey:p,isConfirmMatchInProgress:x});return Y?t.jsx(kf,{onExitComplete:ae,children:ne},N):t.jsx(s.Fragment,{children:ne},N)};return t.jsxs(xy,{children:[K?t.jsxs(Cy,{children:[t.jsx(za,{"aria-hidden":!0}),t.jsx(by,{children:te})]}):null,t.jsx(yy,{children:t.jsxs(wy,{children:[V.length>0?t.jsx(Fa,{children:V.map((D,R)=>Z(D,R,"primary"))}):null,ge?t.jsxs(t.Fragment,{children:[t.jsxs(vy,{children:[t.jsx(za,{"aria-hidden":!0}),t.jsx(Sy,{children:Pa.pastUnmatchedReceipts.replace("__count__",B.length.toString())})]}),t.jsx(Fa,{children:B.map((D,R)=>Z(D,V.length+R,"past"))})]}):null,t.jsx(ky,{ref:b}),d===!0?t.jsx(jy,{children:t.jsx(qn,{size:"Small",start:!0})}):null]})})]})},gy=o.div`
|
|
2409
|
+
display: flex;
|
|
2410
|
+
flex-direction: column;
|
|
2411
|
+
flex: 1;
|
|
2412
|
+
overflow: hidden;
|
|
2413
|
+
align-self: stretch;
|
|
2414
|
+
width: 100%;
|
|
2415
|
+
min-height: 100%;
|
|
2416
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
2417
|
+
`,xy=o.div`
|
|
2418
|
+
display: flex;
|
|
2419
|
+
flex-direction: column;
|
|
2420
|
+
flex: 0 0 auto;
|
|
2421
|
+
align-self: stretch;
|
|
2422
|
+
width: 100%;
|
|
2423
|
+
min-height: 100%;
|
|
2424
|
+
gap: ${n.sp3};
|
|
2425
|
+
overflow: visible;
|
|
2426
|
+
`,fy=o.div`
|
|
2427
|
+
flex: 1;
|
|
2428
|
+
display: flex;
|
|
2429
|
+
flex-direction: column;
|
|
2430
|
+
min-height: 0;
|
|
2431
|
+
width: 100%;
|
|
2432
|
+
overflow: hidden;
|
|
2433
|
+
`,yy=o.div`
|
|
2434
|
+
width: 100%;
|
|
2435
|
+
flex: 0 0 auto;
|
|
2436
|
+
align-self: stretch;
|
|
2437
|
+
`,wy=o.div`
|
|
2438
|
+
position: relative;
|
|
2439
|
+
z-index: 1;
|
|
2440
|
+
display: flex;
|
|
2441
|
+
flex-direction: column;
|
|
2442
|
+
width: 100%;
|
|
2443
|
+
gap: ${n.sp3};
|
|
2444
|
+
`,Cy=o.div`
|
|
2445
|
+
display: flex;
|
|
2446
|
+
align-items: center;
|
|
2447
|
+
gap: ${n.sp2};
|
|
2448
|
+
position: relative;
|
|
2449
|
+
z-index: 1;
|
|
2450
|
+
width: 100%;
|
|
2451
|
+
margin-top: ${n.sp4};
|
|
2452
|
+
`,za=o(py)`
|
|
2453
|
+
width: ${n.sp4};
|
|
2454
|
+
height: ${n.sp4};
|
|
2455
|
+
color: ${he.important};
|
|
2456
|
+
flex-shrink: 0;
|
|
2457
|
+
`,by=o(No)`
|
|
2458
|
+
color: ${he.important};
|
|
2459
|
+
`,vy=o.div`
|
|
2460
|
+
display: flex;
|
|
2461
|
+
align-items: center;
|
|
2462
|
+
gap: ${n.sp2};
|
|
2463
|
+
color: ${he.important};
|
|
2464
|
+
margin-top: ${n.sp9};
|
|
2465
|
+
position: relative;
|
|
2466
|
+
z-index: 1;
|
|
2467
|
+
width: 100%;
|
|
2468
|
+
`,Sy=o(No)`
|
|
2469
|
+
color: ${he.important};
|
|
2470
|
+
`,Fa=o.div`
|
|
2471
|
+
display: flex;
|
|
2472
|
+
flex-direction: column;
|
|
2473
|
+
flex-shrink: 0;
|
|
2474
|
+
border-radius: ${n.sp2};
|
|
2475
|
+
overflow: hidden;
|
|
2476
|
+
& > * + * {
|
|
2477
|
+
margin-top: ${n.sp11};
|
|
2478
|
+
}
|
|
2479
|
+
`,ky=o.div`
|
|
2480
|
+
height: 1px;
|
|
2481
|
+
width: 100%;
|
|
2482
|
+
`,jy=o.div`
|
|
2483
|
+
display: flex;
|
|
2484
|
+
justify-content: center;
|
|
2485
|
+
padding: ${n.sp3};
|
|
2486
|
+
`,$y=e=>{const{missingReceiptsTab:i,missingTransactionCount:l,bulkUploadSelector:r,selectedPeriod:h,authParams:d,bulkUploadEndpoint:a,onBulkUploadFiles:c,onFetchBulkUploadBatches:u,onPendingMatchChange:m,setMissingReceiptsTab:p,tableSectionProps:g,bulkUploadInteractions:x,missingReceiptsBulkUploadChromeInPageBody:y,missingReceiptsCompletedChromeInPageBody:C}=e,v=be(),[I,k]=s.useState(null),{isUploading:T,handleDragOver:$,handleDragLeave:w,handleDrop:S}=x,j=r?.phase,b=a!=null||c!=null,z=r?.manualSearch;s.useEffect(()=>{if(b&&j==="completed"){const B=(r?.unmatchedFiles.length??0)+(r?.pastUnmatchedFiles.length??0);l===0&&B===0?p("completed"):B>0&&p("unmatched")}},[b,j,l,r?.unmatchedFiles.length,r?.pastUnmatchedFiles.length,p]);const A=r?.completedTransactions?.fetchState?.fetchState,M=e.onFetchCompletedTransactions,_=s.useRef(void 0);s.useEffect(()=>{if(b){const B=_.current;i==="completed"&&B!=="completed"&&h!=null&&A==="Not-Started"&&M?.()}_.current=i},[b,i,h,A,M]);const W=r?.batchListFetchState?.fetchState,H=Il({bulkUploadSelector:r,isUploading:T}),L=s.useRef(null);s.useEffect(()=>{if(!b||h==null)return;const B={month:h.month,tenantId:d.tenantId,year:h.year},Q=L.current,de=Q!=null&&(Q.month!==B.month||Q.tenantId!==B.tenantId||Q.year!==B.year),le=()=>{L.current=B};if(!(j==="uploading"||j==="matching"&&i!=="unmatched"||!(j==="completed"||i==="unmatched"))){if(de){u?.({cacheOverride:!0,invalidateBatchDetailsCache:!0}),le();return}if(W==="Not-Started"){u?.(),le();return}le()}},[b,j,i,h,W,d.tenantId,u]),s.useEffect(()=>{i!=="unmatched"&&m(null)},[i,m]);const P=b&&i==="unmatched"&&r!=null&&v!=="small",ae=r!=null&&(r.unmatchedFiles.length>0||(r.pastUnmatchedFiles?.length??0)>0),V=P&&H!==!0&&ae;return t.jsxs(Iy,{ref:k,windowSize:v,onDragOver:b?$:void 0,onDragLeave:b?w:void 0,onDrop:b?S:void 0,children:[y,C,i==="missing"?t.jsx(Ly,{windowSize:v,children:t.jsx(wl,{...g.parentProps,isCOTEnabled:g.isCOTEnabled,setIsJeAccountSettingsOpened:g.setIsJeAccountSettingsOpened,setResetJeAccountSettingsForm:g.setResetJeAccountSettingsForm,allThreadsSectionOpen:g.allThreadsSectionOpen,setCurrentFooterFormId:g.setCurrentFooterFormId,currentFooterFormId:g.currentFooterFormId,onCloseAllThreadsSection:g.onCloseAllThreadsSection})}):null,b&&i==="unmatched"&&r!=null?t.jsx(Ty,{$desktopRail:V,"data-testid":V?O("unmatched-page-splitter"):void 0,children:t.jsx(my,{authParams:e.authParams,unmatchedFiles:r.unmatchedFiles,pastUnmatchedFiles:r.pastUnmatchedFiles,manualSearchUiResetKey:r.manualSearchUiResetKey??0,confirmMatchFetchState:r.confirmMatchStatus.fetchState,isConfirmMatchInProgress:r.confirmMatchStatus.fetchState==="In-Progress",isLoading:H,isLoadingMore:r.batchDetailsPaginationState.fetchState==="In-Progress",hasMoreBatchDetails:r.hasMoreBatchDetails,isLoadingMoreManualSearch:z?.isLoadingMore===!0,isSearching:z?.fetchState.fetchState==="In-Progress"&&z?.isLoadingMore!==!0,manualSearchNextPageToken:z?.nextPageToken,manualSearchTotalCount:z?.totalCount,searchResults:r.manualSearch.results,manualSearchResultsAttachmentId:r.manualSearch.attachmentId,pendingMatchAttachmentId:e.pendingMatchAttachmentId,pendingMatchTransactionId:e.pendingMatchTransactionId,onDelete:e.onDeleteUnmatchedReceipt,onLoadMoreBatchDetails:e.onFetchMoreBatchDetails,onPendingMatchChange:m,onLoadMoreManualSearch:e.onLoadMoreManualSearch,onSearchTransactions:e.onSearchTransactionsForManualMatch,scrollRoot:I})}):null,b&&i==="completed"&&r!=null?t.jsx(gf,{authParams:e.authParams,transactionAttachmentsEndpoint:e.transactionAttachmentsEndpoint??"",transactions:r.completedTransactions.transactions,totalCount:r.completedTransactions.totalCount,nextPageToken:r.completedTransactions.nextPageToken,fetchState:r.completedTransactions.fetchState,sortKey:r.sortKey,sortOrder:r.sortOrder,onMissingReceiptsRowClick:e.onMissingReceiptsRowClick,onSortConfigChanged:e.onSetBulkUploadSortConfig,onSortReset:e.onResetBulkUploadSort,onFetchMore:B=>e.onFetchCompletedTransactions?.(B)}):null]})},zi={contentPadding:new G(f[3],f[6],f[8])},Iy=o("div",{shouldForwardProp:e=>e!=="windowSize"})`
|
|
2487
|
+
display: flex;
|
|
2488
|
+
flex-direction: column;
|
|
2489
|
+
flex: 1;
|
|
2490
|
+
min-height: 0;
|
|
2491
|
+
width: 100%;
|
|
2492
|
+
position: relative;
|
|
2493
|
+
overflow-x: hidden;
|
|
2494
|
+
overflow-y: auto;
|
|
2495
|
+
/* Scroll works; scrollbar UI hidden (same pattern as DocumentRenderer) */
|
|
2496
|
+
scrollbar-width: none;
|
|
2497
|
+
-ms-overflow-style: none;
|
|
2498
|
+
&::-webkit-scrollbar {
|
|
2499
|
+
display: none;
|
|
2500
|
+
}
|
|
2501
|
+
padding-left: ${e=>zi.contentPadding.valuePx(e.windowSize)};
|
|
2502
|
+
padding-right: ${e=>zi.contentPadding.valuePx(e.windowSize)};
|
|
2503
|
+
box-sizing: border-box;
|
|
2504
|
+
`,Ty=o.div`
|
|
2505
|
+
display: flex;
|
|
2506
|
+
flex-direction: column;
|
|
2507
|
+
flex: 0 0 auto;
|
|
2508
|
+
align-self: stretch;
|
|
2509
|
+
width: 100%;
|
|
2510
|
+
min-height: 100%;
|
|
2511
|
+
position: relative;
|
|
2512
|
+
z-index: 0;
|
|
2513
|
+
|
|
2514
|
+
& > * {
|
|
2515
|
+
position: relative;
|
|
2516
|
+
z-index: 1;
|
|
2517
|
+
}
|
|
2518
|
+
|
|
2519
|
+
${e=>e.$desktopRail===!0?`
|
|
2520
|
+
background-image: linear-gradient(
|
|
2521
|
+
to right,
|
|
2522
|
+
transparent 0,
|
|
2523
|
+
transparent calc(48% - 0.5px),
|
|
2524
|
+
${e.theme.colors.grey3} calc(48% - 0.5px),
|
|
2525
|
+
${e.theme.colors.grey3} calc(48% + 0.5px),
|
|
2526
|
+
transparent calc(48% + 0.5px),
|
|
2527
|
+
transparent 100%
|
|
2528
|
+
);
|
|
2529
|
+
background-repeat: no-repeat;
|
|
2530
|
+
background-size: 100% 100%;
|
|
2531
|
+
`:""}
|
|
2532
|
+
`,Ly=o.div`
|
|
2533
|
+
margin-left: -${e=>zi.contentPadding.valuePx(e.windowSize)};
|
|
2534
|
+
margin-right: -${e=>zi.contentPadding.valuePx(e.windowSize)};
|
|
2535
|
+
flex: 1;
|
|
2536
|
+
display: flex;
|
|
2537
|
+
`;function Ba({children:e,onDragLeave:i,onDragOver:l,onDrop:r}){return t.jsx("div",{style:{width:"100%"},onDragLeave:i,onDragOverCapture:l,onDrop:r,children:e})}function Ml(e,i,l,r){const h=i===1?l:r;return e.replace("__count__",String(i)).replace("__receiptWord__",h)}const{uncategorizedTransactionList:{missingReceipt:{bulkUpload:ki}}}=me.getLocalizedStrings(),Ay=({total:e})=>{const i=e>0?Ml(ki.autoMatchingReceipts,e,ki.receiptWordSingular,ki.receiptWordPlural):ki.autoMatchingReceiptsGeneric;return t.jsx(Ey,{children:t.jsxs(Dy,{children:[t.jsx(My,{}),t.jsx(Oy,{children:i})]})})},Ry=Vi`
|
|
2538
|
+
0% {
|
|
2539
|
+
background-position: -200% center;
|
|
2540
|
+
}
|
|
2541
|
+
100% {
|
|
2542
|
+
background-position: 200% center;
|
|
2543
|
+
}
|
|
2544
|
+
`,Ey=o.div`
|
|
2545
|
+
position: relative;
|
|
2546
|
+
display: flex;
|
|
2547
|
+
align-items: center;
|
|
2548
|
+
height: ${n.sp8};
|
|
2549
|
+
background-color: ${e=>e.theme.colors.grey5};
|
|
2550
|
+
border: 1px solid transparent;
|
|
2551
|
+
border-radius: ${n.sp2};
|
|
2552
|
+
box-sizing: border-box;
|
|
2553
|
+
overflow: hidden;
|
|
2554
|
+
margin-top: ${n.sp3};
|
|
2555
|
+
&::before {
|
|
2556
|
+
content: "";
|
|
2557
|
+
position: absolute;
|
|
2558
|
+
inset: 0;
|
|
2559
|
+
border-radius: ${n.sp2};
|
|
2560
|
+
pointer-events: none;
|
|
2561
|
+
background: ${he.receiptAgentLinearGradient};
|
|
2562
|
+
padding: 1px;
|
|
2563
|
+
mask: ${he.gradientMask};
|
|
2564
|
+
-webkit-mask: ${he.gradientMask};
|
|
2565
|
+
-webkit-mask-composite: xor;
|
|
2566
|
+
mask-composite: exclude;
|
|
2567
|
+
z-index: 0;
|
|
2568
|
+
}
|
|
2569
|
+
`,Dy=o.div`
|
|
2570
|
+
position: relative;
|
|
2571
|
+
display: flex;
|
|
2572
|
+
align-items: center;
|
|
2573
|
+
justify-content: center;
|
|
2574
|
+
width: 100%;
|
|
2575
|
+
gap: ${n.sp2};
|
|
2576
|
+
padding: 0 ${n.sp3};
|
|
2577
|
+
z-index: 1;
|
|
2578
|
+
`,My=o(Qt)`
|
|
2579
|
+
width: ${n.sp3};
|
|
2580
|
+
height: ${n.sp3};
|
|
2581
|
+
color: ${he.aiCfoGradient4};
|
|
2582
|
+
flex-shrink: 0;
|
|
2583
|
+
`,Oy=o(Re)`
|
|
2584
|
+
background: linear-gradient(
|
|
2585
|
+
90deg,
|
|
2586
|
+
${he.aiCfoGradient4} 25%,
|
|
2587
|
+
${he.aiCfoGradient1} 50%,
|
|
2588
|
+
${he.aiCfoGradient4} 75%
|
|
2589
|
+
);
|
|
2590
|
+
background-size: 200% auto;
|
|
2591
|
+
background-clip: text;
|
|
2592
|
+
-webkit-background-clip: text;
|
|
2593
|
+
-webkit-text-fill-color: transparent;
|
|
2594
|
+
animation: ${Ry} 2.5s ease-in-out infinite;
|
|
2595
|
+
`,En=20,hs=["application/pdf","image/jpeg","image/png"],Ol=hs.join(","),Py=e=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:1088,height:378,viewBox:"0 0 1088 378",fill:"none",preserveAspectRatio:"none",...e},s.createElement("rect",{x:.5,y:.5,width:1087,height:377,rx:8,ry:8,fill:"none",stroke:"currentColor",strokeWidth:1,strokeDasharray:"8 8",vectorEffect:"non-scaling-stroke"})),{uncategorizedTransactionList:{missingReceipt:{bulkUpload:_a}}}=me.getLocalizedStrings(),zy=({onFilesSelected:e})=>{const i=s.useRef(null),[l,r]=s.useState(!0);Xl();const h=s.useCallback(c=>{c.preventDefault(),c.stopPropagation(),r(!1);const u=[],{files:m}=c.dataTransfer;for(let p=0;p<m.length;p+=1){const g=m.item(p);if(g==null)continue;const x=String(g.type);if(hs.some(y=>y===x)===!0&&(u.push(g),u.length>=En))break}u.length>0&&e(u)},[e]),d=s.useCallback(c=>{c.preventDefault(),c.stopPropagation(),c.type==="dragenter"||c.type==="dragover"?r(!0):c.type==="dragleave"&&r(!1)},[]),a=s.useCallback(()=>{i.current?.click()},[]);return t.jsxs(Fy,{onClick:a,onDrop:h,onDragEnter:d,onDragLeave:d,onDragOver:d,isDragActive:l,"data-testid":O("bulk-upload-inline-drop-zone"),children:[t.jsx(By,{"aria-hidden":!0,children:t.jsx(Py,{})}),t.jsxs(_y,{children:[t.jsx(Vy,{}),t.jsx(Ny,{children:t.jsx(rr,{children:_a.dropYourFilesHere})}),l?null:t.jsx(Uy,{children:t.jsx(lr,{children:_a.orBrowseFiles})})]}),t.jsx(Wy,{ref:i,type:"file",multiple:!0,accept:Ol,onClick:c=>c.stopPropagation(),onChange:c=>{const u=c.target.files?Array.from(c.target.files):[];u.length>0&&e(u.slice(0,En)),c.target.value=""}})]})},Va=200,Na=378,Fy=o.div`
|
|
2596
|
+
display: flex;
|
|
2597
|
+
flex-direction: column;
|
|
2598
|
+
justify-content: center;
|
|
2599
|
+
align-items: center;
|
|
2600
|
+
min-height: ${e=>e.isDragActive?Na:Va}px;
|
|
2601
|
+
box-sizing: border-box;
|
|
2602
|
+
border-radius: ${n.sp2};
|
|
2603
|
+
margin: ${n.sp3} ${n.sp0};
|
|
2604
|
+
margin-bottom: ${e=>e.isDragActive?`calc(-${Na-Va}px + ${n.sp3})`:n.sp3};
|
|
2605
|
+
padding: ${n.sp4};
|
|
2606
|
+
background-color: ${e=>e.theme.colors.background};
|
|
2607
|
+
cursor: pointer;
|
|
2608
|
+
transition: all 0.3s ease;
|
|
2609
|
+
position: relative;
|
|
2610
|
+
z-index: ${e=>e.isDragActive?10:1};
|
|
2611
|
+
margin-top: ${n.sp3};
|
|
2612
|
+
`,By=o.div`
|
|
2613
|
+
position: absolute;
|
|
2614
|
+
inset: 0;
|
|
2615
|
+
z-index: 0;
|
|
2616
|
+
pointer-events: none;
|
|
2617
|
+
border-radius: inherit;
|
|
2618
|
+
overflow: hidden;
|
|
2619
|
+
color: ${e=>e.theme.colors.grey1};
|
|
2620
|
+
|
|
2621
|
+
svg {
|
|
2622
|
+
display: block;
|
|
2623
|
+
width: 100%;
|
|
2624
|
+
height: 100%;
|
|
2625
|
+
}
|
|
2626
|
+
`,_y=o.div`
|
|
2627
|
+
position: relative;
|
|
2628
|
+
z-index: 1;
|
|
2629
|
+
display: flex;
|
|
2630
|
+
flex-direction: column;
|
|
2631
|
+
align-items: center;
|
|
2632
|
+
justify-content: center;
|
|
2633
|
+
flex-grow: 1;
|
|
2634
|
+
gap: ${n.sp2};
|
|
2635
|
+
`,Vy=o(Id)`
|
|
2636
|
+
width: ${n.sp8};
|
|
2637
|
+
height: ${n.sp8};
|
|
2638
|
+
color: ${e=>e.theme.colors.hero};
|
|
2639
|
+
margin-bottom: ${n.sp2};
|
|
2640
|
+
`,Ny=o.div`
|
|
2641
|
+
color: ${e=>e.theme.colors.hero};
|
|
2642
|
+
text-align: center;
|
|
2643
|
+
`,Uy=o.div`
|
|
2644
|
+
color: ${e=>e.theme.colors.primary};
|
|
2645
|
+
`,Wy=o.input`
|
|
2646
|
+
display: none;
|
|
2647
|
+
`,Hy=e=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:1088,height:56,viewBox:"0 0 1088 56",fill:"none",preserveAspectRatio:"none",...e},s.createElement("rect",{x:.5,y:.5,width:1087,height:55,rx:8,ry:8,fill:"none",stroke:"currentColor",strokeWidth:1,strokeDasharray:"8 8",vectorEffect:"non-scaling-stroke"})),Ua="receipts@zeni.ai",qy=2e3,Ky=400,Jy=1200,Qy=2e3,{uncategorizedTransactionList:{missingReceipt:{bulkUpload:ji}},common:{copyToClipBoard:$i}}=me.getLocalizedStrings(),Gy=({onFilesSelected:e})=>{const i=s.useRef(null),[l,r]=s.useState(!1),[h,d]=s.useState(0),[a,c]=s.useState(!1),[u,m]=s.useState(0),[p,g]=s.useState(!1);s.useEffect(()=>{const k=window.setInterval(()=>{d(T=>{const $=(T+1)%3;return T===2&&$===0&&c(!0),$})},qy);return()=>window.clearInterval(k)},[]),s.useEffect(()=>{if(!a)return;const k=requestAnimationFrame(()=>{c(!1)});return()=>cancelAnimationFrame(k)},[a]),s.useEffect(()=>{if(h===1){g(!1),m(360);return}g(!0),m(0);const k=requestAnimationFrame(()=>{g(!1)});return()=>cancelAnimationFrame(k)},[h]);const x=s.useCallback(k=>{k.stopPropagation(),navigator.clipboard.writeText(Ua).then(()=>{r(!0),setTimeout(()=>r(!1),Qy)})},[]),y=s.useCallback(()=>{i.current?.click()},[]),C=s.useCallback(k=>{k.preventDefault(),k.stopPropagation();const T=[],{files:$}=k.dataTransfer;for(let w=0;w<$.length;w+=1){const S=$.item(w);if(S==null)continue;const j=String(S.type);if(hs.some(b=>b===j)===!0&&(T.push(S),T.length>=En))break}T.length>0&&e(T)},[e]),v=s.useCallback(k=>{k.preventDefault()},[]),I=()=>t.jsxs(n2,{children:[t.jsx(Wa,{children:ji.emailBannerUploadLead}),t.jsx(Vo,{children:ji.emailBannerUploadSuffix}),t.jsxs(i2,{children:[t.jsx(t2,{children:Ua}),t.jsx(xe,{display:"inline-flex",placement:"top",title:l?$i.copied:$i.copy,enterDelay:300,leaveDelay:0,children:t.jsx(o2,{type:"button","aria-label":l?$i.copied:$i.copy,onClick:x,children:l?t.jsx(a2,{}):t.jsx(s2,{})})})]})]});return t.jsxs(Yy,{onClick:y,onDrop:C,onDragOver:v,children:[t.jsx(Zy,{"aria-hidden":!0,children:t.jsx(Hy,{})}),t.jsx(Xy,{children:t.jsxs(e2,{$phase:h,$skipTransition:a,children:[t.jsx(vo,{children:I()}),t.jsx(vo,{children:t.jsxs(r2,{children:[t.jsx(l2,{$deg:u,$skipTransition:p,"aria-hidden":!0,children:t.jsx(c2,{})}),t.jsx(Wa,{children:ji.emailBannerAiLead}),t.jsx(Vo,{children:ji.emailBannerAiTail})]})}),t.jsx(vo,{children:I()})]})}),t.jsx(d2,{ref:i,type:"file",multiple:!0,accept:Ol,onClick:k=>k.stopPropagation(),onChange:k=>{const T=k.target.files?Array.from(k.target.files):[];T.length>0&&e(T.slice(0,En)),k.target.value=""}})]})},Zy=o.div`
|
|
2648
|
+
position: absolute;
|
|
2649
|
+
inset: 0;
|
|
2650
|
+
z-index: 0;
|
|
2651
|
+
pointer-events: none;
|
|
2652
|
+
border-radius: inherit;
|
|
2653
|
+
overflow: hidden;
|
|
2654
|
+
color: ${e=>e.theme.colors.grey1};
|
|
2655
|
+
|
|
2656
|
+
svg {
|
|
2657
|
+
display: block;
|
|
2658
|
+
width: 100%;
|
|
2659
|
+
height: 100%;
|
|
2660
|
+
}
|
|
2661
|
+
`,Yy=o.div`
|
|
2662
|
+
position: relative;
|
|
2663
|
+
display: flex;
|
|
2664
|
+
align-items: center;
|
|
2665
|
+
justify-content: center;
|
|
2666
|
+
gap: ${n.sp2};
|
|
2667
|
+
padding: ${n.sp3};
|
|
2668
|
+
box-sizing: border-box;
|
|
2669
|
+
cursor: pointer;
|
|
2670
|
+
border: none;
|
|
2671
|
+
border-radius: ${n.sp2};
|
|
2672
|
+
background-color: ${e=>e.theme.colors.background};
|
|
2673
|
+
isolation: isolate;
|
|
2674
|
+
margin-top: ${n.sp3};
|
|
2675
|
+
/* Stack frame (first child) under content; avoid Emotion component selectors
|
|
2676
|
+
* in parent rules — Storybook Vite preview omits @emotion/babel-plugin. */
|
|
2677
|
+
> *:not(:first-child) {
|
|
2678
|
+
position: relative;
|
|
2679
|
+
z-index: 1;
|
|
2680
|
+
}
|
|
2681
|
+
`,Xy=o.div`
|
|
2682
|
+
flex: 1;
|
|
2683
|
+
min-width: 0;
|
|
2684
|
+
height: ${n.sp4};
|
|
2685
|
+
overflow: hidden;
|
|
2686
|
+
`,e2=o.div`
|
|
2687
|
+
display: flex;
|
|
2688
|
+
flex-direction: column;
|
|
2689
|
+
transition: ${e=>e.$skipTransition?"none":`transform ${Ky}ms ease-in-out`};
|
|
2690
|
+
transform: translateY(${e=>`-${e.$phase*f[4]}px`});
|
|
2691
|
+
`,vo=o.div`
|
|
2692
|
+
flex-shrink: 0;
|
|
2693
|
+
height: ${n.sp4};
|
|
2694
|
+
line-height: ${n.sp4};
|
|
2695
|
+
display: flex;
|
|
2696
|
+
align-items: center;
|
|
2697
|
+
justify-content: center;
|
|
2698
|
+
`,Pl=o.span`
|
|
2699
|
+
font-family: ${Mc};
|
|
2700
|
+
font-size: ${n.sp3};
|
|
2701
|
+
line-height: ${n.sp4};
|
|
2702
|
+
letter-spacing: 0;
|
|
2703
|
+
color: ${e=>e.theme.colors.primary};
|
|
2704
|
+
text-decoration: none;
|
|
2705
|
+
border-bottom: none;
|
|
2706
|
+
box-shadow: none;
|
|
2707
|
+
`,Wa=o(Pl)`
|
|
2708
|
+
font-weight: ${Zn.medium};
|
|
2709
|
+
`,Vo=o(Pl)`
|
|
2710
|
+
font-weight: ${Zn.regular};
|
|
2711
|
+
`,t2=o(Vo)`
|
|
2712
|
+
text-decoration: underline;
|
|
2713
|
+
text-decoration-color: ${he.neutralGrey2Light};
|
|
2714
|
+
text-underline-offset: 0.15em;
|
|
2715
|
+
border-bottom: none;
|
|
2716
|
+
box-shadow: none;
|
|
2717
|
+
`,n2=o.span`
|
|
2718
|
+
display: inline-flex;
|
|
2719
|
+
align-items: center;
|
|
2720
|
+
flex-wrap: nowrap;
|
|
2721
|
+
gap: 0.3em;
|
|
2722
|
+
max-width: 100%;
|
|
2723
|
+
min-width: 0;
|
|
2724
|
+
white-space: nowrap;
|
|
2725
|
+
overflow: hidden;
|
|
2726
|
+
text-overflow: ellipsis;
|
|
2727
|
+
`,i2=o.span`
|
|
2728
|
+
display: inline-flex;
|
|
2729
|
+
align-items: center;
|
|
2730
|
+
align-self: center;
|
|
2731
|
+
gap: 0.35em;
|
|
2732
|
+
flex-shrink: 0;
|
|
2733
|
+
`,o2=o.button`
|
|
2734
|
+
display: inline-flex;
|
|
2735
|
+
align-items: center;
|
|
2736
|
+
justify-content: center;
|
|
2737
|
+
padding: 0;
|
|
2738
|
+
margin: 0;
|
|
2739
|
+
border: none;
|
|
2740
|
+
background: transparent;
|
|
2741
|
+
cursor: pointer;
|
|
2742
|
+
line-height: 1;
|
|
2743
|
+
flex-shrink: 0;
|
|
2744
|
+
`,s2=o(br)`
|
|
2745
|
+
width: ${n.sp3};
|
|
2746
|
+
height: ${n.sp3};
|
|
2747
|
+
flex-shrink: 0;
|
|
2748
|
+
color: ${e=>e.theme.colors.primary};
|
|
2749
|
+
`,a2=o(Dc)`
|
|
2750
|
+
width: ${n.sp3};
|
|
2751
|
+
height: ${n.sp3};
|
|
2752
|
+
flex-shrink: 0;
|
|
2753
|
+
color: ${he.success};
|
|
2754
|
+
`,r2=o.div`
|
|
2755
|
+
display: inline-flex;
|
|
2756
|
+
align-items: center;
|
|
2757
|
+
justify-content: center;
|
|
2758
|
+
gap: 0.35em;
|
|
2759
|
+
min-width: 0;
|
|
2760
|
+
max-width: 100%;
|
|
2761
|
+
white-space: nowrap;
|
|
2762
|
+
overflow: hidden;
|
|
2763
|
+
text-overflow: ellipsis;
|
|
2764
|
+
`,l2=o.div`
|
|
2765
|
+
display: inline-flex;
|
|
2766
|
+
align-items: center;
|
|
2767
|
+
justify-content: center;
|
|
2768
|
+
flex-shrink: 0;
|
|
2769
|
+
align-self: center;
|
|
2770
|
+
transition: ${e=>e.$skipTransition?"none":`transform ${Jy}ms ease-in-out`};
|
|
2771
|
+
transform: rotate(${e=>e.$deg}deg);
|
|
2772
|
+
`,c2=o(Qt)`
|
|
2773
|
+
width: ${n.sp3};
|
|
2774
|
+
height: ${n.sp3};
|
|
2775
|
+
flex-shrink: 0;
|
|
2776
|
+
display: block;
|
|
2777
|
+
color: ${e=>e.theme.colors.primary};
|
|
2778
|
+
`,d2=o.input`
|
|
2779
|
+
display: none;
|
|
2780
|
+
`,u2=({isDraggingFiles:e,onFilesSelected:i,policyDescription:l,showEmailOrDropZone:r})=>t.jsxs(h2,{children:[r?e?t.jsx(zy,{onFilesSelected:i}):t.jsx(Gy,{onFilesSelected:i}):null,l.trim().length>0?t.jsx(p2,{children:t.jsx(Re,{children:l})}):null]}),h2=o.div`
|
|
2781
|
+
display: flex;
|
|
2782
|
+
flex-direction: column;
|
|
2783
|
+
width: 100%;
|
|
2784
|
+
`,p2=o.div`
|
|
2785
|
+
text-align: center;
|
|
2786
|
+
padding: ${n.sp4} ${n.sp4};
|
|
2787
|
+
color: ${e=>e.theme.colors.hero};
|
|
2788
|
+
`,{uncategorizedTransactionList:{missingReceipt:{bulkUpload:So}}}=me.getLocalizedStrings(),Ii=2e3,Ha=1e3,ko=75;function m2(e){if(e<=Ii)return e/Ii*ko;if(e<=Ii+Ha){const i=e-Ii;return ko+i/Ha*(100-ko)}return 100}const g2=({fileCount:e,percentage:i=0})=>{const[l,r]=s.useState(0);s.useEffect(()=>{const a=performance.now(),c=()=>{const m=performance.now()-a;r(m2(m))};c();const u=window.setInterval(c,100);return()=>window.clearInterval(u)},[]);const h=Math.min(100,Math.max(l,i)),d=Ml(So.uploadingReceipts,e,So.receiptWordSingular,So.receiptWordPlural);return t.jsxs(x2,{children:[t.jsx(f2,{children:t.jsx(y2,{style:{width:`${h}%`}})}),t.jsx(w2,{children:t.jsx(C2,{children:d})})]})},x2=o.div`
|
|
2789
|
+
position: relative;
|
|
2790
|
+
display: flex;
|
|
2791
|
+
align-items: center;
|
|
2792
|
+
height: ${n.sp8};
|
|
2793
|
+
margin: ${n.sp3} ${n.sp3} ${n.sp0};
|
|
2794
|
+
background-color: ${e=>e.theme.colors.grey5};
|
|
2795
|
+
border: 1px solid ${he.success};
|
|
2796
|
+
border-radius: ${n.sp2};
|
|
2797
|
+
overflow: hidden;
|
|
2798
|
+
`,f2=o.div`
|
|
2799
|
+
position: absolute;
|
|
2800
|
+
inset: 0;
|
|
2801
|
+
overflow: hidden;
|
|
2802
|
+
`,y2=o.div`
|
|
2803
|
+
height: 100%;
|
|
2804
|
+
background-color: ${he.successLight};
|
|
2805
|
+
transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
|
|
2806
|
+
`,w2=o.div`
|
|
2807
|
+
position: relative;
|
|
2808
|
+
display: flex;
|
|
2809
|
+
align-items: center;
|
|
2810
|
+
justify-content: center;
|
|
2811
|
+
width: 100%;
|
|
2812
|
+
padding: 0 ${n.sp3};
|
|
2813
|
+
`,C2=o(Re)`
|
|
2814
|
+
color: ${he.success};
|
|
2815
|
+
`,qa=({bulkUploadPhase:e,isDraggingFiles:i,isUploading:l,matchingProgressBannerTotal:r,onFilesSelected:h,policyDescription:d,showEmailOrDropZone:a,uploadError:c,uploadFileCount:u,uploadProgressPercent:m})=>t.jsxs(b2,{children:[l?t.jsx(g2,{fileCount:u,percentage:m}):null,c!=null&&!l?t.jsx(v2,{children:c}):null,e==="matching"?t.jsx(Ay,{total:r}):null,t.jsx(u2,{isDraggingFiles:i,onFilesSelected:h,policyDescription:d,showEmailOrDropZone:a})]}),b2=o.div`
|
|
2816
|
+
display: flex;
|
|
2817
|
+
flex-direction: column;
|
|
2818
|
+
width: 100%;
|
|
2819
|
+
`,v2=o(ql)`
|
|
2820
|
+
padding: ${n.sp2} ${n.sp3};
|
|
2821
|
+
margin: ${n.sp2} ${n.sp0} ${n.sp0};
|
|
2822
|
+
background-color: ${he.importantLight};
|
|
2823
|
+
border: 1px solid ${he.important};
|
|
2824
|
+
border-radius: ${n.sp2};
|
|
2825
|
+
color: ${he.important};
|
|
2826
|
+
text-align: center;
|
|
2827
|
+
`,{uncategorizedTransactionList:{missingReceipt:{bulkUpload:gn}}}=me.getLocalizedStrings(),S2=[{id:"all",label:gn.completedSubTabAll},{id:"ai_accountant",label:gn.completedSubTabAiAccountant},{id:"manual",label:gn.completedSubTabManual}],Ka=({activeSubTab:e,totalCount:i,onSubTabChange:l,completedTransactionsFetchState:r,completedTransactionsLoadedCount:h=0})=>{const d=r?.fetchState,a=(h>0||r!=null&&d!=="Not-Started"&&d!=="In-Progress")&&i>0,c=s.useMemo(()=>{switch(e){case"all":return gn.completedDescriptionAll;case"ai_accountant":return gn.completedDescriptionAi.replace("__count__",i.toString());case"manual":return gn.completedDescriptionManual;default:return gn.completedDescriptionAll}},[e,i]);return t.jsxs(k2,{children:[t.jsx(j2,{children:S2.map(u=>t.jsx($2,{isActive:e===u.id,onClick:()=>{l(u.id)},children:t.jsx(st,{children:u.label})},u.id))}),a?t.jsxs(I2,{children:[e==="ai_accountant"?t.jsx(T2,{}):null,t.jsx(L2,{children:t.jsx(Re,{children:c})})]}):null]})},k2=o.div`
|
|
2828
|
+
display: flex;
|
|
2829
|
+
flex-direction: column;
|
|
2830
|
+
width: 100%;
|
|
2831
|
+
margin-top: ${n.sp4};
|
|
2832
|
+
`,j2=o.div`
|
|
2833
|
+
display: flex;
|
|
2834
|
+
align-items: center;
|
|
2835
|
+
gap: ${n.sp3};
|
|
2836
|
+
padding-bottom: ${n.sp3};
|
|
2837
|
+
`,$2=o.button`
|
|
2838
|
+
box-sizing: border-box;
|
|
2839
|
+
padding: ${n.sp1} ${n.sp2};
|
|
2840
|
+
border-radius: ${n.sp1};
|
|
2841
|
+
border: 1px solid
|
|
2842
|
+
${e=>e.isActive?e.theme.colors.primary:"transparent"};
|
|
2843
|
+
background-color: transparent;
|
|
2844
|
+
color: ${e=>e.isActive?e.theme.colors.primary:e.theme.colors.hero};
|
|
2845
|
+
cursor: ${e=>e.isActive?"default":"pointer"};
|
|
2846
|
+
transition:
|
|
2847
|
+
border-color 0.15s ease,
|
|
2848
|
+
color 0.15s ease;
|
|
2849
|
+
|
|
2850
|
+
&:hover {
|
|
2851
|
+
color: ${e=>e.theme.colors.primary};
|
|
2852
|
+
}
|
|
2853
|
+
`,I2=o.div`
|
|
2854
|
+
display: flex;
|
|
2855
|
+
align-items: center;
|
|
2856
|
+
justify-content: center;
|
|
2857
|
+
gap: ${n.sp1};
|
|
2858
|
+
padding-bottom: ${n.sp4};
|
|
2859
|
+
`,T2=o(Qt)`
|
|
2860
|
+
width: ${n.sp3};
|
|
2861
|
+
height: ${n.sp3};
|
|
2862
|
+
flex-shrink: 0;
|
|
2863
|
+
`,L2=o.div`
|
|
2864
|
+
color: ${e=>e.theme.colors.champion};
|
|
2865
|
+
text-align: center;
|
|
2866
|
+
`;async function A2(e,i,l,r){const h=new FormData;l.forEach((d,a)=>{h.append(`attachment_file_${a}`,d);const c=JSON.stringify({file_name:d.name,content_type:d.type,size:d.size});h.append(`attachment_json_${a}`,c)});try{const d=await(await Wl(e,{method:"POST",body:h,headers:{"zeni-user-id":i.userId,"zeni-tenant-id":i.tenantId,"zeni-session-id":i.sessionId}})).json();if(d.status.code>=200&&d.status.code<300)return d.data;throw console.error(`Bulk upload failed with ${d.status.message}`),r?.(d.status.message),new Error(`Bulk upload failed: ${d.status.message}`)}catch(d){throw console.error(`Bulk upload failed: ${JSON.stringify(d)}`),d}}function R2(e){const{authParams:i,bulkUploadEndpoint:l,onBulkUploadFilesFallback:r,onBulkUploadProgress:h,onBulkUploadSuccess:d,onBulkUploadUploadedFileCount:a}=e,[c,u]=s.useState(!1),[m,p]=s.useState(0),[g,x]=s.useState(!1),[y,C]=s.useState(null),v=s.useCallback(async $=>{const w=$.slice(0,En);if(p(w.length),u(!1),C(null),l!=null){a?.(w.length),x(!0);try{const S=await A2(l,i,w,C);h?.(100),await new Promise(j=>{window.setTimeout(j,hd)}),d?.(S.batch_id)}catch{C("Upload failed. Please try again.")}finally{x(!1)}}else r?.(w)},[l,i,h,d,a,r]),I=s.useCallback($=>{$.preventDefault(),$.stopPropagation(),u(!0)},[]),k=s.useCallback($=>{const w=$.relatedTarget,S=$.currentTarget;w&&S.contains(w)||($.preventDefault(),$.stopPropagation(),u(!1))},[]),T=s.useCallback($=>{$.preventDefault(),$.stopPropagation();const w=Array.from($.dataTransfer.files).slice(0,En);w.length>0?v(w):u(!1)},[v]);return{isDraggingFiles:c,uploadFileCount:m,isUploading:g,uploadError:y,handleBulkUploadFiles:v,handleDragOver:I,handleDragLeave:k,handleDrop:T}}const E2=e=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M22.9902 12.0403L1.12726 12.0403",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M7.68994 5.60718L1.00953 12.0402L7.68994 18.4732",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),D2=e=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M12 22.0619L11.4825 21.5444C9.66604 19.7284 7.20261 18.7082 4.63406 18.7084H2.17687C1.92268 18.7082 1.67898 18.607 1.49932 18.4272C1.31966 18.2474 1.21875 18.0036 1.21875 17.7494V2.89563C1.21875 2.64152 1.3197 2.39781 1.49938 2.21813C1.67906 2.03845 1.92276 1.9375 2.17687 1.9375H3.94219C5.53731 1.93666 7.10793 2.32989 8.51448 3.08223C9.92104 3.83457 11.12 4.92273 12.0047 6.25L12 22.0619Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M12 22.0619L12.5175 21.5444C14.334 19.7284 16.7974 18.7082 19.3659 18.7084H21.8231C22.0773 18.7082 22.321 18.607 22.5007 18.4272C22.6803 18.2474 22.7813 18.0036 22.7812 17.7494V2.89563C22.7812 2.64152 22.6803 2.39781 22.5006 2.21813C22.3209 2.03845 22.0772 1.9375 21.8231 1.9375H20.0625C18.4674 1.93666 16.8968 2.32989 15.4902 3.08223C14.0837 3.83457 12.8847 4.92273 12 6.25V22.0619Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M4.07031 6.47765C5.88047 6.33155 7.68276 6.84169 9.14781 7.91484",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M4.07031 10.3118C5.88051 10.1652 7.68295 10.6754 9.14781 11.7489",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M4.07031 14.1435C5.88058 13.9978 7.68285 14.5083 9.14781 15.5817",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M18.5882 8.40625H16.6392C16.3407 8.40684 16.0516 8.51125 15.8217 8.70157C15.5917 8.8919 15.4351 9.15629 15.3786 9.44943C15.3222 9.74258 15.3695 10.0462 15.5125 10.3083C15.6554 10.5704 15.885 10.7746 16.162 10.8859L18.1392 11.6762C18.4162 11.7876 18.6458 11.9918 18.7887 12.2539C18.9316 12.516 18.9789 12.8196 18.9225 13.1128C18.8661 13.4059 18.7095 13.6703 18.4795 13.8606C18.2495 14.0509 17.9605 14.1553 17.662 14.1559H15.7129",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M17.1504 8.40656V7.6875",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M17.1504 14.8753V14.1562",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),M2=o.div`
|
|
2867
|
+
width: 100%;
|
|
2868
|
+
height: 100vh;
|
|
2869
|
+
display: flex;
|
|
2870
|
+
flex-direction: column;
|
|
2871
|
+
background: ${e=>e.theme.colors.grey4};
|
|
2872
|
+
box-shadow: ${e=>e.theme.colors.elevation1};
|
|
2873
|
+
`,O2=o.div`
|
|
2874
|
+
display: flex;
|
|
2875
|
+
flex-direction: column;
|
|
2876
|
+
align-items: center;
|
|
2877
|
+
min-width: 100%;
|
|
2878
|
+
min-height: 0;
|
|
2879
|
+
flex: 1;
|
|
2880
|
+
|
|
2881
|
+
${e=>e.theme.breakpoints.down("md")} {
|
|
2882
|
+
width: 100%;
|
|
2883
|
+
padding-left: ${n.sp0};
|
|
2884
|
+
}
|
|
2885
|
+
`,Ja=o(Hl)`
|
|
2886
|
+
height: ${n.sp3};
|
|
2887
|
+
width: ${n.sp3};
|
|
2888
|
+
cursor: pointer;
|
|
2889
|
+
color: inherit;
|
|
2890
|
+
`,Qa=o(E2)`
|
|
2891
|
+
height: ${n.sp3};
|
|
2892
|
+
width: ${n.sp3};
|
|
2893
|
+
cursor: pointer;
|
|
2894
|
+
color: inherit;
|
|
2895
|
+
`,{common:{footer:Pe,texts:{maxLimitReached:P2,confirmAction:z2},headers:zl,create:F2,strings:Un,texts:An,cancel:B2,confirm:_2,monthsByIndex:V2},dateFormat:{visual:{MMMDCommaYYYYformat:Ga}},expenseAutomation:Rn,uncategorizedTransactionList:{missingReceipt:{bulkUpload:Za}}}=me.getLocalizedStrings(),N2=({setActivityLogTransactionId:e})=>{const{selectedTransactionId:i}=Fi(),l=Tt(),[r,h]=s.useState(!1);return i==null?null:t.jsx(xe,{title:Rn.transactions.header.activity,placement:"bottom",children:t.jsx(lw,{"data-testid":O("panel-activity-button"),onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),onClick:d=>{d.stopPropagation(),e(i)},children:t.jsx(cw,{style:{color:r?l.colors.primary:l.colors.hero}})})})};function U2(...e){for(const i of e)if(i!=null&&i>0&&!Number.isNaN(i))return i;return 0}const Lw=e=>{const{expenseAutomationViewSelector:i,isDisabled:l,isRealtimeInsightsFeatureEnabled:r,isUncategorizedExpenseCategoryEnabled:h,isCOTEnabled:d,onUpdateTab:a,onReconTabUpdate:c,onUpdateStep:u,onSearchTextChanged:m,onRefresh:p,onClose:g,onBack:x,onBulkUploadConfirmMatchAcknowledged:y,onClearMissingReceiptsTabNavigation:C,closeSidePanel:v,initialMissingReceiptsTab:I,resetTransactionCategorizationLocalData:k,updateOperatingExpensesIdsForReview:T,clearJeScheduleLocalData:$,onSaveReconciliation:w}=e,S=e.bulkUploadEndpoint!=null||e.onBulkUploadFiles!=null,j=R2({authParams:e.authParams,bulkUploadEndpoint:e.bulkUploadEndpoint,onBulkUploadProgress:e.onBulkUploadProgress,onBulkUploadSuccess:e.onBulkUploadSuccess,onBulkUploadUploadedFileCount:e.onBulkUploadUploadedFileCount,onBulkUploadFilesFallback:e.onBulkUploadFiles}),{currentSelectedView:b,allSteps:z,missingReceipts:A,jeSchedules:M,fluxAnalysis:_,monthEndInsights:W,transactionView:H,selectedTransactionCategorizationTab:L,reconciliation:P,selectedPeriod:ae}=i,{pendingMissingReceiptsTabNavigation:V}=A,[B,Q]=s.useState("expenseAutomationPage"),[de,le]=s.useState(()=>{}),[ge,te]=s.useState(!1),K=be(),Z=!!e.loggedInUser?.userEmail?.includes("zeni.ai"),D=Z?tr:nr,{openThread:R,setOpenThread:J}=s.useContext(D),[N,Y]=s.useState(!1),[ne,q]=s.useState(!1),[U,F]=s.useState(I??"missing"),oe=s.useRef(null);s.useEffect(()=>{const Le=oe.current;Le!==null&&Le!==U&&v?.(),oe.current=U},[U,v]);const ee=s.useCallback(Le=>{F(Le)},[]),[X,ke]=s.useState(null),Ie=s.useCallback(Le=>{ke(Le),Q(Le!=null?"expenseAutomationMissingReceipts":"expenseAutomationPage")},[Q]),E=e.bulkUploadSelector?.confirmMatchStatus.fetchState,ce=s.useRef(void 0);s.useEffect(()=>{ce.current==="In-Progress"&&E==="Completed"&&X!=null&&(Ie(null),y?.()),ce.current=E},[E,X,Ie,y]),s.useEffect(()=>{U!=="unmatched"&&Ie(null)},[U,Ie]),s.useEffect(()=>{V==="unmatched"&&(S&&ee("unmatched"),C?.())},[V,C,S,ee]),s.useEffect(()=>{S===!1&&(U==="unmatched"||U==="completed")&&ee("missing")},[S,U,ee]);const je=z.find(Le=>Le.step===b),{nextStep:Me,previousStep:De}=q2(z,b),{uiState:{searchString:Fe,pageToken:ve},totalCountByTab:et,transactions:ht,fetchStateByTransactionTabs:tt,transactionLocalData:fe}=H,{selectedReconAccount:Be,reconciliationTabsState:{reconcile:{localData:{selectedTransactionIds:Vt}}}}=P;let nt="Not-Started",pt="complete";switch(b){case"missing_receipts":nt=A.refreshStatus.fetchState,pt=A.completionStatus;break;case"je_schedules":nt=M.refreshStatus.fetchState,pt=M.completionStatus;break;case"month_end_insights":W!=null&&(nt=W?.fetchState);break;case"flux_analysis":nt=_.refreshStatus.fetchState,pt=_.completionStatus;break;case"transaction_categorization":nt=H.refreshStatus.fetchState,pt=H.completionStatus;break;case"reconciliation":Be==null?(nt=P.refreshStatus.fetchState,pt=P.completionStatus):(nt=P.selectedReconAccount?.refreshStatus.fetchState??"Not-Started",pt=P.completionStatus)}const Lt=()=>{de()},{saveStatus:Ee,selectedCheckBoxTransactionIds:$e}=H,Ke=()=>{const Le=Xr(i.fluxAnalysis.sections,i.fluxAnalysis.reviewOperatingExpensesIds);switch(B){case"expenseAutomationFluxPage":return{formId:"expenseAutomationFluxPage",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Le===!0?Pe.markAsReviewed:An.undo,style:{justifyContent:"space-evenly"},isLoading:i.fluxAnalysis.bulkReviewStatus.fetchState==="In-Progress",isDisabled:!1},leftSideComponent:jo(i.fluxAnalysis.reviewOperatingExpensesIds.length,Fr,K,An.vendor,b),cancelBtn:{label:Pe.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>{T([])}}};case"expenseAutomationTransactionsPage":return{formId:"expenseAutomationTransactionsPage",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Pe.save,style:{minWidth:"96px",justifyContent:"space-evenly"},isLoading:Ee.fetchState==="In-Progress",isDisabled:!1},leftSideComponent:jo($e.length,Hn,K,An.transaction,b),cancelBtn:{label:Pe.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>{k(L,ht.map(Ge=>Ge.id),ae,!1,et[L],Cs(fe,L),h,ve)}}};case"expenseAutomationJESchedulePage":return{formId:"expenseAutomationJESchedulePage",nextBtnLabel:Pe.next,backBtnLabel:Pe.back,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Pe.next,style:{justifyContent:"space-evenly"},isDisabled:l||je?.isNextDisabled,suffixIcon:t.jsx(Ja,{}),onClick:()=>{u(Me.step)}},cancelBtn:{label:Pe.back,isDisabled:l||je?.isPrevDisabled,style:{width:"96px",justifyContent:"space-evenly"},prefixIcon:t.jsx(Qa,{}),onClick:()=>{u(De.step)}}};case"expenseAutomationBankReconReconcilePage":return{formId:"expenseAutomationBankReconReconcilePage",nextBtnLabel:Pe.reconcile,backBtnLabel:Pe.saveForLater,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Pe.reconcile,onClick:()=>{w({reconcileAction:"reconcile"})},isDisabled:P.reconciliationTabsState.balances.variance.amount!==0,isLoading:P.actionFetchStates.reconcileFetch.fetchState==="In-Progress",style:{justifyContent:"space-evenly",minWidth:132}},leftSideComponent:jo(Vt.length,1/0,K,An.transaction,b),cancelBtn:{onClick:()=>{w({reconcileAction:"save_reconcile_for_later"})},reverseSpinnerColor:!1,isLoading:P.actionFetchStates.saveForLaterFetch.fetchState==="In-Progress",label:Pe.saveForLater,style:{minWidth:132,justifyContent:"space-evenly"}}};case"expenseAutomationJEAccountSettingsPage":return{formId:"expenseAutomationJEAccountSettingsPage",nextBtnLabel:Pe.save,backBtnLabel:Pe.cancel,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Pe.save,isLoading:M.accountSettingsView.saveState.fetchState==="In-Progress",style:{justifyContent:"space-evenly",minWidth:82}},cancelBtn:{onClick:()=>Lt(),label:Pe.cancel,style:{minWidth:82,justifyContent:"space-evenly"}}};case"expenseAutomationMissingReceipts":return{formId:"expenseAutomationMissingReceipts",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Za.confirmMatch,isLoading:e.bulkUploadSelector?.confirmMatchStatus.fetchState==="In-Progress",isDisabled:X==null||e.bulkUploadSelector?.confirmMatchStatus.fetchState==="In-Progress",style:{minWidth:"96px",justifyContent:"space-evenly"},onClick:()=>{X!=null&&e.bulkUploadSelector?.confirmMatchStatus.fetchState!=="In-Progress"&&e.onConfirmBulkUploadMatch?.(X.batchId,X.attachmentId,X.transactionId,X.transactionType,X.fileName)}},cancelBtn:{label:Pe.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>Ie(null)}};default:{const Ge=b==="reconciliation"&&i.reconciliation.selectedTab==="review"&&i.reconciliation.selectedAccountId!=null,bt=b==="reconciliation"&&i.reconciliation.selectedAccountId==null,vt=b==="reconciliation"&&i.reconciliation.selectedTab==="reconcile"&&i.reconciliation.selectedAccountId!=null,ai=Me.step==="month_end_insights"&&(b==="flux_analysis"&&(i.fluxAnalysis.sections.generalExpense?.balancesByMonth!=null||i.fluxAnalysis.sections.reimbursement?.balancesByMonth!=null)||bt),ri=b==="transaction_categorization"&&i.selectedTransactionCategorizationTab==="review",li=b==="transaction_categorization"&&i.selectedTransactionCategorizationTab==="autoCategorized",qi=i.monthEndCloseChecksView.monthEndCloseChecks?.monthEndCloseCheckList.find(ie=>ie.id==="month_end_insights"),lt=i.monthEndCloseChecksView.monthEndCloseChecks?.reportEmailSentDate==null&&qi?.isDisabled===!1&&(r||je?.isNextDisabled===!1),On=Me.step==="month_end_insights"&&(bt||b==="flux_analysis")?!lt:je?.isNextDisabled===!0;return{formId:"expenseAutomationPage",nextBtnLabel:Pe.next,backBtnLabel:Pe.back,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:ai===!0?H2(i.selectedPeriod.month):Pe.next,style:{justifyContent:"space-evenly"},isDisabled:On,suffixIcon:t.jsx(Ja,{}),onClick:()=>{ri?a("autoCategorized"):Ge?c("reconcile"):u(Me.step)}},cancelBtn:{label:Pe.back,isDisabled:l||je?.isPrevDisabled,style:{width:"96px",justifyContent:"space-evenly"},prefixIcon:t.jsx(Qa,{}),onClick:()=>{li?a("review"):vt?c("review"):Ge?x():u(De.step)}}}}}},ye=()=>{switch(B){case"expenseAutomationFluxPage":return{confirmAction:()=>{Y(!1),T([]),g()}};case"expenseAutomationTransactionsPage":return{confirmAction:()=>{Y(!1),k(L,ht.map(Le=>Le.id),ae,!1,et[L],Cs(fe,L),h,ve),g()}};case"expenseAutomationJESchedulePage":return{confirmAction:()=>{Y(!1),$(),g()}};default:return{confirmAction:()=>{Y(!1)},confirmationDescription:Un.empty}}},_e=()=>{B==="expenseAutomationFluxPage"||B==="expenseAutomationJESchedulePage"||B==="expenseAutomationTransactionsPage"?Y(!0):g()},{primaryBtn:wt,cancelBtn:yn,leftSideComponent:Qe}=Ke(),{confirmAction:wn}=ye(),Cn=Le=>{if(b==="transaction_categorization"&&(Le==="autoCategorized"||Le==="review")){const Ge=Le;return{hideCountInTab:et[Ge]>Rn.common.numbers.maximumCount,count:et[Ge],isFetching:tt[Ge].fetchState==="In-Progress"}}if(b==="reconciliation"){const{reconciliation:Ge}=i,{selectedAccountId:bt}=Ge;return bt==null?{count:0,isFetching:!1}:Le==="review"?{count:Ge.accountReconciliationsByAccountID[bt]?.accountReconEntity?.transactionsToReview.length,isFetching:Ge.accountReconciliationsByAccountID[bt]?.transactionFetchState.fetchState==="In-Progress"}:{count:Ge.accountReconciliationsByAccountID[bt]?.accountReconEntity?.transactionsToReconcile.length,isFetching:Ge.accountReconciliationsByAccountID[bt]?.transactionFetchState.fetchState==="In-Progress"}}if(b==="missing_receipts"){if(Le==="missing")return{count:A.transactions.length,isFetching:A.fetchState==="In-Progress"};if(Le==="unmatched")return{count:(e.bulkUploadSelector?.unmatchedFiles.length??0)+(e.bulkUploadSelector?.pastUnmatchedFiles.length??0),isFetching:U==="unmatched"&&Il({bulkUploadSelector:e.bulkUploadSelector})};if(Le==="completed")return{count:e.bulkUploadSelector?.completedTransactions?.totalCount??0,isFetching:e.bulkUploadSelector?.completedTransactions?.fetchState?.fetchState==="In-Progress",hideCountInTab:!0}}},Ct=b==="reconciliation"&&P.selectedAccountId!=null&&P.selectedReconAccount!=null,{month:Zt,year:Yt}=ae,Xt=ud().set("month",Zt-1).set("year",Yt),ni=Xt.startOf("month").format(Ga),Dn=Xt.endOf("month").format(Ga),Ni=`${ni} ${Un.hyphen} ${Dn}`,en=e.sidePanelIsOpen??!1,tn=e.sidePanelIsFullView??!1,Mn=b==="missing_receipts"&&U==="missing"&&S,ii=e.bulkUploadSelector?.phase,oi=e.bulkUploadSelector,Ui=U2(oi?.progress.total,oi?.uploadedFileCount,j.uploadFileCount),Wi=U==="completed"&&e.bulkUploadSelector!=null&&e.bulkUploadSelector.completedTransactions.fetchState.fetchState==="Completed"&&e.bulkUploadSelector.completedTransactions.totalCount===0,si={bulkUploadPhase:ii,isDraggingFiles:j.isDraggingFiles,isUploading:j.isUploading===!0,matchingProgressBannerTotal:Ui,onFilesSelected:j.handleBulkUploadFiles,policyDescription:Wi?"":Za.policyDescription,showEmailOrDropZone:j.isUploading!==!0&&ii!=="matching"&&A.fetchState!=="In-Progress"&&A.fetchState!=="Not-Started",uploadError:j.uploadError,uploadFileCount:j.uploadFileCount,uploadProgressPercent:e.bulkUploadSelector?.uploadProgress??0},We=b==="missing_receipts"&&U==="completed"&&S&&e.bulkUploadSelector!=null,nn={onDragLeave:j.handleDragLeave,onDragOver:j.handleDragOver,onDrop:j.handleDrop},Hi=Mn===!0&&!(en&&tn)?t.jsx(Ba,{...nn,children:t.jsx(qa,{...si})}):We===!0&&!(en&&tn)&&e.bulkUploadSelector!=null?t.jsx(Ka,{activeSubTab:e.bulkUploadSelector.completedSubTab,completedTransactionsFetchState:e.bulkUploadSelector.completedTransactions.fetchState,completedTransactionsLoadedCount:e.bulkUploadSelector.completedTransactions.transactions.length,onSubTabChange:Le=>{e.onSetBulkUploadCompletedSubTab?.(Le)},totalCount:e.bulkUploadSelector.completedTransactions.totalCount}):null;return t.jsxs(M2,{children:[N?t.jsx(Bl,{containerStyle:{width:356},titleComponent:t.jsx(Y2,{children:z2}),primaryButtonText:_2,secondaryButtonText:B2,proceedButtonVariant:"danger",action:{onOkClick:()=>{wn()},onCancelClick:()=>Y(!1)},descriptionComponent:t.jsx(X2,{children:Rn.confirmationDescription})}):null,t.jsx(_l,{isOpen:e.sidePanelIsOpen??!1,isFullView:e.sidePanelIsFullView??!1,panelContent:e.panelContent,panelActionBarContent:e.isTransactionActivityEnabled?t.jsx(N2,{setActivityLogTransactionId:e.setActivityLogTransactionId}):null,headerContent:t.jsx(su,{hideEmptyDivBelowTabs:b==="missing_receipts",onBack:x,navBarCustomElement:b==="reconciliation"&&P.selectedAccountId!=null?t.jsx(W2,{reconciliation:P}):void 0,onReconTabUpdate:c,currentRecontab:P.selectedTab,bulkUploadPhase:e.bulkUploadSelector?.phase,currentMissingReceiptsTab:U,onMissingReceiptsTabUpdate:ee,reconcileDetailPageFetchState:P.selectedAccountId!=null?P.accountReconciliationsByAccountID[P.selectedAccountId]?.transactionFetchState.fetchState:"Not-Started",selectedReconAccountId:Ct?P.selectedAccountId:void 0,currentSelectedView:b,titleStyle:{justifyContent:"center",marginLeft:n.sp0},headerData:He(b,et.autoCategorized,Ct?P.selectedAccountId:void 0,Ct?P.selectedReconAccount?.accountReconEntity?.account.accountName:void 0,Ct?Ni:void 0,b==="missing_receipts"?{includeBulkUploadTabs:S,navTitle:S?zl.receipts:void 0}:void 0),searchText:Fe,currentTab:L,getTabCountAndFetchState:Cn,completionStatus:pt,forceShowSubtitle:ge===!0||b==="je_schedules"&&(M.fetchState==="In-Progress"||M.accountSettingsView.fetchState==="In-Progress"),refreshStatus:nt,companyId:e.companyId,companyName:i.monthEndInsights?.companyName??Un.empty,isZeniUser:Z,onAllThreadsClick:()=>{R!=null&&J(null),q(!0)},onUpdateTab:a,onSearchTextChanged:m,onRefresh:b==="missing_receipts"?()=>{switch(U){case"missing":e.onFetchMissingReceiptsList();break;case"unmatched":e.onFetchBulkUploadBatches?.({cacheOverride:!0,invalidateBatchDetailsCache:!0});break;case"completed":e.onFetchCompletedTransactions?.(void 0,!0);break}}:p,onClose:_e,belowTabsSlot:Hi}),listContent:t.jsxs(O2,{children:[b==="missing_receipts"?t.jsx($y,{missingReceiptsTab:U,missingTransactionCount:A.transactions.length,missingReceiptsBulkUploadChromeInPageBody:Mn===!0&&en&&tn?t.jsx(Ba,{...nn,children:t.jsx(qa,{...si})}):null,missingReceiptsCompletedChromeInPageBody:We===!0&&en&&tn&&e.bulkUploadSelector!=null?t.jsx(Ka,{activeSubTab:e.bulkUploadSelector.completedSubTab,completedTransactionsFetchState:e.bulkUploadSelector.completedTransactions.fetchState,completedTransactionsLoadedCount:e.bulkUploadSelector.completedTransactions.transactions.length,onSubTabChange:Le=>{e.onSetBulkUploadCompletedSubTab?.(Le)},totalCount:e.bulkUploadSelector.completedTransactions.totalCount}):null,bulkUploadInteractions:j,bulkUploadSelector:e.bulkUploadSelector,selectedPeriod:ae,authParams:e.authParams,bulkUploadEndpoint:e.bulkUploadEndpoint,transactionAttachmentsEndpoint:e.transactionAttachmentsEndpoint,onBulkUploadSuccess:e.onBulkUploadSuccess,onBulkUploadFiles:e.onBulkUploadFiles,onFetchBulkUploadBatches:e.onFetchBulkUploadBatches,onFetchMoreBatchDetails:e.onFetchMoreBatchDetails,onFetchCompletedTransactions:e.onFetchCompletedTransactions,onDeleteUnmatchedReceipt:e.onDeleteUnmatchedReceipt,onLoadMoreManualSearch:e.onLoadMoreManualSearch,onSearchTransactionsForManualMatch:e.onSearchTransactionsForManualMatch,onPendingMatchChange:Ie,pendingMatchAttachmentId:X?.attachmentId??null,pendingMatchTransactionId:X?.transactionId??null,onMissingReceiptsRowClick:e.onMissingReceiptsRowClick,onSetBulkUploadCompletedSubTab:e.onSetBulkUploadCompletedSubTab,onSetBulkUploadSortConfig:e.onSetBulkUploadSortConfig,onResetBulkUploadSort:e.onResetBulkUploadSort,setMissingReceiptsTab:ee,tableSectionProps:{parentProps:e,isCOTEnabled:d,setIsJeAccountSettingsOpened:te,setResetJeAccountSettingsForm:le,allThreadsSectionOpen:ne,setCurrentFooterFormId:Q,currentFooterFormId:B,onCloseAllThreadsSection:()=>q(!1)}}):t.jsx(wl,{...e,isCOTEnabled:d,setIsJeAccountSettingsOpened:te,setResetJeAccountSettingsForm:le,allThreadsSectionOpen:ne,setCurrentFooterFormId:Q,currentFooterFormId:B,onCloseAllThreadsSection:()=>q(!1)}),t.jsx(Ze,{controller:b!=="month_end_insights"&&e.sidePanelIsOpen!==!0,children:t.jsx(ir,{style:{width:"-webkit-fill-available",maxHeight:f[8]},formId:K2(B),primaryBtn:wt,leftSideComponent:Qe,cancelBtn:yn,separatorStyle:{marginRight:n.sp4}})})]})})]})},W2=({reconciliation:e})=>{const i=Tt(),{clearedBalance:l,variance:r,variancePercentage:h,deposits:d,payments:a}=e.reconciliationTabsState.balances,{balance:c}=e.selectedReconAccount?.accountReconEntity??{},{selectedReconAccount:u}=e,{transactionFetchState:m}=u??{};return t.jsx(ew,{children:t.jsxs(tw,{children:[t.jsxs($o,{style:{justifyContent:"flex-end",width:"50%"},children:[t.jsx(Io,{children:t.jsx(nw,{})}),t.jsx(To,{children:m?.fetchState==="In-Progress"?t.jsxs(Ro,{children:[t.jsx($n,{height:25,width:120}),t.jsx($n,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsx(Ao,{children:it("0,0.00",c)}),t.jsx(Lo,{children:Rn.accountRecon.reconciliation.headers.bankBalance})]})})]}),t.jsxs($o,{children:[t.jsx(Io,{children:t.jsx(ow,{})}),t.jsx(To,{children:m?.fetchState==="In-Progress"?t.jsxs(Ro,{children:[t.jsx($n,{height:25,width:120}),t.jsx($n,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsx(Ao,{children:it("0,0.00",l)}),t.jsxs(aw,{children:[t.jsx(Lo,{children:Rn.accountRecon.reconciliation.headers.clearedBalance}),t.jsx(xe,{placement:"bottom",title:t.jsxs(rw,{children:[t.jsxs(Ya,{children:[t.jsxs(Xa,{children:[a.count," ",An.payments]}),t.jsx(er,{children:it("0,0.[00]",a.totalAmount)})]}),t.jsxs(Ya,{children:[t.jsxs(Xa,{children:[d.count," ",An.deposits]}),t.jsx(er,{children:it("0,0.[00]",d.totalAmount)})]})]}),display:"flex",children:t.jsx(sw,{})})]})]})})]}),t.jsxs($o,{style:{justifyContent:"flex-start",width:"50%"},children:[t.jsx(Io,{children:t.jsx(iw,{})}),t.jsx(To,{children:m?.fetchState==="In-Progress"?t.jsxs(Ro,{children:[t.jsx($n,{height:25,width:120}),t.jsx($n,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsxs(Ao,{children:[t.jsx("span",{style:{color:r.amount===0?i.colors.brandColorJadeDark:i.colors.primary},children:it("0,0.00",r)}),h!=null&&r.amount!==0?t.jsx("span",{style:{color:i.colors.primary,marginLeft:2},children:`(${h.toFixed(2)}%)`}):null]}),t.jsx(Lo,{children:Rn.accountRecon.reconciliation.headers.variance})]})})]})]})})},jo=(e,i,l,r,h)=>{const d=r,a=(e>1?d+"s":d)+" selected";return e>0?t.jsxs(J2,{currentView:h,style:l==="small"?{position:"absolute",top:n.sp2,left:`-${n.sp5}`}:{},children:[t.jsx(Q2,{multiDigit:e>=5,children:e}),t.jsx(G2,{children:a}),e===i?t.jsx(Z2,{children:`(${P2})`}):null]}):null},H2=e=>{const i=V2[e];return`${F2}${Un.space}${i}${Un.space}${zl.insights}`};function q2(e,i){const l=e.findIndex(c=>c.step===i);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,d=e[r],a=e[h];return{nextStep:d,previousStep:a}}const K2=e=>`${e}_form`,J2=o.div`
|
|
2896
|
+
display: flex;
|
|
2897
|
+
justify-content: flex-start;
|
|
2898
|
+
align-items: center;
|
|
2899
|
+
gap: ${n.sp2};
|
|
2900
|
+
margin-left: ${e=>e.currentView==="flux_analysis"?"36px":n.sp8};
|
|
2901
|
+
`,Q2=o(Ye)`
|
|
2902
|
+
height: 18px;
|
|
2903
|
+
width: ${e=>e.multiDigit?"auto":"18px"};
|
|
2904
|
+
padding: ${n.sp0} 6px;
|
|
2905
|
+
border-radius: ${n.sp12};
|
|
2906
|
+
border: ${e=>`1px solid ${e.theme.colors.primary}`};
|
|
2907
|
+
display: flex;
|
|
2908
|
+
justify-content: center;
|
|
2909
|
+
align-items: center;
|
|
2910
|
+
`,G2=o(Re)`
|
|
2911
|
+
color: ${e=>e.theme.colors.primary};
|
|
2912
|
+
`,Z2=o(st)`
|
|
2913
|
+
color: ${he.important};
|
|
2914
|
+
`,Y2=o(Fl)`
|
|
2915
|
+
margin-top: ${n.sp5};
|
|
2916
|
+
padding-left: ${n.sp8};
|
|
2917
|
+
padding-right: ${n.sp8};
|
|
2918
|
+
color: ${e=>e.theme.colors.primary};
|
|
2919
|
+
word-break: break-word;
|
|
2920
|
+
`,X2=o(Vl)`
|
|
2921
|
+
color: ${e=>e.theme.colors.primary};
|
|
2922
|
+
margin-top: ${n.sp2};
|
|
2923
|
+
margin-bottom: ${n.sp2};
|
|
2924
|
+
`,ew=o.div`
|
|
2925
|
+
display: flex;
|
|
2926
|
+
justify-content: center;
|
|
2927
|
+
align-items: center;
|
|
2928
|
+
padding: ${n.sp3} ${n.sp0};
|
|
2929
|
+
`,tw=o.div`
|
|
2930
|
+
width: 100%;
|
|
2931
|
+
display: flex;
|
|
2932
|
+
justify-content: center;
|
|
2933
|
+
align-items: center;
|
|
2934
|
+
gap: ${n.sp1};
|
|
2935
|
+
`,$o=o.div`
|
|
2936
|
+
display: flex;
|
|
2937
|
+
justify-content: center;
|
|
2938
|
+
align-items: center;
|
|
2939
|
+
gap: ${n.sp3};
|
|
2940
|
+
`,Io=o.div`
|
|
2941
|
+
width: ${n.sp7};
|
|
2942
|
+
height: ${n.sp7};
|
|
2943
|
+
border-radius: 50%;
|
|
2944
|
+
display: flex;
|
|
2945
|
+
justify-content: center;
|
|
2946
|
+
align-items: center;
|
|
2947
|
+
background-color: ${e=>e.theme.mode==="dark"?e.theme.colors.brandColorJadeDark:e.theme.colors.brandColorJadeLight};
|
|
2948
|
+
`,To=o.div`
|
|
2949
|
+
display: flex;
|
|
2950
|
+
flex-direction: column;
|
|
2951
|
+
`,Lo=o(st)`
|
|
2952
|
+
color: ${e=>e.theme.colors.hero};
|
|
2953
|
+
`,Ao=o(Jn)`
|
|
2954
|
+
min-width: 180px;
|
|
2955
|
+
color: ${e=>e.theme.colors.primary};
|
|
2956
|
+
`,nw=o(Zl)`
|
|
2957
|
+
color: ${e=>e.theme.colors.primary};
|
|
2958
|
+
width: ${n.sp4};
|
|
2959
|
+
height: ${n.sp4};
|
|
2960
|
+
`,iw=o(Yl)`
|
|
2961
|
+
color: ${e=>e.theme.colors.primary};
|
|
2962
|
+
width: ${n.sp4};
|
|
2963
|
+
height: ${n.sp4};
|
|
2964
|
+
`,ow=o(D2)`
|
|
2965
|
+
color: ${e=>e.theme.colors.primary};
|
|
2966
|
+
width: ${n.sp4};
|
|
2967
|
+
height: ${n.sp4};
|
|
2968
|
+
`,sw=o(ar)`
|
|
2969
|
+
width: ${n.sp3};
|
|
2970
|
+
height: ${n.sp3};
|
|
2971
|
+
color: ${e=>e.theme.colors.hero};
|
|
2972
|
+
:hover {
|
|
2973
|
+
color: ${e=>e.theme.colors.primary};
|
|
2974
|
+
}
|
|
2975
|
+
`,aw=o.div`
|
|
2976
|
+
display: flex;
|
|
2977
|
+
align-items: center;
|
|
2978
|
+
gap: ${n.sp1};
|
|
2979
|
+
`,rw=o.div`
|
|
2980
|
+
background-color: ${he.overlayDark};
|
|
2981
|
+
padding: 2px ${n.sp2};
|
|
2982
|
+
border-radius: ${n.sp1};
|
|
2983
|
+
`,Ya=o.div`
|
|
2984
|
+
display: flex;
|
|
2985
|
+
justify-content: space-between;
|
|
2986
|
+
gap: ${n.sp2};
|
|
2987
|
+
`,Xa=o.div`
|
|
2988
|
+
text-transform: capitalize;
|
|
2989
|
+
`,er=o(st)`
|
|
2990
|
+
color: ${he.primaryDark};
|
|
2991
|
+
align-self: "flex-end";
|
|
2992
|
+
`,$n=o(ot)`
|
|
2993
|
+
border-radius: ${n.sp2};
|
|
2994
|
+
`,Ro=o.div`
|
|
2995
|
+
display: flex;
|
|
2996
|
+
flex-direction: column;
|
|
2997
|
+
min-width: 180px;
|
|
2998
|
+
gap: ${n.sp1};
|
|
2999
|
+
`,lw=o.button`
|
|
3000
|
+
background: none;
|
|
3001
|
+
border: none;
|
|
3002
|
+
cursor: pointer;
|
|
3003
|
+
padding: ${n.sp1};
|
|
3004
|
+
border-radius: ${n.sp1};
|
|
3005
|
+
display: flex;
|
|
3006
|
+
align-items: center;
|
|
3007
|
+
justify-content: center;
|
|
3008
|
+
|
|
3009
|
+
&:hover {
|
|
3010
|
+
background: ${({theme:e})=>e.colors.grey4};
|
|
3011
|
+
}
|
|
3012
|
+
`,cw=o(ml)`
|
|
3013
|
+
width: ${n.sp4};
|
|
3014
|
+
height: ${n.sp4};
|
|
3015
|
+
`;export{Y2 as ConfirmationPopUpTitle,Lw as default,q2 as getNextAndPreviousSteps,K2 as uniqueFormName};
|