@gusto/embedded-react-sdk 0.46.0 → 0.46.2

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 (152) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/components/Common/DataView/DataCards/DataCards.d.ts +2 -1
  3. package/dist/components/Common/DataView/DataCards/DataCards.js +14 -13
  4. package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
  5. package/dist/components/Common/DataView/DataTable/DataTable.d.ts +2 -1
  6. package/dist/components/Common/DataView/DataTable/DataTable.js +51 -50
  7. package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
  8. package/dist/components/Common/DataView/DataView.d.ts +1 -0
  9. package/dist/components/Common/DataView/DataView.js.map +1 -1
  10. package/dist/components/Common/DataView/useDataView.d.ts +8 -1
  11. package/dist/components/Common/DataView/useDataView.js +20 -17
  12. package/dist/components/Common/DataView/useDataView.js.map +1 -1
  13. package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.d.ts +9 -0
  14. package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.js +76 -0
  15. package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.js.map +1 -0
  16. package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.module.scss.js +8 -0
  17. package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.module.scss.js.map +1 -0
  18. package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.js +57 -202
  19. package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.js.map +1 -1
  20. package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.d.ts +25 -0
  21. package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.js +81 -0
  22. package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.js.map +1 -0
  23. package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.module.scss.js +8 -0
  24. package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.module.scss.js.map +1 -0
  25. package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.d.ts +18 -0
  26. package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js +171 -0
  27. package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js.map +1 -0
  28. package/dist/components/Employee/Compensation/management/index.d.ts +3 -0
  29. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.d.ts +6 -1
  30. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js +67 -209
  31. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js.map +1 -1
  32. package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.d.ts +18 -0
  33. package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.js +169 -0
  34. package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.js.map +1 -0
  35. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.d.ts +16 -0
  36. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js +36 -30
  37. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js.map +1 -1
  38. package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.d.ts +1 -1
  39. package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js.map +1 -1
  40. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js +213 -191
  41. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -1
  42. package/dist/components/Employee/Dashboard/Dashboard.js +65 -53
  43. package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
  44. package/dist/components/Employee/Dashboard/DashboardComponents.d.ts +3 -3
  45. package/dist/components/Employee/Dashboard/DashboardComponents.js +138 -101
  46. package/dist/components/Employee/Dashboard/DashboardComponents.js.map +1 -1
  47. package/dist/components/Employee/Dashboard/JobAndPayView.js +340 -320
  48. package/dist/components/Employee/Dashboard/JobAndPayView.js.map +1 -1
  49. package/dist/components/Employee/Dashboard/JobAndPayView.module.scss.js +5 -3
  50. package/dist/components/Employee/Dashboard/JobAndPayView.module.scss.js.map +1 -1
  51. package/dist/components/Employee/Dashboard/dashboardStateMachine.js +147 -148
  52. package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -1
  53. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.d.ts +6 -0
  54. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js +13 -12
  55. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js.map +1 -1
  56. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.d.ts +2 -2
  57. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js +34 -35
  58. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js.map +1 -1
  59. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeList.js +37 -40
  60. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeList.js.map +1 -1
  61. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.d.ts +1 -2
  62. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.js +64 -71
  63. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.js.map +1 -1
  64. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.d.ts +2 -0
  65. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.js +25 -0
  66. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.js.map +1 -0
  67. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.d.ts +13 -0
  68. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.js +37 -0
  69. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.js.map +1 -0
  70. package/dist/components/Employee/EmployeeListFlow/employeeListStateMachine.d.ts +6 -0
  71. package/dist/components/Employee/EmployeeListFlow/employeeListStateMachine.js +69 -0
  72. package/dist/components/Employee/EmployeeListFlow/employeeListStateMachine.js.map +1 -0
  73. package/dist/components/Employee/EmployeeListFlow/index.d.ts +3 -0
  74. package/dist/components/Employee/HomeAddress/management/HomeAddress.js +15 -12
  75. package/dist/components/Employee/HomeAddress/management/HomeAddress.js.map +1 -1
  76. package/dist/components/Employee/HomeAddress/management/HomeAddressView.d.ts +2 -1
  77. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js +86 -83
  78. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js.map +1 -1
  79. package/dist/components/Employee/WorkAddress/management/WorkAddress.js +14 -11
  80. package/dist/components/Employee/WorkAddress/management/WorkAddress.js.map +1 -1
  81. package/dist/components/Employee/WorkAddress/management/WorkAddressView.d.ts +2 -1
  82. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js +92 -89
  83. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js.map +1 -1
  84. package/dist/components/Employee/exports/employeeManagement.d.ts +2 -0
  85. package/dist/components/Employee/exports/employeeManagement.js +18 -16
  86. package/dist/components/Employee/exports/employeeManagement.js.map +1 -1
  87. package/dist/components/Employee/index.d.ts +2 -0
  88. package/dist/components/Employee/index.js +32 -30
  89. package/dist/components/Employee/index.js.map +1 -1
  90. package/dist/components/Flow/FlowHeader.js +34 -31
  91. package/dist/components/Flow/FlowHeader.js.map +1 -1
  92. package/dist/components/Flow/useFlow.d.ts +12 -0
  93. package/dist/components/Flow/useFlow.js.map +1 -1
  94. package/dist/components/TimeOff/PolicyList/PolicyList.js +92 -69
  95. package/dist/components/TimeOff/PolicyList/PolicyList.js.map +1 -1
  96. package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js +23 -23
  97. package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js.map +1 -1
  98. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.d.ts +1 -1
  99. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
  100. package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js +73 -56
  101. package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -1
  102. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +58 -58
  103. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -1
  104. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.d.ts +1 -1
  105. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +91 -87
  106. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -1
  107. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormTypes.d.ts +2 -0
  108. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js +91 -124
  109. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js.map +1 -1
  110. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.d.ts +1 -1
  111. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js +72 -87
  112. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js.map +1 -1
  113. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentationTypes.d.ts +1 -6
  114. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js +160 -220
  115. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js.map +1 -1
  116. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.d.ts +7 -3
  117. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js +77 -54
  118. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js.map +1 -1
  119. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.test.d.ts +1 -0
  120. package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js +12 -11
  121. package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js.map +1 -1
  122. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js +177 -147
  123. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js.map +1 -1
  124. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.d.ts +1 -1
  125. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js +38 -36
  126. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js.map +1 -1
  127. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTableTypes.d.ts +2 -0
  128. package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js +10 -10
  129. package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js +17 -15
  130. package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js.map +1 -1
  131. package/dist/i18n/en/Company.TimeOff.TimeOffPolicyDetails.json.js +9 -9
  132. package/dist/i18n/en/Employee.Compensation.json.js +64 -56
  133. package/dist/i18n/en/Employee.Compensation.json.js.map +1 -1
  134. package/dist/i18n/en/Employee.Dashboard.json.js +26 -24
  135. package/dist/i18n/en/Employee.Dashboard.json.js.map +1 -1
  136. package/dist/i18n/en/Employee.HomeAddress.Management.json.js +12 -10
  137. package/dist/i18n/en/Employee.HomeAddress.Management.json.js.map +1 -1
  138. package/dist/i18n/en/Employee.ManagementEmployeeList.json.js +32 -30
  139. package/dist/i18n/en/Employee.ManagementEmployeeList.json.js.map +1 -1
  140. package/dist/i18n/en/Employee.WorkAddress.Management.json.js +16 -14
  141. package/dist/i18n/en/Employee.WorkAddress.Management.json.js.map +1 -1
  142. package/dist/i18n/en/common.json.d.ts +14 -0
  143. package/dist/partner-hook-utils/form/fields/DatePickerHookField.js +33 -32
  144. package/dist/partner-hook-utils/form/fields/DatePickerHookField.js.map +1 -1
  145. package/dist/partner-hook-utils/types.d.ts +4 -0
  146. package/dist/shared/constants.d.ts +2 -0
  147. package/dist/shared/constants.js +13 -12
  148. package/dist/shared/constants.js.map +1 -1
  149. package/dist/style.css +1 -1
  150. package/dist/types/i18next.d.ts +26 -12
  151. package/docs/reference/endpoint-inventory.json +24 -8
  152. package/package.json +1 -1
