@gusto/embedded-react-sdk 0.14.1 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +51 -0
- package/dist/assets/icons/feature-icon-check.svg.js +10 -0
- package/dist/assets/icons/feature-icon-check.svg.js.map +1 -0
- package/dist/components/Common/DataView/DataView.d.ts +2 -1
- package/dist/components/Common/DataView/DataView.js +19 -18
- package/dist/components/Common/DataView/DataView.js.map +1 -1
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.d.ts +2 -0
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js +52 -0
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js.map +1 -0
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbsTypes.d.ts +44 -0
- package/dist/components/Common/FlowBreadcrumbs/index.d.ts +3 -0
- package/dist/components/Common/PaginationControl/PaginationControl.js +36 -36
- package/dist/components/Common/PaginationControl/PaginationControl.js.map +1 -1
- package/dist/components/Common/PaginationControl/PaginationControlTypes.d.ts +3 -1
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.d.ts +2 -0
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +38 -0
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js.map +1 -0
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.module.scss.js +16 -0
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.module.scss.js.map +1 -0
- package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.d.ts +27 -0
- package/dist/components/Common/UI/Breadcrumbs/index.d.ts +3 -0
- package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
- package/dist/components/Company/Locations/LocationsList/List.js +28 -26
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +7 -6
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.d.ts +3 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingFlow/OnboardingFlow.js +10 -10
- package/dist/components/Company/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Company/OnboardingFlow/onboardingStateMachine.js +16 -10
- package/dist/components/Company/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.js +6 -6
- package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.js +59 -57
- package/dist/components/Contractor/ContractorList/index.js.map +1 -1
- package/dist/components/Contractor/ContractorList/useContractorList.d.ts +3 -1
- package/dist/components/Contractor/ContractorList/useContractorList.js +7 -6
- package/dist/components/Contractor/ContractorList/useContractorList.js.map +1 -1
- package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js +37 -37
- package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +11 -11
- package/dist/components/Employee/EmployeeList/EmployeeList.js +11 -10
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/List.js +45 -43
- package/dist/components/Employee/EmployeeList/List.js.map +1 -1
- package/dist/components/Employee/EmployeeList/useEmployeeList.d.ts +3 -1
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
- package/dist/components/Flow/Flow.js +44 -24
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/Flow/useFlow.d.ts +10 -1
- package/dist/components/Flow/useFlow.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.d.ts +1 -1
- package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.js +16 -16
- package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +20 -20
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +9 -9
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +128 -94
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +3 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +72 -76
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +42 -42
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlow.d.ts +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlow.js +20 -19
- package/dist/components/Payroll/PayrollFlow/PayrollFlow.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +5 -3
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js +65 -45
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/index.d.ts +1 -1
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.d.ts +2 -0
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +233 -96
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +21 -20
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +12 -12
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +8 -9
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +83 -78
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.d.ts +1 -2
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +41 -45
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +1 -2
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +118 -119
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.d.ts +1 -2
- package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js +12 -26
- package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.d.ts +1 -2
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +40 -44
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/helpers.d.ts +2 -0
- package/dist/components/Payroll/helpers.js +38 -37
- package/dist/components/Payroll/helpers.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.d.ts +4 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +24 -18
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +41 -39
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
- package/dist/contexts/ComponentAdapter/componentAdapterTypes.d.ts +1 -0
- package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
- package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
- package/dist/helpers/breadcrumbHelpers.d.ts +33 -0
- package/dist/helpers/breadcrumbHelpers.js +46 -0
- package/dist/helpers/breadcrumbHelpers.js.map +1 -0
- package/dist/helpers/breadcrumbHelpers.test.d.ts +1 -0
- package/dist/i18n/I18n.d.ts +1 -1
- package/dist/i18n/I18n.js +32 -23
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Company.PaySchedule.json.js +2 -2
- package/dist/i18n/en/Payroll.PayrollBlocker.json.js +28 -0
- package/dist/i18n/en/Payroll.PayrollBlocker.json.js.map +1 -0
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +28 -24
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js +28 -26
- package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollFlow.json.js +8 -0
- package/dist/i18n/en/Payroll.PayrollFlow.json.js.map +1 -0
- package/dist/i18n/en/Payroll.PayrollHistory.json.js +9 -9
- package/dist/i18n/en/Payroll.PayrollLanding.json.js +2 -2
- package/dist/i18n/en/Payroll.PayrollOverview.json.js +60 -56
- package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollReceipts.json.js +16 -12
- package/dist/i18n/en/Payroll.PayrollReceipts.json.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/shared/constants.d.ts +3 -0
- package/dist/shared/constants.js +11 -9
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +157 -150
- package/package.json +12 -12
- package/dist/components/Payroll/RunPayrollFlow/RunPayroll.d.ts +0 -23
- package/dist/components/Payroll/RunPayrollFlow/RunPayrollFlow.d.ts +0 -6
- package/dist/i18n/en/Payroll.RunPayroll.json.js +0 -8
- package/dist/i18n/en/Payroll.RunPayroll.json.js.map +0 -1
- package/dist/i18n/en/PayrollBlocker.json.js +0 -24
- package/dist/i18n/en/PayrollBlocker.json.js.map +0 -1
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
import { jsx as t, jsxs as s, Fragment as
|
|
2
|
-
import { useTranslation as
|
|
1
|
+
import { jsx as t, jsxs as s, Fragment as x } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as re, Trans as ne } from "react-i18next";
|
|
3
3
|
import { useState as Y } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { calculateTotalPayroll as ae } from "../helpers.js";
|
|
5
|
+
import { Flex as c, FlexItem as W } from "../../Common/Flex/Flex.js";
|
|
5
6
|
import "classnames";
|
|
6
|
-
import { useComponentContext as
|
|
7
|
-
import { useI18n as
|
|
7
|
+
import { useComponentContext as le } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
|
+
import { useI18n as ie } from "../../../i18n/I18n.js";
|
|
8
9
|
import { useLocale as oe } from "../../../contexts/LocaleProvider/useLocale.js";
|
|
9
10
|
import { parseDateStringToLocal as y } from "../../../helpers/dateFormatting.js";
|
|
10
11
|
import se from "../../Common/hooks/useNumberFormatter.js";
|
|
11
|
-
import { firstLastName as
|
|
12
|
-
import { PAYMENT_METHODS as de, FlsaStatus as
|
|
12
|
+
import { firstLastName as O } from "../../../helpers/formattedStrings.js";
|
|
13
|
+
import { PAYMENT_METHODS as de, FlsaStatus as j, compensationTypeLabels as C } from "../../../shared/constants.js";
|
|
13
14
|
import ce from "../../../assets/icons/download-cloud.svg.js";
|
|
14
15
|
import { useLoadingIndicator as me } from "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
15
16
|
import { DataView as b } from "../../Common/DataView/DataView.js";
|
|
16
17
|
const ue = ({
|
|
17
18
|
payPeriod: m,
|
|
18
|
-
locale:
|
|
19
|
+
locale: f
|
|
19
20
|
}) => {
|
|
20
21
|
if (m?.startDate && m.endDate) {
|
|
21
|
-
const
|
|
22
|
-
if (
|
|
23
|
-
const
|
|
22
|
+
const g = y(m.startDate), T = y(m.endDate);
|
|
23
|
+
if (g && T) {
|
|
24
|
+
const P = g.toLocaleDateString(f, {
|
|
24
25
|
month: "long",
|
|
25
26
|
day: "numeric"
|
|
26
|
-
}),
|
|
27
|
+
}), L = T.toLocaleDateString(f, {
|
|
27
28
|
month: "short",
|
|
28
29
|
day: "numeric",
|
|
29
30
|
year: "numeric"
|
|
30
31
|
});
|
|
31
|
-
return { startDate:
|
|
32
|
+
return { startDate: P, endDate: L };
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
35
|
return { startDate: "", endDate: "" };
|
|
35
|
-
},
|
|
36
|
+
}, Ee = ({
|
|
36
37
|
onEdit: m,
|
|
37
|
-
onSubmit:
|
|
38
|
-
onCancel:
|
|
39
|
-
onPayrollReceipt:
|
|
40
|
-
onPaystubDownload:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
taxes: k,
|
|
38
|
+
onSubmit: f,
|
|
39
|
+
onCancel: g,
|
|
40
|
+
onPayrollReceipt: T,
|
|
41
|
+
onPaystubDownload: P,
|
|
42
|
+
employeeDetails: L,
|
|
43
|
+
payrollData: l,
|
|
44
|
+
bankAccount: G,
|
|
45
|
+
taxes: N,
|
|
46
46
|
isSubmitting: h = !1,
|
|
47
|
-
isProcessed:
|
|
48
|
-
alerts:
|
|
47
|
+
isProcessed: k,
|
|
48
|
+
alerts: w
|
|
49
49
|
}) => {
|
|
50
|
-
const { Alert: M, Button:
|
|
51
|
-
|
|
52
|
-
const { locale: u } = oe(), { t: r } =
|
|
53
|
-
(a,
|
|
50
|
+
const { Alert: M, Button: H, ButtonIcon: X, Dialog: $, Heading: E, Text: n, Tabs: z, LoadingSpinner: K } = le();
|
|
51
|
+
ie("Payroll.PayrollOverview");
|
|
52
|
+
const { locale: u } = oe(), { t: r } = re("Payroll.PayrollOverview"), o = se("currency"), [Z, q] = Y("companyPays"), [U, A] = Y(!1), { LoadingIndicator: J } = me(), V = ae(l), Q = l.payrollStatusMeta?.expectedDebitTime ? y(l.payrollStatusMeta.expectedDebitTime) : l.payrollDeadline, _ = (e) => e.taxes?.reduce(
|
|
53
|
+
(a, i) => i.employer ? a + i.amount : a,
|
|
54
54
|
0
|
|
55
55
|
) ?? 0, I = (e) => e.benefits?.reduce(
|
|
56
|
-
(a,
|
|
56
|
+
(a, i) => i.companyContribution ? a + i.companyContribution : a,
|
|
57
57
|
0
|
|
58
58
|
) ?? 0, v = (e) => e.fixedCompensations?.length ? Number(
|
|
59
59
|
e.fixedCompensations.find(
|
|
60
|
-
(a) => a.name?.toLowerCase() ===
|
|
60
|
+
(a) => a.name?.toLowerCase() === C.REIMBURSEMENT_NAME.toLowerCase()
|
|
61
61
|
)?.amount || 0
|
|
62
|
-
) : 0,
|
|
63
|
-
(a,
|
|
64
|
-
if (typeof
|
|
62
|
+
) : 0, ee = (e) => e.grossPay + v(e) + _(e) + I(e), d = new Map(L.map((e) => [e.uuid, e])), D = (e) => e.hourlyCompensations?.reduce(
|
|
63
|
+
(a, i) => {
|
|
64
|
+
if (typeof i.name > "u")
|
|
65
65
|
return a;
|
|
66
|
-
const
|
|
67
|
-
return a[
|
|
66
|
+
const p = i.name.toLowerCase(), S = a[p] ?? 0;
|
|
67
|
+
return a[p] = S + Number(i.hours || 0), a;
|
|
68
68
|
},
|
|
69
69
|
{}
|
|
70
|
-
) || {}, B = (e) => e.paidTimeOff?.reduce((a,
|
|
70
|
+
) || {}, B = (e) => e.paidTimeOff?.reduce((a, i) => a + Number(i.hours || 0), 0) ?? 0, R = l.employeeCompensations?.reduce(
|
|
71
71
|
(e, a) => !a.excluded && a.paymentMethod === de.check ? e + 1 : e,
|
|
72
72
|
0
|
|
73
73
|
) ?? 0, F = [
|
|
74
74
|
{
|
|
75
75
|
key: "employeeName",
|
|
76
76
|
title: r("tableHeaders.employees"),
|
|
77
|
-
render: (e) => /* @__PURE__ */ t(n, { children:
|
|
78
|
-
first_name:
|
|
79
|
-
last_name:
|
|
77
|
+
render: (e) => /* @__PURE__ */ t(n, { children: O({
|
|
78
|
+
first_name: d.get(e.employeeUuid)?.firstName,
|
|
79
|
+
last_name: d.get(e.employeeUuid)?.lastName
|
|
80
80
|
}) })
|
|
81
81
|
},
|
|
82
82
|
{
|
|
@@ -102,25 +102,25 @@ const ue = ({
|
|
|
102
102
|
{
|
|
103
103
|
key: "companyPays",
|
|
104
104
|
title: r("tableHeaders.companyPays"),
|
|
105
|
-
render: (e) => /* @__PURE__ */ t(n, { children: o(
|
|
105
|
+
render: (e) => /* @__PURE__ */ t(n, { children: o(ee(e)) })
|
|
106
106
|
}
|
|
107
107
|
];
|
|
108
|
-
|
|
108
|
+
k && F.push({
|
|
109
109
|
key: "paystubs",
|
|
110
110
|
title: r("tableHeaders.paystub"),
|
|
111
111
|
render: (e) => /* @__PURE__ */ t(
|
|
112
|
-
|
|
112
|
+
X,
|
|
113
113
|
{
|
|
114
114
|
"aria-label": r("downloadPaystubLabel"),
|
|
115
115
|
variant: "tertiary",
|
|
116
116
|
onClick: () => {
|
|
117
|
-
e.employeeUuid &&
|
|
117
|
+
e.employeeUuid && P(e.employeeUuid);
|
|
118
118
|
},
|
|
119
119
|
children: /* @__PURE__ */ t(ce, {})
|
|
120
120
|
}
|
|
121
121
|
)
|
|
122
122
|
});
|
|
123
|
-
const
|
|
123
|
+
const te = [
|
|
124
124
|
{
|
|
125
125
|
id: "companyPays",
|
|
126
126
|
label: r("dataViews.companyPaysTab"),
|
|
@@ -129,16 +129,16 @@ const ue = ({
|
|
|
129
129
|
{
|
|
130
130
|
label: r("dataViews.companyPaysTable"),
|
|
131
131
|
columns: F,
|
|
132
|
-
data:
|
|
132
|
+
data: l.employeeCompensations,
|
|
133
133
|
footer: () => ({
|
|
134
|
-
employeeName: /* @__PURE__ */ s(
|
|
134
|
+
employeeName: /* @__PURE__ */ s(x, { children: [
|
|
135
135
|
/* @__PURE__ */ t(n, { children: r("tableHeaders.footerTotalsLabel") }),
|
|
136
136
|
/* @__PURE__ */ t(n, { children: r("tableHeaders.footerTotalsDescription") })
|
|
137
137
|
] }),
|
|
138
|
-
grossPay: /* @__PURE__ */ t(n, { children: o(Number(
|
|
139
|
-
reimbursements: /* @__PURE__ */ t(n, { children: o(Number(
|
|
140
|
-
companyTaxes: /* @__PURE__ */ t(n, { children: o(Number(
|
|
141
|
-
companyBenefits: /* @__PURE__ */ t(n, { children: o(Number(
|
|
138
|
+
grossPay: /* @__PURE__ */ t(n, { children: o(Number(l.totals?.grossPay ?? 0)) }),
|
|
139
|
+
reimbursements: /* @__PURE__ */ t(n, { children: o(Number(l.totals?.reimbursements ?? 0)) }),
|
|
140
|
+
companyTaxes: /* @__PURE__ */ t(n, { children: o(Number(l.totals?.employerTaxes ?? 0)) }),
|
|
141
|
+
companyBenefits: /* @__PURE__ */ t(n, { children: o(Number(l.totals?.benefits ?? 0)) }),
|
|
142
142
|
companyPays: /* @__PURE__ */ t(n, { children: o(V) })
|
|
143
143
|
})
|
|
144
144
|
}
|
|
@@ -154,25 +154,25 @@ const ue = ({
|
|
|
154
154
|
columns: [
|
|
155
155
|
{
|
|
156
156
|
title: r("tableHeaders.employees"),
|
|
157
|
-
render: (e) => /* @__PURE__ */ t(n, { children:
|
|
158
|
-
first_name:
|
|
159
|
-
last_name:
|
|
157
|
+
render: (e) => /* @__PURE__ */ t(n, { children: O({
|
|
158
|
+
first_name: d.get(e.employeeUuid)?.firstName,
|
|
159
|
+
last_name: d.get(e.employeeUuid)?.lastName
|
|
160
160
|
}) })
|
|
161
161
|
},
|
|
162
162
|
{
|
|
163
163
|
title: r("tableHeaders.compensationType"),
|
|
164
|
-
render: (e) => /* @__PURE__ */ t(n, { children:
|
|
165
|
-
if (
|
|
166
|
-
const
|
|
167
|
-
(
|
|
164
|
+
render: (e) => /* @__PURE__ */ t(n, { children: d.get(e.employeeUuid)?.jobs?.reduce((a, i) => {
|
|
165
|
+
if (i.primary) {
|
|
166
|
+
const p = i.compensations?.find(
|
|
167
|
+
(S) => S.uuid === i.currentCompensationUuid
|
|
168
168
|
)?.flsaStatus;
|
|
169
|
-
switch (
|
|
170
|
-
case
|
|
169
|
+
switch (p) {
|
|
170
|
+
case j.EXEMPT:
|
|
171
171
|
return r("compensationTypeLabels.exempt");
|
|
172
|
-
case
|
|
172
|
+
case j.NONEXEMPT:
|
|
173
173
|
return r("compensationTypeLabels.nonexempt");
|
|
174
174
|
default:
|
|
175
|
-
return
|
|
175
|
+
return p ?? "";
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
return a;
|
|
@@ -180,15 +180,15 @@ const ue = ({
|
|
|
180
180
|
},
|
|
181
181
|
{
|
|
182
182
|
title: r("tableHeaders.regular"),
|
|
183
|
-
render: (e) => /* @__PURE__ */ t(n, { children:
|
|
183
|
+
render: (e) => /* @__PURE__ */ t(n, { children: D(e)[C.REGULAR_HOURS_NAME] || 0 })
|
|
184
184
|
},
|
|
185
185
|
{
|
|
186
186
|
title: r("tableHeaders.overtime"),
|
|
187
|
-
render: (e) => /* @__PURE__ */ t(n, { children:
|
|
187
|
+
render: (e) => /* @__PURE__ */ t(n, { children: D(e)[C.OVERTIME_NAME] || 0 })
|
|
188
188
|
},
|
|
189
189
|
{
|
|
190
190
|
title: r("tableHeaders.doubleOT"),
|
|
191
|
-
render: (e) => /* @__PURE__ */ t(n, { children:
|
|
191
|
+
render: (e) => /* @__PURE__ */ t(n, { children: D(e)[C.DOUBLE_OVERTIME_NAME] || 0 })
|
|
192
192
|
},
|
|
193
193
|
{
|
|
194
194
|
title: r("tableHeaders.timeOff"),
|
|
@@ -196,13 +196,13 @@ const ue = ({
|
|
|
196
196
|
},
|
|
197
197
|
{
|
|
198
198
|
title: r("tableHeaders.totalHours"),
|
|
199
|
-
render: (e) => /* @__PURE__ */ t(n, { children: Object.values(
|
|
200
|
-
(a,
|
|
199
|
+
render: (e) => /* @__PURE__ */ t(n, { children: Object.values(D(e)).reduce(
|
|
200
|
+
(a, i) => a + i,
|
|
201
201
|
0
|
|
202
202
|
) + B(e) })
|
|
203
203
|
}
|
|
204
204
|
],
|
|
205
|
-
data:
|
|
205
|
+
data: l.employeeCompensations
|
|
206
206
|
}
|
|
207
207
|
)
|
|
208
208
|
},
|
|
@@ -216,9 +216,9 @@ const ue = ({
|
|
|
216
216
|
columns: [
|
|
217
217
|
{
|
|
218
218
|
title: r("tableHeaders.employees"),
|
|
219
|
-
render: (e) => /* @__PURE__ */ t(n, { children:
|
|
220
|
-
first_name:
|
|
221
|
-
last_name:
|
|
219
|
+
render: (e) => /* @__PURE__ */ t(n, { children: O({
|
|
220
|
+
first_name: d.get(e.employeeUuid)?.firstName,
|
|
221
|
+
last_name: d.get(e.employeeUuid)?.lastName
|
|
222
222
|
}) })
|
|
223
223
|
},
|
|
224
224
|
{
|
|
@@ -233,7 +233,7 @@ const ue = ({
|
|
|
233
233
|
title: r("tableHeaders.deductions"),
|
|
234
234
|
render: (e) => /* @__PURE__ */ t(n, { children: o(
|
|
235
235
|
e.deductions?.reduce(
|
|
236
|
-
(a,
|
|
236
|
+
(a, i) => a + i.amount,
|
|
237
237
|
0
|
|
238
238
|
) ?? 0
|
|
239
239
|
) })
|
|
@@ -246,7 +246,7 @@ const ue = ({
|
|
|
246
246
|
title: r("tableHeaders.employeeTaxes"),
|
|
247
247
|
render: (e) => /* @__PURE__ */ t(n, { children: o(
|
|
248
248
|
e.taxes?.reduce(
|
|
249
|
-
(a,
|
|
249
|
+
(a, i) => i.employer ? a : a + i.amount,
|
|
250
250
|
0
|
|
251
251
|
) ?? 0
|
|
252
252
|
) })
|
|
@@ -255,7 +255,7 @@ const ue = ({
|
|
|
255
255
|
title: r("tableHeaders.employeeBenefits"),
|
|
256
256
|
render: (e) => /* @__PURE__ */ t(n, { children: o(
|
|
257
257
|
e.benefits?.reduce(
|
|
258
|
-
(a,
|
|
258
|
+
(a, i) => a + (i.employeeDeduction ?? 0),
|
|
259
259
|
0
|
|
260
260
|
) ?? 0
|
|
261
261
|
) })
|
|
@@ -265,14 +265,14 @@ const ue = ({
|
|
|
265
265
|
render: (e) => /* @__PURE__ */ t(n, { children: o(e.netPay ?? 0) })
|
|
266
266
|
}
|
|
267
267
|
],
|
|
268
|
-
data:
|
|
268
|
+
data: l.employeeCompensations
|
|
269
269
|
}
|
|
270
270
|
)
|
|
271
271
|
},
|
|
272
272
|
{
|
|
273
273
|
id: "taxes",
|
|
274
274
|
label: r("dataViews.taxesTab"),
|
|
275
|
-
content: /* @__PURE__ */ s(
|
|
275
|
+
content: /* @__PURE__ */ s(c, { flexDirection: "column", gap: 32, children: [
|
|
276
276
|
/* @__PURE__ */ t(
|
|
277
277
|
b,
|
|
278
278
|
{
|
|
@@ -286,20 +286,20 @@ const ue = ({
|
|
|
286
286
|
{
|
|
287
287
|
key: "byYourEmployees",
|
|
288
288
|
title: r("tableHeaders.byYourEmployees"),
|
|
289
|
-
render: (e) => /* @__PURE__ */ t(n, { children: o(
|
|
289
|
+
render: (e) => /* @__PURE__ */ t(n, { children: o(N[e]?.employee ?? 0) })
|
|
290
290
|
},
|
|
291
291
|
{
|
|
292
292
|
key: "byYourCompany",
|
|
293
293
|
title: r("tableHeaders.byYourCompany"),
|
|
294
|
-
render: (e) => /* @__PURE__ */ t(n, { children: o(
|
|
294
|
+
render: (e) => /* @__PURE__ */ t(n, { children: o(N[e]?.employer ?? 0) })
|
|
295
295
|
}
|
|
296
296
|
],
|
|
297
297
|
footer: () => ({
|
|
298
298
|
taxDescription: /* @__PURE__ */ t(n, { children: r("totalsLabel") }),
|
|
299
|
-
byYourEmployees: /* @__PURE__ */ t(n, { children: o(Number(
|
|
300
|
-
byYourCompany: /* @__PURE__ */ t(n, { children: o(Number(
|
|
299
|
+
byYourEmployees: /* @__PURE__ */ t(n, { children: o(Number(l.totals?.employeeTaxes ?? 0)) }),
|
|
300
|
+
byYourCompany: /* @__PURE__ */ t(n, { children: o(Number(l.totals?.employerTaxes ?? 0)) })
|
|
301
301
|
}),
|
|
302
|
-
data: Object.keys(
|
|
302
|
+
data: Object.keys(N)
|
|
303
303
|
}
|
|
304
304
|
),
|
|
305
305
|
/* @__PURE__ */ t(
|
|
@@ -317,41 +317,40 @@ const ue = ({
|
|
|
317
317
|
}
|
|
318
318
|
],
|
|
319
319
|
data: [
|
|
320
|
-
{ label: r("directDepositLabel"), value:
|
|
320
|
+
{ label: r("directDepositLabel"), value: l.totals?.netPayDebit || "0" },
|
|
321
321
|
{
|
|
322
322
|
label: r("reimbursementLabel"),
|
|
323
|
-
value:
|
|
323
|
+
value: l.totals?.reimbursementDebit || "0"
|
|
324
324
|
},
|
|
325
325
|
{
|
|
326
326
|
label: r("garnishmentsLabel"),
|
|
327
|
-
value:
|
|
327
|
+
value: l.totals?.childSupportDebit || "0"
|
|
328
328
|
},
|
|
329
|
-
{ label: r("taxesLabel"), value:
|
|
329
|
+
{ label: r("taxesLabel"), value: l.totals?.taxDebit || "0" }
|
|
330
330
|
]
|
|
331
331
|
}
|
|
332
332
|
)
|
|
333
333
|
] })
|
|
334
334
|
}
|
|
335
335
|
];
|
|
336
|
-
return /* @__PURE__ */ s(
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
/* @__PURE__ */ t(w, { as: "h1", children: r(L ? "summaryTitle" : "overviewTitle") }),
|
|
336
|
+
return /* @__PURE__ */ s(c, { flexDirection: "column", alignItems: "stretch", children: [
|
|
337
|
+
/* @__PURE__ */ s(c, { justifyContent: "space-between", children: [
|
|
338
|
+
/* @__PURE__ */ s(W, { flexGrow: 1, children: [
|
|
339
|
+
/* @__PURE__ */ t(E, { as: "h1", children: r(k ? "summaryTitle" : "overviewTitle") }),
|
|
341
340
|
/* @__PURE__ */ t(n, { children: /* @__PURE__ */ t(
|
|
342
|
-
|
|
341
|
+
ne,
|
|
343
342
|
{
|
|
344
343
|
i18nKey: "pageSubtitle",
|
|
345
344
|
t: r,
|
|
346
345
|
components: { dateWrapper: /* @__PURE__ */ t(n, { weight: "bold", as: "span" }) },
|
|
347
|
-
values: ue({ payPeriod:
|
|
346
|
+
values: ue({ payPeriod: l.payPeriod, locale: u })
|
|
348
347
|
}
|
|
349
348
|
) })
|
|
350
349
|
] }),
|
|
351
|
-
/* @__PURE__ */ t(
|
|
352
|
-
/* @__PURE__ */ t(
|
|
350
|
+
/* @__PURE__ */ t(W, { flexGrow: 1, children: /* @__PURE__ */ t(c, { justifyContent: "flex-end", children: k ? /* @__PURE__ */ s(x, { children: [
|
|
351
|
+
/* @__PURE__ */ t(H, { onClick: T, variant: "secondary", isDisabled: h, children: r("payrollReceiptCta") }),
|
|
353
352
|
/* @__PURE__ */ t(
|
|
354
|
-
|
|
353
|
+
H,
|
|
355
354
|
{
|
|
356
355
|
onClick: () => {
|
|
357
356
|
A(!0);
|
|
@@ -361,18 +360,18 @@ const ue = ({
|
|
|
361
360
|
children: r("cancelCta")
|
|
362
361
|
}
|
|
363
362
|
)
|
|
364
|
-
] }) : /* @__PURE__ */ s(
|
|
365
|
-
/* @__PURE__ */ t(
|
|
366
|
-
/* @__PURE__ */ t(
|
|
363
|
+
] }) : /* @__PURE__ */ s(x, { children: [
|
|
364
|
+
/* @__PURE__ */ t(H, { onClick: m, variant: "secondary", isDisabled: h, children: r("editCta") }),
|
|
365
|
+
/* @__PURE__ */ t(H, { onClick: f, isDisabled: h, children: r("submitCta") })
|
|
367
366
|
] }) }) })
|
|
368
367
|
] }),
|
|
369
|
-
h ? /* @__PURE__ */ t(
|
|
370
|
-
/* @__PURE__ */ t(
|
|
371
|
-
/* @__PURE__ */ t(
|
|
368
|
+
h ? /* @__PURE__ */ t(J, { children: /* @__PURE__ */ s(c, { flexDirection: "column", alignItems: "center", gap: 4, children: [
|
|
369
|
+
/* @__PURE__ */ t(K, { size: "lg" }),
|
|
370
|
+
/* @__PURE__ */ t(E, { as: "h4", children: r("loadingTitle") }),
|
|
372
371
|
/* @__PURE__ */ t(n, { children: r("loadingDescription") })
|
|
373
|
-
] }) }) : /* @__PURE__ */ s(
|
|
374
|
-
|
|
375
|
-
/* @__PURE__ */ t(
|
|
372
|
+
] }) }) : /* @__PURE__ */ s(x, { children: [
|
|
373
|
+
w?.length && w.length > 0 && /* @__PURE__ */ t(c, { flexDirection: "column", gap: 16, children: w.map((e, a) => /* @__PURE__ */ t(M, { label: e.title, status: e.type, children: e.content ?? null }, `${e.type}-${e.title}`)) }),
|
|
374
|
+
/* @__PURE__ */ t(E, { as: "h3", children: r("payrollSummaryTitle") }),
|
|
376
375
|
/* @__PURE__ */ t(
|
|
377
376
|
b,
|
|
378
377
|
{
|
|
@@ -384,15 +383,15 @@ const ue = ({
|
|
|
384
383
|
},
|
|
385
384
|
{
|
|
386
385
|
title: r("tableHeaders.debitAmount"),
|
|
387
|
-
render: () => /* @__PURE__ */ t(n, { children: o(Number(
|
|
386
|
+
render: () => /* @__PURE__ */ t(n, { children: o(Number(l.totals?.companyDebit ?? 0)) })
|
|
388
387
|
},
|
|
389
388
|
{
|
|
390
389
|
title: r("tableHeaders.debitAccount"),
|
|
391
|
-
render: () => /* @__PURE__ */ t(n, { children:
|
|
390
|
+
render: () => /* @__PURE__ */ t(n, { children: G?.hiddenAccountNumber ?? "" })
|
|
392
391
|
},
|
|
393
392
|
{
|
|
394
393
|
title: r("tableHeaders.debitDate"),
|
|
395
|
-
render: () => /* @__PURE__ */ t(n, { children:
|
|
394
|
+
render: () => /* @__PURE__ */ t(n, { children: Q?.toLocaleString(u, {
|
|
396
395
|
month: "short",
|
|
397
396
|
day: "numeric",
|
|
398
397
|
year: "numeric"
|
|
@@ -400,7 +399,7 @@ const ue = ({
|
|
|
400
399
|
},
|
|
401
400
|
{
|
|
402
401
|
title: r("tableHeaders.employeesPayDate"),
|
|
403
|
-
render: () => /* @__PURE__ */ t(n, { children: y(
|
|
402
|
+
render: () => /* @__PURE__ */ t(n, { children: y(l.checkDate)?.toLocaleDateString(u, {
|
|
404
403
|
month: "short",
|
|
405
404
|
day: "numeric",
|
|
406
405
|
year: "numeric"
|
|
@@ -419,45 +418,45 @@ const ue = ({
|
|
|
419
418
|
}
|
|
420
419
|
),
|
|
421
420
|
/* @__PURE__ */ t(
|
|
422
|
-
|
|
421
|
+
z,
|
|
423
422
|
{
|
|
424
|
-
onSelectionChange:
|
|
425
|
-
selectedId:
|
|
423
|
+
onSelectionChange: q,
|
|
424
|
+
selectedId: Z,
|
|
426
425
|
"aria-label": r("dataViews.label"),
|
|
427
|
-
tabs:
|
|
426
|
+
tabs: te
|
|
428
427
|
}
|
|
429
428
|
),
|
|
430
429
|
U && /* @__PURE__ */ t(
|
|
431
|
-
|
|
430
|
+
$,
|
|
432
431
|
{
|
|
433
432
|
isOpen: U,
|
|
434
433
|
onClose: () => {
|
|
435
434
|
A(!1);
|
|
436
435
|
},
|
|
437
|
-
onPrimaryActionClick:
|
|
436
|
+
onPrimaryActionClick: g,
|
|
438
437
|
shouldCloseOnBackdropClick: !0,
|
|
439
438
|
primaryActionLabel: r("confirmCancelCta"),
|
|
440
439
|
isDestructive: !0,
|
|
441
440
|
closeActionLabel: r("declineCancelCta"),
|
|
442
441
|
title: r("cancelDialogTitle", {
|
|
443
442
|
startDate: y(
|
|
444
|
-
|
|
443
|
+
l.payPeriod?.startDate ?? ""
|
|
445
444
|
)?.toLocaleDateString(u, {
|
|
446
445
|
month: "long",
|
|
447
446
|
day: "numeric"
|
|
448
447
|
}),
|
|
449
448
|
endDate: y(
|
|
450
|
-
|
|
449
|
+
l.payPeriod?.endDate ?? ""
|
|
451
450
|
)?.toLocaleDateString(u, {
|
|
452
451
|
month: "long",
|
|
453
452
|
day: "numeric",
|
|
454
453
|
year: "numeric"
|
|
455
454
|
})
|
|
456
455
|
}),
|
|
457
|
-
children: /* @__PURE__ */ s(
|
|
456
|
+
children: /* @__PURE__ */ s(c, { gap: 14, flexDirection: "column", children: [
|
|
458
457
|
/* @__PURE__ */ t(n, { children: r("cancelDialogDescription") }),
|
|
459
458
|
/* @__PURE__ */ t(n, { children: r("cancelDialogDescriptionDeadline", {
|
|
460
|
-
deadline: (
|
|
459
|
+
deadline: (l.payrollDeadline ?? "").toLocaleString(u, {
|
|
461
460
|
month: "short",
|
|
462
461
|
day: "numeric",
|
|
463
462
|
year: "numeric",
|
|
@@ -473,6 +472,6 @@ const ue = ({
|
|
|
473
472
|
] });
|
|
474
473
|
};
|
|
475
474
|
export {
|
|
476
|
-
|
|
475
|
+
Ee as PayrollOverviewPresentation
|
|
477
476
|
};
|
|
478
477
|
//# sourceMappingURL=PayrollOverviewPresentation.js.map
|