contentoh-components-library 21.2.11 → 21.2.14
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/dist/components/atoms/ListCommercialRetailers/ListCommercialRetailers.stories.js +36 -0
- package/dist/components/atoms/ListCommercialRetailers/index.js +64 -0
- package/dist/components/atoms/ListCommercialRetailers/styles.js +20 -0
- package/dist/components/atoms/MenuCommercialRetailers/MenuCommercialRetailers.stories.js +37 -0
- package/dist/components/atoms/MenuCommercialRetailers/index.js +25 -0
- package/dist/components/atoms/MenuCommercialRetailers/styles.js +20 -0
- package/dist/components/atoms/MenuProductImage/MenuProductImage.stories.js +28 -0
- package/dist/components/atoms/MenuProductImage/index.js +88 -0
- package/dist/components/atoms/MenuProductImage/styles.js +20 -0
- package/dist/components/atoms/StatusTag/StatusTag.stories.js +48 -0
- package/dist/components/atoms/StatusTag/index.js +58 -0
- package/dist/components/atoms/StatusTag/styles.js +20 -0
- package/dist/components/molecules/ApproveRejetPanel/ApproveRejetPanel.stories.js +25 -0
- package/dist/components/molecules/ApproveRejetPanel/index.js +49 -0
- package/dist/components/molecules/ApproveRejetPanel/styles.js +18 -0
- package/dist/components/molecules/GalleryElement/index.js +16 -1
- package/dist/components/molecules/GalleryHeader/index.js +5 -1
- package/dist/components/molecules/SignInLoginCreationApp/SignInLogin.stories.js +28 -0
- package/dist/components/molecules/SignInLoginCreationApp/index.js +270 -0
- package/dist/components/molecules/SignInLoginCreationApp/styles.js +20 -0
- package/dist/components/organisms/ImageDataTable/index.js +13 -2
- package/dist/components/pages/RegistrationLoginFirstStep/RegistrationLoginFirstStep.stories.js +37 -0
- package/dist/components/pages/RegistrationLoginFirstStep/index.js +269 -0
- package/dist/components/pages/RegistrationLoginFirstStep/styles.js +20 -0
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +50 -60
- package/dist/components/pages/RetailerProductEdition/index.js +21 -4
- package/package.json +1 -1
- package/src/components/molecules/GalleryElement/index.js +18 -0
- package/src/components/molecules/GalleryHeader/index.js +2 -1
- package/src/components/organisms/ImageDataTable/index.js +17 -0
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +50 -61
- package/src/components/pages/RetailerProductEdition/index.js +13 -0
|
@@ -31,65 +31,55 @@ RetailerProductEditionDefault.args = {
|
|
|
31
31
|
"Ficha técnica": false,
|
|
32
32
|
Imágenes: false
|
|
33
33
|
},
|
|
34
|
-
token: "
|
|
34
|
+
token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI3MTNhNzQ1Ny1mOTQzLTRiYzktOGViMC04NmI0MWY1YmQ0ZjgiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwiY29nbml0bzp1c2VybmFtZSI6IjcxM2E3NDU3LWY5NDMtNGJjOS04ZWIwLTg2YjQxZjViZDRmOCIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiJlM2ExZmQ2OC02OTAwLTRjNWYtYjM5MC1jNjY0MDZhZjkyMGYiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY2MTU0ODI4NSwibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY2MTU1MTg4NSwiaWF0IjoxNjYxNTQ4Mjg1LCJlbWFpbCI6ImhjYXJyaWxsb0Bjb250ZW50b2guY29tIn0.GUmPbOrd8-llRODdaidjReKHBwrVbGV5LP37aD_o14BQ67VSmH2pxLvrZRBNsZhvP0vZuetXt19pyiFgCr1-SF5CMHD3dcnPq2Ka0PUEf8raNEoseCPGaDUugu-waz1qPadZN1OrlhQTm9mOWoGj4u0gQv5FGAbC6xMcRernAo4QX41-Pfjvp2u7p62BYkp6rafzTjazUHZiG-ueqPI9QQQ-2zkbTo46l7TFYz6ATNSiZEvezc52L1nzWDhI5Q8xbNA546WC-leLr30SV9vrXBTGdvLdCKeqEYPrVG1L3nXXZ9CvtHJjdkb60irWZjXT1LbpulfL3IqO2_PKHTUpHQ",
|
|
35
35
|
productSelected: {
|
|
36
36
|
services: {
|
|
37
37
|
datasheets: 1,
|
|
38
38
|
descriptions: 1,
|
|
39
39
|
images: 1
|
|
40
40
|
},
|
|
41
|
-
orderId:
|
|
42
|
-
status: "
|
|
43
|
-
datasheet_status: "
|
|
41
|
+
orderId: 127,
|
|
42
|
+
status: "AS",
|
|
43
|
+
datasheet_status: "AS",
|
|
44
44
|
prio: "none",
|
|
45
45
|
version: 2,
|
|
46
|
-
description_status: "
|
|
47
|
-
images_status: "
|
|
46
|
+
description_status: "AS",
|
|
47
|
+
images_status: "AS",
|
|
48
48
|
article: {
|
|
49
|
-
id_article:
|
|
50
|
-
id_category: "
|
|
51
|
-
name: "
|
|
52
|
-
upc: "
|
|
53
|
-
timestamp: "2022-
|
|
54
|
-
id_user:
|
|
49
|
+
id_article: 76186,
|
|
50
|
+
id_category: "399",
|
|
51
|
+
name: "Croquetas Dog Chow",
|
|
52
|
+
upc: "4535354",
|
|
53
|
+
timestamp: "2022-07-21T15:20:25.000Z",
|
|
54
|
+
id_user: 28,
|
|
55
55
|
status: "NULL",
|
|
56
56
|
active: 1,
|
|
57
|
-
company_id:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
id_description_facilitator: 158,
|
|
69
|
-
id_images_especialist: 366,
|
|
70
|
-
id_images_facilitator: 160,
|
|
71
|
-
id_auditor: 9,
|
|
57
|
+
company_id: 1,
|
|
58
|
+
company_name: "COMPANY DEV",
|
|
59
|
+
country: "México",
|
|
60
|
+
id_order: 127,
|
|
61
|
+
id_datasheet_especialist: 54,
|
|
62
|
+
id_datasheet_facilitator: 52,
|
|
63
|
+
id_description_especialist: 54,
|
|
64
|
+
id_description_facilitator: 52,
|
|
65
|
+
id_images_especialist: 55,
|
|
66
|
+
id_images_facilitator: 53,
|
|
67
|
+
id_auditor: 30,
|
|
72
68
|
id_recepcionist: null,
|
|
73
|
-
category: "
|
|
74
|
-
missingAttributes:
|
|
75
|
-
missingDescriptions:
|
|
76
|
-
missingImages:
|
|
69
|
+
category: "Mascotas|Alimentos y Premios|Alimento para Perros",
|
|
70
|
+
missingAttributes: null,
|
|
71
|
+
missingDescriptions: null,
|
|
72
|
+
missingImages: null
|
|
77
73
|
},
|
|
78
74
|
retailers: [{
|
|
79
|
-
id:
|
|
80
|
-
name: "
|
|
81
|
-
country: "México",
|
|
82
|
-
id_region: 1,
|
|
83
|
-
active: 1
|
|
84
|
-
}, {
|
|
85
|
-
id: 43,
|
|
86
|
-
name: "City Club",
|
|
75
|
+
id: 2,
|
|
76
|
+
name: "Walmart Mercancías Generales",
|
|
87
77
|
country: "México",
|
|
88
78
|
id_region: 1,
|
|
89
79
|
active: 1
|
|
90
80
|
}],
|
|
91
|
-
country:
|
|
92
|
-
upc: "
|
|
81
|
+
country: "México",
|
|
82
|
+
upc: "4535354"
|
|
93
83
|
},
|
|
94
84
|
location: {
|
|
95
85
|
product: {
|
|
@@ -98,36 +88,36 @@ RetailerProductEditionDefault.args = {
|
|
|
98
88
|
}
|
|
99
89
|
},
|
|
100
90
|
user: {
|
|
101
|
-
id_user:
|
|
102
|
-
name: "
|
|
103
|
-
last_name: "
|
|
104
|
-
email: "
|
|
105
|
-
position:
|
|
91
|
+
id_user: 65,
|
|
92
|
+
name: "Oscar",
|
|
93
|
+
last_name: "Arenas",
|
|
94
|
+
email: "oarenas@contentoh.com",
|
|
95
|
+
position: null,
|
|
106
96
|
telephone: null,
|
|
107
97
|
country: null,
|
|
108
|
-
id_company:
|
|
109
|
-
id_cognito: "
|
|
98
|
+
id_company: 2,
|
|
99
|
+
id_cognito: "73cc8d40-c841-422a-a2f2-e69d7fe26ebf",
|
|
110
100
|
birth_Date: null,
|
|
111
101
|
about_me: null,
|
|
112
102
|
zip_code: null,
|
|
113
103
|
address: null,
|
|
114
104
|
job: null,
|
|
115
105
|
id_stripe: null,
|
|
116
|
-
id_role:
|
|
106
|
+
id_role: 1,
|
|
117
107
|
active: 1,
|
|
118
108
|
is_retailer: 0,
|
|
119
|
-
email_notify:
|
|
109
|
+
email_notify: 0,
|
|
120
110
|
membership: {
|
|
121
|
-
id:
|
|
122
|
-
start_date: "
|
|
123
|
-
end_date: "
|
|
124
|
-
planID:
|
|
125
|
-
plan: "
|
|
126
|
-
name: "Plan
|
|
127
|
-
user_limit: "
|
|
128
|
-
products_limit: "
|
|
129
|
-
type: "
|
|
111
|
+
id: 2,
|
|
112
|
+
start_date: "2021-11-05T02:35:12.000Z",
|
|
113
|
+
end_date: "2022-11-05T02:34:49.000Z",
|
|
114
|
+
planID: 1,
|
|
115
|
+
plan: "prod_KtkvuFFLpOdP6e",
|
|
116
|
+
name: "Plan Free",
|
|
117
|
+
user_limit: "1",
|
|
118
|
+
products_limit: "3",
|
|
119
|
+
type: "PyMES"
|
|
130
120
|
},
|
|
131
|
-
src: "https://content-management-profile
|
|
121
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-65/65.png?1661554813155"
|
|
132
122
|
}
|
|
133
123
|
};
|
|
@@ -116,6 +116,12 @@ var reducerImages = function reducerImages(state, action) {
|
|
|
116
116
|
values: values
|
|
117
117
|
});
|
|
118
118
|
|
|
119
|
+
case "changeShotType":
|
|
120
|
+
values[action.index][action.attribute] = action.value;
|
|
121
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, state), {}, {
|
|
122
|
+
values: values
|
|
123
|
+
});
|
|
124
|
+
|
|
119
125
|
case "changeAttrValue":
|
|
120
126
|
var index = attrForImgs.general.findIndex(function (f) {
|
|
121
127
|
return f.id === action.id;
|
|
@@ -445,6 +451,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
445
451
|
showVersionSelector = _useCloseModal2[0],
|
|
446
452
|
setShowVersionSelector = _useCloseModal2[1];
|
|
447
453
|
|
|
454
|
+
var shotThd = [58, 59, 60, 61].includes(activeRetailer.id);
|
|
448
455
|
(0, _react.useEffect)(function () {
|
|
449
456
|
checkAll && setSelectedImages(images.values);
|
|
450
457
|
}, [checkAll]);
|
|
@@ -719,7 +726,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
719
726
|
}, [activeRetailer, services]);
|
|
720
727
|
|
|
721
728
|
var thumbs = function thumbs() {
|
|
722
|
-
var _images$imageType, _images$imagePackagin, _images$values;
|
|
729
|
+
var _images$imageType, _images$imagePackagin, _images$imageShotType, _images$values;
|
|
723
730
|
|
|
724
731
|
var imageInputs = socketType === null || socketType === void 0 ? void 0 : socketType.slice();
|
|
725
732
|
var imageType = images === null || images === void 0 ? void 0 : (_images$imageType = images.imageType) === null || _images$imageType === void 0 ? void 0 : _images$imageType.map(function (e) {
|
|
@@ -734,6 +741,12 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
734
741
|
name: e === null || e === void 0 ? void 0 : e.name
|
|
735
742
|
};
|
|
736
743
|
});
|
|
744
|
+
var imageShotType = images === null || images === void 0 ? void 0 : (_images$imageShotType = images.imageShotType) === null || _images$imageShotType === void 0 ? void 0 : _images$imageShotType.map(function (e) {
|
|
745
|
+
return {
|
|
746
|
+
value: e === null || e === void 0 ? void 0 : e.id,
|
|
747
|
+
name: e === null || e === void 0 ? void 0 : e.type_shot
|
|
748
|
+
};
|
|
749
|
+
});
|
|
737
750
|
return images === null || images === void 0 ? void 0 : (_images$values = images.values) === null || _images$values === void 0 ? void 0 : _images$values.map(function (image, index) {
|
|
738
751
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_GalleryElement.GalleryElement, {
|
|
739
752
|
setCheckAll: setCheckAll,
|
|
@@ -745,10 +758,12 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
745
758
|
imageType: imageType,
|
|
746
759
|
imagePackagingType: imagePackagingType,
|
|
747
760
|
imageInputs: imageInputs,
|
|
761
|
+
imageShotType: imageShotType,
|
|
748
762
|
setSocketType: setSocketType,
|
|
749
763
|
changeImage: setImages,
|
|
750
764
|
selectedImages: selectedImages,
|
|
751
|
-
setSelectedImages: setSelectedImages
|
|
765
|
+
setSelectedImages: setSelectedImages,
|
|
766
|
+
shotThd: shotThd
|
|
752
767
|
}, index + "-" + imageType.name);
|
|
753
768
|
});
|
|
754
769
|
};
|
|
@@ -1752,7 +1767,8 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1752
1767
|
},
|
|
1753
1768
|
showSaveButton: auditorAssigned() || userAssigned(),
|
|
1754
1769
|
setShowVersionSelector: setShowVersionSelector,
|
|
1755
|
-
version: version
|
|
1770
|
+
version: version,
|
|
1771
|
+
shotThd: shotThd
|
|
1756
1772
|
})]
|
|
1757
1773
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
1758
1774
|
className: "product-information",
|
|
@@ -1858,7 +1874,8 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1858
1874
|
children: [!imageLayout && activeTab === "Imágenes" && (product === null || product === void 0 ? void 0 : (_product$services2 = product.services) === null || _product$services2 === void 0 ? void 0 : _product$services2.images) === 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GalleryHeader.GalleryHeader, {
|
|
1859
1875
|
setSelectedImages: setSelectedImages,
|
|
1860
1876
|
checkAll: checkAll,
|
|
1861
|
-
setCheckAll: setCheckAll
|
|
1877
|
+
setCheckAll: setCheckAll,
|
|
1878
|
+
shotThd: shotThd
|
|
1862
1879
|
}), activeTab === "Ficha técnica" && ((product === null || product === void 0 ? void 0 : product.datasheet_status) !== "NS" ? (_datasheets$ = datasheets[0]) === null || _datasheets$ === void 0 ? void 0 : (_datasheets$$data = _datasheets$.data) === null || _datasheets$$data === void 0 ? void 0 : _datasheets$$data.map(function (dataGroup, index) {
|
|
1863
1880
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputGroup.InputGroup, {
|
|
1864
1881
|
articleId: product.article.id_article,
|
package/package.json
CHANGED
|
@@ -16,11 +16,13 @@ export const GalleryElement = ({
|
|
|
16
16
|
imageInputs,
|
|
17
17
|
imageType,
|
|
18
18
|
imagePackagingType,
|
|
19
|
+
imageShotType,
|
|
19
20
|
changeImage,
|
|
20
21
|
selectedImages,
|
|
21
22
|
setSelectedImages,
|
|
22
23
|
setCheckAll,
|
|
23
24
|
setSocketType,
|
|
25
|
+
shotThd,
|
|
24
26
|
}) => {
|
|
25
27
|
const [statusValidation, setStatusValidation] = useState(validation);
|
|
26
28
|
const [showValidationPanel, setShowValidationPanel] = useState(false);
|
|
@@ -118,6 +120,22 @@ export const GalleryElement = ({
|
|
|
118
120
|
});
|
|
119
121
|
}}
|
|
120
122
|
/>
|
|
123
|
+
{shotThd && (
|
|
124
|
+
<Select
|
|
125
|
+
width="100%"
|
|
126
|
+
placeholder="Tipo de imagen THD"
|
|
127
|
+
options={imageShotType}
|
|
128
|
+
valueSelected={image.image_shot_type}
|
|
129
|
+
onChange={(e) => {
|
|
130
|
+
changeImage({
|
|
131
|
+
action: "changeShotType",
|
|
132
|
+
attribute: "image_shot_type",
|
|
133
|
+
value: +e.target.value,
|
|
134
|
+
index: number,
|
|
135
|
+
});
|
|
136
|
+
}}
|
|
137
|
+
/>
|
|
138
|
+
)}
|
|
121
139
|
</>
|
|
122
140
|
)}
|
|
123
141
|
</div>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Container } from "./styles";
|
|
2
2
|
import { CheckBox } from "../../atoms/CheckBox";
|
|
3
3
|
|
|
4
|
-
export const GalleryHeader = ({ setCheckAll, setSelectedImages }) => {
|
|
4
|
+
export const GalleryHeader = ({ setCheckAll, setSelectedImages, shotThd }) => {
|
|
5
5
|
const checkAll = (e) => {
|
|
6
6
|
const checkboxList = document.querySelectorAll("[id^='gallery-element-']");
|
|
7
7
|
checkboxList.forEach((chk) => (chk.checked = e.target.checked));
|
|
@@ -20,6 +20,7 @@ export const GalleryHeader = ({ setCheckAll, setSelectedImages }) => {
|
|
|
20
20
|
<p className="">Tipo de toma</p>
|
|
21
21
|
<p className="">Tipo de imagen</p>
|
|
22
22
|
<p className="">Tipo de empaque</p>
|
|
23
|
+
{shotThd && <p className="">Tipo de imagen THD</p>}
|
|
23
24
|
</Container>
|
|
24
25
|
);
|
|
25
26
|
};
|
|
@@ -18,6 +18,7 @@ export const ImageDataTable = ({
|
|
|
18
18
|
showSaveButton,
|
|
19
19
|
version,
|
|
20
20
|
setShowVersionSelector,
|
|
21
|
+
shotThd,
|
|
21
22
|
}) => {
|
|
22
23
|
return (
|
|
23
24
|
<Container darkMode={darkMode}>
|
|
@@ -63,6 +64,22 @@ export const ImageDataTable = ({
|
|
|
63
64
|
}
|
|
64
65
|
/>
|
|
65
66
|
</Row>
|
|
67
|
+
{shotThd && (
|
|
68
|
+
<Row>
|
|
69
|
+
<ScreenHeader
|
|
70
|
+
headerType={"table-row-text"}
|
|
71
|
+
text="Tipo de imagen THD"
|
|
72
|
+
/>
|
|
73
|
+
<ScreenHeader
|
|
74
|
+
headerType={"table-row-text gray-table-row"}
|
|
75
|
+
text={
|
|
76
|
+
lists?.imageShotType?.find(
|
|
77
|
+
(f) => f.id === +activeImage?.image_shot_type
|
|
78
|
+
)?.type_shot || "-"
|
|
79
|
+
}
|
|
80
|
+
/>
|
|
81
|
+
</Row>
|
|
82
|
+
)}
|
|
66
83
|
<Row>
|
|
67
84
|
<ScreenHeader headerType={"table-row-text"} text="Formato" />
|
|
68
85
|
<ScreenHeader
|
|
@@ -16,103 +16,92 @@ RetailerProductEditionDefault.args = {
|
|
|
16
16
|
Imágenes: false,
|
|
17
17
|
},
|
|
18
18
|
token:
|
|
19
|
-
"
|
|
19
|
+
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI3MTNhNzQ1Ny1mOTQzLTRiYzktOGViMC04NmI0MWY1YmQ0ZjgiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwiY29nbml0bzp1c2VybmFtZSI6IjcxM2E3NDU3LWY5NDMtNGJjOS04ZWIwLTg2YjQxZjViZDRmOCIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiJlM2ExZmQ2OC02OTAwLTRjNWYtYjM5MC1jNjY0MDZhZjkyMGYiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY2MTU0ODI4NSwibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY2MTU1MTg4NSwiaWF0IjoxNjYxNTQ4Mjg1LCJlbWFpbCI6ImhjYXJyaWxsb0Bjb250ZW50b2guY29tIn0.GUmPbOrd8-llRODdaidjReKHBwrVbGV5LP37aD_o14BQ67VSmH2pxLvrZRBNsZhvP0vZuetXt19pyiFgCr1-SF5CMHD3dcnPq2Ka0PUEf8raNEoseCPGaDUugu-waz1qPadZN1OrlhQTm9mOWoGj4u0gQv5FGAbC6xMcRernAo4QX41-Pfjvp2u7p62BYkp6rafzTjazUHZiG-ueqPI9QQQ-2zkbTo46l7TFYz6ATNSiZEvezc52L1nzWDhI5Q8xbNA546WC-leLr30SV9vrXBTGdvLdCKeqEYPrVG1L3nXXZ9CvtHJjdkb60irWZjXT1LbpulfL3IqO2_PKHTUpHQ",
|
|
20
20
|
productSelected: {
|
|
21
21
|
services: {
|
|
22
22
|
datasheets: 1,
|
|
23
23
|
descriptions: 1,
|
|
24
24
|
images: 1,
|
|
25
25
|
},
|
|
26
|
-
orderId:
|
|
27
|
-
status: "
|
|
28
|
-
datasheet_status: "
|
|
26
|
+
orderId: 127,
|
|
27
|
+
status: "AS",
|
|
28
|
+
datasheet_status: "AS",
|
|
29
29
|
prio: "none",
|
|
30
30
|
version: 2,
|
|
31
|
-
description_status: "
|
|
32
|
-
images_status: "
|
|
31
|
+
description_status: "AS",
|
|
32
|
+
images_status: "AS",
|
|
33
33
|
article: {
|
|
34
|
-
id_article:
|
|
35
|
-
id_category: "
|
|
36
|
-
name: "
|
|
37
|
-
upc: "
|
|
38
|
-
timestamp: "2022-
|
|
39
|
-
id_user:
|
|
34
|
+
id_article: 76186,
|
|
35
|
+
id_category: "399",
|
|
36
|
+
name: "Croquetas Dog Chow",
|
|
37
|
+
upc: "4535354",
|
|
38
|
+
timestamp: "2022-07-21T15:20:25.000Z",
|
|
39
|
+
id_user: 28,
|
|
40
40
|
status: "NULL",
|
|
41
41
|
active: 1,
|
|
42
|
-
company_id:
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
id_description_facilitator: 158,
|
|
54
|
-
id_images_especialist: 366,
|
|
55
|
-
id_images_facilitator: 160,
|
|
56
|
-
id_auditor: 9,
|
|
42
|
+
company_id: 1,
|
|
43
|
+
company_name: "COMPANY DEV",
|
|
44
|
+
country: "México",
|
|
45
|
+
id_order: 127,
|
|
46
|
+
id_datasheet_especialist: 54,
|
|
47
|
+
id_datasheet_facilitator: 52,
|
|
48
|
+
id_description_especialist: 54,
|
|
49
|
+
id_description_facilitator: 52,
|
|
50
|
+
id_images_especialist: 55,
|
|
51
|
+
id_images_facilitator: 53,
|
|
52
|
+
id_auditor: 30,
|
|
57
53
|
id_recepcionist: null,
|
|
58
|
-
category: "
|
|
59
|
-
missingAttributes:
|
|
60
|
-
missingDescriptions:
|
|
61
|
-
missingImages:
|
|
54
|
+
category: "Mascotas|Alimentos y Premios|Alimento para Perros",
|
|
55
|
+
missingAttributes: null,
|
|
56
|
+
missingDescriptions: null,
|
|
57
|
+
missingImages: null,
|
|
62
58
|
},
|
|
63
59
|
retailers: [
|
|
64
60
|
{
|
|
65
|
-
id:
|
|
66
|
-
name: "
|
|
67
|
-
country: "México",
|
|
68
|
-
id_region: 1,
|
|
69
|
-
active: 1,
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
id: 43,
|
|
73
|
-
name: "City Club",
|
|
61
|
+
id: 2,
|
|
62
|
+
name: "Walmart Mercancías Generales",
|
|
74
63
|
country: "México",
|
|
75
64
|
id_region: 1,
|
|
76
65
|
active: 1,
|
|
77
66
|
},
|
|
78
67
|
],
|
|
79
|
-
country:
|
|
80
|
-
upc: "
|
|
68
|
+
country: "México",
|
|
69
|
+
upc: "4535354",
|
|
81
70
|
},
|
|
82
71
|
location: {
|
|
83
72
|
product: { articleId: 109485, versionId: 3 },
|
|
84
73
|
},
|
|
85
74
|
user: {
|
|
86
|
-
id_user:
|
|
87
|
-
name: "
|
|
88
|
-
last_name: "
|
|
89
|
-
email: "
|
|
90
|
-
position:
|
|
75
|
+
id_user: 65,
|
|
76
|
+
name: "Oscar",
|
|
77
|
+
last_name: "Arenas",
|
|
78
|
+
email: "oarenas@contentoh.com",
|
|
79
|
+
position: null,
|
|
91
80
|
telephone: null,
|
|
92
81
|
country: null,
|
|
93
|
-
id_company:
|
|
94
|
-
id_cognito: "
|
|
82
|
+
id_company: 2,
|
|
83
|
+
id_cognito: "73cc8d40-c841-422a-a2f2-e69d7fe26ebf",
|
|
95
84
|
birth_Date: null,
|
|
96
85
|
about_me: null,
|
|
97
86
|
zip_code: null,
|
|
98
87
|
address: null,
|
|
99
88
|
job: null,
|
|
100
89
|
id_stripe: null,
|
|
101
|
-
id_role:
|
|
90
|
+
id_role: 1,
|
|
102
91
|
active: 1,
|
|
103
92
|
is_retailer: 0,
|
|
104
|
-
email_notify:
|
|
93
|
+
email_notify: 0,
|
|
105
94
|
membership: {
|
|
106
|
-
id:
|
|
107
|
-
start_date: "
|
|
108
|
-
end_date: "
|
|
109
|
-
planID:
|
|
110
|
-
plan: "
|
|
111
|
-
name: "Plan
|
|
112
|
-
user_limit: "
|
|
113
|
-
products_limit: "
|
|
114
|
-
type: "
|
|
95
|
+
id: 2,
|
|
96
|
+
start_date: "2021-11-05T02:35:12.000Z",
|
|
97
|
+
end_date: "2022-11-05T02:34:49.000Z",
|
|
98
|
+
planID: 1,
|
|
99
|
+
plan: "prod_KtkvuFFLpOdP6e",
|
|
100
|
+
name: "Plan Free",
|
|
101
|
+
user_limit: "1",
|
|
102
|
+
products_limit: "3",
|
|
103
|
+
type: "PyMES",
|
|
115
104
|
},
|
|
116
|
-
src: "https://content-management-profile
|
|
105
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-65/65.png?1661554813155",
|
|
117
106
|
},
|
|
118
107
|
};
|
|
@@ -59,6 +59,10 @@ const reducerImages = (state, action) => {
|
|
|
59
59
|
case "changeImageInfo":
|
|
60
60
|
values[action.index][action.attribute] = action.value;
|
|
61
61
|
return { ...state, values };
|
|
62
|
+
case "changeShotType":
|
|
63
|
+
values[action.index][action.attribute] = action.value;
|
|
64
|
+
return { ...state, values };
|
|
65
|
+
|
|
62
66
|
case "changeAttrValue":
|
|
63
67
|
const index = attrForImgs.general.findIndex((f) => f.id === action.id);
|
|
64
68
|
if (index !== -1) {
|
|
@@ -209,6 +213,7 @@ export const RetailerProductEdition = ({
|
|
|
209
213
|
const [showCreateVersion, setShowCreateVersion] = useState(false);
|
|
210
214
|
const [showVersionSelector, setShowVersionSelector] =
|
|
211
215
|
useCloseModal("version-selector");
|
|
216
|
+
const shotThd = [58, 59, 60, 61].includes(activeRetailer.id);
|
|
212
217
|
|
|
213
218
|
useEffect(() => {
|
|
214
219
|
checkAll && setSelectedImages(images.values);
|
|
@@ -409,6 +414,10 @@ export const RetailerProductEdition = ({
|
|
|
409
414
|
value: e?.id,
|
|
410
415
|
name: e?.name,
|
|
411
416
|
}));
|
|
417
|
+
const imageShotType = images?.imageShotType?.map((e) => ({
|
|
418
|
+
value: e?.id,
|
|
419
|
+
name: e?.type_shot,
|
|
420
|
+
}));
|
|
412
421
|
return images?.values?.map((image, index) => (
|
|
413
422
|
<GalleryElement
|
|
414
423
|
setCheckAll={setCheckAll}
|
|
@@ -421,10 +430,12 @@ export const RetailerProductEdition = ({
|
|
|
421
430
|
imageType={imageType}
|
|
422
431
|
imagePackagingType={imagePackagingType}
|
|
423
432
|
imageInputs={imageInputs}
|
|
433
|
+
imageShotType={imageShotType}
|
|
424
434
|
setSocketType={setSocketType}
|
|
425
435
|
changeImage={setImages}
|
|
426
436
|
selectedImages={selectedImages}
|
|
427
437
|
setSelectedImages={setSelectedImages}
|
|
438
|
+
shotThd={shotThd}
|
|
428
439
|
/>
|
|
429
440
|
));
|
|
430
441
|
};
|
|
@@ -1187,6 +1198,7 @@ export const RetailerProductEdition = ({
|
|
|
1187
1198
|
showSaveButton={auditorAssigned() || userAssigned()}
|
|
1188
1199
|
setShowVersionSelector={setShowVersionSelector}
|
|
1189
1200
|
version={version}
|
|
1201
|
+
shotThd={shotThd}
|
|
1190
1202
|
/>
|
|
1191
1203
|
</div>
|
|
1192
1204
|
<div className="product-information">
|
|
@@ -1330,6 +1342,7 @@ export const RetailerProductEdition = ({
|
|
|
1330
1342
|
setSelectedImages={setSelectedImages}
|
|
1331
1343
|
checkAll={checkAll}
|
|
1332
1344
|
setCheckAll={setCheckAll}
|
|
1345
|
+
shotThd={shotThd}
|
|
1333
1346
|
/>
|
|
1334
1347
|
)}
|
|
1335
1348
|
{activeTab === "Ficha técnica" &&
|