@gusto/embedded-react-sdk 0.46.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 +50 -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/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.js +57 -202
- package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.js.map +1 -1
- 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 +3 -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.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js +213 -191
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -1
- package/dist/components/Employee/Dashboard/Dashboard.js +65 -53
- package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
- package/dist/components/Employee/Dashboard/DashboardComponents.d.ts +3 -3
- package/dist/components/Employee/Dashboard/DashboardComponents.js +138 -101
- package/dist/components/Employee/Dashboard/DashboardComponents.js.map +1 -1
- package/dist/components/Employee/Dashboard/JobAndPayView.js +340 -320
- package/dist/components/Employee/Dashboard/JobAndPayView.js.map +1 -1
- package/dist/components/Employee/Dashboard/JobAndPayView.module.scss.js +5 -3
- package/dist/components/Employee/Dashboard/JobAndPayView.module.scss.js.map +1 -1
- package/dist/components/Employee/Dashboard/dashboardStateMachine.js +147 -148
- 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/useEmployeeCompensation.d.ts +2 -2
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js +34 -35
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js.map +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/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/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/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/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 +64 -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.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 +14 -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 +2 -0
- package/dist/shared/constants.js +13 -12
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +26 -12
- package/docs/reference/endpoint-inventory.json +24 -8
- package/package.json +1 -1
|
@@ -1,154 +1,191 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { Dashboard as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { jsxs as f, Fragment as E, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as p } from "react-i18next";
|
|
3
|
+
import { Dashboard as I } from "./Dashboard.js";
|
|
4
|
+
import { getPendingCompensationChanges as y } from "./getPendingCompensationChanges.js";
|
|
5
|
+
import { HomeAddress as b } from "../HomeAddress/management/HomeAddress.js";
|
|
6
|
+
import { WorkAddress as A } from "../WorkAddress/management/WorkAddress.js";
|
|
7
|
+
import { FederalTaxes as D } from "../FederalTaxes/management/FederalTaxes.js";
|
|
7
8
|
import { StateTaxes as x } from "../StateTaxes/management/StateTaxes.js";
|
|
8
|
-
import { Profile as
|
|
9
|
+
import { Profile as g } from "../Profile/management/Profile.js";
|
|
9
10
|
import { BankForm as v } from "../PaymentMethod/onboarding/BankForm.js";
|
|
10
|
-
import { SplitView as
|
|
11
|
-
import { DocumentManager as
|
|
12
|
-
import { DeductionsForm as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
11
|
+
import { SplitView as h } from "../PaymentMethod/onboarding/SplitView.js";
|
|
12
|
+
import { DocumentManager as L } from "../Documents/management/DocumentManager.js";
|
|
13
|
+
import { DeductionsForm as P } from "../Deductions/DeductionsForm/DeductionsForm.js";
|
|
14
|
+
import { EditPendingCompensation as T } from "../Compensation/management/EditPendingCompensation/EditPendingCompensation.js";
|
|
15
|
+
import { AddAnotherJob as F } from "../Compensation/management/AddAnotherJob/AddAnotherJob.js";
|
|
16
|
+
import { useDeductionsList as w } from "../Deductions/shared/useDeductionsList.js";
|
|
17
|
+
import { EditCompensation as N } from "../Compensation/onboarding/EditCompensation/EditCompensation.js";
|
|
18
|
+
import { useFlow as d } from "../../Flow/useFlow.js";
|
|
19
|
+
import { useComponentContext as S } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
20
|
+
import { BaseComponent as c, BaseLayout as u } from "../../Base/Base.js";
|
|
17
21
|
import "../../Base/useBase.js";
|
|
18
|
-
import { ensureRequired as
|
|
19
|
-
import { useI18n as
|
|
20
|
-
import { componentEvents as
|
|
21
|
-
import { EditCompensation as
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
const { t: e } =
|
|
22
|
+
import { ensureRequired as t } from "../../../helpers/ensureRequired.js";
|
|
23
|
+
import { useI18n as C } from "../../../i18n/I18n.js";
|
|
24
|
+
import { componentEvents as m } from "../../../shared/constants.js";
|
|
25
|
+
import { EditCompensation as k } from "../Compensation/management/EditCompensation/EditCompensation.js";
|
|
26
|
+
function de() {
|
|
27
|
+
C("Employee.Dashboard");
|
|
28
|
+
const { t: e } = p("Employee.Dashboard"), { employeeId: o, onEvent: r, successAlert: i, selectedTab: s } = d(), a = S(), l = {
|
|
25
29
|
bankAccountAdded: e("alerts.bankAccountAdded"),
|
|
26
30
|
bankAccountDeleted: e("alerts.bankAccountDeleted"),
|
|
27
31
|
splitUpdated: e("alerts.splitUpdated"),
|
|
28
32
|
deductionAdded: e("alerts.deductionAdded"),
|
|
29
33
|
deductionUpdated: e("alerts.deductionUpdated"),
|
|
30
|
-
deductionDeleted: e("alerts.deductionDeleted")
|
|
34
|
+
deductionDeleted: e("alerts.deductionDeleted"),
|
|
35
|
+
jobAdded: e("alerts.jobAdded")
|
|
31
36
|
};
|
|
32
|
-
return /* @__PURE__ */
|
|
33
|
-
|
|
34
|
-
|
|
37
|
+
return /* @__PURE__ */ f(E, { children: [
|
|
38
|
+
i && /* @__PURE__ */ n(
|
|
39
|
+
a.Alert,
|
|
35
40
|
{
|
|
36
41
|
status: "success",
|
|
37
|
-
label: i
|
|
42
|
+
label: l[i],
|
|
38
43
|
onDismiss: () => {
|
|
39
|
-
|
|
44
|
+
r(m.EMPLOYEE_DISMISS, null);
|
|
40
45
|
},
|
|
41
46
|
disableScrollIntoView: !0
|
|
42
47
|
}
|
|
43
48
|
),
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
|
|
49
|
+
/* @__PURE__ */ n(
|
|
50
|
+
I,
|
|
46
51
|
{
|
|
47
|
-
employeeId:
|
|
48
|
-
onEvent:
|
|
52
|
+
employeeId: t(o),
|
|
53
|
+
onEvent: r,
|
|
49
54
|
selectedTab: s
|
|
50
55
|
}
|
|
51
56
|
)
|
|
52
57
|
] });
|
|
53
58
|
}
|
|
54
|
-
function
|
|
55
|
-
const { employeeId: e, onEvent: o } =
|
|
56
|
-
return /* @__PURE__ */
|
|
59
|
+
function ie() {
|
|
60
|
+
const { employeeId: e, onEvent: o } = d();
|
|
61
|
+
return /* @__PURE__ */ n(b, { employeeId: t(e), onEvent: o });
|
|
57
62
|
}
|
|
58
|
-
function
|
|
59
|
-
const { employeeId: e, onEvent: o } =
|
|
60
|
-
return /* @__PURE__ */
|
|
63
|
+
function me() {
|
|
64
|
+
const { employeeId: e, onEvent: o } = d();
|
|
65
|
+
return /* @__PURE__ */ n(A, { employeeId: t(e), onEvent: o });
|
|
61
66
|
}
|
|
62
|
-
function
|
|
63
|
-
const { employeeId: e, onEvent: o } =
|
|
64
|
-
return /* @__PURE__ */
|
|
67
|
+
function se() {
|
|
68
|
+
const { employeeId: e, onEvent: o } = d();
|
|
69
|
+
return /* @__PURE__ */ n(D, { employeeId: t(e), onEvent: o });
|
|
65
70
|
}
|
|
66
|
-
function
|
|
67
|
-
const { employeeId: e, onEvent: o } =
|
|
68
|
-
return /* @__PURE__ */
|
|
71
|
+
function ae() {
|
|
72
|
+
const { employeeId: e, onEvent: o } = d();
|
|
73
|
+
return /* @__PURE__ */ n(x, { employeeId: t(e), onEvent: o });
|
|
69
74
|
}
|
|
70
|
-
function
|
|
71
|
-
const { employeeId: e, onEvent: o } =
|
|
72
|
-
return /* @__PURE__ */
|
|
75
|
+
function le() {
|
|
76
|
+
const { employeeId: e, onEvent: o } = d();
|
|
77
|
+
return /* @__PURE__ */ n(g, { employeeId: t(e), onEvent: o });
|
|
73
78
|
}
|
|
74
|
-
function
|
|
75
|
-
const { employeeId: e, onEvent: o } =
|
|
76
|
-
return /* @__PURE__ */
|
|
79
|
+
function ue() {
|
|
80
|
+
const { employeeId: e, onEvent: o } = d();
|
|
81
|
+
return /* @__PURE__ */ n(c, { onEvent: o, children: /* @__PURE__ */ n(v, { employeeId: t(e), onEvent: o }) });
|
|
77
82
|
}
|
|
78
|
-
function
|
|
79
|
-
const { employeeId: e, onEvent: o } =
|
|
80
|
-
return /* @__PURE__ */
|
|
83
|
+
function pe() {
|
|
84
|
+
const { employeeId: e, onEvent: o } = d();
|
|
85
|
+
return /* @__PURE__ */ n(c, { onEvent: o, children: /* @__PURE__ */ n(h, { employeeId: t(e), onEvent: o }) });
|
|
81
86
|
}
|
|
82
|
-
function
|
|
83
|
-
const { employeeId: e, formId: o, onEvent:
|
|
84
|
-
return /* @__PURE__ */
|
|
85
|
-
|
|
87
|
+
function ce() {
|
|
88
|
+
const { employeeId: e, formId: o, onEvent: r } = d();
|
|
89
|
+
return /* @__PURE__ */ n(
|
|
90
|
+
L,
|
|
86
91
|
{
|
|
87
|
-
employeeId:
|
|
88
|
-
formId:
|
|
89
|
-
onEvent:
|
|
92
|
+
employeeId: t(e),
|
|
93
|
+
formId: t(o),
|
|
94
|
+
onEvent: r
|
|
90
95
|
}
|
|
91
96
|
);
|
|
92
97
|
}
|
|
93
|
-
function
|
|
94
|
-
const { employeeId: e, editingDeductionId: o, onEvent:
|
|
95
|
-
if (
|
|
96
|
-
return /* @__PURE__ */
|
|
97
|
-
const s = o ?
|
|
98
|
-
return /* @__PURE__ */
|
|
99
|
-
|
|
98
|
+
function Ce() {
|
|
99
|
+
const { employeeId: e, editingDeductionId: o, onEvent: r } = d(), i = w({ employeeId: t(e) });
|
|
100
|
+
if (i.isLoading)
|
|
101
|
+
return /* @__PURE__ */ n(u, { isLoading: !0, error: i.errorHandling.errors });
|
|
102
|
+
const s = o ? i.data.deductions.find((a) => a.uuid === o) ?? null : null;
|
|
103
|
+
return /* @__PURE__ */ n(u, { error: i.errorHandling.errors, children: /* @__PURE__ */ n(
|
|
104
|
+
P,
|
|
100
105
|
{
|
|
101
|
-
employeeId:
|
|
106
|
+
employeeId: t(e),
|
|
102
107
|
deduction: s,
|
|
103
|
-
onSaved: (
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
108
|
+
onSaved: (a, l) => {
|
|
109
|
+
r(
|
|
110
|
+
l === "create" ? m.EMPLOYEE_DEDUCTION_CREATED : m.EMPLOYEE_DEDUCTION_UPDATED,
|
|
111
|
+
a
|
|
107
112
|
);
|
|
108
113
|
},
|
|
109
114
|
onCancel: () => {
|
|
110
|
-
|
|
115
|
+
r(m.CANCEL);
|
|
111
116
|
}
|
|
112
117
|
}
|
|
113
118
|
) });
|
|
114
119
|
}
|
|
115
|
-
function
|
|
116
|
-
|
|
117
|
-
const { t: e } =
|
|
118
|
-
return /* @__PURE__ */
|
|
120
|
+
function fe() {
|
|
121
|
+
C("Employee.Dashboard");
|
|
122
|
+
const { t: e } = p("Employee.Dashboard"), { employeeId: o, onEvent: r } = d();
|
|
123
|
+
return /* @__PURE__ */ n(
|
|
124
|
+
N,
|
|
125
|
+
{
|
|
126
|
+
employeeId: t(o),
|
|
127
|
+
title: e("compensationFlow.addJobTitle"),
|
|
128
|
+
submitCtaLabel: e("compensationFlow.saveCta"),
|
|
129
|
+
onEvent: r,
|
|
130
|
+
onCancel: () => {
|
|
131
|
+
r(m.CANCEL);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
);
|
|
119
135
|
}
|
|
120
|
-
function
|
|
121
|
-
const { employeeId: e, currentJob: o, onEvent:
|
|
122
|
-
return /* @__PURE__ */
|
|
123
|
-
|
|
136
|
+
function Ee() {
|
|
137
|
+
const { employeeId: e, currentJob: o, onEvent: r } = d(), s = y(o ? [o] : [])[0];
|
|
138
|
+
return s ? /* @__PURE__ */ n(
|
|
139
|
+
T,
|
|
140
|
+
{
|
|
141
|
+
employeeId: t(e),
|
|
142
|
+
jobId: t(o?.uuid),
|
|
143
|
+
compensationId: s.compensationUuid,
|
|
144
|
+
isNewJob: s.isNewJob,
|
|
145
|
+
isPrimaryJob: o?.primary ?? !1,
|
|
146
|
+
onEvent: r,
|
|
147
|
+
onCancel: () => {
|
|
148
|
+
r(m.CANCEL, null);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
) : /* @__PURE__ */ n(
|
|
152
|
+
k,
|
|
124
153
|
{
|
|
125
|
-
employeeId:
|
|
126
|
-
jobId:
|
|
127
|
-
onEvent:
|
|
154
|
+
employeeId: t(e),
|
|
155
|
+
jobId: t(o?.uuid),
|
|
156
|
+
onEvent: r,
|
|
128
157
|
onCancel: () => {
|
|
129
|
-
|
|
158
|
+
r(m.CANCEL, null);
|
|
130
159
|
}
|
|
131
160
|
}
|
|
132
161
|
);
|
|
133
162
|
}
|
|
134
|
-
function
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
163
|
+
function Ie() {
|
|
164
|
+
const { employeeId: e, onEvent: o } = d();
|
|
165
|
+
return /* @__PURE__ */ n(
|
|
166
|
+
F,
|
|
167
|
+
{
|
|
168
|
+
employeeId: t(e),
|
|
169
|
+
onEvent: o,
|
|
170
|
+
onCancel: () => {
|
|
171
|
+
o(m.CANCEL);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
);
|
|
138
175
|
}
|
|
139
176
|
export {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
177
|
+
Ie as AddAnotherJobContextual,
|
|
178
|
+
fe as AddJobContextual,
|
|
179
|
+
de as DashboardViewContextual,
|
|
180
|
+
Ce as DeductionFormContextual,
|
|
181
|
+
ce as DocumentManagerContextual,
|
|
182
|
+
Ee as EditCompensationContextual,
|
|
183
|
+
se as FederalTaxesContextual,
|
|
184
|
+
ie as HomeAddressContextual,
|
|
185
|
+
ue as PaymentBankFormContextual,
|
|
186
|
+
pe as PaymentSplitViewContextual,
|
|
187
|
+
le as ProfileContextual,
|
|
188
|
+
ae as StateTaxesContextual,
|
|
189
|
+
me as WorkAddressContextual
|
|
153
190
|
};
|
|
154
191
|
//# sourceMappingURL=DashboardComponents.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardComponents.js","sources":["../../../../src/components/Employee/Dashboard/DashboardComponents.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { Job } from '@gusto/embedded-api/models/components/job'\nimport { Dashboard, type DashboardTab } from './Dashboard'\nimport { HomeAddress } from '@/components/Employee/HomeAddress/management/HomeAddress'\nimport { WorkAddress } from '@/components/Employee/WorkAddress/management/WorkAddress'\nimport { FederalTaxes } from '@/components/Employee/FederalTaxes/management/FederalTaxes'\nimport { StateTaxes } from '@/components/Employee/StateTaxes/management/StateTaxes'\nimport { Profile } from '@/components/Employee/Profile/management/Profile'\nimport { BankForm } from '@/components/Employee/PaymentMethod/onboarding/BankForm'\nimport { SplitView } from '@/components/Employee/PaymentMethod/onboarding/SplitView'\nimport { DocumentManager } from '@/components/Employee/Documents/management/DocumentManager'\nimport { DeductionsForm } from '@/components/Employee/Deductions/DeductionsForm/DeductionsForm'\nimport { ManagementEditCompensation } from '@/components/Employee/Compensation/management'\nimport { useDeductionsList } from '@/components/Employee/Deductions/shared'\nimport { useFlow, type FlowContextInterface } from '@/components/Flow/useFlow'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { BaseComponent, BaseLayout } from '@/components/Base'\nimport { ensureRequired } from '@/helpers/ensureRequired'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\n\nexport type DashboardSuccessAlert =\n | 'bankAccountAdded'\n | 'bankAccountDeleted'\n | 'splitUpdated'\n | 'deductionAdded'\n | 'deductionUpdated'\n | 'deductionDeleted'\n\nexport interface DashboardContextInterface extends FlowContextInterface {\n employeeId: string\n formId?: string\n currentJob?: Job | null\n successAlert?: DashboardSuccessAlert | null\n /** Set by the EMPLOYEE_DEDUCTION_EDIT transition; consumed by\n * DeductionFormContextual to pre-populate the form. */\n editingDeductionId?: string\n /** Persists the active Dashboard tab across sub-flows so Cancel/Back\n * returns to the originating tab instead of resetting to basic details. */\n selectedTab?: DashboardTab\n}\n\nexport function DashboardViewContextual() {\n useI18n('Employee.Dashboard')\n const { t } = useTranslation('Employee.Dashboard')\n const { employeeId, onEvent, successAlert, selectedTab } = useFlow<DashboardContextInterface>()\n const Components = useComponentContext()\n\n const alertLabels: Record<DashboardSuccessAlert, string> = {\n bankAccountAdded: t('alerts.bankAccountAdded'),\n bankAccountDeleted: t('alerts.bankAccountDeleted'),\n splitUpdated: t('alerts.splitUpdated'),\n deductionAdded: t('alerts.deductionAdded'),\n deductionUpdated: t('alerts.deductionUpdated'),\n deductionDeleted: t('alerts.deductionDeleted'),\n }\n\n return (\n <>\n {successAlert && (\n <Components.Alert\n status=\"success\"\n label={alertLabels[successAlert]}\n onDismiss={() => {\n onEvent(componentEvents.EMPLOYEE_DISMISS, null)\n }}\n disableScrollIntoView\n />\n )}\n <Dashboard\n employeeId={ensureRequired(employeeId)}\n onEvent={onEvent}\n selectedTab={selectedTab}\n />\n </>\n )\n}\n\nexport function HomeAddressContextual() {\n const { employeeId, onEvent } = useFlow<DashboardContextInterface>()\n return <HomeAddress employeeId={ensureRequired(employeeId)} onEvent={onEvent} />\n}\n\nexport function WorkAddressContextual() {\n const { employeeId, onEvent } = useFlow<DashboardContextInterface>()\n return <WorkAddress employeeId={ensureRequired(employeeId)} onEvent={onEvent} />\n}\n\nexport function FederalTaxesContextual() {\n const { employeeId, onEvent } = useFlow<DashboardContextInterface>()\n return <FederalTaxes employeeId={ensureRequired(employeeId)} onEvent={onEvent} />\n}\n\nexport function StateTaxesContextual() {\n const { employeeId, onEvent } = useFlow<DashboardContextInterface>()\n return <StateTaxes employeeId={ensureRequired(employeeId)} onEvent={onEvent} />\n}\n\nexport function ProfileContextual() {\n const { employeeId, onEvent } = useFlow<DashboardContextInterface>()\n return <Profile employeeId={ensureRequired(employeeId)} onEvent={onEvent} />\n}\n\nexport function PaymentBankFormContextual() {\n const { employeeId, onEvent } = useFlow<DashboardContextInterface>()\n return (\n <BaseComponent onEvent={onEvent}>\n <BankForm employeeId={ensureRequired(employeeId)} onEvent={onEvent} />\n </BaseComponent>\n )\n}\n\nexport function PaymentSplitViewContextual() {\n const { employeeId, onEvent } = useFlow<DashboardContextInterface>()\n return (\n <BaseComponent onEvent={onEvent}>\n <SplitView employeeId={ensureRequired(employeeId)} onEvent={onEvent} />\n </BaseComponent>\n )\n}\n\nexport function DocumentManagerContextual() {\n const { employeeId, formId, onEvent } = useFlow<DashboardContextInterface>()\n return (\n <DocumentManager\n employeeId={ensureRequired(employeeId)}\n formId={ensureRequired(formId)}\n onEvent={onEvent}\n />\n )\n}\n\nexport function DeductionFormContextual() {\n const { employeeId, editingDeductionId, onEvent } = useFlow<DashboardContextInterface>()\n // The same list query the form hooks use internally — React Query dedupes,\n // so this just looks up the loaded row to pre-populate edit mode.\n const list = useDeductionsList({ employeeId: ensureRequired(employeeId) })\n\n if (list.isLoading) {\n return <BaseLayout isLoading error={list.errorHandling.errors} />\n }\n\n const deduction = editingDeductionId\n ? (list.data.deductions.find(d => d.uuid === editingDeductionId) ?? null)\n : null\n\n return (\n <BaseLayout error={list.errorHandling.errors}>\n <DeductionsForm\n employeeId={ensureRequired(employeeId)}\n deduction={deduction}\n onSaved={(saved, mode) => {\n onEvent(\n mode === 'create'\n ? componentEvents.EMPLOYEE_DEDUCTION_CREATED\n : componentEvents.EMPLOYEE_DEDUCTION_UPDATED,\n saved,\n )\n }}\n onCancel={() => {\n onEvent(componentEvents.CANCEL)\n }}\n />\n </BaseLayout>\n )\n}\n\nexport function AddJobPlaceholderContextual() {\n useI18n('Employee.Dashboard')\n const { t } = useTranslation('Employee.Dashboard')\n const Components = useComponentContext()\n return <Components.Heading as=\"h2\">{t('compensationFlow.addJobTitle')}</Components.Heading>\n}\n\nexport function EditCompensationContextual() {\n const { employeeId, currentJob, onEvent } = useFlow<DashboardContextInterface>()\n return (\n <ManagementEditCompensation\n employeeId={ensureRequired(employeeId)}\n jobId={ensureRequired(currentJob?.uuid)}\n onEvent={onEvent}\n onCancel={() => {\n onEvent(componentEvents.CANCEL, null)\n }}\n />\n )\n}\n\nexport function AddAnotherJobPlaceholderContextual() {\n useI18n('Employee.Dashboard')\n const { t } = useTranslation('Employee.Dashboard')\n const Components = useComponentContext()\n return <Components.Heading as=\"h2\">{t('compensationFlow.addAnotherJobTitle')}</Components.Heading>\n}\n"],"names":["DashboardViewContextual","useI18n","t","useTranslation","employeeId","onEvent","successAlert","selectedTab","useFlow","Components","useComponentContext","alertLabels","jsxs","Fragment","jsx","componentEvents","Dashboard","ensureRequired","HomeAddressContextual","HomeAddress","WorkAddressContextual","WorkAddress","FederalTaxesContextual","FederalTaxes","StateTaxesContextual","StateTaxes","ProfileContextual","Profile","PaymentBankFormContextual","BaseComponent","BankForm","PaymentSplitViewContextual","SplitView","DocumentManagerContextual","formId","DocumentManager","DeductionFormContextual","editingDeductionId","list","useDeductionsList","BaseLayout","deduction","d","DeductionsForm","saved","mode","AddJobPlaceholderContextual","EditCompensationContextual","currentJob","ManagementEditCompensation","AddAnotherJobPlaceholderContextual"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA0CO,SAASA,IAA0B;AACxC,EAAAC,EAAQ,oBAAoB;AAC5B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,oBAAoB,GAC3C,EAAE,YAAAC,GAAY,SAAAC,GAAS,cAAAC,GAAc,aAAAC,EAAA,IAAgBC,EAAA,GACrDC,IAAaC,EAAA,GAEbC,IAAqD;AAAA,IACzD,kBAAkBT,EAAE,yBAAyB;AAAA,IAC7C,oBAAoBA,EAAE,2BAA2B;AAAA,IACjD,cAAcA,EAAE,qBAAqB;AAAA,IACrC,gBAAgBA,EAAE,uBAAuB;AAAA,IACzC,kBAAk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eb,CAAU;AAAA,MACrC,WAAAqC;AAAA,MACA,SAAS,CAACG,GAAOC,MAAS;AACxB,QAAAxC;AAAA,UACEwC,MAAS,WACL9B,EAAgB,6BAChBA,EAAgB;AAAA,UACpB6B;AAAA,QAAA;AAAA,MAEJ;AAAA,MACA,UAAU,MAAM;AACd,QAAAvC,EAAQU,EAAgB,MAAM;AAAA,MAChC;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;AAEO,SAAS+B,KAA8B;AAC5C,EAAA7C,EAAQ,oBAAoB;AAC5B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,oBAAoB,GAC3CM,IAAaC,EAAA;AACnB,SAAO,gBAAAI,EAACL,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAP,EAAE,8BAA8B,GAAE;AACxE;AAEO,SAAS6C,KAA6B;AAC3C,QAAM,EAAE,YAAA3C,GAAY,YAAA4C,GAAY,SAAA3C,EAAA,IAAYG,EAAA;AAC5C,SACE,gBAAAM;AAAA,IAACmC;AAAAA,IAAA;AAAA,MACC,YAAYhC,EAAeb,CAAU;AAAA,MACrC,OAAOa,EAAe+B,GAAY,IAAI;AAAA,MACtC,SAAA3C;AAAA,MACA,UAAU,MAAM;AACd,QAAAA,EAAQU,EAAgB,QAAQ,IAAI;AAAA,MACtC;AAAA,IAAA;AAAA,EAAA;AAGN;AAEO,SAASmC,KAAqC;AACnD,EAAAjD,EAAQ,oBAAoB;AAC5B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,oBAAoB,GAC3CM,IAAaC,EAAA;AACnB,SAAO,gBAAAI,EAACL,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAP,EAAE,qCAAqC,GAAE;AAC/E;"}
|
|
1
|
+
{"version":3,"file":"DashboardComponents.js","sources":["../../../../src/components/Employee/Dashboard/DashboardComponents.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { Job } from '@gusto/embedded-api/models/components/job'\nimport { Dashboard, type DashboardTab } from './Dashboard'\nimport { getPendingCompensationChanges } from './getPendingCompensationChanges'\nimport { HomeAddress } from '@/components/Employee/HomeAddress/management/HomeAddress'\nimport { WorkAddress } from '@/components/Employee/WorkAddress/management/WorkAddress'\nimport { FederalTaxes } from '@/components/Employee/FederalTaxes/management/FederalTaxes'\nimport { StateTaxes } from '@/components/Employee/StateTaxes/management/StateTaxes'\nimport { Profile } from '@/components/Employee/Profile/management/Profile'\nimport { BankForm } from '@/components/Employee/PaymentMethod/onboarding/BankForm'\nimport { SplitView } from '@/components/Employee/PaymentMethod/onboarding/SplitView'\nimport { DocumentManager } from '@/components/Employee/Documents/management/DocumentManager'\nimport { DeductionsForm } from '@/components/Employee/Deductions/DeductionsForm/DeductionsForm'\nimport {\n ManagementEditCompensation,\n ManagementEditPendingCompensation,\n} from '@/components/Employee/Compensation/management'\nimport { useDeductionsList } from '@/components/Employee/Deductions/shared'\nimport { AddAnotherJob } from '@/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob'\nimport { EditCompensation } from '@/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation'\nimport { useFlow, type FlowContextInterface } from '@/components/Flow/useFlow'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { BaseComponent, BaseLayout } from '@/components/Base'\nimport { ensureRequired } from '@/helpers/ensureRequired'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\n\nexport type DashboardSuccessAlert =\n | 'bankAccountAdded'\n | 'bankAccountDeleted'\n | 'splitUpdated'\n | 'deductionAdded'\n | 'deductionUpdated'\n | 'deductionDeleted'\n | 'jobAdded'\n\nexport interface DashboardContextInterface extends FlowContextInterface {\n employeeId: string\n formId?: string\n currentJob?: Job | null\n successAlert?: DashboardSuccessAlert | null\n /** Set by the EMPLOYEE_DEDUCTION_EDIT transition; consumed by\n * DeductionFormContextual to pre-populate the form. */\n editingDeductionId?: string\n /** Persists the active Dashboard tab across sub-flows so Cancel/Back\n * returns to the originating tab instead of resetting to basic details. */\n selectedTab?: DashboardTab\n}\n\nexport function DashboardViewContextual() {\n useI18n('Employee.Dashboard')\n const { t } = useTranslation('Employee.Dashboard')\n const { employeeId, onEvent, successAlert, selectedTab } = useFlow<DashboardContextInterface>()\n const Components = useComponentContext()\n\n const alertLabels: Record<DashboardSuccessAlert, string> = {\n bankAccountAdded: t('alerts.bankAccountAdded'),\n bankAccountDeleted: t('alerts.bankAccountDeleted'),\n splitUpdated: t('alerts.splitUpdated'),\n deductionAdded: t('alerts.deductionAdded'),\n deductionUpdated: t('alerts.deductionUpdated'),\n deductionDeleted: t('alerts.deductionDeleted'),\n jobAdded: t('alerts.jobAdded'),\n }\n\n return (\n <>\n {successAlert && (\n <Components.Alert\n status=\"success\"\n label={alertLabels[successAlert]}\n onDismiss={() => {\n onEvent(componentEvents.EMPLOYEE_DISMISS, null)\n }}\n disableScrollIntoView\n />\n )}\n <Dashboard\n employeeId={ensureRequired(employeeId)}\n onEvent={onEvent}\n selectedTab={selectedTab}\n />\n </>\n )\n}\n\nexport function HomeAddressContextual() {\n const { employeeId, onEvent } = useFlow<DashboardContextInterface>()\n return <HomeAddress employeeId={ensureRequired(employeeId)} onEvent={onEvent} />\n}\n\nexport function WorkAddressContextual() {\n const { employeeId, onEvent } = useFlow<DashboardContextInterface>()\n return <WorkAddress employeeId={ensureRequired(employeeId)} onEvent={onEvent} />\n}\n\nexport function FederalTaxesContextual() {\n const { employeeId, onEvent } = useFlow<DashboardContextInterface>()\n return <FederalTaxes employeeId={ensureRequired(employeeId)} onEvent={onEvent} />\n}\n\nexport function StateTaxesContextual() {\n const { employeeId, onEvent } = useFlow<DashboardContextInterface>()\n return <StateTaxes employeeId={ensureRequired(employeeId)} onEvent={onEvent} />\n}\n\nexport function ProfileContextual() {\n const { employeeId, onEvent } = useFlow<DashboardContextInterface>()\n return <Profile employeeId={ensureRequired(employeeId)} onEvent={onEvent} />\n}\n\nexport function PaymentBankFormContextual() {\n const { employeeId, onEvent } = useFlow<DashboardContextInterface>()\n return (\n <BaseComponent onEvent={onEvent}>\n <BankForm employeeId={ensureRequired(employeeId)} onEvent={onEvent} />\n </BaseComponent>\n )\n}\n\nexport function PaymentSplitViewContextual() {\n const { employeeId, onEvent } = useFlow<DashboardContextInterface>()\n return (\n <BaseComponent onEvent={onEvent}>\n <SplitView employeeId={ensureRequired(employeeId)} onEvent={onEvent} />\n </BaseComponent>\n )\n}\n\nexport function DocumentManagerContextual() {\n const { employeeId, formId, onEvent } = useFlow<DashboardContextInterface>()\n return (\n <DocumentManager\n employeeId={ensureRequired(employeeId)}\n formId={ensureRequired(formId)}\n onEvent={onEvent}\n />\n )\n}\n\nexport function DeductionFormContextual() {\n const { employeeId, editingDeductionId, onEvent } = useFlow<DashboardContextInterface>()\n // The same list query the form hooks use internally — React Query dedupes,\n // so this just looks up the loaded row to pre-populate edit mode.\n const list = useDeductionsList({ employeeId: ensureRequired(employeeId) })\n\n if (list.isLoading) {\n return <BaseLayout isLoading error={list.errorHandling.errors} />\n }\n\n const deduction = editingDeductionId\n ? (list.data.deductions.find(d => d.uuid === editingDeductionId) ?? null)\n : null\n\n return (\n <BaseLayout error={list.errorHandling.errors}>\n <DeductionsForm\n employeeId={ensureRequired(employeeId)}\n deduction={deduction}\n onSaved={(saved, mode) => {\n onEvent(\n mode === 'create'\n ? componentEvents.EMPLOYEE_DEDUCTION_CREATED\n : componentEvents.EMPLOYEE_DEDUCTION_UPDATED,\n saved,\n )\n }}\n onCancel={() => {\n onEvent(componentEvents.CANCEL)\n }}\n />\n </BaseLayout>\n )\n}\n\nexport function AddJobContextual() {\n useI18n('Employee.Dashboard')\n const { t } = useTranslation('Employee.Dashboard')\n const { employeeId, onEvent } = useFlow<DashboardContextInterface>()\n return (\n <EditCompensation\n employeeId={ensureRequired(employeeId)}\n title={t('compensationFlow.addJobTitle')}\n submitCtaLabel={t('compensationFlow.saveCta')}\n onEvent={onEvent}\n onCancel={() => {\n onEvent(componentEvents.CANCEL)\n }}\n />\n )\n}\n\nexport function EditCompensationContextual() {\n const { employeeId, currentJob, onEvent } = useFlow<DashboardContextInterface>()\n\n // Use getPendingCompensationChanges to find the nearest pending comp — the\n // API does not guarantee ordering of job.compensations, so we rely on the\n // same sorted helper that drives the card display (ascending by effectiveDate).\n const pendingChanges = getPendingCompensationChanges(currentJob ? [currentJob] : [])\n const nearestPending = pendingChanges[0]\n\n if (nearestPending) {\n return (\n <ManagementEditPendingCompensation\n employeeId={ensureRequired(employeeId)}\n jobId={ensureRequired(currentJob?.uuid)}\n compensationId={nearestPending.compensationUuid}\n isNewJob={nearestPending.isNewJob}\n isPrimaryJob={currentJob?.primary ?? false}\n onEvent={onEvent}\n onCancel={() => {\n onEvent(componentEvents.CANCEL, null)\n }}\n />\n )\n }\n\n return (\n <ManagementEditCompensation\n employeeId={ensureRequired(employeeId)}\n jobId={ensureRequired(currentJob?.uuid)}\n onEvent={onEvent}\n onCancel={() => {\n onEvent(componentEvents.CANCEL, null)\n }}\n />\n )\n}\n\nexport function AddAnotherJobContextual() {\n const { employeeId, onEvent } = useFlow<DashboardContextInterface>()\n return (\n <AddAnotherJob\n employeeId={ensureRequired(employeeId)}\n onEvent={onEvent}\n onCancel={() => {\n onEvent(componentEvents.CANCEL)\n }}\n />\n )\n}\n"],"names":["DashboardViewContextual","useI18n","t","useTranslation","employeeId","onEvent","successAlert","selectedTab","useFlow","Components","useComponentContext","alertLabels","jsxs","Fragment","jsx","componentEvents","Dashboard","ensureRequired","HomeAddressContextual","HomeAddress","WorkAddressContextual","WorkAddress","FederalTaxesContextual","FederalTaxes","StateTaxesContextual","StateTaxes","ProfileContextual","Profile","PaymentBankFormContextual","BaseComponent","BankForm","PaymentSplitViewContextual","SplitView","DocumentManagerContextual","formId","DocumentManager","DeductionFormContextual","editingDeductionId","list","useDeductionsList","BaseLayout","deduction","d","DeductionsForm","saved","mode","AddJobContextual","EditCompensation","EditCompensationContextual","currentJob","nearestPending","getPendingCompensationChanges","ManagementEditPendingCompensation","ManagementEditCompensation","AddAn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