@gusto/embedded-react-sdk 0.57.1 → 0.57.3
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 +33 -0
- package/dist/components/Base/Base.js +2 -3
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.js +32 -32
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.js.map +1 -1
- package/dist/components/Common/OnboardingStatusBadge/index.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +6 -8
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +8 -10
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -6
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +6 -8
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -6
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/TitleSelect.js +10 -11
- package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -8
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +8 -9
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -6
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +10 -12
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +11 -13
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +5 -7
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -6
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Actions.js +7 -9
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +8 -11
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Actions.js +5 -7
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +6 -9
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Edit.js +10 -12
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +8 -10
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -6
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Actions.js +6 -8
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +11 -13
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -6
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +3 -6
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleForm.js +66 -62
- package/dist/components/Company/PaySchedule/PayScheduleForm.js.map +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleForm.module.scss.js +2 -2
- package/dist/components/Company/PaySchedule/management/AutoPilotDialog/AutoPilotDialog.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/AutoPilotDialog/useAutoPilotDialog.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentCompensationStepPresentation.js +34 -14
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentCompensationStepPresentation.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentDepartmentStepPresentation.js +106 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentDepartmentStepPresentation.js.map +1 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentEmployeeStepPresentation.js +136 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentEmployeeStepPresentation.js.map +1 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentScheduleStepPresentation.js +38 -20
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentScheduleStepPresentation.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentTypeStepPresentation.js +78 -44
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentTypeStepPresentation.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignment.js +45 -37
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignment.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignmentComponents.js +253 -92
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignmentComponents.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/departmentAccess.js +22 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/departmentAccess.js.map +1 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/employeeJob.js +13 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/employeeJob.js.map +1 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/payScheduleAssignmentStateMachine.js +48 -43
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/payScheduleAssignmentStateMachine.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/scheduleLabel.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/useAssignableEmployees.js +57 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/useAssignableEmployees.js.map +1 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleCompensationOverviewPresentation.js +11 -13
- package/dist/components/Company/PaySchedule/management/PayScheduleCompensationOverviewPresentation.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/PayScheduleDepartmentOverviewPresentation.js +83 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleDepartmentOverviewPresentation.js.map +1 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleEmployeeOverviewPresentation.js +84 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleEmployeeOverviewPresentation.js.map +1 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleManagementComponents.js +49 -44
- package/dist/components/Company/PaySchedule/management/PayScheduleManagementComponents.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/PayScheduleOverview.js +109 -39
- package/dist/components/Company/PaySchedule/management/PayScheduleOverview.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/PayScheduleOverviewPresentation.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/payScheduleManagementStateMachine.js.map +1 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +5 -7
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -6
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +6 -8
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -6
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/TaxRateManagement/context.js +3 -6
- package/dist/components/Company/StateTaxes/TaxRateManagement/context.js.map +1 -1
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/useContractorAddressForm.js +5 -5
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/useContractorAddressForm.js.map +1 -1
- package/dist/components/Contractor/Address/shared/useContractorAddressSummary/useContractorAddressSummary.js +1 -1
- package/dist/components/Contractor/Address/shared/useContractorAddressSummary/useContractorAddressSummary.js.map +1 -1
- package/dist/components/Contractor/Compensation/management/CompensationCard/CompensationCard.js +16 -17
- package/dist/components/Contractor/Compensation/management/CompensationCard/CompensationCard.js.map +1 -1
- package/dist/components/Contractor/Compensation/shared/useContractorCompensationSummary/useContractorCompensationSummary.js +4 -4
- package/dist/components/Contractor/Compensation/shared/useContractorCompensationSummary/useContractorCompensationSummary.js.map +1 -1
- package/dist/components/Contractor/Compensation/shared/useContractorPayForm/useContractorPayForm.js +3 -3
- package/dist/components/Contractor/Compensation/shared/useContractorPayForm/useContractorPayForm.js.map +1 -1
- package/dist/components/Contractor/ContractorList/shared/useContractorList.js +6 -6
- package/dist/components/Contractor/ContractorList/shared/useContractorList.js.map +1 -1
- package/dist/components/Contractor/Dashboard/Dashboard.js +20 -20
- package/dist/components/Contractor/Dashboard/Dashboard.js.map +1 -1
- package/dist/components/Contractor/Dismissal/useDismissal/useDismissal.js +10 -10
- package/dist/components/Contractor/Dismissal/useDismissal/useDismissal.js.map +1 -1
- package/dist/components/Contractor/Documents/management/DocumentsCard/DocumentsCard.js +8 -9
- package/dist/components/Contractor/Documents/management/DocumentsCard/DocumentsCard.js.map +1 -1
- package/dist/components/Contractor/Landing/Landing.js +43 -39
- package/dist/components/Contractor/Landing/Landing.js.map +1 -1
- package/dist/components/Contractor/NewHireReport/NewHireReport.js +3 -3
- package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/shared/ContractorBankAccountFormBody/ContractorBankAccountFormBody.js +6 -8
- package/dist/components/Contractor/PaymentMethod/shared/ContractorBankAccountFormBody/ContractorBankAccountFormBody.js.map +1 -1
- package/dist/components/Contractor/Payments/CreateHistoricalPayment/CreateHistoricalPayment.js +1 -1
- package/dist/components/Contractor/Payments/CreateHistoricalPayment/CreateHistoricalPayment.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +10 -10
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
- package/dist/components/Contractor/Payments/HistoricalPaymentSummary/HistoricalPaymentSummary.js +4 -4
- package/dist/components/Contractor/Payments/HistoricalPaymentSummary/HistoricalPaymentSummary.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js +8 -8
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js +5 -5
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js +3 -3
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js.map +1 -1
- package/dist/components/Contractor/Profile/management/ProfileCard/ProfileCard.js +26 -27
- package/dist/components/Contractor/Profile/management/ProfileCard/ProfileCard.js.map +1 -1
- package/dist/components/Contractor/Profile/management/ProfileEditForm.js +11 -11
- package/dist/components/Contractor/Profile/onboarding/SelfOnboardingContractorProfile.js +1 -1
- package/dist/components/Contractor/Profile/onboarding/SelfOnboardingContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/useContractorDetailsForm.js +1 -1
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/useContractorDetailsForm.js.map +1 -1
- package/dist/components/Contractor/Profile/shared/useContractorProfileSummary/useContractorProfileSummary.js +1 -1
- package/dist/components/Contractor/Profile/shared/useContractorProfileSummary/useContractorProfileSummary.js.map +1 -1
- package/dist/components/Contractor/SelfOnboardingFlow/SelfOnboardingComponents.js +2 -9
- package/dist/components/Contractor/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +18 -18
- package/dist/components/Contractor/Submit/Submit.js.map +1 -1
- package/dist/components/Contractor/shared/SelectContractors/useSelectContractors.js +6 -6
- package/dist/components/Contractor/shared/SelectContractors/useSelectContractors.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js +25 -25
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationManagement/useCompensationManagement.js +15 -15
- package/dist/components/Employee/Compensation/shared/useCompensationManagement/useCompensationManagement.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js +1 -1
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js.map +1 -1
- package/dist/components/Employee/Dashboard/Dashboard.js +25 -25
- package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
- package/dist/components/Employee/Deductions/management/DeductionsCard/DeductionsCard.js +12 -13
- package/dist/components/Employee/Deductions/management/DeductionsCard/DeductionsCard.js.map +1 -1
- package/dist/components/Employee/Documents/management/DocumentsCard/DocumentsCard.js +12 -13
- package/dist/components/Employee/Documents/management/DocumentsCard/DocumentsCard.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Actions.js +6 -8
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +3 -6
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js +7 -7
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js +1 -1
- package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/management/FederalTaxesEditForm.js +3 -4
- package/dist/components/Employee/FederalTaxes/management/FederalTaxesEditForm.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js +3 -4
- package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js.map +1 -1
- package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js +6 -6
- package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.js +37 -33
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +27 -27
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/shared/BankFormBody/BankFormBody.js +22 -24
- package/dist/components/Employee/PaymentMethod/shared/BankFormBody/BankFormBody.js.map +1 -1
- package/dist/components/Employee/Paystubs/management/PaystubsCard/PaystubsCard.js +8 -9
- package/dist/components/Employee/Paystubs/management/PaystubsCard/PaystubsCard.js.map +1 -1
- package/dist/components/Employee/Profile/management/ProfileCard/ProfileCard.js +14 -15
- package/dist/components/Employee/Profile/management/ProfileCard/ProfileCard.js.map +1 -1
- package/dist/components/Employee/Profile/management/ProfileEditForm.js +1 -1
- package/dist/components/Employee/Profile/onboarding/EmployeeProfile.js +1 -1
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.js +6 -6
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useEmployeeProfileSummary/useEmployeeProfileSummary.js +1 -1
- package/dist/components/Employee/Profile/shared/useEmployeeProfileSummary/useEmployeeProfileSummary.js.map +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js +8 -15
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -1
- package/dist/components/Employee/StateTaxes/management/StateTaxesEditForm.js +7 -8
- package/dist/components/Employee/StateTaxes/management/StateTaxesEditForm.js.map +1 -1
- package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.js +7 -8
- package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js +11 -11
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.js +12 -12
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js +26 -26
- package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +56 -54
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +14 -16
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +6 -8
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +9 -11
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +66 -64
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +1 -1
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +6 -6
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/usePayrollEditEmployeeForm.js +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/usePayrollEditEmployeeForm.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +75 -89
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +9 -9
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +44 -46
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreation.js +63 -61
- package/dist/components/Payroll/TransitionCreation/TransitionCreation.js.map +1 -1
- package/dist/components/Payroll/TransitionPayroll/useResolveTransitionPayroll.js +14 -13
- package/dist/components/Payroll/TransitionPayroll/useResolveTransitionPayroll.js.map +1 -1
- package/dist/components/Payroll/helpers.js +53 -49
- package/dist/components/Payroll/helpers.js.map +1 -1
- package/dist/components/Payroll/payrollTypes.js +1 -1
- package/dist/components/Payroll/payrollTypes.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +13 -16
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/Payroll/useUnprocessedTransitionPayPeriods.js +2 -2
- package/dist/components/Payroll/useUnprocessedTransitionPayPeriods.js.map +1 -1
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js +2 -4
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js.map +1 -1
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js +6 -8
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js.map +1 -1
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js +28 -30
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js.map +1 -1
- package/dist/contexts/ApiProvider/payrollOffCycleReasonEnumHook.js +1 -1
- package/dist/contexts/ApiProvider/payrollOffCycleReasonEnumHook.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +2 -4
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/helpers/dateFormatting.js +47 -40
- package/dist/helpers/dateFormatting.js.map +1 -1
- package/dist/i18n/en/Company.Management.PaySchedule.json.js +37 -17
- package/dist/i18n/en/Company.Management.PaySchedule.json.js.map +1 -1
- package/dist/i18n/en/Company.Management.PayScheduleAssignment.json.js +20 -10
- package/dist/i18n/en/Company.Management.PayScheduleAssignment.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollHistory.json.js +5 -5
- package/dist/i18n/en/Payroll.PayrollList.json.js +5 -5
- package/dist/i18n/en/Payroll.PayrollOverview.json.js +1 -1
- package/dist/package.json.js +1 -1
- package/dist/partner-hook-utils/form/fields/CheckboxHookField.js +8 -10
- package/dist/partner-hook-utils/form/fields/CheckboxHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.js +12 -14
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js +13 -15
- package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/SelectHookField.js +10 -12
- package/dist/partner-hook-utils/form/fields/SelectHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/SwitchHookField.js +14 -16
- package/dist/partner-hook-utils/form/fields/SwitchHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/TextInputHookField.js +8 -10
- package/dist/partner-hook-utils/form/fields/TextInputHookField.js.map +1 -1
- package/dist/shared/constants.js +5 -5
- package/dist/shared/constants.js.map +1 -1
- package/dist/src/components/Common/DateRangeFilter/DateRangeFilter.d.ts +2 -2
- package/dist/src/components/Common/OnboardingStatusBadge/index.d.ts +1 -1
- package/dist/src/components/Company/PaySchedule/PayScheduleForm.d.ts +6 -0
- package/dist/src/components/Company/PaySchedule/management/AutoPilotDialog/AutoPilotDialog.d.ts +1 -1
- package/dist/src/components/Company/PaySchedule/management/AutoPilotDialog/useAutoPilotDialog.d.ts +1 -1
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentCompensationStepPresentation.d.ts +10 -3
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentDepartmentStepPresentation.d.ts +21 -0
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentEmployeeStepPresentation.d.ts +34 -0
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentScheduleStepPresentation.d.ts +9 -3
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentTypeStepPresentation.d.ts +5 -1
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignment.d.ts +10 -10
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignmentComponents.d.ts +12 -4
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/departmentAccess.d.ts +19 -0
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/employeeJob.d.ts +17 -0
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/scheduleLabel.d.ts +1 -1
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/useAssignableEmployees.d.ts +34 -0
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/usePayScheduleAssignment.d.ts +16 -3
- package/dist/src/components/Company/PaySchedule/management/PayScheduleCompensationOverviewPresentation.d.ts +1 -1
- package/dist/src/components/Company/PaySchedule/management/PayScheduleDepartmentOverviewPresentation.d.ts +23 -0
- package/dist/src/components/Company/PaySchedule/management/PayScheduleEmployeeOverviewPresentation.d.ts +25 -0
- package/dist/src/components/Company/PaySchedule/management/PayScheduleManagementComponents.d.ts +1 -1
- package/dist/src/components/Company/PaySchedule/management/PayScheduleOverviewPresentation.d.ts +1 -1
- package/dist/src/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.d.ts +1 -1
- package/dist/src/components/Contractor/Landing/Landing.d.ts +5 -2
- package/dist/src/components/Employee/Landing/Landing.d.ts +5 -2
- package/dist/src/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +1 -1
- package/dist/src/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +1 -1
- package/dist/src/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +1 -1
- package/dist/src/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/usePayrollEditEmployeeForm.d.ts +2 -2
- package/dist/src/components/Payroll/PayrollHistory/PayrollHistoryPresentation.d.ts +1 -1
- package/dist/src/components/Payroll/PayrollList/PayrollListPresentation.d.ts +2 -2
- package/dist/src/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +1 -1
- package/dist/src/components/Payroll/helpers.d.ts +22 -2
- package/dist/src/components/Payroll/usePreparedPayrollData.d.ts +2 -2
- package/dist/src/helpers/dateFormatting.d.ts +13 -0
- package/dist/src/i18n/types.d.ts +96 -6
- package/dist/src/models/external.d.ts +63 -48
- package/dist/src/shared/constants.d.ts +1 -1
- package/dist/style.css +1 -1
- package/docs/guides/endpoint-inventory.json +33 -13
- package/package.json +21 -21
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
2
2
|
import { z as a } from "zod";
|
|
3
3
|
import { useForm as f, FormProvider as P } from "react-hook-form";
|
|
4
4
|
import { zodResolver as b } from "@hookform/resolvers/zod";
|
|
5
|
-
import { useTranslation as
|
|
6
|
-
import { scheduleLabel as
|
|
5
|
+
import { useTranslation as g } from "react-i18next";
|
|
6
|
+
import { scheduleLabel as C } from "./scheduleLabel.js";
|
|
7
7
|
import { Flex as m } from "../../../../Common/Flex/Flex.js";
|
|
8
8
|
import { ActionsLayout as v } from "../../../../Common/ActionsLayout/ActionsLayout.js";
|
|
9
9
|
import { Form as x } from "../../../../Common/Form/Form.js";
|
|
@@ -13,7 +13,7 @@ const D = a.object({
|
|
|
13
13
|
hourlyPayScheduleUuid: a.string().min(1),
|
|
14
14
|
salariedPayScheduleUuid: a.string().min(1)
|
|
15
15
|
});
|
|
16
|
-
function
|
|
16
|
+
function H({
|
|
17
17
|
schedules: i,
|
|
18
18
|
hourlyPayScheduleUuid: u,
|
|
19
19
|
salariedPayScheduleUuid: s,
|
|
@@ -21,27 +21,28 @@ function V({
|
|
|
21
21
|
onAddPaySchedule: h,
|
|
22
22
|
onContinue: S
|
|
23
23
|
}) {
|
|
24
|
-
const { t: o } =
|
|
24
|
+
const { t: o } = g("Company.Management.PayScheduleAssignment"), n = U(), t = f({
|
|
25
25
|
resolver: b(D),
|
|
26
26
|
defaultValues: {
|
|
27
27
|
hourlyPayScheduleUuid: u ?? i[0]?.uuid ?? "",
|
|
28
28
|
salariedPayScheduleUuid: s ?? i[0]?.uuid ?? ""
|
|
29
29
|
}
|
|
30
|
-
}), y =
|
|
30
|
+
}), y = t.handleSubmit(S), l = i.map((d) => ({
|
|
31
31
|
value: d.uuid,
|
|
32
|
-
label:
|
|
32
|
+
label: C(d)
|
|
33
33
|
}));
|
|
34
|
-
return /* @__PURE__ */ e(P, { ...
|
|
34
|
+
return /* @__PURE__ */ e(P, { ...t, children: /* @__PURE__ */ e(x, { onSubmit: () => {
|
|
35
35
|
y();
|
|
36
|
-
}, children: /* @__PURE__ */
|
|
36
|
+
}, children: /* @__PURE__ */ r(m, { flexDirection: "column", gap: 32, children: [
|
|
37
37
|
/* @__PURE__ */ e(n.Heading, { as: "h2", children: o("compensationStep.heading") }),
|
|
38
|
-
/* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */ r(m, { flexDirection: "column", gap: 12, children: [
|
|
39
39
|
/* @__PURE__ */ e(
|
|
40
40
|
c,
|
|
41
41
|
{
|
|
42
42
|
name: "hourlyPayScheduleUuid",
|
|
43
43
|
label: o("compensationStep.hourlyPayScheduleLabel"),
|
|
44
44
|
description: o("compensationStep.hourlyPayScheduleDescription"),
|
|
45
|
+
isRequired: !0,
|
|
45
46
|
placeholder: "",
|
|
46
47
|
options: l
|
|
47
48
|
}
|
|
@@ -52,19 +53,38 @@ function V({
|
|
|
52
53
|
name: "salariedPayScheduleUuid",
|
|
53
54
|
label: o("compensationStep.salariedPayScheduleLabel"),
|
|
54
55
|
description: o("compensationStep.salariedPayScheduleDescription"),
|
|
56
|
+
isRequired: !0,
|
|
55
57
|
placeholder: "",
|
|
56
58
|
options: l
|
|
57
59
|
}
|
|
58
60
|
),
|
|
59
|
-
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
61
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
62
|
+
n.Button,
|
|
63
|
+
{
|
|
64
|
+
variant: "secondary",
|
|
65
|
+
onClick: () => {
|
|
66
|
+
h(t.getValues());
|
|
67
|
+
},
|
|
68
|
+
children: o("compensationStep.addPayScheduleCta")
|
|
69
|
+
}
|
|
70
|
+
) })
|
|
60
71
|
] }),
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
-
/* @__PURE__ */ e(
|
|
72
|
+
/* @__PURE__ */ r(v, { children: [
|
|
73
|
+
/* @__PURE__ */ e(
|
|
74
|
+
n.Button,
|
|
75
|
+
{
|
|
76
|
+
variant: "secondary",
|
|
77
|
+
onClick: () => {
|
|
78
|
+
p(t.getValues());
|
|
79
|
+
},
|
|
80
|
+
children: o("backCta")
|
|
81
|
+
}
|
|
82
|
+
),
|
|
63
83
|
/* @__PURE__ */ e(n.Button, { variant: "primary", type: "submit", isDisabled: i.length === 0, children: o("continueCta") })
|
|
64
84
|
] })
|
|
65
85
|
] }) }) });
|
|
66
86
|
}
|
|
67
87
|
export {
|
|
68
|
-
|
|
88
|
+
H as AssignmentCompensationStepPresentation
|
|
69
89
|
};
|
|
70
90
|
//# sourceMappingURL=AssignmentCompensationStepPresentation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssignmentCompensationStepPresentation.js","sources":["../../../../../../src/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentCompensationStepPresentation.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useForm, FormProvider } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useTranslation } from 'react-i18next'\nimport type { PayScheduleShow } from '@gusto/embedded-api/models/components/
|
|
1
|
+
{"version":3,"file":"AssignmentCompensationStepPresentation.js","sources":["../../../../../../src/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentCompensationStepPresentation.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useForm, FormProvider } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useTranslation } from 'react-i18next'\nimport type { PayScheduleShow } from '@gusto/embedded-api/models/components/payschedulelistitem'\nimport { scheduleLabel } from './scheduleLabel'\nimport { Flex, SelectField, ActionsLayout } from '@/components/Common'\nimport { Form } from '@/components/Common/Form'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n/** @internal */\nexport interface AssignmentCompensationStepPresentationProps {\n schedules: PayScheduleShow[]\n hourlyPayScheduleUuid?: string\n salariedPayScheduleUuid?: string\n onBack: (selection: CompensationStepInputs) => void\n onAddPaySchedule: (selection: CompensationStepInputs) => void\n onContinue: (selection: {\n hourlyPayScheduleUuid: string\n salariedPayScheduleUuid: string\n }) => void\n}\n\nconst CompensationStepSchema = z.object({\n hourlyPayScheduleUuid: z.string().min(1),\n salariedPayScheduleUuid: z.string().min(1),\n})\n\ntype CompensationStepInputs = z.infer<typeof CompensationStepSchema>\n\n/** @internal */\nexport function AssignmentCompensationStepPresentation({\n schedules,\n hourlyPayScheduleUuid,\n salariedPayScheduleUuid,\n onBack,\n onAddPaySchedule,\n onContinue,\n}: AssignmentCompensationStepPresentationProps) {\n const { t } = useTranslation('Company.Management.PayScheduleAssignment')\n const Components = useComponentContext()\n\n const formMethods = useForm<CompensationStepInputs>({\n resolver: zodResolver(CompensationStepSchema),\n defaultValues: {\n hourlyPayScheduleUuid: hourlyPayScheduleUuid ?? schedules[0]?.uuid ?? '',\n salariedPayScheduleUuid: salariedPayScheduleUuid ?? schedules[0]?.uuid ?? '',\n },\n })\n\n const handleSubmit = formMethods.handleSubmit(onContinue)\n\n const options = schedules.map(schedule => ({\n value: schedule.uuid,\n label: scheduleLabel(schedule),\n }))\n\n return (\n <FormProvider {...formMethods}>\n <Form onSubmit={() => void handleSubmit()}>\n <Flex flexDirection=\"column\" gap={32}>\n <Components.Heading as=\"h2\">{t('compensationStep.heading')}</Components.Heading>\n <Flex flexDirection=\"column\" gap={12}>\n <SelectField\n name=\"hourlyPayScheduleUuid\"\n label={t('compensationStep.hourlyPayScheduleLabel')}\n description={t('compensationStep.hourlyPayScheduleDescription')}\n isRequired\n placeholder=\"\"\n options={options}\n />\n <SelectField\n name=\"salariedPayScheduleUuid\"\n label={t('compensationStep.salariedPayScheduleLabel')}\n description={t('compensationStep.salariedPayScheduleDescription')}\n isRequired\n placeholder=\"\"\n options={options}\n />\n <div>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n onAddPaySchedule(formMethods.getValues())\n }}\n >\n {t('compensationStep.addPayScheduleCta')}\n </Components.Button>\n </div>\n </Flex>\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n onBack(formMethods.getValues())\n }}\n >\n {t('backCta')}\n </Components.Button>\n <Components.Button variant=\"primary\" type=\"submit\" isDisabled={schedules.length === 0}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n </Form>\n </FormProvider>\n )\n}\n"],"names":["CompensationStepSchema","z","AssignmentCompensationStepPresentation","schedules","hourlyPayScheduleUuid","salariedPayScheduleUuid","onBack","onAddPaySchedule","onContinue","t","useTranslation","Components","useComponentContext","formMethods","useForm","zodResolver","handleSubmit","options","schedule","scheduleLabel","FormProvider","jsx","Form","jsxs","Flex","SelectField","ActionsLayout"],"mappings":";;;;;;;;;;;AAuBA,MAAMA,IAAyBC,EAAE,OAAO;AAAA,EACtC,uBAAuBA,EAAE,SAAS,IAAI,CAAC;AAAA,EACvC,yBAAyBA,EAAE,OAAA,EAAS,IAAI,CAAC;AAC3C,CAAC;AAKM,SAASC,EAAuC;AAAA,EACrD,WAAAC;AAAA,EACA,uBAAAC;AAAA,EACA,yBAAAC;AAAA,EACA,QAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,YAAAC;AACF,GAAgD;AAC9C,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,0CAA0C,GACjEC,IAAaC,EAAA,GAEbC,IAAcC,EAAgC;AAAA,IAClD,UAAUC,EAAYf,CAAsB;AAAA,IAC5C,eAAe;AAAA,MACb,uBAAuBI,KAAyBD,EAAU,CAAC,GAAG,QAAQ;AAAA,MACtE,yBAAyBE,KAA2BF,EAAU,CAAC,GAAG,QAAQ;AAAA,IAAA;AAAA,EAC5E,CACD,GAEKa,IAAeH,EAAY,aAA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O,EAAY,WAAW;AAAA,UAChC;AAAA,UAEC,YAAE,SAAS;AAAA,QAAA;AAAA,MAAA;AAAA,MAEd,gBAAAQ,EAACV,EAAW,QAAX,EAAkB,SAAQ,WAAU,MAAK,UAAS,YAAYR,EAAU,WAAW,GACjF,UAAAM,EAAE,aAAa,EAAA,CAClB;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,EAAA,CACF,GACF,GACF;AAEJ;"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { jsx as t, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { z as d } from "zod";
|
|
3
|
+
import { useForm as b, FormProvider as U } from "react-hook-form";
|
|
4
|
+
import { zodResolver as P } from "@hookform/resolvers/zod";
|
|
5
|
+
import { useTranslation as D } from "react-i18next";
|
|
6
|
+
import { scheduleLabel as C } from "./scheduleLabel.js";
|
|
7
|
+
import { Flex as s } from "../../../../Common/Flex/Flex.js";
|
|
8
|
+
import { ActionsLayout as v } from "../../../../Common/ActionsLayout/ActionsLayout.js";
|
|
9
|
+
import { Form as x } from "../../../../Common/Form/Form.js";
|
|
10
|
+
import { useComponentContext as B } from "../../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
11
|
+
import { SelectField as h } from "../../../../Common/Fields/SelectField/SelectField.js";
|
|
12
|
+
const F = d.object({
|
|
13
|
+
defaultPayScheduleUuid: d.string().min(1),
|
|
14
|
+
payScheduleByDepartment: d.record(d.string(), d.string().min(1))
|
|
15
|
+
});
|
|
16
|
+
function O({
|
|
17
|
+
departments: m,
|
|
18
|
+
schedules: p,
|
|
19
|
+
selection: u,
|
|
20
|
+
onBack: S,
|
|
21
|
+
onAddPaySchedule: f,
|
|
22
|
+
onContinue: y
|
|
23
|
+
}) {
|
|
24
|
+
const { t: a } = D("Company.Management.PayScheduleAssignment"), n = B(), r = b({
|
|
25
|
+
resolver: P(F),
|
|
26
|
+
shouldUnregister: !0,
|
|
27
|
+
defaultValues: {
|
|
28
|
+
defaultPayScheduleUuid: u.defaultPayScheduleUuid,
|
|
29
|
+
payScheduleByDepartment: Object.fromEntries(
|
|
30
|
+
u.departments.map((e) => [e.departmentUuid, e.payScheduleUuid])
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
}), o = (e) => ({
|
|
34
|
+
defaultPayScheduleUuid: e.defaultPayScheduleUuid,
|
|
35
|
+
departments: m.flatMap(
|
|
36
|
+
(i) => i.uuid ? [
|
|
37
|
+
{
|
|
38
|
+
departmentUuid: i.uuid,
|
|
39
|
+
payScheduleUuid: e.payScheduleByDepartment[i.uuid] ?? ""
|
|
40
|
+
}
|
|
41
|
+
] : []
|
|
42
|
+
)
|
|
43
|
+
}), g = r.handleSubmit((e) => {
|
|
44
|
+
y(o(e));
|
|
45
|
+
}), c = p.map((e) => ({
|
|
46
|
+
value: e.uuid,
|
|
47
|
+
label: C(e)
|
|
48
|
+
}));
|
|
49
|
+
return /* @__PURE__ */ t(U, { ...r, children: /* @__PURE__ */ t(x, { onSubmit: () => {
|
|
50
|
+
g();
|
|
51
|
+
}, children: /* @__PURE__ */ l(s, { flexDirection: "column", gap: 32, children: [
|
|
52
|
+
/* @__PURE__ */ t(n.Heading, { as: "h2", children: a("departmentStep.heading") }),
|
|
53
|
+
/* @__PURE__ */ l(s, { flexDirection: "column", gap: 12, children: [
|
|
54
|
+
m.map((e) => /* @__PURE__ */ t(
|
|
55
|
+
h,
|
|
56
|
+
{
|
|
57
|
+
name: `payScheduleByDepartment.${e.uuid}`,
|
|
58
|
+
defaultValue: u.departments.find((i) => i.departmentUuid === e.uuid)?.payScheduleUuid ?? "",
|
|
59
|
+
label: e.title ?? a("departmentStep.unnamedDepartment"),
|
|
60
|
+
isRequired: !0,
|
|
61
|
+
placeholder: "",
|
|
62
|
+
options: c
|
|
63
|
+
},
|
|
64
|
+
e.uuid
|
|
65
|
+
)),
|
|
66
|
+
/* @__PURE__ */ t(
|
|
67
|
+
h,
|
|
68
|
+
{
|
|
69
|
+
name: "defaultPayScheduleUuid",
|
|
70
|
+
label: a("departmentStep.defaultPayScheduleLabel"),
|
|
71
|
+
description: a("departmentStep.defaultPayScheduleDescription"),
|
|
72
|
+
isRequired: !0,
|
|
73
|
+
placeholder: "",
|
|
74
|
+
options: c
|
|
75
|
+
}
|
|
76
|
+
),
|
|
77
|
+
/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
78
|
+
n.Button,
|
|
79
|
+
{
|
|
80
|
+
variant: "secondary",
|
|
81
|
+
onClick: () => {
|
|
82
|
+
f(o(r.getValues()));
|
|
83
|
+
},
|
|
84
|
+
children: a("departmentStep.addPayScheduleCta")
|
|
85
|
+
}
|
|
86
|
+
) })
|
|
87
|
+
] }),
|
|
88
|
+
/* @__PURE__ */ l(v, { children: [
|
|
89
|
+
/* @__PURE__ */ t(
|
|
90
|
+
n.Button,
|
|
91
|
+
{
|
|
92
|
+
variant: "secondary",
|
|
93
|
+
onClick: () => {
|
|
94
|
+
S(o(r.getValues()));
|
|
95
|
+
},
|
|
96
|
+
children: a("backCta")
|
|
97
|
+
}
|
|
98
|
+
),
|
|
99
|
+
/* @__PURE__ */ t(n.Button, { variant: "primary", type: "submit", isDisabled: p.length === 0, children: a("continueCta") })
|
|
100
|
+
] })
|
|
101
|
+
] }) }) });
|
|
102
|
+
}
|
|
103
|
+
export {
|
|
104
|
+
O as AssignmentDepartmentStepPresentation
|
|
105
|
+
};
|
|
106
|
+
//# sourceMappingURL=AssignmentDepartmentStepPresentation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssignmentDepartmentStepPresentation.js","sources":["../../../../../../src/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentDepartmentStepPresentation.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useForm, FormProvider } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useTranslation } from 'react-i18next'\nimport type { Department } from '@gusto/embedded-api/models/components/department'\nimport type { PayScheduleShow } from '@gusto/embedded-api/models/components/payschedulelistitem'\nimport { scheduleLabel } from './scheduleLabel'\nimport { Flex, SelectField, ActionsLayout } from '@/components/Common'\nimport { Form } from '@/components/Common/Form'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nconst DepartmentStepSchema = z.object({\n defaultPayScheduleUuid: z.string().min(1),\n payScheduleByDepartment: z.record(z.string(), z.string().min(1)),\n})\n\n/** @internal */\nexport type DepartmentSelection = {\n defaultPayScheduleUuid: string\n departments: { departmentUuid: string; payScheduleUuid: string }[]\n}\n\n/** @internal */\nexport interface AssignmentDepartmentStepPresentationProps {\n departments: Department[]\n schedules: PayScheduleShow[]\n selection: DepartmentSelection\n onBack: (selection: DepartmentSelection) => void\n onAddPaySchedule: (selection: DepartmentSelection) => void\n onContinue: (selection: DepartmentSelection) => void\n}\n\n/** @internal */\nexport function AssignmentDepartmentStepPresentation({\n departments,\n schedules,\n selection,\n onBack,\n onAddPaySchedule,\n onContinue,\n}: AssignmentDepartmentStepPresentationProps) {\n const { t } = useTranslation('Company.Management.PayScheduleAssignment')\n const Components = useComponentContext()\n const formMethods = useForm<z.infer<typeof DepartmentStepSchema>>({\n resolver: zodResolver(DepartmentStepSchema),\n shouldUnregister: true,\n defaultValues: {\n defaultPayScheduleUuid: selection.defaultPayScheduleUuid,\n payScheduleByDepartment: Object.fromEntries(\n selection.departments.map(entry => [entry.departmentUuid, entry.payScheduleUuid]),\n ),\n },\n })\n const toSelection = (values: z.infer<typeof DepartmentStepSchema>): DepartmentSelection => ({\n defaultPayScheduleUuid: values.defaultPayScheduleUuid,\n departments: departments.flatMap(department =>\n department.uuid\n ? [\n {\n departmentUuid: department.uuid,\n payScheduleUuid: values.payScheduleByDepartment[department.uuid] ?? '',\n },\n ]\n : [],\n ),\n })\n const handleSubmit = formMethods.handleSubmit(values => {\n onContinue(toSelection(values))\n })\n const options = schedules.map(schedule => ({\n value: schedule.uuid,\n label: scheduleLabel(schedule),\n }))\n\n return (\n <FormProvider {...formMethods}>\n <Form onSubmit={() => void handleSubmit()}>\n <Flex flexDirection=\"column\" gap={32}>\n <Components.Heading as=\"h2\">{t('departmentStep.heading')}</Components.Heading>\n <Flex flexDirection=\"column\" gap={12}>\n {departments.map(department => (\n <SelectField\n key={department.uuid}\n name={`payScheduleByDepartment.${department.uuid}`}\n defaultValue={\n selection.departments.find(entry => entry.departmentUuid === department.uuid)\n ?.payScheduleUuid ?? ''\n }\n label={department.title ?? t('departmentStep.unnamedDepartment')}\n isRequired\n placeholder=\"\"\n options={options}\n />\n ))}\n <SelectField\n name=\"defaultPayScheduleUuid\"\n label={t('departmentStep.defaultPayScheduleLabel')}\n description={t('departmentStep.defaultPayScheduleDescription')}\n isRequired\n placeholder=\"\"\n options={options}\n />\n <div>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n onAddPaySchedule(toSelection(formMethods.getValues()))\n }}\n >\n {t('departmentStep.addPayScheduleCta')}\n </Components.Button>\n </div>\n </Flex>\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n onBack(toSelection(formMethods.getValues()))\n }}\n >\n {t('backCta')}\n </Components.Button>\n <Components.Button variant=\"primary\" type=\"submit\" isDisabled={schedules.length === 0}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n </Form>\n </FormProvider>\n )\n}\n"],"names":["DepartmentStepSchema","z","AssignmentDepartmentStepPresentation","departments","schedules","selection","onBack","onAddPaySchedule","onContinue","t","useTranslation","Components","useComponentContext","formMethods","useForm","zodResolver","entry","toSelection","values","department","handleSubmit","options","schedule","scheduleLabel","FormProvider","jsx","Form","jsxs","Flex","SelectField","ActionsLayout"],"mappings":";;;;;;;;;;;AAWA,MAAMA,IAAuBC,EAAE,OAAO;AAAA,EACpC,wBAAwBA,EAAE,SAAS,IAAI,CAAC;AAAA,EACxC,yBAAyBA,EAAE,OAAOA,EAAE,UAAUA,EAAE,OAAA,EAAS,IAAI,CAAC,CAAC;AACjE,CAAC;AAmBM,SAASC,EAAqC;AA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AAA,CACF;AAAA,EAAA,EAAA,CACF,GACF,GACF;AAEJ;"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { jsxs as m, Fragment as E, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useState as g } from "react";
|
|
3
|
+
import { useTranslation as x } from "react-i18next";
|
|
4
|
+
import { scheduleLabel as L } from "./scheduleLabel.js";
|
|
5
|
+
import { getPrimaryCompensation as M } from "./employeeJob.js";
|
|
6
|
+
import { firstLastName as p } from "../../../../../helpers/formattedStrings.js";
|
|
7
|
+
import { FlsaStatus as o } from "../../../../../shared/constants.js";
|
|
8
|
+
import { Flex as P } from "../../../../Common/Flex/Flex.js";
|
|
9
|
+
import { ActionsLayout as O } from "../../../../Common/ActionsLayout/ActionsLayout.js";
|
|
10
|
+
import { useClientPagination as _ } from "../../../../../hooks/useClientPagination/useClientPagination.js";
|
|
11
|
+
import { useComponentContext as T } from "../../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
12
|
+
import { useDataView as U } from "../../../../Common/DataView/useDataView.js";
|
|
13
|
+
import { DataView as B } from "../../../../Common/DataView/DataView.js";
|
|
14
|
+
function Y({
|
|
15
|
+
employees: l,
|
|
16
|
+
schedules: u,
|
|
17
|
+
selection: d,
|
|
18
|
+
onBack: c,
|
|
19
|
+
onAddPaySchedule: y,
|
|
20
|
+
onContinue: S
|
|
21
|
+
}) {
|
|
22
|
+
const { t } = x("Company.Management.PayScheduleAssignment"), n = T(), [h, f] = g({}), r = {
|
|
23
|
+
employees: l.map((e) => {
|
|
24
|
+
const a = h[e.uuid] ?? d.employees.find((s) => s.employeeUuid === e.uuid)?.payScheduleUuid ?? "";
|
|
25
|
+
return {
|
|
26
|
+
employeeUuid: e.uuid,
|
|
27
|
+
payScheduleUuid: u.some((s) => s.uuid === a) ? a : ""
|
|
28
|
+
};
|
|
29
|
+
})
|
|
30
|
+
}, { data: N, pagination: C } = _(l, { searchDebounceMs: 0 }), b = U({
|
|
31
|
+
data: N,
|
|
32
|
+
pagination: C,
|
|
33
|
+
columns: [
|
|
34
|
+
{
|
|
35
|
+
title: t("employeeStep.employeeLabel"),
|
|
36
|
+
render: (e) => /* @__PURE__ */ m(E, { children: [
|
|
37
|
+
p({ first_name: e.firstName, last_name: e.lastName }),
|
|
38
|
+
e.department && /* @__PURE__ */ i(n.Text, { variant: "supporting", size: "sm", children: e.department })
|
|
39
|
+
] })
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
title: t("employeeStep.typeLabel"),
|
|
43
|
+
render: (e) => {
|
|
44
|
+
switch (e.flsaStatus ?? M(e)?.flsaStatus) {
|
|
45
|
+
case o.EXEMPT:
|
|
46
|
+
case o.COMMISSION_ONLY_EXEMPT:
|
|
47
|
+
return t("employeeStep.types.salariedExempt");
|
|
48
|
+
case o.NONEXEMPT:
|
|
49
|
+
return t("employeeStep.types.hourly");
|
|
50
|
+
case o.SALARIED_NONEXEMPT:
|
|
51
|
+
case o.COMMISSION_ONLY_NONEXEMPT:
|
|
52
|
+
return t("employeeStep.types.salariedNonexempt");
|
|
53
|
+
case o.OWNER:
|
|
54
|
+
return t("employeeStep.types.owner");
|
|
55
|
+
default:
|
|
56
|
+
return "—";
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
title: t("employeeStep.payScheduleLabel"),
|
|
62
|
+
render: (e) => /* @__PURE__ */ i(
|
|
63
|
+
n.Select,
|
|
64
|
+
{
|
|
65
|
+
label: t("employeeStep.scheduleForEmployee", {
|
|
66
|
+
name: p({ first_name: e.firstName, last_name: e.lastName })
|
|
67
|
+
}),
|
|
68
|
+
shouldVisuallyHideLabel: !0,
|
|
69
|
+
isRequired: !0,
|
|
70
|
+
placeholder: "",
|
|
71
|
+
options: u.map((a) => ({
|
|
72
|
+
value: a.uuid,
|
|
73
|
+
label: L(a)
|
|
74
|
+
})),
|
|
75
|
+
value: r.employees.find((a) => a.employeeUuid === e.uuid)?.payScheduleUuid ?? "",
|
|
76
|
+
onChange: (a) => {
|
|
77
|
+
f((s) => ({ ...s, [e.uuid]: a }));
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
});
|
|
84
|
+
return /* @__PURE__ */ m(P, { flexDirection: "column", gap: 32, children: [
|
|
85
|
+
/* @__PURE__ */ i(n.Heading, { as: "h2", children: t("employeeStep.heading") }),
|
|
86
|
+
/* @__PURE__ */ i(
|
|
87
|
+
n.Box,
|
|
88
|
+
{
|
|
89
|
+
withPadding: !1,
|
|
90
|
+
header: /* @__PURE__ */ i(
|
|
91
|
+
n.BoxHeader,
|
|
92
|
+
{
|
|
93
|
+
title: t("employeeStep.employeesLabel"),
|
|
94
|
+
action: /* @__PURE__ */ i(
|
|
95
|
+
n.Button,
|
|
96
|
+
{
|
|
97
|
+
variant: "secondary",
|
|
98
|
+
onClick: () => {
|
|
99
|
+
y(r);
|
|
100
|
+
},
|
|
101
|
+
children: t("employeeStep.addPayScheduleCta")
|
|
102
|
+
}
|
|
103
|
+
)
|
|
104
|
+
}
|
|
105
|
+
),
|
|
106
|
+
children: /* @__PURE__ */ i(B, { label: t("employeeStep.tableLabel"), isWithinBox: !0, ...b })
|
|
107
|
+
}
|
|
108
|
+
),
|
|
109
|
+
/* @__PURE__ */ m(O, { children: [
|
|
110
|
+
/* @__PURE__ */ i(
|
|
111
|
+
n.Button,
|
|
112
|
+
{
|
|
113
|
+
variant: "secondary",
|
|
114
|
+
onClick: () => {
|
|
115
|
+
c(r);
|
|
116
|
+
},
|
|
117
|
+
children: t("backCta")
|
|
118
|
+
}
|
|
119
|
+
),
|
|
120
|
+
/* @__PURE__ */ i(
|
|
121
|
+
n.Button,
|
|
122
|
+
{
|
|
123
|
+
isDisabled: l.length === 0 || r.employees.some((e) => !e.payScheduleUuid),
|
|
124
|
+
onClick: () => {
|
|
125
|
+
S(r);
|
|
126
|
+
},
|
|
127
|
+
children: t("continueCta")
|
|
128
|
+
}
|
|
129
|
+
)
|
|
130
|
+
] })
|
|
131
|
+
] });
|
|
132
|
+
}
|
|
133
|
+
export {
|
|
134
|
+
Y as AssignmentEmployeeStepPresentation
|
|
135
|
+
};
|
|
136
|
+
//# sourceMappingURL=AssignmentEmployeeStepPresentation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssignmentEmployeeStepPresentation.js","sources":["../../../../../../src/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentEmployeeStepPresentation.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport type { ShowEmployees } from '@gusto/embedded-api/models/components/showemployees'\nimport type { PayScheduleShow } from '@gusto/embedded-api/models/components/payschedulelistitem'\nimport { scheduleLabel } from './scheduleLabel'\nimport { getPrimaryCompensation } from './employeeJob'\nimport { firstLastName } from '@/helpers/formattedStrings'\nimport { FlsaStatus } from '@/shared/constants'\nimport { ActionsLayout, DataView, Flex, useDataView } from '@/components/Common'\nimport { useClientPagination } from '@/hooks/useClientPagination/useClientPagination'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n/**\n * Employee UUIDs and their selected schedules.\n *\n * @internal\n */\nexport type EmployeeSelection = {\n employees: { employeeUuid: string; payScheduleUuid: string }[]\n}\n\n/**\n * Props for the paginated employee assignment picker.\n *\n * @internal\n */\nexport interface AssignmentEmployeeStepPresentationProps {\n employees: ShowEmployees[]\n schedules: PayScheduleShow[]\n selection: EmployeeSelection\n onBack: (selection: EmployeeSelection) => void\n onAddPaySchedule: (selection: EmployeeSelection) => void\n onContinue: (selection: EmployeeSelection) => void\n}\n\n/**\n * Renders a schedule picker for every employee, retaining choices across pages.\n *\n * @param props - Employee roster, schedule choices, draft, and navigation callbacks.\n * @returns The paginated employee assignment step.\n * @internal\n */\nexport function AssignmentEmployeeStepPresentation({\n employees,\n schedules,\n selection,\n onBack,\n onAddPaySchedule,\n onContinue,\n}: AssignmentEmployeeStepPresentationProps) {\n const { t } = useTranslation('Company.Management.PayScheduleAssignment')\n const Components = useComponentContext()\n const [choices, setChoices] = useState<Record<string, string>>({})\n const currentSelection: EmployeeSelection = {\n employees: employees.map(employee => {\n const uuid =\n choices[employee.uuid] ??\n selection.employees.find(entry => entry.employeeUuid === employee.uuid)?.payScheduleUuid ??\n ''\n return {\n employeeUuid: employee.uuid,\n payScheduleUuid: schedules.some(schedule => schedule.uuid === uuid) ? uuid : '',\n }\n }),\n }\n const { data, pagination } = useClientPagination(employees, { searchDebounceMs: 0 })\n const table = useDataView<ShowEmployees>({\n data,\n pagination,\n columns: [\n {\n title: t('employeeStep.employeeLabel'),\n render: employee => (\n <>\n {firstLastName({ first_name: employee.firstName, last_name: employee.lastName })}\n {employee.department && (\n <Components.Text variant=\"supporting\" size=\"sm\">\n {employee.department}\n </Components.Text>\n )}\n </>\n ),\n },\n {\n title: t('employeeStep.typeLabel'),\n render: employee => {\n const status = employee.flsaStatus ?? getPrimaryCompensation(employee)?.flsaStatus\n switch (status) {\n case FlsaStatus.EXEMPT:\n case FlsaStatus.COMMISSION_ONLY_EXEMPT:\n return t('employeeStep.types.salariedExempt')\n case FlsaStatus.NONEXEMPT:\n return t('employeeStep.types.hourly')\n case FlsaStatus.SALARIED_NONEXEMPT:\n case FlsaStatus.COMMISSION_ONLY_NONEXEMPT:\n return t('employeeStep.types.salariedNonexempt')\n case FlsaStatus.OWNER:\n return t('employeeStep.types.owner')\n default:\n return '—'\n }\n },\n },\n {\n title: t('employeeStep.payScheduleLabel'),\n render: employee => (\n <Components.Select\n label={t('employeeStep.scheduleForEmployee', {\n name: firstLastName({ first_name: employee.firstName, last_name: employee.lastName }),\n })}\n shouldVisuallyHideLabel\n isRequired\n placeholder=\"\"\n options={schedules.map(schedule => ({\n value: schedule.uuid,\n label: scheduleLabel(schedule),\n }))}\n value={\n currentSelection.employees.find(entry => entry.employeeUuid === employee.uuid)\n ?.payScheduleUuid ?? ''\n }\n onChange={value => {\n setChoices(previous => ({ ...previous, [employee.uuid]: value }))\n }}\n />\n ),\n },\n ],\n })\n return (\n <Flex flexDirection=\"column\" gap={32}>\n <Components.Heading as=\"h2\">{t('employeeStep.heading')}</Components.Heading>\n <Components.Box\n withPadding={false}\n header={\n <Components.BoxHeader\n title={t('employeeStep.employeesLabel')}\n action={\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n onAddPaySchedule(currentSelection)\n }}\n >\n {t('employeeStep.addPayScheduleCta')}\n </Components.Button>\n }\n />\n }\n >\n <DataView label={t('employeeStep.tableLabel')} isWithinBox {...table} />\n </Components.Box>\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n onBack(currentSelection)\n }}\n >\n {t('backCta')}\n </Components.Button>\n <Components.Button\n isDisabled={\n employees.length === 0 ||\n currentSelection.employees.some(entry => !entry.payScheduleUuid)\n }\n onClick={() => {\n onContinue(currentSelection)\n }}\n >\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n )\n}\n"],"names":["AssignmentEmployeeStepPresentation","employees","schedules","selection","onBack","onAddPaySchedule","onContinue","useTranslation","Components","useComponentContext","choices","setChoices","useState","currentSelection","employee","uuid","entry","schedule","data","pagination","useClientPagination","table","useDataView","jsxs","Fragment","firstLastName","jsx","getPrimaryCompensation","FlsaStatus","scheduleLabel","value","previous","Flex","DataView","ActionsLayout"],"mappings":";;;;;;;;;;;;;AA0CO,SAASA,EAAmC;AAAA,EACjD,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,YAAAC;AACF,GAA4C;AAC1C,QAAM,EAAE,EAAA,IAAMC,EAAe,0CAA0C,GACjEC,IAAaC,EAAA,GACb,CAACC,GAASC,CAAU,IAAIC,EAAiC,CAAA,CAAE,GAC3DC,IAAsC;AAAA,IAC1C,WAAWZ,EAAU,IAAI,CAAAa,MAAY;AACnC,YAAMC,IACJL,EAAQI,EAAS,IAAI,KACrBX,E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E,GAAGZ,EAAA,CAAO;AAAA,MAAA;AAAA,IAAA;AAAA,sBAEvEa,GAAA,EACC,UAAA;AAAA,MAAA,gBAAAR;AAAA,QAAClB,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACb,YAAAJ,EAAOS,CAAgB;AAAA,UACzB;AAAA,UAEC,YAAE,SAAS;AAAA,QAAA;AAAA,MAAA;AAAA,MAEd,gBAAAa;AAAA,QAAClB,EAAW;AAAA,QAAX;AAAA,UACC,YACEP,EAAU,WAAW,KACrBY,EAAiB,UAAU,KAAK,CAAAG,MAAS,CAACA,EAAM,eAAe;AAAA,UAEjE,SAAS,MAAM;AACb,YAAAV,EAAWO,CAAgB;AAAA,UAC7B;AAAA,UAEC,YAAE,aAAa;AAAA,QAAA;AAAA,MAAA;AAAA,IAClB,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
2
2
|
import { z as a } from "zod";
|
|
3
3
|
import { useForm as h, FormProvider as S } from "react-hook-form";
|
|
4
4
|
import { zodResolver as f } from "@hookform/resolvers/zod";
|
|
@@ -12,24 +12,24 @@ import { SelectField as P } from "../../../../Common/Fields/SelectField/SelectFi
|
|
|
12
12
|
const x = a.object({
|
|
13
13
|
defaultPayScheduleUuid: a.string().min(1)
|
|
14
14
|
});
|
|
15
|
-
function
|
|
16
|
-
schedules:
|
|
15
|
+
function H({
|
|
16
|
+
schedules: r,
|
|
17
17
|
defaultPayScheduleUuid: c,
|
|
18
|
-
onBack:
|
|
19
|
-
onAddPaySchedule:
|
|
18
|
+
onBack: u,
|
|
19
|
+
onAddPaySchedule: m,
|
|
20
20
|
onContinue: s
|
|
21
21
|
}) {
|
|
22
|
-
const { t } = y("Company.Management.PayScheduleAssignment"), o = C(),
|
|
22
|
+
const { t } = y("Company.Management.PayScheduleAssignment"), o = C(), i = h({
|
|
23
23
|
resolver: f(x),
|
|
24
|
-
defaultValues: { defaultPayScheduleUuid: c ??
|
|
25
|
-
}), p =
|
|
26
|
-
s(
|
|
24
|
+
defaultValues: { defaultPayScheduleUuid: c ?? r[0]?.uuid ?? "" }
|
|
25
|
+
}), p = i.handleSubmit(({ defaultPayScheduleUuid: n }) => {
|
|
26
|
+
s(n);
|
|
27
27
|
});
|
|
28
|
-
return /* @__PURE__ */ e(S, { ...
|
|
28
|
+
return /* @__PURE__ */ e(S, { ...i, children: /* @__PURE__ */ e(v, { onSubmit: () => {
|
|
29
29
|
p();
|
|
30
|
-
}, children: /* @__PURE__ */
|
|
30
|
+
}, children: /* @__PURE__ */ l(d, { flexDirection: "column", gap: 32, children: [
|
|
31
31
|
/* @__PURE__ */ e(o.Heading, { as: "h2", children: t("scheduleStep.heading") }),
|
|
32
|
-
/* @__PURE__ */
|
|
32
|
+
/* @__PURE__ */ l(d, { flexDirection: "column", gap: 12, children: [
|
|
33
33
|
/* @__PURE__ */ e(
|
|
34
34
|
P,
|
|
35
35
|
{
|
|
@@ -37,21 +37,39 @@ function R({
|
|
|
37
37
|
label: t("scheduleStep.payScheduleLabel"),
|
|
38
38
|
description: t("scheduleStep.payScheduleDescription"),
|
|
39
39
|
placeholder: "",
|
|
40
|
-
options:
|
|
41
|
-
value:
|
|
42
|
-
label: b(
|
|
40
|
+
options: r.map((n) => ({
|
|
41
|
+
value: n.uuid,
|
|
42
|
+
label: b(n)
|
|
43
43
|
}))
|
|
44
44
|
}
|
|
45
45
|
),
|
|
46
|
-
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
46
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
47
|
+
o.Button,
|
|
48
|
+
{
|
|
49
|
+
variant: "secondary",
|
|
50
|
+
onClick: () => {
|
|
51
|
+
m(i.getValues());
|
|
52
|
+
},
|
|
53
|
+
children: t("scheduleStep.addPayScheduleCta")
|
|
54
|
+
}
|
|
55
|
+
) })
|
|
47
56
|
] }),
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
/* @__PURE__ */ e(
|
|
50
|
-
|
|
57
|
+
/* @__PURE__ */ l(g, { children: [
|
|
58
|
+
/* @__PURE__ */ e(
|
|
59
|
+
o.Button,
|
|
60
|
+
{
|
|
61
|
+
variant: "secondary",
|
|
62
|
+
onClick: () => {
|
|
63
|
+
u(i.getValues());
|
|
64
|
+
},
|
|
65
|
+
children: t("backCta")
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
/* @__PURE__ */ e(o.Button, { variant: "primary", type: "submit", isDisabled: r.length === 0, children: t("continueCta") })
|
|
51
69
|
] })
|
|
52
70
|
] }) }) });
|
|
53
71
|
}
|
|
54
72
|
export {
|
|
55
|
-
|
|
73
|
+
H as AssignmentScheduleStepPresentation
|
|
56
74
|
};
|
|
57
75
|
//# sourceMappingURL=AssignmentScheduleStepPresentation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssignmentScheduleStepPresentation.js","sources":["../../../../../../src/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentScheduleStepPresentation.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useForm, FormProvider } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useTranslation } from 'react-i18next'\nimport type { PayScheduleShow } from '@gusto/embedded-api/models/components/
|
|
1
|
+
{"version":3,"file":"AssignmentScheduleStepPresentation.js","sources":["../../../../../../src/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentScheduleStepPresentation.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useForm, FormProvider } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useTranslation } from 'react-i18next'\nimport type { PayScheduleShow } from '@gusto/embedded-api/models/components/payschedulelistitem'\nimport { scheduleLabel } from './scheduleLabel'\nimport { Flex, SelectField, ActionsLayout } from '@/components/Common'\nimport { Form } from '@/components/Common/Form'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n/** @internal */\nexport interface AssignmentScheduleStepPresentationProps {\n schedules: PayScheduleShow[]\n defaultPayScheduleUuid?: string\n onBack: (selection: ScheduleStepInputs) => void\n onAddPaySchedule: (selection: ScheduleStepInputs) => void\n onContinue: (defaultPayScheduleUuid: string) => void\n}\n\nconst ScheduleStepSchema = z.object({\n defaultPayScheduleUuid: z.string().min(1),\n})\n\ntype ScheduleStepInputs = z.infer<typeof ScheduleStepSchema>\n\n/** @internal */\nexport function AssignmentScheduleStepPresentation({\n schedules,\n defaultPayScheduleUuid,\n onBack,\n onAddPaySchedule,\n onContinue,\n}: AssignmentScheduleStepPresentationProps) {\n const { t } = useTranslation('Company.Management.PayScheduleAssignment')\n const Components = useComponentContext()\n\n const formMethods = useForm<ScheduleStepInputs>({\n resolver: zodResolver(ScheduleStepSchema),\n defaultValues: { defaultPayScheduleUuid: defaultPayScheduleUuid ?? schedules[0]?.uuid ?? '' },\n })\n\n const handleSubmit = formMethods.handleSubmit(({ defaultPayScheduleUuid: uuid }) => {\n onContinue(uuid)\n })\n\n return (\n <FormProvider {...formMethods}>\n <Form onSubmit={() => void handleSubmit()}>\n <Flex flexDirection=\"column\" gap={32}>\n <Components.Heading as=\"h2\">{t('scheduleStep.heading')}</Components.Heading>\n <Flex flexDirection=\"column\" gap={12}>\n <SelectField\n name=\"defaultPayScheduleUuid\"\n label={t('scheduleStep.payScheduleLabel')}\n description={t('scheduleStep.payScheduleDescription')}\n placeholder=\"\"\n options={schedules.map(schedule => ({\n value: schedule.uuid,\n label: scheduleLabel(schedule),\n }))}\n />\n <div>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n onAddPaySchedule(formMethods.getValues())\n }}\n >\n {t('scheduleStep.addPayScheduleCta')}\n </Components.Button>\n </div>\n </Flex>\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n onBack(formMethods.getValues())\n }}\n >\n {t('backCta')}\n </Components.Button>\n <Components.Button variant=\"primary\" type=\"submit\" isDisabled={schedules.length === 0}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n </Form>\n </FormProvider>\n )\n}\n"],"names":["ScheduleStepSchema","z","AssignmentScheduleStepPresentation","schedules","defaultPayScheduleUuid","onBack","onAddPaySchedule","onContinue","useTranslation","Components","useComponentContext","formMethods","useForm","zodResolver","handleSubmit","uuid","FormProvider","jsx","Form","jsxs","Flex","SelectField","schedule","scheduleLabel","ActionsLayout"],"mappings":";;;;;;;;;;;AAmBA,MAAMA,IAAqBC,EAAE,OAAO;AAAA,EAClC,wBAAwBA,EAAE,OAAA,EAAS,IAAI,CAAC;AAC1C,CAAC;AAKM,SAASC,EAAmC;AAAA,EACjD,WAAAC;AAAA,EACA,wBAAAC;AAAA,EACA,QAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,YAAAC;AACF,GAA4C;AAC1C,QAAM,EAAE,EAAA,IAAMC,EAAe,0CAA0C,GACjEC,IAAaC,EAAA,GAEbC,IAAcC,EAA4B;AAAA,IAC9C,UAAUC,EAAYb,CAAkB;AAAA,IACxC,eAAe,EAAE,wBAAwBI,KAA0BD,EAAU,CAAC,GAAG,QAAQ,GAAA;AAAA,EAAG,CAC7F,GAEKW,IAAeH,EAAY,aAAa,CAAC,EAAE,wBAAwBI,QAAW;AAClF,IAAAR,EAAWQ,CAAI;AAAA,EACjB,CAAC;AAED,2BACGC,GAAA,EAAc,GAAGL,GAChB,UAAA,gBAAAM,EAACC,KAAK,UAAU,MAAA;AAAM,IAAKJ;KACzB,UAAA,gBAAAK,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAH,EAACR,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAA,EAAE,sBAAsB,GAAE;AAAA,IACvD,gBAAAU,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,MAAA,gBAAAH;AAAA,QAACI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