@crystaldesign/diva-backoffice 24.12.0-beta.23 → 24.12.0-beta.25
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/build/esm/index.js +513 -119
- package/build/types/backoffice/src/store/ContentStore.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Table/BaseTable/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Table/StandardTable/useTableData.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Table/types.d.ts +3 -0
- package/build/types/backoffice/src/ui/Table/types.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Table/utils/{aplyFilterAndSortation.d.ts → applyFilterAndSortation.d.ts} +1 -1
- package/build/types/backoffice/src/ui/Table/utils/applyFilterAndSortation.d.ts.map +1 -0
- package/build/types/backoffice/src/utils/{aplyMapping.d.ts → applyMapping.d.ts} +3 -3
- package/build/types/backoffice/src/utils/applyMapping.d.ts.map +1 -0
- package/build/types/backoffice/src/utils/{aplyRule.d.ts → applyRule.d.ts} +2 -2
- package/build/types/backoffice/src/utils/applyRule.d.ts.map +1 -0
- package/build/types/backoffice/src/utils/getIcons.d.ts.map +1 -1
- package/build/types/backoffice/src/utils/parseServersideFilters.d.ts +1 -0
- package/build/types/backoffice/src/utils/parseServersideFilters.d.ts.map +1 -1
- package/package.json +10 -10
- package/build/types/backoffice/src/ui/Table/utils/aplyFilterAndSortation.d.ts.map +0 -1
- package/build/types/backoffice/src/utils/aplyMapping.d.ts.map +0 -1
- package/build/types/backoffice/src/utils/aplyRule.d.ts.map +0 -1
package/build/esm/index.js
CHANGED
|
@@ -64,6 +64,8 @@ import FileExcelOutlined from '@ant-design/icons/FileExcelOutlined';
|
|
|
64
64
|
import FolderOutlined from '@ant-design/icons/FolderOutlined';
|
|
65
65
|
import SettingOutlined from '@ant-design/icons/SettingOutlined';
|
|
66
66
|
import PieChartOutlined from '@ant-design/icons/PieChartOutlined';
|
|
67
|
+
import ClockCircleOutlined from '@ant-design/icons/ClockCircleOutlined';
|
|
68
|
+
import FileZipOutlined from '@ant-design/icons/FileZipOutlined';
|
|
67
69
|
import InfoCircleOutlined from '@ant-design/icons/InfoCircleOutlined';
|
|
68
70
|
import merge from 'lodash/merge';
|
|
69
71
|
import cloneDeep from 'lodash/cloneDeep';
|
|
@@ -145,16 +147,16 @@ function _unsupportedIterableToArray$m(r, a) { if (r) { if ("string" == typeof r
|
|
|
145
147
|
function _arrayLikeToArray$m(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
146
148
|
function ownKeys$N(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
147
149
|
function _objectSpread$N(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$N(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$N(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
148
|
-
var LOG$d = getLogger('Backoffice', '
|
|
149
|
-
function
|
|
150
|
-
var
|
|
150
|
+
var LOG$d = getLogger('Backoffice', 'ApplyMapping');
|
|
151
|
+
function applyMapping (_ref) {
|
|
152
|
+
var mappable = _ref.mappable,
|
|
151
153
|
mappingData = _ref.mappingData,
|
|
152
154
|
mapping = _ref.mapping,
|
|
153
155
|
rootStore = _ref.rootStore,
|
|
154
156
|
_ref$fallBackToParams = _ref.fallBackToParams,
|
|
155
157
|
fallBackToParams = _ref$fallBackToParams === void 0 ? true : _ref$fallBackToParams;
|
|
156
158
|
var isFormData = false;
|
|
157
|
-
var returnValue =
|
|
159
|
+
var returnValue = mappable;
|
|
158
160
|
function set(key, value, type) {
|
|
159
161
|
if (isFormData) {
|
|
160
162
|
returnValue.set(key, value);
|
|
@@ -194,10 +196,10 @@ function aplyMapping (_ref) {
|
|
|
194
196
|
return false;
|
|
195
197
|
}
|
|
196
198
|
try {
|
|
197
|
-
if (
|
|
199
|
+
if (mappable && mapping) {
|
|
198
200
|
var flatMapping = mappingData ? flatten(mappingData) : {};
|
|
199
201
|
if (mapping.type == 'filter') {
|
|
200
|
-
if (typeof
|
|
202
|
+
if (typeof mappable !== 'string') {
|
|
201
203
|
throw new Error('Urls can only be processed with mappings of type "query" or "filter".');
|
|
202
204
|
}
|
|
203
205
|
var url = new URL(returnValue);
|
|
@@ -225,7 +227,7 @@ function aplyMapping (_ref) {
|
|
|
225
227
|
}
|
|
226
228
|
returnValue = url.toString();
|
|
227
229
|
} else if (mapping.type == 'query') {
|
|
228
|
-
if (typeof
|
|
230
|
+
if (typeof mappable !== 'string') {
|
|
229
231
|
throw new Error('Urls can only be processed with mappings of type "query" or "filter".');
|
|
230
232
|
}
|
|
231
233
|
var _url = new URL(returnValue);
|
|
@@ -268,10 +270,10 @@ function aplyMapping (_ref) {
|
|
|
268
270
|
}
|
|
269
271
|
returnValue = _url.toString();
|
|
270
272
|
} else if (mapping.type == 'body') {
|
|
271
|
-
if (_typeof(
|
|
273
|
+
if (_typeof(mappable) !== 'object') {
|
|
272
274
|
throw new Error('Objects can only be processed with mappings of type "body".');
|
|
273
275
|
}
|
|
274
|
-
if (
|
|
276
|
+
if (mappable.entries) {
|
|
275
277
|
isFormData = true;
|
|
276
278
|
}
|
|
277
279
|
for (var _i = 0; _i < mapping.map.length; _i++) {
|
|
@@ -289,7 +291,7 @@ function aplyMapping (_ref) {
|
|
|
289
291
|
}
|
|
290
292
|
return returnValue;
|
|
291
293
|
} catch (e) {
|
|
292
|
-
LOG$d.debug('Mapabledata',
|
|
294
|
+
LOG$d.debug('Mapabledata', mappable);
|
|
293
295
|
throw e;
|
|
294
296
|
}
|
|
295
297
|
}
|
|
@@ -320,8 +322,21 @@ function parseServersideFilters (_ref) {
|
|
|
320
322
|
if (Object.keys(filters !== null && filters !== void 0 ? filters : {}).length || Object.keys(prefilter !== null && prefilter !== void 0 ? prefilter : {}).length) {
|
|
321
323
|
if (useFullTextSearch(filters !== null && filters !== void 0 ? filters : {})) {
|
|
322
324
|
url = "".concat(url, "&search=").concat(encodeURIComponent(parseFilter(filters !== null && filters !== void 0 ? filters : {}, prefilter).replaceAll(' ', '%20')).replaceAll('(', '%28').replaceAll(')', '%29'));
|
|
323
|
-
} else {
|
|
325
|
+
} else if (!url.includes('filter=')) {
|
|
324
326
|
url = "".concat(url, "&filter=").concat(encodeURIComponent(parseFilter(filters !== null && filters !== void 0 ? filters : {}, prefilter).replaceAll(' ', '%20')).replaceAll('(', '%28').replaceAll(')', '%29'));
|
|
327
|
+
} else {
|
|
328
|
+
var urlConstruct = new URL(url);
|
|
329
|
+
var params = new URLSearchParams(urlConstruct.search);
|
|
330
|
+
|
|
331
|
+
// Step 2: Get the existing filter parameter
|
|
332
|
+
var existingFilter = params.get('filter');
|
|
333
|
+
|
|
334
|
+
// Step 3: Add another filter parameter
|
|
335
|
+
params.set('filter', '[' + (existingFilter === null || existingFilter === void 0 ? void 0 : existingFilter.slice(1, -1)) + ',' + parseFilter(filters !== null && filters !== void 0 ? filters : {}, prefilter).replaceAll(' ', '%20').replaceAll('(', '%28').replaceAll(')', '%29').slice(1, -1) + ']');
|
|
336
|
+
|
|
337
|
+
// Step 4: Update the URL
|
|
338
|
+
urlConstruct.search = params.toString();
|
|
339
|
+
url = urlConstruct.toString();
|
|
325
340
|
}
|
|
326
341
|
}
|
|
327
342
|
if (genericProps) {
|
|
@@ -358,7 +373,7 @@ function parseFilter(filters, prefilter) {
|
|
|
358
373
|
}
|
|
359
374
|
} else {
|
|
360
375
|
var or = values[2]; //filter[1][2]; // [field, [value, operator, or?]]
|
|
361
|
-
var index = or === true
|
|
376
|
+
var index = or === true || or === 0 ? false : or;
|
|
362
377
|
var inFilter = values[values.length - 1] === 'in';
|
|
363
378
|
if (index == undefined || index === false || inFilter) {
|
|
364
379
|
if (inFilter) {
|
|
@@ -596,8 +611,8 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
596
611
|
_context2.next = 10;
|
|
597
612
|
break;
|
|
598
613
|
}
|
|
599
|
-
data =
|
|
600
|
-
|
|
614
|
+
data = applyMapping({
|
|
615
|
+
mappable: data,
|
|
601
616
|
mappingData: data,
|
|
602
617
|
mapping: mapping,
|
|
603
618
|
rootStore: this._rootStore,
|
|
@@ -610,8 +625,8 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
610
625
|
_context2.next = 14;
|
|
611
626
|
break;
|
|
612
627
|
}
|
|
613
|
-
finalUrl =
|
|
614
|
-
|
|
628
|
+
finalUrl = applyMapping({
|
|
629
|
+
mappable: finalUrl,
|
|
615
630
|
mapping: mapping,
|
|
616
631
|
rootStore: this._rootStore,
|
|
617
632
|
fallBackToParams: false
|
|
@@ -715,8 +730,8 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
715
730
|
if (jwt) header['Authorization'] = 'Bearer ' + jwt;
|
|
716
731
|
if (sessionGuid) header['SessionGuid'] = sessionGuid;
|
|
717
732
|
if ((mapping === null || mapping === void 0 ? void 0 : mapping.type) == 'query') {
|
|
718
|
-
url =
|
|
719
|
-
|
|
733
|
+
url = applyMapping({
|
|
734
|
+
mappable: this._createUrl,
|
|
720
735
|
mapping: mapping,
|
|
721
736
|
mappingData: mappingData,
|
|
722
737
|
rootStore: this._rootStore,
|
|
@@ -724,8 +739,8 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
724
739
|
});
|
|
725
740
|
if (data) createData = _objectSpread$M({}, data);
|
|
726
741
|
} else if (data !== undefined) {
|
|
727
|
-
createData =
|
|
728
|
-
|
|
742
|
+
createData = applyMapping({
|
|
743
|
+
mappable: data,
|
|
729
744
|
mapping: mapping,
|
|
730
745
|
mappingData: mappingData,
|
|
731
746
|
rootStore: this._rootStore,
|
|
@@ -736,8 +751,8 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
736
751
|
if (formData !== undefined) {
|
|
737
752
|
// set metadata doesn't work with content type set
|
|
738
753
|
delete header['Content-Type'];
|
|
739
|
-
createData =
|
|
740
|
-
|
|
754
|
+
createData = applyMapping({
|
|
755
|
+
mappable: formData,
|
|
741
756
|
mappingData: mappingData,
|
|
742
757
|
mapping: mapping,
|
|
743
758
|
rootStore: this._rootStore,
|
|
@@ -834,8 +849,8 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
834
849
|
throw new Error('Delete endpoint is missing in configuration.');
|
|
835
850
|
case 2:
|
|
836
851
|
jwt = (_this$_rootStore3 = this._rootStore) === null || _this$_rootStore3 === void 0 ? void 0 : _this$_rootStore3.dataStore.jwt;
|
|
837
|
-
url = new URL(
|
|
838
|
-
|
|
852
|
+
url = new URL(applyMapping({
|
|
853
|
+
mappable: this._deleteUrl,
|
|
839
854
|
mapping: mapping,
|
|
840
855
|
mappingData: mappingData,
|
|
841
856
|
rootStore: this._rootStore,
|
|
@@ -843,8 +858,8 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
843
858
|
}));
|
|
844
859
|
if (id && this._applyIdField) {
|
|
845
860
|
if (this._deleteUrl.includes("${".concat(this._deleteIdField, "}"))) {
|
|
846
|
-
url = new URL(
|
|
847
|
-
|
|
861
|
+
url = new URL(applyMapping({
|
|
862
|
+
mappable: url.toString(),
|
|
848
863
|
mapping: {
|
|
849
864
|
type: 'query',
|
|
850
865
|
map: [{
|
|
@@ -1032,8 +1047,8 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
1032
1047
|
baseUrl: this._readListUrl,
|
|
1033
1048
|
prefilter: prefilter
|
|
1034
1049
|
})) : this._readListUrl;
|
|
1035
|
-
url =
|
|
1036
|
-
|
|
1050
|
+
url = applyMapping({
|
|
1051
|
+
mappable: url,
|
|
1037
1052
|
mapping: mapping,
|
|
1038
1053
|
mappingData: mappingData,
|
|
1039
1054
|
rootStore: this._rootStore,
|
|
@@ -1049,8 +1064,8 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
1049
1064
|
return _regeneratorRuntime.wrap(function _callee9$(_context9) {
|
|
1050
1065
|
while (1) switch (_context9.prev = _context9.next) {
|
|
1051
1066
|
case 0:
|
|
1052
|
-
url =
|
|
1053
|
-
|
|
1067
|
+
url = applyMapping({
|
|
1068
|
+
mappable: baseUrl,
|
|
1054
1069
|
mapping: mapping,
|
|
1055
1070
|
mappingData: mappingData,
|
|
1056
1071
|
rootStore: this._rootStore,
|
|
@@ -1111,8 +1126,8 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
1111
1126
|
value: function createSocket(data, mapping, namespace) {
|
|
1112
1127
|
var _this$_rootStore7;
|
|
1113
1128
|
if (!this._socketUrl) throw new Error('no socket url configured');
|
|
1114
|
-
var url = new URL(
|
|
1115
|
-
|
|
1129
|
+
var url = new URL(applyMapping({
|
|
1130
|
+
mappable: this._socketUrl,
|
|
1116
1131
|
mapping: mapping,
|
|
1117
1132
|
mappingData: data,
|
|
1118
1133
|
rootStore: this._rootStore,
|
|
@@ -1276,8 +1291,8 @@ var _default$b = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1276
1291
|
_context.next = 8;
|
|
1277
1292
|
break;
|
|
1278
1293
|
}
|
|
1279
|
-
data =
|
|
1280
|
-
|
|
1294
|
+
data = applyMapping({
|
|
1295
|
+
mappable: {},
|
|
1281
1296
|
mapping: this.configuration.targetMapping,
|
|
1282
1297
|
rootStore: this._rootStore
|
|
1283
1298
|
});
|
|
@@ -1347,8 +1362,8 @@ var _default$b = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1347
1362
|
_context2.next = 10;
|
|
1348
1363
|
break;
|
|
1349
1364
|
}
|
|
1350
|
-
_data =
|
|
1351
|
-
|
|
1365
|
+
_data = applyMapping({
|
|
1366
|
+
mappable: {},
|
|
1352
1367
|
mapping: this.configuration.targetMapping,
|
|
1353
1368
|
mappingData: {
|
|
1354
1369
|
url: response.ref.url,
|
|
@@ -1392,8 +1407,8 @@ var _default$b = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1392
1407
|
_context3.next = 6;
|
|
1393
1408
|
break;
|
|
1394
1409
|
}
|
|
1395
|
-
data =
|
|
1396
|
-
|
|
1410
|
+
data = applyMapping({
|
|
1411
|
+
mappable: {},
|
|
1397
1412
|
mapping: this.configuration.targetMapping,
|
|
1398
1413
|
mappingData: {
|
|
1399
1414
|
url: '',
|
|
@@ -1583,8 +1598,8 @@ var _default$8 = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1583
1598
|
// so we merge them into one in order to aply the mapping
|
|
1584
1599
|
var mergedMappingData = Object.assign({}, mappingData);
|
|
1585
1600
|
mergedMappingData = Object.assign(mergedMappingData, data);
|
|
1586
|
-
var newEntry =
|
|
1587
|
-
|
|
1601
|
+
var newEntry = applyMapping({
|
|
1602
|
+
mappable: {},
|
|
1588
1603
|
mapping: _this2.configuration.actionMapping,
|
|
1589
1604
|
mappingData: mergedMappingData,
|
|
1590
1605
|
rootStore: _this2._rootStore
|
|
@@ -2514,6 +2529,207 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
2514
2529
|
}
|
|
2515
2530
|
}
|
|
2516
2531
|
},
|
|
2532
|
+
TableTaskStatusVersioning: {
|
|
2533
|
+
type: 'Table',
|
|
2534
|
+
canRefresh: true,
|
|
2535
|
+
title: t('backoffice.table.taskstatusversioning.title.taskstatusversioninglist'),
|
|
2536
|
+
columns: [{
|
|
2537
|
+
title: 'ID',
|
|
2538
|
+
field: '_id',
|
|
2539
|
+
sorter: 2,
|
|
2540
|
+
filter: 'search',
|
|
2541
|
+
width: 200
|
|
2542
|
+
}, {
|
|
2543
|
+
title: t('backoffice.table.taskstatusversioning.columns.model'),
|
|
2544
|
+
field: 'taskName',
|
|
2545
|
+
sorter: 2,
|
|
2546
|
+
filter: 'search',
|
|
2547
|
+
width: 400
|
|
2548
|
+
}, {
|
|
2549
|
+
title: t('backoffice.table.taskstatusversioning.columns.organisationid'),
|
|
2550
|
+
field: 'organizationId',
|
|
2551
|
+
sorter: 200,
|
|
2552
|
+
filter: 'search',
|
|
2553
|
+
width: 200
|
|
2554
|
+
}, {
|
|
2555
|
+
title: t('backoffice.table.taskstatusversioning.columns.organisation'),
|
|
2556
|
+
field: 'organizationDisplayName',
|
|
2557
|
+
sorter: 200,
|
|
2558
|
+
filter: 'search',
|
|
2559
|
+
width: 200
|
|
2560
|
+
}, {
|
|
2561
|
+
title: t('backoffice.table.taskstatusversioning.columns.user'),
|
|
2562
|
+
field: 'user.mainEmail',
|
|
2563
|
+
sorter: 3,
|
|
2564
|
+
filter: 'search',
|
|
2565
|
+
width: 200
|
|
2566
|
+
}, {
|
|
2567
|
+
title: t('backoffice.table.taskstatusversioning.columns.status'),
|
|
2568
|
+
field: 'progress.status',
|
|
2569
|
+
filter: 'search',
|
|
2570
|
+
width: 200
|
|
2571
|
+
}, {
|
|
2572
|
+
title: t('backoffice.table.taskstatusversioning.columns.created'),
|
|
2573
|
+
field: 'created',
|
|
2574
|
+
sorter: 1,
|
|
2575
|
+
defaultSortOrder: 'descend',
|
|
2576
|
+
type: 'unixTimeStamp',
|
|
2577
|
+
width: 200
|
|
2578
|
+
}, {
|
|
2579
|
+
title: t('backoffice.table.taskstatusversioning.columns.lastUpdated'),
|
|
2580
|
+
field: 'lastUpdated',
|
|
2581
|
+
type: 'unixTimeStamp',
|
|
2582
|
+
width: 200
|
|
2583
|
+
}, {
|
|
2584
|
+
title: t('backoffice.table.taskstatusversioning.columns.finished'),
|
|
2585
|
+
field: 'endTime',
|
|
2586
|
+
type: 'unixTimeStamp',
|
|
2587
|
+
width: 200
|
|
2588
|
+
}, {
|
|
2589
|
+
title: t('backoffice.table.taskstatusversioning.columns.server'),
|
|
2590
|
+
field: 'serverName',
|
|
2591
|
+
filter: 'search',
|
|
2592
|
+
width: 200
|
|
2593
|
+
}, {
|
|
2594
|
+
title: t('backoffice.table.taskstatusversioning.columns.type'),
|
|
2595
|
+
field: 'taskType',
|
|
2596
|
+
filter: 'search',
|
|
2597
|
+
width: 200
|
|
2598
|
+
}],
|
|
2599
|
+
filter: {
|
|
2600
|
+
toggle: {
|
|
2601
|
+
globalValue: 'relevantTypeOrganizationId',
|
|
2602
|
+
fields: ['organizationId'],
|
|
2603
|
+
label: t('backoffice.table.taskstatusversioning.filter.label.allorgs'),
|
|
2604
|
+
labelOff: t('backoffice.table.taskstatusversioning.filter.labelOff.allorgs'),
|
|
2605
|
+
inverted: true,
|
|
2606
|
+
permission: 'backoffice_taskstatus_allorgs',
|
|
2607
|
+
isAnd: true
|
|
2608
|
+
},
|
|
2609
|
+
search: {
|
|
2610
|
+
fields: ['_id', 'progress.dataItems', 'taskName', 'organizationId', 'user.mainEmail', 'status', 'serverName', 'taskType']
|
|
2611
|
+
}
|
|
2612
|
+
},
|
|
2613
|
+
apiInterface: {
|
|
2614
|
+
read: {
|
|
2615
|
+
list: '${adminService}/taskStatus?filter=%5B%2B%5B%7BtaskType%2Ceq%2CRETAIL_VERSIONING%7D%2C%7BtaskType%2Ceq%2CSUPPLIER_VERSIONING%7D%5D%5D',
|
|
2616
|
+
fields: true,
|
|
2617
|
+
filterServerSide: true
|
|
2618
|
+
},
|
|
2619
|
+
"delete": '${adminService}/taskStatus/${id}'
|
|
2620
|
+
},
|
|
2621
|
+
mapping: {
|
|
2622
|
+
type: 'query',
|
|
2623
|
+
map: [{
|
|
2624
|
+
globalValue: 'selectedOrganizationId',
|
|
2625
|
+
targetField: 'organizationId'
|
|
2626
|
+
}]
|
|
2627
|
+
},
|
|
2628
|
+
deleteAction: {
|
|
2629
|
+
label: 'backoffice.table.taskstatusversioning.deleteAction.label.cancel',
|
|
2630
|
+
labelDialog: 'backoffice.table.taskstatusversioning.deleteAction.labelDialog.cancel',
|
|
2631
|
+
disabled: function disabled(datas) {
|
|
2632
|
+
return datas === null || datas === void 0 ? void 0 : datas.find(function (d) {
|
|
2633
|
+
return (d === null || d === void 0 ? void 0 : d.progress.status) != 'Created';
|
|
2634
|
+
});
|
|
2635
|
+
}
|
|
2636
|
+
},
|
|
2637
|
+
rowAction: [{
|
|
2638
|
+
actionType: 'Detail',
|
|
2639
|
+
type: 'Form',
|
|
2640
|
+
id: 'FormTaskStatusDetails',
|
|
2641
|
+
title: t('backoffice.table.taskstatusversioning.rowAction.title')
|
|
2642
|
+
}]
|
|
2643
|
+
},
|
|
2644
|
+
FormTaskStatusDetails: {
|
|
2645
|
+
type: 'Form',
|
|
2646
|
+
title: t('backoffice.form.taskstatus.title'),
|
|
2647
|
+
apiInterface: {
|
|
2648
|
+
update: {
|
|
2649
|
+
url: '${adminService}/taskStatus/{_id}',
|
|
2650
|
+
method: 'PATCH',
|
|
2651
|
+
jsonPatch: true
|
|
2652
|
+
}
|
|
2653
|
+
},
|
|
2654
|
+
triggerRerender: true,
|
|
2655
|
+
items: [{
|
|
2656
|
+
name: '_id',
|
|
2657
|
+
label: t('backoffice.form.taskstatus._id'),
|
|
2658
|
+
type: 'input',
|
|
2659
|
+
readonly: true
|
|
2660
|
+
}, {
|
|
2661
|
+
name: 'taskName',
|
|
2662
|
+
label: t('backoffice.form.taskstatus.taskName'),
|
|
2663
|
+
type: 'input',
|
|
2664
|
+
readonly: true
|
|
2665
|
+
}, {
|
|
2666
|
+
name: 'created',
|
|
2667
|
+
label: t('backoffice.form.taskstatus.created'),
|
|
2668
|
+
type: 'date',
|
|
2669
|
+
disabled: true
|
|
2670
|
+
}, {
|
|
2671
|
+
name: 'startTime',
|
|
2672
|
+
label: t('backoffice.form.taskstatus.startTime'),
|
|
2673
|
+
type: 'input',
|
|
2674
|
+
readonly: true
|
|
2675
|
+
}, {
|
|
2676
|
+
name: 'endTime',
|
|
2677
|
+
label: t('backoffice.form.taskstatus.endTime'),
|
|
2678
|
+
type: 'input',
|
|
2679
|
+
readonly: true
|
|
2680
|
+
}, {
|
|
2681
|
+
name: 'lastUpdated',
|
|
2682
|
+
label: t('backoffice.form.taskstatus.lastUpdated'),
|
|
2683
|
+
type: 'input',
|
|
2684
|
+
readonly: true
|
|
2685
|
+
}, {
|
|
2686
|
+
name: 'user.mainEmail',
|
|
2687
|
+
label: t('backoffice.form.taskstatus.user'),
|
|
2688
|
+
type: 'input',
|
|
2689
|
+
readonly: true
|
|
2690
|
+
}, {
|
|
2691
|
+
name: 'organizationDisplayName',
|
|
2692
|
+
label: t('backoffice.form.taskstatus.organizationDisplayName'),
|
|
2693
|
+
type: 'input',
|
|
2694
|
+
readonly: true
|
|
2695
|
+
}, {
|
|
2696
|
+
name: 'taskType',
|
|
2697
|
+
label: t('backoffice.form.taskstatus.taskType'),
|
|
2698
|
+
type: 'input',
|
|
2699
|
+
readonly: true
|
|
2700
|
+
}, {
|
|
2701
|
+
label: t('backoffice.form.taskstatus.progress.status'),
|
|
2702
|
+
name: 'progress.status',
|
|
2703
|
+
type: 'select',
|
|
2704
|
+
values: ['Created', 'Waiting', 'Cancel', 'Cancelled', 'InProgress', 'Done', 'Error', 'DoneWithWarnings'],
|
|
2705
|
+
mode: 'single'
|
|
2706
|
+
}, {
|
|
2707
|
+
name: 'cancelledByUser.mainEmail',
|
|
2708
|
+
label: t('backoffice.form.taskstatus.cancelledByUser.mainEmail'),
|
|
2709
|
+
type: 'input',
|
|
2710
|
+
readonly: true
|
|
2711
|
+
}, {
|
|
2712
|
+
name: 'progress.percentage',
|
|
2713
|
+
label: t('backoffice.form.taskstatus.progress.percentage'),
|
|
2714
|
+
type: 'input',
|
|
2715
|
+
readonly: true
|
|
2716
|
+
}, {
|
|
2717
|
+
name: 'progress.step',
|
|
2718
|
+
label: t('backoffice.form.taskstatus.progress.step'),
|
|
2719
|
+
type: 'input',
|
|
2720
|
+
readonly: true
|
|
2721
|
+
}, {
|
|
2722
|
+
name: 'error',
|
|
2723
|
+
label: t('backoffice.form.taskstatus.error'),
|
|
2724
|
+
type: 'input',
|
|
2725
|
+
readonly: true
|
|
2726
|
+
}, {
|
|
2727
|
+
name: 'warning',
|
|
2728
|
+
label: t('backoffice.form.taskstatus.warning'),
|
|
2729
|
+
type: 'input',
|
|
2730
|
+
readonly: true
|
|
2731
|
+
}]
|
|
2732
|
+
},
|
|
2517
2733
|
TableClientRelations: {
|
|
2518
2734
|
type: 'Table',
|
|
2519
2735
|
canRefresh: true,
|
|
@@ -2639,11 +2855,11 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
2639
2855
|
rowAction: [{
|
|
2640
2856
|
actionType: 'Detail',
|
|
2641
2857
|
type: 'Form',
|
|
2642
|
-
id: '
|
|
2858
|
+
id: 'FormClientRelationDetails',
|
|
2643
2859
|
title: t('backoffice.edit')
|
|
2644
2860
|
}]
|
|
2645
2861
|
},
|
|
2646
|
-
|
|
2862
|
+
FormClientRelationDetails: {
|
|
2647
2863
|
type: 'Form',
|
|
2648
2864
|
title: t('backoffice.form.createclientrelation.title'),
|
|
2649
2865
|
apiInterface: {
|
|
@@ -7175,7 +7391,6 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
7175
7391
|
mode: 'multiple',
|
|
7176
7392
|
values: ['de', 'en', 'fr', 'it'],
|
|
7177
7393
|
permission: 'backoffice_admin_organizations',
|
|
7178
|
-
canSetToUndefined: true,
|
|
7179
7394
|
hidden: function hidden(data) {
|
|
7180
7395
|
return (data === null || data === void 0 ? void 0 : data.type) === undefined || (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) !== 'SUPPLIER';
|
|
7181
7396
|
},
|
|
@@ -8132,6 +8347,9 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
8132
8347
|
options: [{
|
|
8133
8348
|
value: 'HQ',
|
|
8134
8349
|
label: 'HQ'
|
|
8350
|
+
}, {
|
|
8351
|
+
value: 'MASTER',
|
|
8352
|
+
label: 'MASTER'
|
|
8135
8353
|
}, {
|
|
8136
8354
|
value: 'SPIN',
|
|
8137
8355
|
label: 'SPIN'
|
|
@@ -8321,7 +8539,7 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
8321
8539
|
label: t('backoffice.form.renderjob.itemSelector'),
|
|
8322
8540
|
mode: 'single',
|
|
8323
8541
|
type: 'select',
|
|
8324
|
-
values: ['HQ', 'AR', 'SPIN', 'CUTOUT'],
|
|
8542
|
+
values: ['HQ', 'AR', 'MASTER', 'SPIN', 'CUTOUT'],
|
|
8325
8543
|
readonly: {
|
|
8326
8544
|
field: 'state',
|
|
8327
8545
|
op: 'gt',
|
|
@@ -8432,7 +8650,7 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
8432
8650
|
mode: 'single',
|
|
8433
8651
|
type: 'select',
|
|
8434
8652
|
marker: true,
|
|
8435
|
-
values: ['png', 'jpg', 'tif', 'glb', 'gltf', 'fbx'],
|
|
8653
|
+
values: ['png', 'jpg', 'tif', 'glb', 'gltf', 'fbx', 'blend'],
|
|
8436
8654
|
readonly: {
|
|
8437
8655
|
field: 'state',
|
|
8438
8656
|
op: 'gt',
|
|
@@ -8676,6 +8894,148 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
8676
8894
|
op: 'gt',
|
|
8677
8895
|
value: 3
|
|
8678
8896
|
}
|
|
8897
|
+
}, {
|
|
8898
|
+
name: 'fileFormat',
|
|
8899
|
+
label: t('backoffice.form.renderjob.items.fileFormat'),
|
|
8900
|
+
mode: 'single',
|
|
8901
|
+
type: 'select',
|
|
8902
|
+
marker: true,
|
|
8903
|
+
values: ['glb', 'gltf', 'fbx', 'blend'],
|
|
8904
|
+
readonly: {
|
|
8905
|
+
field: 'state',
|
|
8906
|
+
op: 'gt',
|
|
8907
|
+
value: 3
|
|
8908
|
+
},
|
|
8909
|
+
placeholder: 'z.B.: jpg, png, tif'
|
|
8910
|
+
}, {
|
|
8911
|
+
name: 'fileName',
|
|
8912
|
+
label: t('backoffice.form.renderjob.items.fileName'),
|
|
8913
|
+
type: 'input',
|
|
8914
|
+
readonly: {
|
|
8915
|
+
field: 'state',
|
|
8916
|
+
op: 'gt',
|
|
8917
|
+
value: 3
|
|
8918
|
+
},
|
|
8919
|
+
placeholder: 'z.B.: testrendering',
|
|
8920
|
+
dynamic: {
|
|
8921
|
+
seperator: '_',
|
|
8922
|
+
fields: ['job', 'divaNr', 'divaNrVariantId']
|
|
8923
|
+
}
|
|
8924
|
+
}, {
|
|
8925
|
+
name: 'group',
|
|
8926
|
+
label: t('backoffice.form.renderjob.items.group'),
|
|
8927
|
+
type: 'input',
|
|
8928
|
+
readonly: {
|
|
8929
|
+
field: 'state',
|
|
8930
|
+
op: 'gt',
|
|
8931
|
+
value: 3
|
|
8932
|
+
}
|
|
8933
|
+
}, {
|
|
8934
|
+
name: 'product',
|
|
8935
|
+
label: t('backoffice.form.renderjob.items.product'),
|
|
8936
|
+
type: 'input',
|
|
8937
|
+
readonly: true
|
|
8938
|
+
}, {
|
|
8939
|
+
name: 'organizationName',
|
|
8940
|
+
label: t('backoffice.form.renderjob.items.organizationName'),
|
|
8941
|
+
type: 'input',
|
|
8942
|
+
readonly: true
|
|
8943
|
+
}, {
|
|
8944
|
+
name: 'organization',
|
|
8945
|
+
label: t('backoffice.form.renderjob.items.organization'),
|
|
8946
|
+
type: 'input',
|
|
8947
|
+
readonly: true
|
|
8948
|
+
}, {
|
|
8949
|
+
name: 'createdByName',
|
|
8950
|
+
label: t('backoffice.form.renderjob.items.createdByName'),
|
|
8951
|
+
type: 'input',
|
|
8952
|
+
readonly: true
|
|
8953
|
+
}, {
|
|
8954
|
+
name: 'createdByEmail',
|
|
8955
|
+
label: t('backoffice.form.renderjob.items.createdByEmail'),
|
|
8956
|
+
type: 'input',
|
|
8957
|
+
readonly: true
|
|
8958
|
+
}, {
|
|
8959
|
+
name: 'createdBy',
|
|
8960
|
+
label: t('backoffice.form.renderjob.items.createdBy'),
|
|
8961
|
+
type: 'input',
|
|
8962
|
+
readonly: true
|
|
8963
|
+
}], [{
|
|
8964
|
+
name: '_id',
|
|
8965
|
+
label: 'ID',
|
|
8966
|
+
type: 'input',
|
|
8967
|
+
readonly: true
|
|
8968
|
+
}, {
|
|
8969
|
+
name: 'debugUser',
|
|
8970
|
+
label: t('backoffice.form.renderjob.items.debugUser'),
|
|
8971
|
+
type: 'checkbox',
|
|
8972
|
+
valueOnEnabled: {
|
|
8973
|
+
globalValue: 'userId'
|
|
8974
|
+
}
|
|
8975
|
+
}, {
|
|
8976
|
+
name: 'state',
|
|
8977
|
+
label: t('backoffice.form.renderjob.items.state'),
|
|
8978
|
+
type: 'display',
|
|
8979
|
+
translationPrefix: 'renderjob.state',
|
|
8980
|
+
readonly: true
|
|
8981
|
+
}, {
|
|
8982
|
+
name: 'productName',
|
|
8983
|
+
label: t('backoffice.form.renderjob.items.productName'),
|
|
8984
|
+
type: 'input',
|
|
8985
|
+
readonly: true
|
|
8986
|
+
}, {
|
|
8987
|
+
name: 'functionType',
|
|
8988
|
+
label: t('backoffice.form.renderjob.items.functionType'),
|
|
8989
|
+
type: 'select',
|
|
8990
|
+
mode: 'single',
|
|
8991
|
+
readonly: {
|
|
8992
|
+
field: 'state',
|
|
8993
|
+
op: 'gt',
|
|
8994
|
+
value: 3
|
|
8995
|
+
},
|
|
8996
|
+
allowClear: true,
|
|
8997
|
+
values: ['PROD', 'PROD_SEC', 'PROD_CLOSE', 'PROD_MILIEU', 'SHO', 'CONFIG_INFO', 'AR_INFO', 'PROD_DETAIL', 'CAT', 'PLN', 'LOG', 'FUNC', 'COMMERCIAL', 'TPL', 'ASI', 'PLT', 'CAI', 'BAN', 'INF', 'OTH', 'ART', 'OPV']
|
|
8998
|
+
}, {
|
|
8999
|
+
name: 'priority',
|
|
9000
|
+
label: t('backoffice.form.renderjob.items.priority'),
|
|
9001
|
+
readonly: {
|
|
9002
|
+
field: 'state',
|
|
9003
|
+
op: 'gt',
|
|
9004
|
+
value: 3
|
|
9005
|
+
}
|
|
9006
|
+
}, {
|
|
9007
|
+
label: t('backoffice.form.renderjob.items.dracoCompression'),
|
|
9008
|
+
name: 'dracoCompression',
|
|
9009
|
+
type: 'checkbox',
|
|
9010
|
+
readonly: {
|
|
9011
|
+
field: 'state',
|
|
9012
|
+
op: 'gt',
|
|
9013
|
+
value: 3
|
|
9014
|
+
}
|
|
9015
|
+
}, {
|
|
9016
|
+
label: t('backoffice.form.renderjob.items.originPosition'),
|
|
9017
|
+
name: 'originPosition',
|
|
9018
|
+
type: 'select',
|
|
9019
|
+
mode: 'single',
|
|
9020
|
+
translationPrefix: 'backoffice.form.renderjob.items',
|
|
9021
|
+
values: ['leftbackbottom', 'center'],
|
|
9022
|
+
readonly: {
|
|
9023
|
+
field: 'state',
|
|
9024
|
+
op: 'gt',
|
|
9025
|
+
value: 3
|
|
9026
|
+
}
|
|
9027
|
+
}, {
|
|
9028
|
+
name: 'engine',
|
|
9029
|
+
label: t('backoffice.form.renderjob.items.engine'),
|
|
9030
|
+
type: 'select',
|
|
9031
|
+
mode: 'single',
|
|
9032
|
+
marker: true,
|
|
9033
|
+
values: ['blender', 'unity', 'max'],
|
|
9034
|
+
readonly: {
|
|
9035
|
+
field: 'state',
|
|
9036
|
+
op: 'gt',
|
|
9037
|
+
value: 3
|
|
9038
|
+
}
|
|
8679
9039
|
}, {
|
|
8680
9040
|
name: 'arBakedMapsResolution',
|
|
8681
9041
|
label: t('backoffice.form.renderjob.items.arBakedMapsResolution'),
|
|
@@ -8693,7 +9053,7 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
8693
9053
|
mode: 'single',
|
|
8694
9054
|
type: 'select',
|
|
8695
9055
|
marker: true,
|
|
8696
|
-
values: ['png', 'jpg', 'tif', 'glb', 'gltf', 'fbx'],
|
|
9056
|
+
values: ['png', 'jpg', 'tif', 'glb', 'gltf', 'fbx', 'blend'],
|
|
8697
9057
|
readonly: {
|
|
8698
9058
|
field: 'state',
|
|
8699
9059
|
op: 'gt',
|
|
@@ -8828,7 +9188,7 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
8828
9188
|
mode: 'single',
|
|
8829
9189
|
type: 'select',
|
|
8830
9190
|
marker: true,
|
|
8831
|
-
values: ['png', 'jpg', 'tif', 'glb', 'gltf', 'fbx'],
|
|
9191
|
+
values: ['png', 'jpg', 'tif', 'glb', 'gltf', 'fbx', 'blend'],
|
|
8832
9192
|
readonly: {
|
|
8833
9193
|
field: 'state',
|
|
8834
9194
|
op: 'gt',
|
|
@@ -9013,7 +9373,7 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
9013
9373
|
mode: 'single',
|
|
9014
9374
|
type: 'select',
|
|
9015
9375
|
marker: true,
|
|
9016
|
-
values: ['png', 'jpg', 'tif', 'glb', 'gltf', 'fbx'],
|
|
9376
|
+
values: ['png', 'jpg', 'tif', 'glb', 'gltf', 'fbx', 'blend'],
|
|
9017
9377
|
readonly: true,
|
|
9018
9378
|
placeholder: 'z.B.: jpg, png, tif'
|
|
9019
9379
|
}, {
|
|
@@ -9139,8 +9499,18 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
9139
9499
|
},
|
|
9140
9500
|
requiredFields: ['engine', {
|
|
9141
9501
|
field: 'fileFormat',
|
|
9142
|
-
value: ['glb', 'gltf', 'fbx']
|
|
9502
|
+
value: ['glb', 'gltf', 'fbx', 'blend']
|
|
9143
9503
|
}, 'arBakedMapsResolution']
|
|
9504
|
+
}, {
|
|
9505
|
+
value: 3,
|
|
9506
|
+
onField: {
|
|
9507
|
+
field: 'job',
|
|
9508
|
+
value: 'MASTER'
|
|
9509
|
+
},
|
|
9510
|
+
requiredFields: ['engine', {
|
|
9511
|
+
field: 'fileFormat',
|
|
9512
|
+
value: ['glb', 'blend', 'fbx', 'glb']
|
|
9513
|
+
}]
|
|
9144
9514
|
}],
|
|
9145
9515
|
flow: {
|
|
9146
9516
|
0: [1, 10],
|
|
@@ -11487,7 +11857,7 @@ function MenuLabel (_ref) {
|
|
|
11487
11857
|
function _createForOfIteratorHelper$l(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$l(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
11488
11858
|
function _unsupportedIterableToArray$l(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$l(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$l(r, a) : void 0; } }
|
|
11489
11859
|
function _arrayLikeToArray$l(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
11490
|
-
function
|
|
11860
|
+
function applyRule(_ref) {
|
|
11491
11861
|
var rules = _ref.rules,
|
|
11492
11862
|
data = _ref.data,
|
|
11493
11863
|
rootStore = _ref.rootStore,
|
|
@@ -11519,7 +11889,7 @@ function aplyRule(_ref) {
|
|
|
11519
11889
|
result = rule.match.value == sourceValue;
|
|
11520
11890
|
}
|
|
11521
11891
|
} else if (rule.or) {
|
|
11522
|
-
result =
|
|
11892
|
+
result = applyRule({
|
|
11523
11893
|
rules: rule.or,
|
|
11524
11894
|
data: data,
|
|
11525
11895
|
rootStore: rootStore,
|
|
@@ -11553,7 +11923,7 @@ function aplyRules(_ref2) {
|
|
|
11553
11923
|
try {
|
|
11554
11924
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
11555
11925
|
var dt = _step2.value;
|
|
11556
|
-
if (
|
|
11926
|
+
if (applyRule({
|
|
11557
11927
|
rules: rules,
|
|
11558
11928
|
data: dt,
|
|
11559
11929
|
rootStore: rootStore,
|
|
@@ -11572,6 +11942,10 @@ function getIcon(icon) {
|
|
|
11572
11942
|
switch (icon) {
|
|
11573
11943
|
case 'StopFilled':
|
|
11574
11944
|
return /*#__PURE__*/jsx(StopFilled, {});
|
|
11945
|
+
case 'FileZipOutlined':
|
|
11946
|
+
return /*#__PURE__*/jsx(FileZipOutlined, {});
|
|
11947
|
+
case 'ClockCircleOutlined':
|
|
11948
|
+
return /*#__PURE__*/jsx(ClockCircleOutlined, {});
|
|
11575
11949
|
case 'ExclamationCircleFilled':
|
|
11576
11950
|
return /*#__PURE__*/jsx(ExclamationCircleFilled, {});
|
|
11577
11951
|
case 'ApartmentOutlined':
|
|
@@ -12026,7 +12400,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
12026
12400
|
value: function getMenuItem(item) {
|
|
12027
12401
|
var _this3 = this;
|
|
12028
12402
|
if (item.items) {
|
|
12029
|
-
var disabled = item.rules ? !
|
|
12403
|
+
var disabled = item.rules ? !applyRule({
|
|
12030
12404
|
rules: item.rules,
|
|
12031
12405
|
data: undefined,
|
|
12032
12406
|
rootStore: this.root
|
|
@@ -12045,7 +12419,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
12045
12419
|
};
|
|
12046
12420
|
return menuItem;
|
|
12047
12421
|
} else {
|
|
12048
|
-
var _disabled = item.rules ? !
|
|
12422
|
+
var _disabled = item.rules ? !applyRule({
|
|
12049
12423
|
rules: item.rules,
|
|
12050
12424
|
data: undefined,
|
|
12051
12425
|
rootStore: this.root
|
|
@@ -12262,6 +12636,17 @@ var menu = [{
|
|
|
12262
12636
|
label: 'backoffice.menu.items.label.organizationAdmin',
|
|
12263
12637
|
icon: 'ApartmentOutlined',
|
|
12264
12638
|
permission: 'backoffice_admin_organizations'
|
|
12639
|
+
}, {
|
|
12640
|
+
id: 'taskStatusAdmin',
|
|
12641
|
+
label: 'backoffice.menu.items.label.taskStatusAdmin',
|
|
12642
|
+
icon: 'ClockCircleOutlined',
|
|
12643
|
+
permission: 'backoffice_admin_taskstatus',
|
|
12644
|
+
items: [{
|
|
12645
|
+
id: 'TableTaskStatusVersioning',
|
|
12646
|
+
path: 'taskstatusversioning',
|
|
12647
|
+
label: 'backoffice.menu.items.label.taskStatusAdminVersioning',
|
|
12648
|
+
icon: 'FileZipOutlined'
|
|
12649
|
+
}]
|
|
12265
12650
|
}, {
|
|
12266
12651
|
id: 'TableAllUsers',
|
|
12267
12652
|
path: 'users',
|
|
@@ -12975,8 +13360,8 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
12975
13360
|
return _regeneratorRuntime.wrap(function _callee5$(_context6) {
|
|
12976
13361
|
while (1) switch (_context6.prev = _context6.next) {
|
|
12977
13362
|
case 0:
|
|
12978
|
-
url =
|
|
12979
|
-
|
|
13363
|
+
url = applyMapping({
|
|
13364
|
+
mappable: download.request,
|
|
12980
13365
|
mapping: download.mapping,
|
|
12981
13366
|
//download.mapping,
|
|
12982
13367
|
mappingData: data,
|
|
@@ -14895,8 +15280,8 @@ function useButtonData (_ref) {
|
|
|
14895
15280
|
message: configuration.resultTranslation ? t(configuration.resultTranslation.success) : result !== null && result !== void 0 && result.result ? result.result : 'Success'
|
|
14896
15281
|
});
|
|
14897
15282
|
if (callback) {
|
|
14898
|
-
newData =
|
|
14899
|
-
|
|
15283
|
+
newData = applyMapping({
|
|
15284
|
+
mappable: {},
|
|
14900
15285
|
mappingData: result,
|
|
14901
15286
|
mapping: configuration.resultMapping,
|
|
14902
15287
|
rootStore: root,
|
|
@@ -17492,6 +17877,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
17492
17877
|
});
|
|
17493
17878
|
case 'date':
|
|
17494
17879
|
return /*#__PURE__*/jsx(DatePicker, {
|
|
17880
|
+
format: "DD/MM/YYYY",
|
|
17495
17881
|
disabled: disabled
|
|
17496
17882
|
});
|
|
17497
17883
|
case 'subTitle':
|
|
@@ -19540,7 +19926,7 @@ function ActionButton (_ref) {
|
|
|
19540
19926
|
try {
|
|
19541
19927
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
19542
19928
|
var dt = _step.value;
|
|
19543
|
-
if ((action.rule ? !
|
|
19929
|
+
if ((action.rule ? !applyRule({
|
|
19544
19930
|
rules: action.rule,
|
|
19545
19931
|
data: dt,
|
|
19546
19932
|
rootStore: root
|
|
@@ -19555,7 +19941,7 @@ function ActionButton (_ref) {
|
|
|
19555
19941
|
_iterator.f();
|
|
19556
19942
|
}
|
|
19557
19943
|
} else {
|
|
19558
|
-
disable = disabled !== null && disabled !== void 0 ? disabled : action.rule ? !
|
|
19944
|
+
disable = disabled !== null && disabled !== void 0 ? disabled : action.rule ? !applyRule({
|
|
19559
19945
|
rules: action.rule,
|
|
19560
19946
|
data: ruleData !== null && ruleData !== void 0 ? ruleData : data,
|
|
19561
19947
|
rootStore: root
|
|
@@ -22403,8 +22789,8 @@ function getExpandedRowRenderer (config, root) {
|
|
|
22403
22789
|
return function (record) {
|
|
22404
22790
|
var data = record;
|
|
22405
22791
|
if (config.mapping) {
|
|
22406
|
-
data =
|
|
22407
|
-
|
|
22792
|
+
data = applyMapping({
|
|
22793
|
+
mappable: {},
|
|
22408
22794
|
mapping: config.mapping,
|
|
22409
22795
|
mappingData: record,
|
|
22410
22796
|
rootStore: root
|
|
@@ -23545,7 +23931,7 @@ dayjs.extend(weekYear);
|
|
|
23545
23931
|
Select$1.Option;
|
|
23546
23932
|
var LOG$3 = getLogger('Backoffice', 'BaseTable');
|
|
23547
23933
|
var TableWrapper = function TableWrapper(_ref) {
|
|
23548
|
-
var _state$configuration$, _toggleConfig$label, _toggleConfig$labelOf, _state$globalFilter, _state$configuration$2, _state$configuration$3, _state$globalFilter2, _state$globalFilter3, _state$globalFilter4, _state$globalFilter5, _state$configuration$4, _state$configuration$5, _state$globalFilter$s, _state$configuration$6, _state$configuration$7, _state$configuration$8, _state$selected2, _state$configuration$
|
|
23934
|
+
var _state$configuration$, _toggleConfig$label, _toggleConfig$labelOf, _state$globalFilter, _state$configuration$2, _state$configuration$3, _state$globalFilter2, _state$globalFilter3, _state$globalFilter4, _state$globalFilter5, _state$configuration$4, _state$configuration$5, _state$globalFilter$s, _state$configuration$6, _state$configuration$7, _state$configuration$8, _state$configuration$9, _state$configuration$10, _state$selected2, _state$configuration$11, _state$configuration$12, _state$configuration$13, _state$configuration$16, _state$configuration$17, _state$configuration$18;
|
|
23549
23935
|
var state = _ref.state;
|
|
23550
23936
|
var root = useStore();
|
|
23551
23937
|
var _useState = useState(0),
|
|
@@ -23743,14 +24129,16 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
23743
24129
|
min: (_state$configuration$6 = state.configuration.rules) === null || _state$configuration$6 === void 0 ? void 0 : _state$configuration$6.min,
|
|
23744
24130
|
deleting: state.deleting,
|
|
23745
24131
|
onDelete: state.onDelete,
|
|
23746
|
-
|
|
24132
|
+
label: (_state$configuration$7 = state.configuration.deleteAction) === null || _state$configuration$7 === void 0 ? void 0 : _state$configuration$7.label,
|
|
24133
|
+
labelDialog: (_state$configuration$8 = state.configuration.deleteAction) === null || _state$configuration$8 === void 0 ? void 0 : _state$configuration$8.labelDialog,
|
|
24134
|
+
disabled: !!((_state$configuration$9 = state.configuration.deleteAction) !== null && _state$configuration$9 !== void 0 && (_state$configuration$10 = _state$configuration$9.disabled) !== null && _state$configuration$10 !== void 0 && _state$configuration$10.call(_state$configuration$9, ((_state$selected2 = state.selected) !== null && _state$selected2 !== void 0 ? _state$selected2 : []).map(function (id) {
|
|
23747
24135
|
return state.data.find(function (d) {
|
|
23748
24136
|
return d._id == id;
|
|
23749
24137
|
});
|
|
23750
24138
|
})))
|
|
23751
24139
|
}), state.configuration.copyAction !== undefined && /*#__PURE__*/jsx(CopyButton, {
|
|
23752
24140
|
state: state
|
|
23753
|
-
}), (_state$configuration$
|
|
24141
|
+
}), (_state$configuration$11 = state.configuration.bulkActions) === null || _state$configuration$11 === void 0 ? void 0 : _state$configuration$11.map(function (action) {
|
|
23754
24142
|
return /*#__PURE__*/jsx(BulkAction, {
|
|
23755
24143
|
action: action,
|
|
23756
24144
|
state: state,
|
|
@@ -23761,26 +24149,26 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
23761
24149
|
setProgressBarPercentage: setProgressBarPercentage
|
|
23762
24150
|
} : undefined
|
|
23763
24151
|
}, action.id);
|
|
23764
|
-
}), state.configuration.createAction && checkPermission(state.configuration.createAction.permission) && !((_state$configuration$
|
|
24152
|
+
}), state.configuration.createAction && checkPermission(state.configuration.createAction.permission) && !((_state$configuration$12 = (_state$configuration$13 = state.configuration.createAction).hidden) !== null && _state$configuration$12 !== void 0 && _state$configuration$12.call(_state$configuration$13, data)) && /*#__PURE__*/jsx(ActionButton, {
|
|
23765
24153
|
action: state.configuration.createAction,
|
|
23766
24154
|
callback: function callback(data) {
|
|
23767
|
-
var _state$onUpdate, _state$configuration$
|
|
24155
|
+
var _state$onUpdate, _state$configuration$14, _state$configuration$15;
|
|
23768
24156
|
(_state$onUpdate = state.onUpdate) === null || _state$onUpdate === void 0 || _state$onUpdate.call(state, data);
|
|
23769
|
-
(_state$configuration$
|
|
24157
|
+
(_state$configuration$14 = state.configuration.createAction) === null || _state$configuration$14 === void 0 || (_state$configuration$15 = _state$configuration$14.callback) === null || _state$configuration$15 === void 0 || _state$configuration$15.call(_state$configuration$14, data);
|
|
23770
24158
|
},
|
|
23771
24159
|
type: "Button",
|
|
23772
24160
|
id: 'create',
|
|
23773
24161
|
defaultLabel: t('backoffice.table.emailtemplates.createAction.title'),
|
|
23774
24162
|
isCreateButton: true,
|
|
23775
|
-
disabled: state.configuration.createAction.disableOnToggle === !!state.globalFilter.toggle || ((_state$configuration$
|
|
23776
|
-
data: state.configuration.createActionMapping ?
|
|
23777
|
-
|
|
24163
|
+
disabled: state.configuration.createAction.disableOnToggle === !!state.globalFilter.toggle || ((_state$configuration$16 = (_state$configuration$17 = state.configuration.createAction).disabled) === null || _state$configuration$16 === void 0 ? void 0 : _state$configuration$16.call(_state$configuration$17, data)),
|
|
24164
|
+
data: state.configuration.createActionMapping ? applyMapping({
|
|
24165
|
+
mappable: {},
|
|
23778
24166
|
mapping: state.configuration.createActionMapping,
|
|
23779
24167
|
mappingData: state.mappingData,
|
|
23780
24168
|
rootStore: root
|
|
23781
24169
|
}) : undefined,
|
|
23782
|
-
ruleData: state.configuration.createActionRuleMapping ?
|
|
23783
|
-
|
|
24170
|
+
ruleData: state.configuration.createActionRuleMapping ? applyMapping({
|
|
24171
|
+
mappable: {},
|
|
23784
24172
|
mapping: state.configuration.createActionRuleMapping,
|
|
23785
24173
|
mappingData: state.mappingData,
|
|
23786
24174
|
rootStore: root
|
|
@@ -23820,13 +24208,13 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
23820
24208
|
className: "andt-table",
|
|
23821
24209
|
scroll: {
|
|
23822
24210
|
x: '100%',
|
|
23823
|
-
y: (_state$configuration$
|
|
24211
|
+
y: (_state$configuration$18 = state.configuration.height) !== null && _state$configuration$18 !== void 0 ? _state$configuration$18 : '100%'
|
|
23824
24212
|
},
|
|
23825
24213
|
rowClassName: editableRow,
|
|
23826
24214
|
components: cellRenderer,
|
|
23827
24215
|
rowKey: function rowKey(dataRow) {
|
|
23828
|
-
var _state$configuration$
|
|
23829
|
-
return goTroughObject(dataRow, (_state$configuration$
|
|
24216
|
+
var _state$configuration$19, _state$configuration$20;
|
|
24217
|
+
return goTroughObject(dataRow, (_state$configuration$19 = (_state$configuration$20 = state.configuration.rowKey) === null || _state$configuration$20 === void 0 ? void 0 : _state$configuration$20.split('.')) !== null && _state$configuration$19 !== void 0 ? _state$configuration$19 : ['_id'], 0);
|
|
23830
24218
|
},
|
|
23831
24219
|
dataSource: data,
|
|
23832
24220
|
loading: state.loading,
|
|
@@ -23867,13 +24255,15 @@ function DeleteButton(_ref2) {
|
|
|
23867
24255
|
min = _ref2$min === void 0 ? 0 : _ref2$min,
|
|
23868
24256
|
deleting = _ref2.deleting,
|
|
23869
24257
|
onDelete = _ref2.onDelete,
|
|
23870
|
-
disabled = _ref2.disabled
|
|
24258
|
+
disabled = _ref2.disabled,
|
|
24259
|
+
label = _ref2.label,
|
|
24260
|
+
labelDialog = _ref2.labelDialog;
|
|
23871
24261
|
var _useTranslation2 = useTranslation(),
|
|
23872
24262
|
t = _useTranslation2.t;
|
|
23873
24263
|
var hasSelected = (selected === null || selected === void 0 ? void 0 : selected.length) > 0;
|
|
23874
24264
|
var leftAfterDelete = total - selected.length;
|
|
23875
24265
|
var allowDelete = leftAfterDelete >= min;
|
|
23876
|
-
var popupText = !allowDelete ? t('backoffice.basezable.allowdelete-false') + " ".concat(min) : t('backoffice.basezable.allowdelete-true') + " ".concat(selected.length, " ");
|
|
24266
|
+
var popupText = !allowDelete ? t('backoffice.basezable.allowdelete-false') + " ".concat(min) : t(labelDialog !== null && labelDialog !== void 0 ? labelDialog : 'backoffice.basezable.allowdelete-true') + " ".concat(selected.length, " ");
|
|
23877
24267
|
return /*#__PURE__*/jsx(Fragment, {
|
|
23878
24268
|
children: /*#__PURE__*/jsx(Popconfirm, {
|
|
23879
24269
|
title: popupText,
|
|
@@ -23890,13 +24280,13 @@ function DeleteButton(_ref2) {
|
|
|
23890
24280
|
disabled: !hasSelected || disabled,
|
|
23891
24281
|
loading: deleting,
|
|
23892
24282
|
danger: true,
|
|
23893
|
-
children: t('action.delete')
|
|
24283
|
+
children: t(label !== null && label !== void 0 ? label : 'action.delete')
|
|
23894
24284
|
})
|
|
23895
24285
|
})
|
|
23896
24286
|
});
|
|
23897
24287
|
}
|
|
23898
24288
|
function CopyButton(_ref3) {
|
|
23899
|
-
var _state$configuration$
|
|
24289
|
+
var _state$configuration$24;
|
|
23900
24290
|
var state = _ref3.state;
|
|
23901
24291
|
var root = useStore();
|
|
23902
24292
|
new _default$d({
|
|
@@ -23905,13 +24295,13 @@ function CopyButton(_ref3) {
|
|
|
23905
24295
|
}, root);
|
|
23906
24296
|
var onCopy = /*#__PURE__*/function () {
|
|
23907
24297
|
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
23908
|
-
var _state$configuration$
|
|
24298
|
+
var _state$configuration$21;
|
|
23909
24299
|
var copyAction, _iterator3, _step3, selectedRow;
|
|
23910
24300
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
23911
24301
|
while (1) switch (_context.prev = _context.next) {
|
|
23912
24302
|
case 0:
|
|
23913
24303
|
copyAction = state.configuration.copyAction;
|
|
23914
|
-
if (((_state$configuration$
|
|
24304
|
+
if (((_state$configuration$21 = state.configuration.copyAction) === null || _state$configuration$21 === void 0 ? void 0 : _state$configuration$21.apiInterface) != undefined) {
|
|
23915
24305
|
_iterator3 = _createForOfIteratorHelper$4(state.selected);
|
|
23916
24306
|
try {
|
|
23917
24307
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
@@ -23946,13 +24336,13 @@ function CopyButton(_ref3) {
|
|
|
23946
24336
|
}();
|
|
23947
24337
|
var onCopyAction = /*#__PURE__*/function () {
|
|
23948
24338
|
var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
|
23949
|
-
var _state$configuration$
|
|
24339
|
+
var _state$configuration$22, _state$configuration$23;
|
|
23950
24340
|
var copyAction, id, data;
|
|
23951
24341
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
23952
24342
|
while (1) switch (_context3.prev = _context3.next) {
|
|
23953
24343
|
case 0:
|
|
23954
24344
|
copyAction = state.configuration.copyAction;
|
|
23955
|
-
if (!(copyAction.id == undefined || copyAction.actionType != 'Detail' || ((_state$configuration$
|
|
24345
|
+
if (!(copyAction.id == undefined || copyAction.actionType != 'Detail' || ((_state$configuration$22 = state.configuration.createAction) === null || _state$configuration$22 === void 0 ? void 0 : _state$configuration$22.actionType) != 'Detail')) {
|
|
23956
24346
|
_context3.next = 3;
|
|
23957
24347
|
break;
|
|
23958
24348
|
}
|
|
@@ -23963,8 +24353,8 @@ function CopyButton(_ref3) {
|
|
|
23963
24353
|
return state.getDataById(id);
|
|
23964
24354
|
case 6:
|
|
23965
24355
|
data = _context3.sent;
|
|
23966
|
-
data.data[0] =
|
|
23967
|
-
|
|
24356
|
+
data.data[0] = applyMapping({
|
|
24357
|
+
mappable: {},
|
|
23968
24358
|
mappingData: data.data[0],
|
|
23969
24359
|
mapping: copyAction.mapping,
|
|
23970
24360
|
rootStore: root
|
|
@@ -23976,7 +24366,7 @@ function CopyButton(_ref3) {
|
|
|
23976
24366
|
configurationId: copyAction === null || copyAction === void 0 ? void 0 : copyAction.id,
|
|
23977
24367
|
data: data.data[0],
|
|
23978
24368
|
type: copyAction === null || copyAction === void 0 ? void 0 : copyAction.type,
|
|
23979
|
-
mapping: (_state$configuration$
|
|
24369
|
+
mapping: (_state$configuration$23 = state.configuration.createAction) === null || _state$configuration$23 === void 0 ? void 0 : _state$configuration$23.mapping,
|
|
23980
24370
|
mappingData: data.data[0],
|
|
23981
24371
|
callback: function () {
|
|
23982
24372
|
var _callback = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(e) {
|
|
@@ -24014,7 +24404,7 @@ function CopyButton(_ref3) {
|
|
|
24014
24404
|
return /*#__PURE__*/jsx(Button, {
|
|
24015
24405
|
type: "primary",
|
|
24016
24406
|
onClick: onCopy,
|
|
24017
|
-
disabled: state.selected.length == 0 || state.selected.length > 1 && ((_state$configuration$
|
|
24407
|
+
disabled: state.selected.length == 0 || state.selected.length > 1 && ((_state$configuration$24 = state.configuration.copyAction) === null || _state$configuration$24 === void 0 ? void 0 : _state$configuration$24.disableOnMultiselect),
|
|
24018
24408
|
children: t('backoffice.basetable.copy')
|
|
24019
24409
|
});
|
|
24020
24410
|
}
|
|
@@ -24841,7 +25231,7 @@ function updateData (_ref) {
|
|
|
24841
25231
|
|
|
24842
25232
|
function ownKeys$i(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
24843
25233
|
function _objectSpread$i(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$i(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$i(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24844
|
-
function
|
|
25234
|
+
function applyFilterAndSortation (_ref) {
|
|
24845
25235
|
var data = _ref.data,
|
|
24846
25236
|
filters = _ref.filters,
|
|
24847
25237
|
sorter = _ref.sorter,
|
|
@@ -25012,7 +25402,7 @@ function useTableData$1 (_ref) {
|
|
|
25012
25402
|
data: newData
|
|
25013
25403
|
});
|
|
25014
25404
|
if (!filterServerSide) {
|
|
25015
|
-
var res =
|
|
25405
|
+
var res = applyFilterAndSortation(_objectSpread$h(_objectSpread$h({}, filterData), {}, {
|
|
25016
25406
|
data: newData
|
|
25017
25407
|
}));
|
|
25018
25408
|
newState.data = res.data;
|
|
@@ -25087,11 +25477,11 @@ function useTableData$1 (_ref) {
|
|
|
25087
25477
|
}));
|
|
25088
25478
|
if (!filterServerSide) {
|
|
25089
25479
|
var unfilteredData = dataParam ? dataParam : state.unfilteredData;
|
|
25090
|
-
var
|
|
25480
|
+
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$h(_objectSpread$h({}, p), {}, {
|
|
25091
25481
|
data: unfilteredData
|
|
25092
25482
|
})),
|
|
25093
|
-
data =
|
|
25094
|
-
pagination =
|
|
25483
|
+
data = _applyFilterAndSortat.data,
|
|
25484
|
+
pagination = _applyFilterAndSortat.pagination;
|
|
25095
25485
|
setState(_objectSpread$h(_objectSpread$h({}, state), {}, {
|
|
25096
25486
|
data: data,
|
|
25097
25487
|
pagination: pagination,
|
|
@@ -25417,7 +25807,8 @@ function useTableData (_ref) {
|
|
|
25417
25807
|
var toggleConfig = (_configuration$filter = configuration.filter) === null || _configuration$filter === void 0 ? void 0 : _configuration$filter.toggle;
|
|
25418
25808
|
var toggleFilter = {};
|
|
25419
25809
|
toggleConfig === null || toggleConfig === void 0 || toggleConfig.fields.forEach(function (f) {
|
|
25420
|
-
|
|
25810
|
+
var _toggleConfig$isAnd;
|
|
25811
|
+
return toggleFilter[f] = [toggleConfig.globalValue ? root.getGlobalValue(toggleConfig.globalValue) : true, 'eq', ((_toggleConfig$isAnd = toggleConfig.isAnd) !== null && _toggleConfig$isAnd !== void 0 ? _toggleConfig$isAnd : false) ? 0 : 1];
|
|
25421
25812
|
});
|
|
25422
25813
|
var defaultFilter = {};
|
|
25423
25814
|
(_configuration$filter2 = configuration.filter) === null || _configuration$filter2 === void 0 || (_configuration$filter2 = _configuration$filter2["default"]) === null || _configuration$filter2 === void 0 || _configuration$filter2.fields.forEach(function (f) {
|
|
@@ -25533,7 +25924,7 @@ function useTableData (_ref) {
|
|
|
25533
25924
|
dataRow: dataRow
|
|
25534
25925
|
}),
|
|
25535
25926
|
nextInitData = _updateData2.data;
|
|
25536
|
-
var
|
|
25927
|
+
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$g(_objectSpread$g(_objectSpread$g({}, filterData), {}, {
|
|
25537
25928
|
filters: _objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g({}, filterData.filters), globalFilter.search), !(configuration !== null && configuration !== void 0 && (_configuration$filter5 = configuration.filter) !== null && _configuration$filter5 !== void 0 && (_configuration$filter5 = _configuration$filter5.toggle) !== null && _configuration$filter5 !== void 0 && _configuration$filter5.inQuery) ? globalFilter.toggle : undefined), globalFilter.select), globalFilter.timeStamp), globalFilter["default"])
|
|
25538
25929
|
}, configuration !== null && configuration !== void 0 && (_configuration$filter6 = configuration.filter) !== null && _configuration$filter6 !== void 0 && (_configuration$filter6 = _configuration$filter6.toggle) !== null && _configuration$filter6 !== void 0 && _configuration$filter6.inQuery ? {
|
|
25539
25930
|
genericProps: globalFilter.toggle
|
|
@@ -25541,8 +25932,8 @@ function useTableData (_ref) {
|
|
|
25541
25932
|
data: nextInitData,
|
|
25542
25933
|
filterServerSide: filterServerSide
|
|
25543
25934
|
})),
|
|
25544
|
-
_data2 =
|
|
25545
|
-
_pagination2 =
|
|
25935
|
+
_data2 = _applyFilterAndSortat.data,
|
|
25936
|
+
_pagination2 = _applyFilterAndSortat.pagination;
|
|
25546
25937
|
newInitData = nextInitData;
|
|
25547
25938
|
newState = _objectSpread$g(_objectSpread$g({}, newState), {}, {
|
|
25548
25939
|
pagination: _pagination2,
|
|
@@ -25667,7 +26058,7 @@ function useTableData (_ref) {
|
|
|
25667
26058
|
}();
|
|
25668
26059
|
var onChange = /*#__PURE__*/function () {
|
|
25669
26060
|
var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(p) {
|
|
25670
|
-
var _configuration$filter10, _configuration$filter11,
|
|
26061
|
+
var _configuration$filter10, _configuration$filter11, _prefilter$select, _configuration$filter12, _configuration$filter13;
|
|
25671
26062
|
var prefilter,
|
|
25672
26063
|
refresh,
|
|
25673
26064
|
clearSelection,
|
|
@@ -25676,11 +26067,14 @@ function useTableData (_ref) {
|
|
|
25676
26067
|
currentFilterHash,
|
|
25677
26068
|
currentPagination,
|
|
25678
26069
|
currentUrl,
|
|
26070
|
+
_configuration$filter14,
|
|
25679
26071
|
_configuration$filter15,
|
|
26072
|
+
_prefilter$toggle,
|
|
26073
|
+
_parseFilter,
|
|
25680
26074
|
ssf,
|
|
25681
26075
|
data,
|
|
25682
26076
|
_data3,
|
|
25683
|
-
|
|
26077
|
+
_applyFilterAndSortat2,
|
|
25684
26078
|
_data4,
|
|
25685
26079
|
pagination,
|
|
25686
26080
|
_args3 = arguments;
|
|
@@ -25694,7 +26088,7 @@ function useTableData (_ref) {
|
|
|
25694
26088
|
loading: true
|
|
25695
26089
|
}));
|
|
25696
26090
|
currentData = initData;
|
|
25697
|
-
filterData = _objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g(
|
|
26091
|
+
filterData = _objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g({}, prefilter.search), ((_configuration$filter10 = configuration.filter) === null || _configuration$filter10 === void 0 || (_configuration$filter10 = _configuration$filter10.select) === null || _configuration$filter10 === void 0 ? void 0 : _configuration$filter10.applyDefaultValue) !== false || ((_configuration$filter11 = configuration.filter) === null || _configuration$filter11 === void 0 || (_configuration$filter11 = _configuration$filter11.select) === null || _configuration$filter11 === void 0 ? void 0 : _configuration$filter11.defaultValue) !== ((_prefilter$select = prefilter.select) === null || _prefilter$select === void 0 || (_prefilter$select = _prefilter$select[(_configuration$filter12 = (_configuration$filter13 = configuration.filter) === null || _configuration$filter13 === void 0 || (_configuration$filter13 = _configuration$filter13.select) === null || _configuration$filter13 === void 0 ? void 0 : _configuration$filter13.filterField) !== null && _configuration$filter12 !== void 0 ? _configuration$filter12 : '']) === null || _prefilter$select === void 0 ? void 0 : _prefilter$select[0]) ? prefilter.select : undefined), prefilter.timeStamp), prefilter["default"]); //remove all null values
|
|
25698
26092
|
filterData = Object.fromEntries(Object.entries(filterData).filter(function (_ref6) {
|
|
25699
26093
|
var _ref7 = _slicedToArray(_ref6, 2);
|
|
25700
26094
|
_ref7[0];
|
|
@@ -25715,11 +26109,11 @@ function useTableData (_ref) {
|
|
|
25715
26109
|
columns: configuration.columns,
|
|
25716
26110
|
filters: filterData,
|
|
25717
26111
|
sorter: p.sorter
|
|
25718
|
-
}, configuration !== null && configuration !== void 0 && (_configuration$
|
|
26112
|
+
}, configuration !== null && configuration !== void 0 && (_configuration$filter14 = configuration.filter) !== null && _configuration$filter14 !== void 0 && (_configuration$filter14 = _configuration$filter14.toggle) !== null && _configuration$filter14 !== void 0 && _configuration$filter14.inQuery ? {
|
|
25719
26113
|
genericProps: prefilter.toggle
|
|
25720
26114
|
} : undefined);
|
|
25721
26115
|
_context3.next = 14;
|
|
25722
|
-
return apiHandler.readList(parentMapping || configuration.mapping, mapping, ssf);
|
|
26116
|
+
return apiHandler.readList(parentMapping || configuration.mapping, mapping, ssf, undefined, parseFilter(!(configuration !== null && configuration !== void 0 && (_configuration$filter15 = configuration.filter) !== null && _configuration$filter15 !== void 0 && (_configuration$filter15 = _configuration$filter15.toggle) !== null && _configuration$filter15 !== void 0 && _configuration$filter15.inQuery) ? (_prefilter$toggle = prefilter.toggle) !== null && _prefilter$toggle !== void 0 ? _prefilter$toggle : {} : {}, (_parseFilter = parseFilter(p.filters, undefined)) === null || _parseFilter === void 0 ? void 0 : _parseFilter.slice(1, -1)));
|
|
25723
26117
|
case 14:
|
|
25724
26118
|
data = _context3.sent;
|
|
25725
26119
|
currentUrl = apiHandler.getReadListUrl(parentMapping || configuration.mapping, mapping, ssf);
|
|
@@ -25741,12 +26135,12 @@ function useTableData (_ref) {
|
|
|
25741
26135
|
currentData = _data3.data;
|
|
25742
26136
|
setInitData(currentData);
|
|
25743
26137
|
case 26:
|
|
25744
|
-
|
|
26138
|
+
_applyFilterAndSortat2 = applyFilterAndSortation(_objectSpread$g(_objectSpread$g({}, p), {}, {
|
|
25745
26139
|
pagination: currentPagination,
|
|
25746
26140
|
filters: filterData,
|
|
25747
26141
|
data: currentData,
|
|
25748
26142
|
filterServerSide: filterServerSide
|
|
25749
|
-
})), _data4 =
|
|
26143
|
+
})), _data4 = _applyFilterAndSortat2.data, pagination = _applyFilterAndSortat2.pagination;
|
|
25750
26144
|
currentData = _data4;
|
|
25751
26145
|
currentPagination = pagination;
|
|
25752
26146
|
case 29:
|
|
@@ -25977,7 +26371,7 @@ function useTableData (_ref) {
|
|
|
25977
26371
|
}
|
|
25978
26372
|
var toggleFilter = {};
|
|
25979
26373
|
configuration.filter.toggle.fields.forEach(function (f) {
|
|
25980
|
-
return toggleFilter[f] = [configuration.filter.toggle.globalValue ? root.getGlobalValue(configuration.filter.toggle.globalValue) : true, 'eq', 1];
|
|
26374
|
+
return toggleFilter[f] = [configuration.filter.toggle.globalValue ? root.getGlobalValue(configuration.filter.toggle.globalValue) : true, 'eq', configuration.filter.toggle.isAnd ? 0 : 1];
|
|
25981
26375
|
});
|
|
25982
26376
|
var newGlobalFilter = _objectSpread$g(_objectSpread$g({}, globalFilter), {}, {
|
|
25983
26377
|
toggle: globalFilter.toggle ? undefined : toggleFilter
|
|
@@ -26003,9 +26397,9 @@ function useTableData (_ref) {
|
|
|
26003
26397
|
var _configuration$filter23;
|
|
26004
26398
|
(_configuration$filter23 = configuration.filter) === null || _configuration$filter23 === void 0 || _configuration$filter23.search.fields.forEach(function (f) {
|
|
26005
26399
|
if (typeof f == 'string') {
|
|
26006
|
-
newGlobalFilter.search[f] = [value, 'contains',
|
|
26400
|
+
newGlobalFilter.search[f] = [value, 'contains', 1]; //normally global search should be or, so 1
|
|
26007
26401
|
} else {
|
|
26008
|
-
newGlobalFilter.search[f[0]] = [value, f[1],
|
|
26402
|
+
newGlobalFilter.search[f[0]] = [value, f[1], 1];
|
|
26009
26403
|
}
|
|
26010
26404
|
});
|
|
26011
26405
|
}
|
|
@@ -30434,8 +30828,8 @@ function Detail(_ref) {
|
|
|
30434
30828
|
targetField: (_ob$sourceField = ob.sourceField) !== null && _ob$sourceField !== void 0 ? _ob$sourceField : ob.sourceValue
|
|
30435
30829
|
});
|
|
30436
30830
|
});
|
|
30437
|
-
data =
|
|
30438
|
-
|
|
30831
|
+
data = applyMapping({
|
|
30832
|
+
mappable: {},
|
|
30439
30833
|
mappingData: data,
|
|
30440
30834
|
mapping: {
|
|
30441
30835
|
map: map,
|
|
@@ -30538,8 +30932,8 @@ function Detail(_ref) {
|
|
|
30538
30932
|
apiInterface: info.apiInterface,
|
|
30539
30933
|
ref: ref,
|
|
30540
30934
|
id: info.configurationId,
|
|
30541
|
-
data: info.mapping ?
|
|
30542
|
-
|
|
30935
|
+
data: info.mapping ? applyMapping({
|
|
30936
|
+
mappable: {},
|
|
30543
30937
|
mapping: info.mapping,
|
|
30544
30938
|
mappingData: info.data,
|
|
30545
30939
|
rootStore: root
|
|
@@ -30550,8 +30944,8 @@ function Detail(_ref) {
|
|
|
30550
30944
|
setCanSave: setCanSave
|
|
30551
30945
|
}), info.type == 'RoleSelector' && /*#__PURE__*/jsx(RoleSelector$1, {
|
|
30552
30946
|
ref: ref,
|
|
30553
|
-
data: info.mapping ?
|
|
30554
|
-
|
|
30947
|
+
data: info.mapping ? applyMapping({
|
|
30948
|
+
mappable: {},
|
|
30555
30949
|
mapping: info.mapping,
|
|
30556
30950
|
mappingData: info.data,
|
|
30557
30951
|
rootStore: root
|
|
@@ -30560,8 +30954,8 @@ function Detail(_ref) {
|
|
|
30560
30954
|
onChange: onChange
|
|
30561
30955
|
}), info.type == 'RelationSelector' && /*#__PURE__*/jsx(RelationSelector$1, {
|
|
30562
30956
|
ref: ref,
|
|
30563
|
-
data: info.mapping ?
|
|
30564
|
-
|
|
30957
|
+
data: info.mapping ? applyMapping({
|
|
30958
|
+
mappable: {},
|
|
30565
30959
|
mapping: info.mapping,
|
|
30566
30960
|
mappingData: info.data,
|
|
30567
30961
|
rootStore: root
|
|
@@ -30574,8 +30968,8 @@ function Detail(_ref) {
|
|
|
30574
30968
|
ref: ref,
|
|
30575
30969
|
id: info.configurationId,
|
|
30576
30970
|
onChange: onChange,
|
|
30577
|
-
data: info.mapping ?
|
|
30578
|
-
|
|
30971
|
+
data: info.mapping ? applyMapping({
|
|
30972
|
+
mappable: {},
|
|
30579
30973
|
mapping: info.mapping,
|
|
30580
30974
|
mappingData: info.data,
|
|
30581
30975
|
rootStore: root
|
|
@@ -30669,8 +31063,8 @@ function Modal() {
|
|
|
30669
31063
|
};
|
|
30670
31064
|
var data = useMemo(function () {
|
|
30671
31065
|
var _info$action;
|
|
30672
|
-
return (_info$action = info.action) !== null && _info$action !== void 0 && _info$action.mapping ?
|
|
30673
|
-
|
|
31066
|
+
return (_info$action = info.action) !== null && _info$action !== void 0 && _info$action.mapping ? applyMapping({
|
|
31067
|
+
mappable: {},
|
|
30674
31068
|
mapping: info.action.mapping,
|
|
30675
31069
|
mappingData: info.data,
|
|
30676
31070
|
rootStore: root
|