@gusto/embedded-react-sdk 0.46.0 → 0.46.3

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 (284) hide show
  1. package/CHANGELOG.md +117 -0
  2. package/dist/components/Common/DataView/DataCards/DataCards.d.ts +2 -1
  3. package/dist/components/Common/DataView/DataCards/DataCards.js +14 -13
  4. package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
  5. package/dist/components/Common/DataView/DataTable/DataTable.d.ts +2 -1
  6. package/dist/components/Common/DataView/DataTable/DataTable.js +85 -80
  7. package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
  8. package/dist/components/Common/DataView/DataTable/DataTable.module.scss.js +8 -0
  9. package/dist/components/Common/DataView/DataTable/DataTable.module.scss.js.map +1 -0
  10. package/dist/components/Common/DataView/DataView.d.ts +1 -0
  11. package/dist/components/Common/DataView/DataView.js.map +1 -1
  12. package/dist/components/Common/DataView/useDataView.d.ts +10 -1
  13. package/dist/components/Common/DataView/useDataView.js +20 -17
  14. package/dist/components/Common/DataView/useDataView.js.map +1 -1
  15. package/dist/components/Common/DocumentViewer/DocumentViewer.js +10 -10
  16. package/dist/components/Common/DocumentViewer/DocumentViewer.js.map +1 -1
  17. package/dist/components/Common/DocumentViewer/DocumentViewer.module.scss.js +9 -9
  18. package/dist/components/Common/PaginationControl/PaginationControl.js +11 -10
  19. package/dist/components/Common/PaginationControl/PaginationControl.js.map +1 -1
  20. package/dist/components/Common/PaginationControl/PaginationControlTypes.d.ts +1 -1
  21. package/dist/components/Common/UI/DescriptionList/DescriptionList.js +11 -10
  22. package/dist/components/Common/UI/DescriptionList/DescriptionList.js.map +1 -1
  23. package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js +4 -4
  24. package/dist/components/Common/UI/Input/InputTypes.d.ts +1 -1
  25. package/dist/components/Common/UI/Input/InputTypes.js.map +1 -1
  26. package/dist/components/Common/UI/NumberInput/NumberInput.js +51 -48
  27. package/dist/components/Common/UI/NumberInput/NumberInput.js.map +1 -1
  28. package/dist/components/Common/VisuallyHidden/VisuallyHidden.d.ts +1 -1
  29. package/dist/components/Common/VisuallyHidden/VisuallyHidden.js.map +1 -1
  30. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
  31. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  32. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
  33. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  34. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
  35. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  36. package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
  37. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  38. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  39. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  40. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.js +4 -4
  41. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +5 -6
  42. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  43. package/dist/components/Company/Industry/Context.js +6 -7
  44. package/dist/components/Company/Industry/Context.js.map +1 -1
  45. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
  46. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  47. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
  48. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  49. package/dist/components/Company/OnboardingOverview/context.js +3 -4
  50. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  51. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js +5 -5
  52. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
  53. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  54. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
  55. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  56. package/dist/components/Contractor/Address/useAddress.js +5 -6
  57. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  58. package/dist/components/Contractor/Profile/useContractorProfile.js +33 -34
  59. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  60. package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.d.ts +9 -0
  61. package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.js +76 -0
  62. package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.js.map +1 -0
  63. package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.module.scss.js +8 -0
  64. package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.module.scss.js.map +1 -0
  65. package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.js +60 -202
  66. package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.js.map +1 -1
  67. package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.d.ts +25 -0
  68. package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.js +79 -0
  69. package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.js.map +1 -0
  70. package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.module.scss.js +8 -0
  71. package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.module.scss.js.map +1 -0
  72. package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.d.ts +18 -0
  73. package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js +171 -0
  74. package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js.map +1 -0
  75. package/dist/components/Employee/Compensation/management/index.d.ts +3 -0
  76. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.d.ts +6 -1
  77. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js +67 -209
  78. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js.map +1 -1
  79. package/dist/components/Employee/Compensation/onboarding/JobsList/JobsListPresentation.js +36 -36
  80. package/dist/components/Employee/Compensation/onboarding/JobsList/JobsListPresentation.js.map +1 -1
  81. package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.d.ts +18 -0
  82. package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.js +169 -0
  83. package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.js.map +1 -0
  84. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.d.ts +16 -0
  85. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js +36 -30
  86. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js.map +1 -1
  87. package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.d.ts +1 -1
  88. package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js +4 -4
  89. package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js.map +1 -1
  90. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js +213 -191
  91. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -1
  92. package/dist/components/Employee/Compensation/shared/useJobForm/fields.js +6 -6
  93. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.d.ts +6 -5
  94. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js +162 -131
  95. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js.map +1 -1
  96. package/dist/components/Employee/Dashboard/BasicDetailsView.js +74 -88
  97. package/dist/components/Employee/Dashboard/BasicDetailsView.js.map +1 -1
  98. package/dist/components/Employee/Dashboard/Dashboard.js +86 -72
  99. package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
  100. package/dist/components/Employee/Dashboard/DashboardComponents.d.ts +3 -3
  101. package/dist/components/Employee/Dashboard/DashboardComponents.js +138 -101
  102. package/dist/components/Employee/Dashboard/DashboardComponents.js.map +1 -1
  103. package/dist/components/Employee/Dashboard/DocumentsView.js +17 -10
  104. package/dist/components/Employee/Dashboard/DocumentsView.js.map +1 -1
  105. package/dist/components/Employee/Dashboard/JobAndPayView.js +359 -313
  106. package/dist/components/Employee/Dashboard/JobAndPayView.js.map +1 -1
  107. package/dist/components/Employee/Dashboard/JobAndPayView.module.scss.js +5 -3
  108. package/dist/components/Employee/Dashboard/JobAndPayView.module.scss.js.map +1 -1
  109. package/dist/components/Employee/Dashboard/TaxesView.js +114 -101
  110. package/dist/components/Employee/Dashboard/TaxesView.js.map +1 -1
  111. package/dist/components/Employee/Dashboard/dashboardStateMachine.js +147 -148
  112. package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -1
  113. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.d.ts +6 -0
  114. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js +37 -36
  115. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js.map +1 -1
  116. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.d.ts +2 -2
  117. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js +34 -35
  118. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js.map +1 -1
  119. package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.js +57 -57
  120. package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.js.map +1 -1
  121. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.d.ts +14 -5
  122. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js +55 -36
  123. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js.map +1 -1
  124. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js +8 -8
  125. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js +18 -18
  126. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js.map +1 -1
  127. package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js +4 -4
  128. package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.d.ts +3 -3
  129. package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.js.map +1 -1
  130. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  131. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  132. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/fields.js +1 -1
  133. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeList.js +37 -40
  134. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeList.js.map +1 -1
  135. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.d.ts +1 -2
  136. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.js +64 -71
  137. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.js.map +1 -1
  138. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.d.ts +2 -0
  139. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.js +25 -0
  140. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.js.map +1 -0
  141. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.d.ts +13 -0
  142. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.js +37 -0
  143. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.js.map +1 -0
  144. package/dist/components/Employee/EmployeeListFlow/employeeListStateMachine.d.ts +6 -0
  145. package/dist/components/Employee/EmployeeListFlow/employeeListStateMachine.js +69 -0
  146. package/dist/components/Employee/EmployeeListFlow/employeeListStateMachine.js.map +1 -0
  147. package/dist/components/Employee/EmployeeListFlow/index.d.ts +3 -0
  148. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.js +4 -4
  149. package/dist/components/Employee/HomeAddress/management/HomeAddress.js +15 -12
  150. package/dist/components/Employee/HomeAddress/management/HomeAddress.js.map +1 -1
  151. package/dist/components/Employee/HomeAddress/management/HomeAddressView.d.ts +2 -1
  152. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js +170 -157
  153. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js.map +1 -1
  154. package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js +56 -55
  155. package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js.map +1 -1
  156. package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js +20 -20
  157. package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js.map +1 -1
  158. package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js +1 -1
  159. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.d.ts +1 -1
  160. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js +4 -4
  161. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js.map +1 -1
  162. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.js +8 -8
  163. package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js +5 -5
  164. package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.d.ts +0 -1
  165. package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.js +11 -12
  166. package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.js.map +1 -1
  167. package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.test.d.ts +1 -0
  168. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.d.ts +6 -1
  169. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js +95 -94
  170. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js.map +1 -1
  171. package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.js +4 -4
  172. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.d.ts +6 -1
  173. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js +87 -86
  174. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js.map +1 -1
  175. package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js +18 -18
  176. package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js.map +1 -1
  177. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js +8 -8
  178. package/dist/components/Employee/Taxes/useTaxes.js +3 -4
  179. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  180. package/dist/components/Employee/WorkAddress/management/WorkAddress.js +14 -11
  181. package/dist/components/Employee/WorkAddress/management/WorkAddress.js.map +1 -1
  182. package/dist/components/Employee/WorkAddress/management/WorkAddressView.d.ts +2 -1
  183. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js +96 -89
  184. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js.map +1 -1
  185. package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js +61 -60
  186. package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js.map +1 -1
  187. package/dist/components/Employee/exports/employeeManagement.d.ts +2 -0
  188. package/dist/components/Employee/exports/employeeManagement.js +18 -16
  189. package/dist/components/Employee/exports/employeeManagement.js.map +1 -1
  190. package/dist/components/Employee/index.d.ts +2 -0
  191. package/dist/components/Employee/index.js +32 -30
  192. package/dist/components/Employee/index.js.map +1 -1
  193. package/dist/components/Flow/FlowHeader.js +34 -31
  194. package/dist/components/Flow/FlowHeader.js.map +1 -1
  195. package/dist/components/Flow/useFlow.d.ts +12 -0
  196. package/dist/components/Flow/useFlow.js.map +1 -1
  197. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +2 -3
  198. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
  199. package/dist/components/Payroll/usePreparedPayrollData.js +2 -3
  200. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  201. package/dist/components/TimeOff/PolicyList/PolicyList.js +92 -69
  202. package/dist/components/TimeOff/PolicyList/PolicyList.js.map +1 -1
  203. package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js +23 -23
  204. package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js.map +1 -1
  205. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.d.ts +1 -1
  206. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
  207. package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js +73 -56
  208. package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -1
  209. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +58 -58
  210. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -1
  211. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.d.ts +1 -1
  212. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +91 -87
  213. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -1
  214. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormTypes.d.ts +2 -0
  215. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js +91 -125
  216. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js.map +1 -1
  217. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.d.ts +1 -1
  218. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js +60 -91
  219. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js.map +1 -1
  220. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.module.scss.js +4 -4
  221. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentationTypes.d.ts +0 -16
  222. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js +139 -225
  223. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js.map +1 -1
  224. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.d.ts +7 -3
  225. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js +78 -54
  226. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js.map +1 -1
  227. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.test.d.ts +1 -0
  228. package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js +12 -11
  229. package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js.map +1 -1
  230. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js +177 -147
  231. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js.map +1 -1
  232. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js +34 -34
  233. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js.map +1 -1
  234. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.d.ts +1 -1
  235. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js +38 -36
  236. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js.map +1 -1
  237. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTableTypes.d.ts +2 -0
  238. package/dist/helpers/breadcrumbHelpers.d.ts +1 -1
  239. package/dist/helpers/breadcrumbHelpers.js.map +1 -1
  240. package/dist/helpers/federalEin.d.ts +1 -0
  241. package/dist/helpers/federalEin.js.map +1 -1
  242. package/dist/helpers/mask.d.ts +8 -4
  243. package/dist/helpers/mask.js.map +1 -1
  244. package/dist/helpers/rem.d.ts +2 -1
  245. package/dist/helpers/rem.js.map +1 -1
  246. package/dist/hooks/useAsyncError.d.ts +1 -0
  247. package/dist/hooks/useAsyncError.js.map +1 -1
  248. package/dist/hooks/useForkRef/useForkRef.d.ts +1 -0
  249. package/dist/hooks/useForkRef/useForkRef.js.map +1 -1
  250. package/dist/i18n/I18n.d.ts +9 -1
  251. package/dist/i18n/I18n.js.map +1 -1
  252. package/dist/i18n/en/Company.TimeOff.EmployeeTable.json.js +14 -14
  253. package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js +16 -22
  254. package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js.map +1 -1
  255. package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js +17 -15
  256. package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js.map +1 -1
  257. package/dist/i18n/en/Company.TimeOff.TimeOffPolicyDetails.json.js +9 -9
  258. package/dist/i18n/en/Employee.Compensation.json.js +66 -58
  259. package/dist/i18n/en/Employee.Compensation.json.js.map +1 -1
  260. package/dist/i18n/en/Employee.Dashboard.json.js +28 -24
  261. package/dist/i18n/en/Employee.Dashboard.json.js.map +1 -1
  262. package/dist/i18n/en/Employee.HomeAddress.Management.json.js +12 -10
  263. package/dist/i18n/en/Employee.HomeAddress.Management.json.js.map +1 -1
  264. package/dist/i18n/en/Employee.ManagementEmployeeList.json.js +32 -30
  265. package/dist/i18n/en/Employee.ManagementEmployeeList.json.js.map +1 -1
  266. package/dist/i18n/en/Employee.PaymentMethod.json.js +25 -25
  267. package/dist/i18n/en/Employee.StateTaxes.json.js +12 -10
  268. package/dist/i18n/en/Employee.StateTaxes.json.js.map +1 -1
  269. package/dist/i18n/en/Employee.WorkAddress.Management.json.js +16 -14
  270. package/dist/i18n/en/Employee.WorkAddress.Management.json.js.map +1 -1
  271. package/dist/i18n/en/common.json.d.ts +14 -0
  272. package/dist/partner-hook-utils/form/fields/DatePickerHookField.js +33 -32
  273. package/dist/partner-hook-utils/form/fields/DatePickerHookField.js.map +1 -1
  274. package/dist/partner-hook-utils/types.d.ts +4 -0
  275. package/dist/shared/constants.d.ts +2 -0
  276. package/dist/shared/constants.js +13 -12
  277. package/dist/shared/constants.js.map +1 -1
  278. package/dist/style.css +1 -1
  279. package/dist/types/hooks.d.ts +1 -1
  280. package/dist/types/i18next.d.ts +30 -29
  281. package/dist/types/observability.d.ts +1 -1
  282. package/docs/reference/endpoint-inventory.json +24 -8
  283. package/package.json +30 -27
  284. package/dist/components/Employee/Dashboard/CompensationCard.d.ts +0 -13
