@gusto/embedded-react-sdk 0.45.0 → 0.46.0

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