@@ -1,236 +1,246 @@
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";
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
11
  import { Flex as c } from "../../Common/Flex/Flex.js";
12
- import { useComponentContext as it } from "../../../contexts/ComponentAdapter/useComponentContext.js";
12
+ import { useComponentContext as ln } from "../../../contexts/ComponentAdapter/useComponentContext.js";
13
13
  import "classnames";
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";
14
+ import { componentEvents as P, FlsaStatus as pe, PAYMENT_METHODS as un } from "../../../shared/constants.js";
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
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";
38
- import { useDataView as w } from "../../Common/DataView/useDataView.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";
39
40
  import { DataView as T } from "../../Common/DataView/DataView.js";
40
- function pe(s) {
41
+ function ge(s) {
41
42
  if (s === void 0) return null;
42
- const m = parseFloat(s);
43
- return Number.isFinite(m) ? m : null;
43
+ const u = parseFloat(s);
44
+ return Number.isFinite(u) ? u : null;
44
45
  }
45
- function dn({
46
+ function bt({
46
47
  employeeId: s,
47
- onEvent: m,
48
- onEditCompensation: F,
49
- onAddJob: ye,
50
- onAddAnotherJob: be,
51
- onAddDeduction: ge,
52
- onEditDeduction: he
48
+ onEvent: u,
49
+ onEditCompensation: V,
50
+ onAddJob: he,
51
+ onAddAnotherJob: fe,
52
+ onAddDeduction: Pe,
53
+ onEditDeduction: Ae
53
54
  }) {
54
55
  _("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(
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(
63
64
  async (e) => {
64
- await I(e) && m(P.EMPLOYEE_COMPENSATION_CHANGE_CANCELLED, {
65
+ await K(e) && u(P.EMPLOYEE_COMPENSATION_CHANGE_CANCELLED, {
65
66
  employeeId: s,
66
67
  compensationId: e.compensationUuid
67
68
  });
68
69
  },
69
- [I, m, s]
70
- ), [Ee, K] = J(
70
+ [K, u, s]
71
+ ), [xe, z] = O(
71
72
  () => /* @__PURE__ */ new Set()
72
- ), ve = ce(
73
+ ), ke = ue(
73
74
  async (e) => {
74
- const i = window.open("", "_blank", "noopener,noreferrer"), h = n("jobAndPay.paystubs.downloadLoadingMessage");
75
+ const i = window.open("", "_blank"), f = t("jobAndPay.paystubs.downloadLoadingMessage");
75
76
  if (i) {
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);
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");
82
+ g.className = "spinner", g.setAttribute("aria-hidden", "true");
83
+ const le = r.createElement("span");
84
+ le.textContent = f, r.body.replaceChildren(g, le);
84
85
  }
85
- K((a) => {
86
- const u = new Set(a);
87
- return u.add(e), u;
86
+ z((r) => {
87
+ const m = new Set(r);
88
+ return m.add(e), m;
88
89
  });
89
90
  try {
90
- const a = await Qe(V, {
91
+ const r = await an(W, {
91
92
  payrollId: e,
92
93
  employeeId: s
93
94
  });
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)));
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", () => {
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
103
  } finally {
101
- K((a) => {
102
- const u = new Set(a);
103
- return u.delete(e), u;
104
+ z((r) => {
105
+ const m = new Set(r);
106
+ return m.delete(e), m;
104
107
  });
105
108
  }
106
109
  },
107
- [V, s, n, W]
108
- ), [D, N] = J(null), { mutateAsync: xe, isPending: X } = et(), ke = async () => {
110
+ [W, s, t, I]
111
+ ), [D, J] = O(null), { mutateAsync: Te, isPending: $ } = sn(), Se = async () => {
109
112
  if (!D) return;
110
113
  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) => {
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) => {
120
123
  if (l.isLoading) return;
121
124
  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) => {
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) => {
128
131
  if (p.isLoading) return;
129
132
  const i = await p.actions.onDelete(e);
130
- i && m(P.EMPLOYEE_DEDUCTION_DELETED, i.data.garnishment);
131
- }), He = st([y, l, p]), Fe = [
133
+ i && u(P.EMPLOYEE_DEDUCTION_DELETED, i.data.garnishment);
134
+ }), Ge = pn([y, l, p]), qe = [
132
135
  {
133
136
  key: "jobTitle",
134
- title: n("jobAndPay.compensation.columns.jobTitle"),
137
+ title: t("jobAndPay.compensation.columns.jobTitle"),
135
138
  render: (e) => {
136
- const i = pe(e.rate);
139
+ const i = ge(e.rate);
137
140
  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
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
143
  ] });
141
144
  }
142
145
  },
143
146
  {
144
147
  key: "payType",
145
- title: n("jobAndPay.compensation.columns.payType"),
148
+ title: t("jobAndPay.compensation.columns.payType"),
146
149
  render: (e) => {
147
150
  const i = e.compensations?.find(
148
- (h) => h.uuid === e.currentCompensationUuid
151
+ (f) => f.uuid === e.currentCompensationUuid
149
152
  )?.flsaStatus;
150
- return i !== void 0 ? fe(`flsaStatusLabels.${i}`) : "-";
153
+ return i !== void 0 ? Ce(`flsaStatusLabels.${i}`) : "-";
151
154
  }
152
155
  },
153
156
  {
154
157
  key: "effectiveDate",
155
- title: n("jobAndPay.compensation.columns.effectiveDate"),
158
+ title: t("jobAndPay.compensation.columns.effectiveDate"),
156
159
  render: (e) => {
157
- const i = e.compensations?.find((h) => h.uuid === e.currentCompensationUuid);
160
+ const i = e.compensations?.find((f) => f.uuid === e.currentCompensationUuid);
158
161
  return i?.effectiveDate ? j(i.effectiveDate) : "-";
159
162
  }
160
- }
161
- ], Ye = w({
162
- data: A,
163
- columns: Fe,
164
- itemMenu: (e) => /* @__PURE__ */ t(
165
- H,
163
+ },
164
+ ...He ? [
165
+ {
166
+ 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
169
+ }
170
+ ] : []
171
+ ], Ke = k({
172
+ data: C,
173
+ columns: qe,
174
+ itemMenu: (e) => /* @__PURE__ */ n(
175
+ F,
166
176
  {
167
- triggerLabel: n("jobAndPay.compensation.hamburgerTitle"),
168
- isLoading: X,
177
+ triggerLabel: t("jobAndPay.compensation.hamburgerTitle"),
178
+ isLoading: $,
169
179
  items: [
170
180
  {
171
- label: n("jobAndPay.compensation.editJobCta"),
172
- icon: /* @__PURE__ */ t(ue, { "aria-hidden": !0 }),
181
+ label: t("jobAndPay.compensation.editJobCta"),
182
+ icon: /* @__PURE__ */ n(be, { "aria-hidden": !0 }),
173
183
  onClick: () => {
174
- F?.(e);
184
+ V?.(e);
175
185
  }
176
186
  },
177
187
  ...e.primary ? [] : [
178
188
  {
179
- label: n("jobAndPay.compensation.deleteJobCta"),
180
- icon: /* @__PURE__ */ t(R, { "aria-hidden": !0 }),
189
+ label: t("jobAndPay.compensation.deleteJobCta"),
190
+ icon: /* @__PURE__ */ n(H, { "aria-hidden": !0 }),
181
191
  onClick: () => {
182
- N({ uuid: e.uuid, title: e.title ?? "" });
192
+ J({ uuid: e.uuid, title: e.title ?? "" });
183
193
  }
184
194
  }
185
195
  ]
186
196
  ]
187
197
  }
188
198
  )
189
- }), Ve = [
199
+ }), Xe = [
190
200
  {
191
201
  key: "nickname",
192
- title: n("jobAndPay.payment.nickname"),
202
+ title: t("jobAndPay.payment.nickname"),
193
203
  render: (e) => e.name || "-"
194
204
  },
195
205
  {
196
206
  key: "routingNumber",
197
- title: n("jobAndPay.payment.routingNumber"),
207
+ title: t("jobAndPay.payment.routingNumber"),
198
208
  render: (e) => e.routingNumber || "-"
199
209
  },
200
210
  {
201
211
  key: "accountType",
202
- title: n("jobAndPay.payment.accountType"),
212
+ title: t("jobAndPay.payment.accountType"),
203
213
  render: (e) => e.accountType || "-"
204
214
  }
205
- ], We = [
215
+ ], ze = [
206
216
  {
207
217
  key: "description",
208
- title: n("jobAndPay.deductions.deduction"),
218
+ title: t("jobAndPay.deductions.deduction"),
209
219
  render: (e) => e.description || "-"
210
220
  },
211
221
  {
212
222
  key: "frequency",
213
- title: n("jobAndPay.deductions.frequency"),
214
- render: (e) => e.recurring ? n("jobAndPay.deductions.recurring") : n("jobAndPay.deductions.oneTime")
223
+ title: t("jobAndPay.deductions.frequency"),
224
+ render: (e) => e.recurring ? t("jobAndPay.deductions.recurring") : t("jobAndPay.deductions.oneTime")
215
225
  },
216
226
  {
217
227
  key: "amount",
218
- title: n("jobAndPay.deductions.withhold"),
219
- render: (e) => ht(e, {
228
+ title: t("jobAndPay.deductions.withhold"),
229
+ render: (e) => jn(e, {
220
230
  formatCurrency: B,
221
- formatPercent: Pe,
222
- formatPerPaycheck: (i) => n("jobAndPay.deductions.amountPerPaycheck", { value: i })
231
+ formatPercent: De,
232
+ formatPerPaycheck: (i) => t("jobAndPay.deductions.amountPerPaycheck", { value: i })
223
233
  })
224
234
  }
225
- ], Ge = [
235
+ ], $e = [
226
236
  {
227
237
  key: "payday",
228
- title: n("jobAndPay.paystubs.payday"),
238
+ title: t("jobAndPay.paystubs.payday"),
229
239
  render: (e) => j(e.checkDate) || "-"
230
240
  },
231
241
  {
232
242
  key: "checkAmount",
233
- title: n("jobAndPay.paystubs.checkAmount"),
243
+ title: t("jobAndPay.paystubs.checkAmount"),
234
244
  render: (e) => {
235
245
  if (!e.netPay) return "-";
236
246
  const i = parseFloat(e.netPay);
@@ -239,7 +249,7 @@ function dn({
239
249
  },
240
250
  {
241
251
  key: "grossPay",
242
- title: n("jobAndPay.paystubs.grossPay"),
252
+ title: t("jobAndPay.paystubs.grossPay"),
243
253
  render: (e) => {
244
254
  if (!e.grossPay) return "-";
245
255
  const i = parseFloat(e.grossPay);
@@ -248,360 +258,370 @@ function dn({
248
258
  },
249
259
  {
250
260
  key: "paymentMethod",
251
- title: n("jobAndPay.paystubs.paymentMethod"),
252
- render: () => te?.type || n("jobAndPay.paystubs.noPaymentMethod")
261
+ title: t("jobAndPay.paystubs.paymentMethod"),
262
+ render: () => oe?.type || t("jobAndPay.paystubs.noPaymentMethod")
253
263
  }
254
- ], Ie = w({
255
- data: E,
256
- columns: Ve,
257
- itemMenu: (e) => /* @__PURE__ */ t(
258
- H,
264
+ ], Qe = k({
265
+ data: w,
266
+ columns: Xe,
267
+ itemMenu: (e) => /* @__PURE__ */ n(
268
+ F,
259
269
  {
260
270
  items: [
261
271
  {
262
- label: C("deleteBankAccountCta"),
272
+ label: A("deleteBankAccountCta"),
263
273
  onClick: () => {
264
- oe({
274
+ ae({
265
275
  uuid: e.uuid,
266
276
  hiddenAccountNumber: e.hiddenAccountNumber
267
277
  });
268
278
  },
269
- icon: /* @__PURE__ */ t(R, { "aria-hidden": !0 })
279
+ icon: /* @__PURE__ */ n(H, { "aria-hidden": !0 })
270
280
  }
271
281
  ],
272
- triggerLabel: C("hamburgerTitle")
282
+ triggerLabel: A("hamburgerTitle")
273
283
  }
274
284
  )
275
- }), qe = w({
276
- data: _e,
277
- columns: We,
278
- itemMenu: (e) => /* @__PURE__ */ t(
279
- H,
285
+ }), Ze = k({
286
+ data: We,
287
+ columns: ze,
288
+ itemMenu: (e) => /* @__PURE__ */ n(
289
+ F,
280
290
  {
281
- isLoading: ie === e.uuid,
291
+ isLoading: re === e.uuid,
282
292
  items: [
283
293
  {
284
294
  label: S("editCta"),
285
- onClick: () => he?.(e),
286
- icon: /* @__PURE__ */ t(ue, { "aria-hidden": !0 })
295
+ onClick: () => Ae?.(e),
296
+ icon: /* @__PURE__ */ n(be, { "aria-hidden": !0 })
287
297
  },
288
298
  {
289
299
  label: S("deleteCta"),
290
300
  onClick: () => {
291
- re(e);
301
+ de(e);
292
302
  },
293
- icon: /* @__PURE__ */ t(R, { "aria-hidden": !0 })
303
+ icon: /* @__PURE__ */ n(H, { "aria-hidden": !0 })
294
304
  }
295
305
  ],
296
306
  triggerLabel: S("hamburgerTitle")
297
307
  }
298
308
  ),
299
- emptyState: () => /* @__PURE__ */ t(
300
- O,
309
+ emptyState: () => /* @__PURE__ */ n(
310
+ R,
301
311
  {
302
- title: n("jobAndPay.deductions.emptyState.title"),
303
- description: n("jobAndPay.deductions.emptyState.description")
312
+ title: t("jobAndPay.deductions.emptyState.title"),
313
+ description: t("jobAndPay.deductions.emptyState.description")
304
314
  }
305
315
  )
306
- }), Ke = w({
307
- data: De,
308
- columns: Ge,
309
- pagination: je,
316
+ }), en = k({
317
+ data: we,
318
+ columns: $e,
319
+ pagination: Ee,
310
320
  itemMenu: (e) => {
311
- const i = !!e.payrollUuid && Ee.has(e.payrollUuid);
312
- return /* @__PURE__ */ t(
321
+ const i = !!e.payrollUuid && xe.has(e.payrollUuid);
322
+ return /* @__PURE__ */ n(
313
323
  o.ButtonIcon,
314
324
  {
315
325
  variant: "tertiary",
316
- "aria-label": n("jobAndPay.paystubs.downloadCta"),
326
+ "aria-label": t("jobAndPay.paystubs.downloadCta"),
317
327
  isDisabled: !e.payrollUuid,
318
328
  isLoading: i,
319
329
  onClick: () => {
320
- e.payrollUuid && ve(e.payrollUuid);
330
+ e.payrollUuid && ke(e.payrollUuid);
321
331
  },
322
- children: /* @__PURE__ */ t(Pt, { "aria-hidden": !0 })
332
+ children: /* @__PURE__ */ n(wn, { "aria-hidden": !0 })
323
333
  }
324
334
  );
325
335
  },
326
- emptyState: () => /* @__PURE__ */ t(
327
- O,
336
+ emptyState: () => /* @__PURE__ */ n(
337
+ R,
328
338
  {
329
- title: n("jobAndPay.paystubs.emptyState.title"),
330
- description: n("jobAndPay.paystubs.emptyState.description")
339
+ title: t("jobAndPay.paystubs.emptyState.title"),
340
+ description: t("jobAndPay.paystubs.emptyState.description")
331
341
  }
332
342
  )
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(
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(
336
346
  o.Box,
337
347
  {
338
- withPadding: !g,
339
- header: /* @__PURE__ */ t(
348
+ withPadding: !h,
349
+ header: /* @__PURE__ */ n(
340
350
  o.BoxHeader,
341
351
  {
342
- title: n("jobAndPay.compensation.title"),
352
+ title: t("jobAndPay.compensation.title"),
343
353
  action: (
344
354
  // While the compensation card is loading we don't yet
345
355
  // know if the employee has jobs — suppress the action
346
356
  // so we don't surface an "Add job" CTA against an
347
357
  // employee who already has one.
348
- U || g ? null : r ? /* @__PURE__ */ t(
358
+ N || h ? null : a ? /* @__PURE__ */ n(
349
359
  o.Button,
350
360
  {
351
361
  variant: "secondary",
352
362
  onClick: () => {
353
- F?.(r);
363
+ V?.(a);
354
364
  },
355
- children: n("jobAndPay.compensation.editCta")
365
+ children: t("jobAndPay.compensation.editCta")
356
366
  }
357
- ) : /* @__PURE__ */ t(
367
+ ) : /* @__PURE__ */ n(
358
368
  o.Button,
359
369
  {
360
370
  variant: "secondary",
361
- onClick: ye,
362
- icon: /* @__PURE__ */ t(k, {}),
363
- children: n("jobAndPay.compensation.addJobCta")
371
+ onClick: he,
372
+ icon: /* @__PURE__ */ n(x, {}),
373
+ children: t("jobAndPay.compensation.addJobCta")
364
374
  }
365
375
  )
366
376
  )
367
377
  }
368
378
  ),
369
- footer: !U && Se ? /* @__PURE__ */ t(
379
+ footer: !N && Ne ? /* @__PURE__ */ n(
370
380
  o.Button,
371
381
  {
372
382
  variant: "secondary",
373
- onClick: be,
374
- icon: /* @__PURE__ */ t(k, {}),
375
- children: n("jobAndPay.compensation.addAnotherJobCta")
383
+ onClick: fe,
384
+ icon: /* @__PURE__ */ n(x, {}),
385
+ children: t("jobAndPay.compensation.addAnotherJobCta")
376
386
  }
377
387
  ) : void 0,
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(
421
- o.Button,
388
+ children: N ? /* @__PURE__ */ n(v, {}) : /* @__PURE__ */ d(c, { flexDirection: "column", gap: 16, children: [
389
+ ne && /* @__PURE__ */ n(
390
+ "div",
391
+ {
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,
396
+ {
397
+ status: "warning",
398
+ disableScrollIntoView: !0,
399
+ label: h ? t("jobAndPay.compensation.pendingChange.alertLabelWithJob", {
400
+ jobTitle: b.jobTitle,
401
+ date: j(b.effectiveDate)
402
+ }) : t("jobAndPay.compensation.pendingChange.alertLabel", {
403
+ date: j(b.effectiveDate)
404
+ }),
405
+ children: /* @__PURE__ */ d(c, { flexDirection: "column", gap: 12, children: [
406
+ /* @__PURE__ */ n(
407
+ o.UnorderedList,
408
+ {
409
+ items: b.details.map((e) => Oe(e))
410
+ }
411
+ ),
412
+ /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
413
+ o.Button,
414
+ {
415
+ variant: "secondary",
416
+ isLoading: q === b.compensationUuid,
417
+ onClick: () => {
418
+ X(b);
419
+ },
420
+ children: t("jobAndPay.compensation.pendingChange.cancelCta")
421
+ }
422
+ ) })
423
+ ] })
424
+ }
425
+ ),
426
+ te && /* @__PURE__ */ n(
427
+ o.Alert,
422
428
  {
423
- variant: "secondary",
424
- onClick: () => {
425
- Q(!0);
426
- },
427
- children: n("jobAndPay.compensation.pendingChange.reviewCta")
429
+ status: "warning",
430
+ disableScrollIntoView: !0,
431
+ label: t("jobAndPay.compensation.pendingChange.summaryLabel", {
432
+ name: U ?? ""
433
+ }),
434
+ action: /* @__PURE__ */ n(
435
+ o.Button,
436
+ {
437
+ variant: "secondary",
438
+ onClick: () => {
439
+ ee(!0);
440
+ },
441
+ children: t("jobAndPay.compensation.pendingChange.reviewCta")
442
+ }
443
+ )
428
444
  }
429
445
  )
430
- }
431
- )
432
- ] }) }),
433
- g ? /* @__PURE__ */ t(
446
+ ] })
447
+ }
448
+ ),
449
+ h ? /* @__PURE__ */ n(
434
450
  T,
435
451
  {
436
- label: n("jobAndPay.compensation.tableLabel"),
452
+ label: t("jobAndPay.compensation.tableLabel"),
437
453
  isWithinBox: !0,
438
- ...Ye
454
+ ...Ke
439
455
  }
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 })
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 })
444
460
  ] }),
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 })
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 })
448
464
  ] }),
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) })
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) })
452
468
  ] }),
