@gusto/embedded-react-sdk 0.46.2 → 0.46.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 +67 -0
- package/dist/components/Common/DataView/DataTable/DataTable.js +76 -72
- package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
- package/dist/components/Common/DataView/DataTable/DataTable.module.scss.js +8 -0
- package/dist/components/Common/DataView/DataTable/DataTable.module.scss.js.map +1 -0
- package/dist/components/Common/DataView/useDataView.d.ts +2 -0
- package/dist/components/Common/DataView/useDataView.js.map +1 -1
- package/dist/components/Common/DocumentViewer/DocumentViewer.js +10 -10
- package/dist/components/Common/DocumentViewer/DocumentViewer.js.map +1 -1
- package/dist/components/Common/DocumentViewer/DocumentViewer.module.scss.js +9 -9
- package/dist/components/Common/PaginationControl/PaginationControl.js +11 -10
- package/dist/components/Common/PaginationControl/PaginationControl.js.map +1 -1
- package/dist/components/Common/PaginationControl/PaginationControlTypes.d.ts +1 -1
- package/dist/components/Common/UI/DescriptionList/DescriptionList.js +11 -10
- package/dist/components/Common/UI/DescriptionList/DescriptionList.js.map +1 -1
- package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js +4 -4
- package/dist/components/Common/UI/Input/InputTypes.d.ts +1 -1
- package/dist/components/Common/UI/Input/InputTypes.js.map +1 -1
- package/dist/components/Common/UI/NumberInput/NumberInput.js +51 -48
- package/dist/components/Common/UI/NumberInput/NumberInput.js.map +1 -1
- package/dist/components/Common/VisuallyHidden/VisuallyHidden.d.ts +1 -1
- package/dist/components/Common/VisuallyHidden/VisuallyHidden.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -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 +5 -6
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +6 -7
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +3 -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 +3 -4
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +5 -6
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/Profile/useContractorProfile.js +33 -34
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.js +14 -11
- package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.js.map +1 -1
- package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.js +0 -2
- package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.js.map +1 -1
- package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js +18 -18
- package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js.map +1 -1
- package/dist/components/Employee/Compensation/onboarding/JobsList/JobsListPresentation.js +36 -36
- package/dist/components/Employee/Compensation/onboarding/JobsList/JobsListPresentation.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js +4 -4
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js +140 -140
- 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/useJobForm.d.ts +6 -5
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js +162 -131
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js.map +1 -1
- package/dist/components/Employee/Dashboard/BasicDetailsView.js +74 -88
- package/dist/components/Employee/Dashboard/BasicDetailsView.js.map +1 -1
- package/dist/components/Employee/Dashboard/Dashboard.js +53 -51
- package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
- package/dist/components/Employee/Dashboard/DocumentsView.js +17 -10
- package/dist/components/Employee/Dashboard/DocumentsView.js.map +1 -1
- package/dist/components/Employee/Dashboard/JobAndPayView.js +383 -357
- package/dist/components/Employee/Dashboard/JobAndPayView.js.map +1 -1
- package/dist/components/Employee/Dashboard/TaxesView.js +114 -101
- package/dist/components/Employee/Dashboard/TaxesView.js.map +1 -1
- package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js +36 -36
- package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.js +57 -57
- package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.d.ts +14 -5
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js +55 -36
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js +8 -8
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js +18 -18
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js +4 -4
- package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.d.ts +3 -3
- package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +3 -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/FederalTaxes/shared/useFederalTaxesForm/fields.js +4 -4
- package/dist/components/Employee/HomeAddress/management/HomeAddressView.js +157 -147
- package/dist/components/Employee/HomeAddress/management/HomeAddressView.js.map +1 -1
- package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js +56 -55
- package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js +20 -20
- package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js +1 -1
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.d.ts +1 -1
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js +4 -4
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.js +8 -8
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js +5 -5
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.d.ts +0 -1
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.js +11 -12
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.test.d.ts +1 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.d.ts +6 -1
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js +95 -94
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.js +4 -4
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.d.ts +6 -1
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js +87 -86
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js.map +1 -1
- package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js +18 -18
- package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js.map +1 -1
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js +8 -8
- package/dist/components/Employee/Taxes/useTaxes.js +3 -4
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddressView.js +5 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddressView.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js +61 -60
- package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js.map +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +2 -3
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +2 -3
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js +6 -7
- 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 +52 -68
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.module.scss.js +4 -4
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentationTypes.d.ts +0 -11
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js +137 -163
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js +36 -35
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js.map +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js +34 -34
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js.map +1 -1
- package/dist/helpers/breadcrumbHelpers.d.ts +1 -1
- package/dist/helpers/breadcrumbHelpers.js.map +1 -1
- package/dist/helpers/federalEin.d.ts +1 -0
- package/dist/helpers/federalEin.js.map +1 -1
- package/dist/helpers/mask.d.ts +8 -4
- package/dist/helpers/mask.js.map +1 -1
- package/dist/helpers/rem.d.ts +2 -1
- package/dist/helpers/rem.js.map +1 -1
- package/dist/hooks/useAsyncError.d.ts +1 -0
- package/dist/hooks/useAsyncError.js.map +1 -1
- package/dist/hooks/useForkRef/useForkRef.d.ts +1 -0
- package/dist/hooks/useForkRef/useForkRef.js.map +1 -1
- package/dist/i18n/I18n.d.ts +9 -1
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.EmployeeTable.json.js +14 -14
- package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js +12 -18
- package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js.map +1 -1
- package/dist/i18n/en/Employee.Compensation.json.js +24 -24
- package/dist/i18n/en/Employee.Dashboard.json.js +22 -20
- package/dist/i18n/en/Employee.Dashboard.json.js.map +1 -1
- package/dist/i18n/en/Employee.PaymentMethod.json.js +25 -25
- package/dist/i18n/en/Employee.StateTaxes.json.js +12 -10
- package/dist/i18n/en/Employee.StateTaxes.json.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/hooks.d.ts +1 -1
- package/dist/types/i18next.d.ts +4 -17
- package/dist/types/observability.d.ts +1 -1
- package/package.json +30 -27
- package/dist/components/Employee/Dashboard/CompensationCard.d.ts +0 -13
|
@@ -1,155 +1,141 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { Flex as
|
|
4
|
-
import { useComponentContext as
|
|
5
|
-
import { formatDateLongWithYear as
|
|
6
|
-
import { firstLastName as
|
|
1
|
+
import { jsx as t, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as X } from "react-i18next";
|
|
3
|
+
import { Flex as d } from "../../Common/Flex/Flex.js";
|
|
4
|
+
import { useComponentContext as w } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
5
|
+
import { formatDateLongWithYear as D } from "../../../helpers/dateFormatting.js";
|
|
6
|
+
import { firstLastName as T, getStreet as A, getCityStateZip as L } from "../../../helpers/formattedStrings.js";
|
|
7
7
|
import "classnames";
|
|
8
8
|
import "../../../shared/constants.js";
|
|
9
|
-
import { Loading as
|
|
10
|
-
import { BaseLayout as
|
|
11
|
-
import { useEmployeeBasicDetails as
|
|
9
|
+
import { Loading as m } from "../../Common/Loading/Loading.js";
|
|
10
|
+
import { BaseLayout as N } from "../../Base/Base.js";
|
|
11
|
+
import { useEmployeeBasicDetails as E } from "./hooks/useEmployeeBasicDetails.js";
|
|
12
12
|
function Y({
|
|
13
|
-
employeeId:
|
|
14
|
-
onEditBasicDetails:
|
|
13
|
+
employeeId: a,
|
|
14
|
+
onEditBasicDetails: o,
|
|
15
15
|
onManageHomeAddress: s,
|
|
16
|
-
onManageWorkAddress:
|
|
16
|
+
onManageWorkAddress: n
|
|
17
17
|
}) {
|
|
18
|
-
const
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
|
|
18
|
+
const r = E({ employeeId: a });
|
|
19
|
+
return /* @__PURE__ */ t(N, { error: r.errorHandling.errors, children: /* @__PURE__ */ t(
|
|
20
|
+
H,
|
|
21
21
|
{
|
|
22
|
-
employee:
|
|
23
|
-
currentHomeAddress:
|
|
24
|
-
currentWorkAddress:
|
|
25
|
-
isEmployeeLoading:
|
|
26
|
-
isHomeAddressLoading:
|
|
27
|
-
isWorkAddressLoading:
|
|
28
|
-
onEditBasicDetails:
|
|
22
|
+
employee: r.data.employee,
|
|
23
|
+
currentHomeAddress: r.data.currentHomeAddress,
|
|
24
|
+
currentWorkAddress: r.data.currentWorkAddress,
|
|
25
|
+
isEmployeeLoading: r.status.isEmployeeLoading,
|
|
26
|
+
isHomeAddressLoading: r.status.isHomeAddressLoading,
|
|
27
|
+
isWorkAddressLoading: r.status.isWorkAddressLoading,
|
|
28
|
+
onEditBasicDetails: o,
|
|
29
29
|
onManageHomeAddress: s,
|
|
30
|
-
onManageWorkAddress:
|
|
30
|
+
onManageWorkAddress: n
|
|
31
31
|
}
|
|
32
32
|
) });
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
employee:
|
|
36
|
-
currentHomeAddress:
|
|
34
|
+
function H({
|
|
35
|
+
employee: a,
|
|
36
|
+
currentHomeAddress: o,
|
|
37
37
|
currentWorkAddress: s,
|
|
38
|
-
isLoading:
|
|
39
|
-
isEmployeeLoading:
|
|
40
|
-
isHomeAddressLoading: h =
|
|
41
|
-
isWorkAddressLoading:
|
|
42
|
-
onEditBasicDetails:
|
|
43
|
-
onManageHomeAddress:
|
|
44
|
-
onManageWorkAddress:
|
|
38
|
+
isLoading: n = !1,
|
|
39
|
+
isEmployeeLoading: r = n,
|
|
40
|
+
isHomeAddressLoading: h = n,
|
|
41
|
+
isWorkAddressLoading: p = n,
|
|
42
|
+
onEditBasicDetails: f,
|
|
43
|
+
onManageHomeAddress: u,
|
|
44
|
+
onManageWorkAddress: x
|
|
45
45
|
}) {
|
|
46
|
-
const { t } =
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
const { t: e } = X("Employee.Dashboard"), i = w(), g = a ? T({ first_name: a.firstName, last_name: a.lastName }) : void 0, b = a ? D(a.jobs?.[0]?.hireDate) : void 0, B = a ? D(a.dateOfBirth) : void 0, C = a?.hasSsn ? "XXX-XX-XXXX" : void 0, l = /* @__PURE__ */ t("span", { "aria-label": e("listEmptyPlaceholder"), children: "–" }), v = a ? [
|
|
47
|
+
{ term: e("basicDetails.legalName"), description: g || l },
|
|
48
|
+
{ term: e("basicDetails.startDate"), description: b || l },
|
|
49
|
+
{
|
|
50
|
+
term: e("basicDetails.socialSecurityNumber"),
|
|
51
|
+
description: C || l
|
|
52
|
+
},
|
|
53
|
+
{ term: e("basicDetails.dateOfBirth"), description: B || l },
|
|
54
|
+
{ term: e("basicDetails.personalEmail"), description: a.email || l }
|
|
55
|
+
] : [];
|
|
56
|
+
return /* @__PURE__ */ c(d, { flexDirection: "column", gap: 24, children: [
|
|
57
|
+
/* @__PURE__ */ t(
|
|
49
58
|
i.Box,
|
|
50
59
|
{
|
|
51
|
-
header: /* @__PURE__ */
|
|
60
|
+
header: /* @__PURE__ */ t(
|
|
52
61
|
i.BoxHeader,
|
|
53
62
|
{
|
|
54
|
-
title:
|
|
55
|
-
action: /* @__PURE__ */
|
|
63
|
+
title: e("basicDetails.title"),
|
|
64
|
+
action: /* @__PURE__ */ t(
|
|
56
65
|
i.Button,
|
|
57
66
|
{
|
|
58
67
|
variant: "secondary",
|
|
59
|
-
onClick:
|
|
60
|
-
isDisabled:
|
|
61
|
-
children:
|
|
68
|
+
onClick: f,
|
|
69
|
+
isDisabled: r,
|
|
70
|
+
children: e("basicDetails.editCta")
|
|
62
71
|
}
|
|
63
72
|
)
|
|
64
73
|
}
|
|
65
74
|
),
|
|
66
|
-
children:
|
|
67
|
-
x && /* @__PURE__ */ n(a, { flexDirection: "column", gap: 0, children: [
|
|
68
|
-
/* @__PURE__ */ e(i.Text, { variant: "supporting", children: t("basicDetails.legalName") }),
|
|
69
|
-
/* @__PURE__ */ e(i.Text, { children: x })
|
|
70
|
-
] }),
|
|
71
|
-
p && /* @__PURE__ */ n(a, { flexDirection: "column", gap: 0, children: [
|
|
72
|
-
/* @__PURE__ */ e(i.Text, { variant: "supporting", children: t("basicDetails.startDate") }),
|
|
73
|
-
/* @__PURE__ */ e(i.Text, { children: p })
|
|
74
|
-
] }),
|
|
75
|
-
D && /* @__PURE__ */ n(a, { flexDirection: "column", gap: 0, children: [
|
|
76
|
-
/* @__PURE__ */ e(i.Text, { variant: "supporting", children: t("basicDetails.socialSecurityNumber") }),
|
|
77
|
-
/* @__PURE__ */ e(i.Text, { children: D })
|
|
78
|
-
] }),
|
|
79
|
-
u && /* @__PURE__ */ n(a, { flexDirection: "column", gap: 0, children: [
|
|
80
|
-
/* @__PURE__ */ e(i.Text, { variant: "supporting", children: t("basicDetails.dateOfBirth") }),
|
|
81
|
-
/* @__PURE__ */ e(i.Text, { children: u })
|
|
82
|
-
] }),
|
|
83
|
-
r.email && /* @__PURE__ */ n(a, { flexDirection: "column", gap: 0, children: [
|
|
84
|
-
/* @__PURE__ */ e(i.Text, { variant: "supporting", children: t("basicDetails.personalEmail") }),
|
|
85
|
-
/* @__PURE__ */ e(i.Text, { children: r.email })
|
|
86
|
-
] })
|
|
87
|
-
] }) : null })
|
|
75
|
+
children: r ? /* @__PURE__ */ t(m, {}) : a ? /* @__PURE__ */ t(i.DescriptionList, { items: v }) : null
|
|
88
76
|
}
|
|
89
77
|
),
|
|
90
|
-
/* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ t(
|
|
91
79
|
i.Box,
|
|
92
80
|
{
|
|
93
|
-
header: /* @__PURE__ */
|
|
81
|
+
header: /* @__PURE__ */ t(
|
|
94
82
|
i.BoxHeader,
|
|
95
83
|
{
|
|
96
|
-
title:
|
|
97
|
-
action: /* @__PURE__ */
|
|
84
|
+
title: e("homeAddress.title"),
|
|
85
|
+
action: /* @__PURE__ */ t(
|
|
98
86
|
i.Button,
|
|
99
87
|
{
|
|
100
88
|
variant: "secondary",
|
|
101
|
-
onClick:
|
|
89
|
+
onClick: u,
|
|
102
90
|
isDisabled: h,
|
|
103
|
-
children:
|
|
91
|
+
children: e("homeAddress.manageCta")
|
|
104
92
|
}
|
|
105
93
|
)
|
|
106
94
|
}
|
|
107
95
|
),
|
|
108
|
-
children: /* @__PURE__ */
|
|
109
|
-
/* @__PURE__ */
|
|
110
|
-
/* @__PURE__ */
|
|
111
|
-
|
|
112
|
-
] }) : /* @__PURE__ */ e(i.Text, { children: t("homeAddress.noAddress") }) })
|
|
96
|
+
children: /* @__PURE__ */ t(d, { flexDirection: "column", gap: 16, children: h ? /* @__PURE__ */ t(m, {}) : o ? /* @__PURE__ */ c(d, { flexDirection: "column", gap: 0, children: [
|
|
97
|
+
/* @__PURE__ */ t(i.Text, { weight: "medium", children: A(o).replace(",", "") }),
|
|
98
|
+
/* @__PURE__ */ t(i.Text, { variant: "supporting", children: L(o) })
|
|
99
|
+
] }) : /* @__PURE__ */ t(i.Text, { children: e("homeAddress.noAddress") }) })
|
|
113
100
|
}
|
|
114
101
|
),
|
|
115
|
-
/* @__PURE__ */
|
|
102
|
+
/* @__PURE__ */ t(
|
|
116
103
|
i.Box,
|
|
117
104
|
{
|
|
118
|
-
header: /* @__PURE__ */
|
|
105
|
+
header: /* @__PURE__ */ t(
|
|
119
106
|
i.BoxHeader,
|
|
120
107
|
{
|
|
121
|
-
title:
|
|
122
|
-
action: /* @__PURE__ */
|
|
108
|
+
title: e("workAddress.title"),
|
|
109
|
+
action: /* @__PURE__ */ t(
|
|
123
110
|
i.Button,
|
|
124
111
|
{
|
|
125
112
|
variant: "secondary",
|
|
126
|
-
onClick:
|
|
127
|
-
isDisabled:
|
|
128
|
-
children:
|
|
113
|
+
onClick: x,
|
|
114
|
+
isDisabled: p,
|
|
115
|
+
children: e("workAddress.manageCta")
|
|
129
116
|
}
|
|
130
117
|
)
|
|
131
118
|
}
|
|
132
119
|
),
|
|
133
|
-
children: /* @__PURE__ */
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
-
/* @__PURE__ */ n(i.Text, { children: [
|
|
120
|
+
children: /* @__PURE__ */ t(d, { flexDirection: "column", gap: 16, children: p ? /* @__PURE__ */ t(m, {}) : s ? /* @__PURE__ */ c(d, { flexDirection: "column", gap: 0, children: [
|
|
121
|
+
/* @__PURE__ */ c(i.Text, { weight: "medium", children: [
|
|
136
122
|
s.street1,
|
|
137
123
|
s.street2 ? `, ${s.street2}` : ""
|
|
138
124
|
] }),
|
|
139
|
-
/* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ c(i.Text, { variant: "supporting", children: [
|
|
140
126
|
s.city,
|
|
141
127
|
", ",
|
|
142
128
|
s.state,
|
|
143
129
|
" ",
|
|
144
130
|
s.zip
|
|
145
131
|
] })
|
|
146
|
-
] }) : /* @__PURE__ */
|
|
132
|
+
] }) : /* @__PURE__ */ t(i.Text, { children: e("workAddress.noAddress") }) })
|
|
147
133
|
}
|
|
148
134
|
)
|
|
149
135
|
] });
|
|
150
136
|
}
|
|
151
137
|
export {
|
|
152
|
-
|
|
138
|
+
H as BasicDetailsView,
|
|
153
139
|
Y as BasicDetailsViewWithData
|
|
154
140
|
};
|
|
155
141
|
//# sourceMappingURL=BasicDetailsView.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BasicDetailsView.js","sources":["../../../../src/components/Employee/Dashboard/BasicDetailsView.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport type { EmployeeAddress } from '@gusto/embedded-api/models/components/employeeaddress'\nimport type { EmployeeWorkAddress } from '@gusto/embedded-api/models/components/employeeworkaddress'\nimport { useEmployeeBasicDetails } from './hooks'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { formatDateLongWithYear } from '@/helpers/dateFormatting'\nimport { firstLastName, getStreet, getCityStateZip } from '@/helpers/formattedStrings'\nimport { Loading } from '@/components/Common'\nimport { BaseLayout } from '@/components/Base/Base'\n\nexport interface BasicDetailsViewProps {\n employee?: Employee\n currentHomeAddress?: EmployeeAddress\n currentWorkAddress?: EmployeeWorkAddress\n /** Loads all three cards. Per-section flags below take precedence\n * when each query resolves independently. */\n isLoading?: boolean\n isEmployeeLoading?: boolean\n isHomeAddressLoading?: boolean\n isWorkAddressLoading?: boolean\n onEditBasicDetails?: () => void\n onManageHomeAddress?: () => void\n onManageWorkAddress?: () => void\n}\n\nexport interface BasicDetailsViewWithDataProps {\n employeeId: string\n onEditBasicDetails?: () => void\n onManageHomeAddress?: () => void\n onManageWorkAddress?: () => void\n}\n\n/**\n * Tab-mounted container for the Basic details tab. Owns the\n * `useEmployeeBasicDetails` fetch (employee + home address + work address)\n * so the requests only fire when the tab is mounted. Each card paints\n * its own skeleton + content as the underlying query resolves.\n */\nexport function BasicDetailsViewWithData({\n employeeId,\n onEditBasicDetails,\n onManageHomeAddress,\n onManageWorkAddress,\n}: BasicDetailsViewWithDataProps) {\n const basicDetails = useEmployeeBasicDetails({ employeeId })\n\n return (\n <BaseLayout error={basicDetails.errorHandling.errors}>\n <BasicDetailsView\n employee={basicDetails.data.employee}\n currentHomeAddress={basicDetails.data.currentHomeAddress}\n currentWorkAddress={basicDetails.data.currentWorkAddress}\n isEmployeeLoading={basicDetails.status.isEmployeeLoading}\n isHomeAddressLoading={basicDetails.status.isHomeAddressLoading}\n isWorkAddressLoading={basicDetails.status.isWorkAddressLoading}\n onEditBasicDetails={onEditBasicDetails}\n onManageHomeAddress={onManageHomeAddress}\n onManageWorkAddress={onManageWorkAddress}\n />\n </BaseLayout>\n )\n}\n\nexport function BasicDetailsView({\n employee,\n currentHomeAddress,\n currentWorkAddress,\n isLoading = false,\n isEmployeeLoading = isLoading,\n isHomeAddressLoading = isLoading,\n isWorkAddressLoading = isLoading,\n onEditBasicDetails,\n onManageHomeAddress,\n onManageWorkAddress,\n}: BasicDetailsViewProps) {\n const { t } = useTranslation('Employee.Dashboard')\n const Components = useComponentContext()\n\n const legalName = employee\n ? firstLastName({ first_name: employee.firstName, last_name: employee.lastName })\n : undefined\n const startDate = employee ? formatDateLongWithYear(employee.jobs?.[0]?.hireDate) : undefined\n const dateOfBirth = employee ? formatDateLongWithYear(employee.dateOfBirth) : undefined\n const maskedSsn = employee?.hasSsn ? 'XXX-XX-XXXX' : undefined\n\n return (\n <Flex flexDirection=\"column\" gap={24}>\n <Components.Box\n header={\n <Components.BoxHeader\n title={t('basicDetails.title')}\n action={\n <Components.Button\n variant=\"secondary\"\n onClick={onEditBasicDetails}\n isDisabled={isEmployeeLoading}\n >\n {t('basicDetails.editCta')}\n </Components.Button>\n }\n />\n }\n >\n <Flex flexDirection=\"column\" gap={16}>\n {isEmployeeLoading ? (\n <Loading />\n ) : employee ? (\n <Flex flexDirection=\"column\" gap={12}>\n {legalName && (\n <Flex flexDirection=\"column\" gap={0}>\n <Components.Text variant=\"supporting\">\n {t('basicDetails.legalName')}\n </Components.Text>\n <Components.Text>{legalName}</Components.Text>\n </Flex>\n )}\n\n {startDate && (\n <Flex flexDirection=\"column\" gap={0}>\n <Components.Text variant=\"supporting\">\n {t('basicDetails.startDate')}\n </Components.Text>\n <Components.Text>{startDate}</Components.Text>\n </Flex>\n )}\n\n {maskedSsn && (\n <Flex flexDirection=\"column\" gap={0}>\n <Components.Text variant=\"supporting\">\n {t('basicDetails.socialSecurityNumber')}\n </Components.Text>\n <Components.Text>{maskedSsn}</Components.Text>\n </Flex>\n )}\n\n {dateOfBirth && (\n <Flex flexDirection=\"column\" gap={0}>\n <Components.Text variant=\"supporting\">\n {t('basicDetails.dateOfBirth')}\n </Components.Text>\n <Components.Text>{dateOfBirth}</Components.Text>\n </Flex>\n )}\n\n {employee.email && (\n <Flex flexDirection=\"column\" gap={0}>\n <Components.Text variant=\"supporting\">\n {t('basicDetails.personalEmail')}\n </Components.Text>\n <Components.Text>{employee.email}</Components.Text>\n </Flex>\n )}\n </Flex>\n ) : null}\n </Flex>\n </Components.Box>\n\n <Components.Box\n header={\n <Components.BoxHeader\n title={t('homeAddress.title')}\n action={\n <Components.Button\n variant=\"secondary\"\n onClick={onManageHomeAddress}\n isDisabled={isHomeAddressLoading}\n >\n {t('homeAddress.manageCta')}\n </Components.Button>\n }\n />\n }\n >\n <Flex flexDirection=\"column\" gap={16}>\n {isHomeAddressLoading ? (\n <Loading />\n ) : currentHomeAddress ? (\n <Flex flexDirection=\"column\" gap={0}>\n <Components.Text variant=\"supporting\">\n {t('homeAddress.currentAddress')}\n </Components.Text>\n <Components.Text>{getStreet(currentHomeAddress).replace(',', '')}</Components.Text>\n <Components.Text>{getCityStateZip(currentHomeAddress)}</Components.Text>\n </Flex>\n ) : (\n <Components.Text>{t('homeAddress.noAddress')}</Components.Text>\n )}\n </Flex>\n </Components.Box>\n\n <Components.Box\n header={\n <Components.BoxHeader\n title={t('workAddress.title')}\n action={\n <Components.Button\n variant=\"secondary\"\n onClick={onManageWorkAddress}\n isDisabled={isWorkAddressLoading}\n >\n {t('workAddress.manageCta')}\n </Components.Button>\n }\n />\n }\n >\n <Flex flexDirection=\"column\" gap={16}>\n {isWorkAddressLoading ? (\n <Loading />\n ) : currentWorkAddress ? (\n <Flex flexDirection=\"column\" gap={0}>\n <Components.Text variant=\"supporting\">\n {t('workAddress.currentAddress')}\n </Components.Text>\n <Components.Text>\n {currentWorkAddress.street1}\n {currentWorkAddress.street2 ? `, ${currentWorkAddress.street2}` : ''}\n </Components.Text>\n <Components.Text>\n {currentWorkAddress.city}, {currentWorkAddress.state} {currentWorkAddress.zip}\n </Components.Text>\n </Flex>\n ) : (\n <Components.Text>{t('workAddress.noAddress')}</Components.Text>\n )}\n </Flex>\n </Components.Box>\n </Flex>\n )\n}\n"],"names":["BasicDetailsViewWithData","employeeId","onEditBasicDetails","onManageHomeAddress","onManageWorkAddress","basicDetails","useEmployeeBasicDetails","jsx","BaseLayout","BasicDetailsView","employee","currentHomeAddress","currentWorkAddress","isLoading","isEmployeeLoading","isHomeAddressLoading","isWorkAddressLoading","useTranslation","Components","useComponentContext","legalName","firstLastName","startDate","formatDateLongWithYear","dateOfBirth","maskedSsn","jsxs","Flex","Loading","getStreet","getCityStateZip"],"mappings":";;;;;;;;;;;AAwCO,SAASA,EAAyB;AAAA,EACvC,YAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,qBAAAC;AACF,GAAkC;AAChC,QAAMC,IAAeC,EAAwB,EAAE,YAAAL,GAAY;AAE3D,SACE,gBAAAM,EAACC,GAAA,EAAW,OAAOH,EAAa,cAAc,QAC5C,UAAA,gBAAAE;AAAA,IAACE;AAAA,IAAA;AAAA,MACC,UAAUJ,EAAa,KAAK;AAAA,MAC5B,oBAAoBA,EAAa,KAAK;AAAA,MACtC,oBAAoBA,EAAa,KAAK;AAAA,MACtC,mBAAmBA,EAAa,OAAO;AAAA,MACvC,sBAAsBA,EAAa,OAAO;AAAA,MAC1C,sBAAsBA,EAAa,OAAO;AAAA,MAC1C,oBAAAH;AAAA,MACA,qBAAAC;AAAA,MACA,qBAAAC;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;AAEO,SAASK,EAAiB;AAAA,EAC/B,UAAA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EAAK,eAAc,UAAS,KAAK,GAChC,UAAA;AAAA,UAAA,gBAAApB,EAACW,EAAW,MAAX,EAAgB,SAAQ,cACtB,UAAA,EAAE,4BAA4B,GACjC;AAAA,UACA,gBAAAQ,EAACR,EAAW,MAAX,EACE,UAAA;AAAA,YAAAN,EAAmB;AAAA,YACnBA,EAAmB,UAAU,KAAKA,EAAmB,OAAO,KAAK;AAAA,UAAA,GACpE;AAAA,UACA,gBAAAc,EAACR,EAAW,MAAX,EACE,UAAA;AAAA,YAAAN,EAAmB;AAAA,YAAK;AAAA,YAAGA,EAAmB;AAAA,YAAM;AAAA,YAAEA,EAAmB;AAAA,UAAA,EAAA,CAC5E;AAAA,QAAA,GACF,sBAECM,EAAW,MAAX,EAAiB,UAAA,EAAE,uBAAuB,GAAE,EAAA,CAEjD;AAAA,MAAA;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"BasicDetailsView.js","sources":["../../../../src/components/Employee/Dashboard/BasicDetailsView.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport type { EmployeeAddress } from '@gusto/embedded-api/models/components/employeeaddress'\nimport type { EmployeeWorkAddress } from '@gusto/embedded-api/models/components/employeeworkaddress'\nimport { useEmployeeBasicDetails } from './hooks'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { formatDateLongWithYear } from '@/helpers/dateFormatting'\nimport { firstLastName, getStreet, getCityStateZip } from '@/helpers/formattedStrings'\nimport { Loading } from '@/components/Common'\nimport { BaseLayout } from '@/components/Base/Base'\n\nexport interface BasicDetailsViewProps {\n employee?: Employee\n currentHomeAddress?: EmployeeAddress\n currentWorkAddress?: EmployeeWorkAddress\n /** Loads all three cards. Per-section flags below take precedence\n * when each query resolves independently. */\n isLoading?: boolean\n isEmployeeLoading?: boolean\n isHomeAddressLoading?: boolean\n isWorkAddressLoading?: boolean\n onEditBasicDetails?: () => void\n onManageHomeAddress?: () => void\n onManageWorkAddress?: () => void\n}\n\nexport interface BasicDetailsViewWithDataProps {\n employeeId: string\n onEditBasicDetails?: () => void\n onManageHomeAddress?: () => void\n onManageWorkAddress?: () => void\n}\n\n/**\n * Tab-mounted container for the Basic details tab. Owns the\n * `useEmployeeBasicDetails` fetch (employee + home address + work address)\n * so the requests only fire when the tab is mounted. Each card paints\n * its own skeleton + content as the underlying query resolves.\n */\nexport function BasicDetailsViewWithData({\n employeeId,\n onEditBasicDetails,\n onManageHomeAddress,\n onManageWorkAddress,\n}: BasicDetailsViewWithDataProps) {\n const basicDetails = useEmployeeBasicDetails({ employeeId })\n\n return (\n <BaseLayout error={basicDetails.errorHandling.errors}>\n <BasicDetailsView\n employee={basicDetails.data.employee}\n currentHomeAddress={basicDetails.data.currentHomeAddress}\n currentWorkAddress={basicDetails.data.currentWorkAddress}\n isEmployeeLoading={basicDetails.status.isEmployeeLoading}\n isHomeAddressLoading={basicDetails.status.isHomeAddressLoading}\n isWorkAddressLoading={basicDetails.status.isWorkAddressLoading}\n onEditBasicDetails={onEditBasicDetails}\n onManageHomeAddress={onManageHomeAddress}\n onManageWorkAddress={onManageWorkAddress}\n />\n </BaseLayout>\n )\n}\n\nexport function BasicDetailsView({\n employee,\n currentHomeAddress,\n currentWorkAddress,\n isLoading = false,\n isEmployeeLoading = isLoading,\n isHomeAddressLoading = isLoading,\n isWorkAddressLoading = isLoading,\n onEditBasicDetails,\n onManageHomeAddress,\n onManageWorkAddress,\n}: BasicDetailsViewProps) {\n const { t } = useTranslation('Employee.Dashboard')\n const Components = useComponentContext()\n\n const legalName = employee\n ? firstLastName({ first_name: employee.firstName, last_name: employee.lastName })\n : undefined\n const startDate = employee ? formatDateLongWithYear(employee.jobs?.[0]?.hireDate) : undefined\n const dateOfBirth = employee ? formatDateLongWithYear(employee.dateOfBirth) : undefined\n const maskedSsn = employee?.hasSsn ? 'XXX-XX-XXXX' : undefined\n\n const emptyPlaceholder = <span aria-label={t('listEmptyPlaceholder')}>–</span>\n const basicDetailsItems = employee\n ? [\n { term: t('basicDetails.legalName'), description: legalName || emptyPlaceholder },\n { term: t('basicDetails.startDate'), description: startDate || emptyPlaceholder },\n {\n term: t('basicDetails.socialSecurityNumber'),\n description: maskedSsn || emptyPlaceholder,\n },\n { term: t('basicDetails.dateOfBirth'), description: dateOfBirth || emptyPlaceholder },\n { term: t('basicDetails.personalEmail'), description: employee.email || emptyPlaceholder },\n ]\n : []\n\n return (\n <Flex flexDirection=\"column\" gap={24}>\n <Components.Box\n header={\n <Components.BoxHeader\n title={t('basicDetails.title')}\n action={\n <Components.Button\n variant=\"secondary\"\n onClick={onEditBasicDetails}\n isDisabled={isEmployeeLoading}\n >\n {t('basicDetails.editCta')}\n </Components.Button>\n }\n />\n }\n >\n {isEmployeeLoading ? (\n <Loading />\n ) : employee ? (\n <Components.DescriptionList items={basicDetailsItems} />\n ) : null}\n </Components.Box>\n\n <Components.Box\n header={\n <Components.BoxHeader\n title={t('homeAddress.title')}\n action={\n <Components.Button\n variant=\"secondary\"\n onClick={onManageHomeAddress}\n isDisabled={isHomeAddressLoading}\n >\n {t('homeAddress.manageCta')}\n </Components.Button>\n }\n />\n }\n >\n <Flex flexDirection=\"column\" gap={16}>\n {isHomeAddressLoading ? (\n <Loading />\n ) : currentHomeAddress ? (\n <Flex flexDirection=\"column\" gap={0}>\n <Components.Text weight=\"medium\">\n {getStreet(currentHomeAddress).replace(',', '')}\n </Components.Text>\n <Components.Text variant=\"supporting\">\n {getCityStateZip(currentHomeAddress)}\n </Components.Text>\n </Flex>\n ) : (\n <Components.Text>{t('homeAddress.noAddress')}</Components.Text>\n )}\n </Flex>\n </Components.Box>\n\n <Components.Box\n header={\n <Components.BoxHeader\n title={t('workAddress.title')}\n action={\n <Components.Button\n variant=\"secondary\"\n onClick={onManageWorkAddress}\n isDisabled={isWorkAddressLoading}\n >\n {t('workAddress.manageCta')}\n </Components.Button>\n }\n />\n }\n >\n <Flex flexDirection=\"column\" gap={16}>\n {isWorkAddressLoading ? (\n <Loading />\n ) : currentWorkAddress ? (\n <Flex flexDirection=\"column\" gap={0}>\n <Components.Text weight=\"medium\">\n {currentWorkAddress.street1}\n {currentWorkAddress.street2 ? `, ${currentWorkAddress.street2}` : ''}\n </Components.Text>\n <Components.Text variant=\"supporting\">\n {currentWorkAddress.city}, {currentWorkAddress.state} {currentWorkAddress.zip}\n </Components.Text>\n </Flex>\n ) : (\n <Components.Text>{t('workAddress.noAddress')}</Components.Text>\n )}\n </Flex>\n </Components.Box>\n </Flex>\n )\n}\n"],"names":["BasicDetailsViewWithData","employeeId","onEditBasicDetails","onManageHomeAddress","onManageWorkAddress","basicDetails","useEmployeeBasicDetails","jsx","BaseLayout","BasicDetailsView","employee","currentHomeAddress","currentWorkAddress","isLoading","isEmployeeLoading","isHomeAddressLoading","isWorkAddressLoading","t","useTranslation","Components","useComponentContext","legalName","firstLastName","startDate","formatDateLongWithYear","dateOfBirth","maskedSsn","emptyPlaceholder","basicDetailsItems","jsxs","Flex","Loading","getStreet","getCityStateZip"],"mappings":";;;;;;;;;;;AAwCO,SAASA,EAAyB;AAAA,EACvC,YAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,qBAAAC;AACF,GAAkC;AAChC,QAAMC,IAAeC,EAAwB,EAAE,YAAAL,GAAY;AAE3D,SACE,gBAAAM,EAACC,GAAA,EAAW,OAAOH,EAAa,cAAc,QAC5C,UAAA,gBAAAE;AAAA,IAACE;AAAA,IAAA;AAAA,MACC,UAAUJ,EAAa,KAAK;AAAA,MAC5B,oBAAoBA,EAAa,KAAK;AAAA,MACtC,oBAAoBA,EAAa,KAAK;AAAA,MACtC,mBAAmBA,EAAa,OAAO;AAAA,MACvC,sBAAsBA,EAAa,OAAO;AAAA,MAC1C,sBAAsBA,EAAa,OAAO;AAAA,MAC1C,oBAAAH;AAAA,MACA,qBAAAC;AAAA,MACA,qBAAAC;A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A;AAAA,IAAA;AAAA,IAGF,gBAAAV;AAAA,MAACY,EAAW;AAAA,MAAX;AAAA,QACC,QACE,gBAAAZ;AAAA,UAACY,EAAW;AAAA,UAAX;AAAA,YACC,OAAOF,EAAE,mBAAmB;AAAA,YAC5B,QACE,gBAAAV;AAAA,cAACY,EAAW;AAAA,cAAX;AAAA,gBACC,SAAQ;AAAA,gBACR,SAASf;AAAA,gBACT,YAAYY;AAAA,gBAEX,YAAE,uBAAuB;AAAA,cAAA;AAAA,YAAA;AAAA,UAC5B;AAAA,QAAA;AAAA,QAKN,4BAACc,GAAA,EAAK,eAAc,UAAS,KAAK,IAC/B,UAAAd,IACC,gBAAAT,EAACwB,GAAA,EAAQ,IACPnB,IACF,gBAAAiB,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,GAChC,UAAA;AAAA,UAAA,gBAAAD,EAACV,EAAW,MAAX,EAAgB,QAAO,UACrB,UAAA;AAAA,YAAAP,EAAmB;AAAA,YACnBA,EAAmB,UAAU,KAAKA,EAAmB,OAAO,KAAK;AAAA,UAAA,GACpE;AAAA,UACA,gBAAAiB,EAACV,EAAW,MAAX,EAAgB,SAAQ,cACtB,UAAA;AAAA,YAAAP,EAAmB;AAAA,YAAK;AAAA,YAAGA,EAAmB;AAAA,YAAM;AAAA,YAAEA,EAAmB;AAAA,UAAA,EAAA,CAC5E;AAAA,QAAA,GACF,sBAECO,EAAW,MAAX,EAAiB,UAAAF,EAAE,uBAAuB,GAAE,EAAA,CAEjD;AAAA,MAAA;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as s, jsxs as D } from "react/jsx-runtime";
|
|
2
2
|
import { useState as B, useCallback as o, Suspense as l } from "react";
|
|
3
|
-
import { useTranslation as
|
|
3
|
+
import { useTranslation as h } from "react-i18next";
|
|
4
4
|
import { useEmployeesGetSuspense as R } from "@gusto/embedded-api/react-query/employeesGet";
|
|
5
5
|
import { BasicDetailsViewWithData as k } from "./BasicDetailsView.js";
|
|
6
6
|
import { JobAndPayView as H } from "./JobAndPayView.js";
|
|
7
7
|
import { TaxesViewWithData as F } from "./TaxesView.js";
|
|
8
8
|
import { DocumentsViewWithData as J } from "./DocumentsView.js";
|
|
9
9
|
import { Flex as b } from "../../Common/Flex/Flex.js";
|
|
10
|
-
import { useComponentContext as
|
|
10
|
+
import { useComponentContext as m } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
11
11
|
import { BaseBoundaries as V, BaseLayout as E } from "../../Base/Base.js";
|
|
12
12
|
import { useI18n as W, useComponentDictionary as w } from "../../../i18n/I18n.js";
|
|
13
13
|
import { componentEvents as i } from "../../../shared/constants.js";
|
|
@@ -19,34 +19,34 @@ function G({
|
|
|
19
19
|
selectedTab: d
|
|
20
20
|
}) {
|
|
21
21
|
W("Employee.Dashboard"), w("Employee.Dashboard", r);
|
|
22
|
-
const { t: c } =
|
|
22
|
+
const { t: c } = h("Employee.Dashboard"), A = m(), [_, f] = B("basicDetails"), e = d ?? _, T = o(() => {
|
|
23
23
|
t(i.EMPLOYEE_UPDATE, { employeeId: a });
|
|
24
24
|
}, [t, a]), O = o(() => {
|
|
25
25
|
t(i.EMPLOYEE_HOME_ADDRESS, { employeeId: a });
|
|
26
26
|
}, [t, a]), L = o(() => {
|
|
27
27
|
t(i.EMPLOYEE_WORK_ADDRESS, { employeeId: a });
|
|
28
|
-
}, [t, a]),
|
|
28
|
+
}, [t, a]), x = o(
|
|
29
29
|
(n) => {
|
|
30
30
|
t(i.EMPLOYEE_COMPENSATION_CREATE, { employeeId: a, job: n });
|
|
31
31
|
},
|
|
32
32
|
[t, a]
|
|
33
|
-
),
|
|
33
|
+
), M = o(() => {
|
|
34
34
|
t(i.EMPLOYEE_JOB_ADD, { employeeId: a });
|
|
35
35
|
}, [t, a]), P = o(() => {
|
|
36
36
|
t(i.EMPLOYEE_JOB_ADD_ANOTHER, { employeeId: a });
|
|
37
37
|
}, [t, a]), S = o(() => {
|
|
38
38
|
t(i.EMPLOYEE_DEDUCTION_ADD, { employeeId: a });
|
|
39
|
-
}, [t, a]),
|
|
39
|
+
}, [t, a]), g = o(
|
|
40
40
|
(n) => {
|
|
41
41
|
t(i.EMPLOYEE_DEDUCTION_EDIT, n);
|
|
42
42
|
},
|
|
43
43
|
[t]
|
|
44
|
-
),
|
|
44
|
+
), p = o(
|
|
45
45
|
(n) => {
|
|
46
46
|
t(i.EMPLOYEE_FEDERAL_TAXES_EDIT, { employeeId: a, federalTaxes: n });
|
|
47
47
|
},
|
|
48
48
|
[t, a]
|
|
49
|
-
),
|
|
49
|
+
), C = o(() => {
|
|
50
50
|
t(i.EMPLOYEE_STATE_TAXES_EDIT, { employeeId: a });
|
|
51
51
|
}, [t, a]), Y = o(
|
|
52
52
|
(n) => {
|
|
@@ -77,59 +77,61 @@ function G({
|
|
|
77
77
|
];
|
|
78
78
|
return /* @__PURE__ */ D(b, { flexDirection: "column", gap: 32, children: [
|
|
79
79
|
/* @__PURE__ */ s(l, { fallback: null, children: /* @__PURE__ */ s(U, { employeeId: a }) }),
|
|
80
|
-
/* @__PURE__ */
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
tabs: N,
|
|
84
|
-
selectedId: e,
|
|
85
|
-
onSelectionChange: (n) => {
|
|
86
|
-
const h = n;
|
|
87
|
-
f(h), t(i.EMPLOYEE_DASHBOARD_TAB_CHANGE, { tab: h });
|
|
88
|
-
},
|
|
89
|
-
"aria-label": c("tabsLabel")
|
|
90
|
-
}
|
|
91
|
-
),
|
|
92
|
-
/* @__PURE__ */ D(b, { flexDirection: "column", gap: 24, children: [
|
|
93
|
-
e === "basicDetails" && /* @__PURE__ */ s(l, { fallback: /* @__PURE__ */ s(E, { isLoading: !0 }), children: /* @__PURE__ */ s(
|
|
94
|
-
k,
|
|
80
|
+
/* @__PURE__ */ D(b, { flexDirection: "column", gap: 8, children: [
|
|
81
|
+
/* @__PURE__ */ s(
|
|
82
|
+
A.Tabs,
|
|
95
83
|
{
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
84
|
+
tabs: N,
|
|
85
|
+
selectedId: e,
|
|
86
|
+
onSelectionChange: (n) => {
|
|
87
|
+
const u = n;
|
|
88
|
+
f(u), t(i.EMPLOYEE_DASHBOARD_TAB_CHANGE, { tab: u });
|
|
89
|
+
},
|
|
90
|
+
"aria-label": c("tabsLabel")
|
|
100
91
|
}
|
|
101
|
-
)
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
92
|
+
),
|
|
93
|
+
/* @__PURE__ */ D(b, { flexDirection: "column", gap: 24, children: [
|
|
94
|
+
e === "basicDetails" && /* @__PURE__ */ s(l, { fallback: /* @__PURE__ */ s(E, { isLoading: !0 }), children: /* @__PURE__ */ s(
|
|
95
|
+
k,
|
|
96
|
+
{
|
|
97
|
+
employeeId: a,
|
|
98
|
+
onEditBasicDetails: T,
|
|
99
|
+
onManageHomeAddress: O,
|
|
100
|
+
onManageWorkAddress: L
|
|
101
|
+
}
|
|
102
|
+
) }),
|
|
103
|
+
e === "jobAndPay" && /* @__PURE__ */ s(l, { fallback: /* @__PURE__ */ s(E, { isLoading: !0 }), children: /* @__PURE__ */ s(
|
|
104
|
+
H,
|
|
105
|
+
{
|
|
106
|
+
employeeId: a,
|
|
107
|
+
onEvent: t,
|
|
108
|
+
onEditCompensation: x,
|
|
109
|
+
onAddJob: M,
|
|
110
|
+
onAddAnotherJob: P,
|
|
111
|
+
onAddDeduction: S,
|
|
112
|
+
onEditDeduction: g
|
|
113
|
+
}
|
|
114
|
+
) }),
|
|
115
|
+
e === "taxes" && /* @__PURE__ */ s(l, { fallback: /* @__PURE__ */ s(E, { isLoading: !0 }), children: /* @__PURE__ */ s(
|
|
116
|
+
F,
|
|
117
|
+
{
|
|
118
|
+
employeeId: a,
|
|
119
|
+
onEditFederalTaxes: p,
|
|
120
|
+
onEditStateTaxes: C
|
|
121
|
+
}
|
|
122
|
+
) }),
|
|
123
|
+
e === "documents" && /* @__PURE__ */ s(l, { fallback: /* @__PURE__ */ s(E, { isLoading: !0 }), children: /* @__PURE__ */ s(J, { employeeId: a, onViewForm: Y }) })
|
|
124
|
+
] })
|
|
123
125
|
] })
|
|
124
126
|
] });
|
|
125
127
|
}
|
|
126
128
|
function U({ employeeId: a }) {
|
|
127
|
-
const { t: r } =
|
|
129
|
+
const { t: r } = h("Employee.Dashboard"), t = m(), {
|
|
128
130
|
data: { employee: d }
|
|
129
131
|
} = R({ employeeId: a });
|
|
130
132
|
return /* @__PURE__ */ D(b, { flexDirection: "column", gap: 4, children: [
|
|
131
133
|
/* @__PURE__ */ s(t.Heading, { as: "h2", children: j({ first_name: d?.firstName, last_name: d?.lastName }) }),
|
|
132
|
-
/* @__PURE__ */ s(t.Text, { children: r("employeeRoleLabel") })
|
|
134
|
+
/* @__PURE__ */ s(t.Text, { variant: "supporting", children: r("employeeRoleLabel") })
|
|
133
135
|
] });
|
|
134
136
|
}
|
|
135
137
|
function oa({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dashboard.js","sources":["../../../../src/components/Employee/Dashboard/Dashboard.tsx"],"sourcesContent":["import { Suspense, useState, useCallback } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { useEmployeesGetSuspense } from '@gusto/embedded-api/react-query/employeesGet'\nimport type { Job } from '@gusto/embedded-api/models/components/job'\nimport type { Garnishment } from '@gusto/embedded-api/models/components/garnishment'\nimport type { GetV1EmployeesEmployeeIdFederalTaxesResponse } from '@gusto/embedded-api/models/operations/getv1employeesemployeeidfederaltaxes'\nimport { BasicDetailsViewWithData } from './BasicDetailsView'\nimport { JobAndPayView } from './JobAndPayView'\nimport { TaxesViewWithData } from './TaxesView'\nimport { DocumentsViewWithData } from './DocumentsView'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { BaseBoundaries, BaseLayout, type BaseComponentInterface } from '@/components/Base/Base'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { firstLastName } from '@/helpers/formattedStrings'\n\ntype EmployeeFederalTax = NonNullable<\n GetV1EmployeesEmployeeIdFederalTaxesResponse['employeeFederalTax']\n>\n\nexport type DashboardTab = 'basicDetails' | 'jobAndPay' | 'taxes' | 'documents'\n\nexport interface DashboardProps extends BaseComponentInterface<'Employee.Dashboard'> {\n employeeId: string\n selectedTab?: DashboardTab\n}\n\nfunction DashboardRoot({\n employeeId,\n dictionary,\n onEvent,\n selectedTab: controlledTab,\n}: DashboardProps) {\n useI18n('Employee.Dashboard')\n useComponentDictionary('Employee.Dashboard', dictionary)\n const { t } = useTranslation('Employee.Dashboard')\n const Components = useComponentContext()\n const [internalTab, setInternalTab] = useState<DashboardTab>('basicDetails')\n const selectedTab = controlledTab ?? internalTab\n\n const handleEditBasicDetails = useCallback(() => {\n onEvent(componentEvents.EMPLOYEE_UPDATE, { employeeId })\n }, [onEvent, employeeId])\n\n const handleManageHomeAddress = useCallback(() => {\n onEvent(componentEvents.EMPLOYEE_HOME_ADDRESS, { employeeId })\n }, [onEvent, employeeId])\n\n const handleManageWorkAddress = useCallback(() => {\n onEvent(componentEvents.EMPLOYEE_WORK_ADDRESS, { employeeId })\n }, [onEvent, employeeId])\n\n const handleEditCompensation = useCallback(\n (job: Job) => {\n onEvent(componentEvents.EMPLOYEE_COMPENSATION_CREATE, { employeeId, job })\n },\n [onEvent, employeeId],\n )\n\n const handleAddJob = useCallback(() => {\n onEvent(componentEvents.EMPLOYEE_JOB_ADD, { employeeId })\n }, [onEvent, employeeId])\n\n const handleAddAnotherJob = useCallback(() => {\n onEvent(componentEvents.EMPLOYEE_JOB_ADD_ANOTHER, { employeeId })\n }, [onEvent, employeeId])\n\n const handleAddDeduction = useCallback(() => {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_ADD, { employeeId })\n }, [onEvent, employeeId])\n\n const handleEditDeduction = useCallback(\n (deduction: Garnishment) => {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_EDIT, deduction)\n },\n [onEvent],\n )\n\n const handleEditFederalTaxes = useCallback(\n (federalTaxes: EmployeeFederalTax | undefined) => {\n onEvent(componentEvents.EMPLOYEE_FEDERAL_TAXES_EDIT, { employeeId, federalTaxes })\n },\n [onEvent, employeeId],\n )\n\n const handleEditStateTaxes = useCallback(() => {\n onEvent(componentEvents.EMPLOYEE_STATE_TAXES_EDIT, { employeeId })\n }, [onEvent, employeeId])\n\n const handleViewForm = useCallback(\n (formId: string) => {\n onEvent(componentEvents.EMPLOYEE_VIEW_FORM_TO_SIGN, { employeeId, formId })\n },\n [onEvent, employeeId],\n )\n\n const tabs = [\n {\n id: 'basicDetails' as const,\n label: t('tabs.basicDetails'),\n content: null,\n },\n {\n id: 'jobAndPay' as const,\n label: t('tabs.jobAndPay'),\n content: null,\n },\n {\n id: 'taxes' as const,\n label: t('tabs.taxes'),\n content: null,\n },\n {\n id: 'documents' as const,\n label: t('tabs.documents'),\n content: null,\n },\n ]\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n <Suspense fallback={null}>\n <DashboardHeader employeeId={employeeId} />\n </Suspense>\n <Components.Tabs\n tabs={tabs}\n selectedId={selectedTab}\n onSelectionChange={id => {\n const next = id as DashboardTab\n setInternalTab(next)\n onEvent(componentEvents.EMPLOYEE_DASHBOARD_TAB_CHANGE, { tab: next })\n }}\n aria-label={t('tabsLabel')}\n />\n\n <Flex flexDirection=\"column\" gap={24}>\n {selectedTab === 'basicDetails' && (\n <Suspense fallback={<BaseLayout isLoading />}>\n <BasicDetailsViewWithData\n employeeId={employeeId}\n onEditBasicDetails={handleEditBasicDetails}\n onManageHomeAddress={handleManageHomeAddress}\n onManageWorkAddress={handleManageWorkAddress}\n />\n </Suspense>\n )}\n\n {selectedTab === 'jobAndPay' && (\n <Suspense fallback={<BaseLayout isLoading />}>\n <JobAndPayView\n employeeId={employeeId}\n onEvent={onEvent}\n onEditCompensation={handleEditCompensation}\n onAddJob={handleAddJob}\n onAddAnotherJob={handleAddAnotherJob}\n onAddDeduction={handleAddDeduction}\n onEditDeduction={handleEditDeduction}\n />\n </Suspense>\n )}\n\n {selectedTab === 'taxes' && (\n <Suspense fallback={<BaseLayout isLoading />}>\n <TaxesViewWithData\n employeeId={employeeId}\n onEditFederalTaxes={handleEditFederalTaxes}\n onEditStateTaxes={handleEditStateTaxes}\n />\n </Suspense>\n )}\n\n {selectedTab === 'documents' && (\n <Suspense fallback={<BaseLayout isLoading />}>\n <DocumentsViewWithData employeeId={employeeId} onViewForm={handleViewForm} />\n </Suspense>\n )}\n </Flex>\n </Flex>\n )\n}\n\nfunction DashboardHeader({ employeeId }: { employeeId: string }) {\n const { t } = useTranslation('Employee.Dashboard')\n const Components = useComponentContext()\n const {\n data: { employee },\n } = useEmployeesGetSuspense({ employeeId })\n\n return (\n <Flex flexDirection=\"column\" gap={4}>\n <Components.Heading as=\"h2\">\n {firstLastName({ first_name: employee?.firstName, last_name: employee?.lastName })}\n </Components.Heading>\n <Components.Text>{t('employeeRoleLabel')}</Components.Text>\n </Flex>\n )\n}\n\nexport function Dashboard({\n FallbackComponent,\n ...props\n}: DashboardProps & BaseComponentInterface) {\n return (\n <BaseBoundaries componentName=\"Employee.Dashboard\" FallbackComponent={FallbackComponent}>\n <DashboardRoot {...props} />\n </BaseBoundaries>\n )\n}\n"],"names":["DashboardRoot","employeeId","dictionary","onEvent","controlledTab","useI18n","useComponentDictionary","t","useTranslation","Components","useComponentContext","internalTab","setInternalTab","useState","selectedTab","handleEditBasicDetails","useCallback","componentEvents","handleManageHomeAddress","handleManageWorkAddress","handleEditCompensation","job","handleAddJob","handleAddAnotherJob","handleAddDeduction","handleEditDeduction","deduction","handleEditFederalTaxes","federalTaxes","handleEditStateTaxes","handleViewForm","formId","tabs","jsxs","Flex","jsx","Suspense","DashboardHeader","id","next","BaseLayout","BasicDetailsViewWithData","JobAndPayView","TaxesViewWithData","DocumentsViewWithData","employee","useEmployeesGetSuspense","firstLastName","Dashboard","FallbackComponent","props","BaseBoundaries"],"mappings":";;;;;;;;;;;;;;AA4BA,SAASA,EAAc;AAAA,EACrB,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,SAAAC;AAAA,EACA,aAAaC;AACf,GAAmB;AACjB,EAAAC,EAAQ,oBAAoB,GAC5BC,EAAuB,sBAAsBJ,CAAU;AACvD,QAAM,EAAE,GAAAK,EAAA,IAAMC,EAAe,oBAAoB,GAC3CC,IAAaC,EAAA,GACb,CAACC,GAAaC,CAAc,IAAIC,EAAuB,cAAc,GACrEC,IAAcV,KAAiBO,GAE/BI,IAAyBC,EAAY,MAAM;AAC/C,IAAAb,EAAQc,EAAgB,iBAAiB,EAAE,YAAAhB,EAAA,CAAY;AAAA,EACzD,GAAG,CAACE,GAASF,CAAU,CAAC,GAElBiB,IAA0BF,EAAY,MAAM;AAChD,IAAAb,EAAQc,EAAgB,uBAAuB,EAAE,YAAAhB,EAAA,CAAY;AAAA,EAC/D,GAAG,CAACE,GAASF,CAAU,CAAC,GAElBkB,IAA0BH,EAAY,MAAM;AAChD,IAAAb,EAAQc,EAAgB,uBAAuB,EAAE,YAAAhB,EAAA,CAAY;AAAA,EAC/D,GAAG,CAACE,GAASF,CAAU,CAAC,GAElBmB,IAAyBJ;AAAA,IAC7B,CAACK,MAAa;AACZ,MAAAlB,EAAQc,EAAgB,8BAA8B,EAAE,YAAAhB,GAAY,KAAAoB,GAAK;AAAA,IAC3E;AAAA,IACA,CAAClB,GAASF,CAAU;AAAA,EAAA,GAGhBqB,IAAeN,EAAY,MAAM;AACrC,IAAAb,EAAQc,EAAgB,kBAAkB,EAAE,YA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suspense, useState, useCallback } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { useEmployeesGetSuspense } from '@gusto/embedded-api/react-query/employeesGet'\nimport type { Job } from '@gusto/embedded-api/models/components/job'\nimport type { Garnishment } from '@gusto/embedded-api/models/components/garnishment'\nimport type { GetV1EmployeesEmployeeIdFederalTaxesResponse } from '@gusto/embedded-api/models/operations/getv1employeesemployeeidfederaltaxes'\nimport { BasicDetailsViewWithData } from './BasicDetailsView'\nimport { JobAndPayView } from './JobAndPayView'\nimport { TaxesViewWithData } from './TaxesView'\nimport { DocumentsViewWithData } from './DocumentsView'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { BaseBoundaries, BaseLayout, type BaseComponentInterface } from '@/components/Base/Base'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { firstLastName } from '@/helpers/formattedStrings'\n\ntype EmployeeFederalTax = NonNullable<\n GetV1EmployeesEmployeeIdFederalTaxesResponse['employeeFederalTax']\n>\n\nexport type DashboardTab = 'basicDetails' | 'jobAndPay' | 'taxes' | 'documents'\n\nexport interface DashboardProps extends BaseComponentInterface<'Employee.Dashboard'> {\n employeeId: string\n selectedTab?: DashboardTab\n}\n\nfunction DashboardRoot({\n employeeId,\n dictionary,\n onEvent,\n selectedTab: controlledTab,\n}: DashboardProps) {\n useI18n('Employee.Dashboard')\n useComponentDictionary('Employee.Dashboard', dictionary)\n const { t } = useTranslation('Employee.Dashboard')\n const Components = useComponentContext()\n const [internalTab, setInternalTab] = useState<DashboardTab>('basicDetails')\n const selectedTab = controlledTab ?? internalTab\n\n const handleEditBasicDetails = useCallback(() => {\n onEvent(componentEvents.EMPLOYEE_UPDATE, { employeeId })\n }, [onEvent, employeeId])\n\n const handleManageHomeAddress = useCallback(() => {\n onEvent(componentEvents.EMPLOYEE_HOME_ADDRESS, { employeeId })\n }, [onEvent, employeeId])\n\n const handleManageWorkAddress = useCallback(() => {\n onEvent(componentEvents.EMPLOYEE_WORK_ADDRESS, { employeeId })\n }, [onEvent, employeeId])\n\n const handleEditCompensation = useCallback(\n (job: Job) => {\n onEvent(componentEvents.EMPLOYEE_COMPENSATION_CREATE, { employeeId, job })\n },\n [onEvent, employeeId],\n )\n\n const handleAddJob = useCallback(() => {\n onEvent(componentEvents.EMPLOYEE_JOB_ADD, { employeeId })\n }, [onEvent, employeeId])\n\n const handleAddAnotherJob = useCallback(() => {\n onEvent(componentEvents.EMPLOYEE_JOB_ADD_ANOTHER, { employeeId })\n }, [onEvent, employeeId])\n\n const handleAddDeduction = useCallback(() => {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_ADD, { employeeId })\n }, [onEvent, employeeId])\n\n const handleEditDeduction = useCallback(\n (deduction: Garnishment) => {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_EDIT, deduction)\n },\n [onEvent],\n )\n\n const handleEditFederalTaxes = useCallback(\n (federalTaxes: EmployeeFederalTax | undefined) => {\n onEvent(componentEvents.EMPLOYEE_FEDERAL_TAXES_EDIT, { employeeId, federalTaxes })\n },\n [onEvent, employeeId],\n )\n\n const handleEditStateTaxes = useCallback(() => {\n onEvent(componentEvents.EMPLOYEE_STATE_TAXES_EDIT, { employeeId })\n }, [onEvent, employeeId])\n\n const handleViewForm = useCallback(\n (formId: string) => {\n onEvent(componentEvents.EMPLOYEE_VIEW_FORM_TO_SIGN, { employeeId, formId })\n },\n [onEvent, employeeId],\n )\n\n const tabs = [\n {\n id: 'basicDetails' as const,\n label: t('tabs.basicDetails'),\n content: null,\n },\n {\n id: 'jobAndPay' as const,\n label: t('tabs.jobAndPay'),\n content: null,\n },\n {\n id: 'taxes' as const,\n label: t('tabs.taxes'),\n content: null,\n },\n {\n id: 'documents' as const,\n label: t('tabs.documents'),\n content: null,\n },\n ]\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n <Suspense fallback={null}>\n <DashboardHeader employeeId={employeeId} />\n </Suspense>\n\n <Flex flexDirection=\"column\" gap={8}>\n <Components.Tabs\n tabs={tabs}\n selectedId={selectedTab}\n onSelectionChange={id => {\n const next = id as DashboardTab\n setInternalTab(next)\n onEvent(componentEvents.EMPLOYEE_DASHBOARD_TAB_CHANGE, { tab: next })\n }}\n aria-label={t('tabsLabel')}\n />\n\n <Flex flexDirection=\"column\" gap={24}>\n {selectedTab === 'basicDetails' && (\n <Suspense fallback={<BaseLayout isLoading />}>\n <BasicDetailsViewWithData\n employeeId={employeeId}\n onEditBasicDetails={handleEditBasicDetails}\n onManageHomeAddress={handleManageHomeAddress}\n onManageWorkAddress={handleManageWorkAddress}\n />\n </Suspense>\n )}\n\n {selectedTab === 'jobAndPay' && (\n <Suspense fallback={<BaseLayout isLoading />}>\n <JobAndPayView\n employeeId={employeeId}\n onEvent={onEvent}\n onEditCompensation={handleEditCompensation}\n onAddJob={handleAddJob}\n onAddAnotherJob={handleAddAnotherJob}\n onAddDeduction={handleAddDeduction}\n onEditDeduction={handleEditDeduction}\n />\n </Suspense>\n )}\n\n {selectedTab === 'taxes' && (\n <Suspense fallback={<BaseLayout isLoading />}>\n <TaxesViewWithData\n employeeId={employeeId}\n onEditFederalTaxes={handleEditFederalTaxes}\n onEditStateTaxes={handleEditStateTaxes}\n />\n </Suspense>\n )}\n\n {selectedTab === 'documents' && (\n <Suspense fallback={<BaseLayout isLoading />}>\n <DocumentsViewWithData employeeId={employeeId} onViewForm={handleViewForm} />\n </Suspense>\n )}\n </Flex>\n </Flex>\n </Flex>\n )\n}\n\nfunction DashboardHeader({ employeeId }: { employeeId: string }) {\n const { t } = useTranslation('Employee.Dashboard')\n const Components = useComponentContext()\n const {\n data: { employee },\n } = useEmployeesGetSuspense({ employeeId })\n\n return (\n <Flex flexDirection=\"column\" gap={4}>\n <Components.Heading as=\"h2\">\n {firstLastName({ first_name: employee?.firstName, last_name: employee?.lastName })}\n </Components.Heading>\n <Components.Text variant=\"supporting\">{t('employeeRoleLabel')}</Components.Text>\n </Flex>\n )\n}\n\nexport function Dashboard({\n FallbackComponent,\n ...props\n}: DashboardProps & BaseComponentInterface) {\n return (\n <BaseBoundaries componentName=\"Employee.Dashboard\" FallbackComponent={FallbackComponent}>\n <DashboardRoot {...props} />\n </BaseBoundaries>\n )\n}\n"],"names":["DashboardRoot","employeeId","dictionary","onEvent","controlledTab","useI18n","useComponentDictionary","t","useTranslation","Components","useComponentContext","internalTab","setInternalTab","useState","selectedTab","handleEditBasicDetails","useCallback","componentEvents","handleManageHomeAddress","handleManageWorkAddress","handleEditCompensation","job","handleAddJob","handleAddAnotherJob","handleAddDeduction","handleEditDeduction","deduction","handleEditFederalTaxes","federalTaxes","handleEditStateTaxes","handleViewForm","formId","tabs","jsxs","Flex","jsx","Suspense","DashboardHeader","id","next","BaseLayout","BasicDetailsViewWithData","JobAndPayView","TaxesViewWithData","DocumentsViewWithData","employee","useEmployeesGetSuspense","firstLastName","Dashboard","FallbackComponent","props","BaseBoundaries"],"mappings":";;;;;;;;;;;;;;AA4BA,SAASA,EAAc;AAAA,EACrB,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,SAAAC;AAAA,EACA,aAAaC;AACf,GAAmB;AACjB,EAAAC,EAAQ,oBAAoB,GAC5BC,EAAuB,sBAAsBJ,CAAU;AACvD,QAAM,EAAE,GAAAK,EAAA,IAAMC,EAAe,oBAAoB,GAC3CC,IAAaC,EAAA,GACb,CAACC,GAAaC,CAAc,IAAIC,EAAuB,cAAc,GACrEC,IAAcV,KAAiBO,GAE/BI,IAAyBC,EAAY,MAAM;AAC/C,IAAAb,EAAQc,EAAgB,iBAAiB,EAAE,YAAAhB,EAAA,CAAY;AAAA,EACzD,GAAG,CAACE,GAASF,CAAU,CAAC,GAElBiB,IAA0BF,EAAY,MAAM;AAChD,IAAAb,EAAQc,EAAgB,uBAAuB,EAAE,YAAAhB,EAAA,CAAY;AAAA,EAC/D,GAAG,CAACE,GAASF,CAAU,CAAC,GAElBkB,IAA0BH,EAAY,MAAM;AAChD,IA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AAU,WAAW,WAAWA,GAAU,SAAA,CAAU,GACnF;AAAA,IACA,gBAAAV,EAAC1B,EAAW,MAAX,EAAgB,SAAQ,cAAc,UAAAF,EAAE,mBAAmB,EAAA,CAAE;AAAA,EAAA,GAChE;AAEJ;AAEO,SAASyC,GAAU;AAAA,EACxB,mBAAAC;AAAA,EACA,GAAGC;AACL,GAA4C;AAC1C,SACE,gBAAAf,EAACgB,KAAe,eAAc,sBAAqB,mBAAAF,GACjD,UAAA,gBAAAd,EAACnC,GAAA,EAAe,GAAGkD,EAAA,CAAO,EAAA,CAC5B;AAEJ;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { Flex as
|
|
4
|
-
import { useComponentContext as
|
|
2
|
+
import { useTranslation as u } from "react-i18next";
|
|
3
|
+
import { Flex as d } from "../../Common/Flex/Flex.js";
|
|
4
|
+
import { useComponentContext as c } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
5
5
|
import "classnames";
|
|
6
6
|
import "../../../shared/constants.js";
|
|
7
7
|
import { Loading as l } from "../../Common/Loading/Loading.js";
|
|
@@ -13,7 +13,7 @@ import { DataView as h } from "../../Common/DataView/DataView.js";
|
|
|
13
13
|
function v({ employeeId: i, onViewForm: s }) {
|
|
14
14
|
const n = g({ employeeId: i });
|
|
15
15
|
return /* @__PURE__ */ e(p, { error: n.errorHandling.errors, children: /* @__PURE__ */ e(
|
|
16
|
-
|
|
16
|
+
S,
|
|
17
17
|
{
|
|
18
18
|
forms: n.data.formList,
|
|
19
19
|
isLoading: n.status.isFormsLoading,
|
|
@@ -21,8 +21,8 @@ function v({ employeeId: i, onViewForm: s }) {
|
|
|
21
21
|
}
|
|
22
22
|
) });
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
const { t } =
|
|
24
|
+
function S({ forms: i = [], isLoading: s = !1, onViewForm: n }) {
|
|
25
|
+
const { t } = u("Employee.Dashboard"), o = c(), m = [
|
|
26
26
|
{
|
|
27
27
|
key: "title",
|
|
28
28
|
title: t("documents.columns.title"),
|
|
@@ -43,9 +43,9 @@ function D({ forms: i = [], isLoading: s = !1, onViewForm: n }) {
|
|
|
43
43
|
title: t("documents.columns.requiresSigning"),
|
|
44
44
|
render: (r) => r.requiresSigning ? /* @__PURE__ */ e(o.Badge, { status: "warning", children: t("documents.signingStatus.notSigned") }) : /* @__PURE__ */ e(o.Badge, { status: "success", children: t("documents.signingStatus.signed") })
|
|
45
45
|
}
|
|
46
|
-
],
|
|
46
|
+
], a = y({
|
|
47
47
|
data: i,
|
|
48
|
-
columns:
|
|
48
|
+
columns: m,
|
|
49
49
|
itemMenu: (r) => /* @__PURE__ */ e(o.Button, { variant: "secondary", onClick: () => n?.(r.uuid), children: t("documents.viewCta") }),
|
|
50
50
|
emptyState: () => /* @__PURE__ */ e(
|
|
51
51
|
f,
|
|
@@ -55,10 +55,17 @@ function D({ forms: i = [], isLoading: s = !1, onViewForm: n }) {
|
|
|
55
55
|
}
|
|
56
56
|
)
|
|
57
57
|
});
|
|
58
|
-
return /* @__PURE__ */ e(
|
|
58
|
+
return /* @__PURE__ */ e(d, { flexDirection: "column", gap: 24, children: /* @__PURE__ */ e(
|
|
59
|
+
o.Box,
|
|
60
|
+
{
|
|
61
|
+
withPadding: !1,
|
|
62
|
+
header: /* @__PURE__ */ e(o.BoxHeader, { title: t("documents.title") }),
|
|
63
|
+
children: s ? /* @__PURE__ */ e(l, {}) : /* @__PURE__ */ e(h, { label: t("documents.listLabel"), isWithinBox: !0, ...a })
|
|
64
|
+
}
|
|
65
|
+
) });
|
|
59
66
|
}
|
|
60
67
|
export {
|
|
61
|
-
|
|
68
|
+
S as DocumentsView,
|
|
62
69
|
v as DocumentsViewWithData
|
|
63
70
|
};
|
|
64
71
|
//# sourceMappingURL=DocumentsView.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentsView.js","sources":["../../../../src/components/Employee/Dashboard/DocumentsView.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { Form } from '@gusto/embedded-api/models/components/form'\nimport { useEmployeeForms } from './hooks'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { DataView, useDataView, EmptyData, Loading } from '@/components/Common'\nimport { BaseLayout } from '@/components/Base/Base'\n\nexport interface DocumentsViewProps {\n forms?: Form[]\n isLoading?: boolean\n onViewForm?: (formUuid: string) => void\n}\n\nexport interface DocumentsViewWithDataProps {\n employeeId: string\n onViewForm?: (formUuid: string) => void\n}\n\n/**\n * Tab-mounted container for the Documents tab. Owns the\n * `useEmployeeForms` fetch so the request only fires when the user\n * actually opens this tab (or whatever the parent chooses to mount).\n * The presentational `DocumentsView` stays pure for testing/stories.\n */\nexport function DocumentsViewWithData({ employeeId, onViewForm }: DocumentsViewWithDataProps) {\n const forms = useEmployeeForms({ employeeId })\n\n return (\n <BaseLayout error={forms.errorHandling.errors}>\n <DocumentsView\n forms={forms.data.formList}\n isLoading={forms.status.isFormsLoading}\n onViewForm={onViewForm}\n />\n </BaseLayout>\n )\n}\n\nexport function DocumentsView({ forms = [], isLoading = false, onViewForm }: DocumentsViewProps) {\n const { t } = useTranslation('Employee.Dashboard')\n const Components = useComponentContext()\n\n const formsColumns = [\n {\n key: 'title',\n title: t('documents.columns.title'),\n render: (form: Form) => form.title || '-',\n },\n {\n key: 'year',\n title: t('documents.columns.year'),\n render: (form: Form) => {\n if (form.year) return String(form.year)\n return '-'\n },\n },\n {\n key: 'status',\n title: t('documents.columns.status'),\n render: (form: Form) => {\n if (form.draft) return t('documents.status.draft')\n return t('documents.status.final')\n },\n },\n {\n key: 'requiresSigning',\n title: t('documents.columns.requiresSigning'),\n render: (form: Form) => {\n if (form.requiresSigning) {\n return (\n <Components.Badge status=\"warning\">\n {t('documents.signingStatus.notSigned')}\n </Components.Badge>\n )\n }\n return (\n <Components.Badge status=\"success\">\n {t('documents.signingStatus.signed')}\n </Components.Badge>\n )\n },\n },\n ]\n\n const formsDataView = useDataView({\n data: forms,\n columns: formsColumns,\n itemMenu: (form: Form) => (\n <Components.Button variant=\"secondary\" onClick={() => onViewForm?.(form.uuid)}>\n {t('documents.viewCta')}\n </Components.Button>\n ),\n emptyState: () => (\n <EmptyData\n title={t('documents.emptyState.title')}\n description={t('documents.emptyState.description')}\n />\n ),\n })\n\n return (\n <Flex flexDirection=\"column\" gap={24}>\n <Components.Box
|
|
1
|
+
{"version":3,"file":"DocumentsView.js","sources":["../../../../src/components/Employee/Dashboard/DocumentsView.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { Form } from '@gusto/embedded-api/models/components/form'\nimport { useEmployeeForms } from './hooks'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { DataView, useDataView, EmptyData, Loading } from '@/components/Common'\nimport { BaseLayout } from '@/components/Base/Base'\n\nexport interface DocumentsViewProps {\n forms?: Form[]\n isLoading?: boolean\n onViewForm?: (formUuid: string) => void\n}\n\nexport interface DocumentsViewWithDataProps {\n employeeId: string\n onViewForm?: (formUuid: string) => void\n}\n\n/**\n * Tab-mounted container for the Documents tab. Owns the\n * `useEmployeeForms` fetch so the request only fires when the user\n * actually opens this tab (or whatever the parent chooses to mount).\n * The presentational `DocumentsView` stays pure for testing/stories.\n */\nexport function DocumentsViewWithData({ employeeId, onViewForm }: DocumentsViewWithDataProps) {\n const forms = useEmployeeForms({ employeeId })\n\n return (\n <BaseLayout error={forms.errorHandling.errors}>\n <DocumentsView\n forms={forms.data.formList}\n isLoading={forms.status.isFormsLoading}\n onViewForm={onViewForm}\n />\n </BaseLayout>\n )\n}\n\nexport function DocumentsView({ forms = [], isLoading = false, onViewForm }: DocumentsViewProps) {\n const { t } = useTranslation('Employee.Dashboard')\n const Components = useComponentContext()\n\n const formsColumns = [\n {\n key: 'title',\n title: t('documents.columns.title'),\n render: (form: Form) => form.title || '-',\n },\n {\n key: 'year',\n title: t('documents.columns.year'),\n render: (form: Form) => {\n if (form.year) return String(form.year)\n return '-'\n },\n },\n {\n key: 'status',\n title: t('documents.columns.status'),\n render: (form: Form) => {\n if (form.draft) return t('documents.status.draft')\n return t('documents.status.final')\n },\n },\n {\n key: 'requiresSigning',\n title: t('documents.columns.requiresSigning'),\n render: (form: Form) => {\n if (form.requiresSigning) {\n return (\n <Components.Badge status=\"warning\">\n {t('documents.signingStatus.notSigned')}\n </Components.Badge>\n )\n }\n return (\n <Components.Badge status=\"success\">\n {t('documents.signingStatus.signed')}\n </Components.Badge>\n )\n },\n },\n ]\n\n const formsDataView = useDataView({\n data: forms,\n columns: formsColumns,\n itemMenu: (form: Form) => (\n <Components.Button variant=\"secondary\" onClick={() => onViewForm?.(form.uuid)}>\n {t('documents.viewCta')}\n </Components.Button>\n ),\n emptyState: () => (\n <EmptyData\n title={t('documents.emptyState.title')}\n description={t('documents.emptyState.description')}\n />\n ),\n })\n\n return (\n <Flex flexDirection=\"column\" gap={24}>\n <Components.Box\n withPadding={false}\n header={<Components.BoxHeader title={t('documents.title')} />}\n >\n {isLoading ? (\n <Loading />\n ) : (\n <DataView label={t('documents.listLabel')} isWithinBox {...formsDataView} />\n )}\n </Components.Box>\n </Flex>\n )\n}\n"],"names":["DocumentsViewWithData","employeeId","onViewForm","forms","useEmployeeForms","jsx","BaseLayout","DocumentsView","isLoading","useTranslation","Components","useComponentContext","formsColumns","form","formsDataView","useDataView","EmptyData","Flex","Loading","DataView"],"mappings":";;;;;;;;;;;;AAyBO,SAASA,EAAsB,EAAE,YAAAC,GAAY,YAAAC,KAA0C;AAC5F,QAAMC,IAAQC,EAAiB,EAAE,YAAAH,GAAY;AAE7C,SACE,gBAAAI,EAACC,GAAA,EAAW,OAAOH,EAAM,cAAc,QACrC,UAAA,gBAAAE;AAAA,IAACE;AAAA,IAAA;AAAA,MACC,OAAOJ,EAAM,KAAK;AAAA,MAClB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