@gusto/embedded-react-sdk 0.32.0 → 0.34.0-rc.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 +52 -0
- package/dist/components/Common/Fields/MultiSelectComboBoxField/MultiSelectComboBoxField.d.ts +5 -0
- package/dist/components/Common/Fields/MultiSelectComboBoxField/MultiSelectComboBoxField.js +34 -0
- package/dist/components/Common/Fields/MultiSelectComboBoxField/MultiSelectComboBoxField.js.map +1 -0
- package/dist/components/Common/Fields/MultiSelectComboBoxField/index.d.ts +2 -0
- package/dist/components/Common/SignatureForm/SignatureForm.d.ts +1 -7
- package/dist/components/Common/UI/Badge/Badge.js +39 -8
- package/dist/components/Common/UI/Badge/Badge.js.map +1 -1
- package/dist/components/Common/UI/Badge/Badge.module.scss.js +8 -4
- package/dist/components/Common/UI/Badge/Badge.module.scss.js.map +1 -1
- package/dist/components/Common/UI/Badge/BadgeTypes.d.ts +12 -0
- package/dist/components/Common/UI/Badge/BadgeTypes.js.map +1 -1
- package/dist/components/Common/UI/Menu/Menu.js +2 -3
- package/dist/components/Common/UI/Menu/Menu.js.map +1 -1
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.d.ts +2 -0
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js +127 -0
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js.map +1 -0
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.module.scss.js +16 -0
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.module.scss.js.map +1 -0
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBoxTypes.d.ts +17 -0
- package/dist/components/Common/UI/MultiSelectComboBox/index.d.ts +3 -0
- package/dist/components/Common/index.d.ts +1 -0
- package/dist/components/Company/AssignSignatory/CreateSignatory/Schema.d.ts +4 -30
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.d.ts +2 -26
- package/dist/components/Company/BankAccount/BankAccountForm/Form.d.ts +1 -7
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.d.ts +1 -7
- package/dist/components/Company/FederalTaxes/useFederalTaxes.d.ts +7 -13
- package/dist/components/Company/Locations/LocationForm/Form.d.ts +7 -20
- package/dist/components/Company/PaySchedule/usePaySchedule.d.ts +7 -18
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +40 -46
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.d.ts +1 -13
- package/dist/components/Contractor/ContractorList/useContractorList.js +4 -4
- package/dist/components/Contractor/ContractorList/useContractorList.js.map +1 -1
- package/dist/components/Contractor/NewHireReport/NewHireReport.d.ts +5 -15
- package/dist/components/Contractor/NewHireReport/NewHireReport.js +28 -28
- package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.d.ts +7 -20
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.d.ts +5 -6
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +108 -100
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.d.ts +4 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +54 -50
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentFormSchema.d.ts +19 -67
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js +27 -26
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js +76 -44
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.d.ts +3 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js +28 -22
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.d.ts +3 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +63 -52
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
- package/dist/components/Contractor/Profile/useContractorProfile.d.ts +54 -120
- package/dist/components/Contractor/Profile/useContractorProfile.js +47 -47
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Employee/Compensation/useCompensation.d.ts +17 -44
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.d.ts +4 -22
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +59 -59
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +4 -22
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +33 -33
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.d.ts +5 -27
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +46 -46
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
- package/dist/components/Employee/Deductions/useDeductions.d.ts +7 -26
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.d.ts +5 -29
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js +8 -8
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.d.ts +9 -76
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.d.ts +1 -5
- package/dist/components/Employee/FederalTaxes/FederalForm.d.ts +7 -33
- package/dist/components/Employee/PaymentMethod/BankAccount.d.ts +5 -14
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.d.ts +5 -6
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.d.ts +12 -68
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +15 -14
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.d.ts +17 -82
- package/dist/components/Employee/Profile/AdminPersonalDetails.js +38 -33
- package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
- package/dist/components/Employee/Profile/HomeAddress.d.ts +11 -66
- package/dist/components/Employee/Profile/PersonalDetailsInputs.d.ts +15 -64
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +23 -19
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
- package/dist/components/Employee/Profile/Profile.js +2 -5
- package/dist/components/Employee/Profile/Profile.js.map +1 -1
- package/dist/components/Employee/Profile/SelfPersonalDetails.d.ts +8 -37
- package/dist/components/Employee/Profile/SelfPersonalDetails.js +22 -19
- package/dist/components/Employee/Profile/SelfPersonalDetails.js.map +1 -1
- package/dist/components/Employee/StateTaxes/StateForm.d.ts +1 -5
- package/dist/components/Employee/Taxes/FederalForm.d.ts +7 -33
- package/dist/components/Employee/Taxes/StateForm.d.ts +1 -5
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.d.ts +1 -11
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js +6 -9
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +84 -56
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.d.ts +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +56 -22
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationTypes.d.ts +5 -0
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.d.ts +2 -22
- package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js +22 -18
- package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/payrollHelpers.test.d.ts +1 -0
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +12 -8
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +5 -5
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +2 -12
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +34 -34
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js +38 -35
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +1 -0
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +26 -26
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/contexts/ApiProvider/ApiProvider.js +26 -25
- package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
- package/dist/contexts/ApiProvider/apiVersionHook.d.ts +2 -0
- package/dist/contexts/ApiProvider/apiVersionHook.js +7 -0
- package/dist/contexts/ApiProvider/apiVersionHook.js.map +1 -0
- package/dist/contexts/ApiProvider/apiVersionHook.test.d.ts +1 -0
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +60 -58
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
- package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
- package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
- package/dist/contexts/ThemeProvider/ThemeProvider.js +23 -23
- package/dist/contexts/ThemeProvider/ThemeProvider.js.map +1 -1
- package/dist/helpers/validations.d.ts +2 -2
- package/dist/i18n/I18n.js +15 -15
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Contractor.Payments.PaymentSummary.json.js +42 -40
- package/dist/i18n/en/Contractor.Payments.PaymentSummary.json.js.map +1 -1
- package/dist/i18n/en/Contractor.Payments.PaymentsList.json.js +9 -9
- package/dist/i18n/en/Payroll.EmployeeSelection.json.js +10 -0
- package/dist/i18n/en/Payroll.EmployeeSelection.json.js.map +1 -0
- package/dist/i18n/en/Payroll.OffCycleCreation.json.js +10 -8
- package/dist/i18n/en/Payroll.OffCycleCreation.json.js.map +1 -1
- package/dist/i18n/en/common.json.d.ts +4 -1
- package/dist/i18n/en/common.json.js +5 -5
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +14 -1
- package/docs/reference/endpoint-inventory.json +4 -0
- package/package.json +14 -13
|
@@ -1,120 +1,131 @@
|
|
|
1
|
-
import { jsxs as a, jsx as
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { useMemo as
|
|
1
|
+
import { jsxs as a, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as T } from "react-i18next";
|
|
3
|
+
import { useMemo as x } from "react";
|
|
4
4
|
import { getContractorDisplayName as C } from "../CreatePayment/helpers.js";
|
|
5
5
|
import { Flex as s } from "../../../Common/Flex/Flex.js";
|
|
6
6
|
import "classnames";
|
|
7
7
|
import "../../../../shared/constants.js";
|
|
8
|
-
import { useComponentContext as
|
|
9
|
-
import { useI18n as
|
|
10
|
-
import { formatHoursDisplay as
|
|
11
|
-
import
|
|
12
|
-
import { ConfirmWireDetails as
|
|
13
|
-
import { DataView as
|
|
8
|
+
import { useComponentContext as M } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
9
|
+
import { useI18n as S } from "../../../../i18n/I18n.js";
|
|
10
|
+
import { formatHoursDisplay as v } from "../../../Payroll/helpers.js";
|
|
11
|
+
import H from "../../../../hooks/useNumberFormatter.js";
|
|
12
|
+
import { ConfirmWireDetails as $ } from "../../../Payroll/ConfirmWireDetails/ConfirmWireDetails.js";
|
|
13
|
+
import { DataView as b } from "../../../Common/DataView/DataView.js";
|
|
14
14
|
const k = "0.000", Y = ({
|
|
15
|
-
contractorPaymentGroup:
|
|
16
|
-
contractors:
|
|
17
|
-
bankAccount:
|
|
18
|
-
companyId:
|
|
15
|
+
contractorPaymentGroup: m,
|
|
16
|
+
contractors: p,
|
|
17
|
+
bankAccount: y,
|
|
18
|
+
companyId: g,
|
|
19
19
|
wireInRequestUuid: d,
|
|
20
|
-
onEvent:
|
|
21
|
-
onDone:
|
|
20
|
+
onEvent: A,
|
|
21
|
+
onDone: f,
|
|
22
|
+
alerts: c = []
|
|
22
23
|
}) => {
|
|
23
|
-
const { Button:
|
|
24
|
-
|
|
25
|
-
const { t } =
|
|
26
|
-
(e,
|
|
24
|
+
const { Button: D, Text: r, Heading: w, Alert: h } = M();
|
|
25
|
+
S("Contractor.Payments.PaymentSummary");
|
|
26
|
+
const { t } = T("Contractor.Payments.PaymentSummary"), i = H(), N = (e) => e.wageType === "Hourly" && e.hourlyRate ? `Hourly ${i(Number(e.hourlyRate))}/hr` : e.wageType, l = m.contractorPayments || [], u = x(() => l.length === 0 ? { wageAmount: 0, bonusAmount: 0, reimbursementAmount: 0, totalAmount: 0 } : l.reduce(
|
|
27
|
+
(e, o) => (e.wageAmount += Number(o.wage || "0"), e.bonusAmount += Number(o.bonus || "0"), e.reimbursementAmount += Number(o.reimbursement || "0"), e.totalAmount += Number(o.wageTotal || "0"), e),
|
|
27
28
|
{ wageAmount: 0, bonusAmount: 0, reimbursementAmount: 0, totalAmount: 0 }
|
|
28
|
-
), [
|
|
29
|
+
), [l]);
|
|
29
30
|
return /* @__PURE__ */ a(s, { flexDirection: "column", gap: 32, children: [
|
|
30
|
-
/* @__PURE__ */
|
|
31
|
-
|
|
31
|
+
c.length > 0 && /* @__PURE__ */ n(s, { flexDirection: "column", gap: 16, children: c.map((e, o) => /* @__PURE__ */ n(
|
|
32
|
+
h,
|
|
33
|
+
{
|
|
34
|
+
label: t(`alerts.${e.title}`, e.translationParams),
|
|
35
|
+
status: e.type,
|
|
36
|
+
onDismiss: e.onDismiss,
|
|
37
|
+
children: typeof e.content == "string" ? t(`alerts.${e.content}`) : e.content ?? null
|
|
38
|
+
},
|
|
39
|
+
`${e.type}-${e.title}-${o}`
|
|
40
|
+
)) }),
|
|
41
|
+
/* @__PURE__ */ n(h, { status: "success", label: t("successTitle"), children: /* @__PURE__ */ n(r, { children: t("successMessage", {
|
|
42
|
+
count: l.length
|
|
32
43
|
}) }) }),
|
|
33
|
-
d && /* @__PURE__ */
|
|
44
|
+
d && /* @__PURE__ */ n($, { companyId: g, wireInId: d, onEvent: A }),
|
|
34
45
|
/* @__PURE__ */ a(s, { justifyContent: "space-between", alignItems: "flex-start", children: [
|
|
35
46
|
/* @__PURE__ */ a(s, { flexDirection: "column", gap: 2, children: [
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */ r
|
|
47
|
+
/* @__PURE__ */ n(w, { as: "h2", children: t("summaryTitle") }),
|
|
48
|
+
/* @__PURE__ */ n(r, { variant: "supporting", children: t("summarySubtitle", { debitDate: m.debitDate }) })
|
|
38
49
|
] }),
|
|
39
|
-
/* @__PURE__ */
|
|
50
|
+
/* @__PURE__ */ n(D, { onClick: f, variant: "primary", children: t("doneCta") })
|
|
40
51
|
] }),
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
|
|
52
|
+
/* @__PURE__ */ n(
|
|
53
|
+
b,
|
|
43
54
|
{
|
|
44
55
|
columns: [
|
|
45
56
|
{
|
|
46
57
|
title: t("totalAmount"),
|
|
47
|
-
render: () => /* @__PURE__ */ r
|
|
58
|
+
render: () => /* @__PURE__ */ n(r, { children: i(Number(m.totals?.amount || "0")) })
|
|
48
59
|
},
|
|
49
60
|
{
|
|
50
61
|
title: t("debitAmount"),
|
|
51
|
-
render: () => /* @__PURE__ */ r
|
|
62
|
+
render: () => /* @__PURE__ */ n(r, { children: i(Number(m.totals?.debitAmount || "0")) })
|
|
52
63
|
},
|
|
53
64
|
{
|
|
54
65
|
title: t("debitAccount"),
|
|
55
|
-
render: () => /* @__PURE__ */ r
|
|
66
|
+
render: () => /* @__PURE__ */ n(r, { children: y?.hiddenAccountNumber ?? t("notAvailable") })
|
|
56
67
|
},
|
|
57
68
|
{
|
|
58
69
|
title: t("debitDate"),
|
|
59
|
-
render: () => /* @__PURE__ */ r
|
|
70
|
+
render: () => /* @__PURE__ */ n(r, { children: m.debitDate || t("notAvailable") })
|
|
60
71
|
},
|
|
61
72
|
{
|
|
62
73
|
title: t("contractorPayDate"),
|
|
63
|
-
render: () => /* @__PURE__ */ r
|
|
74
|
+
render: () => /* @__PURE__ */ n(r, { children: m.checkDate || t("notAvailable") })
|
|
64
75
|
}
|
|
65
76
|
],
|
|
66
|
-
data: [
|
|
77
|
+
data: [m],
|
|
67
78
|
label: t("paymentSummaryTitle")
|
|
68
79
|
}
|
|
69
80
|
),
|
|
70
|
-
|
|
71
|
-
|
|
81
|
+
l.length > 0 && /* @__PURE__ */ n(
|
|
82
|
+
b,
|
|
72
83
|
{
|
|
73
84
|
columns: [
|
|
74
85
|
{
|
|
75
86
|
title: t("contractor"),
|
|
76
|
-
render: (e) => /* @__PURE__ */ r
|
|
77
|
-
|
|
78
|
-
(
|
|
87
|
+
render: (e) => /* @__PURE__ */ n(r, { children: C(
|
|
88
|
+
p.find(
|
|
89
|
+
(o) => o.uuid === e.contractorUuid
|
|
79
90
|
)
|
|
80
91
|
) })
|
|
81
92
|
},
|
|
82
93
|
{
|
|
83
94
|
title: t("wageType"),
|
|
84
|
-
render: (e) => /* @__PURE__ */ r
|
|
95
|
+
render: (e) => /* @__PURE__ */ n(r, { children: N(e) })
|
|
85
96
|
},
|
|
86
97
|
{
|
|
87
98
|
title: t("paymentMethod"),
|
|
88
|
-
render: (e) => /* @__PURE__ */ r
|
|
99
|
+
render: (e) => /* @__PURE__ */ n(r, { children: e.paymentMethod === "Direct Deposit" ? t("paymentMethods.directDeposit") : e.paymentMethod === "Check" ? t("paymentMethods.check") : e.paymentMethod || t("notAvailable") })
|
|
89
100
|
},
|
|
90
101
|
{
|
|
91
102
|
title: t("hours"),
|
|
92
|
-
render: (e) => /* @__PURE__ */ r
|
|
103
|
+
render: (e) => /* @__PURE__ */ n(r, { children: e.wageType === "Hourly" && e.hours ? v(parseFloat(e.hours)) : k })
|
|
93
104
|
},
|
|
94
105
|
{
|
|
95
106
|
title: t("wage"),
|
|
96
|
-
render: (e) => /* @__PURE__ */ r
|
|
107
|
+
render: (e) => /* @__PURE__ */ n(r, { children: i(Number(e.wage || "0")) })
|
|
97
108
|
},
|
|
98
109
|
{
|
|
99
110
|
title: t("bonus"),
|
|
100
|
-
render: (e) => /* @__PURE__ */ r
|
|
111
|
+
render: (e) => /* @__PURE__ */ n(r, { children: i(Number(e.bonus || "0")) })
|
|
101
112
|
},
|
|
102
113
|
{
|
|
103
114
|
title: t("reimbursement"),
|
|
104
|
-
render: (e) => /* @__PURE__ */ r
|
|
115
|
+
render: (e) => /* @__PURE__ */ n(r, { children: i(Number(e.reimbursement || "0")) })
|
|
105
116
|
},
|
|
106
117
|
{
|
|
107
118
|
title: t("total"),
|
|
108
|
-
render: (e) => /* @__PURE__ */ r
|
|
119
|
+
render: (e) => /* @__PURE__ */ n(r, { children: i(Number(e.wageTotal || "0")) })
|
|
109
120
|
}
|
|
110
121
|
],
|
|
111
|
-
data:
|
|
122
|
+
data: l,
|
|
112
123
|
footer: () => ({
|
|
113
|
-
"column-0": /* @__PURE__ */ r
|
|
114
|
-
"column-4": /* @__PURE__ */ r
|
|
115
|
-
"column-5": /* @__PURE__ */ r
|
|
116
|
-
"column-6": /* @__PURE__ */ r
|
|
117
|
-
"column-7": /* @__PURE__ */ r
|
|
124
|
+
"column-0": /* @__PURE__ */ n(r, { weight: "bold", children: t("totalsLabel") }),
|
|
125
|
+
"column-4": /* @__PURE__ */ n(r, { children: i(u.wageAmount || 0) }),
|
|
126
|
+
"column-5": /* @__PURE__ */ n(r, { children: i(u.bonusAmount || 0) }),
|
|
127
|
+
"column-6": /* @__PURE__ */ n(r, { children: i(u.reimbursementAmount || 0) }),
|
|
128
|
+
"column-7": /* @__PURE__ */ n(r, { children: i(u.totalAmount || 0) })
|
|
118
129
|
}),
|
|
119
130
|
label: t("contractorPaymentsTitle")
|
|
120
131
|
}
|
package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaymentSummaryPresentation.js","sources":["../../../../../src/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { ContractorPaymentGroup } from '@gusto/embedded-api/models/components/contractorpaymentgroup'\nimport type { ContractorPaymentForGroup } from '@gusto/embedded-api/models/components/contractorpaymentforgroup'\nimport { useMemo } from 'react'\nimport type { Contractor } from '@gusto/embedded-api/models/components/contractor'\nimport type { CompanyBankAccount } from '@gusto/embedded-api/models/components/companybankaccount'\nimport { getContractorDisplayName } from '../CreatePayment/helpers'\nimport { DataView, Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport { formatHoursDisplay } from '@/components/Payroll/helpers'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\nimport { ConfirmWireDetails } from '@/components/Payroll/ConfirmWireDetails'\nimport type { EventType } from '@/shared/constants'\n\nconst ZERO_HOURS_DISPLAY = '0.000'\n\ninterface PaymentSummaryPresentationProps {\n contractorPaymentGroup: ContractorPaymentGroup\n contractors: Contractor[]\n bankAccount?: CompanyBankAccount\n companyId: string\n wireInRequestUuid?: string\n onEvent: (type: EventType, data?: unknown) => void\n onDone: () => void\n}\n\nexport const PaymentSummaryPresentation = ({\n contractorPaymentGroup,\n contractors,\n bankAccount,\n companyId,\n wireInRequestUuid,\n onEvent,\n onDone,\n}: PaymentSummaryPresentationProps) => {\n const { Button, Text, Heading, Alert } = useComponentContext()\n useI18n('Contractor.Payments.PaymentSummary')\n const { t } = useTranslation('Contractor.Payments.PaymentSummary')\n const currencyFormatter = useNumberFormatter()\n\n const formatWageType = (contractor: ContractorPaymentForGroup) => {\n if (contractor.wageType === 'Hourly' && contractor.hourlyRate) {\n return `Hourly ${currencyFormatter(Number(contractor.hourlyRate))}/hr`\n }\n return contractor.wageType\n }\n\n const contractorPayments = contractorPaymentGroup.contractorPayments || []\n\n const totals = useMemo(() => {\n if (contractorPayments.length === 0) {\n return { wageAmount: 0, bonusAmount: 0, reimbursementAmount: 0, totalAmount: 0 }\n }\n return contractorPayments.reduce(\n (acc, contractor) => {\n acc.wageAmount += Number(contractor.wage || '0')\n acc.bonusAmount += Number(contractor.bonus || '0')\n acc.reimbursementAmount += Number(contractor.reimbursement || '0')\n acc.totalAmount += Number(contractor.wageTotal || '0')\n return acc\n },\n { wageAmount: 0, bonusAmount: 0, reimbursementAmount: 0, totalAmount: 0 },\n )\n }, [contractorPayments])\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n <Alert status=\"success\" label={t('successTitle')}>\n <Text>\n {t('successMessage', {\n count: contractorPayments.length,\n })}\n </Text>\n </Alert>\n\n {wireInRequestUuid && (\n <ConfirmWireDetails companyId={companyId} wireInId={wireInRequestUuid} onEvent={onEvent} />\n )}\n\n <Flex justifyContent=\"space-between\" alignItems=\"flex-start\">\n <Flex flexDirection=\"column\" gap={2}>\n <Heading as=\"h2\">{t('summaryTitle')}</Heading>\n <Text variant=\"supporting\">\n {t('summarySubtitle', { debitDate: contractorPaymentGroup.debitDate })}\n </Text>\n </Flex>\n <Button onClick={onDone} variant=\"primary\">\n {t('doneCta')}\n </Button>\n </Flex>\n\n {/* Payment Summary Table */}\n <DataView\n columns={[\n {\n title: t('totalAmount'),\n render: () => (\n <Text>{currencyFormatter(Number(contractorPaymentGroup.totals?.amount || '0'))}</Text>\n ),\n },\n {\n title: t('debitAmount'),\n render: () => (\n <Text>\n {currencyFormatter(Number(contractorPaymentGroup.totals?.debitAmount || '0'))}\n </Text>\n ),\n },\n {\n title: t('debitAccount'),\n render: () => <Text>{bankAccount?.hiddenAccountNumber ?? t('notAvailable')}</Text>,\n },\n {\n title: t('debitDate'),\n render: () => <Text>{contractorPaymentGroup.debitDate || t('notAvailable')}</Text>,\n },\n {\n title: t('contractorPayDate'),\n render: () => <Text>{contractorPaymentGroup.checkDate || t('notAvailable')}</Text>,\n },\n ]}\n data={[contractorPaymentGroup]}\n label={t('paymentSummaryTitle')}\n />\n\n {/* Contractor Payments Table */}\n {contractorPayments.length > 0 && (\n <DataView\n columns={[\n {\n title: t('contractor'),\n render: contractorPayment => (\n <Text>\n {getContractorDisplayName(\n contractors.find(\n contractor => contractor.uuid === contractorPayment.contractorUuid,\n ),\n )}\n </Text>\n ),\n },\n {\n title: t('wageType'),\n render: contractorPayment => <Text>{formatWageType(contractorPayment)}</Text>,\n },\n {\n title: t('paymentMethod'),\n render: contractorPayment => (\n <Text>\n {contractorPayment.paymentMethod === 'Direct Deposit'\n ? t('paymentMethods.directDeposit')\n : contractorPayment.paymentMethod === 'Check'\n ? t('paymentMethods.check')\n : contractorPayment.paymentMethod || t('notAvailable')}\n </Text>\n ),\n },\n {\n title: t('hours'),\n render: contractorPayment => (\n <Text>\n {contractorPayment.wageType === 'Hourly' && contractorPayment.hours\n ? formatHoursDisplay(parseFloat(contractorPayment.hours))\n : ZERO_HOURS_DISPLAY}\n </Text>\n ),\n },\n {\n title: t('wage'),\n render: contractorPayment => (\n <Text>{currencyFormatter(Number(contractorPayment.wage || '0'))}</Text>\n ),\n },\n {\n title: t('bonus'),\n render: contractorPayment => (\n <Text>{currencyFormatter(Number(contractorPayment.bonus || '0'))}</Text>\n ),\n },\n {\n title: t('reimbursement'),\n render: contractorPayment => (\n <Text>{currencyFormatter(Number(contractorPayment.reimbursement || '0'))}</Text>\n ),\n },\n {\n title: t('total'),\n render: contractorPayment => (\n <Text>{currencyFormatter(Number(contractorPayment.wageTotal || '0'))}</Text>\n ),\n },\n ]}\n data={contractorPayments}\n footer={() => ({\n 'column-0': <Text weight=\"bold\">{t('totalsLabel')}</Text>,\n 'column-4': <Text>{currencyFormatter(totals.wageAmount || 0)}</Text>,\n 'column-5': <Text>{currencyFormatter(totals.bonusAmount || 0)}</Text>,\n 'column-6': <Text>{currencyFormatter(totals.reimbursementAmount || 0)}</Text>,\n 'column-7': <Text>{currencyFormatter(totals.totalAmount || 0)}</Text>,\n })}\n label={t('contractorPaymentsTitle')}\n />\n )}\n </Flex>\n )\n}\n"],"names":["ZERO_HOURS_DISPLAY","PaymentSummaryPresentation","contractorPaymentGroup","contractors","bankAccount","companyId","wireInRequestUuid","onEvent","onDone","Button","Text","Heading","Alert","useComponentContext","useI18n","useTranslation","currencyFormatter","useNumberFormatter","formatWageType","contractor","contractorPayments","totals","useMemo","acc","jsx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IAAA;AAAA,EACpC,GAEJ;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"PaymentSummaryPresentation.js","sources":["../../../../../src/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { ContractorPaymentGroup } from '@gusto/embedded-api/models/components/contractorpaymentgroup'\nimport type { ContractorPaymentForGroup } from '@gusto/embedded-api/models/components/contractorpaymentforgroup'\nimport { useMemo } from 'react'\nimport type { Contractor } from '@gusto/embedded-api/models/components/contractor'\nimport type { CompanyBankAccount } from '@gusto/embedded-api/models/components/companybankaccount'\nimport type { InternalAlert } from '../types'\nimport { getContractorDisplayName } from '../CreatePayment/helpers'\nimport { DataView, Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport { formatHoursDisplay } from '@/components/Payroll/helpers'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\nimport { ConfirmWireDetails } from '@/components/Payroll/ConfirmWireDetails'\nimport type { EventType } from '@/shared/constants'\n\nconst ZERO_HOURS_DISPLAY = '0.000'\n\ninterface PaymentSummaryPresentationProps {\n contractorPaymentGroup: ContractorPaymentGroup\n contractors: Contractor[]\n bankAccount?: CompanyBankAccount\n companyId: string\n wireInRequestUuid?: string\n onEvent: (type: EventType, data?: unknown) => void\n onDone: () => void\n alerts?: InternalAlert[]\n}\n\nexport const PaymentSummaryPresentation = ({\n contractorPaymentGroup,\n contractors,\n bankAccount,\n companyId,\n wireInRequestUuid,\n onEvent,\n onDone,\n alerts = [],\n}: PaymentSummaryPresentationProps) => {\n const { Button, Text, Heading, Alert } = useComponentContext()\n useI18n('Contractor.Payments.PaymentSummary')\n const { t } = useTranslation('Contractor.Payments.PaymentSummary')\n const currencyFormatter = useNumberFormatter()\n\n const formatWageType = (contractor: ContractorPaymentForGroup) => {\n if (contractor.wageType === 'Hourly' && contractor.hourlyRate) {\n return `Hourly ${currencyFormatter(Number(contractor.hourlyRate))}/hr`\n }\n return contractor.wageType\n }\n\n const contractorPayments = contractorPaymentGroup.contractorPayments || []\n\n const totals = useMemo(() => {\n if (contractorPayments.length === 0) {\n return { wageAmount: 0, bonusAmount: 0, reimbursementAmount: 0, totalAmount: 0 }\n }\n return contractorPayments.reduce(\n (acc, contractor) => {\n acc.wageAmount += Number(contractor.wage || '0')\n acc.bonusAmount += Number(contractor.bonus || '0')\n acc.reimbursementAmount += Number(contractor.reimbursement || '0')\n acc.totalAmount += Number(contractor.wageTotal || '0')\n return acc\n },\n { wageAmount: 0, bonusAmount: 0, reimbursementAmount: 0, totalAmount: 0 },\n )\n }, [contractorPayments])\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n {alerts.length > 0 && (\n <Flex flexDirection=\"column\" gap={16}>\n {alerts.map((alert, index) => (\n <Alert\n key={`${alert.type}-${alert.title}-${index}`}\n label={t(`alerts.${alert.title}` as never, alert.translationParams)}\n status={alert.type}\n onDismiss={alert.onDismiss}\n >\n {typeof alert.content === 'string'\n ? t(`alerts.${alert.content}` as never)\n : (alert.content ?? null)}\n </Alert>\n ))}\n </Flex>\n )}\n\n <Alert status=\"success\" label={t('successTitle')}>\n <Text>\n {t('successMessage', {\n count: contractorPayments.length,\n })}\n </Text>\n </Alert>\n\n {wireInRequestUuid && (\n <ConfirmWireDetails companyId={companyId} wireInId={wireInRequestUuid} onEvent={onEvent} />\n )}\n\n <Flex justifyContent=\"space-between\" alignItems=\"flex-start\">\n <Flex flexDirection=\"column\" gap={2}>\n <Heading as=\"h2\">{t('summaryTitle')}</Heading>\n <Text variant=\"supporting\">\n {t('summarySubtitle', { debitDate: contractorPaymentGroup.debitDate })}\n </Text>\n </Flex>\n <Button onClick={onDone} variant=\"primary\">\n {t('doneCta')}\n </Button>\n </Flex>\n\n {/* Payment Summary Table */}\n <DataView\n columns={[\n {\n title: t('totalAmount'),\n render: () => (\n <Text>{currencyFormatter(Number(contractorPaymentGroup.totals?.amount || '0'))}</Text>\n ),\n },\n {\n title: t('debitAmount'),\n render: () => (\n <Text>\n {currencyFormatter(Number(contractorPaymentGroup.totals?.debitAmount || '0'))}\n </Text>\n ),\n },\n {\n title: t('debitAccount'),\n render: () => <Text>{bankAccount?.hiddenAccountNumber ?? t('notAvailable')}</Text>,\n },\n {\n title: t('debitDate'),\n render: () => <Text>{contractorPaymentGroup.debitDate || t('notAvailable')}</Text>,\n },\n {\n title: t('contractorPayDate'),\n render: () => <Text>{contractorPaymentGroup.checkDate || t('notAvailable')}</Text>,\n },\n ]}\n data={[contractorPaymentGroup]}\n label={t('paymentSummaryTitle')}\n />\n\n {/* Contractor Payments Table */}\n {contractorPayments.length > 0 && (\n <DataView\n columns={[\n {\n title: t('contractor'),\n render: contractorPayment => (\n <Text>\n {getContractorDisplayName(\n contractors.find(\n contractor => contractor.uuid === contractorPayment.contractorUuid,\n ),\n )}\n </Text>\n ),\n },\n {\n title: t('wageType'),\n render: contractorPayment => <Text>{formatWageType(contractorPayment)}</Text>,\n },\n {\n title: t('paymentMethod'),\n render: contractorPayment => (\n <Text>\n {contractorPayment.paymentMethod === 'Direct Deposit'\n ? t('paymentMethods.directDeposit')\n : contractorPayment.paymentMethod === 'Check'\n ? t('paymentMethods.check')\n : contractorPayment.paymentMethod || t('notAvailable')}\n </Text>\n ),\n },\n {\n title: t('hours'),\n render: contractorPayment => (\n <Text>\n {contractorPayment.wageType === 'Hourly' && contractorPayment.hours\n ? formatHoursDisplay(parseFloat(contractorPayment.hours))\n : ZERO_HOURS_DISPLAY}\n </Text>\n ),\n },\n {\n title: t('wage'),\n render: contractorPayment => (\n <Text>{currencyFormatter(Number(contractorPayment.wage || '0'))}</Text>\n ),\n },\n {\n title: t('bonus'),\n render: contractorPayment => (\n <Text>{currencyFormatter(Number(contractorPayment.bonus || '0'))}</Text>\n ),\n },\n {\n title: t('reimbursement'),\n render: contractorPayment => (\n <Text>{currencyFormatter(Number(contractorPayment.reimbursement || '0'))}</Text>\n ),\n },\n {\n title: t('total'),\n render: contractorPayment => (\n <Text>{currencyFormatter(Number(contractorPayment.wageTotal || '0'))}</Text>\n ),\n },\n ]}\n data={contractorPayments}\n footer={() => ({\n 'column-0': <Text weight=\"bold\">{t('totalsLabel')}</Text>,\n 'column-4': <Text>{currencyFormatter(totals.wageAmount || 0)}</Text>,\n 'column-5': <Text>{currencyFormatter(totals.bonusAmount || 0)}</Text>,\n 'column-6': <Text>{currencyFormatter(totals.reimbursementAmount || 0)}</Text>,\n 'column-7': <Text>{currencyFormatter(totals.totalAmount || 0)}</Text>,\n })}\n label={t('contractorPaymentsTitle')}\n />\n )}\n </Flex>\n )\n}\n"],"names":["ZERO_HOURS_DISPLAY","PaymentSummaryPresentation","contractorPaymentGroup","contractors","bankAccount","companyId","wireInRequestUuid","onEvent","onDone","alerts","Button","Text","Heading","Alert","useComponentContext","useI18n","useTranslation","currencyFormatter","useNumberFormatter","formatWageType","contractor","contractorPayments","totals","useMemo","acc","jsxs","Flex","jsx","alert","index","ConfirmWireDetails","DataView","contractorPayment","getContractorDisplayName","formatHoursDisplay"],"mappings":";;;;;;;;;;;;;AAgBA,MAAMA,IAAqB,SAadC,IAA6B,CAAC;AAAA,EACzC,wBAAAC;AAAA,EACA,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,SAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC,IAAS,CAAA;AACX,MAAuC;AACrC,QAAM,EAAE,QAAAC,GAAQ,MAAAC,GAAM,SAAAC,GAAS,OAAAC,EAAA,IAAUC,EAAA;AACzC,EAAAC,EAAQ,oCAAoC;AAC5C,QAAM,EAAE,EAAA,IAAMC,EAAe,oCAAoC,GAC3DC,IAAoBC,EAAA,GAEpBC,IAAiB,CAACC,MAClBA,EAAW,aAAa,YAAYA,EAAW,aAC1C,UAAUH,EAAkB,OAAOG,EAAW,UAAU,CAAC,CAAC,QAE5DA,EAAW,UAGdC,IAAqBnB,EAAuB,sBA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Onboarding: z.ZodBoolean;
|
|
13
13
|
email: z.ZodOptional<z.ZodString>;
|
|
14
|
-
contractorType: z.ZodEnum<
|
|
15
|
-
|
|
14
|
+
contractorType: z.ZodEnum<{
|
|
15
|
+
Business: "Business";
|
|
16
|
+
Individual: "Individual";
|
|
17
|
+
}>;
|
|
18
|
+
wageType: z.ZodEnum<{
|
|
19
|
+
Hourly: "Hourly";
|
|
20
|
+
Fixed: "Fixed";
|
|
21
|
+
}>;
|
|
16
22
|
startDate: z.ZodDate;
|
|
17
23
|
firstName: z.ZodOptional<z.ZodString>;
|
|
18
24
|
middleInitial: z.ZodOptional<z.ZodString>;
|
|
@@ -21,39 +27,19 @@ declare const ContractorProfileSchema: z.ZodObject<{
|
|
|
21
27
|
businessName: z.ZodOptional<z.ZodString>;
|
|
22
28
|
ein: z.ZodOptional<z.ZodString>;
|
|
23
29
|
hourlyRate: z.ZodOptional<z.ZodNumber>;
|
|
24
|
-
},
|
|
25
|
-
wageType: "Hourly" | "Fixed";
|
|
26
|
-
startDate: Date;
|
|
27
|
-
selfOnboarding: boolean;
|
|
28
|
-
contractorType: "Business" | "Individual";
|
|
29
|
-
ssn?: string | undefined;
|
|
30
|
-
ein?: string | undefined;
|
|
31
|
-
email?: string | undefined;
|
|
32
|
-
firstName?: string | undefined;
|
|
33
|
-
lastName?: string | undefined;
|
|
34
|
-
businessName?: string | undefined;
|
|
35
|
-
hourlyRate?: number | undefined;
|
|
36
|
-
middleInitial?: string | undefined;
|
|
37
|
-
}, {
|
|
38
|
-
wageType: "Hourly" | "Fixed";
|
|
39
|
-
startDate: Date;
|
|
40
|
-
selfOnboarding: boolean;
|
|
41
|
-
contractorType: "Business" | "Individual";
|
|
42
|
-
ssn?: string | undefined;
|
|
43
|
-
ein?: string | undefined;
|
|
44
|
-
email?: string | undefined;
|
|
45
|
-
firstName?: string | undefined;
|
|
46
|
-
lastName?: string | undefined;
|
|
47
|
-
businessName?: string | undefined;
|
|
48
|
-
hourlyRate?: number | undefined;
|
|
49
|
-
middleInitial?: string | undefined;
|
|
50
|
-
}>;
|
|
30
|
+
}, z.core.$strip>;
|
|
51
31
|
export type ContractorProfileFormData = z.infer<typeof ContractorProfileSchema>;
|
|
52
|
-
export declare const createContractorProfileValidationSchema: (t: (key: string) => string, hasSsn: boolean, hasEin: boolean) => z.
|
|
32
|
+
export declare const createContractorProfileValidationSchema: (t: (key: string) => string, hasSsn: boolean, hasEin: boolean) => z.ZodObject<{
|
|
53
33
|
selfOnboarding: z.ZodBoolean;
|
|
54
34
|
email: z.ZodOptional<z.ZodString>;
|
|
55
|
-
contractorType: z.ZodEnum<
|
|
56
|
-
|
|
35
|
+
contractorType: z.ZodEnum<{
|
|
36
|
+
Business: "Business";
|
|
37
|
+
Individual: "Individual";
|
|
38
|
+
}>;
|
|
39
|
+
wageType: z.ZodEnum<{
|
|
40
|
+
Hourly: "Hourly";
|
|
41
|
+
Fixed: "Fixed";
|
|
42
|
+
}>;
|
|
57
43
|
startDate: z.ZodDate;
|
|
58
44
|
firstName: z.ZodOptional<z.ZodString>;
|
|
59
45
|
middleInitial: z.ZodOptional<z.ZodString>;
|
|
@@ -62,59 +48,7 @@ export declare const createContractorProfileValidationSchema: (t: (key: string)
|
|
|
62
48
|
businessName: z.ZodOptional<z.ZodString>;
|
|
63
49
|
ein: z.ZodOptional<z.ZodString>;
|
|
64
50
|
hourlyRate: z.ZodOptional<z.ZodNumber>;
|
|
65
|
-
},
|
|
66
|
-
wageType: "Hourly" | "Fixed";
|
|
67
|
-
startDate: Date;
|
|
68
|
-
selfOnboarding: boolean;
|
|
69
|
-
contractorType: "Business" | "Individual";
|
|
70
|
-
ssn?: string | undefined;
|
|
71
|
-
ein?: string | undefined;
|
|
72
|
-
email?: string | undefined;
|
|
73
|
-
firstName?: string | undefined;
|
|
74
|
-
lastName?: string | undefined;
|
|
75
|
-
businessName?: string | undefined;
|
|
76
|
-
hourlyRate?: number | undefined;
|
|
77
|
-
middleInitial?: string | undefined;
|
|
78
|
-
}, {
|
|
79
|
-
wageType: "Hourly" | "Fixed";
|
|
80
|
-
startDate: Date;
|
|
81
|
-
selfOnboarding: boolean;
|
|
82
|
-
contractorType: "Business" | "Individual";
|
|
83
|
-
ssn?: string | undefined;
|
|
84
|
-
ein?: string | undefined;
|
|
85
|
-
email?: string | undefined;
|
|
86
|
-
firstName?: string | undefined;
|
|
87
|
-
lastName?: string | undefined;
|
|
88
|
-
businessName?: string | undefined;
|
|
89
|
-
hourlyRate?: number | undefined;
|
|
90
|
-
middleInitial?: string | undefined;
|
|
91
|
-
}>, {
|
|
92
|
-
wageType: "Hourly" | "Fixed";
|
|
93
|
-
startDate: Date;
|
|
94
|
-
selfOnboarding: boolean;
|
|
95
|
-
contractorType: "Business" | "Individual";
|
|
96
|
-
ssn?: string | undefined;
|
|
97
|
-
ein?: string | undefined;
|
|
98
|
-
email?: string | undefined;
|
|
99
|
-
firstName?: string | undefined;
|
|
100
|
-
lastName?: string | undefined;
|
|
101
|
-
businessName?: string | undefined;
|
|
102
|
-
hourlyRate?: number | undefined;
|
|
103
|
-
middleInitial?: string | undefined;
|
|
104
|
-
}, {
|
|
105
|
-
wageType: "Hourly" | "Fixed";
|
|
106
|
-
startDate: Date;
|
|
107
|
-
selfOnboarding: boolean;
|
|
108
|
-
contractorType: "Business" | "Individual";
|
|
109
|
-
ssn?: string | undefined;
|
|
110
|
-
ein?: string | undefined;
|
|
111
|
-
email?: string | undefined;
|
|
112
|
-
firstName?: string | undefined;
|
|
113
|
-
lastName?: string | undefined;
|
|
114
|
-
businessName?: string | undefined;
|
|
115
|
-
hourlyRate?: number | undefined;
|
|
116
|
-
middleInitial?: string | undefined;
|
|
117
|
-
}>;
|
|
51
|
+
}, z.core.$strip>;
|
|
118
52
|
export interface UseContractorProfileProps {
|
|
119
53
|
companyId: string;
|
|
120
54
|
contractorId?: string;
|
|
@@ -123,31 +57,31 @@ export interface UseContractorProfileProps {
|
|
|
123
57
|
}
|
|
124
58
|
export declare function useContractorProfile({ companyId, contractorId, defaultValues, existingContractor, }: UseContractorProfileProps): {
|
|
125
59
|
formMethods: import('react-hook-form').UseFormReturn<{
|
|
126
|
-
wageType: "Hourly" | "Fixed";
|
|
127
|
-
startDate: Date;
|
|
128
60
|
selfOnboarding: boolean;
|
|
129
61
|
contractorType: "Business" | "Individual";
|
|
130
|
-
|
|
131
|
-
|
|
62
|
+
wageType: "Hourly" | "Fixed";
|
|
63
|
+
startDate: Date;
|
|
132
64
|
email?: string | undefined;
|
|
133
65
|
firstName?: string | undefined;
|
|
66
|
+
middleInitial?: string | undefined;
|
|
134
67
|
lastName?: string | undefined;
|
|
68
|
+
ssn?: string | undefined;
|
|
135
69
|
businessName?: string | undefined;
|
|
70
|
+
ein?: string | undefined;
|
|
136
71
|
hourlyRate?: number | undefined;
|
|
137
|
-
middleInitial?: string | undefined;
|
|
138
72
|
}, unknown, {
|
|
139
|
-
wageType: "Hourly" | "Fixed";
|
|
140
|
-
startDate: Date;
|
|
141
73
|
selfOnboarding: boolean;
|
|
142
74
|
contractorType: "Business" | "Individual";
|
|
143
|
-
|
|
144
|
-
|
|
75
|
+
wageType: "Hourly" | "Fixed";
|
|
76
|
+
startDate: Date;
|
|
145
77
|
email?: string | undefined;
|
|
146
78
|
firstName?: string | undefined;
|
|
79
|
+
middleInitial?: string | undefined;
|
|
147
80
|
lastName?: string | undefined;
|
|
81
|
+
ssn?: string | undefined;
|
|
148
82
|
businessName?: string | undefined;
|
|
83
|
+
ein?: string | undefined;
|
|
149
84
|
hourlyRate?: number | undefined;
|
|
150
|
-
middleInitial?: string | undefined;
|
|
151
85
|
}>;
|
|
152
86
|
handleSubmit: (e?: React.BaseSyntheticEvent) => Promise<void>;
|
|
153
87
|
formState: {
|
|
@@ -161,74 +95,74 @@ export declare function useContractorProfile({ companyId, contractorId, defaultV
|
|
|
161
95
|
disabled: boolean;
|
|
162
96
|
submitCount: number;
|
|
163
97
|
defaultValues?: Readonly<{
|
|
164
|
-
wageType?: "Hourly" | "Fixed" | undefined;
|
|
165
|
-
startDate?: Date | undefined;
|
|
166
98
|
selfOnboarding?: boolean | undefined;
|
|
167
99
|
contractorType?: "Business" | "Individual" | undefined;
|
|
168
|
-
|
|
169
|
-
|
|
100
|
+
wageType?: "Hourly" | "Fixed" | undefined;
|
|
101
|
+
startDate?: Date | undefined;
|
|
170
102
|
email?: string | undefined;
|
|
171
103
|
firstName?: string | undefined;
|
|
104
|
+
middleInitial?: string | undefined;
|
|
172
105
|
lastName?: string | undefined;
|
|
106
|
+
ssn?: string | undefined;
|
|
173
107
|
businessName?: string | undefined;
|
|
108
|
+
ein?: string | undefined;
|
|
174
109
|
hourlyRate?: number | undefined;
|
|
175
|
-
middleInitial?: string | undefined;
|
|
176
110
|
}> | undefined;
|
|
177
111
|
dirtyFields: Partial<Readonly<{
|
|
178
|
-
wageType?: boolean | undefined;
|
|
179
|
-
startDate?: boolean | undefined;
|
|
180
112
|
selfOnboarding?: boolean | undefined;
|
|
181
113
|
contractorType?: boolean | undefined;
|
|
182
|
-
|
|
183
|
-
|
|
114
|
+
wageType?: boolean | undefined;
|
|
115
|
+
startDate?: boolean | undefined;
|
|
184
116
|
email?: boolean | undefined;
|
|
185
117
|
firstName?: boolean | undefined;
|
|
118
|
+
middleInitial?: boolean | undefined;
|
|
186
119
|
lastName?: boolean | undefined;
|
|
120
|
+
ssn?: boolean | undefined;
|
|
187
121
|
businessName?: boolean | undefined;
|
|
122
|
+
ein?: boolean | undefined;
|
|
188
123
|
hourlyRate?: boolean | undefined;
|
|
189
|
-
middleInitial?: boolean | undefined;
|
|
190
124
|
}>>;
|
|
191
125
|
touchedFields: Partial<Readonly<{
|
|
192
|
-
wageType?: boolean | undefined;
|
|
193
|
-
startDate?: boolean | undefined;
|
|
194
126
|
selfOnboarding?: boolean | undefined;
|
|
195
127
|
contractorType?: boolean | undefined;
|
|
196
|
-
|
|
197
|
-
|
|
128
|
+
wageType?: boolean | undefined;
|
|
129
|
+
startDate?: boolean | undefined;
|
|
198
130
|
email?: boolean | undefined;
|
|
199
131
|
firstName?: boolean | undefined;
|
|
132
|
+
middleInitial?: boolean | undefined;
|
|
200
133
|
lastName?: boolean | undefined;
|
|
134
|
+
ssn?: boolean | undefined;
|
|
201
135
|
businessName?: boolean | undefined;
|
|
136
|
+
ein?: boolean | undefined;
|
|
202
137
|
hourlyRate?: boolean | undefined;
|
|
203
|
-
middleInitial?: boolean | undefined;
|
|
204
138
|
}>>;
|
|
205
139
|
validatingFields: Partial<Readonly<{
|
|
206
|
-
wageType?: boolean | undefined;
|
|
207
|
-
startDate?: boolean | undefined;
|
|
208
140
|
selfOnboarding?: boolean | undefined;
|
|
209
141
|
contractorType?: boolean | undefined;
|
|
210
|
-
|
|
211
|
-
|
|
142
|
+
wageType?: boolean | undefined;
|
|
143
|
+
startDate?: boolean | undefined;
|
|
212
144
|
email?: boolean | undefined;
|
|
213
145
|
firstName?: boolean | undefined;
|
|
146
|
+
middleInitial?: boolean | undefined;
|
|
214
147
|
lastName?: boolean | undefined;
|
|
148
|
+
ssn?: boolean | undefined;
|
|
215
149
|
businessName?: boolean | undefined;
|
|
150
|
+
ein?: boolean | undefined;
|
|
216
151
|
hourlyRate?: boolean | undefined;
|
|
217
|
-
middleInitial?: boolean | undefined;
|
|
218
152
|
}>>;
|
|
219
153
|
errors: import('react-hook-form').FieldErrors<{
|
|
220
|
-
wageType: "Hourly" | "Fixed";
|
|
221
|
-
startDate: Date;
|
|
222
154
|
selfOnboarding: boolean;
|
|
223
155
|
contractorType: "Business" | "Individual";
|
|
224
|
-
|
|
225
|
-
|
|
156
|
+
wageType: "Hourly" | "Fixed";
|
|
157
|
+
startDate: Date;
|
|
226
158
|
email?: string | undefined;
|
|
227
159
|
firstName?: string | undefined;
|
|
160
|
+
middleInitial?: string | undefined;
|
|
228
161
|
lastName?: string | undefined;
|
|
162
|
+
ssn?: string | undefined;
|
|
229
163
|
businessName?: string | undefined;
|
|
164
|
+
ein?: string | undefined;
|
|
230
165
|
hourlyRate?: number | undefined;
|
|
231
|
-
middleInitial?: string | undefined;
|
|
232
166
|
}>;
|
|
233
167
|
isReady: boolean;
|
|
234
168
|
};
|