@zeniai/client-epic-state 4.15.5 → 4.15.7
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/lib/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewCompleteStatusEpic.js +14 -2
- package/lib/view/onboardingView/customerView/onboardingCustomerViewPayload.d.ts +5 -0
- package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.d.ts +3 -1
- package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.js +2 -2
- package/package.json +2 -2
|
@@ -8,9 +8,21 @@ const snackbarReducer_1 = require("../../../../../entity/snackbar/snackbarReduce
|
|
|
8
8
|
const responsePayload_1 = require("../../../../../responsePayload");
|
|
9
9
|
const onboardingCustomerViewReducer_1 = require("../../onboardingCustomerViewReducer");
|
|
10
10
|
const updateOnboardingCustomerViewCompleteStatusEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(onboardingCustomerViewReducer_1.updateOnboardingCustomerViewCompleteStatus.match), (0, operators_1.mergeMap)((action) => {
|
|
11
|
-
const { companyId } = action.payload;
|
|
11
|
+
const { companyId, checkOnboardingComplete, productSuitePage } = action.payload;
|
|
12
|
+
const payload = {};
|
|
13
|
+
if (productSuitePage === false && checkOnboardingComplete === false) {
|
|
14
|
+
payload.is_onboarding_completed = true;
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
if (checkOnboardingComplete) {
|
|
18
|
+
payload.should_complete_onboarding = true;
|
|
19
|
+
}
|
|
20
|
+
if (productSuitePage) {
|
|
21
|
+
payload.is_user_landed_to_interim_page = true;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
12
24
|
return zeniAPI
|
|
13
|
-
.putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/companies/${companyId}`,
|
|
25
|
+
.putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/companies/${companyId}`, payload)
|
|
14
26
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
15
27
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
16
28
|
const actions = [
|
|
@@ -10,6 +10,11 @@ import { ZeniAPIResponse } from '../../../responsePayload';
|
|
|
10
10
|
/**
|
|
11
11
|
* Onboarding Customer View Payload
|
|
12
12
|
*/
|
|
13
|
+
export interface OnboardingStatusPayload {
|
|
14
|
+
is_user_landed_to_interim_page: boolean;
|
|
15
|
+
should_complete_onboarding: boolean;
|
|
16
|
+
is_onboarding_completed: boolean;
|
|
17
|
+
}
|
|
13
18
|
interface CompaniesData {
|
|
14
19
|
companies: CompanyPayload[];
|
|
15
20
|
}
|
|
@@ -12,8 +12,10 @@ export declare const fetchOnboardingCustomerView: import("@reduxjs/toolkit").Act
|
|
|
12
12
|
companyId: string;
|
|
13
13
|
cacheOverride: any;
|
|
14
14
|
reCalculateCurrentStep: any;
|
|
15
|
-
}, "onboardingCustomerView/fetchOnboardingCustomerSetupView", never, never>, fetchOnboardingCustomerSetupViewSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"onboardingCustomerView/fetchOnboardingCustomerSetupViewSuccess">, fetchOnboardingCustomerSetupViewFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[error: ZeniAPIStatus<Record<string, unknown>>], ZeniAPIStatus<Record<string, unknown>>, "onboardingCustomerView/fetchOnboardingCustomerSetupViewFailure", never, never>, updateOnboardingCustomerViewCompleteStatus: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string], {
|
|
15
|
+
}, "onboardingCustomerView/fetchOnboardingCustomerSetupView", never, never>, fetchOnboardingCustomerSetupViewSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"onboardingCustomerView/fetchOnboardingCustomerSetupViewSuccess">, fetchOnboardingCustomerSetupViewFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[error: ZeniAPIStatus<Record<string, unknown>>], ZeniAPIStatus<Record<string, unknown>>, "onboardingCustomerView/fetchOnboardingCustomerSetupViewFailure", never, never>, updateOnboardingCustomerViewCompleteStatus: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string, checkOnboardingComplete?: boolean | undefined, productSuitePage?: boolean | undefined], {
|
|
16
16
|
companyId: string;
|
|
17
|
+
checkOnboardingComplete: boolean;
|
|
18
|
+
productSuitePage: boolean;
|
|
17
19
|
}, "onboardingCustomerView/updateOnboardingCustomerViewCompleteStatus", never, never>, updateOnboardingCustomerViewCompleteStatusSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"onboardingCustomerView/updateOnboardingCustomerViewCompleteStatusSuccess">, updateOnboardingCustomerViewCompleteStatusFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[error: ZeniAPIStatus<Record<string, unknown>>], ZeniAPIStatus<Record<string, unknown>>, "onboardingCustomerView/updateOnboardingCustomerViewCompleteStatusFailure", never, never>, updateOnboardingCustomerView: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string, sendForVerification: boolean, reCalculateCurrentStep?: boolean | undefined, isBillingAddressUpdate?: boolean | undefined, officerType?: "Officer_2" | "Officer_1" | "Officer_3" | "Officer_4" | "Officer_8" | "Officer_5" | "Officer_6" | "Officer_10" | "Officer_7" | "Officer_9" | undefined], {
|
|
18
20
|
companyId: string;
|
|
19
21
|
sendForVerification: boolean;
|
|
@@ -164,9 +164,9 @@ const onboardingCustomerView = (0, toolkit_1.createSlice)({
|
|
|
164
164
|
reducer(draft) {
|
|
165
165
|
draft.updateStatus = { fetchState: 'In-Progress', error: undefined };
|
|
166
166
|
},
|
|
167
|
-
prepare(companyId) {
|
|
167
|
+
prepare(companyId, checkOnboardingComplete = false, productSuitePage = false) {
|
|
168
168
|
return {
|
|
169
|
-
payload: { companyId },
|
|
169
|
+
payload: { companyId, checkOnboardingComplete, productSuitePage },
|
|
170
170
|
};
|
|
171
171
|
},
|
|
172
172
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.15.
|
|
3
|
+
"version": "4.15.7",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://github.com/zeni-ai/client-epic-state#readme",
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@liveblocks/client": "^2.
|
|
28
|
+
"@liveblocks/client": "^2.23.0",
|
|
29
29
|
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
|
|
30
30
|
"@types/chai": "^5.0.1",
|
|
31
31
|
"@types/jest": "^29.5.14",
|