@crystaldesign/diva-backoffice 25.8.0-beta.3 → 25.8.0-beta.30
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 +1421 -498
- package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_Configurator/ArticleSelection/index.d.ts +1 -1
- package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_Configurator/ArticleSelection/index.d.ts.map +1 -1
- package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_Configurator/CatalogSelection/index.d.ts +1 -1
- package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_Configurator/CatalogSelection/index.d.ts.map +1 -1
- package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_Configurator/index.d.ts.map +1 -1
- package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_Configurator/useWysiwygConfigurator.d.ts +8 -6
- package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_Configurator/useWysiwygConfigurator.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/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Form/types.d.ts +5 -1
- package/build/types/backoffice/src/ui/Form/types.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/PrefilterSelectors/SeriesSelector.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/hooks/useCatalogContext.d.ts +4 -4
- package/build/types/backoffice/src/ui/IDMCatalogEditor/hooks/useCatalogContext.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCommonComponents/SpreadsheetWrapper/index.d.ts +2 -2
- package/build/types/backoffice/src/ui/IDMCommonComponents/SpreadsheetWrapper/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCommonComponents/createTranslatedColumnConfig.d.ts +1 -1
- package/build/types/backoffice/src/ui/IDMCommonComponents/createTranslatedColumnConfig.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCommonComponents/useTools.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/Tables/Prices/PriceFactorHeaderComponent.d.ts +37 -0
- package/build/types/backoffice/src/ui/IDMEnricherEditor/Tables/Prices/PriceFactorHeaderComponent.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMEnricherEditor/Tables/Prices/PriceFactorInput/index.d.ts +2 -2
- package/build/types/backoffice/src/ui/IDMEnricherEditor/Tables/Prices/PriceFactorInput/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/Tables/Prices/Setting/index.d.ts +8 -0
- package/build/types/backoffice/src/ui/IDMEnricherEditor/Tables/Prices/Setting/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMEnricherEditor/Tables/Prices/index.d.ts +2 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/Tables/Prices/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/hooks/useEnricherContext.d.ts +6 -0
- package/build/types/backoffice/src/ui/IDMEnricherEditor/hooks/useEnricherContext.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/hooks/useModule.d.ts +4 -0
- package/build/types/backoffice/src/ui/IDMEnricherEditor/hooks/useModule.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TablePackages/PublishCustomCell.d.ts +2 -1
- 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/IDMEnricherEditor/modules/TableRenaming/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TableRenaming/tableConfiguration/catalogConfig.d.ts +3 -3
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TableRenaming/tableConfiguration/catalogConfig.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TableRenaming/tableConfiguration/detailInfosConfig.d.ts +4 -3
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TableRenaming/tableConfiguration/detailInfosConfig.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TableRenaming/tableConfiguration/featureConfig.d.ts +4 -3
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TableRenaming/tableConfiguration/featureConfig.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TableRenaming/tableConfiguration/itemConfig.d.ts +4 -3
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TableRenaming/tableConfiguration/itemConfig.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TableRenaming/tableConfiguration/optionsConfig.d.ts +4 -3
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TableRenaming/tableConfiguration/optionsConfig.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TableRenaming/tableConfiguration/seriesConfig.d.ts +4 -3
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TableRenaming/tableConfiguration/seriesConfig.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TableTabGroups/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/SelectSimple/useSelectSimpleData.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$1, Button, Input, Popover, Typography, Divider, Progress, Select as Select$1, Avatar, Spin, Radio, Space, Dropdown, DatePicker, Checkbox, InputNumber, Modal as Modal$2, 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,
|
4
|
+
import { Form as Form$1, Button, Input, Popover, Typography, Divider, Progress, Select as Select$1, Avatar, Spin, Radio, Space, Dropdown, DatePicker, Checkbox, 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';
|
@@ -119,9 +119,11 @@ import Descriptions$1 from 'antd/es/descriptions';
|
|
119
119
|
import { Spreadsheet as Spreadsheet$1 } from '@crystaldesign/spreadsheet';
|
120
120
|
import EditOutlined from '@ant-design/icons/lib/icons/EditOutlined';
|
121
121
|
import Checkbox$1 from 'antd/es/checkbox/Checkbox';
|
122
|
+
import WarningOutlined from '@ant-design/icons/lib/icons/WarningOutlined';
|
122
123
|
import Modal$3 from 'antd/es/modal';
|
123
124
|
import Spin$1 from 'antd/es/spin';
|
124
125
|
import Flex from 'antd/es/flex';
|
126
|
+
import { useTranslation as useTranslation$1 } from 'react-i18next';
|
125
127
|
import JSZip from 'jszip';
|
126
128
|
import { DropzoneAreaBase } from 'react-mui-dropzone';
|
127
129
|
import Switch$1 from 'antd/es/switch';
|
@@ -5482,6 +5484,11 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
5482
5484
|
field: 'pos',
|
5483
5485
|
sorter: 3,
|
5484
5486
|
filter: 'advanced'
|
5487
|
+
}, {
|
5488
|
+
title: t('backoffice.form.renderjob.items.functionType'),
|
5489
|
+
field: 'functionType',
|
5490
|
+
sorter: 3,
|
5491
|
+
filter: 'advanced'
|
5485
5492
|
}, {
|
5486
5493
|
title: t('backoffice.table.viewpoints.columns.title.rot'),
|
5487
5494
|
field: 'rot',
|
@@ -7652,6 +7659,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
7652
7659
|
name: 'type',
|
7653
7660
|
label: t('backoffice.form.organizationdetails.items.type'),
|
7654
7661
|
type: 'radio',
|
7662
|
+
tabgroup: t('backoffice.subtitle.generally'),
|
7655
7663
|
options: [{
|
7656
7664
|
value: undefined,
|
7657
7665
|
label: t('backoffice.form.SHELL'),
|
@@ -7739,6 +7747,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
7739
7747
|
permission: 'backoffice_admin_organizations'
|
7740
7748
|
}, {
|
7741
7749
|
name: t('backoffice.subtitle.generally'),
|
7750
|
+
tabgroup: t('backoffice.subtitle.generally'),
|
7742
7751
|
type: 'subTitle',
|
7743
7752
|
orientation: 'left',
|
7744
7753
|
style: {
|
@@ -7746,11 +7755,13 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
7746
7755
|
}
|
7747
7756
|
}, {
|
7748
7757
|
name: '_id',
|
7758
|
+
tabgroup: t('backoffice.subtitle.generally'),
|
7749
7759
|
label: 'ID',
|
7750
7760
|
type: 'input',
|
7751
7761
|
readonly: true
|
7752
7762
|
}, {
|
7753
7763
|
name: 'displayName',
|
7764
|
+
tabgroup: t('backoffice.subtitle.generally'),
|
7754
7765
|
label: t('backoffice.form.organizationdetails.items.displayName'),
|
7755
7766
|
required: true,
|
7756
7767
|
type: 'input',
|
@@ -7762,6 +7773,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
7762
7773
|
}, {
|
7763
7774
|
label: t('backoffice.form.organizationdetails.items.internalId'),
|
7764
7775
|
name: 'internalId',
|
7776
|
+
tabgroup: t('backoffice.subtitle.generally'),
|
7765
7777
|
type: 'input',
|
7766
7778
|
hidden: function hidden(data) {
|
7767
7779
|
return (data === null || data === void 0 ? void 0 : data.type) === 'ASSOCIATION' || (data === null || data === void 0 ? void 0 : data.type) === 'SUPPLIER' || (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER';
|
@@ -7769,6 +7781,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
7769
7781
|
}, {
|
7770
7782
|
name: 'description',
|
7771
7783
|
label: t('backoffice.form.organizationdetails.items.description'),
|
7784
|
+
tabgroup: t('backoffice.subtitle.generally'),
|
7772
7785
|
type: 'textarea'
|
7773
7786
|
}, {
|
7774
7787
|
name: 'street',
|
@@ -7776,6 +7789,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
7776
7789
|
required: function required(data) {
|
7777
7790
|
return !((data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined);
|
7778
7791
|
},
|
7792
|
+
tabgroup: t('backoffice.subtitle.generally'),
|
7779
7793
|
type: 'input',
|
7780
7794
|
hidden: function hidden(data) {
|
7781
7795
|
return (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined;
|
@@ -7786,6 +7800,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
7786
7800
|
required: function required(data) {
|
7787
7801
|
return !((data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined);
|
7788
7802
|
},
|
7803
|
+
tabgroup: t('backoffice.subtitle.generally'),
|
7789
7804
|
type: 'input',
|
7790
7805
|
hidden: function hidden(data) {
|
7791
7806
|
return (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined;
|
@@ -7796,6 +7811,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
7796
7811
|
required: function required(data) {
|
7797
7812
|
return !((data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined);
|
7798
7813
|
},
|
7814
|
+
tabgroup: t('backoffice.subtitle.generally'),
|
7799
7815
|
type: 'input',
|
7800
7816
|
hidden: function hidden(data) {
|
7801
7817
|
return (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined;
|
@@ -7803,6 +7819,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
7803
7819
|
}, {
|
7804
7820
|
label: t('backoffice.form.organizationdetails.items.region'),
|
7805
7821
|
name: 'region',
|
7822
|
+
tabgroup: t('backoffice.subtitle.generally'),
|
7806
7823
|
type: 'input',
|
7807
7824
|
hidden: function hidden(data) {
|
7808
7825
|
return (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined;
|
@@ -7810,6 +7827,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
7810
7827
|
}, {
|
7811
7828
|
name: 'countryCode',
|
7812
7829
|
label: t('backoffice.form.organizationdetails.items.countryCode'),
|
7830
|
+
tabgroup: t('backoffice.subtitle.generally'),
|
7813
7831
|
type: 'selectSimple',
|
7814
7832
|
apiInterface: {
|
7815
7833
|
read: {
|
@@ -7828,6 +7846,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
7828
7846
|
}, {
|
7829
7847
|
name: 'contact',
|
7830
7848
|
label: 'backoffice.organization.contact',
|
7849
|
+
tabgroup: t('backoffice.subtitle.generally'),
|
7831
7850
|
type: 'select',
|
7832
7851
|
mode: 'single',
|
7833
7852
|
selectMapping: {
|
@@ -7869,6 +7888,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
7869
7888
|
}, {
|
7870
7889
|
name: 'email',
|
7871
7890
|
label: t('backoffice.form.organizationdetails.items.email'),
|
7891
|
+
tabgroup: t('backoffice.subtitle.generally'),
|
7872
7892
|
type: 'input',
|
7873
7893
|
hidden: function hidden(data) {
|
7874
7894
|
return (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined;
|
@@ -7876,6 +7896,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
7876
7896
|
}, {
|
7877
7897
|
name: 'phone',
|
7878
7898
|
label: t('backoffice.form.organizationdetails.items.phone'),
|
7899
|
+
tabgroup: t('backoffice.subtitle.generally'),
|
7879
7900
|
type: 'input',
|
7880
7901
|
hidden: function hidden(data) {
|
7881
7902
|
return (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined;
|
@@ -7883,6 +7904,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
7883
7904
|
}, {
|
7884
7905
|
name: 'fax',
|
7885
7906
|
label: t('backoffice.form.organizationdetails.items.fax'),
|
7907
|
+
tabgroup: t('backoffice.subtitle.generally'),
|
7886
7908
|
type: 'input',
|
7887
7909
|
hidden: function hidden(data) {
|
7888
7910
|
return (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined;
|
@@ -7890,6 +7912,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
7890
7912
|
}, {
|
7891
7913
|
name: 'homepage',
|
7892
7914
|
label: t('backoffice.form.organizationdetails.items.homepage'),
|
7915
|
+
tabgroup: t('backoffice.subtitle.generally'),
|
7893
7916
|
type: 'input',
|
7894
7917
|
hidden: function hidden(data) {
|
7895
7918
|
return (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined;
|
@@ -7900,6 +7923,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
7900
7923
|
catalogCodex: ['defaultCatalog', 'catalogCodex'],
|
7901
7924
|
label: t('backoffice.form.organizationdetails.items.selectClientRelationCatalog'),
|
7902
7925
|
type: 'selectClientRelationCatalog',
|
7926
|
+
tabgroup: t('backoffice.subtitle.generally'),
|
7903
7927
|
apiInterface: {
|
7904
7928
|
read: '${authService}/v2/organizations/${organizationId}'
|
7905
7929
|
},
|
@@ -7908,15 +7932,18 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
7908
7932
|
}
|
7909
7933
|
}, {
|
7910
7934
|
name: ['defaultCatalog', 'accountId'],
|
7911
|
-
hidden: true
|
7935
|
+
hidden: true,
|
7936
|
+
tabgroup: t('backoffice.subtitle.generally')
|
7912
7937
|
},
|
7913
7938
|
// these fields are needed otherwise they dont get saved
|
7914
7939
|
{
|
7915
7940
|
name: ['defaultCatalog', 'catalogCodex'],
|
7916
|
-
hidden: true
|
7941
|
+
hidden: true,
|
7942
|
+
tabgroup: t('backoffice.subtitle.generally')
|
7917
7943
|
}, {
|
7918
7944
|
name: ['settings', 'sendOrders'],
|
7919
7945
|
label: t('backoffice.form.organizationdetails.items.settings.sendOrders'),
|
7946
|
+
tabgroup: t('backoffice.subtitle.generally'),
|
7920
7947
|
type: 'radio',
|
7921
7948
|
optionType: 'button',
|
7922
7949
|
options: [{
|
@@ -7933,11 +7960,13 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
7933
7960
|
}, {
|
7934
7961
|
name: ['settings', 'sendOrdersEmail'],
|
7935
7962
|
label: t('backoffice.form.organizationdetails.items.settings.sendOrdersEmail'),
|
7963
|
+
tabgroup: t('backoffice.subtitle.generally'),
|
7936
7964
|
type: 'input',
|
7937
7965
|
permission: 'backoffice_admin_organizations'
|
7938
7966
|
}, {
|
7939
7967
|
name: 'iwofurn',
|
7940
7968
|
label: t('backoffice.form.organizationdetails.items.iwofurn'),
|
7969
|
+
tabgroup: t('backoffice.subtitle.generally'),
|
7941
7970
|
type: 'checkbox',
|
7942
7971
|
hidden: function hidden(data) {
|
7943
7972
|
return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
|
@@ -7955,6 +7984,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
7955
7984
|
}
|
7956
7985
|
}, {
|
7957
7986
|
name: t('backoffice.subtitle.iwofurn'),
|
7987
|
+
tabgroup: t('backoffice.subtitle.generally'),
|
7958
7988
|
type: 'subTitle',
|
7959
7989
|
orientation: 'left',
|
7960
7990
|
style: {
|
@@ -7967,6 +7997,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
7967
7997
|
}, {
|
7968
7998
|
name: ['iwoFurnOptions', 'iwofurnUsername'],
|
7969
7999
|
label: t('backoffice.form.organizationdetails.items.iwoFurnOptions.iwofurnUsername'),
|
8000
|
+
tabgroup: t('backoffice.subtitle.generally'),
|
7970
8001
|
type: 'input',
|
7971
8002
|
syncDataWithUserInput: true,
|
7972
8003
|
required: function required(data) {
|
@@ -7978,6 +8009,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
7978
8009
|
}, {
|
7979
8010
|
name: ['iwoFurnOptions', 'pwdHash'],
|
7980
8011
|
label: t('backoffice.form.organizationdetails.items.iwoFurnOptions.pwdHash'),
|
8012
|
+
tabgroup: t('backoffice.subtitle.generally'),
|
7981
8013
|
type: 'password',
|
7982
8014
|
syncDataWithUserInput: true,
|
7983
8015
|
required: function required(data) {
|
@@ -7989,6 +8021,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
7989
8021
|
}, {
|
7990
8022
|
name: ['iwoFurnOptions', 'iwofurnSenderGLN'],
|
7991
8023
|
label: t('backoffice.form.organizationdetails.items.iwofurnSenderGLN'),
|
8024
|
+
tabgroup: t('backoffice.subtitle.generally'),
|
7992
8025
|
type: 'input',
|
7993
8026
|
required: function required(data) {
|
7994
8027
|
return data === null || data === void 0 ? void 0 : data.iwofurn;
|
@@ -7999,6 +8032,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
7999
8032
|
}, {
|
8000
8033
|
name: ['iwoFurnOptions', 'iwofurnRecipientGLN'],
|
8001
8034
|
label: t('backoffice.form.organizationdetails.items.iwofurnRecipientGLN'),
|
8035
|
+
tabgroup: t('backoffice.subtitle.generally'),
|
8002
8036
|
type: 'input',
|
8003
8037
|
required: function required(data) {
|
8004
8038
|
return data === null || data === void 0 ? void 0 : data.iwofurn;
|
@@ -8009,6 +8043,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
8009
8043
|
}, {
|
8010
8044
|
name: ['iwoFurnOptions', 'sendIWOBasketEKPriceType'],
|
8011
8045
|
label: t('backoffice.form.organizationdetails.items.sendIWOBasketEKPriceType'),
|
8046
|
+
tabgroup: t('backoffice.subtitle.generally'),
|
8012
8047
|
type: 'input',
|
8013
8048
|
hidden: function hidden(data) {
|
8014
8049
|
return !(data !== null && data !== void 0 && data.iwofurn) || (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
|
@@ -8028,6 +8063,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
8028
8063
|
}
|
8029
8064
|
}, {
|
8030
8065
|
name: t('backoffice.form.organizationdetails.items.licenses'),
|
8066
|
+
tabgroup: t('backoffice.form.organizationdetails.items.licenses'),
|
8031
8067
|
type: 'subTitle',
|
8032
8068
|
orientation: 'left',
|
8033
8069
|
style: {
|
@@ -8037,6 +8073,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
8037
8073
|
}, {
|
8038
8074
|
name: 'Info',
|
8039
8075
|
type: 'text',
|
8076
|
+
tabgroup: t('backoffice.form.organizationdetails.items.licenses'),
|
8040
8077
|
style: {
|
8041
8078
|
marginBottom: '30px'
|
8042
8079
|
},
|
@@ -8045,6 +8082,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
8045
8082
|
}, {
|
8046
8083
|
name: ['settings', 'enable3DExport'],
|
8047
8084
|
label: t('backoffice.form.organizationdetails.items.settings.enable3DExport'),
|
8085
|
+
tabgroup: t('backoffice.form.organizationdetails.items.licenses'),
|
8048
8086
|
type: 'radio',
|
8049
8087
|
optionType: 'button',
|
8050
8088
|
options: [{
|
@@ -8062,6 +8100,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
8062
8100
|
name: ['settings', 'renderjobSeparateMaterials'],
|
8063
8101
|
label: t('backoffice.form.organizationdetails.items.settings.renderjobSeparateMaterials'),
|
8064
8102
|
permission: 'backoffice_admin_organizations',
|
8103
|
+
tabgroup: t('backoffice.form.organizationdetails.items.licenses'),
|
8065
8104
|
type: 'radio',
|
8066
8105
|
optionType: 'button',
|
8067
8106
|
options: [{
|
@@ -8078,6 +8117,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
8078
8117
|
name: ['settings', 'enableAR'],
|
8079
8118
|
label: t('backoffice.form.organizationdetails.items.settings.enableAR'),
|
8080
8119
|
permission: 'backoffice_admin_organizations',
|
8120
|
+
tabgroup: t('backoffice.form.organizationdetails.items.licenses'),
|
8081
8121
|
type: 'radio',
|
8082
8122
|
optionType: 'button',
|
8083
8123
|
options: [{
|
@@ -8094,6 +8134,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
8094
8134
|
name: ['settings', 'enableRTV'],
|
8095
8135
|
label: t('backoffice.form.organizationdetails.items.settings.enableRTV'),
|
8096
8136
|
permission: 'backoffice_admin_organizations',
|
8137
|
+
tabgroup: t('backoffice.form.organizationdetails.items.licenses'),
|
8097
8138
|
type: 'radio',
|
8098
8139
|
optionType: 'button',
|
8099
8140
|
options: [{
|
@@ -8111,6 +8152,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
8111
8152
|
label: t('backoffice.form.organizationdetails.items.settings.forceRTV'),
|
8112
8153
|
permission: 'backoffice_admin_organizations',
|
8113
8154
|
type: 'radio',
|
8155
|
+
tabgroup: t('backoffice.form.organizationdetails.items.licenses'),
|
8114
8156
|
optionType: 'button',
|
8115
8157
|
options: [{
|
8116
8158
|
label: t('backoffice.form.organizationdetails.items.vererbt'),
|
@@ -8125,6 +8167,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
8125
8167
|
}, {
|
8126
8168
|
name: ['settings', 'enableVKMarketing'],
|
8127
8169
|
label: t('backoffice.form.organizationdetails.items.settings.enableVKMarketing'),
|
8170
|
+
tabgroup: t('backoffice.form.organizationdetails.items.licenses'),
|
8128
8171
|
permission: 'backoffice_admin_organizations',
|
8129
8172
|
type: 'radio',
|
8130
8173
|
hidden: function hidden(data) {
|
@@ -8145,6 +8188,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
8145
8188
|
name: ['settings', 'pricePreview'],
|
8146
8189
|
label: t('backoffice.form.organizationdetails.items.settings.pricePreview'),
|
8147
8190
|
permission: 'backoffice_admin_organizations',
|
8191
|
+
tabgroup: t('backoffice.form.organizationdetails.items.licenses'),
|
8148
8192
|
type: 'radio',
|
8149
8193
|
optionType: 'button',
|
8150
8194
|
options: [{
|
@@ -8163,6 +8207,31 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
8163
8207
|
label: t('backoffice.form.organizationdetails.items.fromCurrentPriceHideCurrent'),
|
8164
8208
|
value: 'fromCurrentPriceHideCurrent'
|
8165
8209
|
}]
|
8210
|
+
}, {
|
8211
|
+
name: t('backoffice.subtitle.configurator'),
|
8212
|
+
type: 'subTitle',
|
8213
|
+
orientation: 'left',
|
8214
|
+
style: {
|
8215
|
+
marginBottom: '40px'
|
8216
|
+
},
|
8217
|
+
permission: 'backoffice_admin_organizations',
|
8218
|
+
hidden: function hidden(data) {
|
8219
|
+
return (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined;
|
8220
|
+
}
|
8221
|
+
}, {
|
8222
|
+
name: 'privacyPolicyUrl',
|
8223
|
+
label: t('backoffice.form.organizationdetails.items.privacyPolicyUrl'),
|
8224
|
+
type: 'input',
|
8225
|
+
hidden: function hidden(data) {
|
8226
|
+
return (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined;
|
8227
|
+
}
|
8228
|
+
}, {
|
8229
|
+
name: 'termsAndConditionsUrl',
|
8230
|
+
label: t('backoffice.form.organizationdetails.items.termsAndConditionsUrl'),
|
8231
|
+
type: 'input',
|
8232
|
+
hidden: function hidden(data) {
|
8233
|
+
return (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined;
|
8234
|
+
}
|
8166
8235
|
}, {
|
8167
8236
|
name: t('backoffice.subtitle.advanced'),
|
8168
8237
|
type: 'subTitle',
|
@@ -8554,6 +8623,117 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
8554
8623
|
label: t('backoffice.currentorg.items.shopType.store'),
|
8555
8624
|
value: 'store'
|
8556
8625
|
}]
|
8626
|
+
}, {
|
8627
|
+
type: 'subTitle',
|
8628
|
+
name: t('backoffice.form.organizationdetails.socialUrls'),
|
8629
|
+
tabgroup: t('backoffice.form.organizationdetails.additionalContactData')
|
8630
|
+
}, {
|
8631
|
+
name: ['socialUrls', 'facebook'],
|
8632
|
+
label: t('backoffice.form.organizationdetails.items.facebookUrl'),
|
8633
|
+
tabgroup: t('backoffice.form.organizationdetails.additionalContactData'),
|
8634
|
+
type: 'input',
|
8635
|
+
hidden: function hidden(data) {
|
8636
|
+
return (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined;
|
8637
|
+
}
|
8638
|
+
}, {
|
8639
|
+
name: ['socialUrls', 'instagram'],
|
8640
|
+
label: t('backoffice.form.organizationdetails.items.instagramUrl'),
|
8641
|
+
tabgroup: t('backoffice.form.organizationdetails.additionalContactData'),
|
8642
|
+
type: 'input',
|
8643
|
+
hidden: function hidden(data) {
|
8644
|
+
return (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined;
|
8645
|
+
}
|
8646
|
+
}, {
|
8647
|
+
name: ['socialUrls', 'x'],
|
8648
|
+
label: t('backoffice.form.organizationdetails.items.xUrl'),
|
8649
|
+
tabgroup: t('backoffice.form.organizationdetails.additionalContactData'),
|
8650
|
+
type: 'input',
|
8651
|
+
hidden: function hidden(data) {
|
8652
|
+
return (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined;
|
8653
|
+
}
|
8654
|
+
}, {
|
8655
|
+
name: ['socialUrls', 'linkedin'],
|
8656
|
+
label: t('backoffice.form.organizationdetails.items.linkedinUrl'),
|
8657
|
+
tabgroup: t('backoffice.form.organizationdetails.additionalContactData'),
|
8658
|
+
type: 'input',
|
8659
|
+
hidden: function hidden(data) {
|
8660
|
+
return (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined;
|
8661
|
+
}
|
8662
|
+
}, {
|
8663
|
+
name: ['socialUrls', 'youtube'],
|
8664
|
+
label: t('backoffice.form.organizationdetails.items.youtubeUrl'),
|
8665
|
+
tabgroup: t('backoffice.form.organizationdetails.additionalContactData'),
|
8666
|
+
type: 'input',
|
8667
|
+
hidden: function hidden(data) {
|
8668
|
+
return (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined;
|
8669
|
+
}
|
8670
|
+
}, {
|
8671
|
+
type: 'subTitle',
|
8672
|
+
name: t('backoffice.form.organizationdetails.additionalContactData'),
|
8673
|
+
tabgroup: t('backoffice.form.organizationdetails.additionalContactData')
|
8674
|
+
}, {
|
8675
|
+
name: ['additionalContactData'],
|
8676
|
+
label: t('Zusätzliche Kontaktdaten'),
|
8677
|
+
tabgroup: t('backoffice.form.organizationdetails.additionalContactData'),
|
8678
|
+
type: 'array',
|
8679
|
+
items: [{
|
8680
|
+
name: 'street',
|
8681
|
+
label: t('backoffice.form.organizationdetails.items.street'),
|
8682
|
+
type: 'input',
|
8683
|
+
hidden: function hidden(data) {
|
8684
|
+
return (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined;
|
8685
|
+
}
|
8686
|
+
}, {
|
8687
|
+
label: t('backoffice.form.organizationdetails.items.zipCode'),
|
8688
|
+
name: 'zipCode',
|
8689
|
+
type: 'input',
|
8690
|
+
hidden: function hidden(data) {
|
8691
|
+
return (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined;
|
8692
|
+
}
|
8693
|
+
}, {
|
8694
|
+
label: t('backoffice.form.organizationdetails.items.city'),
|
8695
|
+
name: 'city',
|
8696
|
+
type: 'input',
|
8697
|
+
hidden: function hidden(data) {
|
8698
|
+
return (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined;
|
8699
|
+
}
|
8700
|
+
}, {
|
8701
|
+
name: 'countryCode',
|
8702
|
+
label: t('backoffice.form.organizationdetails.items.countryCode'),
|
8703
|
+
type: 'selectSimple',
|
8704
|
+
apiInterface: {
|
8705
|
+
read: {
|
8706
|
+
list: '/country_codes.json',
|
8707
|
+
"public": true
|
8708
|
+
}
|
8709
|
+
},
|
8710
|
+
selectMapping: {
|
8711
|
+
label: "${".concat(lang, "}"),
|
8712
|
+
value: '${code}',
|
8713
|
+
externalValue: 'value'
|
8714
|
+
},
|
8715
|
+
placeholder: t('backoffice.form.organizationdetails.items.selectCountryCode'),
|
8716
|
+
allowClear: true,
|
8717
|
+
search: true
|
8718
|
+
}, {
|
8719
|
+
name: 'email',
|
8720
|
+
label: t('backoffice.form.organizationdetails.items.email'),
|
8721
|
+
type: 'input',
|
8722
|
+
hidden: function hidden(data) {
|
8723
|
+
return (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined;
|
8724
|
+
}
|
8725
|
+
}, {
|
8726
|
+
name: 'phone',
|
8727
|
+
label: t('backoffice.form.organizationdetails.items.phone'),
|
8728
|
+
type: 'input',
|
8729
|
+
hidden: function hidden(data) {
|
8730
|
+
return (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined;
|
8731
|
+
}
|
8732
|
+
}, {
|
8733
|
+
type: 'divider',
|
8734
|
+
name: ''
|
8735
|
+
}],
|
8736
|
+
initialValue: []
|
8557
8737
|
}]
|
8558
8738
|
},
|
8559
8739
|
FromAffilateOrganizationDetails: {
|
@@ -8809,6 +8989,14 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
8809
8989
|
}, {
|
8810
8990
|
name: 'mediaItemRefVideo',
|
8811
8991
|
hidden: true
|
8992
|
+
}, {
|
8993
|
+
name: 'loop',
|
8994
|
+
type: 'checkbox',
|
8995
|
+
label: t('backoffice.form.contentItem.loop'),
|
8996
|
+
doTranslate: false,
|
8997
|
+
hidden: function hidden(d) {
|
8998
|
+
return (d === null || d === void 0 ? void 0 : d.type) !== 'Video';
|
8999
|
+
}
|
8812
9000
|
}]
|
8813
9001
|
});
|
8814
9002
|
translationItems.push({
|
@@ -8867,6 +9055,12 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
8867
9055
|
label: t('backoffice.form.api2servers.items.url'),
|
8868
9056
|
doTranslate: true
|
8869
9057
|
});
|
9058
|
+
translationItems.push({
|
9059
|
+
name: [].concat(_toConsumableArray(p), ['loop']),
|
9060
|
+
type: 'checkbox',
|
9061
|
+
label: t('backoffice.form.contentItem.loop'),
|
9062
|
+
doTranslate: false
|
9063
|
+
});
|
8870
9064
|
break;
|
8871
9065
|
case 'Wrapper':
|
8872
9066
|
translationItems.push({
|
@@ -9102,6 +9296,12 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
9102
9296
|
label: t('backoffice.form.api2servers.items.url'),
|
9103
9297
|
doTranslate: true
|
9104
9298
|
});
|
9299
|
+
translationItems.push({
|
9300
|
+
name: [].concat(_toConsumableArray(p), ['loop']),
|
9301
|
+
type: 'checkbox',
|
9302
|
+
label: t('backoffice.form.contentItem.loop'),
|
9303
|
+
doTranslate: false
|
9304
|
+
});
|
9105
9305
|
break;
|
9106
9306
|
case 'Wrapper':
|
9107
9307
|
translationItems.push({
|
@@ -9302,6 +9502,13 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
9302
9502
|
name: 'divaNr',
|
9303
9503
|
label: t('backoffice.form.createorupdateviewpoints.items.divaNr'),
|
9304
9504
|
type: 'input'
|
9505
|
+
}, {
|
9506
|
+
name: 'functionType',
|
9507
|
+
label: t('backoffice.form.createorupdateviewpoints.items.functionType'),
|
9508
|
+
type: 'select',
|
9509
|
+
required: true,
|
9510
|
+
values: functionTypeValues,
|
9511
|
+
mode: 'single'
|
9305
9512
|
}]
|
9306
9513
|
},
|
9307
9514
|
FormCreateOrUpdateRenderPackages: {
|
@@ -9390,6 +9597,9 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
9390
9597
|
label: t('Presets'),
|
9391
9598
|
type: 'array',
|
9392
9599
|
items: [{
|
9600
|
+
type: 'divider',
|
9601
|
+
name: ''
|
9602
|
+
}, {
|
9393
9603
|
type: 'radio',
|
9394
9604
|
name: 'job',
|
9395
9605
|
label: t('Job'),
|
@@ -9440,6 +9650,13 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
9440
9650
|
}
|
9441
9651
|
return hidden;
|
9442
9652
|
}
|
9653
|
+
}, {
|
9654
|
+
name: 'functionType',
|
9655
|
+
label: 'FunctionType',
|
9656
|
+
type: 'select',
|
9657
|
+
required: true,
|
9658
|
+
values: functionTypeValues,
|
9659
|
+
mode: 'single'
|
9443
9660
|
}, {
|
9444
9661
|
name: 'preset',
|
9445
9662
|
label: t('Preset'),
|
@@ -9647,7 +9864,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
9647
9864
|
op: 'gt',
|
9648
9865
|
value: 3
|
9649
9866
|
},
|
9650
|
-
values:
|
9867
|
+
values: functionTypeValues
|
9651
9868
|
}, {
|
9652
9869
|
name: 'priority',
|
9653
9870
|
label: t('backoffice.form.renderjob.items.priority'),
|
@@ -9907,7 +10124,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
9907
10124
|
value: 3
|
9908
10125
|
},
|
9909
10126
|
allowClear: true,
|
9910
|
-
values:
|
10127
|
+
values: functionTypeValues
|
9911
10128
|
}, {
|
9912
10129
|
name: 'priority',
|
9913
10130
|
label: t('backoffice.form.renderjob.items.priority'),
|
@@ -10082,7 +10299,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
10082
10299
|
value: 3
|
10083
10300
|
},
|
10084
10301
|
allowClear: true,
|
10085
|
-
values:
|
10302
|
+
values: functionTypeValues
|
10086
10303
|
}, {
|
10087
10304
|
name: 'priority',
|
10088
10305
|
label: t('backoffice.form.renderjob.items.priority'),
|
@@ -10224,7 +10441,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
10224
10441
|
value: 3
|
10225
10442
|
},
|
10226
10443
|
allowClear: true,
|
10227
|
-
values:
|
10444
|
+
values: functionTypeValues
|
10228
10445
|
}, {
|
10229
10446
|
name: 'priority',
|
10230
10447
|
label: t('backoffice.form.renderjob.items.priority'),
|
@@ -10383,7 +10600,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
10383
10600
|
type: 'select',
|
10384
10601
|
mode: 'single',
|
10385
10602
|
allowClear: true,
|
10386
|
-
values:
|
10603
|
+
values: functionTypeValues
|
10387
10604
|
}, {
|
10388
10605
|
name: 'priority',
|
10389
10606
|
label: t('backoffice.form.renderjob.items.priority'),
|
@@ -13246,6 +13463,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
13246
13463
|
}
|
13247
13464
|
};
|
13248
13465
|
}
|
13466
|
+
var functionTypeValues = ['PROD', 'PROD_SEC', 'PROD_CLOSE', 'PROD_MILIEU', 'SHO', 'CONFIG_INFO', 'AR_INFO', 'PROD_DETAIL', 'CAT', 'PLN', 'LOG', 'FUNC', 'COMMERCIAL', 'TPL', 'ASI', 'PLT', 'CAI', 'BAN', 'INF', 'OTH', 'ART', 'OPV'];
|
13249
13467
|
|
13250
13468
|
function styleInject(css, ref) {
|
13251
13469
|
if ( ref === void 0 ) ref = {};
|
@@ -13280,8 +13498,8 @@ var navMinified = "nav-minified-tSt-a";
|
|
13280
13498
|
var navOverlay = "nav-overlay-rKJNC";
|
13281
13499
|
var navSettings = "nav-settings-82cjv";
|
13282
13500
|
var menuLabel = "menu-label-4dXQk";
|
13283
|
-
var css_248z$
|
13284
|
-
styleInject(css_248z$
|
13501
|
+
var css_248z$y = ".nav-minify-button-ZX7dm {\n color: rgba(255, 255, 255, 0.65);\n background: #001529;\n cursor: pointer;\n padding: 10px;\n height: 40px;\n}\n\n.nav-minify-button-ZX7dm:hover {\n color: #fff;\n background-color: rgba(0, 0, 0, 0.06);\n}\n\n.nav-minify-button-ZX7dm .anticon {\n float: right;\n}\n\n.nav-container-JCR24 {\n display: flex;\n min-width: 30px;\n overflow: visible;\n z-index: 10001;\n}\n\n.nav-container-JCR24 .ant-layout-sider-children {\n display: flex;\n flex-direction: column;\n}\n\n.nav-minified-tSt-a {\n flex: 0 0 30px !important;\n max-width: 30px !important;\n min-width: 30px !important;\n width: 30px !important;\n}\n\n.nav-minified-tSt-a {\n /* position: absolute !important; */\n height: 100%;\n z-index: 1;\n}\n\n.nav-overlay-rKJNC {\n max-width: 200px !important;\n min-width: 200px !important;\n width: 200px !important;\n}\n\n.nav-minified-tSt-a .ant-menu-root {\n display: none;\n}\n\n.nav-overlay-rKJNC .ant-menu-root {\n display: inline !important;\n display: initial !important;\n}\n\n.nav-settings-82cjv {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin: auto 18px 55px;\n}\n\n.nav-container-JCR24 .ant-menu-title-content {\n overflow: visible;\n}\n\n.menu-label-4dXQk {\n display: flex;\n}\n\n.ant-menu .ant-menu-item .menu-label-4dXQk .anticon {\n margin-left: auto;\n margin-right: -6px;\n font-size: 10px;\n}\n\n.menu-label-4dXQk span:first-child {\n width: 120px;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n";
|
13502
|
+
styleInject(css_248z$y);
|
13285
13503
|
|
13286
13504
|
function MenuLabel (_ref) {
|
13287
13505
|
var disabled = _ref.disabled,
|
@@ -17004,7 +17222,7 @@ var JsonEditor$2 = function JsonEditor(_ref) {
|
|
17004
17222
|
});
|
17005
17223
|
};
|
17006
17224
|
|
17007
|
-
var _excluded$
|
17225
|
+
var _excluded$4 = ["key", "name"];
|
17008
17226
|
function ownKeys$U(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; }
|
17009
17227
|
function _objectSpread$U(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$U(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$U(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
17010
17228
|
var FormList$2 = function FormList(_ref) {
|
@@ -17040,7 +17258,7 @@ var FormList$2 = function FormList(_ref) {
|
|
17040
17258
|
children: [fields.map(function (_ref3) {
|
17041
17259
|
var key = _ref3.key,
|
17042
17260
|
name = _ref3.name,
|
17043
|
-
restField = _objectWithoutProperties(_ref3, _excluded$
|
17261
|
+
restField = _objectWithoutProperties(_ref3, _excluded$4);
|
17044
17262
|
return /*#__PURE__*/jsxs("div", {
|
17045
17263
|
id: key.toString(),
|
17046
17264
|
style: {
|
@@ -17236,8 +17454,8 @@ var Result = function Result(_ref) {
|
|
17236
17454
|
|
17237
17455
|
var success = "success-tRJ7j";
|
17238
17456
|
var error = "error-MtAFB";
|
17239
|
-
var css_248z$
|
17240
|
-
styleInject(css_248z$
|
17457
|
+
var css_248z$x = ".success-tRJ7j {\n color: #fff !important;\n background-color: #449d44 !important;\n border-color: #398439 !important;\n}\n\n.error-MtAFB {\n color: #fff !important;\n background-color: #c9302c !important;\n border-color: #ac2925 !important;\n}\n";
|
17458
|
+
styleInject(css_248z$x);
|
17241
17459
|
|
17242
17460
|
var azureIcon = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2048%2048%22%20width%3D%2248px%22%20height%3D%2248px%22%3E%20%3ClinearGradient%20id%3D%22k8yl7~hDat~FaoWq8WjN6a%22%20x1%3D%22-1254.397%22%20x2%3D%22-1261.911%22%20y1%3D%22877.268%22%20y2%3D%22899.466%22%20gradientTransform%3D%22translate%281981.75%20-1362.063%29%20scale%281.5625%29%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%20%20%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23114a8b%22%2F%3E%20%20%3Cstop%20offset%3D%221%22%20stop-color%3D%22%230669bc%22%2F%3E%20%3C%2FlinearGradient%3E%20%3Cpath%20fill%3D%22url%28%23k8yl7~hDat~FaoWq8WjN6a%29%22%20d%3D%22M17.634%2C6h11.305L17.203%2C40.773c-0.247%2C0.733-0.934%2C1.226-1.708%2C1.226H6.697%20c-0.994%2C0-1.8-0.806-1.8-1.8c0-0.196%2C0.032-0.39%2C0.094-0.576L15.926%2C7.227C16.173%2C6.494%2C16.86%2C6%2C17.634%2C6L17.634%2C6z%22%2F%3E%20%3Cpath%20fill%3D%22%230078d4%22%20d%3D%22M34.062%2C29.324H16.135c-0.458-0.001-0.83%2C0.371-0.831%2C0.829c0%2C0.231%2C0.095%2C0.451%2C0.264%2C0.608%20l11.52%2C10.752C27.423%2C41.826%2C27.865%2C42%2C28.324%2C42h10.151L34.062%2C29.324z%22%2F%3E%20%3ClinearGradient%20id%3D%22k8yl7~hDat~FaoWq8WjN6b%22%20x1%3D%22-1252.05%22%20x2%3D%22-1253.788%22%20y1%3D%22887.612%22%20y2%3D%22888.2%22%20gradientTransform%3D%22translate%281981.75%20-1362.063%29%20scale%281.5625%29%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%20%20%3Cstop%20offset%3D%220%22%20stop-opacity%3D%22.3%22%2F%3E%20%20%3Cstop%20offset%3D%22.071%22%20stop-opacity%3D%22.2%22%2F%3E%20%20%3Cstop%20offset%3D%22.321%22%20stop-opacity%3D%22.1%22%2F%3E%20%20%3Cstop%20offset%3D%22.623%22%20stop-opacity%3D%22.05%22%2F%3E%20%20%3Cstop%20offset%3D%221%22%20stop-opacity%3D%220%22%2F%3E%20%3C%2FlinearGradient%3E%20%3Cpath%20fill%3D%22url%28%23k8yl7~hDat~FaoWq8WjN6b%29%22%20d%3D%22M17.634%2C6c-0.783-0.003-1.476%2C0.504-1.712%2C1.25L5.005%2C39.595%20c-0.335%2C0.934%2C0.151%2C1.964%2C1.085%2C2.299C6.286%2C41.964%2C6.493%2C42%2C6.702%2C42h9.026c0.684-0.122%2C1.25-0.603%2C1.481-1.259l2.177-6.416%20l7.776%2C7.253c0.326%2C0.27%2C0.735%2C0.419%2C1.158%2C0.422h10.114l-4.436-12.676l-12.931%2C0.003L28.98%2C6H17.634z%22%2F%3E%20%3ClinearGradient%20id%3D%22k8yl7~hDat~FaoWq8WjN6c%22%20x1%3D%22-1252.952%22%20x2%3D%22-1244.704%22%20y1%3D%22876.6%22%20y2%3D%22898.575%22%20gradientTransform%3D%22translate%281981.75%20-1362.063%29%20scale%281.5625%29%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%20%20%3Cstop%20offset%3D%220%22%20stop-color%3D%22%233ccbf4%22%2F%3E%20%20%3Cstop%20offset%3D%221%22%20stop-color%3D%22%232892df%22%2F%3E%20%3C%2FlinearGradient%3E%20%3Cpath%20fill%3D%22url%28%23k8yl7~hDat~FaoWq8WjN6c%29%22%20d%3D%22M32.074%2C7.225C31.827%2C6.493%2C31.141%2C6%2C30.368%2C6h-12.6c0.772%2C0%2C1.459%2C0.493%2C1.705%2C1.224%20l10.935%2C32.399c0.318%2C0.942-0.188%2C1.963-1.13%2C2.281C29.093%2C41.968%2C28.899%2C42%2C28.703%2C42h12.6c0.994%2C0%2C1.8-0.806%2C1.8-1.801%20c0-0.196-0.032-0.39-0.095-0.575L32.074%2C7.225z%22%2F%3E%3C%2Fsvg%3E";
|
17243
17461
|
|
@@ -17299,10 +17517,10 @@ var CustomButton = function CustomButton(_ref) {
|
|
17299
17517
|
};
|
17300
17518
|
var CustomButton$1 = observer(CustomButton);
|
17301
17519
|
|
17302
|
-
var wrapper$
|
17520
|
+
var wrapper$6 = "wrapper-GVe2h";
|
17303
17521
|
var buttonGroup = "button-group-GYt-T";
|
17304
|
-
var css_248z$
|
17305
|
-
styleInject(css_248z$
|
17522
|
+
var css_248z$w = ".wrapper-GVe2h {\n display: flex;\n flex-direction: row;\n gap: 12px;\n}\n\n.button-group-GYt-T {\n display: flex;\n flex-direction: row;\n gap: 12px;\n margin: 0 12px;\n}\n";
|
17523
|
+
styleInject(css_248z$w);
|
17306
17524
|
|
17307
17525
|
function ownKeys$T(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; }
|
17308
17526
|
function _objectSpread$T(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$T(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$T(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
@@ -17316,7 +17534,7 @@ var SubTitle = function SubTitle(_ref) {
|
|
17316
17534
|
orientation: (_item$orientation = item.orientation) !== null && _item$orientation !== void 0 ? _item$orientation : 'left',
|
17317
17535
|
style: _objectSpread$T({}, item.style),
|
17318
17536
|
children: /*#__PURE__*/jsxs("div", {
|
17319
|
-
className: wrapper$
|
17537
|
+
className: wrapper$6,
|
17320
17538
|
children: [Array.isArray(item.name) ? t(item.name[0].toString()) : t(item.name), ((_item$buttonIds = item.buttonIds) === null || _item$buttonIds === void 0 ? void 0 : _item$buttonIds.length) && item.buttonIds.map(function (b) {
|
17321
17539
|
return /*#__PURE__*/jsx("div", {
|
17322
17540
|
className: buttonGroup,
|
@@ -17475,14 +17693,29 @@ function useSelectSimpleData (_ref) {
|
|
17475
17693
|
});
|
17476
17694
|
return selected.value;
|
17477
17695
|
}, [selected]);
|
17696
|
+
var setLoadedOptions = function setLoadedOptions(options) {
|
17697
|
+
var _options$;
|
17698
|
+
setOptions(options);
|
17699
|
+
if (value && options) {
|
17700
|
+
LOG$a.debug('value changed', toJS(value), toJS(options));
|
17701
|
+
var _selected = findByValue(value, options, selectMapping);
|
17702
|
+
var selectedValues = Array.isArray(_selected) ? _selected.map(function (item) {
|
17703
|
+
return item.value;
|
17704
|
+
}) : _selected === null || _selected === void 0 ? void 0 : _selected.value;
|
17705
|
+
onSelectionChanged(selectedValues, _selected);
|
17706
|
+
} else if (options !== null && options !== void 0 && (_options$ = options[0]) !== null && _options$ !== void 0 && _options$.value && autoSelectFirst) {
|
17707
|
+
onSelectionChanged(options[0].value, options[0]);
|
17708
|
+
}
|
17709
|
+
};
|
17478
17710
|
useEffect(function () {
|
17479
17711
|
if (configuredOptions) {
|
17480
17712
|
if (apiHandler.canReadList) LOG$a.warn('If options are provided, apiInterface will not be used');
|
17481
|
-
|
17713
|
+
setLoadedOptions(configuredOptions);
|
17482
17714
|
setLoading(false);
|
17483
17715
|
return;
|
17484
17716
|
}
|
17485
|
-
if (options) {
|
17717
|
+
if (sharedState !== null && sharedState !== void 0 && sharedState.options) {
|
17718
|
+
setLoadedOptions(sharedState.options);
|
17486
17719
|
setLoading(false);
|
17487
17720
|
return;
|
17488
17721
|
}
|
@@ -17494,25 +17727,11 @@ function useSelectSimpleData (_ref) {
|
|
17494
17727
|
var options = data.data.map(function (item) {
|
17495
17728
|
return parseDataEntry(item, selectMapping);
|
17496
17729
|
});
|
17497
|
-
|
17730
|
+
setLoadedOptions(options);
|
17498
17731
|
})["finally"](function () {
|
17499
17732
|
setLoading(false);
|
17500
17733
|
});
|
17501
17734
|
}, []);
|
17502
|
-
useEffect(function () {
|
17503
|
-
var _options$;
|
17504
|
-
// set the selected option only after the options are loaded
|
17505
|
-
if (value && options) {
|
17506
|
-
LOG$a.debug('value changed', value);
|
17507
|
-
var _selected = findByValue(value, options, selectMapping);
|
17508
|
-
var selectedValues = Array.isArray(_selected) ? _selected.map(function (item) {
|
17509
|
-
return item.value;
|
17510
|
-
}) : _selected === null || _selected === void 0 ? void 0 : _selected.value;
|
17511
|
-
onSelectionChanged(selectedValues, _selected);
|
17512
|
-
} else if (options !== null && options !== void 0 && (_options$ = options[0]) !== null && _options$ !== void 0 && _options$.value && autoSelectFirst) {
|
17513
|
-
onSelectionChanged(options[0].value, options[0]);
|
17514
|
-
}
|
17515
|
-
}, [value, options]);
|
17516
17735
|
var onSelectionChanged = function onSelectionChanged(value, option) {
|
17517
17736
|
setSelected(option);
|
17518
17737
|
onChange === null || onChange === void 0 || onChange(parseReturnData(option, selectMapping));
|
@@ -17577,11 +17796,11 @@ function parseReturnData(options, selectMapping) {
|
|
17577
17796
|
return (selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.externalValue) == 'value' ? options.value : options.data;
|
17578
17797
|
}
|
17579
17798
|
|
17580
|
-
var wrapper$
|
17581
|
-
var css_248z$
|
17582
|
-
styleInject(css_248z$
|
17799
|
+
var wrapper$5 = "wrapper-4xyke";
|
17800
|
+
var css_248z$v = ".wrapper-4xyke {\n display: flex;\n flex-direction: column;\n min-height: 50px;\n justify-content: flex-end;\n font-size: 12px;\n}\n";
|
17801
|
+
styleInject(css_248z$v);
|
17583
17802
|
|
17584
|
-
var _excluded$
|
17803
|
+
var _excluded$3 = ["apiInterface", "selectMapping", "apiMapping", "onChange", "value", "search", "options", "autoSelectFirst", "title", "sharedState"];
|
17585
17804
|
function ownKeys$S(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; }
|
17586
17805
|
function _objectSpread$S(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$S(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$S(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
17587
17806
|
var SelectWrapper$1 = function SelectWrapper(_ref, ref) {
|
@@ -17595,7 +17814,7 @@ var SelectWrapper$1 = function SelectWrapper(_ref, ref) {
|
|
17595
17814
|
autoSelectFirst = _ref.autoSelectFirst,
|
17596
17815
|
title = _ref.title,
|
17597
17816
|
sharedState = _ref.sharedState,
|
17598
|
-
selectProps = _objectWithoutProperties(_ref, _excluded$
|
17817
|
+
selectProps = _objectWithoutProperties(_ref, _excluded$3);
|
17599
17818
|
var state = useSelectSimpleData({
|
17600
17819
|
apiInterface: apiInterface,
|
17601
17820
|
selectMapping: selectMapping,
|
@@ -17609,7 +17828,7 @@ var SelectWrapper$1 = function SelectWrapper(_ref, ref) {
|
|
17609
17828
|
});
|
17610
17829
|
return /*#__PURE__*/jsxs("div", {
|
17611
17830
|
ref: ref,
|
17612
|
-
className: classnames(title ? wrapper$
|
17831
|
+
className: classnames(title ? wrapper$5 : undefined),
|
17613
17832
|
children: [title, /*#__PURE__*/jsx(Select$1, _objectSpread$S(_objectSpread$S({}, selectProps), {}, {
|
17614
17833
|
showSearch: search,
|
17615
17834
|
loading: state.loading,
|
@@ -18463,8 +18682,8 @@ var customSelect = "custom-select-ESUJX";
|
|
18463
18682
|
var customSelectOption = "custom-select-option-dUA7N";
|
18464
18683
|
var avatarWrapper = "avatar-wrapper-Vg-xe";
|
18465
18684
|
var selectTextWrapper = "select-text-wrapper-hPSZW";
|
18466
|
-
var css_248z$
|
18467
|
-
styleInject(css_248z$
|
18685
|
+
var css_248z$u = ".custom-select-ESUJX {\n width: 300px;\n}\n\n.custom-select-option-dUA7N.ant-select-item {\n margin: 0px 12px;\n padding: 0px;\n border-bottom: 1px solid #ddd;\n}\n\n.custom-select-option-dUA7N .ant-select-item-option-content {\n display: flex;\n align-items: center;\n}\n\n.avatar-wrapper-Vg-xe {\n margin-right: 5px;\n height: 30px;\n width: 24px;\n float: left;\n position: relative;\n}\n\n.avatar-wrapper-Vg-xe > span {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n\n.select-text-wrapper-hPSZW {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: normal;\n width: calc(100% - 29px);\n}\n";
|
18686
|
+
styleInject(css_248z$u);
|
18468
18687
|
|
18469
18688
|
var Selector = function Selector(_ref) {
|
18470
18689
|
var items = _ref.items,
|
@@ -19008,8 +19227,8 @@ function useSelectData (_ref) {
|
|
19008
19227
|
};
|
19009
19228
|
}
|
19010
19229
|
|
19011
|
-
var css_248z$
|
19012
|
-
styleInject(css_248z$
|
19230
|
+
var css_248z$t = ".darkmode .ant-select-selection-search-input {\n color: #fff;\n}\n";
|
19231
|
+
styleInject(css_248z$t);
|
19013
19232
|
|
19014
19233
|
var SelectWrapper = function SelectWrapper(_ref) {
|
19015
19234
|
var onChange = _ref.onChange,
|
@@ -19088,11 +19307,11 @@ var SelectWrapper = function SelectWrapper(_ref) {
|
|
19088
19307
|
};
|
19089
19308
|
var Select = observer(SelectWrapper);
|
19090
19309
|
|
19091
|
-
var wrapper$
|
19310
|
+
var wrapper$4 = "wrapper-WStAk";
|
19092
19311
|
var headerWrapper = "header-wrapper-gWQuH";
|
19093
19312
|
var buttonsWrapper$1 = "buttons-wrapper-7ebR9";
|
19094
|
-
var css_248z$
|
19095
|
-
styleInject(css_248z$
|
19313
|
+
var css_248z$s = ".wrapper-WStAk {\n display: flex;\n flex-direction: column;\n}\n.header-wrapper-gWQuH {\n display: flex;\n align-items: center;\n gap: 6px;\n margin-left: 64px;\n}\n\n.buttons-wrapper-7ebR9 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-grow: 1;\n}\n";
|
19314
|
+
styleInject(css_248z$s);
|
19096
19315
|
|
19097
19316
|
function ownKeys$P(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; }
|
19098
19317
|
function _objectSpread$P(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$P(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$P(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
@@ -19296,7 +19515,7 @@ var Translation = function Translation(_ref) {
|
|
19296
19515
|
_onChange = _useTranslationHook.onChange,
|
19297
19516
|
autoTranslate = _useTranslationHook.autoTranslate;
|
19298
19517
|
return /*#__PURE__*/jsxs("div", {
|
19299
|
-
className: wrapper$
|
19518
|
+
className: wrapper$4,
|
19300
19519
|
children: [/*#__PURE__*/jsxs("div", {
|
19301
19520
|
className: headerWrapper,
|
19302
19521
|
children: [/*#__PURE__*/jsx("div", {
|
@@ -19875,6 +20094,8 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
19875
20094
|
item: item,
|
19876
20095
|
data: state.data
|
19877
20096
|
});
|
20097
|
+
case 'divider':
|
20098
|
+
return /*#__PURE__*/jsx(Divider, {});
|
19878
20099
|
case 'apiKey':
|
19879
20100
|
return /*#__PURE__*/jsx(ApiKey, {
|
19880
20101
|
value: item.value,
|
@@ -20170,7 +20391,6 @@ function ModalProgressBar(_ref) {
|
|
20170
20391
|
|
20171
20392
|
var LOG$7 = getLogger('Backoffice', 'Form');
|
20172
20393
|
var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
20173
|
-
var _state$selectedItems2;
|
20174
20394
|
var id = _ref.id,
|
20175
20395
|
data = _ref.data,
|
20176
20396
|
onChange = _ref.onChange,
|
@@ -20313,18 +20533,59 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
20313
20533
|
onErrorInternal('An unexpected error prevented finishing');
|
20314
20534
|
}
|
20315
20535
|
};
|
20316
|
-
|
20317
|
-
|
20318
|
-
|
20319
|
-
|
20320
|
-
|
20321
|
-
|
20322
|
-
|
20323
|
-
|
20324
|
-
|
20325
|
-
|
20326
|
-
|
20327
|
-
|
20536
|
+
|
20537
|
+
// Group items by tabgroup
|
20538
|
+
var groupItemsByTabGroup = function groupItemsByTabGroup() {
|
20539
|
+
if (!state.selectedItems) return [];
|
20540
|
+
var groups = {};
|
20541
|
+
state.selectedItems.forEach(function (item) {
|
20542
|
+
var tabGroup = item.tabgroup || 'default';
|
20543
|
+
if (!groups[tabGroup]) {
|
20544
|
+
groups[tabGroup] = [];
|
20545
|
+
}
|
20546
|
+
groups[tabGroup].push(item);
|
20547
|
+
});
|
20548
|
+
return Object.entries(groups).map(function (_ref7) {
|
20549
|
+
var _ref8 = _slicedToArray(_ref7, 2),
|
20550
|
+
tabGroup = _ref8[0],
|
20551
|
+
items = _ref8[1];
|
20552
|
+
return {
|
20553
|
+
tabGroup: tabGroup,
|
20554
|
+
items: items
|
20555
|
+
};
|
20556
|
+
});
|
20557
|
+
};
|
20558
|
+
var renderFormItems = function renderFormItems(items) {
|
20559
|
+
return /*#__PURE__*/jsx(Fragment, {
|
20560
|
+
children: items.map(function (item) {
|
20561
|
+
var _state$hiddenRequired, _state$hiddenRequired2, _state$hiddenRequired3;
|
20562
|
+
return /*#__PURE__*/jsxs("div", {
|
20563
|
+
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$1.Item, {
|
20564
|
+
name: item.name,
|
20565
|
+
rules: state.getRules(item, state.data),
|
20566
|
+
label: getLabel(item, t),
|
20567
|
+
valuePropName: item.type == 'checkbox' ? 'checked' : 'value',
|
20568
|
+
initialValue: item === null || item === void 0 ? void 0 : item.defaultValue,
|
20569
|
+
hasFeedback: !!state.fieldErrors[item.name.toString()],
|
20570
|
+
validateStatus: !!state.fieldErrors[item.name.toString()] ? 'error' : undefined,
|
20571
|
+
help: state.fieldErrors[item.name.toString()],
|
20572
|
+
hidden: (_state$hiddenRequired2 = state.hiddenRequiredDisabled[typeof item.name == 'string' ? item.name : item.name.join('.')]) === null || _state$hiddenRequired2 === void 0 ? void 0 : _state$hiddenRequired2.hidden,
|
20573
|
+
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)
|
20574
|
+
}, Array.isArray(item.name) ? item.name.join('.') : item.name)]
|
20575
|
+
}, item.name.toString());
|
20576
|
+
})
|
20577
|
+
});
|
20578
|
+
};
|
20579
|
+
var tabGroups = useMemo(function () {
|
20580
|
+
return groupItemsByTabGroup();
|
20581
|
+
}, [state.selectedItems]);
|
20582
|
+
|
20583
|
+
// Create tab items dynamically
|
20584
|
+
var tabItems = tabGroups.map(function (group, index) {
|
20585
|
+
return {
|
20586
|
+
key: group.tabGroup === 'default' ? '99' : index.toString(),
|
20587
|
+
label: group.tabGroup === 'default' ? t('backoffice.menu.items.label.systemOther') : group.tabGroup,
|
20588
|
+
children: /*#__PURE__*/jsxs(Form$1, {
|
20328
20589
|
autoComplete: "off",
|
20329
20590
|
form: form,
|
20330
20591
|
onFinish: onFinish,
|
@@ -20340,30 +20601,78 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
20340
20601
|
if (changedFields[0] === undefined) return;
|
20341
20602
|
state.changedFields.current.push(changedFields[0]);
|
20342
20603
|
},
|
20343
|
-
children: [state.configuration.itemSelector && /*#__PURE__*/jsx(Form$1.Item, {
|
20604
|
+
children: [state.configuration.itemSelector && index === 0 && /*#__PURE__*/jsx(Form$1.Item, {
|
20344
20605
|
name: state.configuration.itemSelector.name,
|
20345
20606
|
rules: state.getRules(state.configuration.itemSelector, state.data),
|
20346
20607
|
label: state.configuration.itemSelector.label ? t(state.configuration.itemSelector.label, state.configuration.itemSelector.label) : state.configuration.itemSelector.name,
|
20347
20608
|
valuePropName: state.configuration.itemSelector.type == 'checkbox' ? 'checked' : 'value',
|
20348
20609
|
children: getElement(state.configuration.itemSelector, setCanSave, state, state.configuration.itemSelector.name, state.onItemSelectorChanged, onErrorInternal)
|
20349
|
-
}, state.configuration.itemSelector.name.toString()), (
|
20350
|
-
|
20351
|
-
|
20352
|
-
|
20353
|
-
|
20354
|
-
|
20355
|
-
|
20356
|
-
|
20357
|
-
|
20358
|
-
|
20359
|
-
|
20360
|
-
|
20361
|
-
|
20362
|
-
|
20363
|
-
|
20364
|
-
|
20365
|
-
|
20366
|
-
|
20610
|
+
}, state.configuration.itemSelector.name.toString()), renderFormItems(group.items)]
|
20611
|
+
}, "".concat(state.selectedItemsIndex.toString(), "-").concat(index))
|
20612
|
+
};
|
20613
|
+
});
|
20614
|
+
|
20615
|
+
// If no tabgroups are defined, fall back to single form
|
20616
|
+
var hasTabGroups = tabGroups.length > 1 || tabGroups.length === 1 && tabGroups[0].tabGroup !== 'default';
|
20617
|
+
if (!hasTabGroups) {
|
20618
|
+
var singleForm = /*#__PURE__*/jsxs(Form$1, {
|
20619
|
+
autoComplete: "off",
|
20620
|
+
form: form,
|
20621
|
+
onFinish: onFinish,
|
20622
|
+
onFinishFailed: onFinishFailed,
|
20623
|
+
layout: "horizontal",
|
20624
|
+
onValuesChange: function onValuesChange(a, data) {
|
20625
|
+
state.updateHiddenRequiredDisabled(data, a);
|
20626
|
+
},
|
20627
|
+
labelCol: {
|
20628
|
+
span: 4
|
20629
|
+
},
|
20630
|
+
onFieldsChange: function onFieldsChange(changedFields) {
|
20631
|
+
if (changedFields[0] === undefined) return;
|
20632
|
+
state.changedFields.current.push(changedFields[0]);
|
20633
|
+
},
|
20634
|
+
children: [state.configuration.itemSelector && /*#__PURE__*/jsx(Form$1.Item, {
|
20635
|
+
name: state.configuration.itemSelector.name,
|
20636
|
+
rules: state.getRules(state.configuration.itemSelector, state.data),
|
20637
|
+
label: state.configuration.itemSelector.label ? t(state.configuration.itemSelector.label, state.configuration.itemSelector.label) : state.configuration.itemSelector.name,
|
20638
|
+
valuePropName: state.configuration.itemSelector.type == 'checkbox' ? 'checked' : 'value',
|
20639
|
+
children: getElement(state.configuration.itemSelector, setCanSave, state, state.configuration.itemSelector.name, state.onItemSelectorChanged, onErrorInternal)
|
20640
|
+
}, state.configuration.itemSelector.name.toString()), renderFormItems(state.selectedItems || [])]
|
20641
|
+
}, state.selectedItemsIndex.toString());
|
20642
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
20643
|
+
children: [/*#__PURE__*/jsxs(Spin, {
|
20644
|
+
spinning: state.loading,
|
20645
|
+
children: [state.configuration.presetApiInterface && /*#__PURE__*/jsx(Presets, {
|
20646
|
+
state: state,
|
20647
|
+
apiHandler: state.presetApiHandler,
|
20648
|
+
form: form,
|
20649
|
+
root: state.root,
|
20650
|
+
setUsedPreset: state.setUsedPreset,
|
20651
|
+
presets: state.preset.presets,
|
20652
|
+
setPresets: state.preset.setPresets
|
20653
|
+
}), singleForm]
|
20654
|
+
}), state.configuration.showProgressBar && /*#__PURE__*/jsx(ModalProgressBar, {
|
20655
|
+
isOpen: state.progressBarOpen,
|
20656
|
+
percent: state.progressBarPercentage
|
20657
|
+
})]
|
20658
|
+
});
|
20659
|
+
}
|
20660
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
20661
|
+
children: [/*#__PURE__*/jsxs(Spin, {
|
20662
|
+
spinning: state.loading,
|
20663
|
+
children: [state.configuration.presetApiInterface && /*#__PURE__*/jsx(Presets, {
|
20664
|
+
state: state,
|
20665
|
+
apiHandler: state.presetApiHandler,
|
20666
|
+
form: form,
|
20667
|
+
root: state.root,
|
20668
|
+
setUsedPreset: state.setUsedPreset,
|
20669
|
+
presets: state.preset.presets,
|
20670
|
+
setPresets: state.preset.setPresets
|
20671
|
+
}), /*#__PURE__*/jsx(Tabs, {
|
20672
|
+
items: _toConsumableArray(tabItems).sort(function (a, b) {
|
20673
|
+
return a.key.localeCompare(b.key);
|
20674
|
+
})
|
20675
|
+
})]
|
20367
20676
|
}), state.configuration.showProgressBar && /*#__PURE__*/jsx(ModalProgressBar, {
|
20368
20677
|
isOpen: state.progressBarOpen,
|
20369
20678
|
percent: state.progressBarPercentage
|
@@ -21138,8 +21447,8 @@ var skeleton = "skeleton--xCI0";
|
|
21138
21447
|
var filterField = "filterField-1kU1O";
|
21139
21448
|
var parentScroll = "parent-scroll-GmaL9";
|
21140
21449
|
var parent = "parent-NZJ3S";
|
21141
|
-
var css_248z$
|
21142
|
-
styleInject(css_248z$
|
21450
|
+
var css_248z$r = ".permission-Button-XctsZ {\n position: relative;\n top: 25px;\n left: -30px;\n float: right;\n height: 20px;\n z-index: 1000;\n}\n.select-lzft- {\n width: 100%;\n}\n.loadingOption-qCkRw {\n margin-top: 11px;\n padding-left: 500px;\n}\n.scroller-lrdk9 {\n overflow: auto;\n height: 100%;\n}\n\n.skeleton--xCI0 {\n padding-left: 25px;\n padding-bottom: 10px;\n}\n.filterField-1kU1O {\n display: flex;\n gap: 10px;\n}\n.filterField-1kU1O button {\n height: 32px;\n}\n.filterField-1kU1O div {\n height: 32px;\n}\n\n.parent-scroll-GmaL9 {\n overflow: auto;\n padding: 24px;\n flex: 1;\n display: flex;\n flex-direction: column;\n}\n.parent-NZJ3S {\n overflow: auto;\n padding: 24px;\n height: 100%;\n}\n\n.parent-scroll-GmaL9 .ant-spin-container {\n height: 100%;\n}\n.parent-scroll-GmaL9 .infinite-scroll-component__outerdiv {\n height: 100%;\n}\n.parent-scroll-GmaL9 .infinite-scroll-component {\n height: 100% !important;\n}\n";
|
21451
|
+
styleInject(css_248z$r);
|
21143
21452
|
|
21144
21453
|
function ownKeys$K(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; }
|
21145
21454
|
function _objectSpread$K(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$K(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$K(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
@@ -22384,8 +22693,8 @@ var newscroller = "newscroller-INKeD";
|
|
22384
22693
|
var antCollapseHeader = "ant-collapse-header--6FgU";
|
22385
22694
|
var itemTitle = "item-title--BTvC";
|
22386
22695
|
var itemDesc = "item-desc-DBiiF";
|
22387
|
-
var css_248z$
|
22388
|
-
styleInject(css_248z$
|
22696
|
+
var css_248z$q = ".diva-component-DIVA_BACKOFFICE_NEW .title-cl-ZAj2y {\n color: black;\n}\n.diva-component-DIVA_BACKOFFICE_NEW .description-m3mNY {\n color: grey;\n flex: 1 1 100%;\n margin-left: 25px;\n margin-top: -25px;\n}\n.diva-component-DIVA_BACKOFFICE_NEW .item-group-xWnj- {\n /* border-bottom: 1px solid black; */\n margin-bottom: 40px;\n}\n.diva-component-DIVA_BACKOFFICE_NEW .delete-item-otdSr {\n cursor: pointer;\n position: relative;\n float: right;\n top: 13px;\n margin-right: 20px;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .newscroller-INKeD {\n overflow: auto;\n height: 400px;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .ant-collapse-header--6FgU div {\n flex-wrap: wrap !important;\n}\n.diva-component-DIVA_BACKOFFICE_NEW a .item-title--BTvC {\n padding: 0 0 0 30px;\n color: rgba(0, 0, 0, 0.85);\n}\n.diva-component-DIVA_BACKOFFICE_NEW .item-desc-DBiiF {\n padding: 0 0 0 30px;\n color: rgba(0, 0, 0, 0.45);\n}\n";
|
22697
|
+
styleInject(css_248z$q);
|
22389
22698
|
|
22390
22699
|
function ownKeys$H(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; }
|
22391
22700
|
function _objectSpread$H(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$H(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$H(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
@@ -23797,8 +24106,8 @@ var jsoneditor = "jsoneditor-WMs15";
|
|
23797
24106
|
var preview = "preview-9wK81";
|
23798
24107
|
var previewButton = "preview-button-vupuG";
|
23799
24108
|
var editButton = "edit-button-m6r3M";
|
23800
|
-
var css_248z$
|
23801
|
-
styleInject(css_248z$
|
24109
|
+
var css_248z$p = ".jsoneditor-WMs15 .jsoneditor-menu .jsoneditor-transform {\n display: none;\n}\n.jsoneditor-WMs15 .jsoneditor-menu .jsoneditor-repair {\n display: none;\n}\n.jsoneditor-WMs15 .jsoneditor-menu .jsoneditor-poweredBy {\n display: none;\n}\n.jsoneditor-WMs15 .preview-9wK81 {\n background-color: #f19e34;\n}\n\n.jsoneditor-WMs15 .preview-button-vupuG {\n background-image: url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22iso-8859-1%22%3F%3E%3C!-- Generator%3A Adobe Illustrator 19.0.0%2C SVG Export Plug-In . SVG Version%3A 6.00 Build 0) --%3E%3Csvg version%3D%221.1%22 id%3D%22Layer_1%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22 x%3D%220px%22 y%3D%220px%22%09 viewBox%3D%220 0 502 502%22 style%3D%22enable-background%3Anew 0 0 502 502%3B%22 xml%3Aspace%3D%22preserve%22 fill%3D%22%23fff%22%3E%3Cg%3E%09%3Cg%3E%09%09%3Cg%3E%09%09%09%3Cpath d%3D%22M478.482%2C448.601l-101.6-101.599c8.089-15.262%2C12.339-32.29%2C12.339-49.717c0-35.689-18.182-69.164-47.804-88.743V92.53%09%09%09%09c0-2.652-1.054-5.196-2.929-7.071l-82.529-82.53C254.083%2C1.054%2C251.54%2C0%2C248.888%2C0H24.371c-5.522%2C0-10%2C4.477-10%2C10v427.735%09%09%09%09c0%2C5.523%2C4.478%2C10%2C10%2C10h307.046c5.522%2C0%2C10-4.477%2C10-10v-37.722l92.825%2C92.825c5.908%2C5.908%2C13.764%2C9.162%2C22.119%2C9.162%09%09%09%09c8.356%2C0%2C16.212-3.254%2C22.12-9.162C490.678%2C480.642%2C490.678%2C460.797%2C478.482%2C448.601z M307.276%2C82.53h-48.387V34.143%09%09%09%09l24.193%2C24.193L307.276%2C82.53z M321.417%2C396.377v31.358H34.371V20h204.517v72.53c0%2C5.523%2C4.478%2C10%2C10%2C10h72.529v95.662%09%09%09%09l0.009%2C0.014c-12.214-4.741-25.275-7.215-38.499-7.215c-58.61%2C0-106.294%2C47.683-106.294%2C106.293s47.684%2C106.293%2C106.294%2C106.293%09%09%09%09c13.224%2C0%2C26.285-2.474%2C38.499-7.215L321.417%2C396.377z M328.948%2C370.291c-0.848%2C0.536-1.706%2C1.057-2.574%2C1.563%09%09%09%09c-13.131%2C7.67-28.154%2C11.724-43.446%2C11.724c-47.583%2C0-86.294-38.711-86.294-86.293c0-47.582%2C38.711-86.293%2C86.294-86.293%09%09%09%09c15.291%2C0%2C30.315%2C4.054%2C43.447%2C11.724c26.428%2C15.435%2C42.846%2C44.008%2C42.846%2C74.569c0%2C16.35-4.595%2C32.264-13.289%2C46.022%09%09%09%09C349.097%2C354.125%2C339.766%2C363.455%2C328.948%2C370.291z M464.339%2C478.696c-2.131%2C2.131-4.964%2C3.304-7.978%2C3.304%09%09%09%09c-3.014%2C0-5.847-1.173-7.977-3.304l-98.706-98.706l-0.008-0.001c5.856-4.74%2C11.221-10.104%2C15.961-15.96l0.001%2C0.008%09%09%09%09l98.707%2C98.707C468.737%2C467.142%2C468.737%2C474.298%2C464.339%2C478.696z%22%2F%3E%09%09%09%3Cpath d%3D%22M246.838%2C238.403c-20.641%2C12.674-32.964%2C34.686-32.964%2C58.882c0%2C5.523%2C4.478%2C10%2C10%2C10c5.522%2C0%2C10-4.477%2C10-10%09%09%09%09c0-17.19%2C8.759-32.83%2C23.429-41.838c4.707-2.89%2C6.179-9.048%2C3.289-13.754C257.702%2C236.986%2C251.544%2C235.513%2C246.838%2C238.403z%22%2F%3E%09%09%09%3Cpath d%3D%22M317.708%2C237.624c-10.52-6.145-22.547-9.392-34.781-9.392c-5.522%2C0-10%2C4.477-10%2C10s4.478%2C10%2C10%2C10%09%09%09%09c8.693%2C0%2C17.232%2C2.304%2C24.693%2C6.662c1.586%2C0.926%2C3.321%2C1.367%2C5.034%2C1.367c3.438%2C0%2C6.785-1.775%2C8.645-4.958%09%09%09%09C324.085%2C246.533%2C322.477%2C240.409%2C317.708%2C237.624z%22%2F%3E%09%09%3C%2Fg%3E%09%3C%2Fg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3C%2Fsvg%3E\");\n background-size: 20px;\n background-repeat: no-repeat;\n background-position: center;\n}\n.jsoneditor-WMs15 .preview-button-vupuG:hover {\n border: 0;\n}\n.jsoneditor-WMs15 .preview-button-vupuG:disabled {\n opacity: 0.3;\n}\n\n.jsoneditor-WMs15 .edit-button-m6r3M {\n background-image: url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22iso-8859-1%22%3F%3E%3C!-- Generator%3A Adobe Illustrator 16.0.0%2C SVG Export Plug-In . SVG Version%3A 6.00 Build 0) --%3E%3C!DOCTYPE svg PUBLIC %22-%2F%2FW3C%2F%2FDTD SVG 1.1%2F%2FEN%22 %22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%3Csvg version%3D%221.1%22 id%3D%22Capa_1%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22 x%3D%220px%22 y%3D%220px%22%09 width%3D%22494.936px%22 height%3D%22494.936px%22 viewBox%3D%220 0 494.936 494.936%22 style%3D%22enable-background%3Anew 0 0 494.936 494.936%3B%22%09 xml%3Aspace%3D%22preserve%22 fill%3D%22%23fff%22%3E%3Cg%3E%09%3Cg%3E%09%09%3Cpath d%3D%22M389.844%2C182.85c-6.743%2C0-12.21%2C5.467-12.21%2C12.21v222.968c0%2C23.562-19.174%2C42.735-42.736%2C42.735H67.157%09%09%09c-23.562%2C0-42.736-19.174-42.736-42.735V150.285c0-23.562%2C19.174-42.735%2C42.736-42.735h267.741c6.743%2C0%2C12.21-5.467%2C12.21-12.21%09%09%09s-5.467-12.21-12.21-12.21H67.157C30.126%2C83.13%2C0%2C113.255%2C0%2C150.285v267.743c0%2C37.029%2C30.126%2C67.155%2C67.157%2C67.155h267.741%09%09%09c37.03%2C0%2C67.156-30.126%2C67.156-67.155V195.061C402.054%2C188.318%2C396.587%2C182.85%2C389.844%2C182.85z%22%2F%3E%09%09%3Cpath d%3D%22M483.876%2C20.791c-14.72-14.72-38.669-14.714-53.377%2C0L221.352%2C229.944c-0.28%2C0.28-3.434%2C3.559-4.251%2C5.396l-28.963%2C65.069%09%09%09c-2.057%2C4.619-1.056%2C10.027%2C2.521%2C13.6c2.337%2C2.336%2C5.461%2C3.576%2C8.639%2C3.576c1.675%2C0%2C3.362-0.346%2C4.96-1.057l65.07-28.963%09%09%09c1.83-0.815%2C5.114-3.97%2C5.396-4.25L483.876%2C74.169c7.131-7.131%2C11.06-16.61%2C11.06-26.692%09%09%09C494.936%2C37.396%2C491.007%2C27.915%2C483.876%2C20.791z M466.61%2C56.897L257.457%2C266.05c-0.035%2C0.036-0.055%2C0.078-0.089%2C0.107%09%09%09l-33.989%2C15.131L238.51%2C247.3c0.03-0.036%2C0.071-0.055%2C0.107-0.09L447.765%2C38.058c5.038-5.039%2C13.819-5.033%2C18.846%2C0.005%09%09%09c2.518%2C2.51%2C3.905%2C5.855%2C3.905%2C9.414C470.516%2C51.036%2C469.127%2C54.38%2C466.61%2C56.897z%22%2F%3E%09%3C%2Fg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3C%2Fsvg%3E\");\n}\n";
|
24110
|
+
styleInject(css_248z$p);
|
23802
24111
|
|
23803
24112
|
var JsonEditor = function JsonEditor(_ref, ref) {
|
23804
24113
|
var id = _ref.id,
|
@@ -24577,19 +24886,19 @@ function reducer(state, action) {
|
|
24577
24886
|
|
24578
24887
|
var grid = "grid-sGemi";
|
24579
24888
|
var textWrapper = "text-wrapper-xsPXE";
|
24580
|
-
var css_248z$
|
24581
|
-
styleInject(css_248z$
|
24889
|
+
var css_248z$o = ".grid-sGemi {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));\n grid-auto-rows: min-content;\n grid-gap: 10px;\n}\n\n.text-wrapper-xsPXE {\n display: flex;\n justify-content: space-around;\n align-items: center;\n}\n";
|
24890
|
+
styleInject(css_248z$o);
|
24582
24891
|
|
24583
|
-
var wrapper$
|
24892
|
+
var wrapper$3 = "wrapper-p-gR3";
|
24584
24893
|
var container$6 = "container-DoZqe";
|
24585
|
-
var css_248z$
|
24586
|
-
styleInject(css_248z$
|
24894
|
+
var css_248z$n = ".wrapper-p-gR3 {\n background: #ececec;\n}\n\n.container-DoZqe {\n display: flex;\n justify-content: space-between;\n}\n";
|
24895
|
+
styleInject(css_248z$n);
|
24587
24896
|
|
24588
24897
|
var ToolTipInfo = function ToolTipInfo(props) {
|
24589
24898
|
var _useTranslation = useTranslation(),
|
24590
24899
|
t = _useTranslation.t;
|
24591
24900
|
return /*#__PURE__*/jsx("div", {
|
24592
|
-
className: wrapper$
|
24901
|
+
className: wrapper$3,
|
24593
24902
|
children: /*#__PURE__*/jsx(Card, {
|
24594
24903
|
title: t('backoffice.tooltipinfo.useroverview'),
|
24595
24904
|
styles: {
|
@@ -24786,8 +25095,8 @@ var useMediaUpload = function useMediaUpload(_ref) {
|
|
24786
25095
|
var small = "small-NY1-k";
|
24787
25096
|
var medium = "medium---QcO";
|
24788
25097
|
var big = "big--E39S";
|
24789
|
-
var css_248z$
|
24790
|
-
styleInject(css_248z$
|
25098
|
+
var css_248z$m = ".diva-component-DIVA_BACKOFFICE_NEW .ant-upload-wrapper {\n width: 100%;\n height: 100%;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .ant-spin-nested-loading {\n width: 100%;\n height: 100%;\n}\n.diva-component-DIVA_BACKOFFICE_NEW .ant-table-wrapper, .diva-component-DIVA_BACKOFFICE_NEW .ant-table {\n height: inherit;\n overflow: auto;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .ant-drawer-body .ant-spin-nested-loading {\n width: 100%;\n height: 80%;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .ant-spin-container {\n width: 100%;\n height: 100%;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .andt-table .ant-spin-container {\n display: flex;\n flex-direction: column;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .ant-space-item .andt-table .ant-spin-container {\n height: calc(60vh - 90px);\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .andt-table .ant-table-container {\n height: calc(100% - 80px);\n}\n.diva-component-DIVA_BACKOFFICE_NEW .ant-upload-list {\n width: 100%;\n height: 100%;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .ant-upload-list-item-container {\n width: 100% !important;\n height: 100% !important;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .ant-upload-select {\n width: 100% !important;\n height: 100% !important;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .small-NY1-k {\n width: 104px;\n height: 104px;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .medium---QcO {\n width: 200px;\n height: 200px;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .big--E39S {\n width: 400px;\n height: 400px;\n}\n";
|
25099
|
+
styleInject(css_248z$m);
|
24791
25100
|
|
24792
25101
|
var MediaUpload = observer(function (_ref) {
|
24793
25102
|
var id = _ref.id;
|
@@ -24913,8 +25222,8 @@ var editableRow = "editable-row-9BEHi";
|
|
24913
25222
|
var checkbox = "checkbox-H7R-w";
|
24914
25223
|
var editableCellValueWrap = "editable-cell-value-wrap-ugTs4";
|
24915
25224
|
var contentWidth = "content-width-hGyVI";
|
24916
|
-
var css_248z$
|
24917
|
-
styleInject(css_248z$
|
25225
|
+
var css_248z$l = ".checkbox-readonly-0-bzT {\n cursor: default;\n}\n\n.checkbox-readonly-0-bzT .ant-checkbox-input {\n cursor: default;\n}\n\n.checkbox-readonly-0-bzT .ant-checkbox {\n cursor: default;\n}\n\n.editable-row-9BEHi:hover .checkbox-H7R-w .ant-checkbox {\n box-shadow: 0 0 5px rgba(0, 0, 0, 0.6);\n}\n\n.editable-cell-value-wrap-ugTs4 {\n padding: 5px 12px;\n cursor: pointer;\n}\n\n.editable-row-9BEHi:hover .editable-cell-value-wrap-ugTs4 {\n padding: 4px 11px;\n border: 1px solid #d9d9d9;\n border-radius: 4px;\n}\n\n.content-width-hGyVI .ant-modal-confirm-content {\n width: 100%;\n}\n";
|
25226
|
+
styleInject(css_248z$l);
|
24918
25227
|
|
24919
25228
|
function BooleanCell (_ref) {
|
24920
25229
|
var children = _ref.children,
|
@@ -25595,7 +25904,7 @@ function LinkCell (_ref) {
|
|
25595
25904
|
}
|
25596
25905
|
}
|
25597
25906
|
|
25598
|
-
var _excluded$
|
25907
|
+
var _excluded$2 = ["index"],
|
25599
25908
|
_excluded2 = ["children", "dataIndex", "record", "handleSave", "column"];
|
25600
25909
|
function ownKeys$y(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; }
|
25601
25910
|
function _objectSpread$y(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$y(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$y(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
@@ -25603,7 +25912,7 @@ var LOG$4 = getLogger('Backoffice', 'CellRenderer');
|
|
25603
25912
|
var EditableContext = /*#__PURE__*/React.createContext(null);
|
25604
25913
|
var CustomRow = function CustomRow(_ref) {
|
25605
25914
|
_ref.index;
|
25606
|
-
var props = _objectWithoutProperties(_ref, _excluded$
|
25915
|
+
var props = _objectWithoutProperties(_ref, _excluded$2);
|
25607
25916
|
var _Form$useForm = Form$1.useForm(),
|
25608
25917
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
25609
25918
|
form = _Form$useForm2[0];
|
@@ -25903,8 +26212,8 @@ function useAGHistogram (_ref) {
|
|
25903
26212
|
var container$5 = "container-2r-OJ";
|
25904
26213
|
var column1 = "column1-9viTK";
|
25905
26214
|
var spinner = "spinner-00VcK";
|
25906
|
-
var css_248z$
|
25907
|
-
styleInject(css_248z$
|
26215
|
+
var css_248z$k = ".container-2r-OJ {\n display: flex;\n gap: 40px; /* Distribute the columns evenly */\n}\n\n.column-yZ2Qc {\n padding: 10px;\n}\n\n.column1-9viTK .column-yZ2Qc {\n flex: 8;\n}\n\n.column2-pCnEz .column-yZ2Qc {\n flex: 1;\n}\n\n.column3-QZDVv .column-yZ2Qc {\n flex: 3;\n}\n\n.spinner-00VcK {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n";
|
26216
|
+
styleInject(css_248z$k);
|
25908
26217
|
|
25909
26218
|
var Panel = Collapse.Panel;
|
25910
26219
|
function AGHistogram (_ref) {
|
@@ -27492,7 +27801,7 @@ function filter(f, data) {
|
|
27492
27801
|
}) : result;
|
27493
27802
|
}
|
27494
27803
|
|
27495
|
-
var _excluded = ["_id"];
|
27804
|
+
var _excluded$1 = ["_id"];
|
27496
27805
|
function ownKeys$t(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; }
|
27497
27806
|
function _objectSpread$t(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$t(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$t(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
27498
27807
|
function useTableData$1 (_ref) {
|
@@ -27576,7 +27885,7 @@ function useTableData$1 (_ref) {
|
|
27576
27885
|
setState(newState);
|
27577
27886
|
var formData = new FormData();
|
27578
27887
|
processedDataRow._id;
|
27579
|
-
var value = _objectWithoutProperties(processedDataRow, _excluded);
|
27888
|
+
var value = _objectWithoutProperties(processedDataRow, _excluded$1);
|
27580
27889
|
apiHandler.create(undefined, (_configuration$create = configuration.createMapping) !== null && _configuration$create !== void 0 ? _configuration$create : configuration.mapping, _objectSpread$t(_objectSpread$t({}, catalogItem), {}, {
|
27581
27890
|
filterContex: filterContex,
|
27582
27891
|
value: JSON.stringify([value])
|
@@ -28882,8 +29191,8 @@ var loader = "loader-LaXZy";
|
|
28882
29191
|
var flex = "flex-yQdda";
|
28883
29192
|
var bar = "bar-Y663f";
|
28884
29193
|
var value = "value-FCA-6";
|
28885
|
-
var css_248z$
|
28886
|
-
styleInject(css_248z$
|
29194
|
+
var css_248z$j = ".overlay-lm0tm {\n position: absolute;\n z-index: 1;\n background-color: rgba(247,247,247,0.45882);\n height: 60vh;\n width: 100%;\n}\n.loader-LaXZy {\n position: absolute;\n top: 50%;\n left: 50%;\n width: 50px;\n height: 50px;\n border: 3px solid rgba(0, 0, 0, 0.3);\n border-radius: 50%;\n border-top-color: #fff;\n animation: spin-qUdpu 1s ease-in-out infinite;\n -webkit-animation: spin-qUdpu 1s ease-in-out infinite;\n}\n.flex-yQdda {\n display: flex;\n}\n\n.bar-Y663f {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n margin-top: 7%;\n}\n\n.value-FCA-6 {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: -moz-fit-content;\n width: fit-content;\n}\n@keyframes spin-qUdpu {\n to {\n -webkit-transform: rotate(360deg);\n }\n}\n";
|
29195
|
+
styleInject(css_248z$j);
|
28887
29196
|
|
28888
29197
|
function ownKeys$p(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; }
|
28889
29198
|
function _objectSpread$p(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$p(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$p(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
@@ -29828,8 +30137,8 @@ var retailerChild = "retailer-child-5ll0K";
|
|
29828
30137
|
var supplier = "supplier-8sm0I";
|
29829
30138
|
var dealer = "dealer-xgnku";
|
29830
30139
|
var association = "association-b8uVW";
|
29831
|
-
var css_248z$
|
29832
|
-
styleInject(css_248z$
|
30140
|
+
var css_248z$i = ".label-rYNbb {\n width: 225px;\n background-color: #fff;\n cursor: pointer;\n padding: 10px 15px;\n border-radius: 5px;\n display: flex;\n gap: 12px;\n flex-direction: column;\n font-weight: 500;\n}\n\n.not-clickable-wHc5V {\n cursor: inherit;\n color: grey;\n}\n\n.selected-34dYg {\n font-weight: 630;\n}\n\n.description-iFui2 {\n font-weight: 300;\n font-size: small;\n margin-top: -8px;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .org-tree-node-label .org-tree-node-label-inner {\n padding: 0;\n padding: initial;\n}\n\n.darkmode .org-tree-container {\n background-color: rgb(20, 20, 20);\n}\n\n.org-tree-container .org-tree-node-label .ant-btn-default:disabled, .org-tree-container .org-tree-node-label .ant-btn-primary:disabled {\n border-color: #d9d9d9;\n color: rgba(0, 0, 0, 0.25);\n background-color: rgba(0, 0, 0, 0.04);\n}\n\n.retailer-YNzAh {\n border-bottom: #81c784 solid 5px;\n}\n\n.retailer-child-5ll0K {\n border-bottom: #c8e6c9 solid 5px;\n}\n\n.supplier-8sm0I {\n border-bottom: #ba68c8 solid 5px;\n}\n\n.dealer-xgnku {\n border-bottom: #e1bee7 solid 5px;\n}\n\n.association-b8uVW {\n border-bottom: #fff176 solid 5px;\n}\n";
|
30141
|
+
styleInject(css_248z$i);
|
29833
30142
|
|
29834
30143
|
function getColorClass(data) {
|
29835
30144
|
switch (data.type) {
|
@@ -30062,8 +30371,8 @@ var openClass = "open-class--gGXs";
|
|
30062
30371
|
var breadcrumb = "breadcrumb-Z0VvH";
|
30063
30372
|
var selected = "selected-w-sfW";
|
30064
30373
|
var disabled$2 = "disabled-0nado";
|
30065
|
-
var css_248z$
|
30066
|
-
styleInject(css_248z$
|
30374
|
+
var css_248z$h = ".trigger-wrapper-OkPRc {\n width: 100%;\n padding: 12px 0px;\n display: flex;\n gap: 32px;\n}\n\n.arrow-Rd0hp {\n background-image: url(\"data:image/svg+xml,%3Csvg width%3D%228%22 height%3D%2213%22 viewBox%3D%220 0 8 13%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E %3Cpath d%3D%22M0.947266 1.14893L6.94727 6.29178L0.947266 11.9489%22 stroke%3D%22%236F6F6F%22 stroke-linecap%3D%22round%22 stroke-linejoin%3D%22round%22%2F%3E %3C%2Fsvg%3E\");\n background-repeat: no-repeat;\n background-position: center;\n background-size: contain;\n transform: rotateZ(0deg);\n transition: all 0.35s ease;\n width: 20.8px;\n height: 22.4px;\n cursor: pointer;\n}\n\n.open-class--gGXs {\n transform: rotateZ(90deg);\n}\n\n.breadcrumb-Z0VvH {\n transition: color 0.3s;\n}\n.breadcrumb-Z0VvH:hover:not(.selected-w-sfW) {\n cursor: pointer;\n color: #000;\n}\n\n.selected-w-sfW {\n color: #000;\n font-weight: 400;\n}\n\n.selected-w-sfW {\n color: #000;\n font-weight: 400;\n}\n\n.disabled-0nado {\n pointer-events: none;\n color: lightgray;\n}\n\n.darkmode .selected-w-sfW {\n color: #fff;\n font-weight: 400;\n}\n";
|
30375
|
+
styleInject(css_248z$h);
|
30067
30376
|
|
30068
30377
|
var BreadCrumbsTrigger = function BreadCrumbsTrigger(_ref) {
|
30069
30378
|
var open = _ref.open,
|
@@ -30096,8 +30405,8 @@ var BreadCrumbsTrigger = function BreadCrumbsTrigger(_ref) {
|
|
30096
30405
|
|
30097
30406
|
var collapsibleInner = "collapsible-inner-rI8kI";
|
30098
30407
|
var toolbarLeft = "toolbar-left-X9WRo";
|
30099
|
-
var css_248z$
|
30100
|
-
styleInject(css_248z$
|
30408
|
+
var css_248z$g = ".collapsible-inner-rI8kI {\n overflow: auto;\n padding: 32px 0;\n position: relative;\n}\n\n.toolbar-left-X9WRo {\n position: absolute;\n right: 22px;\n top: 10px;\n display: flex;\n gap: 10px;\n}\n";
|
30409
|
+
styleInject(css_248z$g);
|
30101
30410
|
|
30102
30411
|
var Legend = function Legend(props) {
|
30103
30412
|
return /*#__PURE__*/jsx(List$1, {
|
@@ -30151,8 +30460,8 @@ var Legend = function Legend(props) {
|
|
30151
30460
|
var buttonsWrapper = "buttons-wrapper-Bubkr";
|
30152
30461
|
var mask = "mask-ssagp";
|
30153
30462
|
var transformWrapper = "transform-wrapper--8t0v";
|
30154
|
-
var css_248z$
|
30155
|
-
styleInject(css_248z$
|
30463
|
+
var css_248z$f = ".buttons-wrapper-Bubkr {\n display: flex;\n gap: 6px;\n}\n\n.buttons-wrapper-Bubkr button {\n min-width: 24px;\n}\n\n.mask-ssagp {\n position: absolute;\n top: 0;\n bottom: 0;\n z-index: 1;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.45);\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n -webkit-backdrop-filter: blur(3px);\n backdrop-filter: blur(3px);\n}\n.mask-ssagp p {\n font-size: 18px;\n font-weight: bold;\n background: rgba(255, 255, 255, 0.4);\n padding: 10px;\n border-radius: 5px;\n}\n\n.transform-wrapper--8t0v .ant-modal-mask,\n.transform-wrapper--8t0v .ant-modal-wrap {\n position: absolute;\n}\n";
|
30464
|
+
styleInject(css_248z$f);
|
30156
30465
|
|
30157
30466
|
var ZoomWrapper = function ZoomWrapper(_ref) {
|
30158
30467
|
var _children = _ref.children,
|
@@ -31058,6 +31367,7 @@ var useEnricherContext = function useEnricherContext() {
|
|
31058
31367
|
exclusivitiesSeriesSelectorState: createDefaultSelectState('exclusivitiesSeriesSelectorState'),
|
31059
31368
|
exclusivitiesFeatureSelectorState: createDefaultSelectState('exclusivitiesFeatureSelectorState'),
|
31060
31369
|
selectedSerie: undefined,
|
31370
|
+
selectedItem: undefined,
|
31061
31371
|
selectedFeature: undefined
|
31062
31372
|
};
|
31063
31373
|
return root.contextStore.getContext('enricher', initialState);
|
@@ -31069,6 +31379,11 @@ var useEnricherContext = function useEnricherContext() {
|
|
31069
31379
|
selectedSerie: serie
|
31070
31380
|
});
|
31071
31381
|
}, [root.contextStore]);
|
31382
|
+
var setSelectedItem = useCallback(function (item) {
|
31383
|
+
root.contextStore.updateContext('enricher', {
|
31384
|
+
selectedItem: item
|
31385
|
+
});
|
31386
|
+
}, [root.contextStore]);
|
31072
31387
|
var setSelectedFeature = useCallback(function (feature) {
|
31073
31388
|
root.contextStore.updateContext('enricher', {
|
31074
31389
|
selectedFeature: feature
|
@@ -31104,7 +31419,10 @@ var useEnricherContext = function useEnricherContext() {
|
|
31104
31419
|
root.contextStore.updateContext('enricher', {
|
31105
31420
|
selectedPackage: newPackage,
|
31106
31421
|
packageId: newPackage._id,
|
31422
|
+
viewOnly: newPackage.organizationId !== root.dataStore.organizationId,
|
31423
|
+
//if the package is not created in the current organization, it can only be viewed
|
31107
31424
|
selectedSerie: undefined,
|
31425
|
+
selectedItem: undefined,
|
31108
31426
|
selectedFeature: undefined,
|
31109
31427
|
lookupSeriesSelectorState: createDefaultSelectState('lookupSeriesSelectorState'),
|
31110
31428
|
lookupFeatureSelectorState: createDefaultSelectState('lookupFeatureSelectorState'),
|
@@ -31132,6 +31450,7 @@ var useEnricherContext = function useEnricherContext() {
|
|
31132
31450
|
// Return context + handlers
|
31133
31451
|
return _objectSpread$g(_objectSpread$g({}, getContext()), {}, {
|
31134
31452
|
setSelectedSerie: setSelectedSerie,
|
31453
|
+
setSelectedItem: setSelectedItem,
|
31135
31454
|
setSelectedFeature: setSelectedFeature,
|
31136
31455
|
setSelectedPackage: setSelectedPackage
|
31137
31456
|
});
|
@@ -31150,14 +31469,7 @@ var PackageSelector = function PackageSelector(_ref) {
|
|
31150
31469
|
return /*#__PURE__*/jsx(SimpleSelect, {
|
31151
31470
|
sharedState: packageSelectorState,
|
31152
31471
|
apiInterface: {
|
31153
|
-
read: "".concat(enricherService, "/packages?fields=name;_id;isoLanguageIds;isApi&
|
31154
|
-
},
|
31155
|
-
apiMapping: {
|
31156
|
-
type: 'query',
|
31157
|
-
map: [{
|
31158
|
-
globalValue: 'organizationId',
|
31159
|
-
targetField: 'organizationId'
|
31160
|
-
}]
|
31472
|
+
read: "".concat(enricherService, "/packages?fields=name;_id;isoLanguageIds;isApi;organizationId&organizationId=").concat(organizationId)
|
31161
31473
|
},
|
31162
31474
|
selectMapping: {
|
31163
31475
|
label: '${name}',
|
@@ -31187,7 +31499,11 @@ function useModule$1 (currentModules) {
|
|
31187
31499
|
setSelectedPackage = _useEnricherContext.setSelectedPackage,
|
31188
31500
|
organizationId = _useEnricherContext.organizationId,
|
31189
31501
|
selectedSerie = _useEnricherContext.selectedSerie,
|
31190
|
-
selectedFeature = _useEnricherContext.selectedFeature
|
31502
|
+
selectedFeature = _useEnricherContext.selectedFeature,
|
31503
|
+
selectedItem = _useEnricherContext.selectedItem,
|
31504
|
+
setSelectedSerie = _useEnricherContext.setSelectedSerie,
|
31505
|
+
setSelectedItem = _useEnricherContext.setSelectedItem,
|
31506
|
+
viewOnly = _useEnricherContext.viewOnly;
|
31191
31507
|
var location = useLocation();
|
31192
31508
|
var _useSearchParams = useSearchParams(),
|
31193
31509
|
_useSearchParams2 = _slicedToArray(_useSearchParams, 1),
|
@@ -31397,8 +31713,12 @@ function useModule$1 (currentModules) {
|
|
31397
31713
|
organizationId: organizationId,
|
31398
31714
|
apiConfig: root.configurationStore.apiConfig,
|
31399
31715
|
setSelectedPackage: setSelectedPackage,
|
31716
|
+
setSelectedSerie: setSelectedSerie,
|
31717
|
+
setSelectedItem: setSelectedItem,
|
31400
31718
|
selectedSerie: selectedSerie,
|
31401
|
-
selectedFeature: selectedFeature
|
31719
|
+
selectedFeature: selectedFeature,
|
31720
|
+
selectedItem: selectedItem,
|
31721
|
+
viewOnly: viewOnly
|
31402
31722
|
};
|
31403
31723
|
}
|
31404
31724
|
|
@@ -31526,14 +31846,12 @@ var useTools = function useTools(_ref) {
|
|
31526
31846
|
initItem: item === null || item === void 0 ? void 0 : item.typeNo,
|
31527
31847
|
setSerie: setSerie,
|
31528
31848
|
setArticle: setArticle
|
31529
|
-
},
|
31530
|
-
initSerie:
|
31531
|
-
serieNo: serie.serieNo,
|
31532
|
-
serieId: serie._id
|
31533
|
-
}
|
31849
|
+
}, initSerie ? {
|
31850
|
+
initSerie: initSerie
|
31534
31851
|
} : {}) : isApi2 ? {
|
31535
31852
|
// open configurator for api2 package (configurator light)
|
31536
|
-
loadMask: true
|
31853
|
+
loadMask: true,
|
31854
|
+
initItem: item === null || item === void 0 ? void 0 : item.typeNo
|
31537
31855
|
} : _objectSpread$f({
|
31538
31856
|
// open configurator for idm package
|
31539
31857
|
useEnricherService: true,
|
@@ -31543,14 +31861,20 @@ var useTools = function useTools(_ref) {
|
|
31543
31861
|
initItem: item === null || item === void 0 ? void 0 : item.typeNo,
|
31544
31862
|
setSerie: setSerie,
|
31545
31863
|
setArticle: setArticle
|
31546
|
-
},
|
31547
|
-
initSerie:
|
31548
|
-
serieNo: serie.serieNo,
|
31549
|
-
serieId: serie._id
|
31550
|
-
}
|
31864
|
+
}, initSerie ? {
|
31865
|
+
initSerie: initSerie
|
31551
31866
|
} : {})
|
31552
31867
|
});
|
31553
31868
|
}, [catalogId, packageId, isApi2, serie, item, setSerie, setArticle]);
|
31869
|
+
var initSerie = useMemo(function () {
|
31870
|
+
if (serie) {
|
31871
|
+
return {
|
31872
|
+
serieNo: serie.serieNo,
|
31873
|
+
serieId: serie._id
|
31874
|
+
};
|
31875
|
+
}
|
31876
|
+
return undefined;
|
31877
|
+
}, [serie]);
|
31554
31878
|
useEffect(function () {
|
31555
31879
|
var _root$contentStore$ri;
|
31556
31880
|
var tools = [];
|
@@ -31592,10 +31916,11 @@ var TableGroups = observer(function () {
|
|
31592
31916
|
packageId = _useModule.packageId,
|
31593
31917
|
organizationId = _useModule.organizationId,
|
31594
31918
|
apiConfig = _useModule.apiConfig,
|
31595
|
-
selectedPackage = _useModule.selectedPackage
|
31919
|
+
selectedPackage = _useModule.selectedPackage,
|
31920
|
+
viewOnly = _useModule.viewOnly;
|
31596
31921
|
useTools({
|
31597
31922
|
packageId: packageId,
|
31598
|
-
isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.
|
31923
|
+
isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi
|
31599
31924
|
});
|
31600
31925
|
var applicationData = useMemo(function () {
|
31601
31926
|
return {
|
@@ -31606,10 +31931,10 @@ var TableGroups = observer(function () {
|
|
31606
31931
|
var apiInterface = useMemo(function () {
|
31607
31932
|
return {
|
31608
31933
|
read: apiConfig.enricherService + '/packages/${packageId}/groups',
|
31609
|
-
create: apiConfig.enricherService + '/packages/${packageId}/groups',
|
31610
|
-
restore: apiConfig.enricherService + '/packages/${packageId}/groups/${_id}',
|
31611
|
-
"delete": apiConfig.enricherService + '/packages/${packageId}/groups/${_id}',
|
31612
|
-
update: apiConfig.enricherService + '/packages/${packageId}/groups/${_id}',
|
31934
|
+
create: viewOnly ? undefined : apiConfig.enricherService + '/packages/${packageId}/groups',
|
31935
|
+
restore: viewOnly ? undefined : apiConfig.enricherService + '/packages/${packageId}/groups/${_id}',
|
31936
|
+
"delete": viewOnly ? undefined : apiConfig.enricherService + '/packages/${packageId}/groups/${_id}',
|
31937
|
+
update: viewOnly ? undefined : apiConfig.enricherService + '/packages/${packageId}/groups/${_id}',
|
31613
31938
|
bulk: apiConfig.enricherService + '/packages/${packageId}/groups/bulk'
|
31614
31939
|
};
|
31615
31940
|
}, []);
|
@@ -31623,7 +31948,7 @@ var TableGroups = observer(function () {
|
|
31623
31948
|
field: 'serieNos',
|
31624
31949
|
headerName: 'backoffice.idmEnricher.groups.label.serieNos',
|
31625
31950
|
cellDataType: 'lookup',
|
31626
|
-
editable:
|
31951
|
+
editable: !viewOnly,
|
31627
31952
|
customParams: {
|
31628
31953
|
filterCellType: 'number',
|
31629
31954
|
nameField: 'serieNosDisplayTexts',
|
@@ -31646,7 +31971,7 @@ var TableGroups = observer(function () {
|
|
31646
31971
|
field: 'typeNos',
|
31647
31972
|
headerName: 'backoffice.idmEnricher.groups.label.typeNos',
|
31648
31973
|
cellDataType: 'lookup',
|
31649
|
-
editable:
|
31974
|
+
editable: !viewOnly,
|
31650
31975
|
customParams: {
|
31651
31976
|
nameField: 'typeNosDisplayTexts',
|
31652
31977
|
displayLabelTemplate: '${name} (${value})',
|
@@ -31701,7 +32026,7 @@ var TableGroups = observer(function () {
|
|
31701
32026
|
cellDataType: 'objectId'
|
31702
32027
|
}]
|
31703
32028
|
};
|
31704
|
-
}, [apiInterface, t, selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isoLanguageIds]);
|
32029
|
+
}, [apiInterface, t, selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isoLanguageIds, viewOnly]);
|
31705
32030
|
return /*#__PURE__*/jsxs(Fragment, {
|
31706
32031
|
children: [/*#__PURE__*/jsx(Descriptions$1, {
|
31707
32032
|
title: /*#__PURE__*/jsxs("div", {
|
@@ -31723,22 +32048,28 @@ var TableGroups = observer(function () {
|
|
31723
32048
|
});
|
31724
32049
|
|
31725
32050
|
function PublishCustomCell (_ref) {
|
32051
|
+
var _data$published, _data$removedOrganiza;
|
31726
32052
|
var data = _ref.data,
|
31727
32053
|
apiConfig = _ref.apiConfig,
|
31728
32054
|
context = _ref.context,
|
31729
32055
|
api = _ref.api,
|
31730
|
-
modalState = _ref.modalState
|
32056
|
+
modalState = _ref.modalState,
|
32057
|
+
organizationId = _ref.organizationId;
|
31731
32058
|
var _useTranslation = useTranslation(),
|
31732
32059
|
t = _useTranslation.t;
|
31733
32060
|
var _React$useState = React.useState(false),
|
31734
32061
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
31735
32062
|
loading = _React$useState2[0],
|
31736
32063
|
isLoading = _React$useState2[1];
|
31737
|
-
var
|
31738
|
-
var
|
32064
|
+
var publishedData = (_data$published = data.published) === null || _data$published === void 0 ? void 0 : _data$published[organizationId];
|
32065
|
+
var isReleaseWithdrawn = !!((_data$removedOrganiza = data.removedOrganizationIds) !== null && _data$removedOrganiza !== void 0 && _data$removedOrganiza.find(function (id) {
|
32066
|
+
return id === organizationId;
|
32067
|
+
}));
|
32068
|
+
var unpublishedChanges = hasUnpublishedChanges(publishedData === null || publishedData === void 0 ? void 0 : publishedData.publishDate, publishedData === null || publishedData === void 0 ? void 0 : publishedData.lastUpdatedDate);
|
32069
|
+
var disabled = !(data !== null && data !== void 0 && data.basedCatalogId) && !(data !== null && data !== void 0 && data.basedPackageId) || !(data !== null && data !== void 0 && data.name);
|
31739
32070
|
var _onChange = /*#__PURE__*/function () {
|
31740
32071
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(publish) {
|
31741
|
-
var loadingTimeout, response;
|
32072
|
+
var loadingTimeout, response, _errorText, errorText, json;
|
31742
32073
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
31743
32074
|
while (1) switch (_context.prev = _context.next) {
|
31744
32075
|
case 0:
|
@@ -31753,7 +32084,7 @@ function PublishCustomCell (_ref) {
|
|
31753
32084
|
}
|
31754
32085
|
_context.next = 6;
|
31755
32086
|
return context === null || context === void 0 ? void 0 : context.updateServerData(data, {
|
31756
|
-
update: apiConfig.enricherService + '/packages/${_id}/publish',
|
32087
|
+
update: apiConfig.enricherService + '/packages/${_id}/publish?organizationId=' + organizationId,
|
31757
32088
|
usePut: true
|
31758
32089
|
}, undefined, true);
|
31759
32090
|
case 6:
|
@@ -31763,7 +32094,7 @@ function PublishCustomCell (_ref) {
|
|
31763
32094
|
case 9:
|
31764
32095
|
_context.next = 11;
|
31765
32096
|
return context === null || context === void 0 ? void 0 : context.updateServerData(data, {
|
31766
|
-
update: apiConfig.enricherService + '/packages/${_id}/unpublish',
|
32097
|
+
update: apiConfig.enricherService + '/packages/${_id}/unpublish?organizationId=' + organizationId,
|
31767
32098
|
usePut: true
|
31768
32099
|
}, undefined, true);
|
31769
32100
|
case 11:
|
@@ -31775,7 +32106,7 @@ function PublishCustomCell (_ref) {
|
|
31775
32106
|
break;
|
31776
32107
|
}
|
31777
32108
|
modalState.showWarningModal(t("backoffice.idmEnricher.packages.label.warning.".concat(publish ? 'publishing' : 'unpublishing')));
|
31778
|
-
_context.next =
|
32109
|
+
_context.next = 34;
|
31779
32110
|
break;
|
31780
32111
|
case 17:
|
31781
32112
|
if (!(response.status == 200)) {
|
@@ -31783,30 +32114,46 @@ function PublishCustomCell (_ref) {
|
|
31783
32114
|
break;
|
31784
32115
|
}
|
31785
32116
|
modalState.closeModal();
|
31786
|
-
_context.next =
|
32117
|
+
_context.next = 34;
|
31787
32118
|
break;
|
31788
32119
|
case 21:
|
31789
|
-
|
31790
|
-
|
32120
|
+
_context.prev = 21;
|
32121
|
+
_context.next = 24;
|
32122
|
+
return response.json();
|
32123
|
+
case 24:
|
32124
|
+
json = _context.sent;
|
32125
|
+
errorText = json.error;
|
32126
|
+
_context.next = 33;
|
32127
|
+
break;
|
32128
|
+
case 28:
|
32129
|
+
_context.prev = 28;
|
32130
|
+
_context.t0 = _context["catch"](21);
|
32131
|
+
_context.next = 32;
|
32132
|
+
return response.text();
|
32133
|
+
case 32:
|
32134
|
+
errorText = _context.sent;
|
32135
|
+
case 33:
|
32136
|
+
throw new Error((_errorText = errorText) !== null && _errorText !== void 0 ? _errorText : "Server error (".concat(response.status, ")"));
|
32137
|
+
case 34:
|
31791
32138
|
context === null || context === void 0 || context.reset({
|
31792
32139
|
context: context,
|
31793
32140
|
api: api
|
31794
32141
|
});
|
31795
|
-
_context.next =
|
32142
|
+
_context.next = 40;
|
31796
32143
|
break;
|
31797
|
-
case
|
31798
|
-
_context.prev =
|
31799
|
-
_context.
|
31800
|
-
modalState.showErrorModal("Error on ".concat(publish ? 'publish' : 'unpublish', ": ").concat(_context.
|
31801
|
-
case
|
31802
|
-
_context.prev =
|
32144
|
+
case 37:
|
32145
|
+
_context.prev = 37;
|
32146
|
+
_context.t1 = _context["catch"](2);
|
32147
|
+
modalState.showErrorModal("Error on ".concat(publish ? 'publish' : 'unpublish', ": ").concat(_context.t1 instanceof Error ? _context.t1.message : String(_context.t1)));
|
32148
|
+
case 40:
|
32149
|
+
_context.prev = 40;
|
31803
32150
|
isLoading(false);
|
31804
|
-
return _context.finish(
|
31805
|
-
case
|
32151
|
+
return _context.finish(40);
|
32152
|
+
case 43:
|
31806
32153
|
case "end":
|
31807
32154
|
return _context.stop();
|
31808
32155
|
}
|
31809
|
-
}, _callee, null, [[2,
|
32156
|
+
}, _callee, null, [[2, 37, 40, 43], [21, 28]]);
|
31810
32157
|
}));
|
31811
32158
|
return function onChange(_x) {
|
31812
32159
|
return _ref2.apply(this, arguments);
|
@@ -31818,9 +32165,9 @@ function PublishCustomCell (_ref) {
|
|
31818
32165
|
children: /*#__PURE__*/jsxs(Space$1, {
|
31819
32166
|
size: "middle",
|
31820
32167
|
children: [/*#__PURE__*/jsx(Tooltip, {
|
31821
|
-
title: !!
|
32168
|
+
title: !!publishedData ? t('backoffice.idmEnricher.packages.label.unpublish') : t('backoffice.idmEnricher.packages.label.publish'),
|
31822
32169
|
children: /*#__PURE__*/jsx(Checkbox$1, {
|
31823
|
-
checked: !!
|
32170
|
+
checked: !!publishedData,
|
31824
32171
|
disabled: disabled,
|
31825
32172
|
indeterminate: unpublishedChanges,
|
31826
32173
|
onChange: function onChange(e) {
|
@@ -31836,6 +32183,12 @@ function PublishCustomCell (_ref) {
|
|
31836
32183
|
return _onChange(true);
|
31837
32184
|
}
|
31838
32185
|
})
|
32186
|
+
}), isReleaseWithdrawn && /*#__PURE__*/jsx(Tooltip, {
|
32187
|
+
title: t('backoffice.idmEnricher.packages.label.releaseWithdrawn'),
|
32188
|
+
children: /*#__PURE__*/jsx(Button$1, {
|
32189
|
+
shape: "circle",
|
32190
|
+
icon: /*#__PURE__*/jsx(WarningOutlined, {})
|
32191
|
+
})
|
31839
32192
|
})]
|
31840
32193
|
})
|
31841
32194
|
});
|
@@ -32157,6 +32510,7 @@ var useLoadingModal = function useLoadingModal() {
|
|
32157
32510
|
};
|
32158
32511
|
|
32159
32512
|
var TablePackages = observer(function () {
|
32513
|
+
var _root$dataStore$curre;
|
32160
32514
|
var root = useStore();
|
32161
32515
|
var _useTranslation = useTranslation(),
|
32162
32516
|
t = _useTranslation.t,
|
@@ -32167,23 +32521,20 @@ var TablePackages = observer(function () {
|
|
32167
32521
|
closeModal = modalState.closeModal,
|
32168
32522
|
contextHolder = modalState.contextHolder;
|
32169
32523
|
var _useEnricherContext = useEnricherContext([]),
|
32170
|
-
setSelectedPackage = _useEnricherContext.setSelectedPackage
|
32171
|
-
|
32524
|
+
setSelectedPackage = _useEnricherContext.setSelectedPackage,
|
32525
|
+
selectedPackage = _useEnricherContext.selectedPackage;
|
32526
|
+
useTools({
|
32527
|
+
isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi
|
32528
|
+
});
|
32172
32529
|
var organizationId = root.dataStore.organizationId;
|
32530
|
+
var organizationDisplayText = (_root$dataStore$curre = root.dataStore.currentOrganization) === null || _root$dataStore$curre === void 0 ? void 0 : _root$dataStore$curre.displayName;
|
32173
32531
|
var apiConfig = root.configurationStore.apiConfig;
|
32174
32532
|
var applicationData = useMemo(function () {
|
32175
32533
|
return {
|
32176
|
-
organizationId: organizationId
|
32177
|
-
|
32178
|
-
}, [organizationId]);
|
32179
|
-
var preFilter = useMemo(function () {
|
32180
|
-
return {
|
32181
|
-
colId: 'organizationId',
|
32182
|
-
filterType: 'text',
|
32183
|
-
type: 'equals',
|
32184
|
-
filter: organizationId
|
32534
|
+
organizationId: organizationId,
|
32535
|
+
organizationDisplayText: organizationDisplayText
|
32185
32536
|
};
|
32186
|
-
}, [organizationId]);
|
32537
|
+
}, [organizationId, organizationDisplayText]);
|
32187
32538
|
var rowActions = useMemo(function () {
|
32188
32539
|
return [{
|
32189
32540
|
icon: /*#__PURE__*/jsx(EditOutlined, {}),
|
@@ -32198,8 +32549,9 @@ var TablePackages = observer(function () {
|
|
32198
32549
|
}, {
|
32199
32550
|
icon: /*#__PURE__*/jsx(DownloadOutlined, {}),
|
32200
32551
|
disabled: function disabled(_ref3) {
|
32552
|
+
var _selectedNodes$0$data;
|
32201
32553
|
var selectedNodes = _ref3.selectedNodes;
|
32202
|
-
return !selectedNodes[0].data.
|
32554
|
+
return !((_selectedNodes$0$data = selectedNodes[0].data.published) !== null && _selectedNodes$0$data !== void 0 && _selectedNodes$0$data[organizationId]);
|
32203
32555
|
},
|
32204
32556
|
action: function () {
|
32205
32557
|
var _action = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref4) {
|
@@ -32243,14 +32595,18 @@ var TablePackages = observer(function () {
|
|
32243
32595
|
}, [apiConfig.enricherService, root.dataStore.jwt]);
|
32244
32596
|
var apiInterface = useMemo(function () {
|
32245
32597
|
return {
|
32246
|
-
read: apiConfig.enricherService + '/packages?organizationId
|
32598
|
+
read: apiConfig.enricherService + '/packages?organizationId=' + organizationId,
|
32247
32599
|
create: apiConfig.enricherService + '/packages',
|
32248
32600
|
restore: apiConfig.enricherService + '/packages/${_id}',
|
32249
32601
|
"delete": apiConfig.enricherService + '/packages/${_id}',
|
32250
32602
|
update: apiConfig.enricherService + '/packages/${_id}',
|
32251
|
-
bulk: apiConfig.enricherService + '/packages/bulk?organizationId
|
32603
|
+
bulk: apiConfig.enricherService + '/packages/bulk?organizationId=' + organizationId
|
32252
32604
|
};
|
32253
|
-
}, [apiConfig.enricherService]);
|
32605
|
+
}, [apiConfig.enricherService, organizationId]);
|
32606
|
+
var isEditable = useCallback(function (params) {
|
32607
|
+
var _params$data, _params$data2;
|
32608
|
+
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);
|
32609
|
+
}, [organizationId]);
|
32254
32610
|
var configuration = useMemo(function () {
|
32255
32611
|
return {
|
32256
32612
|
type: 'dotnetSSM',
|
@@ -32258,15 +32614,15 @@ var TablePackages = observer(function () {
|
|
32258
32614
|
dateFormat: 'DD.MM.YYYY, HH:mm:ss',
|
32259
32615
|
floatingFilter: true,
|
32260
32616
|
colDef: [{
|
32261
|
-
field:
|
32617
|
+
field: "published.".concat(organizationId),
|
32262
32618
|
//the cell should refresh on changes of this fields
|
32263
32619
|
valueGetter: function valueGetter(_ref5) {
|
32620
|
+
var _data$published, _data$published2;
|
32264
32621
|
var data = _ref5.data;
|
32265
32622
|
return {
|
32266
|
-
isPublished: data === null || data === void 0 ? void 0 : data.isPublished,
|
32267
32623
|
name: data === null || data === void 0 ? void 0 : data.name,
|
32268
|
-
basedCatalogId: data === null || data === void 0 ? void 0 :
|
32269
|
-
basedPackageId: data === null || data === void 0 ? void 0 :
|
32624
|
+
basedCatalogId: data === null || data === void 0 || (_data$published = data.published) === null || _data$published === void 0 || (_data$published = _data$published[organizationId]) === null || _data$published === void 0 ? void 0 : _data$published.basedCatalogId,
|
32625
|
+
basedPackageId: data === null || data === void 0 || (_data$published2 = data.published) === null || _data$published2 === void 0 || (_data$published2 = _data$published2[organizationId]) === null || _data$published2 === void 0 ? void 0 : _data$published2.basedPackageId
|
32270
32626
|
};
|
32271
32627
|
},
|
32272
32628
|
headerName: 'backoffice.idmEnricher.packages.label.published',
|
@@ -32277,19 +32633,22 @@ var TablePackages = observer(function () {
|
|
32277
32633
|
lockPinned: true,
|
32278
32634
|
cellRendererParams: {
|
32279
32635
|
apiConfig: apiConfig,
|
32280
|
-
modalState: modalState
|
32281
|
-
|
32636
|
+
modalState: modalState,
|
32637
|
+
organizationId: organizationId
|
32638
|
+
},
|
32639
|
+
isDictionary: true
|
32282
32640
|
}, {
|
32283
32641
|
headerName: 'backoffice.idmEnricher.packages.label.name',
|
32284
32642
|
field: 'name',
|
32285
|
-
required: true
|
32643
|
+
required: true,
|
32644
|
+
editable: isEditable
|
32286
32645
|
}, {
|
32287
32646
|
headerName: 'backoffice.idmEnricher.packages.label.catalogId',
|
32288
32647
|
field: 'basedCatalogId',
|
32289
32648
|
cellDataType: 'lookup',
|
32290
32649
|
editable: function editable(_ref6) {
|
32291
32650
|
var data = _ref6.data;
|
32292
|
-
return !data.basedCatalogId && !data.basedPackageId;
|
32651
|
+
return isEditable(data) && !data.basedCatalogId && !data.basedPackageId;
|
32293
32652
|
},
|
32294
32653
|
customParams: {
|
32295
32654
|
filterCellType: 'objectId',
|
@@ -32317,7 +32676,7 @@ var TablePackages = observer(function () {
|
|
32317
32676
|
cellDataType: 'lookup',
|
32318
32677
|
editable: function editable(_ref7) {
|
32319
32678
|
var data = _ref7.data;
|
32320
|
-
return !data.basedCatalogId && !data.basedPackageId;
|
32679
|
+
return isEditable(data) && !data.basedCatalogId && !data.basedPackageId;
|
32321
32680
|
},
|
32322
32681
|
customParams: {
|
32323
32682
|
filterCellType: 'objectId',
|
@@ -32346,13 +32705,43 @@ var TablePackages = observer(function () {
|
|
32346
32705
|
field: 'isoLanguageIds',
|
32347
32706
|
headerName: 'backoffice.idmCatalog.general.label.isoLanguageIds',
|
32348
32707
|
cellDataType: 'enum',
|
32349
|
-
editable:
|
32708
|
+
editable: isEditable,
|
32350
32709
|
required: true,
|
32351
32710
|
customParams: {
|
32352
32711
|
enumData: getLanguageKey(t),
|
32353
32712
|
multiple: true
|
32354
32713
|
},
|
32355
32714
|
defaultValue: ['DE']
|
32715
|
+
}, {
|
32716
|
+
field: 'allowedOrganizationIds',
|
32717
|
+
headerName: 'backoffice.idmEnricher.packages.label.allowedOrganizationIds',
|
32718
|
+
cellDataType: 'lookup',
|
32719
|
+
editable: isEditable,
|
32720
|
+
cellRendererSelector: function cellRendererSelector(params) {
|
32721
|
+
var _params$data3, _params$data4;
|
32722
|
+
if (((_params$data3 = params.data) === null || _params$data3 === void 0 ? void 0 : _params$data3.organizationId) === organizationId || !((_params$data4 = params.data) !== null && _params$data4 !== void 0 && _params$data4._id)) {
|
32723
|
+
return undefined;
|
32724
|
+
}
|
32725
|
+
return {
|
32726
|
+
component: function component() {
|
32727
|
+
var _params$data$organiza, _params$data5, _params$data6;
|
32728
|
+
return /*#__PURE__*/jsxs("p", {
|
32729
|
+
children: ["Freigegeben durch ", (_params$data$organiza = (_params$data5 = params.data) === null || _params$data5 === void 0 ? void 0 : _params$data5.organizationDisplayText) !== null && _params$data$organiza !== void 0 ? _params$data$organiza : (_params$data6 = params.data) === null || _params$data6 === void 0 ? void 0 : _params$data6.organizationId]
|
32730
|
+
});
|
32731
|
+
}
|
32732
|
+
};
|
32733
|
+
},
|
32734
|
+
customParams: {
|
32735
|
+
nameField: 'allowedOrganizationsDisplayTexts',
|
32736
|
+
apiInterface: {
|
32737
|
+
read: apiConfig.authService + "/clientrelationtargets/organization/".concat(organizationId, "/organizations")
|
32738
|
+
},
|
32739
|
+
lookupValue: 'displayName',
|
32740
|
+
lookupKey: '_id',
|
32741
|
+
serverType: 'nodejs',
|
32742
|
+
multiple: true
|
32743
|
+
},
|
32744
|
+
additionalFields: ['allowedOrganizationsDisplayTexts']
|
32356
32745
|
}, {
|
32357
32746
|
headerName: 'backoffice.idmEnricher.packages.label.isApi2',
|
32358
32747
|
field: 'isApi',
|
@@ -32370,9 +32759,10 @@ var TablePackages = observer(function () {
|
|
32370
32759
|
editable: false
|
32371
32760
|
}, {
|
32372
32761
|
headerName: 'backoffice.idmEnricher.packages.label.publishDate',
|
32373
|
-
field:
|
32762
|
+
field: "published.".concat(organizationId, ".publishDate"),
|
32374
32763
|
cellDataType: 'dateString',
|
32375
|
-
editable: false
|
32764
|
+
editable: false,
|
32765
|
+
isDictionary: true
|
32376
32766
|
}, {
|
32377
32767
|
headerName: 'backoffice.idmEnricher.general.label.createdBy',
|
32378
32768
|
field: 'createdByDisplayText',
|
@@ -32383,8 +32773,9 @@ var TablePackages = observer(function () {
|
|
32383
32773
|
editable: false
|
32384
32774
|
}, {
|
32385
32775
|
headerName: 'backoffice.idmEnricher.packages.label.publishedBy',
|
32386
|
-
field:
|
32387
|
-
editable: false
|
32776
|
+
field: "published.".concat(organizationId, ".publishedByDisplayText"),
|
32777
|
+
editable: false,
|
32778
|
+
isDictionary: true
|
32388
32779
|
}, {
|
32389
32780
|
headerName: 'backoffice.idmEnricher.general.label._id',
|
32390
32781
|
field: '_id',
|
@@ -32397,9 +32788,26 @@ var TablePackages = observer(function () {
|
|
32397
32788
|
lockVisible: true,
|
32398
32789
|
suppressColumnsToolPanel: true,
|
32399
32790
|
defaultValue: '${organizationId}'
|
32791
|
+
}, {
|
32792
|
+
field: 'organizationDisplayText',
|
32793
|
+
editable: false,
|
32794
|
+
hide: true,
|
32795
|
+
lockVisible: true,
|
32796
|
+
suppressColumnsToolPanel: true,
|
32797
|
+
defaultValue: '${organizationDisplayText}'
|
32798
|
+
}, {
|
32799
|
+
field: 'removedOrganizationIds',
|
32800
|
+
editable: false,
|
32801
|
+
hide: true,
|
32802
|
+
lockVisible: true,
|
32803
|
+
suppressColumnsToolPanel: true
|
32400
32804
|
}]
|
32401
32805
|
};
|
32402
|
-
}, [apiInterface, apiConfig, i18n.language]);
|
32806
|
+
}, [apiInterface, apiConfig, i18n.language, organizationId]);
|
32807
|
+
var isRowEditable = useCallback(function (node) {
|
32808
|
+
var _node$data, _node$data2;
|
32809
|
+
return ((_node$data = node.data) === null || _node$data === void 0 ? void 0 : _node$data.organizationId) === organizationId || !((_node$data2 = node.data) !== null && _node$data2 !== void 0 && _node$data2._id);
|
32810
|
+
}, [organizationId]);
|
32403
32811
|
return /*#__PURE__*/jsxs(Fragment, {
|
32404
32812
|
children: [/*#__PURE__*/jsx(Descriptions$1, {
|
32405
32813
|
title: t('backoffice.menu.items.label.IDMEnricherTablePackages')
|
@@ -32407,8 +32815,8 @@ var TablePackages = observer(function () {
|
|
32407
32815
|
gridId: 'packages-grid',
|
32408
32816
|
applicationData: applicationData,
|
32409
32817
|
rowActions: rowActions,
|
32410
|
-
|
32411
|
-
|
32818
|
+
configuration: configuration,
|
32819
|
+
isRowEditable: isRowEditable
|
32412
32820
|
}), contextHolder]
|
32413
32821
|
});
|
32414
32822
|
});
|
@@ -32420,10 +32828,11 @@ var TableProperties = observer(function () {
|
|
32420
32828
|
packageId = _useModule.packageId,
|
32421
32829
|
organizationId = _useModule.organizationId,
|
32422
32830
|
apiConfig = _useModule.apiConfig,
|
32423
|
-
selectedPackage = _useModule.selectedPackage
|
32831
|
+
selectedPackage = _useModule.selectedPackage,
|
32832
|
+
viewOnly = _useModule.viewOnly;
|
32424
32833
|
useTools({
|
32425
32834
|
packageId: packageId,
|
32426
|
-
isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.
|
32835
|
+
isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi
|
32427
32836
|
});
|
32428
32837
|
var applicationData = useMemo(function () {
|
32429
32838
|
return {
|
@@ -32434,10 +32843,10 @@ var TableProperties = observer(function () {
|
|
32434
32843
|
var apiInterface = useMemo(function () {
|
32435
32844
|
return {
|
32436
32845
|
read: apiConfig.enricherService + '/packages/${packageId}/properties',
|
32437
|
-
create: apiConfig.enricherService + '/packages/${packageId}/properties',
|
32438
|
-
restore: apiConfig.enricherService + '/packages/${packageId}/properties/${_id}',
|
32439
|
-
"delete": apiConfig.enricherService + '/packages/${packageId}/properties/${_id}',
|
32440
|
-
update: apiConfig.enricherService + '/packages/${packageId}/properties/${_id}',
|
32846
|
+
create: viewOnly ? undefined : apiConfig.enricherService + '/packages/${packageId}/properties',
|
32847
|
+
restore: viewOnly ? undefined : apiConfig.enricherService + '/packages/${packageId}/properties/${_id}',
|
32848
|
+
"delete": viewOnly ? undefined : apiConfig.enricherService + '/packages/${packageId}/properties/${_id}',
|
32849
|
+
update: viewOnly ? undefined : apiConfig.enricherService + '/packages/${packageId}/properties/${_id}',
|
32441
32850
|
bulk: apiConfig.enricherService + '/packages/${packageId}/properties/bulk'
|
32442
32851
|
};
|
32443
32852
|
}, []);
|
@@ -32455,7 +32864,7 @@ var TableProperties = observer(function () {
|
|
32455
32864
|
field: 'featureNos',
|
32456
32865
|
headerName: 'backoffice.idmEnricher.renaming.label.featureNr',
|
32457
32866
|
cellDataType: 'lookup',
|
32458
|
-
editable:
|
32867
|
+
editable: !viewOnly,
|
32459
32868
|
customParams: {
|
32460
32869
|
nameField: 'featureNosDisplayTexts',
|
32461
32870
|
displayLabelTemplate: '${name} (${value})',
|
@@ -32473,7 +32882,7 @@ var TableProperties = observer(function () {
|
|
32473
32882
|
field: 'optionKeys',
|
32474
32883
|
headerName: 'backoffice.idmEnricher.renaming.label.optionKeys',
|
32475
32884
|
cellDataType: 'lookup',
|
32476
|
-
editable:
|
32885
|
+
editable: !viewOnly,
|
32477
32886
|
customParams: {
|
32478
32887
|
nameField: 'optionKeysDisplayTexts',
|
32479
32888
|
displayLabelTemplate: '${name} (${value})',
|
@@ -32497,7 +32906,7 @@ var TableProperties = observer(function () {
|
|
32497
32906
|
field: 'serieNos',
|
32498
32907
|
headerName: 'backoffice.idmEnricher.renaming.label.serieNos',
|
32499
32908
|
cellDataType: 'lookup',
|
32500
|
-
editable:
|
32909
|
+
editable: !viewOnly,
|
32501
32910
|
customParams: {
|
32502
32911
|
filterCellType: 'number',
|
32503
32912
|
nameField: 'serieNosDisplayTexts',
|
@@ -32520,7 +32929,7 @@ var TableProperties = observer(function () {
|
|
32520
32929
|
field: 'typeNos',
|
32521
32930
|
headerName: 'backoffice.idmEnricher.properties.label.typeNos',
|
32522
32931
|
cellDataType: 'lookup',
|
32523
|
-
editable:
|
32932
|
+
editable: !viewOnly,
|
32524
32933
|
customParams: {
|
32525
32934
|
nameField: 'typeNosDisplayTexts',
|
32526
32935
|
displayLabelTemplate: '${name} (${value})',
|
@@ -32575,7 +32984,7 @@ var TableProperties = observer(function () {
|
|
32575
32984
|
cellDataType: 'objectId'
|
32576
32985
|
}]
|
32577
32986
|
};
|
32578
|
-
}, [apiInterface, t, selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isoLanguageIds]);
|
32987
|
+
}, [apiInterface, t, selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isoLanguageIds, viewOnly]);
|
32579
32988
|
return /*#__PURE__*/jsxs(Fragment, {
|
32580
32989
|
children: [/*#__PURE__*/jsx(Descriptions$1, {
|
32581
32990
|
title: /*#__PURE__*/jsxs("div", {
|
@@ -32596,7 +33005,7 @@ var TableProperties = observer(function () {
|
|
32596
33005
|
});
|
32597
33006
|
});
|
32598
33007
|
|
32599
|
-
var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
33008
|
+
var getConfig$6 = function getConfig(isoLanguageIds, t, viewOnly) {
|
32600
33009
|
return {
|
32601
33010
|
colDef: [{
|
32602
33011
|
field: 'translatedName',
|
@@ -32606,7 +33015,8 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32606
33015
|
placeHolderField: 'origName',
|
32607
33016
|
combinedField: 'name'
|
32608
33017
|
},
|
32609
|
-
additionalFields: ['origName', 'name']
|
33018
|
+
additionalFields: ['origName', 'name'],
|
33019
|
+
editable: !viewOnly
|
32610
33020
|
}, {
|
32611
33021
|
field: 'translatedComment',
|
32612
33022
|
cellDataType: 'withPlaceholder',
|
@@ -32615,14 +33025,15 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32615
33025
|
placeHolderField: 'origComment',
|
32616
33026
|
combinedField: 'comment'
|
32617
33027
|
},
|
32618
|
-
additionalFields: ['origComment', 'comment']
|
33028
|
+
additionalFields: ['origComment', 'comment'],
|
33029
|
+
editable: !viewOnly
|
32619
33030
|
}, createTranslatedColumnConfig('translatedCatalogName', 'backoffice.idmEnricher.renaming.label.catalogName', isoLanguageIds, false, 'withPlaceholder', {
|
32620
33031
|
placeHolderField: 'origCatalogName',
|
32621
33032
|
combinedField: 'catalogName'
|
32622
|
-
}, ['origCatalogName', 'catalogName']), createTranslatedColumnConfig('translatedCatalogInfo', 'backoffice.idmEnricher.renaming.label.catalogInfo', isoLanguageIds, false, 'withPlaceholder', {
|
33033
|
+
}, ['origCatalogName', 'catalogName'], !viewOnly), createTranslatedColumnConfig('translatedCatalogInfo', 'backoffice.idmEnricher.renaming.label.catalogInfo', isoLanguageIds, false, 'withPlaceholder', {
|
32623
33034
|
placeHolderField: 'origCatalogInfo',
|
32624
33035
|
combinedField: 'catalogInfo'
|
32625
|
-
}, ['origCatalogInfo', 'catalogInfo']), {
|
33036
|
+
}, ['origCatalogInfo', 'catalogInfo'], !viewOnly), {
|
32626
33037
|
headerName: 'backoffice.idmEnricher.renaming.label.contactperson',
|
32627
33038
|
field: 'translatedContactPersonNo1',
|
32628
33039
|
cellDataType: 'withPlaceholder',
|
@@ -32630,7 +33041,8 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32630
33041
|
placeHolderField: 'origContactPersonNo1',
|
32631
33042
|
combinedField: 'contactPersonNo1'
|
32632
33043
|
},
|
32633
|
-
additionalFields: ['origContactPersonNo1', 'contactPersonNo1']
|
33044
|
+
additionalFields: ['origContactPersonNo1', 'contactPersonNo1'],
|
33045
|
+
editable: !viewOnly
|
32634
33046
|
}, {
|
32635
33047
|
headerName: 'backoffice.idmEnricher.renaming.label.contactrole',
|
32636
33048
|
field: 'translatedContactRole1',
|
@@ -32639,7 +33051,8 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32639
33051
|
placeHolderField: 'origContactRole1',
|
32640
33052
|
combinedField: 'contactRole1'
|
32641
33053
|
},
|
32642
|
-
additionalFields: ['origContactRole1', 'contactRole1']
|
33054
|
+
additionalFields: ['origContactRole1', 'contactRole1'],
|
33055
|
+
editable: !viewOnly
|
32643
33056
|
}, {
|
32644
33057
|
headerName: 'backoffice.idmEnricher.renaming.label.translated.contactname',
|
32645
33058
|
field: 'translatedContactName1',
|
@@ -32648,7 +33061,8 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32648
33061
|
placeHolderField: 'origContactName1',
|
32649
33062
|
combinedField: 'contactName1'
|
32650
33063
|
},
|
32651
|
-
additionalFields: ['origContactName1', 'contactName1']
|
33064
|
+
additionalFields: ['origContactName1', 'contactName1'],
|
33065
|
+
editable: !viewOnly
|
32652
33066
|
}, {
|
32653
33067
|
headerName: 'backoffice.idmEnricher.renaming.label.translated.firstname',
|
32654
33068
|
field: 'translatedFirstName1',
|
@@ -32657,7 +33071,8 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32657
33071
|
placeHolderField: 'origFirstName1',
|
32658
33072
|
combinedField: 'firstName1'
|
32659
33073
|
},
|
32660
|
-
additionalFields: ['origFirstName1', 'firstName1']
|
33074
|
+
additionalFields: ['origFirstName1', 'firstName1'],
|
33075
|
+
editable: !viewOnly
|
32661
33076
|
}, {
|
32662
33077
|
headerName: 'backoffice.idmEnricher.renaming.label.translated.form_of_address',
|
32663
33078
|
field: 'translatedFormOfAddress1',
|
@@ -32669,7 +33084,8 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32669
33084
|
enumData: getFormOfAddressKey(t),
|
32670
33085
|
displayLabelTemplate: '${name} (${value})'
|
32671
33086
|
},
|
32672
|
-
additionalFields: ['origFormOfAddress1', 'formOfAddress1']
|
33087
|
+
additionalFields: ['origFormOfAddress1', 'formOfAddress1'],
|
33088
|
+
editable: !viewOnly
|
32673
33089
|
}, {
|
32674
33090
|
headerName: 'backoffice.idmEnricher.renaming.label.translated.department',
|
32675
33091
|
field: 'translatedDepartment1',
|
@@ -32678,7 +33094,8 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32678
33094
|
placeHolderField: 'origDepartment1',
|
32679
33095
|
combinedField: 'department1'
|
32680
33096
|
},
|
32681
|
-
additionalFields: ['origDepartment1', 'department1']
|
33097
|
+
additionalFields: ['origDepartment1', 'department1'],
|
33098
|
+
editable: !viewOnly
|
32682
33099
|
}, {
|
32683
33100
|
headerName: 'backoffice.idmEnricher.renaming.label.translated.telephone',
|
32684
33101
|
field: 'translatedTelephone1',
|
@@ -32687,7 +33104,8 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32687
33104
|
placeHolderField: 'origTelephone1',
|
32688
33105
|
combinedField: 'telephone1'
|
32689
33106
|
},
|
32690
|
-
additionalFields: ['origTelephone1', 'telephone1']
|
33107
|
+
additionalFields: ['origTelephone1', 'telephone1'],
|
33108
|
+
editable: !viewOnly
|
32691
33109
|
}, {
|
32692
33110
|
headerName: 'backoffice.idmEnricher.renaming.label.translated.fax',
|
32693
33111
|
field: 'translatedFax1',
|
@@ -32696,7 +33114,8 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32696
33114
|
placeHolderField: 'origFax1',
|
32697
33115
|
combinedField: 'fax1'
|
32698
33116
|
},
|
32699
|
-
additionalFields: ['origFax1', 'fax1']
|
33117
|
+
additionalFields: ['origFax1', 'fax1'],
|
33118
|
+
editable: !viewOnly
|
32700
33119
|
}, {
|
32701
33120
|
field: 'translatedEmail1',
|
32702
33121
|
headerName: 'backoffice.idmEnricher.renaming.label.translated.email',
|
@@ -32705,7 +33124,8 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32705
33124
|
placeHolderField: 'origEmail1',
|
32706
33125
|
combinedField: 'email1'
|
32707
33126
|
},
|
32708
|
-
additionalFields: ['origEmail1', 'email1']
|
33127
|
+
additionalFields: ['origEmail1', 'email1'],
|
33128
|
+
editable: !viewOnly
|
32709
33129
|
}, {
|
32710
33130
|
headerName: 'backoffice.idmEnricher.renaming.label.translated.street',
|
32711
33131
|
field: 'translatedStreet1',
|
@@ -32714,7 +33134,8 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32714
33134
|
placeHolderField: 'origStreet1',
|
32715
33135
|
combinedField: 'street1'
|
32716
33136
|
},
|
32717
|
-
additionalFields: ['origStreet1', 'street1']
|
33137
|
+
additionalFields: ['origStreet1', 'street1'],
|
33138
|
+
editable: !viewOnly
|
32718
33139
|
}, {
|
32719
33140
|
headerName: 'backoffice.idmEnricher.renaming.label.translated.zip',
|
32720
33141
|
field: 'translatedZipCodeStreet1',
|
@@ -32723,7 +33144,8 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32723
33144
|
placeHolderField: 'origZipCodeStreet1',
|
32724
33145
|
combinedField: 'zipCodeStreet1'
|
32725
33146
|
},
|
32726
|
-
additionalFields: ['origZipCodeStreet1', 'zipCodeStreet1']
|
33147
|
+
additionalFields: ['origZipCodeStreet1', 'zipCodeStreet1'],
|
33148
|
+
editable: !viewOnly
|
32727
33149
|
}, {
|
32728
33150
|
field: 'translatedCity1',
|
32729
33151
|
headerName: 'backoffice.idmEnricher.renaming.label.translated.city',
|
@@ -32732,7 +33154,8 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32732
33154
|
placeHolderField: 'origCity1',
|
32733
33155
|
combinedField: 'city1'
|
32734
33156
|
},
|
32735
|
-
additionalFields: ['origCity1', 'city1']
|
33157
|
+
additionalFields: ['origCity1', 'city1'],
|
33158
|
+
editable: !viewOnly
|
32736
33159
|
}, {
|
32737
33160
|
field: 'translatedIsoCountryId1',
|
32738
33161
|
headerName: 'backoffice.idmEnricher.renaming.label.translated.country',
|
@@ -32743,7 +33166,8 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32743
33166
|
combinedField: 'isoCountryId1',
|
32744
33167
|
enumData: getCountryKey(t)
|
32745
33168
|
},
|
32746
|
-
additionalFields: ['origIsoCountryId1', 'isoCountryId1']
|
33169
|
+
additionalFields: ['origIsoCountryId1', 'isoCountryId1'],
|
33170
|
+
editable: !viewOnly
|
32747
33171
|
}, {
|
32748
33172
|
field: 'translatedContactPersonNo2',
|
32749
33173
|
headerName: 'backoffice.idmEnricher.renaming.label.contactperson2',
|
@@ -32752,7 +33176,8 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32752
33176
|
placeHolderField: 'origContactPersonNo2',
|
32753
33177
|
combinedField: 'contactPersonNo2'
|
32754
33178
|
},
|
32755
|
-
additionalFields: ['origContactPersonNo2', 'contactPersonNo2']
|
33179
|
+
additionalFields: ['origContactPersonNo2', 'contactPersonNo2'],
|
33180
|
+
editable: !viewOnly
|
32756
33181
|
}, {
|
32757
33182
|
headerName: 'backoffice.idmEnricher.renaming.label.contactrole2',
|
32758
33183
|
field: 'translatedContactRole2',
|
@@ -32761,7 +33186,8 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32761
33186
|
placeHolderField: 'origContactRole2',
|
32762
33187
|
combinedField: 'contactRole2'
|
32763
33188
|
},
|
32764
|
-
additionalFields: ['origContactRole2', 'contactRole2']
|
33189
|
+
additionalFields: ['origContactRole2', 'contactRole2'],
|
33190
|
+
editable: !viewOnly
|
32765
33191
|
}, {
|
32766
33192
|
headerName: 'backoffice.idmEnricher.renaming.label.translated.contactname2',
|
32767
33193
|
field: 'translatedContactName2',
|
@@ -32770,7 +33196,8 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32770
33196
|
placeHolderField: 'origContactName2',
|
32771
33197
|
combinedField: 'contactName2'
|
32772
33198
|
},
|
32773
|
-
additionalFields: ['origContactName2', 'contactName2']
|
33199
|
+
additionalFields: ['origContactName2', 'contactName2'],
|
33200
|
+
editable: !viewOnly
|
32774
33201
|
}, {
|
32775
33202
|
headerName: 'backoffice.idmEnricher.renaming.label.translated.firstname2',
|
32776
33203
|
field: 'translatedFirstName2',
|
@@ -32779,7 +33206,8 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32779
33206
|
placeHolderField: 'origFirstName2',
|
32780
33207
|
combinedField: 'firstName2'
|
32781
33208
|
},
|
32782
|
-
additionalFields: ['origFirstName2', 'firstName2']
|
33209
|
+
additionalFields: ['origFirstName2', 'firstName2'],
|
33210
|
+
editable: !viewOnly
|
32783
33211
|
}, {
|
32784
33212
|
headerName: 'backoffice.idmEnricher.renaming.label.translated.form_of_address2',
|
32785
33213
|
field: 'translatedFormOfAddress2',
|
@@ -32791,7 +33219,8 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32791
33219
|
enumData: getFormOfAddressKey(t),
|
32792
33220
|
displayLabelTemplate: '${name} (${value})'
|
32793
33221
|
},
|
32794
|
-
additionalFields: ['origFormOfAddress2', 'formOfAddress2']
|
33222
|
+
additionalFields: ['origFormOfAddress2', 'formOfAddress2'],
|
33223
|
+
editable: !viewOnly
|
32795
33224
|
}, {
|
32796
33225
|
headerName: 'backoffice.idmEnricher.renaming.label.translated.department2',
|
32797
33226
|
field: 'translatedDepartment2',
|
@@ -32800,7 +33229,8 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32800
33229
|
placeHolderField: 'origDepartment2',
|
32801
33230
|
combinedField: 'department2'
|
32802
33231
|
},
|
32803
|
-
additionalFields: ['origDepartment2', 'department2']
|
33232
|
+
additionalFields: ['origDepartment2', 'department2'],
|
33233
|
+
editable: !viewOnly
|
32804
33234
|
}, {
|
32805
33235
|
headerName: 'backoffice.idmEnricher.renaming.label.translated.telephone2',
|
32806
33236
|
field: 'translatedTelephone2',
|
@@ -32809,7 +33239,8 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32809
33239
|
placeHolderField: 'origTelephone2',
|
32810
33240
|
combinedField: 'telephone2'
|
32811
33241
|
},
|
32812
|
-
additionalFields: ['origTelephone2', 'telephone2']
|
33242
|
+
additionalFields: ['origTelephone2', 'telephone2'],
|
33243
|
+
editable: !viewOnly
|
32813
33244
|
}, {
|
32814
33245
|
headerName: 'backoffice.idmEnricher.renaming.label.translated.fax2',
|
32815
33246
|
field: 'translatedFax2',
|
@@ -32818,7 +33249,8 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32818
33249
|
placeHolderField: 'origFax2',
|
32819
33250
|
combinedField: 'fax2'
|
32820
33251
|
},
|
32821
|
-
additionalFields: ['origFax2', 'fax2']
|
33252
|
+
additionalFields: ['origFax2', 'fax2'],
|
33253
|
+
editable: !viewOnly
|
32822
33254
|
}, {
|
32823
33255
|
headerName: 'backoffice.idmEnricher.renaming.label.translated.email2',
|
32824
33256
|
field: 'translatedEmail2',
|
@@ -32827,7 +33259,8 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32827
33259
|
placeHolderField: 'origEmail2',
|
32828
33260
|
combinedField: 'email2'
|
32829
33261
|
},
|
32830
|
-
additionalFields: ['origEmail2', 'email2']
|
33262
|
+
additionalFields: ['origEmail2', 'email2'],
|
33263
|
+
editable: !viewOnly
|
32831
33264
|
}, {
|
32832
33265
|
headerName: 'backoffice.idmEnricher.renaming.label.translated.street2',
|
32833
33266
|
field: 'translatedStreet2',
|
@@ -32836,7 +33269,8 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32836
33269
|
placeHolderField: 'origStreet2',
|
32837
33270
|
combinedField: 'street2'
|
32838
33271
|
},
|
32839
|
-
additionalFields: ['origStreet2', 'street2']
|
33272
|
+
additionalFields: ['origStreet2', 'street2'],
|
33273
|
+
editable: !viewOnly
|
32840
33274
|
}, {
|
32841
33275
|
headerName: 'backoffice.idmEnricher.renaming.label.translated.zip2',
|
32842
33276
|
field: 'translatedZipCodeStreet2',
|
@@ -32845,7 +33279,8 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32845
33279
|
placeHolderField: 'origZipCodeStreet2',
|
32846
33280
|
combinedField: 'zipCodeStreet2'
|
32847
33281
|
},
|
32848
|
-
additionalFields: ['origZipCodeStreet2', 'zipCodeStreet2']
|
33282
|
+
additionalFields: ['origZipCodeStreet2', 'zipCodeStreet2'],
|
33283
|
+
editable: !viewOnly
|
32849
33284
|
}, {
|
32850
33285
|
headerName: 'backoffice.idmEnricher.renaming.label.translated.city2',
|
32851
33286
|
field: 'translatedCity2',
|
@@ -32854,11 +33289,11 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32854
33289
|
placeHolderField: 'origCity2',
|
32855
33290
|
combinedField: 'city2'
|
32856
33291
|
},
|
32857
|
-
additionalFields: ['origCity2', 'city2']
|
33292
|
+
additionalFields: ['origCity2', 'city2'],
|
33293
|
+
editable: !viewOnly
|
32858
33294
|
}, {
|
32859
33295
|
headerName: 'backoffice.idmEnricher.renaming.label.translated.country2',
|
32860
33296
|
field: 'translatedIsoCountryId2',
|
32861
|
-
editable: true,
|
32862
33297
|
cellDataType: 'withPlaceholder',
|
32863
33298
|
type: ['withPlaceholderEnum'],
|
32864
33299
|
customParams: {
|
@@ -32866,7 +33301,8 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32866
33301
|
combinedField: 'isoCountryId2',
|
32867
33302
|
enumData: getCountryKey(t)
|
32868
33303
|
},
|
32869
|
-
additionalFields: ['origIsoCountryId2', 'isoCountryId2']
|
33304
|
+
additionalFields: ['origIsoCountryId2', 'isoCountryId2'],
|
33305
|
+
editable: !viewOnly
|
32870
33306
|
}, {
|
32871
33307
|
headerName: 'backoffice.idmEnricher.renaming.label.translated.manufacturename',
|
32872
33308
|
field: 'translatedManufactureName1',
|
@@ -32875,7 +33311,8 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32875
33311
|
placeHolderField: 'origManufactureName1',
|
32876
33312
|
combinedField: 'manufactureName1'
|
32877
33313
|
},
|
32878
|
-
additionalFields: ['origManufactureName1', 'manufactureName1']
|
33314
|
+
additionalFields: ['origManufactureName1', 'manufactureName1'],
|
33315
|
+
editable: !viewOnly
|
32879
33316
|
}, {
|
32880
33317
|
headerName: 'backoffice.idmEnricher.renaming.label.translated.manufacturename2',
|
32881
33318
|
field: 'translatedManufactureName2',
|
@@ -32884,7 +33321,8 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32884
33321
|
placeHolderField: 'origManufactureName2',
|
32885
33322
|
combinedField: 'manufactureName2'
|
32886
33323
|
},
|
32887
|
-
additionalFields: ['origManufactureName2', 'manufactureName2']
|
33324
|
+
additionalFields: ['origManufactureName2', 'manufactureName2'],
|
33325
|
+
editable: !viewOnly
|
32888
33326
|
}, {
|
32889
33327
|
headerName: 'backoffice.idmEnricher.renaming.label.translated.email',
|
32890
33328
|
field: 'translatedEmail',
|
@@ -32893,7 +33331,8 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32893
33331
|
placeHolderField: 'origEmail',
|
32894
33332
|
combinedField: 'email'
|
32895
33333
|
},
|
32896
|
-
additionalFields: ['origEmail', 'email']
|
33334
|
+
additionalFields: ['origEmail', 'email'],
|
33335
|
+
editable: !viewOnly
|
32897
33336
|
}, {
|
32898
33337
|
headerName: 'backoffice.idmEnricher.renaming.label.translated.internetaddress',
|
32899
33338
|
field: 'translatedInternetAddress',
|
@@ -32902,7 +33341,8 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32902
33341
|
placeHolderField: 'origInternetAddress',
|
32903
33342
|
combinedField: 'internetAddress'
|
32904
33343
|
},
|
32905
|
-
additionalFields: ['origInternetAddress', 'internetAddress']
|
33344
|
+
additionalFields: ['origInternetAddress', 'internetAddress'],
|
33345
|
+
editable: !viewOnly
|
32906
33346
|
}, {
|
32907
33347
|
headerName: 'backoffice.idmEnricher.renaming.label.translated.street',
|
32908
33348
|
field: 'translatedStreet',
|
@@ -32911,7 +33351,8 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32911
33351
|
placeHolderField: 'origStreet',
|
32912
33352
|
combinedField: 'street'
|
32913
33353
|
},
|
32914
|
-
additionalFields: ['origStreet', 'street']
|
33354
|
+
additionalFields: ['origStreet', 'street'],
|
33355
|
+
editable: !viewOnly
|
32915
33356
|
}, {
|
32916
33357
|
headerName: 'backoffice.idmEnricher.renaming.label.translated.zip',
|
32917
33358
|
field: 'translatedZipCodeStreet',
|
@@ -32920,7 +33361,8 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32920
33361
|
placeHolderField: 'origZipCodeStreet',
|
32921
33362
|
combinedField: 'zipCodeStreet'
|
32922
33363
|
},
|
32923
|
-
additionalFields: ['origZipCodeStreet', 'zipCodeStreet']
|
33364
|
+
additionalFields: ['origZipCodeStreet', 'zipCodeStreet'],
|
33365
|
+
editable: !viewOnly
|
32924
33366
|
}, {
|
32925
33367
|
headerName: 'backoffice.idmEnricher.renaming.label.translated.city',
|
32926
33368
|
field: 'translatedCity',
|
@@ -32929,11 +33371,11 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32929
33371
|
placeHolderField: 'origCity',
|
32930
33372
|
combinedField: 'city'
|
32931
33373
|
},
|
32932
|
-
additionalFields: ['origCity', 'city']
|
33374
|
+
additionalFields: ['origCity', 'city'],
|
33375
|
+
editable: !viewOnly
|
32933
33376
|
}, {
|
32934
33377
|
headerName: 'backoffice.idmEnricher.renaming.label.translated.country',
|
32935
33378
|
field: 'translatedContactSupplierIsoCountryId',
|
32936
|
-
editable: true,
|
32937
33379
|
cellDataType: 'withPlaceholder',
|
32938
33380
|
type: ['withPlaceholderEnum'],
|
32939
33381
|
customParams: {
|
@@ -32941,7 +33383,8 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32941
33383
|
combinedField: 'contactSupplierIsoCountryId',
|
32942
33384
|
enumData: getCountryKey(t)
|
32943
33385
|
},
|
32944
|
-
additionalFields: ['origContactSupplierIsoCountryId', 'contactSupplierIsoCountryId']
|
33386
|
+
additionalFields: ['origContactSupplierIsoCountryId', 'contactSupplierIsoCountryId'],
|
33387
|
+
editable: !viewOnly
|
32945
33388
|
}, {
|
32946
33389
|
headerName: 'backoffice.idmEnricher.renaming.label.translated.zippostbox',
|
32947
33390
|
field: 'translatedZipCodePostBox',
|
@@ -32950,7 +33393,8 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32950
33393
|
placeHolderField: 'origZipCodePostBox',
|
32951
33394
|
combinedField: 'zipCodePostBox'
|
32952
33395
|
},
|
32953
|
-
additionalFields: ['origZipCodePostBox', 'zipCodePostBox']
|
33396
|
+
additionalFields: ['origZipCodePostBox', 'zipCodePostBox'],
|
33397
|
+
editable: !viewOnly
|
32954
33398
|
}, {
|
32955
33399
|
headerName: 'backoffice.idmEnricher.renaming.label.translated.postbox',
|
32956
33400
|
field: 'translatedPostBox',
|
@@ -32959,7 +33403,8 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32959
33403
|
placeHolderField: 'origPostBox',
|
32960
33404
|
combinedField: 'postBox'
|
32961
33405
|
},
|
32962
|
-
additionalFields: ['origPostBox', 'postBox']
|
33406
|
+
additionalFields: ['origPostBox', 'postBox'],
|
33407
|
+
editable: !viewOnly
|
32963
33408
|
}, {
|
32964
33409
|
headerName: 'backoffice.idmEnricher.renaming.label.translated.telephoneswitchboard',
|
32965
33410
|
field: 'translatedTelephoneSwitchboard',
|
@@ -32968,7 +33413,8 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32968
33413
|
placeHolderField: 'origTelephoneSwitchboard',
|
32969
33414
|
combinedField: 'telephoneSwitchboard'
|
32970
33415
|
},
|
32971
|
-
additionalFields: ['origTelephoneSwitchboard', 'telephoneSwitchboard']
|
33416
|
+
additionalFields: ['origTelephoneSwitchboard', 'telephoneSwitchboard'],
|
33417
|
+
editable: !viewOnly
|
32972
33418
|
}, {
|
32973
33419
|
headerName: 'backoffice.idmEnricher.renaming.label.translated.faxswitchboard',
|
32974
33420
|
field: 'translatedFaxSwitchboard',
|
@@ -32977,12 +33423,13 @@ var getConfig$6 = function getConfig(isoLanguageIds, t) {
|
|
32977
33423
|
placeHolderField: 'origFaxSwitchboard',
|
32978
33424
|
combinedField: 'faxSwitchboard'
|
32979
33425
|
},
|
32980
|
-
additionalFields: ['origFaxSwitchboard', 'faxSwitchboard']
|
33426
|
+
additionalFields: ['origFaxSwitchboard', 'faxSwitchboard'],
|
33427
|
+
editable: !viewOnly
|
32981
33428
|
}]
|
32982
33429
|
};
|
32983
33430
|
};
|
32984
33431
|
|
32985
|
-
var getConfig$5 = function getConfig(isoLanguageIds) {
|
33432
|
+
var getConfig$5 = function getConfig(isoLanguageIds, t, viewOnly) {
|
32986
33433
|
return {
|
32987
33434
|
colDef: [{
|
32988
33435
|
headerName: 'backoffice.idmEnricher.renaming.label.detailinfo_nr',
|
@@ -32991,17 +33438,17 @@ var getConfig$5 = function getConfig(isoLanguageIds) {
|
|
32991
33438
|
}, createTranslatedColumnConfig('translatedExternalName', 'backoffice.idmEnricher.renaming.label.externalName', isoLanguageIds, false, 'withPlaceholder', {
|
32992
33439
|
placeHolderField: 'origExternalName',
|
32993
33440
|
combinedField: 'externalName'
|
32994
|
-
}, ['origExternalName', 'externalName']), createTranslatedColumnConfig('translatedInternalName', 'backoffice.idmEnricher.renaming.label.internalName', isoLanguageIds, false, 'withPlaceholder', {
|
33441
|
+
}, ['origExternalName', 'externalName'], !viewOnly), createTranslatedColumnConfig('translatedInternalName', 'backoffice.idmEnricher.renaming.label.internalName', isoLanguageIds, false, 'withPlaceholder', {
|
32995
33442
|
placeHolderField: 'origInternalName',
|
32996
33443
|
combinedField: 'internalName'
|
32997
|
-
}, ['origInternalName', 'internalName']), createTranslatedColumnConfig('translatedToolTip', 'backoffice.idmEnricher.renaming.label.tooltip', isoLanguageIds, false, 'withPlaceholder', {
|
33444
|
+
}, ['origInternalName', 'internalName'], !viewOnly), createTranslatedColumnConfig('translatedToolTip', 'backoffice.idmEnricher.renaming.label.tooltip', isoLanguageIds, false, 'withPlaceholder', {
|
32998
33445
|
placeHolderField: 'origToolTip',
|
32999
33446
|
combinedField: 'toolTip'
|
33000
|
-
}, ['origToolTip', 'toolTip'])]
|
33447
|
+
}, ['origToolTip', 'toolTip'], !viewOnly)]
|
33001
33448
|
};
|
33002
33449
|
};
|
33003
33450
|
|
33004
|
-
var getConfig$4 = function getConfig(isoLanguageIds) {
|
33451
|
+
var getConfig$4 = function getConfig(isoLanguageIds, t, viewOnly) {
|
33005
33452
|
return {
|
33006
33453
|
colDef: [{
|
33007
33454
|
headerName: 'backoffice.idmEnricher.renaming.label.featureNr',
|
@@ -33012,11 +33459,11 @@ var getConfig$4 = function getConfig(isoLanguageIds) {
|
|
33012
33459
|
}, createTranslatedColumnConfig('translatedFeatureText', 'backoffice.idmEnricher.renaming.label.featuretext', isoLanguageIds, false, 'withPlaceholder', {
|
33013
33460
|
placeHolderField: 'origFeatureText',
|
33014
33461
|
combinedField: 'featureText'
|
33015
|
-
}, ['origFeatureText', 'featureText'])]
|
33462
|
+
}, ['origFeatureText', 'featureText'], !viewOnly)]
|
33016
33463
|
};
|
33017
33464
|
};
|
33018
33465
|
|
33019
|
-
var getConfig$3 = function getConfig(isoLanguageIds) {
|
33466
|
+
var getConfig$3 = function getConfig(isoLanguageIds, t, viewOnly) {
|
33020
33467
|
return {
|
33021
33468
|
colDef: [{
|
33022
33469
|
headerName: 'backoffice.idmEnricher.renaming.label.typeNo',
|
@@ -33027,13 +33474,13 @@ var getConfig$3 = function getConfig(isoLanguageIds) {
|
|
33027
33474
|
}, createTranslatedColumnConfig('translatedShortText', 'backoffice.idmEnricher.renaming.label.shortText', isoLanguageIds, false, 'withPlaceholder', {
|
33028
33475
|
placeHolderField: 'origShortText',
|
33029
33476
|
combinedField: 'shortText'
|
33030
|
-
}, ['origShortText', 'shortText']), createTranslatedColumnConfig('translatedFullText', 'backoffice.idmEnricher.renaming.label.fullText', isoLanguageIds, false, 'withPlaceholder', {
|
33477
|
+
}, ['origShortText', 'shortText'], !viewOnly), createTranslatedColumnConfig('translatedFullText', 'backoffice.idmEnricher.renaming.label.fullText', isoLanguageIds, false, 'withPlaceholder', {
|
33031
33478
|
placeHolderField: 'origFullText',
|
33032
33479
|
combinedField: 'fullText'
|
33033
|
-
}, ['origFullText', 'fullText']), createTranslatedColumnConfig('translatedPlanningAdvice', 'backoffice.idmEnricher.renaming.label.planningAdvice', isoLanguageIds, false, 'withPlaceholder', {
|
33480
|
+
}, ['origFullText', 'fullText'], !viewOnly), createTranslatedColumnConfig('translatedPlanningAdvice', 'backoffice.idmEnricher.renaming.label.planningAdvice', isoLanguageIds, false, 'withPlaceholder', {
|
33034
33481
|
placeHolderField: 'origPlanningAdvice',
|
33035
33482
|
combinedField: 'planningAdvice'
|
33036
|
-
}, ['origPlanningAdvice', 'planningAdvice']), {
|
33483
|
+
}, ['origPlanningAdvice', 'planningAdvice'], !viewOnly), {
|
33037
33484
|
headerName: 'backoffice.idmEnricher.renaming.label.translatedSalesNumber',
|
33038
33485
|
field: 'translatedSalesNumber',
|
33039
33486
|
cellDataType: 'withPlaceholder',
|
@@ -33041,7 +33488,8 @@ var getConfig$3 = function getConfig(isoLanguageIds) {
|
|
33041
33488
|
placeHolderField: 'origSalesNumber',
|
33042
33489
|
combinedField: 'salesNumber'
|
33043
33490
|
},
|
33044
|
-
additionalFields: ['origSalesNumber', 'salesNumber']
|
33491
|
+
additionalFields: ['origSalesNumber', 'salesNumber'],
|
33492
|
+
editable: !viewOnly
|
33045
33493
|
}, {
|
33046
33494
|
field: 'sequenceNo',
|
33047
33495
|
headerName: 'backoffice.idmEnricher.renaming.label.sequenceNo',
|
@@ -33055,7 +33503,8 @@ var getConfig$3 = function getConfig(isoLanguageIds) {
|
|
33055
33503
|
placeHolderField: 'origEdpNumber',
|
33056
33504
|
combinedField: 'edpNumber'
|
33057
33505
|
},
|
33058
|
-
additionalFields: ['origEdpNumber', 'edpNumber']
|
33506
|
+
additionalFields: ['origEdpNumber', 'edpNumber'],
|
33507
|
+
editable: !viewOnly
|
33059
33508
|
}, {
|
33060
33509
|
headerName: 'backoffice.idmEnricher.renaming.label.eannummer',
|
33061
33510
|
field: 'translatedEanNumber',
|
@@ -33064,12 +33513,13 @@ var getConfig$3 = function getConfig(isoLanguageIds) {
|
|
33064
33513
|
placeHolderField: 'origEanNumber',
|
33065
33514
|
combinedField: 'eanNumber'
|
33066
33515
|
},
|
33067
|
-
additionalFields: ['origEanNumber', 'eanNumber']
|
33516
|
+
additionalFields: ['origEanNumber', 'eanNumber'],
|
33517
|
+
editable: !viewOnly
|
33068
33518
|
}]
|
33069
33519
|
};
|
33070
33520
|
};
|
33071
33521
|
|
33072
|
-
var getConfig$2 = function getConfig(isoLanguageIds) {
|
33522
|
+
var getConfig$2 = function getConfig(isoLanguageIds, t, viewOnly) {
|
33073
33523
|
return {
|
33074
33524
|
colDef: [{
|
33075
33525
|
headerName: 'backoffice.idmEnricher.renaming.label.optionKey',
|
@@ -33080,10 +33530,10 @@ var getConfig$2 = function getConfig(isoLanguageIds) {
|
|
33080
33530
|
}, createTranslatedColumnConfig('translatedOptionText', 'backoffice.idmEnricher.renaming.label.optionText', isoLanguageIds, false, 'withPlaceholder', {
|
33081
33531
|
placeHolderField: 'origOptionText',
|
33082
33532
|
combinedField: 'optionText'
|
33083
|
-
}, ['origOptionText', 'optionText']), createTranslatedColumnConfig('translatedOptionCommentText', 'backoffice.idmEnricher.renaming.label.optionCommentText', isoLanguageIds, false, 'withPlaceholder', {
|
33533
|
+
}, ['origOptionText', 'optionText'], !viewOnly), createTranslatedColumnConfig('translatedOptionCommentText', 'backoffice.idmEnricher.renaming.label.optionCommentText', isoLanguageIds, false, 'withPlaceholder', {
|
33084
33534
|
placeHolderField: 'origOptionCommentText',
|
33085
33535
|
combinedField: 'optionCommentText'
|
33086
|
-
}, ['origOptionCommentText', 'optionCommentText']), {
|
33536
|
+
}, ['origOptionCommentText', 'optionCommentText'], !viewOnly), {
|
33087
33537
|
field: 'featureNos',
|
33088
33538
|
headerName: 'backoffice.idmCatalogEditor.catalogoptions.label.featureIds',
|
33089
33539
|
cellDataType: 'lookup',
|
@@ -33108,7 +33558,7 @@ var getConfig$2 = function getConfig(isoLanguageIds) {
|
|
33108
33558
|
};
|
33109
33559
|
};
|
33110
33560
|
|
33111
|
-
var getConfig$1 = function getConfig(isoLanguageIds) {
|
33561
|
+
var getConfig$1 = function getConfig(isoLanguageIds, t, viewOnly) {
|
33112
33562
|
return {
|
33113
33563
|
colDef: [{
|
33114
33564
|
headerName: 'backoffice.idmEnricher.renaming.label.serieNo',
|
@@ -33119,10 +33569,10 @@ var getConfig$1 = function getConfig(isoLanguageIds) {
|
|
33119
33569
|
}, createTranslatedColumnConfig('translatedSeriesName', 'backoffice.idmEnricher.renaming.label.serieName', isoLanguageIds, false, 'withPlaceholder', {
|
33120
33570
|
placeHolderField: 'origSeriesName',
|
33121
33571
|
combinedField: 'seriesName'
|
33122
|
-
}, ['origSeriesName', 'seriesName']), createTranslatedColumnConfig('translatedSeriesFullText', 'backoffice.idmEnricher.renaming.label.serieFullText', isoLanguageIds, false, 'withPlaceholder', {
|
33572
|
+
}, ['origSeriesName', 'seriesName'], !viewOnly), createTranslatedColumnConfig('translatedSeriesFullText', 'backoffice.idmEnricher.renaming.label.serieFullText', isoLanguageIds, false, 'withPlaceholder', {
|
33123
33573
|
placeHolderField: 'origSeriesFullText',
|
33124
33574
|
combinedField: 'seriesFullText'
|
33125
|
-
}, ['origSeriesFullText', 'seriesFullText'])]
|
33575
|
+
}, ['origSeriesFullText', 'seriesFullText'], !viewOnly)]
|
33126
33576
|
};
|
33127
33577
|
};
|
33128
33578
|
|
@@ -33210,11 +33660,20 @@ var RenamingTable = observer(function (_ref) {
|
|
33210
33660
|
packageId = _useModule.packageId,
|
33211
33661
|
apiConfig = _useModule.apiConfig,
|
33212
33662
|
selectedPackage = _useModule.selectedPackage,
|
33213
|
-
|
33214
|
-
|
33215
|
-
|
33216
|
-
|
33217
|
-
|
33663
|
+
selectedItem = _useModule.selectedItem,
|
33664
|
+
setSelectedItem = _useModule.setSelectedItem,
|
33665
|
+
selectedSerie = _useModule.selectedSerie,
|
33666
|
+
setSelectedSerie = _useModule.setSelectedSerie,
|
33667
|
+
viewOnly = _useModule.viewOnly;
|
33668
|
+
var _useTools = useTools({
|
33669
|
+
packageId: packageId,
|
33670
|
+
isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
|
33671
|
+
setArticle: setSelectedItem,
|
33672
|
+
setSerie: setSelectedSerie,
|
33673
|
+
serie: selectedSerie,
|
33674
|
+
item: selectedItem
|
33675
|
+
}),
|
33676
|
+
updateConfigurator = _useTools.updateConfigurator;
|
33218
33677
|
var baseConfiguration = useMemo(function () {
|
33219
33678
|
return getConfig((selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isoLanguageIds) || ['DE'], t);
|
33220
33679
|
}, [selectedPackage, i18n.language]);
|
@@ -33223,6 +33682,31 @@ var RenamingTable = observer(function (_ref) {
|
|
33223
33682
|
packageId: packageId
|
33224
33683
|
};
|
33225
33684
|
}, [packageId]);
|
33685
|
+
var hooks = useMemo(function () {
|
33686
|
+
return {
|
33687
|
+
onCellSelectionChanged: function onCellSelectionChanged(event) {
|
33688
|
+
var _event$selection$, _event$selection$2, _event$selection$3, _event$selection$4;
|
33689
|
+
switch (type) {
|
33690
|
+
case 'features':
|
33691
|
+
updateConfigurator({
|
33692
|
+
opt: (_event$selection$ = event.selection[0]) === null || _event$selection$ === void 0 || (_event$selection$ = _event$selection$.node) === null || _event$selection$ === void 0 || (_event$selection$ = _event$selection$.data) === null || _event$selection$ === void 0 ? void 0 : _event$selection$.featureNo
|
33693
|
+
});
|
33694
|
+
break;
|
33695
|
+
case 'options':
|
33696
|
+
updateConfigurator({
|
33697
|
+
opv: (_event$selection$2 = event.selection[0]) === null || _event$selection$2 === void 0 || (_event$selection$2 = _event$selection$2.node) === null || _event$selection$2 === void 0 || (_event$selection$2 = _event$selection$2.data) === null || _event$selection$2 === void 0 ? void 0 : _event$selection$2.optionKey
|
33698
|
+
});
|
33699
|
+
break;
|
33700
|
+
case 'items':
|
33701
|
+
setSelectedItem((_event$selection$3 = event.selection[0]) === null || _event$selection$3 === void 0 || (_event$selection$3 = _event$selection$3.node) === null || _event$selection$3 === void 0 ? void 0 : _event$selection$3.data);
|
33702
|
+
break;
|
33703
|
+
case 'series':
|
33704
|
+
setSelectedSerie((_event$selection$4 = event.selection[0]) === null || _event$selection$4 === void 0 || (_event$selection$4 = _event$selection$4.node) === null || _event$selection$4 === void 0 ? void 0 : _event$selection$4.data);
|
33705
|
+
break;
|
33706
|
+
}
|
33707
|
+
}
|
33708
|
+
};
|
33709
|
+
}, [updateConfigurator, type]);
|
33226
33710
|
var prevPreFilter = useRef();
|
33227
33711
|
var preFilter = useMemo(function () {
|
33228
33712
|
if (type === 'items' && selectedSerie) {
|
@@ -33243,7 +33727,7 @@ var RenamingTable = observer(function (_ref) {
|
|
33243
33727
|
var apiInterface = useMemo(function () {
|
33244
33728
|
return {
|
33245
33729
|
read: apiConfig.enricherService + '/packages/${packageId}/renamings/' + type,
|
33246
|
-
update: apiConfig.enricherService + '/packages/${packageId}/renamings/' + type + '/${_id}',
|
33730
|
+
update: viewOnly ? undefined : apiConfig.enricherService + '/packages/${packageId}/renamings/' + type + '/${_id}',
|
33247
33731
|
bulk: apiConfig.enricherService + '/packages/${packageId}/renamings/' + type + '/bulk'
|
33248
33732
|
};
|
33249
33733
|
}, [type]);
|
@@ -33269,7 +33753,7 @@ var RenamingTable = observer(function (_ref) {
|
|
33269
33753
|
cellDataType: 'objectId'
|
33270
33754
|
}])
|
33271
33755
|
};
|
33272
|
-
}, [apiInterface, baseConfiguration.colDef]);
|
33756
|
+
}, [apiInterface, baseConfiguration.colDef, viewOnly]);
|
33273
33757
|
var showTable = useMemo(function () {
|
33274
33758
|
return selectedPackage && (!['items'].includes(type) || type === 'items' && preFilter);
|
33275
33759
|
}, [type, preFilter, selectedPackage]);
|
@@ -33292,7 +33776,8 @@ var RenamingTable = observer(function (_ref) {
|
|
33292
33776
|
gridId: 'renaming-grid_' + type,
|
33293
33777
|
applicationData: applicationData,
|
33294
33778
|
preFilter: preFilter,
|
33295
|
-
configuration: configuration
|
33779
|
+
configuration: configuration,
|
33780
|
+
hooks: hooks
|
33296
33781
|
})]
|
33297
33782
|
});
|
33298
33783
|
});
|
@@ -33774,11 +34259,45 @@ var ExclusivityTable = observer(function (_ref) {
|
|
33774
34259
|
apiConfig = _useModule.apiConfig,
|
33775
34260
|
organizationId = _useModule.organizationId,
|
33776
34261
|
selectedPackage = _useModule.selectedPackage,
|
33777
|
-
selectedSerie = _useModule.selectedSerie
|
33778
|
-
|
33779
|
-
|
33780
|
-
|
33781
|
-
|
34262
|
+
selectedSerie = _useModule.selectedSerie,
|
34263
|
+
setSelectedSerie = _useModule.setSelectedSerie,
|
34264
|
+
setSelectedItem = _useModule.setSelectedItem,
|
34265
|
+
selectedItem = _useModule.selectedItem,
|
34266
|
+
viewOnly = _useModule.viewOnly;
|
34267
|
+
var _useTools = useTools({
|
34268
|
+
packageId: packageId,
|
34269
|
+
isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
|
34270
|
+
setArticle: setSelectedItem,
|
34271
|
+
setSerie: setSelectedSerie,
|
34272
|
+
serie: selectedSerie,
|
34273
|
+
item: selectedItem
|
34274
|
+
}),
|
34275
|
+
updateConfigurator = _useTools.updateConfigurator;
|
34276
|
+
var hooks = useMemo(function () {
|
34277
|
+
return {
|
34278
|
+
onCellSelectionChanged: function onCellSelectionChanged(event) {
|
34279
|
+
var _event$selection$, _event$selection$2, _event$selection$3, _event$selection$4;
|
34280
|
+
switch (type) {
|
34281
|
+
case 'efeatures':
|
34282
|
+
updateConfigurator({
|
34283
|
+
opt: (_event$selection$ = event.selection[0]) === null || _event$selection$ === void 0 || (_event$selection$ = _event$selection$.node) === null || _event$selection$ === void 0 || (_event$selection$ = _event$selection$.data) === null || _event$selection$ === void 0 ? void 0 : _event$selection$.featureNo
|
34284
|
+
});
|
34285
|
+
break;
|
34286
|
+
case 'eoptions':
|
34287
|
+
updateConfigurator({
|
34288
|
+
opv: (_event$selection$2 = event.selection[0]) === null || _event$selection$2 === void 0 || (_event$selection$2 = _event$selection$2.node) === null || _event$selection$2 === void 0 || (_event$selection$2 = _event$selection$2.data) === null || _event$selection$2 === void 0 ? void 0 : _event$selection$2.optionKey
|
34289
|
+
});
|
34290
|
+
break;
|
34291
|
+
case 'eitems':
|
34292
|
+
setSelectedItem((_event$selection$3 = event.selection[0]) === null || _event$selection$3 === void 0 || (_event$selection$3 = _event$selection$3.node) === null || _event$selection$3 === void 0 ? void 0 : _event$selection$3.data);
|
34293
|
+
break;
|
34294
|
+
case 'eseries':
|
34295
|
+
setSelectedSerie((_event$selection$4 = event.selection[0]) === null || _event$selection$4 === void 0 || (_event$selection$4 = _event$selection$4.node) === null || _event$selection$4 === void 0 ? void 0 : _event$selection$4.data);
|
34296
|
+
break;
|
34297
|
+
}
|
34298
|
+
}
|
34299
|
+
};
|
34300
|
+
}, [updateConfigurator, type]);
|
33782
34301
|
var apiInterface = useMemo(function () {
|
33783
34302
|
var patchId = '${_id}';
|
33784
34303
|
if (type === 'eitems') patchId = '${typeNo}';
|
@@ -33792,7 +34311,7 @@ var ExclusivityTable = observer(function (_ref) {
|
|
33792
34311
|
var listType = type === 'eitems' ? 'items' : 'options';
|
33793
34312
|
return {
|
33794
34313
|
read: !['eitems'].includes(type) ? apiConfig.enricherService + '/packages/${packageId}/exclusivities/' + subType : apiConfig.enricherService + '/packages/${packageId}/exclusivities/' + subType + '/${subTypeId}/' + listType,
|
33795
|
-
update: !['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
|
34314
|
+
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
|
33796
34315
|
};
|
33797
34316
|
}, [type]);
|
33798
34317
|
var oldDataRef = useRef();
|
@@ -33821,7 +34340,7 @@ var ExclusivityTable = observer(function (_ref) {
|
|
33821
34340
|
floatingFilter: true,
|
33822
34341
|
colDef: [{
|
33823
34342
|
field: 'active',
|
33824
|
-
editable:
|
34343
|
+
editable: !viewOnly,
|
33825
34344
|
cellDataType: 'boolean',
|
33826
34345
|
pinned: 'left',
|
33827
34346
|
lockPinned: true
|
@@ -33837,11 +34356,11 @@ var ExclusivityTable = observer(function (_ref) {
|
|
33837
34356
|
}, {
|
33838
34357
|
headerName: 'backoffice.idmEnricher.general.label._id',
|
33839
34358
|
field: '_id',
|
33840
|
-
editable:
|
34359
|
+
editable: false,
|
33841
34360
|
cellDataType: 'objectId'
|
33842
34361
|
}])
|
33843
34362
|
};
|
33844
|
-
}, [apiInterface, selectedSerie, config.colDef]);
|
34363
|
+
}, [apiInterface, selectedSerie, config.colDef, viewOnly]);
|
33845
34364
|
return /*#__PURE__*/jsxs(Fragment, {
|
33846
34365
|
children: [/*#__PURE__*/jsx(Descriptions$1, {
|
33847
34366
|
title: /*#__PURE__*/jsxs("div", {
|
@@ -33860,7 +34379,8 @@ var ExclusivityTable = observer(function (_ref) {
|
|
33860
34379
|
}), showTable && /*#__PURE__*/jsx(Spreadsheet, {
|
33861
34380
|
gridId: 'crud-grid_exclusivity_' + type,
|
33862
34381
|
applicationData: applicationData,
|
33863
|
-
configuration: configuration
|
34382
|
+
configuration: configuration,
|
34383
|
+
hooks: hooks
|
33864
34384
|
})]
|
33865
34385
|
});
|
33866
34386
|
});
|
@@ -33872,10 +34392,11 @@ var TableTabGroups = observer(function () {
|
|
33872
34392
|
packageId = _useModule.packageId,
|
33873
34393
|
organizationId = _useModule.organizationId,
|
33874
34394
|
apiConfig = _useModule.apiConfig,
|
33875
|
-
selectedPackage = _useModule.selectedPackage
|
34395
|
+
selectedPackage = _useModule.selectedPackage,
|
34396
|
+
viewOnly = _useModule.viewOnly;
|
33876
34397
|
useTools({
|
33877
34398
|
packageId: packageId,
|
33878
|
-
isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.
|
34399
|
+
isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi
|
33879
34400
|
});
|
33880
34401
|
var applicationData = useMemo(function () {
|
33881
34402
|
return {
|
@@ -33887,10 +34408,10 @@ var TableTabGroups = observer(function () {
|
|
33887
34408
|
return {
|
33888
34409
|
//TODO: Es gibt globale Tabgroups, die vordefiniert sind und pro Enricher Paket nochmals angepasst werden können -endpoint anpassen?
|
33889
34410
|
read: apiConfig.enricherService + '/packages/${packageId}/tabgroups',
|
33890
|
-
create: apiConfig.enricherService + '/packages/${packageId}/tabgroups',
|
33891
|
-
restore: apiConfig.enricherService + '/packages/${packageId}/tabgroups/${_id}',
|
33892
|
-
"delete": apiConfig.enricherService + '/packages/${packageId}/tabgroups/${_id}',
|
33893
|
-
update: apiConfig.enricherService + '/packages/${packageId}/tabgroups/${_id}',
|
34411
|
+
create: viewOnly ? undefined : apiConfig.enricherService + '/packages/${packageId}/tabgroups',
|
34412
|
+
restore: viewOnly ? undefined : apiConfig.enricherService + '/packages/${packageId}/tabgroups/${_id}',
|
34413
|
+
"delete": viewOnly ? undefined : apiConfig.enricherService + '/packages/${packageId}/tabgroups/${_id}',
|
34414
|
+
update: viewOnly ? undefined : apiConfig.enricherService + '/packages/${packageId}/tabgroups/${_id}',
|
33894
34415
|
bulk: apiConfig.enricherService + '/packages/${packageId}/tabgroups/bulk'
|
33895
34416
|
};
|
33896
34417
|
}, []);
|
@@ -33904,7 +34425,7 @@ var TableTabGroups = observer(function () {
|
|
33904
34425
|
field: 'featureNos',
|
33905
34426
|
headerName: 'backoffice.idmEnricher.renaming.label.featureNr',
|
33906
34427
|
cellDataType: 'lookup',
|
33907
|
-
editable:
|
34428
|
+
editable: !viewOnly,
|
33908
34429
|
customParams: {
|
33909
34430
|
nameField: 'featureNosDisplayTexts',
|
33910
34431
|
displayLabelTemplate: '${name} (${value})',
|
@@ -33918,7 +34439,7 @@ var TableTabGroups = observer(function () {
|
|
33918
34439
|
},
|
33919
34440
|
additionalFields: ['featureNosDisplayTexts'],
|
33920
34441
|
isDictionary: true
|
33921
|
-
}, createTranslatedColumnConfig('name', 'backoffice.idmEnricher.tabgroups.label.name', selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isoLanguageIds,
|
34442
|
+
}, createTranslatedColumnConfig('name', 'backoffice.idmEnricher.tabgroups.label.name', selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isoLanguageIds, !viewOnly), {
|
33922
34443
|
field: 'organizationId',
|
33923
34444
|
editable: false,
|
33924
34445
|
hide: true,
|
@@ -33948,7 +34469,7 @@ var TableTabGroups = observer(function () {
|
|
33948
34469
|
cellDataType: 'objectId'
|
33949
34470
|
}]
|
33950
34471
|
};
|
33951
|
-
}, [apiInterface, selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isoLanguageIds]);
|
34472
|
+
}, [apiInterface, selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isoLanguageIds, viewOnly]);
|
33952
34473
|
return /*#__PURE__*/jsxs(Fragment, {
|
33953
34474
|
children: [/*#__PURE__*/jsx(Descriptions$1, {
|
33954
34475
|
title: /*#__PURE__*/jsxs("div", {
|
@@ -33976,10 +34497,11 @@ var TablePartlistPos = observer(function () {
|
|
33976
34497
|
packageId = _useModule.packageId,
|
33977
34498
|
organizationId = _useModule.organizationId,
|
33978
34499
|
apiConfig = _useModule.apiConfig,
|
33979
|
-
selectedPackage = _useModule.selectedPackage
|
34500
|
+
selectedPackage = _useModule.selectedPackage,
|
34501
|
+
viewOnly = _useModule.viewOnly;
|
33980
34502
|
useTools({
|
33981
34503
|
packageId: packageId,
|
33982
|
-
isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.
|
34504
|
+
isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi
|
33983
34505
|
});
|
33984
34506
|
var posInvisibility = useMemo(function () {
|
33985
34507
|
return [{
|
@@ -34002,10 +34524,10 @@ var TablePartlistPos = observer(function () {
|
|
34002
34524
|
var apiInterface = useMemo(function () {
|
34003
34525
|
return {
|
34004
34526
|
read: apiConfig.enricherService + '/packages/${packageId}/partlistpos',
|
34005
|
-
create: apiConfig.enricherService + '/packages/${packageId}/partlistpos',
|
34006
|
-
restore: apiConfig.enricherService + '/packages/${packageId}/partlistpos/${_id}',
|
34007
|
-
"delete": apiConfig.enricherService + '/packages/${packageId}/partlistpos/${_id}',
|
34008
|
-
update: apiConfig.enricherService + '/packages/${packageId}/partlistpos/${_id}',
|
34527
|
+
create: viewOnly ? undefined : apiConfig.enricherService + '/packages/${packageId}/partlistpos',
|
34528
|
+
restore: viewOnly ? undefined : apiConfig.enricherService + '/packages/${packageId}/partlistpos/${_id}',
|
34529
|
+
"delete": viewOnly ? undefined : apiConfig.enricherService + '/packages/${packageId}/partlistpos/${_id}',
|
34530
|
+
update: viewOnly ? undefined : apiConfig.enricherService + '/packages/${packageId}/partlistpos/${_id}',
|
34009
34531
|
bulk: apiConfig.enricherService + '/packages/${packageId}/partlistpos/bulk'
|
34010
34532
|
};
|
34011
34533
|
}, []);
|
@@ -34018,12 +34540,12 @@ var TablePartlistPos = observer(function () {
|
|
34018
34540
|
colDef: [{
|
34019
34541
|
headerName: 'backoffice.idmEnricher.partlistpos.label.retailPrefix',
|
34020
34542
|
field: 'retailPrefix',
|
34021
|
-
editable:
|
34543
|
+
editable: !viewOnly,
|
34022
34544
|
pinned: 'left'
|
34023
34545
|
}, {
|
34024
34546
|
headerName: 'backoffice.idmEnricher.partlistpos.label.retailArtilceNumber',
|
34025
34547
|
field: 'retailArtilceNumber',
|
34026
|
-
editable:
|
34548
|
+
editable: !viewOnly,
|
34027
34549
|
pinned: 'left'
|
34028
34550
|
}, {
|
34029
34551
|
headerName: 'backoffice.idmEnricher.partlistpos.label.partlistKey',
|
@@ -34125,7 +34647,7 @@ var TablePartlistPos = observer(function () {
|
|
34125
34647
|
cellDataType: 'objectId'
|
34126
34648
|
}]
|
34127
34649
|
};
|
34128
|
-
}, [apiInterface, posInvisibility]);
|
34650
|
+
}, [apiInterface, posInvisibility, viewOnly]);
|
34129
34651
|
return /*#__PURE__*/jsxs(Fragment, {
|
34130
34652
|
children: [/*#__PURE__*/jsx(Descriptions$1, {
|
34131
34653
|
title: /*#__PURE__*/jsxs("div", {
|
@@ -34426,8 +34948,8 @@ var space = "space-T5Mkd";
|
|
34426
34948
|
var input$1 = "input-SK-Fo";
|
34427
34949
|
var addButton$1 = "addButton-AVN8Y";
|
34428
34950
|
var helpText = "helpText-QYQQF";
|
34429
|
-
var css_248z$
|
34430
|
-
styleInject(css_248z$
|
34951
|
+
var css_248z$e = ".cell-Noc7s {\n min-width: 50px;\n height: 100%;\n}\n\n.typeSelector-Y8Yly {\n margin-bottom: 16px;\n}\n\n.space-T5Mkd {\n width: 100%;\n}\n\n.input-SK-Fo {\n width: 120px;\n}\n\n.addButton-AVN8Y {\n margin-top: 16px;\n text-align: right;\n}\n\n.helpText-QYQQF {\n margin-top: 8px;\n font-size: 12px;\n color: #666;\n}\n";
|
34952
|
+
styleInject(css_248z$e);
|
34431
34953
|
|
34432
34954
|
function PriceFactorCellRenderer(props) {
|
34433
34955
|
var data = props.data,
|
@@ -34643,8 +35165,8 @@ var difference = "difference-xT9ZP";
|
|
34643
35165
|
var differencePositive = "differencePositive-hGhZO";
|
34644
35166
|
var differenceNegative = "differenceNegative-3CEZA";
|
34645
35167
|
var differenceNeutral = "differenceNeutral-wx8oE";
|
34646
|
-
var css_248z$
|
34647
|
-
styleInject(css_248z$
|
35168
|
+
var css_248z$d = ".container-T4Tzz {\n display: flex;\n align-items: center;\n}\n\n.price-NjOOy {\n font-weight: normal;\n}\n\n.priceManual-i7wtQ {\n font-weight: bold;\n}\n\n.originalPrice-V8MP5 {\n color: #8c8c8c;\n margin: 0 8px;\n}\n\n.difference-xT9ZP {\n margin-left: 8px;\n}\n\n.differencePositive-hGhZO {\n color: #52c41a;\n}\n\n.differenceNegative-3CEZA {\n color: #ff4d4f;\n}\n\n.differenceNeutral-wx8oE {\n color: inherit;\n}\n";
|
35169
|
+
styleInject(css_248z$d);
|
34648
35170
|
|
34649
35171
|
function PriceDisplayCellRenderer(props) {
|
34650
35172
|
var _data$origPrices, _data$manualPrices, _currentPrice$toFixed, _origPrice$toFixed;
|
@@ -34710,59 +35232,129 @@ function getPriceFeatureGroups(selectedSerie, language) {
|
|
34710
35232
|
if (!(selectedSerie !== null && selectedSerie !== void 0 && selectedSerie.pricefeaturegroups)) {
|
34711
35233
|
return [];
|
34712
35234
|
}
|
34713
|
-
var priceFeatureGroups = (_selectedSerie$pricef = selectedSerie.pricefeaturegroups) === null || _selectedSerie$pricef === void 0 ? void 0 : _selectedSerie$pricef.map(function (
|
35235
|
+
var priceFeatureGroups = (_selectedSerie$pricef = selectedSerie.pricefeaturegroups) === null || _selectedSerie$pricef === void 0 ? void 0 : _selectedSerie$pricef.map(function (priceFeatureGroupKey, i) {
|
34714
35236
|
var _selectedSerie$pricef2, _selectedSerie$pricef3;
|
34715
35237
|
return {
|
34716
|
-
id:
|
34717
|
-
displayText: (_selectedSerie$pricef2 = (_selectedSerie$pricef3 = selectedSerie.pricefeaturegroupsDisplayTexts) === null || _selectedSerie$pricef3 === void 0 || (_selectedSerie$pricef3 = _selectedSerie$pricef3[i]) === null || _selectedSerie$pricef3 === void 0 ? void 0 : _selectedSerie$pricef3[language.toUpperCase()]) !== null && _selectedSerie$pricef2 !== void 0 ? _selectedSerie$pricef2 :
|
35238
|
+
id: 'PRFG' + priceFeatureGroupKey,
|
35239
|
+
displayText: (_selectedSerie$pricef2 = (_selectedSerie$pricef3 = selectedSerie.pricefeaturegroupsDisplayTexts) === null || _selectedSerie$pricef3 === void 0 || (_selectedSerie$pricef3 = _selectedSerie$pricef3[i]) === null || _selectedSerie$pricef3 === void 0 ? void 0 : _selectedSerie$pricef3[language.toUpperCase()]) !== null && _selectedSerie$pricef2 !== void 0 ? _selectedSerie$pricef2 : priceFeatureGroupKey,
|
34718
35240
|
keys: [],
|
34719
35241
|
keysDisplayTexts: []
|
34720
35242
|
};
|
34721
35243
|
});
|
34722
|
-
(_selectedSerie$pricef4 = selectedSerie.pricefeaturegroupsKeys) === null || _selectedSerie$pricef4 === void 0 || _selectedSerie$pricef4.forEach(function (
|
34723
|
-
var pfgSplit =
|
34724
|
-
var pfgId = pfgSplit[0]
|
35244
|
+
(_selectedSerie$pricef4 = selectedSerie.pricefeaturegroupsKeys) === null || _selectedSerie$pricef4 === void 0 || _selectedSerie$pricef4.forEach(function (priceGroupKey, i) {
|
35245
|
+
var pfgSplit = priceGroupKey.split('_');
|
35246
|
+
var pfgId = pfgSplit[0];
|
34725
35247
|
var pfg = priceFeatureGroups.find(function (pfg) {
|
34726
35248
|
return pfg.id == pfgId;
|
34727
35249
|
});
|
34728
35250
|
if (pfg) {
|
34729
35251
|
var _selectedSerie$pricef5;
|
34730
|
-
pfg.keys.push(
|
35252
|
+
pfg.keys.push(priceGroupKey);
|
34731
35253
|
pfg.keysDisplayTexts.push((_selectedSerie$pricef5 = selectedSerie.pricefeaturegroupsKeysDisplayTexts) === null || _selectedSerie$pricef5 === void 0 || (_selectedSerie$pricef5 = _selectedSerie$pricef5[i]) === null || _selectedSerie$pricef5 === void 0 ? void 0 : _selectedSerie$pricef5[language.toUpperCase()]);
|
34732
35254
|
}
|
34733
35255
|
});
|
34734
35256
|
return priceFeatureGroups;
|
34735
35257
|
}
|
34736
35258
|
|
34737
|
-
var wrapper$3 = "wrapper-5t6RT";
|
34738
35259
|
var input = "input-leHam";
|
34739
35260
|
var disabled$1 = "disabled-Llkqu";
|
34740
|
-
var css_248z$
|
34741
|
-
styleInject(css_248z$
|
35261
|
+
var css_248z$c = ".input-leHam {\n position: relative;\n width: 200px;\n height: 32px;\n border: 1px solid #d9d9d9;\n background: #ffffff;\n padding: 0 11px;\n border-radius: 6px;\n font-size: 14px;\n line-height: 30px;\n cursor: pointer;\n}\n\n.darkmode .input-leHam {\n background: #141414;\n border: 1px solid #424242;\n}\n\n.input-leHam.disabled-Llkqu {\n cursor: default;\n color: rgba(0, 0, 0, 0.25);\n}\n\n.darkmode .input-leHam.disabled-Llkqu {\n color: rgba(255, 255, 255, 0.25);\n}\n\n.input-leHam:hover {\n border-color: #4096ff;\n}\n";
|
35262
|
+
styleInject(css_248z$c);
|
34742
35263
|
|
35264
|
+
var _excluded = ["onSave", "value"];
|
34743
35265
|
function ownKeys$d(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; }
|
34744
35266
|
function _objectSpread$d(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$d(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$d(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
34745
|
-
function PriceFactorInput(
|
34746
|
-
|
34747
|
-
|
34748
|
-
|
34749
|
-
|
34750
|
-
|
34751
|
-
|
34752
|
-
|
34753
|
-
|
34754
|
-
|
34755
|
-
|
34756
|
-
|
34757
|
-
|
35267
|
+
function PriceFactorInput(_ref) {
|
35268
|
+
var _onSave = _ref.onSave,
|
35269
|
+
value = _ref.value,
|
35270
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
35271
|
+
var _useState = useState(value),
|
35272
|
+
_useState2 = _slicedToArray(_useState, 2),
|
35273
|
+
innerValue = _useState2[0],
|
35274
|
+
setInnerValue = _useState2[1];
|
35275
|
+
useEffect(function () {
|
35276
|
+
setInnerValue(value);
|
35277
|
+
}, [value]);
|
35278
|
+
return /*#__PURE__*/jsx(Tooltip$1, {
|
35279
|
+
title: props.tooltip,
|
35280
|
+
children: /*#__PURE__*/jsx("div", {
|
35281
|
+
className: classnames(input, 'price-factor-input', props.className, _defineProperty({}, disabled$1, props.disabled)),
|
35282
|
+
children: /*#__PURE__*/jsx(PriceFactorCellRenderer, _objectSpread$d(_objectSpread$d({}, props), {}, {
|
35283
|
+
isNotInAGGrid: true,
|
35284
|
+
value: innerValue,
|
35285
|
+
onSave: function onSave(data, value) {
|
35286
|
+
setInnerValue(value);
|
35287
|
+
return _onSave(data, value);
|
35288
|
+
}
|
35289
|
+
}))
|
35290
|
+
})
|
34758
35291
|
});
|
34759
35292
|
}
|
34760
35293
|
|
34761
35294
|
var inputHeader = "input-header--4KDP";
|
34762
35295
|
var factorInput = "factor-input-MX85Z";
|
34763
|
-
var css_248z$
|
35296
|
+
var css_248z$b = ".input-header--4KDP .ag-header-cell-text {\n width: 100%;\n}\n\n.input-header--4KDP .ag-header-group-cell-label {\n width: 100%;\n max-width: 250px;\n}\n\n.input-header--4KDP .ag-header-group-text {\n width: 100%;\n}\n\n.factor-input-MX85Z {\n min-height: 0;\n flex: 1;\n}\n\n.factor-input-MX85Z .price-factor-input {\n width: 100%;\n background-color: var(--ag-input-background-color);\n border: var(--ag-input-border);\n border-radius: var(--ag-input-border-radius);\n color: var(--ag-input-text-color);\n height: var(--ag-input-height);\n line-height: var(--ag-input-height);\n font-size: var(--ag-font-size);\n}\n\n.factor-input-MX85Z .price-factor-input:hover {\n border-color: #4096ff;\n}\n";
|
35297
|
+
styleInject(css_248z$b);
|
35298
|
+
|
35299
|
+
function PriceFactorHeaderComponent(_ref) {
|
35300
|
+
var onSave = _ref.onSave,
|
35301
|
+
onPriorityChange = _ref.onPriorityChange,
|
35302
|
+
priority = _ref.priority,
|
35303
|
+
priorityForced = _ref.priorityForced,
|
35304
|
+
value = _ref.value,
|
35305
|
+
inputTooltip = _ref.inputTooltip,
|
35306
|
+
checkboxTooltip = _ref.checkboxTooltip;
|
35307
|
+
var _useTranslation = useTranslation$1(),
|
35308
|
+
t = _useTranslation.t;
|
35309
|
+
var _useState = useState(priority || priorityForced),
|
35310
|
+
_useState2 = _slicedToArray(_useState, 2),
|
35311
|
+
innerChecked = _useState2[0],
|
35312
|
+
setInnerChecked = _useState2[1];
|
35313
|
+
useEffect(function () {
|
35314
|
+
setInnerChecked(priority || priorityForced);
|
35315
|
+
}, [priority, priorityForced]);
|
35316
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
35317
|
+
children: [/*#__PURE__*/jsx(PriceFactorInput, {
|
35318
|
+
onSave: onSave,
|
35319
|
+
value: value,
|
35320
|
+
className: factorInput,
|
35321
|
+
tooltip: t(inputTooltip)
|
35322
|
+
}), /*#__PURE__*/jsx(Tooltip$1, {
|
35323
|
+
title: t("".concat(checkboxTooltip, ".").concat(priorityForced ? 'forced' : priority ? 'true' : 'false')),
|
35324
|
+
children: /*#__PURE__*/jsx(Checkbox, {
|
35325
|
+
checked: innerChecked,
|
35326
|
+
disabled: priorityForced,
|
35327
|
+
onChange: function onChange(e) {
|
35328
|
+
setInnerChecked(e.target.checked);
|
35329
|
+
onPriorityChange(e.target.checked);
|
35330
|
+
}
|
35331
|
+
})
|
35332
|
+
})]
|
35333
|
+
});
|
35334
|
+
}
|
35335
|
+
|
35336
|
+
var root = "root-WJLKp";
|
35337
|
+
var contentWrapper$1 = "content-wrapper-Ki4Pt";
|
35338
|
+
var css_248z$a = ".root-WJLKp {\n display: flex;\n flex-direction: column;\n height: 50px;\n justify-content: flex-end;\n font-size: 12px;\n}\n\n.content-wrapper-Ki4Pt {\n height: 34px;\n display: flex;\n align-items: center;\n}\n";
|
34764
35339
|
styleInject(css_248z$a);
|
34765
35340
|
|
35341
|
+
function Setting(_ref) {
|
35342
|
+
var title = _ref.title,
|
35343
|
+
tooltip = _ref.tooltip,
|
35344
|
+
className = _ref.className,
|
35345
|
+
children = _ref.children;
|
35346
|
+
return /*#__PURE__*/jsxs("div", {
|
35347
|
+
className: classnames(root, className),
|
35348
|
+
children: [title, /*#__PURE__*/jsx(Tooltip$1, {
|
35349
|
+
title: tooltip,
|
35350
|
+
children: /*#__PURE__*/jsx("div", {
|
35351
|
+
className: contentWrapper$1,
|
35352
|
+
children: children
|
35353
|
+
})
|
35354
|
+
})]
|
35355
|
+
});
|
35356
|
+
}
|
35357
|
+
|
34766
35358
|
function ownKeys$c(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; }
|
34767
35359
|
function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$c(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$c(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
34768
35360
|
var Prices = observer(function (_ref) {
|
@@ -34771,11 +35363,89 @@ var Prices = observer(function (_ref) {
|
|
34771
35363
|
packageId = _ref.packageId,
|
34772
35364
|
apiConfig = _ref.apiConfig,
|
34773
35365
|
pricelist = _ref.pricelist,
|
34774
|
-
setNodeDataValue = _ref.setNodeDataValue
|
35366
|
+
setNodeDataValue = _ref.setNodeDataValue,
|
35367
|
+
viewOnly = _ref.viewOnly;
|
34775
35368
|
var _useTranslation = useTranslation(),
|
34776
35369
|
t = _useTranslation.t;
|
35370
|
+
var root = useStore();
|
35371
|
+
var spreadsheetRef = useRef(null);
|
34777
35372
|
var _useEnricherContext = useEnricherContext(['pricelists']),
|
34778
35373
|
selectedSerie = _useEnricherContext.selectedSerie;
|
35374
|
+
var _useState = useState(false),
|
35375
|
+
_useState2 = _slicedToArray(_useState, 2),
|
35376
|
+
onlyManual = _useState2[0],
|
35377
|
+
setOnlyManual = _useState2[1];
|
35378
|
+
var updatePfgPriceFactor = useCallback(function (priceFeatureGroupItem, value) {
|
35379
|
+
if (!selectedSerie) return;
|
35380
|
+
|
35381
|
+
// Create copies of the objects to modify
|
35382
|
+
var newFactors = _objectSpread$c({}, pricelist.pfgPricefactors);
|
35383
|
+
var serieFactors = _objectSpread$c({}, newFactors[selectedSerie.serieNo]);
|
35384
|
+
if (value.length === 0) {
|
35385
|
+
// Remove the empty price feature group
|
35386
|
+
delete serieFactors[priceFeatureGroupItem];
|
35387
|
+
|
35388
|
+
// If serie factors is now empty, remove the entire serie entry
|
35389
|
+
if (Object.keys(serieFactors).length === 0) {
|
35390
|
+
delete newFactors[selectedSerie.serieNo];
|
35391
|
+
} else {
|
35392
|
+
newFactors[selectedSerie.serieNo] = serieFactors;
|
35393
|
+
}
|
35394
|
+
|
35395
|
+
// If no more series exist, set pfgPricefactors to undefined
|
35396
|
+
if (Object.keys(newFactors).length === 0) {
|
35397
|
+
setNodeDataValue({
|
35398
|
+
pfgPricefactors: undefined
|
35399
|
+
});
|
35400
|
+
return;
|
35401
|
+
}
|
35402
|
+
} else {
|
35403
|
+
// Add/update the value
|
35404
|
+
serieFactors[priceFeatureGroupItem] = value;
|
35405
|
+
newFactors[selectedSerie.serieNo] = serieFactors;
|
35406
|
+
}
|
35407
|
+
setNodeDataValue({
|
35408
|
+
pfgPricefactors: newFactors
|
35409
|
+
});
|
35410
|
+
}, [selectedSerie]);
|
35411
|
+
var updatePfgPriority = useCallback(function (priceFeatureGroupItem, value) {
|
35412
|
+
var _newPriority$selected;
|
35413
|
+
if (!selectedSerie) return;
|
35414
|
+
var newPriority = _objectSpread$c({}, pricelist.pfgPricefactorsPriority);
|
35415
|
+
var seriesPriority = new Set((_newPriority$selected = newPriority[selectedSerie.serieNo]) !== null && _newPriority$selected !== void 0 ? _newPriority$selected : []);
|
35416
|
+
if (value === true) {
|
35417
|
+
seriesPriority.add(priceFeatureGroupItem);
|
35418
|
+
} else {
|
35419
|
+
seriesPriority["delete"](priceFeatureGroupItem);
|
35420
|
+
}
|
35421
|
+
if (seriesPriority.size === 0) {
|
35422
|
+
delete newPriority[selectedSerie.serieNo];
|
35423
|
+
} else {
|
35424
|
+
newPriority[selectedSerie.serieNo] = Array.from(seriesPriority);
|
35425
|
+
}
|
35426
|
+
setNodeDataValue({
|
35427
|
+
pfgPricefactorsPriority: newPriority
|
35428
|
+
});
|
35429
|
+
}, [selectedSerie]);
|
35430
|
+
var updatePgPriority = useCallback(function (priceFeatureGroupItem, value) {
|
35431
|
+
var _newPriority$selected2;
|
35432
|
+
if (!selectedSerie) return;
|
35433
|
+
var newPriority = _objectSpread$c({}, pricelist.pgPricefactorsPriority);
|
35434
|
+
var seriesPriority = new Set((_newPriority$selected2 = newPriority[selectedSerie.serieNo]) !== null && _newPriority$selected2 !== void 0 ? _newPriority$selected2 : []);
|
35435
|
+
if (value === true) {
|
35436
|
+
seriesPriority.add(priceFeatureGroupItem);
|
35437
|
+
} else {
|
35438
|
+
seriesPriority["delete"](priceFeatureGroupItem);
|
35439
|
+
}
|
35440
|
+
if (seriesPriority.size === 0) {
|
35441
|
+
delete newPriority[selectedSerie.serieNo];
|
35442
|
+
} else {
|
35443
|
+
newPriority[selectedSerie.serieNo] = Array.from(seriesPriority);
|
35444
|
+
}
|
35445
|
+
setNodeDataValue({
|
35446
|
+
pgPricefactorsPriority: newPriority
|
35447
|
+
});
|
35448
|
+
}, [selectedSerie]);
|
34779
35449
|
var updatePgPriceFactor = useCallback(function (priceFeatureGroupItem, value) {
|
34780
35450
|
if (!selectedSerie) return;
|
34781
35451
|
|
@@ -34899,6 +35569,34 @@ var Prices = observer(function (_ref) {
|
|
34899
35569
|
seriePricefactors: newFactors
|
34900
35570
|
});
|
34901
35571
|
}, [pricelist, selectedSerie, setNodeDataValue]);
|
35572
|
+
function deleteManualPrices() {
|
35573
|
+
return _deleteManualPrices.apply(this, arguments);
|
35574
|
+
}
|
35575
|
+
function _deleteManualPrices() {
|
35576
|
+
_deleteManualPrices = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8() {
|
35577
|
+
var _spreadsheetRef$curre;
|
35578
|
+
var api;
|
35579
|
+
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
35580
|
+
while (1) switch (_context8.prev = _context8.next) {
|
35581
|
+
case 0:
|
35582
|
+
api = new _default$d({
|
35583
|
+
type: 'AGGrid',
|
35584
|
+
apiInterface: {
|
35585
|
+
"delete": apiConfig.enricherService + "/packages/".concat(packageId, "/pricelists/").concat(pricelist._id, "/serie/").concat(selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie.serieNo, "/prices/manual")
|
35586
|
+
}
|
35587
|
+
}, root);
|
35588
|
+
_context8.next = 3;
|
35589
|
+
return api["delete"]();
|
35590
|
+
case 3:
|
35591
|
+
(_spreadsheetRef$curre = spreadsheetRef.current) === null || _spreadsheetRef$curre === void 0 || _spreadsheetRef$curre.refresh();
|
35592
|
+
case 4:
|
35593
|
+
case "end":
|
35594
|
+
return _context8.stop();
|
35595
|
+
}
|
35596
|
+
}, _callee8);
|
35597
|
+
}));
|
35598
|
+
return _deleteManualPrices.apply(this, arguments);
|
35599
|
+
}
|
34902
35600
|
var applicationData = useMemo(function () {
|
34903
35601
|
return {
|
34904
35602
|
organizationId: organizationId,
|
@@ -34909,10 +35607,10 @@ var Prices = observer(function (_ref) {
|
|
34909
35607
|
}, [organizationId, packageId, selectedSerie, pricelist]);
|
34910
35608
|
var apiInterface = useMemo(function () {
|
34911
35609
|
return {
|
34912
|
-
read: apiConfig.enricherService + '/packages/${packageId}/pricelists/${pricelistId}/serie/${serieNo}/prices',
|
34913
|
-
update: apiConfig.enricherService + '/packages/${packageId}/pricelists/${pricelistId}/serie/${serieNo}/prices/${_id}'
|
35610
|
+
read: apiConfig.enricherService + '/packages/${packageId}/pricelists/${pricelistId}/serie/${serieNo}/prices' + (onlyManual ? '?onlyManual=true' : ''),
|
35611
|
+
update: viewOnly ? undefined : apiConfig.enricherService + '/packages/${packageId}/pricelists/${pricelistId}/serie/${serieNo}/prices/${_id}'
|
34914
35612
|
};
|
34915
|
-
}, []);
|
35613
|
+
}, [onlyManual]);
|
34916
35614
|
var priceFeatureGroups = usePriceFeatureGroupsFromSerie(selectedSerie);
|
34917
35615
|
var configuration = useMemo(function () {
|
34918
35616
|
var _priceFeatureGroups$m;
|
@@ -35010,16 +35708,57 @@ var Prices = observer(function (_ref) {
|
|
35010
35708
|
sortable: false,
|
35011
35709
|
editable: false
|
35012
35710
|
}].concat(_toConsumableArray((_priceFeatureGroups$m = priceFeatureGroups === null || priceFeatureGroups === void 0 ? void 0 : priceFeatureGroups.map(function (priceFeatureGroup) {
|
35013
|
-
var _priceFeatureGroup$ke, _priceFeatureGroup$ke2;
|
35711
|
+
var _pricelist$pfgPricefa, _pricelist$pfgPricefa2, _priceFeatureGroup$ke, _priceFeatureGroup$ke2;
|
35014
35712
|
return {
|
35015
35713
|
headerName: priceFeatureGroup.displayText,
|
35714
|
+
headerClass: inputHeader,
|
35715
|
+
headerGroupComponentParams: {
|
35716
|
+
additionalElement: /*#__PURE__*/jsx(PriceFactorHeaderComponent, {
|
35717
|
+
onSave: (/*#__PURE__*/function () {
|
35718
|
+
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(data, value) {
|
35719
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
35720
|
+
while (1) switch (_context3.prev = _context3.next) {
|
35721
|
+
case 0:
|
35722
|
+
updatePfgPriceFactor(priceFeatureGroup.id, value);
|
35723
|
+
case 1:
|
35724
|
+
case "end":
|
35725
|
+
return _context3.stop();
|
35726
|
+
}
|
35727
|
+
}, _callee3);
|
35728
|
+
}));
|
35729
|
+
return function (_x5, _x6) {
|
35730
|
+
return _ref4.apply(this, arguments);
|
35731
|
+
};
|
35732
|
+
}()),
|
35733
|
+
value: (_pricelist$pfgPricefa = pricelist.pfgPricefactors) === null || _pricelist$pfgPricefa === void 0 || (_pricelist$pfgPricefa = _pricelist$pfgPricefa[selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie.serieNo]) === null || _pricelist$pfgPricefa === void 0 ? void 0 : _pricelist$pfgPricefa[priceFeatureGroup.id],
|
35734
|
+
onPriorityChange: (/*#__PURE__*/function () {
|
35735
|
+
var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(value) {
|
35736
|
+
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
35737
|
+
while (1) switch (_context4.prev = _context4.next) {
|
35738
|
+
case 0:
|
35739
|
+
updatePfgPriority(priceFeatureGroup.id, value);
|
35740
|
+
case 1:
|
35741
|
+
case "end":
|
35742
|
+
return _context4.stop();
|
35743
|
+
}
|
35744
|
+
}, _callee4);
|
35745
|
+
}));
|
35746
|
+
return function (_x7) {
|
35747
|
+
return _ref5.apply(this, arguments);
|
35748
|
+
};
|
35749
|
+
}()),
|
35750
|
+
priority: !!((_pricelist$pfgPricefa2 = pricelist.pfgPricefactorsPriority) !== null && _pricelist$pfgPricefa2 !== void 0 && (_pricelist$pfgPricefa2 = _pricelist$pfgPricefa2[selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie.serieNo]) !== null && _pricelist$pfgPricefa2 !== void 0 && _pricelist$pfgPricefa2.includes(priceFeatureGroup.id)),
|
35751
|
+
inputTooltip: 'backoffice.idmCatalog.prices.priceFactor.label.pfg',
|
35752
|
+
checkboxTooltip: 'backoffice.idmCatalog.prices.priceFactor.label.pfgPriority'
|
35753
|
+
})
|
35754
|
+
},
|
35016
35755
|
marryChildren: true,
|
35017
|
-
children: _toConsumableArray((_priceFeatureGroup$ke = (_priceFeatureGroup$ke2 = priceFeatureGroup.keys) === null || _priceFeatureGroup$ke2 === void 0 ? void 0 : _priceFeatureGroup$ke2.map(function (
|
35018
|
-
var _priceFeatureGroup$ke3, _pricelist$pgPricefac;
|
35756
|
+
children: _toConsumableArray((_priceFeatureGroup$ke = (_priceFeatureGroup$ke2 = priceFeatureGroup.keys) === null || _priceFeatureGroup$ke2 === void 0 ? void 0 : _priceFeatureGroup$ke2.map(function (priceGroup, j) {
|
35757
|
+
var _priceFeatureGroup$ke3, _pricelist$pgPricefac, _pricelist$pgPricefac2, _pricelist$pfgPricefa3;
|
35019
35758
|
return {
|
35020
|
-
headerName:
|
35021
|
-
field: "prices.".concat(
|
35022
|
-
editable:
|
35759
|
+
headerName: priceGroup,
|
35760
|
+
field: "prices.".concat(priceGroup),
|
35761
|
+
editable: !viewOnly,
|
35023
35762
|
filter: false,
|
35024
35763
|
sortable: false,
|
35025
35764
|
isDictionary: true,
|
@@ -35028,31 +35767,49 @@ var Prices = observer(function (_ref) {
|
|
35028
35767
|
cellRenderer: PriceDisplayCellRenderer,
|
35029
35768
|
cellRendererParams: {
|
35030
35769
|
commas: pricelist.commas,
|
35031
|
-
item:
|
35770
|
+
item: priceGroup
|
35032
35771
|
},
|
35033
|
-
additionalFields: ["origPrices.".concat(
|
35772
|
+
additionalFields: ["origPrices.".concat(priceGroup)],
|
35034
35773
|
headerClass: inputHeader,
|
35035
35774
|
headerComponentParams: {
|
35036
|
-
additionalElement: /*#__PURE__*/jsx(
|
35775
|
+
additionalElement: /*#__PURE__*/jsx(PriceFactorHeaderComponent, {
|
35037
35776
|
onSave: (/*#__PURE__*/function () {
|
35038
|
-
var
|
35039
|
-
return _regeneratorRuntime.wrap(function
|
35040
|
-
while (1) switch (
|
35777
|
+
var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(data, value) {
|
35778
|
+
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
35779
|
+
while (1) switch (_context5.prev = _context5.next) {
|
35780
|
+
case 0:
|
35781
|
+
updatePgPriceFactor(priceGroup, value);
|
35782
|
+
case 1:
|
35783
|
+
case "end":
|
35784
|
+
return _context5.stop();
|
35785
|
+
}
|
35786
|
+
}, _callee5);
|
35787
|
+
}));
|
35788
|
+
return function (_x8, _x9) {
|
35789
|
+
return _ref6.apply(this, arguments);
|
35790
|
+
};
|
35791
|
+
}()),
|
35792
|
+
value: (_pricelist$pgPricefac = pricelist.pgPricefactors) === null || _pricelist$pgPricefac === void 0 || (_pricelist$pgPricefac = _pricelist$pgPricefac[selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie.serieNo]) === null || _pricelist$pgPricefac === void 0 ? void 0 : _pricelist$pgPricefac[priceGroup],
|
35793
|
+
onPriorityChange: (/*#__PURE__*/function () {
|
35794
|
+
var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(value) {
|
35795
|
+
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
35796
|
+
while (1) switch (_context6.prev = _context6.next) {
|
35041
35797
|
case 0:
|
35042
|
-
|
35798
|
+
updatePgPriority(priceGroup, value);
|
35043
35799
|
case 1:
|
35044
35800
|
case "end":
|
35045
|
-
return
|
35801
|
+
return _context6.stop();
|
35046
35802
|
}
|
35047
|
-
},
|
35803
|
+
}, _callee6);
|
35048
35804
|
}));
|
35049
|
-
return function (
|
35050
|
-
return
|
35805
|
+
return function (_x10) {
|
35806
|
+
return _ref7.apply(this, arguments);
|
35051
35807
|
};
|
35052
35808
|
}()),
|
35053
|
-
|
35054
|
-
|
35055
|
-
|
35809
|
+
priority: !!((_pricelist$pgPricefac2 = pricelist.pgPricefactorsPriority) !== null && _pricelist$pgPricefac2 !== void 0 && (_pricelist$pgPricefac2 = _pricelist$pgPricefac2[selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie.serieNo]) !== null && _pricelist$pgPricefac2 !== void 0 && _pricelist$pgPricefac2.includes(priceGroup)),
|
35810
|
+
priorityForced: !!((_pricelist$pfgPricefa3 = pricelist.pfgPricefactorsPriority) !== null && _pricelist$pfgPricefa3 !== void 0 && (_pricelist$pfgPricefa3 = _pricelist$pfgPricefa3[selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie.serieNo]) !== null && _pricelist$pfgPricefa3 !== void 0 && _pricelist$pfgPricefa3.includes(priceFeatureGroup.id)),
|
35811
|
+
inputTooltip: 'backoffice.idmCatalog.prices.priceFactor.label.pg',
|
35812
|
+
checkboxTooltip: 'backoffice.idmCatalog.prices.priceFactor.label.pgPriority'
|
35056
35813
|
})
|
35057
35814
|
}
|
35058
35815
|
};
|
@@ -35103,7 +35860,7 @@ var Prices = observer(function (_ref) {
|
|
35103
35860
|
cellDataType: 'objectId'
|
35104
35861
|
}])
|
35105
35862
|
};
|
35106
|
-
}, [apiInterface, selectedSerie, pricelist, priceFeatureGroups]);
|
35863
|
+
}, [apiInterface, selectedSerie, pricelist, priceFeatureGroups, viewOnly]);
|
35107
35864
|
return /*#__PURE__*/jsxs(Fragment, {
|
35108
35865
|
children: [/*#__PURE__*/jsx(Descriptions$1, {
|
35109
35866
|
title: /*#__PURE__*/jsx("div", {
|
@@ -35111,26 +35868,55 @@ var Prices = observer(function (_ref) {
|
|
35111
35868
|
style: {
|
35112
35869
|
"float": 'right'
|
35113
35870
|
},
|
35114
|
-
children: [/*#__PURE__*/jsx(
|
35115
|
-
|
35871
|
+
children: [/*#__PURE__*/jsx(Setting, {
|
35872
|
+
title: t('backoffice.idmCatalog.prices.manual.title'),
|
35873
|
+
tooltip: t('backoffice.idmCatalog.prices.manual.tooltip'),
|
35874
|
+
children: /*#__PURE__*/jsx(Switch, {
|
35875
|
+
checked: onlyManual,
|
35876
|
+
onChange: function onChange(e) {
|
35877
|
+
return setOnlyManual(e);
|
35878
|
+
},
|
35879
|
+
disabled: !selectedSerie,
|
35880
|
+
checkedChildren: 'Manuelle',
|
35881
|
+
unCheckedChildren: 'Alle'
|
35882
|
+
})
|
35883
|
+
}), /*#__PURE__*/jsx(Setting, {
|
35884
|
+
tooltip: t('backoffice.idmCatalog.prices.manual.delete.tooltip'),
|
35885
|
+
children: /*#__PURE__*/jsx(Popconfirm, {
|
35886
|
+
rootClassName: "ag-custom-component-popup",
|
35887
|
+
title: t('backoffice.idmCatalog.prices.manual.delete.title'),
|
35888
|
+
description: t('backoffice.idmCatalog.prices.manual.delete.tooltip'),
|
35889
|
+
onConfirm: deleteManualPrices,
|
35890
|
+
okText: t('action.delete'),
|
35891
|
+
cancelText: t('backoffice.cancel'),
|
35892
|
+
children: /*#__PURE__*/jsx(Button, {
|
35893
|
+
danger: true,
|
35894
|
+
children: t('backoffice.idmCatalog.prices.manual.delete.title')
|
35895
|
+
})
|
35896
|
+
})
|
35897
|
+
}), /*#__PURE__*/jsx(Setting, {
|
35116
35898
|
title: t('backoffice.idmCatalog.prices.priceFactor.label.series'),
|
35117
|
-
|
35118
|
-
|
35119
|
-
|
35120
|
-
|
35121
|
-
|
35122
|
-
|
35123
|
-
|
35124
|
-
|
35125
|
-
|
35126
|
-
|
35127
|
-
|
35128
|
-
|
35129
|
-
|
35130
|
-
|
35131
|
-
|
35132
|
-
|
35133
|
-
|
35899
|
+
tooltip: t('backoffice.idmCatalog.prices.priceFactor.tooltip.series'),
|
35900
|
+
children: /*#__PURE__*/jsx(PriceFactorInput, {
|
35901
|
+
value: (_pricelist$seriePrice = pricelist.seriePricefactors) === null || _pricelist$seriePrice === void 0 ? void 0 : _pricelist$seriePrice[selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie.serieNo],
|
35902
|
+
onSave: (/*#__PURE__*/function () {
|
35903
|
+
var _ref8 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(_, value) {
|
35904
|
+
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
35905
|
+
while (1) switch (_context7.prev = _context7.next) {
|
35906
|
+
case 0:
|
35907
|
+
updateSeriePriceFactor(value);
|
35908
|
+
case 1:
|
35909
|
+
case "end":
|
35910
|
+
return _context7.stop();
|
35911
|
+
}
|
35912
|
+
}, _callee7);
|
35913
|
+
}));
|
35914
|
+
return function (_x11, _x12) {
|
35915
|
+
return _ref8.apply(this, arguments);
|
35916
|
+
};
|
35917
|
+
}()),
|
35918
|
+
disabled: !selectedSerie
|
35919
|
+
})
|
35134
35920
|
}), /*#__PURE__*/jsx(SeriesSelector$3, {
|
35135
35921
|
modules: ['pricelists'],
|
35136
35922
|
dataSet: "lookup"
|
@@ -35138,6 +35924,7 @@ var Prices = observer(function (_ref) {
|
|
35138
35924
|
})
|
35139
35925
|
})
|
35140
35926
|
}), selectedSerie && /*#__PURE__*/jsx(Spreadsheet, {
|
35927
|
+
ref: spreadsheetRef,
|
35141
35928
|
gridId: 'crud-grid_enricherprices',
|
35142
35929
|
applicationData: applicationData,
|
35143
35930
|
configuration: configuration
|
@@ -35155,7 +35942,8 @@ var TablePriceList = observer(function () {
|
|
35155
35942
|
packageId = _useModule.packageId,
|
35156
35943
|
organizationId = _useModule.organizationId,
|
35157
35944
|
apiConfig = _useModule.apiConfig,
|
35158
|
-
selectedPackage = _useModule.selectedPackage
|
35945
|
+
selectedPackage = _useModule.selectedPackage,
|
35946
|
+
viewOnly = _useModule.viewOnly;
|
35159
35947
|
var _React$useState = React.useState(),
|
35160
35948
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
35161
35949
|
selectedPriceList = _React$useState2[0],
|
@@ -35166,7 +35954,7 @@ var TablePriceList = observer(function () {
|
|
35166
35954
|
setSelectedNodeId = _React$useState4[1];
|
35167
35955
|
useTools({
|
35168
35956
|
packageId: packageId,
|
35169
|
-
isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.
|
35957
|
+
isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi
|
35170
35958
|
});
|
35171
35959
|
var setNodeDataValue = useCallback(function (data) {
|
35172
35960
|
spreadsheetRef.current.setNodeDataValue(selectedNodeId, data);
|
@@ -35183,7 +35971,8 @@ var TablePriceList = observer(function () {
|
|
35183
35971
|
packageId: packageId,
|
35184
35972
|
apiConfig: apiConfig,
|
35185
35973
|
pricelist: selectedPriceList,
|
35186
|
-
setNodeDataValue: setNodeDataValue
|
35974
|
+
setNodeDataValue: setNodeDataValue,
|
35975
|
+
viewOnly: viewOnly
|
35187
35976
|
},
|
35188
35977
|
startWidth: 300,
|
35189
35978
|
defaultPinned: false,
|
@@ -35207,10 +35996,10 @@ var TablePriceList = observer(function () {
|
|
35207
35996
|
var apiInterface = useMemo(function () {
|
35208
35997
|
return {
|
35209
35998
|
read: apiConfig.enricherService + '/packages/${packageId}/pricelists',
|
35210
|
-
create: apiConfig.enricherService + '/packages/${packageId}/pricelists',
|
35211
|
-
restore: apiConfig.enricherService + '/packages/${packageId}/pricelists/${_id}',
|
35212
|
-
"delete": apiConfig.enricherService + '/packages/${packageId}/pricelists/${_id}',
|
35213
|
-
update: apiConfig.enricherService + '/packages/${packageId}/pricelists/${_id}'
|
35999
|
+
create: viewOnly ? undefined : apiConfig.enricherService + '/packages/${packageId}/pricelists',
|
36000
|
+
restore: viewOnly ? undefined : apiConfig.enricherService + '/packages/${packageId}/pricelists/${_id}',
|
36001
|
+
"delete": viewOnly ? undefined : apiConfig.enricherService + '/packages/${packageId}/pricelists/${_id}',
|
36002
|
+
update: viewOnly ? undefined : apiConfig.enricherService + '/packages/${packageId}/pricelists/${_id}'
|
35214
36003
|
};
|
35215
36004
|
}, []);
|
35216
36005
|
var hooks = useMemo(function () {
|
@@ -35255,11 +36044,11 @@ var TablePriceList = observer(function () {
|
|
35255
36044
|
colDef: [{
|
35256
36045
|
headerName: 'backoffice.idmEnricher.pricelists.label.name',
|
35257
36046
|
field: 'name',
|
35258
|
-
editable:
|
36047
|
+
editable: !viewOnly
|
35259
36048
|
}, {
|
35260
36049
|
headerName: 'backoffice.idmEnricher.pricelists.label.basedPricelistId',
|
35261
36050
|
field: 'basedPricelistId',
|
35262
|
-
editable:
|
36051
|
+
editable: !viewOnly,
|
35263
36052
|
cellDataType: 'lookup',
|
35264
36053
|
customParams: {
|
35265
36054
|
filterCellType: 'id',
|
@@ -35289,7 +36078,7 @@ var TablePriceList = observer(function () {
|
|
35289
36078
|
}, {
|
35290
36079
|
headerName: 'backoffice.idmEnricher.pricelists.label.rounding',
|
35291
36080
|
field: 'rounding',
|
35292
|
-
editable:
|
36081
|
+
editable: !viewOnly,
|
35293
36082
|
cellDataType: 'enum',
|
35294
36083
|
customParams: {
|
35295
36084
|
enumData: roundingOptions,
|
@@ -35298,25 +36087,25 @@ var TablePriceList = observer(function () {
|
|
35298
36087
|
}, {
|
35299
36088
|
headerName: 'backoffice.idmEnricher.pricelists.label.commas',
|
35300
36089
|
field: 'commas',
|
35301
|
-
editable:
|
36090
|
+
editable: !viewOnly,
|
35302
36091
|
cellDataType: 'number'
|
35303
36092
|
}, {
|
35304
36093
|
headerName: 'backoffice.idmEnricher.pricelists.label.currency',
|
35305
36094
|
field: 'currency',
|
35306
36095
|
cellDataType: 'enum',
|
35307
|
-
editable:
|
36096
|
+
editable: !viewOnly,
|
35308
36097
|
customParams: {
|
35309
36098
|
enumData: getCurrencyKey(t)
|
35310
36099
|
}
|
35311
36100
|
}, {
|
35312
36101
|
headerName: 'backoffice.idmEnricher.pricelists.label.forPublishing',
|
35313
36102
|
field: 'forPublishing',
|
35314
|
-
editable:
|
36103
|
+
editable: !viewOnly,
|
35315
36104
|
cellDataType: 'boolean'
|
35316
36105
|
}, {
|
35317
36106
|
headerName: 'backoffice.idmEnricher.pricelists.label.validFrom',
|
35318
36107
|
field: 'validFrom',
|
35319
|
-
editable:
|
36108
|
+
editable: !viewOnly,
|
35320
36109
|
cellDataType: 'dateString',
|
35321
36110
|
customParams: {
|
35322
36111
|
dateFormat: 'DD.MM.YYYY'
|
@@ -35324,7 +36113,7 @@ var TablePriceList = observer(function () {
|
|
35324
36113
|
}, {
|
35325
36114
|
headerName: 'backoffice.idmEnricher.pricelists.label.validTo',
|
35326
36115
|
field: 'validTo',
|
35327
|
-
editable:
|
36116
|
+
editable: !viewOnly,
|
35328
36117
|
cellDataType: 'dateString',
|
35329
36118
|
customParams: {
|
35330
36119
|
dateFormat: 'DD.MM.YYYY'
|
@@ -35382,9 +36171,24 @@ var TablePriceList = observer(function () {
|
|
35382
36171
|
cellDataType: 'object',
|
35383
36172
|
editable: false,
|
35384
36173
|
hide: true
|
36174
|
+
}, {
|
36175
|
+
field: 'pfgPricefactors',
|
36176
|
+
cellDataType: 'object',
|
36177
|
+
editable: false,
|
36178
|
+
hide: true
|
36179
|
+
}, {
|
36180
|
+
field: 'pgPricefactorsPriority',
|
36181
|
+
cellDataType: 'object',
|
36182
|
+
editable: false,
|
36183
|
+
hide: true
|
36184
|
+
}, {
|
36185
|
+
field: 'pfgPricefactorsPriority',
|
36186
|
+
cellDataType: 'object',
|
36187
|
+
editable: false,
|
36188
|
+
hide: true
|
35385
36189
|
}]
|
35386
36190
|
};
|
35387
|
-
}, [apiInterface, i18n.language]);
|
36191
|
+
}, [apiInterface, i18n.language, viewOnly]);
|
35388
36192
|
return /*#__PURE__*/jsxs(Fragment, {
|
35389
36193
|
children: [/*#__PURE__*/jsx(Descriptions$1, {
|
35390
36194
|
title: /*#__PURE__*/jsxs("div", {
|
@@ -35873,24 +36677,34 @@ var useCatalogContext = function useCatalogContext() {
|
|
35873
36677
|
root.contextStore.clearContext('catalog');
|
35874
36678
|
}
|
35875
36679
|
|
35876
|
-
//
|
35877
|
-
// initally ony the id is set so we need to update it again if we get the full catalog form the selector, so only checking for id is not enough
|
36680
|
+
// initally only the id is set so we need to update it again if we get the full catalog form the selector
|
35878
36681
|
var currentCatalog = getContext().selectedCatalog;
|
35879
|
-
|
35880
|
-
|
36682
|
+
var catalogChanged = currentCatalog._id !== newCatalog._id;
|
36683
|
+
var catalogDataOnlyChanged = currentCatalog.name === newCatalog.name && JSON.stringify(currentCatalog.isoLanguageIds) === JSON.stringify(newCatalog.isoLanguageIds);
|
36684
|
+
if (!catalogChanged && !catalogDataOnlyChanged) {
|
36685
|
+
// No changes detected
|
36686
|
+
return;
|
35881
36687
|
}
|
36688
|
+
if (!catalogChanged && catalogDataOnlyChanged) {
|
36689
|
+
// Only the data changed, so we only need to update the context of the catalog
|
36690
|
+
root.contextStore.updateContext('catalog', {
|
36691
|
+
selectedCatalog: newCatalog,
|
36692
|
+
catalogId: newCatalog._id
|
36693
|
+
});
|
36694
|
+
return;
|
36695
|
+
}
|
36696
|
+
if (catalogChanged) {
|
36697
|
+
// The catalog changed, so we need to rest the full context
|
36698
|
+
root.contextStore.updateContext('catalog', {
|
36699
|
+
selectedCatalog: newCatalog,
|
36700
|
+
catalogId: newCatalog._id,
|
36701
|
+
selectedSerie: undefined,
|
36702
|
+
selectedItem: undefined,
|
36703
|
+
selectedFeature: undefined,
|
36704
|
+
seriesSelectorState: createDefaultSelectState('seriesSelectorState'),
|
36705
|
+
featureSelectorState: createDefaultSelectState('featureSelectorState')
|
36706
|
+
});
|
35882
36707
|
|
35883
|
-
// Update any field catalog changed
|
35884
|
-
root.contextStore.updateContext('catalog', {
|
35885
|
-
selectedCatalog: newCatalog,
|
35886
|
-
catalogId: newCatalog._id,
|
35887
|
-
selectedSerie: undefined,
|
35888
|
-
selectedItem: undefined,
|
35889
|
-
selectedFeature: undefined,
|
35890
|
-
seriesSelectorState: createDefaultSelectState('seriesSelectorState'),
|
35891
|
-
featureSelectorState: createDefaultSelectState('featureSelectorState')
|
35892
|
-
});
|
35893
|
-
if (currentCatalog._id !== newCatalog._id) {
|
35894
36708
|
// Update URL only if the id changed
|
35895
36709
|
navigate(path + newCatalog._id + (modules.length ? '/' + modules.join('/') : '') + (searchParams ? '?' + searchParams.toString() : ''));
|
35896
36710
|
}
|
@@ -36719,27 +37533,22 @@ var CatalogSelector$1 = observer(CatalogSelector);
|
|
36719
37533
|
var SeriesSelector = function SeriesSelector(_ref) {
|
36720
37534
|
var modules = _ref.modules;
|
36721
37535
|
var _useTranslation = useTranslation(),
|
36722
|
-
t = _useTranslation.t
|
36723
|
-
|
36724
|
-
|
36725
|
-
|
36726
|
-
|
36727
|
-
selectedSerie =
|
36728
|
-
|
36729
|
-
|
37536
|
+
t = _useTranslation.t;
|
37537
|
+
var _useSeriesSelector = useSeriesSelector(modules),
|
37538
|
+
catalogId = _useSeriesSelector.catalogId,
|
37539
|
+
seriesSelectorState = _useSeriesSelector.seriesSelectorState,
|
37540
|
+
apiInterface = _useSeriesSelector.apiInterface,
|
37541
|
+
selectedSerie = _useSeriesSelector.selectedSerie,
|
37542
|
+
onChange = _useSeriesSelector.onChange,
|
37543
|
+
selectMapping = _useSeriesSelector.selectMapping;
|
36730
37544
|
return /*#__PURE__*/jsx(SimpleSelect, {
|
36731
37545
|
sharedState: seriesSelectorState,
|
36732
|
-
apiInterface:
|
36733
|
-
|
36734
|
-
},
|
36735
|
-
selectMapping: {
|
36736
|
-
label: "${seriesName.".concat(i18n.language.toLocaleUpperCase(), "}"),
|
36737
|
-
value: '${_id}'
|
36738
|
-
},
|
37546
|
+
apiInterface: apiInterface,
|
37547
|
+
selectMapping: selectMapping,
|
36739
37548
|
autoSelectFirst: true,
|
36740
37549
|
title: t('backoffice.menu.items.label.IDMCatalogEditorTableSeries'),
|
36741
37550
|
value: selectedSerie,
|
36742
|
-
onChange:
|
37551
|
+
onChange: onChange,
|
36743
37552
|
search: true,
|
36744
37553
|
style: {
|
36745
37554
|
width: 200
|
@@ -36748,6 +37557,95 @@ var SeriesSelector = function SeriesSelector(_ref) {
|
|
36748
37557
|
}, catalogId);
|
36749
37558
|
};
|
36750
37559
|
var SeriesSelector$1 = observer(SeriesSelector);
|
37560
|
+
var useSeriesSelector = function useSeriesSelector(modules) {
|
37561
|
+
var _useTranslation2 = useTranslation(),
|
37562
|
+
i18n = _useTranslation2.i18n;
|
37563
|
+
var root = useStore();
|
37564
|
+
var _useCatalogContext = useCatalogContext(modules),
|
37565
|
+
catalogId = _useCatalogContext.catalogId,
|
37566
|
+
idmService = _useCatalogContext.idmService,
|
37567
|
+
selectedSerie = _useCatalogContext.selectedSerie,
|
37568
|
+
setSelectedSerie = _useCatalogContext.setSelectedSerie,
|
37569
|
+
seriesSelectorState = _useCatalogContext.seriesSelectorState;
|
37570
|
+
var _useState = useState(selectedSerie),
|
37571
|
+
_useState2 = _slicedToArray(_useState, 2),
|
37572
|
+
selected = _useState2[0],
|
37573
|
+
setSelected = _useState2[1];
|
37574
|
+
var apiInterface = {
|
37575
|
+
read: idmService + "/v3.0/catalogs/".concat(catalogId, "/series?fields=seriesName[").concat(i18n.language.toLocaleUpperCase(), "];_id")
|
37576
|
+
};
|
37577
|
+
var selectMapping = {
|
37578
|
+
label: "${seriesName.".concat(i18n.language.toLocaleUpperCase(), "}"),
|
37579
|
+
value: '${_id}'
|
37580
|
+
};
|
37581
|
+
var fetchSerie = /*#__PURE__*/function () {
|
37582
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(newSerie) {
|
37583
|
+
var _seriesSelectorState$, _seriesSelectorState$2;
|
37584
|
+
var isLoaded, api, serie, option;
|
37585
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
37586
|
+
while (1) switch (_context.prev = _context.next) {
|
37587
|
+
case 0:
|
37588
|
+
if (newSerie) {
|
37589
|
+
_context.next = 2;
|
37590
|
+
break;
|
37591
|
+
}
|
37592
|
+
return _context.abrupt("return");
|
37593
|
+
case 2:
|
37594
|
+
// if the extend series data is already loaded, use it
|
37595
|
+
isLoaded = !!((_seriesSelectorState$ = seriesSelectorState.options) !== null && _seriesSelectorState$ !== void 0 && (_seriesSelectorState$ = _seriesSelectorState$.find(function (option) {
|
37596
|
+
return option.value === (newSerie === null || newSerie === void 0 ? void 0 : newSerie._id);
|
37597
|
+
})) !== null && _seriesSelectorState$ !== void 0 && (_seriesSelectorState$ = _seriesSelectorState$.data) !== null && _seriesSelectorState$ !== void 0 && _seriesSelectorState$.serieNo);
|
37598
|
+
if (!isLoaded) {
|
37599
|
+
_context.next = 6;
|
37600
|
+
break;
|
37601
|
+
}
|
37602
|
+
setSelectedSerie(newSerie);
|
37603
|
+
return _context.abrupt("return");
|
37604
|
+
case 6:
|
37605
|
+
//fetching of pricefeatruegroups is slow, so we can't fetch it in the list, but only for the selected serie
|
37606
|
+
seriesSelectorState.setLoading(true);
|
37607
|
+
api = new _default$d({
|
37608
|
+
type: 'SelectSimple',
|
37609
|
+
apiInterface: {
|
37610
|
+
read: idmService + "/v3.0/catalogs/".concat(catalogId, "/series/").concat(newSerie._id, "?fields=seriesName[").concat(i18n.language.toLocaleUpperCase(), "];_id;serieNo;pricefeaturegroups;pricefeaturegroupsDisplayTexts;pricefeaturegroupsKeys;pricefeaturegroupsKeysDisplayTexts")
|
37611
|
+
}
|
37612
|
+
}, root);
|
37613
|
+
_context.next = 10;
|
37614
|
+
return api.read();
|
37615
|
+
case 10:
|
37616
|
+
serie = _context.sent;
|
37617
|
+
//save the extended series data in the options, without triggering state change
|
37618
|
+
option = (_seriesSelectorState$2 = seriesSelectorState.options) === null || _seriesSelectorState$2 === void 0 ? void 0 : _seriesSelectorState$2.find(function (option) {
|
37619
|
+
return option.value === newSerie._id;
|
37620
|
+
});
|
37621
|
+
if (option) {
|
37622
|
+
option.data = serie;
|
37623
|
+
}
|
37624
|
+
setSelectedSerie(serie);
|
37625
|
+
seriesSelectorState.setLoading(false);
|
37626
|
+
case 15:
|
37627
|
+
case "end":
|
37628
|
+
return _context.stop();
|
37629
|
+
}
|
37630
|
+
}, _callee);
|
37631
|
+
}));
|
37632
|
+
return function fetchSerie(_x) {
|
37633
|
+
return _ref2.apply(this, arguments);
|
37634
|
+
};
|
37635
|
+
}();
|
37636
|
+
var onChange = function onChange(value) {
|
37637
|
+
setSelected(value);
|
37638
|
+
fetchSerie(value);
|
37639
|
+
};
|
37640
|
+
return {
|
37641
|
+
catalogId: catalogId,
|
37642
|
+
seriesSelectorState: seriesSelectorState,
|
37643
|
+
apiInterface: apiInterface,
|
37644
|
+
selectMapping: selectMapping,
|
37645
|
+
selectedSerie: selected,
|
37646
|
+
onChange: onChange
|
37647
|
+
};
|
37648
|
+
};
|
36751
37649
|
|
36752
37650
|
function useModule (currentModules) {
|
36753
37651
|
var root = useStore();
|
@@ -37197,18 +38095,19 @@ var TableItems = observer(function () {
|
|
37197
38095
|
apiConfig = _useModule.apiConfig,
|
37198
38096
|
organizationId = _useModule.organizationId;
|
37199
38097
|
useTools({
|
37200
|
-
|
37201
|
-
|
37202
|
-
|
37203
|
-
|
37204
|
-
|
37205
|
-
|
38098
|
+
catalogId: catalogId,
|
38099
|
+
serie: selectedSerie,
|
38100
|
+
setSerie: setSelectedSerie,
|
38101
|
+
setArticle: setSelectedItem,
|
38102
|
+
item: selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.typeNo
|
38103
|
+
});
|
37206
38104
|
var hooks = useMemo(function () {
|
37207
38105
|
return {
|
37208
38106
|
onCellSelectionChanged: function onCellSelectionChanged(event) {
|
37209
38107
|
// Check if all selections are from the same node
|
37210
38108
|
if (event.selection.length == 1) {
|
37211
|
-
|
38109
|
+
var _event$selection$;
|
38110
|
+
setSelectedItem((_event$selection$ = event.selection[0]) === null || _event$selection$ === void 0 || (_event$selection$ = _event$selection$.node) === null || _event$selection$ === void 0 ? void 0 : _event$selection$.data);
|
37212
38111
|
}
|
37213
38112
|
}
|
37214
38113
|
};
|
@@ -37241,9 +38140,9 @@ var TableSeries = observer(function () {
|
|
37241
38140
|
var _useTranslation = useTranslation(),
|
37242
38141
|
t = _useTranslation.t;
|
37243
38142
|
var _useModule = useModule(['series']),
|
37244
|
-
setGlobalSelectedSerie = _useModule.setSelectedSerie,
|
37245
38143
|
selectedCatalog = _useModule.selectedCatalog,
|
37246
38144
|
selectedGlobalSerie = _useModule.selectedSerie,
|
38145
|
+
setGlobalSelectedSerie = _useModule.setSelectedSerie,
|
37247
38146
|
catalogId = _useModule.catalogId,
|
37248
38147
|
organizationId = _useModule.organizationId,
|
37249
38148
|
apiConfig = _useModule.apiConfig;
|
@@ -37287,8 +38186,9 @@ var TableSeries = observer(function () {
|
|
37287
38186
|
return {
|
37288
38187
|
onCellSelectionChanged: function onCellSelectionChanged(event) {
|
37289
38188
|
if (event.selection.length == 1) {
|
37290
|
-
|
37291
|
-
|
38189
|
+
var _event$selection$, _event$selection$2;
|
38190
|
+
setGlobalSelectedSerie((_event$selection$ = event.selection[0]) === null || _event$selection$ === void 0 || (_event$selection$ = _event$selection$.node) === null || _event$selection$ === void 0 ? void 0 : _event$selection$.data);
|
38191
|
+
setSelectedSerie((_event$selection$2 = event.selection[0]) === null || _event$selection$2 === void 0 || (_event$selection$2 = _event$selection$2.node) === null || _event$selection$2 === void 0 ? void 0 : _event$selection$2.data);
|
37292
38192
|
} else {
|
37293
38193
|
setSelectedSerie(null);
|
37294
38194
|
}
|
@@ -37624,8 +38524,9 @@ var TableFeatures = observer(function () {
|
|
37624
38524
|
onCellSelectionChanged: function onCellSelectionChanged(event) {
|
37625
38525
|
// Check if all selections are from the same node
|
37626
38526
|
if (event.selection.length == 1) {
|
38527
|
+
var _event$selection$;
|
37627
38528
|
updateConfigurator({
|
37628
|
-
opt: event.selection[0]
|
38529
|
+
opt: (_event$selection$ = event.selection[0]) === null || _event$selection$ === void 0 || (_event$selection$ = _event$selection$.node) === null || _event$selection$ === void 0 || (_event$selection$ = _event$selection$.data) === null || _event$selection$ === void 0 ? void 0 : _event$selection$.featureNo
|
37629
38530
|
});
|
37630
38531
|
}
|
37631
38532
|
}
|
@@ -37832,8 +38733,9 @@ var TableOptions = observer(function () {
|
|
37832
38733
|
onCellSelectionChanged: function onCellSelectionChanged(event) {
|
37833
38734
|
// Check if all selections are from the same node
|
37834
38735
|
if (event.selection.length == 1) {
|
38736
|
+
var _event$selection$;
|
37835
38737
|
updateConfigurator({
|
37836
|
-
opv: event.selection[0]
|
38738
|
+
opv: (_event$selection$ = event.selection[0]) === null || _event$selection$ === void 0 || (_event$selection$ = _event$selection$.node) === null || _event$selection$ === void 0 || (_event$selection$ = _event$selection$.data) === null || _event$selection$ === void 0 ? void 0 : _event$selection$.optionKey
|
37837
38739
|
});
|
37838
38740
|
}
|
37839
38741
|
}
|
@@ -41465,7 +42367,7 @@ function ownKeys$5(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymb
|
|
41465
42367
|
function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$5(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$5(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
41466
42368
|
var ArticleSelection = function ArticleSelection(_ref) {
|
41467
42369
|
var _ref$state = _ref.state,
|
41468
|
-
|
42370
|
+
itemList = _ref$state.itemList,
|
41469
42371
|
articleCodex = _ref$state.articleCodex,
|
41470
42372
|
setArticleCodex = _ref$state.setArticleCodex,
|
41471
42373
|
setDoReset = _ref$state.setDoReset,
|
@@ -41477,7 +42379,7 @@ var ArticleSelection = function ArticleSelection(_ref) {
|
|
41477
42379
|
var groups = [];
|
41478
42380
|
var _loop = function _loop() {
|
41479
42381
|
var _mask$articles;
|
41480
|
-
var article =
|
42382
|
+
var article = itemList[i];
|
41481
42383
|
if (mask !== null && mask !== void 0 && (_mask$articles = mask.articles) !== null && _mask$articles !== void 0 && _mask$articles[article.value].hidden) return 1; // continue
|
41482
42384
|
if (!article.groupName) article.groupName = 'NONE';
|
41483
42385
|
var group = groups.find(function (g) {
|
@@ -41493,7 +42395,7 @@ var ArticleSelection = function ArticleSelection(_ref) {
|
|
41493
42395
|
});
|
41494
42396
|
}
|
41495
42397
|
};
|
41496
|
-
for (var i = 0; i <
|
42398
|
+
for (var i = 0; i < itemList.length; i++) {
|
41497
42399
|
if (_loop()) continue;
|
41498
42400
|
}
|
41499
42401
|
return groups.map(function (g) {
|
@@ -41501,7 +42403,7 @@ var ArticleSelection = function ArticleSelection(_ref) {
|
|
41501
42403
|
label: t('configuration.group.' + g.label, g.label)
|
41502
42404
|
});
|
41503
42405
|
});
|
41504
|
-
}, [
|
42406
|
+
}, [itemList]);
|
41505
42407
|
return /*#__PURE__*/jsxs("div", {
|
41506
42408
|
className: wrapper$1,
|
41507
42409
|
children: [/*#__PURE__*/jsx(Select$1, {
|
@@ -41548,26 +42450,30 @@ function useWysiwyg$1(_ref) {
|
|
41548
42450
|
setArticleCodex = _useState6[1];
|
41549
42451
|
var _useState7 = useState([]),
|
41550
42452
|
_useState8 = _slicedToArray(_useState7, 2),
|
41551
|
-
|
41552
|
-
|
42453
|
+
itemList = _useState8[0],
|
42454
|
+
setItemList = _useState8[1];
|
41553
42455
|
var _useState9 = useState({
|
41554
42456
|
catalogCodex: (_tool$parameters = tool.parameters) === null || _tool$parameters === void 0 ? void 0 : _tool$parameters.catalogCodex
|
41555
42457
|
}),
|
41556
42458
|
_useState10 = _slicedToArray(_useState9, 2),
|
41557
|
-
|
41558
|
-
|
42459
|
+
serie = _useState10[0],
|
42460
|
+
setSerie = _useState10[1];
|
41559
42461
|
var _useState11 = useState([]),
|
41560
42462
|
_useState12 = _slicedToArray(_useState11, 2),
|
41561
|
-
|
41562
|
-
|
41563
|
-
var _useState13 = useState(),
|
42463
|
+
serieList = _useState12[0],
|
42464
|
+
setSerieList = _useState12[1];
|
42465
|
+
var _useState13 = useState(tool.parameters.catalogId),
|
41564
42466
|
_useState14 = _slicedToArray(_useState13, 2),
|
41565
|
-
|
41566
|
-
|
42467
|
+
catalogId = _useState14[0],
|
42468
|
+
setCatalogId = _useState14[1];
|
41567
42469
|
var _useState15 = useState(),
|
41568
42470
|
_useState16 = _slicedToArray(_useState15, 2),
|
41569
|
-
|
41570
|
-
|
42471
|
+
currentNav = _useState16[0],
|
42472
|
+
setCurrentNav = _useState16[1];
|
42473
|
+
var _useState17 = useState(),
|
42474
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
42475
|
+
doNavigate = _useState18[0],
|
42476
|
+
setDoNavigate = _useState18[1];
|
41571
42477
|
useEffect(function () {
|
41572
42478
|
if (!toolbar.hidden) setDoReset(true);
|
41573
42479
|
}, [toolbar.hidden]);
|
@@ -41630,7 +42536,8 @@ function useWysiwyg$1(_ref) {
|
|
41630
42536
|
});
|
41631
42537
|
case 3:
|
41632
42538
|
d = _context2.sent;
|
41633
|
-
|
42539
|
+
setCatalogId(d._id);
|
42540
|
+
_context2.next = 7;
|
41634
42541
|
return fetch(root.configurationStore.apiConfig.enricherService + '/wysiwyg/v3.0/' + id + '/catalogs/' + d._id + '/series', {
|
41635
42542
|
method: 'GET',
|
41636
42543
|
headers: _objectSpread$4({}, jwt ? {
|
@@ -41645,10 +42552,10 @@ function useWysiwyg$1(_ref) {
|
|
41645
42552
|
return undefined;
|
41646
42553
|
}
|
41647
42554
|
});
|
41648
|
-
case
|
42555
|
+
case 7:
|
41649
42556
|
s = _context2.sent;
|
41650
|
-
|
41651
|
-
case
|
42557
|
+
setSerieList(s.data);
|
42558
|
+
case 9:
|
41652
42559
|
case "end":
|
41653
42560
|
return _context2.stop();
|
41654
42561
|
}
|
@@ -41682,7 +42589,7 @@ function useWysiwyg$1(_ref) {
|
|
41682
42589
|
});
|
41683
42590
|
case 3:
|
41684
42591
|
l = _context3.sent;
|
41685
|
-
|
42592
|
+
setSerieList(l.data);
|
41686
42593
|
case 5:
|
41687
42594
|
case "end":
|
41688
42595
|
return _context3.stop();
|
@@ -41697,7 +42604,7 @@ function useWysiwyg$1(_ref) {
|
|
41697
42604
|
if (doReset) {
|
41698
42605
|
var _tool$elementProps, _tool$elementProps3;
|
41699
42606
|
if (currentNav) setDoNavigate(currentNav);
|
41700
|
-
if ((_tool$elementProps = tool.elementProps) !== null && _tool$elementProps !== void 0 && _tool$elementProps.showCatalogSelection && !
|
42607
|
+
if ((_tool$elementProps = tool.elementProps) !== null && _tool$elementProps !== void 0 && _tool$elementProps.showCatalogSelection && !serieList.length) {
|
41701
42608
|
var _tool$elementProps2;
|
41702
42609
|
if ((_tool$elementProps2 = tool.elementProps) !== null && _tool$elementProps2 !== void 0 && _tool$elementProps2.loadPackage) {
|
41703
42610
|
loadPackage(tool.parameters.packageId);
|
@@ -41716,20 +42623,20 @@ function useWysiwyg$1(_ref) {
|
|
41716
42623
|
}, [doReset]);
|
41717
42624
|
useEffect(function () {
|
41718
42625
|
setArticleCodex(undefined);
|
41719
|
-
if (
|
42626
|
+
if (serie !== null && serie !== void 0 && serie.catalogCodex) {
|
41720
42627
|
var _tool$parameters$pack;
|
41721
42628
|
setMask({
|
41722
|
-
catalogCodex:
|
42629
|
+
catalogCodex: serie.catalogCodex,
|
41723
42630
|
accountId: (_tool$parameters$pack = tool.parameters.packageId) !== null && _tool$parameters$pack !== void 0 ? _tool$parameters$pack : tool.parameters.catalogId
|
41724
42631
|
});
|
41725
42632
|
}
|
41726
|
-
}, [
|
42633
|
+
}, [serie]);
|
41727
42634
|
useEffect(function () {
|
41728
42635
|
setDoReset(true);
|
41729
42636
|
setArticleCodex(undefined);
|
41730
|
-
|
41731
|
-
|
41732
|
-
|
42637
|
+
setSerie(undefined);
|
42638
|
+
setItemList([]);
|
42639
|
+
setSerieList([]);
|
41733
42640
|
}, [tool.parameters.catalogId, tool.parameters.packageId]);
|
41734
42641
|
var onEventCalled = /*#__PURE__*/function () {
|
41735
42642
|
var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(e) {
|
@@ -41748,7 +42655,7 @@ function useWysiwyg$1(_ref) {
|
|
41748
42655
|
groupName: article.groupName
|
41749
42656
|
});
|
41750
42657
|
}
|
41751
|
-
|
42658
|
+
setItemList(articles);
|
41752
42659
|
if (articleCodex === undefined && articles !== null && articles !== void 0 && (_articles$ = articles[0]) !== null && _articles$ !== void 0 && _articles$.value) setArticleCodex(articles[0].value);
|
41753
42660
|
}
|
41754
42661
|
if (e.type === 'navigatedToOption') {
|
@@ -41855,20 +42762,21 @@ function useWysiwyg$1(_ref) {
|
|
41855
42762
|
};
|
41856
42763
|
}, []);
|
41857
42764
|
return {
|
41858
|
-
|
41859
|
-
|
42765
|
+
itemList: itemList,
|
42766
|
+
setItemList: setItemList,
|
41860
42767
|
articleCodex: articleCodex,
|
41861
42768
|
setArticleCodex: setArticleCodex,
|
41862
|
-
|
41863
|
-
|
41864
|
-
|
41865
|
-
|
42769
|
+
serieList: serieList,
|
42770
|
+
setSerieList: setSerieList,
|
42771
|
+
serie: serie,
|
42772
|
+
setSerie: setSerie,
|
41866
42773
|
settings: settings,
|
41867
42774
|
mask: mask,
|
41868
42775
|
doReset: doReset,
|
41869
42776
|
setDoReset: setDoReset,
|
41870
42777
|
doNavigate: doNavigate,
|
41871
|
-
setDoNavigate: setDoNavigate
|
42778
|
+
setDoNavigate: setDoNavigate,
|
42779
|
+
catalogId: catalogId
|
41872
42780
|
};
|
41873
42781
|
}
|
41874
42782
|
|
@@ -41920,27 +42828,27 @@ styleInject(css_248z$2);
|
|
41920
42828
|
|
41921
42829
|
var CatalogSelection = function CatalogSelection(_ref) {
|
41922
42830
|
var _ref$state = _ref.state,
|
41923
|
-
|
41924
|
-
|
41925
|
-
|
42831
|
+
serieList = _ref$state.serieList,
|
42832
|
+
serie = _ref$state.serie,
|
42833
|
+
setSerie = _ref$state.setSerie,
|
41926
42834
|
setArticleCodex = _ref$state.setArticleCodex,
|
41927
|
-
|
42835
|
+
setSerieProp = _ref.setSerie;
|
41928
42836
|
var _useTranslation = useTranslation(),
|
41929
42837
|
t = _useTranslation.t,
|
41930
42838
|
language = _useTranslation.i18n.language;
|
41931
42839
|
var options = useMemo(function () {
|
41932
42840
|
var groups = [];
|
41933
|
-
for (var i = 0; i <
|
41934
|
-
var c =
|
42841
|
+
for (var i = 0; i < serieList.length; i++) {
|
42842
|
+
var c = serieList[i];
|
41935
42843
|
groups.push({
|
41936
42844
|
value: c.serieNo.toString(),
|
41937
42845
|
label: c.seriesName[language.toUpperCase()]
|
41938
42846
|
});
|
41939
42847
|
}
|
41940
42848
|
return groups;
|
41941
|
-
}, [
|
42849
|
+
}, [serieList]);
|
41942
42850
|
var onChange = function onChange(val) {
|
41943
|
-
var cat =
|
42851
|
+
var cat = serieList.find(function (c) {
|
41944
42852
|
return c.serieNo.toString() == val;
|
41945
42853
|
});
|
41946
42854
|
var catalog = cat ? {
|
@@ -41948,15 +42856,15 @@ var CatalogSelection = function CatalogSelection(_ref) {
|
|
41948
42856
|
serieId: cat._id,
|
41949
42857
|
accountId: cat.catalogId
|
41950
42858
|
} : undefined;
|
41951
|
-
|
42859
|
+
setSerie(catalog);
|
41952
42860
|
setArticleCodex(undefined);
|
41953
|
-
|
42861
|
+
setSerieProp === null || setSerieProp === void 0 || setSerieProp(cat);
|
41954
42862
|
};
|
41955
42863
|
return /*#__PURE__*/jsx("div", {
|
41956
42864
|
className: wrapper,
|
41957
42865
|
children: /*#__PURE__*/jsx(Select$1, {
|
41958
42866
|
placeholder: t('backoffice.configurator.serie.placeholder'),
|
41959
|
-
value:
|
42867
|
+
value: serie === null || serie === void 0 ? void 0 : serie.catalogCodex,
|
41960
42868
|
options: options,
|
41961
42869
|
onChange: onChange,
|
41962
42870
|
className: select
|
@@ -41968,7 +42876,7 @@ var CatalogSelection$1 = observer(CatalogSelection);
|
|
41968
42876
|
function ownKeys$3(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; }
|
41969
42877
|
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
41970
42878
|
var Wsyiwyg = function Wsyiwyg(_ref) {
|
41971
|
-
var _state$
|
42879
|
+
var _state$serie, _tool$parameters, _state$articleCodex, _state$serie$catalogC, _state$serie2, _state$mask2, _state$serie3, _state$serie$accountI, _state$serie4, _state$mask3;
|
41972
42880
|
var tool = _ref.tool,
|
41973
42881
|
toolbar = _ref.toolbar;
|
41974
42882
|
var _useDivaCore = useDivaCore(),
|
@@ -41987,17 +42895,32 @@ var Wsyiwyg = function Wsyiwyg(_ref) {
|
|
41987
42895
|
}, [tool.parameters]);
|
41988
42896
|
useEffect(function () {
|
41989
42897
|
if (tool.elementProps.initSerie) {
|
41990
|
-
|
41991
|
-
|
41992
|
-
|
41993
|
-
|
41994
|
-
|
42898
|
+
if (tool.elementProps.useEnricherService) {
|
42899
|
+
var _state$serieList$find;
|
42900
|
+
var serie = {
|
42901
|
+
serieId: (_state$serieList$find = state.serieList.find(function (s) {
|
42902
|
+
return s.serieNo == tool.elementProps.initSerie.serieNo;
|
42903
|
+
})) === null || _state$serieList$find === void 0 ? void 0 : _state$serieList$find._id,
|
42904
|
+
catalogCodex: tool.elementProps.initSerie.serieNo.toString(),
|
42905
|
+
accountId: state.catalogId
|
42906
|
+
};
|
42907
|
+
if (JSON.stringify(state.serie) !== JSON.stringify(serie)) {
|
42908
|
+
state.setSerie(serie);
|
42909
|
+
state.setArticleCodex(undefined);
|
42910
|
+
}
|
42911
|
+
} else {
|
42912
|
+
state.setSerie({
|
42913
|
+
serieId: tool.elementProps.initSerie.serieId,
|
42914
|
+
catalogCodex: tool.elementProps.initSerie.serieNo.toString()
|
42915
|
+
});
|
42916
|
+
state.setArticleCodex(undefined);
|
42917
|
+
}
|
41995
42918
|
}
|
41996
42919
|
if (tool.elementProps.initItem) {
|
41997
42920
|
state.setArticleCodex(tool.elementProps.initItem);
|
41998
42921
|
}
|
41999
|
-
}, [tool.elementProps.initItem, tool.elementProps.initSerie]);
|
42000
|
-
if (!((_state$
|
42922
|
+
}, [tool.elementProps.initItem, tool.elementProps.initSerie, state.serieList]);
|
42923
|
+
if (!((_state$serie = state.serie) !== null && _state$serie !== void 0 && _state$serie.catalogCodex)) {
|
42001
42924
|
if (tool.elementProps.showCatalogSelection) {
|
42002
42925
|
return /*#__PURE__*/jsx(CatalogSelection$1, {
|
42003
42926
|
state: state,
|
@@ -42035,11 +42958,11 @@ var Wsyiwyg = function Wsyiwyg(_ref) {
|
|
42035
42958
|
resetArticle: '',
|
42036
42959
|
disableToggle: '1',
|
42037
42960
|
startDivaNr: 'DIVA-000000',
|
42038
|
-
catalogCodex: (_state$
|
42039
|
-
}, (_state$
|
42040
|
-
serieId: state.
|
42961
|
+
catalogCodex: (_state$serie$catalogC = (_state$serie2 = state.serie) === null || _state$serie2 === void 0 ? void 0 : _state$serie2.catalogCodex) !== null && _state$serie$catalogC !== void 0 ? _state$serie$catalogC : (_state$mask2 = state.mask) === null || _state$mask2 === void 0 ? void 0 : _state$mask2.catalogCodex
|
42962
|
+
}, (_state$serie3 = state.serie) !== null && _state$serie3 !== void 0 && _state$serie3.serieId ? {
|
42963
|
+
serieId: state.serie.serieId
|
42041
42964
|
} : {}), {}, {
|
42042
|
-
accountGuid: (_state$
|
42965
|
+
accountGuid: (_state$serie$accountI = (_state$serie4 = state.serie) === null || _state$serie4 === void 0 ? void 0 : _state$serie4.accountId) !== null && _state$serie$accountI !== void 0 ? _state$serie$accountI : (_state$mask3 = state.mask) === null || _state$mask3 === void 0 ? void 0 : _state$mask3.accountId,
|
42043
42966
|
returnTo: 'DONT_SAVE_BASKET',
|
42044
42967
|
organizationId: organizationId,
|
42045
42968
|
no3DConnection: 'true'
|