@gusto/embedded-react-sdk 0.46.2 → 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 (172) hide show
  1. package/CHANGELOG.md +67 -0
  2. package/dist/components/Common/DataView/DataTable/DataTable.js +76 -72
  3. package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
  4. package/dist/components/Common/DataView/DataTable/DataTable.module.scss.js +8 -0
  5. package/dist/components/Common/DataView/DataTable/DataTable.module.scss.js.map +1 -0
  6. package/dist/components/Common/DataView/useDataView.d.ts +2 -0
  7. package/dist/components/Common/DataView/useDataView.js.map +1 -1
  8. package/dist/components/Common/DocumentViewer/DocumentViewer.js +10 -10
  9. package/dist/components/Common/DocumentViewer/DocumentViewer.js.map +1 -1
  10. package/dist/components/Common/DocumentViewer/DocumentViewer.module.scss.js +9 -9
  11. package/dist/components/Common/PaginationControl/PaginationControl.js +11 -10
  12. package/dist/components/Common/PaginationControl/PaginationControl.js.map +1 -1
  13. package/dist/components/Common/PaginationControl/PaginationControlTypes.d.ts +1 -1
  14. package/dist/components/Common/UI/DescriptionList/DescriptionList.js +11 -10
  15. package/dist/components/Common/UI/DescriptionList/DescriptionList.js.map +1 -1
  16. package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js +4 -4
  17. package/dist/components/Common/UI/Input/InputTypes.d.ts +1 -1
  18. package/dist/components/Common/UI/Input/InputTypes.js.map +1 -1
  19. package/dist/components/Common/UI/NumberInput/NumberInput.js +51 -48
  20. package/dist/components/Common/UI/NumberInput/NumberInput.js.map +1 -1
  21. package/dist/components/Common/VisuallyHidden/VisuallyHidden.d.ts +1 -1
  22. package/dist/components/Common/VisuallyHidden/VisuallyHidden.js.map +1 -1
  23. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
  24. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  25. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
  26. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  27. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
  28. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  29. package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
  30. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  31. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  32. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  33. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.js +4 -4
  34. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +5 -6
  35. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  36. package/dist/components/Company/Industry/Context.js +6 -7
  37. package/dist/components/Company/Industry/Context.js.map +1 -1
  38. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
  39. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  40. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
  41. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  42. package/dist/components/Company/OnboardingOverview/context.js +3 -4
  43. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  44. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js +5 -5
  45. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
  46. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  47. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
  48. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  49. package/dist/components/Contractor/Address/useAddress.js +5 -6
  50. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  51. package/dist/components/Contractor/Profile/useContractorProfile.js +33 -34
  52. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  53. package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.js +14 -11
  54. package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.js.map +1 -1
  55. package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.js +0 -2
  56. package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.js.map +1 -1
  57. package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js +18 -18
  58. package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js.map +1 -1
  59. package/dist/components/Employee/Compensation/onboarding/JobsList/JobsListPresentation.js +36 -36
  60. package/dist/components/Employee/Compensation/onboarding/JobsList/JobsListPresentation.js.map +1 -1
  61. package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js +4 -4
  62. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js +140 -140
  63. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -1
  64. package/dist/components/Employee/Compensation/shared/useJobForm/fields.js +6 -6
  65. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.d.ts +6 -5
  66. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js +162 -131
  67. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js.map +1 -1
  68. package/dist/components/Employee/Dashboard/BasicDetailsView.js +74 -88
  69. package/dist/components/Employee/Dashboard/BasicDetailsView.js.map +1 -1
  70. package/dist/components/Employee/Dashboard/Dashboard.js +53 -51
  71. package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
  72. package/dist/components/Employee/Dashboard/DocumentsView.js +17 -10
  73. package/dist/components/Employee/Dashboard/DocumentsView.js.map +1 -1
  74. package/dist/components/Employee/Dashboard/JobAndPayView.js +383 -357
  75. package/dist/components/Employee/Dashboard/JobAndPayView.js.map +1 -1
  76. package/dist/components/Employee/Dashboard/TaxesView.js +114 -101
  77. package/dist/components/Employee/Dashboard/TaxesView.js.map +1 -1
  78. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js +36 -36
  79. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js.map +1 -1
  80. package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.js +57 -57
  81. package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.js.map +1 -1
  82. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.d.ts +14 -5
  83. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js +55 -36
  84. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js.map +1 -1
  85. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js +8 -8
  86. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js +18 -18
  87. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js.map +1 -1
  88. package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js +4 -4
  89. package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.d.ts +3 -3
  90. package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.js.map +1 -1
  91. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  92. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  93. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/fields.js +1 -1
  94. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.js +4 -4
  95. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js +157 -147
  96. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js.map +1 -1
  97. package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js +56 -55
  98. package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js.map +1 -1
  99. package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js +20 -20
  100. package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js.map +1 -1
  101. package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js +1 -1
  102. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.d.ts +1 -1
  103. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js +4 -4
  104. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js.map +1 -1
  105. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.js +8 -8
  106. package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js +5 -5
  107. package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.d.ts +0 -1
  108. package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.js +11 -12
  109. package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.js.map +1 -1
  110. package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.test.d.ts +1 -0
  111. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.d.ts +6 -1
  112. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js +95 -94
  113. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js.map +1 -1
  114. package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.js +4 -4
  115. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.d.ts +6 -1
  116. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js +87 -86
  117. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js.map +1 -1
  118. package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js +18 -18
  119. package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js.map +1 -1
  120. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js +8 -8
  121. package/dist/components/Employee/Taxes/useTaxes.js +3 -4
  122. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  123. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js +5 -1
  124. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js.map +1 -1
  125. package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js +61 -60
  126. package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js.map +1 -1
  127. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +2 -3
  128. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
  129. package/dist/components/Payroll/usePreparedPayrollData.js +2 -3
  130. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  131. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js +6 -7
  132. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js.map +1 -1
  133. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.d.ts +1 -1
  134. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js +52 -68
  135. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js.map +1 -1
  136. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.module.scss.js +4 -4
  137. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentationTypes.d.ts +0 -11
  138. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js +137 -163
  139. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js.map +1 -1
  140. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js +36 -35
  141. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js.map +1 -1
  142. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js +34 -34
  143. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js.map +1 -1
  144. package/dist/helpers/breadcrumbHelpers.d.ts +1 -1
  145. package/dist/helpers/breadcrumbHelpers.js.map +1 -1
  146. package/dist/helpers/federalEin.d.ts +1 -0
  147. package/dist/helpers/federalEin.js.map +1 -1
  148. package/dist/helpers/mask.d.ts +8 -4
  149. package/dist/helpers/mask.js.map +1 -1
  150. package/dist/helpers/rem.d.ts +2 -1
  151. package/dist/helpers/rem.js.map +1 -1
  152. package/dist/hooks/useAsyncError.d.ts +1 -0
  153. package/dist/hooks/useAsyncError.js.map +1 -1
  154. package/dist/hooks/useForkRef/useForkRef.d.ts +1 -0
  155. package/dist/hooks/useForkRef/useForkRef.js.map +1 -1
  156. package/dist/i18n/I18n.d.ts +9 -1
  157. package/dist/i18n/I18n.js.map +1 -1
  158. package/dist/i18n/en/Company.TimeOff.EmployeeTable.json.js +14 -14
  159. package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js +12 -18
  160. package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js.map +1 -1
  161. package/dist/i18n/en/Employee.Compensation.json.js +24 -24
  162. package/dist/i18n/en/Employee.Dashboard.json.js +22 -20
  163. package/dist/i18n/en/Employee.Dashboard.json.js.map +1 -1
  164. package/dist/i18n/en/Employee.PaymentMethod.json.js +25 -25
  165. package/dist/i18n/en/Employee.StateTaxes.json.js +12 -10
  166. package/dist/i18n/en/Employee.StateTaxes.json.js.map +1 -1
  167. package/dist/style.css +1 -1
  168. package/dist/types/hooks.d.ts +1 -1
  169. package/dist/types/i18next.d.ts +4 -17
  170. package/dist/types/observability.d.ts +1 -1
  171. package/package.json +30 -27
  172. package/dist/components/Employee/Dashboard/CompensationCard.d.ts +0 -13
