@zeniai/web-cockpit-ui 1.14.75-qa → 1.14.76-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 (217) hide show
  1. package/dist/assets/{ACHDetailsPage-CgSAnexf-i_8YOjr-.js → ACHDetailsPage-Xx5xzGG6-TLkgYXDo.js} +1 -1
  2. package/dist/assets/{AIPerformancePage-C9EQ3p87-DFAb24zH.js → AIPerformancePage-CUXg59Hy-CQ1-rEhi.js} +24 -24
  3. package/dist/assets/{AccountInfoPage-C239tsDp-BJdxsmS4.js → AccountInfoPage-BCsDFfVy-hrluJcll.js} +1 -1
  4. package/dist/assets/{AccountInfoPageContent-CgDFcQqY-CnxvudEj.js → AccountInfoPageContent-Dc3zDc0L-zxWLzozl.js} +4 -4
  5. package/dist/assets/{AccountLockedInfoModal-CQzFFcuJ-DNUm6aba.js → AccountLockedInfoModal-C9esWbYw-DmLSIkZF.js} +1 -1
  6. package/dist/assets/{AccountReconDetailsDrawerPage-xtmSIQ0k-sJQHiFgQ.js → AccountReconDetailsDrawerPage-zLLBfV9S-BNb08J_3.js} +4 -4
  7. package/dist/assets/{AccountRow-BrRxbza5-CFe9ZfNB.js → AccountRow-CjMOMc-1-x3Qeaa-E.js} +6 -6
  8. package/dist/assets/{AccountsPromoCardStack-CqXbhSj4-Bq_NoktP.js → AccountsPromoCardStack-DkqmFDos-CykT6dqn.js} +17 -17
  9. package/dist/assets/{AddAddressForCardDrawer-fgjjFlrb-B96IK2RQ.js → AddAddressForCardDrawer-D8Towl2b-BnpRCEKK.js} +1 -1
  10. package/dist/assets/{AddToWalletPage-DfB7hWI1-CZFJEgh3.js → AddToWalletPage-DPlpIxsE-B4bdwm1E.js} +15 -15
  11. package/dist/assets/{AgingReportsPage-DHYj512r-BxkbYUrh.js → AgingReportsPage-Bkw7sNWp-BamyEZIc.js} +5 -5
  12. package/dist/assets/{AllUserItems-DeSMFizX-D5oJwy65.js → AllUserItems-DMlj0bT0-gvuqGIhf.js} +4 -4
  13. package/dist/assets/{ApAgingDetailPage-DU0hQxT3-BJVEEUAo.js → ApAgingDetailPage-BLz4srnJ-Cc1Xbcy9.js} +2 -2
  14. package/dist/assets/{AppBasePage-BR-YhSR_-B5HeXtfv.js → AppBasePage-D-TkEHTb-DROxn97N.js} +5 -5
  15. package/dist/assets/{AppDrawerContent-B80zy-Gz-CvT6b5OB.js → AppDrawerContent-B_OcDS2l-DzddisDQ.js} +2 -2
  16. package/dist/assets/{ApprovalRulesSettingsPage-By648tCr-7jWb8JUX.js → ApprovalRulesSettingsPage-CFLA9ZNm-DAP_H-up.js} +3 -3
  17. package/dist/assets/{ArAgingChart-TzANw6Zm-CNWZ1yco.js → ArAgingChart-GDCZoeS6-ejUvAmZP.js} +1 -1
  18. package/dist/assets/{ArAgingDetailPage-C2rcOePe-CPMVZfEx.js → ArAgingDetailPage-BpbaAaQd-BiEAKqhS.js} +2 -2
  19. package/dist/assets/{AttachmentView-jMWZdYNa-C-2m2utf.js → AttachmentView-C5nZKhTq-vO_X412a.js} +4 -4
  20. package/dist/assets/{BankAccountSection-SGI34h8u-BBxP7hIN.js → BankAccountSection-IncAN4Fp-_HbGSxHo.js} +3 -3
  21. package/dist/assets/{BankAccountWarningSection-BYhi53r4-Dz4tDkQf.js → BankAccountWarningSection-B5zw3yYg-D0pN9DqK.js} +1 -1
  22. package/dist/assets/{BankConnectionsSettingsPage-ChDwYCek-COjC3o1W.js → BankConnectionsSettingsPage-C_B2Ap4v-CWKHwroD.js} +28 -28
  23. package/dist/assets/{BillDetailPage-CDcMpkQh-BZ1wd0Qg.js → BillDetailPage-ZwjUMPQZ-BsZDr1gg.js} +10 -10
  24. package/dist/assets/{BillPayApprovalRuleDetailPage-CEPY5Pk4-qR_JS2ET.js → BillPayApprovalRuleDetailPage-C253InxT-RvLtQlW3.js} +1 -1
  25. package/dist/assets/{BillPayApprovalRulesPage-CL2A3R9R-CK-fyhpX.js → BillPayApprovalRulesPage-CA3FfPrr-qSqftFhb.js} +1 -1
  26. package/dist/assets/{BillPayPromoPage-B9Tz3jBR-i-0CPc7c.js → BillPayPromoPage-BKleb4US-pzvsBPOp.js} +4 -4
  27. package/dist/assets/{BillPaySetUpPage-Dt_bfrGH-CUojvimq.js → BillPaySetUpPage-DwK0lrbO-rQcYv7BW.js} +1 -1
  28. package/dist/assets/{BillingSettingsPage-DS50kMjn-9EpaAi1C.js → BillingSettingsPage-zBDcEj5D-BDTLKTvE.js} +5 -5
  29. package/dist/assets/{BillsBulkReviewDrawerPage-Btt7v1Mg-BCwxf8sP.js → BillsBulkReviewDrawerPage-BjOYcTwa-Dv0CJOPA.js} +1 -1
  30. package/dist/assets/{BoxItem-BFUJgt2x-opQLNc_u.js → BoxItem-CoguTodA-DItO3xcr.js} +1 -1
  31. package/dist/assets/{BusinessVerificationPage-CF3ZLtzs-Dhk-fv87.js → BusinessVerificationPage-DGQ9x2pf-35QVlpBA.js} +6 -6
  32. package/dist/assets/{CardNumberSubText-B1MkRWES-BjDnia-x.js → CardNumberSubText-BudPffUB-BTvRfksc.js} +1 -1
  33. package/dist/assets/{CashbackDetailPage-CPSsS7-h-CouHihs8.js → CashbackDetailPage-2KpaTEWi-CUzGkPf8.js} +1 -1
  34. package/dist/assets/{ChargeCardDetailPage-BDqTbXzY-D7djMgW2.js → ChargeCardDetailPage-DU-yz6wh-CBCtuxOp.js} +1 -1
  35. package/dist/assets/{ChargeCardListPage-yj0mhqgF-Bv25BF2_.js → ChargeCardListPage-C4ITCZwO-C8GmtyMf.js} +14 -14
  36. package/dist/assets/{ChargeCardListTable-DM6dYuPz-Nmy4gJXY.js → ChargeCardListTable-DEqAOIyN-nTkk33YA.js} +1 -1
  37. package/dist/assets/{ChargeCardPromoPage-DSoQsDJK-B4tTXnWg.js → ChargeCardPromoPage-CvPAVoti-Dig5Emby.js} +1 -1
  38. package/dist/assets/{ChargeCardSetupPage-DhEITB5H-DbGb6ubH.js → ChargeCardSetupPage-CLhkL1Eh-B9fDm_Ae.js} +1 -1
  39. package/dist/assets/{ChargeCardStatementsPage-tCXt7AVZ-C2fkpn1j.js → ChargeCardStatementsPage-6TvYstIS-DKHBxCkb.js} +5 -5
  40. package/dist/assets/{CheckDepositDrawerPage-6PfNZ8GG-D-owtiOB.js → CheckDepositDrawerPage-D64qEFAi-DmFPX3Hy.js} +5 -5
  41. package/dist/assets/{CollapsableReportTable-DERfLf9A-BxSIgA-m.js → CollapsableReportTable-o0pGO_sw-CoQujIPL.js} +48 -48
  42. package/dist/assets/{CompanyOfficerDetailsSection-CmMDQgui-CIhYQnj-.js → CompanyOfficerDetailsSection-D3PSro9F-CN8Reo83.js} +12 -12
  43. package/dist/assets/{CompanyPassportCard-ki3cq_A3-BV6apDi8.js → CompanyPassportCard-CUcLJOne-CwK5fmgg.js} +2 -2
  44. package/dist/assets/{CompanyPassportPage-C9UW7mV8-Bx0Gz3oi.js → CompanyPassportPage-C1v4xE8B-zCkhH9yQ.js} +10 -10
  45. package/dist/assets/{CompleteProfile-CcjiEAtN-DQlOZ4PF.js → CompleteProfile-DP8FFDH_-B7Va_v1e.js} +1 -1
  46. package/dist/assets/{ConfettiBurst-Dq3DwwfS-B7P93rZY.js → ConfettiBurst-KNUWsLgM-C3W-6qSV.js} +1 -1
  47. package/dist/assets/{CreateOrEditVendorPage-CsYVqUf8-61fUWJH2.js → CreateOrEditVendorPage-hEPeylx6-VsqoPSRS.js} +1 -1
  48. package/dist/assets/{CreditCardPaymentDrawerPage-C1QUtunc-CKbM-eNV.js → CreditCardPaymentDrawerPage-DOgKpleO-DLW-KVW8.js} +8 -8
  49. package/dist/assets/{CurrencySelectField-PjVnHOPO-BAZfxuLd.js → CurrencySelectField-C8L9A7zC-DLDLvWwm.js} +1 -1
  50. package/dist/assets/{CustomerOnboardingActivationPage-BEz1pkPV-Ba86LNKX.js → CustomerOnboardingActivationPage-D_AcFXeU-p0ieIiP_.js} +8 -8
  51. package/dist/assets/CustomerOnboardingContainerPage-DAxVaKqp-DMOGZ592.js +1 -0
  52. package/dist/assets/{CustomerOnboardingDetailPageSkeleton-3S6lsaCB-Cu1_Ivf0.js → CustomerOnboardingDetailPageSkeleton-DPSQT5UG-yxM-FX1s.js} +12 -12
  53. package/dist/assets/{CustomerOnboardingNoStepsPage-C7EvOlnr-C9G9U1B0.js → CustomerOnboardingNoStepsPage-Bqi6QK8D-CnhmXiFi.js} +4 -4
  54. package/dist/assets/{CustomerOnboardingPage-Clo_UlCC-DouioW8f.js → CustomerOnboardingPage-eY5fJENY-CW0ZIKes.js} +4 -4
  55. package/dist/assets/{CustomerOnboardingProductSuitePage-BEy5gk3x-Baanicc_.js → CustomerOnboardingProductSuitePage-BEWQQxa2-CUaimIpy.js} +4 -4
  56. package/dist/assets/{Dashboard-B1tMJ_lT-CcESz1YI.js → Dashboard-DyK1Y6xH-BhOeJdbK.js} +1 -1
  57. package/dist/assets/{DashboardReportPage-CoFYSDIH-ByKveAaA.js → DashboardReportPage-9mEEgfb9-8pEwgBSt.js} +11 -11
  58. package/dist/assets/{DashboardSidebarBackgroundAnimation-4ckOdfXR-KuRJ5w2b.js → DashboardSidebarBackgroundAnimation-BKaRUOA4-CrFQyftY.js} +1 -1
  59. package/dist/assets/{DepositAccTransactionItem-tQvZegVN-Dr8br3ei.js → DepositAccTransactionItem-CwSsISRg-BhipE2js.js} +1 -1
  60. package/dist/assets/{DepositAccTransactionListPage-CwXktzEW-DPpgwcvG.js → DepositAccTransactionListPage-d_A-lWfh-BHvjyvXp.js} +1 -1
  61. package/dist/assets/{DomesticWireDetailsPage-W6hOjjFW-BwCOX1w5.js → DomesticWireDetailsPage-C-qIXO7t-BK1ogPTU.js} +1 -1
  62. package/dist/assets/{DownloadOverlay-BSUE9cHx-BgD5J__G.js → DownloadOverlay-_HVjRZb_-ovRMQuBS.js} +10 -10
  63. package/dist/assets/{DrawerPage-CgdtPYXN-BSX9iIsY.js → DrawerPage-DgRO2OFE-DsZBSqxn.js} +3 -3
  64. package/dist/assets/EditPeoplePage-6lvgaJQi-Df2Mb0kP.js +55 -0
  65. package/dist/assets/{EditReimbursementDetailPage-Q2e7iDtu-sdWmaVAs.js → EditReimbursementDetailPage-B85brpdt-BYguIPkd.js} +19 -19
  66. package/dist/assets/{EntityDetailPage-XsEIg05w-CB-O66EP.js → EntityDetailPage-Ds03l_Nm-BYieYjCl.js} +3 -3
  67. package/dist/assets/{EntitySummarySection-CsXlmDFx--O64tSBx.js → EntitySummarySection-CbloJrPd-DGVEU9qa.js} +1 -1
  68. package/dist/assets/{ExpenseAutomationOverviewPage-CVe0vhrD-D_T4B03p.js → ExpenseAutomationOverviewPage-CYNO1bW--pa8gzAaD.js} +1 -1
  69. package/dist/assets/{ExpenseAutomationPage-D6r_A_CD-D5r5HR2l.js → ExpenseAutomationPage-CoYAnlKO-CIOZ9cQ5.js} +1 -1
  70. package/dist/assets/{ExpressPayPage-C6b1fiyD-DP6zBvlM.js → ExpressPayPage-VpqTGVa6-iCCnAcb9.js} +1 -1
  71. package/dist/assets/{FeaturePreviewPage-DOebdPqb-DLHAUjfm.js → FeaturePreviewPage-DzgPdfBh-BlncrRkT.js} +1 -1
  72. package/dist/assets/{FollowStepsSection-jmyNE2Fl-5X9z6igI.js → FollowStepsSection-NM8GXTRZ--kMzASD7.js} +6 -6
  73. package/dist/assets/{GlobalReviewListPage-Cx1Km5fu-oNaaQ9j7.js → GlobalReviewListPage-xUe6yXIO-DDRodqQY.js} +6 -6
  74. package/dist/assets/{InformationCardStack-C5bKx9vg-DasAqkuT.js → InformationCardStack-BYRwUh-e-Bm84GPsq.js} +2 -2
  75. package/dist/assets/{InsightsCardStack-EFoc_EWA-9sxVCiH_.js → InsightsCardStack-DfJXM3Fn-B0luA3Cz.js} +7 -7
  76. package/dist/assets/{InsightsSection-B0Rg5beY-C7jqTQvj.js → InsightsSection-4aveyVKo-DnKJf3sJ.js} +1 -1
  77. package/dist/assets/{IntegrationsSettingsPage-BQmjM8Np-lw6-THGQ.js → IntegrationsSettingsPage-BZMs-taD-ChagB0kp.js} +4 -4
  78. package/dist/assets/{InternationalWireSwiftDetailsPage-ChSGHFzT-CslF7PO2.js → InternationalWireSwiftDetailsPage-D3mlT5XG-CMQP_Nn8.js} +4 -4
  79. package/dist/assets/{InternationalWireVerificationPage-D41gWYDb-CdKJSDXF.js → InternationalWireVerificationPage-MUHsO8eu-CkpdoULT.js} +1 -1
  80. package/dist/assets/{InviteFormPage-CltJ2XYv-BLV5ZcY_.js → InviteFormPage-aZR9lFWK-BCwWSqH4.js} +1 -1
  81. package/dist/assets/{InvitePageListView-D5OdkeEV-jnf94Cyf.js → InvitePageListView-CHyiR2RC-Sk8zihrC.js} +12 -12
  82. package/dist/assets/{InvitePeoplePage-CyXnulj0-Cicnd476.js → InvitePeoplePage-BRl496Mv-FaAOJzgH.js} +1 -1
  83. package/dist/assets/{InvoiceUploadSection-B2ePrdY8-BItjPn0Z.js → InvoiceUploadSection-BqpspjSO-DbodpMov.js} +6 -6
  84. package/dist/assets/{IssueChargeCardPage-BCfMS2Zu-BkuU4f28.js → IssueChargeCardPage-D39Bd6J9-Bz3hak_j.js} +21 -21
  85. package/dist/assets/{LabeledAddressValue-D7udvbin-MXccYRGn.js → LabeledAddressValue-w3powIaN-xKKxpzsE.js} +1 -1
  86. package/dist/assets/{LabeledAddressValueField-jlDhqmgU-BPufGwXD.js → LabeledAddressValueField-BPOKk4mI-BFmVYPcn.js} +2 -2
  87. package/dist/assets/{LabeledControlledCheckBoxField-DNmJFVpZ-EZh4BAHK.js → LabeledControlledCheckBoxField-afEn8tHL-DxqXt4PA.js} +1 -1
  88. package/dist/assets/{LabeledCreatableSingleSelectField-B6Vit6ZA-Dwqsu8ia.js → LabeledCreatableSingleSelectField-DXA_bSyS-BJinmWca.js} +3 -3
  89. package/dist/assets/{LabeledDocumentField-CbTN9aAs-DarpxPt9.js → LabeledDocumentField-Z9OHDFr6-HgLdszDI.js} +1 -1
  90. package/dist/assets/{LabeledDropDownFormattedTextField-CD6Bs8EU-8n_glFVG.js → LabeledDropDownFormattedTextField-0Bk8vscY-CDQY3SED.js} +3 -3
  91. package/dist/assets/{LabeledText-aSB1WzCl-Cv-M2FmN.js → LabeledText-CgI7e_L--BwhQOiOZ.js} +1 -1
  92. package/dist/assets/{LabeledUserSingleSelectWithSubtitlesField-Y99F7D2f-DZP5midF.js → LabeledUserSingleSelectWithSubtitlesField-B0y_IMnV-GTOhW6B-.js} +1 -1
  93. package/dist/assets/{LabeledZeniRolesDropDownField-BJePp4f_-DBG_e5Mt.js → LabeledZeniRolesDropDownField-CEwtGHuw-Bl11WCzt.js} +14 -14
  94. package/dist/assets/{LinkJETransactionPage-CNbLCYzA-2xhERErX.js → LinkJETransactionPage-BqF3QSeN-CXTqkit6.js} +2 -2
  95. package/dist/assets/{LockCardPage-DMB-6EyM-BsprVU84.js → LockCardPage-Ui2RTfpb-B7R1Xixi.js} +10 -10
  96. package/dist/assets/{LowBalancePopup-D8MLLJa7-MvDx9vDJ.js → LowBalancePopup-DzqqMGEK-DvUWGZSI.js} +1 -1
  97. package/dist/assets/{MagicLinkACHDetailsPage-BdS3aAWw-BWomnIlM.js → MagicLinkACHDetailsPage-Kz-uZGml-CF0KJ9I8.js} +1 -1
  98. package/dist/assets/{MagicLinkDomesticWireDetailsPage-CG0a1drB-ClmK30Ad.js → MagicLinkDomesticWireDetailsPage-DNR1hQud-DTuqaECC.js} +1 -1
  99. package/dist/assets/{MagicLinkInternationalWireDetailsPage-C9-ZvcKN-D4SzYeJM.js → MagicLinkInternationalWireDetailsPage-B-hsxI7i-DU8bPbJw.js} +1 -1
  100. package/dist/assets/{MagicLinkSuccessPage-BBQLFLJ9-CwQfREmk.js → MagicLinkSuccessPage-CTyWzEAl-CcSFqgbx.js} +1 -1
  101. package/dist/assets/{MagicLinkTitleSection-BVR_lDfw-B40quQKP.js → MagicLinkTitleSection-egx3li4v-CK9jYn1b.js} +1 -1
  102. package/dist/assets/{MailingDetailsSection-DZi-O94--BIJQvtBB.js → MailingDetailsSection-D28xdU_N-D7dNEE4R.js} +1 -1
  103. package/dist/assets/{Menu-DGwHJlS--B2gglYn5.js → Menu-BsPZbkcv-dMEFFJAw.js} +1 -1
  104. package/dist/assets/{MyBankConnectionsSettingsPage-BYTxFTOW-CsO2zFjS.js → MyBankConnectionsSettingsPage-B7pw1loZ-BZemPN_o.js} +1 -1
  105. package/dist/assets/{MyPendingActivationChargeCardListPage-CUvKbnux-BNYAO_DO.js → MyPendingActivationChargeCardListPage-CaDgVLY9-D9RWTHXk.js} +1 -1
  106. package/dist/assets/{MyProfileSettingsPage-BHnImAny-D-Shv0Uv.js → MyProfileSettingsPage-DGPjjcRE-BkjL1klq.js} +11 -11
  107. package/dist/assets/{NavBarWithPicker-Q739fT8--UnmrOwGT.js → NavBarWithPicker-CK69EXMo-BopYsgXw.js} +3 -3
  108. package/dist/assets/{NavigationArrow-DQfX85VC-CA-sDlNd.js → NavigationArrow-B5JMjj8b-Yf4kFeB6.js} +1 -1
  109. package/dist/assets/{NavigationDots-CyCjbpW--CcAb2ybd.js → NavigationDots-yYEq4mai-Bct7I6H1.js} +1 -1
  110. package/dist/assets/{NewGlobalMerchantPage-CzT7wrsy-sdDrCPZI.js → NewGlobalMerchantPage-DXdipj9r-Cg-jSrpq.js} +4 -4
  111. package/dist/assets/{NoDataChart-BnAshBnb-CEIovBiA.js → NoDataChart-CetZJAul-Dliv4FgS.js} +1 -1
  112. package/dist/assets/{NoDataTable-BhokhW6d-BUEpwEUA.js → NoDataTable-CbxTnnUj-RBS2BO0t.js} +1 -1
  113. package/dist/assets/{NotFoundPage-uFZMkf3D-Bb8ms-JK.js → NotFoundPage-JK9WWLQL-t0Ol92QM.js} +1 -1
  114. package/dist/assets/{NotificationSettingsPage-BE1_MgJM-CZqU-CjD.js → NotificationSettingsPage-BYFMb4y6-BucvDhx8.js} +7 -7
  115. package/dist/assets/{NotificationsListConfig-CUWNEUCL-Cc5u1ykI.js → NotificationsListConfig-EKmLeUqF-DPKxh2va.js} +1 -1
  116. package/dist/assets/{NotificationsPage-BMZvKV7t-aupuxjdZ.js → NotificationsPage-Ca9rvFJG-3IKE1yMl.js} +23 -23
  117. package/dist/assets/{OpExByVendorPage-BuHAApyT-rWVMd94-.js → OpExByVendorPage-S3IdisaI-C-NcDs3u.js} +20 -20
  118. package/dist/assets/{OverlayContainerPage-BKHs_4eI-DRCwuTah.js → OverlayContainerPage-BKHs_4eI-B8gf_Owe.js} +1 -1
  119. package/dist/assets/{PandLWithForecastPage-B0IiVx6D-DJIGzqmY.js → PandLWithForecastPage-Bf-D_XNg-CrzOb2hU.js} +7 -7
  120. package/dist/assets/{PaymentAccountSetupBillingAddressSection-BkfPpFae-CYS3dtli.js → PaymentAccountSetupBillingAddressSection-CMVwDWuf-jHkUqKP1.js} +13 -13
  121. package/dist/assets/{PeoplePage-Cj9mjcMw-DIuj4uBO.js → PeoplePage-BKkwc_YR-BoZfR8X8.js} +1 -1
  122. package/dist/assets/{ProductsCarousel-_jYEgpxl-BPan4QrC.js → ProductsCarousel-DsI5t_Kc-Cpn89x6_.js} +1 -1
  123. package/dist/assets/{PromoBaseCards-8tkwl6GI-D8H5ISya.js → PromoBaseCards-CnQcR3Wn-B3iRHG7z.js} +1 -1
  124. package/dist/assets/{QBOConnectionDialog-CJz2SlfE-CzL2ZkWG.js → QBOConnectionDialog-PCdTWQqn-D0QAr5xA.js} +2 -2
  125. package/dist/assets/{QBOSetupSection-CpfryKtp-CCwrlg6z.js → QBOSetupSection-DhsqYA8G-Dcjp9EQd.js} +1 -1
  126. package/dist/assets/{ReimbursementApprovalRuleDetailPage-B8CBB3JI-Dfv6ookH.js → ReimbursementApprovalRuleDetailPage-Dao_lRpW-BNs6twdR.js} +1 -1
  127. package/dist/assets/{ReimbursementApprovalRulesPage-BsLmDz25-BIh2ftJK.js → ReimbursementApprovalRulesPage-B_LTt_z4-DnK-3YAX.js} +1 -1
  128. package/dist/assets/{ReimbursementDetailPage-DiG34Vur-DY0Lejn5.js → ReimbursementDetailPage-H6HNtQHN-2pM8Fun7.js} +8 -8
  129. package/dist/assets/{ReimbursementPromoPage-CNZdwAl--DtrZvGd-.js → ReimbursementPromoPage-j-UbNrbV-VHty7Yzb.js} +4 -4
  130. package/dist/assets/{ReimbursementSetUpPage-Ccc4qnNZ-DKLe8Fql.js → ReimbursementSetUpPage-FagEYTJ_-BpDXEjSX.js} +7 -7
  131. package/dist/assets/{ReimbursementsBulkReviewDrawerPage-Cza64yGU-BvagL3e0.js → ReimbursementsBulkReviewDrawerPage-imSK_7rH-B3IJ7p46.js} +1 -1
  132. package/dist/assets/{ReloadCard-Cnz9ywvF-cCwwnrRx.js → ReloadCard-CqdeJe0l-Bb07dYPg.js} +3 -3
  133. package/dist/assets/{ReportTableViewSelector-B70dJfTV-DVdkDJvs.js → ReportTableViewSelector-DgPlLWgl-CNrxPhYC.js} +5 -5
  134. package/dist/assets/{ReportsPage-DdvNbMAj-k0AKFDiG.js → ReportsPage-ByfO0uyp-DE8vAkKj.js} +6 -6
  135. package/dist/assets/{RevenueChart-B0CcrRHw-Bjc6bGj4.js → RevenueChart-ChbWXtmx-BA32Na2v.js} +1 -1
  136. package/dist/assets/{ReviewDetailsPage-BVebc63A-DKINOdNY.js → ReviewDetailsPage-BsOffi8f-BLsxP3vo.js} +5 -5
  137. package/dist/assets/{ReviewOverlay-Dm9GTjwu-BclBebcR.js → ReviewOverlay-B73a-P2j-CTP6pyS2.js} +7 -7
  138. package/dist/assets/RoleWithToolTip-Ckorto5Y-CV42dy1h.js +22 -0
  139. package/dist/assets/{ScheduleDetailsFixedAssetsPage-BWwDY16q-Btg56y8u.js → ScheduleDetailsFixedAssetsPage-0vTqFn9N-BEm7Cgkc.js} +8 -8
  140. package/dist/assets/{ScheduleDetailsPage-CqFbh9HE-BfLqdFxl.js → ScheduleDetailsPage-Cl11M6UJ-BhHsLjma.js} +3 -3
  141. package/dist/assets/{ScheduleSequenceTable-DDYFTEg4-CSy2E-uq.js → ScheduleSequenceTable-ClzxD7gh-DTqJnrdA.js} +26 -26
  142. package/dist/assets/{ScreenRoutes-D49C0WcQ.js → ScreenRoutes-D3i6oNhN.js} +1 -1
  143. package/dist/assets/{SetUpAccountSection-BuF3A3dP-BZ3r3Psc.js → SetUpAccountSection-xqqgeGLA-YX4p_D4B.js} +1 -1
  144. package/dist/assets/{SignIn-CyGyU8wg-DD8ikdc-.js → SignIn-Bh-9-pko-DyJR1DLA.js} +14 -14
  145. package/dist/assets/{SignInScreen-CfID-gEr.js → SignInScreen-CaiIkh6O.js} +1 -1
  146. package/dist/assets/{SpendManagementListViewPage-DPUhOVZl-BIYxolAI.js → SpendManagementListViewPage-Bn4KmChq-B4Y0L643.js} +3 -3
  147. package/dist/assets/{SpendManagementPerTabPage-CeYdMTbj-CpMZyOuZ.js → SpendManagementPerTabPage-pYgoZlfR-DI3UJ4l8.js} +37 -37
  148. package/dist/assets/{SpendManagementSection--vF9XUYO--4ea-x8g.js → SpendManagementSection-4ctnlmiO-I2pWsNDv.js} +1 -1
  149. package/dist/assets/{StatementItem-CiYj7XWK-C2ak2Frp.js → StatementItem-CYkgMHQd-B65BnaGl.js} +6 -6
  150. package/dist/assets/{StatementsPage-SLgIPcxl-CdejJ_2a.js → StatementsPage-BeF9vuPn-DNaEdwZ3.js} +1 -1
  151. package/dist/assets/{StatusSwitcher-CAMXea4Z-CDvNmH2h.js → StatusSwitcher-DOwOcMYF-CSG0Jxkr.js} +1 -1
  152. package/dist/assets/{SubTabSwitcher-BFezBmcr-BpoFQXM4.js → SubTabSwitcher-BcEtc_ob-GF65Or0C.js} +1 -1
  153. package/dist/assets/{SummaryCard-Bk5Eh2IR-C1Ko3Pw8.js → SummaryCard-fjNCTkA5-B-M5KnHi.js} +1 -1
  154. package/dist/assets/{TaskManagementPage-ClL2snRe-ChuYY0Bm.js → TaskManagementPage-BYMJMIhz-Do04zyQE.js} +15 -15
  155. package/dist/assets/{TimeRangeSwitcher-fGI52XTc-DDrlcz53.js → TimeRangeSwitcher-B4FKox6K-C6y8kYZQ.js} +1 -1
  156. package/dist/assets/{TimeframeSwitcher-CV-bryv5-D0JGSy-O.js → TimeframeSwitcher-DVWPgeL0-8qGmZwOz.js} +1 -1
  157. package/dist/assets/{TimeframeSwitcherWithToggle-kmZOYJwI-B5-r5xMt.js → TimeframeSwitcherWithToggle-BWGJWyJr-ClUkg8re.js} +1 -1
  158. package/dist/assets/{TopExCard-DeYN3ImD-Dkj3Ba2o.js → TopExCard-CUrz7PjD-Co2zX82Y.js} +5 -5
  159. package/dist/assets/{TopExDetailPage-BmyFCtzb-C-wOf8kf.js → TopExDetailPage-BMzQUB6s-BXWwFBJe.js} +3 -3
  160. package/dist/assets/{TransactionDetailPage-BFpvUUmz-tcGocK9Q.js → TransactionDetailPage-CZdeoUBY-XP0PswSG.js} +31 -31
  161. package/dist/assets/{TransactionList-JHbSuP08-C9rgd_Ix.js → TransactionList-CixEJAgS-CGekhIG9.js} +8 -8
  162. package/dist/assets/{TransactionListBig-FzOmuwBP-DHA__aWd.js → TransactionListBig-CMVJvB3o-DxRTSLNX.js} +7 -7
  163. package/dist/assets/{TransactionListPage-Kkxkkd_A-BatRqWwb.js → TransactionListPage-CAMz9-YS-BNVZMAVt.js} +6 -6
  164. package/dist/assets/{TransactionVendorDetailPage-m1wxsTyn-DQLH0kjE.js → TransactionVendorDetailPage-CzbyeJ4F-DfY35mWk.js} +3 -3
  165. package/dist/assets/{TransferDrawerPage-obzTPCDc-YPPUrSeX.js → TransferDrawerPage-aQAyy9SJ-CtSZX6V_.js} +6 -6
  166. package/dist/assets/{TreasuryOverviewPage-DW68UR3w-BYOCm1Ax.js → TreasuryOverviewPage-DStdhtYj-BmaX-LUn.js} +8 -8
  167. package/dist/assets/{TreasuryPromoPage-BW76YUSB-92MR0Rhn.js → TreasuryPromoPage-ukEVtL3s-BxkytgW6.js} +7 -7
  168. package/dist/assets/{TreasuryStatementsPage-BDD4VO8n-yjwbIsnQ.js → TreasuryStatementsPage-CrTNmv-B-fC2pfiKh.js} +1 -1
  169. package/dist/assets/{TreasuryTaxLetterPage-B2NDIt_Q-DQBewAhJ.js → TreasuryTaxLetterPage-BkyI9zJM-Ds84Dj6n.js} +1 -1
  170. package/dist/assets/{TrendChart-D5CYCZnh-jI_0d3RS.js → TrendChart-BV_FYo44-Dbzn5dy8.js} +1 -1
  171. package/dist/assets/{TrendWithTransactions-DoCnDpHm-CseGzJLE.js → TrendWithTransactions-COtEkfX9-BcCvtDz-.js} +5 -5
  172. package/dist/assets/{UncategorizedAccountsMappingPage-DX_TBAhJ-BifS6Z1Z.js → UncategorizedAccountsMappingPage-CDFz90Rp-CAIHAo3N.js} +1 -1
  173. package/dist/assets/{UnitIntegrationPage-DZfp553j-CLZuBojC.js → UnitIntegrationPage-DU3fVYZs-CPctIuWc.js} +1 -1
  174. package/dist/assets/UploadAdditionalDocumentOverlay-C663UVhz-FUVjkpYI.js +38 -0
  175. package/dist/assets/{Vendor2FAPopup-BmT-gcIz-BAttQ6sz.js → Vendor2FAPopup-DTGw_BLn-CTkC0axp.js} +1 -1
  176. package/dist/assets/{VendorACHDetailsPage-CQ7Hq4OS-B46pxKZi.js → VendorACHDetailsPage-BEB-BRPf-BW1XdRCh.js} +1 -1
  177. package/dist/assets/{VendorDetailPage-Cs6xk6eD-C2mD2bAn.js → VendorDetailPage-DgKqF5w_-Da2PCb7B.js} +5 -5
  178. package/dist/assets/{VendorDomesticWireDetailsPage-8mY07nVg-Bhe6n6ma.js → VendorDomesticWireDetailsPage-DsT7aeCi-Cxqzwzrv.js} +1 -1
  179. package/dist/assets/{VendorFiling1099EditablePage-CAFeI80I-BNRATvbB.js → VendorFiling1099EditablePage-DSQPqiXK-BlXqobVl.js} +14 -14
  180. package/dist/assets/{VendorFirstReviewPage-ACNdg13I-BBFigPLV.js → VendorFirstReviewPage-CHhQfRiw-BCpTFAZN.js} +70 -70
  181. package/dist/assets/{VendorInternationalWireDetailsPage-BpkamVMK-DHFHkBlm.js → VendorInternationalWireDetailsPage-BALUN3IH-B1HapV15.js} +4 -4
  182. package/dist/assets/{VendorInternationalWireSwiftDetailsPage-Gvr65ujG-Cbkt0rds.js → VendorInternationalWireSwiftDetailsPage-BCJLWye_-CJZeW3NQ.js} +1 -1
  183. package/dist/assets/{VendorsAccountsSection-AmC5VwVD-Dai89305.js → VendorsAccountsSection-BNeOtayE-BfOhq53p.js} +1 -1
  184. package/dist/assets/{VerifyDevice-PHsuiYk_-C3P5bI-f.js → VerifyDevice-BdS9Wg6i-km9HNFiy.js} +2 -2
  185. package/dist/assets/{VideoPlayer-DSqyhtMK-Bq_iUGAT.js → VideoPlayer--4ECwDUJ-DpdXEWOa.js} +1 -1
  186. package/dist/assets/{VideoPopup-BcGkTYtT-Bq1MviYe.js → VideoPopup-D0KR8nhb-L_41dJ_u.js} +1 -1
  187. package/dist/assets/{WarningsDrawerPage-BMxsT694-Dh0r8GII.js → WarningsDrawerPage-CZi7W_N2-BvrjJAup.js} +10 -10
  188. package/dist/assets/{ZeniAccountDetailPage-CvVIdc-T-CmWo3sKu.js → ZeniAccountDetailPage-DRpUQWRY-CFQQ9DDl.js} +1 -1
  189. package/dist/assets/{ZeniAccountListViewPage-D8RyYP_F-Bp50NOd0.js → ZeniAccountListViewPage-B58qILci-DPpjeTIQ.js} +1 -1
  190. package/dist/assets/{ZeniAccountNavBarPieces-DN7XGX4V-S7xRuo_L.js → ZeniAccountNavBarPieces-BvwIaUWa-BHDVxbAK.js} +2 -2
  191. package/dist/assets/{ZeniAccountPromoPage-DtkPkWS_-CqSOxNoQ.js → ZeniAccountPromoPage-BKn8HRaG-C8TqY5PJ.js} +10 -10
  192. package/dist/assets/{ZeniAccountSetupPage-NDzdHEb2-BSdVbWlw.js → ZeniAccountSetupPage-B52_WsH5-Ny13na_H.js} +2 -2
  193. package/dist/assets/{ZeniCopyright-C2Et8K0x-BTL8B2k6.js → ZeniCopyright-BBZoZbnj-BkZUi5kn.js} +1 -1
  194. package/dist/assets/{ZeniTransferAmountSlider-D7NLq8nU-BqdW2fwr.js → ZeniTransferAmountSlider-DuVixxF--B3VBiout.js} +1 -1
  195. package/dist/assets/{analyticsHelper-CaFa35yP-y6DqL5PI.js → analyticsHelper-BFEbpTaS-CI1-ZwNW.js} +1 -1
  196. package/dist/assets/{analyticsHelper-DmiuEs_i.js → analyticsHelper-DEd3yAFk.js} +1 -1
  197. package/dist/assets/{chartTypes-D3stzk-w-DQVIS8Ln.js → chartTypes-D3rvsvls-DmtOpgie.js} +1 -1
  198. package/dist/assets/{commonDimensions-DP_SFwFq-BksANX8O.js → commonDimensions-DTY9_AOp-DlMPlh2t.js} +1 -1
  199. package/dist/assets/{detailCommon-Cz5amAEd-CO9_-OPi.js → detailCommon-CLP6KEix-B5bEqT96.js} +4 -4
  200. package/dist/assets/{downloadPdf-BEpDZsHw-CzTXRf0g.js → downloadPdf-DEpaGHNR-Bw53_d32.js} +1 -1
  201. package/dist/assets/{index-BtlpidgV.js → index-CN7UAWAg.js} +2530 -2515
  202. package/dist/assets/{mapLoadingInProgressToTreeNode-9Bg2UmOc-bbKS3D2Z.js → mapLoadingInProgressToTreeNode-B_mkEOSy-BQa7i_Nl.js} +1 -1
  203. package/dist/assets/{mapSectionWithAcOnlyToTreeNode-CrGK4Cl1-9Hp5AlH4.js → mapSectionWithAcOnlyToTreeNode-C_s2TWXG-1zhixfCC.js} +1 -1
  204. package/dist/assets/{mapSpacerToTreeNode-Dpahky1g-DWriXxV-.js → mapSpacerToTreeNode-BsPCAFm5-CkJKxUF2.js} +1 -1
  205. package/dist/assets/{mapTimeframeBalancesToTreeNode-DGNk2hE1-Dsh1cQC2.js → mapTimeframeBalancesToTreeNode-6mbqZF6a-D84LKXiT.js} +1 -1
  206. package/dist/assets/{mapTimeframeBalancesToTreeNode-DD94NO-L-LlYX5dPv.js → mapTimeframeBalancesToTreeNode-DLbpODYp-DDiXCv85.js} +1 -1
  207. package/dist/assets/{mapTimeframeHeaderLoadingInProgressToTreeNode-CJYVSL83-BSl-XV4B.js → mapTimeframeHeaderLoadingInProgressToTreeNode-CKvU3bUP-kVnJxQIG.js} +1 -1
  208. package/dist/assets/{toCOABalancesWithID-iOGWxWc5-BQC_85M2.js → toCOABalancesWithID-CHHSLp5k-D9n1b9Hs.js} +1 -1
  209. package/dist/assets/{toChartData-BEJwj1pL-G6Vr-TZM.js → toChartData-CBhPep_F-DbHa5eNf.js} +1 -1
  210. package/dist/assets/{uploadAttachment-Cs4cwF3u-BgZER3AH.js → uploadAttachment-BXzSdWYh-ChPsAoWK.js} +6 -6
  211. package/dist/assets/{uploadReceipts-Dp1dvCjf-DdH6yc0b.js → uploadReceipts-Dp1dvCjf-CdBFemgP.js} +1 -1
  212. package/dist/index.html +1 -1
  213. package/package.json +4 -4
  214. package/dist/assets/CustomerOnboardingContainerPage-BoQBdIuG-HEPhtwHV.js +0 -1
  215. package/dist/assets/EditPeoplePage-DIj7SItK-CTt9SgjG.js +0 -55
  216. package/dist/assets/RoleWithToolTip-CqLSnFDx-Cq53LB-b.js +0 -22
  217. package/dist/assets/UploadAdditionalDocumentOverlay-BqO1S9_p-BQEvr7HR.js +0 -38
