@zeniai/web-cockpit-ui 1.14.6-qa → 1.14.7-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.
Files changed (231) hide show
  1. package/dist/assets/{ACHDetailsPage-DgGGv2hx-DhGqxCnw.js → ACHDetailsPage-CYMIIaPh-C8Zl6MLV.js} +3 -3
  2. package/dist/assets/{AIPerformancePage-cpZUms56-qBalK6QF.js → AIPerformancePage-DpQIi2ZW-BO0NE_2F.js} +35 -35
  3. package/dist/assets/{AccountInfoPage-CFLaCiT5-DqoBEOc-.js → AccountInfoPage-Sh-82JXU-CKtI4bnL.js} +5 -5
  4. package/dist/assets/{AccountInfoPageContent-DtAZ50Qc-BeekofSV.js → AccountInfoPageContent-CsHvwqHd-BlW8CgcU.js} +13 -13
  5. package/dist/assets/{AccountReconDetailsDrawerPage-CMN1zNHW-CL-ockWE.js → AccountReconDetailsDrawerPage-DlKlKwh2-DpdK7fsT.js} +16 -16
  6. package/dist/assets/{AccountRow-DAc1wwY9-C0HqOA9-.js → AccountRow-CtIoeB6x-B01gigKX.js} +17 -17
  7. package/dist/assets/{AccountsPromoCardStack-Bp1wRT6M-CYo6jPNU.js → AccountsPromoCardStack-XGoMEJWB-ClZD8Pkf.js} +15 -15
  8. package/dist/assets/{AddAddressForCardDrawer-ChDzvTVq-GLR6_t5g.js → AddAddressForCardDrawer-C6Sfh784-BO6CLNaD.js} +2 -2
  9. package/dist/assets/{AddToWalletPage-BvrcjDhk-NkMR8hRQ.js → AddToWalletPage-CzD2AhWP-GEi12jel.js} +13 -13
  10. package/dist/assets/{AgingReportsPage-CzYUWOIt-CJFG9hw0.js → AgingReportsPage-D9YcQ7A--jEVrKNWY.js} +7 -7
  11. package/dist/assets/{AllUserItems-XxV2Tu4Y-sbn-nokE.js → AllUserItems-BtS-YtE0-oBJempiY.js} +7 -7
  12. package/dist/assets/{ApAgingDetailPage-DTXhjXRb-tDKmCLbA.js → ApAgingDetailPage-BTJqRp9j-CVJ5DZ9g.js} +4 -4
  13. package/dist/assets/{AppBasePage-Cfiv8Ecs-UJWdcIkl.js → AppBasePage-B5fgkJHL-nKspGTEB.js} +4 -4
  14. package/dist/assets/{AppDrawerContent-ggBgpYsv-BhuQV-gE.js → AppDrawerContent-C1lzepXw-Dt703jdK.js} +6 -6
  15. package/dist/assets/{ApprovalRulesSettingsPage-BlRSdCTV-LrZASIni.js → ApprovalRulesSettingsPage-Bqt15rR_-CJ2-js2Y.js} +7 -7
  16. package/dist/assets/{ArAgingChart-C7_e1ezL-Cfi6j3Jg.js → ArAgingChart-BGVvhkR5-CfmO25FB.js} +6 -6
  17. package/dist/assets/{ArAgingDetailPage-DhjFbj4K-sRIzddV0.js → ArAgingDetailPage-Ddp7z3e8-BWaOoITE.js} +2 -2
  18. package/dist/assets/{AttachmentView-CQD-yy-o-1NVaWP30.js → AttachmentView-pcpYs-s8-D808dzO5.js} +5 -5
  19. package/dist/assets/{BankAccountSection-CmOHWLFq-vSt2i69h.js → BankAccountSection-CmXQQBck-BXf6w0tF.js} +4 -4
  20. package/dist/assets/{BankAccountWarningSection-DsBsO84p-Br5XLEf9.js → BankAccountWarningSection-Dp7qMaI2-DCN96rsg.js} +5 -5
  21. package/dist/assets/{BankConnectionsSettingsPage-Cz6smhXo-Cdgop5x9.js → BankConnectionsSettingsPage-ldzD1a4O-CXgyrIw4.js} +38 -38
  22. package/dist/assets/{BillDetailPage-CYa0EITJ-0aSYVKGp.js → BillDetailPage-CBubcYMe-BO_dFsg-.js} +11 -11
  23. package/dist/assets/{BillPayApprovalRuleDetailPage-BbU_Q81T-BVCvUvRL.js → BillPayApprovalRuleDetailPage-BxiRr1tP-COYx8jcO.js} +1 -1
  24. package/dist/assets/{BillPayApprovalRulesPage-D8ehXeiO-I0Ym-A1W.js → BillPayApprovalRulesPage-CLBGuxUe-fnAlfa5X.js} +8 -8
  25. package/dist/assets/{BillPayPromoPage-DuaA85G4-CW37fYt2.js → BillPayPromoPage-C3takK8D-DwgwIjWq.js} +1 -1
  26. package/dist/assets/{BillPaySetUpPage-BH06l9Hv-BQ5XuNfG.js → BillPaySetUpPage-CweOkcc2-D46-_5BW.js} +2 -2
  27. package/dist/assets/{BillingSettingsPage-BUas93LA-Bw3kXQzV.js → BillingSettingsPage-BQSZ6DMP-DRARmVD3.js} +7 -7
  28. package/dist/assets/{BillsBulkReviewDrawerPage-D6cSAH1--Dypef8h4.js → BillsBulkReviewDrawerPage-3trPH78u-CF22gH7n.js} +1 -1
  29. package/dist/assets/{BoxItem-D88gMTQn-D46Yo25S.js → BoxItem-Bf7JemSM-D8tvXCvN.js} +1 -1
  30. package/dist/assets/{BusinessVerificationPage-rX7_wUAW-C4OzNGUb.js → BusinessVerificationPage-DXODyk9C-B5e28vsE.js} +8 -8
  31. package/dist/assets/{CardNumberSubText-CxTVkF4V-iWi8Ysv4.js → CardNumberSubText-ByVXSDZX-CD-Gw7wf.js} +1 -1
  32. package/dist/assets/{CashbackDetailPage-DdDMDW2I-DEFkWzKF.js → CashbackDetailPage-9RLOXq5b-DSEoSjiZ.js} +23 -23
  33. package/dist/assets/{ChargeCardDetailPage-JrO7h-ff-CM_N7uQT.js → ChargeCardDetailPage-lkNsxEdO-e-8D7tkI.js} +1 -1
  34. package/dist/assets/{ChargeCardListPage-CelWKqSg-Dhoo911d.js → ChargeCardListPage-DV25pQMP-BgesY_b4.js} +1 -1
  35. package/dist/assets/{ChargeCardListTable-B4c4WFSq-DJFUY7lB.js → ChargeCardListTable-CSWl05jK-CRlk7PbR.js} +25 -25
  36. package/dist/assets/ChargeCardPromoPage-Cv34m9BS-BmZiFW4y.js +219 -0
  37. package/dist/assets/{ChargeCardSetupPage-PQAwr78u-msQYLFMS.js → ChargeCardSetupPage-7mEdImT--BWhFbFIQ.js} +1 -1
  38. package/dist/assets/{ChargeCardStatementsPage-DVPKN4xX-BDfS62On.js → ChargeCardStatementsPage-D_rKdZ5c-DUDd82r_.js} +3 -3
  39. package/dist/assets/{ChargeCardUtils-BQZTS-KQ-DN5emI4w.js → ChargeCardUtils-BB7l65Bf-DfL6sW6K.js} +1 -1
  40. package/dist/assets/{ChaseOverlay-DveM_aY_-SrUhZ-KA.js → ChaseOverlay-hsrWeA5X-B3bQwtbG.js} +5 -5
  41. package/dist/assets/{CheckDepositDrawerPage-DoMhVKPu-BWBUN8tI.js → CheckDepositDrawerPage-CZNH4rCm-CxSsvi_m.js} +19 -19
  42. package/dist/assets/{CollapsableReportTable-CWIVhYku-DzNE0ECl.js → CollapsableReportTable-C73RBmaZ-A1Br721z.js} +46 -46
  43. package/dist/assets/{CompanyOfficerDetailsSection-Ci47swN_-GWpqyiJH.js → CompanyOfficerDetailsSection-CZWTSWyp-BOVUWJjT.js} +34 -34
  44. package/dist/assets/{CompanyPassportCard-Bw2TdWs0-BiZohcbB.js → CompanyPassportCard-D-hYeDRN-Bo9rwkQb.js} +3 -3
  45. package/dist/assets/{CompanyPassportPage-CKIihOM0-D1cXLT0P.js → CompanyPassportPage-fQ60DR7u-DD7YvAPU.js} +12 -12
  46. package/dist/assets/CompleteProfile-DnBzaAdT-JcsdBGpZ.js +52 -0
  47. package/dist/assets/{ConfettiBurst-CU6fcwCz-CJlWrE_E.js → ConfettiBurst-D5XTvsuG-Dl2X4lye.js} +1 -1
  48. package/dist/assets/{CreateOrEditVendorPage-BoDt1Ez7-DgN-5P6-.js → CreateOrEditVendorPage-7KdDJirx--0K-JjCB.js} +10 -10
  49. package/dist/assets/{CreditCardPaymentDrawerPage-D7Hka4sI-XMOTHoN6.js → CreditCardPaymentDrawerPage-BNJLUnlH-D5HY42Lo.js} +15 -15
  50. package/dist/assets/{CreditCardPaymentPlgSection-C86KVs5o-CMHP3c_1.js → CreditCardPaymentPlgSection-BwqznNRc-DXBqgi-A.js} +10 -10
  51. package/dist/assets/{CurrencySelectField-B0VTg3Rt-Dd3IQIDs.js → CurrencySelectField-PwurThUn-qsqObS4L.js} +5 -5
  52. package/dist/assets/{CustomerOnboardingActivationPage-oegOz3kP-D9IgnjCf.js → CustomerOnboardingActivationPage-CHJLyOyf-vC6AUxAJ.js} +1 -1
  53. package/dist/assets/CustomerOnboardingContainerPage-DyM4sCZd-DLhRqrqJ.js +1 -0
  54. package/dist/assets/{CustomerOnboardingDetailPageSkeleton-DhuLaWYK-DcG6KMpl.js → CustomerOnboardingDetailPageSkeleton-BqdhqyL7-D5d_8a27.js} +11 -11
  55. package/dist/assets/{CustomerOnboardingNoStepsPage-BxwT2uzY-D7TcqLpN.js → CustomerOnboardingNoStepsPage-DDio10hZ-Bwj4xg2w.js} +9 -9
  56. package/dist/assets/{CustomerOnboardingPage-L_1XcD2Y-DKNCW3S2.js → CustomerOnboardingPage-k2OYvIqe-DW9-8aDi.js} +9 -9
  57. package/dist/assets/CustomerOnboardingProductSuitePage-CxB32dUM-D8l5mASB.js +202 -0
  58. package/dist/assets/{Dashboard-CWSUiuiJ-CkG7yAH9.js → Dashboard-DhMPjLVy-BPpidTU7.js} +1 -1
  59. package/dist/assets/{DashboardReportPage-D79gYgHb-BVvCBIWA.js → DashboardReportPage-C9YvD_24-CnK8XRxa.js} +1 -1
  60. package/dist/assets/{DepositAccTransactionItem-BCJn6a_d-BT-feK8R.js → DepositAccTransactionItem-BYFOUvho-D1tjwPkv.js} +4 -4
  61. package/dist/assets/{DepositAccTransactionListPage-6QMW3q5S-DniMW2S1.js → DepositAccTransactionListPage-DeN4-lBP-CBJVTEU-.js} +7 -7
  62. package/dist/assets/{DocumentSecurityBanner-C7TAyvIZ-DjIw6AYV.js → DocumentSecurityBanner-6cQ2cW7e-Bf5Osic5.js} +1 -1
  63. package/dist/assets/{DomesticWireDetailsPage-DGOgMHF5-CR1jD4GL.js → DomesticWireDetailsPage-BmMEth4c-Duh2OS1c.js} +1 -1
  64. package/dist/assets/{DownloadOverlay-BrVMY7u8-nMRk4mVN.js → DownloadOverlay-D0_pmb7k-BhK-Q9wQ.js} +6 -6
  65. package/dist/assets/{DrawerPage-DbmFkDa9-Djje95q9.js → DrawerPage-C5u676VK-BwyTjOJX.js} +1 -1
  66. package/dist/assets/EditPeoplePage-DAM71X8m-kukHxW_0.js +55 -0
  67. package/dist/assets/{EditReimbursementDetailPage-BSXwufQy-BGfoaRvB.js → EditReimbursementDetailPage-BxjNoyj8-mj8ySbuq.js} +43 -43
  68. package/dist/assets/{EntityDetailPage-ClKvTCns-CiI4yzJ7.js → EntityDetailPage-BfscGvkI-DlE98_0K.js} +3 -3
  69. package/dist/assets/{EntitySummarySection-BcyWfLW_-llSGPYnB.js → EntitySummarySection-BCkLY2Py-lpTrhfnW.js} +5 -5
  70. package/dist/assets/{ExpenseAutomationOverviewPage-CQ5_4jtz-Dwom5i2h.js → ExpenseAutomationOverviewPage-C4SCxViu-BAakN-WZ.js} +18 -18
  71. package/dist/assets/{ExpenseAutomationPage-SDYsJmGO-CNd8g10S.js → ExpenseAutomationPage-DF1-Q4X5-DubLusUH.js} +33 -33
  72. package/dist/assets/{ExpressPayPage-S33czP_U-wOnUG70H.js → ExpressPayPage-Cdtx03yB-BxTU3id1.js} +10 -10
  73. package/dist/assets/{FeaturePreviewPage-COWIqmTf-CyZ-Ngo6.js → FeaturePreviewPage-nQYT4moR-CobwvrFz.js} +2 -2
  74. package/dist/assets/{FollowStepsSection-Cw8htUBe-KlacKTEI.js → FollowStepsSection-CRBm3eL9-Bz_q7qOo.js} +8 -8
  75. package/dist/assets/{GlobalReviewListPage-DKBYTVNe-B054__m6.js → GlobalReviewListPage-3iXmpaXt-BpdqjyXr.js} +1 -1
  76. package/dist/assets/{HelpButton-BvPX8uxd-B7O0Ne6B.js → HelpButton-Cv7-d_qL-CciztHgu.js} +1 -1
  77. package/dist/assets/{InformationCardStack-CtueyMCq-B3RHQtJt.js → InformationCardStack-JCre21xs-BlkeDU23.js} +3 -3
  78. package/dist/assets/{InsightsCardStack-BKtPGTdt-rc65DXp-.js → InsightsCardStack-Dekfw94R-VqCo_XNV.js} +8 -8
  79. package/dist/assets/{InsightsSection-BFIeAUrz-CogsOJk3.js → InsightsSection-CLqfyvOO-CKwkK2Sj.js} +4 -4
  80. package/dist/assets/{IntegrationsSettingsPage-BSyZC7Kg-CHF3rylS.js → IntegrationsSettingsPage-o9w1-WIT-BCMJ43n5.js} +5 -5
  81. package/dist/assets/{InternationalWireSwiftDetailsPage-C9Z04pG5-ChUNSNNN.js → InternationalWireSwiftDetailsPage-DBG1ni7g-DMTAsaCM.js} +18 -18
  82. package/dist/assets/{InternationalWireVerificationPage-iRa0YMo6-BqMlSuW7.js → InternationalWireVerificationPage-BLU4F--p-BFU2uuwn.js} +19 -19
  83. package/dist/assets/{InviteFormPage-CbSJssAT-C5BLeKFh.js → InviteFormPage-Bf8Mqb7S-BtjdSecG.js} +13 -13
  84. package/dist/assets/{InvitePageListView-BrUBTz5B-DxiDTLU3.js → InvitePageListView-6oeT1vaB-Bpmua81S.js} +52 -52
  85. package/dist/assets/InvitePeoplePage-CLvVDRca-CLtgUYZW.js +12 -0
  86. package/dist/assets/{InvoiceUploadSection-CRgtSthn-CdJu9_SZ.js → InvoiceUploadSection-BiIfE0Mk-DzhUPeCE.js} +7 -7
  87. package/dist/assets/{IssueChargeCardPage-CdOs81el-CaQjXLma.js → IssueChargeCardPage-Dd312Qu7-BymELIm-.js} +20 -20
  88. package/dist/assets/{LabeledAddressValue-CoQKG0Vs-XiBnAGSr.js → LabeledAddressValue-BplX--OG-BBD4K47a.js} +1 -1
  89. package/dist/assets/{LabeledAddressValueField-D5zB7wnP-C-ACJntJ.js → LabeledAddressValueField-DkhJs5ky-DLdSr7t1.js} +4 -4
  90. package/dist/assets/{LabeledControlledCheckBoxField-DSefRIxV-fZ095MYZ.js → LabeledControlledCheckBoxField-SJfjkDzA-q46TDnxw.js} +1 -1
  91. package/dist/assets/{LabeledCreatableSingleSelectField-DOv10RFp-Do8dWxGN.js → LabeledCreatableSingleSelectField-CPwrvNjy-C-LowpML.js} +3 -3
  92. package/dist/assets/LabeledDocumentField-DLd6UnEn-DtqGgdoi.js +41 -0
  93. package/dist/assets/{LabeledDropDownFormattedTextField-D6qgntCW-BJC3ifVH.js → LabeledDropDownFormattedTextField-D70GX0HR-7dIEmO5F.js} +7 -7
  94. package/dist/assets/{LabeledText-DiD_FvMm-CCwT2lQh.js → LabeledText-mTAE2dvH-e6RXkC8i.js} +2 -2
  95. package/dist/assets/{LabeledUserSingleSelectWithSubtitlesField-rBaXx4JB-DR0Xw0HO.js → LabeledUserSingleSelectWithSubtitlesField-Dx8TfHuB-hRPyJuOY.js} +10 -10
  96. package/dist/assets/{LabeledZeniRolesDropDownField-DI9XLkn7-BHhuV6HF.js → LabeledZeniRolesDropDownField-ZGHinaTy-14IF6Cak.js} +12 -12
  97. package/dist/assets/{LinkJETransactionPage-BI9rvDWF-CfBfl5Qd.js → LinkJETransactionPage-CNYQO-AQ-BO9clNns.js} +8 -8
  98. package/dist/assets/{LowBalancePopup-ChqqEeWk-BM4fEMD_.js → LowBalancePopup-hdwaJezh-B0CYMe4t.js} +5 -5
  99. package/dist/assets/{MagicLinkACHDetailsPage-DYDNDN_--DivIHnp3.js → MagicLinkACHDetailsPage--DRHcaKz-BBtLo6wh.js} +1 -1
  100. package/dist/assets/{MagicLinkDomesticWireDetailsPage-DQuuLyWQ-DMuYoH5t.js → MagicLinkDomesticWireDetailsPage-B5hbI4dU-0vD7L8pJ.js} +1 -1
  101. package/dist/assets/{MagicLinkInternationalWireDetailsPage-CnUTecpU-D_T2GhHn.js → MagicLinkInternationalWireDetailsPage-BdwVZCRt-BzFpmTJD.js} +1 -1
  102. package/dist/assets/{MagicLinkSuccessPage-Dyhk5vnq-BIlvFeEv.js → MagicLinkSuccessPage-DOUrPdD--h771bDUh.js} +1 -1
  103. package/dist/assets/{MagicLinkTitleSection-CAwqT4_X-BZUCaIfF.js → MagicLinkTitleSection-Bb27jU2a-DQOPYd-Z.js} +3 -3
  104. package/dist/assets/{MailingDetailsSection-Cpu-qwub-DXvamX34.js → MailingDetailsSection-CdKFQB_8-K5G0AaPG.js} +2 -2
  105. package/dist/assets/{MeetingCalenderPopup-B5M2lm-y-C_FrJz7Q.js → MeetingCalenderPopup-B3sIZU3d-DuEMLObz.js} +3 -3
  106. package/dist/assets/{Menu-D0NUi1FB-BawltZy9.js → Menu-Bsk58l8k-kRDchKev.js} +1 -1
  107. package/dist/assets/{MyBankConnectionsSettingsPage-SYlGHINJ-UgY1mvLj.js → MyBankConnectionsSettingsPage-P1Zh6SFD-C4DvQ61H.js} +12 -12
  108. package/dist/assets/{MyPendingActivationChargeCardListPage-EBaDVcO8-BUhvlg7Q.js → MyPendingActivationChargeCardListPage-Cs7rVAdh-B9AXkK-5.js} +1 -1
  109. package/dist/assets/{MyProfileSettingsPage-a1LKde_U-C-CluQ5D.js → MyProfileSettingsPage-Cc4XfbBQ-C9qNtbAb.js} +6 -6
  110. package/dist/assets/{NavBarWithPicker-D3YzfX06-BOvWanjk.js → NavBarWithPicker-DFD5LZ4o-CjFvYGu-.js} +3 -3
  111. package/dist/assets/{NavigationArrow-C81m-KZF-DiGpo5fD.js → NavigationArrow-mL8dVddD-CApZjvsF.js} +5 -5
  112. package/dist/assets/{NavigationDots-CB3WQq54-bd5dE2x5.js → NavigationDots-MPqPjbnr-gK408Eu4.js} +1 -1
  113. package/dist/assets/{NewGlobalMerchantPage-BwuCbGQ_-BWfS6c1K.js → NewGlobalMerchantPage-QTvziNPs-DJ7dMRKm.js} +6 -6
  114. package/dist/assets/{NoDataChart-B0CMrh6X-CjUp7yyw.js → NoDataChart-C1BY1riw-DoqrJEIG.js} +1 -1
  115. package/dist/assets/{NoDataTable-BgcSvfNz-CZM6fS2_.js → NoDataTable-C_4AqyDp-cxOm3TqL.js} +1 -1
  116. package/dist/assets/{NotFoundPage-BnPqLAwW-DXn1vq6B.js → NotFoundPage-U8Zqpzgy-DGacTch6.js} +4 -4
  117. package/dist/assets/{NotificationSettingsPage-wigFcdhu-BCVXYCAc.js → NotificationSettingsPage-2A4Pahmq-ugOY8DfW.js} +13 -13
  118. package/dist/assets/NotificationsListConfig-BIw5ASx2-BpsD8zMo.js +1 -0
  119. package/dist/assets/{NotificationsPage-BC-f8rc3-Cv1jpZ5r.js → NotificationsPage-B6yKJmGI-ABrq9lsr.js} +36 -36
  120. package/dist/assets/{OpExByVendorPage-CIh1CcAU-DhceACAT.js → OpExByVendorPage-BnTlBXeu-CtQ9Rudi.js} +4 -4
  121. package/dist/assets/{OverlayContainerPage-GWXnlbZH-D_pF8lEg.js → OverlayContainerPage-BxBOhoib-0U2mSFzb.js} +1 -1
  122. package/dist/assets/{PandLWithForecastPage-Dj21XOWq-Bil3pCly.js → PandLWithForecastPage-CKW73tr8-DQuvWZ35.js} +5 -5
  123. package/dist/assets/{PaymentAccountSetupBillingAddressSection-C0eGjv2q-hYajAvBR.js → PaymentAccountSetupBillingAddressSection-CSEVISAI-Bq0DuZcX.js} +6 -6
  124. package/dist/assets/{PeoplePage-DHWuODjG-BG9mOlzv.js → PeoplePage-BJxZJT-l-FSQqwOWI.js} +16 -16
  125. package/dist/assets/{PortfolioAllocationFormPage-CYoVD723-JNLkou6k.js → PortfolioAllocationFormPage-C4pRhyet-Wf_11Z3Y.js} +4 -4
  126. package/dist/assets/PortfolioDetails-4fbkArz6-0_-lQYOm.js +218 -0
  127. package/dist/assets/{ProductsCarousel-DcSxZECS-DlL_nQ7i.js → ProductsCarousel-gGbLzHle-BYrndM43.js} +1 -1
  128. package/dist/assets/{PromoBaseCards-B-s9wF0Q-C_JFN1l_.js → PromoBaseCards-DUlZEg5E-CbxyeszU.js} +1 -1
  129. package/dist/assets/{QBOConnectionDialog-CQlXDalh-pYOnv0Lz.js → QBOConnectionDialog-C_Z2lvUz-DLhuJ1u0.js} +6 -6
  130. package/dist/assets/{QBOSetupSection-Dpib3Rx5-CvOyCasF.js → QBOSetupSection-DqWiwHwl-DIb9XM9r.js} +11 -11
  131. package/dist/assets/{ReimbursementApprovalRuleDetailPage-CutUv2m2-DV8JJchD.js → ReimbursementApprovalRuleDetailPage-JWdrVgqW-CFvIiw2A.js} +1 -1
  132. package/dist/assets/{ReimbursementApprovalRulesPage-Cyye_Ayg-D3NnZeto.js → ReimbursementApprovalRulesPage-BnBNwFzM-C_gjNu0y.js} +33 -33
  133. package/dist/assets/{ReimbursementDetailPage-C4Tsi1io-C3Ydj8yn.js → ReimbursementDetailPage-Dyjb0qZE-BT9Piz6e.js} +7 -7
  134. package/dist/assets/{ReimbursementPromoPage-4BFu3jYR-DJOp85Xg.js → ReimbursementPromoPage-D1EqiXEa-DCne6gHN.js} +3 -3
  135. package/dist/assets/{ReimbursementSetUpPage-Cpl4wfuS-CLF96wxU.js → ReimbursementSetUpPage-ClJ_4WMp-Rk-zjJTF.js} +5 -5
  136. package/dist/assets/{ReimbursementsBulkReviewDrawerPage-iGaIl0hj-Ez4D4cLW.js → ReimbursementsBulkReviewDrawerPage-B-uGRv6i-04ZwLpFl.js} +1 -1
  137. package/dist/assets/{ReloadCard-F-DEmw51-DLqR0F5O.js → ReloadCard-DVYCtjFP-BRGDk89Q.js} +1 -1
  138. package/dist/assets/{ReportTableViewSelector-BSPNRs-f-BSuMcYEk.js → ReportTableViewSelector-BTu2hum1-C1Mbyqo-.js} +7 -7
  139. package/dist/assets/{ReportsPage-BQF-yVRz-qmz-Tsud.js → ReportsPage-BJEqtDDR-D_PksdU9.js} +5 -5
  140. package/dist/assets/{RevenueChart-ClRH1Vei-DMmGXmTr.js → RevenueChart-BFS-A4qa-BBXnyto4.js} +13 -13
  141. package/dist/assets/{ReviewDetailsPage-BKfSEXv--BulgMAR_.js → ReviewDetailsPage-C6qSCmDQ-B2yUNAOk.js} +13 -13
  142. package/dist/assets/{ReviewOverlay-Dgnr47GU-pLIXYebD.js → ReviewOverlay-DItEmr7f-J3VxEX04.js} +1 -1
  143. package/dist/assets/{RoleWithToolTip-Bcjjd_2M-CEhXe82J.js → RoleWithToolTip-CqtMdboJ-Do2co-59.js} +6 -6
  144. package/dist/assets/{ScheduleDetailsFixedAssetsPage-Bq6XAACj-b2tW9Mlc.js → ScheduleDetailsFixedAssetsPage-CKcDbns8-CVYGhsoz.js} +8 -8
  145. package/dist/assets/{ScheduleDetailsPage-DTLTxgOx-BSog8pZ6.js → ScheduleDetailsPage-CYqYYvix-CdBl7QS5.js} +3 -3
  146. package/dist/assets/{ScheduleSequenceTable-CEZL4GA8-Bz6Z5iY2.js → ScheduleSequenceTable-DUYFGZvc-B-XLebxH.js} +18 -18
  147. package/dist/assets/{ScreenRoutes-CPSDcwH4.js → ScreenRoutes-BFh5xZjd.js} +35 -35
  148. package/dist/assets/{SetUpAccountSection-CJsY-S6w-C1WEKP8_.js → SetUpAccountSection-DfuZHlL6-sva6HoSx.js} +21 -21
  149. package/dist/assets/{SetUpDefaultSection-Dbzui0hL-iIB8Rf0_.js → SetUpDefaultSection-Jl4dtzx3-CDDnDgUz.js} +10 -10
  150. package/dist/assets/{SignIn-yFG7aeiJ-ckyRX-3p.js → SignIn-OTT_6lLp-4uioYcss.js} +4 -4
  151. package/dist/assets/{SignInScreen-CezO9Lof.js → SignInScreen-VsVK9Vz1.js} +1 -1
  152. package/dist/assets/{SpendManagementListViewPage-cw0B29Ux-C5QKbiAX.js → SpendManagementListViewPage-BkL-3WNh-DhY9QPd5.js} +3 -3
  153. package/dist/assets/{SpendManagementPerTabPage-Bkw1eegW-6YGIDLoT.js → SpendManagementPerTabPage-Buppd61y-KX81e_1p.js} +14 -14
  154. package/dist/assets/{SpendManagementSection-DuYMRljT-Bdg69CKN.js → SpendManagementSection-BGcBRKGN-CG3uT_ZE.js} +10 -10
  155. package/dist/assets/{SpendMgmtSetupAccountSection-DF3XzW-2-DYLliU2g.js → SpendMgmtSetupAccountSection-Cswh297O-5u1iK010.js} +13 -13
  156. package/dist/assets/{StatementItem-DGX-Yd6i-BY_yCToE.js → StatementItem-C3tUNT5A-D9LIbCmi.js} +4 -4
  157. package/dist/assets/{StatementsPage-BJ3A9NXT-DMgbNE2o.js → StatementsPage-DGryRE6z-C-mT3zfT.js} +3 -3
  158. package/dist/assets/{StatusSwitcher-Duc8UFd8-CiSz19gK.js → StatusSwitcher-BgWlxay9-Mp4PEzEM.js} +2 -2
  159. package/dist/assets/{SubTabSwitcher-U04APwPI-BuE6OItd.js → SubTabSwitcher-DwwAqq_R-DBNFWy_6.js} +1 -1
  160. package/dist/assets/{SummaryCard-BPy7YF4F-CCR3LVUp.js → SummaryCard-Dm0Tx9is-BV25EA5P.js} +1 -1
  161. package/dist/assets/{TaskManagementPage-CaPSMhTy-CpyLEYTY.js → TaskManagementPage-59XAl_cs-BbyBf_KE.js} +31 -31
  162. package/dist/assets/{TimeRangeSwitcher-DR2s6McL-3_tMweub.js → TimeRangeSwitcher-D7-Jph-G-Cn7zeCi8.js} +3 -3
  163. package/dist/assets/{TimeframeSwitcher-CR_Pithb-DBISxzXu.js → TimeframeSwitcher-CWYQWFLF-B37Mzr7G.js} +1 -1
  164. package/dist/assets/{TimeframeSwitcherWithToggle-CxsK8B8h-Cc3bm2cD.js → TimeframeSwitcherWithToggle-QOhQ3sac-BtE_j2V5.js} +1 -1
  165. package/dist/assets/{TopExCard-CykkX8Ny-DVQt4RbM.js → TopExCard-CTlizsDD-CdK-gYL3.js} +5 -5
  166. package/dist/assets/{TopExDetailPage-D9lST5M2-BxtgAaio.js → TopExDetailPage-Df3JbgcF-BUIhSfiv.js} +2 -2
  167. package/dist/assets/{TransactionDetailPage-CdEYjFbk-B6ledmKA.js → TransactionDetailPage-DvNpTjAp-3mOQ99vo.js} +30 -30
  168. package/dist/assets/{TransactionList-Dybq00u0-BjLYzc0q.js → TransactionList-SkSPfIsE-CE8kQBAe.js} +8 -8
  169. package/dist/assets/{TransactionListBig-C08_BfqV-BbvbiTrP.js → TransactionListBig-CZCV_kmJ-DVUvA7le.js} +9 -9
  170. package/dist/assets/{TransactionListPage-B1Yrd7M3-DonBnBnw.js → TransactionListPage-CBbyagWp-Da8WpQzF.js} +1 -1
  171. package/dist/assets/{TransactionVendorDetailPage-C4c-gk4U-BJLuJ4bf.js → TransactionVendorDetailPage-BXnlFdHR-DkKO-vTr.js} +3 -3
  172. package/dist/assets/{TransferDrawerPage-R6BJFqqt-DlAyhuZ7.js → TransferDrawerPage-CxXLyKwW-pf6KUagR.js} +29 -29
  173. package/dist/assets/{TreasuryOverviewPage-BsLzvGJ9-B1GjNHT4.js → TreasuryOverviewPage-3JlXZfCV-Dx_gGX5K.js} +16 -16
  174. package/dist/assets/{TreasuryPromoPage-k4TR0X4_-eC19CXAQ.js → TreasuryPromoPage-BhAicq7r-CWtB-Ior.js} +15 -15
  175. package/dist/assets/{TreasurySetupPage-xA9wkaxu-DOCNmlPJ.js → TreasurySetupPage-BQG_Wd5U-DotUWNKW.js} +2 -2
  176. package/dist/assets/{TreasuryStatementsPage-BeGMnFii-YfwK-mig.js → TreasuryStatementsPage-dCAtvvZk-CQC0pKh5.js} +5 -5
  177. package/dist/assets/{TreasuryTaxLetterPage-D6xf_HNB-DiYrdqjP.js → TreasuryTaxLetterPage-irA0Cgkj-CtL9UaTH.js} +5 -5
  178. package/dist/assets/{TreasuryTransferOrReviewPage-Cy90K2k1-BwaHgqNm.js → TreasuryTransferOrReviewPage-Dd1oLBma-BqeITAG-.js} +80 -80
  179. package/dist/assets/{TrendChart-CJ4ymPpY-4Nl5mDmM.js → TrendChart-Ctquh3qH-BiYWLM8X.js} +2 -2
  180. package/dist/assets/{TrendWithTransactions-B1FMv4RR-BXjd6gRu.js → TrendWithTransactions-CoXTnQK7-BLlEO5rp.js} +1 -1
  181. package/dist/assets/{UncategorizedAccountsMappingPage-MX9qLxmy-NN0GCNcI.js → UncategorizedAccountsMappingPage-Cq49D6V9-TgKDL_ek.js} +1 -1
  182. package/dist/assets/{UnitIntegrationPage-B1wIRNw1-DQCY0VyM.js → UnitIntegrationPage-CR0nZ7NM-R_gwAwZ8.js} +4 -4
  183. package/dist/assets/{UploadAdditionalDocumentOverlay-DiX5Dbc--DMKXpGlq.js → UploadAdditionalDocumentOverlay-B_DFEIlC-D-vyB1J1.js} +1 -1
  184. package/dist/assets/{Vendor2FAPopup-Cljy86Us-CqvodjDD.js → Vendor2FAPopup-KsRgKz_Z-j8koIFf4.js} +1 -1
  185. package/dist/assets/{VendorACHDetailsPage-BZG4bwOp-CtpzzPJH.js → VendorACHDetailsPage-MRaehbhm-DmI12dQp.js} +1 -1
  186. package/dist/assets/{VendorDetailPage-B8m4FkG5-D-auLoHo.js → VendorDetailPage-Cji21PBc-B3adWyVF.js} +18 -18
  187. package/dist/assets/{VendorDomesticWireDetailsPage-D7Mt3s3R-_HscDehj.js → VendorDomesticWireDetailsPage-DhUIW9g--qdYZ8d9x.js} +1 -1
  188. package/dist/assets/{VendorFiling1099EditablePage-B1FNkNlL-Sg-MnT3r.js → VendorFiling1099EditablePage-BWFbXLhQ-C5qvIENm.js} +11 -11
  189. package/dist/assets/{VendorFirstReviewPage-CDmMppJJ-CtMKXiJP.js → VendorFirstReviewPage-tvh5pcvQ-B2Kk7Crs.js} +26 -26
  190. package/dist/assets/{VendorInternationalWireDetailsPage-X-j8j32p-CWI0CPWX.js → VendorInternationalWireDetailsPage-CfmZSb8O-B-ILWyNn.js} +11 -11
  191. package/dist/assets/{VendorInternationalWireSwiftDetailsPage-eJXY7B89-B0ExbgQf.js → VendorInternationalWireSwiftDetailsPage-V_1s9mWi-hnkkHj00.js} +1 -1
  192. package/dist/assets/{VendorsAccountsSection-DH0v9LaU-DHJI7MF_.js → VendorsAccountsSection-b9s5nqGq-DfS13Vrv.js} +6 -6
  193. package/dist/assets/VerifyDevice-CJgD3UmO-uodXssPo.js +67 -0
  194. package/dist/assets/{WarningsDrawerPage-0XqR-WSe-anF5_tw2.js → WarningsDrawerPage-CB4mJGTB-fzxOGtfc.js} +9 -9
  195. package/dist/assets/{ZeniAccountDetailPage-poRKOvKO-DKb8kmv1.js → ZeniAccountDetailPage-CgSyyen1-PEjv41n1.js} +33 -33
  196. package/dist/assets/{ZeniAccountListViewPage-DAwsHVFu-BGWKwgu8.js → ZeniAccountListViewPage-DjGZpdh_-BsFv0aAo.js} +14 -14
  197. package/dist/assets/{ZeniAccountNavBarPieces-CK1z6uDE-EtXKthio.js → ZeniAccountNavBarPieces-BJC4d2Iu-BjaYs6wQ.js} +2 -2
  198. package/dist/assets/{ZeniAccountPromoPage-D_AeQXK0-BigsavEn.js → ZeniAccountPromoPage-D3Yt6FIj-ypiLoIIl.js} +9 -9
  199. package/dist/assets/{ZeniAccountSetupPage-B5KmPY23-C7MeYCAt.js → ZeniAccountSetupPage-BeCPekI4-BoIQB_8y.js} +3 -3
  200. package/dist/assets/{ZeniCopyright-DawBwguL-CoKChncL.js → ZeniCopyright-Dhdl9kqY-CRu5oNtE.js} +1 -1
  201. package/dist/assets/{ZeniTransferAmountSlider-BBQgQPfw-CW26dOpf.js → ZeniTransferAmountSlider-B8VFb2l--enqH4TrQ.js} +1 -1
  202. package/dist/assets/{analyticsHelper-mARzqEfV-glOPluPl.js → analyticsHelper-Cawv3PXO-DqLgneHd.js} +1 -1
  203. package/dist/assets/{analyticsHelper-DTaSIWBm.js → analyticsHelper-DBiIeSgZ.js} +1 -1
  204. package/dist/assets/{chartTypes-CedtWDkU-D_XzUeW6.js → chartTypes-5p7NWUHx-6R9pye-p.js} +1 -1
  205. package/dist/assets/{commonDimensions-ZxGdYNGR-BLBlsCik.js → commonDimensions-CQlLUBWG-C3nTCVjo.js} +1 -1
  206. package/dist/assets/{detailCommon-C0urnGcj-AeDRs0j5.js → detailCommon-CoAmJ6pY-B0Qu3snC.js} +4 -4
  207. package/dist/assets/{downloadPdf-C1cvLEsi-rU2eYPue.js → downloadPdf-CCJjnfCZ-ODxWAPRh.js} +1 -1
  208. package/dist/assets/{index-BEYLWYh7.js → index-C2JVdK9x.js} +2597 -2579
  209. package/dist/assets/{mapLoadingInProgressToTreeNode-D9ofcMAJ-DzcUuzrj.js → mapLoadingInProgressToTreeNode-CwyU1xs5-DTtIWEnS.js} +1 -1
  210. package/dist/assets/{mapSectionWithAcOnlyToTreeNode-CAhuUnXV-B-V1WxKb.js → mapSectionWithAcOnlyToTreeNode-IKJYFM7_-BiH-dZ1q.js} +1 -1
  211. package/dist/assets/{mapSpacerToTreeNode-BPXOBdsi-fkjPbAs6.js → mapSpacerToTreeNode-D5XTLzM7-CZeCl2Hx.js} +1 -1
  212. package/dist/assets/{mapTimeframeBalancesToTreeNode-BYB1q7M0-BG-ucR_V.js → mapTimeframeBalancesToTreeNode-CJMbtmIl-DGh10zzw.js} +1 -1
  213. package/dist/assets/{mapTimeframeBalancesToTreeNode-BU0Ph9My-DP-H6YbL.js → mapTimeframeBalancesToTreeNode-SX6fBp6e-DSWmrMTg.js} +1 -1
  214. package/dist/assets/{mapTimeframeHeaderLoadingInProgressToTreeNode-Bkav2l0W-kqY2QYd9.js → mapTimeframeHeaderLoadingInProgressToTreeNode-Ts5lOZtX-DZNSlCJx.js} +1 -1
  215. package/dist/assets/{play-icon-BaaR5WkW-bsECe0gv.js → play-icon-oQKnPjZi-D1s2fk0_.js} +3 -3
  216. package/dist/assets/{toCOABalancesWithID-CCW7YVfm-BLH1CPxw.js → toCOABalancesWithID-DwvFse7w-YhdHXdmt.js} +1 -1
  217. package/dist/assets/{toChartData-C3kVg0fD-Dm5_eyYk.js → toChartData-BBvMC_VQ-D9RVT7PQ.js} +1 -1
  218. package/dist/assets/{treasuryColorHelper-Cc1DTnhB-C-kSfp9f.js → treasuryColorHelper-CUDK9KvQ-DUBVC7I-.js} +1 -1
  219. package/dist/assets/{uploadAttachment-C56u0Q20-DnHCC04X.js → uploadAttachment-P4S_2L_v-CgBJ3cvv.js} +13 -13
  220. package/dist/assets/{uploadReceipts-D80JLNY4-dIgIudSI.js → uploadReceipts-DhDnr0ap-Dmr6ZzO6.js} +1 -1
  221. package/dist/index.html +1 -1
  222. package/package.json +4 -4
  223. package/dist/assets/ChargeCardPromoPage-BiyYawq5-C06aowQC.js +0 -219
  224. package/dist/assets/CompleteProfile-CikcmDmg-BRscmvQ1.js +0 -36
  225. package/dist/assets/CustomerOnboardingContainerPage-56mBQg5m-P-4bO2TI.js +0 -1
  226. package/dist/assets/CustomerOnboardingProductSuitePage-Xqdww5iU-DE5MK9MP.js +0 -202
  227. package/dist/assets/EditPeoplePage-CKiV3DO3-CiLuq48J.js +0 -55
  228. package/dist/assets/InvitePeoplePage-BbDUlUjQ-BFnCmfU7.js +0 -12
  229. package/dist/assets/LabeledDocumentField-CO6_e65U-C8oWnxyV.js +0 -41
  230. package/dist/assets/NotificationsListConfig-D2ndsr4D-C04oDiNr.js +0 -1
  231. package/dist/assets/PortfolioDetails-5xc1wonC-DS3ORnSc.js +0 -218
