@gusto/embedded-react-sdk 0.54.0 → 0.54.1
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 +39 -0
- package/dist/components/Common/Loading/Loading.d.ts +6 -1
- package/dist/components/Common/Loading/Loading.js +13 -12
- package/dist/components/Common/Loading/Loading.js.map +1 -1
- package/dist/components/Common/Loading/Loading.module.scss.js +1 -1
- package/dist/components/Common/PayrollLoading/PayrollLoading.js +1 -1
- package/dist/components/Common/PayrollLoading/PayrollLoading.js.map +1 -1
- package/dist/components/Common/UI/Alert/Alert.js +8 -8
- package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
- package/dist/components/Common/UI/Alert/Alert.module.scss.js +18 -16
- package/dist/components/Common/UI/Alert/Alert.module.scss.js.map +1 -1
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/components/Common/UI/FileInput/FileInput.js +1 -1
- package/dist/components/Common/UI/Menu/Menu.js +19 -18
- package/dist/components/Common/UI/Menu/Menu.js.map +1 -1
- package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -5
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -5
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -7
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -5
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -5
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.js +4 -4
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +8 -10
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +6 -8
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Industry.js +2 -2
- package/dist/components/Company/Industry/Industry.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -5
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -5
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +20 -19
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +3 -5
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +20 -19
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleForm.js +29 -28
- package/dist/components/Company/PaySchedule/PayScheduleForm.js.map +1 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.d.ts +1 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js +5 -5
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js.map +1 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.js +24 -21
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.js.map +1 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js +11 -11
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -5
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -5
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/TaxRateManagement/TaxRateHistorySection.js +14 -13
- package/dist/components/Company/StateTaxes/TaxRateManagement/TaxRateHistorySection.js.map +1 -1
- package/dist/components/Company/StateTaxes/TaxRateManagement/context.js +3 -5
- package/dist/components/Company/StateTaxes/TaxRateManagement/context.js.map +1 -1
- package/dist/components/Contractor/ContractorList/management/ManagementContractorListView.js +22 -21
- package/dist/components/Contractor/ContractorList/management/ManagementContractorListView.js.map +1 -1
- package/dist/components/Contractor/Documents/shared/SignatureForm/useContractorSignatureForm/fields.js +8 -8
- package/dist/components/Contractor/Landing/Landing.js +30 -29
- package/dist/components/Contractor/Landing/Landing.js.map +1 -1
- package/dist/components/Contractor/OnboardingSummary/OnboardingSummary.js +18 -17
- package/dist/components/Contractor/OnboardingSummary/OnboardingSummary.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/fields.js +1 -1
- package/dist/components/Contractor/Payments/CreateHistoricalPayment/CreateHistoricalPayment.d.ts +41 -0
- package/dist/components/Contractor/Payments/CreateHistoricalPayment/CreateHistoricalPayment.js +175 -0
- package/dist/components/Contractor/Payments/CreateHistoricalPayment/CreateHistoricalPayment.js.map +1 -0
- package/dist/components/Contractor/Payments/CreateHistoricalPayment/index.d.ts +1 -0
- package/dist/components/Contractor/Payments/CreateHistoricalPayment/useFormDictionary.d.ts +18 -0
- package/dist/components/Contractor/Payments/{HistoricalPaymentAmounts → CreateHistoricalPayment}/useFormDictionary.js +37 -7
- package/dist/components/Contractor/Payments/CreateHistoricalPayment/useFormDictionary.js.map +1 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentSummary/HistoricalPaymentSummary.d.ts +30 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentSummary/HistoricalPaymentSummary.js +56 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentSummary/HistoricalPaymentSummary.js.map +1 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentSummary/index.d.ts +1 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentSummary/useFormDictionary.d.ts +9 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentSummary/useFormDictionary.js +33 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentSummary/useFormDictionary.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +46 -131
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/useFormDictionary.d.ts +9 -0
- package/dist/components/Contractor/Payments/PaymentSummary/useFormDictionary.js +36 -0
- package/dist/components/Contractor/Payments/PaymentSummary/useFormDictionary.js.map +1 -0
- package/dist/components/Contractor/Payments/shared/PaymentSummaryBlock/PaymentSummaryBlock.d.ts +83 -0
- package/dist/components/Contractor/Payments/shared/PaymentSummaryBlock/PaymentSummaryBlock.js +124 -0
- package/dist/components/Contractor/Payments/shared/PaymentSummaryBlock/PaymentSummaryBlock.js.map +1 -0
- package/dist/components/Contractor/Payments/shared/PaymentSummaryBlock/index.d.ts +1 -0
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/fields.js +16 -16
- package/dist/components/Contractor/exports/contractorManagement.d.ts +2 -2
- package/dist/components/Contractor/exports/contractorManagement.js +20 -20
- package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js +4 -4
- package/dist/components/Employee/Compensation/shared/useJobForm/fields.js +6 -6
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js +8 -8
- package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js +4 -4
- package/dist/components/Employee/Documents/management/DocumentManager.js +2 -1
- package/dist/components/Employee/Documents/management/DocumentManager.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +3 -5
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/fields.js +1 -1
- package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +1 -1
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.js +4 -4
- package/dist/components/Employee/Landing/Landing.js +31 -30
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +59 -58
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/management/PaymentMethodBankForm.js +4 -4
- package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js +4 -4
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js +1 -1
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js +4 -4
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.js +8 -8
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js +5 -5
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.js +4 -4
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js +8 -8
- package/dist/components/Flow/Flow.js +27 -20
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +44 -44
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +108 -108
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +8 -10
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js +23 -23
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js.map +1 -1
- package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.d.ts +4 -11
- package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.js +8 -8
- package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.js.map +1 -1
- package/dist/i18n/I18n.js +7 -7
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Company.PaySchedule.json.js +5 -5
- package/dist/i18n/en/Company.StateTaxes.json.js +1 -1
- package/dist/i18n/en/Company.TimeOff.EmployeeTable.json.js +20 -18
- package/dist/i18n/en/Company.TimeOff.EmployeeTable.json.js.map +1 -1
- package/dist/i18n/en/Contractor.ManagementContractorList.json.js +46 -44
- package/dist/i18n/en/Contractor.ManagementContractorList.json.js.map +1 -1
- package/dist/i18n/en/Contractor.Payments.CreateHistoricalPayment.json.js +36 -0
- package/dist/i18n/en/Contractor.Payments.CreateHistoricalPayment.json.js.map +1 -0
- package/dist/i18n/en/Contractor.Payments.HistoricalPaymentSummary.json.js +48 -0
- package/dist/i18n/en/Contractor.Payments.HistoricalPaymentSummary.json.js.map +1 -0
- package/dist/i18n/en/Contractor.Payments.PaymentSummary.json.js +7 -7
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +29 -27
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js.map +1 -1
- package/dist/i18n/types.d.ts +219 -105
- package/dist/shared/constants.d.ts +12 -4
- package/dist/shared/constants.js +23 -19
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/docs/guides/endpoint-inventory.json +30 -1
- package/package.json +17 -16
- package/dist/components/Contractor/Payments/HistoricalPaymentAmounts/HistoricalPaymentAmounts.d.ts +0 -33
- package/dist/components/Contractor/Payments/HistoricalPaymentAmounts/HistoricalPaymentAmounts.js +0 -62
- package/dist/components/Contractor/Payments/HistoricalPaymentAmounts/HistoricalPaymentAmounts.js.map +0 -1
- package/dist/components/Contractor/Payments/HistoricalPaymentAmounts/index.d.ts +0 -1
- package/dist/components/Contractor/Payments/HistoricalPaymentAmounts/useFormDictionary.d.ts +0 -9
- package/dist/components/Contractor/Payments/HistoricalPaymentAmounts/useFormDictionary.js.map +0 -1
- package/dist/components/Contractor/Payments/HistoricalPaymentContractors/HistoricalPaymentContractors.d.ts +0 -27
- package/dist/components/Contractor/Payments/HistoricalPaymentContractors/HistoricalPaymentContractors.js +0 -56
- package/dist/components/Contractor/Payments/HistoricalPaymentContractors/HistoricalPaymentContractors.js.map +0 -1
- package/dist/components/Contractor/Payments/HistoricalPaymentContractors/index.d.ts +0 -1
- package/dist/i18n/en/Contractor.Payments.HistoricalPaymentAmounts.json.js +0 -36
- package/dist/i18n/en/Contractor.Payments.HistoricalPaymentAmounts.json.js.map +0 -1
- package/dist/i18n/en/Contractor.Payments.HistoricalPaymentContractors.json.js +0 -18
- package/dist/i18n/en/Contractor.Payments.HistoricalPaymentContractors.json.js.map +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useForm as Re, useFieldArray as Oe, useWatch as Me, FormProvider as
|
|
3
|
-
import { useRef as
|
|
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
4
|
import { PayrollEmployeeCompensationsTypePaymentMethod as _ } from "@gusto/embedded-api/models/components/payrollemployeecompensationstype";
|
|
5
|
-
import { useTranslation as
|
|
5
|
+
import { useTranslation as ve } from "react-i18next";
|
|
6
6
|
import { z as s } from "zod";
|
|
7
7
|
import { zodResolver as Se } from "@hookform/resolvers/zod";
|
|
8
8
|
import d from "./PayrollEditEmployeePresentation.module.scss.js";
|
|
9
9
|
import { TimeOffField as De, PayoutTimeOffField as Ie } from "./TimeOffField.js";
|
|
10
|
-
import { Flex as
|
|
11
|
-
import { Grid as
|
|
10
|
+
import { Flex as N } from "../../Common/Flex/Flex.js";
|
|
11
|
+
import { Grid as A } from "../../Common/Grid/Grid.js";
|
|
12
12
|
import { EmptyData as Fe } from "../../Common/EmptyData/EmptyData.js";
|
|
13
13
|
import { useComponentContext as _e } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
14
14
|
import { useI18n as Le } from "../../../i18n/I18n.js";
|
|
@@ -16,7 +16,7 @@ import { Form as Ue } from "../../Common/Form/Form.js";
|
|
|
16
16
|
import { formatNumberAsCurrency as re, firstLastName as ke } from "../../../helpers/formattedStrings.js";
|
|
17
17
|
import { getAdditionalEarningsCompensations as je, calculateGrossPay as se } from "../helpers.js";
|
|
18
18
|
import { PayrollCategory as S, isOffCyclePayroll as ue } from "../payrollTypes.js";
|
|
19
|
-
import { COMPENSATION_NAME_REIMBURSEMENT as
|
|
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
20
|
import Ye from "../../../hooks/useContainerBreakpoints/useContainerBreakpoints.js";
|
|
21
21
|
import oe from "../../../assets/icons/plus-circle.svg.js";
|
|
22
22
|
import Ke from "../../../assets/icons/trashcan.svg.js";
|
|
@@ -36,12 +36,12 @@ const Je = s.object({
|
|
|
36
36
|
fixedCompensations: s.record(s.string(), s.string().optional()),
|
|
37
37
|
reimbursements: s.array(Je),
|
|
38
38
|
paymentMethod: s.enum(_).optional()
|
|
39
|
-
}), me = (f,
|
|
39
|
+
}), me = (f, v, c, o, D = S.Regular) => {
|
|
40
40
|
const C = {
|
|
41
|
-
...
|
|
41
|
+
...v,
|
|
42
42
|
paymentMethod: f.paymentMethod
|
|
43
43
|
};
|
|
44
|
-
C.hourlyCompensations =
|
|
44
|
+
C.hourlyCompensations = v?.hourlyCompensations?.map(
|
|
45
45
|
(r) => {
|
|
46
46
|
const m = r.jobUuid && r.name ? f.hourlyCompensations[r.jobUuid]?.[r.name] : void 0;
|
|
47
47
|
return m ? {
|
|
@@ -66,9 +66,9 @@ const Je = s.object({
|
|
|
66
66
|
});
|
|
67
67
|
const P = !ue(D), E = [];
|
|
68
68
|
return Object.entries(f.fixedCompensations).forEach(([r, m]) => {
|
|
69
|
-
if (r.toLowerCase() ===
|
|
69
|
+
if (r.toLowerCase() === x.toLowerCase() && P)
|
|
70
70
|
return;
|
|
71
|
-
const l =
|
|
71
|
+
const l = v?.fixedCompensations?.find(
|
|
72
72
|
(R) => R.name?.toLowerCase() === r.toLowerCase()
|
|
73
73
|
);
|
|
74
74
|
m !== void 0 && m !== "" && (l ? E.push({
|
|
@@ -86,9 +86,9 @@ const Je = s.object({
|
|
|
86
86
|
uuid: r.uuid ?? null,
|
|
87
87
|
recurring: r.recurring
|
|
88
88
|
})) : C.reimbursements = [], C;
|
|
89
|
-
},
|
|
89
|
+
}, vn = ({
|
|
90
90
|
onSave: f,
|
|
91
|
-
onCancel:
|
|
91
|
+
onCancel: v,
|
|
92
92
|
employee: c,
|
|
93
93
|
employeeCompensation: o,
|
|
94
94
|
isPending: D = !1,
|
|
@@ -99,16 +99,16 @@ const Je = s.object({
|
|
|
99
99
|
withReimbursements: m = !0,
|
|
100
100
|
hasDirectDepositSetup: L = !0
|
|
101
101
|
}) => {
|
|
102
|
-
const { Button: l, ButtonIcon: R, Heading: p, Text: $, TextInput: B } = _e(), { t: n } =
|
|
102
|
+
const { Button: l, ButtonIcon: R, Heading: p, Text: $, TextInput: B } = _e(), { t: n } = ve("Payroll.PayrollEditEmployee");
|
|
103
103
|
Le("Payroll.PayrollEditEmployee");
|
|
104
104
|
const h = c.jobs?.find((e) => e.primary), le = o?.hourlyCompensations?.some(
|
|
105
105
|
(e) => e.jobUuid === h?.uuid
|
|
106
|
-
), O = h && le ? [h] : [], V =
|
|
106
|
+
), O = h && le ? [h] : [], V = xe(null), b = Ye({
|
|
107
107
|
ref: V
|
|
108
108
|
}).includes("small");
|
|
109
109
|
o?.hourlyCompensations?.forEach((e) => {
|
|
110
|
-
const
|
|
111
|
-
|
|
110
|
+
const t = c.jobs?.find((u) => u.uuid === e.jobUuid);
|
|
111
|
+
t && !O.find((u) => u.uuid === t.uuid) && O.push(t);
|
|
112
112
|
});
|
|
113
113
|
const T = (o?.paidTimeOff || []).filter((e) => e.name), U = je({
|
|
114
114
|
flsaStatus: h?.compensations?.[0]?.flsaStatus,
|
|
@@ -121,11 +121,11 @@ const Je = s.object({
|
|
|
121
121
|
[m, I, o?.reimbursements]
|
|
122
122
|
), ce = w(
|
|
123
123
|
() => o?.fixedCompensations?.find(
|
|
124
|
-
(e) => e.name?.toLowerCase() ===
|
|
124
|
+
(e) => e.name?.toLowerCase() === x.toLowerCase()
|
|
125
125
|
),
|
|
126
126
|
[o?.fixedCompensations]
|
|
127
|
-
), q = m && !I && !!h?.uuid, z = (e,
|
|
128
|
-
(u) => u.jobUuid === e && u.name?.toLowerCase() ===
|
|
127
|
+
), q = m && !I && !!h?.uuid, z = (e, t) => o?.hourlyCompensations?.find(
|
|
128
|
+
(u) => u.jobUuid === e && u.name?.toLowerCase() === t.toLowerCase()
|
|
129
129
|
), pe = (e) => {
|
|
130
130
|
switch (e) {
|
|
131
131
|
case $e:
|
|
@@ -149,7 +149,7 @@ const Je = s.object({
|
|
|
149
149
|
return n("fixedCompensationNames.commission");
|
|
150
150
|
case Be:
|
|
151
151
|
return n("fixedCompensationNames.cashTips");
|
|
152
|
-
case
|
|
152
|
+
case x:
|
|
153
153
|
return n("fixedCompensationNames.reimbursement");
|
|
154
154
|
default:
|
|
155
155
|
return e;
|
|
@@ -157,30 +157,30 @@ const Je = s.object({
|
|
|
157
157
|
}, fe = {
|
|
158
158
|
hourlyCompensations: (() => {
|
|
159
159
|
const e = {};
|
|
160
|
-
return O.forEach((
|
|
160
|
+
return O.forEach((t) => {
|
|
161
161
|
ae.forEach((u) => {
|
|
162
|
-
const M = z(
|
|
163
|
-
M && (e[
|
|
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() : "");
|
|
164
164
|
});
|
|
165
165
|
}), e;
|
|
166
166
|
})(),
|
|
167
167
|
timeOffCompensations: (() => {
|
|
168
168
|
const e = {};
|
|
169
|
-
return T.forEach((
|
|
170
|
-
e[
|
|
169
|
+
return T.forEach((t) => {
|
|
170
|
+
e[t.name] = t.hours ? parseFloat(t.hours).toString() : "";
|
|
171
171
|
}), e;
|
|
172
172
|
})(),
|
|
173
173
|
finalPayoutCompensations: (() => {
|
|
174
174
|
const e = {};
|
|
175
|
-
return T.forEach((
|
|
176
|
-
e[
|
|
175
|
+
return T.forEach((t) => {
|
|
176
|
+
e[t.name] = t.finalPayoutUnusedHoursInput ?? "0";
|
|
177
177
|
}), e;
|
|
178
178
|
})(),
|
|
179
179
|
fixedCompensations: (() => {
|
|
180
180
|
const e = {};
|
|
181
|
-
return U.forEach((
|
|
182
|
-
e[
|
|
183
|
-
}), q && (e[
|
|
181
|
+
return U.forEach((t) => {
|
|
182
|
+
e[t.name] = t.amount ?? "";
|
|
183
|
+
}), q && (e[x] = ce?.amount ?? "0.00"), e;
|
|
184
184
|
})(),
|
|
185
185
|
reimbursements: de.map((e) => ({
|
|
186
186
|
uuid: e.uuid ?? null,
|
|
@@ -201,19 +201,19 @@ const Je = s.object({
|
|
|
201
201
|
control: F.control,
|
|
202
202
|
name: "reimbursements"
|
|
203
203
|
}), ge = (e) => {
|
|
204
|
-
const
|
|
205
|
-
|
|
206
|
-
}, k = Y.map((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
207
|
j(!1), Q(""), J("");
|
|
208
|
-
},
|
|
209
|
-
const e = Z.trim(),
|
|
210
|
-
Number.isNaN(
|
|
208
|
+
}, ye = () => {
|
|
209
|
+
const e = Z.trim(), t = parseFloat(e || "0");
|
|
210
|
+
Number.isNaN(t) || t <= 0 || (he({
|
|
211
211
|
uuid: null,
|
|
212
212
|
description: X.trim(),
|
|
213
|
-
amount:
|
|
213
|
+
amount: t.toFixed(2),
|
|
214
214
|
recurring: !1
|
|
215
215
|
}), ee());
|
|
216
|
-
},
|
|
216
|
+
}, Ne = Qe({
|
|
217
217
|
data: k,
|
|
218
218
|
columns: [
|
|
219
219
|
{
|
|
@@ -234,27 +234,27 @@ const Je = s.object({
|
|
|
234
234
|
],
|
|
235
235
|
itemMenu: (e) => {
|
|
236
236
|
if (e.recurring) return null;
|
|
237
|
-
const
|
|
238
|
-
return /* @__PURE__ */
|
|
237
|
+
const t = e.description.trim() || n("reimbursementUnnamedFallback");
|
|
238
|
+
return /* @__PURE__ */ i(
|
|
239
239
|
R,
|
|
240
240
|
{
|
|
241
241
|
variant: "tertiary",
|
|
242
242
|
onClick: () => {
|
|
243
243
|
ge(e.originalIndex);
|
|
244
244
|
},
|
|
245
|
-
"aria-label": n("removeReimbursementLabel", { description:
|
|
246
|
-
children: /* @__PURE__ */
|
|
245
|
+
"aria-label": n("removeReimbursementLabel", { description: t }),
|
|
246
|
+
children: /* @__PURE__ */ i(Ke, { "aria-hidden": !0 })
|
|
247
247
|
}
|
|
248
248
|
);
|
|
249
249
|
},
|
|
250
|
-
emptyState: () => /* @__PURE__ */
|
|
250
|
+
emptyState: () => /* @__PURE__ */ i(Fe, { title: n("reimbursementEmptyTitle"), children: /* @__PURE__ */ i(
|
|
251
251
|
l,
|
|
252
252
|
{
|
|
253
253
|
variant: "secondary",
|
|
254
254
|
onClick: () => {
|
|
255
255
|
j(!0);
|
|
256
256
|
},
|
|
257
|
-
icon: /* @__PURE__ */
|
|
257
|
+
icon: /* @__PURE__ */ i(oe, { "aria-hidden": !0 }),
|
|
258
258
|
children: n("addReimbursementCta")
|
|
259
259
|
}
|
|
260
260
|
) })
|
|
@@ -263,25 +263,25 @@ const Je = s.object({
|
|
|
263
263
|
}), Ee = w(() => {
|
|
264
264
|
try {
|
|
265
265
|
const e = {};
|
|
266
|
-
g.hourlyCompensations && Object.entries(g.hourlyCompensations).forEach(([
|
|
267
|
-
|
|
266
|
+
g.hourlyCompensations && Object.entries(g.hourlyCompensations).forEach(([y, ie]) => {
|
|
267
|
+
ie && (e[y] = ie);
|
|
268
268
|
});
|
|
269
|
-
const
|
|
270
|
-
uuid:
|
|
271
|
-
description:
|
|
272
|
-
amount:
|
|
273
|
-
recurring:
|
|
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
274
|
})), u = {
|
|
275
275
|
hourlyCompensations: e,
|
|
276
276
|
timeOffCompensations: g.timeOffCompensations || {},
|
|
277
277
|
finalPayoutCompensations: g.finalPayoutCompensations || {},
|
|
278
278
|
fixedCompensations: g.fixedCompensations || {},
|
|
279
|
-
reimbursements:
|
|
279
|
+
reimbursements: t,
|
|
280
280
|
paymentMethod: g.paymentMethod
|
|
281
281
|
}, M = me(
|
|
282
282
|
u,
|
|
283
283
|
o,
|
|
284
|
-
(o?.paidTimeOff || []).filter((
|
|
284
|
+
(o?.paidTimeOff || []).filter((y) => y.name),
|
|
285
285
|
h?.uuid,
|
|
286
286
|
r
|
|
287
287
|
);
|
|
@@ -313,24 +313,24 @@ const Je = s.object({
|
|
|
313
313
|
first_name: c.firstName,
|
|
314
314
|
last_name: c.lastName
|
|
315
315
|
}), Pe = (e) => {
|
|
316
|
-
const
|
|
316
|
+
const t = me(
|
|
317
317
|
e,
|
|
318
318
|
o,
|
|
319
319
|
T,
|
|
320
320
|
h?.uuid,
|
|
321
321
|
r
|
|
322
322
|
);
|
|
323
|
-
f(
|
|
324
|
-
}, ne = re(Ee || 0),
|
|
325
|
-
|
|
323
|
+
f(t);
|
|
324
|
+
}, ne = re(Ee || 0), te = /* @__PURE__ */ a(
|
|
325
|
+
N,
|
|
326
326
|
{
|
|
327
327
|
flexDirection: b ? "row" : "column",
|
|
328
328
|
justifyContent: b ? "flex-end" : "normal",
|
|
329
329
|
alignItems: b ? "flex-start" : "stretch",
|
|
330
330
|
gap: 12,
|
|
331
331
|
children: [
|
|
332
|
-
/* @__PURE__ */
|
|
333
|
-
/* @__PURE__ */
|
|
332
|
+
/* @__PURE__ */ i(l, { variant: "secondary", onClick: v, title: n("cancelCta"), children: n("cancelCta") }),
|
|
333
|
+
/* @__PURE__ */ i(
|
|
334
334
|
l,
|
|
335
335
|
{
|
|
336
336
|
onClick: F.handleSubmit(Pe),
|
|
@@ -343,52 +343,52 @@ const Je = s.object({
|
|
|
343
343
|
}
|
|
344
344
|
);
|
|
345
345
|
return /* @__PURE__ */ a("div", { ref: V, className: d.container, children: [
|
|
346
|
-
/* @__PURE__ */
|
|
346
|
+
/* @__PURE__ */ i(
|
|
347
347
|
"div",
|
|
348
348
|
{
|
|
349
349
|
className: `${d.headerSection} ${b ? "" : d.headerSectionSticky}`,
|
|
350
|
-
children: /* @__PURE__ */ a(
|
|
351
|
-
/* @__PURE__ */ a(
|
|
352
|
-
/* @__PURE__ */
|
|
353
|
-
b ? /* @__PURE__ */ a(
|
|
354
|
-
/* @__PURE__ */
|
|
355
|
-
/* @__PURE__ */
|
|
356
|
-
] }) : /* @__PURE__ */
|
|
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 }) })
|
|
357
357
|
] }),
|
|
358
|
-
b &&
|
|
358
|
+
b && te
|
|
359
359
|
] })
|
|
360
360
|
}
|
|
361
361
|
),
|
|
362
|
-
/* @__PURE__ */ a(
|
|
362
|
+
/* @__PURE__ */ a(Ae, { ...F, children: [
|
|
363
363
|
/* @__PURE__ */ a(Ue, { children: [
|
|
364
364
|
O.length > 0 && /* @__PURE__ */ a("div", { className: d.fieldGroup, children: [
|
|
365
|
-
/* @__PURE__ */
|
|
366
|
-
O.map((e) => /* @__PURE__ */ a(
|
|
367
|
-
O.length > 1 && /* @__PURE__ */
|
|
368
|
-
/* @__PURE__ */
|
|
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
369
|
const u = z(
|
|
370
370
|
e.uuid,
|
|
371
|
-
|
|
371
|
+
t
|
|
372
372
|
);
|
|
373
373
|
if (u)
|
|
374
|
-
return /* @__PURE__ */
|
|
374
|
+
return /* @__PURE__ */ i(
|
|
375
375
|
H,
|
|
376
376
|
{
|
|
377
377
|
type: "number",
|
|
378
378
|
min: 0,
|
|
379
379
|
adornmentEnd: n("hoursUnit"),
|
|
380
380
|
isRequired: !0,
|
|
381
|
-
label: pe(
|
|
381
|
+
label: pe(t),
|
|
382
382
|
name: `hourlyCompensations.${e.uuid}.${u.name}`
|
|
383
383
|
},
|
|
384
|
-
|
|
384
|
+
t
|
|
385
385
|
);
|
|
386
386
|
}) })
|
|
387
387
|
] }, e.uuid))
|
|
388
388
|
] }),
|
|
389
389
|
T.length > 0 && /* @__PURE__ */ a("div", { className: d.fieldGroup, children: [
|
|
390
|
-
/* @__PURE__ */
|
|
391
|
-
/* @__PURE__ */
|
|
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
392
|
De,
|
|
393
393
|
{
|
|
394
394
|
timeOff: e,
|
|
@@ -398,11 +398,11 @@ const Je = s.object({
|
|
|
398
398
|
)) })
|
|
399
399
|
] }),
|
|
400
400
|
r === S.Dismissal && T.length > 0 && /* @__PURE__ */ a("div", { className: d.fieldGroup, children: [
|
|
401
|
-
/* @__PURE__ */ a(
|
|
402
|
-
/* @__PURE__ */
|
|
403
|
-
/* @__PURE__ */
|
|
401
|
+
/* @__PURE__ */ a(N, { flexDirection: "column", gap: 4, children: [
|
|
402
|
+
/* @__PURE__ */ i(p, { as: "h3", styledAs: "h4", children: n("finalPayoutTitle") }),
|
|
403
|
+
/* @__PURE__ */ i($, { variant: "supporting", children: n("finalPayoutDescription") })
|
|
404
404
|
] }),
|
|
405
|
-
/* @__PURE__ */
|
|
405
|
+
/* @__PURE__ */ i(A, { gridTemplateColumns: { base: "1fr", small: [320, 320] }, gap: 20, children: T.map((e) => /* @__PURE__ */ i(
|
|
406
406
|
Ie,
|
|
407
407
|
{
|
|
408
408
|
timeOff: e,
|
|
@@ -412,13 +412,13 @@ const Je = s.object({
|
|
|
412
412
|
)) })
|
|
413
413
|
] }),
|
|
414
414
|
U.length > 0 && /* @__PURE__ */ a("div", { className: d.fieldGroup, children: [
|
|
415
|
-
/* @__PURE__ */
|
|
416
|
-
/* @__PURE__ */
|
|
417
|
-
|
|
415
|
+
/* @__PURE__ */ i(p, { as: "h3", styledAs: "h4", children: n("additionalEarningsTitle") }),
|
|
416
|
+
/* @__PURE__ */ i(
|
|
417
|
+
A,
|
|
418
418
|
{
|
|
419
419
|
gridTemplateColumns: { base: "1fr", small: [320, 320], large: [320, 320, 320] },
|
|
420
420
|
gap: 20,
|
|
421
|
-
children: U.map((e) => /* @__PURE__ */
|
|
421
|
+
children: U.map((e) => /* @__PURE__ */ i(
|
|
422
422
|
H,
|
|
423
423
|
{
|
|
424
424
|
type: "number",
|
|
@@ -434,25 +434,25 @@ const Je = s.object({
|
|
|
434
434
|
)
|
|
435
435
|
] }),
|
|
436
436
|
q && /* @__PURE__ */ a("div", { className: d.fieldGroup, children: [
|
|
437
|
-
/* @__PURE__ */
|
|
438
|
-
/* @__PURE__ */
|
|
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
439
|
H,
|
|
440
440
|
{
|
|
441
441
|
type: "number",
|
|
442
442
|
min: 0,
|
|
443
443
|
adornmentStart: "$",
|
|
444
444
|
isRequired: !0,
|
|
445
|
-
label: W(
|
|
446
|
-
name: `fixedCompensations.${
|
|
445
|
+
label: W(x),
|
|
446
|
+
name: `fixedCompensations.${x}`
|
|
447
447
|
}
|
|
448
448
|
) })
|
|
449
449
|
] }),
|
|
450
450
|
m && I && /* @__PURE__ */ a("div", { className: d.fieldGroup, children: [
|
|
451
|
-
/* @__PURE__ */
|
|
452
|
-
!(k.length === 0 && K) && /* @__PURE__ */
|
|
453
|
-
K ? /* @__PURE__ */ a(
|
|
454
|
-
/* @__PURE__ */ a(
|
|
455
|
-
/* @__PURE__ */
|
|
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: [
|
|
455
|
+
/* @__PURE__ */ i(
|
|
456
456
|
B,
|
|
457
457
|
{
|
|
458
458
|
name: "newReimbursementDescription",
|
|
@@ -462,7 +462,7 @@ const Je = s.object({
|
|
|
462
462
|
onChange: Q
|
|
463
463
|
}
|
|
464
464
|
),
|
|
465
|
-
/* @__PURE__ */
|
|
465
|
+
/* @__PURE__ */ i(
|
|
466
466
|
B,
|
|
467
467
|
{
|
|
468
468
|
name: "newReimbursementAmount",
|
|
@@ -476,11 +476,11 @@ const Je = s.object({
|
|
|
476
476
|
}
|
|
477
477
|
)
|
|
478
478
|
] }),
|
|
479
|
-
/* @__PURE__ */ a(
|
|
480
|
-
/* @__PURE__ */
|
|
481
|
-
/* @__PURE__ */
|
|
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") })
|
|
482
482
|
] })
|
|
483
|
-
] }) : k.length > 0 && /* @__PURE__ */
|
|
483
|
+
] }) : k.length > 0 && /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(
|
|
484
484
|
l,
|
|
485
485
|
{
|
|
486
486
|
variant: "secondary",
|
|
@@ -488,14 +488,14 @@ const Je = s.object({
|
|
|
488
488
|
j(!0);
|
|
489
489
|
},
|
|
490
490
|
title: n("addReimbursementLink"),
|
|
491
|
-
icon: /* @__PURE__ */
|
|
491
|
+
icon: /* @__PURE__ */ i(oe, { "aria-hidden": !0 }),
|
|
492
492
|
children: n("addReimbursementLink")
|
|
493
493
|
}
|
|
494
494
|
) })
|
|
495
495
|
] }),
|
|
496
496
|
L && /* @__PURE__ */ a("div", { className: d.fieldGroup, children: [
|
|
497
|
-
/* @__PURE__ */
|
|
498
|
-
/* @__PURE__ */
|
|
497
|
+
/* @__PURE__ */ i(p, { as: "h3", styledAs: "h4", children: n("paymentMethodTitle") }),
|
|
498
|
+
/* @__PURE__ */ i(
|
|
499
499
|
Xe,
|
|
500
500
|
{
|
|
501
501
|
name: "paymentMethod",
|
|
@@ -516,11 +516,11 @@ const Je = s.object({
|
|
|
516
516
|
)
|
|
517
517
|
] })
|
|
518
518
|
] }),
|
|
519
|
-
!b &&
|
|
519
|
+
!b && te
|
|
520
520
|
] })
|
|
521
521
|
] });
|
|
522
522
|
};
|
|
523
523
|
export {
|
|
524
|
-
|
|
524
|
+
vn as PayrollEditEmployeePresentation
|
|
525
525
|
};
|
|
526
526
|
//# sourceMappingURL=PayrollEditEmployeePresentation.js.map
|