@gusto/embedded-react-sdk 0.16.0 → 0.18.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 +54 -0
- package/dist/components/Base/Base.js +50 -65
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Base/useBase.d.ts +2 -5
- package/dist/components/Base/useBase.js.map +1 -1
- package/dist/components/Common/EmptyData/EmptyData.js +10 -10
- package/dist/components/Common/EmptyData/EmptyData.js.map +1 -1
- package/dist/components/Common/EmptyData/EmptyData.module.scss.js +5 -3
- package/dist/components/Common/EmptyData/EmptyData.module.scss.js.map +1 -1
- package/dist/components/Common/FieldDescription/FieldDescription.module.scss.js +1 -1
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js +41 -33
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js.map +1 -1
- package/dist/components/Common/HamburgerMenu/HamburgerMenu.js +1 -1
- package/dist/components/Common/HamburgerMenu/HamburgerMenu.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureForm.js +4 -6
- package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +10 -12
- package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +6 -8
- package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +32 -18
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js.map +1 -1
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.module.scss.js +12 -12
- package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.d.ts +14 -0
- package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.js +8 -0
- package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.js.map +1 -0
- package/dist/components/Common/UI/DatePicker/DatePicker.module.scss.js +8 -8
- package/dist/components/Common/UI/DescriptionList/DescriptionList.d.ts +2 -0
- package/dist/components/Common/UI/DescriptionList/DescriptionList.js +16 -0
- package/dist/components/Common/UI/DescriptionList/DescriptionList.js.map +1 -0
- package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js +10 -0
- package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js.map +1 -0
- package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.d.ts +10 -0
- package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.js +5 -0
- package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.js.map +1 -0
- package/dist/components/Common/UI/DescriptionList/index.d.ts +3 -0
- package/dist/components/Common/UI/Dialog/Dialog.js +50 -76
- package/dist/components/Common/UI/Dialog/Dialog.js.map +1 -1
- package/dist/components/Common/UI/Dialog/Dialog.module.scss.js +8 -14
- package/dist/components/Common/UI/Dialog/Dialog.module.scss.js.map +1 -1
- package/dist/components/Common/UI/Link/LinkTypes.d.ts +7 -6
- package/dist/components/Common/UI/Modal/Modal.d.ts +2 -0
- package/dist/components/Common/UI/Modal/Modal.js +90 -0
- package/dist/components/Common/UI/Modal/Modal.js.map +1 -0
- package/dist/components/Common/UI/Modal/Modal.module.scss.js +26 -0
- package/dist/components/Common/UI/Modal/Modal.module.scss.js.map +1 -0
- package/dist/components/Common/UI/Modal/ModalTypes.d.ts +34 -0
- package/dist/components/Common/UI/Modal/ModalTypes.js +8 -0
- package/dist/components/Common/UI/Modal/ModalTypes.js.map +1 -0
- package/dist/components/Common/UI/Modal/index.d.ts +3 -0
- package/dist/components/Common/UI/Tabs/Tabs.d.ts +0 -5
- package/dist/components/Common/UI/Tabs/Tabs.js +45 -16
- package/dist/components/Common/UI/Tabs/Tabs.js.map +1 -1
- package/dist/components/Common/UI/Tabs/Tabs.module.scss.js +8 -4
- package/dist/components/Common/UI/Tabs/Tabs.module.scss.js.map +1 -1
- package/dist/components/Common/UI/Tabs/TabsTypes.d.ts +7 -0
- package/dist/components/Common/index.d.ts +0 -1
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +6 -8
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +6 -7
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +8 -9
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +2 -3
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +2 -3
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -6
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +6 -7
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +5 -6
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +9 -10
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -6
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/TitleSelect.js +7 -8
- package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -8
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +2 -3
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +7 -8
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -6
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/AccountView.js +22 -17
- package/dist/components/Company/BankAccount/BankAccountList/AccountView.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +6 -7
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +7 -8
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -5
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +5 -6
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +11 -13
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -6
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +6 -8
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +4 -6
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Actions.js +6 -7
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +15 -17
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +2 -3
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +9 -11
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Actions.js +5 -6
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +7 -9
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Edit.js +10 -11
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +2 -3
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.js +4 -5
- package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +9 -11
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -6
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Actions.js +2 -3
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +2 -3
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +12 -14
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -6
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.js +5 -6
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +2 -3
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +2 -4
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +4 -6
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +39 -41
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Actions.js +10 -11
- package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.js +35 -37
- package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Head.js +18 -19
- package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +5 -6
- package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
- package/dist/components/Company/PaySchedule/usePaySchedule.js +6 -8
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +5 -6
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -6
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +6 -7
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +5 -6
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -6
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/Address.js +3 -5
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/Address/Form.js +2 -3
- package/dist/components/Contractor/Address/Form.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +6 -8
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.js +15 -16
- package/dist/components/Contractor/ContractorList/index.js.map +1 -1
- package/dist/components/Contractor/NewHireReport/NewHireReport.js +13 -14
- package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +2 -3
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +2 -3
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +2 -3
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Contractor/Profile/useContractorProfile.js +3 -4
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +2 -3
- package/dist/components/Contractor/Submit/Submit.js.map +1 -1
- package/dist/components/Employee/Compensation/Actions.js +4 -5
- package/dist/components/Employee/Compensation/Actions.js.map +1 -1
- package/dist/components/Employee/Compensation/Edit.js +10 -9
- package/dist/components/Employee/Compensation/Edit.js.map +1 -1
- package/dist/components/Employee/Compensation/List.js +5 -6
- package/dist/components/Employee/Compensation/List.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsComponents.js +1 -1
- package/dist/components/Employee/Deductions/DeductionsComponents.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +6 -6
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.d.ts +2 -2
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +2 -3
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +44 -40
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +2 -3
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js.map +1 -1
- package/dist/components/Employee/Deductions/useDeductions.d.ts +2 -2
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +4 -5
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +9 -11
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +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 +4 -6
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +11 -13
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +4 -6
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Actions.js +4 -5
- package/dist/components/Employee/EmployeeList/Actions.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/List.js +9 -10
- package/dist/components/Employee/EmployeeList/List.js.map +1 -1
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +4 -6
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/Actions.js +2 -3
- package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalForm.js +5 -6
- package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalTaxes.js +8 -8
- package/dist/components/Employee/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/Head.js +6 -6
- package/dist/components/Employee/FederalTaxes/Head.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +4 -6
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.js +6 -7
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Actions.js +5 -6
- package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +4 -5
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +3 -4
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentMethod.d.ts +1 -0
- package/dist/components/Employee/PaymentMethod/PaymentMethod.js +79 -78
- package/dist/components/Employee/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +12 -13
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +2 -3
- package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.d.ts +1 -0
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +6 -8
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/Actions.js +6 -7
- package/dist/components/Employee/Profile/Actions.js.map +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.js +38 -35
- package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
- package/dist/components/Employee/Profile/HomeAddress.d.ts +52 -0
- package/dist/components/Employee/Profile/HomeAddress.js +63 -44
- package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +20 -21
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
- package/dist/components/Employee/Profile/Profile.js +150 -143
- package/dist/components/Employee/Profile/Profile.js.map +1 -1
- package/dist/components/Employee/Profile/useProfile.d.ts +1 -0
- package/dist/components/Employee/Profile/useProfile.js +4 -6
- package/dist/components/Employee/Profile/useProfile.js.map +1 -1
- package/dist/components/Employee/StateTaxes/Actions.js +6 -7
- package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/StateTaxes/StateTaxes.js +4 -4
- package/dist/components/Employee/StateTaxes/StateTaxes.js.map +1 -1
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +4 -6
- package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
- package/dist/components/Employee/Taxes/Actions.js +7 -8
- package/dist/components/Employee/Taxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +5 -6
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalHead.js +6 -6
- package/dist/components/Employee/Taxes/FederalHead.js.map +1 -1
- package/dist/components/Employee/Taxes/Taxes.js +5 -5
- package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +4 -6
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Flow/Flow.js +9 -10
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +9 -10
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +101 -90
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +5 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +135 -133
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.module.scss.js +5 -3
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.module.scss.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +127 -119
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +5 -6
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +3 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js +22 -22
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +40 -27
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +50 -72
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.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/PayrollLanding/PayrollLandingFlowComponents.d.ts +1 -1
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +4 -4
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js +20 -20
- package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollList.js +24 -21
- package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +3 -9
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +117 -128
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js +6 -6
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +89 -78
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +195 -214
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.module.scss.js +8 -0
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.module.scss.js.map +1 -0
- package/dist/components/Payroll/usePreparedPayrollData.js +8 -10
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +49 -45
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
- package/dist/contexts/ComponentAdapter/componentAdapterTypes.d.ts +2 -0
- package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +4 -0
- package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +5 -7
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/helpers/apiErrorToList.d.ts +7 -0
- package/dist/helpers/apiErrorToList.js +23 -0
- package/dist/helpers/apiErrorToList.js.map +1 -0
- package/dist/helpers/breadcrumbHelpers.js +30 -30
- package/dist/helpers/breadcrumbHelpers.js.map +1 -1
- package/dist/helpers/dateFormatting.d.ts +18 -6
- package/dist/helpers/dateFormatting.js +93 -24
- package/dist/helpers/dateFormatting.js.map +1 -1
- package/dist/helpers/formattedStrings.js +11 -12
- package/dist/helpers/formattedStrings.js.map +1 -1
- package/dist/hooks/useAsyncError.js.map +1 -0
- package/dist/hooks/useDateFormatter.d.ts +19 -0
- package/dist/hooks/useDateFormatter.js +24 -0
- package/dist/hooks/useDateFormatter.js.map +1 -0
- package/dist/hooks/useMenu.js.map +1 -0
- package/dist/{components/Common/hooks → hooks}/useNumberFormatter.js +1 -1
- package/dist/hooks/useNumberFormatter.js.map +1 -0
- package/dist/hooks/useOverflowDetection/index.d.ts +3 -0
- package/dist/hooks/useOverflowDetection/useOverflowDetection.d.ts +7 -0
- package/dist/hooks/useOverflowDetection/useOverflowDetection.js +28 -0
- package/dist/hooks/useOverflowDetection/useOverflowDetection.js.map +1 -0
- package/dist/i18n/en/Company.PaySchedule.json.js +9 -9
- package/dist/i18n/en/Employee.Compensation.json.js +15 -15
- package/dist/i18n/en/Employee.Deductions.json.js +131 -105
- package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
- package/dist/i18n/en/Employee.FederalTaxes.json.js +9 -9
- package/dist/i18n/en/Employee.HomeAddress.json.js +1 -1
- package/dist/i18n/en/Employee.PaymentMethod.json.js +70 -66
- package/dist/i18n/en/Employee.PaymentMethod.json.js.map +1 -1
- package/dist/i18n/en/Employee.Taxes.json.js +25 -27
- package/dist/i18n/en/Employee.Taxes.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +17 -17
- package/dist/i18n/en/Payroll.PayrollOverview.json.js +23 -23
- package/dist/i18n/en/common.json.d.ts +2 -1
- package/dist/i18n/en/common.json.js +4 -4
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +20 -1
- package/package.json +10 -10
- package/dist/components/Common/hooks/useAsyncError.js.map +0 -1
- package/dist/components/Common/hooks/useMenu.js.map +0 -1
- package/dist/components/Common/hooks/useNumberFormatter.js.map +0 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +0 -221
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +0 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js +0 -8
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js.map +0 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +0 -132
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +0 -1
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js +0 -14
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js.map +0 -1
- package/dist/components/Employee/Deductions/DeductionsForm/UNSTABLE_DeductionsForm.js +0 -98
- package/dist/components/Employee/Deductions/DeductionsForm/UNSTABLE_DeductionsForm.js.map +0 -1
- /package/dist/{components/Common/hooks → hooks}/useAsyncError.d.ts +0 -0
- /package/dist/{components/Common/hooks → hooks}/useAsyncError.js +0 -0
- /package/dist/{components/Common/hooks → hooks}/useMenu.d.ts +0 -0
- /package/dist/{components/Common/hooks → hooks}/useMenu.js +0 -0
- /package/dist/{components/Common/hooks → hooks}/useNumberFormatter.d.ts +0 -0
|
@@ -13,11 +13,11 @@ import { useBase as M } from "../../Base/useBase.js";
|
|
|
13
13
|
import { useI18n as U, useComponentDictionary as B } from "../../../i18n/I18n.js";
|
|
14
14
|
import { componentEvents as u } from "../../../shared/constants.js";
|
|
15
15
|
import { Form as W } from "../../Common/Form/Form.js";
|
|
16
|
-
function
|
|
17
|
-
return /* @__PURE__ */ o(L, { ...
|
|
16
|
+
function re(r) {
|
|
17
|
+
return /* @__PURE__ */ o(L, { ...r, children: /* @__PURE__ */ o(q, { ...r }) });
|
|
18
18
|
}
|
|
19
|
-
const
|
|
20
|
-
const { employeeId: m, className: c, children: a, dictionary: p } =
|
|
19
|
+
const q = (r) => {
|
|
20
|
+
const { employeeId: m, className: c, children: a, dictionary: p } = r, { onEvent: i, fieldErrors: t, baseSubmitHandler: f } = M();
|
|
21
21
|
U("Employee.FederalTaxes"), B("Employee.FederalTaxes", p);
|
|
22
22
|
const { data: E } = w({
|
|
23
23
|
employeeUuid: m
|
|
@@ -34,11 +34,11 @@ const k = (t) => {
|
|
|
34
34
|
defaultValues: F
|
|
35
35
|
}), { handleSubmit: x, setError: l } = d;
|
|
36
36
|
return D(() => {
|
|
37
|
-
|
|
38
|
-
const s = n.
|
|
37
|
+
t && t.length > 0 && t.forEach((n) => {
|
|
38
|
+
const s = n.errorKey.replace(".value", "");
|
|
39
39
|
l(s, { type: "custom", message: n.message });
|
|
40
40
|
});
|
|
41
|
-
}, [
|
|
41
|
+
}, [t, l]), /* @__PURE__ */ o("section", { className: c, children: /* @__PURE__ */ o(
|
|
42
42
|
J,
|
|
43
43
|
{
|
|
44
44
|
value: {
|
|
@@ -67,6 +67,6 @@ const k = (t) => {
|
|
|
67
67
|
) });
|
|
68
68
|
};
|
|
69
69
|
export {
|
|
70
|
-
|
|
70
|
+
re as FederalTaxes
|
|
71
71
|
};
|
|
72
72
|
//# sourceMappingURL=FederalTaxes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FederalTaxes.js","sources":["../../../../src/components/Employee/FederalTaxes/FederalTaxes.tsx"],"sourcesContent":["import { zodResolver } from '@hookform/resolvers/zod'\nimport { FormProvider, useForm, type SubmitHandler } from 'react-hook-form'\nimport { useEffect } from 'react'\nimport { useEmployeeTaxSetupGetFederalTaxesSuspense } from '@gusto/embedded-api/react-query/employeeTaxSetupGetFederalTaxes'\nimport { useEmployeeTaxSetupUpdateFederalTaxesMutation } from '@gusto/embedded-api/react-query/employeeTaxSetupUpdateFederalTaxes'\nimport { FederalForm } from './FederalForm'\nimport { FederalFormSchema, type FederalFormInputs, type FederalFormPayload } from './FederalForm'\nimport { Head } from './Head'\nimport { Actions } from './Actions'\nimport { FederalTaxesProvider } from './useFederalTaxes'\nimport {\n useBase,\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { Form } from '@/components/Common/Form'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\ninterface FederalTaxesProps extends CommonComponentInterface<'Employee.FederalTaxes'> {\n employeeId: string\n}\n\nexport function FederalTaxes(props: FederalTaxesProps & BaseComponentInterface) {\n return (\n <BaseComponent<'Employee.FederalTaxes'> {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nconst Root = (props: FederalTaxesProps) => {\n const { employeeId, className, children, dictionary } = props\n const { onEvent, fieldErrors, baseSubmitHandler } = useBase()\n useI18n('Employee.FederalTaxes')\n useComponentDictionary('Employee.FederalTaxes', dictionary)\n\n const { data: fedData } = useEmployeeTaxSetupGetFederalTaxesSuspense({\n employeeUuid: employeeId,\n })\n const employeeFederalTax = fedData.employeeFederalTax!\n\n const { mutateAsync: updateFederalTaxes, isPending } =\n useEmployeeTaxSetupUpdateFederalTaxesMutation()\n\n const defaultValues = {\n filingStatus: employeeFederalTax.filingStatus ?? undefined,\n twoJobs: employeeFederalTax.twoJobs ? ('true' as const) : ('false' as const),\n deductions: employeeFederalTax.deductions ? Number(employeeFederalTax.deductions) : 0,\n dependentsAmount: employeeFederalTax.dependentsAmount\n ? Number(employeeFederalTax.dependentsAmount)\n : 0,\n otherIncome: employeeFederalTax.otherIncome ? Number(employeeFederalTax.otherIncome) : 0,\n extraWithholding: employeeFederalTax.extraWithholding\n ? Number(employeeFederalTax.extraWithholding)\n : 0,\n w4DataType: employeeFederalTax.w4DataType,\n }\n\n const formMethods = useForm<FederalFormInputs, unknown, FederalFormPayload>({\n resolver: zodResolver(FederalFormSchema),\n defaultValues,\n })\n const { handleSubmit, setError: _setError } = formMethods\n\n useEffect(() => {\n if (fieldErrors && fieldErrors.length > 0) {\n fieldErrors.forEach(msgObject => {\n const key = msgObject.
|
|
1
|
+
{"version":3,"file":"FederalTaxes.js","sources":["../../../../src/components/Employee/FederalTaxes/FederalTaxes.tsx"],"sourcesContent":["import { zodResolver } from '@hookform/resolvers/zod'\nimport { FormProvider, useForm, type SubmitHandler } from 'react-hook-form'\nimport { useEffect } from 'react'\nimport { useEmployeeTaxSetupGetFederalTaxesSuspense } from '@gusto/embedded-api/react-query/employeeTaxSetupGetFederalTaxes'\nimport { useEmployeeTaxSetupUpdateFederalTaxesMutation } from '@gusto/embedded-api/react-query/employeeTaxSetupUpdateFederalTaxes'\nimport { FederalForm } from './FederalForm'\nimport { FederalFormSchema, type FederalFormInputs, type FederalFormPayload } from './FederalForm'\nimport { Head } from './Head'\nimport { Actions } from './Actions'\nimport { FederalTaxesProvider } from './useFederalTaxes'\nimport {\n useBase,\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { Form } from '@/components/Common/Form'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\ninterface FederalTaxesProps extends CommonComponentInterface<'Employee.FederalTaxes'> {\n employeeId: string\n}\n\nexport function FederalTaxes(props: FederalTaxesProps & BaseComponentInterface) {\n return (\n <BaseComponent<'Employee.FederalTaxes'> {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nconst Root = (props: FederalTaxesProps) => {\n const { employeeId, className, children, dictionary } = props\n const { onEvent, fieldErrors, baseSubmitHandler } = useBase()\n useI18n('Employee.FederalTaxes')\n useComponentDictionary('Employee.FederalTaxes', dictionary)\n\n const { data: fedData } = useEmployeeTaxSetupGetFederalTaxesSuspense({\n employeeUuid: employeeId,\n })\n const employeeFederalTax = fedData.employeeFederalTax!\n\n const { mutateAsync: updateFederalTaxes, isPending } =\n useEmployeeTaxSetupUpdateFederalTaxesMutation()\n\n const defaultValues = {\n filingStatus: employeeFederalTax.filingStatus ?? undefined,\n twoJobs: employeeFederalTax.twoJobs ? ('true' as const) : ('false' as const),\n deductions: employeeFederalTax.deductions ? Number(employeeFederalTax.deductions) : 0,\n dependentsAmount: employeeFederalTax.dependentsAmount\n ? Number(employeeFederalTax.dependentsAmount)\n : 0,\n otherIncome: employeeFederalTax.otherIncome ? Number(employeeFederalTax.otherIncome) : 0,\n extraWithholding: employeeFederalTax.extraWithholding\n ? Number(employeeFederalTax.extraWithholding)\n : 0,\n w4DataType: employeeFederalTax.w4DataType,\n }\n\n const formMethods = useForm<FederalFormInputs, unknown, FederalFormPayload>({\n resolver: zodResolver(FederalFormSchema),\n defaultValues,\n })\n const { handleSubmit, setError: _setError } = formMethods\n\n useEffect(() => {\n if (fieldErrors && fieldErrors.length > 0) {\n fieldErrors.forEach(msgObject => {\n const key = msgObject.errorKey.replace('.value', '')\n _setError(key as keyof FederalFormInputs, { type: 'custom', message: msgObject.message })\n })\n }\n }, [fieldErrors, _setError])\n\n const onSubmit: SubmitHandler<FederalFormPayload> = async data => {\n await baseSubmitHandler(data, async payload => {\n const federalTaxesResponse = await updateFederalTaxes({\n request: {\n employeeUuid: employeeId,\n requestBody: {\n ...payload,\n twoJobs: payload.twoJobs === 'true',\n version: employeeFederalTax.version,\n },\n },\n })\n onEvent(componentEvents.EMPLOYEE_FEDERAL_TAXES_UPDATED, federalTaxesResponse)\n onEvent(componentEvents.EMPLOYEE_FEDERAL_TAXES_DONE)\n })\n }\n\n return (\n <section className={className}>\n <FederalTaxesProvider\n value={{\n isPending,\n }}\n >\n <FormProvider {...formMethods}>\n <Form onSubmit={handleSubmit(onSubmit)}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <FederalForm />\n <Actions />\n </>\n )}\n </Form>\n </FormProvider>\n </FederalTaxesProvider>\n </section>\n )\n}\n"],"names":["FederalTaxes","props","jsx","BaseComponent","Root","employeeId","className","children","dictionary","onEvent","fieldErrors","baseSubmitHandler","useBase","useI18n","useComponentDictionary","fedData","useEmployeeTaxSetupGetFederalTaxesSuspense","employeeFederalTax","updateFederalTaxes","isPending","useEmployeeTaxSetupUpdateFederalTaxesMutation","defaultValues","formMethods","useForm","zodResolver","FederalFormSchema","handleSubmit","_setError","useEffect","msgObject","key","FederalTaxesProvider","FormProvider","Form","data","payload","federalTaxesResponse","componentEvents","jsxs","Fragment","Head","FederalForm","Actions"],"mappings":";;;;;;;;;;;;;;;AAyBO,SAASA,GAAaC,GAAmD;AAC9E,SACE,gBAAAC,EAACC,KAAwC,GAAGF,GAC1C,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,MAAMG,IAAO,CAACH,MAA6B;AACzC,QAAM,EAAE,YAAAI,GAAY,WAAAC,GAAW,UAAAC,GAAU,YAAAC,MAAeP,GAClD,EAAE,SAAAQ,GAAS,aAAAC,GAAa,mBAAAC,EAAA,IAAsBC,EAAA;AACpD,EAAAC,EAAQ,uBAAuB,GAC/BC,EAAuB,yBAAyBN,CAAU;AAE1D,QAAM,EAAE,MAAMO,EAAA,IAAYC,EAA2C;AAAA,IACnE,cAAcX;AAAA,EAAA,CACf,GACKY,IAAqBF,EAAQ,oBAE7B,EAAE,aAAaG,GAAoB,WAAAC,EAAA,IACvCC,EAAA,GAEIC,IAAgB;AAAA,IACpB,cAAcJ,EAAmB,gBAAgB;AAAA,IACjD,SAASA,EAAmB,UAAW,SAAoB;AAAA,IAC3D,YAAYA,EAAmB,aAAa,OAAOA,EAAmB,UAAU,IAAI;AAAA,IACpF,kBAAkBA,EAAmB,mBACjC,OAAOA,EAAmB,gBAAgB,IAC1C;AAAA,IACJ,aAAaA,EAAmB,cAAc,OAAOA,EAAmB,WAAW,IAAI;AAAA,IACvF,kBAAkBA,EAAmB,mBACjC,OAAOA,EAAmB,gBAAgB,IAC1C;AAAA,IACJ,YAAYA,EAAmB;AAAA,EAAA,GAG3BK,IAAcC,EAAwD;AAAA,IAC1E,UAAUC,EAAYC,CAAiB;AAAA,IACvC,eAAAJ;AAAA,EAAA,CACD,GACK,EAAE,cAAAK,GAAc,UAAUC,EAAA,IAAcL;AAE9C,SAAAM,EAAU,MAAM;AACd,IAAIlB,KAAeA,EAAY,SAAS,KACtCA,EAAY,QAAQ,CAAAmB,MAAa;AAC/B,YAAMC,IAAMD,EAAU,SAAS,QAAQ,UAAU,EAAE;AACnD,MAAAF,EAAUG,GAAgC,EAAE,MAAM,UAAU,SAASD,EAAU,SAAS;AAAA,IAC1F,CAAC;AAAA,EAEL,GAAG,CAACnB,GAAaiB,CAAS,CAAC,GAoBzB,gBAAAzB,EAAC,aAAQ,WAAAI,GACP,UAAA,gBAAAJ;AAAA,IAAC6B;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,WAAAZ;AAAA,MAAA;AAAA,MAGF,UAAA,gBAAAjB,EAAC8B,GAAA,EAAc,GAAGV,GAChB,UAAA,gBAAApB,EAAC+B,GAAA,EAAK,UAAUP,EAzB4B,OAAMQ,MAAQ;AAChE,cAAMvB,EAAkBuB,GAAM,OAAMC,MAAW;AAC7C,gBAAMC,IAAuB,MAAMlB,EAAmB;AAAA,YACpD,SAAS;AAAA,cACP,cAAcb;AAAA,cACd,aAAa;AAAA,gBACX,GAAG8B;AAAA,gBACH,SAASA,EAAQ,YAAY;AAAA,gBAC7B,SAASlB,EAAmB;AAAA,cAAA;AAAA,YAC9B;AAAA,UACF,CACD;AACD,UAAAR,EAAQ4B,EAAgB,gCAAgCD,CAAoB,GAC5E3B,EAAQ4B,EAAgB,2BAA2B;AAAA,QACrD,CAAC;AAAA,MACH,CAU6C,GAClC,UAAA9B,KAGC,gBAAA+B,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAArC,EAACsC,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAY;AAAA,0BACZC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX,GAEJ,EAAA,CACF;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { jsxs as o, Fragment as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { useComponentContext as
|
|
2
|
+
import { useTranslation as i, Trans as s } from "react-i18next";
|
|
3
|
+
import { useComponentContext as a } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
4
4
|
function p() {
|
|
5
|
-
const { t: r } =
|
|
5
|
+
const { t: r } = i("Employee.FederalTaxes"), n = a();
|
|
6
6
|
return /* @__PURE__ */ o(t, { children: [
|
|
7
7
|
/* @__PURE__ */ e(n.Heading, { as: "h1", children: r("federalTaxesTitle") }),
|
|
8
8
|
/* @__PURE__ */ e(n.Text, { children: /* @__PURE__ */ e(
|
|
9
|
-
|
|
9
|
+
s,
|
|
10
10
|
{
|
|
11
11
|
i18nKey: "irs_calculator",
|
|
12
12
|
t: r,
|
|
13
13
|
components: {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
IrsCalculatorLink: /* @__PURE__ */ e(n.Link, {}),
|
|
15
|
+
HelpCenterLink: /* @__PURE__ */ e(n.Link, {})
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
) })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Head.js","sources":["../../../../src/components/Employee/FederalTaxes/Head.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Head() {\n const { t } = useTranslation('Employee.FederalTaxes')\n const Components = useComponentContext()\n\n return (\n <>\n <Components.Heading as=\"h1\">{t('federalTaxesTitle')}</Components.Heading>\n <Components.Text>\n <Trans\n i18nKey={'irs_calculator'}\n t={t}\n components={{\n
|
|
1
|
+
{"version":3,"file":"Head.js","sources":["../../../../src/components/Employee/FederalTaxes/Head.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Head() {\n const { t } = useTranslation('Employee.FederalTaxes')\n const Components = useComponentContext()\n\n return (\n <>\n <Components.Heading as=\"h1\">{t('federalTaxesTitle')}</Components.Heading>\n <Components.Text>\n <Trans\n i18nKey={'irs_calculator'}\n t={t}\n components={{\n IrsCalculatorLink: <Components.Link />,\n HelpCenterLink: <Components.Link />,\n }}\n />\n </Components.Text>\n </>\n )\n}\n"],"names":["Head","t","useTranslation","Components","useComponentContext","jsxs","Fragment","jsx","Trans"],"mappings":";;;AAGO,SAASA,IAAO;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,uBAAuB,GAC9CC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC,EAACJ,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAF,EAAE,mBAAmB,GAAE;AAAA,IACpD,gBAAAM,EAACJ,EAAW,MAAX,EACC,UAAA,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,SAAS;AAAA,QACT,GAAAP;AAAA,QACA,YAAY;AAAA,UACV,mBAAmB,gBAAAM,EAACJ,EAAW,MAAX,CAAA,CAAgB;AAAA,UACpC,gBAAgB,gBAAAI,EAACJ,EAAW,MAAX,CAAA,CAAgB;AAAA,QAAA;AAAA,MACnC;AAAA,IAAA,EACF,CACF;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -8,14 +8,12 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
|
|
|
8
8
|
import "@tanstack/react-query";
|
|
9
9
|
import "../../Base/useBase.js";
|
|
10
10
|
import "../../../shared/constants.js";
|
|
11
|
-
import "classnames";
|
|
12
|
-
import "dompurify";
|
|
13
|
-
import "../../../contexts/LocaleProvider/useLocale.js";
|
|
14
11
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
12
|
+
import "dompurify";
|
|
15
13
|
import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
|
|
16
|
-
const [
|
|
14
|
+
const [F, T] = o("FederalTaxesContext");
|
|
17
15
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
T as FederalTaxesProvider,
|
|
17
|
+
F as useFederalTaxes
|
|
20
18
|
};
|
|
21
19
|
//# sourceMappingURL=useFederalTaxes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFederalTaxes.js","sources":["../../../../src/components/Employee/FederalTaxes/useFederalTaxes.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\n\ntype FederalTaxesContextType = {\n isPending: boolean\n}\n\nconst [useFederalTaxes, FederalTaxesProvider] =\n createCompoundContext<FederalTaxesContextType>('FederalTaxesContext')\nexport { useFederalTaxes, FederalTaxesProvider }\n"],"names":["useFederalTaxes","FederalTaxesProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useFederalTaxes.js","sources":["../../../../src/components/Employee/FederalTaxes/useFederalTaxes.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\n\ntype FederalTaxesContextType = {\n isPending: boolean\n}\n\nconst [useFederalTaxes, FederalTaxesProvider] =\n createCompoundContext<FederalTaxesContextType>('FederalTaxesContext')\nexport { useFederalTaxes, FederalTaxesProvider }\n"],"names":["useFederalTaxes","FederalTaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;AAMA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
|
|
@@ -6,21 +6,20 @@ import s from "./Landing.module.scss.js";
|
|
|
6
6
|
import { BaseComponent as x } from "../../Base/Base.js";
|
|
7
7
|
import { useBase as y } from "../../Base/useBase.js";
|
|
8
8
|
import { Flex as r } from "../../Common/Flex/Flex.js";
|
|
9
|
-
import "classnames";
|
|
10
9
|
import { ActionsLayout as E } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
11
10
|
import { useComponentContext as C } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
12
11
|
import { useI18n as D, useComponentDictionary as I } from "../../../i18n/I18n.js";
|
|
13
12
|
import { componentEvents as S } from "../../../shared/constants.js";
|
|
14
|
-
function
|
|
13
|
+
function F(t) {
|
|
15
14
|
return D("Employee.Landing"), I("Employee.Landing", t.dictionary), /* @__PURE__ */ e(x, { ...t, children: /* @__PURE__ */ e(L, { ...t, children: t.children }) });
|
|
16
15
|
}
|
|
17
|
-
const L = ({ employeeId: t, companyId: c, className:
|
|
18
|
-
const { onEvent:
|
|
16
|
+
const L = ({ employeeId: t, companyId: c, className: l }) => {
|
|
17
|
+
const { onEvent: m } = y(), o = C(), {
|
|
19
18
|
data: { employee: a }
|
|
20
19
|
} = h({ employeeId: t }), p = a.firstName, {
|
|
21
20
|
data: { company: d }
|
|
22
21
|
} = g({ companyId: c }), f = d?.name, { t: n } = u("Employee.Landing");
|
|
23
|
-
return /* @__PURE__ */ e("section", { className:
|
|
22
|
+
return /* @__PURE__ */ e("section", { className: l, children: /* @__PURE__ */ i(r, { alignItems: "center", flexDirection: "column", gap: 32, children: [
|
|
24
23
|
/* @__PURE__ */ i(r, { alignItems: "center", flexDirection: "column", gap: 8, children: [
|
|
25
24
|
/* @__PURE__ */ e(o.Heading, { as: "h2", textAlign: "center", children: n("landingSubtitle", { firstName: p, companyName: f }) }),
|
|
26
25
|
/* @__PURE__ */ e(o.Text, { className: s.description, children: n("landingDescription") })
|
|
@@ -39,7 +38,7 @@ const L = ({ employeeId: t, companyId: c, className: m }) => {
|
|
|
39
38
|
{
|
|
40
39
|
variant: "secondary",
|
|
41
40
|
onClick: () => {
|
|
42
|
-
|
|
41
|
+
m(S.EMPLOYEE_SELF_ONBOARDING_START);
|
|
43
42
|
},
|
|
44
43
|
children: n("getStartedCta")
|
|
45
44
|
}
|
|
@@ -49,6 +48,6 @@ const L = ({ employeeId: t, companyId: c, className: m }) => {
|
|
|
49
48
|
] }) });
|
|
50
49
|
};
|
|
51
50
|
export {
|
|
52
|
-
|
|
51
|
+
F as Landing
|
|
53
52
|
};
|
|
54
53
|
//# sourceMappingURL=Landing.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Landing.js","sources":["../../../../src/components/Employee/Landing/Landing.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useEmployeesGetSuspense } from '@gusto/embedded-api/react-query/employeesGet'\nimport { useCompaniesGetSuspense } from '@gusto/embedded-api/react-query/companiesGet'\nimport styles from './Landing.module.scss'\nimport {\n BaseComponent,\n useBase,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base'\nimport { Flex, ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\ninterface SummaryProps extends CommonComponentInterface<'Employee.Landing'> {\n employeeId: string\n companyId: string\n}\n\nexport function Landing(props: SummaryProps & BaseComponentInterface) {\n useI18n('Employee.Landing')\n useComponentDictionary('Employee.Landing', props.dictionary)\n\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({ employeeId, companyId, className }: SummaryProps) => {\n const { onEvent } = useBase()\n const Components = useComponentContext()\n\n const {\n data: { employee },\n } = useEmployeesGetSuspense({ employeeId })\n const firstName = employee!.firstName\n\n const {\n data: { company },\n } = useCompaniesGetSuspense({ companyId })\n const companyName = company?.name\n\n const { t } = useTranslation('Employee.Landing')\n\n return (\n <section className={className}>\n <Flex alignItems=\"center\" flexDirection=\"column\" gap={32}>\n <Flex alignItems=\"center\" flexDirection=\"column\" gap={8}>\n <Components.Heading as=\"h2\" textAlign=\"center\">\n {t('landingSubtitle', { firstName, companyName })}\n </Components.Heading>\n <Components.Text className={styles.description}>\n {t('landingDescription')}\n </Components.Text>\n </Flex>\n <Flex flexDirection=\"column\" gap={8}>\n <Components.Heading as=\"h3\">{t('stepsSubtitle')}</Components.Heading>\n <ul>\n <li>{t('steps.personalInfo')}</li>\n <li>{t('steps.taxInfo')}</li>\n <li>{t('steps.bankInfo')}</li>\n </ul>\n </Flex>\n <Flex flexDirection=\"column\" alignItems=\"center\" gap={8}>\n <ActionsLayout justifyContent=\"center\">\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(componentEvents.EMPLOYEE_SELF_ONBOARDING_START)\n }}\n >\n {t('getStartedCta')}\n </Components.Button>\n </ActionsLayout>\n <Components.Text className={styles.description}>\n {t('getStartedDescription')}\n </Components.Text>\n </Flex>\n </Flex>\n </section>\n )\n}\n"],"names":["Landing","props","useI18n","useComponentDictionary","jsx","BaseComponent","Root","employeeId","companyId","className","onEvent","useBase","Components","useComponentContext","employee","useEmployeesGetSuspense","firstName","company","useCompaniesGetSuspense","companyName","t","useTranslation","jsxs","Flex","styles","ActionsLayout","componentEvents"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Landing.js","sources":["../../../../src/components/Employee/Landing/Landing.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useEmployeesGetSuspense } from '@gusto/embedded-api/react-query/employeesGet'\nimport { useCompaniesGetSuspense } from '@gusto/embedded-api/react-query/companiesGet'\nimport styles from './Landing.module.scss'\nimport {\n BaseComponent,\n useBase,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base'\nimport { Flex, ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\ninterface SummaryProps extends CommonComponentInterface<'Employee.Landing'> {\n employeeId: string\n companyId: string\n}\n\nexport function Landing(props: SummaryProps & BaseComponentInterface) {\n useI18n('Employee.Landing')\n useComponentDictionary('Employee.Landing', props.dictionary)\n\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({ employeeId, companyId, className }: SummaryProps) => {\n const { onEvent } = useBase()\n const Components = useComponentContext()\n\n const {\n data: { employee },\n } = useEmployeesGetSuspense({ employeeId })\n const firstName = employee!.firstName\n\n const {\n data: { company },\n } = useCompaniesGetSuspense({ companyId })\n const companyName = company?.name\n\n const { t } = useTranslation('Employee.Landing')\n\n return (\n <section className={className}>\n <Flex alignItems=\"center\" flexDirection=\"column\" gap={32}>\n <Flex alignItems=\"center\" flexDirection=\"column\" gap={8}>\n <Components.Heading as=\"h2\" textAlign=\"center\">\n {t('landingSubtitle', { firstName, companyName })}\n </Components.Heading>\n <Components.Text className={styles.description}>\n {t('landingDescription')}\n </Components.Text>\n </Flex>\n <Flex flexDirection=\"column\" gap={8}>\n <Components.Heading as=\"h3\">{t('stepsSubtitle')}</Components.Heading>\n <ul>\n <li>{t('steps.personalInfo')}</li>\n <li>{t('steps.taxInfo')}</li>\n <li>{t('steps.bankInfo')}</li>\n </ul>\n </Flex>\n <Flex flexDirection=\"column\" alignItems=\"center\" gap={8}>\n <ActionsLayout justifyContent=\"center\">\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(componentEvents.EMPLOYEE_SELF_ONBOARDING_START)\n }}\n >\n {t('getStartedCta')}\n </Components.Button>\n </ActionsLayout>\n <Components.Text className={styles.description}>\n {t('getStartedDescription')}\n </Components.Text>\n </Flex>\n </Flex>\n </section>\n )\n}\n"],"names":["Landing","props","useI18n","useComponentDictionary","jsx","BaseComponent","Root","employeeId","companyId","className","onEvent","useBase","Components","useComponentContext","employee","useEmployeesGetSuspense","firstName","company","useCompaniesGetSuspense","companyName","t","useTranslation","jsxs","Flex","styles","ActionsLayout","componentEvents"],"mappings":";;;;;;;;;;;;AAqBO,SAASA,EAAQC,GAA8C;AACpE,SAAAC,EAAQ,kBAAkB,GAC1BC,EAAuB,oBAAoBF,EAAM,UAAU,GAGzD,gBAAAG,EAACC,GAAA,EAAe,GAAGJ,GACjB,UAAA,gBAAAG,EAACE,KAAM,GAAGL,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,MAAMK,IAAO,CAAC,EAAE,YAAAC,GAAY,WAAAC,GAAW,WAAAC,QAA8B;AACnE,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GACdC,IAAaC,EAAA,GAEb;AAAA,IACJ,MAAM,EAAE,UAAAC,EAAA;AAAA,EAAS,IACfC,EAAwB,EAAE,YAAAR,GAAY,GACpCS,IAAYF,EAAU,WAEtB;AAAA,IACJ,MAAM,EAAE,SAAAG,EAAA;AAAA,EAAQ,IACdC,EAAwB,EAAE,WAAAV,GAAW,GACnCW,IAAcF,GAAS,MAEvB,EAAE,GAAAG,EAAA,IAAMC,EAAe,kBAAkB;AAE/C,SACE,gBAAAjB,EAAC,WAAA,EAAQ,WAAAK,GACP,UAAA,gBAAAa,EAACC,GAAA,EAAK,YAAW,UAAS,eAAc,UAAS,KAAK,IACpD,UAAA;AAAA,IAAA,gBAAAD,EAACC,KAAK,YAAW,UAAS,eAAc,UAAS,KAAK,GACpD,UAAA;AAAA,MAAA,gBAAAnB,EAACQ,EAAW,SAAX,EAAmB,IAAG,MAAK,WAAU,UACnC,UAAAQ,EAAE,mBAAmB,EAAE,WAAAJ,GAAW,aAAAG,EAAA,CAAa,EAAA,CAClD;AAAA,MACA,gBAAAf,EAACQ,EAAW,MAAX,EAAgB,WAAWY,EAAO,aAChC,UAAAJ,EAAE,oBAAoB,EAAA,CACzB;AAAA,IAAA,GACF;AAAA,IACA,gBAAAE,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,GAChC,UAAA;AAAA,MAAA,gBAAAnB,EAACQ,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAQ,EAAE,eAAe,GAAE;AAAA,wBAC/C,MAAA,EACC,UAAA;AAAA,QAAA,gBAAAhB,EAAC,MAAA,EAAI,UAAAgB,EAAE,oBAAoB,EAAA,CAAE;AAAA,QAC7B,gBAAAhB,EAAC,MAAA,EAAI,UAAAgB,EAAE,eAAe,EAAA,CAAE;AAAA,QACxB,gBAAAhB,EAAC,MAAA,EAAI,UAAAgB,EAAE,gBAAgB,EAAA,CAAE;AAAA,MAAA,EAAA,CAC3B;AAAA,IAAA,GACF;AAAA,sBACCG,GAAA,EAAK,eAAc,UAAS,YAAW,UAAS,KAAK,GACpD,UAAA;AAAA,MAAA,gBAAAnB,EAACqB,GAAA,EAAc,gBAAe,UAC5B,UAAA,gBAAArB;AAAA,QAACQ,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACb,YAAAF,EAAQgB,EAAgB,8BAA8B;AAAA,UACxD;AAAA,UAEC,YAAE,eAAe;AAAA,QAAA;AAAA,MAAA,GAEtB;AAAA,MACA,gBAAAtB,EAACQ,EAAW,MAAX,EAAgB,WAAWY,EAAO,aAChC,UAAAJ,EAAE,uBAAuB,EAAA,CAC5B;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,EAAA,CACF,EAAA,CACF;AAEJ;"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { jsxs as d, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { usePaymentMethod as
|
|
4
|
-
import "classnames";
|
|
2
|
+
import { useTranslation as l } from "react-i18next";
|
|
3
|
+
import { usePaymentMethod as m } from "./usePaymentMethod.js";
|
|
5
4
|
import { ActionsLayout as p } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
6
5
|
import { useComponentContext as u } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
|
-
const
|
|
8
|
-
const { handleAdd: a, handleCancel: i, isPending: r, bankAccounts: s, handleSplit: c, mode: t } =
|
|
6
|
+
const L = () => {
|
|
7
|
+
const { handleAdd: a, handleCancel: i, isPending: r, bankAccounts: s, handleSplit: c, mode: t } = m(), { t: n } = l("Employee.PaymentMethod"), o = u();
|
|
9
8
|
return /* @__PURE__ */ d(p, { children: [
|
|
10
9
|
(t === "ADD" || t === "SPLIT") && /* @__PURE__ */ e(o.Button, { variant: "secondary", type: "button", onClick: i, children: n("cancelAddCta") }),
|
|
11
10
|
t === "LIST" && s.length > 1 && /* @__PURE__ */ e(o.Button, { variant: "secondary", type: "button", onClick: c, children: n("splitCta") }),
|
|
@@ -14,6 +13,6 @@ const f = () => {
|
|
|
14
13
|
] });
|
|
15
14
|
};
|
|
16
15
|
export {
|
|
17
|
-
|
|
16
|
+
L as Actions
|
|
18
17
|
};
|
|
19
18
|
//# sourceMappingURL=Actions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/PaymentMethod/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaymentMethod } from './usePaymentMethod'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { handleAdd, handleCancel, isPending, bankAccounts, handleSplit, mode } = usePaymentMethod()\n const { t } = useTranslation('Employee.PaymentMethod')\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n {(mode === 'ADD' || mode === 'SPLIT') && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleCancel}>\n {t('cancelAddCta')}\n </Components.Button>\n )}\n {mode === 'LIST' && bankAccounts.length > 1 && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleSplit}>\n {t('splitCta')}\n </Components.Button>\n )}\n {mode === 'LIST' && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleAdd}>\n {t('addAnotherCta')}\n </Components.Button>\n )}\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t(mode === 'ADD' || mode === 'SPLIT' ? 'saveCta' : 'submitCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","handleAdd","handleCancel","isPending","bankAccounts","handleSplit","mode","usePaymentMethod","t","useTranslation","Components","useComponentContext","ActionsLayout","jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/PaymentMethod/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaymentMethod } from './usePaymentMethod'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { handleAdd, handleCancel, isPending, bankAccounts, handleSplit, mode } = usePaymentMethod()\n const { t } = useTranslation('Employee.PaymentMethod')\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n {(mode === 'ADD' || mode === 'SPLIT') && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleCancel}>\n {t('cancelAddCta')}\n </Components.Button>\n )}\n {mode === 'LIST' && bankAccounts.length > 1 && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleSplit}>\n {t('splitCta')}\n </Components.Button>\n )}\n {mode === 'LIST' && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleAdd}>\n {t('addAnotherCta')}\n </Components.Button>\n )}\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t(mode === 'ADD' || mode === 'SPLIT' ? 'saveCta' : 'submitCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","handleAdd","handleCancel","isPending","bankAccounts","handleSplit","mode","usePaymentMethod","t","useTranslation","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,WAAAC,GAAW,cAAAC,GAAc,WAAAC,GAAW,cAAAC,GAAc,aAAAC,GAAa,MAAAC,EAAA,IAASC,EAAA,GAC1E,EAAE,GAAAC,EAAA,IAAMC,EAAe,wBAAwB,GAC/CC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACG,UAAA;AAAA,KAAAN,MAAS,SAASA,MAAS,YAC3B,gBAAAO,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,MAAK,UAAS,SAASR,GAC3D,UAAAM,EAAE,cAAc,GACnB;AAAA,IAEDF,MAAS,UAAUF,EAAa,SAAS,uBACvCM,EAAW,QAAX,EAAkB,SAAQ,aAAY,MAAK,UAAS,SAASL,GAC3D,UAAAG,EAAE,UAAU,GACf;AAAA,IAEDF,MAAS,UACR,gBAAAO,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,MAAK,UAAS,SAAST,GAC3D,UAAAO,EAAE,eAAe,GACpB;AAAA,IAEF,gBAAAK,EAACH,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWP,GACzC,UAAAK,EAAEF,MAAS,SAASA,MAAS,UAAU,YAAY,WAAW,EAAA,CACjE;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -2,13 +2,12 @@ import { jsxs as i, Fragment as u, jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import { useFormContext as m } from "react-hook-form";
|
|
3
3
|
import { useTranslation as s } from "react-i18next";
|
|
4
4
|
import { usePaymentMethod as c } from "./usePaymentMethod.js";
|
|
5
|
-
import "classnames";
|
|
6
5
|
import { PAYMENT_METHODS as l } from "../../../shared/constants.js";
|
|
7
6
|
import { TextInputField as o } from "../../Common/Fields/TextInputField/TextInputField.js";
|
|
8
7
|
import { RadioGroupField as p } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
|
|
9
|
-
const
|
|
10
|
-
const { mode:
|
|
11
|
-
if (!(
|
|
8
|
+
const h = () => {
|
|
9
|
+
const { mode: a, watchedType: t } = c(), { t: e } = s("Employee.PaymentMethod"), { setValue: n } = m();
|
|
10
|
+
if (!(a !== "ADD" && a !== "INITIAL" || t === l.check))
|
|
12
11
|
return n("hasBankPayload", !0), /* @__PURE__ */ i(u, { children: [
|
|
13
12
|
/* @__PURE__ */ r(
|
|
14
13
|
o,
|
|
@@ -53,6 +52,6 @@ const v = () => {
|
|
|
53
52
|
] });
|
|
54
53
|
};
|
|
55
54
|
export {
|
|
56
|
-
|
|
55
|
+
h as BankAccountForm
|
|
57
56
|
};
|
|
58
57
|
//# sourceMappingURL=BankAccountEdit.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BankAccountEdit.js","sources":["../../../../src/components/Employee/PaymentMethod/BankAccountEdit.tsx"],"sourcesContent":["import { useFormContext } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport type { BankAccountInputs } from './BankAccount'\nimport { usePaymentMethod } from './usePaymentMethod'\nimport { RadioGroupField, TextInputField } from '@/components/Common'\nimport { PAYMENT_METHODS } from '@/shared/constants'\n\nexport const BankAccountForm = () => {\n const { mode, watchedType } = usePaymentMethod()\n const { t } = useTranslation('Employee.PaymentMethod')\n const { setValue } = useFormContext<BankAccountInputs>()\n\n if ((mode !== 'ADD' && mode !== 'INITIAL') || watchedType === PAYMENT_METHODS.check) {\n return\n }\n //Used by form schema to determine variant\n setValue('hasBankPayload', true)\n\n return (\n <>\n <TextInputField\n name=\"name\"\n isRequired\n label={t('nameLabel')}\n errorMessage={t('validations.accountName')}\n />\n\n <TextInputField\n name=\"routingNumber\"\n label={t('routingNumberLabel')}\n isRequired\n description={t('routingNumberDescription')}\n errorMessage={t('validations.routingNumber')}\n />\n\n <TextInputField\n name=\"accountNumber\"\n label={t('accountNumberLabel')}\n errorMessage={t('validations.accountNumber')}\n isRequired\n />\n\n <RadioGroupField\n name=\"accountType\"\n isRequired\n label={t('accountTypeLabel')}\n options={[\n { value: 'Checking', label: t('accountTypeChecking') },\n { value: 'Savings', label: t('accountTypeSavings') },\n ]}\n />\n </>\n )\n}\n"],"names":["BankAccountForm","mode","watchedType","usePaymentMethod","t","useTranslation","setValue","useFormContext","PAYMENT_METHODS","jsxs","Fragment","jsx","TextInputField","RadioGroupField"],"mappings":"
|
|
1
|
+
{"version":3,"file":"BankAccountEdit.js","sources":["../../../../src/components/Employee/PaymentMethod/BankAccountEdit.tsx"],"sourcesContent":["import { useFormContext } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport type { BankAccountInputs } from './BankAccount'\nimport { usePaymentMethod } from './usePaymentMethod'\nimport { RadioGroupField, TextInputField } from '@/components/Common'\nimport { PAYMENT_METHODS } from '@/shared/constants'\n\nexport const BankAccountForm = () => {\n const { mode, watchedType } = usePaymentMethod()\n const { t } = useTranslation('Employee.PaymentMethod')\n const { setValue } = useFormContext<BankAccountInputs>()\n\n if ((mode !== 'ADD' && mode !== 'INITIAL') || watchedType === PAYMENT_METHODS.check) {\n return\n }\n //Used by form schema to determine variant\n setValue('hasBankPayload', true)\n\n return (\n <>\n <TextInputField\n name=\"name\"\n isRequired\n label={t('nameLabel')}\n errorMessage={t('validations.accountName')}\n />\n\n <TextInputField\n name=\"routingNumber\"\n label={t('routingNumberLabel')}\n isRequired\n description={t('routingNumberDescription')}\n errorMessage={t('validations.routingNumber')}\n />\n\n <TextInputField\n name=\"accountNumber\"\n label={t('accountNumberLabel')}\n errorMessage={t('validations.accountNumber')}\n isRequired\n />\n\n <RadioGroupField\n name=\"accountType\"\n isRequired\n label={t('accountTypeLabel')}\n options={[\n { value: 'Checking', label: t('accountTypeChecking') },\n { value: 'Savings', label: t('accountTypeSavings') },\n ]}\n />\n </>\n )\n}\n"],"names":["BankAccountForm","mode","watchedType","usePaymentMethod","t","useTranslation","setValue","useFormContext","PAYMENT_METHODS","jsxs","Fragment","jsx","TextInputField","RadioGroupField"],"mappings":";;;;;;;AAOO,MAAMA,IAAkB,MAAM;AACnC,QAAM,EAAE,MAAAC,GAAM,aAAAC,EAAA,IAAgBC,EAAA,GACxB,EAAE,GAAAC,EAAA,IAAMC,EAAe,wBAAwB,GAC/C,EAAE,UAAAC,EAAA,IAAaC,EAAA;AAErB,MAAK,EAAAN,MAAS,SAASA,MAAS,aAAcC,MAAgBM,EAAgB;AAI9E,WAAAF,EAAS,kBAAkB,EAAI,GAG7B,gBAAAG,EAAAC,GAAA,EACE,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,YAAU;AAAA,UACV,OAAOR,EAAE,WAAW;AAAA,UACpB,cAAcA,EAAE,yBAAyB;AAAA,QAAA;AAAA,MAAA;AAAA,MAG3C,gBAAAO;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,OAAOR,EAAE,oBAAoB;AAAA,UAC7B,YAAU;AAAA,UACV,aAAaA,EAAE,0BAA0B;AAAA,UACzC,cAAcA,EAAE,2BAA2B;AAAA,QAAA;AAAA,MAAA;AAAA,MAG7C,gBAAAO;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,OAAOR,EAAE,oBAAoB;AAAA,UAC7B,cAAcA,EAAE,2BAA2B;AAAA,UAC3C,YAAU;AAAA,QAAA;AAAA,MAAA;AAAA,MAGZ,gBAAAO;AAAA,QAACE;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,YAAU;AAAA,UACV,OAAOT,EAAE,kBAAkB;AAAA,UAC3B,SAAS;AAAA,YACP,EAAE,OAAO,YAAY,OAAOA,EAAE,qBAAqB,EAAA;AAAA,YACnD,EAAE,OAAO,WAAW,OAAOA,EAAE,oBAAoB,EAAA;AAAA,UAAE;AAAA,QACrD;AAAA,MAAA;AAAA,IACF,GACF;AAEJ;"}
|
|
@@ -2,12 +2,11 @@ import { jsx as n } from "react/jsx-runtime";
|
|
|
2
2
|
import { useTranslation as s } from "react-i18next";
|
|
3
3
|
import { usePaymentMethod as p } from "./usePaymentMethod.js";
|
|
4
4
|
import d from "../../../assets/icons/trashcan.svg.js";
|
|
5
|
-
import "
|
|
6
|
-
import f from "../../Common/hooks/useNumberFormatter.js";
|
|
5
|
+
import f from "../../../hooks/useNumberFormatter.js";
|
|
7
6
|
import { HamburgerMenu as y } from "../../Common/HamburgerMenu/HamburgerMenu.js";
|
|
8
7
|
import { useDataView as b } from "../../Common/DataView/useDataView.js";
|
|
9
8
|
import { DataView as k } from "../../Common/DataView/DataView.js";
|
|
10
|
-
function
|
|
9
|
+
function w() {
|
|
11
10
|
const { bankAccounts: r, paymentMethod: o, mode: i, handleDelete: m, isPending: u } = p(), { t } = s("Employee.PaymentMethod"), a = f(o.splitBy === "Amount" ? "currency" : "percent"), { ...l } = b({
|
|
12
11
|
data: r,
|
|
13
12
|
columns: [
|
|
@@ -43,6 +42,6 @@ function B() {
|
|
|
43
42
|
return /* @__PURE__ */ n(k, { label: t("bankAccountsListLabel"), ...l });
|
|
44
43
|
}
|
|
45
44
|
export {
|
|
46
|
-
|
|
45
|
+
w as BankAccountsList
|
|
47
46
|
};
|
|
48
47
|
//# sourceMappingURL=BankAccountsList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BankAccountsList.js","sources":["../../../../src/components/Employee/PaymentMethod/BankAccountsList.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaymentMethod } from './usePaymentMethod'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport { DataView, useDataView } from '@/components/Common'\nimport useNumberFormatter from '@/
|
|
1
|
+
{"version":3,"file":"BankAccountsList.js","sources":["../../../../src/components/Employee/PaymentMethod/BankAccountsList.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaymentMethod } from './usePaymentMethod'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport { DataView, useDataView } from '@/components/Common'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\n\nexport function BankAccountsList() {\n const { bankAccounts, paymentMethod, mode, handleDelete, isPending } = usePaymentMethod()\n const { t } = useTranslation('Employee.PaymentMethod')\n const format = useNumberFormatter(paymentMethod.splitBy === 'Amount' ? 'currency' : 'percent')\n\n const { ...dataViewProps } = useDataView({\n data: bankAccounts,\n columns: [\n { key: 'name', title: t('nicknameColumn') },\n { key: 'routingNumber', title: t('routingNumberColumn') },\n { key: 'accountType', title: t('accountTypeColumn') },\n {\n key: 'splitAmount',\n title: t('allocationColumn'),\n render: bankAccount => {\n return format(\n paymentMethod.splits?.find(split => split.uuid === bankAccount.uuid)?.splitAmount ?? 0,\n )\n },\n },\n ],\n itemMenu: bankAccount => {\n return (\n <HamburgerMenu\n items={[\n {\n label: t('deleteBankAccountCTA'),\n onClick: () => {\n handleDelete(bankAccount.uuid)\n },\n icon: <TrashCanSvg aria-hidden />,\n },\n ]}\n triggerLabel={t('hamburgerTitle')}\n isLoading={isPending}\n />\n )\n },\n })\n\n if (mode !== 'LIST') return\n\n return <DataView label={t('bankAccountsListLabel')} {...dataViewProps} />\n}\n"],"names":["BankAccountsList","bankAccounts","paymentMethod","mode","handleDelete","isPending","usePaymentMethod","useTranslation","format","useNumberFormatter","dataViewProps","useDataView","bankAccount","split","jsx","HamburgerMenu","TrashCanSvg","DataView"],"mappings":";;;;;;;;AAOO,SAASA,IAAmB;AACjC,QAAM,EAAE,cAAAC,GAAc,eAAAC,GAAe,MAAAC,GAAM,cAAAC,GAAc,WAAAC,EAAA,IAAcC,EAAA,GACjE,EAAE,EAAA,IAAMC,EAAe,wBAAwB,GAC/CC,IAASC,EAAmBP,EAAc,YAAY,WAAW,aAAa,SAAS,GAEvF,EAAE,GAAGQ,EAAA,IAAkBC,EAAY;AAAA,IACvC,MAAMV;AAAA,IACN,SAAS;AAAA,MACP,EAAE,KAAK,QAAQ,OAAO,EAAE,gBAAgB,EAAA;AAAA,MACxC,EAAE,KAAK,iBAAiB,OAAO,EAAE,qBAAqB,EAAA;AAAA,MACtD,EAAE,KAAK,eAAe,OAAO,EAAE,mBAAmB,EAAA;AAAA,MAClD;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,kBAAkB;AAAA,QAC3B,QAAQ,CAAAW,MACCJ;AAAA,UACLN,EAAc,QAAQ,KAAK,CAAAW,MAASA,EAAM,SAASD,EAAY,IAAI,GAAG,eAAe;AAAA,QAAA;AAAA,MAEzF;AAAA,IACF;AAAA,IAEF,UAAU,CAAAA,MAEN,gBAAAE;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,OAAO;AAAA,UACL;AAAA,YACE,OAAO,EAAE,sBAAsB;AAAA,YAC/B,SAAS,MAAM;AACb,cAAAX,EAAaQ,EAAY,IAAI;AAAA,YAC/B;AAAA,YACA,MAAM,gBAAAE,EAACE,GAAA,EAAY,eAAW,GAAA,CAAC;AAAA,UAAA;AAAA,QACjC;AAAA,QAEF,cAAc,EAAE,gBAAgB;AAAA,QAChC,WAAWX;AAAA,MAAA;AAAA,IAAA;AAAA,EAGjB,CACD;AAED,MAAIF,MAAS;AAEb,6BAAQc,GAAA,EAAS,OAAO,EAAE,uBAAuB,GAAI,GAAGP,GAAe;AACzE;"}
|
|
@@ -2,6 +2,7 @@ import { BaseComponentInterface, CommonComponentInterface } from '../../Base';
|
|
|
2
2
|
interface PaymentMethodProps extends CommonComponentInterface<'Employee.PaymentMethod'> {
|
|
3
3
|
employeeId: string;
|
|
4
4
|
defaultValues?: never;
|
|
5
|
+
isAdmin?: boolean;
|
|
5
6
|
}
|
|
6
7
|
export declare function PaymentMethod(props: PaymentMethodProps & BaseComponentInterface): import("react/jsx-runtime").JSX.Element;
|
|
7
8
|
export declare const PaymentMethodContextual: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import { zodResolver as
|
|
3
|
-
import { useEmployeePaymentMethodCreateMutation as
|
|
4
|
-
import { useEmployeePaymentMethodDeleteBankAccountMutation as
|
|
5
|
-
import { useEmployeePaymentMethodsGetBankAccountsSuspense as
|
|
6
|
-
import { useEmployeePaymentMethodGetSuspense as
|
|
7
|
-
import { useEmployeePaymentMethodUpdateBankAccountMutation as
|
|
8
|
-
import { useEmployeePaymentMethodUpdateMutation as
|
|
9
|
-
import { useQueryClient as
|
|
10
|
-
import { useState as
|
|
11
|
-
import { useForm as
|
|
12
|
-
import { useTranslation as
|
|
13
|
-
import { CombinedSchema as
|
|
14
|
-
import { BaseComponent as
|
|
15
|
-
import { useBase as
|
|
16
|
-
import { Form as
|
|
17
|
-
import { Actions as
|
|
18
|
-
import { BankAccountForm as
|
|
19
|
-
import { BankAccountsList as
|
|
20
|
-
import { Head as
|
|
21
|
-
import { PaymentTypeForm as
|
|
22
|
-
import { Split as
|
|
23
|
-
import { useI18n as
|
|
24
|
-
import { SPLIT_BY as
|
|
25
|
-
import { useFlow as
|
|
26
|
-
function
|
|
27
|
-
return /* @__PURE__ */ n(
|
|
1
|
+
import { jsx as n, jsxs as x } from "react/jsx-runtime";
|
|
2
|
+
import { zodResolver as H } from "@hookform/resolvers/zod";
|
|
3
|
+
import { useEmployeePaymentMethodCreateMutation as R } from "@gusto/embedded-api/react-query/employeePaymentMethodCreate";
|
|
4
|
+
import { useEmployeePaymentMethodDeleteBankAccountMutation as V } from "@gusto/embedded-api/react-query/employeePaymentMethodDeleteBankAccount";
|
|
5
|
+
import { useEmployeePaymentMethodsGetBankAccountsSuspense as j } from "@gusto/embedded-api/react-query/employeePaymentMethodsGetBankAccounts";
|
|
6
|
+
import { useEmployeePaymentMethodGetSuspense as G } from "@gusto/embedded-api/react-query/employeePaymentMethodGet";
|
|
7
|
+
import { useEmployeePaymentMethodUpdateBankAccountMutation as K } from "@gusto/embedded-api/react-query/employeePaymentMethodUpdateBankAccount";
|
|
8
|
+
import { useEmployeePaymentMethodUpdateMutation as z } from "@gusto/embedded-api/react-query/employeePaymentMethodUpdate";
|
|
9
|
+
import { useQueryClient as Q } from "@tanstack/react-query";
|
|
10
|
+
import { useState as J, useMemo as S, useEffect as v } from "react";
|
|
11
|
+
import { useForm as W, FormProvider as X } from "react-hook-form";
|
|
12
|
+
import { useTranslation as Z } from "react-i18next";
|
|
13
|
+
import { CombinedSchema as $, PaymentMethodProvider as tt } from "./usePaymentMethod.js";
|
|
14
|
+
import { BaseComponent as et } from "../../Base/Base.js";
|
|
15
|
+
import { useBase as ot } from "../../Base/useBase.js";
|
|
16
|
+
import { Form as nt } from "../../Common/Form/Form.js";
|
|
17
|
+
import { Actions as st } from "./Actions.js";
|
|
18
|
+
import { BankAccountForm as it } from "./BankAccountEdit.js";
|
|
19
|
+
import { BankAccountsList as rt } from "./BankAccountsList.js";
|
|
20
|
+
import { Head as mt } from "./Head.js";
|
|
21
|
+
import { PaymentTypeForm as at } from "./PaymentTypeForm.js";
|
|
22
|
+
import { Split as ct } from "./Split.js";
|
|
23
|
+
import { useI18n as ut, useComponentDictionary as pt } from "../../../i18n/I18n.js";
|
|
24
|
+
import { SPLIT_BY as b, componentEvents as y, PAYMENT_METHODS as k } from "../../../shared/constants.js";
|
|
25
|
+
import { useFlow as lt } from "../../Flow/useFlow.js";
|
|
26
|
+
function dt(o) {
|
|
27
|
+
return /* @__PURE__ */ n(et, { ...o, children: /* @__PURE__ */ n(yt, { ...o, children: o.children }) });
|
|
28
28
|
}
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
const { baseSubmitHandler:
|
|
32
|
-
data: { employeePaymentMethod:
|
|
33
|
-
} =
|
|
29
|
+
const yt = ({ employeeId: o, className: h, dictionary: A, isAdmin: f = !1 }) => {
|
|
30
|
+
ut("Employee.PaymentMethod"), pt("Employee.PaymentMethod", A);
|
|
31
|
+
const { baseSubmitHandler: N, onEvent: p } = ot(), L = Q(), {
|
|
32
|
+
data: { employeePaymentMethod: g }
|
|
33
|
+
} = G({ employeeId: o }), t = g, { data: C } = j({
|
|
34
34
|
employeeId: o
|
|
35
|
-
}), l =
|
|
35
|
+
}), l = C.employeeBankAccountList, E = z(), P = V(), D = R(), I = K(), [m, a] = J(l.length < 1 ? "INITIAL" : "LIST");
|
|
36
36
|
m !== "INITIAL" && l.length < 1 && a("INITIAL");
|
|
37
|
-
const
|
|
37
|
+
const B = S(() => ({
|
|
38
38
|
type: "Direct Deposit",
|
|
39
39
|
isSplit: !1,
|
|
40
40
|
hasBankPayload: !1,
|
|
@@ -45,8 +45,8 @@ const dt = ({ employeeId: o, className: h, dictionary: A }) => {
|
|
|
45
45
|
splitBy: void 0,
|
|
46
46
|
splitAmount: {},
|
|
47
47
|
priority: {}
|
|
48
|
-
}), []), c =
|
|
49
|
-
...
|
|
48
|
+
}), []), c = S(() => ({
|
|
49
|
+
...B,
|
|
50
50
|
type: t.type ?? "Direct Deposit",
|
|
51
51
|
splitBy: t.splitBy ?? void 0,
|
|
52
52
|
...t.splits?.reduce(
|
|
@@ -60,16 +60,16 @@ const dt = ({ employeeId: o, className: h, dictionary: A }) => {
|
|
|
60
60
|
(s, e) => e.splitAmount === null ? e.uuid : t.splits?.at(-1)?.uuid ?? s,
|
|
61
61
|
""
|
|
62
62
|
) : void 0
|
|
63
|
-
}), [
|
|
64
|
-
resolver:
|
|
63
|
+
}), [B, t.type, t.splitBy, t.splits]), i = W({
|
|
64
|
+
resolver: H($),
|
|
65
65
|
defaultValues: c
|
|
66
|
-
}),
|
|
67
|
-
|
|
68
|
-
(async () => t.splits?.length === 1 && t.type === "Direct Deposit" && await
|
|
66
|
+
}), _ = i.watch("type"), { reset: d } = i, { mutateAsync: T } = E;
|
|
67
|
+
v(() => {
|
|
68
|
+
(async () => t.splits?.length === 1 && t.type === "Direct Deposit" && await T({
|
|
69
69
|
request: {
|
|
70
70
|
employeeId: o,
|
|
71
71
|
requestBody: {
|
|
72
|
-
splitBy:
|
|
72
|
+
splitBy: b.percentage,
|
|
73
73
|
splits: t.splits.map((s) => ({
|
|
74
74
|
...s,
|
|
75
75
|
splitAmount: 100,
|
|
@@ -80,14 +80,14 @@ const dt = ({ employeeId: o, className: h, dictionary: A }) => {
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
}))();
|
|
83
|
-
}, [o, t,
|
|
83
|
+
}, [o, t, L, T]), v(() => {
|
|
84
84
|
d(c);
|
|
85
85
|
}, [l.length, t, c, d]);
|
|
86
|
-
const
|
|
87
|
-
await
|
|
86
|
+
const w = async (s) => {
|
|
87
|
+
await N(s, async (e) => {
|
|
88
88
|
const { type: r } = e;
|
|
89
89
|
if (r === "Direct Deposit" && e.hasBankPayload && (m === "ADD" || m === "INITIAL")) {
|
|
90
|
-
const u = await
|
|
90
|
+
const u = await D.mutateAsync({
|
|
91
91
|
request: {
|
|
92
92
|
employeeId: o,
|
|
93
93
|
requestBody: {
|
|
@@ -100,72 +100,73 @@ const dt = ({ employeeId: o, className: h, dictionary: A }) => {
|
|
|
100
100
|
});
|
|
101
101
|
p(y.EMPLOYEE_BANK_ACCOUNT_CREATED, u);
|
|
102
102
|
} else {
|
|
103
|
-
const u = r ===
|
|
103
|
+
const u = r === k.check ? { version: t.version } : {
|
|
104
104
|
...t,
|
|
105
105
|
version: t.version,
|
|
106
|
-
splitBy: e.isSplit ? e.splitBy : t.splitBy ??
|
|
107
|
-
splits: e.isSplit && t.splits ? t.splits.map((
|
|
108
|
-
...
|
|
109
|
-
splitAmount: e.splitAmount[
|
|
110
|
-
priority: e.priority[
|
|
106
|
+
splitBy: e.isSplit ? e.splitBy : t.splitBy ?? b.percentage,
|
|
107
|
+
splits: e.isSplit && t.splits ? t.splits.map((M) => ({
|
|
108
|
+
...M,
|
|
109
|
+
splitAmount: e.splitAmount[M.uuid],
|
|
110
|
+
priority: e.priority[M.uuid]
|
|
111
111
|
})) : t.splits ?? []
|
|
112
|
-
},
|
|
112
|
+
}, U = await E.mutateAsync({
|
|
113
113
|
request: { employeeId: o, requestBody: { ...u, type: r } }
|
|
114
114
|
});
|
|
115
|
-
p(y.EMPLOYEE_PAYMENT_METHOD_UPDATED,
|
|
115
|
+
p(y.EMPLOYEE_PAYMENT_METHOD_UPDATED, U);
|
|
116
116
|
}
|
|
117
|
-
i.setValue("isSplit", !1), i.setValue("hasBankPayload", !1), m === "LIST" || r ===
|
|
117
|
+
i.setValue("isSplit", !1), i.setValue("hasBankPayload", !1), m === "LIST" || r === k.check ? p(y.EMPLOYEE_PAYMENT_METHOD_DONE) : a("LIST");
|
|
118
118
|
});
|
|
119
|
-
},
|
|
120
|
-
const e = await
|
|
119
|
+
}, O = async (s) => {
|
|
120
|
+
const e = await P.mutateAsync({
|
|
121
121
|
request: { employeeId: o, bankAccountUuid: s }
|
|
122
122
|
});
|
|
123
123
|
p(y.EMPLOYEE_BANK_ACCOUNT_DELETED, e);
|
|
124
|
-
}, O = () => {
|
|
125
|
-
a("ADD"), d(c);
|
|
126
124
|
}, q = () => {
|
|
127
|
-
a("
|
|
125
|
+
a("ADD"), d(c);
|
|
128
126
|
}, F = () => {
|
|
127
|
+
a("LIST"), d(c);
|
|
128
|
+
}, Y = () => {
|
|
129
129
|
a("SPLIT");
|
|
130
130
|
};
|
|
131
131
|
return /* @__PURE__ */ n("section", { className: h, children: /* @__PURE__ */ n(
|
|
132
|
-
|
|
132
|
+
tt,
|
|
133
133
|
{
|
|
134
134
|
value: {
|
|
135
135
|
bankAccounts: l,
|
|
136
|
-
isPending:
|
|
137
|
-
watchedType:
|
|
136
|
+
isPending: P.isPending || E.isPending || D.isPending || I.isPending,
|
|
137
|
+
watchedType: _,
|
|
138
138
|
mode: m,
|
|
139
139
|
paymentMethod: t,
|
|
140
|
-
handleCancel:
|
|
141
|
-
handleAdd:
|
|
142
|
-
handleDelete:
|
|
143
|
-
handleSplit:
|
|
140
|
+
handleCancel: F,
|
|
141
|
+
handleAdd: q,
|
|
142
|
+
handleDelete: O,
|
|
143
|
+
handleSplit: Y,
|
|
144
|
+
isAdmin: f
|
|
144
145
|
},
|
|
145
|
-
children: /* @__PURE__ */ n(
|
|
146
|
-
/* @__PURE__ */ n(rt, {}),
|
|
146
|
+
children: /* @__PURE__ */ n(X, { ...i, children: /* @__PURE__ */ x(nt, { onSubmit: i.handleSubmit(w), children: [
|
|
147
147
|
/* @__PURE__ */ n(mt, {}),
|
|
148
|
-
/* @__PURE__ */ n(it, {}),
|
|
149
|
-
/* @__PURE__ */ n(st, {}),
|
|
150
148
|
/* @__PURE__ */ n(at, {}),
|
|
151
|
-
/* @__PURE__ */ n(
|
|
149
|
+
/* @__PURE__ */ n(rt, {}),
|
|
150
|
+
/* @__PURE__ */ n(it, {}),
|
|
151
|
+
/* @__PURE__ */ n(ct, {}),
|
|
152
|
+
/* @__PURE__ */ n(st, {})
|
|
152
153
|
] }) })
|
|
153
154
|
}
|
|
154
155
|
) });
|
|
155
|
-
},
|
|
156
|
-
const { employeeId: o, onEvent: h } =
|
|
156
|
+
}, xt = () => {
|
|
157
|
+
const { employeeId: o, onEvent: h, isAdmin: A } = lt(), { t: f } = Z("common");
|
|
157
158
|
if (!o)
|
|
158
159
|
throw new Error(
|
|
159
|
-
|
|
160
|
+
f("errors.missingParamsOrContext", {
|
|
160
161
|
component: "PaymentMethod",
|
|
161
162
|
param: "employeeId",
|
|
162
163
|
provider: "FlowProvider"
|
|
163
164
|
})
|
|
164
165
|
);
|
|
165
|
-
return /* @__PURE__ */ n(
|
|
166
|
+
return /* @__PURE__ */ n(dt, { employeeId: o, onEvent: h, isAdmin: A });
|
|
166
167
|
};
|
|
167
168
|
export {
|
|
168
|
-
|
|
169
|
-
|
|
169
|
+
dt as PaymentMethod,
|
|
170
|
+
xt as PaymentMethodContextual
|
|
170
171
|
};
|
|
171
172
|
//# sourceMappingURL=PaymentMethod.js.map
|