@gusto/embedded-react-sdk 0.32.0 → 0.33.0
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 +27 -0
- package/dist/components/Common/MultiSelectComboBox/MultiSelectComboBox.d.ts +2 -0
- package/dist/components/Common/MultiSelectComboBox/MultiSelectComboBoxTypes.d.ts +16 -0
- package/dist/components/Common/MultiSelectComboBox/index.d.ts +3 -0
- package/dist/components/Common/SignatureForm/SignatureForm.js +11 -12
- package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +2 -2
- 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/Company/AssignSignatory/AssignSignatory.js +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +17 -16
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +6 -5
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +5 -6
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +5 -6
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +2 -2
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -4
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +2 -2
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +2 -2
- package/dist/components/Company/FederalTaxes/Form.js +3 -4
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +5 -6
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +6 -7
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.js +6 -5
- package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +2 -2
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +2 -2
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.js +2 -3
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +5 -6
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +2 -2
- package/dist/components/Company/OnboardingOverview/context.js +3 -4
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +2 -2
- package/dist/components/Company/PaySchedule/_parts/Edit.js +24 -23
- package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Head.js +8 -9
- package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +11 -12
- package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
- package/dist/components/Company/PaySchedule/usePaySchedule.js +5 -6
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +40 -46
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/Address.js +2 -2
- package/dist/components/Contractor/Address/Form.js +8 -7
- package/dist/components/Contractor/Address/Form.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +5 -6
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.js +17 -17
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +2 -2
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +1 -1
- 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 -51
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +13 -12
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +17 -18
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +2 -3
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +6 -7
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +2 -3
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +2 -3
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
- package/dist/components/Contractor/Profile/useContractorProfile.js +2 -3
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +1 -1
- package/dist/components/Employee/Compensation/Edit.js +14 -14
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +10 -11
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +11 -12
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +11 -12
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +3 -2
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -3
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +3 -4
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +20 -21
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js +7 -7
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +2 -3
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.js +3 -4
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Head.js +2 -3
- package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +3 -4
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalForm.js +7 -7
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +3 -4
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.js +8 -8
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +2 -2
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +8 -8
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +5 -6
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.js +1 -1
- package/dist/components/Employee/Profile/HomeAddress.js +10 -9
- package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +11 -10
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
- package/dist/components/Employee/Profile/useProfile.js +3 -4
- package/dist/components/Employee/Profile/useProfile.js.map +1 -1
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +3 -4
- package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +7 -7
- package/dist/components/Employee/Taxes/useTaxes.js +3 -4
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Flow/Flow.js +2 -3
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +16 -16
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +4 -4
- package/dist/components/InformationRequests/InformationRequests.js +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +9 -9
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +6 -7
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +1 -1
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +2 -3
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +12 -12
- 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/PayrollConfiguration/PayrollConfigurationPresentation.js +39 -38
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +39 -38
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +17 -18
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.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/PayrollHistory/PayrollHistoryPresentation.js +2 -3
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +2 -3
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +3 -2
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +7 -8
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +2 -3
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +6 -6
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +2 -3
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +2 -3
- package/dist/components/Payroll/usePreparedPayrollData.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 +3 -0
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/context.ts"],"sourcesContent":["import type { TaxRequirementsState } from '@gusto/embedded-api/models/components/taxrequirementsstate'\nimport { createCompoundContext } from '@/components/Base'\n\ninterface StateTaxFormContext {\n isPending: boolean\n state: string\n stateTaxRequirements: TaxRequirementsState\n handleCancel: () => void\n}\n\nconst [useStateTaxesForm, StateTaxesFormProvider] =\n createCompoundContext<StateTaxFormContext>('StateTaxesFormContext')\n\nexport { useStateTaxesForm, StateTaxesFormProvider }\n"],"names":["useStateTaxesForm","StateTaxesFormProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/context.ts"],"sourcesContent":["import type { TaxRequirementsState } from '@gusto/embedded-api/models/components/taxrequirementsstate'\nimport { createCompoundContext } from '@/components/Base'\n\ninterface StateTaxFormContext {\n isPending: boolean\n state: string\n stateTaxRequirements: TaxRequirementsState\n handleCancel: () => void\n}\n\nconst [useStateTaxesForm, StateTaxesFormProvider] =\n createCompoundContext<StateTaxFormContext>('StateTaxesFormContext')\n\nexport { useStateTaxesForm, StateTaxesFormProvider }\n"],"names":["useStateTaxesForm","StateTaxesFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAmBC,CAAsB,IAC9CC,EAA2C,uBAAuB;"}
|
|
@@ -9,13 +9,12 @@ import "../../../Base/useBase.js";
|
|
|
9
9
|
import "../../../../shared/constants.js";
|
|
10
10
|
import "classnames";
|
|
11
11
|
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
12
|
-
import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
13
12
|
import "dompurify";
|
|
14
13
|
import "../../../../contexts/LocaleProvider/useLocale.js";
|
|
15
14
|
import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
|
|
16
|
-
const [
|
|
15
|
+
const [c, d] = t("StateTaxesListContext");
|
|
17
16
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
d as StateTaxesListProvider,
|
|
18
|
+
c as useStateTaxesList
|
|
20
19
|
};
|
|
21
20
|
//# sourceMappingURL=context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/context.ts"],"sourcesContent":["import type { ResponseBody } from '@gusto/embedded-api/models/operations/getv1companiescompanyuuidtaxrequirements'\nimport { createCompoundContext } from '@/components/Base'\n\ntype StateTaxesListContextType = {\n isPending: boolean\n stateTaxRequirements: ResponseBody[]\n handleContinue: () => void\n handleChange: (state: string) => void\n}\n\nconst [useStateTaxesList, StateTaxesListProvider] =\n createCompoundContext<StateTaxesListContextType>('StateTaxesListContext')\n\nexport { useStateTaxesList, StateTaxesListProvider }\n"],"names":["useStateTaxesList","StateTaxesListProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/context.ts"],"sourcesContent":["import type { ResponseBody } from '@gusto/embedded-api/models/operations/getv1companiescompanyuuidtaxrequirements'\nimport { createCompoundContext } from '@/components/Base'\n\ntype StateTaxesListContextType = {\n isPending: boolean\n stateTaxRequirements: ResponseBody[]\n handleContinue: () => void\n handleChange: (state: string) => void\n}\n\nconst [useStateTaxesList, StateTaxesListProvider] =\n createCompoundContext<StateTaxesListContextType>('StateTaxesListContext')\n\nexport { useStateTaxesList, StateTaxesListProvider }\n"],"names":["useStateTaxesList","StateTaxesListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAmBC,CAAsB,IAC9CC,EAAiD,uBAAuB;"}
|
|
@@ -11,13 +11,13 @@ import { Actions as B } from "./Actions.js";
|
|
|
11
11
|
import { Form as N } from "../../Common/Form/Form.js";
|
|
12
12
|
import { useComponentDictionary as j, useI18n as q } from "../../../i18n/I18n.js";
|
|
13
13
|
import { Flex as w } from "../../Common/Flex/Flex.js";
|
|
14
|
-
import "classnames";
|
|
15
|
-
import { contractorEvents as d } from "../../../shared/constants.js";
|
|
16
14
|
import "react-i18next";
|
|
15
|
+
import "classnames";
|
|
17
16
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
18
17
|
import "react";
|
|
19
18
|
import { BaseComponent as G } from "../../Base/Base.js";
|
|
20
19
|
import { useBase as H } from "../../Base/useBase.js";
|
|
20
|
+
import { contractorEvents as d } from "../../../shared/constants.js";
|
|
21
21
|
function mt(r) {
|
|
22
22
|
return /* @__PURE__ */ t(G, { ...r, children: /* @__PURE__ */ t(M, { ...r, children: r.children }) });
|
|
23
23
|
}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useTranslation as
|
|
1
|
+
import { jsxs as i, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as s } from "react-i18next";
|
|
3
3
|
import { STATES_ABBR as o } from "../../../shared/constants.js";
|
|
4
4
|
import { Grid as l } from "../../Common/Grid/Grid.js";
|
|
5
|
-
import
|
|
5
|
+
import "classnames";
|
|
6
6
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
7
|
import "react";
|
|
8
|
+
import { TextInputField as t } from "../../Common/Fields/TextInputField/TextInputField.js";
|
|
8
9
|
import { SelectField as m } from "../../Common/Fields/SelectField/SelectField.js";
|
|
9
|
-
function
|
|
10
|
-
const { t: e } =
|
|
11
|
-
return /* @__PURE__ */
|
|
10
|
+
function T() {
|
|
11
|
+
const { t: e } = s("Contractor.Address");
|
|
12
|
+
return /* @__PURE__ */ i(l, { gridTemplateColumns: { base: "1fr", small: ["1fr", "1fr"] }, gap: 20, children: [
|
|
12
13
|
/* @__PURE__ */ r(
|
|
13
14
|
t,
|
|
14
15
|
{
|
|
@@ -46,6 +47,6 @@ function R() {
|
|
|
46
47
|
] });
|
|
47
48
|
}
|
|
48
49
|
export {
|
|
49
|
-
|
|
50
|
+
T as Form
|
|
50
51
|
};
|
|
51
52
|
//# sourceMappingURL=Form.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.js","sources":["../../../../src/components/Contractor/Address/Form.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { TextInputField, SelectField, Grid } from '@/components/Common'\nimport { STATES_ABBR } from '@/shared/constants'\n\nexport function Form() {\n const { t } = useTranslation('Contractor.Address')\n\n return (\n <Grid gridTemplateColumns={{ base: '1fr', small: ['1fr', '1fr'] }} gap={20}>\n <TextInputField\n name=\"street1\"\n label={t('street1')}\n isRequired\n errorMessage={t('validations.street1')}\n />\n <TextInputField name=\"street2\" label={t('street2')} />\n <TextInputField\n name=\"city\"\n label={t('city')}\n isRequired\n errorMessage={t('validations.city')}\n />\n <SelectField\n name=\"state\"\n options={STATES_ABBR.map(stateAbbr => ({\n label: t(`statesHash.${stateAbbr}`, { ns: 'common', defaultValue: stateAbbr }),\n value: stateAbbr,\n }))}\n label={t('state')}\n placeholder={t('statePlaceholder')}\n errorMessage={t('validations.state')}\n isRequired\n />\n <TextInputField name=\"zip\" label={t('zip')} isRequired errorMessage={t('validations.zip')} />\n </Grid>\n )\n}\n"],"names":["Form","t","useTranslation","jsxs","Grid","jsx","TextInputField","SelectField","STATES_ABBR","stateAbbr"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Form.js","sources":["../../../../src/components/Contractor/Address/Form.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { TextInputField, SelectField, Grid } from '@/components/Common'\nimport { STATES_ABBR } from '@/shared/constants'\n\nexport function Form() {\n const { t } = useTranslation('Contractor.Address')\n\n return (\n <Grid gridTemplateColumns={{ base: '1fr', small: ['1fr', '1fr'] }} gap={20}>\n <TextInputField\n name=\"street1\"\n label={t('street1')}\n isRequired\n errorMessage={t('validations.street1')}\n />\n <TextInputField name=\"street2\" label={t('street2')} />\n <TextInputField\n name=\"city\"\n label={t('city')}\n isRequired\n errorMessage={t('validations.city')}\n />\n <SelectField\n name=\"state\"\n options={STATES_ABBR.map(stateAbbr => ({\n label: t(`statesHash.${stateAbbr}`, { ns: 'common', defaultValue: stateAbbr }),\n value: stateAbbr,\n }))}\n label={t('state')}\n placeholder={t('statePlaceholder')}\n errorMessage={t('validations.state')}\n isRequired\n />\n <TextInputField name=\"zip\" label={t('zip')} isRequired errorMessage={t('validations.zip')} />\n </Grid>\n )\n}\n"],"names":["Form","t","useTranslation","jsxs","Grid","jsx","TextInputField","SelectField","STATES_ABBR","stateAbbr"],"mappings":";;;;;;;;;AAIO,SAASA,IAAO;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,oBAAoB;AAEjD,SACE,gBAAAC,EAACC,GAAA,EAAK,qBAAqB,EAAE,MAAM,OAAO,OAAO,CAAC,OAAO,KAAK,EAAA,GAAK,KAAK,IACtE,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOL,EAAE,SAAS;AAAA,QAClB,YAAU;AAAA,QACV,cAAcA,EAAE,qBAAqB;AAAA,MAAA;AAAA,IAAA;AAAA,sBAEtCK,GAAA,EAAe,MAAK,WAAU,OAAOL,EAAE,SAAS,GAAG;AAAA,IACpD,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOL,EAAE,MAAM;AAAA,QACf,YAAU;AAAA,QACV,cAAcA,EAAE,kBAAkB;AAAA,MAAA;AAAA,IAAA;AAAA,IAEpC,gBAAAI;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,SAASC,EAAY,IAAI,CAAAC,OAAc;AAAA,UACrC,OAAOR,EAAE,cAAcQ,CAAS,IAAI,EAAE,IAAI,UAAU,cAAcA,GAAW;AAAA,UAC7E,OAAOA;AAAA,QAAA,EACP;AAAA,QACF,OAAOR,EAAE,OAAO;AAAA,QAChB,aAAaA,EAAE,kBAAkB;AAAA,QACjC,cAAcA,EAAE,mBAAmB;AAAA,QACnC,YAAU;AAAA,MAAA;AAAA,IAAA;AAAA,IAEZ,gBAAAI,EAACC,GAAA,EAAe,MAAK,OAAM,OAAOL,EAAE,KAAK,GAAG,YAAU,IAAC,cAAcA,EAAE,iBAAiB,EAAA,CAAG;AAAA,EAAA,GAC7F;AAEJ;"}
|
|
@@ -10,22 +10,21 @@ import "../../Base/useBase.js";
|
|
|
10
10
|
import "../../../shared/constants.js";
|
|
11
11
|
import "classnames";
|
|
12
12
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
13
|
-
import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
14
13
|
import "dompurify";
|
|
15
14
|
import "../../../contexts/LocaleProvider/useLocale.js";
|
|
16
15
|
import { createCompoundContext as r } from "../../Base/createCompoundContext.js";
|
|
17
|
-
const
|
|
16
|
+
const u = t.object({
|
|
18
17
|
street1: t.string().min(1),
|
|
19
18
|
street2: t.string().optional(),
|
|
20
19
|
city: t.string().min(1),
|
|
21
20
|
state: t.string().min(1),
|
|
22
21
|
zip: t.string().min(1)
|
|
23
|
-
}), [
|
|
22
|
+
}), [z, b] = r(
|
|
24
23
|
"ContractorAddressContext"
|
|
25
24
|
);
|
|
26
25
|
export {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
u as AddressFormSchema,
|
|
27
|
+
b as AddressProvider,
|
|
28
|
+
z as useAddress
|
|
30
29
|
};
|
|
31
30
|
//# sourceMappingURL=useAddress.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAddress.js","sources":["../../../../src/components/Contractor/Address/useAddress.ts"],"sourcesContent":["import type { Contractor, ContractorType } from '@gusto/embedded-api/models/components/contractor'\nimport type { ContractorAddress } from '@gusto/embedded-api/models/components/contractoraddress'\nimport { z } from 'zod'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport interface AddressContextType {\n contractor?: Contractor\n contractorType?: ContractorType\n address?: ContractorAddress\n isPending: boolean\n}\n\nexport type AddressDefaultValues = RequireAtLeastOne<\n Pick<ContractorAddress, 'street1' | 'street2' | 'city' | 'state' | 'zip'>\n>\n\nexport const AddressFormSchema = z.object({\n street1: z.string().min(1),\n street2: z.string().optional(),\n city: z.string().min(1),\n state: z.string().min(1),\n zip: z.string().min(1),\n})\n\nexport type AddressFormValues = z.infer<typeof AddressFormSchema>\n\nconst [useAddress, AddressProvider] = createCompoundContext<AddressContextType>(\n 'ContractorAddressContext',\n)\n\nexport { useAddress, AddressProvider }\n"],"names":["AddressFormSchema","z","useAddress","AddressProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useAddress.js","sources":["../../../../src/components/Contractor/Address/useAddress.ts"],"sourcesContent":["import type { Contractor, ContractorType } from '@gusto/embedded-api/models/components/contractor'\nimport type { ContractorAddress } from '@gusto/embedded-api/models/components/contractoraddress'\nimport { z } from 'zod'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport interface AddressContextType {\n contractor?: Contractor\n contractorType?: ContractorType\n address?: ContractorAddress\n isPending: boolean\n}\n\nexport type AddressDefaultValues = RequireAtLeastOne<\n Pick<ContractorAddress, 'street1' | 'street2' | 'city' | 'state' | 'zip'>\n>\n\nexport const AddressFormSchema = z.object({\n street1: z.string().min(1),\n street2: z.string().optional(),\n city: z.string().min(1),\n state: z.string().min(1),\n zip: z.string().min(1),\n})\n\nexport type AddressFormValues = z.infer<typeof AddressFormSchema>\n\nconst [useAddress, AddressProvider] = createCompoundContext<AddressContextType>(\n 'ContractorAddressContext',\n)\n\nexport { useAddress, AddressProvider }\n"],"names":["AddressFormSchema","z","useAddress","AddressProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAiBO,MAAMA,IAAoBC,EAAE,OAAO;AAAA,EACxC,SAASA,EAAE,SAAS,IAAI,CAAC;AAAA,EACzB,SAASA,EAAE,OAAA,EAAS,SAAA;AAAA,EACpB,MAAMA,EAAE,SAAS,IAAI,CAAC;AAAA,EACtB,OAAOA,EAAE,SAAS,IAAI,CAAC;AAAA,EACvB,KAAKA,EAAE,OAAA,EAAS,IAAI,CAAC;AACvB,CAAC,GAIK,CAACC,GAAYC,CAAe,IAAIC;AAAA,EACpC;AACF;"}
|
|
@@ -4,17 +4,17 @@ import { useContractorsDeleteMutation as w } from "@gusto/embedded-api/react-que
|
|
|
4
4
|
import { useContractors as H } from "./useContractorList.js";
|
|
5
5
|
import { Flex as f } from "../../Common/Flex/Flex.js";
|
|
6
6
|
import "classnames";
|
|
7
|
-
import {
|
|
8
|
-
import { EmptyData as U } from "../../Common/EmptyData/EmptyData.js";
|
|
7
|
+
import { EmptyData as k } from "../../Common/EmptyData/EmptyData.js";
|
|
9
8
|
import { ActionsLayout as h } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
10
|
-
import { HamburgerMenu as
|
|
11
|
-
import { firstLastName as
|
|
12
|
-
import
|
|
9
|
+
import { HamburgerMenu as U } from "../../Common/HamburgerMenu/HamburgerMenu.js";
|
|
10
|
+
import { firstLastName as j } from "../../../helpers/formattedStrings.js";
|
|
11
|
+
import M from "../../../assets/icons/pencil.svg.js";
|
|
13
12
|
import { useComponentContext as u } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
14
|
-
import { ContractorOnboardingStatusBadge as
|
|
15
|
-
import { useI18n as
|
|
16
|
-
import { BaseComponent as
|
|
17
|
-
import { useBase as
|
|
13
|
+
import { ContractorOnboardingStatusBadge as V } from "../../Common/OnboardingStatusBadge/index.js";
|
|
14
|
+
import { useI18n as F } from "../../../i18n/I18n.js";
|
|
15
|
+
import { BaseComponent as q } from "../../Base/Base.js";
|
|
16
|
+
import { useBase as G } from "../../Base/useBase.js";
|
|
17
|
+
import { CONTRACTOR_TYPE as Y, componentEvents as m } from "../../../shared/constants.js";
|
|
18
18
|
import z from "../../../assets/icons/trashcan.svg.js";
|
|
19
19
|
import { useDataView as J } from "../../Common/DataView/useDataView.js";
|
|
20
20
|
import { DataView as K } from "../../Common/DataView/DataView.js";
|
|
@@ -27,14 +27,14 @@ function Q({ count: o, handleAdd: a }) {
|
|
|
27
27
|
}
|
|
28
28
|
function W({ handleAdd: o }) {
|
|
29
29
|
const { Button: a } = u(), { t: r } = d("Contractor.ContractorList");
|
|
30
|
-
return /* @__PURE__ */ t(
|
|
30
|
+
return /* @__PURE__ */ t(k, { title: r("emptyTableTitle"), description: r("emptyTableDescription"), children: /* @__PURE__ */ t(h, { justifyContent: "center", children: /* @__PURE__ */ t(a, { onClick: o, children: r("addContractorCta") }) }) });
|
|
31
31
|
}
|
|
32
32
|
function Tt(o) {
|
|
33
|
-
return /* @__PURE__ */ t(
|
|
33
|
+
return /* @__PURE__ */ t(q, { ...o, children: /* @__PURE__ */ t(X, { ...o, children: o.children }) });
|
|
34
34
|
}
|
|
35
35
|
function X({ companyId: o, className: a, dictionary: r, successMessage: i }) {
|
|
36
|
-
|
|
37
|
-
const { t: n } = d("Contractor.ContractorList"), { onEvent: s, baseSubmitHandler: g } =
|
|
36
|
+
F("Contractor.ContractorList");
|
|
37
|
+
const { t: n } = d("Contractor.ContractorList"), { onEvent: s, baseSubmitHandler: g } = G(), { Alert: T, Button: P } = u(), {
|
|
38
38
|
contractors: L,
|
|
39
39
|
totalCount: C,
|
|
40
40
|
handleNextPage: N,
|
|
@@ -49,12 +49,12 @@ function X({ companyId: o, className: a, dictionary: r, successMessage: i }) {
|
|
|
49
49
|
columns: [
|
|
50
50
|
{
|
|
51
51
|
title: n("listHeaders.name"),
|
|
52
|
-
render: (e) => e.type ===
|
|
52
|
+
render: (e) => e.type === Y.BUSINESS ? e.businessName : j({ first_name: e.firstName, last_name: e.lastName })
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
title: n("listHeaders.status"),
|
|
56
56
|
render: ({ onboarded: e, onboardingStatus: c }) => /* @__PURE__ */ t(
|
|
57
|
-
|
|
57
|
+
V,
|
|
58
58
|
{
|
|
59
59
|
onboarded: e,
|
|
60
60
|
onboardingStatus: c
|
|
@@ -64,12 +64,12 @@ function X({ companyId: o, className: a, dictionary: r, successMessage: i }) {
|
|
|
64
64
|
],
|
|
65
65
|
data: L,
|
|
66
66
|
itemMenu: (e) => /* @__PURE__ */ t(
|
|
67
|
-
|
|
67
|
+
U,
|
|
68
68
|
{
|
|
69
69
|
items: [
|
|
70
70
|
{
|
|
71
71
|
label: n("editCta"),
|
|
72
|
-
icon: /* @__PURE__ */ t(
|
|
72
|
+
icon: /* @__PURE__ */ t(M, { "aria-hidden": !0 }),
|
|
73
73
|
onClick: () => {
|
|
74
74
|
_(e.uuid);
|
|
75
75
|
}
|
|
@@ -2,10 +2,10 @@ import { jsxs as a, Fragment as t, jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import { useTranslation as n } from "react-i18next";
|
|
3
3
|
import "../../../shared/constants.js";
|
|
4
4
|
import "classnames";
|
|
5
|
-
import { RadioGroupField as i } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
|
|
6
|
-
import { TextInputField as o } from "../../Common/Fields/TextInputField/TextInputField.js";
|
|
7
5
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
6
|
import "react";
|
|
7
|
+
import { TextInputField as o } from "../../Common/Fields/TextInputField/TextInputField.js";
|
|
8
|
+
import { RadioGroupField as i } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
|
|
9
9
|
function N({ bankAccount: u }) {
|
|
10
10
|
const { t: e } = n("Contractor.PaymentMethod", { keyPrefix: "bankAccountForm" });
|
|
11
11
|
return /* @__PURE__ */ a(t, { children: [
|
|
@@ -3,9 +3,9 @@ import { useTranslation as r } from "react-i18next";
|
|
|
3
3
|
import { z as t } from "zod";
|
|
4
4
|
import { PAYMENT_METHODS as o } from "../../../shared/constants.js";
|
|
5
5
|
import "classnames";
|
|
6
|
-
import { RadioGroupField as p } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
|
|
7
6
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
7
|
import "react";
|
|
8
|
+
import { RadioGroupField as p } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
|
|
9
9
|
t.object({
|
|
10
10
|
type: t.enum(["Check", "Direct Deposit"])
|
|
11
11
|
});
|
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
import { jsx as h, jsxs as
|
|
2
|
-
import { useContractorsListSuspense as
|
|
3
|
-
import { useContractorPaymentGroupsCreateMutation as
|
|
4
|
-
import { useContractorPaymentGroupsPreviewMutation as
|
|
5
|
-
import { useState as
|
|
6
|
-
import
|
|
7
|
-
import { RFCDate as
|
|
8
|
-
import { useForm as
|
|
9
|
-
import { zodResolver as
|
|
10
|
-
import { useTranslation as
|
|
11
|
-
import { useBankAccountsGet as
|
|
12
|
-
import { usePaymentConfigsGet as
|
|
13
|
-
import { CreatePaymentPresentation as
|
|
14
|
-
import { EditContractorPaymentPresentation as
|
|
15
|
-
import { createEditContractorPaymentFormSchema as
|
|
16
|
-
import { PreviewPresentation as
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
import { jsx as h, jsxs as K, Fragment as J } from "react/jsx-runtime";
|
|
2
|
+
import { useContractorsListSuspense as Q } from "@gusto/embedded-api/react-query/contractorsList";
|
|
3
|
+
import { useContractorPaymentGroupsCreateMutation as X } from "@gusto/embedded-api/react-query/contractorPaymentGroupsCreate";
|
|
4
|
+
import { useContractorPaymentGroupsPreviewMutation as Z } from "@gusto/embedded-api/react-query/contractorPaymentGroupsPreview";
|
|
5
|
+
import { useState as u, useMemo as S } from "react";
|
|
6
|
+
import $ from "dompurify";
|
|
7
|
+
import { RFCDate as U } from "@gusto/embedded-api/types/rfcdate";
|
|
8
|
+
import { useForm as tt } from "react-hook-form";
|
|
9
|
+
import { zodResolver as et } from "@hookform/resolvers/zod";
|
|
10
|
+
import { useTranslation as ot } from "react-i18next";
|
|
11
|
+
import { useBankAccountsGet as rt } from "@gusto/embedded-api/react-query/bankAccountsGet";
|
|
12
|
+
import { usePaymentConfigsGet as nt } from "@gusto/embedded-api/react-query/paymentConfigsGet";
|
|
13
|
+
import { CreatePaymentPresentation as st } from "./CreatePaymentPresentation.js";
|
|
14
|
+
import { EditContractorPaymentPresentation as at } from "./EditContractorPaymentPresentation.js";
|
|
15
|
+
import { createEditContractorPaymentFormSchema as it } from "./EditContractorPaymentFormSchema.js";
|
|
16
|
+
import { PreviewPresentation as ct } from "./PreviewPresentation.js";
|
|
17
|
+
import { payrollSubmitHandler as mt } from "../../../Payroll/PayrollBlocker/payrollHelpers.js";
|
|
18
|
+
import { useComponentDictionary as ut } from "../../../../i18n/I18n.js";
|
|
19
|
+
import { BaseComponent as lt } from "../../../Base/Base.js";
|
|
20
|
+
import { useBase as pt } from "../../../Base/useBase.js";
|
|
21
|
+
import { ContractorOnboardingStatus as yt, componentEvents as y } from "../../../../shared/constants.js";
|
|
22
|
+
import { firstLastName as dt } from "../../../../helpers/formattedStrings.js";
|
|
23
|
+
function jt(c) {
|
|
24
|
+
return /* @__PURE__ */ h(lt, { ...c, children: /* @__PURE__ */ h(Pt, { ...c, children: c.children }) });
|
|
24
25
|
}
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
const { t: b } =
|
|
26
|
+
const Pt = ({ companyId: c, dictionary: _, onEvent: l }) => {
|
|
27
|
+
ut("Contractor.Payments.CreatePayment", _);
|
|
28
|
+
const { t: b } = ot("Contractor.Payments.CreatePayment"), [v, g] = u(!1), [T, B] = u(
|
|
28
29
|
(/* @__PURE__ */ new Date()).toISOString().split("T")[0] || ""
|
|
29
|
-
), { baseSubmitHandler: M } =
|
|
30
|
-
mutateAsync:
|
|
31
|
-
isPending:
|
|
32
|
-
} =
|
|
33
|
-
(t) => t.isActive && t.onboardingStatus ===
|
|
34
|
-
), { data:
|
|
30
|
+
), { baseSubmitHandler: M } = pt(), [D, d] = u({}), [P, N] = u(null), [G, w] = u([]), [k, A] = u({}), { mutateAsync: V, isPending: O } = X(), {
|
|
31
|
+
mutateAsync: L,
|
|
32
|
+
isPending: R
|
|
33
|
+
} = Z(), { data: H } = Q({ companyUuid: c }), a = (H.contractorList || []).filter(
|
|
34
|
+
(t) => t.isActive && t.onboardingStatus === yt.ONBOARDING_COMPLETED
|
|
35
|
+
), { data: Y } = rt({ companyId: c }), { data: F } = nt({ companyUuid: c }), q = Y?.companyBankAccounts?.[0], x = F?.paymentConfigs?.paymentSpeed, I = S(
|
|
35
36
|
() => a.map((t) => {
|
|
36
37
|
const e = t.paymentMethod ? t.paymentMethod : "Direct Deposit";
|
|
37
38
|
return {
|
|
@@ -45,10 +46,10 @@ const yt = ({ companyId: c, dictionary: U, onEvent: y }) => {
|
|
|
45
46
|
};
|
|
46
47
|
}),
|
|
47
48
|
[a]
|
|
48
|
-
), [
|
|
49
|
-
() =>
|
|
49
|
+
), [p, j] = u(I), z = S(
|
|
50
|
+
() => p.reduce(
|
|
50
51
|
(t, e) => {
|
|
51
|
-
const o = a.find((
|
|
52
|
+
const o = a.find((W) => W.uuid === e.contractorUuid), i = o?.wageType === "Hourly", n = Number(e.hours || "0"), s = Number(e.wage || "0"), r = Number(e.bonus || "0"), m = Number(e.reimbursement || "0"), E = i ? n * Number(o.hourlyRate || "0") : 0, f = i ? 0 : s;
|
|
52
53
|
return {
|
|
53
54
|
wage: t.wage + f,
|
|
54
55
|
bonus: t.bonus + r,
|
|
@@ -58,9 +59,9 @@ const yt = ({ companyId: c, dictionary: U, onEvent: y }) => {
|
|
|
58
59
|
},
|
|
59
60
|
{ wage: 0, bonus: 0, reimbursement: 0, total: 0 }
|
|
60
61
|
),
|
|
61
|
-
[
|
|
62
|
-
),
|
|
63
|
-
resolver:
|
|
62
|
+
[p, a]
|
|
63
|
+
), C = tt({
|
|
64
|
+
resolver: et(it()),
|
|
64
65
|
defaultValues: {
|
|
65
66
|
wageType: "Hourly",
|
|
66
67
|
hours: 0,
|
|
@@ -73,64 +74,64 @@ const yt = ({ companyId: c, dictionary: U, onEvent: y }) => {
|
|
|
73
74
|
contractorPaymentMethod: void 0
|
|
74
75
|
}
|
|
75
76
|
});
|
|
76
|
-
return /* @__PURE__ */
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
return /* @__PURE__ */ K(J, { children: [
|
|
78
|
+
P && /* @__PURE__ */ h(
|
|
79
|
+
ct,
|
|
79
80
|
{
|
|
80
|
-
contractorPaymentGroup:
|
|
81
|
+
contractorPaymentGroup: P,
|
|
81
82
|
contractors: a,
|
|
82
83
|
onBackToEdit: () => {
|
|
83
|
-
|
|
84
|
+
N(null), w([]), A({}), l(y.CONTRACTOR_PAYMENT_BACK_TO_EDIT);
|
|
84
85
|
},
|
|
85
86
|
onSubmit: async () => {
|
|
86
87
|
await M(null, async () => {
|
|
87
|
-
const t =
|
|
88
|
-
if (t.length === 0 || !
|
|
88
|
+
const t = p.filter((s) => s.isTouched);
|
|
89
|
+
if (t.length === 0 || !P?.creationToken)
|
|
89
90
|
return;
|
|
90
|
-
const e =
|
|
91
|
-
([
|
|
92
|
-
blockerType:
|
|
91
|
+
const e = P.creationToken, o = Object.entries(k).map(
|
|
92
|
+
([s, r]) => ({
|
|
93
|
+
blockerType: s,
|
|
93
94
|
selectedOption: r
|
|
94
95
|
})
|
|
95
|
-
),
|
|
96
|
-
checkDate: new
|
|
97
|
-
contractorPayments: t.map(({ isTouched:
|
|
96
|
+
), i = {
|
|
97
|
+
checkDate: new U(T),
|
|
98
|
+
contractorPayments: t.map(({ isTouched: s, ...r }) => r),
|
|
98
99
|
creationToken: e,
|
|
99
100
|
...o.length > 0 && { submissionBlockers: o }
|
|
100
|
-
},
|
|
101
|
+
}, n = await V({
|
|
101
102
|
request: {
|
|
102
103
|
companyId: c,
|
|
103
|
-
requestBody:
|
|
104
|
+
requestBody: i
|
|
104
105
|
}
|
|
105
106
|
});
|
|
106
|
-
y
|
|
107
|
+
l(y.CONTRACTOR_PAYMENT_CREATED, n.contractorPaymentGroup || {});
|
|
107
108
|
});
|
|
108
109
|
},
|
|
109
|
-
isLoading: O ||
|
|
110
|
-
bankAccount:
|
|
111
|
-
selectedUnblockOptions:
|
|
110
|
+
isLoading: O || R,
|
|
111
|
+
bankAccount: q,
|
|
112
|
+
selectedUnblockOptions: k,
|
|
112
113
|
onUnblockOptionChange: (t, e) => {
|
|
113
114
|
A((o) => ({
|
|
114
115
|
...o,
|
|
115
116
|
[t]: e
|
|
116
117
|
}));
|
|
117
118
|
},
|
|
118
|
-
paymentSpeed:
|
|
119
|
+
paymentSpeed: x
|
|
119
120
|
}
|
|
120
121
|
),
|
|
121
|
-
!
|
|
122
|
-
|
|
122
|
+
!P && /* @__PURE__ */ h(
|
|
123
|
+
st,
|
|
123
124
|
{
|
|
124
125
|
contractors: a,
|
|
125
|
-
contractorPayments:
|
|
126
|
+
contractorPayments: p,
|
|
126
127
|
paymentDate: T,
|
|
127
|
-
onPaymentDateChange:
|
|
128
|
+
onPaymentDateChange: B,
|
|
128
129
|
onSaveAndContinue: async () => {
|
|
129
130
|
await M(null, async () => {
|
|
130
|
-
const t =
|
|
131
|
+
const t = p.filter((o) => o.isTouched);
|
|
131
132
|
if (t.length === 0) {
|
|
132
133
|
d({
|
|
133
|
-
...
|
|
134
|
+
...D,
|
|
134
135
|
error: {
|
|
135
136
|
type: "error",
|
|
136
137
|
title: b("alerts.noContractorPayments")
|
|
@@ -138,69 +139,76 @@ const yt = ({ companyId: c, dictionary: U, onEvent: y }) => {
|
|
|
138
139
|
});
|
|
139
140
|
return;
|
|
140
141
|
}
|
|
141
|
-
d({});
|
|
142
|
-
const e = await
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
142
|
+
d({}), w([]);
|
|
143
|
+
const e = await mt(async () => {
|
|
144
|
+
const o = await L({
|
|
145
|
+
request: {
|
|
146
|
+
companyId: c,
|
|
147
|
+
requestBody: {
|
|
148
|
+
contractorPayments: t.map(({ isTouched: i, ...n }) => n),
|
|
149
|
+
checkDate: new U(T)
|
|
150
|
+
}
|
|
148
151
|
}
|
|
149
|
-
}
|
|
152
|
+
});
|
|
153
|
+
N(o.contractorPaymentGroupPreview || null), l(y.CONTRACTOR_PAYMENT_PREVIEW, o.contractorPaymentGroupPreview);
|
|
150
154
|
});
|
|
151
|
-
|
|
155
|
+
!e.success && e.blockers.length > 0 && w(e.blockers);
|
|
152
156
|
});
|
|
153
157
|
},
|
|
154
158
|
onEditContractor: (t) => {
|
|
155
|
-
const e = a.find((
|
|
156
|
-
(
|
|
157
|
-
),
|
|
158
|
-
|
|
159
|
+
const e = a.find((s) => s.uuid === t), o = p.find(
|
|
160
|
+
(s) => s.contractorUuid === t
|
|
161
|
+
), i = o?.paymentMethod || "Direct Deposit", n = ["Check", "Direct Deposit"].includes(i) ? i : "Check";
|
|
162
|
+
C.reset(
|
|
159
163
|
{
|
|
160
164
|
wageType: e?.wageType || "Hourly",
|
|
161
165
|
hours: Number(o?.hours || "0"),
|
|
162
166
|
wage: Number(o?.wage || "0"),
|
|
163
167
|
bonus: Number(o?.bonus || "0"),
|
|
164
168
|
reimbursement: Number(o?.reimbursement || "0"),
|
|
165
|
-
paymentMethod:
|
|
169
|
+
paymentMethod: n,
|
|
166
170
|
hourlyRate: Number(e?.hourlyRate || "0"),
|
|
167
171
|
contractorUuid: t,
|
|
168
172
|
contractorPaymentMethod: e?.paymentMethod || void 0
|
|
169
173
|
},
|
|
170
174
|
{ keepDirty: !1, keepValues: !1 }
|
|
171
|
-
), d({}), g(!0), y
|
|
175
|
+
), d({}), g(!0), l(y.CONTRACTOR_PAYMENT_EDIT);
|
|
176
|
+
},
|
|
177
|
+
totals: z,
|
|
178
|
+
alerts: D,
|
|
179
|
+
payrollBlockers: G,
|
|
180
|
+
onViewBlockers: () => {
|
|
181
|
+
l(y.CONTRACTOR_PAYMENT_RFI_RESPOND);
|
|
172
182
|
},
|
|
173
|
-
|
|
174
|
-
alerts: w,
|
|
175
|
-
isLoading: O || k
|
|
183
|
+
isLoading: O || R
|
|
176
184
|
}
|
|
177
185
|
),
|
|
178
186
|
/* @__PURE__ */ h(
|
|
179
|
-
|
|
187
|
+
at,
|
|
180
188
|
{
|
|
181
189
|
isOpen: v,
|
|
182
190
|
onClose: () => {
|
|
183
191
|
g(!1);
|
|
184
192
|
},
|
|
185
|
-
formMethods:
|
|
193
|
+
formMethods: C,
|
|
186
194
|
onSubmit: (t) => {
|
|
187
195
|
const o = a.find((r) => r.uuid === t.contractorUuid)?.paymentMethod;
|
|
188
196
|
if (!["Check", "Direct Deposit"].includes(t.paymentMethod)) {
|
|
189
|
-
|
|
197
|
+
C.setError("paymentMethod", {
|
|
190
198
|
type: "manual",
|
|
191
199
|
message: b("editContractorPayment.errors.unsupportedPaymentMethod")
|
|
192
200
|
});
|
|
193
201
|
return;
|
|
194
202
|
}
|
|
195
203
|
if (o === "Check" && t.paymentMethod === "Direct Deposit") {
|
|
196
|
-
|
|
204
|
+
C.setError("paymentMethod", {
|
|
197
205
|
type: "manual",
|
|
198
206
|
message: b("editContractorPayment.errors.directDepositNotAvailable")
|
|
199
207
|
});
|
|
200
208
|
return;
|
|
201
209
|
}
|
|
202
|
-
const
|
|
203
|
-
|
|
210
|
+
const i = (t.wage ?? 0) > 0 || (t.hours ?? 0) > 0 || (t.bonus ?? 0) > 0 || (t.reimbursement ?? 0) > 0;
|
|
211
|
+
j(
|
|
204
212
|
(r) => r.map(
|
|
205
213
|
(m) => m.contractorUuid === t.contractorUuid ? {
|
|
206
214
|
contractorUuid: m.contractorUuid,
|
|
@@ -209,24 +217,24 @@ const yt = ({ companyId: c, dictionary: U, onEvent: y }) => {
|
|
|
209
217
|
bonus: String(t.bonus ?? 0),
|
|
210
218
|
reimbursement: String(t.reimbursement ?? 0),
|
|
211
219
|
paymentMethod: t.paymentMethod,
|
|
212
|
-
isTouched:
|
|
220
|
+
isTouched: i
|
|
213
221
|
} : m
|
|
214
222
|
)
|
|
215
223
|
);
|
|
216
|
-
const
|
|
224
|
+
const n = a.find(
|
|
217
225
|
(r) => r.uuid === t.contractorUuid
|
|
218
|
-
),
|
|
219
|
-
|
|
220
|
-
first_name:
|
|
221
|
-
last_name:
|
|
222
|
-
}) :
|
|
226
|
+
), s = $.sanitize(
|
|
227
|
+
n?.type === "Individual" ? dt({
|
|
228
|
+
first_name: n.firstName,
|
|
229
|
+
last_name: n.lastName
|
|
230
|
+
}) : n?.businessName || ""
|
|
223
231
|
);
|
|
224
232
|
d((r) => ({
|
|
225
233
|
...r,
|
|
226
234
|
[t.contractorUuid]: {
|
|
227
235
|
type: "success",
|
|
228
236
|
title: b("alerts.contractorPaymentUpdated", {
|
|
229
|
-
contractorName:
|
|
237
|
+
contractorName: s,
|
|
230
238
|
interpolation: { escapeValue: !1 }
|
|
231
239
|
}),
|
|
232
240
|
onDismiss: () => {
|
|
@@ -236,15 +244,15 @@ const yt = ({ companyId: c, dictionary: U, onEvent: y }) => {
|
|
|
236
244
|
});
|
|
237
245
|
}
|
|
238
246
|
}
|
|
239
|
-
})), g(!1), y
|
|
247
|
+
})), g(!1), l(y.CONTRACTOR_PAYMENT_UPDATE, t);
|
|
240
248
|
},
|
|
241
|
-
contractorPaymentMethod: a.find((t) => t.uuid ===
|
|
249
|
+
contractorPaymentMethod: a.find((t) => t.uuid === C.getValues("contractorUuid"))?.paymentMethod ?? void 0
|
|
242
250
|
}
|
|
243
251
|
)
|
|
244
252
|
] });
|
|
245
253
|
};
|
|
246
254
|
export {
|
|
247
|
-
|
|
248
|
-
|
|
255
|
+
jt as CreatePayment,
|
|
256
|
+
Pt as Root
|
|
249
257
|
};
|
|
250
258
|
//# sourceMappingURL=CreatePayment.js.map
|