@gusto/embedded-react-sdk 0.55.2 → 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.
- package/CHANGELOG.md +41 -0
- package/dist/components/Common/DataView/DataCards/DataCards.d.ts +2 -1
- package/dist/components/Common/DataView/DataCards/DataCards.js +63 -54
- package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
- package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js +14 -12
- package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js.map +1 -1
- package/dist/components/Common/DataView/DataTable/DataTable.d.ts +2 -1
- package/dist/components/Common/DataView/DataTable/DataTable.js +75 -66
- package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
- package/dist/components/Common/DataView/DataTable/DataTable.module.scss.js +8 -4
- package/dist/components/Common/DataView/DataTable/DataTable.module.scss.js.map +1 -1
- package/dist/components/Common/DataView/DataView.js +18 -17
- package/dist/components/Common/DataView/DataView.js.map +1 -1
- package/dist/components/Common/FieldLayout/FieldLayout.js +6 -6
- package/dist/components/Common/Fieldset/Fieldset.js +6 -6
- package/dist/components/Common/HorizontalFieldLayout/HorizontalFieldLayout.js +6 -6
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js +58 -49
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js.map +1 -1
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.module.scss.js +14 -10
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.module.scss.js.map +1 -1
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBoxTypes.d.ts +4 -0
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.d.ts +4 -0
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/List.js +11 -8
- package/dist/components/Company/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -4
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +5 -6
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +6 -7
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +27 -25
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +41 -36
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.d.ts +1 -0
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +3 -4
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Form.d.ts +9 -2
- package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js +19 -18
- package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +63 -62
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/TaxRateManagement/AddTaxRateDialog.js +69 -65
- package/dist/components/Company/StateTaxes/TaxRateManagement/AddTaxRateDialog.js.map +1 -1
- package/dist/components/Company/StateTaxes/TaxRateManagement/context.js +3 -4
- package/dist/components/Company/StateTaxes/TaxRateManagement/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/TaxRateManagement/toHistoryRows.js +30 -23
- package/dist/components/Company/StateTaxes/TaxRateManagement/toHistoryRows.js.map +1 -1
- package/dist/components/Company/StateTaxes/shared/RequirementFields.d.ts +8 -4
- package/dist/components/Company/StateTaxes/shared/RequirementFields.js +13 -12
- package/dist/components/Company/StateTaxes/shared/RequirementFields.js.map +1 -1
- package/dist/components/Company/StateTaxes/shared/prepareRequirements.d.ts +29 -0
- package/dist/components/Company/StateTaxes/shared/prepareRequirements.js +24 -0
- package/dist/components/Company/StateTaxes/shared/prepareRequirements.js.map +1 -0
- package/dist/components/Company/StateTaxes/shared/prepareRequirements.test.d.ts +1 -0
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js +68 -55
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +36 -35
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js +116 -116
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.d.ts +4 -0
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.js +19 -19
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/List.js +16 -13
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +3 -4
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.d.ts +4 -0
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js.map +1 -1
- package/dist/components/Employee/Paystubs/management/PaystubsCard/PaystubsCard.js +84 -96
- package/dist/components/Employee/Paystubs/management/PaystubsCard/PaystubsCard.js.map +1 -1
- package/dist/components/Flow/Flow.js +22 -22
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/Flow/useFlow.js +3 -3
- package/dist/components/InformationRequests/InformationRequests.d.ts +1 -1
- package/dist/components/InformationRequests/InformationRequests.js +68 -53
- package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +2 -3
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +87 -81
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.d.ts +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +86 -67
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationTypes.d.ts +4 -0
- package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.d.ts +1 -1
- package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.js +26 -21
- package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.d.ts +8 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +29 -17
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.js +21 -18
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.module.scss.js +9 -7
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.module.scss.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.d.ts +2 -0
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +200 -199
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +3 -2
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +32 -32
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +254 -243
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +83 -76
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +23 -22
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollList.js +108 -97
- package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +38 -37
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.d.ts +8 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +196 -174
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +3 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +173 -163
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/helpers.d.ts +0 -15
- package/dist/components/Payroll/helpers.js +13 -18
- package/dist/components/Payroll/helpers.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +8 -9
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/helpers/openPdfInNewTab.d.ts +15 -0
- package/dist/helpers/openPdfInNewTab.js +28 -0
- package/dist/helpers/openPdfInNewTab.js.map +1 -0
- package/dist/i18n/en/Company.DocumentList.json.js +34 -32
- package/dist/i18n/en/Company.DocumentList.json.js.map +1 -1
- package/dist/i18n/en/Company.StateTaxes.json.js +1 -1
- package/dist/i18n/en/Employee.DocumentSigner.json.js +24 -22
- package/dist/i18n/en/Employee.DocumentSigner.json.js.map +1 -1
- package/dist/i18n/en/Payroll.OffCycleCreation.json.js +11 -9
- package/dist/i18n/en/Payroll.OffCycleCreation.json.js.map +1 -1
- package/dist/i18n/en/Payroll.OffCycleTaxWithholding.json.js +7 -7
- package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js +29 -27
- package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollOverview.json.js +41 -39
- package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
- package/dist/i18n/types.d.ts +331 -1
- package/dist/style.css +1 -1
- package/package.json +21 -21
|
@@ -1,220 +1,232 @@
|
|
|
1
1
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
2
|
-
import { useForm as
|
|
3
|
-
import { useRef as
|
|
4
|
-
import { PayrollEmployeeCompensationsTypePaymentMethod as
|
|
5
|
-
import { useTranslation as
|
|
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
|
|
8
|
-
import
|
|
9
|
-
import { TimeOffField as
|
|
10
|
-
import { Flex as
|
|
11
|
-
import { Grid as
|
|
12
|
-
import { EmptyData as
|
|
13
|
-
import { useComponentContext as
|
|
14
|
-
import { useI18n as
|
|
15
|
-
import { Form as
|
|
16
|
-
import { formatNumberAsCurrency as
|
|
17
|
-
import { getAdditionalEarningsCompensations as
|
|
18
|
-
import { PayrollCategory as
|
|
19
|
-
import { COMPENSATION_NAME_REIMBURSEMENT as
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import { TextInputField as
|
|
24
|
-
import { RadioGroupField as
|
|
25
|
-
import { useDataView as
|
|
26
|
-
import { DataView as
|
|
27
|
-
const
|
|
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
|
-
}),
|
|
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(),
|
|
37
|
-
reimbursements: s.array(
|
|
38
|
-
paymentMethod: s.enum(
|
|
39
|
-
}),
|
|
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
|
-
...
|
|
42
|
-
paymentMethod:
|
|
50
|
+
...g,
|
|
51
|
+
paymentMethod: u.paymentMethod
|
|
43
52
|
};
|
|
44
|
-
C.hourlyCompensations =
|
|
53
|
+
C.hourlyCompensations = g?.hourlyCompensations?.map(
|
|
45
54
|
(r) => {
|
|
46
|
-
const m = r.jobUuid && r.name ?
|
|
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 =
|
|
53
|
-
const m =
|
|
61
|
+
), C.paidTimeOff = p.map((r) => {
|
|
62
|
+
const m = I === F.Dismissal, { finalPayoutUnusedHoursInput: U, ...d } = r;
|
|
54
63
|
if (m) {
|
|
55
|
-
const
|
|
64
|
+
const O = u.finalPayoutCompensations[r.name] ?? r.finalPayoutUnusedHoursInput;
|
|
56
65
|
return {
|
|
57
66
|
...r,
|
|
58
|
-
hours:
|
|
59
|
-
...
|
|
67
|
+
hours: u.timeOffCompensations[r.name] || "0",
|
|
68
|
+
...O != null ? { finalPayoutUnusedHoursInput: O || "0" } : {}
|
|
60
69
|
};
|
|
61
70
|
}
|
|
62
71
|
return {
|
|
63
|
-
...
|
|
64
|
-
hours:
|
|
72
|
+
...d,
|
|
73
|
+
hours: u.timeOffCompensations[r.name] || "0"
|
|
65
74
|
};
|
|
66
75
|
});
|
|
67
|
-
const
|
|
68
|
-
return Object.entries(
|
|
69
|
-
if (r.toLowerCase() ===
|
|
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
|
|
72
|
-
(
|
|
80
|
+
const d = g?.fixedCompensations?.find(
|
|
81
|
+
(O) => O.name?.toLowerCase() === r.toLowerCase()
|
|
73
82
|
);
|
|
74
|
-
m !== void 0 && m !== "" && (
|
|
75
|
-
name:
|
|
76
|
-
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 &&
|
|
87
|
+
}) : parseFloat(m) !== 0 && T.push({
|
|
79
88
|
name: r,
|
|
80
89
|
jobUuid: o,
|
|
81
90
|
amount: m
|
|
82
91
|
}));
|
|
83
|
-
}), C.fixedCompensations =
|
|
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
|
-
},
|
|
90
|
-
onSave:
|
|
91
|
-
onCancel:
|
|
92
|
-
employee:
|
|
98
|
+
}, Rn = ({
|
|
99
|
+
onSave: u,
|
|
100
|
+
onCancel: g,
|
|
101
|
+
employee: p,
|
|
93
102
|
employeeCompensation: o,
|
|
94
|
-
isPending:
|
|
103
|
+
isPending: I = !1,
|
|
95
104
|
fixedCompensationTypes: C,
|
|
96
|
-
payPeriodStartDate:
|
|
97
|
-
paySchedule:
|
|
98
|
-
payrollCategory: r =
|
|
105
|
+
payPeriodStartDate: M,
|
|
106
|
+
paySchedule: T,
|
|
107
|
+
payrollCategory: r = F.Regular,
|
|
99
108
|
withReimbursements: m = !0,
|
|
100
|
-
hasDirectDepositSetup:
|
|
109
|
+
hasDirectDepositSetup: U = !0
|
|
101
110
|
}) => {
|
|
102
|
-
const { Button:
|
|
103
|
-
|
|
104
|
-
const h =
|
|
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
|
-
),
|
|
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 =
|
|
111
|
-
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
|
|
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:
|
|
119
|
-
}),
|
|
120
|
-
() => m &&
|
|
121
|
-
[m,
|
|
122
|
-
),
|
|
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() ===
|
|
133
|
+
(e) => e.name?.toLowerCase() === S.toLowerCase()
|
|
125
134
|
),
|
|
126
135
|
[o?.fixedCompensations]
|
|
127
|
-
),
|
|
128
|
-
(
|
|
129
|
-
),
|
|
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
|
|
140
|
+
case je:
|
|
132
141
|
return n("compensationNames.regularHours");
|
|
133
|
-
case
|
|
142
|
+
case ke:
|
|
134
143
|
return n("compensationNames.overtime");
|
|
135
|
-
case
|
|
144
|
+
case Ue:
|
|
136
145
|
return n("compensationNames.doubleOvertime");
|
|
137
146
|
default:
|
|
138
147
|
return e;
|
|
139
148
|
}
|
|
140
|
-
},
|
|
149
|
+
}, z = (e) => {
|
|
141
150
|
switch (e) {
|
|
142
|
-
case
|
|
151
|
+
case Ve:
|
|
143
152
|
return n("fixedCompensationNames.bonus");
|
|
144
|
-
case
|
|
153
|
+
case $e:
|
|
145
154
|
return n("fixedCompensationNames.paycheckTips");
|
|
146
|
-
case
|
|
155
|
+
case we:
|
|
147
156
|
return n("fixedCompensationNames.correctionPayment");
|
|
148
|
-
case
|
|
157
|
+
case He:
|
|
149
158
|
return n("fixedCompensationNames.commission");
|
|
150
|
-
case
|
|
159
|
+
case Ge:
|
|
151
160
|
return n("fixedCompensationNames.cashTips");
|
|
152
|
-
case
|
|
161
|
+
case S:
|
|
153
162
|
return n("fixedCompensationNames.reimbursement");
|
|
154
163
|
default:
|
|
155
164
|
return e;
|
|
156
165
|
}
|
|
157
|
-
},
|
|
166
|
+
}, ce = {
|
|
158
167
|
hourlyCompensations: (() => {
|
|
159
168
|
const e = {};
|
|
160
|
-
return
|
|
161
|
-
|
|
162
|
-
const
|
|
163
|
-
|
|
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
|
|
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
|
|
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
|
|
190
|
+
return k.forEach((t) => {
|
|
182
191
|
e[t.name] = t.amount ?? "";
|
|
183
|
-
}),
|
|
192
|
+
}), B && (e[S] = le?.amount ?? "0.00"), e;
|
|
184
193
|
})(),
|
|
185
|
-
reimbursements:
|
|
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 ||
|
|
192
|
-
},
|
|
193
|
-
resolver:
|
|
194
|
-
defaultValues:
|
|
200
|
+
paymentMethod: o?.paymentMethod || L.DirectDeposit
|
|
201
|
+
}, _ = J({
|
|
202
|
+
resolver: ne(Ze),
|
|
203
|
+
defaultValues: ce
|
|
195
204
|
}), {
|
|
196
|
-
fields:
|
|
197
|
-
append:
|
|
198
|
-
remove:
|
|
199
|
-
update:
|
|
200
|
-
} =
|
|
201
|
-
control:
|
|
205
|
+
fields: W,
|
|
206
|
+
append: pe,
|
|
207
|
+
remove: fe,
|
|
208
|
+
update: he
|
|
209
|
+
} = Te({
|
|
210
|
+
control: _.control,
|
|
202
211
|
name: "reimbursements"
|
|
203
|
-
}),
|
|
204
|
-
const t =
|
|
205
|
-
t && (t.uuid ?
|
|
206
|
-
},
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
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:
|
|
224
|
+
description: e.description.trim(),
|
|
213
225
|
amount: t.toFixed(2),
|
|
214
226
|
recurring: !1
|
|
215
|
-
}),
|
|
216
|
-
},
|
|
217
|
-
data:
|
|
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) =>
|
|
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
|
-
|
|
251
|
+
O,
|
|
240
252
|
{
|
|
241
253
|
variant: "tertiary",
|
|
242
254
|
onClick: () => {
|
|
243
|
-
|
|
255
|
+
be(e.originalIndex);
|
|
244
256
|
},
|
|
245
257
|
"aria-label": n("removeReimbursementLabel", { description: t }),
|
|
246
|
-
children: /* @__PURE__ */ i(
|
|
258
|
+
children: /* @__PURE__ */ i(qe, { "aria-hidden": !0 })
|
|
247
259
|
}
|
|
248
260
|
);
|
|
249
261
|
},
|
|
250
|
-
emptyState: () => /* @__PURE__ */ i(
|
|
251
|
-
|
|
262
|
+
emptyState: () => /* @__PURE__ */ i(Se, { title: n("reimbursementEmptyTitle"), children: /* @__PURE__ */ i(
|
|
263
|
+
d,
|
|
252
264
|
{
|
|
253
265
|
variant: "secondary",
|
|
254
266
|
onClick: () => {
|
|
255
|
-
|
|
267
|
+
G(!0);
|
|
256
268
|
},
|
|
257
|
-
icon: /* @__PURE__ */ i(
|
|
269
|
+
icon: /* @__PURE__ */ i(se, { "aria-hidden": !0 }),
|
|
258
270
|
children: n("addReimbursementCta")
|
|
259
271
|
}
|
|
260
272
|
) })
|
|
261
|
-
}),
|
|
262
|
-
control:
|
|
263
|
-
}),
|
|
273
|
+
}), y = Pe({
|
|
274
|
+
control: _.control
|
|
275
|
+
}), ye = w(() => {
|
|
264
276
|
try {
|
|
265
277
|
const e = {};
|
|
266
|
-
|
|
267
|
-
|
|
278
|
+
y.hourlyCompensations && Object.entries(y.hourlyCompensations).forEach(([N, Z]) => {
|
|
279
|
+
Z && (e[N] = Z);
|
|
268
280
|
});
|
|
269
|
-
const t = (
|
|
270
|
-
uuid:
|
|
271
|
-
description:
|
|
272
|
-
amount:
|
|
273
|
-
recurring:
|
|
274
|
-
})),
|
|
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:
|
|
277
|
-
finalPayoutCompensations:
|
|
278
|
-
fixedCompensations:
|
|
288
|
+
timeOffCompensations: y.timeOffCompensations || {},
|
|
289
|
+
finalPayoutCompensations: y.finalPayoutCompensations || {},
|
|
290
|
+
fixedCompensations: y.fixedCompensations || {},
|
|
279
291
|
reimbursements: t,
|
|
280
|
-
paymentMethod:
|
|
281
|
-
},
|
|
282
|
-
|
|
292
|
+
paymentMethod: y.paymentMethod
|
|
293
|
+
}, R = ae(
|
|
294
|
+
l,
|
|
283
295
|
o,
|
|
284
|
-
(o?.paidTimeOff || []).filter((
|
|
296
|
+
(o?.paidTimeOff || []).filter((N) => N.name),
|
|
285
297
|
h?.uuid,
|
|
286
298
|
r
|
|
287
299
|
);
|
|
288
|
-
return
|
|
300
|
+
return te(
|
|
301
|
+
R,
|
|
302
|
+
p,
|
|
289
303
|
M,
|
|
290
|
-
|
|
291
|
-
P,
|
|
292
|
-
E,
|
|
304
|
+
T,
|
|
293
305
|
r
|
|
294
306
|
);
|
|
295
307
|
} catch {
|
|
296
|
-
return o ?
|
|
308
|
+
return o ? te(
|
|
297
309
|
o,
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
310
|
+
p,
|
|
311
|
+
M,
|
|
312
|
+
T,
|
|
301
313
|
r
|
|
302
314
|
) : 0;
|
|
303
315
|
}
|
|
304
316
|
}, [
|
|
305
|
-
|
|
317
|
+
y,
|
|
306
318
|
o,
|
|
307
319
|
h?.uuid,
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
320
|
+
p,
|
|
321
|
+
M,
|
|
322
|
+
T,
|
|
311
323
|
r
|
|
312
|
-
]),
|
|
313
|
-
first_name:
|
|
314
|
-
last_name:
|
|
315
|
-
}),
|
|
316
|
-
const t =
|
|
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
|
-
|
|
331
|
+
P,
|
|
320
332
|
h?.uuid,
|
|
321
333
|
r
|
|
322
334
|
);
|
|
323
|
-
|
|
324
|
-
},
|
|
325
|
-
|
|
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(
|
|
344
|
+
/* @__PURE__ */ i(d, { variant: "secondary", onClick: g, title: n("cancelCta"), children: n("cancelCta") }),
|
|
333
345
|
/* @__PURE__ */ i(
|
|
334
|
-
|
|
346
|
+
d,
|
|
335
347
|
{
|
|
336
|
-
onClick:
|
|
348
|
+
onClick: _.handleSubmit(Ee),
|
|
337
349
|
title: n("saveCta"),
|
|
338
|
-
isLoading:
|
|
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:
|
|
357
|
+
return /* @__PURE__ */ a("div", { ref: V, className: c.container, children: [
|
|
346
358
|
/* @__PURE__ */ i(
|
|
347
359
|
"div",
|
|
348
360
|
{
|
|
349
|
-
className: `${
|
|
350
|
-
children: /* @__PURE__ */ a(
|
|
351
|
-
/* @__PURE__ */ a(
|
|
352
|
-
/* @__PURE__ */ i(
|
|
353
|
-
b ? /* @__PURE__ */ a(
|
|
354
|
-
/* @__PURE__ */ i(
|
|
355
|
-
/* @__PURE__ */ i($, { className:
|
|
356
|
-
] }) : /* @__PURE__ */ i(
|
|
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 &&
|
|
370
|
+
b && Q
|
|
359
371
|
] })
|
|
360
372
|
}
|
|
361
373
|
),
|
|
362
|
-
/* @__PURE__ */ a(
|
|
363
|
-
/* @__PURE__ */ a(
|
|
364
|
-
|
|
365
|
-
/* @__PURE__ */ i(
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
/* @__PURE__ */ i(
|
|
369
|
-
const
|
|
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 (
|
|
385
|
+
if (l)
|
|
374
386
|
return /* @__PURE__ */ i(
|
|
375
|
-
|
|
387
|
+
x,
|
|
376
388
|
{
|
|
377
389
|
type: "number",
|
|
378
390
|
min: 0,
|
|
379
391
|
adornmentEnd: n("hoursUnit"),
|
|
380
392
|
isRequired: !0,
|
|
381
|
-
label:
|
|
382
|
-
name: `hourlyCompensations.${e.uuid}.${
|
|
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
|
-
|
|
390
|
-
/* @__PURE__ */ i(
|
|
391
|
-
/* @__PURE__ */ i(
|
|
392
|
-
|
|
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:
|
|
407
|
+
employee: p
|
|
396
408
|
},
|
|
397
409
|
e.name
|
|
398
410
|
)) })
|
|
399
411
|
] }),
|
|
400
|
-
r ===
|
|
401
|
-
/* @__PURE__ */ a(
|
|
402
|
-
/* @__PURE__ */ i(
|
|
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(
|
|
406
|
-
|
|
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:
|
|
421
|
+
employee: p
|
|
410
422
|
},
|
|
411
423
|
`payout-${e.name}`
|
|
412
424
|
)) })
|
|
413
425
|
] }),
|
|
414
|
-
|
|
415
|
-
/* @__PURE__ */ i(
|
|
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
|
-
|
|
429
|
+
v,
|
|
418
430
|
{
|
|
419
431
|
gridTemplateColumns: { base: "1fr", small: [320, 320], large: [320, 320, 320] },
|
|
420
432
|
gap: 20,
|
|
421
|
-
children:
|
|
422
|
-
|
|
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:
|
|
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
|
-
|
|
437
|
-
/* @__PURE__ */ i(
|
|
438
|
-
/* @__PURE__ */ i(
|
|
439
|
-
|
|
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:
|
|
446
|
-
name: `fixedCompensations.${
|
|
458
|
+
label: z(S),
|
|
459
|
+
name: `fixedCompensations.${S}`,
|
|
460
|
+
errorMessage: n("validations.negativeAmount")
|
|
447
461
|
}
|
|
448
462
|
) })
|
|
449
463
|
] }),
|
|
450
|
-
m &&
|
|
451
|
-
/* @__PURE__ */ i(
|
|
452
|
-
!(
|
|
453
|
-
|
|
454
|
-
/* @__PURE__ */ a(
|
|
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
|
-
|
|
470
|
+
x,
|
|
457
471
|
{
|
|
458
|
-
name: "
|
|
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
|
-
|
|
478
|
+
x,
|
|
467
479
|
{
|
|
468
|
-
name: "
|
|
480
|
+
name: "amount",
|
|
469
481
|
type: "number",
|
|
470
482
|
min: 0,
|
|
471
483
|
adornmentStart: "$",
|
|
472
484
|
isRequired: !0,
|
|
473
485
|
label: n("reimbursementAmountLabel"),
|
|
474
|
-
|
|
475
|
-
onChange: J
|
|
486
|
+
errorMessage: n("validations.reimbursementAmount")
|
|
476
487
|
}
|
|
477
488
|
)
|
|
478
489
|
] }),
|
|
479
|
-
/* @__PURE__ */ a(
|
|
480
|
-
/* @__PURE__ */ i(
|
|
481
|
-
/* @__PURE__ */ i(
|
|
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
|
-
] }) :
|
|
484
|
-
|
|
494
|
+
] }) }) : j.length > 0 && /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(
|
|
495
|
+
d,
|
|
485
496
|
{
|
|
486
497
|
variant: "secondary",
|
|
487
498
|
onClick: () => {
|
|
488
|
-
|
|
499
|
+
G(!0);
|
|
489
500
|
},
|
|
490
501
|
title: n("addReimbursementLink"),
|
|
491
|
-
icon: /* @__PURE__ */ i(
|
|
502
|
+
icon: /* @__PURE__ */ i(se, { "aria-hidden": !0 }),
|
|
492
503
|
children: n("addReimbursementLink")
|
|
493
504
|
}
|
|
494
505
|
) })
|
|
495
506
|
] }),
|
|
496
|
-
|
|
497
|
-
/* @__PURE__ */ i(
|
|
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
|
-
|
|
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:
|
|
518
|
+
value: L.DirectDeposit,
|
|
508
519
|
label: n("paymentMethodOptions.directDeposit")
|
|
509
520
|
},
|
|
510
521
|
{
|
|
511
|
-
value:
|
|
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 &&
|
|
530
|
+
!b && Q
|
|
520
531
|
] })
|
|
521
532
|
] });
|
|
522
533
|
};
|
|
523
534
|
export {
|
|
524
|
-
|
|
535
|
+
Rn as PayrollEditEmployeePresentation
|
|
525
536
|
};
|
|
526
537
|
//# sourceMappingURL=PayrollEditEmployeePresentation.js.map
|