Skip to content
Snippets Groups Projects
Commit a1298939 authored by piotr.kupczyk@id.ethz.ch's avatar piotr.kupczyk@id.ethz.ch
Browse files

SSDM-13463 : Export selection of fields from tables - UI part - adjust the...

SSDM-13463 : Export selection of fields from tables - UI part - adjust the exported_fields parameter for exported kinds that do not have a type (e.g. entity types)
parent 0eee0078
No related branches found
No related tags found
1 merge request!40SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
......@@ -1311,18 +1311,26 @@ export default class GridController {
}
})
// build exported fields map: { kind: { type: [{ type: "PROPERTY/ATTRIBUTE", id: "propertyCode/attributeCode"}, ...], ... }, ... }
// build exported fields map:
// - entities: { kind: { type: [{ type: "PROPERTY/ATTRIBUTE", id: "propertyCode/attributeCode"}, ...], ... }, ... }
// - non-entities: { kind: [{ type: "ATTRIBUTE", id: "attributeCode"}, ...], ... }
exportedRows.forEach(exportedRow => {
const { exportable_kind, type_perm_id } = exportedRow.exportableId
if (exportable_kind && type_perm_id) {
if (!_.isNil(exportable_kind)) {
let exportedFieldsForKind = exportedFieldsMap[exportable_kind]
if (!exportedFieldsForKind) {
exportedFieldsMap[exportable_kind] = exportedFieldsForKind = {}
if (!_.isNil(type_perm_id)) {
if (_.isNil(exportedFieldsForKind)) {
exportedFieldsMap[exportable_kind] = exportedFieldsForKind = {}
}
exportedFieldsForKind[type_perm_id] = exportableFields
} else {
if (_.isNil(exportedFieldsForKind)) {
exportedFieldsMap[exportable_kind] = exportableFields
}
}
exportedFieldsForKind[type_perm_id] = exportableFields
}
})
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment