contentoh-components-library 21.3.26 → 21.3.28
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/assets/images/generalButton/Icono AB.svg +14 -0
- package/dist/components/molecules/HeaderTop/index.js +8 -5
- package/dist/components/molecules/HeaderTop/styles.js +1 -1
- package/dist/components/pages/ProviderProductEdition/index.js +3 -1
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +70 -38
- package/dist/components/pages/RetailerProductEdition/index.js +5 -2
- package/package.json +1 -1
- package/src/assets/images/generalButton/Icono AB.svg +14 -0
- package/src/components/molecules/HeaderTop/index.js +10 -5
- package/src/components/molecules/HeaderTop/styles.js +6 -0
- package/src/components/pages/ProviderProductEdition/index.js +1 -1
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +75 -38
- package/src/components/pages/RetailerProductEdition/index.js +2 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="19.995" height="14.282" viewBox="0 0 19.995 14.282">
|
|
2
|
+
<g id="Grupo_608" data-name="Grupo 608" transform="translate(-1323 -104)">
|
|
3
|
+
<g id="Rectángulo_432" data-name="Rectángulo 432" transform="translate(1323 104)" fill="#fff" stroke="#e33aa9" stroke-width="1">
|
|
4
|
+
<rect width="11.426" height="11.426" rx="2" stroke="none"/>
|
|
5
|
+
<rect x="0.5" y="0.5" width="10.426" height="10.426" rx="1.5" fill="none"/>
|
|
6
|
+
</g>
|
|
7
|
+
<path id="Trazado_8" data-name="Trazado 8" d="M4.44-8.819H2.007l-.463,1.4H.068l2.508-6.8H3.862l2.521,6.8H4.908ZM2.382-9.954H4.066L3.219-12.5Z" transform="translate(1325.487 120.531)" fill="#e33aa9"/>
|
|
8
|
+
<g id="Rectángulo_431" data-name="Rectángulo 431" transform="translate(1331.569 106.856)" fill="#e33aa9" stroke="#e33aa9" stroke-width="1">
|
|
9
|
+
<rect width="11.426" height="11.426" rx="2" stroke="none"/>
|
|
10
|
+
<rect x="0.5" y="0.5" width="10.426" height="10.426" rx="1.5" fill="none"/>
|
|
11
|
+
</g>
|
|
12
|
+
<path id="Trazado_7" data-name="Trazado 7" d="M1.27-7.418v-6.8h2.29a2.918,2.918,0,0,1,1.8.474,1.647,1.647,0,0,1,.615,1.39,1.582,1.582,0,0,1-.247.88,1.437,1.437,0,0,1-.687.558,1.376,1.376,0,0,1,.792.528,1.6,1.6,0,0,1,.29.972,1.829,1.829,0,0,1-.6,1.485,2.635,2.635,0,0,1-1.715.514Zm1.347-2.961v1.836H3.77a1.085,1.085,0,0,0,.743-.236.824.824,0,0,0,.267-.652.837.837,0,0,0-.929-.948Zm0-.99h1q1.019-.019,1.019-.845a.8.8,0,0,0-.258-.666,1.317,1.317,0,0,0-.815-.2H2.616Z" transform="translate(1333.823 123.387)" fill="#fff"/>
|
|
13
|
+
</g>
|
|
14
|
+
</svg>
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
@@ -13,14 +15,15 @@ var _index2 = require("../../atoms/GeneralButton/index");
|
|
|
13
15
|
|
|
14
16
|
var _react = require("react");
|
|
15
17
|
|
|
16
|
-
var
|
|
18
|
+
var _IconoAB = _interopRequireDefault(require("../../../../src/assets/images/generalButton/Icono AB.svg"));
|
|
17
19
|
|
|
18
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
21
|
|
|
20
22
|
var HeaderTop = function HeaderTop(_ref) {
|
|
21
23
|
var setHeaderTop = _ref.setHeaderTop,
|
|
22
24
|
auditableVersion = _ref.auditableVersion,
|
|
23
|
-
setCompare = _ref.setCompare
|
|
25
|
+
setCompare = _ref.setCompare,
|
|
26
|
+
isAuditor = _ref.isAuditor;
|
|
24
27
|
var headerTop = (0, _react.useRef)();
|
|
25
28
|
(0, _react.useEffect)(function () {
|
|
26
29
|
setHeaderTop && setHeaderTop(headerTop.current.clientHeight);
|
|
@@ -31,14 +34,14 @@ var HeaderTop = function HeaderTop(_ref) {
|
|
|
31
34
|
text: "Edici\xF3n de producto"
|
|
32
35
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
33
36
|
className: "buttons-container",
|
|
34
|
-
children: [auditableVersion && /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Button, {
|
|
37
|
+
children: [isAuditor && auditableVersion && /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Button, {
|
|
35
38
|
buttonType: "general-white-button circular-button",
|
|
36
|
-
label: "A|B",
|
|
37
39
|
onClick: function onClick() {
|
|
38
40
|
setCompare(function (current) {
|
|
39
41
|
return !current;
|
|
40
42
|
});
|
|
41
|
-
}
|
|
43
|
+
},
|
|
44
|
+
image: _IconoAB.default
|
|
42
45
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Button, {
|
|
43
46
|
buttonType: "general-white-button close-button",
|
|
44
47
|
onClick: function onClick() {
|
|
@@ -13,6 +13,6 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
13
13
|
|
|
14
14
|
var _templateObject;
|
|
15
15
|
|
|
16
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n .buttons-top {\n display: flex;\n align-items: center;\n padding-top: 10px;\n }\n\n .buttons-container {\n display: flex;\n\n button {\n width: 30px;\n height: 30px;\n border: 1px solid #f0f0f0;\n background-size: 20px;\n padding: 0;\n\n & + * {\n margin-left: 10px;\n }\n }\n }\n"])));
|
|
16
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n .buttons-top {\n display: flex;\n align-items: center;\n padding-top: 10px;\n }\n\n .buttons-container {\n display: flex;\n\n button {\n width: 30px;\n height: 30px;\n border: 1px solid #f0f0f0;\n background-size: 20px;\n padding: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n img {\n height: 15px;\n }\n\n & + * {\n margin-left: 10px;\n }\n }\n }\n"])));
|
|
17
17
|
|
|
18
18
|
exports.Container = Container;
|
|
@@ -728,7 +728,9 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
728
728
|
|
|
729
729
|
if (((_Object$keys = Object.keys((_percentages$productT = percentages[productTemp.id_article]) !== null && _percentages$productT !== void 0 ? _percentages$productT : {})) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) > 0) {
|
|
730
730
|
retailers === null || retailers === void 0 ? void 0 : retailers.forEach(function (retailer, index) {
|
|
731
|
-
|
|
731
|
+
var _percentages$productT2;
|
|
732
|
+
|
|
733
|
+
retailer["percentage"] = Number((_percentages$productT2 = percentages[productTemp.id_article][retailer.id]) === null || _percentages$productT2 === void 0 ? void 0 : _percentages$productT2.percentageRequired);
|
|
732
734
|
});
|
|
733
735
|
}
|
|
734
736
|
|
|
@@ -31,59 +31,91 @@ RetailerProductEditionDefault.args = {
|
|
|
31
31
|
"Ficha técnica": true,
|
|
32
32
|
Imágenes: true
|
|
33
33
|
},
|
|
34
|
-
token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
34
|
+
token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJhNmM0ZDNkNi0yNGE0LTQxZDQtYWQwZi1kMDg3NDM4YWI1YjYiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwiY29nbml0bzp1c2VybmFtZSI6ImE2YzRkM2Q2LTI0YTQtNDFkNC1hZDBmLWQwODc0MzhhYjViNiIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiJhY2FmNjhiOC00MmU1LTQ1NzAtYThiMC04YWY4NmY3MGU5YTEiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY3ODQ5NDYzNiwibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY3ODQ5ODIzNiwiaWF0IjoxNjc4NDk0NjM2LCJlbWFpbCI6ImV0Y0Bjb250ZW50b2guY29tIn0.WoO3h0tAsF_Z4f_6BLIOXaL__TzHUxZyQlDAULQ2cT1HkUs0EmTZXRzRZ4oce7rV5osco9gCWfhc03rQ-C12jmU-Yt7jq3vuuoHUz4JqkLpelZPS8jHSsCAUWu_ekOIgDzvNegiyKk2R4qnd7IRPzWOAx1houg-KKT7kxCxjkTyJJGtzb7pYDLSJSV871nS8MeXGf5VZG5rQ3Smfl8ANqypLUEQQ6gSOr30Ztt1lZaHRmhF8WKo_GWwY3jNScmX_o9QGOSvKVl8hTqz4gA9xbiNJ3zpoh_5PzY-N4Sl8pE3gt_9Zw_o5ItLNHpnXuav_0NENvhXDu7p7VTLEpG8DTA",
|
|
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: 14606,
|
|
42
|
+
status: "AS",
|
|
43
|
+
datasheet_status: "CA",
|
|
44
44
|
prio: "none",
|
|
45
|
-
version:
|
|
46
|
-
description_status: "
|
|
47
|
-
images_status: "
|
|
45
|
+
version: 3,
|
|
46
|
+
description_status: "CA",
|
|
47
|
+
images_status: "AS",
|
|
48
48
|
statusByRetailer: {
|
|
49
|
-
|
|
50
|
-
datasheet: "
|
|
51
|
-
description: "
|
|
52
|
-
images: "
|
|
49
|
+
4: {
|
|
50
|
+
datasheet: "AC",
|
|
51
|
+
description: "CA",
|
|
52
|
+
images: "AS"
|
|
53
|
+
},
|
|
54
|
+
5: {
|
|
55
|
+
datasheet: "CA",
|
|
56
|
+
description: "CA",
|
|
57
|
+
images: "AS"
|
|
58
|
+
},
|
|
59
|
+
6: {
|
|
60
|
+
description: "CA",
|
|
61
|
+
images: "AS",
|
|
62
|
+
datasheet: "CA"
|
|
63
|
+
},
|
|
64
|
+
12: {
|
|
65
|
+
datasheet: "CA",
|
|
66
|
+
description: "CA",
|
|
67
|
+
images: "AS"
|
|
68
|
+
},
|
|
69
|
+
17: {
|
|
70
|
+
datasheet: "CA",
|
|
71
|
+
description: "AC",
|
|
72
|
+
images: "AS"
|
|
53
73
|
}
|
|
54
74
|
},
|
|
55
75
|
article: {
|
|
56
|
-
id_article:
|
|
57
|
-
id_category: "
|
|
58
|
-
name: "
|
|
59
|
-
upc: "
|
|
60
|
-
timestamp: "
|
|
76
|
+
id_article: 37317,
|
|
77
|
+
id_category: "157",
|
|
78
|
+
name: "Detergente lavatrastres líquido Axion Complete tricloro 1.1 l",
|
|
79
|
+
upc: "7509546078915",
|
|
80
|
+
timestamp: "2023-03-10T20:19:15.000Z",
|
|
61
81
|
id_user: 28,
|
|
62
82
|
status: "NULL",
|
|
63
83
|
active: 1,
|
|
64
84
|
company_id: 1,
|
|
65
85
|
company_name: "GRUPO BRAHMA",
|
|
66
86
|
country: "México",
|
|
67
|
-
id_order:
|
|
68
|
-
id_datasheet_especialist:
|
|
69
|
-
id_datasheet_facilitator:
|
|
70
|
-
id_description_especialist:
|
|
71
|
-
id_description_facilitator:
|
|
72
|
-
id_images_especialist:
|
|
73
|
-
id_images_facilitator:
|
|
74
|
-
id_auditor:
|
|
87
|
+
id_order: 14606,
|
|
88
|
+
id_datasheet_especialist: 54,
|
|
89
|
+
id_datasheet_facilitator: 52,
|
|
90
|
+
id_description_especialist: 54,
|
|
91
|
+
id_description_facilitator: 52,
|
|
92
|
+
id_images_especialist: 55,
|
|
93
|
+
id_images_facilitator: 53,
|
|
94
|
+
id_auditor: 37,
|
|
75
95
|
id_recepcionist: null,
|
|
76
|
-
category: "
|
|
96
|
+
category: "Consumibles|Productos de Limpieza y Lavandería|Jabones y Lavatrastes",
|
|
77
97
|
missingAttributes: 0,
|
|
78
98
|
missingDescriptions: 0,
|
|
79
99
|
missingImages: 0
|
|
80
100
|
},
|
|
81
101
|
retailers: [{
|
|
82
|
-
id:
|
|
83
|
-
name: "
|
|
102
|
+
id: 4,
|
|
103
|
+
name: "Walmart Super y Superama"
|
|
104
|
+
}, {
|
|
105
|
+
id: 5,
|
|
106
|
+
name: "Chedraui"
|
|
107
|
+
}, {
|
|
108
|
+
id: 6,
|
|
109
|
+
name: "HEB"
|
|
110
|
+
}, {
|
|
111
|
+
id: 12,
|
|
112
|
+
name: "La Comer"
|
|
113
|
+
}, {
|
|
114
|
+
id: 17,
|
|
115
|
+
name: "Genérico"
|
|
84
116
|
}],
|
|
85
117
|
country: "México",
|
|
86
|
-
upc: "
|
|
118
|
+
upc: "7509546078915"
|
|
87
119
|
},
|
|
88
120
|
location: {
|
|
89
121
|
product: {
|
|
@@ -92,26 +124,26 @@ RetailerProductEditionDefault.args = {
|
|
|
92
124
|
}
|
|
93
125
|
},
|
|
94
126
|
user: {
|
|
95
|
-
id_user:
|
|
96
|
-
name: "
|
|
97
|
-
last_name: "
|
|
98
|
-
email: "
|
|
99
|
-
position: "
|
|
127
|
+
id_user: 51,
|
|
128
|
+
name: "ADMIN PRUEBA",
|
|
129
|
+
last_name: "",
|
|
130
|
+
email: "etc@contentoh.com",
|
|
131
|
+
position: "",
|
|
100
132
|
telephone: "",
|
|
101
|
-
country: "
|
|
133
|
+
country: "",
|
|
102
134
|
id_company: 2,
|
|
103
|
-
id_cognito: "
|
|
135
|
+
id_cognito: "a6c4d3d6-24a4-41d4-ad0f-d087438ab5b6",
|
|
104
136
|
birth_Date: null,
|
|
105
137
|
about_me: "",
|
|
106
138
|
zip_code: "",
|
|
107
139
|
address: "",
|
|
108
140
|
job: "",
|
|
109
141
|
id_stripe: "",
|
|
110
|
-
id_role:
|
|
142
|
+
id_role: 1,
|
|
111
143
|
active: 1,
|
|
112
144
|
is_retailer: 0,
|
|
113
145
|
email_notify: 1,
|
|
114
|
-
is_user_tech:
|
|
146
|
+
is_user_tech: null,
|
|
115
147
|
membership: {
|
|
116
148
|
id: 2,
|
|
117
149
|
start_date: "2021-11-05T02:35:12.000Z",
|
|
@@ -123,6 +155,6 @@ RetailerProductEditionDefault.args = {
|
|
|
123
155
|
products_limit: "3",
|
|
124
156
|
type: "PyMES"
|
|
125
157
|
},
|
|
126
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
158
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-51/51.png?1678494637588"
|
|
127
159
|
}
|
|
128
160
|
};
|
|
@@ -790,7 +790,9 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
790
790
|
|
|
791
791
|
if (((_Object$keys = Object.keys((_percentages$product$ = percentages[product.article.id_article]) !== null && _percentages$product$ !== void 0 ? _percentages$product$ : {})) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) > 0) {
|
|
792
792
|
retailers === null || retailers === void 0 ? void 0 : retailers.forEach(function (retailer, index) {
|
|
793
|
-
|
|
793
|
+
var _percentages$product$2;
|
|
794
|
+
|
|
795
|
+
retailer["percentage"] = Number((_percentages$product$2 = percentages[product.article.id_article][retailer.id]) === null || _percentages$product$2 === void 0 ? void 0 : _percentages$product$2.percentageRequired);
|
|
794
796
|
});
|
|
795
797
|
}
|
|
796
798
|
|
|
@@ -1894,7 +1896,8 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1894
1896
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_HeaderTop.HeaderTop, {
|
|
1895
1897
|
setHeaderTop: setHeaderTop,
|
|
1896
1898
|
auditableVersion: auditableVersion,
|
|
1897
|
-
setCompare: setCompare
|
|
1899
|
+
setCompare: setCompare,
|
|
1900
|
+
isAuditor: [1, 6].includes(user.id_role)
|
|
1898
1901
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
1899
1902
|
className: "data-container",
|
|
1900
1903
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
package/package.json
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="19.995" height="14.282" viewBox="0 0 19.995 14.282">
|
|
2
|
+
<g id="Grupo_608" data-name="Grupo 608" transform="translate(-1323 -104)">
|
|
3
|
+
<g id="Rectángulo_432" data-name="Rectángulo 432" transform="translate(1323 104)" fill="#fff" stroke="#e33aa9" stroke-width="1">
|
|
4
|
+
<rect width="11.426" height="11.426" rx="2" stroke="none"/>
|
|
5
|
+
<rect x="0.5" y="0.5" width="10.426" height="10.426" rx="1.5" fill="none"/>
|
|
6
|
+
</g>
|
|
7
|
+
<path id="Trazado_8" data-name="Trazado 8" d="M4.44-8.819H2.007l-.463,1.4H.068l2.508-6.8H3.862l2.521,6.8H4.908ZM2.382-9.954H4.066L3.219-12.5Z" transform="translate(1325.487 120.531)" fill="#e33aa9"/>
|
|
8
|
+
<g id="Rectángulo_431" data-name="Rectángulo 431" transform="translate(1331.569 106.856)" fill="#e33aa9" stroke="#e33aa9" stroke-width="1">
|
|
9
|
+
<rect width="11.426" height="11.426" rx="2" stroke="none"/>
|
|
10
|
+
<rect x="0.5" y="0.5" width="10.426" height="10.426" rx="1.5" fill="none"/>
|
|
11
|
+
</g>
|
|
12
|
+
<path id="Trazado_7" data-name="Trazado 7" d="M1.27-7.418v-6.8h2.29a2.918,2.918,0,0,1,1.8.474,1.647,1.647,0,0,1,.615,1.39,1.582,1.582,0,0,1-.247.88,1.437,1.437,0,0,1-.687.558,1.376,1.376,0,0,1,.792.528,1.6,1.6,0,0,1,.29.972,1.829,1.829,0,0,1-.6,1.485,2.635,2.635,0,0,1-1.715.514Zm1.347-2.961v1.836H3.77a1.085,1.085,0,0,0,.743-.236.824.824,0,0,0,.267-.652.837.837,0,0,0-.929-.948Zm0-.99h1q1.019-.019,1.019-.845a.8.8,0,0,0-.258-.666,1.317,1.317,0,0,0-.815-.2H2.616Z" transform="translate(1333.823 123.387)" fill="#fff"/>
|
|
13
|
+
</g>
|
|
14
|
+
</svg>
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { Container } from "./styles";
|
|
2
2
|
import { ScreenHeader } from "../../atoms/ScreenHeader/index";
|
|
3
3
|
import { Button } from "../../atoms/GeneralButton/index";
|
|
4
|
-
import { useEffect, useRef
|
|
5
|
-
import
|
|
4
|
+
import { useEffect, useRef } from "react";
|
|
5
|
+
import auditIcon from "../../../../src/assets/images/generalButton/Icono AB.svg";
|
|
6
6
|
|
|
7
|
-
export const HeaderTop = ({
|
|
7
|
+
export const HeaderTop = ({
|
|
8
|
+
setHeaderTop,
|
|
9
|
+
auditableVersion,
|
|
10
|
+
setCompare,
|
|
11
|
+
isAuditor,
|
|
12
|
+
}) => {
|
|
8
13
|
const headerTop = useRef();
|
|
9
14
|
|
|
10
15
|
useEffect(() => {
|
|
@@ -15,13 +20,13 @@ export const HeaderTop = ({ setHeaderTop, auditableVersion, setCompare }) => {
|
|
|
15
20
|
<Container ref={headerTop}>
|
|
16
21
|
<ScreenHeader text="Edición de producto" />
|
|
17
22
|
<div className="buttons-container">
|
|
18
|
-
{auditableVersion && (
|
|
23
|
+
{isAuditor && auditableVersion && (
|
|
19
24
|
<Button
|
|
20
25
|
buttonType="general-white-button circular-button"
|
|
21
|
-
label={"A|B"}
|
|
22
26
|
onClick={() => {
|
|
23
27
|
setCompare((current) => !current);
|
|
24
28
|
}}
|
|
29
|
+
image={auditIcon}
|
|
25
30
|
/>
|
|
26
31
|
)}
|
|
27
32
|
<Button
|
|
@@ -367,7 +367,7 @@ export const ProviderProductEdition = ({
|
|
|
367
367
|
if (Object.keys(percentages[productTemp.id_article] ?? {})?.length > 0) {
|
|
368
368
|
retailers?.forEach((retailer, index) => {
|
|
369
369
|
retailer["percentage"] = Number(
|
|
370
|
-
percentages[productTemp.id_article][retailer.id]
|
|
370
|
+
percentages[productTemp.id_article][retailer.id]?.percentageRequired
|
|
371
371
|
);
|
|
372
372
|
});
|
|
373
373
|
}
|
|
@@ -16,86 +16,123 @@ RetailerProductEditionDefault.args = {
|
|
|
16
16
|
Imágenes: true,
|
|
17
17
|
},
|
|
18
18
|
token:
|
|
19
|
-
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
19
|
+
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJhNmM0ZDNkNi0yNGE0LTQxZDQtYWQwZi1kMDg3NDM4YWI1YjYiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwiY29nbml0bzp1c2VybmFtZSI6ImE2YzRkM2Q2LTI0YTQtNDFkNC1hZDBmLWQwODc0MzhhYjViNiIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiJhY2FmNjhiOC00MmU1LTQ1NzAtYThiMC04YWY4NmY3MGU5YTEiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY3ODQ5NDYzNiwibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY3ODQ5ODIzNiwiaWF0IjoxNjc4NDk0NjM2LCJlbWFpbCI6ImV0Y0Bjb250ZW50b2guY29tIn0.WoO3h0tAsF_Z4f_6BLIOXaL__TzHUxZyQlDAULQ2cT1HkUs0EmTZXRzRZ4oce7rV5osco9gCWfhc03rQ-C12jmU-Yt7jq3vuuoHUz4JqkLpelZPS8jHSsCAUWu_ekOIgDzvNegiyKk2R4qnd7IRPzWOAx1houg-KKT7kxCxjkTyJJGtzb7pYDLSJSV871nS8MeXGf5VZG5rQ3Smfl8ANqypLUEQQ6gSOr30Ztt1lZaHRmhF8WKo_GWwY3jNScmX_o9QGOSvKVl8hTqz4gA9xbiNJ3zpoh_5PzY-N4Sl8pE3gt_9Zw_o5ItLNHpnXuav_0NENvhXDu7p7VTLEpG8DTA",
|
|
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: 14606,
|
|
27
|
+
status: "AS",
|
|
28
|
+
datasheet_status: "CA",
|
|
29
29
|
prio: "none",
|
|
30
|
-
version:
|
|
31
|
-
description_status: "
|
|
32
|
-
images_status: "
|
|
30
|
+
version: 3,
|
|
31
|
+
description_status: "CA",
|
|
32
|
+
images_status: "AS",
|
|
33
33
|
statusByRetailer: {
|
|
34
|
-
|
|
35
|
-
datasheet: "
|
|
36
|
-
description: "
|
|
37
|
-
images: "
|
|
34
|
+
4: {
|
|
35
|
+
datasheet: "AC",
|
|
36
|
+
description: "CA",
|
|
37
|
+
images: "AS",
|
|
38
|
+
},
|
|
39
|
+
5: {
|
|
40
|
+
datasheet: "CA",
|
|
41
|
+
description: "CA",
|
|
42
|
+
images: "AS",
|
|
43
|
+
},
|
|
44
|
+
6: {
|
|
45
|
+
description: "CA",
|
|
46
|
+
images: "AS",
|
|
47
|
+
datasheet: "CA",
|
|
48
|
+
},
|
|
49
|
+
12: {
|
|
50
|
+
datasheet: "CA",
|
|
51
|
+
description: "CA",
|
|
52
|
+
images: "AS",
|
|
53
|
+
},
|
|
54
|
+
17: {
|
|
55
|
+
datasheet: "CA",
|
|
56
|
+
description: "AC",
|
|
57
|
+
images: "AS",
|
|
38
58
|
},
|
|
39
59
|
},
|
|
40
60
|
article: {
|
|
41
|
-
id_article:
|
|
42
|
-
id_category: "
|
|
43
|
-
name: "
|
|
44
|
-
upc: "
|
|
45
|
-
timestamp: "
|
|
61
|
+
id_article: 37317,
|
|
62
|
+
id_category: "157",
|
|
63
|
+
name: "Detergente lavatrastres líquido Axion Complete tricloro 1.1 l",
|
|
64
|
+
upc: "7509546078915",
|
|
65
|
+
timestamp: "2023-03-10T20:19:15.000Z",
|
|
46
66
|
id_user: 28,
|
|
47
67
|
status: "NULL",
|
|
48
68
|
active: 1,
|
|
49
69
|
company_id: 1,
|
|
50
70
|
company_name: "GRUPO BRAHMA",
|
|
51
71
|
country: "México",
|
|
52
|
-
id_order:
|
|
53
|
-
id_datasheet_especialist:
|
|
54
|
-
id_datasheet_facilitator:
|
|
55
|
-
id_description_especialist:
|
|
56
|
-
id_description_facilitator:
|
|
57
|
-
id_images_especialist:
|
|
58
|
-
id_images_facilitator:
|
|
59
|
-
id_auditor:
|
|
72
|
+
id_order: 14606,
|
|
73
|
+
id_datasheet_especialist: 54,
|
|
74
|
+
id_datasheet_facilitator: 52,
|
|
75
|
+
id_description_especialist: 54,
|
|
76
|
+
id_description_facilitator: 52,
|
|
77
|
+
id_images_especialist: 55,
|
|
78
|
+
id_images_facilitator: 53,
|
|
79
|
+
id_auditor: 37,
|
|
60
80
|
id_recepcionist: null,
|
|
61
|
-
category:
|
|
81
|
+
category:
|
|
82
|
+
"Consumibles|Productos de Limpieza y Lavandería|Jabones y Lavatrastes",
|
|
62
83
|
missingAttributes: 0,
|
|
63
84
|
missingDescriptions: 0,
|
|
64
85
|
missingImages: 0,
|
|
65
86
|
},
|
|
66
87
|
retailers: [
|
|
67
88
|
{
|
|
68
|
-
id:
|
|
69
|
-
name: "
|
|
89
|
+
id: 4,
|
|
90
|
+
name: "Walmart Super y Superama",
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
id: 5,
|
|
94
|
+
name: "Chedraui",
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
id: 6,
|
|
98
|
+
name: "HEB",
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
id: 12,
|
|
102
|
+
name: "La Comer",
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
id: 17,
|
|
106
|
+
name: "Genérico",
|
|
70
107
|
},
|
|
71
108
|
],
|
|
72
109
|
country: "México",
|
|
73
|
-
upc: "
|
|
110
|
+
upc: "7509546078915",
|
|
74
111
|
},
|
|
75
112
|
location: {
|
|
76
113
|
product: { articleId: 354, versionId: 3 },
|
|
77
114
|
},
|
|
78
115
|
user: {
|
|
79
|
-
id_user:
|
|
80
|
-
name: "
|
|
81
|
-
last_name: "
|
|
82
|
-
email: "
|
|
83
|
-
position: "
|
|
116
|
+
id_user: 51,
|
|
117
|
+
name: "ADMIN PRUEBA",
|
|
118
|
+
last_name: "",
|
|
119
|
+
email: "etc@contentoh.com",
|
|
120
|
+
position: "",
|
|
84
121
|
telephone: "",
|
|
85
|
-
country: "
|
|
122
|
+
country: "",
|
|
86
123
|
id_company: 2,
|
|
87
|
-
id_cognito: "
|
|
124
|
+
id_cognito: "a6c4d3d6-24a4-41d4-ad0f-d087438ab5b6",
|
|
88
125
|
birth_Date: null,
|
|
89
126
|
about_me: "",
|
|
90
127
|
zip_code: "",
|
|
91
128
|
address: "",
|
|
92
129
|
job: "",
|
|
93
130
|
id_stripe: "",
|
|
94
|
-
id_role:
|
|
131
|
+
id_role: 1,
|
|
95
132
|
active: 1,
|
|
96
133
|
is_retailer: 0,
|
|
97
134
|
email_notify: 1,
|
|
98
|
-
is_user_tech:
|
|
135
|
+
is_user_tech: null,
|
|
99
136
|
membership: {
|
|
100
137
|
id: 2,
|
|
101
138
|
start_date: "2021-11-05T02:35:12.000Z",
|
|
@@ -107,6 +144,6 @@ RetailerProductEditionDefault.args = {
|
|
|
107
144
|
products_limit: "3",
|
|
108
145
|
type: "PyMES",
|
|
109
146
|
},
|
|
110
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
147
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-51/51.png?1678494637588",
|
|
111
148
|
},
|
|
112
149
|
};
|
|
@@ -417,7 +417,7 @@ export const RetailerProductEdition = ({
|
|
|
417
417
|
retailers?.forEach((retailer, index) => {
|
|
418
418
|
retailer["percentage"] = Number(
|
|
419
419
|
percentages[product.article.id_article][retailer.id]
|
|
420
|
-
|
|
420
|
+
?.percentageRequired
|
|
421
421
|
);
|
|
422
422
|
});
|
|
423
423
|
}
|
|
@@ -1268,6 +1268,7 @@ export const RetailerProductEdition = ({
|
|
|
1268
1268
|
setHeaderTop={setHeaderTop}
|
|
1269
1269
|
auditableVersion={auditableVersion}
|
|
1270
1270
|
setCompare={setCompare}
|
|
1271
|
+
isAuditor={[1, 6].includes(user.id_role)}
|
|
1271
1272
|
/>
|
|
1272
1273
|
<div className="data-container">
|
|
1273
1274
|
<div className="image-data-panel">
|