@legalplace/wizardx-core 2.11.3 → 2.11.4
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 +11 -0
- package/dist/redux/reducers/app/instance/initInstance.js +1 -2
- package/dist/redux/reducers/app/instance/updateInstance.js +2 -2
- package/dist/redux/reducers/app/instance.test.js +0 -2
- package/dist/redux/reducers/app.test.js +0 -3
- package/dist/redux/sagas/fetchModel.js +0 -3
- package/dist/redux/sagas/fetchModel.test.js +0 -1
- package/dist/types/State.type.d.ts +0 -1
- package/dist/types/api.type.d.ts +0 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.11.4](https://git.legalplace.eu/legalplace/monorepo/compare/@legalplace/wizardx-core@2.11.3...@legalplace/wizardx-core@2.11.4) (2022-07-20)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* delete isOrderHandled and put logic on api ([ef92a6b](https://git.legalplace.eu/legalplace/monorepo/commits/ef92a6b3f46c39a4c7e6f158b0ccf07193ed40c6)), closes [api#5886](https://git.legalplace.eu/legalplace/monorepo/issues/5886)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [2.11.3](https://git.legalplace.eu/legalplace/monorepo/compare/@legalplace/wizardx-core@2.11.2...@legalplace/wizardx-core@2.11.3) (2022-06-07)
|
|
7
18
|
|
|
8
19
|
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
export const initInstanceReducer = (state, action) => {
|
|
2
|
-
const { uniqid, isPaid, dataStatus, steps,
|
|
2
|
+
const { uniqid, isPaid, dataStatus, steps, companyId, employeeId } = action;
|
|
3
3
|
return Object.assign(Object.assign({}, state), { instance: {
|
|
4
4
|
dataStatus,
|
|
5
|
-
isOrderHandled,
|
|
6
5
|
uniqid,
|
|
7
6
|
isPaid,
|
|
8
7
|
steps,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const updateInstanceReducer = (state, action) => {
|
|
2
|
-
const { uniqid, isPaid, dataStatus, steps,
|
|
3
|
-
return Object.assign(Object.assign({}, state), { instance: Object.assign(Object.assign({}, state.instance), { dataStatus: dataStatus || state.instance.dataStatus,
|
|
2
|
+
const { uniqid, isPaid, dataStatus, steps, companyId, employeeId } = action;
|
|
3
|
+
return Object.assign(Object.assign({}, state), { instance: Object.assign(Object.assign({}, state.instance), { dataStatus: dataStatus || state.instance.dataStatus, uniqid: uniqid || state.instance.uniqid, isPaid, steps: steps || state.instance.steps, companyId,
|
|
4
4
|
employeeId }) });
|
|
5
5
|
};
|
|
@@ -27,7 +27,6 @@ const appStateMock = {
|
|
|
27
27
|
instance: {
|
|
28
28
|
dataStatus: 'saved',
|
|
29
29
|
uniqid: '3jHD42343sDE',
|
|
30
|
-
isOrderHandled: undefined,
|
|
31
30
|
isPaid: false,
|
|
32
31
|
steps: '*',
|
|
33
32
|
},
|
|
@@ -45,7 +44,6 @@ describe('App Instance Reducer', () => {
|
|
|
45
44
|
return expect(reducer).toStrictEqual(Object.assign(Object.assign({}, appStateMock), { instance: {
|
|
46
45
|
dataStatus: 'saved',
|
|
47
46
|
uniqid: '3jHD42343sDE',
|
|
48
|
-
isOrderHandled: undefined,
|
|
49
47
|
companyId: undefined,
|
|
50
48
|
employeeId: undefined,
|
|
51
49
|
isPaid: true,
|
|
@@ -27,7 +27,6 @@ const appStateMock = {
|
|
|
27
27
|
employeeId: undefined,
|
|
28
28
|
dataStatus: 'saved',
|
|
29
29
|
uniqid: '3jHD42343sDE',
|
|
30
|
-
isOrderHandled: undefined,
|
|
31
30
|
isPaid: false,
|
|
32
31
|
steps: '*',
|
|
33
32
|
},
|
|
@@ -88,7 +87,6 @@ describe('App Reducer test suit', () => {
|
|
|
88
87
|
return expect(reducer).toStrictEqual(Object.assign(Object.assign({}, appStateMock), { instance: {
|
|
89
88
|
dataStatus: 'saved',
|
|
90
89
|
uniqid: 'SomeUniqid123',
|
|
91
|
-
isOrderHandled: undefined,
|
|
92
90
|
employeeId: undefined,
|
|
93
91
|
companyId: undefined,
|
|
94
92
|
isPaid: true,
|
|
@@ -105,7 +103,6 @@ describe('App Reducer test suit', () => {
|
|
|
105
103
|
});
|
|
106
104
|
return expect(reducer).toStrictEqual(Object.assign(Object.assign({}, appStateMock), { instance: {
|
|
107
105
|
dataStatus: 'saved',
|
|
108
|
-
isOrderHandled: undefined,
|
|
109
106
|
employeeId: undefined,
|
|
110
107
|
companyId: undefined,
|
|
111
108
|
uniqid: '3jHD42343sDE',
|
|
@@ -156,7 +156,6 @@ function* fetchInstanceInformation(appStates, permalink, uniqid, uniqidParam, pr
|
|
|
156
156
|
draft: response.instance && response.instance.draft,
|
|
157
157
|
companyId: (_a = response.instance) === null || _a === void 0 ? void 0 : _a.companyId,
|
|
158
158
|
employeeId: (_b = response.instance) === null || _b === void 0 ? void 0 : _b.employeeId,
|
|
159
|
-
isOrderHandled: response.instance && response.instance.isOrderHandled,
|
|
160
159
|
isPaid: response.instance &&
|
|
161
160
|
(response.instance.isPaid.toString() === "1" ||
|
|
162
161
|
response.instance.isPaid === true),
|
|
@@ -199,7 +198,6 @@ function* createInstance(enableShadowInstance, modelInformation, uniqid, permali
|
|
|
199
198
|
draft: false,
|
|
200
199
|
companyId: undefined,
|
|
201
200
|
employeeId: undefined,
|
|
202
|
-
isOrderHandled: undefined,
|
|
203
201
|
isPaid: false,
|
|
204
202
|
steps: [1],
|
|
205
203
|
};
|
|
@@ -218,7 +216,6 @@ function* createInstance(enableShadowInstance, modelInformation, uniqid, permali
|
|
|
218
216
|
}
|
|
219
217
|
instance.uniqid = instanceResponse.uniqid;
|
|
220
218
|
instance.isPaid = instanceResponse.isPaid === true;
|
|
221
|
-
instance.isOrderHandled = instanceResponse.isOrderHandled;
|
|
222
219
|
instance.steps =
|
|
223
220
|
typeof instanceResponse.steps === "string" ||
|
|
224
221
|
Array.isArray(instanceResponse.steps)
|
package/dist/types/api.type.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legalplace/wizardx-core",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.4",
|
|
4
4
|
"author": "Moncef Hammou (moncef@legalplace.fr)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"*.test.ts",
|
|
93
93
|
"*.test.tsx"
|
|
94
94
|
],
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "8b126b0ca7f57d1697107db725a0a9aee6cd4af6"
|
|
96
96
|
}
|