@gusto/embedded-react-sdk 0.45.0 → 0.46.2
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/DataView/DataCards/DataCards.d.ts +2 -1
- package/dist/components/Common/DataView/DataCards/DataCards.js +14 -13
- package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
- package/dist/components/Common/DataView/DataTable/DataTable.d.ts +2 -1
- package/dist/components/Common/DataView/DataTable/DataTable.js +51 -50
- package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
- package/dist/components/Common/DataView/DataView.d.ts +1 -0
- package/dist/components/Common/DataView/DataView.js.map +1 -1
- package/dist/components/Common/DataView/useDataView.d.ts +8 -1
- package/dist/components/Common/DataView/useDataView.js +20 -17
- package/dist/components/Common/DataView/useDataView.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +20 -4
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +20 -4
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +22 -6
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +20 -4
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +20 -4
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.js +4 -4
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +28 -12
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +23 -7
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +20 -4
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +20 -4
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +20 -4
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js +5 -5
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +20 -4
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +20 -4
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +22 -6
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/Profile/useContractorProfile.js +52 -42
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.d.ts +9 -0
- package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.js +76 -0
- package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.js.map +1 -0
- package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.module.scss.js +8 -0
- package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.module.scss.js.map +1 -0
- package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.d.ts +11 -0
- package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.js +85 -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/EditPendingCompensation/EditPendingCompensation.d.ts +25 -0
- package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.js +81 -0
- package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.js.map +1 -0
- package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.module.scss.js +8 -0
- package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.module.scss.js.map +1 -0
- package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.d.ts +18 -0
- package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js +171 -0
- package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js.map +1 -0
- package/dist/components/Employee/Compensation/management/index.d.ts +6 -0
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.d.ts +6 -1
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js +67 -209
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.d.ts +18 -0
- package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.js +169 -0
- package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.js.map +1 -0
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.d.ts +16 -0
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js +36 -30
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.d.ts +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js +4 -4
- package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js +212 -187
- 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/jobSchema.d.ts +8 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js +22 -17
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.d.ts +12 -2
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js +115 -110
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js.map +1 -1
- package/dist/components/Employee/Dashboard/BasicDetailsView.d.ts +8 -3
- package/dist/components/Employee/Dashboard/BasicDetailsView.js +108 -84
- package/dist/components/Employee/Dashboard/BasicDetailsView.js.map +1 -1
- package/dist/components/Employee/Dashboard/Dashboard.d.ts +2 -0
- package/dist/components/Employee/Dashboard/Dashboard.js +86 -68
- package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
- package/dist/components/Employee/Dashboard/DashboardComponents.d.ts +8 -4
- package/dist/components/Employee/Dashboard/DashboardComponents.js +147 -93
- package/dist/components/Employee/Dashboard/DashboardComponents.js.map +1 -1
- package/dist/components/Employee/Dashboard/DocumentsView.js +18 -11
- package/dist/components/Employee/Dashboard/DocumentsView.js.map +1 -1
- package/dist/components/Employee/Dashboard/JobAndPayView.js +304 -264
- package/dist/components/Employee/Dashboard/JobAndPayView.js.map +1 -1
- package/dist/components/Employee/Dashboard/JobAndPayView.module.scss.js +10 -0
- package/dist/components/Employee/Dashboard/JobAndPayView.module.scss.js.map +1 -0
- package/dist/components/Employee/Dashboard/TaxesView.d.ts +7 -2
- package/dist/components/Employee/Dashboard/TaxesView.js +68 -54
- package/dist/components/Employee/Dashboard/TaxesView.js.map +1 -1
- package/dist/components/Employee/Dashboard/dashboardStateMachine.js +152 -142
- package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -1
- package/dist/components/Employee/Dashboard/getPendingCompensationChanges.d.ts +6 -0
- package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js +13 -12
- package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js.map +1 -1
- package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.d.ts +12 -5
- package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js +21 -21
- package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js.map +1 -1
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.d.ts +13 -3
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js +53 -55
- 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/Deductions/shared/useChildSupportGarnishmentForm/fields.js +8 -8
- package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js +4 -4
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +20 -4
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/fields.js +1 -1
- package/dist/components/Employee/EmployeeList/management/ManagementEmployeeList.js +37 -40
- package/dist/components/Employee/EmployeeList/management/ManagementEmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.d.ts +1 -2
- package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.js +64 -71
- package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.js.map +1 -1
- package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.d.ts +2 -0
- package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.js +25 -0
- package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.js.map +1 -0
- package/dist/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.d.ts +13 -0
- package/dist/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.js +37 -0
- package/dist/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.js.map +1 -0
- package/dist/components/Employee/EmployeeListFlow/employeeListStateMachine.d.ts +6 -0
- package/dist/components/Employee/EmployeeListFlow/employeeListStateMachine.js +69 -0
- package/dist/components/Employee/EmployeeListFlow/employeeListStateMachine.js.map +1 -0
- package/dist/components/Employee/EmployeeListFlow/index.d.ts +3 -0
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.js +4 -4
- package/dist/components/Employee/HomeAddress/management/HomeAddress.js +15 -12
- package/dist/components/Employee/HomeAddress/management/HomeAddress.js.map +1 -1
- package/dist/components/Employee/HomeAddress/management/HomeAddressView.d.ts +2 -1
- package/dist/components/Employee/HomeAddress/management/HomeAddressView.js +86 -83
- package/dist/components/Employee/HomeAddress/management/HomeAddressView.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js +1 -1
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js +4 -4
- 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/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js +8 -8
- package/dist/components/Employee/Taxes/useTaxes.js +20 -4
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddress.js +14 -11
- package/dist/components/Employee/WorkAddress/management/WorkAddress.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddressView.d.ts +2 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddressView.js +92 -89
- package/dist/components/Employee/WorkAddress/management/WorkAddressView.js.map +1 -1
- package/dist/components/Employee/exports/employeeManagement.d.ts +2 -0
- package/dist/components/Employee/exports/employeeManagement.js +18 -16
- package/dist/components/Employee/exports/employeeManagement.js.map +1 -1
- package/dist/components/Employee/index.d.ts +2 -0
- package/dist/components/Employee/index.js +32 -30
- package/dist/components/Employee/index.js.map +1 -1
- package/dist/components/Flow/FlowHeader.js +34 -31
- package/dist/components/Flow/FlowHeader.js.map +1 -1
- package/dist/components/Flow/useFlow.d.ts +12 -0
- package/dist/components/Flow/useFlow.js.map +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +34 -26
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +36 -22
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/TimeOff/PolicyList/PolicyList.js +92 -69
- package/dist/components/TimeOff/PolicyList/PolicyList.js.map +1 -1
- package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js +23 -23
- package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js.map +1 -1
- package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js +52 -40
- package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js.map +1 -1
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.d.ts +1 -1
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
- package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js +73 -56
- package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +58 -58
- 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 +91 -87
- 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 +91 -124
- 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 +72 -87
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentationTypes.d.ts +1 -6
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js +160 -220
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.d.ts +7 -3
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js +77 -54
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.test.d.ts +1 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js +12 -11
- package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js.map +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js +177 -147
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js.map +1 -1
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.d.ts +1 -1
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js +38 -36
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js.map +1 -1
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTableTypes.d.ts +2 -0
- package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js +10 -10
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js +17 -15
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicyDetails.json.js +9 -9
- package/dist/i18n/en/Employee.Compensation.json.js +68 -56
- package/dist/i18n/en/Employee.Compensation.json.js.map +1 -1
- package/dist/i18n/en/Employee.Dashboard.json.js +26 -24
- package/dist/i18n/en/Employee.Dashboard.json.js.map +1 -1
- package/dist/i18n/en/Employee.DocumentManager.json.js +1 -1
- package/dist/i18n/en/Employee.HomeAddress.Management.json.js +12 -10
- package/dist/i18n/en/Employee.HomeAddress.Management.json.js.map +1 -1
- package/dist/i18n/en/Employee.ManagementEmployeeList.json.js +32 -30
- package/dist/i18n/en/Employee.ManagementEmployeeList.json.js.map +1 -1
- package/dist/i18n/en/Employee.WorkAddress.Management.json.js +16 -14
- package/dist/i18n/en/Employee.WorkAddress.Management.json.js.map +1 -1
- package/dist/i18n/en/common.json.d.ts +21 -0
- package/dist/partner-hook-utils/form/fields/DatePickerHookField.js +33 -32
- package/dist/partner-hook-utils/form/fields/DatePickerHookField.js.map +1 -1
- package/dist/partner-hook-utils/types.d.ts +4 -0
- package/dist/shared/constants.d.ts +4 -0
- package/dist/shared/constants.js +20 -18
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +45 -11
- package/docs/reference/endpoint-inventory.json +24 -8
- package/package.json +1 -1
|
@@ -1,127 +1,145 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useCallback as
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { useGustoEmbeddedContext as
|
|
5
|
-
import { payrollsGetPayStub as
|
|
6
|
-
import { useErrorBoundary as
|
|
7
|
-
import { useJobsAndCompensationsDeleteMutation as
|
|
8
|
-
import { usePendingChangeDetailRenderer as
|
|
9
|
-
import { PendingChangesReviewModal as
|
|
1
|
+
import { jsxs as d, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback as ue, useState as O } from "react";
|
|
3
|
+
import { useTranslation as E } from "react-i18next";
|
|
4
|
+
import { useGustoEmbeddedContext as on } from "@gusto/embedded-api/react-query/_context";
|
|
5
|
+
import { payrollsGetPayStub as an } from "@gusto/embedded-api/funcs/payrollsGetPayStub";
|
|
6
|
+
import { useErrorBoundary as rn } from "react-error-boundary";
|
|
7
|
+
import { useJobsAndCompensationsDeleteMutation as sn } from "@gusto/embedded-api/react-query/jobsAndCompensationsDelete";
|
|
8
|
+
import { usePendingChangeDetailRenderer as dn } from "./usePendingChangeDetailRenderer.js";
|
|
9
|
+
import { PendingChangesReviewModal as cn } from "./PendingChangesReviewModal.js";
|
|
10
|
+
import me from "./JobAndPayView.module.scss.js";
|
|
10
11
|
import { Flex as c } from "../../Common/Flex/Flex.js";
|
|
11
|
-
import { useComponentContext as
|
|
12
|
+
import { useComponentContext as ln } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
12
13
|
import "classnames";
|
|
13
|
-
import { componentEvents as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
14
|
+
import { componentEvents as P, FlsaStatus as pe, PAYMENT_METHODS as un } from "../../../shared/constants.js";
|
|
15
|
+
import { Loading as v } from "../../Common/Loading/Loading.js";
|
|
16
|
+
import { EmptyData as R } from "../../Common/EmptyData/EmptyData.js";
|
|
17
|
+
import { BaseLayout as mn } from "../../Base/Base.js";
|
|
18
|
+
import { composeErrorHandler as pn } from "../../../partner-hook-utils/composeErrorHandler.js";
|
|
19
|
+
import { readableStreamToBlob as yn } from "../../../helpers/readableStreamToBlob.js";
|
|
20
|
+
import { formatDateToStringDate as bn, formatDateLongWithYear as j } from "../../../helpers/dateFormatting.js";
|
|
21
|
+
import { useFormatCompensationRate as gn } from "../../../helpers/formattedStrings.js";
|
|
22
|
+
import ye from "../../../hooks/useNumberFormatter.js";
|
|
23
|
+
import { useI18n as _ } from "../../../i18n/I18n.js";
|
|
24
|
+
import { useDeleteBankAccount as hn } from "../PaymentMethod/shared/useDeleteBankAccount.js";
|
|
25
|
+
import { DeleteBankAccountDialog as fn } from "../PaymentMethod/shared/DeleteBankAccountDialog.js";
|
|
26
|
+
import { usePaymentMethodList as Pn } from "../PaymentMethod/shared/usePaymentMethodList.js";
|
|
27
|
+
import { useDeductionsList as An } from "../Deductions/shared/useDeductionsList.js";
|
|
28
|
+
import { useDeleteDeduction as Cn } from "../Deductions/shared/useDeleteDeduction.js";
|
|
29
|
+
import { DeleteDeductionDialog as Dn } from "../Deductions/shared/DeleteDeductionDialog.js";
|
|
30
|
+
import { formatDeductionAmount as jn } from "../Deductions/shared/formatDeductionAmount.js";
|
|
29
31
|
import x from "../../../assets/icons/plus-circle.svg.js";
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import { useEmployeeCompensation as
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
32
|
+
import Ln from "../../../assets/icons/percent-circle.svg.js";
|
|
33
|
+
import wn from "../../../assets/icons/download-cloud.svg.js";
|
|
34
|
+
import H from "../../../assets/icons/trashcan.svg.js";
|
|
35
|
+
import be from "../../../assets/icons/pencil.svg.js";
|
|
36
|
+
import { useEmployeeCompensation as En } from "./hooks/useEmployeeCompensation.js";
|
|
37
|
+
import { VisuallyHidden as vn } from "../../Common/VisuallyHidden/VisuallyHidden.js";
|
|
38
|
+
import { HamburgerMenu as F } from "../../Common/HamburgerMenu/HamburgerMenu.js";
|
|
39
|
+
import { useDataView as k } from "../../Common/DataView/useDataView.js";
|
|
40
|
+
import { DataView as T } from "../../Common/DataView/DataView.js";
|
|
41
|
+
function ge(s) {
|
|
42
|
+
if (s === void 0) return null;
|
|
43
|
+
const u = parseFloat(s);
|
|
41
44
|
return Number.isFinite(u) ? u : null;
|
|
42
45
|
}
|
|
43
|
-
function
|
|
44
|
-
employeeId:
|
|
46
|
+
function bt({
|
|
47
|
+
employeeId: s,
|
|
45
48
|
onEvent: u,
|
|
46
|
-
onEditCompensation:
|
|
47
|
-
onAddJob:
|
|
48
|
-
onAddAnotherJob:
|
|
49
|
-
onAddDeduction:
|
|
50
|
-
onEditDeduction:
|
|
49
|
+
onEditCompensation: V,
|
|
50
|
+
onAddJob: he,
|
|
51
|
+
onAddAnotherJob: fe,
|
|
52
|
+
onAddDeduction: Pe,
|
|
53
|
+
onEditDeduction: Ae
|
|
51
54
|
}) {
|
|
52
|
-
|
|
53
|
-
const { t } =
|
|
55
|
+
_("Employee.PaymentMethod"), _("Employee.Compensation"), _("Employee.Deductions");
|
|
56
|
+
const { t } = E("Employee.Dashboard"), { t: A } = E("Employee.PaymentMethod"), { t: Ce } = E("Employee.Compensation"), { t: S } = E("Employee.Deductions"), o = ln(), Y = gn(), B = ye("currency"), De = ye("percent"), W = on(), { showBoundary: I } = rn(), y = En({ employeeId: s }), {
|
|
57
|
+
jobs: C,
|
|
58
|
+
primaryFlsaStatus: je,
|
|
59
|
+
pendingChanges: G,
|
|
60
|
+
hasMultipleJobs: Le,
|
|
61
|
+
payStubs: we,
|
|
62
|
+
employeeFirstName: U
|
|
63
|
+
} = y.data, Ee = y.pagination.payStubs, q = y.status.cancellingCompensationUuid, { cancelPendingChange: K } = y.actions, N = y.status.isCompensationLoading, ve = y.status.isPayStubsLoading, X = ue(
|
|
54
64
|
async (e) => {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
employeeId: d,
|
|
65
|
+
await K(e) && u(P.EMPLOYEE_COMPENSATION_CHANGE_CANCELLED, {
|
|
66
|
+
employeeId: s,
|
|
58
67
|
compensationId: e.compensationUuid
|
|
59
68
|
});
|
|
60
69
|
},
|
|
61
|
-
[
|
|
62
|
-
), [
|
|
70
|
+
[K, u, s]
|
|
71
|
+
), [xe, z] = O(
|
|
63
72
|
() => /* @__PURE__ */ new Set()
|
|
64
|
-
),
|
|
73
|
+
), ke = ue(
|
|
65
74
|
async (e) => {
|
|
66
|
-
const i = window.open("", "_blank"
|
|
75
|
+
const i = window.open("", "_blank"), f = t("jobAndPay.paystubs.downloadLoadingMessage");
|
|
67
76
|
if (i) {
|
|
68
77
|
const r = i.document;
|
|
69
|
-
r.title =
|
|
70
|
-
const
|
|
71
|
-
|
|
78
|
+
r.title = f;
|
|
79
|
+
const m = r.createElement("style");
|
|
80
|
+
m.textContent = "body{font-family:system-ui,-apple-system,sans-serif;display:flex;align-items:center;justify-content:center;height:100vh;margin:0;color:#444;gap:12px}.spinner{width:20px;height:20px;border:2px solid #ccc;border-top-color:#444;border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}", r.head.appendChild(m);
|
|
72
81
|
const g = r.createElement("div");
|
|
73
82
|
g.className = "spinner", g.setAttribute("aria-hidden", "true");
|
|
74
|
-
const
|
|
75
|
-
|
|
83
|
+
const le = r.createElement("span");
|
|
84
|
+
le.textContent = f, r.body.replaceChildren(g, le);
|
|
76
85
|
}
|
|
77
|
-
|
|
78
|
-
const
|
|
79
|
-
return
|
|
86
|
+
z((r) => {
|
|
87
|
+
const m = new Set(r);
|
|
88
|
+
return m.add(e), m;
|
|
80
89
|
});
|
|
81
90
|
try {
|
|
82
|
-
const r = await
|
|
91
|
+
const r = await an(W, {
|
|
83
92
|
payrollId: e,
|
|
84
|
-
employeeId:
|
|
93
|
+
employeeId: s
|
|
85
94
|
});
|
|
86
95
|
if (!r.value?.responseStream)
|
|
87
96
|
throw new Error(t("jobAndPay.paystubs.downloadError"));
|
|
88
|
-
const
|
|
89
|
-
i
|
|
97
|
+
const m = await yn(r.value.responseStream, "application/pdf"), g = URL.createObjectURL(m);
|
|
98
|
+
i ? (i.addEventListener("load", () => {
|
|
99
|
+
URL.revokeObjectURL(g);
|
|
100
|
+
}), i.location.href = g) : URL.revokeObjectURL(g);
|
|
90
101
|
} catch (r) {
|
|
91
|
-
i && i.close(),
|
|
102
|
+
i && i.close(), I(r instanceof Error ? r : new Error(String(r)));
|
|
92
103
|
} finally {
|
|
93
|
-
|
|
94
|
-
const
|
|
95
|
-
return
|
|
104
|
+
z((r) => {
|
|
105
|
+
const m = new Set(r);
|
|
106
|
+
return m.delete(e), m;
|
|
96
107
|
});
|
|
97
108
|
}
|
|
98
109
|
},
|
|
99
|
-
[
|
|
100
|
-
), [
|
|
101
|
-
if (!
|
|
102
|
-
const e =
|
|
103
|
-
await
|
|
104
|
-
},
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
110
|
+
[W, s, t, I]
|
|
111
|
+
), [D, J] = O(null), { mutateAsync: Te, isPending: $ } = sn(), Se = async () => {
|
|
112
|
+
if (!D) return;
|
|
113
|
+
const e = D.uuid;
|
|
114
|
+
await Te({ request: { jobId: e } }), u(P.EMPLOYEE_JOB_DELETED, { employeeId: s, jobId: e }), J(null);
|
|
115
|
+
}, a = C.length === 1 ? C[0] : void 0, h = Le, Be = bn(/* @__PURE__ */ new Date()) ?? "", Ue = C.find((e) => e.primary)?.compensations?.some(
|
|
116
|
+
(e) => e.effectiveDate !== void 0 && e.effectiveDate > Be && e.flsaStatus !== pe.NONEXEMPT
|
|
117
|
+
) ?? !1, Ne = C.length >= 1 && je === pe.NONEXEMPT && !Ue, Q = a ? ge(a.rate) : null, Z = a?.compensations?.find(
|
|
118
|
+
(e) => e.uuid === a.currentCompensationUuid
|
|
119
|
+
), Je = Z?.effectiveDate ? /* @__PURE__ */ d(c, { flexDirection: "column", gap: 0, children: [
|
|
120
|
+
/* @__PURE__ */ n(o.Text, { variant: "supporting", children: t("jobAndPay.compensation.effectiveDate") }),
|
|
121
|
+
/* @__PURE__ */ n(o.Text, { children: j(Z.effectiveDate) })
|
|
122
|
+
] }) : null, [Me, ee] = O(!1), Oe = dn(U), Re = G.filter((e) => e.isNewJob), L = G.filter((e) => !e.isNewJob), M = new Set(Re.map((e) => e.jobUuid)), _e = a ? M.has(a.uuid) : !1, He = M.size > 0, ne = L.length > 0, te = h && L.length > 1, Fe = ne && !te, b = L[0], l = Pn({ employeeId: s }), oe = l.isLoading ? void 0 : l.data.paymentMethod, w = l.isLoading ? [] : l.data.bankAccounts, Ve = l.isLoading ? void 0 : l.status.deletePendingBankAccountUuid, { pendingDeleteAccount: ie, setPendingDeleteAccount: ae, handleConfirmDelete: Ye } = hn(async (e) => {
|
|
123
|
+
if (l.isLoading) return;
|
|
124
|
+
const i = await l.actions.onDelete(e);
|
|
125
|
+
i && u(P.EMPLOYEE_BANK_ACCOUNT_DELETED, i.data);
|
|
126
|
+
}), p = An({ employeeId: s }), We = p.isLoading ? [] : p.data.deductions, re = p.isLoading ? void 0 : p.status.deletingGarnishmentUuid, {
|
|
127
|
+
pendingDeleteDeduction: se,
|
|
128
|
+
setPendingDeleteDeduction: de,
|
|
129
|
+
handleConfirmDelete: Ie
|
|
130
|
+
} = Cn(async (e) => {
|
|
131
|
+
if (p.isLoading) return;
|
|
132
|
+
const i = await p.actions.onDelete(e);
|
|
133
|
+
i && u(P.EMPLOYEE_DEDUCTION_DELETED, i.data.garnishment);
|
|
134
|
+
}), Ge = pn([y, l, p]), qe = [
|
|
117
135
|
{
|
|
118
136
|
key: "jobTitle",
|
|
119
137
|
title: t("jobAndPay.compensation.columns.jobTitle"),
|
|
120
138
|
render: (e) => {
|
|
121
|
-
const i =
|
|
122
|
-
return /* @__PURE__ */
|
|
139
|
+
const i = ge(e.rate);
|
|
140
|
+
return /* @__PURE__ */ d(c, { flexDirection: "column", gap: 0, children: [
|
|
123
141
|
/* @__PURE__ */ n(o.Text, { children: e.title || "-" }),
|
|
124
|
-
i !== null && e.paymentUnit ? /* @__PURE__ */ n(o.Text, { variant: "supporting", children:
|
|
142
|
+
i !== null && e.paymentUnit ? /* @__PURE__ */ n(o.Text, { variant: "supporting", children: Y(i, e.paymentUnit) }) : null
|
|
125
143
|
] });
|
|
126
144
|
}
|
|
127
145
|
},
|
|
@@ -130,45 +148,55 @@ function Kn({
|
|
|
130
148
|
title: t("jobAndPay.compensation.columns.payType"),
|
|
131
149
|
render: (e) => {
|
|
132
150
|
const i = e.compensations?.find(
|
|
133
|
-
(
|
|
151
|
+
(f) => f.uuid === e.currentCompensationUuid
|
|
134
152
|
)?.flsaStatus;
|
|
135
|
-
return i !== void 0 ?
|
|
153
|
+
return i !== void 0 ? Ce(`flsaStatusLabels.${i}`) : "-";
|
|
136
154
|
}
|
|
137
155
|
},
|
|
138
156
|
{
|
|
139
|
-
key: "
|
|
140
|
-
title: t("jobAndPay.compensation.columns.
|
|
141
|
-
render: (e) =>
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
157
|
+
key: "effectiveDate",
|
|
158
|
+
title: t("jobAndPay.compensation.columns.effectiveDate"),
|
|
159
|
+
render: (e) => {
|
|
160
|
+
const i = e.compensations?.find((f) => f.uuid === e.currentCompensationUuid);
|
|
161
|
+
return i?.effectiveDate ? j(i.effectiveDate) : "-";
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
...He ? [
|
|
165
|
+
{
|
|
166
|
+
key: "status",
|
|
167
|
+
title: /* @__PURE__ */ n(vn, { children: t("jobAndPay.compensation.columns.status") }),
|
|
168
|
+
render: (e) => M.has(e.uuid) ? /* @__PURE__ */ n(o.Badge, { status: "warning", children: t("jobAndPay.compensation.pendingStatus") }) : null
|
|
169
|
+
}
|
|
170
|
+
] : []
|
|
171
|
+
], Ke = k({
|
|
172
|
+
data: C,
|
|
173
|
+
columns: qe,
|
|
146
174
|
itemMenu: (e) => /* @__PURE__ */ n(
|
|
147
|
-
|
|
175
|
+
F,
|
|
148
176
|
{
|
|
149
177
|
triggerLabel: t("jobAndPay.compensation.hamburgerTitle"),
|
|
150
|
-
isLoading:
|
|
178
|
+
isLoading: $,
|
|
151
179
|
items: [
|
|
152
180
|
{
|
|
153
181
|
label: t("jobAndPay.compensation.editJobCta"),
|
|
154
|
-
icon: /* @__PURE__ */ n(
|
|
182
|
+
icon: /* @__PURE__ */ n(be, { "aria-hidden": !0 }),
|
|
155
183
|
onClick: () => {
|
|
156
|
-
|
|
184
|
+
V?.(e);
|
|
157
185
|
}
|
|
158
186
|
},
|
|
159
187
|
...e.primary ? [] : [
|
|
160
188
|
{
|
|
161
189
|
label: t("jobAndPay.compensation.deleteJobCta"),
|
|
162
|
-
icon: /* @__PURE__ */ n(
|
|
190
|
+
icon: /* @__PURE__ */ n(H, { "aria-hidden": !0 }),
|
|
163
191
|
onClick: () => {
|
|
164
|
-
|
|
192
|
+
J({ uuid: e.uuid, title: e.title ?? "" });
|
|
165
193
|
}
|
|
166
194
|
}
|
|
167
195
|
]
|
|
168
196
|
]
|
|
169
197
|
}
|
|
170
198
|
)
|
|
171
|
-
}),
|
|
199
|
+
}), Xe = [
|
|
172
200
|
{
|
|
173
201
|
key: "nickname",
|
|
174
202
|
title: t("jobAndPay.payment.nickname"),
|
|
@@ -184,7 +212,7 @@ function Kn({
|
|
|
184
212
|
title: t("jobAndPay.payment.accountType"),
|
|
185
213
|
render: (e) => e.accountType || "-"
|
|
186
214
|
}
|
|
187
|
-
],
|
|
215
|
+
], ze = [
|
|
188
216
|
{
|
|
189
217
|
key: "description",
|
|
190
218
|
title: t("jobAndPay.deductions.deduction"),
|
|
@@ -198,17 +226,17 @@ function Kn({
|
|
|
198
226
|
{
|
|
199
227
|
key: "amount",
|
|
200
228
|
title: t("jobAndPay.deductions.withhold"),
|
|
201
|
-
render: (e) =>
|
|
229
|
+
render: (e) => jn(e, {
|
|
202
230
|
formatCurrency: B,
|
|
203
|
-
formatPercent:
|
|
231
|
+
formatPercent: De,
|
|
204
232
|
formatPerPaycheck: (i) => t("jobAndPay.deductions.amountPerPaycheck", { value: i })
|
|
205
233
|
})
|
|
206
234
|
}
|
|
207
|
-
],
|
|
235
|
+
], $e = [
|
|
208
236
|
{
|
|
209
237
|
key: "payday",
|
|
210
238
|
title: t("jobAndPay.paystubs.payday"),
|
|
211
|
-
render: (e) =>
|
|
239
|
+
render: (e) => j(e.checkDate) || "-"
|
|
212
240
|
},
|
|
213
241
|
{
|
|
214
242
|
key: "checkAmount",
|
|
@@ -231,66 +259,66 @@ function Kn({
|
|
|
231
259
|
{
|
|
232
260
|
key: "paymentMethod",
|
|
233
261
|
title: t("jobAndPay.paystubs.paymentMethod"),
|
|
234
|
-
render: () =>
|
|
262
|
+
render: () => oe?.type || t("jobAndPay.paystubs.noPaymentMethod")
|
|
235
263
|
}
|
|
236
|
-
],
|
|
237
|
-
data:
|
|
238
|
-
columns:
|
|
264
|
+
], Qe = k({
|
|
265
|
+
data: w,
|
|
266
|
+
columns: Xe,
|
|
239
267
|
itemMenu: (e) => /* @__PURE__ */ n(
|
|
240
|
-
|
|
268
|
+
F,
|
|
241
269
|
{
|
|
242
270
|
items: [
|
|
243
271
|
{
|
|
244
|
-
label:
|
|
272
|
+
label: A("deleteBankAccountCta"),
|
|
245
273
|
onClick: () => {
|
|
246
|
-
|
|
274
|
+
ae({
|
|
247
275
|
uuid: e.uuid,
|
|
248
276
|
hiddenAccountNumber: e.hiddenAccountNumber
|
|
249
277
|
});
|
|
250
278
|
},
|
|
251
|
-
icon: /* @__PURE__ */ n(
|
|
279
|
+
icon: /* @__PURE__ */ n(H, { "aria-hidden": !0 })
|
|
252
280
|
}
|
|
253
281
|
],
|
|
254
|
-
triggerLabel:
|
|
282
|
+
triggerLabel: A("hamburgerTitle")
|
|
255
283
|
}
|
|
256
284
|
)
|
|
257
|
-
}),
|
|
258
|
-
data:
|
|
259
|
-
columns:
|
|
285
|
+
}), Ze = k({
|
|
286
|
+
data: We,
|
|
287
|
+
columns: ze,
|
|
260
288
|
itemMenu: (e) => /* @__PURE__ */ n(
|
|
261
|
-
|
|
289
|
+
F,
|
|
262
290
|
{
|
|
263
|
-
isLoading:
|
|
291
|
+
isLoading: re === e.uuid,
|
|
264
292
|
items: [
|
|
265
293
|
{
|
|
266
|
-
label:
|
|
267
|
-
onClick: () =>
|
|
268
|
-
icon: /* @__PURE__ */ n(
|
|
294
|
+
label: S("editCta"),
|
|
295
|
+
onClick: () => Ae?.(e),
|
|
296
|
+
icon: /* @__PURE__ */ n(be, { "aria-hidden": !0 })
|
|
269
297
|
},
|
|
270
298
|
{
|
|
271
|
-
label:
|
|
299
|
+
label: S("deleteCta"),
|
|
272
300
|
onClick: () => {
|
|
273
|
-
|
|
301
|
+
de(e);
|
|
274
302
|
},
|
|
275
|
-
icon: /* @__PURE__ */ n(
|
|
303
|
+
icon: /* @__PURE__ */ n(H, { "aria-hidden": !0 })
|
|
276
304
|
}
|
|
277
305
|
],
|
|
278
|
-
triggerLabel:
|
|
306
|
+
triggerLabel: S("hamburgerTitle")
|
|
279
307
|
}
|
|
280
308
|
),
|
|
281
309
|
emptyState: () => /* @__PURE__ */ n(
|
|
282
|
-
|
|
310
|
+
R,
|
|
283
311
|
{
|
|
284
312
|
title: t("jobAndPay.deductions.emptyState.title"),
|
|
285
313
|
description: t("jobAndPay.deductions.emptyState.description")
|
|
286
314
|
}
|
|
287
315
|
)
|
|
288
|
-
}),
|
|
289
|
-
data:
|
|
290
|
-
columns:
|
|
291
|
-
pagination:
|
|
316
|
+
}), en = k({
|
|
317
|
+
data: we,
|
|
318
|
+
columns: $e,
|
|
319
|
+
pagination: Ee,
|
|
292
320
|
itemMenu: (e) => {
|
|
293
|
-
const i = !!e.payrollUuid &&
|
|
321
|
+
const i = !!e.payrollUuid && xe.has(e.payrollUuid);
|
|
294
322
|
return /* @__PURE__ */ n(
|
|
295
323
|
o.ButtonIcon,
|
|
296
324
|
{
|
|
@@ -299,140 +327,152 @@ function Kn({
|
|
|
299
327
|
isDisabled: !e.payrollUuid,
|
|
300
328
|
isLoading: i,
|
|
301
329
|
onClick: () => {
|
|
302
|
-
e.payrollUuid &&
|
|
330
|
+
e.payrollUuid && ke(e.payrollUuid);
|
|
303
331
|
},
|
|
304
|
-
children: /* @__PURE__ */ n(
|
|
332
|
+
children: /* @__PURE__ */ n(wn, { "aria-hidden": !0 })
|
|
305
333
|
}
|
|
306
334
|
);
|
|
307
335
|
},
|
|
308
336
|
emptyState: () => /* @__PURE__ */ n(
|
|
309
|
-
|
|
337
|
+
R,
|
|
310
338
|
{
|
|
311
339
|
title: t("jobAndPay.paystubs.emptyState.title"),
|
|
312
340
|
description: t("jobAndPay.paystubs.emptyState.description")
|
|
313
341
|
}
|
|
314
342
|
)
|
|
315
|
-
});
|
|
316
|
-
|
|
317
|
-
return /* @__PURE__ */ n(se, { isLoading: !0, error: oe.errors });
|
|
318
|
-
const ie = z?.type === $e.directDeposit;
|
|
319
|
-
return /* @__PURE__ */ n(se, { error: oe.errors, children: /* @__PURE__ */ l(c, { flexDirection: "column", gap: 24, children: [
|
|
343
|
+
}), nn = l.isLoading && l.errorHandling.errors.length === 0, tn = p.isLoading && p.errorHandling.errors.length === 0, ce = oe?.type === un.directDeposit;
|
|
344
|
+
return /* @__PURE__ */ n(mn, { error: Ge.errors, children: /* @__PURE__ */ d(c, { flexDirection: "column", gap: 24, children: [
|
|
320
345
|
/* @__PURE__ */ n(
|
|
321
346
|
o.Box,
|
|
322
347
|
{
|
|
323
|
-
withPadding: !
|
|
348
|
+
withPadding: !h,
|
|
324
349
|
header: /* @__PURE__ */ n(
|
|
325
350
|
o.BoxHeader,
|
|
326
351
|
{
|
|
327
352
|
title: t("jobAndPay.compensation.title"),
|
|
328
|
-
action:
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
353
|
+
action: (
|
|
354
|
+
// While the compensation card is loading we don't yet
|
|
355
|
+
// know if the employee has jobs — suppress the action
|
|
356
|
+
// so we don't surface an "Add job" CTA against an
|
|
357
|
+
// employee who already has one.
|
|
358
|
+
N || h ? null : a ? /* @__PURE__ */ n(
|
|
359
|
+
o.Button,
|
|
360
|
+
{
|
|
361
|
+
variant: "secondary",
|
|
362
|
+
onClick: () => {
|
|
363
|
+
V?.(a);
|
|
364
|
+
},
|
|
365
|
+
children: t("jobAndPay.compensation.editCta")
|
|
366
|
+
}
|
|
367
|
+
) : /* @__PURE__ */ n(
|
|
368
|
+
o.Button,
|
|
369
|
+
{
|
|
370
|
+
variant: "secondary",
|
|
371
|
+
onClick: he,
|
|
372
|
+
icon: /* @__PURE__ */ n(x, {}),
|
|
373
|
+
children: t("jobAndPay.compensation.addJobCta")
|
|
374
|
+
}
|
|
375
|
+
)
|
|
345
376
|
)
|
|
346
377
|
}
|
|
347
378
|
),
|
|
348
|
-
footer:
|
|
379
|
+
footer: !N && Ne ? /* @__PURE__ */ n(
|
|
349
380
|
o.Button,
|
|
350
381
|
{
|
|
351
382
|
variant: "secondary",
|
|
352
|
-
onClick:
|
|
383
|
+
onClick: fe,
|
|
353
384
|
icon: /* @__PURE__ */ n(x, {}),
|
|
354
385
|
children: t("jobAndPay.compensation.addAnotherJobCta")
|
|
355
386
|
}
|
|
356
387
|
) : void 0,
|
|
357
|
-
children: /* @__PURE__ */
|
|
358
|
-
|
|
359
|
-
|
|
388
|
+
children: N ? /* @__PURE__ */ n(v, {}) : /* @__PURE__ */ d(c, { flexDirection: "column", gap: 16, children: [
|
|
389
|
+
ne && /* @__PURE__ */ n(
|
|
390
|
+
"div",
|
|
360
391
|
{
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
date: C(b.effectiveDate)
|
|
366
|
-
}) : t("jobAndPay.compensation.pendingChange.alertLabel", {
|
|
367
|
-
date: C(b.effectiveDate)
|
|
368
|
-
}),
|
|
369
|
-
children: /* @__PURE__ */ l(c, { flexDirection: "column", gap: 12, children: [
|
|
370
|
-
/* @__PURE__ */ n(
|
|
371
|
-
o.UnorderedList,
|
|
392
|
+
className: [me.alertWrapper, h && me.alertWrapperPadded].filter(Boolean).join(" "),
|
|
393
|
+
children: /* @__PURE__ */ d(c, { flexDirection: "column", gap: 16, children: [
|
|
394
|
+
Fe && b && /* @__PURE__ */ n(
|
|
395
|
+
o.Alert,
|
|
372
396
|
{
|
|
373
|
-
|
|
397
|
+
status: "warning",
|
|
398
|
+
disableScrollIntoView: !0,
|
|
399
|
+
label: h ? t("jobAndPay.compensation.pendingChange.alertLabelWithJob", {
|
|
400
|
+
jobTitle: b.jobTitle,
|
|
401
|
+
date: j(b.effectiveDate)
|
|
402
|
+
}) : t("jobAndPay.compensation.pendingChange.alertLabel", {
|
|
403
|
+
date: j(b.effectiveDate)
|
|
404
|
+
}),
|
|
405
|
+
children: /* @__PURE__ */ d(c, { flexDirection: "column", gap: 12, children: [
|
|
406
|
+
/* @__PURE__ */ n(
|
|
407
|
+
o.UnorderedList,
|
|
408
|
+
{
|
|
409
|
+
items: b.details.map((e) => Oe(e))
|
|
410
|
+
}
|
|
411
|
+
),
|
|
412
|
+
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
|
|
413
|
+
o.Button,
|
|
414
|
+
{
|
|
415
|
+
variant: "secondary",
|
|
416
|
+
isLoading: q === b.compensationUuid,
|
|
417
|
+
onClick: () => {
|
|
418
|
+
X(b);
|
|
419
|
+
},
|
|
420
|
+
children: t("jobAndPay.compensation.pendingChange.cancelCta")
|
|
421
|
+
}
|
|
422
|
+
) })
|
|
423
|
+
] })
|
|
374
424
|
}
|
|
375
425
|
),
|
|
376
|
-
|
|
377
|
-
o.
|
|
426
|
+
te && /* @__PURE__ */ n(
|
|
427
|
+
o.Alert,
|
|
378
428
|
{
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
},
|
|
384
|
-
|
|
429
|
+
status: "warning",
|
|
430
|
+
disableScrollIntoView: !0,
|
|
431
|
+
label: t("jobAndPay.compensation.pendingChange.summaryLabel", {
|
|
432
|
+
name: U ?? ""
|
|
433
|
+
}),
|
|
434
|
+
action: /* @__PURE__ */ n(
|
|
435
|
+
o.Button,
|
|
436
|
+
{
|
|
437
|
+
variant: "secondary",
|
|
438
|
+
onClick: () => {
|
|
439
|
+
ee(!0);
|
|
440
|
+
},
|
|
441
|
+
children: t("jobAndPay.compensation.pendingChange.reviewCta")
|
|
442
|
+
}
|
|
443
|
+
)
|
|
385
444
|
}
|
|
386
|
-
)
|
|
445
|
+
)
|
|
387
446
|
] })
|
|
388
447
|
}
|
|
389
448
|
),
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
{
|
|
393
|
-
status: "warning",
|
|
394
|
-
disableScrollIntoView: !0,
|
|
395
|
-
label: t("jobAndPay.compensation.pendingChange.summaryLabel", {
|
|
396
|
-
name: M ?? ""
|
|
397
|
-
}),
|
|
398
|
-
action: /* @__PURE__ */ n(
|
|
399
|
-
o.Button,
|
|
400
|
-
{
|
|
401
|
-
variant: "secondary",
|
|
402
|
-
onClick: () => {
|
|
403
|
-
X(!0);
|
|
404
|
-
},
|
|
405
|
-
children: t("jobAndPay.compensation.pendingChange.reviewCta")
|
|
406
|
-
}
|
|
407
|
-
)
|
|
408
|
-
}
|
|
409
|
-
),
|
|
410
|
-
A ? /* @__PURE__ */ n(
|
|
411
|
-
v,
|
|
449
|
+
h ? /* @__PURE__ */ n(
|
|
450
|
+
T,
|
|
412
451
|
{
|
|
413
452
|
label: t("jobAndPay.compensation.tableLabel"),
|
|
414
453
|
isWithinBox: !0,
|
|
415
|
-
...
|
|
454
|
+
...Ke
|
|
416
455
|
}
|
|
417
|
-
) :
|
|
418
|
-
|
|
456
|
+
) : a ? /* @__PURE__ */ d(c, { flexDirection: "column", gap: 12, children: [
|
|
457
|
+
a.title && /* @__PURE__ */ d(c, { flexDirection: "column", gap: 0, children: [
|
|
419
458
|
/* @__PURE__ */ n(o.Text, { variant: "supporting", children: t("jobAndPay.compensation.jobTitle") }),
|
|
420
|
-
/* @__PURE__ */ n(o.Text, { children:
|
|
459
|
+
/* @__PURE__ */ n(o.Text, { children: a.title })
|
|
421
460
|
] }),
|
|
422
|
-
|
|
461
|
+
a.paymentUnit && /* @__PURE__ */ d(c, { flexDirection: "column", gap: 0, children: [
|
|
423
462
|
/* @__PURE__ */ n(o.Text, { variant: "supporting", children: t("jobAndPay.compensation.type") }),
|
|
424
|
-
/* @__PURE__ */ n(o.Text, { children:
|
|
463
|
+
/* @__PURE__ */ n(o.Text, { children: a.paymentUnit === "Hour" ? t("jobAndPay.compensation.types.hourly") : a.paymentUnit === "Salary" || a.paymentUnit === "Year" ? t("jobAndPay.compensation.types.salary") : a.paymentUnit })
|
|
425
464
|
] }),
|
|
426
|
-
|
|
465
|
+
Q !== null && a.paymentUnit && /* @__PURE__ */ d(c, { flexDirection: "column", gap: 0, children: [
|
|
427
466
|
/* @__PURE__ */ n(o.Text, { variant: "supporting", children: t("jobAndPay.compensation.wage") }),
|
|
428
|
-
/* @__PURE__ */ n(o.Text, { children:
|
|
467
|
+
/* @__PURE__ */ n(o.Text, { children: Y(Q, a.paymentUnit) })
|
|
429
468
|
] }),
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
/* @__PURE__ */ n(o.Text, { children:
|
|
469
|
+
Je,
|
|
470
|
+
_e && /* @__PURE__ */ d(c, { flexDirection: "column", gap: 0, children: [
|
|
471
|
+
/* @__PURE__ */ n(o.Text, { variant: "supporting", children: t("jobAndPay.compensation.columns.status") }),
|
|
472
|
+
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(o.Badge, { status: "warning", children: t("jobAndPay.compensation.pendingStatus") }) })
|
|
433
473
|
] })
|
|
434
474
|
] }) : /* @__PURE__ */ n(
|
|
435
|
-
|
|
475
|
+
R,
|
|
436
476
|
{
|
|
437
477
|
title: t("jobAndPay.compensation.emptyState.title"),
|
|
438
478
|
description: t("jobAndPay.compensation.emptyState.description")
|
|
@@ -444,20 +484,20 @@ function Kn({
|
|
|
444
484
|
/* @__PURE__ */ n(
|
|
445
485
|
o.Box,
|
|
446
486
|
{
|
|
447
|
-
withPadding:
|
|
487
|
+
withPadding: w.length === 0,
|
|
448
488
|
header: /* @__PURE__ */ n(
|
|
449
489
|
o.BoxHeader,
|
|
450
490
|
{
|
|
451
491
|
title: t("jobAndPay.payment.title"),
|
|
452
|
-
action: /* @__PURE__ */
|
|
453
|
-
|
|
492
|
+
action: /* @__PURE__ */ d(c, { gap: 8, alignItems: "center", justifyContent: "flex-end", children: [
|
|
493
|
+
ce && w.length > 1 && /* @__PURE__ */ n(
|
|
454
494
|
o.Button,
|
|
455
495
|
{
|
|
456
496
|
variant: "secondary",
|
|
457
497
|
onClick: () => {
|
|
458
|
-
u(
|
|
498
|
+
u(P.EMPLOYEE_SPLIT_PAYCHECK, { employeeId: s });
|
|
459
499
|
},
|
|
460
|
-
icon: /* @__PURE__ */ n(
|
|
500
|
+
icon: /* @__PURE__ */ n(Ln, {}),
|
|
461
501
|
children: t("jobAndPay.payment.splitPaycheckCta")
|
|
462
502
|
}
|
|
463
503
|
),
|
|
@@ -466,7 +506,7 @@ function Kn({
|
|
|
466
506
|
{
|
|
467
507
|
variant: "secondary",
|
|
468
508
|
onClick: () => {
|
|
469
|
-
u(
|
|
509
|
+
u(P.EMPLOYEE_BANK_ACCOUNT_CREATE, { employeeId: s });
|
|
470
510
|
},
|
|
471
511
|
icon: /* @__PURE__ */ n(x, {}),
|
|
472
512
|
children: t("jobAndPay.payment.addBankAccountCta")
|
|
@@ -475,15 +515,15 @@ function Kn({
|
|
|
475
515
|
] })
|
|
476
516
|
}
|
|
477
517
|
),
|
|
478
|
-
children:
|
|
479
|
-
/* @__PURE__ */ n(o.Text, { variant: "supporting", children:
|
|
480
|
-
/* @__PURE__ */ n(o.Text, { children:
|
|
518
|
+
children: nn ? /* @__PURE__ */ n(v, {}) : w.length === 0 ? /* @__PURE__ */ d(c, { flexDirection: "column", gap: 0, children: [
|
|
519
|
+
/* @__PURE__ */ n(o.Text, { variant: "supporting", children: A("paymentMethodLabel") }),
|
|
520
|
+
/* @__PURE__ */ n(o.Text, { children: A(ce ? "directDepositLabel" : "checkLabel") })
|
|
481
521
|
] }) : /* @__PURE__ */ n(
|
|
482
|
-
|
|
522
|
+
T,
|
|
483
523
|
{
|
|
484
524
|
label: t("jobAndPay.payment.listLabel"),
|
|
485
525
|
isWithinBox: !0,
|
|
486
|
-
...
|
|
526
|
+
...Qe
|
|
487
527
|
}
|
|
488
528
|
)
|
|
489
529
|
}
|
|
@@ -500,19 +540,19 @@ function Kn({
|
|
|
500
540
|
o.Button,
|
|
501
541
|
{
|
|
502
542
|
variant: "secondary",
|
|
503
|
-
onClick:
|
|
543
|
+
onClick: Pe,
|
|
504
544
|
icon: /* @__PURE__ */ n(x, {}),
|
|
505
545
|
children: t("jobAndPay.deductions.addDeductionCta")
|
|
506
546
|
}
|
|
507
547
|
)
|
|
508
548
|
}
|
|
509
549
|
),
|
|
510
|
-
children: /* @__PURE__ */ n(
|
|
511
|
-
|
|
550
|
+
children: tn ? /* @__PURE__ */ n(v, {}) : /* @__PURE__ */ n(
|
|
551
|
+
T,
|
|
512
552
|
{
|
|
513
553
|
label: t("jobAndPay.deductions.listLabel"),
|
|
514
554
|
isWithinBox: !0,
|
|
515
|
-
...
|
|
555
|
+
...Ze
|
|
516
556
|
}
|
|
517
557
|
)
|
|
518
558
|
}
|
|
@@ -522,73 +562,73 @@ function Kn({
|
|
|
522
562
|
{
|
|
523
563
|
withPadding: !1,
|
|
524
564
|
header: /* @__PURE__ */ n(o.BoxHeader, { title: t("jobAndPay.paystubs.title") }),
|
|
525
|
-
children: /* @__PURE__ */ n(v, { label: t("jobAndPay.paystubs.listLabel"), isWithinBox: !0, ...
|
|
565
|
+
children: ve ? /* @__PURE__ */ n(v, {}) : /* @__PURE__ */ n(T, { label: t("jobAndPay.paystubs.listLabel"), isWithinBox: !0, ...en })
|
|
526
566
|
}
|
|
527
567
|
),
|
|
528
568
|
/* @__PURE__ */ n(
|
|
529
|
-
|
|
569
|
+
cn,
|
|
530
570
|
{
|
|
531
|
-
isOpen:
|
|
532
|
-
pendingChanges:
|
|
533
|
-
employeeFirstName:
|
|
534
|
-
cancellingCompensationUuid:
|
|
571
|
+
isOpen: Me,
|
|
572
|
+
pendingChanges: L,
|
|
573
|
+
employeeFirstName: U,
|
|
574
|
+
cancellingCompensationUuid: q,
|
|
535
575
|
onClose: () => {
|
|
536
|
-
|
|
576
|
+
ee(!1);
|
|
537
577
|
},
|
|
538
578
|
onCancelChange: (e) => {
|
|
539
|
-
|
|
579
|
+
X(e);
|
|
540
580
|
}
|
|
541
581
|
}
|
|
542
582
|
),
|
|
543
583
|
/* @__PURE__ */ n(
|
|
544
|
-
|
|
584
|
+
fn,
|
|
545
585
|
{
|
|
546
|
-
pendingDeleteAccount:
|
|
547
|
-
isPrimaryActionLoading:
|
|
586
|
+
pendingDeleteAccount: ie,
|
|
587
|
+
isPrimaryActionLoading: Ve === ie?.uuid,
|
|
548
588
|
onClose: () => {
|
|
549
|
-
|
|
589
|
+
ae(null);
|
|
550
590
|
},
|
|
551
591
|
onConfirm: () => {
|
|
552
|
-
|
|
592
|
+
Ye();
|
|
553
593
|
}
|
|
554
594
|
}
|
|
555
595
|
),
|
|
556
596
|
/* @__PURE__ */ n(
|
|
557
|
-
|
|
597
|
+
Dn,
|
|
558
598
|
{
|
|
559
|
-
pendingDeleteDeduction:
|
|
560
|
-
isPrimaryActionLoading:
|
|
599
|
+
pendingDeleteDeduction: se,
|
|
600
|
+
isPrimaryActionLoading: re === se?.uuid,
|
|
561
601
|
onClose: () => {
|
|
562
|
-
|
|
602
|
+
de(null);
|
|
563
603
|
},
|
|
564
604
|
onConfirm: () => {
|
|
565
|
-
|
|
605
|
+
Ie();
|
|
566
606
|
}
|
|
567
607
|
}
|
|
568
608
|
),
|
|
569
609
|
/* @__PURE__ */ n(
|
|
570
610
|
o.Dialog,
|
|
571
611
|
{
|
|
572
|
-
isOpen:
|
|
612
|
+
isOpen: D !== null,
|
|
573
613
|
onClose: () => {
|
|
574
|
-
|
|
614
|
+
J(null);
|
|
575
615
|
},
|
|
576
616
|
onPrimaryActionClick: () => {
|
|
577
|
-
|
|
617
|
+
Se();
|
|
578
618
|
},
|
|
579
|
-
isPrimaryActionLoading:
|
|
619
|
+
isPrimaryActionLoading: $,
|
|
580
620
|
isDestructive: !0,
|
|
581
621
|
title: t("jobAndPay.compensation.deleteJobDialog.title"),
|
|
582
622
|
primaryActionLabel: t("jobAndPay.compensation.deleteJobDialog.confirmCta"),
|
|
583
623
|
closeActionLabel: t("jobAndPay.compensation.deleteJobDialog.cancelCta"),
|
|
584
|
-
children:
|
|
585
|
-
jobTitle:
|
|
624
|
+
children: D ? t("jobAndPay.compensation.deleteJobDialog.description", {
|
|
625
|
+
jobTitle: D.title
|
|
586
626
|
}) : null
|
|
587
627
|
}
|
|
588
628
|
)
|
|
589
629
|
] }) });
|
|
590
630
|
}
|
|
591
631
|
export {
|
|
592
|
-
|
|
632
|
+
bt as JobAndPayView
|
|
593
633
|
};
|
|
594
634
|
//# sourceMappingURL=JobAndPayView.js.map
|