@gusto/embedded-react-sdk 0.37.0-rc.2 → 0.37.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +11 -11
- package/dist/components/Company/PaySchedule/_parts/Edit.js +6 -6
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +16 -16
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +1 -1
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js +10 -10
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +10 -10
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js +44 -46
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js.map +1 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js +25 -23
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +105 -106
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +54 -54
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.d.ts +2 -1
- package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js +29 -27
- package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js.map +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/index.d.ts +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.d.ts +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js +60 -60
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js +22 -20
- package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +143 -143
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js +10 -10
- package/dist/components/Payroll/helpers.d.ts +1 -0
- package/dist/components/Payroll/helpers.js +71 -69
- package/dist/components/Payroll/helpers.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.d.ts +4 -4
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.js +86 -89
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +38 -34
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollOverview.json.js +62 -58
- package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
- package/dist/types/i18next.d.ts +4 -0
- package/package.json +4 -4
|
@@ -1,92 +1,92 @@
|
|
|
1
|
-
import { jsx as r, jsxs as s, Fragment as
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { getPayrollTypeLabel as
|
|
1
|
+
import { jsx as r, jsxs as s, Fragment as S } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as Pe, Trans as Ce } from "react-i18next";
|
|
3
|
+
import { useState as re, useRef as ke } from "react";
|
|
4
|
+
import { isDismissalPayroll as xe, getPayrollTypeLabel as Se, calculateTotalPayroll as Ne, hasDirectDepositEmployees as we } from "../helpers.js";
|
|
5
5
|
import { PayrollOverviewStatus as h } from "./PayrollOverviewTypes.js";
|
|
6
|
-
import
|
|
6
|
+
import ne from "./PayrollOverviewPresentation.module.scss.js";
|
|
7
7
|
import { Flex as d } from "../../Common/Flex/Flex.js";
|
|
8
|
-
import { Grid as
|
|
9
|
-
import
|
|
10
|
-
import { useComponentContext as
|
|
11
|
-
import { useI18n as
|
|
12
|
-
import { useDateFormatter as
|
|
13
|
-
import
|
|
8
|
+
import { Grid as _e } from "../../Common/Grid/Grid.js";
|
|
9
|
+
import ve from "../../../hooks/useContainerBreakpoints/useContainerBreakpoints.js";
|
|
10
|
+
import { useComponentContext as Le } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
11
|
+
import { useI18n as Ee } from "../../../i18n/I18n.js";
|
|
12
|
+
import { useDateFormatter as Oe } from "../../../hooks/useDateFormatter.js";
|
|
13
|
+
import Ae from "../../../hooks/useNumberFormatter.js";
|
|
14
14
|
import { firstLastName as U } from "../../../helpers/formattedStrings.js";
|
|
15
|
-
import { PAYMENT_METHODS as
|
|
16
|
-
import
|
|
17
|
-
import { PayrollLoading as
|
|
18
|
-
import { FastAchSubmissionBlockerBanner as
|
|
19
|
-
import { GenericBlocker as
|
|
15
|
+
import { PAYMENT_METHODS as Me, FlsaStatus as ie, compensationTypeLabels as N, PAYROLL_RESOLVABLE_SUBMISSION_BLOCKER_TYPES as le } 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 We } from "./SubmissionBlockers/FastAchSubmissionBlockerBanner.js";
|
|
19
|
+
import { GenericBlocker as Ue } from "./SubmissionBlockers/GenericBlocker.js";
|
|
20
20
|
import { DataView as c } from "../../Common/DataView/DataView.js";
|
|
21
|
-
const
|
|
21
|
+
const Ve = (p, w) => p?.startDate && p.endDate ? w.formatPayPeriod(p.startDate, p.endDate) : { startDate: "", endDate: "" }, lt = ({
|
|
22
22
|
onEdit: p,
|
|
23
23
|
onSubmit: w,
|
|
24
|
-
onCancel:
|
|
25
|
-
onPayrollReceipt:
|
|
24
|
+
onCancel: de,
|
|
25
|
+
onPayrollReceipt: me,
|
|
26
26
|
onPaystubDownload: V,
|
|
27
|
-
employeeDetails:
|
|
28
|
-
payrollData:
|
|
27
|
+
employeeDetails: ce,
|
|
28
|
+
payrollData: n,
|
|
29
29
|
bankAccount: Y,
|
|
30
30
|
taxes: _,
|
|
31
31
|
status: g = h.Viewing,
|
|
32
32
|
isProcessed: T,
|
|
33
|
-
canCancel:
|
|
33
|
+
canCancel: ue = !1,
|
|
34
34
|
alerts: B = [],
|
|
35
35
|
submissionBlockers: f = [],
|
|
36
36
|
selectedUnblockOptions: v = {},
|
|
37
37
|
onUnblockOptionChange: I,
|
|
38
|
-
wireInConfirmationRequest:
|
|
39
|
-
withReimbursements:
|
|
40
|
-
paymentSpeed:
|
|
38
|
+
wireInConfirmationRequest: be,
|
|
39
|
+
withReimbursements: D = !0,
|
|
40
|
+
paymentSpeed: ye
|
|
41
41
|
}) => {
|
|
42
|
-
const { Alert: L, Button:
|
|
43
|
-
|
|
44
|
-
const o =
|
|
45
|
-
|
|
42
|
+
const { Alert: L, Button: H, ButtonIcon: R, Dialog: pe, Heading: F, Text: m, Tabs: fe } = Le();
|
|
43
|
+
Ee("Payroll.PayrollOverview");
|
|
44
|
+
const o = Oe(), { t } = Pe("Payroll.PayrollOverview"), i = Ae("currency"), [he, ge] = re("companyPays"), [j, G] = re(!1), E = ke(null), P = ve({ ref: E }).includes("small"), C = g === h.Submitting || g === h.Cancelling, $ = /* @__PURE__ */ r(F, { as: "h1", children: t(T ? "summaryTitle" : "overviewTitle") }), z = xe(n.offCycleReason), K = /* @__PURE__ */ r(m, { children: /* @__PURE__ */ r(
|
|
45
|
+
Ce,
|
|
46
46
|
{
|
|
47
|
-
i18nKey: "pageSubtitle",
|
|
47
|
+
i18nKey: z ? "pageSubtitleDismissal" : "pageSubtitle",
|
|
48
48
|
t,
|
|
49
49
|
components: { dateWrapper: /* @__PURE__ */ r(m, { weight: "bold", as: "span" }) },
|
|
50
50
|
values: {
|
|
51
|
-
...
|
|
52
|
-
payrollType:
|
|
51
|
+
...Ve(n.payPeriod, o),
|
|
52
|
+
payrollType: Se(n)
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
) });
|
|
56
56
|
if (g === h.Cancelled)
|
|
57
|
-
return /* @__PURE__ */ r("div", { ref: E, className:
|
|
57
|
+
return /* @__PURE__ */ r("div", { ref: E, className: ne.container, children: /* @__PURE__ */ s(d, { flexDirection: "column", alignItems: "stretch", children: [
|
|
58
58
|
/* @__PURE__ */ r(d, { justifyContent: "space-between", alignItems: "flex-start", gap: 16, children: /* @__PURE__ */ s(d, { flexDirection: "column", gap: 4, children: [
|
|
59
59
|
$,
|
|
60
|
-
|
|
60
|
+
K
|
|
61
61
|
] }) }),
|
|
62
62
|
/* @__PURE__ */ r(L, { status: "info", label: t("cancelledEmptyState") })
|
|
63
63
|
] }) });
|
|
64
|
-
const k =
|
|
65
|
-
(a,
|
|
64
|
+
const k = Ne(n), Te = n.payrollStatusMeta?.expectedDebitTime ?? n.payrollDeadline, X = (e) => e.taxes?.reduce(
|
|
65
|
+
(a, l) => l.employer ? a + l.amount : a,
|
|
66
66
|
0
|
|
67
|
-
) ?? 0,
|
|
68
|
-
(a,
|
|
67
|
+
) ?? 0, q = (e) => e.benefits?.reduce(
|
|
68
|
+
(a, l) => l.companyContribution ? a + l.companyContribution : a,
|
|
69
69
|
0
|
|
70
70
|
) ?? 0, O = (e) => e.fixedCompensations?.length ? Number(
|
|
71
71
|
e.fixedCompensations.find(
|
|
72
|
-
(a) => a.name?.toLowerCase() ===
|
|
72
|
+
(a) => a.name?.toLowerCase() === N.REIMBURSEMENT_NAME.toLowerCase()
|
|
73
73
|
)?.amount || 0
|
|
74
|
-
) : 0,
|
|
74
|
+
) : 0, De = (e) => e.grossPay + O(e) + X(e) + q(e), u = new Map(ce.map((e) => [e.uuid, e])), A = f.find(
|
|
75
75
|
(e) => e.blockerType === "fast_ach_threshold_exceeded" || e.blockerType === "needs_earned_access_for_fast_ach"
|
|
76
76
|
), M = A ? v[A.blockerType || ""] : void 0, b = A?.unblockOptions?.find(
|
|
77
77
|
(e) => e.unblockType === M
|
|
78
|
-
),
|
|
79
|
-
(a,
|
|
80
|
-
if (typeof
|
|
78
|
+
), J = M === "wire_in", Q = M === "move_to_four_day", x = (e) => e.hourlyCompensations?.reduce(
|
|
79
|
+
(a, l) => {
|
|
80
|
+
if (typeof l.name > "u")
|
|
81
81
|
return a;
|
|
82
|
-
const y =
|
|
83
|
-
return a[y] = W + Number(
|
|
82
|
+
const y = l.name.toLowerCase(), W = a[y] ?? 0;
|
|
83
|
+
return a[y] = W + Number(l.hours || 0), a;
|
|
84
84
|
},
|
|
85
85
|
{}
|
|
86
|
-
) || {},
|
|
87
|
-
(e, a) => !a.excluded && a.paymentMethod ===
|
|
86
|
+
) || {}, Z = (e) => e.paidTimeOff?.reduce((a, l) => a + Number(l.hours || 0), 0) ?? 0, ee = n.employeeCompensations?.reduce(
|
|
87
|
+
(e, a) => !a.excluded && a.paymentMethod === Me.check ? e + 1 : e,
|
|
88
88
|
0
|
|
89
|
-
) ?? 0,
|
|
89
|
+
) ?? 0, te = [
|
|
90
90
|
{
|
|
91
91
|
key: "employeeName",
|
|
92
92
|
title: t("tableHeaders.employees"),
|
|
@@ -98,32 +98,32 @@ const We = (p, w) => p?.startDate && p.endDate ? w.formatPayPeriod(p.startDate,
|
|
|
98
98
|
{
|
|
99
99
|
key: "grossPay",
|
|
100
100
|
title: t("tableHeaders.grossPay"),
|
|
101
|
-
render: (e) =>
|
|
101
|
+
render: (e) => i(e.grossPay)
|
|
102
102
|
},
|
|
103
|
-
...
|
|
103
|
+
...D ? [
|
|
104
104
|
{
|
|
105
105
|
key: "reimbursements",
|
|
106
106
|
title: t("tableHeaders.reimbursements"),
|
|
107
|
-
render: (e) =>
|
|
107
|
+
render: (e) => i(O(e))
|
|
108
108
|
}
|
|
109
109
|
] : [],
|
|
110
110
|
{
|
|
111
111
|
key: "companyTaxes",
|
|
112
112
|
title: t("tableHeaders.companyTaxes"),
|
|
113
|
-
render: (e) =>
|
|
113
|
+
render: (e) => i(X(e))
|
|
114
114
|
},
|
|
115
115
|
{
|
|
116
116
|
key: "companyBenefits",
|
|
117
117
|
title: t("tableHeaders.companyBenefits"),
|
|
118
|
-
render: (e) =>
|
|
118
|
+
render: (e) => i(q(e))
|
|
119
119
|
},
|
|
120
120
|
{
|
|
121
121
|
key: "companyPays",
|
|
122
122
|
title: t("tableHeaders.companyPays"),
|
|
123
|
-
render: (e) =>
|
|
123
|
+
render: (e) => i(De(e))
|
|
124
124
|
}
|
|
125
125
|
];
|
|
126
|
-
T && P &&
|
|
126
|
+
T && P && te.push({
|
|
127
127
|
key: "paystubs",
|
|
128
128
|
title: t("tableHeaders.paystub"),
|
|
129
129
|
render: (e) => /* @__PURE__ */ r(d, { justifyContent: "flex-end", children: /* @__PURE__ */ r(
|
|
@@ -134,7 +134,7 @@ const We = (p, w) => p?.startDate && p.endDate ? w.formatPayPeriod(p.startDate,
|
|
|
134
134
|
onClick: () => {
|
|
135
135
|
e.employeeUuid && V(e.employeeUuid);
|
|
136
136
|
},
|
|
137
|
-
children: /* @__PURE__ */ r(
|
|
137
|
+
children: /* @__PURE__ */ r(oe, {})
|
|
138
138
|
}
|
|
139
139
|
) })
|
|
140
140
|
});
|
|
@@ -146,8 +146,8 @@ const We = (p, w) => p?.startDate && p.endDate ? w.formatPayPeriod(p.startDate,
|
|
|
146
146
|
c,
|
|
147
147
|
{
|
|
148
148
|
label: t("dataViews.companyPaysTable"),
|
|
149
|
-
columns:
|
|
150
|
-
data:
|
|
149
|
+
columns: te,
|
|
150
|
+
data: n.employeeCompensations,
|
|
151
151
|
itemMenu: T && !P ? (e) => /* @__PURE__ */ r(
|
|
152
152
|
R,
|
|
153
153
|
{
|
|
@@ -156,21 +156,21 @@ const We = (p, w) => p?.startDate && p.endDate ? w.formatPayPeriod(p.startDate,
|
|
|
156
156
|
onClick: () => {
|
|
157
157
|
e.employeeUuid && V(e.employeeUuid);
|
|
158
158
|
},
|
|
159
|
-
children: /* @__PURE__ */ r(
|
|
159
|
+
children: /* @__PURE__ */ r(oe, {})
|
|
160
160
|
}
|
|
161
161
|
) : void 0,
|
|
162
162
|
footer: () => ({
|
|
163
|
-
employeeName: /* @__PURE__ */ s(
|
|
163
|
+
employeeName: /* @__PURE__ */ s(S, { children: [
|
|
164
164
|
/* @__PURE__ */ r(m, { weight: "semibold", size: "sm", children: t("tableHeaders.footerTotalsLabel") }),
|
|
165
165
|
/* @__PURE__ */ r(m, { variant: "supporting", size: "sm", children: t("tableHeaders.footerTotalsDescription") })
|
|
166
166
|
] }),
|
|
167
|
-
grossPay:
|
|
168
|
-
...
|
|
169
|
-
reimbursements:
|
|
167
|
+
grossPay: i(Number(n.totals?.grossPay ?? 0)),
|
|
168
|
+
...D ? {
|
|
169
|
+
reimbursements: i(Number(n.totals?.reimbursements ?? 0))
|
|
170
170
|
} : {},
|
|
171
|
-
companyTaxes:
|
|
172
|
-
companyBenefits:
|
|
173
|
-
companyPays:
|
|
171
|
+
companyTaxes: i(Number(n.totals?.employerTaxes ?? 0)),
|
|
172
|
+
companyBenefits: i(Number(n.totals?.benefits ?? 0)),
|
|
173
|
+
companyPays: i(k)
|
|
174
174
|
})
|
|
175
175
|
}
|
|
176
176
|
)
|
|
@@ -192,15 +192,15 @@ const We = (p, w) => p?.startDate && p.endDate ? w.formatPayPeriod(p.startDate,
|
|
|
192
192
|
},
|
|
193
193
|
{
|
|
194
194
|
title: t("tableHeaders.compensationType"),
|
|
195
|
-
render: (e) => u.get(e.employeeUuid)?.jobs?.reduce((a,
|
|
196
|
-
if (
|
|
197
|
-
const y =
|
|
198
|
-
(W) => W.uuid ===
|
|
195
|
+
render: (e) => u.get(e.employeeUuid)?.jobs?.reduce((a, l) => {
|
|
196
|
+
if (l.primary) {
|
|
197
|
+
const y = l.compensations?.find(
|
|
198
|
+
(W) => W.uuid === l.currentCompensationUuid
|
|
199
199
|
)?.flsaStatus;
|
|
200
200
|
switch (y) {
|
|
201
|
-
case
|
|
201
|
+
case ie.EXEMPT:
|
|
202
202
|
return t("compensationTypeLabels.exempt");
|
|
203
|
-
case
|
|
203
|
+
case ie.NONEXEMPT:
|
|
204
204
|
return t("compensationTypeLabels.nonexempt");
|
|
205
205
|
default:
|
|
206
206
|
return y ?? "";
|
|
@@ -211,29 +211,29 @@ const We = (p, w) => p?.startDate && p.endDate ? w.formatPayPeriod(p.startDate,
|
|
|
211
211
|
},
|
|
212
212
|
{
|
|
213
213
|
title: t("tableHeaders.regular"),
|
|
214
|
-
render: (e) => x(e)[
|
|
214
|
+
render: (e) => x(e)[N.REGULAR_HOURS_NAME] || 0
|
|
215
215
|
},
|
|
216
216
|
{
|
|
217
217
|
title: t("tableHeaders.overtime"),
|
|
218
|
-
render: (e) => x(e)[
|
|
218
|
+
render: (e) => x(e)[N.OVERTIME_NAME] || 0
|
|
219
219
|
},
|
|
220
220
|
{
|
|
221
221
|
title: t("tableHeaders.doubleOT"),
|
|
222
|
-
render: (e) => x(e)[
|
|
222
|
+
render: (e) => x(e)[N.DOUBLE_OVERTIME_NAME] || 0
|
|
223
223
|
},
|
|
224
224
|
{
|
|
225
225
|
title: t("tableHeaders.timeOff"),
|
|
226
|
-
render: (e) =>
|
|
226
|
+
render: (e) => Z(e)
|
|
227
227
|
},
|
|
228
228
|
{
|
|
229
229
|
title: t("tableHeaders.totalHours"),
|
|
230
230
|
render: (e) => Object.values(x(e)).reduce(
|
|
231
|
-
(a,
|
|
231
|
+
(a, l) => a + l,
|
|
232
232
|
0
|
|
233
|
-
) +
|
|
233
|
+
) + Z(e)
|
|
234
234
|
}
|
|
235
235
|
],
|
|
236
|
-
data:
|
|
236
|
+
data: n.employeeCompensations
|
|
237
237
|
}
|
|
238
238
|
)
|
|
239
239
|
},
|
|
@@ -258,47 +258,47 @@ const We = (p, w) => p?.startDate && p.endDate ? w.formatPayPeriod(p.startDate,
|
|
|
258
258
|
},
|
|
259
259
|
{
|
|
260
260
|
title: t("tableHeaders.grossPay"),
|
|
261
|
-
render: (e) =>
|
|
261
|
+
render: (e) => i(e.grossPay ?? 0)
|
|
262
262
|
},
|
|
263
263
|
{
|
|
264
264
|
title: t("tableHeaders.deductions"),
|
|
265
|
-
render: (e) =>
|
|
265
|
+
render: (e) => i(
|
|
266
266
|
e.deductions?.reduce(
|
|
267
|
-
(a,
|
|
267
|
+
(a, l) => a + l.amount,
|
|
268
268
|
0
|
|
269
269
|
) ?? 0
|
|
270
270
|
)
|
|
271
271
|
},
|
|
272
|
-
...
|
|
272
|
+
...D ? [
|
|
273
273
|
{
|
|
274
274
|
title: t("tableHeaders.reimbursements"),
|
|
275
|
-
render: (e) =>
|
|
275
|
+
render: (e) => i(O(e))
|
|
276
276
|
}
|
|
277
277
|
] : [],
|
|
278
278
|
{
|
|
279
279
|
title: t("tableHeaders.employeeTaxes"),
|
|
280
|
-
render: (e) =>
|
|
280
|
+
render: (e) => i(
|
|
281
281
|
e.taxes?.reduce(
|
|
282
|
-
(a,
|
|
282
|
+
(a, l) => l.employer ? a : a + l.amount,
|
|
283
283
|
0
|
|
284
284
|
) ?? 0
|
|
285
285
|
)
|
|
286
286
|
},
|
|
287
287
|
{
|
|
288
288
|
title: t("tableHeaders.employeeBenefits"),
|
|
289
|
-
render: (e) =>
|
|
289
|
+
render: (e) => i(
|
|
290
290
|
e.benefits?.reduce(
|
|
291
|
-
(a,
|
|
291
|
+
(a, l) => a + (l.employeeDeduction ?? 0),
|
|
292
292
|
0
|
|
293
293
|
) ?? 0
|
|
294
294
|
)
|
|
295
295
|
},
|
|
296
296
|
{
|
|
297
297
|
title: t("tableHeaders.payment"),
|
|
298
|
-
render: (e) =>
|
|
298
|
+
render: (e) => i(e.netPay ?? 0)
|
|
299
299
|
}
|
|
300
300
|
],
|
|
301
|
-
data:
|
|
301
|
+
data: n.employeeCompensations
|
|
302
302
|
}
|
|
303
303
|
)
|
|
304
304
|
},
|
|
@@ -319,18 +319,18 @@ const We = (p, w) => p?.startDate && p.endDate ? w.formatPayPeriod(p.startDate,
|
|
|
319
319
|
{
|
|
320
320
|
key: "byYourEmployees",
|
|
321
321
|
title: t("tableHeaders.byYourEmployees"),
|
|
322
|
-
render: (e) =>
|
|
322
|
+
render: (e) => i(_[e]?.employee ?? 0)
|
|
323
323
|
},
|
|
324
324
|
{
|
|
325
325
|
key: "byYourCompany",
|
|
326
326
|
title: t("tableHeaders.byYourCompany"),
|
|
327
|
-
render: (e) =>
|
|
327
|
+
render: (e) => i(_[e]?.employer ?? 0)
|
|
328
328
|
}
|
|
329
329
|
],
|
|
330
330
|
footer: () => ({
|
|
331
331
|
taxDescription: /* @__PURE__ */ r(m, { weight: "semibold", size: "sm", children: t("totalsLabel") }),
|
|
332
|
-
byYourEmployees:
|
|
333
|
-
byYourCompany:
|
|
332
|
+
byYourEmployees: i(Number(n.totals?.employeeTaxes ?? 0)),
|
|
333
|
+
byYourCompany: i(Number(n.totals?.employerTaxes ?? 0))
|
|
334
334
|
}),
|
|
335
335
|
data: Object.keys(_)
|
|
336
336
|
}
|
|
@@ -346,31 +346,31 @@ const We = (p, w) => p?.startDate && p.endDate ? w.formatPayPeriod(p.startDate,
|
|
|
346
346
|
},
|
|
347
347
|
{
|
|
348
348
|
title: t("tableHeaders.taxesTotal"),
|
|
349
|
-
render: ({ value: e }) =>
|
|
349
|
+
render: ({ value: e }) => i(Number(e))
|
|
350
350
|
}
|
|
351
351
|
],
|
|
352
352
|
data: [
|
|
353
|
-
{ label: t("directDepositLabel"), value:
|
|
354
|
-
...
|
|
353
|
+
{ label: t("directDepositLabel"), value: n.totals?.netPayDebit || "0" },
|
|
354
|
+
...D ? [
|
|
355
355
|
{
|
|
356
356
|
label: t("reimbursementLabel"),
|
|
357
|
-
value:
|
|
357
|
+
value: n.totals?.reimbursementDebit || "0"
|
|
358
358
|
}
|
|
359
359
|
] : [],
|
|
360
360
|
{
|
|
361
361
|
label: t("garnishmentsLabel"),
|
|
362
|
-
value:
|
|
362
|
+
value: n.totals?.childSupportDebit || "0"
|
|
363
363
|
},
|
|
364
|
-
{ label: t("taxesLabel"), value:
|
|
364
|
+
{ label: t("taxesLabel"), value: n.totals?.taxDebit || "0" }
|
|
365
365
|
]
|
|
366
366
|
}
|
|
367
367
|
)
|
|
368
368
|
] })
|
|
369
369
|
}
|
|
370
|
-
],
|
|
371
|
-
/* @__PURE__ */ r(
|
|
372
|
-
|
|
373
|
-
|
|
370
|
+
], ae = T ? /* @__PURE__ */ s(S, { children: [
|
|
371
|
+
/* @__PURE__ */ r(H, { onClick: me, variant: "secondary", isDisabled: C, children: t("payrollReceiptCta") }),
|
|
372
|
+
ue && /* @__PURE__ */ r(
|
|
373
|
+
H,
|
|
374
374
|
{
|
|
375
375
|
onClick: () => {
|
|
376
376
|
G(!0);
|
|
@@ -380,10 +380,10 @@ const We = (p, w) => p?.startDate && p.endDate ? w.formatPayPeriod(p.startDate,
|
|
|
380
380
|
children: t("cancelCta")
|
|
381
381
|
}
|
|
382
382
|
)
|
|
383
|
-
] }) : /* @__PURE__ */ s(
|
|
384
|
-
/* @__PURE__ */ r(
|
|
383
|
+
] }) : /* @__PURE__ */ s(S, { children: [
|
|
384
|
+
/* @__PURE__ */ r(H, { onClick: p, variant: "secondary", isDisabled: C, children: t("editCta") }),
|
|
385
385
|
/* @__PURE__ */ r(
|
|
386
|
-
|
|
386
|
+
H,
|
|
387
387
|
{
|
|
388
388
|
onClick: w,
|
|
389
389
|
isDisabled: C || f.length > 0 && (f.some(
|
|
@@ -395,17 +395,17 @@ const We = (p, w) => p?.startDate && p.endDate ? w.formatPayPeriod(p.startDate,
|
|
|
395
395
|
}
|
|
396
396
|
)
|
|
397
397
|
] });
|
|
398
|
-
return /* @__PURE__ */ r("div", { ref: E, className:
|
|
398
|
+
return /* @__PURE__ */ r("div", { ref: E, className: ne.container, children: /* @__PURE__ */ s(d, { flexDirection: "column", alignItems: "stretch", children: [
|
|
399
399
|
/* @__PURE__ */ s(d, { justifyContent: "space-between", alignItems: "flex-start", gap: 16, children: [
|
|
400
400
|
/* @__PURE__ */ s(d, { flexDirection: "column", gap: 4, children: [
|
|
401
401
|
$,
|
|
402
|
-
|
|
402
|
+
K
|
|
403
403
|
] }),
|
|
404
|
-
P && /* @__PURE__ */ r(d, { gap: 8, justifyContent: "flex-end", children:
|
|
404
|
+
P && /* @__PURE__ */ r(d, { gap: 8, justifyContent: "flex-end", children: ae })
|
|
405
405
|
] }),
|
|
406
|
-
!P && /* @__PURE__ */ r(
|
|
407
|
-
g === h.Cancelling ? /* @__PURE__ */ r(
|
|
408
|
-
|
|
406
|
+
!P && /* @__PURE__ */ r(_e, { gridTemplateColumns: "1fr", gap: 8, children: ae }),
|
|
407
|
+
g === h.Cancelling ? /* @__PURE__ */ r(se, { title: t("cancellingTitle") }) : g === h.Submitting ? /* @__PURE__ */ r(se, { title: t("loadingTitle"), description: t("loadingDescription") }) : /* @__PURE__ */ s(S, { children: [
|
|
408
|
+
be,
|
|
409
409
|
B.length > 0 && /* @__PURE__ */ r(d, { flexDirection: "column", gap: 16, children: B.map((e, a) => /* @__PURE__ */ r(
|
|
410
410
|
L,
|
|
411
411
|
{
|
|
@@ -419,38 +419,38 @@ const We = (p, w) => p?.startDate && p.endDate ? w.formatPayPeriod(p.startDate,
|
|
|
419
419
|
f.length > 0 && I && f.map((e) => {
|
|
420
420
|
const a = e.blockerType || "";
|
|
421
421
|
return le.includes(a) ? /* @__PURE__ */ r(
|
|
422
|
-
|
|
422
|
+
We,
|
|
423
423
|
{
|
|
424
424
|
blocker: e,
|
|
425
425
|
selectedValue: v[a],
|
|
426
426
|
onUnblockOptionChange: I,
|
|
427
|
-
paymentSpeed:
|
|
427
|
+
paymentSpeed: ye
|
|
428
428
|
},
|
|
429
429
|
a
|
|
430
|
-
) : /* @__PURE__ */ r(
|
|
430
|
+
) : /* @__PURE__ */ r(Ue, { blocker: e }, a);
|
|
431
431
|
}),
|
|
432
|
-
/* @__PURE__ */ r(F, { as: "h3", children: t(
|
|
433
|
-
|
|
432
|
+
/* @__PURE__ */ r(F, { as: "h3", children: t(J ? "payrollSummaryTitleWire" : Q ? "payrollSummaryTitleFourDay" : "payrollSummaryTitle") }),
|
|
433
|
+
J ? /* @__PURE__ */ r(
|
|
434
434
|
c,
|
|
435
435
|
{
|
|
436
436
|
label: t("payrollSummaryLabel"),
|
|
437
437
|
columns: [
|
|
438
438
|
{
|
|
439
439
|
title: t("tableHeaders.totalPayroll"),
|
|
440
|
-
render: () =>
|
|
440
|
+
render: () => i(k)
|
|
441
441
|
},
|
|
442
442
|
{
|
|
443
443
|
title: t("tableHeaders.wireAmount"),
|
|
444
444
|
render: () => {
|
|
445
445
|
const a = b?.metadata?.wire_in_amount;
|
|
446
|
-
return a ?
|
|
446
|
+
return a ? i(Number(a)) : "-";
|
|
447
447
|
}
|
|
448
448
|
},
|
|
449
449
|
{
|
|
450
450
|
title: t("tableHeaders.wireTransferDeadline"),
|
|
451
451
|
render: () => {
|
|
452
|
-
const a = b?.metadata?.wire_in_deadline,
|
|
453
|
-
return a ? `${
|
|
452
|
+
const a = b?.metadata?.wire_in_deadline, l = o.formatWithTime(a), y = o.formatShortWithYear(a);
|
|
453
|
+
return a ? `${l.time} on ${y}` : "-";
|
|
454
454
|
}
|
|
455
455
|
},
|
|
456
456
|
{
|
|
@@ -460,20 +460,20 @@ const We = (p, w) => p?.startDate && p.endDate ? w.formatPayPeriod(p.startDate,
|
|
|
460
460
|
],
|
|
461
461
|
data: [{}]
|
|
462
462
|
}
|
|
463
|
-
) :
|
|
463
|
+
) : Q ? /* @__PURE__ */ r(
|
|
464
464
|
c,
|
|
465
465
|
{
|
|
466
466
|
label: t("payrollSummaryLabel"),
|
|
467
467
|
columns: [
|
|
468
468
|
{
|
|
469
469
|
title: t("tableHeaders.totalPayroll"),
|
|
470
|
-
render: () =>
|
|
470
|
+
render: () => i(k)
|
|
471
471
|
},
|
|
472
472
|
{
|
|
473
473
|
title: t("tableHeaders.debitAmount"),
|
|
474
474
|
render: () => {
|
|
475
|
-
const e =
|
|
476
|
-
return
|
|
475
|
+
const e = n.totals?.companyDebit;
|
|
476
|
+
return i(Number(e ?? 0));
|
|
477
477
|
}
|
|
478
478
|
},
|
|
479
479
|
{
|
|
@@ -501,11 +501,11 @@ const We = (p, w) => p?.startDate && p.endDate ? w.formatPayPeriod(p.startDate,
|
|
|
501
501
|
columns: [
|
|
502
502
|
{
|
|
503
503
|
title: t("tableHeaders.totalPayroll"),
|
|
504
|
-
render: () =>
|
|
504
|
+
render: () => i(k)
|
|
505
505
|
},
|
|
506
506
|
{
|
|
507
507
|
title: t("tableHeaders.debitAmount"),
|
|
508
|
-
render: () =>
|
|
508
|
+
render: () => i(Number(n.totals?.companyDebit ?? 0))
|
|
509
509
|
},
|
|
510
510
|
{
|
|
511
511
|
title: t("tableHeaders.debitAccount"),
|
|
@@ -513,53 +513,53 @@ const We = (p, w) => p?.startDate && p.endDate ? w.formatPayPeriod(p.startDate,
|
|
|
513
513
|
},
|
|
514
514
|
{
|
|
515
515
|
title: t("tableHeaders.debitDate"),
|
|
516
|
-
render: () => o.formatShortWithYear(
|
|
516
|
+
render: () => o.formatShortWithYear(Te)
|
|
517
517
|
},
|
|
518
518
|
{
|
|
519
519
|
title: t("tableHeaders.employeePayDate"),
|
|
520
|
-
render: () => o.formatShortWithYear(
|
|
520
|
+
render: () => o.formatShortWithYear(n.checkDate)
|
|
521
521
|
}
|
|
522
522
|
],
|
|
523
523
|
data: [{}]
|
|
524
524
|
}
|
|
525
525
|
),
|
|
526
|
-
|
|
526
|
+
ee > 0 && /* @__PURE__ */ r(
|
|
527
527
|
L,
|
|
528
528
|
{
|
|
529
529
|
status: "warning",
|
|
530
|
-
label: t("alerts.checkPaymentWarning", { count:
|
|
530
|
+
label: t("alerts.checkPaymentWarning", { count: ee }),
|
|
531
531
|
children: /* @__PURE__ */ r(m, { children: t("alerts.checkPaymentWarningDescription") })
|
|
532
532
|
}
|
|
533
533
|
),
|
|
534
534
|
/* @__PURE__ */ r(
|
|
535
|
-
|
|
535
|
+
fe,
|
|
536
536
|
{
|
|
537
|
-
onSelectionChange:
|
|
538
|
-
selectedId:
|
|
537
|
+
onSelectionChange: ge,
|
|
538
|
+
selectedId: he,
|
|
539
539
|
"aria-label": t("dataViews.label"),
|
|
540
540
|
tabs: He
|
|
541
541
|
}
|
|
542
542
|
),
|
|
543
543
|
j && /* @__PURE__ */ r(
|
|
544
|
-
|
|
544
|
+
pe,
|
|
545
545
|
{
|
|
546
546
|
isOpen: j,
|
|
547
547
|
onClose: () => {
|
|
548
548
|
G(!1);
|
|
549
549
|
},
|
|
550
|
-
onPrimaryActionClick:
|
|
550
|
+
onPrimaryActionClick: de,
|
|
551
551
|
shouldCloseOnBackdropClick: !0,
|
|
552
552
|
primaryActionLabel: t("confirmCancelCta"),
|
|
553
553
|
isDestructive: !0,
|
|
554
554
|
closeActionLabel: t("declineCancelCta"),
|
|
555
|
-
title: t("cancelDialogTitle", {
|
|
556
|
-
startDate: o.formatLong(
|
|
557
|
-
endDate: o.formatLongWithYear(
|
|
555
|
+
title: t(z ? "cancelDialogTitleDismissal" : "cancelDialogTitle", {
|
|
556
|
+
startDate: o.formatLong(n.payPeriod?.startDate),
|
|
557
|
+
endDate: o.formatLongWithYear(n.payPeriod?.endDate)
|
|
558
558
|
}),
|
|
559
559
|
children: /* @__PURE__ */ s(d, { gap: 14, flexDirection: "column", children: [
|
|
560
560
|
/* @__PURE__ */ r(m, { children: t("cancelDialogDescription") }),
|
|
561
|
-
|
|
562
|
-
deadline: o.formatWithTime(
|
|
561
|
+
we(n.employeeCompensations) && /* @__PURE__ */ r(m, { children: t("cancelDialogDescriptionDeadline", {
|
|
562
|
+
deadline: o.formatWithTime(n.payrollDeadline).time
|
|
563
563
|
}) })
|
|
564
564
|
] })
|
|
565
565
|
}
|
|
@@ -568,6 +568,6 @@ const We = (p, w) => p?.startDate && p.endDate ? w.formatPayPeriod(p.startDate,
|
|
|
568
568
|
] }) });
|
|
569
569
|
};
|
|
570
570
|
export {
|
|
571
|
-
|
|
571
|
+
lt as PayrollOverviewPresentation
|
|
572
572
|
};
|
|
573
573
|
//# sourceMappingURL=PayrollOverviewPresentation.js.map
|