@gusto/embedded-react-sdk 0.37.0-rc.2 → 0.37.0-rc.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/README.md +3 -0
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +8 -7
- package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +5 -4
- package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
- package/dist/components/Common/UI/DatePicker/DatePicker.d.ts +1 -1
- package/dist/components/Common/UI/DatePicker/DatePicker.js +88 -69
- package/dist/components/Common/UI/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/Common/UI/DatePicker/DatePickerTypes.d.ts +13 -0
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +7 -6
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +9 -8
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -3
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +7 -6
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -3
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -5
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +6 -6
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -3
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +7 -6
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +8 -7
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +6 -5
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -3
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Actions.js +7 -6
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +6 -5
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Actions.js +6 -5
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +7 -6
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Edit.js +11 -10
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +3 -2
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -3
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Actions.js +3 -2
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +7 -6
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -3
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +4 -3
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +60 -58
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Actions.js +11 -10
- package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.js +40 -37
- package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
- package/dist/components/Company/PaySchedule/usePaySchedule.d.ts +1 -0
- package/dist/components/Company/PaySchedule/usePaySchedule.js +6 -5
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +6 -5
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -3
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +7 -6
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +6 -5
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -3
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/Form.js +4 -4
- package/dist/components/Contractor/Address/useAddress.js +6 -5
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +3 -2
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
- package/dist/components/Contractor/Profile/useContractorProfile.js +3 -2
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Employee/Compensation/Actions.js +1 -1
- package/dist/components/Employee/Compensation/List.js +6 -5
- package/dist/components/Employee/Compensation/List.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +3 -2
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +3 -2
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +3 -2
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +5 -4
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +4 -3
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Actions.js +5 -4
- package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
- package/dist/components/Employee/EmployeeList/List.js +10 -10
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +4 -3
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/Actions.js +3 -2
- package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalForm.js +5 -4
- package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +4 -3
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Actions.js +6 -5
- package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +4 -4
- package/dist/components/Employee/PaymentMethod/Split.js +1 -1
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +6 -5
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/Actions.js +7 -6
- package/dist/components/Employee/Profile/Actions.js.map +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.js +5 -4
- package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +9 -8
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
- package/dist/components/Employee/Profile/useProfile.js +4 -3
- package/dist/components/Employee/Profile/useProfile.js.map +1 -1
- package/dist/components/Employee/StateTaxes/Actions.js +7 -6
- package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +4 -3
- package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
- package/dist/components/Employee/Taxes/Actions.js +8 -7
- package/dist/components/Employee/Taxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +5 -4
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +4 -3
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js +48 -48
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js +15 -14
- package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js +44 -46
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js.map +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +3 -2
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.module.scss.js +4 -4
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js +25 -23
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +11 -10
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +1 -0
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +3 -2
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +105 -106
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +54 -54
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.d.ts +2 -1
- package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js +29 -27
- package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js.map +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/index.d.ts +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.d.ts +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js +60 -60
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js +22 -20
- package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +143 -143
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js +44 -55
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js.map +1 -1
- package/dist/components/Payroll/helpers.d.ts +1 -0
- package/dist/components/Payroll/helpers.js +71 -69
- package/dist/components/Payroll/helpers.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +3 -2
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.js +9 -8
- package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.js +12 -11
- package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.js +3 -2
- package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.js +8 -7
- package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.js +9 -8
- package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js +13 -12
- package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.js +4 -4
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.d.ts +4 -4
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.js +86 -89
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.js +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.js +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +3 -2
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/i18n/en/Company.PaySchedule.json.js +6 -6
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +38 -34
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollOverview.json.js +62 -58
- package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
- package/dist/i18n/en/Payroll.TransitionPayrollAlert.json.js +8 -8
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +6 -1
- package/docs/reference/endpoint-inventory.json +9 -0
- package/package.json +5 -5
|
@@ -1,51 +1,53 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { usePayrollsGetSuspense as
|
|
3
|
-
import { PayrollExecutionFlow as
|
|
2
|
+
import { usePayrollsGetSuspense as m } from "@gusto/embedded-api/react-query/payrollsGet";
|
|
3
|
+
import { PayrollExecutionFlow as c } from "../PayrollExecutionFlow/PayrollExecutionFlow.js";
|
|
4
|
+
import { isDismissalPayroll as f } from "../helpers.js";
|
|
4
5
|
import { useFlow as a } from "../../Flow/useFlow.js";
|
|
5
6
|
import { ensureRequired as l } from "../../../helpers/ensureRequired.js";
|
|
6
|
-
import { BaseComponent as
|
|
7
|
-
import { OffCycleCreation as
|
|
8
|
-
function
|
|
9
|
-
const { companyId: o, payrollType:
|
|
7
|
+
import { BaseComponent as p } from "../../Base/Base.js";
|
|
8
|
+
import { OffCycleCreation as y } from "../OffCycleCreation/OffCycleCreation.js";
|
|
9
|
+
function v() {
|
|
10
|
+
const { companyId: o, payrollType: r, onEvent: e } = a();
|
|
10
11
|
return /* @__PURE__ */ n(
|
|
11
|
-
|
|
12
|
+
y,
|
|
12
13
|
{
|
|
13
14
|
companyId: l(o),
|
|
14
|
-
payrollType:
|
|
15
|
-
onEvent:
|
|
15
|
+
payrollType: r,
|
|
16
|
+
onEvent: e
|
|
16
17
|
}
|
|
17
18
|
);
|
|
18
19
|
}
|
|
19
|
-
function
|
|
20
|
-
const { companyId: o, payrollUuid:
|
|
21
|
-
return /* @__PURE__ */ n(
|
|
20
|
+
function O() {
|
|
21
|
+
const { companyId: o, payrollUuid: r, onEvent: e, withReimbursements: t } = a(), i = l(o), s = l(r);
|
|
22
|
+
return /* @__PURE__ */ n(p, { onEvent: e, children: /* @__PURE__ */ n(
|
|
22
23
|
u,
|
|
23
24
|
{
|
|
24
25
|
companyId: i,
|
|
25
|
-
payrollId:
|
|
26
|
-
onEvent:
|
|
27
|
-
withReimbursements:
|
|
26
|
+
payrollId: s,
|
|
27
|
+
onEvent: e,
|
|
28
|
+
withReimbursements: t
|
|
28
29
|
}
|
|
29
30
|
) });
|
|
30
31
|
}
|
|
31
32
|
function u({
|
|
32
33
|
companyId: o,
|
|
33
|
-
payrollId:
|
|
34
|
-
...
|
|
34
|
+
payrollId: r,
|
|
35
|
+
...e
|
|
35
36
|
}) {
|
|
36
|
-
const { data:
|
|
37
|
+
const { data: t } = m({ companyId: o, payrollId: r }), i = t.payrollShow?.payPeriod;
|
|
37
38
|
return /* @__PURE__ */ n(
|
|
38
|
-
|
|
39
|
+
c,
|
|
39
40
|
{
|
|
40
41
|
companyId: o,
|
|
41
|
-
payrollId:
|
|
42
|
+
payrollId: r,
|
|
42
43
|
initialPayPeriod: i,
|
|
43
|
-
|
|
44
|
+
isDismissalPayroll: f(t.payrollShow?.offCycleReason),
|
|
45
|
+
...e
|
|
44
46
|
}
|
|
45
47
|
);
|
|
46
48
|
}
|
|
47
49
|
export {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
+
v as OffCycleCreationContextual,
|
|
51
|
+
O as OffCycleExecutionContextual
|
|
50
52
|
};
|
|
51
53
|
//# sourceMappingURL=OffCycleFlowComponents.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OffCycleFlowComponents.js","sources":["../../../../src/components/Payroll/OffCycle/OffCycleFlowComponents.tsx"],"sourcesContent":["import { usePayrollsGetSuspense } from '@gusto/embedded-api/react-query/payrollsGet'\nimport { OffCycleCreation } from '../OffCycleCreation'\nimport {\n PayrollExecutionFlow,\n type PayrollExecutionFlowProps,\n} from '../PayrollExecutionFlow/PayrollExecutionFlow'\nimport type { OffCycleReason } from '../OffCycleReasonSelection'\nimport { useFlow, type FlowContextInterface } from '@/components/Flow/useFlow'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport type { EventType } from '@/shared/constants'\nimport { ensureRequired } from '@/helpers/ensureRequired'\nimport { BaseComponent } from '@/components/Base/Base'\n\nexport interface OffCycleFlowContextInterface extends FlowContextInterface {\n companyId: string\n payrollUuid?: string\n payrollType?: OffCycleReason\n withReimbursements?: boolean\n}\n\nexport interface OffCycleFlowProps {\n companyId: string\n payrollType?: OffCycleReason\n onEvent: OnEventType<EventType, unknown>\n withReimbursements?: boolean\n}\n\nexport function OffCycleCreationContextual() {\n const { companyId, payrollType, onEvent } = useFlow<OffCycleFlowContextInterface>()\n return (\n <OffCycleCreation\n companyId={ensureRequired(companyId)}\n payrollType={payrollType}\n onEvent={onEvent}\n />\n )\n}\n\nexport function OffCycleExecutionContextual() {\n const { companyId, payrollUuid, onEvent, withReimbursements } =\n useFlow<OffCycleFlowContextInterface>()\n\n const resolvedCompanyId = ensureRequired(companyId)\n const resolvedPayrollId = ensureRequired(payrollUuid)\n\n return (\n <BaseComponent onEvent={onEvent}>\n <OffCycleExecutionWithData\n companyId={resolvedCompanyId}\n payrollId={resolvedPayrollId}\n onEvent={onEvent}\n withReimbursements={withReimbursements}\n />\n </BaseComponent>\n )\n}\n\ntype OffCycleExecutionWithDataProps = Pick<\n PayrollExecutionFlowProps,\n 'companyId' | 'payrollId' | 'onEvent' | 'prefixBreadcrumbs' | 'withReimbursements'\n>\n\nfunction OffCycleExecutionWithData({\n companyId,\n payrollId,\n ...rest\n}: OffCycleExecutionWithDataProps) {\n const { data } = usePayrollsGetSuspense({ companyId, payrollId })\n const initialPayPeriod = data.payrollShow?.payPeriod\n\n return (\n <PayrollExecutionFlow\n companyId={companyId}\n payrollId={payrollId}\n initialPayPeriod={initialPayPeriod}\n {...rest}\n />\n )\n}\n"],"names":["OffCycleCreationContextual","companyId","payrollType","onEvent","useFlow","jsx","OffCycleCreation","ensureRequired","OffCycleExecutionContextual","payrollUuid","withReimbursements","resolvedCompanyId","resolvedPayrollId","BaseComponent","OffCycleExecutionWithData","payrollId","rest","data","usePayrollsGetSuspense","initialPayPeriod","PayrollExecutionFlow"],"mappings":"
|
|
1
|
+
{"version":3,"file":"OffCycleFlowComponents.js","sources":["../../../../src/components/Payroll/OffCycle/OffCycleFlowComponents.tsx"],"sourcesContent":["import { usePayrollsGetSuspense } from '@gusto/embedded-api/react-query/payrollsGet'\nimport { OffCycleCreation } from '../OffCycleCreation'\nimport {\n PayrollExecutionFlow,\n type PayrollExecutionFlowProps,\n} from '../PayrollExecutionFlow/PayrollExecutionFlow'\nimport type { OffCycleReason } from '../OffCycleReasonSelection'\nimport { isDismissalPayroll } from '../helpers'\nimport { useFlow, type FlowContextInterface } from '@/components/Flow/useFlow'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport type { EventType } from '@/shared/constants'\nimport { ensureRequired } from '@/helpers/ensureRequired'\nimport { BaseComponent } from '@/components/Base/Base'\n\nexport interface OffCycleFlowContextInterface extends FlowContextInterface {\n companyId: string\n payrollUuid?: string\n payrollType?: OffCycleReason\n withReimbursements?: boolean\n}\n\nexport interface OffCycleFlowProps {\n companyId: string\n payrollType?: OffCycleReason\n onEvent: OnEventType<EventType, unknown>\n withReimbursements?: boolean\n}\n\nexport function OffCycleCreationContextual() {\n const { companyId, payrollType, onEvent } = useFlow<OffCycleFlowContextInterface>()\n return (\n <OffCycleCreation\n companyId={ensureRequired(companyId)}\n payrollType={payrollType}\n onEvent={onEvent}\n />\n )\n}\n\nexport function OffCycleExecutionContextual() {\n const { companyId, payrollUuid, onEvent, withReimbursements } =\n useFlow<OffCycleFlowContextInterface>()\n\n const resolvedCompanyId = ensureRequired(companyId)\n const resolvedPayrollId = ensureRequired(payrollUuid)\n\n return (\n <BaseComponent onEvent={onEvent}>\n <OffCycleExecutionWithData\n companyId={resolvedCompanyId}\n payrollId={resolvedPayrollId}\n onEvent={onEvent}\n withReimbursements={withReimbursements}\n />\n </BaseComponent>\n )\n}\n\ntype OffCycleExecutionWithDataProps = Pick<\n PayrollExecutionFlowProps,\n 'companyId' | 'payrollId' | 'onEvent' | 'prefixBreadcrumbs' | 'withReimbursements'\n>\n\nfunction OffCycleExecutionWithData({\n companyId,\n payrollId,\n ...rest\n}: OffCycleExecutionWithDataProps) {\n const { data } = usePayrollsGetSuspense({ companyId, payrollId })\n const initialPayPeriod = data.payrollShow?.payPeriod\n\n return (\n <PayrollExecutionFlow\n companyId={companyId}\n payrollId={payrollId}\n initialPayPeriod={initialPayPeriod}\n isDismissalPayroll={isDismissalPayroll(data.payrollShow?.offCycleReason)}\n {...rest}\n />\n )\n}\n"],"names":["OffCycleCreationContextual","companyId","payrollType","onEvent","useFlow","jsx","OffCycleCreation","ensureRequired","OffCycleExecutionContextual","payrollUuid","withReimbursements","resolvedCompanyId","resolvedPayrollId","BaseComponent","OffCycleExecutionWithData","payrollId","rest","data","usePayrollsGetSuspense","initialPayPeriod","PayrollExecutionFlow","isDismissalPayroll"],"mappings":";;;;;;;;AA4BO,SAASA,IAA6B;AAC3C,QAAM,EAAE,WAAAC,GAAW,aAAAC,GAAa,SAAAC,EAAA,IAAYC,EAAA;AAC5C,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAeN,CAAS;AAAA,MACnC,aAAAC;AAAA,MACA,SAAAC;AAAA,IAAA;AAAA,EAAA;AAGN;AAEO,SAASK,IAA8B;AAC5C,QAAM,EAAE,WAAAP,GAAW,aAAAQ,GAAa,SAAAN,GAAS,oBAAAO,EAAA,IACvCN,EAAA,GAEIO,IAAoBJ,EAAeN,CAAS,GAC5CW,IAAoBL,EAAeE,CAAW;AAEpD,SACE,gBAAAJ,EAACQ,KAAc,SAAAV,GACb,UAAA,gBAAAE;AAAA,IAACS;AAAA,IAAA;AAAA,MACC,WAAWH;AAAA,MACX,WAAWC;AAAA,MACX,SAAAT;AAAA,MACA,oBAAAO;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;AAOA,SAASI,EAA0B;AAAA,EACjC,WAAAb;AAAA,EACA,WAAAc;AAAA,EACA,GAAGC;AACL,GAAmC;AACjC,QAAM,EAAE,MAAAC,EAAA,IAASC,EAAuB,EAAE,WAAAjB,GAAW,WAAAc,GAAW,GAC1DI,IAAmBF,EAAK,aAAa;AAE3C,SACE,gBAAAZ;AAAA,IAACe;AAAA,IAAA;AAAA,MACC,WAAAnB;AAAA,MACA,WAAAc;AAAA,MACA,kBAAAI;AAAA,MACA,oBAAoBE,EAAmBJ,EAAK,aAAa,cAAc;AAAA,MACtE,GAAGD;AAAA,IAAA;AAAA,EAAA;AAGV;"}
|
package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { jsxs as i, jsx as
|
|
1
|
+
import { jsxs as i, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation as l } from "react-i18next";
|
|
3
|
-
import
|
|
3
|
+
import a from "./OffCyclePayPeriodDateFormPresentation.module.scss.js";
|
|
4
4
|
import { useI18n as o } from "../../../i18n/I18n.js";
|
|
5
|
+
import "../../../shared/constants.js";
|
|
5
6
|
import { CheckboxField as c } from "../../Common/Fields/CheckboxField/CheckboxField.js";
|
|
6
7
|
import { DatePickerField as t } from "../../Common/Fields/DatePickerField/DatePickerField.js";
|
|
7
|
-
function
|
|
8
|
+
function h() {
|
|
8
9
|
o("Payroll.OffCyclePayPeriodDateForm");
|
|
9
10
|
const { t: e } = l("Payroll.OffCyclePayPeriodDateForm");
|
|
10
|
-
return /* @__PURE__ */ i("div", { className:
|
|
11
|
-
/* @__PURE__ */ i("div", { className:
|
|
12
|
-
/* @__PURE__ */
|
|
13
|
-
/* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ i("div", { className: a.root, children: [
|
|
12
|
+
/* @__PURE__ */ i("div", { className: a.dateFields, children: [
|
|
13
|
+
/* @__PURE__ */ r(t, { name: "startDate", label: e("startDateLabel"), isRequired: !0 }),
|
|
14
|
+
/* @__PURE__ */ r(t, { name: "endDate", label: e("endDateLabel"), isRequired: !0 })
|
|
14
15
|
] }),
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */
|
|
16
|
+
/* @__PURE__ */ r("div", { className: a.checkDateField, children: /* @__PURE__ */ r(t, { name: "checkDate", label: e("checkDateLabel"), isRequired: !0 }) }),
|
|
17
|
+
/* @__PURE__ */ r(
|
|
17
18
|
c,
|
|
18
19
|
{
|
|
19
20
|
name: "isCheckOnly",
|
|
@@ -24,6 +25,6 @@ function D() {
|
|
|
24
25
|
] });
|
|
25
26
|
}
|
|
26
27
|
export {
|
|
27
|
-
|
|
28
|
+
h as OffCyclePayPeriodDateFormPresentation
|
|
28
29
|
};
|
|
29
30
|
//# sourceMappingURL=OffCyclePayPeriodDateFormPresentation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OffCyclePayPeriodDateFormPresentation.js","sources":["../../../../src/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport styles from './OffCyclePayPeriodDateFormPresentation.module.scss'\nimport { useI18n } from '@/i18n'\nimport { CheckboxField, DatePickerField } from '@/components/Common'\n\nexport function OffCyclePayPeriodDateFormPresentation() {\n useI18n('Payroll.OffCyclePayPeriodDateForm')\n const { t } = useTranslation('Payroll.OffCyclePayPeriodDateForm')\n\n return (\n <div className={styles.root}>\n <div className={styles.dateFields}>\n <DatePickerField name=\"startDate\" label={t('startDateLabel')} isRequired />\n <DatePickerField name=\"endDate\" label={t('endDateLabel')} isRequired />\n </div>\n\n <div className={styles.checkDateField}>\n <DatePickerField name=\"checkDate\" label={t('checkDateLabel')} isRequired />\n </div>\n\n <CheckboxField\n name=\"isCheckOnly\"\n label={t('checkOnlyLabel')}\n description={t('checkOnlyDescription')}\n />\n </div>\n )\n}\n"],"names":["OffCyclePayPeriodDateFormPresentation","useI18n","t","useTranslation","jsxs","styles","jsx","DatePickerField","CheckboxField"],"mappings":"
|
|
1
|
+
{"version":3,"file":"OffCyclePayPeriodDateFormPresentation.js","sources":["../../../../src/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport styles from './OffCyclePayPeriodDateFormPresentation.module.scss'\nimport { useI18n } from '@/i18n'\nimport { CheckboxField, DatePickerField } from '@/components/Common'\n\nexport function OffCyclePayPeriodDateFormPresentation() {\n useI18n('Payroll.OffCyclePayPeriodDateForm')\n const { t } = useTranslation('Payroll.OffCyclePayPeriodDateForm')\n\n return (\n <div className={styles.root}>\n <div className={styles.dateFields}>\n <DatePickerField name=\"startDate\" label={t('startDateLabel')} isRequired />\n <DatePickerField name=\"endDate\" label={t('endDateLabel')} isRequired />\n </div>\n\n <div className={styles.checkDateField}>\n <DatePickerField name=\"checkDate\" label={t('checkDateLabel')} isRequired />\n </div>\n\n <CheckboxField\n name=\"isCheckOnly\"\n label={t('checkOnlyLabel')}\n description={t('checkOnlyDescription')}\n />\n </div>\n )\n}\n"],"names":["OffCyclePayPeriodDateFormPresentation","useI18n","t","useTranslation","jsxs","styles","jsx","DatePickerField","CheckboxField"],"mappings":";;;;;;;AAKO,SAASA,IAAwC;AACtD,EAAAC,EAAQ,mCAAmC;AAC3C,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,mCAAmC;AAEhE,SACE,gBAAAC,EAAC,OAAA,EAAI,WAAWC,EAAO,MACrB,UAAA;AAAA,IAAA,gBAAAD,EAAC,OAAA,EAAI,WAAWC,EAAO,YACrB,UAAA;AAAA,MAAA,gBAAAC,EAACC,GAAA,EAAgB,MAAK,aAAY,OAAOL,EAAE,gBAAgB,GAAG,YAAU,IAAC;AAAA,MACzE,gBAAAI,EAACC,KAAgB,MAAK,WAAU,OAAOL,EAAE,cAAc,GAAG,YAAU,GAAA,CAAC;AAAA,IAAA,GACvE;AAAA,IAEA,gBAAAI,EAAC,OAAA,EAAI,WAAWD,EAAO,gBACrB,UAAA,gBAAAC,EAACC,GAAA,EAAgB,MAAK,aAAY,OAAOL,EAAE,gBAAgB,GAAG,YAAU,IAAC,GAC3E;AAAA,IAEA,gBAAAI;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAON,EAAE,gBAAgB;AAAA,QACzB,aAAaA,EAAE,sBAAsB;AAAA,MAAA;AAAA,IAAA;AAAA,EACvC,GACF;AAEJ;"}
|
package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo as r } from "react";
|
|
3
3
|
import { useTranslation as s } from "react-i18next";
|
|
4
|
+
import "../../../shared/constants.js";
|
|
4
5
|
import { RadioGroupField as l } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
|
|
5
6
|
function f({
|
|
6
7
|
name: e,
|
package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OffCycleReasonSelectionPresentation.js","sources":["../../../../src/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport type { OffCycleReason } from './types'\nimport { RadioGroupField } from '@/components/Common'\n\ninterface OffCycleReasonSelectionPresentationProps {\n name: string\n onChange?: (value: OffCycleReason) => void\n}\n\nexport function OffCycleReasonSelectionPresentation({\n name,\n onChange,\n}: OffCycleReasonSelectionPresentationProps) {\n const { t } = useTranslation('Payroll.OffCycleReasonSelection')\n\n const options = useMemo(\n () => [\n {\n value: 'correction' as OffCycleReason,\n label: t('options.correction.label'),\n description: t('options.correction.description'),\n },\n {\n value: 'bonus' as OffCycleReason,\n label: t('options.bonus.label'),\n description: t('options.bonus.description'),\n },\n ],\n [t],\n )\n\n return (\n <RadioGroupField<OffCycleReason>\n name={name}\n label={t('title')}\n options={options}\n isRequired\n onChange={onChange}\n />\n )\n}\n"],"names":["OffCycleReasonSelectionPresentation","name","onChange","t","useTranslation","options","useMemo","jsx","RadioGroupField"],"mappings":"
|
|
1
|
+
{"version":3,"file":"OffCycleReasonSelectionPresentation.js","sources":["../../../../src/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport type { OffCycleReason } from './types'\nimport { RadioGroupField } from '@/components/Common'\n\ninterface OffCycleReasonSelectionPresentationProps {\n name: string\n onChange?: (value: OffCycleReason) => void\n}\n\nexport function OffCycleReasonSelectionPresentation({\n name,\n onChange,\n}: OffCycleReasonSelectionPresentationProps) {\n const { t } = useTranslation('Payroll.OffCycleReasonSelection')\n\n const options = useMemo(\n () => [\n {\n value: 'correction' as OffCycleReason,\n label: t('options.correction.label'),\n description: t('options.correction.description'),\n },\n {\n value: 'bonus' as OffCycleReason,\n label: t('options.bonus.label'),\n description: t('options.bonus.description'),\n },\n ],\n [t],\n )\n\n return (\n <RadioGroupField<OffCycleReason>\n name={name}\n label={t('title')}\n options={options}\n isRequired\n onChange={onChange}\n />\n )\n}\n"],"names":["OffCycleReasonSelectionPresentation","name","onChange","t","useTranslation","options","useMemo","jsx","RadioGroupField"],"mappings":";;;;;AAUO,SAASA,EAAoC;AAAA,EAClD,MAAAC;AAAA,EACA,UAAAC;AACF,GAA6C;AAC3C,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,iCAAiC,GAExDC,IAAUC;AAAA,IACd,MAAM;AAAA,MACJ;AAAA,QACE,OAAO;AAAA,QACP,OAAOH,EAAE,0BAA0B;AAAA,QACnC,aAAaA,EAAE,gCAAgC;AAAA,MAAA;AAAA,MAEjD;AAAA,QACE,OAAO;AAAA,QACP,OAAOA,EAAE,qBAAqB;AAAA,QAC9B,aAAaA,EAAE,2BAA2B;AAAA,MAAA;AAAA,IAC5C;AAAA,IAEF,CAACA,CAAC;AAAA,EAAA;AAGJ,SACE,gBAAAI;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAAP;AAAA,MACA,OAAOE,EAAE,OAAO;AAAA,MAChB,SAAAE;AAAA,MACA,YAAU;AAAA,MACV,UAAAH;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -5,12 +5,13 @@ import { useTranslation as L } from "react-i18next";
|
|
|
5
5
|
import { WithholdingPayPeriod as N } from "@gusto/embedded-api/models/operations/postv1companiescompanyidpayrolls";
|
|
6
6
|
import { WITHHOLDING_PAY_PERIOD_I18N_KEY as p } from "../OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.js";
|
|
7
7
|
import l from "./OffCycleTaxWithholdingModal.module.scss.js";
|
|
8
|
+
import "../../../shared/constants.js";
|
|
8
9
|
import { ActionsLayout as T } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
9
10
|
import { useComponentContext as W } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
10
11
|
import { useI18n as w } from "../../../i18n/I18n.js";
|
|
11
12
|
import { SelectField as D } from "../../Common/Fields/SelectField/SelectField.js";
|
|
12
13
|
import { RadioGroupField as H } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
|
|
13
|
-
function
|
|
14
|
+
function K({
|
|
14
15
|
isOpen: h,
|
|
15
16
|
defaultConfig: f,
|
|
16
17
|
onDone: g,
|
|
@@ -95,6 +96,6 @@ function Y({
|
|
|
95
96
|
);
|
|
96
97
|
}
|
|
97
98
|
export {
|
|
98
|
-
|
|
99
|
+
K as OffCycleTaxWithholdingModal
|
|
99
100
|
};
|
|
100
101
|
//# sourceMappingURL=OffCycleTaxWithholdingModal.js.map
|
package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OffCycleTaxWithholdingModal.js","sources":["../../../../src/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.tsx"],"sourcesContent":["import { useMemo, useRef } from 'react'\nimport { FormProvider, useForm, useWatch } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport { WithholdingPayPeriod } from '@gusto/embedded-api/models/operations/postv1companiescompanyidpayrolls'\nimport { WITHHOLDING_PAY_PERIOD_I18N_KEY } from '../OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes'\nimport type { OffCycleTaxWithholdingConfig } from '../OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes'\nimport styles from './OffCycleTaxWithholdingModal.module.scss'\nimport type { OffCycleTaxWithholdingModalProps } from './OffCycleTaxWithholdingModalTypes'\nimport { ActionsLayout, SelectField, RadioGroupField } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\n\nexport function OffCycleTaxWithholdingModal({\n isOpen,\n defaultConfig,\n onDone,\n onCancel,\n}: OffCycleTaxWithholdingModalProps) {\n useI18n('Payroll.OffCycleTaxWithholding')\n const { t } = useTranslation('Payroll.OffCycleTaxWithholding')\n const { Modal, Heading, Text, Button } = useComponentContext()\n const modalContainerRef = useRef<HTMLDivElement>(null)\n\n const formHandlers = useForm<OffCycleTaxWithholdingConfig>({\n defaultValues: defaultConfig,\n })\n\n const currentWithholdingPayPeriod = useWatch({\n control: formHandlers.control,\n name: 'withholdingPayPeriod',\n })\n\n const frequencyOptions = useMemo(\n () =>\n Object.values(WithholdingPayPeriod).map(value => ({\n value,\n label: t(WITHHOLDING_PAY_PERIOD_I18N_KEY[value]),\n })),\n [t],\n )\n\n const frequencyDisplayText = t(\n WITHHOLDING_PAY_PERIOD_I18N_KEY[currentWithholdingPayPeriod],\n ).toLowerCase()\n\n const withholdingRateOptions = useMemo(\n () => [\n {\n value: 'supplemental' as const,\n label: t('modal.supplementalSection.useSupplementalRate'),\n description: t('modal.supplementalSection.useSupplementalRateDescription'),\n },\n {\n value: 'regular' as const,\n label: t('modal.supplementalSection.useRegularRate', {\n frequency: frequencyDisplayText,\n }),\n description: t('modal.supplementalSection.useRegularRateDescription'),\n },\n ],\n [t, frequencyDisplayText],\n )\n\n const handleSubmit = formHandlers.handleSubmit(onDone)\n\n return (\n <Modal\n isOpen={isOpen}\n onClose={onCancel}\n containerRef={modalContainerRef}\n footer={\n <ActionsLayout>\n <Button variant=\"secondary\" onClick={onCancel}>\n {t('modal.cancelButton')}\n </Button>\n <Button variant=\"primary\" onClick={handleSubmit}>\n {t('modal.doneButton')}\n </Button>\n </ActionsLayout>\n }\n >\n <FormProvider {...formHandlers}>\n <div className={styles.content}>\n <Heading as=\"h2\">{t('modal.title')}</Heading>\n\n <div className={styles.section}>\n <Heading as=\"h3\">{t('modal.regularSection.title')}</Heading>\n <Text variant=\"supporting\">{t('modal.regularSection.subtitle')}</Text>\n\n <div className={styles.rateInfo}>\n <Text weight=\"semibold\">{t('modal.regularSection.rateLabel')}</Text>\n <Text variant=\"supporting\">{t('modal.regularSection.rateDescription')}</Text>\n </div>\n\n <SelectField\n name=\"withholdingPayPeriod\"\n label={t('modal.regularSection.rateLabel')}\n options={frequencyOptions}\n shouldVisuallyHideLabel\n portalContainer={modalContainerRef.current ?? undefined}\n />\n </div>\n\n <hr className={styles.divider} />\n\n <div className={styles.section}>\n <Heading as=\"h3\">{t('modal.supplementalSection.title')}</Heading>\n <RadioGroupField\n name=\"withholdingRate\"\n label={t('modal.supplementalSection.title')}\n options={withholdingRateOptions}\n shouldVisuallyHideLabel\n />\n </div>\n </div>\n </FormProvider>\n </Modal>\n )\n}\n"],"names":["OffCycleTaxWithholdingModal","isOpen","defaultConfig","onDone","onCancel","useI18n","t","useTranslation","Modal","Heading","Text","Button","useComponentContext","modalContainerRef","useRef","formHandlers","useForm","currentWithholdingPayPeriod","useWatch","frequencyOptions","useMemo","WithholdingPayPeriod","value","WITHHOLDING_PAY_PERIOD_I18N_KEY","frequencyDisplayText","withholdingRateOptions","handleSubmit","jsx","ActionsLayout","FormProvider","styles","jsxs","SelectField","RadioGroupField"],"mappings":"
|
|
1
|
+
{"version":3,"file":"OffCycleTaxWithholdingModal.js","sources":["../../../../src/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.tsx"],"sourcesContent":["import { useMemo, useRef } from 'react'\nimport { FormProvider, useForm, useWatch } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport { WithholdingPayPeriod } from '@gusto/embedded-api/models/operations/postv1companiescompanyidpayrolls'\nimport { WITHHOLDING_PAY_PERIOD_I18N_KEY } from '../OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes'\nimport type { OffCycleTaxWithholdingConfig } from '../OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes'\nimport styles from './OffCycleTaxWithholdingModal.module.scss'\nimport type { OffCycleTaxWithholdingModalProps } from './OffCycleTaxWithholdingModalTypes'\nimport { ActionsLayout, SelectField, RadioGroupField } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\n\nexport function OffCycleTaxWithholdingModal({\n isOpen,\n defaultConfig,\n onDone,\n onCancel,\n}: OffCycleTaxWithholdingModalProps) {\n useI18n('Payroll.OffCycleTaxWithholding')\n const { t } = useTranslation('Payroll.OffCycleTaxWithholding')\n const { Modal, Heading, Text, Button } = useComponentContext()\n const modalContainerRef = useRef<HTMLDivElement>(null)\n\n const formHandlers = useForm<OffCycleTaxWithholdingConfig>({\n defaultValues: defaultConfig,\n })\n\n const currentWithholdingPayPeriod = useWatch({\n control: formHandlers.control,\n name: 'withholdingPayPeriod',\n })\n\n const frequencyOptions = useMemo(\n () =>\n Object.values(WithholdingPayPeriod).map(value => ({\n value,\n label: t(WITHHOLDING_PAY_PERIOD_I18N_KEY[value]),\n })),\n [t],\n )\n\n const frequencyDisplayText = t(\n WITHHOLDING_PAY_PERIOD_I18N_KEY[currentWithholdingPayPeriod],\n ).toLowerCase()\n\n const withholdingRateOptions = useMemo(\n () => [\n {\n value: 'supplemental' as const,\n label: t('modal.supplementalSection.useSupplementalRate'),\n description: t('modal.supplementalSection.useSupplementalRateDescription'),\n },\n {\n value: 'regular' as const,\n label: t('modal.supplementalSection.useRegularRate', {\n frequency: frequencyDisplayText,\n }),\n description: t('modal.supplementalSection.useRegularRateDescription'),\n },\n ],\n [t, frequencyDisplayText],\n )\n\n const handleSubmit = formHandlers.handleSubmit(onDone)\n\n return (\n <Modal\n isOpen={isOpen}\n onClose={onCancel}\n containerRef={modalContainerRef}\n footer={\n <ActionsLayout>\n <Button variant=\"secondary\" onClick={onCancel}>\n {t('modal.cancelButton')}\n </Button>\n <Button variant=\"primary\" onClick={handleSubmit}>\n {t('modal.doneButton')}\n </Button>\n </ActionsLayout>\n }\n >\n <FormProvider {...formHandlers}>\n <div className={styles.content}>\n <Heading as=\"h2\">{t('modal.title')}</Heading>\n\n <div className={styles.section}>\n <Heading as=\"h3\">{t('modal.regularSection.title')}</Heading>\n <Text variant=\"supporting\">{t('modal.regularSection.subtitle')}</Text>\n\n <div className={styles.rateInfo}>\n <Text weight=\"semibold\">{t('modal.regularSection.rateLabel')}</Text>\n <Text variant=\"supporting\">{t('modal.regularSection.rateDescription')}</Text>\n </div>\n\n <SelectField\n name=\"withholdingPayPeriod\"\n label={t('modal.regularSection.rateLabel')}\n options={frequencyOptions}\n shouldVisuallyHideLabel\n portalContainer={modalContainerRef.current ?? undefined}\n />\n </div>\n\n <hr className={styles.divider} />\n\n <div className={styles.section}>\n <Heading as=\"h3\">{t('modal.supplementalSection.title')}</Heading>\n <RadioGroupField\n name=\"withholdingRate\"\n label={t('modal.supplementalSection.title')}\n options={withholdingRateOptions}\n shouldVisuallyHideLabel\n />\n </div>\n </div>\n </FormProvider>\n </Modal>\n )\n}\n"],"names":["OffCycleTaxWithholdingModal","isOpen","defaultConfig","onDone","onCancel","useI18n","t","useTranslation","Modal","Heading","Text","Button","useComponentContext","modalContainerRef","useRef","formHandlers","useForm","currentWithholdingPayPeriod","useWatch","frequencyOptions","useMemo","WithholdingPayPeriod","value","WITHHOLDING_PAY_PERIOD_I18N_KEY","frequencyDisplayText","withholdingRateOptions","handleSubmit","jsx","ActionsLayout","FormProvider","styles","jsxs","SelectField","RadioGroupField"],"mappings":";;;;;;;;;;;;;AAYO,SAASA,EAA4B;AAAA,EAC1C,QAAAC;AAAA,EACA,eAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC;AACF,GAAqC;AACnC,EAAAC,EAAQ,gCAAgC;AACxC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,gCAAgC,GACvD,EAAE,OAAAC,GAAO,SAAAC,GAAS,MAAAC,GAAM,QAAAC,EAAA,IAAWC,EAAA,GACnCC,IAAoBC,EAAuB,IAAI,GAE/CC,IAAeC,EAAsC;AAAA,IACzD,eAAed;AAAA,EAAA,CAChB,GAEKe,IAA8BC,EAAS;AAAA,IAC3C,SAASH,EAAa;AAAA,IACtB,MAAM;AAAA,EAAA,CACP,GAEKI,IAAmBC;AAAA,IACvB,MACE,OAAO,OAAOC,CAAoB,EAAE,IAAI,CAAAC,OAAU;AAAA,MAChD,OAAAA;AAAA,MACA,OAAOhB,EAAEiB,EAAgCD,CAAK,CAAC;AAAA,IAAA,EAC/C;AAAA,IACJ,CAAChB,CAAC;AAAA,EAAA,GAGEkB,IAAuBlB;AAAA,IAC3BiB,EAAgCN,CAA2B;AAAA,EAAA,EAC3D,YAAA,GAEIQ,IAAyBL;AAAA,IAC7B,MAAM;AAAA,MACJ;AAAA,QACE,OAAO;AAAA,QACP,OAAOd,EAAE,+CAA+C;AAAA,QACxD,aAAaA,EAAE,0DAA0D;AAAA,MAAA;AAAA,MAE3E;AAAA,QACE,OAAO;AAAA,QACP,OAAOA,EAAE,4CAA4C;AAAA,UACnD,WAAWkB;AAAA,QAAA,CACZ;AAAA,QACD,aAAalB,EAAE,qDAAqD;AAAA,MAAA;AAAA,IACtE;AAAA,IAEF,CAACA,GAAGkB,CAAoB;AAAA,EAAA,GAGpBE,IAAeX,EAAa,aAAaZ,CAAM;AAErD,SACE,gBAAAwB;AAAA,IAACnB;AAAA,IAAA;AAAA,MACC,QAAAP;AAAA,MACA,SAASG;AAAA,MACT,cAAcS;AAAA,MACd,0BACGe,GAAA,EACC,UAAA;AAAA,QAAA,gBAAAD,EAAChB,KAAO,SAAQ,aAAY,SAASP,GAClC,UAAAE,EAAE,oBAAoB,GACzB;AAAA,QACA,gBAAAqB,EAAChB,KAAO,SAAQ,WAAU,SAASe,GAChC,UAAApB,EAAE,kBAAkB,EAAA,CACvB;AAAA,MAAA,GACF;AAAA,MAGF,UAAA,gBAAAqB,EAACE,KAAc,GAAGd,GAChB,4BAAC,OAAA,EAAI,WAAWe,EAAO,SACrB,UAAA;AAAA,QAAA,gBAAAH,EAAClB,GAAA,EAAQ,IAAG,MAAM,UAAAH,EAAE,aAAa,GAAE;AAAA,QAEnC,gBAAAyB,EAAC,OAAA,EAAI,WAAWD,EAAO,SACrB,UAAA;AAAA,UAAA,gBAAAH,EAAClB,GAAA,EAAQ,IAAG,MAAM,UAAAH,EAAE,4BAA4B,GAAE;AAAA,4BACjDI,GAAA,EAAK,SAAQ,cAAc,UAAAJ,EAAE,+BAA+B,GAAE;AAAA,UAE/D,gBAAAyB,EAAC,OAAA,EAAI,WAAWD,EAAO,UACrB,UAAA;AAAA,YAAA,gBAAAH,EAACjB,GAAA,EAAK,QAAO,YAAY,UAAAJ,EAAE,gCAAgC,GAAE;AAAA,8BAC5DI,GAAA,EAAK,SAAQ,cAAc,UAAAJ,EAAE,sCAAsC,EAAA,CAAE;AAAA,UAAA,GACxE;AAAA,UAEA,gBAAAqB;AAAA,YAACK;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,OAAO1B,EAAE,gCAAgC;AAAA,cACzC,SAASa;AAAA,cACT,yBAAuB;AAAA,cACvB,iBAAiBN,EAAkB,WAAW;AAAA,YAAA;AAAA,UAAA;AAAA,QAChD,GACF;AAAA,QAEA,gBAAAc,EAAC,MAAA,EAAG,WAAWG,EAAO,QAAA,CAAS;AAAA,QAE/B,gBAAAC,EAAC,OAAA,EAAI,WAAWD,EAAO,SACrB,UAAA;AAAA,UAAA,gBAAAH,EAAClB,GAAA,EAAQ,IAAG,MAAM,UAAAH,EAAE,iCAAiC,GAAE;AAAA,UACvD,gBAAAqB;AAAA,YAACM;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,OAAO3B,EAAE,iCAAiC;AAAA,cAC1C,SAASmB;AAAA,cACT,yBAAuB;AAAA,YAAA;AAAA,UAAA;AAAA,QACzB,EAAA,CACF;AAAA,MAAA,EAAA,CACF,EAAA,CACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import { jsx as S, jsxs as
|
|
2
|
-
import { useState as d, useEffect as G } from "react";
|
|
3
|
-
import { usePayrollsGetSuspense as
|
|
4
|
-
import { payrollsCalculate as
|
|
5
|
-
import { useGustoEmbeddedContext as
|
|
6
|
-
import { PayrollProcessingRequestStatus as
|
|
7
|
-
import { useTranslation as
|
|
8
|
-
import { usePayrollsUpdateMutation as
|
|
9
|
-
import { usePayrollsCalculateGrossUpMutation as
|
|
10
|
-
import { usePayrollsGetBlockersSuspense as
|
|
11
|
-
import { payrollSubmitHandler as
|
|
12
|
-
import { PayrollConfigurationPresentation as
|
|
13
|
-
import { usePayrollConfigurationData as
|
|
14
|
-
import { isGrossUpEligible as
|
|
15
|
-
import { BaseComponent as
|
|
1
|
+
import { jsx as S, jsxs as ne, Fragment as pe } from "react/jsx-runtime";
|
|
2
|
+
import { useState as d, useRef as ue, useEffect as G } from "react";
|
|
3
|
+
import { usePayrollsGetSuspense as ce } from "@gusto/embedded-api/react-query/payrollsGet";
|
|
4
|
+
import { payrollsCalculate as me } from "@gusto/embedded-api/funcs/payrollsCalculate";
|
|
5
|
+
import { useGustoEmbeddedContext as ye } from "@gusto/embedded-api/react-query/_context";
|
|
6
|
+
import { PayrollProcessingRequestStatus as w } from "@gusto/embedded-api/models/components/payrollprocessingrequest";
|
|
7
|
+
import { useTranslation as de } from "react-i18next";
|
|
8
|
+
import { usePayrollsUpdateMutation as fe } from "@gusto/embedded-api/react-query/payrollsUpdate";
|
|
9
|
+
import { usePayrollsCalculateGrossUpMutation as Ce } from "@gusto/embedded-api/react-query/payrollsCalculateGrossUp";
|
|
10
|
+
import { usePayrollsGetBlockersSuspense as Se } from "@gusto/embedded-api/react-query/payrollsGetBlockers";
|
|
11
|
+
import { payrollSubmitHandler as Pe } from "../PayrollBlocker/payrollHelpers.js";
|
|
12
|
+
import { PayrollConfigurationPresentation as Ue } from "./PayrollConfigurationPresentation.js";
|
|
13
|
+
import { usePayrollConfigurationData as ge } from "./usePayrollConfigurationData.js";
|
|
14
|
+
import { isGrossUpEligible as he, getGrossUpTargetCompensationName as Le } from "./grossUpHelpers.js";
|
|
15
|
+
import { BaseComponent as we } from "../../Base/Base.js";
|
|
16
16
|
import { componentEvents as r } from "../../../shared/constants.js";
|
|
17
|
-
import { useComponentDictionary as
|
|
18
|
-
import { useBase as
|
|
19
|
-
import { useDateFormatter as
|
|
20
|
-
import { SDKInternalError as
|
|
21
|
-
import { GrossUpModal as
|
|
22
|
-
const
|
|
23
|
-
function
|
|
24
|
-
return /* @__PURE__ */ S(
|
|
17
|
+
import { useComponentDictionary as _e, useI18n as Re } from "../../../i18n/I18n.js";
|
|
18
|
+
import { useBase as Ae } from "../../Base/useBase.js";
|
|
19
|
+
import { useDateFormatter as De } from "../../../hooks/useDateFormatter.js";
|
|
20
|
+
import { SDKInternalError as x } from "../../../types/sdkError.js";
|
|
21
|
+
import { GrossUpModal as Ee } from "../GrossUpModal/GrossUpModal.js";
|
|
22
|
+
const Oe = (o) => o?.status === w.Calculating, be = (o, n) => n != null && (o?.status === w.CalculateSuccess || o == null);
|
|
23
|
+
function et(o) {
|
|
24
|
+
return /* @__PURE__ */ S(we, { ...o, children: /* @__PURE__ */ S(Te, { ...o, children: o.children }) });
|
|
25
25
|
}
|
|
26
|
-
const
|
|
26
|
+
const Te = ({
|
|
27
27
|
onEvent: o,
|
|
28
28
|
companyId: n,
|
|
29
29
|
payrollId: p,
|
|
30
|
-
dictionary:
|
|
31
|
-
alerts:
|
|
32
|
-
withReimbursements:
|
|
30
|
+
dictionary: N,
|
|
31
|
+
alerts: M,
|
|
32
|
+
withReimbursements: Y = !0
|
|
33
33
|
}) => {
|
|
34
|
-
|
|
35
|
-
const { t: u } =
|
|
36
|
-
employeeDetails:
|
|
37
|
-
employeeCompensations:
|
|
38
|
-
paySchedule:
|
|
39
|
-
payPeriod:
|
|
40
|
-
payrollCategory:
|
|
41
|
-
pagination:
|
|
42
|
-
isLoading:
|
|
43
|
-
refetch:
|
|
44
|
-
} =
|
|
34
|
+
_e("Payroll.PayrollConfiguration", N), Re("Payroll.PayrollConfiguration");
|
|
35
|
+
const { t: u } = de("Payroll.PayrollConfiguration"), { baseSubmitHandler: f } = Ae(), c = De(), [l, m] = d(!1), [P, _] = d(!1), U = ue(null), B = ye(), {
|
|
36
|
+
employeeDetails: j,
|
|
37
|
+
employeeCompensations: R,
|
|
38
|
+
paySchedule: F,
|
|
39
|
+
payPeriod: W,
|
|
40
|
+
payrollCategory: g,
|
|
41
|
+
pagination: q,
|
|
42
|
+
isLoading: I,
|
|
43
|
+
refetch: A
|
|
44
|
+
} = ge({
|
|
45
45
|
companyId: n,
|
|
46
46
|
payrollId: p,
|
|
47
47
|
isCalculating: l || P
|
|
48
|
-
}), { data: a } =
|
|
48
|
+
}), { data: a } = ce(
|
|
49
49
|
{
|
|
50
50
|
companyId: n,
|
|
51
51
|
payrollId: p,
|
|
52
52
|
include: ["taxes", "benefits", "deductions", "payroll_status_meta"]
|
|
53
53
|
},
|
|
54
54
|
{ refetchInterval: l ? 5e3 : !1 }
|
|
55
|
-
), { mutateAsync: D, isPending:
|
|
56
|
-
|
|
57
|
-
},
|
|
55
|
+
), { mutateAsync: D, isPending: H } = fe(), { mutateAsync: K } = Ce(), [y, E] = d(null), [V, h] = d(!1), O = he(g), C = Le(g), J = (e) => {
|
|
56
|
+
E(e), h(!0), o(r.RUN_PAYROLL_GROSS_UP_SELECTED, { employeeUuid: e });
|
|
57
|
+
}, z = async (e) => {
|
|
58
58
|
if (!y) return null;
|
|
59
59
|
let t = null;
|
|
60
60
|
return await f(null, async () => {
|
|
61
|
-
t = (await
|
|
61
|
+
t = (await K({
|
|
62
62
|
request: {
|
|
63
63
|
payrollUuid: p,
|
|
64
64
|
payrollGrossUpRequest: {
|
|
@@ -72,22 +72,22 @@ const Oe = ({
|
|
|
72
72
|
employeeUuid: y
|
|
73
73
|
});
|
|
74
74
|
}), t;
|
|
75
|
-
},
|
|
75
|
+
}, Q = async (e) => {
|
|
76
76
|
if (!y || !C)
|
|
77
|
-
throw new
|
|
77
|
+
throw new x(
|
|
78
78
|
"Unable to apply gross-up: missing employee or target compensation."
|
|
79
79
|
);
|
|
80
|
-
const t =
|
|
80
|
+
const t = R.find((s) => s.employeeUuid === y);
|
|
81
81
|
if (!t)
|
|
82
|
-
throw new
|
|
83
|
-
const i = t.fixedCompensations ?? [],
|
|
82
|
+
throw new x("Unable to apply gross-up: employee compensation not found.");
|
|
83
|
+
const i = t.fixedCompensations ?? [], se = i.some(
|
|
84
84
|
(s) => s.name?.toLowerCase() === C.toLowerCase()
|
|
85
85
|
), k = i.map((s) => ({
|
|
86
86
|
name: s.name,
|
|
87
87
|
jobUuid: s.jobUuid,
|
|
88
88
|
amount: s.name?.toLowerCase() === C.toLowerCase() ? e : "0"
|
|
89
89
|
}));
|
|
90
|
-
if (!
|
|
90
|
+
if (!se) {
|
|
91
91
|
const s = t.hourlyCompensations?.[0]?.jobUuid ?? i[0]?.jobUuid ?? "";
|
|
92
92
|
k.push({
|
|
93
93
|
name: C,
|
|
@@ -95,18 +95,18 @@ const Oe = ({
|
|
|
95
95
|
amount: e
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
|
-
const
|
|
98
|
+
const le = (t.hourlyCompensations ?? []).map((s) => ({
|
|
99
99
|
name: s.name,
|
|
100
100
|
jobUuid: s.jobUuid,
|
|
101
101
|
hours: "0"
|
|
102
|
-
})),
|
|
102
|
+
})), re = (t.paidTimeOff ?? []).map((s) => ({
|
|
103
103
|
name: s.name,
|
|
104
104
|
hours: "0"
|
|
105
|
-
})),
|
|
105
|
+
})), ie = T({
|
|
106
106
|
...t,
|
|
107
107
|
fixedCompensations: k,
|
|
108
|
-
hourlyCompensations:
|
|
109
|
-
paidTimeOff:
|
|
108
|
+
hourlyCompensations: le,
|
|
109
|
+
paidTimeOff: re
|
|
110
110
|
});
|
|
111
111
|
await f({}, async () => {
|
|
112
112
|
const s = await D({
|
|
@@ -114,30 +114,30 @@ const Oe = ({
|
|
|
114
114
|
companyId: n,
|
|
115
115
|
payrollId: p,
|
|
116
116
|
payrollUpdate: {
|
|
117
|
-
employeeCompensations: [{ ...
|
|
117
|
+
employeeCompensations: [{ ...ie, excluded: !1 }]
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
121
|
o(r.RUN_PAYROLL_EMPLOYEE_SAVED, {
|
|
122
122
|
payrollPrepared: s.payrollPrepared
|
|
123
|
-
}), await
|
|
124
|
-
}),
|
|
125
|
-
},
|
|
123
|
+
}), await A();
|
|
124
|
+
}), E(null), h(!1);
|
|
125
|
+
}, X = async (e) => {
|
|
126
126
|
try {
|
|
127
|
-
await
|
|
127
|
+
await Q(e);
|
|
128
128
|
} catch {
|
|
129
129
|
}
|
|
130
|
-
}, { data:
|
|
130
|
+
}, { data: Z } = Se({
|
|
131
131
|
companyUuid: n
|
|
132
|
-
}),
|
|
132
|
+
}), b = (Z.payrollBlockers ?? []).map((e) => ({
|
|
133
133
|
key: e.key,
|
|
134
134
|
message: e.message
|
|
135
|
-
})), [
|
|
136
|
-
|
|
137
|
-
const e = await
|
|
138
|
-
|
|
135
|
+
})), [$, L] = d(b), v = async () => {
|
|
136
|
+
L([]), U.current = a.payrollShow?.calculatedAt?.getTime() ?? null, await f({}, async () => {
|
|
137
|
+
const e = await Pe(async () => {
|
|
138
|
+
_(!0);
|
|
139
139
|
try {
|
|
140
|
-
const t = await
|
|
140
|
+
const t = await me(B, {
|
|
141
141
|
companyId: n,
|
|
142
142
|
payrollId: p
|
|
143
143
|
});
|
|
@@ -145,18 +145,18 @@ const Oe = ({
|
|
|
145
145
|
throw t.error;
|
|
146
146
|
m(!0);
|
|
147
147
|
} finally {
|
|
148
|
-
|
|
148
|
+
_(!1);
|
|
149
149
|
}
|
|
150
150
|
});
|
|
151
|
-
!e.success && e.blockers.length > 0 &&
|
|
151
|
+
!e.success && e.blockers.length > 0 && L(e.blockers);
|
|
152
152
|
});
|
|
153
|
-
},
|
|
153
|
+
}, ee = (e) => {
|
|
154
154
|
o(r.RUN_PAYROLL_EMPLOYEE_EDIT, {
|
|
155
155
|
employeeId: e.uuid,
|
|
156
156
|
firstName: e.firstName,
|
|
157
157
|
lastName: e.lastName
|
|
158
158
|
});
|
|
159
|
-
},
|
|
159
|
+
}, T = ({
|
|
160
160
|
paymentMethod: e,
|
|
161
161
|
reimbursements: t,
|
|
162
162
|
...i
|
|
@@ -164,11 +164,11 @@ const Oe = ({
|
|
|
164
164
|
...i,
|
|
165
165
|
...e && e !== "Historical" ? { paymentMethod: e } : {},
|
|
166
166
|
memo: i.memo || void 0
|
|
167
|
-
}),
|
|
167
|
+
}), te = async (e) => {
|
|
168
168
|
o(r.RUN_PAYROLL_EMPLOYEE_SKIP, {
|
|
169
169
|
employeeId: e.employeeUuid
|
|
170
170
|
}), await f({}, async () => {
|
|
171
|
-
const t =
|
|
171
|
+
const t = T(e), i = await D({
|
|
172
172
|
request: {
|
|
173
173
|
companyId: n,
|
|
174
174
|
payrollId: p,
|
|
@@ -181,16 +181,15 @@ const Oe = ({
|
|
|
181
181
|
});
|
|
182
182
|
o(r.RUN_PAYROLL_EMPLOYEE_SAVED, {
|
|
183
183
|
payrollPrepared: i.payrollPrepared
|
|
184
|
-
}), await
|
|
184
|
+
}), await A();
|
|
185
185
|
});
|
|
186
186
|
}, oe = () => {
|
|
187
187
|
o(r.RUN_PAYROLL_BLOCKERS_VIEW_ALL);
|
|
188
188
|
};
|
|
189
189
|
G(() => {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
) && (o(r.RUN_PAYROLL_CALCULATED, {
|
|
190
|
+
Oe(a.payrollShow?.processingRequest) && !l && (U.current = a.payrollShow?.calculatedAt?.getTime() ?? null, m(!0));
|
|
191
|
+
const e = a.payrollShow?.calculatedAt, t = e?.getTime() !== U.current;
|
|
192
|
+
l && t && be(a.payrollShow?.processingRequest, e) && (o(r.RUN_PAYROLL_CALCULATED, {
|
|
194
193
|
payrollId: p,
|
|
195
194
|
alert: {
|
|
196
195
|
type: "success",
|
|
@@ -198,7 +197,7 @@ const Oe = ({
|
|
|
198
197
|
alertKey: "progressSaved"
|
|
199
198
|
},
|
|
200
199
|
payPeriod: a.payrollShow?.payPeriod
|
|
201
|
-
}),
|
|
200
|
+
}), L([]), m(!1)), l && a.payrollShow?.processingRequest?.status === w.ProcessingFailed && (o(r.RUN_PAYROLL_PROCESSING_FAILED), m(!1));
|
|
202
201
|
}, [
|
|
203
202
|
a.payrollShow?.processingRequest?.status,
|
|
204
203
|
a.payrollShow?.calculatedAt,
|
|
@@ -215,7 +214,7 @@ const Oe = ({
|
|
|
215
214
|
clearTimeout(t);
|
|
216
215
|
};
|
|
217
216
|
}, [l, o]);
|
|
218
|
-
const
|
|
217
|
+
const ae = a.payrollShow?.payrollStatusMeta?.payrollLate && a.payrollShow.payrollStatusMeta.initialCheckDate && a.payrollShow.payrollStatusMeta.expectedDebitTime && a.payrollShow.payrollStatusMeta.expectedCheckDate ? {
|
|
219
218
|
label: u("alerts.payrollLate", {
|
|
220
219
|
initialCheckDate: c.formatShortWithWeekday(
|
|
221
220
|
a.payrollShow.payrollStatusMeta.initialCheckDate
|
|
@@ -238,46 +237,46 @@ const Oe = ({
|
|
|
238
237
|
content: u("alerts.directDepositDeadlineText"),
|
|
239
238
|
variant: "info"
|
|
240
239
|
} : void 0;
|
|
241
|
-
return /* @__PURE__ */
|
|
240
|
+
return /* @__PURE__ */ ne(pe, { children: [
|
|
242
241
|
/* @__PURE__ */ S(
|
|
243
|
-
|
|
242
|
+
Ue,
|
|
244
243
|
{
|
|
245
|
-
onCalculatePayroll:
|
|
246
|
-
isCalculateDisabled:
|
|
247
|
-
onEdit:
|
|
248
|
-
onToggleExclude:
|
|
244
|
+
onCalculatePayroll: v,
|
|
245
|
+
isCalculateDisabled: b.length > 0,
|
|
246
|
+
onEdit: ee,
|
|
247
|
+
onToggleExclude: te,
|
|
249
248
|
onViewBlockers: oe,
|
|
250
|
-
employeeCompensations:
|
|
251
|
-
employeeDetails:
|
|
252
|
-
payPeriod:
|
|
253
|
-
paySchedule:
|
|
254
|
-
payrollCategory:
|
|
255
|
-
alerts:
|
|
256
|
-
payrollAlert:
|
|
257
|
-
isPending: l ||
|
|
249
|
+
employeeCompensations: R,
|
|
250
|
+
employeeDetails: j,
|
|
251
|
+
payPeriod: W,
|
|
252
|
+
paySchedule: F,
|
|
253
|
+
payrollCategory: g,
|
|
254
|
+
alerts: M,
|
|
255
|
+
payrollAlert: ae,
|
|
256
|
+
isPending: l || I || H || P,
|
|
258
257
|
isCalculating: P || l,
|
|
259
|
-
payrollBlockers:
|
|
260
|
-
pagination:
|
|
261
|
-
withReimbursements:
|
|
262
|
-
grossUpEnabled:
|
|
263
|
-
onGrossUpSelect:
|
|
258
|
+
payrollBlockers: $,
|
|
259
|
+
pagination: q,
|
|
260
|
+
withReimbursements: Y,
|
|
261
|
+
grossUpEnabled: O,
|
|
262
|
+
onGrossUpSelect: J
|
|
264
263
|
}
|
|
265
264
|
),
|
|
266
|
-
|
|
267
|
-
|
|
265
|
+
O && /* @__PURE__ */ S(
|
|
266
|
+
Ee,
|
|
268
267
|
{
|
|
269
|
-
isOpen:
|
|
270
|
-
onCalculateGrossUp:
|
|
271
|
-
onApply:
|
|
268
|
+
isOpen: V,
|
|
269
|
+
onCalculateGrossUp: z,
|
|
270
|
+
onApply: X,
|
|
272
271
|
onCancel: () => {
|
|
273
|
-
|
|
272
|
+
h(!1);
|
|
274
273
|
}
|
|
275
274
|
}
|
|
276
275
|
)
|
|
277
276
|
] });
|
|
278
277
|
};
|
|
279
278
|
export {
|
|
280
|
-
|
|
281
|
-
|
|
279
|
+
et as PayrollConfiguration,
|
|
280
|
+
Te as Root
|
|
282
281
|
};
|
|
283
282
|
//# sourceMappingURL=PayrollConfiguration.js.map
|