@@ -1,9 +1,9 @@
1
- import{q as U,d as W,F as y,ax as he,l as _,j as r,aM as k,b_ as fe,bI as me,bG as ge,y as v,o as C,aS as _e,L as be,b$ as Se,u as w,G as B,aC as K,D as we,aU as Ce,au as ye,bL as xe}from"./index-BtlpidgV.js";import{b as P,w as Q,n as b}from"./vendor-Bs1fkIUX.js";import{m as z,l as H}from"./analyticsHelper-CaFa35yP-y6DqL5PI.js";import{u as Oe}from"./ReportTableViewSelector-B70dJfTV-DVdkDJvs.js";import{a as X,p as Re}from"./TimeRangeSwitcher-fGI52XTc-DDrlcz53.js";import{M as Ae}from"./TimeframeSwitcherWithToggle-kmZOYJwI-B5-r5xMt.js";import{DownloadOverlayButton as Be}from"./DownloadOverlay-BSUE9cHx-BgD5J__G.js";import{I as ve,R as F,x as ee}from"./CollapsableReportTable-DERfLf9A-BxSIgA-m.js";import{T as te,I as se,L as j,D as Le,g as ne}from"./mapSectionWithAcOnlyToTreeNode-CrGK4Cl1-9Hp5AlH4.js";import{s as Y}from"./mapTimeframeBalancesToTreeNode-DGNk2hE1-Dsh1cQC2.js";import{d as Te,l as Pe}from"./mapTimeframeHeaderLoadingInProgressToTreeNode-CJYVSL83-BSl-XV4B.js";import{d as ke}from"./mapLoadingInProgressToTreeNode-9Bg2UmOc-bbKS3D2Z.js";import"./mui-Ty75qFQF.js";import"./analytics-BbBRZ6cw.js";import"./routing-Dk1A2KYI.js";import"./sentry-BE5FTzpq.js";import"./redux-CEhZD0hA.js";import"./liveblocks-8ht9CoL5.js";import"./crypto-CK1x27Ua.js";import"./TimeframeSwitcher-CV-bryv5-D0JGSy-O.js";import"./page-detail-CWX5S47F-lMo0MYzU.js";import"./AccountRow-BrRxbza5-CFe9ZfNB.js";function oe({section:e,sectionId:t,numOfBalances:o,config:a}){return ee("no_filter",a.filterAccountsWithNilBalances,a.filterAccountGroupsWithNilBalances).compactedAccountGroupsSelector(e.accountGroups).map(n=>Ie({accountGroup:n,sectionType:t,numOfBalances:o,title:n.accountGroupName,isLastNode:!0,config:a}))}function Ie({accountGroup:e,sectionType:t,numOfBalances:o,title:a,isLastNode:n,config:d}){const p=F("section",[],a+t),l={children:[],id:p,isLastNode:n,reportElementData:{element:{kind:"section",title:a,sectionType:t,data:e,numOfBalances:o},config:d}},i=ee("no_filter",d.filterAccountsWithNilBalances,d.filterAccountGroupsWithNilBalances).compactedAccountsSelectorVariant(e.accounts),u=i.map((g,h)=>ne({account:g,sectionType:t,numOfBalances:o,title:g.account.accountName,config:d,isLastNode:h===i.length-1,parentNodeIDs:[p],ancestorMetadata:{subAccountAncestorMetadata:[{depth:0,hasSibling:i.length>1,hasChildren:g.children.length>0,isLastNode:h===i.length-1}]}}));return l.children.push(...u),l}function ae({sectionWithAcOnly:e,sectionType:t,numOfBalances:o,config:a}){return e.accounts.map((n,d)=>ne({account:n,sectionType:t,numOfBalances:o,title:n.account.accountName,config:a,isLastNode:d===e.accounts.length-1,parentNodeIDs:[],ancestorMetadata:{subAccountAncestorMetadata:[{depth:0,hasSibling:e.accounts.length>1,hasChildren:n.children.length>0,isLastNode:d===e.accounts.length-1}]}}))}function ie({balances:e,config:t,nodeId:o}){return{children:[],id:o??F("timeframe_header",[]),isLastNode:!1,reportElementData:{element:{kind:t.mode==="actual_vs_forecast"?"timeframe_headers_with_forecast":"timeframe_headers",title:"",data:e,numOfBalances:e.length},config:t}}}function Ne(e,t,o,a=!0){Object.assign(e.config,t);const n=ce(o),d=Y({balances:n,config:t});return{config:t,headerNodes:a?[d]:[],contentNodes:[d,...e.contentNodes.slice(1)]}}const ce=e=>{switch(e.reportId){case"profit_and_loss":{const t=e;return t.sections.expenses.balances.length>0?[...t.sections.expenses.balances,...t.sections.expenses.additionalBalances]:[...t.sections.income.balances,...t.sections.income.additionalBalances]}case"profit_and_loss_by_classes":{const t=e;return t.sections.expenses.balances.length>0?[...t.sections.expenses.balances,...t.sections.expenses.additionalBalances]:[...t.sections.income.balances,...t.sections.income.additionalBalances]}case"cash_flow":{const t=e;return[...t.calculatedSections.operatingActivitiesTotal.balances,...t.calculatedSections.operatingActivitiesTotal.additionalBalances]}case"balance_sheet":{const t=e;let o=[];return Object.keys(t.sections).forEach(a=>{t.sections[a].balances.length>0&&(o=[...t.sections[a].balances,...t.sections[a].additionalBalances])}),o}default:return[]}};function Me(e,t,o=!0){const a=y.getLocalizedStrings().reports.sections,n=y.getLocalizedStrings().reports.balanceSheet,d=ce(e),p=t.mode!=null&&t.mode==="this_period_vs_period_before"&&d.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1,l=ie({balances:d,config:t}),i=[];return i.push(l),Object.keys(e.rootSectionsWithSubSectionIds).forEach(u=>{const g=F("title_string_only",[],u),h={children:[],id:g,isLastNode:!0,reportElementData:{element:{kind:"title_string_only",title:a[u],data:void 0,numOfBalances:0},config:t}};i.push(h),e.rootSectionsWithSubSectionIds[u].forEach(s=>{if(_.isBalanceSheetReportViewSectionID(s)===!0)if(e.sections[s].accountGroups.length>0)if(s==="equity"){const c=oe({sectionId:s,section:e.sections[s],numOfBalances:p,config:t});i.push(...c)}else i.push(te({section:e.sections[s],sectionType:s,numOfBalances:p,title:n[s],isLastNode:!0,config:t}));else if(s==="equity"){const c=ae({sectionWithAcOnly:e.sections[s],sectionType:s,numOfBalances:p,config:t});i.push(...c)}else{const c=e.sections[s];i.push(se({sectionWithAcOnly:c,sectionType:s,numOfBalances:p,title:n[s],isLastNode:!0,config:t}))}else _.isBalanceSheetReportViewCalculatedSectionID(s)===!0&&i.push(j({calculatedSection:e.calculatedSections[s],numOfBalances:p,title:n[s],isLastNode:!0,config:t}))})}),{config:t,headerNodes:o?[l]:[],contentNodes:i}}function Fe({calculatedSection:e,numOfBalances:t,title:o,isLastNode:a,config:n}){return{children:[],id:F("calculated_section_type1",[],o),isLastNode:a,reportElementData:{element:{kind:"calculated_section_type1",title:o,data:e,numOfBalances:t},config:n}}}function $e(e,t,o=!0){const a=y.getLocalizedStrings().reports.sections,n=y.getLocalizedStrings().reports.cashFlow,d=[...e.calculatedSections.operatingActivitiesTotal.balances,...e.calculatedSections.operatingActivitiesTotal.additionalBalances],p=t.mode!=null&&t.mode==="this_period_vs_period_before"&&d.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1,l=ie({balances:d,config:t}),i=[];return Object.keys(e.rootSectionsWithSubSectionIds).forEach(u=>{const g=F("title_string_only",[],u),h={children:[],id:g,isLastNode:!0,reportElementData:{element:{kind:"title_string_only",title:a[u],data:void 0,numOfBalances:0},config:t}};i.push(h),e.rootSectionsWithSubSectionIds[u].forEach(s=>{if(_.isCashFlowReportViewSectionID(s)===!0)if(e.sections[s].accountGroups.length>0){const c=oe({sectionId:s,section:e.sections[s],numOfBalances:p,config:t});i.push(...c)}else{const c=ae({sectionWithAcOnly:e.sections[s],sectionType:s,numOfBalances:p,config:t});i.push(...c)}else _.isCashFlowReportViewCalculatedSectionType1ID(s)===!0?i.push(Fe({calculatedSection:e.calculatedSections[s],numOfBalances:p,title:n[s],isLastNode:!0,config:t})):_.isCashFlowReportViewCalculatedSectionID(s)===!0&&i.push(j({calculatedSection:e.calculatedSections[s],numOfBalances:p,title:n[s],isLastNode:!0,config:t}))})}),{config:t,headerNodes:o?[l]:[],contentNodes:[l,...i]}}function je(e,t,o=!0,a=!1){const n=y.getLocalizedStrings().reports,d=y.getLocalizedStrings().common;let p=[];const l=[];let i=[];if(a===!0){const u=Te({title:d.loading,balances:[],config:t});u.reportElementData.element.numOfBalances=6,o&&(i=[u]),l.push(u),[...Array(8)].forEach((g,h)=>{const s=h%4;let c=Pe[s];const x=ke({title:`${h}+${c}`,balances:p,config:t});x.reportElementData.element.numOfBalances=6,l.push(x)})}else{const u=e.sections.expenses.balances.length>0?[...e.sections.expenses.balances,...e.sections.expenses.additionalBalances]:e.sections.income.balances.length>0?[...e.sections.income.balances,...e.sections.income.additionalBalances]:e.sections.cogs.balances.length>0?[...e.sections.cogs.balances,...e.sections.cogs.additionalBalances]:e.sections.otherIncome.balances.length>0?[...e.sections.otherIncome.balances,...e.sections.otherIncome.additionalBalances]:e.sections.otherExpenses.balances.length>0?[...e.sections.otherExpenses.balances,...e.sections.otherExpenses.additionalBalances]:[],g=Y({balances:u,config:t}),h=t.mode!=null&&t.mode==="this_period_vs_period_before"&&u.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1;l.push(g),o&&(i=[g]),e.idsInOrder.forEach(s=>{if(_.isPandLReportViewSectionID(s)===!0){const c=e.sections[s];c!=null&&l.push(Le({section:c,sectionType:s,numOfBalances:h,title:n.sections[s],isLastNode:!0,config:t}))}else if(_.isPandLReportViewCalculatedSectionID(s)===!0){const c=e.calculatedSections[s];c!=null&&l.push(j({calculatedSection:c,numOfBalances:h,title:n.sections[s],isLastNode:!0,config:t}))}})}return{config:t,headerNodes:i,contentNodes:l}}function Ee(e,t,o=!0){const a=y.getLocalizedStrings().reports,n=e.sections.expenses!=null&&e.sections.expenses.balances.length>0?[...e.sections.expenses.balances,...e.sections.expenses.additionalBalances]:e.sections.income!=null&&e.sections.income.balances.length>0?[...e.sections.income.balances,...e.sections.income.additionalBalances]:e.sections.cogs!=null&&e.sections.cogs.balances.length>0?[...e.sections.cogs.balances,...e.sections.cogs.additionalBalances]:e.sections.otherIncome!=null&&e.sections.otherIncome.balances.length>0?[...e.sections.otherIncome.balances,...e.sections.otherIncome.additionalBalances]:e.sections.otherExpenses!=null&&e.sections.otherExpenses.balances.length>0?[...e.sections.otherExpenses.balances,...e.sections.otherExpenses.additionalBalances]:[],d=t.mode!=null&&t.mode==="this_period_vs_period_before"&&n.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1,p=Y({balances:n,config:t}),l=[];return l.push(p),e.idsInOrder.forEach(i=>{if(_.isPandLReportViewSectionID(i)===!0&&(e.sections[i].accountGroups.length>0?l.push(te({section:e.sections[i],sectionType:i,numOfBalances:d,title:a.sections[i],isLastNode:!0,config:t})):l.push(se({sectionWithAcOnly:e.sections[i],sectionType:i,numOfBalances:d,title:a.sections[i],isLastNode:!0,config:t}))),_.isPandLReportViewCalculatedSectionID(i)===!0){const u=e.calculatedSections[i];u!=null&&l.push(j({calculatedSection:u,numOfBalances:d,title:a.sections[i],isLastNode:!0,config:t}))}}),{config:t,headerNodes:o?[p]:[],contentNodes:l}}const q={contentPaddingLeft:new v(w[0],w[0],w[0]),contentPaddingRight:new v(w[3],w[3],w[8])},Ve=b.div`
1
+ import{q as U,d as W,F as y,ax as he,l as _,j as r,aM as k,b_ as fe,bI as me,bG as ge,y as v,o as C,aS as _e,k as be,b$ as Se,u as w,D as B,aC as J,X as we,aU as Ce,au as ye,bL as xe}from"./index-CN7UAWAg.js";import{b as P,w as K,n as b}from"./vendor-Bs1fkIUX.js";import{m as z,l as Z}from"./analyticsHelper-BFEbpTaS-CI1-ZwNW.js";import{u as Oe}from"./ReportTableViewSelector-DgPlLWgl-CNrxPhYC.js";import{a as Q,p as Re}from"./TimeRangeSwitcher-B4FKox6K-C6y8kYZQ.js";import{M as Ae}from"./TimeframeSwitcherWithToggle-BWGJWyJr-ClUkg8re.js";import{DownloadOverlayButton as Be}from"./DownloadOverlay-_HVjRZb_-ovRMQuBS.js";import{I as ve,R as F,x as ee}from"./CollapsableReportTable-o0pGO_sw-CoQujIPL.js";import{T as te,I as se,L as j,D as Le,g as ne}from"./mapSectionWithAcOnlyToTreeNode-C_s2TWXG-1zhixfCC.js";import{s as Y}from"./mapTimeframeBalancesToTreeNode-6mbqZF6a-D84LKXiT.js";import{d as Te,l as Pe}from"./mapTimeframeHeaderLoadingInProgressToTreeNode-CKvU3bUP-kVnJxQIG.js";import{d as ke}from"./mapLoadingInProgressToTreeNode-B_mkEOSy-BQa7i_Nl.js";import"./mui-Ty75qFQF.js";import"./analytics-BbBRZ6cw.js";import"./routing-Dk1A2KYI.js";import"./sentry-BE5FTzpq.js";import"./redux-CEhZD0hA.js";import"./liveblocks-8ht9CoL5.js";import"./crypto-CK1x27Ua.js";import"./TimeframeSwitcher-DVWPgeL0-8qGmZwOz.js";import"./page-detail-CWX5S47F-lMo0MYzU.js";import"./AccountRow-CjMOMc-1-x3Qeaa-E.js";function oe({section:e,sectionId:t,numOfBalances:o,config:a}){return ee("no_filter",a.filterAccountsWithNilBalances,a.filterAccountGroupsWithNilBalances).compactedAccountGroupsSelector(e.accountGroups).map(n=>Ie({accountGroup:n,sectionType:t,numOfBalances:o,title:n.accountGroupName,isLastNode:!0,config:a}))}function Ie({accountGroup:e,sectionType:t,numOfBalances:o,title:a,isLastNode:n,config:d}){const p=F("section",[],a+t),l={children:[],id:p,isLastNode:n,reportElementData:{element:{kind:"section",title:a,sectionType:t,data:e,numOfBalances:o},config:d}},i=ee("no_filter",d.filterAccountsWithNilBalances,d.filterAccountGroupsWithNilBalances).compactedAccountsSelectorVariant(e.accounts),u=i.map((g,h)=>ne({account:g,sectionType:t,numOfBalances:o,title:g.account.accountName,config:d,isLastNode:h===i.length-1,parentNodeIDs:[p],ancestorMetadata:{subAccountAncestorMetadata:[{depth:0,hasSibling:i.length>1,hasChildren:g.children.length>0,isLastNode:h===i.length-1}]}}));return l.children.push(...u),l}function ae({sectionWithAcOnly:e,sectionType:t,numOfBalances:o,config:a}){return e.accounts.map((n,d)=>ne({account:n,sectionType:t,numOfBalances:o,title:n.account.accountName,config:a,isLastNode:d===e.accounts.length-1,parentNodeIDs:[],ancestorMetadata:{subAccountAncestorMetadata:[{depth:0,hasSibling:e.accounts.length>1,hasChildren:n.children.length>0,isLastNode:d===e.accounts.length-1}]}}))}function ie({balances:e,config:t,nodeId:o}){return{children:[],id:o??F("timeframe_header",[]),isLastNode:!1,reportElementData:{element:{kind:t.mode==="actual_vs_forecast"?"timeframe_headers_with_forecast":"timeframe_headers",title:"",data:e,numOfBalances:e.length},config:t}}}function Ne(e,t,o,a=!0){Object.assign(e.config,t);const n=ce(o),d=Y({balances:n,config:t});return{config:t,headerNodes:a?[d]:[],contentNodes:[d,...e.contentNodes.slice(1)]}}const ce=e=>{switch(e.reportId){case"profit_and_loss":{const t=e;return t.sections.expenses.balances.length>0?[...t.sections.expenses.balances,...t.sections.expenses.additionalBalances]:[...t.sections.income.balances,...t.sections.income.additionalBalances]}case"profit_and_loss_by_classes":{const t=e;return t.sections.expenses.balances.length>0?[...t.sections.expenses.balances,...t.sections.expenses.additionalBalances]:[...t.sections.income.balances,...t.sections.income.additionalBalances]}case"cash_flow":{const t=e;return[...t.calculatedSections.operatingActivitiesTotal.balances,...t.calculatedSections.operatingActivitiesTotal.additionalBalances]}case"balance_sheet":{const t=e;let o=[];return Object.keys(t.sections).forEach(a=>{t.sections[a].balances.length>0&&(o=[...t.sections[a].balances,...t.sections[a].additionalBalances])}),o}default:return[]}};function Me(e,t,o=!0){const a=y.getLocalizedStrings().reports.sections,n=y.getLocalizedStrings().reports.balanceSheet,d=ce(e),p=t.mode!=null&&t.mode==="this_period_vs_period_before"&&d.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1,l=ie({balances:d,config:t}),i=[];return i.push(l),Object.keys(e.rootSectionsWithSubSectionIds).forEach(u=>{const g=F("title_string_only",[],u),h={children:[],id:g,isLastNode:!0,reportElementData:{element:{kind:"title_string_only",title:a[u],data:void 0,numOfBalances:0},config:t}};i.push(h),e.rootSectionsWithSubSectionIds[u].forEach(s=>{if(_.isBalanceSheetReportViewSectionID(s)===!0)if(e.sections[s].accountGroups.length>0)if(s==="equity"){const c=oe({sectionId:s,section:e.sections[s],numOfBalances:p,config:t});i.push(...c)}else i.push(te({section:e.sections[s],sectionType:s,numOfBalances:p,title:n[s],isLastNode:!0,config:t}));else if(s==="equity"){const c=ae({sectionWithAcOnly:e.sections[s],sectionType:s,numOfBalances:p,config:t});i.push(...c)}else{const c=e.sections[s];i.push(se({sectionWithAcOnly:c,sectionType:s,numOfBalances:p,title:n[s],isLastNode:!0,config:t}))}else _.isBalanceSheetReportViewCalculatedSectionID(s)===!0&&i.push(j({calculatedSection:e.calculatedSections[s],numOfBalances:p,title:n[s],isLastNode:!0,config:t}))})}),{config:t,headerNodes:o?[l]:[],contentNodes:i}}function Fe({calculatedSection:e,numOfBalances:t,title:o,isLastNode:a,config:n}){return{children:[],id:F("calculated_section_type1",[],o),isLastNode:a,reportElementData:{element:{kind:"calculated_section_type1",title:o,data:e,numOfBalances:t},config:n}}}function $e(e,t,o=!0){const a=y.getLocalizedStrings().reports.sections,n=y.getLocalizedStrings().reports.cashFlow,d=[...e.calculatedSections.operatingActivitiesTotal.balances,...e.calculatedSections.operatingActivitiesTotal.additionalBalances],p=t.mode!=null&&t.mode==="this_period_vs_period_before"&&d.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1,l=ie({balances:d,config:t}),i=[];return Object.keys(e.rootSectionsWithSubSectionIds).forEach(u=>{const g=F("title_string_only",[],u),h={children:[],id:g,isLastNode:!0,reportElementData:{element:{kind:"title_string_only",title:a[u],data:void 0,numOfBalances:0},config:t}};i.push(h),e.rootSectionsWithSubSectionIds[u].forEach(s=>{if(_.isCashFlowReportViewSectionID(s)===!0)if(e.sections[s].accountGroups.length>0){const c=oe({sectionId:s,section:e.sections[s],numOfBalances:p,config:t});i.push(...c)}else{const c=ae({sectionWithAcOnly:e.sections[s],sectionType:s,numOfBalances:p,config:t});i.push(...c)}else _.isCashFlowReportViewCalculatedSectionType1ID(s)===!0?i.push(Fe({calculatedSection:e.calculatedSections[s],numOfBalances:p,title:n[s],isLastNode:!0,config:t})):_.isCashFlowReportViewCalculatedSectionID(s)===!0&&i.push(j({calculatedSection:e.calculatedSections[s],numOfBalances:p,title:n[s],isLastNode:!0,config:t}))})}),{config:t,headerNodes:o?[l]:[],contentNodes:[l,...i]}}function je(e,t,o=!0,a=!1){const n=y.getLocalizedStrings().reports,d=y.getLocalizedStrings().common;let p=[];const l=[];let i=[];if(a===!0){const u=Te({title:d.loading,balances:[],config:t});u.reportElementData.element.numOfBalances=6,o&&(i=[u]),l.push(u),[...Array(8)].forEach((g,h)=>{const s=h%4;let c=Pe[s];const x=ke({title:`${h}+${c}`,balances:p,config:t});x.reportElementData.element.numOfBalances=6,l.push(x)})}else{const u=e.sections.expenses.balances.length>0?[...e.sections.expenses.balances,...e.sections.expenses.additionalBalances]:e.sections.income.balances.length>0?[...e.sections.income.balances,...e.sections.income.additionalBalances]:e.sections.cogs.balances.length>0?[...e.sections.cogs.balances,...e.sections.cogs.additionalBalances]:e.sections.otherIncome.balances.length>0?[...e.sections.otherIncome.balances,...e.sections.otherIncome.additionalBalances]:e.sections.otherExpenses.balances.length>0?[...e.sections.otherExpenses.balances,...e.sections.otherExpenses.additionalBalances]:[],g=Y({balances:u,config:t}),h=t.mode!=null&&t.mode==="this_period_vs_period_before"&&u.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1;l.push(g),o&&(i=[g]),e.idsInOrder.forEach(s=>{if(_.isPandLReportViewSectionID(s)===!0){const c=e.sections[s];c!=null&&l.push(Le({section:c,sectionType:s,numOfBalances:h,title:n.sections[s],isLastNode:!0,config:t}))}else if(_.isPandLReportViewCalculatedSectionID(s)===!0){const c=e.calculatedSections[s];c!=null&&l.push(j({calculatedSection:c,numOfBalances:h,title:n.sections[s],isLastNode:!0,config:t}))}})}return{config:t,headerNodes:i,contentNodes:l}}function Ee(e,t,o=!0){const a=y.getLocalizedStrings().reports,n=e.sections.expenses!=null&&e.sections.expenses.balances.length>0?[...e.sections.expenses.balances,...e.sections.expenses.additionalBalances]:e.sections.income!=null&&e.sections.income.balances.length>0?[...e.sections.income.balances,...e.sections.income.additionalBalances]:e.sections.cogs!=null&&e.sections.cogs.balances.length>0?[...e.sections.cogs.balances,...e.sections.cogs.additionalBalances]:e.sections.otherIncome!=null&&e.sections.otherIncome.balances.length>0?[...e.sections.otherIncome.balances,...e.sections.otherIncome.additionalBalances]:e.sections.otherExpenses!=null&&e.sections.otherExpenses.balances.length>0?[...e.sections.otherExpenses.balances,...e.sections.otherExpenses.additionalBalances]:[],d=t.mode!=null&&t.mode==="this_period_vs_period_before"&&n.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1,p=Y({balances:n,config:t}),l=[];return l.push(p),e.idsInOrder.forEach(i=>{if(_.isPandLReportViewSectionID(i)===!0&&(e.sections[i].accountGroups.length>0?l.push(te({section:e.sections[i],sectionType:i,numOfBalances:d,title:a.sections[i],isLastNode:!0,config:t})):l.push(se({sectionWithAcOnly:e.sections[i],sectionType:i,numOfBalances:d,title:a.sections[i],isLastNode:!0,config:t}))),_.isPandLReportViewCalculatedSectionID(i)===!0){const u=e.calculatedSections[i];u!=null&&l.push(j({calculatedSection:u,numOfBalances:d,title:a.sections[i],isLastNode:!0,config:t}))}}),{config:t,headerNodes:o?[p]:[],contentNodes:l}}const q={contentPaddingLeft:new v(w[0],w[0],w[0]),contentPaddingRight:new v(w[3],w[3],w[8])},Ve=b.div`
2
2
  height: ${e=>e.height}px;
