@gusto/embedded-react-sdk 0.44.2 → 0.46.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 +64 -0
- package/dist/components/Common/DetailViewLayout/DetailViewLayout.js +7 -7
- package/dist/components/Common/DetailViewLayout/DetailViewLayout.js.map +1 -1
- package/dist/components/Common/UI/Alert/Alert.js +24 -23
- package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
- package/dist/components/Common/UI/Alert/Alert.module.scss.js +16 -14
- package/dist/components/Common/UI/Alert/Alert.module.scss.js.map +1 -1
- package/dist/components/Common/UI/Alert/AlertTypes.d.ts +8 -0
- package/dist/components/Common/UI/Alert/AlertTypes.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +38 -38
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/Head.js +12 -9
- package/dist/components/Company/AssignSignatory/Head.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +25 -25
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Head.js +11 -8
- package/dist/components/Company/BankAccount/BankAccountForm/Head.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Head.js +44 -39
- package/dist/components/Company/BankAccount/BankAccountList/Head.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +26 -26
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.js +4 -4
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +9 -9
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Head.js +7 -6
- package/dist/components/Company/FederalTaxes/Head.js.map +1 -1
- package/dist/components/Company/Industry/Head.js +10 -9
- package/dist/components/Company/Industry/Head.js.map +1 -1
- package/dist/components/Company/Industry/IndustrySelect.js +22 -19
- package/dist/components/Company/Industry/IndustrySelect.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Head.js +9 -8
- package/dist/components/Company/Locations/LocationForm/Head.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Head.js +11 -10
- package/dist/components/Company/Locations/LocationsList/Head.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +11 -11
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleList.js +18 -18
- package/dist/components/Company/PaySchedule/PayScheduleList.js.map +1 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js +5 -5
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +7 -7
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +2 -2
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- package/dist/components/Employee/Compensation/index.d.ts +1 -1
- package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.d.ts +11 -0
- package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.js +230 -0
- package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.js.map +1 -0
- package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.module.scss.js +8 -0
- package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.module.scss.js.map +1 -0
- package/dist/components/Employee/Compensation/management/EditCompensation/index.d.ts +3 -0
- package/dist/components/Employee/Compensation/management/index.d.ts +3 -0
- package/dist/components/Employee/Compensation/{Compensation.d.ts → onboarding/Compensation.d.ts} +3 -3
- package/dist/components/Employee/Compensation/onboarding/Compensation.js +88 -0
- package/dist/components/Employee/Compensation/onboarding/Compensation.js.map +1 -0
- package/dist/components/Employee/Compensation/{CompensationFlowComponents.d.ts → onboarding/CompensationFlowComponents.d.ts} +3 -3
- package/dist/components/Employee/Compensation/onboarding/CompensationFlowComponents.js +59 -0
- package/dist/components/Employee/Compensation/onboarding/CompensationFlowComponents.js.map +1 -0
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.d.ts +21 -0
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js +249 -0
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js.map +1 -0
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.module.scss.js +8 -0
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.module.scss.js.map +1 -0
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/index.d.ts +3 -0
- package/dist/components/Employee/Compensation/{JobsList → onboarding/JobsList}/JobsList.d.ts +1 -1
- package/dist/components/Employee/Compensation/onboarding/JobsList/JobsList.js +43 -0
- package/dist/components/Employee/Compensation/onboarding/JobsList/JobsList.js.map +1 -0
- package/dist/components/Employee/Compensation/{JobsList → onboarding/JobsList}/JobsListPresentation.js +10 -10
- package/dist/components/Employee/Compensation/onboarding/JobsList/JobsListPresentation.js.map +1 -0
- package/dist/components/Employee/Compensation/{compensationStateMachine.js → onboarding/compensationStateMachine.js} +1 -1
- package/dist/components/Employee/Compensation/onboarding/compensationStateMachine.js.map +1 -0
- package/dist/components/Employee/Compensation/onboarding/index.d.ts +2 -0
- package/dist/components/Employee/Compensation/shared/derivePrimaryFlsaStatus.d.ts +9 -0
- package/dist/components/Employee/Compensation/shared/derivePrimaryFlsaStatus.js +10 -0
- package/dist/components/Employee/Compensation/shared/derivePrimaryFlsaStatus.js.map +1 -0
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.d.ts +7 -0
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js +41 -35
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js +4 -4
- package/dist/components/Employee/Compensation/shared/useCompensationForm/index.d.ts +0 -2
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.d.ts +24 -3
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js +203 -188
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useJobForm/fields.js +6 -6
- package/dist/components/Employee/Compensation/shared/useJobForm/index.d.ts +0 -2
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.d.ts +16 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js +21 -15
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.d.ts +30 -3
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js +138 -130
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js.map +1 -1
- package/dist/components/Employee/Dashboard/BasicDetailsView.d.ts +19 -1
- package/dist/components/Employee/Dashboard/BasicDetailsView.js +93 -47
- package/dist/components/Employee/Dashboard/BasicDetailsView.js.map +1 -1
- package/dist/components/Employee/Dashboard/CompensationCard.d.ts +13 -0
- package/dist/components/Employee/Dashboard/Dashboard.d.ts +2 -0
- package/dist/components/Employee/Dashboard/Dashboard.js +95 -109
- package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
- package/dist/components/Employee/Dashboard/DashboardComponents.d.ts +19 -0
- package/dist/components/Employee/Dashboard/DashboardComponents.js +137 -25
- package/dist/components/Employee/Dashboard/DashboardComponents.js.map +1 -1
- package/dist/components/Employee/Dashboard/DocumentsView.d.ts +11 -0
- package/dist/components/Employee/Dashboard/DocumentsView.js +34 -20
- package/dist/components/Employee/Dashboard/DocumentsView.js.map +1 -1
- package/dist/components/Employee/Dashboard/JobAndPayView.d.ts +9 -17
- package/dist/components/Employee/Dashboard/JobAndPayView.js +536 -135
- package/dist/components/Employee/Dashboard/JobAndPayView.js.map +1 -1
- package/dist/components/Employee/Dashboard/JobAndPayView.module.scss.js +8 -0
- package/dist/components/Employee/Dashboard/JobAndPayView.module.scss.js.map +1 -0
- package/dist/components/Employee/Dashboard/PendingChangesReviewModal.d.ts +10 -0
- package/dist/components/Employee/Dashboard/PendingChangesReviewModal.js +64 -0
- package/dist/components/Employee/Dashboard/PendingChangesReviewModal.js.map +1 -0
- package/dist/components/Employee/Dashboard/TaxesView.d.ts +19 -1
- package/dist/components/Employee/Dashboard/TaxesView.js +92 -56
- package/dist/components/Employee/Dashboard/TaxesView.js.map +1 -1
- package/dist/components/Employee/Dashboard/dashboardStateMachine.d.ts +7 -0
- package/dist/components/Employee/Dashboard/dashboardStateMachine.js +238 -40
- package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -1
- package/dist/components/Employee/Dashboard/getPendingCompensationChanges.d.ts +50 -0
- package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js +57 -0
- package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js.map +1 -0
- package/dist/components/Employee/Dashboard/getPendingCompensationChanges.test.d.ts +1 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.d.ts +12 -5
- package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js +21 -18
- package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js.map +1 -1
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.d.ts +26 -10
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js +61 -38
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js.map +1 -1
- package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.d.ts +10 -4
- package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.js +10 -12
- package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.js.map +1 -1
- package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.d.ts +10 -3
- package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.js +19 -14
- package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.js.map +1 -1
- package/dist/components/Employee/Dashboard/usePendingChangeDetailRenderer.d.ts +8 -0
- package/dist/components/Employee/Dashboard/usePendingChangeDetailRenderer.js +61 -0
- package/dist/components/Employee/Dashboard/usePendingChangeDetailRenderer.js.map +1 -0
- package/dist/components/Employee/Deductions/Deductions.d.ts +2 -8
- package/dist/components/Employee/Deductions/Deductions.js +25 -52
- package/dist/components/Employee/Deductions/Deductions.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportFormView.d.ts +9 -0
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportFormView.js +137 -0
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportFormView.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.d.ts +9 -5
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +97 -94
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.d.ts +18 -0
- package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.js +137 -0
- package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.d.ts +10 -5
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +57 -77
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.d.ts +5 -5
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +29 -39
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js +8 -6
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js.map +1 -1
- package/dist/components/Employee/Deductions/{DeductionsComponents.d.ts → deductionsContextualComponents.d.ts} +7 -8
- package/dist/components/Employee/Deductions/deductionsContextualComponents.js +74 -0
- package/dist/components/Employee/Deductions/deductionsContextualComponents.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/DeleteDeductionDialog.d.ts +7 -0
- package/dist/components/Employee/Deductions/shared/DeleteDeductionDialog.js +31 -0
- package/dist/components/Employee/Deductions/shared/DeleteDeductionDialog.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/formatDeductionAmount.d.ts +7 -0
- package/dist/components/Employee/Deductions/shared/formatDeductionAmount.js +10 -0
- package/dist/components/Employee/Deductions/shared/formatDeductionAmount.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/formatDeductionAmount.test.d.ts +1 -0
- package/dist/components/Employee/Deductions/shared/index.d.ts +7 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.d.ts +63 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js +64 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.d.ts +36 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js +39 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/index.d.ts +4 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.d.ts +62 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js +208 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.d.ts +63 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.js +52 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.d.ts +25 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js +36 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/index.d.ts +4 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.d.ts +64 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.js +203 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/useDeductionsList.d.ts +22 -0
- package/dist/components/Employee/Deductions/shared/useDeductionsList.js +50 -0
- package/dist/components/Employee/Deductions/shared/useDeductionsList.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/useDeleteDeduction.d.ts +13 -0
- package/dist/components/Employee/Deductions/shared/useDeleteDeduction.js +17 -0
- package/dist/components/Employee/Deductions/shared/useDeleteDeduction.js.map +1 -0
- package/dist/components/Employee/Deductions/stateMachine.d.ts +4 -5
- package/dist/components/Employee/Deductions/stateMachine.js +67 -89
- package/dist/components/Employee/Deductions/stateMachine.js.map +1 -1
- package/dist/components/Employee/Documents/management/DocumentManager.d.ts +6 -0
- package/dist/components/Employee/Documents/management/DocumentManager.js +60 -0
- package/dist/components/Employee/Documents/management/DocumentManager.js.map +1 -0
- package/dist/components/Employee/Documents/management/index.d.ts +3 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/Actions.js +3 -3
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Actions.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/DocumentList.d.ts +1 -1
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/DocumentList.js +5 -5
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/Head.js +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Head.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/List.js +3 -3
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/List.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/useDocumentList.js +6 -6
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentSigner.d.ts +1 -1
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentSigner.js +5 -5
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibility.d.ts +1 -1
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibility.js +4 -4
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibilityPresentation.js +11 -11
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -0
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js.map +1 -0
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.test.d.ts +1 -0
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/countries.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.d.ts +1 -1
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.js +13 -13
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/documentSignerStateMachine.d.ts +2 -2
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/documentSignerStateMachine.js +8 -8
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/documentSignerStateMachine.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/stateMachine.js +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/stateMachine.js.map +1 -0
- package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/EmployeeDocuments.d.ts +3 -3
- package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/EmployeeDocuments.js +6 -6
- package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js.map +1 -0
- package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.js +117 -0
- package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/shared}/SignatureForm/SignatureForm.d.ts +1 -1
- package/dist/components/Employee/{DocumentSigner → Documents/shared}/SignatureForm/SignatureForm.js +14 -14
- package/dist/components/Employee/Documents/shared/SignatureForm/SignatureForm.js.map +1 -0
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/fields.js.map +1 -0
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/signEmployeeFormSchema.js.map +1 -0
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +1 -0
- package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +89 -82
- package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.js +4 -4
- package/dist/components/Employee/HomeAddress/management/HomeAddressView.js +37 -35
- package/dist/components/Employee/HomeAddress/management/HomeAddressView.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.d.ts +1 -0
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js +14 -8
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js +38 -39
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +29 -27
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/index.d.ts +1 -1
- package/dist/components/Employee/PaymentMethod/management/ListView.d.ts +8 -0
- package/dist/components/Employee/PaymentMethod/management/ListView.js +138 -0
- package/dist/components/Employee/PaymentMethod/management/ListView.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/management/PaymentMethod.d.ts +11 -0
- package/dist/components/Employee/PaymentMethod/management/PaymentMethod.js +49 -0
- package/dist/components/Employee/PaymentMethod/management/PaymentMethod.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/management/PaymentMethodComponents.d.ts +8 -0
- package/dist/components/Employee/PaymentMethod/management/PaymentMethodComponents.js +23 -0
- package/dist/components/Employee/PaymentMethod/management/PaymentMethodComponents.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/management/index.d.ts +4 -0
- package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.d.ts +5 -0
- package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.js +75 -0
- package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/onboarding/BankForm.d.ts +8 -0
- package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js +66 -0
- package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/onboarding/ListView.d.ts +9 -0
- package/dist/components/Employee/PaymentMethod/onboarding/ListView.js +168 -0
- package/dist/components/Employee/PaymentMethod/onboarding/ListView.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.d.ts +11 -0
- package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.js +44 -0
- package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethodComponents.d.ts +8 -0
- package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethodComponents.js +23 -0
- package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethodComponents.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/onboarding/SplitView.d.ts +8 -0
- package/dist/components/Employee/PaymentMethod/onboarding/SplitView.js +97 -0
- package/dist/components/Employee/PaymentMethod/onboarding/SplitView.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/onboarding/index.d.ts +2 -0
- package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.d.ts +5 -0
- package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.js +75 -0
- package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/DeleteBankAccountDialog.d.ts +9 -0
- package/dist/components/Employee/PaymentMethod/shared/DeleteBankAccountDialog.js +31 -0
- package/dist/components/Employee/PaymentMethod/shared/DeleteBankAccountDialog.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/index.d.ts +7 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.d.ts +15 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js +22 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/index.d.ts +5 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.d.ts +37 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.js +105 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.d.ts +39 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.js +26 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/useDeleteBankAccount.d.ts +13 -0
- package/dist/components/Employee/PaymentMethod/shared/useDeleteBankAccount.js +19 -0
- package/dist/components/Employee/PaymentMethod/shared/useDeleteBankAccount.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/fields.d.ts +6 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/fields.js +9 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/fields.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/index.d.ts +5 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.d.ts +31 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.js +94 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodFormSchema.d.ts +31 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodFormSchema.js +22 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodFormSchema.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.d.ts +20 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.js +68 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/fields.d.ts +6 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/fields.js +9 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/fields.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/index.d.ts +6 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.d.ts +48 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js +46 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.d.ts +65 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.js +209 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsFormSchema.d.ts +53 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsFormSchema.js +93 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsFormSchema.js.map +1 -0
- package/dist/components/Employee/Profile/onboarding/AdminProfile.js +88 -87
- package/dist/components/Employee/Profile/onboarding/AdminProfile.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.js +8 -8
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js +5 -5
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.js +4 -4
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js +2 -2
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -1
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js +8 -8
- package/dist/components/Employee/Taxes/FederalForm.js +27 -26
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalHead.js +13 -10
- package/dist/components/Employee/Taxes/FederalHead.js.map +1 -1
- package/dist/components/Employee/Taxes/StateForm.js +17 -14
- package/dist/components/Employee/Taxes/StateForm.js.map +1 -1
- package/dist/components/Employee/Taxes/Taxes.js +75 -69
- package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddressView.js +26 -26
- package/dist/components/Employee/WorkAddress/management/WorkAddressView.js.map +1 -1
- package/dist/components/Employee/exports/employeeManagement.d.ts +4 -1
- package/dist/components/Employee/exports/employeeManagement.js +22 -18
- package/dist/components/Employee/exports/employeeManagement.js.map +1 -1
- package/dist/components/Employee/exports/employeeOnboarding.d.ts +3 -3
- package/dist/components/Employee/exports/employeeOnboarding.js +4 -4
- package/dist/components/Employee/index.d.ts +4 -4
- package/dist/components/Employee/index.js +5 -5
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +35 -35
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js +84 -82
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js.map +1 -1
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.d.ts +1 -1
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js +49 -48
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js.map +1 -1
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailTypes.d.ts +1 -0
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js +39 -37
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +1 -1
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js +31 -31
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js.map +1 -1
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormTypes.d.ts +1 -0
- package/dist/components/TimeOff/PolicyList/PolicyList.js +27 -27
- package/dist/components/TimeOff/PolicyList/PolicyList.js.map +1 -1
- package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js +50 -50
- package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js.map +1 -1
- package/dist/components/TimeOff/PolicySettings/PolicySettings.d.ts +1 -0
- package/dist/components/TimeOff/PolicySettings/PolicySettings.js +66 -41
- package/dist/components/TimeOff/PolicySettings/PolicySettings.js.map +1 -1
- package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.d.ts +1 -1
- package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js +78 -55
- package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js.map +1 -1
- package/dist/components/TimeOff/PolicySettings/PolicySettingsTypes.d.ts +3 -0
- package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js +34 -33
- package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js.map +1 -1
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.d.ts +3 -0
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js +69 -61
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
- package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js +119 -75
- package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +72 -61
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.d.ts +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +103 -84
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormTypes.d.ts +2 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js +51 -49
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.d.ts +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js +78 -59
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.module.scss.js +8 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.module.scss.js.map +1 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentationTypes.d.ts +6 -2
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js +209 -154
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js.map +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.d.ts +3 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js +36 -34
- package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js.map +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js +136 -134
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js.map +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.module.scss.js +6 -6
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.d.ts +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js +63 -65
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js.map +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailTypes.d.ts +1 -0
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js +50 -49
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js.map +1 -1
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.module.scss.js +4 -4
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.d.ts +1 -1
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js +66 -55
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js.map +1 -1
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayoutTypes.d.ts +1 -0
- package/dist/contexts/ApiProvider/ApiProvider.js +33 -39
- package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
- package/dist/contexts/ApiProvider/createSdkQueryClient.d.ts +17 -0
- package/dist/contexts/ApiProvider/createSdkQueryClient.js +14 -0
- package/dist/contexts/ApiProvider/createSdkQueryClient.js.map +1 -0
- package/dist/helpers/formattedStrings.d.ts +12 -0
- package/dist/helpers/formattedStrings.js +55 -33
- package/dist/helpers/formattedStrings.js.map +1 -1
- package/dist/hooks/useClientPagination/useClientPagination.d.ts +44 -0
- package/dist/hooks/useClientPagination/useClientPagination.js +69 -0
- package/dist/hooks/useClientPagination/useClientPagination.js.map +1 -0
- package/dist/hooks/useClientPagination/useClientPagination.test.d.ts +1 -0
- package/dist/i18n/I18n.js +6 -5
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Company.PaySchedule.json.js +22 -20
- package/dist/i18n/en/Company.PaySchedule.json.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js +8 -6
- package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js +9 -9
- package/dist/i18n/en/Company.TimeOff.PolicyDetail.json.js +6 -4
- package/dist/i18n/en/Company.TimeOff.PolicyDetail.json.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js +17 -15
- package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js +10 -8
- package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js.map +1 -1
- package/dist/i18n/en/Employee.Compensation.json.js +48 -44
- package/dist/i18n/en/Employee.Compensation.json.js.map +1 -1
- package/dist/i18n/en/Employee.Dashboard.json.js +16 -12
- package/dist/i18n/en/Employee.Dashboard.json.js.map +1 -1
- package/dist/i18n/en/Employee.Deductions.json.js +104 -76
- package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
- package/dist/i18n/en/Employee.DocumentManager.json.js +12 -0
- package/dist/i18n/en/Employee.DocumentManager.json.js.map +1 -0
- package/dist/i18n/en/Employee.PaymentMethod.json.js +76 -64
- package/dist/i18n/en/Employee.PaymentMethod.json.js.map +1 -1
- package/dist/i18n/en/common.json.d.ts +14 -0
- package/dist/i18n/en/common.json.js +19 -17
- package/dist/i18n/en/common.json.js.map +1 -1
- package/dist/index.d.ts +16 -6
- package/dist/index.js +138 -112
- package/dist/index.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.d.ts +2 -1
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.js +20 -18
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.js.map +1 -1
- package/dist/shared/constants.d.ts +10 -2
- package/dist/shared/constants.js +30 -26
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/test-utils/assertions.d.ts +16 -0
- package/dist/types/i18next.d.ts +161 -5
- package/dist/types/sdkError.js +58 -47
- package/dist/types/sdkError.js.map +1 -1
- package/docs/reference/endpoint-inventory.json +980 -1170
- package/package.json +29 -21
- package/dist/components/Employee/Compensation/Compensation.js +0 -87
- package/dist/components/Employee/Compensation/Compensation.js.map +0 -1
- package/dist/components/Employee/Compensation/CompensationFlowComponents.js +0 -61
- package/dist/components/Employee/Compensation/CompensationFlowComponents.js.map +0 -1
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.d.ts +0 -14
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.js +0 -128
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.js.map +0 -1
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.d.ts +0 -17
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.js +0 -224
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.js.map +0 -1
- package/dist/components/Employee/Compensation/EditCompensation/index.d.ts +0 -5
- package/dist/components/Employee/Compensation/JobsList/JobsList.js +0 -47
- package/dist/components/Employee/Compensation/JobsList/JobsList.js.map +0 -1
- package/dist/components/Employee/Compensation/JobsList/JobsListPresentation.js.map +0 -1
- package/dist/components/Employee/Compensation/compensationSchema.d.ts +0 -29
- package/dist/components/Employee/Compensation/compensationSchema.js +0 -63
- package/dist/components/Employee/Compensation/compensationSchema.js.map +0 -1
- package/dist/components/Employee/Compensation/compensationStateMachine.js.map +0 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.d.ts +0 -15
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.js +0 -27
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.js.map +0 -1
- package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.d.ts +0 -13
- package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.js +0 -26
- package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.js.map +0 -1
- package/dist/components/Employee/Deductions/Actions.d.ts +0 -1
- package/dist/components/Employee/Deductions/DeductionsComponents.js +0 -31
- package/dist/components/Employee/Deductions/DeductionsComponents.js.map +0 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.d.ts +0 -39
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +0 -237
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +0 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +0 -22
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +0 -162
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +0 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.d.ts +0 -34
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +0 -168
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +0 -1
- package/dist/components/Employee/Deductions/Head.d.ts +0 -1
- package/dist/components/Employee/Deductions/useDeductions.d.ts +0 -30
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/Head.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/DocumentSigner.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/countries.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/documentSignerStateMachine.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/fields.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/signEmployeeFormSchema.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/stateMachine.js.map +0 -1
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocuments.js.map +0 -1
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +0 -115
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +0 -1
- package/dist/components/Employee/PaymentMethod/Actions.d.ts +0 -1
- package/dist/components/Employee/PaymentMethod/Actions.js +0 -20
- package/dist/components/Employee/PaymentMethod/Actions.js.map +0 -1
- package/dist/components/Employee/PaymentMethod/BankAccount.d.ts +0 -13
- package/dist/components/Employee/PaymentMethod/BankAccount.js +0 -13
- package/dist/components/Employee/PaymentMethod/BankAccount.js.map +0 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.d.ts +0 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +0 -58
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +0 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.d.ts +0 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +0 -51
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +0 -1
- package/dist/components/Employee/PaymentMethod/Head.d.ts +0 -1
- package/dist/components/Employee/PaymentMethod/Head.js +0 -13
- package/dist/components/Employee/PaymentMethod/Head.js.map +0 -1
- package/dist/components/Employee/PaymentMethod/PaymentMethod.d.ts +0 -9
- package/dist/components/Employee/PaymentMethod/PaymentMethod.js +0 -183
- package/dist/components/Employee/PaymentMethod/PaymentMethod.js.map +0 -1
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.d.ts +0 -10
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +0 -38
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +0 -1
- package/dist/components/Employee/PaymentMethod/Split.d.ts +0 -1
- package/dist/components/Employee/PaymentMethod/Split.js +0 -175
- package/dist/components/Employee/PaymentMethod/Split.js.map +0 -1
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.d.ts +0 -54
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +0 -68
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +0 -1
- package/dist/components/Employee/Compensation/{JobsList → onboarding/JobsList}/JobsListPresentation.d.ts +0 -0
- package/dist/components/Employee/Compensation/{JobsList → onboarding/JobsList}/index.d.ts +0 -0
- package/dist/components/Employee/Compensation/{compensationStateMachine.d.ts → onboarding/compensationStateMachine.d.ts} +0 -0
- package/dist/components/Employee/{DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.test.d.ts → Compensation/shared/derivePrimaryFlsaStatus.test.d.ts} +0 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/Actions.d.ts +0 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/Head.d.ts +0 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/List.d.ts +0 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/useDocumentList.d.ts +0 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibilityPresentation.d.ts +0 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibilitySchema.d.ts +0 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibilitySchema.js +0 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/countries.d.ts +0 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/countries.js +0 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/index.d.ts +0 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.module.scss.js +0 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.module.scss.js.map +0 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/index.d.ts +0 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/stateMachine.d.ts +0 -0
- package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/EmployeeDocumentsPresentation.d.ts +0 -0
- package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/index.d.ts +0 -0
- package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/fields.d.ts +0 -0
- package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/fields.js +1 -1
- /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/index.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/signEmployeeFormSchema.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/signEmployeeFormSchema.js +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/useSignEmployeeForm.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/useSignEmployeeForm.js +0 -0
|
@@ -1,28 +1,44 @@
|
|
|
1
1
|
import { Job } from '@gusto/embedded-api/models/components/job';
|
|
2
|
-
import { Garnishment } from '@gusto/embedded-api/models/components/garnishment';
|
|
3
|
-
import { GetV1EmployeesEmployeeIdPaymentMethodResponse } from '@gusto/embedded-api/models/operations/getv1employeesemployeeidpaymentmethod';
|
|
4
|
-
import { GetV1EmployeesEmployeeIdBankAccountsResponse } from '@gusto/embedded-api/models/operations/getv1employeesemployeeidbankaccounts';
|
|
5
2
|
import { GetV1EmployeesEmployeeUuidPayStubsResponse } from '@gusto/embedded-api/models/operations/getv1employeesemployeeuuidpaystubs';
|
|
6
|
-
import {
|
|
3
|
+
import { PendingCompensationChange } from '../getPendingCompensationChanges';
|
|
4
|
+
import { BaseHookReady, HookSubmitResult } from '../../../../partner-hook-utils/types';
|
|
7
5
|
import { PaginationControlProps } from '../../../Common/PaginationControl/PaginationControlTypes';
|
|
8
|
-
type EmployeeBankAccount = NonNullable<GetV1EmployeesEmployeeIdBankAccountsResponse['employeeBankAccounts']>[number];
|
|
9
6
|
type EmployeePayStub = NonNullable<GetV1EmployeesEmployeeUuidPayStubsResponse['employeePayStubsList']>[number];
|
|
10
7
|
export interface UseEmployeeCompensationProps {
|
|
11
8
|
employeeId: string;
|
|
12
9
|
}
|
|
13
|
-
interface
|
|
10
|
+
export interface UseEmployeeCompensationResult extends BaseHookReady<{
|
|
11
|
+
jobs: Job[];
|
|
14
12
|
primaryJob?: Job;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
primaryFlsaStatus?: string;
|
|
14
|
+
hasMultipleJobs: boolean;
|
|
15
|
+
pendingChanges: PendingCompensationChange[];
|
|
18
16
|
payStubs: EmployeePayStub[];
|
|
17
|
+
/** First name from the shared employee fetch; useful for cosmetic copy
|
|
18
|
+
* in alerts (e.g. "Heads up, Jane has pending changes"). Optional
|
|
19
|
+
* because the employee record can omit it. */
|
|
20
|
+
employeeFirstName?: string;
|
|
19
21
|
}, {
|
|
20
22
|
isPending: boolean;
|
|
23
|
+
cancellingCompensationUuid: string | null;
|
|
24
|
+
/** Compensation card depends on the employee fetch (jobs, pending
|
|
25
|
+
* changes, FLSA status). */
|
|
26
|
+
isEmployeeLoading: boolean;
|
|
27
|
+
/** Paystubs card depends on a separate paginated endpoint. */
|
|
28
|
+
isPayStubsLoading: boolean;
|
|
21
29
|
}> {
|
|
22
30
|
pagination: {
|
|
23
31
|
payStubs?: PaginationControlProps;
|
|
24
32
|
};
|
|
33
|
+
actions: {
|
|
34
|
+
cancelPendingChange: (pendingChange: PendingCompensationChange) => Promise<HookSubmitResult<unknown> | undefined>;
|
|
35
|
+
};
|
|
25
36
|
}
|
|
26
|
-
|
|
37
|
+
/**
|
|
38
|
+
* Phase B: non-Suspense queries so the Compensation and Paystubs cards
|
|
39
|
+
* can paint independently within the Job and pay tab. JobAndPayView
|
|
40
|
+
* already gets the Payment and Deductions cards as separate non-Suspense
|
|
41
|
+
* hooks, so this completes the four-section incremental render.
|
|
42
|
+
*/
|
|
27
43
|
export declare function useEmployeeCompensation({ employeeId, }: UseEmployeeCompensationProps): UseEmployeeCompensationResult;
|
|
28
44
|
export {};
|
|
@@ -1,52 +1,75 @@
|
|
|
1
|
-
import { useMemo as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { useMemo as a, useCallback as j } from "react";
|
|
2
|
+
import { useEmployeesGet as v } from "@gusto/embedded-api/react-query/employeesGet";
|
|
3
|
+
import { useJobsAndCompensationsDeleteCompensationMutation as I } from "@gusto/embedded-api/react-query/jobsAndCompensationsDeleteCompensation";
|
|
4
|
+
import { usePayrollsGetPayStubs as J } from "@gusto/embedded-api/react-query/payrollsGetPayStubs";
|
|
5
|
+
import { getPendingCompensationChanges as A } from "../getPendingCompensationChanges.js";
|
|
6
|
+
import { derivePrimaryFlsaStatus as H } from "../../Compensation/shared/derivePrimaryFlsaStatus.js";
|
|
7
|
+
import { useBaseSubmit as q } from "../../../Base/useBaseSubmit.js";
|
|
8
|
+
import { composeErrorHandler as w } from "../../../../partner-hook-utils/composeErrorHandler.js";
|
|
9
|
+
import { usePagination as D } from "../../../../hooks/usePagination/usePagination.js";
|
|
10
|
+
function z({
|
|
11
|
+
employeeId: r
|
|
11
12
|
}) {
|
|
12
|
-
const { currentPage:
|
|
13
|
+
const { currentPage: c, itemsPerPage: d, getPaginationProps: m } = D({
|
|
13
14
|
defaultItemsPerPage: 10
|
|
14
|
-
}),
|
|
15
|
-
employeeId:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
])
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
} :
|
|
15
|
+
}), i = v(
|
|
16
|
+
{ employeeId: r, include: ["all_compensations"] },
|
|
17
|
+
{ staleTime: 1 / 0 }
|
|
18
|
+
), e = J(
|
|
19
|
+
{ employeeId: r, page: c, per: d },
|
|
20
|
+
{ staleTime: 1 / 0 }
|
|
21
|
+
), o = I(), {
|
|
22
|
+
baseSubmitHandler: p,
|
|
23
|
+
error: l,
|
|
24
|
+
setError: g
|
|
25
|
+
} = q("Employee.Dashboard.JobAndPay.Compensation"), n = i.data?.employee, t = a(() => n?.jobs ?? [], [n?.jobs]), y = a(() => t.find((s) => s.primary === !0), [t]), b = a(() => H(t), [t]), P = t.length > 1, f = a(
|
|
26
|
+
() => A(n?.jobs),
|
|
27
|
+
[n?.jobs]
|
|
28
|
+
), h = e.data?.employeePayStubsList ?? [], S = a(() => {
|
|
29
|
+
const s = e.data?.httpMeta.response.headers;
|
|
30
|
+
if (s)
|
|
31
|
+
return m(s, e.isFetching);
|
|
32
|
+
}, [e.data?.httpMeta.response.headers, e.isFetching, m]), C = o.isPending ? o.variables.request.compensationId : null, E = j(
|
|
33
|
+
async (s) => {
|
|
34
|
+
let u;
|
|
35
|
+
return await p(s, async ({ compensationUuid: M }) => {
|
|
36
|
+
u = { mode: "update", data: await o.mutateAsync({
|
|
37
|
+
request: { compensationId: M }
|
|
38
|
+
}) };
|
|
39
|
+
}), u;
|
|
40
|
+
},
|
|
41
|
+
[p, o]
|
|
42
|
+
), F = i.isFetching || e.isFetching || o.isPending, L = w([i, e], {
|
|
43
|
+
submitError: l,
|
|
44
|
+
setSubmitError: g
|
|
45
|
+
});
|
|
46
|
+
return {
|
|
32
47
|
isLoading: !1,
|
|
33
48
|
data: {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
49
|
+
jobs: t,
|
|
50
|
+
primaryJob: y,
|
|
51
|
+
primaryFlsaStatus: b,
|
|
52
|
+
hasMultipleJobs: P,
|
|
53
|
+
pendingChanges: f,
|
|
54
|
+
payStubs: h,
|
|
55
|
+
employeeFirstName: n?.firstName ?? void 0
|
|
39
56
|
},
|
|
40
57
|
status: {
|
|
41
|
-
isPending:
|
|
58
|
+
isPending: F,
|
|
59
|
+
cancellingCompensationUuid: C,
|
|
60
|
+
isEmployeeLoading: i.isLoading,
|
|
61
|
+
isPayStubsLoading: e.isLoading
|
|
42
62
|
},
|
|
43
63
|
pagination: {
|
|
44
|
-
payStubs:
|
|
64
|
+
payStubs: S
|
|
65
|
+
},
|
|
66
|
+
actions: {
|
|
67
|
+
cancelPendingChange: E
|
|
45
68
|
},
|
|
46
|
-
errorHandling:
|
|
69
|
+
errorHandling: L
|
|
47
70
|
};
|
|
48
71
|
}
|
|
49
72
|
export {
|
|
50
|
-
|
|
73
|
+
z as useEmployeeCompensation
|
|
51
74
|
};
|
|
52
75
|
//# sourceMappingURL=useEmployeeCompensation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEmployeeCompensation.js","sources":["../../../../../src/components/Employee/Dashboard/hooks/useEmployeeCompensation.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport {
|
|
1
|
+
{"version":3,"file":"useEmployeeCompensation.js","sources":["../../../../../src/components/Employee/Dashboard/hooks/useEmployeeCompensation.tsx"],"sourcesContent":["import { useCallback, useMemo } from 'react'\nimport { useEmployeesGet } from '@gusto/embedded-api/react-query/employeesGet'\nimport { useJobsAndCompensationsDeleteCompensationMutation } from '@gusto/embedded-api/react-query/jobsAndCompensationsDeleteCompensation'\nimport { usePayrollsGetPayStubs } from '@gusto/embedded-api/react-query/payrollsGetPayStubs'\nimport type { Job } from '@gusto/embedded-api/models/components/job'\nimport type { GetV1EmployeesEmployeeUuidPayStubsResponse } from '@gusto/embedded-api/models/operations/getv1employeesemployeeuuidpaystubs'\nimport {\n getPendingCompensationChanges,\n type PendingCompensationChange,\n} from '../getPendingCompensationChanges'\nimport { derivePrimaryFlsaStatus } from '@/components/Employee/Compensation/shared/derivePrimaryFlsaStatus'\nimport { useBaseSubmit } from '@/components/Base/useBaseSubmit'\nimport { composeErrorHandler } from '@/partner-hook-utils/composeErrorHandler'\nimport { usePagination } from '@/hooks/usePagination/usePagination'\nimport type { BaseHookReady, HookSubmitResult } from '@/partner-hook-utils/types'\nimport type { PaginationControlProps } from '@/components/Common/PaginationControl/PaginationControlTypes'\n\ntype EmployeePayStub = NonNullable<\n GetV1EmployeesEmployeeUuidPayStubsResponse['employeePayStubsList']\n>[number]\n\nexport interface UseEmployeeCompensationProps {\n employeeId: string\n}\n\nexport interface UseEmployeeCompensationResult extends BaseHookReady<\n {\n jobs: Job[]\n primaryJob?: Job\n primaryFlsaStatus?: string\n hasMultipleJobs: boolean\n pendingChanges: PendingCompensationChange[]\n payStubs: EmployeePayStub[]\n /** First name from the shared employee fetch; useful for cosmetic copy\n * in alerts (e.g. \"Heads up, Jane has pending changes\"). Optional\n * because the employee record can omit it. */\n employeeFirstName?: string\n },\n {\n isPending: boolean\n cancellingCompensationUuid: string | null\n /** Compensation card depends on the employee fetch (jobs, pending\n * changes, FLSA status). */\n isEmployeeLoading: boolean\n /** Paystubs card depends on a separate paginated endpoint. */\n isPayStubsLoading: boolean\n }\n> {\n pagination: {\n payStubs?: PaginationControlProps\n }\n actions: {\n cancelPendingChange: (\n pendingChange: PendingCompensationChange,\n ) => Promise<HookSubmitResult<unknown> | undefined>\n }\n}\n\n/**\n * Phase B: non-Suspense queries so the Compensation and Paystubs cards\n * can paint independently within the Job and pay tab. JobAndPayView\n * already gets the Payment and Deductions cards as separate non-Suspense\n * hooks, so this completes the four-section incremental render.\n */\nexport function useEmployeeCompensation({\n employeeId,\n}: UseEmployeeCompensationProps): UseEmployeeCompensationResult {\n const { currentPage, itemsPerPage, getPaginationProps } = usePagination({\n defaultItemsPerPage: 10,\n })\n\n // staleTime: Infinity on dashboard reads — the SDK QueryClient already\n // invalidates all queries on any mutation success, so post-write\n // freshness is preserved. Without this, every subscriber re-mount\n // (e.g. tab navigation) would fire a redundant background refetch.\n const employeeQuery = useEmployeesGet(\n { employeeId, include: ['all_compensations'] },\n { staleTime: Infinity },\n )\n const payStubsQuery = usePayrollsGetPayStubs(\n { employeeId, page: currentPage, per: itemsPerPage },\n { staleTime: Infinity },\n )\n const cancelCompensationMutation = useJobsAndCompensationsDeleteCompensationMutation()\n const {\n baseSubmitHandler,\n error: submitError,\n setError: setSubmitError,\n } = useBaseSubmit('Employee.Dashboard.JobAndPay.Compensation')\n\n const employee = employeeQuery.data?.employee\n\n const jobs = useMemo(() => employee?.jobs ?? [], [employee?.jobs])\n const primaryJob = useMemo(() => jobs.find(job => job.primary === true), [jobs])\n const primaryFlsaStatus = useMemo(() => derivePrimaryFlsaStatus(jobs), [jobs])\n const hasMultipleJobs = jobs.length > 1\n\n const pendingChanges = useMemo(\n () => getPendingCompensationChanges(employee?.jobs),\n [employee?.jobs],\n )\n\n const payStubs = payStubsQuery.data?.employeePayStubsList ?? []\n\n const payStubsPagination = useMemo(() => {\n const headers = payStubsQuery.data?.httpMeta.response.headers\n if (!headers) return undefined\n return getPaginationProps(headers, payStubsQuery.isFetching)\n }, [payStubsQuery.data?.httpMeta.response.headers, payStubsQuery.isFetching, getPaginationProps])\n\n const cancellingCompensationUuid = cancelCompensationMutation.isPending\n ? cancelCompensationMutation.variables.request.compensationId\n : null\n\n const cancelPendingChange = useCallback(\n async (\n pendingChange: PendingCompensationChange,\n ): Promise<HookSubmitResult<unknown> | undefined> => {\n let submitResult: HookSubmitResult<unknown> | undefined\n await baseSubmitHandler(pendingChange, async ({ compensationUuid }) => {\n const data = await cancelCompensationMutation.mutateAsync({\n request: { compensationId: compensationUuid },\n })\n submitResult = { mode: 'update', data }\n })\n return submitResult\n },\n [baseSubmitHandler, cancelCompensationMutation],\n )\n\n const isPending =\n employeeQuery.isFetching || payStubsQuery.isFetching || cancelCompensationMutation.isPending\n\n const errorHandling = composeErrorHandler([employeeQuery, payStubsQuery], {\n submitError,\n setSubmitError,\n })\n\n return {\n isLoading: false,\n data: {\n jobs,\n primaryJob,\n primaryFlsaStatus,\n hasMultipleJobs,\n pendingChanges,\n payStubs,\n employeeFirstName: employee?.firstName ?? undefined,\n },\n status: {\n isPending,\n cancellingCompensationUuid,\n isEmployeeLoading: employeeQuery.isLoading,\n isPayStubsLoading: payStubsQuery.isLoading,\n },\n pagination: {\n payStubs: payStubsPagination,\n },\n actions: {\n cancelPendingChange,\n },\n errorHandling,\n }\n}\n"],"names":["useEmployeeCompensation","employeeId","currentPage","itemsPerPage","getPaginationProps","usePagination","employeeQuery","useEmployeesGet","payStubsQuery","usePayrollsGetPayStubs","cancelCompensationMutation","useJobsAndCompensationsDeleteCompensationMutation","baseSubmitHandler","submitError","setSubmitError","useBaseSubmit","employee","jobs","useMemo","primaryJob","job","primaryFlsaStatus","derivePrimaryFlsaStatus","hasMultipleJobs","pendingChanges","getPendingCompensationChanges","payStubs","payStubsPagination","headers","cancellingCompensationUuid","cancelPendingChange","useCallback","pendingChange","submitResult","compensationUuid","isPending","errorHandling","composeErrorHandler"],"mappings":";;;;;;;;;AAgEO,SAASA,EAAwB;AAAA,EACtC,YAAAC;AACF,GAAgE;AAC9D,QAAM,EAAE,aAAAC,GAAa,cAAAC,GAAc,oBAAAC,EAAA,IAAuBC,EAAc;AAAA,IACtE,qBAAqB;AAAA,EAAA,CACtB,GAMKC,IAAgBC;AAAA,IACpB,EAAE,YAAAN,GAAY,SAAS,CAAC,mBAAmB,EAAA;AAAA,IAC3C,EAAE,WAAW,MAAA;AAAA,EAAS,GAElBO,IAAgBC;AAAA,IACpB,EAAE,YAAAR,GAAY,MAAMC,GAAa,KAAKC,EAAA;AAAA,IACtC,EAAE,WAAW,MAAA;AAAA,EAAS,GAElBO,IAA6BC,EAAA,GAC7B;AAAA,IACJ,mBAAAC;AAAA,IACA,OAAOC;AAAA,IACP,UAAUC;AAAA,EAAA,IACRC,EAAc,2CAA2C,GAEvDC,IAAWV,EAAc,MAAM,UAE/BW,IAAOC,EAAQ,MAAMF,GAAU,QAAQ,IAAI,CAACA,GAAU,IAAI,CAAC,GAC3DG,IAAaD,EAAQ,MAAMD,EAAK,KAAK,CAAAG,MAAOA,EAAI,YAAY,EAAI,GAAG,CAACH,CAAI,CAAC,GACzEI,IAAoBH,EAAQ,MAAMI,EAAwBL,CAAI,GAAG,CAACA,CAAI,CAAC,GACvEM,IAAkBN,EAAK,SAAS,GAEhCO,IAAiBN;AAAA,IACrB,MAAMO,EAA8BT,GAAU,IAAI;AAAA,IAClD,CAACA,GAAU,IAAI;AAAA,EAAA,GAGXU,IAAWlB,EAAc,MAAM,wBAAwB,CAAA,GAEvDmB,IAAqBT,EAAQ,MAAM;AACvC,UAAMU,IAAUpB,EAAc,MAAM,SAAS,SAAS;AACtD,QAAKoB;AACL,aAAOxB,EAAmBwB,GAASpB,EAAc,UAAU;AAAA,EAC7D,GAAG,CAACA,EAAc,MAAM,SAAS,SAAS,SAASA,EAAc,YAAYJ,CAAkB,CAAC,GAE1FyB,IAA6BnB,EAA2B,YAC1DA,EAA2B,UAAU,QAAQ,iBAC7C,MAEEoB,IAAsBC;AAAA,IAC1B,OACEC,MACmD;AACnD,UAAIC;AACJ,mBAAMrB,EAAkBoB,GAAe,OAAO,EAAE,kBAAAE,QAAuB;AAIrE,QAAAD,IAAe,EAAE,MAAM,UAAU,MAHpB,MAAMvB,EAA2B,YAAY;AAAA,UACxD,SAAS,EAAE,gBAAgBwB,EAAA;AAAA,QAAiB,CAC7C,EACgC;AAAA,MACnC,CAAC,GACMD;AAAA,IACT;AAAA,IACA,CAACrB,GAAmBF,CAA0B;AAAA,EAAA,GAG1CyB,IACJ7B,EAAc,cAAcE,EAAc,cAAcE,EAA2B,WAE/E0B,IAAgBC,EAAoB,CAAC/B,GAAeE,CAAa,GAAG;AAAA,IACxE,aAAAK;AAAA,IACA,gBAAAC;AAAA,EAAA,CACD;AAED,SAAO;AAAA,IACL,WAAW;AAAA,IACX,MAAM;AAAA,MACJ,MAAAG;AAAA,MACA,YAAAE;AAAA,MACA,mBAAAE;AAAA,MACA,iBAAAE;AAAA,MACA,gBAAAC;AAAA,MACA,UAAAE;AAAA,MACA,mBAAmBV,GAAU,aAAa;AAAA,IAAA;AAAA,IAE5C,QAAQ;AAAA,MACN,WAAAmB;AAAA,MACA,4BAAAN;AAAA,MACA,mBAAmBvB,EAAc;AAAA,MACjC,mBAAmBE,EAAc;AAAA,IAAA;AAAA,IAEnC,YAAY;AAAA,MACV,UAAUmB;AAAA,IAAA;AAAA,IAEZ,SAAS;AAAA,MACP,qBAAAG;AAAA,IAAA;AAAA,IAEF,eAAAM;AAAA,EAAA;AAEJ;"}
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import { Form } from '@gusto/embedded-api/models/components/form';
|
|
2
|
-
import {
|
|
2
|
+
import { BaseHookReady } from '../../../../partner-hook-utils/types';
|
|
3
3
|
export interface UseEmployeeFormsProps {
|
|
4
4
|
employeeId: string;
|
|
5
5
|
}
|
|
6
|
-
type
|
|
6
|
+
export type UseEmployeeFormsResult = BaseHookReady<{
|
|
7
7
|
formList: Form[];
|
|
8
8
|
}, {
|
|
9
9
|
isPending: boolean;
|
|
10
|
+
isFormsLoading: boolean;
|
|
10
11
|
}>;
|
|
11
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Phase B: non-Suspense query so the consuming view can paint its frame
|
|
14
|
+
* (box header, tab structure) before the data arrives. The `formList`
|
|
15
|
+
* defaults to `[]` while the query is loading — consumers branch on
|
|
16
|
+
* `status.isFormsLoading` to distinguish "still loading" from "loaded
|
|
17
|
+
* empty" and render a skeleton accordingly.
|
|
18
|
+
*/
|
|
12
19
|
export declare function useEmployeeForms({ employeeId }: UseEmployeeFormsProps): UseEmployeeFormsResult;
|
|
13
|
-
export {};
|
|
@@ -1,22 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { composeErrorHandler as
|
|
3
|
-
function
|
|
4
|
-
const o =
|
|
5
|
-
return
|
|
6
|
-
isLoading: !0,
|
|
7
|
-
errorHandling: t
|
|
8
|
-
} : {
|
|
1
|
+
import { useEmployeeFormsList as s } from "@gusto/embedded-api/react-query/employeeFormsList";
|
|
2
|
+
import { composeErrorHandler as i } from "../../../../partner-hook-utils/composeErrorHandler.js";
|
|
3
|
+
function t({ employeeId: r }) {
|
|
4
|
+
const o = s({ employeeId: r }, { staleTime: 1 / 0 });
|
|
5
|
+
return {
|
|
9
6
|
isLoading: !1,
|
|
10
7
|
data: {
|
|
11
|
-
formList:
|
|
8
|
+
formList: o.data?.forms ?? []
|
|
12
9
|
},
|
|
13
10
|
status: {
|
|
14
|
-
isPending:
|
|
11
|
+
isPending: o.isFetching,
|
|
12
|
+
isFormsLoading: o.isLoading
|
|
15
13
|
},
|
|
16
|
-
errorHandling:
|
|
14
|
+
errorHandling: i([o])
|
|
17
15
|
};
|
|
18
16
|
}
|
|
19
17
|
export {
|
|
20
|
-
|
|
18
|
+
t as useEmployeeForms
|
|
21
19
|
};
|
|
22
20
|
//# sourceMappingURL=useEmployeeForms.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEmployeeForms.js","sources":["../../../../../src/components/Employee/Dashboard/hooks/useEmployeeForms.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"useEmployeeForms.js","sources":["../../../../../src/components/Employee/Dashboard/hooks/useEmployeeForms.tsx"],"sourcesContent":["import { useEmployeeFormsList } from '@gusto/embedded-api/react-query/employeeFormsList'\nimport type { Form } from '@gusto/embedded-api/models/components/form'\nimport { composeErrorHandler } from '@/partner-hook-utils/composeErrorHandler'\nimport type { BaseHookReady } from '@/partner-hook-utils/types'\n\nexport interface UseEmployeeFormsProps {\n employeeId: string\n}\n\nexport type UseEmployeeFormsResult = BaseHookReady<\n { formList: Form[] },\n { isPending: boolean; isFormsLoading: boolean }\n>\n\n/**\n * Phase B: non-Suspense query so the consuming view can paint its frame\n * (box header, tab structure) before the data arrives. The `formList`\n * defaults to `[]` while the query is loading — consumers branch on\n * `status.isFormsLoading` to distinguish \"still loading\" from \"loaded\n * empty\" and render a skeleton accordingly.\n */\nexport function useEmployeeForms({ employeeId }: UseEmployeeFormsProps): UseEmployeeFormsResult {\n // staleTime: Infinity — see useEmployeeCompensation for rationale (SDK\n // QueryClient invalidates on any mutation success).\n const formsQuery = useEmployeeFormsList({ employeeId }, { staleTime: Infinity })\n\n return {\n isLoading: false,\n data: {\n formList: formsQuery.data?.forms ?? [],\n },\n status: {\n isPending: formsQuery.isFetching,\n isFormsLoading: formsQuery.isLoading,\n },\n errorHandling: composeErrorHandler([formsQuery]),\n }\n}\n"],"names":["useEmployeeForms","employeeId","formsQuery","useEmployeeFormsList","composeErrorHandler"],"mappings":";;AAqBO,SAASA,EAAiB,EAAE,YAAAC,KAA6D;AAG9F,QAAMC,IAAaC,EAAqB,EAAE,YAAAF,EAAA,GAAc,EAAE,WAAW,OAAU;AAE/E,SAAO;AAAA,IACL,WAAW;AAAA,IACX,MAAM;AAAA,MACJ,UAAUC,EAAW,MAAM,SAAS,CAAA;AAAA,IAAC;AAAA,IAEvC,QAAQ;AAAA,MACN,WAAWA,EAAW;AAAA,MACtB,gBAAgBA,EAAW;AAAA,IAAA;AAAA,IAE7B,eAAeE,EAAoB,CAACF,CAAU,CAAC;AAAA,EAAA;AAEnD;"}
|
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
import { GetV1EmployeesEmployeeIdFederalTaxesResponse } from '@gusto/embedded-api/models/operations/getv1employeesemployeeidfederaltaxes';
|
|
2
2
|
import { GetV1EmployeesEmployeeIdStateTaxesResponse } from '@gusto/embedded-api/models/operations/getv1employeesemployeeidstatetaxes';
|
|
3
|
-
import {
|
|
3
|
+
import { BaseHookReady } from '../../../../partner-hook-utils/types';
|
|
4
4
|
type EmployeeFederalTax = NonNullable<GetV1EmployeesEmployeeIdFederalTaxesResponse['employeeFederalTax']>;
|
|
5
5
|
type EmployeeStateTax = NonNullable<GetV1EmployeesEmployeeIdStateTaxesResponse['employeeStateTaxesList']>[number];
|
|
6
6
|
export interface UseEmployeeTaxesProps {
|
|
7
7
|
employeeId: string;
|
|
8
8
|
}
|
|
9
|
-
type
|
|
9
|
+
export type UseEmployeeTaxesResult = BaseHookReady<{
|
|
10
10
|
employeeFederalTax?: EmployeeFederalTax;
|
|
11
11
|
employeeStateTaxesList: EmployeeStateTax[];
|
|
12
12
|
}, {
|
|
13
13
|
isPending: boolean;
|
|
14
|
+
isFederalTaxesLoading: boolean;
|
|
15
|
+
isStateTaxesLoading: boolean;
|
|
14
16
|
}>;
|
|
15
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Phase B: non-Suspense queries so the federal and state tax cards
|
|
19
|
+
* paint independently. `isFederalTaxesLoading` and `isStateTaxesLoading`
|
|
20
|
+
* let TaxesView render a per-card skeleton while the box header stays
|
|
21
|
+
* visible.
|
|
22
|
+
*/
|
|
16
23
|
export declare function useEmployeeTaxes({ employeeId }: UseEmployeeTaxesProps): UseEmployeeTaxesResult;
|
|
17
24
|
export {};
|
|
@@ -1,24 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { composeErrorHandler as
|
|
4
|
-
function
|
|
5
|
-
const e =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { useEmployeeTaxSetupGetFederalTaxes as i } from "@gusto/embedded-api/react-query/employeeTaxSetupGetFederalTaxes";
|
|
2
|
+
import { useEmployeeTaxSetupGetStateTaxes as s } from "@gusto/embedded-api/react-query/employeeTaxSetupGetStateTaxes";
|
|
3
|
+
import { composeErrorHandler as o } from "../../../../partner-hook-utils/composeErrorHandler.js";
|
|
4
|
+
function d({ employeeId: t }) {
|
|
5
|
+
const e = i(
|
|
6
|
+
{ employeeUuid: t },
|
|
7
|
+
{ staleTime: 1 / 0 }
|
|
8
|
+
), a = s(
|
|
9
|
+
{ employeeUuid: t },
|
|
10
|
+
{ staleTime: 1 / 0 }
|
|
11
|
+
);
|
|
12
|
+
return {
|
|
10
13
|
isLoading: !1,
|
|
11
14
|
data: {
|
|
12
|
-
employeeFederalTax:
|
|
13
|
-
employeeStateTaxesList:
|
|
15
|
+
employeeFederalTax: e.data?.employeeFederalTax,
|
|
16
|
+
employeeStateTaxesList: a.data?.employeeStateTaxesList ?? []
|
|
14
17
|
},
|
|
15
18
|
status: {
|
|
16
|
-
isPending:
|
|
19
|
+
isPending: e.isFetching || a.isFetching,
|
|
20
|
+
isFederalTaxesLoading: e.isLoading,
|
|
21
|
+
isStateTaxesLoading: a.isLoading
|
|
17
22
|
},
|
|
18
|
-
errorHandling:
|
|
23
|
+
errorHandling: o([e, a])
|
|
19
24
|
};
|
|
20
25
|
}
|
|
21
26
|
export {
|
|
22
|
-
|
|
27
|
+
d as useEmployeeTaxes
|
|
23
28
|
};
|
|
24
29
|
//# sourceMappingURL=useEmployeeTaxes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEmployeeTaxes.js","sources":["../../../../../src/components/Employee/Dashboard/hooks/useEmployeeTaxes.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"useEmployeeTaxes.js","sources":["../../../../../src/components/Employee/Dashboard/hooks/useEmployeeTaxes.tsx"],"sourcesContent":["import { useEmployeeTaxSetupGetFederalTaxes } from '@gusto/embedded-api/react-query/employeeTaxSetupGetFederalTaxes'\nimport { useEmployeeTaxSetupGetStateTaxes } from '@gusto/embedded-api/react-query/employeeTaxSetupGetStateTaxes'\nimport type { GetV1EmployeesEmployeeIdFederalTaxesResponse } from '@gusto/embedded-api/models/operations/getv1employeesemployeeidfederaltaxes'\nimport type { GetV1EmployeesEmployeeIdStateTaxesResponse } from '@gusto/embedded-api/models/operations/getv1employeesemployeeidstatetaxes'\nimport { composeErrorHandler } from '@/partner-hook-utils/composeErrorHandler'\nimport type { BaseHookReady } from '@/partner-hook-utils/types'\n\ntype EmployeeFederalTax = NonNullable<\n GetV1EmployeesEmployeeIdFederalTaxesResponse['employeeFederalTax']\n>\ntype EmployeeStateTax = NonNullable<\n GetV1EmployeesEmployeeIdStateTaxesResponse['employeeStateTaxesList']\n>[number]\n\nexport interface UseEmployeeTaxesProps {\n employeeId: string\n}\n\nexport type UseEmployeeTaxesResult = BaseHookReady<\n {\n employeeFederalTax?: EmployeeFederalTax\n employeeStateTaxesList: EmployeeStateTax[]\n },\n {\n isPending: boolean\n isFederalTaxesLoading: boolean\n isStateTaxesLoading: boolean\n }\n>\n\n/**\n * Phase B: non-Suspense queries so the federal and state tax cards\n * paint independently. `isFederalTaxesLoading` and `isStateTaxesLoading`\n * let TaxesView render a per-card skeleton while the box header stays\n * visible.\n */\nexport function useEmployeeTaxes({ employeeId }: UseEmployeeTaxesProps): UseEmployeeTaxesResult {\n // staleTime: Infinity — see useEmployeeCompensation for rationale (SDK\n // QueryClient invalidates on any mutation success).\n const federalTaxesQuery = useEmployeeTaxSetupGetFederalTaxes(\n { employeeUuid: employeeId },\n { staleTime: Infinity },\n )\n const stateTaxesQuery = useEmployeeTaxSetupGetStateTaxes(\n { employeeUuid: employeeId },\n { staleTime: Infinity },\n )\n\n return {\n isLoading: false,\n data: {\n employeeFederalTax: federalTaxesQuery.data?.employeeFederalTax,\n employeeStateTaxesList: stateTaxesQuery.data?.employeeStateTaxesList ?? [],\n },\n status: {\n isPending: federalTaxesQuery.isFetching || stateTaxesQuery.isFetching,\n isFederalTaxesLoading: federalTaxesQuery.isLoading,\n isStateTaxesLoading: stateTaxesQuery.isLoading,\n },\n errorHandling: composeErrorHandler([federalTaxesQuery, stateTaxesQuery]),\n }\n}\n"],"names":["useEmployeeTaxes","employeeId","federalTaxesQuery","useEmployeeTaxSetupGetFederalTaxes","stateTaxesQuery","useEmployeeTaxSetupGetStateTaxes","composeErrorHandler"],"mappings":";;;AAoCO,SAASA,EAAiB,EAAE,YAAAC,KAA6D;AAG9F,QAAMC,IAAoBC;AAAA,IACxB,EAAE,cAAcF,EAAA;AAAA,IAChB,EAAE,WAAW,MAAA;AAAA,EAAS,GAElBG,IAAkBC;AAAA,IACtB,EAAE,cAAcJ,EAAA;AAAA,IAChB,EAAE,WAAW,MAAA;AAAA,EAAS;AAGxB,SAAO;AAAA,IACL,WAAW;AAAA,IACX,MAAM;AAAA,MACJ,oBAAoBC,EAAkB,MAAM;AAAA,MAC5C,wBAAwBE,EAAgB,MAAM,0BAA0B,CAAA;AAAA,IAAC;AAAA,IAE3E,QAAQ;AAAA,MACN,WAAWF,EAAkB,cAAcE,EAAgB;AAAA,MAC3D,uBAAuBF,EAAkB;AAAA,MACzC,qBAAqBE,EAAgB;AAAA,IAAA;AAAA,IAEvC,eAAeE,EAAoB,CAACJ,GAAmBE,CAAe,CAAC;AAAA,EAAA;AAE3E;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PendingChangeDetail } from './getPendingCompensationChanges';
|
|
2
|
+
/**
|
|
3
|
+
* Renders a single `PendingChangeDetail` produced by `getPendingCompensationChanges`
|
|
4
|
+
* into the user-facing bullet string. Resolves FLSA enum values to their human
|
|
5
|
+
* labels via the Compensation namespace and formats pay/min-wage rates with the
|
|
6
|
+
* shared `useFormatPayRate` helper so the copy matches the form.
|
|
7
|
+
*/
|
|
8
|
+
export declare function usePendingChangeDetailRenderer(employeeFirstName: string | null | undefined): (detail: PendingChangeDetail) => string;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { useTranslation as g } from "react-i18next";
|
|
2
|
+
import { useFormatCompensationRate as p } from "../../../helpers/formattedStrings.js";
|
|
3
|
+
function c(r) {
|
|
4
|
+
const { t: e } = g("Employee.Dashboard"), { t: m } = g("Employee.Compensation"), t = p(), o = r ?? "";
|
|
5
|
+
return (n) => {
|
|
6
|
+
const a = { interpolation: { escapeValue: !1 } };
|
|
7
|
+
switch (n.kind) {
|
|
8
|
+
case "titleChange":
|
|
9
|
+
return e("jobAndPay.compensation.pendingChange.details.titleChange", {
|
|
10
|
+
title: n.title,
|
|
11
|
+
...a
|
|
12
|
+
});
|
|
13
|
+
case "payChange":
|
|
14
|
+
return e("jobAndPay.compensation.pendingChange.details.payChange", {
|
|
15
|
+
formattedRate: t(n.rate, n.paymentUnit),
|
|
16
|
+
...a
|
|
17
|
+
});
|
|
18
|
+
case "flsaChange":
|
|
19
|
+
return e("jobAndPay.compensation.pendingChange.details.flsaChange", {
|
|
20
|
+
flsaLabel: m(`flsaStatusLabels.${n.flsaStatus}`),
|
|
21
|
+
...a
|
|
22
|
+
});
|
|
23
|
+
case "newJob": {
|
|
24
|
+
const i = n.rate !== null && n.paymentUnit !== null, s = i ? t(n.rate, n.paymentUnit) : null;
|
|
25
|
+
return n.title && i ? e("jobAndPay.compensation.pendingChange.details.newJob", {
|
|
26
|
+
name: o,
|
|
27
|
+
title: n.title,
|
|
28
|
+
formattedRate: s,
|
|
29
|
+
...a
|
|
30
|
+
}) : i ? e("jobAndPay.compensation.pendingChange.details.newJobNoTitle", {
|
|
31
|
+
name: o,
|
|
32
|
+
formattedRate: s,
|
|
33
|
+
...a
|
|
34
|
+
}) : n.title ? e("jobAndPay.compensation.pendingChange.details.newJobNoRate", {
|
|
35
|
+
name: o,
|
|
36
|
+
title: n.title,
|
|
37
|
+
...a
|
|
38
|
+
}) : e("jobAndPay.compensation.pendingChange.details.newJobMinimal", {
|
|
39
|
+
name: o,
|
|
40
|
+
...a
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
case "minWageEnabled":
|
|
44
|
+
return n.wage ? e("jobAndPay.compensation.pendingChange.details.minWageEnabled", {
|
|
45
|
+
formattedWage: t(Number(n.wage), "Hour"),
|
|
46
|
+
...a
|
|
47
|
+
}) : e("jobAndPay.compensation.pendingChange.details.minWageEnabledNoRate");
|
|
48
|
+
case "minWageDisabled":
|
|
49
|
+
return e("jobAndPay.compensation.pendingChange.details.minWageDisabled");
|
|
50
|
+
case "minWageChanged":
|
|
51
|
+
return n.wage ? e("jobAndPay.compensation.pendingChange.details.minWageChanged", {
|
|
52
|
+
formattedWage: t(Number(n.wage), "Hour"),
|
|
53
|
+
...a
|
|
54
|
+
}) : e("jobAndPay.compensation.pendingChange.details.minWageChangedNoRate");
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export {
|
|
59
|
+
c as usePendingChangeDetailRenderer
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=usePendingChangeDetailRenderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePendingChangeDetailRenderer.js","sources":["../../../../src/components/Employee/Dashboard/usePendingChangeDetailRenderer.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { PendingChangeDetail } from './getPendingCompensationChanges'\nimport { useFormatCompensationRate } from '@/helpers/formattedStrings'\n\n/**\n * Renders a single `PendingChangeDetail` produced by `getPendingCompensationChanges`\n * into the user-facing bullet string. Resolves FLSA enum values to their human\n * labels via the Compensation namespace and formats pay/min-wage rates with the\n * shared `useFormatPayRate` helper so the copy matches the form.\n */\nexport function usePendingChangeDetailRenderer(employeeFirstName: string | null | undefined) {\n const { t: tDashboard } = useTranslation('Employee.Dashboard')\n const { t: tCompensation } = useTranslation('Employee.Compensation')\n const formatCompensationRate = useFormatCompensationRate()\n const name = employeeFirstName ?? ''\n\n return (detail: PendingChangeDetail): string => {\n const interpolation = { interpolation: { escapeValue: false } }\n switch (detail.kind) {\n case 'titleChange':\n return tDashboard('jobAndPay.compensation.pendingChange.details.titleChange', {\n title: detail.title,\n ...interpolation,\n })\n case 'payChange':\n return tDashboard('jobAndPay.compensation.pendingChange.details.payChange', {\n formattedRate: formatCompensationRate(detail.rate, detail.paymentUnit),\n ...interpolation,\n })\n case 'flsaChange':\n return tDashboard('jobAndPay.compensation.pendingChange.details.flsaChange', {\n flsaLabel: tCompensation(`flsaStatusLabels.${detail.flsaStatus}`),\n ...interpolation,\n })\n case 'newJob': {\n const hasRate = detail.rate !== null && detail.paymentUnit !== null\n const formattedRate = hasRate\n ? formatCompensationRate(detail.rate!, detail.paymentUnit!)\n : null\n if (detail.title && hasRate) {\n return tDashboard('jobAndPay.compensation.pendingChange.details.newJob', {\n name,\n title: detail.title,\n formattedRate,\n ...interpolation,\n })\n }\n if (hasRate) {\n return tDashboard('jobAndPay.compensation.pendingChange.details.newJobNoTitle', {\n name,\n formattedRate,\n ...interpolation,\n })\n }\n if (detail.title) {\n return tDashboard('jobAndPay.compensation.pendingChange.details.newJobNoRate', {\n name,\n title: detail.title,\n ...interpolation,\n })\n }\n return tDashboard('jobAndPay.compensation.pendingChange.details.newJobMinimal', {\n name,\n ...interpolation,\n })\n }\n case 'minWageEnabled':\n return detail.wage\n ? tDashboard('jobAndPay.compensation.pendingChange.details.minWageEnabled', {\n formattedWage: formatCompensationRate(Number(detail.wage), 'Hour'),\n ...interpolation,\n })\n : tDashboard('jobAndPay.compensation.pendingChange.details.minWageEnabledNoRate')\n case 'minWageDisabled':\n return tDashboard('jobAndPay.compensation.pendingChange.details.minWageDisabled')\n case 'minWageChanged':\n return detail.wage\n ? tDashboard('jobAndPay.compensation.pendingChange.details.minWageChanged', {\n formattedWage: formatCompensationRate(Number(detail.wage), 'Hour'),\n ...interpolation,\n })\n : tDashboard('jobAndPay.compensation.pendingChange.details.minWageChangedNoRate')\n }\n }\n}\n"],"names":["usePendingChangeDetailRenderer","employeeFirstName","tDashboard","useTranslation","tCompensation","formatCompensationRate","useFormatCompensationRate","name","detail","interpolation","hasRate","formattedRate"],"mappings":";;AAUO,SAASA,EAA+BC,GAA8C;AAC3F,QAAM,EAAE,GAAGC,MAAeC,EAAe,oBAAoB,GACvD,EAAE,GAAGC,MAAkBD,EAAe,uBAAuB,GAC7DE,IAAyBC,EAAA,GACzBC,IAAON,KAAqB;AAElC,SAAO,CAACO,MAAwC;AAC9C,UAAMC,IAAgB,EAAE,eAAe,EAAE,aAAa,KAAM;AAC5D,YAAQD,EAAO,MAAA;AAAA,MACb,KAAK;AACH,eAAON,EAAW,4DAA4D;AAAA,UAC5E,OAAOM,EAAO;AAAA,UACd,GAAGC;AAAA,QAAA,CACJ;AAAA,MACH,KAAK;AACH,eAAOP,EAAW,0DAA0D;AAAA,UAC1E,eAAeG,EAAuBG,EAAO,MAAMA,EAAO,WAAW;AAAA,UACrE,GAAGC;AAAA,QAAA,CACJ;AAAA,MACH,KAAK;AACH,eAAOP,EAAW,2DAA2D;AAAA,UAC3E,WAAWE,EAAc,oBAAoBI,EAAO,UAAU,EAAE;AAAA,UAChE,GAAGC;AAAA,QAAA,CACJ;AAAA,MACH,KAAK,UAAU;AACb,cAAMC,IAAUF,EAAO,SAAS,QAAQA,EAAO,gBAAgB,MACzDG,IAAgBD,IAClBL,EAAuBG,EAAO,MAAOA,EAAO,WAAY,IACxD;AACJ,eAAIA,EAAO,SAASE,IACXR,EAAW,uDAAuD;AAAA,UACvE,MAAAK;AAAA,UACA,OAAOC,EAAO;AAAA,UACd,eAAAG;AAAA,UACA,GAAGF;AAAA,QAAA,CACJ,IAECC,IACKR,EAAW,8DAA8D;AAAA,UAC9E,MAAAK;AAAA,UACA,eAAAI;AAAA,UACA,GAAGF;AAAA,QAAA,CACJ,IAECD,EAAO,QACFN,EAAW,6DAA6D;AAAA,UAC7E,MAAAK;AAAA,UACA,OAAOC,EAAO;AAAA,UACd,GAAGC;AAAA,QAAA,CACJ,IAEIP,EAAW,8DAA8D;AAAA,UAC9E,MAAAK;AAAA,UACA,GAAGE;AAAA,QAAA,CACJ;AAAA,MACH;AAAA,MACA,KAAK;AACH,eAAOD,EAAO,OACVN,EAAW,+DAA+D;AAAA,UACxE,eAAeG,EAAuB,OAAOG,EAAO,IAAI,GAAG,MAAM;AAAA,UACjE,GAAGC;AAAA,QAAA,CACJ,IACDP,EAAW,mEAAmE;AAAA,MACpF,KAAK;AACH,eAAOA,EAAW,8DAA8D;AAAA,MAClF,KAAK;AACH,eAAOM,EAAO,OACVN,EAAW,+DAA+D;AAAA,UACxE,eAAeG,EAAuB,OAAOG,EAAO,IAAI,GAAG,MAAM;AAAA,UACjE,GAAGC;AAAA,QAAA,CACJ,IACDP,EAAW,mEAAmE;AAAA,IAAA;AAAA,EAExF;AACF;"}
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
import { BaseComponentInterface } from '../../Base';
|
|
1
|
+
import { BaseComponentInterface } from '../../Base/Base';
|
|
2
2
|
export interface DeductionsProps extends BaseComponentInterface<'Employee.Deductions'> {
|
|
3
3
|
employeeId: string;
|
|
4
4
|
}
|
|
5
|
-
export declare function Deductions(
|
|
6
|
-
export declare namespace Deductions {
|
|
7
|
-
var IncludeDeductions: typeof import("./IncludeDeductions/IncludeDeductions").IncludeDeductions;
|
|
8
|
-
var DeductionsForm: typeof import("./DeductionsForm/DeductionsForm").DeductionsForm;
|
|
9
|
-
var DeductionsList: typeof import("./DeductionsList/DeductionsList").DeductionsList;
|
|
10
|
-
}
|
|
11
|
-
export declare const DeductionsContextual: () => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function Deductions({ employeeId, dictionary, onEvent }: DeductionsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,59 +1,32 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { useGarnishmentsListSuspense as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
m,
|
|
24
|
-
x,
|
|
25
|
-
(s) => ({
|
|
26
|
-
...s,
|
|
27
|
-
component: u,
|
|
28
|
-
employeeId: o,
|
|
29
|
-
currentDeductionId: null,
|
|
30
|
-
hasExistingDeductions: t
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { createMachine as c } from "robot3";
|
|
3
|
+
import { useMemo as u } from "react";
|
|
4
|
+
import { useGarnishmentsListSuspense as a } from "@gusto/embedded-api/react-query/garnishmentsList";
|
|
5
|
+
import { DeductionsListContextual as p, IncludeDeductionsContextual as d } from "./deductionsContextualComponents.js";
|
|
6
|
+
import { deductionsMachine as f } from "./stateMachine.js";
|
|
7
|
+
import { Flow as D } from "../../Flow/Flow.js";
|
|
8
|
+
import { BaseBoundaries as l } from "../../Base/Base.js";
|
|
9
|
+
import { useComponentDictionary as h, useI18n as x } from "../../../i18n/I18n.js";
|
|
10
|
+
function A({ employeeId: o, dictionary: t, onEvent: e }) {
|
|
11
|
+
return /* @__PURE__ */ s(l, { componentName: "Employee.Deductions", children: /* @__PURE__ */ s(C, { employeeId: o, dictionary: t, onEvent: e }) });
|
|
12
|
+
}
|
|
13
|
+
function C({ employeeId: o, dictionary: t, onEvent: e }) {
|
|
14
|
+
h("Employee.Deductions", t), x("Employee.Deductions");
|
|
15
|
+
const { data: r } = a({ employeeId: o }), n = (r.garnishments ?? []).some((i) => i.active), m = u(
|
|
16
|
+
() => c(
|
|
17
|
+
n ? "list" : "include",
|
|
18
|
+
f,
|
|
19
|
+
(i) => ({
|
|
20
|
+
...i,
|
|
21
|
+
component: n ? p : d,
|
|
22
|
+
employeeId: o
|
|
31
23
|
})
|
|
32
24
|
),
|
|
33
|
-
[
|
|
25
|
+
[o, n]
|
|
34
26
|
);
|
|
35
|
-
return /* @__PURE__ */
|
|
36
|
-
}
|
|
37
|
-
function e(o) {
|
|
38
|
-
return /* @__PURE__ */ n(E, { ...o, children: /* @__PURE__ */ n(M, { ...o }) });
|
|
27
|
+
return /* @__PURE__ */ s(D, { machine: m, onEvent: e });
|
|
39
28
|
}
|
|
40
|
-
const N = () => {
|
|
41
|
-
const { employeeId: o, onEvent: i } = L(), { t: r } = l("common");
|
|
42
|
-
if (!o)
|
|
43
|
-
throw new Error(
|
|
44
|
-
r("errors.missingParamsOrContext", {
|
|
45
|
-
component: "Deductions",
|
|
46
|
-
param: "employeeId",
|
|
47
|
-
provider: "FlowProvider"
|
|
48
|
-
})
|
|
49
|
-
);
|
|
50
|
-
return /* @__PURE__ */ n(e, { employeeId: o, onEvent: i });
|
|
51
|
-
};
|
|
52
|
-
e.IncludeDeductions = g;
|
|
53
|
-
e.DeductionsForm = C;
|
|
54
|
-
e.DeductionsList = F;
|
|
55
29
|
export {
|
|
56
|
-
|
|
57
|
-
N as DeductionsContextual
|
|
30
|
+
A as Deductions
|
|
58
31
|
};
|
|
59
32
|
//# sourceMappingURL=Deductions.js.map
|