@@ -1,444 +1,453 @@
1
- import { jsxs as d, jsx as n } from "react/jsx-runtime";
2
- import { useCallback as ue, useState as O } from "react";
3
- import { useTranslation as E } from "react-i18next";
4
- import { useGustoEmbeddedContext as on } from "@gusto/embedded-api/react-query/_context";
5
- import { payrollsGetPayStub as an } from "@gusto/embedded-api/funcs/payrollsGetPayStub";
6
- import { useErrorBoundary as rn } from "react-error-boundary";
7
- import { useJobsAndCompensationsDeleteMutation as sn } from "@gusto/embedded-api/react-query/jobsAndCompensationsDelete";
8
- import { usePendingChangeDetailRenderer as dn } from "./usePendingChangeDetailRenderer.js";
9
- import { PendingChangesReviewModal as cn } from "./PendingChangesReviewModal.js";
10
- import me from "./JobAndPayView.module.scss.js";
11
- import { Flex as c } from "../../Common/Flex/Flex.js";
12
- import { useComponentContext as ln } from "../../../contexts/ComponentAdapter/useComponentContext.js";
1
+ import { jsx as t, jsxs as f, Fragment as rn } from "react/jsx-runtime";
2
+ import { useCallback as pe, useState as R, useEffect as dn } from "react";
3
+ import { useTranslation as k } from "react-i18next";
4
+ import { useGustoEmbeddedContext as cn } from "@gusto/embedded-api/react-query/_context";
5
+ import { payrollsGetPayStub as ln } from "@gusto/embedded-api/funcs/payrollsGetPayStub";
6
+ import { useErrorBoundary as un } from "react-error-boundary";
7
+ import { useJobsAndCompensationsDeleteMutation as mn } from "@gusto/embedded-api/react-query/jobsAndCompensationsDelete";
8
+ import { usePendingChangeDetailRenderer as pn } from "./usePendingChangeDetailRenderer.js";
9
+ import { PendingChangesReviewModal as yn } from "./PendingChangesReviewModal.js";
10
+ import ye from "./JobAndPayView.module.scss.js";
11
+ import { Flex as j } from "../../Common/Flex/Flex.js";
12
+ import { useComponentContext as bn } from "../../../contexts/ComponentAdapter/useComponentContext.js";
13
13
  import "classnames";
14
- import { componentEvents as P, FlsaStatus as pe, PAYMENT_METHODS as un } from "../../../shared/constants.js";
14
+ import { componentEvents as P, FlsaStatus as be, PAYMENT_METHODS as gn } from "../../../shared/constants.js";
15
15
  import { Loading as v } from "../../Common/Loading/Loading.js";
