@gusto/embedded-react-sdk 0.10.7-rc.2 → 0.11.0-rc.1
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 +14 -0
- package/dist/components/Common/HamburgerMenu/HamburgerMenu.js +20 -19
- package/dist/components/Common/HamburgerMenu/HamburgerMenu.js.map +1 -1
- package/dist/components/Common/ReorderableList/ReorderableItem.js +1 -1
- package/dist/components/Common/ReorderableList/ReorderableItem.js.map +1 -1
- package/dist/components/Common/UI/Button/Button.d.ts +1 -1
- package/dist/components/Common/UI/Button/Button.js +4 -4
- package/dist/components/Common/UI/Button/Button.js.map +1 -1
- package/dist/components/Common/UI/Button/ButtonTypes.d.ts +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatory.d.ts +0 -5
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +39 -42
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.d.ts +0 -4
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +51 -53
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.d.ts +0 -4
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +40 -42
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/index.d.ts +0 -1
- package/dist/components/Company/BankAccount/BankAccount.d.ts +0 -5
- package/dist/components/Company/BankAccount/BankAccount.js +17 -23
- package/dist/components/Company/BankAccount/BankAccount.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.d.ts +0 -5
- package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js +28 -31
- package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.d.ts +0 -5
- package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js +25 -28
- package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.d.ts +0 -5
- package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js +33 -36
- package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.d.ts +0 -6
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +37 -41
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentSigner.d.ts +0 -4
- package/dist/components/Company/DocumentSigner/DocumentSigner.js +23 -26
- package/dist/components/Company/DocumentSigner/DocumentSigner.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.d.ts +0 -6
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +40 -44
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/Industry/Industry.d.ts +0 -5
- package/dist/components/Company/Industry/Industry.js +23 -29
- package/dist/components/Company/Industry/Industry.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.d.ts +0 -5
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +41 -44
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/Locations.d.ts +0 -4
- package/dist/components/Company/Locations/Locations.js +14 -18
- package/dist/components/Company/Locations/Locations.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.d.ts +0 -5
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +28 -31
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.d.ts +1 -7
- package/dist/components/Company/PaySchedule/PaySchedule.js +67 -71
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxes.d.ts +0 -4
- package/dist/components/Company/StateTaxes/StateTaxes.js +39 -22
- package/dist/components/Company/StateTaxes/StateTaxes.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesComponents.d.ts +8 -6
- package/dist/components/Company/StateTaxes/StateTaxesComponents.js +16 -15
- package/dist/components/Company/StateTaxes/StateTaxesComponents.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.d.ts +0 -5
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +44 -47
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.d.ts +0 -5
- package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js +26 -29
- package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js.map +1 -1
- package/dist/components/Company/StateTaxes/stateTaxesReducer.d.ts +20 -0
- package/dist/components/Company/StateTaxes/stateTaxesReducer.js +40 -0
- package/dist/components/Company/StateTaxes/stateTaxesReducer.js.map +1 -0
- package/dist/components/Contractor/Address/Address.d.ts +0 -5
- package/dist/components/Contractor/Address/Address.js +35 -38
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfile.d.ts +11 -0
- package/dist/components/Contractor/Profile/ContractorProfile.js +24 -0
- package/dist/components/Contractor/Profile/ContractorProfile.js.map +1 -0
- package/dist/components/Contractor/Profile/ContractorProfileForm.d.ts +5 -0
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +140 -0
- package/dist/components/Contractor/Profile/ContractorProfileForm.js.map +1 -0
- package/dist/components/Contractor/Profile/index.d.ts +3 -0
- package/dist/components/Contractor/Profile/useContractorProfile.d.ts +254 -0
- package/dist/components/Contractor/Profile/useContractorProfile.js +223 -0
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -0
- package/dist/components/Contractor/Submit/ContractorSubmitWithApi.d.ts +6 -0
- package/dist/components/Contractor/Submit/ContractorSubmitWithApi.js +27 -0
- package/dist/components/Contractor/Submit/ContractorSubmitWithApi.js.map +1 -0
- package/dist/components/Contractor/Submit/SubmitDone.d.ts +5 -0
- package/dist/components/Contractor/Submit/SubmitDone.js +18 -0
- package/dist/components/Contractor/Submit/SubmitDone.js.map +1 -0
- package/dist/components/Contractor/Submit/index.d.ts +6 -0
- package/dist/components/Contractor/Submit/index.js +18 -0
- package/dist/components/Contractor/Submit/index.js.map +1 -0
- package/dist/components/Contractor/Submit/index.module.scss.js +8 -0
- package/dist/components/Contractor/Submit/index.module.scss.js.map +1 -0
- package/dist/components/Contractor/index.d.ts +2 -0
- package/dist/components/Contractor/index.js +10 -6
- package/dist/components/Contractor/index.js.map +1 -1
- package/dist/components/Employee/Compensation/Compensation.d.ts +0 -6
- package/dist/components/Employee/Compensation/Compensation.js +97 -102
- package/dist/components/Employee/Compensation/Compensation.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.d.ts +0 -5
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +25 -28
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentSigner.d.ts +1 -7
- package/dist/components/Employee/DocumentSigner/DocumentSigner.js +16 -20
- package/dist/components/Employee/DocumentSigner/DocumentSigner.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.d.ts +0 -7
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +40 -44
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.d.ts +0 -5
- package/dist/components/Employee/EmployeeList/EmployeeList.js +56 -59
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.d.ts +3 -3
- package/dist/components/Employee/Profile/PersonalDetailsInputs.d.ts +2 -2
- package/dist/components/Employee/Profile/Profile.d.ts +0 -8
- package/dist/components/Employee/Profile/Profile.js +131 -138
- package/dist/components/Employee/Profile/Profile.js.map +1 -1
- package/dist/components/Employee/Taxes/Taxes.d.ts +0 -6
- package/dist/components/Employee/Taxes/Taxes.js +76 -81
- package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
- package/dist/i18n/I18n.js +1 -1
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Contractor.ContractorSubmit.json.js +22 -0
- package/dist/i18n/en/Contractor.ContractorSubmit.json.js.map +1 -0
- package/dist/i18n/en/Contractor.Profile.json.js +73 -0
- package/dist/i18n/en/Contractor.Profile.json.js.map +1 -0
- package/dist/shared/constants.d.ts +14 -0
- package/dist/shared/constants.js +33 -26
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +77 -1
- package/package.json +2 -2
- package/dist/components/Company/StateTaxes/stateTaxesStateMachine.d.ts +0 -5
- package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js +0 -48
- package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js.map +0 -1
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
import { Form as FormComponent } from './Form';
|
|
2
1
|
import { BaseComponentInterface, CommonComponentInterface } from '../../../Base/Base';
|
|
3
2
|
interface SignatureFormProps extends CommonComponentInterface {
|
|
4
3
|
employeeId: string;
|
|
5
4
|
formId: string;
|
|
6
5
|
}
|
|
7
6
|
export declare function SignatureForm(props: SignatureFormProps & BaseComponentInterface): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export declare namespace SignatureForm {
|
|
9
|
-
var Head: typeof import("./Head").Head;
|
|
10
|
-
var Preview: typeof import("./Preview").Preview;
|
|
11
|
-
var Form: typeof FormComponent;
|
|
12
|
-
var Actions: typeof import("./Actions").Actions;
|
|
13
|
-
}
|
|
14
7
|
export {};
|
|
@@ -1,67 +1,63 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import { useEmployeeFormsGetPdfSuspense as
|
|
3
|
-
import { useEmployeeFormsSignMutation as
|
|
4
|
-
import { useEmployeeFormsGetSuspense as
|
|
5
|
-
import { Form as
|
|
6
|
-
import { Head as
|
|
7
|
-
import { Actions as
|
|
8
|
-
import { Preview as
|
|
9
|
-
import { SignatureFormProvider as
|
|
10
|
-
import { BaseComponent as
|
|
11
|
-
import { useBase as
|
|
12
|
-
import { useI18n as
|
|
13
|
-
import { componentEvents as
|
|
1
|
+
import { jsx as o, jsxs as F, Fragment as E } from "react/jsx-runtime";
|
|
2
|
+
import { useEmployeeFormsGetPdfSuspense as h } from "@gusto/embedded-api/react-query/employeeFormsGetPdf";
|
|
3
|
+
import { useEmployeeFormsSignMutation as P } from "@gusto/embedded-api/react-query/employeeFormsSign";
|
|
4
|
+
import { useEmployeeFormsGetSuspense as x } from "@gusto/embedded-api/react-query/employeeFormsGet";
|
|
5
|
+
import { Form as b } from "./Form.js";
|
|
6
|
+
import { Head as v } from "./Head.js";
|
|
7
|
+
import { Actions as y } from "./Actions.js";
|
|
8
|
+
import { Preview as B } from "./Preview.js";
|
|
9
|
+
import { SignatureFormProvider as w } from "./useSignatureForm.js";
|
|
10
|
+
import { BaseComponent as A } from "../../../Base/Base.js";
|
|
11
|
+
import { useBase as C } from "../../../Base/useBase.js";
|
|
12
|
+
import { useI18n as G } from "../../../../i18n/I18n.js";
|
|
13
|
+
import { componentEvents as i } from "../../../../shared/constants.js";
|
|
14
14
|
import { Flex as M } from "../../../Common/Flex/Flex.js";
|
|
15
15
|
import { SignatureForm as R } from "../../../Common/SignatureForm/SignatureForm.js";
|
|
16
|
-
function
|
|
17
|
-
return /* @__PURE__ */ o(
|
|
16
|
+
function V(r) {
|
|
17
|
+
return /* @__PURE__ */ o(A, { ...r, children: /* @__PURE__ */ o(j, { ...r }) });
|
|
18
18
|
}
|
|
19
|
-
function j({ employeeId: r, formId:
|
|
20
|
-
|
|
21
|
-
const { onEvent:
|
|
22
|
-
data: { formPdf:
|
|
23
|
-
} =
|
|
24
|
-
return /* @__PURE__ */ o("section", { className:
|
|
25
|
-
|
|
19
|
+
function j({ employeeId: r, formId: s, className: u, children: e }) {
|
|
20
|
+
G("Employee.DocumentSigner");
|
|
21
|
+
const { onEvent: t, baseSubmitHandler: a } = C(), { data: c } = x({ employeeId: r, formId: s }), n = c.form, {
|
|
22
|
+
data: { formPdf: f }
|
|
23
|
+
} = h({ employeeId: r, formId: n.uuid }), d = f.documentUrl, { mutateAsync: p, isPending: l } = P();
|
|
24
|
+
return /* @__PURE__ */ o("section", { className: u, children: /* @__PURE__ */ o(
|
|
25
|
+
w,
|
|
26
26
|
{
|
|
27
27
|
value: {
|
|
28
|
-
pdfUrl:
|
|
28
|
+
pdfUrl: d,
|
|
29
29
|
handleBack: () => {
|
|
30
|
-
|
|
30
|
+
t(i.CANCEL);
|
|
31
31
|
},
|
|
32
|
-
form:
|
|
33
|
-
isPending:
|
|
32
|
+
form: n,
|
|
33
|
+
isPending: l
|
|
34
34
|
},
|
|
35
|
-
children: /* @__PURE__ */ o(R, { onSubmit: async (
|
|
36
|
-
await
|
|
37
|
-
if (
|
|
38
|
-
const { form:
|
|
35
|
+
children: /* @__PURE__ */ o(R, { onSubmit: async (g) => {
|
|
36
|
+
await a(g, async (m) => {
|
|
37
|
+
if (n.uuid) {
|
|
38
|
+
const { form: S } = await p({
|
|
39
39
|
request: {
|
|
40
40
|
employeeId: r,
|
|
41
|
-
formId:
|
|
41
|
+
formId: n.uuid,
|
|
42
42
|
requestBody: {
|
|
43
|
-
signatureText:
|
|
44
|
-
agree:
|
|
43
|
+
signatureText: m.signature,
|
|
44
|
+
agree: m.confirmSignature
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
|
-
|
|
48
|
+
t(i.EMPLOYEE_SIGN_FORM, S);
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
|
-
}, children: /* @__PURE__ */ o(M, { flexDirection: "column", children:
|
|
52
|
-
/* @__PURE__ */ o(
|
|
53
|
-
/* @__PURE__ */ o(
|
|
54
|
-
/* @__PURE__ */ o(
|
|
55
|
-
/* @__PURE__ */ o(
|
|
51
|
+
}, children: /* @__PURE__ */ o(M, { flexDirection: "column", children: e || /* @__PURE__ */ F(E, { children: [
|
|
52
|
+
/* @__PURE__ */ o(v, {}),
|
|
53
|
+
/* @__PURE__ */ o(B, {}),
|
|
54
|
+
/* @__PURE__ */ o(b, {}),
|
|
55
|
+
/* @__PURE__ */ o(y, {})
|
|
56
56
|
] }) }) })
|
|
57
57
|
}
|
|
58
58
|
) });
|
|
59
59
|
}
|
|
60
|
-
n.Head = a;
|
|
61
|
-
n.Preview = f;
|
|
62
|
-
n.Form = u;
|
|
63
|
-
n.Actions = c;
|
|
64
60
|
export {
|
|
65
|
-
|
|
61
|
+
V as SignatureForm
|
|
66
62
|
};
|
|
67
63
|
//# sourceMappingURL=SignatureForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignatureForm.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/SignatureForm.tsx"],"sourcesContent":["import { useEmployeeFormsGetPdfSuspense } from '@gusto/embedded-api/react-query/employeeFormsGetPdf'\nimport { useEmployeeFormsSignMutation } from '@gusto/embedded-api/react-query/employeeFormsSign'\nimport { useEmployeeFormsGetSuspense } from '@gusto/embedded-api/react-query/employeeFormsGet'\nimport { Form as FormComponent } from './Form'\nimport { Head } from './Head'\nimport { Actions } from './Actions'\nimport { Preview } from './Preview'\nimport { SignatureFormProvider } from './useSignatureForm'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { Flex } from '@/components/Common'\nimport type { SignatureFormInputs } from '@/components/Common/SignatureForm'\nimport { SignatureForm as SharedSignatureForm } from '@/components/Common/SignatureForm'\n\ninterface SignatureFormProps extends CommonComponentInterface {\n employeeId: string\n formId: string\n}\n\nexport function SignatureForm(props: SignatureFormProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ employeeId, formId, className, children }: SignatureFormProps) {\n useI18n('Employee.DocumentSigner')\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { data } = useEmployeeFormsGetSuspense({ employeeId, formId })\n const form = data.form!\n\n const {\n data: { formPdf },\n } = useEmployeeFormsGetPdfSuspense({ employeeId, formId: form.uuid })\n const pdfUrl = formPdf!.documentUrl\n\n const { mutateAsync: signForm, isPending: isSignFormPending } = useEmployeeFormsSignMutation()\n\n const handleBack = () => {\n onEvent(componentEvents.CANCEL)\n }\n\n const handleSubmit = async (data: SignatureFormInputs) => {\n await baseSubmitHandler(data, async payload => {\n if (form.uuid) {\n const { form: signFormResult } = await signForm({\n request: {\n employeeId,\n formId: form.uuid,\n requestBody: {\n signatureText: payload.signature,\n agree: payload.confirmSignature,\n },\n },\n })\n onEvent(componentEvents.EMPLOYEE_SIGN_FORM, signFormResult)\n }\n })\n }\n\n return (\n <section className={className}>\n <SignatureFormProvider\n value={{\n pdfUrl,\n handleBack,\n form,\n isPending: isSignFormPending,\n }}\n >\n <SharedSignatureForm onSubmit={handleSubmit}>\n <Flex flexDirection=\"column\">\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Preview />\n <FormComponent />\n <Actions />\n </>\n )}\n </Flex>\n </SharedSignatureForm>\n </SignatureFormProvider>\n </section>\n )\n}\n
|
|
1
|
+
{"version":3,"file":"SignatureForm.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/SignatureForm.tsx"],"sourcesContent":["import { useEmployeeFormsGetPdfSuspense } from '@gusto/embedded-api/react-query/employeeFormsGetPdf'\nimport { useEmployeeFormsSignMutation } from '@gusto/embedded-api/react-query/employeeFormsSign'\nimport { useEmployeeFormsGetSuspense } from '@gusto/embedded-api/react-query/employeeFormsGet'\nimport { Form as FormComponent } from './Form'\nimport { Head } from './Head'\nimport { Actions } from './Actions'\nimport { Preview } from './Preview'\nimport { SignatureFormProvider } from './useSignatureForm'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { Flex } from '@/components/Common'\nimport type { SignatureFormInputs } from '@/components/Common/SignatureForm'\nimport { SignatureForm as SharedSignatureForm } from '@/components/Common/SignatureForm'\n\ninterface SignatureFormProps extends CommonComponentInterface {\n employeeId: string\n formId: string\n}\n\nexport function SignatureForm(props: SignatureFormProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ employeeId, formId, className, children }: SignatureFormProps) {\n useI18n('Employee.DocumentSigner')\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { data } = useEmployeeFormsGetSuspense({ employeeId, formId })\n const form = data.form!\n\n const {\n data: { formPdf },\n } = useEmployeeFormsGetPdfSuspense({ employeeId, formId: form.uuid })\n const pdfUrl = formPdf!.documentUrl\n\n const { mutateAsync: signForm, isPending: isSignFormPending } = useEmployeeFormsSignMutation()\n\n const handleBack = () => {\n onEvent(componentEvents.CANCEL)\n }\n\n const handleSubmit = async (data: SignatureFormInputs) => {\n await baseSubmitHandler(data, async payload => {\n if (form.uuid) {\n const { form: signFormResult } = await signForm({\n request: {\n employeeId,\n formId: form.uuid,\n requestBody: {\n signatureText: payload.signature,\n agree: payload.confirmSignature,\n },\n },\n })\n onEvent(componentEvents.EMPLOYEE_SIGN_FORM, signFormResult)\n }\n })\n }\n\n return (\n <section className={className}>\n <SignatureFormProvider\n value={{\n pdfUrl,\n handleBack,\n form,\n isPending: isSignFormPending,\n }}\n >\n <SharedSignatureForm onSubmit={handleSubmit}>\n <Flex flexDirection=\"column\">\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Preview />\n <FormComponent />\n <Actions />\n </>\n )}\n </Flex>\n </SharedSignatureForm>\n </SignatureFormProvider>\n </section>\n )\n}\n"],"names":["SignatureForm","props","jsx","BaseComponent","Root","employeeId","formId","className","children","useI18n","onEvent","baseSubmitHandler","useBase","data","useEmployeeFormsGetSuspense","form","formPdf","useEmployeeFormsGetPdfSuspense","pdfUrl","signForm","isSignFormPending","useEmployeeFormsSignMutation","SignatureFormProvider","componentEvents","SharedSignatureForm","payload","signFormResult","Flex","jsxs","Fragment","Head","Preview","FormComponent","Actions"],"mappings":";;;;;;;;;;;;;;;AAyBO,SAASA,EAAcC,GAAoD;AAE9E,SAAA,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAM,EAAA,GAAGH,GAAO,EACnB,CAAA;AAEJ;AAEA,SAASG,EAAK,EAAE,YAAAC,GAAY,QAAAC,GAAQ,WAAAC,GAAW,UAAAC,KAAgC;AAC7E,EAAAC,EAAQ,yBAAyB;AACjC,QAAM,EAAE,SAAAC,GAAS,mBAAAC,EAAkB,IAAIC,EAAQ,GAEzC,EAAE,MAAAC,EAAK,IAAIC,EAA4B,EAAE,YAAAT,GAAY,QAAAC,GAAQ,GAC7DS,IAAOF,EAAK,MAEZ;AAAA,IACJ,MAAM,EAAE,SAAAG,EAAQ;AAAA,EAAA,IACdC,EAA+B,EAAE,YAAAZ,GAAY,QAAQU,EAAK,MAAM,GAC9DG,IAASF,EAAS,aAElB,EAAE,aAAaG,GAAU,WAAWC,EAAA,IAAsBC,EAA6B;AAyB3F,SAAA,gBAAAnB,EAAC,aAAQ,WAAAK,GACP,UAAA,gBAAAL;AAAA,IAACoB;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,QAAAJ;AAAA,QACA,YA3BW,MAAM;AACvB,UAAAR,EAAQa,EAAgB,MAAM;AAAA,QAChC;AAAA,QA0BQ,MAAAR;AAAA,QACA,WAAWK;AAAA,MACb;AAAA,MAEA,UAAA,gBAAAlB,EAACsB,GAAoB,EAAA,UA5BN,OAAOX,MAA8B;AAClD,cAAAF,EAAkBE,GAAM,OAAMY,MAAW;AAC7C,cAAIV,EAAK,MAAM;AACb,kBAAM,EAAE,MAAMW,EAAe,IAAI,MAAMP,EAAS;AAAA,cAC9C,SAAS;AAAA,gBACP,YAAAd;AAAA,gBACA,QAAQU,EAAK;AAAA,gBACb,aAAa;AAAA,kBACX,eAAeU,EAAQ;AAAA,kBACvB,OAAOA,EAAQ;AAAA,gBAAA;AAAA,cACjB;AAAA,YACF,CACD;AACO,YAAAf,EAAAa,EAAgB,oBAAoBG,CAAc;AAAA,UAAA;AAAA,QAC5D,CACD;AAAA,MACH,GAaQ,UAAA,gBAAAxB,EAACyB,KAAK,eAAc,UACjB,UACCnB,KAGE,gBAAAoB,EAAAC,GAAA,EAAA,UAAA;AAAA,QAAA,gBAAA3B,EAAC4B,GAAK,EAAA;AAAA,0BACLC,GAAQ,EAAA;AAAA,0BACRC,GAAc,EAAA;AAAA,0BACdC,GAAQ,CAAA,CAAA;AAAA,MAAA,EACX,CAAA,EAEJ,CAAA,EACF,CAAA;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
@@ -3,11 +3,6 @@ interface EmployeeListProps extends CommonComponentInterface<'Employee.EmployeeL
|
|
|
3
3
|
companyId: string;
|
|
4
4
|
}
|
|
5
5
|
export declare function EmployeeList(props: EmployeeListProps & BaseComponentInterface): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export declare namespace EmployeeList {
|
|
7
|
-
var Head: () => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
var List: () => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
var Actions: typeof import("./Actions").Actions;
|
|
10
|
-
}
|
|
11
6
|
/**
|
|
12
7
|
* Wrapper used inside Flows -> exposes flow context for required parameters
|
|
13
8
|
*/
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { useEmployeesListSuspense as
|
|
4
|
-
import { useEmployeesDeleteMutation as
|
|
5
|
-
import { useEmployeesUpdateOnboardingStatusMutation as
|
|
6
|
-
import { EmployeeListProvider as
|
|
7
|
-
import { Actions as
|
|
8
|
-
import { BaseComponent as
|
|
9
|
-
import { useBase as
|
|
10
|
-
import { Flex as
|
|
11
|
-
import { useI18n as
|
|
1
|
+
import { jsx as o, jsxs as B } from "react/jsx-runtime";
|
|
2
|
+
import { useState as d } from "react";
|
|
3
|
+
import { useEmployeesListSuspense as C } from "@gusto/embedded-api/react-query/employeesList";
|
|
4
|
+
import { useEmployeesDeleteMutation as v } from "@gusto/embedded-api/react-query/employeesDelete";
|
|
5
|
+
import { useEmployeesUpdateOnboardingStatusMutation as G } from "@gusto/embedded-api/react-query/employeesUpdateOnboardingStatus";
|
|
6
|
+
import { EmployeeListProvider as Y } from "./useEmployeeList.js";
|
|
7
|
+
import { Actions as F } from "./Actions.js";
|
|
8
|
+
import { BaseComponent as U } from "../../Base/Base.js";
|
|
9
|
+
import { useBase as W } from "../../Base/useBase.js";
|
|
10
|
+
import { Flex as q } from "../../Common/Flex/Flex.js";
|
|
11
|
+
import { useI18n as j, useComponentDictionary as k } from "../../../i18n/I18n.js";
|
|
12
12
|
import { componentEvents as s, EmployeeOnboardingStatus as l } from "../../../shared/constants.js";
|
|
13
|
-
import { Head as
|
|
14
|
-
import { List as
|
|
15
|
-
import { useFlow as
|
|
16
|
-
function
|
|
17
|
-
return /* @__PURE__ */ o(
|
|
13
|
+
import { Head as H } from "./Head.js";
|
|
14
|
+
import { List as V } from "./List.js";
|
|
15
|
+
import { useFlow as z } from "../../Flow/useFlow.js";
|
|
16
|
+
function J(n) {
|
|
17
|
+
return /* @__PURE__ */ o(U, { ...n, children: /* @__PURE__ */ o(K, { ...n, children: n.children }) });
|
|
18
18
|
}
|
|
19
|
-
function K({ companyId: n, className:
|
|
20
|
-
|
|
21
|
-
const { onEvent: a, baseSubmitHandler: r } =
|
|
22
|
-
|
|
23
|
-
},
|
|
19
|
+
function K({ companyId: n, className: m, children: c, dictionary: y }) {
|
|
20
|
+
j("Employee.EmployeeList"), k("Employee.EmployeeList", y);
|
|
21
|
+
const { onEvent: a, baseSubmitHandler: r } = W(), [p, i] = d(1), [h, P] = d(5), { data: O } = C({ companyId: n, page: p, per: h }), { httpMeta: g, showEmployees: I } = O, N = I, { mutateAsync: A } = v(), { mutateAsync: D } = G(), E = Number(g.response.headers.get("x-total-pages") ?? 1), f = (e) => {
|
|
22
|
+
P(e);
|
|
23
|
+
}, L = () => {
|
|
24
24
|
i(1);
|
|
25
|
-
},
|
|
25
|
+
}, _ = () => {
|
|
26
26
|
i((e) => Math.max(e - 1, 1));
|
|
27
|
-
},
|
|
28
|
-
i((e) => Math.min(e + 1,
|
|
29
|
-
},
|
|
30
|
-
i(
|
|
31
|
-
},
|
|
27
|
+
}, M = () => {
|
|
28
|
+
i((e) => Math.min(e + 1, E));
|
|
29
|
+
}, S = () => {
|
|
30
|
+
i(E);
|
|
31
|
+
}, w = async (e) => {
|
|
32
32
|
await r(e, async (t) => {
|
|
33
|
-
await
|
|
33
|
+
await A({
|
|
34
34
|
request: { employeeId: t }
|
|
35
35
|
}), a(s.EMPLOYEE_DELETED, { employeeId: t });
|
|
36
36
|
});
|
|
37
|
-
},
|
|
37
|
+
}, b = async (e) => {
|
|
38
38
|
await r(e, async (t) => {
|
|
39
39
|
await u({
|
|
40
40
|
employeeId: t,
|
|
@@ -44,7 +44,7 @@ function K({ companyId: n, className: E, children: p, dictionary: g }) {
|
|
|
44
44
|
onboardingStatus: l.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW
|
|
45
45
|
});
|
|
46
46
|
});
|
|
47
|
-
},
|
|
47
|
+
}, R = async (e) => {
|
|
48
48
|
await r(e, async (t) => {
|
|
49
49
|
await u({
|
|
50
50
|
employeeId: t,
|
|
@@ -52,15 +52,15 @@ function K({ companyId: n, className: E, children: p, dictionary: g }) {
|
|
|
52
52
|
});
|
|
53
53
|
});
|
|
54
54
|
}, u = async (e) => {
|
|
55
|
-
await r(e, async ({ employeeId: t, status:
|
|
56
|
-
const { employeeOnboardingStatus:
|
|
57
|
-
request: { employeeId: t, requestBody: { onboardingStatus:
|
|
55
|
+
await r(e, async ({ employeeId: t, status: T }) => {
|
|
56
|
+
const { employeeOnboardingStatus: x } = await D({
|
|
57
|
+
request: { employeeId: t, requestBody: { onboardingStatus: T } }
|
|
58
58
|
});
|
|
59
|
-
a(s.EMPLOYEE_ONBOARDING_STATUS_UPDATED,
|
|
59
|
+
a(s.EMPLOYEE_ONBOARDING_STATUS_UPDATED, x);
|
|
60
60
|
});
|
|
61
61
|
};
|
|
62
|
-
return /* @__PURE__ */ o("section", { className:
|
|
63
|
-
|
|
62
|
+
return /* @__PURE__ */ o("section", { className: m, children: /* @__PURE__ */ o(
|
|
63
|
+
Y,
|
|
64
64
|
{
|
|
65
65
|
value: {
|
|
66
66
|
handleEdit: (e, t) => {
|
|
@@ -69,38 +69,35 @@ function K({ companyId: n, className: E, children: p, dictionary: g }) {
|
|
|
69
69
|
handleNew: () => {
|
|
70
70
|
a(s.EMPLOYEE_CREATE);
|
|
71
71
|
},
|
|
72
|
-
handleReview:
|
|
73
|
-
handleDelete:
|
|
74
|
-
employees:
|
|
75
|
-
currentPage:
|
|
76
|
-
totalPages:
|
|
77
|
-
handleFirstPage:
|
|
78
|
-
handlePreviousPage:
|
|
79
|
-
handleNextPage:
|
|
80
|
-
handleLastPage:
|
|
81
|
-
handleCancelSelfOnboarding:
|
|
82
|
-
handleItemsPerPageChange:
|
|
72
|
+
handleReview: b,
|
|
73
|
+
handleDelete: w,
|
|
74
|
+
employees: N,
|
|
75
|
+
currentPage: p,
|
|
76
|
+
totalPages: E,
|
|
77
|
+
handleFirstPage: L,
|
|
78
|
+
handlePreviousPage: _,
|
|
79
|
+
handleNextPage: M,
|
|
80
|
+
handleLastPage: S,
|
|
81
|
+
handleCancelSelfOnboarding: R,
|
|
82
|
+
handleItemsPerPageChange: f,
|
|
83
83
|
handleSkip: () => {
|
|
84
84
|
a(s.EMPLOYEE_ONBOARDING_DONE);
|
|
85
85
|
}
|
|
86
86
|
},
|
|
87
|
-
children:
|
|
88
|
-
/* @__PURE__ */ o(
|
|
89
|
-
/* @__PURE__ */ o(
|
|
90
|
-
/* @__PURE__ */ o(
|
|
87
|
+
children: c || /* @__PURE__ */ B(q, { flexDirection: "column", children: [
|
|
88
|
+
/* @__PURE__ */ o(H, {}),
|
|
89
|
+
/* @__PURE__ */ o(V, {}),
|
|
90
|
+
/* @__PURE__ */ o(F, {})
|
|
91
91
|
] })
|
|
92
92
|
}
|
|
93
93
|
) });
|
|
94
94
|
}
|
|
95
|
-
|
|
96
|
-
m
|
|
97
|
-
m
|
|
98
|
-
const ue = () => {
|
|
99
|
-
const { companyId: n, onEvent: E } = J();
|
|
100
|
-
return /* @__PURE__ */ o(m, { companyId: n, onEvent: E });
|
|
95
|
+
const de = () => {
|
|
96
|
+
const { companyId: n, onEvent: m } = z();
|
|
97
|
+
return /* @__PURE__ */ o(J, { companyId: n, onEvent: m });
|
|
101
98
|
};
|
|
102
99
|
export {
|
|
103
|
-
|
|
104
|
-
|
|
100
|
+
J as EmployeeList,
|
|
101
|
+
de as EmployeeListContextual
|
|
105
102
|
};
|
|
106
103
|
//# sourceMappingURL=EmployeeList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmployeeList.js","sources":["../../../../src/components/Employee/EmployeeList/EmployeeList.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useEmployeesListSuspense } from '@gusto/embedded-api/react-query/employeesList'\nimport type { OnboardingStatus } from '@gusto/embedded-api/models/operations/putv1employeesemployeeidonboardingstatus'\nimport { useEmployeesDeleteMutation } from '@gusto/embedded-api/react-query/employeesDelete'\nimport { useEmployeesUpdateOnboardingStatusMutation } from '@gusto/embedded-api/react-query/employeesUpdateOnboardingStatus'\nimport type { OnboardingContextInterface } from '../OnboardingFlow/OnboardingFlow'\nimport { EmployeeListProvider } from './useEmployeeList'\nimport { Actions } from './Actions'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { Flex } from '@/components/Common'\nimport { useI18n, useComponentDictionary } from '@/i18n'\nimport { componentEvents, EmployeeOnboardingStatus } from '@/shared/constants'\nimport { Head } from '@/components/Employee/EmployeeList/Head'\nimport { List } from '@/components/Employee/EmployeeList/List'\nimport { useFlow } from '@/components/Flow/useFlow'\n\n//Interface for component specific props\ninterface EmployeeListProps extends CommonComponentInterface<'Employee.EmployeeList'> {\n companyId: string\n}\n\nexport function EmployeeList(props: EmployeeListProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\nfunction Root({ companyId, className, children, dictionary }: EmployeeListProps) {\n //Using i18n hook to directly load necessary namespace\n useI18n('Employee.EmployeeList')\n useComponentDictionary('Employee.EmployeeList', dictionary)\n //Getting props from base context\n const { onEvent, baseSubmitHandler } = useBase()\n const [currentPage, setCurrentPage] = useState(1)\n const [itemsPerPage, setItemsPerPage] = useState(5)\n\n const { data } = useEmployeesListSuspense({ companyId, page: currentPage, per: itemsPerPage })\n const { httpMeta, showEmployees: employeeList } = data\n const employees = employeeList!\n\n const { mutateAsync: deleteEmployeeMutation } = useEmployeesDeleteMutation()\n const { mutateAsync: updateEmployeeOnboardingStatusMutation } =\n useEmployeesUpdateOnboardingStatusMutation()\n\n const totalPages = Number(httpMeta.response.headers.get('x-total-pages') ?? 1)\n\n const handleItemsPerPageChange = (newCount: number) => {\n setItemsPerPage(newCount)\n }\n const handleFirstPage = () => {\n setCurrentPage(1)\n }\n const handlePreviousPage = () => {\n setCurrentPage(prevPage => Math.max(prevPage - 1, 1))\n }\n const handleNextPage = () => {\n setCurrentPage(prevPage => Math.min(prevPage + 1, totalPages))\n }\n const handleLastPage = () => {\n setCurrentPage(totalPages)\n }\n const handleDelete = async (uuid: string) => {\n await baseSubmitHandler(uuid, async payload => {\n await deleteEmployeeMutation({\n request: { employeeId: payload },\n })\n\n onEvent(componentEvents.EMPLOYEE_DELETED, { employeeId: payload })\n })\n }\n /**Set onboarding status to self_onboarding_awaiting_admin_review and proceed to edit */\n const handleReview = async (data: string) => {\n await baseSubmitHandler(data, async employeeId => {\n await updateOnboardingStatus({\n employeeId,\n status: EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW,\n })\n onEvent(componentEvents.EMPLOYEE_UPDATE, {\n employeeId,\n onboardingStatus: EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW,\n })\n })\n }\n /**Update employee onboarding status reverting it back to admin_onboarding_incomplete */\n const handleCancelSelfOnboarding = async (data: string) => {\n await baseSubmitHandler(data, async employeeId => {\n await updateOnboardingStatus({\n employeeId,\n status: EmployeeOnboardingStatus.ADMIN_ONBOARDING_INCOMPLETE,\n })\n })\n }\n const updateOnboardingStatus = async (data: { employeeId: string; status: OnboardingStatus }) => {\n await baseSubmitHandler(data, async ({ employeeId, status }) => {\n const { employeeOnboardingStatus: responseData } =\n await updateEmployeeOnboardingStatusMutation({\n request: { employeeId, requestBody: { onboardingStatus: status } },\n })\n onEvent(componentEvents.EMPLOYEE_ONBOARDING_STATUS_UPDATED, responseData)\n })\n }\n const handleNew = () => {\n onEvent(componentEvents.EMPLOYEE_CREATE)\n }\n const handleSkip = () => {\n onEvent(componentEvents.EMPLOYEE_ONBOARDING_DONE)\n }\n\n const handleEdit = (uuid: string, onboardingStatus?: OnboardingStatus) => {\n onEvent(componentEvents.EMPLOYEE_UPDATE, { employeeId: uuid, onboardingStatus })\n }\n return (\n <section className={className}>\n <EmployeeListProvider\n value={{\n handleEdit,\n handleNew,\n handleReview,\n handleDelete,\n employees,\n currentPage,\n totalPages,\n handleFirstPage,\n handlePreviousPage,\n handleNextPage,\n handleLastPage,\n handleCancelSelfOnboarding,\n handleItemsPerPageChange,\n handleSkip,\n }}\n >\n {children ? (\n children\n ) : (\n <Flex flexDirection=\"column\">\n <Head />\n <List />\n <Actions />\n </Flex>\n )}\n </EmployeeListProvider>\n </section>\n )\n}\n\
|
|
1
|
+
{"version":3,"file":"EmployeeList.js","sources":["../../../../src/components/Employee/EmployeeList/EmployeeList.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useEmployeesListSuspense } from '@gusto/embedded-api/react-query/employeesList'\nimport type { OnboardingStatus } from '@gusto/embedded-api/models/operations/putv1employeesemployeeidonboardingstatus'\nimport { useEmployeesDeleteMutation } from '@gusto/embedded-api/react-query/employeesDelete'\nimport { useEmployeesUpdateOnboardingStatusMutation } from '@gusto/embedded-api/react-query/employeesUpdateOnboardingStatus'\nimport type { OnboardingContextInterface } from '../OnboardingFlow/OnboardingFlow'\nimport { EmployeeListProvider } from './useEmployeeList'\nimport { Actions } from './Actions'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { Flex } from '@/components/Common'\nimport { useI18n, useComponentDictionary } from '@/i18n'\nimport { componentEvents, EmployeeOnboardingStatus } from '@/shared/constants'\nimport { Head } from '@/components/Employee/EmployeeList/Head'\nimport { List } from '@/components/Employee/EmployeeList/List'\nimport { useFlow } from '@/components/Flow/useFlow'\n\n//Interface for component specific props\ninterface EmployeeListProps extends CommonComponentInterface<'Employee.EmployeeList'> {\n companyId: string\n}\n\nexport function EmployeeList(props: EmployeeListProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\nfunction Root({ companyId, className, children, dictionary }: EmployeeListProps) {\n //Using i18n hook to directly load necessary namespace\n useI18n('Employee.EmployeeList')\n useComponentDictionary('Employee.EmployeeList', dictionary)\n //Getting props from base context\n const { onEvent, baseSubmitHandler } = useBase()\n const [currentPage, setCurrentPage] = useState(1)\n const [itemsPerPage, setItemsPerPage] = useState(5)\n\n const { data } = useEmployeesListSuspense({ companyId, page: currentPage, per: itemsPerPage })\n const { httpMeta, showEmployees: employeeList } = data\n const employees = employeeList!\n\n const { mutateAsync: deleteEmployeeMutation } = useEmployeesDeleteMutation()\n const { mutateAsync: updateEmployeeOnboardingStatusMutation } =\n useEmployeesUpdateOnboardingStatusMutation()\n\n const totalPages = Number(httpMeta.response.headers.get('x-total-pages') ?? 1)\n\n const handleItemsPerPageChange = (newCount: number) => {\n setItemsPerPage(newCount)\n }\n const handleFirstPage = () => {\n setCurrentPage(1)\n }\n const handlePreviousPage = () => {\n setCurrentPage(prevPage => Math.max(prevPage - 1, 1))\n }\n const handleNextPage = () => {\n setCurrentPage(prevPage => Math.min(prevPage + 1, totalPages))\n }\n const handleLastPage = () => {\n setCurrentPage(totalPages)\n }\n const handleDelete = async (uuid: string) => {\n await baseSubmitHandler(uuid, async payload => {\n await deleteEmployeeMutation({\n request: { employeeId: payload },\n })\n\n onEvent(componentEvents.EMPLOYEE_DELETED, { employeeId: payload })\n })\n }\n /**Set onboarding status to self_onboarding_awaiting_admin_review and proceed to edit */\n const handleReview = async (data: string) => {\n await baseSubmitHandler(data, async employeeId => {\n await updateOnboardingStatus({\n employeeId,\n status: EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW,\n })\n onEvent(componentEvents.EMPLOYEE_UPDATE, {\n employeeId,\n onboardingStatus: EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW,\n })\n })\n }\n /**Update employee onboarding status reverting it back to admin_onboarding_incomplete */\n const handleCancelSelfOnboarding = async (data: string) => {\n await baseSubmitHandler(data, async employeeId => {\n await updateOnboardingStatus({\n employeeId,\n status: EmployeeOnboardingStatus.ADMIN_ONBOARDING_INCOMPLETE,\n })\n })\n }\n const updateOnboardingStatus = async (data: { employeeId: string; status: OnboardingStatus }) => {\n await baseSubmitHandler(data, async ({ employeeId, status }) => {\n const { employeeOnboardingStatus: responseData } =\n await updateEmployeeOnboardingStatusMutation({\n request: { employeeId, requestBody: { onboardingStatus: status } },\n })\n onEvent(componentEvents.EMPLOYEE_ONBOARDING_STATUS_UPDATED, responseData)\n })\n }\n const handleNew = () => {\n onEvent(componentEvents.EMPLOYEE_CREATE)\n }\n const handleSkip = () => {\n onEvent(componentEvents.EMPLOYEE_ONBOARDING_DONE)\n }\n\n const handleEdit = (uuid: string, onboardingStatus?: OnboardingStatus) => {\n onEvent(componentEvents.EMPLOYEE_UPDATE, { employeeId: uuid, onboardingStatus })\n }\n return (\n <section className={className}>\n <EmployeeListProvider\n value={{\n handleEdit,\n handleNew,\n handleReview,\n handleDelete,\n employees,\n currentPage,\n totalPages,\n handleFirstPage,\n handlePreviousPage,\n handleNextPage,\n handleLastPage,\n handleCancelSelfOnboarding,\n handleItemsPerPageChange,\n handleSkip,\n }}\n >\n {children ? (\n children\n ) : (\n <Flex flexDirection=\"column\">\n <Head />\n <List />\n <Actions />\n </Flex>\n )}\n </EmployeeListProvider>\n </section>\n )\n}\n\n/**\n * Wrapper used inside Flows -> exposes flow context for required parameters\n */\nexport const EmployeeListContextual = () => {\n const { companyId, onEvent } = useFlow<OnboardingContextInterface>()\n return <EmployeeList companyId={companyId} onEvent={onEvent} />\n}\n"],"names":["EmployeeList","props","jsx","BaseComponent","Root","companyId","className","children","dictionary","useI18n","useComponentDictionary","onEvent","baseSubmitHandler","useBase","currentPage","setCurrentPage","useState","itemsPerPage","setItemsPerPage","data","useEmployeesListSuspense","httpMeta","employeeList","employees","deleteEmployeeMutation","useEmployeesDeleteMutation","updateEmployeeOnboardingStatusMutation","useEmployeesUpdateOnboardingStatusMutation","totalPages","handleItemsPerPageChange","newCount","handleFirstPage","handlePreviousPage","prevPage","handleNextPage","handleLastPage","handleDelete","uuid","payload","componentEvents","handleReview","employeeId","updateOnboardingStatus","EmployeeOnboardingStatus","handleCancelSelfOnboarding","status","responseData","EmployeeListProvider","onboardingStatus","jsxs","Flex","Head","List","Actions","EmployeeListContextual","useFlow"],"mappings":"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"}
|
|
@@ -21,8 +21,8 @@ export declare const AdminSelfOnboardingPersonalDetailsSchema: z.ZodObject<{
|
|
|
21
21
|
email: string;
|
|
22
22
|
firstName: string;
|
|
23
23
|
lastName: string;
|
|
24
|
-
workAddress: string;
|
|
25
24
|
startDate: Date;
|
|
25
|
+
workAddress: string;
|
|
26
26
|
selfOnboarding: boolean;
|
|
27
27
|
middleInitial?: string | undefined;
|
|
28
28
|
}>;
|
|
@@ -54,8 +54,8 @@ export declare const AdminPersonalDetailsSchema: z.ZodDiscriminatedUnion<"enable
|
|
|
54
54
|
ssn: string;
|
|
55
55
|
firstName: string;
|
|
56
56
|
lastName: string;
|
|
57
|
-
workAddress: string;
|
|
58
57
|
startDate: Date;
|
|
58
|
+
workAddress: string;
|
|
59
59
|
enableSsn: true;
|
|
60
60
|
dateOfBirth: Date;
|
|
61
61
|
selfOnboarding: boolean;
|
|
@@ -88,8 +88,8 @@ export declare const AdminPersonalDetailsSchema: z.ZodDiscriminatedUnion<"enable
|
|
|
88
88
|
email: string;
|
|
89
89
|
firstName: string;
|
|
90
90
|
lastName: string;
|
|
91
|
-
workAddress: string;
|
|
92
91
|
startDate: Date;
|
|
92
|
+
workAddress: string;
|
|
93
93
|
enableSsn: false;
|
|
94
94
|
dateOfBirth: Date;
|
|
95
95
|
selfOnboarding: boolean;
|
|
@@ -25,8 +25,8 @@ export declare const AdminInputsSchema: z.ZodObject<{
|
|
|
25
25
|
startDate?: string | undefined;
|
|
26
26
|
}, {
|
|
27
27
|
email: string;
|
|
28
|
-
workAddress: string;
|
|
29
28
|
startDate: Date;
|
|
29
|
+
workAddress: string;
|
|
30
30
|
}>;
|
|
31
31
|
interface AdminInputsProps {
|
|
32
32
|
companyLocations: Location[];
|
|
@@ -83,8 +83,8 @@ declare const PersonalDetailsTotalSchema: z.ZodObject<{
|
|
|
83
83
|
ssn: string;
|
|
84
84
|
firstName: string;
|
|
85
85
|
lastName: string;
|
|
86
|
-
workAddress: string;
|
|
87
86
|
startDate: Date;
|
|
87
|
+
workAddress: string;
|
|
88
88
|
enableSsn: boolean;
|
|
89
89
|
dateOfBirth: Date;
|
|
90
90
|
selfOnboarding: boolean;
|
|
@@ -24,13 +24,5 @@ interface ProfileProps extends CommonComponentInterface<'Employee.Profile'> {
|
|
|
24
24
|
isSelfOnboardingEnabled?: boolean;
|
|
25
25
|
}
|
|
26
26
|
export declare function Profile(props: ProfileProps & BaseComponentInterface): import("react/jsx-runtime").JSX.Element;
|
|
27
|
-
export declare namespace Profile {
|
|
28
|
-
var Head: () => import("react/jsx-runtime").JSX.Element;
|
|
29
|
-
var Actions: () => import("react/jsx-runtime").JSX.Element;
|
|
30
|
-
var AdminPersonalDetails: () => import("react/jsx-runtime").JSX.Element | null;
|
|
31
|
-
var SelfPersonalDetails: () => import("react/jsx-runtime").JSX.Element | null;
|
|
32
|
-
var HomeAddress: () => import("react/jsx-runtime").JSX.Element | null;
|
|
33
|
-
var WorkAddress: typeof import("./WorkAddress").WorkAddress;
|
|
34
|
-
}
|
|
35
27
|
export declare const ProfileContextual: () => import("react/jsx-runtime").JSX.Element;
|
|
36
28
|
export {};
|