@zeniai/web-cockpit-ui 1.15.68-prod → 2.0.0-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/Preview-C3kztGrG.js +1 -0
- package/dist/assets/ScreenRoutes-5hC3wQD-.js +179 -0
- package/dist/assets/SignInScreen-Bw3kDJOY.js +1 -0
- package/dist/assets/{analytics-D0xbCiOA.js → analytics-Ci62SVC6.js} +15 -15
- package/dist/assets/analyticsHelper-DvZ4fRLz.js +1 -0
- package/dist/assets/{core-VVne9A9m.js → core-CrJ0HRkP.js} +2 -2
- package/dist/assets/{dash.all.min-CZdKQs3q.js → dash.all.min-BC3O3eK3.js} +1 -1
- package/dist/assets/{empty-BxIsRmiL.js → empty-DCdjTxMk.js} +1 -1
- package/dist/assets/{index-CW-pqTwR.js → empty-DewRN75u.js} +1 -1
- package/dist/assets/epic-ButtTfPO.js +2 -0
- package/dist/assets/{index-D0xGm0tM.js → index-BHVDlT_9.js} +1 -1
- package/dist/assets/{index-0sfOIAIW.js → index-BIzFhK6B.js} +1 -1
- package/dist/assets/index-BnSSVzJm.js +1 -0
- package/dist/assets/index-C1011MmK.js +2 -0
- package/dist/assets/index-CS2xkLsB.js +1 -0
- package/dist/assets/index-DrEiJ4Wx.js +1 -0
- package/dist/assets/index-Obh2uEoj.js +75311 -0
- package/dist/assets/{lexical-0vG0lfLn.js → lexical-Y1MbDrft.js} +1 -1
- package/dist/assets/{liveblocks-abv8TgYe.js → liveblocks-CH5Ytl_r.js} +1 -1
- package/dist/assets/{lottie-DehW2chz.js → lottie-jJKhsKLZ.js} +2 -2
- package/dist/assets/{mui-DOS4CfBc.js → mui-DzLLS9Rs.js} +2 -2
- package/dist/assets/{react-C3bwNlEv.js → react-9Kj1B1wt.js} +2 -2
- package/dist/assets/{react-0muarBdd.js → react-BLe964tg.js} +3 -3
- package/dist/assets/{react-DGIuy5RW.js → react-CNU9DWBw.js} +1 -1
- package/dist/assets/{react-DGupjeTm.js → react-C_qk_SxL.js} +2 -2
- package/dist/assets/{react-BX1V71Rc.js → react-CdND5srH.js} +2 -2
- package/dist/assets/{react-BKlbvdVi.js → react-D1VJKwtS.js} +2 -2
- package/dist/assets/{react-BQ6Phht1.js → react-D1lzTawy.js} +2 -2
- package/dist/assets/{react-Bf7WBvpI.js → react-DRO7qhGA.js} +4 -4
- package/dist/assets/{recharts-BBlqu8Rz.js → recharts-DE-kxplH.js} +25 -25
- package/dist/assets/{sentry-DBhcw6Be.js → sentry-SNkBC2Al.js} +2 -2
- package/dist/assets/{url-CSfgHOtI.js → url-C9VCVVAZ.js} +1 -1
- package/dist/assets/url-h1qG-NI4.js +1 -0
- package/dist/assets/{utils-DT6Wq-eT.js → utils-CpsqBQqv.js} +1 -1
- package/dist/assets/zeni-epic-state-B7yJI5lR.js +14 -0
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/ACHDetailsPage-B5qIuZya-DM7YY1FB.js +0 -21
- package/dist/assets/AIPerformancePage-BHB45mP--CWndWSdC.js +0 -539
- package/dist/assets/AccountInfoPage-Cd5xYT1g-BbefpV-7.js +0 -18
- package/dist/assets/AccountInfoPageContent-CJ7ycVIK-5M9LxJhG.js +0 -149
- package/dist/assets/AccountLockedInfoModal-Dox7IuAX-BMD0s6gP.js +0 -59
- package/dist/assets/AccountReconDetailsDrawerPage-Bqty08m0-B-ibKIL7.js +0 -239
- package/dist/assets/AccountRow-D1cjRJJD-brXv0bxV.js +0 -298
- package/dist/assets/AccountsPromoCardStack-Bs3naJHM-CnqFEGey.js +0 -207
- package/dist/assets/AddAddressForCardDrawer-DZkBMJfp-C4r6mehv.js +0 -6
- package/dist/assets/AddToWalletPage-CyRfqVDB-BdTdHS85.js +0 -344
- package/dist/assets/AgingReportsPage-xBFff3BM-ky-EAGcf.js +0 -79
- package/dist/assets/AllUserItems-BJf6WPDo-Deh60Xs6.js +0 -192
- package/dist/assets/ApAgingDetailPage-CjBrPyi8-Drme0iaF.js +0 -46
- package/dist/assets/AppBasePage-CqDm-hnV-gy7t8mSc.js +0 -71
- package/dist/assets/AppDrawerContent-CVVWj66i-CgQm4R5E.js +0 -92
- package/dist/assets/ApprovalRulesSettingsPage-Cckd2uVA-CdSeUeuR.js +0 -47
- package/dist/assets/ArAgingChart-CBsqOd-4-CM7YnEql.js +0 -24
- package/dist/assets/ArAgingDetailPage-i7JObt60-DiaDa_kU.js +0 -46
- package/dist/assets/AttachmentView-CzC4skJ3-DSp7S_ow.js +0 -101
- package/dist/assets/BalancesInsightWithToolTip-B6umvmgL-B0jviFnz.js +0 -38
- package/dist/assets/BankAccountSection-Di4sF52j-CjUG2k4c.js +0 -79
- package/dist/assets/BankAccountWarningSection-Cled-2cR-DDIv4R5M.js +0 -51
- package/dist/assets/BankConnectionsSettingsPage-Ccnzq7st-BhXmaxPm.js +0 -425
- package/dist/assets/BillDetailPage-XXOwBfO1-DxWLoxsB.js +0 -266
- package/dist/assets/BillPayApprovalRuleDetailPage-DFZ0csaT-D62XtRWM.js +0 -27
- package/dist/assets/BillPayApprovalRulesPage-COCypDcS-CxH1-1ro.js +0 -241
- package/dist/assets/BillPayPromoPage-DOE2YIqC-BRNhZmcV.js +0 -84
- package/dist/assets/BillPaySetUpPage-BCJbZDsV-EdWAn7sO.js +0 -42
- package/dist/assets/BillingSettingsPage-iImtlEmO-oLToelCa.js +0 -44
- package/dist/assets/BillsBulkReviewDrawerPage-B11GWM_0-BmGfxE4w.js +0 -1
- package/dist/assets/BoxItem-Bxa1M4QU-CY-vorJI.js +0 -53
- package/dist/assets/BusinessVerificationPage-DSuJFoW1-Xi-gZLue.js +0 -138
- package/dist/assets/CardNumberSubText-_ZZbaz_k-BDqMr1hm.js +0 -21
- package/dist/assets/CashbackDetailPage-DAZXitLt-kEgVWuyi.js +0 -285
- package/dist/assets/ChargeCardDetailPage-B1VIpASk-BGlRije7.js +0 -1467
- package/dist/assets/ChargeCardListPage-BOBepN-x-DtybfgKA.js +0 -412
- package/dist/assets/ChargeCardListTable-YznzSsJo-DoULf2wO.js +0 -711
- package/dist/assets/ChargeCardPaymentHistoryPage--jOwsMla-Bzj0wTwy.js +0 -565
- package/dist/assets/ChargeCardPromoPage-DIfakIOK-BNvT1cxv.js +0 -222
- package/dist/assets/ChargeCardSetupPage-0bpVkeJs-Bkuwwfuy.js +0 -36
- package/dist/assets/ChargeCardStatementsPage-ChWyQlw6-CbdQ3AHt.js +0 -60
- package/dist/assets/CheckDepositDrawerPage-BS7hnyZn-kNVwtOWy.js +0 -206
- package/dist/assets/CollapsableReportTable-DNfFkAts-cgYLh83Q.js +0 -2982
- package/dist/assets/CompanyOfficerDetailsSection-CrOIN4IW-B9X3JGYF.js +0 -331
- package/dist/assets/CompanyPassportCard-CkzYFTrp-BcZUZqNN.js +0 -42
- package/dist/assets/CompanyPassportPage-FE6yli6h-DWhiSjrR.js +0 -417
- package/dist/assets/CompleteProfile-Cb8i1XgZ-BP6okX49.js +0 -52
- package/dist/assets/ConfettiBurst-BZCXEGYA-ho8ERS31.js +0 -1
- package/dist/assets/ConstrainedInnerElement-CgdnMeoA-Cv85URYx.js +0 -5
- package/dist/assets/CreateOrEditVendorPage-CzpSgxbO-2ilw068v.js +0 -281
- package/dist/assets/CreditCardPaymentDrawerPage-c_q0MsSO-CoTzu5XT.js +0 -227
- package/dist/assets/CurrencySelectField-BAh7SHrG-CBSRpu74.js +0 -139
- package/dist/assets/CustomerOnboardingActivationPage-f3Aa6E5r-DcPBpEPv.js +0 -88
- package/dist/assets/CustomerOnboardingContainerPage-CWAtSu08-DAhlgLSo.js +0 -1
- package/dist/assets/CustomerOnboardingDetailPageSkeleton-DYuiWn8s-DBRyrBpA.js +0 -162
- package/dist/assets/CustomerOnboardingNoStepsPage-Bh_F0-oC-ui07nfsA.js +0 -66
- package/dist/assets/CustomerOnboardingPage-B9hSO88_-BFSPGucc.js +0 -107
- package/dist/assets/CustomerOnboardingProductSuitePage-CG0HKCpQ-CTl3yjRz.js +0 -202
- package/dist/assets/Dashboard-BJ_oIHab-nrsDE6qS.js +0 -1611
- package/dist/assets/DashboardReportPage-BemzMw2e-D89HJr4G.js +0 -371
- package/dist/assets/DashboardSidebarBackgroundAnimation-BtA5oEGG-Dlhefpu7.js +0 -12
- package/dist/assets/DepositAccTransactionItem-CyFi1P_L-BDRqwizb.js +0 -76
- package/dist/assets/DepositAccTransactionListPage-DvBRRUdZ-DIdaGFeH.js +0 -66
- package/dist/assets/DomesticWireDetailsPage-DCDo3aHI-kEBCfOTM.js +0 -21
- package/dist/assets/DownloadOverlay-D_lL1sPW-xWfuT0Vo.js +0 -439
- package/dist/assets/DrawerPage-DesxXhZk-CRre4dYu.js +0 -118
- package/dist/assets/EditPeoplePage-QvPy_Six-DH4hfGb_.js +0 -55
- package/dist/assets/EditReimbursementDetailPage-C0ZDkboO-DXyrjaYc.js +0 -865
- package/dist/assets/EntityDetailPage-l7nXIsyF-5oCAhXWK.js +0 -18
- package/dist/assets/EntitySummarySection-BwX0a4JL-zcla-D8w.js +0 -151
- package/dist/assets/ExpenseAutomationOverviewPage-EdyHjbff-MnqvBISM.js +0 -281
- package/dist/assets/ExpenseAutomationPage-DA22Qofw-D083tvHO.js +0 -3001
- package/dist/assets/ExpressPayPage-EMP6inpX-3XG4gLSI.js +0 -168
- package/dist/assets/FeaturePreviewPage-SYJm-3aR-DqyedTbe.js +0 -11
- package/dist/assets/FollowStepsSection-BxESVqJD-Cg2jHWRs.js +0 -390
- package/dist/assets/GlobalReviewListPage-D5_ACa-q-D3OrFPtp.js +0 -291
- package/dist/assets/InformationCardStack-B_qQUEYD-DttLY3HS.js +0 -31
- package/dist/assets/InsightsCardStack-BsQzoVzj-Dk9dJ9p5.js +0 -79
- package/dist/assets/InsightsSection-B6CNlTNH-BdZRn5zX.js +0 -27
- package/dist/assets/IntegrationsSettingsPage-DP6fAccq-LBB3bZYV.js +0 -57
- package/dist/assets/InternationalWireSwiftDetailsPage-VdG7bDZi-CfZjD-fy.js +0 -171
- package/dist/assets/InternationalWireVerificationPage-COC6lZml-DC50drx7.js +0 -65
- package/dist/assets/InviteFormPage-DN02jRy5-Buy4T1zp.js +0 -312
- package/dist/assets/InvitePageListView-CP4K9tJi-CHkbuC7f.js +0 -739
- package/dist/assets/InvitePeoplePage-VTM6kM1u-CU4p_G8a.js +0 -12
- package/dist/assets/InvoiceUploadSection-it-ZYl1N-XsZhHn3v.js +0 -140
- package/dist/assets/IssueChargeCardPage-CVfuvGey-C6KQpSo7.js +0 -532
- package/dist/assets/LabeledAddressValue-DDrQcHIE-hP7vwQBZ.js +0 -49
- package/dist/assets/LabeledAddressValueField-BgWwd5Gw-DFe8vIUL.js +0 -45
- package/dist/assets/LabeledControlledCheckBoxField-CcPO1k23-CU-iLMSG.js +0 -16
- package/dist/assets/LabeledCountryMultiSelectField-BYYjzwUG-DXWiTuV-.js +0 -237
- package/dist/assets/LabeledCreatableSingleSelectField-CISYMojq-DqRsgtUm.js +0 -208
- package/dist/assets/LabeledDocumentField-C_bcFxdY-DJ7-SOXf.js +0 -41
- package/dist/assets/LabeledDropDownFormattedTextField-ScGGCap8-mVsgmCkO.js +0 -59
- package/dist/assets/LabeledText-C8Y7EOsX-DEEaYkeb.js +0 -42
- package/dist/assets/LabeledUserSingleSelectWithSubtitlesField-C8JxAcOT-D4KRCLOC.js +0 -229
- package/dist/assets/LabeledZeniRolesDropDownField-BZtreVpj-D7w5kOCp.js +0 -297
- package/dist/assets/LinkJETransactionPage-CKq4oiX9-ltE4XV_6.js +0 -98
- package/dist/assets/LockCardPage-CZENNby7-BsVSJBxy.js +0 -623
- package/dist/assets/LowBalancePopup-1727S1ri-Ch0sQQf3.js +0 -34
- package/dist/assets/MagicLinkACHDetailsPage-BSOlSfNu--EXqRjnH.js +0 -1
- package/dist/assets/MagicLinkDomesticWireDetailsPage-D1DTPo0E-DyDKS580.js +0 -1
- package/dist/assets/MagicLinkInternationalWireDetailsPage-D_wo_2nm-BwOG2bc6.js +0 -1
- package/dist/assets/MagicLinkSuccessPage-QMkZgQLG-BLATYjDj.js +0 -31
- package/dist/assets/MagicLinkTitleSection-CARU1oLQ-B0cyw7Mk.js +0 -17
- package/dist/assets/MailingDetailsSection-ByOPaJ05-DHEttRbi.js +0 -21
- package/dist/assets/MyBankConnectionsSettingsPage-BdgIIhL1-Dxh6kCPM.js +0 -110
- package/dist/assets/MyPendingActivationChargeCardListPage-CX38bDdq-ClsHkhfI.js +0 -6
- package/dist/assets/MyProfileSettingsPage-DYu0Fx6I-CkZmnWdK.js +0 -85
- package/dist/assets/NavBarWithPicker-CGGEvLwe-DZ7VBJBK.js +0 -30
- package/dist/assets/NavigationArrow-CTNkKUtV-DwVtEjKU.js +0 -47
- package/dist/assets/NavigationDots-Dvce3gHt-BhNbY-Jn.js +0 -15
- package/dist/assets/NewGlobalMerchantPage-D_f7z47T-CFtXtRiH.js +0 -160
- package/dist/assets/NoDataChart-CrKeqWSr-DnRwd0s-.js +0 -26
- package/dist/assets/NoDataTable-4vPXmPYF-0AXx0isj.js +0 -8
- package/dist/assets/NotFoundPage-BLWPU1wU-DmwpjiFz.js +0 -46
- package/dist/assets/NotificationSettingsPage-CDiDLX3A-9UeXvRF4.js +0 -163
- package/dist/assets/NotificationsListConfig-B5pDa4cJ-CViBSk1u.js +0 -1
- package/dist/assets/NotificationsPage-Ccl7Dny1-DO1DVf8y.js +0 -685
- package/dist/assets/OpExByVendorPage-spd-nKV4-BYZguWNQ.js +0 -100
- package/dist/assets/OverlayContainerPage-BG9y5C0t-XSUpPkb1.js +0 -11
- package/dist/assets/PandLWithForecastPage-TSoe4Z7F-DADbKlaU.js +0 -123
- package/dist/assets/PaymentAccountSetupBillingAddressSection-9ma8SpIa-DnLcaoHi.js +0 -107
- package/dist/assets/PeoplePage-b5_I0qOw-DREebsk9.js +0 -727
- package/dist/assets/Preview-DkS-Ppwi.js +0 -1
- package/dist/assets/ProductsCarousel-C3M0ocdF-CqKUYrUp.js +0 -142
- package/dist/assets/PromoBaseCards-BOGJI2ws-HYGeFCqU.js +0 -218
- package/dist/assets/QBOConnectionDialog-CmpnnuzP-5mKGNZm7.js +0 -51
- package/dist/assets/QBOSetupSection-DjnN9dgv-D9sOi7j3.js +0 -79
- package/dist/assets/ReimbursementApprovalRuleDetailPage-D5NXjrO9-CSFmXSBt.js +0 -32
- package/dist/assets/ReimbursementApprovalRulesPage-BsCTIqUJ-BciPnq07.js +0 -243
- package/dist/assets/ReimbursementDetailPage-BbyxE2uL-CCn1M_IM.js +0 -314
- package/dist/assets/ReimbursementPromoPage-CyEgwqcf-QZKK6RXF.js +0 -84
- package/dist/assets/ReimbursementSetUpPage-RETPkEQd-7RlERPSK.js +0 -140
- package/dist/assets/ReimbursementsBulkReviewDrawerPage-DnmYl0FM-B6Bppczb.js +0 -1
- package/dist/assets/ReloadCard-Bdoo0XiI-BkT_TrPt.js +0 -26
- package/dist/assets/ReportTableViewSelector-Bc1K7mU_-BcXnhDrl.js +0 -151
- package/dist/assets/ReportsPage-BOTHMLWh-C7yXcceR.js +0 -269
- package/dist/assets/RevenueChart-DvyZ3aO7-ln4Xbq3A.js +0 -280
- package/dist/assets/ReviewDetailsPage-BIMg1n2e-DlA-53yQ.js +0 -290
- package/dist/assets/ReviewOverlay-CxwoiOLC-DmcvjVCl.js +0 -152
- package/dist/assets/RoleWithToolTip-Ct3_VuDM-BKP6CsTd.js +0 -22
- package/dist/assets/ScheduleDetailsFixedAssetsPage-DiL5Dozk-DCavU86U.js +0 -37
- package/dist/assets/ScheduleDetailsPage-5FWpLRtd-CO7mo75a.js +0 -37
- package/dist/assets/ScheduleSequenceTable-R3-PsXES-i-4DMkvc.js +0 -326
- package/dist/assets/ScreenRoutes-D-ddKpF8.js +0 -179
- package/dist/assets/SetUpAccountSection-CctbMmoK-ZyErAiPF.js +0 -378
- package/dist/assets/SignIn-CmgmnRm4-DBoFBrvr.js +0 -491
- package/dist/assets/SignInScreen-DCSGviBr.js +0 -1
- package/dist/assets/SpendManagementListViewPage-CFUxCqkU-dAFL_Ppz.js +0 -134
- package/dist/assets/SpendManagementPerTabPage-C-kqNTci-Udt5CTX9.js +0 -754
- package/dist/assets/SpendManagementSection-CIz4nE_w-0q2VpGOz.js +0 -246
- package/dist/assets/StatementItem-vVtoBN2w-CiKnbbLX.js +0 -31
- package/dist/assets/StatementsPage-As5WOnMR-D0_TDe23.js +0 -58
- package/dist/assets/StatusSwitcher-Bv-ozN6U-Uu-9K_ZT.js +0 -120
- package/dist/assets/SubTabSwitcher-D7QeM6nb-Cvhnug-S.js +0 -58
- package/dist/assets/SummaryCard-C2qoTsAY-AZ17zAeW.js +0 -1
- package/dist/assets/TaskManagementPage-BJwp32Ph-DTb1_fWh.js +0 -508
- package/dist/assets/TimeRangeSwitcher-D00bDDhP-DMLJ4CgT.js +0 -64
- package/dist/assets/TimeframeSwitcher-DA99HdHt-B7dPmR3A.js +0 -31
- package/dist/assets/TimeframeSwitcherWithToggle-DyggDIQj-BDMDYsLj.js +0 -53
- package/dist/assets/TopExCard-Z1WabZ8c-D9ahLOhN.js +0 -38
- package/dist/assets/TopExDetailPage-CzHG4f9E-DSsiHUw6.js +0 -132
- package/dist/assets/TransactionActivityLogPage-CGKnjNfU-DFi44yxk.js +0 -195
- package/dist/assets/TransactionDetailPage-1-mLOWSz-NZ0pEK8W.js +0 -903
- package/dist/assets/TransactionList-BB-xoIGm-CmL2sv-k.js +0 -153
- package/dist/assets/TransactionListBig-C5Sf5Xh--DUDOs_q9.js +0 -284
- package/dist/assets/TransactionListPage-Cj7h1Ros-BpKazEVH.js +0 -35
- package/dist/assets/TransactionVendorDetailPage-SsrSOk3O-BLmQC0O2.js +0 -80
- package/dist/assets/TransferDrawerPage-BvKZ7vHF-BDZmQek2.js +0 -362
- package/dist/assets/TreasuryOverviewPage-DwvjMR4_-BGYjEWMJ.js +0 -725
- package/dist/assets/TreasuryPromoPage-CtTFvSQW-B3Bvdh6x.js +0 -505
- package/dist/assets/TreasuryStatementsPage-Catz8shX-X_IYs6qa.js +0 -58
- package/dist/assets/TreasuryTaxLetterPage-D8hzCL5o-Da9lGvIi.js +0 -58
- package/dist/assets/TrendChart-Bnp4Pcdf-CJF7dKdP.js +0 -16
- package/dist/assets/TrendWithTransactions-3D1FvM8G-TXKeFcvZ.js +0 -116
- package/dist/assets/UncategorizedAccountsMappingPage-DbyY-dYB-D1dmyVJ4.js +0 -244
- package/dist/assets/UnitIntegrationPage-CTzme1te-CbgSnbxZ.js +0 -67
- package/dist/assets/UploadAdditionalDocumentOverlay-Wl4Spdpn-PlCykjL7.js +0 -38
- package/dist/assets/Vendor2FAPopup-D0zYKkIv-aIJ1NUXW.js +0 -1
- package/dist/assets/VendorACHDetailsPage-YYX9aQdw-D-OOHJou.js +0 -1
- package/dist/assets/VendorDetailPage-Br9wIOnI-De2XcUb6.js +0 -257
- package/dist/assets/VendorDomesticWireDetailsPage-BpPgQRHI-BdL3didN.js +0 -1
- package/dist/assets/VendorFiling1099EditablePage-himC7iD3-C2XAIK9H.js +0 -175
- package/dist/assets/VendorFirstReviewPage-BbknTCBD-DDAQwDZy.js +0 -730
- package/dist/assets/VendorInternationalWireDetailsPage-CS595Xgc-C3mHhbHk.js +0 -152
- package/dist/assets/VendorInternationalWireSwiftDetailsPage-yhTjWXvw-C2v0qs8u.js +0 -1
- package/dist/assets/VendorsAccountsSection-CgSJu8wq-Ctj2nPMI.js +0 -68
- package/dist/assets/VerifyDevice-Dvf0JsNN-PRfKusRx.js +0 -112
- package/dist/assets/VideoPlayer-VAzOGCDL-6U91k2_g.js +0 -78
- package/dist/assets/VideoPopup-BqvZ-XIh-nZFpm96A.js +0 -31
- package/dist/assets/WarningsDrawerPage-DeNonoNp-Cer8JJKy.js +0 -92
- package/dist/assets/ZeniAccountDetailPage-GcwTJdB8-BghGtTMM.js +0 -300
- package/dist/assets/ZeniAccountListViewPage-CdwO0Duy-D-GLBesW.js +0 -443
- package/dist/assets/ZeniAccountNavBarPieces-BrSIfL36-2vSHgl5n.js +0 -33
- package/dist/assets/ZeniAccountPromoPage-JrcedQYB-DxQZiNCa.js +0 -184
- package/dist/assets/ZeniAccountSetupPage-TKBfbgzJ-CCXkWEma.js +0 -36
- package/dist/assets/ZeniCopyright-DglqrTpl-B_6mXo3q.js +0 -1
- package/dist/assets/ZeniTransferAmountSlider-BcaZZuAw-Dri2Vqf1.js +0 -63
- package/dist/assets/add-to-wallet-DgdBD8_G-2lJ5O5xD.js +0 -1
- package/dist/assets/agingReportHelper-ovKP-qSS-Cx4Hdid-.js +0 -1
- package/dist/assets/analyticsHelper-B3H0U8CW.js +0 -1
- package/dist/assets/analyticsHelper-CAYdbjhS-Bgy1SJeR.js +0 -1
- package/dist/assets/arrow-south-east-round-PEovUgvH-CH2rCMd8.js +0 -1
- package/dist/assets/auto-transfer-rule-mbafm5D3-Bwf-jWRn.js +0 -1
- package/dist/assets/chartTypes-CD3vrBsI-CxjFANZl.js +0 -1
- package/dist/assets/commonDimensions-Oz1tdAcx-C8J13a8y.js +0 -1
- package/dist/assets/commonTypes-5tEXwrX4-DThfJWJu.js +0 -1
- package/dist/assets/constants-B4Nwm03n.js +0 -1
- package/dist/assets/downloadPdf-Dsuxeias-IRIi2izs.js +0 -1
- package/dist/assets/empty-B6p9RErG.js +0 -1
- package/dist/assets/epic-CPlQ2CFE.js +0 -2
- package/dist/assets/getReferrerType-DjPOy76W-DRP5VHem.js +0 -1
- package/dist/assets/gift-box-Cmt9OgIZ-CmAMj3r2.js +0 -1
- package/dist/assets/graphic-no-data-l-DU4J8fDt-Db5RbWJE.js +0 -1
- package/dist/assets/graphic-no-data-net-burn-l-CzmycA0m-BEpZ9Tqr.js +0 -1
- package/dist/assets/handshake-BPg58FML-6UbFX0a-.js +0 -1
- package/dist/assets/helper-Ckm10Uko-DCD3fpXN.js +0 -223
- package/dist/assets/index-BYqTlB4Y.js +0 -39
- package/dist/assets/index-BZNcKYJW.js +0 -1
- package/dist/assets/index-C8o-xzAN.js +0 -29875
- package/dist/assets/index-D-Jb9hdv.js +0 -1
- package/dist/assets/mapLoadingInProgressToTreeNode-jcHEi-mv-Cl8KOFjG.js +0 -1
- package/dist/assets/mapSectionWithAcOnlyToTreeNode-Cgyt68f3-CDBFUVvY.js +0 -1
- package/dist/assets/mapSpacerToTreeNode-XgUp1xUb-B7yPJt54.js +0 -1
- package/dist/assets/mapTimeframeBalancesToTreeNode-Bre8FfBF-C3mdnabF.js +0 -1
- package/dist/assets/mapTimeframeBalancesToTreeNode-DOyCX6ij-DJ5f-tsr.js +0 -1
- package/dist/assets/mapTimeframeHeaderLoadingInProgressToTreeNode-D2IvFyR5-Ca3eEPkJ.js +0 -1
- package/dist/assets/page-detail-CWX5S47F-Db9HhKdl.js +0 -1
- package/dist/assets/panelSelectedMixin-Cddsb26L-BEaTutPV.js +0 -3
- package/dist/assets/radio-default-CiSgisfh-bKgsz1mh.js +0 -1
- package/dist/assets/shield-DOlUxcFf-CuhCM_gA.js +0 -1
- package/dist/assets/toCOABalancesWithID-aLNB35t7-BtYnBfqr.js +0 -1
- package/dist/assets/toChartData-DUL6vnzJ-Bu4Ds4yf.js +0 -1
- package/dist/assets/types-DyvtCprH-NFPm5TaG.js +0 -1
- package/dist/assets/upload-reimbursement-receipt-O2N8vcO7-_YW_CWHL.js +0 -1
- package/dist/assets/uploadAttachment-Ck4wivBR-Cl_dwAB6.js +0 -286
- package/dist/assets/uploadReceipts-CIgkuVpu-DNtrxUdf.js +0 -1
- package/dist/assets/url-CRv0BSFG.js +0 -1
- package/dist/assets/useLongPress-GCK2COYQ-Bd_7uKXZ.js +0 -1
- package/dist/assets/usp-line-BBd1wKwW-rq31vkuF.js +0 -1
- package/dist/assets/zeni-epic-state-DMWYYyyR.js +0 -14
|
@@ -1,3001 +0,0 @@
|
|
|
1
|
-
import{o as n,c3 as zl,e as Ce,bQ as Xa,bR as er,V as t,cy as Pl,bD as Fl,ab as Ye,aT as tr,u as f,O as me,ak as st,an as Re,cz as Bl,ac as D,x as Q,g as Tt,bE as _l,ip as Vl,aQ as it,c1 as xe,du as zi,eD as Nl,bx as Ul,d as he,au as Wl,eU as Qt,L as Hn,e2 as Xe,b5 as qn,dz as nr,bt as Hl,gk as ql,im as Kl,hb as Jl,h3 as ir,by as Ql,bW as ot,b9 as Kn,bM as or,kz as Gl,ao as Ze,ce as Yl,n as sr,bb as ar,as as _o,aa as gn,bT as Vo,ae as xn,kA as Zl,kB as Xl,kC as ec,kD as Bn,kE as rr,kF as lr,kG as tc,kH as us,kI as nc,gx as cr,dx as dr,kJ as ic,kK as oc,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 ur,kU as pc,kV as mc,kW as gc,kX as xc,gK as No,cl as Jn,cC as Pi,v as hr,A as pr,cQ as Qn,e6 as Uo,b as Wo,hK as fc,bq as yc,cs as wc,cc as bc,c9 as Gn,gN as hs,j0 as ps,aq as $t,dv as Yn,dc as Jt,dR as qe,cv as Zn,cI as Xn,cL as ei,kY as Cc,w as yt,iy as mr,fO as vc,aG as gr,kZ as Sc,aX as Ho,aS as ms,h5 as xr,k_ as kc,k$ as jc,l0 as $c,bH as fr,aV as Ic,gT as Kt,ib as Wi,eR as $i,cU as qo,aA as Tc,eS as yr,bV as Lc,g1 as Ac,hf as wr,y as Rc,l1 as Ec,a_ as Ko,j$ as Dc,k0 as Mc,e1 as br,l2 as Cr,j6 as Oc,h_ as zc,gL as Ii,jx as gs,l3 as Pc,a$ as Fc,dD as vr,a as Un,iH as Sr,iQ as Ao,l4 as In,et as kr,ev as jr,j9 as Ro,ja as $r,d9 as Ir,l5 as Bc,da as Fi,iI as Tr,fC as Lr,l6 as _c,eI as Hi,aM as Eo,l7 as Vc,cZ as Nc,iX as Uc,e4 as Wc,l8 as Hc,gQ as qc,b3 as qi,eE as Kc,fX as Jc,l9 as Qc,e0 as Gc,hP as Yc,a9 as Zc,eF as Xc,eG as ed,eH as td,eK as xs,eL as fs,eM as nd,gX as id,b1 as od,eW as sd,eX as ad,eY as rd}from"./index-C8o-xzAN.js";import{a as s,P as ld}from"./sentry-DBhcw6Be.js";import{n as o,c as le,k as Bi}from"./mui-DOS4CfBc.js";import{bh as cd,kP as dd,He as ys,Hf as Wn,Hg as ud,Hh as hd,cy as pd,bL as Di,cz as md,c4 as Jo,Hi as gd,FD as ws,cA as xd,cB as fd,lU as _n,bE as rn,Hj as bs,Hk as yd,bV as Ar,bo as ln,Hl as wd,Hm as Rr,Hn as Er,Ho as Dr,Hp as Mr,Hq as Or,Hr as Qo,lm as bd}from"./zeni-epic-state-DMWYYyyR.js";import{t as Go}from"./panelSelectedMixin-Cddsb26L-BEaTutPV.js";import{m as zr,n as Pr,a as Tn,t as Mt}from"./CollapsableReportTable-DNfFkAts-cgYLh83Q.js";import{N as Ki}from"./AccountRow-D1cjRJJD-brXv0bxV.js";import{o as Fr}from"./mapTimeframeBalancesToTreeNode-DOyCX6ij-DJ5f-tsr.js";import{d as Cs}from"./mapLoadingInProgressToTreeNode-jcHEi-mv-Cl8KOFjG.js";import{h as Cd}from"./VendorsAccountsSection-CgSJu8wq-Ctj2nPMI.js";import{u as vd,c as vs,d as Sd,m as kd}from"./uploadAttachment-Ck4wivBR-Cl_dwAB6.js";import{r as Mi}from"./core-VVne9A9m.js";import{t as jd}from"./upload-reimbursement-receipt-O2N8vcO7-_YW_CWHL.js";import"./liveblocks-abv8TgYe.js";import"./recharts-BBlqu8Rz.js";import"./lottie-DehW2chz.js";import"./analytics-D0xbCiOA.js";import"./lexical-0vG0lfLn.js";import"./utils-DT6Wq-eT.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]="792c96fe-a99d-4015-9d9a-0303b1c2b258",e._sentryDebugIdIdentifier="sentry-dbid-792c96fe-a99d-4015-9d9a-0303b1c2b258")}catch{}})();const{common:{navBar:{back:$d},texts:{refresh:Id,close:Td,copy:Ld,copied:Ad,open:Rd}},expenseAutomation:{common:{numbers:{maximumCount:Ed}}}}=me.getLocalizedStrings(),Dd=o(Lc)`
|
|
2
|
-
display: flex;
|
|
3
|
-
width: ${n.sp4};
|
|
4
|
-
height: ${n.sp4};
|
|
5
|
-
align-items: center;
|
|
6
|
-
justify-content: center;
|
|
7
|
-
`,Md=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
|
-
`,Od=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
|
-
`,Ss=o.div`
|
|
28
|
-
display: flex;
|
|
29
|
-
flex-direction: column;
|
|
30
|
-
align-items: center;
|
|
31
|
-
padding-left: ${e=>js.subSectionContainerLeftRightPadding.valuePx(e.windowSize)};
|
|
32
|
-
padding-right: ${e=>js.subSectionContainerLeftRightPadding.valuePx(e.windowSize)};
|
|
33
|
-
`,zd=o.div`
|
|
34
|
-
display: flex;
|
|
35
|
-
align-items: baseline;
|
|
36
|
-
justify-content: end;
|
|
37
|
-
gap: ${n.sp4};
|
|
38
|
-
flex: 1 1 ${n.sp0};
|
|
39
|
-
`,Pd=o.div`
|
|
40
|
-
display: flex;
|
|
41
|
-
align-items: baseline;
|
|
42
|
-
justify-content: start;
|
|
43
|
-
gap: ${n.sp4};
|
|
44
|
-
flex: 1 1 ${n.sp0};
|
|
45
|
-
`,Fd=o(wr)`
|
|
46
|
-
width: ${n.sp3};
|
|
47
|
-
height: ${n.sp3};
|
|
48
|
-
cursor: pointer;
|
|
49
|
-
margin-left: ${n.sp1};
|
|
50
|
-
color: inherit;
|
|
51
|
-
`,Bd=o(Ac)`
|
|
52
|
-
width: ${n.sp3};
|
|
53
|
-
height: ${n.sp3};
|
|
54
|
-
margin-left: ${n.sp1};
|
|
55
|
-
color: ${he.success};
|
|
56
|
-
`,_d=o(Wo)`
|
|
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
|
-
`,Vd=o(bc)`
|
|
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
|
-
`,Nd=o(wc,{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?le`
|
|
78
|
-
${Ud} 2s linear infinite;
|
|
79
|
-
`:"none"};
|
|
80
|
-
&:hover {
|
|
81
|
-
color: ${e=>e.theme.colors.primary};
|
|
82
|
-
}
|
|
83
|
-
`,Ud=Bi`
|
|
84
|
-
0% {
|
|
85
|
-
transform: rotate(0deg);
|
|
86
|
-
}
|
|
87
|
-
100% {
|
|
88
|
-
transform: rotate(360deg);
|
|
89
|
-
}
|
|
90
|
-
`,Wd=o.div`
|
|
91
|
-
width: 100%;
|
|
92
|
-
`,Hd=o.div`
|
|
93
|
-
padding-top: ${n.sp0};
|
|
94
|
-
padding-bottom: ${n.sp0};
|
|
95
|
-
`,ks=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
|
-
`,qd=o.div`
|
|
104
|
-
display: flex;
|
|
105
|
-
`,Kd=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
|
-
`,Jd=o.div`
|
|
114
|
-
display: flex;
|
|
115
|
-
height: ${n.sp4};
|
|
116
|
-
`,Qd=o.div`
|
|
117
|
-
text-align: center;
|
|
118
|
-
display: flex;
|
|
119
|
-
align-items: center;
|
|
120
|
-
justify-content: center;
|
|
121
|
-
flex-wrap: wrap;
|
|
122
|
-
`,Gd=o.div`
|
|
123
|
-
display: flex;
|
|
124
|
-
flex-direction: column;
|
|
125
|
-
`,Yd=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: ${Gn.regular};
|
|
134
|
-
color: ${e=>e.theme.colors.primary};
|
|
135
|
-
`,Zd=o.span`
|
|
136
|
-
font-weight: ${Gn.medium};
|
|
137
|
-
color: ${e=>e.theme.colors.primary};
|
|
138
|
-
`,Xd=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
|
-
`,js={subSectionContainerLeftRightPadding:new Q(f[3],f[6],f[8])},eu=({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}=fc(a,!1,!1),m=c.filter(p=>p.id.includes(cr)===!1);return t.jsxs(Md,{isDisabled:u,onClick:e,"data-testid":D("comment-icon"),children:[t.jsx(yc,{count:m.length,isLoading:u}),t.jsx(Dd,{})]})},tu=({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(zd,{children:e.rightSection.map((g,x)=>{switch(g){case"search":return t.jsx(Kl,{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:Id,style:{marginTop:"2px"},enterDelay:600,children:t.jsx(Nd,{onClick:p,$spinning:i==="In-Progress","data-testid":D("refresh-icon")})},x+g);case"comment":return d===!1?null:t.jsx(eu,{companyId:h,companyName:r,onAllThreadsClick:a});case"close":default:return t.jsx(xe,{display:"block",placement:"bottom",title:Td,enterDelay:600,style:{marginTop:"2px"},children:t.jsx(_d,{onClick:c,"data-testid":D("close-icon")})},x+g)}})})},nu=({headerData:e,onBack:i})=>t.jsx(Pd,{children:e.leftSection.map((l,r)=>{switch(l){case"back":default:return t.jsx(xe,{display:"block",placement:"bottom",title:$d,enterDelay:600,style:{marginTop:"-14px"},children:t.jsx(Vd,{onClick:i,"data-testid":D("back-button")})},r+l)}})}),$s=({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:ir.test(i)?r?Ad:Ld:Rd,enterTouchDelay:600,children:t.jsxs(Xd,{onClick:()=>h?.(i),"data-testid":D("pre-link"),children:[i,r?t.jsx(Bd,{className:"success-icon"}):t.jsx(Fd,{className:"copy-icon"})]})}),c?t.jsxs(ui,{windowSize:l,children:[c," "]}):null]})},Is=({subTitles:e})=>{const i=Ce(),[,l]=Jl(),[r,h]=s.useState(!1),d=s.useRef(null),a=s.useCallback(c=>{ir.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(Gd,{children:e.map((c,u)=>t.jsxs(Qd,{"data-testid":D("subtitle-item",u.toString()),children:[c.pre?t.jsx($s,{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(Yd,{}):t.jsx(t.Fragment,{})}):null,c.bold?t.jsx(t.Fragment,{children:t.jsxs(Zd,{windowSize:i,children:[c.bold," "]})}):null,c.post?t.jsx($s,{text:c.post,linkText:c.postLink,windowSize:i,isCopied:r,onLinkClick:a}):null]},u+c.bold+c.pre+c.post))})};function iu(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:S={},hideEmptyDivBelowTabs:$=!1,belowTabsSlot:v}=e,T=a("autoCategorized")?.count??0,I=a("review")?.count??0,w=a("reconcile")?.count??0,k=i.tabs.length>0||i.subTitle.length>0,j=m==="transaction_categorization"&&l==="autoCategorized",b=m==="reconciliation"&&y==="review"&&d!=null,P=m==="reconciliation"&&y==="reconcile"&&d!=null,A=j?T>0:b?c==="In-Progress"?!0:I>0:P?c==="In-Progress"?!0:w>0:r!=="complete",R=Tt(),F=Ce();let V=[];i.tabs.length>0&&(V=i.tabs.map(M=>({label:M.label,id:M.id,countDetails:a(M.id)})));const q=i.tabs.some(M=>(m==="reconciliation"?M.id===y:m==="missing_receipts"?M.id===p:M.id===l)&&M.subTitle.length>0);return t.jsxs(Od,{children:[t.jsx(_l,{title:i.title,subTitle:i.subText,titleTextStyles:{flex:"1 1 0px"},backgroundColor:R.colors.grey4,onBackClick:()=>null,titleStyle:S,ignoreScrollAction:m!=="month_end_insights",keepBackgroundOnScroll:m!=="month_end_insights",leftSideComponent:t.jsx(nu,{...e}),rightSideComponent:t.jsx(tu,{...e}),source:"NavBarWithHeader"}),C??null,t.jsx(Ye,{controller:k===!0,children:t.jsx(Ss,{windowSize:F,children:i.tabs.length>0?t.jsxs(t.Fragment,{children:[t.jsx(Hd,{windowSize:F,children:t.jsx(Vl,{allTabs:V,selectedTab:m==="transaction_categorization"?l??V[0].id:m==="missing_receipts"?p??V[0].id:y??V[0].id,onTabChange:M=>{if(m==="transaction_categorization"){const O=ud(M.id);O!=null&&h(O)}else if(m==="reconciliation"){const O=hd(M.id);O!=null&&x(O)}else m==="missing_receipts"&&g?.(M.id)},maximumCountLimit:Ed})}),t.jsx(Kd,{windowSize:F}),$!==!0?t.jsx(Jd,{}):null,t.jsx(Ye,{controller:(A===!0||u===!0)&&q,children:t.jsx(ks,{windowSize:F,"data-testid":D("subtitle-container"),children:i.tabs.map((M,O)=>(m==="reconciliation"?M.id===y:m==="missing_receipts"?M.id===p:M.id===l)?t.jsx(qd,{"data-testid":D("subtitle-wrapper",M.id),children:t.jsx(Is,{subTitles:M.subTitle})},O+M.id):null)})})]}):t.jsx(Ye,{controller:A===!0||u===!0,children:t.jsx(ks,{windowSize:F,children:t.jsx(Is,{subTitles:i.subTitle})})})})}),v!=null?t.jsx(Ss,{windowSize:F,children:t.jsx(Wd,{children:v})}):null]})}const ou=1;function su({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:S,onDragStart:$,rowHeight:v=40,initialScrollOffSet:T,onScroll:I}){const w=Ce(),k=s.useRef(null),{control:j}=qo(),b=i.find(F=>F.groupLabel),P=i.filter(F=>!F.groupLabel),A=[];for(const F of P)if(F.isException||A.push(F.value),C!=null&&A.length===C+1)break;const R=i.filter(F=>F.defaultChecked).map(F=>F.value);return t.jsx(yr,{control:j,name:e,rules:m,defaultValue:R,render:({field:{value:F,ref:V,onChange:q}})=>{const M=O=>{ru({event:O,value:F,allCheckBoxValues:A,groupLabelCheckBox:b,onChange:q})};return t.jsxs(lu,{style:h,windowSize:w,children:[b&&t.jsx(Yo,{checkBox:b,index:0,value:F,allCheckBoxValues:A,mode:l,name:e,checkBoxContainerStyle:x,checkBoxIconStyle:g,checkBoxStyle:c,labelCheckBoxStyle:a,labelStyle:d,width:u,draggable:y,groupLabelCheckBox:b,infoIconContainerStyle:S,checkedIconColor:p,isDisabled:r,selectionLimit:C,onDragStart:$,ref:V,onChangeHandler:M}),t.jsx(cu,{children:t.jsx(qn,{style:{height:"100%",width:"100%"},children:({height:O,width:re})=>t.jsx(Pi,{ref:k,height:O,width:re,itemCount:P.length,itemSize:()=>v,estimatedItemSize:v,initialScrollOffset:T??0,onScroll:({scrollOffset:B})=>{I?.(B)},overscanCount:ou,itemKey:B=>P[B].value,itemData:{checkBoxes:P,value:F,allCheckBoxValues:A,mode:l,name:e,checkBoxContainerStyle:x,checkBoxIconStyle:g,checkBoxStyle:c,labelCheckBoxStyle:a,labelStyle:d,width:u,draggable:y,groupLabelCheckBox:b,infoIconContainerStyle:S,checkedIconColor:p,isDisabled:r,selectionLimit:C,onDragStart:$,ref:V,onChange:q,handleChangeEvent:M,rowHeight:v},children:au})})})]})}})}const au=({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:S,groupLabelCheckBox:$,infoIconContainerStyle:v,checkedIconColor:T,isDisabled:I,selectionLimit:w,onDragStart:k,ref:j,handleChangeEvent:b}=l,P=h[e];return t.jsx(gu,{style:{...i,width:"100%"},ref:r,children:t.jsx(Yo,{checkBox:P,index:e,value:d,allCheckBoxValues:a,mode:c,name:u,checkBoxContainerStyle:m,checkBoxIconStyle:p,checkBoxStyle:g,labelCheckBoxStyle:x,labelStyle:y,width:C,draggable:S,groupLabelCheckBox:$,infoIconContainerStyle:v,checkedIconColor:T,isDisabled:I,selectionLimit:w,onDragStart:k,ref:j,onChangeHandler:b})})},Yo=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:S,width:$,checkedIconColor:v,checkBoxIconStyle:T,labelStyle:I,onDragStart:w,onChangeHandler:k}=e,j=Ce(),b=F=>{typeof i=="function"?i(F):i&&(i.current=F)};let P=l.includes(r.value);const A=Array.from(new Set([...l,r.value]));h?.value===r.value&&l.length>0&&(a!=null?P=A.length===d.length||A.length===a+1:P=d.every(F=>A.includes(F)===!0));const R=()=>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(uu,{mode:c,draggable:g===!0,onDragStart:F=>{w?.(F,r.value)},style:x,isDisabled:p,isSelected:P,exceptionMode:r.exceptionMode,children:[r.prefix?t.jsx(du,{className:"prefix-box",children:r.prefix}):null,r.isException?t.jsx(hu,{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(pu,{}):t.jsx(mu,{})})}):t.jsx(Vc,{name:`${C}.${r.value}`,checkBoxValue:r.value,value:P,checkedIconColor:v,isDisabled:p||!r.groupLabel&&!P&&a!=null&&A.length===a+1?"disabled":void 0,checkBoxStyle:R(),checkBoxIconStyle:T,ref:b,onChange:k}),typeof r.label=="string"&&r.label?t.jsx(Nc,{isDisabled:p,label:r.label,labelStyle:I,htmlFor:`${C}.${r.value}`,style:{display:"flex",flex:1,minHeight:n.sp4,marginLeft:n.sp2,width:$,backgroundColor:"inherit",...I}}):r.label]},`${r.value}_${S}`)});Yo.displayName="CheckBoxWithLabel";const ru=({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))},lu=o.div`
|
|
157
|
-
display: flex;
|
|
158
|
-
flex-direction: column;
|
|
159
|
-
width: 100%;
|
|
160
|
-
height: 100%;
|
|
161
|
-
`,cu=o.div`
|
|
162
|
-
flex: 1;
|
|
163
|
-
overflow: hidden;
|
|
164
|
-
`,du=o.div`
|
|
165
|
-
opacity: 0;
|
|
166
|
-
`,uu=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"&&le`
|
|
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"&&le`
|
|
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"&&le`
|
|
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"&&le`
|
|
215
|
-
:hover {
|
|
216
|
-
.checkbox-alert {
|
|
217
|
-
opacity: 1;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
`}
|
|
221
|
-
|
|
222
|
-
${e=>e.exceptionMode==="checked_or_hover"&&le`
|
|
223
|
-
.checkbox-alert {
|
|
224
|
-
opacity: 1;
|
|
225
|
-
}
|
|
226
|
-
`}
|
|
227
|
-
`,hu=o.div`
|
|
228
|
-
cursor: pointer;
|
|
229
|
-
`,pu=o(or)`
|
|
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
|
-
`,mu=o(Lr)`
|
|
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
|
-
`,gu=o.div`
|
|
242
|
-
width: 100%;
|
|
243
|
-
box-sizing: border-box;
|
|
244
|
-
`,xu=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})),fu=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})),yu=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})),wu=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"})),bu=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
|
-
`,Cu=o(fu)`
|
|
253
|
-
width: 90px;
|
|
254
|
-
height: 90px;
|
|
255
|
-
`,vu=o(yu)`
|
|
256
|
-
width: 90px;
|
|
257
|
-
height: 90px;
|
|
258
|
-
`,Su=o(xu)`
|
|
259
|
-
width: 90px;
|
|
260
|
-
height: 90px;
|
|
261
|
-
`,ku=o(wu)`
|
|
262
|
-
width: 90px;
|
|
263
|
-
height: 90px;
|
|
264
|
-
`,ju=o.div`
|
|
265
|
-
display: flex;
|
|
266
|
-
align-items: center;
|
|
267
|
-
justify-content: center;
|
|
268
|
-
flex-direction: column;
|
|
269
|
-
`,$u=o(_o)`
|
|
270
|
-
margin-top: ${n.sp2};
|
|
271
|
-
color: ${e=>e.theme.colors.brandColorJade};
|
|
272
|
-
`,Iu=o(sr)`
|
|
273
|
-
color: ${e=>e.theme.colors.primary};
|
|
274
|
-
`,Tu=e=>{const{tab:i}=e;switch(i){case"transaction_categorization":return t.jsx(Cu,{});case"je_schedules":case"reconciliation":return t.jsx(ku,{});case"flux_analysis":return t.jsx(Su,{});case"missing_receipts":default:return t.jsx(vu,{})}};function It(e){const{title:i,subTitle:l}=e;return t.jsx(bu,{children:t.jsxs(ju,{children:[t.jsx(Tu,{...e}),t.jsx($u,{children:i}),t.jsx(Iu,{children:l})]})})}const{common:{headers:{transactions:Lu,jeSchedules:Au,fluxAnalysis:Ru,missingReceipts:Eu,insights:Du,reconciliation:Ts},strings:{empty:on}},uncategorizedTransactionList:{missingReceipt:{bulkUpload:{missing:Mu,unmatched:Ou,completed:zu}}},expenseAutomation:{transactions:{tabs:Ls,subTitles:{review:{item1:hi,item2:pi},autoCategorized:{item1:mi,item2:Pu}},searchPlaceholder:Fu,allDoneText:Bu},jeSchedules:{subTitles:{item1:_u,item2:Vu},searchPlaceholder:Nu,allDoneText:Uu},missingReceipts:{subTitles:Wu,searchPlaceholder:Hu,allDoneText:Ji},fluxAnalysis:{subTitles:{item1:qu,item2:Ku},searchPlaceholder:Ju,emptyPageTexts:{youDidIt:Qu,allReviewed:Gu}},accountRecon:{review:{allDoneText:As},reconcile:{allDoneText:Yu},tabs:Rs,titles:{item1:Zu,item2:Xu},subTitles:{review:{item1:eh,item2:gi},reconcile:{item1:xi,item2:th}}}}}=me.getLocalizedStrings(),He=(e,i,l,r,h,d)=>{switch(e){case"transaction_categorization":return{key:"transaction_categorization",title:Lu,subTitle:[],tabs:[{label:Ls.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:Ls.autoCategorized,id:"autoCategorized",subTitle:[{pre:mi.pre,bold:mi.bold,prefixIconName:mi.prefixIconName,post:mi.post.replace("#number",i!=null&&i!=0?i.toString():"")},Pu]}],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Fu,allDoneText:Bu};case"je_schedules":return{key:"je_schedules",title:Au,subTitle:[_u,Vu],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Nu,allDoneText:Uu};case"missing_receipts":{const a=d?.includeBulkUploadTabs!==!1;return{key:"missing_receipts",title:d?.navTitle??Eu,subTitle:[Wu],tabs:a?[{label:Mu,id:"missing",subTitle:[],allDoneText:Ji},{label:Ou,id:"unmatched",subTitle:[]},{label:zu,id:"completed",subTitle:[],allDoneText:Ji}]:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Hu,allDoneText:Ji}}case"flux_analysis":return{key:"flux_analysis",title:Ru,subTitle:[qu,Ku],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Ju,allDoneText:{title:Qu,subTitle:Gu}};case"month_end_insights":return{key:"month_end_insights",title:Du,subTitle:[],tabs:[],rightSection:["comment","refresh","close"],leftSection:[],searchPlaceholder:on,allDoneText:{title:on,subTitle:on}};case"reconciliation":return l==null?{key:"reconciliation",title:Ts,subTitle:[Zu,Xu],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:on,allDoneText:{title:on,subTitle:on}}:{key:"reconciliation",title:r??Ts,subText:h??void 0,subTitle:[],tabs:[{label:Rs.review,id:"review",subTitle:[eh,{pre:gi.pre,bold:gi.bold,prefixIconName:gi.prefixIconName,post:gi.post}],allDoneText:As},{label:Rs.reconcile,id:"reconcile",subTitle:[{pre:xi.pre,bold:xi.bold,prefixIconName:xi.prefixIconName,post:xi.post},th],allDoneText:Yu}],rightSection:["refresh"],leftSection:["back"],searchPlaceholder:on,allDoneText:As}}},{common:{strings:{empty:nh}},expenseAutomation:{accountRecon:{reconcile:{header:Gt}}}}=me.getLocalizedStrings(),ih={key:"date",value:Gt.date,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginLeft:f[4],marginRight:f[3]}},oh={key:"clearedDate",value:Gt.clearedDate,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginRight:f[3],display:"none"}},sh={key:"type",value:Gt.type,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginRight:f[3]}},ah={key:"payee",value:Gt.payee,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginRight:f[3]}},rh={key:"account",value:Gt.account,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginRight:f[3]}},lh={key:"transactionDirection",value:Gt.direction,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginRight:f[3]}},ch={key:"memo",value:Gt.memo,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginRight:f[3]}},dh={key:"amount",value:Gt.amount,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginRight:f[3]}},uh={key:"recommended",value:nh,sortOrder:"ascending",width:new Q(1.25,1.25,1.25),customStyle:{marginRight:f[4],marginLeft:f[0]}},Ne=[ih,oh,sh,ah,rh,lh,ch,dh,uh],hh=50,Fn={sortKey:"date",sortOrder:"descending"};function ph({sortConfig:e,onReconTabColumnSortConfigChanged:i}){const l=Ce(),[r,h]=s.useState(Eo(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(fh,{headerHeight:hh,children:r.map(c=>t.jsx(gh,{columnWidth:c.width,windowSize:l,sortDataValue:e.sortKey,actualDataValue:c.key,style:c.customStyle,children:t.jsxs(vh,{isVisible:c.key!=="recommended",children:[t.jsx(xh,{"data-testid":D("reconcile-tab-list-sort",c.value),onClick:()=>a(c),children:t.jsx(Ze,{children:c.value})}),t.jsx(yh,{sortConfig:e,headerData:c,children:t.jsx(wh,{})}),t.jsx(bh,{isVisible:e.sortKey===c.key&&(e.sortKey!==Fn.sortKey||e.sortOrder!==Fn.sortOrder),children:t.jsx(Ch,{"data-testid":D("reconcile-tab-list-reset-sort",Fn.sortKey),onClick:()=>i(Fn.sortKey,Fn.sortOrder)})})]})},c.key))})}const mh=ld.memo(ph),gh=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
|
-
`,xh=o.div`
|
|
288
|
-
display: flex;
|
|
289
|
-
gap: 5px;
|
|
290
|
-
cursor: pointer;
|
|
291
|
-
`,fh=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
|
-
`,yh=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
|
-
`,wh=o(Xn)`
|
|
309
|
-
width: ${n.sp2};
|
|
310
|
-
height: ${n.sp2};
|
|
311
|
-
`,bh=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
|
-
`,Ch=o(ei)`
|
|
321
|
-
width: 12px;
|
|
322
|
-
height: 12px;
|
|
323
|
-
`,vh=o.div`
|
|
324
|
-
display: ${e=>e.isVisible?"flex":"none"};
|
|
325
|
-
`,Sh=54,kh=72,{common:{strings:{hyphen:Qi}}}=me.getLocalizedStrings(),{dateFormat:Es}=me.getLocalizedStrings();function jh({selectedTransactionIds:e,transaction:i,transactionId:l}){const r=Ce(),h=Tt(),[d,a]=s.useState(!1),c=e.includes(l),u=d||c;return t.jsx($h,{id:l,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:t.jsxs(Ih,{isSelected:u,totalHeight:Sh,children:[t.jsx(zt,{windowSize:r,responsiveWidth:Ne[0].width,style:Ne[0].customStyle,children:t.jsx(sn,{isSelected:u,children:i.date.format(Es.visual.MMMDCommaYYYYformat)})}),Ne[1].customStyle.display!=="none"?t.jsx(zt,{windowSize:r,responsiveWidth:Ne[1].width,style:Ne[1].customStyle,children:t.jsx(sn,{isSelected:u,children:i.clearedDate!=null?i.clearedDate.format(Es.visual.MMMDCommaYYYYformat):t.jsx("span",{children:Qi})})}):null,t.jsx(zt,{windowSize:r,style:Ne[2].customStyle,responsiveWidth:Ne[2].width,children:t.jsx(Ah,{isSelected:u,children:t.jsx(Th,{isSelected:u,children:Bc(i.type)})})}),t.jsx(zt,{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(sn,{isSelected:u,children:t.jsx("span",{children:Qi})})}),t.jsx(zt,{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(sn,{isSelected:u,children:t.jsx("span",{children:Qi})})}),t.jsx(zt,{windowSize:r,style:Ne[5].customStyle,responsiveWidth:Ne[5].width,children:t.jsx(sn,{isSelected:u,style:{textTransform:"capitalize"},children:i.transactionDirection})}),t.jsx(zt,{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(zt,{windowSize:r,style:Ne[7].customStyle,responsiveWidth:Ne[7].width,children:t.jsx(sn,{isSelected:u,children:it("0,0.[00]",i.amount)})}),t.jsx(zt,{windowSize:r,responsiveWidth:Ne[8].width,style:Ne[8].customStyle,children:t.jsx(sn,{isSelected:u,children:i.isZeniRecommended?t.jsx(Lh,{}):null})})]})})}const $h=o.div`
|
|
326
|
-
box-sizing: border-box;
|
|
327
|
-
width: 100%;
|
|
328
|
-
display: flex;
|
|
329
|
-
padding-right: ${n.sp8};
|
|
330
|
-
`,Ih=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
|
-
`,zt=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
|
-
`,sn=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
|
-
`,Th=o(Ze)`
|
|
358
|
-
text-transform: capitalize;
|
|
359
|
-
color: ${e=>e.isSelected===!0?e.theme.colors.primary:e.theme.colors.hero};
|
|
360
|
-
`,Lh=o(Qt)`
|
|
361
|
-
width: ${n.sp3};
|
|
362
|
-
height: ${n.sp3};
|
|
363
|
-
margin-right: ${n.sp1};
|
|
364
|
-
path {
|
|
365
|
-
stroke-width: 2;
|
|
366
|
-
}
|
|
367
|
-
`,Ah=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
|
-
`,Rh=me.getLocalizedStrings(),{common:{all:Ds,strings:{empty:Ms}}}=Rh,Os="selectedTransactionIds",Eh="expenseAutomationBankReconReconcilePage",Dh=e=>`${e}_form`;function Mh({currentFooterFormId:e,localData:i,matchedTransactions:l,sortConfig:r,onSaveReconciliation:h,selectedAccountId:d,onReconTabColumnSortConfigChanged:a,onUpdateReconcileTabLocalData:c,setCurrentFooterFormId:u}){const m=gn({mode:"all",defaultValues:{selectedTransactionIds:i.selectedTransactionIds},values:{selectedTransactionIds:i.selectedTransactionIds}}),p={label:t.jsx(mh,{onReconTabColumnSortConfigChanged:a,sortConfig:r}),value:Ds.toLocaleLowerCase(),defaultChecked:!1,groupLabel:!0},g=l.map(S=>({label:t.jsx(jh,{transaction:S,selectedTransactionIds:i.selectedTransactionIds,transactionId:S.id}),value:S.id,defaultChecked:!1,groupLabel:!1})),x=[p,...g],y=async S=>{const $=S[Os].filter(v=>v!=Ds.toLocaleLowerCase());c($)};s.useEffect(()=>{const S=m.watch($=>{$!=null&&Qn(()=>y($))});return()=>{S.unsubscribe()}}),s.useEffect(()=>(e!=="expenseAutomationBankReconReconcilePage"&&u("expenseAutomationBankReconReconcilePage"),()=>{u("expenseAutomationPage")}),[]);const C=s.useCallback(()=>{h({reconcileAction:"reconcile"})},[h]);if(l.length===0){const S=He("reconciliation",void 0,d).tabs.find($=>$.id==="reconcile")?.allDoneText;return t.jsx(Fh,{children:t.jsx(It,{tab:"missing_receipts",title:S?.title??Ms,subTitle:S?.subTitle??Ms})})}return t.jsx(Oh,{children:t.jsx(xn,{...m,children:t.jsx(zh,{onSubmit:m.handleSubmit(C),id:Dh(Eh),children:t.jsx(Ph,{children:t.jsx(su,{name:Os,checkBoxes:x,checkBoxStyle:{padding:20},labelCheckBoxStyle:{padding:20},rowHeight:kh,mode:i.selectedTransactionIds.length>0?"always_on":"checked_or_hover",checkBoxContainerStyle:{boxSizing:"border-box"}})})})})})}const Oh=o.div``,zh=o.form``,Ph=o.div`
|
|
372
|
-
height: calc(100vh - 350px);
|
|
373
|
-
`,Fh=o.div`
|
|
374
|
-
height: 100%;
|
|
375
|
-
display: flex;
|
|
376
|
-
justify-content: center;
|
|
377
|
-
align-items: center;
|
|
378
|
-
`,Do=69,be={COLUMN_ONE:187,COLUMN_THREE:136,COLUMN_FOUR:240,COLUMN_FIVE:146},Br=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
|
-
`,_r=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
|
-
`,Vr=o.div`
|
|
395
|
-
width: 100%;
|
|
396
|
-
`,Nr=o.div`
|
|
397
|
-
width: 100%;
|
|
398
|
-
`,Zo=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
|
-
`,Xo=o.div`
|
|
406
|
-
display: flex;
|
|
407
|
-
flex-direction: row;
|
|
408
|
-
justify-content: space-between;
|
|
409
|
-
padding: ${n.sp2};
|
|
410
|
-
padding-right: ${n.sp3};
|
|
411
|
-
`,Bh=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
|
-
`,_h=o.div`
|
|
419
|
-
padding: ${n.sp2} ${n.sp3};
|
|
420
|
-
`,es=o.div`
|
|
421
|
-
display: flex;
|
|
422
|
-
`,Vh=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
|
-
`,ts=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
|
-
`,ae=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(Ze)`
|
|
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
|
-
`,ns=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
|
-
`,is=o.div`
|
|
513
|
-
flex: 1;
|
|
514
|
-
`,Ur=o(Ze)`
|
|
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
|
-
`,Ti=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(Ti)`
|
|
526
|
-
padding: 2px ${n.sp2};
|
|
527
|
-
`,Ht=me.getLocalizedStrings().expenseAutomation.accountRecon.review.header,Ft=[{key:"date",value:Ht.date,sortOrder:"ascending",width:new Q(20,20),loaderWidth:120},{key:"payee",value:Ht.payee,sortOrder:"ascending",width:new Q(20,20),loaderWidth:212},{key:"memo",value:Ht.memo,sortOrder:"ascending",width:new Q(20,20),loaderWidth:192},{key:"direction",value:Ht.direction,sortOrder:"ascending",width:new Q(15,15),loaderWidth:84},{key:"match",value:Ht.match,sortOrder:"ascending",width:new Q(15,15),loaderWidth:152},{key:"amount",value:Ht.amount,sortOrder:"ascending",width:new Q(10,10),loaderWidth:64}],Mo=[{key:"payee",value:Ht.payee,sortOrder:"ascending",width:new Q(65,65),loaderWidth:212},{key:"amount",value:Ht.amount,sortOrder:"ascending",width:new Q(30,30),loaderWidth:64}],Nh=e=>{const{sortConfig:i,onColumnSortConfigChanged:l}=e,r=Ce(),h=Xe()?Mo: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(Wh,{children:d.map(u=>t.jsxs(Hh,{sortDataValue:i.sortKey,actualDataValue:u.key,wrapperWidth:u.width,windowSize:r,isLastColumn:u.key==="amount",children:[t.jsxs(qh,{"data-testid":D("account-reconciliation-review-header",u.value),sortKey:u.key,onClick:()=>c(u.key,u.sortOrder),children:[t.jsx(Ze,{children:u.value}),t.jsx(Kh,{sortDataValue:i.sortKey,headerData:u,children:t.jsx(Jh,{})})]}),t.jsx(Qh,{sortDataValue:i.sortKey,windowSize:r,isVisible:i.sortKey===u.key&&(i.sortKey!=="date"||i.sortOrder==="ascending"),children:t.jsx(Gh,{"data-testid":D("account-reconciliation-review-sort-by-date"),onClick:()=>c("date","ascending")})})]},u.key))})},Uh=s.memo(Nh),Wh=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
|
-
`,Hh=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
|
-
`,qh=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
|
-
`,Kh=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"?le`
|
|
562
|
-
padding-top: 2px;
|
|
563
|
-
`:le`
|
|
564
|
-
padding-bottom: 2px;
|
|
565
|
-
`}
|
|
566
|
-
`,Jh=o(Xn)`
|
|
567
|
-
width: ${n.sp2};
|
|
568
|
-
height: ${n.sp2};
|
|
569
|
-
cursor: pointer;
|
|
570
|
-
color: inherit;
|
|
571
|
-
`,Qh=o.div`
|
|
572
|
-
display: ${e=>e.isVisible?"flex":"none"};
|
|
573
|
-
align-items: center;
|
|
574
|
-
padding-top: 2px;
|
|
575
|
-
`,Gh=o(ei)`
|
|
576
|
-
width: 12px;
|
|
577
|
-
height: 12px;
|
|
578
|
-
cursor: pointer;
|
|
579
|
-
color: ${e=>e.theme.colors.hero};
|
|
580
|
-
`,kt="accountReconReviewTableSection",{dateFormat:Yh,expenseAutomation:Zh,common:Et}=me.getLocalizedStrings(),{visual:Wr}=Yh,{accountRecon:Se}=Zh,Hr=e=>[{label:Se.review.formLabels.allBankAccounts,options:e.map(i=>({label:i.accountName,value:i.accountId}))}],qr=e=>[{label:Se.review.formLabels.allCreditCards,options:e.map(i=>({label:i.accountName,value:i.accountId}))}],zs=e=>`${kt}_${e}_form`,Oe=(e,i)=>`${kt}.${e}.${i}`,Xh=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:S,updateLocalData:$,onColumnSortConfigChanged:v,onSaveReconciliation:T,onSaveReconciliationReview:I,onReconMatchedTransactionClick:w,bankAccounts:k,creditCards:j}=e,{transactionsToReview:b,account:{accountType:P}}=r,A=s.useRef(null),[R,F]=s.useState(null),V=M=>{const O=b[M],re=Rr(O),B=Er(O),L=Dr(O,P??"bank"),U=Mr(O,P??"bank"),X=Or(O),ce=Qo(O),ge=O.recommendedAction.recommendedTransactions[0]?.merchantName!=null;return O.transactionId===R?B||L||U||X||ce?275+(ge?25:0):re?185+O.recommendedAction.recommendedTransactions.length*40+(ge?25:0):146:72},q=s.useMemo(()=>({onColumnSortConfigChanged:v,sortConfig:{sortKey:i,sortOrder:l}}),[v,i,l]);if(s.useEffect(()=>{F(b[0]?.transactionId??null),A.current?.resetAfterIndex(0)},[i,l]),s.useEffect(()=>{A.current?.resetAfterIndex(0)},[R]),s.useEffect(()=>{A.current?.resetAfterIndex(0)},[b.length]),s.useEffect(()=>{S.fetchState==="Completed"&&A.current?.resetAfterIndex(0)},[S]),b.length===0){const M=He("reconciliation",void 0,p).tabs.find(O=>O.id==="review")?.allDoneText;return t.jsx(Cp,{children:t.jsx(It,{tab:"reconciliation",title:M?.title??Et.strings.empty,subTitle:M?.subTitle??Et.strings.empty})})}return t.jsx(rp,{children:t.jsx(Kr.Provider,{value:q,children:t.jsx(qn,{children:({height:M,width:O})=>t.jsx(Pi,{width:O,height:M,innerElementType:Jr,ref:A,itemCount:b.length,itemSize:V,itemKey:re=>b[re].transactionId,overscanCount:Oc,itemData:{transactionsList:b,expandedRowId:R,allAccountList:d,classList:a,accountListNestedAccountHierarchy:u,classListNestedAccountHierarchy:m,localData:c,entitySearchAutoCompleteData:g,entitySearchAutoCompleteActions:h,excludeFetchById:x,saveFetchById:y,reviewTabSelectedVendorByTransactionId:C,bankAccounts:k,creditCards:j,accountType:P,updateLocalData:$,setExpandedRowId:F,onSaveReconciliation:T,onSaveReconciliationReview:I,onReconMatchedTransactionClick:w},initialScrollOffset:0,children:ep})})})})},Kr=s.createContext(void 0),Jr=s.forwardRef((e,i)=>{const{children:l,style:r,...h}=e,d=s.useContext(Kr);return t.jsxs(lp,{ref:i,style:{...r,width:"auto",maxWidth:"var(--side-panel-list-width, 100%)",padding:`${n.sp0} ${n.sp8}`},...h,children:[d!=null&&t.jsx(Uh,{onColumnSortConfigChanged:d.onColumnSortConfigChanged,sortConfig:d.sortConfig}),t.jsx(cp,{children:l})]})});Jr.displayName="Account recon review table inner element type";const ep=({index:e,style:i,data:l})=>{const{selectedTransactionId:r}=zi(),{transactionsList:h,expandedRowId:d,setExpandedRowId:a,entitySearchAutoCompleteActions:c,allAccountList:u,classList:m,localData:p,updateLocalData:g,accountListNestedAccountHierarchy:x,classListNestedAccountHierarchy:y,entitySearchAutoCompleteData:C,onSaveReconciliation:S,onSaveReconciliationReview:$,onReconMatchedTransactionClick:v,excludeFetchById:T,saveFetchById:I,reviewTabSelectedVendorByTransactionId:w,bankAccounts:k,creditCards:j,accountType:b}=l,P=h[e],A=r!=null&&r===P.transactionId;return t.jsx(ap,{isPanelSelected:A,style:{...i,width:"100%"},children:t.jsx(tp,{transaction:P,expandedRowId:d,setExpandedRowId:a,entitySearchAutoCompleteActions:c,accountListNestedAccountHierarchy:x,allAccountList:u,classList:m,localData:p,updateLocalData:g,entitySearchAutoCompleteData:C,classListNestedAccountHierarchy:y,onSaveReconciliation:S,onSaveReconciliationReview:$,onReconMatchedTransactionClick:v,excludeFetchById:T,saveFetchById:I,selectedVendor:w[P.transactionId],bankAccounts:k,creditCards:j,accountType:b})})},tp=({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:S,updateLocalData:$,onSaveReconciliation:v,onSaveReconciliationReview:T,onReconMatchedTransactionClick:I})=>{const w=i===e.transactionId,k=Ce(),j=Xe(),b=c[e.transactionId],P=e.recommendedAction.action==="record_bill_payment",A=e.recommendedAction.action==="record_expense",R=Qo(e),F=h.find(M=>M.accountId===e.recommendedAction.recommendedTransactions[0]?.accountId),V=M=>M.recommendedAction.recommendedTransactions.length>0&&M.recommendedAction.recommendedTransactions[0].merchantName!=null?M.recommendedAction.recommendedTransactions[0].merchantName:Et.strings.hyphen,q=e.recommendedAction.recommendedTransactions[0]?.merchantName;return t.jsxs(ip,{className:"recon-row-card",isQuickViewMode:j,isExpanded:w,children:[t.jsxs(op,{isExpanded:w,onClick:()=>S(e.transactionId),"data-testid":D("account-reconciliation-review-row",e.transactionId),children:[j?null:t.jsx(vn,{windowSize:k,responsiveWidth:Ft[0].width,children:t.jsx(Cn,{children:e.transactionDate.format(Wr.MMMDCommaYYYYformat)})}),t.jsx(vn,{windowSize:k,responsiveWidth:j?Mo[0].width:Ft[1].width,children:t.jsx(Cn,{children:t.jsx(qe,{itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"},text:V(e)})})}),j?null:t.jsxs(t.Fragment,{children:[t.jsx(vn,{windowSize:k,responsiveWidth:Ft[2].width,children:t.jsx(Cn,{children:t.jsx(qe,{itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"},text:e.memo})})}),t.jsx(vn,{windowSize:k,responsiveWidth:Ft[3].width,children:t.jsx(Cn,{style:{textTransform:"capitalize"},children:e.transactionDirection})}),t.jsxs(vn,{windowSize:k,responsiveWidth:Ft[4].width,children:[t.jsx(Ye,{controller:P,children:t.jsx(vp,{children:t.jsx(Sp,{children:Se.review.matchesCount.replace("__count__",e.recommendedAction.recommendedTransactions.length.toString())})})}),t.jsx(Ye,{controller:!P,children:t.jsx(Cn,{children:F!=null?t.jsxs(t.Fragment,{children:[t.jsx(Qr,{}),t.jsx(qe,{itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"},text:F.accountName})]}):Et.strings.hyphen})})]})]}),t.jsx(vn,{windowSize:k,isLastColumn:!0,responsiveWidth:j?Mo[1].width:Ft[5].width,children:t.jsx(Cn,{children:Ko("0,0.00",e.amount.amount,e.amount.currencySymbol)})})]}),t.jsxs(Ye,{controller:w&&b!=null,children:[t.jsx(np,{onSaveReconciliation:v,onSaveReconciliationReview:T,updateLocalData:$,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:I}),t.jsx(Ye,{controller:(P||A||R)&&q!=null,children:t.jsx(jp,{children:t.jsxs($p,{children:[C==="credit_card"?Se.review.creditCardDetail:Se.review.bankDetail,Et.strings.colon," ",q]})})})]})]})},np=({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:S,onSaveReconciliationReview:$,onReconMatchedTransactionClick:v})=>{const T=Tt(),I=Xe(),[w,k]=s.useState(!a.vendor?.id),[j,b]=s.useState(!a.customer?.id),[P,A]=s.useState(a.categoryId==null),[R,F]=s.useState(a.classId==null),[V,q]=s.useState(a.bankAccountId==null),[M,O]=s.useState(a.creditCardId==null),[re,B]=s.useState(!a.memo),L=Rr(e),U=Er(e),X=Mr(e,y??"bank"),ce=Dr(e,y??"bank"),ge=Or(e),te=Qo(e),J=s.useMemo(()=>{if(!U&&!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),de=E!=null?{...E,reason:Se.review.zeniGptRecommendation,min:0,max:0}:void 0;return Kt(i,[{account:de}])},[U,te,p,e.recommendedAction.recommendedTransactions,r,i]),ee=s.useMemo(()=>{if(!U&&!te)return $i(d);if(p!=null&&p.id!==e.recommendedAction.recommendedTransactions[0]?.merchantId)return $i(d,p?.recommendations);const E=h.find(je=>je.classId===e.recommendedAction.recommendedTransactions[0]?.classId),de=E!=null?{...E,reason:Se.review.zeniGptRecommendation,min:0,max:0}:void 0;return $i(d,[{class:de}])},[U,te,p,e.recommendedAction.recommendedTransactions,h,d]),H=gn({mode:"onSubmit",reValidateMode:"onSubmit",shouldFocusError:!0,defaultValues:s.useMemo(()=>Ps(e,a,J,r,ee,g,x,c),[e,a,ee,r,J,g,x,c]),values:s.useMemo(()=>Ps(e,a,J,r,ee,g,x,c),[e,a,ee,r,J,g,x,c])}),_=async(E,de)=>{E.includes("memo")||C(Fs(de,e,c,r),e.transactionId,E.includes("vendor"))};s.useEffect(()=>{const E=H.watch((de,{name:je})=>{je!=null&&de!=null&&Qn(()=>_(je,de))});return()=>{E.unsubscribe()}});const ne=s.useCallback(E=>{if(!I){if(U||ge||te){if((U||te)&&a.vendor==null){k(!1),H.setError(Oe(e.transactionId,"vendor"),{type:"required"});return}if(ge&&a.customer==null){b(!1),H.setError(Oe(e.transactionId,"customer"),{type:"required"});return}if(a.categoryId==null){A(!1),H.setError(Oe(e.transactionId,"category"),{type:"required"});return}}C(Fs(E,e,c,r),e.transactionId,!1),$(e.transactionId)}},[I,U,te,ge,C,e,c,r,$,a.categoryId,a.vendor,a.customer]),W=H.watch(Oe(e.transactionId,"vendor")),Z=H.watch(Oe(e.transactionId,"customer")),ie=s.useRef(),K=s.useMemo(()=>U||te?"vendor":ge?"customer":null,[U,te,ge]),N=(E,de)=>{K!=null&&l.onAutoCompleteInputChange?.(E,K),ie.current=de};s.useEffect(()=>{c.entityAutoCompleteView.fetchState==="Completed"&&((U||te)&&ie.current?.(Sr(c.entityAutoCompleteView)),ge&&ie.current?.(qc(c.entityAutoCompleteView)))},[c.entityAutoCompleteView,ge,U,te]);const z=E=>h.filter(de=>de.classId===E)[0]?.accountingClassNumber??void 0,oe=E=>r.filter(de=>de.qboId===E)[0]?.qboId,Y=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]),G=()=>{I||A(!1)},ke=()=>{I||q(!1)},Ie=()=>{I||O(!1)};return s.useEffect(()=>{P===!1&&a.categoryId==null&&H.setFocus(Oe(e.transactionId,"category"))},[P]),s.useEffect(()=>{R===!1&&a.classId==null&&H.setFocus(Oe(e.transactionId,"class"))},[R]),s.useEffect(()=>{w===!1&&a.vendor==null&&H.setFocus(Oe(e.transactionId,"vendor"))},[w]),s.useEffect(()=>{j===!1&&a.customer==null&&H.setFocus(Oe(e.transactionId,"customer"))},[j]),s.useEffect(()=>{V===!1&&a.bankAccountId==null&&H.setFocus(Oe(e.transactionId,"bankAccount"))},[V]),s.useEffect(()=>{M===!1&&a.creditCardId==null&&H.setFocus(Oe(e.transactionId,"creditCard"))},[M]),t.jsx(xn,{...H,children:t.jsx("form",{onSubmit:H.handleSubmit(ne),id:zs(e.transactionId),children:t.jsxs(sp,{children:[t.jsxs(dp,{children:[t.jsxs(pp,{children:[t.jsxs(mp,{children:[t.jsx(Qr,{}),t.jsx(qi,{label:{label:L?Se.review.formLabels.match:Se.review.formLabels.categorize},radioField:{name:Oe(e.transactionId,"match_radio"),id:L?"match":"categorize",value:L?"match":"categorize",checked:!0,style:{width:n.sp3,height:n.sp3,padding:"2px"}},style:{width:"auto"}})]}),t.jsx(Ye,{controller:!L,children:t.jsxs(t.Fragment,{children:[t.jsx(Bs,{}),Y.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(hp,{children:[t.jsx(Un,{variant:"secondary",size:"small",label:Se.review.formLabels.exclude,loading:u[e.transactionId]?.fetchState==="In-Progress","data-testid":D("account-reconciliation-review-exclude-button",e.transactionId),style:{width:n.sp10},reverseSpinnerColor:!1,onClick:()=>{I||S({reconcileAction:"exclude",excludeTransactionId:e.transactionId})}}),t.jsx(Un,{form:zs(e.transactionId),"data-testid":D("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(Ye,{controller:U||ge||te,children:t.jsxs(Gi,{children:[t.jsx(Ye,{controller:U||te,children:t.jsx($t,{onClickAway:()=>{a.vendor==null&&w===!1&&k(!0)},children:t.jsx(ae,{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(),!I&&k(!1)},"data-testid":D("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(an,{}),Se.review.formLabels.addVendor]}):t.jsx(Ao,{name:Oe(e.transactionId,"vendor"),allowEmpty:!1,placeholder:Se.review.formLabels.addVendor,valueToId:E=>E,defaultValue:{selectedOption:W?.selectedOption,defaultOptions:W?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:n.sp4})},registerOptions:{required:!0,validate:E=>!!E.selectedOption},loadOptions:N})})})]})})})}),t.jsx(Ye,{controller:ge,children:t.jsx($t,{onClickAway:()=>{a.customer==null&&j===!1&&b(!0)},children:t.jsx(ae,{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(),!I&&b(!1)},"data-testid":D("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(an,{}),Se.review.formLabels.addCustomer]}):t.jsx(Ao,{name:Oe(e.transactionId,"customer"),allowEmpty:!1,placeholder:Se.review.formLabels.addCustomer,valueToId:E=>E,defaultValue:{selectedOption:Z?.selectedOption,defaultOptions:Z?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:n.sp4})},registerOptions:{required:!0,validate:E=>!!E.selectedOption},loadOptions:N})})})]})})})}),t.jsx($t,{onClickAway:()=>{a.categoryId==null&&P===!1&&A(!0)},children:t.jsx(ae,{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:P===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!I&&G()},"data-testid":D("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(an,{}),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:J,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&&R===!1&&F(!0)},children:t.jsx(ae,{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:R===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!I&&F(!1)},"data-testid":D("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(an,{}),Se.review.formLabels.addClass]}):t.jsx(In,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Oe(e.transactionId,"class"),placeholder:Se.review.formLabels.addClass,valueToId:E=>z(E),defaultValue:{allOptions:ee,selectedOption:a.classId},registerOptions:{required:!0,validate:E=>!!E.selectedOption},customStyleConfig:fi})})})]})})})]})}),t.jsx(Ye,{controller:L,children:t.jsxs(gp,{children:[t.jsxs(xp,{children:[t.jsx("span",{className:"matched-text",children:`${Se.review.matchedFoundCount.replace("__count__",e.recommendedAction.recommendedTransactions.length.toString())} `}),Se.review.matchesFoundFullInfo]}),t.jsx(yp,{children:e.recommendedAction.recommendedTransactions.map(E=>E.bookTransactionId!=null?t.jsxs(wp,{children:[t.jsx(qi,{label:{label:t.jsxs(fp,{children:[t.jsx(Re,{children:E.date.format(Wr.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(kp,{"data-testid":D("account-reconciliation-review-matched-transaction-amount",E.bookTransactionId),onClick:()=>{E.bookTransactionId!=null&&v(E.bookTransactionId)},children:[t.jsx(bp,{children:Ko("0,0.00",E.amount.amount,E.amount.currencySymbol)}),t.jsx(Bs,{})]})]},E.bookTransactionId):null)})]})}),t.jsx(Ye,{controller:X,children:t.jsx(Gi,{children:t.jsx($t,{onClickAway:()=>{a.bankAccountId==null&&V===!1&&q(!0)},children:t.jsx(ae,{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:V===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!I&&ke()},"data-testid":D("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(an,{}),Se.review.formLabels.selectAccount]}):t.jsx(In,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Oe(e.transactionId,"bankAccount"),placeholder:Se.review.formLabels.selectAccount,defaultValue:{allOptions:Hr(g),selectedOption:a.bankAccountId},registerOptions:{required:!0,validate:E=>!!E.selectedOption},customStyleConfig:fi})})})]})})})})}),t.jsx(Ye,{controller:ce,children:t.jsx(Gi,{children:t.jsx($t,{onClickAway:()=>{a.creditCardId==null&&M===!1&&O(!0)},children:t.jsx(ae,{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:M===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!I&&Ie()},"data-testid":D("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(an,{}),Se.review.formLabels.selectCard]}):t.jsx(In,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Oe(e.transactionId,"creditCard"),placeholder:Se.review.formLabels.selectCard,defaultValue:{allOptions:qr(x),selectedOption:a.creditCardId},registerOptions:{required:!0,validate:E=>!!E.selectedOption},customStyleConfig:fi})})})]})})})})}),t.jsx(Ye,{controller:!L,children:t.jsx(up,{children:t.jsx(ae,{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:re===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!I&&B(!1)},"data-testid":D("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(an,{}),Se.review.formLabels.addMemo]}):t.jsx(Kc,{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}`})},Ps=(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:Hr(d)},creditCard:{selectedOption:i?.creditCardId,allOptions:qr(a)},memo:i?.memo,recommendedActionType:e.recommendedAction.action,matchedTransaction:i?.matchedTransactionId,vendor:{selectedOption:i?.vendor?.id,defaultOptions:Tr(c.entityAutoCompleteView,i?.vendor)},customer:{selectedOption:i?.customer?.id,defaultOptions:id(i?.customer,c.entityAutoCompleteView)}}}}},Fs=(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}},Cn=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
|
-
`,ip=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
|
-
`,op=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
|
-
`,sp=o.div`
|
|
613
|
-
padding: ${n.sp2} ${n.sp4};
|
|
614
|
-
display: flex;
|
|
615
|
-
flex-direction: column;
|
|
616
|
-
row-gap: ${n.sp2};
|
|
617
|
-
`,ap=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&&le`
|
|
623
|
-
.recon-row-card {
|
|
624
|
-
${Go(e.theme)}
|
|
625
|
-
}
|
|
626
|
-
`}
|
|
627
|
-
`,rp=o.div`
|
|
628
|
-
height: calc(100vh - 350px);
|
|
629
|
-
max-width: 99.9%;
|
|
630
|
-
padding: ${n.sp0};
|
|
631
|
-
`,lp=o.div``,cp=o.div`
|
|
632
|
-
position: relative;
|
|
633
|
-
width: auto;
|
|
634
|
-
height: 100%;
|
|
635
|
-
display: flex;
|
|
636
|
-
flex-direction: column;
|
|
637
|
-
row-gap: ${n.sp3};
|
|
638
|
-
`,dp=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
|
-
`,Gi=o.div`
|
|
647
|
-
display: flex;
|
|
648
|
-
flex-direction: row;
|
|
649
|
-
align-items: center;
|
|
650
|
-
column-gap: ${n.sp3};
|
|
651
|
-
`,up=o.div`
|
|
652
|
-
width: 100%;
|
|
653
|
-
`,hp=o.div`
|
|
654
|
-
display: flex;
|
|
655
|
-
flex-direction: row;
|
|
656
|
-
align-items: center;
|
|
657
|
-
column-gap: ${n.sp3};
|
|
658
|
-
`,pp=o.div`
|
|
659
|
-
display: flex;
|
|
660
|
-
flex-direction: row;
|
|
661
|
-
align-items: center;
|
|
662
|
-
column-gap: ${n.sp6};
|
|
663
|
-
`,mp=o.div`
|
|
664
|
-
display: flex;
|
|
665
|
-
flex-direction: row;
|
|
666
|
-
align-items: center;
|
|
667
|
-
column-gap: ${n.sp1};
|
|
668
|
-
`,an=o(Fi)`
|
|
669
|
-
width: ${n.sp3};
|
|
670
|
-
height: ${n.sp3};
|
|
671
|
-
`,Bs=o(od)`
|
|
672
|
-
width: ${n.sp3};
|
|
673
|
-
height: ${n.sp3};
|
|
674
|
-
color: ${e=>e.theme.colors.hero};
|
|
675
|
-
`,gp=o.div`
|
|
676
|
-
display: flex;
|
|
677
|
-
flex-direction: column;
|
|
678
|
-
row-gap: ${n.sp3};
|
|
679
|
-
padding: ${n.sp0} 12px;
|
|
680
|
-
`,xp=o(Re)`
|
|
681
|
-
color: ${e=>e.theme.colors.primary};
|
|
682
|
-
|
|
683
|
-
.matched-text {
|
|
684
|
-
font-weight: ${Gn.bold};
|
|
685
|
-
}
|
|
686
|
-
`,fp=o.div`
|
|
687
|
-
display: flex;
|
|
688
|
-
align-items: center;
|
|
689
|
-
column-gap: ${n.sp2};
|
|
690
|
-
`,yp=o.div`
|
|
691
|
-
display: flex;
|
|
692
|
-
flex-direction: column;
|
|
693
|
-
row-gap: ${n.sp2};
|
|
694
|
-
`,wp=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
|
-
`,bp=o(Re)`
|
|
702
|
-
color: ${e=>e.theme.colors.hero};
|
|
703
|
-
`,Cp=o.div`
|
|
704
|
-
height: 100%;
|
|
705
|
-
display: flex;
|
|
706
|
-
justify-content: center;
|
|
707
|
-
align-items: center;
|
|
708
|
-
`,vp=o.div`
|
|
709
|
-
border: 1px solid ${e=>e.theme.colors.grey2};
|
|
710
|
-
padding: ${n.sp0} ${n.sp1};
|
|
711
|
-
border-radius: ${n.sp1};
|
|
712
|
-
`,Sp=o(Ze)`
|
|
713
|
-
color: ${e=>e.theme.colors.hero};
|
|
714
|
-
`,kp=o.div`
|
|
715
|
-
display: flex;
|
|
716
|
-
align-items: center;
|
|
717
|
-
column-gap: 20px;
|
|
718
|
-
cursor: pointer;
|
|
719
|
-
`,jp=o.div`
|
|
720
|
-
text-align: center;
|
|
721
|
-
padding: ${n.sp1} ${n.sp0};
|
|
722
|
-
border-top: 1px solid ${e=>e.theme.colors.grey3};
|
|
723
|
-
`,$p=o(Ze)`
|
|
724
|
-
color: ${e=>e.theme.colors.hero};
|
|
725
|
-
`,Qr=o(Qt)`
|
|
726
|
-
width: ${n.sp3};
|
|
727
|
-
height: ${n.sp3};
|
|
728
|
-
margin-right: ${n.sp1};
|
|
729
|
-
path {
|
|
730
|
-
stroke-width: 2;
|
|
731
|
-
}
|
|
732
|
-
`,Ip=({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:S}}},selectedReconAccount:$}=e,v=y[l],{transactionFetchState:T}=$??{};return T?.fetchState==="In-Progress"||T?.fetchState==="Not-Started"?t.jsxs(_s,{style:{paddingLeft:f[8],paddingRight:f[8]},children:[t.jsx(Tp,{children:Ft.map(I=>t.jsx(ot,{width:I.loaderWidth,height:18},I.key))}),t.jsxs(Ap,{children:[...Array(3).fill(0).map((I,w)=>t.jsx(Lp,{children:Ft.map(k=>t.jsx(ot,{width:k.loaderWidth,height:f[4]},k.key))},`${w}_${I}`))]})]}):t.jsx(_s,{children:e.selectedTab==="reconcile"?t.jsx(Mh,{selectedAccountId:l,currentFooterFormId:r,setCurrentFooterFormId:a,onUpdateReconcileTabLocalData:d,onReconTabColumnSortConfigChanged:c,onSaveReconciliation:p,sortConfig:{sortKey:C,sortOrder:S},localData:e.reconciliationTabsState.reconcile.localData,matchedTransactions:v?.accountReconEntity.transactionsToReconcile}):t.jsx(Xh,{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})})},_s=o.div`
|
|
733
|
-
width: 100%;
|
|
734
|
-
height: 100%;
|
|
735
|
-
`,Tp=o.div`
|
|
736
|
-
display: flex;
|
|
737
|
-
justify-content: space-between;
|
|
738
|
-
padding: ${n.sp3} ${n.sp4};
|
|
739
|
-
column-gap: ${n.sp6};
|
|
740
|
-
`,Lp=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
|
-
`,Ap=o.div`
|
|
750
|
-
display: flex;
|
|
751
|
-
gap: ${n.sp3};
|
|
752
|
-
flex-direction: column;
|
|
753
|
-
`;function Rp({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 Ep({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 Dp({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 Vs({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=Dp({title:r,section:e,config:a,numOfBalances:0});return u.children.push(m),e.accountIDs.forEach((p,g)=>{const x=i[p],y=Ep({account:x,numOfBalances:0,title:x.accountReconEntity.account.accountName,isLastNode:g===e.accountIDs.length-1,config:a});u.children.push(y)}),u}function Gr({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 Mp(e,i){return i?Ki("section")+Ki("total")+e*Ki("ac_group_report"):1/0}const Op=(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=Gr({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(S=>!m.includes(S));if(x)[...Array(3)].forEach((C,S)=>{u.push(Rp({title:`${S}+${g}`,config:i}))});else{const C=y(e.accountReconciliationBySectionID.assets.accountIDs),S=Vs({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(S),e.accountReconciliationBySectionID.liabilities.accountIDs.length>0){const $=y(e.accountReconciliationBySectionID.liabilities.accountIDs),v=Vs({section:{...e.accountReconciliationBySectionID.liabilities,accountIDs:$},allAccountReconciliations:e.accountReconciliationsByAccountID,title:p.headers.section.liabilities.title,subTitle:p.headers.section.liabilities.subTitle,isLastNode:!1,isTitleRowRequired:!0,config:i});u.push(v)}}return{config:i,headerNodes:h?[c]:[],contentNodes:u}};function zp(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=Gr({config:l,accountReconForSection:d});return{config:l,headerNodes:r?[a]:[],contentNodes:[a,...e.contentNodes.slice(1)]}}const Oo={wrapperPadding:new Q(f[2],f[2],f[2],f[8]),contentPaddingLeft:new Q(f[2],f[2],f[2],f[2]),contentPaddingRight:new Q(f[2],f[2],f[2],f[2])},Pp=o.div`
|
|
754
|
-
display: flex;
|
|
755
|
-
height: 100%;
|
|
756
|
-
width: 100%;
|
|
757
|
-
justify-content: center;
|
|
758
|
-
align-items: center;
|
|
759
|
-
`,Fp=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=>Oo.wrapperPadding.valuePx(e.windowSize)};
|
|
767
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
768
|
-
`,Bp=o.div`
|
|
769
|
-
width: 100%;
|
|
770
|
-
height: 100%;
|
|
771
|
-
`,{common:_p}=me.getLocalizedStrings();function Vp({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,[S,$]=s.useState(C.linkToken??null),[v,T]=s.useState(!1),{useDynamicConfig:I}=hr(),{configValue:w}=I(pr.accountReconGLAccountsConfig),k=s.useCallback(K=>{m(K),g("link_account_no_microdeposit")},[]),j=s.useCallback(K=>{const N=R.current.accountReconciliationsByAccountID[K]?.paymentAccountId;m(K),g("update_account"),d("update_account",N)},[]),b=s.useCallback(K=>{h(K)},[]),P=s.useRef(u),A=s.useRef(p),R=s.useRef(e);s.useEffect(()=>{P.current=u},[u]),s.useEffect(()=>{A.current=p},[p]),s.useEffect(()=>{R.current=e},[e]);const F=s.useCallback(K=>{a(K,P.current??"",A.current),m(void 0),g(void 0),T(!1)},[a]),V=s.useCallback((K,N)=>{K!=null&&console.log("Plaid Connection Error",K,N),m(void 0),g(void 0),T(!1)},[]),{open:q,ready:M}=vc({token:S,onSuccess:F,onExit:V});s.useEffect(()=>{(Di(new Date().toISOString()).isAfter(C.expiration)||C.linkToken==null)&&C.fetchStatus.fetchState==="Not-Started"&&d("link_account_no_microdeposit")},[C.fetchStatus.fetchState]),s.useEffect(()=>{!v&&p!=null&&C.linkToken===S&&C.fetchStatus.fetchState==="Completed"&&M&&T(!0)},[M,S,C.fetchStatus.fetchState,C.linkToken,p,v]),s.useEffect(()=>{C.fetchStatus.fetchState==="Completed"&&C.linkToken!=null&&C.linkToken!==S&&$(C.linkToken)},[C.fetchStatus.fetchState,C.linkToken,S]),s.useEffect(()=>{v&&q()},[v,q]);const[O,re]=s.useState(void 0),[B,L]=s.useState(void 0),[U,X]=s.useState("assets"),ce=Di("2025-03-31"),ge=1,te="account_reconciliation",J=Ce(),ee=Tt();Jn({componentName:"expense_automation.account_reconciliation_list",enabled:e.fetchStatus.fetchState==="Completed"});const H=!0,_=Array.isArray(w?.[i])?w[i]:[],ne=e.accountReconciliationBySectionID.assets.accountIDs.filter(K=>!_.includes(K)).length,W=e.accountReconciliationBySectionID.liabilities.accountIDs.length>0,Z=Mp(ne,W),ie=s.useCallback(K=>{const N=K.scrollTop>=Z?"liabilities":"assets";N!==U&&X(N)},[Z,U]);return s.useEffect(()=>{const K={reportId:te,mode:"none",displayOrder:"ascending_date",reportFormat:"more_detailed",bookCloseDate:ce,firstMonthOfFY:ge,filterAccountsWithNilBalances:"off",filterAccountGroupsWithNilBalances:"off",showNegativeAmountInParenthesis:!1,dataAvailable:void 0,accountReconciliationConfig:{selectedDrawerAccountId:e.selectedDrawerAccountId,onReviewClicked:r,onConnectClicked:k,onReconnectClicked:j,onOpenDrawerClicked:b,onStatementAddClicked:c}};if(O==null||!gr(B,e)){const N=Op(e,K,w,i,H,U);L(e),re(N)}else{const N=zp(O,e,K,H,U);re(N)}},[e,U]),e.fetchStatus.fetchState==="Error"?t.jsx(Pp,{children:t.jsx(Sc,{onReload:l,message:_p.errorMessage.somethingWentWrong})}):t.jsx(Fp,{windowSize:J,children:O!=null?t.jsx(Bp,{windowSize:J,children:t.jsx(Pr,{backgroundColor:new Ho(ee.colors.grey4),rootNodes:O,type:"name+balances_actual",compareMode:"compare_mode_percent",isSticky:{isStickyHeader:H,isStickyName:H},treeNodePadding:{left:Oo.contentPaddingLeft.value(J),right:Oo.contentPaddingRight.value(J)},nodeOpenStatus:{},scrollPosition:e.reconListUIState.scrollPosition,onCompareModeChanged:()=>{},onScroll:ie})}):null})}function Np({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:S,onSaveReconciliationReview:$,setOpenDrawerClicked:v,onReconMatchedTransactionClick:T}){return r.selectedAccountId==null?t.jsx(Vp,{companyId:h,reconciliation:r,onReload:m,onReviewClicked:p,onFetchLinkTokenClick:g,onEstablishConnectionClick:x,setOpenDrawerClicked:v,onAddStatementClick:y}):t.jsx(Ip,{currentFooterFormId:e,setCurrentFooterFormId:u,onUpdateReconcileTabLocalData:c,onReconTabColumnSortConfigChanged:d,reconciliation:r,updateReviewTabLocalData:a,entitySearchAutoCompleteActions:l,onReconReviewTabColumnSortConfigChanged:C,entitySearchAutoCompleteData:i,selectedAccountId:r.selectedAccountId,onSaveReconciliation:S,onSaveReconciliationReview:$,onReconMatchedTransactionClick:T})}function Up({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 Wp({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)=>Up({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 Hp({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)=>Wp({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 qp({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 Kp({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:Jp}}=me.getLocalizedStrings(),Qp=(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=Fr({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(qp({title:`${yi.loading}`,balances:h,config:i})),[...Array(10)].forEach((m,p)=>{a.push(Cs({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(Hp({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:Gp(g),isLastNode:!1,config:i,vendorIndexOffset:p})),p+=x.vendors.length}}),e.totalBalancesAndVariance){const g=e.totalBalancesAndVariance.balancesByMonth?Tn(e.totalBalancesAndVariance.balancesByMonth):[],x=Kp({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(Cs({title:`${x}+${yi.loading}`,balances:h,config:i}))})}return{config:i,headerNodes:l&&!c?[d]:[],contentNodes:a}},Gp=e=>Jp.sectionTitle[e];function Yp(e,i,l,r=!0){Object.assign(e.config,i);const h=Zp(l),d=Fr({balances:h,config:i});return{config:i,headerNodes:r?[d]:[],contentNodes:[d,...e.contentNodes.slice(1)]}}const Zp=e=>e.sections.generalExpense.balancesByMonth?Tn(e.sections.generalExpense.balancesByMonth):e.sections.reimbursement.balancesByMonth?Tn(e.sections.reimbursement.balancesByMonth):[],zo={contentPaddingLeft:new Q(f[0],f[0],f[0]),contentPaddingRight:new Q(f[3],f[3],f[8]),wrapperPadding:new Q(f[3],f[3],f[8])},Xp=o.div`
|
|
772
|
-
display: flex;
|
|
773
|
-
position: sticky;
|
|
774
|
-
width: 100%;
|
|
775
|
-
justify-content: center;
|
|
776
|
-
padding-top: ${e=>zo.wrapperPadding.valuePx(e.windowSize)};
|
|
777
|
-
padding-left: 20px;
|
|
778
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
779
|
-
`,em=o.div`
|
|
780
|
-
width: 100%;
|
|
781
|
-
height: calc(100vh - ${n.sp11});
|
|
782
|
-
`,tm=e=>{const{fluxView:i,handleRedirectToVendorDetailPage:l,updateOperatingExpensesIdsForReview:r,updateSectionIdsForReview:h,onSortOrderChanged:d,updateNodeCollapsableStatus:a,fetchReimbursementView:c,fetchGeneralExpenseView:u}=e,m=Ce(),p=Tt(),[g,x]=s.useState(null),[y,C]=s.useState(null),[S,$]=s.useState(null),v=ws([i.sections.generalExpense.fetchStatus,i.sections.reimbursement.fetchStatus]).fetchState,[T,I]=s.useState(!1),w=ms(v),k=ms(i.refreshStatus.fetchState),j=s.useRef(!1),[b,P]=s.useState(!1),A=s.useRef(B=>{B&&!j.current&&(j.current=!0,P(!0))});Jn({componentName:"expense_automation.flux_analysis",enabled:b});const R=()=>{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)},F=()=>Object.keys(i.uiState.collapsableStatus).reduce((B,L)=>(B[L]=i.uiState.collapsableStatus[L],B),{}),V=s.useCallback(B=>{const L=!(i.uiState.collapsableStatus[B]??!0);a({...i.uiState.collapsableStatus,[B]:L})},[i.uiState.collapsableStatus,a]),q=s.useCallback((B,L)=>{let U=i.reviewOperatingExpensesIds;const X=[];let ce=i.selectedSectionIds;const ge=i.sections[B].vendors;X.push(...ge.map(J=>J.fluxAnalysisEntityId));let te=zr-U.length;L?(X.forEach(J=>{!U.includes(J)&&te>0&&(U=[...U,J],te--)}),ce=[...ce,B]):(U=U.filter(J=>!X.includes(J)),ce=ce.filter(J=>J!==B)),r(U),h(ce)},[i.reviewOperatingExpensesIds,i.selectedSectionIds,i.sections,r,h]),M=s.useCallback(B=>{const L=i.uiState.collapsableStatus[B]===!1;B==="generalExpense"&&!L&&i.sections.reimbursement.fetchStatus.fetchState==="Not-Started"&&c(i.uiState.paginationInfoByGroup.reimbursement.pageToken),V(B)},[i.uiState.collapsableStatus,i.sections.reimbursement.fetchStatus.fetchState,i.uiState.paginationInfoByGroup.reimbursement.pageToken,c,V]),O=i.sections.generalExpense.vendors.length+i.sections.reimbursement.vendors.length,re=B=>B<O;return s.useEffect(()=>{const B={reportId:"flux_analysis_operating_expense",mode:"none",displayOrder:"ascending_date",reportFormat:"summary",firstMonthOfFY:1,filterAccountsWithNilBalances:"off",filterAccountGroupsWithNilBalances:"off",showNegativeAmountInParenthesis:!1,fluxAnalysisConfig:{sortOrder:i.uiState.sortOrder,sortKey:i.uiState.sortKey,sortOrSearchInProgress:!1,reviewOpExIds:i.reviewOperatingExpensesIds,reviewSectionIds:i.selectedSectionIds,fetchStatus:i.fetchStatus.fetchState,setIsSortApplied:I,onSectionRowClick:M,updateNodeCollapsableStatus:V,updateOperatingExpensesIdsForReview:r,handleRedirectToVendorDetailPage:l,onSectionCheckboxClick:q,onSortOrderChanged:d}};if(g==null||!gr(y,i)){const L=Qp(i,B,!0);C(i),x(L)}else{const L=Yp(g,B,i,!0);x(L)}},[i,y,l,q,M,d,V,r]),t.jsx(Xp,{windowSize:m,children:t.jsx(em,{children:g?t.jsx(nm,{ref:A.current,children:t.jsx(Pr,{backgroundColor:new Ho(p.colors.grey4),rootNodes:g,type:"name+balances_actual",isSticky:{isStickyHeader:!0,isStickyName:!0},treeNodePadding:{left:zo.contentPaddingLeft.value(m),right:zo.contentPaddingRight.value(m)},nodeOpenStatus:F(),compareMode:"compare_mode_amount",infiniteLoadingProps:{isItemLoaded:re,itemCount:O,loadMoreItems:R},variableNodeHeightTree:{prevFetchState:w??"Not-Started",fetchState:i.fetchStatus.fetchState,isSortApplied:T,setIsSortApplied:I,reducedFetchState:ws([i.sections.generalExpense.fetchStatus,i.sections.reimbursement.fetchStatus]).fetchState,prevRefreshFetchState:k??"Not-Started",refreshFetchState:i.refreshStatus.fetchState},hoveredParentIdProps:{hoveredParentId:S,setHoveredParentId:$}})}):null})})},nm=o.div`
|
|
783
|
-
height: 100%;
|
|
784
|
-
width: 100%;
|
|
785
|
-
`,im="expenseAutomationFluxPage",{reports:{common:om}}=me.getLocalizedStrings(),sm=({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,S=s.useRef(null),$=s.useRef(!1),v=gn({mode:"all",reValidateMode:"onChange",resetOptions:{keepDefaultValues:!0},defaultValues:am(y)}),T=Ce();s.useEffect(()=>()=>{d("expenseAutomationPage")},[d]),s.useEffect(()=>{$.current&&S?.current?.scrollLeft!=null&&C.scrollPosition?.scrollLeft!==S.current.scrollLeft&&C.scrollPosition!=null&&u({scrollPosition:{scrollTop:C.scrollPosition?.scrollTop,scrollLeft:S.current.scrollLeft}})},[C.scrollPosition?.scrollLeft,S.current?.scrollLeft,C.scrollPosition,u]),s.useEffect(()=>{d(y.length>0?"expenseAutomationFluxPage":"expenseAutomationPage")},[y,d]);const I=b=>{m(b)},w=b=>{p(e,b)},k=(b,P)=>{u({sortOrder:b,sortKey:P}),l(),g(e,null,!1)},j=()=>{const b=Yr(i.sections,y);r(y,b===!0?"review":"unreview",e,!0)};if(x.fetchState==="Error")return t.jsxs(lm,{children:[t.jsx(cm,{onClick:h,children:t.jsx(Vo,{})}),t.jsx(dm,{children:om.failed})]});{const b=A=>{u({collapsableStatus:A})},P=A=>{g(e,A,!0)};return t.jsx(xn,{...v,children:t.jsx("form",{id:Zl(im),onSubmit:v.handleSubmit(j),style:{height:"100%",width:"100%"},children:t.jsx(rm,{windowSize:T,children:t.jsx(tm,{fluxView:i,handleRedirectToVendorDetailPage:I,onSortOrderChanged:k,updateOperatingExpensesIdsForReview:a,updateNodeCollapsableStatus:b,fetchReimbursementView:P,updateSectionIdsForReview:c,fetchGeneralExpenseView:w,reportId:"flux_analysis_operating_expense"})})})})}},Yr=(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},am=e=>({fluxAnalysisRowIds:e}),rm=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
|
-
`,lm=o.div`
|
|
813
|
-
display: flex;
|
|
814
|
-
width: 100%;
|
|
815
|
-
height: 100vh;
|
|
816
|
-
flex-direction: column;
|
|
817
|
-
justify-content: center;
|
|
818
|
-
align-items: center;
|
|
819
|
-
`,cm=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
|
-
`,dm=o(st)`
|
|
835
|
-
margin-top: ${n.sp3};
|
|
836
|
-
color: ${e=>e.theme.colors.hero};
|
|
837
|
-
`,um="expenseAutomationJEAccountSettingsPage",Zr="vendorsAccountSection",hm=e=>`${e}_form`;function pm({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(()=>gm(e,p,g,x),[e,p,g,x]),C=gn({mode:"all",reValidateMode:"onBlur",defaultValues:y,values:y,resetOptions:{keepDefaultValues:!0}}),S=C.handleSubmit(v=>{l(v)}),$=async v=>{h(v)};return s.useEffect(()=>{const v=C.watch(T=>{T!=null&&Qn(()=>$(T))});return()=>{v.unsubscribe()}}),s.useEffect(()=>(d(()=>C.reset),r(!0),()=>{a("expenseAutomationPage"),r(!1)}),[]),s.useEffect(()=>{const{selectedPrepaidExpensesAccountIds:v,previousPrepaidExpensesAccount:T,selectedFixedAssetsAccountIds:I,previousFixedAssetsAccount:w,selectedAccruedExpensesAccountIds:k,previousAccruedExpensesAccount:j}=e.accountSettingsLocalData,b=Wi(v,T)||Wi(I,w)||Wi(k,j);b===!0&&i!="expenseAutomationJEAccountSettingsPage"?a("expenseAutomationJEAccountSettingsPage"):b===!1&&i!=="expenseAutomationPage"&&a("expenseAutomationPage")},[e,i,a]),t.jsx(mm,{children:t.jsx(xn,{...C,children:t.jsx("form",{id:hm(um),onSubmit:S,children:t.jsx(Cd,{showTitle:!1,sectionId:Zr,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 mm=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
|
-
`,gm=(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{[Zr]:{prepaidExpensesAccount:{selectedOptions:c,allOptions:i},fixedAssetsAccount:{selectedOptions:u,allOptions:l},accruedExpensesAccount:{selectedOptions:m,allOptions:r}}}},{expenseAutomation:{jeSchedules:Nt},common:{currency:wi,review:xm,ignore:fm,strings:{hyphen:Pt},texts:bi},dateFormat:ym,timeframe:{month:Ns}}=me.getLocalizedStrings(),wm=({draft:e,ignoreStatus:i,ignoreRecommendedJeSchedule:l,jeScheduleClickHandler:r,onReviewClickHandler:h})=>t.jsxs(ts,{onClick:d=>{e.jeScheduleType!=null&&e.jeScheduleId!=null&&r(d,e.jeScheduleId,e.jeScheduleTransactionKey,e.jeScheduleType)},"data-testid":D("je-schedule-draft-component",e.jeScheduleId),children:[t.jsxs(es,{children:[t.jsxs(is,{children:[t.jsxs(Zo,{children:[t.jsxs(ae,{style:{width:be.COLUMN_ONE,padding:`${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{children:bi.vendor}),t.jsxs(pe,{style:{gap:f[2]},children:[e.vendor.logo!=null?t.jsx(vr,{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??Pt})})]})]}),t.jsxs(ae,{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??Pt})})})]}),t.jsxs(ae,{style:{width:be.COLUMN_THREE},children:[t.jsx(ue,{children:Nt.scheduleHeaders.startMonth}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",children:e.startDate?.format(ym.visual.MMMCommaYYYYFormat)??Pt})})]}),t.jsxs(ae,{style:{width:be.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?Ns.slice(0,-1):Ns}`:Pt})})]}),t.jsxs(ae,{style:{alignItems:"flex-end",width:be.COLUMN_FIVE},children:[t.jsx(ue,{children:bi.totalAmount}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:t.jsx(rt,{children:it("0,0.[00]",ln(e.baseTransaction.amount.amount,wi.currencyCode,wi.currencySymbol))??Pt}),children:t.jsx(we,{className:"highlight",children:it("0,0.[00]",ln(e.baseTransaction.amount.amount,wi.currencyCode,wi.currencySymbol))??Pt})})})]})]}),t.jsxs(Xo,{children:[t.jsxs(ae,{style:{width:be.COLUMN_ONE,padding:`${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{children:bi.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??Pt})})})]}),t.jsxs(ae,{children:[t.jsx(ue,{children:bi.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??Pt})})})]}),t.jsxs(ae,{style:{width:be.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(Ur,{children:Nt.scheduleTypes[e.jeScheduleType??"prepaid_expenses"]})})})]}),e.jeScheduleType==="fixed_assets"?t.jsxs(ae,{style:{width:be.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??Pt})})})]}):null,e.jeScheduleType!=="fixed_assets"?t.jsx(ae,{style:{width:be.COLUMN_FOUR}}):null,t.jsx(ae,{style:{width:be.COLUMN_FIVE}})]})]}),t.jsxs(ns,{children:[t.jsx(Un,{onClick:()=>{e.jeScheduleId!=null&&e.jeScheduleType!=null&&h(e.jeScheduleId,e.jeScheduleTransactionKey,e.jeScheduleType)},"data-testid":D("je-schedule-draft-component-review-button",e.jeScheduleId),label:xm,variant:"primary",size:"small",className:"item-value-container",style:{minWidth:Do}}),t.jsx(Un,{"data-testid":D("je-schedule-draft-component-ignore-button",e.jeScheduleId),className:"item-value-container",label:fm,size:"small",reverseSpinnerColor:!1,loading:i?.fetchState==="In-Progress",onClick:()=>{e.jeScheduleType!=null&&l(e.jeScheduleTransactionKey,e.jeScheduleType)},style:{minWidth:Do}})]})]}),t.jsxs(Vh,{children:[t.jsx(bm,{}),t.jsx(Cm,{children:Nt.aiAccountant}),t.jsx(vm,{children:Nt.zeniGPTText})]})]}),bm=o(Qt)`
|
|
846
|
-
height: ${n.sp3};
|
|
847
|
-
width: ${n.sp3};
|
|
848
|
-
margin-right: ${n.sp1};
|
|
849
|
-
path {
|
|
850
|
-
stroke-width: 2;
|
|
851
|
-
}
|
|
852
|
-
`,Cm=o(xr)`
|
|
853
|
-
color: ${e=>e.theme.colors.brandColorSapphire};
|
|
854
|
-
`,vm=o(Re)`
|
|
855
|
-
color: ${e=>e.theme.colors.primary};
|
|
856
|
-
`,{jeSchedules:{scheduleDetails:{scheduleTransactionsHeader:{addVendor:Us}}},expenseAutomation:{jeSchedules:Je},common:{currency:At,retry:Sm,strings:{hyphen:at,empty:Ws},texts:Sn},dateFormat:Hs}=me.getLocalizedStrings(),{common:km,timeframe:{month:qs}}=me.getLocalizedStrings(),gt="jeSchedulePage",Ks=e=>`${e}_form`,os=(e,i)=>`${e}.${i}`,Js=os(gt,"vendor"),Qs=os(gt,"scheduleExpenseCategory"),Gs=os(gt,"accumulatedDepreciationCategory"),jm=({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:S,updatedCategoryId:$,updatedVendor:v}=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"},I=s.useRef(),w=gn({mode:"all",reValidateMode:"onChange",defaultValues:Ys(c,e,l,h,i,r,d,g.entityAutoCompleteView),values:Ys(c,e,l,h,i,r,d,g.entityAutoCompleteView)}),k={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(_=>{const ne=T[_];return!(c!=null&&ne&&(ne==="updatedAccumulatedDepreciationCategoryID"&&c.updatedAccumulatedDepreciationCategoryID==null||ne==="updatedCategoryId"&&c.updatedCategoryId==null||ne==="updatedVendor"&&(c.updatedVendor?.id==null||c.updatedVendor?.id===""||c.updatedVendor?.name==null||c.updatedVendor?.name==="")))}),P=async(_,ne)=>{if(_!=null){const W=ne[gt],{scheduledJournalEntryID:Z,vendor:ie}=W;if(_.includes("vendor")){const K=ie?.defaultOptions.map(N=>N.value);if(ie?.selectedOption!=null&&K?.includes(ie.selectedOption)!==!0){const N=g.entityAutoCompleteView.vendor.find(z=>z.id===ie.selectedOption);N!=null&&w.setValue(`${gt}.vendor.defaultOptions`,[{label:N.name??km.strings.empty,value:N.id}])}else ie?.selectedOption==null&&ie?.defaultOptions.length!==0&&w.setValue(`${gt}.vendor`,{selectedOption:void 0,defaultOptions:[]})}y(Z,{...W,vendor:ie})}};s.useEffect(()=>{const _=w.watch((ne,{name:W})=>{W!=null&&ne!=null&&Qn(()=>P(W,ne))});return()=>{_.unsubscribe()}}),s.useEffect(()=>{g.entityAutoCompleteView.fetchState==="Completed"&&I.current?.(Sr(g.entityAutoCompleteView))},[g.entityAutoCompleteView.fetchState]);const A=w.handleSubmit(()=>{C(a.scheduledJournalEntry.scheduledJournalEntryID,a.jeScheduleTransactionKey)}),R=_=>i.filter(ne=>ne.qboId===_)[0]?.qboId,F=_=>d.filter(ne=>ne.qboId===_)[0]?.qboId,V=_=>[m.expense?.qboId,m.income?.qboId].includes(_),q=w.watch("jeSchedulePage.vendor"),M=(_,ne)=>{p.onAutoCompleteInputChange?.(_,"vendor"),I.current=ne},O=a.scheduledJournalEntry.error?.includes("vendor_deleted")===!0,re=a.scheduledJournalEntry.error?.includes("debit_category_deleted")===!0,B=a.scheduledJournalEntry.error?.includes("credit_category_deleted")===!0,L=a.vendor.name.split("(deleted)")[0]?.toString(),U=a.jeDebit.account?.accountName.split("(deleted)")?.[0]?.toString()??Ws,X=a.jeCredit.account?.accountName.split("(deleted)")[0]?.toString()??Ws,[ce,ge]=s.useState(re===!0&&$==null),[te,J]=s.useState(B===!0&&S==null),[ee,H]=s.useState(O&&(v?.id==null||v?.id==""));return s.useEffect(()=>{ce===!1&&c.updatedCategoryId==null&&w.setFocus(Qs),te===!1&&c.updatedAccumulatedDepreciationCategoryID==null&&w.setFocus(Gs),ee===!1&&c.updatedVendor?.id==null&&w.setFocus(Js)},[ce,te,ee,c,w]),t.jsx(xn,{...w,children:t.jsx("form",{style:{width:"100%"},id:Ks(`${gt}_${a.jeScheduleId}`),onSubmit:A,children:t.jsx(ts,{showBorder:b,onClick:_=>{a.jeScheduleType!=null&&a.jeScheduleId!=null&&x(_,a.jeScheduleId,a.jeScheduleTransactionKey,a.jeScheduleType)},"data-testid":D("je-schedule-resolve-component-schedule",`${gt}_${a.jeScheduleId}`),children:t.jsxs(es,{children:[t.jsxs(is,{children:[t.jsxs(Zo,{children:[O===!0?t.jsx(ae,{style:{width:be.COLUMN_ONE,padding:f[0],justifyContent:"center"},showHoverEffect:O,forceHoverEffect:ee===!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(Ti,{children:Je.tooltipText.missingVendor.replace("_deleted_vendor_",L)}),children:t.jsx(Zi,{})})]}),t.jsx(pe,{style:{gap:f[3],marginLeft:-2},className:"item-value-container",children:t.jsx(t.Fragment,{children:ee===!0?t.jsxs(we,{onClick:_=>{_.stopPropagation(),H(!1)},"data-testid":D("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(Yi,{}),Us]}):t.jsx(Ao,{name:Js,placeholder:Us,valueToId:_=>_,defaultValue:{selectedOption:q?.selectedOption,defaultOptions:q?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:n.sp4})},registerOptions:{required:!0,validate:_=>!!_.selectedOption},loadOptions:M})})})]})}):t.jsxs(ae,{style:{width:be.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(vr,{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(ae,{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(ae,{style:{width:be.COLUMN_THREE},children:[t.jsx(ue,{children:Je.scheduleHeaders.startMonth}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",children:a.startDate?.format(Hs.visual.MMMCommaYYYYFormat)??at})})]}),t.jsxs(ae,{style:{width:be.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?qs.slice(0,-1):qs}`:at})})]}),t.jsxs(ae,{style:{alignItems:"flex-end",width:be.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]",ln(a.baseTransaction.amount.amount,At.currencyCode,At.currencySymbol))??at}),children:t.jsx(we,{className:"highlight",children:it("0,0.[00]",ln(a.baseTransaction.amount.amount,At.currencyCode,At.currencySymbol))??at})})})]})]}),t.jsxs(Xo,{children:[re===!0?t.jsx(ae,{showHoverEffect:re===!0,forceHoverEffect:c?.updatedCategoryId==null&&ce===!1,style:{padding:"unset",justifyContent:"center",width:be.COLUMN_ONE},children:t.jsxs(Rt,{className:"hover-background",children:[t.jsxs(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:[Sn.category,re===!0?t.jsx(xe,{display:"flex",placement:"top-start",title:t.jsx(Ti,{children:Je.tooltipText.missingCategory.replace("_deleted_category_",U)}),children:t.jsx(Zi,{})}):null]}),t.jsx(pe,{className:"item-value-container",style:{marginLeft:re===!0?-2:0},children:re===!0?t.jsx(t.Fragment,{children:ce===!0?t.jsxs(we,{onClick:_=>{_.stopPropagation(),ge(!1)},style:{display:"inline-flex",alignItems:"center",gap:f[1],color:he.brandColorGoldDark,cursor:"pointer"},"data-testid":D("je-schedule-resolve-component-add-category-button",`${gt}_${a.jeScheduleId}`),children:[t.jsx(Yi,{}),Je.addCategory]}):t.jsx(In,{shouldShowChevronIcon:!1,name:Qs,placeholder:Je.addCategory,valueToId:_=>R(_),defaultValue:{allOptions:e},registerOptions:{required:!0,validate:_=>!!_.selectedOption},disableCurrentOption:V,customStyleConfig:k})}):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(ae,{style:{width:be.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(ae,{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(ae,{style:{width:be.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(Ur,{children:Je.scheduleTypes[a.jeScheduleType??"prepaid_expenses"]})})})]}),a.jeScheduleType==="fixed_assets"?t.jsx(t.Fragment,{children:B===!0?t.jsx(ae,{style:{width:be.COLUMN_FOUR,padding:"unset",justifyContent:"center"},showHoverEffect:B,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,B===!0?t.jsx(xe,{display:"flex",placement:"top-end",title:t.jsx(Ti,{children:Je.tooltipText.missingDepCategory.replace("_deleted_dep_category_",X)}),children:t.jsx(Zi,{})}):null]}),t.jsx(pe,{className:"item-value-container",style:{marginLeft:B===!0?-2:0},children:B===!0?t.jsx(t.Fragment,{children:te===!0?t.jsxs(we,{onClick:_=>{_.stopPropagation(),J(!1)},style:{display:"inline-flex",alignItems:"center",gap:f[1],color:he.brandColorGoldDark,cursor:"pointer"},"data-testid":D("je-schedule-resolve-component-add-depreciation-category-button",`${gt}_${a.jeScheduleId}`),children:[t.jsx(Yi,{}),Je.addDepCategory]}):t.jsx(In,{shouldShowChevronIcon:!1,showDownChevronWithValue:!1,name:Gs,placeholder:Je.addDepCategory,valueToId:_=>F(_),defaultValue:{allOptions:h},registerOptions:{required:!0,validate:_=>!!_.selectedOption},customStyleConfig:j,disableCurrentOption:V})}):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(ae,{style:{width:be.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(ae,{style:{width:be.COLUMN_FOUR}}):null,t.jsx(ae,{style:{width:be.COLUMN_FIVE}})]}),t.jsxs(Bh,{children:[t.jsx(ae,{style:{padding:"unset",width:be.COLUMN_ONE},children:t.jsxs(_h,{children:[t.jsx(ue,{children:Je.scheduleHeaders.jePostingDate}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",children:a.scheduledJournalEntry.expectedPostDate.format(Hs.visual.MMMDCommaYYFormat)??at})})]})}),t.jsxs(ae,{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]",ln(a?.scheduledJournalEntry?.runningBalance?.amount??0,At.currencyCode,At.currencySymbol))??at}),children:t.jsx(we,{className:"highlight",children:it("0,0.[00]",ln(a?.scheduledJournalEntry?.runningBalance?.amount??0,At.currencyCode,At.currencySymbol))??at})})})]}),t.jsxs(ae,{style:{width:be.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(ae,{style:{width:be.COLUMN_FOUR}}),t.jsxs(ae,{style:{alignItems:"flex-end",width:be.COLUMN_FIVE},children:[t.jsx(ue,{children:Je.scheduleHeaders.amountForMonth}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",children:it("0,0.[00]",ln(a.scheduledJournalEntry.amount?.amount??0,At.currencyCode,At.currencySymbol))??at})})]})]})]}),t.jsx(ns,{children:t.jsx(Un,{form:Ks(`${gt}_${a.jeScheduleId}`),label:Sm,variant:"primary",className:"item-value-container",type:"submit",loading:u?.fetchState==="In-Progress",size:"small",disabled:!b,style:{minWidth:Do}})})]})})})})},Ys=(e,i,l,r,h,d,a,c)=>{const u=e.updatedCategoryId,m=e.updatedVendor,p=m!=null?c.vendor.find($=>$.zeniId===m.id):void 0,g=e.updatedAccumulatedDepreciationCategoryID,x=e.updatedClassId,y=u!=null?h.find($=>$.accountId===u):void 0,C=g!=null?a.find($=>$.accountId===g):void 0,S=x!=null?d.find($=>$.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:Tr(c,p??m)},scheduleClass:{selectedOption:S?.classId,allOptions:l}}}},Yi=o(Fi)`
|
|
857
|
-
width: ${n.sp3};
|
|
858
|
-
height: ${n.sp3};
|
|
859
|
-
`,Zi=o(Lr)`
|
|
860
|
-
width: 12px;
|
|
861
|
-
height: 12px;
|
|
862
|
-
color: ${he.important};
|
|
863
|
-
`;function Xr(){return t.jsx(Br,{children:t.jsxs(_r,{children:[t.jsxs(Vr,{children:[t.jsx(Ue,{width:f[9],height:27,style:{marginBottom:f[2]}}),t.jsx(Zs,{})]}),t.jsxs(Nr,{children:[t.jsx(Ue,{width:f[9],height:27,style:{marginBottom:f[2]}}),t.jsx(Zs,{})]})]})})}const Zs=()=>t.jsx(ts,{style:{minWidth:1088},children:t.jsxs(es,{children:[t.jsxs(is,{children:[t.jsxs(Zo,{children:[t.jsxs(ae,{style:{width:be.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(Zn,{height:f[4],width:f[4]}),t.jsx(Ue,{height:f[4],width:f[10]})]})]}),t.jsxs(ae,{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(ae,{style:{width:be.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(ae,{style:{width:be.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(ae,{style:{alignItems:"flex-end",width:be.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(Xo,{children:[t.jsxs(ae,{style:{width:be.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(ae,{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(ae,{style:{width:be.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(ae,{style:{width:be.COLUMN_FOUR,paddingLeft:f[3]}}),t.jsx(ae,{style:{width:be.COLUMN_FIVE}})]})]}),t.jsxs(ns,{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:$m,resolve:Im}}=me.getLocalizedStrings();function Tm({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),S=s.useRef(R=>{R&&!x.current&&(x.current=!0,C(!0))});Jn({componentName:"expense_automation.je_schedules",enabled:y});const $=e.resolveSchedules,v=e.uncategorizedAccounts,{allAccountList:T,allClassList:I,allDepreciationAccountList:w}=e,k=Kt(e.accountListNestedAccountHierarchy),j=Kt(e.allDepreciationAccountListNestedAccountHierarchy),b=$i(e.classListNestedAccountHierarchy),P=(R,F,V)=>{l(R,F,V)},A=(R,F,V,q)=>{let M=R.target;for(;M;){if(M.classList.contains("item-value-container")||M.classList.contains("hover-background")||M.classList.contains("auto-complete-single-select-field__input")||M.classList.contains("auto-complete-single-select-field__option")||M.classList.contains("grouped-single-select-field__input")||M.classList.contains("grouped-single-select-field__menu"))return;M=M.parentElement}l(F,V,q)};return s.useEffect(()=>{if($.length!==0){for(const R in m)if(Object.prototype.hasOwnProperty.call(m,R)){const{updatedAccumulatedDepreciationCategoryID:F,updatedCategoryId:V,updatedVendor:q}=m[R];if(F!=null||V!=null||q!=null&&q?.id!==""){c("expenseAutomationJESchedulePage");break}else c("expenseAutomationPage")}}else $.length===0&&c("expenseAutomationPage")}),s.useEffect(()=>()=>{c("expenseAutomationPage")},[]),e.fetchState==="In-Progress"?t.jsx(Xr,{}):u.length!==0||$.length!==0?t.jsx(Br,{children:t.jsxs(_r,{children:[u.length>0?t.jsxs(Vr,{children:[t.jsxs(ta,{children:[$m,t.jsx(na,{isCircular:u.length<10,children:t.jsx(ia,{children:u.length})})]}),t.jsx(Xs,{"data-testid":D("expense-automation","draft-je-schedules"),children:u.map((R,F)=>t.jsx(ea,{ref:S.current,children:t.jsx(wm,{ignoreStatus:g[R.jeScheduleTransactionKey],ignoreRecommendedJeSchedule:d,onReviewClickHandler:P,jeScheduleClickHandler:A,draft:R})},`${F}_${R.jeScheduleId}`))})]}):null,$.length>0?t.jsxs(Nr,{children:[t.jsxs(ta,{children:[Im,t.jsx(na,{isCircular:$.length<10,children:t.jsx(ia,{children:$.length})})]}),t.jsx(Xs,{"data-testid":D("expense-automation","resolve-je-schedules"),children:$.map((R,F)=>m[R.scheduledJournalEntry.scheduledJournalEntryID]==null?null:t.jsx(ea,{ref:S.current,children:t.jsx(jm,{vendorSearchAutoCompleteActions:a,vendorSearchAutoCompleteData:i,jeScheduleClickHandler:A,onPostJESchedule:h,uncategorizedAccounts:v,allAccountList:T,allAccountGroupedOptions:k,allClassGroupedOptions:b,allClassList:I,allDepAccountGroupedOptions:j,allDepAccountList:w,draft:R,postStatus:p[R.scheduledJournalEntry.scheduledJournalEntryID],localData:m[R.scheduledJournalEntry.scheduledJournalEntryID],onFormDataChange:r})},`${F}_${R.jeScheduleTransactionKey}`))})]}):null]})}):null}const Xs=o.div`
|
|
866
|
-
display: flex;
|
|
867
|
-
flex-direction: column;
|
|
868
|
-
gap: ${n.sp4};
|
|
869
|
-
min-width: 1088px;
|
|
870
|
-
`,ea=o.div``,ta=o(Kn)`
|
|
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
|
-
`,na=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?le`
|
|
883
|
-
height: ${n.sp3};
|
|
884
|
-
width: ${n.sp3};
|
|
885
|
-
padding: ${n.sp0};
|
|
886
|
-
`:le`
|
|
887
|
-
height: 18px;
|
|
888
|
-
padding: ${Pc.padding};
|
|
889
|
-
`}
|
|
890
|
-
`,ia=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 Lm({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(Xr,{}):y.accountSettingsView.fetchState==="Completed"&&y.accountSettingsView.accountSettingsLocalData.previousPrepaidExpensesAccount.length===0&&y.accountSettingsView.accountSettingsLocalData.previousFixedAssetsAccount.length===0?t.jsx(pm,{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(Tm,{setCurrentFooterFormId:g,handleJeScheduleClick:a,ignoreRecommendedJeSchedule:m,jeSchedules:e.jeSchedules,onJESchedulesFormDataChange:h,onPostJESchedule:d,vendorSearchAutoCompleteActions:p,vendorSearchAutoCompleteData:r}):null}const Am=72,el=50,Rm=1,Em=["receipts"],oa=e=>Jo(e,Em),{common:{texts:{vendor:Dm,amount:Mm,receipts:Om,category:zm,classText:Pm,date:Fm}}}=me.getLocalizedStrings(),tl={key:"vendor",value:Dm,sortOrder:"ascending",width:new Q(18,18)},Bm={key:"category",value:zm,sortOrder:"ascending",width:new Q(18,18)},_m={key:"class",value:Pm,sortOrder:"ascending",width:new Q(18,18)},Vm={key:"date",value:Fm,sortOrder:"descending",width:new Q(11,11)},Nm={key:"receipts",value:Om,sortOrder:"descending",width:new Q(6,6)},nl={key:"amount",value:Mm,sortOrder:"ascending",width:new Q(10,10)},Vn=[tl,Bm,_m,Vm,Nm,nl],il=[{...tl,width:new Q(65,65)},{...nl,width:new Q(30,30)}],Xi={sortKey:"date",sortOrder:"descending"},ol=({sortConfig:e,isDisabled:i,onColumnSortConfigChanged:l})=>{const r=Ce(),h=Xe(),d=h?il:Vn,[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=>{oa(p.key)==null&&u(yd(p.key),p.sortOrder)};return t.jsx(Um,{windowSize:r,isQuickViewMode:h,children:a.map((p,g)=>{const x=i!=null||oa(p.key)!=null;return t.jsxs(Wm,{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(Qm,{onClick:()=>x?null:m(p),isSortDisabled:x,children:[t.jsx(Gm,{children:p.value}),x?null:t.jsx(qm,{sortConfig:e,headerData:p,children:t.jsx(Jm,{})})]}),x?null:t.jsx(Km,{isSortDisabled:x,sortDataValue:e.sortKey,isVisible:e.sortKey===p.key&&e.sortKey!==Xi.sortKey,children:t.jsx(Hm,{onClick:()=>{x||u(Xi.sortKey,Xi.sortOrder)},"data-testid":D("missing-receipts-header-close-icon",p.key)})})]},p.key)})})},Um=o.div`
|
|
899
|
-
top: ${n.sp0};
|
|
900
|
-
left: ${n.sp0};
|
|
901
|
-
height: ${el}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?le`
|
|
913
|
-
width: 32%;
|
|
914
|
-
max-width: var(--side-panel-list-width, 100%);
|
|
915
|
-
`:le`
|
|
916
|
-
padding: ${n.sp0} ${n.sp3};
|
|
917
|
-
`}
|
|
918
|
-
`,Wm=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?le`
|
|
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
|
-
`:le`
|
|
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
|
-
`,Hm=o(ei)`
|
|
949
|
-
width: ${n.sp2};
|
|
950
|
-
height: ${n.sp2};
|
|
951
|
-
cursor: pointer;
|
|
952
|
-
`,qm=o.div`
|
|
953
|
-
display: flex;
|
|
954
|
-
align-items: center;
|
|
955
|
-
transform: ${e=>e.headerData.sortOrder==="descending"?"rotate(180deg)":"rotate(0deg)"};
|
|
956
|
-
`,Km=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
|
-
`,Jm=o(Xn)`
|
|
964
|
-
width: ${n.sp2};
|
|
965
|
-
height: ${n.sp2};
|
|
966
|
-
`,Qm=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
|
-
`,Gm=o(Ze)`
|
|
974
|
-
display: flex;
|
|
975
|
-
`,{common:{strings:{underscore:sl,hyphen:eo,empty:sa},documents:{singleFileUploadSizeErrorMessage:Ym,multipleFileUploadSizeErrorMessage:Zm},snackBar:{missing_receipts_attachment:{failed:Xm}},tooltips:{addMissingReceipt:eg}},dateFormat:tg}=me.getLocalizedStrings(),kn={containerPaddingLeftRight:new Q(f[3],f[4]),containerPaddingTopBottom:new Q(f[2],f[3])},ng=({transaction:e,uploadReceiptsFetchState:i,receiptUploadEndpoint:l,authParams:r,selectedPeriod:h,onUploadReceiptComplete:d,onMissingReceiptsRowClick:a,onUploadReceiptFetchStatus:c,onUploadReceiptAttachment:u})=>{const m=Ce(),p=Xe(),g=s.useRef(null),x=s.useCallback(async($,v,T,I,w)=>{c(e.id,"In-Progress"),await vd($,v,T,I,w).then(({uploadResponse:k,errorMessage:j})=>{k!=null?k.transaction.attachments!=null&&(u(k.transaction),setTimeout(()=>d(k.transaction,h),2e3)):c(e.id,"Error",{code:500,message:Xm},j)}).catch(k=>{c(e.id,"Error",k)})},[e.id,h,u,d,c]),y=s.useCallback($=>{if($.target.files!=null){const v=$.target.files,T=[],I=[];for(let w=0;w<v.length;w++)T.push(v[w].name),I.push(v[w]);x(l,r,v[0],v[0].name,{id:e.id,type:e.type})}},[r,x,l,e.id,e.type]),C=s.useCallback(()=>{p||g.current?.click()},[g,p]),S=p?il:Vn;return t.jsx(al,{className:"missing-receipts-row-card",windowSize:m,isQuickViewMode:p,onClick:()=>a(e.id,e.type),"data-testid":D("missing-receipts-list-row",e.id),children:S.map(($,v)=>{const T=`${e.id}${sl}${$.key}`;switch($.key){case"vendor":default:return t.jsx(cn,{windowSize:m,wrapperWidth:$.width,isQuickViewMode:p,children:t.jsx(dn,{windowSize:m,isLastItem:v===S.length-1,children:t.jsxs(Li,{children:[t.jsx(Yn,{photoUrl:e.vendorId!=null?e.logo?.toString()??sa:sa,styles:{width:n.sp4,height:n.sp4,borderRadius:n.sp0},placeholder:{width:f[4],height:f[4]},fallbackAvatar:t.jsx(cg,{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 I=e.lines!=null&&e.lines.length>0&&e.lines[0]?.account!=null&&e.lines[0].account.accountName?e.lines[0].account.accountName:eo,w=e.lines!=null&&e.lines.length>0&&e.lines[0]?.class!=null&&e.lines[0].class.className?e.lines[0].class.className:eo,k=$.key==="category"?I:w;return t.jsx(cn,{windowSize:m,wrapperWidth:$.width,isQuickViewMode:p,children:t.jsx(dn,{windowSize:m,isLastItem:v===S.length-1,children:t.jsx(Li,{children:k!==eo?t.jsx(qe,{text:k,itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"}}):t.jsx(lg,{children:k})})})},T)}case"date":return t.jsx(cn,{windowSize:m,wrapperWidth:$.width,isQuickViewMode:p,children:t.jsx(dn,{windowSize:m,isLastItem:v===S.length-1,children:t.jsx(Li,{children:t.jsx(qe,{text:e.date.format(tg.visual.MMMDCommaYYYYformat),itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"}})})})},T);case"receipts":return t.jsx(cn,{windowSize:m,wrapperWidth:$.width,isQuickViewMode:p,children:t.jsx(dn,{windowSize:m,isLastItem:v===S.length-1,style:{justifyContent:"center"},children:i.fetchState==="In-Progress"?t.jsx(Hn,{size:"Small",style:{display:"flex"},start:!0}):i.fetchState==="Completed"||e.attachments!=null&&e.attachments.length>0?t.jsx(zc,{shouldDisplay:!0,width:f[4],height:f[4],animationInLoop:!1,shouldFade:!1,onAnimationComplete:()=>null}):t.jsxs(t.Fragment,{children:[t.jsx(rg,{onClick:I=>{I.stopPropagation()},children:t.jsx(No,{"data-testid":D("missing-receipts-file-input",e.id),name:`missing-receipts-${e.id}`,fileRef:g,sizeLimit:Ii,multiple:!1,acceptableTypes:[...Ar],onFileChange:y,onFileSizeError:(I,w)=>{I&&c(e.id,"Error",{code:500,message:w===!0?Ym.replace("__maxFileSize__",gs(Ii,0)):Zm.replace("__maxFileSize__",gs(Ii,0))})}})}),t.jsx(xe,{display:"flex",placement:"bottom",title:eg,enterDelay:600,children:t.jsx(ag,{onClick:I=>{I.stopPropagation(),C()}})})]})})},T);case"amount":{const I=it("0,0.[00]",e.amount);return t.jsx(cn,{windowSize:m,wrapperWidth:$.width,isQuickViewMode:p,children:t.jsx(dn,{windowSize:m,isLastItem:v===S.length-1,children:t.jsx(qe,{text:e.amount.amount<0?`-${I}`:I,itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"}})})},T)}}})})},ig=()=>{const e=Ce(),i=Xe(),l=s.useRef(null),[r,h]=s.useState(0);return s.useLayoutEffect(()=>{l.current&&h(l.current.offsetWidth)},[e]),t.jsx(al,{windowSize:e,isQuickViewMode:i,ref:l,children:Vn.map((d,a)=>{const c=`${a}${sl}${d.key}`;switch(d.key){case"vendor":return t.jsx(cn,{windowSize:e,wrapperWidth:d.width,isQuickViewMode:i,children:t.jsx(dn,{windowSize:e,isLastItem:a===Vn.length-1,children:t.jsxs(Li,{children:[t.jsx(Zn,{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(cn,{windowSize:e,wrapperWidth:d.width,isQuickViewMode:i,children:t.jsx(dn,{windowSize:e,isLastItem:a===Vn.length-1,children:t.jsx(ot,{width:r*d.width.value(e)/100,height:f[4],style:{display:"flex",alignItems:"center"}})})},c)}})})},al=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?le`
|
|
995
|
-
flex: 1;
|
|
996
|
-
padding-left: ${kn.containerPaddingLeftRight.valuePx(e.windowSize)};
|
|
997
|
-
padding-right: ${kn.containerPaddingLeftRight.valuePx(e.windowSize)};
|
|
998
|
-
width: 95%;
|
|
999
|
-
`:le`
|
|
1000
|
-
min-width: min-content;
|
|
1001
|
-
padding-left: ${kn.containerPaddingLeftRight.valuePx(e.windowSize)};
|
|
1002
|
-
padding-right: ${kn.containerPaddingLeftRight.valuePx(e.windowSize)};
|
|
1003
|
-
`}
|
|
1004
|
-
`,cn=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?le`
|
|
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
|
-
`:le`
|
|
1021
|
-
width: ${e.wrapperWidth.valuePercentage(e.windowSize)};
|
|
1022
|
-
min-width: ${e.wrapperWidth.valuePercentage(e.windowSize)};
|
|
1023
|
-
`}
|
|
1024
|
-
`,og=le`
|
|
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
|
-
`,sg=le`
|
|
1033
|
-
height: ${n.sp3};
|
|
1034
|
-
width: ${n.sp3};
|
|
1035
|
-
cursor: pointer;
|
|
1036
|
-
`,ag=o(Fi)`
|
|
1037
|
-
${sg};
|
|
1038
|
-
color: ${e=>e.theme.colors.brandColorJadeDark};
|
|
1039
|
-
&:hover {
|
|
1040
|
-
color: ${e=>e.theme.colors.primary};
|
|
1041
|
-
}
|
|
1042
|
-
`,dn=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
|
-
`,rg=o.div``,Li=o.div`
|
|
1049
|
-
display: flex;
|
|
1050
|
-
flex-direction: row;
|
|
1051
|
-
column-gap: ${n.sp2};
|
|
1052
|
-
align-items: center;
|
|
1053
|
-
`,lg=o(Re)`
|
|
1054
|
-
${og};
|
|
1055
|
-
color: inherit;
|
|
1056
|
-
`,cg=o.div`
|
|
1057
|
-
display: flex;
|
|
1058
|
-
`,dg=({sortConfig:e,fetchState:i,isDisabled:l,onColumnSortConfigChanged:r})=>{const h=Ce(),d=Xe();return t.jsxs(ug,{windowSize:h,children:[t.jsx(hg,{isQuickViewMode:d,children:t.jsx(ol,{sortConfig:e,isDisabled:i==="In-Progress"?"readonly":l,onColumnSortConfigChanged:r})}),t.jsx(pg,{windowSize:h,children:[...Array(3)].map((a,c)=>t.jsx(ig,{},c))})]})},ug=o.div`
|
|
1059
|
-
display: block;
|
|
1060
|
-
min-height: 100%;
|
|
1061
|
-
flex-direction: column;
|
|
1062
|
-
width: 100%;
|
|
1063
|
-
`,hg=o.div`
|
|
1064
|
-
flex: 1;
|
|
1065
|
-
width: auto;
|
|
1066
|
-
padding-left: ${({isQuickViewMode:e})=>e===!0?n.sp8:n.sp0};
|
|
1067
|
-
`,pg=o.div`
|
|
1068
|
-
display: flex;
|
|
1069
|
-
min-height: 100%;
|
|
1070
|
-
flex-direction: column;
|
|
1071
|
-
row-gap: ${n.sp3};
|
|
1072
|
-
`,{common:mg}=me.getLocalizedStrings(),gg=({missingReceipts:e,receiptUploadEndpoint:i,authParams:l,selectedPeriod:r,isDisabled:h,onMissingReceiptsRowClick:d,onUploadReceiptComplete:a,onUploadReceiptAttachment:c,onUploadReceiptFetchStatus:u,onUpdateMissingReceiptsUIState:m,onFetchMissingReceiptsList:p})=>{const g=Ce(),x=Xe(),{fetchState:y,uiState:C,transactions:S}=e;Jn({componentName:"expense_automation.missing_receipts",enabled:y==="Completed"});const $=s.useRef(null),[v,T]=s.useState(!1);s.useEffect(()=>{$.current?.resetAfterIndex(0)},[g,$]),s.useEffect(()=>{y==="Completed"&&T(!1)},[y]);const I=k=>Am,w=(k,j)=>{m({sortOrder:j,sortKey:k})};return t.jsxs(yg,{children:[t.jsx(wg,{windowSize:g,children:y==="Error"?t.jsxs(Cg,{windowSize:g,children:[t.jsx(vg,{onClick:()=>p(),"data-testid":D("missing-receipts-list-table-reload-button"),children:t.jsx(Vo,{})}),t.jsx(Sg,{children:mg.reloadPage.label})]}):y==="Completed"&&S.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"&&S.length===0?t.jsx(dg,{sortConfig:{sortKey:C.sortKey,sortOrder:C.sortOrder},fetchState:y,onColumnSortConfigChanged:w}):t.jsx(bg,{windowSize:g,children:t.jsx(qn,{children:({height:k,width:j})=>t.jsxs(jg,{style:{height:k,width:j},children:[t.jsx(fg,{isQuickViewMode:x,children:t.jsx(ol,{sortConfig:{sortKey:C.sortKey,sortOrder:C.sortOrder},isDisabled:y==="In-Progress"?"readonly":h,onColumnSortConfigChanged:w})}),t.jsx(Pi,{ref:$,height:k-el,innerElementType:rl,itemCount:S.length,itemData:{missingReceipts:e,receiptUploadEndpoint:i,authParams:l,isDisabled:h,isQuickViewMode:x,selectedPeriod:r,onMissingReceiptsRowClick:d,onUploadReceiptComplete:a,onUploadReceiptAttachment:c,onUploadReceiptFetchStatus:u},itemSize:I,width:j,style:{willChange:"auto"},overscanCount:Rm,onScroll:({scrollOffset:b})=>{m({scrollPosition:{scrollTop:b}})},initialScrollOffset:C.scrollPosition?.scrollTop,children:xg})]})})})}),t.jsx(Ye,{controller:v===!0,children:t.jsx($g,{children:t.jsx(Hn,{size:"Small",start:!0})})})]})},xg=({index:e,style:i,data:l})=>{const{selectedTransactionId:r}=zi(),{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(kg,{isPanelSelected:C,isQuickViewMode:c,style:{...i,width:"100%"},children:t.jsx(ng,{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)})},fg=o.div`
|
|
1073
|
-
flex: 1;
|
|
1074
|
-
width: auto;
|
|
1075
|
-
`,yg=o.div`
|
|
1076
|
-
width: 100%;
|
|
1077
|
-
height: 100%;
|
|
1078
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
1079
|
-
`,wg=o.div`
|
|
1080
|
-
height: 100%;
|
|
1081
|
-
`,bg=o.div`
|
|
1082
|
-
height: 100%;
|
|
1083
|
-
display: flex;
|
|
1084
|
-
flex-direction: column;
|
|
1085
|
-
max-width: 99.9%;
|
|
1086
|
-
`,Cg=o.div`
|
|
1087
|
-
display: flex;
|
|
1088
|
-
width: 100%;
|
|
1089
|
-
height: ${e=>`calc(100% - ${fr.valuePx(e.windowSize)})`};
|
|
1090
|
-
flex-direction: column;
|
|
1091
|
-
justify-content: center;
|
|
1092
|
-
align-items: center;
|
|
1093
|
-
`,vg=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
|
-
`,Sg=o(Ic)`
|
|
1109
|
-
margin-top: ${n.sp3};
|
|
1110
|
-
color: ${e=>e.theme.colors.hero};
|
|
1111
|
-
`,kg=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&&le`
|
|
1117
|
-
.missing-receipts-row-card {
|
|
1118
|
-
${Go(e.theme)}
|
|
1119
|
-
}
|
|
1120
|
-
`}
|
|
1121
|
-
`,jg=o.div`
|
|
1122
|
-
position: relative;
|
|
1123
|
-
`,rl=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})});rl.displayName="Missing receipts inner element type";const $g=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
|
-
`,Ig=[...md],Tg=7*1024*100,Lg=o.div`
|
|
1133
|
-
width: ${Bn}px;
|
|
1134
|
-
`,to=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
|
-
`,Ag=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
|
-
#${ur} img[alt*="company logo"],
|
|
1155
|
-
.attachFileSeparator {
|
|
1156
|
-
user-select: none;
|
|
1157
|
-
}
|
|
1158
|
-
`,Rg=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
|
-
`,Eg=o.div`
|
|
1165
|
-
position: relative;
|
|
1166
|
-
`,aa=o(Re)`
|
|
1167
|
-
position: relative;
|
|
1168
|
-
`,Dg=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
|
-
`,Mg=o.div`
|
|
1186
|
-
user-select: text;
|
|
1187
|
-
`,Og=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
|
-
`,zg=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
|
-
`,Pg=o(st)`
|
|
1203
|
-
color: ${e=>e.theme.colors.grey1};
|
|
1204
|
-
user-select: none;
|
|
1205
|
-
`,Fg=o(xr)`
|
|
1206
|
-
color: ${e=>e.theme.colors.primary};
|
|
1207
|
-
`,Bg=o.div`
|
|
1208
|
-
flex-direction: column;
|
|
1209
|
-
row-gap: ${n.sp3};
|
|
1210
|
-
display: flex;
|
|
1211
|
-
`,_g=Bi`
|
|
1212
|
-
0% {
|
|
1213
|
-
transform: translateX(100%);
|
|
1214
|
-
}
|
|
1215
|
-
100% {
|
|
1216
|
-
transform: translateX(0)
|
|
1217
|
-
}
|
|
1218
|
-
`,Vg=Bi`
|
|
1219
|
-
0% {
|
|
1220
|
-
transform: translateX(0)
|
|
1221
|
-
}
|
|
1222
|
-
100% {
|
|
1223
|
-
transform: translateX(100%)
|
|
1224
|
-
}
|
|
1225
|
-
`,Ng=o.div`
|
|
1226
|
-
animation: ${e=>e.allThreadsSectionOpen?_g:Vg}
|
|
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: ${lr}px;
|
|
1234
|
-
max-width: ${rr}px;
|
|
1235
|
-
`,Ai="monthEndReportFormSection",ra="monthEndReportPage",dt=me.getLocalizedStrings();function Ug({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:S,onEditClick:$,onOpenFileAttachmentSnackBar:v,onClickCustomerRequest:T,sendMonthEndReport:I}){const w=Tt(),[k,j]=s.useState(),[b,P]=s.useState(0),[A,R]=s.useState(0),F=s.useRef(),V=s.useRef(null),q=s.useRef(null),{html:M,subject:O,improveUsingZeniGPTStatus:re}=l,[B,L]=s.useState(),[U,X]=s.useState(!1),[ce,ge]=s.useState(!1),te=s.useRef(null),J=s.useRef(null),ee=Xl(d,250),H=l.fetchState==="Not-Started"||l.fetchState==="In-Progress"||l.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||l.companyMonthEndReportTemplatesData.fetchState==="In-Progress",{threadsRefs:_,sortedThreads:ne,threadsPositions:W,observer:Z,unresolvedThreadsMap:ie,handleRemoveFloatingThread:K}=ec(a,te,!r,H,u),N=s.useCallback(()=>{d?J.current!=null&&R(Math.min((J.current.offsetWidth-Bn-f[4])/2,J.current.offsetWidth-Bn-rr-f[4])):J.current!=null&&P(Math.min((J.current.offsetWidth-Bn-f[4])/2,J.current.offsetWidth-Bn-lr-f[4]))},[d]);s.useEffect(()=>{N()},[d,N]),s.useEffect(()=>(window.addEventListener("resize",N),()=>{window.removeEventListener("resize",N)}),[N]);const z=u?Xa:er,{openThread:oe,addThread:Y,setOpenThread:G}=s.useContext(z),ke=tc(us,!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,de=s.useCallback(()=>{const Ee=window.getSelection()?.getRangeAt(0),$e=nc();if(!Ee||$e==null)return;const Ke={...c,...$e,startPath:$e.startPath.join(),endPath:$e.endPath.join()},ye=`${dr()}${cr}`,_e=`cockpit_${e}`;Y(ye,{type:"thread",id:ye,roomId:_e,createdAt:new Date,comments:[],metadata:Ke,updatedAt:new Date,resolved:!1}),G(ye)},[Y,e,c,G]);s.useEffect(()=>{oe!=null&&d&&y()},[d,oe,y]);const je=re.fetchState==="In-Progress",Me=gn({mode:"all",defaultValues:la(l),values:la(l)}),De=Me.handleSubmit(Ee=>{const{recipientEmailList:$e,subject:Ke}=Ee[Ai];if(r===!0)I?.(B?.id);else{const ye=k?.replace(ic,dt.common.strings.empty);$e!=null&&Ke!=null&&C($e,Ke,B?.id,ye!=null&&ye.length>0?k:void 0)}}),Fe=()=>{V.current!=null&&V.current.click()},ve=()=>{B!==void 0&&B!=null&&(g([B.id]),L(void 0),X(!1))},et=Ee=>{const $e=Ee.target.files?Ee.target.files[0]:null;if($e)if(!xd($e.type)||ce)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:fd(e,$e.name)};L(wt),X(!0),x([wt])}},Ke.readAsDataURL($e)}},ht=()=>{q.current&&q.current.scrollIntoView({behavior:"smooth"})},tt=()=>{const Ee=Me.getValues(),{recipientEmailList:$e,subject:Ke}=Ee[Ai];$e!=null&&Ke!=null&&S($e,Ke,B?.id,k)};s.useEffect(()=>{j(l.zeniRequestsHtml)},[l.zeniRequestsHtml]),s.useEffect(()=>{F.current=B},[B]),s.useEffect(()=>{L(pd(l.attachmentFile)),X(!1)},[l.attachmentFile]),s.useEffect(()=>{ce&&v()},[ce,v]);const fe=Di(`${m.year}-${m.month}-01`).format(dt.dateFormat.visual.MMMMFormat),Be=M!=null?M.split(oc):[],Vt=l.concatenatedHtml,nt=()=>l.lastDraftSavedDate!=null&&r===!1?t.jsx($c,{time:l.lastDraftSavedDate,user:l.reportLastSavedByUser,timeStampLabel:dt.cockpit.monthEndReport.timeStampLabel}):null,pt=()=>u===!0?ee?t.jsxs(t.Fragment,{children:[t.jsx(Ng,{allThreadsSectionOpen:d,children:t.jsx(kc,{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)=>{G($e);const Ke=ne.findIndex(ye=>ye[0]===$e);y(),_.current?.[Ke]?.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},onCloseAllThreadsDrawer:()=>y()})}),t.jsx(to,{availableWidth:b})]}):t.jsx(jc,{observer:Z,canvasContainerRef:te,sortedThreads:ne,threadsPositions:W,threadsRefs:_,unresolvedThreadsMap:ie,editorMode:!r,style:{minWidth:`${b}px`,position:"relative",height:"fit-content",top:`${te.current?.offsetTop}px`,minHeight:n.sp12},handleRemoveFloatingThread:K}):t.jsx(to,{availableWidth:b}),Lt=(l.zeniRequestsData??[]).length+sc(l.companyMonthEndReportTemplatesData).length;return t.jsxs(t.Fragment,{children:[t.jsxs(Ag,{ref:J,children:[t.jsx(to,{availableWidth:d?A:b}),t.jsxs(Lg,{children:[t.jsx(xn,{...Me,children:t.jsx("form",{id:ca(ra),onSubmit:De,children:t.jsxs(Bg,{children:[t.jsx(ac,{sectionId:Ai,previewMode:r,subject:O}),!r&&Lt>0?t.jsx(rc,{totalItems:Lt,onClickCustomerRequest:T}):null,t.jsxs(Dg,{id:us,ref:te,children:[t.jsxs(Mg,{className:"monthEndReportCanvasWrapper",children:[B!=null||ce?t.jsx(Og,{"data-testid":D("email-attachment-container"),onClick:ht,children:t.jsx(lc,{fileSizeError:ce,setFileSizeError:ge,loading:!1,showAnimation:!r&&U})}):null,r?t.jsx(aa,{dangerouslySetInnerHTML:{__html:cc(Vt)}}):t.jsxs(t.Fragment,{children:[t.jsxs(Eg,{id:dc,children:[t.jsx(Re,{dangerouslySetInnerHTML:{__html:Be[0]!=null?Be[0]+"</body></html>":dt.common.strings.empty}}),t.jsxs(Rg,{children:[t.jsx(Fg,{children:dt.cockpit.monthEndReport.editorTitle}),t.jsx(Pg,{children:dt.cockpit.monthEndReport.editorNote})]})]}),t.jsx(zg,{id:uc,children:t.jsx(hc,{handleFileInputClick:Fe,fileAttached:B!=null,enableZeniGPTFeature:i,isZeniGPTResponseLoading:je,initialHtmlString:l.zeniRequestsHtml,improveUsingZeniGPTClick:p,setZeniRequestsHtml:j,customerRequestData:h})}),t.jsx(aa,{id:ur,dangerouslySetInnerHTML:{__html:Be[1]!=null?"<html><body>"+Be[1]:dt.common.strings.empty}})]}),B!=null?t.jsx(pc,{ref:q,fileName:B.name,fileSize:mc(B.data),onRemove:ve,isRemovable:!r}):null]}),E?t.jsx(gc,{style:{zIndex:15},coords:E,alignment:ke.alignment,onClick:de}):null,t.jsx(xc,{canvasContainerRef:te,sortedThreads:ne,editorMode:!r,isZeniUser:u})]})]})})}),t.jsx(No,{name:B?.name??dt.common.strings.empty,fileRef:V,sizeLimit:Tg,acceptableTypes:Ig,onFileChange:async Ee=>{et(Ee)},onFileSizeError:Ee=>ge(Ee),multiple:!1})]}),pt()]}),t.jsx(tr,{style:{zIndex:10},leftSideComponent:nt(),formId:ca(ra),cancelBtn:{isDisabled:je,label:r===!0?dt.cockpit.monthEndReport.editButtonLabel:dt.cockpit.monthEndReport.saveChanges,onClick:r===!0?$: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 la=e=>({[Ai]:{recipientEmailList:e.recipientEmailList,subject:e.subject??dt.common.strings.empty}}),ca=e=>`${e}_form`;yt.smallBold.lineHeightValue;const Wg=1,Hg=50,da=56,qg=["memo_and_receipt","activity","paymentAccount","receipt"],ua=e=>Jo(e,qg),no=905,Kg=1240,Jg=1440,Qg=1920;function _t(e,i,l,r){const h=i,d=Math.round(i*Kg/no),a=Math.round(i*Jg/no),c=Math.round(i*Qg/no),u=l??a,m=r??u;return new Q(e,i,h,Math.min(d,u),Math.min(a,u),Math.min(c,m))}const{common:{strings:{empty:Gg}},expenseAutomation:{transactions:{header:{vendors:Yg,category:Zg,classText:Xg,date:e1,type:t1,amount:n1,paymentAccount:i1,memoReceipt:o1}}}}=me.getLocalizedStrings(),ll={key:"vendor",value:Yg,sortOrder:"ascending",width:_t(200,200,220,360),customStyle:{common:{paddingLeft:f[7]}}},s1={key:"payment_account",value:i1,sortOrder:"ascending",width:_t(180,180,200,320),customStyle:{common:{paddingLeft:f[0]}}},a1={key:"category",value:Zg,sortOrder:"ascending",width:_t(200,200,220,360),customStyle:{common:{paddingLeft:f[6]}}},r1={key:"class",value:Xg,sortOrder:"ascending",width:_t(200,200,220,360),customStyle:{common:{paddingLeft:f[6]}}},l1={key:"date",value:e1,sortOrder:"descending",width:_t(108,108,130,144),customStyle:{common:{paddingLeft:f[0]}}},c1={key:"transaction_type",value:t1,sortOrder:"descending",width:_t(108,108,130,144),customStyle:{common:{paddingLeft:0}}},d1={key:"memo_and_receipt",value:o1,sortOrder:"ascending",width:_t(108,108,108,120),customStyle:{common:{paddingLeft:0,justifyContent:"center",display:"flex",alignItems:"center"}}},cl={key:"amount",value:n1,sortOrder:"ascending",width:_t(108,108,140,156),customStyle:{common:{paddingRight:f[0],justifyContent:"flex-end",display:"flex",alignItems:"center"}}},u1={key:"activity",value:Gg,sortOrder:"ascending",width:_t(f[6],f[6],48,54),customStyle:{common:{}}},ss=e=>{const i=[ll,s1,a1,r1,l1,c1,d1,cl];return e===!0&&i.push(u1),i},as=[{...ll,width:new Q(65,65)},{...cl,width:new Q(30,30)}],io={sortKey:"date",sortOrder:"descending"},dl=({sortConfig:e,isDisabled:i,isTransactionActivityEnabled:l,onColumnSortConfigChanged:r})=>{const h=Ce(),d=Xe(),a=d?as:ss(l),[c,u]=s.useState(Eo(a));s.useEffect(()=>{const g=Eo(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=>{ua(g.key)==null&&m(bd(g.key),g.sortOrder)};return t.jsx(h1,{windowSize:h,isQuickViewMode:d,"data-testid":D("transaction-categorization-header-container"),children:c.map((g,x)=>{const y=i!=null||ua(g.key)!=null;return t.jsxs(p1,{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":D("transaction-categorization-header-wrapper",g.key),children:[t.jsxs(y1,{"data-testid":D("transaction-categorization-header",g.value?g.value:g.key),onClick:()=>p(g),isSortDisabled:y,children:[t.jsx(w1,{children:g.value}),y?null:t.jsx(g1,{sortConfig:e,headerData:g,"data-testid":D("transaction-categorization-sort-icon",g.key),children:t.jsx(f1,{})})]}),y?null:t.jsx(x1,{isSortDisabled:y,sortDataValue:e.sortKey,isVisible:e.sortKey===g.key&&e.sortKey!==io.sortKey,"data-testid":D("transaction-categorization-close-icon",g.key),children:t.jsx(m1,{onClick:()=>{m(io.sortKey,io.sortOrder)},"data-testid":D("transaction-categorization-close-icon-button",g.key)})})]},g.key)})})},h1=o.div`
|
|
1236
|
-
top: ${n.sp0};
|
|
1237
|
-
left: ${n.sp0};
|
|
1238
|
-
height: ${Hg}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?le`
|
|
1247
|
-
width: 100%;
|
|
1248
|
-
justify-content: space-between;
|
|
1249
|
-
`:le`
|
|
1250
|
-
column-gap: ${n.sp4};
|
|
1251
|
-
width: max-content;
|
|
1252
|
-
min-width: 100%;
|
|
1253
|
-
`}
|
|
1254
|
-
`,p1=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?le`
|
|
1266
|
-
width: ${e.wrapperWidth.valuePercentage(e.windowSize)};
|
|
1267
|
-
max-width: ${e.wrapperWidth.valuePercentage(e.windowSize)};
|
|
1268
|
-
`:le`
|
|
1269
|
-
width: ${e.wrapperWidth.valuePx(e.windowSize)};
|
|
1270
|
-
max-width: ${e.wrapperWidth.valuePx(e.windowSize)};
|
|
1271
|
-
`}
|
|
1272
|
-
`,m1=o(ei)`
|
|
1273
|
-
width: 12px;
|
|
1274
|
-
height: 12px;
|
|
1275
|
-
`,g1=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
|
-
`,x1=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
|
-
`,f1=o(Xn)`
|
|
1289
|
-
width: ${n.sp2};
|
|
1290
|
-
height: ${n.sp2};
|
|
1291
|
-
`,y1=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
|
-
`,w1=o(Ze)`
|
|
1299
|
-
display: flex;
|
|
1300
|
-
`,oo="expenseAutomationTransactionsPage",pn="transactionCategorizationListTable",Pe="account",ut="class",jt="lineEntitySelection",b1="lineEntity",C1="recommendations",ul="lineInfo",v1="vendorDetails",S1="customerDetails",Ri="selectedTransactionIds",Ut=(e,i,l)=>`${e}.${l}.${i}`,k1=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"})),hl=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"})),j1=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"})),$1=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:I1,hyphen:Wt,empty:qt,colon:ha},tooltips:{addReceipt:T1,viewReceipt:L1,viewReceipts:A1}},expenseAutomation:{transactions:St},dateFormat:R1}=me.getLocalizedStrings(),Bt={containerPaddingLeftRight:new Q(f[3],f[4]),containerPaddingTopBottom:new Q(f[1],f[2]),containerPaddingTopBottomEmpty:new Q(f[2],f[3]),nameLogoWidth:new Q(f[2],f[4]),nameLogoHeight:new Q(f[2],f[4])},E1=({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:S,setActivityLogTransactionId:$,isTransactionActivityEnabled:v,authParams:T,onUploadTransactionReceipt:I})=>{const w=Ce(),k=Xe(),[j,b]=s.useState(!1),[P,A]=s.useState(!1),{lineItemById:R,sortedLineItems:F}=i.transactionReviewLocalData,V=i.transactionReviewLocalData.tabSpecificLineItems?.[d]||[],q=F.filter(z=>V.indexOf(z)!==-1),M=[];q.forEach(z=>{M.push(R[z])});const{accountList:O,accountsHierarchyList:re,classHierarchyList:B,classList:L,uncategorizedAccounts:U,transactions:X,selectedCheckBoxTransactionIds:ce}=e,ge=e.uploadReceiptStatusById,te=ce.includes(i.transactionId),J=Tt(),ee={control:()=>({marginLeft:-2,backgroundColor:j?J.colors.background:J.colors.grey5}),valueContainer:()=>({justifyContent:"flex-start",paddingLeft:f[0]}),menu:()=>({width:"150%",background:J.colors.grey5}),singleValue:()=>({color:j||te?J.colors.primary:J.colors.hero,paddingLeft:f[2]}),input:z=>({...z,color:j||te?J.colors.primary:J.colors.hero,textAlign:"left",paddingLeft:f[2]}),menuPortal:z=>({...z,zIndex:10})},H={...ee,singleValue:z=>({...z,color:j||te?J.colors.primary:J.colors.hero}),menu:()=>({marginTop:f[1],marginLeft:-8}),input:z=>({...z,color:j||te?J.colors.primary:J.colors.hero,textAlign:"left"})},_=X.find(z=>z.id===i.transactionId),ne=(z,oe)=>{const{transactionType:Y}=oe.transactionReviewLocalData;let G=z.target;for(;G;){if(G.classList.contains("select-value-container")||G.classList.contains("item-value-container")||G.classList.contains("grouped-single-select-field__value-container")||G.classList.contains("auto-complete-grouped-creatable-single-custom-group-select-field__option")||G.classList.contains("grouped-single-select-field__input")||G.classList.contains("grouped-single-select-field__menu"))return;G=G.parentElement}Y!=null&&p(oe.transactionId,Y)},W=s.useRef(null),[Z,ie]=s.useState(void 0),[K,N]=s.useState("bottom");return s.useEffect(()=>{if(Z===void 0)return;const z=c?.current?._outerRef??null,oe=()=>{const Y=W.current;if(Y==null||z==null)return;const G=Y.getBoundingClientRect(),ke=z.getBoundingClientRect(),Ie=z.scrollTop+(G.bottom-ke.top),E=z.scrollHeight-Ie;N(E>=288?"bottom":"top")};return oe(),window.addEventListener("resize",oe),z?.addEventListener("scroll",oe),()=>{window.removeEventListener("resize",oe),z?.removeEventListener("scroll",oe)}},[c,Z]),t.jsxs(M1,{onMouseEnter:k?void 0:()=>b(!0),onMouseLeave:k?void 0:()=>b(!1),children:[t.jsx(z1,{className:"categorization-row-card",windowSize:w,isSelected:te,isQuickViewMode:k,isHovered:j,children:t.jsx(P1,{children:M.map((z,oe)=>t.jsx(F1,{ref:Z===oe?W:void 0,"data-testid":D("transaction-categorization-list-row",z.lineId),windowSize:w,isQuickViewMode:k,onClick:Y=>ne(Y,i),children:t.jsx(D1,{isTransactionActivityEnabled:v,line:z,isHovered:j||te,isSelected:te,isQuickViewMode:k,lineIndex:oe,sectionId:l,transaction:i,currentTransaction:_,windowSize:w,accountsHierarchyList:re,classHierarchyList:B,allAccountList:O,allClassList:L,uncategorizedAccounts:U,vendorSearchAutoCompleteData:r,vendorSearchAutoCompleteActions:h,setCurrentTransactionInAction:g,vendorLoadOptions:x,customStyle:ee,customStyleAutoComplete:H,recommendations:z.recommendationsWithCOT,selectedTab:d,isCOTEnabled:u,menuPlacement:K,cotTracking:m,openTooltipId:y,setOpenTooltipId:C,isUncategorizedExpenseCategoryEnabled:S,authParams:T,uploadReceiptStatus:ge?.[i.transactionId],onUploadTransactionReceipt:I,onDropdownClose:()=>ie(void 0),onDropdownOpen:()=>ie(oe)})},`${i.transactionId}.${z.lineId}`))},i.transactionId)},i.transactionId),v===!0&&!k&&t.jsx(ox,{className:"activity-log-icon","data-testid":D("activity-log-icon",i.transactionId),onMouseEnter:()=>A(!0),onMouseLeave:()=>A(!1),onClick:z=>{z.stopPropagation(),$(i.transactionId)},children:t.jsx(xe,{title:St.header.activity,placement:"bottom",children:t.jsx(sx,{style:{color:P?J.colors.primary:J.colors.hero}})})})]})},D1=({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:S,recommendations:$,vendorSearchAutoCompleteData:v,selectedTab:T,isCOTEnabled:I,menuPlacement:w,cotTracking:k,openTooltipId:j,setCurrentTransactionInAction:b,vendorLoadOptions:P,setOpenTooltipId:A,isUncategorizedExpenseCategoryEnabled:R,isTransactionActivityEnabled:F,onDropdownClose:V,onDropdownOpen:q,authParams:M,uploadReceiptStatus:O,onUploadTransactionReceipt:re})=>{const{transactionDate:B,transactionType:L,transactionTypeName:U,memo:X}=u.transactionReviewLocalData,{setValue:ce}=qo(),ge=s.useCallback((se,Te)=>{k?.onCOTView!=null&&k.onCOTView(a.lineId,u.transactionId,se,Te)},[k,a.lineId,u.transactionId]),te=a.lineDescription,J=s.useMemo(()=>{if(te||X)return[{title:St.description,description:te||Wt},{title:St.header.memo,description:X||Wt}]},[X,te]),ee=Ut(S,jt,c.toString()),H=Ut(S,Pe,c.toString()),_=Ut(S,ut,c.toString()),ne=(se,Te)=>{if(C)return;let Ae;switch(Te){case"vendor":Ae=ee;break;case"category":Ae=H;break;case"class":Ae=_;break;default:return}ce(`${Ae}.selectedOption`,se,{shouldValidate:!0,shouldDirty:!0})},W=Tt(),Z=s.useMemo(()=>m!=null&&rn(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]),ie=s.useMemo(()=>m!=null&&rn(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]),K=a[ut]?.classId,N=a[Pe]?.qboId??a[Pe]?.accountId,z=Z?.id,oe=ie?.id,Y=ie?.name,[G,ke]=s.useState(!K),[Ie,E]=s.useState(!N||a[Pe]?.qboId!=null&&_n(g,a[Pe].qboId,R===!0?["income"]:void 0)===!0),[de,je]=s.useState(!oe||!z),Me=se=>$?.find(Te=>Te.vendor?.qboId===se||Te.vendor?.id===se||Te.vendor?.name===se)?.vendor?.reason??"",De=u.transactionReviewLocalData.lineItemById[a.lineId]?.recommendationsWithCOT||[],Fe=jr(e,De),ve=kr(r,De),et=se=>i.filter(Te=>Te.qboId===se)[0]?.qboId,ht=se=>l.filter(Te=>Te.classId===se)[0]?.accountingClassNumber??void 0,tt=s.useCallback(se=>_n(g,se,R===!0?["income"]:void 0),[g,R]),[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([]),[fn,Qe]=s.useState(void 0),yn=s.useRef(null),[wn,bt]=s.useState(0),[Yt,Zt]=s.useState(0),Xt=_c()?.url,[ti,Dn]=s.useState(!1),_i=(se,Te)=>{b({transactionId:u.transactionId,lineItemId:a.lineId}),P(se,Te)},en=()=>{je(!(oe||z)),Be(!1),V?.()},tn=()=>{N&&a[Pe]?.qboId!=null&&_n(g,a[Pe].qboId,R===!0?["income"]:void 0)===!1?E(!1):E(!0),Dn(!1),V?.()},Mn=()=>{ke(!K),nt(!1),V?.()},ni=()=>{C||(oe||z)&&(Be(!0),q?.())},Vi=()=>{C||(nt(!0),q?.())},Ni=()=>{C||(Dn(!0),q?.())};s.useEffect(()=>{N&&a[Pe]?.qboId!=null&&_n(g,a[Pe].qboId,R===!0?["income"]:void 0)===!1?E(!1):E(!0)},[N]),s.useEffect(()=>{ke(!K)},[K]),s.useEffect(()=>{je(!(oe||z))},[oe,z]);const ii=u.transactionReviewLocalData.selectedEntity,oi=u.transactionReviewLocalData.lineItemById[a.lineId].selectedEntityLine,We=m!=null&&rn(m)===!0?ii:oi,bn=s.useMemo(()=>{const se=u.transactionReviewLocalData.lineItemById[a.lineId]?.recommendationsWithCOT||[],Te=v.entityAutoCompleteView;return{selectedOption:We?.qboId??We?.id,defaultOptions:Uo(Te,We,se??[])}},[We,u.transactionReviewLocalData.lineItemById,a.lineId,v.entityAutoCompleteView]),Le=()=>We!=null&&We.logo!=null?t.jsx(Yn,{photoUrl:We.logo.toString(),styles:{width:Bt.nameLogoWidth.valuePx(p),height:Bt.nameLogoHeight.valuePx(p)},fallbackAvatar:t.jsx(ga,{children:t.jsx(Jt,{name:We.name,size:n.sp4})})}):We!=null&&We.name!=null?t.jsx(ga,{children:t.jsx(Jt,{name:We.name,size:n.sp4})}):null,Ge=(se,Te)=>{if(Te==null||!Te)return;let Ae=[];return se.forEach(Ot=>{Ae=Ae.concat(Ot.options)}),Ae.find(Ot=>Ot.value===Te)?.label??Te},Ct=Ge(ve,K),si=Ge(Fe,N),vt=T==="review",ai=Hi("vendor",bn.defaultOptions,bn.selectedOption),ri=Hi("category",Fe,N),li=Hi("class",ve,K),Ui=se=>{const Te=C?as:ss(se);return Te.map((Ae,Ot)=>{const xt=`${u.transactionId}_${Ae.key}_${a.lineId}`;if(c>0&&m!=null&&rn(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(ml,{},xt);case"vendor":default:return t.jsxs(mt,{windowSize:p,wrapperWidth:Ae.width,isQuickViewMode:C,className:"item-value-container",children:[!C&&t.jsx(so,{isCOTEnabled:I,recommendations:De,type:"vendor",isFirstColumn:!0,isEnabled:!!We?.isPreFilled,isMisCategorized:ai,onRecommendationClick:ne,selectedValue:oe,selectedValueLabel:Y,isReviewTab:vt,isAccountOptionDisabled:tt,existingOption:{label:m!=null&&rn(m)===!0?m?.vendor?.name:void 0,value:m!=null&&rn(m)===!0?m?.vendor?.id:void 0},cotTracking:k,lineId:a.lineId,transactionId:u.transactionId,openTooltipId:j,setOpenTooltipId:A}),t.jsx(uo,{children:de===!0?t.jsx(lo,{isHovered:x,isQuickViewMode:C,children:t.jsxs(ro,{onClick:Ve=>{Ve.stopPropagation(),!C&&(q?.(),je(!1),Be(!0))},"data-testid":D("add-vendor-button",S),style:{display:"inline-flex",alignItems:"center",color:he.brandColorGoldDark,cursor:"pointer",height:n.sp6},children:[t.jsx(Ci,{}),St.addPayee]})}):fe===!0?t.jsx($t,{onClickAway:en,children:t.jsx(tx,{"data-testid":D("vendor-selection-dropdown-container",Ut(S,jt,c.toString())),children:t.jsx(Hc,{name:ee,placeholder:St.addPayee,valueToInfo:Me,defaultValue:{selectedOption:bn.selectedOption,defaultOptions:bn.defaultOptions},type:"vendor",autoFocus:!de,style:{width:"100%"},pageSource:"list_page",transactionStatus:vt?"pending_review":"auto_categorized",isOptionRemovable:!1,customStyleConfig:d,menuIsOpen:fe,onMenuClose:en,registerOptions:{required:!1},loadOptions:_i,showCOT:I,onCOTView:ge,menuPlacement:w})})}):t.jsx(ix,{children:t.jsxs(co,{isHovered:x,isQuickViewMode:C,showOutline:!C&&ai&&We?.isPreFilled!==!0&&!y&&vt,children:[Le(),t.jsx(ex,{onClick:ni,"data-testid":D("vendor-name-text",S),children:We!=null&&We.name?t.jsx(qe,{text:We.name,itemTextStyle:{color:x?W.colors.primary:W.colors.hero}}):t.jsx(nx,{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(so,{isCOTEnabled:I,recommendations:De,type:"category",isFirstColumn:!1,isReviewTab:vt,isEnabled:!!a[Pe]?.isPreFilled,isAccountOptionDisabled:tt,isMisCategorized:ri,onRecommendationClick:ne,selectedValue:N,selectedValueLabel:si,existingOption:{label:Ve?.account?.accountName,value:Ve?.account?.qboId??Ve?.account?.accountId},cotTracking:k,lineId:a.lineId,transactionId:u.transactionId,openTooltipId:j,setOpenTooltipId:A}),t.jsx(uo,{children:Ie===!0?t.jsx(lo,{isHovered:x,children:t.jsxs(ro,{onClick:ct=>{ct.stopPropagation(),!C&&(q?.(),E(!1),Dn(!0))},"data-testid":D("category-selection-field",H),style:{display:"inline-flex",alignItems:"center",color:he.brandColorGoldDark,cursor:"pointer",height:n.sp6},children:[t.jsx(Ci,{}),St.addCategory]})}):ti===!0?t.jsx($t,{onClickAway:tn,children:t.jsx(xa,{isHovered:x,"data-testid":D("category-selection-dropdown-container",H),children:t.jsx(vs,{name:H,placeholder:St.addCategory,valueToId:ct=>et(ct),type:"category",pageSource:"list_page",transactionStatus:vt?"pending_review":"auto_categorized",showCOT:I,defaultValue:{selectedOption:N,allOptions:Fe},style:{display:"flex",flexGrow:1,width:"100%",cursor:"inherit"},registerOptions:{required:!1},menuIsOpen:ti,autoFocus:!Ie&&(!N||a[Pe]?.qboId!=null&&[g.expense?.qboId,g.income?.qboId].includes(a[Pe].qboId)),onMenuClose:tn,customStyleConfig:h,disableCurrentOption:tt,menuPlacement:w,onCOTView:ge})})}):t.jsx(co,{isHovered:x,showOutline:ri&&a[Pe]?.isPreFilled!==!0&&!y&&vt,children:t.jsx(fa,{onClick:Ni,"data-testid":D("category-label-text",H),children:t.jsx(qe,{text:si??"",itemTextStyle:{color:x?W.colors.primary:W.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(so,{isCOTEnabled:I,recommendations:De,type:"class",isFirstColumn:!1,isReviewTab:vt,isEnabled:!!a[ut]?.isPreFilled,isAccountOptionDisabled:tt,isMisCategorized:li,onRecommendationClick:ne,selectedValue:K,selectedValueLabel:Ct,existingOption:{label:Ve?.class?.className,value:Ve?.class?.classId},cotTracking:k,lineId:a.lineId,transactionId:u.transactionId,openTooltipId:j,setOpenTooltipId:A}),t.jsx(uo,{children:G===!0?t.jsx(lo,{isHovered:x,children:t.jsxs(ro,{onClick:ct=>{ct.stopPropagation(),!C&&(q?.(),ke(!1),nt(!0))},"data-testid":D("class-selection-field",_),style:{display:"inline-flex",alignItems:"center",color:he.brandColorGoldDark,cursor:"pointer",height:n.sp6},children:[t.jsx(Ci,{}),St.addClass]})}):Vt===!0?t.jsx($t,{onClickAway:Mn,children:t.jsx(xa,{isHovered:x,"data-testid":D("class-selection-dropdown-container",_),children:t.jsx(vs,{name:_,placeholder:St.addClass,valueToId:ct=>ht(ct),type:"class",showCOT:I,defaultValue:{selectedOption:K,allOptions:ve},pageSource:"list_page",transactionStatus:vt?"pending_review":"auto_categorized",menuIsOpen:Vt,registerOptions:{required:!1},style:{width:"100%"},autoFocus:!G&&!K,customStyleConfig:h,onMenuClose:Mn,menuPlacement:w,onCOTView:ge})})}):t.jsx(co,{isHovered:x,showOutline:li&&a[ut]?.isPreFilled!==!0&&!y&&vt,children:t.jsx(fa,{"data-testid":D("class-selection-field",_),onClick:Vi,children:t.jsx(qe,{text:Ct??"",itemTextStyle:{color:x?W.colors.primary:W.colors.hero}})})})})]},xt)}case"date":return t.jsx(mt,{windowSize:p,wrapperWidth:Ae.width,children:t.jsx(un,{windowSize:p,isLastItem:Ot===Te.length-1,children:t.jsx(Po,{"data-testid":D("date-field",Ut(S,ut,c.toString())),children:t.jsx(ao,{style:{color:x?W.colors.primary:W.colors.hero},children:B!=null?B.format(R1.visual.MMMDCommaYYYYformat):null})})})},xt);case"transaction_type":return t.jsx(mt,{windowSize:p,wrapperWidth:Ae.width,children:t.jsx(un,{windowSize:p,"data-testid":D("transaction-type-field",Ut(S,ut,c.toString())),isLastItem:Ot===Te.length-1,children:U!=null?t.jsx(Uc,{textColor:x?new Ho(W.colors.primary):Wc(void 0,W),text:U??L}):null})},xt);case"amount":{const Ve=it("0,0.[00]",a.amount,!0);return t.jsx(mt,{windowSize:p,style:{marginRight:se&&!C?f[0]:f[4]},wrapperWidth:Ae.width,isQuickViewMode:C,children:t.jsx(un,{windowSize:p,isLastItem:Ot===Te.length-1,style:{justifyContent:"flex-end"},children:t.jsx(Po,{"data-testid":D("transaction-amount-field",Ut(S,ut,c.toString())),style:{color:x?W.colors.primary:W.colors.hero},children:Ve})})},xt)}case"payment_account":{if(!(L==="expense"||L==="check"||L==="bill_payment"||L==="vendor_credit"||L==="credit_card_credit"||L==="deposit"||L==="sales_receipt"||L==="refund"||L==="payment"))return t.jsx(mt,{windowSize:p,wrapperWidth:Ae.width,children:t.jsx(un,{windowSize:p,isLastItem:Ot===Te.length-1,children:t.jsx(ao,{style:{textAlign:"center",width:"100%"},children:Wt})})},xt);const Ve=m?.account?.accountName,ct=m?.paymentType,zn=m?.paymentTypeName,ci=ct==="credit_card"?V1:ct==="cash"?N1:ct==="check"?W1:ct==="ach"?cx:U1,ft={title:qt,items:[{text:St.paymentAccountTooltip.accountLabel+ha,amount:Ve??Wt},...zn!=null?[{text:St.paymentAccountTooltip.methodLabel+ha,amount:zn}]:[]]};return t.jsx(mt,{windowSize:p,wrapperWidth:Ae.width,children:t.jsx(un,{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(_1,{"data-testid":D("payment-account",S),style:{color:x?W.colors.primary:W.colors.hero},children:[ci!=null&&t.jsx(ci,{style:{color:x?W.colors.primary:W.colors.hero}}),t.jsx(ao,{style:{color:"inherit",whiteSpace:"pre-wrap"},children:Ve??Wt})]})})})},xt)}case"memo_and_receipt":{const Ve=m?.attachments??[],ct=O?.fetchState==="In-Progress",zn=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 Pn=Ve.map(nn=>nn.id),di=`${Xt}/transaction_attachments`;Cr(di,M,{transaction_key:{transaction_id:m.id,transaction_type:m.type},attachment_ids:Pn}).then(nn=>{wt(nn),nn.length>0&&ye(nn[0])})},ci=ft=>{ft.stopPropagation(),yn.current?.click()};return t.jsx(mt,{windowSize:p,wrapperWidth:Ae.width,"data-testid":D("memo-field",Ut(S,ut,c.toString())),children:t.jsxs(ax,{onClick:ft=>ft.stopPropagation(),children:[J!=null?t.jsx(xe,{display:"flex",placement:"bottom",data:J,variant:"multi-information-points",style:{maxHeight:"min(60vh, 360px)",overflowY:"auto",overflowX:"hidden"},children:t.jsx(q1,{"data-testid":D("memo-icon",S),style:{color:x?W.colors.primary:W.colors.hero}})}):t.jsx(H1,{style:{margin:0},children:Wt}),ct?t.jsx(Hn,{size:"Small",style:{display:"flex"},start:!0}):Ve.length===0?t.jsx(xe,{display:"flex",placement:"bottom",title:T1,enterDelay:600,children:t.jsx(Ci,{"data-testid":D("upload-receipt-icon",S),style:{margin:0},onClick:ft=>{ft.stopPropagation(),ci(ft)}})}):Ve.length===1?t.jsx(xe,{display:"flex",placement:"bottom",title:L1,enterDelay:600,children:t.jsx(rx,{"data-testid":D("view-receipt-icon",S),style:{color:x?W.colors.primary:W.colors.hero},onClick:zn})}):t.jsx(xe,{display:"flex",placement:"bottom",title:A1,enterDelay:600,children:t.jsx(lx,{"data-testid":D("view-receipts-icon",S),style:{color:x?W.colors.primary:W.colors.hero},onClick:zn})}),t.jsx(No,{name:`transaction-receipt-${u.transactionId}`,fileRef:yn,sizeLimit:Ii,multiple:!0,acceptableTypes:[...Ar],onFileChange:ft=>{const Pn=ft.target.files;if(Pn!=null&&Pn.length>0){const di=Array.from(Pn);re(T,u.transactionId,L??qt,di,di.map(nn=>nn.name))}},onFileSizeError:()=>{}})]})},xt)}}})},lt=m?.attachments??[],On=fn??lt[0];return t.jsxs(t.Fragment,{children:[Ui(F),pt&<.length>0&&On!=null?Mi.createPortal(t.jsx(mr,{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 se=(Ee+1)%lt.length;$e(se),Qe(lt[se]),_e[se]!=null&&ye(_e[se])},onPreviousClick:()=>{const se=(Ee-1+lt.length)%lt.length;$e(se),Qe(lt[se]),_e[se]!=null&&ye(_e[se])},setSelectedFileAttachment:se=>{Qe(typeof se=="function"?Te=>se(Te??lt[0]):se)},handleTouchStart:se=>bt(se.targetTouches[0].clientX),handleTouchMove:se=>Zt(se.targetTouches[0].clientX),handleTouchEnd:()=>{if(wn-Yt>50&&Yt!==0&&Ee<lt.length-1){const se=Ee+1;$e(se),Qe(lt[se]),_e[se]!=null&&ye(_e[se]),bt(0),Zt(0)}else if(wn-Yt<-50&&Yt!==0&&Ee>0){const se=Ee-1;$e(se),Qe(lt[se]),_e[se]!=null&&ye(_e[se]),bt(0),Zt(0)}}}),document.body):null]})},pa=({isEnabled:e,isReviewTab:i,isMisCategorized:l,hasRecommendations:r,isTooltipVisible:h=!1,type:d})=>e?i?h?t.jsx(Q1,{"data-testid":D("recommendation-icon",d)}):t.jsx(K1,{"data-testid":D("recommendation-icon",d)}):h?t.jsx(J1,{"data-testid":D("recommendation-icon",d)}):t.jsx(G1,{className:"ai-icon-selected-plain","data-testid":D("recommendation-icon",d)}):!e&&l||r?h?t.jsx(Z1,{"data-testid":D("recommendation-icon",d)}):t.jsx(Y1,{"data-testid":D("recommendation-icon",d)}):null,ma=({isFirstColumn:e,children:i})=>t.jsx(gl,{isFirstColumn:e,children:i}),so=({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:S,setOpenTooltipId:$})=>{const v=s.useMemo(()=>`${y}:${g}:${l}`,[y,g,l]),T=x===v,I=Zc().analytics,{createAlternateRecommendationCallback:w}=Xc(),k=s.useCallback(V=>{const q=e[1],M=e[0];w(l,{currentValue:h??qt,transactionCurrentStatus:r?"pending_review":"auto_categorized",transactionPage:"list_page",cotTracking:p?{transactionId:y,lineId:g,onCOTView:(O,re,B,L)=>{p.onCOTView?.(O,re,B,L)}}:void 0},q,M)(V)},[w,e,h,r,l,p,g,y]),j=ed(e,l,i,m,"list_page",r?"pending_review":"auto_categorized",S,k,u,C),b=td(e,l),P=s.useCallback(()=>{$(v);const V=j?.recommendations[0]?.cot??[],q=j?.recommendations[1]?.cot??[],M=q.length>0;if(I.trackTransactionCotView({recommendationFor:l,currentValue:h??qt,recommendation:j?.recommendations[0]?.name??qt,recommendationCot:V,isRecommendationCotAvailable:V.length>0,recommendationReason:j?.recommendations[0]?.reason??qt,recommendationConfidencePercentage:j?.recommendations[0]?.confidencePercentage??null,recommendationConfidenceLevel:xs(fs(j?.recommendations[0]?.confidencePercentage).toLocaleLowerCase()),alternativeRecommendation:j?.recommendations[1]?.name??qt,alternativeRecommendationCot:q,isAlternativeRecommendationCotAvailable:M,alternativeRecommendationReason:j?.recommendations[1]?.reason??qt,alternativeRecommendationConfidencePercentage:j?.recommendations[1]?.confidencePercentage??null,alternativeRecommendationConfidenceLevel:M?xs(fs(j?.recommendations[1]?.confidencePercentage).toLocaleLowerCase()):null,transactionCurrentStatus:r?"pending_review":"auto_categorized",transactionPage:"list_page"}),p?.onCOTView!=null){const O=nd(j);O!=null&&p.onCOTView(g,y,l,O)}},[I,j,r,h,l,g,y,v,$]),A=s.useCallback(()=>{x===v&&$(void 0)},[x,v,$]),R=s.useMemo(()=>!u||!b?!1:e.some(V=>l==="vendor"&&V.vendor!=null?V.vendor.id===u||V.vendor.qboId===u:l==="category"&&V.account!=null?V.account.qboId===u||V.account.accountId===u:l==="class"&&V.class!=null?V.class.classId===u:!1),[u,b,e,l]);if(!b)return t.jsx(gl,{isFirstColumn:d});const F=a||R;return j?t.jsx(ma,{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:P,onClose:A,children:t.jsx(X1,{"data-testid":D("recommendation-icon",l),children:t.jsx(pa,{isEnabled:F,isReviewTab:r,isMisCategorized:c,hasRecommendations:b,isTooltipVisible:T})})})}):t.jsx(ma,{isFirstColumn:d,children:t.jsx(pa,{isEnabled:F,isReviewTab:r,isMisCategorized:c,hasRecommendations:b,isTooltipVisible:T,type:l})})},pl=({isTransactionActivityEnabled:e})=>{const i=Ce(),l=Xe(),r=l?as:ss(e);return t.jsx(O1,{windowSize:i,isQuickViewMode:l,isTransactionActivityEnabled:e,children:r.map((h,d)=>{const a=`${d}${I1}${h.key}`;switch(h.key){case"activity":return t.jsx(ml,{},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(un,{windowSize:i,isLastItem:d===r.length-1,children:t.jsxs(Po,{children:[t.jsx(Zn,{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(un,{windowSize:i,isLastItem:c,children:t.jsx(ot,{width:"100%",height:f[4],style:{display:"flex",alignItems:"center"}})})},a)}}})})},ml=o.div`
|
|
1301
|
-
width: ${n.sp0};
|
|
1302
|
-
height: ${n.sp0};
|
|
1303
|
-
`,M1=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
|
-
`,O1=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?le`
|
|
1332
|
-
flex: 1;
|
|
1333
|
-
justify-content: space-between;
|
|
1334
|
-
padding-left: ${Bt.containerPaddingLeftRight.valuePx(e.windowSize)};
|
|
1335
|
-
`:le`
|
|
1336
|
-
column-gap: ${n.sp4};
|
|
1337
|
-
min-width: min-content;
|
|
1338
|
-
`}
|
|
1339
|
-
`,z1=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?le`
|
|
1350
|
-
flex: 1;
|
|
1351
|
-
padding-left: ${Bt.containerPaddingLeftRight.valuePx(e.windowSize)};
|
|
1352
|
-
`:le`
|
|
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?le`
|
|
1368
|
-
.ai-icon-selected-plain {
|
|
1369
|
-
color: ${i.colors.primary};
|
|
1370
|
-
}
|
|
1371
|
-
`:null};
|
|
1372
|
-
`,P1=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
|
-
`,F1=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?le`
|
|
1389
|
-
width: 100%;
|
|
1390
|
-
justify-content: space-between;
|
|
1391
|
-
`:le`
|
|
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?le`
|
|
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
|
-
`:le`
|
|
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
|
-
`,B1=le`
|
|
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
|
-
`,un=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
|
-
`,Po=o.div`
|
|
1433
|
-
display: flex;
|
|
1434
|
-
flex-direction: row;
|
|
1435
|
-
column-gap: ${n.sp2};
|
|
1436
|
-
align-items: center;
|
|
1437
|
-
`,ao=o(Re)`
|
|
1438
|
-
${B1};
|
|
1439
|
-
min-width: 0;
|
|
1440
|
-
color: ${e=>e.theme.colors.hero};
|
|
1441
|
-
`,ro=o(Re)`
|
|
1442
|
-
color: ${e=>e.theme.colors.hero};
|
|
1443
|
-
`,_1=o.div`
|
|
1444
|
-
display: flex;
|
|
1445
|
-
align-items: center;
|
|
1446
|
-
gap: ${n.sp2};
|
|
1447
|
-
cursor: default;
|
|
1448
|
-
overflow: hidden;
|
|
1449
|
-
min-width: 0;
|
|
1450
|
-
`,V1=o(Jc)`
|
|
1451
|
-
width: ${n.sp3};
|
|
1452
|
-
height: ${n.sp3};
|
|
1453
|
-
flex-shrink: 0;
|
|
1454
|
-
`,N1=o(Qc)`
|
|
1455
|
-
width: ${n.sp3};
|
|
1456
|
-
height: ${n.sp3};
|
|
1457
|
-
flex-shrink: 0;
|
|
1458
|
-
`,U1=o(Yc)`
|
|
1459
|
-
width: ${n.sp3};
|
|
1460
|
-
height: ${n.sp3};
|
|
1461
|
-
flex-shrink: 0;
|
|
1462
|
-
`,W1=o(k1)`
|
|
1463
|
-
width: ${n.sp3};
|
|
1464
|
-
height: ${n.sp3};
|
|
1465
|
-
flex-shrink: 0;
|
|
1466
|
-
`,Ci=o(Fi)`
|
|
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
|
-
`,H1=o.div`
|
|
1476
|
-
margin: ${n.sp3};
|
|
1477
|
-
`,q1=o(j1)`
|
|
1478
|
-
width: ${n.sp3};
|
|
1479
|
-
height: ${n.sp3};
|
|
1480
|
-
`,K1=o(ad)`
|
|
1481
|
-
width: ${n.sp5};
|
|
1482
|
-
height: ${n.sp5};
|
|
1483
|
-
`,J1=o(Sd)`
|
|
1484
|
-
width: ${n.sp5};
|
|
1485
|
-
height: ${n.sp5};
|
|
1486
|
-
`,Q1=o(sd)`
|
|
1487
|
-
width: ${n.sp5};
|
|
1488
|
-
height: ${n.sp5};
|
|
1489
|
-
`,G1=o(kd)`
|
|
1490
|
-
width: ${n.sp5};
|
|
1491
|
-
height: ${n.sp5};
|
|
1492
|
-
`,Y1=o(Qt)`
|
|
1493
|
-
width: ${n.sp3};
|
|
1494
|
-
height: ${n.sp3};
|
|
1495
|
-
path {
|
|
1496
|
-
stroke-width: 2;
|
|
1497
|
-
}
|
|
1498
|
-
`,Z1=o(rd)`
|
|
1499
|
-
width: ${n.sp3};
|
|
1500
|
-
height: ${n.sp3};
|
|
1501
|
-
`,gl=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
|
-
`,X1=o.div`
|
|
1509
|
-
display: flex;
|
|
1510
|
-
align-items: center;
|
|
1511
|
-
justify-content: center;
|
|
1512
|
-
width: auto;
|
|
1513
|
-
cursor: pointer;
|
|
1514
|
-
`,ex=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
|
-
`,ga=o.div`
|
|
1524
|
-
display: flex;
|
|
1525
|
-
`,tx=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
|
-
`,lo=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
|
-
`,xa=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
|
-
`,nx=o(Re)``,ix=o.div`
|
|
1550
|
-
width: 100%;
|
|
1551
|
-
display: flex;
|
|
1552
|
-
padding-left: ${n.sp0};
|
|
1553
|
-
`,co=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
|
-
`,fa=o.div``,uo=o.div`
|
|
1566
|
-
display: flex;
|
|
1567
|
-
align-items: center;
|
|
1568
|
-
width: calc(100% - ${n.sp5});
|
|
1569
|
-
`,ox=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
|
-
`,sx=o(hl)`
|
|
1578
|
-
width: ${n.sp3};
|
|
1579
|
-
height: ${n.sp3};
|
|
1580
|
-
`,ax=o.div`
|
|
1581
|
-
display: flex;
|
|
1582
|
-
align-items: center;
|
|
1583
|
-
justify-content: center;
|
|
1584
|
-
width: 100%;
|
|
1585
|
-
gap: ${n.sp5};
|
|
1586
|
-
`,rx=o(br)`
|
|
1587
|
-
width: ${n.sp3};
|
|
1588
|
-
height: ${n.sp3};
|
|
1589
|
-
cursor: pointer;
|
|
1590
|
-
`,lx=o($1)`
|
|
1591
|
-
width: ${n.sp3};
|
|
1592
|
-
height: ${n.sp3};
|
|
1593
|
-
cursor: pointer;
|
|
1594
|
-
`,cx=o(Gc)`
|
|
1595
|
-
width: ${n.sp3};
|
|
1596
|
-
height: ${n.sp3};
|
|
1597
|
-
cursor: pointer;
|
|
1598
|
-
`,dx=({sortConfig:e,fetchState:i,isDisabled:l,isTransactionActivityEnabled:r,onColumnSortConfigChanged:h})=>{const d=Ce();return t.jsxs(ux,{windowSize:d,children:[t.jsx(dl,{isTransactionActivityEnabled:r,sortConfig:e,isDisabled:i==="In-Progress"?"readonly":l,onColumnSortConfigChanged:h,"data-testid":D("transaction-categorization-list-empty-table-header")}),t.jsx(hx,{windowSize:d,"data-testid":D("transaction-categorization-list-empty-rows-container"),children:[...Array(3)].map((a,c)=>t.jsx(pl,{isTransactionActivityEnabled:r,"data-testid":D("transaction-categorization-list-empty-row",c.toString())},c))})]})},ux=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
|
-
`,hx=o.div`
|
|
1608
|
-
display: flex;
|
|
1609
|
-
flex: 1;
|
|
1610
|
-
min-height: 100%;
|
|
1611
|
-
flex-direction: column;
|
|
1612
|
-
row-gap: ${n.sp3};
|
|
1613
|
-
`,{common:px,transactionDetail:{notCategorizedTooltipText:mx}}=me.getLocalizedStrings(),ho={rowGap:new Q(f[0],f[2],f[3])},gx=({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:S,cotTracking:$,isUncategorizedExpenseCategoryEnabled:v,setActivityLogTransactionId:T,onUploadTransactionReceipt:I})=>{const w=Ce(),k=Xe(),[j,b]=s.useState(void 0),{fetchState:P,uiState:A,transactionLocalData:R,selectedCheckBoxTransactionIds:F,transactionIdsWithUnsavedData:V,transactions:q,uncategorizedAccounts:M}=i;Jn({componentName:`expense_automation.transaction_categorization.${e}`,enabled:P==="Completed"});const O=s.useRef(null),re=s.useRef({}),{control:B}=qo();s.useEffect(()=>{O.current?.resetAfterIndex(0,!0)},[w,O,R]),s.useEffect(()=>{O.current?.scrollTo(A.scrollPosition?.scrollTop??0)},[e]);const L=s.useCallback(z=>{if(re.current?.[z]!=null){const G=w==="small"&&A.pageToken==null&&z===R.length-1?ho.rowGap.value("medium-regular"):ho.rowGap.value(w);return re.current[z]+G}if(R[z]==null)return 0;const oe=R[z].transactionReviewLocalData,Y=Object.keys(oe.lineItemById).length;return Y!=null&&!isNaN(Y)&&Y>1?da*Y+ho.rowGap.value(w)*(Y-1):da},[R,w,A.pageToken,A.sortKey,A.sortOrder]),U=s.useCallback((z,oe)=>{re.current={...re.current,[z]:oe},O.current?.resetAfterIndex(0,!0)},[w,O,R,A.sortKey,A.sortOrder]),X=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]),ce=s.useCallback(()=>{A.pageToken!=null&&X()},[X,A.pageToken,A.sortKey,A.sortOrder]),ge=Tc(z=>y(e,{scrollPosition:{scrollTop:z}}),1e3,{trailing:!0}),te=z=>z<i.transactionLocalData.length,J=(z,oe)=>{x(e,{sortOrder:oe,sortKey:z}),C(e,A.searchString,!1,null,!1,!0)},ee=z=>{if(e==="autoCategorized")return!F.includes(z);const oe=R.find(G=>G.transactionId===z)?.transactionReviewLocalData,Y=q.find(G=>G.id===z);return Y!=null&&oe!=null?wd(Y,oe,M,v)?v===!0&&bs(M,oe.lineItemById,["expense"])?V.includes(z)===!1:!1:!0:F.length===0?!0:!F.includes(z)};let H=[],_=[];(P==="Completed"||i.transactionLocalData.length>0)&&(_=i.transactionLocalData.map((z,oe)=>{const Y=ee(z.transactionId);let G=!1;v===!0&&Y===!0&&e==="review"&&bs(M,z.transactionReviewLocalData.lineItemById,["expense"])&&(G=!V.includes(z.transactionId));const ke=z.transactionReviewLocalData;return{label:t.jsx(E1,{isTransactionActivityEnabled:c,transactionView:i,sectionId:`${r}.${oe}.${ul}`,transaction:z,authParams:l,onTransactionCategorizationRowClick:g,vendorLoadOptions:p,setCurrentTransactionInAction:m,vendorSearchAutoCompleteActions:a,vendorSearchAutoCompleteData:u,selectedTab:e,containerRef:S,listContainerRef:O,isCOTEnabled:h,cotTracking:$,openTooltipId:j,setOpenTooltipId:b,isUncategorizedExpenseCategoryEnabled:v,setActivityLogTransactionId:T,onUploadTransactionReceipt:I},`${z.transactionId}.${ke.transactionType}`),value:z.transactionId,defaultChecked:!1,groupLabel:!1,isException:G,exceptionMode:G===!0?"checked_or_hover":void 0,isSticky:!0,isDisabled:Y===!0?"readonly":void 0,exceptionType:G===!0?"alert":void 0,exceptionInfo:G===!0?mx:void 0,exceptionTooltipStyle:{textAlign:"center",maxWidth:"250px",padding:`12px ${n.sp2}`}}}),H=_.map(z=>z.value));const ne={label:"All",value:"allTransactionOptionId",defaultChecked:!1,groupLabel:!1},{title:W,subTitle:Z}=He("transaction_categorization").allDoneText,ie=R.map(z=>z.transactionId),K=s.useMemo(()=>i.totalCountByTab[e],[e,i.totalCountByTab]),N=s.useMemo(()=>R.reduce((z,oe)=>{const Y=Object.keys(oe.transactionReviewLocalData.lineItemById).length;return z+(Y>0?Y:1)},0)<i.totalCountByTab[e]?R.length+1:R.length,[R,i.totalCountByTab,e]);return t.jsx(bx,{windowSize:w,"data-testid":D("transaction-categorization-list-wrapper"),children:t.jsx(Cx,{windowSize:w,"data-testid":D("transaction-categorization-list-container"),children:P==="Error"?t.jsxs(Sx,{windowSize:w,"data-testid":D("transaction-categorization-reload-page"),children:[t.jsx(kx,{onClick:()=>C(e,void 0,!0,null,!1,!0),"data-testid":D("transaction-categorization-reload-icon"),children:t.jsx(Vo,{})}),t.jsx(jx,{"data-testid":D("transaction-categorization-reload-label"),children:px.reloadPage.label})]}):P==="Completed"&&R.length===0?t.jsx(It,{tab:"transaction_categorization",title:W,subTitle:Z,"data-testid":D("transaction-categorization-empty-table-section")}):P==="Not-Started"||P==="In-Progress"&&R.length===0?t.jsx(dx,{sortConfig:{sortKey:A.sortKey,sortOrder:A.sortOrder},fetchState:P,onColumnSortConfigChanged:J,"data-testid":D("transaction-categorization-list-empty-table"),isTransactionActivityEnabled:c}):t.jsx(vx,{windowSize:w,"data-testid":D("transaction-categorization-list-view"),children:t.jsx(yr,{control:B,name:"selectedTransactionIds",defaultValue:[],render:({field:{value:z,ref:oe,onChange:Y}})=>t.jsx(xl.Provider,{value:{value:z,mode:"off",allCheckBoxValues:H,index:0,isQuickViewMode:k,sortKey:A.sortKey,sortOrder:A.sortOrder,fetchState:P,isDisabled:d,groupLabelCheckBox:ne,isTransactionActivityEnabled:c,onColumnSortConfigChanged:J,ref:oe,onChange:Y,selectedTab:e},children:t.jsx(qn,{children:({height:G,width:ke})=>t.jsx(nr,{isItemLoaded:te,itemCount:K,loadMoreItems:ce,children:({onItemsRendered:Ie,ref:E})=>t.jsx(Pi,{ref:de=>{E(de),O.current=de},height:G,itemCount:N,itemKey:de=>`${R[de]?.transactionId??""}-row-${de}`,innerElementType:xx,onItemsRendered:Ie,width:ke,style:{willChange:"auto"},overscanCount:Wg,itemSize:L,itemData:{checkboxes:_,value:z,allCheckBoxValues:H,groupLabelCheckBox:ne,categorizationGroupValue:ie,transactionLocalData:R,isQuickViewMode:k,mode:"always_on",setRowHeight:U,isItemLoaded:te,ref:E,onChange:Y,selectedCheckBoxTransactionIds:F,isTransactionActivityEnabled:c},initialScrollOffset:i.uiState.scrollPosition?.scrollTop,onScroll:({scrollOffset:de})=>{ge(de)},children:yx})})})})})})})})},xx=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}=fx(),S=Tt(),{children:$,style:v,...T}=e;return c==="Completed"?t.jsxs($x,{ref:x,style:{...v,width:"auto",maxWidth:"var(--side-panel-list-width, 100%)"},...T,children:[t.jsx(Ix,{children:t.jsx(Ro,{selectionLimit:Wn,value:l,checkBoxContainerStyle:{width:"auto",backgroundColor:S.colors.grey4},checkBox:{label:t.jsx(wx,{isQuickViewMode:i,children:t.jsx(dl,{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:I=>$r({event:I,value:l,allCheckBoxValues:r,groupLabelCheckBox:h,onChange:y}),ref:x})}),t.jsx(Tx,{children:$})]},`${r[d]}-${d}`):null},xl=s.createContext(void 0),fx=()=>{const e=s.useContext(xl);if(!e)throw new Error("useStickyContext must be used within a StickyProvider");return e},yx=({index:e,style:i,data:l})=>{const{selectedTransactionId:r}=zi(),{checkboxes:h,value:d,groupLabelCheckBox:a,categorizationGroupValue:c,allCheckBoxValues:u,transactionLocalData:m,isQuickViewMode:p,isItemLoaded:g,setRowHeight:x,ref:y,onChange:C,selectedCheckBoxTransactionIds:S,isTransactionActivityEnabled:$}=l,v=s.useRef(null),T=Ce();if(s.useEffect(()=>{v.current?.firstElementChild!=null&&x(e,v.current.firstElementChild.clientHeight)},[e,v,T,m[e]?.transactionReviewLocalData]),g(e)===!0){const I=h[e],w=r!=null&&r===c[e];return t.jsx(ya,{isPanelSelected:w,isQuickViewMode:p,style:{...i,paddingBottom:n.sp0,width:"100%",flex:"1"},ref:v,children:t.jsx(Ro,{selectionLimit:Wn,checkBox:p===!0?{...I,isException:!1}:I,value:d,groupLabelCheckBox:a,allCheckBoxValues:u,mode:p===!0||I.isDisabled==="readonly"||S.includes(I.value)===!1&&S.length>=Wn?"off":"always_on",draggable:!1,isDisabled:I.isDisabled,checkBoxStyle:p===!0?{display:"none"}:{padding:20},labelCheckBoxStyle:{padding:n.sp3},infoIconContainerStyle:p===!0?{display:"none"}:{padding:20},name:`${pn}.${d}`,ref:y,index:e,onChangeHandler:k=>$r({event:k,value:d,allCheckBoxValues:u,groupLabelCheckBox:a,onChange:C})})},c[e])}else return t.jsx(ya,{isQuickViewMode:p,style:{...i,paddingBottom:n.sp0,width:"100%",flex:"1"},ref:v,children:t.jsx(Ro,{checkBox:{label:t.jsx(pl,{isTransactionActivityEnabled:$}),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:()=>{}})},dr())},wx=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
|
-
`,bx=o.div`
|
|
1619
|
-
width: 100%;
|
|
1620
|
-
height: 100%;
|
|
1621
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
1622
|
-
`,Cx=o.div`
|
|
1623
|
-
height: 100%;
|
|
1624
|
-
`,vx=o.div`
|
|
1625
|
-
height: 100%;
|
|
1626
|
-
display: flex;
|
|
1627
|
-
flex-direction: column;
|
|
1628
|
-
max-width: 99.9%;
|
|
1629
|
-
`,Sx=o.div`
|
|
1630
|
-
display: flex;
|
|
1631
|
-
width: 100%;
|
|
1632
|
-
height: ${e=>`calc(100% - ${fr.valuePx(e.windowSize)})`};
|
|
1633
|
-
flex-direction: column;
|
|
1634
|
-
justify-content: center;
|
|
1635
|
-
align-items: center;
|
|
1636
|
-
`,kx=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
|
-
`,jx=o(st)`
|
|
1652
|
-
margin-top: ${n.sp3};
|
|
1653
|
-
color: ${e=>e.theme.colors.hero};
|
|
1654
|
-
`,ya=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&&le`
|
|
1662
|
-
.categorization-row-card {
|
|
1663
|
-
${Go(e.theme)}
|
|
1664
|
-
}
|
|
1665
|
-
`}
|
|
1666
|
-
`,$x=o.div`
|
|
1667
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
1668
|
-
`,Ix=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
|
-
`,Tx=o.div`
|
|
1679
|
-
position: relative;
|
|
1680
|
-
width: auto;
|
|
1681
|
-
height: 100%;
|
|
1682
|
-
`,Lx=({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:S,onFetchRecommendationsForEntityCategorization:$,onFetchRecommendationsForEntityCategorizationWithCustomer:v,setActivityLogTransactionId:T,onUploadTransactionReceipt:I})=>{const[w,k]=s.useState({transactionId:void 0,lineItemId:void 0}),j=s.useRef(),b=s.useRef({}),{useDynamicConfig:P}=hr(),{configValue:A}=P(pr.enableUncategorizedExpenseCategory),R=A?.uncategorized_expense_category_enabled===!0,F=(ee,H,_,ne)=>{const W={...b.current};W[H]==null&&(W[H]=[]);let Z=W[H].findIndex(ie=>ie.lineId===ee);if(Z===-1){const ie={lineId:ee,category:{recommendationTypesViewed:[]},class:{recommendationTypesViewed:[]},vendor:{recommendationTypesViewed:[]}};W[H].push(ie),Z=W[H].length-1}else{const ie=W[H][Z];W[H][Z]={...ie,category:{...ie.category,recommendationTypesViewed:[...ie.category.recommendationTypesViewed]},class:{...ie.class,recommendationTypesViewed:[...ie.class.recommendationTypesViewed]},vendor:{...ie.vendor,recommendationTypesViewed:[...ie.vendor.recommendationTypesViewed]}}}ne!=null&&ne!==""&&!W[H][Z][_].recommendationTypesViewed.includes(ne)&&W[H][Z][_].recommendationTypesViewed.push(ne),b.current=W},{transactions:V,transactionLocalData:q,accountsHierarchyList:M,classHierarchyList:O,accountList:re,classList:B,selectedCheckBoxTransactionIds:L,uncategorizedAccounts:U}=i,X=gn({mode:"all",reValidateMode:"onChange",defaultValues:s.useMemo(()=>ba(L,q,M,O,h.entityAutoCompleteView),[M,O,L,q,h.entityAutoCompleteView]),values:s.useMemo(()=>ba(L,q,M,O,h.entityAutoCompleteView),[M,O,L,q,h.entityAutoCompleteView]),resetOptions:{keepDefaultValues:!0,keepDirty:!1}});s.useEffect(()=>()=>{u("expenseAutomationPage")},[]),s.useEffect(()=>{L.length>0?u(oo):u("expenseAutomationPage")},[L,u]);const ce=X.handleSubmit(ee=>{const H=ee[Ri],_=b.current;C(e,H,_),H.forEach(ne=>{delete b.current[ne]})}),ge=async(ee,H)=>{if(ee!=null){if(ee===Ri){const _=X.getValues(Ri);if(_.length<L.length){S(e,_);return}if(_.length===Wn){S(e,_);return}const ne=_[_.length-1],W=H[pn].findIndex(ie=>ie.transactionId===ne),Z=X.getValues(`${pn}.${W}.lineInfo`);if(Z!=null){let ie=!1;if(Z.every(K=>(ie=_n(U,K[Pe].selectedOption,R?["income"]:void 0),!!K[Pe].selectedOption&&K[Pe].selectedOption!=null&&!ie&&!!K[ut].selectedOption&&!!K[jt].selectedOption))===!0){S(e,_);return}else{const K=_.filter(N=>N!==ne);S(e,K);return}}return}if(ee.includes(Pe)===!0||ee.includes(ut)===!0){const _=parseInt(ee.split(".")[1]),ne=parseInt(ee.split(".")[3]),W=X.getValues(`${pn}.${_}.lineInfo`),Z=W[ne];if(ee.includes(Pe)||ee.includes(ut)){const{transactionId:ie,lineId:K,recommendations:N}=Z;if(W!=null){const z=Z[Pe].selectedOption,oe=Z[ut].selectedOption,Y=Z[jt].selectedOption,G=Z[jt].selectedOption,ke=Z[jt].defaultOptions,Ie=ke?.find(fe=>fe.options?.find(Be=>Be.value===Y))?.options?.find(fe=>fe.value===Y)?.label,E=ke?.find(fe=>fe.options?.find(Be=>Be.value===G))?.options?.find(fe=>fe.value===G)?.label,de=h.entityAutoCompleteView.vendor.find(fe=>fe.qboId===Y),je=h.entityAutoCompleteView.customer.find(fe=>fe.qboId===G),Me=N.find(fe=>fe.vendor?.qboId===Y)?.vendor,De=Y||de?.qboId||Me?.qboId?{id:Y??de?.qboId??Me?.qboId??"",name:Ie??de?.name??Me?.name??"",logo:de?.logo??Me?.logo}:void 0,Fe=G||je?.qboId?{id:G??je?.qboId??"",name:E??je?.name??"",logo:je?.logo}:void 0,ve=re.find(fe=>fe.qboId===z),et=B.find(fe=>fe.classId===oe),ht=i.transactionLocalData.find(fe=>fe.transactionId===ie)?.transactionReviewLocalData.lineItemById[K].account,tt=i.transactionLocalData.find(fe=>fe.transactionId===ie)?.transactionReviewLocalData.lineItemById[K].class;m(e,ie,K,V,De?.id,Fe?.id,ee.includes(Pe)&&ve!=null?{...ve,isPreFilled:!1}:ht,ee.includes(ut)&&et!=null?{...et,isPreFilled:!1}:tt,void 0,N,R)}return}}if(ee.includes(jt)){const _=parseInt(ee.split(".")[1]),ne=parseInt(ee.split(".")[3]),W=X.getValues(`${pn}.${_}.lineInfo`);if(W!=null){const Z=W[ne],{transactionId:ie,recommendations:K}=Z,N=Z[jt].selectedOption,z=Z[jt].selectedOption,oe=Z[jt].defaultOptions,Y=oe?.flatMap(ve=>ve.options)?.find(ve=>ve.value===N)?.label,G=oe?.flatMap(ve=>ve.options)?.find(ve=>ve.value===z)?.label,ke=h.entityAutoCompleteView.vendor.find(ve=>ve.qboId===N),Ie=h.entityAutoCompleteView.customer.find(ve=>ve.qboId===z),E=K.find(ve=>ve.vendor?.qboId===N)?.vendor,de=N!==""&&N!=null?N:Y!==""&&Y!=null?Y:"",je=(ke?.qboId!=null&&ke.qboId!==""?ke.qboId:null)??(E?.qboId!=null&&E.qboId!==""?E.qboId:null)??(N!=null&&N!==""?N:null),Me={id:je??Y??"",name:Y??ke?.name??E?.name??"",logo:ke?.logo??E?.logo},De=Ie?.qboId!=null&&Ie.qboId!==""?{id:Ie.qboId??z??"",name:G??Ie.name??"",logo:Ie.logo}:void 0,Fe=V.find(ve=>ve.id===ie);if(Fe!=null){const ve=i.transactionLocalData.find(Be=>Be.transactionId===Fe.id)?.transactionReviewLocalData,et=ve?.lineItemById[Z.lineId],ht=rn(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:de,name:Y??de,type:"vendor",qboId:de,zeniId:de,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)??[]:[Z.lineId]};tt?.type==="customer"?v(Z.amount.amount,fe,!1,e,tt,De,R):$(Z.amount.amount,fe,!1,e,tt,Me,R)}}d.onCancelAutoComplete?.();return}}};s.useEffect(()=>{const ee=X.watch((H,{name:_})=>{_!=null&&H!=null&&Qn(()=>ge(_,H))});return()=>{ee.unsubscribe()}}),s.useEffect(()=>{if(h.entityAutoCompleteView.fetchState==="Completed"){const ee=i.transactionLocalData.find(H=>H.transactionId===w.transactionId);if(ee){const{transactionReviewLocalData:H}=ee,{selectedEntity:_}=H,ne=w?.lineItemId??H.sortedLineItems[0],W=H.lineItemById[ne],Z=W.selectedEntityLine;j.current?.(Uo(h.entityAutoCompleteView,_??Z,W?.recommendationsWithCOT??[]))}k({transactionId:void 0,lineItemId:void 0})}},[h.entityAutoCompleteView.fetchState]);const te=(ee,H)=>{d.onAutoCompleteInputChange?.(ee),j.current=H},J=s.useRef(null);return t.jsx(Rx,{ref:J,"data-testid":D("transaction-categorization-list-page"),children:t.jsx(xn,{...X,children:t.jsx("form",{id:wa(oo),onSubmit:ce,style:{height:"100%",width:"100%"},"data-testid":D(wa(oo)),children:t.jsx(gx,{isTransactionActivityEnabled:c,selectedTab:e,sectionId:r,transactionView:i,authParams:l,setCurrentTransactionInAction:k,onUpdateTransactionCategorizationUIState:g,onUpdateScrollYOffSetTransactionCategorizationUIState:x,onFetchTransactionCategorizationList:y,onTransactionCategorizationRowClick:p,vendorLoadOptions:te,vendorSearchAutoCompleteData:h,vendorSearchAutoCompleteActions:d,containerRef:J,isCOTEnabled:a,cotTracking:{onCOTView:F},isUncategorizedExpenseCategoryEnabled:R,setActivityLogTransactionId:T,onUploadTransactionReceipt:I})})})})},wa=e=>`${e}_form`,ba=(e,i,l,r,h)=>({[pn]:i.map(d=>Ax(d.transactionId,d.transactionReviewLocalData,l,r,h)),[Ri]:e}),Ax=(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{[ul]: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,[Pe]:{selectedOption:g,allOptions:jr(l,p.recommendationsWithCOT)},[ut]:{selectedOption:x,allOptions:kr(r,p.recommendationsWithCOT)},[jt]:{selectedOption:c?.id??y?.id??c?.name??y?.name,defaultOptions:Uo(h,c??y,i.lineItemById[m]?.recommendationsWithCOT??[])},[b1]:p.lineEntity,[C1]:p.recommendationsWithCOT??[]}}),transactionId:e,[v1]:i.vendorDetails!=null&&i.vendorDetails.id!=null?{id:i.vendorDetails.id,qboId:i.vendorDetails.qboId,name:i.vendorDetails.name}:void 0,[S1]:i.customerDetails!=null&&i.customerDetails.id!=null?{id:i.customerDetails.id,qboId:i.customerDetails.qboId,name:i.customerDetails.name}:void 0}},Rx=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
|
-
`,Ca={subSectionContainerLeftRightPadding:new Q(f[3],f[6],f[8])},Ex=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
|
-
`,Dx=o.div`
|
|
1699
|
-
display: flex;
|
|
1700
|
-
flex-direction: column;
|
|
1701
|
-
width: 100%;
|
|
1702
|
-
`,Mx=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:S,loggedInUser:$,isCOTEnabled:v,setCurrentFooterFormId:T,onFetchRecommendationsForEntityCategorization:I,onFetchRecommendationsForEntityCategorizationWithCustomer:w,onTransactionCategorizationRowClick:k,onFetchMissingReceiptsList:j,onMissingReceiptsRowClick:b,onUploadReceiptAttachment:P,onUploadReceiptComplete:A,onUploadReceiptFetchStatus:R,onReconTabColumnSortConfigChanged:F,onReloadReconciliationListPage:V,onUpdateReconcileTabLocalData:q,onUpdateMissingReceiptsUIState:M,onFetchTransactionCategorizationList:O,onUpdateTransactionCategorizationUIState:re,onUpdateScrollYOffSetTransactionCategorizationUIState:B,handleJeScheduleClick:L,ignoreRecommendedJeSchedule:U,onJESchedulesFormDataChange:X,onPostJESchedule:ce,setLocalDataForCategoryAndClass:ge,resetTransactionCategorizationLocalData:te,updateSelectedVendorForTransaction:J,onSaveUpdateTransactionCategorization:ee,onUpdateSelectedCheckboxTransactionIds:H,improveMonthEndInsightsUsingZeniGPTClick:_,onRemoveFileAttachment:ne,onUpdateFileAttachment:W,onCloseAllThreadsSection:Z,onEditMonthEndInsightsClick:ie,previewMonthEndReport:K,saveMonthEndReport:N,onOpenFileAttachmentSnackBar:z,onCloseFileAttachmentSnackBar:oe,onClickCustomerRequest:Y,sendMonthEndReport:G,markAsReview:ke,onReloadPage:Ie,updateOperatingExpensesIdsForReview:E,onFetchReimbursementView:de,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:fn,monthEndInsights:Qe,selectedTransactionCategorizationTab:yn,reconciliation:wn}=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(Lx,{setCurrentFooterFormId:T,selectedPeriod:fn,selectedTab:yn,sectionId:pn,transactionView:wt,authParams:c,isTransactionActivityEnabled:a,onUpdateTransactionCategorizationUIState:re,onUpdateScrollYOffSetTransactionCategorizationUIState:B,onFetchTransactionCategorizationList:O,onTransactionCategorizationRowClick:k,setLocalDataForCategoryAndClass:ge,resetTransactionCategorizationLocalData:te,updateSelectedVendorForTransaction:J,onSaveUpdateTransactionCategorization:ee,onUpdateSelectedCheckboxTransactionIds:H,vendorSearchAutoCompleteActions:p,vendorSearchAutoCompleteData:g,onFetchRecommendationsForEntityCategorization:I,onFetchRecommendationsForEntityCategorizationWithCustomer:w,isCOTEnabled:v,setActivityLogTransactionId:Ke,onUploadTransactionReceipt:e.onUploadTransactionReceipt});case"je_schedules":return t.jsx(Lm,{setIsJeAccountSettingsOpened:ve,expenseAutomationViewSelector:d,setResetJeAccountSettingsForm:h,currentFooterFormId:i,onJeAccountSettingsChange:l,onSaveJeAccountSettingsClick:r,setCurrentFooterFormId:T,handleJeScheduleClick:L,ignoreRecommendedJeSchedule:U,onJESchedulesFormDataChange:X,onPostJESchedule:ce,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(gg,{onUpdateMissingReceiptsUIState:M,onFetchMissingReceiptsList:j,missingReceipts:_e,receiptUploadEndpoint:u,authParams:c,selectedPeriod:fn,onMissingReceiptsRowClick:b,onUploadReceiptComplete:A,onUploadReceiptFetchStatus:R,onUploadReceiptAttachment:P});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(ql,{fetchState:"In-Progress"});{const bt={application:"cockpit",companyId:m,entityId:m,tab:"expense_automation",isGlobalComment:!1,entityType:"expense_automation.monthEndEmail",companyName:Qe.companyName,url:window.location.href},{url:Yt,...Zt}=bt,Xt={...Zt};return t.jsx(Dx,{children:t.jsx(Ug,{allThreadsSectionOpen:S,customerRequestData:C,companyId:m,enableZeniGPTFeature:x,filterMetaData:Xt,selectedPeriod:d.selectedPeriod,improveUsingZeniGPTClick:_,isZeniUser:$?.userEmail?.includes("zeni.ai")??!1,monthEndReportView:Qe,newThreadMetadata:bt,onClickCustomerRequest:Y,onCloseAllThreadsSection:Z,onCloseFileAttachmentSnackBar:oe,onOpenFileAttachmentSnackBar:z,onRemoveFileAttachment:ne,onUpdateFileAttachment:W,previewMode:y,previewMonthEndReport:K,saveMonthEndReport:N,onEditClick:ie,sendMonthEndReport:G})})}}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(sm,{fluxAnalysis:d.fluxAnalysis,selectedPeriod:d.selectedPeriod,markAsReview:ke,onReloadPage:Ie,updateOperatingExpensesIdsForReview:E,updateSectionIdsForReview:je,onUpdateFluxAnalysisUIState:Me,setCurrentFooterFormId:T,fetchFluxViewOnScroll:De,onFetchFluxViewList:Fe,onFetchReimbursementView:de,redirectToVendorDetailPage:$e});case"reconciliation":return t.jsx(Np,{onReloadReconciliationListPage:V,currentFooterFormId:i,reconciliation:wn,companyId:m,vendorSearchAutoCompleteActions:p,vendorSearchAutoCompleteData:g,onReviewClicked:et,setOpenDrawerClicked:ht,setCurrentFooterFormId:T,onReconTabColumnSortConfigChanged:F,onUpdateReconcileTabLocalData:q,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 fl(e){const i=Ce(),{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(Ex,{windowSize:i,style:{...h===!0?{paddingLeft:Ca.subSectionContainerLeftRightPadding.value(i),paddingRight:Ca.subSectionContainerLeftRightPadding.value(i)}:{paddingLeft:f[0],paddingRight:f[0]},...r===!0||l==="reconciliation"?{paddingLeft:f[0],paddingRight:f[0]}:{}},children:t.jsx(Mx,{...e})})}const Ox=70,yl=50,zx=3,Px=["receipts"],va=e=>Jo(e,Px),{common:{texts:{vendor:Fx,amount:Bx,receipts:_x,category:Vx,classText:Nx,date:Ux}}}=me.getLocalizedStrings(),wl={key:"vendor",value:Fx,sortOrder:"ascending",width:new Q(18,18)},Wx={key:"category",value:Vx,sortOrder:"ascending",width:new Q(18,18)},Hx={key:"class",value:Nx,sortOrder:"ascending",width:new Q(18,18)},qx={key:"date",value:Ux,sortOrder:"descending",width:new Q(11,11)},Kx={key:"receipts",value:_x,sortOrder:"descending",width:new Q(6,6)},bl={key:"amount",value:Bx,sortOrder:"ascending",width:new Q(10,10)},rs=[wl,Wx,Hx,qx,Kx,bl],ls=[{...wl,width:new Q(65,65)},{...bl,width:new Q(30,30)}],po={sortKey:"date",sortOrder:"descending"},Cl=({sortConfig:e,isDisabled:i,onColumnSortConfigChanged:l})=>{const r=Ce(),h=Xe(),d=h?ls:rs,[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=>{va(p.key)==null&&u(gd(p.key),p.sortOrder)};return t.jsx(Jx,{windowSize:r,isQuickViewMode:h,children:a.map((p,g)=>{const x=i!=null||va(p.key)!=null;return t.jsxs(Qx,{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(ef,{onClick:()=>x?null:m(p),isSortDisabled:x,children:[t.jsx(tf,{children:p.value}),x?null:t.jsx(Yx,{sortConfig:e,headerData:p,children:t.jsx(Xx,{})})]}),x?null:t.jsx(Zx,{isSortDisabled:x,sortDataValue:e.sortKey,isVisible:e.sortKey===p.key&&e.sortKey!==po.sortKey,children:t.jsx(Gx,{onClick:()=>{x||u(po.sortKey,po.sortOrder)},"data-testid":D("completed-tab-header-close-icon",p.key)})})]},p.key)})})},Jx=o.div`
|
|
1703
|
-
top: ${n.sp0};
|
|
1704
|
-
left: ${n.sp0};
|
|
1705
|
-
height: ${yl}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?le`
|
|
1716
|
-
width: 32%;
|
|
1717
|
-
max-width: var(--side-panel-list-width, 100%);
|
|
1718
|
-
`:le`
|
|
1719
|
-
padding: ${n.sp0} ${n.sp3};
|
|
1720
|
-
`}
|
|
1721
|
-
`,Qx=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?le`
|
|
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
|
-
`:le`
|
|
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
|
-
`,Gx=o(ei)`
|
|
1752
|
-
width: ${n.sp2};
|
|
1753
|
-
height: ${n.sp2};
|
|
1754
|
-
cursor: pointer;
|
|
1755
|
-
`,Yx=o.div`
|
|
1756
|
-
display: flex;
|
|
1757
|
-
align-items: center;
|
|
1758
|
-
transform: ${e=>e.headerData.sortOrder==="descending"?"rotate(180deg)":"rotate(0deg)"};
|
|
1759
|
-
`,Zx=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
|
-
`,Xx=o(Xn)`
|
|
1767
|
-
width: ${n.sp2};
|
|
1768
|
-
height: ${n.sp2};
|
|
1769
|
-
`,ef=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
|
-
`,tf=o(Ze)`
|
|
1777
|
-
display: flex;
|
|
1778
|
-
`,{dateFormat:nf,common:{strings:{underscore:vl,hyphen:jn,empty:Sa}}}=me.getLocalizedStrings(),vi={containerPaddingLeftRight:new Q(f[3],f[4])},of=({transaction:e,authParams:i,transactionAttachmentsEndpoint:l,onMissingReceiptsRowClick:r})=>{const h=Ce(),d=Xe(),a=d?ls:rs,[c,u]=s.useState(!1),[m,p]=s.useState([]),[g,x]=s.useState(null),y=e.attachments?.filter(w=>w.contentType!=null&&Cc.includes(w.contentType))??[],[C,S]=s.useState(y[0]),$=e.attachments!=null&&e.attachments.length>0,v=e.date?.format?.(nf.visual.MMMDCommaYYYYformat)??jn,T=()=>{u(!0),S(y[0]);const w=y.map(k=>k.id);Cr(l,i,{transaction_key:{transaction_id:e.id,transaction_type:e.type},attachment_ids:w}).then(k=>{p(k),k.length>0&&x(k[0])})},I=()=>{u(!1),x(null),p([]),y.length>0&&S(y[0])};return t.jsxs(Sl,{windowSize:h,isQuickViewMode:d,onClick:()=>r(e.id,e.type),"data-testid":D("completed-tab-list-row",e.id),children:[a.map((w,k)=>{const j=`${e.id}${vl}${w.key}`;switch(w.key){case"vendor":default:return t.jsx(hn,{windowSize:h,wrapperWidth:w.width,isQuickViewMode:d,children:t.jsx(Ln,{windowSize:h,isLastItem:k===a.length-1,children:t.jsxs(Ei,{children:[t.jsx(Yn,{photoUrl:e.vendorId!=null?e.logo?.toString()??Sa:Sa,styles:{width:n.sp4,height:n.sp4,borderRadius:n.sp0},placeholder:{width:f[4],height:f[4]},fallbackAvatar:t.jsx(rf,{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,P=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:P;return t.jsx(hn,{windowSize:h,wrapperWidth:w.width,isQuickViewMode:d,children:t.jsx(Ln,{windowSize:h,isLastItem:k===a.length-1,children:t.jsx(Ei,{children:A!==jn?t.jsx(qe,{text:A,itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"}}):t.jsx(af,{children:A})})})},j)}case"date":return t.jsx(hn,{windowSize:h,wrapperWidth:w.width,isQuickViewMode:d,children:t.jsx(Ln,{windowSize:h,isLastItem:k===a.length-1,children:t.jsx(Ei,{children:t.jsx(qe,{text:v,itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"}})})})},j);case"receipts":return t.jsx(hn,{windowSize:h,wrapperWidth:w.width,isQuickViewMode:d,style:{justifyContent:"center"},children:$?t.jsx(lf,{onClick:b=>{b.stopPropagation(),T()}}):null},j);case"amount":{const b=it("0,0.[00]",e.amount);return t.jsx(hn,{windowSize:h,wrapperWidth:w.width,isQuickViewMode:d,children:t.jsx(Ln,{windowSize:h,isLastItem:k===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?Mi.createPortal(t.jsx(mr,{allFiles:m,fileSource:g,file:C,title:C.fileName,attachments:y,setFileSource:x,setShowFullScreenView:u,onCrossClick:I,setSelectedFileAttachment:S,handleTouchStart:()=>{},handleTouchMove:()=>{},handleTouchEnd:()=>{}}),document.body):null]})},sf=()=>{const e=Ce(),i=Xe(),l=i?ls:rs,r=s.useRef(null),[h,d]=s.useState(0);return s.useLayoutEffect(()=>{r.current&&d(r.current.offsetWidth)},[e]),t.jsx(Sl,{windowSize:e,isQuickViewMode:i,ref:r,children:l.map((a,c)=>{const u=`${c}${vl}${a.key}`;switch(a.key){case"vendor":return t.jsx(hn,{windowSize:e,wrapperWidth:a.width,isQuickViewMode:i,children:t.jsx(Ln,{windowSize:e,isLastItem:c===l.length-1,children:t.jsxs(Ei,{children:[t.jsx(Zn,{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(hn,{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)}})})},Sl=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?le`
|
|
1796
|
-
flex: 1;
|
|
1797
|
-
padding-left: ${vi.containerPaddingLeftRight.valuePx(e.windowSize)};
|
|
1798
|
-
padding-right: ${vi.containerPaddingLeftRight.valuePx(e.windowSize)};
|
|
1799
|
-
width: 95%;
|
|
1800
|
-
`:le`
|
|
1801
|
-
min-width: min-content;
|
|
1802
|
-
padding-left: ${vi.containerPaddingLeftRight.valuePx(e.windowSize)};
|
|
1803
|
-
padding-right: ${vi.containerPaddingLeftRight.valuePx(e.windowSize)};
|
|
1804
|
-
`}
|
|
1805
|
-
`,hn=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?le`
|
|
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
|
-
`:le`
|
|
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
|
-
`,Ei=o.div`
|
|
1832
|
-
display: flex;
|
|
1833
|
-
flex-direction: row;
|
|
1834
|
-
column-gap: ${n.sp2};
|
|
1835
|
-
align-items: center;
|
|
1836
|
-
`,af=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
|
-
`,rf=o.div`
|
|
1846
|
-
display: flex;
|
|
1847
|
-
`,lf=o(br)`
|
|
1848
|
-
width: 16px;
|
|
1849
|
-
height: 16px;
|
|
1850
|
-
color: inherit;
|
|
1851
|
-
`,cf=({sortConfig:e,fetchState:i,isDisabled:l,onColumnSortConfigChanged:r})=>{const h=Ce(),d=Xe();return t.jsxs(df,{windowSize:h,children:[t.jsx(uf,{isQuickViewMode:d,children:t.jsx(Cl,{sortConfig:e,isDisabled:i.fetchState==="In-Progress"?"readonly":l,onColumnSortConfigChanged:r})}),t.jsx(hf,{windowSize:h,children:[...Array(3)].map((a,c)=>t.jsx(sf,{},c))})]})},df=o.div`
|
|
1852
|
-
display: block;
|
|
1853
|
-
min-height: 100%;
|
|
1854
|
-
flex-direction: column;
|
|
1855
|
-
width: 100%;
|
|
1856
|
-
`,uf=o.div`
|
|
1857
|
-
flex: 1;
|
|
1858
|
-
width: auto;
|
|
1859
|
-
padding-left: ${({isQuickViewMode:e})=>e===!0?n.sp8:n.sp0};
|
|
1860
|
-
`,hf=o.div`
|
|
1861
|
-
display: flex;
|
|
1862
|
-
min-height: 100%;
|
|
1863
|
-
flex-direction: column;
|
|
1864
|
-
row-gap: ${n.sp3};
|
|
1865
|
-
`,pf=({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=Ce(),y=Xe(),C=s.useRef(null),S=(j,b)=>{p?.(j,b)},$=s.useCallback(j=>j<c.length,[c.length]),v=s.useCallback(()=>{l!=null&&i.fetchState!=="In-Progress"&&u(l)},[l,i.fetchState,u]),T=s.useMemo(()=>d,[d]),I=s.useMemo(()=>c.length<d?c.length+1:c.length,[c.length,d]),w=i.fetchState==="Completed"&&c.length===0,k=i.fetchState==="Not-Started"||i.fetchState==="In-Progress"&&c.length===0;return t.jsx(gf,{children:t.jsx(xf,{windowSize:x,children:w?t.jsx(It,{tab:"missing_receipts",title:He("missing_receipts").allDoneText.title,subTitle:He("missing_receipts").allDoneText.subTitle}):k?t.jsx(cf,{sortConfig:{sortKey:r??"date",sortOrder:h},fetchState:i,onColumnSortConfigChanged:S}):t.jsx(ff,{windowSize:x,children:t.jsx(qn,{children:({height:j,width:b})=>t.jsxs(wf,{style:{height:j,width:b},children:[t.jsx(yf,{isQuickViewMode:y,children:t.jsx(Cl,{sortConfig:{sortKey:r??"date",sortOrder:h},isDisabled:i.fetchState==="In-Progress"?"readonly":void 0,onColumnSortConfigChanged:S})}),t.jsx(nr,{isItemLoaded:$,itemCount:T,loadMoreItems:v,children:({onItemsRendered:P,ref:A})=>t.jsx(Hl,{ref:R=>{A(R),C.current=R},height:j-yl,innerElementType:kl,itemCount:I,itemSize:Ox,width:b,style:{willChange:"auto"},overscanCount:zx,onItemsRendered:P,itemKey:R=>c[R]?.id??`loading-${R}`,itemData:{transactions:c,isItemLoaded:$,authParams:e,isQuickViewMode:y,transactionAttachmentsEndpoint:a,onMissingReceiptsRowClick:m},children:mf})})]})})})})})},mf=({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(ka,{isQuickViewMode:a,style:{...i,width:"100%"},children:t.jsx(bf,{})});const m=r[e];return t.jsx(ka,{isQuickViewMode:a,style:{...i,width:"100%"},children:t.jsx(of,{transaction:m,authParams:d,transactionAttachmentsEndpoint:c,onMissingReceiptsRowClick:u},m.id)})},gf=o.div`
|
|
1866
|
-
display: flex;
|
|
1867
|
-
flex-direction: column;
|
|
1868
|
-
flex: 1;
|
|
1869
|
-
overflow: hidden;
|
|
1870
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
1871
|
-
`,xf=o.div`
|
|
1872
|
-
flex: 1;
|
|
1873
|
-
display: flex;
|
|
1874
|
-
flex-direction: column;
|
|
1875
|
-
overflow: hidden;
|
|
1876
|
-
`,ff=o.div`
|
|
1877
|
-
height: 100%;
|
|
1878
|
-
display: flex;
|
|
1879
|
-
flex-direction: column;
|
|
1880
|
-
max-width: 99.9%;
|
|
1881
|
-
`,yf=o.div`
|
|
1882
|
-
flex: 1;
|
|
1883
|
-
width: auto;
|
|
1884
|
-
`,wf=o.div`
|
|
1885
|
-
position: relative;
|
|
1886
|
-
`,ka=o.div`
|
|
1887
|
-
top: ${n.sp0};
|
|
1888
|
-
left: ${n.sp0};
|
|
1889
|
-
padding-bottom: ${n.sp3};
|
|
1890
|
-
box-sizing: border-box;
|
|
1891
|
-
`,kl=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})});kl.displayName="Completed tab inner element type";const bf=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 jl(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 Fo=5,Cf=`calc(
|
|
1913
|
-
${Fo} * (${n.sp4} + 2 * ${n.sp3}) +
|
|
1914
|
-
(${Fo} - 1) * ${n.sp3}
|
|
1915
|
-
)`,cs=o.div`
|
|
1916
|
-
display: flex;
|
|
1917
|
-
flex-direction: column;
|
|
1918
|
-
gap: ${n.sp3};
|
|
1919
|
-
min-height: 0;
|
|
1920
|
-
max-height: ${Cf};
|
|
1921
|
-
overflow-y: auto;
|
|
1922
|
-
overflow-x: hidden;
|
|
1923
|
-
overscroll-behavior: contain;
|
|
1924
|
-
scrollbar-width: thin;
|
|
1925
|
-
scrollbar-color: ${e=>e.theme.colors.grey1} transparent;
|
|
1926
|
-
width: 100%;
|
|
1927
|
-
`,mo=[new Q(50,50),new Q(25,25),new Q(25,25)],$l=()=>t.jsx(Tf,{children:t.jsx(ot,{width:"100%",height:f[3],style:{borderRadius:n.sp1,height:f[4],display:"block"}})}),vf=()=>{const e=Ce(),i=s.useRef(null),[l,r]=s.useState(0);return s.useLayoutEffect(()=>{i.current&&r(i.current.offsetWidth)},[e]),t.jsx(Lf,{children:t.jsxs(Af,{ref:i,children:[t.jsx(Rf,{children:t.jsxs(Ef,{children:[t.jsx(Zn,{width:f[4],height:f[4]}),t.jsx(ot,{width:l>0?l*mo[0].value(e)/100:"100%",height:f[4],style:{display:"flex",alignItems:"center"}})]})}),t.jsx(Df,{children:t.jsx(ot,{width:l>0?l*mo[1].value(e)/100:"100%",height:f[4],style:{display:"flex",alignItems:"center"}})}),t.jsx(Mf,{children:t.jsx(ot,{width:l>0?l*mo[2].value(e)/100:"100%",height:f[4],style:{display:"flex",alignItems:"center"}})})]})})},Il=({rowCount:e=Fo})=>t.jsx(cs,{"aria-hidden":!0,children:Array.from({length:e},(i,l)=>t.jsx(vf,{},l))}),Sf=()=>t.jsxs(jf,{children:[t.jsx($f,{children:t.jsx(ot,{width:200,height:31,style:{display:"block",borderRadius:n.sp1}})}),t.jsx($l,{}),t.jsx(Il,{rowCount:2})]}),kf=()=>t.jsxs(If,{children:[t.jsx($l,{}),t.jsx(Il,{rowCount:1})]}),jf=o.div`
|
|
1928
|
-
display: flex;
|
|
1929
|
-
flex-direction: column;
|
|
1930
|
-
gap: ${n.sp3};
|
|
1931
|
-
min-width: 0;
|
|
1932
|
-
align-items: start;
|
|
1933
|
-
margin-top: ${n.sp6};
|
|
1934
|
-
`;o.div`
|
|
1935
|
-
display: flex;
|
|
1936
|
-
flex-direction: column;
|
|
1937
|
-
gap: ${n.sp2};
|
|
1938
|
-
min-width: 0;
|
|
1939
|
-
`;const $f=o.div``;o.div`
|
|
1940
|
-
display: flex;
|
|
1941
|
-
align-items: center;
|
|
1942
|
-
flex: 1;
|
|
1943
|
-
min-width: 0;
|
|
1944
|
-
height: ${n.sp6};
|
|
1945
|
-
padding: ${n.sp2} 12px;
|
|
1946
|
-
border-radius: ${n.sp2};
|
|
1947
|
-
box-sizing: border-box;
|
|
1948
|
-
background-color: ${e=>e.theme.colors.background};
|
|
1949
|
-
`;const If=o.div`
|
|
1950
|
-
display: flex;
|
|
1951
|
-
flex-direction: column;
|
|
1952
|
-
gap: ${n.sp2};
|
|
1953
|
-
margin-top: ${n.sp1};
|
|
1954
|
-
`,Tf=o.div`
|
|
1955
|
-
width: 100%;
|
|
1956
|
-
box-sizing: border-box;
|
|
1957
|
-
`,Lf=o.div`
|
|
1958
|
-
display: flex;
|
|
1959
|
-
align-items: center;
|
|
1960
|
-
gap: ${n.sp3};
|
|
1961
|
-
`,Af=o.div`
|
|
1962
|
-
display: flex;
|
|
1963
|
-
align-items: center;
|
|
1964
|
-
flex: 1;
|
|
1965
|
-
min-width: 0;
|
|
1966
|
-
padding: ${n.sp3} ${n.sp3};
|
|
1967
|
-
background-color: ${e=>e.theme.colors.grey5};
|
|
1968
|
-
border: 1px solid ${e=>e.theme.colors.grey3};
|
|
1969
|
-
border-radius: ${n.sp2};
|
|
1970
|
-
box-shadow: ${e=>e.theme.colors.elevation1};
|
|
1971
|
-
`,Rf=o.div`
|
|
1972
|
-
flex: 2;
|
|
1973
|
-
display: flex;
|
|
1974
|
-
align-items: center;
|
|
1975
|
-
gap: ${n.sp1};
|
|
1976
|
-
min-width: 0;
|
|
1977
|
-
`,Ef=o.div`
|
|
1978
|
-
display: flex;
|
|
1979
|
-
flex-direction: row;
|
|
1980
|
-
column-gap: ${n.sp2};
|
|
1981
|
-
align-items: center;
|
|
1982
|
-
min-width: 0;
|
|
1983
|
-
flex: 1;
|
|
1984
|
-
`,Df=o.div`
|
|
1985
|
-
flex: 1;
|
|
1986
|
-
min-width: 0;
|
|
1987
|
-
padding: ${n.sp0} ${n.sp5};
|
|
1988
|
-
`,Mf=o.div`
|
|
1989
|
-
flex: 1;
|
|
1990
|
-
min-width: 0;
|
|
1991
|
-
padding: ${n.sp0} ${n.sp5};
|
|
1992
|
-
text-align: right;
|
|
1993
|
-
`,Of="0,0.[00]";function Tl(){return me.getLocalizedStrings().dateFormat.visual.MMMDCommaYYYYformat}function zf(e){return e.format(Tl())}function Ll(e){if(e==null||String(e).trim()==="")return"";const i=String(e).trim(),l=Tl(),r=Di(i);return r!=null&&typeof r.isValid=="function"&&r.isValid()?r.format(l):i}function Pf(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 Al(e,i){return Ko(Of,e,Pf(i))}const{common:{texts:{vendor:Ff,amount:Bf,date:_f}},uncategorizedTransactionList:{missingReceipt:{bulkUpload:go}}}=me.getLocalizedStrings(),Vf=({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),S=s.useRef(!1),$=s.useCallback(w=>{const[k]=w;i!==!0&&k.isIntersecting&&h!=null&&l!==!0&&r!==!0&&p!=null&&p()},[i,l,r,h,p]);s.useEffect(()=>{const w=y.current,k=C.current;if(w==null||k==null||h==null||p==null)return;const j=new IntersectionObserver($,{root:w,rootMargin:"120px"});return j.observe(k),()=>j.disconnect()},[$,h,p,d?.length]),s.useEffect(()=>{const w=y.current,k=C.current;if(w==null||k==null||h==null||p==null){S.current=l===!0;return}const j=S.current===!0&&l!==!0;if(S.current=l===!0,!j)return;const b=w.getBoundingClientRect(),P=k.getBoundingClientRect();P.top<b.bottom&&P.bottom>b.top&&P.left<b.right&&P.right>b.left&&requestAnimationFrame(()=>{p()})},[l,h,p,d?.length]);const v=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 k=w.target.value;x(k);const j=k.trim();j.length>=2?u(j):u("")},[i,u]),I=s.useCallback(()=>{i||(x(""),c(),u(""))},[i,c,u]);return t.jsxs(Nf,{hasCandidates:e,$interactionLocked:i,children:[t.jsx(Uf,{children:t.jsx(Kn,{children:e?go.orSearchManually:go.searchManually})}),t.jsxs(Wf,{children:[t.jsx(Hf,{}),t.jsx(qf,{type:"text",placeholder:go.searchByVendorDateAmount,value:g,onChange:T,onKeyDown:v,disabled:i,"data-testid":D("manual-search-input")}),g.length>0?t.jsx(Kf,{type:"button",disabled:i,onClick:I,children:t.jsx(Jf,{})}):null]}),d!=null&&d.length>0?t.jsxs(Qf,{children:[t.jsxs(Gf,{children:[t.jsx(xo,{style:{flex:2},children:t.jsx(Ze,{children:Ff})}),t.jsx(xo,{children:t.jsx(Ze,{children:_f})}),t.jsx(xo,{style:{textAlign:"right"},children:t.jsx(Ze,{children:Bf})})]}),t.jsxs(cs,{ref:y,children:[d.map(w=>t.jsxs(Yf,{onClick:()=>{i||m(w.transactionId,w.transactionType)},"data-testid":D("search-result",w.transactionId),children:[t.jsx(Xf,{children:t.jsx(e0,{type:"radio",name:"manual-search-result",checked:a===w.transactionId,disabled:i,onChange:()=>{i||m(w.transactionId,w.transactionType)}})}),t.jsxs(Zf,{isSelected:a===w.transactionId,children:[t.jsxs(t0,{children:[t.jsx(Yn,{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(n0,{children:t.jsx(st,{children:Ll(w.transactionDate)})}),t.jsx(i0,{children:t.jsx(st,{children:Al(w.amount,w.currencyCode)})})]})]},w.transactionId)),h!=null?t.jsx(o0,{ref:C,"aria-hidden":!0}):null]})]}):r===!0?t.jsx(kf,{}):null]})},Nf=o.div`
|
|
1994
|
-
display: flex;
|
|
1995
|
-
flex-direction: column;
|
|
1996
|
-
gap: ${n.sp2};
|
|
1997
|
-
padding-top: ${e=>e.hasCandidates?n.sp4:n.sp0};
|
|
1998
|
-
pointer-events: ${e=>e.$interactionLocked?"none":"auto"};
|
|
1999
|
-
opacity: ${e=>e.$interactionLocked?.65:1};
|
|
2000
|
-
`,Uf=o.div``,Wf=o.div`
|
|
2001
|
-
display: flex;
|
|
2002
|
-
align-items: center;
|
|
2003
|
-
gap: ${n.sp1};
|
|
2004
|
-
height: ${n.sp6};
|
|
2005
|
-
padding: ${n.sp2} 12px;
|
|
2006
|
-
border-radius: ${n.sp2};
|
|
2007
|
-
background-color: ${e=>e.theme.colors.background};
|
|
2008
|
-
box-sizing: border-box;
|
|
2009
|
-
`,Hf=o(Dc)`
|
|
2010
|
-
width: ${n.sp3};
|
|
2011
|
-
height: ${n.sp3};
|
|
2012
|
-
color: ${e=>e.theme.colors.hero};
|
|
2013
|
-
flex-shrink: 0;
|
|
2014
|
-
`,qf=o(Mc)`
|
|
2015
|
-
flex: 1;
|
|
2016
|
-
border: none;
|
|
2017
|
-
outline: none;
|
|
2018
|
-
color: ${e=>e.theme.colors.grey1};
|
|
2019
|
-
background-color: transparent;
|
|
2020
|
-
`,Kf=o.button`
|
|
2021
|
-
display: flex;
|
|
2022
|
-
align-items: center;
|
|
2023
|
-
justify-content: center;
|
|
2024
|
-
background: none;
|
|
2025
|
-
border: none;
|
|
2026
|
-
cursor: pointer;
|
|
2027
|
-
padding: 0;
|
|
2028
|
-
flex-shrink: 0;
|
|
2029
|
-
`,Jf=o(Wo)`
|
|
2030
|
-
width: ${n.sp3};
|
|
2031
|
-
height: ${n.sp3};
|
|
2032
|
-
color: ${e=>e.theme.colors.hero};
|
|
2033
|
-
|
|
2034
|
-
&:hover {
|
|
2035
|
-
color: ${e=>e.theme.colors.primary};
|
|
2036
|
-
}
|
|
2037
|
-
`,Qf=o.div`
|
|
2038
|
-
display: flex;
|
|
2039
|
-
flex-direction: column;
|
|
2040
|
-
gap: ${n.sp3};
|
|
2041
|
-
margin-top: ${n.sp2};
|
|
2042
|
-
margin-left: -${n.sp5};
|
|
2043
|
-
`,Gf=o.div`
|
|
2044
|
-
display: flex;
|
|
2045
|
-
align-items: center;
|
|
2046
|
-
padding: ${n.sp0} ${n.sp3};
|
|
2047
|
-
margin-left: ${n.sp5};
|
|
2048
|
-
`,xo=o.div`
|
|
2049
|
-
flex: 1;
|
|
2050
|
-
color: ${e=>e.theme.colors.hero};
|
|
2051
|
-
`,Yf=o.div`
|
|
2052
|
-
display: flex;
|
|
2053
|
-
align-items: center;
|
|
2054
|
-
gap: ${n.sp2};
|
|
2055
|
-
cursor: pointer;
|
|
2056
|
-
`,Zf=o.div`
|
|
2057
|
-
display: flex;
|
|
2058
|
-
align-items: center;
|
|
2059
|
-
flex: 1;
|
|
2060
|
-
padding: ${n.sp3} ${n.sp3};
|
|
2061
|
-
background-color: ${e=>e.theme.colors.grey5};
|
|
2062
|
-
border: 1px solid
|
|
2063
|
-
${e=>e.isSelected?e.theme.colors.primary:e.theme.colors.grey3};
|
|
2064
|
-
border-radius: ${n.sp2};
|
|
2065
|
-
box-shadow: ${e=>e.theme.colors.elevation1};
|
|
2066
|
-
transition: border-color 0.15s ease;
|
|
2067
|
-
|
|
2068
|
-
&:hover {
|
|
2069
|
-
border-color: ${e=>e.theme.colors.primary};
|
|
2070
|
-
}
|
|
2071
|
-
`,Xf=o.div`
|
|
2072
|
-
flex-shrink: 0;
|
|
2073
|
-
display: flex;
|
|
2074
|
-
align-items: center;
|
|
2075
|
-
`,e0=o.input`
|
|
2076
|
-
accent-color: ${e=>e.theme.colors.primary};
|
|
2077
|
-
width: ${n.sp3};
|
|
2078
|
-
height: ${n.sp3};
|
|
2079
|
-
cursor: pointer;
|
|
2080
|
-
`,t0=o.div`
|
|
2081
|
-
flex: 2;
|
|
2082
|
-
display: flex;
|
|
2083
|
-
align-items: center;
|
|
2084
|
-
gap: ${n.sp1};
|
|
2085
|
-
`,n0=o.div`
|
|
2086
|
-
flex: 1;
|
|
2087
|
-
color: ${e=>e.theme.colors.hero};
|
|
2088
|
-
`,i0=o.div`
|
|
2089
|
-
flex: 1;
|
|
2090
|
-
text-align: right;
|
|
2091
|
-
`,o0=o.div`
|
|
2092
|
-
height: 1px;
|
|
2093
|
-
width: 100%;
|
|
2094
|
-
flex-shrink: 0;
|
|
2095
|
-
`,{common:{texts:{vendor:s0,amount:a0,date:r0}},uncategorizedTransactionList:{missingReceipt:{bulkUpload:ja}}}=me.getLocalizedStrings(),l0=({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?ja.possibleMatch:ja.possibleMatches.replace("__count__",i.length.toString());return t.jsxs(c0,{$interactionLocked:r,children:[t.jsx(d0,{children:t.jsx(Kn,{children:a})}),t.jsxs(u0,{children:[t.jsx(fo,{style:{flex:2},children:t.jsx(Ze,{children:s0})}),t.jsx(fo,{children:t.jsx(Ze,{children:r0})}),t.jsx(fo,{style:{textAlign:"right"},children:t.jsx(Ze,{children:a0})})]}),t.jsx(cs,{children:d.map(c=>t.jsxs(h0,{onClick:()=>h(c.transactionId,c.transactionType),"data-testid":D("candidate-row",c.transactionId),children:[t.jsx(m0,{children:t.jsx(g0,{type:"radio",name:`match-${e}`,checked:l===c.transactionId,onChange:()=>h(c.transactionId,c.transactionType)})}),t.jsxs(p0,{isSelected:l===c.transactionId,children:[t.jsxs(x0,{children:[t.jsx(Yn,{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(f0,{children:t.jsx(st,{children:Ll(c.transactionDate)})}),t.jsx(y0,{children:t.jsx(st,{children:Al(c.amount,c.currencyCode)})})]})]},c.transactionId))})]})},c0=o.div`
|
|
2096
|
-
display: flex;
|
|
2097
|
-
flex-direction: column;
|
|
2098
|
-
gap: ${n.sp3};
|
|
2099
|
-
pointer-events: ${e=>e.$interactionLocked?"none":"auto"};
|
|
2100
|
-
opacity: ${e=>e.$interactionLocked?.65:1};
|
|
2101
|
-
`,d0=o.div``,u0=o.div`
|
|
2102
|
-
display: flex;
|
|
2103
|
-
align-items: center;
|
|
2104
|
-
padding: ${n.sp0} ${n.sp3};
|
|
2105
|
-
`,fo=o.div`
|
|
2106
|
-
flex: 1;
|
|
2107
|
-
color: ${e=>e.theme.colors.hero};
|
|
2108
|
-
`,h0=o.div`
|
|
2109
|
-
display: flex;
|
|
2110
|
-
align-items: center;
|
|
2111
|
-
gap: ${n.sp2};
|
|
2112
|
-
cursor: pointer;
|
|
2113
|
-
`,p0=o.div`
|
|
2114
|
-
display: flex;
|
|
2115
|
-
align-items: center;
|
|
2116
|
-
flex: 1;
|
|
2117
|
-
padding: ${n.sp3} ${n.sp3};
|
|
2118
|
-
background-color: ${e=>e.theme.colors.grey5};
|
|
2119
|
-
border: 1px solid
|
|
2120
|
-
${e=>e.isSelected?e.theme.colors.primary:e.theme.colors.grey3};
|
|
2121
|
-
border-radius: ${n.sp2};
|
|
2122
|
-
box-shadow: ${e=>e.theme.colors.elevation1};
|
|
2123
|
-
transition: border-color 0.15s ease;
|
|
2124
|
-
|
|
2125
|
-
&:hover {
|
|
2126
|
-
border-color: ${e=>e.theme.colors.primary};
|
|
2127
|
-
}
|
|
2128
|
-
`,m0=o.div`
|
|
2129
|
-
flex-shrink: 0;
|
|
2130
|
-
display: flex;
|
|
2131
|
-
align-items: center;
|
|
2132
|
-
`,g0=o.input`
|
|
2133
|
-
accent-color: ${e=>e.theme.colors.primary};
|
|
2134
|
-
width: ${n.sp3};
|
|
2135
|
-
height: ${n.sp3};
|
|
2136
|
-
cursor: pointer;
|
|
2137
|
-
`,x0=o.div`
|
|
2138
|
-
flex: 2;
|
|
2139
|
-
display: flex;
|
|
2140
|
-
align-items: center;
|
|
2141
|
-
gap: ${n.sp1};
|
|
2142
|
-
`,f0=o.div`
|
|
2143
|
-
flex: 1;
|
|
2144
|
-
color: ${e=>e.theme.colors.hero};
|
|
2145
|
-
`,y0=o.div`
|
|
2146
|
-
flex: 1;
|
|
2147
|
-
text-align: right;
|
|
2148
|
-
`,w0=48,Dt=new Map,yo=new Map;function b0(e,i,l){return i!=null&&i!==""?`${e}::att::${i}`:`${e}::url::${l}`}function C0(e){const i=Dt.get(e);return i!=null&&(Dt.delete(e),Dt.set(e,i)),i}function v0(){for(;Dt.size>w0;){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 S0(e,i){const l=Dt.get(e);l!=null&&l!==i&&URL.revokeObjectURL(l),Dt.delete(e),Dt.set(e,i),v0()}function Rl(e){return C0(e)}function k0(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 j0(e,i,l,r){const h=Rl(e);if(h!=null)return Promise.resolve(h);const d=yo.get(e);if(d!=null)return d;const a=k0(i,l).then(c=>{const u=URL.createObjectURL(c);return S0(e,u),u}).finally(()=>{yo.delete(e)});return yo.set(e,a),a}const{uncategorizedTransactionList:{missingReceipt:{bulkUpload:$0}}}=me.getLocalizedStrings(),I0=me.getLocalizedStrings().spendManagement.reimbursement.reimbursementDetail;function T0(e){return e.toLowerCase().endsWith(".pdf")}function L0(e,i,l){const[r,h]=s.useState(null);return s.useLayoutEffect(()=>{if(e==null){h(null);return}const d=b0(i.tenantId,l,e),a=Rl(d);if(a!=null){h(a);return}let c=!1;return j0(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 $a({title:e,windowSize:i,onDeleteClick:l,deleteDataTestId:r}){const h=l!=null;return t.jsxs(D0,{children:[t.jsx(M0,{children:e}),h?t.jsx(O0,{className:"actionIcons",children:i==="small"?t.jsx(P0,{"data-testid":r,onClick:d=>{d.stopPropagation(),l?.()}}):t.jsx(xe,{enterDelay:600,display:"flex",title:I0.delete,placement:"top",children:t.jsx(z0,{"data-testid":r,onClick:d=>{d.stopPropagation(),l?.()}})})}):null]})}const A0=({authParams:e,attachmentTitle:i,attachmentId:l,fileDownloadUrl:r,filename:h,filePreviewUrl:d,onDeleteClick:a})=>{const[c,u]=s.useState(!1),m=Ce(),p=L0(r,e,l),g=d??p,x=p??d,y=T0(h),C=D("receipt-card-delete",l??h),S=s.useCallback(()=>{x!=null&&u(!0)},[x]),$=s.useCallback(()=>{u(!1)},[]);return y&&x!=null?t.jsxs(t.Fragment,{children:[t.jsx(R0,{"data-testid":D("receipt-pdf-preview",h),children:t.jsx(hs,{fileUrl:x,isFullScreen:!1,setShowFullScreenView:u,showTitlebar:!0,pdfTitle:i,showTitlebarIcon:a!=null,showReplaceIcon:!1,onDeleteClick:a,deleteAttachmentDataTestId:a!=null?C:void 0})}),c?Mi.createPortal(t.jsxs(Ia,{children:[t.jsxs(Ta,{children:[t.jsx(ps,{children:h}),t.jsx(La,{onClick:$,"data-testid":D("close-receipt-preview",h),children:t.jsx(Aa,{})})]}),t.jsx($t,{onClickAway:$,children:t.jsx(Ra,{children:t.jsx(hs,{fileUrl:x,isFullScreen:!0,setShowFullScreenView:u,onCrossClick:$})})})]}),document.body):null]}):g!=null&&g!==""?t.jsxs(t.Fragment,{children:[t.jsxs(E0,{windowSize:m,children:[t.jsx($a,{title:i,windowSize:m,onDeleteClick:a,deleteDataTestId:C}),t.jsx(F0,{children:t.jsx(B0,{src:g,alt:h,onClick:S,"data-testid":D("receipt-img-preview",h)})})]}),c&&x!=null?Mi.createPortal(t.jsxs(Ia,{children:[t.jsxs(Ta,{children:[t.jsx(ps,{children:h}),t.jsx(La,{onClick:$,"data-testid":D("close-receipt-preview",h),children:t.jsx(Aa,{})})]}),t.jsx($t,{onClickAway:$,children:t.jsx(Ra,{children:t.jsx(N0,{src:x,alt:h})})})]}),document.body):null]}):t.jsxs(_0,{windowSize:m,children:[t.jsx($a,{title:i,windowSize:m,onDeleteClick:a,deleteDataTestId:C}),t.jsx(V0,{children:t.jsx(st,{children:$0.noPreview})})]})},R0=o.div`
|
|
2149
|
-
width: 100%;
|
|
2150
|
-
min-height: 300px;
|
|
2151
|
-
max-height: 650px;
|
|
2152
|
-
overflow: hidden;
|
|
2153
|
-
background-color: ${e=>e.theme.colors.grey3};
|
|
2154
|
-
border-radius: 0;
|
|
2155
|
-
`,E0=o.div`
|
|
2156
|
-
display: flex;
|
|
2157
|
-
flex-direction: column;
|
|
2158
|
-
width: 100%;
|
|
2159
|
-
min-height: 300px;
|
|
2160
|
-
overflow: hidden;
|
|
2161
|
-
box-sizing: border-box;
|
|
2162
|
-
padding: ${n.sp3};
|
|
2163
|
-
cursor: pointer;
|
|
2164
|
-
background-color: ${e=>e.theme.colors.grey3};
|
|
2165
|
-
border-radius: 0;
|
|
2166
|
-
|
|
2167
|
-
.actionIcons {
|
|
2168
|
-
${e=>e.windowSize==="small"&&`
|
|
2169
|
-
display: flex;
|
|
2170
|
-
`}
|
|
2171
|
-
}
|
|
2172
|
-
&:hover {
|
|
2173
|
-
.actionIcons {
|
|
2174
|
-
display: flex;
|
|
2175
|
-
}
|
|
2176
|
-
}
|
|
2177
|
-
`,D0=o.div`
|
|
2178
|
-
position: sticky;
|
|
2179
|
-
background: ${e=>e.theme.colors.grey3};
|
|
2180
|
-
z-index: 1;
|
|
2181
|
-
width: 100%;
|
|
2182
|
-
top: 0;
|
|
2183
|
-
display: flex;
|
|
2184
|
-
flex-direction: row;
|
|
2185
|
-
justify-content: space-between;
|
|
2186
|
-
align-items: center;
|
|
2187
|
-
padding-bottom: ${n.sp3};
|
|
2188
|
-
cursor: default;
|
|
2189
|
-
flex-shrink: 0;
|
|
2190
|
-
`,M0=o(ar)``,O0=o.div`
|
|
2191
|
-
display: none;
|
|
2192
|
-
flex-direction: row;
|
|
2193
|
-
`,z0=o(Ir)`
|
|
2194
|
-
cursor: pointer;
|
|
2195
|
-
width: ${n.sp3};
|
|
2196
|
-
height: ${n.sp3};
|
|
2197
|
-
color: ${e=>e.theme.colors.grey1};
|
|
2198
|
-
:hover {
|
|
2199
|
-
color: ${he.important};
|
|
2200
|
-
}
|
|
2201
|
-
`,P0=o(Ir)`
|
|
2202
|
-
cursor: pointer;
|
|
2203
|
-
width: ${n.sp3};
|
|
2204
|
-
height: ${n.sp3};
|
|
2205
|
-
color: ${he.important};
|
|
2206
|
-
`,F0=o.div`
|
|
2207
|
-
box-sizing: border-box;
|
|
2208
|
-
width: 100%;
|
|
2209
|
-
flex: 1;
|
|
2210
|
-
min-height: 0;
|
|
2211
|
-
display: flex;
|
|
2212
|
-
align-items: center;
|
|
2213
|
-
justify-content: center;
|
|
2214
|
-
overflow: auto;
|
|
2215
|
-
max-height: 650px;
|
|
2216
|
-
`,B0=o.img`
|
|
2217
|
-
width: 100%;
|
|
2218
|
-
height: auto;
|
|
2219
|
-
object-fit: contain;
|
|
2220
|
-
cursor: pointer;
|
|
2221
|
-
display: block;
|
|
2222
|
-
max-height: 650px;
|
|
2223
|
-
`,_0=o.div`
|
|
2224
|
-
width: 100%;
|
|
2225
|
-
min-height: 300px;
|
|
2226
|
-
max-height: 650px;
|
|
2227
|
-
display: flex;
|
|
2228
|
-
flex-direction: column;
|
|
2229
|
-
box-sizing: border-box;
|
|
2230
|
-
padding: ${n.sp3};
|
|
2231
|
-
background-color: ${e=>e.theme.colors.grey3};
|
|
2232
|
-
border-radius: 0;
|
|
2233
|
-
color: ${e=>e.theme.colors.grey2};
|
|
2234
|
-
|
|
2235
|
-
.actionIcons {
|
|
2236
|
-
${e=>e.windowSize==="small"&&`
|
|
2237
|
-
display: flex;
|
|
2238
|
-
`}
|
|
2239
|
-
}
|
|
2240
|
-
&:hover {
|
|
2241
|
-
.actionIcons {
|
|
2242
|
-
display: flex;
|
|
2243
|
-
}
|
|
2244
|
-
}
|
|
2245
|
-
`,V0=o.div`
|
|
2246
|
-
flex: 1;
|
|
2247
|
-
display: flex;
|
|
2248
|
-
align-items: center;
|
|
2249
|
-
justify-content: center;
|
|
2250
|
-
min-height: 200px;
|
|
2251
|
-
`,Ia=o.div`
|
|
2252
|
-
position: fixed;
|
|
2253
|
-
top: 0;
|
|
2254
|
-
left: 0;
|
|
2255
|
-
width: 100%;
|
|
2256
|
-
height: 100%;
|
|
2257
|
-
z-index: 1201;
|
|
2258
|
-
display: flex;
|
|
2259
|
-
flex-direction: column;
|
|
2260
|
-
background: ${he.overlayDark};
|
|
2261
|
-
`,Ta=o.div`
|
|
2262
|
-
width: 100%;
|
|
2263
|
-
height: 59px;
|
|
2264
|
-
display: flex;
|
|
2265
|
-
align-items: center;
|
|
2266
|
-
justify-content: space-between;
|
|
2267
|
-
padding: ${n.sp0} ${n.sp8};
|
|
2268
|
-
color: ${he.neutralGrey5Light};
|
|
2269
|
-
box-sizing: border-box;
|
|
2270
|
-
flex-shrink: 0;
|
|
2271
|
-
`,La=o.button`
|
|
2272
|
-
background: none;
|
|
2273
|
-
border: none;
|
|
2274
|
-
cursor: pointer;
|
|
2275
|
-
padding: ${n.sp0};
|
|
2276
|
-
display: flex;
|
|
2277
|
-
align-items: center;
|
|
2278
|
-
`,Aa=o(Wo)`
|
|
2279
|
-
width: ${n.sp4};
|
|
2280
|
-
height: ${n.sp4};
|
|
2281
|
-
color: ${he.neutralGrey5Light};
|
|
2282
|
-
|
|
2283
|
-
&:hover {
|
|
2284
|
-
color: ${he.primaryDark};
|
|
2285
|
-
}
|
|
2286
|
-
`,Ra=o.div`
|
|
2287
|
-
flex: 1;
|
|
2288
|
-
display: flex;
|
|
2289
|
-
align-items: center;
|
|
2290
|
-
justify-content: center;
|
|
2291
|
-
overflow: auto;
|
|
2292
|
-
max-width: 90%;
|
|
2293
|
-
margin: 0 auto;
|
|
2294
|
-
`,N0=o.img`
|
|
2295
|
-
max-width: 100%;
|
|
2296
|
-
max-height: 100%;
|
|
2297
|
-
object-fit: contain;
|
|
2298
|
-
`,{uncategorizedTransactionList:{missingReceipt:{bulkUpload:Ea}}}=me.getLocalizedStrings(),Da=({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:S})=>{const $=i.status==="possible_matches",v=i.status==="no_match",T=$&&i.candidates!=null&&i.candidates.length>0,I=Ce(),w=i.candidates?.map(b=>({amount:b.transaction.amount.amount,currencyCode:b.transaction.amount.currencySymbol||b.transaction.amount.currencyCode||"",matchScore:b.matchScore,transactionDate:zf(b.transaction.date),transactionId:b.transaction.id,transactionType:b.transaction.type??"",vendorName:b.transaction.vendorName??"",vendorLogo:b.transaction.logo?.href})),k=s.useCallback((b,P)=>{a||C(b,P)},[a,C]),j=`${i.attachmentId}-${d}`;return t.jsxs(U0,{windowSize:I,"data-testid":D("receipt-card",i.attachmentId),children:[t.jsx(W0,{children:t.jsx(H0,{children:t.jsx(A0,{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(q0,{children:[T&&w!=null?t.jsx(l0,{attachmentId:i.attachmentId,candidates:w,interactionLocked:a,selectedTransactionId:m,onSelectionChange:k}):null,v?t.jsxs(K0,{children:[t.jsx(J0,{children:t.jsx(Kn,{children:Ea.noPossibleMatch})}),t.jsx(Q0,{children:t.jsx(st,{children:Ea.noMatchFound})})]}):null,$||v?t.jsx(Vf,{hasCandidates:T,interactionLocked:a,isLoadingMore:r,isSearching:h,manualSearchNextPageToken:c,manualSearchTotalCount:u,searchResults:S,selectedTransactionId:m,onClearSelection:p,onLoadMore:x,onSearch:y??(()=>{}),onSelectionChange:k},j):null]})]})},U0=o.div`
|
|
2299
|
-
display: grid;
|
|
2300
|
-
grid-template-columns: ${e=>e.windowSize==="small"?"1fr":"1fr 1fr"};
|
|
2301
|
-
grid-template-rows: ${e=>e.windowSize==="small"?"1fr 1fr 1fr 1fr":"auto"};
|
|
2302
|
-
align-items: start;
|
|
2303
|
-
gap: ${n.sp4};
|
|
2304
|
-
min-width: 0;
|
|
2305
|
-
`,W0=o.div`
|
|
2306
|
-
display: flex;
|
|
2307
|
-
flex-direction: column;
|
|
2308
|
-
min-width: 0;
|
|
2309
|
-
max-width: 94%;
|
|
2310
|
-
`,H0=o.div`
|
|
2311
|
-
display: flex;
|
|
2312
|
-
flex-direction: column;
|
|
2313
|
-
width: 100%;
|
|
2314
|
-
background-color: ${e=>e.theme.colors.grey3};
|
|
2315
|
-
border-radius: ${n.sp2};
|
|
2316
|
-
overflow: hidden;
|
|
2317
|
-
max-height: 650px;
|
|
2318
|
-
`,q0=o.div`
|
|
2319
|
-
display: flex;
|
|
2320
|
-
flex-direction: column;
|
|
2321
|
-
min-width: 0;
|
|
2322
|
-
gap: ${n.sp5};
|
|
2323
|
-
margin-top: ${n.sp3};
|
|
2324
|
-
`,K0=o.div`
|
|
2325
|
-
display: flex;
|
|
2326
|
-
flex-direction: column;
|
|
2327
|
-
gap: ${n.sp3};
|
|
2328
|
-
`,J0=o.div`
|
|
2329
|
-
color: ${e=>e.theme.colors.primary};
|
|
2330
|
-
`,Q0=o.div`
|
|
2331
|
-
display: flex;
|
|
2332
|
-
align-items: center;
|
|
2333
|
-
justify-content: center;
|
|
2334
|
-
padding: ${n.sp4} ${n.sp0};
|
|
2335
|
-
width: 100%;
|
|
2336
|
-
background-color: ${e=>e.theme.colors.background};
|
|
2337
|
-
border-radius: ${n.sp2};
|
|
2338
|
-
color: ${e=>e.theme.colors.grey1};
|
|
2339
|
-
`,G0=()=>t.jsx(Y0,{children:t.jsxs(Z0,{children:[t.jsxs(X0,{children:[t.jsx(ny,{children:t.jsx(ot,{width:286,height:27,style:{display:"block",borderRadius:n.sp1}})}),t.jsx(ey,{children:t.jsx(ty,{children:t.jsx(iy,{children:t.jsx(Hn,{size:"Large",start:!0})})})})]}),t.jsx(oy,{children:t.jsx(Sf,{})})]})}),Y0=o.div`
|
|
2340
|
-
display: flex;
|
|
2341
|
-
flex-direction: column;
|
|
2342
|
-
flex: 1;
|
|
2343
|
-
min-height: 0;
|
|
2344
|
-
width: 100%;
|
|
2345
|
-
`,Z0=o.div`
|
|
2346
|
-
display: grid;
|
|
2347
|
-
grid-template-columns: minmax(0, 50%) minmax(0, 1fr);
|
|
2348
|
-
align-items: start;
|
|
2349
|
-
gap: ${n.sp7};
|
|
2350
|
-
width: 100%;
|
|
2351
|
-
min-width: 0;
|
|
2352
|
-
`,X0=o.div`
|
|
2353
|
-
display: flex;
|
|
2354
|
-
flex-direction: column;
|
|
2355
|
-
min-width: 0;
|
|
2356
|
-
`,ey=o.div`
|
|
2357
|
-
display: flex;
|
|
2358
|
-
flex-direction: column;
|
|
2359
|
-
width: 100%;
|
|
2360
|
-
background-color: ${e=>e.theme.colors.grey3};
|
|
2361
|
-
border-radius: ${n.sp2};
|
|
2362
|
-
overflow: hidden;
|
|
2363
|
-
`,ty=o.div`
|
|
2364
|
-
display: flex;
|
|
2365
|
-
flex-direction: column;
|
|
2366
|
-
width: 100%;
|
|
2367
|
-
min-height: 480px;
|
|
2368
|
-
max-height: 540px;
|
|
2369
|
-
box-sizing: border-box;
|
|
2370
|
-
padding: ${n.sp3};
|
|
2371
|
-
margin-top: ${n.sp6};
|
|
2372
|
-
background-color: ${e=>e.theme.colors.grey3};
|
|
2373
|
-
`,ny=o.div`
|
|
2374
|
-
display: flex;
|
|
2375
|
-
align-items: center;
|
|
2376
|
-
padding-bottom: ${n.sp3};
|
|
2377
|
-
flex-shrink: 0;
|
|
2378
|
-
margin-top: ${n.sp4};
|
|
2379
|
-
`,iy=o.div`
|
|
2380
|
-
flex: 1;
|
|
2381
|
-
min-height: 200px;
|
|
2382
|
-
display: flex;
|
|
2383
|
-
align-items: center;
|
|
2384
|
-
justify-content: center;
|
|
2385
|
-
background-color: ${e=>e.theme.colors.grey5};
|
|
2386
|
-
border: 1px solid ${e=>e.theme.colors.grey3};
|
|
2387
|
-
border-radius: ${n.sp2};
|
|
2388
|
-
box-sizing: border-box;
|
|
2389
|
-
color: ${e=>e.theme.colors.grey1};
|
|
2390
|
-
`,oy=o.div`
|
|
2391
|
-
display: flex;
|
|
2392
|
-
flex-direction: column;
|
|
2393
|
-
gap: ${n.sp5};
|
|
2394
|
-
min-width: 0;
|
|
2395
|
-
margin-top: ${n.sp8};
|
|
2396
|
-
`,sy=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:Ma}}}=me.getLocalizedStrings(),ay=({authParams:e,unmatchedFiles:i,pastUnmatchedFiles:l,hasMoreBatchDetails:r,isLoading:h,isLoadingMore:d,isLoadingMoreManualSearch:a,isSearching:c,manualSearchNextPageToken:u,manualSearchTotalCount:m,manualSearchUiResetKey:p=0,isConfirmMatchInProgress:g=!1,pendingMatchAttachmentId:x,pendingMatchTransactionId:y,onDelete:C,onLoadMoreBatchDetails:S,onLoadMoreManualSearch:$,onPendingMatchChange:v,onSearchTransactions:T,manualSearchResultsAttachmentId:I,scrollRoot:w,searchResults:k})=>{const j=s.useRef(null),b=s.useRef(!1),[P,A]=s.useState(null),R=I??P,F=s.useCallback((L,U)=>{g||(U.trim().length>=2&&A(L),T?.(U))},[g,T]);s.useEffect(()=>{I==null&&(k?.length??0)===0&&c!==!0&&A(null)},[k,c,I]);const V=s.useCallback(L=>{const[U]=L;U.isIntersecting&&r===!0&&d!==!0&&S?.()},[r,d,S]);if(s.useEffect(()=>{if(h===!0||w==null)return;const L=j.current;if(L==null)return;const U=new IntersectionObserver(V,{root:w,rootMargin:"200px"});return U.observe(L),()=>U.disconnect()},[V,h,w]),s.useEffect(()=>{if(h===!0||w==null||r!==!0){b.current=d===!0;return}const L=b.current===!0&&d!==!0;if(b.current=d===!0,!L)return;const U=j.current;if(U==null)return;const X=w.getBoundingClientRect(),ce=U.getBoundingClientRect();ce.top<X.bottom&&ce.bottom>X.top&&ce.left<X.right&&ce.right>X.left&&requestAnimationFrame(()=>{S?.()})},[h,d,r,w,S]),h===!0)return t.jsx(G0,{});const q=i.length>0,M=l!=null&&l.length>0;if(!q&&!M&&r!==!0&&d!==!0){const{title:L,subTitle:U}=He("missing_receipts").allDoneText;return t.jsx(ry,{children:t.jsx(cy,{children:t.jsx(It,{tab:"missing_receipts",title:L,subTitle:U})})})}const O=M,re=Ma.unmatchedReceipts.replace("__count__",i.length.toString()),B=i.length>0;return t.jsxs(ly,{children:[B?t.jsxs(hy,{children:[t.jsx(Oa,{"aria-hidden":!0}),t.jsx(py,{children:re})]}):null,t.jsx(dy,{children:t.jsxs(uy,{children:[i.length>0?t.jsx(za,{children:i.map((L,U)=>t.jsx(Da,{authParams:e,file:L,index:U,isLoadingMoreManualSearch:a,isSearching:c===!0&&R===L.attachmentId,manualSearchNextPageToken:u,manualSearchTotalCount:m,selectedTransactionId:x===L.attachmentId?y:null,onClearSelection:()=>v(null),onDelete:C,onLoadMoreManualSearch:$,onSearchTransactions:T!=null?X=>F(L.attachmentId,X):void 0,onSelectionChange:(X,ce)=>{g||v({batchId:L.batchId,attachmentId:L.attachmentId,fileName:L.filename,transactionId:X,transactionType:ce})},searchResults:R===L.attachmentId?k:void 0,manualSearchUiResetKey:p,isConfirmMatchInProgress:g},`${L.batchId}-${L.attachmentId}`))}):null,O?t.jsxs(t.Fragment,{children:[t.jsxs(my,{children:[t.jsx(Oa,{"aria-hidden":!0}),t.jsx(gy,{children:Ma.pastUnmatchedReceipts.replace("__count__",l.length.toString())})]}),t.jsx(za,{children:l.map((L,U)=>t.jsx(Da,{authParams:e,file:L,index:i.length+U,isLoadingMoreManualSearch:a,isSearching:c===!0&&R===L.attachmentId,manualSearchNextPageToken:u,manualSearchTotalCount:m,selectedTransactionId:x===L.attachmentId?y:null,onClearSelection:()=>v(null),onDelete:C,onLoadMoreManualSearch:$,onSearchTransactions:T!=null?X=>F(L.attachmentId,X):void 0,onSelectionChange:(X,ce)=>{g||v({batchId:L.batchId,attachmentId:L.attachmentId,fileName:L.filename,transactionId:X,transactionType:ce})},searchResults:R===L.attachmentId?k:void 0,manualSearchUiResetKey:p,isConfirmMatchInProgress:g},`${L.batchId}-${L.attachmentId}`))})]}):null,t.jsx(xy,{ref:j}),d===!0?t.jsx(fy,{children:t.jsx(Hn,{size:"Small",start:!0})}):null]})})]})},ry=o.div`
|
|
2397
|
-
display: flex;
|
|
2398
|
-
flex-direction: column;
|
|
2399
|
-
flex: 1;
|
|
2400
|
-
overflow: hidden;
|
|
2401
|
-
align-self: stretch;
|
|
2402
|
-
width: 100%;
|
|
2403
|
-
min-height: 100%;
|
|
2404
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
2405
|
-
`,ly=o.div`
|
|
2406
|
-
display: flex;
|
|
2407
|
-
flex-direction: column;
|
|
2408
|
-
flex: 0 0 auto;
|
|
2409
|
-
align-self: stretch;
|
|
2410
|
-
width: 100%;
|
|
2411
|
-
min-height: 100%;
|
|
2412
|
-
gap: ${n.sp3};
|
|
2413
|
-
overflow: visible;
|
|
2414
|
-
`,cy=o.div`
|
|
2415
|
-
flex: 1;
|
|
2416
|
-
display: flex;
|
|
2417
|
-
flex-direction: column;
|
|
2418
|
-
min-height: 0;
|
|
2419
|
-
width: 100%;
|
|
2420
|
-
overflow: hidden;
|
|
2421
|
-
`,dy=o.div`
|
|
2422
|
-
width: 100%;
|
|
2423
|
-
flex: 0 0 auto;
|
|
2424
|
-
align-self: stretch;
|
|
2425
|
-
`,uy=o.div`
|
|
2426
|
-
position: relative;
|
|
2427
|
-
z-index: 1;
|
|
2428
|
-
display: flex;
|
|
2429
|
-
flex-direction: column;
|
|
2430
|
-
width: 100%;
|
|
2431
|
-
gap: ${n.sp3};
|
|
2432
|
-
`,hy=o.div`
|
|
2433
|
-
display: flex;
|
|
2434
|
-
align-items: center;
|
|
2435
|
-
gap: ${n.sp2};
|
|
2436
|
-
position: relative;
|
|
2437
|
-
z-index: 1;
|
|
2438
|
-
width: 100%;
|
|
2439
|
-
margin-top: ${n.sp4};
|
|
2440
|
-
`,Oa=o(sy)`
|
|
2441
|
-
width: ${n.sp4};
|
|
2442
|
-
height: ${n.sp4};
|
|
2443
|
-
color: ${he.important};
|
|
2444
|
-
flex-shrink: 0;
|
|
2445
|
-
`,py=o(_o)`
|
|
2446
|
-
color: ${he.important};
|
|
2447
|
-
`,my=o.div`
|
|
2448
|
-
display: flex;
|
|
2449
|
-
align-items: center;
|
|
2450
|
-
gap: ${n.sp2};
|
|
2451
|
-
color: ${he.important};
|
|
2452
|
-
margin-top: ${n.sp9};
|
|
2453
|
-
position: relative;
|
|
2454
|
-
z-index: 1;
|
|
2455
|
-
width: 100%;
|
|
2456
|
-
`,gy=o(_o)`
|
|
2457
|
-
color: ${he.important};
|
|
2458
|
-
`,za=o.div`
|
|
2459
|
-
display: flex;
|
|
2460
|
-
flex-direction: column;
|
|
2461
|
-
flex-shrink: 0;
|
|
2462
|
-
border-radius: ${n.sp2};
|
|
2463
|
-
overflow: hidden;
|
|
2464
|
-
gap: ${n.sp11};
|
|
2465
|
-
`,xy=o.div`
|
|
2466
|
-
height: 1px;
|
|
2467
|
-
width: 100%;
|
|
2468
|
-
`,fy=o.div`
|
|
2469
|
-
display: flex;
|
|
2470
|
-
justify-content: center;
|
|
2471
|
-
padding: ${n.sp3};
|
|
2472
|
-
`,yy=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,S=Ce(),[$,v]=s.useState(null),{isUploading:T,handleDragOver:I,handleDragLeave:w,handleDrop:k}=x,j=r?.phase,b=a!=null||c!=null,P=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,R=e.onFetchCompletedTransactions;s.useEffect(()=>{b&&i==="completed"&&h!=null&&A==="Not-Started"&&R?.()},[b,i,h,A,R]);const F=r?.batchListFetchState?.fetchState,V=jl({bulkUploadSelector:r,isUploading:T}),q=s.useRef(null);s.useEffect(()=>{if(!b||h==null)return;const B={month:h.month,tenantId:d.tenantId,year:h.year},L=q.current,U=L!=null&&(L.month!==B.month||L.tenantId!==B.tenantId||L.year!==B.year),X=()=>{q.current=B};if(!(j==="uploading"||j==="matching"||!(j==="completed"||i==="unmatched"))){if(U){u?.({cacheOverride:!0,invalidateBatchDetailsCache:!0}),X();return}if(F==="Not-Started"){u?.(),X();return}X()}},[b,j,i,h,F,d.tenantId,u]),s.useEffect(()=>{i!=="unmatched"&&m(null)},[i,m]);const M=b&&i==="unmatched"&&r!=null&&S!=="small",O=r!=null&&(r.unmatchedFiles.length>0||(r.pastUnmatchedFiles?.length??0)>0),re=M&&V!==!0&&O;return t.jsxs(wy,{ref:v,windowSize:S,onDragOver:b?I:void 0,onDragLeave:b?w:void 0,onDrop:b?k:void 0,children:[y,C,i==="missing"?t.jsx(Cy,{windowSize:S,children:t.jsx(fl,{...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(by,{$desktopRail:re,"data-testid":re?D("unmatched-page-splitter"):void 0,children:t.jsx(ay,{authParams:e.authParams,unmatchedFiles:r.unmatchedFiles,pastUnmatchedFiles:r.pastUnmatchedFiles,manualSearchUiResetKey:r.manualSearchUiResetKey??0,isConfirmMatchInProgress:r.confirmMatchStatus.fetchState==="In-Progress",isLoading:V,isLoadingMore:r.batchDetailsPaginationState.fetchState==="In-Progress",hasMoreBatchDetails:r.hasMoreBatchDetails,isLoadingMoreManualSearch:P?.isLoadingMore===!0,isSearching:P?.fetchState.fetchState==="In-Progress"&&P?.isLoadingMore!==!0,manualSearchNextPageToken:P?.nextPageToken,manualSearchTotalCount:P?.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:$})}):null,b&&i==="completed"&&r!=null?t.jsx(pf,{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]})},Oi={contentPadding:new Q(f[3],f[6],f[8])},wy=o("div",{shouldForwardProp:e=>e!=="windowSize"})`
|
|
2473
|
-
display: flex;
|
|
2474
|
-
flex-direction: column;
|
|
2475
|
-
flex: 1;
|
|
2476
|
-
min-height: 0;
|
|
2477
|
-
width: 100%;
|
|
2478
|
-
position: relative;
|
|
2479
|
-
overflow-x: hidden;
|
|
2480
|
-
overflow-y: auto;
|
|
2481
|
-
/* Scroll works; scrollbar UI hidden (same pattern as DocumentRenderer) */
|
|
2482
|
-
scrollbar-width: none;
|
|
2483
|
-
-ms-overflow-style: none;
|
|
2484
|
-
&::-webkit-scrollbar {
|
|
2485
|
-
display: none;
|
|
2486
|
-
}
|
|
2487
|
-
padding-left: ${e=>Oi.contentPadding.valuePx(e.windowSize)};
|
|
2488
|
-
padding-right: ${e=>Oi.contentPadding.valuePx(e.windowSize)};
|
|
2489
|
-
box-sizing: border-box;
|
|
2490
|
-
`,by=o.div`
|
|
2491
|
-
display: flex;
|
|
2492
|
-
flex-direction: column;
|
|
2493
|
-
flex: 0 0 auto;
|
|
2494
|
-
align-self: stretch;
|
|
2495
|
-
width: 100%;
|
|
2496
|
-
min-height: 100%;
|
|
2497
|
-
position: relative;
|
|
2498
|
-
z-index: 0;
|
|
2499
|
-
|
|
2500
|
-
& > * {
|
|
2501
|
-
position: relative;
|
|
2502
|
-
z-index: 1;
|
|
2503
|
-
}
|
|
2504
|
-
|
|
2505
|
-
${e=>e.$desktopRail===!0?`
|
|
2506
|
-
background-image: linear-gradient(
|
|
2507
|
-
to right,
|
|
2508
|
-
transparent 0,
|
|
2509
|
-
transparent calc(48% - 0.5px),
|
|
2510
|
-
${e.theme.colors.grey3} calc(48% - 0.5px),
|
|
2511
|
-
${e.theme.colors.grey3} calc(48% + 0.5px),
|
|
2512
|
-
transparent calc(48% + 0.5px),
|
|
2513
|
-
transparent 100%
|
|
2514
|
-
);
|
|
2515
|
-
background-repeat: no-repeat;
|
|
2516
|
-
background-size: 100% 100%;
|
|
2517
|
-
`:""}
|
|
2518
|
-
`,Cy=o.div`
|
|
2519
|
-
margin-left: -${e=>Oi.contentPadding.valuePx(e.windowSize)};
|
|
2520
|
-
margin-right: -${e=>Oi.contentPadding.valuePx(e.windowSize)};
|
|
2521
|
-
flex: 1;
|
|
2522
|
-
display: flex;
|
|
2523
|
-
`;function Pa({children:e,onDragLeave:i,onDragOver:l,onDrop:r}){return t.jsx("div",{style:{width:"100%"},onDragLeave:i,onDragOverCapture:l,onDrop:r,children:e})}function El(e,i,l,r){const h=i===1?l:r;return e.replace("__count__",String(i)).replace("__receiptWord__",h)}const{uncategorizedTransactionList:{missingReceipt:{bulkUpload:wo}}}=me.getLocalizedStrings(),vy=({total:e})=>{const i=El(wo.autoMatchingReceipts,e,wo.receiptWordSingular,wo.receiptWordPlural);return t.jsx(ky,{children:t.jsxs(jy,{children:[t.jsx($y,{}),t.jsx(Iy,{children:i})]})})},Sy=Bi`
|
|
2524
|
-
0% {
|
|
2525
|
-
background-position: -200% center;
|
|
2526
|
-
}
|
|
2527
|
-
100% {
|
|
2528
|
-
background-position: 200% center;
|
|
2529
|
-
}
|
|
2530
|
-
`,ky=o.div`
|
|
2531
|
-
position: relative;
|
|
2532
|
-
display: flex;
|
|
2533
|
-
align-items: center;
|
|
2534
|
-
height: ${n.sp8};
|
|
2535
|
-
background-color: ${e=>e.theme.colors.grey5};
|
|
2536
|
-
border: 1px solid transparent;
|
|
2537
|
-
border-radius: ${n.sp2};
|
|
2538
|
-
box-sizing: border-box;
|
|
2539
|
-
overflow: hidden;
|
|
2540
|
-
margin-top: ${n.sp3};
|
|
2541
|
-
&::before {
|
|
2542
|
-
content: "";
|
|
2543
|
-
position: absolute;
|
|
2544
|
-
inset: 0;
|
|
2545
|
-
border-radius: ${n.sp2};
|
|
2546
|
-
pointer-events: none;
|
|
2547
|
-
background: ${he.receiptAgentLinearGradient};
|
|
2548
|
-
padding: 1px;
|
|
2549
|
-
mask: ${he.gradientMask};
|
|
2550
|
-
-webkit-mask: ${he.gradientMask};
|
|
2551
|
-
-webkit-mask-composite: xor;
|
|
2552
|
-
mask-composite: exclude;
|
|
2553
|
-
z-index: 0;
|
|
2554
|
-
}
|
|
2555
|
-
`,jy=o.div`
|
|
2556
|
-
position: relative;
|
|
2557
|
-
display: flex;
|
|
2558
|
-
align-items: center;
|
|
2559
|
-
justify-content: center;
|
|
2560
|
-
width: 100%;
|
|
2561
|
-
gap: ${n.sp2};
|
|
2562
|
-
padding: 0 ${n.sp3};
|
|
2563
|
-
z-index: 1;
|
|
2564
|
-
`,$y=o(Qt)`
|
|
2565
|
-
width: ${n.sp3};
|
|
2566
|
-
height: ${n.sp3};
|
|
2567
|
-
color: ${he.aiCfoGradient4};
|
|
2568
|
-
flex-shrink: 0;
|
|
2569
|
-
`,Iy=o(Re)`
|
|
2570
|
-
background: linear-gradient(
|
|
2571
|
-
90deg,
|
|
2572
|
-
${he.aiCfoGradient4} 25%,
|
|
2573
|
-
${he.aiCfoGradient1} 50%,
|
|
2574
|
-
${he.aiCfoGradient4} 75%
|
|
2575
|
-
);
|
|
2576
|
-
background-size: 200% auto;
|
|
2577
|
-
background-clip: text;
|
|
2578
|
-
-webkit-background-clip: text;
|
|
2579
|
-
-webkit-text-fill-color: transparent;
|
|
2580
|
-
animation: ${Sy} 2.5s ease-in-out infinite;
|
|
2581
|
-
`,En=20,ds=["application/pdf","image/jpeg","image/png"],Dl=ds.join(","),Ty=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:Fa}}}=me.getLocalizedStrings(),Ly=({onFilesSelected:e})=>{const i=s.useRef(null),[l,r]=s.useState(!0);Yl();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(ds.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(Ay,{onClick:a,onDrop:h,onDragEnter:d,onDragLeave:d,onDragOver:d,isDragActive:l,"data-testid":D("bulk-upload-inline-drop-zone"),children:[t.jsx(Ry,{"aria-hidden":!0,children:t.jsx(Ty,{})}),t.jsxs(Ey,{children:[t.jsx(Dy,{}),t.jsx(My,{children:t.jsx(sr,{children:Fa.dropYourFilesHere})}),l?null:t.jsx(Oy,{children:t.jsx(ar,{children:Fa.orBrowseFiles})})]}),t.jsx(zy,{ref:i,type:"file",multiple:!0,accept:Dl,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=""}})]})},Ba=200,_a=378,Ay=o.div`
|
|
2582
|
-
display: flex;
|
|
2583
|
-
flex-direction: column;
|
|
2584
|
-
justify-content: center;
|
|
2585
|
-
align-items: center;
|
|
2586
|
-
min-height: ${e=>e.isDragActive?_a:Ba}px;
|
|
2587
|
-
box-sizing: border-box;
|
|
2588
|
-
border-radius: ${n.sp2};
|
|
2589
|
-
margin: ${n.sp3} ${n.sp0};
|
|
2590
|
-
margin-bottom: ${e=>e.isDragActive?`calc(-${_a-Ba}px + ${n.sp3})`:n.sp3};
|
|
2591
|
-
padding: ${n.sp4};
|
|
2592
|
-
background-color: ${e=>e.theme.colors.background};
|
|
2593
|
-
cursor: pointer;
|
|
2594
|
-
transition: all 0.3s ease;
|
|
2595
|
-
position: relative;
|
|
2596
|
-
z-index: ${e=>e.isDragActive?10:1};
|
|
2597
|
-
margin-top: ${n.sp3};
|
|
2598
|
-
`,Ry=o.div`
|
|
2599
|
-
position: absolute;
|
|
2600
|
-
inset: 0;
|
|
2601
|
-
z-index: 0;
|
|
2602
|
-
pointer-events: none;
|
|
2603
|
-
border-radius: inherit;
|
|
2604
|
-
overflow: hidden;
|
|
2605
|
-
color: ${e=>e.theme.colors.grey1};
|
|
2606
|
-
|
|
2607
|
-
svg {
|
|
2608
|
-
display: block;
|
|
2609
|
-
width: 100%;
|
|
2610
|
-
height: 100%;
|
|
2611
|
-
}
|
|
2612
|
-
`,Ey=o.div`
|
|
2613
|
-
position: relative;
|
|
2614
|
-
z-index: 1;
|
|
2615
|
-
display: flex;
|
|
2616
|
-
flex-direction: column;
|
|
2617
|
-
align-items: center;
|
|
2618
|
-
justify-content: center;
|
|
2619
|
-
flex-grow: 1;
|
|
2620
|
-
gap: ${n.sp2};
|
|
2621
|
-
`,Dy=o(jd)`
|
|
2622
|
-
width: ${n.sp8};
|
|
2623
|
-
height: ${n.sp8};
|
|
2624
|
-
color: ${e=>e.theme.colors.hero};
|
|
2625
|
-
margin-bottom: ${n.sp2};
|
|
2626
|
-
`,My=o.div`
|
|
2627
|
-
color: ${e=>e.theme.colors.hero};
|
|
2628
|
-
text-align: center;
|
|
2629
|
-
`,Oy=o.div`
|
|
2630
|
-
color: ${e=>e.theme.colors.primary};
|
|
2631
|
-
`,zy=o.input`
|
|
2632
|
-
display: none;
|
|
2633
|
-
`,Py=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"})),Va="receipts@zeni.ai",Fy=2e3,By=400,_y=1200,Vy=2e3,{uncategorizedTransactionList:{missingReceipt:{bulkUpload:Si}},common:{copyToClipBoard:ki}}=me.getLocalizedStrings(),Ny=({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 v=window.setInterval(()=>{d(T=>{const I=(T+1)%3;return T===2&&I===0&&c(!0),I})},Fy);return()=>window.clearInterval(v)},[]),s.useEffect(()=>{if(!a)return;const v=requestAnimationFrame(()=>{c(!1)});return()=>cancelAnimationFrame(v)},[a]),s.useEffect(()=>{if(h===1){g(!1),m(360);return}g(!0),m(0);const v=requestAnimationFrame(()=>{g(!1)});return()=>cancelAnimationFrame(v)},[h]);const x=s.useCallback(v=>{v.stopPropagation(),navigator.clipboard.writeText(Va).then(()=>{r(!0),setTimeout(()=>r(!1),Vy)})},[]),y=s.useCallback(()=>{i.current?.click()},[]),C=s.useCallback(v=>{v.preventDefault(),v.stopPropagation();const T=[],{files:I}=v.dataTransfer;for(let w=0;w<I.length;w+=1){const k=I.item(w);if(k==null)continue;const j=String(k.type);if(ds.some(b=>b===j)===!0&&(T.push(k),T.length>=En))break}T.length>0&&e(T)},[e]),S=s.useCallback(v=>{v.preventDefault()},[]),$=()=>t.jsxs(Jy,{children:[t.jsx(Na,{children:Si.emailBannerUploadLead}),t.jsx(Bo,{children:Si.emailBannerUploadSuffix}),t.jsxs(Qy,{children:[t.jsx(Ky,{children:Va}),t.jsx(xe,{display:"inline-flex",placement:"top",title:l?ki.copied:ki.copy,enterDelay:300,leaveDelay:0,children:t.jsx(Gy,{type:"button","aria-label":l?ki.copied:ki.copy,onClick:x,children:l?t.jsx(Zy,{}):t.jsx(Yy,{})})})]})]});return t.jsxs(Wy,{onClick:y,onDrop:C,onDragOver:S,children:[t.jsx(Uy,{"aria-hidden":!0,children:t.jsx(Py,{})}),t.jsx(Hy,{children:t.jsxs(qy,{$phase:h,$skipTransition:a,children:[t.jsx(bo,{children:$()}),t.jsx(bo,{children:t.jsxs(Xy,{children:[t.jsx(e2,{$deg:u,$skipTransition:p,"aria-hidden":!0,children:t.jsx(t2,{})}),t.jsx(Na,{children:Si.emailBannerAiLead}),t.jsx(Bo,{children:Si.emailBannerAiTail})]})}),t.jsx(bo,{children:$()})]})}),t.jsx(n2,{ref:i,type:"file",multiple:!0,accept:Dl,onClick:v=>v.stopPropagation(),onChange:v=>{const T=v.target.files?Array.from(v.target.files):[];T.length>0&&e(T.slice(0,En)),v.target.value=""}})]})},Uy=o.div`
|
|
2634
|
-
position: absolute;
|
|
2635
|
-
inset: 0;
|
|
2636
|
-
z-index: 0;
|
|
2637
|
-
pointer-events: none;
|
|
2638
|
-
border-radius: inherit;
|
|
2639
|
-
overflow: hidden;
|
|
2640
|
-
color: ${e=>e.theme.colors.grey1};
|
|
2641
|
-
|
|
2642
|
-
svg {
|
|
2643
|
-
display: block;
|
|
2644
|
-
width: 100%;
|
|
2645
|
-
height: 100%;
|
|
2646
|
-
}
|
|
2647
|
-
`,Wy=o.div`
|
|
2648
|
-
position: relative;
|
|
2649
|
-
display: flex;
|
|
2650
|
-
align-items: center;
|
|
2651
|
-
justify-content: center;
|
|
2652
|
-
gap: ${n.sp2};
|
|
2653
|
-
padding: ${n.sp3};
|
|
2654
|
-
box-sizing: border-box;
|
|
2655
|
-
cursor: pointer;
|
|
2656
|
-
border: none;
|
|
2657
|
-
border-radius: ${n.sp2};
|
|
2658
|
-
background-color: ${e=>e.theme.colors.background};
|
|
2659
|
-
isolation: isolate;
|
|
2660
|
-
margin-top: ${n.sp3};
|
|
2661
|
-
/* Stack frame (first child) under content; avoid Emotion component selectors
|
|
2662
|
-
* in parent rules — Storybook Vite preview omits @emotion/babel-plugin. */
|
|
2663
|
-
> *:not(:first-child) {
|
|
2664
|
-
position: relative;
|
|
2665
|
-
z-index: 1;
|
|
2666
|
-
}
|
|
2667
|
-
`,Hy=o.div`
|
|
2668
|
-
flex: 1;
|
|
2669
|
-
min-width: 0;
|
|
2670
|
-
height: ${n.sp4};
|
|
2671
|
-
overflow: hidden;
|
|
2672
|
-
`,qy=o.div`
|
|
2673
|
-
display: flex;
|
|
2674
|
-
flex-direction: column;
|
|
2675
|
-
transition: ${e=>e.$skipTransition?"none":`transform ${By}ms ease-in-out`};
|
|
2676
|
-
transform: translateY(${e=>`-${e.$phase*f[4]}px`});
|
|
2677
|
-
`,bo=o.div`
|
|
2678
|
-
flex-shrink: 0;
|
|
2679
|
-
height: ${n.sp4};
|
|
2680
|
-
line-height: ${n.sp4};
|
|
2681
|
-
display: flex;
|
|
2682
|
-
align-items: center;
|
|
2683
|
-
justify-content: center;
|
|
2684
|
-
`,Ml=o.span`
|
|
2685
|
-
font-family: ${Ec};
|
|
2686
|
-
font-size: ${n.sp3};
|
|
2687
|
-
line-height: ${n.sp4};
|
|
2688
|
-
letter-spacing: 0;
|
|
2689
|
-
color: ${e=>e.theme.colors.primary};
|
|
2690
|
-
text-decoration: none;
|
|
2691
|
-
border-bottom: none;
|
|
2692
|
-
box-shadow: none;
|
|
2693
|
-
`,Na=o(Ml)`
|
|
2694
|
-
font-weight: ${Gn.medium};
|
|
2695
|
-
`,Bo=o(Ml)`
|
|
2696
|
-
font-weight: ${Gn.regular};
|
|
2697
|
-
`,Ky=o(Bo)`
|
|
2698
|
-
text-decoration: underline;
|
|
2699
|
-
text-decoration-color: ${he.neutralGrey2Light};
|
|
2700
|
-
text-underline-offset: 0.15em;
|
|
2701
|
-
border-bottom: none;
|
|
2702
|
-
box-shadow: none;
|
|
2703
|
-
`,Jy=o.span`
|
|
2704
|
-
display: inline-flex;
|
|
2705
|
-
align-items: center;
|
|
2706
|
-
flex-wrap: nowrap;
|
|
2707
|
-
gap: 0.3em;
|
|
2708
|
-
max-width: 100%;
|
|
2709
|
-
min-width: 0;
|
|
2710
|
-
white-space: nowrap;
|
|
2711
|
-
overflow: hidden;
|
|
2712
|
-
text-overflow: ellipsis;
|
|
2713
|
-
`,Qy=o.span`
|
|
2714
|
-
display: inline-flex;
|
|
2715
|
-
align-items: center;
|
|
2716
|
-
align-self: center;
|
|
2717
|
-
gap: 0.35em;
|
|
2718
|
-
flex-shrink: 0;
|
|
2719
|
-
`,Gy=o.button`
|
|
2720
|
-
display: inline-flex;
|
|
2721
|
-
align-items: center;
|
|
2722
|
-
justify-content: center;
|
|
2723
|
-
padding: 0;
|
|
2724
|
-
margin: 0;
|
|
2725
|
-
border: none;
|
|
2726
|
-
background: transparent;
|
|
2727
|
-
cursor: pointer;
|
|
2728
|
-
line-height: 1;
|
|
2729
|
-
flex-shrink: 0;
|
|
2730
|
-
`,Yy=o(wr)`
|
|
2731
|
-
width: ${n.sp3};
|
|
2732
|
-
height: ${n.sp3};
|
|
2733
|
-
flex-shrink: 0;
|
|
2734
|
-
color: ${e=>e.theme.colors.primary};
|
|
2735
|
-
`,Zy=o(Rc)`
|
|
2736
|
-
width: ${n.sp3};
|
|
2737
|
-
height: ${n.sp3};
|
|
2738
|
-
flex-shrink: 0;
|
|
2739
|
-
color: ${he.success};
|
|
2740
|
-
`,Xy=o.div`
|
|
2741
|
-
display: inline-flex;
|
|
2742
|
-
align-items: center;
|
|
2743
|
-
justify-content: center;
|
|
2744
|
-
gap: 0.35em;
|
|
2745
|
-
min-width: 0;
|
|
2746
|
-
max-width: 100%;
|
|
2747
|
-
white-space: nowrap;
|
|
2748
|
-
overflow: hidden;
|
|
2749
|
-
text-overflow: ellipsis;
|
|
2750
|
-
`,e2=o.div`
|
|
2751
|
-
display: inline-flex;
|
|
2752
|
-
align-items: center;
|
|
2753
|
-
justify-content: center;
|
|
2754
|
-
flex-shrink: 0;
|
|
2755
|
-
align-self: center;
|
|
2756
|
-
transition: ${e=>e.$skipTransition?"none":`transform ${_y}ms ease-in-out`};
|
|
2757
|
-
transform: rotate(${e=>e.$deg}deg);
|
|
2758
|
-
`,t2=o(Qt)`
|
|
2759
|
-
width: ${n.sp3};
|
|
2760
|
-
height: ${n.sp3};
|
|
2761
|
-
flex-shrink: 0;
|
|
2762
|
-
display: block;
|
|
2763
|
-
color: ${e=>e.theme.colors.primary};
|
|
2764
|
-
`,n2=o.input`
|
|
2765
|
-
display: none;
|
|
2766
|
-
`,i2=({isDraggingFiles:e,onFilesSelected:i,policyDescription:l,showEmailOrDropZone:r})=>t.jsxs(o2,{children:[r?e?t.jsx(Ly,{onFilesSelected:i}):t.jsx(Ny,{onFilesSelected:i}):null,l.trim().length>0?t.jsx(s2,{children:t.jsx(Re,{children:l})}):null]}),o2=o.div`
|
|
2767
|
-
display: flex;
|
|
2768
|
-
flex-direction: column;
|
|
2769
|
-
width: 100%;
|
|
2770
|
-
`,s2=o.div`
|
|
2771
|
-
text-align: center;
|
|
2772
|
-
padding: ${n.sp4} ${n.sp4};
|
|
2773
|
-
color: ${e=>e.theme.colors.hero};
|
|
2774
|
-
`,{uncategorizedTransactionList:{missingReceipt:{bulkUpload:Co}}}=me.getLocalizedStrings(),ji=3e4,Ua=3e4,vo=99;function a2(e){if(e<=ji)return e/ji*vo;if(e<=ji+Ua){const i=e-ji;return vo+i/Ua*(100-vo)}return 100}const r2=({fileCount:e,percentage:i=0})=>{const[l,r]=s.useState(0);s.useEffect(()=>{const a=performance.now(),c=()=>{const m=performance.now()-a;r(a2(m))};c();const u=window.setInterval(c,100);return()=>window.clearInterval(u)},[]);const h=Math.min(100,Math.max(l,i)),d=El(Co.uploadingReceipts,e,Co.receiptWordSingular,Co.receiptWordPlural);return t.jsxs(l2,{children:[t.jsx(c2,{children:t.jsx(d2,{style:{width:`${h}%`}})}),t.jsx(u2,{children:t.jsx(h2,{children:d})})]})},l2=o.div`
|
|
2775
|
-
position: relative;
|
|
2776
|
-
display: flex;
|
|
2777
|
-
align-items: center;
|
|
2778
|
-
height: ${n.sp8};
|
|
2779
|
-
margin: ${n.sp3} ${n.sp3} ${n.sp0};
|
|
2780
|
-
background-color: ${e=>e.theme.colors.grey5};
|
|
2781
|
-
border: 1px solid ${he.success};
|
|
2782
|
-
border-radius: ${n.sp2};
|
|
2783
|
-
overflow: hidden;
|
|
2784
|
-
`,c2=o.div`
|
|
2785
|
-
position: absolute;
|
|
2786
|
-
inset: 0;
|
|
2787
|
-
overflow: hidden;
|
|
2788
|
-
`,d2=o.div`
|
|
2789
|
-
height: 100%;
|
|
2790
|
-
background-color: ${he.successLight};
|
|
2791
|
-
transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
|
|
2792
|
-
`,u2=o.div`
|
|
2793
|
-
position: relative;
|
|
2794
|
-
display: flex;
|
|
2795
|
-
align-items: center;
|
|
2796
|
-
justify-content: center;
|
|
2797
|
-
width: 100%;
|
|
2798
|
-
padding: 0 ${n.sp3};
|
|
2799
|
-
`,h2=o(Re)`
|
|
2800
|
-
color: ${he.success};
|
|
2801
|
-
`,Wa=({bulkUploadPhase:e,isDraggingFiles:i,isUploading:l,matchingProgressBannerTotal:r,onFilesSelected:h,policyDescription:d,showEmailOrDropZone:a,uploadError:c,uploadFileCount:u,uploadProgressPercent:m})=>t.jsxs(p2,{children:[l?t.jsx(r2,{fileCount:u,percentage:m}):null,c!=null&&!l?t.jsx(m2,{children:c}):null,e==="matching"?t.jsx(vy,{total:r}):null,t.jsx(i2,{isDraggingFiles:i,onFilesSelected:h,policyDescription:d,showEmailOrDropZone:a})]}),p2=o.div`
|
|
2802
|
-
display: flex;
|
|
2803
|
-
flex-direction: column;
|
|
2804
|
-
width: 100%;
|
|
2805
|
-
`,m2=o(Wl)`
|
|
2806
|
-
padding: ${n.sp2} ${n.sp3};
|
|
2807
|
-
margin: ${n.sp2} ${n.sp0} ${n.sp0};
|
|
2808
|
-
background-color: ${he.importantLight};
|
|
2809
|
-
border: 1px solid ${he.important};
|
|
2810
|
-
border-radius: ${n.sp2};
|
|
2811
|
-
color: ${he.important};
|
|
2812
|
-
text-align: center;
|
|
2813
|
-
`,{uncategorizedTransactionList:{missingReceipt:{bulkUpload:mn}}}=me.getLocalizedStrings(),g2=[{id:"all",label:mn.completedSubTabAll},{id:"ai_accountant",label:mn.completedSubTabAiAccountant},{id:"manual",label:mn.completedSubTabManual}],Ha=({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 mn.completedDescriptionAll;case"ai_accountant":return mn.completedDescriptionAi.replace("__count__",i.toString());case"manual":return mn.completedDescriptionManual;default:return mn.completedDescriptionAll}},[e,i]);return t.jsxs(x2,{children:[t.jsx(f2,{children:g2.map(u=>t.jsx(y2,{isActive:e===u.id,onClick:()=>{l(u.id)},children:t.jsx(st,{children:u.label})},u.id))}),a?t.jsxs(w2,{children:[e==="ai_accountant"?t.jsx(b2,{}):null,t.jsx(C2,{children:t.jsx(Re,{children:c})})]}):null]})},x2=o.div`
|
|
2814
|
-
display: flex;
|
|
2815
|
-
flex-direction: column;
|
|
2816
|
-
width: 100%;
|
|
2817
|
-
margin-top: ${n.sp4};
|
|
2818
|
-
`,f2=o.div`
|
|
2819
|
-
display: flex;
|
|
2820
|
-
align-items: center;
|
|
2821
|
-
gap: ${n.sp3};
|
|
2822
|
-
padding-bottom: ${n.sp3};
|
|
2823
|
-
`,y2=o.button`
|
|
2824
|
-
box-sizing: border-box;
|
|
2825
|
-
padding: ${n.sp1} ${n.sp2};
|
|
2826
|
-
border-radius: ${n.sp1};
|
|
2827
|
-
border: 1px solid
|
|
2828
|
-
${e=>e.isActive?e.theme.colors.primary:"transparent"};
|
|
2829
|
-
background-color: transparent;
|
|
2830
|
-
color: ${e=>e.isActive?e.theme.colors.primary:e.theme.colors.hero};
|
|
2831
|
-
cursor: ${e=>e.isActive?"default":"pointer"};
|
|
2832
|
-
transition:
|
|
2833
|
-
border-color 0.15s ease,
|
|
2834
|
-
color 0.15s ease;
|
|
2835
|
-
|
|
2836
|
-
&:hover {
|
|
2837
|
-
color: ${e=>e.theme.colors.primary};
|
|
2838
|
-
}
|
|
2839
|
-
`,w2=o.div`
|
|
2840
|
-
display: flex;
|
|
2841
|
-
align-items: center;
|
|
2842
|
-
justify-content: center;
|
|
2843
|
-
gap: ${n.sp1};
|
|
2844
|
-
padding-bottom: ${n.sp4};
|
|
2845
|
-
`,b2=o(Qt)`
|
|
2846
|
-
width: ${n.sp3};
|
|
2847
|
-
height: ${n.sp3};
|
|
2848
|
-
flex-shrink: 0;
|
|
2849
|
-
`,C2=o.div`
|
|
2850
|
-
color: ${e=>e.theme.colors.champion};
|
|
2851
|
-
text-align: center;
|
|
2852
|
-
`;async function v2(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 Nl(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 S2(e){const{authParams:i,bulkUploadEndpoint:l,onBulkUploadFilesFallback:r,onBulkUploadProgress:h,onBulkUploadSuccess:d}=e,[a,c]=s.useState(!1),[u,m]=s.useState(0),[p,g]=s.useState(!1),[x,y]=s.useState(null),C=s.useCallback(async T=>{const I=T.slice(0,En);if(m(I.length),c(!1),y(null),l!=null){g(!0);try{const w=await v2(l,i,I,y);h?.(100),await new Promise(k=>{window.setTimeout(k,dd)}),d?.(w.batch_id)}catch{y("Upload failed. Please try again.")}finally{g(!1)}}else r?.(I)},[l,i,h,d,r]),S=s.useCallback(T=>{T.preventDefault(),T.stopPropagation(),c(!0)},[]),$=s.useCallback(T=>{const I=T.relatedTarget,w=T.currentTarget;I&&w.contains(I)||(T.preventDefault(),T.stopPropagation(),c(!1))},[]),v=s.useCallback(T=>{T.preventDefault(),T.stopPropagation();const I=Array.from(T.dataTransfer.files).slice(0,En);I.length>0?C(I):c(!1)},[C]);return{isDraggingFiles:a,uploadFileCount:u,isUploading:p,uploadError:x,handleBulkUploadFiles:C,handleDragOver:S,handleDragLeave:$,handleDrop:v}}const k2=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"})),j2=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"})),$2=o.div`
|
|
2853
|
-
width: 100%;
|
|
2854
|
-
height: 100vh;
|
|
2855
|
-
display: flex;
|
|
2856
|
-
flex-direction: column;
|
|
2857
|
-
background: ${e=>e.theme.colors.grey4};
|
|
2858
|
-
box-shadow: ${e=>e.theme.colors.elevation1};
|
|
2859
|
-
`,I2=o.div`
|
|
2860
|
-
display: flex;
|
|
2861
|
-
flex-direction: column;
|
|
2862
|
-
align-items: center;
|
|
2863
|
-
min-width: 100%;
|
|
2864
|
-
min-height: 0;
|
|
2865
|
-
flex: 1;
|
|
2866
|
-
|
|
2867
|
-
${e=>e.theme.breakpoints.down("md")} {
|
|
2868
|
-
width: 100%;
|
|
2869
|
-
padding-left: ${n.sp0};
|
|
2870
|
-
}
|
|
2871
|
-
`,qa=o(Ul)`
|
|
2872
|
-
height: ${n.sp3};
|
|
2873
|
-
width: ${n.sp3};
|
|
2874
|
-
cursor: pointer;
|
|
2875
|
-
color: inherit;
|
|
2876
|
-
`,Ka=o(k2)`
|
|
2877
|
-
height: ${n.sp3};
|
|
2878
|
-
width: ${n.sp3};
|
|
2879
|
-
cursor: pointer;
|
|
2880
|
-
color: inherit;
|
|
2881
|
-
`,{common:{footer:ze,texts:{maxLimitReached:T2,confirmAction:L2},headers:Ol,create:A2,strings:Nn,texts:An,cancel:R2,confirm:E2,monthsByIndex:D2},dateFormat:{visual:{MMMDCommaYYYYformat:Ja}},expenseAutomation:Rn,uncategorizedTransactionList:{missingReceipt:{bulkUpload:Qa}}}=me.getLocalizedStrings(),M2=({setActivityLogTransactionId:e})=>{const{selectedTransactionId:i}=zi(),l=Tt(),[r,h]=s.useState(!1);return i==null?null:t.jsx(xe,{title:Rn.transactions.header.activity,placement:"bottom",children:t.jsx(X2,{"data-testid":D("panel-activity-button"),onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),onClick:d=>{d.stopPropagation(),e(i)},children:t.jsx(ew,{style:{color:r?l.colors.primary:l.colors.hero}})})})},bw=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:S,initialMissingReceiptsTab:$,resetTransactionCategorizationLocalData:v,updateOperatingExpensesIdsForReview:T,clearJeScheduleLocalData:I,onSaveReconciliation:w}=e,k=e.bulkUploadEndpoint!=null||e.onBulkUploadFiles!=null,j=S2({authParams:e.authParams,bulkUploadEndpoint:e.bulkUploadEndpoint,onBulkUploadProgress:e.onBulkUploadProgress,onBulkUploadSuccess:e.onBulkUploadSuccess,onBulkUploadFilesFallback:e.onBulkUploadFiles}),{currentSelectedView:b,allSteps:P,missingReceipts:A,jeSchedules:R,fluxAnalysis:F,monthEndInsights:V,transactionView:q,selectedTransactionCategorizationTab:M,reconciliation:O,selectedPeriod:re}=i,{pendingMissingReceiptsTabNavigation:B}=A,[L,U]=s.useState("expenseAutomationPage"),[X,ce]=s.useState(()=>{}),[ge,te]=s.useState(!1),J=Ce(),ee=!!e.loggedInUser?.userEmail?.includes("zeni.ai"),H=ee?Xa:er,{openThread:_,setOpenThread:ne}=s.useContext(H),[W,Z]=s.useState(!1),[ie,K]=s.useState(!1),[N,z]=s.useState($??"missing"),oe=s.useRef(null);s.useEffect(()=>{const Le=oe.current;Le!==null&&Le!==N&&S?.(),oe.current=N},[N,S]);const Y=s.useCallback(Le=>{z(Le)},[]),[G,ke]=s.useState(null),Ie=s.useCallback(Le=>{ke(Le),U(Le!=null?"expenseAutomationMissingReceipts":"expenseAutomationPage")},[U]),E=e.bulkUploadSelector?.confirmMatchStatus.fetchState,de=s.useRef(void 0);s.useEffect(()=>{de.current==="In-Progress"&&E==="Completed"&&G!=null&&(Ie(null),y?.()),de.current=E},[E,G,Ie,y]),s.useEffect(()=>{N!=="unmatched"&&Ie(null)},[N,Ie]),s.useEffect(()=>{B==="unmatched"&&(k&&Y("unmatched"),C?.())},[B,C,k,Y]),s.useEffect(()=>{k===!1&&(N==="unmatched"||N==="completed")&&Y("missing")},[k,N,Y]);const je=P.find(Le=>Le.step===b),{nextStep:Me,previousStep:De}=P2(P,b),{uiState:{searchString:Fe,pageToken:ve},totalCountByTab:et,transactions:ht,fetchStateByTransactionTabs:tt,transactionLocalData:fe}=q,{selectedReconAccount:Be,reconciliationTabsState:{reconcile:{localData:{selectedTransactionIds:Vt}}}}=O;let nt="Not-Started",pt="complete";switch(b){case"missing_receipts":nt=A.refreshStatus.fetchState,pt=A.completionStatus;break;case"je_schedules":nt=R.refreshStatus.fetchState,pt=R.completionStatus;break;case"month_end_insights":V!=null&&(nt=V?.fetchState);break;case"flux_analysis":nt=F.refreshStatus.fetchState,pt=F.completionStatus;break;case"transaction_categorization":nt=q.refreshStatus.fetchState,pt=q.completionStatus;break;case"reconciliation":Be==null?(nt=O.refreshStatus.fetchState,pt=O.completionStatus):(nt=O.selectedReconAccount?.refreshStatus.fetchState??"Not-Started",pt=O.completionStatus)}const Lt=()=>{X()},{saveStatus:Ee,selectedCheckBoxTransactionIds:$e}=q,Ke=()=>{const Le=Yr(i.fluxAnalysis.sections,i.fluxAnalysis.reviewOperatingExpensesIds);switch(L){case"expenseAutomationFluxPage":return{formId:"expenseAutomationFluxPage",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Le===!0?ze.markAsReviewed:An.undo,style:{justifyContent:"space-evenly"},isLoading:i.fluxAnalysis.bulkReviewStatus.fetchState==="In-Progress",isDisabled:!1},leftSideComponent:So(i.fluxAnalysis.reviewOperatingExpensesIds.length,zr,J,An.vendor,b),cancelBtn:{label:ze.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>{T([])}}};case"expenseAutomationTransactionsPage":return{formId:"expenseAutomationTransactionsPage",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:ze.save,style:{minWidth:"96px",justifyContent:"space-evenly"},isLoading:Ee.fetchState==="In-Progress",isDisabled:!1},leftSideComponent:So($e.length,Wn,J,An.transaction,b),cancelBtn:{label:ze.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>{v(M,ht.map(Ge=>Ge.id),re,!1,et[M],ys(fe,M),h,ve)}}};case"expenseAutomationJESchedulePage":return{formId:"expenseAutomationJESchedulePage",nextBtnLabel:ze.next,backBtnLabel:ze.back,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:ze.next,style:{justifyContent:"space-evenly"},isDisabled:l||je?.isNextDisabled,suffixIcon:t.jsx(qa,{}),onClick:()=>{u(Me.step)}},cancelBtn:{label:ze.back,isDisabled:l||je?.isPrevDisabled,style:{width:"96px",justifyContent:"space-evenly"},prefixIcon:t.jsx(Ka,{}),onClick:()=>{u(De.step)}}};case"expenseAutomationBankReconReconcilePage":return{formId:"expenseAutomationBankReconReconcilePage",nextBtnLabel:ze.reconcile,backBtnLabel:ze.saveForLater,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:ze.reconcile,onClick:()=>{w({reconcileAction:"reconcile"})},isDisabled:O.reconciliationTabsState.balances.variance.amount!==0,isLoading:O.actionFetchStates.reconcileFetch.fetchState==="In-Progress",style:{justifyContent:"space-evenly",minWidth:132}},leftSideComponent:So(Vt.length,1/0,J,An.transaction,b),cancelBtn:{onClick:()=>{w({reconcileAction:"save_reconcile_for_later"})},reverseSpinnerColor:!1,isLoading:O.actionFetchStates.saveForLaterFetch.fetchState==="In-Progress",label:ze.saveForLater,style:{minWidth:132,justifyContent:"space-evenly"}}};case"expenseAutomationJEAccountSettingsPage":return{formId:"expenseAutomationJEAccountSettingsPage",nextBtnLabel:ze.save,backBtnLabel:ze.cancel,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:ze.save,isLoading:R.accountSettingsView.saveState.fetchState==="In-Progress",style:{justifyContent:"space-evenly",minWidth:82}},cancelBtn:{onClick:()=>Lt(),label:ze.cancel,style:{minWidth:82,justifyContent:"space-evenly"}}};case"expenseAutomationMissingReceipts":return{formId:"expenseAutomationMissingReceipts",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Qa.confirmMatch,isLoading:e.bulkUploadSelector?.confirmMatchStatus.fetchState==="In-Progress",isDisabled:G==null||e.bulkUploadSelector?.confirmMatchStatus.fetchState==="In-Progress",style:{minWidth:"96px",justifyContent:"space-evenly"},onClick:()=>{G!=null&&e.bulkUploadSelector?.confirmMatchStatus.fetchState!=="In-Progress"&&e.onConfirmBulkUploadMatch?.(G.batchId,G.attachmentId,G.transactionId,G.transactionType,G.fileName)}},cancelBtn:{label:ze.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>Ie(null)}};default:{const Ge=b==="reconciliation"&&i.reconciliation.selectedTab==="review"&&i.reconciliation.selectedAccountId!=null,Ct=b==="reconciliation"&&i.reconciliation.selectedAccountId==null,si=b==="reconciliation"&&i.reconciliation.selectedTab==="reconcile"&&i.reconciliation.selectedAccountId!=null,vt=Me.step==="month_end_insights"&&(b==="flux_analysis"&&(i.fluxAnalysis.sections.generalExpense?.balancesByMonth!=null||i.fluxAnalysis.sections.reimbursement?.balancesByMonth!=null)||Ct),ai=b==="transaction_categorization"&&i.selectedTransactionCategorizationTab==="review",ri=b==="transaction_categorization"&&i.selectedTransactionCategorizationTab==="autoCategorized",li=i.monthEndCloseChecksView.monthEndCloseChecks?.monthEndCloseCheckList.find(On=>On.id==="month_end_insights"),Ui=i.monthEndCloseChecksView.monthEndCloseChecks?.reportEmailSentDate==null&&li?.isDisabled===!1&&(r||je?.isNextDisabled===!1),lt=Me.step==="month_end_insights"&&(Ct||b==="flux_analysis")?!Ui:je?.isNextDisabled===!0;return{formId:"expenseAutomationPage",nextBtnLabel:ze.next,backBtnLabel:ze.back,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:vt===!0?z2(i.selectedPeriod.month):ze.next,style:{justifyContent:"space-evenly"},isDisabled:lt,suffixIcon:t.jsx(qa,{}),onClick:()=>{ai?a("autoCategorized"):Ge?c("reconcile"):u(Me.step)}},cancelBtn:{label:ze.back,isDisabled:l||je?.isPrevDisabled,style:{width:"96px",justifyContent:"space-evenly"},prefixIcon:t.jsx(Ka,{}),onClick:()=>{ri?a("review"):si?c("review"):Ge?x():u(De.step)}}}}}},ye=()=>{switch(L){case"expenseAutomationFluxPage":return{confirmAction:()=>{Z(!1),T([]),g()}};case"expenseAutomationTransactionsPage":return{confirmAction:()=>{Z(!1),v(M,ht.map(Le=>Le.id),re,!1,et[M],ys(fe,M),h,ve),g()}};case"expenseAutomationJESchedulePage":return{confirmAction:()=>{Z(!1),I(),g()}};default:return{confirmAction:()=>{Z(!1)},confirmationDescription:Nn.empty}}},_e=()=>{L==="expenseAutomationFluxPage"||L==="expenseAutomationJESchedulePage"||L==="expenseAutomationTransactionsPage"?Z(!0):g()},{primaryBtn:wt,cancelBtn:fn,leftSideComponent:Qe}=Ke(),{confirmAction:yn}=ye(),wn=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:Ct}=Ge;return Ct==null?{count:0,isFetching:!1}:Le==="review"?{count:Ge.accountReconciliationsByAccountID[Ct]?.accountReconEntity?.transactionsToReview.length,isFetching:Ge.accountReconciliationsByAccountID[Ct]?.transactionFetchState.fetchState==="In-Progress"}:{count:Ge.accountReconciliationsByAccountID[Ct]?.accountReconEntity?.transactionsToReconcile.length,isFetching:Ge.accountReconciliationsByAccountID[Ct]?.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:N==="unmatched"&&jl({bulkUploadSelector:e.bulkUploadSelector})};if(Le==="completed")return{count:e.bulkUploadSelector?.completedTransactions?.totalCount??0,isFetching:e.bulkUploadSelector?.completedTransactions?.fetchState?.fetchState==="In-Progress",hideCountInTab:!0}}},bt=b==="reconciliation"&&O.selectedAccountId!=null&&O.selectedReconAccount!=null,{month:Yt,year:Zt}=re,Xt=cd().set("month",Yt-1).set("year",Zt),ti=Xt.startOf("month").format(Ja),Dn=Xt.endOf("month").format(Ja),_i=`${ti} ${Nn.hyphen} ${Dn}`,en=e.sidePanelIsOpen??!1,tn=e.sidePanelIsFullView??!1,Mn=b==="missing_receipts"&&N==="missing"&&k,ni=e.bulkUploadSelector?.phase,Vi=e.bulkUploadSelector?.progress.total!=null&&e.bulkUploadSelector.progress.total>0?e.bulkUploadSelector.progress.total:j.uploadFileCount,Ni=N==="completed"&&e.bulkUploadSelector!=null&&e.bulkUploadSelector.completedTransactions.fetchState.fetchState==="Completed"&&e.bulkUploadSelector.completedTransactions.totalCount===0,ii={bulkUploadPhase:ni,isDraggingFiles:j.isDraggingFiles,isUploading:j.isUploading===!0,matchingProgressBannerTotal:Vi,onFilesSelected:j.handleBulkUploadFiles,policyDescription:Ni?"":Qa.policyDescription,showEmailOrDropZone:j.isUploading!==!0&&ni!=="matching",uploadError:j.uploadError,uploadFileCount:j.uploadFileCount,uploadProgressPercent:e.bulkUploadSelector?.uploadProgress??0},oi=b==="missing_receipts"&&N==="completed"&&k&&e.bulkUploadSelector!=null,We={onDragLeave:j.handleDragLeave,onDragOver:j.handleDragOver,onDrop:j.handleDrop},bn=Mn===!0&&!(en&&tn)?t.jsx(Pa,{...We,children:t.jsx(Wa,{...ii})}):oi===!0&&!(en&&tn)&&e.bulkUploadSelector!=null?t.jsx(Ha,{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($2,{children:[W?t.jsx(Pl,{containerStyle:{width:356},titleComponent:t.jsx(U2,{children:L2}),primaryButtonText:E2,secondaryButtonText:R2,proceedButtonVariant:"danger",action:{onOkClick:()=>{yn()},onCancelClick:()=>Z(!1)},descriptionComponent:t.jsx(W2,{children:Rn.confirmationDescription})}):null,t.jsx(Fl,{isOpen:e.sidePanelIsOpen??!1,isFullView:e.sidePanelIsFullView??!1,panelContent:e.panelContent,panelActionBarContent:e.isTransactionActivityEnabled?t.jsx(M2,{setActivityLogTransactionId:e.setActivityLogTransactionId}):null,headerContent:t.jsx(iu,{hideEmptyDivBelowTabs:b==="missing_receipts",onBack:x,navBarCustomElement:b==="reconciliation"&&O.selectedAccountId!=null?t.jsx(O2,{reconciliation:O}):void 0,onReconTabUpdate:c,currentRecontab:O.selectedTab,bulkUploadPhase:e.bulkUploadSelector?.phase,currentMissingReceiptsTab:N,onMissingReceiptsTabUpdate:Y,reconcileDetailPageFetchState:O.selectedAccountId!=null?O.accountReconciliationsByAccountID[O.selectedAccountId]?.transactionFetchState.fetchState:"Not-Started",selectedReconAccountId:bt?O.selectedAccountId:void 0,currentSelectedView:b,titleStyle:{justifyContent:"center",marginLeft:n.sp0},headerData:He(b,et.autoCategorized,bt?O.selectedAccountId:void 0,bt?O.selectedReconAccount?.accountReconEntity?.account.accountName:void 0,bt?_i:void 0,b==="missing_receipts"?{includeBulkUploadTabs:k,navTitle:k?Ol.receipts:void 0}:void 0),searchText:Fe,currentTab:M,getTabCountAndFetchState:wn,completionStatus:pt,forceShowSubtitle:ge===!0||b==="je_schedules"&&(R.fetchState==="In-Progress"||R.accountSettingsView.fetchState==="In-Progress"),refreshStatus:nt,companyId:e.companyId,companyName:i.monthEndInsights?.companyName??Nn.empty,isZeniUser:ee,onAllThreadsClick:()=>{_!=null&&ne(null),K(!0)},onUpdateTab:a,onSearchTextChanged:m,onRefresh:b==="missing_receipts"?()=>{switch(N){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:bn}),listContent:t.jsxs(I2,{children:[b==="missing_receipts"?t.jsx(yy,{missingReceiptsTab:N,missingTransactionCount:A.transactions.length,missingReceiptsBulkUploadChromeInPageBody:Mn===!0&&en&&tn?t.jsx(Pa,{...We,children:t.jsx(Wa,{...ii})}):null,missingReceiptsCompletedChromeInPageBody:oi===!0&&en&&tn&&e.bulkUploadSelector!=null?t.jsx(Ha,{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:re,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:G?.attachmentId??null,pendingMatchTransactionId:G?.transactionId??null,onMissingReceiptsRowClick:e.onMissingReceiptsRowClick,onSetBulkUploadCompletedSubTab:e.onSetBulkUploadCompletedSubTab,onSetBulkUploadSortConfig:e.onSetBulkUploadSortConfig,onResetBulkUploadSort:e.onResetBulkUploadSort,setMissingReceiptsTab:Y,tableSectionProps:{parentProps:e,isCOTEnabled:d,setIsJeAccountSettingsOpened:te,setResetJeAccountSettingsForm:ce,allThreadsSectionOpen:ie,setCurrentFooterFormId:U,currentFooterFormId:L,onCloseAllThreadsSection:()=>K(!1)}}):t.jsx(fl,{...e,isCOTEnabled:d,setIsJeAccountSettingsOpened:te,setResetJeAccountSettingsForm:ce,allThreadsSectionOpen:ie,setCurrentFooterFormId:U,currentFooterFormId:L,onCloseAllThreadsSection:()=>K(!1)}),t.jsx(Ye,{controller:b!=="month_end_insights"&&e.sidePanelIsOpen!==!0,children:t.jsx(tr,{style:{width:"-webkit-fill-available",maxHeight:f[8]},formId:F2(L),primaryBtn:wt,leftSideComponent:Qe,cancelBtn:fn,separatorStyle:{marginRight:n.sp4}})})]})})]})},O2=({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(H2,{children:t.jsxs(q2,{children:[t.jsxs(ko,{style:{justifyContent:"flex-end",width:"50%"},children:[t.jsx(jo,{children:t.jsx(K2,{})}),t.jsx($o,{children:m?.fetchState==="In-Progress"?t.jsxs(Lo,{children:[t.jsx($n,{height:25,width:120}),t.jsx($n,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsx(To,{children:it("0,0.00",c)}),t.jsx(Io,{children:Rn.accountRecon.reconciliation.headers.bankBalance})]})})]}),t.jsxs(ko,{children:[t.jsx(jo,{children:t.jsx(Q2,{})}),t.jsx($o,{children:m?.fetchState==="In-Progress"?t.jsxs(Lo,{children:[t.jsx($n,{height:25,width:120}),t.jsx($n,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsx(To,{children:it("0,0.00",l)}),t.jsxs(Y2,{children:[t.jsx(Io,{children:Rn.accountRecon.reconciliation.headers.clearedBalance}),t.jsx(xe,{placement:"bottom",title:t.jsxs(Z2,{children:[t.jsxs(Ga,{children:[t.jsxs(Ya,{children:[a.count," ",An.payments]}),t.jsx(Za,{children:it("0,0.[00]",a.totalAmount)})]}),t.jsxs(Ga,{children:[t.jsxs(Ya,{children:[d.count," ",An.deposits]}),t.jsx(Za,{children:it("0,0.[00]",d.totalAmount)})]})]}),display:"flex",children:t.jsx(G2,{})})]})]})})]}),t.jsxs(ko,{style:{justifyContent:"flex-start",width:"50%"},children:[t.jsx(jo,{children:t.jsx(J2,{})}),t.jsx($o,{children:m?.fetchState==="In-Progress"?t.jsxs(Lo,{children:[t.jsx($n,{height:25,width:120}),t.jsx($n,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsxs(To,{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(Io,{children:Rn.accountRecon.reconciliation.headers.variance})]})})]})]})})},So=(e,i,l,r,h)=>{const d=r,a=(e>1?d+"s":d)+" selected";return e>0?t.jsxs(B2,{currentView:h,style:l==="small"?{position:"absolute",top:n.sp2,left:`-${n.sp5}`}:{},children:[t.jsx(_2,{multiDigit:e>=5,children:e}),t.jsx(V2,{children:a}),e===i?t.jsx(N2,{children:`(${T2})`}):null]}):null},z2=e=>{const i=D2[e];return`${A2}${Nn.space}${i}${Nn.space}${Ol.insights}`};function P2(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 F2=e=>`${e}_form`,B2=o.div`
|
|
2882
|
-
display: flex;
|
|
2883
|
-
justify-content: flex-start;
|
|
2884
|
-
align-items: center;
|
|
2885
|
-
gap: ${n.sp2};
|
|
2886
|
-
margin-left: ${e=>e.currentView==="flux_analysis"?"36px":n.sp8};
|
|
2887
|
-
`,_2=o(Ze)`
|
|
2888
|
-
height: 18px;
|
|
2889
|
-
width: ${e=>e.multiDigit?"auto":"18px"};
|
|
2890
|
-
padding: ${n.sp0} 6px;
|
|
2891
|
-
border-radius: ${n.sp12};
|
|
2892
|
-
border: ${e=>`1px solid ${e.theme.colors.primary}`};
|
|
2893
|
-
display: flex;
|
|
2894
|
-
justify-content: center;
|
|
2895
|
-
align-items: center;
|
|
2896
|
-
`,V2=o(Re)`
|
|
2897
|
-
color: ${e=>e.theme.colors.primary};
|
|
2898
|
-
`,N2=o(st)`
|
|
2899
|
-
color: ${he.important};
|
|
2900
|
-
`,U2=o(zl)`
|
|
2901
|
-
margin-top: ${n.sp5};
|
|
2902
|
-
padding-left: ${n.sp8};
|
|
2903
|
-
padding-right: ${n.sp8};
|
|
2904
|
-
color: ${e=>e.theme.colors.primary};
|
|
2905
|
-
word-break: break-word;
|
|
2906
|
-
`,W2=o(Bl)`
|
|
2907
|
-
color: ${e=>e.theme.colors.primary};
|
|
2908
|
-
margin-top: ${n.sp2};
|
|
2909
|
-
margin-bottom: ${n.sp2};
|
|
2910
|
-
`,H2=o.div`
|
|
2911
|
-
display: flex;
|
|
2912
|
-
justify-content: center;
|
|
2913
|
-
align-items: center;
|
|
2914
|
-
padding: ${n.sp3} ${n.sp0};
|
|
2915
|
-
`,q2=o.div`
|
|
2916
|
-
width: 100%;
|
|
2917
|
-
display: flex;
|
|
2918
|
-
justify-content: center;
|
|
2919
|
-
align-items: center;
|
|
2920
|
-
gap: ${n.sp1};
|
|
2921
|
-
`,ko=o.div`
|
|
2922
|
-
display: flex;
|
|
2923
|
-
justify-content: center;
|
|
2924
|
-
align-items: center;
|
|
2925
|
-
gap: ${n.sp3};
|
|
2926
|
-
`,jo=o.div`
|
|
2927
|
-
width: ${n.sp7};
|
|
2928
|
-
height: ${n.sp7};
|
|
2929
|
-
border-radius: 50%;
|
|
2930
|
-
display: flex;
|
|
2931
|
-
justify-content: center;
|
|
2932
|
-
align-items: center;
|
|
2933
|
-
background-color: ${e=>e.theme.mode==="dark"?e.theme.colors.brandColorJadeDark:e.theme.colors.brandColorJadeLight};
|
|
2934
|
-
`,$o=o.div`
|
|
2935
|
-
display: flex;
|
|
2936
|
-
flex-direction: column;
|
|
2937
|
-
`,Io=o(st)`
|
|
2938
|
-
color: ${e=>e.theme.colors.hero};
|
|
2939
|
-
`,To=o(Kn)`
|
|
2940
|
-
min-width: 180px;
|
|
2941
|
-
color: ${e=>e.theme.colors.primary};
|
|
2942
|
-
`,K2=o(Ql)`
|
|
2943
|
-
color: ${e=>e.theme.colors.primary};
|
|
2944
|
-
width: ${n.sp4};
|
|
2945
|
-
height: ${n.sp4};
|
|
2946
|
-
`,J2=o(Gl)`
|
|
2947
|
-
color: ${e=>e.theme.colors.primary};
|
|
2948
|
-
width: ${n.sp4};
|
|
2949
|
-
height: ${n.sp4};
|
|
2950
|
-
`,Q2=o(j2)`
|
|
2951
|
-
color: ${e=>e.theme.colors.primary};
|
|
2952
|
-
width: ${n.sp4};
|
|
2953
|
-
height: ${n.sp4};
|
|
2954
|
-
`,G2=o(or)`
|
|
2955
|
-
width: ${n.sp3};
|
|
2956
|
-
height: ${n.sp3};
|
|
2957
|
-
color: ${e=>e.theme.colors.hero};
|
|
2958
|
-
:hover {
|
|
2959
|
-
color: ${e=>e.theme.colors.primary};
|
|
2960
|
-
}
|
|
2961
|
-
`,Y2=o.div`
|
|
2962
|
-
display: flex;
|
|
2963
|
-
align-items: center;
|
|
2964
|
-
gap: ${n.sp1};
|
|
2965
|
-
`,Z2=o.div`
|
|
2966
|
-
background-color: ${he.overlayDark};
|
|
2967
|
-
padding: 2px ${n.sp2};
|
|
2968
|
-
border-radius: ${n.sp1};
|
|
2969
|
-
`,Ga=o.div`
|
|
2970
|
-
display: flex;
|
|
2971
|
-
justify-content: space-between;
|
|
2972
|
-
gap: ${n.sp2};
|
|
2973
|
-
`,Ya=o.div`
|
|
2974
|
-
text-transform: capitalize;
|
|
2975
|
-
`,Za=o(st)`
|
|
2976
|
-
color: ${he.primaryDark};
|
|
2977
|
-
align-self: "flex-end";
|
|
2978
|
-
`,$n=o(ot)`
|
|
2979
|
-
border-radius: ${n.sp2};
|
|
2980
|
-
`,Lo=o.div`
|
|
2981
|
-
display: flex;
|
|
2982
|
-
flex-direction: column;
|
|
2983
|
-
min-width: 180px;
|
|
2984
|
-
gap: ${n.sp1};
|
|
2985
|
-
`,X2=o.button`
|
|
2986
|
-
background: none;
|
|
2987
|
-
border: none;
|
|
2988
|
-
cursor: pointer;
|
|
2989
|
-
padding: ${n.sp1};
|
|
2990
|
-
border-radius: ${n.sp1};
|
|
2991
|
-
display: flex;
|
|
2992
|
-
align-items: center;
|
|
2993
|
-
justify-content: center;
|
|
2994
|
-
|
|
2995
|
-
&:hover {
|
|
2996
|
-
background: ${({theme:e})=>e.colors.grey4};
|
|
2997
|
-
}
|
|
2998
|
-
`,ew=o(hl)`
|
|
2999
|
-
width: ${n.sp4};
|
|
3000
|
-
height: ${n.sp4};
|
|
3001
|
-
`;export{U2 as ConfirmationPopUpTitle,bw as default,P2 as getNextAndPreviousSteps,F2 as uniqueFormName};
|