16
- import { EmptyData as R } from "../../Common/EmptyData/EmptyData.js";
17
- import { BaseLayout as mn } from "../../Base/Base.js";
18
- import { composeErrorHandler as pn } from "../../../partner-hook-utils/composeErrorHandler.js";
19
- import { readableStreamToBlob as yn } from "../../../helpers/readableStreamToBlob.js";
20
- import { formatDateToStringDate as bn, formatDateLongWithYear as j } from "../../../helpers/dateFormatting.js";
21
- import { useFormatCompensationRate as gn } from "../../../helpers/formattedStrings.js";
22
- import ye from "../../../hooks/useNumberFormatter.js";
23
- import { useI18n as _ } from "../../../i18n/I18n.js";
24
- import { useDeleteBankAccount as hn } from "../PaymentMethod/shared/useDeleteBankAccount.js";
25
- import { DeleteBankAccountDialog as fn } from "../PaymentMethod/shared/DeleteBankAccountDialog.js";
26
- import { usePaymentMethodList as Pn } from "../PaymentMethod/shared/usePaymentMethodList.js";
27
- import { useDeductionsList as An } from "../Deductions/shared/useDeductionsList.js";
28
- import { useDeleteDeduction as Cn } from "../Deductions/shared/useDeleteDeduction.js";
29
- import { DeleteDeductionDialog as Dn } from "../Deductions/shared/DeleteDeductionDialog.js";
30
- import { formatDeductionAmount as jn } from "../Deductions/shared/formatDeductionAmount.js";
31
- import x from "../../../assets/icons/plus-circle.svg.js";
32
- import Ln from "../../../assets/icons/percent-circle.svg.js";
33
- import wn from "../../../assets/icons/download-cloud.svg.js";
34
- import H from "../../../assets/icons/trashcan.svg.js";
35
- import be from "../../../assets/icons/pencil.svg.js";
36
- import { useEmployeeCompensation as En } from "./hooks/useEmployeeCompensation.js";
37
- import { VisuallyHidden as vn } from "../../Common/VisuallyHidden/VisuallyHidden.js";
38
- import { HamburgerMenu as F } from "../../Common/HamburgerMenu/HamburgerMenu.js";
39
- import { useDataView as k } from "../../Common/DataView/useDataView.js";
40
- import { DataView as T } from "../../Common/DataView/DataView.js";
41
- function ge(s) {
42
- if (s === void 0) return null;
43
- const u = parseFloat(s);
16
+ import { EmptyData as _ } from "../../Common/EmptyData/EmptyData.js";
17
+ import { BaseLayout as hn } from "../../Base/Base.js";
18
+ import { composeErrorHandler as fn } from "../../../partner-hook-utils/composeErrorHandler.js";
19
+ import { readableStreamToBlob as Pn } from "../../../helpers/readableStreamToBlob.js";
20
+ import { formatDateToStringDate as Cn, formatDateLongWithYear as L } from "../../../helpers/dateFormatting.js";
21
+ import { useFormatCompensationRate as An } from "../../../helpers/formattedStrings.js";
22
+ import ge from "../../../hooks/useNumberFormatter.js";
23
+ import { useI18n as F } from "../../../i18n/I18n.js";
24
+ import { useDeleteBankAccount as Dn } from "../PaymentMethod/shared/useDeleteBankAccount.js";
25
+ import { DeleteBankAccountDialog as jn } from "../PaymentMethod/shared/DeleteBankAccountDialog.js";
26
+ import { usePaymentMethodList as Ln } from "../PaymentMethod/shared/usePaymentMethodList.js";
27
+ import { useDeductionsList as wn } from "../Deductions/shared/useDeductionsList.js";
28
+ import { useDeleteDeduction as En } from "../Deductions/shared/useDeleteDeduction.js";
29
+ import { DeleteDeductionDialog as kn } from "../Deductions/shared/DeleteDeductionDialog.js";
30
+ import { formatDeductionAmount as vn } from "../Deductions/shared/formatDeductionAmount.js";
31
+ import U from "../../../assets/icons/plus-circle.svg.js";
32
+ import Un from "../../../assets/icons/percent-circle.svg.js";
33
+ import Sn from "../../../assets/icons/download-cloud.svg.js";
34
+ import V from "../../../assets/icons/trashcan.svg.js";
35
+ import he from "../../../assets/icons/pencil.svg.js";
36
+ import { useEmployeeCompensation as Bn } from "./hooks/useEmployeeCompensation.js";
37
+ import { VisuallyHidden as Jn } from "../../Common/VisuallyHidden/VisuallyHidden.js";
38
+ import { HamburgerMenu as Y } from "../../Common/HamburgerMenu/HamburgerMenu.js";
39
+ import { useDataView as S } from "../../Common/DataView/useDataView.js";
40
+ import { DataView as B } from "../../Common/DataView/DataView.js";
41
+ function fe(r) {
42
+ if (r === void 0) return null;
43
+ const u = parseFloat(r);
44
44
  return Number.isFinite(u) ? u : null;
45
45
  }
46
- function bt({
47
- employeeId: s,
46
+ function Ct({
47
+ employeeId: r,
48
48
  onEvent: u,
49
- onEditCompensation: V,
50
- onAddJob: he,
51
- onAddAnotherJob: fe,
52
- onAddDeduction: Pe,
53
- onEditDeduction: Ae
49
+ onEditCompensation: W,
50
+ onAddJob: Pe,
51
+ onAddAnotherJob: Ce,
52
+ onAddDeduction: Ae,
53
+ onEditDeduction: De
54
54
  }) {
55
- _("Employee.PaymentMethod"), _("Employee.Compensation"), _("Employee.Deductions");
56
- const { t } = E("Employee.Dashboard"), { t: A } = E("Employee.PaymentMethod"), { t: Ce } = E("Employee.Compensation"), { t: S } = E("Employee.Deductions"), o = ln(), Y = gn(), B = ye("currency"), De = ye("percent"), W = on(), { showBoundary: I } = rn(), y = En({ employeeId: s }), {
57
- jobs: C,
58
- primaryFlsaStatus: je,
59
- pendingChanges: G,
60
- hasMultipleJobs: Le,
61
- payStubs: we,
62
- employeeFirstName: U
63
- } = y.data, Ee = y.pagination.payStubs, q = y.status.cancellingCompensationUuid, { cancelPendingChange: K } = y.actions, N = y.status.isCompensationLoading, ve = y.status.isPayStubsLoading, X = ue(
55
+ F("Employee.PaymentMethod"), F("Employee.Compensation"), F("Employee.Deductions");
56
+ const { t: n } = k("Employee.Dashboard"), { t: C } = k("Employee.PaymentMethod"), { t: je } = k("Employee.Compensation"), { t: J } = k("Employee.Deductions"), i = bn(), I = An(), N = ge("currency"), Le = ge("percent"), G = cn(), { showBoundary: q } = un(), p = Bn({ employeeId: r }), {
57
+ jobs: A,
58
+ primaryFlsaStatus: we,
59
+ pendingChanges: K,
60
+ hasMultipleJobs: Ee,
61
+ payStubs: ke,
62
+ employeeFirstName: x
63
+ } = p.data, ve = p.pagination.payStubs, z = p.status.cancellingCompensationUuid, { cancelPendingChange: X } = p.actions, T = p.status.isCompensationLoading, Ue = p.status.isPayStubsLoading, $ = pe(
64
64
  async (e) => {
65
- await K(e) && u(P.EMPLOYEE_COMPENSATION_CHANGE_CANCELLED, {
66
- employeeId: s,
65
+ await X(e) && u(P.EMPLOYEE_COMPENSATION_CHANGE_CANCELLED, {
66
+ employeeId: r,
67
67
  compensationId: e.compensationUuid
68
68
  });
69
69
  },
70
- [K, u, s]
71
- ), [xe, z] = O(
70
+ [X, u, r]
71
+ ), [Se, Q] = R(
72
72
  () => /* @__PURE__ */ new Set()
73
- ), ke = ue(
73
+ ), Be = pe(
74
74
  async (e) => {
75
- const i = window.open("", "_blank"), f = t("jobAndPay.paystubs.downloadLoadingMessage");
76
- if (i) {
77
- const r = i.document;
78
- r.title = f;
79
- const m = r.createElement("style");
80
- m.textContent = "body{font-family:system-ui,-apple-system,sans-serif;display:flex;align-items:center;justify-content:center;height:100vh;margin:0;color:#444;gap:12px}.spinner{width:20px;height:20px;border:2px solid #ccc;border-top-color:#444;border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}", r.head.appendChild(m);
81
- const g = r.createElement("div");
75
+ const o = window.open("", "_blank"), d = n("jobAndPay.paystubs.downloadLoadingMessage");
76
+ if (o) {
77
+ const a = o.document;
78
+ a.title = d;
79
+ const c = a.createElement("style");
80
+ c.textContent = "body{font-family:system-ui,-apple-system,sans-serif;display:flex;align-items:center;justify-content:center;height:100vh;margin:0;color:#444;gap:12px}.spinner{width:20px;height:20px;border:2px solid #ccc;border-top-color:#444;border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}", a.head.appendChild(c);
81
+ const g = a.createElement("div");
82
82
  g.className = "spinner", g.setAttribute("aria-hidden", "true");
83
- const le = r.createElement("span");
84
- le.textContent = f, r.body.replaceChildren(g, le);
83
+ const me = a.createElement("span");
84
+ me.textContent = d, a.body.replaceChildren(g, me);
85
85
  }
86
- z((r) => {
87
- const m = new Set(r);
88
- return m.add(e), m;
86
+ Q((a) => {
87
+ const c = new Set(a);
88
+ return c.add(e), c;
89
89
  });
90
90
  try {
91
- const r = await an(W, {
91
+ const a = await ln(G, {
92
92
  payrollId: e,
93
- employeeId: s
93
+ employeeId: r
94
94
  });
95
- if (!r.value?.responseStream)
96
- throw new Error(t("jobAndPay.paystubs.downloadError"));
97
- const m = await yn(r.value.responseStream, "application/pdf"), g = URL.createObjectURL(m);
98
- i ? (i.addEventListener("load", () => {
95
+ if (!a.value?.responseStream)
96
+ throw new Error(n("jobAndPay.paystubs.downloadError"));
97
+ const c = await Pn(a.value.responseStream, "application/pdf"), g = URL.createObjectURL(c);
98
+ o ? (o.addEventListener("load", () => {
99
99
  URL.revokeObjectURL(g);
100
- }), i.location.href = g) : URL.revokeObjectURL(g);
101
- } catch (r) {
102
- i && i.close(), I(r instanceof Error ? r : new Error(String(r)));
100
+ }), o.location.href = g) : URL.revokeObjectURL(g);
101
+ } catch (a) {
102
+ o && o.close(), q(a instanceof Error ? a : new Error(String(a)));
103
103
  } finally {
104
- z((r) => {
105
- const m = new Set(r);
106
- return m.delete(e), m;
104
+ Q((a) => {
105
+ const c = new Set(a);
106
+ return c.delete(e), c;
107
107
  });
108
108
  }
109
109
  },
110
- [W, s, t, I]
111
- ), [D, J] = O(null), { mutateAsync: Te, isPending: $ } = sn(), Se = async () => {
110
+ [G, r, n, q]
111
+ ), [D, M] = R(null), { mutateAsync: Je, isPending: Z } = mn(), Ne = async () => {
112
112
  if (!D) return;
113
113
  const e = D.uuid;
114
- await Te({ request: { jobId: e } }), u(P.EMPLOYEE_JOB_DELETED, { employeeId: s, jobId: e }), J(null);
115
- }, a = C.length === 1 ? C[0] : void 0, h = Le, Be = bn(/* @__PURE__ */ new Date()) ?? "", Ue = C.find((e) => e.primary)?.compensations?.some(
116
- (e) => e.effectiveDate !== void 0 && e.effectiveDate > Be && e.flsaStatus !== pe.NONEXEMPT
117
- ) ?? !1, Ne = C.length >= 1 && je === pe.NONEXEMPT && !Ue, Q = a ? ge(a.rate) : null, Z = a?.compensations?.find(
118
- (e) => e.uuid === a.currentCompensationUuid
119
- ), Je = Z?.effectiveDate ? /* @__PURE__ */ d(c, { flexDirection: "column", gap: 0, children: [
120
- /* @__PURE__ */ n(o.Text, { variant: "supporting", children: t("jobAndPay.compensation.effectiveDate") }),
121
- /* @__PURE__ */ n(o.Text, { children: j(Z.effectiveDate) })
122
- ] }) : null, [Me, ee] = O(!1), Oe = dn(U), Re = G.filter((e) => e.isNewJob), L = G.filter((e) => !e.isNewJob), M = new Set(Re.map((e) => e.jobUuid)), _e = a ? M.has(a.uuid) : !1, He = M.size > 0, ne = L.length > 0, te = h && L.length > 1, Fe = ne && !te, b = L[0], l = Pn({ employeeId: s }), oe = l.isLoading ? void 0 : l.data.paymentMethod, w = l.isLoading ? [] : l.data.bankAccounts, Ve = l.isLoading ? void 0 : l.status.deletePendingBankAccountUuid, { pendingDeleteAccount: ie, setPendingDeleteAccount: ae, handleConfirmDelete: Ye } = hn(async (e) => {
114
+ await Je({ request: { jobId: e } }), u(P.EMPLOYEE_JOB_DELETED, { employeeId: r, jobId: e }), M(null);
115
+ }, s = A.length === 1 ? A[0] : void 0, h = Ee, xe = Cn(/* @__PURE__ */ new Date()) ?? "", Te = A.find((e) => e.primary)?.compensations?.some(
116
+ (e) => e.effectiveDate !== void 0 && e.effectiveDate > xe && e.flsaStatus !== be.NONEXEMPT
117
+ ) ?? !1, Me = A.length >= 1 && we === be.NONEXEMPT && !Te, ee = s ? fe(s.rate) : null, ne = s?.compensations?.find(
118
+ (e) => e.uuid === s.currentCompensationUuid
119
+ ), w = /* @__PURE__ */ t("span", { "aria-label": n("listEmptyPlaceholder"), children: "–" }), Oe = s?.paymentUnit ? s.paymentUnit === "Hour" ? n("jobAndPay.compensation.types.hourly") : s.paymentUnit === "Salary" || s.paymentUnit === "Year" ? n("jobAndPay.compensation.types.salary") : s.paymentUnit : null, [He, O] = R(!1), Re = pn(x), _e = K.filter((e) => e.isNewJob), y = K.filter((e) => !e.isNewJob);
120
+ dn(() => {
121
+ y.length === 0 && O(!1);
122
+ }, [y.length]);
123
+ const H = new Set(_e.map((e) => e.jobUuid)), Fe = s ? H.has(s.uuid) : !1, Ve = H.size > 0, te = new Set(y.map((e) => e.jobUuid)), Ye = s ? te.has(s.uuid) : !1, oe = y.length > 0, ie = h && y.length > 1, We = oe && !ie, b = y[0], l = Ln({ employeeId: r }), ae = l.isLoading ? void 0 : l.data.paymentMethod, E = l.isLoading ? [] : l.data.bankAccounts, Ie = l.isLoading ? void 0 : l.status.deletePendingBankAccountUuid, { pendingDeleteAccount: se, setPendingDeleteAccount: re, handleConfirmDelete: Ge } = Dn(async (e) => {
123
124
  if (l.isLoading) return;
124
- const i = await l.actions.onDelete(e);
125
- i && u(P.EMPLOYEE_BANK_ACCOUNT_DELETED, i.data);
126
- }), p = An({ employeeId: s }), We = p.isLoading ? [] : p.data.deductions, re = p.isLoading ? void 0 : p.status.deletingGarnishmentUuid, {
127
- pendingDeleteDeduction: se,
128
- setPendingDeleteDeduction: de,
129
- handleConfirmDelete: Ie
130
- } = Cn(async (e) => {
131
- if (p.isLoading) return;
132
- const i = await p.actions.onDelete(e);
133
- i && u(P.EMPLOYEE_DEDUCTION_DELETED, i.data.garnishment);
134
- }), Ge = pn([y, l, p]), qe = [
125
+ const o = await l.actions.onDelete(e);
126
+ o && u(P.EMPLOYEE_BANK_ACCOUNT_DELETED, o.data);
127
+ }), m = wn({ employeeId: r }), qe = m.isLoading ? [] : m.data.deductions, de = m.isLoading ? void 0 : m.status.deletingGarnishmentUuid, {
128
+ pendingDeleteDeduction: ce,
129
+ setPendingDeleteDeduction: le,
130
+ handleConfirmDelete: Ke
131
+ } = En(async (e) => {
132
+ if (m.isLoading) return;
133
+ const o = await m.actions.onDelete(e);
134
+ o && u(P.EMPLOYEE_DEDUCTION_DELETED, o.data.garnishment);
135
+ }), ze = fn([p, l, m]), Xe = [
135
136
  {
136
137
  key: "jobTitle",
137
- title: t("jobAndPay.compensation.columns.jobTitle"),
138
+ title: n("jobAndPay.compensation.columns.jobTitle"),
138
139
  render: (e) => {
139
- const i = ge(e.rate);
140
- return /* @__PURE__ */ d(c, { flexDirection: "column", gap: 0, children: [
141
- /* @__PURE__ */ n(o.Text, { children: e.title || "-" }),
142
- i !== null && e.paymentUnit ? /* @__PURE__ */ n(o.Text, { variant: "supporting", children: Y(i, e.paymentUnit) }) : null
140
+ const o = e.compensations?.find((a) => a.uuid === e.currentCompensationUuid), d = fe(e.rate);
141
+ return /* @__PURE__ */ f(rn, { children: [
142
+ o?.title || "-",
143
+ d !== null && e.paymentUnit ? /* @__PURE__ */ t(i.Text, { variant: "supporting", size: "sm", children: I(d, e.paymentUnit) }) : null
143
144
  ] });
144
145
  }
145
146
  },
146
147
  {
147
148
  key: "payType",
148
- title: t("jobAndPay.compensation.columns.payType"),
149
+ title: n("jobAndPay.compensation.columns.payType"),
149
150
  render: (e) => {
150
- const i = e.compensations?.find(
151
- (f) => f.uuid === e.currentCompensationUuid
151
+ const o = e.compensations?.find(
152
+ (d) => d.uuid === e.currentCompensationUuid
152
153
  )?.flsaStatus;
153
- return i !== void 0 ? Ce(`flsaStatusLabels.${i}`) : "-";
154
+ return o !== void 0 ? je(`flsaStatusLabels.${o}`) : "-";
154
155
  }
155
156
  },
156
157
  {
157
158
  key: "effectiveDate",
158
- title: t("jobAndPay.compensation.columns.effectiveDate"),
159
+ title: n("jobAndPay.compensation.columns.effectiveDate"),
159
160
  render: (e) => {
160
- const i = e.compensations?.find((f) => f.uuid === e.currentCompensationUuid);
161
- return i?.effectiveDate ? j(i.effectiveDate) : "-";
161
+ const o = e.compensations?.find((d) => d.uuid === e.currentCompensationUuid);
162
+ return o?.effectiveDate ? L(o.effectiveDate) : "-";
162
163
  }
163
164
  },
164
- ...He ? [
165
+ ...Ve ? [
165
166
  {
166
167
  key: "status",
167
- title: /* @__PURE__ */ n(vn, { children: t("jobAndPay.compensation.columns.status") }),
168
- render: (e) => M.has(e.uuid) ? /* @__PURE__ */ n(o.Badge, { status: "warning", children: t("jobAndPay.compensation.pendingStatus") }) : null
168
+ title: /* @__PURE__ */ t(Jn, { children: n("jobAndPay.compensation.columns.status") }),
169
+ render: (e) => H.has(e.uuid) ? /* @__PURE__ */ t(i.Badge, { status: "warning", children: n("jobAndPay.compensation.pendingStatus") }) : null
169
170
  }
170
171
  ] : []
171
- ], Ke = k({
172
- data: C,
173
- columns: qe,
174
- itemMenu: (e) => /* @__PURE__ */ n(
175
- F,
176
- {
177
- triggerLabel: t("jobAndPay.compensation.hamburgerTitle"),
178
- isLoading: $,
179
- items: [
172
+ ], $e = S({
173
+ data: A,
174
+ columns: Xe,
175
+ itemMenu: (e) => {
176
+ const d = [
177
+ ...te.has(e.uuid) ? [] : [
180
178
  {
181
- label: t("jobAndPay.compensation.editJobCta"),
182
- icon: /* @__PURE__ */ n(be, { "aria-hidden": !0 }),
179
+ label: n("jobAndPay.compensation.editJobCta"),
180
+ icon: /* @__PURE__ */ t(he, { "aria-hidden": !0 }),
183
181
  onClick: () => {
184
- V?.(e);
182
+ W?.(e);
185
183
  }
186
- },
187
- ...e.primary ? [] : [
188
- {
189
- label: t("jobAndPay.compensation.deleteJobCta"),
190
- icon: /* @__PURE__ */ n(H, { "aria-hidden": !0 }),
191
- onClick: () => {
192
- J({ uuid: e.uuid, title: e.title ?? "" });
193
- }
184
+ }
185
+ ],
186
+ ...e.primary ? [] : [
187
+ {
188
+ label: n("jobAndPay.compensation.deleteJobCta"),
189
+ icon: /* @__PURE__ */ t(V, { "aria-hidden": !0 }),
190
+ onClick: () => {
191
+ const a = e.compensations?.find(
192
+ (c) => c.uuid === e.currentCompensationUuid
193
+ );
194
+ M({ uuid: e.uuid, title: a?.title ?? "" });
194
195
  }
195
- ]
196
+ }
196
197
  ]
197
- }
198
- )
199
- }), Xe = [
198
+ ];
199
+ return d.length === 0 ? null : /* @__PURE__ */ t(
200
+ Y,
201
+ {
202
+ triggerLabel: n("jobAndPay.compensation.hamburgerTitle"),
203
+ isLoading: Z,
204
+ items: d
205
+ }
206
+ );
207
+ }
208
+ }), Qe = [
200
209
  {
201
210
  key: "nickname",
202
- title: t("jobAndPay.payment.nickname"),
211
+ title: n("jobAndPay.payment.nickname"),
203
212
  render: (e) => e.name || "-"
204
213
  },
205
214
  {
206
215
  key: "routingNumber",
207
- title: t("jobAndPay.payment.routingNumber"),
216
+ title: n("jobAndPay.payment.routingNumber"),
208
217
  render: (e) => e.routingNumber || "-"
209
218
  },
210
219
  {
211
220
  key: "accountType",
212
- title: t("jobAndPay.payment.accountType"),
221
+ title: n("jobAndPay.payment.accountType"),
213
222
  render: (e) => e.accountType || "-"
214
223
  }
215
- ], ze = [
224
+ ], Ze = [
216
225
  {
217
226
  key: "description",
218
- title: t("jobAndPay.deductions.deduction"),
227
+ title: n("jobAndPay.deductions.deduction"),
219
228
  render: (e) => e.description || "-"
220
229
  },
221
230
  {
222
231
  key: "frequency",
223
- title: t("jobAndPay.deductions.frequency"),
224
- render: (e) => e.recurring ? t("jobAndPay.deductions.recurring") : t("jobAndPay.deductions.oneTime")
232
+ title: n("jobAndPay.deductions.frequency"),
233
+ render: (e) => e.recurring ? n("jobAndPay.deductions.recurring") : n("jobAndPay.deductions.oneTime")
225
234
  },
226
235
  {
227
236
  key: "amount",
228
- title: t("jobAndPay.deductions.withhold"),
229
- render: (e) => jn(e, {
230
- formatCurrency: B,
231
- formatPercent: De,
232
- formatPerPaycheck: (i) => t("jobAndPay.deductions.amountPerPaycheck", { value: i })
237
+ title: n("jobAndPay.deductions.withhold"),
238
+ render: (e) => vn(e, {
239
+ formatCurrency: N,
240
+ formatPercent: Le,
241
+ formatPerPaycheck: (o) => n("jobAndPay.deductions.amountPerPaycheck", { value: o })
233
242
  })
234
243
  }
235
- ], $e = [
244
+ ], en = [
236
245
  {
237
246
  key: "payday",
238
- title: t("jobAndPay.paystubs.payday"),
239
- render: (e) => j(e.checkDate) || "-"
247
+ title: n("jobAndPay.paystubs.payday"),
248
+ render: (e) => L(e.checkDate) || "-"
240
249
  },
241
250
  {
242
251
  key: "checkAmount",
243
- title: t("jobAndPay.paystubs.checkAmount"),
252
+ title: n("jobAndPay.paystubs.checkAmount"),
244
253
  render: (e) => {
245
254
  if (!e.netPay) return "-";
246
- const i = parseFloat(e.netPay);
247
- return isNaN(i) ? "-" : B(i);
255
+ const o = parseFloat(e.netPay);
256
+ return isNaN(o) ? "-" : N(o);
248
257
  }
249
258
  },
250
259
  {
251
260
  key: "grossPay",
252
- title: t("jobAndPay.paystubs.grossPay"),
261
+ title: n("jobAndPay.paystubs.grossPay"),
253
262
  render: (e) => {
254
263
  if (!e.grossPay) return "-";
255
- const i = parseFloat(e.grossPay);
256
- return isNaN(i) ? "-" : B(i);
264
+ const o = parseFloat(e.grossPay);
265
+ return isNaN(o) ? "-" : N(o);
257
266
  }
258
267
  },
259
268
  {
260
269
  key: "paymentMethod",
261
- title: t("jobAndPay.paystubs.paymentMethod"),
262
- render: () => oe?.type || t("jobAndPay.paystubs.noPaymentMethod")
270
+ title: n("jobAndPay.paystubs.paymentMethod"),
271
+ render: () => ae?.type || n("jobAndPay.paystubs.noPaymentMethod")
263
272
  }
264
- ], Qe = k({
265
- data: w,
266
- columns: Xe,
267
- itemMenu: (e) => /* @__PURE__ */ n(
268
- F,
273
+ ], nn = S({
274
+ data: E,
275
+ columns: Qe,
276
+ itemMenu: (e) => /* @__PURE__ */ t(
277
+ Y,
269
278
  {
270
279
  items: [
271
280
  {
272
- label: A("deleteBankAccountCta"),
281
+ label: C("deleteBankAccountCta"),
273
282
  onClick: () => {
274
- ae({
283
+ re({
275
284
  uuid: e.uuid,
276
285
  hiddenAccountNumber: e.hiddenAccountNumber
277
286
  });
278
287
  },
279
- icon: /* @__PURE__ */ n(H, { "aria-hidden": !0 })
288
+ icon: /* @__PURE__ */ t(V, { "aria-hidden": !0 })
280
289
  }
281
290
  ],
282
- triggerLabel: A("hamburgerTitle")
291
+ triggerLabel: C("hamburgerTitle")
283
292
  }
284
293
  )
285
- }), Ze = k({
286
- data: We,
287
- columns: ze,
288
- itemMenu: (e) => /* @__PURE__ */ n(
289
- F,
294
+ }), tn = S({
295
+ data: qe,
296
+ columns: Ze,
297
+ itemMenu: (e) => /* @__PURE__ */ t(
298
+ Y,
290
299
  {
291
- isLoading: re === e.uuid,
300
+ isLoading: de === e.uuid,
292
301
  items: [
293
302
  {
294
- label: S("editCta"),
295
- onClick: () => Ae?.(e),
296
- icon: /* @__PURE__ */ n(be, { "aria-hidden": !0 })
303
+ label: J("editCta"),
304
+ onClick: () => De?.(e),
305
+ icon: /* @__PURE__ */ t(he, { "aria-hidden": !0 })
297
306
  },
298
307
  {
299
- label: S("deleteCta"),
308
+ label: J("deleteCta"),
300
309
  onClick: () => {
301
- de(e);
310
+ le(e);
302
311
  },
303
- icon: /* @__PURE__ */ n(H, { "aria-hidden": !0 })
312
+ icon: /* @__PURE__ */ t(V, { "aria-hidden": !0 })
304
313
  }
305
314
  ],
306
- triggerLabel: S("hamburgerTitle")
315
+ triggerLabel: J("hamburgerTitle")
307
316
  }
308
317
  ),
309
- emptyState: () => /* @__PURE__ */ n(
310
- R,
318
+ emptyState: () => /* @__PURE__ */ t(
319
+ _,
311
320
  {
312
- title: t("jobAndPay.deductions.emptyState.title"),
313
- description: t("jobAndPay.deductions.emptyState.description")
321
+ title: n("jobAndPay.deductions.emptyState.title"),
322
+ description: n("jobAndPay.deductions.emptyState.description")
314
323
  }
315
324
  )
316
- }), en = k({
317
- data: we,
318
- columns: $e,
319
- pagination: Ee,
325
+ }), on = S({
326
+ data: ke,
327
+ columns: en,
328
+ pagination: ve,
320
329
  itemMenu: (e) => {
321
- const i = !!e.payrollUuid && xe.has(e.payrollUuid);
322
- return /* @__PURE__ */ n(
323
- o.ButtonIcon,
330
+ const o = !!e.payrollUuid && Se.has(e.payrollUuid);
331
+ return /* @__PURE__ */ t(
332
+ i.ButtonIcon,
324
333
  {
325
334
  variant: "tertiary",
326
- "aria-label": t("jobAndPay.paystubs.downloadCta"),
335
+ "aria-label": n("jobAndPay.paystubs.downloadCta"),
327
336
  isDisabled: !e.payrollUuid,
328
- isLoading: i,
337
+ isLoading: o,
329
338
  onClick: () => {
330
- e.payrollUuid && ke(e.payrollUuid);
339
+ e.payrollUuid && Be(e.payrollUuid);
331
340
  },
332
- children: /* @__PURE__ */ n(wn, { "aria-hidden": !0 })
341
+ children: /* @__PURE__ */ t(Sn, { "aria-hidden": !0 })
333
342
  }
334
343
  );
335
344
  },
336
- emptyState: () => /* @__PURE__ */ n(
337
- R,
345
+ emptyState: () => /* @__PURE__ */ t(
346
+ _,
338
347
  {
339
- title: t("jobAndPay.paystubs.emptyState.title"),
340
- description: t("jobAndPay.paystubs.emptyState.description")
348
+ title: n("jobAndPay.paystubs.emptyState.title"),
349
+ description: n("jobAndPay.paystubs.emptyState.description")
341
350
  }
342
351
  )
343
- }), nn = l.isLoading && l.errorHandling.errors.length === 0, tn = p.isLoading && p.errorHandling.errors.length === 0, ce = oe?.type === un.directDeposit;
344
- return /* @__PURE__ */ n(mn, { error: Ge.errors, children: /* @__PURE__ */ d(c, { flexDirection: "column", gap: 24, children: [
345
- /* @__PURE__ */ n(
346
- o.Box,
352
+ }), an = l.isLoading && l.errorHandling.errors.length === 0, sn = m.isLoading && m.errorHandling.errors.length === 0, ue = ae?.type === gn.directDeposit;
353
+ return /* @__PURE__ */ t(hn, { error: ze.errors, children: /* @__PURE__ */ f(j, { flexDirection: "column", gap: 24, children: [
354
+ /* @__PURE__ */ t(
355
+ i.Box,
347
356
  {
348
357
  withPadding: !h,
349
- header: /* @__PURE__ */ n(
350
- o.BoxHeader,
358
+ header: /* @__PURE__ */ t(
359
+ i.BoxHeader,
351
360
  {
352
- title: t("jobAndPay.compensation.title"),
361
+ title: n("jobAndPay.compensation.title"),
353
362
  action: (
354
363
  // While the compensation card is loading we don't yet
355
364
  // know if the employee has jobs — suppress the action
356
365
  // so we don't surface an "Add job" CTA against an
357
366
  // employee who already has one.
358
- N || h ? null : a ? /* @__PURE__ */ n(
359
- o.Button,
367
+ T || h ? null : s ? Ye ? null : /* @__PURE__ */ t(
368
+ i.Button,
360
369
  {
361
370
  variant: "secondary",
362
371
  onClick: () => {
363
- V?.(a);
372
+ W?.(s);
364
373
  },
365
- children: t("jobAndPay.compensation.editCta")
374
+ children: n("jobAndPay.compensation.editCta")
366
375
  }
367
- ) : /* @__PURE__ */ n(
368
- o.Button,
376
+ ) : /* @__PURE__ */ t(
377
+ i.Button,
369
378
  {
370
379
  variant: "secondary",
371
- onClick: he,
372
- icon: /* @__PURE__ */ n(x, {}),
373
- children: t("jobAndPay.compensation.addJobCta")
380
+ onClick: Pe,
381
+ icon: /* @__PURE__ */ t(U, {}),
382
+ children: n("jobAndPay.compensation.addJobCta")
374
383
  }
375
384
  )
376
385
  )
377
386
  }
378
387
  ),
379
- footer: !N && Ne ? /* @__PURE__ */ n(
380
- o.Button,
388
+ footer: !T && Me ? /* @__PURE__ */ t(
389
+ i.Button,
381
390
  {
382
391
  variant: "secondary",
383
- onClick: fe,
384
- icon: /* @__PURE__ */ n(x, {}),
385
- children: t("jobAndPay.compensation.addAnotherJobCta")
392
+ onClick: Ce,
393
+ icon: /* @__PURE__ */ t(U, {}),
394
+ children: n("jobAndPay.compensation.addAnotherJobCta")
386
395
  }
387
396
  ) : void 0,
388
- children: N ? /* @__PURE__ */ n(v, {}) : /* @__PURE__ */ d(c, { flexDirection: "column", gap: 16, children: [
389
- ne && /* @__PURE__ */ n(
397
+ children: T ? /* @__PURE__ */ t(v, {}) : /* @__PURE__ */ f(j, { flexDirection: "column", gap: 16, children: [
398
+ oe && /* @__PURE__ */ t(
390
399
  "div",
391
400
  {
392
- className: [me.alertWrapper, h && me.alertWrapperPadded].filter(Boolean).join(" "),
393
- children: /* @__PURE__ */ d(c, { flexDirection: "column", gap: 16, children: [
394
- Fe && b && /* @__PURE__ */ n(
395
- o.Alert,
401
+ className: [ye.alertWrapper, h && ye.alertWrapperPadded].filter(Boolean).join(" "),
402
+ children: /* @__PURE__ */ f(j, { flexDirection: "column", gap: 16, children: [
403
+ We && b && /* @__PURE__ */ t(
404
+ i.Alert,
396
405
  {
397
406
  status: "warning",
398
407
  disableScrollIntoView: !0,
399
- label: h ? t("jobAndPay.compensation.pendingChange.alertLabelWithJob", {
408
+ label: h ? n("jobAndPay.compensation.pendingChange.alertLabelWithJob", {
400
409
  jobTitle: b.jobTitle,
401
- date: j(b.effectiveDate)
402
- }) : t("jobAndPay.compensation.pendingChange.alertLabel", {
403
- date: j(b.effectiveDate)
410
+ date: L(b.effectiveDate)
411
+ }) : n("jobAndPay.compensation.pendingChange.alertLabel", {
412
+ date: L(b.effectiveDate)
404
413
  }),
405
- children: /* @__PURE__ */ d(c, { flexDirection: "column", gap: 12, children: [
406
- /* @__PURE__ */ n(
407
- o.UnorderedList,
414
+ children: /* @__PURE__ */ f(j, { flexDirection: "column", gap: 12, children: [
415
+ /* @__PURE__ */ t(
416
+ i.UnorderedList,
408
417
  {
409
- items: b.details.map((e) => Oe(e))
418
+ items: b.details.map((e) => Re(e))
410
419
  }
411
420
  ),
412
- /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
413
- o.Button,
421
+ /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
422
+ i.Button,
414
423
  {
415
424
  variant: "secondary",
416
- isLoading: q === b.compensationUuid,
425
+ isLoading: z === b.compensationUuid,
417
426
  onClick: () => {
418
- X(b);
427
+ $(b);
419
428
  },
420
- children: t("jobAndPay.compensation.pendingChange.cancelCta")
429
+ children: n("jobAndPay.compensation.pendingChange.cancelCta")
421
430
  }
422
431
  ) })
423
432
  ] })
424
433
  }
425
434
  ),
426
- te && /* @__PURE__ */ n(
427
- o.Alert,
435
+ ie && /* @__PURE__ */ t(
436
+ i.Alert,
428
437
  {
429
438
  status: "warning",
430
439
  disableScrollIntoView: !0,
431
- label: t("jobAndPay.compensation.pendingChange.summaryLabel", {
432
- name: U ?? ""
440
+ label: n("jobAndPay.compensation.pendingChange.summaryLabel", {
441
+ name: x ?? ""
433
442
  }),
434
- action: /* @__PURE__ */ n(
435
- o.Button,
443
+ action: /* @__PURE__ */ t(
444
+ i.Button,
436
445
  {
437
446
  variant: "secondary",
438
447
  onClick: () => {
439
- ee(!0);
448
+ O(!0);
440
449
  },
441
- children: t("jobAndPay.compensation.pendingChange.reviewCta")
450
+ children: n("jobAndPay.compensation.pendingChange.reviewCta")
442
451
  }
443
452
  )
444
453
  }
@@ -446,182 +455,199 @@ function bt({
446
455
  ] })
447
456
  }
448
457
  ),
449
- h ? /* @__PURE__ */ n(
450
- T,
458
+ h ? /* @__PURE__ */ t(
459
+ B,
451
460
  {
452
- label: t("jobAndPay.compensation.tableLabel"),
461
+ label: n("jobAndPay.compensation.tableLabel"),
453
462
  isWithinBox: !0,
454
- ...Ke
463
+ ...$e
455
464
  }
456
- ) : a ? /* @__PURE__ */ d(c, { flexDirection: "column", gap: 12, children: [
457
- a.title && /* @__PURE__ */ d(c, { flexDirection: "column", gap: 0, children: [
458
- /* @__PURE__ */ n(o.Text, { variant: "supporting", children: t("jobAndPay.compensation.jobTitle") }),
459
- /* @__PURE__ */ n(o.Text, { children: a.title })
460
- ] }),
461
- a.paymentUnit && /* @__PURE__ */ d(c, { flexDirection: "column", gap: 0, children: [
462
- /* @__PURE__ */ n(o.Text, { variant: "supporting", children: t("jobAndPay.compensation.type") }),
463
- /* @__PURE__ */ n(o.Text, { children: a.paymentUnit === "Hour" ? t("jobAndPay.compensation.types.hourly") : a.paymentUnit === "Salary" || a.paymentUnit === "Year" ? t("jobAndPay.compensation.types.salary") : a.paymentUnit })
464
- ] }),
465
- Q !== null && a.paymentUnit && /* @__PURE__ */ d(c, { flexDirection: "column", gap: 0, children: [
466
- /* @__PURE__ */ n(o.Text, { variant: "supporting", children: t("jobAndPay.compensation.wage") }),
467
- /* @__PURE__ */ n(o.Text, { children: Y(Q, a.paymentUnit) })
468
- ] }),
469
- Je,
470
- _e && /* @__PURE__ */ d(c, { flexDirection: "column", gap: 0, children: [
471
- /* @__PURE__ */ n(o.Text, { variant: "supporting", children: t("jobAndPay.compensation.columns.status") }),
472
- /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(o.Badge, { status: "warning", children: t("jobAndPay.compensation.pendingStatus") }) })
473
- ] })
474
- ] }) : /* @__PURE__ */ n(
475
- R,
465
+ ) : s ? /* @__PURE__ */ t(
466
+ i.DescriptionList,
467
+ {
468
+ items: [
469
+ {
470
+ term: n("jobAndPay.compensation.jobTitle"),
471
+ description: s.title || w
472
+ },
473
+ {
474
+ term: n("jobAndPay.compensation.type"),
475
+ description: Oe || w
476
+ },
477
+ {
478
+ term: n("jobAndPay.compensation.wage"),
479
+ description: ee !== null && s.paymentUnit ? I(ee, s.paymentUnit) : w
480
+ },
481
+ {
482
+ term: n("jobAndPay.compensation.effectiveDate"),
483
+ description: ne?.effectiveDate ? L(ne.effectiveDate) : w
484
+ },
485
+ ...Fe ? [
486
+ {
487
+ term: n("jobAndPay.compensation.columns.status"),
488
+ description: /* @__PURE__ */ t(i.Badge, { status: "warning", children: n("jobAndPay.compensation.pendingStatus") })
489
+ }
490
+ ] : []
491
+ ]
492
+ }
493
+ ) : /* @__PURE__ */ t(
494
+ _,
476
495
  {
477
- title: t("jobAndPay.compensation.emptyState.title"),
478
- description: t("jobAndPay.compensation.emptyState.description")
496
+ title: n("jobAndPay.compensation.emptyState.title"),
497
+ description: n("jobAndPay.compensation.emptyState.description")
479
498
  }
480
499
  )
481
500
  ] })
482
501
  }
483
502
  ),
484
- /* @__PURE__ */ n(
485
- o.Box,
503
+ /* @__PURE__ */ t(
504
+ i.Box,
486
505
  {
487
- withPadding: w.length === 0,
488
- header: /* @__PURE__ */ n(
489
- o.BoxHeader,
506
+ withPadding: E.length === 0,
507
+ header: /* @__PURE__ */ t(
508
+ i.BoxHeader,
490
509
  {
491
- title: t("jobAndPay.payment.title"),
492
- action: /* @__PURE__ */ d(c, { gap: 8, alignItems: "center", justifyContent: "flex-end", children: [
493
- ce && w.length > 1 && /* @__PURE__ */ n(
494
- o.Button,
510
+ title: n("jobAndPay.payment.title"),
511
+ action: /* @__PURE__ */ f(j, { gap: 8, alignItems: "center", justifyContent: "flex-end", children: [
512
+ ue && E.length > 1 && /* @__PURE__ */ t(
513
+ i.Button,
495
514
  {
496
515
  variant: "secondary",
497
516
  onClick: () => {
498
- u(P.EMPLOYEE_SPLIT_PAYCHECK, { employeeId: s });
517
+ u(P.EMPLOYEE_SPLIT_PAYCHECK, { employeeId: r });
499
518
  },
500
- icon: /* @__PURE__ */ n(Ln, {}),
501
- children: t("jobAndPay.payment.splitPaycheckCta")
519
+ icon: /* @__PURE__ */ t(Un, {}),
520
+ children: n("jobAndPay.payment.splitPaycheckCta")
502
521
  }
503
522
  ),
504
- /* @__PURE__ */ n(
505
- o.Button,
523
+ /* @__PURE__ */ t(
524
+ i.Button,
506
525
  {
507
526
  variant: "secondary",
508
527
  onClick: () => {
509
- u(P.EMPLOYEE_BANK_ACCOUNT_CREATE, { employeeId: s });
528
+ u(P.EMPLOYEE_BANK_ACCOUNT_CREATE, { employeeId: r });
510
529
  },
511
- icon: /* @__PURE__ */ n(x, {}),
512
- children: t("jobAndPay.payment.addBankAccountCta")
530
+ icon: /* @__PURE__ */ t(U, {}),
531
+ children: n("jobAndPay.payment.addBankAccountCta")
513
532
  }
514
533
  )
515
534
  ] })
516
535
  }
517
536
  ),
518
- children: nn ? /* @__PURE__ */ n(v, {}) : w.length === 0 ? /* @__PURE__ */ d(c, { flexDirection: "column", gap: 0, children: [
519
- /* @__PURE__ */ n(o.Text, { variant: "supporting", children: A("paymentMethodLabel") }),
520
- /* @__PURE__ */ n(o.Text, { children: A(ce ? "directDepositLabel" : "checkLabel") })
521
- ] }) : /* @__PURE__ */ n(
522
- T,
537
+ children: an ? /* @__PURE__ */ t(v, {}) : E.length === 0 ? /* @__PURE__ */ t(
538
+ i.DescriptionList,
539
+ {
540
+ items: [
541
+ {
542
+ term: C("paymentMethodLabel"),
543
+ description: C(ue ? "directDepositLabel" : "checkLabel")
544
+ }
545
+ ]
546
+ }
547
+ ) : /* @__PURE__ */ t(
548
+ B,
523
549
  {
524
- label: t("jobAndPay.payment.listLabel"),
550
+ label: n("jobAndPay.payment.listLabel"),
525
551
  isWithinBox: !0,
526
- ...Qe
552
+ ...nn
527
553
  }
528
554
  )
529
555
  }
530
556
  ),
531
- /* @__PURE__ */ n(
532
- o.Box,
557
+ /* @__PURE__ */ t(
558
+ i.Box,
533
559
  {
534
560
  withPadding: !1,
535
- header: /* @__PURE__ */ n(
536
- o.BoxHeader,
561
+ header: /* @__PURE__ */ t(
562
+ i.BoxHeader,
537
563
  {
538
- title: t("jobAndPay.deductions.title"),
539
- action: /* @__PURE__ */ n(
540
- o.Button,
564
+ title: n("jobAndPay.deductions.title"),
565
+ action: /* @__PURE__ */ t(
566
+ i.Button,
541
567
  {
542
568
  variant: "secondary",
543
- onClick: Pe,
544
- icon: /* @__PURE__ */ n(x, {}),
545
- children: t("jobAndPay.deductions.addDeductionCta")
569
+ onClick: Ae,
570
+ icon: /* @__PURE__ */ t(U, {}),
571
+ children: n("jobAndPay.deductions.addDeductionCta")
546
572
  }
547
573
  )
548
574
  }
549
575
  ),
550
- children: tn ? /* @__PURE__ */ n(v, {}) : /* @__PURE__ */ n(
551
- T,
576
+ children: sn ? /* @__PURE__ */ t(v, {}) : /* @__PURE__ */ t(
577
+ B,
552
578
  {
553
- label: t("jobAndPay.deductions.listLabel"),
579
+ label: n("jobAndPay.deductions.listLabel"),
554
580
  isWithinBox: !0,
555
- ...Ze
581
+ ...tn
556
582
  }
557
583
  )
558
584
  }
559
585
  ),
560
- /* @__PURE__ */ n(
561
- o.Box,
586
+ /* @__PURE__ */ t(
587
+ i.Box,
562
588
  {
563
589
  withPadding: !1,
564
- header: /* @__PURE__ */ n(o.BoxHeader, { title: t("jobAndPay.paystubs.title") }),
565
- children: ve ? /* @__PURE__ */ n(v, {}) : /* @__PURE__ */ n(T, { label: t("jobAndPay.paystubs.listLabel"), isWithinBox: !0, ...en })
590
+ header: /* @__PURE__ */ t(i.BoxHeader, { title: n("jobAndPay.paystubs.title") }),
591
+ children: Ue ? /* @__PURE__ */ t(v, {}) : /* @__PURE__ */ t(B, { label: n("jobAndPay.paystubs.listLabel"), isWithinBox: !0, ...on })
566
592
  }
567
593
  ),
568
- /* @__PURE__ */ n(
569
- cn,
594
+ /* @__PURE__ */ t(
595
+ yn,
570
596
  {
571
- isOpen: Me,
572
- pendingChanges: L,
573
- employeeFirstName: U,
574
- cancellingCompensationUuid: q,
597
+ isOpen: He,
598
+ pendingChanges: y,
599
+ employeeFirstName: x,
600
+ cancellingCompensationUuid: z,
575
601
  onClose: () => {
576
- ee(!1);
602
+ O(!1);
577
603
  },
578
604
  onCancelChange: (e) => {
579
- X(e);
605
+ $(e);
580
606
  }
581
607
  }
582
608
  ),
583
- /* @__PURE__ */ n(
584
- fn,
609
+ /* @__PURE__ */ t(
610
+ jn,
585
611
  {
586
- pendingDeleteAccount: ie,
587
- isPrimaryActionLoading: Ve === ie?.uuid,
612
+ pendingDeleteAccount: se,
613
+ isPrimaryActionLoading: Ie === se?.uuid,
588
614
  onClose: () => {
589
- ae(null);
615
+ re(null);
590
616
  },
591
617
  onConfirm: () => {
592
- Ye();
618
+ Ge();
593
619
  }
594
620
  }
595
621
  ),
596
- /* @__PURE__ */ n(
597
- Dn,
622
+ /* @__PURE__ */ t(
623
+ kn,
598
624
  {
599
- pendingDeleteDeduction: se,
600
- isPrimaryActionLoading: re === se?.uuid,
625
+ pendingDeleteDeduction: ce,
626
+ isPrimaryActionLoading: de === ce?.uuid,
601
627
  onClose: () => {
602
- de(null);
628
+ le(null);
603
629
  },
604
630
  onConfirm: () => {
605
- Ie();
631
+ Ke();
606
632
  }
607
633
  }
608
634
  ),
609
- /* @__PURE__ */ n(
610
- o.Dialog,
635
+ /* @__PURE__ */ t(
636
+ i.Dialog,
611
637
  {
612
638
  isOpen: D !== null,
613
639
  onClose: () => {
614
- J(null);
640
+ M(null);
615
641
  },
616
642
  onPrimaryActionClick: () => {
617
- Se();
643
+ Ne();
618
644
  },
619
- isPrimaryActionLoading: $,
645
+ isPrimaryActionLoading: Z,
620
646
  isDestructive: !0,
621
- title: t("jobAndPay.compensation.deleteJobDialog.title"),
622
- primaryActionLabel: t("jobAndPay.compensation.deleteJobDialog.confirmCta"),
623
- closeActionLabel: t("jobAndPay.compensation.deleteJobDialog.cancelCta"),
624
- children: D ? t("jobAndPay.compensation.deleteJobDialog.description", {
647
+ title: n("jobAndPay.compensation.deleteJobDialog.title"),
648
+ primaryActionLabel: n("jobAndPay.compensation.deleteJobDialog.confirmCta"),
649
+ closeActionLabel: n("jobAndPay.compensation.deleteJobDialog.cancelCta"),
650
+ children: D ? n("jobAndPay.compensation.deleteJobDialog.description", {
625
651
  jobTitle: D.title
626
652
  }) : null
627
653
  }
@@ -629,6 +655,6 @@ function bt({
629
655
  ] }) });
630
656
  }
631
657
  export {
632
- bt as JobAndPayView
658
+ Ct as JobAndPayView
633
659
  };
634
660
  //# sourceMappingURL=JobAndPayView.js.map