@zeniai/client-epic-state 4.14.65 → 4.14.67
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/configureStore.d.ts +1 -6
- package/lib/configureStore.js +7 -4
- package/lib/entity/taskGroupTemplate/taskGroupTemplatePayload.d.ts +1 -0
- package/lib/entity/taskGroupTemplate/taskGroupTemplateReducer.js +4 -0
- package/lib/entity/taskGroupTemplate/taskGroupTemplateState.d.ts +2 -0
- package/lib/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewEpic.js +13 -0
- package/package.json +4 -2
package/lib/configureStore.d.ts
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import { Store
|
|
1
|
+
import { Store } from 'redux';
|
|
2
2
|
import { RootState } from './reducer';
|
|
3
3
|
import { ZeniAPI } from './zeniAPI';
|
|
4
|
-
declare global {
|
|
5
|
-
interface Window {
|
|
6
|
-
__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?: (...funcs: StoreEnhancer[]) => StoreEnhancer;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
4
|
export default function configureNewStore(zeniAPI: ZeniAPI, includeReduxDevTools?: boolean): Store<RootState>;
|
package/lib/configureStore.js
CHANGED
|
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.default = configureNewStore;
|
|
7
|
+
const extension_1 = require("@redux-devtools/extension");
|
|
7
8
|
const redux_1 = require("redux");
|
|
8
9
|
const redux_observable_1 = require("redux-observable");
|
|
9
10
|
const epic_1 = __importDefault(require("./epic"));
|
|
@@ -11,10 +12,12 @@ const reducer_1 = __importDefault(require("./reducer"));
|
|
|
11
12
|
let epicMiddleware;
|
|
12
13
|
function configureNewStore(zeniAPI, includeReduxDevTools = false) {
|
|
13
14
|
epicMiddleware = (0, redux_observable_1.createEpicMiddleware)({ dependencies: zeniAPI });
|
|
14
|
-
const composeEnhancers = includeReduxDevTools
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
const composeEnhancers = includeReduxDevTools
|
|
16
|
+
? (0, extension_1.composeWithDevTools)({
|
|
17
|
+
name: 'Zeni',
|
|
18
|
+
trace: true,
|
|
19
|
+
traceLimit: 500,
|
|
20
|
+
})
|
|
18
21
|
: redux_1.compose;
|
|
19
22
|
const store = (0, redux_1.createStore)(reducer_1.default, composeEnhancers((0, redux_1.applyMiddleware)(epicMiddleware)));
|
|
20
23
|
epicMiddleware.run(epic_1.default);
|
|
@@ -3,6 +3,7 @@ var _a;
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.clearAllTaskGroupTemplates = exports.updateTaskGroupTemplates = exports.initialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
+
const zeniDayJS_1 = require("../../zeniDayJS");
|
|
6
7
|
exports.initialState = {
|
|
7
8
|
taskGroupTemplateById: {},
|
|
8
9
|
};
|
|
@@ -16,6 +17,9 @@ const taskGroupTemplate = (0, toolkit_1.createSlice)({
|
|
|
16
17
|
id: templatePayload.group_name,
|
|
17
18
|
name: templatePayload.group_name,
|
|
18
19
|
tasks: templatePayload.tasks,
|
|
20
|
+
createdAt: templatePayload.created_at != null
|
|
21
|
+
? (0, zeniDayJS_1.date)(templatePayload.created_at)
|
|
22
|
+
: undefined,
|
|
19
23
|
};
|
|
20
24
|
}
|
|
21
25
|
},
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ID } from '../../commonStateTypes/common';
|
|
2
|
+
import { ZeniDate } from '../../zeniDayJS';
|
|
2
3
|
interface TaskTemplate {
|
|
3
4
|
name: string;
|
|
4
5
|
}
|
|
@@ -6,6 +7,7 @@ export interface TaskGroupTemplate {
|
|
|
6
7
|
id: ID;
|
|
7
8
|
name: string;
|
|
8
9
|
tasks: TaskTemplate[];
|
|
10
|
+
createdAt?: ZeniDate;
|
|
9
11
|
}
|
|
10
12
|
export interface TaskGroupTemplateState {
|
|
11
13
|
taskGroupTemplateById: Record<ID, TaskGroupTemplate>;
|
|
@@ -9,6 +9,7 @@ const companyReducer_1 = require("../../../../../entity/company/companyReducer")
|
|
|
9
9
|
const fileReducer_1 = require("../../../../../entity/file/fileReducer");
|
|
10
10
|
const paymentAccountReducer_1 = require("../../../../../entity/paymentAccount/paymentAccountReducer");
|
|
11
11
|
const snackbarReducer_1 = require("../../../../../entity/snackbar/snackbarReducer");
|
|
12
|
+
const tenantSelector_1 = require("../../../../../entity/tenant/tenantSelector");
|
|
12
13
|
const userReducer_1 = require("../../../../../entity/user/userReducer");
|
|
13
14
|
const userRoleReducer_1 = require("../../../../../entity/userRole/userRoleReducer");
|
|
14
15
|
const responsePayload_1 = require("../../../../../responsePayload");
|
|
@@ -76,6 +77,7 @@ const updateOnboardingCustomerViewEpic = (actions$, state$, zeniAPI) => actions$
|
|
|
76
77
|
return zeniAPI
|
|
77
78
|
.putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/companies/${companyId}`, payload)
|
|
78
79
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
80
|
+
var _a, _b;
|
|
79
81
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
80
82
|
const { users } = response.data;
|
|
81
83
|
const actions = [
|
|
@@ -90,6 +92,17 @@ const updateOnboardingCustomerViewEpic = (actions$, state$, zeniAPI) => actions$
|
|
|
90
92
|
(0, accountReducer_1.updateAccounts)(response.data.accounts, 'onboarding'),
|
|
91
93
|
(0, paymentAccountReducer_1.updatePaymentAccounts)(response.data.payment_accounts),
|
|
92
94
|
];
|
|
95
|
+
const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state$.value);
|
|
96
|
+
const externalConnections = currentTenant.externalConnections;
|
|
97
|
+
const isQBOConnection = (_b = (_a = externalConnections === null || externalConnections === void 0 ? void 0 : externalConnections.accounting) === null || _a === void 0 ? void 0 : _a.some((connection) => connection.connectionName.match(/quickbooks/i))) !== null && _b !== void 0 ? _b : false;
|
|
98
|
+
if (currentStep === 'link_payment_account') {
|
|
99
|
+
if (isQBOConnection === true) {
|
|
100
|
+
actions.push((0, onboardingCustomerViewReducer_1.updateCurrentStep)({ step: 'qbo_connection' }));
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
actions.push((0, onboardingCustomerViewReducer_1.updateCurrentStep)({ step: 'company_officer' }));
|
|
104
|
+
}
|
|
105
|
+
}
|
|
93
106
|
if (currentStep === 'company_officer') {
|
|
94
107
|
actions.push((0, onboardingCustomerViewReducer_1.updateCurrentStep)({ step: 'company_details' }));
|
|
95
108
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.14.
|
|
3
|
+
"version": "4.14.67",
|
|
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",
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"typescript": "^5.7.3"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
+
"@redux-devtools/extension": "^3.3.0",
|
|
54
55
|
"@reduxjs/toolkit": "^1.6.2",
|
|
55
56
|
"@stripe/stripe-js": "^4.4.0",
|
|
56
57
|
"cross-fetch": "^3.1.2",
|
|
@@ -97,6 +98,7 @@
|
|
|
97
98
|
"bump-update-web-app-cockpit-beta": "chmod +x ./scripts/bump_and_update_web_app_ui_beta.sh && ./scripts/bump_and_update_web_app_ui_beta.sh",
|
|
98
99
|
"send-release-notes": "chmod +x ./scripts/send_release_notes.sh && ./scripts/send_release_notes.sh",
|
|
99
100
|
"update-slack-group-topic": "chmod +x ./scripts/update-slack-group-topic.sh && ./scripts/update-slack-group-topic.sh",
|
|
100
|
-
"build-beta-and-copy": "chmod +x ./scripts/build_and_copy.sh && ./scripts/build_and_copy.sh"
|
|
101
|
+
"build-beta-and-copy": "chmod +x ./scripts/build_and_copy.sh && ./scripts/build_and_copy.sh",
|
|
102
|
+
"pr-approvals-update": "chmod +x ./scripts/pr_approvals.sh && ./scripts/pr_approvals.sh"
|
|
101
103
|
}
|
|
102
104
|
}
|