@truedat/dd 4.36.1 → 4.36.5
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 +10 -3
- package/package.json +5 -5
- package/src/components/StructureSelectedFilters.js +0 -5
- package/src/components/StructureSelectorInputFieldJoin.js +7 -3
- package/src/components/__tests__/__snapshots__/GrantRequest.spec.js.snap +2 -0
- package/src/messages/en.js +17 -7
- package/src/messages/es.js +13 -4
- package/src/reducers/__tests__/graph.spec.js +1 -1
- package/src/reducers/__tests__/structureImpactGraph.spec.js +5 -5
- package/src/reducers/__tests__/structureLineageGraph.spec.js +5 -5
- package/src/reducers/ddMessage.js +48 -51
- package/src/sagas/__tests__/bulkUpdateStructures.spec.js +1 -1
- package/src/sagas/__tests__/uploadStructures.spec.js +2 -2
- package/src/sagas/bulkUpdateStructures.js +1 -1
- package/src/sagas/uploadStructures.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [4.36.
|
|
3
|
+
## [4.36.5] 2022-01-20
|
|
4
4
|
|
|
5
|
-
###
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- [TD-4100] Long Alert error message CSV download link
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## [4.36.3] 2022-01-18
|
|
11
|
+
|
|
12
|
+
### Added
|
|
6
13
|
|
|
7
|
-
- [TD-
|
|
14
|
+
- [TD-4100] Allow partial loads for notes in case that there are errors on the file
|
|
8
15
|
|
|
9
16
|
## [4.36.0] 2022-01-13
|
|
10
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/dd",
|
|
3
|
-
"version": "4.36.
|
|
3
|
+
"version": "4.36.5",
|
|
4
4
|
"description": "Truedat Web Data Dictionary",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"jsnext:main": "src/index.js",
|
|
@@ -84,9 +84,9 @@
|
|
|
84
84
|
]
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {
|
|
87
|
-
"@truedat/auth": "4.36.
|
|
88
|
-
"@truedat/core": "4.36.
|
|
89
|
-
"@truedat/df": "4.36.
|
|
87
|
+
"@truedat/auth": "4.36.5",
|
|
88
|
+
"@truedat/core": "4.36.5",
|
|
89
|
+
"@truedat/df": "4.36.5",
|
|
90
90
|
"lodash": "^4.17.21",
|
|
91
91
|
"path-to-regexp": "^1.7.0",
|
|
92
92
|
"prop-types": "^15.7.2",
|
|
@@ -107,5 +107,5 @@
|
|
|
107
107
|
"react-dom": ">= 16.8.6 < 17",
|
|
108
108
|
"semantic-ui-react": ">= 0.88.2 < 2.1"
|
|
109
109
|
},
|
|
110
|
-
"gitHead": "
|
|
110
|
+
"gitHead": "dec36033435443b730ea93fa482ef1ca7dbf28a6"
|
|
111
111
|
}
|
|
@@ -37,11 +37,6 @@ const translations = (formatMessage, structureTypes) => ({
|
|
|
37
37
|
id: `filters.with_profiling.raw.${v}`,
|
|
38
38
|
defaultMessage: v,
|
|
39
39
|
}),
|
|
40
|
-
"has_field_child.raw": (v) =>
|
|
41
|
-
formatMessage({
|
|
42
|
-
id: `filters.has_field_child.raw.${v}`,
|
|
43
|
-
defaultMessage: v,
|
|
44
|
-
}),
|
|
45
40
|
linked_concepts_count: (v) =>
|
|
46
41
|
formatMessage({
|
|
47
42
|
id: `filters.linked_concepts_count.${v}`,
|
|
@@ -124,10 +124,14 @@ export const StructureSelectorInputFieldJoin = ({
|
|
|
124
124
|
];
|
|
125
125
|
const deleteClause = (idx) => handleSelectField(removeAt(clauses, idx));
|
|
126
126
|
const handleChange = (prop, idx) => (data) => {
|
|
127
|
-
const {
|
|
127
|
+
const {
|
|
128
|
+
data_structure_id: id,
|
|
129
|
+
parent_index: parent_index,
|
|
130
|
+
name: name,
|
|
131
|
+
} = data;
|
|
128
132
|
const newClause = _.isNil(parent_index)
|
|
129
|
-
? { ...clauses[idx], [prop]: { id } }
|
|
130
|
-
: { ...clauses[idx], [prop]: { id, parent_index } };
|
|
133
|
+
? { ...clauses[idx], [prop]: { id, name } }
|
|
134
|
+
: { ...clauses[idx], [prop]: { id, parent_index, name } };
|
|
131
135
|
const newClauses = _.set(`[${idx}]`, newClause)(clauses);
|
|
132
136
|
handleSelectField(newClauses);
|
|
133
137
|
};
|
|
@@ -294,6 +294,7 @@ exports[`<GrantRequest /> matches the latest snapshot with approve actions 1`] =
|
|
|
294
294
|
<span
|
|
295
295
|
class="highlighted"
|
|
296
296
|
>
|
|
297
|
+
|
|
297
298
|
"foo"
|
|
298
299
|
</span>
|
|
299
300
|
</a>
|
|
@@ -560,6 +561,7 @@ exports[`<GrantRequest /> matches the latest snapshot with failed status 1`] = `
|
|
|
560
561
|
<span
|
|
561
562
|
class="highlighted"
|
|
562
563
|
>
|
|
564
|
+
|
|
563
565
|
"foo"
|
|
564
566
|
</span>
|
|
565
567
|
</a>
|
package/src/messages/en.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
"alert.createStructureTag.failed.header": "Error creating structure tag",
|
|
3
|
+
"alert.export.csv": "Export to CSV",
|
|
3
4
|
"alert.linkStructureTag.failed.header": "Error linking tag to structure",
|
|
4
5
|
"alert.saveStructureUserFilters.failed.header": "Error saving filter",
|
|
6
|
+
"alert.show.more": "Show more",
|
|
5
7
|
"alert.updateStructureTag.failed.header": "Error editing structure tag",
|
|
6
8
|
"alert.updateSystem.failed.header": "Error updating system",
|
|
7
9
|
"createStructureTag.error.name.has already been taken":
|
|
@@ -30,9 +32,6 @@ export default {
|
|
|
30
32
|
"filters.with_profiling.raw": "Profile",
|
|
31
33
|
"filters.with_profiling.raw.false": "Without profile",
|
|
32
34
|
"filters.with_profiling.raw.true": "With profile",
|
|
33
|
-
"filters.has_field_child.raw": "Child fields",
|
|
34
|
-
"filters.has_field_child.raw.false": "Without fields",
|
|
35
|
-
"filters.has_field_child.raw.true": "With fields",
|
|
36
35
|
"grant.cell.direct_access": "Direct access",
|
|
37
36
|
"grant.cell.end_date.null": "No expiration set",
|
|
38
37
|
"grant.cell.end_date.same_user": "It's you",
|
|
@@ -366,10 +365,21 @@ export default {
|
|
|
366
365
|
"structures.bulkUpdate.success.content":
|
|
367
366
|
"Updated {count} structures successfully",
|
|
368
367
|
"structures.bulkUpdate.success.header": "Succeded Bulk Update",
|
|
368
|
+
"structures.bulkUpdateStructures.failed.note.df_content.default":
|
|
369
|
+
"External id: {externalId} The field <{field}> is invalid",
|
|
370
|
+
"structures.bulkUpdateStructures.failed.note.df_content.inclusion":
|
|
371
|
+
"External id: {externalId} The field <{field}> does not have a permitted value",
|
|
372
|
+
"structures.bulkUpdateStructures.failed.note.df_content.required":
|
|
373
|
+
"External id: {externalId} The field <{field}> is required",
|
|
369
374
|
"structures.bulkUpdateStructures.no.structures.body":
|
|
370
375
|
"No structures selected",
|
|
371
376
|
"structures.bulkUpdateStructures.no.structures.header": "Empty Search",
|
|
372
|
-
"structures.bulkUpdateStructures.success.header":
|
|
377
|
+
"structures.bulkUpdateStructures.success.header":
|
|
378
|
+
"Bulk update success! Loaded {count_ids} errors {count_errors}",
|
|
379
|
+
"structures.bulkUpdateStructures.success.errors":
|
|
380
|
+
"Error in external id {externalId}, message: {message}",
|
|
381
|
+
"structures.bulkUploadStructures.success.errors":
|
|
382
|
+
"Error in line {row}, in external id {externalId}, message: {message}",
|
|
373
383
|
"structures.bulkUpdateStructures.success.unchanged":
|
|
374
384
|
"{unchanged} structures remained unchanged.",
|
|
375
385
|
"structures.bulkUpdateStructures.success.updated":
|
|
@@ -425,11 +435,11 @@ export default {
|
|
|
425
435
|
"structures.uploadStructures.failed.invalid_file_format":
|
|
426
436
|
"Invalid file format",
|
|
427
437
|
"structures.uploadStructures.failed.note.df_content.default":
|
|
428
|
-
"The field <{field}> in row {row} is invalid",
|
|
438
|
+
"External id: {externalId} The field <{field}> in row {row} is invalid",
|
|
429
439
|
"structures.uploadStructures.failed.note.df_content.inclusion":
|
|
430
|
-
"The field <{field}> in row {row} does not have a permitted value",
|
|
440
|
+
"External id: {externalId} The field <{field}> in row {row} does not have a permitted value",
|
|
431
441
|
"structures.uploadStructures.failed.note.df_content.required":
|
|
432
|
-
"The field <{field}> in row {row} is required",
|
|
442
|
+
"External id: {externalId} The field <{field}> in row {row} is required",
|
|
433
443
|
"structures.uploadStructures.failed.note.insufficient_permissions":
|
|
434
444
|
"Insufficient permissions to edit the structure in row {row}",
|
|
435
445
|
"structures.uploadStructures.failed.note.only_draft_are_editable":
|
package/src/messages/es.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
"alert.createStructureTag.failed.header": "Error al crear Etiqueta",
|
|
3
|
+
"alert.export.csv": "Exportar a CSV",
|
|
3
4
|
"alert.linkStructureTag.failed.header":
|
|
4
5
|
"Error asociando etiqueta a estructura",
|
|
5
6
|
"alert.saveStructureUserFilters.failed.header": "Error guardando filtro",
|
|
7
|
+
"alert.show.more": "Mostrar más",
|
|
6
8
|
"alert.updateStructureTag.failed.header": "Error al editar Etiqueta",
|
|
7
9
|
"alert.updateSystem.failed.header": "Error actualizando sistema",
|
|
8
10
|
"createStructureTag.error.name.has already been taken":
|
|
@@ -31,9 +33,6 @@ export default {
|
|
|
31
33
|
"filters.with_profiling.raw": "Perfilado",
|
|
32
34
|
"filters.with_profiling.raw.false": "Sin perfilado",
|
|
33
35
|
"filters.with_profiling.raw.true": "Contiene perfilado",
|
|
34
|
-
"filters.has_field_child.raw": "Campos hijos",
|
|
35
|
-
"filters.has_field_child.raw.false": "Sin campos",
|
|
36
|
-
"filters.has_field_child.raw.true": "Tiene campos",
|
|
37
36
|
"grant.cell.direct_access": "Acceso Directo",
|
|
38
37
|
"grant.cell.end_date.null": "Sin fecha de expiración",
|
|
39
38
|
"grant.cell.end_date.same_user": "Eres tú",
|
|
@@ -371,9 +370,19 @@ export default {
|
|
|
371
370
|
"structures.bulkUpdate.success.header": "Actualización terminada con éxito",
|
|
372
371
|
"structures.bulkUpdateStructures.no.structures.body":
|
|
373
372
|
"Ninguna estructura seleccionada",
|
|
373
|
+
"structures.bulkUpdateStructures.failed.note.df_content.default":
|
|
374
|
+
"External id: {externalId} El campo <{field}> es inválido",
|
|
375
|
+
"structures.bulkUpdateStructures.failed.note.df_content.inclusion":
|
|
376
|
+
"External id: {externalId} El campo <{field}> no tiene un valor permitido",
|
|
377
|
+
"structures.bulkUpdateStructures.failed.note.df_content.required":
|
|
378
|
+
"External id: {externalId} El campo <{field}> es necesario",
|
|
374
379
|
"structures.bulkUpdateStructures.no.structures.header": "Búsqueda vacía",
|
|
375
380
|
"structures.bulkUpdateStructures.success.header":
|
|
376
|
-
"Actualización
|
|
381
|
+
"¡Actualización realizada correctamente! subidos {count_ids} errores {count_errors}",
|
|
382
|
+
"structures.bulkUpdateStructures.success.errors":
|
|
383
|
+
"Error en external id {externalId}, mensaje: {message}",
|
|
384
|
+
"structures.bulkUploadStructures.success.errors":
|
|
385
|
+
"Error en linea {row}, en external id {externalId} mensaje: {message}",
|
|
377
386
|
"structures.bulkUpdateStructures.success.unchanged":
|
|
378
387
|
"{unchanged} se han mantenido sin cambios.",
|
|
379
388
|
"structures.bulkUpdateStructures.success.updated":
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
clearStructure,
|
|
4
4
|
fetchStructure,
|
|
5
5
|
fetchStructureGraph,
|
|
6
|
-
createGraph
|
|
6
|
+
createGraph,
|
|
7
7
|
} from "../../routines";
|
|
8
8
|
|
|
9
9
|
const fooState = { foo: "bar" };
|
|
@@ -31,7 +31,7 @@ describe("reducers: structureImpactGraph", () => {
|
|
|
31
31
|
expect(
|
|
32
32
|
structureImpactGraph(fooState, {
|
|
33
33
|
type: fetchStructureGraph.SUCCESS,
|
|
34
|
-
payload
|
|
34
|
+
payload,
|
|
35
35
|
})
|
|
36
36
|
).toBe(data);
|
|
37
37
|
});
|
|
@@ -42,7 +42,7 @@ describe("reducers: structureImpactGraph", () => {
|
|
|
42
42
|
expect(
|
|
43
43
|
structureImpactGraph(fooState, {
|
|
44
44
|
type: createGraph.SUCCESS,
|
|
45
|
-
payload
|
|
45
|
+
payload,
|
|
46
46
|
})
|
|
47
47
|
).toBe(data);
|
|
48
48
|
});
|
|
@@ -53,7 +53,7 @@ describe("reducers: structureImpactGraph", () => {
|
|
|
53
53
|
expect(
|
|
54
54
|
structureImpactGraph(fooState, {
|
|
55
55
|
type: createGraph.SUCCESS,
|
|
56
|
-
payload
|
|
56
|
+
payload,
|
|
57
57
|
})
|
|
58
58
|
).toBe(fooState);
|
|
59
59
|
});
|
|
@@ -64,7 +64,7 @@ describe("reducers: structureImpactGraph", () => {
|
|
|
64
64
|
expect(
|
|
65
65
|
structureImpactGraph(fooState, {
|
|
66
66
|
type: fetchStructureGraph.SUCCESS,
|
|
67
|
-
payload
|
|
67
|
+
payload,
|
|
68
68
|
})
|
|
69
69
|
).toBe(fooState);
|
|
70
70
|
});
|
|
@@ -31,7 +31,7 @@ describe("reducers: structureLineageGraph", () => {
|
|
|
31
31
|
expect(
|
|
32
32
|
structureLineageGraph(fooState, {
|
|
33
33
|
type: fetchStructureGraph.SUCCESS,
|
|
34
|
-
payload
|
|
34
|
+
payload,
|
|
35
35
|
})
|
|
36
36
|
).toBe(data);
|
|
37
37
|
});
|
|
@@ -42,7 +42,7 @@ describe("reducers: structureLineageGraph", () => {
|
|
|
42
42
|
expect(
|
|
43
43
|
structureLineageGraph(fooState, {
|
|
44
44
|
type: createGraph.SUCCESS,
|
|
45
|
-
payload
|
|
45
|
+
payload,
|
|
46
46
|
})
|
|
47
47
|
).toBe(data);
|
|
48
48
|
});
|
|
@@ -53,7 +53,7 @@ describe("reducers: structureLineageGraph", () => {
|
|
|
53
53
|
expect(
|
|
54
54
|
structureLineageGraph(fooState, {
|
|
55
55
|
type: fetchStructureGraph.SUCCESS,
|
|
56
|
-
payload
|
|
56
|
+
payload,
|
|
57
57
|
})
|
|
58
58
|
).toBe(fooState);
|
|
59
59
|
});
|
|
@@ -64,7 +64,7 @@ describe("reducers: structureLineageGraph", () => {
|
|
|
64
64
|
expect(
|
|
65
65
|
structureLineageGraph(fooState, {
|
|
66
66
|
type: createGraph.SUCCESS,
|
|
67
|
-
payload
|
|
67
|
+
payload,
|
|
68
68
|
})
|
|
69
69
|
).toBe(fooState);
|
|
70
70
|
});
|
|
@@ -75,7 +75,7 @@ describe("reducers: structureLineageGraph", () => {
|
|
|
75
75
|
expect(
|
|
76
76
|
structureLineageGraph(fooState, {
|
|
77
77
|
type: fetchStructureGraph.SUCCESS,
|
|
78
|
-
payload
|
|
78
|
+
payload,
|
|
79
79
|
})
|
|
80
80
|
).toBe(fooState);
|
|
81
81
|
});
|
|
@@ -12,27 +12,43 @@ const ddMessage = (state = initialState, { type, payload }) => {
|
|
|
12
12
|
switch (type) {
|
|
13
13
|
case dismissAlert.TRIGGER:
|
|
14
14
|
return initialState;
|
|
15
|
+
case uploadStructures.SUCCESS:
|
|
15
16
|
case bulkUpdateStructures.SUCCESS: {
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
17
|
+
const messagesImp = _.has("errors")(payload.data)
|
|
18
|
+
? _.flow(
|
|
19
|
+
_.propOr([], "errors"),
|
|
20
|
+
_.map((error) => ({
|
|
21
|
+
id:
|
|
22
|
+
type == bulkUpdateStructures.SUCCESS
|
|
23
|
+
? `structures.bulkUpdateStructures.failed.note.${error.message}`
|
|
24
|
+
: `structures.uploadStructures.failed.note.${error.message}`,
|
|
25
|
+
fields: {
|
|
26
|
+
row: error.row,
|
|
27
|
+
id: error.id,
|
|
28
|
+
field: error.field,
|
|
29
|
+
externalId: error.external_id,
|
|
30
|
+
message: error.message,
|
|
31
|
+
},
|
|
32
|
+
defaultMessage:
|
|
33
|
+
type == bulkUpdateStructures.SUCCESS
|
|
34
|
+
? "structures.bulkUpdateStructures.success.errors"
|
|
35
|
+
: "structures.bulkUploadStructures.success.errors",
|
|
36
|
+
}))
|
|
37
|
+
)(payload.data)
|
|
38
|
+
: "";
|
|
29
39
|
return {
|
|
30
40
|
error: false,
|
|
31
41
|
header: "structures.bulkUpdateStructures.success.header",
|
|
32
42
|
icon: "check",
|
|
33
|
-
color: "green",
|
|
43
|
+
color: payload.data.errors.length >= 1 ? "orange" : "green",
|
|
34
44
|
text: "",
|
|
35
|
-
messages:
|
|
45
|
+
messages: messagesImp,
|
|
46
|
+
fields: {
|
|
47
|
+
count_ids: payload.data.ids.length,
|
|
48
|
+
count_errors: payload.data.errors.length,
|
|
49
|
+
},
|
|
50
|
+
downloadable: true,
|
|
51
|
+
initialMaxListItems: 5,
|
|
36
52
|
};
|
|
37
53
|
}
|
|
38
54
|
case updateStructureType.SUCCESS:
|
|
@@ -42,25 +58,6 @@ const ddMessage = (state = initialState, { type, payload }) => {
|
|
|
42
58
|
icon: "check",
|
|
43
59
|
color: "green",
|
|
44
60
|
};
|
|
45
|
-
case uploadStructures.SUCCESS: {
|
|
46
|
-
const { data } = payload;
|
|
47
|
-
const count = _.flow(_.prop("message"), _.size)(data);
|
|
48
|
-
const content =
|
|
49
|
-
count === 0
|
|
50
|
-
? "structures.uploadStructures.success.content.any"
|
|
51
|
-
: count === 1
|
|
52
|
-
? "structures.uploadStructures.success.content.single"
|
|
53
|
-
: "structures.uploadStructures.success.content";
|
|
54
|
-
return {
|
|
55
|
-
error: false,
|
|
56
|
-
header: "structures.uploadStructures.success.header",
|
|
57
|
-
content,
|
|
58
|
-
icon: "check",
|
|
59
|
-
color: "green",
|
|
60
|
-
text: "",
|
|
61
|
-
fields: { count },
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
61
|
case uploadStructures.FAILURE:
|
|
65
62
|
if (payload.status != 500) {
|
|
66
63
|
const { data } = payload;
|
|
@@ -69,24 +66,24 @@ const ddMessage = (state = initialState, { type, payload }) => {
|
|
|
69
66
|
const field = _.path("errors.field")(data);
|
|
70
67
|
const messages = _.has("errors")(data)
|
|
71
68
|
? _.flow(
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
defaultMessage: "structures.uploadStructures.failed.default",
|
|
80
|
-
}))(v)
|
|
81
|
-
),
|
|
82
|
-
_.flatten
|
|
83
|
-
)(data)
|
|
84
|
-
: _.flow(_.path("error.message"), (m) => [
|
|
85
|
-
{
|
|
86
|
-
id: `structures.uploadStructures.failed.${m}`,
|
|
69
|
+
_.propOr([], "errors"),
|
|
70
|
+
_.toPairs,
|
|
71
|
+
_.filter(([k, _v]) => k !== "row" && k !== "field"),
|
|
72
|
+
_.map(([k, v]) =>
|
|
73
|
+
_.map((e) => ({
|
|
74
|
+
id: `structures.uploadStructures.failed.${k}.${e}`,
|
|
75
|
+
fields: { row, field },
|
|
87
76
|
defaultMessage: "structures.uploadStructures.failed.default",
|
|
88
|
-
}
|
|
89
|
-
|
|
77
|
+
}))(v)
|
|
78
|
+
),
|
|
79
|
+
_.flatten
|
|
80
|
+
)(data)
|
|
81
|
+
: _.flow(_.path("error.message"), (m) => [
|
|
82
|
+
{
|
|
83
|
+
id: `structures.uploadStructures.failed.${m}`,
|
|
84
|
+
defaultMessage: "structures.uploadStructures.failed.default",
|
|
85
|
+
},
|
|
86
|
+
])(data);
|
|
90
87
|
return {
|
|
91
88
|
error: true,
|
|
92
89
|
header: "structures.uploadStructures.failed.header",
|
|
@@ -55,7 +55,7 @@ describe("sagas: bulkUpdateStructuresSaga", () => {
|
|
|
55
55
|
.next()
|
|
56
56
|
.call(apiJsonPost, API_DATA_STRUCTURES_BULK_UPDATE, body, JSON_OPTS)
|
|
57
57
|
.next({ data })
|
|
58
|
-
.put(bulkUpdateStructures.success({
|
|
58
|
+
.put(bulkUpdateStructures.success({ data }))
|
|
59
59
|
.next()
|
|
60
60
|
.put(bulkUpdateStructures.fulfill())
|
|
61
61
|
.next()
|
|
@@ -2,7 +2,7 @@ import { testSaga } from "redux-saga-test-plan";
|
|
|
2
2
|
import { apiJsonPost, UPLOAD_JSON_OPTS } from "@truedat/core/services/api";
|
|
3
3
|
import {
|
|
4
4
|
uploadStructuresRequestSaga,
|
|
5
|
-
uploadStructuresSaga
|
|
5
|
+
uploadStructuresSaga,
|
|
6
6
|
} from "../uploadStructures";
|
|
7
7
|
import { uploadStructures } from "../../routines";
|
|
8
8
|
import { API_STRUCTURES_UPLOAD } from "../../api";
|
|
@@ -39,7 +39,7 @@ describe("sagas: uploadStructuresSaga", () => {
|
|
|
39
39
|
.next()
|
|
40
40
|
.call(apiJsonPost, API_STRUCTURES_UPLOAD, body, UPLOAD_JSON_OPTS)
|
|
41
41
|
.next({ data })
|
|
42
|
-
.put(uploadStructures.success(data))
|
|
42
|
+
.put(uploadStructures.success({ data }))
|
|
43
43
|
.next()
|
|
44
44
|
.put(uploadStructures.fulfill())
|
|
45
45
|
.next()
|
|
@@ -22,7 +22,7 @@ export function* bulkUpdateStructuresSaga({ payload }) {
|
|
|
22
22
|
body,
|
|
23
23
|
JSON_OPTS
|
|
24
24
|
);
|
|
25
|
-
yield put(bulkUpdateStructures.success({
|
|
25
|
+
yield put(bulkUpdateStructures.success({ data }));
|
|
26
26
|
} catch (error) {
|
|
27
27
|
if (error.response) {
|
|
28
28
|
const { status, data } = error.response;
|
|
@@ -14,7 +14,7 @@ export function* uploadStructuresSaga({ payload }) {
|
|
|
14
14
|
UPLOAD_JSON_OPTS
|
|
15
15
|
);
|
|
16
16
|
|
|
17
|
-
yield put(uploadStructures.success(data));
|
|
17
|
+
yield put(uploadStructures.success({ data }));
|
|
18
18
|
} catch (error) {
|
|
19
19
|
if (error.response) {
|
|
20
20
|
const { status, data } = error.response;
|