@crystaldesign/diva-seller 24.12.0-beta.9 → 24.13.0-beta.1
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 +547 -812
- package/build/types/seller/src/components/Analytics/Description/index.d.ts +2 -2
- package/build/types/seller/src/components/Analytics/Description/index.d.ts.map +1 -1
- package/build/types/seller/src/components/Analytics/index.d.ts +2 -1
- package/build/types/seller/src/components/Analytics/index.d.ts.map +1 -1
- package/build/types/seller/src/components/Articles/index.d.ts +2 -1
- package/build/types/seller/src/components/Articles/index.d.ts.map +1 -1
- package/build/types/seller/src/components/Basket/Step1PriceOverview.d.ts +2 -1
- package/build/types/seller/src/components/Basket/Step1PriceOverview.d.ts.map +1 -1
- package/build/types/seller/src/components/Basket/Step2ClientData.d.ts +2 -1
- package/build/types/seller/src/components/Basket/Step2ClientData.d.ts.map +1 -1
- package/build/types/seller/src/components/Basket/Step3Checkout.d.ts +2 -1
- package/build/types/seller/src/components/Basket/Step3Checkout.d.ts.map +1 -1
- package/build/types/seller/src/components/Basket/index.d.ts +2 -1
- package/build/types/seller/src/components/Basket/index.d.ts.map +1 -1
- package/build/types/seller/src/components/Basket/types.d.ts +0 -1
- package/build/types/seller/src/components/Basket/types.d.ts.map +1 -1
- package/build/types/seller/src/components/Catalogs/index.d.ts +2 -1
- package/build/types/seller/src/components/Catalogs/index.d.ts.map +1 -1
- package/build/types/seller/src/components/Collections/index.d.ts +2 -1
- package/build/types/seller/src/components/Collections/index.d.ts.map +1 -1
- package/build/types/seller/src/components/HQMedia/RenderJobDetail/SelectRenderPackage/index.d.ts +2 -1
- package/build/types/seller/src/components/HQMedia/RenderJobDetail/SelectRenderPackage/index.d.ts.map +1 -1
- package/build/types/seller/src/components/HQMedia/RenderJobDetail/SingleRenderJobDetail/index.d.ts +2 -1
- package/build/types/seller/src/components/HQMedia/RenderJobDetail/SingleRenderJobDetail/index.d.ts.map +1 -1
- package/build/types/seller/src/components/HQMedia/RenderJobDetail/components/DetailPage.d.ts +1 -1
- package/build/types/seller/src/components/HQMedia/RenderJobDetail/components/DetailPage.d.ts.map +1 -1
- package/build/types/seller/src/components/HQMedia/RenderJobDetail/components/PackageList.d.ts +2 -1
- package/build/types/seller/src/components/HQMedia/RenderJobDetail/components/PackageList.d.ts.map +1 -1
- package/build/types/seller/src/components/HQMedia/RenderJobDetail/components/PreviewBox.d.ts +2 -1
- package/build/types/seller/src/components/HQMedia/RenderJobDetail/components/PreviewBox.d.ts.map +1 -1
- package/build/types/seller/src/components/HQMedia/RenderJobDetail/components/SinglePackage.d.ts +2 -1
- package/build/types/seller/src/components/HQMedia/RenderJobDetail/components/SinglePackage.d.ts.map +1 -1
- package/build/types/seller/src/components/HQMedia/RenderJobDetail/index.d.ts +2 -1
- package/build/types/seller/src/components/HQMedia/RenderJobDetail/index.d.ts.map +1 -1
- package/build/types/seller/src/components/HQMedia/RenderJobDetail/packages/AmbienteMedium.d.ts +2 -1
- package/build/types/seller/src/components/HQMedia/RenderJobDetail/packages/AmbienteMedium.d.ts.map +1 -1
- package/build/types/seller/src/components/HQMedia/RenderJobDetail/packages/ArMedium.d.ts +2 -1
- package/build/types/seller/src/components/HQMedia/RenderJobDetail/packages/ArMedium.d.ts.map +1 -1
- package/build/types/seller/src/components/HQMedia/RenderJobDetail/packages/HqMedium.d.ts +2 -1
- package/build/types/seller/src/components/HQMedia/RenderJobDetail/packages/HqMedium.d.ts.map +1 -1
- package/build/types/seller/src/components/HQMedia/RenderJobDetail/useRenderjobDetail.d.ts +1 -1
- package/build/types/seller/src/components/HQMedia/RenderJobDetail/useRenderjobDetail.d.ts.map +1 -1
- package/build/types/seller/src/components/HQMedia/Table/index.d.ts +2 -1
- package/build/types/seller/src/components/HQMedia/Table/index.d.ts.map +1 -1
- package/build/types/seller/src/components/HQMedia/index.d.ts +2 -1
- package/build/types/seller/src/components/HQMedia/index.d.ts.map +1 -1
- package/build/types/seller/src/components/HQMedia/useRenderjobs.d.ts +1 -2
- package/build/types/seller/src/components/HQMedia/useRenderjobs.d.ts.map +1 -1
- package/build/types/seller/src/components/Info/Description.d.ts +2 -1
- package/build/types/seller/src/components/Info/Description.d.ts.map +1 -1
- package/build/types/seller/src/components/Info/ImagesBar.d.ts +2 -1
- package/build/types/seller/src/components/Info/ImagesBar.d.ts.map +1 -1
- package/build/types/seller/src/components/Info/MainView.d.ts +2 -1
- package/build/types/seller/src/components/Info/MainView.d.ts.map +1 -1
- package/build/types/seller/src/components/Info/NavBar.d.ts +2 -1
- package/build/types/seller/src/components/Info/NavBar.d.ts.map +1 -1
- package/build/types/seller/src/components/Info/index.d.ts +2 -1
- package/build/types/seller/src/components/Info/index.d.ts.map +1 -1
- package/build/types/seller/src/components/InfoWithProducts/CatalogImages/index.d.ts +7 -3
- package/build/types/seller/src/components/InfoWithProducts/CatalogImages/index.d.ts.map +1 -1
- package/build/types/seller/src/components/InfoWithProducts/Description/index.d.ts +2 -2
- package/build/types/seller/src/components/InfoWithProducts/Description/index.d.ts.map +1 -1
- package/build/types/seller/src/components/InfoWithProducts/NavBar/index.d.ts +2 -2
- package/build/types/seller/src/components/InfoWithProducts/NavBar/index.d.ts.map +1 -1
- package/build/types/seller/src/components/InfoWithProducts/ProductsOrArticles/Articles/ArticleItem/index.d.ts +2 -1
- package/build/types/seller/src/components/InfoWithProducts/ProductsOrArticles/Articles/ArticleItem/index.d.ts.map +1 -1
- package/build/types/seller/src/components/InfoWithProducts/ProductsOrArticles/Articles/index.d.ts +2 -1
- package/build/types/seller/src/components/InfoWithProducts/ProductsOrArticles/Articles/index.d.ts.map +1 -1
- package/build/types/seller/src/components/InfoWithProducts/ProductsOrArticles/Products/index.d.ts +2 -1
- package/build/types/seller/src/components/InfoWithProducts/ProductsOrArticles/Products/index.d.ts.map +1 -1
- package/build/types/seller/src/components/InfoWithProducts/ProductsOrArticles/Search/index.d.ts +2 -1
- package/build/types/seller/src/components/InfoWithProducts/ProductsOrArticles/Search/index.d.ts.map +1 -1
- package/build/types/seller/src/components/InfoWithProducts/ProductsOrArticles/index.d.ts +3 -3
- package/build/types/seller/src/components/InfoWithProducts/ProductsOrArticles/index.d.ts.map +1 -1
- package/build/types/seller/src/components/InfoWithProducts/index.d.ts +2 -1
- package/build/types/seller/src/components/InfoWithProducts/index.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/components/Autocomplete.d.ts +2 -1
- package/build/types/seller/src/components/ProductCreator/components/Autocomplete.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/components/BasedataForms/BaseDataFormCategories.d.ts +2 -1
- package/build/types/seller/src/components/ProductCreator/components/BasedataForms/BaseDataFormCategories.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/components/BasedataForms/BaseDataFormDeliveryInfo.d.ts +2 -1
- package/build/types/seller/src/components/ProductCreator/components/BasedataForms/BaseDataFormDeliveryInfo.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/components/BasedataForms/BaseDataFormInfo.d.ts +2 -1
- package/build/types/seller/src/components/ProductCreator/components/BasedataForms/BaseDataFormInfo.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/components/BasedataForms/CustomBaseForm.d.ts +2 -1
- package/build/types/seller/src/components/ProductCreator/components/BasedataForms/CustomBaseForm.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/components/BasedataForms/GroupedFileds/Additionalnfos.d.ts +2 -1
- package/build/types/seller/src/components/ProductCreator/components/BasedataForms/GroupedFileds/Additionalnfos.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/components/BasedataForms/GroupedFileds/AdvertisingText.d.ts +2 -1
- package/build/types/seller/src/components/ProductCreator/components/BasedataForms/GroupedFileds/AdvertisingText.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/components/BasedataForms/GroupedFileds/BaseInfo.d.ts +2 -1
- package/build/types/seller/src/components/ProductCreator/components/BasedataForms/GroupedFileds/BaseInfo.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/components/BasedataForms/GroupedFileds/CustomDataFields/index.d.ts +2 -1
- package/build/types/seller/src/components/ProductCreator/components/BasedataForms/GroupedFileds/CustomDataFields/index.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/components/BasedataForms/GroupedFileds/Dimensions.d.ts +2 -1
- package/build/types/seller/src/components/ProductCreator/components/BasedataForms/GroupedFileds/Dimensions.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/components/BasedataForms/GroupedFileds/ShortTechnicalDesc.d.ts +2 -1
- package/build/types/seller/src/components/ProductCreator/components/BasedataForms/GroupedFileds/ShortTechnicalDesc.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/components/BasedataForms/GroupedFileds/TechnicalDesc.d.ts +2 -1
- package/build/types/seller/src/components/ProductCreator/components/BasedataForms/GroupedFileds/TechnicalDesc.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/components/BasedataForms/TranslationWrapper.d.ts +2 -1
- package/build/types/seller/src/components/ProductCreator/components/BasedataForms/TranslationWrapper.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/components/Buttons.d.ts +3 -4
- package/build/types/seller/src/components/ProductCreator/components/Buttons.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/components/Priceedit.d.ts +2 -1
- package/build/types/seller/src/components/ProductCreator/components/Priceedit.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/components/VariantSelector.d.ts +2 -1
- package/build/types/seller/src/components/ProductCreator/components/VariantSelector.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/hooks/useClassification.d.ts +7 -7
- package/build/types/seller/src/components/ProductCreator/hooks/useClassification.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/hooks/useProductState.d.ts +3 -4
- package/build/types/seller/src/components/ProductCreator/hooks/useProductState.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/index.d.ts +2 -3
- package/build/types/seller/src/components/ProductCreator/index.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/tabs/AffiliateTable.d.ts +1 -1
- package/build/types/seller/src/components/ProductCreator/tabs/AffiliateTable.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/tabs/BaseDataForm.d.ts +1 -1
- package/build/types/seller/src/components/ProductCreator/tabs/BaseDataForm.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/tabs/ClassificationDataForm.d.ts +1 -1
- package/build/types/seller/src/components/ProductCreator/tabs/ClassificationDataForm.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/tabs/MediaTable.d.ts +1 -1
- package/build/types/seller/src/components/ProductCreator/tabs/MediaTable.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/tabs/RenderJobTableLegacy/OptionsTable.d.ts +2 -1
- package/build/types/seller/src/components/ProductCreator/tabs/RenderJobTableLegacy/OptionsTable.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/tabs/RenderJobTableLegacy/RenderJobForm.d.ts +2 -1
- package/build/types/seller/src/components/ProductCreator/tabs/RenderJobTableLegacy/RenderJobForm.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/tabs/RenderJobTableLegacy/index.d.ts +1 -1
- package/build/types/seller/src/components/ProductCreator/tabs/RenderJobTableLegacy/index.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/tabs/RenderJobTableLegacy/useRenderjobs.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/tabs/VariantTable/FieldSelection.d.ts +2 -1
- package/build/types/seller/src/components/ProductCreator/tabs/VariantTable/FieldSelection.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/tabs/VariantTable/index.d.ts +1 -1
- package/build/types/seller/src/components/ProductCreator/tabs/VariantTable/index.d.ts.map +1 -1
- package/build/types/seller/src/components/ProductCreator/types.d.ts +1 -2
- package/build/types/seller/src/components/ProductCreator/types.d.ts.map +1 -1
- package/build/types/seller/src/components/Seller/index.d.ts +2 -2
- package/build/types/seller/src/components/Seller/index.d.ts.map +1 -1
- package/build/types/seller/src/index.d.ts +1 -1
- package/build/types/seller/src/index.d.ts.map +1 -1
- package/build/types/seller/src/provider/SellerStateProvider.d.ts +2 -2
- package/build/types/seller/src/provider/SellerStateProvider.d.ts.map +1 -1
- package/build/types/seller/src/provider/context.d.ts +0 -1
- package/build/types/seller/src/provider/context.d.ts.map +1 -1
- package/build/types/seller/src/provider/hooks/useSellerStateData/index.d.ts +11 -11
- package/build/types/seller/src/provider/hooks/useSellerStateData/index.d.ts.map +1 -1
- package/build/types/seller/src/provider/hooks/useSellerStateData/reducer.d.ts.map +1 -1
- package/build/types/seller/src/services/ApiHandler.d.ts.map +1 -1
- package/build/types/seller/src/types.d.ts +29 -3
- package/build/types/seller/src/types.d.ts.map +1 -1
- package/build/types/seller/src/ui/AdditionalPriceField.d.ts +7 -3
- package/build/types/seller/src/ui/AdditionalPriceField.d.ts.map +1 -1
- package/build/types/seller/src/ui/Badge3d.d.ts +2 -1
- package/build/types/seller/src/ui/Badge3d.d.ts.map +1 -1
- package/build/types/seller/src/ui/Basket/CheckOut/SaveButtonsGroup.d.ts +2 -1
- package/build/types/seller/src/ui/Basket/CheckOut/SaveButtonsGroup.d.ts.map +1 -1
- package/build/types/seller/src/ui/Basket/CheckOut/index.d.ts +2 -1
- package/build/types/seller/src/ui/Basket/CheckOut/index.d.ts.map +1 -1
- package/build/types/seller/src/ui/Basket/CheckOut/statusMenu.d.ts +3 -1
- package/build/types/seller/src/ui/Basket/CheckOut/statusMenu.d.ts.map +1 -1
- package/build/types/seller/src/ui/Basket/CheckOut/useProduct.d.ts +1 -0
- package/build/types/seller/src/ui/Basket/CheckOut/useProduct.d.ts.map +1 -1
- package/build/types/seller/src/ui/Basket/ClientData/index.d.ts +2 -1
- package/build/types/seller/src/ui/Basket/ClientData/index.d.ts.map +1 -1
- package/build/types/seller/src/ui/Basket/Header.d.ts +1 -1
- package/build/types/seller/src/ui/Basket/Header.d.ts.map +1 -1
- package/build/types/seller/src/ui/Basket/HqRenderBox/index.d.ts +2 -1
- package/build/types/seller/src/ui/Basket/HqRenderBox/index.d.ts.map +1 -1
- package/build/types/seller/src/ui/Basket/PriceOverView/Footer.d.ts +1 -1
- package/build/types/seller/src/ui/Basket/PriceOverView/Footer.d.ts.map +1 -1
- package/build/types/seller/src/ui/Basket/PriceOverView/Header.d.ts +2 -1
- package/build/types/seller/src/ui/Basket/PriceOverView/Header.d.ts.map +1 -1
- package/build/types/seller/src/ui/Basket/PriceOverView/PriceTable.d.ts +2 -1
- package/build/types/seller/src/ui/Basket/PriceOverView/PriceTable.d.ts.map +1 -1
- package/build/types/seller/src/ui/Basket/PriceOverView/Set/ButtonGrouped.d.ts +1 -1
- package/build/types/seller/src/ui/Basket/PriceOverView/Set/ButtonGrouped.d.ts.map +1 -1
- package/build/types/seller/src/ui/Basket/PriceOverView/Set/OpvImage/index.d.ts +2 -1
- package/build/types/seller/src/ui/Basket/PriceOverView/Set/OpvImage/index.d.ts.map +1 -1
- package/build/types/seller/src/ui/Basket/PriceOverView/Set/SetImages.d.ts +2 -1
- package/build/types/seller/src/ui/Basket/PriceOverView/Set/SetImages.d.ts.map +1 -1
- package/build/types/seller/src/ui/Basket/PriceOverView/Set/SetTable.d.ts +2 -1
- package/build/types/seller/src/ui/Basket/PriceOverView/Set/SetTable.d.ts.map +1 -1
- package/build/types/seller/src/ui/Basket/PriceOverView/Set/index.d.ts +2 -1
- package/build/types/seller/src/ui/Basket/PriceOverView/Set/index.d.ts.map +1 -1
- package/build/types/seller/src/ui/DiscountField.d.ts +7 -3
- package/build/types/seller/src/ui/DiscountField.d.ts.map +1 -1
- package/build/types/seller/src/ui/Title.d.ts +2 -2
- package/build/types/seller/src/ui/Title.d.ts.map +1 -1
- package/package.json +23 -27
- package/build/types/seller/src/extendedReactTableTypes.d.ts +0 -121
package/build/esm/index.js
CHANGED
|
@@ -38,7 +38,7 @@ import AddCircleIcon from '@material-ui/icons/AddCircle';
|
|
|
38
38
|
import RemoveIcon from '@material-ui/icons/Remove';
|
|
39
39
|
import LocalOfferIcon from '@material-ui/icons/LocalOffer';
|
|
40
40
|
import IconButton from '@material-ui/core/IconButton';
|
|
41
|
-
import
|
|
41
|
+
import { NumericFormat } from 'react-number-format';
|
|
42
42
|
import Divider from '@material-ui/core/Divider';
|
|
43
43
|
import Form from '@crystaldesign/forms';
|
|
44
44
|
import _typeof from '@babel/runtime/helpers/typeof';
|
|
@@ -55,6 +55,7 @@ import Input from '@material-ui/core/Input';
|
|
|
55
55
|
import { ErrorBoundary } from 'react-error-boundary';
|
|
56
56
|
import CloseIcon from '@material-ui/icons/Close';
|
|
57
57
|
import classnames from 'classnames';
|
|
58
|
+
import Tooltip from '@material-ui/core/Tooltip';
|
|
58
59
|
import { useTranslation as useTranslation$1 } from 'react-i18next';
|
|
59
60
|
import AddCircleOutlineOutlinedIcon from '@material-ui/icons/AddCircleOutlineOutlined';
|
|
60
61
|
import AmbienteSelection from '@crystaldesign/room-selection';
|
|
@@ -72,6 +73,11 @@ import Carousel from 'react-material-ui-carousel';
|
|
|
72
73
|
import Toolbar from '@material-ui/core/Toolbar';
|
|
73
74
|
import { Swiper, SwiperSlide } from 'swiper/react';
|
|
74
75
|
import { Autoplay, Thumbs, Pagination, FreeMode } from 'swiper/modules';
|
|
76
|
+
import 'swiper/css';
|
|
77
|
+
import 'swiper/css/pagination';
|
|
78
|
+
import 'swiper/css/autoplay';
|
|
79
|
+
import 'swiper/css/thumbs';
|
|
80
|
+
import 'swiper/css/free-mode';
|
|
75
81
|
import '@babel/runtime/helpers/objectDestructuringEmpty';
|
|
76
82
|
import PropTypes from 'prop-types';
|
|
77
83
|
import ProductsComponent, { useProductState as useProductState$1 } from '@crystaldesign/products-component';
|
|
@@ -80,12 +86,11 @@ import Tab$1 from '@material-ui/core/Tab';
|
|
|
80
86
|
import Tabs$1 from '@material-ui/core/Tabs';
|
|
81
87
|
import Autocomplete$1 from '@material-ui/lab/Autocomplete';
|
|
82
88
|
import { TRANSLATED_FILEDS, ProductHandlerAbstract } from '@crystaldesign/product-handler';
|
|
83
|
-
import
|
|
89
|
+
import RTFEditor from '@crystaldesign/rtf-editor';
|
|
84
90
|
import { Remove, Add, Delete } from '@material-ui/icons';
|
|
85
91
|
import CardHeader$1 from '@material-ui/core/CardHeader';
|
|
86
92
|
import CardContent$1 from '@material-ui/core/CardContent';
|
|
87
93
|
import Menu from '@material-ui/core/Menu';
|
|
88
|
-
import Tooltip from '@material-ui/core/Tooltip';
|
|
89
94
|
import Collapse from '@material-ui/core/Collapse';
|
|
90
95
|
import List from '@material-ui/core/List';
|
|
91
96
|
import ListItem from '@material-ui/core/ListItem';
|
|
@@ -468,11 +473,11 @@ function breadcrumbCollection() {
|
|
|
468
473
|
};
|
|
469
474
|
}
|
|
470
475
|
|
|
471
|
-
function ownKeys$
|
|
472
|
-
function _objectSpread$
|
|
476
|
+
function ownKeys$G(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; }
|
|
477
|
+
function _objectSpread$G(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$G(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$G(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
473
478
|
var reducer$1 = function reducer(state, action) {
|
|
474
479
|
if (action.type == 'update') {
|
|
475
|
-
var newState = _objectSpread$
|
|
480
|
+
var newState = _objectSpread$G({}, state);
|
|
476
481
|
action.payload.forEach(function (p) {
|
|
477
482
|
if (p.field == 'basketState') {
|
|
478
483
|
if (p.value) {
|
|
@@ -979,24 +984,18 @@ function apiLoadBasket(_x8) {
|
|
|
979
984
|
}
|
|
980
985
|
function _apiLoadBasket() {
|
|
981
986
|
_apiLoadBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8(_ref8) {
|
|
982
|
-
var divaNr, apiConfig, customProductId, jwt, fullUrl, _divaNr$split, _divaNr$split2,
|
|
987
|
+
var divaNr, apiConfig, customProductId, jwt, fullUrl, _divaNr$split, _divaNr$split2, onlyDivaNr, version, response, basket, key, value, _response, result, _basket;
|
|
983
988
|
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
|
984
989
|
while (1) switch (_context8.prev = _context8.next) {
|
|
985
990
|
case 0:
|
|
986
991
|
divaNr = _ref8.divaNr, apiConfig = _ref8.apiConfig, customProductId = _ref8.customProductId, jwt = _ref8.jwt;
|
|
987
992
|
if (!divaNr) {
|
|
988
|
-
_context8.next =
|
|
993
|
+
_context8.next = 11;
|
|
989
994
|
break;
|
|
990
995
|
}
|
|
991
|
-
|
|
992
|
-
if (divaNr.includes('_') && divaNr.substring(divaNr.indexOf('_') + 1).length == 4) {
|
|
993
|
-
_divaNr$split = divaNr.split('_'), _divaNr$split2 = _slicedToArray(_divaNr$split, 2), DivaNrAndDoc = _divaNr$split2[0], variantId = _divaNr$split2[1];
|
|
994
|
-
_DivaNrAndDoc$split = DivaNrAndDoc.split('-'), _DivaNrAndDoc$split2 = _slicedToArray(_DivaNrAndDoc$split, 3), _onlyDivaNr = _DivaNrAndDoc$split2[1], _version = _DivaNrAndDoc$split2[2];
|
|
995
|
-
fullUrl = apiConfig.basketService + '/baskets/configuration?divaNr=' + 'DIVA-' + _onlyDivaNr + (_version ? '&version=' + _version : '') + ('&variantId=' + Number(variantId));
|
|
996
|
-
}
|
|
997
|
-
_divaNr$split3 = divaNr.split('-'), _divaNr$split4 = _slicedToArray(_divaNr$split3, 3), onlyDivaNr = _divaNr$split4[1], version = _divaNr$split4[2];
|
|
996
|
+
_divaNr$split = divaNr.split('-'), _divaNr$split2 = _slicedToArray(_divaNr$split, 3), onlyDivaNr = _divaNr$split2[1], version = _divaNr$split2[2];
|
|
998
997
|
fullUrl = apiConfig.basketService + '/baskets/configuration?divaNr=' + 'DIVA-' + onlyDivaNr + (version ? '&version=' + version : '');
|
|
999
|
-
_context8.next =
|
|
998
|
+
_context8.next = 6;
|
|
1000
999
|
return fetch(fullUrl, {
|
|
1001
1000
|
headers: {
|
|
1002
1001
|
Authorization: 'Bearer ' + jwt
|
|
@@ -1004,7 +1003,7 @@ function _apiLoadBasket() {
|
|
|
1004
1003
|
}).then(function (res) {
|
|
1005
1004
|
return res.json();
|
|
1006
1005
|
});
|
|
1007
|
-
case
|
|
1006
|
+
case 6:
|
|
1008
1007
|
response = _context8.sent;
|
|
1009
1008
|
basket = new BasketData(response.basket);
|
|
1010
1009
|
return _context8.abrupt("return", {
|
|
@@ -1012,15 +1011,15 @@ function _apiLoadBasket() {
|
|
|
1012
1011
|
newestDocumentVersion: Number(response.newestDocumentVersion),
|
|
1013
1012
|
sourceOrganization: response.sourceOrganization
|
|
1014
1013
|
});
|
|
1015
|
-
case
|
|
1014
|
+
case 11:
|
|
1016
1015
|
if (!customProductId) {
|
|
1017
|
-
_context8.next =
|
|
1016
|
+
_context8.next = 25;
|
|
1018
1017
|
break;
|
|
1019
1018
|
}
|
|
1020
1019
|
key = 'customData.SAP_MARA_MATNR.value';
|
|
1021
1020
|
value = customProductId;
|
|
1022
1021
|
fullUrl = apiConfig.catalogService + "/v1/products/basket?key=".concat(key, "&value=").concat(value, "&repair=true");
|
|
1023
|
-
_context8.next =
|
|
1022
|
+
_context8.next = 17;
|
|
1024
1023
|
return fetch(fullUrl, {
|
|
1025
1024
|
method: 'POST',
|
|
1026
1025
|
headers: {
|
|
@@ -1029,11 +1028,11 @@ function _apiLoadBasket() {
|
|
|
1029
1028
|
},
|
|
1030
1029
|
body: JSON.stringify({})
|
|
1031
1030
|
});
|
|
1032
|
-
case
|
|
1031
|
+
case 17:
|
|
1033
1032
|
_response = _context8.sent;
|
|
1034
|
-
_context8.next =
|
|
1033
|
+
_context8.next = 20;
|
|
1035
1034
|
return _response.json();
|
|
1036
|
-
case
|
|
1035
|
+
case 20:
|
|
1037
1036
|
result = _context8.sent;
|
|
1038
1037
|
_basket = new BasketData(result.basket);
|
|
1039
1038
|
return _context8.abrupt("return", {
|
|
@@ -1041,9 +1040,9 @@ function _apiLoadBasket() {
|
|
|
1041
1040
|
newestDocumentVersion: Number(result.newestDocumentVersion),
|
|
1042
1041
|
sourceOrganization: result.sourceOrganization
|
|
1043
1042
|
});
|
|
1044
|
-
case
|
|
1043
|
+
case 25:
|
|
1045
1044
|
throw new Error('apiLoadBasket was called without any information to load basket');
|
|
1046
|
-
case
|
|
1045
|
+
case 26:
|
|
1047
1046
|
case "end":
|
|
1048
1047
|
return _context8.stop();
|
|
1049
1048
|
}
|
|
@@ -1679,8 +1678,8 @@ var _excluded$e = ["collectionId"],
|
|
|
1679
1678
|
function _createForOfIteratorHelper$5(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$5(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
1680
1679
|
function _unsupportedIterableToArray$5(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$5(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$5(r, a) : void 0; } }
|
|
1681
1680
|
function _arrayLikeToArray$5(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
1682
|
-
function ownKeys$
|
|
1683
|
-
function _objectSpread$
|
|
1681
|
+
function ownKeys$F(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; }
|
|
1682
|
+
function _objectSpread$F(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$F(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$F(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1684
1683
|
var LOG$f = getLogger('Seller', 'SellerStateData');
|
|
1685
1684
|
function useSellerStateData(_ref) {
|
|
1686
1685
|
var sessionGuid = _ref.sessionGuid,
|
|
@@ -1810,7 +1809,7 @@ function useSellerStateData(_ref) {
|
|
|
1810
1809
|
}]
|
|
1811
1810
|
});
|
|
1812
1811
|
case 7:
|
|
1813
|
-
return _context.abrupt("return", processData(_objectSpread$
|
|
1812
|
+
return _context.abrupt("return", processData(_objectSpread$F(_objectSpread$F({}, props), {}, {
|
|
1814
1813
|
data: collections
|
|
1815
1814
|
})));
|
|
1816
1815
|
case 10:
|
|
@@ -1874,7 +1873,7 @@ function useSellerStateData(_ref) {
|
|
|
1874
1873
|
updateAcountLogo((_state$collections = state.collections) === null || _state$collections === void 0 || (_state$collections = _state$collections.find(function (c) {
|
|
1875
1874
|
return c.id == collectionId;
|
|
1876
1875
|
})) === null || _state$collections === void 0 ? void 0 : _state$collections.accountLogo);
|
|
1877
|
-
return _context2.abrupt("return", processData(_objectSpread$
|
|
1876
|
+
return _context2.abrupt("return", processData(_objectSpread$F(_objectSpread$F({}, props), {}, {
|
|
1878
1877
|
data: catalogs || []
|
|
1879
1878
|
})));
|
|
1880
1879
|
case 14:
|
|
@@ -2261,8 +2260,8 @@ function useSellerStateData(_ref) {
|
|
|
2261
2260
|
_context7.next = 22;
|
|
2262
2261
|
return apiLoadBasket({
|
|
2263
2262
|
divaNr: divaNr,
|
|
2264
|
-
apiConfig: _objectSpread$
|
|
2265
|
-
api2: _objectSpread$
|
|
2263
|
+
apiConfig: _objectSpread$F(_objectSpread$F({}, apiConfig), {}, {
|
|
2264
|
+
api2: _objectSpread$F(_objectSpread$F({}, apiConfig.api2), {}, {
|
|
2266
2265
|
"default": state.firstLoginApiUrl
|
|
2267
2266
|
})
|
|
2268
2267
|
}),
|
|
@@ -2593,7 +2592,7 @@ function useSellerStateData(_ref) {
|
|
|
2593
2592
|
}]
|
|
2594
2593
|
});
|
|
2595
2594
|
case 24:
|
|
2596
|
-
return _context9.abrupt("return", processData(_objectSpread$
|
|
2595
|
+
return _context9.abrupt("return", processData(_objectSpread$F(_objectSpread$F({}, props), {}, {
|
|
2597
2596
|
data: articles || []
|
|
2598
2597
|
})));
|
|
2599
2598
|
case 27:
|
|
@@ -2725,8 +2724,8 @@ function useSellerStateData(_ref) {
|
|
|
2725
2724
|
}
|
|
2726
2725
|
|
|
2727
2726
|
var _excluded$d = ["state", "setFirstLoginApiUrl", "updateBasketState", "setPlannerParams", "setReturnTo", "setOriginProductId", "setProductCategories", "resetState", "resetForCache"];
|
|
2728
|
-
function ownKeys$
|
|
2729
|
-
function _objectSpread$
|
|
2727
|
+
function ownKeys$E(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; }
|
|
2728
|
+
function _objectSpread$E(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$E(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$E(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2730
2729
|
var LOG$e = getLogger('Seller', 'SellerStateProvider');
|
|
2731
2730
|
var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
2732
2731
|
var children = _ref.children,
|
|
@@ -3090,7 +3089,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
3090
3089
|
_context4.next = 8;
|
|
3091
3090
|
break;
|
|
3092
3091
|
}
|
|
3093
|
-
params = _objectSpread$
|
|
3092
|
+
params = _objectSpread$E(_objectSpread$E(_objectSpread$E(_objectSpread$E({
|
|
3094
3093
|
catalogCodex: catalogCodex
|
|
3095
3094
|
}, accountId ? {
|
|
3096
3095
|
accountId: accountId
|
|
@@ -3105,13 +3104,13 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
3105
3104
|
} : {}), retailArticleNr ? {
|
|
3106
3105
|
retailArticleNr: retailArticleNr
|
|
3107
3106
|
} : {});
|
|
3108
|
-
internal = _objectSpread$
|
|
3107
|
+
internal = _objectSpread$E(_objectSpread$E({}, forceReload ? {
|
|
3109
3108
|
forceReload: forceReload
|
|
3110
3109
|
} : {}), {}, {
|
|
3111
3110
|
accountSessionGuid: accountSessionGuid,
|
|
3112
3111
|
basketData: basketData
|
|
3113
3112
|
});
|
|
3114
|
-
setPlannerParams(_objectSpread$
|
|
3113
|
+
setPlannerParams(_objectSpread$E(_objectSpread$E({}, params), {}, {
|
|
3115
3114
|
internal: internal
|
|
3116
3115
|
}));
|
|
3117
3116
|
openComponent({
|
|
@@ -3143,7 +3142,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
3143
3142
|
updateBasketState({
|
|
3144
3143
|
concat: true
|
|
3145
3144
|
});
|
|
3146
|
-
var _params = _objectSpread$
|
|
3145
|
+
var _params = _objectSpread$E(_objectSpread$E(_objectSpread$E(_objectSpread$E(_objectSpread$E(_objectSpread$E(_objectSpread$E({}, catalogCodex ? {
|
|
3147
3146
|
catalogCodex: catalogCodex
|
|
3148
3147
|
} : {}), accountId ? {
|
|
3149
3148
|
accountId: accountId
|
|
@@ -3160,12 +3159,12 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
3160
3159
|
} : {}), productId ? {
|
|
3161
3160
|
productId: productId
|
|
3162
3161
|
} : {});
|
|
3163
|
-
var _internal = _objectSpread$
|
|
3162
|
+
var _internal = _objectSpread$E(_objectSpread$E({}, forceReload ? {
|
|
3164
3163
|
forceReload: forceReload
|
|
3165
3164
|
} : {}), {}, {
|
|
3166
3165
|
accountSessionGuid: accountSessionGuid
|
|
3167
3166
|
});
|
|
3168
|
-
setPlannerParams(_objectSpread$
|
|
3167
|
+
setPlannerParams(_objectSpread$E(_objectSpread$E({}, _params), {}, {
|
|
3169
3168
|
internal: _internal
|
|
3170
3169
|
}));
|
|
3171
3170
|
openComponent({
|
|
@@ -3198,7 +3197,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
3198
3197
|
});
|
|
3199
3198
|
}
|
|
3200
3199
|
} else {
|
|
3201
|
-
_params2 = _objectSpread$
|
|
3200
|
+
_params2 = _objectSpread$E(_objectSpread$E(_objectSpread$E(_objectSpread$E(_objectSpread$E(_objectSpread$E({}, catalogCodex ? {
|
|
3202
3201
|
catalogCodex: catalogCodex
|
|
3203
3202
|
} : {}), accountId ? {
|
|
3204
3203
|
accountId: accountId
|
|
@@ -3213,12 +3212,12 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
3213
3212
|
} : {}), retailArticleNr ? {
|
|
3214
3213
|
retailArticleNr: retailArticleNr
|
|
3215
3214
|
} : {});
|
|
3216
|
-
_internal2 = _objectSpread$
|
|
3215
|
+
_internal2 = _objectSpread$E(_objectSpread$E({}, forceReload ? {
|
|
3217
3216
|
forceReload: forceReload
|
|
3218
3217
|
} : {}), {}, {
|
|
3219
3218
|
accountSessionGuid: accountSessionGuid
|
|
3220
3219
|
});
|
|
3221
|
-
setPlannerParams(_objectSpread$
|
|
3220
|
+
setPlannerParams(_objectSpread$E(_objectSpread$E({}, _params2), {}, {
|
|
3222
3221
|
internal: _internal2
|
|
3223
3222
|
}));
|
|
3224
3223
|
openComponent({
|
|
@@ -3254,7 +3253,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
3254
3253
|
divaNr: divaNr,
|
|
3255
3254
|
returnTo: returnTo
|
|
3256
3255
|
};
|
|
3257
|
-
setPlannerParams(_objectSpread$
|
|
3256
|
+
setPlannerParams(_objectSpread$E(_objectSpread$E({}, _params3), {}, {
|
|
3258
3257
|
internal: {
|
|
3259
3258
|
basketData: basketData,
|
|
3260
3259
|
forceReload: forceReload
|
|
@@ -3302,7 +3301,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
3302
3301
|
step: null,
|
|
3303
3302
|
assignNewDivaNr: false
|
|
3304
3303
|
});
|
|
3305
|
-
var params = _objectSpread$
|
|
3304
|
+
var params = _objectSpread$E(_objectSpread$E(_objectSpread$E(_objectSpread$E(_objectSpread$E(_objectSpread$E({}, catalogCodex ? {
|
|
3306
3305
|
catalogCodex: catalogCodex
|
|
3307
3306
|
} : {}), accountId ? {
|
|
3308
3307
|
accountId: accountId
|
|
@@ -3317,12 +3316,12 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
3317
3316
|
} : {}), retailArticleNr ? {
|
|
3318
3317
|
retailArticleNr: retailArticleNr
|
|
3319
3318
|
} : {});
|
|
3320
|
-
var internal = _objectSpread$
|
|
3319
|
+
var internal = _objectSpread$E(_objectSpread$E({}, forceReload ? {
|
|
3321
3320
|
forceReload: forceReload
|
|
3322
3321
|
} : {}), {}, {
|
|
3323
3322
|
accountSessionGuid: accountSessionGuid
|
|
3324
3323
|
});
|
|
3325
|
-
setPlannerParams(_objectSpread$
|
|
3324
|
+
setPlannerParams(_objectSpread$E(_objectSpread$E({}, params), {}, {
|
|
3326
3325
|
internal: internal
|
|
3327
3326
|
}));
|
|
3328
3327
|
openComponent({
|
|
@@ -3370,7 +3369,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
3370
3369
|
case 'toPlanner':
|
|
3371
3370
|
{
|
|
3372
3371
|
if (plannerParams) {
|
|
3373
|
-
var params = _objectSpread$
|
|
3372
|
+
var params = _objectSpread$E(_objectSpread$E(_objectSpread$E(_objectSpread$E(_objectSpread$E(_objectSpread$E({}, plannerParams.catalogCodex ? {
|
|
3374
3373
|
catalogCodex: plannerParams.catalogCodex
|
|
3375
3374
|
} : {}), plannerParams.accountId ? {
|
|
3376
3375
|
accountId: plannerParams.accountId
|
|
@@ -3383,12 +3382,12 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
3383
3382
|
} : {}), plannerParams.retailArticleNr ? {
|
|
3384
3383
|
retailArticleNr: plannerParams.retailArticleNr
|
|
3385
3384
|
} : {});
|
|
3386
|
-
var internal = _objectSpread$
|
|
3385
|
+
var internal = _objectSpread$E(_objectSpread$E({}, plannerParams.forceReload ? {
|
|
3387
3386
|
forceReload: plannerParams.forceReload
|
|
3388
3387
|
} : {}), {}, {
|
|
3389
3388
|
accountSessionGuid: plannerParams.accountSessionGuid
|
|
3390
3389
|
});
|
|
3391
|
-
setPlannerParams(_objectSpread$
|
|
3390
|
+
setPlannerParams(_objectSpread$E(_objectSpread$E({}, params), {}, {
|
|
3392
3391
|
internal: internal
|
|
3393
3392
|
}));
|
|
3394
3393
|
openComponent({
|
|
@@ -3415,8 +3414,8 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
3415
3414
|
_context5.next = 2;
|
|
3416
3415
|
return apiLoadBasket({
|
|
3417
3416
|
divaNr: divaNr,
|
|
3418
|
-
apiConfig: _objectSpread$
|
|
3419
|
-
api2: _objectSpread$
|
|
3417
|
+
apiConfig: _objectSpread$E(_objectSpread$E({}, apiConfig), {}, {
|
|
3418
|
+
api2: _objectSpread$E(_objectSpread$E({}, apiConfig.api2), {}, {
|
|
3420
3419
|
"default": state.firstLoginApiUrl
|
|
3421
3420
|
})
|
|
3422
3421
|
}),
|
|
@@ -3485,7 +3484,7 @@ var SellerStateProvider = function SellerStateProvider(_ref) {
|
|
|
3485
3484
|
originProductId: state.originProductId,
|
|
3486
3485
|
productCategories: state.productCategories
|
|
3487
3486
|
},
|
|
3488
|
-
actions: _objectSpread$
|
|
3487
|
+
actions: _objectSpread$E(_objectSpread$E({}, stateFunctions), {}, {
|
|
3489
3488
|
openComponent: openComponent,
|
|
3490
3489
|
openModal: openModal,
|
|
3491
3490
|
openPlanner: openPlanner,
|
|
@@ -3509,13 +3508,13 @@ var useSellerState = function useSellerState() {
|
|
|
3509
3508
|
};
|
|
3510
3509
|
|
|
3511
3510
|
function Badge3D() {
|
|
3512
|
-
var classes = useStyles$
|
|
3511
|
+
var classes = useStyles$9();
|
|
3513
3512
|
return /*#__PURE__*/jsx("span", {
|
|
3514
3513
|
className: classes.root,
|
|
3515
3514
|
children: "3D"
|
|
3516
3515
|
});
|
|
3517
3516
|
}
|
|
3518
|
-
var useStyles$
|
|
3517
|
+
var useStyles$9 = makeStyles(function () {
|
|
3519
3518
|
return createStyles({
|
|
3520
3519
|
root: {
|
|
3521
3520
|
position: 'absolute',
|
|
@@ -3533,8 +3532,8 @@ var useStyles$7 = makeStyles(function () {
|
|
|
3533
3532
|
});
|
|
3534
3533
|
});
|
|
3535
3534
|
|
|
3536
|
-
function ownKeys$
|
|
3537
|
-
function _objectSpread$
|
|
3535
|
+
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; }
|
|
3536
|
+
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; }
|
|
3538
3537
|
function Title(_ref) {
|
|
3539
3538
|
var text = _ref.text,
|
|
3540
3539
|
children = _ref.children,
|
|
@@ -3544,7 +3543,7 @@ function Title(_ref) {
|
|
|
3544
3543
|
variant: "h4",
|
|
3545
3544
|
component: "h2",
|
|
3546
3545
|
children: text
|
|
3547
|
-
}), help && /*#__PURE__*/jsx(HelpButton, _objectSpread$
|
|
3546
|
+
}), help && /*#__PURE__*/jsx(HelpButton, _objectSpread$D({}, help)), /*#__PURE__*/jsx("div", {
|
|
3548
3547
|
style: {
|
|
3549
3548
|
flex: 1
|
|
3550
3549
|
}
|
|
@@ -3562,8 +3561,8 @@ function getImageOrFallbackUrl(url) {
|
|
|
3562
3561
|
return url || 'https://cdn.diva-portal.com/static/images/image_placeholder-landscape-short.png';
|
|
3563
3562
|
}
|
|
3564
3563
|
|
|
3565
|
-
function ownKeys$
|
|
3566
|
-
function _objectSpread$
|
|
3564
|
+
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; }
|
|
3565
|
+
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; }
|
|
3567
3566
|
var LOG$d = getLogger('SellerCatalogs', 'Catalogs');
|
|
3568
3567
|
function Catalogs(_ref) {
|
|
3569
3568
|
var _configurationData$an, _configurationData$ca5, _configurationData$an3, _configurationData$an4;
|
|
@@ -3693,7 +3692,7 @@ function Catalogs(_ref) {
|
|
|
3693
3692
|
if (configurationData !== null && configurationData !== void 0 && (_configurationData$ca = configurationData.catalogs) !== null && _configurationData$ca !== void 0 && _configurationData$ca.onOpen) {
|
|
3694
3693
|
action = configurationData === null || configurationData === void 0 || (_configurationData$ca2 = configurationData.catalogs) === null || _configurationData$ca2 === void 0 ? void 0 : _configurationData$ca2.onOpen;
|
|
3695
3694
|
if (!action.url) {
|
|
3696
|
-
action = _objectSpread$
|
|
3695
|
+
action = _objectSpread$C({}, action);
|
|
3697
3696
|
parameters = {};
|
|
3698
3697
|
Object.entries(action.parameters || {}).forEach(function (_ref4) {
|
|
3699
3698
|
var _ref5 = _slicedToArray(_ref4, 2),
|
|
@@ -3709,7 +3708,7 @@ function Catalogs(_ref) {
|
|
|
3709
3708
|
} else {
|
|
3710
3709
|
openComponent({
|
|
3711
3710
|
type: 'SELLER',
|
|
3712
|
-
parameters: _objectSpread$
|
|
3711
|
+
parameters: _objectSpread$C({
|
|
3713
3712
|
module: 'Info',
|
|
3714
3713
|
catalogCodex: item.codex
|
|
3715
3714
|
}, item.accountId ? {
|
|
@@ -4116,7 +4115,9 @@ function Collections() {
|
|
|
4116
4115
|
},
|
|
4117
4116
|
variant: "subtitle1",
|
|
4118
4117
|
color: "textSecondary",
|
|
4119
|
-
children: [t("data.".concat(row.values['type']),
|
|
4118
|
+
children: [t("data.".concat(row.values['type']), {
|
|
4119
|
+
defaultValue: row.values['type']
|
|
4120
|
+
}), " (", row.subRows.length, ")"]
|
|
4120
4121
|
})
|
|
4121
4122
|
})
|
|
4122
4123
|
});
|
|
@@ -4535,8 +4536,8 @@ function Header(_ref) {
|
|
|
4535
4536
|
});
|
|
4536
4537
|
}
|
|
4537
4538
|
|
|
4538
|
-
function ownKeys$
|
|
4539
|
-
function _objectSpread$
|
|
4539
|
+
function ownKeys$B(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4540
|
+
function _objectSpread$B(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$B(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$B(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4540
4541
|
function MenuListComposition(_ref) {
|
|
4541
4542
|
var setId = _ref.setId,
|
|
4542
4543
|
visibile = _ref.visibile,
|
|
@@ -4616,7 +4617,7 @@ function MenuListComposition(_ref) {
|
|
|
4616
4617
|
children: function children(_ref2) {
|
|
4617
4618
|
var TransitionProps = _ref2.TransitionProps,
|
|
4618
4619
|
placement = _ref2.placement;
|
|
4619
|
-
return /*#__PURE__*/jsx(Grow, _objectSpread$
|
|
4620
|
+
return /*#__PURE__*/jsx(Grow, _objectSpread$B(_objectSpread$B({}, TransitionProps), {}, {
|
|
4620
4621
|
style: {
|
|
4621
4622
|
transformOrigin: placement === 'bottom' ? 'right top' : 'right bottom'
|
|
4622
4623
|
},
|
|
@@ -4697,8 +4698,8 @@ function Images(_ref) {
|
|
|
4697
4698
|
});
|
|
4698
4699
|
}
|
|
4699
4700
|
|
|
4700
|
-
function ownKeys$
|
|
4701
|
-
function _objectSpread$
|
|
4701
|
+
function ownKeys$A(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; }
|
|
4702
|
+
function _objectSpread$A(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$A(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$A(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4702
4703
|
var OpvImage = function OpvImage(_ref) {
|
|
4703
4704
|
var src = _ref.src;
|
|
4704
4705
|
var _useHover = useHover({
|
|
@@ -4716,15 +4717,15 @@ var OpvImage = function OpvImage(_ref) {
|
|
|
4716
4717
|
layerProps = _useLayer.layerProps,
|
|
4717
4718
|
triggerProps = _useLayer.triggerProps;
|
|
4718
4719
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
4719
|
-
children: [/*#__PURE__*/jsx("img", _objectSpread$
|
|
4720
|
+
children: [/*#__PURE__*/jsx("img", _objectSpread$A(_objectSpread$A(_objectSpread$A({}, triggerProps), hoverProps), {}, {
|
|
4720
4721
|
src: src,
|
|
4721
4722
|
style: {
|
|
4722
4723
|
width: '20px'
|
|
4723
4724
|
}
|
|
4724
|
-
})), isOpen && (renderLayer === null || renderLayer === void 0 ? void 0 : renderLayer(/*#__PURE__*/jsx("img", _objectSpread$
|
|
4725
|
+
})), isOpen && (renderLayer === null || renderLayer === void 0 ? void 0 : renderLayer(/*#__PURE__*/jsx("img", _objectSpread$A(_objectSpread$A({
|
|
4725
4726
|
src: src.replace('_gal.', '.')
|
|
4726
4727
|
}, layerProps), {}, {
|
|
4727
|
-
style: _objectSpread$
|
|
4728
|
+
style: _objectSpread$A({
|
|
4728
4729
|
width: '300px'
|
|
4729
4730
|
}, layerProps.style)
|
|
4730
4731
|
}))))]
|
|
@@ -4737,7 +4738,7 @@ function SetTable(_ref) {
|
|
|
4737
4738
|
visibile = _ref.visibile;
|
|
4738
4739
|
var _useTranslation = useTranslation(),
|
|
4739
4740
|
t = _useTranslation.t;
|
|
4740
|
-
var classes = useStyles$
|
|
4741
|
+
var classes = useStyles$8();
|
|
4741
4742
|
var _useSellerState = useSellerState(),
|
|
4742
4743
|
_useSellerState$state = _useSellerState.state,
|
|
4743
4744
|
doShowPrices = _useSellerState$state.doShowPrices,
|
|
@@ -5048,7 +5049,7 @@ function SetTable(_ref) {
|
|
|
5048
5049
|
})
|
|
5049
5050
|
});
|
|
5050
5051
|
}
|
|
5051
|
-
var useStyles$
|
|
5052
|
+
var useStyles$8 = makeStyles({
|
|
5052
5053
|
table: {
|
|
5053
5054
|
minWidth: 650
|
|
5054
5055
|
}
|
|
@@ -5132,8 +5133,8 @@ function Set$1(_ref) {
|
|
|
5132
5133
|
}
|
|
5133
5134
|
|
|
5134
5135
|
var _excluded$c = ["onValueChange", "value"];
|
|
5135
|
-
function ownKeys$
|
|
5136
|
-
function _objectSpread$
|
|
5136
|
+
function ownKeys$z(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; }
|
|
5137
|
+
function _objectSpread$z(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$z(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$z(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5137
5138
|
function DiscountField (_ref) {
|
|
5138
5139
|
var _ref2;
|
|
5139
5140
|
var updateDiscount = _ref.updateDiscount,
|
|
@@ -5148,7 +5149,7 @@ function DiscountField (_ref) {
|
|
|
5148
5149
|
display: 'flex',
|
|
5149
5150
|
justifyContent: 'flex-end'
|
|
5150
5151
|
},
|
|
5151
|
-
children: [/*#__PURE__*/jsx(
|
|
5152
|
+
children: [/*#__PURE__*/jsx(NumericFormat, {
|
|
5152
5153
|
style: {
|
|
5153
5154
|
marginRight: 10
|
|
5154
5155
|
},
|
|
@@ -5219,7 +5220,7 @@ function ControlledNumberFormat$1(_ref3) {
|
|
|
5219
5220
|
useEffect(function () {
|
|
5220
5221
|
setValue(origValue);
|
|
5221
5222
|
}, [origValue]);
|
|
5222
|
-
return /*#__PURE__*/jsx(
|
|
5223
|
+
return /*#__PURE__*/jsx(NumericFormat, _objectSpread$z(_objectSpread$z({}, props), {}, {
|
|
5223
5224
|
placeholder: props.suffix,
|
|
5224
5225
|
value: value === 0 ? undefined : value,
|
|
5225
5226
|
customInput: StyledTextFiled$1,
|
|
@@ -5244,8 +5245,8 @@ var StyledTextFiled$1 = withStyles({
|
|
|
5244
5245
|
})(TextField);
|
|
5245
5246
|
|
|
5246
5247
|
var _excluded$b = ["onValueChange", "value"];
|
|
5247
|
-
function ownKeys$
|
|
5248
|
-
function _objectSpread$
|
|
5248
|
+
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; }
|
|
5249
|
+
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; }
|
|
5249
5250
|
function AdditionalPriceField (_ref) {
|
|
5250
5251
|
var updatePrice = _ref.updatePrice,
|
|
5251
5252
|
price = _ref.price,
|
|
@@ -5323,7 +5324,7 @@ function ControlledNumberFormat(_ref2) {
|
|
|
5323
5324
|
useEffect(function () {
|
|
5324
5325
|
setValue(origValue);
|
|
5325
5326
|
}, [origValue]);
|
|
5326
|
-
return /*#__PURE__*/jsx(
|
|
5327
|
+
return /*#__PURE__*/jsx(NumericFormat, _objectSpread$y(_objectSpread$y({}, props), {}, {
|
|
5327
5328
|
placeholder: '0 ' + DivaUtils$1.defaultPriceFormat.currency,
|
|
5328
5329
|
value: value,
|
|
5329
5330
|
customInput: StyledTextFiled,
|
|
@@ -5787,7 +5788,8 @@ function Step2ClientData(_ref) {
|
|
|
5787
5788
|
function StatusMenu(_ref) {
|
|
5788
5789
|
var visibleStatus = _ref.visibleStatus,
|
|
5789
5790
|
status = _ref.status,
|
|
5790
|
-
setStatus = _ref.setStatus
|
|
5791
|
+
setStatus = _ref.setStatus,
|
|
5792
|
+
productSaved = _ref.productSaved;
|
|
5791
5793
|
var handleClick = function handleClick(item) {
|
|
5792
5794
|
setStatus(item);
|
|
5793
5795
|
};
|
|
@@ -5812,6 +5814,7 @@ function StatusMenu(_ref) {
|
|
|
5812
5814
|
onClick: function onClick() {
|
|
5813
5815
|
return handleClick(item);
|
|
5814
5816
|
},
|
|
5817
|
+
disabled: productSaved && item !== 'BASE_CONFIGURATION',
|
|
5815
5818
|
children: t('data.' + item, item)
|
|
5816
5819
|
}, item);
|
|
5817
5820
|
})
|
|
@@ -5819,7 +5822,7 @@ function StatusMenu(_ref) {
|
|
|
5819
5822
|
});
|
|
5820
5823
|
}
|
|
5821
5824
|
|
|
5822
|
-
var useStyles$
|
|
5825
|
+
var useStyles$7 = makeStyles$1(function (theme) {
|
|
5823
5826
|
return createStyles$1({
|
|
5824
5827
|
margin: {
|
|
5825
5828
|
margin: theme.spacing(1)
|
|
@@ -5838,7 +5841,7 @@ function SaveButtonsGroup(_ref) {
|
|
|
5838
5841
|
userInfoPresent = _ref.userInfoPresent;
|
|
5839
5842
|
var _useTranslation = useTranslation(),
|
|
5840
5843
|
t = _useTranslation.t;
|
|
5841
|
-
var classes = useStyles$
|
|
5844
|
+
var classes = useStyles$7();
|
|
5842
5845
|
return /*#__PURE__*/jsxs("div", {
|
|
5843
5846
|
style: {
|
|
5844
5847
|
marginTop: '0.4rem',
|
|
@@ -6233,8 +6236,8 @@ function styleInject(css, ref) {
|
|
|
6233
6236
|
}
|
|
6234
6237
|
|
|
6235
6238
|
var variantsTable = "variants-table-vIkjW";
|
|
6236
|
-
var css_248z$
|
|
6237
|
-
styleInject(css_248z$
|
|
6239
|
+
var css_248z$e = ".variants-table-vIkjW {\n border-right: 1px solid rgb(224, 224, 224);\n overflow: auto;\n flex: 0 0 400px;\n}\n";
|
|
6240
|
+
styleInject(css_248z$e);
|
|
6238
6241
|
|
|
6239
6242
|
function VariantSelector (_ref) {
|
|
6240
6243
|
var variantData = _ref.variantData,
|
|
@@ -6298,8 +6301,8 @@ var clickable = "clickable-lAXv5";
|
|
|
6298
6301
|
var hover = "hover-9MJo5";
|
|
6299
6302
|
var overlay = "overlay-TnuQb";
|
|
6300
6303
|
var buttons = "buttons-w-i7W";
|
|
6301
|
-
var css_248z$
|
|
6302
|
-
styleInject(css_248z$
|
|
6304
|
+
var css_248z$d = ".detail-wrapper-ZaJ9i {\n display: flex;\n flex-direction: column;\n width: calc(100% - 10px);\n margin: 5px;\n padding: 25px;\n gap: 25px;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background: white;\n z-index: 10;\n box-sizing: border-box;\n transition: transform 0.3s ease-in-out;\n transform: translateX(100%);\n overflow: auto;\n}\n\n.detail-wrapper-ZaJ9i.active-38NMv {\n transform: translateX(0);\n}\n\n.package-list--Q1qI {\n display: flex;\n gap: 10px;\n flex-wrap: wrap;\n}\n\n.single-package-gsVlm {\n width: 110px;\n height: 110px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n background-color: #f2f2f2;\n}\n\n.single-package-gsVlm.selectable-8EkQV:hover {\n background-color: #dee0e4;\n cursor: pointer;\n}\n\n.single-package-gsVlm.selected-OUbog {\n background-color: var(--diva-theme-palette-primary-light);\n border: solid 1px var(--diva-theme-palette-primary-main);\n}\n\n.single-package-gsVlm.selectable-8EkQV.selected-OUbog:hover {\n background-color: var(--diva-theme-palette-primary-main);\n color: var(--diva-theme-palette-secondary-contrast-text);\n}\n\n.single-package-gsVlm span {\n text-align: center;\n font-style: normal;\n font-weight: 500;\n font-size: 10px;\n line-height: 12px;\n max-width: 80%;\n min-height: 25px;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.single-package-gsVlm img {\n height: 50px;\n}\n\n.package-description-Io9dZ {\n margin: 10px;\n width: 440px;\n background: #f8f8f8;\n border-radius: 3px;\n display: flex;\n align-items: center;\n}\n\n.package-description-Io9dZ span {\n margin: 30px;\n font-style: normal;\n font-weight: 400;\n font-size: 13px;\n line-height: 16px;\n}\n\n.form-wrapper-sQf4D {\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n\n.text-field-rkPSE {\n width: 400px;\n}\n\n.element-title-nfKUg {\n font-style: normal;\n font-weight: 300;\n font-size: 22px;\n}\n\n.preview-list-Uu0Gx {\n display: flex;\n flex-wrap: wrap;\n gap: 10px;\n}\n\n.preview-box-2K6lV {\n position: relative;\n display: flex;\n flex-direction: column;\n min-width: 110px;\n background: #f2f2f2;\n border-radius: 4px;\n}\n\n.preview-box-2K6lV.clickable-lAXv5:hover {\n cursor: pointer;\n box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12);\n}\n\n.preview-box-2K6lV img {\n height: 100px;\n margin: 5px auto;\n padding: 0 5px;\n}\n\n.preview-box-2K6lV span {\n font-style: normal;\n font-weight: 500;\n font-size: 12px;\n line-height: 14px;\n text-align: center;\n margin: 5px;\n}\n\n.preview-box-2K6lV button {\n margin: 5px;\n height: 25px;\n font-size: 12px;\n}\n\n.preview-box-2K6lV .MuiButton-containedPrimary.hover-9MJo5 {\n background-color: var(--diva-theme-palette-primary-dark);\n text-decoration: none;\n}\n\n.preview-box-2K6lV .MuiButton-containedSecondary.hover-9MJo5 {\n background-color: var(--diva-theme-palette-secondary-dark);\n text-decoration: none;\n}\n\n.preview-box-2K6lV .overlay-TnuQb {\n position: absolute;\n top: 5px;\n right: 5px;\n left: 5px;\n height: 100px;\n background: rgba(250, 250, 250, 0.6);\n display: flex;\n justify-content: center;\n align-items: center;\n float: right;\n}\n\n.buttons-w-i7W {\n display: flex;\n gap: 10px;\n justify-content: flex-end;\n margin: auto 20px 5px;\n}\n\n.buttons-w-i7W button {\n width: 400px;\n}\n";
|
|
6305
|
+
styleInject(css_248z$d);
|
|
6303
6306
|
|
|
6304
6307
|
function DetailPage(_ref) {
|
|
6305
6308
|
var isActive = _ref.isActive,
|
|
@@ -6354,8 +6357,8 @@ function SingePackage(_ref) {
|
|
|
6354
6357
|
});
|
|
6355
6358
|
}
|
|
6356
6359
|
|
|
6357
|
-
function ownKeys$
|
|
6358
|
-
function _objectSpread$
|
|
6360
|
+
function ownKeys$x(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; }
|
|
6361
|
+
function _objectSpread$x(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$x(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$x(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6359
6362
|
function PackageList(_ref) {
|
|
6360
6363
|
var packages = _ref.packages,
|
|
6361
6364
|
onSelect = _ref.onSelect,
|
|
@@ -6367,10 +6370,10 @@ function PackageList(_ref) {
|
|
|
6367
6370
|
if (packages.length > 0) {
|
|
6368
6371
|
return /*#__PURE__*/jsxs("div", {
|
|
6369
6372
|
className: packageList,
|
|
6370
|
-
children: [edit && /*#__PURE__*/jsx(SingePackage, _objectSpread$
|
|
6373
|
+
children: [edit && /*#__PURE__*/jsx(SingePackage, _objectSpread$x(_objectSpread$x({}, packages[selected]), {}, {
|
|
6371
6374
|
selected: true
|
|
6372
6375
|
}), selected), !edit && packages.map(function (p, i) {
|
|
6373
|
-
return /*#__PURE__*/jsx(SingePackage, _objectSpread$
|
|
6376
|
+
return /*#__PURE__*/jsx(SingePackage, _objectSpread$x(_objectSpread$x({}, p), {}, {
|
|
6374
6377
|
selected: selected == i,
|
|
6375
6378
|
onSelect: edit ? undefined : function () {
|
|
6376
6379
|
return onSelect(i);
|
|
@@ -6392,13 +6395,15 @@ var hqIcon = "data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%2
|
|
|
6392
6395
|
|
|
6393
6396
|
var arIcon = "data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M7%209.43L12.1%2013.02M7%209.43L12.1%206L17.2%209.43M7%209.43V14.58L12.1%2018.17M12.1%2013.02L17.2%209.43M12.1%2013.02V18.17M17.2%209.43V14.58L12.1%2018.17%22%20stroke%3D%22%234F4F4F%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E";
|
|
6394
6397
|
|
|
6398
|
+
var masterIcon = "data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M7%209.43L12.1%2013.02M7%209.43L12.1%206L17.2%209.43M7%209.43V14.58L12.1%2018.17M12.1%2013.02L17.2%209.43M12.1%2013.02V18.17M17.2%209.43V14.58L12.1%2018.17%22%20stroke%3D%22%234F4F4F%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E";
|
|
6399
|
+
|
|
6395
6400
|
var ambienteIcon = "data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M3%2017.04L11.57%2013.98L20.14%2017.04M11.57%2013.99V6%22%20stroke%3D%22%237B7B7B%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M17.4702%2011.8608L11.5702%2013.6708M17.4702%2011.8608V15.9708M17.4702%2011.8608L11.5702%209.80078L5.67017%2011.8608M11.5602%2013.6708L5.66016%2011.8608V15.9708M11.5702%2013.6808V17.8108%22%20stroke%3D%22%234F4F4F%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E";
|
|
6396
6401
|
|
|
6397
6402
|
function _createForOfIteratorHelper$4(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$4(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
6398
6403
|
function _unsupportedIterableToArray$4(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$4(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$4(r, a) : void 0; } }
|
|
6399
6404
|
function _arrayLikeToArray$4(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
6400
|
-
function ownKeys$
|
|
6401
|
-
function _objectSpread$
|
|
6405
|
+
function ownKeys$w(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; }
|
|
6406
|
+
function _objectSpread$w(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$w(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$w(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6402
6407
|
function useRenderjobDetail (_ref) {
|
|
6403
6408
|
var renderJobs = _ref.renderJobs,
|
|
6404
6409
|
onSave = _ref.onSave,
|
|
@@ -6407,8 +6412,6 @@ function useRenderjobDetail (_ref) {
|
|
|
6407
6412
|
var _useDivaCore = useDivaCore(),
|
|
6408
6413
|
organization = _useDivaCore.state.organization,
|
|
6409
6414
|
openModal = _useDivaCore.actions.openModal;
|
|
6410
|
-
var _useSellerState = useSellerState(),
|
|
6411
|
-
currentBasketState = _useSellerState.state.currentBasketState;
|
|
6412
6415
|
var _useTranslation = useTranslation$1(),
|
|
6413
6416
|
t = _useTranslation.t;
|
|
6414
6417
|
var packages = useMemo(function () {
|
|
@@ -6421,6 +6424,14 @@ function useRenderjobDetail (_ref) {
|
|
|
6421
6424
|
job: 'HQ',
|
|
6422
6425
|
viewPoint: 'start'
|
|
6423
6426
|
}
|
|
6427
|
+
}, {
|
|
6428
|
+
id: 'master',
|
|
6429
|
+
name: 'renderjob.detail.package.master.name',
|
|
6430
|
+
icon: masterIcon,
|
|
6431
|
+
description: 'renderjob.detail.package.master.description',
|
|
6432
|
+
settings: {
|
|
6433
|
+
job: 'MASTER'
|
|
6434
|
+
}
|
|
6424
6435
|
}, {
|
|
6425
6436
|
id: 'ar',
|
|
6426
6437
|
name: 'renderjob.detail.package.ar.name',
|
|
@@ -6473,40 +6484,44 @@ function useRenderjobDetail (_ref) {
|
|
|
6473
6484
|
} else {
|
|
6474
6485
|
setSelected(0);
|
|
6475
6486
|
setCampaign('');
|
|
6476
|
-
setPackageContent([_objectSpread$
|
|
6487
|
+
setPackageContent([_objectSpread$w({}, packages[0].settings)]);
|
|
6477
6488
|
}
|
|
6478
6489
|
}, [renderJobs]);
|
|
6479
6490
|
var onSelectPackage = useCallback(function (index) {
|
|
6480
6491
|
setSelected(index);
|
|
6481
|
-
setPackageContent([_objectSpread$
|
|
6492
|
+
setPackageContent([_objectSpread$w({}, packages[index].settings)]);
|
|
6482
6493
|
}, []);
|
|
6483
|
-
var
|
|
6484
|
-
|
|
6485
|
-
|
|
6486
|
-
|
|
6487
|
-
|
|
6488
|
-
|
|
6489
|
-
|
|
6490
|
-
|
|
6491
|
-
|
|
6492
|
-
var
|
|
6493
|
-
|
|
6494
|
+
var canOrderRenderjob = function canOrderRenderjob() {
|
|
6495
|
+
if (renderJobs.length) {
|
|
6496
|
+
var _product$configuratio, _product$configuratio2;
|
|
6497
|
+
if (renderJobs.length > 1) throw new Error('Only one job can be edited at a time');
|
|
6498
|
+
var firstJob = renderJobs[0];
|
|
6499
|
+
var product = selectedVariants.find(function (product) {
|
|
6500
|
+
return product._id === firstJob.product;
|
|
6501
|
+
});
|
|
6502
|
+
var d3dps = (_product$configuratio = product.configuration) === null || _product$configuratio === void 0 || (_product$configuratio = _product$configuratio.OrderSets[0]) === null || _product$configuratio === void 0 ? void 0 : _product$configuratio.Diva3DProject;
|
|
6503
|
+
var hqr = (_product$configuratio2 = product.configuration) === null || _product$configuratio2 === void 0 || (_product$configuratio2 = _product$configuratio2.OrderSets[0]) === null || _product$configuratio2 === void 0 ? void 0 : _product$configuratio2.HQRenderScript;
|
|
6504
|
+
if (d3dps && hqr) return true;else return false;
|
|
6505
|
+
} else {
|
|
6506
|
+
var missing = false;
|
|
6507
|
+
selectedVariants.forEach(function (product) {
|
|
6508
|
+
var _product$configuratio3, _product$configuratio4;
|
|
6509
|
+
var d3dps = (_product$configuratio3 = product.configuration) === null || _product$configuratio3 === void 0 || (_product$configuratio3 = _product$configuratio3.OrderSets[0]) === null || _product$configuratio3 === void 0 ? void 0 : _product$configuratio3.Diva3DProject;
|
|
6510
|
+
var hqr = (_product$configuratio4 = product.configuration) === null || _product$configuratio4 === void 0 || (_product$configuratio4 = _product$configuratio4.OrderSets[0]) === null || _product$configuratio4 === void 0 ? void 0 : _product$configuratio4.HQRenderScript;
|
|
6511
|
+
if (!d3dps || !hqr) missing = true;
|
|
6512
|
+
});
|
|
6513
|
+
if (missing) return false;else return true;
|
|
6494
6514
|
}
|
|
6515
|
+
};
|
|
6516
|
+
var getDiva3DProject = function getDiva3DProject(product) {
|
|
6517
|
+
var _product$configuratio5;
|
|
6518
|
+
var d3dps = (_product$configuratio5 = product.configuration) === null || _product$configuratio5 === void 0 || (_product$configuratio5 = _product$configuratio5.OrderSets[0]) === null || _product$configuratio5 === void 0 ? void 0 : _product$configuratio5.Diva3DProject;
|
|
6495
6519
|
if (!d3dps) throw new Error('cant order renderjob without diva3dproject');
|
|
6496
6520
|
return atob(d3dps);
|
|
6497
6521
|
};
|
|
6498
6522
|
var getHqRenderScript = function getHqRenderScript(product) {
|
|
6499
|
-
var
|
|
6500
|
-
|
|
6501
|
-
var _currentBasketState$b3;
|
|
6502
|
-
hqRenderScript = currentBasketState === null || currentBasketState === void 0 || (_currentBasketState$b3 = currentBasketState.basket) === null || _currentBasketState$b3 === void 0 || (_currentBasketState$b3 = _currentBasketState$b3.OrderSets[0]) === null || _currentBasketState$b3 === void 0 || (_currentBasketState$b3 = _currentBasketState$b3.ConfigVariants) === null || _currentBasketState$b3 === void 0 || (_currentBasketState$b3 = _currentBasketState$b3.find(function (variant) {
|
|
6503
|
-
return variant.VariantID === product.variantId;
|
|
6504
|
-
})) === null || _currentBasketState$b3 === void 0 ? void 0 : _currentBasketState$b3.HQRenderScript;
|
|
6505
|
-
}
|
|
6506
|
-
if (!hqRenderScript) {
|
|
6507
|
-
var _currentBasketState$b4;
|
|
6508
|
-
hqRenderScript = currentBasketState === null || currentBasketState === void 0 || (_currentBasketState$b4 = currentBasketState.basket) === null || _currentBasketState$b4 === void 0 ? void 0 : _currentBasketState$b4.HQRenderScript;
|
|
6509
|
-
}
|
|
6523
|
+
var _product$hqRenderScri, _product$configuratio6;
|
|
6524
|
+
var hqRenderScript = (_product$hqRenderScri = product.hqRenderScript) !== null && _product$hqRenderScri !== void 0 ? _product$hqRenderScri : (_product$configuratio6 = product.configuration) === null || _product$configuratio6 === void 0 || (_product$configuratio6 = _product$configuratio6.OrderSets[0]) === null || _product$configuratio6 === void 0 ? void 0 : _product$configuratio6.HQRenderScript;
|
|
6510
6525
|
if (!hqRenderScript) throw new Error('cant order renderjob without hqrenderscript');
|
|
6511
6526
|
return hqRenderScript;
|
|
6512
6527
|
};
|
|
@@ -6547,15 +6562,14 @@ function useRenderjobDetail (_ref) {
|
|
|
6547
6562
|
}
|
|
6548
6563
|
var createJobs = function createJobs(state) {
|
|
6549
6564
|
if (renderJobs.length) {
|
|
6550
|
-
var
|
|
6565
|
+
var _firstJob$diva3DProje;
|
|
6551
6566
|
if (renderJobs.length > 1) throw new Error('Only one job can be edited at a time');
|
|
6552
|
-
if (!(currentBasketState !== null && currentBasketState !== void 0 && (_currentBasketState$b5 = currentBasketState.basket) !== null && _currentBasketState$b5 !== void 0 && _currentBasketState$b5.Diva3DProject)) throw new Error('cant order renderjob without diva3dproject');
|
|
6553
6567
|
var firstJob = renderJobs[0];
|
|
6554
6568
|
var product = selectedVariants.find(function (product) {
|
|
6555
6569
|
return product._id === firstJob.product;
|
|
6556
6570
|
});
|
|
6557
6571
|
var d3dps = getDiva3DProject(product);
|
|
6558
|
-
return [_objectSpread$
|
|
6572
|
+
return [_objectSpread$w(_objectSpread$w(_objectSpread$w(_objectSpread$w({}, firstJob), packages[selected].settings), packageContent[0]), {}, {
|
|
6559
6573
|
state: state,
|
|
6560
6574
|
group: campaign,
|
|
6561
6575
|
diva3DProject: d3dps,
|
|
@@ -6565,7 +6579,7 @@ function useRenderjobDetail (_ref) {
|
|
|
6565
6579
|
} else {
|
|
6566
6580
|
var jobs = packageContent.flatMap(function (content) {
|
|
6567
6581
|
return selectedVariants.map(function (product) {
|
|
6568
|
-
return _objectSpread$
|
|
6582
|
+
return _objectSpread$w(_objectSpread$w(_objectSpread$w({}, packages[selected].settings), content), {}, {
|
|
6569
6583
|
state: state,
|
|
6570
6584
|
group: campaign,
|
|
6571
6585
|
organization: organization._id,
|
|
@@ -6598,17 +6612,11 @@ function useRenderjobDetail (_ref) {
|
|
|
6598
6612
|
};
|
|
6599
6613
|
var onOrderRenderPackage = /*#__PURE__*/function () {
|
|
6600
6614
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(renderPackage, state) {
|
|
6601
|
-
var
|
|
6615
|
+
var _renderPackage$preset, nrOfAmbRenderingsNeeded, nrAmbrenderingsSelected, promises;
|
|
6602
6616
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
6603
6617
|
while (1) switch (_context.prev = _context.next) {
|
|
6604
6618
|
case 0:
|
|
6605
6619
|
_context.prev = 0;
|
|
6606
|
-
if (currentBasketState !== null && currentBasketState !== void 0 && (_currentBasketState$b6 = currentBasketState.basket) !== null && _currentBasketState$b6 !== void 0 && _currentBasketState$b6.Diva3DProject) {
|
|
6607
|
-
_context.next = 3;
|
|
6608
|
-
break;
|
|
6609
|
-
}
|
|
6610
|
-
throw new Error('cant order renderjob without diva3dproject');
|
|
6611
|
-
case 3:
|
|
6612
6620
|
nrOfAmbRenderingsNeeded = (_renderPackage$preset = renderPackage.presets) === null || _renderPackage$preset === void 0 ? void 0 : _renderPackage$preset.filter(function (p) {
|
|
6613
6621
|
return p.job === 'AMBIENTE';
|
|
6614
6622
|
}).length;
|
|
@@ -6616,7 +6624,7 @@ function useRenderjobDetail (_ref) {
|
|
|
6616
6624
|
return p.renderScene;
|
|
6617
6625
|
}).length;
|
|
6618
6626
|
if (!(nrOfAmbRenderingsNeeded !== nrAmbrenderingsSelected)) {
|
|
6619
|
-
_context.next =
|
|
6627
|
+
_context.next = 6;
|
|
6620
6628
|
break;
|
|
6621
6629
|
}
|
|
6622
6630
|
openModal({
|
|
@@ -6625,7 +6633,7 @@ function useRenderjobDetail (_ref) {
|
|
|
6625
6633
|
text: t('backoffice.table.renderpackages.order.errornrofamb')
|
|
6626
6634
|
});
|
|
6627
6635
|
throw new Error('Please select all ambiente renderings');
|
|
6628
|
-
case
|
|
6636
|
+
case 6:
|
|
6629
6637
|
promises = selectedVariants.map(function (product) {
|
|
6630
6638
|
var d3dps = getDiva3DProject(product);
|
|
6631
6639
|
var productParams = {
|
|
@@ -6643,20 +6651,20 @@ function useRenderjobDetail (_ref) {
|
|
|
6643
6651
|
};
|
|
6644
6652
|
return onSaveRenderPackage(renderPackage, productParams);
|
|
6645
6653
|
});
|
|
6646
|
-
_context.next =
|
|
6654
|
+
_context.next = 9;
|
|
6647
6655
|
return Promise.all(promises);
|
|
6648
|
-
case
|
|
6649
|
-
_context.next =
|
|
6656
|
+
case 9:
|
|
6657
|
+
_context.next = 14;
|
|
6650
6658
|
break;
|
|
6651
|
-
case
|
|
6652
|
-
_context.prev =
|
|
6659
|
+
case 11:
|
|
6660
|
+
_context.prev = 11;
|
|
6653
6661
|
_context.t0 = _context["catch"](0);
|
|
6654
6662
|
console.error(_context.t0);
|
|
6655
|
-
case
|
|
6663
|
+
case 14:
|
|
6656
6664
|
case "end":
|
|
6657
6665
|
return _context.stop();
|
|
6658
6666
|
}
|
|
6659
|
-
}, _callee, null, [[0,
|
|
6667
|
+
}, _callee, null, [[0, 11]]);
|
|
6660
6668
|
}));
|
|
6661
6669
|
return function onOrderRenderPackage(_x, _x2) {
|
|
6662
6670
|
return _ref2.apply(this, arguments);
|
|
@@ -6673,7 +6681,8 @@ function useRenderjobDetail (_ref) {
|
|
|
6673
6681
|
onAddtoCardCarderjob: onAddtoCardCarderjob,
|
|
6674
6682
|
onOrderRenderjob: onOrderRenderjob,
|
|
6675
6683
|
onEditRenderjob: onEditRenderjob,
|
|
6676
|
-
onOrderRenderPackage: onOrderRenderPackage
|
|
6684
|
+
onOrderRenderPackage: onOrderRenderPackage,
|
|
6685
|
+
canOrderRenderjob: canOrderRenderjob
|
|
6677
6686
|
};
|
|
6678
6687
|
}
|
|
6679
6688
|
|
|
@@ -6838,8 +6847,8 @@ function AmbienteRendering(_ref) {
|
|
|
6838
6847
|
});
|
|
6839
6848
|
}
|
|
6840
6849
|
|
|
6841
|
-
function ownKeys$
|
|
6842
|
-
function _objectSpread$
|
|
6850
|
+
function ownKeys$v(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; }
|
|
6851
|
+
function _objectSpread$v(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$v(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$v(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6843
6852
|
function HQMedium(_ref) {
|
|
6844
6853
|
var setPackageContent = _ref.setPackageContent,
|
|
6845
6854
|
edit = _ref.edit,
|
|
@@ -6910,7 +6919,7 @@ function HQMedium(_ref) {
|
|
|
6910
6919
|
}
|
|
6911
6920
|
function getActiveViewpoints(packageContent, viewPoints) {
|
|
6912
6921
|
return viewPoints.map(function (vp) {
|
|
6913
|
-
return _objectSpread$
|
|
6922
|
+
return _objectSpread$v(_objectSpread$v({}, vp), {}, {
|
|
6914
6923
|
selected: packageContent.some(function (p) {
|
|
6915
6924
|
return p.viewPoint === vp.id;
|
|
6916
6925
|
})
|
|
@@ -6920,12 +6929,21 @@ function getActiveViewpoints(packageContent, viewPoints) {
|
|
|
6920
6929
|
|
|
6921
6930
|
var _excluded$a = ["edit", "config"];
|
|
6922
6931
|
getLogger('Seller', 'SingleRenderJobDetail');
|
|
6932
|
+
var useStyles$6 = makeStyles(function (theme) {
|
|
6933
|
+
return {
|
|
6934
|
+
customFont: {
|
|
6935
|
+
fontSize: 15
|
|
6936
|
+
}
|
|
6937
|
+
};
|
|
6938
|
+
});
|
|
6923
6939
|
function SingleRenderJobDetail(_ref) {
|
|
6924
6940
|
var edit = _ref.edit,
|
|
6925
6941
|
config = _ref.config,
|
|
6926
6942
|
props = _objectWithoutProperties(_ref, _excluded$a);
|
|
6927
6943
|
var _useTranslation = useTranslation$1(),
|
|
6928
6944
|
t = _useTranslation.t;
|
|
6945
|
+
var _useDivaCore = useDivaCore();
|
|
6946
|
+
_useDivaCore.actions.userHasPermission;
|
|
6929
6947
|
var _useRenderjobDetail = useRenderjobDetail(props),
|
|
6930
6948
|
packages = _useRenderjobDetail.packages,
|
|
6931
6949
|
selected = _useRenderjobDetail.selected,
|
|
@@ -6936,7 +6954,10 @@ function SingleRenderJobDetail(_ref) {
|
|
|
6936
6954
|
setPackageContent = _useRenderjobDetail.setPackageContent,
|
|
6937
6955
|
onAddtoCardCarderjob = _useRenderjobDetail.onAddtoCardCarderjob,
|
|
6938
6956
|
onOrderRenderjob = _useRenderjobDetail.onOrderRenderjob,
|
|
6939
|
-
onEditRenderjob = _useRenderjobDetail.onEditRenderjob
|
|
6957
|
+
onEditRenderjob = _useRenderjobDetail.onEditRenderjob,
|
|
6958
|
+
canOrderRenderjob = _useRenderjobDetail.canOrderRenderjob;
|
|
6959
|
+
var canOR = canOrderRenderjob();
|
|
6960
|
+
var classes = useStyles$6();
|
|
6940
6961
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
6941
6962
|
children: [/*#__PURE__*/jsx(Typography$1, {
|
|
6942
6963
|
gutterBottom: true,
|
|
@@ -6976,13 +6997,22 @@ function SingleRenderJobDetail(_ref) {
|
|
|
6976
6997
|
return onAddtoCardCarderjob();
|
|
6977
6998
|
},
|
|
6978
6999
|
children: t('renderjob.detail.action.addToCard')
|
|
6979
|
-
}), /*#__PURE__*/jsx(
|
|
6980
|
-
|
|
6981
|
-
|
|
6982
|
-
|
|
6983
|
-
return onOrderRenderjob();
|
|
7000
|
+
}), /*#__PURE__*/jsx(Tooltip, {
|
|
7001
|
+
title: !canOR ? t('renderjob.detail.action.cantorder') : '',
|
|
7002
|
+
classes: {
|
|
7003
|
+
tooltip: classes.customFont
|
|
6984
7004
|
},
|
|
6985
|
-
children:
|
|
7005
|
+
children: /*#__PURE__*/jsx("span", {
|
|
7006
|
+
children: /*#__PURE__*/jsx(Button, {
|
|
7007
|
+
variant: "contained",
|
|
7008
|
+
color: "primary",
|
|
7009
|
+
onClick: function onClick() {
|
|
7010
|
+
return onOrderRenderjob();
|
|
7011
|
+
},
|
|
7012
|
+
disabled: !canOR,
|
|
7013
|
+
children: t('renderjob.detail.action.order')
|
|
7014
|
+
})
|
|
7015
|
+
})
|
|
6986
7016
|
})]
|
|
6987
7017
|
}), edit && /*#__PURE__*/jsx(Button, {
|
|
6988
7018
|
variant: "contained",
|
|
@@ -7031,9 +7061,16 @@ var _excluded$9 = ["edit", "resetRenderJobMode", "config"];
|
|
|
7031
7061
|
function _createForOfIteratorHelper$3(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$3(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
7032
7062
|
function _unsupportedIterableToArray$3(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$3(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$3(r, a) : void 0; } }
|
|
7033
7063
|
function _arrayLikeToArray$3(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
7034
|
-
function ownKeys$
|
|
7035
|
-
function _objectSpread$
|
|
7064
|
+
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; }
|
|
7065
|
+
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; }
|
|
7036
7066
|
getLogger('Seller', 'SingleRenderJobDetail');
|
|
7067
|
+
var useStyles$5 = makeStyles(function (theme) {
|
|
7068
|
+
return {
|
|
7069
|
+
customFont: {
|
|
7070
|
+
fontSize: 15
|
|
7071
|
+
}
|
|
7072
|
+
};
|
|
7073
|
+
});
|
|
7037
7074
|
function SelectRenderPackage(_ref) {
|
|
7038
7075
|
var _renderPackages$selec;
|
|
7039
7076
|
var edit = _ref.edit,
|
|
@@ -7047,10 +7084,12 @@ function SelectRenderPackage(_ref) {
|
|
|
7047
7084
|
setPackageContent = _useRenderjobDetail.setPackageContent,
|
|
7048
7085
|
packageContent = _useRenderjobDetail.packageContent,
|
|
7049
7086
|
setCampaign = _useRenderjobDetail.setCampaign,
|
|
7050
|
-
campaign = _useRenderjobDetail.campaign
|
|
7087
|
+
campaign = _useRenderjobDetail.campaign,
|
|
7088
|
+
canOrderRenderjob = _useRenderjobDetail.canOrderRenderjob;
|
|
7051
7089
|
var _useDivaCore = useDivaCore(),
|
|
7052
7090
|
mediaHandler = _useDivaCore.handler.mediaHandler,
|
|
7053
7091
|
organization = _useDivaCore.state.organization;
|
|
7092
|
+
_useDivaCore.actions.userHasPermission;
|
|
7054
7093
|
var _useState = useState([]),
|
|
7055
7094
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7056
7095
|
renderPackages = _useState2[0],
|
|
@@ -7064,6 +7103,8 @@ function SelectRenderPackage(_ref) {
|
|
|
7064
7103
|
if (res.data) setRenderPackages(res.data);
|
|
7065
7104
|
});
|
|
7066
7105
|
}, []);
|
|
7106
|
+
var canOR = canOrderRenderjob();
|
|
7107
|
+
var classes = useStyles$5();
|
|
7067
7108
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
7068
7109
|
children: [/*#__PURE__*/jsx(Typography$1, {
|
|
7069
7110
|
gutterBottom: true,
|
|
@@ -7106,14 +7147,23 @@ function SelectRenderPackage(_ref) {
|
|
|
7106
7147
|
resetRenderJobMode();
|
|
7107
7148
|
},
|
|
7108
7149
|
children: t('renderjob.detail.action.addToCard')
|
|
7109
|
-
}), /*#__PURE__*/jsx(
|
|
7110
|
-
|
|
7111
|
-
|
|
7112
|
-
|
|
7113
|
-
onOrderRenderPackage(renderPackages[selected], 1);
|
|
7114
|
-
resetRenderJobMode();
|
|
7150
|
+
}), /*#__PURE__*/jsx(Tooltip, {
|
|
7151
|
+
title: !canOR ? t('renderjob.detail.action.cantorder') : '',
|
|
7152
|
+
classes: {
|
|
7153
|
+
tooltip: classes.customFont
|
|
7115
7154
|
},
|
|
7116
|
-
children:
|
|
7155
|
+
children: /*#__PURE__*/jsx("span", {
|
|
7156
|
+
children: /*#__PURE__*/jsx(Button, {
|
|
7157
|
+
variant: "contained",
|
|
7158
|
+
color: "primary",
|
|
7159
|
+
onClick: function onClick() {
|
|
7160
|
+
onOrderRenderPackage(renderPackages[selected], 1);
|
|
7161
|
+
resetRenderJobMode();
|
|
7162
|
+
},
|
|
7163
|
+
disabled: !canOR,
|
|
7164
|
+
children: t('renderjob.detail.action.order')
|
|
7165
|
+
})
|
|
7166
|
+
})
|
|
7117
7167
|
})]
|
|
7118
7168
|
})
|
|
7119
7169
|
})]
|
|
@@ -7139,7 +7189,7 @@ function Presets(_ref2) {
|
|
|
7139
7189
|
var configViewpoint = configuration.viewPoints.filter(function (vp) {
|
|
7140
7190
|
return vp.id === hqPresets[i].viewPoint;
|
|
7141
7191
|
});
|
|
7142
|
-
hqViewPoints.push(_objectSpread$
|
|
7192
|
+
hqViewPoints.push(_objectSpread$u(_objectSpread$u({}, configViewpoint[0]), {}, {
|
|
7143
7193
|
selected: true
|
|
7144
7194
|
}));
|
|
7145
7195
|
};
|
|
@@ -7259,8 +7309,8 @@ function Presets(_ref2) {
|
|
|
7259
7309
|
}
|
|
7260
7310
|
|
|
7261
7311
|
var _excluded$8 = ["active", "edit", "onClose", "config"];
|
|
7262
|
-
function ownKeys$
|
|
7263
|
-
function _objectSpread$
|
|
7312
|
+
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; }
|
|
7313
|
+
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; }
|
|
7264
7314
|
var LOG$a = getLogger('Seller', 'RenderJobDetail');
|
|
7265
7315
|
function RenderJobDetail(_ref) {
|
|
7266
7316
|
var isActive = _ref.active,
|
|
@@ -7295,10 +7345,10 @@ function RenderJobDetail(_ref) {
|
|
|
7295
7345
|
"aria-label": "justified",
|
|
7296
7346
|
children: "PACKAGE"
|
|
7297
7347
|
})]
|
|
7298
|
-
}), renderJobMode === 'SINGLE' && /*#__PURE__*/jsx(SingleRenderJobDetail, _objectSpread$
|
|
7348
|
+
}), renderJobMode === 'SINGLE' && /*#__PURE__*/jsx(SingleRenderJobDetail, _objectSpread$t({
|
|
7299
7349
|
edit: edit,
|
|
7300
7350
|
config: config
|
|
7301
|
-
}, props)), renderJobMode === 'PACKAGE' && !edit && /*#__PURE__*/jsx(SelectRenderPackage, _objectSpread$
|
|
7351
|
+
}, props)), renderJobMode === 'PACKAGE' && !edit && /*#__PURE__*/jsx(SelectRenderPackage, _objectSpread$t({
|
|
7302
7352
|
resetRenderJobMode: function resetRenderJobMode() {
|
|
7303
7353
|
return setRenderJobMode('SINGLE');
|
|
7304
7354
|
},
|
|
@@ -7317,7 +7367,7 @@ function RenderJobDetail$1 (props) {
|
|
|
7317
7367
|
props.onError('Could not open RenderJobDetail. Please try again.');
|
|
7318
7368
|
props.onClose();
|
|
7319
7369
|
},
|
|
7320
|
-
children: /*#__PURE__*/jsx(RenderJobDetail, _objectSpread$
|
|
7370
|
+
children: /*#__PURE__*/jsx(RenderJobDetail, _objectSpread$t({}, props))
|
|
7321
7371
|
});
|
|
7322
7372
|
}
|
|
7323
7373
|
|
|
@@ -7334,7 +7384,8 @@ function Table(_ref) {
|
|
|
7334
7384
|
_useDivaCore$state = _useDivaCore.state,
|
|
7335
7385
|
apiConfig = _useDivaCore$state.apiConfig,
|
|
7336
7386
|
organization = _useDivaCore$state.organization,
|
|
7337
|
-
jwt = _useDivaCore$state.jwt
|
|
7387
|
+
jwt = _useDivaCore$state.jwt,
|
|
7388
|
+
userHasPermission = _useDivaCore.actions.userHasPermission;
|
|
7338
7389
|
var _useTranslation = useTranslation(),
|
|
7339
7390
|
t = _useTranslation.t,
|
|
7340
7391
|
i18n = _useTranslation.i18n;
|
|
@@ -7463,6 +7514,9 @@ function Table(_ref) {
|
|
|
7463
7514
|
onClick: function onClick(item, rowId, updateData) {
|
|
7464
7515
|
onOrder(item, updateData);
|
|
7465
7516
|
},
|
|
7517
|
+
disabled: function disabled(item) {
|
|
7518
|
+
return !userHasPermission('orderhqmedia');
|
|
7519
|
+
},
|
|
7466
7520
|
hide: function hide(item) {
|
|
7467
7521
|
return item.state != 0;
|
|
7468
7522
|
}
|
|
@@ -7529,6 +7583,9 @@ function useRenderjobs$1(_ref) {
|
|
|
7529
7583
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
7530
7584
|
renderDetailJobState = _useState4[0],
|
|
7531
7585
|
setRenderDetailJobState = _useState4[1];
|
|
7586
|
+
useEffect(function () {
|
|
7587
|
+
setSelected(hasVariants ? [] : [baseData]);
|
|
7588
|
+
}, [baseData]);
|
|
7532
7589
|
var onNewRenderjob = function onNewRenderjob(onSuccess) {
|
|
7533
7590
|
if (saved) {
|
|
7534
7591
|
setRenderDetailJobState({
|
|
@@ -7883,8 +7940,8 @@ function logError(e, t, onError) {
|
|
|
7883
7940
|
|
|
7884
7941
|
var wrapper$8 = "wrapper-7n8yS";
|
|
7885
7942
|
var dataTable$1 = "data-table-oVyKo";
|
|
7886
|
-
var css_248z$
|
|
7887
|
-
styleInject(css_248z$
|
|
7943
|
+
var css_248z$c = ".wrapper-7n8yS {\n display: flex;\n height: 100%;\n border-bottom: 1px solid rgb(224, 224, 224);\n}\n\n.data-table-oVyKo {\n position: relative;\n height: 100%;\n flex-grow: 1;\n overflow: hidden;\n}\n";
|
|
7944
|
+
styleInject(css_248z$c);
|
|
7888
7945
|
|
|
7889
7946
|
function RenderJobTable (props) {
|
|
7890
7947
|
var _useRenderjobs = useRenderjobs$1(props),
|
|
@@ -7933,30 +7990,32 @@ function RenderJobTable (props) {
|
|
|
7933
7990
|
});
|
|
7934
7991
|
}
|
|
7935
7992
|
|
|
7993
|
+
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; }
|
|
7994
|
+
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; }
|
|
7936
7995
|
function useProduct(basket) {
|
|
7937
7996
|
var _useState = useState(undefined),
|
|
7938
7997
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7939
7998
|
currentProduct = _useState2[0],
|
|
7940
7999
|
setCurrentProduct = _useState2[1];
|
|
7941
|
-
var _useState3 = useState(false),
|
|
7942
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
7943
|
-
saved = _useState4[0],
|
|
7944
|
-
setSaved = _useState4[1];
|
|
7945
8000
|
var _useDivaCore = useDivaCore(),
|
|
7946
8001
|
productHandler = _useDivaCore.handler.productHandler;
|
|
7947
8002
|
var loadProduct = /*#__PURE__*/function () {
|
|
7948
8003
|
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
8004
|
+
var _myProduct$baseData$p;
|
|
7949
8005
|
var myProduct;
|
|
7950
8006
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
7951
8007
|
while (1) switch (_context.prev = _context.next) {
|
|
7952
8008
|
case 0:
|
|
7953
8009
|
_context.next = 2;
|
|
7954
8010
|
return productHandler.loadProducts({
|
|
7955
|
-
basket: new BasketData(basket)
|
|
8011
|
+
basket: new BasketData(basket),
|
|
8012
|
+
divaNr: basket.DivaNr
|
|
7956
8013
|
});
|
|
7957
8014
|
case 2:
|
|
7958
8015
|
myProduct = _context.sent;
|
|
7959
|
-
setCurrentProduct(myProduct.baseData)
|
|
8016
|
+
setCurrentProduct(_objectSpread$s(_objectSpread$s({}, myProduct.baseData), {}, {
|
|
8017
|
+
parent: (_myProduct$baseData$p = myProduct.baseData.parent) !== null && _myProduct$baseData$p !== void 0 ? _myProduct$baseData$p : myProduct.baseData._id
|
|
8018
|
+
}));
|
|
7960
8019
|
return _context.abrupt("return", myProduct);
|
|
7961
8020
|
case 5:
|
|
7962
8021
|
case "end":
|
|
@@ -7973,29 +8032,30 @@ function useProduct(basket) {
|
|
|
7973
8032
|
}, [basket]);
|
|
7974
8033
|
var saveProduct = /*#__PURE__*/function () {
|
|
7975
8034
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(favourite) {
|
|
8035
|
+
var _myproduct$0$parent;
|
|
7976
8036
|
var myproduct;
|
|
7977
8037
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
7978
8038
|
while (1) switch (_context2.prev = _context2.next) {
|
|
7979
8039
|
case 0:
|
|
7980
8040
|
_context2.next = 2;
|
|
7981
|
-
return productHandler.
|
|
7982
|
-
products: [currentProduct]
|
|
7983
|
-
basket: !saved ? new BasketData(basket) : undefined
|
|
8041
|
+
return productHandler.saveProducts({
|
|
8042
|
+
products: [currentProduct]
|
|
7984
8043
|
});
|
|
7985
8044
|
case 2:
|
|
7986
8045
|
myproduct = _context2.sent;
|
|
7987
|
-
setCurrentProduct(myproduct[0])
|
|
7988
|
-
|
|
8046
|
+
setCurrentProduct(_objectSpread$s(_objectSpread$s({}, myproduct[0]), {}, {
|
|
8047
|
+
parent: (_myproduct$0$parent = myproduct[0].parent) !== null && _myproduct$0$parent !== void 0 ? _myproduct$0$parent : myproduct[0]._id
|
|
8048
|
+
}));
|
|
7989
8049
|
if (!favourite) {
|
|
7990
|
-
_context2.next =
|
|
8050
|
+
_context2.next = 7;
|
|
7991
8051
|
break;
|
|
7992
8052
|
}
|
|
7993
|
-
_context2.next =
|
|
8053
|
+
_context2.next = 7;
|
|
7994
8054
|
return productHandler.apiSetCustomFlag(currentProduct._id, 'isFavourite', basket.OrganizationId, 'activate');
|
|
7995
|
-
case
|
|
8055
|
+
case 7:
|
|
7996
8056
|
setCurrentProduct(currentProduct);
|
|
7997
8057
|
basket.DocumentVersion = basket.DocumentVersion + 1;
|
|
7998
|
-
case
|
|
8058
|
+
case 9:
|
|
7999
8059
|
case "end":
|
|
8000
8060
|
return _context2.stop();
|
|
8001
8061
|
}
|
|
@@ -8016,8 +8076,8 @@ var paperContainer = "paperContainer-9grpT";
|
|
|
8016
8076
|
var hqMediaHeaderContainer = "hqMediaHeaderContainer-PlXdo";
|
|
8017
8077
|
var hqmediaContainer = "hqmediaContainer-sBjym";
|
|
8018
8078
|
var hqMediaTitle = "hqMediaTitle-ugda8";
|
|
8019
|
-
var css_248z$
|
|
8020
|
-
styleInject(css_248z$
|
|
8079
|
+
var css_248z$b = ".paperContainer-9grpT {\n height: 68vh;\n margin-left: 50px;\n margin-right: 50px;\n margin-top: 10px;\n}\n\n.hqMediaHeaderContainer-PlXdo {\n display: flex;\n justify-content: space-between;\n padding-left: 15px;\n}\n\n.hqmediaContainer-sBjym {\n height: 90%;\n border: 1px solid rgb(224, 224, 224);\n}\n.hqMediaTitle-ugda8 {\n font-size: 20px;\n font-weight: normal;\n color: #333;\n padding: 10px 0;\n}\n";
|
|
8080
|
+
styleInject(css_248z$b);
|
|
8021
8081
|
|
|
8022
8082
|
function ownKeys$r(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; }
|
|
8023
8083
|
function _objectSpread$r(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$r(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$r(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -8041,10 +8101,12 @@ function CheckOut(_ref) {
|
|
|
8041
8101
|
setIsSaving = _useState2[1];
|
|
8042
8102
|
var _useState3 = useState(false),
|
|
8043
8103
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
8044
|
-
|
|
8045
|
-
|
|
8046
|
-
|
|
8047
|
-
|
|
8104
|
+
isSaved = _useState4[0],
|
|
8105
|
+
setIsSaved = _useState4[1];
|
|
8106
|
+
var _useState5 = useState(false),
|
|
8107
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
8108
|
+
showRenderJobs = _useState6[0],
|
|
8109
|
+
setShowRenderJobs = _useState6[1];
|
|
8048
8110
|
var _useTranslation = useTranslation(),
|
|
8049
8111
|
t = _useTranslation.t;
|
|
8050
8112
|
var _useSellerState = useSellerState(),
|
|
@@ -8126,7 +8188,7 @@ function CheckOut(_ref) {
|
|
|
8126
8188
|
while (1) switch (_context3.prev = _context3.next) {
|
|
8127
8189
|
case 0:
|
|
8128
8190
|
if (!(status === 'BASE_CONFIGURATION')) {
|
|
8129
|
-
_context3.next =
|
|
8191
|
+
_context3.next = 13;
|
|
8130
8192
|
break;
|
|
8131
8193
|
}
|
|
8132
8194
|
if (!hqMedia) {
|
|
@@ -8150,8 +8212,9 @@ function CheckOut(_ref) {
|
|
|
8150
8212
|
text: t('basket.checkout.productsavedtext')
|
|
8151
8213
|
});
|
|
8152
8214
|
case 11:
|
|
8215
|
+
setIsSaved(true);
|
|
8153
8216
|
return _context3.abrupt("return");
|
|
8154
|
-
case
|
|
8217
|
+
case 13:
|
|
8155
8218
|
if (!isSaving) {
|
|
8156
8219
|
setIsSaving(true);
|
|
8157
8220
|
onClickSave(openPDF, sendMail).then(function (p) {
|
|
@@ -8160,7 +8223,7 @@ function CheckOut(_ref) {
|
|
|
8160
8223
|
return setIsSaving(false);
|
|
8161
8224
|
});
|
|
8162
8225
|
}
|
|
8163
|
-
case
|
|
8226
|
+
case 14:
|
|
8164
8227
|
case "end":
|
|
8165
8228
|
return _context3.stop();
|
|
8166
8229
|
}
|
|
@@ -8214,7 +8277,8 @@ function CheckOut(_ref) {
|
|
|
8214
8277
|
}), /*#__PURE__*/jsx(StatusMenu, {
|
|
8215
8278
|
visibleStatus: statusArray,
|
|
8216
8279
|
status: status,
|
|
8217
|
-
setStatus: setStatus
|
|
8280
|
+
setStatus: setStatus,
|
|
8281
|
+
productSaved: isSaved
|
|
8218
8282
|
})]
|
|
8219
8283
|
}), /*#__PURE__*/jsxs("div", {
|
|
8220
8284
|
children: [showRenderJobs && /*#__PURE__*/jsxs(Paper$1, {
|
|
@@ -8238,8 +8302,10 @@ function CheckOut(_ref) {
|
|
|
8238
8302
|
baseData: currentProduct,
|
|
8239
8303
|
basketData: basket,
|
|
8240
8304
|
onSave: function onSave() {
|
|
8241
|
-
return productHandler.
|
|
8305
|
+
return productHandler.saveProducts({
|
|
8242
8306
|
products: [currentProduct]
|
|
8307
|
+
}).then(function (r) {
|
|
8308
|
+
return !!r.length;
|
|
8243
8309
|
});
|
|
8244
8310
|
},
|
|
8245
8311
|
saved: true,
|
|
@@ -9635,8 +9701,8 @@ var descriptionContainer$1 = "description-container-k1vLT";
|
|
|
9635
9701
|
var modelTitle = "model-title-Sgm-0";
|
|
9636
9702
|
var description = "description-GyPZq";
|
|
9637
9703
|
var pdf = "pdf-oNnao";
|
|
9638
|
-
var css_248z$
|
|
9639
|
-
styleInject(css_248z$
|
|
9704
|
+
var css_248z$a = ".wrapper-fSL18 {\n display: flex;\n flex-direction: column;\n padding: 0 12px;\n max-height: calc(100% - 42px);\n}\n\n.title-iTDPA {\n padding: 16px 8px;\n font-size: 36px;\n}\n\n.subTitle-4-0PW {\n padding: 12px 18px;\n font-size: 28px;\n}\n\n.description-container-k1vLT {\n display: flex;\n flex-direction: column;\n background-color: #f8f8f8;\n padding: 18px;\n gap: 12px;\n height: calc(100% - 164px);\n}\n\n.model-title-Sgm-0 {\n font-size: 24px;\n font-weight: 600;\n}\n.description-GyPZq {\n font-size: 16px;\n overflow: auto;\n flex-grow: 3;\n}\n\n.pdf-oNnao {\n display: 'flex';\n flex: 1 1 10px;\n}\n\n.pdf-oNnao svg {\n margin-right: 10px;\n}\n";
|
|
9705
|
+
styleInject(css_248z$a);
|
|
9640
9706
|
|
|
9641
9707
|
var _excluded$7 = ["data", "text"];
|
|
9642
9708
|
function ownKeys$o(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; }
|
|
@@ -9692,8 +9758,8 @@ var button = "button-NXyWV";
|
|
|
9692
9758
|
var navBack = "nav-back-AzU6X";
|
|
9693
9759
|
var icon$1 = "icon-0h-39";
|
|
9694
9760
|
var text = "text-55Zpw";
|
|
9695
|
-
var css_248z$
|
|
9696
|
-
styleInject(css_248z$
|
|
9761
|
+
var css_248z$9 = ".wrapper-oUrTP {\n right: 10px;\n display: flex;\n justify-content: flex-end;\n align-items: center;\n z-index: 500;\n background-color: #fff;\n position: absolute;\n bottom: 0;\n width: 83%;\n}\n\n.container-Sr3pC {\n display: flex;\n gap: 12px;\n width: 50%;\n justify-content: flex-end;\n padding: 8px;\n}\n\n.button-NXyWV {\n height: 50px;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: var(--diva-theme-palette-primary-main);\n border-radius: 2px;\n border-color: var(--diva-theme-palette-primary-main);\n border-style: solid;\n border-width: 1.5px;\n flex-grow: 1;\n cursor: pointer;\n}\n\n.nav-back-AzU6X {\n width: 50px;\n height: 50px;\n border-radius: 2px;\n border-color: var(--diva-theme-palette-primary-main);\n border-style: solid;\n border-width: 1.5px;\n background-color: #fff;\n background-image: url(\"data:image/svg+xml,%3Csvg width%3D%2210%22 height%3D%2218%22 viewBox%3D%220 0 10 18%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath d%3D%22M9 1L1 9L9 17%22 stroke%3D%22%23713434%22 stroke-width%3D%221.5%22 stroke-linecap%3D%22round%22 stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\");\n background-size: 27%;\n background-repeat: no-repeat;\n background-position: center center;\n cursor: pointer;\n}\n\n.icon-0h-39 {\n width: 24px;\n height: 24px;\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center center;\n}\n\n.text-55Zpw {\n text-align: center;\n /* flex-basis: 100%; */\n color: white;\n}\n";
|
|
9762
|
+
styleInject(css_248z$9);
|
|
9697
9763
|
|
|
9698
9764
|
var _excluded$6 = ["navigateBack", "buttons"];
|
|
9699
9765
|
function ownKeys$n(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -9742,10 +9808,7 @@ var favPlanning = "fav-planning-R8cxS";
|
|
|
9742
9808
|
var setPlanning = "set-planning-1AQNC";
|
|
9743
9809
|
var articleList = "article-list-uOn26";
|
|
9744
9810
|
var analyticsIcon = "analytics-icon-kCv53";
|
|
9745
|
-
var css_248z$
|
|
9746
|
-
styleInject(css_248z$9);
|
|
9747
|
-
|
|
9748
|
-
var css_248z$8 = "#diva-catalog-images .swiper {\n margin-left: auto;\n margin-right: auto;\n position: relative;\n overflow: hidden;\n list-style: none;\n padding: 0;\n /* Fix of Webkit flickering */\n z-index: 1;\n display: block;\n}\n#diva-catalog-images .swiper-vertical > .swiper-wrapper {\n flex-direction: column;\n}\n#diva-catalog-images .swiper-wrapper {\n position: relative;\n width: 100%;\n height: 100%;\n z-index: 1;\n display: flex;\n transition-property: transform;\n transition-timing-function: initial;\n transition-timing-function: var(--swiper-wrapper-transition-timing-function, initial);\n box-sizing: content-box;\n}\n#diva-catalog-images .swiper-android .swiper-slide,\n#diva-catalog-images .swiper-ios .swiper-slide,\n#diva-catalog-images .swiper-wrapper {\n transform: translate3d(0px, 0, 0);\n}\n#diva-catalog-images .swiper-horizontal {\n touch-action: pan-y;\n}\n#diva-catalog-images .swiper-vertical {\n touch-action: pan-x;\n}\n#diva-catalog-images .swiper-slide {\n flex-shrink: 0;\n width: 100%;\n height: 100%;\n position: relative;\n transition-property: transform;\n display: block;\n}\n#diva-catalog-images .swiper-slide-invisible-blank {\n visibility: hidden;\n}\n/* Auto Height */\n#diva-catalog-images .swiper-autoheight,\n#diva-catalog-images .swiper-autoheight .swiper-slide {\n height: auto;\n}\n#diva-catalog-images .swiper-autoheight .swiper-wrapper {\n align-items: flex-start;\n transition-property: transform, height;\n}\n#diva-catalog-images .swiper-backface-hidden .swiper-slide {\n transform: translateZ(0);\n backface-visibility: hidden;\n}\n/* 3D Effects */\n#diva-catalog-images .swiper-3d.swiper-css-mode .swiper-wrapper {\n perspective: 1200px;\n}\n#diva-catalog-images .swiper-3d .swiper-wrapper {\n transform-style: preserve-3d;\n}\n#diva-catalog-images .swiper-3d {\n perspective: 1200px;\n}\n#diva-catalog-images .swiper-3d .swiper-slide,\n#diva-catalog-images .swiper-3d .swiper-cube-shadow {\n transform-style: preserve-3d;\n}\n/* CSS Mode */\n#diva-catalog-images .swiper-css-mode > .swiper-wrapper {\n overflow: auto;\n scrollbar-width: none;\n /* For Firefox */\n -ms-overflow-style: none;\n /* For Internet Explorer and Edge */\n}\n#diva-catalog-images .swiper-css-mode > .swiper-wrapper::-webkit-scrollbar {\n display: none;\n}\n#diva-catalog-images .swiper-css-mode > .swiper-wrapper > .swiper-slide {\n scroll-snap-align: start start;\n}\n#diva-catalog-images .swiper-css-mode.swiper-horizontal > .swiper-wrapper {\n scroll-snap-type: x mandatory;\n}\n#diva-catalog-images .swiper-css-mode.swiper-vertical > .swiper-wrapper {\n scroll-snap-type: y mandatory;\n}\n#diva-catalog-images .swiper-css-mode.swiper-free-mode > .swiper-wrapper {\n scroll-snap-type: none;\n}\n#diva-catalog-images .swiper-css-mode.swiper-free-mode > .swiper-wrapper > .swiper-slide {\n scroll-snap-align: none;\n}\n#diva-catalog-images .swiper-css-mode.swiper-centered > .swiper-wrapper::before {\n content: '';\n flex-shrink: 0;\n order: 9999;\n}\n#diva-catalog-images .swiper-css-mode.swiper-centered > .swiper-wrapper > .swiper-slide {\n scroll-snap-align: center center;\n scroll-snap-stop: always;\n}\n[dir=\"ltr\"] #diva-catalog-images .swiper-css-mode.swiper-centered.swiper-horizontal > .swiper-wrapper > .swiper-slide:first-child {\n margin-left: var(--swiper-centered-offset-before);\n}\n[dir=\"rtl\"] #diva-catalog-images .swiper-css-mode.swiper-centered.swiper-horizontal > .swiper-wrapper > .swiper-slide:first-child {\n margin-right: var(--swiper-centered-offset-before);\n}\n#diva-catalog-images .swiper-css-mode.swiper-centered.swiper-horizontal > .swiper-wrapper::before {\n height: 100%;\n min-height: 1px;\n width: var(--swiper-centered-offset-after);\n}\n#diva-catalog-images .swiper-css-mode.swiper-centered.swiper-vertical > .swiper-wrapper > .swiper-slide:first-child {\n margin-top: var(--swiper-centered-offset-before);\n}\n#diva-catalog-images .swiper-css-mode.swiper-centered.swiper-vertical > .swiper-wrapper::before {\n width: 100%;\n min-width: 1px;\n height: var(--swiper-centered-offset-after);\n}\n/* Slide styles start */\n/* 3D Shadows */\n#diva-catalog-images .swiper-3d .swiper-slide-shadow,\n#diva-catalog-images .swiper-3d .swiper-slide-shadow-left,\n#diva-catalog-images .swiper-3d .swiper-slide-shadow-right,\n#diva-catalog-images .swiper-3d .swiper-slide-shadow-top,\n#diva-catalog-images .swiper-3d .swiper-slide-shadow-bottom,\n#diva-catalog-images .swiper-3d .swiper-slide-shadow,\n#diva-catalog-images .swiper-3d .swiper-slide-shadow-left,\n#diva-catalog-images .swiper-3d .swiper-slide-shadow-right,\n#diva-catalog-images .swiper-3d .swiper-slide-shadow-top,\n#diva-catalog-images .swiper-3d .swiper-slide-shadow-bottom {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n z-index: 10;\n}\n#diva-catalog-images .swiper-3d .swiper-slide-shadow {\n background: rgba(0, 0, 0, 0.15);\n}\n#diva-catalog-images .swiper-3d .swiper-slide-shadow-left {\n background-image: linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n}\n#diva-catalog-images .swiper-3d .swiper-slide-shadow-right {\n background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n}\n#diva-catalog-images .swiper-3d .swiper-slide-shadow-top {\n background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n}\n#diva-catalog-images .swiper-3d .swiper-slide-shadow-bottom {\n background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n}\n#diva-catalog-images .swiper-lazy-preloader {\n width: 42px;\n height: 42px;\n position: absolute;\n left: 50%;\n top: 50%;\n margin-left: -21px;\n margin-top: -21px;\n z-index: 10;\n transform-origin: 50%;\n box-sizing: border-box;\n border: 4px solid var(--swiper-theme-color);\n border: 4px solid var(--swiper-preloader-color, var(--swiper-theme-color));\n border-radius: 50%;\n border-top-color: transparent;\n}\n#diva-catalog-images .swiper:not(.swiper-watch-progress) .swiper-lazy-preloader,\n#diva-catalog-images .swiper-watch-progress .swiper-slide-visible .swiper-lazy-preloader {\n animation: swiper-preloader-spin 1s infinite linear;\n}\n#diva-catalog-images .swiper-lazy-preloader-white {\n --swiper-preloader-color: #fff;\n}\n#diva-catalog-images .swiper-lazy-preloader-black {\n --swiper-preloader-color: #000;\n}\n@keyframes swiper-preloader-spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n/* Slide styles end */\n\n/* Pagination */\n\n#diva-catalog-images .swiper-pagination {\n position: absolute;\n text-align: center;\n transition: 300ms opacity;\n transform: translate3d(0, 0, 0);\n z-index: 10;\n}\n#diva-catalog-images .swiper-pagination.swiper-pagination-hidden {\n opacity: 0;\n}\n#diva-catalog-images .swiper-pagination-disabled > .swiper-pagination,\n#diva-catalog-images .swiper-pagination.swiper-pagination-disabled {\n display: none !important;\n}\n/* Common Styles */\n#diva-catalog-images .swiper-pagination-fraction,\n#diva-catalog-images .swiper-pagination-custom,\n#diva-catalog-images .swiper-horizontal > .swiper-pagination-bullets,\n#diva-catalog-images .swiper-pagination-bullets.swiper-pagination-horizontal {\n bottom: 8px;\n bottom: var(--swiper-pagination-bottom, 8px);\n top: auto;\n top: var(--swiper-pagination-top, auto);\n left: 0;\n width: 100%;\n}\n/* Bullets */\n#diva-catalog-images .swiper-pagination-bullets-dynamic {\n overflow: hidden;\n font-size: 0;\n}\n#diva-catalog-images .swiper-pagination-bullets-dynamic .swiper-pagination-bullet {\n transform: scale(0.33);\n position: relative;\n}\n#diva-catalog-images .swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active {\n transform: scale(1);\n}\n#diva-catalog-images .swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main {\n transform: scale(1);\n}\n#diva-catalog-images .swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev {\n transform: scale(0.66);\n}\n#diva-catalog-images .swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev {\n transform: scale(0.33);\n}\n#diva-catalog-images .swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next {\n transform: scale(0.66);\n}\n#diva-catalog-images .swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next {\n transform: scale(0.33);\n}\n#diva-catalog-images .swiper-pagination-bullet {\n width: 8px;\n width: var(--swiper-pagination-bullet-width, var(--swiper-pagination-bullet-size, 8px));\n height: 8px;\n height: var(--swiper-pagination-bullet-height, var(--swiper-pagination-bullet-size, 8px));\n display: inline-block;\n border-radius: 50%;\n border-radius: var(--swiper-pagination-bullet-border-radius, 50%);\n background: #000;\n background: var(--swiper-pagination-bullet-inactive-color, #000);\n opacity: 0.2;\n opacity: var(--swiper-pagination-bullet-inactive-opacity, 0.2);\n}\n#diva-catalog-images button.swiper-pagination-bullet {\n border: none;\n margin: 0;\n padding: 0;\n box-shadow: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n}\n#diva-catalog-images .swiper-pagination-clickable .swiper-pagination-bullet {\n cursor: pointer;\n}\n#diva-catalog-images .swiper-pagination-bullet:only-child {\n display: none !important;\n}\n#diva-catalog-images .swiper-pagination-bullet-active {\n opacity: 1;\n opacity: var(--swiper-pagination-bullet-opacity, 1);\n background: var(--swiper-theme-color);\n background: var(--swiper-pagination-color, var(--swiper-theme-color));\n}\n#diva-catalog-images .swiper-vertical > .swiper-pagination-bullets,\n#diva-catalog-images .swiper-pagination-vertical.swiper-pagination-bullets {\n right: 8px;\n right: var(--swiper-pagination-right, 8px);\n left: auto;\n left: var(--swiper-pagination-left, auto);\n top: 50%;\n transform: translate3d(0px, -50%, 0);\n}\n#diva-catalog-images .swiper-vertical > .swiper-pagination-bullets .swiper-pagination-bullet,\n#diva-catalog-images .swiper-pagination-vertical.swiper-pagination-bullets .swiper-pagination-bullet {\n margin: 6px 0;\n margin: var(--swiper-pagination-bullet-vertical-gap, 6px) 0;\n display: block;\n}\n#diva-catalog-images .swiper-vertical > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic,\n#diva-catalog-images .swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic {\n top: 50%;\n transform: translateY(-50%);\n width: 8px;\n}\n#diva-catalog-images .swiper-vertical > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,\n#diva-catalog-images .swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {\n display: inline-block;\n transition: 200ms transform, 200ms top;\n}\n#diva-catalog-images .swiper-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet,\n#diva-catalog-images .swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet {\n margin: 0 4px;\n margin: 0 var(--swiper-pagination-bullet-horizontal-gap, 4px);\n}\n#diva-catalog-images .swiper-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic,\n#diva-catalog-images .swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic {\n left: 50%;\n transform: translateX(-50%);\n white-space: nowrap;\n}\n#diva-catalog-images .swiper-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,\n#diva-catalog-images .swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {\n transition: 200ms transform, 200ms left;\n}\n#diva-catalog-images .swiper-horizontal.swiper-rtl > .swiper-pagination-bullets-dynamic .swiper-pagination-bullet {\n transition: 200ms transform, 200ms right;\n}\n/* Fraction */\n#diva-catalog-images .swiper-pagination-fraction {\n color: inherit;\n color: var(--swiper-pagination-fraction-color, inherit);\n}\n/* Progress */\n#diva-catalog-images .swiper-pagination-progressbar {\n background: rgba(0, 0, 0, 0.25);\n background: var(--swiper-pagination-progressbar-bg-color, rgba(0, 0, 0, 0.25));\n position: absolute;\n}\n#diva-catalog-images .swiper-pagination-progressbar .swiper-pagination-progressbar-fill {\n background: var(--swiper-theme-color);\n background: var(--swiper-pagination-color, var(--swiper-theme-color));\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n transform: scale(0);\n transform-origin: left top;\n}\n#diva-catalog-images .swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill {\n transform-origin: right top;\n}\n#diva-catalog-images .swiper-horizontal > .swiper-pagination-progressbar,\n#diva-catalog-images .swiper-pagination-progressbar.swiper-pagination-horizontal,\n#diva-catalog-images .swiper-vertical > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,\n#diva-catalog-images .swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite {\n width: 100%;\n height: 4px;\n height: var(--swiper-pagination-progressbar-size, 4px);\n left: 0;\n top: 0;\n}\n#diva-catalog-images .swiper-vertical > .swiper-pagination-progressbar,\n#diva-catalog-images .swiper-pagination-progressbar.swiper-pagination-vertical,\n#diva-catalog-images .swiper-horizontal > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,\n#diva-catalog-images .swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite {\n width: 4px;\n width: var(--swiper-pagination-progressbar-size, 4px);\n height: 100%;\n left: 0;\n top: 0;\n}\n#diva-catalog-images .swiper-pagination-lock {\n display: none;\n}\n\n/* Free Mode */\n\n#diva-catalog-images .swiper-free-mode > .swiper-wrapper {\n transition-timing-function: ease-out;\n margin: 0 auto;\n}\n";
|
|
9811
|
+
var css_248z$8 = ".layout-NhUpB {\n display: grid;\n grid-template-columns: repeat(12, 1fr);\n grid-template-rows: repeat(10, 1fr);\n grid-column-gap: 0px;\n grid-row-gap: 0px;\n overflow: auto;\n height: 100%;\n}\n\n.info-9St01 {\n grid-area: 1 / 1 / 11 / 3;\n z-index: 100;\n}\n\n.right-side-64-Yz {\n grid-area: 1 / 3 / 11 / 13;\n width: 100%;\n display: flex;\n flex-direction: column;\n position: relative;\n}\n\n.scroller-container-TAsAz {\n overflow: auto;\n height: calc(100% - 70px);\n}\n\n.catalog-images-jJGqW {\n padding: 12px 12px 0 12px;\n height: calc(50% - 12px);\n}\n.products-hidden-T6mTt .catalog-images-jJGqW {\n height: calc(100% - 12px);\n}\n.products-QxoIf {\n height: 50%;\n}\n.footer-1ONIt {\n bottom: 0;\n right: 8px;\n}\n\n.empty-planning-BZTrr {\n background-image: url(\"data:image/svg+xml,%3Csvg width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath d%3D%22M4 16L3.57574 15.5757C3.46321 15.6883 3.4 15.8409 3.4 16H4ZM17 3L17.4243 2.57574C17.1899 2.34142 16.8101 2.34142 16.5757 2.57574L17 3ZM21 7L21.4243 7.42426C21.6586 7.18995 21.6586 6.81005 21.4243 6.57574L21 7ZM8 20V20.6C8.15913 20.6 8.31174 20.5368 8.42426 20.4243L8 20ZM4 20H3.4C3.4 20.3314 3.66863 20.6 4 20.6V20ZM12 19.4C11.6686 19.4 11.4 19.6686 11.4 20C11.4 20.3314 11.6686 20.6 12 20.6V19.4ZM20.5 20.6C20.8314 20.6 21.1 20.3314 21.1 20C21.1 19.6686 20.8314 19.4 20.5 19.4V20.6ZM4.42426 16.4243L17.4243 3.42426L16.5757 2.57574L3.57574 15.5757L4.42426 16.4243ZM16.5757 3.42426L20.5757 7.42426L21.4243 6.57574L17.4243 2.57574L16.5757 3.42426ZM20.5757 6.57574L7.57574 19.5757L8.42426 20.4243L21.4243 7.42426L20.5757 6.57574ZM8 19.4H4V20.6H8V19.4ZM4.6 20V16H3.4V20H4.6ZM13.5757 6.42426L17.5757 10.4243L18.4243 9.57574L14.4243 5.57574L13.5757 6.42426ZM12 20.6H20.5V19.4H12V20.6Z%22 fill%3D%22white%22%2F%3E%3C%2Fsvg%3E\");\n}\n\n.fav-planning-R8cxS {\n background-image: url(\"data:image/svg+xml,%3Csvg width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath d%3D%22M4.3314 12.0474L12 20L19.6686 12.0474C20.5211 11.1633 21 9.96429 21 8.71405C21 6.11055 18.9648 4 16.4543 4C15.2487 4 14.0925 4.49666 13.24 5.38071L12 6.66667L10.76 5.38071C9.90749 4.49666 8.75128 4 7.54569 4C5.03517 4 3 6.11055 3 8.71405C3 9.96429 3.47892 11.1633 4.3314 12.0474Z%22 stroke%3D%22white%22 stroke-width%3D%221.5%22 stroke-linecap%3D%22round%22 stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\");\n}\n\n.set-planning-1AQNC {\n background-image: url(\"data:image/svg+xml,%3Csvg width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath d%3D%22M7.11164 16.5938L3.8061 18.9095C3.46519 19.1412 3 18.9011 3 18.4934V5.5064C3 5.12726 3.4083 4.88294 3.75042 5.05738L7.1021 6.77004M12.1193 16.7346V9.76989C12.1193 9.49058 12.3494 9.26416 12.6332 9.26416H16.1086C16.3924 9.26416 16.6225 9.49058 16.6225 9.76989V16.7346M7.46741 16.7346H19.486C19.7699 16.7346 20 16.5081 20 16.2288V7.12577C20 6.84647 19.7699 6.62004 19.486 6.62004H7.46741C7.18356 6.62004 6.95346 6.84647 6.95346 7.12577V16.2288C6.95346 16.5081 7.18356 16.7346 7.46741 16.7346Z%22 stroke%3D%22white%22 stroke-width%3D%221.5%22%2F%3E%3C%2Fsvg%3E\");\n}\n\n.article-list-uOn26 {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 viewBox%3D%220 0 24 24%22 %3E %3Cpath fill%3D%22white%22 d%3D%22M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z%22%2F%3E%3C%2Fsvg%3E\");\n}\n\n.analytics-icon-kCv53 {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 stroke%3D%22%23fff%22 fill%3D%22%23fff%22 stroke-width%3D%222px%22 height%3D%2248%22 width%3D%2248%22%3E%3Cpath d%3D%22M7.3 40.7v-2.1l1.1-1.1v3.2Zm8.1 0V30.6l1.1-1.1v11.2Zm8.05 0V29.5l1.1 1.15V40.7Zm8.1 0V30.65l1.1-1.1V40.7Zm8.05 0V22.6l1.1-1.1v19.2ZM7.3 28.05v-1.5L20 13.85l8 8 12.7-12.7v1.55L28 23.4l-8-8Z%22%2F%3E%3C%2Fsvg%3E\");\n}\n";
|
|
9749
9812
|
styleInject(css_248z$8);
|
|
9750
9813
|
|
|
9751
9814
|
var wrapper$5 = "wrapper-D5Cmc";
|
|
@@ -9777,7 +9840,7 @@ var CatalogImages = function CatalogImages(_ref) {
|
|
|
9777
9840
|
modules: [Autoplay, Thumbs, Pagination],
|
|
9778
9841
|
spaceBetween: 10,
|
|
9779
9842
|
thumbs: {
|
|
9780
|
-
swiper: thumbsSwiper
|
|
9843
|
+
swiper: thumbsSwiper && !thumbsSwiper.destroyed ? thumbsSwiper : null
|
|
9781
9844
|
},
|
|
9782
9845
|
style: {
|
|
9783
9846
|
height: '100%',
|
|
@@ -9797,9 +9860,7 @@ var CatalogImages = function CatalogImages(_ref) {
|
|
|
9797
9860
|
}, index);
|
|
9798
9861
|
})
|
|
9799
9862
|
}), /*#__PURE__*/jsx(Swiper, {
|
|
9800
|
-
onSwiper:
|
|
9801
|
-
return setThumbsSwiper(swiper);
|
|
9802
|
-
},
|
|
9863
|
+
onSwiper: setThumbsSwiper,
|
|
9803
9864
|
spaceBetween: 10,
|
|
9804
9865
|
slidesPerView: props.showProducts ? 4 : 10,
|
|
9805
9866
|
freeMode: true,
|
|
@@ -11218,27 +11279,14 @@ var TechnicalDescription = function TechnicalDescription(_ref) {
|
|
|
11218
11279
|
var AdvertisingText = function AdvertisingText(_ref) {
|
|
11219
11280
|
var getProductValue = _ref.getProductValue,
|
|
11220
11281
|
update = _ref.update;
|
|
11221
|
-
var _useDivaCore = useDivaCore(),
|
|
11222
|
-
tinyMceApiKey = _useDivaCore.state.tinyMceApiKey;
|
|
11223
11282
|
return /*#__PURE__*/jsx(Card$1, {
|
|
11224
11283
|
style: {
|
|
11225
11284
|
marginBottom: '10px'
|
|
11226
11285
|
},
|
|
11227
11286
|
children: /*#__PURE__*/jsx(CardContent, {
|
|
11228
|
-
children: /*#__PURE__*/jsx(
|
|
11229
|
-
|
|
11230
|
-
|
|
11231
|
-
init: {
|
|
11232
|
-
height: 500,
|
|
11233
|
-
menubar: false,
|
|
11234
|
-
plugins: ['advlist autolink lists link table paste'],
|
|
11235
|
-
contextmenu: '',
|
|
11236
|
-
resize: false,
|
|
11237
|
-
statusbar: false,
|
|
11238
|
-
toolbar: 'undo redo | formatselect | ' + 'bold italic backcolor | alignleft aligncenter ' + 'alignright alignjustify | bullist numlist outdent indent | table ',
|
|
11239
|
-
content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }'
|
|
11240
|
-
},
|
|
11241
|
-
onEditorChange: function onEditorChange(value) {
|
|
11287
|
+
children: /*#__PURE__*/jsx(RTFEditor, {
|
|
11288
|
+
initialValue: getProductValue('info'),
|
|
11289
|
+
onChange: function onChange(value) {
|
|
11242
11290
|
return update('info', value);
|
|
11243
11291
|
}
|
|
11244
11292
|
})
|
|
@@ -11958,7 +12006,6 @@ function ClassificationDataForm (_ref) {
|
|
|
11958
12006
|
settings = _ref.settings;
|
|
11959
12007
|
var _useTranslation = useTranslation(),
|
|
11960
12008
|
t = _useTranslation.t;
|
|
11961
|
-
_useTranslation.i18n;
|
|
11962
12009
|
var getOptField = function getOptField(optMap, className, value) {
|
|
11963
12010
|
if (value) {
|
|
11964
12011
|
var optField = optFields.find(function (opt) {
|
|
@@ -12076,11 +12123,9 @@ function ClassField(_ref2) {
|
|
|
12076
12123
|
function Buttons (_ref) {
|
|
12077
12124
|
var editBasketDisabled = _ref.editBasketDisabled,
|
|
12078
12125
|
onOpenPlanner = _ref.onOpenPlanner,
|
|
12079
|
-
onAddBasket = _ref.onAddBasket,
|
|
12080
12126
|
onSave = _ref.onSave,
|
|
12081
12127
|
onCancel = _ref.onCancel,
|
|
12082
|
-
saveDisabled = _ref.saveDisabled
|
|
12083
|
-
allowAdd = _ref.allowAdd;
|
|
12128
|
+
saveDisabled = _ref.saveDisabled;
|
|
12084
12129
|
var _useTranslation = useTranslation(),
|
|
12085
12130
|
t = _useTranslation.t;
|
|
12086
12131
|
var _React$useState = React.useState(null),
|
|
@@ -12108,7 +12153,7 @@ function Buttons (_ref) {
|
|
|
12108
12153
|
color: "primary",
|
|
12109
12154
|
disabled: editBasketDisabled,
|
|
12110
12155
|
onClick: function onClick(e) {
|
|
12111
|
-
return
|
|
12156
|
+
return onOpenPlanner();
|
|
12112
12157
|
},
|
|
12113
12158
|
children: t('productcreator.edit')
|
|
12114
12159
|
}), /*#__PURE__*/jsx(Button, {
|
|
@@ -12152,7 +12197,6 @@ function Buttons (_ref) {
|
|
|
12152
12197
|
}), /*#__PURE__*/jsx(MenuItem, {
|
|
12153
12198
|
disabled: editBasketDisabled,
|
|
12154
12199
|
onClick: function onClick() {
|
|
12155
|
-
onAddBasket();
|
|
12156
12200
|
handleClose();
|
|
12157
12201
|
},
|
|
12158
12202
|
children: t('productcreator.add')
|
|
@@ -13225,7 +13269,7 @@ function useClassification () {
|
|
|
13225
13269
|
}
|
|
13226
13270
|
|
|
13227
13271
|
var _excluded$2 = ["isNew"],
|
|
13228
|
-
_excluded2 = ["isNew", "baseChanged"],
|
|
13272
|
+
_excluded2 = ["isNew", "baseChanged", "catalogData"],
|
|
13229
13273
|
_excluded3 = ["shortDescription"];
|
|
13230
13274
|
function _createForOfIteratorHelper$1(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$1(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
13231
13275
|
function _unsupportedIterableToArray$1(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$1(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : void 0; } }
|
|
@@ -13233,7 +13277,7 @@ function _arrayLikeToArray$1(r, a) { (null == a || a > r.length) && (a = r.lengt
|
|
|
13233
13277
|
function ownKeys$5(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; }
|
|
13234
13278
|
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; }
|
|
13235
13279
|
var LOG$3 = getLogger('Seller', 'ProductState');
|
|
13236
|
-
function useProductState (basket, divaNr
|
|
13280
|
+
function useProductState (basket, divaNr) {
|
|
13237
13281
|
var _useSellerState = useSellerState(),
|
|
13238
13282
|
_useSellerState$state = _useSellerState.state,
|
|
13239
13283
|
catalogData = _useSellerState$state.catalogData,
|
|
@@ -13244,12 +13288,10 @@ function useProductState (basket, divaNr, checkBasket, editedBasket) {
|
|
|
13244
13288
|
productCategories = _useSellerState$state.productCategories,
|
|
13245
13289
|
originProductId = _useSellerState$state.originProductId,
|
|
13246
13290
|
_useSellerState$actio = _useSellerState.actions,
|
|
13247
|
-
openBasket = _useSellerState$actio.openBasket
|
|
13248
|
-
|
|
13249
|
-
updateBasketState = _useSellerState$actio.updateBasketState,
|
|
13250
|
-
|
|
13251
|
-
_useSellerState$actio.saveBasket;
|
|
13252
|
-
var resetBasketState = _useSellerState$actio.resetBasketState,
|
|
13291
|
+
openBasket = _useSellerState$actio.openBasket;
|
|
13292
|
+
_useSellerState$actio.fetchBasket;
|
|
13293
|
+
var updateBasketState = _useSellerState$actio.updateBasketState,
|
|
13294
|
+
resetBasketState = _useSellerState$actio.resetBasketState,
|
|
13253
13295
|
clearOriginProductId = _useSellerState$actio.clearOriginProductId;
|
|
13254
13296
|
var _useDivaCore = useDivaCore(),
|
|
13255
13297
|
_useDivaCore$state = _useDivaCore.state,
|
|
@@ -13435,7 +13477,6 @@ function useProductState (basket, divaNr, checkBasket, editedBasket) {
|
|
|
13435
13477
|
});
|
|
13436
13478
|
}, [dispatch]);
|
|
13437
13479
|
var sortVariantRows = useCallback(function (from, to, sortedVariantIds) {
|
|
13438
|
-
setSaved(false);
|
|
13439
13480
|
dispatch({
|
|
13440
13481
|
type: 'sortVariantRows',
|
|
13441
13482
|
from: from,
|
|
@@ -13451,118 +13492,27 @@ function useProductState (basket, divaNr, checkBasket, editedBasket) {
|
|
|
13451
13492
|
subCategory: currentCategories.subCategory
|
|
13452
13493
|
}));
|
|
13453
13494
|
}, [updateCategoriesInternal, state]);
|
|
13454
|
-
var
|
|
13455
|
-
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(
|
|
13456
|
-
var _state$
|
|
13495
|
+
var save = /*#__PURE__*/function () {
|
|
13496
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
13497
|
+
var _state$classification, data, params, _productHandler$close, _productHandler$close2, _productHandler$close3, savedProducts;
|
|
13457
13498
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
13458
13499
|
while (1) switch (_context2.prev = _context2.next) {
|
|
13459
13500
|
case 0:
|
|
13460
|
-
|
|
13461
|
-
|
|
13462
|
-
baskets = [];
|
|
13463
|
-
_context2.next = 5;
|
|
13464
|
-
return fetchBasket(divaNr);
|
|
13465
|
-
case 5:
|
|
13466
|
-
newBasket = _context2.sent;
|
|
13467
|
-
if (state !== null && state !== void 0 && (_state$baseData$artic = state.baseData.articles) !== null && _state$baseData$artic !== void 0 && _state$baseData$artic.some(function (art) {
|
|
13468
|
-
return art.catalogCodex == newBasket.OrderSets[0].CatalogCodex;
|
|
13469
|
-
})) {
|
|
13470
|
-
_context2.next = 9;
|
|
13501
|
+
if (state) {
|
|
13502
|
+
_context2.next = 2;
|
|
13471
13503
|
break;
|
|
13472
13504
|
}
|
|
13473
|
-
openModal({
|
|
13474
|
-
title: 'Planung nicht gültig',
|
|
13475
|
-
text: "Die Planung mit der Nummer ".concat(divaNr, " kann nicht zu diesen Produkt hinzugef\xFCgt werden."),
|
|
13476
|
-
accept: true
|
|
13477
|
-
});
|
|
13478
13505
|
return _context2.abrupt("return");
|
|
13479
|
-
case
|
|
13480
|
-
|
|
13481
|
-
//if there are no variants the current basedata must become a varinat as well
|
|
13482
|
-
if (state !== null && state !== void 0 && (_state$variantData = state.variantData) !== null && _state$variantData !== void 0 && _state$variantData.length) {
|
|
13483
|
-
_context2.next = 20;
|
|
13484
|
-
break;
|
|
13485
|
-
}
|
|
13486
|
-
if (!((_currentBasketState$b = currentBasketState === null || currentBasketState === void 0 ? void 0 : currentBasketState.basket) !== null && _currentBasketState$b !== void 0)) {
|
|
13487
|
-
_context2.next = 15;
|
|
13488
|
-
break;
|
|
13489
|
-
}
|
|
13490
|
-
_context2.t0 = _currentBasketState$b;
|
|
13491
|
-
_context2.next = 18;
|
|
13492
|
-
break;
|
|
13493
|
-
case 15:
|
|
13494
|
-
_context2.next = 17;
|
|
13495
|
-
return fetchBasket(state === null || state === void 0 ? void 0 : state.baseData.divaNr);
|
|
13496
|
-
case 17:
|
|
13497
|
-
_context2.t0 = _context2.sent;
|
|
13498
|
-
case 18:
|
|
13499
|
-
newBasket = _context2.t0;
|
|
13500
|
-
baskets.unshift(newBasket);
|
|
13501
|
-
case 20:
|
|
13502
|
-
dispatch({
|
|
13503
|
-
type: 'addBasket',
|
|
13504
|
-
data: baskets
|
|
13505
|
-
});
|
|
13506
|
-
openModal({
|
|
13507
|
-
title: 'Planung hinzugefügt',
|
|
13508
|
-
text: "Die Planung mit der Nummer ".concat(divaNr, " wurde als variante hinzugef\xFCgt."),
|
|
13509
|
-
accept: true
|
|
13510
|
-
});
|
|
13511
|
-
_context2.next = 28;
|
|
13512
|
-
break;
|
|
13513
|
-
case 24:
|
|
13514
|
-
_context2.prev = 24;
|
|
13515
|
-
_context2.t1 = _context2["catch"](1);
|
|
13516
|
-
LOG$3.error(new DivaError("Basket with divaNr ".concat(divaNr, " not found"), {
|
|
13517
|
-
code: 'SELLER_0002',
|
|
13518
|
-
cause: _context2.t1
|
|
13519
|
-
}));
|
|
13506
|
+
case 2:
|
|
13507
|
+
_context2.prev = 2;
|
|
13520
13508
|
openModal({
|
|
13521
|
-
|
|
13522
|
-
|
|
13523
|
-
|
|
13509
|
+
progress: 0.05,
|
|
13510
|
+
title: t('productcreator.savebasket'),
|
|
13511
|
+
dontRenderForm: true
|
|
13524
13512
|
});
|
|
13525
|
-
|
|
13526
|
-
case "end":
|
|
13527
|
-
return _context2.stop();
|
|
13528
|
-
}
|
|
13529
|
-
}, _callee2, null, [[1, 24]]);
|
|
13530
|
-
}));
|
|
13531
|
-
return function (_x) {
|
|
13532
|
-
return _ref.apply(this, arguments);
|
|
13533
|
-
};
|
|
13534
|
-
}(), [dispatch, state, openModal, fetchBasket]);
|
|
13535
|
-
var save = /*#__PURE__*/function () {
|
|
13536
|
-
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
|
13537
|
-
var _state$variantData2, _state$classification, isNewBasket, _currentBasketState$b2, data, params, _productHandler$close, _productHandler$close2, _productHandler$close3, savedProducts, _currentBasketState$b3;
|
|
13538
|
-
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
13539
|
-
while (1) switch (_context3.prev = _context3.next) {
|
|
13540
|
-
case 0:
|
|
13541
|
-
if (state) {
|
|
13542
|
-
_context3.next = 2;
|
|
13543
|
-
break;
|
|
13544
|
-
}
|
|
13545
|
-
return _context3.abrupt("return");
|
|
13546
|
-
case 2:
|
|
13547
|
-
_context3.prev = 2;
|
|
13548
|
-
isNewBasket = (currentBasketState === null || currentBasketState === void 0 ? void 0 : currentBasketState.basket) && !(currentBasketState !== null && currentBasketState !== void 0 && currentBasketState.saved);
|
|
13549
|
-
if (isNewBasket) {
|
|
13550
|
-
currentBasketState === null || currentBasketState === void 0 || (_currentBasketState$b2 = currentBasketState.basket) === null || _currentBasketState$b2 === void 0 || _currentBasketState$b2.saveNow();
|
|
13551
|
-
openModal({
|
|
13552
|
-
progress: 0.05,
|
|
13553
|
-
title: t('productcreator.savebasket'),
|
|
13554
|
-
dontRenderForm: true
|
|
13555
|
-
});
|
|
13556
|
-
}
|
|
13557
|
-
if (currentBasketState !== null && currentBasketState !== void 0 && currentBasketState.basket) {
|
|
13558
|
-
_context3.next = 7;
|
|
13559
|
-
break;
|
|
13560
|
-
}
|
|
13561
|
-
throw Error('Basket is undefined');
|
|
13562
|
-
case 7:
|
|
13563
|
-
(_state$variantData2 = state.variantData) === null || _state$variantData2 === void 0 ? void 0 : _state$variantData2.length;
|
|
13564
|
-
_context3.next = 10;
|
|
13513
|
+
_context2.next = 6;
|
|
13565
13514
|
return productHandler.prepareData({
|
|
13515
|
+
basket: basket,
|
|
13566
13516
|
baseData: state.baseData,
|
|
13567
13517
|
classificationData: state.classificationData,
|
|
13568
13518
|
variantData: state.variantData,
|
|
@@ -13580,150 +13530,122 @@ function useProductState (basket, divaNr, checkBasket, editedBasket) {
|
|
|
13580
13530
|
optMap: state.optClassMap,
|
|
13581
13531
|
originProductId: originProductId
|
|
13582
13532
|
});
|
|
13583
|
-
case
|
|
13584
|
-
data =
|
|
13533
|
+
case 6:
|
|
13534
|
+
data = _context2.sent;
|
|
13585
13535
|
setIsNew(false);
|
|
13586
13536
|
if (!(originProductId || sendProductsToExternalService)) {
|
|
13587
|
-
|
|
13537
|
+
_context2.next = 34;
|
|
13588
13538
|
break;
|
|
13589
13539
|
}
|
|
13590
13540
|
params = {
|
|
13591
|
-
basket: currentBasketState === null || currentBasketState === void 0 ? void 0 : currentBasketState.basket,
|
|
13592
13541
|
products: data.products,
|
|
13593
13542
|
removedProductIds: data.removedProducts,
|
|
13594
13543
|
parentProductId: originProductId ? originProductId : undefined
|
|
13595
13544
|
};
|
|
13596
13545
|
if (!(clientArticleHandler !== null && clientArticleHandler !== void 0 && clientArticleHandler.clientArticleService)) {
|
|
13597
|
-
|
|
13546
|
+
_context2.next = 29;
|
|
13598
13547
|
break;
|
|
13599
13548
|
}
|
|
13600
|
-
|
|
13601
|
-
|
|
13602
|
-
return clientArticleHandler.
|
|
13603
|
-
case
|
|
13549
|
+
_context2.prev = 11;
|
|
13550
|
+
_context2.next = 14;
|
|
13551
|
+
return clientArticleHandler.saveProductsSMArticles(params, clientArticleHandler.clientArticleService, organization._id);
|
|
13552
|
+
case 14:
|
|
13604
13553
|
(_productHandler$close = productHandler.closeModal) === null || _productHandler$close === void 0 || _productHandler$close.call(productHandler);
|
|
13605
|
-
|
|
13554
|
+
_context2.next = 17;
|
|
13606
13555
|
return reset(currentBasketState === null || currentBasketState === void 0 ? void 0 : currentBasketState.basket, []);
|
|
13607
|
-
case
|
|
13556
|
+
case 17:
|
|
13608
13557
|
if (originProductId) clearOriginProductId();
|
|
13609
|
-
return
|
|
13610
|
-
case
|
|
13611
|
-
|
|
13612
|
-
|
|
13558
|
+
return _context2.abrupt("return", true);
|
|
13559
|
+
case 21:
|
|
13560
|
+
_context2.prev = 21;
|
|
13561
|
+
_context2.t0 = _context2["catch"](11);
|
|
13613
13562
|
(_productHandler$close2 = productHandler.closeModal) === null || _productHandler$close2 === void 0 || _productHandler$close2.call(productHandler);
|
|
13614
|
-
|
|
13563
|
+
_context2.next = 26;
|
|
13615
13564
|
return reset(currentBasketState === null || currentBasketState === void 0 ? void 0 : currentBasketState.basket);
|
|
13616
|
-
case
|
|
13617
|
-
throw new Error(
|
|
13618
|
-
case
|
|
13619
|
-
|
|
13565
|
+
case 26:
|
|
13566
|
+
throw new Error(_context2.t0.message);
|
|
13567
|
+
case 27:
|
|
13568
|
+
_context2.next = 34;
|
|
13620
13569
|
break;
|
|
13621
|
-
case
|
|
13570
|
+
case 29:
|
|
13622
13571
|
(_productHandler$close3 = productHandler.closeModal) === null || _productHandler$close3 === void 0 || _productHandler$close3.call(productHandler);
|
|
13623
13572
|
if (originProductId) clearOriginProductId();
|
|
13624
13573
|
LOG$3.error(new DivaError("Articles cannot be saved - ClientArticleService or JWT not set"));
|
|
13625
13574
|
setError(t('modal.general_error') + ' ' + t('modal.errorcode') + ':' + DivaUtils.getCurrentTraceId() + ' ' + DivaUtils.formatDate(new Date(), true, undefined, true));
|
|
13626
|
-
return
|
|
13627
|
-
case
|
|
13628
|
-
|
|
13629
|
-
return productHandler.
|
|
13630
|
-
basket: isNewBasket ? currentBasketState === null || currentBasketState === void 0 ? void 0 : currentBasketState.basket : undefined,
|
|
13575
|
+
return _context2.abrupt("return", false);
|
|
13576
|
+
case 34:
|
|
13577
|
+
_context2.next = 36;
|
|
13578
|
+
return productHandler.saveProducts(_objectSpread$5(_objectSpread$5({}, data), {}, {
|
|
13631
13579
|
awaitPDF: undefined
|
|
13632
13580
|
}));
|
|
13633
|
-
case
|
|
13634
|
-
savedProducts =
|
|
13635
|
-
|
|
13636
|
-
updateBasketState({
|
|
13637
|
-
saved: true
|
|
13638
|
-
});
|
|
13639
|
-
currentBasketState === null || currentBasketState === void 0 || (_currentBasketState$b3 = currentBasketState.basket) === null || _currentBasketState$b3 === void 0 || _currentBasketState$b3.setDocumentVersion((currentBasketState === null || currentBasketState === void 0 ? void 0 : currentBasketState.basket.getDocumentVersion()) + 1);
|
|
13640
|
-
}
|
|
13641
|
-
_context3.next = 44;
|
|
13581
|
+
case 36:
|
|
13582
|
+
savedProducts = _context2.sent;
|
|
13583
|
+
_context2.next = 39;
|
|
13642
13584
|
return reset(currentBasketState === null || currentBasketState === void 0 ? void 0 : currentBasketState.basket, savedProducts);
|
|
13643
|
-
case
|
|
13644
|
-
return
|
|
13645
|
-
case
|
|
13646
|
-
|
|
13647
|
-
|
|
13585
|
+
case 39:
|
|
13586
|
+
return _context2.abrupt("return", true);
|
|
13587
|
+
case 42:
|
|
13588
|
+
_context2.prev = 42;
|
|
13589
|
+
_context2.t1 = _context2["catch"](2);
|
|
13648
13590
|
LOG$3.error(new DivaError("Error saving product", {
|
|
13649
13591
|
code: 'PROD_0002',
|
|
13650
|
-
cause:
|
|
13592
|
+
cause: _context2.t1
|
|
13651
13593
|
}));
|
|
13652
|
-
if (Number(
|
|
13594
|
+
if (Number(_context2.t1.message) === 413) {
|
|
13653
13595
|
setError(t('modal.error_payload_to_big'));
|
|
13654
13596
|
} else {
|
|
13655
13597
|
setError(t('modal.general_error') + ' ' + t('modal.errorcode') + ':' + DivaUtils.getCurrentTraceId() + ' ' + DivaUtils.formatDate(new Date(), true, undefined, true));
|
|
13656
13598
|
}
|
|
13657
|
-
if (!
|
|
13658
|
-
|
|
13599
|
+
if (!_context2.t1.message.includes('PRODSM_0001')) {
|
|
13600
|
+
_context2.next = 51;
|
|
13659
13601
|
break;
|
|
13660
13602
|
}
|
|
13661
13603
|
openModal({
|
|
13662
13604
|
title: t('productcreator.errorsavingsmarticle', 'Error saving SM-Article'),
|
|
13663
|
-
text:
|
|
13605
|
+
text: _context2.t1.message,
|
|
13664
13606
|
accept: true
|
|
13665
13607
|
});
|
|
13666
|
-
return
|
|
13667
|
-
case
|
|
13608
|
+
return _context2.abrupt("return", false);
|
|
13609
|
+
case 51:
|
|
13668
13610
|
openModal({
|
|
13669
13611
|
title: t('errorcodes._source.labels.error.SELLER_0002'),
|
|
13670
13612
|
text: t('grid.error'),
|
|
13671
13613
|
accept: true
|
|
13672
13614
|
});
|
|
13673
|
-
return
|
|
13674
|
-
case
|
|
13615
|
+
return _context2.abrupt("return", false);
|
|
13616
|
+
case 53:
|
|
13675
13617
|
case "end":
|
|
13676
|
-
return
|
|
13618
|
+
return _context2.stop();
|
|
13677
13619
|
}
|
|
13678
|
-
},
|
|
13620
|
+
}, _callee2, null, [[2, 42], [11, 21]]);
|
|
13679
13621
|
}));
|
|
13680
13622
|
return function save() {
|
|
13681
|
-
return
|
|
13623
|
+
return _ref.apply(this, arguments);
|
|
13682
13624
|
};
|
|
13683
13625
|
}();
|
|
13684
13626
|
var reset = /*#__PURE__*/function () {
|
|
13685
|
-
var
|
|
13627
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(basket, productData) {
|
|
13686
13628
|
var _configurationData$Pr;
|
|
13687
|
-
var
|
|
13688
|
-
return _regeneratorRuntime.wrap(function
|
|
13689
|
-
while (1) switch (
|
|
13629
|
+
var _yield$productHandler, isNew, resetState;
|
|
13630
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
13631
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
13690
13632
|
case 0:
|
|
13691
|
-
|
|
13692
|
-
|
|
13693
|
-
_context4.next = 5;
|
|
13694
|
-
break;
|
|
13695
|
-
}
|
|
13696
|
-
updateBasket = basket;
|
|
13697
|
-
_context4.next = 15;
|
|
13698
|
-
break;
|
|
13699
|
-
case 5:
|
|
13700
|
-
resetBasketState();
|
|
13701
|
-
_context4.next = 8;
|
|
13702
|
-
return openBasket(undefined, divaNr);
|
|
13703
|
-
case 8:
|
|
13704
|
-
_yield$openBasket = _context4.sent;
|
|
13705
|
-
openedBasket = _yield$openBasket.basket;
|
|
13706
|
-
openedCatalogData = _yield$openBasket.catalogData;
|
|
13707
|
-
_saved = _yield$openBasket.saved;
|
|
13708
|
-
updateBasket = openedBasket;
|
|
13709
|
-
usedCatalogData = openedCatalogData;
|
|
13710
|
-
basketSaved = _saved;
|
|
13711
|
-
case 15:
|
|
13712
|
-
_context4.next = 17;
|
|
13633
|
+
if (!basket) resetBasketState();
|
|
13634
|
+
_context3.next = 3;
|
|
13713
13635
|
return productHandler.loadProducts({
|
|
13714
|
-
basket:
|
|
13715
|
-
|
|
13636
|
+
basket: basket,
|
|
13637
|
+
divaNr: divaNr,
|
|
13638
|
+
catalogData: catalogData,
|
|
13716
13639
|
productData: productData,
|
|
13717
13640
|
classificationFields: state === null || state === void 0 ? void 0 : state.classificationFields,
|
|
13718
13641
|
fieldConfiguration: configurationData === null || configurationData === void 0 || (_configurationData$Pr = configurationData.ProductCreator) === null || _configurationData$Pr === void 0 ? void 0 : _configurationData$Pr.fields,
|
|
13719
13642
|
customBaseFields: additionalBaseFields,
|
|
13720
13643
|
classificationConfig: classificationConfig,
|
|
13721
13644
|
availableLanguages: availableLanguages,
|
|
13722
|
-
currentLang: language
|
|
13723
|
-
editedBasket: editedBasket
|
|
13645
|
+
currentLang: language
|
|
13724
13646
|
});
|
|
13725
|
-
case
|
|
13726
|
-
_yield$productHandler =
|
|
13647
|
+
case 3:
|
|
13648
|
+
_yield$productHandler = _context3.sent;
|
|
13727
13649
|
isNew = _yield$productHandler.isNew;
|
|
13728
13650
|
resetState = _objectWithoutProperties(_yield$productHandler, _excluded$2);
|
|
13729
13651
|
dispatch({
|
|
@@ -13734,91 +13656,75 @@ function useProductState (basket, divaNr, checkBasket, editedBasket) {
|
|
|
13734
13656
|
classificationFields: state === null || state === void 0 ? void 0 : state.classificationFields
|
|
13735
13657
|
})
|
|
13736
13658
|
});
|
|
13737
|
-
setSaved(!isNew
|
|
13659
|
+
setSaved(!isNew);
|
|
13738
13660
|
setError(undefined);
|
|
13739
13661
|
setWarning(undefined);
|
|
13740
|
-
case
|
|
13662
|
+
case 10:
|
|
13741
13663
|
case "end":
|
|
13742
|
-
return
|
|
13664
|
+
return _context3.stop();
|
|
13743
13665
|
}
|
|
13744
|
-
},
|
|
13666
|
+
}, _callee3);
|
|
13745
13667
|
}));
|
|
13746
|
-
return function reset(
|
|
13747
|
-
return
|
|
13668
|
+
return function reset(_x, _x2) {
|
|
13669
|
+
return _ref2.apply(this, arguments);
|
|
13748
13670
|
};
|
|
13749
13671
|
}();
|
|
13750
13672
|
useEffect(function () {
|
|
13751
13673
|
var init = /*#__PURE__*/function () {
|
|
13752
|
-
var
|
|
13753
|
-
var
|
|
13754
|
-
return _regeneratorRuntime.wrap(function
|
|
13755
|
-
while (1) switch (
|
|
13674
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
|
|
13675
|
+
var _ref4, updateBasket, catalogData, _affiliates, _Object$keys$map2, _configurationData$Pr2, _optClassMap, _catalogs$, _initState, _yield$loadCategories, classificationFields, newCurrentData, additional, _additionalBaseFields, newLivingArea, _yield$productHandler2, _isNew, baseChanged, catalogs, initState, currentCategories, differingOptFields, optMapEntries, missingOptFields, accountlogourl, logofile, _initState$baseData$m, newlogofile, _initState$baseData$m2;
|
|
13676
|
+
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
13677
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
13756
13678
|
case 0:
|
|
13757
|
-
|
|
13758
|
-
|
|
13759
|
-
case 2:
|
|
13760
|
-
_yield$openBasket2 = _context5.sent;
|
|
13761
|
-
updateBasket = _yield$openBasket2.basket;
|
|
13762
|
-
catalogData = _yield$openBasket2.catalogData;
|
|
13763
|
-
basketSaved = _yield$openBasket2.saved;
|
|
13764
|
-
toggleLoading('ProductDataInit');
|
|
13765
|
-
updateBasketState({
|
|
13766
|
-
overwriteStates: ['BASE_CONFIGURATION']
|
|
13767
|
-
});
|
|
13768
|
-
_context5.prev = 8;
|
|
13769
|
-
if (!(updateBasket.Status != 'BASE_CONFIGURATION')) {
|
|
13770
|
-
_context5.next = 16;
|
|
13679
|
+
if (!basket) {
|
|
13680
|
+
_context4.next = 6;
|
|
13771
13681
|
break;
|
|
13772
13682
|
}
|
|
13773
|
-
|
|
13774
|
-
return
|
|
13775
|
-
case
|
|
13776
|
-
|
|
13777
|
-
|
|
13778
|
-
|
|
13683
|
+
_context4.next = 3;
|
|
13684
|
+
return openBasket(undefined, divaNr, undefined, basket);
|
|
13685
|
+
case 3:
|
|
13686
|
+
_context4.t0 = _context4.sent;
|
|
13687
|
+
_context4.next = 7;
|
|
13688
|
+
break;
|
|
13689
|
+
case 6:
|
|
13690
|
+
_context4.t0 = {};
|
|
13691
|
+
case 7:
|
|
13692
|
+
_ref4 = _context4.t0;
|
|
13693
|
+
updateBasket = _ref4.basket;
|
|
13694
|
+
catalogData = _ref4.catalogData;
|
|
13695
|
+
toggleLoading('ProductDataInit');
|
|
13779
13696
|
updateBasketState({
|
|
13780
|
-
|
|
13697
|
+
overwriteStates: ['BASE_CONFIGURATION']
|
|
13781
13698
|
});
|
|
13782
|
-
case 16:
|
|
13783
|
-
_context5.next = 21;
|
|
13784
|
-
break;
|
|
13785
|
-
case 18:
|
|
13786
|
-
_context5.prev = 18;
|
|
13787
|
-
_context5.t0 = _context5["catch"](8);
|
|
13788
|
-
LOG$3.error(new DivaError("Error updating basket", {
|
|
13789
|
-
code: 'SELLER_0002',
|
|
13790
|
-
cause: _context5.t0
|
|
13791
|
-
}));
|
|
13792
|
-
case 21:
|
|
13793
13699
|
if (!userHasPermission('productcreator_affiliate')) {
|
|
13794
|
-
|
|
13700
|
+
_context4.next = 23;
|
|
13795
13701
|
break;
|
|
13796
13702
|
}
|
|
13797
|
-
|
|
13798
|
-
|
|
13703
|
+
_context4.prev = 13;
|
|
13704
|
+
_context4.next = 16;
|
|
13799
13705
|
return apiGetAffiliates({
|
|
13800
13706
|
serviceUrl: apiConfig.authService,
|
|
13801
13707
|
organizationId: organization._id,
|
|
13802
13708
|
jwt: jwt
|
|
13803
13709
|
});
|
|
13804
|
-
case
|
|
13805
|
-
_affiliates =
|
|
13710
|
+
case 16:
|
|
13711
|
+
_affiliates = _context4.sent;
|
|
13806
13712
|
setAffiliates(_affiliates);
|
|
13807
|
-
|
|
13713
|
+
_context4.next = 23;
|
|
13808
13714
|
break;
|
|
13809
|
-
case
|
|
13810
|
-
|
|
13811
|
-
|
|
13715
|
+
case 20:
|
|
13716
|
+
_context4.prev = 20;
|
|
13717
|
+
_context4.t1 = _context4["catch"](13);
|
|
13812
13718
|
LOG$3.error(new DivaError("Error loading affiliates", {
|
|
13813
13719
|
code: 'SELLER_0002',
|
|
13814
|
-
cause:
|
|
13720
|
+
cause: _context4.t1
|
|
13815
13721
|
}));
|
|
13816
|
-
case
|
|
13817
|
-
|
|
13818
|
-
|
|
13722
|
+
case 23:
|
|
13723
|
+
_context4.prev = 23;
|
|
13724
|
+
_context4.next = 26;
|
|
13819
13725
|
return loadCategories();
|
|
13820
|
-
case
|
|
13821
|
-
_yield$loadCategories =
|
|
13726
|
+
case 26:
|
|
13727
|
+
_yield$loadCategories = _context4.sent;
|
|
13822
13728
|
classificationFields = _yield$loadCategories.classificationFields;
|
|
13823
13729
|
newCurrentData = _yield$loadCategories.newCurrentData;
|
|
13824
13730
|
additional = _yield$loadCategories.additional;
|
|
@@ -13841,22 +13747,23 @@ function useProductState (basket, divaNr, checkBasket, editedBasket) {
|
|
|
13841
13747
|
});
|
|
13842
13748
|
newCurrentData.livingAreas = _objectSpread$5({}, newLivingArea);
|
|
13843
13749
|
}
|
|
13844
|
-
|
|
13750
|
+
_context4.next = 34;
|
|
13845
13751
|
return productHandler.loadProducts({
|
|
13846
13752
|
basket: updateBasket,
|
|
13753
|
+
divaNr: divaNr,
|
|
13847
13754
|
catalogData: catalogData,
|
|
13848
13755
|
classificationFields: !customFormData ? classificationFields : undefined,
|
|
13849
13756
|
fieldConfiguration: configurationData === null || configurationData === void 0 || (_configurationData$Pr2 = configurationData.ProductCreator) === null || _configurationData$Pr2 === void 0 ? void 0 : _configurationData$Pr2.fields,
|
|
13850
13757
|
customBaseFields: !customFormData ? _additionalBaseFields : undefined,
|
|
13851
13758
|
classificationConfig: !customFormData ? newCurrentData : undefined,
|
|
13852
13759
|
availableLanguages: availableLanguages,
|
|
13853
|
-
currentLang: language
|
|
13854
|
-
editedBasket: editedBasket
|
|
13760
|
+
currentLang: language
|
|
13855
13761
|
});
|
|
13856
|
-
case
|
|
13857
|
-
_yield$productHandler2 =
|
|
13762
|
+
case 34:
|
|
13763
|
+
_yield$productHandler2 = _context4.sent;
|
|
13858
13764
|
_isNew = _yield$productHandler2.isNew;
|
|
13859
13765
|
baseChanged = _yield$productHandler2.baseChanged;
|
|
13766
|
+
catalogs = _yield$productHandler2.catalogData;
|
|
13860
13767
|
initState = _objectWithoutProperties(_yield$productHandler2, _excluded2);
|
|
13861
13768
|
setIsNew(_isNew);
|
|
13862
13769
|
currentCategories = updateCategoriesInternal(initState.baseData.livingArea ? initState.baseData.livingArea : returnTo === 'toAssortmentManager' ? productCategories === null || productCategories === void 0 ? void 0 : productCategories.livingArea : undefined, initState.baseData.mainCategory ? initState.baseData.mainCategory : returnTo === 'toAssortmentManager' ? productCategories === null || productCategories === void 0 ? void 0 : productCategories.mainCategory : undefined, initState.baseData.subCategory ? initState.baseData.subCategory : returnTo === 'toAssortmentManager' ? productCategories === null || productCategories === void 0 ? void 0 : productCategories.subCategory : undefined, newCurrentData);
|
|
@@ -13883,7 +13790,7 @@ function useProductState (basket, divaNr, checkBasket, editedBasket) {
|
|
|
13883
13790
|
return (_opt$title = opt.title) !== null && _opt$title !== void 0 ? _opt$title : opt.field;
|
|
13884
13791
|
}).join(', ')));
|
|
13885
13792
|
}
|
|
13886
|
-
accountlogourl =
|
|
13793
|
+
accountlogourl = catalogs === null || catalogs === void 0 || (_catalogs$ = catalogs[0]) === null || _catalogs$ === void 0 ? void 0 : _catalogs$.accountLogo;
|
|
13887
13794
|
if (accountlogourl) {
|
|
13888
13795
|
logofile = new DivaFile({
|
|
13889
13796
|
jwt: jwt,
|
|
@@ -13925,26 +13832,26 @@ function useProductState (basket, divaNr, checkBasket, editedBasket) {
|
|
|
13925
13832
|
title: t('productcreator.configurationchanged.title'),
|
|
13926
13833
|
text: t('productcreator.configurationchanged.text')
|
|
13927
13834
|
});
|
|
13928
|
-
setSaved(!_isNew
|
|
13929
|
-
|
|
13835
|
+
setSaved(!_isNew);
|
|
13836
|
+
_context4.next = 60;
|
|
13930
13837
|
break;
|
|
13931
|
-
case
|
|
13932
|
-
|
|
13933
|
-
|
|
13838
|
+
case 57:
|
|
13839
|
+
_context4.prev = 57;
|
|
13840
|
+
_context4.t2 = _context4["catch"](23);
|
|
13934
13841
|
LOG$3.error(new DivaError("Error initalization", {
|
|
13935
13842
|
code: 'SELLER_0002',
|
|
13936
|
-
cause:
|
|
13843
|
+
cause: _context4.t2
|
|
13937
13844
|
}));
|
|
13938
|
-
case
|
|
13845
|
+
case 60:
|
|
13939
13846
|
toggleLoading('ProductDataInit');
|
|
13940
|
-
case
|
|
13847
|
+
case 61:
|
|
13941
13848
|
case "end":
|
|
13942
|
-
return
|
|
13849
|
+
return _context4.stop();
|
|
13943
13850
|
}
|
|
13944
|
-
},
|
|
13851
|
+
}, _callee4, null, [[13, 20], [23, 57]]);
|
|
13945
13852
|
}));
|
|
13946
13853
|
return function init() {
|
|
13947
|
-
return
|
|
13854
|
+
return _ref3.apply(this, arguments);
|
|
13948
13855
|
};
|
|
13949
13856
|
}();
|
|
13950
13857
|
init();
|
|
@@ -13953,40 +13860,46 @@ function useProductState (basket, divaNr, checkBasket, editedBasket) {
|
|
|
13953
13860
|
return _checkAndSetCustomForm.apply(this, arguments);
|
|
13954
13861
|
}
|
|
13955
13862
|
function _checkAndSetCustomForm() {
|
|
13956
|
-
_checkAndSetCustomForm = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13863
|
+
_checkAndSetCustomForm = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
|
|
13957
13864
|
var _state$baseData$custo;
|
|
13958
13865
|
var productCreatorConfig;
|
|
13959
|
-
return _regeneratorRuntime.wrap(function
|
|
13960
|
-
while (1) switch (
|
|
13866
|
+
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
13867
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
13961
13868
|
case 0:
|
|
13962
|
-
|
|
13963
|
-
|
|
13869
|
+
if (!window.location.href.includes('assortment')) {
|
|
13870
|
+
_context6.next = 2;
|
|
13871
|
+
break;
|
|
13872
|
+
}
|
|
13873
|
+
return _context6.abrupt("return");
|
|
13964
13874
|
case 2:
|
|
13965
|
-
|
|
13875
|
+
_context6.next = 4;
|
|
13876
|
+
return getCustomFormConfig();
|
|
13877
|
+
case 4:
|
|
13878
|
+
productCreatorConfig = _context6.sent;
|
|
13966
13879
|
if (productCreatorConfig && !smArticleModalShowed && !originProductId && !(state !== null && state !== void 0 && (_state$baseData$custo = state.baseData.customData) !== null && _state$baseData$custo !== void 0 && (_state$baseData$custo = _state$baseData$custo.SMArticleId) !== null && _state$baseData$custo !== void 0 && _state$baseData$custo.value)) {
|
|
13967
13880
|
openModal({
|
|
13968
13881
|
accept: true,
|
|
13969
13882
|
reject: true,
|
|
13970
13883
|
text: t('productcreator.modal.createsmarticle'),
|
|
13971
13884
|
callback: function () {
|
|
13972
|
-
var _callback = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13885
|
+
var _callback = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(accepted) {
|
|
13973
13886
|
var customFormDataLoaded;
|
|
13974
|
-
return _regeneratorRuntime.wrap(function
|
|
13975
|
-
while (1) switch (
|
|
13887
|
+
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
13888
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
13976
13889
|
case 0:
|
|
13977
13890
|
toggleLoading('loadCustomForm');
|
|
13978
13891
|
if (!accepted) {
|
|
13979
|
-
|
|
13892
|
+
_context5.next = 8;
|
|
13980
13893
|
break;
|
|
13981
13894
|
}
|
|
13982
|
-
|
|
13895
|
+
_context5.next = 4;
|
|
13983
13896
|
return loadCustomForm(productCreatorConfig);
|
|
13984
13897
|
case 4:
|
|
13985
|
-
customFormDataLoaded =
|
|
13898
|
+
customFormDataLoaded = _context5.sent;
|
|
13986
13899
|
if (customFormDataLoaded) {
|
|
13987
13900
|
setCustomFormData(customFormDataLoaded);
|
|
13988
13901
|
}
|
|
13989
|
-
|
|
13902
|
+
_context5.next = 9;
|
|
13990
13903
|
break;
|
|
13991
13904
|
case 8:
|
|
13992
13905
|
setCustomFormData(undefined);
|
|
@@ -13995,22 +13908,22 @@ function useProductState (basket, divaNr, checkBasket, editedBasket) {
|
|
|
13995
13908
|
toggleLoading('loadCustomForm');
|
|
13996
13909
|
case 11:
|
|
13997
13910
|
case "end":
|
|
13998
|
-
return
|
|
13911
|
+
return _context5.stop();
|
|
13999
13912
|
}
|
|
14000
|
-
},
|
|
13913
|
+
}, _callee5);
|
|
14001
13914
|
}));
|
|
14002
|
-
function callback(
|
|
13915
|
+
function callback(_x3) {
|
|
14003
13916
|
return _callback.apply(this, arguments);
|
|
14004
13917
|
}
|
|
14005
13918
|
return callback;
|
|
14006
13919
|
}()
|
|
14007
13920
|
});
|
|
14008
13921
|
}
|
|
14009
|
-
case
|
|
13922
|
+
case 6:
|
|
14010
13923
|
case "end":
|
|
14011
|
-
return
|
|
13924
|
+
return _context6.stop();
|
|
14012
13925
|
}
|
|
14013
|
-
},
|
|
13926
|
+
}, _callee6);
|
|
14014
13927
|
}));
|
|
14015
13928
|
return _checkAndSetCustomForm.apply(this, arguments);
|
|
14016
13929
|
}
|
|
@@ -14038,10 +13951,10 @@ function useProductState (basket, divaNr, checkBasket, editedBasket) {
|
|
|
14038
13951
|
removeMedia: removeMedia,
|
|
14039
13952
|
sortMedia: sortMedia,
|
|
14040
13953
|
sortVariantRows: sortVariantRows,
|
|
14041
|
-
addBasket: addBasket,
|
|
14042
13954
|
save: save,
|
|
14043
13955
|
reset: reset,
|
|
14044
|
-
updateOptMap: dispatchUpdateOptMap
|
|
13956
|
+
updateOptMap: dispatchUpdateOptMap,
|
|
13957
|
+
setSaved: setSaved
|
|
14045
13958
|
};
|
|
14046
13959
|
}
|
|
14047
13960
|
function reducer(state, action) {
|
|
@@ -14052,7 +13965,9 @@ function reducer(state, action) {
|
|
|
14052
13965
|
if (newState.modified.variantData.some(function (mod) {
|
|
14053
13966
|
return mod[field.field];
|
|
14054
13967
|
})) {
|
|
14055
|
-
newState.initialSelectedFields.
|
|
13968
|
+
if (!newState.initialSelectedFields.find(function (f) {
|
|
13969
|
+
return f.field == field.field;
|
|
13970
|
+
})) newState.initialSelectedFields.push(field);
|
|
14056
13971
|
}
|
|
14057
13972
|
});
|
|
14058
13973
|
return newState;
|
|
@@ -14093,162 +14008,14 @@ function reducer(state, action) {
|
|
|
14093
14008
|
var _newState7 = state;
|
|
14094
14009
|
_newState7 = sortVariantRows(_newState7, action.from, action.to, action.sortedVariantIds);
|
|
14095
14010
|
return _newState7;
|
|
14096
|
-
} else if (action.type == '
|
|
14011
|
+
} else if (action.type == 'updateOptMap') {
|
|
14097
14012
|
var _newState8 = state;
|
|
14098
|
-
action.data.
|
|
14099
|
-
if (d.DivaNr == _newState8.baseData.divaNr) {
|
|
14100
|
-
//if on basketdata is from the current basedata, pass the product as well
|
|
14101
|
-
_newState8 = addBasket(_newState8, d, _newState8.baseData);
|
|
14102
|
-
} else {
|
|
14103
|
-
_newState8 = addBasket(_newState8, d);
|
|
14104
|
-
}
|
|
14105
|
-
});
|
|
14013
|
+
_newState8 = updateOptMap(_newState8, action.data, action.mediaService, action.jwt);
|
|
14106
14014
|
return _newState8;
|
|
14107
|
-
} else if (action.type == 'updateOptMap') {
|
|
14108
|
-
var _newState9 = state;
|
|
14109
|
-
_newState9 = updateOptMap(_newState9, action.data, action.mediaService, action.jwt);
|
|
14110
|
-
return _newState9;
|
|
14111
14015
|
}
|
|
14112
14016
|
return state;
|
|
14113
14017
|
}
|
|
14114
14018
|
|
|
14115
|
-
/**
|
|
14116
|
-
* Adds a basketdata as variant to the current product
|
|
14117
|
-
*
|
|
14118
|
-
* @param prevState the previouse state object
|
|
14119
|
-
* @param basket a basket data to be added as variant
|
|
14120
|
-
* @param productData an existing product data
|
|
14121
|
-
* @returns the updated state object
|
|
14122
|
-
*/
|
|
14123
|
-
function addBasket(prevState, basket, productData) {
|
|
14124
|
-
var _orderSet$OrderLines$, _orderSet$SetVariantB;
|
|
14125
|
-
var baseData = prevState.baseData;
|
|
14126
|
-
var orderSet = basket === null || basket === void 0 ? void 0 : basket.OrderSets[0];
|
|
14127
|
-
var dockingPoints = orderSet.getDockingPointInfo();
|
|
14128
|
-
var newVariantData = prevState.variantData ? _toConsumableArray(prevState.variantData) : [];
|
|
14129
|
-
var newVariant;
|
|
14130
|
-
if (productData) {
|
|
14131
|
-
//if basedata is turned into a varinat, the current product data is used
|
|
14132
|
-
//and the media is removed from the base data, because if there are variants, only the variants should have media
|
|
14133
|
-
newVariant = _objectSpread$5(_objectSpread$5({}, productData), {}, {
|
|
14134
|
-
_id: nanoid(),
|
|
14135
|
-
variantId: newVariantData.length,
|
|
14136
|
-
originDivaNr: basket === null || basket === void 0 ? void 0 : basket.DivaNr
|
|
14137
|
-
});
|
|
14138
|
-
baseData = _objectSpread$5(_objectSpread$5({}, prevState.baseData), {}, {
|
|
14139
|
-
media: []
|
|
14140
|
-
});
|
|
14141
|
-
} else {
|
|
14142
|
-
var _orderSet$BBox, _orderSet$BBox2, _orderSet$BBox3;
|
|
14143
|
-
newVariant = {
|
|
14144
|
-
_id: nanoid(),
|
|
14145
|
-
divaNr: prevState.baseData.divaNr,
|
|
14146
|
-
modelName: prevState.baseData.modelName,
|
|
14147
|
-
shortDescription: prevState.baseData.shortDescription,
|
|
14148
|
-
info: prevState.baseData.info,
|
|
14149
|
-
technicalDescription: orderSet === null || orderSet === void 0 ? void 0 : orderSet.VariantDescription,
|
|
14150
|
-
orderDescription: orderSet === null || orderSet === void 0 ? void 0 : orderSet.VariantDescription,
|
|
14151
|
-
width: orderSet === null || orderSet === void 0 || (_orderSet$BBox = orderSet.BBox) === null || _orderSet$BBox === void 0 ? void 0 : _orderSet$BBox.X,
|
|
14152
|
-
height: orderSet === null || orderSet === void 0 || (_orderSet$BBox2 = orderSet.BBox) === null || _orderSet$BBox2 === void 0 ? void 0 : _orderSet$BBox2.Z,
|
|
14153
|
-
depth: orderSet === null || orderSet === void 0 || (_orderSet$BBox3 = orderSet.BBox) === null || _orderSet$BBox3 === void 0 ? void 0 : _orderSet$BBox3.Y,
|
|
14154
|
-
calculatedPrice: orderSet === null || orderSet === void 0 ? void 0 : orderSet.SetPrice,
|
|
14155
|
-
addedPrice: orderSet === null || orderSet === void 0 ? void 0 : orderSet.SetPrice,
|
|
14156
|
-
articles: orderSet === null || orderSet === void 0 ? void 0 : orderSet.OrderLines.map(function (ol) {
|
|
14157
|
-
var _ol$VariantBasketData;
|
|
14158
|
-
return {
|
|
14159
|
-
articleCodex: ol.ArticleCodex,
|
|
14160
|
-
catalogCodex: orderSet.CatalogCodex,
|
|
14161
|
-
variantValues: (_ol$VariantBasketData = ol.VariantBasketDatas) === null || _ol$VariantBasketData === void 0 ? void 0 : _ol$VariantBasketData.map(function (vb) {
|
|
14162
|
-
return {
|
|
14163
|
-
OPT: vb.OPT,
|
|
14164
|
-
OPV: vb.OPV
|
|
14165
|
-
};
|
|
14166
|
-
})
|
|
14167
|
-
};
|
|
14168
|
-
}),
|
|
14169
|
-
image: orderSet === null || orderSet === void 0 ? void 0 : orderSet.SetImage,
|
|
14170
|
-
image2D: orderSet === null || orderSet === void 0 ? void 0 : orderSet.Set2DImage,
|
|
14171
|
-
catalogId: [orderSet === null || orderSet === void 0 ? void 0 : orderSet.CatalogGUID],
|
|
14172
|
-
collection: [orderSet === null || orderSet === void 0 ? void 0 : orderSet.AccountName],
|
|
14173
|
-
collectionId: [orderSet === null || orderSet === void 0 ? void 0 : orderSet.CollectionGUID],
|
|
14174
|
-
catCodex: [orderSet.CatalogCodex],
|
|
14175
|
-
livingArea: prevState.baseData.livingArea,
|
|
14176
|
-
mainCategory: prevState.baseData.mainCategory,
|
|
14177
|
-
subCategory: prevState.baseData.subCategory,
|
|
14178
|
-
dockingPoints: dockingPoints,
|
|
14179
|
-
variantId: newVariantData.length,
|
|
14180
|
-
originDivaNr: basket === null || basket === void 0 ? void 0 : basket.DivaNr
|
|
14181
|
-
};
|
|
14182
|
-
}
|
|
14183
|
-
var optFields = prevState.optFields ? _toConsumableArray(prevState.optFields) : [];
|
|
14184
|
-
var initialSelectedFields = prevState.initialSelectedFields ? _toConsumableArray(prevState.initialSelectedFields) : [];
|
|
14185
|
-
|
|
14186
|
-
//get optFields and initaliSelectedFileds
|
|
14187
|
-
//if optField is not yet preset in the list of opts, add it
|
|
14188
|
-
//if it is present, check if it is not yet in the list of initial selected fields and if now there are varinats with differences in this OPV
|
|
14189
|
-
//if so add it it initalSelectedFields
|
|
14190
|
-
var basketId = (_orderSet$OrderLines$ = orderSet.OrderLines.find(function (ol) {
|
|
14191
|
-
return !ol.RelatedToBasketID;
|
|
14192
|
-
})) === null || _orderSet$OrderLines$ === void 0 ? void 0 : _orderSet$OrderLines$.BasketID;
|
|
14193
|
-
orderSet === null || orderSet === void 0 || (_orderSet$SetVariantB = orderSet.SetVariantBasketDatas) === null || _orderSet$SetVariantB === void 0 || _orderSet$SetVariantB.filter(function (vb) {
|
|
14194
|
-
return !vb.IsDescribingState;
|
|
14195
|
-
}).forEach(function (v) {
|
|
14196
|
-
var _prevState$variantDat;
|
|
14197
|
-
//if this opt is already set do nothing
|
|
14198
|
-
if (newVariant[v.OPT]) {
|
|
14199
|
-
return;
|
|
14200
|
-
}
|
|
14201
|
-
//if the same OPT existis multiple times, use the one of the main article
|
|
14202
|
-
var variantsWithSameOPT = orderSet.SetVariantBasketDatas.filter(function (v2) {
|
|
14203
|
-
return v2.OPT == v.OPT;
|
|
14204
|
-
});
|
|
14205
|
-
if (variantsWithSameOPT.length > 1) {
|
|
14206
|
-
v = variantsWithSameOPT.find(function (v2) {
|
|
14207
|
-
return v2.BasketID == basketId;
|
|
14208
|
-
}) || v;
|
|
14209
|
-
}
|
|
14210
|
-
newVariant[v.OPT] = v.OPVName || v.OPV;
|
|
14211
|
-
var field = {
|
|
14212
|
-
field: v.OPT,
|
|
14213
|
-
type: 'string',
|
|
14214
|
-
title: v.OPTName || v.OPT,
|
|
14215
|
-
readOnly: true,
|
|
14216
|
-
fieldType: 'OPT'
|
|
14217
|
-
};
|
|
14218
|
-
if (!optFields.find(function (f) {
|
|
14219
|
-
return f.field == v.OPT;
|
|
14220
|
-
})) {
|
|
14221
|
-
optFields.push(field);
|
|
14222
|
-
} else if (!initialSelectedFields.find(function (f) {
|
|
14223
|
-
return f.field == v.OPT;
|
|
14224
|
-
}) && (_prevState$variantDat = prevState.variantData) !== null && _prevState$variantDat !== void 0 && _prevState$variantDat.some(function (vd) {
|
|
14225
|
-
return vd[v.OPT] != newVariant[v.OPT];
|
|
14226
|
-
})) {
|
|
14227
|
-
initialSelectedFields.push(field);
|
|
14228
|
-
}
|
|
14229
|
-
});
|
|
14230
|
-
|
|
14231
|
-
//add classification values to the variant
|
|
14232
|
-
Object.entries(prevState.classificationData).forEach(function (_ref7) {
|
|
14233
|
-
var _ref8 = _slicedToArray(_ref7, 2),
|
|
14234
|
-
key = _ref8[0],
|
|
14235
|
-
value = _ref8[1];
|
|
14236
|
-
return newVariant[key] = value;
|
|
14237
|
-
});
|
|
14238
|
-
var newModifiedData = prevState.modified.variantData ? _toConsumableArray(prevState.modified.variantData) : [];
|
|
14239
|
-
newModifiedData.push({});
|
|
14240
|
-
newVariantData.push(newVariant);
|
|
14241
|
-
return _objectSpread$5(_objectSpread$5({}, prevState), {}, {
|
|
14242
|
-
baseData: baseData,
|
|
14243
|
-
variantData: newVariantData,
|
|
14244
|
-
optFields: optFields,
|
|
14245
|
-
initialSelectedFields: initialSelectedFields,
|
|
14246
|
-
modified: _objectSpread$5(_objectSpread$5({}, prevState.modified), {}, {
|
|
14247
|
-
variantData: newModifiedData
|
|
14248
|
-
})
|
|
14249
|
-
});
|
|
14250
|
-
}
|
|
14251
|
-
|
|
14252
14019
|
/**
|
|
14253
14020
|
* Updates all variant data
|
|
14254
14021
|
*
|
|
@@ -14263,10 +14030,10 @@ function updateVariants(prevState, currentState, configurationData, baseDataFiel
|
|
|
14263
14030
|
if (baseDataFields.some(function (field) {
|
|
14264
14031
|
return field.manualFields && field.field == 'customData';
|
|
14265
14032
|
}) && currentState.baseData.customData) {
|
|
14266
|
-
var manualFields = Object.entries(currentState.baseData.customData).filter(function (
|
|
14267
|
-
var
|
|
14268
|
-
|
|
14269
|
-
var valueObj =
|
|
14033
|
+
var manualFields = Object.entries(currentState.baseData.customData).filter(function (_ref7) {
|
|
14034
|
+
var _ref8 = _slicedToArray(_ref7, 2);
|
|
14035
|
+
_ref8[0];
|
|
14036
|
+
var valueObj = _ref8[1];
|
|
14270
14037
|
return valueObj === null || valueObj === void 0 ? void 0 : valueObj.manual;
|
|
14271
14038
|
});
|
|
14272
14039
|
for (var i = 0; i < manualFields.length; i++) {
|
|
@@ -14552,10 +14319,10 @@ function updateOptMap(currentState, optMap, mediaService, jwt) {
|
|
|
14552
14319
|
LOG$3.debug("Product ".concat(product._id, " has no class mapping for OPT ").concat(optField.field));
|
|
14553
14320
|
return;
|
|
14554
14321
|
}
|
|
14555
|
-
var className = (_optMapEntries$find = optMapEntries.find(function (
|
|
14556
|
-
var
|
|
14557
|
-
|
|
14558
|
-
var optValueField =
|
|
14322
|
+
var className = (_optMapEntries$find = optMapEntries.find(function (_ref9) {
|
|
14323
|
+
var _ref10 = _slicedToArray(_ref9, 2);
|
|
14324
|
+
_ref10[0];
|
|
14325
|
+
var optValueField = _ref10[1];
|
|
14559
14326
|
return (optValueField === null || optValueField === void 0 ? void 0 : optValueField.field) == optField.field;
|
|
14560
14327
|
})) === null || _optMapEntries$find === void 0 ? void 0 : _optMapEntries$find[0];
|
|
14561
14328
|
if (!className) {
|
|
@@ -14676,9 +14443,9 @@ function removeMedia(currentState, data, variants) {
|
|
|
14676
14443
|
return m.url == data.url;
|
|
14677
14444
|
});
|
|
14678
14445
|
if (product.media && index != undefined) {
|
|
14679
|
-
var
|
|
14446
|
+
var _ref11;
|
|
14680
14447
|
var deleted = product.media.splice(index, 1);
|
|
14681
|
-
(
|
|
14448
|
+
(_ref11 = newState.removedMedia).push.apply(_ref11, _toConsumableArray(deleted));
|
|
14682
14449
|
}
|
|
14683
14450
|
});
|
|
14684
14451
|
return newState;
|
|
@@ -15033,6 +14800,9 @@ function RenderJobForm (_ref) {
|
|
|
15033
14800
|
children: [/*#__PURE__*/jsx(MenuItem, {
|
|
15034
14801
|
value: "HQ",
|
|
15035
14802
|
children: "HQ"
|
|
14803
|
+
}), /*#__PURE__*/jsx(MenuItem, {
|
|
14804
|
+
value: "MASTER",
|
|
14805
|
+
children: "MASTER"
|
|
15036
14806
|
}), /*#__PURE__*/jsx(MenuItem, {
|
|
15037
14807
|
value: "SPIN",
|
|
15038
14808
|
children: "SPIN"
|
|
@@ -15220,9 +14990,8 @@ function useRenderjobs (_ref) {
|
|
|
15220
14990
|
var hasVariants = _ref.hasVariants,
|
|
15221
14991
|
baseData = _ref.baseData,
|
|
15222
14992
|
onError = _ref.onError;
|
|
15223
|
-
var _useSellerState = useSellerState()
|
|
15224
|
-
|
|
15225
|
-
var basket = currentBasketState === null || currentBasketState === void 0 ? void 0 : currentBasketState.basket;
|
|
14993
|
+
var _useSellerState = useSellerState();
|
|
14994
|
+
_useSellerState.state.currentBasketState;
|
|
15226
14995
|
var _useState = useState(hasVariants ? [] : [baseData]),
|
|
15227
14996
|
_useState2 = _slicedToArray(_useState, 2),
|
|
15228
14997
|
selected = _useState2[0],
|
|
@@ -15287,60 +15056,42 @@ function useRenderjobs (_ref) {
|
|
|
15287
15056
|
setSelectionData();
|
|
15288
15057
|
}, [selected, renderJobFormState]);
|
|
15289
15058
|
function setSelectionData() {
|
|
15290
|
-
if (!basket) {
|
|
15291
|
-
throw new Error("can't order renderjobs without basket");
|
|
15292
|
-
}
|
|
15293
15059
|
if (hasVariants) {
|
|
15294
|
-
var
|
|
15295
|
-
|
|
15296
|
-
|
|
15297
|
-
|
|
15298
|
-
|
|
15299
|
-
|
|
15300
|
-
|
|
15301
|
-
return selected.some(function (s, selIdx) {
|
|
15302
|
-
var _s$variantId, _cV$VariantID;
|
|
15303
|
-
return ((_s$variantId = s.variantId) !== null && _s$variantId !== void 0 ? _s$variantId : selIdx) == ((_cV$VariantID = cV.VariantID) !== null && _cV$VariantID !== void 0 ? _cV$VariantID : idx);
|
|
15304
|
-
});
|
|
15305
|
-
});
|
|
15306
|
-
if (!selectedConfigVariants) {
|
|
15307
|
-
throw new Error('no selected configVariants');
|
|
15308
|
-
}
|
|
15309
|
-
var d3dps = [];
|
|
15310
|
-
var hqrs = [];
|
|
15311
|
-
selectedConfigVariants.forEach(function (cV) {
|
|
15312
|
-
d3dps.push(JSON.parse(atob(cV.Diva3DProject)));
|
|
15313
|
-
hqrs.push(cV.HQRenderScript);
|
|
15314
|
-
});
|
|
15315
|
-
setDiva3DProjects(d3dps);
|
|
15316
|
-
setInitialDiva3DProject(d3dps[0]);
|
|
15317
|
-
setHQRenderScripts(hqrs);
|
|
15318
|
-
getHQRenderScript(hqrs[0]).then(function (res) {
|
|
15319
|
-
var _res$data;
|
|
15320
|
-
return res.data[0] && res.data[0].hqRenderscript && setCurrentHQRenderScript((_res$data = res.data) === null || _res$data === void 0 || (_res$data = _res$data[0]) === null || _res$data === void 0 ? void 0 : _res$data.hqRenderscript);
|
|
15321
|
-
});
|
|
15322
|
-
};
|
|
15323
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
15324
|
-
_loop();
|
|
15325
|
-
}
|
|
15326
|
-
} catch (err) {
|
|
15327
|
-
_iterator.e(err);
|
|
15328
|
-
} finally {
|
|
15329
|
-
_iterator.f();
|
|
15060
|
+
var selectedConfigVariants = selected.filter(function (v) {
|
|
15061
|
+
return !!v.configuration;
|
|
15062
|
+
}).map(function (v) {
|
|
15063
|
+
return v.configuration;
|
|
15064
|
+
});
|
|
15065
|
+
if (!selectedConfigVariants) {
|
|
15066
|
+
throw new Error('no selected configVariants');
|
|
15330
15067
|
}
|
|
15068
|
+
var d3dps = [];
|
|
15069
|
+
var hqrs = [];
|
|
15070
|
+
selectedConfigVariants.forEach(function (cV) {
|
|
15071
|
+
var set = cV === null || cV === void 0 ? void 0 : cV.OrderSets[0];
|
|
15072
|
+
if (set !== null && set !== void 0 && set.Diva3DProject) d3dps.push(JSON.parse(atob(set.Diva3DProject)));
|
|
15073
|
+
if (set !== null && set !== void 0 && set.HQRenderScript) hqrs.push(set.HQRenderScript);
|
|
15074
|
+
});
|
|
15075
|
+
setDiva3DProjects(d3dps);
|
|
15076
|
+
setInitialDiva3DProject(d3dps[0]);
|
|
15077
|
+
setHQRenderScripts(hqrs);
|
|
15078
|
+
getHQRenderScript(hqrs[0]).then(function (res) {
|
|
15079
|
+
var _res$data;
|
|
15080
|
+
return res.data[0] && res.data[0].hqRenderscript && setCurrentHQRenderScript((_res$data = res.data) === null || _res$data === void 0 || (_res$data = _res$data[0]) === null || _res$data === void 0 ? void 0 : _res$data.hqRenderscript);
|
|
15081
|
+
});
|
|
15331
15082
|
} else {
|
|
15332
|
-
|
|
15333
|
-
|
|
15083
|
+
var _selected$0$configura;
|
|
15084
|
+
var orderSet = (_selected$0$configura = selected[0].configuration) === null || _selected$0$configura === void 0 ? void 0 : _selected$0$configura.OrderSets[0];
|
|
15085
|
+
if (!orderSet || !orderSet.HQRenderScript || !orderSet.Diva3DProject) {
|
|
15086
|
+
throw new Error('HQRenderScript or Diva3DProject missing in product');
|
|
15334
15087
|
}
|
|
15335
|
-
getHQRenderScript(
|
|
15088
|
+
getHQRenderScript(orderSet.HQRenderScript).then(function (res) {
|
|
15336
15089
|
var _res$data2;
|
|
15337
15090
|
return res.data[0] && res.data[0].hqRenderscript && setCurrentHQRenderScript((_res$data2 = res.data) === null || _res$data2 === void 0 || (_res$data2 = _res$data2[0]) === null || _res$data2 === void 0 ? void 0 : _res$data2.hqRenderscript);
|
|
15338
15091
|
});
|
|
15339
|
-
setDiva3DProjects([JSON.parse(atob(
|
|
15340
|
-
setInitialDiva3DProject(JSON.parse(atob(
|
|
15341
|
-
setHQRenderScripts(
|
|
15342
|
-
return os.HQRenderScript;
|
|
15343
|
-
}));
|
|
15092
|
+
setDiva3DProjects([JSON.parse(atob(orderSet.Diva3DProject))]);
|
|
15093
|
+
setInitialDiva3DProject(JSON.parse(atob(orderSet.Diva3DProject)));
|
|
15094
|
+
setHQRenderScripts([orderSet.HQRenderScript]);
|
|
15344
15095
|
}
|
|
15345
15096
|
}
|
|
15346
15097
|
function reducerRenderJobForm(state, action) {
|
|
@@ -15370,11 +15121,11 @@ function useRenderjobs (_ref) {
|
|
|
15370
15121
|
for (var elIdx = 0; elIdx < initSet.ELE.length; elIdx++) {
|
|
15371
15122
|
var initEl = initSet.ELE[elIdx];
|
|
15372
15123
|
var changedCFG = changedSet.ELE[elIdx].CFG;
|
|
15373
|
-
var
|
|
15374
|
-
|
|
15124
|
+
var _iterator = _createForOfIteratorHelper(initEl.CFG),
|
|
15125
|
+
_step;
|
|
15375
15126
|
try {
|
|
15376
|
-
var
|
|
15377
|
-
var initOption =
|
|
15127
|
+
var _loop = function _loop() {
|
|
15128
|
+
var initOption = _step.value;
|
|
15378
15129
|
if (!changedCFG.find(function (option) {
|
|
15379
15130
|
return option.OPT == initOption.OPT && option.OPV == initOption.OPV;
|
|
15380
15131
|
})) {
|
|
@@ -15384,14 +15135,14 @@ function useRenderjobs (_ref) {
|
|
|
15384
15135
|
}
|
|
15385
15136
|
},
|
|
15386
15137
|
_ret;
|
|
15387
|
-
for (
|
|
15388
|
-
_ret =
|
|
15138
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
15139
|
+
_ret = _loop();
|
|
15389
15140
|
if (_ret) return _ret.v;
|
|
15390
15141
|
}
|
|
15391
15142
|
} catch (err) {
|
|
15392
|
-
|
|
15143
|
+
_iterator.e(err);
|
|
15393
15144
|
} finally {
|
|
15394
|
-
|
|
15145
|
+
_iterator.f();
|
|
15395
15146
|
}
|
|
15396
15147
|
}
|
|
15397
15148
|
}
|
|
@@ -15414,7 +15165,7 @@ function useRenderjobs (_ref) {
|
|
|
15414
15165
|
i = 0;
|
|
15415
15166
|
case 5:
|
|
15416
15167
|
if (!(i < selected.length)) {
|
|
15417
|
-
_context.next =
|
|
15168
|
+
_context.next = 24;
|
|
15418
15169
|
break;
|
|
15419
15170
|
}
|
|
15420
15171
|
selectedProduct = selected[i];
|
|
@@ -15456,43 +15207,37 @@ function useRenderjobs (_ref) {
|
|
|
15456
15207
|
if (newJob.fileName && newJob.fileName.includes(';') && variantId) {
|
|
15457
15208
|
newJob.fileName = newJob.fileName.split(';')[Number(variantId)];
|
|
15458
15209
|
}
|
|
15459
|
-
if (basket) {
|
|
15460
|
-
_context.next = 16;
|
|
15461
|
-
break;
|
|
15462
|
-
}
|
|
15463
|
-
throw Error('cant order renderjob without basket');
|
|
15464
|
-
case 16:
|
|
15465
15210
|
if (!diva3DProjects[i]) {
|
|
15466
|
-
_context.next =
|
|
15211
|
+
_context.next = 20;
|
|
15467
15212
|
break;
|
|
15468
15213
|
}
|
|
15469
15214
|
newJob.diva3DProject = JSON.stringify(diva3DProjects[i]);
|
|
15470
15215
|
jobs.push(newJob);
|
|
15471
|
-
return _context.abrupt("continue",
|
|
15472
|
-
case
|
|
15216
|
+
return _context.abrupt("continue", 21);
|
|
15217
|
+
case 20:
|
|
15473
15218
|
throw Error('cant order renderjob without diva3dproject');
|
|
15474
|
-
case
|
|
15219
|
+
case 21:
|
|
15475
15220
|
i++;
|
|
15476
15221
|
_context.next = 5;
|
|
15477
15222
|
break;
|
|
15478
|
-
case
|
|
15479
|
-
_context.next =
|
|
15223
|
+
case 24:
|
|
15224
|
+
_context.next = 26;
|
|
15480
15225
|
return apiSaveRenderJobs({
|
|
15481
15226
|
serviceUrl: apiConfig.mediaService,
|
|
15482
15227
|
jwt: jwt,
|
|
15483
15228
|
jobs: jobs
|
|
15484
15229
|
});
|
|
15485
|
-
case
|
|
15230
|
+
case 26:
|
|
15486
15231
|
jobs = _context.sent;
|
|
15487
15232
|
// reset diva3dproject and hqrenderscript by resetting it
|
|
15488
15233
|
setSelectionData();
|
|
15489
15234
|
jobs.forEach(function (j) {
|
|
15490
15235
|
return onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(j);
|
|
15491
15236
|
});
|
|
15492
|
-
_context.next =
|
|
15237
|
+
_context.next = 35;
|
|
15493
15238
|
break;
|
|
15494
|
-
case
|
|
15495
|
-
_context.prev =
|
|
15239
|
+
case 31:
|
|
15240
|
+
_context.prev = 31;
|
|
15496
15241
|
_context.t0 = _context["catch"](0);
|
|
15497
15242
|
LOG$2.error(new DivaError('Coud not created renderjobs', {
|
|
15498
15243
|
cause: _context.t0
|
|
@@ -15504,11 +15249,11 @@ function useRenderjobs (_ref) {
|
|
|
15504
15249
|
} else {
|
|
15505
15250
|
onError(t('modal.general_error') + ' ' + t('modal.errorcode') + ':' + DivaUtils$1.getCurrentTraceId() + ' ' + DivaUtils$1.formatDate(new Date(), true, undefined, true));
|
|
15506
15251
|
}
|
|
15507
|
-
case
|
|
15252
|
+
case 35:
|
|
15508
15253
|
case "end":
|
|
15509
15254
|
return _context.stop();
|
|
15510
15255
|
}
|
|
15511
|
-
}, _callee, null, [[0,
|
|
15256
|
+
}, _callee, null, [[0, 31]]);
|
|
15512
15257
|
}));
|
|
15513
15258
|
return function createRenderJob(_x) {
|
|
15514
15259
|
return _ref3.apply(this, arguments);
|
|
@@ -16238,24 +15983,36 @@ function RenderJobTableLegacy (_ref) {
|
|
|
16238
15983
|
customRenderer: function customRenderer(value) {
|
|
16239
15984
|
switch (Number(value)) {
|
|
16240
15985
|
case 0:
|
|
16241
|
-
return
|
|
15986
|
+
return /*#__PURE__*/jsx(Fragment, {
|
|
15987
|
+
children: t('productcreator.fields.renderjob.userstate.created')
|
|
15988
|
+
});
|
|
16242
15989
|
case 1:
|
|
16243
15990
|
case 2:
|
|
16244
15991
|
case 3:
|
|
16245
|
-
return
|
|
15992
|
+
return /*#__PURE__*/jsx(Fragment, {
|
|
15993
|
+
children: t('productcreator.fields.renderjob.userstate.ordered')
|
|
15994
|
+
});
|
|
16246
15995
|
case 4:
|
|
16247
15996
|
case 5:
|
|
16248
15997
|
case 6:
|
|
16249
15998
|
case 7:
|
|
16250
15999
|
case 9:
|
|
16251
16000
|
case 11:
|
|
16252
|
-
return
|
|
16001
|
+
return /*#__PURE__*/jsx(Fragment, {
|
|
16002
|
+
children: t('productcreator.fields.renderjob.userstate.inProduction')
|
|
16003
|
+
});
|
|
16253
16004
|
case 8:
|
|
16254
|
-
return
|
|
16005
|
+
return /*#__PURE__*/jsx(Fragment, {
|
|
16006
|
+
children: t('productcreator.fields.renderjob.userstate.renderFinished')
|
|
16007
|
+
});
|
|
16255
16008
|
case 10:
|
|
16256
|
-
return
|
|
16009
|
+
return /*#__PURE__*/jsx(Fragment, {
|
|
16010
|
+
children: t('productcreator.fields.renderjob.userstate.canceled')
|
|
16011
|
+
});
|
|
16257
16012
|
case 12:
|
|
16258
|
-
return
|
|
16013
|
+
return /*#__PURE__*/jsx(Fragment, {
|
|
16014
|
+
children: t('productcreator.fields.renderjob.userstate.finished')
|
|
16015
|
+
});
|
|
16259
16016
|
}
|
|
16260
16017
|
return /*#__PURE__*/jsx(Fragment, {});
|
|
16261
16018
|
}
|
|
@@ -16627,11 +16384,9 @@ function RenderJobTableLegacy (_ref) {
|
|
|
16627
16384
|
}
|
|
16628
16385
|
|
|
16629
16386
|
function ProductCreator (_ref) {
|
|
16630
|
-
var _state$variantData, _state$variantData2, _state$variantData$fi, _state$variantData3, _state$baseData$custo2,
|
|
16387
|
+
var _state$variantData, _state$variantData2, _state$variantData$fi, _state$variantData3, _state$baseData$custo2, _currentBasket$DivaNr, _configurationData$Pr6, _state$baseData$custo3, _configurationData$Pr7, _configurationData$Pr8, _currentBasket$OrderS;
|
|
16631
16388
|
var basket = _ref.basket,
|
|
16632
|
-
divaNr = _ref.divaNr
|
|
16633
|
-
checkBasket = _ref.checkBasket,
|
|
16634
|
-
editedBasket = _ref.editedBasket;
|
|
16389
|
+
divaNr = _ref.divaNr;
|
|
16635
16390
|
var _useSellerState = useSellerState(),
|
|
16636
16391
|
_useSellerState$actio = _useSellerState.actions,
|
|
16637
16392
|
openPlanner = _useSellerState$actio.openPlanner,
|
|
@@ -16647,7 +16402,7 @@ function ProductCreator (_ref) {
|
|
|
16647
16402
|
userHasPermission = _useDivaCore.actions.userHasPermission;
|
|
16648
16403
|
var _useTranslation = useTranslation(),
|
|
16649
16404
|
t = _useTranslation.t;
|
|
16650
|
-
var _useProductState = useProductState(basket, divaNr
|
|
16405
|
+
var _useProductState = useProductState(basket, divaNr),
|
|
16651
16406
|
state = _useProductState.state,
|
|
16652
16407
|
baseDataFields = _useProductState.baseDataFields,
|
|
16653
16408
|
currentBasket = _useProductState.basket,
|
|
@@ -16671,8 +16426,8 @@ function ProductCreator (_ref) {
|
|
|
16671
16426
|
sortMedia = _useProductState.sortMedia,
|
|
16672
16427
|
sortVariantRows = _useProductState.sortVariantRows,
|
|
16673
16428
|
removeMedia = _useProductState.removeMedia,
|
|
16674
|
-
addBasket = _useProductState.addBasket,
|
|
16675
16429
|
save = _useProductState.save,
|
|
16430
|
+
setSaved = _useProductState.setSaved,
|
|
16676
16431
|
reset = _useProductState.reset,
|
|
16677
16432
|
updateOptMap = _useProductState.updateOptMap;
|
|
16678
16433
|
var _useState = useState(),
|
|
@@ -16758,61 +16513,49 @@ function ProductCreator (_ref) {
|
|
|
16758
16513
|
label: 'productcreator.acceptBaseconfigData',
|
|
16759
16514
|
key: 'BASECONFIG'
|
|
16760
16515
|
}];
|
|
16516
|
+
setSaved(false);
|
|
16761
16517
|
setTabs(_tabs2);
|
|
16762
16518
|
setTab('BASECONFIG');
|
|
16763
16519
|
}
|
|
16764
16520
|
}, [state]);
|
|
16521
|
+
useEffect(function () {
|
|
16522
|
+
if (basket) setSaved(false);
|
|
16523
|
+
}, [basket]);
|
|
16765
16524
|
useEffect(function () {
|
|
16766
16525
|
var _state$initialSelecte;
|
|
16767
16526
|
//reset selection if new data is loaded
|
|
16768
16527
|
setSelectedFields((_state$initialSelecte = state === null || state === void 0 ? void 0 : state.initialSelectedFields) !== null && _state$initialSelecte !== void 0 ? _state$initialSelecte : []);
|
|
16769
16528
|
}, [state === null || state === void 0 ? void 0 : state.initialSelectedFields]);
|
|
16770
16529
|
var onOpenPlanner = function onOpenPlanner() {
|
|
16530
|
+
var basketToInit = new BasketData(state === null || state === void 0 ? void 0 : state.baseData.configuration);
|
|
16531
|
+
basketToInit.OrderSets[0].TinyVariantConfiguration = state === null || state === void 0 ? void 0 : state.variantData.map(function (v) {
|
|
16532
|
+
return v.configuration;
|
|
16533
|
+
});
|
|
16771
16534
|
if (currentBasket !== null && currentBasket !== void 0 && currentBasket.SetPlannerInfos) {
|
|
16772
16535
|
openPlanner({
|
|
16773
|
-
basketData:
|
|
16774
|
-
divaNr:
|
|
16536
|
+
basketData: basketToInit,
|
|
16537
|
+
divaNr: state === null || state === void 0 ? void 0 : state.baseData.divaNr,
|
|
16775
16538
|
returnTo: 'SETPLANNER_OPEN_SELLER_PRODUCTCREATOR',
|
|
16776
16539
|
forceReload: '1'
|
|
16777
16540
|
});
|
|
16778
16541
|
} else if (showVarinats) {
|
|
16779
16542
|
openPlanner({
|
|
16780
|
-
setId:
|
|
16781
|
-
basketData:
|
|
16782
|
-
divaNr:
|
|
16543
|
+
setId: basketToInit.OrderSets[0].SetID,
|
|
16544
|
+
basketData: basketToInit,
|
|
16545
|
+
divaNr: state === null || state === void 0 ? void 0 : state.baseData.divaNr,
|
|
16783
16546
|
returnTo: 'FAVORITS_OPEN_SELLER_PRODUCTCREATOR',
|
|
16784
16547
|
forceReload: '1'
|
|
16785
16548
|
});
|
|
16786
16549
|
} else {
|
|
16787
16550
|
openPlanner({
|
|
16788
|
-
setId:
|
|
16789
|
-
basketData:
|
|
16790
|
-
divaNr:
|
|
16551
|
+
setId: basketToInit.OrderSets[0].SetID,
|
|
16552
|
+
basketData: basketToInit,
|
|
16553
|
+
divaNr: state === null || state === void 0 ? void 0 : state.baseData.divaNr,
|
|
16791
16554
|
returnTo: 'OPEN_SELLER_PRODUCTCREATOR',
|
|
16792
16555
|
forceReload: '1'
|
|
16793
16556
|
});
|
|
16794
16557
|
}
|
|
16795
16558
|
};
|
|
16796
|
-
var onAddBasket = function onAddBasket() {
|
|
16797
|
-
openModal({
|
|
16798
|
-
accept: true,
|
|
16799
|
-
reject: true,
|
|
16800
|
-
title: 'Planung hinzufügen',
|
|
16801
|
-
text: 'Geben Sie die DivaNr der Planung ein, die Sie zu diesem Produkt hinzufügen wollen.' + ' Die Plannung muss vom selben Katalog sein und muss die selben Artikel enthalten. ',
|
|
16802
|
-
content: /*#__PURE__*/jsx(Fragment, {
|
|
16803
|
-
children: /*#__PURE__*/jsx(TextField$1, {
|
|
16804
|
-
label: "DivaNr",
|
|
16805
|
-
name: "DivaNr"
|
|
16806
|
-
})
|
|
16807
|
-
}),
|
|
16808
|
-
callback: function callback(d) {
|
|
16809
|
-
if (d instanceof FormData) {
|
|
16810
|
-
var _d$get;
|
|
16811
|
-
addBasket((_d$get = d.get('DivaNr')) === null || _d$get === void 0 ? void 0 : _d$get.trim());
|
|
16812
|
-
}
|
|
16813
|
-
}
|
|
16814
|
-
});
|
|
16815
|
-
};
|
|
16816
16559
|
var onSave = /*#__PURE__*/function () {
|
|
16817
16560
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
16818
16561
|
var success, _opener, _state$variantData$fi2, _state$variantData4, variantId, _configurationData$Pr2, _configurationData$Pr3;
|
|
@@ -16831,7 +16574,6 @@ function ProductCreator (_ref) {
|
|
|
16831
16574
|
_context.next = 8;
|
|
16832
16575
|
break;
|
|
16833
16576
|
case 7:
|
|
16834
|
-
//nothing changed, so we skip saving
|
|
16835
16577
|
success = true;
|
|
16836
16578
|
case 8:
|
|
16837
16579
|
if (success) {
|
|
@@ -16990,9 +16732,7 @@ function ProductCreator (_ref) {
|
|
|
16990
16732
|
var ButtonsElement = /*#__PURE__*/jsx(Buttons, {
|
|
16991
16733
|
saveDisabled: missingMandatoryFields || missingMandatoryCustomFields,
|
|
16992
16734
|
editBasketDisabled: editBasketDisabled,
|
|
16993
|
-
allowAdd: configurationData === null || configurationData === void 0 || (_configurationData$Pr6 = configurationData.ProductCreator) === null || _configurationData$Pr6 === void 0 ? void 0 : _configurationData$Pr6.allowAddBasket,
|
|
16994
16735
|
onSave: onSave,
|
|
16995
|
-
onAddBasket: onAddBasket,
|
|
16996
16736
|
onOpenPlanner: onOpenPlanner,
|
|
16997
16737
|
onCancel: onCancel
|
|
16998
16738
|
});
|
|
@@ -17005,7 +16745,7 @@ function ProductCreator (_ref) {
|
|
|
17005
16745
|
height: '100%'
|
|
17006
16746
|
},
|
|
17007
16747
|
children: [/*#__PURE__*/jsx(Title, {
|
|
17008
|
-
text: "".concat(t('productcreator.title'), " - ").concat(currentBasket === null || currentBasket === void 0 ? void 0 : currentBasket.DivaNr)
|
|
16748
|
+
text: "".concat(t('productcreator.title'), " - ").concat((_currentBasket$DivaNr = currentBasket === null || currentBasket === void 0 ? void 0 : currentBasket.DivaNr) !== null && _currentBasket$DivaNr !== void 0 ? _currentBasket$DivaNr : state.baseData.divaNr)
|
|
17009
16749
|
}), /*#__PURE__*/jsxs("div", {
|
|
17010
16750
|
style: {
|
|
17011
16751
|
position: 'relative',
|
|
@@ -17023,7 +16763,6 @@ function ProductCreator (_ref) {
|
|
|
17023
16763
|
return setTab(v);
|
|
17024
16764
|
},
|
|
17025
16765
|
indicatorColor: "primary",
|
|
17026
|
-
textColor: "primary",
|
|
17027
16766
|
children: [tabs.map(function (tab) {
|
|
17028
16767
|
return /*#__PURE__*/jsx(Tab$1, {
|
|
17029
16768
|
style: {
|
|
@@ -17085,20 +16824,20 @@ function ProductCreator (_ref) {
|
|
|
17085
16824
|
}), tab == 'RENDERJOBLEGACY' && /*#__PURE__*/jsx(RenderJobTableLegacy, {
|
|
17086
16825
|
variantData: validVariantData,
|
|
17087
16826
|
baseData: state.baseData,
|
|
17088
|
-
configuration: configurationData === null || configurationData === void 0 || (_configurationData$
|
|
16827
|
+
configuration: configurationData === null || configurationData === void 0 || (_configurationData$Pr6 = configurationData.ProductCreator) === null || _configurationData$Pr6 === void 0 || (_configurationData$Pr6 = _configurationData$Pr6.renderjobs) === null || _configurationData$Pr6 === void 0 ? void 0 : _configurationData$Pr6.ambienteSelection,
|
|
17089
16828
|
basketData: currentBasket,
|
|
17090
16829
|
onSave: save,
|
|
17091
16830
|
saved: !isNew,
|
|
17092
16831
|
onError: setError,
|
|
17093
16832
|
children: !(state !== null && state !== void 0 && (_state$baseData$custo3 = state.baseData.customData) !== null && _state$baseData$custo3 !== void 0 && (_state$baseData$custo3 = _state$baseData$custo3.SMArticleId) !== null && _state$baseData$custo3 !== void 0 && _state$baseData$custo3.value) && ButtonsElement
|
|
17094
|
-
}), (configurationData === null || configurationData === void 0 || (_configurationData$
|
|
16833
|
+
}), (configurationData === null || configurationData === void 0 || (_configurationData$Pr7 = configurationData.ProductCreator) === null || _configurationData$Pr7 === void 0 ? void 0 : _configurationData$Pr7.renderjobs) && tab == 'RENDERJOB' && /*#__PURE__*/jsx(RenderJobTable, {
|
|
17095
16834
|
variantData: validVariantData,
|
|
17096
16835
|
baseData: state.baseData,
|
|
17097
16836
|
basketData: currentBasket,
|
|
17098
16837
|
onSave: save,
|
|
17099
16838
|
saved: !isNew,
|
|
17100
16839
|
onError: setError,
|
|
17101
|
-
config: configurationData === null || configurationData === void 0 || (_configurationData$
|
|
16840
|
+
config: configurationData === null || configurationData === void 0 || (_configurationData$Pr8 = configurationData.ProductCreator) === null || _configurationData$Pr8 === void 0 ? void 0 : _configurationData$Pr8.renderjobs
|
|
17102
16841
|
}), tab == 'MEDIA' && /*#__PURE__*/jsx(MediaTable, {
|
|
17103
16842
|
variantData: validVariantData,
|
|
17104
16843
|
baseData: state.baseData,
|
|
@@ -17123,7 +16862,7 @@ function ProductCreator (_ref) {
|
|
|
17123
16862
|
isBaseConfig: customFormData ? true : false,
|
|
17124
16863
|
children: ButtonsElement
|
|
17125
16864
|
}), tab == 'CLASS' && /*#__PURE__*/jsx(ClassificationDataForm, {
|
|
17126
|
-
orderDescription: currentBasket.OrderSets[0].VariantDescription,
|
|
16865
|
+
orderDescription: (_currentBasket$OrderS = currentBasket === null || currentBasket === void 0 ? void 0 : currentBasket.OrderSets[0].VariantDescription) !== null && _currentBasket$OrderS !== void 0 ? _currentBasket$OrderS : state.baseData.technicalDescription,
|
|
17127
16866
|
classificationData: state === null || state === void 0 ? void 0 : state.classificationData,
|
|
17128
16867
|
classificationFields: state === null || state === void 0 ? void 0 : state.classificationFields,
|
|
17129
16868
|
updateClassification: updateClassifications,
|
|
@@ -17439,7 +17178,6 @@ function ModuleComponent(_ref) {
|
|
|
17439
17178
|
activeDivaNr = _ref.activeDivaNr,
|
|
17440
17179
|
activeBasket = _ref.activeBasket,
|
|
17441
17180
|
activeAccountId = _ref.activeAccountId,
|
|
17442
|
-
editedBasket = _ref.editedBasket,
|
|
17443
17181
|
checkBasket = _ref.checkBasket;
|
|
17444
17182
|
var _useSellerState2 = useSellerState(),
|
|
17445
17183
|
configurationData = _useSellerState2.state.configurationData;
|
|
@@ -17480,9 +17218,7 @@ function ModuleComponent(_ref) {
|
|
|
17480
17218
|
case 'PCreator':
|
|
17481
17219
|
return /*#__PURE__*/jsx(ProductCreator, {
|
|
17482
17220
|
basket: activeBasket,
|
|
17483
|
-
divaNr: activeDivaNr
|
|
17484
|
-
checkBasket: checkBasket,
|
|
17485
|
-
editedBasket: editedBasket
|
|
17221
|
+
divaNr: activeDivaNr
|
|
17486
17222
|
});
|
|
17487
17223
|
default:
|
|
17488
17224
|
throw Error("Unknown Module: ".concat(activeModule));
|
|
@@ -17578,7 +17314,6 @@ var Main = function Main(_ref) {
|
|
|
17578
17314
|
activeCollectionId: parameters === null || parameters === void 0 ? void 0 : parameters.collectionId,
|
|
17579
17315
|
activeDivaNr: (parameters === null || parameters === void 0 ? void 0 : parameters.DivaNR) || (parameters === null || parameters === void 0 ? void 0 : parameters.divaNr) || (parameters === null || parameters === void 0 ? void 0 : parameters.divanr),
|
|
17580
17316
|
activeBasket: internal === null || internal === void 0 ? void 0 : internal.basketData,
|
|
17581
|
-
editedBasket: internal === null || internal === void 0 ? void 0 : internal.edited,
|
|
17582
17317
|
activeAccountId: parameters === null || parameters === void 0 ? void 0 : parameters.accountId,
|
|
17583
17318
|
checkBasket: parameters === null || parameters === void 0 ? void 0 : parameters.check
|
|
17584
17319
|
})
|