feat: flatten the nested columns of exported data

This commit is contained in:
Ahmed Bouhuolia
2024-05-02 15:38:57 +02:00
parent 55aab76c9b
commit 83a5010dc5
21 changed files with 392 additions and 97 deletions

View File

@@ -105,7 +105,11 @@ export default class ResourceService {
const $enumerationType = (field) =>
field.fieldType === 'enumeration' ? field : undefined;
const $hasFields = (field) => 'undefined' !== typeof field.fields ? field : undefined;
const $hasFields = (field) =>
'undefined' !== typeof field.fields ? field : undefined;
const $hasColumns = (column) =>
'undefined' !== typeof column.columns ? column : undefined;
const naviagations = [
['fields', qim.$each, 'name'],
@@ -114,6 +118,7 @@ export default class ResourceService {
['fields2', qim.$each, $enumerationType, 'options', qim.$each, 'label'],
['fields2', qim.$each, $hasFields, 'fields', qim.$each, 'name'],
['columns', qim.$each, 'name'],
['columns', qim.$each, $hasColumns, 'columns', qim.$each, 'name'],
];
return this.i18nService.i18nApply(naviagations, meta, tenantId);
}