@crystaldesign/diva-backoffice 25.9.0-beta.2 → 25.9.0-beta.20
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 +473 -303
- package/build/types/backoffice/src/ui/Form/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Form/types.d.ts +1 -1
- package/build/types/backoffice/src/ui/Form/types.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/OpenModalButton/Forms/IDMImportForm.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/OpenModalButton/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/UploadButton/index.d.ts +2 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/UploadButton/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TableCatalogs/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/components/PrefilterSelectors/PackageSelector.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/components/PriceFactorCellRenderer/priceFactorHelpers.d.ts +2 -2
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TablePackages/PublishCustomCell.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TablePackages/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TablePriceList/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/SelectSimple/types.d.ts +3 -3
- package/build/types/backoffice/src/ui/SelectSimple/types.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Table/utils/applyFilterAndSortation.d.ts +1 -1
- package/package.json +9 -9
package/build/esm/index.js
CHANGED
@@ -75,7 +75,7 @@ import DeleteOutlined from '@ant-design/icons/DeleteOutlined';
|
|
75
75
|
import JSONEditor from 'jsoneditor';
|
76
76
|
import 'jsoneditor/dist/jsoneditor.css';
|
77
77
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
78
|
-
import { MinusCircleOutlined, PlusOutlined, DownloadOutlined as DownloadOutlined$1, PlusSquareOutlined, DeleteOutlined as DeleteOutlined$1, FullscreenOutlined, FileUnknownOutlined, CloseOutlined as CloseOutlined$1, PlusCircleOutlined as PlusCircleOutlined$1, HomeOutlined as HomeOutlined$1, InboxOutlined, UploadOutlined as UploadOutlined$1, InfoCircleOutlined as InfoCircleOutlined$1, ReloadOutlined as ReloadOutlined$1 } from '@ant-design/icons';
|
78
|
+
import { MinusCircleOutlined, PlusOutlined, DownloadOutlined as DownloadOutlined$1, PlusSquareOutlined, DeleteOutlined as DeleteOutlined$1, FullscreenOutlined, FileUnknownOutlined, CloseOutlined as CloseOutlined$1, PlusCircleOutlined as PlusCircleOutlined$1, HomeOutlined as HomeOutlined$1, InboxOutlined, EditOutlined, EyeOutlined, UploadOutlined as UploadOutlined$1, InfoCircleOutlined as InfoCircleOutlined$1, ReloadOutlined as ReloadOutlined$1 } from '@ant-design/icons';
|
79
79
|
import classnames from 'classnames';
|
80
80
|
import RTFEditor from '@crystaldesign/rtf-editor';
|
81
81
|
import debounce from 'lodash/debounce';
|
@@ -117,12 +117,14 @@ import { TransformWrapper, TransformComponent } from 'react-zoom-pan-pinch';
|
|
117
117
|
import _objectDestructuringEmpty from '@babel/runtime/helpers/objectDestructuringEmpty';
|
118
118
|
import Descriptions$1 from 'antd/es/descriptions';
|
119
119
|
import { Spreadsheet as Spreadsheet$1 } from '@crystaldesign/spreadsheet';
|
120
|
-
import EditOutlined from '@ant-design/icons/lib/icons/EditOutlined';
|
120
|
+
import EditOutlined$1 from '@ant-design/icons/lib/icons/EditOutlined';
|
121
121
|
import Checkbox$1 from 'antd/es/checkbox/Checkbox';
|
122
|
+
import SyncOutlined from '@ant-design/icons/SyncOutlined';
|
122
123
|
import WarningOutlined from '@ant-design/icons/lib/icons/WarningOutlined';
|
123
124
|
import Modal$3 from 'antd/es/modal';
|
124
125
|
import Spin$1 from 'antd/es/spin';
|
125
126
|
import Flex from 'antd/es/flex';
|
127
|
+
import EyeOutlined$1 from '@ant-design/icons/lib/icons/EyeOutlined';
|
126
128
|
import { useTranslation as useTranslation$1 } from 'react-i18next';
|
127
129
|
import JSZip from 'jszip';
|
128
130
|
import { DropzoneAreaBase } from 'react-mui-dropzone';
|
@@ -2771,7 +2773,8 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
2771
2773
|
labelOff: t('backoffice.table.taskstatusversioning.filter.label.allorgs'),
|
2772
2774
|
inverted: true,
|
2773
2775
|
permission: 'backoffice_taskstatus_allorgs',
|
2774
|
-
isAnd: true
|
2776
|
+
isAnd: true,
|
2777
|
+
defaultChecked: true
|
2775
2778
|
},
|
2776
2779
|
search: {
|
2777
2780
|
fields: ['_id', 'progress.dataItems', 'taskName', 'organizationId', 'user.fullName', 'status', 'serverName', 'taskType']
|
@@ -3251,7 +3254,165 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
3251
3254
|
},
|
3252
3255
|
apiInterface: {
|
3253
3256
|
read: {
|
3254
|
-
list: '${adminService}/taskStatus?filter=%5B%7BtaskType%2Cne%2CSAP_XML_IMPORT%7D%2C%7BtaskType%2Cne%2CSAP_DROPDOWNITEMS%7D%2C%7BtaskType%2Cne%2CSAP_TEMPLATEARTICLES%7D%2C%7BtaskType%2Cne%2CSAP_ARTICLE_IMPORT%7D%2C%7BtaskType%2Cne%2CSAP_SUPPLIERS%7D%2C%7BtaskType%2Cne%2CSAP_PRODUCTGROUPS%7D%2C%7BtaskType%2Cne%2CSAP_AUSP%7D%2C%7BtaskType%2Cne%2CPIM_SEND_CLASSIFICATION%7D%2C%7BtaskType%2Cne%2CSEND_SAP_ARTICLES%7D%2C%7BtaskType%2Cne%2CCRON%7D%2C%7BtaskType%2Cne%2CRETAIL_VERSIONING%7D%2C%7BtaskType%2Cne%2CSUPPLIER_VERSIONING%7D%2C%7BtaskType%2Cne%2CBACKOFFICE_CE_EXPORT%7D%2C%7BtaskType%2Cne%2CBACKOFFICE_CE_IMPORT%7D%2C%7BtaskType%2Cne%2CGET_PRODUCT_FEATURES_PIM%7D%2C%7BtaskType%2Cne%2CIDM_IMPORT%7D%2C%7BtaskType%2Cne%2CIDM_EXPORT%7D%5D',
|
3257
|
+
list: '${adminService}/taskStatus?filter=%5B%7BtaskType%2Cne%2CSAP_XML_IMPORT%7D%2C%7BtaskType%2Cne%2CSAP_DROPDOWNITEMS%7D%2C%7BtaskType%2Cne%2CSAP_TEMPLATEARTICLES%7D%2C%7BtaskType%2Cne%2CSAP_ARTICLE_IMPORT%7D%2C%7BtaskType%2Cne%2CSAP_SUPPLIERS%7D%2C%7BtaskType%2Cne%2CSAP_PRODUCTGROUPS%7D%2C%7BtaskType%2Cne%2CSAP_AUSP%7D%2C%7BtaskType%2Cne%2CPIM_SEND_CLASSIFICATION%7D%2C%7BtaskType%2Cne%2CSEND_SAP_ARTICLES%7D%2C%7BtaskType%2Cne%2CCRON%7D%2C%7BtaskType%2Cne%2CRETAIL_VERSIONING%7D%2C%7BtaskType%2Cne%2CSUPPLIER_VERSIONING%7D%2C%7BtaskType%2Cne%2CBACKOFFICE_CE_EXPORT%7D%2C%7BtaskType%2Cne%2CBACKOFFICE_CE_IMPORT%7D%2C%7BtaskType%2Cne%2CGET_PRODUCT_FEATURES_PIM%7D%2C%7BtaskType%2Cne%2CIDM_IMPORT%7D%2C%7BtaskType%2Cne%2CIDM_EXPORT%7D%2C%7BtaskType%2Cne%2CPARTLIST_IMPORT%7D%2C%7BtaskType%2Cne%2CARTICLE_IMPORT%7D%2C%7BtaskType%2Cne%2CPRICE_IMPORT%7D%2C%7BtaskType%2Cne%2COPVG_IMPORT%7D%5D',
|
3258
|
+
fields: true,
|
3259
|
+
filterServerSide: true
|
3260
|
+
}
|
3261
|
+
},
|
3262
|
+
mapping: {
|
3263
|
+
type: 'query',
|
3264
|
+
map: [{
|
3265
|
+
globalValue: 'selectedOrganizationId',
|
3266
|
+
targetField: 'organizationId'
|
3267
|
+
}]
|
3268
|
+
},
|
3269
|
+
rowAction: [{
|
3270
|
+
actionType: 'Detail',
|
3271
|
+
type: 'Form',
|
3272
|
+
id: 'FormTaskStatusDetails',
|
3273
|
+
title: function title(data) {
|
3274
|
+
return t('backoffice.table.taskstatusversioning.rowAction.title') + ': ' + data.taskName;
|
3275
|
+
}
|
3276
|
+
}]
|
3277
|
+
},
|
3278
|
+
TableTaskStatusCEVSAPI: {
|
3279
|
+
type: 'Table',
|
3280
|
+
canRefresh: true,
|
3281
|
+
autoRefresh: 60000,
|
3282
|
+
title: t('backoffice.table.taskstatusversioning.title.taskstatuscevsapi'),
|
3283
|
+
columns: [{
|
3284
|
+
title: 'ID',
|
3285
|
+
field: '_id',
|
3286
|
+
sorter: 2,
|
3287
|
+
filter: 'advanced',
|
3288
|
+
width: 200,
|
3289
|
+
hidden: true
|
3290
|
+
}, {
|
3291
|
+
title: t('backoffice.table.taskstatusversioning.columns.model'),
|
3292
|
+
field: 'warning',
|
3293
|
+
hidden: true
|
3294
|
+
}, {
|
3295
|
+
title: t('backoffice.table.taskstatusversioning.columns.model'),
|
3296
|
+
field: 'error',
|
3297
|
+
hidden: true
|
3298
|
+
}, {
|
3299
|
+
title: t('backoffice.table.taskstatusversioning.columns.taskname'),
|
3300
|
+
field: 'taskName',
|
3301
|
+
sorter: 2,
|
3302
|
+
filter: 'advanced',
|
3303
|
+
width: 400
|
3304
|
+
}, {
|
3305
|
+
title: t('backoffice.table.taskstatusversioning.columns.organisationid'),
|
3306
|
+
field: 'organizationId',
|
3307
|
+
hidden: true
|
3308
|
+
}, {
|
3309
|
+
title: t('backoffice.table.taskstatusversioning.columns.organisation'),
|
3310
|
+
field: 'organizationDisplayName',
|
3311
|
+
field2: 'organizationId',
|
3312
|
+
type: 'link',
|
3313
|
+
link: '/backoffice?lang=de&organizationId={field2}&module=Collections',
|
3314
|
+
sorter: 200,
|
3315
|
+
filter: 'advanced',
|
3316
|
+
width: 200
|
3317
|
+
}, {
|
3318
|
+
title: t('backoffice.table.taskstatusversioning.columns.user'),
|
3319
|
+
field: 'user.fullName',
|
3320
|
+
sorter: 3,
|
3321
|
+
filter: 'advanced',
|
3322
|
+
width: 200
|
3323
|
+
}, {
|
3324
|
+
title: t('backoffice.table.taskstatusversioning.columns.user'),
|
3325
|
+
field: 'cancelledByUser.fullName',
|
3326
|
+
sorter: 3,
|
3327
|
+
filter: 'advanced',
|
3328
|
+
width: 200,
|
3329
|
+
hidden: true
|
3330
|
+
}, {
|
3331
|
+
title: t('backoffice.table.taskstatusversioning.columns.status'),
|
3332
|
+
field: 'progress.status',
|
3333
|
+
color: [{
|
3334
|
+
color: 'blue',
|
3335
|
+
onValues: ['InProgress', 'Waiting', 'Created', 'Started'],
|
3336
|
+
operations: ['eq']
|
3337
|
+
}, {
|
3338
|
+
color: 'green',
|
3339
|
+
onValues: ['Done'],
|
3340
|
+
operations: ['eq']
|
3341
|
+
}, {
|
3342
|
+
color: 'orange',
|
3343
|
+
onValues: ['DoneWithWarning', 'Cancel', 'Cancelled'],
|
3344
|
+
operations: ['eq']
|
3345
|
+
}, {
|
3346
|
+
color: 'red',
|
3347
|
+
onValues: ['Error'],
|
3348
|
+
operations: ['eq']
|
3349
|
+
}],
|
3350
|
+
filter: 'advanced',
|
3351
|
+
width: 200
|
3352
|
+
}, {
|
3353
|
+
title: t('backoffice.table.taskstatusversioning.columns.status'),
|
3354
|
+
field: 'progress.step',
|
3355
|
+
filter: 'advanced',
|
3356
|
+
width: 200,
|
3357
|
+
hidden: true
|
3358
|
+
}, {
|
3359
|
+
title: t('backoffice.table.taskstatusversioning.columns.status'),
|
3360
|
+
field: 'progress.percentage',
|
3361
|
+
field2: 'progress.step',
|
3362
|
+
width: 400,
|
3363
|
+
type: 'progress'
|
3364
|
+
}, {
|
3365
|
+
title: t('backoffice.table.taskstatusversioning.columns.created'),
|
3366
|
+
field: 'created',
|
3367
|
+
sorter: 1,
|
3368
|
+
defaultSortOrder: 'descend',
|
3369
|
+
type: 'unixTimeStamp',
|
3370
|
+
width: 200
|
3371
|
+
}, {
|
3372
|
+
title: t('backoffice.table.taskstatusversioning.columns.lastUpdated'),
|
3373
|
+
field: 'lastUpdated',
|
3374
|
+
type: 'unixTimeStamp',
|
3375
|
+
width: 200
|
3376
|
+
}, {
|
3377
|
+
title: t('backoffice.table.taskstatusversioning.columns.lastUpdated'),
|
3378
|
+
field: 'startTime',
|
3379
|
+
type: 'unixTimeStamp',
|
3380
|
+
width: 200,
|
3381
|
+
hidden: true
|
3382
|
+
}, {
|
3383
|
+
title: t('backoffice.table.taskstatusversioning.columns.finished'),
|
3384
|
+
field: 'endTime',
|
3385
|
+
type: 'unixTimeStamp',
|
3386
|
+
width: 200
|
3387
|
+
}, {
|
3388
|
+
title: t('backoffice.table.taskstatusversioning.columns.server'),
|
3389
|
+
field: 'serverName',
|
3390
|
+
filter: 'advanced',
|
3391
|
+
width: 200
|
3392
|
+
}, {
|
3393
|
+
title: t('backoffice.table.taskstatusversioning.columns.type'),
|
3394
|
+
field: 'taskType',
|
3395
|
+
filter: 'advanced',
|
3396
|
+
width: 200
|
3397
|
+
}],
|
3398
|
+
filter: {
|
3399
|
+
toggle: {
|
3400
|
+
globalValue: 'relevantTypeOrganizationId',
|
3401
|
+
fields: ['organizationId'],
|
3402
|
+
label: t('backoffice.table.clientrelations.filter.label.allorgs'),
|
3403
|
+
labelOff: t('backoffice.table.clientrelations.filter.label.allorgs'),
|
3404
|
+
inverted: true,
|
3405
|
+
permission: 'backoffice_taskstatus_allorgs',
|
3406
|
+
isAnd: true,
|
3407
|
+
defaultChecked: true
|
3408
|
+
},
|
3409
|
+
search: {
|
3410
|
+
fields: ['_id', 'progress.dataItems', 'taskName', 'organizationId', 'user.fullName', 'status', 'serverName', 'taskType']
|
3411
|
+
}
|
3412
|
+
},
|
3413
|
+
apiInterface: {
|
3414
|
+
read: {
|
3415
|
+
list: '${adminService}/taskStatus?filter=%5B%2B%5B%7BtaskType%2Ceq%2CBACKOFFICE_CE_IMPORT%7D%2C%7BtaskType%2Ceq%2CPARTLIST_IMPORT%7D%2C%7BtaskType%2Ceq%2CARTICLE_IMPORT%7D%2C%7BtaskType%2Ceq%2CPRICE_IMPORT%7D%2C%7BtaskType%2Ceq%2COPVG_IMPORT%7D%5D%5D',
|
3255
3416
|
fields: true,
|
3256
3417
|
filterServerSide: true
|
3257
3418
|
}
|
@@ -6698,123 +6859,6 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
6698
6859
|
}]
|
6699
6860
|
}
|
6700
6861
|
},
|
6701
|
-
TableIDMImports: {
|
6702
|
-
type: 'Table',
|
6703
|
-
title: t('backoffice.table.idmimports.title'),
|
6704
|
-
canRefresh: true,
|
6705
|
-
autoRefresh: 60000,
|
6706
|
-
mergeFields: [{
|
6707
|
-
key: 'fullName',
|
6708
|
-
connectString: ' ',
|
6709
|
-
valueKeys: ['user.name', 'user.familyName']
|
6710
|
-
}, {
|
6711
|
-
key: 'fullProgress',
|
6712
|
-
connectString: '/',
|
6713
|
-
valueKeys: ['progress.modelsCurrent', 'progress.modelsTotal']
|
6714
|
-
}],
|
6715
|
-
columns: [{
|
6716
|
-
title: 'ID',
|
6717
|
-
field: '_id',
|
6718
|
-
sorter: 7,
|
6719
|
-
filter: 'eq'
|
6720
|
-
}, {
|
6721
|
-
title: t('backoffice.table.idmimports.fullName'),
|
6722
|
-
field: 'fullName',
|
6723
|
-
sorter: 6
|
6724
|
-
}, {
|
6725
|
-
title: t('backoffice.table.idmimports.user.name'),
|
6726
|
-
field: 'user.name',
|
6727
|
-
hidden: true,
|
6728
|
-
sorter: 5
|
6729
|
-
}, {
|
6730
|
-
title: t('backoffice.table.idmimports.user.familyName'),
|
6731
|
-
field: 'user.familyName',
|
6732
|
-
hidden: true,
|
6733
|
-
sorter: 4
|
6734
|
-
}, {
|
6735
|
-
title: t('backoffice.table.idmimports.startTime'),
|
6736
|
-
field: 'startTime',
|
6737
|
-
sorter: 3,
|
6738
|
-
type: 'unixTimeStamp',
|
6739
|
-
filter: 'interval'
|
6740
|
-
}, {
|
6741
|
-
title: t('backoffice.table.idmimports.endTime'),
|
6742
|
-
field: 'endTime',
|
6743
|
-
type: 'unixTimeStamp',
|
6744
|
-
sorter: 2,
|
6745
|
-
dateInSeconds: false,
|
6746
|
-
filter: 'interval'
|
6747
|
-
}, {
|
6748
|
-
title: t('backoffice.table.idmimports.lastUpdated'),
|
6749
|
-
field: 'lastUpdated',
|
6750
|
-
type: 'unixTimeStamp',
|
6751
|
-
sorter: 1,
|
6752
|
-
defaultSortOrder: 'descend'
|
6753
|
-
}, {
|
6754
|
-
title: t('backoffice.table.idmimports.state'),
|
6755
|
-
field: 'state',
|
6756
|
-
translationPrefix: 'idmimports.state',
|
6757
|
-
color: [{
|
6758
|
-
color: 'blue',
|
6759
|
-
onValues: ['InProgress'],
|
6760
|
-
operations: ['eq']
|
6761
|
-
}, {
|
6762
|
-
color: 'green',
|
6763
|
-
onValues: ['Done'],
|
6764
|
-
operations: ['eq']
|
6765
|
-
}, {
|
6766
|
-
color: 'orange',
|
6767
|
-
onValues: ['DoneWithWarning'],
|
6768
|
-
operations: ['eq']
|
6769
|
-
}, {
|
6770
|
-
color: 'red',
|
6771
|
-
onValues: ['Error'],
|
6772
|
-
operations: ['eq']
|
6773
|
-
}]
|
6774
|
-
}, {
|
6775
|
-
title: t('backoffice.table.idmimports.stateMessage'),
|
6776
|
-
field: 'stateMessage'
|
6777
|
-
}, {
|
6778
|
-
title: t('backoffice.table.idmimports.fullProgress'),
|
6779
|
-
field: 'fullProgress'
|
6780
|
-
}, {
|
6781
|
-
title: t('backoffice.table.idmimports.progress.modelsCurrent'),
|
6782
|
-
field: 'progress.modelsCurrent',
|
6783
|
-
hidden: true
|
6784
|
-
}, {
|
6785
|
-
title: t('backoffice.table.idmimports.progress.modelsTotal'),
|
6786
|
-
field: 'progress.modelsTotal',
|
6787
|
-
hidden: true
|
6788
|
-
}, {
|
6789
|
-
title: t('backoffice.table.idmimports.organizationId'),
|
6790
|
-
field: 'organizationId'
|
6791
|
-
}, {
|
6792
|
-
title: t('backoffice.table.idmimports.serverName'),
|
6793
|
-
field: 'serverName'
|
6794
|
-
}, {
|
6795
|
-
title: t('backoffice.table.idmimports.fileName'),
|
6796
|
-
field: 'fileName'
|
6797
|
-
}],
|
6798
|
-
filter: {
|
6799
|
-
search: {
|
6800
|
-
fields: ['_id', 'user.name', 'user.familyName', 'state', 'stateMessage', 'fullProgress', 'organizationId', 'serverName', 'fileName']
|
6801
|
-
}
|
6802
|
-
},
|
6803
|
-
apiInterface: {
|
6804
|
-
read: {
|
6805
|
-
list: '${catalogService}/idmImports',
|
6806
|
-
filterServerSide: true
|
6807
|
-
},
|
6808
|
-
"delete": '${catalogService}/idmImports'
|
6809
|
-
},
|
6810
|
-
mapping: {
|
6811
|
-
type: 'query',
|
6812
|
-
map: [{
|
6813
|
-
sourceField: '_id',
|
6814
|
-
targetField: '_id'
|
6815
|
-
}]
|
6816
|
-
}
|
6817
|
-
},
|
6818
6862
|
TableEmailTemplates: {
|
6819
6863
|
type: 'Table',
|
6820
6864
|
title: t('backoffice.table.emailtemplates.title'),
|
@@ -8052,6 +8096,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
8052
8096
|
}, {
|
8053
8097
|
name: ['iwoFurnOptions', 'iwoFurnWWS'],
|
8054
8098
|
label: t('backoffice.form.organizationdetails.items.iwoFurnWWS'),
|
8099
|
+
tabgroup: t('backoffice.subtitle.generally'),
|
8055
8100
|
type: 'select',
|
8056
8101
|
mode: 'single',
|
8057
8102
|
defaultValue: 'WINMAX',
|
@@ -14553,12 +14598,6 @@ var menu = [{
|
|
14553
14598
|
label: 'IDM',
|
14554
14599
|
icon: 'FileExcelOutlined',
|
14555
14600
|
items: [{
|
14556
|
-
id: 'TableIDMImports',
|
14557
|
-
path: '',
|
14558
|
-
label: 'backoffice.menu.items.label.TableIDMImports',
|
14559
|
-
permission: 'backoffice_idmimports',
|
14560
|
-
icon: 'HistoryOutlined'
|
14561
|
-
}, {
|
14562
14601
|
id: 'IFrameIDMImport',
|
14563
14602
|
path: 'import',
|
14564
14603
|
label: 'backoffice.menu.items.label.IFrameIDMImport',
|
@@ -14696,6 +14735,12 @@ var menu = [{
|
|
14696
14735
|
label: 'backoffice.table.taskstatusversioning.title.taskstatusothers',
|
14697
14736
|
icon: 'PlaySquareOutlined',
|
14698
14737
|
permission: 'backoffice_admin_taskstatus_others'
|
14738
|
+
}, {
|
14739
|
+
id: 'TableTaskStatusCEVSAPI',
|
14740
|
+
path: 'taskstatuscevsapi',
|
14741
|
+
label: 'backoffice.table.taskstatusversioning.title.taskstatuscevsapi',
|
14742
|
+
icon: 'SwapOutlined',
|
14743
|
+
permission: 'backoffice_admin_taskstatus_cevsapi'
|
14699
14744
|
}]
|
14700
14745
|
}, {
|
14701
14746
|
id: 'TableAllUsers',
|
@@ -17780,7 +17825,7 @@ function findByValue(value, options, selectMapping) {
|
|
17780
17825
|
LOG$a.debug('findByValue: option not found, add dummy option for current value', value, options);
|
17781
17826
|
//TODO: if we and server side filtering, the dummy option must be handled differently
|
17782
17827
|
option = {
|
17783
|
-
label: (selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.externalValue) == 'value' ? value : getCombinedValues(value, selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.label),
|
17828
|
+
label: (selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.externalValue) == 'value' ? value : typeof (selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.label) === 'function' ? selectMapping.label(value) : getCombinedValues(value, selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.label),
|
17784
17829
|
value: (selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.externalValue) == 'value' ? value : getCombinedValues(value, selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.value),
|
17785
17830
|
data: value,
|
17786
17831
|
isDummy: true
|
@@ -17794,7 +17839,7 @@ function findByValue(value, options, selectMapping) {
|
|
17794
17839
|
*/
|
17795
17840
|
function parseDataEntry(item, selectMapping) {
|
17796
17841
|
return {
|
17797
|
-
label: selectMapping ? getCombinedValues(item, selectMapping.label) : item,
|
17842
|
+
label: selectMapping ? typeof selectMapping.label === 'function' ? selectMapping.label(item) : getCombinedValues(item, selectMapping.label) : item,
|
17798
17843
|
value: selectMapping ? getCombinedValues(item, selectMapping.value) : item,
|
17799
17844
|
data: item
|
17800
17845
|
};
|
@@ -20406,7 +20451,6 @@ function ModalProgressBar(_ref) {
|
|
20406
20451
|
|
20407
20452
|
var LOG$7 = getLogger('Backoffice', 'Form');
|
20408
20453
|
var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
20409
|
-
var _state$configuration$2;
|
20410
20454
|
var id = _ref.id,
|
20411
20455
|
data = _ref.data,
|
20412
20456
|
onChange = _ref.onChange,
|
@@ -20599,6 +20643,12 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
20599
20643
|
};
|
20600
20644
|
});
|
20601
20645
|
};
|
20646
|
+
var getGeneralItems = function getGeneralItems() {
|
20647
|
+
var _state$selectedItems2;
|
20648
|
+
return (_state$selectedItems2 = state.selectedItems) === null || _state$selectedItems2 === void 0 ? void 0 : _state$selectedItems2.filter(function (item) {
|
20649
|
+
return item.showInAllTabs;
|
20650
|
+
});
|
20651
|
+
};
|
20602
20652
|
var renderFormItems = function renderFormItems(items) {
|
20603
20653
|
return /*#__PURE__*/jsx(Fragment, {
|
20604
20654
|
children: items.map(function (item) {
|
@@ -20623,29 +20673,17 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
20623
20673
|
var tabGroups = useMemo(function () {
|
20624
20674
|
return groupItemsByTabGroup();
|
20625
20675
|
}, [state.selectedItems]);
|
20676
|
+
var generalItems = useMemo(function () {
|
20677
|
+
return getGeneralItems();
|
20678
|
+
}, [state.selectedItems]);
|
20626
20679
|
|
20627
20680
|
// Create tab items dynamically
|
20628
20681
|
var tabItems = tabGroups.map(function (group, index) {
|
20629
20682
|
return {
|
20630
20683
|
key: group.tabGroup === 'default' ? '99' : index.toString(),
|
20631
20684
|
label: group.tabGroup === 'default' ? t('backoffice.menu.items.label.systemOther') : group.tabGroup,
|
20632
|
-
children: /*#__PURE__*/jsxs(
|
20633
|
-
|
20634
|
-
form: form,
|
20635
|
-
onFinish: onFinish,
|
20636
|
-
onFinishFailed: onFinishFailed,
|
20637
|
-
layout: "horizontal",
|
20638
|
-
onValuesChange: function onValuesChange(a, data) {
|
20639
|
-
state.updateHiddenRequiredDisabled(data, a);
|
20640
|
-
},
|
20641
|
-
labelCol: {
|
20642
|
-
span: 4
|
20643
|
-
},
|
20644
|
-
onFieldsChange: function onFieldsChange(changedFields) {
|
20645
|
-
if (changedFields[0] === undefined) return;
|
20646
|
-
state.changedFields.current.push(changedFields[0]);
|
20647
|
-
},
|
20648
|
-
children: [state.configuration.itemSelector && index === 0 && /*#__PURE__*/jsx(Form$1.Item, {
|
20685
|
+
children: /*#__PURE__*/jsxs("div", {
|
20686
|
+
children: [generalItems && renderFormItems(generalItems), generalItems && /*#__PURE__*/jsx(Divider, {}), state.configuration.itemSelector && index === 0 && /*#__PURE__*/jsx(Form$1.Item, {
|
20649
20687
|
name: state.configuration.itemSelector.name,
|
20650
20688
|
rules: state.getRules(state.configuration.itemSelector, state.data),
|
20651
20689
|
label: state.configuration.itemSelector.label ? t(state.configuration.itemSelector.label, state.configuration.itemSelector.label) : state.configuration.itemSelector.name,
|
@@ -20728,15 +20766,37 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
20728
20766
|
allowClear: true
|
20729
20767
|
})
|
20730
20768
|
}), /*#__PURE__*/jsx(Divider, {})]
|
20731
|
-
}), (
|
20732
|
-
|
20733
|
-
|
20734
|
-
|
20735
|
-
|
20736
|
-
|
20737
|
-
|
20769
|
+
}), /*#__PURE__*/jsx(Form$1, {
|
20770
|
+
autoComplete: "off",
|
20771
|
+
form: form,
|
20772
|
+
onFinish: onFinish,
|
20773
|
+
onFinishFailed: onFinishFailed,
|
20774
|
+
layout: "horizontal",
|
20775
|
+
onValuesChange: function onValuesChange(a, data) {
|
20776
|
+
state.updateHiddenRequiredDisabled(data, a);
|
20777
|
+
},
|
20778
|
+
labelCol: {
|
20779
|
+
span: 4
|
20780
|
+
},
|
20781
|
+
onFieldsChange: function onFieldsChange(changedFields) {
|
20782
|
+
if (changedFields[0] === undefined) return;
|
20783
|
+
state.changedFields.current.push(changedFields[0]);
|
20784
|
+
},
|
20785
|
+
children: /*#__PURE__*/jsx(Tabs, {
|
20786
|
+
onChange: setActiveTabKey,
|
20787
|
+
activeKey: activeTabKey,
|
20788
|
+
destroyInactiveTabPane: false,
|
20789
|
+
children: _toConsumableArray(tabItems).sort(function (a, b) {
|
20790
|
+
return a.key.localeCompare(b.key);
|
20791
|
+
}).map(function (item) {
|
20792
|
+
return /*#__PURE__*/jsx(Tabs.TabPane, {
|
20793
|
+
tab: item.label,
|
20794
|
+
forceRender: true,
|
20795
|
+
children: item.children
|
20796
|
+
}, item.key);
|
20797
|
+
})
|
20738
20798
|
})
|
20739
|
-
})]
|
20799
|
+
}, state.selectedItemsIndex.toString())]
|
20740
20800
|
}), state.configuration.showProgressBar && /*#__PURE__*/jsx(ModalProgressBar, {
|
20741
20801
|
isOpen: state.progressBarOpen,
|
20742
20802
|
percent: state.progressBarPercentage
|
@@ -31536,7 +31596,9 @@ var PackageSelector = function PackageSelector(_ref) {
|
|
31536
31596
|
read: "".concat(enricherService, "/packages?fields=name;_id;isoLanguageIds;isApi;organizationId&organizationId=").concat(organizationId)
|
31537
31597
|
},
|
31538
31598
|
selectMapping: {
|
31539
|
-
label:
|
31599
|
+
label: function label(data) {
|
31600
|
+
return "".concat(data.name, " ").concat(data.isApi ? '(CE)' : '');
|
31601
|
+
},
|
31540
31602
|
value: '${_id}'
|
31541
31603
|
},
|
31542
31604
|
title: t('backoffice.menu.items.label.IDMEnricherEditorTablePackages'),
|
@@ -31548,7 +31610,17 @@ var PackageSelector = function PackageSelector(_ref) {
|
|
31548
31610
|
style: {
|
31549
31611
|
width: 200
|
31550
31612
|
},
|
31551
|
-
popupClassName: 'ag-custom-component-popup'
|
31613
|
+
popupClassName: 'ag-custom-component-popup',
|
31614
|
+
prefix: !(selectedPackage !== null && selectedPackage !== void 0 && selectedPackage.organizationId) ? undefined : selectedPackage.organizationId === organizationId ? /*#__PURE__*/jsx(EditOutlined, {}) : /*#__PURE__*/jsx(EyeOutlined, {}),
|
31615
|
+
optionRender: function optionRender(option) {
|
31616
|
+
return /*#__PURE__*/jsxs(Space, {
|
31617
|
+
children: [/*#__PURE__*/jsx("div", {
|
31618
|
+
children: option.data.data.organizationId === organizationId ? /*#__PURE__*/jsx(EditOutlined, {}) : /*#__PURE__*/jsx(EyeOutlined, {})
|
31619
|
+
}), /*#__PURE__*/jsx("div", {
|
31620
|
+
children: option.label
|
31621
|
+
})]
|
31622
|
+
});
|
31623
|
+
}
|
31552
31624
|
});
|
31553
31625
|
};
|
31554
31626
|
var PackageSelector$1 = observer(PackageSelector);
|
@@ -31863,7 +31935,7 @@ var useTools = function useTools(_ref) {
|
|
31863
31935
|
root.contentStore.rightToolBar.selectTool('info');
|
31864
31936
|
root.contentStore.rightToolBar.hidden = false;
|
31865
31937
|
}
|
31866
|
-
}, [root.contentStore.rightToolBar]);
|
31938
|
+
}, [root.contentStore.rightToolBar.addTools, root.contentStore.rightToolBar.selectTool, root.contentStore.rightToolBar.hidden]);
|
31867
31939
|
var addSecondaryTables = useCallback(function () {
|
31868
31940
|
var _root$contentStore$bo;
|
31869
31941
|
for (var _len = arguments.length, tools = new Array(_len), _key = 0; _key < _len; _key++) {
|
@@ -31877,18 +31949,22 @@ var useTools = function useTools(_ref) {
|
|
31877
31949
|
}, tool);
|
31878
31950
|
});
|
31879
31951
|
(_root$contentStore$bo = root.contentStore.bottomToolBar).addTools.apply(_root$contentStore$bo, _toConsumableArray(newSecondaryTables));
|
31880
|
-
setSecondaryTables(
|
31881
|
-
|
31952
|
+
setSecondaryTables(function (prev) {
|
31953
|
+
return [].concat(_toConsumableArray(prev), _toConsumableArray(newSecondaryTables));
|
31954
|
+
});
|
31955
|
+
}, [root.contentStore.bottomToolBar.addTools]);
|
31882
31956
|
var removeSecondaryTables = useCallback(function () {
|
31883
31957
|
var _root$contentStore$bo2;
|
31884
31958
|
for (var _len2 = arguments.length, ids = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
31885
31959
|
ids[_key2] = arguments[_key2];
|
31886
31960
|
}
|
31887
31961
|
(_root$contentStore$bo2 = root.contentStore.bottomToolBar).removeTools.apply(_root$contentStore$bo2, ids);
|
31888
|
-
setSecondaryTables(
|
31889
|
-
return
|
31890
|
-
|
31891
|
-
|
31962
|
+
setSecondaryTables(function (prev) {
|
31963
|
+
return prev.filter(function (table) {
|
31964
|
+
return !ids.includes(table.id);
|
31965
|
+
});
|
31966
|
+
});
|
31967
|
+
}, [root.contentStore.bottomToolBar.removeTools]);
|
31892
31968
|
var updateConfigurator = useCallback(function () {
|
31893
31969
|
var parameters = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
31894
31970
|
root.contentStore.rightToolBar.addTools({
|
@@ -32001,7 +32077,7 @@ var TableGroups = observer(function () {
|
|
32001
32077
|
update: viewOnly ? undefined : apiConfig.enricherService + '/packages/${packageId}/groups/${_id}',
|
32002
32078
|
bulk: apiConfig.enricherService + '/packages/${packageId}/groups/bulk'
|
32003
32079
|
};
|
32004
|
-
}, []);
|
32080
|
+
}, [viewOnly]);
|
32005
32081
|
var configuration = useMemo(function () {
|
32006
32082
|
return {
|
32007
32083
|
type: 'dotnetSSM',
|
@@ -32126,135 +32202,138 @@ function PublishCustomCell (_ref) {
|
|
32126
32202
|
loading = _React$useState2[0],
|
32127
32203
|
isLoading = _React$useState2[1];
|
32128
32204
|
var publishedData = (_data$published = data.published) === null || _data$published === void 0 ? void 0 : _data$published[organizationId];
|
32205
|
+
var isPublishing = (publishedData === null || publishedData === void 0 ? void 0 : publishedData.publishing) || loading;
|
32206
|
+
var isPublished = publishedData && !isPublishing;
|
32129
32207
|
var isReleaseWithdrawn = !!((_data$removedOrganiza = data.removedOrganizationIds) !== null && _data$removedOrganiza !== void 0 && _data$removedOrganiza.find(function (id) {
|
32130
32208
|
return id === organizationId;
|
32131
32209
|
}));
|
32132
|
-
var unpublishedChanges = hasUnpublishedChanges(publishedData === null || publishedData === void 0 ? void 0 : publishedData.publishDate,
|
32133
|
-
var disabled = !(data !== null && data !== void 0 && data.basedCatalogId) && !(data !== null && data !== void 0 && data.basedPackageId) || !(data !== null && data !== void 0 && data.name);
|
32210
|
+
var unpublishedChanges = hasUnpublishedChanges(publishedData === null || publishedData === void 0 ? void 0 : publishedData.publishDate, data === null || data === void 0 ? void 0 : data.lastUpdatedDate);
|
32211
|
+
var disabled = isPublishing || !(data !== null && data !== void 0 && data.basedCatalogId) && !(data !== null && data !== void 0 && data.basedPackageId) || !(data !== null && data !== void 0 && data.name);
|
32134
32212
|
var _onChange = /*#__PURE__*/function () {
|
32135
32213
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(publish) {
|
32136
|
-
var
|
32214
|
+
var response, _errorText, errorText, _json$error, json;
|
32137
32215
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
32138
32216
|
while (1) switch (_context.prev = _context.next) {
|
32139
32217
|
case 0:
|
32140
32218
|
isLoading(true);
|
32141
|
-
|
32142
|
-
modalState.showLoadingModal(t("backoffice.idmEnricher.packages.label.".concat(publish ? 'publishing' : 'unpublishing')));
|
32143
|
-
}, 3000);
|
32144
|
-
_context.prev = 2;
|
32219
|
+
_context.prev = 1;
|
32145
32220
|
if (!publish) {
|
32146
|
-
_context.next =
|
32221
|
+
_context.next = 8;
|
32147
32222
|
break;
|
32148
32223
|
}
|
32149
|
-
_context.next =
|
32224
|
+
_context.next = 5;
|
32150
32225
|
return context === null || context === void 0 ? void 0 : context.updateServerData(data, {
|
32151
32226
|
update: apiConfig.enricherService + '/packages/${_id}/publish?organizationId=' + organizationId,
|
32152
32227
|
usePut: true
|
32153
32228
|
}, undefined, true);
|
32154
|
-
case
|
32229
|
+
case 5:
|
32155
32230
|
response = _context.sent;
|
32156
|
-
_context.next = 12;
|
32157
|
-
break;
|
32158
|
-
case 9:
|
32159
32231
|
_context.next = 11;
|
32232
|
+
break;
|
32233
|
+
case 8:
|
32234
|
+
_context.next = 10;
|
32160
32235
|
return context === null || context === void 0 ? void 0 : context.updateServerData(data, {
|
32161
32236
|
update: apiConfig.enricherService + '/packages/${_id}/unpublish?organizationId=' + organizationId,
|
32162
32237
|
usePut: true
|
32163
32238
|
}, undefined, true);
|
32164
|
-
case
|
32239
|
+
case 10:
|
32165
32240
|
response = _context.sent;
|
32166
|
-
case
|
32167
|
-
clearTimeout(loadingTimeout);
|
32241
|
+
case 11:
|
32168
32242
|
if (!(response.status == 202)) {
|
32169
|
-
_context.next =
|
32243
|
+
_context.next = 15;
|
32170
32244
|
break;
|
32171
32245
|
}
|
32172
32246
|
modalState.showWarningModal(t("backoffice.idmEnricher.packages.label.warning.".concat(publish ? 'publishing' : 'unpublishing')));
|
32173
|
-
_context.next =
|
32247
|
+
_context.next = 32;
|
32174
32248
|
break;
|
32175
|
-
case
|
32249
|
+
case 15:
|
32176
32250
|
if (!(response.status == 200)) {
|
32177
|
-
_context.next =
|
32251
|
+
_context.next = 19;
|
32178
32252
|
break;
|
32179
32253
|
}
|
32180
32254
|
modalState.closeModal();
|
32181
|
-
_context.next =
|
32255
|
+
_context.next = 32;
|
32182
32256
|
break;
|
32183
|
-
case
|
32184
|
-
_context.prev =
|
32185
|
-
_context.next =
|
32257
|
+
case 19:
|
32258
|
+
_context.prev = 19;
|
32259
|
+
_context.next = 22;
|
32186
32260
|
return response.json();
|
32187
|
-
case
|
32261
|
+
case 22:
|
32188
32262
|
json = _context.sent;
|
32189
|
-
errorText = json.error;
|
32190
|
-
_context.next =
|
32263
|
+
errorText = (_json$error = json.error) !== null && _json$error !== void 0 ? _json$error : json.Error;
|
32264
|
+
_context.next = 31;
|
32191
32265
|
break;
|
32192
|
-
case
|
32193
|
-
_context.prev =
|
32194
|
-
_context.t0 = _context["catch"](
|
32195
|
-
_context.next =
|
32266
|
+
case 26:
|
32267
|
+
_context.prev = 26;
|
32268
|
+
_context.t0 = _context["catch"](19);
|
32269
|
+
_context.next = 30;
|
32196
32270
|
return response.text();
|
32197
|
-
case
|
32271
|
+
case 30:
|
32198
32272
|
errorText = _context.sent;
|
32199
|
-
case
|
32273
|
+
case 31:
|
32200
32274
|
throw new Error((_errorText = errorText) !== null && _errorText !== void 0 ? _errorText : "Server error (".concat(response.status, ")"));
|
32201
|
-
case
|
32275
|
+
case 32:
|
32202
32276
|
context === null || context === void 0 || context.reset({
|
32203
32277
|
context: context,
|
32204
32278
|
api: api
|
32205
32279
|
});
|
32206
|
-
_context.next =
|
32280
|
+
_context.next = 38;
|
32207
32281
|
break;
|
32208
|
-
case
|
32209
|
-
_context.prev =
|
32210
|
-
_context.t1 = _context["catch"](
|
32282
|
+
case 35:
|
32283
|
+
_context.prev = 35;
|
32284
|
+
_context.t1 = _context["catch"](1);
|
32211
32285
|
modalState.showErrorModal("Error on ".concat(publish ? 'publish' : 'unpublish', ": ").concat(_context.t1 instanceof Error ? _context.t1.message : String(_context.t1)));
|
32212
|
-
case
|
32213
|
-
_context.prev =
|
32286
|
+
case 38:
|
32287
|
+
_context.prev = 38;
|
32214
32288
|
isLoading(false);
|
32215
|
-
return _context.finish(
|
32216
|
-
case
|
32289
|
+
return _context.finish(38);
|
32290
|
+
case 41:
|
32217
32291
|
case "end":
|
32218
32292
|
return _context.stop();
|
32219
32293
|
}
|
32220
|
-
}, _callee, null, [[
|
32294
|
+
}, _callee, null, [[1, 35, 38, 41], [19, 26]]);
|
32221
32295
|
}));
|
32222
32296
|
return function onChange(_x) {
|
32223
32297
|
return _ref2.apply(this, arguments);
|
32224
32298
|
};
|
32225
32299
|
}();
|
32226
32300
|
if (data.__isEmpty) return '';
|
32227
|
-
return /*#__PURE__*/
|
32228
|
-
|
32229
|
-
children: /*#__PURE__*/
|
32230
|
-
|
32231
|
-
children:
|
32232
|
-
|
32233
|
-
|
32234
|
-
|
32235
|
-
|
32236
|
-
|
32237
|
-
|
32238
|
-
|
32239
|
-
|
32240
|
-
|
32241
|
-
|
32242
|
-
|
32243
|
-
|
32244
|
-
|
32245
|
-
icon: /*#__PURE__*/jsx(ReloadOutlined, {}),
|
32246
|
-
onClick: function onClick() {
|
32247
|
-
return _onChange(true);
|
32248
|
-
}
|
32249
|
-
})
|
32250
|
-
}), isReleaseWithdrawn && /*#__PURE__*/jsx(Tooltip, {
|
32251
|
-
title: t('backoffice.idmEnricher.packages.label.releaseWithdrawn'),
|
32252
|
-
children: /*#__PURE__*/jsx(Button$1, {
|
32253
|
-
shape: "circle",
|
32254
|
-
icon: /*#__PURE__*/jsx(WarningOutlined, {})
|
32301
|
+
return /*#__PURE__*/jsxs(Space$1, {
|
32302
|
+
size: "middle",
|
32303
|
+
children: [/*#__PURE__*/jsx(Tooltip, {
|
32304
|
+
title: disabled ? '' : !!isPublished ? t('backoffice.idmEnricher.packages.label.unpublish') : t('backoffice.idmEnricher.packages.label.publish'),
|
32305
|
+
children: /*#__PURE__*/jsx(Checkbox$1, {
|
32306
|
+
checked: !!isPublished,
|
32307
|
+
disabled: disabled,
|
32308
|
+
indeterminate: unpublishedChanges,
|
32309
|
+
onChange: function onChange(e) {
|
32310
|
+
return _onChange(e.target.checked);
|
32311
|
+
}
|
32312
|
+
})
|
32313
|
+
}), isPublishing && /*#__PURE__*/jsx(Tooltip, {
|
32314
|
+
title: t('backoffice.idmEnricher.packages.label.currentlyPublishing'),
|
32315
|
+
children: /*#__PURE__*/jsx(Button$1, {
|
32316
|
+
shape: "circle",
|
32317
|
+
icon: /*#__PURE__*/jsx(SyncOutlined, {
|
32318
|
+
spin: true
|
32255
32319
|
})
|
32256
|
-
})
|
32257
|
-
})
|
32320
|
+
})
|
32321
|
+
}), unpublishedChanges && !isPublishing && /*#__PURE__*/jsx(Tooltip, {
|
32322
|
+
title: t('backoffice.idmEnricher.packages.label.unpublishedChanges'),
|
32323
|
+
children: /*#__PURE__*/jsx(Button$1, {
|
32324
|
+
shape: "circle",
|
32325
|
+
icon: /*#__PURE__*/jsx(ReloadOutlined, {}),
|
32326
|
+
onClick: function onClick() {
|
32327
|
+
return _onChange(true);
|
32328
|
+
}
|
32329
|
+
})
|
32330
|
+
}), isReleaseWithdrawn && !isPublishing && /*#__PURE__*/jsx(Tooltip, {
|
32331
|
+
title: t('backoffice.idmEnricher.packages.label.releaseWithdrawn'),
|
32332
|
+
children: /*#__PURE__*/jsx(Button$1, {
|
32333
|
+
shape: "circle",
|
32334
|
+
icon: /*#__PURE__*/jsx(WarningOutlined, {})
|
32335
|
+
})
|
32336
|
+
})]
|
32258
32337
|
});
|
32259
32338
|
}
|
32260
32339
|
function hasUnpublishedChanges(publishDateString, lastUpdatedDateString) {
|
@@ -32599,38 +32678,75 @@ var TablePackages = observer(function () {
|
|
32599
32678
|
organizationDisplayText: organizationDisplayText
|
32600
32679
|
};
|
32601
32680
|
}, [organizationId, organizationDisplayText]);
|
32681
|
+
var isEditable = useCallback(
|
32682
|
+
//is only editable in the organization where the package was created
|
32683
|
+
function (params) {
|
32684
|
+
var _params$data, _params$data2;
|
32685
|
+
return ((_params$data = params.data) === null || _params$data === void 0 ? void 0 : _params$data.organizationId) === organizationId || !((_params$data2 = params.data) !== null && _params$data2 !== void 0 && _params$data2._id);
|
32686
|
+
}, [organizationId]);
|
32687
|
+
var canOpen = useCallback(function (_ref) {
|
32688
|
+
var _selectedNodes$0$data, _selectedNodes$0$data2, _selectedNodes$0$data3, _selectedNodes$0$data4;
|
32689
|
+
var selectedNodes = _ref.selectedNodes;
|
32690
|
+
return (
|
32691
|
+
//can be opened if a package or catalog is selected, a name is defined and the package ist not currently in the process of publishing
|
32692
|
+
(((_selectedNodes$0$data = selectedNodes[0].data) === null || _selectedNodes$0$data === void 0 ? void 0 : _selectedNodes$0$data.basedCatalogId) || ((_selectedNodes$0$data2 = selectedNodes[0].data) === null || _selectedNodes$0$data2 === void 0 ? void 0 : _selectedNodes$0$data2.basedPackageId)) && ((_selectedNodes$0$data3 = selectedNodes[0].data) === null || _selectedNodes$0$data3 === void 0 ? void 0 : _selectedNodes$0$data3.name) && !((_selectedNodes$0$data4 = selectedNodes[0].data) !== null && _selectedNodes$0$data4 !== void 0 && (_selectedNodes$0$data4 = _selectedNodes$0$data4.published) !== null && _selectedNodes$0$data4 !== void 0 && (_selectedNodes$0$data4 = _selectedNodes$0$data4[organizationId]) !== null && _selectedNodes$0$data4 !== void 0 && _selectedNodes$0$data4.publishing)
|
32693
|
+
);
|
32694
|
+
}, [organizationId]);
|
32695
|
+
var canDownload = useCallback(function (_ref2) {
|
32696
|
+
var _selectedNodes$0$data5, _selectedNodes$0$data6, _selectedNodes$0$data7;
|
32697
|
+
var selectedNodes = _ref2.selectedNodes;
|
32698
|
+
return (
|
32699
|
+
//can be downloaded if a package is published and not a configurator light package (isApi is false)
|
32700
|
+
((_selectedNodes$0$data5 = selectedNodes[0].data) === null || _selectedNodes$0$data5 === void 0 || (_selectedNodes$0$data5 = _selectedNodes$0$data5.published) === null || _selectedNodes$0$data5 === void 0 ? void 0 : _selectedNodes$0$data5[organizationId]) && !((_selectedNodes$0$data6 = selectedNodes[0].data) !== null && _selectedNodes$0$data6 !== void 0 && (_selectedNodes$0$data6 = _selectedNodes$0$data6.published) !== null && _selectedNodes$0$data6 !== void 0 && (_selectedNodes$0$data6 = _selectedNodes$0$data6[organizationId]) !== null && _selectedNodes$0$data6 !== void 0 && _selectedNodes$0$data6.publishing) && !((_selectedNodes$0$data7 = selectedNodes[0].data) !== null && _selectedNodes$0$data7 !== void 0 && _selectedNodes$0$data7.isApi)
|
32701
|
+
);
|
32702
|
+
}, [organizationId]);
|
32703
|
+
var getOpenIcon = useCallback(function (params) {
|
32704
|
+
return params.selectedNodes[0].data && isEditable({
|
32705
|
+
data: params.selectedNodes[0].data
|
32706
|
+
}) ? /*#__PURE__*/jsx(EditOutlined$1, {}) : /*#__PURE__*/jsx(EyeOutlined$1, {});
|
32707
|
+
}, [isEditable]);
|
32708
|
+
var getOpenTooltip = useCallback(function (params) {
|
32709
|
+
return canOpen(params) && (!params.selectedNodes[0].data || !isEditable({
|
32710
|
+
data: params.selectedNodes[0].data
|
32711
|
+
})) ? t('backoffice.idmEnricher.packages.edit.tooltip.readonly') : undefined;
|
32712
|
+
}, [canOpen, isEditable, t]);
|
32713
|
+
var getDownloadTooltip = useCallback(function (params) {
|
32714
|
+
var _params$selectedNodes;
|
32715
|
+
return (_params$selectedNodes = params.selectedNodes[0].data) !== null && _params$selectedNodes !== void 0 && _params$selectedNodes.isApi ? t('backoffice.idmEnricher.packages.download.tooltip.isApi') : undefined;
|
32716
|
+
}, [t]);
|
32602
32717
|
var rowActions = useMemo(function () {
|
32603
32718
|
return [{
|
32604
|
-
icon:
|
32605
|
-
|
32606
|
-
|
32607
|
-
|
32719
|
+
icon: getOpenIcon,
|
32720
|
+
tooltip: getOpenTooltip,
|
32721
|
+
action: function action(_ref3) {
|
32722
|
+
var _selectedNodes$0$data8;
|
32723
|
+
var selectedNodes = _ref3.selectedNodes;
|
32724
|
+
return setSelectedPackage((_selectedNodes$0$data8 = selectedNodes[0].data) === null || _selectedNodes$0$data8 === void 0 ? void 0 : _selectedNodes$0$data8._id, ['renaming', 'features'], './', true);
|
32608
32725
|
},
|
32609
|
-
disabled: function disabled(
|
32610
|
-
|
32611
|
-
return !selectedNodes[0].data.basedCatalogId && !selectedNodes[0].data.basedPackageId || !selectedNodes[0].data.name;
|
32726
|
+
disabled: function disabled(params) {
|
32727
|
+
return !canOpen(params);
|
32612
32728
|
}
|
32613
32729
|
}, {
|
32614
32730
|
icon: /*#__PURE__*/jsx(DownloadOutlined, {}),
|
32615
|
-
|
32616
|
-
|
32617
|
-
|
32618
|
-
return !((_selectedNodes$0$data = selectedNodes[0].data.published) !== null && _selectedNodes$0$data !== void 0 && _selectedNodes$0$data[organizationId]);
|
32731
|
+
tooltip: getDownloadTooltip,
|
32732
|
+
disabled: function disabled(params) {
|
32733
|
+
return !canDownload(params);
|
32619
32734
|
},
|
32620
32735
|
action: function () {
|
32621
32736
|
var _action = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref4) {
|
32622
|
-
var
|
32737
|
+
var _selectedNodes$0$data9;
|
32738
|
+
var selectedNodes, url, alertTimeout, _selectedNodes$0$data10;
|
32623
32739
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
32624
32740
|
while (1) switch (_context.prev = _context.next) {
|
32625
32741
|
case 0:
|
32626
32742
|
selectedNodes = _ref4.selectedNodes;
|
32627
|
-
url = apiConfig.enricherService + '/packages/' + selectedNodes[0].data._id + '/catalog'; // Show modal if download takes more than 3 seconds
|
32743
|
+
url = apiConfig.enricherService + '/packages/' + ((_selectedNodes$0$data9 = selectedNodes[0].data) === null || _selectedNodes$0$data9 === void 0 ? void 0 : _selectedNodes$0$data9._id) + '/catalog'; // Show modal if download takes more than 3 seconds
|
32628
32744
|
alertTimeout = setTimeout(function () {
|
32629
32745
|
showLoadingModal(t('backoffice.idmEnricher.export.modaltext'));
|
32630
32746
|
}, 3000);
|
32631
32747
|
_context.prev = 3;
|
32632
32748
|
_context.next = 6;
|
32633
|
-
return downloadFile(url, root.dataStore.jwt, 'application/xml', selectedNodes[0].data.name + '.xml');
|
32749
|
+
return downloadFile(url, root.dataStore.jwt, 'application/xml', ((_selectedNodes$0$data10 = selectedNodes[0].data) === null || _selectedNodes$0$data10 === void 0 ? void 0 : _selectedNodes$0$data10.name) + '.xml');
|
32634
32750
|
case 6:
|
32635
32751
|
closeModal();
|
32636
32752
|
_context.next = 12;
|
@@ -32656,7 +32772,7 @@ var TablePackages = observer(function () {
|
|
32656
32772
|
return action;
|
32657
32773
|
}()
|
32658
32774
|
}];
|
32659
|
-
}, [apiConfig.enricherService, root.dataStore.jwt]);
|
32775
|
+
}, [apiConfig.enricherService, root.dataStore.jwt, canOpen, canDownload, getOpenIcon, getOpenTooltip, getDownloadTooltip, setSelectedPackage, showLoadingModal, showErrorModal, closeModal, t]);
|
32660
32776
|
var apiInterface = useMemo(function () {
|
32661
32777
|
return {
|
32662
32778
|
read: apiConfig.enricherService + '/packages?organizationId=' + organizationId,
|
@@ -32667,10 +32783,6 @@ var TablePackages = observer(function () {
|
|
32667
32783
|
bulk: apiConfig.enricherService + '/packages/bulk?organizationId=' + organizationId
|
32668
32784
|
};
|
32669
32785
|
}, [apiConfig.enricherService, organizationId]);
|
32670
|
-
var isEditable = useCallback(function (params) {
|
32671
|
-
var _params$data, _params$data2;
|
32672
|
-
return ((_params$data = params.data) === null || _params$data === void 0 ? void 0 : _params$data.organizationId) === organizationId || !((_params$data2 = params.data) !== null && _params$data2 !== void 0 && _params$data2._id);
|
32673
|
-
}, [organizationId]);
|
32674
32786
|
var configuration = useMemo(function () {
|
32675
32787
|
return {
|
32676
32788
|
type: 'dotnetSSM',
|
@@ -32798,7 +32910,7 @@ var TablePackages = observer(function () {
|
|
32798
32910
|
customParams: {
|
32799
32911
|
nameField: 'allowedOrganizationsDisplayTexts',
|
32800
32912
|
apiInterface: {
|
32801
|
-
read: apiConfig.authService + "/
|
32913
|
+
read: apiConfig.authService + "/organizations/".concat(organizationId, "/related")
|
32802
32914
|
},
|
32803
32915
|
lookupValue: 'displayName',
|
32804
32916
|
lookupKey: '_id',
|
@@ -32815,7 +32927,8 @@ var TablePackages = observer(function () {
|
|
32815
32927
|
headerName: 'backoffice.idmEnricher.general.label.lastUpdatedDate',
|
32816
32928
|
field: 'lastUpdatedDate',
|
32817
32929
|
cellDataType: 'dateString',
|
32818
|
-
editable: false
|
32930
|
+
editable: false,
|
32931
|
+
sort: 'desc'
|
32819
32932
|
}, {
|
32820
32933
|
headerName: 'backoffice.idmEnricher.general.label.createdDate',
|
32821
32934
|
field: 'createdDate',
|
@@ -32913,7 +33026,7 @@ var TableProperties = observer(function () {
|
|
32913
33026
|
update: viewOnly ? undefined : apiConfig.enricherService + '/packages/${packageId}/properties/${_id}',
|
32914
33027
|
bulk: apiConfig.enricherService + '/packages/${packageId}/properties/bulk'
|
32915
33028
|
};
|
32916
|
-
}, []);
|
33029
|
+
}, [viewOnly]);
|
32917
33030
|
var configuration = useMemo(function () {
|
32918
33031
|
return {
|
32919
33032
|
type: 'dotnetSSM',
|
@@ -33660,7 +33773,7 @@ var SeriesSelector$2 = function SeriesSelector(_ref) {
|
|
33660
33773
|
read: enricherService + '/packages/' + packageId + '/' + dataSet + "/series?fields=seriesName[".concat(i18n.language.toLocaleUpperCase(), "];_id;serieNo;pricefeaturegroups;pricefeaturegroupsDisplayTexts;pricefeaturegroupsKeys;pricefeaturegroupsKeysDisplayTexts")
|
33661
33774
|
},
|
33662
33775
|
selectMapping: {
|
33663
|
-
label: "${seriesName.".concat(i18n.language.toLocaleUpperCase(), "}"),
|
33776
|
+
label: "${seriesName.".concat(i18n.language.toLocaleUpperCase(), "} (${serieNo})"),
|
33664
33777
|
value: '${serieNo}'
|
33665
33778
|
},
|
33666
33779
|
autoSelectFirst: true,
|
@@ -33794,7 +33907,7 @@ var RenamingTable = observer(function (_ref) {
|
|
33794
33907
|
update: viewOnly ? undefined : apiConfig.enricherService + '/packages/${packageId}/renamings/' + type + '/${_id}',
|
33795
33908
|
bulk: apiConfig.enricherService + '/packages/${packageId}/renamings/' + type + '/bulk'
|
33796
33909
|
};
|
33797
|
-
}, [type]);
|
33910
|
+
}, [type, viewOnly]);
|
33798
33911
|
var configuration = useMemo(function () {
|
33799
33912
|
return {
|
33800
33913
|
type: 'dotnetSSM',
|
@@ -34377,7 +34490,7 @@ var ExclusivityTable = observer(function (_ref) {
|
|
34377
34490
|
read: !['eitems'].includes(type) ? apiConfig.enricherService + '/packages/${packageId}/exclusivities/' + subType : apiConfig.enricherService + '/packages/${packageId}/exclusivities/' + subType + '/${subTypeId}/' + listType,
|
34378
34491
|
update: viewOnly ? undefined : !['eitems', 'eoptions'].includes(type) ? apiConfig.enricherService + '/packages/${packageId}/exclusivities/' + subType + '/' + patchId : type === 'eoptions' ? apiConfig.enricherService + '/packages/${packageId}/exclusivities/' + subType + '/' + patchId + '?featureNos=' + patchId2 : apiConfig.enricherService + '/packages/${packageId}/exclusivities/' + subType + '/${subTypeId}/' + listType + '/' + patchId
|
34379
34492
|
};
|
34380
|
-
}, [type]);
|
34493
|
+
}, [type, viewOnly]);
|
34381
34494
|
var oldDataRef = useRef();
|
34382
34495
|
var applicationData = useMemo(function () {
|
34383
34496
|
if (type === 'eitems' && !selectedSerie) {
|
@@ -34478,7 +34591,7 @@ var TableTabGroups = observer(function () {
|
|
34478
34591
|
update: viewOnly ? undefined : apiConfig.enricherService + '/packages/${packageId}/tabgroups/${_id}',
|
34479
34592
|
bulk: apiConfig.enricherService + '/packages/${packageId}/tabgroups/bulk'
|
34480
34593
|
};
|
34481
|
-
}, []);
|
34594
|
+
}, [viewOnly]);
|
34482
34595
|
var configuration = useMemo(function () {
|
34483
34596
|
return {
|
34484
34597
|
type: 'dotnetSSM',
|
@@ -34594,7 +34707,7 @@ var TablePartlistPos = observer(function () {
|
|
34594
34707
|
update: viewOnly ? undefined : apiConfig.enricherService + '/packages/${packageId}/partlistpos/${_id}',
|
34595
34708
|
bulk: apiConfig.enricherService + '/packages/${packageId}/partlistpos/bulk'
|
34596
34709
|
};
|
34597
|
-
}, []);
|
34710
|
+
}, [viewOnly]);
|
34598
34711
|
var configuration = useMemo(function () {
|
34599
34712
|
return {
|
34600
34713
|
type: 'dotnetSSM',
|
@@ -34760,7 +34873,7 @@ var formatListValue = function formatListValue(values, type, locale) {
|
|
34760
34873
|
/**
|
34761
34874
|
* Converts an internal value to its display representation
|
34762
34875
|
* For factors: keeps the decimal value
|
34763
|
-
* For discounts: converts to percentage (e.g., 0.
|
34876
|
+
* For discounts: converts from negative factor to percentage string (e.g., "0.95" -> "5")
|
34764
34877
|
* @param value - The internal value to convert
|
34765
34878
|
* @param type - The type of price modification
|
34766
34879
|
* @returns The display value as string
|
@@ -34768,13 +34881,13 @@ var formatListValue = function formatListValue(values, type, locale) {
|
|
34768
34881
|
var convertToDisplayValue = function convertToDisplayValue(value, type) {
|
34769
34882
|
if (type === 'factor') return value;
|
34770
34883
|
var numValue = parseFloat(value);
|
34771
|
-
return isNaN(numValue) ? '0' : Math.round(numValue * 100).toString();
|
34884
|
+
return isNaN(numValue) ? '0' : Math.round((1 - numValue) * 100).toString();
|
34772
34885
|
};
|
34773
34886
|
|
34774
34887
|
/**
|
34775
34888
|
* Converts a display value back to its internal representation
|
34776
34889
|
* For factors: keeps the input value
|
34777
|
-
* For discounts: converts
|
34890
|
+
* For discounts: converts the input as a negative factor (e.g., "5" -> "0.95" for a 5% discount)
|
34778
34891
|
* @param value - The display value to convert
|
34779
34892
|
* @param type - The type of price modification
|
34780
34893
|
* @returns The internal value as string
|
@@ -34782,7 +34895,7 @@ var convertToDisplayValue = function convertToDisplayValue(value, type) {
|
|
34782
34895
|
var convertFromDisplayValue = function convertFromDisplayValue(value, type) {
|
34783
34896
|
if (type === 'factor') return value;
|
34784
34897
|
var numValue = parseInt(value, 10);
|
34785
|
-
return isNaN(numValue) ? '0' : (numValue / 100).toString();
|
34898
|
+
return isNaN(numValue) ? '0' : (1 - numValue / 100).toString();
|
34786
34899
|
};
|
34787
34900
|
|
34788
34901
|
/**
|
@@ -35674,7 +35787,7 @@ var Prices = observer(function (_ref) {
|
|
35674
35787
|
read: apiConfig.enricherService + '/packages/${packageId}/pricelists/${pricelistId}/serie/${serieNo}/prices' + (onlyManual ? '?onlyManual=true' : ''),
|
35675
35788
|
update: viewOnly ? undefined : apiConfig.enricherService + '/packages/${packageId}/pricelists/${pricelistId}/serie/${serieNo}/prices/${_id}'
|
35676
35789
|
};
|
35677
|
-
}, [onlyManual]);
|
35790
|
+
}, [onlyManual, viewOnly]);
|
35678
35791
|
var priceFeatureGroups = usePriceFeatureGroupsFromSerie(selectedSerie);
|
35679
35792
|
var configuration = useMemo(function () {
|
35680
35793
|
var _priceFeatureGroups$m;
|
@@ -36065,7 +36178,7 @@ var TablePriceList = observer(function () {
|
|
36065
36178
|
"delete": viewOnly ? undefined : apiConfig.enricherService + '/packages/${packageId}/pricelists/${_id}',
|
36066
36179
|
update: viewOnly ? undefined : apiConfig.enricherService + '/packages/${packageId}/pricelists/${_id}'
|
36067
36180
|
};
|
36068
|
-
}, []);
|
36181
|
+
}, [viewOnly]);
|
36069
36182
|
var hooks = useMemo(function () {
|
36070
36183
|
return {
|
36071
36184
|
onCellSelectionChanged: function onCellSelectionChanged(event) {
|
@@ -36099,6 +36212,21 @@ var TablePriceList = observer(function () {
|
|
36099
36212
|
value: 3
|
36100
36213
|
}];
|
36101
36214
|
}, []);
|
36215
|
+
var purchaseRetailIdOptions = useMemo(function () {
|
36216
|
+
return [{
|
36217
|
+
name: t('backoffice.idmCatalog.series.label.purchaseRetail.p0'),
|
36218
|
+
value: 0
|
36219
|
+
}, {
|
36220
|
+
name: t('backoffice.idmCatalog.series.label.purchaseRetail.p1'),
|
36221
|
+
value: 1
|
36222
|
+
}, {
|
36223
|
+
name: t('backoffice.idmCatalog.series.label.purchaseRetail.p2'),
|
36224
|
+
value: 2
|
36225
|
+
}, {
|
36226
|
+
name: t('backoffice.idmCatalog.series.label.purchaseRetail.p3'),
|
36227
|
+
value: 3
|
36228
|
+
}];
|
36229
|
+
}, []);
|
36102
36230
|
var configuration = useMemo(function () {
|
36103
36231
|
return {
|
36104
36232
|
type: 'dotnetSSM',
|
@@ -36127,6 +36255,15 @@ var TablePriceList = observer(function () {
|
|
36127
36255
|
}
|
36128
36256
|
},
|
36129
36257
|
additionalFields: ['basedPricelistDisplayName']
|
36258
|
+
}, {
|
36259
|
+
headerName: 'backoffice.idmCatalog.series.label.purchaseRetailId',
|
36260
|
+
field: 'purchaseRetailId',
|
36261
|
+
editable: !viewOnly,
|
36262
|
+
cellDataType: 'enum',
|
36263
|
+
customParams: {
|
36264
|
+
enumData: purchaseRetailIdOptions,
|
36265
|
+
displayLabelTemplate: '${name} (${value})'
|
36266
|
+
}
|
36130
36267
|
}, {
|
36131
36268
|
headerName: 'backoffice.idmEnricher.pricelists.label.priceFactor',
|
36132
36269
|
field: 'pricefactors',
|
@@ -36347,13 +36484,14 @@ function Content$3() {
|
|
36347
36484
|
function ownKeys$b(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; }
|
36348
36485
|
function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$b(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$b(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
36349
36486
|
function UploadButton (_ref) {
|
36350
|
-
var action = _ref.action
|
36351
|
-
|
36352
|
-
|
36353
|
-
contentType = _ref.contentType,
|
36487
|
+
var action = _ref.action;
|
36488
|
+
_ref.title;
|
36489
|
+
_ref.disabled;
|
36490
|
+
var contentType = _ref.contentType,
|
36354
36491
|
updateProgress = _ref.updateProgress,
|
36355
36492
|
fileList = _ref.fileList,
|
36356
|
-
progress = _ref.progress
|
36493
|
+
progress = _ref.progress,
|
36494
|
+
setName = _ref.setName;
|
36357
36495
|
var _useTranslation = useTranslation(),
|
36358
36496
|
t = _useTranslation.t;
|
36359
36497
|
var root = useStore();
|
@@ -36377,9 +36515,27 @@ function UploadButton (_ref) {
|
|
36377
36515
|
ref.current = undefined;
|
36378
36516
|
}
|
36379
36517
|
} else if (status === 'error') {
|
36518
|
+
var _file$response, _file$response2;
|
36380
36519
|
progress = 'ERROR';
|
36381
36520
|
fileList = [];
|
36382
|
-
|
36521
|
+
if ((_file$response = file.response) !== null && _file$response !== void 0 && _file$response.error) {
|
36522
|
+
error = file.response.error;
|
36523
|
+
} else if ((_file$response2 = file.response) !== null && _file$response2 !== void 0 && _file$response2.errors) {
|
36524
|
+
// If response has a validation error structure, extract messages
|
36525
|
+
if (_typeof(file.response.errors) === 'object') {
|
36526
|
+
error = Object.values(file.response.errors).map(function (v) {
|
36527
|
+
return Array.isArray(v) ? v.join(', ') : v;
|
36528
|
+
}).join('; ');
|
36529
|
+
} else {
|
36530
|
+
error = file.response.errors;
|
36531
|
+
}
|
36532
|
+
} else {
|
36533
|
+
try {
|
36534
|
+
error = JSON.parse(file.response);
|
36535
|
+
} catch (_unused) {
|
36536
|
+
error = 'Unknown error';
|
36537
|
+
}
|
36538
|
+
}
|
36383
36539
|
if (ref.current) {
|
36384
36540
|
clearInterval(ref.current.interval);
|
36385
36541
|
ref.current = undefined;
|
@@ -36434,34 +36590,37 @@ function UploadButton (_ref) {
|
|
36434
36590
|
// Allow both XML and ZIP files
|
36435
36591
|
isXml = file.type === 'application/xml' || file.type === 'text/xml' || file.name.endsWith('.xml');
|
36436
36592
|
isZip = file.type === 'application/zip' || file.name.endsWith('.zip');
|
36593
|
+
nameWithoutExt = file.name.substring(0, file.name.lastIndexOf('.')) || file.name;
|
36437
36594
|
if (!(!isXml && !isZip)) {
|
36438
|
-
_context.next =
|
36595
|
+
_context.next = 6;
|
36439
36596
|
break;
|
36440
36597
|
}
|
36441
36598
|
updateProgress('ERROR', fileList, t('backoffice.idmEnricher.import.uploadinvalid'));
|
36442
36599
|
return _context.abrupt("return", Upload$2.LIST_IGNORE);
|
36443
|
-
case
|
36600
|
+
case 6:
|
36601
|
+
setName(nameWithoutExt);
|
36602
|
+
|
36603
|
+
// If it's already a ZIP file, return it as is
|
36444
36604
|
if (!isZip) {
|
36445
|
-
_context.next =
|
36605
|
+
_context.next = 9;
|
36446
36606
|
break;
|
36447
36607
|
}
|
36448
36608
|
return _context.abrupt("return", file);
|
36449
|
-
case
|
36609
|
+
case 9:
|
36450
36610
|
// For XML files, create a ZIP
|
36451
|
-
nameWithoutExt = file.name.substring(0, file.name.lastIndexOf('.')) || file.name;
|
36452
36611
|
zip = new JSZip();
|
36453
36612
|
zip.file(file.name, file);
|
36454
|
-
_context.next =
|
36613
|
+
_context.next = 13;
|
36455
36614
|
return zip.generateAsync({
|
36456
36615
|
type: 'blob'
|
36457
36616
|
});
|
36458
|
-
case
|
36617
|
+
case 13:
|
36459
36618
|
zipBlob = _context.sent;
|
36460
36619
|
zipFile = new File([zipBlob], nameWithoutExt + '.zip', {
|
36461
36620
|
type: 'application/zip'
|
36462
36621
|
});
|
36463
36622
|
return _context.abrupt("return", zipFile);
|
36464
|
-
case
|
36623
|
+
case 16:
|
36465
36624
|
case "end":
|
36466
36625
|
return _context.stop();
|
36467
36626
|
}
|
@@ -36490,12 +36649,18 @@ function UploadButton (_ref) {
|
|
36490
36649
|
}
|
36491
36650
|
};
|
36492
36651
|
return /*#__PURE__*/jsx(Fragment, {
|
36493
|
-
children: /*#__PURE__*/
|
36494
|
-
|
36495
|
-
|
36496
|
-
|
36497
|
-
children:
|
36498
|
-
})
|
36652
|
+
children: /*#__PURE__*/jsxs(Upload$2.Dragger, _objectSpread$b(_objectSpread$b({}, props), {}, {
|
36653
|
+
disabled: progress === 'INPROGRESS',
|
36654
|
+
children: [/*#__PURE__*/jsx("p", {
|
36655
|
+
className: "ant-upload-drag-icon",
|
36656
|
+
children: /*#__PURE__*/jsx(UploadOutlined$1, {})
|
36657
|
+
}), /*#__PURE__*/jsx("p", {
|
36658
|
+
className: "ant-upload-text",
|
36659
|
+
children: t('backoffice.idmEnricher.import.uploadtext')
|
36660
|
+
}), /*#__PURE__*/jsx("p", {
|
36661
|
+
className: "ant-upload-hint",
|
36662
|
+
children: t('backoffice.idmEnricher.import.uploadhint')
|
36663
|
+
})]
|
36499
36664
|
}))
|
36500
36665
|
});
|
36501
36666
|
}
|
@@ -36511,7 +36676,7 @@ function IDMImportForm (_ref) {
|
|
36511
36676
|
progress = _ref.progress,
|
36512
36677
|
name = _ref.name,
|
36513
36678
|
error = _ref.error,
|
36514
|
-
|
36679
|
+
_setName = _ref.setName,
|
36515
36680
|
fileList = _ref.fileList;
|
36516
36681
|
var _useTranslation = useTranslation(),
|
36517
36682
|
t = _useTranslation.t;
|
@@ -36526,10 +36691,11 @@ function IDMImportForm (_ref) {
|
|
36526
36691
|
}],
|
36527
36692
|
children: /*#__PURE__*/jsx(Input, {
|
36528
36693
|
onChange: function onChange(e) {
|
36529
|
-
return
|
36694
|
+
return _setName(e.target.value);
|
36530
36695
|
},
|
36531
36696
|
value: name,
|
36532
|
-
|
36697
|
+
placeholder: t('backoffice.idmEnricher.import.nameplaceholder'),
|
36698
|
+
disabled: progress === 'INPROGRESS'
|
36533
36699
|
})
|
36534
36700
|
}), /*#__PURE__*/jsx(Form$1.Item, {
|
36535
36701
|
children: /*#__PURE__*/jsx(UploadButton, {
|
@@ -36537,8 +36703,11 @@ function IDMImportForm (_ref) {
|
|
36537
36703
|
contentType: "multipart/form-data",
|
36538
36704
|
updateProgress: updateProgress,
|
36539
36705
|
progress: progress,
|
36540
|
-
disabled:
|
36541
|
-
fileList: fileList
|
36706
|
+
disabled: progress === 'INPROGRESS',
|
36707
|
+
fileList: fileList,
|
36708
|
+
setName: function setName(fileName) {
|
36709
|
+
return !name && _setName(fileName);
|
36710
|
+
}
|
36542
36711
|
})
|
36543
36712
|
}), /*#__PURE__*/jsxs(Form$1.Item, {
|
36544
36713
|
style: {
|
@@ -36607,6 +36776,9 @@ function OpenModalButton (_ref) {
|
|
36607
36776
|
setProgress(progress);
|
36608
36777
|
setFileList(fileList);
|
36609
36778
|
setError(error);
|
36779
|
+
if (progress === 'SUCCESS') {
|
36780
|
+
setName('');
|
36781
|
+
}
|
36610
36782
|
};
|
36611
36783
|
var buttonText = progress == undefined || progress == 'ERROR' ? t('backoffice.idmEnricher.import.cancel') : progress === 'INPROGRESS' ? t('backoffice.idmEnricher.import.inprogress') : t('backoffice.idmEnricher.import.finish');
|
36612
36784
|
return /*#__PURE__*/jsxs(Fragment, {
|
@@ -36619,17 +36791,14 @@ function OpenModalButton (_ref) {
|
|
36619
36791
|
open: isModalOpen,
|
36620
36792
|
onOk: handleOk,
|
36621
36793
|
onCancel: handleOk,
|
36622
|
-
cancelButtonProps:
|
36794
|
+
cancelButtonProps: {
|
36623
36795
|
style: {
|
36624
36796
|
display: 'none'
|
36625
36797
|
}
|
36626
|
-
} : {
|
36627
|
-
onClick: resetProgress
|
36628
36798
|
},
|
36629
36799
|
closable: progress !== 'INPROGRESS',
|
36630
36800
|
maskClosable: progress !== 'INPROGRESS',
|
36631
36801
|
okText: buttonText,
|
36632
|
-
cancelText: progress === 'SUCCESS' ? t('backoffice.idmEnricher.import.new') : undefined,
|
36633
36802
|
okButtonProps: {
|
36634
36803
|
disabled: progress === 'INPROGRESS'
|
36635
36804
|
} // Disable the button if progress is 'INPROGRESS'
|
@@ -36861,7 +37030,7 @@ var TableCatalogs = observer(function () {
|
|
36861
37030
|
}, [organizationId, showApi2]);
|
36862
37031
|
var rowActions = useMemo(function () {
|
36863
37032
|
return [{
|
36864
|
-
icon: /*#__PURE__*/jsx(EditOutlined, {}),
|
37033
|
+
icon: /*#__PURE__*/jsx(EditOutlined$1, {}),
|
36865
37034
|
action: function action(_ref) {
|
36866
37035
|
var selectedNodes = _ref.selectedNodes;
|
36867
37036
|
setSelectedCatalog(selectedNodes[0].data._id, ['series'], './', true);
|
@@ -37028,7 +37197,8 @@ var TableCatalogs = observer(function () {
|
|
37028
37197
|
headerName: 'backoffice.idmCatalog.general.label.lastUpdatedDate',
|
37029
37198
|
field: 'lastUpdatedDate',
|
37030
37199
|
cellDataType: 'dateString',
|
37031
|
-
editable: false
|
37200
|
+
editable: false,
|
37201
|
+
sort: 'desc'
|
37032
37202
|
}, {
|
37033
37203
|
headerName: 'backoffice.idmCatalog.general.label.lastUpdatedByDisplayText',
|
37034
37204
|
field: 'lastUpdatedByDisplayText',
|
@@ -37639,7 +37809,7 @@ var useSeriesSelector = function useSeriesSelector(modules) {
|
|
37639
37809
|
read: idmService + "/v3.0/catalogs/".concat(catalogId, "/series?fields=seriesName[").concat(i18n.language.toLocaleUpperCase(), "];_id")
|
37640
37810
|
};
|
37641
37811
|
var selectMapping = {
|
37642
|
-
label: "${seriesName.".concat(i18n.language.toLocaleUpperCase(), "}"),
|
37812
|
+
label: "${seriesName.".concat(i18n.language.toLocaleUpperCase(), "} (${serieNo})"),
|
37643
37813
|
value: '${_id}'
|
37644
37814
|
};
|
37645
37815
|
var fetchSerie = /*#__PURE__*/function () {
|