@gusto/embedded-react-sdk 0.13.3 → 0.14.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 +26 -0
- package/dist/assets/icons/hamburger.svg.js +5 -5
- package/dist/assets/icons/hamburger.svg.js.map +1 -1
- package/dist/assets/icons/receipt-check.svg.js +10 -0
- package/dist/assets/icons/receipt-check.svg.js.map +1 -0
- package/dist/assets/icons/spinner_large.svg.js +10 -0
- package/dist/assets/icons/spinner_large.svg.js.map +1 -0
- package/dist/components/Common/DataView/DataTable/DataTable.js +29 -28
- package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
- package/dist/components/Common/DocumentViewer/DocumentViewer.d.ts +1 -1
- package/dist/components/Common/DocumentViewer/DocumentViewer.js +9 -9
- package/dist/components/Common/DocumentViewer/DocumentViewer.js.map +1 -1
- package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.d.ts +1 -1
- package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.js.map +1 -1
- package/dist/components/Common/Flex/Flex.js +16 -12
- package/dist/components/Common/Flex/Flex.js.map +1 -1
- package/dist/components/Common/Loading/Loading.d.ts +5 -1
- package/dist/components/Common/Loading/Loading.js +9 -9
- package/dist/components/Common/Loading/Loading.js.map +1 -1
- package/dist/components/Common/Loading/Loading.module.scss.js +1 -1
- package/dist/components/Common/SignatureForm/SignatureForm.js +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +1 -1
- package/dist/components/Common/UI/LoadingSpinner/LoadingSpinner.d.ts +3 -0
- package/dist/components/Common/UI/LoadingSpinner/LoadingSpinner.js +25 -0
- package/dist/components/Common/UI/LoadingSpinner/LoadingSpinner.js.map +1 -0
- package/dist/components/Common/UI/LoadingSpinner/LoadingSpinner.module.scss.js +10 -0
- package/dist/components/Common/UI/LoadingSpinner/LoadingSpinner.module.scss.js.map +1 -0
- package/dist/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes.d.ts +18 -0
- package/dist/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes.js +8 -0
- package/dist/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes.js.map +1 -0
- package/dist/components/Common/UI/LoadingSpinner/index.d.ts +4 -0
- package/dist/components/Common/UI/RadioGroup/RadioGroup.js +33 -31
- package/dist/components/Common/UI/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.d.ts +4 -0
- package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.js.map +1 -1
- package/dist/components/Common/UI/Table/Table.js +22 -13
- package/dist/components/Common/UI/Table/Table.js.map +1 -1
- package/dist/components/Common/UI/Table/Table.module.scss.js +1 -1
- package/dist/components/Common/UI/Table/TableTypes.d.ts +5 -0
- package/dist/components/Common/UI/Table/TableTypes.js +2 -1
- package/dist/components/Common/UI/Table/TableTypes.js.map +1 -1
- package/dist/components/Common/UI/Text/Text.module.scss.js +15 -14
- package/dist/components/Common/UI/Text/Text.module.scss.js.map +1 -1
- package/dist/components/Common/UI/Text/TextTypes.d.ts +2 -2
- package/dist/components/Common/UI/Text/TextTypes.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +6 -7
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +3 -2
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +3 -2
- 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 +13 -14
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -3
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +3 -2
- 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 +10 -11
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -3
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -5
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccount.js +25 -21
- package/dist/components/Company/BankAccount/BankAccount.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +6 -6
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +9 -8
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -3
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +9 -8
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +8 -7
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +5 -4
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +3 -2
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +34 -35
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -3
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentSigner.js +0 -1
- package/dist/components/Company/DocumentSigner/DocumentSigner.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +6 -7
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Actions.js +6 -5
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +12 -13
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +4 -3
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +9 -8
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Actions.js +3 -2
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +7 -6
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Edit.js +5 -4
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +7 -6
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.js +5 -6
- package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +10 -11
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -3
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/Locations.js +21 -17
- package/dist/components/Company/Locations/Locations.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Actions.js +7 -6
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +16 -16
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +6 -7
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -3
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingFlow/OnboardingFlow.js +21 -17
- package/dist/components/Company/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.js +11 -10
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +7 -6
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +2 -3
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +4 -3
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +33 -34
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Actions.js +10 -9
- package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.js +16 -17
- package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Head.js +7 -6
- package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +12 -11
- package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
- package/dist/components/Company/PaySchedule/usePaySchedule.js +6 -5
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxes.js +20 -16
- package/dist/components/Company/StateTaxes/StateTaxes.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +3 -2
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -3
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +3 -2
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +3 -2
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -3
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/Address.js +4 -5
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/Address/Form.js +3 -4
- package/dist/components/Contractor/Address/Form.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +6 -5
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.js +17 -17
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js +25 -21
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +6 -5
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +13 -13
- package/dist/components/Contractor/Profile/useContractorProfile.js +3 -2
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +1 -1
- package/dist/components/Employee/Compensation/Actions.js +1 -1
- package/dist/components/Employee/Compensation/Edit.js +12 -12
- package/dist/components/Employee/Compensation/List.js +23 -22
- 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/ChildSupportForm.d.ts +55 -0
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +222 -0
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js +8 -0
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +42 -0
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +133 -0
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +8 -8
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js +14 -0
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsForm/UNSTABLE_DeductionsForm.d.ts +7 -0
- package/dist/components/Employee/Deductions/DeductionsForm/UNSTABLE_DeductionsForm.js +98 -0
- package/dist/components/Employee/Deductions/DeductionsForm/UNSTABLE_DeductionsForm.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +8 -8
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +7 -6
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +7 -8
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js +3 -2
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +4 -3
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentSigner.js +19 -15
- package/dist/components/Employee/DocumentSigner/DocumentSigner.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +9 -10
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Actions.js +3 -2
- package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.js +4 -3
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Head.js +6 -5
- package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
- package/dist/components/Employee/EmployeeList/List.js +12 -12
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +4 -3
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/Actions.js +7 -6
- package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalForm.js +12 -11
- package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +4 -3
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.js +8 -8
- package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js +24 -20
- package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
- package/dist/components/Employee/PaymentMethod/Actions.js +6 -5
- package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +9 -8
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +8 -8
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +6 -5
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/Actions.js +7 -6
- package/dist/components/Employee/Profile/Actions.js.map +1 -1
- package/dist/components/Employee/Profile/HomeAddress.js +5 -6
- package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +21 -22
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
- package/dist/components/Employee/Profile/Profile.d.ts +1 -0
- package/dist/components/Employee/Profile/Profile.js +22 -22
- package/dist/components/Employee/Profile/Profile.js.map +1 -1
- package/dist/components/Employee/Profile/useProfile.js +4 -3
- package/dist/components/Employee/Profile/useProfile.js.map +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.js +17 -13
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.js.map +1 -1
- package/dist/components/Employee/StateTaxes/Actions.js +8 -7
- package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +4 -3
- package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
- package/dist/components/Employee/Taxes/Actions.js +9 -8
- package/dist/components/Employee/Taxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +13 -12
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +4 -3
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/PayrollBlockerAlerts.d.ts +14 -0
- package/dist/components/Payroll/PayrollBlocker/PayrollBlockerAlerts.js +54 -0
- package/dist/components/Payroll/PayrollBlocker/PayrollBlockerAlerts.js.map +1 -0
- package/dist/components/Payroll/PayrollBlocker/PayrollBlockerList.d.ts +19 -0
- package/dist/components/Payroll/PayrollBlocker/index.d.ts +3 -0
- package/dist/components/Payroll/PayrollBlocker/payrollHelpers.d.ts +27 -0
- package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js +39 -0
- package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js.map +1 -0
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +78 -60
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +4 -2
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +157 -123
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.module.scss.js +8 -0
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.module.scss.js.map +1 -0
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +39 -36
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +65 -66
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +9 -8
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlow.d.ts +2 -0
- package/dist/components/Payroll/PayrollFlow/PayrollFlow.js +26 -0
- package/dist/components/Payroll/PayrollFlow/PayrollFlow.js.map +1 -0
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +25 -0
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js +59 -0
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -0
- package/dist/components/Payroll/PayrollFlow/index.d.ts +3 -0
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.d.ts +7 -0
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +116 -0
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -0
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +3 -2
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/PayrollLanding.d.ts +2 -1
- package/dist/components/Payroll/PayrollLanding/PayrollLanding.js +28 -36
- package/dist/components/Payroll/PayrollLanding/PayrollLanding.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.d.ts +15 -0
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +62 -0
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -0
- package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.d.ts +5 -0
- package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js +93 -0
- package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js.map +1 -0
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +7 -6
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.d.ts +4 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +70 -58
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +4 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +315 -268
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.d.ts +8 -0
- package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js +35 -0
- package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js.map +1 -0
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.d.ts +2 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +224 -0
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -0
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.module.scss.js +28 -0
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.module.scss.js.map +1 -0
- package/dist/components/Payroll/index.d.ts +3 -1
- package/dist/components/Payroll/index.js +8 -6
- package/dist/components/Payroll/index.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +40 -24
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +28 -26
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
- package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.d.ts +5 -0
- package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js +28 -23
- package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js.map +1 -1
- package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
- package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +3 -2
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.d.ts +3 -1
- package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.js +8 -8
- package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.js.map +1 -1
- package/dist/contexts/ThemeProvider/theme.d.ts +1 -0
- package/dist/contexts/ThemeProvider/theme.js +2 -1
- package/dist/contexts/ThemeProvider/theme.js.map +1 -1
- package/dist/hooks/useContainerBreakpoints/useContainerBreakpoints.js.map +1 -1
- package/dist/i18n/I18n.js +1 -1
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Employee.Deductions.json.js +126 -66
- package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +11 -11
- package/dist/i18n/en/Payroll.PayrollOverview.json.js +48 -42
- package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollReceipts.json.js +14 -12
- package/dist/i18n/en/Payroll.PayrollReceipts.json.js.map +1 -1
- package/dist/i18n/en/PayrollBlocker.json.js +24 -0
- package/dist/i18n/en/PayrollBlocker.json.js.map +1 -0
- package/dist/shared/constants.d.ts +13 -5
- package/dist/shared/constants.js +37 -33
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +185 -5
- package/package.json +21 -21
- package/dist/components/Payroll/RunPayrollFlow/RunPayroll.js +0 -117
- package/dist/components/Payroll/RunPayrollFlow/RunPayroll.js.map +0 -1
- package/dist/components/Payroll/RunPayrollFlow/RunPayrollFlow.js +0 -22
- package/dist/components/Payroll/RunPayrollFlow/RunPayrollFlow.js.map +0 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { PayrollBlockersError as s } from "@gusto/embedded-api/models/errors/payrollblockerserror";
|
|
2
|
+
import { UnprocessableEntityErrorObject1 as l } from "@gusto/embedded-api/models/errors/unprocessableentityerrorobject1";
|
|
3
|
+
function t(r) {
|
|
4
|
+
return typeof r == "object" && r !== null && "key" in r && typeof r.key == "string";
|
|
5
|
+
}
|
|
6
|
+
function c(r) {
|
|
7
|
+
return r instanceof s;
|
|
8
|
+
}
|
|
9
|
+
function a(r) {
|
|
10
|
+
return r instanceof l && Array.isArray(r.errors) && r.errors.some((o) => o.category === "payroll_blocker");
|
|
11
|
+
}
|
|
12
|
+
function y(r) {
|
|
13
|
+
return c(r) ? !r.errors || r.errors.length === 0 ? [] : r.errors.map((e) => ({ key: t(e.metadata) ? e.metadata.key : e.errorKey || "unknown", message: e.message })) : a(r) ? r.errors.filter((e) => e.category === "payroll_blocker").map((e) => ({ key: t(e.metadata) ? e.metadata.key : e.errorKey || "unknown", message: e.message })) : [];
|
|
14
|
+
}
|
|
15
|
+
const i = (r) => r instanceof s ? !0 : r instanceof l ? Array.isArray(r.errors) && r.errors.some((o) => o.category === "payroll_blocker") : !1, f = async (r) => {
|
|
16
|
+
try {
|
|
17
|
+
return await r(), { success: !0, blockers: [] };
|
|
18
|
+
} catch (o) {
|
|
19
|
+
if (i(o))
|
|
20
|
+
return { success: !1, blockers: y(o) };
|
|
21
|
+
throw o;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
function b(r) {
|
|
25
|
+
return {
|
|
26
|
+
titleKey: `PayrollBlocker:blockers.${r}.title`,
|
|
27
|
+
descriptionKey: `PayrollBlocker:blockers.${r}.description`,
|
|
28
|
+
helpTextKey: `PayrollBlocker:blockers.${r}.helpText`,
|
|
29
|
+
defaultActionKey: `PayrollBlocker:blockers.${r}.defaultAction`
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
b as getBlockerTranslationKeys,
|
|
34
|
+
c as isPayrollBlockersError,
|
|
35
|
+
a as isUnprocessableEntityWithPayrollBlockers,
|
|
36
|
+
y as parsePayrollBlockersFromError,
|
|
37
|
+
f as payrollSubmitHandler
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=payrollHelpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payrollHelpers.js","sources":["../../../../src/components/Payroll/PayrollBlocker/payrollHelpers.ts"],"sourcesContent":["import { PayrollBlockersError } from '@gusto/embedded-api/models/errors/payrollblockerserror'\nimport { UnprocessableEntityErrorObject1 } from '@gusto/embedded-api/models/errors/unprocessableentityerrorobject1'\n\nfunction hasMetadataKey(metadata: unknown): metadata is { key: string } {\n return (\n typeof metadata === 'object' &&\n metadata !== null &&\n 'key' in metadata &&\n typeof (metadata as { key: unknown }).key === 'string'\n )\n}\n\nexport interface ApiPayrollBlocker {\n key: string\n message?: string\n}\n\nexport function isPayrollBlockersError(error: unknown): error is PayrollBlockersError {\n return error instanceof PayrollBlockersError\n}\n\nexport function isUnprocessableEntityWithPayrollBlockers(\n error: unknown,\n): error is UnprocessableEntityErrorObject1 {\n return (\n error instanceof UnprocessableEntityErrorObject1 &&\n Array.isArray(error.errors) &&\n error.errors.some(err => err.category === 'payroll_blocker')\n )\n}\n\nexport function parsePayrollBlockersFromError(error: unknown): ApiPayrollBlocker[] {\n // Handle PayrollBlockersError (dedicated blocker error type)\n if (isPayrollBlockersError(error)) {\n if (!error.errors || error.errors.length === 0) {\n return []\n }\n\n const blockers = error.errors.map(err => {\n const key = hasMetadataKey(err.metadata) ? err.metadata.key : err.errorKey || 'unknown'\n\n return { key, message: err.message }\n })\n\n return blockers\n }\n\n // Handle UnprocessableEntityErrorObject1 with payroll blockers\n if (isUnprocessableEntityWithPayrollBlockers(error)) {\n const blockers = error.errors\n .filter(err => err.category === 'payroll_blocker')\n .map(err => {\n const key = hasMetadataKey(err.metadata) ? err.metadata.key : err.errorKey || 'unknown'\n\n return { key, message: err.message }\n })\n\n return blockers\n }\n\n return []\n}\n\ntype PayrollBlockerError = PayrollBlockersError | UnprocessableEntityErrorObject1\n\nconst hasPayrollBlockers = (error: unknown): error is PayrollBlockerError => {\n if (error instanceof PayrollBlockersError) {\n return true\n }\n if (error instanceof UnprocessableEntityErrorObject1) {\n return (\n Array.isArray(error.errors) && error.errors.some(err => err.category === 'payroll_blocker')\n )\n }\n return false\n}\n\nexport interface PayrollSubmitResult {\n success: boolean\n blockers: ApiPayrollBlocker[]\n}\n\n/**\n * Direct submit handler for payroll operations that handles payroll blockers\n * Returns blockers if found, otherwise throws the error for caller to handle\n */\nexport const payrollSubmitHandler = async (\n payrollHandler: () => Promise<void>,\n): Promise<PayrollSubmitResult> => {\n try {\n await payrollHandler()\n return { success: true, blockers: [] }\n } catch (error: unknown) {\n if (hasPayrollBlockers(error)) {\n const blockers = parsePayrollBlockersFromError(error)\n return { success: false, blockers }\n }\n\n // For non-payroll errors, re-throw\n throw error\n }\n}\n\n/**\n * Get translation keys for a blocker - use these in components with useTranslation\n */\nexport function getBlockerTranslationKeys(key: string) {\n return {\n titleKey: `PayrollBlocker:blockers.${key}.title`,\n descriptionKey: `PayrollBlocker:blockers.${key}.description`,\n helpTextKey: `PayrollBlocker:blockers.${key}.helpText`,\n defaultActionKey: `PayrollBlocker:blockers.${key}.defaultAction`,\n }\n}\n"],"names":["hasMetadataKey","metadata","isPayrollBlockersError","error","PayrollBlockersError","isUnprocessableEntityWithPayrollBlockers","UnprocessableEntityErrorObject1","err","parsePayrollBlockersFromError","hasPayrollBlockers","payrollSubmitHandler","payrollHandler","getBlockerTranslationKeys","key"],"mappings":";;AAGA,SAASA,EAAeC,GAAgD;AACtE,SACE,OAAOA,KAAa,YACpBA,MAAa,QACb,SAASA,KACT,OAAQA,EAA8B,OAAQ;AAElD;AAOO,SAASC,EAAuBC,GAA+C;AACpF,SAAOA,aAAiBC;AAC1B;AAEO,SAASC,EACdF,GAC0C;AAC1C,SACEA,aAAiBG,KACjB,MAAM,QAAQH,EAAM,MAAM,KAC1BA,EAAM,OAAO,KAAK,CAAAI,MAAOA,EAAI,aAAa,iBAAiB;AAE/D;AAEO,SAASC,EAA8BL,GAAqC;AAEjF,SAAID,EAAuBC,CAAK,IAC1B,CAACA,EAAM,UAAUA,EAAM,OAAO,WAAW,IACpC,CAAA,IAGQA,EAAM,OAAO,IAAI,CAAAI,OAGzB,EAAE,KAFGP,EAAeO,EAAI,QAAQ,IAAIA,EAAI,SAAS,MAAMA,EAAI,YAAY,WAEhE,SAASA,EAAI,QAAA,EAC5B,IAMCF,EAAyCF,CAAK,IAC/BA,EAAM,OACpB,OAAO,CAAAI,MAAOA,EAAI,aAAa,iBAAiB,EAChD,IAAI,CAAAA,OAGI,EAAE,KAFGP,EAAeO,EAAI,QAAQ,IAAIA,EAAI,SAAS,MAAMA,EAAI,YAAY,WAEhE,SAASA,EAAI,QAAA,EAC5B,IAKE,CAAA;AACT;AAIA,MAAME,IAAqB,CAACN,MACtBA,aAAiBC,IACZ,KAELD,aAAiBG,IAEjB,MAAM,QAAQH,EAAM,MAAM,KAAKA,EAAM,OAAO,KAAK,CAAAI,MAAOA,EAAI,aAAa,iBAAiB,IAGvF,IAYIG,IAAuB,OAClCC,MACiC;AACjC,MAAI;AACF,iBAAMA,EAAA,GACC,EAAE,SAAS,IAAM,UAAU,CAAA,EAAC;AAAA,EACrC,SAASR,GAAgB;AACvB,QAAIM,EAAmBN,CAAK;AAE1B,aAAO,EAAE,SAAS,IAAO,UADRK,EAA8BL,CAAK,EAC3B;AAI3B,UAAMA;AAAA,EACR;AACF;AAKO,SAASS,EAA0BC,GAAa;AACrD,SAAO;AAAA,IACL,UAAU,2BAA2BA,CAAG;AAAA,IACxC,gBAAgB,2BAA2BA,CAAG;AAAA,IAC9C,aAAa,2BAA2BA,CAAG;AAAA,IAC3C,kBAAkB,2BAA2BA,CAAG;AAAA,EAAA;AAEpD;"}
|
|
@@ -1,72 +1,90 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useEffect as
|
|
3
|
-
import { useEmployeesListSuspense as
|
|
4
|
-
import { usePayrollsGetSuspense as
|
|
5
|
-
import { usePayrollsCalculateMutation as
|
|
6
|
-
import { PayrollProcessingRequestStatus as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { useState as f, useEffect as E } from "react";
|
|
3
|
+
import { useEmployeesListSuspense as A } from "@gusto/embedded-api/react-query/employeesList";
|
|
4
|
+
import { usePayrollsGetSuspense as D } from "@gusto/embedded-api/react-query/payrollsGet";
|
|
5
|
+
import { usePayrollsCalculateMutation as _ } from "@gusto/embedded-api/react-query/payrollsCalculate";
|
|
6
|
+
import { PayrollProcessingRequestStatus as m } from "@gusto/embedded-api/models/components/payrollprocessingrequest";
|
|
7
|
+
import { useTranslation as b } from "react-i18next";
|
|
8
|
+
import { usePreparedPayrollData as q } from "../usePreparedPayrollData.js";
|
|
9
|
+
import { payrollSubmitHandler as O } from "../PayrollBlocker/payrollHelpers.js";
|
|
10
|
+
import { PayrollConfigurationPresentation as k } from "./PayrollConfigurationPresentation.js";
|
|
11
|
+
import { BaseComponent as B } from "../../Base/Base.js";
|
|
12
|
+
import { componentEvents as c } from "../../../shared/constants.js";
|
|
13
|
+
import { useComponentDictionary as N, useI18n as U } from "../../../i18n/I18n.js";
|
|
14
|
+
import { useBase as Y } from "../../Base/useBase.js";
|
|
15
|
+
const x = (e) => e?.status === m.Calculating, T = (e) => e?.status === m.CalculateSuccess;
|
|
16
|
+
function $(e) {
|
|
17
|
+
return /* @__PURE__ */ u(B, { ...e, children: /* @__PURE__ */ u(F, { ...e, children: e.children }) });
|
|
15
18
|
}
|
|
16
|
-
const
|
|
17
|
-
onEvent:
|
|
18
|
-
companyId:
|
|
19
|
-
payrollId:
|
|
20
|
-
dictionary:
|
|
21
|
-
alerts:
|
|
19
|
+
const F = ({
|
|
20
|
+
onEvent: e,
|
|
21
|
+
companyId: l,
|
|
22
|
+
payrollId: s,
|
|
23
|
+
dictionary: y,
|
|
24
|
+
alerts: P
|
|
22
25
|
}) => {
|
|
23
|
-
|
|
24
|
-
const {
|
|
26
|
+
N("Payroll.PayrollConfiguration", y), U("Payroll.PayrollConfiguration");
|
|
27
|
+
const { t: p } = b("Payroll.PayrollConfiguration"), { baseSubmitHandler: g } = Y(), [o, r] = f(!1), [C, i] = f([]), { data: d } = A({
|
|
28
|
+
companyId: l
|
|
29
|
+
}), { data: t } = D(
|
|
25
30
|
{
|
|
26
|
-
companyId:
|
|
27
|
-
payrollId:
|
|
31
|
+
companyId: l,
|
|
32
|
+
payrollId: s,
|
|
33
|
+
include: ["taxes", "benefits", "deductions"]
|
|
28
34
|
},
|
|
29
|
-
{ refetchInterval: 5e3 }
|
|
30
|
-
), {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
35
|
+
{ refetchInterval: o ? 5e3 : !1 }
|
|
36
|
+
), { mutateAsync: S } = _(), {
|
|
37
|
+
preparedPayroll: n,
|
|
38
|
+
paySchedule: L,
|
|
39
|
+
isLoading: R
|
|
40
|
+
} = q({
|
|
41
|
+
companyId: l,
|
|
42
|
+
payrollId: s
|
|
43
|
+
}), h = async () => {
|
|
44
|
+
i([]), await g({}, async () => {
|
|
45
|
+
const a = await O(async () => {
|
|
46
|
+
await S({
|
|
47
|
+
request: {
|
|
48
|
+
companyId: l,
|
|
49
|
+
payrollId: s
|
|
50
|
+
}
|
|
51
|
+
}), r(!0);
|
|
52
|
+
});
|
|
53
|
+
!a.success && a.blockers.length > 0 && i(a.blockers);
|
|
47
54
|
});
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
return
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
+
}, w = (a) => {
|
|
56
|
+
e(c.RUN_PAYROLL_EMPLOYEE_EDIT, { employeeId: a.uuid });
|
|
57
|
+
};
|
|
58
|
+
return E(() => {
|
|
59
|
+
x(t.payrollShow?.processingRequest) && !o && r(!0), o && T(t.payrollShow?.processingRequest) && (e(c.RUN_PAYROLL_CALCULATED, {
|
|
60
|
+
payrollId: s,
|
|
61
|
+
alert: { type: "success", title: p("alerts.progressSaved") }
|
|
62
|
+
}), i([]), r(!1)), o && t.payrollShow?.processingRequest?.status === m.ProcessingFailed && (e(c.RUN_PAYROLL_PROCESSING_FAILED), r(!1));
|
|
63
|
+
}, [
|
|
64
|
+
t.payrollShow?.processingRequest,
|
|
65
|
+
o,
|
|
66
|
+
e,
|
|
67
|
+
p,
|
|
68
|
+
s,
|
|
69
|
+
t.payrollShow?.calculatedAt
|
|
70
|
+
]), /* @__PURE__ */ u(
|
|
71
|
+
k,
|
|
55
72
|
{
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
73
|
+
onCalculatePayroll: h,
|
|
74
|
+
onEdit: w,
|
|
75
|
+
employeeCompensations: n?.employeeCompensations || [],
|
|
76
|
+
employeeDetails: d.showEmployees || [],
|
|
77
|
+
payPeriod: n?.payPeriod,
|
|
78
|
+
paySchedule: L,
|
|
79
|
+
isOffCycle: n?.offCycle,
|
|
80
|
+
alerts: P,
|
|
81
|
+
isPending: o || R,
|
|
82
|
+
payrollBlockers: C
|
|
65
83
|
}
|
|
66
84
|
);
|
|
67
85
|
};
|
|
68
86
|
export {
|
|
69
|
-
|
|
70
|
-
|
|
87
|
+
$ as PayrollConfiguration,
|
|
88
|
+
F as Root
|
|
71
89
|
};
|
|
72
90
|
//# sourceMappingURL=PayrollConfiguration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PayrollConfiguration.js","sources":["../../../../src/components/Payroll/PayrollConfiguration/PayrollConfiguration.tsx"],"sourcesContent":["import { useEffect, type ReactNode } from 'react'\nimport { useEmployeesListSuspense } from '@gusto/embedded-api/react-query/employeesList'\nimport { usePayrollsGetSuspense } from '@gusto/embedded-api/react-query/payrollsGet'\nimport { usePayrollsCalculateMutation } from '@gusto/embedded-api/react-query/payrollsCalculate'\nimport type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport { PayrollProcessingRequestStatus } from '@gusto/embedded-api/models/components/payrollprocessingrequest'\nimport { usePreparedPayrollData } from '../usePreparedPayrollData'\nimport { PayrollConfigurationPresentation } from './PayrollConfigurationPresentation'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport {
|
|
1
|
+
{"version":3,"file":"PayrollConfiguration.js","sources":["../../../../src/components/Payroll/PayrollConfiguration/PayrollConfiguration.tsx"],"sourcesContent":["import { useEffect, useState, type ReactNode } from 'react'\nimport { useEmployeesListSuspense } from '@gusto/embedded-api/react-query/employeesList'\nimport { usePayrollsGetSuspense } from '@gusto/embedded-api/react-query/payrollsGet'\nimport { usePayrollsCalculateMutation } from '@gusto/embedded-api/react-query/payrollsCalculate'\nimport type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport type { PayrollProcessingRequest } from '@gusto/embedded-api/models/components/payrollprocessingrequest'\nimport { PayrollProcessingRequestStatus } from '@gusto/embedded-api/models/components/payrollprocessingrequest'\nimport { useTranslation } from 'react-i18next'\nimport { usePreparedPayrollData } from '../usePreparedPayrollData'\nimport { payrollSubmitHandler, type ApiPayrollBlocker } from '../PayrollBlocker/payrollHelpers'\nimport { PayrollConfigurationPresentation } from './PayrollConfigurationPresentation'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { useBase } from '@/components/Base'\n\nconst isCalculating = (processingRequest?: PayrollProcessingRequest | null) =>\n processingRequest?.status === PayrollProcessingRequestStatus.Calculating\nconst isCalculated = (processingRequest?: PayrollProcessingRequest | null) =>\n processingRequest?.status === PayrollProcessingRequestStatus.CalculateSuccess\n\ninterface PayrollConfigurationProps extends BaseComponentInterface<'Payroll.PayrollConfiguration'> {\n companyId: string\n payrollId: string\n alerts?: ReactNode\n}\n\nexport function PayrollConfiguration(props: PayrollConfigurationProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nexport const Root = ({\n onEvent,\n companyId,\n payrollId,\n dictionary,\n alerts,\n}: PayrollConfigurationProps) => {\n useComponentDictionary('Payroll.PayrollConfiguration', dictionary)\n useI18n('Payroll.PayrollConfiguration')\n const { t } = useTranslation('Payroll.PayrollConfiguration')\n const { baseSubmitHandler } = useBase()\n\n const [isPolling, setIsPolling] = useState(false)\n const [payrollBlockers, setPayrollBlockers] = useState<ApiPayrollBlocker[]>([])\n const { data: employeeData } = useEmployeesListSuspense({\n companyId,\n })\n\n const { data: payrollData } = usePayrollsGetSuspense(\n {\n companyId,\n payrollId,\n include: ['taxes', 'benefits', 'deductions'],\n },\n { refetchInterval: isPolling ? 5_000 : false },\n )\n\n const { mutateAsync: calculatePayroll } = usePayrollsCalculateMutation()\n\n const {\n preparedPayroll,\n paySchedule,\n isLoading: isPrepareLoading,\n } = usePreparedPayrollData({\n companyId,\n payrollId,\n })\n\n const onCalculatePayroll = async () => {\n // Clear any existing blockers before attempting calculation\n setPayrollBlockers([])\n\n await baseSubmitHandler({}, async () => {\n const result = await payrollSubmitHandler(async () => {\n await calculatePayroll({\n request: {\n companyId,\n payrollId,\n },\n })\n setIsPolling(true)\n })\n\n if (!result.success && result.blockers.length > 0) {\n setPayrollBlockers(result.blockers)\n }\n })\n }\n const onEdit = (employee: Employee) => {\n onEvent(componentEvents.RUN_PAYROLL_EMPLOYEE_EDIT, { employeeId: employee.uuid })\n }\n\n useEffect(() => {\n // Start polling when payroll is calculating and not already polling\n if (isCalculating(payrollData.payrollShow?.processingRequest) && !isPolling) {\n setIsPolling(true)\n }\n // Stop polling and emit event when payroll is calculated successfully\n if (isPolling && isCalculated(payrollData.payrollShow?.processingRequest)) {\n onEvent(componentEvents.RUN_PAYROLL_CALCULATED, {\n payrollId,\n alert: { type: 'success', title: t('alerts.progressSaved') },\n })\n // Clear blockers on successful calculation\n setPayrollBlockers([])\n setIsPolling(false)\n }\n // If we are polling and payroll is in failed state, stop polling, and emit failure event\n if (\n isPolling &&\n payrollData.payrollShow?.processingRequest?.status ===\n PayrollProcessingRequestStatus.ProcessingFailed\n ) {\n onEvent(componentEvents.RUN_PAYROLL_PROCESSING_FAILED)\n setIsPolling(false)\n }\n }, [\n payrollData.payrollShow?.processingRequest,\n isPolling,\n onEvent,\n t,\n payrollId,\n payrollData.payrollShow?.calculatedAt,\n ])\n\n return (\n <PayrollConfigurationPresentation\n onCalculatePayroll={onCalculatePayroll}\n onEdit={onEdit}\n employeeCompensations={preparedPayroll?.employeeCompensations || []}\n employeeDetails={employeeData.showEmployees || []}\n payPeriod={preparedPayroll?.payPeriod}\n paySchedule={paySchedule}\n isOffCycle={preparedPayroll?.offCycle}\n alerts={alerts}\n isPending={isPolling || isPrepareLoading}\n payrollBlockers={payrollBlockers}\n />\n )\n}\n"],"names":["isCalculating","processingRequest","PayrollProcessingRequestStatus","isCalculated","PayrollConfiguration","props","jsx","BaseComponent","Root","onEvent","companyId","payrollId","dictionary","alerts","useComponentDictionary","useI18n","t","useTranslation","baseSubmitHandler","useBase","isPolling","setIsPolling","useState","payrollBlockers","setPayrollBlockers","employeeData","useEmployeesListSuspense","payrollData","usePayrollsGetSuspense","calculatePayroll","usePayrollsCalculateMutation","preparedPayroll","paySchedule","isPrepareLoading","usePreparedPayrollData","onCalculatePayroll","result","payrollSubmitHandler","onEdit","employee","componentEvents","useEffect","PayrollConfigurationPresentation"],"mappings":";;;;;;;;;;;;;;AAiBA,MAAMA,IAAgB,CAACC,MACrBA,GAAmB,WAAWC,EAA+B,aACzDC,IAAe,CAACF,MACpBA,GAAmB,WAAWC,EAA+B;AAQxD,SAASE,EAAqBC,GAA2D;AAC9F,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEO,MAAMG,IAAO,CAAC;AAAA,EACnB,SAAAC;AAAA,EACA,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,QAAAC;AACF,MAAiC;AAC/B,EAAAC,EAAuB,gCAAgCF,CAAU,GACjEG,EAAQ,8BAA8B;AACtC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,8BAA8B,GACrD,EAAE,mBAAAC,EAAA,IAAsBC,EAAA,GAExB,CAACC,GAAWC,CAAY,IAAIC,EAAS,EAAK,GAC1C,CAACC,GAAiBC,CAAkB,IAAIF,EAA8B,CAAA,CAAE,GACxE,EAAE,MAAMG,EAAA,IAAiBC,EAAyB;AAAA,IACtD,WAAAhB;AAAA,EAAA,CACD,GAEK,EAAE,MAAMiB,EAAA,IAAgBC;AAAA,IAC5B;AAAA,MACE,WAAAlB;AAAA,MACA,WAAAC;AAAA,MACA,SAAS,CAAC,SAAS,YAAY,YAAY;AAAA,IAAA;AAAA,IAE7C,EAAE,iBAAiBS,IAAY,MAAQ,GAAA;AAAA,EAAM,GAGzC,EAAE,aAAaS,EAAA,IAAqBC,EAAA,GAEpC;AAAA,IACJ,iBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,WAAWC;AAAA,EAAA,IACTC,EAAuB;AAAA,IACzB,WAAAxB;AAAA,IACA,WAAAC;AAAA,EAAA,CACD,GAEKwB,IAAqB,YAAY;AAErC,IAAAX,EAAmB,CAAA,CAAE,GAErB,MAAMN,EAAkB,CAAA,GAAI,YAAY;AACtC,YAAMkB,IAAS,MAAMC,EAAqB,YAAY;AACpD,cAAMR,EAAiB;AAAA,UACrB,SAAS;AAAA,YACP,WAAAnB;AAAA,YACA,WAAAC;AAAA,UAAA;AAAA,QACF,CACD,GACDU,EAAa,EAAI;AAAA,MACnB,CAAC;AAED,MAAI,CAACe,EAAO,WAAWA,EAAO,SAAS,SAAS,KAC9CZ,EAAmBY,EAAO,QAAQ;AAAA,IAEtC,CAAC;AAAA,EACH,GACME,IAAS,CAACC,MAAuB;AACrC,IAAA9B,EAAQ+B,EAAgB,2BAA2B,EAAE,YAAYD,EAAS,MAAM;AAAA,EAClF;AAEA,SAAAE,EAAU,MAAM;AAEd,IAAIzC,EAAc2B,EAAY,aAAa,iBAAiB,KAAK,CAACP,KAChEC,EAAa,EAAI,GAGfD,KAAajB,EAAawB,EAAY,aAAa,iBAAiB,MACtElB,EAAQ+B,EAAgB,wBAAwB;AAAA,MAC9C,WAAA7B;AAAA,MACA,OAAO,EAAE,MAAM,WAAW,OAAOK,EAAE,sBAAsB,EAAA;AAAA,IAAE,CAC5D,GAEDQ,EAAmB,CAAA,CAAE,GACrBH,EAAa,EAAK,IAIlBD,KACAO,EAAY,aAAa,mBAAmB,WAC1CzB,EAA+B,qBAEjCO,EAAQ+B,EAAgB,6BAA6B,GACrDnB,EAAa,EAAK;AAAA,EAEtB,GAAG;AAAA,IACDM,EAAY,aAAa;AAAA,IACzBP;AAAA,IACAX;AAAA,IACAO;AAAA,IACAL;AAAA,IACAgB,EAAY,aAAa;AAAA,EAAA,CAC1B,GAGC,gBAAArB;AAAA,IAACoC;AAAA,IAAA;AAAA,MACC,oBAAAP;AAAA,MACA,QAAAG;AAAA,MACA,uBAAuBP,GAAiB,yBAAyB,CAAA;AAAA,MACjE,iBAAiBN,EAAa,iBAAiB,CAAA;AAAA,MAC/C,WAAWM,GAAiB;AAAA,MAC5B,aAAAC;AAAA,MACA,YAAYD,GAAiB;AAAA,MAC7B,QAAAlB;AAAA,MACA,WAAWO,KAAaa;AAAA,MACxB,iBAAAV;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -3,16 +3,18 @@ import { EmployeeCompensations } from '@gusto/embedded-api/models/components/pay
|
|
|
3
3
|
import { Employee } from '@gusto/embedded-api/models/components/employee';
|
|
4
4
|
import { PayrollPayPeriodType } from '@gusto/embedded-api/models/components/payrollpayperiodtype';
|
|
5
5
|
import { PayScheduleObject } from '@gusto/embedded-api/models/components/payscheduleobject';
|
|
6
|
+
import { ApiPayrollBlocker } from '../PayrollBlocker/payrollHelpers';
|
|
6
7
|
interface PayrollConfigurationPresentationProps {
|
|
7
8
|
employeeCompensations: EmployeeCompensations[];
|
|
8
9
|
employeeDetails: Employee[];
|
|
9
10
|
payPeriod?: PayrollPayPeriodType;
|
|
10
11
|
paySchedule?: PayScheduleObject;
|
|
11
|
-
onBack: () => void;
|
|
12
12
|
onCalculatePayroll: () => void;
|
|
13
13
|
onEdit: (employee: Employee) => void;
|
|
14
14
|
isOffCycle?: boolean;
|
|
15
15
|
alerts?: ReactNode;
|
|
16
|
+
isPending?: boolean;
|
|
17
|
+
payrollBlockers?: ApiPayrollBlocker[];
|
|
16
18
|
}
|
|
17
|
-
export declare const PayrollConfigurationPresentation: ({ employeeCompensations, employeeDetails, payPeriod, paySchedule,
|
|
19
|
+
export declare const PayrollConfigurationPresentation: ({ employeeCompensations, employeeDetails, payPeriod, paySchedule, onEdit, onCalculatePayroll, isOffCycle, alerts, isPending, payrollBlockers, }: PayrollConfigurationPresentationProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
20
|
export {};
|
|
@@ -1,144 +1,178 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useTranslation as k } from "react-i18next";
|
|
3
|
-
import { useFormatEmployeePayRate as
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import "
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import
|
|
1
|
+
import { jsxs as a, jsx as e, Fragment as I } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as M, Trans as k } from "react-i18next";
|
|
3
|
+
import { useFormatEmployeePayRate as R, getRegularHours as S, getOvertimeHours as j, formatHoursDisplay as C, getTotalPtoHours as G, getAdditionalEarnings as O, getReimbursements as _, calculateGrossPay as z } from "../helpers.js";
|
|
4
|
+
import { PayrollBlockerAlerts as K } from "../PayrollBlocker/PayrollBlockerAlerts.js";
|
|
5
|
+
import V from "./PayrollConfigurationPresentation.module.scss.js";
|
|
6
|
+
import { useI18n as W } from "../../../i18n/I18n.js";
|
|
7
|
+
import { Flex as u, FlexItem as w } from "../../Common/Flex/Flex.js";
|
|
8
|
+
import { Grid as q } from "../../Common/Grid/Grid.js";
|
|
9
|
+
import { useComponentContext as J } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
10
|
+
import { HamburgerMenu as Q } from "../../Common/HamburgerMenu/HamburgerMenu.js";
|
|
11
|
+
import X from "../../../assets/icons/pencil.svg.js";
|
|
12
|
+
import { formatNumberAsCurrency as f, firstLastName as Y } from "../../../helpers/formattedStrings.js";
|
|
12
13
|
import { parseDateStringToLocal as P } from "../../../helpers/dateFormatting.js";
|
|
13
|
-
import { useLocale as
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
import { useLocale as Z } from "../../../contexts/LocaleProvider/useLocale.js";
|
|
15
|
+
import { useLoadingIndicator as $ } from "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
16
|
+
import { DataView as ee } from "../../Common/DataView/DataView.js";
|
|
17
|
+
const te = ({
|
|
18
|
+
payPeriod: s,
|
|
19
|
+
locale: c
|
|
19
20
|
}) => {
|
|
20
|
-
if (
|
|
21
|
-
const
|
|
22
|
-
if (
|
|
23
|
-
const
|
|
21
|
+
if (s?.startDate && s.endDate) {
|
|
22
|
+
const m = P(s.startDate), d = P(s.endDate);
|
|
23
|
+
if (m && d) {
|
|
24
|
+
const p = m.toLocaleDateString(c, {
|
|
24
25
|
month: "long",
|
|
25
26
|
day: "numeric"
|
|
26
|
-
}),
|
|
27
|
+
}), g = d.toLocaleDateString(c, {
|
|
27
28
|
month: "short",
|
|
28
29
|
day: "numeric",
|
|
29
30
|
year: "numeric"
|
|
30
31
|
});
|
|
31
|
-
return
|
|
32
|
+
return { startDate: p, endDate: g };
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
|
-
return
|
|
35
|
-
},
|
|
36
|
-
employeeCompensations:
|
|
37
|
-
employeeDetails:
|
|
38
|
-
payPeriod:
|
|
39
|
-
paySchedule:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
onCalculatePayroll: p,
|
|
35
|
+
return { startDate: "", endDate: "" };
|
|
36
|
+
}, be = ({
|
|
37
|
+
employeeCompensations: s,
|
|
38
|
+
employeeDetails: c,
|
|
39
|
+
payPeriod: m,
|
|
40
|
+
paySchedule: d,
|
|
41
|
+
onEdit: p,
|
|
42
|
+
onCalculatePayroll: g,
|
|
43
43
|
isOffCycle: T = !1,
|
|
44
|
-
alerts:
|
|
44
|
+
alerts: y,
|
|
45
|
+
isPending: b,
|
|
46
|
+
payrollBlockers: D = []
|
|
45
47
|
}) => {
|
|
46
|
-
const { Button:
|
|
47
|
-
|
|
48
|
-
const { t: n } =
|
|
49
|
-
const
|
|
50
|
-
return
|
|
48
|
+
const { Button: x, Heading: h, Text: o, Badge: N, LoadingSpinner: L } = J();
|
|
49
|
+
W("Payroll.PayrollConfiguration");
|
|
50
|
+
const { t: n } = M("Payroll.PayrollConfiguration"), { locale: H } = Z(), { LoadingIndicator: U } = $(), A = R(), i = new Map(c.map((t) => [t.uuid, t])), E = (t) => {
|
|
51
|
+
const r = i.get(t);
|
|
52
|
+
return r ? Y({ first_name: r.firstName, last_name: r.lastName }) : null;
|
|
51
53
|
};
|
|
52
|
-
return /* @__PURE__ */
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
f && /* @__PURE__ */ r(G, { gap: 16, gridTemplateColumns: "1fr", children: f }),
|
|
59
|
-
/* @__PURE__ */ r(C, { as: "h3", children: n("hoursAndEarningsTitle") }),
|
|
60
|
-
/* @__PURE__ */ r(o, { children: n("hoursAndEarningsDescription") }),
|
|
61
|
-
/* @__PURE__ */ r(
|
|
62
|
-
z,
|
|
63
|
-
{
|
|
64
|
-
label: n("employeeCompensationsTitle"),
|
|
65
|
-
columns: [
|
|
66
|
-
{
|
|
67
|
-
title: /* @__PURE__ */ r(o, { weight: "semibold", children: n("tableColumns.employees") }),
|
|
68
|
-
render: (e) => {
|
|
69
|
-
const t = a.get(e.employeeUuid || ""), l = N(t);
|
|
70
|
-
return /* @__PURE__ */ g(h, { flexDirection: "column", gap: 8, children: [
|
|
71
|
-
/* @__PURE__ */ r(o, { weight: "semibold", children: H(e.employeeUuid || "") }),
|
|
72
|
-
l && /* @__PURE__ */ r(o, { variant: "supporting", children: l }),
|
|
73
|
-
e.excluded && /* @__PURE__ */ r(w, { status: "warning", children: n("skippedBadge") })
|
|
74
|
-
] });
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
title: /* @__PURE__ */ r(o, { weight: "semibold", children: n("tableColumns.hours") }),
|
|
79
|
-
render: (e) => {
|
|
80
|
-
const t = L(e), l = M(e);
|
|
81
|
-
return /* @__PURE__ */ r(o, { children: D(t + l) });
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
title: /* @__PURE__ */ r(o, { weight: "semibold", children: n("tableColumns.timeOff") }),
|
|
86
|
-
render: (e) => {
|
|
87
|
-
const t = v(e);
|
|
88
|
-
return /* @__PURE__ */ r(o, { children: D(t) });
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
title: /* @__PURE__ */ r(o, { weight: "semibold", children: n("tableColumns.additionalEarnings") }),
|
|
93
|
-
render: (e) => {
|
|
94
|
-
const t = R(e);
|
|
95
|
-
return /* @__PURE__ */ r(o, { children: y(t) });
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
title: /* @__PURE__ */ r(o, { weight: "semibold", children: n("tableColumns.reimbursements") }),
|
|
100
|
-
render: (e) => {
|
|
101
|
-
const t = F(e);
|
|
102
|
-
return /* @__PURE__ */ r(o, { children: y(t) });
|
|
103
|
-
}
|
|
104
|
-
},
|
|
54
|
+
return /* @__PURE__ */ a(u, { flexDirection: "column", gap: 16, children: [
|
|
55
|
+
/* @__PURE__ */ a(u, { justifyContent: "space-between", alignItems: "center", children: [
|
|
56
|
+
/* @__PURE__ */ a(w, { children: [
|
|
57
|
+
/* @__PURE__ */ e(h, { as: "h1", children: n("pageTitle") }),
|
|
58
|
+
/* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(
|
|
59
|
+
k,
|
|
105
60
|
{
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}
|
|
61
|
+
i18nKey: "description",
|
|
62
|
+
t: n,
|
|
63
|
+
components: { dateWrapper: /* @__PURE__ */ e(o, { weight: "bold", as: "span" }) },
|
|
64
|
+
values: te({ payPeriod: m, locale: H })
|
|
111
65
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
66
|
+
) })
|
|
67
|
+
] }),
|
|
68
|
+
/* @__PURE__ */ e(
|
|
69
|
+
x,
|
|
70
|
+
{
|
|
71
|
+
title: n("calculatePayrollTitle"),
|
|
72
|
+
onClick: g,
|
|
73
|
+
isDisabled: b,
|
|
74
|
+
children: n("calculatePayroll")
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
] }),
|
|
78
|
+
y && /* @__PURE__ */ e(q, { gap: 16, gridTemplateColumns: "1fr", children: y }),
|
|
79
|
+
b ? /* @__PURE__ */ e(U, { children: /* @__PURE__ */ a(u, { flexDirection: "column", alignItems: "center", gap: 4, children: [
|
|
80
|
+
/* @__PURE__ */ e(L, { size: "lg" }),
|
|
81
|
+
/* @__PURE__ */ e(h, { as: "h4", children: n("loadingTitle") }),
|
|
82
|
+
/* @__PURE__ */ e(o, { children: n("loadingDescription") })
|
|
83
|
+
] }) }) : /* @__PURE__ */ a(I, { children: [
|
|
84
|
+
/* @__PURE__ */ e("div", { className: V.payrollBlockerContainer, children: D.length > 0 && /* @__PURE__ */ e(K, { blockers: D }) }),
|
|
85
|
+
/* @__PURE__ */ a(w, { children: [
|
|
86
|
+
/* @__PURE__ */ e(h, { as: "h3", children: n("hoursAndEarningsTitle") }),
|
|
87
|
+
/* @__PURE__ */ e(o, { children: n("hoursAndEarningsDescription") })
|
|
88
|
+
] }),
|
|
89
|
+
/* @__PURE__ */ e(
|
|
90
|
+
ee,
|
|
91
|
+
{
|
|
92
|
+
label: n("employeeCompensationsTitle"),
|
|
93
|
+
columns: [
|
|
94
|
+
{
|
|
95
|
+
title: /* @__PURE__ */ e(o, { weight: "semibold", children: n("tableColumns.employees") }),
|
|
96
|
+
render: (t) => {
|
|
97
|
+
const r = i.get(t.employeeUuid || ""), l = A(r);
|
|
98
|
+
return /* @__PURE__ */ a(u, { flexDirection: "column", gap: 8, children: [
|
|
99
|
+
/* @__PURE__ */ e(o, { weight: "semibold", children: E(t.employeeUuid || "") }),
|
|
100
|
+
l && /* @__PURE__ */ e(o, { variant: "supporting", children: l }),
|
|
101
|
+
t.excluded && /* @__PURE__ */ e(N, { status: "warning", children: n("skippedBadge") })
|
|
102
|
+
] });
|
|
131
103
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
title: /* @__PURE__ */ e(o, { weight: "semibold", children: n("tableColumns.hours") }),
|
|
107
|
+
render: (t) => {
|
|
108
|
+
const r = S(t), l = j(t);
|
|
109
|
+
return /* @__PURE__ */ e(o, { children: C(r + l) });
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
title: /* @__PURE__ */ e(o, { weight: "semibold", children: n("tableColumns.timeOff") }),
|
|
114
|
+
render: (t) => {
|
|
115
|
+
const r = G(t);
|
|
116
|
+
return /* @__PURE__ */ e(o, { children: C(r) });
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
title: /* @__PURE__ */ e(o, { weight: "semibold", children: n("tableColumns.additionalEarnings") }),
|
|
121
|
+
render: (t) => {
|
|
122
|
+
const r = O(t);
|
|
123
|
+
return /* @__PURE__ */ e(o, { children: f(r) });
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
title: /* @__PURE__ */ e(o, { weight: "semibold", children: n("tableColumns.reimbursements") }),
|
|
128
|
+
render: (t) => {
|
|
129
|
+
const r = _(t);
|
|
130
|
+
return /* @__PURE__ */ e(o, { children: f(r) });
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
title: /* @__PURE__ */ e(o, { weight: "semibold", children: n("tableColumns.totalPay") }),
|
|
135
|
+
render: (t) => {
|
|
136
|
+
const r = i.get(t.employeeUuid || ""), l = r ? z(
|
|
137
|
+
t,
|
|
138
|
+
r,
|
|
139
|
+
m?.startDate,
|
|
140
|
+
d,
|
|
141
|
+
T
|
|
142
|
+
) : 0;
|
|
143
|
+
return /* @__PURE__ */ e(o, { children: f(l) });
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
],
|
|
147
|
+
data: s.filter((t) => {
|
|
148
|
+
const r = t.employeeUuid;
|
|
149
|
+
return r ? i.has(r) : !1;
|
|
150
|
+
}).sort((t, r) => {
|
|
151
|
+
const l = i.get(t.employeeUuid || ""), v = i.get(r.employeeUuid || ""), B = l?.lastName || "", F = v?.lastName || "";
|
|
152
|
+
return B.localeCompare(F);
|
|
153
|
+
}),
|
|
154
|
+
itemMenu: (t) => /* @__PURE__ */ e(
|
|
155
|
+
Q,
|
|
156
|
+
{
|
|
157
|
+
items: [
|
|
158
|
+
{
|
|
159
|
+
label: n("editMenu.edit"),
|
|
160
|
+
icon: /* @__PURE__ */ e(X, { "aria-hidden": !0 }),
|
|
161
|
+
onClick: () => {
|
|
162
|
+
const r = i.get(t.employeeUuid || "");
|
|
163
|
+
r && p(r);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
],
|
|
167
|
+
triggerLabel: n("editMenu.edit")
|
|
168
|
+
}
|
|
169
|
+
)
|
|
170
|
+
}
|
|
171
|
+
)
|
|
172
|
+
] })
|
|
139
173
|
] });
|
|
140
174
|
};
|
|
141
175
|
export {
|
|
142
|
-
|
|
176
|
+
be as PayrollConfigurationPresentation
|
|
143
177
|
};
|
|
144
178
|
//# sourceMappingURL=PayrollConfigurationPresentation.js.map
|