@truedat/dd 7.12.0 → 7.12.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/dd",
|
|
3
|
-
"version": "7.12.
|
|
3
|
+
"version": "7.12.1",
|
|
4
4
|
"description": "Truedat Web Data Dictionary",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"module": "src/index.js",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@testing-library/jest-dom": "^6.6.3",
|
|
49
49
|
"@testing-library/react": "^16.3.0",
|
|
50
50
|
"@testing-library/user-event": "^14.6.1",
|
|
51
|
-
"@truedat/test": "7.12.
|
|
51
|
+
"@truedat/test": "7.12.1",
|
|
52
52
|
"identity-obj-proxy": "^3.0.0",
|
|
53
53
|
"jest": "^29.7.0",
|
|
54
54
|
"redux-saga-test-plan": "^4.0.6"
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"svg-pan-zoom": "^3.6.2",
|
|
84
84
|
"swr": "^2.3.3"
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "b89751f9b306e3efd68dc2bbdab718e2fed62d07"
|
|
87
87
|
}
|
|
@@ -28,9 +28,8 @@ export const EditDomainForm = ({
|
|
|
28
28
|
|
|
29
29
|
const onSubmit = () => {
|
|
30
30
|
const data_structure = { id: structure.id, domain_ids: domainIds };
|
|
31
|
-
const redirect = linkTo.STRUCTURE_NOTES(data_structure);
|
|
32
31
|
|
|
33
|
-
updateStructure({ data_structure, inherit
|
|
32
|
+
updateStructure({ data_structure, inherit });
|
|
34
33
|
};
|
|
35
34
|
|
|
36
35
|
return (
|
|
@@ -70,7 +70,6 @@ describe("<EditDomainForm />", () => {
|
|
|
70
70
|
expect.objectContaining({
|
|
71
71
|
data_structure: { domain_ids: ["1"], id: 42 },
|
|
72
72
|
inherit: true,
|
|
73
|
-
redirect: "/structures/42/notes",
|
|
74
73
|
})
|
|
75
74
|
);
|
|
76
75
|
});
|
|
@@ -97,7 +96,6 @@ describe("<EditDomainForm />", () => {
|
|
|
97
96
|
expect.objectContaining({
|
|
98
97
|
data_structure: { domain_ids: ["1"], id: 42 },
|
|
99
98
|
inherit: false,
|
|
100
|
-
redirect: "/structures/42/notes",
|
|
101
99
|
})
|
|
102
100
|
);
|
|
103
101
|
});
|
|
@@ -124,7 +122,6 @@ describe("<EditDomainForm />", () => {
|
|
|
124
122
|
expect.objectContaining({
|
|
125
123
|
data_structure: { domain_ids: ["2", "1"], id: 42 },
|
|
126
124
|
inherit: true,
|
|
127
|
-
redirect: "/structures/42/notes",
|
|
128
125
|
})
|
|
129
126
|
);
|
|
130
127
|
});
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
updateStructureRequestSaga,
|
|
6
6
|
updateStructureSaga,
|
|
7
7
|
} from "../updateStructure";
|
|
8
|
-
import { updateStructure } from "../../routines";
|
|
8
|
+
import { updateStructure, fetchStructure} from "../../routines";
|
|
9
9
|
import { API_DATA_STRUCTURE } from "../../api";
|
|
10
10
|
|
|
11
11
|
describe("sagas: updateStructureRequestSaga", () => {
|
|
@@ -50,6 +50,8 @@ describe("sagas: updateStructureSaga", () => {
|
|
|
50
50
|
.next({ data: data_structure })
|
|
51
51
|
.put(updateStructure.success(successData))
|
|
52
52
|
.next()
|
|
53
|
+
.put(fetchStructure.trigger(data_structure))
|
|
54
|
+
.next()
|
|
53
55
|
.put(updateStructure.fulfill())
|
|
54
56
|
.next()
|
|
55
57
|
.isDone();
|
|
@@ -2,7 +2,8 @@ import _ from "lodash/fp";
|
|
|
2
2
|
import { compile } from "path-to-regexp";
|
|
3
3
|
import { call, put, takeLatest } from "redux-saga/effects";
|
|
4
4
|
import { apiJsonPatch, JSON_OPTS } from "@truedat/core/services/api";
|
|
5
|
-
import { updateStructure } from "../routines";
|
|
5
|
+
import { updateStructure, fetchStructure } from "../routines";
|
|
6
|
+
|
|
6
7
|
import { API_DATA_STRUCTURE } from "../api";
|
|
7
8
|
|
|
8
9
|
export function* updateStructureSaga({ payload }) {
|
|
@@ -15,8 +16,10 @@ export function* updateStructureSaga({ payload }) {
|
|
|
15
16
|
};
|
|
16
17
|
yield put(updateStructure.request());
|
|
17
18
|
const { data } = yield call(apiJsonPatch, url, requestData, JSON_OPTS);
|
|
19
|
+
|
|
18
20
|
const successPayload = redirect ? { ...data, redirect } : data;
|
|
19
21
|
yield put(updateStructure.success(successPayload));
|
|
22
|
+
yield put(fetchStructure.trigger(data_structure));
|
|
20
23
|
} catch (error) {
|
|
21
24
|
if (error.response) {
|
|
22
25
|
const { status, data } = error.response;
|