@@ -1,230 +1,88 @@
1
- import { jsx as t, jsxs as g } from "react/jsx-runtime";
2
- import v from "classnames";
3
- import { useTranslation as R, Trans as b } from "react-i18next";
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import C from "classnames";
3
+ import { useTranslation as F } from "react-i18next";
4
4
  import { useJobsAndCompensationsGetJobs as L } from "@gusto/embedded-api/react-query/jobsAndCompensationsGetJobs";
5
5
  import { useJobForm as h } from "../../shared/useJobForm/useJobForm.js";
6
- import { useCompensationForm as M } from "../../shared/useCompensationForm/useCompensationForm.js";
6
+ import { useCompensationForm as D } from "../../shared/useCompensationForm/useCompensationForm.js";
7
+ import { ManagementCompensationFormBody as P } from "../ManagementCompensationFormBody.js";
7
8
  import y from "./EditCompensation.module.scss.js";
8
- import { BaseBoundaries as W, BaseLayout as p } from "../../../../Base/Base.js";
9
+ import { BaseBoundaries as M, BaseLayout as c } from "../../../../Base/Base.js";
9
10
  import "../../../../Base/useBase.js";
10
- import { Flex as S } from "../../../../Common/Flex/Flex.js";
11
- import { componentEvents as f, FLSA_OVERTIME_SALARY_LIMIT as C } from "../../../../../shared/constants.js";
12
- import { ActionsLayout as T } from "../../../../Common/ActionsLayout/ActionsLayout.js";
13
- import { Form as k } from "../../../../Common/Form/Form.js";
14
- import { useComponentContext as H } from "../../../../../contexts/ComponentAdapter/useComponentContext.js";
15
- import { useComponentDictionary as w, useI18n as F } from "../../../../../i18n/I18n.js";
16
- import { composeErrorHandler as E } from "../../../../../partner-hook-utils/composeErrorHandler.js";
17
- import { composeSubmitHandler as O } from "../../../../../partner-hook-utils/form/composeSubmitHandler.js";
18
- import _ from "../../../../../hooks/useNumberFormatter.js";
19
- import { addDays as U } from "../../../../../helpers/dateFormatting.js";
20
- function oe({ dictionary: r, ...i }) {
21
- return w("Employee.Compensation", r), /* @__PURE__ */ t(W, { componentName: "Employee.Compensation.Management", children: /* @__PURE__ */ t(A, { ...i }) });
11
+ import { Form as N } from "../../../../Common/Form/Form.js";
12
+ import { useComponentDictionary as O, useI18n as S } from "../../../../../i18n/I18n.js";
13
+ import { composeErrorHandler as p } from "../../../../../partner-hook-utils/composeErrorHandler.js";
14
+ import { composeSubmitHandler as T } from "../../../../../partner-hook-utils/form/composeSubmitHandler.js";
15
+ import { componentEvents as l } from "../../../../../shared/constants.js";
16
+ function k({ dictionary: n, ...r }) {
17
+ return O("Employee.Compensation", n), /* @__PURE__ */ e(M, { componentName: "Employee.Compensation.Management", children: /* @__PURE__ */ e(_, { ...r }) });
22
18
  }
23
- function A({
24
- employeeId: r,
25
- jobId: i,
26
- defaultValues: d,
27
- ...m
19
+ function _({
20
+ employeeId: n,
21
+ jobId: r,
22
+ defaultValues: f,
23
+ ...u
28
24
  }) {
29
- const e = L({ employeeId: r }, { enabled: !!r });
30
- if (e.isLoading || !e.data) {
31
- const a = E([e]);
32
- return /* @__PURE__ */ t(p, { isLoading: !0, error: a.errors });
25
+ const a = L({ employeeId: n }, { enabled: !!n });
26
+ if (a.isLoading || !a.data) {
27
+ const o = p([a]);
28
+ return /* @__PURE__ */ e(c, { isLoading: !0, error: o.errors });
33
29
  }
34
- const n = e.data.jobs?.find((a) => a.uuid === i), o = n?.compensations?.find((a) => a.uuid === n.currentCompensationUuid), s = o ? {
35
- title: o.title ?? n?.title ?? void 0,
36
- flsaStatus: o.flsaStatus ?? void 0,
37
- rate: Number(o.rate),
38
- paymentUnit: o.paymentUnit ?? void 0,
39
- adjustForMinimumWage: o.adjustForMinimumWage ?? !1,
40
- minimumWageId: o.minimumWages?.[0]?.uuid ?? ""
30
+ const s = a.data.jobs?.find((o) => o.uuid === r), t = s?.compensations?.find((o) => o.uuid === s.currentCompensationUuid), i = t ? {
31
+ // Title lives on compensation in the API — `job.title` can lag
32
+ // behind comp-level edits on secondaries, so seed directly from
33
+ // the comp.
34
+ title: t.title ?? void 0,
35
+ flsaStatus: t.flsaStatus ?? void 0,
36
+ rate: Number(t.rate),
37
+ paymentUnit: t.paymentUnit ?? void 0,
38
+ adjustForMinimumWage: t.adjustForMinimumWage ?? !1,
39
+ minimumWageId: t.minimumWages?.[0]?.uuid ?? ""
41
40
  // effectiveDate intentionally omitted — user must choose a future date
42
41
  } : void 0;
43
- return /* @__PURE__ */ t(I, { employeeId: r, jobId: i, defaultValues: s, ...m });
42
+ return /* @__PURE__ */ e(j, { employeeId: n, jobId: r, defaultValues: i, ...u });
44
43
  }
45
- function I({ employeeId: r, jobId: i, defaultValues: d, onCancel: m, className: e, onEvent: n }) {
46
- F("Employee.Compensation");
47
- const o = h({
48
- employeeId: r,
49
- jobId: i,
44
+ function j({ employeeId: n, jobId: r, defaultValues: f, onCancel: u, className: a, onEvent: s }) {
45
+ S("Employee.Compensation");
46
+ const { t } = F("Employee.Compensation"), i = h({
47
+ employeeId: n,
48
+ jobId: r,
50
49
  withTitleField: !1,
51
50
  withHireDateField: !1,
52
51
  shouldFocusError: !1
53
- }), s = M({
54
- employeeId: r,
55
- jobId: i,
56
- defaultValues: d,
52
+ }), o = D({
53
+ employeeId: n,
54
+ jobId: r,
55
+ defaultValues: f,
57
56
  withEffectiveDateField: !0,
58
57
  optionalFieldsToRequire: {
59
58
  create: ["title"]
60
59
  },
61
60
  shouldFocusError: !1
62
61
  });
63
- if (o.isLoading || s.isLoading) {
64
- const u = E([o, s]);
65
- return /* @__PURE__ */ t(p, { isLoading: !0, error: u.errors });
62
+ if (i.isLoading || o.isLoading) {
63
+ const m = p([i, o]);
64
+ return /* @__PURE__ */ e(c, { isLoading: !0, error: m.errors });
66
65
  }
67
- const a = O([o, s], async () => {
68
- const u = await o.actions.onSubmit();
69
- if (!u) return;
70
- n(f.EMPLOYEE_JOB_UPDATED, u.data);
71
- const c = await s.actions.onSubmit();
72
- c && (n(f.EMPLOYEE_COMPENSATION_UPDATED, c.data), n(f.EMPLOYEE_COMPENSATION_DONE, c.data));
73
- }), l = E([a]), D = o.status.isPending || s.status.isPending;
74
- return /* @__PURE__ */ t("section", { className: v(y.container, e), children: /* @__PURE__ */ t(p, { error: l.errors, children: /* @__PURE__ */ t(k, { onSubmit: a.handleSubmit, children: /* @__PURE__ */ t(
66
+ const E = T([i, o], async () => {
67
+ const m = await i.actions.onSubmit();
68
+ if (!m) return;
69
+ s(l.EMPLOYEE_JOB_UPDATED, m.data);
70
+ const d = await o.actions.onSubmit();
71
+ d && (s(l.EMPLOYEE_COMPENSATION_UPDATED, d.data), s(l.EMPLOYEE_COMPENSATION_DONE, d.data));
72
+ }), g = p([E]), b = i.status.isPending || o.status.isPending;
73
+ return /* @__PURE__ */ e("section", { className: C(y.container, a), children: /* @__PURE__ */ e(c, { error: g.errors, children: /* @__PURE__ */ e(N, { onSubmit: E.handleSubmit, children: /* @__PURE__ */ e(
75
74
  P,
76
75
  {
77
- jobForm: o,
78
- compensationForm: s,
79
- isPending: D,
80
- onCancel: m
76
+ jobForm: i,
77
+ compensationForm: o,
78
+ title: t("management.editCompensationTitle"),
79
+ submitCtaLabel: t("management.saveCta"),
80
+ isPending: b,
81
+ onCancel: u
81
82
  }
82
83
  ) }) }) });
83
84
  }
84
- function P({ jobForm: r, compensationForm: i, isPending: d, onCancel: m }) {
85
- const { t: e } = R("Employee.Compensation"), n = H(), o = _("currency"), s = r.form.Fields, a = i.form.Fields;
86
- return /* @__PURE__ */ g(S, { flexDirection: "column", gap: 32, children: [
87
- /* @__PURE__ */ t(n.Heading, { as: "h2", children: e("management.editCompensationTitle") }),
88
- i.status.willDeleteSecondaryJobs && /* @__PURE__ */ t(
89
- n.Alert,
90
- {
91
- label: e("management.scheduledClassificationChangeNotification"),
92
- status: "warning"
93
- }
94
- ),
95
- /* @__PURE__ */ t(
96
- a.Title,
97
- {
98
- label: e("management.jobTitleLabel"),
99
- validationMessages: { REQUIRED: e("validations.jobTitleSentence") },
100
- formHookResult: i
101
- }
102
- ),
103
- a.FlsaStatus && /* @__PURE__ */ t(
104
- a.FlsaStatus,
105
- {
106
- label: e("employeeClassification"),
107
- description: /* @__PURE__ */ t(
108
- b,
109
- {
110
- t: e,
111
- i18nKey: "classificationLink",
112
- components: { ClassificationLink: /* @__PURE__ */ t(n.Link, {}) }
113
- }
114
- ),
115
- validationMessages: {
116
- REQUIRED: e("validations.exemptThreshold", {
117
- limit: o(C)
118
- })
119
- },
120
- getOptionLabel: (l) => e(`flsaStatusLabels.${l}`),
121
- formHookResult: i
122
- }
123
- ),
124
- /* @__PURE__ */ t(
125
- a.Rate,
126
- {
127
- label: e("management.wageLabel"),
128
- validationMessages: {
129
- REQUIRED: e("validations.rate"),
130
- RATE_MINIMUM: e("validations.nonZeroRate"),
131
- RATE_EXEMPT_THRESHOLD: e("validations.rateExemptThreshold", {
132
- limit: o(C)
133
- })
134
- },
135
- formHookResult: i
136
- }
137
- ),
138
- /* @__PURE__ */ t(
139
- a.PaymentUnit,
140
- {
141
- label: e("management.wageFrequencyLabel"),
142
- description: e("paymentUnitDescription"),
143
- validationMessages: { REQUIRED: e("validations.paymentUnit") },
144
- getOptionLabel: (l) => e(`management.wageFrequencyOptions.${l}`),
145
- formHookResult: i
146
- }
147
- ),
148
- a.EffectiveDate && /* @__PURE__ */ t(
149
- a.EffectiveDate,
150
- {
151
- label: e("effectiveDateLabel"),
152
- minDate: U(/* @__PURE__ */ new Date(), 1),
153
- maxDate: i.data.maximumEffectiveDate ? new Date(i.data.maximumEffectiveDate) : void 0,
154
- validationMessages: {
155
- REQUIRED: e("validations.effectiveDate"),
156
- EFFECTIVE_DATE_BEFORE_HIRE: e("validations.effectiveDateBeforeHire")
157
- },
158
- formHookResult: i
159
- }
160
- ),
161
- a.AdjustForMinimumWage && /* @__PURE__ */ t(
162
- a.AdjustForMinimumWage,
163
- {
164
- label: e("adjustForMinimumWage"),
165
- description: e("adjustForMinimumWageDescription"),
166
- formHookResult: i
167
- }
168
- ),
169
- a.MinimumWageId && /* @__PURE__ */ t(
170
- a.MinimumWageId,
171
- {
172
- label: e("minimumWageLabel"),
173
- description: e("minimumWageDescription"),
174
- validationMessages: { REQUIRED: e("validations.minimumWage") },
175
- getOptionLabel: (l) => `${o(Number(l.wage))} - ${l.authority}: ${l.notes ?? ""}`,
176
- formHookResult: i
177
- }
178
- ),
179
- s.TwoPercentShareholder && /* @__PURE__ */ t(
180
- s.TwoPercentShareholder,
181
- {
182
- label: e("management.twoPercentShareholderLabel"),
183
- formHookResult: r
184
- }
185
- ),
186
- s.StateWcCovered && /* @__PURE__ */ t(
187
- s.StateWcCovered,
188
- {
189
- label: e("stateWcCoveredLabel"),
190
- description: /* @__PURE__ */ t(
191
- b,
192
- {
193
- t: e,
194
- i18nKey: "stateWcCoveredDescription",
195
- components: {
196
- wcLink: /* @__PURE__ */ t(
197
- n.Link,
198
- {
199
- href: "https://www.lni.wa.gov/insurance/rates-risk-classes/risk-classes-for-workers-compensation/risk-class-lookup#/",
200
- target: "_blank",
201
- rel: "noopener noreferrer"
202
- }
203
- )
204
- }
205
- }
206
- ),
207
- getOptionLabel: (l) => e(l ? "stateWcCoveredOptions.yes" : "stateWcCoveredOptions.no"),
208
- formHookResult: r
209
- }
210
- ),
211
- s.StateWcClassCode && /* @__PURE__ */ t(
212
- s.StateWcClassCode,
213
- {
214
- label: e("stateWcClassCodeLabel"),
215
- description: e("stateWcClassCodeDescription"),
216
- placeholder: e("stateWcClassCodeLabel"),
217
- validationMessages: { REQUIRED: e("validations.stateWcClassCode") },
218
- formHookResult: r
219
- }
220
- ),
221
- /* @__PURE__ */ g(T, { children: [
222
- m && /* @__PURE__ */ t(n.Button, { variant: "secondary", onClick: m, isDisabled: d, children: e("cancelCta") }),
223
- /* @__PURE__ */ t(n.Button, { type: "submit", isLoading: d, children: e("management.saveCta") })
224
- ] })
225
- ] });
226
- }
227
85
  export {
228
- oe as EditCompensation
86
+ k as EditCompensation
229
87
  };
230
88
  //# sourceMappingURL=EditCompensation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EditCompensation.js","sources":["../../../../../../src/components/Employee/Compensation/management/EditCompensation/EditCompensation.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport { Trans, useTranslation } from 'react-i18next'\nimport type { PaymentUnit } from '@gusto/embedded-api/models/components/compensation'\nimport type { FlsaStatusType } from '@gusto/embedded-api/models/components/flsastatustype'\nimport type { MinimumWage } from '@gusto/embedded-api/models/components/minimumwage'\nimport { useJobsAndCompensationsGetJobs } from '@gusto/embedded-api/react-query/jobsAndCompensationsGetJobs'\nimport { useJobForm, type UseJobFormReady } from '../../shared/useJobForm'\nimport {\n useCompensationForm,\n type UseCompensationFormReady,\n type CompensationFormData,\n} from '../../shared/useCompensationForm'\nimport styles from './EditCompensation.module.scss'\nimport { BaseBoundaries, BaseLayout, type CommonComponentInterface } from '@/components/Base'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport { ActionsLayout, Flex } from '@/components/Common'\nimport { Form } from '@/components/Common/Form'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { composeErrorHandler } from '@/partner-hook-utils/composeErrorHandler'\nimport { composeSubmitHandler } from '@/partner-hook-utils/form/composeSubmitHandler'\nimport { componentEvents, FLSA_OVERTIME_SALARY_LIMIT, type EventType } from '@/shared/constants'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\nimport { addDays } from '@/helpers/dateFormatting'\n\nexport interface EditCompensationProps extends CommonComponentInterface<'Employee.Compensation'> {\n employeeId: string\n jobId: string\n onCancel?: () => void\n /** Called with `EMPLOYEE_COMPENSATION_UPDATED` then `EMPLOYEE_COMPENSATION_DONE` on a successful save. Use `EMPLOYEE_COMPENSATION_DONE` to trigger navigation. */\n onEvent: OnEventType<EventType, unknown>\n}\n\nexport function EditCompensation({ dictionary, ...props }: EditCompensationProps) {\n useComponentDictionary('Employee.Compensation', dictionary)\n return (\n <BaseBoundaries componentName=\"Employee.Compensation.Management\">\n <CompensationDefaultsLoader {...props} />\n </BaseBoundaries>\n )\n}\n\ntype LoaderProps = Omit<EditCompensationProps, 'dictionary'>\n\n// Fetches the current job's compensation data to pre-populate the form as\n// defaultValues before rendering Root. Uses the same non-suspense query that\n// useCompensationForm uses internally — React Query dedupes the request so no\n// extra network call is made once Root mounts.\n// defaultValues from CommonComponentInterface (unknown) is excluded from the\n// spread so it doesn't conflict with Root's typed defaultValues prop.\nfunction CompensationDefaultsLoader({\n employeeId,\n jobId,\n defaultValues: _baseDefaults,\n ...rest\n}: LoaderProps) {\n const jobsQuery = useJobsAndCompensationsGetJobs({ employeeId }, { enabled: !!employeeId })\n\n if (jobsQuery.isLoading || !jobsQuery.data) {\n const errorHandling = composeErrorHandler([jobsQuery])\n return <BaseLayout isLoading error={errorHandling.errors} />\n }\n\n const job = jobsQuery.data.jobs?.find(j => j.uuid === jobId)\n const currentComp = job?.compensations?.find(c => c.uuid === job.currentCompensationUuid)\n\n const defaultValues: Partial<CompensationFormData> | undefined = currentComp\n ? {\n title: currentComp.title ?? job?.title ?? undefined,\n flsaStatus: currentComp.flsaStatus ?? undefined,\n rate: Number(currentComp.rate),\n paymentUnit: currentComp.paymentUnit ?? undefined,\n adjustForMinimumWage: currentComp.adjustForMinimumWage ?? false,\n minimumWageId: currentComp.minimumWages?.[0]?.uuid ?? '',\n // effectiveDate intentionally omitted — user must choose a future date\n }\n : undefined\n\n return <Root employeeId={employeeId} jobId={jobId} defaultValues={defaultValues} {...rest} />\n}\n\ninterface RootProps extends LoaderProps {\n defaultValues?: Partial<CompensationFormData>\n}\n\nfunction Root({ employeeId, jobId, defaultValues, onCancel, className, onEvent }: RootProps) {\n useI18n('Employee.Compensation')\n\n // Job form handles the non-effective-dated fields: 2% shareholder + WA WC.\n // Title is suppressed here because the compensation form owns title\n // (effective-dated alongside rate/unit/FLSA on the future-dated row).\n // Hire-date is suppressed because this surface never edits it.\n const jobForm = useJobForm({\n employeeId,\n jobId,\n withTitleField: false,\n withHireDateField: false,\n shouldFocusError: false,\n })\n\n // Compensation form runs in create mode (no compensationId) → POST\n // /v1/jobs/:jobId/compensations, creating a new future-dated compensation.\n // The form is pre-populated with the current comp's values via defaultValues\n // (fetched by CompensationDefaultsLoader) so the user can edit from the\n // current state, and picks a future effectiveDate to schedule the change.\n const compensationForm = useCompensationForm({\n employeeId,\n jobId,\n defaultValues,\n withEffectiveDateField: true,\n optionalFieldsToRequire: {\n create: ['title'],\n },\n shouldFocusError: false,\n })\n\n if (jobForm.isLoading || compensationForm.isLoading) {\n const loadingErrorHandling = composeErrorHandler([jobForm, compensationForm])\n return <BaseLayout isLoading error={loadingErrorHandling.errors} />\n }\n\n // PUT job first (immediate mutation of 2% shareholder / WC), then POST\n // the new compensation (the future-dated change). composeSubmitHandler\n // validates both forms in parallel and short-circuits before any network\n // I/O if either fails.\n const submitResult = composeSubmitHandler([jobForm, compensationForm], async () => {\n const jobResult = await jobForm.actions.onSubmit()\n if (!jobResult) return\n\n onEvent(componentEvents.EMPLOYEE_JOB_UPDATED, jobResult.data)\n\n const compensationResult = await compensationForm.actions.onSubmit()\n if (!compensationResult) return\n\n onEvent(componentEvents.EMPLOYEE_COMPENSATION_UPDATED, compensationResult.data)\n onEvent(componentEvents.EMPLOYEE_COMPENSATION_DONE, compensationResult.data)\n })\n\n const errorHandling = composeErrorHandler([submitResult])\n const isPending = jobForm.status.isPending || compensationForm.status.isPending\n\n return (\n <section className={classNames(styles.container, className)}>\n <BaseLayout error={errorHandling.errors}>\n <Form onSubmit={submitResult.handleSubmit}>\n <FormBody\n jobForm={jobForm}\n compensationForm={compensationForm}\n isPending={isPending}\n onCancel={onCancel}\n />\n </Form>\n </BaseLayout>\n </section>\n )\n}\n\ninterface FormBodyProps {\n jobForm: UseJobFormReady\n compensationForm: UseCompensationFormReady\n isPending: boolean\n onCancel?: () => void\n}\n\nfunction FormBody({ jobForm, compensationForm, isPending, onCancel }: FormBodyProps) {\n const { t } = useTranslation('Employee.Compensation')\n const Components = useComponentContext()\n const format = useNumberFormatter('currency')\n\n const JobFields = jobForm.form.Fields\n const CompFields = compensationForm.form.Fields\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n <Components.Heading as=\"h2\">{t('management.editCompensationTitle')}</Components.Heading>\n\n {compensationForm.status.willDeleteSecondaryJobs && (\n <Components.Alert\n label={t('management.scheduledClassificationChangeNotification')}\n status=\"warning\"\n />\n )}\n\n <CompFields.Title\n label={t('management.jobTitleLabel')}\n validationMessages={{ REQUIRED: t('validations.jobTitleSentence') }}\n formHookResult={compensationForm}\n />\n\n {CompFields.FlsaStatus && (\n <CompFields.FlsaStatus\n label={t('employeeClassification')}\n description={\n <Trans\n t={t}\n i18nKey=\"classificationLink\"\n components={{ ClassificationLink: <Components.Link /> }}\n />\n }\n validationMessages={{\n REQUIRED: t('validations.exemptThreshold', {\n limit: format(FLSA_OVERTIME_SALARY_LIMIT),\n }),\n }}\n getOptionLabel={(status: FlsaStatusType) => t(`flsaStatusLabels.${status}`)}\n formHookResult={compensationForm}\n />\n )}\n\n <CompFields.Rate\n label={t('management.wageLabel')}\n validationMessages={{\n REQUIRED: t('validations.rate'),\n RATE_MINIMUM: t('validations.nonZeroRate'),\n RATE_EXEMPT_THRESHOLD: t('validations.rateExemptThreshold', {\n limit: format(FLSA_OVERTIME_SALARY_LIMIT),\n }),\n }}\n formHookResult={compensationForm}\n />\n\n <CompFields.PaymentUnit\n label={t('management.wageFrequencyLabel')}\n description={t('paymentUnitDescription')}\n validationMessages={{ REQUIRED: t('validations.paymentUnit') }}\n getOptionLabel={(unit: PaymentUnit) =>\n t(`management.wageFrequencyOptions.${unit}` as const)\n }\n formHookResult={compensationForm}\n />\n\n {CompFields.EffectiveDate && (\n <CompFields.EffectiveDate\n label={t('effectiveDateLabel')}\n minDate={addDays(new Date(), 1)}\n maxDate={\n compensationForm.data.maximumEffectiveDate\n ? new Date(compensationForm.data.maximumEffectiveDate)\n : undefined\n }\n validationMessages={{\n REQUIRED: t('validations.effectiveDate'),\n EFFECTIVE_DATE_BEFORE_HIRE: t('validations.effectiveDateBeforeHire'),\n }}\n formHookResult={compensationForm}\n />\n )}\n\n {CompFields.AdjustForMinimumWage && (\n <CompFields.AdjustForMinimumWage\n label={t('adjustForMinimumWage')}\n description={t('adjustForMinimumWageDescription')}\n formHookResult={compensationForm}\n />\n )}\n\n {CompFields.MinimumWageId && (\n <CompFields.MinimumWageId\n label={t('minimumWageLabel')}\n description={t('minimumWageDescription')}\n validationMessages={{ REQUIRED: t('validations.minimumWage') }}\n getOptionLabel={(wage: MinimumWage) =>\n `${format(Number(wage.wage))} - ${wage.authority}: ${wage.notes ?? ''}`\n }\n formHookResult={compensationForm}\n />\n )}\n\n {JobFields.TwoPercentShareholder && (\n <JobFields.TwoPercentShareholder\n label={t('management.twoPercentShareholderLabel')}\n formHookResult={jobForm}\n />\n )}\n\n {JobFields.StateWcCovered && (\n <JobFields.StateWcCovered\n label={t('stateWcCoveredLabel')}\n description={\n <Trans\n t={t}\n i18nKey=\"stateWcCoveredDescription\"\n components={{\n wcLink: (\n <Components.Link\n href=\"https://www.lni.wa.gov/insurance/rates-risk-classes/risk-classes-for-workers-compensation/risk-class-lookup#/\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n />\n ),\n }}\n />\n }\n getOptionLabel={(covered: boolean) =>\n covered ? t('stateWcCoveredOptions.yes') : t('stateWcCoveredOptions.no')\n }\n formHookResult={jobForm}\n />\n )}\n\n {JobFields.StateWcClassCode && (\n <JobFields.StateWcClassCode\n label={t('stateWcClassCodeLabel')}\n description={t('stateWcClassCodeDescription')}\n placeholder={t('stateWcClassCodeLabel')}\n validationMessages={{ REQUIRED: t('validations.stateWcClassCode') }}\n formHookResult={jobForm}\n />\n )}\n\n <ActionsLayout>\n {onCancel && (\n <Components.Button variant=\"secondary\" onClick={onCancel} isDisabled={isPending}>\n {t('cancelCta')}\n </Components.Button>\n )}\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('management.saveCta')}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n )\n}\n"],"names":["EditCompensation","dictionary","props","useComponentDictionary","jsx","BaseBoundaries","CompensationDefaultsLoader","employeeId","jobId","_baseDefaults","rest","jobsQuery","useJobsAndCompensationsGetJobs","errorHandling","composeErrorHandler","BaseLayout","job","j","currentComp","c","defaultValues","Root","onCancel","className","onEvent","useI18n","jobForm","useJobForm","compensationForm","useCompensationForm","loadingErrorHandling","submitResult","composeSubmitHandler","jobResult","componentEvents","compensationResult","isPending","classNames","styles","Form","FormBody","t","useTranslation","Components","useComponentContext","format","useNumberFormatter","JobFields","CompFields","jsxs","Flex","Trans","FLSA_OVERTIME_SALARY_LIMIT","status","unit","addDays","wage","covered","ActionsLayout"],"mappings":";;;;;;;;;;;;;;;;;;;AAiCO,SAASA,GAAiB,EAAE,YAAAC,GAAY,GAAGC,KAAgC;AAChF,SAAAC,EAAuB,yBAAyBF,CAAU,GAExD,gBAAAG,EAACC,KAAe,eAAc,oCAC5B,4BAACC,GAAA,EAA4B,GAAGJ,GAAO,EAAA,CACzC;AAEJ;AAUA,SAASI,EAA2B;AAAA,EAClC,YAAAC;AAAA,EACA,OAAAC;AAAA,EACA,eAAeC;AAAA,EACf,GAAGC;AACL,GAAgB;AACd,QAAMC,IAAYC,EAA+B,EAAE,YAAAL,EAAA,GAAc,EAAE,SAAS,CAAC,CAACA,GAAY;AAE1F,MAAII,EAAU,aAAa,CAAC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AON,EAAE,uCAAuC;AAAA,QAChD,gBAAgBf;AAAA,MAAA;AAAA,IAAA;AAAA,IAInBqB,EAAU,kBACT,gBAAA3C;AAAA,MAAC2C,EAAU;AAAA,MAAV;AAAA,QACC,OAAON,EAAE,qBAAqB;AAAA,QAC9B,aACE,gBAAArC;AAAA,UAAC+C;AAAA,UAAA;AAAA,YACC,GAAAV;AAAA,YACA,SAAQ;AAAA,YACR,YAAY;AAAA,cACV,QACE,gBAAArC;AAAA,gBAACuC,EAAW;AAAA,gBAAX;AAAA,kBACC,MAAK;AAAA,kBACL,QAAO;AAAA,kBACP,KAAI;AAAA,gBAAA;AAAA,cAAA;AAAA,YACN;AAAA,UAEJ;AAAA,QAAA;AAAA,QAGJ,gBAAgB,CAACc,MACLhB,EAAVgB,IAAY,8BAAiC,0BAAN;AAAA,QAEzC,gBAAgB/B;AAAA,MAAA;AAAA,IAAA;AAAA,IAInBqB,EAAU,oBACT,gBAAA3C;AAAA,MAAC2C,EAAU;AAAA,MAAV;AAAA,QACC,OAAON,EAAE,uBAAuB;AAAA,QAChC,aAAaA,EAAE,6BAA6B;AAAA,QAC5C,aAAaA,EAAE,uBAAuB;AAAA,QACtC,oBAAoB,EAAE,UAAUA,EAAE,8BAA8B,EAAA;AAAA,QAChE,gBAAgBf;AAAA,MAAA;AAAA,IAAA;AAAA,sBAInBgC,GAAA,EACE,UAAA;AAAA,MAAApC,KACC,gBAAAlB,EAACuC,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASrB,GAAU,YAAYc,GACnE,UAAAK,EAAE,WAAW,EAAA,CAChB;AAAA,MAEF,gBAAArC,EAACuC,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWP,GACzC,UAAAK,EAAE,oBAAoB,EAAA,CACzB;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"EditCompensation.js","sources":["../../../../../../src/components/Employee/Compensation/management/EditCompensation/EditCompensation.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport { useTranslation } from 'react-i18next'\nimport { useJobsAndCompensationsGetJobs } from '@gusto/embedded-api/react-query/jobsAndCompensationsGetJobs'\nimport { useJobForm } from '../../shared/useJobForm'\nimport { useCompensationForm, type CompensationFormData } from '../../shared/useCompensationForm'\nimport { ManagementCompensationFormBody } from '../ManagementCompensationFormBody'\nimport styles from './EditCompensation.module.scss'\nimport { BaseBoundaries, BaseLayout, type CommonComponentInterface } from '@/components/Base'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport { Form } from '@/components/Common/Form'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { composeErrorHandler } from '@/partner-hook-utils/composeErrorHandler'\nimport { composeSubmitHandler } from '@/partner-hook-utils/form/composeSubmitHandler'\nimport { componentEvents, type EventType } from '@/shared/constants'\n\nexport interface EditCompensationProps extends CommonComponentInterface<'Employee.Compensation'> {\n employeeId: string\n jobId: string\n onCancel?: () => void\n /** Called with `EMPLOYEE_COMPENSATION_UPDATED` then `EMPLOYEE_COMPENSATION_DONE` on a successful save. Use `EMPLOYEE_COMPENSATION_DONE` to trigger navigation. */\n onEvent: OnEventType<EventType, unknown>\n}\n\nexport function EditCompensation({ dictionary, ...props }: EditCompensationProps) {\n useComponentDictionary('Employee.Compensation', dictionary)\n return (\n <BaseBoundaries componentName=\"Employee.Compensation.Management\">\n <CompensationDefaultsLoader {...props} />\n </BaseBoundaries>\n )\n}\n\ntype LoaderProps = Omit<EditCompensationProps, 'dictionary'>\n\n// Fetches the current job's compensation data to pre-populate the form as\n// defaultValues before rendering Root. Uses the same non-suspense query that\n// useCompensationForm uses internally — React Query dedupes the request so no\n// extra network call is made once Root mounts.\n// defaultValues from CommonComponentInterface (unknown) is excluded from the\n// spread so it doesn't conflict with Root's typed defaultValues prop.\nfunction CompensationDefaultsLoader({\n employeeId,\n jobId,\n defaultValues: _baseDefaults,\n ...rest\n}: LoaderProps) {\n const jobsQuery = useJobsAndCompensationsGetJobs({ employeeId }, { enabled: !!employeeId })\n\n if (jobsQuery.isLoading || !jobsQuery.data) {\n const errorHandling = composeErrorHandler([jobsQuery])\n return <BaseLayout isLoading error={errorHandling.errors} />\n }\n\n const job = jobsQuery.data.jobs?.find(j => j.uuid === jobId)\n const currentComp = job?.compensations?.find(c => c.uuid === job.currentCompensationUuid)\n\n const defaultValues: Partial<CompensationFormData> | undefined = currentComp\n ? {\n // Title lives on compensation in the API — `job.title` can lag\n // behind comp-level edits on secondaries, so seed directly from\n // the comp.\n title: currentComp.title ?? undefined,\n flsaStatus: currentComp.flsaStatus ?? undefined,\n rate: Number(currentComp.rate),\n paymentUnit: currentComp.paymentUnit ?? undefined,\n adjustForMinimumWage: currentComp.adjustForMinimumWage ?? false,\n minimumWageId: currentComp.minimumWages?.[0]?.uuid ?? '',\n // effectiveDate intentionally omitted — user must choose a future date\n }\n : undefined\n\n return <Root employeeId={employeeId} jobId={jobId} defaultValues={defaultValues} {...rest} />\n}\n\ninterface RootProps extends LoaderProps {\n defaultValues?: Partial<CompensationFormData>\n}\n\nfunction Root({ employeeId, jobId, defaultValues, onCancel, className, onEvent }: RootProps) {\n useI18n('Employee.Compensation')\n const { t } = useTranslation('Employee.Compensation')\n\n // Job form handles the non-effective-dated fields: 2% shareholder + WA WC.\n // Title is suppressed here because the compensation form owns title\n // (effective-dated alongside rate/unit/FLSA on the future-dated row).\n // Hire-date is suppressed because this surface never edits it.\n const jobForm = useJobForm({\n employeeId,\n jobId,\n withTitleField: false,\n withHireDateField: false,\n shouldFocusError: false,\n })\n\n // Compensation form runs in create mode (no compensationId) → POST\n // /v1/jobs/:jobId/compensations, creating a new future-dated compensation.\n // The form is pre-populated with the current comp's values via defaultValues\n // (fetched by CompensationDefaultsLoader) so the user can edit from the\n // current state, and picks a future effectiveDate to schedule the change.\n const compensationForm = useCompensationForm({\n employeeId,\n jobId,\n defaultValues,\n withEffectiveDateField: true,\n optionalFieldsToRequire: {\n create: ['title'],\n },\n shouldFocusError: false,\n })\n\n if (jobForm.isLoading || compensationForm.isLoading) {\n const loadingErrorHandling = composeErrorHandler([jobForm, compensationForm])\n return <BaseLayout isLoading error={loadingErrorHandling.errors} />\n }\n\n // PUT job first (immediate mutation of 2% shareholder / WC), then POST\n // the new compensation (the future-dated change). composeSubmitHandler\n // validates both forms in parallel and short-circuits before any network\n // I/O if either fails.\n const submitResult = composeSubmitHandler([jobForm, compensationForm], async () => {\n const jobResult = await jobForm.actions.onSubmit()\n if (!jobResult) return\n\n onEvent(componentEvents.EMPLOYEE_JOB_UPDATED, jobResult.data)\n\n const compensationResult = await compensationForm.actions.onSubmit()\n if (!compensationResult) return\n\n onEvent(componentEvents.EMPLOYEE_COMPENSATION_UPDATED, compensationResult.data)\n onEvent(componentEvents.EMPLOYEE_COMPENSATION_DONE, compensationResult.data)\n })\n\n const errorHandling = composeErrorHandler([submitResult])\n const isPending = jobForm.status.isPending || compensationForm.status.isPending\n\n return (\n <section className={classNames(styles.container, className)}>\n <BaseLayout error={errorHandling.errors}>\n <Form onSubmit={submitResult.handleSubmit}>\n <ManagementCompensationFormBody\n jobForm={jobForm}\n compensationForm={compensationForm}\n title={t('management.editCompensationTitle')}\n submitCtaLabel={t('management.saveCta')}\n isPending={isPending}\n onCancel={onCancel}\n />\n </Form>\n </BaseLayout>\n </section>\n )\n}\n"],"names":["EditCompensation","dictionary","props","useComponentDictionary","jsx","BaseBoundaries","CompensationDefaultsLoader","employeeId","jobId","_baseDefaults","rest","jobsQuery","useJobsAndCompensationsGetJobs","errorHandling","composeErrorHandler","BaseLayout","job","j","currentComp","c","defaultValues","Root","onCancel","className","onEvent","useI18n","useTranslation","jobForm","useJobForm","compensationForm","useCompensationForm","loadingErrorHandling","submitResult","composeSubmitHandler","jobResult","componentEvents","compensationResult","isPending","classNames","styles","Form","ManagementCompensationFormBody"],"mappings":";;;;;;;;;;;;;;;AAuBO,SAASA,EAAiB,EAAE,YAAAC,GAAY,GAAGC,KAAgC;AAChF,SAAAC,EAAuB,yBAAyBF,CAAU,GAExD,gBA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F,CACF,GACF,GACF;AAEJ;"}
@@ -0,0 +1,25 @@
1
+ import { CommonComponentInterface } from '../../../../Base';
2
+ import { OnEventType } from '../../../../Base/useBase';
3
+ import { EventType } from '../../../../../shared/constants';
4
+ export interface EditPendingCompensationProps extends CommonComponentInterface<'Employee.Compensation'> {
5
+ employeeId: string;
6
+ jobId: string;
7
+ /** The UUID of the pending (future-dated) compensation to update. Always required — this
8
+ * component only operates in update mode. */
9
+ compensationId: string;
10
+ /**
11
+ * True when the job has no current (on-or-before-today) compensation — i.e. it hasn't
12
+ * started yet. Drives which date field is shown and how the submit syncs hire_date.
13
+ */
14
+ isNewJob: boolean;
15
+ /**
16
+ * True when this is the employee's primary job. Combined with `isNewJob`, determines
17
+ * whether to show a Hire date field (primary) or Effective date field (secondary/change).
18
+ */
19
+ isPrimaryJob: boolean;
20
+ onCancel?: () => void;
21
+ /** Called with `EMPLOYEE_COMPENSATION_UPDATED` then `EMPLOYEE_COMPENSATION_DONE` on a
22
+ * successful save. Use `EMPLOYEE_COMPENSATION_DONE` to trigger navigation. */
23
+ onEvent: OnEventType<EventType, unknown>;
24
+ }
25
+ export declare function EditPendingCompensation({ dictionary, ...props }: EditPendingCompensationProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,79 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import O from "classnames";
3
+ import { useTranslation as N } from "react-i18next";
4
+ import { useJobForm as S } from "../../shared/useJobForm/useJobForm.js";
5
+ import { useCompensationForm as T } from "../../shared/useCompensationForm/useCompensationForm.js";
6
+ import { ManagementCompensationFormBody as v } from "../ManagementCompensationFormBody.js";
7
+ import L from "./EditPendingCompensation.module.scss.js";
8
+ import { BaseBoundaries as M, BaseLayout as f } from "../../../../Base/Base.js";
9
+ import "../../../../Base/useBase.js";
10
+ import { Form as w } from "../../../../Common/Form/Form.js";
11
+ import { useComponentDictionary as R, useI18n as _ } from "../../../../../i18n/I18n.js";
12
+ import { composeErrorHandler as E } from "../../../../../partner-hook-utils/composeErrorHandler.js";
13
+ import { composeSubmitHandler as B } from "../../../../../partner-hook-utils/form/composeSubmitHandler.js";
14
+ import { componentEvents as p } from "../../../../../shared/constants.js";
15
+ function W({ dictionary: n, ...r }) {
16
+ return R("Employee.Compensation", n), /* @__PURE__ */ e(M, { componentName: "Employee.Compensation.Management", children: /* @__PURE__ */ e(H, { ...r }) });
17
+ }
18
+ function H({
19
+ employeeId: n,
20
+ jobId: r,
21
+ compensationId: u,
22
+ isNewJob: h,
23
+ isPrimaryJob: g,
24
+ onCancel: C,
25
+ className: F,
26
+ onEvent: s
27
+ }) {
28
+ _("Employee.Compensation");
29
+ const { t: c } = N("Employee.Compensation"), i = h && g, o = S({
30
+ employeeId: n,
31
+ jobId: r,
32
+ withTitleField: !1,
33
+ withHireDateField: i,
34
+ optionalFieldsToRequire: i ? { update: ["hireDate"] } : void 0,
35
+ shouldFocusError: !1
36
+ }), t = T({
37
+ employeeId: n,
38
+ jobId: r,
39
+ compensationId: u,
40
+ // Primary new job: comp date is set via jobForm's hire date on submit —
41
+ // hide it here to avoid showing two date fields.
42
+ withEffectiveDateField: !i,
43
+ optionalFieldsToRequire: {
44
+ update: i ? ["title", "flsaStatus", "rate", "paymentUnit"] : ["title", "flsaStatus", "rate", "paymentUnit", "effectiveDate"]
45
+ },
46
+ shouldFocusError: !1
47
+ });
48
+ if (o.isLoading || t.isLoading) {
49
+ const a = E([o, t]);
50
+ return /* @__PURE__ */ e(f, { isLoading: !0, error: a.errors });
51
+ }
52
+ const d = B([o, t], async () => {
53
+ const a = i ? o.form.hookFormInternals.formMethods.getValues("hireDate") ?? void 0 : void 0, m = await o.actions.onSubmit();
54
+ if (!m) return;
55
+ s(p.EMPLOYEE_JOB_UPDATED, m.data);
56
+ const b = m.data.compensations?.find(
57
+ (y) => y.uuid === u
58
+ )?.version, l = await t.actions.onSubmit({
59
+ ...a ? { effectiveDate: a } : {},
60
+ compensationVersion: b
61
+ });
62
+ l && (s(p.EMPLOYEE_COMPENSATION_UPDATED, l.data), s(p.EMPLOYEE_COMPENSATION_DONE, l.data));
63
+ }), D = E([d]), P = o.status.isPending || t.status.isPending;
64
+ return /* @__PURE__ */ e("section", { className: O(L.container, F), children: /* @__PURE__ */ e(f, { error: D.errors, children: /* @__PURE__ */ e(w, { onSubmit: d.handleSubmit, children: /* @__PURE__ */ e(
65
+ v,
66
+ {
67
+ jobForm: o,
68
+ compensationForm: t,
69
+ title: c("management.editCompensationTitle"),
70
+ submitCtaLabel: c("management.saveCta"),
71
+ isPending: P,
72
+ onCancel: C
73
+ }
74
+ ) }) }) });
75
+ }
76
+ export {
77
+ W as EditPendingCompensation
78
+ };
79
+ //# sourceMappingURL=EditPendingCompensation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditPendingCompensation.js","sources":["../../../../../../src/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport { useTranslation } from 'react-i18next'\nimport { useJobForm } from '../../shared/useJobForm'\nimport { useCompensationForm } from '../../shared/useCompensationForm'\nimport { ManagementCompensationFormBody } from '../ManagementCompensationFormBody'\nimport styles from './EditPendingCompensation.module.scss'\nimport { BaseBoundaries, BaseLayout, type CommonComponentInterface } from '@/components/Base'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport { Form } from '@/components/Common/Form'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { composeErrorHandler } from '@/partner-hook-utils/composeErrorHandler'\nimport { composeSubmitHandler } from '@/partner-hook-utils/form/composeSubmitHandler'\nimport { componentEvents, type EventType } from '@/shared/constants'\n\nexport interface EditPendingCompensationProps extends CommonComponentInterface<'Employee.Compensation'> {\n employeeId: string\n jobId: string\n /** The UUID of the pending (future-dated) compensation to update. Always required — this\n * component only operates in update mode. */\n compensationId: string\n /**\n * True when the job has no current (on-or-before-today) compensation — i.e. it hasn't\n * started yet. Drives which date field is shown and how the submit syncs hire_date.\n */\n isNewJob: boolean\n /**\n * True when this is the employee's primary job. Combined with `isNewJob`, determines\n * whether to show a Hire date field (primary) or Effective date field (secondary/change).\n */\n isPrimaryJob: boolean\n onCancel?: () => void\n /** Called with `EMPLOYEE_COMPENSATION_UPDATED` then `EMPLOYEE_COMPENSATION_DONE` on a\n * successful save. Use `EMPLOYEE_COMPENSATION_DONE` to trigger navigation. */\n onEvent: OnEventType<EventType, unknown>\n}\n\nexport function EditPendingCompensation({ dictionary, ...props }: EditPendingCompensationProps) {\n useComponentDictionary('Employee.Compensation', dictionary)\n return (\n <BaseBoundaries componentName=\"Employee.Compensation.Management\">\n <Root {...props} />\n </BaseBoundaries>\n )\n}\n\ntype RootProps = Omit<EditPendingCompensationProps, 'dictionary'>\n\nfunction Root({\n employeeId,\n jobId,\n compensationId,\n isNewJob,\n isPrimaryJob,\n onCancel,\n className,\n onEvent,\n}: RootProps) {\n useI18n('Employee.Compensation')\n const { t } = useTranslation('Employee.Compensation')\n\n // For a primary new job (hire date in the future, no current comp), the hire\n // date field is shown instead of the effective date field. This keeps\n // hire_date and comp effective_date in sync so the API doesn't auto-create a\n // second compensation when the initial comp moves off the hire date.\n const isPrimaryNewJob = isNewJob && isPrimaryJob\n\n // Title is owned by `useCompensationForm` here: title is stored on\n // compensation in the API (job.title is just a denormalized snapshot of\n // the primary comp's title), so writing it via PUT /v1/compensations is\n // the direct path. The dashboard row reads the title off the comp pointed\n // to by `currentCompensationUuid`, so the change surfaces immediately\n // whether the job is in effect today or still pending.\n const jobForm = useJobForm({\n employeeId,\n jobId,\n withTitleField: false,\n withHireDateField: isPrimaryNewJob,\n optionalFieldsToRequire: isPrimaryNewJob ? { update: ['hireDate'] } : undefined,\n shouldFocusError: false,\n })\n\n const compensationForm = useCompensationForm({\n employeeId,\n jobId,\n compensationId,\n // Primary new job: comp date is set via jobForm's hire date on submit —\n // hide it here to avoid showing two date fields.\n withEffectiveDateField: !isPrimaryNewJob,\n optionalFieldsToRequire: {\n update: isPrimaryNewJob\n ? ['title', 'flsaStatus', 'rate', 'paymentUnit']\n : ['title', 'flsaStatus', 'rate', 'paymentUnit', 'effectiveDate'],\n },\n shouldFocusError: false,\n })\n\n if (jobForm.isLoading || compensationForm.isLoading) {\n const loadingErrorHandling = composeErrorHandler([jobForm, compensationForm])\n return <BaseLayout isLoading error={loadingErrorHandling.errors} />\n }\n\n const submitResult = composeSubmitHandler([jobForm, compensationForm], async () => {\n // For a primary new job, the user edits the hire date field. We read it\n // back here and pass it to the comp submit so both the job's hire_date and\n // the comp's effective_date land on the same value — preventing the API\n // from auto-creating a second compensation to fill the gap at the old date.\n const hireDateOverride = isPrimaryNewJob\n ? (jobForm.form.hookFormInternals.formMethods.getValues('hireDate') ?? undefined)\n : undefined\n\n const jobResult = await jobForm.actions.onSubmit()\n if (!jobResult) return\n\n onEvent(componentEvents.EMPLOYEE_JOB_UPDATED, jobResult.data)\n\n // When the hire date moves forward, the API auto-syncs the compensation's\n // effective_date to the new hire_date as part of the job PUT, which bumps\n // the compensation's version. Read it from the job response so the\n // subsequent compensation PUT doesn't send a stale version.\n const freshCompVersion = jobResult.data.compensations?.find(\n c => c.uuid === compensationId,\n )?.version\n\n const compensationResult = await compensationForm.actions.onSubmit({\n ...(hireDateOverride ? { effectiveDate: hireDateOverride } : {}),\n compensationVersion: freshCompVersion,\n })\n if (!compensationResult) return\n\n onEvent(componentEvents.EMPLOYEE_COMPENSATION_UPDATED, compensationResult.data)\n onEvent(componentEvents.EMPLOYEE_COMPENSATION_DONE, compensationResult.data)\n })\n\n const errorHandling = composeErrorHandler([submitResult])\n const isPending = jobForm.status.isPending || compensationForm.status.isPending\n\n return (\n <section className={classNames(styles.container, className)}>\n <BaseLayout error={errorHandling.errors}>\n <Form onSubmit={submitResult.handleSubmit}>\n <ManagementCompensationFormBody\n jobForm={jobForm}\n compensationForm={compensationForm}\n title={t('management.editCompensationTitle')}\n submitCtaLabel={t('management.saveCta')}\n isPending={isPending}\n onCancel={onCancel}\n />\n </Form>\n </BaseLayout>\n </section>\n )\n}\n"],"names":["EditPendingCompensation","dictionary","props","useComponentDictionary","jsx","BaseBoundaries","Root","employeeId","jobId","compensationId","isNewJob","isPrimaryJob","onCancel","className","onEvent","useI18n","t","useTranslation","isPrimaryNewJob","jobForm","useJobForm","compensationForm","useCompensationForm","loadingErrorHandling","composeErrorHandler","BaseLayout","submitResult","composeSubmitHandler","hireDateOverride","jobResult","componentEvents","freshCompVersion","c","compensationResult","errorHandling","isPending","classNames","styles","Form","ManagementCompensationFormBody"],"mappings":";;;;;;;;;;;;;;AAoCO,SAASA,EAAwB,EAAE,YAAAC,GAAY,GAAGC,KAAuC;AAC9F,SAAAC,EAAuB,yBAAyBF,CAAU,GAExD,gBAAAG,EAACC,KAAe,eAAc,oCAC5B,4BAACC,GAAA,EAAM,GAAGJ,GAAO,EAAA,CACnB;AAEJ;AAIA,SAASI,EAAK;AAAA,EACZ,YAAAC;AAAA,EACA,OAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,cAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,SAAAC;AACF,GAAc;AACZ,EAAAC,EAAQ,uBAAuB;AAC/B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,uBAAuB,GAM9CC,IAAkBR,KAAYC,GAQ9BQ,IAAUC,EAAW;AAAA,IACzB,YAAAb;AAAA,IACA,OAAAC;AAAA,IACA,gBAAgB;AAAA,IAChB,mBAAmBU;AAAA,IACnB,yBAAyBA,IAAkB,EAAE,QAAQ,CAAC,UAAU,MAAM;AAAA,IACtE,kBAAkB;AAAA,EAAA,CACnB,GAEKG,IAAmBC,EAAoB;AAAA,IAC3C,YAAAf;AAAA,IACA,OAAAC;AAAA,IACA,gBAAAC;AAAA;AAAA;AAAA,IAGA,wBAAwB,CAACS;AAAA,IACzB,yBAAyB;AAAA,MACvB,QAAQA,IACJ,CAAC,SAAS,cAAc,QAAQ,aAAa,IAC7C,CAAC,SAAS,cAAc,QAAQ,eAAe,eAAe;AAAA,I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B;AAAA,MACtC,WAAAmB;AAAA,MACA,UAAAvB;AAAA,IAAA;AAAA,EAAA,EACF,CACF,GACF,GACF;AAEJ;"}
@@ -0,0 +1,8 @@
1
+ const n = "_container_18572_1", t = {
2
+ container: n
3
+ };
4
+ export {
5
+ n as container,
6
+ t as default
7
+ };
8
+ //# sourceMappingURL=EditPendingCompensation.module.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditPendingCompensation.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
@@ -0,0 +1,18 @@
1
+ import { UseJobFormReady } from '../shared/useJobForm';
2
+ import { UseCompensationFormReady } from '../shared/useCompensationForm';
3
+ export interface ManagementCompensationFormBodyProps {
4
+ jobForm: UseJobFormReady;
5
+ compensationForm: UseCompensationFormReady;
6
+ title: string;
7
+ submitCtaLabel: string;
8
+ isPending: boolean;
9
+ onCancel?: () => void;
10
+ }
11
+ /**
12
+ * Renders the shared field layout used by both `EditCompensation` (schedule a future comp
13
+ * change for a present job) and `EditPendingCompensation` (update an existing future comp).
14
+ * Field visibility is driven entirely by hook configuration — the hooks expose `undefined`
15
+ * for fields that should not render — so this component renders the correct subset for each
16
+ * use case without extra conditional props.
17
+ */
18
+ export declare function ManagementCompensationFormBody({ jobForm, compensationForm, title, submitCtaLabel, isPending, onCancel, }: ManagementCompensationFormBodyProps): import("react/jsx-runtime").JSX.Element;