@zeniai/web-cockpit-ui 1.14.75-dev → 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-B3A8op6h.js → ACHDetailsPage-Xx5xzGG6-TLkgYXDo.js} +1 -1
  2. package/dist/assets/{AIPerformancePage-C9EQ3p87-OJBktR4D.js → AIPerformancePage-CUXg59Hy-CQ1-rEhi.js} +24 -24
  3. package/dist/assets/{AccountInfoPage-C239tsDp-DRuutmdG.js → AccountInfoPage-BCsDFfVy-hrluJcll.js} +1 -1
  4. package/dist/assets/{AccountInfoPageContent-CgDFcQqY-CqasllNx.js → AccountInfoPageContent-Dc3zDc0L-zxWLzozl.js} +4 -4
  5. package/dist/assets/{AccountLockedInfoModal-CQzFFcuJ-Do66phz_.js → AccountLockedInfoModal-C9esWbYw-DmLSIkZF.js} +1 -1
  6. package/dist/assets/{AccountReconDetailsDrawerPage-xtmSIQ0k-Cx_Pu75e.js → AccountReconDetailsDrawerPage-zLLBfV9S-BNb08J_3.js} +4 -4
  7. package/dist/assets/{AccountRow-BrRxbza5-pSnSZur-.js → AccountRow-CjMOMc-1-x3Qeaa-E.js} +6 -6
  8. package/dist/assets/{AccountsPromoCardStack-CqXbhSj4-Dxz2-66c.js → AccountsPromoCardStack-DkqmFDos-CykT6dqn.js} +17 -17
  9. package/dist/assets/{AddAddressForCardDrawer-fgjjFlrb-j1U1vMZd.js → AddAddressForCardDrawer-D8Towl2b-BnpRCEKK.js} +1 -1
  10. package/dist/assets/{AddToWalletPage-DfB7hWI1-IQOFdx9h.js → AddToWalletPage-DPlpIxsE-B4bdwm1E.js} +15 -15
  11. package/dist/assets/{AgingReportsPage-DHYj512r-CC4JWVYi.js → AgingReportsPage-Bkw7sNWp-BamyEZIc.js} +5 -5
  12. package/dist/assets/{AllUserItems-DeSMFizX-DNdHjuWX.js → AllUserItems-DMlj0bT0-gvuqGIhf.js} +4 -4
  13. package/dist/assets/{ApAgingDetailPage-DU0hQxT3-DZWyZWni.js → ApAgingDetailPage-BLz4srnJ-Cc1Xbcy9.js} +2 -2
  14. package/dist/assets/{AppBasePage-BR-YhSR_-CzGzdBlR.js → AppBasePage-D-TkEHTb-DROxn97N.js} +5 -5
  15. package/dist/assets/{AppDrawerContent-B80zy-Gz-B39ZSWi1.js → AppDrawerContent-B_OcDS2l-DzddisDQ.js} +2 -2
  16. package/dist/assets/{ApprovalRulesSettingsPage-By648tCr-CQAcViTv.js → ApprovalRulesSettingsPage-CFLA9ZNm-DAP_H-up.js} +3 -3
  17. package/dist/assets/{ArAgingChart-TzANw6Zm-ud3qmxZt.js → ArAgingChart-GDCZoeS6-ejUvAmZP.js} +1 -1
  18. package/dist/assets/{ArAgingDetailPage-C2rcOePe-DceP7UdC.js → ArAgingDetailPage-BpbaAaQd-BiEAKqhS.js} +2 -2
  19. package/dist/assets/{AttachmentView-jMWZdYNa-B4G6-utv.js → AttachmentView-C5nZKhTq-vO_X412a.js} +4 -4
  20. package/dist/assets/{BankAccountSection-SGI34h8u-BmPo8uGy.js → BankAccountSection-IncAN4Fp-_HbGSxHo.js} +3 -3
  21. package/dist/assets/{BankAccountWarningSection-BYhi53r4-4douKQRZ.js → BankAccountWarningSection-B5zw3yYg-D0pN9DqK.js} +1 -1
  22. package/dist/assets/{BankConnectionsSettingsPage-ChDwYCek-CV2qmOPT.js → BankConnectionsSettingsPage-C_B2Ap4v-CWKHwroD.js} +28 -28
  23. package/dist/assets/{BillDetailPage-CDcMpkQh-WKx-zUwY.js → BillDetailPage-ZwjUMPQZ-BsZDr1gg.js} +10 -10
  24. package/dist/assets/{BillPayApprovalRuleDetailPage-CEPY5Pk4-BbBRmkGK.js → BillPayApprovalRuleDetailPage-C253InxT-RvLtQlW3.js} +1 -1
  25. package/dist/assets/{BillPayApprovalRulesPage-CL2A3R9R-lHKvJ4Ac.js → BillPayApprovalRulesPage-CA3FfPrr-qSqftFhb.js} +1 -1
  26. package/dist/assets/{BillPayPromoPage-B9Tz3jBR-C8UtwtS8.js → BillPayPromoPage-BKleb4US-pzvsBPOp.js} +4 -4
  27. package/dist/assets/{BillPaySetUpPage-Dt_bfrGH-BFJQWbSz.js → BillPaySetUpPage-DwK0lrbO-rQcYv7BW.js} +1 -1
  28. package/dist/assets/{BillingSettingsPage-DS50kMjn-x8sOi9VN.js → BillingSettingsPage-zBDcEj5D-BDTLKTvE.js} +5 -5
  29. package/dist/assets/{BillsBulkReviewDrawerPage-Btt7v1Mg-BawjVs5H.js → BillsBulkReviewDrawerPage-BjOYcTwa-Dv0CJOPA.js} +1 -1
  30. package/dist/assets/{BoxItem-BFUJgt2x-BC0-eR6w.js → BoxItem-CoguTodA-DItO3xcr.js} +1 -1
  31. package/dist/assets/{BusinessVerificationPage-CF3ZLtzs-m9ujMa8b.js → BusinessVerificationPage-DGQ9x2pf-35QVlpBA.js} +6 -6
  32. package/dist/assets/{CardNumberSubText-B1MkRWES-C67yiD_w.js → CardNumberSubText-BudPffUB-BTvRfksc.js} +1 -1
  33. package/dist/assets/{CashbackDetailPage-CPSsS7-h-D1KsDfk8.js → CashbackDetailPage-2KpaTEWi-CUzGkPf8.js} +1 -1
  34. package/dist/assets/{ChargeCardDetailPage-BDqTbXzY-BMqKHARM.js → ChargeCardDetailPage-DU-yz6wh-CBCtuxOp.js} +1 -1
  35. package/dist/assets/{ChargeCardListPage-yj0mhqgF-BwQcpXMc.js → ChargeCardListPage-C4ITCZwO-C8GmtyMf.js} +14 -14
  36. package/dist/assets/{ChargeCardListTable-DM6dYuPz-DQIQm3j5.js → ChargeCardListTable-DEqAOIyN-nTkk33YA.js} +1 -1
  37. package/dist/assets/{ChargeCardPromoPage-DSoQsDJK-k397bkJL.js → ChargeCardPromoPage-CvPAVoti-Dig5Emby.js} +1 -1
  38. package/dist/assets/{ChargeCardSetupPage-DhEITB5H-DwrNYcBw.js → ChargeCardSetupPage-CLhkL1Eh-B9fDm_Ae.js} +1 -1
  39. package/dist/assets/{ChargeCardStatementsPage-tCXt7AVZ-CGXmLyEQ.js → ChargeCardStatementsPage-6TvYstIS-DKHBxCkb.js} +5 -5
  40. package/dist/assets/{CheckDepositDrawerPage-6PfNZ8GG-CpP6SDgV.js → CheckDepositDrawerPage-D64qEFAi-DmFPX3Hy.js} +5 -5
  41. package/dist/assets/{CollapsableReportTable-DERfLf9A-B02u2C6v.js → CollapsableReportTable-o0pGO_sw-CoQujIPL.js} +48 -48
  42. package/dist/assets/{CompanyOfficerDetailsSection-CmMDQgui-DjcUawXU.js → CompanyOfficerDetailsSection-D3PSro9F-CN8Reo83.js} +12 -12
  43. package/dist/assets/{CompanyPassportCard-ki3cq_A3-BIFk_EYX.js → CompanyPassportCard-CUcLJOne-CwK5fmgg.js} +2 -2
  44. package/dist/assets/{CompanyPassportPage-C9UW7mV8-CjYiaVUt.js → CompanyPassportPage-C1v4xE8B-zCkhH9yQ.js} +10 -10
  45. package/dist/assets/{CompleteProfile-CcjiEAtN-G6pC79hX.js → CompleteProfile-DP8FFDH_-B7Va_v1e.js} +1 -1
  46. package/dist/assets/{ConfettiBurst-Dq3DwwfS-Bk63elQ-.js → ConfettiBurst-KNUWsLgM-C3W-6qSV.js} +1 -1
  47. package/dist/assets/{CreateOrEditVendorPage-CsYVqUf8-CQGCDeX8.js → CreateOrEditVendorPage-hEPeylx6-VsqoPSRS.js} +1 -1
  48. package/dist/assets/{CreditCardPaymentDrawerPage-C1QUtunc-B_csVrG-.js → CreditCardPaymentDrawerPage-DOgKpleO-DLW-KVW8.js} +8 -8
  49. package/dist/assets/{CurrencySelectField-PjVnHOPO-De5v3EBh.js → CurrencySelectField-C8L9A7zC-DLDLvWwm.js} +1 -1
  50. package/dist/assets/{CustomerOnboardingActivationPage-BEz1pkPV-m1nyzrH-.js → CustomerOnboardingActivationPage-D_AcFXeU-p0ieIiP_.js} +8 -8
  51. package/dist/assets/CustomerOnboardingContainerPage-DAxVaKqp-DMOGZ592.js +1 -0
  52. package/dist/assets/{CustomerOnboardingDetailPageSkeleton-3S6lsaCB-BUgUvYUX.js → CustomerOnboardingDetailPageSkeleton-DPSQT5UG-yxM-FX1s.js} +12 -12
  53. package/dist/assets/{CustomerOnboardingNoStepsPage-C7EvOlnr-Bb_AP_JK.js → CustomerOnboardingNoStepsPage-Bqi6QK8D-CnhmXiFi.js} +4 -4
  54. package/dist/assets/{CustomerOnboardingPage-Clo_UlCC-DsyGD0B2.js → CustomerOnboardingPage-eY5fJENY-CW0ZIKes.js} +4 -4
  55. package/dist/assets/{CustomerOnboardingProductSuitePage-BEy5gk3x-B66-9NVf.js → CustomerOnboardingProductSuitePage-BEWQQxa2-CUaimIpy.js} +4 -4
  56. package/dist/assets/{Dashboard-B1tMJ_lT-Dt3eYG-5.js → Dashboard-DyK1Y6xH-BhOeJdbK.js} +1 -1
  57. package/dist/assets/{DashboardReportPage-CoFYSDIH-DHztoZKU.js → DashboardReportPage-9mEEgfb9-8pEwgBSt.js} +11 -11
  58. package/dist/assets/{DashboardSidebarBackgroundAnimation-4ckOdfXR-Csek43Wl.js → DashboardSidebarBackgroundAnimation-BKaRUOA4-CrFQyftY.js} +1 -1
  59. package/dist/assets/{DepositAccTransactionItem-tQvZegVN-2h85R67z.js → DepositAccTransactionItem-CwSsISRg-BhipE2js.js} +1 -1
  60. package/dist/assets/{DepositAccTransactionListPage-CwXktzEW-DdOhhhJy.js → DepositAccTransactionListPage-d_A-lWfh-BHvjyvXp.js} +1 -1
  61. package/dist/assets/{DomesticWireDetailsPage-W6hOjjFW-BWSats5d.js → DomesticWireDetailsPage-C-qIXO7t-BK1ogPTU.js} +1 -1
  62. package/dist/assets/{DownloadOverlay-BSUE9cHx-CQqT-O4K.js → DownloadOverlay-_HVjRZb_-ovRMQuBS.js} +10 -10
  63. package/dist/assets/{DrawerPage-CgdtPYXN-BbWBMozy.js → DrawerPage-DgRO2OFE-DsZBSqxn.js} +3 -3
  64. package/dist/assets/EditPeoplePage-6lvgaJQi-Df2Mb0kP.js +55 -0
  65. package/dist/assets/{EditReimbursementDetailPage-Q2e7iDtu-BBcP7tRA.js → EditReimbursementDetailPage-B85brpdt-BYguIPkd.js} +19 -19
  66. package/dist/assets/{EntityDetailPage-XsEIg05w-Cod5Z1f6.js → EntityDetailPage-Ds03l_Nm-BYieYjCl.js} +3 -3
  67. package/dist/assets/{EntitySummarySection-CsXlmDFx-l9ddhbEU.js → EntitySummarySection-CbloJrPd-DGVEU9qa.js} +1 -1
  68. package/dist/assets/{ExpenseAutomationOverviewPage-CVe0vhrD-B-avItru.js → ExpenseAutomationOverviewPage-CYNO1bW--pa8gzAaD.js} +1 -1
  69. package/dist/assets/{ExpenseAutomationPage-D6r_A_CD-CiCcvo0I.js → ExpenseAutomationPage-CoYAnlKO-CIOZ9cQ5.js} +1 -1
  70. package/dist/assets/{ExpressPayPage-C6b1fiyD-DNDZJNDu.js → ExpressPayPage-VpqTGVa6-iCCnAcb9.js} +1 -1
  71. package/dist/assets/{FeaturePreviewPage-DOebdPqb-TzEy5dMk.js → FeaturePreviewPage-DzgPdfBh-BlncrRkT.js} +1 -1
  72. package/dist/assets/{FollowStepsSection-jmyNE2Fl-CvBGwqtX.js → FollowStepsSection-NM8GXTRZ--kMzASD7.js} +6 -6
  73. package/dist/assets/{GlobalReviewListPage-Cx1Km5fu-Bailuk1q.js → GlobalReviewListPage-xUe6yXIO-DDRodqQY.js} +6 -6
  74. package/dist/assets/{InformationCardStack-C5bKx9vg-k3hJn-Id.js → InformationCardStack-BYRwUh-e-Bm84GPsq.js} +2 -2
  75. package/dist/assets/{InsightsCardStack-EFoc_EWA-D2FaxDtB.js → InsightsCardStack-DfJXM3Fn-B0luA3Cz.js} +7 -7
  76. package/dist/assets/{InsightsSection-B0Rg5beY-u8CdyXOx.js → InsightsSection-4aveyVKo-DnKJf3sJ.js} +1 -1
  77. package/dist/assets/{IntegrationsSettingsPage-BQmjM8Np-1cGkOCA2.js → IntegrationsSettingsPage-BZMs-taD-ChagB0kp.js} +4 -4
  78. package/dist/assets/{InternationalWireSwiftDetailsPage-ChSGHFzT-CvsM4E7Y.js → InternationalWireSwiftDetailsPage-D3mlT5XG-CMQP_Nn8.js} +4 -4
  79. package/dist/assets/{InternationalWireVerificationPage-D41gWYDb-CEwQheQ1.js → InternationalWireVerificationPage-MUHsO8eu-CkpdoULT.js} +1 -1
  80. package/dist/assets/{InviteFormPage-CltJ2XYv-DJJh50vB.js → InviteFormPage-aZR9lFWK-BCwWSqH4.js} +1 -1
  81. package/dist/assets/{InvitePageListView-D5OdkeEV-CglVOI_I.js → InvitePageListView-CHyiR2RC-Sk8zihrC.js} +12 -12
  82. package/dist/assets/{InvitePeoplePage-CyXnulj0-B7lM98ff.js → InvitePeoplePage-BRl496Mv-FaAOJzgH.js} +1 -1
  83. package/dist/assets/{InvoiceUploadSection-B2ePrdY8-CUZ5YkU9.js → InvoiceUploadSection-BqpspjSO-DbodpMov.js} +6 -6
  84. package/dist/assets/{IssueChargeCardPage-BCfMS2Zu-DdG6-d9q.js → IssueChargeCardPage-D39Bd6J9-Bz3hak_j.js} +21 -21
  85. package/dist/assets/{LabeledAddressValue-D7udvbin-kVKW8gGz.js → LabeledAddressValue-w3powIaN-xKKxpzsE.js} +1 -1
  86. package/dist/assets/{LabeledAddressValueField-jlDhqmgU-CM1ZWEJK.js → LabeledAddressValueField-BPOKk4mI-BFmVYPcn.js} +2 -2
  87. package/dist/assets/{LabeledControlledCheckBoxField-DNmJFVpZ-DjMQjBxM.js → LabeledControlledCheckBoxField-afEn8tHL-DxqXt4PA.js} +1 -1
  88. package/dist/assets/{LabeledCreatableSingleSelectField-B6Vit6ZA-Bdnw6feS.js → LabeledCreatableSingleSelectField-DXA_bSyS-BJinmWca.js} +3 -3
  89. package/dist/assets/{LabeledDocumentField-CbTN9aAs-CEmYFygD.js → LabeledDocumentField-Z9OHDFr6-HgLdszDI.js} +1 -1
  90. package/dist/assets/{LabeledDropDownFormattedTextField-CD6Bs8EU-Bok-Bw1g.js → LabeledDropDownFormattedTextField-0Bk8vscY-CDQY3SED.js} +3 -3
  91. package/dist/assets/{LabeledText-aSB1WzCl-Cj9Ocs2U.js → LabeledText-CgI7e_L--BwhQOiOZ.js} +1 -1
  92. package/dist/assets/{LabeledUserSingleSelectWithSubtitlesField-Y99F7D2f-Dwh42b2N.js → LabeledUserSingleSelectWithSubtitlesField-B0y_IMnV-GTOhW6B-.js} +1 -1
  93. package/dist/assets/{LabeledZeniRolesDropDownField-BJePp4f_-Dc_g-F8s.js → LabeledZeniRolesDropDownField-CEwtGHuw-Bl11WCzt.js} +14 -14
  94. package/dist/assets/{LinkJETransactionPage-CNbLCYzA-Bg5upj_n.js → LinkJETransactionPage-BqF3QSeN-CXTqkit6.js} +2 -2
  95. package/dist/assets/{LockCardPage-DMB-6EyM-lbTpu5O_.js → LockCardPage-Ui2RTfpb-B7R1Xixi.js} +10 -10
  96. package/dist/assets/{LowBalancePopup-D8MLLJa7-CBiPecxo.js → LowBalancePopup-DzqqMGEK-DvUWGZSI.js} +1 -1
  97. package/dist/assets/{MagicLinkACHDetailsPage-BdS3aAWw-BrXiv9-t.js → MagicLinkACHDetailsPage-Kz-uZGml-CF0KJ9I8.js} +1 -1
  98. package/dist/assets/{MagicLinkDomesticWireDetailsPage-CG0a1drB-Dmn6AGH4.js → MagicLinkDomesticWireDetailsPage-DNR1hQud-DTuqaECC.js} +1 -1
  99. package/dist/assets/{MagicLinkInternationalWireDetailsPage-C9-ZvcKN-C21_WG8V.js → MagicLinkInternationalWireDetailsPage-B-hsxI7i-DU8bPbJw.js} +1 -1
  100. package/dist/assets/{MagicLinkSuccessPage-BBQLFLJ9-CPkaiDv7.js → MagicLinkSuccessPage-CTyWzEAl-CcSFqgbx.js} +1 -1
  101. package/dist/assets/{MagicLinkTitleSection-BVR_lDfw-BbQ3PhCM.js → MagicLinkTitleSection-egx3li4v-CK9jYn1b.js} +1 -1
  102. package/dist/assets/{MailingDetailsSection-DZi-O94--DF-Hpww_.js → MailingDetailsSection-D28xdU_N-D7dNEE4R.js} +1 -1
  103. package/dist/assets/{Menu-DGwHJlS--Djq7PCKE.js → Menu-BsPZbkcv-dMEFFJAw.js} +1 -1
  104. package/dist/assets/{MyBankConnectionsSettingsPage-BYTxFTOW-gDKKbyJg.js → MyBankConnectionsSettingsPage-B7pw1loZ-BZemPN_o.js} +1 -1
  105. package/dist/assets/{MyPendingActivationChargeCardListPage-CUvKbnux-CN2CiFSh.js → MyPendingActivationChargeCardListPage-CaDgVLY9-D9RWTHXk.js} +1 -1
  106. package/dist/assets/{MyProfileSettingsPage-BHnImAny-TmsmZErc.js → MyProfileSettingsPage-DGPjjcRE-BkjL1klq.js} +11 -11
  107. package/dist/assets/{NavBarWithPicker-Q739fT8--CrZ3WYmY.js → NavBarWithPicker-CK69EXMo-BopYsgXw.js} +3 -3
  108. package/dist/assets/{NavigationArrow-DQfX85VC-Dvm4TJ9a.js → NavigationArrow-B5JMjj8b-Yf4kFeB6.js} +1 -1
  109. package/dist/assets/{NavigationDots-CyCjbpW--DGfBQuMJ.js → NavigationDots-yYEq4mai-Bct7I6H1.js} +1 -1
  110. package/dist/assets/{NewGlobalMerchantPage-CzT7wrsy-CItQq0bZ.js → NewGlobalMerchantPage-DXdipj9r-Cg-jSrpq.js} +4 -4
  111. package/dist/assets/{NoDataChart-BnAshBnb-UHLHtstu.js → NoDataChart-CetZJAul-Dliv4FgS.js} +1 -1
  112. package/dist/assets/{NoDataTable-BhokhW6d-QEuWLEd7.js → NoDataTable-CbxTnnUj-RBS2BO0t.js} +1 -1
  113. package/dist/assets/{NotFoundPage-uFZMkf3D-DLBn6ZTy.js → NotFoundPage-JK9WWLQL-t0Ol92QM.js} +1 -1
  114. package/dist/assets/{NotificationSettingsPage-BE1_MgJM-BWk4ph6m.js → NotificationSettingsPage-BYFMb4y6-BucvDhx8.js} +7 -7
  115. package/dist/assets/{NotificationsListConfig-CUWNEUCL-XvkMOcjh.js → NotificationsListConfig-EKmLeUqF-DPKxh2va.js} +1 -1
  116. package/dist/assets/{NotificationsPage-BMZvKV7t-v_KJjY-j.js → NotificationsPage-Ca9rvFJG-3IKE1yMl.js} +23 -23
  117. package/dist/assets/{OpExByVendorPage-BuHAApyT-ZSJOclS-.js → OpExByVendorPage-S3IdisaI-C-NcDs3u.js} +20 -20
  118. package/dist/assets/{OverlayContainerPage-BKHs_4eI-Cod2hmti.js → OverlayContainerPage-BKHs_4eI-B8gf_Owe.js} +1 -1
  119. package/dist/assets/{PandLWithForecastPage-B0IiVx6D-BofpOT29.js → PandLWithForecastPage-Bf-D_XNg-CrzOb2hU.js} +7 -7
  120. package/dist/assets/{PaymentAccountSetupBillingAddressSection-BkfPpFae-CQO2zwUL.js → PaymentAccountSetupBillingAddressSection-CMVwDWuf-jHkUqKP1.js} +13 -13
  121. package/dist/assets/{PeoplePage-Cj9mjcMw-9OYaHyag.js → PeoplePage-BKkwc_YR-BoZfR8X8.js} +1 -1
  122. package/dist/assets/{ProductsCarousel-_jYEgpxl-3H43gICJ.js → ProductsCarousel-DsI5t_Kc-Cpn89x6_.js} +1 -1
  123. package/dist/assets/{PromoBaseCards-8tkwl6GI-B2drNSiA.js → PromoBaseCards-CnQcR3Wn-B3iRHG7z.js} +1 -1
  124. package/dist/assets/{QBOConnectionDialog-CJz2SlfE-Cw-cnWS5.js → QBOConnectionDialog-PCdTWQqn-D0QAr5xA.js} +2 -2
  125. package/dist/assets/{QBOSetupSection-CpfryKtp-ZjQWXWah.js → QBOSetupSection-DhsqYA8G-Dcjp9EQd.js} +1 -1
  126. package/dist/assets/{ReimbursementApprovalRuleDetailPage-B8CBB3JI-xMBay2No.js → ReimbursementApprovalRuleDetailPage-Dao_lRpW-BNs6twdR.js} +1 -1
  127. package/dist/assets/{ReimbursementApprovalRulesPage-BsLmDz25-CgEjqCg6.js → ReimbursementApprovalRulesPage-B_LTt_z4-DnK-3YAX.js} +1 -1
  128. package/dist/assets/{ReimbursementDetailPage-DiG34Vur-Dcz6odls.js → ReimbursementDetailPage-H6HNtQHN-2pM8Fun7.js} +8 -8
  129. package/dist/assets/{ReimbursementPromoPage-CNZdwAl--BsBEvPRx.js → ReimbursementPromoPage-j-UbNrbV-VHty7Yzb.js} +4 -4
  130. package/dist/assets/{ReimbursementSetUpPage-Ccc4qnNZ-CPmymOEP.js → ReimbursementSetUpPage-FagEYTJ_-BpDXEjSX.js} +7 -7
  131. package/dist/assets/{ReimbursementsBulkReviewDrawerPage-Cza64yGU-BleycvIi.js → ReimbursementsBulkReviewDrawerPage-imSK_7rH-B3IJ7p46.js} +1 -1
  132. package/dist/assets/{ReloadCard-Cnz9ywvF-BGT4MYH-.js → ReloadCard-CqdeJe0l-Bb07dYPg.js} +3 -3
  133. package/dist/assets/{ReportTableViewSelector-B70dJfTV-SlWwkWXT.js → ReportTableViewSelector-DgPlLWgl-CNrxPhYC.js} +5 -5
  134. package/dist/assets/{ReportsPage-DdvNbMAj-SF_Ndi0S.js → ReportsPage-ByfO0uyp-DE8vAkKj.js} +6 -6
  135. package/dist/assets/{RevenueChart-B0CcrRHw-DSEzCN2z.js → RevenueChart-ChbWXtmx-BA32Na2v.js} +1 -1
  136. package/dist/assets/{ReviewDetailsPage-BVebc63A-zFlaxD9H.js → ReviewDetailsPage-BsOffi8f-BLsxP3vo.js} +5 -5
  137. package/dist/assets/{ReviewOverlay-Dm9GTjwu-bBb6sGal.js → ReviewOverlay-B73a-P2j-CTP6pyS2.js} +7 -7
  138. package/dist/assets/RoleWithToolTip-Ckorto5Y-CV42dy1h.js +22 -0
  139. package/dist/assets/{ScheduleDetailsFixedAssetsPage-BWwDY16q-BLBhJP_5.js → ScheduleDetailsFixedAssetsPage-0vTqFn9N-BEm7Cgkc.js} +8 -8
  140. package/dist/assets/{ScheduleDetailsPage-CqFbh9HE-R8G_b4b1.js → ScheduleDetailsPage-Cl11M6UJ-BhHsLjma.js} +3 -3
  141. package/dist/assets/{ScheduleSequenceTable-DDYFTEg4-CG84KRpd.js → ScheduleSequenceTable-ClzxD7gh-DTqJnrdA.js} +26 -26
  142. package/dist/assets/{ScreenRoutes-BVWkKC_W.js → ScreenRoutes-D3i6oNhN.js} +1 -1
  143. package/dist/assets/{SetUpAccountSection-BuF3A3dP-Dlc3aKO9.js → SetUpAccountSection-xqqgeGLA-YX4p_D4B.js} +1 -1
  144. package/dist/assets/{SignIn-CyGyU8wg-8SnTpqj6.js → SignIn-Bh-9-pko-DyJR1DLA.js} +14 -14
  145. package/dist/assets/{SignInScreen-CEzKwqwu.js → SignInScreen-CaiIkh6O.js} +1 -1
  146. package/dist/assets/{SpendManagementListViewPage-DPUhOVZl-B5bRhpPB.js → SpendManagementListViewPage-Bn4KmChq-B4Y0L643.js} +3 -3
  147. package/dist/assets/{SpendManagementPerTabPage-CeYdMTbj-DL_aA7k6.js → SpendManagementPerTabPage-pYgoZlfR-DI3UJ4l8.js} +37 -37
  148. package/dist/assets/{SpendManagementSection--vF9XUYO-BtgzDFex.js → SpendManagementSection-4ctnlmiO-I2pWsNDv.js} +1 -1
  149. package/dist/assets/{StatementItem-CiYj7XWK-5AkRMgC4.js → StatementItem-CYkgMHQd-B65BnaGl.js} +6 -6
  150. package/dist/assets/{StatementsPage-SLgIPcxl-DedL5QW0.js → StatementsPage-BeF9vuPn-DNaEdwZ3.js} +1 -1
  151. package/dist/assets/{StatusSwitcher-CAMXea4Z-Ci68Xk-W.js → StatusSwitcher-DOwOcMYF-CSG0Jxkr.js} +1 -1
  152. package/dist/assets/{SubTabSwitcher-BFezBmcr-Bv0UYLck.js → SubTabSwitcher-BcEtc_ob-GF65Or0C.js} +1 -1
  153. package/dist/assets/{SummaryCard-Bk5Eh2IR-CvYAWxo_.js → SummaryCard-fjNCTkA5-B-M5KnHi.js} +1 -1
  154. package/dist/assets/{TaskManagementPage-ClL2snRe-BkZUI-Os.js → TaskManagementPage-BYMJMIhz-Do04zyQE.js} +15 -15
  155. package/dist/assets/{TimeRangeSwitcher-fGI52XTc-B8YAuD1t.js → TimeRangeSwitcher-B4FKox6K-C6y8kYZQ.js} +1 -1
  156. package/dist/assets/{TimeframeSwitcher-CV-bryv5-BZG0GUCh.js → TimeframeSwitcher-DVWPgeL0-8qGmZwOz.js} +1 -1
  157. package/dist/assets/{TimeframeSwitcherWithToggle-kmZOYJwI-CNr8HJvn.js → TimeframeSwitcherWithToggle-BWGJWyJr-ClUkg8re.js} +1 -1
  158. package/dist/assets/{TopExCard-DeYN3ImD-B_G3aCn4.js → TopExCard-CUrz7PjD-Co2zX82Y.js} +5 -5
  159. package/dist/assets/{TopExDetailPage-BmyFCtzb-Cf6VgVmt.js → TopExDetailPage-BMzQUB6s-BXWwFBJe.js} +3 -3
  160. package/dist/assets/{TransactionDetailPage-BFpvUUmz-C0BrkJmS.js → TransactionDetailPage-CZdeoUBY-XP0PswSG.js} +31 -31
  161. package/dist/assets/{TransactionList-JHbSuP08-BE5oUWHj.js → TransactionList-CixEJAgS-CGekhIG9.js} +8 -8
  162. package/dist/assets/{TransactionListBig-FzOmuwBP-CVEEn05Z.js → TransactionListBig-CMVJvB3o-DxRTSLNX.js} +7 -7
  163. package/dist/assets/{TransactionListPage-Kkxkkd_A-uxvvUDBa.js → TransactionListPage-CAMz9-YS-BNVZMAVt.js} +6 -6
  164. package/dist/assets/{TransactionVendorDetailPage-m1wxsTyn-CtzfWKY9.js → TransactionVendorDetailPage-CzbyeJ4F-DfY35mWk.js} +3 -3
  165. package/dist/assets/{TransferDrawerPage-obzTPCDc-DmDROdGW.js → TransferDrawerPage-aQAyy9SJ-CtSZX6V_.js} +6 -6
  166. package/dist/assets/{TreasuryOverviewPage-DW68UR3w-CXp8UZWj.js → TreasuryOverviewPage-DStdhtYj-BmaX-LUn.js} +8 -8
  167. package/dist/assets/{TreasuryPromoPage-BW76YUSB-1YJbHf0S.js → TreasuryPromoPage-ukEVtL3s-BxkytgW6.js} +7 -7
  168. package/dist/assets/{TreasuryStatementsPage-BDD4VO8n-DUjcdDs1.js → TreasuryStatementsPage-CrTNmv-B-fC2pfiKh.js} +1 -1
  169. package/dist/assets/{TreasuryTaxLetterPage-B2NDIt_Q-DCX4Q69d.js → TreasuryTaxLetterPage-BkyI9zJM-Ds84Dj6n.js} +1 -1
  170. package/dist/assets/{TrendChart-D5CYCZnh-DAyWGjcL.js → TrendChart-BV_FYo44-Dbzn5dy8.js} +1 -1
  171. package/dist/assets/{TrendWithTransactions-DoCnDpHm-CdDHaHZ9.js → TrendWithTransactions-COtEkfX9-BcCvtDz-.js} +5 -5
  172. package/dist/assets/{UncategorizedAccountsMappingPage-DX_TBAhJ-BssvOjsa.js → UncategorizedAccountsMappingPage-CDFz90Rp-CAIHAo3N.js} +1 -1
  173. package/dist/assets/{UnitIntegrationPage-DZfp553j-ByWZS3hU.js → UnitIntegrationPage-DU3fVYZs-CPctIuWc.js} +1 -1
  174. package/dist/assets/UploadAdditionalDocumentOverlay-C663UVhz-FUVjkpYI.js +38 -0
  175. package/dist/assets/{Vendor2FAPopup-BmT-gcIz-n3vjq-3y.js → Vendor2FAPopup-DTGw_BLn-CTkC0axp.js} +1 -1
  176. package/dist/assets/{VendorACHDetailsPage-CQ7Hq4OS-OICNgdvg.js → VendorACHDetailsPage-BEB-BRPf-BW1XdRCh.js} +1 -1
  177. package/dist/assets/{VendorDetailPage-Cs6xk6eD-zl-heKdM.js → VendorDetailPage-DgKqF5w_-Da2PCb7B.js} +5 -5
  178. package/dist/assets/{VendorDomesticWireDetailsPage-8mY07nVg-DHqiq7vN.js → VendorDomesticWireDetailsPage-DsT7aeCi-Cxqzwzrv.js} +1 -1
  179. package/dist/assets/{VendorFiling1099EditablePage-CAFeI80I-sDSbFxEy.js → VendorFiling1099EditablePage-DSQPqiXK-BlXqobVl.js} +14 -14
  180. package/dist/assets/{VendorFirstReviewPage-ACNdg13I-BUeCp6NI.js → VendorFirstReviewPage-CHhQfRiw-BCpTFAZN.js} +70 -70
  181. package/dist/assets/{VendorInternationalWireDetailsPage-BpkamVMK-D0VBsQab.js → VendorInternationalWireDetailsPage-BALUN3IH-B1HapV15.js} +4 -4
  182. package/dist/assets/{VendorInternationalWireSwiftDetailsPage-Gvr65ujG-DJLCreKr.js → VendorInternationalWireSwiftDetailsPage-BCJLWye_-CJZeW3NQ.js} +1 -1
  183. package/dist/assets/{VendorsAccountsSection-AmC5VwVD-DhkXxukb.js → VendorsAccountsSection-BNeOtayE-BfOhq53p.js} +1 -1
  184. package/dist/assets/{VerifyDevice-PHsuiYk_-D412mfmG.js → VerifyDevice-BdS9Wg6i-km9HNFiy.js} +2 -2
  185. package/dist/assets/{VideoPlayer-DSqyhtMK-C3AGcKQT.js → VideoPlayer--4ECwDUJ-DpdXEWOa.js} +1 -1
  186. package/dist/assets/{VideoPopup-BcGkTYtT-KpRyilVI.js → VideoPopup-D0KR8nhb-L_41dJ_u.js} +1 -1
  187. package/dist/assets/{WarningsDrawerPage-BMxsT694-CfyoaWK9.js → WarningsDrawerPage-CZi7W_N2-BvrjJAup.js} +10 -10
  188. package/dist/assets/{ZeniAccountDetailPage-CvVIdc-T-DXao_tc2.js → ZeniAccountDetailPage-DRpUQWRY-CFQQ9DDl.js} +1 -1
  189. package/dist/assets/{ZeniAccountListViewPage-D8RyYP_F-v3DmCD-q.js → ZeniAccountListViewPage-B58qILci-DPpjeTIQ.js} +1 -1
  190. package/dist/assets/{ZeniAccountNavBarPieces-DN7XGX4V-Dx8A5GLh.js → ZeniAccountNavBarPieces-BvwIaUWa-BHDVxbAK.js} +2 -2
  191. package/dist/assets/{ZeniAccountPromoPage-DtkPkWS_-DSD29DUQ.js → ZeniAccountPromoPage-BKn8HRaG-C8TqY5PJ.js} +10 -10
  192. package/dist/assets/{ZeniAccountSetupPage-NDzdHEb2-CwWBVh2N.js → ZeniAccountSetupPage-B52_WsH5-Ny13na_H.js} +2 -2
  193. package/dist/assets/{ZeniCopyright-C2Et8K0x-lDJzPJZG.js → ZeniCopyright-BBZoZbnj-BkZUi5kn.js} +1 -1
  194. package/dist/assets/{ZeniTransferAmountSlider-D7NLq8nU-CERt_WDB.js → ZeniTransferAmountSlider-DuVixxF--B3VBiout.js} +1 -1
  195. package/dist/assets/{analyticsHelper-CaFa35yP-G2_hr-0j.js → analyticsHelper-BFEbpTaS-CI1-ZwNW.js} +1 -1
  196. package/dist/assets/{analyticsHelper-DU_Un8e0.js → analyticsHelper-DEd3yAFk.js} +1 -1
  197. package/dist/assets/{chartTypes-D3stzk-w-BOvyI3x_.js → chartTypes-D3rvsvls-DmtOpgie.js} +1 -1
  198. package/dist/assets/{commonDimensions-DP_SFwFq-B4nonWMr.js → commonDimensions-DTY9_AOp-DlMPlh2t.js} +1 -1
  199. package/dist/assets/{detailCommon-Cz5amAEd-Cc-pki0l.js → detailCommon-CLP6KEix-B5bEqT96.js} +4 -4
  200. package/dist/assets/{downloadPdf-BEpDZsHw-iAkz6QUF.js → downloadPdf-DEpaGHNR-Bw53_d32.js} +1 -1
  201. package/dist/assets/{index-CUpJHznP.js → index-CN7UAWAg.js} +2530 -2515
  202. package/dist/assets/{mapLoadingInProgressToTreeNode-9Bg2UmOc-COxeXpBk.js → mapLoadingInProgressToTreeNode-B_mkEOSy-BQa7i_Nl.js} +1 -1
  203. package/dist/assets/{mapSectionWithAcOnlyToTreeNode-CrGK4Cl1-CK5Yo8-v.js → mapSectionWithAcOnlyToTreeNode-C_s2TWXG-1zhixfCC.js} +1 -1
  204. package/dist/assets/{mapSpacerToTreeNode-Dpahky1g-BWER0KF3.js → mapSpacerToTreeNode-BsPCAFm5-CkJKxUF2.js} +1 -1
  205. package/dist/assets/{mapTimeframeBalancesToTreeNode-DGNk2hE1-BtbWYKjA.js → mapTimeframeBalancesToTreeNode-6mbqZF6a-D84LKXiT.js} +1 -1
  206. package/dist/assets/{mapTimeframeBalancesToTreeNode-DD94NO-L-IqTvqjc2.js → mapTimeframeBalancesToTreeNode-DLbpODYp-DDiXCv85.js} +1 -1
  207. package/dist/assets/{mapTimeframeHeaderLoadingInProgressToTreeNode-CJYVSL83-sS_oqH0-.js → mapTimeframeHeaderLoadingInProgressToTreeNode-CKvU3bUP-kVnJxQIG.js} +1 -1
  208. package/dist/assets/{toCOABalancesWithID-iOGWxWc5-CwkpaTeT.js → toCOABalancesWithID-CHHSLp5k-D9n1b9Hs.js} +1 -1
  209. package/dist/assets/{toChartData-BEJwj1pL-BUKCXEQF.js → toChartData-CBhPep_F-DbHa5eNf.js} +1 -1
  210. package/dist/assets/{uploadAttachment-Cs4cwF3u-BqxRSnPC.js → uploadAttachment-BXzSdWYh-ChPsAoWK.js} +6 -6
  211. package/dist/assets/{uploadReceipts-Dp1dvCjf-Rghek-rE.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-Dc2nEhqg.js +0 -1
  215. package/dist/assets/EditPeoplePage-DIj7SItK-CKkznNAO.js +0 -55
  216. package/dist/assets/RoleWithToolTip-CqLSnFDx-DgQ7tDAb.js +0 -22
  217. package/dist/assets/UploadAdditionalDocumentOverlay-BqO1S9_p-C6rWAFOs.js +0 -38
@@ -0,0 +1,55 @@
1
+ import{q as ae,F as de,g4 as pe,d as ce,aa as ue,aP as me,j as s,cE as ge,aq as he,cF as fe,cG as ye,g_ as ve,aM as U,cK as xe,o as r,c6 as $e,ad as be,aQ as we,y as _,g7 as Re,g8 as je,g9 as Ce,cP as Pe,l as Y,b9 as Oe,p as M,db as ke,u as c}from"./index-CN7UAWAg.js";import{b,n}from"./vendor-Bs1fkIUX.js";import{f as Ie}from"./AllUserItems-DMlj0bT0-gvuqGIhf.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"./LabeledUserSingleSelectWithSubtitlesField-B0y_IMnV-GTOhW6B-.js";import"./RoleWithToolTip-Ckorto5Y-CV42dy1h.js";import"./LabeledZeniRolesDropDownField-CEwtGHuw-Bl11WCzt.js";const C={containerPaddingTop:new _(c[3],c[3]),containerPaddingLeft:new _(c[3],c[6],c[6]),containerPaddingRight:new _(c[3],c[6],c[8]),buttonWidth:new _(85,85)},W="editPeoplePage",w="userItems",a=de.getLocalizedStrings().peoplePage,He=({peopleDetails:e,managersList:u,classList:R,controllersList:P,mode:d,isZeniTenant:T,onCloseClick:O,onResetClick:k,onSaveClick:m,onDeleteUser:Q,onPeopleLocalDataUpdated:K,analytics:z,isReimbursementDisabled:D,isZeniAccountsDisabled:N,isChargeCardDisabled:Z,isTreasuryDisabled:q,isBankingOnlyTenant:y,isCardsOnlyTenant:v,isLiteRoleDisabled:F})=>{const j=ae(),[X,E]=b.useState(!1),[H,ee]=b.useState(-1),se=d==="zeni_only"?a.invitePage.editZeniTitle:a.invitePage.editTitle,te=b.useRef(null),S=b.useMemo(()=>pe(D,N,Z,y,v,F,q),[D,N,Z,y,v,F,q]),G=ce(),l=ue({mode:"onBlur",reValidateMode:"onChange",defaultValues:J(e.people,u,R,d,S,y,v),values:J(e.people,u,R,d,S,y,v)}),re=l.handleSubmit(()=>{A()&&m()},()=>{A(),console.warn("Edit Profile form error")}),A=()=>{const g=l.getValues();let o=!0;return g.userItems.forEach((h,x)=>{const{role:L,department:i,nonZeniRole:f,manager:p}=h;if(d==="zeni_only"){const t=L.selectedOptions;(!t?.length||t?.length===1&&t?.includes("company_officer"))&&(l.setError(`${w}.${x}.role`,{type:"required"}),o=!1)}else{const t=f?.userRole.selectedRole;(t!=null&&f!=null?f.productsByUserRole[t].map($=>$.selectedOption).filter($=>$!=null):[]).length<1&&(l.setError(`${w}.${x}.nonZeniRole.userRole.selectedRole`,{type:"required"}),o=!1),t!=="investor_or_banker"&&i?.selectedOption==null&&(y||v||(l.setError(`${w}.${x}.department`,{type:"required"}),o=!1)),p?.selectedUser==null&&t!=="investor_or_banker"&&(l.setError(`${w}.${x}.manager`,{type:"required"}),o=!1)}}),o},oe=async(g,o)=>{const h=[],{userItems:x}=o,L=e.person?.userRole?.userRoleId;x.forEach(i=>{let f={};if(L!=null){if(d==="zeni_only")f={email:i.email,role:i.role.selectedOptions};else{const p=i.nonZeniRole?.userRole.selectedRole;let t=[];p==="admin"||p==="investor_or_banker"?t.push(p):t=p!=null?(i.nonZeniRole?.productsByUserRole[p]??[]).map(B=>Y.toUserRoleTypeStrict(B.selectedOption?.value)).filter(B=>B!=null):[],p==="employee"&&t.length===0&&t.push("reimbursements_user");const $=Y.hasInvestorBankerLevelAccess(t);f={email:i.email,role:t,departmentId:$?void 0:i.department?.selectedOption?.value,managerId:$?void 0:i.manager?.selectedUser}}h.push(f)}}),K(h)};b.useEffect(()=>{const g=l.watch((o,{name:h})=>{h!=null&&o!=null&&oe(h,o)});return()=>{g.unsubscribe()}});const ne=()=>{E(!0)},le={onOkClick:()=>{const g=e.person;z?.trackRemoveUserAccess(g.userRole.userRoles,g.userRole.userEmail),Q?.(e.person)},onCancelClick:()=>{E(!1)}},V=me(e.person?.update),I=e.person?.update,ie=a.deleteOverlay.description.replace("‘_user-name_’",`"${e.person?.user?.firstName} ${e.person?.user?.lastName}"`);return b.useEffect(()=>{I==null&&V==="removeUsers"&&(E(!1),k?.())},[I,V]),s.jsxs(s.Fragment,{children:[X===!0?s.jsx(ge,{titleComponent:s.jsx(ye,{children:a.deleteOverlay.title}),descriptionComponent:s.jsx(fe,{children:ie}),primaryButtonText:a.deleteOverlay.remove,secondaryButtonText:a.deleteOverlay.cancel,action:le,proceedButtonVariant:"danger",isLoading:I==="removeUsers",isDisabled:I==="removeUsers",style:{background:G.colors.overlayColor},children:e.person?.user!=null?s.jsxs(s.Fragment,{children:[s.jsx(ze,{}),s.jsx(Be,{children:s.jsx(Ue,{src:e.person?.user.photo?.toString()??he,alt:e.person?.user.userId,loading:"lazy"})})]}):null}):null,s.jsx(ve,{title:se,backgroundColor:G.colors.grey4,style:{zIndex:4},onCloseClick:O,isTitleAlignLeft:j==="small"}),s.jsxs(_e,{"data-testid":U("edit-people-page-container"),windowSize:j,ref:te,children:[s.jsxs(Le,{children:[s.jsx(xe,{personBasic:e.person?.user,styles:{height:r.sp6,width:r.sp6}}),s.jsxs(Te,{children:[s.jsx(Ee,{children:e.person?.user?.firstName?s.jsxs(Se,{children:[e.person?.user?.firstName??""," ",e.person?.user?.lastName??""]}):null}),s.jsx(Ne,{className:"delete-icon-wrapper","data-testid":U("edit-people-page-delete-icon-wrapper"),onClick:ne,children:s.jsx($e,{style:{padding:"2px 5px"},enterDelay:600,title:a.deleteOverlay.title,placement:"top",children:s.jsx(De,{windowsize:j})})})]})]}),s.jsx(be,{...l,children:s.jsx("form",{id:`${W}_form`,onSubmit:re,children:s.jsx(Ie,{control:l.control,sectionId:w,deleteConfirmationIndex:H,updateDeleteConfirmationIndex:ee,mode:d,isZeniTenant:T,classList:R,managersList:u,controllersList:P,customerRoleOptions:S,isBankingOnlyTenant:y,isCardsOnlyTenant:v,isEdit:!0,person:e.person,analytics:z})})})]}),s.jsx(we,{formId:`${W}_form`,"data-testid":U("edit-people-page-footer"),primaryBtn:{label:a.invitePage.update,style:{width:C.buttonWidth.value(j)},isLoading:e.updatePersonState.fetchState==="In-Progress",isDisabled:e.updatePersonState.fetchState==="In-Progress"},showCancel:!0,cancelBtn:{label:a.invitePage.cancel,style:{width:C.buttonWidth.value(j)},shouldResetOnCancel:!1,onClick:O},separatorStyle:{marginRight:r.sp4}})]})},J=(e,u,R,P,d,T,O)=>{const k=R.map(m=>({label:m.fullyQualifiedAccountingClassName??"",value:m.classId,hoverText:m.accountingClassNumber}));return{[w]:[{userIndex:0,email:e[0].email,role:P==="zeni_only"?{allOptions:Pe.roles,selectedOptions:e[0]?.role}:void 0,nonZeniRole:P!=="zeni_only"?{userRole:{selectedRole:Ce(e[0]?.role),allRootRole:je(T,O)},productsByUserRole:Re(e[0]?.role,d)}:void 0,manager:{allUsers:u,selectedUser:e[0]?.managerId?e[0]?.managerId:"no_manager"},department:{allOptions:k,selectedOption:k.find(m=>m.value===e[0]?.departmentId)}}]}},es=(e,u)=>`${e}.${u}`,_e=n.div`
2
+ display: flex;
3
+ flex-direction: column;
4
+ background-color: ${e=>e.theme.colors.grey4};
5
+ padding-left: ${e=>`${C.containerPaddingLeft.valuePx(e.windowSize)}`};
6
+ padding-right: ${e=>`${C.containerPaddingRight.valuePx(e.windowSize)}`};
7
+ overflow-x: hidden;
8
+ height: 100%;
9
+ padding-top: ${e=>`${C.containerPaddingTop.valuePx(e.windowSize)}`};
10
+ gap: ${r.sp2};
11
+ `,Te=n.div`
12
+ display: flex;
13
+ flex-direction: row;
14
+ justify-content: space-between;
15
+ align-items: center;
16
+ gap: 5px;
17
+ flex: 1;
18
+ `,Ee=n.div``,Se=n(Oe)`
19
+ color: ${e=>e.theme.colors.primary};
20
+ `,Le=n.div`
21
+ display: flex;
22
+ gap: ${r.sp2};
23
+ align-items: center;
24
+ margin: ${r.sp0} ${r.sp1};
25
+ `,Be=n.div`
26
+ position: absolute;
27
+ top: -26px;
28
+ `,Ue=n.img`
29
+ height: 60px;
30
+ width: 60px;
31
+ border-radius: 50%;
32
+ color: ${e=>e.theme.colors.hero};
33
+ `,ze=n.div`
34
+ position: absolute;
35
+ top: 1%;
36
+ left: 50%;
37
+ transform: translate(-50%, -50%);
38
+ height: 62px;
39
+ width: ${r.sp9};
40
+ border-radius: 50% 50% 0 0;
41
+ background-color: ${e=>e.theme.colors.grey5};
42
+ `,De=n(ke)`
43
+ width: ${r.sp3};
44
+ height: ${r.sp3};
45
+ cursor: pointer;
46
+ color: ${e=>e.windowsize==="small"?M.important:e.theme.colors.hero};
47
+ &:hover {
48
+ color: ${M.important};
49
+ }
50
+ `,Ne=n.div`
51
+ width: ${r.sp3};
52
+ height: ${r.sp3};
53
+ cursor: pointer;
54
+ position: relative;
55
+ `;export{He as default,es as uniqueName};
@@ -1,10 +1,10 @@
1
- import{aP as ri,d as ft,ax as xt,aa as tn,az as ki,l as ee,F as we,aC as nn,q as ze,gu as Xn,gw as eo,gx as to,j as t,gQ as io,ad as on,cE as si,cF as an,cG as rn,aM as K,o as i,y as d,bG as Ii,bt as no,dO as oo,gy as ao,gJ as ln,gE as Di,aQ as sn,ap as dn,gF as ro,gR as Ve,eS as Ge,fg as di,gS as zt,L as wt,gT as lo,p as j,_ as cn,ar as ci,u as a,bC as so,gH as co,cU as uo,eZ as ui,gU as Bt,fv as $e,fx as ve,cW as mi,d4 as ot,eE as mo,fu as un,b as Rt,cZ as mn,cY as nt,dc as je,ai as pi,gV as po,fL as ho,cT as go,aU as Ti,fH as yo,bB as bo,ba as pn,r as fo,eD as xo,b7 as Mt,gz as wo,c8 as hn,B as hi,M as gn,de as yn,cx as Ft,fb as So,b9 as $o,di as vo,fC as Co,am as gi,n as ji,c6 as bn,b1 as Oi,db as ko,an as Io,d0 as fn,aN as Do,gW as xn,gX as li,gp as Pi,gY as Lt,da as To,gt as jo,bQ as Oo,d9 as Po}from"./index-CUpJHznP.js";import{b as $,n,w as Ct}from"./vendor-Bs1fkIUX.js";import{_ as Ro}from"./liveblocks-8ht9CoL5.js";import wn from"./InvoiceUploadSection-B2ePrdY8-CUZ5YkU9.js";import{r as Lo,f as At,d as bt,p as yi,u as Ri,h as De}from"./types-DyvtCprH-BcZYcgaq.js";import{I as Ao}from"./LabeledCreatableSingleSelectField-B6Vit6ZA-Bdnw6feS.js";import{S as zo}from"./CurrencySelectField-PjVnHOPO-De5v3EBh.js";import{e as Bo}from"./BankAccountSection-SGI34h8u-BmPo8uGy.js";import{W as Mo,F as Fo}from"./BankAccountWarningSection-BYhi53r4-4douKQRZ.js";import{o as Eo}from"./radio-default-CiSgisfh-Cuu8ymvq.js";import"./mui-Ty75qFQF.js";import"./analytics-BbBRZ6cw.js";import"./routing-Dk1A2KYI.js";import"./sentry-BE5FTzpq.js";import"./redux-CEhZD0hA.js";import"./crypto-CK1x27Ua.js";import"./AttachmentView-jMWZdYNa-B4G6-utv.js";import"./uploadReceipts-Dp1dvCjf-Rghek-rE.js";const Fe=(e,o)=>`${e}.${o}`,Li={largeLabelWidth:new d(120,120,160),paddingBottom:new d(a[3],a[2])},{spendManagement:{reimbursement:{reimbursementDetail:Ie}},dateFormat:No,common:Wo}=we.getLocalizedStrings(),Uo=({lineIndex:e,mileage:o,classList:r,defaultCurrency:c,sectionId:p,isReimbursementCommentingEnabled:C,isDisabled:m,isAddReimbursementDisabled:v,companyMileageConfigInfo:f,reimbursementId:l,classHierarchyList:k})=>{const x=ze(),s=xt(),y=Bt(),S=`dashboard_${s.currentTenant?.companyId}`,O=ft(),{formState:{errors:I},getValues:P,trigger:q}=ot(),R=Wo.strings.empty,D=P(Fe(p,"distanceInMiles")),z=Li.largeLabelWidth.value(x),te=P(Fe(p,"class")),ne=r.find(A=>A.classId===te?.selectedOption),oe=Fe(p,"class"),Y=je(I,oe);$.useEffect(()=>{te?.selectedOption!=null&&(ne?.isDeleted===!0||Y)&&q(oe)},[te?.selectedOption,ne?.isDeleted,r,oe,q]);const G={application:"dashboard",companyId:s.currentTenant?.companyId,tab:"reimbursement",entityId:l},F=A=>r.filter(ae=>ae.classId===A)[0]?.accountingClassNumber,Z=r.find(A=>A.classId===o.class),H={valueContainer:A=>({...A,padding:`2px ${i.sp3} !important`,overflow:"unset"}),singleValue:()=>({margin:0})};return t.jsxs(t.Fragment,{children:[t.jsx($e,{isThreadAllowed:C&&l!=null,dashboardTabKey:ve({type:"details",key:`${e}.mileage.transactionDate`}),roomId:S,companyId:s.currentTenant?.companyId??R,companyName:s.currentTenant?.companyName??R,entityId:l,dashboardOptionType:"reimbursement",filterMetaData:{...G,entityType:`reimbursement.details.${De("transactionDate",e,"mileage")}`},fieldThreadTargetElement:y?.sharedRef?.contentWrapperRef,children:t.jsx(fn,{isDisabled:m,label:{label:Ie.transactionDate,width:z},style:{paddingBottom:Li.paddingBottom.valuePx(x),width:"auto"},dateField:{name:Fe(p,"transactionDate"),placeholder:Ie.datePlaceholder,defaultValue:o?.transactionDate,dateFormat:No.visual.defaultInput,autoComplete:"off",maxDate:ee.dateNow(),registerOptions:{required:!0,validate:A=>!!A}}})}),t.jsx(kt,{}),t.jsx($e,{isThreadAllowed:C&&l!=null,dashboardTabKey:ve({type:"details",key:`${e}.mileage.distanceInMiles`}),roomId:S,companyId:s.currentTenant?.companyId??R,companyName:s.currentTenant?.companyName??R,entityId:l,dashboardOptionType:"reimbursement",filterMetaData:{...G,entityType:`reimbursement.details.${De("distanceInMiles",e,"mileage")}`},fieldThreadTargetElement:y?.sharedRef?.contentWrapperRef,children:t.jsx(Pi,{isDisabled:v?"disabled":void 0,style:{width:"auto"},label:{label:Ie.distanceInMiles,width:z},formattedTextField:{type:"number",name:Fe(p,"distanceInMiles"),placeholder:Ie.addMiles,defaultValue:o.distanceInMiles,registerOptions:{required:!0,validate:A=>A!=null?A>0:!0,min:.01},returnValueType:"floatValue",allowNegative:!1,isNumericString:!1,decimalScale:2}})}),t.jsx(kt,{}),t.jsx($e,{isThreadAllowed:C&&l!=null,dashboardTabKey:ve({type:"details",key:`${e}.mileage.amount`}),roomId:S,companyId:s.currentTenant?.companyId??R,companyName:s.currentTenant?.companyName??R,entityId:l,dashboardOptionType:"reimbursement",filterMetaData:{...G,entityType:`reimbursement.details.${De("amount",e,"mileage")}`},fieldThreadTargetElement:y?.sharedRef?.contentWrapperRef,children:t.jsx(Pi,{isDisabled:"disabled",label:{label:Ie.amount,width:z},formattedTextField:{type:"number",name:Fe(`${p}.amount`,"amount"),defaultValue:o.amount?.amount,placeholder:nt(Ie.amount),returnValueType:"floatValue",prefix:o.amount?.currencySymbol,allowNegative:!1,isNumericString:!1,registerOptions:{required:!0,validate:A=>A!=null?A>0:!0},autoComplete:"off",decimalSeparator:".",decimalScale:2,fixedDecimalScale:!1,thousandSeparator:!0},style:{width:"auto"},additionalInfoLabel:D!=null&&f?.mileageUnitAmount!=null?`${c.currencySymbol}${f?.mileageUnitAmount} per mile x ${D}`:void 0})}),t.jsx(kt,{}),t.jsx($e,{isThreadAllowed:C&&l!=null,dashboardTabKey:ve({type:"details",key:`${e}.mileage.memo`}),roomId:S,companyId:s.currentTenant?.companyId??R,companyName:s.currentTenant?.companyName??R,entityId:l,dashboardOptionType:"reimbursement",filterMetaData:{...G,entityType:`reimbursement.details.${De("memo",e,"mileage")}`},fieldThreadTargetElement:y?.sharedRef?.contentWrapperRef,children:t.jsx(mi,{isDisabled:m,label:{label:Ie.memo,width:z},style:{width:"auto"},text:{type:"text",name:Fe(p,"memo"),placeholder:nt(Ie.memo),defaultValue:o.memo,autoComplete:"off",options:{pattern:xn}}})}),t.jsx(kt,{}),t.jsx($e,{isThreadAllowed:C&&l!=null,dashboardTabKey:ve({type:"details",key:`${e}.mileage.class`}),roomId:S,companyId:s.currentTenant?.companyId??R,companyName:s.currentTenant?.companyName??R,entityId:l,dashboardOptionType:"reimbursement",filterMetaData:{...G,entityType:`reimbursement.details.${De("class",e,"mileage")}`},fieldThreadTargetElement:y?.sharedRef?.contentWrapperRef,style:{borderRadius:`0 0 ${i.sp2} ${i.sp2}`},children:t.jsx(li,{isLoading:!1,label:{label:Ie.department,width:z},additionalLabelInfo:ne?.isDeleted===!0&&je(I,Fe(p,"class"))?Ie.deletedClassError:void 0,groupedSingleSelectField:{shouldShowChevronIcon:!1,name:Fe(p,"class"),placeholder:nt(Ie.department),valueToId:A=>F(A),defaultValue:{selectedOption:Z?.classId,allOptions:Ge(k,[])},style:{width:"100%"},customStyleConfig:H,registerOptions:{required:!0,validate:A=>A?.selectedOption==null?!1:r.find(ae=>ae.classId===A?.selectedOption)?.isDeleted===!0?Ie.deletedClassError:!0}},style:{borderBottom:`1px solid ${O.colors.grey3}`,borderBottomLeftRadius:i.sp2,borderBottomRightRadius:i.sp2},fullWidthSelect:!0},Fe(p,"class"))})]})},kt=n.div`
1
+ import{aP as ri,d as ft,ax as wt,aa as tn,az as ki,l as ee,F as xe,aC as nn,q as ze,gu as Xn,gw as eo,gx as to,j as t,gQ as io,ad as on,cE as si,cF as an,cG as rn,aM as K,o as i,y as d,bG as Ii,bt as no,dO as oo,gy as ao,gJ as ln,gE as Di,aQ as sn,ap as dn,gF as ro,gR as Ve,eS as Ge,fg as di,gS as zt,k as xt,gT as lo,p as j,L as cn,ar as ci,u as a,bC as so,gH as co,cU as uo,eZ as ui,gU as Bt,fv as $e,fx as ve,cW as mi,d4 as ot,eE as mo,fu as un,b as Rt,cZ as mn,cY as nt,dc as je,ai as pi,gV as po,fL as ho,cT as go,aU as Ti,fH as yo,bB as bo,ba as pn,r as fo,eD as wo,b7 as Mt,gz as xo,c8 as hn,B as hi,M as gn,de as yn,cx as Ft,fb as So,b9 as $o,di as vo,fC as Co,am as gi,n as ji,c6 as bn,b1 as Oi,db as ko,an as Io,d0 as fn,aN as Do,gW as wn,gX as li,gp as Pi,gY as Lt,da as To,gt as jo,bQ as Oo,d9 as Po}from"./index-CN7UAWAg.js";import{b as $,n,w as Ct}from"./vendor-Bs1fkIUX.js";import{_ as Ro}from"./liveblocks-8ht9CoL5.js";import xn from"./InvoiceUploadSection-BqpspjSO-DbodpMov.js";import{r as Lo,f as At,d as bt,p as yi,u as Ri,h as De}from"./types-DyvtCprH-BcZYcgaq.js";import{I as Ao}from"./LabeledCreatableSingleSelectField-DXA_bSyS-BJinmWca.js";import{S as zo}from"./CurrencySelectField-C8L9A7zC-DLDLvWwm.js";import{e as Bo}from"./BankAccountSection-IncAN4Fp-_HbGSxHo.js";import{W as Mo,F as Fo}from"./BankAccountWarningSection-B5zw3yYg-D0pN9DqK.js";import{o as Eo}from"./radio-default-CiSgisfh-Cuu8ymvq.js";import"./mui-Ty75qFQF.js";import"./analytics-BbBRZ6cw.js";import"./routing-Dk1A2KYI.js";import"./sentry-BE5FTzpq.js";import"./redux-CEhZD0hA.js";import"./crypto-CK1x27Ua.js";import"./AttachmentView-C5nZKhTq-vO_X412a.js";import"./uploadReceipts-Dp1dvCjf-CdBFemgP.js";const Fe=(e,o)=>`${e}.${o}`,Li={largeLabelWidth:new d(120,120,160),paddingBottom:new d(a[3],a[2])},{spendManagement:{reimbursement:{reimbursementDetail:Ie}},dateFormat:No,common:Wo}=xe.getLocalizedStrings(),Uo=({lineIndex:e,mileage:o,classList:r,defaultCurrency:c,sectionId:p,isReimbursementCommentingEnabled:C,isDisabled:m,isAddReimbursementDisabled:v,companyMileageConfigInfo:f,reimbursementId:l,classHierarchyList:k})=>{const w=ze(),s=wt(),y=Bt(),S=`dashboard_${s.currentTenant?.companyId}`,O=ft(),{formState:{errors:I},getValues:P,trigger:q}=ot(),R=Wo.strings.empty,D=P(Fe(p,"distanceInMiles")),z=Li.largeLabelWidth.value(w),te=P(Fe(p,"class")),ne=r.find(A=>A.classId===te?.selectedOption),oe=Fe(p,"class"),Z=je(I,oe);$.useEffect(()=>{te?.selectedOption!=null&&(ne?.isDeleted===!0||Z)&&q(oe)},[te?.selectedOption,ne?.isDeleted,r,oe,q]);const G={application:"dashboard",companyId:s.currentTenant?.companyId,tab:"reimbursement",entityId:l},F=A=>r.filter(ae=>ae.classId===A)[0]?.accountingClassNumber,Y=r.find(A=>A.classId===o.class),H={valueContainer:A=>({...A,padding:`2px ${i.sp3} !important`,overflow:"unset"}),singleValue:()=>({margin:0})};return t.jsxs(t.Fragment,{children:[t.jsx($e,{isThreadAllowed:C&&l!=null,dashboardTabKey:ve({type:"details",key:`${e}.mileage.transactionDate`}),roomId:S,companyId:s.currentTenant?.companyId??R,companyName:s.currentTenant?.companyName??R,entityId:l,dashboardOptionType:"reimbursement",filterMetaData:{...G,entityType:`reimbursement.details.${De("transactionDate",e,"mileage")}`},fieldThreadTargetElement:y?.sharedRef?.contentWrapperRef,children:t.jsx(fn,{isDisabled:m,label:{label:Ie.transactionDate,width:z},style:{paddingBottom:Li.paddingBottom.valuePx(w),width:"auto"},dateField:{name:Fe(p,"transactionDate"),placeholder:Ie.datePlaceholder,defaultValue:o?.transactionDate,dateFormat:No.visual.defaultInput,autoComplete:"off",maxDate:ee.dateNow(),registerOptions:{required:!0,validate:A=>!!A}}})}),t.jsx(kt,{}),t.jsx($e,{isThreadAllowed:C&&l!=null,dashboardTabKey:ve({type:"details",key:`${e}.mileage.distanceInMiles`}),roomId:S,companyId:s.currentTenant?.companyId??R,companyName:s.currentTenant?.companyName??R,entityId:l,dashboardOptionType:"reimbursement",filterMetaData:{...G,entityType:`reimbursement.details.${De("distanceInMiles",e,"mileage")}`},fieldThreadTargetElement:y?.sharedRef?.contentWrapperRef,children:t.jsx(Pi,{isDisabled:v?"disabled":void 0,style:{width:"auto"},label:{label:Ie.distanceInMiles,width:z},formattedTextField:{type:"number",name:Fe(p,"distanceInMiles"),placeholder:Ie.addMiles,defaultValue:o.distanceInMiles,registerOptions:{required:!0,validate:A=>A!=null?A>0:!0,min:.01},returnValueType:"floatValue",allowNegative:!1,isNumericString:!1,decimalScale:2}})}),t.jsx(kt,{}),t.jsx($e,{isThreadAllowed:C&&l!=null,dashboardTabKey:ve({type:"details",key:`${e}.mileage.amount`}),roomId:S,companyId:s.currentTenant?.companyId??R,companyName:s.currentTenant?.companyName??R,entityId:l,dashboardOptionType:"reimbursement",filterMetaData:{...G,entityType:`reimbursement.details.${De("amount",e,"mileage")}`},fieldThreadTargetElement:y?.sharedRef?.contentWrapperRef,children:t.jsx(Pi,{isDisabled:"disabled",label:{label:Ie.amount,width:z},formattedTextField:{type:"number",name:Fe(`${p}.amount`,"amount"),defaultValue:o.amount?.amount,placeholder:nt(Ie.amount),returnValueType:"floatValue",prefix:o.amount?.currencySymbol,allowNegative:!1,isNumericString:!1,registerOptions:{required:!0,validate:A=>A!=null?A>0:!0},autoComplete:"off",decimalSeparator:".",decimalScale:2,fixedDecimalScale:!1,thousandSeparator:!0},style:{width:"auto"},additionalInfoLabel:D!=null&&f?.mileageUnitAmount!=null?`${c.currencySymbol}${f?.mileageUnitAmount} per mile x ${D}`:void 0})}),t.jsx(kt,{}),t.jsx($e,{isThreadAllowed:C&&l!=null,dashboardTabKey:ve({type:"details",key:`${e}.mileage.memo`}),roomId:S,companyId:s.currentTenant?.companyId??R,companyName:s.currentTenant?.companyName??R,entityId:l,dashboardOptionType:"reimbursement",filterMetaData:{...G,entityType:`reimbursement.details.${De("memo",e,"mileage")}`},fieldThreadTargetElement:y?.sharedRef?.contentWrapperRef,children:t.jsx(mi,{isDisabled:m,label:{label:Ie.memo,width:z},style:{width:"auto"},text:{type:"text",name:Fe(p,"memo"),placeholder:nt(Ie.memo),defaultValue:o.memo,autoComplete:"off",options:{pattern:wn}}})}),t.jsx(kt,{}),t.jsx($e,{isThreadAllowed:C&&l!=null,dashboardTabKey:ve({type:"details",key:`${e}.mileage.class`}),roomId:S,companyId:s.currentTenant?.companyId??R,companyName:s.currentTenant?.companyName??R,entityId:l,dashboardOptionType:"reimbursement",filterMetaData:{...G,entityType:`reimbursement.details.${De("class",e,"mileage")}`},fieldThreadTargetElement:y?.sharedRef?.contentWrapperRef,style:{borderRadius:`0 0 ${i.sp2} ${i.sp2}`},children:t.jsx(li,{isLoading:!1,label:{label:Ie.department,width:z},additionalLabelInfo:ne?.isDeleted===!0&&je(I,Fe(p,"class"))?Ie.deletedClassError:void 0,groupedSingleSelectField:{shouldShowChevronIcon:!1,name:Fe(p,"class"),placeholder:nt(Ie.department),valueToId:A=>F(A),defaultValue:{selectedOption:Y?.classId,allOptions:Ge(k,[])},style:{width:"100%"},customStyleConfig:H,registerOptions:{required:!0,validate:A=>A?.selectedOption==null?!1:r.find(ae=>ae.classId===A?.selectedOption)?.isDeleted===!0?Ie.deletedClassError:!0}},style:{borderBottom:`1px solid ${O.colors.grey3}`,borderBottomLeftRadius:i.sp2,borderBottomRightRadius:i.sp2},fullWidthSelect:!0},Fe(p,"class"))})]})},kt=n.div`
2
2
  display: flex;
3
3
  flex: 1;
4
4
  background-color: ${e=>e.theme.colors.grey3};
5
5
  min-height: 1px;
6
6
  max-height: 1px;
7
- `,Ai={amounWidth:new d(50,30),currencyWidth:new d(50,70)};function _o({name:e,placeHolder:o,defaultValue:r,isDisabled:c,showAmountCurrencyError:p,style:C,allCurrencies:m}){const[v,f]=$.useState(!1),{getValues:l,formState:{errors:k}}=ot(),x=ft(),s=ze(),y=c!=null,S=l(e),O=`${S?.amount} ${S?.currency?.selectedOption}`,I=je(k,e)&&Lt(k,`${e}.amount`)!=null,P=je(k,e)&&Lt(k,`${e}.currency`)!=null,q=p===!0?I||P:!1,R=!q&&v===!1;return $.useEffect(()=>{R===!1&&f(!0)},[R]),t.jsx(dn,{onClickAway:()=>y===!1&&!q&&f(!1),children:t.jsx(Ho,{style:C,isDisabled:y,tabIndex:R&&!y?0:void 0,onClick:()=>y===!1&&f(!0),"data-testid":K("currency-amount-field",e),children:t.jsxs(t.Fragment,{children:[S?.amount!=null?t.jsx(zi,{className:"amount-field",isVisible:R,children:O}):t.jsx(zi,{className:"amount-field amount-placeholder",isVisible:R,children:o?.name}),t.jsxs(Vo,{isVisible:!R,children:[t.jsx(jo,{type:"number",name:`${e}.amount`,defaultValue:r?.amount,placeholder:o?.amount,returnValueType:"floatValue",allowNegative:!1,isNumericString:!1,registerOptions:{required:!0,validate:D=>D!=null?D>0:!0},autoComplete:"off",decimalSeparator:".",decimalScale:2,fixedDecimalScale:!1,thousandSeparator:!0,isDisabled:c,style:{display:"flex",flexGrow:1,width:Ai.amounWidth.valuePercentage(s),cursor:"inherit"},bgColor:x.colors.background,isFieldError:I,shouldHighlightZeroAmount:!0}),R?null:t.jsx(Ko,{}),t.jsx(zo,{name:`${e}.currency`,registerOptions:{validate:D=>D!=null&&D.selectedOption!=null},defaultValue:{allOptions:m.map(D=>({label:s==="small"?D.currencyCode:`${D.currencyCode} - ${D.currency}`,value:D.currencyCode,countryCode:D.countryCode})),selectedOption:r?.currencyCode},controlStyle:{justifyContent:"flex-start",backgroundColor:x.colors.background},isDisabled:c,style:{width:Ai.currencyWidth.valuePercentage(s),flexGrow:1},isOptionRemovable:!1})]})]})})})}const Vo=n.div`
7
+ `,Ai={amounWidth:new d(50,30),currencyWidth:new d(50,70)};function _o({name:e,placeHolder:o,defaultValue:r,isDisabled:c,showAmountCurrencyError:p,style:C,allCurrencies:m}){const[v,f]=$.useState(!1),{getValues:l,formState:{errors:k}}=ot(),w=ft(),s=ze(),y=c!=null,S=l(e),O=`${S?.amount} ${S?.currency?.selectedOption}`,I=je(k,e)&&Lt(k,`${e}.amount`)!=null,P=je(k,e)&&Lt(k,`${e}.currency`)!=null,q=p===!0?I||P:!1,R=!q&&v===!1;return $.useEffect(()=>{R===!1&&f(!0)},[R]),t.jsx(dn,{onClickAway:()=>y===!1&&!q&&f(!1),children:t.jsx(Ho,{style:C,isDisabled:y,tabIndex:R&&!y?0:void 0,onClick:()=>y===!1&&f(!0),"data-testid":K("currency-amount-field",e),children:t.jsxs(t.Fragment,{children:[S?.amount!=null?t.jsx(zi,{className:"amount-field",isVisible:R,children:O}):t.jsx(zi,{className:"amount-field amount-placeholder",isVisible:R,children:o?.name}),t.jsxs(Vo,{isVisible:!R,children:[t.jsx(jo,{type:"number",name:`${e}.amount`,defaultValue:r?.amount,placeholder:o?.amount,returnValueType:"floatValue",allowNegative:!1,isNumericString:!1,registerOptions:{required:!0,validate:D=>D!=null?D>0:!0},autoComplete:"off",decimalSeparator:".",decimalScale:2,fixedDecimalScale:!1,thousandSeparator:!0,isDisabled:c,style:{display:"flex",flexGrow:1,width:Ai.amounWidth.valuePercentage(s),cursor:"inherit"},bgColor:w.colors.background,isFieldError:I,shouldHighlightZeroAmount:!0}),R?null:t.jsx(Ko,{}),t.jsx(zo,{name:`${e}.currency`,registerOptions:{validate:D=>D!=null&&D.selectedOption!=null},defaultValue:{allOptions:m.map(D=>({label:s==="small"?D.currencyCode:`${D.currencyCode} - ${D.currency}`,value:D.currencyCode,countryCode:D.countryCode})),selectedOption:r?.currencyCode},controlStyle:{justifyContent:"flex-start",backgroundColor:w.colors.background},isDisabled:c,style:{width:Ai.currencyWidth.valuePercentage(s),flexGrow:1},isOptionRemovable:!1})]})]})})})}const Vo=n.div`
8
8
  display: ${e=>e.isVisible?"flex":"none"};
9
9
  width: 100%;
10
10
  input {
@@ -37,7 +37,7 @@ import{aP as ri,d as ft,ax as xt,aa as tn,az as ki,l as ee,F as we,aC as nn,q as
37
37
  &.amount-placeholder {
38
38
  color: ${e=>e.theme.colors.grey1};
39
39
  }
40
- `,Ue={width:new d(343,580,726),height:new d(a[6],a[6]),controlHeight:new d(a[6],a[6]),paddingTopBottom:new d(a[2],a[2]),marginRight:new d(a[2],a[2]),labelMarginLeft:new d(a[3],a[4]),labelMarginRight:new d(a[3],a[4]),labelMarginTop:new d(a[2],a[2])},Sn={infoLabel:new hi("extraSmallRegular","smallRegular")};function qo({isDisabled:e,label:o,currencyAmountField:r,style:c,errorInfoLabel:p,isAdditionalInfoLabelLoading:C,showAdditionalLabelTooltip:m=!1,additionalLabelTooltip:v,additionalInfoLabel:f,showAdditionalInfoLabel:l=!0}){const k=ze(),{formState:{errors:x}}=ot(),s=je(x,r.name)&&Lt(x,`${r.name}.amount`)!=null,y=je(x,r.name)&&Lt(x,`${r.name}.currency`)!=null,S=r.showAmountCurrencyError===!0?s||y:!1,O=s||y||S,I=()=>{if(C===!0)return t.jsx(Qo,{children:t.jsx(wt,{size:"Small",start:!0})});if(l&&f||S){let P=null;return m===!0&&l&&f&&(P=t.jsx(bn,{placement:k==="small"?"bottom":"right",maxWidth:"364px",title:t.jsx(Zo,{children:v??""}),children:t.jsx(ea,{children:t.jsx(ta,{})})})),t.jsxs(Xo,{size:k,isError:S,hasToolTip:m,children:[P,f]})}};return t.jsxs(Go,{size:k,style:c,isDisabled:e!=null,isAmountError:s,isCurrencyError:y,"data-testid":K("labeled-currency-amount-field",r.name),children:[t.jsx(To,{isDisabled:e,label:o.label,htmlFor:r.name,style:{marginLeft:Ue.labelMarginLeft.value(k),marginRight:Ue.labelMarginRight.value(k),marginTop:Ue.labelMarginTop.value(k),width:o.width??"auto"}}),t.jsxs(Yo,{labelWidth:o.width,children:[t.jsx(_o,{...r,isDisabled:e,style:{flexGrow:1,height:Ue.controlHeight.value(k)}}),O?t.jsx(Jo,{size:k,hasError:O,children:p}):null,I()]})]})}const Go=n.div`
40
+ `,Ue={width:new d(343,580,726),height:new d(a[6],a[6]),controlHeight:new d(a[6],a[6]),paddingTopBottom:new d(a[2],a[2]),marginRight:new d(a[2],a[2]),labelMarginLeft:new d(a[3],a[4]),labelMarginRight:new d(a[3],a[4]),labelMarginTop:new d(a[2],a[2])},Sn={infoLabel:new hi("extraSmallRegular","smallRegular")};function qo({isDisabled:e,label:o,currencyAmountField:r,style:c,errorInfoLabel:p,isAdditionalInfoLabelLoading:C,showAdditionalLabelTooltip:m=!1,additionalLabelTooltip:v,additionalInfoLabel:f,showAdditionalInfoLabel:l=!0}){const k=ze(),{formState:{errors:w}}=ot(),s=je(w,r.name)&&Lt(w,`${r.name}.amount`)!=null,y=je(w,r.name)&&Lt(w,`${r.name}.currency`)!=null,S=r.showAmountCurrencyError===!0?s||y:!1,O=s||y||S,I=()=>{if(C===!0)return t.jsx(Qo,{children:t.jsx(xt,{size:"Small",start:!0})});if(l&&f||S){let P=null;return m===!0&&l&&f&&(P=t.jsx(bn,{placement:k==="small"?"bottom":"right",maxWidth:"364px",title:t.jsx(Yo,{children:v??""}),children:t.jsx(ea,{children:t.jsx(ta,{})})})),t.jsxs(Xo,{size:k,isError:S,hasToolTip:m,children:[P,f]})}};return t.jsxs(Go,{size:k,style:c,isDisabled:e!=null,isAmountError:s,isCurrencyError:y,"data-testid":K("labeled-currency-amount-field",r.name),children:[t.jsx(To,{isDisabled:e,label:o.label,htmlFor:r.name,style:{marginLeft:Ue.labelMarginLeft.value(k),marginRight:Ue.labelMarginRight.value(k),marginTop:Ue.labelMarginTop.value(k),width:o.width??"auto"}}),t.jsxs(Zo,{labelWidth:o.width,children:[t.jsx(_o,{...r,isDisabled:e,style:{flexGrow:1,height:Ue.controlHeight.value(k)}}),O?t.jsx(Jo,{size:k,hasError:O,children:p}):null,I()]})]})}const Go=n.div`
41
41
  display: flex;
42
42
  flex-direction: row;
43
43
  align-items: flex-start;
@@ -110,13 +110,13 @@ import{aP as ri,d as ft,ax as xt,aa as tn,az as ki,l as ee,F as we,aC as nn,q as
110
110
  ${e=>`${Sn.infoLabel.style(e.size)}`};
111
111
  padding-right: ${i.sp3};
112
112
  text-align: right;
113
- `,Yo=n.div`
113
+ `,Zo=n.div`
114
114
  display: flex;
115
115
  width: ${e=>e.labelWidth!=null?`calc(100% - ${e.labelWidth}px)`:"auto"};
116
116
  justify-content: flex-end;
117
117
  flex-direction: column;
118
118
  position: relative;
119
- `,Zo=n(pi)`
119
+ `,Yo=n(pi)`
120
120
  padding: 12px;
121
121
  color: ${e=>e.theme.colors.grey1};
122
122
  background: ${e=>e.theme.colors.overlayColor};
@@ -146,7 +146,7 @@ import{aP as ri,d as ft,ax as xt,aa as tn,az as ki,l as ee,F as we,aC as nn,q as
146
146
  width: ${i.sp3};
147
147
  height: ${i.sp3};
148
148
  color: inherit;
149
- `,ye=(e,o)=>`${e}.${o}`,Ot={largeLabelWidth:new d(120,120,160),smallLabelWidth:new d(85,85,160),paddingBottom:new d(a[3],a[2]),autoFillIconLeft:new d(-8,-24)},{dateFormat:ia,common:$n,spendManagement:{reimbursement:{reimbursementDetail:ie}}}=we.getLocalizedStrings(),{strings:{empty:se}}=$n,na=(e,o)=>{const r=e.slice(1);let c=!1;return r.forEach(p=>{p.account?.qboId!=null&&p.account?.qboId===o&&(c=!0)}),c},oa=e=>e.charAt(0).toLowerCase()+e.slice(1),aa=({lineIndex:e,outOfPocket:o,accountList:r,classList:c,merchantList:p,isAddReimbursementDisabled:C,sectionId:m,isReimbursementCommentingEnabled:v,isDisabled:f,autoFields:l=[],accountsHierarchyList:k,classHierarchyList:x,reimbursementId:s,tentativeMerchantName:y,allCurrencies:S,uncategorizedAccounts:O})=>{const I=ze(),P=xt(),q=Bt(),R=ft(),{formState:{errors:D},getValues:z,trigger:te}=ot(),ne=z(ye(m,"class")),oe=c.find(h=>h.classId===ne?.selectedOption),Y=ye(m,"class"),G=je(D,Y),F=z(ye(m,"account")),Z=r.find(h=>h.qboId===F?.selectedOption||h.accountId===F?.selectedOption),H=ye(m,"account"),A=je(D,H);$.useEffect(()=>{ne?.selectedOption!=null&&(oe?.isDeleted===!0||G)&&te(Y)},[ne?.selectedOption,oe?.isDeleted,c,Y,te]),$.useEffect(()=>{F?.selectedOption!=null&&(Z?.isDeleted===!0||A)&&te(H)},[F?.selectedOption,Z?.isDeleted,r,H,te]);const ae=o.isCategoryUpdateSelected!=null&&o.recommendedAccount!=null&&!o.isCategoryFirstTimeAutofilled&&!na(o.recommendations,o.account),de=o.isRetainedCategorySelected!=null&&o.retainedAccount!=null,U=Ot.largeLabelWidth.value(I),me=Ot.smallLabelWidth.value(I),Ne=p.map(h=>h.id??se),pe={application:"dashboard",companyId:P.currentTenant?.companyId,tab:"reimbursement",entityId:s},be=`dashboard_${P.currentTenant?.companyId}`,ce=h=>p.find(re=>re.id===h)?.name??h,Oe=r.find(h=>h.qboId===o.account),Pe=h=>[O.expense?.qboId,O.income?.qboId].includes(h),Re=c.find(h=>h.classId===o.class),he={valueContainer:h=>({...h,padding:`2px ${i.sp3} !important`,overflow:"unset"}),singleValue:()=>({margin:0})},Le=h=>r.filter(re=>re.qboId===h)[0]?.qboId,ge=h=>c.filter(re=>re.classId===h)[0]?.accountingClassNumber,Ce=we.getLocalizedStrings().spendManagement.reimbursement.reimbursementDetail.tooltip.category.replace("__based__",oa(o?.recommendedAccount?.reason??se)),Je=zt(k,o.recommendations);return t.jsxs(t.Fragment,{children:[y!=null||l.includes("merchant")?t.jsx(st,{children:t.jsx(ct,{windowSize:I,children:t.jsx(dt,{})})}):null,t.jsx($e,{isThreadAllowed:v&&s!=null,dashboardTabKey:ve({type:"details",key:`${e}.out_of_pocket.merchant`}),roomId:be,companyId:P.currentTenant?.companyId??se,companyName:P.currentTenant?.companyName??se,entityId:s,dashboardOptionType:"reimbursement",filterMetaData:{...pe,entityType:`reimbursement.details.${De("merchant",e,"out_of_pocket")}`},fieldThreadTargetElement:q?.sharedRef?.contentWrapperRef,children:t.jsx(Ao,{isDisabled:f!=null||C?"disabled":void 0,label:{label:ie.merchant,width:U},style:{width:"auto"},creatableSingleSelectField:{name:ye(m,"merchant"),placeholder:ie.merchantPlaceholder,defaultValue:{selectedOption:o.merchant??se,allOptions:Ne},registerOptions:{required:!0,validate:h=>!!h.selectedOption}},isOptionRemovable:!0,addIconInCreateLabel:!0,getLabelForId:ce})}),t.jsx(It,{}),l.includes("transactionDate")?t.jsx(st,{children:t.jsx(ct,{windowSize:I,children:t.jsx(dt,{})})}):null,t.jsx($e,{isThreadAllowed:v&&s!=null,dashboardTabKey:ve({type:"details",key:`${e}.out_of_pocket.transactionDate`}),roomId:be,companyId:P.currentTenant?.companyId??se,companyName:P.currentTenant?.companyName??se,entityId:s,dashboardOptionType:"reimbursement",filterMetaData:{...pe,entityType:`reimbursement.details.${De("transactionDate",e,"out_of_pocket")}`},fieldThreadTargetElement:q?.sharedRef?.contentWrapperRef,children:t.jsx(fn,{isDisabled:f,label:{label:ie.transactionDate,width:U},style:{paddingBottom:Ot.paddingBottom.valuePx(I),width:"auto"},dateField:{name:ye(m,"transactionDate"),placeholder:ie.datePlaceholder,defaultValue:o?.transactionDate,dateFormat:ia.visual.defaultInput,autoComplete:"off",maxDate:ee.dateNow(),registerOptions:{required:!0,validate:h=>!!h}}})}),t.jsx(It,{}),l.includes("amount")?t.jsx(st,{children:t.jsx(ct,{windowSize:I,isTwoLined:!0,children:t.jsx(dt,{})})}):null,t.jsx($e,{isThreadAllowed:v&&s!=null,dashboardTabKey:ve({type:"details",key:`${e}.out_of_pocket.amount`}),roomId:be,companyId:P.currentTenant?.companyId??se,companyName:P.currentTenant?.companyName??se,entityId:s,dashboardOptionType:"reimbursement",filterMetaData:{...pe,entityType:`reimbursement.details.${De("amount",e,"out_of_pocket")}`},fieldThreadTargetElement:q?.sharedRef?.contentWrapperRef,children:t.jsx(qo,{isDisabled:f!=null||C?"disabled":void 0,label:{label:ie.amount,width:me},style:{width:"auto"},currencyAmountField:{style:{height:i.sp6},name:`${m}.amount`,defaultValue:{amount:o.amount.amount,currencyCode:o.amount.currencyCode,currencySymbol:o.amount.currencySymbol},placeHolder:{amount:ie.addAmount,name:ie.addAmount},allCurrencies:S,showAmountCurrencyError:!0},showAdditionalInfoLabel:!0,showAdditionalLabelTooltip:!0,additionalLabelTooltip:ie.amountExchangeRateTooltip,isAdditionalInfoLabelLoading:o.isConvertedCurrencyLoading===!0,additionalInfoLabel:!nn(o.homeCurrencyDetails,o.amount)&&o.amount.currencyCode!==$n.currency.currencyCode&&o.homeCurrencyDetails?.amount!==0?`${Do("0,0[.]00",o.homeCurrencyDetails)} ${o.homeCurrencyDetails?.currencyCode}`:void 0})}),t.jsx(It,{}),l.includes("memo")?t.jsx(st,{children:t.jsx(ct,{windowSize:I,children:t.jsx(dt,{})})}):null,t.jsx($e,{isThreadAllowed:v&&s!=null,dashboardTabKey:ve({type:"details",key:`${e}.out_of_pocket.memo`}),roomId:be,companyId:P.currentTenant?.companyId??se,companyName:P.currentTenant?.companyName??se,entityId:s,dashboardOptionType:"reimbursement",filterMetaData:{...pe,entityType:`reimbursement.details.${De("memo",e,"out_of_pocket")}`},fieldThreadTargetElement:q?.sharedRef?.contentWrapperRef,children:t.jsx(mi,{isDisabled:f,label:{label:ie.memo,width:U},style:{width:"auto"},text:{type:"text",name:ye(m,"memo"),placeholder:nt(ie.memo),defaultValue:o.memo,autoComplete:"off",options:{pattern:xn}}})}),t.jsx(It,{}),l.includes("account")?t.jsx(st,{children:t.jsx(ct,{windowSize:I,children:t.jsx(dt,{})})}):null,t.jsx($e,{isThreadAllowed:v&&s!=null,dashboardTabKey:ve({type:"details",key:`${e}.out_of_pocket.account`}),roomId:be,companyId:P.currentTenant?.companyId??se,companyName:P.currentTenant?.companyName??se,entityId:s,dashboardOptionType:"reimbursement",filterMetaData:{...pe,entityType:`reimbursement.details.${De("account",e,"out_of_pocket")}`},fieldThreadTargetElement:q?.sharedRef?.contentWrapperRef,children:t.jsx(li,{label:{label:ie.category,width:U},additionalLabelInfo:Z?.isDeleted===!0&&je(D,ye(m,"account"))?ie.deletedCategoryError:void 0,groupedSingleSelectField:{shouldShowChevronIcon:ae||de,name:ye(m,"account"),placeholder:ie.categoryPlaceholder,valueToId:h=>Le(h),defaultValue:{selectedOption:Oe?.qboId??Oe?.accountId,allOptions:Je},style:{width:"100%"},customStyleConfig:he,registerOptions:{required:!0,validate:h=>h?.selectedOption==null?!1:r.find(re=>re.qboId===h?.selectedOption||re.accountId===h?.selectedOption)?.isDeleted===!0?ie.deletedCategoryError:!0}},disableCurrentOption:Pe,style:{borderBottom:`1px solid ${R.colors.grey3}`,minHeight:i.sp6,boxSizing:"initial"},fullWidthSelect:!0,isLoading:o.isRecommendationLoading,recommendationCheckboxField:ae?{tooltipProps:{text:Ce},label:{label:o.recommendedAccount?.accountName??se},checkBoxField:{name:ye(m,"isCategoryUpdateSelected"),defaultChecked:!!o.isCategoryUpdateSelected}}:void 0,retainCheckboxField:de?{label:{label:o.retainedAccount?.accountName??se},checkBoxField:{name:ye(m,"isRetainedCategorySelected"),defaultChecked:!!o.isRetainedCategorySelected}}:void 0},ye(m,"account"))}),l.includes("class")?t.jsx(st,{children:t.jsx(ct,{windowSize:I,children:t.jsx(dt,{})})}):null,t.jsx($e,{isThreadAllowed:v&&s!=null,dashboardTabKey:ve({type:"details",key:`${e}.out_of_pocket.class`}),roomId:be,companyId:P.currentTenant?.companyId??se,companyName:P.currentTenant?.companyName??se,entityId:s,dashboardOptionType:"reimbursement",filterMetaData:{...pe,entityType:`reimbursement.details.${De("class",e,"out_of_pocket")}`},fieldThreadTargetElement:q?.sharedRef?.contentWrapperRef,style:{borderRadius:`0 0 ${i.sp2} ${i.sp2}`},children:t.jsx(li,{isLoading:!1,label:{label:ie.department,width:U},additionalLabelInfo:oe?.isDeleted===!0&&je(D,ye(m,"class"))?ie.deletedClassError:void 0,groupedSingleSelectField:{shouldShowChevronIcon:!1,name:ye(m,"class"),placeholder:nt(ie.department),valueToId:h=>ge(h),defaultValue:{selectedOption:Re?.classId,allOptions:Ge(x,[])},style:{width:"100%"},customStyleConfig:he,registerOptions:{required:!0,validate:h=>h?.selectedOption==null?!1:c.find(re=>re.classId===h?.selectedOption)?.isDeleted===!0?ie.deletedClassError:!0}},style:{borderBottom:`1px solid ${R.colors.grey3}`,borderBottomLeftRadius:i.sp2,borderBottomRightRadius:i.sp2},fullWidthSelect:!0},ye(m,"class"))})]})},st=n.span`
149
+ `,ye=(e,o)=>`${e}.${o}`,Ot={largeLabelWidth:new d(120,120,160),smallLabelWidth:new d(85,85,160),paddingBottom:new d(a[3],a[2]),autoFillIconLeft:new d(-8,-24)},{dateFormat:ia,common:$n,spendManagement:{reimbursement:{reimbursementDetail:ie}}}=xe.getLocalizedStrings(),{strings:{empty:se}}=$n,na=(e,o)=>{const r=e.slice(1);let c=!1;return r.forEach(p=>{p.account?.qboId!=null&&p.account?.qboId===o&&(c=!0)}),c},oa=e=>e.charAt(0).toLowerCase()+e.slice(1),aa=({lineIndex:e,outOfPocket:o,accountList:r,classList:c,merchantList:p,isAddReimbursementDisabled:C,sectionId:m,isReimbursementCommentingEnabled:v,isDisabled:f,autoFields:l=[],accountsHierarchyList:k,classHierarchyList:w,reimbursementId:s,tentativeMerchantName:y,allCurrencies:S,uncategorizedAccounts:O})=>{const I=ze(),P=wt(),q=Bt(),R=ft(),{formState:{errors:D},getValues:z,trigger:te}=ot(),ne=z(ye(m,"class")),oe=c.find(h=>h.classId===ne?.selectedOption),Z=ye(m,"class"),G=je(D,Z),F=z(ye(m,"account")),Y=r.find(h=>h.qboId===F?.selectedOption||h.accountId===F?.selectedOption),H=ye(m,"account"),A=je(D,H);$.useEffect(()=>{ne?.selectedOption!=null&&(oe?.isDeleted===!0||G)&&te(Z)},[ne?.selectedOption,oe?.isDeleted,c,Z,te]),$.useEffect(()=>{F?.selectedOption!=null&&(Y?.isDeleted===!0||A)&&te(H)},[F?.selectedOption,Y?.isDeleted,r,H,te]);const ae=o.isCategoryUpdateSelected!=null&&o.recommendedAccount!=null&&!o.isCategoryFirstTimeAutofilled&&!na(o.recommendations,o.account),de=o.isRetainedCategorySelected!=null&&o.retainedAccount!=null,U=Ot.largeLabelWidth.value(I),me=Ot.smallLabelWidth.value(I),Ne=p.map(h=>h.id??se),pe={application:"dashboard",companyId:P.currentTenant?.companyId,tab:"reimbursement",entityId:s},be=`dashboard_${P.currentTenant?.companyId}`,ce=h=>p.find(re=>re.id===h)?.name??h,Oe=r.find(h=>h.qboId===o.account),Pe=h=>[O.expense?.qboId,O.income?.qboId].includes(h),Re=c.find(h=>h.classId===o.class),he={valueContainer:h=>({...h,padding:`2px ${i.sp3} !important`,overflow:"unset"}),singleValue:()=>({margin:0})},Le=h=>r.filter(re=>re.qboId===h)[0]?.qboId,ge=h=>c.filter(re=>re.classId===h)[0]?.accountingClassNumber,Ce=xe.getLocalizedStrings().spendManagement.reimbursement.reimbursementDetail.tooltip.category.replace("__based__",oa(o?.recommendedAccount?.reason??se)),Je=zt(k,o.recommendations);return t.jsxs(t.Fragment,{children:[y!=null||l.includes("merchant")?t.jsx(st,{children:t.jsx(ct,{windowSize:I,children:t.jsx(dt,{})})}):null,t.jsx($e,{isThreadAllowed:v&&s!=null,dashboardTabKey:ve({type:"details",key:`${e}.out_of_pocket.merchant`}),roomId:be,companyId:P.currentTenant?.companyId??se,companyName:P.currentTenant?.companyName??se,entityId:s,dashboardOptionType:"reimbursement",filterMetaData:{...pe,entityType:`reimbursement.details.${De("merchant",e,"out_of_pocket")}`},fieldThreadTargetElement:q?.sharedRef?.contentWrapperRef,children:t.jsx(Ao,{isDisabled:f!=null||C?"disabled":void 0,label:{label:ie.merchant,width:U},style:{width:"auto"},creatableSingleSelectField:{name:ye(m,"merchant"),placeholder:ie.merchantPlaceholder,defaultValue:{selectedOption:o.merchant??se,allOptions:Ne},registerOptions:{required:!0,validate:h=>!!h.selectedOption}},isOptionRemovable:!0,addIconInCreateLabel:!0,getLabelForId:ce})}),t.jsx(It,{}),l.includes("transactionDate")?t.jsx(st,{children:t.jsx(ct,{windowSize:I,children:t.jsx(dt,{})})}):null,t.jsx($e,{isThreadAllowed:v&&s!=null,dashboardTabKey:ve({type:"details",key:`${e}.out_of_pocket.transactionDate`}),roomId:be,companyId:P.currentTenant?.companyId??se,companyName:P.currentTenant?.companyName??se,entityId:s,dashboardOptionType:"reimbursement",filterMetaData:{...pe,entityType:`reimbursement.details.${De("transactionDate",e,"out_of_pocket")}`},fieldThreadTargetElement:q?.sharedRef?.contentWrapperRef,children:t.jsx(fn,{isDisabled:f,label:{label:ie.transactionDate,width:U},style:{paddingBottom:Ot.paddingBottom.valuePx(I),width:"auto"},dateField:{name:ye(m,"transactionDate"),placeholder:ie.datePlaceholder,defaultValue:o?.transactionDate,dateFormat:ia.visual.defaultInput,autoComplete:"off",maxDate:ee.dateNow(),registerOptions:{required:!0,validate:h=>!!h}}})}),t.jsx(It,{}),l.includes("amount")?t.jsx(st,{children:t.jsx(ct,{windowSize:I,isTwoLined:!0,children:t.jsx(dt,{})})}):null,t.jsx($e,{isThreadAllowed:v&&s!=null,dashboardTabKey:ve({type:"details",key:`${e}.out_of_pocket.amount`}),roomId:be,companyId:P.currentTenant?.companyId??se,companyName:P.currentTenant?.companyName??se,entityId:s,dashboardOptionType:"reimbursement",filterMetaData:{...pe,entityType:`reimbursement.details.${De("amount",e,"out_of_pocket")}`},fieldThreadTargetElement:q?.sharedRef?.contentWrapperRef,children:t.jsx(qo,{isDisabled:f!=null||C?"disabled":void 0,label:{label:ie.amount,width:me},style:{width:"auto"},currencyAmountField:{style:{height:i.sp6},name:`${m}.amount`,defaultValue:{amount:o.amount.amount,currencyCode:o.amount.currencyCode,currencySymbol:o.amount.currencySymbol},placeHolder:{amount:ie.addAmount,name:ie.addAmount},allCurrencies:S,showAmountCurrencyError:!0},showAdditionalInfoLabel:!0,showAdditionalLabelTooltip:!0,additionalLabelTooltip:ie.amountExchangeRateTooltip,isAdditionalInfoLabelLoading:o.isConvertedCurrencyLoading===!0,additionalInfoLabel:!nn(o.homeCurrencyDetails,o.amount)&&o.amount.currencyCode!==$n.currency.currencyCode&&o.homeCurrencyDetails?.amount!==0?`${Do("0,0[.]00",o.homeCurrencyDetails)} ${o.homeCurrencyDetails?.currencyCode}`:void 0})}),t.jsx(It,{}),l.includes("memo")?t.jsx(st,{children:t.jsx(ct,{windowSize:I,children:t.jsx(dt,{})})}):null,t.jsx($e,{isThreadAllowed:v&&s!=null,dashboardTabKey:ve({type:"details",key:`${e}.out_of_pocket.memo`}),roomId:be,companyId:P.currentTenant?.companyId??se,companyName:P.currentTenant?.companyName??se,entityId:s,dashboardOptionType:"reimbursement",filterMetaData:{...pe,entityType:`reimbursement.details.${De("memo",e,"out_of_pocket")}`},fieldThreadTargetElement:q?.sharedRef?.contentWrapperRef,children:t.jsx(mi,{isDisabled:f,label:{label:ie.memo,width:U},style:{width:"auto"},text:{type:"text",name:ye(m,"memo"),placeholder:nt(ie.memo),defaultValue:o.memo,autoComplete:"off",options:{pattern:wn}}})}),t.jsx(It,{}),l.includes("account")?t.jsx(st,{children:t.jsx(ct,{windowSize:I,children:t.jsx(dt,{})})}):null,t.jsx($e,{isThreadAllowed:v&&s!=null,dashboardTabKey:ve({type:"details",key:`${e}.out_of_pocket.account`}),roomId:be,companyId:P.currentTenant?.companyId??se,companyName:P.currentTenant?.companyName??se,entityId:s,dashboardOptionType:"reimbursement",filterMetaData:{...pe,entityType:`reimbursement.details.${De("account",e,"out_of_pocket")}`},fieldThreadTargetElement:q?.sharedRef?.contentWrapperRef,children:t.jsx(li,{label:{label:ie.category,width:U},additionalLabelInfo:Y?.isDeleted===!0&&je(D,ye(m,"account"))?ie.deletedCategoryError:void 0,groupedSingleSelectField:{shouldShowChevronIcon:ae||de,name:ye(m,"account"),placeholder:ie.categoryPlaceholder,valueToId:h=>Le(h),defaultValue:{selectedOption:Oe?.qboId??Oe?.accountId,allOptions:Je},style:{width:"100%"},customStyleConfig:he,registerOptions:{required:!0,validate:h=>h?.selectedOption==null?!1:r.find(re=>re.qboId===h?.selectedOption||re.accountId===h?.selectedOption)?.isDeleted===!0?ie.deletedCategoryError:!0}},disableCurrentOption:Pe,style:{borderBottom:`1px solid ${R.colors.grey3}`,minHeight:i.sp6,boxSizing:"initial"},fullWidthSelect:!0,isLoading:o.isRecommendationLoading,recommendationCheckboxField:ae?{tooltipProps:{text:Ce},label:{label:o.recommendedAccount?.accountName??se},checkBoxField:{name:ye(m,"isCategoryUpdateSelected"),defaultChecked:!!o.isCategoryUpdateSelected}}:void 0,retainCheckboxField:de?{label:{label:o.retainedAccount?.accountName??se},checkBoxField:{name:ye(m,"isRetainedCategorySelected"),defaultChecked:!!o.isRetainedCategorySelected}}:void 0},ye(m,"account"))}),l.includes("class")?t.jsx(st,{children:t.jsx(ct,{windowSize:I,children:t.jsx(dt,{})})}):null,t.jsx($e,{isThreadAllowed:v&&s!=null,dashboardTabKey:ve({type:"details",key:`${e}.out_of_pocket.class`}),roomId:be,companyId:P.currentTenant?.companyId??se,companyName:P.currentTenant?.companyName??se,entityId:s,dashboardOptionType:"reimbursement",filterMetaData:{...pe,entityType:`reimbursement.details.${De("class",e,"out_of_pocket")}`},fieldThreadTargetElement:q?.sharedRef?.contentWrapperRef,style:{borderRadius:`0 0 ${i.sp2} ${i.sp2}`},children:t.jsx(li,{isLoading:!1,label:{label:ie.department,width:U},additionalLabelInfo:oe?.isDeleted===!0&&je(D,ye(m,"class"))?ie.deletedClassError:void 0,groupedSingleSelectField:{shouldShowChevronIcon:!1,name:ye(m,"class"),placeholder:nt(ie.department),valueToId:h=>ge(h),defaultValue:{selectedOption:Re?.classId,allOptions:Ge(w,[])},style:{width:"100%"},customStyleConfig:he,registerOptions:{required:!0,validate:h=>h?.selectedOption==null?!1:c.find(re=>re.classId===h?.selectedOption)?.isDeleted===!0?ie.deletedClassError:!0}},style:{borderBottom:`1px solid ${R.colors.grey3}`,borderBottomLeftRadius:i.sp2,borderBottomRightRadius:i.sp2},fullWidthSelect:!0},ye(m,"class"))})]})},st=n.span`
150
150
  position: relative;
151
151
  `,dt=n(ui)`
152
152
  color: ${e=>e.theme.colors.primary};
@@ -163,7 +163,7 @@ import{aP as ri,d as ft,ax as xt,aa as tn,az as ki,l as ee,F as we,aC as nn,q as
163
163
  background-color: ${e=>e.theme.colors.grey3};
164
164
  min-height: 1px;
165
165
  max-height: 1px;
166
- `,tt=(e,o)=>`${e}.${o}`,_e={paddingTop:new d(a[5],a[4]),marginBottom:new d(a[3],a[3]),labelPaddingLeft:new d(a[3],a[4]),buttonWidth:new d(70,70),containerRightMargin:new d(a[3],a[8]),containerLeftMargin:new d(a[3],a[6]),deleteConfirmationTextMarginBottom:new d(a[2],a[0])},J=we.getLocalizedStrings().spendManagement.reimbursement.reimbursementDetail,ra=({lineData:e,currencyConversionState:o,recommendationFetchState:r,remiStage:c,lineIndex:p,accountList:C,classList:m,merchantList:v,hasFile:f,defaultCurrency:l,hasMultipleLineItems:k,fileRequiredLineIds:x,duplicateLineDetails:s,remiStatus:y,sectionId:S,isDisabled:O,isReimbursementCommentingEnabled:I,isAddReimbursementDisabled:P,style:q,autoFields:R=[],analytics:D,reimbursementId:z,tentativeMerchantName:te,companyMileageConfigInfo:ne,uncategorizedAccounts:oe,removeDuplicateReimbursementForLine:Y,scrollToSection:G,onDuplicateLineClick:F,onRemoveReimbursement:Z,clearTentativeNameForLine:H,allCurrencies:A,accountsHierarchyList:ae,classHierarchyList:de})=>{const U=ze(),me=xt(),Ne=Bt(),pe=we.getLocalizedStrings().common.strings.empty,be={application:"dashboard",companyId:me.currentTenant?.companyId,tab:"reimbursement",entityId:z},ce=`dashboard_${me.currentTenant?.companyId}`,{getValues:Oe}=ot(),[Pe,Re]=$.useState(!1),he=Oe(tt(S,"reimbursementType"));return t.jsxs(pa,{style:q,windowSize:U,children:[t.jsxs(sa,{hasFile:f,windowSize:U,showDeleteConfirmation:Pe,children:[t.jsx(ga,{windowSize:U,children:k?`#${p+1} ${J.reimbursement}`:J.reimbursement}),Pe?t.jsxs(ma,{windowSize:U,children:[t.jsx(ua,{windowSize:U,children:J.deleteConfirmation}),t.jsxs(la,{children:[t.jsx(ji,{label:J.buttons.cancel,onClick:()=>Re(!1),style:{width:_e.buttonWidth.value(U),marginLeft:U==="small"?i.sp0:i.sp4,marginRight:i.sp3},size:"small",variant:"secondary","data-testid":K("delete-remi-button",J.buttons.cancel)}),t.jsx(ji,{label:J.buttons.remove,onClick:()=>{D?.trackReimbursementDeleteReimbursementLine(e.lineId,z),H?.(e.lineId??"1"),Re(!1),Y(e.lineId),Z(p)},style:{width:_e.buttonWidth.value(U)},size:"small",variant:"danger","data-testid":K("delete-remi-button",J.buttons.remove)})]})]}):k&&(c==="draft"||y==="rejected")?t.jsx(da,{className:"deleteIconWrapper",windowSize:U,onClick:()=>Re(!0),"data-testid":K("delete-remi-button",e.lineId),children:t.jsx(bn,{enterDelay:600,title:J.deleteReimbursement,placement:"top-end",children:t.jsx(ca,{})})}):null]}),x.includes(e.lineId)?t.jsx(ln,{title:J.missingReceipt,description:J.missingReceiptDescription,style:{marginBottom:i.sp3}}):null,t.jsxs(ya,{windowSize:U,children:[s?.duplicateLineId!=null?t.jsxs(ha,{children:[J.thisExpense," ",s.isDuplicateWithinTransaction?t.jsx(Bi,{"data-testid":K("view-duplicate-transaction-expense"),onClick:()=>(D?.trackReimbursementViewDuplicateExpense(!0,z),G(s.duplicateLineId)),children:J.viewOriginalExpense}):t.jsx(Bi,{"data-testid":K("view-duplicate-expense"),onClick:()=>{s.duplicateTransactionId!=null&&s.duplicateLineId!=null&&(D?.trackReimbursementViewDuplicateExpense(!1,z),F(s.duplicateTransactionId,s.duplicateLineId))},children:J.viewOriginalExpense})]}):null,t.jsx($e,{isThreadAllowed:I&&z!=null,dashboardTabKey:ve({type:"details",key:he===J.mileageKey?`${p}.mileage.reimbursementType`:`${p}.out_of_pocket.reimbursementType`}),roomId:ce,companyId:me.currentTenant?.companyId??pe,companyName:me.currentTenant?.companyName??pe,entityId:z,dashboardOptionType:"reimbursement",filterMetaData:{...be,entityType:`reimbursement.details.${De("reimbursementType",p,he===J.mileageKey?"mileage":"out_of_pocket")}`},fieldThreadTargetElement:Ne?.sharedRef?.contentWrapperRef,style:{borderRadius:s?.duplicateLineId!=null?"0 0 0 0":`${i.sp2} ${i.sp2} 0 0`},children:t.jsxs(fa,{isDisabled:O!=null,haveBorderRadius:s?.duplicateLineId==null,children:[t.jsx(Oi,{isDisabled:O!=null||P?"disabled":void 0,isContainerClickable:!0,label:{label:J.outOfPocket},style:{padding:`${i.sp3} ${i.sp0}`,paddingLeft:_e.labelPaddingLeft.value(U),borderTopLeftRadius:"inherit"},showOutline:!(I&&z!=null),radioField:{name:tt(S,"reimbursementType"),id:`${tt(S,"reimbursementType")}.${J.outOfPocketKey}`,value:J.outOfPocketKey}}),t.jsx(ba,{}),t.jsx(Oi,{isDisabled:O!=null||P?"disabled":void 0,isContainerClickable:!0,label:{label:J.mileage},style:{padding:`${i.sp3} ${i.sp0}`,paddingLeft:_e.labelPaddingLeft.value(U),borderTopRightRadius:"inherit"},showOutline:!(I&&z!=null),radioField:{name:tt(S,"reimbursementType"),id:`${tt(S,"reimbursementType")}.${J.mileageKey}`,value:J.mileageKey}})]})}),t.jsx(xa,{}),he===J.outOfPocketKey?t.jsx(aa,{lineIndex:p,reimbursementId:z,uncategorizedAccounts:oe,isReimbursementCommentingEnabled:I,isDisabled:O,outOfPocket:{transactionDate:e.outOfPocket.transactionDate!=null?ee.zeniDate(e.outOfPocket.transactionDate.toDateString()):void 0,account:e.outOfPocket.account.selectedOption,isConvertedCurrencyLoading:o?.fetchState==="In-Progress",isRecommendationLoading:r==="In-Progress",homeCurrencyDetails:e.homeCurrencyConversions,class:e.outOfPocket.class.selectedOption,amount:{amount:e.outOfPocket.amount?.amount??0,currencyCode:e.outOfPocket.amount?.currencyCode??"USD",currencySymbol:e.outOfPocket.amount?.currencySymbol??"$"},memo:e.outOfPocket.memo,merchant:e.outOfPocket.merchant.selectedOption,recommendations:e.outOfPocket.recommendations,recommendedAccount:e.outOfPocket.recommendedAccount,isCategoryUpdateSelected:e.outOfPocket.isCategoryUpdateSelected,isCategoryFirstTimeAutofilled:e.outOfPocket.isCategoryFirstTimeAutofilled,retainedAccount:e.outOfPocket.retainedAccount,isRetainedCategorySelected:e.outOfPocket.isRetainedCategorySelected},sectionId:tt(S,"outOfPocket"),accountList:C,classList:m,autoFields:R,merchantList:v,tentativeMerchantName:te,allCurrencies:A,isAddReimbursementDisabled:P,accountsHierarchyList:ae,classHierarchyList:de}):t.jsx(Uo,{lineIndex:p,reimbursementId:z,isReimbursementCommentingEnabled:I,isDisabled:O,mileage:{transactionDate:e.mileage.transactionDate!=null?ee.zeniDate(e.mileage.transactionDate.toDateString()):void 0,class:e.mileage.class.selectedOption,distanceInMiles:e.mileage.distanceInMiles,amount:{amount:e.mileage.amount?.amount??0,currencyCode:e.mileage.amount?.currencyCode??"USD",currencySymbol:e.mileage.amount?.currencySymbol??"$"},memo:e.mileage.memo},classList:m,sectionId:tt(S,"mileage"),companyMileageConfigInfo:ne,defaultCurrency:l,isAddReimbursementDisabled:P,classHierarchyList:de})]})]})},la=n.div``,sa=n.div`
166
+ `,tt=(e,o)=>`${e}.${o}`,_e={paddingTop:new d(a[5],a[4]),marginBottom:new d(a[3],a[3]),labelPaddingLeft:new d(a[3],a[4]),buttonWidth:new d(70,70),containerRightMargin:new d(a[3],a[8]),containerLeftMargin:new d(a[3],a[6]),deleteConfirmationTextMarginBottom:new d(a[2],a[0])},J=xe.getLocalizedStrings().spendManagement.reimbursement.reimbursementDetail,ra=({lineData:e,currencyConversionState:o,recommendationFetchState:r,remiStage:c,lineIndex:p,accountList:C,classList:m,merchantList:v,hasFile:f,defaultCurrency:l,hasMultipleLineItems:k,fileRequiredLineIds:w,duplicateLineDetails:s,remiStatus:y,sectionId:S,isDisabled:O,isReimbursementCommentingEnabled:I,isAddReimbursementDisabled:P,style:q,autoFields:R=[],analytics:D,reimbursementId:z,tentativeMerchantName:te,companyMileageConfigInfo:ne,uncategorizedAccounts:oe,removeDuplicateReimbursementForLine:Z,scrollToSection:G,onDuplicateLineClick:F,onRemoveReimbursement:Y,clearTentativeNameForLine:H,allCurrencies:A,accountsHierarchyList:ae,classHierarchyList:de})=>{const U=ze(),me=wt(),Ne=Bt(),pe=xe.getLocalizedStrings().common.strings.empty,be={application:"dashboard",companyId:me.currentTenant?.companyId,tab:"reimbursement",entityId:z},ce=`dashboard_${me.currentTenant?.companyId}`,{getValues:Oe}=ot(),[Pe,Re]=$.useState(!1),he=Oe(tt(S,"reimbursementType"));return t.jsxs(pa,{style:q,windowSize:U,children:[t.jsxs(sa,{hasFile:f,windowSize:U,showDeleteConfirmation:Pe,children:[t.jsx(ga,{windowSize:U,children:k?`#${p+1} ${J.reimbursement}`:J.reimbursement}),Pe?t.jsxs(ma,{windowSize:U,children:[t.jsx(ua,{windowSize:U,children:J.deleteConfirmation}),t.jsxs(la,{children:[t.jsx(ji,{label:J.buttons.cancel,onClick:()=>Re(!1),style:{width:_e.buttonWidth.value(U),marginLeft:U==="small"?i.sp0:i.sp4,marginRight:i.sp3},size:"small",variant:"secondary","data-testid":K("delete-remi-button",J.buttons.cancel)}),t.jsx(ji,{label:J.buttons.remove,onClick:()=>{D?.trackReimbursementDeleteReimbursementLine(e.lineId,z),H?.(e.lineId??"1"),Re(!1),Z(e.lineId),Y(p)},style:{width:_e.buttonWidth.value(U)},size:"small",variant:"danger","data-testid":K("delete-remi-button",J.buttons.remove)})]})]}):k&&(c==="draft"||y==="rejected")?t.jsx(da,{className:"deleteIconWrapper",windowSize:U,onClick:()=>Re(!0),"data-testid":K("delete-remi-button",e.lineId),children:t.jsx(bn,{enterDelay:600,title:J.deleteReimbursement,placement:"top-end",children:t.jsx(ca,{})})}):null]}),w.includes(e.lineId)?t.jsx(ln,{title:J.missingReceipt,description:J.missingReceiptDescription,style:{marginBottom:i.sp3}}):null,t.jsxs(ya,{windowSize:U,children:[s?.duplicateLineId!=null?t.jsxs(ha,{children:[J.thisExpense," ",s.isDuplicateWithinTransaction?t.jsx(Bi,{"data-testid":K("view-duplicate-transaction-expense"),onClick:()=>(D?.trackReimbursementViewDuplicateExpense(!0,z),G(s.duplicateLineId)),children:J.viewOriginalExpense}):t.jsx(Bi,{"data-testid":K("view-duplicate-expense"),onClick:()=>{s.duplicateTransactionId!=null&&s.duplicateLineId!=null&&(D?.trackReimbursementViewDuplicateExpense(!1,z),F(s.duplicateTransactionId,s.duplicateLineId))},children:J.viewOriginalExpense})]}):null,t.jsx($e,{isThreadAllowed:I&&z!=null,dashboardTabKey:ve({type:"details",key:he===J.mileageKey?`${p}.mileage.reimbursementType`:`${p}.out_of_pocket.reimbursementType`}),roomId:ce,companyId:me.currentTenant?.companyId??pe,companyName:me.currentTenant?.companyName??pe,entityId:z,dashboardOptionType:"reimbursement",filterMetaData:{...be,entityType:`reimbursement.details.${De("reimbursementType",p,he===J.mileageKey?"mileage":"out_of_pocket")}`},fieldThreadTargetElement:Ne?.sharedRef?.contentWrapperRef,style:{borderRadius:s?.duplicateLineId!=null?"0 0 0 0":`${i.sp2} ${i.sp2} 0 0`},children:t.jsxs(fa,{isDisabled:O!=null,haveBorderRadius:s?.duplicateLineId==null,children:[t.jsx(Oi,{isDisabled:O!=null||P?"disabled":void 0,isContainerClickable:!0,label:{label:J.outOfPocket},style:{padding:`${i.sp3} ${i.sp0}`,paddingLeft:_e.labelPaddingLeft.value(U),borderTopLeftRadius:"inherit"},showOutline:!(I&&z!=null),radioField:{name:tt(S,"reimbursementType"),id:`${tt(S,"reimbursementType")}.${J.outOfPocketKey}`,value:J.outOfPocketKey}}),t.jsx(ba,{}),t.jsx(Oi,{isDisabled:O!=null||P?"disabled":void 0,isContainerClickable:!0,label:{label:J.mileage},style:{padding:`${i.sp3} ${i.sp0}`,paddingLeft:_e.labelPaddingLeft.value(U),borderTopRightRadius:"inherit"},showOutline:!(I&&z!=null),radioField:{name:tt(S,"reimbursementType"),id:`${tt(S,"reimbursementType")}.${J.mileageKey}`,value:J.mileageKey}})]})}),t.jsx(wa,{}),he===J.outOfPocketKey?t.jsx(aa,{lineIndex:p,reimbursementId:z,uncategorizedAccounts:oe,isReimbursementCommentingEnabled:I,isDisabled:O,outOfPocket:{transactionDate:e.outOfPocket.transactionDate!=null?ee.zeniDate(e.outOfPocket.transactionDate.toDateString()):void 0,account:e.outOfPocket.account.selectedOption,isConvertedCurrencyLoading:o?.fetchState==="In-Progress",isRecommendationLoading:r==="In-Progress",homeCurrencyDetails:e.homeCurrencyConversions,class:e.outOfPocket.class.selectedOption,amount:{amount:e.outOfPocket.amount?.amount??0,currencyCode:e.outOfPocket.amount?.currencyCode??"USD",currencySymbol:e.outOfPocket.amount?.currencySymbol??"$"},memo:e.outOfPocket.memo,merchant:e.outOfPocket.merchant.selectedOption,recommendations:e.outOfPocket.recommendations,recommendedAccount:e.outOfPocket.recommendedAccount,isCategoryUpdateSelected:e.outOfPocket.isCategoryUpdateSelected,isCategoryFirstTimeAutofilled:e.outOfPocket.isCategoryFirstTimeAutofilled,retainedAccount:e.outOfPocket.retainedAccount,isRetainedCategorySelected:e.outOfPocket.isRetainedCategorySelected},sectionId:tt(S,"outOfPocket"),accountList:C,classList:m,autoFields:R,merchantList:v,tentativeMerchantName:te,allCurrencies:A,isAddReimbursementDisabled:P,accountsHierarchyList:ae,classHierarchyList:de}):t.jsx(Uo,{lineIndex:p,reimbursementId:z,isReimbursementCommentingEnabled:I,isDisabled:O,mileage:{transactionDate:e.mileage.transactionDate!=null?ee.zeniDate(e.mileage.transactionDate.toDateString()):void 0,class:e.mileage.class.selectedOption,distanceInMiles:e.mileage.distanceInMiles,amount:{amount:e.mileage.amount?.amount??0,currencyCode:e.mileage.amount?.currencyCode??"USD",currencySymbol:e.mileage.amount?.currencySymbol??"$"},memo:e.mileage.memo},classList:m,sectionId:tt(S,"mileage"),companyMileageConfigInfo:ne,defaultCurrency:l,isAddReimbursementDisabled:P,classHierarchyList:de})]})]})},la=n.div``,sa=n.div`
167
167
  //when file is present and it's a small window, we don't have to show the title and delete icon. Delete icon will be displayed inside the invoice title, next to replace
168
168
  //https://www.figma.com/file/ERKhHKvXKZSfIUruWfHqwU/New-Reimbursement-Mobile-Ver-1.0?type=design&node-id=419%3A6356&mode=design&t=upxphJ6HQRaue6wK-1
169
169
  display: ${e=>e.hasFile&&e.windowSize==="small"?"none":"flex"};
@@ -235,13 +235,13 @@ import{aP as ri,d as ft,ax as xt,aa as tn,az as ki,l as ee,F as we,aC as nn,q as
235
235
  flex-direction: row;
236
236
  border-top-left-radius: ${e=>e.haveBorderRadius?"inherit":"unset"};
237
237
  border-top-right-radius: ${e=>e.haveBorderRadius?"inherit":"unset"};
238
- `,xa=n.div`
238
+ `,wa=n.div`
239
239
  display: flex;
240
240
  flex: 1;
241
241
  background-color: ${e=>e.theme.colors.grey3};
242
242
  min-height: 1px;
243
243
  max-height: 1px;
244
- `,wa=(e,o)=>`${e}.${o}`,ut={labelWidth:new d(120,160,160),paddingBottom:new d(a[3],a[3]),paddingTop:new d(12,a[3]),marginBottom:new d(12,a[3]),containerRightMargin:new d(a[3],a[8]),containerLeftMargin:new d(a[3],a[6])},vn=({isReimbursementCommentingEnabled:e,sectionId:o,isDisabled:r,reportTitle:c,reimbursementId:p,style:C})=>{const m=ze(),v=xt(),f=Bt(),l=`dashboard_${v.currentTenant?.companyId}`,k=we.getLocalizedStrings(),x=k.spendManagement.reimbursement.reimbursementDetail,s=k.common.strings.empty,y=ut.labelWidth.value(m);return t.jsxs(Sa,{style:C,windowSize:m,children:[t.jsx(va,{windowSize:m,children:x.whatFor}),t.jsx($a,{children:t.jsx($e,{isThreadAllowed:e&&p!=null,dashboardTabKey:ve({type:"details",key:"whatFor"}),roomId:l,companyId:v.currentTenant?.companyId??s,companyName:v.currentTenant?.companyName??s,entityId:p,dashboardOptionType:"reimbursement",filterMetaData:{application:"dashboard",companyId:v.currentTenant?.companyId,tab:"reimbursement",entityId:p,entityType:"reimbursement.details.whatFor"},fieldThreadTargetElement:f?.sharedRef?.contentWrapperRef,style:{borderRadius:i.sp2},children:t.jsx(mi,{isDisabled:r,label:{label:x.reportTitle,width:y},text:{type:"text",name:wa(o,"reportTitle"),placeholder:x.lunchWithClient,defaultValue:c,autoComplete:"off",options:{required:!0,validate:S=>!!S}},style:{width:"auto",borderRadius:i.sp2}})})})]})},Sa=n.div`
244
+ `,xa=(e,o)=>`${e}.${o}`,ut={labelWidth:new d(120,160,160),paddingBottom:new d(a[3],a[3]),paddingTop:new d(12,a[3]),marginBottom:new d(12,a[3]),containerRightMargin:new d(a[3],a[8]),containerLeftMargin:new d(a[3],a[6])},vn=({isReimbursementCommentingEnabled:e,sectionId:o,isDisabled:r,reportTitle:c,reimbursementId:p,style:C})=>{const m=ze(),v=wt(),f=Bt(),l=`dashboard_${v.currentTenant?.companyId}`,k=xe.getLocalizedStrings(),w=k.spendManagement.reimbursement.reimbursementDetail,s=k.common.strings.empty,y=ut.labelWidth.value(m);return t.jsxs(Sa,{style:C,windowSize:m,children:[t.jsx(va,{windowSize:m,children:w.whatFor}),t.jsx($a,{children:t.jsx($e,{isThreadAllowed:e&&p!=null,dashboardTabKey:ve({type:"details",key:"whatFor"}),roomId:l,companyId:v.currentTenant?.companyId??s,companyName:v.currentTenant?.companyName??s,entityId:p,dashboardOptionType:"reimbursement",filterMetaData:{application:"dashboard",companyId:v.currentTenant?.companyId,tab:"reimbursement",entityId:p,entityType:"reimbursement.details.whatFor"},fieldThreadTargetElement:f?.sharedRef?.contentWrapperRef,style:{borderRadius:i.sp2},children:t.jsx(mi,{isDisabled:r,label:{label:w.reportTitle,width:y},text:{type:"text",name:xa(o,"reportTitle"),placeholder:w.lunchWithClient,defaultValue:c,autoComplete:"off",options:{required:!0,validate:S=>!!S}},style:{width:"auto",borderRadius:i.sp2}})})})]})},Sa=n.div`
245
245
  display: flex;
246
246
  flex-direction: column;
247
247
  padding-top: ${e=>ut.paddingTop.valuePx(e.windowSize)};
@@ -258,7 +258,7 @@ import{aP as ri,d as ft,ax as xt,aa as tn,az as ki,l as ee,F as we,aC as nn,q as
258
258
  `,va=n(Mt)`
259
259
  color: ${e=>e.theme.colors.primary};
260
260
  margin-bottom: ${e=>ut.marginBottom.valuePx(e.windowSize)};
261
- `,E={largeLabelWidth:new d(120,120,220),marginTop:new d(28,8),paymentToMarginTop:new d(0,a[4]),marginBottom:new d(a[5],a[4]),paymentToMarginBottom:new d(12,a[3]),totalMarginBottom:new d(a[3],a[3]),reimbursementSectionLeftMargin:new d(a[3],a[6]),reimbursementSectionRightMargin:new d(a[3],a[8]),invoiceSectionLeftMargin:new d(a[3],a[8]),invoiceSectionRightMargin:new d(a[3],a[6]),rightSectionWidth:new d(100,58),firstOrLastItemHeight:new d(390,760),itemHeight:new d(390,459),duplicateBannerWrapperMarginTop:new d(a[5],a[3]),duplicateBannerWrapperMarginRight:new d(a[3],a[8]),duplicateBannerWrapperMarginBottom:new d(a[5],a[3]),duplicateBannerWrapperMarginLeft:new d(a[3],a[6])},Ca={total:new hi("largeMedium","h6Medium")},{spendManagement:{reimbursement:{reimbursementDetail:V},billPay:{vendorCreation:{achDetails:Dt}}},common:{currency:{currencyCode:Tt}}}=we.getLocalizedStrings(),Cn=e=>{let o=0,r=Tt;if("recommendationFetchState"in e&&e.recommendationFetchState!=null){const c=e;o=c.outOfPocket.amount??0,r=c.outOfPocket.currencyCode??Tt}else{const c=e;o=c.outOfPocket.amount?.amount??0,r=c.outOfPocket.amount?.currencyCode??Tt}return(e.homeCurrencyConversions?.currencyCode??Tt)!==r&&(o=e.homeCurrencyConversions?.amount??0),o},ka=({remiUploadStatus:e,progressSectionObj:o,reimbursementId:r,createDate:c,scheduleDate:p,paymentDate:C,hasDuplicateLine:m,approvedDate:v,isFirstOrLastListItem:f,index:l,reimbursementSectionRef:k,showSkipAutoFill:x,lineData:s,currencyConversionState:y,authParams:S,uploadInvoiceEndPoint:O,accountList:I,classList:P,merchantList:q,remiStage:R,autoFieldsByLineId:D,isReimbursementCommentingEnabled:z,isAutoFieldsExist:te,totalAmount:ne,showTotalAmountLoader:oe,totalNumberOfLines:Y,defaultCurrency:G,bankAccounts:F,fileRequiredLineIds:Z,isAddReimbursementDisabled:H,duplicateLineByLineId:A,remiStatus:ae,file:de,uncategorizedAccounts:U,reportTitle:me,recommendationFetchState:Ne,tentativeMerchantName:pe,paymentTo:be,analytics:ce,companyMileageConfigInfo:Oe,loggedInUserDepartmentId:Pe,isSignedInUserReimbursementCreator:Re,setShowBankAccountPage:he,setRefByLineId:Le,setCurrentLineIdForUpload:ge,onDuplicateLineClick:Ce,setUploadedReceiptPayload:Je,removeDuplicateReimbursementForLine:h,onReceiptsUpload:re,scrollToSection:at,onRemoveReimbursement:He,onAddReimbursement:Ae,clearTentativeNameForLine:Ye,onReplaceClick:Be,onDeleteBankAccount:Ke,updateInvoiceUploadFetchState:qe,removeFileFromLine:Ze,allCurrencies:Qe,accountsHierarchyList:le,classHierarchyList:rt})=>{const{formState:{errors:mt}}=ot(),Xe=$.useRef(null);$.useEffect(()=>(Le(B=>({...B,[`L${s.lineId}`]:Xe.current})),()=>{Le(B=>({...B,[`L${s.lineId}`]:null}))}),[s.lineId,Le]);const _=ze(),pt=R==="draft"?V.newReimbursementTitle:V.editReimbursementTitle,N=E.largeLabelWidth.value(_),ue=B=>B.outOfPocket.account.selectedOption==null&&(B.outOfPocket.amount==null||B.outOfPocket.amount.amount==0)&&(B.outOfPocket.class.selectedOption==null||B.outOfPocket.class.selectedOption===Pe)&&(B.outOfPocket.memo===""||B.outOfPocket.memo==null)&&B.outOfPocket.merchant.selectedOption==null&&B.outOfPocket.transactionDate==null,St=F.map(B=>B.bankAccountId),ke=s.reimbursementType===V.outOfPocketKey&&Cn(s)>=75&&de==null;return t.jsxs(Va,{ref:k,windowSize:_,children:[t.jsx(Ha,{ref:B=>{B!=null&&(Xe.current=B)},windowSize:_,bottomSeperator:Y!==1,showSkipAutoFill:x,isFirstItem:l===0,children:t.jsx(wn,{customError:ke?V.requireReceipt:void 0,analytics:ce,showAutofill:!1,uploadInvoiceEndPoint:O,authParams:S,entityId:H?"":void 0,file:de,style:{width:"auto",padding:0,height:f?E.firstOrLastItemHeight.valuePx(_):E.itemHeight.valuePx(_),margin:_==="small"?i.sp0:void 0},updateInvoiceUploadFetchState:qe,onInvoiceUpload:B=>{s.reimbursementType===V.outOfPocketKey&&!ue(s)?(ge(Number(s.lineId)),Je(B),Be?.()):re(B,Number(s.lineId),!0)},dropFilePlaceholder:{upload:V.dropReceipt.upload,receipt:V.dropReceipt.receipt},showInfoText:!1,showTitlebar:!0,showTitlebarIcon:!H,pdfTitle:Y>1?`#${l+1} Receipt`:"Receipt",onDeleteClick:()=>{qe?.("In-Progress"),setTimeout(()=>Ze?.(Number(s.lineId)))},onReplaceClick:()=>{ge(Number(s.lineId)),Be?.()},allowMultiFiles:Y===l+1,type:"reimbursement"})}),t.jsxs(_a,{windowSize:_,children:[l===0&&_!=="small"?t.jsxs(t.Fragment,{children:[t.jsx(Aa,{children:pt}),t.jsx(Ka,{children:t.jsx(wo,{progressSectionObj:o,createDate:c,paymentDate:C,scheduleDate:p,approvedDate:v,isBillUploaded:r!=null?!0:e==="Completed"})}),te&&t.jsxs(Ta,{children:[t.jsx(Ia,{}),t.jsx(La,{children:V.banner})]}),m&&t.jsxs(ja,{size:_,children:[t.jsx(Da,{}),t.jsxs(Pa,{children:[t.jsx(Oa,{children:V.thereSeems}),t.jsx(Ra,{children:V.pleaseFind})]})]}),t.jsx(vn,{isReimbursementCommentingEnabled:z,sectionId:At,reportTitle:me,reimbursementId:r})]}):null,t.jsx(ra,{analytics:ce,reimbursementId:r,onDuplicateLineClick:Ce,uncategorizedAccounts:U,sectionId:`${yi}.${l}`,scrollToSection:at,lineIndex:l,lineData:s,accountList:I,classList:P,merchantList:q,autoFields:s.lineId!=null?D[s.lineId]:[],currencyConversionState:y,recommendationFetchState:Ne,onRemoveReimbursement:He,hasMultipleLineItems:Y>1,clearTentativeNameForLine:Ye,tentativeMerchantName:pe,hasFile:de!=null,companyMileageConfigInfo:Oe,defaultCurrency:G,remiStage:R,remiStatus:ae,fileRequiredLineIds:Z,allCurrencies:Qe,isReimbursementCommentingEnabled:z,isAddReimbursementDisabled:H,accountsHierarchyList:le,classHierarchyList:rt,duplicateLineDetails:A[s.lineId],removeDuplicateReimbursementForLine:h}),Y!==1&&Y===l+1&&t.jsxs(t.Fragment,{children:[t.jsxs(Ba,{windowSize:_,children:[t.jsx(Ma,{children:V.total}),oe?t.jsx(Fa,{windowSize:_,children:t.jsx(Ea,{children:t.jsx(wt,{size:"Standard",start:!0,style:{display:"flex"}})})}):t.jsx(un,{amount:ee.toAmount(ne,"USD","$"),integerStyles:Rt.h6Regular.cssObject,decimalStyles:Rt.standardRegular.cssObject})]}),t.jsxs(Wa,{windowSize:_,onClick:()=>{H===!1&&Ae()},isDisabled:H,"data-testid":K("add-reimbursement-row"),children:[t.jsx(Fi,{}),t.jsx(Mi,{children:V.addReimbursement})]}),Re?t.jsxs(t.Fragment,{children:[t.jsx(za,{windowSize:_,children:V.receivePaymentTo}),t.jsx(Na,{windowSize:_,shouldDisplay:F.length>0,children:t.jsx(mn,{label:{label:V.yourBankAccount,width:N},style:{width:"auto"},singleSelectField:{singleSelect:{name:bt,placeholder:nt(V.yourBankAccount),showValueEyeIcon:!H,menuPlacement:"top",maxMenuHeight:308,showEyeIconOnSelect:!1,onDelete:Ke,getTooltipInfo:B=>kn(F,B),onClickCreateBankAccount:()=>he(!0),getLabelForId:B=>Dn(F,B),isOptionRemovable:!1,showDeleteIcon:!0,showAddBankAccountOption:!0,isDisabled:H?"readonly":void 0,showTickMark:!1,alwaysShowEyeTooltip:!0},defaultValue:{selectedOption:be,allOptions:St},registerOptions:{required:!0,validate:B=>!!B.selectedOption}},isFunctional:!0})}),t.jsxs(Ua,{shouldDisplay:F.length===0,windowSize:_,hasError:je(mt,bt),onClick:()=>{H===!1&&he(!0)},isDisabled:H,"data-testid":K("remi-add-bank-account-container"),children:[t.jsx(Fi,{}),t.jsx(Mi,{children:V.addBankAccount})]})]}):null]})]})]})},kn=(e,o)=>{const r=In(e,o);return r==null?`${Dt.bankRoutingNumber} ${V.emptyValue}
261
+ `,E={largeLabelWidth:new d(120,120,220),marginTop:new d(28,8),paymentToMarginTop:new d(0,a[4]),marginBottom:new d(a[5],a[4]),paymentToMarginBottom:new d(12,a[3]),totalMarginBottom:new d(a[3],a[3]),reimbursementSectionLeftMargin:new d(a[3],a[6]),reimbursementSectionRightMargin:new d(a[3],a[8]),invoiceSectionLeftMargin:new d(a[3],a[8]),invoiceSectionRightMargin:new d(a[3],a[6]),rightSectionWidth:new d(100,58),firstOrLastItemHeight:new d(390,760),itemHeight:new d(390,459),duplicateBannerWrapperMarginTop:new d(a[5],a[3]),duplicateBannerWrapperMarginRight:new d(a[3],a[8]),duplicateBannerWrapperMarginBottom:new d(a[5],a[3]),duplicateBannerWrapperMarginLeft:new d(a[3],a[6])},Ca={total:new hi("largeMedium","h6Medium")},{spendManagement:{reimbursement:{reimbursementDetail:V},billPay:{vendorCreation:{achDetails:Dt}}},common:{currency:{currencyCode:Tt}}}=xe.getLocalizedStrings(),Cn=e=>{let o=0,r=Tt;if("recommendationFetchState"in e&&e.recommendationFetchState!=null){const c=e;o=c.outOfPocket.amount??0,r=c.outOfPocket.currencyCode??Tt}else{const c=e;o=c.outOfPocket.amount?.amount??0,r=c.outOfPocket.amount?.currencyCode??Tt}return(e.homeCurrencyConversions?.currencyCode??Tt)!==r&&(o=e.homeCurrencyConversions?.amount??0),o},ka=({remiUploadStatus:e,progressSectionObj:o,reimbursementId:r,createDate:c,scheduleDate:p,paymentDate:C,hasDuplicateLine:m,approvedDate:v,isFirstOrLastListItem:f,index:l,reimbursementSectionRef:k,showSkipAutoFill:w,lineData:s,currencyConversionState:y,authParams:S,uploadInvoiceEndPoint:O,accountList:I,classList:P,merchantList:q,remiStage:R,autoFieldsByLineId:D,isReimbursementCommentingEnabled:z,isAutoFieldsExist:te,totalAmount:ne,showTotalAmountLoader:oe,totalNumberOfLines:Z,defaultCurrency:G,bankAccounts:F,fileRequiredLineIds:Y,isAddReimbursementDisabled:H,duplicateLineByLineId:A,remiStatus:ae,file:de,uncategorizedAccounts:U,reportTitle:me,recommendationFetchState:Ne,tentativeMerchantName:pe,paymentTo:be,analytics:ce,companyMileageConfigInfo:Oe,loggedInUserDepartmentId:Pe,isSignedInUserReimbursementCreator:Re,setShowBankAccountPage:he,setRefByLineId:Le,setCurrentLineIdForUpload:ge,onDuplicateLineClick:Ce,setUploadedReceiptPayload:Je,removeDuplicateReimbursementForLine:h,onReceiptsUpload:re,scrollToSection:at,onRemoveReimbursement:He,onAddReimbursement:Ae,clearTentativeNameForLine:Ze,onReplaceClick:Be,onDeleteBankAccount:Ke,updateInvoiceUploadFetchState:qe,removeFileFromLine:Ye,allCurrencies:Qe,accountsHierarchyList:le,classHierarchyList:rt})=>{const{formState:{errors:mt}}=ot(),Xe=$.useRef(null);$.useEffect(()=>(Le(B=>({...B,[`L${s.lineId}`]:Xe.current})),()=>{Le(B=>({...B,[`L${s.lineId}`]:null}))}),[s.lineId,Le]);const _=ze(),pt=R==="draft"?V.newReimbursementTitle:V.editReimbursementTitle,N=E.largeLabelWidth.value(_),ue=B=>B.outOfPocket.account.selectedOption==null&&(B.outOfPocket.amount==null||B.outOfPocket.amount.amount==0)&&(B.outOfPocket.class.selectedOption==null||B.outOfPocket.class.selectedOption===Pe)&&(B.outOfPocket.memo===""||B.outOfPocket.memo==null)&&B.outOfPocket.merchant.selectedOption==null&&B.outOfPocket.transactionDate==null,St=F.map(B=>B.bankAccountId),ke=s.reimbursementType===V.outOfPocketKey&&Cn(s)>=75&&de==null;return t.jsxs(Va,{ref:k,windowSize:_,children:[t.jsx(Ha,{ref:B=>{B!=null&&(Xe.current=B)},windowSize:_,bottomSeperator:Z!==1,showSkipAutoFill:w,isFirstItem:l===0,children:t.jsx(xn,{customError:ke?V.requireReceipt:void 0,analytics:ce,showAutofill:!1,uploadInvoiceEndPoint:O,authParams:S,entityId:H?"":void 0,file:de,style:{width:"auto",padding:0,height:f?E.firstOrLastItemHeight.valuePx(_):E.itemHeight.valuePx(_),margin:_==="small"?i.sp0:void 0},updateInvoiceUploadFetchState:qe,onInvoiceUpload:B=>{s.reimbursementType===V.outOfPocketKey&&!ue(s)?(ge(Number(s.lineId)),Je(B),Be?.()):re(B,Number(s.lineId),!0)},dropFilePlaceholder:{upload:V.dropReceipt.upload,receipt:V.dropReceipt.receipt},showInfoText:!1,showTitlebar:!0,showTitlebarIcon:!H,pdfTitle:Z>1?`#${l+1} Receipt`:"Receipt",onDeleteClick:()=>{qe?.("In-Progress"),setTimeout(()=>Ye?.(Number(s.lineId)))},onReplaceClick:()=>{ge(Number(s.lineId)),Be?.()},allowMultiFiles:Z===l+1,type:"reimbursement"})}),t.jsxs(_a,{windowSize:_,children:[l===0&&_!=="small"?t.jsxs(t.Fragment,{children:[t.jsx(Aa,{children:pt}),t.jsx(Ka,{children:t.jsx(xo,{progressSectionObj:o,createDate:c,paymentDate:C,scheduleDate:p,approvedDate:v,isBillUploaded:r!=null?!0:e==="Completed"})}),te&&t.jsxs(Ta,{children:[t.jsx(Ia,{}),t.jsx(La,{children:V.banner})]}),m&&t.jsxs(ja,{size:_,children:[t.jsx(Da,{}),t.jsxs(Pa,{children:[t.jsx(Oa,{children:V.thereSeems}),t.jsx(Ra,{children:V.pleaseFind})]})]}),t.jsx(vn,{isReimbursementCommentingEnabled:z,sectionId:At,reportTitle:me,reimbursementId:r})]}):null,t.jsx(ra,{analytics:ce,reimbursementId:r,onDuplicateLineClick:Ce,uncategorizedAccounts:U,sectionId:`${yi}.${l}`,scrollToSection:at,lineIndex:l,lineData:s,accountList:I,classList:P,merchantList:q,autoFields:s.lineId!=null?D[s.lineId]:[],currencyConversionState:y,recommendationFetchState:Ne,onRemoveReimbursement:He,hasMultipleLineItems:Z>1,clearTentativeNameForLine:Ze,tentativeMerchantName:pe,hasFile:de!=null,companyMileageConfigInfo:Oe,defaultCurrency:G,remiStage:R,remiStatus:ae,fileRequiredLineIds:Y,allCurrencies:Qe,isReimbursementCommentingEnabled:z,isAddReimbursementDisabled:H,accountsHierarchyList:le,classHierarchyList:rt,duplicateLineDetails:A[s.lineId],removeDuplicateReimbursementForLine:h}),Z!==1&&Z===l+1&&t.jsxs(t.Fragment,{children:[t.jsxs(Ba,{windowSize:_,children:[t.jsx(Ma,{children:V.total}),oe?t.jsx(Fa,{windowSize:_,children:t.jsx(Ea,{children:t.jsx(xt,{size:"Standard",start:!0,style:{display:"flex"}})})}):t.jsx(un,{amount:ee.toAmount(ne,"USD","$"),integerStyles:Rt.h6Regular.cssObject,decimalStyles:Rt.standardRegular.cssObject})]}),t.jsxs(Wa,{windowSize:_,onClick:()=>{H===!1&&Ae()},isDisabled:H,"data-testid":K("add-reimbursement-row"),children:[t.jsx(Fi,{}),t.jsx(Mi,{children:V.addReimbursement})]}),Re?t.jsxs(t.Fragment,{children:[t.jsx(za,{windowSize:_,children:V.receivePaymentTo}),t.jsx(Na,{windowSize:_,shouldDisplay:F.length>0,children:t.jsx(mn,{label:{label:V.yourBankAccount,width:N},style:{width:"auto"},singleSelectField:{singleSelect:{name:bt,placeholder:nt(V.yourBankAccount),showValueEyeIcon:!H,menuPlacement:"top",maxMenuHeight:308,showEyeIconOnSelect:!1,onDelete:Ke,getTooltipInfo:B=>kn(F,B),onClickCreateBankAccount:()=>he(!0),getLabelForId:B=>Dn(F,B),isOptionRemovable:!1,showDeleteIcon:!0,showAddBankAccountOption:!0,isDisabled:H?"readonly":void 0,showTickMark:!1,alwaysShowEyeTooltip:!0},defaultValue:{selectedOption:be,allOptions:St},registerOptions:{required:!0,validate:B=>!!B.selectedOption}},isFunctional:!0})}),t.jsxs(Ua,{shouldDisplay:F.length===0,windowSize:_,hasError:je(mt,bt),onClick:()=>{H===!1&&he(!0)},isDisabled:H,"data-testid":K("remi-add-bank-account-container"),children:[t.jsx(Fi,{}),t.jsx(Mi,{children:V.addBankAccount})]})]}):null]})]})]})},kn=(e,o)=>{const r=In(e,o);return r==null?`${Dt.bankRoutingNumber} ${V.emptyValue}
262
262
  ${Dt.bankAccountNumber} ${V.emptyValue}`:`${Dt.bankRoutingNumber} ${r.bankRoutingNumberAch??V.emptyValue}, ${r.bankName??V.emptyValue}
263
263
  ${Dt.bankAccountNumber} ${r.bankAccountNumber??V.emptyValue}`},In=(e,o)=>e.find(r=>r.bankAccountId===o),Dn=(e,o)=>{const r=In(e,o);return r==null?V.selectBankAccount:r.bankAccountName?r.bankAccountName:r.maskedAccountNumber?r.maskedAccountNumber:r.bankName&&r.bankAccountNumber?`${r.bankName} ${V.accountNameConnector}${r.bankAccountNumber.slice(r.bankAccountNumber.length-4)}`:V.selectBankAccount},Ia=n(ui)`
264
264
  color: ${e=>e.theme.colors.primary};
@@ -407,7 +407,7 @@ import{aP as ri,d as ft,ax as xt,aa as tn,az as ki,l as ee,F as we,aC as nn,q as
407
407
  margin-top: ${e=>E.marginTop.valuePx(e.windowSize)};
408
408
  `,Ka=n.div`
409
409
  padding: ${i.sp2} ${i.sp8} ${i.sp0} ${i.sp6};
410
- `,qa={total:new hi("largeMedium","h6Medium")},Q={largeLabelWidth:new d(120,120,220),marginBottom:new d(a[5],a[4]),addBankAccountMarginBottom:new d(a[5],a[5]),marginTop:new d(a[0],78),paymentToMarginTop:new d(0,a[4]),totalMarginBottom:new d(a[3],a[3]),rightMargin:new d(a[3],a[8]),leftMargin:new d(a[3],a[6]),paymentToMarginBottom:new d(12,a[3])},it=we.getLocalizedStrings().spendManagement.reimbursement.reimbursementDetail,Ga=({remiDetails:e,isUserAdmin:o,authParams:r,uploadInvoiceEndPoint:c,showSkipAutoFill:p,isReimbursementCommentingEnabled:C,isAutoFieldsExist:m,totalAmount:v,defaultCurrency:f,hasDuplicateLine:l,bankAccounts:k,fileRequiredLineIds:x,companyMileageConfigInfo:s,analytics:y,reimbursementId:S,currencyConversionStatus:O,setShowSkipAutoFill:I,setShowBankAccountPage:P,removeDuplicateReimbursementForLine:q,onReceiptsUpload:R,setCurrentLineIdForUpload:D,onDuplicateLineClick:z,setUploadedReceiptPayload:te,removeFileFromLine:ne,onReplaceClick:oe,updateInvoiceUploadFetchState:Y,clearTentativeNameForLine:G,onDeleteBankAccount:F,uncategorizedAccounts:Z,isSignedInUserReimbursementCreator:H,duplicateLineByLineId:A,showTotalAmountLoader:ae,scrollContainerRef:de})=>{const{control:U,formState:{errors:me}}=ot(),{fields:Ne,append:pe,remove:be}=mo({name:yi,control:U}),ce=Ne,Oe=$.useRef(null),Pe=N=>{setTimeout(()=>{be(N)})},{tentativeMerchantNameByLineId:Re,remiStage:he,remiStatus:Le}=e,ge=!H||he==="pending_approval"&&Le!=="rejected"&&o||he==="pending_approval"&&Le==="rejected",Ce=ge?e.paymentToBankAccountDetail!=null?[e.paymentToBankAccountDetail]:[]:k,Je=Ce.map(N=>N.bankAccountId),h=ze(),re=Q.largeLabelWidth.value(h),at=e.whatForSection.reportTitle,He=e.accountList.accounts,Ae=e.accountsHierarchyList,Ye=e.classHierarchyList,Be=e.classList.classes,Ke=e.merchantList.merchants,qe=e.addRemiAutoFieldsByLineId,Ze=Math.max(...Object.keys(e.editRemiInitialDetails?.lineDetailSection??{}).map(N=>Number(N)),0),Qe=()=>{const N=ce[ce.length-1],ue=Tn(ce.length,Number(N.lineId)>Ze?String(Number(N.lineId)+1):String(Ze+1),Ae,Ye,Ke,f,e.allCurrencies,e.loggedInUserDepartmentId);setTimeout(()=>{pe(ue,{shouldFocus:!1})}),D(Number(ue.lineId)),I(!0),setTimeout(()=>Ri(Oe.current,de?.current),50)},[le,rt]=$.useState({}),mt=$.useCallback(N=>{const ue=le[`L${N}`];ue!=null&&Ri(ue,de?.current)},[le,de]),Xe=e.reimbursementInfo?.billStatus.code=="approved"&&e.reimbursementInfo?.billPaymentStatus.code?e.reimbursementInfo?.billPaymentStatus:e.reimbursementInfo?.billStatus,_=e.reimbursementInfo?.paymentDate!=null?ee.zeniDate(ee.getNextNthWorkingDay(e.reimbursementInfo.paymentDate.toDate(),[0,6],e.achSameDayMaxDays).toDateString()):void 0,pt=e.reimbursementInfo?.expectedDepositDate??_;return t.jsxs(Qa,{windowSize:h,showSkipAutoFill:p,children:[ce.map((N,ue)=>t.jsx(ka,{removeDuplicateReimbursementForLine:q,onDuplicateLineClick:z,scrollToSection:mt,setRefByLineId:rt,duplicateLineByLineId:A,reimbursementId:S,remiUploadStatus:e.uploadStatus,uncategorizedAccounts:Z,progressSectionObj:Xe,createDate:e.createTime,paymentDate:pt,scheduleDate:e.reimbursementInfo?.paymentDate,approvedDate:e.latestApprovedDate,isFirstOrLastListItem:ce.length-1===ue||ue===0,index:ue,reimbursementSectionRef:Oe,remiStage:he,remiStatus:Le,authParams:r,file:N.file,uploadInvoiceEndPoint:c,showSkipAutoFill:p,lineData:N,currencyConversionState:O[N.lineId],recommendationFetchState:e.lineDetailSection[N.lineId]?.recommendationFetchState,setCurrentLineIdForUpload:D,setUploadedReceiptPayload:te,onReplaceClick:oe,onReceiptsUpload:R,removeFileFromLine:ne,isReimbursementCommentingEnabled:C,isAutoFieldsExist:m,reportTitle:at,accountList:He,classList:Be,merchantList:Ke,autoFieldsByLineId:qe,onRemoveReimbursement:Pe,onAddReimbursement:Qe,totalAmount:v,showTotalAmountLoader:ae,hasDuplicateLine:l,totalNumberOfLines:ce.length,updateInvoiceUploadFetchState:Y,clearTentativeNameForLine:G,tentativeMerchantName:Re[N.lineId],companyMileageConfigInfo:s,defaultCurrency:f,setShowBankAccountPage:P,paymentTo:e.paymentTo,bankAccounts:Ce,onDeleteBankAccount:F,analytics:y,fileRequiredLineIds:x,allCurrencies:e.allCurrencies,loggedInUserDepartmentId:e.loggedInUserDepartmentId,isAddReimbursementDisabled:ge,accountsHierarchyList:Ae,classHierarchyList:Ye,isSignedInUserReimbursementCreator:H},N.lineId)),ce.length===1&&t.jsxs(t.Fragment,{children:[t.jsxs(Zt,{children:[h!=="small"?t.jsx(Jt,{windowSize:h}):null,t.jsx(Yt,{windowSize:h,children:t.jsxs(Xa,{windowSize:h,children:[t.jsx(er,{children:it.total}),ae?t.jsx(ir,{windowSize:h,children:t.jsx(nr,{children:t.jsx(wt,{size:"Standard",start:!0,style:{display:"flex"}})})}):t.jsx(un,{amount:ee.toAmount(v,ee.defaultVendorCurrency.currencyCode,ee.defaultVendorCurrency.currencySymbol),integerStyles:Rt.h6Regular.cssObject,decimalStyles:Rt.standardRegular.cssObject})]})})]}),t.jsxs(Zt,{children:[h!=="small"?t.jsx(Jt,{windowSize:h}):null,t.jsx(Yt,{windowSize:h,children:t.jsxs(or,{windowSize:h,onClick:()=>{ge===!1&&Qe()},isDisabled:ge,"data-testid":K("add-reimbursement-container"),children:[t.jsx(Ni,{}),t.jsx(Ei,{children:it.addReimbursement})]})})]}),t.jsxs(Zt,{children:[h!=="small"?t.jsx(Jt,{windowSize:h}):null,H?t.jsxs(Yt,{windowSize:h,children:[t.jsx(tr,{windowSize:h,children:it.receivePaymentTo}),t.jsx(Za,{windowSize:h,shouldDisplay:Ce.length>0,children:t.jsx(mn,{label:{label:it.yourBankAccount,width:re},style:{width:"auto"},singleSelectField:{singleSelect:{name:bt,placeholder:nt(it.yourBankAccount),showValueEyeIcon:!ge,menuPlacement:"top",maxMenuHeight:308,showEyeIconOnSelect:!1,onDelete:F,getTooltipInfo:N=>kn(Ce,N),onClickCreateBankAccount:()=>P(!0),getLabelForId:N=>Dn(Ce,N),isOptionRemovable:!1,showDeleteIcon:!0,showAddBankAccountOption:!0,isDisabled:ge?"readonly":void 0,showTickMark:!1,alwaysShowEyeTooltip:!0},defaultValue:{selectedOption:e.paymentTo,allOptions:Je},registerOptions:{required:!0,validate:N=>!!N.selectedOption}},isFunctional:!0})}),t.jsxs(ar,{shouldDisplay:Ce.length===0,windowSize:h,onClick:()=>{ge===!1&&P(!0)},hasError:je(me,bt),isDisabled:ge,"data-testid":K("remi-add-bank-account-container"),children:[t.jsx(Ni,{}),t.jsx(Ei,{children:it.addBankAccount})]})]}):null]})]})]})},Tn=(e,o,r,c,p,C,m,v)=>{const f=Ja(r,c,p,C,m,v);return{lineIndex:e,lineId:o,reimbursementType:it.outOfPocketKey,file:void 0,outOfPocket:f,mileage:Ya(c,C,v)}},Ja=(e,o,r,c,p,C)=>({transactionDate:void 0,class:{allOptions:Ve(Ge(o,[])),selectedOption:C},account:{allOptions:Ve(zt(e,[])),selectedOption:void 0},amount:{amount:0,currencyCode:c.currencyCode,currencySymbol:c.currencySymbol,currency:{allOptions:p.map(m=>({label:`${m.currencyCode} - ${m.currency}`,value:m.currencyCode,countryCode:di(m.countryCode)})),selectedOption:c.currencyCode??we.getLocalizedStrings().common.currency.currencyCode}},memo:void 0,merchant:{allOptions:r.map(m=>m.id).filter(m=>!!m),selectedOption:void 0},recommendations:[],isCategoryUpdateSelected:!1,isCategoryFirstTimeAutofilled:!1,isRetainedCategorySelected:!1}),Ya=(e,o,r)=>({transactionDate:void 0,class:{allOptions:Ve(Ge(e,[])),selectedOption:r},distanceInMiles:void 0,amount:{amount:0,currencyCode:o.currencyCode,currencySymbol:o.currencySymbol},memo:void 0}),Za=n.div`
410
+ `,qa={total:new hi("largeMedium","h6Medium")},Q={largeLabelWidth:new d(120,120,220),marginBottom:new d(a[5],a[4]),addBankAccountMarginBottom:new d(a[5],a[5]),marginTop:new d(a[0],78),paymentToMarginTop:new d(0,a[4]),totalMarginBottom:new d(a[3],a[3]),rightMargin:new d(a[3],a[8]),leftMargin:new d(a[3],a[6]),paymentToMarginBottom:new d(12,a[3])},it=xe.getLocalizedStrings().spendManagement.reimbursement.reimbursementDetail,Ga=({remiDetails:e,isUserAdmin:o,authParams:r,uploadInvoiceEndPoint:c,showSkipAutoFill:p,isReimbursementCommentingEnabled:C,isAutoFieldsExist:m,totalAmount:v,defaultCurrency:f,hasDuplicateLine:l,bankAccounts:k,fileRequiredLineIds:w,companyMileageConfigInfo:s,analytics:y,reimbursementId:S,currencyConversionStatus:O,setShowSkipAutoFill:I,setShowBankAccountPage:P,removeDuplicateReimbursementForLine:q,onReceiptsUpload:R,setCurrentLineIdForUpload:D,onDuplicateLineClick:z,setUploadedReceiptPayload:te,removeFileFromLine:ne,onReplaceClick:oe,updateInvoiceUploadFetchState:Z,clearTentativeNameForLine:G,onDeleteBankAccount:F,uncategorizedAccounts:Y,isSignedInUserReimbursementCreator:H,duplicateLineByLineId:A,showTotalAmountLoader:ae,scrollContainerRef:de})=>{const{control:U,formState:{errors:me}}=ot(),{fields:Ne,append:pe,remove:be}=mo({name:yi,control:U}),ce=Ne,Oe=$.useRef(null),Pe=N=>{setTimeout(()=>{be(N)})},{tentativeMerchantNameByLineId:Re,remiStage:he,remiStatus:Le}=e,ge=!H||he==="pending_approval"&&Le!=="rejected"&&o||he==="pending_approval"&&Le==="rejected",Ce=ge?e.paymentToBankAccountDetail!=null?[e.paymentToBankAccountDetail]:[]:k,Je=Ce.map(N=>N.bankAccountId),h=ze(),re=Q.largeLabelWidth.value(h),at=e.whatForSection.reportTitle,He=e.accountList.accounts,Ae=e.accountsHierarchyList,Ze=e.classHierarchyList,Be=e.classList.classes,Ke=e.merchantList.merchants,qe=e.addRemiAutoFieldsByLineId,Ye=Math.max(...Object.keys(e.editRemiInitialDetails?.lineDetailSection??{}).map(N=>Number(N)),0),Qe=()=>{const N=ce[ce.length-1],ue=Tn(ce.length,Number(N.lineId)>Ye?String(Number(N.lineId)+1):String(Ye+1),Ae,Ze,Ke,f,e.allCurrencies,e.loggedInUserDepartmentId);setTimeout(()=>{pe(ue,{shouldFocus:!1})}),D(Number(ue.lineId)),I(!0),setTimeout(()=>Ri(Oe.current,de?.current),50)},[le,rt]=$.useState({}),mt=$.useCallback(N=>{const ue=le[`L${N}`];ue!=null&&Ri(ue,de?.current)},[le,de]),Xe=e.reimbursementInfo?.billStatus.code=="approved"&&e.reimbursementInfo?.billPaymentStatus.code?e.reimbursementInfo?.billPaymentStatus:e.reimbursementInfo?.billStatus,_=e.reimbursementInfo?.paymentDate!=null?ee.zeniDate(ee.getNextNthWorkingDay(e.reimbursementInfo.paymentDate.toDate(),[0,6],e.achSameDayMaxDays).toDateString()):void 0,pt=e.reimbursementInfo?.expectedDepositDate??_;return t.jsxs(Qa,{windowSize:h,showSkipAutoFill:p,children:[ce.map((N,ue)=>t.jsx(ka,{removeDuplicateReimbursementForLine:q,onDuplicateLineClick:z,scrollToSection:mt,setRefByLineId:rt,duplicateLineByLineId:A,reimbursementId:S,remiUploadStatus:e.uploadStatus,uncategorizedAccounts:Y,progressSectionObj:Xe,createDate:e.createTime,paymentDate:pt,scheduleDate:e.reimbursementInfo?.paymentDate,approvedDate:e.latestApprovedDate,isFirstOrLastListItem:ce.length-1===ue||ue===0,index:ue,reimbursementSectionRef:Oe,remiStage:he,remiStatus:Le,authParams:r,file:N.file,uploadInvoiceEndPoint:c,showSkipAutoFill:p,lineData:N,currencyConversionState:O[N.lineId],recommendationFetchState:e.lineDetailSection[N.lineId]?.recommendationFetchState,setCurrentLineIdForUpload:D,setUploadedReceiptPayload:te,onReplaceClick:oe,onReceiptsUpload:R,removeFileFromLine:ne,isReimbursementCommentingEnabled:C,isAutoFieldsExist:m,reportTitle:at,accountList:He,classList:Be,merchantList:Ke,autoFieldsByLineId:qe,onRemoveReimbursement:Pe,onAddReimbursement:Qe,totalAmount:v,showTotalAmountLoader:ae,hasDuplicateLine:l,totalNumberOfLines:ce.length,updateInvoiceUploadFetchState:Z,clearTentativeNameForLine:G,tentativeMerchantName:Re[N.lineId],companyMileageConfigInfo:s,defaultCurrency:f,setShowBankAccountPage:P,paymentTo:e.paymentTo,bankAccounts:Ce,onDeleteBankAccount:F,analytics:y,fileRequiredLineIds:w,allCurrencies:e.allCurrencies,loggedInUserDepartmentId:e.loggedInUserDepartmentId,isAddReimbursementDisabled:ge,accountsHierarchyList:Ae,classHierarchyList:Ze,isSignedInUserReimbursementCreator:H},N.lineId)),ce.length===1&&t.jsxs(t.Fragment,{children:[t.jsxs(Yt,{children:[h!=="small"?t.jsx(Jt,{windowSize:h}):null,t.jsx(Zt,{windowSize:h,children:t.jsxs(Xa,{windowSize:h,children:[t.jsx(er,{children:it.total}),ae?t.jsx(ir,{windowSize:h,children:t.jsx(nr,{children:t.jsx(xt,{size:"Standard",start:!0,style:{display:"flex"}})})}):t.jsx(un,{amount:ee.toAmount(v,ee.defaultVendorCurrency.currencyCode,ee.defaultVendorCurrency.currencySymbol),integerStyles:Rt.h6Regular.cssObject,decimalStyles:Rt.standardRegular.cssObject})]})})]}),t.jsxs(Yt,{children:[h!=="small"?t.jsx(Jt,{windowSize:h}):null,t.jsx(Zt,{windowSize:h,children:t.jsxs(or,{windowSize:h,onClick:()=>{ge===!1&&Qe()},isDisabled:ge,"data-testid":K("add-reimbursement-container"),children:[t.jsx(Ni,{}),t.jsx(Ei,{children:it.addReimbursement})]})})]}),t.jsxs(Yt,{children:[h!=="small"?t.jsx(Jt,{windowSize:h}):null,H?t.jsxs(Zt,{windowSize:h,children:[t.jsx(tr,{windowSize:h,children:it.receivePaymentTo}),t.jsx(Ya,{windowSize:h,shouldDisplay:Ce.length>0,children:t.jsx(mn,{label:{label:it.yourBankAccount,width:re},style:{width:"auto"},singleSelectField:{singleSelect:{name:bt,placeholder:nt(it.yourBankAccount),showValueEyeIcon:!ge,menuPlacement:"top",maxMenuHeight:308,showEyeIconOnSelect:!1,onDelete:F,getTooltipInfo:N=>kn(Ce,N),onClickCreateBankAccount:()=>P(!0),getLabelForId:N=>Dn(Ce,N),isOptionRemovable:!1,showDeleteIcon:!0,showAddBankAccountOption:!0,isDisabled:ge?"readonly":void 0,showTickMark:!1,alwaysShowEyeTooltip:!0},defaultValue:{selectedOption:e.paymentTo,allOptions:Je},registerOptions:{required:!0,validate:N=>!!N.selectedOption}},isFunctional:!0})}),t.jsxs(ar,{shouldDisplay:Ce.length===0,windowSize:h,onClick:()=>{ge===!1&&P(!0)},hasError:je(me,bt),isDisabled:ge,"data-testid":K("remi-add-bank-account-container"),children:[t.jsx(Ni,{}),t.jsx(Ei,{children:it.addBankAccount})]})]}):null]})]})]})},Tn=(e,o,r,c,p,C,m,v)=>{const f=Ja(r,c,p,C,m,v);return{lineIndex:e,lineId:o,reimbursementType:it.outOfPocketKey,file:void 0,outOfPocket:f,mileage:Za(c,C,v)}},Ja=(e,o,r,c,p,C)=>({transactionDate:void 0,class:{allOptions:Ve(Ge(o,[])),selectedOption:C},account:{allOptions:Ve(zt(e,[])),selectedOption:void 0},amount:{amount:0,currencyCode:c.currencyCode,currencySymbol:c.currencySymbol,currency:{allOptions:p.map(m=>({label:`${m.currencyCode} - ${m.currency}`,value:m.currencyCode,countryCode:di(m.countryCode)})),selectedOption:c.currencyCode??xe.getLocalizedStrings().common.currency.currencyCode}},memo:void 0,merchant:{allOptions:r.map(m=>m.id).filter(m=>!!m),selectedOption:void 0},recommendations:[],isCategoryUpdateSelected:!1,isCategoryFirstTimeAutofilled:!1,isRetainedCategorySelected:!1}),Za=(e,o,r)=>({transactionDate:void 0,class:{allOptions:Ve(Ge(e,[])),selectedOption:r},distanceInMiles:void 0,amount:{amount:0,currencyCode:o.currencyCode,currencySymbol:o.currencySymbol},memo:void 0}),Ya=n.div`
411
411
  margin-left: ${e=>Q.leftMargin.valuePx(e.windowSize)};
412
412
  margin-right: ${e=>Q.rightMargin.valuePx(e.windowSize)};
413
413
  margin-bottom: ${e=>Q.addBankAccountMarginBottom.valuePx(e.windowSize)};
@@ -417,7 +417,7 @@ import{aP as ri,d as ft,ax as xt,aa as tn,az as ki,l as ee,F as we,aC as nn,q as
417
417
  display: ${e=>e.shouldDisplay?"inherit":"none"};
418
418
  `,Jt=n.div`
419
419
  width: ${e=>e.windowSize==="small"?"100%":"42%"};
420
- `,Yt=n.div`
420
+ `,Zt=n.div`
421
421
  width: ${e=>e.windowSize==="small"?"100%":"58%"};
422
422
  `,Qa=n.div`
423
423
  display: ${e=>e.windowSize==="small"&&e.showSkipAutoFill?"none":"flex"};
@@ -501,10 +501,10 @@ import{aP as ri,d as ft,ax as xt,aa as tn,az as ki,l as ee,F as we,aC as nn,q as
501
501
  margin-right: ${i.sp2};
502
502
  width: ${i.sp3};
503
503
  height: ${i.sp3};
504
- `,Zt=n.div`
504
+ `,Yt=n.div`
505
505
  display: flex;
506
506
  width: 100%;
507
- `,Ee={buttonWidth:new d(140,140),paddingLeft:new d(a[3],a[6]),paddingRight:new d(a[3],a[8]),subTitleMarginbottom:new d(a[2],a[3]),orSeperatorTopBottomMargin:new d(a[6],44),iconWidthHeight:new d(20,a[4])},Wi="userBankAccountPage",Pt="bankAccountSection",rr=e=>({[Pt]:{bankRoutingNumber:e?.bankRoutingNumber,bankName:e?.bankName,bankAccountNumber:e?.bankAccountNumber,confirmedBankAccountNumber:e?.confirmedBankAccountNumber,bankAccountName:e?.bankAccountName}}),Ui=e=>`${e}_form`,lr=({bankAccountCreationState:e,setShowBankAccountPage:o,plaidConnectionDetails:r,onFetchLinkTokenClick:c,onEstablishConnectionClick:p,bankAccountToCreate:C,fetchBankNameByRoutingStatus:m,isDisabled:v,onSaveHandler:f,onUserBankDetailsUpdated:l,onFetchBankName:k,onBackClick:x})=>{const s=ft(),y=ze(),S=tn({mode:"onBlur",reValidateMode:"onChange",defaultValues:$.useMemo(()=>rr(C),[C])}),O=$.useCallback(G=>{p?.(G),x()},[x,p]),I=r.link_account_no_microdeposit,{open:P}=ho({token:I.linkToken??null,onSuccess:O});$.useEffect(()=>{(ee.zeniDate(new Date().toISOString()).isAfter(I.expiration)||I.linkToken==null)&&c?.("link_account_no_microdeposit")},[]);const[q,R]=$.useState(!1),D=we.getLocalizedStrings().spendManagement.reimbursement.reimbursementDetail,z=we.getLocalizedStrings().common.footer,te={onOkClick:()=>{R(!1),S.reset(),x()},onCancelClick:()=>{R(!1)}},ne=async(G,F)=>{const Z=F[Pt].bankRoutingNumber;l(F),G===`${Pt}.bankRoutingNumber`&&Z?.length===9&&So.test(Z)===!0&&k?.(Z)};$.useEffect(()=>{const G=S.watch((F,{name:Z})=>{Z!=null&&F!=null&&go(()=>ne(Z,F))});return()=>{G.unsubscribe()}}),$.useEffect(()=>{e?.fetchState==="Completed"&&x()},[e?.fetchState,x,o]);const oe=S.handleSubmit(G=>{m.fetchState!=="In-Progress"&&f()}),Y=s.mode==="light"?new Ti(s.colors.brandColorJadeLight):new Ti(s.colors.brandColorJadeDark);return t.jsxs(sr,{children:[t.jsxs(gr,{windowSize:y,children:[q===!0?t.jsx(si,{titleComponent:t.jsx(rn,{children:D.discardTitle}),descriptionComponent:t.jsx(an,{children:D.discardDescription}),primaryButtonText:D.buttons.delete,secondaryButtonText:D.buttons.cancel,action:te}):null,t.jsx(Mo,{header:D.addBankAccount,isDirty:S.formState.isDirty,onBackClick:x,setShowConfirmationPopup:R}),t.jsx(dr,{}),t.jsxs(yr,{size:y,children:[t.jsx(yo,{onClick:()=>{S.reset(),P()},title:D.connectYourBank,subTitle:D.loginToBank,header:D.setupAchPayments,icon:{element:t.jsx(bo,{width:Ee.iconWidthHeight.valuePx(y),height:Ee.iconWidthHeight.valuePx(y)}),color:Y},style:{width:"unset",rowGap:y==="small"?i.sp2:void 0}}),t.jsxs(cr,{windowSize:y,children:[t.jsx(ur,{}),t.jsx(pr,{children:t.jsx(hr,{children:D.or})})]}),t.jsx(mr,{windowSize:y,children:D.saveAccountManually})]}),t.jsx(br,{size:y,children:t.jsx(on,{...S,children:t.jsxs("form",{id:Ui(Wi),onSubmit:oe,children:[e?.fetchState==="Error"&&e.error?.code===409?t.jsx(Fo,{warningText:D.accountExistWarning}):null,t.jsx(Bo,{bankAccountToCreate:C,fetchBankNameByRoutingStatus:m,sectionId:Pt})]})})})]}),t.jsx(sn,{formId:Ui(Wi),primaryBtn:{label:D.saveAccount,isLoading:e.fetchState==="In-Progress",style:{width:Ee.buttonWidth.value(y)},isDisabled:v!=null},cancelBtn:{label:z.cancel,style:{width:Ee.buttonWidth.value(y)},shouldResetOnCancel:!1,onClick:()=>{S.formState.isDirty?R(!0):(R(!1),S.reset(),x())}}})]})},sr=n.div`
507
+ `,Ee={buttonWidth:new d(140,140),paddingLeft:new d(a[3],a[6]),paddingRight:new d(a[3],a[8]),subTitleMarginbottom:new d(a[2],a[3]),orSeperatorTopBottomMargin:new d(a[6],44),iconWidthHeight:new d(20,a[4])},Wi="userBankAccountPage",Pt="bankAccountSection",rr=e=>({[Pt]:{bankRoutingNumber:e?.bankRoutingNumber,bankName:e?.bankName,bankAccountNumber:e?.bankAccountNumber,confirmedBankAccountNumber:e?.confirmedBankAccountNumber,bankAccountName:e?.bankAccountName}}),Ui=e=>`${e}_form`,lr=({bankAccountCreationState:e,setShowBankAccountPage:o,plaidConnectionDetails:r,onFetchLinkTokenClick:c,onEstablishConnectionClick:p,bankAccountToCreate:C,fetchBankNameByRoutingStatus:m,isDisabled:v,onSaveHandler:f,onUserBankDetailsUpdated:l,onFetchBankName:k,onBackClick:w})=>{const s=ft(),y=ze(),S=tn({mode:"onBlur",reValidateMode:"onChange",defaultValues:$.useMemo(()=>rr(C),[C])}),O=$.useCallback(G=>{p?.(G),w()},[w,p]),I=r.link_account_no_microdeposit,{open:P}=ho({token:I.linkToken??null,onSuccess:O});$.useEffect(()=>{(ee.zeniDate(new Date().toISOString()).isAfter(I.expiration)||I.linkToken==null)&&c?.("link_account_no_microdeposit")},[]);const[q,R]=$.useState(!1),D=xe.getLocalizedStrings().spendManagement.reimbursement.reimbursementDetail,z=xe.getLocalizedStrings().common.footer,te={onOkClick:()=>{R(!1),S.reset(),w()},onCancelClick:()=>{R(!1)}},ne=async(G,F)=>{const Y=F[Pt].bankRoutingNumber;l(F),G===`${Pt}.bankRoutingNumber`&&Y?.length===9&&So.test(Y)===!0&&k?.(Y)};$.useEffect(()=>{const G=S.watch((F,{name:Y})=>{Y!=null&&F!=null&&go(()=>ne(Y,F))});return()=>{G.unsubscribe()}}),$.useEffect(()=>{e?.fetchState==="Completed"&&w()},[e?.fetchState,w,o]);const oe=S.handleSubmit(G=>{m.fetchState!=="In-Progress"&&f()}),Z=s.mode==="light"?new Ti(s.colors.brandColorJadeLight):new Ti(s.colors.brandColorJadeDark);return t.jsxs(sr,{children:[t.jsxs(gr,{windowSize:y,children:[q===!0?t.jsx(si,{titleComponent:t.jsx(rn,{children:D.discardTitle}),descriptionComponent:t.jsx(an,{children:D.discardDescription}),primaryButtonText:D.buttons.delete,secondaryButtonText:D.buttons.cancel,action:te}):null,t.jsx(Mo,{header:D.addBankAccount,isDirty:S.formState.isDirty,onBackClick:w,setShowConfirmationPopup:R}),t.jsx(dr,{}),t.jsxs(yr,{size:y,children:[t.jsx(yo,{onClick:()=>{S.reset(),P()},title:D.connectYourBank,subTitle:D.loginToBank,header:D.setupAchPayments,icon:{element:t.jsx(bo,{width:Ee.iconWidthHeight.valuePx(y),height:Ee.iconWidthHeight.valuePx(y)}),color:Z},style:{width:"unset",rowGap:y==="small"?i.sp2:void 0}}),t.jsxs(cr,{windowSize:y,children:[t.jsx(ur,{}),t.jsx(pr,{children:t.jsx(hr,{children:D.or})})]}),t.jsx(mr,{windowSize:y,children:D.saveAccountManually})]}),t.jsx(br,{size:y,children:t.jsx(on,{...S,children:t.jsxs("form",{id:Ui(Wi),onSubmit:oe,children:[e?.fetchState==="Error"&&e.error?.code===409?t.jsx(Fo,{warningText:D.accountExistWarning}):null,t.jsx(Bo,{bankAccountToCreate:C,fetchBankNameByRoutingStatus:m,sectionId:Pt})]})})})]}),t.jsx(sn,{formId:Ui(Wi),primaryBtn:{label:D.saveAccount,isLoading:e.fetchState==="In-Progress",style:{width:Ee.buttonWidth.value(y)},isDisabled:v!=null},cancelBtn:{label:z.cancel,style:{width:Ee.buttonWidth.value(y)},shouldResetOnCancel:!1,onClick:()=>{S.formState.isDirty?R(!0):(R(!1),S.reset(),w())}}})]})},sr=n.div`
508
508
  display: flex;
509
509
  flex-direction: column;
510
510
  width: 100%;
@@ -547,7 +547,7 @@ import{aP as ri,d as ft,ax as xt,aa as tn,az as ki,l as ee,F as we,aC as nn,q as
547
547
  padding-left: ${e=>Ee.paddingLeft.valuePx(e.size)};
548
548
  padding-right: ${e=>Ee.paddingRight.valuePx(e.size)};
549
549
  padding-bottom: ${i.sp3};
550
- `,Te={containerWidth:new d(343,544),confirmationPopUpTitleMarginTop:new d(a[6],a[7]),confirmationPopUpTitlePaddingLeftRight:new d(a[5],a[8]),submitButtonWidth:new d(145,156),cancelButtonWidth:new d(121,121),errorLineItemGap:new d(a[2],12),styledCloseIconRight:new d(a[3],a[8])},{footer:_i}=we.getLocalizedStrings().common,xe=we.getLocalizedStrings().spendManagement.reimbursement.reimbursementDetail.duplicatePopUpInfo,Vi=({fetchState:e})=>{switch(e){case"Not-Started":return t.jsx(Ki,{});case"In-Progress":return t.jsx(wt,{size:"Small",start:!0,style:{alignItems:"center",display:"flex"}});case"Completed":return t.jsx(jn,{});default:return t.jsx(Ki,{})}},fr=e=>{switch(e){case"Not-Started":return xe.detectDuplicates;case"In-Progress":return xe.detectingDuplicates;case"Completed":return xe.noDuplicatesFound;default:return xe.detectDuplicates}},xr=({submitFetchState:e,duplicateReimbursementStatus:o,hasDuplicateLine:r,numberOfDuplicateLines:c,setShowDuplicatePopup:p,analytics:C,reimbursementId:m,submitReport:v,fetchDuplicateReimbursement:f,clearDuplicateReimbursementDetail:l,clearRemiSaveStatus:k})=>{const x=ze(),[s,y]=Ct.useState(!0),S=ri(e),O=ri(o);Ct.useEffect(()=>{setTimeout(()=>{s&&(y(!1),o==="Not-Started"&&f())},2e3)},[o,f,s]),Ct.useEffect(()=>{S==="In-Progress"&&e==="Completed"&&(l(),p(!1))},[e,S,p,l]),Ct.useEffect(()=>{O==="In-Progress"&&o==="Completed"&&!r&&v()},[O,o,r,v]);const I=o==="Error"||e==="Error";return t.jsxs(t.Fragment,{children:[I?t.jsx(wr,{size:x}):null,t.jsx(si,{action:{onOkClick:()=>{I?(l(),e==="Error"&&k(),y(!0)):(C?.trackReimbursementReviewDuplicateReportReimbursement(c,m),p(!1),lo())},onCancelClick:()=>{I?(l(),e==="Error"&&k(),p(!1)):(C?.trackReimbursementSubmitAnywayDuplicateReimbursement(c,m),v())}},shouldClickAway:I,isSecondaryLoading:e==="In-Progress",secondaryButtonVariant:"secondary",primaryButtonText:I?_i.resubmit:xe.primaryButtonText,secondaryButtonText:I?_i.cancel:xe.secondaryButtonText,primaryButtonWidth:I?Te.cancelButtonWidth.value(x):Te.submitButtonWidth.value(x),secondaryButtonWidth:I?Te.cancelButtonWidth.value(x):Te.submitButtonWidth.value(x),descriptionComponent:t.jsx(vr,{size:x,children:t.jsxs(Sr,{hasDuplicate:r,duplicateReimbursementStatus:o,children:[t.jsxs(Xt,{isDisabled:!1,isSuccess:!s,children:[s?t.jsx(wt,{size:"Small",start:!0,style:{alignItems:"center",display:"flex"}}):t.jsx(jn,{}),t.jsx(Qt,{isDisabled:!1,children:s?xe.reviewingExpenses:xe.reviewedAllExpenses})]}),r||o==="Error"?t.jsxs(Gi,{size:x,children:[t.jsx(Hi,{}),t.jsx(qi,{children:o==="Error"?xe.failedToDetect:`${c} ${xe.duplicateExpensesFound}`})]}):t.jsxs(Xt,{isDisabled:o==="Not-Started",isSuccess:o==="Completed"&&c===0,children:[t.jsx(Vi,{fetchState:o}),t.jsx(Qt,{isDisabled:o==="Not-Started",children:fr(o)})]}),e==="Error"?t.jsxs(Gi,{size:x,children:[t.jsx(Hi,{}),t.jsx(qi,{children:xe.failedToSubmit})]}):r||o==="Error"?null:t.jsxs(Xt,{isDisabled:e==="Not-Started",isSuccess:e==="Completed",children:[t.jsx(Vi,{fetchState:e}),t.jsx(Qt,{isDisabled:e==="Not-Started",children:e==="Not-Started"?xe.submitReport:xe.submittingReport})]})]})}),titleComponent:t.jsx($r,{size:x,children:xe.title}),showFooter:r||I,containerStyle:{width:Te.containerWidth.value(x),maxWidth:"unset"}})]})},wr=n(cn)`
550
+ `,Te={containerWidth:new d(343,544),confirmationPopUpTitleMarginTop:new d(a[6],a[7]),confirmationPopUpTitlePaddingLeftRight:new d(a[5],a[8]),submitButtonWidth:new d(145,156),cancelButtonWidth:new d(121,121),errorLineItemGap:new d(a[2],12),styledCloseIconRight:new d(a[3],a[8])},{footer:_i}=xe.getLocalizedStrings().common,we=xe.getLocalizedStrings().spendManagement.reimbursement.reimbursementDetail.duplicatePopUpInfo,Vi=({fetchState:e})=>{switch(e){case"Not-Started":return t.jsx(Ki,{});case"In-Progress":return t.jsx(xt,{size:"Small",start:!0,style:{alignItems:"center",display:"flex"}});case"Completed":return t.jsx(jn,{});default:return t.jsx(Ki,{})}},fr=e=>{switch(e){case"Not-Started":return we.detectDuplicates;case"In-Progress":return we.detectingDuplicates;case"Completed":return we.noDuplicatesFound;default:return we.detectDuplicates}},wr=({submitFetchState:e,duplicateReimbursementStatus:o,hasDuplicateLine:r,numberOfDuplicateLines:c,setShowDuplicatePopup:p,analytics:C,reimbursementId:m,submitReport:v,fetchDuplicateReimbursement:f,clearDuplicateReimbursementDetail:l,clearRemiSaveStatus:k})=>{const w=ze(),[s,y]=Ct.useState(!0),S=ri(e),O=ri(o);Ct.useEffect(()=>{setTimeout(()=>{s&&(y(!1),o==="Not-Started"&&f())},2e3)},[o,f,s]),Ct.useEffect(()=>{S==="In-Progress"&&e==="Completed"&&(l(),p(!1))},[e,S,p,l]),Ct.useEffect(()=>{O==="In-Progress"&&o==="Completed"&&!r&&v()},[O,o,r,v]);const I=o==="Error"||e==="Error";return t.jsxs(t.Fragment,{children:[I?t.jsx(xr,{size:w}):null,t.jsx(si,{action:{onOkClick:()=>{I?(l(),e==="Error"&&k(),y(!0)):(C?.trackReimbursementReviewDuplicateReportReimbursement(c,m),p(!1),lo())},onCancelClick:()=>{I?(l(),e==="Error"&&k(),p(!1)):(C?.trackReimbursementSubmitAnywayDuplicateReimbursement(c,m),v())}},shouldClickAway:I,isSecondaryLoading:e==="In-Progress",secondaryButtonVariant:"secondary",primaryButtonText:I?_i.resubmit:we.primaryButtonText,secondaryButtonText:I?_i.cancel:we.secondaryButtonText,primaryButtonWidth:I?Te.cancelButtonWidth.value(w):Te.submitButtonWidth.value(w),secondaryButtonWidth:I?Te.cancelButtonWidth.value(w):Te.submitButtonWidth.value(w),descriptionComponent:t.jsx(vr,{size:w,children:t.jsxs(Sr,{hasDuplicate:r,duplicateReimbursementStatus:o,children:[t.jsxs(Xt,{isDisabled:!1,isSuccess:!s,children:[s?t.jsx(xt,{size:"Small",start:!0,style:{alignItems:"center",display:"flex"}}):t.jsx(jn,{}),t.jsx(Qt,{isDisabled:!1,children:s?we.reviewingExpenses:we.reviewedAllExpenses})]}),r||o==="Error"?t.jsxs(Gi,{size:w,children:[t.jsx(Hi,{}),t.jsx(qi,{children:o==="Error"?we.failedToDetect:`${c} ${we.duplicateExpensesFound}`})]}):t.jsxs(Xt,{isDisabled:o==="Not-Started",isSuccess:o==="Completed"&&c===0,children:[t.jsx(Vi,{fetchState:o}),t.jsx(Qt,{isDisabled:o==="Not-Started",children:fr(o)})]}),e==="Error"?t.jsxs(Gi,{size:w,children:[t.jsx(Hi,{}),t.jsx(qi,{children:we.failedToSubmit})]}):r||o==="Error"?null:t.jsxs(Xt,{isDisabled:e==="Not-Started",isSuccess:e==="Completed",children:[t.jsx(Vi,{fetchState:e}),t.jsx(Qt,{isDisabled:e==="Not-Started",children:e==="Not-Started"?we.submitReport:we.submittingReport})]})]})}),titleComponent:t.jsx($r,{size:w,children:we.title}),showFooter:r||I,containerStyle:{width:Te.containerWidth.value(w),maxWidth:"unset"}})]})},xr=n(cn)`
551
551
  width: ${i.sp4};
552
552
  height: ${i.sp4};
553
553
  color: ${e=>e.theme.colors.hero};
@@ -559,7 +559,7 @@ import{aP as ri,d as ft,ax as xt,aa as tn,az as ki,l as ee,F as we,aC as nn,q as
559
559
  &:hover {
560
560
  color: ${e=>e.theme.colors.primary};
561
561
  }
562
- `,Hi=n(xo)`
562
+ `,Hi=n(wo)`
563
563
  width: ${i.sp4};
564
564
  height: ${i.sp4};
565
565
  min-width: ${i.sp4};
@@ -616,7 +616,7 @@ import{aP as ri,d as ft,ax as xt,aa as tn,az as ki,l as ee,F as we,aC as nn,q as
616
616
  height: ${i.sp4};
617
617
  min-width: ${i.sp4};
618
618
  color: ${j.success};
619
- `,X={rightMargin:new d(a[3],a[8]),leftMargin:new d(a[3],a[6]),bottomMargin:new d(56,56),closeMarginTop:new d(0,19),closeMarginRight:new d(a[3],a[8]),rightSectionWidth:new d(100,58),leftSectionWidth:new d(100,42),footerButtonWidth:new d(120,165),right:new d(a[3],a[0]),actionsContainerRight:new d(a[0],a[6]),otherActionsContainerBottom:new d(58,44),duplicateBannerWrapperMarginTop:new d(a[5],a[3]),duplicateBannerWrapperMarginRight:new d(a[3],a[8]),duplicateBannerWrapperMarginBottom:new d(a[5],a[3]),duplicateBannerWrapperMarginLeft:new d(a[3],a[6]),navBarWidth:new d(100,58)},{spendManagement:{reimbursement:{reimbursementDetail:b,bulkActions:Ji}},common:{currency:{currencyCode:We,currencySymbol:jt},texts:{comments:Cr},strings:{empty:kr}},collaboration:{threads:{placeholder:{addANewComment:Ir,replyAComment:Dr},tooltip:{resolveComment:Tr,unResolveComment:jr}}},dateFormat:Yi}=we.getLocalizedStrings(),Zi="editReimbursementDetailPage",Qi=e=>`${e}_form`,Or=(e,o,r,c,p,C,m,v,f)=>{const l=e.outOfPocket,k=e.mileage,x=l.merchant,s=l.recommendations;return{lineIndex:C,lineId:e?.lineId??String(C+1),reimbursementType:e?.type??b.outOfPocketKey,file:e?.file,homeCurrencyConversions:{amount:e?.homeCurrencyConversions?.amount??0,currencyCode:e?.homeCurrencyConversions?.currencyCode??m.currencyCode,currencySymbol:e?.homeCurrencyConversions?.currencySymbol??m.currencySymbol},outOfPocket:{recommendedAccount:l.recommendedAccount,isCategoryUpdateSelected:l.isCategoryUpdateSelected??!1,isCategoryFirstTimeAutofilled:l.isCategoryFirstTimeAutofilled??!1,retainedAccount:l.retainedAccount,isRetainedCategorySelected:l.isRetainedCategorySelected??!1,recommendations:s??[],transactionDate:l?.transactionDate?.toDate()??void 0,class:{allOptions:Ve(Ge(r,[])),selectedOption:l?.lineDetail?.class?.classId??f},account:{allOptions:Ve(zt(o,s)),selectedOption:l.lineDetail?.account?.qboId??l.lineDetail?.account?.accountId},amount:{amount:l?.amount??0,currencyCode:l?.currencyCode??m.currencyCode,currencySymbol:l?.currencySymbol??m.currencySymbol,currency:{allOptions:v.map(y=>({label:`${y.currencyCode} - ${y.currency}`,value:y.currencyCode,countryCode:di(y.countryCode)})),selectedOption:l?.currencyCode??m.currencyCode??We}},memo:l?.description??void 0,merchant:{allOptions:c.map(y=>y.id).filter(y=>!!y),selectedOption:x?.id?x?.id:x?.name?x?.name:e?.lineId!=null?p[e?.lineId]:void 0}},mileage:{transactionDate:k?.transactionDate?.toDate(),class:{allOptions:Ve(Ge(r,[])),selectedOption:k?.lineDetail?.class?.classId},distanceInMiles:k?.distanceMileage?.value,amount:{amount:k?.amount??0,currencyCode:k?.currencyCode??m.currencyCode,currencySymbol:k?.currencySymbol??m.currencySymbol},memo:k?.description}}},ei=(e,o,r)=>{const c=[];return Object.values(e.lineDetailSection).forEach((p,C)=>{p?.lineId!=null&&c.push(Or(p,e.accountsHierarchyList,e.classHierarchyList,e.merchantList.merchants,e.tentativeMerchantNameByLineId,C,o,e.allCurrencies,e.loggedInUserDepartmentId))}),c.length===0&&c.push(Tn(0,"1",e.accountsHierarchyList,e.classHierarchyList,e.merchantList.merchants,o,e.allCurrencies,e.loggedInUserDepartmentId)),{[At]:{reportTitle:e.whatForSection.reportTitle},[yi]:c,[bt]:{selectedOption:e.paymentTo,allOptions:r.map(p=>p.bankAccountId)}}},ti=(e,o)=>{const r=c=>c.lineId==null||o[c.lineId]?.fetchState==="In-Progress"?0:(o[c.lineId]?.fetchState,c.type===b.mileageKey?c?.mileage?.amount??0:c?.outOfPocket?.currencyCode!==We&&c.homeCurrencyConversions?.amount!==c?.outOfPocket?.amount?c.homeCurrencyConversions?.amount??0:c?.outOfPocket?.amount??0);return Object.values(e).reduce((c,p)=>c+r(p),0)},ii=(e,o,r,c,p,C,m,v)=>{const f={};return e.lineInfo.forEach(l=>{const k=v.find(O=>O.classId===l.mileage.class.selectedOption),x=m.find(O=>O.qboId===l.outOfPocket.account.selectedOption||O.accountId===l.outOfPocket.account.selectedOption),s=v.find(O=>O.classId===l.outOfPocket.class.selectedOption),y=o.find(O=>O.id===l.outOfPocket.merchant.selectedOption),S=C.find(O=>O.currencyCode===l.outOfPocket.amount?.currency.selectedOption)?.currencySymbol;f[l.lineId]={fileId:l.file?.fileId,lineId:l.lineId,type:l.reimbursementType,homeCurrencyConversions:l.homeCurrencyConversions??{amount:0,currencyCode:"USD",currencySymbol:"$"},mileage:{description:l.mileage.memo??"",lineDetail:{class:k},transactionDate:l.mileage.transactionDate!=null?ee.zeniDate(l.mileage.transactionDate.toDateString()):void 0,amount:l.mileage.amount?.amount??0,currencyCode:l.mileage.amount?.currencyCode??S,currencySymbol:l.mileage.amount?.currencySymbol??S,distanceMileage:{unit:"miles",value:l.mileage.distanceInMiles??0}},outOfPocket:{description:l.outOfPocket.memo??"",lineDetail:{class:s,account:x},transactionDate:l.outOfPocket.transactionDate!=null?ee.zeniDate(l.outOfPocket.transactionDate.toDateString()):void 0,amount:l.outOfPocket.amount?.amount??0,currencyCode:l.outOfPocket.amount?.currency.selectedOption??S,currencySymbol:S,merchant:l.outOfPocket.merchant.selectedOption!=null?{id:y?.id??"",name:y?.name??l.outOfPocket.merchant.selectedOption}:void 0,recommendations:l.outOfPocket.recommendations,recommendedAccount:l.outOfPocket.recommendedAccount,isCategoryUpdateSelected:l.outOfPocket.isCategoryUpdateSelected,isCategoryFirstTimeAutofilled:l.outOfPocket.isCategoryFirstTimeAutofilled,isRetainedCategorySelected:l.outOfPocket.isRetainedCategorySelected,retainedAccount:l.outOfPocket.retainedAccount}}}),{whatForSection:{reportTitle:e.whatFor.reportTitle},updatesByLineId:f,totalAmount:{amount:c,...r},currencyConversionStateByLineId:p,paymentTo:e.paymentTo.selectedOption}},Ol=({remiDetails:e,authParams:o,defaultCurrency:r,companyMileageConfigInfo:c,uploadInvoiceEndPoint:p,isReimbursementCommentingEnabled:C,isUserAdmin:m,analytics:v,reimbursementId:f,plaidConnectionDetails:l,bankAccountCreationState:k,bankNameByRouting:x,bankAccounts:s,isSignedInUserReimbursementCreator:y,uncategorizedAccounts:S,bankAccountToCreate:O,fetchBankNameByRoutingStatus:I,onUserBankDetailsUpdated:P,onFetchBankName:q,onSaveBankAccount:R,fetchDuplicateReimbursement:D,clearDuplicateReimbursementDetail:z,clearRemiSaveStatus:te,removeDuplicateReimbursementForLine:ne,onDuplicateLineClick:oe,onExistingMerchantChange:Y,onNewMerchantChange:G,onReceiptsUpload:F,saveRemiDetails:Z,submitRemiDetails:H,discardReimbursementDetailsFromLocalStore:A,onReimbursementDetailsChanged:ae,updateReimbursementType:de,onHomeCurrencyConversionUpdate:U,redirectToReimbursementListScreen:me,redirectToReimbursementDetailScreen:Ne,deleteReimbursement:pe,removeFileFromLine:be,onZeniLogoClick:ce,onAmountChanged:Oe,updateInvoiceUploadFetchState:Pe,clearTentativeNameForLine:Re,onAddNewRule:he,onFetchLinkTokenClick:Le,onEstablishConnectionClick:ge,deleteBankAccount:Ce,onBackClickFromBankAccountPage:Je})=>{const h=$.useRef(null),re=$.useRef(null),at=ri(e.uploadStatus),He=ft(),Ae=xt(),[Ye,Be]=$.useState(!1),[Ke,qe]=$.useState(!1),[Ze,Qe]=$.useState("save"),[le,rt]=$.useState(ti(e.lineDetailSection,e.currencyConversionStatus)),[mt,Xe]=$.useState(!1),[_,pt]=$.useState(null),[N,ue]=$.useState(!1),St=`dashboard_${Ae.currentTenant?.companyId}`,ke=tn({mode:"all",reValidateMode:"onChange",defaultValues:$.useMemo(()=>ei(e,r,s),[e,r,s]),values:$.useMemo(()=>ei(e,r,s),[e,r,s]),resetOptions:{keepErrors:!0},shouldFocusError:!0}),{isDirty:B,dirtyFields:On}=ke.formState,Pn=async(g,T)=>{const{lineInfo:u}=T,w=Number(g.split(".")[1]);if(g.includes("reportTitle")||g.includes("memo"))return;if(g.includes("reimbursementType")){const M=u[w].mileage,W=u[w].outOfPocket;u[w]={...u[w],outOfPocket:{transactionDate:W.transactionDate??void 0,class:{allOptions:W.class.allOptions??Ve(Ge(e.classHierarchyList,[])),selectedOption:W.class.selectedOption??void 0},account:{allOptions:W.account.allOptions??Ve(zt(e.accountsHierarchyList,[])),selectedOption:W.account.selectedOption??void 0},amount:W.amount??{amount:0,currencyCode:r.currencyCode,currencySymbol:r.currencySymbol,currency:{allOptions:e.allCurrencies.map(Se=>({label:`${Se.currencyCode} - ${Se.currency}`,value:Se.currencyCode,countryCode:di(Se.countryCode)})),selectedOption:r.currencyCode??We}},memo:W.memo??void 0,merchant:W.merchant??void 0,recommendations:W.recommendations??[],recommendedAccount:W.recommendedAccount??void 0,isCategoryUpdateSelected:W.isCategoryUpdateSelected??!1,isCategoryFirstTimeAutofilled:W.isCategoryFirstTimeAutofilled??!1,retainedAccount:W.retainedAccount??void 0,isRetainedCategorySelected:W.isRetainedCategorySelected??!1},mileage:{transactionDate:M.transactionDate??void 0,class:{allOptions:M.class.allOptions??Ve(Ge(e.classHierarchyList,[])),selectedOption:M.class.selectedOption??e.loggedInUserDepartmentId},distanceInMiles:M.distanceInMiles,amount:{amount:M?.amount?.amount??0,currencyCode:M?.amount?.currencyCode??We,currencySymbol:M?.amount?.currencySymbol??jt},memo:M.memo??void 0}}}else if(g.includes("mileage.distanceInMiles")){const{distanceInMiles:M}=u[w].mileage,W=c?.mileageUnitAmount??0;u[w].mileage={...u[w].mileage,amount:{amount:M!=null?M*W:0,currencyCode:r.currencyCode,currencySymbol:r.currencySymbol}}}else if(g.includes("outOfPocket.amount")&&u[w].lineId){const M=u[w].outOfPocket.amount,W=e.allCurrencies.find(Se=>Se.currencyCode===M?.currency.selectedOption)?.currencySymbol;if(M?.currencyCode!==M?.currency.selectedOption){const Se=M?.currency?.allOptions||[];u[w].outOfPocket.amount={currency:{allOptions:Se,selectedOption:M?.currency?.selectedOption},amount:u[w].outOfPocket?.amount?.amount??0,currencyCode:M?.currency.selectedOption??We,currencySymbol:W??jt}}if(M?.currency.selectedOption!==We)Xe(!0),En(u[w].lineId,We);else{const Se={};u.forEach(Gt=>{Se[Gt.lineId]={lineId:Gt.lineId,homeCurrencyConversions:Gt.homeCurrencyConversions}}),u[w].homeCurrencyConversions={amount:M.amount??0,currencyCode:M?.currency.selectedOption??We,currencySymbol:W??jt};const Ci=ti(Se,e.currencyConversionStatus);le!==Ci&&rt(Ci)}}else if(g.includes("outOfPocket.isRetainedCategorySelected"))u[w].outOfPocket.isRetainedCategorySelected===!0&&(u[w].outOfPocket.isCategoryUpdateSelected=!1,u[w].outOfPocket.account.selectedOption=u[w].outOfPocket.retainedAccount?.qboId);else if(g.includes("outOfPocket.isCategoryUpdateSelected"))if(u[w].outOfPocket.isCategoryUpdateSelected===!0)u[w].outOfPocket.account.selectedOption=u[w].outOfPocket.recommendedAccount?.qboId,u[w].outOfPocket.isRetainedCategorySelected=!1;else{const M=u[w].lineId,W=e.editRemiInitialDetails.lineDetailSection[M]?.lineDetail?.account?.qboId;u[w].outOfPocket.account.selectedOption=W,u[w].outOfPocket.isRetainedCategorySelected=!1}else g.includes("outOfPocket.account")&&(u[w].outOfPocket.recommendations.length>0&&(u[w].outOfPocket.recommendedAccount=u[w].outOfPocket.recommendations[0].account),u[w].outOfPocket.recommendedAccount?.qboId!=null&&u[w].outOfPocket.account.selectedOption===u[w].outOfPocket.recommendedAccount?.qboId?u[w].outOfPocket.isCategoryUpdateSelected=!0:u[w].outOfPocket.isCategoryUpdateSelected=!1,u[w].outOfPocket.retainedAccount?.qboId!=null&&u[w].outOfPocket.account.selectedOption===u[w].outOfPocket.retainedAccount?.qboId?u[w].outOfPocket.isRetainedCategorySelected=!0:u[w].outOfPocket.isRetainedCategorySelected=!1,u[w].outOfPocket.isCategoryFirstTimeAutofilled=!1);const vt=ii({...T,lineInfo:u},e.merchantList.merchants,r,le,e.currencyConversionStatus,e.allCurrencies,e.accountList.accounts,e.classList.classes);if(ae?.(vt),g.includes("outOfPocket.merchant")){const M=u[w].lineId,W=u[w].outOfPocket.merchant.selectedOption??"";u[w].outOfPocket.merchant.allOptions.find(Se=>Se===W)!=null?Y(W,M):G(W,M)}},bi=$.useMemo(()=>ki((g,T)=>Pn(g,T),300),[e.accountList.fetchState,e.classList.fetchState,e.merchantList.fetchState]);$.useEffect(()=>{const g=ke.watch((T,{name:u})=>{u!=null&&T!=null&&bi(u,T)});return()=>{g.unsubscribe()}},[bi,ke]),$.useEffect(()=>{const g=ee.reduceAnyFetchState(Object.values(e.currencyConversionStatus)),T=g.fetchState==="In-Progress"||g.fetchState==="Error";Xe(T)},[e.currencyConversionStatus]),$.useEffect(()=>{for(const T in e.currencyConversionStatus){const u=e.lineDetailSection[T],w=e.lineDetailSection[T];e.currencyConversionStatus[T].fetchState==="Completed"&&w!=null&&u.type!==b.mileageKey&&!nn(u?.homeCurrencyConversions,w.homeCurrencyConversions)&&U({amount:u?.homeCurrencyConversions?.amount??0,currencyCode:u?.homeCurrencyConversions?.currencyCode??We,currencySymbol:u?.homeCurrencyConversions?.currencySymbol??jt},T,f)}const g=ti(e.lineDetailSection,e.currencyConversionStatus);le!==g&&rt(g)},[e.currencyConversionStatus,e.lineDetailSection]),$.useEffect(()=>{(e.saveStatus?.fetchState==="Completed"||e.deleteStatus.fetchState==="Completed")&&(A(f),me?.())},[e.saveStatus?.fetchState,e.deleteStatus.fetchState,f,A,me]);const L=ze(),[Me,ht]=$.useState(f==null),[gt,Rn]=$.useState(1),[Ln,Et]=$.useState(!1),[An,zn]=$.useState(""),[Nt,Bn]=$.useState(null),[Mn,lt]=$.useState(!1),[Fn,fi]=$.useState(!1),[Wt,Ut]=$.useState([]),[fe,$t]=$.useState({title:"",description:"",primaryButtonText:"",secondaryButtonText:""}),En=$.useRef(ki((g,T)=>Oe(g,T),500,{trailing:!0})).current;$.useEffect(()=>{at==="In-Progress"&&(e.uploadStatus==="Completed"?(ke.reset(ei(e,r,s),{keepDefaultValues:!0}),Be(!1),ht(!1)):e.uploadStatus==="Error"&&Be(!1))},[at,e.uploadStatus,ke,e,Ye,Be,Me,r,s,v]),$.useEffect(()=>{e.uploadStatus==="In-Progress"&&Me===!1&&Be(!0)},[e.uploadStatus,Be,Me]);const _t=e.remiStage==="draft"?b.newReimbursementTitle:b.editReimbursementTitle,Nn={onOkClick:()=>{if(lt(!1),fe.primaryButtonText===b.buttons.discard)A(f),e.remiStage==="draft"?me?.():Ne?.();else if(fe.primaryButtonText===b.buttons.delete)fe.title===b.deleteBankAccountTitle?Ce?.(An):pe?.();else if(fe.primaryButtonText===b.buttons.yes&&Nt!=null){const g=Wt.filter(T=>T!==gt.toString());Ut(g),F(Nt,gt,!0)}},onCancelClick:()=>{if(lt(!1),fe.secondaryButtonText===b.buttons.no){const g=Wt.filter(T=>T!==gt.toString());Ut(g),F(Nt,gt,!1)}}},xi=()=>{B||uo(On)?($t({title:b.discardTitle,description:b.discardDescription,primaryButtonText:b.buttons.discard,secondaryButtonText:b.buttons.cancel}),lt(!0)):(A(f),me?.())},Wn=()=>{$t({title:e.remiStage==="draft"?b.deleteDraftTitle:b.deleteReportTitle,description:b.deleteAlertDescription,primaryButtonText:b.buttons.delete,secondaryButtonText:b.buttons.cancel}),lt(!0)},Un=g=>{zn(g),$t({title:b.deleteBankAccountTitle,description:b.deleteBankAccountDescription,primaryButtonText:b.buttons.delete,secondaryButtonText:b.buttons.cancel}),lt(!0)},_n=()=>{$t({title:b.overwriteTitle,description:b.overwriteDescription,primaryButtonText:b.buttons.yes,secondaryButtonText:b.buttons.no}),lt(!0)},Vn=()=>{let g=!0;const T=[];return Object.values(e.lineDetailSection).forEach((u,w)=>{u.type===b.outOfPocketKey&&Cn(u)>=75&&u.file==null&&(T.push(u.lineId),g=!1)}),Ut(T),g},wi=()=>{if(m&&e.remiStage==="pending_approval"&&e.remiStatus!=="rejected")xi();else{Qe("save");const g=ke.getValues(),T=ii(g,e.merchantList.merchants,r,le,e.currencyConversionStatus,e.allCurrencies,e.accountList.accounts,e.classList.classes);ae?.(T);const u=T.whatForSection?.reportTitle;u!=null&&u.length>0?Z(e.remiStatus==="rejected"?"pending_approval":"draft"):ke.trigger(`${At}.reportTitle`,{shouldFocus:!0})}};let Vt=!1;Object.values(e.addRemiAutoFieldsByLineId).forEach(g=>{g.length>0&&(Vt=!0)});let Si=[];if(e.remiId==null){const g=le??0;g>0&&(Si=e.approvalRules.allApprovalRules?.filter(T=>{const u=T.criteria[0].range;if(u.max!=null){if(u.min.amount<g&&u.max.amount>=g)return T}else if(u.min.amount<g)return T;return null}).map(T=>({...T,stepsWithStatus:T.steps.map(u=>({...u,actorsActivity:[],isOriginalApprovalStep:!0})),isRealTimeApprovalEnabled:!1})))}const Hn=g=>{const T=Vn();return ke.handleSubmit(()=>{T&&(Qe("submit"),v?.trackReimbursementSubmitReimbursement(e.createTime?.format(Yi.analytics.MMMDashDDDashYYYYFormat)??ee.dateNow().format(Yi.analytics.MMMDashDDDashYYYYFormat),r.currencyCode,le,f),z(),fi(!0))})(g)},Kn=()=>{const g=ke.getValues(),T=ii(g,e.merchantList.merchants,r,le,e.currencyConversionStatus,e.allCurrencies,e.accountList.accounts,e.classList.classes);ae?.(T),H()},qn=e.reimbursementInfo?.billStatus.code=="approved"&&e.reimbursementInfo?.billPaymentStatus.code?e.reimbursementInfo?.billPaymentStatus:e.reimbursementInfo?.billStatus,Gn=e.reimbursementInfo?.paymentDate!=null?ee.zeniDate(ee.getNextNthWorkingDay(e.reimbursementInfo.paymentDate.toDate(),[0,6],e.achSameDayMaxDays).toDateString()):void 0,Jn=e.reimbursementInfo?.expectedDepositDate??Gn,Yn=f!=null&&e.remiStage==="draft",$i=Lo(e.duplicateLineByLineId),Ht=e.duplicateReimbursementStatus.fetchState==="Completed"&&$i>0,{requestToOpenThread:Kt,setRequestToOpenThread:vi,setOpenThread:qt}=$.useContext(Xn),{threads:yt,isLoading:et}=eo({application:"dashboard",companyId:Ae.currentTenant?.companyId,tab:"reimbursement",entityId:f,isGlobalComment:!1},"both",!1);$.useEffect(()=>{Kt?.threadId!=null&&yt.length>0&&!et&&(qt(Kt.threadId),vi(null))},[Kt,yt,et,qt,vi]);const Zn=$.useMemo(()=>f==null?[]:yt.filter(g=>g.resolved===!1&&!g.id.includes(to)),[yt,f]).length,Qn=(g,T)=>{qt(T);const u=g.entityType.split("."),w=parseInt(u[2]);if(isNaN(w)){ue(!1);return}const vt=`${w+1}`,M=e.lineDetailSection[w+1].type;u.includes(b.mileageKey)&&M===b.outOfPocketKey?de(ee.toReimbursementTypeCode(b.mileageKey),vt,f):u.includes(b.outOfPocketKey)&&M===b.mileageKey&&de(ee.toReimbursementTypeCode(b.outOfPocketKey),vt,f),ue(!1)};return t.jsx(Rr,{ref:h,children:t.jsx(io,{sharedItems:{sharedFunctions:void 0,sharedRef:{contentWrapperRef:re.current??null}},children:t.jsxs(on,{...ke,children:[t.jsx("form",{id:Qi(Zi),onSubmit:g=>Hn(g),children:t.jsxs(ll,{windowSize:L,ref:re,children:[Mn?t.jsx(si,{titleComponent:t.jsx(rn,{children:fe.title}),descriptionComponent:t.jsx(an,{children:fe.description}),primaryButtonText:fe.primaryButtonText,secondaryButtonText:fe.secondaryButtonText,action:Nn,proceedButtonVariant:fe.title===b.deleteBankAccountTitle||fe.title===b.deleteDraftTitle||fe.title===b.deleteReportTitle||fe.title===b.discardTitle?"danger":"primary",isEditPopup:fe.title===b.deleteBankAccountTitle}):null,Fn?t.jsx(xr,{reimbursementId:f,submitFetchState:e.saveStatus?.fetchState??"Not-Started",duplicateReimbursementStatus:e.duplicateReimbursementStatus.fetchState,hasDuplicateLine:Ht,numberOfDuplicateLines:$i,setShowDuplicatePopup:fi,submitReport:Kn,fetchDuplicateReimbursement:D,clearDuplicateReimbursementDetail:z,clearRemiSaveStatus:te,analytics:v}):null,Ye?t.jsx(en,{windowSize:L}):null,Me?t.jsxs(en,{windowSize:L,"data-testid":K("skip-autofill-section"),children:[L==="small"?t.jsxs(t.Fragment,{children:[t.jsx(Vr,{children:t.jsx(ai,{partOfSkipAutoFill:!0,size:L,onClick:()=>ht(!1),"data-testid":K("close-invoice-upload"),children:t.jsx(oi,{withOverlay:!0,children:t.jsx(ni,{})})})}),t.jsx(Kr,{children:_t})]}):null,t.jsx(wn,{showAutofill:Me,analytics:v,onSkipAutofill:()=>{v?.trackReimbursementSkipAutofill(),ht(!1)},uploadInvoiceEndPoint:p,authParams:o,style:{width:X.leftSectionWidth.valuePercentage(L),boxSizing:"border-box",backgroundColor:L==="small"?He.colors.grey4:"unset",padding:L==="small"?`${i.sp5} ${i.sp3}`:`78px ${i.sp6} 15px ${i.sp8}`,margin:L==="small"?i.sp0:void 0},onInvoiceUpload:g=>F(g,gt,!0),dropFilePlaceholder:{upload:b.dropReceipt.upload,single:b.dropReceipt.single,or:b.dropReceipt.or,multiple:b.dropReceipt.multiple,receipts:b.dropReceipt.receipts},updateInvoiceUploadFetchState:Pe,showInfoText:!1,allowMultiFiles:Me,type:"reimbursement"}),L!=="small"?t.jsx(Hr,{children:t.jsx(ai,{partOfSkipAutoFill:!0,onClick:()=>ht(!1),"data-testid":K("close-invoice-upload"),children:t.jsx(oi,{withOverlay:!0,children:t.jsx(ni,{})})})}):null]}):null,t.jsxs(il,{windowSize:L,"data-testid":K("edit-reimbursement-detail-page-nav-bar-container"),children:[L!=="small"?t.jsx(Ii,{style:{width:"42%"},"data-testid":K("edit-reimbursement-detail-page-left-nav-bar"),title:"",leftSideComponent:t.jsx(nl,{"data-testid":K("zeni-logo-spend-management-reimbursement-detail-page"),onClick:ce}),enableTitleOnScroll:!1,scrollableContent:h,backgroundColor:He.colors.background,keepBackgroundOnScroll:!0,source:"EditReimbursementDetailPage"}):null,L!=="small"?t.jsx(Lr,{}):null,t.jsx(Ii,{style:{width:X.navBarWidth.valuePercentage(L)},"data-testid":K("edit-reimbursement-detail-page-right-nav-bar"),source:"EditReimbursementDetailPage",title:_t,leftSideComponent:t.jsx(t.Fragment,{}),rightSideComponent:Me!=!0?t.jsxs(ol,{children:[C&&f!=null?t.jsxs(al,{isDisabled:et,"data-testid":K("remi-comment-button"),onClick:et?()=>null:g=>{g.preventDefault(),g.stopPropagation(),pt({roomId:St,companyId:Ae.currentTenant?.companyId??"",companyName:Ae.currentTenant?.companyName??"",entityType:"reimbursement.details",entityId:f}),ue(!0),v?.trackCommentActivity("reimbursement","clicked",Ae.currentTenant?.companyName??"",Ae.controllersList.controllers.map(T=>oo(T)),void 0,void 0,"page icon")},children:[t.jsx(no,{count:et?void 0:Zn,isLoading:et,style:{left:"12px"}}),t.jsx(rl,{})]}):null,t.jsx(ai,{size:L,onClick:()=>xi(),"data-testid":K("close-nav-bar"),children:t.jsx(oi,{withOverlay:!1,children:t.jsx(ni,{})})})]}):null,enableTitleOnScroll:L!=="small",scrollThreshold:64,scrollableContent:h,backgroundColor:He.colors.grey4})]}),L==="small"?t.jsxs(t.Fragment,{children:[t.jsx(tl,{children:_t}),t.jsx(ao,{progressSectionObj:qn,createDate:e.createTime,paymentDate:Jn,scheduleDate:e.reimbursementInfo?.paymentDate,approvedDate:e.latestApprovedDate,isBillUploaded:f!=null?!0:e.uploadStatus==="Completed"}),Vt&&t.jsxs(Jr,{children:[t.jsx(Gr,{}),t.jsx(Yr,{children:b.banner})]}),e.isProcessing?t.jsx(ln,{variant:"warning",style:{margin:L==="small"?`${i.sp5} ${i.sp3}`:`${i.sp3} ${i.sp8} ${i.sp3} ${i.sp6}`},title:Ji.duplicateWarning.title,description:Ji.duplicateWarning.description}):Ht?t.jsxs(Zr,{size:L,children:[t.jsx(Mr,{}),t.jsxs(Xr,{children:[t.jsx(Qr,{children:b.thereSeems}),t.jsx(el,{children:b.pleaseFind})]})]}):null,t.jsx(vn,{isReimbursementCommentingEnabled:C,sectionId:At,reimbursementId:e.remiId,reportTitle:e.whatForSection.reportTitle})]}):null,t.jsx(Ga,{onDuplicateLineClick:oe,reimbursementId:f,remiDetails:e,uploadInvoiceEndPoint:p,authParams:o,showSkipAutoFill:Me,setShowSkipAutoFill:ht,isReimbursementCommentingEnabled:C,isAutoFieldsExist:Vt,totalAmount:le,removeFileFromLine:be,onReplaceClick:_n,onReceiptsUpload:F,currencyConversionStatus:e.currencyConversionStatus,setCurrentLineIdForUpload:Rn,setUploadedReceiptPayload:Bn,updateInvoiceUploadFetchState:Pe,clearTentativeNameForLine:Re,defaultCurrency:r,companyMileageConfigInfo:c,isUserAdmin:m,setShowBankAccountPage:Et,bankAccounts:s,onDeleteBankAccount:Un,analytics:v,fileRequiredLineIds:Wt,isSignedInUserReimbursementCreator:y,uncategorizedAccounts:S,showTotalAmountLoader:mt,duplicateLineByLineId:e.duplicateLineByLineId,hasDuplicateLine:Ht,removeDuplicateReimbursementForLine:ne,scrollContainerRef:h}),t.jsxs(sl,{showSkipAutoFill:Me,windowSize:L,children:[L!=="small"?t.jsx(Xi,{}):null,t.jsx(dl,{windowSize:L,children:t.jsxs(cl,{windowSize:L,children:[e.remiId!==void 0&&t.jsx(Di,{amount:le??0,activities:e.remiActivities,stage:e.remiStage??"draft",onAddNewRule:he,entity:"reimbursement",historicActivities:e.remiHistory.activities}),e.remiId==null&&le!=null&&le>0?t.jsx(Di,{amount:le??0,activities:Si,stage:"draft",entity:"reimbursement",historicActivities:e.remiHistory.activities}):null]})})]}),t.jsx(ul,{}),t.jsxs(qr,{showSkipAutoFill:Me,windowSize:L,children:[L!=="small"?t.jsx(Xi,{}):null,t.jsx(Ar,{windowSize:L,onClick:g=>{g.stopPropagation(),Ke===!0&&qe(!1)},children:t.jsx(sn,{formId:Qi(Zi),separatorStyle:{marginRight:i.sp4},showCancel:y,cancelBtn:{label:m&&e.remiStage==="pending_approval"&&e.remiStatus!=="rejected"?L==="small"?b.buttons.discard:b.buttons.discardChanges:L==="small"?b.buttons.save:b.buttons.saveChanges,isLoading:Ze==="save"&&e.saveStatus?.fetchState==="In-Progress",onClick:wi,style:{width:X.footerButtonWidth.value(L)},reverseSpinnerColor:!1},primaryBtn:{label:Pr(y,m,e,L),isDisabled:!y,style:{width:y?X.footerButtonWidth.value(L):"auto"},type:y?"submit":"button",onClick:y?()=>null:wi,isLoading:!y&&Ze==="save"&&e.saveStatus?.fetchState==="In-Progress"},rightSideComponent:t.jsx(zr,{children:t.jsxs(Wr,{windowSize:L,children:[Ke?t.jsx(dn,{onClickAway:()=>qe(!1),children:t.jsx(Nr,{windowSize:L,"data-testid":K("remi-other-actions-container"),children:t.jsx(Ur,{onClick:Wn,"data-testid":K("delete-report-action"),children:b.buttons.deleteReport})})}):null,t.jsx(Er,{windowSize:L,children:Yn===!0?t.jsx(Fr,{windowSize:L,"data-testid":K("more-details-button"),children:t.jsx(Br,{onClick:()=>qe(!Ke)})}):null})]})}),style:{minHeight:62}})})]}),C&&f!=null?t.jsx(Ro,{id:St,children:t.jsx(ro,{isDrawerOpen:N,allowComposer:!0,drawerTitle:Cr,threads:yt,autoExpand:!0,autoFocus:!1,filter:{application:"dashboard",companyId:_?.companyId??kr,isGlobalComment:!1,tab:"reimbursement"},isLoading:et,threadMetadata:_?{companyName:_.companyName,companyId:_.companyId,entityId:_.entityId,entityType:_.entityType,isGlobalComment:!1,application:"dashboard",tab:"reimbursement",url:window.location.href}:void 0,textOverrides:{composerPlaceholder:Ir,replyComposerPlaceholder:Dr,threadResolve:Tr,threadUnResolve:jr},onThreadClick:(g,T)=>Qn(g,T),onCloseAllThreadsDrawer:()=>ue(!1),drawerSectionStyle:{width:"400px",backgroundColor:He.colors.background}})}):null]})}),Ln?t.jsx(_r,{windowSize:L,children:t.jsx(lr,{bankAccountCreationState:k,setShowBankAccountPage:Et,plaidConnectionDetails:l,onFetchLinkTokenClick:Le,onEstablishConnectionClick:ge,onSaveHandler:R,bankAccountToCreate:O,bankNameByRouting:x,fetchBankNameByRoutingStatus:I,onUserBankDetailsUpdated:P,onFetchBankName:q,onBackClick:()=>{Je(),Et(!1)}})}):null]})})})},Pr=(e,o,r,c)=>e?r.reimbursementId!=null&&r.remiStage==="pending_approval"?b.buttons.resubmit:b.buttons.submit:o&&r.remiStage==="pending_approval"&&r.remiStatus!=="rejected"?c==="small"?b.buttons.discard:b.buttons.discardChanges:c==="small"?b.buttons.save:b.buttons.saveChanges,Rr=n.div`
619
+ `,X={rightMargin:new d(a[3],a[8]),leftMargin:new d(a[3],a[6]),bottomMargin:new d(56,56),closeMarginTop:new d(0,19),closeMarginRight:new d(a[3],a[8]),rightSectionWidth:new d(100,58),leftSectionWidth:new d(100,42),footerButtonWidth:new d(120,165),right:new d(a[3],a[0]),actionsContainerRight:new d(a[0],a[6]),otherActionsContainerBottom:new d(58,44),duplicateBannerWrapperMarginTop:new d(a[5],a[3]),duplicateBannerWrapperMarginRight:new d(a[3],a[8]),duplicateBannerWrapperMarginBottom:new d(a[5],a[3]),duplicateBannerWrapperMarginLeft:new d(a[3],a[6]),navBarWidth:new d(100,58)},{spendManagement:{reimbursement:{reimbursementDetail:b,bulkActions:Ji}},common:{currency:{currencyCode:We,currencySymbol:jt},texts:{comments:Cr},strings:{empty:kr}},collaboration:{threads:{placeholder:{addANewComment:Ir,replyAComment:Dr},tooltip:{resolveComment:Tr,unResolveComment:jr}}},dateFormat:Zi}=xe.getLocalizedStrings(),Yi="editReimbursementDetailPage",Qi=e=>`${e}_form`,Or=(e,o,r,c,p,C,m,v,f)=>{const l=e.outOfPocket,k=e.mileage,w=l.merchant,s=l.recommendations;return{lineIndex:C,lineId:e?.lineId??String(C+1),reimbursementType:e?.type??b.outOfPocketKey,file:e?.file,homeCurrencyConversions:{amount:e?.homeCurrencyConversions?.amount??0,currencyCode:e?.homeCurrencyConversions?.currencyCode??m.currencyCode,currencySymbol:e?.homeCurrencyConversions?.currencySymbol??m.currencySymbol},outOfPocket:{recommendedAccount:l.recommendedAccount,isCategoryUpdateSelected:l.isCategoryUpdateSelected??!1,isCategoryFirstTimeAutofilled:l.isCategoryFirstTimeAutofilled??!1,retainedAccount:l.retainedAccount,isRetainedCategorySelected:l.isRetainedCategorySelected??!1,recommendations:s??[],transactionDate:l?.transactionDate?.toDate()??void 0,class:{allOptions:Ve(Ge(r,[])),selectedOption:l?.lineDetail?.class?.classId??f},account:{allOptions:Ve(zt(o,s)),selectedOption:l.lineDetail?.account?.qboId??l.lineDetail?.account?.accountId},amount:{amount:l?.amount??0,currencyCode:l?.currencyCode??m.currencyCode,currencySymbol:l?.currencySymbol??m.currencySymbol,currency:{allOptions:v.map(y=>({label:`${y.currencyCode} - ${y.currency}`,value:y.currencyCode,countryCode:di(y.countryCode)})),selectedOption:l?.currencyCode??m.currencyCode??We}},memo:l?.description??void 0,merchant:{allOptions:c.map(y=>y.id).filter(y=>!!y),selectedOption:w?.id?w?.id:w?.name?w?.name:e?.lineId!=null?p[e?.lineId]:void 0}},mileage:{transactionDate:k?.transactionDate?.toDate(),class:{allOptions:Ve(Ge(r,[])),selectedOption:k?.lineDetail?.class?.classId},distanceInMiles:k?.distanceMileage?.value,amount:{amount:k?.amount??0,currencyCode:k?.currencyCode??m.currencyCode,currencySymbol:k?.currencySymbol??m.currencySymbol},memo:k?.description}}},ei=(e,o,r)=>{const c=[];return Object.values(e.lineDetailSection).forEach((p,C)=>{p?.lineId!=null&&c.push(Or(p,e.accountsHierarchyList,e.classHierarchyList,e.merchantList.merchants,e.tentativeMerchantNameByLineId,C,o,e.allCurrencies,e.loggedInUserDepartmentId))}),c.length===0&&c.push(Tn(0,"1",e.accountsHierarchyList,e.classHierarchyList,e.merchantList.merchants,o,e.allCurrencies,e.loggedInUserDepartmentId)),{[At]:{reportTitle:e.whatForSection.reportTitle},[yi]:c,[bt]:{selectedOption:e.paymentTo,allOptions:r.map(p=>p.bankAccountId)}}},ti=(e,o)=>{const r=c=>c.lineId==null||o[c.lineId]?.fetchState==="In-Progress"?0:(o[c.lineId]?.fetchState,c.type===b.mileageKey?c?.mileage?.amount??0:c?.outOfPocket?.currencyCode!==We&&c.homeCurrencyConversions?.amount!==c?.outOfPocket?.amount?c.homeCurrencyConversions?.amount??0:c?.outOfPocket?.amount??0);return Object.values(e).reduce((c,p)=>c+r(p),0)},ii=(e,o,r,c,p,C,m,v)=>{const f={};return e.lineInfo.forEach(l=>{const k=v.find(O=>O.classId===l.mileage.class.selectedOption),w=m.find(O=>O.qboId===l.outOfPocket.account.selectedOption||O.accountId===l.outOfPocket.account.selectedOption),s=v.find(O=>O.classId===l.outOfPocket.class.selectedOption),y=o.find(O=>O.id===l.outOfPocket.merchant.selectedOption),S=C.find(O=>O.currencyCode===l.outOfPocket.amount?.currency.selectedOption)?.currencySymbol;f[l.lineId]={fileId:l.file?.fileId,lineId:l.lineId,type:l.reimbursementType,homeCurrencyConversions:l.homeCurrencyConversions??{amount:0,currencyCode:"USD",currencySymbol:"$"},mileage:{description:l.mileage.memo??"",lineDetail:{class:k},transactionDate:l.mileage.transactionDate!=null?ee.zeniDate(l.mileage.transactionDate.toDateString()):void 0,amount:l.mileage.amount?.amount??0,currencyCode:l.mileage.amount?.currencyCode??S,currencySymbol:l.mileage.amount?.currencySymbol??S,distanceMileage:{unit:"miles",value:l.mileage.distanceInMiles??0}},outOfPocket:{description:l.outOfPocket.memo??"",lineDetail:{class:s,account:w},transactionDate:l.outOfPocket.transactionDate!=null?ee.zeniDate(l.outOfPocket.transactionDate.toDateString()):void 0,amount:l.outOfPocket.amount?.amount??0,currencyCode:l.outOfPocket.amount?.currency.selectedOption??S,currencySymbol:S,merchant:l.outOfPocket.merchant.selectedOption!=null?{id:y?.id??"",name:y?.name??l.outOfPocket.merchant.selectedOption}:void 0,recommendations:l.outOfPocket.recommendations,recommendedAccount:l.outOfPocket.recommendedAccount,isCategoryUpdateSelected:l.outOfPocket.isCategoryUpdateSelected,isCategoryFirstTimeAutofilled:l.outOfPocket.isCategoryFirstTimeAutofilled,isRetainedCategorySelected:l.outOfPocket.isRetainedCategorySelected,retainedAccount:l.outOfPocket.retainedAccount}}}),{whatForSection:{reportTitle:e.whatFor.reportTitle},updatesByLineId:f,totalAmount:{amount:c,...r},currencyConversionStateByLineId:p,paymentTo:e.paymentTo.selectedOption}},Ol=({remiDetails:e,authParams:o,defaultCurrency:r,companyMileageConfigInfo:c,uploadInvoiceEndPoint:p,isReimbursementCommentingEnabled:C,isUserAdmin:m,analytics:v,reimbursementId:f,plaidConnectionDetails:l,bankAccountCreationState:k,bankNameByRouting:w,bankAccounts:s,isSignedInUserReimbursementCreator:y,uncategorizedAccounts:S,bankAccountToCreate:O,fetchBankNameByRoutingStatus:I,onUserBankDetailsUpdated:P,onFetchBankName:q,onSaveBankAccount:R,fetchDuplicateReimbursement:D,clearDuplicateReimbursementDetail:z,clearRemiSaveStatus:te,removeDuplicateReimbursementForLine:ne,onDuplicateLineClick:oe,onExistingMerchantChange:Z,onNewMerchantChange:G,onReceiptsUpload:F,saveRemiDetails:Y,submitRemiDetails:H,discardReimbursementDetailsFromLocalStore:A,onReimbursementDetailsChanged:ae,updateReimbursementType:de,onHomeCurrencyConversionUpdate:U,redirectToReimbursementListScreen:me,redirectToReimbursementDetailScreen:Ne,deleteReimbursement:pe,removeFileFromLine:be,onZeniLogoClick:ce,onAmountChanged:Oe,updateInvoiceUploadFetchState:Pe,clearTentativeNameForLine:Re,onAddNewRule:he,onFetchLinkTokenClick:Le,onEstablishConnectionClick:ge,deleteBankAccount:Ce,onBackClickFromBankAccountPage:Je})=>{const h=$.useRef(null),re=$.useRef(null),at=ri(e.uploadStatus),He=ft(),Ae=wt(),[Ze,Be]=$.useState(!1),[Ke,qe]=$.useState(!1),[Ye,Qe]=$.useState("save"),[le,rt]=$.useState(ti(e.lineDetailSection,e.currencyConversionStatus)),[mt,Xe]=$.useState(!1),[_,pt]=$.useState(null),[N,ue]=$.useState(!1),St=`dashboard_${Ae.currentTenant?.companyId}`,ke=tn({mode:"all",reValidateMode:"onChange",defaultValues:$.useMemo(()=>ei(e,r,s),[e,r,s]),values:$.useMemo(()=>ei(e,r,s),[e,r,s]),resetOptions:{keepErrors:!0},shouldFocusError:!0}),{isDirty:B,dirtyFields:On}=ke.formState,Pn=async(g,T)=>{const{lineInfo:u}=T,x=Number(g.split(".")[1]);if(g.includes("reportTitle")||g.includes("memo"))return;if(g.includes("reimbursementType")){const M=u[x].mileage,W=u[x].outOfPocket;u[x]={...u[x],outOfPocket:{transactionDate:W.transactionDate??void 0,class:{allOptions:W.class.allOptions??Ve(Ge(e.classHierarchyList,[])),selectedOption:W.class.selectedOption??void 0},account:{allOptions:W.account.allOptions??Ve(zt(e.accountsHierarchyList,[])),selectedOption:W.account.selectedOption??void 0},amount:W.amount??{amount:0,currencyCode:r.currencyCode,currencySymbol:r.currencySymbol,currency:{allOptions:e.allCurrencies.map(Se=>({label:`${Se.currencyCode} - ${Se.currency}`,value:Se.currencyCode,countryCode:di(Se.countryCode)})),selectedOption:r.currencyCode??We}},memo:W.memo??void 0,merchant:W.merchant??void 0,recommendations:W.recommendations??[],recommendedAccount:W.recommendedAccount??void 0,isCategoryUpdateSelected:W.isCategoryUpdateSelected??!1,isCategoryFirstTimeAutofilled:W.isCategoryFirstTimeAutofilled??!1,retainedAccount:W.retainedAccount??void 0,isRetainedCategorySelected:W.isRetainedCategorySelected??!1},mileage:{transactionDate:M.transactionDate??void 0,class:{allOptions:M.class.allOptions??Ve(Ge(e.classHierarchyList,[])),selectedOption:M.class.selectedOption??e.loggedInUserDepartmentId},distanceInMiles:M.distanceInMiles,amount:{amount:M?.amount?.amount??0,currencyCode:M?.amount?.currencyCode??We,currencySymbol:M?.amount?.currencySymbol??jt},memo:M.memo??void 0}}}else if(g.includes("mileage.distanceInMiles")){const{distanceInMiles:M}=u[x].mileage,W=c?.mileageUnitAmount??0;u[x].mileage={...u[x].mileage,amount:{amount:M!=null?M*W:0,currencyCode:r.currencyCode,currencySymbol:r.currencySymbol}}}else if(g.includes("outOfPocket.amount")&&u[x].lineId){const M=u[x].outOfPocket.amount,W=e.allCurrencies.find(Se=>Se.currencyCode===M?.currency.selectedOption)?.currencySymbol;if(M?.currencyCode!==M?.currency.selectedOption){const Se=M?.currency?.allOptions||[];u[x].outOfPocket.amount={currency:{allOptions:Se,selectedOption:M?.currency?.selectedOption},amount:u[x].outOfPocket?.amount?.amount??0,currencyCode:M?.currency.selectedOption??We,currencySymbol:W??jt}}if(M?.currency.selectedOption!==We)Xe(!0),En(u[x].lineId,We);else{const Se={};u.forEach(Gt=>{Se[Gt.lineId]={lineId:Gt.lineId,homeCurrencyConversions:Gt.homeCurrencyConversions}}),u[x].homeCurrencyConversions={amount:M.amount??0,currencyCode:M?.currency.selectedOption??We,currencySymbol:W??jt};const Ci=ti(Se,e.currencyConversionStatus);le!==Ci&&rt(Ci)}}else if(g.includes("outOfPocket.isRetainedCategorySelected"))u[x].outOfPocket.isRetainedCategorySelected===!0&&(u[x].outOfPocket.isCategoryUpdateSelected=!1,u[x].outOfPocket.account.selectedOption=u[x].outOfPocket.retainedAccount?.qboId);else if(g.includes("outOfPocket.isCategoryUpdateSelected"))if(u[x].outOfPocket.isCategoryUpdateSelected===!0)u[x].outOfPocket.account.selectedOption=u[x].outOfPocket.recommendedAccount?.qboId,u[x].outOfPocket.isRetainedCategorySelected=!1;else{const M=u[x].lineId,W=e.editRemiInitialDetails.lineDetailSection[M]?.lineDetail?.account?.qboId;u[x].outOfPocket.account.selectedOption=W,u[x].outOfPocket.isRetainedCategorySelected=!1}else g.includes("outOfPocket.account")&&(u[x].outOfPocket.recommendations.length>0&&(u[x].outOfPocket.recommendedAccount=u[x].outOfPocket.recommendations[0].account),u[x].outOfPocket.recommendedAccount?.qboId!=null&&u[x].outOfPocket.account.selectedOption===u[x].outOfPocket.recommendedAccount?.qboId?u[x].outOfPocket.isCategoryUpdateSelected=!0:u[x].outOfPocket.isCategoryUpdateSelected=!1,u[x].outOfPocket.retainedAccount?.qboId!=null&&u[x].outOfPocket.account.selectedOption===u[x].outOfPocket.retainedAccount?.qboId?u[x].outOfPocket.isRetainedCategorySelected=!0:u[x].outOfPocket.isRetainedCategorySelected=!1,u[x].outOfPocket.isCategoryFirstTimeAutofilled=!1);const vt=ii({...T,lineInfo:u},e.merchantList.merchants,r,le,e.currencyConversionStatus,e.allCurrencies,e.accountList.accounts,e.classList.classes);if(ae?.(vt),g.includes("outOfPocket.merchant")){const M=u[x].lineId,W=u[x].outOfPocket.merchant.selectedOption??"";u[x].outOfPocket.merchant.allOptions.find(Se=>Se===W)!=null?Z(W,M):G(W,M)}},bi=$.useMemo(()=>ki((g,T)=>Pn(g,T),300),[e.accountList.fetchState,e.classList.fetchState,e.merchantList.fetchState]);$.useEffect(()=>{const g=ke.watch((T,{name:u})=>{u!=null&&T!=null&&bi(u,T)});return()=>{g.unsubscribe()}},[bi,ke]),$.useEffect(()=>{const g=ee.reduceAnyFetchState(Object.values(e.currencyConversionStatus)),T=g.fetchState==="In-Progress"||g.fetchState==="Error";Xe(T)},[e.currencyConversionStatus]),$.useEffect(()=>{for(const T in e.currencyConversionStatus){const u=e.lineDetailSection[T],x=e.lineDetailSection[T];e.currencyConversionStatus[T].fetchState==="Completed"&&x!=null&&u.type!==b.mileageKey&&!nn(u?.homeCurrencyConversions,x.homeCurrencyConversions)&&U({amount:u?.homeCurrencyConversions?.amount??0,currencyCode:u?.homeCurrencyConversions?.currencyCode??We,currencySymbol:u?.homeCurrencyConversions?.currencySymbol??jt},T,f)}const g=ti(e.lineDetailSection,e.currencyConversionStatus);le!==g&&rt(g)},[e.currencyConversionStatus,e.lineDetailSection]),$.useEffect(()=>{(e.saveStatus?.fetchState==="Completed"||e.deleteStatus.fetchState==="Completed")&&(A(f),me?.())},[e.saveStatus?.fetchState,e.deleteStatus.fetchState,f,A,me]);const L=ze(),[Me,ht]=$.useState(f==null),[gt,Rn]=$.useState(1),[Ln,Et]=$.useState(!1),[An,zn]=$.useState(""),[Nt,Bn]=$.useState(null),[Mn,lt]=$.useState(!1),[Fn,fi]=$.useState(!1),[Wt,Ut]=$.useState([]),[fe,$t]=$.useState({title:"",description:"",primaryButtonText:"",secondaryButtonText:""}),En=$.useRef(ki((g,T)=>Oe(g,T),500,{trailing:!0})).current;$.useEffect(()=>{at==="In-Progress"&&(e.uploadStatus==="Completed"?(ke.reset(ei(e,r,s),{keepDefaultValues:!0}),Be(!1),ht(!1)):e.uploadStatus==="Error"&&Be(!1))},[at,e.uploadStatus,ke,e,Ze,Be,Me,r,s,v]),$.useEffect(()=>{e.uploadStatus==="In-Progress"&&Me===!1&&Be(!0)},[e.uploadStatus,Be,Me]);const _t=e.remiStage==="draft"?b.newReimbursementTitle:b.editReimbursementTitle,Nn={onOkClick:()=>{if(lt(!1),fe.primaryButtonText===b.buttons.discard)A(f),e.remiStage==="draft"?me?.():Ne?.();else if(fe.primaryButtonText===b.buttons.delete)fe.title===b.deleteBankAccountTitle?Ce?.(An):pe?.();else if(fe.primaryButtonText===b.buttons.yes&&Nt!=null){const g=Wt.filter(T=>T!==gt.toString());Ut(g),F(Nt,gt,!0)}},onCancelClick:()=>{if(lt(!1),fe.secondaryButtonText===b.buttons.no){const g=Wt.filter(T=>T!==gt.toString());Ut(g),F(Nt,gt,!1)}}},wi=()=>{B||uo(On)?($t({title:b.discardTitle,description:b.discardDescription,primaryButtonText:b.buttons.discard,secondaryButtonText:b.buttons.cancel}),lt(!0)):(A(f),me?.())},Wn=()=>{$t({title:e.remiStage==="draft"?b.deleteDraftTitle:b.deleteReportTitle,description:b.deleteAlertDescription,primaryButtonText:b.buttons.delete,secondaryButtonText:b.buttons.cancel}),lt(!0)},Un=g=>{zn(g),$t({title:b.deleteBankAccountTitle,description:b.deleteBankAccountDescription,primaryButtonText:b.buttons.delete,secondaryButtonText:b.buttons.cancel}),lt(!0)},_n=()=>{$t({title:b.overwriteTitle,description:b.overwriteDescription,primaryButtonText:b.buttons.yes,secondaryButtonText:b.buttons.no}),lt(!0)},Vn=()=>{let g=!0;const T=[];return Object.values(e.lineDetailSection).forEach((u,x)=>{u.type===b.outOfPocketKey&&Cn(u)>=75&&u.file==null&&(T.push(u.lineId),g=!1)}),Ut(T),g},xi=()=>{if(m&&e.remiStage==="pending_approval"&&e.remiStatus!=="rejected")wi();else{Qe("save");const g=ke.getValues(),T=ii(g,e.merchantList.merchants,r,le,e.currencyConversionStatus,e.allCurrencies,e.accountList.accounts,e.classList.classes);ae?.(T);const u=T.whatForSection?.reportTitle;u!=null&&u.length>0?Y(e.remiStatus==="rejected"?"pending_approval":"draft"):ke.trigger(`${At}.reportTitle`,{shouldFocus:!0})}};let Vt=!1;Object.values(e.addRemiAutoFieldsByLineId).forEach(g=>{g.length>0&&(Vt=!0)});let Si=[];if(e.remiId==null){const g=le??0;g>0&&(Si=e.approvalRules.allApprovalRules?.filter(T=>{const u=T.criteria[0].range;if(u.max!=null){if(u.min.amount<g&&u.max.amount>=g)return T}else if(u.min.amount<g)return T;return null}).map(T=>({...T,stepsWithStatus:T.steps.map(u=>({...u,actorsActivity:[],isOriginalApprovalStep:!0})),isRealTimeApprovalEnabled:!1})))}const Hn=g=>{const T=Vn();return ke.handleSubmit(()=>{T&&(Qe("submit"),v?.trackReimbursementSubmitReimbursement(e.createTime?.format(Zi.analytics.MMMDashDDDashYYYYFormat)??ee.dateNow().format(Zi.analytics.MMMDashDDDashYYYYFormat),r.currencyCode,le,f),z(),fi(!0))})(g)},Kn=()=>{const g=ke.getValues(),T=ii(g,e.merchantList.merchants,r,le,e.currencyConversionStatus,e.allCurrencies,e.accountList.accounts,e.classList.classes);ae?.(T),H()},qn=e.reimbursementInfo?.billStatus.code=="approved"&&e.reimbursementInfo?.billPaymentStatus.code?e.reimbursementInfo?.billPaymentStatus:e.reimbursementInfo?.billStatus,Gn=e.reimbursementInfo?.paymentDate!=null?ee.zeniDate(ee.getNextNthWorkingDay(e.reimbursementInfo.paymentDate.toDate(),[0,6],e.achSameDayMaxDays).toDateString()):void 0,Jn=e.reimbursementInfo?.expectedDepositDate??Gn,Zn=f!=null&&e.remiStage==="draft",$i=Lo(e.duplicateLineByLineId),Ht=e.duplicateReimbursementStatus.fetchState==="Completed"&&$i>0,{requestToOpenThread:Kt,setRequestToOpenThread:vi,setOpenThread:qt}=$.useContext(Xn),{threads:yt,isLoading:et}=eo({application:"dashboard",companyId:Ae.currentTenant?.companyId,tab:"reimbursement",entityId:f,isGlobalComment:!1},"both",!1);$.useEffect(()=>{Kt?.threadId!=null&&yt.length>0&&!et&&(qt(Kt.threadId),vi(null))},[Kt,yt,et,qt,vi]);const Yn=$.useMemo(()=>f==null?[]:yt.filter(g=>g.resolved===!1&&!g.id.includes(to)),[yt,f]).length,Qn=(g,T)=>{qt(T);const u=g.entityType.split("."),x=parseInt(u[2]);if(isNaN(x)){ue(!1);return}const vt=`${x+1}`,M=e.lineDetailSection[x+1].type;u.includes(b.mileageKey)&&M===b.outOfPocketKey?de(ee.toReimbursementTypeCode(b.mileageKey),vt,f):u.includes(b.outOfPocketKey)&&M===b.mileageKey&&de(ee.toReimbursementTypeCode(b.outOfPocketKey),vt,f),ue(!1)};return t.jsx(Rr,{ref:h,children:t.jsx(io,{sharedItems:{sharedFunctions:void 0,sharedRef:{contentWrapperRef:re.current??null}},children:t.jsxs(on,{...ke,children:[t.jsx("form",{id:Qi(Yi),onSubmit:g=>Hn(g),children:t.jsxs(ll,{windowSize:L,ref:re,children:[Mn?t.jsx(si,{titleComponent:t.jsx(rn,{children:fe.title}),descriptionComponent:t.jsx(an,{children:fe.description}),primaryButtonText:fe.primaryButtonText,secondaryButtonText:fe.secondaryButtonText,action:Nn,proceedButtonVariant:fe.title===b.deleteBankAccountTitle||fe.title===b.deleteDraftTitle||fe.title===b.deleteReportTitle||fe.title===b.discardTitle?"danger":"primary",isEditPopup:fe.title===b.deleteBankAccountTitle}):null,Fn?t.jsx(wr,{reimbursementId:f,submitFetchState:e.saveStatus?.fetchState??"Not-Started",duplicateReimbursementStatus:e.duplicateReimbursementStatus.fetchState,hasDuplicateLine:Ht,numberOfDuplicateLines:$i,setShowDuplicatePopup:fi,submitReport:Kn,fetchDuplicateReimbursement:D,clearDuplicateReimbursementDetail:z,clearRemiSaveStatus:te,analytics:v}):null,Ze?t.jsx(en,{windowSize:L}):null,Me?t.jsxs(en,{windowSize:L,"data-testid":K("skip-autofill-section"),children:[L==="small"?t.jsxs(t.Fragment,{children:[t.jsx(Vr,{children:t.jsx(ai,{partOfSkipAutoFill:!0,size:L,onClick:()=>ht(!1),"data-testid":K("close-invoice-upload"),children:t.jsx(oi,{withOverlay:!0,children:t.jsx(ni,{})})})}),t.jsx(Kr,{children:_t})]}):null,t.jsx(xn,{showAutofill:Me,analytics:v,onSkipAutofill:()=>{v?.trackReimbursementSkipAutofill(),ht(!1)},uploadInvoiceEndPoint:p,authParams:o,style:{width:X.leftSectionWidth.valuePercentage(L),boxSizing:"border-box",backgroundColor:L==="small"?He.colors.grey4:"unset",padding:L==="small"?`${i.sp5} ${i.sp3}`:`78px ${i.sp6} 15px ${i.sp8}`,margin:L==="small"?i.sp0:void 0},onInvoiceUpload:g=>F(g,gt,!0),dropFilePlaceholder:{upload:b.dropReceipt.upload,single:b.dropReceipt.single,or:b.dropReceipt.or,multiple:b.dropReceipt.multiple,receipts:b.dropReceipt.receipts},updateInvoiceUploadFetchState:Pe,showInfoText:!1,allowMultiFiles:Me,type:"reimbursement"}),L!=="small"?t.jsx(Hr,{children:t.jsx(ai,{partOfSkipAutoFill:!0,onClick:()=>ht(!1),"data-testid":K("close-invoice-upload"),children:t.jsx(oi,{withOverlay:!0,children:t.jsx(ni,{})})})}):null]}):null,t.jsxs(il,{windowSize:L,"data-testid":K("edit-reimbursement-detail-page-nav-bar-container"),children:[L!=="small"?t.jsx(Ii,{style:{width:"42%"},"data-testid":K("edit-reimbursement-detail-page-left-nav-bar"),title:"",leftSideComponent:t.jsx(nl,{"data-testid":K("zeni-logo-spend-management-reimbursement-detail-page"),onClick:ce}),enableTitleOnScroll:!1,scrollableContent:h,backgroundColor:He.colors.background,keepBackgroundOnScroll:!0,source:"EditReimbursementDetailPage"}):null,L!=="small"?t.jsx(Lr,{}):null,t.jsx(Ii,{style:{width:X.navBarWidth.valuePercentage(L)},"data-testid":K("edit-reimbursement-detail-page-right-nav-bar"),source:"EditReimbursementDetailPage",title:_t,leftSideComponent:t.jsx(t.Fragment,{}),rightSideComponent:Me!=!0?t.jsxs(ol,{children:[C&&f!=null?t.jsxs(al,{isDisabled:et,"data-testid":K("remi-comment-button"),onClick:et?()=>null:g=>{g.preventDefault(),g.stopPropagation(),pt({roomId:St,companyId:Ae.currentTenant?.companyId??"",companyName:Ae.currentTenant?.companyName??"",entityType:"reimbursement.details",entityId:f}),ue(!0),v?.trackCommentActivity("reimbursement","clicked",Ae.currentTenant?.companyName??"",Ae.controllersList.controllers.map(T=>oo(T)),void 0,void 0,"page icon")},children:[t.jsx(no,{count:et?void 0:Yn,isLoading:et,style:{left:"12px"}}),t.jsx(rl,{})]}):null,t.jsx(ai,{size:L,onClick:()=>wi(),"data-testid":K("close-nav-bar"),children:t.jsx(oi,{withOverlay:!1,children:t.jsx(ni,{})})})]}):null,enableTitleOnScroll:L!=="small",scrollThreshold:64,scrollableContent:h,backgroundColor:He.colors.grey4})]}),L==="small"?t.jsxs(t.Fragment,{children:[t.jsx(tl,{children:_t}),t.jsx(ao,{progressSectionObj:qn,createDate:e.createTime,paymentDate:Jn,scheduleDate:e.reimbursementInfo?.paymentDate,approvedDate:e.latestApprovedDate,isBillUploaded:f!=null?!0:e.uploadStatus==="Completed"}),Vt&&t.jsxs(Jr,{children:[t.jsx(Gr,{}),t.jsx(Zr,{children:b.banner})]}),e.isProcessing?t.jsx(ln,{variant:"warning",style:{margin:L==="small"?`${i.sp5} ${i.sp3}`:`${i.sp3} ${i.sp8} ${i.sp3} ${i.sp6}`},title:Ji.duplicateWarning.title,description:Ji.duplicateWarning.description}):Ht?t.jsxs(Yr,{size:L,children:[t.jsx(Mr,{}),t.jsxs(Xr,{children:[t.jsx(Qr,{children:b.thereSeems}),t.jsx(el,{children:b.pleaseFind})]})]}):null,t.jsx(vn,{isReimbursementCommentingEnabled:C,sectionId:At,reimbursementId:e.remiId,reportTitle:e.whatForSection.reportTitle})]}):null,t.jsx(Ga,{onDuplicateLineClick:oe,reimbursementId:f,remiDetails:e,uploadInvoiceEndPoint:p,authParams:o,showSkipAutoFill:Me,setShowSkipAutoFill:ht,isReimbursementCommentingEnabled:C,isAutoFieldsExist:Vt,totalAmount:le,removeFileFromLine:be,onReplaceClick:_n,onReceiptsUpload:F,currencyConversionStatus:e.currencyConversionStatus,setCurrentLineIdForUpload:Rn,setUploadedReceiptPayload:Bn,updateInvoiceUploadFetchState:Pe,clearTentativeNameForLine:Re,defaultCurrency:r,companyMileageConfigInfo:c,isUserAdmin:m,setShowBankAccountPage:Et,bankAccounts:s,onDeleteBankAccount:Un,analytics:v,fileRequiredLineIds:Wt,isSignedInUserReimbursementCreator:y,uncategorizedAccounts:S,showTotalAmountLoader:mt,duplicateLineByLineId:e.duplicateLineByLineId,hasDuplicateLine:Ht,removeDuplicateReimbursementForLine:ne,scrollContainerRef:h}),t.jsxs(sl,{showSkipAutoFill:Me,windowSize:L,children:[L!=="small"?t.jsx(Xi,{}):null,t.jsx(dl,{windowSize:L,children:t.jsxs(cl,{windowSize:L,children:[e.remiId!==void 0&&t.jsx(Di,{amount:le??0,activities:e.remiActivities,stage:e.remiStage??"draft",onAddNewRule:he,entity:"reimbursement",historicActivities:e.remiHistory.activities}),e.remiId==null&&le!=null&&le>0?t.jsx(Di,{amount:le??0,activities:Si,stage:"draft",entity:"reimbursement",historicActivities:e.remiHistory.activities}):null]})})]}),t.jsx(ul,{}),t.jsxs(qr,{showSkipAutoFill:Me,windowSize:L,children:[L!=="small"?t.jsx(Xi,{}):null,t.jsx(Ar,{windowSize:L,onClick:g=>{g.stopPropagation(),Ke===!0&&qe(!1)},children:t.jsx(sn,{formId:Qi(Yi),separatorStyle:{marginRight:i.sp4},showCancel:y,cancelBtn:{label:m&&e.remiStage==="pending_approval"&&e.remiStatus!=="rejected"?L==="small"?b.buttons.discard:b.buttons.discardChanges:L==="small"?b.buttons.save:b.buttons.saveChanges,isLoading:Ye==="save"&&e.saveStatus?.fetchState==="In-Progress",onClick:xi,style:{width:X.footerButtonWidth.value(L)},reverseSpinnerColor:!1},primaryBtn:{label:Pr(y,m,e,L),isDisabled:!y,style:{width:y?X.footerButtonWidth.value(L):"auto"},type:y?"submit":"button",onClick:y?()=>null:xi,isLoading:!y&&Ye==="save"&&e.saveStatus?.fetchState==="In-Progress"},rightSideComponent:t.jsx(zr,{children:t.jsxs(Wr,{windowSize:L,children:[Ke?t.jsx(dn,{onClickAway:()=>qe(!1),children:t.jsx(Nr,{windowSize:L,"data-testid":K("remi-other-actions-container"),children:t.jsx(Ur,{onClick:Wn,"data-testid":K("delete-report-action"),children:b.buttons.deleteReport})})}):null,t.jsx(Er,{windowSize:L,children:Zn===!0?t.jsx(Fr,{windowSize:L,"data-testid":K("more-details-button"),children:t.jsx(Br,{onClick:()=>qe(!Ke)})}):null})]})}),style:{minHeight:62}})})]}),C&&f!=null?t.jsx(Ro,{id:St,children:t.jsx(ro,{isDrawerOpen:N,allowComposer:!0,drawerTitle:Cr,threads:yt,autoExpand:!0,autoFocus:!1,filter:{application:"dashboard",companyId:_?.companyId??kr,isGlobalComment:!1,tab:"reimbursement"},isLoading:et,threadMetadata:_?{companyName:_.companyName,companyId:_.companyId,entityId:_.entityId,entityType:_.entityType,isGlobalComment:!1,application:"dashboard",tab:"reimbursement",url:window.location.href}:void 0,textOverrides:{composerPlaceholder:Ir,replyComposerPlaceholder:Dr,threadResolve:Tr,threadUnResolve:jr},onThreadClick:(g,T)=>Qn(g,T),onCloseAllThreadsDrawer:()=>ue(!1),drawerSectionStyle:{width:"400px",backgroundColor:He.colors.background}})}):null]})}),Ln?t.jsx(_r,{windowSize:L,children:t.jsx(lr,{bankAccountCreationState:k,setShowBankAccountPage:Et,plaidConnectionDetails:l,onFetchLinkTokenClick:Le,onEstablishConnectionClick:ge,onSaveHandler:R,bankAccountToCreate:O,bankNameByRouting:w,fetchBankNameByRoutingStatus:I,onUserBankDetailsUpdated:P,onFetchBankName:q,onBackClick:()=>{Je(),Et(!1)}})}):null]})})})},Pr=(e,o,r,c)=>e?r.reimbursementId!=null&&r.remiStage==="pending_approval"?b.buttons.resubmit:b.buttons.submit:o&&r.remiStage==="pending_approval"&&r.remiStatus!=="rejected"?c==="small"?b.buttons.discard:b.buttons.discardChanges:c==="small"?b.buttons.save:b.buttons.saveChanges,Rr=n.div`
620
620
  position: relative;
621
621
  height: 100vh;
622
622
  overflow-y: scroll;
@@ -736,9 +736,9 @@ import{aP as ri,d as ft,ax as xt,aa as tn,az as ki,l as ee,F as we,aC as nn,q as
736
736
  border-radius: ${i.sp2};
737
737
  align-items: center;
738
738
  margin: ${i.sp3};
739
- `,Yr=n.span`
739
+ `,Zr=n.span`
740
740
  color: ${e=>e.theme.colors.hero};
741
- `,Zr=n.div`
741
+ `,Yr=n.div`
742
742
  display: flex;
743
743
  gap: ${i.sp2};
744
744
  padding: ${i.sp3};
@@ -1,4 +1,4 @@
1
- import{d as y,F as T,aU as C,j as o,ay as v,o as t,G as m}from"./index-CUpJHznP.js";import{n as a}from"./vendor-Bs1fkIUX.js";import{R as k}from"./TrendWithTransactions-DoCnDpHm-CdDHaHZ9.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"./TrendChart-D5CYCZnh-DAyWGjcL.js";import"./chartTypes-D3stzk-w-BOvyI3x_.js";import"./toCOABalancesWithID-iOGWxWc5-CwkpaTeT.js";import"./toChartData-BEJwj1pL-BUKCXEQF.js";import"./NoDataChart-BnAshBnb-UHLHtstu.js";import"./InsightsSection-B0Rg5beY-u8CdyXOx.js";import"./NavigationDots-CyCjbpW--DGfBQuMJ.js";import"./TransactionList-JHbSuP08-BE5oUWHj.js";import"./BoxItem-BFUJgt2x-BC0-eR6w.js";import"./commonDimensions-DP_SFwFq-B4nonWMr.js";const $=a.div`
1
+ import{d as y,F as T,aU as C,j as o,ay as v,o as t,D as m}from"./index-CN7UAWAg.js";import{n as a}from"./vendor-Bs1fkIUX.js";import{R as k}from"./TrendWithTransactions-COtEkfX9-BcCvtDz-.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"./TrendChart-BV_FYo44-Dbzn5dy8.js";import"./chartTypes-D3rvsvls-DmtOpgie.js";import"./toCOABalancesWithID-CHHSLp5k-D9n1b9Hs.js";import"./toChartData-CBhPep_F-DbHa5eNf.js";import"./NoDataChart-CetZJAul-Dliv4FgS.js";import"./InsightsSection-4aveyVKo-DnKJf3sJ.js";import"./NavigationDots-yYEq4mai-Bct7I6H1.js";import"./TransactionList-CixEJAgS-CGekhIG9.js";import"./BoxItem-CoguTodA-DItO3xcr.js";import"./commonDimensions-DTY9_AOp-DlMPlh2t.js";const $=a.div`
2
2
  display: flex;
3
3
  margin: ${t.sp0} ${t.sp0} ${t.sp0} ${t.sp0};
4
4
  flex-direction: column;
@@ -13,6 +13,6 @@ import{d as y,F as T,aU as C,j as o,ay as v,o as t,G as m}from"./index-CUpJHznP.
13
13
  position: -webkit-sticky;
14
14
  position: sticky;
15
15
  top: ${t.sp0};
16
- `,E=a.div`
16
+ `,D=a.div`
17
17
  flex: 1 1 auto;
18
- `;function B({firstMonthOfFY:i,selectedEntity:e,trendWithTransactionsReport:n,autoCompleteData:d,autoCompleteActions:l,analytics:s,onTransactionItemClick:c,onTrendSelectedPeriodChange:h}){const u=y(),{dateFormat:{analytics:f}}=T.getLocalizedStrings(),g=new C(u.colors.graphColor12),x=(p,r)=>{p==="Chart"&&r!=null&&s?.trackSpendIncomeTrend(e.type==="vendor"?m.Event.spendTrend:m.Event.incomeTrend,"Search",e.type,e.name,r?.addTimePeriod.startDate.format(f.MMMYYFormat)),p==="TransactionListLoadMore"&&s?.trackTransactionList(void 0,void 0,"Search",void 0,void 0,!0),h?.(r)};return o.jsxs($,{children:[o.jsx(j,{children:o.jsx(v,{viewType:"entity_search",searchAutoComplete:{autoCompleteData:d,autoCompleteActions:l},source:"EntityDetailPage"})}),e!=null&&n!=null&&o.jsx(E,{children:o.jsx(k,{firstMonthOfFY:i,trendWithTransactionsReport:n,isDetailPage:!1,graphColor:g,page:"EntityDetailPage",onTransactionItemClick:c,onTimePeriodChange:x})})]})}export{B as default};
18
+ `;function G({firstMonthOfFY:i,selectedEntity:e,trendWithTransactionsReport:n,autoCompleteData:d,autoCompleteActions:l,analytics:s,onTransactionItemClick:c,onTrendSelectedPeriodChange:h}){const u=y(),{dateFormat:{analytics:f}}=T.getLocalizedStrings(),g=new C(u.colors.graphColor12),x=(p,r)=>{p==="Chart"&&r!=null&&s?.trackSpendIncomeTrend(e.type==="vendor"?m.Event.spendTrend:m.Event.incomeTrend,"Search",e.type,e.name,r?.addTimePeriod.startDate.format(f.MMMYYFormat)),p==="TransactionListLoadMore"&&s?.trackTransactionList(void 0,void 0,"Search",void 0,void 0,!0),h?.(r)};return o.jsxs($,{children:[o.jsx(j,{children:o.jsx(v,{viewType:"entity_search",searchAutoComplete:{autoCompleteData:d,autoCompleteActions:l},source:"EntityDetailPage"})}),e!=null&&n!=null&&o.jsx(D,{children:o.jsx(k,{firstMonthOfFY:i,trendWithTransactionsReport:n,isDetailPage:!1,graphColor:g,page:"EntityDetailPage",onTransactionItemClick:c,onTimePeriodChange:x})})]})}export{G as default};