@crystaldesign/diva-backoffice 25.2.0-beta.34 → 25.2.0-beta.4
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 +369 -448
- package/build/types/backoffice/src/Configuration.d.ts +0 -1
- package/build/types/backoffice/src/Configuration.d.ts.map +1 -1
- package/build/types/backoffice/src/store/ContentStore.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/Features.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/OptionCombinations.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/Options.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/PartlistPos.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/PriceFeatureGroupFinishes.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/PriceFeatureGroupPercentageSurcharge.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/OpenModalButton/Forms/IDMImportForm.d.ts +1 -6
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/OpenModalButton/Forms/IDMImportForm.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/OpenModalButton/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/PrefilterSelectors/FeatureSelector.d.ts +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/PrefilterSelectors/FeatureSelector.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/PrefilterSelectors/SeriesSelector.d.ts +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/PrefilterSelectors/SeriesSelector.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/UploadButton/index.d.ts +1 -5
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/UploadButton/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TableDetailInfos/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TableFeatureClasses/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TablePartlists/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TablePriceFeatureGroups/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TableSeries/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCollectionEditor/Tables/CollectionMembers.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/Tables/Prices/PriceDisplayCellRenderer/index.d.ts +1 -3
- package/build/types/backoffice/src/ui/IDMEnricherEditor/Tables/Prices/PriceDisplayCellRenderer/index.d.ts.map +1 -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/FeatureSelector.d.ts +1 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/components/PrefilterSelectors/FeatureSelector.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/components/PrefilterSelectors/SeriesSelector.d.ts +1 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/components/PrefilterSelectors/SeriesSelector.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TableExclusivity/tableConfiguration.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TableGroups/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/TableProperties/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/SelectSimple/useSelectSimpleData.d.ts +1 -1
- package/build/types/backoffice/src/ui/SelectSimple/useSelectSimpleData.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Table/StandardTable/useTableData.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Table/types.d.ts +1 -2
- package/build/types/backoffice/src/ui/Table/types.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Table/utils/applyFilterAndSortation.d.ts +24 -25
- package/build/types/backoffice/src/ui/Table/utils/applyFilterAndSortation.d.ts.map +1 -1
- package/build/types/backoffice/src/utils/applyMapping.d.ts.map +1 -1
- package/package.json +10 -10
package/build/esm/index.js
CHANGED
|
@@ -259,8 +259,6 @@ function applyMapping (_ref) {
|
|
|
259
259
|
} else if (fallBackToParams) {
|
|
260
260
|
_url.searchParams.append(m.targetField, encodeURI(d));
|
|
261
261
|
}
|
|
262
|
-
} else if (m.replaceIfUndefined) {
|
|
263
|
-
_url.href = _url.href.replace('&' + m.targetField + '=${' + m.targetField + '}', '');
|
|
264
262
|
}
|
|
265
263
|
}
|
|
266
264
|
var _iterator2 = _createForOfIteratorHelper$m(_url.searchParams.entries()),
|
|
@@ -1971,14 +1969,17 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
1971
1969
|
width: 160
|
|
1972
1970
|
}],
|
|
1973
1971
|
apiInterface: {
|
|
1974
|
-
read:
|
|
1972
|
+
read: {
|
|
1973
|
+
list: '${analyticsService}/businessevents?organizationId=${organizationId}',
|
|
1974
|
+
filterServerSide: true
|
|
1975
|
+
}
|
|
1975
1976
|
},
|
|
1976
1977
|
filter: {
|
|
1977
1978
|
period: {
|
|
1978
1979
|
title: t('backoffice.FilterBoxAnalytics.filter.zeitraum'),
|
|
1979
1980
|
fromField: 'fromTimeStamp',
|
|
1980
1981
|
toField: 'toTimeStamp',
|
|
1981
|
-
"default": 30
|
|
1982
|
+
"default": '30'
|
|
1982
1983
|
},
|
|
1983
1984
|
select: {
|
|
1984
1985
|
filterField: 'status',
|
|
@@ -2024,43 +2025,138 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
2024
2025
|
DetailApplicationState: {
|
|
2025
2026
|
type: 'JsonEditor'
|
|
2026
2027
|
},
|
|
2027
|
-
|
|
2028
|
+
TableClientRenderJobs: {
|
|
2028
2029
|
type: 'Table',
|
|
2029
|
-
title: t('backoffice.table.
|
|
2030
|
+
title: t('backoffice.table.renderjobs.title'),
|
|
2031
|
+
canRefresh: true,
|
|
2030
2032
|
columns: [{
|
|
2031
|
-
title: t('backoffice.table.
|
|
2032
|
-
field: '
|
|
2033
|
-
|
|
2034
|
-
|
|
2033
|
+
title: t('backoffice.table.renderjobs.columns.state'),
|
|
2034
|
+
field: 'state',
|
|
2035
|
+
sorter: 1,
|
|
2036
|
+
filter: {
|
|
2037
|
+
type: 'multiselect',
|
|
2038
|
+
values: [{
|
|
2039
|
+
value: 0,
|
|
2040
|
+
label: 'renderjob.stateincart'
|
|
2041
|
+
}, {
|
|
2042
|
+
value: 1,
|
|
2043
|
+
groupedValues: [1, 2, 3],
|
|
2044
|
+
label: 'renderjob.state.1'
|
|
2045
|
+
}, {
|
|
2046
|
+
value: 2,
|
|
2047
|
+
groupedValues: [4, 5, 6, 7, 8, 9, 11],
|
|
2048
|
+
label: 'renderjob.stateinprogress'
|
|
2049
|
+
}, {
|
|
2050
|
+
value: 10,
|
|
2051
|
+
label: 'renderjob.state.10'
|
|
2052
|
+
}, {
|
|
2053
|
+
value: 12,
|
|
2054
|
+
label: 'renderjob.state.12'
|
|
2055
|
+
}]
|
|
2056
|
+
},
|
|
2057
|
+
translationPrefix: 'renderjob.state',
|
|
2058
|
+
type: 'string',
|
|
2059
|
+
groupedValuesDisplayString: [{
|
|
2060
|
+
values: [0],
|
|
2061
|
+
text: t('renderjob.stateincart')
|
|
2062
|
+
}, {
|
|
2063
|
+
values: [1, 2, 3],
|
|
2064
|
+
text: t('renderjob.state.1')
|
|
2065
|
+
}, {
|
|
2066
|
+
values: [4, 5, 6, 7, 9, 8, 11],
|
|
2067
|
+
text: t('renderjob.stateinprogress')
|
|
2068
|
+
}],
|
|
2069
|
+
width: 130
|
|
2035
2070
|
}, {
|
|
2036
|
-
title: t('backoffice.table.
|
|
2037
|
-
field: '
|
|
2071
|
+
title: t('backoffice.table.renderjobs.columns.divaNr'),
|
|
2072
|
+
field: 'divaNr',
|
|
2038
2073
|
filter: 'advanced',
|
|
2039
2074
|
sorter: 2,
|
|
2040
|
-
width:
|
|
2075
|
+
width: 120
|
|
2041
2076
|
}, {
|
|
2042
|
-
title: t('backoffice.table.
|
|
2043
|
-
field: '
|
|
2077
|
+
title: t('backoffice.table.renderjobs.columns.VariantId'),
|
|
2078
|
+
field: 'divaNrVariantId',
|
|
2044
2079
|
filter: 'advanced',
|
|
2045
2080
|
sorter: 2,
|
|
2046
|
-
width:
|
|
2081
|
+
width: 120
|
|
2082
|
+
}, {
|
|
2083
|
+
title: t('backoffice.table.renderjobs.columns.fileUrl'),
|
|
2084
|
+
field: 'fileUrl',
|
|
2085
|
+
type: 'media',
|
|
2086
|
+
align: 'center',
|
|
2087
|
+
width: 100
|
|
2088
|
+
}, {
|
|
2089
|
+
title: t('backoffice.table.renderjobs.columns.realTimeRenderUrl'),
|
|
2090
|
+
field: 'realTimeRenderUrl',
|
|
2091
|
+
type: 'media',
|
|
2092
|
+
align: 'center',
|
|
2093
|
+
width: 100
|
|
2094
|
+
}, {
|
|
2095
|
+
title: t('backoffice.table.renderjobs.columns.job'),
|
|
2096
|
+
field: 'job',
|
|
2097
|
+
sorter: 3,
|
|
2098
|
+
filter: 'advanced',
|
|
2099
|
+
width: 100
|
|
2047
2100
|
}, {
|
|
2048
|
-
title: t('backoffice.table.
|
|
2049
|
-
field: '
|
|
2101
|
+
title: t('backoffice.table.renderjobs.columns.fileName'),
|
|
2102
|
+
field: 'fileName',
|
|
2103
|
+
sorter: 3,
|
|
2050
2104
|
filter: 'advanced',
|
|
2051
|
-
|
|
2052
|
-
width: 50
|
|
2105
|
+
width: 220
|
|
2053
2106
|
}, {
|
|
2054
|
-
title: t('backoffice.table.
|
|
2055
|
-
field: '
|
|
2107
|
+
title: t('backoffice.table.renderjobs.columns.viewPoint'),
|
|
2108
|
+
field: 'viewPoint',
|
|
2109
|
+
sorter: 4,
|
|
2056
2110
|
filter: 'advanced',
|
|
2057
|
-
|
|
2058
|
-
|
|
2111
|
+
width: 100
|
|
2112
|
+
}, {
|
|
2113
|
+
title: t('backoffice.table.renderjobs.columns.renderScene'),
|
|
2114
|
+
field: 'renderScene_displayText',
|
|
2115
|
+
sorter: 4,
|
|
2116
|
+
filter: 'advanced',
|
|
2117
|
+
width: 200
|
|
2118
|
+
}, {
|
|
2119
|
+
title: t('backoffice.table.renderjobs.columns.group'),
|
|
2120
|
+
field: 'group',
|
|
2121
|
+
sorter: 11,
|
|
2122
|
+
filter: 'advanced',
|
|
2123
|
+
width: 200
|
|
2124
|
+
}, {
|
|
2125
|
+
title: t('backoffice.table.renderjobs.columns.productName'),
|
|
2126
|
+
field: 'productName',
|
|
2127
|
+
sorter: 12,
|
|
2128
|
+
filter: 'advanced',
|
|
2129
|
+
width: 180
|
|
2130
|
+
}, {
|
|
2131
|
+
title: t('backoffice.table.invitations.organization'),
|
|
2132
|
+
field: 'organizationName',
|
|
2133
|
+
sorter: 1,
|
|
2134
|
+
width: 200,
|
|
2135
|
+
hidden: function hidden(_, globalFilter) {
|
|
2136
|
+
var _globalFilter$toggle;
|
|
2137
|
+
return !(globalFilter !== null && globalFilter !== void 0 && (_globalFilter$toggle = globalFilter.toggle) !== null && _globalFilter$toggle !== void 0 && (_globalFilter$toggle = _globalFilter$toggle['hierarchy']) !== null && _globalFilter$toggle !== void 0 && _globalFilter$toggle[0]);
|
|
2138
|
+
}
|
|
2139
|
+
}, {
|
|
2140
|
+
title: t('backoffice.table.renderjobs.columns.created'),
|
|
2141
|
+
field: 'created',
|
|
2142
|
+
sorter: 15,
|
|
2143
|
+
type: 'unixTimeStamp',
|
|
2144
|
+
defaultSortOrder: 'descend',
|
|
2145
|
+
width: 160,
|
|
2146
|
+
filter: 'interval'
|
|
2147
|
+
}, {
|
|
2148
|
+
title: t('backoffice.table.renderjobs.columns.lastUpdated'),
|
|
2149
|
+
field: 'lastUpdated',
|
|
2150
|
+
sorter: 15,
|
|
2151
|
+
type: 'unixTimeStamp',
|
|
2152
|
+
defaultSortOrder: 'descend',
|
|
2153
|
+
width: 160,
|
|
2154
|
+
filter: 'interval'
|
|
2059
2155
|
}],
|
|
2060
2156
|
apiInterface: {
|
|
2061
2157
|
read: {
|
|
2062
|
-
list: '${mediaService}/renderjobs
|
|
2063
|
-
filterServerSide:
|
|
2158
|
+
list: '${mediaService}/renderjobs?organizationId=${organizationId}',
|
|
2159
|
+
filterServerSide: true
|
|
2064
2160
|
},
|
|
2065
2161
|
update: {
|
|
2066
2162
|
url: '${mediaService}/renderjobs/{_id}/state',
|
|
@@ -2070,36 +2166,83 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
2070
2166
|
mapping: {
|
|
2071
2167
|
type: 'query',
|
|
2072
2168
|
map: [{
|
|
2073
|
-
sourceField: '
|
|
2074
|
-
targetField: '
|
|
2075
|
-
}, {
|
|
2076
|
-
sourceField: 'to',
|
|
2077
|
-
targetField: 'to'
|
|
2169
|
+
sourceField: 'hierarchy',
|
|
2170
|
+
targetField: 'hierarchy'
|
|
2078
2171
|
}, {
|
|
2079
|
-
|
|
2080
|
-
targetField: 'organizationId'
|
|
2081
|
-
replaceIfUndefined: true
|
|
2172
|
+
globalValue: 'selectedOrganizationId',
|
|
2173
|
+
targetField: 'organizationId'
|
|
2082
2174
|
}]
|
|
2083
2175
|
},
|
|
2084
2176
|
filter: {
|
|
2085
2177
|
toggle: {
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
inverted: true,
|
|
2091
|
-
inQuery: false,
|
|
2092
|
-
defaultChecked: true,
|
|
2093
|
-
permission: 'backoffice_taskstatus_allorgs'
|
|
2094
|
-
},
|
|
2095
|
-
period: {
|
|
2096
|
-
title: t('backoffice.FilterBoxAnalytics.filter.zeitraum'),
|
|
2097
|
-
fromField: 'from',
|
|
2098
|
-
toField: 'to',
|
|
2099
|
-
"default": 30,
|
|
2100
|
-
onlyAsMappingData: true
|
|
2178
|
+
fields: ['hierarchy'],
|
|
2179
|
+
label: t('backoffice.table.allorgusers.filter.toggle.label'),
|
|
2180
|
+
labelOff: t('backoffice.table.allorgusers.filter.toggle.labelOff'),
|
|
2181
|
+
inQuery: true
|
|
2101
2182
|
}
|
|
2102
|
-
}
|
|
2183
|
+
},
|
|
2184
|
+
rowAction: [{
|
|
2185
|
+
actionType: 'SimpleChangeValueButton',
|
|
2186
|
+
label: t('backoffice.renderjobs.order'),
|
|
2187
|
+
id: 'OrderClientRenderJob',
|
|
2188
|
+
rule: [
|
|
2189
|
+
//only created renderjobs can be ordered
|
|
2190
|
+
{
|
|
2191
|
+
match: {
|
|
2192
|
+
sourceField: 'state',
|
|
2193
|
+
value: 0
|
|
2194
|
+
}
|
|
2195
|
+
}],
|
|
2196
|
+
newValues: [{
|
|
2197
|
+
field: 'state',
|
|
2198
|
+
value: 1
|
|
2199
|
+
}],
|
|
2200
|
+
apiInterface: {
|
|
2201
|
+
update: {
|
|
2202
|
+
url: '${mediaService}/renderjobs/{_id}/state',
|
|
2203
|
+
method: 'PATCH'
|
|
2204
|
+
}
|
|
2205
|
+
}
|
|
2206
|
+
}, {
|
|
2207
|
+
actionType: 'SimpleChangeValueButton',
|
|
2208
|
+
label: t('backoffice.cancel'),
|
|
2209
|
+
id: 'CancelClientRenderJob',
|
|
2210
|
+
rule: [
|
|
2211
|
+
//only ordered and created renderjobs can bbe canceled
|
|
2212
|
+
{
|
|
2213
|
+
or: [{
|
|
2214
|
+
match: {
|
|
2215
|
+
sourceField: 'state',
|
|
2216
|
+
value: 0
|
|
2217
|
+
}
|
|
2218
|
+
}, {
|
|
2219
|
+
match: {
|
|
2220
|
+
sourceField: 'state',
|
|
2221
|
+
value: 1
|
|
2222
|
+
}
|
|
2223
|
+
}, {
|
|
2224
|
+
match: {
|
|
2225
|
+
sourceField: 'state',
|
|
2226
|
+
value: 2
|
|
2227
|
+
}
|
|
2228
|
+
}, {
|
|
2229
|
+
match: {
|
|
2230
|
+
sourceField: 'state',
|
|
2231
|
+
value: 3
|
|
2232
|
+
}
|
|
2233
|
+
}]
|
|
2234
|
+
}],
|
|
2235
|
+
newValues: [{
|
|
2236
|
+
field: 'state',
|
|
2237
|
+
value: 10
|
|
2238
|
+
}],
|
|
2239
|
+
apiInterface: {
|
|
2240
|
+
update: {
|
|
2241
|
+
url: '${mediaService}/renderjobs/{_id}/state',
|
|
2242
|
+
method: 'PATCH'
|
|
2243
|
+
}
|
|
2244
|
+
}
|
|
2245
|
+
}]
|
|
2103
2246
|
},
|
|
2104
2247
|
TableAllUsers: {
|
|
2105
2248
|
type: 'Table',
|
|
@@ -4756,8 +4899,8 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
4756
4899
|
sorter: 1,
|
|
4757
4900
|
width: 200,
|
|
4758
4901
|
hidden: function hidden(_, globalFilter) {
|
|
4759
|
-
var _globalFilter$
|
|
4760
|
-
return !(globalFilter !== null && globalFilter !== void 0 && (_globalFilter$
|
|
4902
|
+
var _globalFilter$toggle2;
|
|
4903
|
+
return !(globalFilter !== null && globalFilter !== void 0 && (_globalFilter$toggle2 = globalFilter.toggle) !== null && _globalFilter$toggle2 !== void 0 && (_globalFilter$toggle2 = _globalFilter$toggle2['hierarchy']) !== null && _globalFilter$toggle2 !== void 0 && _globalFilter$toggle2[0]);
|
|
4761
4904
|
}
|
|
4762
4905
|
}, {
|
|
4763
4906
|
title: t('backoffice.table.invitations.mailsend'),
|
|
@@ -4994,8 +5137,8 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
4994
5137
|
field: 'organizationDisplayName',
|
|
4995
5138
|
width: 150,
|
|
4996
5139
|
hidden: function hidden(_, globalFilter) {
|
|
4997
|
-
var _globalFilter$
|
|
4998
|
-
return !(globalFilter !== null && globalFilter !== void 0 && (_globalFilter$
|
|
5140
|
+
var _globalFilter$toggle3;
|
|
5141
|
+
return !(globalFilter !== null && globalFilter !== void 0 && (_globalFilter$toggle3 = globalFilter.toggle) !== null && _globalFilter$toggle3 !== void 0 && (_globalFilter$toggle3 = _globalFilter$toggle3['hierarchy']) !== null && _globalFilter$toggle3 !== void 0 && _globalFilter$toggle3[0]);
|
|
4999
5142
|
}
|
|
5000
5143
|
}, {
|
|
5001
5144
|
title: t('backoffice.table.allorgusers.created'),
|
|
@@ -5176,13 +5319,6 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
5176
5319
|
type: 'Table',
|
|
5177
5320
|
canRefresh: true,
|
|
5178
5321
|
columns: [{
|
|
5179
|
-
title: t('backoffice.table.rooms.columns.isExclusive'),
|
|
5180
|
-
type: 'boolean',
|
|
5181
|
-
field: 'isExclusive',
|
|
5182
|
-
sorter: 1,
|
|
5183
|
-
filter: 'advanced',
|
|
5184
|
-
width: 50
|
|
5185
|
-
}, {
|
|
5186
5322
|
title: 'ID',
|
|
5187
5323
|
field: '_id',
|
|
5188
5324
|
sorter: 1,
|
|
@@ -7681,7 +7817,10 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
7681
7817
|
style: {
|
|
7682
7818
|
marginBottom: '20px'
|
|
7683
7819
|
},
|
|
7684
|
-
permission: 'backoffice_admin_organizations'
|
|
7820
|
+
permission: 'backoffice_admin_organizations',
|
|
7821
|
+
hidden: function hidden(data) {
|
|
7822
|
+
return (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined;
|
|
7823
|
+
}
|
|
7685
7824
|
}, {
|
|
7686
7825
|
name: 'Info',
|
|
7687
7826
|
type: 'text',
|
|
@@ -7689,7 +7828,10 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
7689
7828
|
marginBottom: '30px'
|
|
7690
7829
|
},
|
|
7691
7830
|
text: t('backoffice.form.organizationdetails.items.licensesdesc'),
|
|
7692
|
-
permission: 'backoffice_admin_organizations'
|
|
7831
|
+
permission: 'backoffice_admin_organizations',
|
|
7832
|
+
hidden: function hidden(data) {
|
|
7833
|
+
return (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined;
|
|
7834
|
+
}
|
|
7693
7835
|
}, {
|
|
7694
7836
|
name: ['settings', 'enable3DExport'],
|
|
7695
7837
|
label: t('backoffice.form.organizationdetails.items.settings.enable3DExport'),
|
|
@@ -7706,22 +7848,6 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
7706
7848
|
value: false
|
|
7707
7849
|
}],
|
|
7708
7850
|
permission: 'backoffice_sys_admin_organizations'
|
|
7709
|
-
}, {
|
|
7710
|
-
name: ['settings', 'renderjobSeparateMaterials'],
|
|
7711
|
-
label: t('backoffice.form.organizationdetails.items.settings.renderjobSeparateMaterials'),
|
|
7712
|
-
permission: 'backoffice_admin_organizations',
|
|
7713
|
-
type: 'radio',
|
|
7714
|
-
optionType: 'button',
|
|
7715
|
-
options: [{
|
|
7716
|
-
label: t('backoffice.form.organizationdetails.items.vererbt'),
|
|
7717
|
-
value: undefined
|
|
7718
|
-
}, {
|
|
7719
|
-
label: t('backoffice.form.organizationdetails.items.ja'),
|
|
7720
|
-
value: true
|
|
7721
|
-
}, {
|
|
7722
|
-
label: t('backoffice.form.organizationdetails.items.nein'),
|
|
7723
|
-
value: false
|
|
7724
|
-
}]
|
|
7725
7851
|
}, {
|
|
7726
7852
|
name: ['settings', 'enableAR'],
|
|
7727
7853
|
label: t('backoffice.form.organizationdetails.items.settings.enableAR'),
|
|
@@ -7812,7 +7938,10 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
7812
7938
|
style: {
|
|
7813
7939
|
marginBottom: '40px'
|
|
7814
7940
|
},
|
|
7815
|
-
permission: 'backoffice_admin_organizations'
|
|
7941
|
+
permission: 'backoffice_admin_organizations',
|
|
7942
|
+
hidden: function hidden(data) {
|
|
7943
|
+
return (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined;
|
|
7944
|
+
}
|
|
7816
7945
|
}, {
|
|
7817
7946
|
name: 'iln',
|
|
7818
7947
|
label: t('backoffice.form.organizationdetails.items.iln'),
|
|
@@ -10850,10 +10979,6 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
10850
10979
|
}
|
|
10851
10980
|
},
|
|
10852
10981
|
items: [{
|
|
10853
|
-
name: 'isExclusive',
|
|
10854
|
-
label: 'ist Exclusive',
|
|
10855
|
-
type: 'checkbox'
|
|
10856
|
-
}, {
|
|
10857
10982
|
name: '_id',
|
|
10858
10983
|
label: 'ID',
|
|
10859
10984
|
type: 'input',
|
|
@@ -13409,11 +13534,10 @@ var menu = [{
|
|
|
13409
13534
|
permission: 'backoffice_current_organization',
|
|
13410
13535
|
icon: 'ApartmentOutlined'
|
|
13411
13536
|
}, {
|
|
13412
|
-
id: '
|
|
13413
|
-
path: '
|
|
13414
|
-
label: 'backoffice.menu.items.label.
|
|
13415
|
-
icon: 'FileImageOutlined'
|
|
13416
|
-
permission: 'backoffice_renderjobs_overview'
|
|
13537
|
+
id: 'TableClientRenderJobs',
|
|
13538
|
+
path: 'renderjobs',
|
|
13539
|
+
label: 'backoffice.menu.items.label.renderjobs',
|
|
13540
|
+
icon: 'FileImageOutlined'
|
|
13417
13541
|
}, {
|
|
13418
13542
|
id: 'catalogArea',
|
|
13419
13543
|
path: 'catalogs',
|
|
@@ -16635,7 +16759,6 @@ function parseDataEntry(item, selectMapping) {
|
|
|
16635
16759
|
* Returns the data of the selected option(s) based on the selectMapping configuration
|
|
16636
16760
|
*/
|
|
16637
16761
|
function parseReturnData(options, selectMapping) {
|
|
16638
|
-
if (!options) return undefined;
|
|
16639
16762
|
if (Array.isArray(options)) return options.map(function (option) {
|
|
16640
16763
|
return parseReturnData(option, selectMapping);
|
|
16641
16764
|
});
|
|
@@ -25252,7 +25375,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
25252
25375
|
state.onGlobalFilterPeriod(values[0].valueOf(), values[1].valueOf());
|
|
25253
25376
|
}
|
|
25254
25377
|
},
|
|
25255
|
-
|
|
25378
|
+
value: [(_state$globalFilter2 = state.globalFilter) !== null && _state$globalFilter2 !== void 0 && (_state$globalFilter2 = _state$globalFilter2.timeStamp) !== null && _state$globalFilter2 !== void 0 && (_state$globalFilter2 = _state$globalFilter2['fromTimeStamp']) !== null && _state$globalFilter2 !== void 0 && _state$globalFilter2[0] ? dayjs((_state$globalFilter3 = state.globalFilter) === null || _state$globalFilter3 === void 0 || (_state$globalFilter3 = _state$globalFilter3.timeStamp) === null || _state$globalFilter3 === void 0 || (_state$globalFilter3 = _state$globalFilter3['fromTimeStamp']) === null || _state$globalFilter3 === void 0 ? void 0 : _state$globalFilter3[0]) : dayjs(new Date(Date.now() - 30 * 24 * 60 * 60 * 1000)),
|
|
25256
25379
|
// Convert to Dayjs
|
|
25257
25380
|
(_state$globalFilter4 = state.globalFilter) !== null && _state$globalFilter4 !== void 0 && (_state$globalFilter4 = _state$globalFilter4.timeStamp) !== null && _state$globalFilter4 !== void 0 && (_state$globalFilter4 = _state$globalFilter4['toTimeStamp']) !== null && _state$globalFilter4 !== void 0 && _state$globalFilter4[0] ? dayjs((_state$globalFilter5 = state.globalFilter) === null || _state$globalFilter5 === void 0 || (_state$globalFilter5 = _state$globalFilter5.timeStamp) === null || _state$globalFilter5 === void 0 || (_state$globalFilter5 = _state$globalFilter5['toTimeStamp']) === null || _state$globalFilter5 === void 0 ? void 0 : _state$globalFilter5[0]) : dayjs(new Date()) // Convert to Dayjs
|
|
25258
25381
|
]
|
|
@@ -26917,7 +27040,7 @@ function ownKeys$o(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymb
|
|
|
26917
27040
|
function _objectSpread$o(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$o(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$o(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
26918
27041
|
var LOG$2 = getLogger('Backoffice', 'TableData');
|
|
26919
27042
|
function useTableData (_ref) {
|
|
26920
|
-
var _configuration$filter, _configuration$filter2, _configuration$filter3, _configuration$
|
|
27043
|
+
var _configuration$filter, _configuration$filter2, _configuration$filter3, _configuration$bulkAc, _configuration$apiInt;
|
|
26921
27044
|
var id = _ref.id,
|
|
26922
27045
|
i18n = _ref.i18n,
|
|
26923
27046
|
parentData = _ref.parentData,
|
|
@@ -26947,11 +27070,6 @@ function useTableData (_ref) {
|
|
|
26947
27070
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
26948
27071
|
catalogItem = _useState8[0],
|
|
26949
27072
|
onSelectedCatalog = _useState8[1];
|
|
26950
|
-
var filterHash = useRef();
|
|
26951
|
-
var _useState9 = useState(),
|
|
26952
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
26953
|
-
error = _useState10[0],
|
|
26954
|
-
setError = _useState10[1];
|
|
26955
27073
|
var toggleConfig = (_configuration$filter = configuration.filter) === null || _configuration$filter === void 0 ? void 0 : _configuration$filter.toggle;
|
|
26956
27074
|
var toggleFilter = {};
|
|
26957
27075
|
toggleConfig === null || toggleConfig === void 0 || toggleConfig.fields.forEach(function (f) {
|
|
@@ -26961,15 +27079,19 @@ function useTableData (_ref) {
|
|
|
26961
27079
|
(_configuration$filter2 = configuration.filter) === null || _configuration$filter2 === void 0 || (_configuration$filter2 = _configuration$filter2["default"]) === null || _configuration$filter2 === void 0 || _configuration$filter2.fields.forEach(function (f) {
|
|
26962
27080
|
return defaultFilter[f] = [configuration.filter["default"].globalValue ? root.getGlobalValue(configuration.filter["default"].globalValue) : true, 'eq'];
|
|
26963
27081
|
});
|
|
26964
|
-
var
|
|
27082
|
+
var _useState9 = useState({
|
|
26965
27083
|
select: (_configuration$filter3 = configuration.filter) !== null && _configuration$filter3 !== void 0 && (_configuration$filter3 = _configuration$filter3.select) !== null && _configuration$filter3 !== void 0 && _configuration$filter3.defaultValue ? _defineProperty({}, configuration.filter.select.filterField, [configuration.filter.select.defaultValue, 'eq']) : undefined,
|
|
26966
27084
|
toggle: toggleConfig !== null && toggleConfig !== void 0 && toggleConfig.defaultChecked && !(toggleConfig !== null && toggleConfig !== void 0 && toggleConfig.inverted) || !(toggleConfig !== null && toggleConfig !== void 0 && toggleConfig.defaultChecked) && toggleConfig !== null && toggleConfig !== void 0 && toggleConfig.inverted ? toggleFilter : undefined,
|
|
26967
27085
|
"default": defaultFilter ? defaultFilter : undefined
|
|
26968
27086
|
}),
|
|
27087
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
27088
|
+
globalFilter = _useState10[0],
|
|
27089
|
+
setGlobaFilter = _useState10[1];
|
|
27090
|
+
var filterHash = useRef();
|
|
27091
|
+
var _useState11 = useState(),
|
|
26969
27092
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
26970
|
-
|
|
26971
|
-
|
|
26972
|
-
var periodDefaultValue = (_configuration$filter4 = configuration.filter) === null || _configuration$filter4 === void 0 || (_configuration$filter4 = _configuration$filter4.period) === null || _configuration$filter4 === void 0 ? void 0 : _configuration$filter4["default"];
|
|
27093
|
+
error = _useState12[0],
|
|
27094
|
+
setError = _useState12[1];
|
|
26973
27095
|
var _useState13 = useState({
|
|
26974
27096
|
loading: true,
|
|
26975
27097
|
deleting: false,
|
|
@@ -26985,15 +27107,13 @@ function useTableData (_ref) {
|
|
|
26985
27107
|
mappingData: _objectSpread$o(_objectSpread$o({}, parentData), {}, {
|
|
26986
27108
|
prefilter: {
|
|
26987
27109
|
select: globalFilter.select
|
|
26988
|
-
}
|
|
26989
|
-
from: periodDefaultValue ? Date.now() - periodDefaultValue * 86400000 : undefined,
|
|
26990
|
-
to: Date.now()
|
|
27110
|
+
}
|
|
26991
27111
|
})
|
|
26992
27112
|
}),
|
|
26993
27113
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
26994
27114
|
state = _useState14[0],
|
|
26995
27115
|
setState = _useState14[1];
|
|
26996
|
-
var
|
|
27116
|
+
var mapping = _objectSpread$o(_objectSpread$o({}, parentData), {}, {
|
|
26997
27117
|
catalogCodex: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.codex,
|
|
26998
27118
|
sessionGuID: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid
|
|
26999
27119
|
});
|
|
@@ -27006,8 +27126,8 @@ function useTableData (_ref) {
|
|
|
27006
27126
|
case 0:
|
|
27007
27127
|
fd = new FormData();
|
|
27008
27128
|
fd.append('value', JSON.stringify([newData]));
|
|
27009
|
-
fd.append('catalogCodex',
|
|
27010
|
-
fd.append('sessionGuid',
|
|
27129
|
+
fd.append('catalogCodex', mapping.catalogCodex);
|
|
27130
|
+
fd.append('sessionGuid', mapping.sessionGuID);
|
|
27011
27131
|
_context.next = 6;
|
|
27012
27132
|
return apiHandler.create(undefined, undefined, undefined, fd);
|
|
27013
27133
|
case 6:
|
|
@@ -27046,8 +27166,8 @@ function useTableData (_ref) {
|
|
|
27046
27166
|
for (var i = 0; i < dataArray.length; i++) {
|
|
27047
27167
|
var dataRow = dataArray[i];
|
|
27048
27168
|
if (filterServerSide) {
|
|
27049
|
-
var _configuration$
|
|
27050
|
-
if ((_configuration$
|
|
27169
|
+
var _configuration$filter4;
|
|
27170
|
+
if ((_configuration$filter4 = configuration.filter) !== null && _configuration$filter4 !== void 0 && (_configuration$filter4 = _configuration$filter4.select) !== null && _configuration$filter4 !== void 0 && _configuration$filter4.filterField) {
|
|
27051
27171
|
onGlobalFilterSelect(dataRow[configuration.filter.select.filterField]);
|
|
27052
27172
|
} else {
|
|
27053
27173
|
var _pagination;
|
|
@@ -27063,15 +27183,15 @@ function useTableData (_ref) {
|
|
|
27063
27183
|
});
|
|
27064
27184
|
}
|
|
27065
27185
|
} else {
|
|
27066
|
-
var _configuration$
|
|
27186
|
+
var _configuration$filter5, _configuration$filter6;
|
|
27067
27187
|
var _updateData2 = updateData({
|
|
27068
27188
|
data: newInitData,
|
|
27069
27189
|
dataRow: dataRow
|
|
27070
27190
|
}),
|
|
27071
27191
|
nextInitData = _updateData2.data;
|
|
27072
27192
|
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, filterData), {}, {
|
|
27073
|
-
filters: _objectSpread$o(_objectSpread$o(_objectSpread$o(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, filterData.filters), globalFilter.search), !(configuration !== null && configuration !== void 0 && (_configuration$
|
|
27074
|
-
}, configuration !== null && configuration !== void 0 && (_configuration$
|
|
27193
|
+
filters: _objectSpread$o(_objectSpread$o(_objectSpread$o(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, filterData.filters), globalFilter.search), !(configuration !== null && configuration !== void 0 && (_configuration$filter5 = configuration.filter) !== null && _configuration$filter5 !== void 0 && (_configuration$filter5 = _configuration$filter5.toggle) !== null && _configuration$filter5 !== void 0 && _configuration$filter5.inQuery) ? globalFilter.toggle : undefined), globalFilter.select), globalFilter.timeStamp), globalFilter["default"])
|
|
27194
|
+
}, configuration !== null && configuration !== void 0 && (_configuration$filter6 = configuration.filter) !== null && _configuration$filter6 !== void 0 && (_configuration$filter6 = _configuration$filter6.toggle) !== null && _configuration$filter6 !== void 0 && _configuration$filter6.inQuery ? {
|
|
27075
27195
|
genericProps: globalFilter.toggle
|
|
27076
27196
|
} : undefined), {}, {
|
|
27077
27197
|
data: nextInitData,
|
|
@@ -27102,14 +27222,14 @@ function useTableData (_ref) {
|
|
|
27102
27222
|
_useState16 = _slicedToArray(_useState15, 1),
|
|
27103
27223
|
columns = _useState16[0];
|
|
27104
27224
|
var triggerRefresh = function triggerRefresh() {
|
|
27105
|
-
var _configuration$
|
|
27225
|
+
var _configuration$filter7;
|
|
27106
27226
|
setError(undefined);
|
|
27107
27227
|
var newGlobalFilter = _objectSpread$o({}, globalFilter);
|
|
27108
27228
|
//on refresh update default filter, since global value can change
|
|
27109
|
-
if ((_configuration$
|
|
27110
|
-
var _configuration$
|
|
27229
|
+
if ((_configuration$filter7 = configuration.filter) !== null && _configuration$filter7 !== void 0 && _configuration$filter7["default"]) {
|
|
27230
|
+
var _configuration$filter8;
|
|
27111
27231
|
var _defaultFilter = {};
|
|
27112
|
-
(_configuration$
|
|
27232
|
+
(_configuration$filter8 = configuration.filter) === null || _configuration$filter8 === void 0 || (_configuration$filter8 = _configuration$filter8["default"]) === null || _configuration$filter8 === void 0 || _configuration$filter8.fields.forEach(function (f) {
|
|
27113
27233
|
return _defaultFilter[f] = [configuration.filter["default"].globalValue ? root.getGlobalValue(configuration.filter["default"].globalValue) : true, 'eq'];
|
|
27114
27234
|
});
|
|
27115
27235
|
newGlobalFilter["default"] = _defaultFilter;
|
|
@@ -27169,7 +27289,7 @@ function useTableData (_ref) {
|
|
|
27169
27289
|
}, [configuration.title, parentData]);
|
|
27170
27290
|
var getDataById = /*#__PURE__*/function () {
|
|
27171
27291
|
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(id) {
|
|
27172
|
-
var _configuration$
|
|
27292
|
+
var _configuration$filter9;
|
|
27173
27293
|
var filters, ssf, data;
|
|
27174
27294
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
27175
27295
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -27183,11 +27303,11 @@ function useTableData (_ref) {
|
|
|
27183
27303
|
},
|
|
27184
27304
|
columns: configuration.columns,
|
|
27185
27305
|
filters: filters
|
|
27186
|
-
}, configuration !== null && configuration !== void 0 && (_configuration$
|
|
27306
|
+
}, configuration !== null && configuration !== void 0 && (_configuration$filter9 = configuration.filter) !== null && _configuration$filter9 !== void 0 && (_configuration$filter9 = _configuration$filter9.toggle) !== null && _configuration$filter9 !== void 0 && _configuration$filter9.inQuery ? {
|
|
27187
27307
|
genericProps: globalFilter.toggle
|
|
27188
27308
|
} : undefined);
|
|
27189
27309
|
_context2.next = 5;
|
|
27190
|
-
return apiHandler.readList(parentMapping || configuration.mapping,
|
|
27310
|
+
return apiHandler.readList(parentMapping || configuration.mapping, mapping, ssf);
|
|
27191
27311
|
case 5:
|
|
27192
27312
|
data = _context2.sent;
|
|
27193
27313
|
return _context2.abrupt("return", data);
|
|
@@ -27203,18 +27323,17 @@ function useTableData (_ref) {
|
|
|
27203
27323
|
}();
|
|
27204
27324
|
var onChange = /*#__PURE__*/function () {
|
|
27205
27325
|
var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(p) {
|
|
27206
|
-
var _configuration$
|
|
27326
|
+
var _configuration$filter10, _configuration$filter11, _prefilter$select, _configuration$filter12, _configuration$filter13;
|
|
27207
27327
|
var prefilter,
|
|
27208
27328
|
refresh,
|
|
27209
27329
|
clearSelection,
|
|
27210
|
-
overwriteMappingData,
|
|
27211
27330
|
currentData,
|
|
27212
27331
|
filterData,
|
|
27213
27332
|
currentFilterHash,
|
|
27214
27333
|
currentPagination,
|
|
27215
27334
|
currentUrl,
|
|
27335
|
+
_configuration$filter14,
|
|
27216
27336
|
_configuration$filter15,
|
|
27217
|
-
_configuration$filter16,
|
|
27218
27337
|
_prefilter$toggle,
|
|
27219
27338
|
_parseFilter,
|
|
27220
27339
|
ssf,
|
|
@@ -27230,13 +27349,11 @@ function useTableData (_ref) {
|
|
|
27230
27349
|
prefilter = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : globalFilter;
|
|
27231
27350
|
refresh = _args3.length > 2 ? _args3[2] : undefined;
|
|
27232
27351
|
clearSelection = _args3.length > 3 ? _args3[3] : undefined;
|
|
27233
|
-
overwriteMappingData = _args3.length > 4 ? _args3[4] : undefined;
|
|
27234
27352
|
setState(_objectSpread$o(_objectSpread$o({}, state), {}, {
|
|
27235
|
-
mappingData: overwriteMappingData !== null && overwriteMappingData !== void 0 ? overwriteMappingData : state.mappingData,
|
|
27236
27353
|
loading: true
|
|
27237
27354
|
}));
|
|
27238
27355
|
currentData = initData;
|
|
27239
|
-
filterData = _objectSpread$o(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, prefilter.search), ((_configuration$
|
|
27356
|
+
filterData = _objectSpread$o(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, prefilter.search), ((_configuration$filter10 = configuration.filter) === null || _configuration$filter10 === void 0 || (_configuration$filter10 = _configuration$filter10.select) === null || _configuration$filter10 === void 0 ? void 0 : _configuration$filter10.applyDefaultValue) !== false || ((_configuration$filter11 = configuration.filter) === null || _configuration$filter11 === void 0 || (_configuration$filter11 = _configuration$filter11.select) === null || _configuration$filter11 === void 0 ? void 0 : _configuration$filter11.defaultValue) !== ((_prefilter$select = prefilter.select) === null || _prefilter$select === void 0 || (_prefilter$select = _prefilter$select[(_configuration$filter12 = (_configuration$filter13 = configuration.filter) === null || _configuration$filter13 === void 0 || (_configuration$filter13 = _configuration$filter13.select) === null || _configuration$filter13 === void 0 ? void 0 : _configuration$filter13.filterField) !== null && _configuration$filter12 !== void 0 ? _configuration$filter12 : '']) === null || _prefilter$select === void 0 ? void 0 : _prefilter$select[0]) ? prefilter.select : undefined), prefilter.timeStamp), prefilter["default"]); //remove all null values
|
|
27240
27357
|
filterData = Object.fromEntries(Object.entries(filterData).filter(function (_ref6) {
|
|
27241
27358
|
var _ref7 = _slicedToArray(_ref6, 2);
|
|
27242
27359
|
_ref7[0];
|
|
@@ -27249,7 +27366,7 @@ function useTableData (_ref) {
|
|
|
27249
27366
|
});
|
|
27250
27367
|
filterHash.current = currentFilterHash;
|
|
27251
27368
|
if (!filterServerSide) {
|
|
27252
|
-
_context3.next =
|
|
27369
|
+
_context3.next = 20;
|
|
27253
27370
|
break;
|
|
27254
27371
|
}
|
|
27255
27372
|
ssf = _objectSpread$o({
|
|
@@ -27257,32 +27374,32 @@ function useTableData (_ref) {
|
|
|
27257
27374
|
columns: configuration.columns,
|
|
27258
27375
|
filters: filterData,
|
|
27259
27376
|
sorter: p.sorter
|
|
27260
|
-
}, configuration !== null && configuration !== void 0 && (_configuration$
|
|
27377
|
+
}, configuration !== null && configuration !== void 0 && (_configuration$filter14 = configuration.filter) !== null && _configuration$filter14 !== void 0 && (_configuration$filter14 = _configuration$filter14.toggle) !== null && _configuration$filter14 !== void 0 && _configuration$filter14.inQuery ? {
|
|
27261
27378
|
genericProps: prefilter.toggle
|
|
27262
27379
|
} : undefined);
|
|
27263
|
-
_context3.next =
|
|
27264
|
-
return apiHandler.readList(parentMapping || configuration.mapping,
|
|
27265
|
-
case
|
|
27380
|
+
_context3.next = 14;
|
|
27381
|
+
return apiHandler.readList(parentMapping || configuration.mapping, mapping, ssf, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid, parseFilter(!(configuration !== null && configuration !== void 0 && (_configuration$filter15 = configuration.filter) !== null && _configuration$filter15 !== void 0 && (_configuration$filter15 = _configuration$filter15.toggle) !== null && _configuration$filter15 !== void 0 && _configuration$filter15.inQuery) ? (_prefilter$toggle = prefilter.toggle) !== null && _prefilter$toggle !== void 0 ? _prefilter$toggle : {} : {}, (_parseFilter = parseFilter(p.filters, undefined)) === null || _parseFilter === void 0 ? void 0 : _parseFilter.slice(1, -1)));
|
|
27382
|
+
case 14:
|
|
27266
27383
|
data = _context3.sent;
|
|
27267
|
-
currentUrl = apiHandler.getReadListUrl(parentMapping || configuration.mapping,
|
|
27384
|
+
currentUrl = apiHandler.getReadListUrl(parentMapping || configuration.mapping, mapping, ssf);
|
|
27268
27385
|
currentData = data.data;
|
|
27269
27386
|
currentPagination = _objectSpread$o(_objectSpread$o({}, currentPagination), {}, {
|
|
27270
27387
|
total: data.total
|
|
27271
27388
|
});
|
|
27272
|
-
_context3.next =
|
|
27389
|
+
_context3.next = 29;
|
|
27273
27390
|
break;
|
|
27274
|
-
case
|
|
27391
|
+
case 20:
|
|
27275
27392
|
if (!(!currentData || currentData.length === 0 || refresh)) {
|
|
27276
|
-
_context3.next =
|
|
27393
|
+
_context3.next = 26;
|
|
27277
27394
|
break;
|
|
27278
27395
|
}
|
|
27279
|
-
_context3.next =
|
|
27280
|
-
return apiHandler.readList(parentMapping || configuration.mapping,
|
|
27281
|
-
case
|
|
27396
|
+
_context3.next = 23;
|
|
27397
|
+
return apiHandler.readList(parentMapping || configuration.mapping, mapping, undefined);
|
|
27398
|
+
case 23:
|
|
27282
27399
|
_data3 = _context3.sent;
|
|
27283
27400
|
currentData = _data3.data;
|
|
27284
27401
|
setInitData(currentData);
|
|
27285
|
-
case
|
|
27402
|
+
case 26:
|
|
27286
27403
|
_applyFilterAndSortat2 = applyFilterAndSortation(_objectSpread$o(_objectSpread$o({}, p), {}, {
|
|
27287
27404
|
pagination: currentPagination,
|
|
27288
27405
|
filters: filterData,
|
|
@@ -27291,12 +27408,12 @@ function useTableData (_ref) {
|
|
|
27291
27408
|
})), _data4 = _applyFilterAndSortat2.data, pagination = _applyFilterAndSortat2.pagination;
|
|
27292
27409
|
currentData = _data4;
|
|
27293
27410
|
currentPagination = pagination;
|
|
27294
|
-
case
|
|
27411
|
+
case 29:
|
|
27295
27412
|
setState(_objectSpread$o(_objectSpread$o({}, state), {}, {
|
|
27296
27413
|
loading: false,
|
|
27297
27414
|
data: currentData,
|
|
27298
27415
|
pagination: currentPagination,
|
|
27299
|
-
mappingData: _objectSpread$o(_objectSpread$o(
|
|
27416
|
+
mappingData: _objectSpread$o(_objectSpread$o({}, parentData), {}, {
|
|
27300
27417
|
prefilter: prefilter
|
|
27301
27418
|
}),
|
|
27302
27419
|
currentFetchUrl: currentUrl
|
|
@@ -27307,7 +27424,7 @@ function useTableData (_ref) {
|
|
|
27307
27424
|
filters: p.filters,
|
|
27308
27425
|
sorter: p.sorter
|
|
27309
27426
|
});
|
|
27310
|
-
case
|
|
27427
|
+
case 31:
|
|
27311
27428
|
case "end":
|
|
27312
27429
|
return _context3.stop();
|
|
27313
27430
|
}
|
|
@@ -27325,7 +27442,7 @@ function useTableData (_ref) {
|
|
|
27325
27442
|
var onDelete = /*#__PURE__*/function () {
|
|
27326
27443
|
var _ref8 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
|
|
27327
27444
|
var _configuration$apiInt2;
|
|
27328
|
-
var newData, newInitData, deleted, userPermissions, _loop, mappingData, deleteResult, _ret, index, total, pages, current, _configuration$
|
|
27445
|
+
var newData, newInitData, deleted, userPermissions, _loop, mappingData, deleteResult, _ret, index, total, pages, current, _configuration$filter16, _configuration$filter17, data;
|
|
27329
27446
|
return _regeneratorRuntime.wrap(function _callee4$(_context5) {
|
|
27330
27447
|
while (1) switch (_context5.prev = _context5.next) {
|
|
27331
27448
|
case 0:
|
|
@@ -27340,7 +27457,7 @@ function useTableData (_ref) {
|
|
|
27340
27457
|
case 6:
|
|
27341
27458
|
userPermissions = _context5.sent;
|
|
27342
27459
|
_loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop(index) {
|
|
27343
|
-
var _configuration$
|
|
27460
|
+
var _configuration$filter18, _configuration$filter19;
|
|
27344
27461
|
var id, _newData$filter, _newData$filter2, mapToggle, _iterator, _step, _globalFilter$toggle, field, _globalFilter$toggle2, _configuration$delete, _configuration$onErro, _configuration$onErro2, deletedIndex, initDeletedIndex;
|
|
27345
27462
|
return _regeneratorRuntime.wrap(function _loop$(_context4) {
|
|
27346
27463
|
while (1) switch (_context4.prev = _context4.next) {
|
|
@@ -27356,7 +27473,7 @@ function useTableData (_ref) {
|
|
|
27356
27473
|
})) === null || _newData$filter2 === void 0 ? void 0 : _newData$filter2[0];
|
|
27357
27474
|
}
|
|
27358
27475
|
mapToggle = {};
|
|
27359
|
-
_iterator = _createForOfIteratorHelper$3((_configuration$
|
|
27476
|
+
_iterator = _createForOfIteratorHelper$3((_configuration$filter18 = (_configuration$filter19 = configuration.filter) === null || _configuration$filter19 === void 0 || (_configuration$filter19 = _configuration$filter19.toggle) === null || _configuration$filter19 === void 0 ? void 0 : _configuration$filter19.fields) !== null && _configuration$filter18 !== void 0 ? _configuration$filter18 : []);
|
|
27360
27477
|
try {
|
|
27361
27478
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
27362
27479
|
field = _step.value;
|
|
@@ -27459,14 +27576,14 @@ function useTableData (_ref) {
|
|
|
27459
27576
|
break;
|
|
27460
27577
|
}
|
|
27461
27578
|
_context5.next = 25;
|
|
27462
|
-
return apiHandler.readList(parentMapping || configuration.mapping,
|
|
27579
|
+
return apiHandler.readList(parentMapping || configuration.mapping, mapping, _objectSpread$o({
|
|
27463
27580
|
pagination: _objectSpread$o(_objectSpread$o({}, state.pagination), {}, {
|
|
27464
27581
|
current: current
|
|
27465
27582
|
}),
|
|
27466
27583
|
columns: configuration.columns,
|
|
27467
|
-
filters: _objectSpread$o(_objectSpread$o(_objectSpread$o(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, filterData.filters), globalFilter.search), !(configuration !== null && configuration !== void 0 && (_configuration$
|
|
27584
|
+
filters: _objectSpread$o(_objectSpread$o(_objectSpread$o(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, filterData.filters), globalFilter.search), !(configuration !== null && configuration !== void 0 && (_configuration$filter16 = configuration.filter) !== null && _configuration$filter16 !== void 0 && (_configuration$filter16 = _configuration$filter16.toggle) !== null && _configuration$filter16 !== void 0 && _configuration$filter16.inQuery) ? globalFilter.toggle : undefined), globalFilter.select), globalFilter.timeStamp), globalFilter["default"]),
|
|
27468
27585
|
sorter: filterData.sorter
|
|
27469
|
-
}, configuration !== null && configuration !== void 0 && (_configuration$
|
|
27586
|
+
}, configuration !== null && configuration !== void 0 && (_configuration$filter17 = configuration.filter) !== null && _configuration$filter17 !== void 0 && (_configuration$filter17 = _configuration$filter17.toggle) !== null && _configuration$filter17 !== void 0 && _configuration$filter17.inQuery ? {
|
|
27470
27587
|
genericProps: globalFilter.toggle
|
|
27471
27588
|
} : undefined));
|
|
27472
27589
|
case 25:
|
|
@@ -27495,8 +27612,8 @@ function useTableData (_ref) {
|
|
|
27495
27612
|
};
|
|
27496
27613
|
}();
|
|
27497
27614
|
var onGlobalFilterSelect = function onGlobalFilterSelect(value) {
|
|
27498
|
-
var _configuration$
|
|
27499
|
-
if (!((_configuration$
|
|
27615
|
+
var _configuration$filter20;
|
|
27616
|
+
if (!((_configuration$filter20 = configuration.filter) !== null && _configuration$filter20 !== void 0 && _configuration$filter20.select)) {
|
|
27500
27617
|
LOG$2.error(new DivaError('No global select filter defiend'));
|
|
27501
27618
|
return;
|
|
27502
27619
|
}
|
|
@@ -27512,16 +27629,14 @@ function useTableData (_ref) {
|
|
|
27512
27629
|
}, filterData), newGlobalFilter);
|
|
27513
27630
|
};
|
|
27514
27631
|
var onGlobalFilterToggle = function onGlobalFilterToggle() {
|
|
27515
|
-
var _configuration$
|
|
27516
|
-
if (!((_configuration$
|
|
27632
|
+
var _configuration$filter21;
|
|
27633
|
+
if (!((_configuration$filter21 = configuration.filter) !== null && _configuration$filter21 !== void 0 && _configuration$filter21.toggle)) {
|
|
27517
27634
|
LOG$2.error(new DivaError('No global toggle filter defined'));
|
|
27518
27635
|
return;
|
|
27519
27636
|
}
|
|
27520
27637
|
var toggleFilter = {};
|
|
27521
|
-
var mappingData = _objectSpread$o({}, state.mappingData);
|
|
27522
27638
|
configuration.filter.toggle.fields.forEach(function (f) {
|
|
27523
|
-
|
|
27524
|
-
toggleFilter[f] = [configuration.filter.toggle.globalValue ? root.getGlobalValue(configuration.filter.toggle.globalValue) : true, 'eq', !configuration.filter.toggle.isAnd];
|
|
27639
|
+
return toggleFilter[f] = [configuration.filter.toggle.globalValue ? root.getGlobalValue(configuration.filter.toggle.globalValue) : true, 'eq', !configuration.filter.toggle.isAnd];
|
|
27525
27640
|
});
|
|
27526
27641
|
var newGlobalFilter = _objectSpread$o(_objectSpread$o({}, globalFilter), {}, {
|
|
27527
27642
|
toggle: globalFilter.toggle ? undefined : toggleFilter
|
|
@@ -27529,14 +27644,14 @@ function useTableData (_ref) {
|
|
|
27529
27644
|
setGlobaFilter(newGlobalFilter);
|
|
27530
27645
|
onChange(_objectSpread$o({
|
|
27531
27646
|
pagination: state.pagination
|
|
27532
|
-
}, filterData), newGlobalFilter,
|
|
27647
|
+
}, filterData), newGlobalFilter, undefined, true);
|
|
27533
27648
|
};
|
|
27534
27649
|
var resetToggle = function resetToggle() {
|
|
27535
27650
|
if (globalFilter !== null && globalFilter !== void 0 && globalFilter.toggle) onGlobalFilterToggle();
|
|
27536
27651
|
};
|
|
27537
27652
|
var onGlobalFilterSearch = function onGlobalFilterSearch(value) {
|
|
27538
|
-
var _configuration$
|
|
27539
|
-
if (!((_configuration$
|
|
27653
|
+
var _configuration$filter22;
|
|
27654
|
+
if (!((_configuration$filter22 = configuration.filter) !== null && _configuration$filter22 !== void 0 && _configuration$filter22.search)) {
|
|
27540
27655
|
LOG$2.error(new DivaError('No global search filter defiend'));
|
|
27541
27656
|
return;
|
|
27542
27657
|
}
|
|
@@ -27544,8 +27659,8 @@ function useTableData (_ref) {
|
|
|
27544
27659
|
search: {}
|
|
27545
27660
|
});
|
|
27546
27661
|
if (value) {
|
|
27547
|
-
var _configuration$
|
|
27548
|
-
(_configuration$
|
|
27662
|
+
var _configuration$filter23;
|
|
27663
|
+
(_configuration$filter23 = configuration.filter) === null || _configuration$filter23 === void 0 || _configuration$filter23.search.fields.forEach(function (f) {
|
|
27549
27664
|
if (typeof f == 'string') {
|
|
27550
27665
|
newGlobalFilter.search[f] = [value, 'contains', 1]; //normally global search should be or, so 1
|
|
27551
27666
|
} else {
|
|
@@ -27559,8 +27674,8 @@ function useTableData (_ref) {
|
|
|
27559
27674
|
}, filterData), newGlobalFilter);
|
|
27560
27675
|
};
|
|
27561
27676
|
var onGlobalFilterPeriod = function onGlobalFilterPeriod(from, to) {
|
|
27562
|
-
var _configuration$
|
|
27563
|
-
if (!((_configuration$
|
|
27677
|
+
var _configuration$filter24;
|
|
27678
|
+
if (!((_configuration$filter24 = configuration.filter) !== null && _configuration$filter24 !== void 0 && _configuration$filter24.period)) {
|
|
27564
27679
|
LOG$2.error(new DivaError('No global period filter defiend'));
|
|
27565
27680
|
return;
|
|
27566
27681
|
}
|
|
@@ -27569,13 +27684,10 @@ function useTableData (_ref) {
|
|
|
27569
27684
|
fromTimeStamp: [from],
|
|
27570
27685
|
toTimeStamp: [to]
|
|
27571
27686
|
};
|
|
27572
|
-
|
|
27687
|
+
setGlobaFilter(newGlobalFilter);
|
|
27573
27688
|
onChange(_objectSpread$o({
|
|
27574
27689
|
pagination: state.pagination
|
|
27575
|
-
}, filterData),
|
|
27576
|
-
from: from,
|
|
27577
|
-
to: to
|
|
27578
|
-
}));
|
|
27690
|
+
}, filterData), newGlobalFilter);
|
|
27579
27691
|
};
|
|
27580
27692
|
return _objectSpread$o(_objectSpread$o({}, state), {}, {
|
|
27581
27693
|
title: title,
|
|
@@ -30418,8 +30530,7 @@ function TableGroups () {
|
|
|
30418
30530
|
}, {
|
|
30419
30531
|
headerName: 'backoffice.idmEnricher.general.label._id',
|
|
30420
30532
|
field: '_id',
|
|
30421
|
-
editable: false
|
|
30422
|
-
cellDataType: 'objectId'
|
|
30533
|
+
editable: false
|
|
30423
30534
|
}]
|
|
30424
30535
|
};
|
|
30425
30536
|
}, [apiInterface, t]);
|
|
@@ -31032,8 +31143,7 @@ function TableProperties () {
|
|
|
31032
31143
|
}, {
|
|
31033
31144
|
headerName: 'backoffice.idmEnricher.general.label._id',
|
|
31034
31145
|
field: '_id',
|
|
31035
|
-
editable: false
|
|
31036
|
-
cellDataType: 'objectId'
|
|
31146
|
+
editable: false
|
|
31037
31147
|
}]
|
|
31038
31148
|
};
|
|
31039
31149
|
}, [apiInterface, t]);
|
|
@@ -31405,9 +31515,6 @@ function SeriesSelector$1(_ref) {
|
|
|
31405
31515
|
var _useTranslation = useTranslation(),
|
|
31406
31516
|
t = _useTranslation.t,
|
|
31407
31517
|
i18n = _useTranslation.i18n;
|
|
31408
|
-
useEffect(function () {
|
|
31409
|
-
setSelectedSerie(undefined);
|
|
31410
|
-
}, [packageId]);
|
|
31411
31518
|
return /*#__PURE__*/jsx(SimpleSelect, {
|
|
31412
31519
|
apiInterface: {
|
|
31413
31520
|
read: enricherService + '/packages/' + packageId + '/' + dataSet + "/series?fields=seriesName[".concat(i18n.language.toLocaleUpperCase(), "];_id;serieNo").concat(additionalFields ? ";".concat(additionalFields.join(';')) : '')
|
|
@@ -31426,7 +31533,7 @@ function SeriesSelector$1(_ref) {
|
|
|
31426
31533
|
style: {
|
|
31427
31534
|
width: 200
|
|
31428
31535
|
}
|
|
31429
|
-
}
|
|
31536
|
+
});
|
|
31430
31537
|
}
|
|
31431
31538
|
|
|
31432
31539
|
function FeatureSelector$1(_ref) {
|
|
@@ -31438,9 +31545,6 @@ function FeatureSelector$1(_ref) {
|
|
|
31438
31545
|
var _useTranslation = useTranslation(),
|
|
31439
31546
|
t = _useTranslation.t,
|
|
31440
31547
|
i18n = _useTranslation.i18n;
|
|
31441
|
-
useEffect(function () {
|
|
31442
|
-
setSelectedFeature(undefined);
|
|
31443
|
-
}, [packageId]);
|
|
31444
31548
|
return /*#__PURE__*/jsx(SimpleSelect, {
|
|
31445
31549
|
apiInterface: {
|
|
31446
31550
|
read: enricherService + '/packages/' + packageId + '/' + dataSet + "/features?fields=featureText[".concat(i18n.language.toLocaleUpperCase(), "];featureNo;_id")
|
|
@@ -31459,7 +31563,7 @@ function FeatureSelector$1(_ref) {
|
|
|
31459
31563
|
style: {
|
|
31460
31564
|
width: 200
|
|
31461
31565
|
}
|
|
31462
|
-
}
|
|
31566
|
+
});
|
|
31463
31567
|
}
|
|
31464
31568
|
|
|
31465
31569
|
function useConfiguration (configuration) {
|
|
@@ -31789,8 +31893,7 @@ var config = {
|
|
|
31789
31893
|
}, {
|
|
31790
31894
|
field: 'purchaseRetailId',
|
|
31791
31895
|
headerName: 'backoffice.idmEnricher.exclusivity.label.purchaseRetailId',
|
|
31792
|
-
editable: false
|
|
31793
|
-
cellDataType: 'number'
|
|
31896
|
+
editable: false
|
|
31794
31897
|
}, {
|
|
31795
31898
|
headerName: 'backoffice.idmEnricher.exclusivity.label.validFrom',
|
|
31796
31899
|
field: 'validFrom',
|
|
@@ -32929,8 +33032,7 @@ function PriceDisplayCellRenderer(props) {
|
|
|
32929
33032
|
var _colDef$field, _data$origPrices, _data$manualPrices, _currentPrice$toFixed, _origPrice$toFixed;
|
|
32930
33033
|
var value = props.value,
|
|
32931
33034
|
colDef = props.colDef,
|
|
32932
|
-
data = props.data
|
|
32933
|
-
commas = props.commas;
|
|
33035
|
+
data = props.data;
|
|
32934
33036
|
var priceGroup = colDef === null || colDef === void 0 || (_colDef$field = colDef.field) === null || _colDef$field === void 0 ? void 0 : _colDef$field.split('.')[1];
|
|
32935
33037
|
var origPrice = priceGroup ? data === null || data === void 0 || (_data$origPrices = data.origPrices) === null || _data$origPrices === void 0 ? void 0 : _data$origPrices[priceGroup] : undefined;
|
|
32936
33038
|
var currentPrice = value !== null && value !== void 0 ? value : undefined;
|
|
@@ -32940,10 +33042,10 @@ function PriceDisplayCellRenderer(props) {
|
|
|
32940
33042
|
className: container$2,
|
|
32941
33043
|
children: [/*#__PURE__*/jsxs("span", {
|
|
32942
33044
|
className: classnames(price, _defineProperty({}, priceManual, isManualPrice)),
|
|
32943
|
-
children: [(_currentPrice$toFixed = currentPrice === null || currentPrice === void 0 ? void 0 : currentPrice.toFixed(
|
|
33045
|
+
children: [(_currentPrice$toFixed = currentPrice === null || currentPrice === void 0 ? void 0 : currentPrice.toFixed(2)) !== null && _currentPrice$toFixed !== void 0 ? _currentPrice$toFixed : '-', isManualPrice && ' *']
|
|
32944
33046
|
}), /*#__PURE__*/jsxs("span", {
|
|
32945
33047
|
className: originalPrice,
|
|
32946
|
-
children: ["(", (_origPrice$toFixed = origPrice === null || origPrice === void 0 ? void 0 : origPrice.toFixed(
|
|
33048
|
+
children: ["(", (_origPrice$toFixed = origPrice === null || origPrice === void 0 ? void 0 : origPrice.toFixed(2)) !== null && _origPrice$toFixed !== void 0 ? _origPrice$toFixed : '-', ")"]
|
|
32947
33049
|
}), /*#__PURE__*/jsx("span", {
|
|
32948
33050
|
className: classnames(difference, _defineProperty(_defineProperty(_defineProperty({}, differencePositive, diffPercentage !== undefined && diffPercentage > 0), differenceNegative, diffPercentage !== undefined && diffPercentage < 0), differenceNeutral, diffPercentage === undefined || diffPercentage === 0)),
|
|
32949
33051
|
children: diffPercentage !== undefined ? /*#__PURE__*/jsxs(Fragment, {
|
|
@@ -33034,95 +33136,27 @@ function Prices (_ref) {
|
|
|
33034
33136
|
var _useTranslation = useTranslation(),
|
|
33035
33137
|
t = _useTranslation.t;
|
|
33036
33138
|
var updatePgPriceFactor = useCallback(function (priceFeatureGroupItem, value) {
|
|
33139
|
+
var _pricelist$pgPricefac;
|
|
33037
33140
|
if (!selectedSerie) return;
|
|
33038
|
-
|
|
33039
|
-
// Create copies of the objects to modify
|
|
33040
|
-
var newFactors = _objectSpread$a({}, pricelist.pgPricefactors);
|
|
33041
|
-
var serieFactors = _objectSpread$a({}, newFactors[selectedSerie.serieNo]);
|
|
33042
|
-
if (value.length === 0) {
|
|
33043
|
-
// Remove the empty price feature group
|
|
33044
|
-
delete serieFactors[priceFeatureGroupItem];
|
|
33045
|
-
|
|
33046
|
-
// If serie factors is now empty, remove the entire serie entry
|
|
33047
|
-
if (Object.keys(serieFactors).length === 0) {
|
|
33048
|
-
delete newFactors[selectedSerie.serieNo];
|
|
33049
|
-
} else {
|
|
33050
|
-
newFactors[selectedSerie.serieNo] = serieFactors;
|
|
33051
|
-
}
|
|
33052
|
-
|
|
33053
|
-
// If no more series exist, set pgPricefactors to undefined
|
|
33054
|
-
if (Object.keys(newFactors).length === 0) {
|
|
33055
|
-
setNodeDataValue({
|
|
33056
|
-
pgPricefactors: undefined
|
|
33057
|
-
});
|
|
33058
|
-
return;
|
|
33059
|
-
}
|
|
33060
|
-
} else {
|
|
33061
|
-
// Add/update the value
|
|
33062
|
-
serieFactors[priceFeatureGroupItem] = value;
|
|
33063
|
-
newFactors[selectedSerie.serieNo] = serieFactors;
|
|
33064
|
-
}
|
|
33141
|
+
var newFactors = _objectSpread$a(_objectSpread$a({}, pricelist.pgPricefactors), {}, _defineProperty({}, selectedSerie.serieNo, _objectSpread$a(_objectSpread$a({}, (_pricelist$pgPricefac = pricelist.pgPricefactors) === null || _pricelist$pgPricefac === void 0 ? void 0 : _pricelist$pgPricefac[selectedSerie.serieNo]), {}, _defineProperty({}, priceFeatureGroupItem, value))));
|
|
33065
33142
|
setNodeDataValue({
|
|
33066
33143
|
pgPricefactors: newFactors
|
|
33067
33144
|
});
|
|
33068
33145
|
}, [pricelist, selectedSerie, setNodeDataValue]);
|
|
33069
33146
|
var updateArticlePriceFactor = useCallback(function (typeNo, value) {
|
|
33147
|
+
var _pricelist$articlePri;
|
|
33070
33148
|
if (!selectedSerie) return;
|
|
33071
|
-
|
|
33072
|
-
// Create copies of the objects to modify
|
|
33073
|
-
var newFactors = _objectSpread$a({}, pricelist.articlePricefactors);
|
|
33074
|
-
var serieFactors = _objectSpread$a({}, newFactors[selectedSerie.serieNo]);
|
|
33075
|
-
if (value.length === 0) {
|
|
33076
|
-
// Remove the empty article price factor
|
|
33077
|
-
delete serieFactors[typeNo];
|
|
33078
|
-
|
|
33079
|
-
// If serie factors is now empty, remove the entire serie entry
|
|
33080
|
-
if (Object.keys(serieFactors).length === 0) {
|
|
33081
|
-
delete newFactors[selectedSerie.serieNo];
|
|
33082
|
-
} else {
|
|
33083
|
-
newFactors[selectedSerie.serieNo] = serieFactors;
|
|
33084
|
-
}
|
|
33085
|
-
|
|
33086
|
-
// If no more series exist, set articlePricefactors to undefined
|
|
33087
|
-
if (Object.keys(newFactors).length === 0) {
|
|
33088
|
-
setNodeDataValue({
|
|
33089
|
-
articlePricefactors: undefined
|
|
33090
|
-
});
|
|
33091
|
-
return;
|
|
33092
|
-
}
|
|
33093
|
-
} else {
|
|
33094
|
-
// Add/update the value
|
|
33095
|
-
serieFactors[typeNo] = value;
|
|
33096
|
-
newFactors[selectedSerie.serieNo] = serieFactors;
|
|
33097
|
-
}
|
|
33149
|
+
var newFactors = _objectSpread$a(_objectSpread$a({}, pricelist.articlePricefactors), {}, _defineProperty({}, selectedSerie.serieNo, _objectSpread$a(_objectSpread$a({}, (_pricelist$articlePri = pricelist.articlePricefactors) === null || _pricelist$articlePri === void 0 ? void 0 : _pricelist$articlePri[selectedSerie.serieNo]), {}, _defineProperty({}, typeNo, value))));
|
|
33098
33150
|
setNodeDataValue({
|
|
33099
33151
|
articlePricefactors: newFactors
|
|
33100
33152
|
});
|
|
33101
33153
|
}, [pricelist, selectedSerie, setNodeDataValue]);
|
|
33102
33154
|
var updateSeriePriceFactor = useCallback(function (value) {
|
|
33103
33155
|
if (!selectedSerie) return;
|
|
33104
|
-
|
|
33105
|
-
// Create a copy of the object to modify
|
|
33106
|
-
var newFactors = _objectSpread$a({}, pricelist.seriePricefactors);
|
|
33107
|
-
if (value.length === 0) {
|
|
33108
|
-
// Remove the empty serie price factor
|
|
33109
|
-
delete newFactors[selectedSerie.serieNo];
|
|
33110
|
-
|
|
33111
|
-
// If no more series exist, set seriePricefactors to undefined
|
|
33112
|
-
if (Object.keys(newFactors).length === 0) {
|
|
33113
|
-
setNodeDataValue({
|
|
33114
|
-
seriePricefactors: undefined
|
|
33115
|
-
});
|
|
33116
|
-
return;
|
|
33117
|
-
}
|
|
33118
|
-
} else {
|
|
33119
|
-
// Add/update the value
|
|
33120
|
-
newFactors[selectedSerie.serieNo] = value;
|
|
33121
|
-
}
|
|
33122
33156
|
setNodeDataValue({
|
|
33123
|
-
seriePricefactors:
|
|
33157
|
+
seriePricefactors: _defineProperty({}, selectedSerie.serieNo, value)
|
|
33124
33158
|
});
|
|
33125
|
-
}, [
|
|
33159
|
+
}, [selectedSerie, setNodeDataValue]);
|
|
33126
33160
|
var applicationData = useMemo(function () {
|
|
33127
33161
|
return {
|
|
33128
33162
|
organizationId: organizationId,
|
|
@@ -33130,7 +33164,7 @@ function Prices (_ref) {
|
|
|
33130
33164
|
pricelistId: pricelist._id,
|
|
33131
33165
|
serieNo: selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie.serieNo
|
|
33132
33166
|
};
|
|
33133
|
-
}, [organizationId, packageId, selectedSerie
|
|
33167
|
+
}, [organizationId, packageId, selectedSerie]);
|
|
33134
33168
|
var apiInterface = useMemo(function () {
|
|
33135
33169
|
return {
|
|
33136
33170
|
read: apiConfig.enricherService + '/packages/${packageId}/pricelists/${pricelistId}/serie/${serieNo}/prices',
|
|
@@ -33164,10 +33198,10 @@ function Prices (_ref) {
|
|
|
33164
33198
|
cellDataType: 'number',
|
|
33165
33199
|
cellRenderer: PriceFactorCellRenderer,
|
|
33166
33200
|
valueGetter: function valueGetter(_ref2) {
|
|
33167
|
-
var _pricelist$
|
|
33201
|
+
var _pricelist$articlePri2;
|
|
33168
33202
|
var data = _ref2.data;
|
|
33169
33203
|
if (!data) return;
|
|
33170
|
-
return (_pricelist$
|
|
33204
|
+
return (_pricelist$articlePri2 = pricelist.articlePricefactors) === null || _pricelist$articlePri2 === void 0 || (_pricelist$articlePri2 = _pricelist$articlePri2[selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie.serieNo]) === null || _pricelist$articlePri2 === void 0 ? void 0 : _pricelist$articlePri2[data.typeNo];
|
|
33171
33205
|
},
|
|
33172
33206
|
cellRendererParams: {
|
|
33173
33207
|
onSave: function () {
|
|
@@ -33195,7 +33229,7 @@ function Prices (_ref) {
|
|
|
33195
33229
|
headerName: priceFeatureGroup.displayText,
|
|
33196
33230
|
marryChildren: true,
|
|
33197
33231
|
children: _toConsumableArray((_priceFeatureGroup$ke = (_priceFeatureGroup$ke2 = priceFeatureGroup.keys) === null || _priceFeatureGroup$ke2 === void 0 ? void 0 : _priceFeatureGroup$ke2.map(function (priceFeatureGroupItem, j) {
|
|
33198
|
-
var _priceFeatureGroup$ke3, _pricelist$
|
|
33232
|
+
var _priceFeatureGroup$ke3, _pricelist$pgPricefac2;
|
|
33199
33233
|
return {
|
|
33200
33234
|
headerName: priceFeatureGroupItem,
|
|
33201
33235
|
field: "prices.".concat(priceFeatureGroupItem),
|
|
@@ -33204,9 +33238,6 @@ function Prices (_ref) {
|
|
|
33204
33238
|
cellDataType: 'number',
|
|
33205
33239
|
headerTooltip: (_priceFeatureGroup$ke3 = priceFeatureGroup.keysDisplayTexts) === null || _priceFeatureGroup$ke3 === void 0 ? void 0 : _priceFeatureGroup$ke3[j],
|
|
33206
33240
|
cellRenderer: PriceDisplayCellRenderer,
|
|
33207
|
-
cellRendererParams: {
|
|
33208
|
-
commas: pricelist.commas
|
|
33209
|
-
},
|
|
33210
33241
|
additionalFields: ["origPrices.".concat(priceFeatureGroupItem)],
|
|
33211
33242
|
headerClass: inputHeader,
|
|
33212
33243
|
headerComponentParams: {
|
|
@@ -33227,7 +33258,7 @@ function Prices (_ref) {
|
|
|
33227
33258
|
return _ref3.apply(this, arguments);
|
|
33228
33259
|
};
|
|
33229
33260
|
}()),
|
|
33230
|
-
value: (_pricelist$
|
|
33261
|
+
value: (_pricelist$pgPricefac2 = pricelist.pgPricefactors) === null || _pricelist$pgPricefac2 === void 0 || (_pricelist$pgPricefac2 = _pricelist$pgPricefac2[selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie.serieNo]) === null || _pricelist$pgPricefac2 === void 0 ? void 0 : _pricelist$pgPricefac2[priceFeatureGroupItem],
|
|
33231
33262
|
className: factorInput,
|
|
33232
33263
|
tooltip: t('backoffice.idmCatalog.prices.priceFactor.label.pfg')
|
|
33233
33264
|
})
|
|
@@ -33276,8 +33307,7 @@ function Prices (_ref) {
|
|
|
33276
33307
|
}, {
|
|
33277
33308
|
headerName: 'backoffice.idmEnricher.general.label._id',
|
|
33278
33309
|
field: '_id',
|
|
33279
|
-
editable: false
|
|
33280
|
-
cellDataType: 'objectId'
|
|
33310
|
+
editable: false
|
|
33281
33311
|
}])
|
|
33282
33312
|
};
|
|
33283
33313
|
}, [apiInterface, selectedSerie, pricelist, priceFeatureGroups]);
|
|
@@ -33409,18 +33439,6 @@ function TablePriceList () {
|
|
|
33409
33439
|
}
|
|
33410
33440
|
};
|
|
33411
33441
|
}, [selectedNodeId]);
|
|
33412
|
-
var roundingOptions = useMemo(function () {
|
|
33413
|
-
return [{
|
|
33414
|
-
name: t('backoffice.idmEnricher.pricelists.rounding.r1'),
|
|
33415
|
-
value: 1
|
|
33416
|
-
}, {
|
|
33417
|
-
name: t('backoffice.idmEnricher.pricelists.rounding.r2'),
|
|
33418
|
-
value: 2
|
|
33419
|
-
}, {
|
|
33420
|
-
name: t('backoffice.idmEnricher.pricelists.rounding.r3'),
|
|
33421
|
-
value: 3
|
|
33422
|
-
}];
|
|
33423
|
-
}, []);
|
|
33424
33442
|
var configuration = useMemo(function () {
|
|
33425
33443
|
return {
|
|
33426
33444
|
type: 'dotnetSSM',
|
|
@@ -33464,11 +33482,7 @@ function TablePriceList () {
|
|
|
33464
33482
|
headerName: 'backoffice.idmEnricher.pricelists.label.rounding',
|
|
33465
33483
|
field: 'rounding',
|
|
33466
33484
|
editable: true,
|
|
33467
|
-
cellDataType: '
|
|
33468
|
-
customParams: {
|
|
33469
|
-
enumData: roundingOptions,
|
|
33470
|
-
displayLabelTemplate: '${name} (${value})'
|
|
33471
|
-
}
|
|
33485
|
+
cellDataType: 'number'
|
|
33472
33486
|
}, {
|
|
33473
33487
|
headerName: 'backoffice.idmEnricher.pricelists.label.commas',
|
|
33474
33488
|
field: 'commas',
|
|
@@ -33661,77 +33675,30 @@ function UploadButton (_ref) {
|
|
|
33661
33675
|
title = _ref.title,
|
|
33662
33676
|
disabled = _ref.disabled,
|
|
33663
33677
|
contentType = _ref.contentType,
|
|
33664
|
-
setProgress = _ref.setProgress
|
|
33665
|
-
setFileList = _ref.setFileList,
|
|
33666
|
-
fileList = _ref.fileList,
|
|
33667
|
-
progress = _ref.progress;
|
|
33678
|
+
setProgress = _ref.setProgress;
|
|
33668
33679
|
var _useTranslation = useTranslation(),
|
|
33669
33680
|
t = _useTranslation.t;
|
|
33670
33681
|
var root = useStore();
|
|
33671
|
-
var
|
|
33682
|
+
var _useState = useState([]),
|
|
33683
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
33684
|
+
fileList = _useState2[0],
|
|
33685
|
+
setFileList = _useState2[1];
|
|
33672
33686
|
var handleUploadChange = function handleUploadChange(info) {
|
|
33673
33687
|
var status = info.file.status;
|
|
33674
33688
|
if (status === 'done') {
|
|
33675
|
-
|
|
33676
|
-
|
|
33677
|
-
|
|
33678
|
-
clearInterval(ref.current.interval);
|
|
33679
|
-
ref.current = undefined;
|
|
33680
|
-
}
|
|
33681
|
-
if (info.fileList[0]) {
|
|
33682
|
-
info.fileList[0].percent = 100;
|
|
33683
|
-
}
|
|
33689
|
+
message.success("".concat(info.file.name, " file uploaded successfully."));
|
|
33690
|
+
setFileList([]); // Clear the file list
|
|
33691
|
+
setProgress('SUCCESS'); // Mark upload as successful
|
|
33684
33692
|
} else if (status === 'error') {
|
|
33685
|
-
|
|
33686
|
-
|
|
33687
|
-
clearInterval(ref.current.interval);
|
|
33688
|
-
ref.current = undefined;
|
|
33689
|
-
}
|
|
33690
|
-
if (info.fileList[0]) {
|
|
33691
|
-
info.fileList[0].percent = 100;
|
|
33692
|
-
}
|
|
33693
|
+
message.error("".concat(info.file.name, " file upload failed."));
|
|
33694
|
+
setProgress('ERROR'); // Mark upload as failed
|
|
33693
33695
|
} else if (status === 'removed') {
|
|
33694
|
-
setFileList([]);
|
|
33695
|
-
setProgress(undefined);
|
|
33696
|
-
if (ref.current) {
|
|
33697
|
-
clearInterval(ref.current.interval);
|
|
33698
|
-
ref.current = undefined;
|
|
33699
|
-
}
|
|
33696
|
+
setFileList([]); // Clear the file list
|
|
33697
|
+
setProgress(undefined); // Reset the progress state
|
|
33700
33698
|
} else {
|
|
33701
|
-
setProgress('INPROGRESS');
|
|
33702
|
-
|
|
33703
|
-
var file = info.fileList[0];
|
|
33704
|
-
if (status === 'uploading') {
|
|
33705
|
-
// First 50%, the file is still uploading to browser
|
|
33706
|
-
file.percent = (file.percent || 0) / 2;
|
|
33707
|
-
if (file.percent === 50) {
|
|
33708
|
-
// Calculate size-based progress for the second 50%
|
|
33709
|
-
if (file.size) {
|
|
33710
|
-
var _ref$current$startTim, _ref$current, _ref$current$interval, _ref$current2;
|
|
33711
|
-
var fileSize = file.size;
|
|
33712
|
-
var startTime = (_ref$current$startTim = (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.startTime) !== null && _ref$current$startTim !== void 0 ? _ref$current$startTim : Date.now();
|
|
33713
|
-
var interval = (_ref$current$interval = (_ref$current2 = ref.current) === null || _ref$current2 === void 0 ? void 0 : _ref$current2.interval) !== null && _ref$current$interval !== void 0 ? _ref$current$interval : setInterval(function () {
|
|
33714
|
-
// Assume 1MB takes about 4 seconds to upload
|
|
33715
|
-
var estimatedTimeInSeconds = fileSize / (1024 * 1024) * 4;
|
|
33716
|
-
var elapsedTime = (Date.now() - startTime) / 1000;
|
|
33717
|
-
// Calculate progress for the second 50%
|
|
33718
|
-
var sizeBasedProgress = Math.min(50 * (elapsedTime / estimatedTimeInSeconds), 49);
|
|
33719
|
-
// Combine both progress values, ensuring we don't exceed 99
|
|
33720
|
-
file.percent = Math.min(50 + sizeBasedProgress, 99);
|
|
33721
|
-
setFileList(_toConsumableArray(info.fileList));
|
|
33722
|
-
}, 10);
|
|
33723
|
-
ref.current = {
|
|
33724
|
-
startTime: startTime,
|
|
33725
|
-
interval: interval
|
|
33726
|
-
};
|
|
33727
|
-
}
|
|
33728
|
-
}
|
|
33729
|
-
} else {
|
|
33730
|
-
file.percent = 100; // Set to 100 if not uploading
|
|
33731
|
-
}
|
|
33732
|
-
}
|
|
33699
|
+
setProgress('INPROGRESS'); // Mark upload as in progress
|
|
33700
|
+
setFileList(info.fileList); // Update the file list during the upload
|
|
33733
33701
|
}
|
|
33734
|
-
setFileList(info.fileList);
|
|
33735
33702
|
};
|
|
33736
33703
|
var props = {
|
|
33737
33704
|
name: 'file',
|
|
@@ -33746,7 +33713,7 @@ function UploadButton (_ref) {
|
|
|
33746
33713
|
};
|
|
33747
33714
|
return /*#__PURE__*/jsx(Fragment, {
|
|
33748
33715
|
children: /*#__PURE__*/jsx(Upload$2, _objectSpread$9(_objectSpread$9({}, props), {}, {
|
|
33749
|
-
children:
|
|
33716
|
+
children: /*#__PURE__*/jsx(Button$1, {
|
|
33750
33717
|
icon: /*#__PURE__*/jsx(UploadOutlined$1, {}),
|
|
33751
33718
|
disabled: disabled,
|
|
33752
33719
|
children: title !== null && title !== void 0 ? title : t('backoffice.idmEnricher.import.upload')
|
|
@@ -33759,18 +33726,19 @@ function IDMImportForm (_ref) {
|
|
|
33759
33726
|
var idmService = _ref.idmService,
|
|
33760
33727
|
organizationId = _ref.organizationId,
|
|
33761
33728
|
setProgress = _ref.setProgress,
|
|
33762
|
-
progress = _ref.progress
|
|
33763
|
-
name = _ref.name,
|
|
33764
|
-
setName = _ref.setName,
|
|
33765
|
-
setFileList = _ref.setFileList,
|
|
33766
|
-
fileList = _ref.fileList;
|
|
33729
|
+
progress = _ref.progress;
|
|
33767
33730
|
var _useTranslation = useTranslation(),
|
|
33768
33731
|
t = _useTranslation.t;
|
|
33732
|
+
var _useState = useState(''),
|
|
33733
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
33734
|
+
name = _useState2[0],
|
|
33735
|
+
setName = _useState2[1];
|
|
33769
33736
|
var uploadAction = "".concat(idmService, "/v3.0/catalogs/upload?organizationId=").concat(organizationId, "&name=").concat(encodeURIComponent(name));
|
|
33770
33737
|
return /*#__PURE__*/jsxs(Form$1, {
|
|
33771
33738
|
name: "basic",
|
|
33772
33739
|
children: [/*#__PURE__*/jsx(Form$1.Item, {
|
|
33773
33740
|
label: "Name",
|
|
33741
|
+
name: "name",
|
|
33774
33742
|
rules: [{
|
|
33775
33743
|
required: true,
|
|
33776
33744
|
message: t('backoffice.idmEnricher.import.namerequired')
|
|
@@ -33779,18 +33747,14 @@ function IDMImportForm (_ref) {
|
|
|
33779
33747
|
onChange: function onChange(e) {
|
|
33780
33748
|
return setName(e.target.value);
|
|
33781
33749
|
},
|
|
33782
|
-
value: name
|
|
33783
|
-
disabled: progress === 'INPROGRESS' || progress === 'SUCCESS'
|
|
33750
|
+
value: name
|
|
33784
33751
|
})
|
|
33785
33752
|
}), /*#__PURE__*/jsx(Form$1.Item, {
|
|
33786
33753
|
children: /*#__PURE__*/jsx(UploadButton, {
|
|
33787
33754
|
action: uploadAction,
|
|
33788
33755
|
contentType: "multipart/form-data",
|
|
33789
33756
|
setProgress: setProgress,
|
|
33790
|
-
|
|
33791
|
-
disabled: !name.trim() || progress === 'INPROGRESS',
|
|
33792
|
-
setFileList: setFileList,
|
|
33793
|
-
fileList: fileList
|
|
33757
|
+
disabled: !name.trim()
|
|
33794
33758
|
})
|
|
33795
33759
|
}), /*#__PURE__*/jsxs(Form$1.Item, {
|
|
33796
33760
|
style: {
|
|
@@ -33825,28 +33789,17 @@ function OpenModalButton (_ref) {
|
|
|
33825
33789
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
33826
33790
|
progress = _useState4[0],
|
|
33827
33791
|
setProgress = _useState4[1];
|
|
33828
|
-
var _useState5 = useState(''),
|
|
33829
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
33830
|
-
name = _useState6[0],
|
|
33831
|
-
setName = _useState6[1];
|
|
33832
|
-
var _useState7 = useState([]),
|
|
33833
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
33834
|
-
fileList = _useState8[0],
|
|
33835
|
-
setFileList = _useState8[1];
|
|
33836
33792
|
var showModal = function showModal() {
|
|
33837
33793
|
setIsModalOpen(true);
|
|
33838
33794
|
};
|
|
33839
|
-
var resetProgress = function resetProgress() {
|
|
33840
|
-
setProgress(undefined);
|
|
33841
|
-
setName('');
|
|
33842
|
-
setFileList([]);
|
|
33843
|
-
};
|
|
33844
33795
|
var handleOk = function handleOk() {
|
|
33845
33796
|
setIsModalOpen(false);
|
|
33846
|
-
resetProgress();
|
|
33847
33797
|
onClose();
|
|
33848
33798
|
};
|
|
33849
|
-
var
|
|
33799
|
+
var handleCancel = function handleCancel() {
|
|
33800
|
+
setIsModalOpen(false);
|
|
33801
|
+
onClose();
|
|
33802
|
+
};
|
|
33850
33803
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
33851
33804
|
children: [/*#__PURE__*/jsx(Button$1, {
|
|
33852
33805
|
type: "primary",
|
|
@@ -33856,30 +33809,15 @@ function OpenModalButton (_ref) {
|
|
|
33856
33809
|
title: title,
|
|
33857
33810
|
open: isModalOpen,
|
|
33858
33811
|
onOk: handleOk,
|
|
33859
|
-
onCancel:
|
|
33860
|
-
|
|
33861
|
-
style: {
|
|
33862
|
-
display: 'none'
|
|
33863
|
-
}
|
|
33864
|
-
} : {
|
|
33865
|
-
onClick: resetProgress
|
|
33866
|
-
},
|
|
33867
|
-
closable: progress !== 'INPROGRESS',
|
|
33868
|
-
maskClosable: progress !== 'INPROGRESS',
|
|
33869
|
-
okText: buttonText,
|
|
33870
|
-
cancelText: progress === 'SUCCESS' ? t('backoffice.idmEnricher.import.new') : undefined,
|
|
33812
|
+
onCancel: handleCancel,
|
|
33813
|
+
okText: progress === 'INPROGRESS' ? t('backoffice.idmEnricher.import.inprogress') : 'OK',
|
|
33871
33814
|
okButtonProps: {
|
|
33872
33815
|
disabled: progress === 'INPROGRESS'
|
|
33873
33816
|
} // Disable the button if progress is 'INPROGRESS'
|
|
33874
33817
|
,
|
|
33875
|
-
destroyOnClose: true,
|
|
33876
33818
|
children: type === 'IDM_IMPORT' && /*#__PURE__*/jsx(IDMImportForm, {
|
|
33877
33819
|
setProgress: setProgress,
|
|
33878
33820
|
progress: progress,
|
|
33879
|
-
name: name,
|
|
33880
|
-
setName: setName,
|
|
33881
|
-
setFileList: setFileList,
|
|
33882
|
-
fileList: fileList,
|
|
33883
33821
|
idmService: idmService,
|
|
33884
33822
|
organizationId: organizationId
|
|
33885
33823
|
})
|
|
@@ -34045,13 +33983,13 @@ function TableCatalogs () {
|
|
|
34045
33983
|
value: 1000000000
|
|
34046
33984
|
}];
|
|
34047
33985
|
var roundingType = [{
|
|
34048
|
-
name: t('backoffice.idmCatalog.general.label.
|
|
33986
|
+
name: t('backoffice.idmCatalog.general.label.roundingType.r1'),
|
|
34049
33987
|
value: 1
|
|
34050
33988
|
}, {
|
|
34051
|
-
name: t('backoffice.idmCatalog.general.label.
|
|
33989
|
+
name: t('backoffice.idmCatalog.general.label.roundingType.r2'),
|
|
34052
33990
|
value: 2
|
|
34053
33991
|
}, {
|
|
34054
|
-
name: t('backoffice.idmCatalog.general.label.
|
|
33992
|
+
name: t('backoffice.idmCatalog.general.label.roundingType.r3'),
|
|
34055
33993
|
value: 3
|
|
34056
33994
|
}];
|
|
34057
33995
|
return {
|
|
@@ -34198,13 +34136,13 @@ function TableCatalogs () {
|
|
|
34198
34136
|
}]
|
|
34199
34137
|
}, {
|
|
34200
34138
|
headerName: 'backoffice.idmCatalog.general.label.fallbackLanguage',
|
|
34201
|
-
field: '
|
|
34139
|
+
field: 'fallbackLanguage',
|
|
34202
34140
|
cellDataType: 'enum',
|
|
34203
34141
|
editable: true,
|
|
34204
34142
|
required: true,
|
|
34205
34143
|
customParams: {
|
|
34206
34144
|
enumData: ['DE', 'EN', 'FR', 'IT'],
|
|
34207
|
-
multiple:
|
|
34145
|
+
multiple: true
|
|
34208
34146
|
},
|
|
34209
34147
|
defaultValue: 'DE'
|
|
34210
34148
|
}]
|
|
@@ -34281,11 +34219,11 @@ function TableCatalogs () {
|
|
|
34281
34219
|
regex: '[0-9a-zA-Z]{0,10}'
|
|
34282
34220
|
}, {
|
|
34283
34221
|
headerName: 'backoffice.idmCatalog.general.label.telephone',
|
|
34284
|
-
field: '
|
|
34222
|
+
field: 'telephoneSwitchBoard',
|
|
34285
34223
|
required: true
|
|
34286
34224
|
}, {
|
|
34287
34225
|
headerName: 'backoffice.idmCatalog.general.label.faxSwitchBoard',
|
|
34288
|
-
field: '
|
|
34226
|
+
field: 'faxSwitchBoard',
|
|
34289
34227
|
required: true
|
|
34290
34228
|
}]
|
|
34291
34229
|
}, {
|
|
@@ -34350,7 +34288,7 @@ function TableCatalogs () {
|
|
|
34350
34288
|
headerName: 'backoffice.idmCatalog.general.label.contact2',
|
|
34351
34289
|
children: [{
|
|
34352
34290
|
headerName: 'backoffice.idmCatalog.general.label.contactPersonNo',
|
|
34353
|
-
field: '
|
|
34291
|
+
field: 'contactPersonNo1'
|
|
34354
34292
|
}, {
|
|
34355
34293
|
headerName: 'backoffice.idmCatalog.general.label.contactName',
|
|
34356
34294
|
field: 'contactName2'
|
|
@@ -34605,9 +34543,6 @@ function SeriesSelector(_ref) {
|
|
|
34605
34543
|
var _useTranslation = useTranslation(),
|
|
34606
34544
|
t = _useTranslation.t,
|
|
34607
34545
|
i18n = _useTranslation.i18n;
|
|
34608
|
-
useEffect(function () {
|
|
34609
|
-
setSelectedSerie(undefined);
|
|
34610
|
-
}, [catalogId]);
|
|
34611
34546
|
return /*#__PURE__*/jsx(SimpleSelect, {
|
|
34612
34547
|
apiInterface: {
|
|
34613
34548
|
read: idmService + '/v3.0/catalogs/' + catalogId + "/series?fields=seriesName[".concat(i18n.language.toLocaleUpperCase(), "];_id;serieNo").concat(additionalFields ? ";".concat(additionalFields.join(';')) : '')
|
|
@@ -34902,6 +34837,11 @@ function Items(_ref) {
|
|
|
34902
34837
|
field: 'typeNo',
|
|
34903
34838
|
required: true,
|
|
34904
34839
|
unique: true
|
|
34840
|
+
}, {
|
|
34841
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.priceTypeRef',
|
|
34842
|
+
field: 'priceTypeRef',
|
|
34843
|
+
cellDataType: 'number',
|
|
34844
|
+
required: true
|
|
34905
34845
|
}, {
|
|
34906
34846
|
headerName: 'backoffice.idmCatalogEditor.general.label.sequenceNo',
|
|
34907
34847
|
field: 'sequenceNo',
|
|
@@ -35010,9 +34950,11 @@ function Items(_ref) {
|
|
|
35010
34950
|
field: 'partListRef',
|
|
35011
34951
|
cellDataType: 'lookup',
|
|
35012
34952
|
customParams: {
|
|
34953
|
+
nameField: 'partListRef',
|
|
35013
34954
|
apiInterface: {
|
|
35014
34955
|
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/partlists'
|
|
35015
34956
|
},
|
|
34957
|
+
lookupValue: 'partlistKey',
|
|
35016
34958
|
lookupKey: 'partlistKey'
|
|
35017
34959
|
}
|
|
35018
34960
|
}, {
|
|
@@ -35131,13 +35073,6 @@ function Items(_ref) {
|
|
|
35131
35073
|
headerName: 'backoffice.idmCatalog.general.label.lastUpdatedByDisplayText',
|
|
35132
35074
|
field: 'lastUpdatedByDisplayText',
|
|
35133
35075
|
editable: false
|
|
35134
|
-
}, {
|
|
35135
|
-
field: 'priceTypeRef',
|
|
35136
|
-
defaultValue: 1,
|
|
35137
|
-
editable: false,
|
|
35138
|
-
hide: true,
|
|
35139
|
-
lockVisible: true,
|
|
35140
|
-
suppressColumnsToolPanel: true
|
|
35141
35076
|
}]
|
|
35142
35077
|
};
|
|
35143
35078
|
}, []);
|
|
@@ -35383,7 +35318,6 @@ function TableSeries () {
|
|
|
35383
35318
|
}, {
|
|
35384
35319
|
headerName: 'backoffice.idmCatalog.general.label._id',
|
|
35385
35320
|
field: '_id',
|
|
35386
|
-
cellDataType: 'objectId',
|
|
35387
35321
|
editable: false
|
|
35388
35322
|
}, {
|
|
35389
35323
|
field: 'organizationId',
|
|
@@ -35542,8 +35476,7 @@ function Options(_ref) {
|
|
|
35542
35476
|
headerName: 'backoffice.idmCatalog.options.label.measurement',
|
|
35543
35477
|
children: [{
|
|
35544
35478
|
headerName: 'backoffice.idmCatalog.options.label.measureNo',
|
|
35545
|
-
field: 'measureNo'
|
|
35546
|
-
cellDataType: 'number'
|
|
35479
|
+
field: 'measureNo'
|
|
35547
35480
|
}, {
|
|
35548
35481
|
headerName: 'backoffice.idmCatalog.options.label.measureValue',
|
|
35549
35482
|
field: 'measureValue',
|
|
@@ -35735,8 +35668,7 @@ function Features(_ref) {
|
|
|
35735
35668
|
}, {
|
|
35736
35669
|
headerName: 'backoffice.idmCatalog.general.label._id',
|
|
35737
35670
|
field: '_id',
|
|
35738
|
-
editable: false
|
|
35739
|
-
cellDataType: 'objectId'
|
|
35671
|
+
editable: false
|
|
35740
35672
|
}, {
|
|
35741
35673
|
field: 'organizationId',
|
|
35742
35674
|
editable: false,
|
|
@@ -35846,9 +35778,6 @@ function FeatureSelector(_ref) {
|
|
|
35846
35778
|
var _useTranslation = useTranslation(),
|
|
35847
35779
|
t = _useTranslation.t,
|
|
35848
35780
|
i18n = _useTranslation.i18n;
|
|
35849
|
-
useEffect(function () {
|
|
35850
|
-
setSelectedFeature(undefined);
|
|
35851
|
-
}, [catalogId]);
|
|
35852
35781
|
return /*#__PURE__*/jsx(SimpleSelect, {
|
|
35853
35782
|
apiInterface: {
|
|
35854
35783
|
read: idmService + '/v3.0/catalogs/' + catalogId + "/features?fields=featureText[".concat(i18n.language.toLocaleUpperCase(), "];featureNo;_id")
|
|
@@ -35867,7 +35796,7 @@ function FeatureSelector(_ref) {
|
|
|
35867
35796
|
style: {
|
|
35868
35797
|
width: 200
|
|
35869
35798
|
}
|
|
35870
|
-
}
|
|
35799
|
+
});
|
|
35871
35800
|
}
|
|
35872
35801
|
|
|
35873
35802
|
function TableOptions () {
|
|
@@ -35983,8 +35912,7 @@ function TableFeatureClasses () {
|
|
|
35983
35912
|
colDef: [{
|
|
35984
35913
|
field: 'featureClassNo',
|
|
35985
35914
|
headerName: 'backoffice.idmCatalog.featureclasses.label.featureClassNo',
|
|
35986
|
-
required: true
|
|
35987
|
-
cellDataType: 'number'
|
|
35915
|
+
required: true
|
|
35988
35916
|
}, {
|
|
35989
35917
|
headerName: 'backoffice.idmCatalog.featureclasses.label.featureClassName',
|
|
35990
35918
|
marryChildren: true,
|
|
@@ -36026,8 +35954,7 @@ function TableFeatureClasses () {
|
|
|
36026
35954
|
}, {
|
|
36027
35955
|
headerName: 'backoffice.idmCatalog.general.label._id',
|
|
36028
35956
|
field: '_id',
|
|
36029
|
-
editable: false
|
|
36030
|
-
cellDataType: 'objectId'
|
|
35957
|
+
editable: false
|
|
36031
35958
|
}, {
|
|
36032
35959
|
field: 'organizationId',
|
|
36033
35960
|
editable: false,
|
|
@@ -36043,11 +35970,7 @@ function TableFeatureClasses () {
|
|
|
36043
35970
|
suppressColumnsToolPanel: true,
|
|
36044
35971
|
defaultValue: '${catalogId}'
|
|
36045
35972
|
}, {
|
|
36046
|
-
field: 'featureRefs'
|
|
36047
|
-
editable: false,
|
|
36048
|
-
hide: true,
|
|
36049
|
-
lockVisible: true,
|
|
36050
|
-
suppressColumnsToolPanel: true
|
|
35973
|
+
field: 'featureRefs'
|
|
36051
35974
|
}]
|
|
36052
35975
|
};
|
|
36053
35976
|
}, []);
|
|
@@ -36472,8 +36395,7 @@ function OptionCombinations(_ref8) {
|
|
|
36472
36395
|
}, {
|
|
36473
36396
|
headerName: 'backoffice.idmCatalog.general.label._id',
|
|
36474
36397
|
field: '_id',
|
|
36475
|
-
editable: false
|
|
36476
|
-
cellDataType: 'objectId'
|
|
36398
|
+
editable: false
|
|
36477
36399
|
}, {
|
|
36478
36400
|
field: 'organizationId',
|
|
36479
36401
|
editable: false,
|
|
@@ -36656,6 +36578,10 @@ function TableDecisions () {
|
|
|
36656
36578
|
},
|
|
36657
36579
|
lookupValue: 'featureText',
|
|
36658
36580
|
lookupKey: 'featureNo',
|
|
36581
|
+
lookupKeyFilterType: {
|
|
36582
|
+
type: 'equals',
|
|
36583
|
+
filterType: 'number'
|
|
36584
|
+
},
|
|
36659
36585
|
multiple: true,
|
|
36660
36586
|
translated: true
|
|
36661
36587
|
},
|
|
@@ -36692,8 +36618,7 @@ function TableDecisions () {
|
|
|
36692
36618
|
}, {
|
|
36693
36619
|
headerName: 'backoffice.idmCatalog.general.label._id',
|
|
36694
36620
|
field: '_id',
|
|
36695
|
-
editable: false
|
|
36696
|
-
cellDataType: 'objectId'
|
|
36621
|
+
editable: false
|
|
36697
36622
|
}, {
|
|
36698
36623
|
field: 'organizationId',
|
|
36699
36624
|
editable: false,
|
|
@@ -36972,8 +36897,7 @@ function TableDetailInfos () {
|
|
|
36972
36897
|
}, {
|
|
36973
36898
|
headerName: 'backoffice.idmCatalog.general.label._id',
|
|
36974
36899
|
field: '_id',
|
|
36975
|
-
editable: false
|
|
36976
|
-
cellDataType: 'objectId'
|
|
36900
|
+
editable: false
|
|
36977
36901
|
}, {
|
|
36978
36902
|
headerName: 'backoffice.idmCatalog.detailinfos.label.mediaItemId',
|
|
36979
36903
|
field: 'mediaItemId'
|
|
@@ -37201,8 +37125,7 @@ function PartlistPos(_ref) {
|
|
|
37201
37125
|
}, {
|
|
37202
37126
|
headerName: 'backoffice.idmCatalog.general.label._id',
|
|
37203
37127
|
field: '_id',
|
|
37204
|
-
editable: false
|
|
37205
|
-
cellDataType: 'objectId'
|
|
37128
|
+
editable: false
|
|
37206
37129
|
}, {
|
|
37207
37130
|
field: 'organizationId',
|
|
37208
37131
|
editable: false,
|
|
@@ -37327,8 +37250,7 @@ function TablePartlists () {
|
|
|
37327
37250
|
}, {
|
|
37328
37251
|
headerName: 'backoffice.idmCatalog.general.label._id',
|
|
37329
37252
|
field: '_id',
|
|
37330
|
-
editable: false
|
|
37331
|
-
cellDataType: 'objectId'
|
|
37253
|
+
editable: false
|
|
37332
37254
|
}, {
|
|
37333
37255
|
field: 'organizationId',
|
|
37334
37256
|
editable: false,
|
|
@@ -37529,8 +37451,7 @@ function PriceFeatureGroupPercentageSurcharge(_ref) {
|
|
|
37529
37451
|
}, {
|
|
37530
37452
|
headerName: 'backoffice.idmCatalog.general.label._id',
|
|
37531
37453
|
field: '_id',
|
|
37532
|
-
editable: false
|
|
37533
|
-
cellDataType: 'objectId'
|
|
37454
|
+
editable: false
|
|
37534
37455
|
}, {
|
|
37535
37456
|
field: 'organizationId',
|
|
37536
37457
|
editable: false,
|
|
@@ -37710,8 +37631,7 @@ function PriceFeatureGroupFinishes(_ref) {
|
|
|
37710
37631
|
}, {
|
|
37711
37632
|
headerName: 'backoffice.idmCatalog.general.label._id',
|
|
37712
37633
|
field: '_id',
|
|
37713
|
-
editable: false
|
|
37714
|
-
cellDataType: 'objectId'
|
|
37634
|
+
editable: false
|
|
37715
37635
|
}, {
|
|
37716
37636
|
field: 'organizationId',
|
|
37717
37637
|
editable: false,
|
|
@@ -37909,8 +37829,7 @@ function TablePriceFeatureGroups () {
|
|
|
37909
37829
|
}, {
|
|
37910
37830
|
headerName: 'backoffice.idmCatalog.general.label._id',
|
|
37911
37831
|
field: '_id',
|
|
37912
|
-
editable: false
|
|
37913
|
-
cellDataType: 'objectId'
|
|
37832
|
+
editable: false
|
|
37914
37833
|
}, {
|
|
37915
37834
|
field: 'organizationId',
|
|
37916
37835
|
editable: false,
|
|
@@ -38179,11 +38098,17 @@ function CollectionMembers(_ref) {
|
|
|
38179
38098
|
editable: true,
|
|
38180
38099
|
customParams: {
|
|
38181
38100
|
nameField: 'enricherPackageName',
|
|
38101
|
+
filterCellType: 'string',
|
|
38102
|
+
displayLabelTemplate: '${name} (${value})',
|
|
38182
38103
|
apiInterface: {
|
|
38183
38104
|
read: apiConfig.enricherService + '/packages?organizationId=${organizationId}'
|
|
38184
38105
|
},
|
|
38185
38106
|
lookupValue: 'name',
|
|
38186
38107
|
lookupKey: '_id',
|
|
38108
|
+
lookupKeyFilterType: {
|
|
38109
|
+
type: 'equals',
|
|
38110
|
+
filterType: 'string'
|
|
38111
|
+
},
|
|
38187
38112
|
multiple: false,
|
|
38188
38113
|
translated: false
|
|
38189
38114
|
},
|
|
@@ -38193,10 +38118,7 @@ function CollectionMembers(_ref) {
|
|
|
38193
38118
|
field: 'serieNos',
|
|
38194
38119
|
headerName: 'backoffice.idmCatalogEditor.collectionmembers.label.serieNos',
|
|
38195
38120
|
cellDataType: 'lookup',
|
|
38196
|
-
editable:
|
|
38197
|
-
var data = _ref2.data;
|
|
38198
|
-
return data.enricherPackageId;
|
|
38199
|
-
},
|
|
38121
|
+
editable: true,
|
|
38200
38122
|
customParams: {
|
|
38201
38123
|
nameField: 'serieNosDisplayTexts',
|
|
38202
38124
|
filterCellType: 'number',
|
|
@@ -38218,8 +38140,7 @@ function CollectionMembers(_ref) {
|
|
|
38218
38140
|
}, {
|
|
38219
38141
|
headerName: 'backoffice.idmCatalog.general.label._id',
|
|
38220
38142
|
field: '_id',
|
|
38221
|
-
editable: false
|
|
38222
|
-
cellDataType: 'objectId'
|
|
38143
|
+
editable: false
|
|
38223
38144
|
}]
|
|
38224
38145
|
};
|
|
38225
38146
|
}, [apiInterface]);
|