@gusto/embedded-react-sdk 0.55.3 → 0.55.4

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 (130) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/components/Common/DataView/DataCards/DataCards.d.ts +2 -1
  3. package/dist/components/Common/DataView/DataCards/DataCards.js +63 -54
  4. package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
  5. package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js +14 -12
  6. package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js.map +1 -1
  7. package/dist/components/Common/DataView/DataTable/DataTable.d.ts +2 -1
  8. package/dist/components/Common/DataView/DataTable/DataTable.js +75 -66
  9. package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
  10. package/dist/components/Common/DataView/DataTable/DataTable.module.scss.js +8 -4
  11. package/dist/components/Common/DataView/DataTable/DataTable.module.scss.js.map +1 -1
  12. package/dist/components/Common/DataView/DataView.js +18 -17
  13. package/dist/components/Common/DataView/DataView.js.map +1 -1
  14. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -6
  15. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  16. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -6
  17. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  18. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -8
  19. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  20. package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -6
  21. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  22. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -6
  23. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  24. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +8 -11
  25. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  26. package/dist/components/Company/Industry/Context.js +6 -9
  27. package/dist/components/Company/Industry/Context.js.map +1 -1
  28. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -6
  29. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  30. package/dist/components/Company/Locations/LocationsList/List.js +27 -25
  31. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  32. package/dist/components/Company/Locations/LocationsList/LocationsList.js +41 -36
  33. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  34. package/dist/components/Company/Locations/LocationsList/useLocationsList.d.ts +1 -0
  35. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -6
  36. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  37. package/dist/components/Company/OnboardingOverview/context.js +3 -6
  38. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  39. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.d.ts +9 -2
  40. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js +19 -18
  41. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js.map +1 -1
  42. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +63 -62
  43. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
  44. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -6
  45. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  46. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -6
  47. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  48. package/dist/components/Company/StateTaxes/TaxRateManagement/AddTaxRateDialog.js +69 -65
  49. package/dist/components/Company/StateTaxes/TaxRateManagement/AddTaxRateDialog.js.map +1 -1
  50. package/dist/components/Company/StateTaxes/TaxRateManagement/context.js +3 -6
  51. package/dist/components/Company/StateTaxes/TaxRateManagement/context.js.map +1 -1
  52. package/dist/components/Company/StateTaxes/TaxRateManagement/toHistoryRows.js +30 -23
  53. package/dist/components/Company/StateTaxes/TaxRateManagement/toHistoryRows.js.map +1 -1
  54. package/dist/components/Company/StateTaxes/shared/RequirementFields.d.ts +8 -4
  55. package/dist/components/Company/StateTaxes/shared/RequirementFields.js +13 -12
  56. package/dist/components/Company/StateTaxes/shared/RequirementFields.js.map +1 -1
  57. package/dist/components/Company/StateTaxes/shared/prepareRequirements.d.ts +29 -0
  58. package/dist/components/Company/StateTaxes/shared/prepareRequirements.js +24 -0
  59. package/dist/components/Company/StateTaxes/shared/prepareRequirements.js.map +1 -0
  60. package/dist/components/Company/StateTaxes/shared/prepareRequirements.test.d.ts +1 -0
  61. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js +68 -55
  62. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -1
  63. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +36 -35
  64. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  65. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +3 -6
  66. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  67. package/dist/components/Employee/Paystubs/management/PaystubsCard/PaystubsCard.js +84 -96
  68. package/dist/components/Employee/Paystubs/management/PaystubsCard/PaystubsCard.js.map +1 -1
  69. package/dist/components/Flow/Flow.js +22 -22
  70. package/dist/components/Flow/Flow.js.map +1 -1
  71. package/dist/components/Flow/useFlow.js +3 -3
  72. package/dist/components/InformationRequests/InformationRequests.d.ts +1 -1
  73. package/dist/components/InformationRequests/InformationRequests.js +68 -53
  74. package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
  75. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +2 -3
  76. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
  77. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +52 -50
  78. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
  79. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.d.ts +1 -1
  80. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +86 -67
  81. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
  82. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationTypes.d.ts +4 -0
  83. package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.d.ts +1 -1
  84. package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.js +26 -21
  85. package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.js.map +1 -1
  86. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.d.ts +8 -1
  87. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +29 -17
  88. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
  89. package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.js +21 -18
  90. package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.js.map +1 -1
  91. package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.module.scss.js +9 -7
  92. package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.module.scss.js.map +1 -1
  93. package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.d.ts +2 -0
  94. package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.js.map +1 -1
  95. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +193 -191
  96. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  97. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +3 -2
  98. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +31 -31
  99. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
  100. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +254 -243
  101. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  102. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +83 -76
  103. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
  104. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +23 -22
  105. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  106. package/dist/components/Payroll/PayrollList/PayrollList.js +108 -97
  107. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  108. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +38 -37
  109. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  110. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +176 -167
  111. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  112. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +2 -1
  113. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +173 -164
  114. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  115. package/dist/components/Payroll/usePreparedPayrollData.js +12 -15
  116. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  117. package/dist/helpers/openPdfInNewTab.d.ts +15 -0
  118. package/dist/helpers/openPdfInNewTab.js +28 -0
  119. package/dist/helpers/openPdfInNewTab.js.map +1 -0
  120. package/dist/i18n/en/Company.StateTaxes.json.js +1 -1
  121. package/dist/i18n/en/Payroll.OffCycleCreation.json.js +11 -9
  122. package/dist/i18n/en/Payroll.OffCycleCreation.json.js.map +1 -1
  123. package/dist/i18n/en/Payroll.OffCycleTaxWithholding.json.js +7 -7
  124. package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js +29 -27
  125. package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js.map +1 -1
  126. package/dist/i18n/en/Payroll.PayrollOverview.json.js +43 -41
  127. package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
  128. package/dist/i18n/types.d.ts +20 -0
  129. package/dist/style.css +1 -1
  130. package/package.json +17 -17