@@ -1,4 +1,4 @@
1
- import{X as vt,w as Tt,C as y,cB as jt,M as St,cC as Ct,cD as Dt,j as t,cE as It,cF as le,cG as At,l as d,cH as Pt,cI as kt,Y as j,cJ as Mt,_ as k,cK as Bt,cL as Nt,cM as ke,cN as Me,cO as Be,p as G,cP as O,cQ as z,cR as _,g as S,cS as Rt,cT as Ft,cU as Et,cV as Lt,bs as Ne,o as n,a3 as Ot,m as c,r as zt,bo as _t,Q as Wt,h as Ut,cW as Ht,bH as Zt,s as se,e as de,cX as Yt,cY as Vt,aA as Gt,k as Kt,an as qt,Z as Xe,b4 as Xt,v as Qe,aN as Qt,cZ as Jt}from"./index-BEYLWYh7.js";import{b as U,n as i}from"./vendor-CnQcJ2Lu.js";import{t as en,o as tn}from"./LowBalancePopup-ChqqEeWk-BM4fEMD_.js";import{S as W}from"./LabeledText-DiD_FvMm-CCwT2lQh.js";import"./mui-C5LQ0bMa.js";import"./analytics-CBL_L82S.js";import"./routing-Cpaypegg.js";import"./sentry-HDxG13yk.js";import"./redux-ByjIRbhZ.js";import"./liveblocks-sSQ9JElv.js";import"./crypto-BURQLTgV.js";const Je=["small","medium-compact","medium-regular"],p={largeLabelWidth:new y(150,215,215),infoMinWidth:new y(0,0,0,142,142),infoMarginRight:new y(0,0,0,c[2],c[2]),footerButtonWidth:new y(120,165),iconContainerMarginTop:new y(6,c[1]),navBarContainerPaddingTop:new y(10,c[3]),sectionTitleMarginLeft:new y(c[3],c[0]),reviewContainerMarginLeft:new y(c[3],c[6]),reviewContainerMarginRight:new y(c[3],c[8]),footerRightIconMarginRight:new y(c[0],c[0],c[7]),infoLabelPaddingRight:new y(c[0],c[3]),infoLabelMarginTop:new y(c[1],c[0])},nn={sectionTitle:new Wt("h6Medium","h5Medium")},{dateFormat:Re,common:{currency:T,labels:Fe,edit:an,strings:{empty:h}},spendManagement:{billPay:ln}}=St.getLocalizedStrings(),{billDetails:a,paymentDetails:Ee}=ln,Le=({attachment:e})=>{const[w,x]=U.useState(!1),M=()=>{x(!1)},C=e.fileId?.length===0;return t.jsxs(Bn,{isDisabled:e.fileId?.length===0,"data-testid":j("attachment-tag",e.fileName),onClick:()=>C===!1?x(!0):null,children:[w&&e?.fileDownloadUrl!=null?t.jsx(Yt,{title:e.fileName,file:e,onCrossClick:()=>M(),setShowFullScreenView:x}):null,t.jsx(Nn,{children:t.jsx(Vt,{contentType:e.contentType})})]})},ti=({billDetails:e,billpayApprovalView:w,isBillPayCommentingEnabled:x,currentTenant:M,isInternationalPaymentShaVsOurEnabled:C,isLocalCurrencyEnabled:et,style:tt,analytics:$,isRecurringBillsFeatureEnabled:nt,isApprovalRequiredForMarkAsPaid:it,isDetectInsufficientFundsEnabled:at,billId:f,onClickEdit:ce,discardBillDetailsFromLocalStore:me,saveBillDetails:pe,discardOutsideZeniPaymentData:lt,updateBillDetailSaveBillCode:ue,redirectToBillsScreen:ye,onAttachmentClick:Q,retryPayment:ot})=>{const s=vt(),m=Tt(),B={application:"dashboard",companyId:m.currentTenant?.companyId,tab:"bill",entityId:f},N=x&&f!=null,R=`dashboard_${m.currentTenant?.companyId}`,F=p.largeLabelWidth.value(s),E=e.saveStatus,J=e.zeniAssistRetryStatus,ee=e.vendor?.vendorCurrencyCode,o=jt(C,et,e.billPayConfigList.filter(l=>l.method.includes(e.paymentDetailsSection?.withdrawFrom?.accType??"depositAccount")),e.paymentDetailsSection?.internationalTransferFeeBearerPaymentMethod,e.paymentDetailsSection?.paymentType,ee),D=Re.visual.MMMDCommaYYYYformat,he={amount:e.recipientTotalAmount.amount/(e.paymentDetailsSection?.conversionRate??1)*100/100,currencyCode:T.currencyCode,currencySymbol:T.currencySymbol},u={amount:o?.method.includes("international")===!0?Ct(he,o):e.recipientTotalAmount.amount+(o?.fee.amount??0),currencyCode:T.currencyCode,currencySymbol:T.currencySymbol},L={amount:o?.method.includes("international")===!0?Dt(he,o):o?.fee.amount??0,currencyCode:T.currencyCode,currencySymbol:T.currencySymbol},[rt,ge]=U.useState(!1),[st,xe]=U.useState(!1),fe=()=>ge(!1),dt=()=>{$.trackBillPayMagicLinkPreviewEmail("review_bill"),ge(!0)},ct=e.isCollectToAccountInfoFromVendorContact?t.jsxs(t.Fragment,{children:[`${a.magicLink.collectFrom} ${e.toAccountVendorEmail}`,t.jsx(Pn,{size:s,children:t.jsx(An,{})})]}):It(e.paymentDetailsSection?.paymentTo);U.useEffect(()=>{(E?.fetchState==="Completed"||J?.fetchState==="Completed")&&(me(),ue(),ye())},[E,J,ye,me,ue]);const v=e.billPayInfo?.stage,A=e.billPayInfo?.billStatus,H=e.billPayInfo?.billPaymentStatus,mt=e.billPayInfo?.billPaymentRefundStatus,te=v?.code==="paid"?v:A?.code=="approved"&&H?.code?H:A,pt=e.billPayInfo?.isRefundInitiated===!0?mt:A?.code=="approved"&&H?.code?H:A,ne=()=>{ce()},be=()=>{ce()},Z=e.paymentDetailsSection?.paymentDate,ie=le(o?.method??""),we=ie.replace("Same Day",""),ut=e.isCollectToAccountInfoFromVendorContact?t.jsx(At,{paymentTypeLabel:we,onClick:dt}):a.addedByZeni,Y=w.allApprovalRules.length>0,yt=d.toAmount(o?.method!=null&&(o.method.includes(d.NEW_INTERNATIONAL_METHOD_SUBTEXT)||o?.fee.amount!=null&&o.fee.amount!==0)?u.amount-L.amount:u.amount,o?.fee.currencyCode??d.defaultVendorCurrency.currencyCode,o?.fee.currencySymbol??d.defaultVendorCurrency.currencySymbol),g=d.isPaymentMethodOutsideZeni(e.paymentDetailsSection?.paymentType?.method),ht=l=>{$.trackBillPayMarkAsPaidSubmit(l.paymentMode??"other",v?.code??"draft",te?.code??""),pe(!0,l)},$e=()=>{xe(!0),$.trackBillPayMarkAsPaid(v?.code??"draft",te?.code??"")},gt=()=>{lt(),xe(!1)},P=g&&(v?.code!=null?v.code==="draft"||A?.code==="approved":!0),b=P&&!it,ve=Oe(b,Y,e.isBillMarkedForRetry),xt=()=>g?b?void 0:a.paymentOutsideZeni.reviewInfo:o?.method!=null&&o.method.includes(d.NEW_INTERNATIONAL_METHOD_SUBTEXT)&&e.paymentDetailsSection?.internationalTransferFeeBearerPaymentMethod!=null&&C&&ee===T.currencyCode?Ft(e.paymentDetailsSection.internationalTransferFeeBearerPaymentMethod):void 0,ae=at&&e.paymentDetailsSection!=null?Pt(u,e.paymentDetailsSection.withdrawFrom,e.paymentDetailsSection.paymentDate):void 0,ft=()=>{const l=e.paymentDetailsSection?.paymentDate,r=e.isCollectToAccountInfoFromVendorContact,I=e.recurringConfig,wt=e.recipientTotalAmount;if(e.isInvoiceDateAutoUpdated===!0&&$.trackBillPayAutoDateChange(f??"new_bill"),o?.method!=null&&l!=null){const $t=g?a.paymentOutsideZeni.offline:le(o.method);if($.trackBillPaySendForApproval($t,l.format(Re.analytics.MMMDashDDDashYYYYFormat),r,e.isRecurring,f,e.paymentDetailsSection?.internationalTransferFeeBearerPaymentMethod,{startDate:d.zeniDate(I?.startDate?.toString()??"").format(D),endDate:d.zeniDate(I?.endDate?.toString()??"").format(D),frequency:I?.frequency??"monthly",totalAmount:wt.amount,totalPaymentCycles:I?.totalPaymentCycles??0,isApprovalRequired:I?.isApprovalRequired??!1,updateCurrentBill:e.recurringConfig?.id!=null?I?.updateRecurringBills==="current":void 0,updateFutureRecurringBills:e.recurringConfig?.id!=null?I?.updateRecurringBills==="all":void 0}),ae!=null){const Se=v?.code??"draft",Ce=A?.code??"",De=e.isRecurring?["Recurring"]:["One-Time"],Ie=e.invoiceNumber??"",Ae=Jt(m.loggedInUser),Pe=e.paymentDetailsSection?.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account";ve===a.scheduleBill?$.trackLowBalanceAccountSchedule(Se,Ce,De,Ie,Ae,Pe):ve===a.sendForApproval&&$.trackLowBalanceAccountSentForApproval(Se,Ce,De,Ie,Ae,Pe)}}},Te=()=>{je===!0&&V(!1),e.isBillMarkedForRetry===!0?(ot(),$.trackRetryConfirmClick(te?.code??"",v?.code??"",pt?.description??"",e.isRecurring?["Recurring"]:["One-Time"],e.invoiceNumber??"")):e.vendor!=null&&(ft(),pe(!1,{}))},bt=d.checkIfCreatorIsApprover(u.amount,w.allApprovalRules,m.loggedInUser),[je,V]=U.useState(!1);return t.jsxs(hn,{children:[st?t.jsx(en,{onCancel:gt,onProceedForMarkAsPaid:ht,saveDetailsFetchState:E?.fetchState,paymentData:e.outsideZeniPaymentInfo}):null,je?t.jsx(tn,{withdrawFrom:e.paymentDetailsSection?.withdrawFrom,paymentDate:e.paymentDetailsSection?.paymentDate,onOkClick:Te,onCancelClick:()=>{V(!1),ne()},onClickAway:()=>{V(!1)}}):null,t.jsx(kt,{anchor:"right",open:rt,onClose:fe,transitionDuration:250,"data-testid":j("vendor-email-preview-drawer"),children:t.jsx(Mt,{companyName:Bt(M.company?.companyInfo),vendor:e.vendor?.name,paymentDate:Z?.format(D)??"",paymentType:we,amount:k("0,0[.]00",u),isInvoiceAttached:!!e.file,onClose:fe})}),t.jsxs(gn,{windowSize:s,style:tt,children:[s==="small"?t.jsxs(In,{windowSize:s,children:[t.jsx(Ye,{onClick:be,"data-testid":j("review-detail-nav-bar-small-back")}),t.jsx(We,{windowSize:s,children:a.oneLastLook})]}):t.jsx(Dn,{"data-testid":j("review-details-nav-bar-back"),children:t.jsx(Ye,{onClick:be})}),s!=="small"?t.jsx(fn,{children:t.jsx(We,{windowSize:s,children:a.oneLastLook})}):null,e.duplicateBillTransactions.length>0?t.jsxs(bn,{children:[t.jsxs(wn,{children:[t.jsx(zn,{}),t.jsxs($n,{children:[t.jsx(Tn,{children:a.duplicateBillPayWarning}),t.jsxs(vn,{children:[a.duplicateBillPayWarningSubHeading,t.jsxs("span",{"data-testid":j("review-detail-attachment-button"),onClick:()=>Q(e.duplicateBillTransactions[0].id,e.duplicateBillTransactions[0].billPayInfo.stage.code),style:{textDecoration:"underline",cursor:"pointer"},children:[a.viewBill,e.duplicateBillTransactions[0].documentId]})]})]})]}),t.jsxs(En,{children:[t.jsx(On,{children:a.duplicateInvoiceFound}),e.duplicateBillTransactions.map(l=>{const r=Nt(l);return l!=null?t.jsx(Ln,{children:Je.includes(s)?t.jsxs(Ue,{windowSize:s,children:[t.jsxs(jn,{children:[t.jsxs(Sn,{children:[l.attachments&&l.attachments.length>0?t.jsx(Le,{attachment:l.attachments[0]}):t.jsx(Ve,{children:t.jsx(Ge,{})}),t.jsx(q,{children:t.jsxs(t.Fragment,{children:[l.documentId!=null?a.invoiceNo:null,l.documentId]})})]}),t.jsx(Ke,{windowSize:s,children:k("0,0[.]00",l.recipientTotalAmount)})]}),t.jsxs(Rn,{"data-testid":j("review-detail-mobile-info"),onClick:()=>Q(l.id,l.billPayInfo.stage.code),children:[t.jsxs(q,{children:[l.dueDate!=null?a.due:null," ",l.dueDate?.format(D)]}),t.jsx(qe,{children:r!=null?ke.includes(r.code)?t.jsx(Me,{style:{padding:"2px 5px"},title:r.value,placement:"top",children:t.jsx(X,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value})}):t.jsx(X,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value}):null})]})]}):t.jsxs(Ue,{windowSize:s,children:[l.attachments&&l.attachments.length>0?t.jsx(Le,{attachment:l.attachments[0]}):t.jsx(Ve,{children:t.jsx(Ge,{})}),t.jsxs(Fn,{"data-testid":j("review-detail-info"),onClick:()=>Q(l.id,l.billPayInfo.stage.code),children:[t.jsx(q,{style:{width:"50%"},children:t.jsxs("div",{children:[l.documentId!=null?a.invoiceNo:null," ",l.documentId]})}),t.jsxs(q,{style:{width:"25%"},children:[l.dueDate!=null?a.due:null," ",l.dueDate?.format(D)]}),t.jsx(Ke,{style:{width:"25%"},windowSize:s,children:k("0,0[.]00",l.amount)})]}),t.jsx(qe,{children:r!=null?ke.includes(r.code)?t.jsx(Me,{style:{padding:"2px 5px"},title:r.value,placement:"top",children:t.jsx(X,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value})}):t.jsx(X,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value}):null})]})},l.id):null})]})]}):null,t.jsxs(Cn,{children:[t.jsx(He,{children:a.pay}),t.jsx(Ze,{children:t.jsx(Be,{amount:yt,integerStyles:G.largeMedium.cssObject,decimalStyles:G.smallMedium.cssObject})}),t.jsx(He,{children:a.to}),t.jsx(Ze,{children:e.vendor?.name})]}),t.jsxs(xn,{children:[g?null:t.jsxs(t.Fragment,{children:[t.jsx(O,{isThreadAllowed:N,entityId:f,dashboardTabKey:_({type:"details",key:"withdrawFrom"}),roomId:R,companyId:m.currentTenant?.companyId??h,companyName:m.currentTenant?.companyName??h,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${z("withdrawFrom")}`},children:t.jsx(W,{label:{label:a.withdrawFrom,width:F},style:{width:"auto"},value:e.paymentDetailsSection?.withdrawFrom!=null?Rt(e.paymentDetailsSection.withdrawFrom,s):h,infoLabelStyle:{textAlign:s==="small"?"left":"right",paddingRight:p.infoLabelPaddingRight.valuePx(s),marginTop:p.infoLabelMarginTop.valuePx(s),color:S.brandColorGoldDark},additionalInfoLabel:ae})}),t.jsx(K,{})]}),t.jsx(O,{isThreadAllowed:N,entityId:f,dashboardTabKey:_({type:"details",key:"paymentType"}),roomId:R,companyId:m.currentTenant?.companyId??h,companyName:m.currentTenant?.companyName??h,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${z("paymentType")}`},children:t.jsx(W,{label:{label:a.paymentMethod,width:F},style:{width:"auto"},value:le(o?.method??""),additionalInfoLabel:xt()})}),t.jsx(K,{}),!g&&Z!=null?t.jsxs(t.Fragment,{children:[t.jsx(O,{isThreadAllowed:N,entityId:f,dashboardTabKey:_({type:"details",key:"paymentDate"}),roomId:R,companyId:m.currentTenant?.companyId??h,companyName:m.currentTenant?.companyName??h,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${z("paymentDate")}`},children:t.jsx(W,{label:{label:a.paymentDate,width:F},style:{width:"auto"},value:Z.format(D),additionalInfoLabel:`${a.estimatedArrival}${d.zeniDate(d.getNextNthWorkingDay(Z.toDate(),[0,6],o?.maxPeriod.value??0).toDateString()).format(D)} - (${ie.length>0?`${ie} `:""}${a.deliveryTimeLabel} = ${o?.maxPeriod.value??"0"} ${a.deliveryTimeUnits})`})}),t.jsx(K,{})]}):null,g?null:t.jsx(O,{isThreadAllowed:N,entityId:f,dashboardTabKey:_({type:"details",key:"paymentTo"}),roomId:R,companyId:m.currentTenant?.companyId??h,companyName:m.currentTenant?.companyName??h,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${z("paymentTo")}`},children:t.jsx(W,{label:{label:a.paymentTo,width:F},style:{width:"auto"},value:ct??"",additionalInfoLabel:ut})}),g||nt?t.jsxs(t.Fragment,{children:[t.jsx(K,{}),t.jsx(O,{isThreadAllowed:N,entityId:f,dashboardTabKey:_({type:"details",key:"recurringPaymentType"}),roomId:R,companyId:m.currentTenant?.companyId??h,companyName:m.currentTenant?.companyName??h,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${z("recurringPaymentType")}`},children:t.jsx(W,{label:{label:a.paymentType,width:F},style:{width:"auto"},value:Lt(e.isRecurring,g,e.recurringBillInstance??1,e.recurringConfig?.totalPaymentCycles??0),additionalInfoLabel:Et(s,e.isRecurring,g,e.recurringConfig)})})]}):null]}),!g&&o?.method!=null&&(o.method.includes(d.NEW_INTERNATIONAL_METHOD_SUBTEXT)||o?.fee.amount!=null&&o.fee.amount!==0)?t.jsx(mn,{children:t.jsxs(pn,{windowSize:s,children:[t.jsxs(un,{children:[t.jsx(sn,{children:a.total}),t.jsx(Ne,{style:{padding:`12px ${n.sp3}`,lineHeight:"18px"},maxWidth:"312px",title:t.jsxs(cn,{children:[t.jsxs(_e,{children:[t.jsx(re,{children:o.method.includes(d.NEW_INTERNATIONAL_METHOD_SUBTEXT)&&ee!==T.currencyCode?Ee.conversionAmountColon:Fe.invoiceAmount}),t.jsx(oe,{children:k("0,0[.]00",{amount:u.amount-L.amount,currencySymbol:L.currencySymbol})})]}),t.jsxs(_e,{children:[t.jsx(re,{children:Ee.transactionFee}),t.jsx(oe,{children:k("0,0[.]00",{amount:L.amount,currencySymbol:L.currencySymbol})})]}),t.jsx(dn,{}),t.jsxs(rn,{children:[t.jsx(re,{children:Fe.total}),t.jsx(oe,{children:k("0,0[.]00",{amount:u.amount,currencyCode:u.currencyCode,currencySymbol:u.currencySymbol})})]})]}),placement:"top-end",children:t.jsx(on,{})})]}),t.jsx(yn,{children:t.jsx(Be,{amount:d.toAmount(u.amount,u.currencyCode,u.currencySymbol),integerStyles:G.h6Medium.cssObject,decimalStyles:G.standardMedium.cssObject})})]})}):null]}),t.jsx(Ot,{cancelBtn:{label:P&&!b?a.paymentOutsideZeni.markAsPaid:a.editBill,onClick:P&&!b?$e:ne,style:{width:ze(!1,P,b,Y,s)}},primaryBtn:{label:Oe(b,Y,e.isBillMarkedForRetry),isLoading:E?.fetchState==="In-Progress"||J?.fetchState==="In-Progress",onClick:b?$e:()=>{bt&&ae!=null?V(!0):Te()},style:{width:ze(!0,P,b,Y,s)}},rightSideComponent:P&&!b&&E.fetchState!=="In-Progress"?t.jsx(_n,{windowSize:s,children:t.jsx(Ne,{style:{color:S.heroDark,padding:`2px ${n.sp2}`},display:"flex",title:an,placement:"top",children:t.jsx(Un,{onClick:ne,"data-testid":j("review-detail-edit-bill-button"),children:t.jsx(Wn,{})})})}):null,style:{minHeight:e.paymentDetailsSection?.paymentType?.method!=null&&e.paymentDetailsSection.paymentType.method.includes(d.NEW_INTERNATIONAL_METHOD_SUBTEXT)?127:62,...e.paymentDetailsSection?.paymentType?.method!=null&&e.paymentDetailsSection.paymentType.method.includes(d.NEW_INTERNATIONAL_METHOD_SUBTEXT)&&{padding:n.sp3,rowGap:n.sp3}},children:e.paymentDetailsSection?.paymentType?.method!=null&&e.paymentDetailsSection.paymentType.method.includes(d.NEW_INTERNATIONAL_METHOD_SUBTEXT)?t.jsxs(kn,{children:[a.internationalText1,t.jsx(Mn,{href:"https://www.nium.com/legal/end-customer-terms",target:"_Blank",rel:"noopener noreferrer",children:a.internationalTerms}),a.internationalText2]}):null})]})},Oe=(e,w,x)=>e?a.paymentOutsideZeni.markAsPaid:x===!0?a.retryPayment:w?a.sendForApproval:a.scheduleBill,ze=(e,w,x,M,C)=>x?128:w&&!e&&C==="small"?"auto":M?165:p.footerButtonWidth.value(C),on=i(Xt)`
1
+ import{X as vt,V as Tt,C as y,cE as jt,M as St,cF as Ct,cG as Dt,j as t,cH as It,cI as le,cJ as Pt,l as d,cK as kt,cL as At,Y as j,cM as Mt,_ as A,cN as Bt,cO as Nt,cP as Ae,cQ as Me,cR as Be,q as K,cS as O,cT as z,cU as _,g as S,cV as Rt,cW as Ft,cX as Et,cY as Lt,bw as Ne,o as n,a3 as Ot,p as c,b as zt,bs as _t,Q as Wt,h as Ut,cZ as Zt,bK as Ht,s as se,f as de,c_ as Vt,c$ as Yt,aA as Kt,k as Gt,an as qt,Z as Xe,b4 as Xt,v as Qe,aN as Qt,d0 as Jt}from"./index-C2JVdK9x.js";import{b as U,n as i}from"./vendor-CnQcJ2Lu.js";import{t as en,o as tn}from"./LowBalancePopup-hdwaJezh-B0CYMe4t.js";import{S as W}from"./LabeledText-mTAE2dvH-e6RXkC8i.js";import"./mui-C5LQ0bMa.js";import"./analytics-CBL_L82S.js";import"./routing-Cpaypegg.js";import"./sentry-HDxG13yk.js";import"./redux-ByjIRbhZ.js";import"./liveblocks-sSQ9JElv.js";import"./crypto-BURQLTgV.js";const Je=["small","medium-compact","medium-regular"],p={largeLabelWidth:new y(150,215,215),infoMinWidth:new y(0,0,0,142,142),infoMarginRight:new y(0,0,0,c[2],c[2]),footerButtonWidth:new y(120,165),iconContainerMarginTop:new y(6,c[1]),navBarContainerPaddingTop:new y(10,c[3]),sectionTitleMarginLeft:new y(c[3],c[0]),reviewContainerMarginLeft:new y(c[3],c[6]),reviewContainerMarginRight:new y(c[3],c[8]),footerRightIconMarginRight:new y(c[0],c[0],c[7]),infoLabelPaddingRight:new y(c[0],c[3]),infoLabelMarginTop:new y(c[1],c[0])},nn={sectionTitle:new Wt("h6Medium","h5Medium")},{dateFormat:Re,common:{currency:T,labels:Fe,edit:an,strings:{empty:h}},spendManagement:{billPay:ln}}=St.getLocalizedStrings(),{billDetails:a,paymentDetails:Ee}=ln,Le=({attachment:e})=>{const[w,x]=U.useState(!1),M=()=>{x(!1)},C=e.fileId?.length===0;return t.jsxs(Bn,{isDisabled:e.fileId?.length===0,"data-testid":j("attachment-tag",e.fileName),onClick:()=>C===!1?x(!0):null,children:[w&&e?.fileDownloadUrl!=null?t.jsx(Vt,{title:e.fileName,file:e,onCrossClick:()=>M(),setShowFullScreenView:x}):null,t.jsx(Nn,{children:t.jsx(Yt,{contentType:e.contentType})})]})},ti=({billDetails:e,billpayApprovalView:w,isBillPayCommentingEnabled:x,currentTenant:M,isInternationalPaymentShaVsOurEnabled:C,isLocalCurrencyEnabled:et,style:tt,analytics:$,isRecurringBillsFeatureEnabled:nt,isApprovalRequiredForMarkAsPaid:it,isDetectInsufficientFundsEnabled:at,billId:f,onClickEdit:ce,discardBillDetailsFromLocalStore:me,saveBillDetails:pe,discardOutsideZeniPaymentData:lt,updateBillDetailSaveBillCode:ue,redirectToBillsScreen:ye,onAttachmentClick:Q,retryPayment:ot})=>{const s=vt(),m=Tt(),B={application:"dashboard",companyId:m.currentTenant?.companyId,tab:"bill",entityId:f},N=x&&f!=null,R=`dashboard_${m.currentTenant?.companyId}`,F=p.largeLabelWidth.value(s),E=e.saveStatus,J=e.zeniAssistRetryStatus,ee=e.vendor?.vendorCurrencyCode,o=jt(C,et,e.billPayConfigList.filter(l=>l.method.includes(e.paymentDetailsSection?.withdrawFrom?.accType??"depositAccount")),e.paymentDetailsSection?.internationalTransferFeeBearerPaymentMethod,e.paymentDetailsSection?.paymentType,ee),D=Re.visual.MMMDCommaYYYYformat,he={amount:e.recipientTotalAmount.amount/(e.paymentDetailsSection?.conversionRate??1)*100/100,currencyCode:T.currencyCode,currencySymbol:T.currencySymbol},u={amount:o?.method.includes("international")===!0?Ct(he,o):e.recipientTotalAmount.amount+(o?.fee.amount??0),currencyCode:T.currencyCode,currencySymbol:T.currencySymbol},L={amount:o?.method.includes("international")===!0?Dt(he,o):o?.fee.amount??0,currencyCode:T.currencyCode,currencySymbol:T.currencySymbol},[rt,ge]=U.useState(!1),[st,xe]=U.useState(!1),fe=()=>ge(!1),dt=()=>{$.trackBillPayMagicLinkPreviewEmail("review_bill"),ge(!0)},ct=e.isCollectToAccountInfoFromVendorContact?t.jsxs(t.Fragment,{children:[`${a.magicLink.collectFrom} ${e.toAccountVendorEmail}`,t.jsx(kn,{size:s,children:t.jsx(Pn,{})})]}):It(e.paymentDetailsSection?.paymentTo);U.useEffect(()=>{(E?.fetchState==="Completed"||J?.fetchState==="Completed")&&(me(),ue(),ye())},[E,J,ye,me,ue]);const v=e.billPayInfo?.stage,P=e.billPayInfo?.billStatus,Z=e.billPayInfo?.billPaymentStatus,mt=e.billPayInfo?.billPaymentRefundStatus,te=v?.code==="paid"?v:P?.code=="approved"&&Z?.code?Z:P,pt=e.billPayInfo?.isRefundInitiated===!0?mt:P?.code=="approved"&&Z?.code?Z:P,ne=()=>{ce()},be=()=>{ce()},H=e.paymentDetailsSection?.paymentDate,ie=le(o?.method??""),we=ie.replace("Same Day",""),ut=e.isCollectToAccountInfoFromVendorContact?t.jsx(Pt,{paymentTypeLabel:we,onClick:dt}):a.addedByZeni,V=w.allApprovalRules.length>0,yt=d.toAmount(o?.method!=null&&(o.method.includes(d.NEW_INTERNATIONAL_METHOD_SUBTEXT)||o?.fee.amount!=null&&o.fee.amount!==0)?u.amount-L.amount:u.amount,o?.fee.currencyCode??d.defaultVendorCurrency.currencyCode,o?.fee.currencySymbol??d.defaultVendorCurrency.currencySymbol),g=d.isPaymentMethodOutsideZeni(e.paymentDetailsSection?.paymentType?.method),ht=l=>{$.trackBillPayMarkAsPaidSubmit(l.paymentMode??"other",v?.code??"draft",te?.code??""),pe(!0,l)},$e=()=>{xe(!0),$.trackBillPayMarkAsPaid(v?.code??"draft",te?.code??"")},gt=()=>{lt(),xe(!1)},k=g&&(v?.code!=null?v.code==="draft"||P?.code==="approved":!0),b=k&&!it,ve=Oe(b,V,e.isBillMarkedForRetry),xt=()=>g?b?void 0:a.paymentOutsideZeni.reviewInfo:o?.method!=null&&o.method.includes(d.NEW_INTERNATIONAL_METHOD_SUBTEXT)&&e.paymentDetailsSection?.internationalTransferFeeBearerPaymentMethod!=null&&C&&ee===T.currencyCode?Ft(e.paymentDetailsSection.internationalTransferFeeBearerPaymentMethod):void 0,ae=at&&e.paymentDetailsSection!=null?kt(u,e.paymentDetailsSection.withdrawFrom,e.paymentDetailsSection.paymentDate):void 0,ft=()=>{const l=e.paymentDetailsSection?.paymentDate,r=e.isCollectToAccountInfoFromVendorContact,I=e.recurringConfig,wt=e.recipientTotalAmount;if(e.isInvoiceDateAutoUpdated===!0&&$.trackBillPayAutoDateChange(f??"new_bill"),o?.method!=null&&l!=null){const $t=g?a.paymentOutsideZeni.offline:le(o.method);if($.trackBillPaySendForApproval($t,l.format(Re.analytics.MMMDashDDDashYYYYFormat),r,e.isRecurring,f,e.paymentDetailsSection?.internationalTransferFeeBearerPaymentMethod,{startDate:d.zeniDate(I?.startDate?.toString()??"").format(D),endDate:d.zeniDate(I?.endDate?.toString()??"").format(D),frequency:I?.frequency??"monthly",totalAmount:wt.amount,totalPaymentCycles:I?.totalPaymentCycles??0,isApprovalRequired:I?.isApprovalRequired??!1,updateCurrentBill:e.recurringConfig?.id!=null?I?.updateRecurringBills==="current":void 0,updateFutureRecurringBills:e.recurringConfig?.id!=null?I?.updateRecurringBills==="all":void 0}),ae!=null){const Se=v?.code??"draft",Ce=P?.code??"",De=e.isRecurring?["Recurring"]:["One-Time"],Ie=e.invoiceNumber??"",Pe=Jt(m.loggedInUser),ke=e.paymentDetailsSection?.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account";ve===a.scheduleBill?$.trackLowBalanceAccountSchedule(Se,Ce,De,Ie,Pe,ke):ve===a.sendForApproval&&$.trackLowBalanceAccountSentForApproval(Se,Ce,De,Ie,Pe,ke)}}},Te=()=>{je===!0&&Y(!1),e.isBillMarkedForRetry===!0?(ot(),$.trackRetryConfirmClick(te?.code??"",v?.code??"",pt?.description??"",e.isRecurring?["Recurring"]:["One-Time"],e.invoiceNumber??"")):e.vendor!=null&&(ft(),pe(!1,{}))},bt=d.checkIfCreatorIsApprover(u.amount,w.allApprovalRules,m.loggedInUser),[je,Y]=U.useState(!1);return t.jsxs(hn,{children:[st?t.jsx(en,{onCancel:gt,onProceedForMarkAsPaid:ht,saveDetailsFetchState:E?.fetchState,paymentData:e.outsideZeniPaymentInfo}):null,je?t.jsx(tn,{withdrawFrom:e.paymentDetailsSection?.withdrawFrom,paymentDate:e.paymentDetailsSection?.paymentDate,onOkClick:Te,onCancelClick:()=>{Y(!1),ne()},onClickAway:()=>{Y(!1)}}):null,t.jsx(At,{anchor:"right",open:rt,onClose:fe,transitionDuration:250,"data-testid":j("vendor-email-preview-drawer"),children:t.jsx(Mt,{companyName:Bt(M.company?.companyInfo),vendor:e.vendor?.name,paymentDate:H?.format(D)??"",paymentType:we,amount:A("0,0[.]00",u),isInvoiceAttached:!!e.file,onClose:fe})}),t.jsxs(gn,{windowSize:s,style:tt,children:[s==="small"?t.jsxs(In,{windowSize:s,children:[t.jsx(Ve,{onClick:be,"data-testid":j("review-detail-nav-bar-small-back")}),t.jsx(We,{windowSize:s,children:a.oneLastLook})]}):t.jsx(Dn,{"data-testid":j("review-details-nav-bar-back"),children:t.jsx(Ve,{onClick:be})}),s!=="small"?t.jsx(fn,{children:t.jsx(We,{windowSize:s,children:a.oneLastLook})}):null,e.duplicateBillTransactions.length>0?t.jsxs(bn,{children:[t.jsxs(wn,{children:[t.jsx(zn,{}),t.jsxs($n,{children:[t.jsx(Tn,{children:a.duplicateBillPayWarning}),t.jsxs(vn,{children:[a.duplicateBillPayWarningSubHeading,t.jsxs("span",{"data-testid":j("review-detail-attachment-button"),onClick:()=>Q(e.duplicateBillTransactions[0].id,e.duplicateBillTransactions[0].billPayInfo.stage.code),style:{textDecoration:"underline",cursor:"pointer"},children:[a.viewBill,e.duplicateBillTransactions[0].documentId]})]})]})]}),t.jsxs(En,{children:[t.jsx(On,{children:a.duplicateInvoiceFound}),e.duplicateBillTransactions.map(l=>{const r=Nt(l);return l!=null?t.jsx(Ln,{children:Je.includes(s)?t.jsxs(Ue,{windowSize:s,children:[t.jsxs(jn,{children:[t.jsxs(Sn,{children:[l.attachments&&l.attachments.length>0?t.jsx(Le,{attachment:l.attachments[0]}):t.jsx(Ye,{children:t.jsx(Ke,{})}),t.jsx(q,{children:t.jsxs(t.Fragment,{children:[l.documentId!=null?a.invoiceNo:null,l.documentId]})})]}),t.jsx(Ge,{windowSize:s,children:A("0,0[.]00",l.recipientTotalAmount)})]}),t.jsxs(Rn,{"data-testid":j("review-detail-mobile-info"),onClick:()=>Q(l.id,l.billPayInfo.stage.code),children:[t.jsxs(q,{children:[l.dueDate!=null?a.due:null," ",l.dueDate?.format(D)]}),t.jsx(qe,{children:r!=null?Ae.includes(r.code)?t.jsx(Me,{style:{padding:"2px 5px"},title:r.value,placement:"top",children:t.jsx(X,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value})}):t.jsx(X,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value}):null})]})]}):t.jsxs(Ue,{windowSize:s,children:[l.attachments&&l.attachments.length>0?t.jsx(Le,{attachment:l.attachments[0]}):t.jsx(Ye,{children:t.jsx(Ke,{})}),t.jsxs(Fn,{"data-testid":j("review-detail-info"),onClick:()=>Q(l.id,l.billPayInfo.stage.code),children:[t.jsx(q,{style:{width:"50%"},children:t.jsxs("div",{children:[l.documentId!=null?a.invoiceNo:null," ",l.documentId]})}),t.jsxs(q,{style:{width:"25%"},children:[l.dueDate!=null?a.due:null," ",l.dueDate?.format(D)]}),t.jsx(Ge,{style:{width:"25%"},windowSize:s,children:A("0,0[.]00",l.amount)})]}),t.jsx(qe,{children:r!=null?Ae.includes(r.code)?t.jsx(Me,{style:{padding:"2px 5px"},title:r.value,placement:"top",children:t.jsx(X,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value})}):t.jsx(X,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value}):null})]})},l.id):null})]})]}):null,t.jsxs(Cn,{children:[t.jsx(Ze,{children:a.pay}),t.jsx(He,{children:t.jsx(Be,{amount:yt,integerStyles:K.largeMedium.cssObject,decimalStyles:K.smallMedium.cssObject})}),t.jsx(Ze,{children:a.to}),t.jsx(He,{children:e.vendor?.name})]}),t.jsxs(xn,{children:[g?null:t.jsxs(t.Fragment,{children:[t.jsx(O,{isThreadAllowed:N,entityId:f,dashboardTabKey:_({type:"details",key:"withdrawFrom"}),roomId:R,companyId:m.currentTenant?.companyId??h,companyName:m.currentTenant?.companyName??h,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${z("withdrawFrom")}`},children:t.jsx(W,{label:{label:a.withdrawFrom,width:F},style:{width:"auto"},value:e.paymentDetailsSection?.withdrawFrom!=null?Rt(e.paymentDetailsSection.withdrawFrom,s):h,infoLabelStyle:{textAlign:s==="small"?"left":"right",paddingRight:p.infoLabelPaddingRight.valuePx(s),marginTop:p.infoLabelMarginTop.valuePx(s),color:S.brandColorGoldDark},additionalInfoLabel:ae})}),t.jsx(G,{})]}),t.jsx(O,{isThreadAllowed:N,entityId:f,dashboardTabKey:_({type:"details",key:"paymentType"}),roomId:R,companyId:m.currentTenant?.companyId??h,companyName:m.currentTenant?.companyName??h,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${z("paymentType")}`},children:t.jsx(W,{label:{label:a.paymentMethod,width:F},style:{width:"auto"},value:le(o?.method??""),additionalInfoLabel:xt()})}),t.jsx(G,{}),!g&&H!=null?t.jsxs(t.Fragment,{children:[t.jsx(O,{isThreadAllowed:N,entityId:f,dashboardTabKey:_({type:"details",key:"paymentDate"}),roomId:R,companyId:m.currentTenant?.companyId??h,companyName:m.currentTenant?.companyName??h,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${z("paymentDate")}`},children:t.jsx(W,{label:{label:a.paymentDate,width:F},style:{width:"auto"},value:H.format(D),additionalInfoLabel:`${a.estimatedArrival}${d.zeniDate(d.getNextNthWorkingDay(H.toDate(),[0,6],o?.maxPeriod.value??0).toDateString()).format(D)} - (${ie.length>0?`${ie} `:""}${a.deliveryTimeLabel} = ${o?.maxPeriod.value??"0"} ${a.deliveryTimeUnits})`})}),t.jsx(G,{})]}):null,g?null:t.jsx(O,{isThreadAllowed:N,entityId:f,dashboardTabKey:_({type:"details",key:"paymentTo"}),roomId:R,companyId:m.currentTenant?.companyId??h,companyName:m.currentTenant?.companyName??h,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${z("paymentTo")}`},children:t.jsx(W,{label:{label:a.paymentTo,width:F},style:{width:"auto"},value:ct??"",additionalInfoLabel:ut})}),g||nt?t.jsxs(t.Fragment,{children:[t.jsx(G,{}),t.jsx(O,{isThreadAllowed:N,entityId:f,dashboardTabKey:_({type:"details",key:"recurringPaymentType"}),roomId:R,companyId:m.currentTenant?.companyId??h,companyName:m.currentTenant?.companyName??h,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${z("recurringPaymentType")}`},children:t.jsx(W,{label:{label:a.paymentType,width:F},style:{width:"auto"},value:Lt(e.isRecurring,g,e.recurringBillInstance??1,e.recurringConfig?.totalPaymentCycles??0),additionalInfoLabel:Et(s,e.isRecurring,g,e.recurringConfig)})})]}):null]}),!g&&o?.method!=null&&(o.method.includes(d.NEW_INTERNATIONAL_METHOD_SUBTEXT)||o?.fee.amount!=null&&o.fee.amount!==0)?t.jsx(mn,{children:t.jsxs(pn,{windowSize:s,children:[t.jsxs(un,{children:[t.jsx(sn,{children:a.total}),t.jsx(Ne,{style:{padding:`12px ${n.sp3}`,lineHeight:"18px"},maxWidth:"312px",title:t.jsxs(cn,{children:[t.jsxs(_e,{children:[t.jsx(re,{children:o.method.includes(d.NEW_INTERNATIONAL_METHOD_SUBTEXT)&&ee!==T.currencyCode?Ee.conversionAmountColon:Fe.invoiceAmount}),t.jsx(oe,{children:A("0,0[.]00",{amount:u.amount-L.amount,currencySymbol:L.currencySymbol})})]}),t.jsxs(_e,{children:[t.jsx(re,{children:Ee.transactionFee}),t.jsx(oe,{children:A("0,0[.]00",{amount:L.amount,currencySymbol:L.currencySymbol})})]}),t.jsx(dn,{}),t.jsxs(rn,{children:[t.jsx(re,{children:Fe.total}),t.jsx(oe,{children:A("0,0[.]00",{amount:u.amount,currencyCode:u.currencyCode,currencySymbol:u.currencySymbol})})]})]}),placement:"top-end",children:t.jsx(on,{})})]}),t.jsx(yn,{children:t.jsx(Be,{amount:d.toAmount(u.amount,u.currencyCode,u.currencySymbol),integerStyles:K.h6Medium.cssObject,decimalStyles:K.standardMedium.cssObject})})]})}):null]}),t.jsx(Ot,{cancelBtn:{label:k&&!b?a.paymentOutsideZeni.markAsPaid:a.editBill,onClick:k&&!b?$e:ne,style:{width:ze(!1,k,b,V,s)}},primaryBtn:{label:Oe(b,V,e.isBillMarkedForRetry),isLoading:E?.fetchState==="In-Progress"||J?.fetchState==="In-Progress",onClick:b?$e:()=>{bt&&ae!=null?Y(!0):Te()},style:{width:ze(!0,k,b,V,s)}},rightSideComponent:k&&!b&&E.fetchState!=="In-Progress"?t.jsx(_n,{windowSize:s,children:t.jsx(Ne,{style:{color:S.heroDark,padding:`2px ${n.sp2}`},display:"flex",title:an,placement:"top",children:t.jsx(Un,{onClick:ne,"data-testid":j("review-detail-edit-bill-button"),children:t.jsx(Wn,{})})})}):null,style:{minHeight:e.paymentDetailsSection?.paymentType?.method!=null&&e.paymentDetailsSection.paymentType.method.includes(d.NEW_INTERNATIONAL_METHOD_SUBTEXT)?127:62,...e.paymentDetailsSection?.paymentType?.method!=null&&e.paymentDetailsSection.paymentType.method.includes(d.NEW_INTERNATIONAL_METHOD_SUBTEXT)&&{padding:n.sp3,rowGap:n.sp3}},children:e.paymentDetailsSection?.paymentType?.method!=null&&e.paymentDetailsSection.paymentType.method.includes(d.NEW_INTERNATIONAL_METHOD_SUBTEXT)?t.jsxs(An,{children:[a.internationalText1,t.jsx(Mn,{href:"https://www.nium.com/legal/end-customer-terms",target:"_Blank",rel:"noopener noreferrer",children:a.internationalTerms}),a.internationalText2]}):null})]})},Oe=(e,w,x)=>e?a.paymentOutsideZeni.markAsPaid:x===!0?a.retryPayment:w?a.sendForApproval:a.scheduleBill,ze=(e,w,x,M,C)=>x?128:w&&!e&&C==="small"?"auto":M?165:p.footerButtonWidth.value(C),on=i(Xt)`
2
2
  width: ${n.sp3};
3
3
  height: ${n.sp3};
4
4
  color: ${e=>e.theme.colors.hero};
@@ -68,7 +68,7 @@ import{X as vt,w as Tt,C as y,cB as jt,M as St,cC as Ct,cD as Dt,j as t,cE as It
68
68
  border-radius: ${n.sp2};
69
69
  margin-bottom: ${n.sp3};
70
70
  margin-top: ${n.sp3};
71
- `,K=i.div`
71
+ `,G=i.div`
72
72
  display: flex;
73
73
  flex: 1;
74
74
  background-color: ${e=>e.theme.colors.grey3};
@@ -102,7 +102,7 @@ import{X as vt,w as Tt,C as y,cB as jt,M as St,cC as Ct,cD as Dt,j as t,cE as It
102
102
  `,vn=i(se)`
103
103
  padding-bottom: ${n.sp3};
104
104
  color: ${S.brandColorGoldDark};
105
- `,Tn=i(Zt)`
105
+ `,Tn=i(Ht)`
106
106
  padding-top: ${n.sp3};
107
107
  color: ${S.brandColorGoldDark};
108
108
  `,Ue=i.div`
@@ -121,15 +121,15 @@ import{X as vt,w as Tt,C as y,cB as jt,M as St,cC as Ct,cD as Dt,j as t,cE as It
121
121
  `,Cn=i.div`
122
122
  display: flex;
123
123
  padding-top: ${n.sp3};
124
- `,He=i(Kt)`
124
+ `,Ze=i(Gt)`
125
125
  display: flex;
126
126
  color: ${e=>e.theme.colors.hero};
127
127
  margin-right: ${n.sp1};
128
- `,Ze=i(qt)`
128
+ `,He=i(qt)`
129
129
  display: flex;
130
130
  color: ${e=>e.theme.colors.primary};
131
131
  margin-right: ${n.sp1};
132
- `,Ye=i(_t)`
132
+ `,Ve=i(_t)`
133
133
  cursor: pointer;
134
134
  color: ${e=>e.theme.colors.hero};
135
135
  width: 20px;
@@ -152,17 +152,17 @@ import{X as vt,w as Tt,C as y,cB as jt,M as St,cC as Ct,cD as Dt,j as t,cE as It
152
152
  padding-left: ${n.sp0};
153
153
  z-index: 2;
154
154
  background-color: ${e=>e.theme.colors.grey4};
155
- `,An=i(zt)`
155
+ `,Pn=i(zt)`
156
156
  height: ${n.sp3};
157
157
  width: ${n.sp3};
158
158
  color: ${e=>e.theme.colors.hero};
159
- `,Pn=i.span`
159
+ `,kn=i.span`
160
160
  display: flex;
161
161
  align-items: center;
162
162
  margin-left: ${n.sp2};
163
163
  margin-top: ${e=>p.iconContainerMarginTop.valuePx(e.size)};
164
164
  align-self: ${e=>e.size==="small"?"baseline":"center"};
165
- `,kn=i(de)`
165
+ `,An=i(de)`
166
166
  color: ${e=>e.theme.colors.grey1};
167
167
  display: flex;
168
168
  flex-wrap: wrap;
@@ -193,12 +193,12 @@ import{X as vt,w as Tt,C as y,cB as jt,M as St,cC as Ct,cD as Dt,j as t,cE as It
193
193
  width: ${n.sp4};
194
194
  height: ${n.sp4};
195
195
  display: flex;
196
- `,Ve=i.div`
196
+ `,Ye=i.div`
197
197
  cursor: default;
198
198
  display: flex;
199
199
  align-items: center;
200
200
  margin-right: ${n.sp1};
201
- `,Ge=i(Gt)`
201
+ `,Ke=i(Kt)`
202
202
  cursor: pointer;
203
203
  width: ${n.sp4};
204
204
  height: ${n.sp4};
@@ -209,7 +209,7 @@ import{X as vt,w as Tt,C as y,cB as jt,M as St,cC as Ct,cD as Dt,j as t,cE as It
209
209
  align-items: center;
210
210
  min-width: 142px;
211
211
  flex-grow: 1;
212
- `,Ke=i(se)`
212
+ `,Ge=i(se)`
213
213
  display: flex;
214
214
  color: ${e=>e.theme.colors.primary};
215
215
  align-items: center;
@@ -260,7 +260,7 @@ import{X as vt,w as Tt,C as y,cB as jt,M as St,cC as Ct,cD as Dt,j as t,cE as It
260
260
  `,On=i(de)`
261
261
  margin-top: ${n.sp3};
262
262
  color: ${S.alert};
263
- `,zn=i(Ht)`
263
+ `,zn=i(Zt)`
264
264
  min-width: ${n.sp4};
265
265
  height: ${n.sp4};
266
266
  width: ${n.sp4};
@@ -1,4 +1,4 @@
1
- import{X as B,j as e,Y as x,o as r,a3 as L,C as d,a2 as M,Q as C,h as W,g as s,s as y,b$ as R,c as I,v as j,az as D,m as n,ed as G,ax as A,jj as F,jk as H}from"./index-BEYLWYh7.js";import{n as t}from"./vendor-CnQcJ2Lu.js";const a={containerMarginTop:new d(0,n[2]),containerMarginLeft:new d(n[3],n[8]),containerMarginRight:new d(n[3],n[8]),subTitleMarginBottom:new d(n[2],n[2]),titleMarginBotom:new d(n[0],n[2]),titleMarginRight:new d(n[0],n[3]),navBarHeight:new d(62,62,62),navBarPaddingLeft:new d(n[3],n[3],n[8]),navBarPaddingRight:new d(n[3],n[3],n[8])},J={title:new C("h6Regular","h5Regular")},xi=({title:i,description:p,reviewItems:S,showFooter:b,footerProps:{primaryButton:z,cancelButton:T,hideCancel:E},onCloseOverlay:k,onCloseReviewItem:P})=>{const l=B();return e.jsxs(X,{children:[e.jsx(V,{windowSize:l,children:e.jsx(Z,{children:e.jsx(_,{windowSize:l,children:e.jsx(ii,{children:e.jsx(ei,{onClick:k,"data-testid":x("review-overlay-close",i)})})})})}),e.jsxs(K,{windowSize:l,children:[e.jsxs(O,{windowSize:l,children:[e.jsx(Y,{children:e.jsx(q,{windowSize:l,children:i})}),e.jsx(N,{isError:p.isError,windowSize:l,children:p.content})]}),e.jsx(U,{windowSize:l,children:S.map(o=>{const h=o.reviewStatus.code==="error",c=o.reviewStatus.code==="warning"||o.reviewStatus.code==="low-balance";return e.jsxs(ri,{isLoading:!1,isActive:!0,isWarning:c,isError:h,children:[c?e.jsx(ci,{onClick:()=>P(o.id),"data-testid":x("review-close",o.id)}):null,e.jsxs(ti,{children:[e.jsxs(ni,{children:[e.jsx(di,{children:Q(o)}),e.jsxs(oi,{children:[e.jsxs(m,{children:[e.jsx(u,{style:{marginLeft:r.sp2},isWarning:c,isError:h,children:o.leftSideText.title}),e.jsx(u,{isWarning:c,isError:h,children:o.rightSideText.title})]}),e.jsxs(m,{children:[e.jsx(si,{style:{marginLeft:r.sp2},children:o.leftSideText.subTitle}),l!=="small"?e.jsxs(w,{windowSize:l,children:[e.jsx(g,{isError:h,isWarning:c,children:e.jsxs(e.Fragment,{children:[o.rightSideText.showThunderIcon===!0?e.jsx(f,{children:e.jsx($,{})}):null,o.rightSideText.subTitle]})}),e.jsx(g,{isWarning:!0,isError:!1,children:o.rightSideText.additonalInfo})]}):null]})]})]}),l==="small"?e.jsxs(w,{windowSize:l,children:[e.jsx(g,{style:{marginLeft:r.sp5,marginTop:r.sp0},isError:h,isWarning:c,children:e.jsxs(e.Fragment,{children:[o.rightSideText.showThunderIcon===!0?e.jsx(f,{children:e.jsx($,{})}):null,o.rightSideText.subTitle]})}),e.jsx(g,{style:{marginLeft:r.sp5,marginTop:r.sp0},isWarning:c,isError:h,children:o.rightSideText.additonalInfo})]}):null]})]},o.id)})})]}),b?e.jsx(L,{primaryBtn:z,cancelBtn:T,showCancel:!E}):null]})},Q=i=>i.reviewStatus.isLoading?e.jsx(I,{size:"Small",style:{display:"flex",width:r.sp4,height:r.sp4,alignItems:"center",justifyContent:"center"},start:!0}):i.reviewStatus.code==="error"?e.jsx(v,{isError:!0}):i.reviewStatus.code==="warning"?e.jsx(v,{isError:!1}):i.reviewStatus.code==="valid"?e.jsx(li,{}):i.reviewStatus.code==="low-balance"?e.jsx(hi,{}):e.jsx(ai,{}),X=t.div`
1
+ import{X as B,j as e,Y as x,o as r,a3 as L,C as d,a2 as M,Q as C,h as W,g as s,s as y,c2 as R,d as I,v as j,az as D,p as n,eg as G,ax as A,jm as F,jn as H}from"./index-C2JVdK9x.js";import{n as t}from"./vendor-CnQcJ2Lu.js";const a={containerMarginTop:new d(0,n[2]),containerMarginLeft:new d(n[3],n[8]),containerMarginRight:new d(n[3],n[8]),subTitleMarginBottom:new d(n[2],n[2]),titleMarginBotom:new d(n[0],n[2]),titleMarginRight:new d(n[0],n[3]),navBarHeight:new d(62,62,62),navBarPaddingLeft:new d(n[3],n[3],n[8]),navBarPaddingRight:new d(n[3],n[3],n[8])},J={title:new C("h6Regular","h5Regular")},xi=({title:i,description:p,reviewItems:S,showFooter:b,footerProps:{primaryButton:z,cancelButton:T,hideCancel:E},onCloseOverlay:k,onCloseReviewItem:P})=>{const l=B();return e.jsxs(X,{children:[e.jsx(V,{windowSize:l,children:e.jsx(Z,{children:e.jsx(_,{windowSize:l,children:e.jsx(ii,{children:e.jsx(ei,{onClick:k,"data-testid":x("review-overlay-close",i)})})})})}),e.jsxs(K,{windowSize:l,children:[e.jsxs(O,{windowSize:l,children:[e.jsx(Y,{children:e.jsx(q,{windowSize:l,children:i})}),e.jsx(N,{isError:p.isError,windowSize:l,children:p.content})]}),e.jsx(U,{windowSize:l,children:S.map(o=>{const h=o.reviewStatus.code==="error",c=o.reviewStatus.code==="warning"||o.reviewStatus.code==="low-balance";return e.jsxs(ri,{isLoading:!1,isActive:!0,isWarning:c,isError:h,children:[c?e.jsx(ci,{onClick:()=>P(o.id),"data-testid":x("review-close",o.id)}):null,e.jsxs(ti,{children:[e.jsxs(ni,{children:[e.jsx(di,{children:Q(o)}),e.jsxs(oi,{children:[e.jsxs(m,{children:[e.jsx(u,{style:{marginLeft:r.sp2},isWarning:c,isError:h,children:o.leftSideText.title}),e.jsx(u,{isWarning:c,isError:h,children:o.rightSideText.title})]}),e.jsxs(m,{children:[e.jsx(si,{style:{marginLeft:r.sp2},children:o.leftSideText.subTitle}),l!=="small"?e.jsxs(w,{windowSize:l,children:[e.jsx(g,{isError:h,isWarning:c,children:e.jsxs(e.Fragment,{children:[o.rightSideText.showThunderIcon===!0?e.jsx(f,{children:e.jsx($,{})}):null,o.rightSideText.subTitle]})}),e.jsx(g,{isWarning:!0,isError:!1,children:o.rightSideText.additonalInfo})]}):null]})]})]}),l==="small"?e.jsxs(w,{windowSize:l,children:[e.jsx(g,{style:{marginLeft:r.sp5,marginTop:r.sp0},isError:h,isWarning:c,children:e.jsxs(e.Fragment,{children:[o.rightSideText.showThunderIcon===!0?e.jsx(f,{children:e.jsx($,{})}):null,o.rightSideText.subTitle]})}),e.jsx(g,{style:{marginLeft:r.sp5,marginTop:r.sp0},isWarning:c,isError:h,children:o.rightSideText.additonalInfo})]}):null]})]},o.id)})})]}),b?e.jsx(L,{primaryBtn:z,cancelBtn:T,showCancel:!E}):null]})},Q=i=>i.reviewStatus.isLoading?e.jsx(I,{size:"Small",style:{display:"flex",width:r.sp4,height:r.sp4,alignItems:"center",justifyContent:"center"},start:!0}):i.reviewStatus.code==="error"?e.jsx(v,{isError:!0}):i.reviewStatus.code==="warning"?e.jsx(v,{isError:!1}):i.reviewStatus.code==="valid"?e.jsx(li,{}):i.reviewStatus.code==="low-balance"?e.jsx(hi,{}):e.jsx(ai,{}),X=t.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  background-color: ${i=>i.theme.colors.grey4};
@@ -1,15 +1,15 @@
1
- import{eI as h,eJ as x,j as t,bs as m,o as i,Y as o,M as g,n as j,v as p}from"./index-BEYLWYh7.js";import{n as r}from"./vendor-CnQcJ2Lu.js";const{hyphen:a}=g.getLocalizedStrings().common.strings,y=r.div``,f=r.div`
1
+ import{eL as h,eM as x,j as t,bw as m,o as i,Y as o,M as g,n as j,v as p}from"./index-C2JVdK9x.js";import{n as s}from"./vendor-CnQcJ2Lu.js";const{hyphen:a}=g.getLocalizedStrings().common.strings,y=s.div``,f=s.div`
2
2
  display: flex;
3
3
  min-width: 192px;
4
4
  justify-content: space-between;
5
- `,b=r(p)`
5
+ `,b=s(p)`
6
6
  color: ${e=>e.theme.colors.hero};
7
- `,u=r(p)`
7
+ `,w=s(p)`
8
8
  color: ${e=>e.theme.colors.brandColorPearl};
9
- `,d=r.div`
9
+ `,d=s.div`
10
10
  display: flex;
11
11
  align-items: center;
12
- `,w=r(j)`
12
+ `,u=s(j)`
13
13
  border-radius: ${i.sp12};
14
14
  border: 1px solid ${e=>e.theme.colors.grey1};
15
15
  display: flex;
@@ -19,4 +19,4 @@ import{eI as h,eJ as x,j as t,bs as m,o as i,Y as o,M as g,n as j,v as p}from"./
19
19
  justify-content: center;
20
20
  color: 1px solid ${e=>e.theme.colors.grey1};
21
21
  margin-left: ${i.sp1};
22
- `,C=({roles:e})=>{let s=a,l=[];s=h(e),l=x(e);const c=()=>l.length>0?t.jsx(y,{children:l.map(n=>t.jsxs(f,{children:[t.jsx(b,{children:n[0]}),t.jsx(u,{children:n[1]})]},n.join(",")))}):t.jsx(t.Fragment,{children:a});return l.length>0?t.jsx(m,{enterDelay:600,"data-testid":o("roles-tooltip",s),title:c(),placement:"top-end",style:{marginLeft:i.sp1,padding:"6px 12px"},maxWidth:"264px",children:t.jsxs(d,{"data-testid":o("roles-label-wrapper",s),children:[s,t.jsx(w,{className:"roles-count-wrapper","data-testid":o("roles-count-wrapper",s),children:l.length})]})}):t.jsx(d,{"data-testid":o("roles-label-wrapper",s),children:s})};export{C as T};
22
+ `,L=({roles:e})=>{let r=a,l=[];r=h(e),l=x(e);const c=()=>l.length>0?t.jsx(y,{children:l.map(n=>t.jsxs(f,{children:[t.jsx(b,{children:n[0]}),t.jsx(w,{children:n[1]})]},n.join(",")))}):t.jsx(t.Fragment,{children:a});return l.length>0?t.jsx(m,{enterDelay:600,"data-testid":o("roles-tooltip",r),title:c(),placement:"top-end",style:{marginLeft:i.sp1,padding:"6px 12px"},maxWidth:"264px",children:t.jsxs(d,{"data-testid":o("roles-label-wrapper",r),children:[r,t.jsx(u,{className:"roles-count-wrapper","data-testid":o("roles-count-wrapper",r),children:l.length})]})}):t.jsx(d,{"data-testid":o("roles-label-wrapper",r),children:r})};export{L as T};
@@ -1,4 +1,4 @@
1
- import{a1 as H,l as me,hK as ee,g3 as fe,es as we,hL as Je,a as Me,hM as Ve,c3 as _e,c4 as Fe,j as a,M as be,F as Pe,bO as $e,bQ as Ne,bR as qe,a3 as Re,hN as ze,hO as Be,T as he,hP as Se,hQ as Ue,cg as We,X as Ge,i2 as He,g8 as re,m as R,g as De,C as Ce,c6 as Ke,hR as Xe,hS as Ye,hT as Qe,o as _}from"./index-BEYLWYh7.js";import{b as m,n as B}from"./vendor-CnQcJ2Lu.js";import{i as Ze,r as et,n as tt,o as lt}from"./ScheduleSequenceTable-CEZL4GA8-Bz6Z5iY2.js";import"./mui-C5LQ0bMa.js";import"./analytics-CBL_L82S.js";import"./routing-Cpaypegg.js";import"./sentry-HDxG13yk.js";import"./redux-ByjIRbhZ.js";import"./liveblocks-sSQ9JElv.js";import"./crypto-BURQLTgV.js";const z={labelWidth:new Ce(160,160,160),depCategoryLabelWidth:new Ce(200,280,280)},at=B.div`
1
+ import{a1 as H,l as me,hN as ee,g5 as fe,ev as we,hO as Je,a as Me,hP as Ve,c6 as _e,c7 as Fe,j as a,M as be,F as Pe,bR as $e,bT as Ne,bU as qe,a3 as Re,hQ as Ue,hR as We,T as he,hS as Se,hT as Be,cj as ze,X as Ge,i5 as He,ga as re,p as R,g as De,C as Ce,c9 as Ke,hU as Xe,hV as Ye,hW as Ze,o as _}from"./index-C2JVdK9x.js";import{b as m,n as W}from"./vendor-CnQcJ2Lu.js";import{i as Qe,r as et,n as tt,o as lt}from"./ScheduleSequenceTable-DUYFGZvc-B-XLebxH.js";import"./mui-C5LQ0bMa.js";import"./analytics-CBL_L82S.js";import"./routing-Cpaypegg.js";import"./sentry-HDxG13yk.js";import"./redux-ByjIRbhZ.js";import"./liveblocks-sSQ9JElv.js";import"./crypto-BURQLTgV.js";const U={labelWidth:new Ce(160,160,160),depCategoryLabelWidth:new Ce(200,280,280)},at=W.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  width: 100%;
@@ -9,29 +9,29 @@ import{a1 as H,l as me,hK as ee,g3 as fe,es as we,hL as Je,a as Me,hM as Ve,c3 a
9
9
  border-top-right-radius: ${_.sp2};
10
10
  border-bottom-left-radius: ${_.sp0};
11
11
  border-bottom-right-radius: ${_.sp0};
12
- `,K=B.div`
12
+ `,K=W.div`
13
13
  display: flex;
14
14
  flex: 1;
15
15
  background-color: ${t=>t.theme.colors.grey3};
16
16
  min-height: 1px;
17
- `,st=B.div`
17
+ `,st=W.div`
18
18
  display: flex;
19
19
  flex-direction: column;
20
20
  margin: ${_.sp4} ${_.sp8} ${_.sp0} ${_.sp8};
21
- `,V=(t,d)=>`${t}.${d}`;function ot({sectionId:t,jeScheduledTransaction:d,updateStatus:g,allAccountOptions:l,allAccountList:s,allClassList:u,allClassOptions:c,allDepreciationAccountList:p,allDepreciationAccountOptions:y,allMonthOptions:v,uncategorizedAccounts:k,selectedAccount:T,selectedClass:F,selectedAccumulatedDepreciationCategory:P,assetId:L,selectedDate:w,selectedMonths:A,selectedPostingDay:E,lastDayOfMonth:j,isDisabled:h,allowCreateSchedule:J,onCreateSchedule:i,onDelete:ae,onMarkAsComplete:Y}){const{resetField:f}=We(),se=V(t,"scheduleExpenseCategory"),oe=V(t,"scheduleClass"),ne=V(t,"accumulatedDepreciationCategory"),de=V(t,"assetId"),Q=V(t,"startDate"),S=V(t,"postingDate"),r=V(t,"months"),e=be.getLocalizedStrings().jeSchedules.scheduleDetails.scheduleDetailsSection,b=o=>s.filter(N=>N.qboId===o)[0]?.qboId,x=o=>p.filter(N=>N.qboId===o)[0]?.qboId,ie=o=>u.filter(N=>N.classId===o)[0]?.accountingClassNumber,X={valueContainer:o=>({...o,overflow:"unset"})},I=Ge(),U=He({startDate:d.baseTransaction.date,endDate:d.baseTransaction.date.add(1,"year")}),W=()=>{f(S)},G=E==null&&j==null?void 0:j===!0?"lastDayOfMonth":"day",$=o=>[k.expense?.qboId,k.income?.qboId].includes(o),Z=()=>{d.jeScheduleId!=null&&ae(d.jeScheduleId)},D=d.scheduledJournalEntry.flatMap(o=>o.error);return a.jsxs(st,{children:[a.jsx(tt,{status:d.status.code,jeScheduleId:d.jeScheduleId,allowCreateSchedule:J,onDelete:Z,isUpdating:g==="In-Progress",onMarkAsComplete:Y,onCreateSchedule:i}),a.jsx(he,{controller:J===!0,children:a.jsxs(at,{children:[a.jsx(re,{isDisabled:D.includes("debit_category_deleted")?void 0:h,isLoading:!1,label:{label:e.expenseCategory,width:z.labelWidth.value(I)},groupedSingleSelectField:{customPlaceholderColor:D.includes("debit_category_deleted")?De.brandColorGoldDark:void 0,shouldShowChevronIcon:!1,name:se,placeholder:e.expenseCategoryPlaceholder,valueToId:o=>b(o),defaultValue:{selectedOption:T,allOptions:l},registerOptions:{required:!0,validate:o=>!!o.selectedOption},customStyleConfig:X},disableCurrentOption:$,style:{borderTopLeftRadius:R[2],borderTopRightRadius:R[2]}}),a.jsx(K,{}),a.jsx(re,{isDisabled:h,isLoading:!1,label:{label:e.class,width:z.labelWidth.value(I)},groupedSingleSelectField:{shouldShowChevronIcon:!1,name:oe,placeholder:e.classPlaceholder,valueToId:o=>ie(o),defaultValue:{selectedOption:F,allOptions:c},registerOptions:{required:!0,validate:o=>!!o.selectedOption},customStyleConfig:X},style:{borderTopLeftRadius:R[0],borderTopRightRadius:R[0]}}),a.jsx(K,{}),a.jsx(re,{isDisabled:D.includes("credit_category_deleted")?void 0:h,isLoading:!1,label:{label:e.accumulatedDepreciationCategory,width:z.depCategoryLabelWidth.value(I)},groupedSingleSelectField:{customPlaceholderColor:D.includes("credit_category_deleted")?De.brandColorGoldDark:void 0,shouldShowChevronIcon:!1,name:ne,placeholder:e.accumulatedDepreciationCategoryPlaceholder,valueToId:o=>x(o),defaultValue:{selectedOption:P,allOptions:y},registerOptions:{required:!0,validate:o=>!!o.selectedOption},customStyleConfig:X},disableCurrentOption:$,style:{borderTopLeftRadius:R[0],borderTopRightRadius:R[0]}}),a.jsx(K,{}),a.jsx(Ke,{label:{label:e.assetId,width:z.labelWidth.value(I)},style:{width:"auto"},text:{type:"text",name:de,defaultValue:L,placeholder:e.assetIdPlaceholder,autoComplete:"new-password",options:{maxLength:R[3],required:!0,validate:o=>!!o}},isDisabled:h}),a.jsx(K,{}),a.jsx(Xe,{label:{label:e.startMonth,width:z.labelWidth.value(I)},monthSelectorField:{name:Q,placeholder:e.startMonthPlaceholder,defaultValue:w,showDownChevron:!1,isDisabled:h,monthsAndYears:U},isDisabled:h}),a.jsx(K,{}),a.jsx(lt,{label:{label:e.postingDate,width:z.labelWidth.value(I)},isDisabled:h,dayOfMonthField:{placeholder:e.postingDatePlaceholder,name:S,defaultValue:{type:G,dayOfMonth:E},onSaveClick:()=>{},onCancelClick:W}}),a.jsx(K,{}),a.jsx(Ye,{label:{label:e.months,width:z.labelWidth.value(I)},singleSelectNumericField:{name:r,isDisabled:h,placeholder:e.monthsPlaceholder,defaultValue:{selectedOption:A!=null?v[A-1]:void 0,allOptions:v},registerOptions:{required:!0,validate:o=>!!o.selectedOption}}})]})}),a.jsx(he,{controller:J===!1,children:a.jsx(Qe,{text:e.scheduleMarkedAsCompleted})})]})}const nt=B.div`
21
+ `,V=(t,d)=>`${t}.${d}`;function ot({sectionId:t,jeScheduledTransaction:d,updateStatus:g,allAccountOptions:l,allAccountList:s,allClassList:u,allClassOptions:c,allDepreciationAccountList:p,allDepreciationAccountOptions:y,allMonthOptions:v,uncategorizedAccounts:k,selectedAccount:A,selectedClass:F,selectedAccumulatedDepreciationCategory:P,assetId:L,selectedDate:w,selectedMonths:O,selectedPostingDay:j,lastDayOfMonth:E,isDisabled:h,allowCreateSchedule:J,onCreateSchedule:i,onDelete:ae,onMarkAsComplete:Y}){const{resetField:f}=ze(),se=V(t,"scheduleExpenseCategory"),oe=V(t,"scheduleClass"),ne=V(t,"accumulatedDepreciationCategory"),de=V(t,"assetId"),Z=V(t,"startDate"),S=V(t,"postingDate"),r=V(t,"months"),e=be.getLocalizedStrings().jeSchedules.scheduleDetails.scheduleDetailsSection,b=o=>s.filter(N=>N.qboId===o)[0]?.qboId,x=o=>p.filter(N=>N.qboId===o)[0]?.qboId,ie=o=>u.filter(N=>N.classId===o)[0]?.accountingClassNumber,X={valueContainer:o=>({...o,overflow:"unset"})},I=Ge(),B=He({startDate:d.baseTransaction.date,endDate:d.baseTransaction.date.add(1,"year")}),z=()=>{f(S)},G=j==null&&E==null?void 0:E===!0?"lastDayOfMonth":"day",$=o=>[k.expense?.qboId,k.income?.qboId].includes(o),Q=()=>{d.jeScheduleId!=null&&ae(d.jeScheduleId)},D=d.scheduledJournalEntry.flatMap(o=>o.error);return a.jsxs(st,{children:[a.jsx(tt,{status:d.status.code,jeScheduleId:d.jeScheduleId,allowCreateSchedule:J,onDelete:Q,isUpdating:g==="In-Progress",onMarkAsComplete:Y,onCreateSchedule:i}),a.jsx(he,{controller:J===!0,children:a.jsxs(at,{children:[a.jsx(re,{isDisabled:D.includes("debit_category_deleted")?void 0:h,isLoading:!1,label:{label:e.expenseCategory,width:U.labelWidth.value(I)},groupedSingleSelectField:{customPlaceholderColor:D.includes("debit_category_deleted")?De.brandColorGoldDark:void 0,shouldShowChevronIcon:!1,name:se,placeholder:e.expenseCategoryPlaceholder,valueToId:o=>b(o),defaultValue:{selectedOption:A,allOptions:l},registerOptions:{required:!0,validate:o=>!!o.selectedOption},customStyleConfig:X},disableCurrentOption:$,style:{borderTopLeftRadius:R[2],borderTopRightRadius:R[2]}}),a.jsx(K,{}),a.jsx(re,{isDisabled:h,isLoading:!1,label:{label:e.class,width:U.labelWidth.value(I)},groupedSingleSelectField:{shouldShowChevronIcon:!1,name:oe,placeholder:e.classPlaceholder,valueToId:o=>ie(o),defaultValue:{selectedOption:F,allOptions:c},registerOptions:{required:!0,validate:o=>!!o.selectedOption},customStyleConfig:X},style:{borderTopLeftRadius:R[0],borderTopRightRadius:R[0]}}),a.jsx(K,{}),a.jsx(re,{isDisabled:D.includes("credit_category_deleted")?void 0:h,isLoading:!1,label:{label:e.accumulatedDepreciationCategory,width:U.depCategoryLabelWidth.value(I)},groupedSingleSelectField:{customPlaceholderColor:D.includes("credit_category_deleted")?De.brandColorGoldDark:void 0,shouldShowChevronIcon:!1,name:ne,placeholder:e.accumulatedDepreciationCategoryPlaceholder,valueToId:o=>x(o),defaultValue:{selectedOption:P,allOptions:y},registerOptions:{required:!0,validate:o=>!!o.selectedOption},customStyleConfig:X},disableCurrentOption:$,style:{borderTopLeftRadius:R[0],borderTopRightRadius:R[0]}}),a.jsx(K,{}),a.jsx(Ke,{label:{label:e.assetId,width:U.labelWidth.value(I)},style:{width:"auto"},text:{type:"text",name:de,defaultValue:L,placeholder:e.assetIdPlaceholder,autoComplete:"new-password",options:{maxLength:R[3],required:!0,validate:o=>!!o}},isDisabled:h}),a.jsx(K,{}),a.jsx(Xe,{label:{label:e.startMonth,width:U.labelWidth.value(I)},monthSelectorField:{name:Z,placeholder:e.startMonthPlaceholder,defaultValue:w,showDownChevron:!1,isDisabled:h,monthsAndYears:B},isDisabled:h}),a.jsx(K,{}),a.jsx(lt,{label:{label:e.postingDate,width:U.labelWidth.value(I)},isDisabled:h,dayOfMonthField:{placeholder:e.postingDatePlaceholder,name:S,defaultValue:{type:G,dayOfMonth:j},onSaveClick:()=>{},onCancelClick:z}}),a.jsx(K,{}),a.jsx(Ye,{label:{label:e.months,width:U.labelWidth.value(I)},singleSelectNumericField:{name:r,isDisabled:h,placeholder:e.monthsPlaceholder,defaultValue:{selectedOption:O!=null?v[O-1]:void 0,allOptions:v},registerOptions:{required:!0,validate:o=>!!o.selectedOption}}})]})}),a.jsx(he,{controller:J===!1,children:a.jsx(Ze,{text:e.scheduleMarkedAsCompleted})})]})}const nt=W.div`
22
22
  display: flex;
23
23
  flex-direction: column;
24
24
  width: 100%;
25
25
  height: 100%;
26
26
  min-height: 100vh;
27
27
  background-color: ${t=>t.theme.colors.grey4};
28
- `,dt=B.div`
28
+ `,dt=W.div`
29
29
  display: flex;
30
30
  z-index: 2;
31
- `,it=B.div`
31
+ `,it=W.div`
32
32
  display: flex;
33
33
  flex-direction: column;
34
- `,ct=B.div`
34
+ `,ct=W.div`
35
35
  display: flex;
36
36
  justify-content: center;
37
- `,ge="scheduleDetailsPage",te="scheduleDetailsFixedAssetsSection",le="scheduleDetailsListSection",rt=be.getLocalizedStrings(),{common:M,jeSchedules:{scheduleDetails:ut}}=rt;function Et({analytics:t,controllerUserDetails:d,expenseAutomationSelectedPeriod:g,scheduleDetailsView:l,vendorSearchAutoCompleteActions:s,vendorSearchAutoCompleteData:u,usedInExpenseAutomation:c,onNavigateBack:p,onEditAmount:y,onJELinkClick:v,onSave:k,onDelete:T,onDetailPageChange:F,onViewLinkedJE:P,onTransactionClick:L,onMarkAsComplete:w,removeJeScheduleTransactionKey:A}){const[E,j]=m.useState(!1),h=H(l.updateStatus.fetchState),J=H(l.selectedJEScheduleTransaction?.status.code),i=H(l.deleteStatus.fetchState),[ae,Y]=m.useState(!1),f=l.scheduleDetailsLocalData.fixed_assets,se=H(f.jeScheduleDetails.length),oe=H(f.selectedDate),ne=H(f.selectedDayOfMonth),[de,Q]=m.useState(!0),S=l.selectedJEScheduleTransaction?.vendor,r=l.selectedJEScheduleTransaction?.baseTransaction,e=l.selectedJEScheduleTransaction,b=me.getFirstControllerEmail(d.controllers),x=me.getFirstControllerId(d.controllerUserIds),ie={onOkClick:()=>{j(!1),p()},onCancelClick:()=>{j(!1)}},X=n=>{const C=e?.scheduledJournalEntry[n];r!=null&&C!=null&&e!=null&&t.trackScheduleDetailsLinkJournalEntry({scheduleType:"fixed_assets",transaction:{...Ue(r)},scheduleExpenseCategoryAndClass:{expenseCategory:e.jeDebit.account?.accountName??null,expenseClass:e.jeDebit.accountingClass?.className??null},journalEntryDetails:{...Se(C)},vendorName:S!=null?S.name:M.strings.hyphen,controllerEmails:b,controllerUserIds:x,fixedAssetsDetails:{accumulatedDepreciationCategory:e.jeCredit.account?.accountName??null,assetId:e.otherAttributes.assetId??null}}),v(n)},I=(n,C)=>{const O=e?.scheduledJournalEntry[C];r!=null&&O!=null&&e!=null&&t.trackScheduleDetailsViewJournalEntry({scheduleType:"fixed_assets",scheduleExpenseCategoryAndClass:{expenseCategory:e.jeDebit.account?.accountName??null,expenseClass:e.jeDebit.accountingClass?.className??null},journalEntryDetails:Se(O),controllerEmails:b,controllerUserIds:x,fixedAssetsDetails:{accumulatedDepreciationCategory:e.jeCredit.account?.accountName??null,assetId:e.otherAttributes.assetId??null}}),P(n)};m.useEffect(()=>{h==="In-Progress"&&l.updateStatus.fetchState==="Completed"&&(r!=null&&e!=null&&t.trackScheduleDetailsSaved(ee({jeScheduleTransaction:e,scheduleTab:"fixed_assets",transaction:r,vendor:S,controllerEmails:b,controllerUserIds:x})),c===!0&&e?.jeScheduleTransactionKey!=null&&J==="draft"&&l.selectedJEScheduleTransaction?.status.code==="ongoing"&&A(e.jeScheduleTransactionKey,{month:g.month,year:g.year}),p())},[g,J,l.selectedJEScheduleTransaction?.status.code,t,p,h,A,c,l.updateStatus,e,r,S,b,x]),m.useEffect(()=>{i==="In-Progress"&&l.deleteStatus.fetchState==="Completed"&&p()},[i,l.deleteStatus,p]);const U=fe(l.accountListNestedAccountHierarchy),W=fe(l.allDepreciationAccountListNestedAccountHierarchy),G=we(l.classListNestedAccountHierarchy),$=Je("fixed_assets"),Z=m.useRef(),D=Me({mode:"all",reValidateMode:"onChange",defaultValues:ue(l,U,G,W,$,u.entityAutoCompleteView),resetOptions:{keepDirtyValues:!0,keepErrors:!0},values:ue(l,U,G,W,$,u.entityAutoCompleteView)}),o=D.watch("scheduleDetailsFixedAssetsSection.vendor");m.useEffect(()=>{u.entityAutoCompleteView.fetchState==="Completed"&&Z.current?.(Ve(u.entityAutoCompleteView))},[u.entityAutoCompleteView.fetchState]);const N=(n,C)=>{s.onAutoCompleteInputChange?.(n,"vendor"),Z.current=C},xe=D.handleSubmit(()=>{k(l.selectedJEScheduleTransaction?.jeScheduleId)}),ve=async(n,C)=>{const O=C[te].vendor;if(n.includes("vendor")){const ce=O?.defaultOptions.map(q=>q.value);if(O?.selectedOption!=null&&ce?.includes(O.selectedOption)!==!0){const q=u.entityAutoCompleteView.vendor.find(Le=>Le.id===O.selectedOption);q!=null&&D.setValue("scheduleDetailsFixedAssetsSection.vendor.defaultOptions",[{label:q.name??"",value:q.id}])}}const ke=n.includes("amount");if(F(C,ke),n.includes("amount")){const ce=n.split(".")[1],q=parseInt(ce);Y(!0),y(q,l.selectedJEScheduleTransaction?.jeScheduleId)}};m.useEffect(()=>{const n=D.watch((C,{name:O})=>{O!=null&&C!=null&&_e(()=>ve(O,C))});return()=>{n.unsubscribe()}}),m.useEffect(()=>{(se!==f.jeScheduleDetails.length||oe!==f.selectedDate||ne!==f.selectedDayOfMonth)&&ae===!0&&(D.resetField(le,{defaultValue:ue(l,U,G,W,$,u.entityAutoCompleteView)[le],keepDirty:!1}),Y(!1))},[f.jeScheduleDetails.length,f.selectedDate,f.selectedDayOfMonth]),m.useEffect(()=>{l.selectedJEScheduleTransaction?.status.code==="marked_as_completed"&&Q(!1)},[l.selectedJEScheduleTransaction?.status.code]);const pe=(Fe(D.formState.dirtyFields)||l.selectedJEScheduleTransaction?.status.code==="draft")&&f.jeScheduleDetails.length>0,Ee=()=>{pe===!0?j(!0):(r!=null&&e!=null&&t.trackScheduleDetailsCanceled(ee({jeScheduleTransaction:e,scheduleTab:"fixed_assets",transaction:r,vendor:S,controllerEmails:b,controllerUserIds:x})),p())},je=()=>{l.selectedJEScheduleTransaction!=null&&L({id:l.selectedJEScheduleTransaction.baseTransaction.id,type:l.selectedJEScheduleTransaction.baseTransaction.type})},Oe=m.useCallback(()=>{Q(!0)},[]),Te=m.useCallback(()=>{r!=null&&e!=null&&t.trackScheduleDetailsMarkedAsCompleted(ee({jeScheduleTransaction:e,scheduleTab:"fixed_assets",transaction:r,vendor:S,controllerEmails:b,controllerUserIds:x})),w()},[t,b,x,e,w,r,S]),Ae=m.useCallback(n=>{r!=null&&e!=null&&t.trackScheduleDetailsDeleted(ee({jeScheduleTransaction:e,scheduleTab:"fixed_assets",transaction:r,vendor:S,controllerEmails:b,controllerUserIds:x})),T(n)},[t,b,x,e,T,r,S]),Ie=(l.selectedJEScheduleTransaction?.scheduledJournalEntry.flatMap(n=>n.error??[]).filter(n=>!!n)??[])?.includes("vendor_deleted")===!0?o?.defaultOptions.find(n=>n.value===o?.selectedOption)?.[0]?.label:l?.selectedJEScheduleTransaction?.vendor?.name;return a.jsxs(nt,{children:[a.jsx(ht,{title:Ie??M.strings.empty,onNavigateBack:Ee,onTransactionClick:je}),a.jsx(dt,{children:a.jsx(Pe,{...D,children:a.jsxs("form",{style:{width:"100%"},id:ye(ge),onSubmit:xe,children:[a.jsx(pt,{vendorLoadOptions:N,vendorField:o,vendorSearchAutoCompleteActions:s,vendorSearchAutoCompleteData:u,scheduleDetailsView:l,allAccountOptions:U,allClassOptions:G,allMonthOptions:$,allDepAccountOptions:W,onEditAmount:y,onDelete:Ae,onJELinkClick:X,onViewLinkedJE:I,onMarkAsComplete:Te,allowCreateSchedule:de,onCreateSchedule:Oe}),E===!0?a.jsx($e,{titleComponent:a.jsx(qe,{children:M.confirmationPopup.discardTitle}),descriptionComponent:a.jsx(Ne,{children:M.confirmationPopup.discardDescription}),primaryButtonText:M.confirmationPopup.discard,secondaryButtonText:M.confirmationPopup.cancel,proceedButtonVariant:"danger",action:ie}):null,pe===!0?a.jsx(Re,{formId:ye(ge),primaryBtn:{label:M.footer.save,style:{minWidth:"82px"},isLoading:l.updateStatus.fetchState==="In-Progress",isDisabled:l.updateStatus.fetchState==="In-Progress"},cancelBtn:{label:M.footer.cancel,shouldResetOnCancel:!0,onClick:()=>{j(!0)},style:{minWidth:"82px"}}}):null]})})})]})}function ht({onNavigateBack:t,onTransactionClick:d,title:g}){return a.jsx(Be,{title:g,tooltipTextOnLaunch:ut.showTransactionTooltip,onBackClick:t,onLaunchClick:d,style:{zIndex:3}})}function pt({vendorField:t,vendorLoadOptions:d,vendorSearchAutoCompleteActions:g,vendorSearchAutoCompleteData:l,scheduleDetailsView:s,allAccountOptions:u,allClassOptions:c,allDepAccountOptions:p,allMonthOptions:y,allowCreateSchedule:v,onCreateSchedule:k,onEditAmount:T,onDelete:F,onJELinkClick:P,onViewLinkedJE:L,onMarkAsComplete:w}){const A=s.selectedJEScheduleTransaction?.scheduledJournalEntry.flatMap(E=>E.error).filter(E=>!!E)??[];return s.selectedJEScheduleTransaction!=null?a.jsxs(it,{children:[a.jsx(ct,{children:a.jsx(Ze,{vendorLoadOptions:d,vendorField:t,vendorFieldName:V(te,"vendor"),vendorSearchAutoCompleteActions:g,vendorSearchAutoCompleteData:l,errors:A,transaction:s.selectedJEScheduleTransaction.baseTransaction,vendor:s.selectedJEScheduleTransaction.vendor})}),a.jsx(ot,{sectionId:te,jeScheduledTransaction:s.selectedJEScheduleTransaction,allAccountOptions:u,allAccountList:s.allAccountList,allClassList:s.allClassList,allClassOptions:c,allDepreciationAccountOptions:p,allDepreciationAccountList:s.allDepreciationAccountList,allMonthOptions:y,uncategorizedAccounts:s.uncategorizedAccounts,lastDayOfMonth:s.scheduleDetailsLocalData.fixed_assets.lastDayOfMonth,assetId:s.scheduleDetailsLocalData.fixed_assets.assetId,selectedPostingDay:s.scheduleDetailsLocalData.fixed_assets.selectedDayOfMonth,selectedMonths:s.scheduleDetailsLocalData.fixed_assets.selectedMonths,isDisabled:s.selectedJEScheduleTransaction.jeScheduleId!=null&&s.selectedJEScheduleTransaction.status.code!=="draft"&&s.selectedJEScheduleTransaction.status.code!=="marked_as_completed"?"disabled":void 0,updateStatus:s.deleteStatus.fetchState,allowCreateSchedule:v,onDelete:F,onMarkAsComplete:w,onCreateSchedule:k}),a.jsx(he,{controller:v===!0,children:a.jsx(et,{sectionId:le,totalAmount:s.selectedJEScheduleTransaction.baseTransaction.amount.amount,listFetchState:s.fetchState,scheduleJournalEntries:s.selectedJEScheduleTransaction.scheduledJournalEntry,hideMemoField:s.selectedJEScheduleTransaction.jeScheduleId==null,localData:s.scheduleDetailsLocalData.fixed_assets.jeScheduleDetails,uiState:s.uiState,onEditAmount:T,onJELinkClick:P,onViewLinkedJE:L,jeScheduleId:s.selectedJEScheduleTransaction.baseTransaction.id})})]}):null}const ye=t=>`${t}_form`,ue=(t,d,g,l,s,u)=>{const c=t.scheduleDetailsLocalData.fixed_assets,p=c.selectedAccount,y=c.selectedVendor,v=y!=null?u.vendor.find(i=>i.zeniId===y.id):void 0,k=p!=null?t.allAccountList.find(i=>i.accountId===p):void 0,T=c.selectedAccumulatedDepreciationCategory,F=T!=null?t.allDepreciationAccountList.find(i=>i.accountId===T):void 0,P=c.assetId,L=c.selectedClass,w=L!=null?t.allClassList.find(i=>i.classId===L):void 0,A=c.selectedMonths,E=c.jeScheduleDetails.map(i=>({postingDate:i.postingDate,amount:i.amount.amount,runningBalance:i.runningBalance.amount,postingStatus:i.postingStatus,jeLink:i.jeLink.thirdPartyTransactionId})),j=c.selectedDayOfMonth,h=c.lastDayOfMonth,J=j==null&&h==null?void 0:h===!0?"lastDayOfMonth":"day";return{[te]:{scheduleExpenseCategory:{selectedOption:k?.qboId,allOptions:d},accumulatedDepreciationCategory:{selectedOption:F?.qboId,allOptions:l},assetId:P,scheduleClass:{selectedOption:w?.classId,allOptions:g},startDate:c.selectedDate,months:{selectedOption:A,allOptions:s},vendor:{selectedOption:v?.id??y?.id,defaultOptions:ze(u,v??y)},postingDate:{type:J,dayOfMonth:j}},[le]:E}};export{Et as default};
37
+ `,ge="scheduleDetailsPage",te="scheduleDetailsFixedAssetsSection",le="scheduleDetailsListSection",rt=be.getLocalizedStrings(),{common:M,jeSchedules:{scheduleDetails:ut}}=rt;function jt({analytics:t,controllerUserDetails:d,expenseAutomationSelectedPeriod:g,scheduleDetailsView:l,vendorSearchAutoCompleteActions:s,vendorSearchAutoCompleteData:u,usedInExpenseAutomation:c,onNavigateBack:p,onEditAmount:y,onJELinkClick:v,onSave:k,onDelete:A,onDetailPageChange:F,onViewLinkedJE:P,onTransactionClick:L,onMarkAsComplete:w,removeJeScheduleTransactionKey:O}){const[j,E]=m.useState(!1),h=H(l.updateStatus.fetchState),J=H(l.selectedJEScheduleTransaction?.status.code),i=H(l.deleteStatus.fetchState),[ae,Y]=m.useState(!1),f=l.scheduleDetailsLocalData.fixed_assets,se=H(f.jeScheduleDetails.length),oe=H(f.selectedDate),ne=H(f.selectedDayOfMonth),[de,Z]=m.useState(!0),S=l.selectedJEScheduleTransaction?.vendor,r=l.selectedJEScheduleTransaction?.baseTransaction,e=l.selectedJEScheduleTransaction,b=me.getFirstControllerEmail(d.controllers),x=me.getFirstControllerId(d.controllerUserIds),ie={onOkClick:()=>{E(!1),p()},onCancelClick:()=>{E(!1)}},X=n=>{const C=e?.scheduledJournalEntry[n];r!=null&&C!=null&&e!=null&&t.trackScheduleDetailsLinkJournalEntry({scheduleType:"fixed_assets",transaction:{...Be(r)},scheduleExpenseCategoryAndClass:{expenseCategory:e.jeDebit.account?.accountName??null,expenseClass:e.jeDebit.accountingClass?.className??null},journalEntryDetails:{...Se(C)},vendorName:S!=null?S.name:M.strings.hyphen,controllerEmails:b,controllerUserIds:x,fixedAssetsDetails:{accumulatedDepreciationCategory:e.jeCredit.account?.accountName??null,assetId:e.otherAttributes.assetId??null}}),v(n)},I=(n,C)=>{const T=e?.scheduledJournalEntry[C];r!=null&&T!=null&&e!=null&&t.trackScheduleDetailsViewJournalEntry({scheduleType:"fixed_assets",scheduleExpenseCategoryAndClass:{expenseCategory:e.jeDebit.account?.accountName??null,expenseClass:e.jeDebit.accountingClass?.className??null},journalEntryDetails:Se(T),controllerEmails:b,controllerUserIds:x,fixedAssetsDetails:{accumulatedDepreciationCategory:e.jeCredit.account?.accountName??null,assetId:e.otherAttributes.assetId??null}}),P(n)};m.useEffect(()=>{h==="In-Progress"&&l.updateStatus.fetchState==="Completed"&&(r!=null&&e!=null&&t.trackScheduleDetailsSaved(ee({jeScheduleTransaction:e,scheduleTab:"fixed_assets",transaction:r,vendor:S,controllerEmails:b,controllerUserIds:x})),c===!0&&e?.jeScheduleTransactionKey!=null&&J==="draft"&&l.selectedJEScheduleTransaction?.status.code==="ongoing"&&O(e.jeScheduleTransactionKey,{month:g.month,year:g.year}),p())},[g,J,l.selectedJEScheduleTransaction?.status.code,t,p,h,O,c,l.updateStatus,e,r,S,b,x]),m.useEffect(()=>{i==="In-Progress"&&l.deleteStatus.fetchState==="Completed"&&p()},[i,l.deleteStatus,p]);const B=fe(l.accountListNestedAccountHierarchy),z=fe(l.allDepreciationAccountListNestedAccountHierarchy),G=we(l.classListNestedAccountHierarchy),$=Je("fixed_assets"),Q=m.useRef(),D=Me({mode:"all",reValidateMode:"onChange",defaultValues:ue(l,B,G,z,$,u.entityAutoCompleteView),resetOptions:{keepDirtyValues:!0,keepErrors:!0},values:ue(l,B,G,z,$,u.entityAutoCompleteView)}),o=D.watch("scheduleDetailsFixedAssetsSection.vendor");m.useEffect(()=>{u.entityAutoCompleteView.fetchState==="Completed"&&Q.current?.(Ve(u.entityAutoCompleteView))},[u.entityAutoCompleteView.fetchState]);const N=(n,C)=>{s.onAutoCompleteInputChange?.(n,"vendor"),Q.current=C},xe=D.handleSubmit(()=>{k(l.selectedJEScheduleTransaction?.jeScheduleId)}),ve=async(n,C)=>{const T=C[te].vendor;if(n.includes("vendor")){const ce=T?.defaultOptions.map(q=>q.value);if(T?.selectedOption!=null&&ce?.includes(T.selectedOption)!==!0){const q=u.entityAutoCompleteView.vendor.find(Le=>Le.id===T.selectedOption);q!=null&&D.setValue("scheduleDetailsFixedAssetsSection.vendor.defaultOptions",[{label:q.name??"",value:q.id}])}}const ke=n.includes("amount");if(F(C,ke),n.includes("amount")){const ce=n.split(".")[1],q=parseInt(ce);Y(!0),y(q,l.selectedJEScheduleTransaction?.jeScheduleId)}};m.useEffect(()=>{const n=D.watch((C,{name:T})=>{T!=null&&C!=null&&_e(()=>ve(T,C))});return()=>{n.unsubscribe()}}),m.useEffect(()=>{(se!==f.jeScheduleDetails.length||oe!==f.selectedDate||ne!==f.selectedDayOfMonth)&&ae===!0&&(D.resetField(le,{defaultValue:ue(l,B,G,z,$,u.entityAutoCompleteView)[le],keepDirty:!1}),Y(!1))},[f.jeScheduleDetails.length,f.selectedDate,f.selectedDayOfMonth]),m.useEffect(()=>{l.selectedJEScheduleTransaction?.status.code==="marked_as_completed"&&Z(!1)},[l.selectedJEScheduleTransaction?.status.code]);const pe=(Fe(D.formState.dirtyFields)||l.selectedJEScheduleTransaction?.status.code==="draft")&&f.jeScheduleDetails.length>0,je=()=>{pe===!0?E(!0):(r!=null&&e!=null&&t.trackScheduleDetailsCanceled(ee({jeScheduleTransaction:e,scheduleTab:"fixed_assets",transaction:r,vendor:S,controllerEmails:b,controllerUserIds:x})),p())},Ee=()=>{l.selectedJEScheduleTransaction!=null&&L({id:l.selectedJEScheduleTransaction.baseTransaction.id,type:l.selectedJEScheduleTransaction.baseTransaction.type})},Te=m.useCallback(()=>{Z(!0)},[]),Ae=m.useCallback(()=>{r!=null&&e!=null&&t.trackScheduleDetailsMarkedAsCompleted(ee({jeScheduleTransaction:e,scheduleTab:"fixed_assets",transaction:r,vendor:S,controllerEmails:b,controllerUserIds:x})),w()},[t,b,x,e,w,r,S]),Oe=m.useCallback(n=>{r!=null&&e!=null&&t.trackScheduleDetailsDeleted(ee({jeScheduleTransaction:e,scheduleTab:"fixed_assets",transaction:r,vendor:S,controllerEmails:b,controllerUserIds:x})),A(n)},[t,b,x,e,A,r,S]),Ie=(l.selectedJEScheduleTransaction?.scheduledJournalEntry.flatMap(n=>n.error??[]).filter(n=>!!n)??[])?.includes("vendor_deleted")===!0?o?.defaultOptions.find(n=>n.value===o?.selectedOption)?.[0]?.label:l?.selectedJEScheduleTransaction?.vendor?.name;return a.jsxs(nt,{children:[a.jsx(ht,{title:Ie??M.strings.empty,onNavigateBack:je,onTransactionClick:Ee}),a.jsx(dt,{children:a.jsx(Pe,{...D,children:a.jsxs("form",{style:{width:"100%"},id:ye(ge),onSubmit:xe,children:[a.jsx(pt,{vendorLoadOptions:N,vendorField:o,vendorSearchAutoCompleteActions:s,vendorSearchAutoCompleteData:u,scheduleDetailsView:l,allAccountOptions:B,allClassOptions:G,allMonthOptions:$,allDepAccountOptions:z,onEditAmount:y,onDelete:Oe,onJELinkClick:X,onViewLinkedJE:I,onMarkAsComplete:Ae,allowCreateSchedule:de,onCreateSchedule:Te}),j===!0?a.jsx($e,{titleComponent:a.jsx(qe,{children:M.confirmationPopup.discardTitle}),descriptionComponent:a.jsx(Ne,{children:M.confirmationPopup.discardDescription}),primaryButtonText:M.confirmationPopup.discard,secondaryButtonText:M.confirmationPopup.cancel,proceedButtonVariant:"danger",action:ie}):null,pe===!0?a.jsx(Re,{formId:ye(ge),primaryBtn:{label:M.footer.save,style:{minWidth:"82px"},isLoading:l.updateStatus.fetchState==="In-Progress",isDisabled:l.updateStatus.fetchState==="In-Progress"},cancelBtn:{label:M.footer.cancel,shouldResetOnCancel:!0,onClick:()=>{E(!0)},style:{minWidth:"82px"}}}):null]})})})]})}function ht({onNavigateBack:t,onTransactionClick:d,title:g}){return a.jsx(We,{title:g,tooltipTextOnLaunch:ut.showTransactionTooltip,onBackClick:t,onLaunchClick:d,style:{zIndex:3}})}function pt({vendorField:t,vendorLoadOptions:d,vendorSearchAutoCompleteActions:g,vendorSearchAutoCompleteData:l,scheduleDetailsView:s,allAccountOptions:u,allClassOptions:c,allDepAccountOptions:p,allMonthOptions:y,allowCreateSchedule:v,onCreateSchedule:k,onEditAmount:A,onDelete:F,onJELinkClick:P,onViewLinkedJE:L,onMarkAsComplete:w}){const O=s.selectedJEScheduleTransaction?.scheduledJournalEntry.flatMap(j=>j.error).filter(j=>!!j)??[];return s.selectedJEScheduleTransaction!=null?a.jsxs(it,{children:[a.jsx(ct,{children:a.jsx(Qe,{vendorLoadOptions:d,vendorField:t,vendorFieldName:V(te,"vendor"),vendorSearchAutoCompleteActions:g,vendorSearchAutoCompleteData:l,errors:O,transaction:s.selectedJEScheduleTransaction.baseTransaction,vendor:s.selectedJEScheduleTransaction.vendor})}),a.jsx(ot,{sectionId:te,jeScheduledTransaction:s.selectedJEScheduleTransaction,allAccountOptions:u,allAccountList:s.allAccountList,allClassList:s.allClassList,allClassOptions:c,allDepreciationAccountOptions:p,allDepreciationAccountList:s.allDepreciationAccountList,allMonthOptions:y,uncategorizedAccounts:s.uncategorizedAccounts,lastDayOfMonth:s.scheduleDetailsLocalData.fixed_assets.lastDayOfMonth,assetId:s.scheduleDetailsLocalData.fixed_assets.assetId,selectedPostingDay:s.scheduleDetailsLocalData.fixed_assets.selectedDayOfMonth,selectedMonths:s.scheduleDetailsLocalData.fixed_assets.selectedMonths,isDisabled:s.selectedJEScheduleTransaction.jeScheduleId!=null&&s.selectedJEScheduleTransaction.status.code!=="draft"&&s.selectedJEScheduleTransaction.status.code!=="marked_as_completed"?"disabled":void 0,updateStatus:s.deleteStatus.fetchState,allowCreateSchedule:v,onDelete:F,onMarkAsComplete:w,onCreateSchedule:k}),a.jsx(he,{controller:v===!0,children:a.jsx(et,{sectionId:le,totalAmount:s.selectedJEScheduleTransaction.baseTransaction.amount.amount,listFetchState:s.fetchState,scheduleJournalEntries:s.selectedJEScheduleTransaction.scheduledJournalEntry,hideMemoField:s.selectedJEScheduleTransaction.jeScheduleId==null,localData:s.scheduleDetailsLocalData.fixed_assets.jeScheduleDetails,uiState:s.uiState,onEditAmount:A,onJELinkClick:P,onViewLinkedJE:L,jeScheduleId:s.selectedJEScheduleTransaction.baseTransaction.id})})]}):null}const ye=t=>`${t}_form`,ue=(t,d,g,l,s,u)=>{const c=t.scheduleDetailsLocalData.fixed_assets,p=c.selectedAccount,y=c.selectedVendor,v=y!=null?u.vendor.find(i=>i.zeniId===y.id):void 0,k=p!=null?t.allAccountList.find(i=>i.accountId===p):void 0,A=c.selectedAccumulatedDepreciationCategory,F=A!=null?t.allDepreciationAccountList.find(i=>i.accountId===A):void 0,P=c.assetId,L=c.selectedClass,w=L!=null?t.allClassList.find(i=>i.classId===L):void 0,O=c.selectedMonths,j=c.jeScheduleDetails.map(i=>({postingDate:i.postingDate,amount:i.amount.amount,runningBalance:i.runningBalance.amount,postingStatus:i.postingStatus,jeLink:i.jeLink.thirdPartyTransactionId})),E=c.selectedDayOfMonth,h=c.lastDayOfMonth,J=E==null&&h==null?void 0:h===!0?"lastDayOfMonth":"day";return{[te]:{scheduleExpenseCategory:{selectedOption:k?.qboId,allOptions:d},accumulatedDepreciationCategory:{selectedOption:F?.qboId,allOptions:l},assetId:P,scheduleClass:{selectedOption:w?.classId,allOptions:g},startDate:c.selectedDate,months:{selectedOption:O,allOptions:s},vendor:{selectedOption:v?.id??y?.id,defaultOptions:Ue(u,v??y)},postingDate:{type:J,dayOfMonth:E}},[le]:j}};export{jt as default};
@@ -1,4 +1,4 @@
1
- import{a1 as $,l as ie,hK as Y,g3 as Ae,es as Ie,hL as Je,a as Le,hM as we,c3 as Me,c4 as Ve,j as a,M as De,F as Pe,bO as Fe,bQ as $e,bR as _e,a3 as Ne,hN as ze,hO as Be,T as re,hP as pe,hQ as Re,cg as Ue,X as We,g8 as me,m as X,g as qe,C as Ke,hR as He,hS as Ge,hT as Qe,o as L}from"./index-BEYLWYh7.js";import{b as D,n as P}from"./vendor-CnQcJ2Lu.js";import{i as Ye,r as Xe,n as Ze,o as et}from"./ScheduleSequenceTable-CEZL4GA8-Bz6Z5iY2.js";import"./mui-C5LQ0bMa.js";import"./analytics-CBL_L82S.js";import"./routing-Cpaypegg.js";import"./sentry-HDxG13yk.js";import"./redux-ByjIRbhZ.js";import"./liveblocks-sSQ9JElv.js";import"./crypto-BURQLTgV.js";const B={labelWidth:new Ke(160,160,160)},tt=P.div`
1
+ import{a1 as $,l as ie,hN as Q,g5 as Ae,ev as Ie,hO as Je,a as Le,hP as we,c6 as Me,c7 as Ve,j as a,M as De,F as Pe,bR as Fe,bT as $e,bU as _e,a3 as Ne,hQ as Ue,hR as ze,T as re,hS as pe,hT as Be,cj as Re,X as We,ga as me,p as X,g as qe,C as He,hU as Ke,hV as Ge,hW as Ye,o as L}from"./index-C2JVdK9x.js";import{b as D,n as P}from"./vendor-CnQcJ2Lu.js";import{i as Qe,r as Xe,n as Ze,o as et}from"./ScheduleSequenceTable-DUYFGZvc-B-XLebxH.js";import"./mui-C5LQ0bMa.js";import"./analytics-CBL_L82S.js";import"./routing-Cpaypegg.js";import"./sentry-HDxG13yk.js";import"./redux-ByjIRbhZ.js";import"./liveblocks-sSQ9JElv.js";import"./crypto-BURQLTgV.js";const z={labelWidth:new He(160,160,160)},tt=P.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  width: 100%;
@@ -18,7 +18,7 @@ import{a1 as $,l as ie,hK as Y,g3 as Ae,es as Ie,hL as Je,a as Le,hM as we,c3 as
18
18
  display: flex;
19
19
  flex-direction: column;
20
20
  margin: ${L.sp4} ${L.sp8} ${L.sp0} ${L.sp8};
21
- `,_=(e,n)=>`${e}.${n}`;function at({sectionId:e,jeScheduledTransaction:n,updateStatus:m,allAccountOptions:l,allAccountList:t,allClassList:i,allClassOptions:b,allMonthOptions:o,uncategorizedAccounts:p,selectedAccount:r,selectedClass:C,selectedDate:w,selectedMonths:I,selectedPostingDay:O,lastDayOfMonth:k,isDisabled:S,allowCreateSchedule:v,onCreateSchedule:u,onDelete:le,onMarkAsComplete:F}){const{resetField:R}=Ue(),U=_(e,"scheduleExpenseCategory"),W=_(e,"scheduleClass"),ae=_(e,"startDate"),N=_(e,"postingDate"),y=_(e,"months"),f=De.getLocalizedStrings().jeSchedules.scheduleDetails.scheduleDetailsSection,se=d=>t.filter(z=>z.qboId===d)[0]?.qboId,oe=d=>i.filter(z=>z.classId===d)[0]?.accountingClassNumber,q={valueContainer:d=>({...d,overflow:"unset"})},J=We(),x=st({startDate:n.baseTransaction.date,endDate:n.baseTransaction.date.add(1,"year")}),h=()=>{R(N)},s=O==null&&k==null?void 0:k===!0?"lastDayOfMonth":"day",E=d=>[p.expense?.qboId,p.income?.qboId].includes(d),T=()=>{n.jeScheduleId!=null&&le(n.jeScheduleId)},K=n.scheduledJournalEntry.flatMap(d=>d.error);return a.jsxs(lt,{children:[a.jsx(Ze,{isUpdating:m==="In-Progress",status:n.status.code,jeScheduleId:n.jeScheduleId,allowCreateSchedule:v,onDelete:T,onMarkAsComplete:F,onCreateSchedule:u}),a.jsx(re,{controller:v===!0,children:a.jsxs(tt,{children:[a.jsx(me,{isDisabled:K.includes("debit_category_deleted")?void 0:S,isLoading:!1,label:{label:f.expenseCategory,width:B.labelWidth.value(J)},groupedSingleSelectField:{customPlaceholderColor:K.includes("debit_category_deleted")?qe.brandColorGoldDark:void 0,shouldShowChevronIcon:!1,name:U,placeholder:f.expenseCategoryPlaceholder,valueToId:d=>se(d),defaultValue:{selectedOption:r,allOptions:l},registerOptions:{required:!0,validate:d=>!!d.selectedOption},customStyleConfig:q},disableCurrentOption:E,style:{borderTopLeftRadius:X[2],borderTopRightRadius:X[2]}}),a.jsx(Z,{}),a.jsx(me,{isDisabled:S,isLoading:!1,label:{label:f.class,width:B.labelWidth.value(J)},groupedSingleSelectField:{shouldShowChevronIcon:!1,name:W,placeholder:f.classPlaceholder,valueToId:d=>oe(d),defaultValue:{selectedOption:C,allOptions:b},registerOptions:{required:!0,validate:d=>!!d.selectedOption},customStyleConfig:q},style:{borderTopLeftRadius:X[0],borderTopRightRadius:X[0]}}),a.jsx(Z,{}),a.jsx(He,{label:{label:f.startMonth,width:B.labelWidth.value(J)},monthSelectorField:{name:ae,placeholder:f.startMonthPlaceholder,defaultValue:w,showDownChevron:!1,isDisabled:S,monthsAndYears:x},isDisabled:S}),a.jsx(Z,{}),a.jsx(et,{label:{label:f.postingDate,width:B.labelWidth.value(J)},isDisabled:S,dayOfMonthField:{placeholder:f.postingDatePlaceholder,name:N,defaultValue:{type:s,dayOfMonth:O},onSaveClick:()=>{},onCancelClick:h}}),a.jsx(Z,{}),a.jsx(Ge,{label:{label:f.months,width:B.labelWidth.value(J)},singleSelectNumericField:{name:y,isDisabled:S,placeholder:f.monthsPlaceholder,defaultValue:{selectedOption:I!=null?o[I-1]:void 0,allOptions:o},registerOptions:{required:!0,validate:d=>!!d.selectedOption}}})]})}),a.jsx(re,{controller:v===!1,children:a.jsx(Qe,{text:f.scheduleMarkedAsCompleted})})]})}const st=e=>{const n={},m=e.endDate.year()-e.startDate.year()+1,l=e.endDate.year(),t=e.startDate.year();return{years:Array(m).fill(l).map((i,b)=>{const o=i-b,p=o.toString();let r=[];if(o===t){const C=e.startDate.month();r=e.startDate.localeData().monthsShort(),C!==0&&r.splice(0,C)}else r=ie.zeniDate(`${o}-01-01`).localeData().monthsShort();return n[p]=r,p}).reverse(),months:n}},ot=P.div`
21
+ `,_=(e,n)=>`${e}.${n}`;function at({sectionId:e,jeScheduledTransaction:n,updateStatus:m,allAccountOptions:l,allAccountList:t,allClassList:i,allClassOptions:v,allMonthOptions:o,uncategorizedAccounts:p,selectedAccount:r,selectedClass:C,selectedDate:w,selectedMonths:I,selectedPostingDay:O,lastDayOfMonth:k,isDisabled:S,allowCreateSchedule:b,onCreateSchedule:u,onDelete:le,onMarkAsComplete:F}){const{resetField:B}=Re(),R=_(e,"scheduleExpenseCategory"),W=_(e,"scheduleClass"),ae=_(e,"startDate"),N=_(e,"postingDate"),y=_(e,"months"),f=De.getLocalizedStrings().jeSchedules.scheduleDetails.scheduleDetailsSection,se=d=>t.filter(U=>U.qboId===d)[0]?.qboId,oe=d=>i.filter(U=>U.classId===d)[0]?.accountingClassNumber,q={valueContainer:d=>({...d,overflow:"unset"})},J=We(),x=st({startDate:n.baseTransaction.date,endDate:n.baseTransaction.date.add(1,"year")}),h=()=>{B(N)},s=O==null&&k==null?void 0:k===!0?"lastDayOfMonth":"day",E=d=>[p.expense?.qboId,p.income?.qboId].includes(d),T=()=>{n.jeScheduleId!=null&&le(n.jeScheduleId)},H=n.scheduledJournalEntry.flatMap(d=>d.error);return a.jsxs(lt,{children:[a.jsx(Ze,{isUpdating:m==="In-Progress",status:n.status.code,jeScheduleId:n.jeScheduleId,allowCreateSchedule:b,onDelete:T,onMarkAsComplete:F,onCreateSchedule:u}),a.jsx(re,{controller:b===!0,children:a.jsxs(tt,{children:[a.jsx(me,{isDisabled:H.includes("debit_category_deleted")?void 0:S,isLoading:!1,label:{label:f.expenseCategory,width:z.labelWidth.value(J)},groupedSingleSelectField:{customPlaceholderColor:H.includes("debit_category_deleted")?qe.brandColorGoldDark:void 0,shouldShowChevronIcon:!1,name:R,placeholder:f.expenseCategoryPlaceholder,valueToId:d=>se(d),defaultValue:{selectedOption:r,allOptions:l},registerOptions:{required:!0,validate:d=>!!d.selectedOption},customStyleConfig:q},disableCurrentOption:E,style:{borderTopLeftRadius:X[2],borderTopRightRadius:X[2]}}),a.jsx(Z,{}),a.jsx(me,{isDisabled:S,isLoading:!1,label:{label:f.class,width:z.labelWidth.value(J)},groupedSingleSelectField:{shouldShowChevronIcon:!1,name:W,placeholder:f.classPlaceholder,valueToId:d=>oe(d),defaultValue:{selectedOption:C,allOptions:v},registerOptions:{required:!0,validate:d=>!!d.selectedOption},customStyleConfig:q},style:{borderTopLeftRadius:X[0],borderTopRightRadius:X[0]}}),a.jsx(Z,{}),a.jsx(Ke,{label:{label:f.startMonth,width:z.labelWidth.value(J)},monthSelectorField:{name:ae,placeholder:f.startMonthPlaceholder,defaultValue:w,showDownChevron:!1,isDisabled:S,monthsAndYears:x},isDisabled:S}),a.jsx(Z,{}),a.jsx(et,{label:{label:f.postingDate,width:z.labelWidth.value(J)},isDisabled:S,dayOfMonthField:{placeholder:f.postingDatePlaceholder,name:N,defaultValue:{type:s,dayOfMonth:O},onSaveClick:()=>{},onCancelClick:h}}),a.jsx(Z,{}),a.jsx(Ge,{label:{label:f.months,width:z.labelWidth.value(J)},singleSelectNumericField:{name:y,isDisabled:S,placeholder:f.monthsPlaceholder,defaultValue:{selectedOption:I!=null?o[I-1]:void 0,allOptions:o},registerOptions:{required:!0,validate:d=>!!d.selectedOption}}})]})}),a.jsx(re,{controller:b===!1,children:a.jsx(Ye,{text:f.scheduleMarkedAsCompleted})})]})}const st=e=>{const n={},m=e.endDate.year()-e.startDate.year()+1,l=e.endDate.year(),t=e.startDate.year();return{years:Array(m).fill(l).map((i,v)=>{const o=i-v,p=o.toString();let r=[];if(o===t){const C=e.startDate.month();r=e.startDate.localeData().monthsShort(),C!==0&&r.splice(0,C)}else r=ie.zeniDate(`${o}-01-01`).localeData().monthsShort();return n[p]=r,p}).reverse(),months:n}},ot=P.div`
22
22
  display: flex;
23
23
  flex-direction: column;
24
24
  width: 100%;
@@ -34,4 +34,4 @@ import{a1 as $,l as ie,hK as Y,g3 as Ae,es as Ie,hL as Je,a as Le,hM as we,c3 as
34
34
  `,ct=P.div`
35
35
  display: flex;
36
36
  justify-content: center;
37
- `,Se="scheduleDetailsPage",ee="scheduleDetailsSection",te="scheduleDetailsListSection",it=De.getLocalizedStrings(),{common:A,jeSchedules:{scheduleDetails:rt}}=it;function xt({analytics:e,controllerUserDetails:n,expenseAutomationSelectedPeriod:m,scheduleDetailsView:l,scheduleTab:t,usedInExpenseAutomation:i,vendorSearchAutoCompleteActions:b,vendorSearchAutoCompleteData:o,onMarkAsComplete:p,onNavigateBack:r,onEditAmount:C,onJELinkClick:w,onSave:I,onDelete:O,onDetailPageChange:k,onViewLinkedJE:S,onTransactionClick:v,removeJeScheduleTransactionKey:u}){const[le,F]=D.useState(!1),R=$(l.updateStatus.fetchState),U=$(l.selectedJEScheduleTransaction?.status.code),W=$(l.deleteStatus.fetchState),[ae,N]=D.useState(!1),y=l.scheduleDetailsLocalData.prepaid_expenses,f=$(y.jeScheduleDetails.length),se=$(y.selectedDate),oe=$(y.selectedDayOfMonth),[q,J]=D.useState(!0),x=l.selectedJEScheduleTransaction?.vendor,h=l.selectedJEScheduleTransaction?.baseTransaction,s=l.selectedJEScheduleTransaction,E=ie.getFirstControllerEmail(n.controllers),T=ie.getFirstControllerId(n.controllerUserIds),K={onOkClick:()=>{F(!1),r()},onCancelClick:()=>{F(!1)}},d=c=>{const g=s?.scheduledJournalEntry[c];h!=null&&g!=null&&s!=null&&e.trackScheduleDetailsLinkJournalEntry({scheduleType:t,transaction:{...Re(h)},scheduleExpenseCategoryAndClass:{expenseCategory:s.jeDebit.account?.accountName??null,expenseClass:s.jeDebit.accountingClass?.className??null},journalEntryDetails:{...pe(g)},vendorName:x!=null?x.name:A.strings.hyphen,controllerEmails:E,controllerUserIds:T}),w(c)},z=(c,g)=>{const j=s?.scheduledJournalEntry[g];h!=null&&j!=null&&s!=null&&e.trackScheduleDetailsViewJournalEntry({scheduleType:t,scheduleExpenseCategoryAndClass:{expenseCategory:s.jeDebit.account?.accountName??null,expenseClass:s.jeDebit.accountingClass?.className??null},journalEntryDetails:pe(j),controllerEmails:E,controllerUserIds:T}),S(c)};D.useEffect(()=>{R==="In-Progress"&&l.updateStatus.fetchState==="Completed"&&(h!=null&&s!=null&&e.trackScheduleDetailsSaved(Y({jeScheduleTransaction:s,scheduleTab:t,transaction:h,vendor:x,controllerEmails:E,controllerUserIds:T})),i===!0&&s?.jeScheduleTransactionKey!=null&&U==="draft"&&l.selectedJEScheduleTransaction?.status.code==="ongoing"&&u(s.jeScheduleTransactionKey,{month:m.month,year:m.year}),r())},[U,l.selectedJEScheduleTransaction?.status.code,e,r,m,R,l.updateStatus,u,t,i,s,h,x,E,T]),D.useEffect(()=>{W==="In-Progress"&&l.deleteStatus.fetchState==="Completed"&&r()},[W,l.deleteStatus,r]);const H=Ae(l.accountListNestedAccountHierarchy),G=Ie(l.classListNestedAccountHierarchy),Q=Je(t),ue=D.useRef(),M=Le({mode:"all",reValidateMode:"onChange",defaultValues:ce(l,H,G,Q,o.entityAutoCompleteView),resetOptions:{keepDirtyValues:!0,keepErrors:!0},values:ce(l,H,G,Q,o.entityAutoCompleteView)}),ne=M.watch("scheduleDetailsSection.vendor");D.useEffect(()=>{o.entityAutoCompleteView.fetchState==="Completed"&&ue.current?.(we(o.entityAutoCompleteView))},[o.entityAutoCompleteView.fetchState]);const Ce=(c,g)=>{b.onAutoCompleteInputChange?.(c,"vendor"),ue.current=g},ye=M.handleSubmit(()=>{I(l.selectedJEScheduleTransaction?.jeScheduleId)}),ge=async(c,g)=>{const j=g[ee].vendor;if(c.includes("vendor")){const de=j?.defaultOptions.map(V=>V.value);if(j?.selectedOption!=null&&de?.includes(j.selectedOption)!==!0){const V=o.entityAutoCompleteView.vendor.find(ke=>ke.id===j.selectedOption);V!=null&&M.setValue("scheduleDetailsSection.vendor.defaultOptions",[{label:V.name??A.strings.empty,value:V.id}])}}const Oe=c.includes("amount");if(k(g,Oe),c.includes("amount")){const de=c.split(".")[1],V=parseInt(de);N(!0),C(V,l.selectedJEScheduleTransaction?.jeScheduleId)}};D.useEffect(()=>{const c=M.watch((g,{name:j})=>{j!=null&&g!=null&&Me(()=>ge(j,g))});return()=>{c.unsubscribe()}}),D.useEffect(()=>{(f!==y.jeScheduleDetails.length||se!==y.selectedDate||oe!==y.selectedDayOfMonth)&&ae===!0&&(M.resetField(te,{defaultValue:ce(l,H,G,Q,o.entityAutoCompleteView)[te],keepDirty:!1}),N(!1))},[y.jeScheduleDetails.length,y.selectedDate,y.selectedDayOfMonth]),D.useEffect(()=>{l.selectedJEScheduleTransaction?.status.code==="marked_as_completed"&&J(!1)},[l.selectedJEScheduleTransaction?.status.code]);const he=(Ve(M.formState.dirtyFields)||l.selectedJEScheduleTransaction?.status.code==="draft")&&y.jeScheduleDetails.length>0,be=()=>{he===!0?F(!0):(h!=null&&s!=null&&e.trackScheduleDetailsCanceled(Y({jeScheduleTransaction:s,scheduleTab:t,transaction:h,vendor:x,controllerEmails:E,controllerUserIds:T})),r())},ve=()=>{l.selectedJEScheduleTransaction!=null&&v({id:l.selectedJEScheduleTransaction?.baseTransaction.id,type:l.selectedJEScheduleTransaction?.baseTransaction.type})},xe=D.useCallback(()=>{J(!0)},[]),Ee=D.useCallback(()=>{h!=null&&s!=null&&e.trackScheduleDetailsMarkedAsCompleted(Y({jeScheduleTransaction:s,scheduleTab:t,transaction:h,vendor:x,controllerEmails:E,controllerUserIds:T})),p()},[e,s,p,t,h,x,E,T]),Te=D.useCallback(c=>{h!=null&&s!=null&&e.trackScheduleDetailsDeleted(Y({jeScheduleTransaction:s,scheduleTab:t,transaction:h,vendor:x,controllerEmails:E,controllerUserIds:T})),O(c)},[e,s,O,t,h,x,E,T]),je=(l.selectedJEScheduleTransaction?.scheduledJournalEntry.flatMap(c=>c.error??[]).filter(c=>!!c)??[])?.includes("vendor_deleted")===!0?ne?.defaultOptions.find(c=>c.value===ne?.selectedOption)?.[0]?.label:l?.selectedJEScheduleTransaction?.vendor?.name;return a.jsxs(ot,{children:[a.jsx(ut,{onNavigateBack:be,onTransactionClick:ve,title:je??A.strings.empty}),a.jsx(nt,{children:a.jsx(Pe,{...M,children:a.jsxs("form",{style:{width:"100%"},id:fe(Se),onSubmit:ye,children:[a.jsx(ht,{vendorLoadOptions:Ce,vendorField:ne,vendorSearchAutoCompleteActions:b,vendorSearchAutoCompleteData:o,scheduleDetailsView:l,allAccountOptions:H,allClassOptions:G,allMonthOptions:Q,allowCreateSchedule:q,onEditAmount:C,onDelete:Te,onJELinkClick:d,onViewLinkedJE:z,onMarkAsComplete:Ee,onCreateSchedule:xe}),le===!0?a.jsx(Fe,{titleComponent:a.jsx(_e,{children:A.confirmationPopup.discardTitle}),descriptionComponent:a.jsx($e,{children:A.confirmationPopup.discardDescription}),primaryButtonText:A.confirmationPopup.discard,secondaryButtonText:A.confirmationPopup.cancel,proceedButtonVariant:"danger",action:K}):null,he===!0?a.jsx(Ne,{formId:fe(Se),primaryBtn:{label:A.footer.save,style:{minWidth:"82px"},isLoading:l.updateStatus.fetchState==="In-Progress",isDisabled:l.updateStatus.fetchState==="In-Progress"},cancelBtn:{label:A.footer.cancel,shouldResetOnCancel:!0,onClick:()=>{F(!0)},style:{minWidth:"82px"}}}):null]})})})]})}function ut({title:e,onNavigateBack:n,onTransactionClick:m}){return a.jsx(Be,{title:e,tooltipTextOnLaunch:rt.showTransactionTooltip,onBackClick:n,onLaunchClick:m,style:{zIndex:3}})}function ht({vendorField:e,vendorLoadOptions:n,vendorSearchAutoCompleteActions:m,vendorSearchAutoCompleteData:l,scheduleDetailsView:t,allAccountOptions:i,allClassOptions:b,allMonthOptions:o,allowCreateSchedule:p,onCreateSchedule:r,onMarkAsComplete:C,onEditAmount:w,onDelete:I,onJELinkClick:O,onViewLinkedJE:k}){const S=t.selectedJEScheduleTransaction?.scheduledJournalEntry.flatMap(v=>v.error??[]).filter(v=>!!v)??[];return t.selectedJEScheduleTransaction!=null?a.jsxs(dt,{children:[a.jsx(ct,{children:a.jsx(Ye,{errors:S,vendorLoadOptions:n,vendorField:e,vendorFieldName:_(ee,"vendor"),vendorSearchAutoCompleteActions:m,vendorSearchAutoCompleteData:l,transaction:t.selectedJEScheduleTransaction.baseTransaction,vendor:t.selectedJEScheduleTransaction.vendor})}),a.jsx(at,{sectionId:ee,jeScheduledTransaction:t.selectedJEScheduleTransaction,allAccountOptions:i,allAccountList:t.allAccountList,allClassList:t.allClassList,allClassOptions:b,allMonthOptions:o,uncategorizedAccounts:t.uncategorizedAccounts,lastDayOfMonth:t.scheduleDetailsLocalData.prepaid_expenses.lastDayOfMonth,selectedPostingDay:t.scheduleDetailsLocalData.prepaid_expenses.selectedDayOfMonth,selectedMonths:t.scheduleDetailsLocalData.prepaid_expenses.selectedMonths,isDisabled:t.selectedJEScheduleTransaction.jeScheduleId!=null&&t.selectedJEScheduleTransaction.status.code!=="marked_as_completed"&&t.selectedJEScheduleTransaction.status.code!=="draft"?"disabled":void 0,allowCreateSchedule:p,onCreateSchedule:r,onDelete:I,onMarkAsComplete:C,updateStatus:t.deleteStatus.fetchState}),a.jsx(re,{controller:p===!0,children:a.jsx(Xe,{sectionId:te,totalAmount:t.selectedJEScheduleTransaction.baseTransaction.amount.amount,listFetchState:t.fetchState,scheduleJournalEntries:t.selectedJEScheduleTransaction.scheduledJournalEntry,hideMemoField:t.selectedJEScheduleTransaction.jeScheduleId==null,localData:t.scheduleDetailsLocalData.prepaid_expenses.jeScheduleDetails,uiState:t.uiState,onEditAmount:w,onJELinkClick:O,onViewLinkedJE:k,jeScheduleId:t.selectedJEScheduleTransaction.baseTransaction.id})})]}):null}const fe=e=>`${e}_form`,ce=(e,n,m,l,t)=>{const i=e.scheduleDetailsLocalData.prepaid_expenses,b=i.selectedAccount,o=i.selectedVendor,p=o!=null?t.vendor.find(u=>u.zeniId===o.id):void 0,r=b!=null?e.allAccountList.find(u=>u.accountId===b):void 0,C=i.selectedClass,w=C!=null?e.allClassList.find(u=>u.classId===C):void 0,I=i.selectedMonths,O=i.jeScheduleDetails.map(u=>({postingDate:u.postingDate,amount:u.amount.amount,runningBalance:u.runningBalance.amount,postingStatus:u.postingStatus,jeLink:u.jeLink.thirdPartyTransactionId})),k=i.selectedDayOfMonth,S=i.lastDayOfMonth,v=k==null&&S==null?void 0:S===!0?"lastDayOfMonth":"day";return{[ee]:{scheduleExpenseCategory:{selectedOption:r?.qboId,allOptions:n},scheduleClass:{selectedOption:w?.classId,allOptions:m},startDate:i.selectedDate,months:{selectedOption:I,allOptions:l},vendor:{selectedOption:p?.id??o?.id,defaultOptions:ze(t,p??o)},postingDate:{type:v,dayOfMonth:k}},[te]:O}};export{xt as default};
37
+ `,Se="scheduleDetailsPage",ee="scheduleDetailsSection",te="scheduleDetailsListSection",it=De.getLocalizedStrings(),{common:A,jeSchedules:{scheduleDetails:rt}}=it;function xt({analytics:e,controllerUserDetails:n,expenseAutomationSelectedPeriod:m,scheduleDetailsView:l,scheduleTab:t,usedInExpenseAutomation:i,vendorSearchAutoCompleteActions:v,vendorSearchAutoCompleteData:o,onMarkAsComplete:p,onNavigateBack:r,onEditAmount:C,onJELinkClick:w,onSave:I,onDelete:O,onDetailPageChange:k,onViewLinkedJE:S,onTransactionClick:b,removeJeScheduleTransactionKey:u}){const[le,F]=D.useState(!1),B=$(l.updateStatus.fetchState),R=$(l.selectedJEScheduleTransaction?.status.code),W=$(l.deleteStatus.fetchState),[ae,N]=D.useState(!1),y=l.scheduleDetailsLocalData.prepaid_expenses,f=$(y.jeScheduleDetails.length),se=$(y.selectedDate),oe=$(y.selectedDayOfMonth),[q,J]=D.useState(!0),x=l.selectedJEScheduleTransaction?.vendor,h=l.selectedJEScheduleTransaction?.baseTransaction,s=l.selectedJEScheduleTransaction,E=ie.getFirstControllerEmail(n.controllers),T=ie.getFirstControllerId(n.controllerUserIds),H={onOkClick:()=>{F(!1),r()},onCancelClick:()=>{F(!1)}},d=c=>{const g=s?.scheduledJournalEntry[c];h!=null&&g!=null&&s!=null&&e.trackScheduleDetailsLinkJournalEntry({scheduleType:t,transaction:{...Be(h)},scheduleExpenseCategoryAndClass:{expenseCategory:s.jeDebit.account?.accountName??null,expenseClass:s.jeDebit.accountingClass?.className??null},journalEntryDetails:{...pe(g)},vendorName:x!=null?x.name:A.strings.hyphen,controllerEmails:E,controllerUserIds:T}),w(c)},U=(c,g)=>{const j=s?.scheduledJournalEntry[g];h!=null&&j!=null&&s!=null&&e.trackScheduleDetailsViewJournalEntry({scheduleType:t,scheduleExpenseCategoryAndClass:{expenseCategory:s.jeDebit.account?.accountName??null,expenseClass:s.jeDebit.accountingClass?.className??null},journalEntryDetails:pe(j),controllerEmails:E,controllerUserIds:T}),S(c)};D.useEffect(()=>{B==="In-Progress"&&l.updateStatus.fetchState==="Completed"&&(h!=null&&s!=null&&e.trackScheduleDetailsSaved(Q({jeScheduleTransaction:s,scheduleTab:t,transaction:h,vendor:x,controllerEmails:E,controllerUserIds:T})),i===!0&&s?.jeScheduleTransactionKey!=null&&R==="draft"&&l.selectedJEScheduleTransaction?.status.code==="ongoing"&&u(s.jeScheduleTransactionKey,{month:m.month,year:m.year}),r())},[R,l.selectedJEScheduleTransaction?.status.code,e,r,m,B,l.updateStatus,u,t,i,s,h,x,E,T]),D.useEffect(()=>{W==="In-Progress"&&l.deleteStatus.fetchState==="Completed"&&r()},[W,l.deleteStatus,r]);const K=Ae(l.accountListNestedAccountHierarchy),G=Ie(l.classListNestedAccountHierarchy),Y=Je(t),ue=D.useRef(),M=Le({mode:"all",reValidateMode:"onChange",defaultValues:ce(l,K,G,Y,o.entityAutoCompleteView),resetOptions:{keepDirtyValues:!0,keepErrors:!0},values:ce(l,K,G,Y,o.entityAutoCompleteView)}),ne=M.watch("scheduleDetailsSection.vendor");D.useEffect(()=>{o.entityAutoCompleteView.fetchState==="Completed"&&ue.current?.(we(o.entityAutoCompleteView))},[o.entityAutoCompleteView.fetchState]);const Ce=(c,g)=>{v.onAutoCompleteInputChange?.(c,"vendor"),ue.current=g},ye=M.handleSubmit(()=>{I(l.selectedJEScheduleTransaction?.jeScheduleId)}),ge=async(c,g)=>{const j=g[ee].vendor;if(c.includes("vendor")){const de=j?.defaultOptions.map(V=>V.value);if(j?.selectedOption!=null&&de?.includes(j.selectedOption)!==!0){const V=o.entityAutoCompleteView.vendor.find(ke=>ke.id===j.selectedOption);V!=null&&M.setValue("scheduleDetailsSection.vendor.defaultOptions",[{label:V.name??A.strings.empty,value:V.id}])}}const Oe=c.includes("amount");if(k(g,Oe),c.includes("amount")){const de=c.split(".")[1],V=parseInt(de);N(!0),C(V,l.selectedJEScheduleTransaction?.jeScheduleId)}};D.useEffect(()=>{const c=M.watch((g,{name:j})=>{j!=null&&g!=null&&Me(()=>ge(j,g))});return()=>{c.unsubscribe()}}),D.useEffect(()=>{(f!==y.jeScheduleDetails.length||se!==y.selectedDate||oe!==y.selectedDayOfMonth)&&ae===!0&&(M.resetField(te,{defaultValue:ce(l,K,G,Y,o.entityAutoCompleteView)[te],keepDirty:!1}),N(!1))},[y.jeScheduleDetails.length,y.selectedDate,y.selectedDayOfMonth]),D.useEffect(()=>{l.selectedJEScheduleTransaction?.status.code==="marked_as_completed"&&J(!1)},[l.selectedJEScheduleTransaction?.status.code]);const he=(Ve(M.formState.dirtyFields)||l.selectedJEScheduleTransaction?.status.code==="draft")&&y.jeScheduleDetails.length>0,ve=()=>{he===!0?F(!0):(h!=null&&s!=null&&e.trackScheduleDetailsCanceled(Q({jeScheduleTransaction:s,scheduleTab:t,transaction:h,vendor:x,controllerEmails:E,controllerUserIds:T})),r())},be=()=>{l.selectedJEScheduleTransaction!=null&&b({id:l.selectedJEScheduleTransaction?.baseTransaction.id,type:l.selectedJEScheduleTransaction?.baseTransaction.type})},xe=D.useCallback(()=>{J(!0)},[]),Ee=D.useCallback(()=>{h!=null&&s!=null&&e.trackScheduleDetailsMarkedAsCompleted(Q({jeScheduleTransaction:s,scheduleTab:t,transaction:h,vendor:x,controllerEmails:E,controllerUserIds:T})),p()},[e,s,p,t,h,x,E,T]),Te=D.useCallback(c=>{h!=null&&s!=null&&e.trackScheduleDetailsDeleted(Q({jeScheduleTransaction:s,scheduleTab:t,transaction:h,vendor:x,controllerEmails:E,controllerUserIds:T})),O(c)},[e,s,O,t,h,x,E,T]),je=(l.selectedJEScheduleTransaction?.scheduledJournalEntry.flatMap(c=>c.error??[]).filter(c=>!!c)??[])?.includes("vendor_deleted")===!0?ne?.defaultOptions.find(c=>c.value===ne?.selectedOption)?.[0]?.label:l?.selectedJEScheduleTransaction?.vendor?.name;return a.jsxs(ot,{children:[a.jsx(ut,{onNavigateBack:ve,onTransactionClick:be,title:je??A.strings.empty}),a.jsx(nt,{children:a.jsx(Pe,{...M,children:a.jsxs("form",{style:{width:"100%"},id:fe(Se),onSubmit:ye,children:[a.jsx(ht,{vendorLoadOptions:Ce,vendorField:ne,vendorSearchAutoCompleteActions:v,vendorSearchAutoCompleteData:o,scheduleDetailsView:l,allAccountOptions:K,allClassOptions:G,allMonthOptions:Y,allowCreateSchedule:q,onEditAmount:C,onDelete:Te,onJELinkClick:d,onViewLinkedJE:U,onMarkAsComplete:Ee,onCreateSchedule:xe}),le===!0?a.jsx(Fe,{titleComponent:a.jsx(_e,{children:A.confirmationPopup.discardTitle}),descriptionComponent:a.jsx($e,{children:A.confirmationPopup.discardDescription}),primaryButtonText:A.confirmationPopup.discard,secondaryButtonText:A.confirmationPopup.cancel,proceedButtonVariant:"danger",action:H}):null,he===!0?a.jsx(Ne,{formId:fe(Se),primaryBtn:{label:A.footer.save,style:{minWidth:"82px"},isLoading:l.updateStatus.fetchState==="In-Progress",isDisabled:l.updateStatus.fetchState==="In-Progress"},cancelBtn:{label:A.footer.cancel,shouldResetOnCancel:!0,onClick:()=>{F(!0)},style:{minWidth:"82px"}}}):null]})})})]})}function ut({title:e,onNavigateBack:n,onTransactionClick:m}){return a.jsx(ze,{title:e,tooltipTextOnLaunch:rt.showTransactionTooltip,onBackClick:n,onLaunchClick:m,style:{zIndex:3}})}function ht({vendorField:e,vendorLoadOptions:n,vendorSearchAutoCompleteActions:m,vendorSearchAutoCompleteData:l,scheduleDetailsView:t,allAccountOptions:i,allClassOptions:v,allMonthOptions:o,allowCreateSchedule:p,onCreateSchedule:r,onMarkAsComplete:C,onEditAmount:w,onDelete:I,onJELinkClick:O,onViewLinkedJE:k}){const S=t.selectedJEScheduleTransaction?.scheduledJournalEntry.flatMap(b=>b.error??[]).filter(b=>!!b)??[];return t.selectedJEScheduleTransaction!=null?a.jsxs(dt,{children:[a.jsx(ct,{children:a.jsx(Qe,{errors:S,vendorLoadOptions:n,vendorField:e,vendorFieldName:_(ee,"vendor"),vendorSearchAutoCompleteActions:m,vendorSearchAutoCompleteData:l,transaction:t.selectedJEScheduleTransaction.baseTransaction,vendor:t.selectedJEScheduleTransaction.vendor})}),a.jsx(at,{sectionId:ee,jeScheduledTransaction:t.selectedJEScheduleTransaction,allAccountOptions:i,allAccountList:t.allAccountList,allClassList:t.allClassList,allClassOptions:v,allMonthOptions:o,uncategorizedAccounts:t.uncategorizedAccounts,lastDayOfMonth:t.scheduleDetailsLocalData.prepaid_expenses.lastDayOfMonth,selectedPostingDay:t.scheduleDetailsLocalData.prepaid_expenses.selectedDayOfMonth,selectedMonths:t.scheduleDetailsLocalData.prepaid_expenses.selectedMonths,isDisabled:t.selectedJEScheduleTransaction.jeScheduleId!=null&&t.selectedJEScheduleTransaction.status.code!=="marked_as_completed"&&t.selectedJEScheduleTransaction.status.code!=="draft"?"disabled":void 0,allowCreateSchedule:p,onCreateSchedule:r,onDelete:I,onMarkAsComplete:C,updateStatus:t.deleteStatus.fetchState}),a.jsx(re,{controller:p===!0,children:a.jsx(Xe,{sectionId:te,totalAmount:t.selectedJEScheduleTransaction.baseTransaction.amount.amount,listFetchState:t.fetchState,scheduleJournalEntries:t.selectedJEScheduleTransaction.scheduledJournalEntry,hideMemoField:t.selectedJEScheduleTransaction.jeScheduleId==null,localData:t.scheduleDetailsLocalData.prepaid_expenses.jeScheduleDetails,uiState:t.uiState,onEditAmount:w,onJELinkClick:O,onViewLinkedJE:k,jeScheduleId:t.selectedJEScheduleTransaction.baseTransaction.id})})]}):null}const fe=e=>`${e}_form`,ce=(e,n,m,l,t)=>{const i=e.scheduleDetailsLocalData.prepaid_expenses,v=i.selectedAccount,o=i.selectedVendor,p=o!=null?t.vendor.find(u=>u.zeniId===o.id):void 0,r=v!=null?e.allAccountList.find(u=>u.accountId===v):void 0,C=i.selectedClass,w=C!=null?e.allClassList.find(u=>u.classId===C):void 0,I=i.selectedMonths,O=i.jeScheduleDetails.map(u=>({postingDate:u.postingDate,amount:u.amount.amount,runningBalance:u.runningBalance.amount,postingStatus:u.postingStatus,jeLink:u.jeLink.thirdPartyTransactionId})),k=i.selectedDayOfMonth,S=i.lastDayOfMonth,b=k==null&&S==null?void 0:S===!0?"lastDayOfMonth":"day";return{[ee]:{scheduleExpenseCategory:{selectedOption:r?.qboId,allOptions:n},scheduleClass:{selectedOption:w?.classId,allOptions:m},startDate:i.selectedDate,months:{selectedOption:I,allOptions:l},vendor:{selectedOption:p?.id??o?.id,defaultOptions:Ue(t,p??o)},postingDate:{type:b,dayOfMonth:k}},[te]:O}};export{xt as default};