@gusto/embedded-react-sdk 0.16.0 → 0.17.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 +19 -0
- package/dist/components/Common/EmptyData/EmptyData.js +10 -10
- package/dist/components/Common/EmptyData/EmptyData.js.map +1 -1
- package/dist/components/Common/EmptyData/EmptyData.module.scss.js +5 -3
- package/dist/components/Common/EmptyData/EmptyData.module.scss.js.map +1 -1
- package/dist/components/Common/FieldDescription/FieldDescription.module.scss.js +1 -1
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js +21 -19
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureForm.js +4 -3
- package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +8 -7
- package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +9 -8
- package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +32 -18
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js.map +1 -1
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.module.scss.js +12 -12
- package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.d.ts +14 -0
- package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.js +8 -0
- package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.js.map +1 -0
- package/dist/components/Common/UI/DescriptionList/DescriptionList.d.ts +2 -0
- package/dist/components/Common/UI/DescriptionList/DescriptionList.js +16 -0
- package/dist/components/Common/UI/DescriptionList/DescriptionList.js.map +1 -0
- package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js +10 -0
- package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js.map +1 -0
- package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.d.ts +10 -0
- package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.js +5 -0
- package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.js.map +1 -0
- package/dist/components/Common/UI/DescriptionList/index.d.ts +3 -0
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +3 -2
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +3 -2
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +3 -2
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +6 -6
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +9 -8
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/AccountView.js +22 -17
- package/dist/components/Company/BankAccount/BankAccountList/AccountView.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +9 -8
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +8 -7
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +5 -4
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +3 -2
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +1 -1
- package/dist/components/Company/FederalTaxes/Actions.js +6 -5
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +3 -2
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/Industry/Actions.js +3 -2
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Edit.js +5 -4
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +7 -6
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +2 -2
- package/dist/components/Company/Locations/LocationsList/Actions.js +7 -6
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +7 -6
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.js +11 -10
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +7 -6
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +2 -2
- package/dist/components/Company/PaySchedule/_parts/Actions.js +10 -9
- package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Head.js +7 -6
- package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +12 -11
- package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +3 -2
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +3 -2
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +3 -2
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
- package/dist/components/Contractor/Address/Address.js +2 -2
- package/dist/components/Contractor/ContractorList/index.js +17 -17
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +5 -4
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +1 -1
- package/dist/components/Employee/Compensation/Actions.js +1 -1
- package/dist/components/Employee/Compensation/List.js +23 -22
- package/dist/components/Employee/Compensation/List.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +1 -1
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +7 -6
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js +3 -2
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +1 -1
- package/dist/components/Employee/EmployeeList/Actions.js +3 -2
- package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.js +4 -3
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Head.js +6 -5
- package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
- package/dist/components/Employee/EmployeeList/List.js +10 -10
- package/dist/components/Employee/FederalTaxes/Actions.js +7 -6
- package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalForm.js +11 -10
- package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.js +8 -8
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
- package/dist/components/Employee/PaymentMethod/Actions.js +6 -5
- package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +9 -8
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentMethod.d.ts +1 -0
- package/dist/components/Employee/PaymentMethod/PaymentMethod.js +79 -78
- package/dist/components/Employee/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +11 -11
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +1 -1
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.d.ts +1 -0
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/Actions.js +7 -6
- package/dist/components/Employee/Profile/Actions.js.map +1 -1
- package/dist/components/Employee/StateTaxes/Actions.js +8 -7
- package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/Actions.js +9 -8
- package/dist/components/Employee/Taxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +9 -8
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Flow/Flow.js +11 -10
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +3 -2
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +7 -6
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +88 -77
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +5 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +88 -84
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +3 -2
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +3 -2
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +3 -2
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +34 -34
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +3 -2
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +29 -27
- 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/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +3 -2
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/helpers/dateFormatting.d.ts +4 -0
- package/dist/helpers/dateFormatting.js +30 -14
- package/dist/helpers/dateFormatting.js.map +1 -1
- package/dist/i18n/en/Employee.PaymentMethod.json.js +70 -66
- package/dist/i18n/en/Employee.PaymentMethod.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +17 -17
- package/dist/i18n/en/Payroll.PayrollOverview.json.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +4 -0
- package/package.json +3 -3
|
@@ -4,13 +4,13 @@ import { useState as w } from "react";
|
|
|
4
4
|
import B from "./List.module.scss.js";
|
|
5
5
|
import { useEmployeeList as M } from "./useEmployeeList.js";
|
|
6
6
|
import "classnames";
|
|
7
|
-
import {
|
|
7
|
+
import { EmployeeOnboardingStatus as i, EmployeeSelfOnboardingStatuses as y } from "../../../shared/constants.js";
|
|
8
|
+
import { EmptyData as G } from "../../Common/EmptyData/EmptyData.js";
|
|
8
9
|
import { ActionsLayout as h } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
9
|
-
import { useComponentContext as
|
|
10
|
-
import { EmployeeOnboardingStatusBadge as
|
|
10
|
+
import { useComponentContext as R } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
11
|
+
import { EmployeeOnboardingStatusBadge as F } from "../../Common/OnboardingStatusBadge/index.js";
|
|
11
12
|
import s from "../../../assets/icons/pencil.svg.js";
|
|
12
|
-
import
|
|
13
|
-
import { EmployeeOnboardingStatus as i, EmployeeSelfOnboardingStatuses as x } from "../../../shared/constants.js";
|
|
13
|
+
import x from "../../../assets/icons/trashcan.svg.js";
|
|
14
14
|
import { firstLastName as V } from "../../../helpers/formattedStrings.js";
|
|
15
15
|
import { HamburgerMenu as j } from "../../Common/HamburgerMenu/HamburgerMenu.js";
|
|
16
16
|
import { useDataView as W } from "../../Common/DataView/useDataView.js";
|
|
@@ -33,7 +33,7 @@ const st = () => {
|
|
|
33
33
|
itemsPerPage: _,
|
|
34
34
|
handleSkip: D,
|
|
35
35
|
isFetching: I
|
|
36
|
-
} = M(), r =
|
|
36
|
+
} = M(), r = R(), { t: e } = k("Employee.EmployeeList"), [v, u] = w(/* @__PURE__ */ new Set()), { ...A } = W({
|
|
37
37
|
data: d,
|
|
38
38
|
columns: [
|
|
39
39
|
{
|
|
@@ -48,7 +48,7 @@ const st = () => {
|
|
|
48
48
|
key: "status",
|
|
49
49
|
title: e("statusLabel"),
|
|
50
50
|
render: ({ onboarded: t, onboardingStatus: n }) => /* @__PURE__ */ a(
|
|
51
|
-
|
|
51
|
+
F,
|
|
52
52
|
{
|
|
53
53
|
onboarded: t,
|
|
54
54
|
onboardingStatus: n
|
|
@@ -64,7 +64,7 @@ const st = () => {
|
|
|
64
64
|
p(t.uuid, t.onboardingStatus ?? void 0);
|
|
65
65
|
},
|
|
66
66
|
icon: /* @__PURE__ */ a(s, { "aria-hidden": !0 })
|
|
67
|
-
}),
|
|
67
|
+
}), y.has(t.onboarding_status ?? "") && n.push({
|
|
68
68
|
label: e("cancelSelfOnboardingCta"),
|
|
69
69
|
onClick: async () => {
|
|
70
70
|
await b(t.uuid);
|
|
@@ -86,7 +86,7 @@ const st = () => {
|
|
|
86
86
|
});
|
|
87
87
|
});
|
|
88
88
|
},
|
|
89
|
-
icon: /* @__PURE__ */ a(
|
|
89
|
+
icon: /* @__PURE__ */ a(x, { "aria-hidden": !0 })
|
|
90
90
|
}), /* @__PURE__ */ a(
|
|
91
91
|
j,
|
|
92
92
|
{
|
|
@@ -107,7 +107,7 @@ const st = () => {
|
|
|
107
107
|
totalPages: P,
|
|
108
108
|
itemsPerPage: _
|
|
109
109
|
},
|
|
110
|
-
emptyState: () => /* @__PURE__ */ a(
|
|
110
|
+
emptyState: () => /* @__PURE__ */ a(G, { title: e("emptyTableTitle"), description: e("emptyTableDescription"), children: /* @__PURE__ */ c(h, { justifyContent: "center", children: [
|
|
111
111
|
/* @__PURE__ */ a(r.Button, { variant: "secondary", onClick: D, children: e("skipCta") }),
|
|
112
112
|
/* @__PURE__ */ a(r.Button, { variant: "primary", onClick: l, children: e("addEmployeeCTA") })
|
|
113
113
|
] }) })
|
|
@@ -2,13 +2,14 @@ import { jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import { useTranslation as r } from "react-i18next";
|
|
3
3
|
import { useFederalTaxes as i } from "./useFederalTaxes.js";
|
|
4
4
|
import "classnames";
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
import "../../../shared/constants.js";
|
|
6
|
+
import { ActionsLayout as m } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
7
|
+
import { useComponentContext as s } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
|
+
function x() {
|
|
9
|
+
const { t } = r("Employee.FederalTaxes"), { isPending: n } = i(), e = s();
|
|
10
|
+
return /* @__PURE__ */ o(m, { children: /* @__PURE__ */ o(e.Button, { type: "submit", isLoading: n, children: t("submitCta") }) });
|
|
10
11
|
}
|
|
11
12
|
export {
|
|
12
|
-
|
|
13
|
+
x as Actions
|
|
13
14
|
};
|
|
14
15
|
//# sourceMappingURL=Actions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/FederalTaxes/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useFederalTaxes } from './useFederalTaxes'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Employee.FederalTaxes')\n const { isPending } = useFederalTaxes()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('submitCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","isPending","useFederalTaxes","Components","useComponentContext","jsx","ActionsLayout"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/FederalTaxes/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useFederalTaxes } from './useFederalTaxes'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Employee.FederalTaxes')\n const { isPending } = useFederalTaxes()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('submitCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","isPending","useFederalTaxes","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,EAAA,IAAMC,EAAe,uBAAuB,GAC9C,EAAE,WAAAC,EAAA,IAAcC,EAAA,GAChBC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACF,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GACzC,UAAA,EAAE,WAAW,GAChB,GACF;AAEJ;"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { jsxs as l, Fragment as a, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation as s, Trans as
|
|
2
|
+
import { useTranslation as s, Trans as m } from "react-i18next";
|
|
3
3
|
import { z as i } from "zod";
|
|
4
4
|
import "classnames";
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
5
|
+
import "../../../shared/constants.js";
|
|
6
|
+
import { useComponentContext as u } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
|
+
import { SelectField as d } from "../../Common/Fields/SelectField/SelectField.js";
|
|
7
8
|
import { RadioGroupField as f } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
|
|
8
9
|
import { NumberInputField as t } from "../../Common/Fields/NumberInputField/NumberInputField.js";
|
|
9
|
-
const
|
|
10
|
+
const q = i.object({
|
|
10
11
|
filingStatus: i.string().min(1),
|
|
11
12
|
twoJobs: i.string().min(1),
|
|
12
13
|
dependentsAmount: i.number().transform(String),
|
|
@@ -15,8 +16,8 @@ const R = i.object({
|
|
|
15
16
|
extraWithholding: i.number().transform(String),
|
|
16
17
|
w4DataType: i.enum(["pre_2020_w4", "rev_2020_w4"])
|
|
17
18
|
});
|
|
18
|
-
function
|
|
19
|
-
const { t: e } = s("Employee.FederalTaxes"), o =
|
|
19
|
+
function v() {
|
|
20
|
+
const { t: e } = s("Employee.FederalTaxes"), o = u(), n = [
|
|
20
21
|
{ value: "Single", label: e("filingStatusSingle") },
|
|
21
22
|
{ value: "Married", label: e("filingStatusMarried") },
|
|
22
23
|
{ value: "Head of Household", label: e("filingStatusHeadOfHousehold") },
|
|
@@ -24,7 +25,7 @@ function q() {
|
|
|
24
25
|
];
|
|
25
26
|
return /* @__PURE__ */ l(a, { children: [
|
|
26
27
|
/* @__PURE__ */ r(
|
|
27
|
-
|
|
28
|
+
d,
|
|
28
29
|
{
|
|
29
30
|
name: "filingStatus",
|
|
30
31
|
label: e("federalFilingStatus1c"),
|
|
@@ -43,7 +44,7 @@ function q() {
|
|
|
43
44
|
label: e("multipleJobs2c"),
|
|
44
45
|
errorMessage: e("validations.federalTwoJobs"),
|
|
45
46
|
description: /* @__PURE__ */ r(
|
|
46
|
-
|
|
47
|
+
m,
|
|
47
48
|
{
|
|
48
49
|
i18nKey: "includesSpouseExplanation",
|
|
49
50
|
t: e,
|
|
@@ -103,7 +104,7 @@ function q() {
|
|
|
103
104
|
] });
|
|
104
105
|
}
|
|
105
106
|
export {
|
|
106
|
-
|
|
107
|
-
|
|
107
|
+
v as FederalForm,
|
|
108
|
+
q as FederalFormSchema
|
|
108
109
|
};
|
|
109
110
|
//# sourceMappingURL=FederalForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FederalForm.js","sources":["../../../../src/components/Employee/FederalTaxes/FederalForm.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { z } from 'zod'\nimport { SelectField, RadioGroupField, NumberInputField } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const FederalFormSchema = z.object({\n filingStatus: z.string().min(1),\n twoJobs: z.string().min(1),\n dependentsAmount: z.number().transform(String),\n otherIncome: z.number().transform(String),\n deductions: z.number().transform(String),\n extraWithholding: z.number().transform(String),\n w4DataType: z.enum(['pre_2020_w4', 'rev_2020_w4']),\n})\n\nexport type FederalFormInputs = z.input<typeof FederalFormSchema>\nexport type FederalFormPayload = z.output<typeof FederalFormSchema>\n\nexport function FederalForm() {\n const { t } = useTranslation('Employee.FederalTaxes')\n const Components = useComponentContext()\n\n const filingStatusCategories = [\n { value: 'Single', label: t('filingStatusSingle') },\n { value: 'Married', label: t('filingStatusMarried') },\n { value: 'Head of Household', label: t('filingStatusHeadOfHousehold') },\n { value: 'Exempt from withholding', label: t('filingStatusExemptFromWithholding') },\n ]\n\n return (\n <>\n <SelectField\n name=\"filingStatus\"\n label={t('federalFilingStatus1c')}\n placeholder={t('federalFillingStatusPlaceholder')}\n description={t('selectWithholdingDescription')}\n options={filingStatusCategories}\n isRequired\n errorMessage={t('validations.federalFilingStatus')}\n />\n <RadioGroupField\n name=\"twoJobs\"\n isRequired\n label={t('multipleJobs2c')}\n errorMessage={t('validations.federalTwoJobs')}\n description={\n <Trans\n i18nKey={'includesSpouseExplanation'}\n t={t}\n components={{\n irs_link: <Components.Link />,\n }}\n />\n }\n options={[\n { value: 'true', label: t('twoJobYesLabel') },\n { value: 'false', label: t('twoJobNoLabel') },\n ]}\n />\n <NumberInputField\n name=\"dependentsAmount\"\n isRequired\n label={t('dependentsTotalIfApplicable')}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"otherIncome\"\n isRequired\n label={t('otherIncome')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"deductions\"\n isRequired\n label={t('deductions')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"extraWithholding\"\n isRequired\n label={t('extraWithholding')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n </>\n )\n}\n"],"names":["FederalFormSchema","z","FederalForm","t","useTranslation","Components","useComponentContext","filingStatusCategories","jsxs","Fragment","jsx","SelectField","RadioGroupField","Trans","NumberInputField"],"mappings":"
|
|
1
|
+
{"version":3,"file":"FederalForm.js","sources":["../../../../src/components/Employee/FederalTaxes/FederalForm.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { z } from 'zod'\nimport { SelectField, RadioGroupField, NumberInputField } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const FederalFormSchema = z.object({\n filingStatus: z.string().min(1),\n twoJobs: z.string().min(1),\n dependentsAmount: z.number().transform(String),\n otherIncome: z.number().transform(String),\n deductions: z.number().transform(String),\n extraWithholding: z.number().transform(String),\n w4DataType: z.enum(['pre_2020_w4', 'rev_2020_w4']),\n})\n\nexport type FederalFormInputs = z.input<typeof FederalFormSchema>\nexport type FederalFormPayload = z.output<typeof FederalFormSchema>\n\nexport function FederalForm() {\n const { t } = useTranslation('Employee.FederalTaxes')\n const Components = useComponentContext()\n\n const filingStatusCategories = [\n { value: 'Single', label: t('filingStatusSingle') },\n { value: 'Married', label: t('filingStatusMarried') },\n { value: 'Head of Household', label: t('filingStatusHeadOfHousehold') },\n { value: 'Exempt from withholding', label: t('filingStatusExemptFromWithholding') },\n ]\n\n return (\n <>\n <SelectField\n name=\"filingStatus\"\n label={t('federalFilingStatus1c')}\n placeholder={t('federalFillingStatusPlaceholder')}\n description={t('selectWithholdingDescription')}\n options={filingStatusCategories}\n isRequired\n errorMessage={t('validations.federalFilingStatus')}\n />\n <RadioGroupField\n name=\"twoJobs\"\n isRequired\n label={t('multipleJobs2c')}\n errorMessage={t('validations.federalTwoJobs')}\n description={\n <Trans\n i18nKey={'includesSpouseExplanation'}\n t={t}\n components={{\n irs_link: <Components.Link />,\n }}\n />\n }\n options={[\n { value: 'true', label: t('twoJobYesLabel') },\n { value: 'false', label: t('twoJobNoLabel') },\n ]}\n />\n <NumberInputField\n name=\"dependentsAmount\"\n isRequired\n label={t('dependentsTotalIfApplicable')}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"otherIncome\"\n isRequired\n label={t('otherIncome')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"deductions\"\n isRequired\n label={t('deductions')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"extraWithholding\"\n isRequired\n label={t('extraWithholding')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n </>\n )\n}\n"],"names":["FederalFormSchema","z","FederalForm","t","useTranslation","Components","useComponentContext","filingStatusCategories","jsxs","Fragment","jsx","SelectField","RadioGroupField","Trans","NumberInputField"],"mappings":"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"}
|
|
@@ -7,15 +7,15 @@ import { BaseComponent as x } from "../../Base/Base.js";
|
|
|
7
7
|
import { useBase as y } from "../../Base/useBase.js";
|
|
8
8
|
import { Flex as r } from "../../Common/Flex/Flex.js";
|
|
9
9
|
import "classnames";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
10
|
+
import { componentEvents as E } from "../../../shared/constants.js";
|
|
11
|
+
import { ActionsLayout as C } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
12
|
+
import { useComponentContext as D } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
13
|
+
import { useI18n as I, useComponentDictionary as S } from "../../../i18n/I18n.js";
|
|
14
14
|
function H(t) {
|
|
15
|
-
return
|
|
15
|
+
return I("Employee.Landing"), S("Employee.Landing", t.dictionary), /* @__PURE__ */ e(x, { ...t, children: /* @__PURE__ */ e(L, { ...t, children: t.children }) });
|
|
16
16
|
}
|
|
17
17
|
const L = ({ employeeId: t, companyId: c, className: m }) => {
|
|
18
|
-
const { onEvent: l } = y(), o =
|
|
18
|
+
const { onEvent: l } = y(), o = D(), {
|
|
19
19
|
data: { employee: a }
|
|
20
20
|
} = h({ employeeId: t }), p = a.firstName, {
|
|
21
21
|
data: { company: d }
|
|
@@ -34,12 +34,12 @@ const L = ({ employeeId: t, companyId: c, className: m }) => {
|
|
|
34
34
|
] })
|
|
35
35
|
] }),
|
|
36
36
|
/* @__PURE__ */ i(r, { flexDirection: "column", alignItems: "center", gap: 8, children: [
|
|
37
|
-
/* @__PURE__ */ e(
|
|
37
|
+
/* @__PURE__ */ e(C, { justifyContent: "center", children: /* @__PURE__ */ e(
|
|
38
38
|
o.Button,
|
|
39
39
|
{
|
|
40
40
|
variant: "secondary",
|
|
41
41
|
onClick: () => {
|
|
42
|
-
l(
|
|
42
|
+
l(E.EMPLOYEE_SELF_ONBOARDING_START);
|
|
43
43
|
},
|
|
44
44
|
children: n("getStartedCta")
|
|
45
45
|
}
|
|
@@ -9,10 +9,10 @@ import r from "./OnboardingSummary.module.scss.js";
|
|
|
9
9
|
import { BaseComponent as P } from "../../Base/Base.js";
|
|
10
10
|
import { useBase as R } from "../../Base/useBase.js";
|
|
11
11
|
import { Flex as d } from "../../Common/Flex/Flex.js";
|
|
12
|
-
import {
|
|
12
|
+
import { componentEvents as E, EmployeeOnboardingStatus as N } from "../../../shared/constants.js";
|
|
13
|
+
import { ActionsLayout as O } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
13
14
|
import { useComponentContext as T } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
14
15
|
import { useI18n as _, useComponentDictionary as w } from "../../../i18n/I18n.js";
|
|
15
|
-
import { componentEvents as N, EmployeeOnboardingStatus as O } from "../../../shared/constants.js";
|
|
16
16
|
import F from "../../../assets/icons/success_check.svg.js";
|
|
17
17
|
import G from "../../../assets/icons/unchecked_circular.svg.js";
|
|
18
18
|
import { useFlow as M } from "../../Flow/useFlow.js";
|
|
@@ -22,7 +22,7 @@ function j(n) {
|
|
|
22
22
|
const k = ({ employeeId: n, className: c, isAdmin: m = !1 }) => {
|
|
23
23
|
const { onEvent: a } = R(), { t } = b("Employee.OnboardingSummary"), o = T(), {
|
|
24
24
|
data: { employee: x }
|
|
25
|
-
} = B({ employeeId: n }), { firstName: u, lastName: p } = x, { data: C } = L({ employeeId: n }), { onboardingStatus: h, onboardingSteps: l } = C.employeeOnboardingStatus, I = l?.length && l.findIndex((i) => i.required && !i.completed) > -1, f = h ===
|
|
25
|
+
} = B({ employeeId: n }), { firstName: u, lastName: p } = x, { data: C } = L({ employeeId: n }), { onboardingStatus: h, onboardingSteps: l } = C.employeeOnboardingStatus, I = l?.length && l.findIndex((i) => i.required && !i.completed) > -1, f = h === N.ONBOARDING_COMPLETED || !I && h === N.SELF_ONBOARDING_PENDING_INVITE, D = S(() => y.sanitize(u), [u]), v = S(() => y.sanitize(p), [p]);
|
|
26
26
|
return /* @__PURE__ */ e("section", { className: c, children: /* @__PURE__ */ s(d, { flexDirection: "column", gap: 32, children: [
|
|
27
27
|
/* @__PURE__ */ e(d, { alignItems: "center", flexDirection: "column", gap: 8, children: m ? f ? /* @__PURE__ */ s(g, { children: [
|
|
28
28
|
/* @__PURE__ */ e(o.Heading, { as: "h2", textAlign: "center", children: t("onboardedAdminSubtitle", {
|
|
@@ -47,23 +47,23 @@ const k = ({ employeeId: n, className: c, isAdmin: m = !1 }) => {
|
|
|
47
47
|
] }) : /* @__PURE__ */ s(g, { children: [
|
|
48
48
|
/* @__PURE__ */ e(o.Heading, { as: "h2", textAlign: "center", children: t("onboardedSelfSubtitle") }),
|
|
49
49
|
/* @__PURE__ */ e(o.Text, { className: r.description, children: t("onboardedSelfDescription") }),
|
|
50
|
-
/* @__PURE__ */ e(
|
|
50
|
+
/* @__PURE__ */ e(O, { justifyContent: f ? "center" : "start", children: /* @__PURE__ */ e(
|
|
51
51
|
o.Button,
|
|
52
52
|
{
|
|
53
53
|
variant: "secondary",
|
|
54
54
|
onClick: () => {
|
|
55
|
-
a(
|
|
55
|
+
a(E.EMPLOYEE_ONBOARDING_DONE);
|
|
56
56
|
},
|
|
57
57
|
children: t("doneCta")
|
|
58
58
|
}
|
|
59
59
|
) })
|
|
60
60
|
] }) }),
|
|
61
|
-
m && /* @__PURE__ */ e(
|
|
61
|
+
m && /* @__PURE__ */ e(O, { justifyContent: "center", children: /* @__PURE__ */ e(
|
|
62
62
|
o.Button,
|
|
63
63
|
{
|
|
64
64
|
variant: "secondary",
|
|
65
65
|
onClick: () => {
|
|
66
|
-
a(
|
|
66
|
+
a(E.EMPLOYEES_LIST);
|
|
67
67
|
},
|
|
68
68
|
children: t("doneCta")
|
|
69
69
|
}
|
|
@@ -2,18 +2,19 @@ import { jsxs as d, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import { useTranslation as m } from "react-i18next";
|
|
3
3
|
import { usePaymentMethod as l } from "./usePaymentMethod.js";
|
|
4
4
|
import "classnames";
|
|
5
|
+
import "../../../shared/constants.js";
|
|
5
6
|
import { ActionsLayout as p } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
6
7
|
import { useComponentContext as u } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
|
-
const
|
|
8
|
-
const { handleAdd:
|
|
8
|
+
const P = () => {
|
|
9
|
+
const { handleAdd: i, handleCancel: a, isPending: r, bankAccounts: s, handleSplit: c, mode: t } = l(), { t: n } = m("Employee.PaymentMethod"), o = u();
|
|
9
10
|
return /* @__PURE__ */ d(p, { children: [
|
|
10
|
-
(t === "ADD" || t === "SPLIT") && /* @__PURE__ */ e(o.Button, { variant: "secondary", type: "button", onClick:
|
|
11
|
+
(t === "ADD" || t === "SPLIT") && /* @__PURE__ */ e(o.Button, { variant: "secondary", type: "button", onClick: a, children: n("cancelAddCta") }),
|
|
11
12
|
t === "LIST" && s.length > 1 && /* @__PURE__ */ e(o.Button, { variant: "secondary", type: "button", onClick: c, children: n("splitCta") }),
|
|
12
|
-
t === "LIST" && /* @__PURE__ */ e(o.Button, { variant: "secondary", type: "button", onClick:
|
|
13
|
+
t === "LIST" && /* @__PURE__ */ e(o.Button, { variant: "secondary", type: "button", onClick: i, children: n("addAnotherCta") }),
|
|
13
14
|
/* @__PURE__ */ e(o.Button, { type: "submit", isLoading: r, children: n(t === "ADD" || t === "SPLIT" ? "saveCta" : "submitCta") })
|
|
14
15
|
] });
|
|
15
16
|
};
|
|
16
17
|
export {
|
|
17
|
-
|
|
18
|
+
P as Actions
|
|
18
19
|
};
|
|
19
20
|
//# sourceMappingURL=Actions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/PaymentMethod/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaymentMethod } from './usePaymentMethod'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { handleAdd, handleCancel, isPending, bankAccounts, handleSplit, mode } = usePaymentMethod()\n const { t } = useTranslation('Employee.PaymentMethod')\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n {(mode === 'ADD' || mode === 'SPLIT') && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleCancel}>\n {t('cancelAddCta')}\n </Components.Button>\n )}\n {mode === 'LIST' && bankAccounts.length > 1 && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleSplit}>\n {t('splitCta')}\n </Components.Button>\n )}\n {mode === 'LIST' && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleAdd}>\n {t('addAnotherCta')}\n </Components.Button>\n )}\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t(mode === 'ADD' || mode === 'SPLIT' ? 'saveCta' : 'submitCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","handleAdd","handleCancel","isPending","bankAccounts","handleSplit","mode","usePaymentMethod","t","useTranslation","Components","useComponentContext","ActionsLayout","jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/PaymentMethod/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaymentMethod } from './usePaymentMethod'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { handleAdd, handleCancel, isPending, bankAccounts, handleSplit, mode } = usePaymentMethod()\n const { t } = useTranslation('Employee.PaymentMethod')\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n {(mode === 'ADD' || mode === 'SPLIT') && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleCancel}>\n {t('cancelAddCta')}\n </Components.Button>\n )}\n {mode === 'LIST' && bankAccounts.length > 1 && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleSplit}>\n {t('splitCta')}\n </Components.Button>\n )}\n {mode === 'LIST' && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleAdd}>\n {t('addAnotherCta')}\n </Components.Button>\n )}\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t(mode === 'ADD' || mode === 'SPLIT' ? 'saveCta' : 'submitCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","handleAdd","handleCancel","isPending","bankAccounts","handleSplit","mode","usePaymentMethod","t","useTranslation","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,WAAAC,GAAW,cAAAC,GAAc,WAAAC,GAAW,cAAAC,GAAc,aAAAC,GAAa,MAAAC,EAAA,IAASC,EAAA,GAC1E,EAAE,GAAAC,EAAA,IAAMC,EAAe,wBAAwB,GAC/CC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACG,UAAA;AAAA,KAAAN,MAAS,SAASA,MAAS,YAC3B,gBAAAO,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,MAAK,UAAS,SAASR,GAC3D,UAAAM,EAAE,cAAc,GACnB;AAAA,IAEDF,MAAS,UAAUF,EAAa,SAAS,uBACvCM,EAAW,QAAX,EAAkB,SAAQ,aAAY,MAAK,UAAS,SAASL,GAC3D,UAAAG,EAAE,UAAU,GACf;AAAA,IAEDF,MAAS,UACR,gBAAAO,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,MAAK,UAAS,SAAST,GAC3D,UAAAO,EAAE,eAAe,GACpB;AAAA,IAEF,gBAAAK,EAACH,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWP,GACzC,UAAAK,EAAEF,MAAS,SAASA,MAAS,UAAU,YAAY,WAAW,EAAA,CACjE;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation as s } from "react-i18next";
|
|
3
3
|
import { usePaymentMethod as p } from "./usePaymentMethod.js";
|
|
4
4
|
import d from "../../../assets/icons/trashcan.svg.js";
|
|
5
5
|
import "classnames";
|
|
6
|
+
import "../../../shared/constants.js";
|
|
6
7
|
import f from "../../Common/hooks/useNumberFormatter.js";
|
|
7
8
|
import { HamburgerMenu as y } from "../../Common/HamburgerMenu/HamburgerMenu.js";
|
|
8
9
|
import { useDataView as b } from "../../Common/DataView/useDataView.js";
|
|
9
10
|
import { DataView as k } from "../../Common/DataView/DataView.js";
|
|
10
|
-
function
|
|
11
|
-
const { bankAccounts: r, paymentMethod:
|
|
11
|
+
function D() {
|
|
12
|
+
const { bankAccounts: r, paymentMethod: n, mode: i, handleDelete: m, isPending: u } = p(), { t } = s("Employee.PaymentMethod"), a = f(n.splitBy === "Amount" ? "currency" : "percent"), { ...l } = b({
|
|
12
13
|
data: r,
|
|
13
14
|
columns: [
|
|
14
15
|
{ key: "name", title: t("nicknameColumn") },
|
|
@@ -18,11 +19,11 @@ function B() {
|
|
|
18
19
|
key: "splitAmount",
|
|
19
20
|
title: t("allocationColumn"),
|
|
20
21
|
render: (e) => a(
|
|
21
|
-
|
|
22
|
+
n.splits?.find((c) => c.uuid === e.uuid)?.splitAmount ?? 0
|
|
22
23
|
)
|
|
23
24
|
}
|
|
24
25
|
],
|
|
25
|
-
itemMenu: (e) => /* @__PURE__ */
|
|
26
|
+
itemMenu: (e) => /* @__PURE__ */ o(
|
|
26
27
|
y,
|
|
27
28
|
{
|
|
28
29
|
items: [
|
|
@@ -31,7 +32,7 @@ function B() {
|
|
|
31
32
|
onClick: () => {
|
|
32
33
|
m(e.uuid);
|
|
33
34
|
},
|
|
34
|
-
icon: /* @__PURE__ */
|
|
35
|
+
icon: /* @__PURE__ */ o(d, { "aria-hidden": !0 })
|
|
35
36
|
}
|
|
36
37
|
],
|
|
37
38
|
triggerLabel: t("hamburgerTitle"),
|
|
@@ -40,9 +41,9 @@ function B() {
|
|
|
40
41
|
)
|
|
41
42
|
});
|
|
42
43
|
if (i === "LIST")
|
|
43
|
-
return /* @__PURE__ */
|
|
44
|
+
return /* @__PURE__ */ o(k, { label: t("bankAccountsListLabel"), ...l });
|
|
44
45
|
}
|
|
45
46
|
export {
|
|
46
|
-
|
|
47
|
+
D as BankAccountsList
|
|
47
48
|
};
|
|
48
49
|
//# sourceMappingURL=BankAccountsList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BankAccountsList.js","sources":["../../../../src/components/Employee/PaymentMethod/BankAccountsList.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaymentMethod } from './usePaymentMethod'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport { DataView, useDataView } from '@/components/Common'\nimport useNumberFormatter from '@/components/Common/hooks/useNumberFormatter'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\n\nexport function BankAccountsList() {\n const { bankAccounts, paymentMethod, mode, handleDelete, isPending } = usePaymentMethod()\n const { t } = useTranslation('Employee.PaymentMethod')\n const format = useNumberFormatter(paymentMethod.splitBy === 'Amount' ? 'currency' : 'percent')\n\n const { ...dataViewProps } = useDataView({\n data: bankAccounts,\n columns: [\n { key: 'name', title: t('nicknameColumn') },\n { key: 'routingNumber', title: t('routingNumberColumn') },\n { key: 'accountType', title: t('accountTypeColumn') },\n {\n key: 'splitAmount',\n title: t('allocationColumn'),\n render: bankAccount => {\n return format(\n paymentMethod.splits?.find(split => split.uuid === bankAccount.uuid)?.splitAmount ?? 0,\n )\n },\n },\n ],\n itemMenu: bankAccount => {\n return (\n <HamburgerMenu\n items={[\n {\n label: t('deleteBankAccountCTA'),\n onClick: () => {\n handleDelete(bankAccount.uuid)\n },\n icon: <TrashCanSvg aria-hidden />,\n },\n ]}\n triggerLabel={t('hamburgerTitle')}\n isLoading={isPending}\n />\n )\n },\n })\n\n if (mode !== 'LIST') return\n\n return <DataView label={t('bankAccountsListLabel')} {...dataViewProps} />\n}\n"],"names":["BankAccountsList","bankAccounts","paymentMethod","mode","handleDelete","isPending","usePaymentMethod","useTranslation","format","useNumberFormatter","dataViewProps","useDataView","bankAccount","split","jsx","HamburgerMenu","TrashCanSvg","DataView"],"mappings":"
|
|
1
|
+
{"version":3,"file":"BankAccountsList.js","sources":["../../../../src/components/Employee/PaymentMethod/BankAccountsList.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaymentMethod } from './usePaymentMethod'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport { DataView, useDataView } from '@/components/Common'\nimport useNumberFormatter from '@/components/Common/hooks/useNumberFormatter'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\n\nexport function BankAccountsList() {\n const { bankAccounts, paymentMethod, mode, handleDelete, isPending } = usePaymentMethod()\n const { t } = useTranslation('Employee.PaymentMethod')\n const format = useNumberFormatter(paymentMethod.splitBy === 'Amount' ? 'currency' : 'percent')\n\n const { ...dataViewProps } = useDataView({\n data: bankAccounts,\n columns: [\n { key: 'name', title: t('nicknameColumn') },\n { key: 'routingNumber', title: t('routingNumberColumn') },\n { key: 'accountType', title: t('accountTypeColumn') },\n {\n key: 'splitAmount',\n title: t('allocationColumn'),\n render: bankAccount => {\n return format(\n paymentMethod.splits?.find(split => split.uuid === bankAccount.uuid)?.splitAmount ?? 0,\n )\n },\n },\n ],\n itemMenu: bankAccount => {\n return (\n <HamburgerMenu\n items={[\n {\n label: t('deleteBankAccountCTA'),\n onClick: () => {\n handleDelete(bankAccount.uuid)\n },\n icon: <TrashCanSvg aria-hidden />,\n },\n ]}\n triggerLabel={t('hamburgerTitle')}\n isLoading={isPending}\n />\n )\n },\n })\n\n if (mode !== 'LIST') return\n\n return <DataView label={t('bankAccountsListLabel')} {...dataViewProps} />\n}\n"],"names":["BankAccountsList","bankAccounts","paymentMethod","mode","handleDelete","isPending","usePaymentMethod","useTranslation","format","useNumberFormatter","dataViewProps","useDataView","bankAccount","split","jsx","HamburgerMenu","TrashCanSvg","DataView"],"mappings":";;;;;;;;;;AAOO,SAASA,IAAmB;AACjC,QAAM,EAAE,cAAAC,GAAc,eAAAC,GAAe,MAAAC,GAAM,cAAAC,GAAc,WAAAC,EAAA,IAAcC,EAAA,GACjE,EAAE,EAAA,IAAMC,EAAe,wBAAwB,GAC/CC,IAASC,EAAmBP,EAAc,YAAY,WAAW,aAAa,SAAS,GAEvF,EAAE,GAAGQ,EAAA,IAAkBC,EAAY;AAAA,IACvC,MAAMV;AAAA,IACN,SAAS;AAAA,MACP,EAAE,KAAK,QAAQ,OAAO,EAAE,gBAAgB,EAAA;AAAA,MACxC,EAAE,KAAK,iBAAiB,OAAO,EAAE,qBAAqB,EAAA;AAAA,MACtD,EAAE,KAAK,eAAe,OAAO,EAAE,mBAAmB,EAAA;AAAA,MAClD;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,kBAAkB;AAAA,QAC3B,QAAQ,CAAAW,MACCJ;AAAA,UACLN,EAAc,QAAQ,KAAK,CAAAW,MAASA,EAAM,SAASD,EAAY,IAAI,GAAG,eAAe;AAAA,QAAA;AAAA,MAEzF;AAAA,IACF;AAAA,IAEF,UAAU,CAAAA,MAEN,gBAAAE;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,OAAO;AAAA,UACL;AAAA,YACE,OAAO,EAAE,sBAAsB;AAAA,YAC/B,SAAS,MAAM;AACb,cAAAX,EAAaQ,EAAY,IAAI;AAAA,YAC/B;AAAA,YACA,MAAM,gBAAAE,EAACE,GAAA,EAAY,eAAW,GAAA,CAAC;AAAA,UAAA;AAAA,QACjC;AAAA,QAEF,cAAc,EAAE,gBAAgB;AAAA,QAChC,WAAWX;AAAA,MAAA;AAAA,IAAA;AAAA,EAGjB,CACD;AAED,MAAIF,MAAS;AAEb,6BAAQc,GAAA,EAAS,OAAO,EAAE,uBAAuB,GAAI,GAAGP,GAAe;AACzE;"}
|
|
@@ -2,6 +2,7 @@ import { BaseComponentInterface, CommonComponentInterface } from '../../Base';
|
|
|
2
2
|
interface PaymentMethodProps extends CommonComponentInterface<'Employee.PaymentMethod'> {
|
|
3
3
|
employeeId: string;
|
|
4
4
|
defaultValues?: never;
|
|
5
|
+
isAdmin?: boolean;
|
|
5
6
|
}
|
|
6
7
|
export declare function PaymentMethod(props: PaymentMethodProps & BaseComponentInterface): import("react/jsx-runtime").JSX.Element;
|
|
7
8
|
export declare const PaymentMethodContextual: () => import("react/jsx-runtime").JSX.Element;
|