@gusto/embedded-react-sdk 0.55.3 → 0.55.5
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 +29 -0
- package/dist/components/Common/DataView/DataCards/DataCards.d.ts +2 -1
- package/dist/components/Common/DataView/DataCards/DataCards.js +63 -54
- package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
- package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js +14 -12
- package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js.map +1 -1
- package/dist/components/Common/DataView/DataTable/DataTable.d.ts +2 -1
- package/dist/components/Common/DataView/DataTable/DataTable.js +75 -66
- package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
- package/dist/components/Common/DataView/DataTable/DataTable.module.scss.js +8 -4
- package/dist/components/Common/DataView/DataTable/DataTable.module.scss.js.map +1 -1
- package/dist/components/Common/DataView/DataView.js +18 -17
- package/dist/components/Common/DataView/DataView.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +27 -25
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +41 -36
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.d.ts +1 -0
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Form.d.ts +9 -2
- package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js +19 -18
- package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +63 -62
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/TaxRateManagement/AddTaxRateDialog.js +69 -65
- package/dist/components/Company/StateTaxes/TaxRateManagement/AddTaxRateDialog.js.map +1 -1
- package/dist/components/Company/StateTaxes/TaxRateManagement/toHistoryRows.js +30 -23
- package/dist/components/Company/StateTaxes/TaxRateManagement/toHistoryRows.js.map +1 -1
- package/dist/components/Company/StateTaxes/shared/RequirementFields.d.ts +8 -4
- package/dist/components/Company/StateTaxes/shared/RequirementFields.js +13 -12
- package/dist/components/Company/StateTaxes/shared/RequirementFields.js.map +1 -1
- package/dist/components/Company/StateTaxes/shared/prepareRequirements.d.ts +29 -0
- package/dist/components/Company/StateTaxes/shared/prepareRequirements.js +24 -0
- package/dist/components/Company/StateTaxes/shared/prepareRequirements.js.map +1 -0
- package/dist/components/Company/StateTaxes/shared/prepareRequirements.test.d.ts +1 -0
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js +68 -55
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +36 -35
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- package/dist/components/Employee/Paystubs/management/PaystubsCard/PaystubsCard.js +84 -96
- package/dist/components/Employee/Paystubs/management/PaystubsCard/PaystubsCard.js.map +1 -1
- package/dist/components/Flow/Flow.js +22 -22
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/Flow/useFlow.js +3 -3
- package/dist/components/InformationRequests/InformationRequests.d.ts +1 -1
- package/dist/components/InformationRequests/InformationRequests.js +66 -52
- package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +52 -50
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.d.ts +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +86 -67
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationTypes.d.ts +4 -0
- package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.d.ts +1 -1
- package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.js +26 -21
- package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.d.ts +8 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +29 -17
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.js +21 -18
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.module.scss.js +9 -7
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.module.scss.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.d.ts +2 -0
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +193 -191
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +3 -2
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +31 -31
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +254 -243
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +83 -76
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +23 -22
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollList.js +108 -97
- package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +38 -37
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +176 -167
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +2 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +173 -164
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/helpers/openPdfInNewTab.d.ts +15 -0
- package/dist/helpers/openPdfInNewTab.js +28 -0
- package/dist/helpers/openPdfInNewTab.js.map +1 -0
- package/dist/i18n/en/Company.StateTaxes.json.js +1 -1
- package/dist/i18n/en/Payroll.OffCycleCreation.json.js +11 -9
- package/dist/i18n/en/Payroll.OffCycleCreation.json.js.map +1 -1
- package/dist/i18n/en/Payroll.OffCycleTaxWithholding.json.js +7 -7
- package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js +29 -27
- package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollOverview.json.js +43 -41
- package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
- package/dist/i18n/types.d.ts +20 -0
- package/dist/style.css +1 -1
- package/package.json +17 -17
|
@@ -1,87 +1,88 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { isDismissalPayroll as
|
|
1
|
+
import { jsx as r, jsxs as o, Fragment as k } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as Ne, Trans as ke } from "react-i18next";
|
|
3
|
+
import { useState as re, useRef as Se } from "react";
|
|
4
|
+
import { isDismissalPayroll as we, getPayrollTypeLabel as Ce, calculateTotalPayroll as ve, getReimbursements as A } from "../helpers.js";
|
|
5
5
|
import { PayrollOverviewStatus as p } from "./PayrollOverviewTypes.js";
|
|
6
|
-
import
|
|
6
|
+
import le from "./PayrollOverviewPresentation.module.scss.js";
|
|
7
7
|
import { Flex as s } from "../../Common/Flex/Flex.js";
|
|
8
|
-
import { Grid as
|
|
8
|
+
import { Grid as Le } from "../../Common/Grid/Grid.js";
|
|
9
9
|
import _e from "../../../hooks/useContainerBreakpoints/useContainerBreakpoints.js";
|
|
10
|
-
import { useComponentContext as
|
|
11
|
-
import { useI18n as
|
|
12
|
-
import { useDateFormatter as
|
|
13
|
-
import
|
|
10
|
+
import { useComponentContext as Ee } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
11
|
+
import { useI18n as Oe } from "../../../i18n/I18n.js";
|
|
12
|
+
import { useDateFormatter as Ae } from "../../../hooks/useDateFormatter.js";
|
|
13
|
+
import Be from "../../../hooks/useNumberFormatter.js";
|
|
14
14
|
import { firstLastName as B } from "../../../helpers/formattedStrings.js";
|
|
15
|
-
import { FlsaStatus as
|
|
16
|
-
import
|
|
17
|
-
import { PayrollLoading as
|
|
18
|
-
import { FastAchSubmissionBlockerBanner as
|
|
19
|
-
import { GenericBlocker as
|
|
20
|
-
import { DataView as
|
|
21
|
-
const
|
|
15
|
+
import { FlsaStatus as ne, compensationTypeLabels as V, PAYROLL_RESOLVABLE_SUBMISSION_BLOCKER_TYPES as ie } from "../../../shared/constants.js";
|
|
16
|
+
import oe from "../../../assets/icons/download-cloud.svg.js";
|
|
17
|
+
import { PayrollLoading as se } from "../../Common/PayrollLoading/PayrollLoading.js";
|
|
18
|
+
import { FastAchSubmissionBlockerBanner as Ve } from "./SubmissionBlockers/FastAchSubmissionBlockerBanner.js";
|
|
19
|
+
import { GenericBlocker as We } from "./SubmissionBlockers/GenericBlocker.js";
|
|
20
|
+
import { DataView as c } from "../../Common/DataView/DataView.js";
|
|
21
|
+
const Ye = (u, S) => u?.startDate && u.endDate ? S.formatPayPeriod(u.startDate, u.endDate) : { startDate: "", endDate: "" }, it = ({
|
|
22
22
|
onEdit: u,
|
|
23
|
-
onSubmit:
|
|
24
|
-
onCancel:
|
|
25
|
-
onPayrollReceipt:
|
|
23
|
+
onSubmit: S,
|
|
24
|
+
onCancel: de,
|
|
25
|
+
onPayrollReceipt: ce,
|
|
26
26
|
onPaystubDownload: W,
|
|
27
27
|
payrollData: n,
|
|
28
28
|
bankAccount: Y,
|
|
29
|
-
taxes:
|
|
29
|
+
taxes: w,
|
|
30
30
|
status: f = p.Viewing,
|
|
31
31
|
isProcessed: h,
|
|
32
32
|
canCancel: me = !1,
|
|
33
|
-
canEdit:
|
|
33
|
+
canEdit: ue = !0,
|
|
34
34
|
alerts: I = [],
|
|
35
35
|
submissionBlockers: b = [],
|
|
36
|
-
selectedUnblockOptions:
|
|
36
|
+
selectedUnblockOptions: C = {},
|
|
37
37
|
onUnblockOptionChange: M,
|
|
38
|
-
wireInConfirmationRequest:
|
|
39
|
-
printChecksBanner:
|
|
38
|
+
wireInConfirmationRequest: be,
|
|
39
|
+
printChecksBanner: ye,
|
|
40
40
|
withReimbursements: g = !0,
|
|
41
|
-
paymentSpeed:
|
|
42
|
-
pagination: v
|
|
41
|
+
paymentSpeed: pe,
|
|
42
|
+
pagination: v,
|
|
43
|
+
downloadingEmployeeIds: U = /* @__PURE__ */ new Set()
|
|
43
44
|
}) => {
|
|
44
|
-
const { Alert: F, Badge:
|
|
45
|
-
|
|
46
|
-
const d =
|
|
47
|
-
|
|
45
|
+
const { Alert: F, Badge: L, Button: T, ButtonIcon: R, Dialog: fe, Heading: j, Text: y, Tabs: he } = Ee();
|
|
46
|
+
Oe("Payroll.PayrollOverview");
|
|
47
|
+
const d = Ae(), { t } = Ne("Payroll.PayrollOverview"), l = Be("currency"), [ge, Te] = re("companyPays"), [G, $] = re(!1), _ = Se(null), D = _e({ ref: _ }).includes("small"), H = f === p.Submitting || f === p.Cancelling, z = /* @__PURE__ */ r(j, { as: "h1", children: t(h ? "summaryTitle" : "overviewTitle") }), K = we(n.offCycleReason), X = /* @__PURE__ */ r(y, { children: /* @__PURE__ */ r(
|
|
48
|
+
ke,
|
|
48
49
|
{
|
|
49
|
-
i18nKey:
|
|
50
|
+
i18nKey: K ? "pageSubtitleDismissal" : "pageSubtitle",
|
|
50
51
|
t,
|
|
51
|
-
components: { dateWrapper: /* @__PURE__ */
|
|
52
|
+
components: { dateWrapper: /* @__PURE__ */ r(y, { weight: "bold", as: "span" }) },
|
|
52
53
|
values: {
|
|
53
|
-
...
|
|
54
|
-
payrollType:
|
|
54
|
+
...Ye(n.payPeriod, d),
|
|
55
|
+
payrollType: Ce(n)
|
|
55
56
|
}
|
|
56
57
|
}
|
|
57
58
|
) });
|
|
58
59
|
if (f === p.Cancelled)
|
|
59
|
-
return /* @__PURE__ */
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
return /* @__PURE__ */ r("div", { ref: _, className: le.container, children: /* @__PURE__ */ o(s, { flexDirection: "column", alignItems: "stretch", children: [
|
|
61
|
+
/* @__PURE__ */ r(s, { justifyContent: "space-between", alignItems: "flex-start", gap: 16, children: /* @__PURE__ */ o(s, { flexDirection: "column", gap: 4, children: [
|
|
62
|
+
z,
|
|
63
|
+
X
|
|
63
64
|
] }) }),
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ r(F, { status: "info", label: t("cancelledEmptyState") })
|
|
65
66
|
] }) });
|
|
66
|
-
const x =
|
|
67
|
-
(
|
|
67
|
+
const x = ve(n), De = n.payrollStatusMeta?.expectedDebitTime ?? n.payrollDeadline, q = (e) => e.taxes?.reduce(
|
|
68
|
+
(a, i) => i.employer ? a + Number(i.amount) : a,
|
|
68
69
|
0
|
|
69
|
-
) ?? 0,
|
|
70
|
-
(
|
|
70
|
+
) ?? 0, J = (e) => e.benefits?.reduce(
|
|
71
|
+
(a, i) => i.companyContribution ? a + Number(i.companyContribution) : a,
|
|
71
72
|
0
|
|
72
|
-
) ?? 0,
|
|
73
|
+
) ?? 0, He = (e) => Number(e.grossPay) + A(e) + q(e) + J(e), E = b.find(
|
|
73
74
|
(e) => e.blockerType === "fast_ach_threshold_exceeded" || e.blockerType === "needs_earned_access_for_fast_ach"
|
|
74
|
-
), O = E ?
|
|
75
|
+
), O = E ? C[E.blockerType || ""] : void 0, m = E?.unblockOptions?.find(
|
|
75
76
|
(e) => e.unblockType === O
|
|
76
|
-
),
|
|
77
|
-
(
|
|
77
|
+
), Q = O === "wire_in", Z = O === "move_to_four_day", P = (e) => e.hourlyCompensations?.reduce(
|
|
78
|
+
(a, i) => {
|
|
78
79
|
if (typeof i.name > "u")
|
|
79
|
-
return
|
|
80
|
-
const N = i.name.toLowerCase(),
|
|
81
|
-
return
|
|
80
|
+
return a;
|
|
81
|
+
const N = i.name.toLowerCase(), Pe = a[N] ?? 0;
|
|
82
|
+
return a[N] = Pe + Number(i.hours || 0), a;
|
|
82
83
|
},
|
|
83
84
|
{}
|
|
84
|
-
) || {},
|
|
85
|
+
) || {}, ee = (e) => e.paidTimeOff?.reduce((a, i) => a + Number(i.hours || 0), 0) ?? 0, te = [
|
|
85
86
|
{
|
|
86
87
|
key: "employeeName",
|
|
87
88
|
title: t("tableHeaders.employees"),
|
|
@@ -90,7 +91,7 @@ const We = (u, C) => u?.startDate && u.endDate ? C.formatPayPeriod(u.startDate,
|
|
|
90
91
|
first_name: e.firstName,
|
|
91
92
|
last_name: e.lastName
|
|
92
93
|
}),
|
|
93
|
-
e.excluded && /* @__PURE__ */
|
|
94
|
+
e.excluded && /* @__PURE__ */ r(L, { status: "warning", children: t("skippedBadge") })
|
|
94
95
|
] })
|
|
95
96
|
},
|
|
96
97
|
{
|
|
@@ -108,60 +109,68 @@ const We = (u, C) => u?.startDate && u.endDate ? C.formatPayPeriod(u.startDate,
|
|
|
108
109
|
{
|
|
109
110
|
key: "companyTaxes",
|
|
110
111
|
title: t("tableHeaders.companyTaxes"),
|
|
111
|
-
render: (e) => l(
|
|
112
|
+
render: (e) => l(q(e))
|
|
112
113
|
},
|
|
113
114
|
{
|
|
114
115
|
key: "companyBenefits",
|
|
115
116
|
title: t("tableHeaders.companyBenefits"),
|
|
116
|
-
render: (e) => l(
|
|
117
|
+
render: (e) => l(J(e))
|
|
117
118
|
},
|
|
118
119
|
{
|
|
119
120
|
key: "companyPays",
|
|
120
121
|
title: t("tableHeaders.companyPays"),
|
|
121
|
-
render: (e) => l(
|
|
122
|
+
render: (e) => l(He(e))
|
|
122
123
|
}
|
|
123
124
|
];
|
|
124
|
-
h && D &&
|
|
125
|
+
h && D && te.push({
|
|
125
126
|
key: "paystubs",
|
|
126
127
|
title: t("tableHeaders.paystub"),
|
|
127
|
-
render: (e) =>
|
|
128
|
-
|
|
129
|
-
{
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
128
|
+
render: (e) => {
|
|
129
|
+
const a = !!e.employeeUuid && U.has(e.employeeUuid);
|
|
130
|
+
return /* @__PURE__ */ r(s, { justifyContent: "flex-end", children: /* @__PURE__ */ r(
|
|
131
|
+
R,
|
|
132
|
+
{
|
|
133
|
+
"aria-label": t("downloadPaystubLabel"),
|
|
134
|
+
variant: "tertiary",
|
|
135
|
+
isLoading: a,
|
|
136
|
+
onClick: () => {
|
|
137
|
+
e.employeeUuid && W(e.employeeUuid);
|
|
138
|
+
},
|
|
139
|
+
children: /* @__PURE__ */ r(oe, {})
|
|
140
|
+
}
|
|
141
|
+
) });
|
|
142
|
+
}
|
|
138
143
|
});
|
|
139
|
-
const
|
|
144
|
+
const xe = [
|
|
140
145
|
{
|
|
141
146
|
id: "companyPays",
|
|
142
147
|
label: t("dataViews.companyPaysTab"),
|
|
143
|
-
content: /* @__PURE__ */
|
|
144
|
-
|
|
148
|
+
content: /* @__PURE__ */ r(
|
|
149
|
+
c,
|
|
145
150
|
{
|
|
146
151
|
label: t("dataViews.companyPaysTable"),
|
|
147
|
-
columns:
|
|
152
|
+
columns: te,
|
|
148
153
|
data: n.employeeCompensations,
|
|
149
154
|
pagination: v,
|
|
150
|
-
itemMenu: h && !D ? (e) =>
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
155
|
+
itemMenu: h && !D ? (e) => {
|
|
156
|
+
const a = !!e.employeeUuid && U.has(e.employeeUuid);
|
|
157
|
+
return /* @__PURE__ */ r(
|
|
158
|
+
R,
|
|
159
|
+
{
|
|
160
|
+
"aria-label": t("downloadPaystubLabel"),
|
|
161
|
+
variant: "tertiary",
|
|
162
|
+
isLoading: a,
|
|
163
|
+
onClick: () => {
|
|
164
|
+
e.employeeUuid && W(e.employeeUuid);
|
|
165
|
+
},
|
|
166
|
+
children: /* @__PURE__ */ r(oe, {})
|
|
167
|
+
}
|
|
168
|
+
);
|
|
169
|
+
} : void 0,
|
|
161
170
|
footer: () => ({
|
|
162
171
|
employeeName: /* @__PURE__ */ o(k, { children: [
|
|
163
172
|
t("tableHeaders.footerTotalsLabel"),
|
|
164
|
-
/* @__PURE__ */
|
|
173
|
+
/* @__PURE__ */ r(y, { variant: "supporting", size: "sm", children: t("tableHeaders.footerTotalsDescription") })
|
|
165
174
|
] }),
|
|
166
175
|
grossPay: l(Number(n.totals?.grossPay ?? 0)),
|
|
167
176
|
...g ? {
|
|
@@ -177,8 +186,8 @@ const We = (u, C) => u?.startDate && u.endDate ? C.formatPayPeriod(u.startDate,
|
|
|
177
186
|
{
|
|
178
187
|
id: "hoursWorked",
|
|
179
188
|
label: t("dataViews.hoursWorkedTab"),
|
|
180
|
-
content: /* @__PURE__ */
|
|
181
|
-
|
|
189
|
+
content: /* @__PURE__ */ r(
|
|
190
|
+
c,
|
|
182
191
|
{
|
|
183
192
|
label: t("dataViews.hoursWorkedTable"),
|
|
184
193
|
columns: [
|
|
@@ -189,22 +198,22 @@ const We = (u, C) => u?.startDate && u.endDate ? C.formatPayPeriod(u.startDate,
|
|
|
189
198
|
first_name: e.firstName,
|
|
190
199
|
last_name: e.lastName
|
|
191
200
|
}),
|
|
192
|
-
e.excluded && /* @__PURE__ */
|
|
201
|
+
e.excluded && /* @__PURE__ */ r(L, { status: "warning", children: t("skippedBadge") })
|
|
193
202
|
] })
|
|
194
203
|
},
|
|
195
204
|
{
|
|
196
205
|
title: t("tableHeaders.compensationType"),
|
|
197
206
|
render: (e) => {
|
|
198
|
-
const
|
|
207
|
+
const a = e.hourlyCompensations?.find(
|
|
199
208
|
(i) => i.flsaStatus
|
|
200
209
|
)?.flsaStatus;
|
|
201
|
-
switch (
|
|
202
|
-
case
|
|
210
|
+
switch (a) {
|
|
211
|
+
case ne.EXEMPT:
|
|
203
212
|
return t("compensationTypeLabels.exempt");
|
|
204
|
-
case
|
|
213
|
+
case ne.NONEXEMPT:
|
|
205
214
|
return t("compensationTypeLabels.nonexempt");
|
|
206
215
|
default:
|
|
207
|
-
return
|
|
216
|
+
return a ?? "";
|
|
208
217
|
}
|
|
209
218
|
}
|
|
210
219
|
},
|
|
@@ -222,14 +231,14 @@ const We = (u, C) => u?.startDate && u.endDate ? C.formatPayPeriod(u.startDate,
|
|
|
222
231
|
},
|
|
223
232
|
{
|
|
224
233
|
title: t("tableHeaders.timeOff"),
|
|
225
|
-
render: (e) =>
|
|
234
|
+
render: (e) => ee(e)
|
|
226
235
|
},
|
|
227
236
|
{
|
|
228
237
|
title: t("tableHeaders.totalHours"),
|
|
229
238
|
render: (e) => Object.values(P(e)).reduce(
|
|
230
|
-
(
|
|
239
|
+
(a, i) => a + i,
|
|
231
240
|
0
|
|
232
|
-
) +
|
|
241
|
+
) + ee(e)
|
|
233
242
|
}
|
|
234
243
|
],
|
|
235
244
|
data: n.employeeCompensations,
|
|
@@ -240,8 +249,8 @@ const We = (u, C) => u?.startDate && u.endDate ? C.formatPayPeriod(u.startDate,
|
|
|
240
249
|
{
|
|
241
250
|
id: "employeeTakeHome",
|
|
242
251
|
label: t("dataViews.employeeTakeHomeTab"),
|
|
243
|
-
content: /* @__PURE__ */
|
|
244
|
-
|
|
252
|
+
content: /* @__PURE__ */ r(
|
|
253
|
+
c,
|
|
245
254
|
{
|
|
246
255
|
label: t("dataViews.employeeTakeHomeTable"),
|
|
247
256
|
columns: [
|
|
@@ -252,7 +261,7 @@ const We = (u, C) => u?.startDate && u.endDate ? C.formatPayPeriod(u.startDate,
|
|
|
252
261
|
first_name: e.firstName,
|
|
253
262
|
last_name: e.lastName
|
|
254
263
|
}),
|
|
255
|
-
e.excluded && /* @__PURE__ */
|
|
264
|
+
e.excluded && /* @__PURE__ */ r(L, { status: "warning", children: t("skippedBadge") })
|
|
256
265
|
] })
|
|
257
266
|
},
|
|
258
267
|
{
|
|
@@ -267,7 +276,7 @@ const We = (u, C) => u?.startDate && u.endDate ? C.formatPayPeriod(u.startDate,
|
|
|
267
276
|
title: t("tableHeaders.deductions"),
|
|
268
277
|
render: (e) => l(
|
|
269
278
|
e.deductions?.reduce(
|
|
270
|
-
(
|
|
279
|
+
(a, i) => a + Number(i.amount),
|
|
271
280
|
0
|
|
272
281
|
) ?? 0
|
|
273
282
|
)
|
|
@@ -282,7 +291,7 @@ const We = (u, C) => u?.startDate && u.endDate ? C.formatPayPeriod(u.startDate,
|
|
|
282
291
|
title: t("tableHeaders.employeeTaxes"),
|
|
283
292
|
render: (e) => l(
|
|
284
293
|
e.taxes?.reduce(
|
|
285
|
-
(
|
|
294
|
+
(a, i) => i.employer ? a : a + Number(i.amount),
|
|
286
295
|
0
|
|
287
296
|
) ?? 0
|
|
288
297
|
)
|
|
@@ -291,7 +300,7 @@ const We = (u, C) => u?.startDate && u.endDate ? C.formatPayPeriod(u.startDate,
|
|
|
291
300
|
title: t("tableHeaders.employeeBenefits"),
|
|
292
301
|
render: (e) => l(
|
|
293
302
|
e.benefits?.reduce(
|
|
294
|
-
(
|
|
303
|
+
(a, i) => a + Number(i.employeeDeduction ?? 0),
|
|
295
304
|
0
|
|
296
305
|
) ?? 0
|
|
297
306
|
)
|
|
@@ -310,8 +319,8 @@ const We = (u, C) => u?.startDate && u.endDate ? C.formatPayPeriod(u.startDate,
|
|
|
310
319
|
id: "taxes",
|
|
311
320
|
label: t("dataViews.taxesTab"),
|
|
312
321
|
content: /* @__PURE__ */ o(s, { flexDirection: "column", gap: 32, children: [
|
|
313
|
-
/* @__PURE__ */
|
|
314
|
-
|
|
322
|
+
/* @__PURE__ */ r(
|
|
323
|
+
c,
|
|
315
324
|
{
|
|
316
325
|
label: t("dataViews.taxesTable"),
|
|
317
326
|
columns: [
|
|
@@ -323,24 +332,24 @@ const We = (u, C) => u?.startDate && u.endDate ? C.formatPayPeriod(u.startDate,
|
|
|
323
332
|
{
|
|
324
333
|
key: "byYourEmployees",
|
|
325
334
|
title: t("tableHeaders.byYourEmployees"),
|
|
326
|
-
render: (e) => l(
|
|
335
|
+
render: (e) => l(w[e]?.employee ?? 0)
|
|
327
336
|
},
|
|
328
337
|
{
|
|
329
338
|
key: "byYourCompany",
|
|
330
339
|
title: t("tableHeaders.byYourCompany"),
|
|
331
|
-
render: (e) => l(
|
|
340
|
+
render: (e) => l(w[e]?.employer ?? 0)
|
|
332
341
|
}
|
|
333
342
|
],
|
|
334
343
|
footer: () => ({
|
|
335
|
-
taxDescription: /* @__PURE__ */
|
|
344
|
+
taxDescription: /* @__PURE__ */ r(y, { weight: "semibold", size: "sm", children: t("totalsLabel") }),
|
|
336
345
|
byYourEmployees: l(Number(n.totals?.employeeTaxes ?? 0)),
|
|
337
346
|
byYourCompany: l(Number(n.totals?.employerTaxes ?? 0))
|
|
338
347
|
}),
|
|
339
|
-
data: Object.keys(
|
|
348
|
+
data: Object.keys(w)
|
|
340
349
|
}
|
|
341
350
|
),
|
|
342
|
-
/* @__PURE__ */
|
|
343
|
-
|
|
351
|
+
/* @__PURE__ */ r(
|
|
352
|
+
c,
|
|
344
353
|
{
|
|
345
354
|
label: t("dataViews.debitedTable"),
|
|
346
355
|
columns: [
|
|
@@ -371,13 +380,13 @@ const We = (u, C) => u?.startDate && u.endDate ? C.formatPayPeriod(u.startDate,
|
|
|
371
380
|
)
|
|
372
381
|
] })
|
|
373
382
|
}
|
|
374
|
-
],
|
|
375
|
-
/* @__PURE__ */
|
|
376
|
-
me && /* @__PURE__ */
|
|
383
|
+
], ae = h ? /* @__PURE__ */ o(k, { children: [
|
|
384
|
+
/* @__PURE__ */ r(T, { onClick: ce, variant: "secondary", isDisabled: H, children: t("payrollReceiptCta") }),
|
|
385
|
+
me && /* @__PURE__ */ r(
|
|
377
386
|
T,
|
|
378
387
|
{
|
|
379
388
|
onClick: () => {
|
|
380
|
-
|
|
389
|
+
$(!0);
|
|
381
390
|
},
|
|
382
391
|
variant: "error",
|
|
383
392
|
isDisabled: H,
|
|
@@ -385,32 +394,32 @@ const We = (u, C) => u?.startDate && u.endDate ? C.formatPayPeriod(u.startDate,
|
|
|
385
394
|
}
|
|
386
395
|
)
|
|
387
396
|
] }) : /* @__PURE__ */ o(k, { children: [
|
|
388
|
-
|
|
389
|
-
/* @__PURE__ */
|
|
397
|
+
ue && /* @__PURE__ */ r(T, { onClick: u, variant: "secondary", isDisabled: H, children: t("editCta") }),
|
|
398
|
+
/* @__PURE__ */ r(
|
|
390
399
|
T,
|
|
391
400
|
{
|
|
392
|
-
onClick:
|
|
401
|
+
onClick: S,
|
|
393
402
|
isDisabled: H || b.length > 0 && (b.some(
|
|
394
|
-
(e) => !
|
|
403
|
+
(e) => !ie.includes(e.blockerType || "")
|
|
395
404
|
) || b.some(
|
|
396
|
-
(e) => !
|
|
405
|
+
(e) => !C[e.blockerType || ""]
|
|
397
406
|
)),
|
|
398
407
|
children: t("submitCta")
|
|
399
408
|
}
|
|
400
409
|
)
|
|
401
410
|
] });
|
|
402
|
-
return /* @__PURE__ */
|
|
411
|
+
return /* @__PURE__ */ r("div", { ref: _, className: le.container, children: /* @__PURE__ */ o(s, { flexDirection: "column", alignItems: "stretch", children: [
|
|
403
412
|
/* @__PURE__ */ o(s, { justifyContent: "space-between", alignItems: "flex-start", gap: 16, children: [
|
|
404
413
|
/* @__PURE__ */ o(s, { flexDirection: "column", gap: 4, children: [
|
|
405
|
-
|
|
406
|
-
|
|
414
|
+
z,
|
|
415
|
+
X
|
|
407
416
|
] }),
|
|
408
|
-
D && /* @__PURE__ */
|
|
417
|
+
D && /* @__PURE__ */ r(s, { gap: 8, justifyContent: "flex-end", children: ae })
|
|
409
418
|
] }),
|
|
410
|
-
!D && /* @__PURE__ */
|
|
411
|
-
f === p.Cancelling ? /* @__PURE__ */
|
|
412
|
-
|
|
413
|
-
I.length > 0 && /* @__PURE__ */
|
|
419
|
+
!D && /* @__PURE__ */ r(Le, { gridTemplateColumns: "1fr", gap: 8, children: ae }),
|
|
420
|
+
f === p.Cancelling ? /* @__PURE__ */ r(se, { title: t("cancellingTitle") }) : f === p.Submitting ? /* @__PURE__ */ r(se, { title: t("loadingTitle"), description: t("loadingDescription") }) : /* @__PURE__ */ o(k, { children: [
|
|
421
|
+
be,
|
|
422
|
+
I.length > 0 && /* @__PURE__ */ r(s, { flexDirection: "column", gap: 16, children: I.map((e, a) => /* @__PURE__ */ r(
|
|
414
423
|
F,
|
|
415
424
|
{
|
|
416
425
|
label: e.title,
|
|
@@ -421,21 +430,21 @@ const We = (u, C) => u?.startDate && u.endDate ? C.formatPayPeriod(u.startDate,
|
|
|
421
430
|
`${e.type}-${e.title}`
|
|
422
431
|
)) }),
|
|
423
432
|
b.length > 0 && M && b.map((e) => {
|
|
424
|
-
const
|
|
425
|
-
return
|
|
426
|
-
|
|
433
|
+
const a = e.blockerType || "";
|
|
434
|
+
return ie.includes(a) ? /* @__PURE__ */ r(
|
|
435
|
+
Ve,
|
|
427
436
|
{
|
|
428
437
|
blocker: e,
|
|
429
|
-
selectedValue:
|
|
438
|
+
selectedValue: C[a],
|
|
430
439
|
onUnblockOptionChange: M,
|
|
431
|
-
paymentSpeed:
|
|
440
|
+
paymentSpeed: pe
|
|
432
441
|
},
|
|
433
|
-
|
|
434
|
-
) : /* @__PURE__ */
|
|
442
|
+
a
|
|
443
|
+
) : /* @__PURE__ */ r(We, { blocker: e }, a);
|
|
435
444
|
}),
|
|
436
|
-
/* @__PURE__ */
|
|
437
|
-
|
|
438
|
-
|
|
445
|
+
/* @__PURE__ */ r(j, { as: "h2", styledAs: "h3", children: t(Q ? "payrollSummaryTitleWire" : Z ? "payrollSummaryTitleFourDay" : "payrollSummaryTitle") }),
|
|
446
|
+
Q ? /* @__PURE__ */ r(
|
|
447
|
+
c,
|
|
439
448
|
{
|
|
440
449
|
label: t("payrollSummaryLabel"),
|
|
441
450
|
columns: [
|
|
@@ -446,26 +455,26 @@ const We = (u, C) => u?.startDate && u.endDate ? C.formatPayPeriod(u.startDate,
|
|
|
446
455
|
{
|
|
447
456
|
title: t("tableHeaders.wireAmount"),
|
|
448
457
|
render: () => {
|
|
449
|
-
const
|
|
450
|
-
return
|
|
458
|
+
const a = m?.metadata?.wire_in_amount;
|
|
459
|
+
return a ? l(Number(a)) : "-";
|
|
451
460
|
}
|
|
452
461
|
},
|
|
453
462
|
{
|
|
454
463
|
title: t("tableHeaders.wireTransferDeadline"),
|
|
455
464
|
render: () => {
|
|
456
|
-
const
|
|
457
|
-
return
|
|
465
|
+
const a = m?.metadata?.wire_in_deadline, i = d.formatWithTime(a), N = d.formatShortWithYear(a);
|
|
466
|
+
return a ? `${i.time} on ${N}` : "-";
|
|
458
467
|
}
|
|
459
468
|
},
|
|
460
469
|
{
|
|
461
470
|
title: t("tableHeaders.employeePayDate"),
|
|
462
|
-
render: () =>
|
|
471
|
+
render: () => m?.checkDate ? d.formatShortWithYear(m.checkDate) : "-"
|
|
463
472
|
}
|
|
464
473
|
],
|
|
465
474
|
data: [{}]
|
|
466
475
|
}
|
|
467
|
-
) :
|
|
468
|
-
|
|
476
|
+
) : Z ? /* @__PURE__ */ r(
|
|
477
|
+
c,
|
|
469
478
|
{
|
|
470
479
|
label: t("payrollSummaryLabel"),
|
|
471
480
|
columns: [
|
|
@@ -487,19 +496,19 @@ const We = (u, C) => u?.startDate && u.endDate ? C.formatPayPeriod(u.startDate,
|
|
|
487
496
|
{
|
|
488
497
|
title: t("tableHeaders.debitDate"),
|
|
489
498
|
render: () => {
|
|
490
|
-
const
|
|
491
|
-
return d.formatShortWithYear(
|
|
499
|
+
const a = m?.metadata?.debit_date;
|
|
500
|
+
return d.formatShortWithYear(a);
|
|
492
501
|
}
|
|
493
502
|
},
|
|
494
503
|
{
|
|
495
504
|
title: t("tableHeaders.employeePayDate"),
|
|
496
|
-
render: () =>
|
|
505
|
+
render: () => m?.checkDate ? d.formatShortWithYear(m.checkDate) : "-"
|
|
497
506
|
}
|
|
498
507
|
],
|
|
499
508
|
data: [{}]
|
|
500
509
|
}
|
|
501
|
-
) : /* @__PURE__ */
|
|
502
|
-
|
|
510
|
+
) : /* @__PURE__ */ r(
|
|
511
|
+
c,
|
|
503
512
|
{
|
|
504
513
|
label: t("payrollSummaryLabel"),
|
|
505
514
|
columns: [
|
|
@@ -517,7 +526,7 @@ const We = (u, C) => u?.startDate && u.endDate ? C.formatPayPeriod(u.startDate,
|
|
|
517
526
|
},
|
|
518
527
|
{
|
|
519
528
|
title: t("tableHeaders.debitDate"),
|
|
520
|
-
render: () => d.formatShortWithYear(
|
|
529
|
+
render: () => d.formatShortWithYear(De)
|
|
521
530
|
},
|
|
522
531
|
{
|
|
523
532
|
title: t("tableHeaders.employeePayDate"),
|
|
@@ -527,35 +536,35 @@ const We = (u, C) => u?.startDate && u.endDate ? C.formatPayPeriod(u.startDate,
|
|
|
527
536
|
data: [{}]
|
|
528
537
|
}
|
|
529
538
|
),
|
|
530
|
-
|
|
531
|
-
/* @__PURE__ */
|
|
532
|
-
|
|
539
|
+
ye,
|
|
540
|
+
/* @__PURE__ */ r(
|
|
541
|
+
he,
|
|
533
542
|
{
|
|
534
|
-
onSelectionChange:
|
|
535
|
-
selectedId:
|
|
543
|
+
onSelectionChange: Te,
|
|
544
|
+
selectedId: ge,
|
|
536
545
|
"aria-label": t("dataViews.label"),
|
|
537
|
-
tabs:
|
|
546
|
+
tabs: xe
|
|
538
547
|
}
|
|
539
548
|
),
|
|
540
|
-
|
|
541
|
-
|
|
549
|
+
G && /* @__PURE__ */ r(
|
|
550
|
+
fe,
|
|
542
551
|
{
|
|
543
|
-
isOpen:
|
|
552
|
+
isOpen: G,
|
|
544
553
|
onClose: () => {
|
|
545
|
-
|
|
554
|
+
$(!1);
|
|
546
555
|
},
|
|
547
|
-
onPrimaryActionClick:
|
|
556
|
+
onPrimaryActionClick: de,
|
|
548
557
|
shouldCloseOnBackdropClick: !0,
|
|
549
558
|
primaryActionLabel: t("confirmCancelCta"),
|
|
550
559
|
isDestructive: !0,
|
|
551
560
|
closeActionLabel: t("declineCancelCta"),
|
|
552
|
-
title: t(
|
|
561
|
+
title: t(K ? "cancelDialogTitleDismissal" : "cancelDialogTitle", {
|
|
553
562
|
startDate: d.formatLong(n.payPeriod?.startDate),
|
|
554
563
|
endDate: d.formatLongWithYear(n.payPeriod?.endDate)
|
|
555
564
|
}),
|
|
556
565
|
children: /* @__PURE__ */ o(s, { gap: 14, flexDirection: "column", children: [
|
|
557
|
-
/* @__PURE__ */
|
|
558
|
-
Number(n.totals?.netPayDebit ?? 0) > 0 && /* @__PURE__ */
|
|
566
|
+
/* @__PURE__ */ r(y, { children: t("cancelDialogDescription") }),
|
|
567
|
+
Number(n.totals?.netPayDebit ?? 0) > 0 && /* @__PURE__ */ r(y, { children: t("cancelDialogDescriptionDeadline", {
|
|
559
568
|
deadline: d.formatWithTime(n.payrollDeadline).time
|
|
560
569
|
}) })
|
|
561
570
|
] })
|
|
@@ -565,6 +574,6 @@ const We = (u, C) => u?.startDate && u.endDate ? C.formatPayPeriod(u.startDate,
|
|
|
565
574
|
] }) });
|
|
566
575
|
};
|
|
567
576
|
export {
|
|
568
|
-
|
|
577
|
+
it as PayrollOverviewPresentation
|
|
569
578
|
};
|
|
570
579
|
//# sourceMappingURL=PayrollOverviewPresentation.js.map
|