@crystaldesign/diva-backoffice 25.13.0-beta.3 → 25.13.0-beta.31
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 +782 -176
- package/build/types/backoffice/src/Configuration.d.ts +6 -1
- package/build/types/backoffice/src/Configuration.d.ts.map +1 -1
- package/build/types/backoffice/src/store/ContentStore.d.ts.map +1 -1
- package/build/types/backoffice/src/store/DownloadStore.d.ts +2 -1
- package/build/types/backoffice/src/store/DownloadStore.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Form/Fields/FormList/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Form/elements.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Form/types.d.ts +2 -0
- package/build/types/backoffice/src/ui/Form/types.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Form/useFormData.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/Options.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TablePriceFeatureGroups/index.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/types.d.ts +1 -1
- package/build/types/backoffice/src/ui/Table/types.d.ts.map +1 -1
- package/package.json +9 -9
package/build/esm/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import React, { createElement, createContext, useState, useEffect, useRef, useMemo, forwardRef, useImperativeHandle, useCallback, createRef, useReducer, useContext, memo, useDeferredValue } from 'react';
|
|
3
3
|
import 'antd/dist/reset.css';
|
|
4
|
-
import { Form as Form$2, Button, Input as Input$1, Popover, Typography,
|
|
4
|
+
import { Divider, Form as Form$2, Button, Input as Input$1, Popover, Typography, Progress, Select as Select$1, Avatar, Spin, Radio, Space, Dropdown, DatePicker, Checkbox as Checkbox$1, InputNumber, Modal as Modal$2, Tabs, Cascader, Descriptions, Row, Col, Tooltip as Tooltip$1, Collapse, List as List$1, Skeleton, Alert, Card, Upload as Upload$2, Table as Table$1, Switch, Popconfirm, Image, Slider, Breadcrumb, Result as Result$1, message, Layout, Drawer, ConfigProvider, theme } from 'antd';
|
|
5
5
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
6
6
|
import { observer } from 'mobx-react-lite';
|
|
7
7
|
import { getLogger, DivaError, useTranslation, useDivaCore, DivaUtils } from '@crystaldesign/diva-core';
|
|
@@ -1824,7 +1824,7 @@ var _default$7 = /*#__PURE__*/function () {
|
|
|
1824
1824
|
}]);
|
|
1825
1825
|
}();
|
|
1826
1826
|
var replaceStuff = function replaceStuff(text, apiConfig) {
|
|
1827
|
-
return text.replaceAll('${authService}', apiConfig.authService).replaceAll('${mediaService}', apiConfig.mediaService).replaceAll('${messageService}', apiConfig.messageService).replaceAll('${basketService}', apiConfig.basketService).replaceAll('${supportService}', apiConfig.supportService).replaceAll('${adminService}', apiConfig.adminService).replaceAll('${catalogService}', apiConfig.catalogService).replaceAll('${api2}', apiConfig.api2.ek).replaceAll('${analyticsService}', apiConfig.analyticsService).replaceAll('${reportService}', apiConfig.reportService);
|
|
1827
|
+
return text.replaceAll('${authService}', apiConfig.authService).replaceAll('${mediaService}', apiConfig.mediaService).replaceAll('${aiService}', apiConfig.aiService).replaceAll('${messageService}', apiConfig.messageService).replaceAll('${basketService}', apiConfig.basketService).replaceAll('${supportService}', apiConfig.supportService).replaceAll('${adminService}', apiConfig.adminService).replaceAll('${catalogService}', apiConfig.catalogService).replaceAll('${api2}', apiConfig.api2.ek).replaceAll('${analyticsService}', apiConfig.analyticsService).replaceAll('${reportService}', apiConfig.reportService);
|
|
1828
1828
|
};
|
|
1829
1829
|
function runThroughObjectReqursive(obj, apiConfig) {
|
|
1830
1830
|
for (var key in obj) {
|
|
@@ -2157,7 +2157,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
2157
2157
|
onlyAsMappingData: true
|
|
2158
2158
|
}
|
|
2159
2159
|
},
|
|
2160
|
-
downloadAction: {
|
|
2160
|
+
downloadAction: [{
|
|
2161
2161
|
label: t('backoffice.table.roe.downloadAction.label'),
|
|
2162
2162
|
actionType: 'Download',
|
|
2163
2163
|
id: 'DownloadAction',
|
|
@@ -2177,7 +2177,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
2177
2177
|
},
|
|
2178
2178
|
mediaType: 'file'
|
|
2179
2179
|
}]
|
|
2180
|
-
}
|
|
2180
|
+
}]
|
|
2181
2181
|
},
|
|
2182
2182
|
TableAllUsers: {
|
|
2183
2183
|
type: 'Table',
|
|
@@ -3892,7 +3892,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
3892
3892
|
sorter: 2
|
|
3893
3893
|
}]
|
|
3894
3894
|
}] : [])),
|
|
3895
|
-
downloadAction: {
|
|
3895
|
+
downloadAction: [{
|
|
3896
3896
|
actionType: 'Download',
|
|
3897
3897
|
id: 'DownloadAction',
|
|
3898
3898
|
rule: [{
|
|
@@ -3909,7 +3909,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
3909
3909
|
type: 'url',
|
|
3910
3910
|
url: apiConfig.baseCdnUrl + '/static/xlsx/RETAIL-p.xlsx'
|
|
3911
3911
|
}]
|
|
3912
|
-
},
|
|
3912
|
+
}],
|
|
3913
3913
|
apiInterface: {
|
|
3914
3914
|
read: {
|
|
3915
3915
|
list: '${api2}?function=GetJsonTranslations&actualOfflineVersion=${actualOfflineVersion}&actualOfflineParentDir=${actualOfflineParentDir}&catalogGuid=${id}&catalogCodex=${codex}&filterContext=${filterContex}',
|
|
@@ -4157,7 +4157,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
4157
4157
|
targetField: 'newData'
|
|
4158
4158
|
}]
|
|
4159
4159
|
},
|
|
4160
|
-
downloadAction: {
|
|
4160
|
+
downloadAction: [{
|
|
4161
4161
|
actionType: 'Download',
|
|
4162
4162
|
id: 'DownloadAction',
|
|
4163
4163
|
rule: [{
|
|
@@ -4174,7 +4174,22 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
4174
4174
|
type: 'url',
|
|
4175
4175
|
url: apiConfig.baseCdnUrl + '/static/xlsx/RETAIL-p.xlsx'
|
|
4176
4176
|
}]
|
|
4177
|
-
}
|
|
4177
|
+
}, {
|
|
4178
|
+
actionType: 'Download',
|
|
4179
|
+
id: 'DownloadExcelFullPartlist',
|
|
4180
|
+
label: t('backoffice.table.partlists.downloadaction.label.excel'),
|
|
4181
|
+
rule: [{
|
|
4182
|
+
match: {
|
|
4183
|
+
sourceField: 'catalogItem',
|
|
4184
|
+
value: undefined
|
|
4185
|
+
}
|
|
4186
|
+
}],
|
|
4187
|
+
download: [{
|
|
4188
|
+
type: 'api2file',
|
|
4189
|
+
fileName: 'fullpartlist.xlsx',
|
|
4190
|
+
url: '${api2}?function=GetBackofficePartlistExcel&catalogCodex=${catalogCodex}'
|
|
4191
|
+
}]
|
|
4192
|
+
}]
|
|
4178
4193
|
},
|
|
4179
4194
|
TableContentItems: {
|
|
4180
4195
|
title: t('backoffice.table.contentitems.title'),
|
|
@@ -4434,6 +4449,164 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
4434
4449
|
"delete": '${catalogService}/contentItems/${id}'
|
|
4435
4450
|
}
|
|
4436
4451
|
},
|
|
4452
|
+
TablePrompts: {
|
|
4453
|
+
title: t('backoffice.table.prompts.title'),
|
|
4454
|
+
type: 'Table',
|
|
4455
|
+
canRefresh: true,
|
|
4456
|
+
pagination: {
|
|
4457
|
+
pageSize: 50
|
|
4458
|
+
},
|
|
4459
|
+
copyAction: {
|
|
4460
|
+
actionType: 'Detail',
|
|
4461
|
+
type: 'Form',
|
|
4462
|
+
id: 'FormEditPrompt',
|
|
4463
|
+
disableOnMultiselect: true,
|
|
4464
|
+
resetToggleAfter: true,
|
|
4465
|
+
title: t('backoffice.table.prompt.copyAction.title'),
|
|
4466
|
+
label: t('backoffice.table.services.copyAction.label'),
|
|
4467
|
+
mapping: {
|
|
4468
|
+
type: 'body',
|
|
4469
|
+
map: [{
|
|
4470
|
+
targetField: 'name',
|
|
4471
|
+
sourceField: 'name'
|
|
4472
|
+
}, {
|
|
4473
|
+
targetField: 'defaultPrompt',
|
|
4474
|
+
sourceField: 'defaultPrompt'
|
|
4475
|
+
}, {
|
|
4476
|
+
targetField: 'enhancements',
|
|
4477
|
+
sourceField: 'enhancements'
|
|
4478
|
+
}, {
|
|
4479
|
+
targetField: 'cdnImageAdditions',
|
|
4480
|
+
sourceField: 'cdnImageAdditions'
|
|
4481
|
+
}, {
|
|
4482
|
+
targetField: 'specificPrompts',
|
|
4483
|
+
sourceField: 'specificPrompts'
|
|
4484
|
+
}, {
|
|
4485
|
+
targetField: 'analysisInstructions',
|
|
4486
|
+
sourceField: 'analysisInstructions'
|
|
4487
|
+
}, {
|
|
4488
|
+
targetField: 'priority',
|
|
4489
|
+
sourceField: 'priority'
|
|
4490
|
+
}, {
|
|
4491
|
+
targetField: 'engine',
|
|
4492
|
+
sourceField: 'engine'
|
|
4493
|
+
}, {
|
|
4494
|
+
targetField: 'type',
|
|
4495
|
+
sourceField: 'type'
|
|
4496
|
+
}, {
|
|
4497
|
+
targetField: 'previewImage',
|
|
4498
|
+
sourceField: 'previewImage'
|
|
4499
|
+
}, {
|
|
4500
|
+
targetField: 'organizationId',
|
|
4501
|
+
globalValue: 'organizationId'
|
|
4502
|
+
}]
|
|
4503
|
+
}
|
|
4504
|
+
},
|
|
4505
|
+
createAction: {
|
|
4506
|
+
actionType: 'Detail',
|
|
4507
|
+
type: 'Form',
|
|
4508
|
+
id: 'FormEditPrompt'
|
|
4509
|
+
},
|
|
4510
|
+
deleteAction: {},
|
|
4511
|
+
columns: [{
|
|
4512
|
+
title: t('backoffice.table.prompts.columns.name'),
|
|
4513
|
+
field: 'name',
|
|
4514
|
+
sorter: 1,
|
|
4515
|
+
filter: 'advanced',
|
|
4516
|
+
width: 200
|
|
4517
|
+
}, {
|
|
4518
|
+
title: t('backoffice.table.prompts.columns.promptKey'),
|
|
4519
|
+
field: 'promptKey',
|
|
4520
|
+
sorter: 1,
|
|
4521
|
+
filter: 'advanced',
|
|
4522
|
+
width: 150
|
|
4523
|
+
}, {
|
|
4524
|
+
title: t('backoffice.table.prompts.columns.priority'),
|
|
4525
|
+
field: 'priority',
|
|
4526
|
+
sorter: 1,
|
|
4527
|
+
filter: 'advanced',
|
|
4528
|
+
width: 100
|
|
4529
|
+
}, {
|
|
4530
|
+
title: t('backoffice.table.prompts.columns.engine'),
|
|
4531
|
+
field: 'engine',
|
|
4532
|
+
sorter: 1,
|
|
4533
|
+
filter: 'advanced',
|
|
4534
|
+
width: 120
|
|
4535
|
+
}, {
|
|
4536
|
+
title: t('backoffice.table.prompts.columns.type'),
|
|
4537
|
+
field: 'type',
|
|
4538
|
+
sorter: 1,
|
|
4539
|
+
filter: 'advanced',
|
|
4540
|
+
width: 100
|
|
4541
|
+
}, {
|
|
4542
|
+
title: t('backoffice.table.prompts.columns.previewImage'),
|
|
4543
|
+
field: 'previewImage',
|
|
4544
|
+
type: 'media',
|
|
4545
|
+
width: 100,
|
|
4546
|
+
align: 'center'
|
|
4547
|
+
}, {
|
|
4548
|
+
title: t('backoffice.table.prompts.columns.defaultPrompt'),
|
|
4549
|
+
field: 'defaultPrompt',
|
|
4550
|
+
sorter: 1,
|
|
4551
|
+
filter: 'advanced',
|
|
4552
|
+
width: 200
|
|
4553
|
+
}, {
|
|
4554
|
+
title: t('backoffice._id'),
|
|
4555
|
+
field: '_id',
|
|
4556
|
+
sorter: 1,
|
|
4557
|
+
filter: 'advanced',
|
|
4558
|
+
width: 100
|
|
4559
|
+
}, {
|
|
4560
|
+
title: t('backoffice.table.views.lastUpdated'),
|
|
4561
|
+
field: 'lastUpdated',
|
|
4562
|
+
defaultSortOrder: 'descend',
|
|
4563
|
+
type: 'unixTimeStamp',
|
|
4564
|
+
sorter: 1,
|
|
4565
|
+
filter: 'advanced',
|
|
4566
|
+
width: 240
|
|
4567
|
+
}, {
|
|
4568
|
+
title: t('backoffice.table.views.lastUpdatedBy'),
|
|
4569
|
+
field: 'lastUpdatedBy_displayText',
|
|
4570
|
+
sorter: 1,
|
|
4571
|
+
filter: 'advanced',
|
|
4572
|
+
width: 200
|
|
4573
|
+
}, {
|
|
4574
|
+
title: t('backoffice.table.medien.columns.title.organizationId'),
|
|
4575
|
+
field: 'organizationId',
|
|
4576
|
+
sorter: 1,
|
|
4577
|
+
filter: 'advanced',
|
|
4578
|
+
width: 160
|
|
4579
|
+
}],
|
|
4580
|
+
rowAction: [{
|
|
4581
|
+
actionType: 'Detail',
|
|
4582
|
+
disableOnMultiselect: true,
|
|
4583
|
+
type: 'Form',
|
|
4584
|
+
id: 'FormEditPrompt',
|
|
4585
|
+
title: t('backoffice.table.prompt.edit'),
|
|
4586
|
+
label: t('backoffice.edit')
|
|
4587
|
+
}, {
|
|
4588
|
+
disableOnMultiselect: true,
|
|
4589
|
+
actionType: 'Detail',
|
|
4590
|
+
type: 'Form',
|
|
4591
|
+
id: 'FormShowPrompt',
|
|
4592
|
+
title: t('backoffice.table.prompt.show'),
|
|
4593
|
+
label: t('backoffice.show')
|
|
4594
|
+
}],
|
|
4595
|
+
apiInterface: {
|
|
4596
|
+
read: {
|
|
4597
|
+
list: '${aiService}/prompts?organizationId=${organizationId}',
|
|
4598
|
+
filterServerSide: true
|
|
4599
|
+
},
|
|
4600
|
+
"delete": '${aiService}/prompts/${id}'
|
|
4601
|
+
},
|
|
4602
|
+
mapping: {
|
|
4603
|
+
type: 'query',
|
|
4604
|
+
map: [{
|
|
4605
|
+
globalValue: 'organizationId',
|
|
4606
|
+
targetField: 'organizationId'
|
|
4607
|
+
}]
|
|
4608
|
+
}
|
|
4609
|
+
},
|
|
4437
4610
|
TableApplicationTranslations: {
|
|
4438
4611
|
title: t('backoffice.table.applicationtranslation.title'),
|
|
4439
4612
|
type: 'Table',
|
|
@@ -5444,10 +5617,10 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
5444
5617
|
fields: ['parentOrganizations']
|
|
5445
5618
|
}
|
|
5446
5619
|
},
|
|
5447
|
-
downloadAction: {
|
|
5620
|
+
downloadAction: [{
|
|
5448
5621
|
actionType: 'CsvExport',
|
|
5449
5622
|
fileName: 'SubOrganizations'
|
|
5450
|
-
}
|
|
5623
|
+
}]
|
|
5451
5624
|
},
|
|
5452
5625
|
TableAllOrganizationUsers: {
|
|
5453
5626
|
title: t('backoffice.table.allorgusers.title'),
|
|
@@ -5573,10 +5746,10 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
5573
5746
|
disableOnToggle: true,
|
|
5574
5747
|
permission: 'backoffice_create_user'
|
|
5575
5748
|
},
|
|
5576
|
-
downloadAction: {
|
|
5749
|
+
downloadAction: [{
|
|
5577
5750
|
actionType: 'CsvExport',
|
|
5578
5751
|
fileName: 'benutzer'
|
|
5579
|
-
},
|
|
5752
|
+
}],
|
|
5580
5753
|
rowAction: [{
|
|
5581
5754
|
actionType: 'Detail',
|
|
5582
5755
|
type: 'Form',
|
|
@@ -6145,7 +6318,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
6145
6318
|
}]
|
|
6146
6319
|
}
|
|
6147
6320
|
},
|
|
6148
|
-
downloadAction: {
|
|
6321
|
+
downloadAction: [{
|
|
6149
6322
|
actionType: 'Download',
|
|
6150
6323
|
id: 'DownloadRenderjobAction',
|
|
6151
6324
|
rule: [{
|
|
@@ -6166,7 +6339,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
6166
6339
|
}]
|
|
6167
6340
|
}
|
|
6168
6341
|
}]
|
|
6169
|
-
},
|
|
6342
|
+
}],
|
|
6170
6343
|
rowAction: [{
|
|
6171
6344
|
actionType: 'Detail',
|
|
6172
6345
|
type: 'Form',
|
|
@@ -7593,6 +7766,198 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
7593
7766
|
permission: 'backoffice_admin_users_access_all'
|
|
7594
7767
|
}]
|
|
7595
7768
|
},
|
|
7769
|
+
FormEditPrompt: {
|
|
7770
|
+
type: 'Form',
|
|
7771
|
+
apiInterface: {
|
|
7772
|
+
update: {
|
|
7773
|
+
url: '${aiService}/prompts/{_id}',
|
|
7774
|
+
method: 'PATCH',
|
|
7775
|
+
jsonPatch: true
|
|
7776
|
+
},
|
|
7777
|
+
create: '${aiService}/prompts'
|
|
7778
|
+
},
|
|
7779
|
+
items: [{
|
|
7780
|
+
name: 'promptKey',
|
|
7781
|
+
label: t('backoffice.table.prompts.columns.promptKey'),
|
|
7782
|
+
type: 'input',
|
|
7783
|
+
required: true
|
|
7784
|
+
}, {
|
|
7785
|
+
name: 'name',
|
|
7786
|
+
label: t('backoffice.table.prompts.columns.name'),
|
|
7787
|
+
type: 'input',
|
|
7788
|
+
required: true
|
|
7789
|
+
}, {
|
|
7790
|
+
name: 'defaultPrompt',
|
|
7791
|
+
label: t('backoffice.table.prompts.columns.defaultPrompt'),
|
|
7792
|
+
type: 'textarea',
|
|
7793
|
+
required: true
|
|
7794
|
+
},
|
|
7795
|
+
// {
|
|
7796
|
+
// name: 'enhancements',
|
|
7797
|
+
// label: t('backoffice.table.prompts.columns.enhancements'),
|
|
7798
|
+
// type: 'array',
|
|
7799
|
+
// items: [
|
|
7800
|
+
// {
|
|
7801
|
+
// name: 'enhancement',
|
|
7802
|
+
// type: 'input',
|
|
7803
|
+
// label: t('backoffice.table.prompts.columns.enhancement'),
|
|
7804
|
+
// },
|
|
7805
|
+
// ],
|
|
7806
|
+
// },
|
|
7807
|
+
{
|
|
7808
|
+
name: 'cdnImageAdditions',
|
|
7809
|
+
label: t('backoffice.table.prompts.columns.cdnImageAdditions'),
|
|
7810
|
+
type: 'array',
|
|
7811
|
+
items: [{
|
|
7812
|
+
name: 'addition',
|
|
7813
|
+
type: 'input',
|
|
7814
|
+
label: t('backoffice.table.prompts.columns.cdnImageAddition')
|
|
7815
|
+
}]
|
|
7816
|
+
}, {
|
|
7817
|
+
name: 'specificPrompts',
|
|
7818
|
+
label: t('backoffice.table.prompts.columns.specificPrompts'),
|
|
7819
|
+
type: 'array',
|
|
7820
|
+
items: [{
|
|
7821
|
+
name: 'key',
|
|
7822
|
+
type: 'input',
|
|
7823
|
+
label: t('backoffice.table.prompts.columns.specificPromptKey'),
|
|
7824
|
+
required: true
|
|
7825
|
+
}, {
|
|
7826
|
+
name: 'prompt',
|
|
7827
|
+
type: 'textarea',
|
|
7828
|
+
label: t('backoffice.table.prompts.columns.specificPromptText'),
|
|
7829
|
+
required: true
|
|
7830
|
+
}]
|
|
7831
|
+
},
|
|
7832
|
+
//{
|
|
7833
|
+
// name: 'analysisInstructions',
|
|
7834
|
+
// label: t('backoffice.table.prompts.columns.analysisInstructions'),
|
|
7835
|
+
// type: 'textarea',
|
|
7836
|
+
// required: true,
|
|
7837
|
+
//},
|
|
7838
|
+
{
|
|
7839
|
+
name: 'priority',
|
|
7840
|
+
label: t('backoffice.table.prompts.columns.priority'),
|
|
7841
|
+
type: 'number',
|
|
7842
|
+
required: true,
|
|
7843
|
+
defaultValue: 1
|
|
7844
|
+
}, {
|
|
7845
|
+
name: 'engine',
|
|
7846
|
+
label: t('backoffice.table.prompts.columns.engine'),
|
|
7847
|
+
type: 'select',
|
|
7848
|
+
values: ['openai', 'grok', 'gemini'],
|
|
7849
|
+
mode: 'single',
|
|
7850
|
+
required: true
|
|
7851
|
+
}, {
|
|
7852
|
+
name: 'type',
|
|
7853
|
+
label: t('backoffice.table.prompts.columns.type'),
|
|
7854
|
+
type: 'select',
|
|
7855
|
+
values: ['TEXT', 'ROOM_RENDERING'],
|
|
7856
|
+
mode: 'single',
|
|
7857
|
+
required: true
|
|
7858
|
+
}, {
|
|
7859
|
+
name: 'previewImage',
|
|
7860
|
+
label: t('backoffice.table.prompts.columns.previewImage'),
|
|
7861
|
+
type: 'media',
|
|
7862
|
+
hideTrash: false,
|
|
7863
|
+
allowedTypes: ['image/*'],
|
|
7864
|
+
mediaItemRefField: 'mediaItemRefPreviewImage',
|
|
7865
|
+
urlField: 'previewImage',
|
|
7866
|
+
functionType: 'CAT'
|
|
7867
|
+
}, {
|
|
7868
|
+
name: 'isGlobal',
|
|
7869
|
+
label: t('backoffice.table.prompts.columns.isGlobal'),
|
|
7870
|
+
type: 'checkbox',
|
|
7871
|
+
defaultValue: false
|
|
7872
|
+
}, {
|
|
7873
|
+
name: 'organizationId',
|
|
7874
|
+
hidden: true
|
|
7875
|
+
}]
|
|
7876
|
+
},
|
|
7877
|
+
FormShowPrompt: {
|
|
7878
|
+
type: 'Form',
|
|
7879
|
+
disableSave: true,
|
|
7880
|
+
items: [{
|
|
7881
|
+
name: 'promptKey',
|
|
7882
|
+
label: t('backoffice.table.prompts.columns.promptKey'),
|
|
7883
|
+
type: 'input',
|
|
7884
|
+
readonly: true
|
|
7885
|
+
}, {
|
|
7886
|
+
name: 'name',
|
|
7887
|
+
label: t('backoffice.table.prompts.columns.name'),
|
|
7888
|
+
type: 'input',
|
|
7889
|
+
readonly: true
|
|
7890
|
+
}, {
|
|
7891
|
+
name: 'defaultPrompt',
|
|
7892
|
+
label: t('backoffice.table.prompts.columns.defaultPrompt'),
|
|
7893
|
+
type: 'textarea',
|
|
7894
|
+
readonly: true
|
|
7895
|
+
}, {
|
|
7896
|
+
name: 'cdnImageAdditions',
|
|
7897
|
+
label: t('backoffice.table.prompts.columns.cdnImageAdditions'),
|
|
7898
|
+
type: 'array',
|
|
7899
|
+
readonly: true,
|
|
7900
|
+
items: [{
|
|
7901
|
+
name: 'addition',
|
|
7902
|
+
type: 'input',
|
|
7903
|
+
label: t('backoffice.table.prompts.columns.cdnImageAddition'),
|
|
7904
|
+
readonly: true
|
|
7905
|
+
}]
|
|
7906
|
+
}, {
|
|
7907
|
+
name: 'specificPrompts',
|
|
7908
|
+
label: t('backoffice.table.prompts.columns.specificPrompts'),
|
|
7909
|
+
type: 'array',
|
|
7910
|
+
readonly: true,
|
|
7911
|
+
items: [{
|
|
7912
|
+
name: 'key',
|
|
7913
|
+
type: 'input',
|
|
7914
|
+
label: t('backoffice.table.prompts.columns.specificPromptKey'),
|
|
7915
|
+
readonly: true
|
|
7916
|
+
}, {
|
|
7917
|
+
name: 'prompt',
|
|
7918
|
+
type: 'textarea',
|
|
7919
|
+
label: t('backoffice.table.prompts.columns.specificPromptText'),
|
|
7920
|
+
readonly: true
|
|
7921
|
+
}]
|
|
7922
|
+
}, {
|
|
7923
|
+
name: 'priority',
|
|
7924
|
+
label: t('backoffice.table.prompts.columns.priority'),
|
|
7925
|
+
type: 'number',
|
|
7926
|
+
readonly: true
|
|
7927
|
+
}, {
|
|
7928
|
+
name: 'engine',
|
|
7929
|
+
label: t('backoffice.table.prompts.columns.engine'),
|
|
7930
|
+
type: 'select',
|
|
7931
|
+
values: ['openai', 'grok', 'gemini'],
|
|
7932
|
+
mode: 'single',
|
|
7933
|
+
readonly: true
|
|
7934
|
+
}, {
|
|
7935
|
+
name: 'type',
|
|
7936
|
+
label: t('backoffice.table.prompts.columns.type'),
|
|
7937
|
+
type: 'select',
|
|
7938
|
+
values: ['TEXT', 'ROOM_RENDERING'],
|
|
7939
|
+
mode: 'single',
|
|
7940
|
+
readonly: true
|
|
7941
|
+
}, {
|
|
7942
|
+
name: 'previewImage',
|
|
7943
|
+
label: t('backoffice.table.prompts.columns.previewImage'),
|
|
7944
|
+
type: 'media',
|
|
7945
|
+
hideTrash: false,
|
|
7946
|
+
allowedTypes: ['image/*'],
|
|
7947
|
+
mediaItemRefField: 'mediaItemRefPreviewImage',
|
|
7948
|
+
urlField: 'previewImage',
|
|
7949
|
+
functionType: 'CAT',
|
|
7950
|
+
readonly: true
|
|
7951
|
+
}, {
|
|
7952
|
+
name: 'isGlobal',
|
|
7953
|
+
label: t('backoffice.table.prompts.columns.isGlobal'),
|
|
7954
|
+
type: 'checkbox',
|
|
7955
|
+
readonly: true
|
|
7956
|
+
}, {
|
|
7957
|
+
name: 'organizationId',
|
|
7958
|
+
hidden: true
|
|
7959
|
+
}]
|
|
7960
|
+
},
|
|
7596
7961
|
FormOrganizationUserDetails: {
|
|
7597
7962
|
type: 'Form',
|
|
7598
7963
|
title: t('backoffice.form.organizationuserdetails.title'),
|
|
@@ -8821,6 +9186,159 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
8821
9186
|
label: t('backoffice.form.organizationdetails.items.settings.externalContactUrl'),
|
|
8822
9187
|
tabgroup: t('backoffice.form.organizationdetails.additionalContactData'),
|
|
8823
9188
|
type: 'input'
|
|
9189
|
+
}, {
|
|
9190
|
+
name: t('backoffice.subtitle.ai'),
|
|
9191
|
+
type: 'subTitle',
|
|
9192
|
+
orientation: 'left',
|
|
9193
|
+
style: {
|
|
9194
|
+
marginBottom: '40px'
|
|
9195
|
+
},
|
|
9196
|
+
permission: 'backoffice_admin_organizations'
|
|
9197
|
+
}, {
|
|
9198
|
+
name: ['settings', 'aiSettings', 'monthlyOrgCoinLimit'],
|
|
9199
|
+
label: t('backoffice.form.organizationdetails.items.ai.monthlyOrgCoinLimit'),
|
|
9200
|
+
type: 'number',
|
|
9201
|
+
permission: 'backoffice_admin_organizations',
|
|
9202
|
+
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9203
|
+
defaultValue: 100000,
|
|
9204
|
+
hidden: function hidden(data) {
|
|
9205
|
+
return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
|
|
9206
|
+
},
|
|
9207
|
+
disabled: function disabled(data) {
|
|
9208
|
+
var _data$settings;
|
|
9209
|
+
return data === null || data === void 0 || (_data$settings = data.settings) === null || _data$settings === void 0 || (_data$settings = _data$settings.aiSettings) === null || _data$settings === void 0 ? void 0 : _data$settings.noLimit;
|
|
9210
|
+
},
|
|
9211
|
+
onValueChange: function onValueChange(value, item, form) {
|
|
9212
|
+
if (value && typeof value === 'number') {
|
|
9213
|
+
// Compute all limits from monthly org limit
|
|
9214
|
+
form.setFieldValue(['settings', 'aiSettings', 'weeklyOrgCoinLimit'], Math.round(value / 2));
|
|
9215
|
+
form.setFieldValue(['settings', 'aiSettings', 'dailyOrgCoinLimit'], Math.round(value / 10));
|
|
9216
|
+
form.setFieldValue(['settings', 'aiSettings', 'monthlyUserCoinLimit'], Math.round(value / 2));
|
|
9217
|
+
form.setFieldValue(['settings', 'aiSettings', 'weeklyUserCoinLimit'], Math.round(value / 4));
|
|
9218
|
+
form.setFieldValue(['settings', 'aiSettings', 'dailyUserCoinLimit'], Math.round(value / 20));
|
|
9219
|
+
var formattedValue = value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.');
|
|
9220
|
+
var price = (value / 100).toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.');
|
|
9221
|
+
item.helpText = formattedValue + ' divaCoins = €' + price + ' limit per month. Changes to this field will auto-update other limits.';
|
|
9222
|
+
}
|
|
9223
|
+
},
|
|
9224
|
+
helpText: '1000 divaCoins = €1 limit per month. Changes to this field will auto-update other limits.'
|
|
9225
|
+
}, {
|
|
9226
|
+
name: ['settings', 'aiSettings', 'weeklyOrgCoinLimit'],
|
|
9227
|
+
label: t('backoffice.form.organizationdetails.items.ai.weeklyOrgCoinLimit'),
|
|
9228
|
+
type: 'number',
|
|
9229
|
+
permission: 'backoffice_admin_organizations',
|
|
9230
|
+
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9231
|
+
defaultValue: 50000,
|
|
9232
|
+
hidden: function hidden(data) {
|
|
9233
|
+
return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
|
|
9234
|
+
},
|
|
9235
|
+
disabled: function disabled(data) {
|
|
9236
|
+
var _data$settings2;
|
|
9237
|
+
return data === null || data === void 0 || (_data$settings2 = data.settings) === null || _data$settings2 === void 0 || (_data$settings2 = _data$settings2.aiSettings) === null || _data$settings2 === void 0 ? void 0 : _data$settings2.noLimit;
|
|
9238
|
+
},
|
|
9239
|
+
helpText: 'Auto-computed as monthlyOrg/2. Can be manually adjusted.'
|
|
9240
|
+
}, {
|
|
9241
|
+
name: ['settings', 'aiSettings', 'dailyOrgCoinLimit'],
|
|
9242
|
+
label: t('backoffice.form.organizationdetails.items.ai.dailyOrgCoinLimit'),
|
|
9243
|
+
type: 'number',
|
|
9244
|
+
permission: 'backoffice_admin_organizations',
|
|
9245
|
+
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9246
|
+
defaultValue: 10000,
|
|
9247
|
+
hidden: function hidden(data) {
|
|
9248
|
+
return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
|
|
9249
|
+
},
|
|
9250
|
+
disabled: function disabled(data) {
|
|
9251
|
+
var _data$settings3;
|
|
9252
|
+
return data === null || data === void 0 || (_data$settings3 = data.settings) === null || _data$settings3 === void 0 || (_data$settings3 = _data$settings3.aiSettings) === null || _data$settings3 === void 0 ? void 0 : _data$settings3.noLimit;
|
|
9253
|
+
},
|
|
9254
|
+
helpText: 'Auto-computed as monthlyOrg/10. Can be manually adjusted.'
|
|
9255
|
+
}, {
|
|
9256
|
+
name: ['settings', 'aiSettings', 'monthlyUserCoinLimit'],
|
|
9257
|
+
label: t('backoffice.form.organizationdetails.items.ai.monthlyUserCoinLimit'),
|
|
9258
|
+
type: 'number',
|
|
9259
|
+
permission: 'backoffice_admin_organizations',
|
|
9260
|
+
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9261
|
+
defaultValue: 50000,
|
|
9262
|
+
hidden: function hidden(data) {
|
|
9263
|
+
return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
|
|
9264
|
+
},
|
|
9265
|
+
disabled: function disabled(data) {
|
|
9266
|
+
var _data$settings4;
|
|
9267
|
+
return data === null || data === void 0 || (_data$settings4 = data.settings) === null || _data$settings4 === void 0 || (_data$settings4 = _data$settings4.aiSettings) === null || _data$settings4 === void 0 ? void 0 : _data$settings4.noLimit;
|
|
9268
|
+
},
|
|
9269
|
+
helpText: 'Auto-computed as monthlyOrg/2. Can be manually adjusted.'
|
|
9270
|
+
}, {
|
|
9271
|
+
name: ['settings', 'aiSettings', 'weeklyUserCoinLimit'],
|
|
9272
|
+
label: t('backoffice.form.organizationdetails.items.ai.weeklyUserCoinLimit'),
|
|
9273
|
+
type: 'number',
|
|
9274
|
+
permission: 'backoffice_admin_organizations',
|
|
9275
|
+
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9276
|
+
defaultValue: 25000,
|
|
9277
|
+
hidden: function hidden(data) {
|
|
9278
|
+
return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
|
|
9279
|
+
},
|
|
9280
|
+
disabled: function disabled(data) {
|
|
9281
|
+
var _data$settings5;
|
|
9282
|
+
return data === null || data === void 0 || (_data$settings5 = data.settings) === null || _data$settings5 === void 0 || (_data$settings5 = _data$settings5.aiSettings) === null || _data$settings5 === void 0 ? void 0 : _data$settings5.noLimit;
|
|
9283
|
+
},
|
|
9284
|
+
helpText: 'Auto-computed as monthlyOrg/4. Can be manually adjusted.'
|
|
9285
|
+
}, {
|
|
9286
|
+
name: ['settings', 'aiSettings', 'dailyUserCoinLimit'],
|
|
9287
|
+
label: t('backoffice.form.organizationdetails.items.ai.dailyUserCoinLimit'),
|
|
9288
|
+
type: 'number',
|
|
9289
|
+
permission: 'backoffice_admin_organizations',
|
|
9290
|
+
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9291
|
+
defaultValue: 5000,
|
|
9292
|
+
hidden: function hidden(data) {
|
|
9293
|
+
return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
|
|
9294
|
+
},
|
|
9295
|
+
disabled: function disabled(data) {
|
|
9296
|
+
var _data$settings6;
|
|
9297
|
+
return data === null || data === void 0 || (_data$settings6 = data.settings) === null || _data$settings6 === void 0 || (_data$settings6 = _data$settings6.aiSettings) === null || _data$settings6 === void 0 ? void 0 : _data$settings6.noLimit;
|
|
9298
|
+
},
|
|
9299
|
+
helpText: 'Auto-computed as monthlyOrg/20. Can be manually adjusted.'
|
|
9300
|
+
}, {
|
|
9301
|
+
name: ['settings', 'aiSettings', 'anonymousDailyIPLimit'],
|
|
9302
|
+
label: t('backoffice.form.organizationdetails.items.ai.anonymousDailyIPLimit'),
|
|
9303
|
+
type: 'number',
|
|
9304
|
+
permission: 'backoffice_admin_organizations',
|
|
9305
|
+
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9306
|
+
defaultValue: 2,
|
|
9307
|
+
hidden: function hidden(data) {
|
|
9308
|
+
return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
|
|
9309
|
+
},
|
|
9310
|
+
helpText: 'anonymous enduser limit'
|
|
9311
|
+
}, {
|
|
9312
|
+
name: ['settings', 'aiSettings', 'loggedInDailyIPLimit'],
|
|
9313
|
+
label: t('backoffice.form.organizationdetails.items.ai.loggedInDailyIPLimit'),
|
|
9314
|
+
type: 'number',
|
|
9315
|
+
permission: 'backoffice_admin_organizations',
|
|
9316
|
+
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9317
|
+
defaultValue: 10,
|
|
9318
|
+
hidden: function hidden(data) {
|
|
9319
|
+
return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
|
|
9320
|
+
},
|
|
9321
|
+
helpText: 'logged in enduser limit'
|
|
9322
|
+
}, {
|
|
9323
|
+
name: ['settings', 'aiSettings', 'leadRewardBonus'],
|
|
9324
|
+
label: t('backoffice.form.organizationdetails.items.ai.leadRewardBonus'),
|
|
9325
|
+
type: 'number',
|
|
9326
|
+
permission: 'backoffice_admin_organizations',
|
|
9327
|
+
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9328
|
+
defaultValue: 5,
|
|
9329
|
+
hidden: function hidden(data) {
|
|
9330
|
+
return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
|
|
9331
|
+
}
|
|
9332
|
+
}, {
|
|
9333
|
+
name: ['settings', 'aiSettings', 'noLimit'],
|
|
9334
|
+
label: t('backoffice.form.organizationdetails.items.ai.noLimit'),
|
|
9335
|
+
type: 'checkbox',
|
|
9336
|
+
permission: 'backoffice_admin_organizations',
|
|
9337
|
+
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9338
|
+
defaultValue: false,
|
|
9339
|
+
hidden: function hidden(data) {
|
|
9340
|
+
return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
|
|
9341
|
+
}
|
|
8824
9342
|
}]
|
|
8825
9343
|
},
|
|
8826
9344
|
FromAffilateOrganizationDetails: {
|
|
@@ -14625,6 +15143,12 @@ var menu = [{
|
|
|
14625
15143
|
path: 'contentitems',
|
|
14626
15144
|
label: 'backoffice.menu.items.label.ContentItems',
|
|
14627
15145
|
icon: 'OrderedListOutlined'
|
|
15146
|
+
}, {
|
|
15147
|
+
id: 'TablePrompts',
|
|
15148
|
+
path: 'prompts',
|
|
15149
|
+
label: 'backoffice.menu.items.label.Prompts',
|
|
15150
|
+
icon: 'RobotOutlined',
|
|
15151
|
+
permission: 'backoffice_prompts'
|
|
14628
15152
|
}, {
|
|
14629
15153
|
id: 'idmTables',
|
|
14630
15154
|
path: 'idm',
|
|
@@ -15240,11 +15764,11 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
15240
15764
|
this._rootStore = _rootStore;
|
|
15241
15765
|
_defineProperty(this, "executeDownload", /*#__PURE__*/function () {
|
|
15242
15766
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) {
|
|
15243
|
-
var data, action, catalogCodex, dealerId, currentUrl, _iterator, _step, _loop, download;
|
|
15767
|
+
var data, action, catalogCodex, dealerId, currentUrl, sessionGuid, _iterator, _step, _loop, download;
|
|
15244
15768
|
return _regeneratorRuntime.wrap(function _callee$(_context2) {
|
|
15245
15769
|
while (1) switch (_context2.prev = _context2.next) {
|
|
15246
15770
|
case 0:
|
|
15247
|
-
data = _ref.data, action = _ref.action, catalogCodex = _ref.catalogCodex, dealerId = _ref.dealerId, currentUrl = _ref.currentUrl;
|
|
15771
|
+
data = _ref.data, action = _ref.action, catalogCodex = _ref.catalogCodex, dealerId = _ref.dealerId, currentUrl = _ref.currentUrl, sessionGuid = _ref.sessionGuid;
|
|
15248
15772
|
if (!(action.actionType == 'CsvExport' && currentUrl)) {
|
|
15249
15773
|
_context2.next = 6;
|
|
15250
15774
|
break;
|
|
@@ -15263,63 +15787,98 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
15263
15787
|
_context2.prev = 8;
|
|
15264
15788
|
_loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
|
|
15265
15789
|
var _download$params, _data$fileFormat, _data$fileUrl;
|
|
15266
|
-
var url;
|
|
15790
|
+
var _this$_rootStore, file, blob, url;
|
|
15267
15791
|
return _regeneratorRuntime.wrap(function _loop$(_context) {
|
|
15268
15792
|
while (1) switch (_context.prev = _context.next) {
|
|
15269
15793
|
case 0:
|
|
15270
15794
|
download = _step.value;
|
|
15271
15795
|
_context.t0 = download.type;
|
|
15272
|
-
_context.next = _context.t0 === '
|
|
15796
|
+
_context.next = _context.t0 === 'api2file' ? 4 : _context.t0 === 'url' ? 21 : _context.t0 === 'field' ? 25 : _context.t0 === 'prefab' ? 32 : _context.t0 === 'request' ? 37 : 41;
|
|
15273
15797
|
break;
|
|
15274
15798
|
case 4:
|
|
15799
|
+
_context.prev = 4;
|
|
15800
|
+
_context.next = 7;
|
|
15801
|
+
return fetch(download.url.replace('${catalogCodex}', catalogCodex).toString(), {
|
|
15802
|
+
method: 'GET',
|
|
15803
|
+
headers: {
|
|
15804
|
+
authorization: "Bearer ".concat((_this$_rootStore = _this._rootStore) === null || _this$_rootStore === void 0 ? void 0 : _this$_rootStore.dataStore.jwt),
|
|
15805
|
+
SessionGuid: sessionGuid,
|
|
15806
|
+
'content-type': 'application/json'
|
|
15807
|
+
}
|
|
15808
|
+
});
|
|
15809
|
+
case 7:
|
|
15810
|
+
file = _context.sent;
|
|
15811
|
+
if (file.ok) {
|
|
15812
|
+
_context.next = 11;
|
|
15813
|
+
break;
|
|
15814
|
+
}
|
|
15815
|
+
LOG$d.error(new DivaError("Failed to download file: ".concat(download.fileName, ". Status: ").concat(file.status, " ").concat(file.statusText)));
|
|
15816
|
+
// Optionally, notify the user here
|
|
15817
|
+
return _context.abrupt("break", 41);
|
|
15818
|
+
case 11:
|
|
15819
|
+
_context.next = 13;
|
|
15820
|
+
return file.blob();
|
|
15821
|
+
case 13:
|
|
15822
|
+
blob = _context.sent;
|
|
15823
|
+
DownloadStore.downloadBlob(blob, download.fileName);
|
|
15824
|
+
_context.next = 20;
|
|
15825
|
+
break;
|
|
15826
|
+
case 17:
|
|
15827
|
+
_context.prev = 17;
|
|
15828
|
+
_context.t1 = _context["catch"](4);
|
|
15829
|
+
LOG$d.error(new DivaError("Error during file download (".concat(download.fileName, "):") + _context.t1));
|
|
15830
|
+
// Optionally, notify the user here
|
|
15831
|
+
case 20:
|
|
15832
|
+
return _context.abrupt("break", 41);
|
|
15833
|
+
case 21:
|
|
15275
15834
|
if (_this.checkCondition(download, data)) {
|
|
15276
|
-
_context.next =
|
|
15835
|
+
_context.next = 23;
|
|
15277
15836
|
break;
|
|
15278
15837
|
}
|
|
15279
|
-
return _context.abrupt("break",
|
|
15280
|
-
case
|
|
15838
|
+
return _context.abrupt("break", 41);
|
|
15839
|
+
case 23:
|
|
15281
15840
|
window.location.href = download.url;
|
|
15282
|
-
return _context.abrupt("break",
|
|
15283
|
-
case
|
|
15841
|
+
return _context.abrupt("break", 41);
|
|
15842
|
+
case 25:
|
|
15284
15843
|
if (_this.checkCondition(download, data)) {
|
|
15285
|
-
_context.next =
|
|
15844
|
+
_context.next = 27;
|
|
15286
15845
|
break;
|
|
15287
15846
|
}
|
|
15288
|
-
return _context.abrupt("break",
|
|
15289
|
-
case
|
|
15847
|
+
return _context.abrupt("break", 41);
|
|
15848
|
+
case 27:
|
|
15290
15849
|
url = new URL(data[download.field]);
|
|
15291
15850
|
(_download$params = download.params) === null || _download$params === void 0 || _download$params.forEach(function (param) {
|
|
15292
15851
|
url.searchParams.append(param.name, param.value);
|
|
15293
15852
|
});
|
|
15294
|
-
_context.next =
|
|
15853
|
+
_context.next = 31;
|
|
15295
15854
|
return _this.donwloadFile(url, (data === null || data === void 0 ? void 0 : data.fileName) + '.' + ((_data$fileFormat = data.fileFormat) !== null && _data$fileFormat !== void 0 ? _data$fileFormat : data === null || data === void 0 || (_data$fileUrl = data.fileUrl) === null || _data$fileUrl === void 0 ? void 0 : _data$fileUrl.substring((data === null || data === void 0 ? void 0 : data.fileUrl.lastIndexOf('.')) + 1)));
|
|
15296
|
-
case
|
|
15297
|
-
return _context.abrupt("break",
|
|
15298
|
-
case
|
|
15855
|
+
case 31:
|
|
15856
|
+
return _context.abrupt("break", 41);
|
|
15857
|
+
case 32:
|
|
15299
15858
|
if (_this.checkCondition(download, data)) {
|
|
15300
|
-
_context.next =
|
|
15859
|
+
_context.next = 34;
|
|
15301
15860
|
break;
|
|
15302
15861
|
}
|
|
15303
|
-
return _context.abrupt("break",
|
|
15304
|
-
case
|
|
15305
|
-
_context.next =
|
|
15862
|
+
return _context.abrupt("break", 41);
|
|
15863
|
+
case 34:
|
|
15864
|
+
_context.next = 36;
|
|
15306
15865
|
return _this.connectionFile(download, data, download.url, catalogCodex, dealerId);
|
|
15307
|
-
case
|
|
15308
|
-
return _context.abrupt("break",
|
|
15309
|
-
case
|
|
15866
|
+
case 36:
|
|
15867
|
+
return _context.abrupt("break", 41);
|
|
15868
|
+
case 37:
|
|
15310
15869
|
if (_this.checkCondition(download, data)) {
|
|
15311
|
-
_context.next =
|
|
15870
|
+
_context.next = 39;
|
|
15312
15871
|
break;
|
|
15313
15872
|
}
|
|
15314
|
-
return _context.abrupt("break",
|
|
15315
|
-
case
|
|
15316
|
-
_context.next =
|
|
15873
|
+
return _context.abrupt("break", 41);
|
|
15874
|
+
case 39:
|
|
15875
|
+
_context.next = 41;
|
|
15317
15876
|
return _this.downloadRequest(download, data);
|
|
15318
|
-
case
|
|
15877
|
+
case 41:
|
|
15319
15878
|
case "end":
|
|
15320
15879
|
return _context.stop();
|
|
15321
15880
|
}
|
|
15322
|
-
}, _loop);
|
|
15881
|
+
}, _loop, null, [[4, 17]]);
|
|
15323
15882
|
});
|
|
15324
15883
|
_iterator.s();
|
|
15325
15884
|
case 11:
|
|
@@ -15363,7 +15922,7 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
15363
15922
|
key: "donwloadFile",
|
|
15364
15923
|
value: function () {
|
|
15365
15924
|
var _donwloadFile = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(url, name) {
|
|
15366
|
-
var _this$
|
|
15925
|
+
var _this$_rootStore2;
|
|
15367
15926
|
var file, blob;
|
|
15368
15927
|
return _regeneratorRuntime.wrap(function _callee2$(_context3) {
|
|
15369
15928
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -15372,7 +15931,7 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
15372
15931
|
return fetch(url.toString(), {
|
|
15373
15932
|
method: 'GET',
|
|
15374
15933
|
headers: {
|
|
15375
|
-
authorization: "Bearer ".concat((_this$
|
|
15934
|
+
authorization: "Bearer ".concat((_this$_rootStore2 = this._rootStore) === null || _this$_rootStore2 === void 0 ? void 0 : _this$_rootStore2.dataStore.jwt),
|
|
15376
15935
|
'content-type': 'application/json'
|
|
15377
15936
|
}
|
|
15378
15937
|
});
|
|
@@ -15503,7 +16062,7 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
15503
16062
|
key: "downloadRequest",
|
|
15504
16063
|
value: function () {
|
|
15505
16064
|
var _downloadRequest = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(download, data) {
|
|
15506
|
-
var _this$
|
|
16065
|
+
var _this$_rootStore3;
|
|
15507
16066
|
var url, result, contentType, contentDisposition, fileName, fileNameMatch, blob, base64File, a, mimeType, res;
|
|
15508
16067
|
return _regeneratorRuntime.wrap(function _callee5$(_context6) {
|
|
15509
16068
|
while (1) switch (_context6.prev = _context6.next) {
|
|
@@ -15519,7 +16078,7 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
15519
16078
|
return fetch(url, {
|
|
15520
16079
|
method: 'GET',
|
|
15521
16080
|
headers: {
|
|
15522
|
-
authorization: "Bearer ".concat((_this$
|
|
16081
|
+
authorization: "Bearer ".concat((_this$_rootStore3 = this._rootStore) === null || _this$_rootStore3 === void 0 ? void 0 : _this$_rootStore3.dataStore.jwt),
|
|
15523
16082
|
'content-type': 'application/json',
|
|
15524
16083
|
Accept: 'application/json, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel, */*'
|
|
15525
16084
|
}
|
|
@@ -15616,7 +16175,8 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
15616
16175
|
data: dt,
|
|
15617
16176
|
action: props.action,
|
|
15618
16177
|
catalogCodex: props.catalogCodex,
|
|
15619
|
-
dealerId: props.dealerId
|
|
16178
|
+
dealerId: props.dealerId,
|
|
16179
|
+
sessionGuid: props.sessionGuid
|
|
15620
16180
|
}));
|
|
15621
16181
|
if (!(promises.length == 10)) {
|
|
15622
16182
|
_context7.next = 12;
|
|
@@ -16759,6 +17319,11 @@ function useFormData (_ref) {
|
|
|
16759
17319
|
}
|
|
16760
17320
|
};
|
|
16761
17321
|
var onInputChanged = function onInputChanged(id, value, d) {
|
|
17322
|
+
if (id) {
|
|
17323
|
+
var _item$onValueChange;
|
|
17324
|
+
var item = getItem(id !== null && id !== void 0 ? id : '');
|
|
17325
|
+
item === null || item === void 0 || (_item$onValueChange = item.onValueChange) === null || _item$onValueChange === void 0 || _item$onValueChange.call(item, value, item, state.form);
|
|
17326
|
+
}
|
|
16762
17327
|
var data = d !== null && d !== void 0 ? d : mergeWith(_objectSpread$10({}, state.data), state.form.getFieldsValue(), mergeCustomizer);
|
|
16763
17328
|
if (id) {
|
|
16764
17329
|
setFieldInObject(id, data, value);
|
|
@@ -16771,6 +17336,24 @@ function useFormData (_ref) {
|
|
|
16771
17336
|
}));
|
|
16772
17337
|
return data;
|
|
16773
17338
|
};
|
|
17339
|
+
var getItem = function getItem(id) {
|
|
17340
|
+
var items = selectedItems;
|
|
17341
|
+
var _iterator2 = _createForOfIteratorHelper$k(items),
|
|
17342
|
+
_step2;
|
|
17343
|
+
try {
|
|
17344
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
17345
|
+
var item = _step2.value;
|
|
17346
|
+
if (item.name.toString() === id.toString()) {
|
|
17347
|
+
return item;
|
|
17348
|
+
}
|
|
17349
|
+
}
|
|
17350
|
+
} catch (err) {
|
|
17351
|
+
_iterator2.e(err);
|
|
17352
|
+
} finally {
|
|
17353
|
+
_iterator2.f();
|
|
17354
|
+
}
|
|
17355
|
+
return undefined;
|
|
17356
|
+
};
|
|
16774
17357
|
|
|
16775
17358
|
//if at an array an entry got added or deleted, its handeled by and so we take the data from the formdata
|
|
16776
17359
|
var mergeCustomizer = function mergeCustomizer(obj, src) {
|
|
@@ -16835,19 +17418,19 @@ function useFormData (_ref) {
|
|
|
16835
17418
|
}
|
|
16836
17419
|
function _preSaveProcess() {
|
|
16837
17420
|
_preSaveProcess = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(data, items) {
|
|
16838
|
-
var
|
|
17421
|
+
var _iterator4, _step4, item, itemName, media, mediaItemRefIdPath, urlPath, arrayData, i, _iterator5, _step5, _media;
|
|
16839
17422
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
16840
17423
|
while (1) switch (_context4.prev = _context4.next) {
|
|
16841
17424
|
case 0:
|
|
16842
|
-
|
|
17425
|
+
_iterator4 = _createForOfIteratorHelper$k(items);
|
|
16843
17426
|
_context4.prev = 1;
|
|
16844
|
-
|
|
17427
|
+
_iterator4.s();
|
|
16845
17428
|
case 3:
|
|
16846
|
-
if ((
|
|
17429
|
+
if ((_step4 = _iterator4.n()).done) {
|
|
16847
17430
|
_context4.next = 37;
|
|
16848
17431
|
break;
|
|
16849
17432
|
}
|
|
16850
|
-
item =
|
|
17433
|
+
item = _step4.value;
|
|
16851
17434
|
itemName = typeof item.name == 'string' ? [item.name] : item.name;
|
|
16852
17435
|
if (item !== null && item !== void 0 && item.onSave) {
|
|
16853
17436
|
data = item.onSave(data);
|
|
@@ -16919,21 +17502,21 @@ function useFormData (_ref) {
|
|
|
16919
17502
|
case 39:
|
|
16920
17503
|
_context4.prev = 39;
|
|
16921
17504
|
_context4.t0 = _context4["catch"](1);
|
|
16922
|
-
|
|
17505
|
+
_iterator4.e(_context4.t0);
|
|
16923
17506
|
case 42:
|
|
16924
17507
|
_context4.prev = 42;
|
|
16925
|
-
|
|
17508
|
+
_iterator4.f();
|
|
16926
17509
|
return _context4.finish(42);
|
|
16927
17510
|
case 45:
|
|
16928
|
-
|
|
17511
|
+
_iterator5 = _createForOfIteratorHelper$k(removedMedias);
|
|
16929
17512
|
_context4.prev = 46;
|
|
16930
|
-
|
|
17513
|
+
_iterator5.s();
|
|
16931
17514
|
case 48:
|
|
16932
|
-
if ((
|
|
17515
|
+
if ((_step5 = _iterator5.n()).done) {
|
|
16933
17516
|
_context4.next = 54;
|
|
16934
17517
|
break;
|
|
16935
17518
|
}
|
|
16936
|
-
_media =
|
|
17519
|
+
_media = _step5.value;
|
|
16937
17520
|
_context4.next = 52;
|
|
16938
17521
|
return _media["delete"]();
|
|
16939
17522
|
case 52:
|
|
@@ -16945,10 +17528,10 @@ function useFormData (_ref) {
|
|
|
16945
17528
|
case 56:
|
|
16946
17529
|
_context4.prev = 56;
|
|
16947
17530
|
_context4.t1 = _context4["catch"](46);
|
|
16948
|
-
|
|
17531
|
+
_iterator5.e(_context4.t1);
|
|
16949
17532
|
case 59:
|
|
16950
17533
|
_context4.prev = 59;
|
|
16951
|
-
|
|
17534
|
+
_iterator5.f();
|
|
16952
17535
|
return _context4.finish(59);
|
|
16953
17536
|
case 62:
|
|
16954
17537
|
case "end":
|
|
@@ -16963,7 +17546,7 @@ function useFormData (_ref) {
|
|
|
16963
17546
|
}
|
|
16964
17547
|
function _setDynamicFields() {
|
|
16965
17548
|
_setDynamicFields = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(oldData, newData) {
|
|
16966
|
-
var items, getDynamicValue, _getDynamicValue,
|
|
17549
|
+
var items, getDynamicValue, _getDynamicValue, _iterator6, _step6, item, oldDynamicValue, newDynamicValue;
|
|
16967
17550
|
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
16968
17551
|
while (1) switch (_context6.prev = _context6.next) {
|
|
16969
17552
|
case 0:
|
|
@@ -17008,15 +17591,15 @@ function useFormData (_ref) {
|
|
|
17008
17591
|
return _getDynamicValue.apply(this, arguments);
|
|
17009
17592
|
};
|
|
17010
17593
|
items = selectedItems !== null && selectedItems !== void 0 ? selectedItems : configuration.items;
|
|
17011
|
-
|
|
17594
|
+
_iterator6 = _createForOfIteratorHelper$k(items);
|
|
17012
17595
|
_context6.prev = 4;
|
|
17013
|
-
|
|
17596
|
+
_iterator6.s();
|
|
17014
17597
|
case 6:
|
|
17015
|
-
if ((
|
|
17598
|
+
if ((_step6 = _iterator6.n()).done) {
|
|
17016
17599
|
_context6.next = 19;
|
|
17017
17600
|
break;
|
|
17018
17601
|
}
|
|
17019
|
-
item =
|
|
17602
|
+
item = _step6.value;
|
|
17020
17603
|
if (!(item.dynamic && typeof item.name == 'string')) {
|
|
17021
17604
|
_context6.next = 17;
|
|
17022
17605
|
break;
|
|
@@ -17043,10 +17626,10 @@ function useFormData (_ref) {
|
|
|
17043
17626
|
case 21:
|
|
17044
17627
|
_context6.prev = 21;
|
|
17045
17628
|
_context6.t0 = _context6["catch"](4);
|
|
17046
|
-
|
|
17629
|
+
_iterator6.e(_context6.t0);
|
|
17047
17630
|
case 24:
|
|
17048
17631
|
_context6.prev = 24;
|
|
17049
|
-
|
|
17632
|
+
_iterator6.f();
|
|
17050
17633
|
return _context6.finish(24);
|
|
17051
17634
|
case 27:
|
|
17052
17635
|
return _context6.abrupt("return", newData);
|
|
@@ -17115,19 +17698,19 @@ function useFormData (_ref) {
|
|
|
17115
17698
|
}, [state.data]);
|
|
17116
17699
|
var _keepRemovedMediaItem = /*#__PURE__*/function () {
|
|
17117
17700
|
var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(data, items) {
|
|
17118
|
-
var
|
|
17701
|
+
var _iterator3, _step3, item, itemName, media, mediaItemRefIdPath, urlPath, mediaItemRefId, url, mediaItem, arrayData, i;
|
|
17119
17702
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
17120
17703
|
while (1) switch (_context3.prev = _context3.next) {
|
|
17121
17704
|
case 0:
|
|
17122
|
-
|
|
17705
|
+
_iterator3 = _createForOfIteratorHelper$k(items);
|
|
17123
17706
|
_context3.prev = 1;
|
|
17124
|
-
|
|
17707
|
+
_iterator3.s();
|
|
17125
17708
|
case 3:
|
|
17126
|
-
if ((
|
|
17709
|
+
if ((_step3 = _iterator3.n()).done) {
|
|
17127
17710
|
_context3.next = 28;
|
|
17128
17711
|
break;
|
|
17129
17712
|
}
|
|
17130
|
-
item =
|
|
17713
|
+
item = _step3.value;
|
|
17131
17714
|
itemName = typeof item.name == 'string' ? [item.name] : item.name;
|
|
17132
17715
|
if (!(item.type == 'media')) {
|
|
17133
17716
|
_context3.next = 11;
|
|
@@ -17195,10 +17778,10 @@ function useFormData (_ref) {
|
|
|
17195
17778
|
case 30:
|
|
17196
17779
|
_context3.prev = 30;
|
|
17197
17780
|
_context3.t0 = _context3["catch"](1);
|
|
17198
|
-
|
|
17781
|
+
_iterator3.e(_context3.t0);
|
|
17199
17782
|
case 33:
|
|
17200
17783
|
_context3.prev = 33;
|
|
17201
|
-
|
|
17784
|
+
_iterator3.f();
|
|
17202
17785
|
return _context3.finish(33);
|
|
17203
17786
|
case 36:
|
|
17204
17787
|
case "end":
|
|
@@ -17358,66 +17941,72 @@ var FormList$2 = function FormList(_ref) {
|
|
|
17358
17941
|
var add = function add(a) {
|
|
17359
17942
|
a();
|
|
17360
17943
|
};
|
|
17361
|
-
return /*#__PURE__*/
|
|
17362
|
-
|
|
17363
|
-
|
|
17364
|
-
|
|
17365
|
-
|
|
17366
|
-
|
|
17367
|
-
|
|
17368
|
-
|
|
17369
|
-
|
|
17370
|
-
|
|
17371
|
-
|
|
17372
|
-
|
|
17373
|
-
|
|
17374
|
-
|
|
17375
|
-
|
|
17376
|
-
|
|
17377
|
-
|
|
17378
|
-
onClick: function onClick() {
|
|
17379
|
-
remove(name, r);
|
|
17380
|
-
}
|
|
17381
|
-
}), /*#__PURE__*/jsx("div", {
|
|
17944
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
17945
|
+
children: [/*#__PURE__*/jsx(Divider, {
|
|
17946
|
+
orientation: 'left',
|
|
17947
|
+
children: Array.isArray(item.name) ? t(item.name[0].toString()) : t(item.name)
|
|
17948
|
+
}), /*#__PURE__*/jsx(Form$2.List, {
|
|
17949
|
+
name: absoluteName,
|
|
17950
|
+
initialValue: (_item$initialValue = item.initialValue) !== null && _item$initialValue !== void 0 ? _item$initialValue : value,
|
|
17951
|
+
children: function children(fields, _ref2) {
|
|
17952
|
+
var a = _ref2.add,
|
|
17953
|
+
r = _ref2.remove;
|
|
17954
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
17955
|
+
children: [fields.map(function (_ref3) {
|
|
17956
|
+
var key = _ref3.key,
|
|
17957
|
+
name = _ref3.name,
|
|
17958
|
+
restField = _objectWithoutProperties(_ref3, _excluded$9);
|
|
17959
|
+
return /*#__PURE__*/jsxs("div", {
|
|
17960
|
+
id: key.toString(),
|
|
17382
17961
|
style: {
|
|
17383
|
-
|
|
17962
|
+
display: 'flex'
|
|
17384
17963
|
},
|
|
17385
|
-
children: item.
|
|
17386
|
-
|
|
17387
|
-
|
|
17388
|
-
|
|
17389
|
-
|
|
17390
|
-
|
|
17391
|
-
|
|
17392
|
-
|
|
17393
|
-
|
|
17394
|
-
|
|
17395
|
-
|
|
17396
|
-
|
|
17397
|
-
|
|
17398
|
-
|
|
17399
|
-
|
|
17400
|
-
|
|
17401
|
-
|
|
17402
|
-
|
|
17403
|
-
|
|
17404
|
-
|
|
17405
|
-
|
|
17406
|
-
|
|
17407
|
-
|
|
17408
|
-
|
|
17409
|
-
|
|
17410
|
-
|
|
17411
|
-
|
|
17412
|
-
|
|
17413
|
-
|
|
17414
|
-
|
|
17415
|
-
|
|
17416
|
-
|
|
17417
|
-
})
|
|
17418
|
-
|
|
17419
|
-
|
|
17420
|
-
|
|
17964
|
+
children: [!item.disablePushOrPop && /*#__PURE__*/jsx(MinusCircleOutlined, {
|
|
17965
|
+
onClick: function onClick() {
|
|
17966
|
+
remove(name, r);
|
|
17967
|
+
}
|
|
17968
|
+
}), /*#__PURE__*/jsx("div", {
|
|
17969
|
+
style: {
|
|
17970
|
+
flexGrow: 1
|
|
17971
|
+
},
|
|
17972
|
+
children: item.items.map(function (i, idx) {
|
|
17973
|
+
var _state$fieldErrors$n$;
|
|
17974
|
+
var n = [name].concat(_toConsumableArray(Array.isArray(i.name) ? i.name : [i.name]), _toConsumableArray(i.doTranslate && postFixName ? Array.isArray(postFixName) ? postFixName : [postFixName] : []));
|
|
17975
|
+
var aName = [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), _toConsumableArray(n));
|
|
17976
|
+
var hidden = state.getIsHidden(i, state.data, [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), [name]));
|
|
17977
|
+
if (hidden) return /*#__PURE__*/jsx(Fragment, {});
|
|
17978
|
+
return /*#__PURE__*/createElement(Form$2.Item, _objectSpread$$(_objectSpread$$({}, restField), {}, {
|
|
17979
|
+
id: n.join(),
|
|
17980
|
+
key: n.join(),
|
|
17981
|
+
name: n,
|
|
17982
|
+
rules: state.getRules(i, state.data),
|
|
17983
|
+
label: getLabel(i, t),
|
|
17984
|
+
valuePropName: i.type == 'checkbox' ? 'checked' : 'value',
|
|
17985
|
+
initialValue: i === null || i === void 0 ? void 0 : i.defaultValue,
|
|
17986
|
+
hasFeedback: !!state.fieldErrors[n.toString()],
|
|
17987
|
+
validateStatus: !!state.fieldErrors[n.toString()] ? 'error' : undefined,
|
|
17988
|
+
help: (_state$fieldErrors$n$ = state.fieldErrors[n.toString()]) !== null && _state$fieldErrors$n$ !== void 0 ? _state$fieldErrors$n$ : i.helpText,
|
|
17989
|
+
hidden: hidden
|
|
17990
|
+
}), getElement(_objectSpread$$(_objectSpread$$({}, i), {}, {
|
|
17991
|
+
name: n
|
|
17992
|
+
}), setCanSave, state, aName, state.onInputChanged, onError, root, form, hidden));
|
|
17993
|
+
})
|
|
17994
|
+
})]
|
|
17995
|
+
}, key);
|
|
17996
|
+
}), !item.disablePushOrPop && /*#__PURE__*/jsx(Form$2.Item, {
|
|
17997
|
+
children: /*#__PURE__*/jsx(Button, {
|
|
17998
|
+
type: "dashed",
|
|
17999
|
+
onClick: function onClick() {
|
|
18000
|
+
return add(a);
|
|
18001
|
+
},
|
|
18002
|
+
block: true,
|
|
18003
|
+
icon: /*#__PURE__*/jsx(PlusOutlined, {}),
|
|
18004
|
+
children: t('backoffice.add_field')
|
|
18005
|
+
})
|
|
18006
|
+
})]
|
|
18007
|
+
});
|
|
18008
|
+
}
|
|
18009
|
+
})]
|
|
17421
18010
|
});
|
|
17422
18011
|
};
|
|
17423
18012
|
var FormList$3 = observer(FormList$2);
|
|
@@ -19652,6 +20241,7 @@ var Translation = function Translation(_ref) {
|
|
|
19652
20241
|
marginLeft: 64
|
|
19653
20242
|
},
|
|
19654
20243
|
children: item.items.map(function (i, idx) {
|
|
20244
|
+
var _state$fieldErrors$n$;
|
|
19655
20245
|
var n = [].concat(_toConsumableArray(Array.isArray(i.name) ? i.name : [i.name]), _toConsumableArray(i.doTranslate ? [currentLang] : []));
|
|
19656
20246
|
var key = typeof n == 'string' ? n : n.join('.');
|
|
19657
20247
|
var hidden = state.getIsHidden(i, data);
|
|
@@ -19668,7 +20258,7 @@ var Translation = function Translation(_ref) {
|
|
|
19668
20258
|
initialValue: i === null || i === void 0 ? void 0 : i.defaultValue,
|
|
19669
20259
|
hasFeedback: !!state.fieldErrors[n.toString()],
|
|
19670
20260
|
validateStatus: !!state.fieldErrors[n.toString()] ? 'error' : undefined,
|
|
19671
|
-
help: state.fieldErrors[n.toString()],
|
|
20261
|
+
help: (_state$fieldErrors$n$ = state.fieldErrors[n.toString()]) !== null && _state$fieldErrors$n$ !== void 0 ? _state$fieldErrors$n$ : i.helpText,
|
|
19672
20262
|
hidden: hidden,
|
|
19673
20263
|
children: getElement(_objectSpread$V(_objectSpread$V({}, i), {}, {
|
|
19674
20264
|
name: n
|
|
@@ -20157,7 +20747,13 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
20157
20747
|
case 'number':
|
|
20158
20748
|
return /*#__PURE__*/jsx(InputNumber, {
|
|
20159
20749
|
disabled: disabled,
|
|
20160
|
-
value: item.value
|
|
20750
|
+
value: item.value,
|
|
20751
|
+
formatter: function formatter(value) {
|
|
20752
|
+
return value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.');
|
|
20753
|
+
},
|
|
20754
|
+
onChange: function onChange(value) {
|
|
20755
|
+
_onChange(absoluteName, value);
|
|
20756
|
+
}
|
|
20161
20757
|
});
|
|
20162
20758
|
case 'checkbox':
|
|
20163
20759
|
return /*#__PURE__*/jsx(Checkbox$1, {
|
|
@@ -20724,7 +21320,7 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
20724
21320
|
var renderFormItems = function renderFormItems(items) {
|
|
20725
21321
|
return /*#__PURE__*/jsx(Fragment, {
|
|
20726
21322
|
children: items.map(function (item) {
|
|
20727
|
-
var _state$hiddenRequired, _state$hiddenRequired2, _state$hiddenRequired3;
|
|
21323
|
+
var _state$hiddenRequired, _state$fieldErrors$it, _state$hiddenRequired2, _state$hiddenRequired3;
|
|
20728
21324
|
return /*#__PURE__*/jsxs("div", {
|
|
20729
21325
|
children: [item.marker && /*#__PURE__*/jsx(InfoCircleOutlined, {}), ['subTitle', 'array', 'text'].includes(item.type) ? getElement(item, setCanSave, state, item.name, state.onInputChanged, onErrorInternal, undefined, undefined, (_state$hiddenRequired = state.hiddenRequiredDisabled[typeof item.name == 'string' ? item.name : item.name.join('.')]) === null || _state$hiddenRequired === void 0 ? void 0 : _state$hiddenRequired.hidden) : /*#__PURE__*/jsx(Form$2.Item, {
|
|
20730
21326
|
name: item.name,
|
|
@@ -20734,7 +21330,7 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
20734
21330
|
initialValue: item === null || item === void 0 ? void 0 : item.defaultValue,
|
|
20735
21331
|
hasFeedback: !!state.fieldErrors[item.name.toString()],
|
|
20736
21332
|
validateStatus: !!state.fieldErrors[item.name.toString()] ? 'error' : undefined,
|
|
20737
|
-
help: state.fieldErrors[item.name.toString()],
|
|
21333
|
+
help: (_state$fieldErrors$it = state.fieldErrors[item.name.toString()]) !== null && _state$fieldErrors$it !== void 0 ? _state$fieldErrors$it : item.helpText,
|
|
20738
21334
|
hidden: (_state$hiddenRequired2 = state.hiddenRequiredDisabled[typeof item.name == 'string' ? item.name : item.name.join('.')]) === null || _state$hiddenRequired2 === void 0 ? void 0 : _state$hiddenRequired2.hidden,
|
|
20739
21335
|
children: getElement(item, setCanSave, state, item.name, state.onInputChanged, onErrorInternal, root, form, (_state$hiddenRequired3 = state.hiddenRequiredDisabled[typeof item.name == 'string' ? item.name : item.name.join('.')]) === null || _state$hiddenRequired3 === void 0 ? void 0 : _state$hiddenRequired3.hidden)
|
|
20740
21336
|
}, Array.isArray(item.name) ? item.name.join('.') : item.name)]
|
|
@@ -26652,9 +27248,9 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
26652
27248
|
}
|
|
26653
27249
|
};
|
|
26654
27250
|
}, []);
|
|
26655
|
-
function isDownloadActionDisabled() {
|
|
27251
|
+
function isDownloadActionDisabled(action) {
|
|
26656
27252
|
var _state$data;
|
|
26657
|
-
if (!
|
|
27253
|
+
if (!action.rule) return false;
|
|
26658
27254
|
var data = (_state$data = state.data) === null || _state$data === void 0 ? void 0 : _state$data.filter(function (dt) {
|
|
26659
27255
|
var _state$selected;
|
|
26660
27256
|
return (_state$selected = state.selected) === null || _state$selected === void 0 ? void 0 : _state$selected.find(function (sel) {
|
|
@@ -26669,7 +27265,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
26669
27265
|
return !aplyRules({
|
|
26670
27266
|
data: data,
|
|
26671
27267
|
rootStore: root,
|
|
26672
|
-
rules:
|
|
27268
|
+
rules: action.rule
|
|
26673
27269
|
});
|
|
26674
27270
|
}
|
|
26675
27271
|
function checkPermission(permission) {
|
|
@@ -26710,30 +27306,29 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
26710
27306
|
onSelectedCatalog: state.onSelectedCatalog,
|
|
26711
27307
|
dontLoadCatalogData: state.configuration.dontLoadCatalogData
|
|
26712
27308
|
})
|
|
26713
|
-
}), state.configuration.downloadAction &&
|
|
26714
|
-
|
|
26715
|
-
|
|
26716
|
-
|
|
26717
|
-
|
|
26718
|
-
|
|
26719
|
-
|
|
26720
|
-
|
|
26721
|
-
|
|
26722
|
-
|
|
26723
|
-
|
|
26724
|
-
|
|
26725
|
-
|
|
26726
|
-
|
|
26727
|
-
|
|
26728
|
-
|
|
26729
|
-
|
|
26730
|
-
|
|
26731
|
-
|
|
26732
|
-
|
|
26733
|
-
|
|
26734
|
-
|
|
26735
|
-
},
|
|
26736
|
-
children: t('backoffice.basetable.download')
|
|
27309
|
+
}), state.configuration.downloadAction && state.configuration.downloadAction.length > 0 && state.configuration.downloadAction.map(function (action, index) {
|
|
27310
|
+
var _action$label;
|
|
27311
|
+
return /*#__PURE__*/jsx(Button, {
|
|
27312
|
+
type: "primary",
|
|
27313
|
+
disabled: isDownloadActionDisabled(action),
|
|
27314
|
+
icon: /*#__PURE__*/jsx(DownloadOutlined$1, {}),
|
|
27315
|
+
size: "middle",
|
|
27316
|
+
onClick: function onClick() {
|
|
27317
|
+
var _state$catalogItem, _state$catalogItem2, _state$catalogItem3;
|
|
27318
|
+
var selectedData = state.data.filter(function (dt) {
|
|
27319
|
+
return state.selected.includes(dt._id);
|
|
27320
|
+
});
|
|
27321
|
+
root.downloadStore.openDownload({
|
|
27322
|
+
data: selectedData.length ? selectedData : state.mappingData,
|
|
27323
|
+
action: action,
|
|
27324
|
+
catalogCodex: (_state$catalogItem = state.catalogItem) === null || _state$catalogItem === void 0 ? void 0 : _state$catalogItem.codex,
|
|
27325
|
+
dealerId: (_state$catalogItem2 = state.catalogItem) === null || _state$catalogItem2 === void 0 ? void 0 : _state$catalogItem2.dealerId,
|
|
27326
|
+
currentUrl: state.currentFetchUrl,
|
|
27327
|
+
sessionGuid: (_state$catalogItem3 = state.catalogItem) === null || _state$catalogItem3 === void 0 ? void 0 : _state$catalogItem3.sessionGuid
|
|
27328
|
+
});
|
|
27329
|
+
},
|
|
27330
|
+
children: (_action$label = action.label) !== null && _action$label !== void 0 ? _action$label : t('backoffice.basetable.download')
|
|
27331
|
+
}, index);
|
|
26737
27332
|
}), state.configuration.canRefresh && /*#__PURE__*/jsx(Button, {
|
|
26738
27333
|
onClick: function onClick() {
|
|
26739
27334
|
state.triggerRefresh();
|
|
@@ -38522,7 +39117,7 @@ var useSeriesSelector = function useSeriesSelector(modules) {
|
|
|
38522
39117
|
// if the extend series data is already loaded, use it
|
|
38523
39118
|
isLoaded = !!((_seriesSelectorState$ = seriesSelectorState.options) !== null && _seriesSelectorState$ !== void 0 && (_seriesSelectorState$ = _seriesSelectorState$.find(function (option) {
|
|
38524
39119
|
return option.value === (newSerie === null || newSerie === void 0 ? void 0 : newSerie._id);
|
|
38525
|
-
})) !== null && _seriesSelectorState$ !== void 0 && (_seriesSelectorState$ = _seriesSelectorState$.data) !== null && _seriesSelectorState$ !== void 0 && _seriesSelectorState$.
|
|
39120
|
+
})) !== null && _seriesSelectorState$ !== void 0 && (_seriesSelectorState$ = _seriesSelectorState$.data) !== null && _seriesSelectorState$ !== void 0 && _seriesSelectorState$.lastUpdatedDate);
|
|
38526
39121
|
if (!isLoaded) {
|
|
38527
39122
|
_context.next = 6;
|
|
38528
39123
|
break;
|
|
@@ -38535,7 +39130,7 @@ var useSeriesSelector = function useSeriesSelector(modules) {
|
|
|
38535
39130
|
api = new _default$d({
|
|
38536
39131
|
type: 'SelectSimple',
|
|
38537
39132
|
apiInterface: {
|
|
38538
|
-
read: idmService + "/v3.0/catalogs/".concat(catalogId, "/series/").concat(newSerie._id, "?fields=seriesName[").concat(i18n.language.toLocaleUpperCase(), "];_id;serieNo;pricefeaturegroups;pricefeaturegroupsDisplayTexts;pricefeaturegroupsKeys;pricefeaturegroupsKeysDisplayTexts")
|
|
39133
|
+
read: idmService + "/v3.0/catalogs/".concat(catalogId, "/series/").concat(newSerie._id, "?fields=seriesName[").concat(i18n.language.toLocaleUpperCase(), "];_id;serieNo;pricefeaturegroups;pricefeaturegroupsDisplayTexts;pricefeaturegroupsKeys;pricefeaturegroupsKeysDisplayTexts;lastUpdatedDate")
|
|
38539
39134
|
}
|
|
38540
39135
|
}, root);
|
|
38541
39136
|
_context.next = 10;
|
|
@@ -39878,28 +40473,32 @@ var Options = /*#__PURE__*/forwardRef(function Options(_ref, ref) {
|
|
|
39878
40473
|
field: 'optionFreeText',
|
|
39879
40474
|
cellDataType: 'boolean'
|
|
39880
40475
|
}, {
|
|
39881
|
-
field: '
|
|
40476
|
+
field: 'featureNos',
|
|
39882
40477
|
headerName: 'backoffice.idmCatalogEditor.catalogoptions.label.featureIds',
|
|
39883
40478
|
cellDataType: 'lookup',
|
|
39884
40479
|
editable: true,
|
|
39885
40480
|
required: false,
|
|
39886
40481
|
customParams: {
|
|
39887
40482
|
nameField: 'featureIdsDisplayTexts',
|
|
39888
|
-
filterCellType: '
|
|
40483
|
+
filterCellType: 'number',
|
|
39889
40484
|
displayLabelTemplate: '${name} (${value})',
|
|
39890
40485
|
apiInterface: {
|
|
39891
40486
|
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features'
|
|
39892
40487
|
},
|
|
39893
40488
|
lookupValue: 'featureText',
|
|
39894
|
-
lookupKey: '
|
|
40489
|
+
lookupKey: 'featureNo',
|
|
39895
40490
|
lookupKeyFilterType: {
|
|
39896
40491
|
type: 'equals',
|
|
39897
|
-
filterType: '
|
|
40492
|
+
filterType: 'number'
|
|
39898
40493
|
},
|
|
40494
|
+
additionalMappings: [{
|
|
40495
|
+
lookupField: '_id',
|
|
40496
|
+
targetField: 'featureIds'
|
|
40497
|
+
}],
|
|
39899
40498
|
multiple: true,
|
|
39900
40499
|
translated: true
|
|
39901
40500
|
},
|
|
39902
|
-
additionalFields: ['featureIdsDisplayTexts'],
|
|
40501
|
+
additionalFields: ['featureIdsDisplayTexts', 'featureIds'],
|
|
39903
40502
|
isDictionary: true
|
|
39904
40503
|
}, {
|
|
39905
40504
|
headerName: 'backoffice.idmCatalog.items.label.validation',
|
|
@@ -42050,7 +42649,8 @@ var TablePriceFeatureGroups = observer(function () {
|
|
|
42050
42649
|
organizationId = _useModule.organizationId,
|
|
42051
42650
|
apiConfig = _useModule.apiConfig,
|
|
42052
42651
|
setSelectedItem = _useModule.setSelectedItem,
|
|
42053
|
-
setSelectedSerie = _useModule.setSelectedSerie
|
|
42652
|
+
setSelectedSerie = _useModule.setSelectedSerie,
|
|
42653
|
+
resetSeriesSelector = _useModule.resetSeriesSelector;
|
|
42054
42654
|
var _React$useState = React.useState(),
|
|
42055
42655
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
42056
42656
|
selectedPriceFeatureGroup = _React$useState2[0],
|
|
@@ -42137,6 +42737,12 @@ var TablePriceFeatureGroups = observer(function () {
|
|
|
42137
42737
|
if (current) {
|
|
42138
42738
|
setSelectedPriceFeatureGroup(_objectSpread$7({}, current.data));
|
|
42139
42739
|
}
|
|
42740
|
+
if (updates.length == 0 || updates.some(function (update) {
|
|
42741
|
+
var _update$oldData;
|
|
42742
|
+
return !((_update$oldData = update.oldData) !== null && _update$oldData !== void 0 && _update$oldData.priceFeatureGroupNo);
|
|
42743
|
+
})) {
|
|
42744
|
+
resetSeriesSelector();
|
|
42745
|
+
}
|
|
42140
42746
|
}
|
|
42141
42747
|
};
|
|
42142
42748
|
}, [selectedNodeId]);
|
|
@@ -42829,15 +43435,15 @@ function TableCollections () {
|
|
|
42829
43435
|
}, {
|
|
42830
43436
|
headerName: 'backoffice.idmEnricher.collections.label.validation',
|
|
42831
43437
|
children: [{
|
|
42832
|
-
headerName: 'backoffice.idmCatalog.general.label.
|
|
42833
|
-
field: '
|
|
43438
|
+
headerName: 'backoffice.idmCatalog.general.label.validFrom',
|
|
43439
|
+
field: 'validFrom',
|
|
42834
43440
|
cellDataType: 'dateString',
|
|
42835
43441
|
customParams: {
|
|
42836
43442
|
dateFormat: 'DD.MM.YYYY'
|
|
42837
43443
|
}
|
|
42838
43444
|
}, {
|
|
42839
|
-
headerName: 'backoffice.idmCatalog.general.label.
|
|
42840
|
-
field: '
|
|
43445
|
+
headerName: 'backoffice.idmCatalog.general.label.validUntil',
|
|
43446
|
+
field: 'validTo',
|
|
42841
43447
|
cellDataType: 'dateString',
|
|
42842
43448
|
customParams: {
|
|
42843
43449
|
dateFormat: 'DD.MM.YYYY'
|