3
3
  width: 99.9%;
4
4
  margin-top: ${C.sp2};
5
5
  background-color: ${e=>e.theme.colors.grey4};
6
- `;function De({report:e,displayOrder:t,reportFormat:o,analytics:a,isZeniUser:n,onAdditionalBalanceSelectionChanged:d,onAccountBalanceClick:p,onTableScroll:l,onElementCollapseStateChanged:i,isCompareModeOn:u,isPageFetchInProgress:g=!1}){const h=U(),s=W(),[c,x]=P.useState(void 0),[O,E]=P.useState(void 0),L=!(h==="small"||h==="medium-compact"),V="name+balances_actual",$=u===!0?"this_period_vs_period_before":"none",R=()=>{let m=[];switch(e.reportId){case"profit_and_loss":{const f=e;m=(f.sections.expenses.balances.length>0?f.sections.expenses:f.sections.income).additionalBalances.map(D=>_.toTimeframeTick(D));break}case"profit_and_loss_by_classes":{const f=e,D=(f.sections.expenses?.balances?.length??0)>0?f.sections.expenses:null,pe=(f.sections.income?.balances?.length??0)>0?f.sections.income:null,Z=D??pe;Z?.additionalBalances!=null&&(m=Z.additionalBalances.map(ue=>_.toTimeframeTick(ue)));break}case"cash_flow":{m=e.calculatedSections.investingActivitiesTotal.additionalBalances.map(f=>_.toTimeframeTick(f));break}case"balance_sheet":{m=e.sections.equity.additionalBalances.map(f=>_.toTimeframeTick(f));break}}return m.length>0&&m.find(f=>f.balanceType==="this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent"};P.useEffect(()=>{const m={reportId:e.reportId,bookCloseDate:e.bookCloseDate,mode:$,firstMonthOfFY:e.firstMonthOfFY,filterAccountsWithNilBalances:"filter_actual_nil_balances",filterAccountGroupsWithNilBalances:"filter_actual_forecast_empty_account_group_balances",displayOrder:t,reportFormat:o,dataAvailable:e.dataAvailable,showNegativeAmountInParenthesis:xe(),showClassAccountNumber:n};if(c==null||!K(O,e)||g===!0){const f=ze(e,m,L,g);E(e),x(f)}else{const f=Ne(c,m,e,L);x(f)}},[u,e,g]);const[A,N]=P.useState(5),M=m=>{const f=m+135;N(f)},de=m=>m?.trackPageLoaded(Ge(e));return c!=null?r.jsxs(r.Fragment,{children:[r.jsx(we,{analytics:a,onLoad:de}),r.jsx(Ve,{height:A,children:r.jsx(ve,{backgroundColor:new Ce(s.colors.grey4),rootNodes:c,type:V,compareMode:R(),isSticky:{isStickyHeader:L,isStickyName:L},treeNodePadding:{left:q.contentPaddingLeft.value(h),right:q.contentPaddingRight.value(h)},onAccountClick:p==null?void 0:(m,f)=>{p(m,f)},nodeOpenStatus:e.uiState.nodeCollapseState,scrollPosition:e.uiState.scrollPosition,onCompareModeChanged:m=>d?.(m==="compare_mode_amount"?"this_period_vs_last_period":"this_period_vs_last_period_percent","dropdown"),onNodeCollapseToggled:(m,f)=>i?.(e.reportId,m,f),onReportTableHeightChanged:M,onScroll:m=>l?.(e.reportId,m)})})]}):null}const ze=(e,t,o=!0,a=!1)=>{switch(e.reportId){case"profit_and_loss":return Ee(e,t,o);case"profit_and_loss_by_classes":return je(e,t,o,a);case"cash_flow":return $e(e,t,o);case"balance_sheet":return Me(e,t,o);default:return}},Ge=e=>{switch(e.reportId){case"profit_and_loss":case"profit_and_loss_by_classes":return B.Event.profitAndLoss;case"cash_flow":return B.Event.cashFlow;case"balance_sheet":return B.Event.balanceSheet;default:return B.Event.reports}},Ue=b.div`
6
+ `;function De({report:e,displayOrder:t,reportFormat:o,analytics:a,isZeniUser:n,onAdditionalBalanceSelectionChanged:d,onAccountBalanceClick:p,onTableScroll:l,onElementCollapseStateChanged:i,isCompareModeOn:u,isPageFetchInProgress:g=!1}){const h=U(),s=W(),[c,x]=P.useState(void 0),[O,E]=P.useState(void 0),L=!(h==="small"||h==="medium-compact"),V="name+balances_actual",$=u===!0?"this_period_vs_period_before":"none",R=()=>{let m=[];switch(e.reportId){case"profit_and_loss":{const f=e;m=(f.sections.expenses.balances.length>0?f.sections.expenses:f.sections.income).additionalBalances.map(D=>_.toTimeframeTick(D));break}case"profit_and_loss_by_classes":{const f=e,D=(f.sections.expenses?.balances?.length??0)>0?f.sections.expenses:null,pe=(f.sections.income?.balances?.length??0)>0?f.sections.income:null,H=D??pe;H?.additionalBalances!=null&&(m=H.additionalBalances.map(ue=>_.toTimeframeTick(ue)));break}case"cash_flow":{m=e.calculatedSections.investingActivitiesTotal.additionalBalances.map(f=>_.toTimeframeTick(f));break}case"balance_sheet":{m=e.sections.equity.additionalBalances.map(f=>_.toTimeframeTick(f));break}}return m.length>0&&m.find(f=>f.balanceType==="this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent"};P.useEffect(()=>{const m={reportId:e.reportId,bookCloseDate:e.bookCloseDate,mode:$,firstMonthOfFY:e.firstMonthOfFY,filterAccountsWithNilBalances:"filter_actual_nil_balances",filterAccountGroupsWithNilBalances:"filter_actual_forecast_empty_account_group_balances",displayOrder:t,reportFormat:o,dataAvailable:e.dataAvailable,showNegativeAmountInParenthesis:xe(),showClassAccountNumber:n};if(c==null||!J(O,e)||g===!0){const f=ze(e,m,L,g);E(e),x(f)}else{const f=Ne(c,m,e,L);x(f)}},[u,e,g]);const[A,N]=P.useState(5),M=m=>{const f=m+135;N(f)},de=m=>m?.trackPageLoaded(Ge(e));return c!=null?r.jsxs(r.Fragment,{children:[r.jsx(we,{analytics:a,onLoad:de}),r.jsx(Ve,{height:A,children:r.jsx(ve,{backgroundColor:new Ce(s.colors.grey4),rootNodes:c,type:V,compareMode:R(),isSticky:{isStickyHeader:L,isStickyName:L},treeNodePadding:{left:q.contentPaddingLeft.value(h),right:q.contentPaddingRight.value(h)},onAccountClick:p==null?void 0:(m,f)=>{p(m,f)},nodeOpenStatus:e.uiState.nodeCollapseState,scrollPosition:e.uiState.scrollPosition,onCompareModeChanged:m=>d?.(m==="compare_mode_amount"?"this_period_vs_last_period":"this_period_vs_last_period_percent","dropdown"),onNodeCollapseToggled:(m,f)=>i?.(e.reportId,m,f),onReportTableHeightChanged:M,onScroll:m=>l?.(e.reportId,m)})})]}):null}const ze=(e,t,o=!0,a=!1)=>{switch(e.reportId){case"profit_and_loss":return Ee(e,t,o);case"profit_and_loss_by_classes":return je(e,t,o,a);case"cash_flow":return $e(e,t,o);case"balance_sheet":return Me(e,t,o);default:return}},Ge=e=>{switch(e.reportId){case"profit_and_loss":case"profit_and_loss_by_classes":return B.Event.profitAndLoss;case"cash_flow":return B.Event.cashFlow;case"balance_sheet":return B.Event.balanceSheet;default:return B.Event.reports}},Ue=b.div`
7
7
  display: flex;