@@ -1,220 +1,232 @@
1
1
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
2
- import { useForm as Re, useFieldArray as Oe, useWatch as Me, FormProvider as Ae } from "react-hook-form";
3
- import { useRef as xe, useMemo as w, useState as G } from "react";
4
- import { PayrollEmployeeCompensationsTypePaymentMethod as _ } from "@gusto/embedded-api/models/components/payrollemployeecompensationstype";
5
- import { useTranslation as ve } from "react-i18next";
2
+ import { useForm as J, useFieldArray as Te, useWatch as Pe, FormProvider as ee } from "react-hook-form";
3
+ import { useRef as Me, useMemo as w, useState as Oe } from "react";
4
+ import { PayrollEmployeeCompensationsTypePaymentMethod as L } from "@gusto/embedded-api/models/components/payrollemployeecompensationstype";
5
+ import { useTranslation as Ae } from "react-i18next";
6
6
  import { z as s } from "zod";
7
- import { zodResolver as Se } from "@hookform/resolvers/zod";
8
- import d from "./PayrollEditEmployeePresentation.module.scss.js";
9
- import { TimeOffField as De, PayoutTimeOffField as Ie } from "./TimeOffField.js";
10
- import { Flex as N } from "../../Common/Flex/Flex.js";
11
- import { Grid as A } from "../../Common/Grid/Grid.js";
12
- import { EmptyData as Fe } from "../../Common/EmptyData/EmptyData.js";
13
- import { useComponentContext as _e } from "../../../contexts/ComponentAdapter/useComponentContext.js";
14
- import { useI18n as Le } from "../../../i18n/I18n.js";
15
- import { Form as Ue } from "../../Common/Form/Form.js";
16
- import { formatNumberAsCurrency as re, firstLastName as ke } from "../../../helpers/formattedStrings.js";
17
- import { getAdditionalEarningsCompensations as je, calculateGrossPay as se } from "../helpers.js";
18
- import { PayrollCategory as S, isOffCyclePayroll as ue } from "../payrollTypes.js";
19
- import { COMPENSATION_NAME_REIMBURSEMENT as x, HOURS_COMPENSATION_NAMES as ae, EXCLUDED_ADDITIONAL_EARNINGS as we, COMPENSATION_NAME_DOUBLE_OVERTIME as Ge, COMPENSATION_NAME_OVERTIME as He, COMPENSATION_NAME_REGULAR_HOURS as $e, COMPENSATION_NAME_CASH_TIPS as Be, COMPENSATION_NAME_COMMISSION as Ve, COMPENSATION_NAME_CORRECTION_PAYMENT as qe, COMPENSATION_NAME_PAYCHECK_TIPS as ze, COMPENSATION_NAME_BONUS as We } from "../../../shared/constants.js";
20
- import Ye from "../../../hooks/useContainerBreakpoints/useContainerBreakpoints.js";
21
- import oe from "../../../assets/icons/plus-circle.svg.js";
22
- import Ke from "../../../assets/icons/trashcan.svg.js";
23
- import { TextInputField as H } from "../../Common/Fields/TextInputField/TextInputField.js";
24
- import { RadioGroupField as Xe } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
25
- import { useDataView as Qe } from "../../Common/DataView/useDataView.js";
26
- import { DataView as Ze } from "../../Common/DataView/DataView.js";
27
- const Je = s.object({
7
+ import { zodResolver as ne } from "@hookform/resolvers/zod";
8
+ import c from "./PayrollEditEmployeePresentation.module.scss.js";
9
+ import { TimeOffField as Re, PayoutTimeOffField as ve } from "./TimeOffField.js";
10
+ import { Flex as E } from "../../Common/Flex/Flex.js";
11
+ import { Grid as v } from "../../Common/Grid/Grid.js";
12
+ import { EmptyData as Se } from "../../Common/EmptyData/EmptyData.js";
13
+ import { useComponentContext as xe } from "../../../contexts/ComponentAdapter/useComponentContext.js";
14
+ import { useI18n as Fe } from "../../../i18n/I18n.js";
15
+ import { Form as Ie } from "../../Common/Form/Form.js";
16
+ import { formatNumberAsCurrency as ie, firstLastName as De } from "../../../helpers/formattedStrings.js";
17
+ import { getAdditionalEarningsCompensations as _e, calculateGrossPay as te } from "../helpers.js";
18
+ import { PayrollCategory as F, isOffCyclePayroll as oe } from "../payrollTypes.js";
19
+ import { COMPENSATION_NAME_REIMBURSEMENT as S, HOURS_COMPENSATION_NAMES as re, EXCLUDED_ADDITIONAL_EARNINGS as Le, COMPENSATION_NAME_DOUBLE_OVERTIME as Ue, COMPENSATION_NAME_OVERTIME as ke, COMPENSATION_NAME_REGULAR_HOURS as je, COMPENSATION_NAME_CASH_TIPS as Ge, COMPENSATION_NAME_COMMISSION as He, COMPENSATION_NAME_CORRECTION_PAYMENT as we, COMPENSATION_NAME_PAYCHECK_TIPS as $e, COMPENSATION_NAME_BONUS as Ve } from "../../../shared/constants.js";
20
+ import Be from "../../../hooks/useContainerBreakpoints/useContainerBreakpoints.js";
21
+ import se from "../../../assets/icons/plus-circle.svg.js";
22
+ import qe from "../../../assets/icons/trashcan.svg.js";
23
+ import { TextInputField as x } from "../../Common/Fields/TextInputField/TextInputField.js";
24
+ import { RadioGroupField as ze } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
25
+ import { useDataView as We } from "../../Common/DataView/useDataView.js";
26
+ import { DataView as Ye } from "../../Common/DataView/DataView.js";
27
+ const Ke = s.object({
28
28
  uuid: s.string().nullable().optional(),
29
29
  description: s.string(),
30
30
  amount: s.string(),
31
31
  recurring: s.boolean().optional()
32
- }), en = s.object({
32
+ }), Xe = s.object({
33
+ description: s.string(),
34
+ amount: s.string().refine(
35
+ (u) => {
36
+ const g = parseFloat(u);
37
+ return !Number.isNaN(g) && g > 0;
38
+ },
39
+ { message: "validations.reimbursementAmount" }
40
+ )
41
+ }), Qe = s.string().optional().refine((u) => !u || parseFloat(u) >= 0, { message: "validations.negativeAmount" }), Ze = s.object({
33
42
  hourlyCompensations: s.record(s.string(), s.record(s.string(), s.string().optional())),
34
43
  timeOffCompensations: s.record(s.string(), s.string().optional()),
35
44
  finalPayoutCompensations: s.record(s.string(), s.string().optional()),
36
- fixedCompensations: s.record(s.string(), s.string().optional()),
37
- reimbursements: s.array(Je),
38
- paymentMethod: s.enum(_).optional()
39
- }), me = (f, v, c, o, D = S.Regular) => {
45
+ fixedCompensations: s.record(s.string(), Qe),
46
+ reimbursements: s.array(Ke),
47
+ paymentMethod: s.enum(L).optional()
48
+ }), ae = (u, g, p, o, I = F.Regular) => {
40
49
  const C = {
41
- ...v,
42
- paymentMethod: f.paymentMethod
50
+ ...g,
51
+ paymentMethod: u.paymentMethod
43
52
  };
44
- C.hourlyCompensations = v?.hourlyCompensations?.map(
53
+ C.hourlyCompensations = g?.hourlyCompensations?.map(
45
54
  (r) => {
46
- const m = r.jobUuid && r.name ? f.hourlyCompensations[r.jobUuid]?.[r.name] : void 0;
55
+ const m = r.jobUuid && r.name ? u.hourlyCompensations[r.jobUuid]?.[r.name] : void 0;
47
56
  return m ? {
48
57
  ...r,
49
58
  hours: m
50
59
  } : r;
51
60
  }
52
- ), C.paidTimeOff = c.map((r) => {
53
- const m = D === S.Dismissal, { finalPayoutUnusedHoursInput: L, ...l } = r;
61
+ ), C.paidTimeOff = p.map((r) => {
62
+ const m = I === F.Dismissal, { finalPayoutUnusedHoursInput: U, ...d } = r;
54
63
  if (m) {
55
- const R = f.finalPayoutCompensations[r.name] ?? r.finalPayoutUnusedHoursInput;
64
+ const O = u.finalPayoutCompensations[r.name] ?? r.finalPayoutUnusedHoursInput;
56
65
  return {
57
66
  ...r,
58
- hours: f.timeOffCompensations[r.name] || "0",
59
- ...R != null ? { finalPayoutUnusedHoursInput: R || "0" } : {}
67
+ hours: u.timeOffCompensations[r.name] || "0",
68
+ ...O != null ? { finalPayoutUnusedHoursInput: O || "0" } : {}
60
69
  };
61
70
  }
62
71
  return {
63
- ...l,
64
- hours: f.timeOffCompensations[r.name] || "0"
72
+ ...d,
73
+ hours: u.timeOffCompensations[r.name] || "0"
65
74
  };
66
75
  });
67
- const P = !ue(D), E = [];
68
- return Object.entries(f.fixedCompensations).forEach(([r, m]) => {
69
- if (r.toLowerCase() === x.toLowerCase() && P)
76
+ const M = !oe(I), T = [];
77
+ return Object.entries(u.fixedCompensations).forEach(([r, m]) => {
78
+ if (r.toLowerCase() === S.toLowerCase() && M)
70
79
  return;
71
- const l = v?.fixedCompensations?.find(
72
- (R) => R.name?.toLowerCase() === r.toLowerCase()
80
+ const d = g?.fixedCompensations?.find(
81
+ (O) => O.name?.toLowerCase() === r.toLowerCase()
73
82
  );
74
- m !== void 0 && m !== "" && (l ? E.push({
75
- name: l.name,
76
- jobUuid: l.jobUuid,
83
+ m !== void 0 && m !== "" && (d ? T.push({
84
+ name: d.name,
85
+ jobUuid: d.jobUuid,
77
86
  amount: m
78
- }) : parseFloat(m) !== 0 && E.push({
87
+ }) : parseFloat(m) !== 0 && T.push({
79
88
  name: r,
80
89
  jobUuid: o,
81
90
  amount: m
82
91
  }));
83
- }), C.fixedCompensations = E, P ? C.reimbursements = f.reimbursements.map((r) => ({
92
+ }), C.fixedCompensations = T, M ? C.reimbursements = u.reimbursements.map((r) => ({
84
93
  amount: r.amount,
85
94
  description: r.description.trim() === "" ? null : r.description.trim(),
86
95
  uuid: r.uuid ?? null,
87
96
  recurring: r.recurring
88
97
  })) : C.reimbursements = [], C;
89
- }, vn = ({
90
- onSave: f,
91
- onCancel: v,
92
- employee: c,
98
+ }, Rn = ({
99
+ onSave: u,
100
+ onCancel: g,
101
+ employee: p,
93
102
  employeeCompensation: o,
94
- isPending: D = !1,
103
+ isPending: I = !1,
95
104
  fixedCompensationTypes: C,
96
- payPeriodStartDate: P,
97
- paySchedule: E,
98
- payrollCategory: r = S.Regular,
105
+ payPeriodStartDate: M,
106
+ paySchedule: T,
107
+ payrollCategory: r = F.Regular,
99
108
  withReimbursements: m = !0,
100
- hasDirectDepositSetup: L = !0
109
+ hasDirectDepositSetup: U = !0
101
110
  }) => {
102
- const { Button: l, ButtonIcon: R, Heading: p, Text: $, TextInput: B } = _e(), { t: n } = ve("Payroll.PayrollEditEmployee");
103
- Le("Payroll.PayrollEditEmployee");
104
- const h = c.jobs?.find((e) => e.primary), le = o?.hourlyCompensations?.some(
111
+ const { Button: d, ButtonIcon: O, Heading: f, Text: $ } = xe(), { t: n } = Ae("Payroll.PayrollEditEmployee");
112
+ Fe("Payroll.PayrollEditEmployee");
113
+ const h = p.jobs?.find((e) => e.primary), me = o?.hourlyCompensations?.some(
105
114
  (e) => e.jobUuid === h?.uuid
106
- ), O = h && le ? [h] : [], V = xe(null), b = Ye({
115
+ ), A = h && me ? [h] : [], V = Me(null), b = Be({
107
116
  ref: V
108
117
  }).includes("small");
109
118
  o?.hourlyCompensations?.forEach((e) => {
110
- const t = c.jobs?.find((u) => u.uuid === e.jobUuid);
111
- t && !O.find((u) => u.uuid === t.uuid) && O.push(t);
119
+ const t = p.jobs?.find((l) => l.uuid === e.jobUuid);
120
+ t && !A.find((l) => l.uuid === t.uuid) && A.push(t);
112
121
  });
113
- const T = (o?.paidTimeOff || []).filter((e) => e.name), U = je({
122
+ const P = (o?.paidTimeOff || []).filter((e) => e.name), k = _e({
114
123
  flsaStatus: h?.compensations?.[0]?.flsaStatus,
115
124
  existingFixedCompensations: o?.fixedCompensations || [],
116
125
  primaryJobUuid: h?.uuid,
117
126
  fixedCompensationTypes: C,
118
- excludedTypes: we
119
- }), I = !ue(r), de = w(
120
- () => m && I ? o?.reimbursements ?? [] : [],
121
- [m, I, o?.reimbursements]
122
- ), ce = w(
127
+ excludedTypes: Le
128
+ }), D = !oe(r), ue = w(
129
+ () => m && D ? o?.reimbursements ?? [] : [],
130
+ [m, D, o?.reimbursements]
131
+ ), le = w(
123
132
  () => o?.fixedCompensations?.find(
124
- (e) => e.name?.toLowerCase() === x.toLowerCase()
133
+ (e) => e.name?.toLowerCase() === S.toLowerCase()
125
134
  ),
126
135
  [o?.fixedCompensations]
127
- ), q = m && !I && !!h?.uuid, z = (e, t) => o?.hourlyCompensations?.find(
128
- (u) => u.jobUuid === e && u.name?.toLowerCase() === t.toLowerCase()
129
- ), pe = (e) => {
136
+ ), B = m && !D && !!h?.uuid, q = (e, t) => o?.hourlyCompensations?.find(
137
+ (l) => l.jobUuid === e && l.name?.toLowerCase() === t.toLowerCase()
138
+ ), de = (e) => {
130
139
  switch (e) {
131
- case $e:
140
+ case je:
132
141
  return n("compensationNames.regularHours");
133
- case He:
142
+ case ke:
134
143
  return n("compensationNames.overtime");
135
- case Ge:
144
+ case Ue:
136
145
  return n("compensationNames.doubleOvertime");
137
146
  default:
138
147
  return e;
139
148
  }
140
- }, W = (e) => {
149
+ }, z = (e) => {
141
150
  switch (e) {
142
- case We:
151
+ case Ve:
143
152
  return n("fixedCompensationNames.bonus");
144
- case ze:
153
+ case $e:
145
154
  return n("fixedCompensationNames.paycheckTips");
146
- case qe:
155
+ case we:
147
156
  return n("fixedCompensationNames.correctionPayment");
148
- case Ve:
157
+ case He:
149
158
  return n("fixedCompensationNames.commission");
150
- case Be:
159
+ case Ge:
151
160
  return n("fixedCompensationNames.cashTips");
152
- case x:
161
+ case S:
153
162
  return n("fixedCompensationNames.reimbursement");
154
163
  default:
155
164
  return e;
156
165
  }
157
- }, fe = {
166
+ }, ce = {
158
167
  hourlyCompensations: (() => {
159
168
  const e = {};
160
- return O.forEach((t) => {
161
- ae.forEach((u) => {
162
- const M = z(t.uuid, u);
163
- M && (e[t.uuid] || (e[t.uuid] = {}), e[t.uuid][M.name] = M.hours ? parseFloat(M.hours).toString() : "");
169
+ return A.forEach((t) => {
170
+ re.forEach((l) => {
171
+ const R = q(t.uuid, l);
172
+ R && (e[t.uuid] || (e[t.uuid] = {}), e[t.uuid][R.name] = R.hours ? parseFloat(R.hours).toString() : "");
164
173
  });
165
174
  }), e;
166
175
  })(),
167
176
  timeOffCompensations: (() => {
168
177
  const e = {};
169
- return T.forEach((t) => {
178
+ return P.forEach((t) => {
170
179
  e[t.name] = t.hours ? parseFloat(t.hours).toString() : "";
171
180
  }), e;
172
181
  })(),
173
182
  finalPayoutCompensations: (() => {
174
183
  const e = {};
175
- return T.forEach((t) => {
184
+ return P.forEach((t) => {
176
185
  e[t.name] = t.finalPayoutUnusedHoursInput ?? "0";
177
186
  }), e;
178
187
  })(),
179
188
  fixedCompensations: (() => {
180
189
  const e = {};
181
- return U.forEach((t) => {
190
+ return k.forEach((t) => {
182
191
  e[t.name] = t.amount ?? "";
183
- }), q && (e[x] = ce?.amount ?? "0.00"), e;
192
+ }), B && (e[S] = le?.amount ?? "0.00"), e;
184
193
  })(),
185
- reimbursements: de.map((e) => ({
194
+ reimbursements: ue.map((e) => ({
186
195
  uuid: e.uuid ?? null,
187
196
  description: e.description ?? "",
188
197
  amount: e.amount,
189
198
  recurring: e.recurring ?? !1
190
199
  })),
191
- paymentMethod: o?.paymentMethod || _.DirectDeposit
192
- }, F = Re({
193
- resolver: Se(en),
194
- defaultValues: fe
200
+ paymentMethod: o?.paymentMethod || L.DirectDeposit
201
+ }, _ = J({
202
+ resolver: ne(Ze),
203
+ defaultValues: ce
195
204
  }), {
196
- fields: Y,
197
- append: he,
198
- remove: be,
199
- update: Ce
200
- } = Oe({
201
- control: F.control,
205
+ fields: W,
206
+ append: pe,
207
+ remove: fe,
208
+ update: he
209
+ } = Te({
210
+ control: _.control,
202
211
  name: "reimbursements"
203
- }), ge = (e) => {
204
- const t = Y[e];
205
- t && (t.uuid ? Ce(e, { ...t, amount: "0" }) : be(e));
206
- }, k = Y.map((e, t) => ({ ...e, originalIndex: t })).filter((e) => parseFloat(e.amount || "0") !== 0), [K, j] = G(!1), [X, Q] = G(""), [Z, J] = G(""), ee = () => {
207
- j(!1), Q(""), J("");
208
- }, ye = () => {
209
- const e = Z.trim(), t = parseFloat(e || "0");
210
- Number.isNaN(t) || t <= 0 || (he({
212
+ }), be = (e) => {
213
+ const t = W[e];
214
+ t && (t.uuid ? he(e, { ...t, amount: "0" }) : fe(e));
215
+ }, j = W.map((e, t) => ({ ...e, originalIndex: t })).filter((e) => parseFloat(e.amount || "0") !== 0), [Y, G] = Oe(!1), H = J({
216
+ resolver: ne(Xe),
217
+ defaultValues: { description: "", amount: "" }
218
+ }), K = () => {
219
+ G(!1), H.reset();
220
+ }, ge = (e) => {
221
+ const t = parseFloat(e.amount);
222
+ pe({
211
223
  uuid: null,
212
- description: X.trim(),
224
+ description: e.description.trim(),
213
225
  amount: t.toFixed(2),
214
226
  recurring: !1
215
- }), ee());
216
- }, Ne = Qe({
217
- data: k,
227
+ }), K();
228
+ }, Ce = We({
229
+ data: j,
218
230
  columns: [
219
231
  {
220
232
  key: "description",
@@ -224,7 +236,7 @@ const Je = s.object({
224
236
  {
225
237
  key: "amount",
226
238
  title: n("reimbursementAmountColumn"),
227
- render: (e) => re(parseFloat(e.amount || "0"))
239
+ render: (e) => ie(parseFloat(e.amount || "0"))
228
240
  },
229
241
  {
230
242
  key: "recurring",
@@ -236,267 +248,266 @@ const Je = s.object({
236
248
  if (e.recurring) return null;
237
249
  const t = e.description.trim() || n("reimbursementUnnamedFallback");
238
250
  return /* @__PURE__ */ i(
239
- R,
251
+ O,
240
252
  {
241
253
  variant: "tertiary",
242
254
  onClick: () => {
243
- ge(e.originalIndex);
255
+ be(e.originalIndex);
244
256
  },
245
257
  "aria-label": n("removeReimbursementLabel", { description: t }),
246
- children: /* @__PURE__ */ i(Ke, { "aria-hidden": !0 })
258
+ children: /* @__PURE__ */ i(qe, { "aria-hidden": !0 })
247
259
  }
248
260
  );
249
261
  },
250
- emptyState: () => /* @__PURE__ */ i(Fe, { title: n("reimbursementEmptyTitle"), children: /* @__PURE__ */ i(
251
- l,
262
+ emptyState: () => /* @__PURE__ */ i(Se, { title: n("reimbursementEmptyTitle"), children: /* @__PURE__ */ i(
263
+ d,
252
264
  {
253
265
  variant: "secondary",
254
266
  onClick: () => {
255
- j(!0);
267
+ G(!0);
256
268
  },
257
- icon: /* @__PURE__ */ i(oe, { "aria-hidden": !0 }),
269
+ icon: /* @__PURE__ */ i(se, { "aria-hidden": !0 }),
258
270
  children: n("addReimbursementCta")
259
271
  }
260
272
  ) })
261
- }), g = Me({
262
- control: F.control
263
- }), Ee = w(() => {
273
+ }), y = Pe({
274
+ control: _.control
275
+ }), ye = w(() => {
264
276
  try {
265
277
  const e = {};
266
- g.hourlyCompensations && Object.entries(g.hourlyCompensations).forEach(([y, ie]) => {
267
- ie && (e[y] = ie);
278
+ y.hourlyCompensations && Object.entries(y.hourlyCompensations).forEach(([N, Z]) => {
279
+ Z && (e[N] = Z);
268
280
  });
269
- const t = (g.reimbursements ?? []).map((y) => ({
270
- uuid: y.uuid ?? null,
271
- description: y.description ?? "",
272
- amount: y.amount ?? "0",
273
- recurring: y.recurring
274
- })), u = {
281
+ const t = (y.reimbursements ?? []).map((N) => ({
282
+ uuid: N.uuid ?? null,
283
+ description: N.description ?? "",
284
+ amount: N.amount ?? "0",
285
+ recurring: N.recurring
286
+ })), l = {
275
287
  hourlyCompensations: e,
276
- timeOffCompensations: g.timeOffCompensations || {},
277
- finalPayoutCompensations: g.finalPayoutCompensations || {},
278
- fixedCompensations: g.fixedCompensations || {},
288
+ timeOffCompensations: y.timeOffCompensations || {},
289
+ finalPayoutCompensations: y.finalPayoutCompensations || {},
290
+ fixedCompensations: y.fixedCompensations || {},
279
291
  reimbursements: t,
280
- paymentMethod: g.paymentMethod
281
- }, M = me(
282
- u,
292
+ paymentMethod: y.paymentMethod
293
+ }, R = ae(
294
+ l,
283
295
  o,
284
- (o?.paidTimeOff || []).filter((y) => y.name),
296
+ (o?.paidTimeOff || []).filter((N) => N.name),
285
297
  h?.uuid,
286
298
  r
287
299
  );
288
- return se(
300
+ return te(
301
+ R,
302
+ p,
289
303
  M,
290
- c,
291
- P,
292
- E,
304
+ T,
293
305
  r
294
306
  );
295
307
  } catch {
296
- return o ? se(
308
+ return o ? te(
297
309
  o,
298
- c,
299
- P,
300
- E,
310
+ p,
311
+ M,
312
+ T,
301
313
  r
302
314
  ) : 0;
303
315
  }
304
316
  }, [
305
- g,
317
+ y,
306
318
  o,
307
319
  h?.uuid,
308
- c,
309
- P,
310
- E,
320
+ p,
321
+ M,
322
+ T,
311
323
  r
312
- ]), Te = ke({
313
- first_name: c.firstName,
314
- last_name: c.lastName
315
- }), Pe = (e) => {
316
- const t = me(
324
+ ]), Ne = De({
325
+ first_name: p.firstName,
326
+ last_name: p.lastName
327
+ }), Ee = (e) => {
328
+ const t = ae(
317
329
  e,
318
330
  o,
319
- T,
331
+ P,
320
332
  h?.uuid,
321
333
  r
322
334
  );
323
- f(t);
324
- }, ne = re(Ee || 0), te = /* @__PURE__ */ a(
325
- N,
335
+ u(t);
336
+ }, X = ie(ye || 0), Q = /* @__PURE__ */ a(
337
+ E,
326
338
  {
327
339
  flexDirection: b ? "row" : "column",
328
340
  justifyContent: b ? "flex-end" : "normal",
329
341
  alignItems: b ? "flex-start" : "stretch",
330
342
  gap: 12,
331
343
  children: [
332
- /* @__PURE__ */ i(l, { variant: "secondary", onClick: v, title: n("cancelCta"), children: n("cancelCta") }),
344
+ /* @__PURE__ */ i(d, { variant: "secondary", onClick: g, title: n("cancelCta"), children: n("cancelCta") }),
333
345
  /* @__PURE__ */ i(
334
- l,
346
+ d,
335
347
  {
336
- onClick: F.handleSubmit(Pe),
348
+ onClick: _.handleSubmit(Ee),
337
349
  title: n("saveCta"),
338
- isLoading: D,
350
+ isLoading: I,
339
351
  children: n("saveCta")
340
352
  }
341
353
  )
342
354
  ]
343
355
  }
344
356
  );
345
- return /* @__PURE__ */ a("div", { ref: V, className: d.container, children: [
357
+ return /* @__PURE__ */ a("div", { ref: V, className: c.container, children: [
346
358
  /* @__PURE__ */ i(
347
359
  "div",
348
360
  {
349
- className: `${d.headerSection} ${b ? "" : d.headerSectionSticky}`,
350
- children: /* @__PURE__ */ a(N, { justifyContent: "space-between", children: [
351
- /* @__PURE__ */ a(N, { flexDirection: "column", gap: b ? 8 : 2, children: [
352
- /* @__PURE__ */ i(p, { as: "h1", styledAs: b ? "h2" : "h4", children: n("pageTitle", { employeeName: Te }) }),
353
- b ? /* @__PURE__ */ a(N, { flexDirection: "column", gap: 6, children: [
354
- /* @__PURE__ */ i(p, { as: "h2", styledAs: "h3", children: ne }),
355
- /* @__PURE__ */ i($, { className: d.grossPayLabel, children: n("grossPayLabel") })
356
- ] }) : /* @__PURE__ */ i(p, { as: "h2", styledAs: "h6", className: d.grossPayLabel, children: n("grossPayLabelMobile", { grossPay: ne }) })
361
+ className: `${c.headerSection} ${b ? "" : c.headerSectionSticky}`,
362
+ children: /* @__PURE__ */ a(E, { justifyContent: "space-between", children: [
363
+ /* @__PURE__ */ a(E, { flexDirection: "column", gap: b ? 8 : 2, children: [
364
+ /* @__PURE__ */ i(f, { as: "h1", styledAs: b ? "h2" : "h4", children: n("pageTitle", { employeeName: Ne }) }),
365
+ b ? /* @__PURE__ */ a(E, { flexDirection: "column", gap: 6, children: [
366
+ /* @__PURE__ */ i(f, { as: "h2", styledAs: "h3", children: X }),
367
+ /* @__PURE__ */ i($, { className: c.grossPayLabel, children: n("grossPayLabel") })
368
+ ] }) : /* @__PURE__ */ i(f, { as: "h2", styledAs: "h6", className: c.grossPayLabel, children: n("grossPayLabelMobile", { grossPay: X }) })
357
369
  ] }),
358
- b && te
370
+ b && Q
359
371
  ] })
360
372
  }
361
373
  ),
362
- /* @__PURE__ */ a(Ae, { ...F, children: [
363
- /* @__PURE__ */ a(Ue, { children: [
364
- O.length > 0 && /* @__PURE__ */ a("div", { className: d.fieldGroup, children: [
365
- /* @__PURE__ */ i(p, { as: "h3", children: n("regularHoursTitle") }),
366
- O.map((e) => /* @__PURE__ */ a(N, { flexDirection: "column", gap: 8, children: [
367
- O.length > 1 && /* @__PURE__ */ i(p, { as: "h4", children: e.title }),
368
- /* @__PURE__ */ i(A, { gridTemplateColumns: { base: "1fr", small: [320, 320] }, gap: 20, children: ae.map((t) => {
369
- const u = z(
374
+ /* @__PURE__ */ a(ee, { ..._, children: [
375
+ /* @__PURE__ */ a(Ie, { children: [
376
+ A.length > 0 && /* @__PURE__ */ a("div", { className: c.fieldGroup, children: [
377
+ /* @__PURE__ */ i(f, { as: "h3", children: n("regularHoursTitle") }),
378
+ A.map((e) => /* @__PURE__ */ a(E, { flexDirection: "column", gap: 8, children: [
379
+ A.length > 1 && /* @__PURE__ */ i(f, { as: "h4", children: e.title }),
380
+ /* @__PURE__ */ i(v, { gridTemplateColumns: { base: "1fr", small: [320, 320] }, gap: 20, children: re.map((t) => {
381
+ const l = q(
370
382
  e.uuid,
371
383
  t
372
384
  );
373
- if (u)
385
+ if (l)
374
386
  return /* @__PURE__ */ i(
375
- H,
387
+ x,
376
388
  {
377
389
  type: "number",
378
390
  min: 0,
379
391
  adornmentEnd: n("hoursUnit"),
380
392
  isRequired: !0,
381
- label: pe(t),
382
- name: `hourlyCompensations.${e.uuid}.${u.name}`
393
+ label: de(t),
394
+ name: `hourlyCompensations.${e.uuid}.${l.name}`
383
395
  },
384
396
  t
385
397
  );
386
398
  }) })
387
399
  ] }, e.uuid))
388
400
  ] }),
389
- T.length > 0 && /* @__PURE__ */ a("div", { className: d.fieldGroup, children: [
390
- /* @__PURE__ */ i(p, { as: "h3", styledAs: "h4", children: r === S.Dismissal ? n("timeOffTitleDismissal") : n("timeOffTitle") }),
391
- /* @__PURE__ */ i(A, { gridTemplateColumns: { base: "1fr", small: [320, 320] }, gap: 20, children: T.map((e) => /* @__PURE__ */ i(
392
- De,
401
+ P.length > 0 && /* @__PURE__ */ a("div", { className: c.fieldGroup, children: [
402
+ /* @__PURE__ */ i(f, { as: "h3", styledAs: "h4", children: r === F.Dismissal ? n("timeOffTitleDismissal") : n("timeOffTitle") }),
403
+ /* @__PURE__ */ i(v, { gridTemplateColumns: { base: "1fr", small: [320, 320] }, gap: 20, children: P.map((e) => /* @__PURE__ */ i(
404
+ Re,
393
405
  {
394
406
  timeOff: e,
395
- employee: c
407
+ employee: p
396
408
  },
397
409
  e.name
398
410
  )) })
399
411
  ] }),
400
- r === S.Dismissal && T.length > 0 && /* @__PURE__ */ a("div", { className: d.fieldGroup, children: [
401
- /* @__PURE__ */ a(N, { flexDirection: "column", gap: 4, children: [
402
- /* @__PURE__ */ i(p, { as: "h3", styledAs: "h4", children: n("finalPayoutTitle") }),
412
+ r === F.Dismissal && P.length > 0 && /* @__PURE__ */ a("div", { className: c.fieldGroup, children: [
413
+ /* @__PURE__ */ a(E, { flexDirection: "column", gap: 4, children: [
414
+ /* @__PURE__ */ i(f, { as: "h3", styledAs: "h4", children: n("finalPayoutTitle") }),
403
415
  /* @__PURE__ */ i($, { variant: "supporting", children: n("finalPayoutDescription") })
404
416
  ] }),
405
- /* @__PURE__ */ i(A, { gridTemplateColumns: { base: "1fr", small: [320, 320] }, gap: 20, children: T.map((e) => /* @__PURE__ */ i(
406
- Ie,
417
+ /* @__PURE__ */ i(v, { gridTemplateColumns: { base: "1fr", small: [320, 320] }, gap: 20, children: P.map((e) => /* @__PURE__ */ i(
418
+ ve,
407
419
  {
408
420
  timeOff: e,
409
- employee: c
421
+ employee: p
410
422
  },
411
423
  `payout-${e.name}`
412
424
  )) })
413
425
  ] }),
414
- U.length > 0 && /* @__PURE__ */ a("div", { className: d.fieldGroup, children: [
415
- /* @__PURE__ */ i(p, { as: "h3", styledAs: "h4", children: n("additionalEarningsTitle") }),
426
+ k.length > 0 && /* @__PURE__ */ a("div", { className: c.fieldGroup, children: [
427
+ /* @__PURE__ */ i(f, { as: "h3", styledAs: "h4", children: n("additionalEarningsTitle") }),
416
428
  /* @__PURE__ */ i(
417
- A,
429
+ v,
418
430
  {
419
431
  gridTemplateColumns: { base: "1fr", small: [320, 320], large: [320, 320, 320] },
420
432
  gap: 20,
421
- children: U.map((e) => /* @__PURE__ */ i(
422
- H,
433
+ children: k.map((e) => /* @__PURE__ */ i(
434
+ x,
423
435
  {
424
436
  type: "number",
425
437
  min: 0,
426
438
  adornmentStart: "$",
427
439
  isRequired: !0,
428
- label: W(e.name),
429
- name: `fixedCompensations.${e.name}`
440
+ label: z(e.name),
441
+ name: `fixedCompensations.${e.name}`,
442
+ errorMessage: n("validations.negativeAmount")
430
443
  },
431
444
  e.name
432
445
  ))
433
446
  }
434
447
  )
435
448
  ] }),
436
- q && /* @__PURE__ */ a("div", { className: d.fieldGroup, children: [
437
- /* @__PURE__ */ i(p, { as: "h3", styledAs: "h4", children: n("reimbursementTitle") }),
438
- /* @__PURE__ */ i(A, { gridTemplateColumns: { base: "1fr", small: [320, 320] }, gap: 20, children: /* @__PURE__ */ i(
439
- H,
449
+ B && /* @__PURE__ */ a("div", { className: c.fieldGroup, children: [
450
+ /* @__PURE__ */ i(f, { as: "h3", styledAs: "h4", children: n("reimbursementTitle") }),
451
+ /* @__PURE__ */ i(v, { gridTemplateColumns: { base: "1fr", small: [320, 320] }, gap: 20, children: /* @__PURE__ */ i(
452
+ x,
440
453
  {
441
454
  type: "number",
442
455
  min: 0,
443
456
  adornmentStart: "$",
444
457
  isRequired: !0,
445
- label: W(x),
446
- name: `fixedCompensations.${x}`
458
+ label: z(S),
459
+ name: `fixedCompensations.${S}`,
460
+ errorMessage: n("validations.negativeAmount")
447
461
  }
448
462
  ) })
449
463
  ] }),
450
- m && I && /* @__PURE__ */ a("div", { className: d.fieldGroup, children: [
451
- /* @__PURE__ */ i(p, { as: "h3", styledAs: "h4", children: n("reimbursementTitle") }),
452
- !(k.length === 0 && K) && /* @__PURE__ */ i(Ze, { label: n("reimbursementsTableLabel"), ...Ne }),
453
- K ? /* @__PURE__ */ a(N, { flexDirection: "column", gap: 12, children: [
454
- /* @__PURE__ */ a(A, { gridTemplateColumns: { base: "1fr", small: [320, 320] }, gap: 20, children: [
464
+ m && D && /* @__PURE__ */ a("div", { className: c.fieldGroup, children: [
465
+ /* @__PURE__ */ i(f, { as: "h3", styledAs: "h4", children: n("reimbursementTitle") }),
466
+ !(j.length === 0 && Y) && /* @__PURE__ */ i(Ye, { label: n("reimbursementsTableLabel"), ...Ce }),
467
+ Y ? /* @__PURE__ */ i(ee, { ...H, children: /* @__PURE__ */ a(E, { flexDirection: "column", gap: 12, children: [
468
+ /* @__PURE__ */ a(v, { gridTemplateColumns: { base: "1fr", small: [320, 320] }, gap: 20, children: [
455
469
  /* @__PURE__ */ i(
456
- B,
470
+ x,
457
471
  {
458
- name: "newReimbursementDescription",
472
+ name: "description",
459
473
  label: n("reimbursementDescriptionLabel"),
460
- placeholder: n("reimbursementDescriptionPlaceholder"),
461
- value: X,
462
- onChange: Q
474
+ placeholder: n("reimbursementDescriptionPlaceholder")
463
475
  }
464
476
  ),
465
477
  /* @__PURE__ */ i(
466
- B,
478
+ x,
467
479
  {
468
- name: "newReimbursementAmount",
480
+ name: "amount",
469
481
  type: "number",
470
482
  min: 0,
471
483
  adornmentStart: "$",
472
484
  isRequired: !0,
473
485
  label: n("reimbursementAmountLabel"),
474
- value: Z,
475
- onChange: J
486
+ errorMessage: n("validations.reimbursementAmount")
476
487
  }
477
488
  )
478
489
  ] }),
479
- /* @__PURE__ */ a(N, { gap: 12, children: [
480
- /* @__PURE__ */ i(l, { onClick: ye, children: n("saveReimbursementCta") }),
481
- /* @__PURE__ */ i(l, { variant: "secondary", onClick: ee, children: n("cancelReimbursementCta") })
490
+ /* @__PURE__ */ a(E, { gap: 12, children: [
491
+ /* @__PURE__ */ i(d, { onClick: H.handleSubmit(ge), children: n("saveReimbursementCta") }),
492
+ /* @__PURE__ */ i(d, { variant: "secondary", onClick: K, children: n("cancelReimbursementCta") })
482
493
  ] })
483
- ] }) : k.length > 0 && /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(
484
- l,
494
+ ] }) }) : j.length > 0 && /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(
495
+ d,
485
496
  {
486
497
  variant: "secondary",
487
498
  onClick: () => {
488
- j(!0);
499
+ G(!0);
489
500
  },
490
501
  title: n("addReimbursementLink"),
491
- icon: /* @__PURE__ */ i(oe, { "aria-hidden": !0 }),
502
+ icon: /* @__PURE__ */ i(se, { "aria-hidden": !0 }),
492
503
  children: n("addReimbursementLink")
493
504
  }
494
505
  ) })
495
506
  ] }),
496
- L && /* @__PURE__ */ a("div", { className: d.fieldGroup, children: [
497
- /* @__PURE__ */ i(p, { as: "h3", styledAs: "h4", children: n("paymentMethodTitle") }),
507
+ U && /* @__PURE__ */ a("div", { className: c.fieldGroup, children: [
508
+ /* @__PURE__ */ i(f, { as: "h3", styledAs: "h4", children: n("paymentMethodTitle") }),
498
509
  /* @__PURE__ */ i(
499
- Xe,
510
+ ze,
500
511
  {
501
512
  name: "paymentMethod",
502
513
  isRequired: !0,
@@ -504,11 +515,11 @@ const Je = s.object({
504
515
  description: n("paymentMethodDescription"),
505
516
  options: [
506
517
  {
507
- value: _.DirectDeposit,
518
+ value: L.DirectDeposit,
508
519
  label: n("paymentMethodOptions.directDeposit")
509
520
  },
510
521
  {
511
- value: _.Check,
522
+ value: L.Check,
512
523
  label: n("paymentMethodOptions.check")
513
524
  }
514
525
  ]
@@ -516,11 +527,11 @@ const Je = s.object({
516
527
  )
517
528
  ] })
518
529
  ] }),
519
- !b && te
530
+ !b && Q
520
531
  ] })
521
532
  ] });
522
533
  };
523
534
  export {
524
- vn as PayrollEditEmployeePresentation
535
+ Rn as PayrollEditEmployeePresentation
525
536
  };
526
537
  //# sourceMappingURL=PayrollEditEmployeePresentation.js.map