453
- Be
454
- ] }) : /* @__PURE__ */ t(
455
- O,
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,
456
476
  {
457
- title: n("jobAndPay.compensation.emptyState.title"),
458
- description: n("jobAndPay.compensation.emptyState.description")
477
+ title: t("jobAndPay.compensation.emptyState.title"),
478
+ description: t("jobAndPay.compensation.emptyState.description")
459
479
  }
460
480
  )
461
481
  ] })
462
482
  }
463
483
  ),
464
- /* @__PURE__ */ t(
484
+ /* @__PURE__ */ n(
465
485
  o.Box,
466
486
  {
467
- withPadding: E.length === 0,
468
- header: /* @__PURE__ */ t(
487
+ withPadding: w.length === 0,
488
+ header: /* @__PURE__ */ n(
469
489
  o.BoxHeader,
470
490
  {
471
- title: n("jobAndPay.payment.title"),
491
+ title: t("jobAndPay.payment.title"),
472
492
  action: /* @__PURE__ */ d(c, { gap: 8, alignItems: "center", justifyContent: "flex-end", children: [
473
- se && E.length > 1 && /* @__PURE__ */ t(
493
+ ce && w.length > 1 && /* @__PURE__ */ n(
474
494
  o.Button,
475
495
  {
476
496
  variant: "secondary",
477
497
  onClick: () => {
478
- m(P.EMPLOYEE_SPLIT_PAYCHECK, { employeeId: s });
498
+ u(P.EMPLOYEE_SPLIT_PAYCHECK, { employeeId: s });
479
499
  },
480
- icon: /* @__PURE__ */ t(ft, {}),
481
- children: n("jobAndPay.payment.splitPaycheckCta")
500
+ icon: /* @__PURE__ */ n(Ln, {}),
501
+ children: t("jobAndPay.payment.splitPaycheckCta")
482
502
  }
483
503
  ),
484
- /* @__PURE__ */ t(
504
+ /* @__PURE__ */ n(
485
505
  o.Button,
486
506
  {
487
507
  variant: "secondary",
488
508
  onClick: () => {
489
- m(P.EMPLOYEE_BANK_ACCOUNT_CREATE, { employeeId: s });
509
+ u(P.EMPLOYEE_BANK_ACCOUNT_CREATE, { employeeId: s });
490
510
  },
491
- icon: /* @__PURE__ */ t(k, {}),
492
- children: n("jobAndPay.payment.addBankAccountCta")
511
+ icon: /* @__PURE__ */ n(x, {}),
512
+ children: t("jobAndPay.payment.addBankAccountCta")
493
513
  }
494
514
  )
495
515
  ] })
496
516
  }
497
517
  ),
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(
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(
502
522
  T,
503
523
  {
504
- label: n("jobAndPay.payment.listLabel"),
524
+ label: t("jobAndPay.payment.listLabel"),
505
525
  isWithinBox: !0,
506
- ...Ie
526
+ ...Qe
507
527
  }
508
528
  )
509
529
  }
510
530
  ),
511
- /* @__PURE__ */ t(
531
+ /* @__PURE__ */ n(
512
532
  o.Box,
513
533
  {
514
534
  withPadding: !1,
515
- header: /* @__PURE__ */ t(
535
+ header: /* @__PURE__ */ n(
516
536
  o.BoxHeader,
517
537
  {
518
- title: n("jobAndPay.deductions.title"),
519
- action: /* @__PURE__ */ t(
538
+ title: t("jobAndPay.deductions.title"),
539
+ action: /* @__PURE__ */ n(
520
540
  o.Button,
521
541
  {
522
542
  variant: "secondary",
523
- onClick: ge,
524
- icon: /* @__PURE__ */ t(k, {}),
525
- children: n("jobAndPay.deductions.addDeductionCta")
543
+ onClick: Pe,
544
+ icon: /* @__PURE__ */ n(x, {}),
545
+ children: t("jobAndPay.deductions.addDeductionCta")
526
546
  }
527
547
  )
528
548
  }
529
549
  ),
530
- children: $e ? /* @__PURE__ */ t(x, {}) : /* @__PURE__ */ t(
550
+ children: tn ? /* @__PURE__ */ n(v, {}) : /* @__PURE__ */ n(
531
551
  T,
532
552
  {
533
- label: n("jobAndPay.deductions.listLabel"),
553
+ label: t("jobAndPay.deductions.listLabel"),
534
554
  isWithinBox: !0,
535
- ...qe
555
+ ...Ze
536
556
  }
537
557
  )
538
558
  }
539
559
  ),
540
- /* @__PURE__ */ t(
560
+ /* @__PURE__ */ n(
541
561
  o.Box,
542
562
  {
543
563
  withPadding: !1,
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 })
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 })
546
566
  }
547
567
  ),
548
- /* @__PURE__ */ t(
549
- nt,
568
+ /* @__PURE__ */ n(
569
+ cn,
550
570
  {
551
571
  isOpen: Me,
552
572
  pendingChanges: L,
553
- employeeFirstName: M,
554
- cancellingCompensationUuid: G,
573
+ employeeFirstName: U,
574
+ cancellingCompensationUuid: q,
555
575
  onClose: () => {
556
- Q(!1);
576
+ ee(!1);
557
577
  },
558
578
  onCancelChange: (e) => {
559
- q(e);
579
+ X(e);
560
580
  }
561
581
  }
562
582
  ),
563
- /* @__PURE__ */ t(
564
- ut,
583
+ /* @__PURE__ */ n(
584
+ fn,
565
585
  {
566
- pendingDeleteAccount: ne,
567
- isPrimaryActionLoading: Je === ne?.uuid,
586
+ pendingDeleteAccount: ie,
587
+ isPrimaryActionLoading: Ve === ie?.uuid,
568
588
  onClose: () => {
569
- oe(null);
589
+ ae(null);
570
590
  },
571
591
  onConfirm: () => {
572
- Oe();
592
+ Ye();
573
593
  }
574
594
  }
575
595
  ),
576
- /* @__PURE__ */ t(
577
- gt,
596
+ /* @__PURE__ */ n(
597
+ Dn,
578
598
  {
579
- pendingDeleteDeduction: ae,
580
- isPrimaryActionLoading: ie === ae?.uuid,
599
+ pendingDeleteDeduction: se,
600
+ isPrimaryActionLoading: re === se?.uuid,
581
601
  onClose: () => {
582
- re(null);
602
+ de(null);
583
603
  },
584
604
  onConfirm: () => {
585
- Re();
605
+ Ie();
586
606
  }
587
607
  }
588
608
  ),
589
- /* @__PURE__ */ t(
609
+ /* @__PURE__ */ n(
590
610
  o.Dialog,
591
611
  {
592
612
  isOpen: D !== null,
593
613
  onClose: () => {
594
- N(null);
614
+ J(null);
595
615
  },
596
616
  onPrimaryActionClick: () => {
597
- ke();
617
+ Se();
598
618
  },
599
- isPrimaryActionLoading: X,
619
+ isPrimaryActionLoading: $,
600
620
  isDestructive: !0,
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", {
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", {
605
625
  jobTitle: D.title
606
626
  }) : null
607
627
  }
@@ -609,6 +629,6 @@ function dn({
609
629
  ] }) });
610
630
  }
611
631
  export {
612
- dn as JobAndPayView
632
+ bt as JobAndPayView
613
633
  };
614
634
  //# sourceMappingURL=JobAndPayView.js.map