8
8
  flex-direction: row;
9
9
  border-bottom: 1px solid ${e=>e.theme.colors.grey3};
@@ -24,7 +24,7 @@ import{q as U,d as W,F as y,ax as he,l as _,j as r,aM as k,b_ as fe,bI as me,bG
24
24
  &:hover {
25
25
  color: ${e=>e.theme.colors.primary};
26
26
  }
27
- `,Ze=b.div`
27
+ `,He=b.div`
28
28
  height: 2px;
29
29
  background-color: ${e=>e.theme.colors.primary};
30
30
  border-radius: 1px;
@@ -49,7 +49,7 @@ import{q as U,d as W,F as y,ax as he,l as _,j as r,aM as k,b_ as fe,bI as me,bG
49
49
  width: 160px;
50
50
  left: 63%;
51
51
  }
52
- `;function He({reportId:e,isSelected:t,onClick:o}){const a=n=>{switch(n){case"profit_and_loss":case"profit_and_loss_by_classes":case"balance_sheet":case"cash_flow":return y.getLocalizedStrings().reportTitleById[n];default:return console.warn("Unsupported report"),""}};return r.jsx(Ye,{"data-testid":k("reportSwitcher",e),onClick:()=>{t===!1&&o(e)},isSelected:t,spaceAround:e==="balance_sheet",children:a(e)})}function qe({reportIds:e,selectedReport:t,onReportSelectionChanged:o}){const a=n=>{o?.(n)};return r.jsx(Ue,{"data-testid":k("report-switcher-container"),children:r.jsx(We,{"data-testid":k("report-switcher-content"),children:e.map(n=>n!=="profit_and_loss_by_classes"&&r.jsxs("div",{children:[r.jsx(He,{reportId:n,isSelected:t===n,onClick:a}),r.jsx(Ze,{className:`Slider ${t}`})]},`reportSegment-${n}`))})})}const I={contentContainerLeftRightMargin:new v(w[3],w[3],w[8]),contentRightPadding:new v(w[3],w[3],w[8]),tickSkelectionContainerWidth:new v(343,600,905,1240)},Je=new v(4,4),Ke=new v(4,4),Qe={selectedNumberOfPeriods:(e,t)=>e?Ke.value(t):Je.value(t)},Xe=b.div`
52
+ `;function Ze({reportId:e,isSelected:t,onClick:o}){const a=n=>{switch(n){case"profit_and_loss":case"profit_and_loss_by_classes":case"balance_sheet":case"cash_flow":return y.getLocalizedStrings().reportTitleById[n];default:return console.warn("Unsupported report"),""}};return r.jsx(Ye,{"data-testid":k("reportSwitcher",e),onClick:()=>{t===!1&&o(e)},isSelected:t,spaceAround:e==="balance_sheet",children:a(e)})}function qe({reportIds:e,selectedReport:t,onReportSelectionChanged:o}){const a=n=>{o?.(n)};return r.jsx(Ue,{"data-testid":k("report-switcher-container"),children:r.jsx(We,{"data-testid":k("report-switcher-content"),children:e.map(n=>n!=="profit_and_loss_by_classes"&&r.jsxs("div",{children:[r.jsx(Ze,{reportId:n,isSelected:t===n,onClick:a}),r.jsx(He,{className:`Slider ${t}`})]},`reportSegment-${n}`))})})}const I={contentContainerLeftRightMargin:new v(w[3],w[3],w[8]),contentRightPadding:new v(w[3],w[3],w[8]),tickSkelectionContainerWidth:new v(343,600,905,1240)},Xe=new v(4,4),Je=new v(4,4),Ke={selectedNumberOfPeriods:(e,t)=>e?Je.value(t):Xe.value(t)},Qe=b.div`
53
53
  display: flex;
54
54
  flex: 1 1 auto;
55
55
  min-height: 100%;
@@ -98,7 +98,7 @@ import{q as U,d as W,F as y,ax as he,l as _,j as r,aM as k,b_ as fe,bI as me,bG
98
98
  `,at=b(_e)`
99
99
  margin-top: ${C.sp3};
100
100
  color: ${e=>e.theme.colors.hero};
101
- `,re=({style:e,isLoading:t})=>t?r.jsx(tt,{style:e,children:r.jsx(be,{size:"ExtraLarge",start:!0})}):null,S=e=>{switch(e.selectedReport){case"cash_flow":return e.cashFlowReport;case"balance_sheet":return e.balanceSheetReport;case"profit_and_loss_by_classes":return e.profitAndLossClassesViewReport;case"profit_and_loss":default:return e.profitAndLossReport}},G=({selectedReport:e,isCompareModeOn:t,windowSize:o})=>{const a=e.availableNumberOfPeriods;let n=Qe.selectedNumberOfPeriods(t,o);return a!=null&&(n=Math.min(n,a)),n};function jt(e){const t=U(),o=W(),{onUpdateAccountViewMode:a,onUpdateClassesToFilterOut:n,onAdditionalBalanceSelectionChanged:d,onTimeframeSelectionChanged:p,isCompareMode:l,selectedReportAndTimeframeFetchState:i,onClickMenuIcon:u}=e,g=(R,A)=>{R!==h?.accountViewMode&&a?.(R),A&&n?.(A)};P.useEffect(()=>{if(e.fetchState==="Completed"){const R=S(e).filter.additionalBalances;e.onUpdateHighlightedNumberOfPeriods?.(R,e.isCompareMode,G({selectedReport:S(e),isCompareModeOn:e.isCompareMode,windowSize:t}),e.balancesInTimeframe)}},[t,e.fetchState]);const h=rt(e),s=y.getLocalizedStrings().reports.common,c=he(),x=c!=null&&_.hasInvestorBankerLevelAccess(c.loggedInUserRole)?"detailed":"more_detailed",O=c!=null&&_.hasInvestorBankerLevelAccess(c.loggedInUserRole)?["more_detailed"]:[];e.showAccountGroups===!1&&h?.accountViewMode==="account_group"&&O.push("detailed");const[E,L]=Q.useState(O.includes("more_detailed")?"detailed":"more_detailed"),V={selectedFormat:E,disabledFormatForRole:O,roleBasedClassesSelectedFormat:x,setSelectedFormat:L};if(i.fetchState==="Error"||e.fetchState==="Error")return r.jsxs(nt,{"data-testid":k("report-page-error-reload-page"),children:[r.jsx(ot,{"data-testid":k("report-page-error-reload-icon"),onClick:e.onReloadReport,children:r.jsx(fe,{})}),r.jsx(at,{children:s.failed})]});const $=e.fetchState;if(i.fetchState!=="Completed"&&($==="In-Progress"||$==="Not-Started"))return r.jsx(re,{isLoading:!0});{const R=r.jsx(me,{downloadReportOptions:{type:"detailed_menu",downloadMenu:{detailedMenu:h!=null&&e.dataAvailable!=null?r.jsx(Be,{defaultOptions:h,analytics:e.analytics,referrer:T(e.selectedReport),dataAvailable:e.dataAvailable,downloadState:e.downloadState,statementEndPoint:e.statementEndPoint,authParams:e.authParams,currentTenantCompanyName:e.currentTenantCompanyName,classesFetchState:e.profitAndLossClassesViewReport.fetchState,showAccountGroups:e.showAccountGroups,reportFormatProps:V,updateDownloadStateHandler:e.updateDownloadStateHandler,onUpdateDisplayOrder:e.onUpdateDisplayOrder,onUpdateReportFormat:e.onUpdateReportFormat,onClose:()=>null,onOpenAccountViewMode:e.onOpenAccountViewMode,onSaveClickHandler:g,onThisPeriodChanged:e.onThisPeriodChanged,onAdditionalBalanceSelectionChanged:(A,N,M)=>{d(l,A,N,M)},onTimeframeSelectionChanged:(A,N,M)=>{p?.(A,N,M)}}):r.jsx(r.Fragment,{})}}});return r.jsxs(Xe,{children:[r.jsx(ge,{title:y.getLocalizedStrings().reports.title,backgroundColor:o.colors.grey4,onBackClick:e.onBackClick,showMenuIcon:t==="medium-compact"||t==="small",onClickMenuIcon:u,rightSideComponent:R,downloadPresent:!0,source:"ReportsPage",hideSearchBtn:!0}),r.jsx(it,{...e})]})}}function it(e){const t=U(),o=W(),a=P.useRef(null),{selectedReportAndTimeframeFetchState:n}=e,d=["month","quarter","year"],p=(s,c)=>{e.analytics?.trackCompareFilterChange(s==="this_period_vs_last_period_percent"?"percentage":"amount",T(e.selectedReport),z(e.selectedTimeframe),c);const x=Array.from(new Set(s==="this_period_vs_last_period_percent"?[...S(e).filter.additionalBalances,"this_period_vs_last_period_percent"].filter(O=>O!=="this_period_vs_last_period"):[...S(e).filter.additionalBalances,"this_period_vs_last_period"].filter(O=>O!=="this_period_vs_last_period_percent")));e.onAdditionalBalanceSelectionChanged?.(e.isCompareMode,x,G({selectedReport:S(e),isCompareModeOn:e.isCompareMode,windowSize:t}))},l=(s,c)=>{s!==e.profitAndLossClassesViewReport?.uiState.accountViewMode&&e.onUpdateAccountViewMode?.(s),c&&e.onUpdateClassesToFilterOut?.(c)},i=S(e),u=a.current?.clientWidth??I.tickSkelectionContainerWidth.value(t),g=_.reduceAllFetchState([e.reportsResyncFetchState,e.profitAndLossClassesViewReport]).fetchState==="In-Progress"&&e.profitAndLossClassesViewReport.uiState.accountViewMode==="classes",h=n.fetchState==="In-Progress";return r.jsxs(et,{windowSize:t,"data-testid":k("reports-page-content-container"),children:[r.jsx(pt,{windowSize:t,ref:a,children:r.jsx(Ae,{timeframe:{allowedTimeframes:d,selectedTimeframe:e.selectedTimeframe,onTimeframeSelectionChanged:s=>{e.analytics?.trackTimeframeSwitch(z(s),T(e.selectedReport)),e.onTimeframeSelectionChanged?.(s,!0)}},toggle:{label:y.getLocalizedStrings().compareSwitchLabel,isOn:e.isCompareMode,onValueChanged:s=>{e.analytics?.trackCompareMode(s,T(e.selectedReport),z(e.selectedTimeframe));const c=S(e).filter;e.onAdditionalBalanceSelectionChanged?.(s,c.additionalBalances,c.balancesRange.numberOfPeriods)}}})}),n.fetchState==="Not-Started"||n.fetchState==="In-Progress"?r.jsx(ht,{windowSize:t,children:r.jsx(ft,{children:r.jsx(Se,{width:u,height:X-w[2],backgroundColor:o.colors.grey3,style:{borderRadius:C.sp2}})})}):r.jsx(ut,{windowSize:t,children:r.jsx(Re,{firstMonthOfFY:i.firstMonthOfFY,timeframe:e.selectedTimeframe,timeframeTicks:e.allTimeframeTicks,selection:{selectedTicks:J(e.allTimeframeTicks,e.selectedCOABalancesRange),highlightedOfSelectedTicks:J(e.allTimeframeTicks,e.selectedCOABalancesRange)},onClick:(s,c)=>{e.analytics?.trackDateRangeFilterChange(T(e.selectedReport),"range filter",e.isCompareMode,H(i.firstMonthOfFY,e.selectedTimeframe,c)),e.onThisPeriodChanged?.(c,G({selectedReport:S(e),isCompareModeOn:e.isCompareMode,windowSize:t}))},onSelectionChanged:s=>{const c=ct(e.allTimeframeTicks,s.fromEnd);e.analytics?.trackDateRangeFilterChange(T(e.selectedReport),"range filter",e.isCompareMode,H(i.firstMonthOfFY,e.selectedTimeframe,c.thisPeriod)),e.onCOABalancesRangeChanged?.(c)}})}),r.jsx(mt,{windowSize:t,children:r.jsx(qe,{reportIds:["profit_and_loss","balance_sheet","cash_flow","profit_and_loss_by_classes"],selectedReport:e.selectedReport,onReportSelectionChanged:s=>{e.analytics?.trackPageLoaded(lt(s)),s==="profit_and_loss"&&e.profitAndLossClassesViewReport?.uiState.accountViewMode==="classes"?e.onReportSelectionChanged?.("profit_and_loss_by_classes"):e.onReportSelectionChanged?.(s)}})}),n.fetchState==="Not-Started"||n.fetchState==="In-Progress"?r.jsx(re,{style:{boxShadow:"none",backgroundColor:"inherit"},isLoading:h}):r.jsxs(r.Fragment,{children:[r.jsx(le,{report:S(e),displayOrder:e.displayOrder,reportFormat:e.reportFormat,analytics:e.analytics,onAdditionalBalanceSelectionChanged:p,onAccountBalanceClick:e.onAccountBalanceClick,onElementCollapseStateChanged:e.onElementCollapseStateChanged,onTableScroll:e.onTableScroll,isCompareModeOn:e.isCompareMode,isZeniUser:e.isZeniUser,isPageFetchInProgress:g}),_.isPAndLReport(e.selectedReport)?r.jsx(st,{windowSize:t,children:r.jsx(Oe,{reportId:e.selectedReport,firstMonthOfFY:e.profitAndLossClassesViewReport.firstMonthOfFY,nodes:e.profitAndLossClassesViewReport?.classHierarchy,classesListFetchState:e.profitAndLossClassesViewReport?.fetchState,selectedView:e.profitAndLossClassesViewReport?.uiState.accountViewMode,showClassAccountNumber:e.isZeniUser,showAccountGroups:e.showAccountGroups,onSaveClick:l,classesToBeFilteredOut:e.profitAndLossClassesViewReport?.classesToFilterOut,onOpenAccountViewMode:e.onOpenAccountViewMode,onResyncReports:e.onResyncReports,isPageFetchInProgress:g,lastRefreshSuccessTime:e.profitAndLossClassesViewReport?.status?.lastRefreshSuccessTime})}):null]})]})}const J=(e,t)=>{if(t.orderBy!=="ascending_date")throw new Error("Invalid ordering of dates!!");let o=e.length-1;return t.thisPeriod!=null&&(o=e.findIndex(a=>a.startDate.isSame(t.thisPeriod.startDate,"date")&&a.endDate.isSameOrBefore(t.thisPeriod.endDate))),{startIndex:Math.max(o+1-t.numberOfPeriods,0),length:t.numberOfPeriods}},ct=(e,t)=>{const o=e.length-1-t.offsetFromEnd;return{thisPeriod:e[o],numberOfPeriods:t.length,orderBy:"ascending_date"}};function rt(e){let t=e.selectedCOABalancesRange.thisPeriod;if(t==null){const p=e.displayOrder,l=e.profitAndLossReport.sections.expenses!=null&&e.profitAndLossReport.sections.expenses.balances.length>0?e.profitAndLossReport.sections.expenses:e.profitAndLossReport.sections.income;if(l!=null&&l.balances.length>0){const i=p==="ascending_date"?l.balances.length-1:0;t=l.balances[i]}}const o=S(e).firstMonthOfFY,a=S(e).bookCloseDate,n=S(e).dataAvailable,d=S(e).filter.additionalBalances;if(t!=null)return{localeId:y.getAppLocaleID(),showNegativeAmountInParenthesis:!0,filterAccountsWithNilBalances:"filter_actual_nil_balances",filterAccountGroupsWithNilBalances:"filter_actual_forecast_empty_account_group_balances",includeCoverPage:!0,companyName:e.currentTenantCompanyName,statementFileType:"pdf",statements:e.profitAndLossClassesViewReport.uiState.accountViewMode==="account_group"?["profit_and_loss","balance_sheet","cash_flow"]:["profit_and_loss_by_classes","balance_sheet","cash_flow"],firstMonthOfFY:o,bookCloseDate:a,dataAvailable:n,timeframe:e.selectedTimeframe,additionalBalances:d,format:e.reportFormat,balancesFilter:{thisPeriod:t,numberOfPeriods:e.selectedCOABalancesRange.numberOfPeriods,orderBy:e.displayOrder},accountViewMode:e.profitAndLossClassesViewReport.uiState.accountViewMode,nestedClassHierarchy:e.profitAndLossClassesViewReport?.classHierarchy,classesToFilterOut:e.profitAndLossClassesViewReport.classesToFilterOut,showClassAccountNumber:e.isZeniUser,isZeniCOAUsed:e.isZeniCOAUsed}}const T=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}},lt=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":return B.Event.profitAndLoss;case"cash_flow":return B.Event.cashFlow;case"balance_sheet":return B.Event.balanceSheet;default:return B.Event.reports}},le=Q.memo(De,(e,t)=>dt(e,t,["report","analytics","isCompareModeOn","isZeniUser","isPageFetchInProgress"]));le.displayName="Reports table";const dt=(e,t,o)=>o.reduce((a,n)=>a===!0&&K(e[`${n}`],t[`${n}`]),!0),pt=b.div`
101
+ `,re=({style:e,isLoading:t})=>t?r.jsx(tt,{style:e,children:r.jsx(be,{size:"ExtraLarge",start:!0})}):null,S=e=>{switch(e.selectedReport){case"cash_flow":return e.cashFlowReport;case"balance_sheet":return e.balanceSheetReport;case"profit_and_loss_by_classes":return e.profitAndLossClassesViewReport;case"profit_and_loss":default:return e.profitAndLossReport}},G=({selectedReport:e,isCompareModeOn:t,windowSize:o})=>{const a=e.availableNumberOfPeriods;let n=Ke.selectedNumberOfPeriods(t,o);return a!=null&&(n=Math.min(n,a)),n};function jt(e){const t=U(),o=W(),{onUpdateAccountViewMode:a,onUpdateClassesToFilterOut:n,onAdditionalBalanceSelectionChanged:d,onTimeframeSelectionChanged:p,isCompareMode:l,selectedReportAndTimeframeFetchState:i,onClickMenuIcon:u}=e,g=(R,A)=>{R!==h?.accountViewMode&&a?.(R),A&&n?.(A)};P.useEffect(()=>{if(e.fetchState==="Completed"){const R=S(e).filter.additionalBalances;e.onUpdateHighlightedNumberOfPeriods?.(R,e.isCompareMode,G({selectedReport:S(e),isCompareModeOn:e.isCompareMode,windowSize:t}),e.balancesInTimeframe)}},[t,e.fetchState]);const h=rt(e),s=y.getLocalizedStrings().reports.common,c=he(),x=c!=null&&_.hasInvestorBankerLevelAccess(c.loggedInUserRole)?"detailed":"more_detailed",O=c!=null&&_.hasInvestorBankerLevelAccess(c.loggedInUserRole)?["more_detailed"]:[];e.showAccountGroups===!1&&h?.accountViewMode==="account_group"&&O.push("detailed");const[E,L]=K.useState(O.includes("more_detailed")?"detailed":"more_detailed"),V={selectedFormat:E,disabledFormatForRole:O,roleBasedClassesSelectedFormat:x,setSelectedFormat:L};if(i.fetchState==="Error"||e.fetchState==="Error")return r.jsxs(nt,{"data-testid":k("report-page-error-reload-page"),children:[r.jsx(ot,{"data-testid":k("report-page-error-reload-icon"),onClick:e.onReloadReport,children:r.jsx(fe,{})}),r.jsx(at,{children:s.failed})]});const $=e.fetchState;if(i.fetchState!=="Completed"&&($==="In-Progress"||$==="Not-Started"))return r.jsx(re,{isLoading:!0});{const R=r.jsx(me,{downloadReportOptions:{type:"detailed_menu",downloadMenu:{detailedMenu:h!=null&&e.dataAvailable!=null?r.jsx(Be,{defaultOptions:h,analytics:e.analytics,referrer:T(e.selectedReport),dataAvailable:e.dataAvailable,downloadState:e.downloadState,statementEndPoint:e.statementEndPoint,authParams:e.authParams,currentTenantCompanyName:e.currentTenantCompanyName,classesFetchState:e.profitAndLossClassesViewReport.fetchState,showAccountGroups:e.showAccountGroups,reportFormatProps:V,updateDownloadStateHandler:e.updateDownloadStateHandler,onUpdateDisplayOrder:e.onUpdateDisplayOrder,onUpdateReportFormat:e.onUpdateReportFormat,onClose:()=>null,onOpenAccountViewMode:e.onOpenAccountViewMode,onSaveClickHandler:g,onThisPeriodChanged:e.onThisPeriodChanged,onAdditionalBalanceSelectionChanged:(A,N,M)=>{d(l,A,N,M)},onTimeframeSelectionChanged:(A,N,M)=>{p?.(A,N,M)}}):r.jsx(r.Fragment,{})}}});return r.jsxs(Qe,{children:[r.jsx(ge,{title:y.getLocalizedStrings().reports.title,backgroundColor:o.colors.grey4,onBackClick:e.onBackClick,showMenuIcon:t==="medium-compact"||t==="small",onClickMenuIcon:u,rightSideComponent:R,downloadPresent:!0,source:"ReportsPage",hideSearchBtn:!0}),r.jsx(it,{...e})]})}}function it(e){const t=U(),o=W(),a=P.useRef(null),{selectedReportAndTimeframeFetchState:n}=e,d=["month","quarter","year"],p=(s,c)=>{e.analytics?.trackCompareFilterChange(s==="this_period_vs_last_period_percent"?"percentage":"amount",T(e.selectedReport),z(e.selectedTimeframe),c);const x=Array.from(new Set(s==="this_period_vs_last_period_percent"?[...S(e).filter.additionalBalances,"this_period_vs_last_period_percent"].filter(O=>O!=="this_period_vs_last_period"):[...S(e).filter.additionalBalances,"this_period_vs_last_period"].filter(O=>O!=="this_period_vs_last_period_percent")));e.onAdditionalBalanceSelectionChanged?.(e.isCompareMode,x,G({selectedReport:S(e),isCompareModeOn:e.isCompareMode,windowSize:t}))},l=(s,c)=>{s!==e.profitAndLossClassesViewReport?.uiState.accountViewMode&&e.onUpdateAccountViewMode?.(s),c&&e.onUpdateClassesToFilterOut?.(c)},i=S(e),u=a.current?.clientWidth??I.tickSkelectionContainerWidth.value(t),g=_.reduceAllFetchState([e.reportsResyncFetchState,e.profitAndLossClassesViewReport]).fetchState==="In-Progress"&&e.profitAndLossClassesViewReport.uiState.accountViewMode==="classes",h=n.fetchState==="In-Progress";return r.jsxs(et,{windowSize:t,"data-testid":k("reports-page-content-container"),children:[r.jsx(pt,{windowSize:t,ref:a,children:r.jsx(Ae,{timeframe:{allowedTimeframes:d,selectedTimeframe:e.selectedTimeframe,onTimeframeSelectionChanged:s=>{e.analytics?.trackTimeframeSwitch(z(s),T(e.selectedReport)),e.onTimeframeSelectionChanged?.(s,!0)}},toggle:{label:y.getLocalizedStrings().compareSwitchLabel,isOn:e.isCompareMode,onValueChanged:s=>{e.analytics?.trackCompareMode(s,T(e.selectedReport),z(e.selectedTimeframe));const c=S(e).filter;e.onAdditionalBalanceSelectionChanged?.(s,c.additionalBalances,c.balancesRange.numberOfPeriods)}}})}),n.fetchState==="Not-Started"||n.fetchState==="In-Progress"?r.jsx(ht,{windowSize:t,children:r.jsx(ft,{children:r.jsx(Se,{width:u,height:Q-w[2],backgroundColor:o.colors.grey3,style:{borderRadius:C.sp2}})})}):r.jsx(ut,{windowSize:t,children:r.jsx(Re,{firstMonthOfFY:i.firstMonthOfFY,timeframe:e.selectedTimeframe,timeframeTicks:e.allTimeframeTicks,selection:{selectedTicks:X(e.allTimeframeTicks,e.selectedCOABalancesRange),highlightedOfSelectedTicks:X(e.allTimeframeTicks,e.selectedCOABalancesRange)},onClick:(s,c)=>{e.analytics?.trackDateRangeFilterChange(T(e.selectedReport),"range filter",e.isCompareMode,Z(i.firstMonthOfFY,e.selectedTimeframe,c)),e.onThisPeriodChanged?.(c,G({selectedReport:S(e),isCompareModeOn:e.isCompareMode,windowSize:t}))},onSelectionChanged:s=>{const c=ct(e.allTimeframeTicks,s.fromEnd);e.analytics?.trackDateRangeFilterChange(T(e.selectedReport),"range filter",e.isCompareMode,Z(i.firstMonthOfFY,e.selectedTimeframe,c.thisPeriod)),e.onCOABalancesRangeChanged?.(c)}})}),r.jsx(mt,{windowSize:t,children:r.jsx(qe,{reportIds:["profit_and_loss","balance_sheet","cash_flow","profit_and_loss_by_classes"],selectedReport:e.selectedReport,onReportSelectionChanged:s=>{e.analytics?.trackPageLoaded(lt(s)),s==="profit_and_loss"&&e.profitAndLossClassesViewReport?.uiState.accountViewMode==="classes"?e.onReportSelectionChanged?.("profit_and_loss_by_classes"):e.onReportSelectionChanged?.(s)}})}),n.fetchState==="Not-Started"||n.fetchState==="In-Progress"?r.jsx(re,{style:{boxShadow:"none",backgroundColor:"inherit"},isLoading:h}):r.jsxs(r.Fragment,{children:[r.jsx(le,{report:S(e),displayOrder:e.displayOrder,reportFormat:e.reportFormat,analytics:e.analytics,onAdditionalBalanceSelectionChanged:p,onAccountBalanceClick:e.onAccountBalanceClick,onElementCollapseStateChanged:e.onElementCollapseStateChanged,onTableScroll:e.onTableScroll,isCompareModeOn:e.isCompareMode,isZeniUser:e.isZeniUser,isPageFetchInProgress:g}),_.isPAndLReport(e.selectedReport)?r.jsx(st,{windowSize:t,children:r.jsx(Oe,{reportId:e.selectedReport,firstMonthOfFY:e.profitAndLossClassesViewReport.firstMonthOfFY,nodes:e.profitAndLossClassesViewReport?.classHierarchy,classesListFetchState:e.profitAndLossClassesViewReport?.fetchState,selectedView:e.profitAndLossClassesViewReport?.uiState.accountViewMode,showClassAccountNumber:e.isZeniUser,showAccountGroups:e.showAccountGroups,onSaveClick:l,classesToBeFilteredOut:e.profitAndLossClassesViewReport?.classesToFilterOut,onOpenAccountViewMode:e.onOpenAccountViewMode,onResyncReports:e.onResyncReports,isPageFetchInProgress:g,lastRefreshSuccessTime:e.profitAndLossClassesViewReport?.status?.lastRefreshSuccessTime})}):null]})]})}const X=(e,t)=>{if(t.orderBy!=="ascending_date")throw new Error("Invalid ordering of dates!!");let o=e.length-1;return t.thisPeriod!=null&&(o=e.findIndex(a=>a.startDate.isSame(t.thisPeriod.startDate,"date")&&a.endDate.isSameOrBefore(t.thisPeriod.endDate))),{startIndex:Math.max(o+1-t.numberOfPeriods,0),length:t.numberOfPeriods}},ct=(e,t)=>{const o=e.length-1-t.offsetFromEnd;return{thisPeriod:e[o],numberOfPeriods:t.length,orderBy:"ascending_date"}};function rt(e){let t=e.selectedCOABalancesRange.thisPeriod;if(t==null){const p=e.displayOrder,l=e.profitAndLossReport.sections.expenses!=null&&e.profitAndLossReport.sections.expenses.balances.length>0?e.profitAndLossReport.sections.expenses:e.profitAndLossReport.sections.income;if(l!=null&&l.balances.length>0){const i=p==="ascending_date"?l.balances.length-1:0;t=l.balances[i]}}const o=S(e).firstMonthOfFY,a=S(e).bookCloseDate,n=S(e).dataAvailable,d=S(e).filter.additionalBalances;if(t!=null)return{localeId:y.getAppLocaleID(),showNegativeAmountInParenthesis:!0,filterAccountsWithNilBalances:"filter_actual_nil_balances",filterAccountGroupsWithNilBalances:"filter_actual_forecast_empty_account_group_balances",includeCoverPage:!0,companyName:e.currentTenantCompanyName,statementFileType:"pdf",statements:e.profitAndLossClassesViewReport.uiState.accountViewMode==="account_group"?["profit_and_loss","balance_sheet","cash_flow"]:["profit_and_loss_by_classes","balance_sheet","cash_flow"],firstMonthOfFY:o,bookCloseDate:a,dataAvailable:n,timeframe:e.selectedTimeframe,additionalBalances:d,format:e.reportFormat,balancesFilter:{thisPeriod:t,numberOfPeriods:e.selectedCOABalancesRange.numberOfPeriods,orderBy:e.displayOrder},accountViewMode:e.profitAndLossClassesViewReport.uiState.accountViewMode,nestedClassHierarchy:e.profitAndLossClassesViewReport?.classHierarchy,classesToFilterOut:e.profitAndLossClassesViewReport.classesToFilterOut,showClassAccountNumber:e.isZeniUser,isZeniCOAUsed:e.isZeniCOAUsed}}const T=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}},lt=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":return B.Event.profitAndLoss;case"cash_flow":return B.Event.cashFlow;case"balance_sheet":return B.Event.balanceSheet;default:return B.Event.reports}},le=K.memo(De,(e,t)=>dt(e,t,["report","analytics","isCompareModeOn","isZeniUser","isPageFetchInProgress"]));le.displayName="Reports table";const dt=(e,t,o)=>o.reduce((a,n)=>a===!0&&J(e[`${n}`],t[`${n}`]),!0),pt=b.div`
102
102
  padding-right: ${e=>I.contentRightPadding.valuePx(e.windowSize)};
103
103
  `,ut=b.div`
104
104
  margin-top: ${C.sp3};
@@ -110,7 +110,7 @@ import{q as U,d as W,F as y,ax as he,l as _,j as r,aM as k,b_ as fe,bI as me,bG
110
110
  display: flex;
111
111
  flex-direction: row;
112
112
  justify-content: flex-start;
113
- min-height: ${X}px;
113
+ min-height: ${Q}px;
114
114
  box-sizing: content-box;
115
115
  width: 100%;
116
116
  align-items: center;
@@ -1,4 +1,4 @@
1
- import{d as A,j as a,F as S,q as de,aM as Ae,b3 as Q,bR as Te,u as E,bS as J,bi as ee,b as M,bh as ae,aX as re,bT as oe,bU as ge,o as m,bV as te,p as g,aC as Fe,bW as pe,bX as me,y as xe,bY as fe,am as P,bZ as F,ba as V}from"./index-BtlpidgV.js";import{b as R,w as le,n as x}from"./vendor-Bs1fkIUX.js";import{p as b,d as ne,y as W,b as N,g as ce,u as T}from"./chartTypes-D3stzk-w-DQVIS8Ln.js";import{i as K,h as se,c as I}from"./toCOABalancesWithID-iOGWxWc5-BQC_85M2.js";import{V as Z}from"./toChartData-BEJwj1pL-G6Vr-TZM.js";const q={legendLabelMarginLeft:new xe(2,2),legendLabelMarginRight:new xe(E[3],E[4])},Ve=x.div`
1
+ import{d as A,j as a,F as S,q as de,aM as Ae,b3 as Q,bR as Te,u as E,bS as J,bi as ee,b as M,bh as ae,aX as re,bT as oe,bU as ge,o as m,bV as te,p as g,aC as Fe,bW as pe,bX as me,y as xe,bY as fe,am as P,bZ as F,ba as V}from"./index-CN7UAWAg.js";import{b as R,w as le,n as x}from"./vendor-Bs1fkIUX.js";import{p as b,d as ne,y as W,b as N,g as ce,u as T}from"./chartTypes-D3rvsvls-DmtOpgie.js";import{i as K,h as se,c as I}from"./toCOABalancesWithID-CHHSLp5k-D9n1b9Hs.js";import{V as Z}from"./toChartData-CBhPep_F-DbHa5eNf.js";const q={legendLabelMarginLeft:new xe(2,2),legendLabelMarginRight:new xe(E[3],E[4])},Ve=x.div`
2
2
  display: flex;
3
3
  `,He=x.div`
4
4
  margin: ${m.sp2} ${m.sp0} ${m.sp2} ${m.sp0};
@@ -1,4 +1,4 @@
1
- import{q as Tt,ax as jt,y,fh as vt,F as St,fi as Ct,fj as Dt,j as t,fk as It,fl as le,fm as At,l as d,fn as Pt,fo as kt,aM as v,fp as Bt,aN as k,fq as Mt,fr as Nt,fs as ke,ft as Be,fu as Me,b as V,fv as O,fw as z,fx as _,p as S,fy as Ft,fz as Rt,fA as Et,fB as Lt,c6 as Ne,o as n,aQ as Ot,u as c,aj as zt,ch as _t,B as Wt,M as Ut,fC as Ht,cx as Zt,am as se,an as de,fD as qt,fE as Yt,bn as Vt,c as Gt,b9 as Kt,ar as Xe,bQ as Xt,ai as Qe,by as Qt,fF as Jt}from"./index-BtlpidgV.js";import{b as U,n as i}from"./vendor-Bs1fkIUX.js";import{t as en,o as tn}from"./LowBalancePopup-D8MLLJa7-MvDx9vDJ.js";import{S as W}from"./LabeledText-aSB1WzCl-Cv-M2FmN.js";import"./mui-Ty75qFQF.js";import"./analytics-BbBRZ6cw.js";import"./routing-Dk1A2KYI.js";import"./sentry-BE5FTzpq.js";import"./redux-CEhZD0hA.js";import"./liveblocks-8ht9CoL5.js";import"./crypto-CK1x27Ua.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:Fe,common:{currency:j,labels:Re,edit:an,strings:{empty:h}},spendManagement:{billPay:ln}}=St.getLocalizedStrings(),{billDetails:a,paymentDetails:Ee}=ln,Le=({attachment:e})=>{const[w,x]=U.useState(!1),B=()=>{x(!1)},C=e.fileId?.length===0;return t.jsxs(Mn,{isDisabled:e.fileId?.length===0,"data-testid":v("attachment-tag",e.fileName),onClick:()=>C===!1?x(!0):null,children:[w&&e?.fileDownloadUrl!=null?t.jsx(qt,{title:e.fileName,file:e,onCrossClick:()=>B(),setShowFullScreenView:x}):null,t.jsx(Nn,{children:t.jsx(Yt,{contentType:e.contentType})})]})},ti=({billDetails:e,billpayApprovalView:w,isBillPayCommentingEnabled:x,currentTenant:B,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=Tt(),m=jt(),M={application:"dashboard",companyId:m.currentTenant?.companyId,tab:"bill",entityId:f},N=x&&f!=null,F=`dashboard_${m.currentTenant?.companyId}`,R=p.largeLabelWidth.value(s),E=e.saveStatus,J=e.zeniAssistRetryStatus,ee=e.vendor?.vendorCurrencyCode,o=vt(C,et,e.billPayConfigList.filter(l=>l.method.includes(e.paymentDetailsSection?.withdrawFrom?.accType??"depositAccount")),e.paymentDetailsSection?.internationalTransferFeeBearerPaymentMethod,e.paymentDetailsSection?.paymentType,ee),D=Fe.visual.MMMDCommaYYYYformat,he={amount:e.recipientTotalAmount.amount/(e.paymentDetailsSection?.conversionRate??1)*100/100,currencyCode:j.currencyCode,currencySymbol:j.currencySymbol},u={amount:o?.method.includes("international")===!0?Ct(he,o):e.recipientTotalAmount.amount+(o?.fee.amount??0),currencyCode:j.currencyCode,currencySymbol:j.currencySymbol},L={amount:o?.method.includes("international")===!0?Dt(he,o):o?.fee.amount??0,currencyCode:j.currencyCode,currencySymbol:j.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 T=e.billPayInfo?.stage,A=e.billPayInfo?.billStatus,H=e.billPayInfo?.billPaymentStatus,mt=e.billPayInfo?.billPaymentRefundStatus,te=T?.code==="paid"?T: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,q=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",T?.code??"draft",te?.code??""),pe(!0,l)},$e=()=>{xe(!0),$.trackBillPayMarkAsPaid(T?.code??"draft",te?.code??"")},gt=()=>{lt(),xe(!1)},P=g&&(T?.code!=null?T.code==="draft"||A?.code==="approved":!0),b=P&&!it,Te=Oe(b,q,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===j.currencyCode?Rt(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(Fe.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=T?.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";Te===a.scheduleBill?$.trackLowBalanceAccountSchedule(Se,Ce,De,Ie,Ae,Pe):Te===a.sendForApproval&&$.trackLowBalanceAccountSentForApproval(Se,Ce,De,Ie,Ae,Pe)}}},je=()=>{ve===!0&&Y(!1),e.isBillMarkedForRetry===!0?(ot(),$.trackRetryConfirmClick(te?.code??"",T?.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),[ve,Y]=U.useState(!1);return t.jsxs(hn,{children:[st?t.jsx(en,{onCancel:gt,onProceedForMarkAsPaid:ht,saveDetailsFetchState:E?.fetchState,paymentData:e.outsideZeniPaymentInfo}):null,ve?t.jsx(tn,{withdrawFrom:e.paymentDetailsSection?.withdrawFrom,paymentDate:e.paymentDetailsSection?.paymentDate,onOkClick:je,onCancelClick:()=>{Y(!1),ne()},onClickAway:()=>{Y(!1)}}):null,t.jsx(kt,{anchor:"right",open:rt,onClose:fe,transitionDuration:250,"data-testid":v("vendor-email-preview-drawer"),children:t.jsx(Bt,{companyName:Mt(B.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(qe,{onClick:be,"data-testid":v("review-detail-nav-bar-small-back")}),t.jsx(We,{windowSize:s,children:a.oneLastLook})]}):t.jsx(Dn,{"data-testid":v("review-details-nav-bar-back"),children:t.jsx(qe,{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(jn,{children:a.duplicateBillPayWarning}),t.jsxs(Tn,{children:[a.duplicateBillPayWarningSubHeading,t.jsxs("span",{"data-testid":v("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(vn,{children:[t.jsxs(Sn,{children:[l.attachments&&l.attachments.length>0?t.jsx(Le,{attachment:l.attachments[0]}):t.jsx(Ye,{children:t.jsx(Ve,{})}),t.jsx(K,{children:t.jsxs(t.Fragment,{children:[l.documentId!=null?a.invoiceNo:null,l.documentId]})})]}),t.jsx(Ge,{windowSize:s,children:k("0,0[.]00",l.recipientTotalAmount)})]}),t.jsxs(Fn,{"data-testid":v("review-detail-mobile-info"),onClick:()=>Q(l.id,l.billPayInfo.stage.code),children:[t.jsxs(K,{children:[l.dueDate!=null?a.due:null," ",l.dueDate?.format(D)]}),t.jsx(Ke,{children:r!=null?ke.includes(r.code)?t.jsx(Be,{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(Ve,{})}),t.jsxs(Rn,{"data-testid":v("review-detail-info"),onClick:()=>Q(l.id,l.billPayInfo.stage.code),children:[t.jsx(K,{style:{width:"50%"},children:t.jsxs("div",{children:[l.documentId!=null?a.invoiceNo:null," ",l.documentId]})}),t.jsxs(K,{style:{width:"25%"},children:[l.dueDate!=null?a.due:null," ",l.dueDate?.format(D)]}),t.jsx(Ge,{style:{width:"25%"},windowSize:s,children:k("0,0[.]00",l.amount)})]}),t.jsx(Ke,{children:r!=null?ke.includes(r.code)?t.jsx(Be,{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(Me,{amount:yt,integerStyles:V.largeMedium.cssObject,decimalStyles:V.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:F,companyId:m.currentTenant?.companyId??h,companyName:m.currentTenant?.companyName??h,dashboardOptionType:"bill",filterMetaData:{...M,entityType:`bill.details.${z("withdrawFrom")}`},children:t.jsx(W,{label:{label:a.withdrawFrom,width:R},style:{width:"auto"},value:e.paymentDetailsSection?.withdrawFrom!=null?Ft(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:F,companyId:m.currentTenant?.companyId??h,companyName:m.currentTenant?.companyName??h,dashboardOptionType:"bill",filterMetaData:{...M,entityType:`bill.details.${z("paymentType")}`},children:t.jsx(W,{label:{label:a.paymentMethod,width:R},style:{width:"auto"},value:le(o?.method??""),additionalInfoLabel:xt()})}),t.jsx(G,{}),!g&&Z!=null?t.jsxs(t.Fragment,{children:[t.jsx(O,{isThreadAllowed:N,entityId:f,dashboardTabKey:_({type:"details",key:"paymentDate"}),roomId:F,companyId:m.currentTenant?.companyId??h,companyName:m.currentTenant?.companyName??h,dashboardOptionType:"bill",filterMetaData:{...M,entityType:`bill.details.${z("paymentDate")}`},children:t.jsx(W,{label:{label:a.paymentDate,width:R},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(G,{})]}):null,g?null:t.jsx(O,{isThreadAllowed:N,entityId:f,dashboardTabKey:_({type:"details",key:"paymentTo"}),roomId:F,companyId:m.currentTenant?.companyId??h,companyName:m.currentTenant?.companyName??h,dashboardOptionType:"bill",filterMetaData:{...M,entityType:`bill.details.${z("paymentTo")}`},children:t.jsx(W,{label:{label:a.paymentTo,width:R},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:F,companyId:m.currentTenant?.companyId??h,companyName:m.currentTenant?.companyName??h,dashboardOptionType:"bill",filterMetaData:{...M,entityType:`bill.details.${z("recurringPaymentType")}`},children:t.jsx(W,{label:{label:a.paymentType,width:R},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!==j.currencyCode?Ee.conversionAmountColon:Re.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:Re.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(Me,{amount:d.toAmount(u.amount,u.currencyCode,u.currencySymbol),integerStyles:V.h6Medium.cssObject,decimalStyles:V.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,q,s)}},primaryBtn:{label:Oe(b,q,e.isBillMarkedForRetry),isLoading:E?.fetchState==="In-Progress"||J?.fetchState==="In-Progress",onClick:b?$e:()=>{bt&&ae!=null?Y(!0):je()},style:{width:ze(!0,P,b,q,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":v("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(Bn,{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,B,C)=>x?128:w&&!e&&C==="small"?"auto":B?165:p.footerButtonWidth.value(C),on=i(Xt)`
1
+ import{q as Tt,ax as jt,y,fh as vt,F as St,fi as Ct,fj as Dt,j as t,fk as It,fl as le,fm as Pt,l as d,fn as At,fo as kt,aM as v,fp as Mt,aN as k,fq as Bt,fr as Nt,fs as ke,ft as Me,fu as Be,b as V,fv as O,fw as z,fx as _,p as S,fy as Ft,fz as Rt,fA as Et,fB as Lt,c6 as Ne,o as n,aQ as Ot,u as c,aj as zt,ch as _t,B as Wt,M as Ut,fC as Ht,cx as Zt,am as se,an as de,fD as qt,fE as Yt,bn as Vt,c as Gt,b9 as Kt,ar as Xe,bQ as Xt,ai as Qe,by as Qt,fF as Jt}from"./index-CN7UAWAg.js";import{b as U,n as i}from"./vendor-Bs1fkIUX.js";import{t as en,o as tn}from"./LowBalancePopup-DzqqMGEK-DvUWGZSI.js";import{S as W}from"./LabeledText-CgI7e_L--BwhQOiOZ.js";import"./mui-Ty75qFQF.js";import"./analytics-BbBRZ6cw.js";import"./routing-Dk1A2KYI.js";import"./sentry-BE5FTzpq.js";import"./redux-CEhZD0hA.js";import"./liveblocks-8ht9CoL5.js";import"./crypto-CK1x27Ua.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:Fe,common:{currency:j,labels:Re,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":v("attachment-tag",e.fileName),onClick:()=>C===!1?x(!0):null,children:[w&&e?.fileDownloadUrl!=null?t.jsx(qt,{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=Tt(),m=jt(),B={application:"dashboard",companyId:m.currentTenant?.companyId,tab:"bill",entityId:f},N=x&&f!=null,F=`dashboard_${m.currentTenant?.companyId}`,R=p.largeLabelWidth.value(s),E=e.saveStatus,J=e.zeniAssistRetryStatus,ee=e.vendor?.vendorCurrencyCode,o=vt(C,et,e.billPayConfigList.filter(l=>l.method.includes(e.paymentDetailsSection?.withdrawFrom?.accType??"depositAccount")),e.paymentDetailsSection?.internationalTransferFeeBearerPaymentMethod,e.paymentDetailsSection?.paymentType,ee),D=Fe.visual.MMMDCommaYYYYformat,he={amount:e.recipientTotalAmount.amount/(e.paymentDetailsSection?.conversionRate??1)*100/100,currencyCode:j.currencyCode,currencySymbol:j.currencySymbol},u={amount:o?.method.includes("international")===!0?Ct(he,o):e.recipientTotalAmount.amount+(o?.fee.amount??0),currencyCode:j.currencyCode,currencySymbol:j.currencySymbol},L={amount:o?.method.includes("international")===!0?Dt(he,o):o?.fee.amount??0,currencyCode:j.currencyCode,currencySymbol:j.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(An,{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 T=e.billPayInfo?.stage,P=e.billPayInfo?.billStatus,H=e.billPayInfo?.billPaymentStatus,mt=e.billPayInfo?.billPaymentRefundStatus,te=T?.code==="paid"?T:P?.code=="approved"&&H?.code?H:P,pt=e.billPayInfo?.isRefundInitiated===!0?mt:P?.code=="approved"&&H?.code?H:P,ne=()=>{ce()},be=()=>{ce()},Z=e.paymentDetailsSection?.paymentDate,ie=le(o?.method??""),we=ie.replace("Same Day",""),ut=e.isCollectToAccountInfoFromVendorContact?t.jsx(Pt,{paymentTypeLabel:we,onClick:dt}):a.addedByZeni,q=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",T?.code??"draft",te?.code??""),pe(!0,l)},$e=()=>{xe(!0),$.trackBillPayMarkAsPaid(T?.code??"draft",te?.code??"")},gt=()=>{lt(),xe(!1)},A=g&&(T?.code!=null?T.code==="draft"||P?.code==="approved":!0),b=A&&!it,Te=Oe(b,q,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===j.currencyCode?Rt(e.paymentDetailsSection.internationalTransferFeeBearerPaymentMethod):void 0,ae=at&&e.paymentDetailsSection!=null?At(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(Fe.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=T?.code??"draft",Ce=P?.code??"",De=e.isRecurring?["Recurring"]:["One-Time"],Ie=e.invoiceNumber??"",Pe=Jt(m.loggedInUser),Ae=e.paymentDetailsSection?.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account";Te===a.scheduleBill?$.trackLowBalanceAccountSchedule(Se,Ce,De,Ie,Pe,Ae):Te===a.sendForApproval&&$.trackLowBalanceAccountSentForApproval(Se,Ce,De,Ie,Pe,Ae)}}},je=()=>{ve===!0&&Y(!1),e.isBillMarkedForRetry===!0?(ot(),$.trackRetryConfirmClick(te?.code??"",T?.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),[ve,Y]=U.useState(!1);return t.jsxs(hn,{children:[st?t.jsx(en,{onCancel:gt,onProceedForMarkAsPaid:ht,saveDetailsFetchState:E?.fetchState,paymentData:e.outsideZeniPaymentInfo}):null,ve?t.jsx(tn,{withdrawFrom:e.paymentDetailsSection?.withdrawFrom,paymentDate:e.paymentDetailsSection?.paymentDate,onOkClick:je,onCancelClick:()=>{Y(!1),ne()},onClickAway:()=>{Y(!1)}}):null,t.jsx(kt,{anchor:"right",open:rt,onClose:fe,transitionDuration:250,"data-testid":v("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(qe,{onClick:be,"data-testid":v("review-detail-nav-bar-small-back")}),t.jsx(We,{windowSize:s,children:a.oneLastLook})]}):t.jsx(Dn,{"data-testid":v("review-details-nav-bar-back"),children:t.jsx(qe,{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(jn,{children:a.duplicateBillPayWarning}),t.jsxs(Tn,{children:[a.duplicateBillPayWarningSubHeading,t.jsxs("span",{"data-testid":v("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(vn,{children:[t.jsxs(Sn,{children:[l.attachments&&l.attachments.length>0?t.jsx(Le,{attachment:l.attachments[0]}):t.jsx(Ye,{children:t.jsx(Ve,{})}),t.jsx(K,{children:t.jsxs(t.Fragment,{children:[l.documentId!=null?a.invoiceNo:null,l.documentId]})})]}),t.jsx(Ge,{windowSize:s,children:k("0,0[.]00",l.recipientTotalAmount)})]}),t.jsxs(Fn,{"data-testid":v("review-detail-mobile-info"),onClick:()=>Q(l.id,l.billPayInfo.stage.code),children:[t.jsxs(K,{children:[l.dueDate!=null?a.due:null," ",l.dueDate?.format(D)]}),t.jsx(Ke,{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(Ye,{children:t.jsx(Ve,{})}),t.jsxs(Rn,{"data-testid":v("review-detail-info"),onClick:()=>Q(l.id,l.billPayInfo.stage.code),children:[t.jsx(K,{style:{width:"50%"},children:t.jsxs("div",{children:[l.documentId!=null?a.invoiceNo:null," ",l.documentId]})}),t.jsxs(K,{style:{width:"25%"},children:[l.dueDate!=null?a.due:null," ",l.dueDate?.format(D)]}),t.jsx(Ge,{style:{width:"25%"},windowSize:s,children:k("0,0[.]00",l.amount)})]}),t.jsx(Ke,{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:V.largeMedium.cssObject,decimalStyles:V.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:F,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:R},style:{width:"auto"},value:e.paymentDetailsSection?.withdrawFrom!=null?Ft(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:F,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:R},style:{width:"auto"},value:le(o?.method??""),additionalInfoLabel:xt()})}),t.jsx(G,{}),!g&&Z!=null?t.jsxs(t.Fragment,{children:[t.jsx(O,{isThreadAllowed:N,entityId:f,dashboardTabKey:_({type:"details",key:"paymentDate"}),roomId:F,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:R},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(G,{})]}):null,g?null:t.jsx(O,{isThreadAllowed:N,entityId:f,dashboardTabKey:_({type:"details",key:"paymentTo"}),roomId:F,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:R},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:F,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:R},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!==j.currencyCode?Ee.conversionAmountColon:Re.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:Re.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:V.h6Medium.cssObject,decimalStyles:V.standardMedium.cssObject})})]})}):null]}),t.jsx(Ot,{cancelBtn:{label:A&&!b?a.paymentOutsideZeni.markAsPaid:a.editBill,onClick:A&&!b?$e:ne,style:{width:ze(!1,A,b,q,s)}},primaryBtn:{label:Oe(b,q,e.isBillMarkedForRetry),isLoading:E?.fetchState==="In-Progress"||J?.fetchState==="In-Progress",onClick:b?$e:()=>{bt&&ae!=null?Y(!0):je()},style:{width:ze(!0,A,b,q,s)}},rightSideComponent:A&&!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":v("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)`
2
2
  width: ${n.sp3};
3
3
  height: ${n.sp3};
4
4
  color: ${e=>e.theme.colors.hero};
@@ -152,11 +152,11 @@ import{q as Tt,ax as jt,y,fh as vt,F as St,fi as Ct,fj as Dt,j as t,fk as It,fl
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
+ `,An=i.span`
160
160
  display: flex;
161
161
  align-items: center;
162
162
  margin-left: ${n.sp2};
@@ -168,7 +168,7 @@ import{q as Tt,ax as jt,y,fh as vt,F as St,fi as Ct,fj as Dt,j as t,fk as It,fl
168
168
  flex-wrap: wrap;
169
169
  justify-content: center;
170
170
  align-items: center;
171
- `,Bn=i.a`
171
+ `,Mn=i.a`
172
172
  color: ${e=>e.theme.colors.grey1};
173
173
  text-decoration: underline;
174
174
  margin-right: ${n.sp1};
@@ -176,7 +176,7 @@ import{q as Tt,ax as jt,y,fh as vt,F as St,fi as Ct,fj as Dt,j as t,fk as It,fl
176
176
  &:hover {
177
177
  color: ${e=>e.theme.colors.primary};
178
178
  }
179
- `,Mn=i.div`
179
+ `,Bn=i.div`
180
180
  cursor: ${e=>e.isDisabled?"default":"pointer"};
181
181
  display: flex;
182
182
  flex-direction: row;
@@ -1,30 +1,30 @@
1
- import{q as M,j as e,aM as m,o as r,aQ as L,y as d,_ as P,B as C,M as W,p as s,am as $,cQ as R,L as D,ai as j,bm as I,u as n,eD as G,r as q,j7 as A,kk as F}from"./index-BtlpidgV.js";import{n as t}from"./vendor-Bs1fkIUX.js";const l={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])},Q={title:new C("h6Regular","h5Regular")},mi=({title:i,description:p,reviewItems:S,showFooter:b,footerProps:{primaryButton:z,cancelButton:T,hideCancel:E},onCloseOverlay:k,onCloseReviewItem:B})=>{const a=M();return e.jsxs(H,{children:[e.jsx(X,{windowSize:a,children:e.jsx(Y,{children:e.jsx(Z,{windowSize:a,children:e.jsx(ii,{children:e.jsx(ei,{onClick:k,"data-testid":m("review-overlay-close",i)})})})})}),e.jsxs(J,{windowSize:a,children:[e.jsxs(O,{windowSize:a,children:[e.jsx(U,{children:e.jsx(K,{windowSize:a,children:i})}),e.jsx(N,{isError:p.isError,windowSize:a,children:p.content})]}),e.jsx(V,{windowSize:a,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:()=>B(o.id),"data-testid":m("review-close",o.id)}):null,e.jsxs(ti,{children:[e.jsxs(ni,{children:[e.jsx(di,{children:_(o)}),e.jsxs(oi,{children:[e.jsxs(x,{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(x,{children:[e.jsx(si,{style:{marginLeft:r.sp2},children:o.leftSideText.subTitle}),a!=="small"?e.jsxs(w,{windowSize:a,children:[e.jsx(g,{isError:h,isWarning:c,children:e.jsxs(e.Fragment,{children:[o.rightSideText.showThunderIcon===!0?e.jsx(f,{children:e.jsx(y,{})}):null,o.rightSideText.subTitle]})}),e.jsx(g,{isWarning:!0,isError:!1,children:o.rightSideText.additonalInfo})]}):null]})]})]}),a==="small"?e.jsxs(w,{windowSize:a,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(y,{})}):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]})},_=i=>i.reviewStatus.isLoading?e.jsx(D,{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(ai,{}):i.reviewStatus.code==="low-balance"?e.jsx(hi,{}):e.jsx(li,{}),H=t.div`
1
+ import{q as M,j as e,aM as m,o as r,aQ as L,y as d,L as P,B as C,M as W,p as s,am as $,cQ as R,k as D,ai as j,bm as I,u as n,eD as G,r as q,j7 as A,kk as F}from"./index-CN7UAWAg.js";import{n as t}from"./vendor-Bs1fkIUX.js";const l={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])},Q={title:new C("h6Regular","h5Regular")},mi=({title:i,description:p,reviewItems:S,showFooter:b,footerProps:{primaryButton:z,cancelButton:T,hideCancel:E},onCloseOverlay:k,onCloseReviewItem:B})=>{const a=M();return e.jsxs(J,{children:[e.jsx(X,{windowSize:a,children:e.jsx(Y,{children:e.jsx(_,{windowSize:a,children:e.jsx(ii,{children:e.jsx(ei,{onClick:k,"data-testid":m("review-overlay-close",i)})})})})}),e.jsxs(O,{windowSize:a,children:[e.jsxs(Z,{windowSize:a,children:[e.jsx(K,{children:e.jsx(N,{windowSize:a,children:i})}),e.jsx(U,{isError:p.isError,windowSize:a,children:p.content})]}),e.jsx(V,{windowSize:a,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:()=>B(o.id),"data-testid":m("review-close",o.id)}):null,e.jsxs(ti,{children:[e.jsxs(ni,{children:[e.jsx(di,{children:H(o)}),e.jsxs(oi,{children:[e.jsxs(x,{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(x,{children:[e.jsx(si,{style:{marginLeft:r.sp2},children:o.leftSideText.subTitle}),a!=="small"?e.jsxs(w,{windowSize:a,children:[e.jsx(g,{isError:h,isWarning:c,children:e.jsxs(e.Fragment,{children:[o.rightSideText.showThunderIcon===!0?e.jsx(f,{children:e.jsx(y,{})}):null,o.rightSideText.subTitle]})}),e.jsx(g,{isWarning:!0,isError:!1,children:o.rightSideText.additonalInfo})]}):null]})]})]}),a==="small"?e.jsxs(w,{windowSize:a,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(y,{})}):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]})},H=i=>i.reviewStatus.isLoading?e.jsx(D,{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(ai,{}):i.reviewStatus.code==="low-balance"?e.jsx(hi,{}):e.jsx(li,{}),J=t.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  background-color: ${i=>i.theme.colors.grey4};
5
- `,J=t.div`
5
+ `,O=t.div`
6
6
  min-height: 100vh;
7
7
  display: flex;
8
8
  flex-direction: column;
9
9
  margin-top: ${i=>l.containerMarginTop.valuePx(i.windowSize)};
10
10
  margin-bottom: ${r.sp8};
11
- `,O=t.div`
11
+ `,Z=t.div`
12
12
  position: sticky;
13
13
  top: ${r.sp0};
14
14
  background-color: ${i=>i.theme.colors.grey4};
15
15
  z-index: 1;
16
16
  padding-left: ${i=>l.containerMarginLeft.valuePx(i.windowSize)};
17
17
  padding-right: ${i=>l.containerMarginRight.valuePx(i.windowSize)};
18
- `,U=t.div`
18
+ `,K=t.div`
19
19
  display: flex;
20
20
  align-items: center;
21
- `,K=t(W)`
21
+ `,N=t(W)`
22
22
  ${i=>`${Q.title.style(i.windowSize)}`};
23
23
  color: ${i=>i.theme.colors.primary};
24
24
  margin-top: ${r.sp2};
25
25
  margin-bottom: ${i=>l.titleMarginBotom.valuePx(i.windowSize)};
26
26
  margin-right: ${i=>l.titleMarginRight.valuePx(i.windowSize)};
27
- `,N=t($)`
27
+ `,U=t($)`
28
28
  margin-bottom: ${i=>l.subTitleMarginBottom.valuePx(i.windowSize)};
29
29
  color: ${i=>i.isError?s.important:i.theme.colors.hero};
30
30
  `,V=t.div`
@@ -43,7 +43,7 @@ import{q as M,j as e,aM as m,o as r,aQ as L,y as d,_ as P,B as C,M as W,p as s,a
43
43
  `,Y=t.div`
44
44
  position: relative;
45
45
  min-height: 62px;
46
- `,Z=t.div`
46
+ `,_=t.div`
47
47
  display: flex;
48
48
  flex-direction: row;
49
49
  align-items: center;
@@ -0,0 +1,22 @@
1
+ import{f5 as h,f6 as x,j as t,c6 as m,o as n,aM as o,F as g,ao as j,ai as p}from"./index-CN7UAWAg.js";import{n as r}from"./vendor-Bs1fkIUX.js";const{hyphen:a}=g.getLocalizedStrings().common.strings,f=r.div``,y=r.div`
2
+ display: flex;
3
+ min-width: 192px;
4
+ justify-content: space-between;
5
+ `,u=r(p)`
6
+ color: ${e=>e.theme.colors.hero};
7
+ `,w=r(p)`
8
+ color: ${e=>e.theme.colors.brandColorPearl};
9
+ `,d=r.div`
10
+ display: flex;
11
+ align-items: center;
12
+ `,b=r(j)`
13
+ border-radius: ${n.sp12};
14
+ border: 1px solid ${e=>e.theme.colors.grey1};
15
+ display: flex;
16
+ height: 18px;
17
+ width: 18px;
18
+ align-items: center;
19
+ justify-content: center;
20
+ color: 1px solid ${e=>e.theme.colors.grey1};
21
+ margin-left: ${n.sp1};
22
+ `,F=({roles:e})=>{let s=a,l=[];s=h(e),l=x(e);const c=()=>l.length>0?t.jsx(f,{children:l.map(i=>t.jsxs(y,{children:[t.jsx(u,{children:i[0]}),t.jsx(w,{children:i[1]})]},i.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:n.sp1,padding:"6px 12px"},maxWidth:"264px",children:t.jsxs(d,{"data-testid":o("roles-label-wrapper",s),children:[s,t.jsx(b,{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{F as T};
@@ -1,14 +1,14 @@
1
- import{aP as H,l as me,iz as ee,gS as fe,eS as we,iA as Je,aa as Me,iB as Ve,cT as Pe,cU as _e,j as a,F as xe,ad as Fe,cE as qe,cF as Ne,cG as Be,aQ as Re,iC as We,iD as Ue,ab as he,iE as Se,iF as ze,d4 as $e,q as Ge,iT as He,gX as re,u as R,p as De,y as Ce,cW as Ke,iG as Qe,iH as Xe,iI as Ye,o as P}from"./index-BtlpidgV.js";import{b as m,n as U}from"./vendor-Bs1fkIUX.js";import{i as Ze,r as et,n as tt,o as lt}from"./ScheduleSequenceTable-DDYFTEg4-CSy2E-uq.js";import"./mui-Ty75qFQF.js";import"./analytics-BbBRZ6cw.js";import"./routing-Dk1A2KYI.js";import"./sentry-BE5FTzpq.js";import"./redux-CEhZD0hA.js";import"./liveblocks-8ht9CoL5.js";import"./crypto-CK1x27Ua.js";const W={labelWidth:new Ce(160,160,160),depCategoryLabelWidth:new Ce(200,280,280)},at=U.div`
1
+ import{aP as H,l as me,iz as ee,gS as fe,eS as we,iA as Je,aa as Me,iB as Ve,cT as _e,cU as Pe,j as a,F as be,ad as Fe,cE as qe,cF as Ne,cG as Be,aQ as Re,iC as We,iD as Ue,ab as he,iE as Se,iF as ze,d4 as $e,q as Ge,iT as He,gX as re,u as R,p as De,y as Ce,cW as Ke,iG as Qe,iH as Xe,iI as Ye,o as _}from"./index-CN7UAWAg.js";import{b as m,n as U}from"./vendor-Bs1fkIUX.js";import{i as Ze,r as et,n as tt,o as lt}from"./ScheduleSequenceTable-ClzxD7gh-DTqJnrdA.js";import"./mui-Ty75qFQF.js";import"./analytics-BbBRZ6cw.js";import"./routing-Dk1A2KYI.js";import"./sentry-BE5FTzpq.js";import"./redux-CEhZD0hA.js";import"./liveblocks-8ht9CoL5.js";import"./crypto-CK1x27Ua.js";const W={labelWidth:new Ce(160,160,160),depCategoryLabelWidth:new Ce(200,280,280)},at=U.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  width: 100%;
5
5
  background-color: ${t=>t.theme.colors.grey5};
6
6
  border: 1px solid ${t=>t.theme.colors.grey3};
7
7
 
8
- border-top-left-radius: ${P.sp2};
9
- border-top-right-radius: ${P.sp2};
10
- border-bottom-left-radius: ${P.sp0};
11
- border-bottom-right-radius: ${P.sp0};
8
+ border-top-left-radius: ${_.sp2};
9
+ border-top-right-radius: ${_.sp2};
10
+ border-bottom-left-radius: ${_.sp0};
11
+ border-bottom-right-radius: ${_.sp0};
12
12
  `,K=U.div`
13
13
  display: flex;
14
14
  flex: 1;
@@ -17,8 +17,8 @@ import{aP as H,l as me,iz as ee,gS as fe,eS as we,iA as Je,aa as Me,iB as Ve,cT
17
17
  `,st=U.div`
18
18
  display: flex;
19
19
  flex-direction: column;
20
- margin: ${P.sp4} ${P.sp8} ${P.sp0} ${P.sp8};
21
- `,V=(t,d)=>`${t}.${d}`;function ot({sectionId:t,jeScheduledTransaction:d,updateStatus:y,allAccountOptions:l,allAccountList:s,allClassList:u,allClassOptions:c,allDepreciationAccountList:p,allDepreciationAccountOptions:g,allMonthOptions:v,uncategorizedAccounts:k,selectedAccount:O,selectedClass:_,selectedAccumulatedDepreciationCategory:F,assetId:L,selectedDate:w,selectedMonths:T,selectedPostingDay:E,lastDayOfMonth:A,isDisabled:h,allowCreateSchedule:J,onCreateSchedule:i,onDelete:ae,onMarkAsComplete:X}){const{resetField:f}=$e(),se=V(t,"scheduleExpenseCategory"),oe=V(t,"scheduleClass"),ne=V(t,"accumulatedDepreciationCategory"),de=V(t,"assetId"),Y=V(t,"startDate"),S=V(t,"postingDate"),r=V(t,"months"),e=xe.getLocalizedStrings().jeSchedules.scheduleDetails.scheduleDetailsSection,x=o=>s.filter(N=>N.qboId===o)[0]?.qboId,b=o=>p.filter(N=>N.qboId===o)[0]?.qboId,ie=o=>u.filter(N=>N.classId===o)[0]?.accountingClassNumber,Q={valueContainer:o=>({...o,overflow:"unset"})},I=Ge(),z=He({startDate:d.baseTransaction.date,endDate:d.baseTransaction.date.add(1,"year")}),$=()=>{f(S)},G=E==null&&A==null?void 0:A===!0?"lastDayOfMonth":"day",q=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:y==="In-Progress",onMarkAsComplete:X,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:W.labelWidth.value(I)},groupedSingleSelectField:{customPlaceholderColor:D.includes("debit_category_deleted")?De.brandColorGoldDark:void 0,shouldShowChevronIcon:!1,name:se,placeholder:e.expenseCategoryPlaceholder,valueToId:o=>x(o),defaultValue:{selectedOption:O,allOptions:l},registerOptions:{required:!0,validate:o=>!!o.selectedOption},customStyleConfig:Q},disableCurrentOption:q,style:{borderTopLeftRadius:R[2],borderTopRightRadius:R[2]}}),a.jsx(K,{}),a.jsx(re,{isDisabled:h,isLoading:!1,label:{label:e.class,width:W.labelWidth.value(I)},groupedSingleSelectField:{shouldShowChevronIcon:!1,name:oe,placeholder:e.classPlaceholder,valueToId:o=>ie(o),defaultValue:{selectedOption:_,allOptions:c},registerOptions:{required:!0,validate:o=>!!o.selectedOption},customStyleConfig:Q},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:W.depCategoryLabelWidth.value(I)},groupedSingleSelectField:{customPlaceholderColor:D.includes("credit_category_deleted")?De.brandColorGoldDark:void 0,shouldShowChevronIcon:!1,name:ne,placeholder:e.accumulatedDepreciationCategoryPlaceholder,valueToId:o=>b(o),defaultValue:{selectedOption:F,allOptions:g},registerOptions:{required:!0,validate:o=>!!o.selectedOption},customStyleConfig:Q},disableCurrentOption:q,style:{borderTopLeftRadius:R[0],borderTopRightRadius:R[0]}}),a.jsx(K,{}),a.jsx(Ke,{label:{label:e.assetId,width:W.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(Qe,{label:{label:e.startMonth,width:W.labelWidth.value(I)},monthSelectorField:{name:Y,placeholder:e.startMonthPlaceholder,defaultValue:w,showDownChevron:!1,isDisabled:h,monthsAndYears:z},isDisabled:h}),a.jsx(K,{}),a.jsx(lt,{label:{label:e.postingDate,width:W.labelWidth.value(I)},isDisabled:h,dayOfMonthField:{placeholder:e.postingDatePlaceholder,name:S,defaultValue:{type:G,dayOfMonth:E},onSaveClick:()=>{},onCancelClick:$}}),a.jsx(K,{}),a.jsx(Xe,{label:{label:e.months,width:W.labelWidth.value(I)},singleSelectNumericField:{name:r,isDisabled:h,placeholder:e.monthsPlaceholder,defaultValue:{selectedOption:T!=null?v[T-1]:void 0,allOptions:v},registerOptions:{required:!0,validate:o=>!!o.selectedOption}}})]})}),a.jsx(he,{controller:J===!1,children:a.jsx(Ye,{text:e.scheduleMarkedAsCompleted})})]})}const nt=U.div`
20
+ margin: ${_.sp4} ${_.sp8} ${_.sp0} ${_.sp8};
21
+ `,V=(t,d)=>`${t}.${d}`;function ot({sectionId:t,jeScheduledTransaction:d,updateStatus:y,allAccountOptions:l,allAccountList:s,allClassList:u,allClassOptions:c,allDepreciationAccountList:p,allDepreciationAccountOptions:g,allMonthOptions:v,uncategorizedAccounts:k,selectedAccount:O,selectedClass:P,selectedAccumulatedDepreciationCategory:F,assetId:L,selectedDate:w,selectedMonths:T,selectedPostingDay:E,lastDayOfMonth:A,isDisabled:h,allowCreateSchedule:J,onCreateSchedule:i,onDelete:ae,onMarkAsComplete:X}){const{resetField:f}=$e(),se=V(t,"scheduleExpenseCategory"),oe=V(t,"scheduleClass"),ne=V(t,"accumulatedDepreciationCategory"),de=V(t,"assetId"),Y=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,Q={valueContainer:o=>({...o,overflow:"unset"})},I=Ge(),z=He({startDate:d.baseTransaction.date,endDate:d.baseTransaction.date.add(1,"year")}),$=()=>{f(S)},G=E==null&&A==null?void 0:A===!0?"lastDayOfMonth":"day",q=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:y==="In-Progress",onMarkAsComplete:X,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:W.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:O,allOptions:l},registerOptions:{required:!0,validate:o=>!!o.selectedOption},customStyleConfig:Q},disableCurrentOption:q,style:{borderTopLeftRadius:R[2],borderTopRightRadius:R[2]}}),a.jsx(K,{}),a.jsx(re,{isDisabled:h,isLoading:!1,label:{label:e.class,width:W.labelWidth.value(I)},groupedSingleSelectField:{shouldShowChevronIcon:!1,name:oe,placeholder:e.classPlaceholder,valueToId:o=>ie(o),defaultValue:{selectedOption:P,allOptions:c},registerOptions:{required:!0,validate:o=>!!o.selectedOption},customStyleConfig:Q},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:W.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:F,allOptions:g},registerOptions:{required:!0,validate:o=>!!o.selectedOption},customStyleConfig:Q},disableCurrentOption:q,style:{borderTopLeftRadius:R[0],borderTopRightRadius:R[0]}}),a.jsx(K,{}),a.jsx(Ke,{label:{label:e.assetId,width:W.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(Qe,{label:{label:e.startMonth,width:W.labelWidth.value(I)},monthSelectorField:{name:Y,placeholder:e.startMonthPlaceholder,defaultValue:w,showDownChevron:!1,isDisabled:h,monthsAndYears:z},isDisabled:h}),a.jsx(K,{}),a.jsx(lt,{label:{label:e.postingDate,width:W.labelWidth.value(I)},isDisabled:h,dayOfMonthField:{placeholder:e.postingDatePlaceholder,name:S,defaultValue:{type:G,dayOfMonth:E},onSaveClick:()=>{},onCancelClick:$}}),a.jsx(K,{}),a.jsx(Xe,{label:{label:e.months,width:W.labelWidth.value(I)},singleSelectNumericField:{name:r,isDisabled:h,placeholder:e.monthsPlaceholder,defaultValue:{selectedOption:T!=null?v[T-1]:void 0,allOptions:v},registerOptions:{required:!0,validate:o=>!!o.selectedOption}}})]})}),a.jsx(he,{controller:J===!1,children:a.jsx(Ye,{text:e.scheduleMarkedAsCompleted})})]})}const nt=U.div`
22
22
  display: flex;
23
23
  flex-direction: column;
24
24
  width: 100%;
@@ -34,4 +34,4 @@ import{aP as H,l as me,iz as ee,gS as fe,eS as we,iA as Je,aa as Me,iB as Ve,cT
34
34
  `,ct=U.div`
35
35
  display: flex;
36
36
  justify-content: center;
37
- `,ye="scheduleDetailsPage",te="scheduleDetailsFixedAssetsSection",le="scheduleDetailsListSection",rt=xe.getLocalizedStrings(),{common:M,jeSchedules:{scheduleDetails:ut}}=rt;function Et({analytics:t,controllerUserDetails:d,expenseAutomationSelectedPeriod:y,scheduleDetailsView:l,vendorSearchAutoCompleteActions:s,vendorSearchAutoCompleteData:u,usedInExpenseAutomation:c,onNavigateBack:p,onEditAmount:g,onJELinkClick:v,onSave:k,onDelete:O,onDetailPageChange:_,onViewLinkedJE:F,onTransactionClick:L,onMarkAsComplete:w,removeJeScheduleTransactionKey:T}){const[E,A]=m.useState(!1),h=H(l.updateStatus.fetchState),J=H(l.selectedJEScheduleTransaction?.status.code),i=H(l.deleteStatus.fetchState),[ae,X]=m.useState(!1),f=l.scheduleDetailsLocalData.fixed_assets,se=H(f.jeScheduleDetails.length),oe=H(f.selectedDate),ne=H(f.selectedDayOfMonth),[de,Y]=m.useState(!0),S=l.selectedJEScheduleTransaction?.vendor,r=l.selectedJEScheduleTransaction?.baseTransaction,e=l.selectedJEScheduleTransaction,x=me.getFirstControllerEmail(d.controllers),b=me.getFirstControllerId(d.controllerUserIds),ie={onOkClick:()=>{A(!1),p()},onCancelClick:()=>{A(!1)}},Q=n=>{const C=e?.scheduledJournalEntry[n];r!=null&&C!=null&&e!=null&&t.trackScheduleDetailsLinkJournalEntry({scheduleType:"fixed_assets",transaction:{...ze(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:x,controllerUserIds:b,fixedAssetsDetails:{accumulatedDepreciationCategory:e.jeCredit.account?.accountName??null,assetId:e.otherAttributes.assetId??null}}),v(n)},I=(n,C)=>{const j=e?.scheduledJournalEntry[C];r!=null&&j!=null&&e!=null&&t.trackScheduleDetailsViewJournalEntry({scheduleType:"fixed_assets",scheduleExpenseCategoryAndClass:{expenseCategory:e.jeDebit.account?.accountName??null,expenseClass:e.jeDebit.accountingClass?.className??null},journalEntryDetails:Se(j),controllerEmails:x,controllerUserIds:b,fixedAssetsDetails:{accumulatedDepreciationCategory:e.jeCredit.account?.accountName??null,assetId:e.otherAttributes.assetId??null}}),F(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:x,controllerUserIds:b})),c===!0&&e?.jeScheduleTransactionKey!=null&&J==="draft"&&l.selectedJEScheduleTransaction?.status.code==="ongoing"&&T(e.jeScheduleTransactionKey,{month:y.month,year:y.year}),p())},[y,J,l.selectedJEScheduleTransaction?.status.code,t,p,h,T,c,l.updateStatus,e,r,S,x,b]),m.useEffect(()=>{i==="In-Progress"&&l.deleteStatus.fetchState==="Completed"&&p()},[i,l.deleteStatus,p]);const z=fe(l.accountListNestedAccountHierarchy),$=fe(l.allDepreciationAccountListNestedAccountHierarchy),G=we(l.classListNestedAccountHierarchy),q=Je("fixed_assets"),Z=m.useRef(),D=Me({mode:"all",reValidateMode:"onChange",defaultValues:ue(l,z,G,$,q,u.entityAutoCompleteView),resetOptions:{keepDirtyValues:!0,keepErrors:!0},values:ue(l,z,G,$,q,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},be=D.handleSubmit(()=>{k(l.selectedJEScheduleTransaction?.jeScheduleId)}),ve=async(n,C)=>{const j=C[te].vendor;if(n.includes("vendor")){const ce=j?.defaultOptions.map(B=>B.value);if(j?.selectedOption!=null&&ce?.includes(j.selectedOption)!==!0){const B=u.entityAutoCompleteView.vendor.find(Le=>Le.id===j.selectedOption);B!=null&&D.setValue("scheduleDetailsFixedAssetsSection.vendor.defaultOptions",[{label:B.name??"",value:B.id}])}}const ke=n.includes("amount");if(_(C,ke),n.includes("amount")){const ce=n.split(".")[1],B=parseInt(ce);X(!0),g(B,l.selectedJEScheduleTransaction?.jeScheduleId)}};m.useEffect(()=>{const n=D.watch((C,{name:j})=>{j!=null&&C!=null&&Pe(()=>ve(j,C))});return()=>{n.unsubscribe()}}),m.useEffect(()=>{(se!==f.jeScheduleDetails.length||oe!==f.selectedDate||ne!==f.selectedDayOfMonth)&&ae===!0&&(D.resetField(le,{defaultValue:ue(l,z,G,$,q,u.entityAutoCompleteView)[le],keepDirty:!1}),X(!1))},[f.jeScheduleDetails.length,f.selectedDate,f.selectedDayOfMonth]),m.useEffect(()=>{l.selectedJEScheduleTransaction?.status.code==="marked_as_completed"&&Y(!1)},[l.selectedJEScheduleTransaction?.status.code]);const pe=(_e(D.formState.dirtyFields)||l.selectedJEScheduleTransaction?.status.code==="draft")&&f.jeScheduleDetails.length>0,Ee=()=>{pe===!0?A(!0):(r!=null&&e!=null&&t.trackScheduleDetailsCanceled(ee({jeScheduleTransaction:e,scheduleTab:"fixed_assets",transaction:r,vendor:S,controllerEmails:x,controllerUserIds:b})),p())},Ae=()=>{l.selectedJEScheduleTransaction!=null&&L({id:l.selectedJEScheduleTransaction.baseTransaction.id,type:l.selectedJEScheduleTransaction.baseTransaction.type})},je=m.useCallback(()=>{Y(!0)},[]),Oe=m.useCallback(()=>{r!=null&&e!=null&&t.trackScheduleDetailsMarkedAsCompleted(ee({jeScheduleTransaction:e,scheduleTab:"fixed_assets",transaction:r,vendor:S,controllerEmails:x,controllerUserIds:b})),w()},[t,x,b,e,w,r,S]),Te=m.useCallback(n=>{r!=null&&e!=null&&t.trackScheduleDetailsDeleted(ee({jeScheduleTransaction:e,scheduleTab:"fixed_assets",transaction:r,vendor:S,controllerEmails:x,controllerUserIds:b})),O(n)},[t,x,b,e,O,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:Ae}),a.jsx(dt,{children:a.jsx(Fe,{...D,children:a.jsxs("form",{style:{width:"100%"},id:ge(ye),onSubmit:be,children:[a.jsx(pt,{vendorLoadOptions:N,vendorField:o,vendorSearchAutoCompleteActions:s,vendorSearchAutoCompleteData:u,scheduleDetailsView:l,allAccountOptions:z,allClassOptions:G,allMonthOptions:q,allDepAccountOptions:$,onEditAmount:g,onDelete:Te,onJELinkClick:Q,onViewLinkedJE:I,onMarkAsComplete:Oe,allowCreateSchedule:de,onCreateSchedule:je}),E===!0?a.jsx(qe,{titleComponent:a.jsx(Be,{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:ge(ye),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:()=>{A(!0)},style:{minWidth:"82px"}}}):null]})})})]})}function ht({onNavigateBack:t,onTransactionClick:d,title:y}){return a.jsx(Ue,{title:y,tooltipTextOnLaunch:ut.showTransactionTooltip,onBackClick:t,onLaunchClick:d,style:{zIndex:3}})}function pt({vendorField:t,vendorLoadOptions:d,vendorSearchAutoCompleteActions:y,vendorSearchAutoCompleteData:l,scheduleDetailsView:s,allAccountOptions:u,allClassOptions:c,allDepAccountOptions:p,allMonthOptions:g,allowCreateSchedule:v,onCreateSchedule:k,onEditAmount:O,onDelete:_,onJELinkClick:F,onViewLinkedJE:L,onMarkAsComplete:w}){const T=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:y,vendorSearchAutoCompleteData:l,errors:T,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:g,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:_,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:O,onJELinkClick:F,onViewLinkedJE:L,jeScheduleId:s.selectedJEScheduleTransaction.baseTransaction.id})})]}):null}const ge=t=>`${t}_form`,ue=(t,d,y,l,s,u)=>{const c=t.scheduleDetailsLocalData.fixed_assets,p=c.selectedAccount,g=c.selectedVendor,v=g!=null?u.vendor.find(i=>i.zeniId===g.id):void 0,k=p!=null?t.allAccountList.find(i=>i.accountId===p):void 0,O=c.selectedAccumulatedDepreciationCategory,_=O!=null?t.allDepreciationAccountList.find(i=>i.accountId===O):void 0,F=c.assetId,L=c.selectedClass,w=L!=null?t.allClassList.find(i=>i.classId===L):void 0,T=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})),A=c.selectedDayOfMonth,h=c.lastDayOfMonth,J=A==null&&h==null?void 0:h===!0?"lastDayOfMonth":"day";return{[te]:{scheduleExpenseCategory:{selectedOption:k?.qboId,allOptions:d},accumulatedDepreciationCategory:{selectedOption:_?.qboId,allOptions:l},assetId:F,scheduleClass:{selectedOption:w?.classId,allOptions:y},startDate:c.selectedDate,months:{selectedOption:T,allOptions:s},vendor:{selectedOption:v?.id??g?.id,defaultOptions:We(u,v??g)},postingDate:{type:J,dayOfMonth:A}},[le]:E}};export{Et as default};
37
+ `,ye="scheduleDetailsPage",te="scheduleDetailsFixedAssetsSection",le="scheduleDetailsListSection",rt=be.getLocalizedStrings(),{common:M,jeSchedules:{scheduleDetails:ut}}=rt;function Et({analytics:t,controllerUserDetails:d,expenseAutomationSelectedPeriod:y,scheduleDetailsView:l,vendorSearchAutoCompleteActions:s,vendorSearchAutoCompleteData:u,usedInExpenseAutomation:c,onNavigateBack:p,onEditAmount:g,onJELinkClick:v,onSave:k,onDelete:O,onDetailPageChange:P,onViewLinkedJE:F,onTransactionClick:L,onMarkAsComplete:w,removeJeScheduleTransactionKey:T}){const[E,A]=m.useState(!1),h=H(l.updateStatus.fetchState),J=H(l.selectedJEScheduleTransaction?.status.code),i=H(l.deleteStatus.fetchState),[ae,X]=m.useState(!1),f=l.scheduleDetailsLocalData.fixed_assets,se=H(f.jeScheduleDetails.length),oe=H(f.selectedDate),ne=H(f.selectedDayOfMonth),[de,Y]=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:()=>{A(!1),p()},onCancelClick:()=>{A(!1)}},Q=n=>{const C=e?.scheduledJournalEntry[n];r!=null&&C!=null&&e!=null&&t.trackScheduleDetailsLinkJournalEntry({scheduleType:"fixed_assets",transaction:{...ze(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 j=e?.scheduledJournalEntry[C];r!=null&&j!=null&&e!=null&&t.trackScheduleDetailsViewJournalEntry({scheduleType:"fixed_assets",scheduleExpenseCategoryAndClass:{expenseCategory:e.jeDebit.account?.accountName??null,expenseClass:e.jeDebit.accountingClass?.className??null},journalEntryDetails:Se(j),controllerEmails:b,controllerUserIds:x,fixedAssetsDetails:{accumulatedDepreciationCategory:e.jeCredit.account?.accountName??null,assetId:e.otherAttributes.assetId??null}}),F(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"&&T(e.jeScheduleTransactionKey,{month:y.month,year:y.year}),p())},[y,J,l.selectedJEScheduleTransaction?.status.code,t,p,h,T,c,l.updateStatus,e,r,S,b,x]),m.useEffect(()=>{i==="In-Progress"&&l.deleteStatus.fetchState==="Completed"&&p()},[i,l.deleteStatus,p]);const z=fe(l.accountListNestedAccountHierarchy),$=fe(l.allDepreciationAccountListNestedAccountHierarchy),G=we(l.classListNestedAccountHierarchy),q=Je("fixed_assets"),Z=m.useRef(),D=Me({mode:"all",reValidateMode:"onChange",defaultValues:ue(l,z,G,$,q,u.entityAutoCompleteView),resetOptions:{keepDirtyValues:!0,keepErrors:!0},values:ue(l,z,G,$,q,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 j=C[te].vendor;if(n.includes("vendor")){const ce=j?.defaultOptions.map(B=>B.value);if(j?.selectedOption!=null&&ce?.includes(j.selectedOption)!==!0){const B=u.entityAutoCompleteView.vendor.find(Le=>Le.id===j.selectedOption);B!=null&&D.setValue("scheduleDetailsFixedAssetsSection.vendor.defaultOptions",[{label:B.name??"",value:B.id}])}}const ke=n.includes("amount");if(P(C,ke),n.includes("amount")){const ce=n.split(".")[1],B=parseInt(ce);X(!0),g(B,l.selectedJEScheduleTransaction?.jeScheduleId)}};m.useEffect(()=>{const n=D.watch((C,{name:j})=>{j!=null&&C!=null&&_e(()=>ve(j,C))});return()=>{n.unsubscribe()}}),m.useEffect(()=>{(se!==f.jeScheduleDetails.length||oe!==f.selectedDate||ne!==f.selectedDayOfMonth)&&ae===!0&&(D.resetField(le,{defaultValue:ue(l,z,G,$,q,u.entityAutoCompleteView)[le],keepDirty:!1}),X(!1))},[f.jeScheduleDetails.length,f.selectedDate,f.selectedDayOfMonth]),m.useEffect(()=>{l.selectedJEScheduleTransaction?.status.code==="marked_as_completed"&&Y(!1)},[l.selectedJEScheduleTransaction?.status.code]);const pe=(Pe(D.formState.dirtyFields)||l.selectedJEScheduleTransaction?.status.code==="draft")&&f.jeScheduleDetails.length>0,Ee=()=>{pe===!0?A(!0):(r!=null&&e!=null&&t.trackScheduleDetailsCanceled(ee({jeScheduleTransaction:e,scheduleTab:"fixed_assets",transaction:r,vendor:S,controllerEmails:b,controllerUserIds:x})),p())},Ae=()=>{l.selectedJEScheduleTransaction!=null&&L({id:l.selectedJEScheduleTransaction.baseTransaction.id,type:l.selectedJEScheduleTransaction.baseTransaction.type})},je=m.useCallback(()=>{Y(!0)},[]),Oe=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]),Te=m.useCallback(n=>{r!=null&&e!=null&&t.trackScheduleDetailsDeleted(ee({jeScheduleTransaction:e,scheduleTab:"fixed_assets",transaction:r,vendor:S,controllerEmails:b,controllerUserIds:x})),O(n)},[t,b,x,e,O,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:Ae}),a.jsx(dt,{children:a.jsx(Fe,{...D,children:a.jsxs("form",{style:{width:"100%"},id:ge(ye),onSubmit:xe,children:[a.jsx(pt,{vendorLoadOptions:N,vendorField:o,vendorSearchAutoCompleteActions:s,vendorSearchAutoCompleteData:u,scheduleDetailsView:l,allAccountOptions:z,allClassOptions:G,allMonthOptions:q,allDepAccountOptions:$,onEditAmount:g,onDelete:Te,onJELinkClick:Q,onViewLinkedJE:I,onMarkAsComplete:Oe,allowCreateSchedule:de,onCreateSchedule:je}),E===!0?a.jsx(qe,{titleComponent:a.jsx(Be,{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:ge(ye),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:()=>{A(!0)},style:{minWidth:"82px"}}}):null]})})})]})}function ht({onNavigateBack:t,onTransactionClick:d,title:y}){return a.jsx(Ue,{title:y,tooltipTextOnLaunch:ut.showTransactionTooltip,onBackClick:t,onLaunchClick:d,style:{zIndex:3}})}function pt({vendorField:t,vendorLoadOptions:d,vendorSearchAutoCompleteActions:y,vendorSearchAutoCompleteData:l,scheduleDetailsView:s,allAccountOptions:u,allClassOptions:c,allDepAccountOptions:p,allMonthOptions:g,allowCreateSchedule:v,onCreateSchedule:k,onEditAmount:O,onDelete:P,onJELinkClick:F,onViewLinkedJE:L,onMarkAsComplete:w}){const T=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:y,vendorSearchAutoCompleteData:l,errors:T,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:g,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:P,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:O,onJELinkClick:F,onViewLinkedJE:L,jeScheduleId:s.selectedJEScheduleTransaction.baseTransaction.id})})]}):null}const ge=t=>`${t}_form`,ue=(t,d,y,l,s,u)=>{const c=t.scheduleDetailsLocalData.fixed_assets,p=c.selectedAccount,g=c.selectedVendor,v=g!=null?u.vendor.find(i=>i.zeniId===g.id):void 0,k=p!=null?t.allAccountList.find(i=>i.accountId===p):void 0,O=c.selectedAccumulatedDepreciationCategory,P=O!=null?t.allDepreciationAccountList.find(i=>i.accountId===O):void 0,F=c.assetId,L=c.selectedClass,w=L!=null?t.allClassList.find(i=>i.classId===L):void 0,T=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})),A=c.selectedDayOfMonth,h=c.lastDayOfMonth,J=A==null&&h==null?void 0:h===!0?"lastDayOfMonth":"day";return{[te]:{scheduleExpenseCategory:{selectedOption:k?.qboId,allOptions:d},accumulatedDepreciationCategory:{selectedOption:P?.qboId,allOptions:l},assetId:F,scheduleClass:{selectedOption:w?.classId,allOptions:y},startDate:c.selectedDate,months:{selectedOption:T,allOptions:s},vendor:{selectedOption:v?.id??g?.id,defaultOptions:We(u,v??g)},postingDate:{type:J,dayOfMonth:A}},[le]:E}};export{Et as default};
@@ -1,4 +1,4 @@
1
- import{aP as _,l as ie,iz as Q,gS as ke,eS as Ie,iA as Je,aa as Le,iB as we,cT as Me,cU as Pe,j as a,F as De,ad as Ve,cE as Fe,cF as _e,cG as $e,aQ as qe,iC as Be,iD as Ne,ab as re,iE as pe,iF as ze,d4 as Ue,q as Re,gX as me,u as X,p as We,y as Ge,iG as He,iH as Ke,iI as Ye,o as L}from"./index-BtlpidgV.js";import{b as D,n as V}from"./vendor-Bs1fkIUX.js";import{i as Qe,r as Xe,n as Ze,o as et}from"./ScheduleSequenceTable-DDYFTEg4-CSy2E-uq.js";import"./mui-Ty75qFQF.js";import"./analytics-BbBRZ6cw.js";import"./routing-Dk1A2KYI.js";import"./sentry-BE5FTzpq.js";import"./redux-CEhZD0hA.js";import"./liveblocks-8ht9CoL5.js";import"./crypto-CK1x27Ua.js";const N={labelWidth:new Ge(160,160,160)},tt=V.div`
1
+ import{aP as $,l as ie,iz as Q,gS as Ae,eS as Ie,iA as Je,aa as Le,iB as we,cT as Me,cU as Pe,j as a,F as De,ad as Ve,cE as Fe,cF as $e,cG as _e,aQ as Be,iC as qe,iD as Ne,ab as re,iE as pe,iF as ze,d4 as Ue,q as Re,gX as me,u as X,p as We,y as Ge,iG as He,iH as Ke,iI as Ye,o as L}from"./index-CN7UAWAg.js";import{b as D,n as V}from"./vendor-Bs1fkIUX.js";import{i as Qe,r as Xe,n as Ze,o as et}from"./ScheduleSequenceTable-ClzxD7gh-DTqJnrdA.js";import"./mui-Ty75qFQF.js";import"./analytics-BbBRZ6cw.js";import"./routing-Dk1A2KYI.js";import"./sentry-BE5FTzpq.js";import"./redux-CEhZD0hA.js";import"./liveblocks-8ht9CoL5.js";import"./crypto-CK1x27Ua.js";const N={labelWidth:new Ge(160,160,160)},tt=V.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  width: 100%;
@@ -18,7 +18,7 @@ import{aP as _,l as ie,iz as Q,gS as ke,eS as Ie,iA as Je,aa as Le,iB as we,cT a
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:v,allMonthOptions:o,uncategorizedAccounts:p,selectedAccount:r,selectedClass:C,selectedDate:w,selectedMonths:I,selectedPostingDay:O,lastDayOfMonth:A,isDisabled:S,allowCreateSchedule:b,onCreateSchedule:u,onDelete:le,onMarkAsComplete:F}){const{resetField:z}=Ue(),U=$(e,"scheduleExpenseCategory"),R=$(e,"scheduleClass"),ae=$(e,"startDate"),q=$(e,"postingDate"),y=$(e,"months"),f=De.getLocalizedStrings().jeSchedules.scheduleDetails.scheduleDetailsSection,se=d=>t.filter(B=>B.qboId===d)[0]?.qboId,oe=d=>i.filter(B=>B.classId===d)[0]?.accountingClassNumber,W={valueContainer:d=>({...d,overflow:"unset"})},J=Re(),x=st({startDate:n.baseTransaction.date,endDate:n.baseTransaction.date.add(1,"year")}),h=()=>{z(q)},s=O==null&&A==null?void 0:A===!0?"lastDayOfMonth":"day",E=d=>[p.expense?.qboId,p.income?.qboId].includes(d),j=()=>{n.jeScheduleId!=null&&le(n.jeScheduleId)},G=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:j,onMarkAsComplete:F,onCreateSchedule:u}),a.jsx(re,{controller:b===!0,children:a.jsxs(tt,{children:[a.jsx(me,{isDisabled:G.includes("debit_category_deleted")?void 0:S,isLoading:!1,label:{label:f.expenseCategory,width:N.labelWidth.value(J)},groupedSingleSelectField:{customPlaceholderColor:G.includes("debit_category_deleted")?We.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:W},disableCurrentOption:E,style:{borderTopLeftRadius:X[2],borderTopRightRadius:X[2]}}),a.jsx(Z,{}),a.jsx(me,{isDisabled:S,isLoading:!1,label:{label:f.class,width:N.labelWidth.value(J)},groupedSingleSelectField:{shouldShowChevronIcon:!1,name:R,placeholder:f.classPlaceholder,valueToId:d=>oe(d),defaultValue:{selectedOption:C,allOptions:v},registerOptions:{required:!0,validate:d=>!!d.selectedOption},customStyleConfig:W},style:{borderTopLeftRadius:X[0],borderTopRightRadius:X[0]}}),a.jsx(Z,{}),a.jsx(He,{label:{label:f.startMonth,width:N.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:N.labelWidth.value(J)},isDisabled:S,dayOfMonthField:{placeholder:f.postingDatePlaceholder,name:q,defaultValue:{type:s,dayOfMonth:O},onSaveClick:()=>{},onCancelClick:h}}),a.jsx(Z,{}),a.jsx(Ke,{label:{label:f.months,width:N.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=V.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:z}=Ue(),U=_(e,"scheduleExpenseCategory"),R=_(e,"scheduleClass"),ae=_(e,"startDate"),B=_(e,"postingDate"),y=_(e,"months"),f=De.getLocalizedStrings().jeSchedules.scheduleDetails.scheduleDetailsSection,se=d=>t.filter(q=>q.qboId===d)[0]?.qboId,oe=d=>i.filter(q=>q.classId===d)[0]?.accountingClassNumber,W={valueContainer:d=>({...d,overflow:"unset"})},J=Re(),x=st({startDate:n.baseTransaction.date,endDate:n.baseTransaction.date.add(1,"year")}),h=()=>{z(B)},s=O==null&&k==null?void 0:k===!0?"lastDayOfMonth":"day",E=d=>[p.expense?.qboId,p.income?.qboId].includes(d),j=()=>{n.jeScheduleId!=null&&le(n.jeScheduleId)},G=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:j,onMarkAsComplete:F,onCreateSchedule:u}),a.jsx(re,{controller:b===!0,children:a.jsxs(tt,{children:[a.jsx(me,{isDisabled:G.includes("debit_category_deleted")?void 0:S,isLoading:!1,label:{label:f.expenseCategory,width:N.labelWidth.value(J)},groupedSingleSelectField:{customPlaceholderColor:G.includes("debit_category_deleted")?We.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:W},disableCurrentOption:E,style:{borderTopLeftRadius:X[2],borderTopRightRadius:X[2]}}),a.jsx(Z,{}),a.jsx(me,{isDisabled:S,isLoading:!1,label:{label:f.class,width:N.labelWidth.value(J)},groupedSingleSelectField:{shouldShowChevronIcon:!1,name:R,placeholder:f.classPlaceholder,valueToId:d=>oe(d),defaultValue:{selectedOption:C,allOptions:v},registerOptions:{required:!0,validate:d=>!!d.selectedOption},customStyleConfig:W},style:{borderTopLeftRadius:X[0],borderTopRightRadius:X[0]}}),a.jsx(Z,{}),a.jsx(He,{label:{label:f.startMonth,width:N.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:N.labelWidth.value(J)},isDisabled:S,dayOfMonthField:{placeholder:f.postingDatePlaceholder,name:B,defaultValue:{type:s,dayOfMonth:O},onSaveClick:()=>{},onCancelClick:h}}),a.jsx(Z,{}),a.jsx(Ke,{label:{label:f.months,width:N.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=V.div`
22
22
  display: flex;
23
23
  flex-direction: column;
24
24
  width: 100%;
@@ -34,4 +34,4 @@ import{aP as _,l as ie,iz as Q,gS as ke,eS as Ie,iA as Je,aa as Le,iB as we,cT a
34
34
  `,ct=V.div`
35
35
  display: flex;
36
36
  justify-content: center;
37
- `,Se="scheduleDetailsPage",ee="scheduleDetailsSection",te="scheduleDetailsListSection",it=De.getLocalizedStrings(),{common:k,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:A,onViewLinkedJE:S,onTransactionClick:b,removeJeScheduleTransactionKey:u}){const[le,F]=D.useState(!1),z=_(l.updateStatus.fetchState),U=_(l.selectedJEScheduleTransaction?.status.code),R=_(l.deleteStatus.fetchState),[ae,q]=D.useState(!1),y=l.scheduleDetailsLocalData.prepaid_expenses,f=_(y.jeScheduleDetails.length),se=_(y.selectedDate),oe=_(y.selectedDayOfMonth),[W,J]=D.useState(!0),x=l.selectedJEScheduleTransaction?.vendor,h=l.selectedJEScheduleTransaction?.baseTransaction,s=l.selectedJEScheduleTransaction,E=ie.getFirstControllerEmail(n.controllers),j=ie.getFirstControllerId(n.controllerUserIds),G={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:{...ze(h)},scheduleExpenseCategoryAndClass:{expenseCategory:s.jeDebit.account?.accountName??null,expenseClass:s.jeDebit.accountingClass?.className??null},journalEntryDetails:{...pe(g)},vendorName:x!=null?x.name:k.strings.hyphen,controllerEmails:E,controllerUserIds:j}),w(c)},B=(c,g)=>{const T=s?.scheduledJournalEntry[g];h!=null&&T!=null&&s!=null&&e.trackScheduleDetailsViewJournalEntry({scheduleType:t,scheduleExpenseCategoryAndClass:{expenseCategory:s.jeDebit.account?.accountName??null,expenseClass:s.jeDebit.accountingClass?.className??null},journalEntryDetails:pe(T),controllerEmails:E,controllerUserIds:j}),S(c)};D.useEffect(()=>{z==="In-Progress"&&l.updateStatus.fetchState==="Completed"&&(h!=null&&s!=null&&e.trackScheduleDetailsSaved(Q({jeScheduleTransaction:s,scheduleTab:t,transaction:h,vendor:x,controllerEmails:E,controllerUserIds:j})),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,z,l.updateStatus,u,t,i,s,h,x,E,j]),D.useEffect(()=>{R==="In-Progress"&&l.deleteStatus.fetchState==="Completed"&&r()},[R,l.deleteStatus,r]);const H=ke(l.accountListNestedAccountHierarchy),K=Ie(l.classListNestedAccountHierarchy),Y=Je(t),ue=D.useRef(),M=Le({mode:"all",reValidateMode:"onChange",defaultValues:ce(l,H,K,Y,o.entityAutoCompleteView),resetOptions:{keepDirtyValues:!0,keepErrors:!0},values:ce(l,H,K,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 T=g[ee].vendor;if(c.includes("vendor")){const de=T?.defaultOptions.map(P=>P.value);if(T?.selectedOption!=null&&de?.includes(T.selectedOption)!==!0){const P=o.entityAutoCompleteView.vendor.find(Ae=>Ae.id===T.selectedOption);P!=null&&M.setValue("scheduleDetailsSection.vendor.defaultOptions",[{label:P.name??k.strings.empty,value:P.id}])}}const Oe=c.includes("amount");if(A(g,Oe),c.includes("amount")){const de=c.split(".")[1],P=parseInt(de);q(!0),C(P,l.selectedJEScheduleTransaction?.jeScheduleId)}};D.useEffect(()=>{const c=M.watch((g,{name:T})=>{T!=null&&g!=null&&Me(()=>ge(T,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,K,Y,o.entityAutoCompleteView)[te],keepDirty:!1}),q(!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=(Pe(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:j})),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:j})),p()},[e,s,p,t,h,x,E,j]),je=D.useCallback(c=>{h!=null&&s!=null&&e.trackScheduleDetailsDeleted(Q({jeScheduleTransaction:s,scheduleTab:t,transaction:h,vendor:x,controllerEmails:E,controllerUserIds:j})),O(c)},[e,s,O,t,h,x,E,j]),Te=(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:Te??k.strings.empty}),a.jsx(nt,{children:a.jsx(Ve,{...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:H,allClassOptions:K,allMonthOptions:Y,allowCreateSchedule:W,onEditAmount:C,onDelete:je,onJELinkClick:d,onViewLinkedJE:B,onMarkAsComplete:Ee,onCreateSchedule:xe}),le===!0?a.jsx(Fe,{titleComponent:a.jsx($e,{children:k.confirmationPopup.discardTitle}),descriptionComponent:a.jsx(_e,{children:k.confirmationPopup.discardDescription}),primaryButtonText:k.confirmationPopup.discard,secondaryButtonText:k.confirmationPopup.cancel,proceedButtonVariant:"danger",action:G}):null,he===!0?a.jsx(qe,{formId:fe(Se),primaryBtn:{label:k.footer.save,style:{minWidth:"82px"},isLoading:l.updateStatus.fetchState==="In-Progress",isDisabled:l.updateStatus.fetchState==="In-Progress"},cancelBtn:{label:k.footer.cancel,shouldResetOnCancel:!0,onClick:()=>{F(!0)},style:{minWidth:"82px"}}}):null]})})})]})}function ut({title:e,onNavigateBack:n,onTransactionClick:m}){return a.jsx(Ne,{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:A}){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:A,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})),A=i.selectedDayOfMonth,S=i.lastDayOfMonth,b=A==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:Be(t,p??o)},postingDate:{type:b,dayOfMonth:A}},[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),z=$(l.updateStatus.fetchState),U=$(l.selectedJEScheduleTransaction?.status.code),R=$(l.deleteStatus.fetchState),[ae,B]=D.useState(!1),y=l.scheduleDetailsLocalData.prepaid_expenses,f=$(y.jeScheduleDetails.length),se=$(y.selectedDate),oe=$(y.selectedDayOfMonth),[W,J]=D.useState(!0),x=l.selectedJEScheduleTransaction?.vendor,h=l.selectedJEScheduleTransaction?.baseTransaction,s=l.selectedJEScheduleTransaction,E=ie.getFirstControllerEmail(n.controllers),j=ie.getFirstControllerId(n.controllerUserIds),G={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:{...ze(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:j}),w(c)},q=(c,g)=>{const T=s?.scheduledJournalEntry[g];h!=null&&T!=null&&s!=null&&e.trackScheduleDetailsViewJournalEntry({scheduleType:t,scheduleExpenseCategoryAndClass:{expenseCategory:s.jeDebit.account?.accountName??null,expenseClass:s.jeDebit.accountingClass?.className??null},journalEntryDetails:pe(T),controllerEmails:E,controllerUserIds:j}),S(c)};D.useEffect(()=>{z==="In-Progress"&&l.updateStatus.fetchState==="Completed"&&(h!=null&&s!=null&&e.trackScheduleDetailsSaved(Q({jeScheduleTransaction:s,scheduleTab:t,transaction:h,vendor:x,controllerEmails:E,controllerUserIds:j})),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,z,l.updateStatus,u,t,i,s,h,x,E,j]),D.useEffect(()=>{R==="In-Progress"&&l.deleteStatus.fetchState==="Completed"&&r()},[R,l.deleteStatus,r]);const H=Ae(l.accountListNestedAccountHierarchy),K=Ie(l.classListNestedAccountHierarchy),Y=Je(t),ue=D.useRef(),M=Le({mode:"all",reValidateMode:"onChange",defaultValues:ce(l,H,K,Y,o.entityAutoCompleteView),resetOptions:{keepDirtyValues:!0,keepErrors:!0},values:ce(l,H,K,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 T=g[ee].vendor;if(c.includes("vendor")){const de=T?.defaultOptions.map(P=>P.value);if(T?.selectedOption!=null&&de?.includes(T.selectedOption)!==!0){const P=o.entityAutoCompleteView.vendor.find(ke=>ke.id===T.selectedOption);P!=null&&M.setValue("scheduleDetailsSection.vendor.defaultOptions",[{label:P.name??A.strings.empty,value:P.id}])}}const Oe=c.includes("amount");if(k(g,Oe),c.includes("amount")){const de=c.split(".")[1],P=parseInt(de);B(!0),C(P,l.selectedJEScheduleTransaction?.jeScheduleId)}};D.useEffect(()=>{const c=M.watch((g,{name:T})=>{T!=null&&g!=null&&Me(()=>ge(T,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,K,Y,o.entityAutoCompleteView)[te],keepDirty:!1}),B(!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=(Pe(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:j})),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:j})),p()},[e,s,p,t,h,x,E,j]),je=D.useCallback(c=>{h!=null&&s!=null&&e.trackScheduleDetailsDeleted(Q({jeScheduleTransaction:s,scheduleTab:t,transaction:h,vendor:x,controllerEmails:E,controllerUserIds:j})),O(c)},[e,s,O,t,h,x,E,j]),Te=(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:Te??A.strings.empty}),a.jsx(nt,{children:a.jsx(Ve,{...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:H,allClassOptions:K,allMonthOptions:Y,allowCreateSchedule:W,onEditAmount:C,onDelete:je,onJELinkClick:d,onViewLinkedJE:q,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:G}):null,he===!0?a.jsx(Be,{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(Ne,{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:qe(t,p??o)},postingDate:{type:b,dayOfMonth:k}},[te]:O}};export{xt as default};