contentoh-components-library 21.1.48 → 21.1.49
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/GeneralInput/index.js +0 -1
- package/dist/components/molecules/HeaderTop/index.js +4 -1
- package/dist/components/molecules/RetailerSelector/index.js +34 -0
- package/dist/components/molecules/StatusAsignationInfo/index.js +3 -2
- package/dist/components/organisms/FullTabsMenu/index.js +4 -2
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +92 -66
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +29 -32
- package/dist/components/pages/RetailerProductEdition/index.js +2 -1
- package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
- package/dist/global-files/data.js +2 -2
- package/package.json +1 -1
- package/src/components/atoms/GeneralInput/index.js +0 -1
- package/src/components/molecules/HeaderTop/index.js +6 -1
- package/src/components/molecules/RetailerSelector/index.js +16 -0
- package/src/components/molecules/StatusAsignationInfo/index.js +2 -1
- package/src/components/organisms/FullTabsMenu/index.js +2 -0
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +84 -58
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +29 -32
- package/src/components/pages/RetailerProductEdition/index.js +4 -3
- package/src/components/pages/RetailerProductEdition/styles.js +1 -1
- package/src/global-files/data.js +2 -2
|
@@ -65,7 +65,6 @@ var GeneralInput = function GeneralInput(_ref) {
|
|
|
65
65
|
if ((optionList === null || optionList === void 0 ? void 0 : optionList.length) > 0) {
|
|
66
66
|
var index = evt.target.selectedIndex;
|
|
67
67
|
var valueSelected = evt.target.value;
|
|
68
|
-
console.log(valueSelected);
|
|
69
68
|
generalValue = valueSelected;
|
|
70
69
|
setTextValue({
|
|
71
70
|
value: generalValue
|
|
@@ -26,7 +26,10 @@ var HeaderTop = function HeaderTop(_ref) {
|
|
|
26
26
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ScreenHeader, {
|
|
27
27
|
text: "Edici\xF3n de producto"
|
|
28
28
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Button, {
|
|
29
|
-
buttonType: "close-button"
|
|
29
|
+
buttonType: "close-button",
|
|
30
|
+
onClick: function onClick() {
|
|
31
|
+
window.location.href = "/products";
|
|
32
|
+
}
|
|
30
33
|
})]
|
|
31
34
|
});
|
|
32
35
|
};
|
|
@@ -7,6 +7,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.RetailerSelector = void 0;
|
|
9
9
|
|
|
10
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
11
|
+
|
|
12
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/asyncToGenerator"));
|
|
13
|
+
|
|
10
14
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
11
15
|
|
|
12
16
|
var _styles = require("./styles");
|
|
@@ -19,6 +23,8 @@ var _AsignationOption = require("../../atoms/AsignationOption");
|
|
|
19
23
|
|
|
20
24
|
var _DropDownButton = require("../../atoms/DropDownButton");
|
|
21
25
|
|
|
26
|
+
var _axios = _interopRequireDefault(require("axios"));
|
|
27
|
+
|
|
22
28
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
29
|
|
|
24
30
|
var RetailerSelector = function RetailerSelector(_ref) {
|
|
@@ -39,11 +45,39 @@ var RetailerSelector = function RetailerSelector(_ref) {
|
|
|
39
45
|
}
|
|
40
46
|
};
|
|
41
47
|
|
|
48
|
+
var getRetailerImage = /*#__PURE__*/function () {
|
|
49
|
+
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
50
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
51
|
+
while (1) {
|
|
52
|
+
switch (_context.prev = _context.next) {
|
|
53
|
+
case 0:
|
|
54
|
+
console.log("https://content-management-images.s3.amazonaws.com/retailers/".concat(activeRetailer.id, ".png"));
|
|
55
|
+
activeRetailer.image = "https://content-management-images.s3.amazonaws.com/retailers/".concat(activeRetailer.id, ".png");
|
|
56
|
+
retailers.forEach(function (retailer) {
|
|
57
|
+
return retailer.image = "https://content-management-images.s3.amazonaws.com/retailers/".concat(retailer.id, ".png");
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
case 3:
|
|
61
|
+
case "end":
|
|
62
|
+
return _context.stop();
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}, _callee);
|
|
66
|
+
}));
|
|
67
|
+
|
|
68
|
+
return function getRetailerImage() {
|
|
69
|
+
return _ref2.apply(this, arguments);
|
|
70
|
+
};
|
|
71
|
+
}();
|
|
72
|
+
|
|
42
73
|
(0, _react.useEffect)(function () {
|
|
43
74
|
if (retailersPanel) {
|
|
44
75
|
document.addEventListener("click", closeRetailersPanel, false);
|
|
45
76
|
}
|
|
46
77
|
}, [retailersPanel]);
|
|
78
|
+
(0, _react.useEffect)(function () {
|
|
79
|
+
getRetailerImage();
|
|
80
|
+
}, [activeRetailer]);
|
|
47
81
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
48
82
|
id: "retailers-assignation",
|
|
49
83
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.Avatar, {
|
|
@@ -54,7 +54,8 @@ var StatusAsignationInfo = function StatusAsignationInfo(_ref) {
|
|
|
54
54
|
_ref$id = _ref.id,
|
|
55
55
|
id = _ref$id === void 0 ? "default-id" : _ref$id,
|
|
56
56
|
onClickSave = _ref.onClickSave,
|
|
57
|
-
showSaveButton = _ref.showSaveButton
|
|
57
|
+
showSaveButton = _ref.showSaveButton,
|
|
58
|
+
canAssign = _ref.canAssign;
|
|
58
59
|
|
|
59
60
|
var _useState = (0, _react.useState)(false),
|
|
60
61
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -146,7 +147,7 @@ var StatusAsignationInfo = function StatusAsignationInfo(_ref) {
|
|
|
146
147
|
color: "#969696",
|
|
147
148
|
fontFamily: "Avenir Next",
|
|
148
149
|
headerType: "input-name-header"
|
|
149
|
-
}), showAsignationPanel && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
150
|
+
}), showAsignationPanel && canAssign && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
150
151
|
className: "asignation-panel",
|
|
151
152
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
152
153
|
className: "asignation-header",
|
|
@@ -32,7 +32,8 @@ var FullTabsMenu = function FullTabsMenu(_ref) {
|
|
|
32
32
|
downloadImages = _ref.downloadImages,
|
|
33
33
|
askToDeleteImages = _ref.askToDeleteImages,
|
|
34
34
|
onClickSave = _ref.onClickSave,
|
|
35
|
-
showSaveButton = _ref.showSaveButton
|
|
35
|
+
showSaveButton = _ref.showSaveButton,
|
|
36
|
+
canAssign = _ref.canAssign;
|
|
36
37
|
|
|
37
38
|
var _useState = (0, _react.useState)(false),
|
|
38
39
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -55,7 +56,8 @@ var FullTabsMenu = function FullTabsMenu(_ref) {
|
|
|
55
56
|
downloadImages: downloadImages,
|
|
56
57
|
onClickSave: onClickSave,
|
|
57
58
|
askToDeleteImages: askToDeleteImages,
|
|
58
|
-
showSaveButton: showSaveButton
|
|
59
|
+
showSaveButton: showSaveButton,
|
|
60
|
+
canAssign: canAssign
|
|
59
61
|
})]
|
|
60
62
|
});
|
|
61
63
|
};
|
|
@@ -31,120 +31,146 @@ ProviderProductEditionDefault.args = {
|
|
|
31
31
|
"Ficha técnica": true,
|
|
32
32
|
Imágenes: true
|
|
33
33
|
},
|
|
34
|
-
token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
34
|
+
token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJmNTkyN2Y4ZS1jYmY3LTQ5MjItOWUwOS1lNjllYzBiMjczMWEiLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6ImY1OTI3ZjhlLWNiZjctNDkyMi05ZTA5LWU2OWVjMGIyNzMxYSIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiI2M2NhNWQ3ZS1hZTllLTQ3MWYtYmMxOS04NzVmNjM0NzUzNDIiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY1Njk3MjQxOSwibmFtZSI6IklzbWFlbCBMb3BleiIsInBob25lX251bWJlciI6Iis1MjMxMTEzNjYzMzYiLCJleHAiOjE2NTY5NzYwMTksImlhdCI6MTY1Njk3MjQxOSwiZW1haWwiOiJpbG9wZXpAY29udGVudG9oLmNvbSJ9.e9mij3RmJhlQgtHb2EaddPhLyOu5aQoM5A_H7sIPxHdRVy3r_eNsBB3G-oWt36051JCIs1Hr9ViCgBR_6dl4KHcIPi22xvzZoWzH13ZyKq7plG1I0Xa1b5Uw3G1sUdQTuytYLHoSu23I36Q2ItjETAkxd1-4U6dIEF-4IkGRDdMuTwy8-zkOjZn3AHw0hl0WvbbUZBbE7j0CBdZM-KXHlUIuO9bLaoOM_cKLZaMeNzxJEAdAOIRRdiS3BPSjSPMzqzzLSnFVd6gUtjVbAWTDMh29t44v9T4smGrT7GdbSQz8q8B8M1jsHoOIvDDQJjvJGkqu63B-d5_G2vf2u_LfcQ",
|
|
35
35
|
articleId: 55154,
|
|
36
36
|
category: 2568,
|
|
37
37
|
version: 3,
|
|
38
38
|
productSelected: {
|
|
39
39
|
orderId: 96,
|
|
40
|
-
|
|
41
|
-
datasheet_status: "
|
|
42
|
-
description_status: "ACA",
|
|
43
|
-
images_status: "ACA",
|
|
40
|
+
status: "AA",
|
|
41
|
+
datasheet_status: "AA",
|
|
44
42
|
prio: "none",
|
|
45
43
|
version: 3,
|
|
44
|
+
description_status: "AA",
|
|
45
|
+
images_status: "AA",
|
|
46
46
|
brand: null,
|
|
47
|
+
retailerOrder: 0,
|
|
48
|
+
missing: {
|
|
49
|
+
datasheet: null,
|
|
50
|
+
descriptions: null,
|
|
51
|
+
images: null
|
|
52
|
+
},
|
|
53
|
+
services: {
|
|
54
|
+
datasheets: 1,
|
|
55
|
+
descriptions: 1,
|
|
56
|
+
images: 1
|
|
57
|
+
},
|
|
47
58
|
article: {
|
|
48
59
|
category: "SEGURIDAD|BATERÍAS Y PILAS|BATERÍAS Y PILAS",
|
|
49
60
|
company_name: "COMPANY DEV",
|
|
50
61
|
country: "México",
|
|
51
62
|
id_category: "2568",
|
|
63
|
+
id_datasheet_especialist: 54,
|
|
64
|
+
id_datasheet_facilitator: 52,
|
|
65
|
+
id_description_especialist: 54,
|
|
66
|
+
id_description_facilitator: 52,
|
|
67
|
+
id_images_especialist: 55,
|
|
68
|
+
id_images_facilitator: 53,
|
|
69
|
+
id_order: 96,
|
|
52
70
|
id_article: 55154,
|
|
71
|
+
id_auditor: 37,
|
|
53
72
|
name: "Prueba 12312",
|
|
73
|
+
timestamp: "2022-07-04T22:17:43.000Z",
|
|
54
74
|
upc: "977812"
|
|
55
75
|
},
|
|
56
76
|
retailers: [{
|
|
57
77
|
id: 58,
|
|
58
|
-
name: "The Home Depot Golden"
|
|
59
|
-
services: ["ACA", "ACA", "ACA", "NA"]
|
|
78
|
+
name: "The Home Depot Golden"
|
|
60
79
|
}, {
|
|
61
80
|
id: 59,
|
|
62
|
-
name: "The Home Depot Platinum"
|
|
63
|
-
services: ["NA", "NA", "NA", "AP"]
|
|
81
|
+
name: "The Home Depot Platinum"
|
|
64
82
|
}],
|
|
65
|
-
services: {
|
|
66
|
-
datasheets: 1,
|
|
67
|
-
descriptions: 1,
|
|
68
|
-
images: 1
|
|
69
|
-
},
|
|
70
83
|
statusByRetailer: {
|
|
71
84
|
58: {
|
|
72
|
-
datasheet: "
|
|
73
|
-
description: "
|
|
74
|
-
images: "
|
|
85
|
+
datasheet: "AA",
|
|
86
|
+
description: "AA",
|
|
87
|
+
images: "AA"
|
|
75
88
|
},
|
|
76
89
|
59: {
|
|
77
|
-
images: "
|
|
90
|
+
images: "AA"
|
|
78
91
|
}
|
|
79
92
|
},
|
|
80
|
-
id_article: 55154,
|
|
81
93
|
retailersAvailable: [{
|
|
82
94
|
id: 58,
|
|
83
|
-
name: "The Home Depot Golden"
|
|
84
|
-
percentage: 100
|
|
95
|
+
name: "The Home Depot Golden"
|
|
85
96
|
}, {
|
|
86
97
|
id: 59,
|
|
87
|
-
name: "The Home Depot Platinum"
|
|
88
|
-
percentage: 100
|
|
98
|
+
name: "The Home Depot Platinum"
|
|
89
99
|
}],
|
|
90
|
-
|
|
100
|
+
categoryName: "SEGURIDAD|BATERÍAS Y PILAS|BATERÍAS Y PILAS",
|
|
101
|
+
upc: "977812",
|
|
102
|
+
id_article: 55154,
|
|
103
|
+
id_order: 96
|
|
91
104
|
},
|
|
92
105
|
productToEdit: {
|
|
93
106
|
ArticleId: 55154,
|
|
94
107
|
idCategory: "2568",
|
|
95
108
|
product: {
|
|
96
109
|
orderId: 96,
|
|
97
|
-
|
|
98
|
-
datasheet_status: "
|
|
99
|
-
description_status: "ACA",
|
|
100
|
-
images_status: "ACA",
|
|
110
|
+
status: "AA",
|
|
111
|
+
datasheet_status: "AA",
|
|
101
112
|
prio: "none",
|
|
102
113
|
version: 3,
|
|
114
|
+
description_status: "AA",
|
|
115
|
+
images_status: "AA",
|
|
103
116
|
brand: null,
|
|
117
|
+
retailerOrder: 0,
|
|
118
|
+
missing: {
|
|
119
|
+
datasheet: null,
|
|
120
|
+
descriptions: null,
|
|
121
|
+
images: null
|
|
122
|
+
},
|
|
123
|
+
services: {
|
|
124
|
+
datasheets: 1,
|
|
125
|
+
descriptions: 1,
|
|
126
|
+
images: 1
|
|
127
|
+
},
|
|
104
128
|
article: {
|
|
105
129
|
category: "SEGURIDAD|BATERÍAS Y PILAS|BATERÍAS Y PILAS",
|
|
106
130
|
company_name: "COMPANY DEV",
|
|
107
131
|
country: "México",
|
|
108
132
|
id_category: "2568",
|
|
133
|
+
id_datasheet_especialist: 54,
|
|
134
|
+
id_datasheet_facilitator: 52,
|
|
135
|
+
id_description_especialist: 54,
|
|
136
|
+
id_description_facilitator: 52,
|
|
137
|
+
id_images_especialist: 55,
|
|
138
|
+
id_images_facilitator: 53,
|
|
139
|
+
id_order: 96,
|
|
109
140
|
id_article: 55154,
|
|
141
|
+
id_auditor: 37,
|
|
110
142
|
name: "Prueba 12312",
|
|
143
|
+
timestamp: "2022-07-04T22:17:43.000Z",
|
|
111
144
|
upc: "977812"
|
|
112
145
|
},
|
|
113
146
|
retailers: [{
|
|
114
147
|
id: 58,
|
|
115
|
-
name: "The Home Depot Golden"
|
|
116
|
-
services: ["ACA", "ACA", "ACA", "NA"]
|
|
148
|
+
name: "The Home Depot Golden"
|
|
117
149
|
}, {
|
|
118
150
|
id: 59,
|
|
119
|
-
name: "The Home Depot Platinum"
|
|
120
|
-
services: ["NA", "NA", "NA", "AP"]
|
|
151
|
+
name: "The Home Depot Platinum"
|
|
121
152
|
}],
|
|
122
|
-
services: {
|
|
123
|
-
datasheets: 1,
|
|
124
|
-
descriptions: 1,
|
|
125
|
-
images: 1
|
|
126
|
-
},
|
|
127
153
|
statusByRetailer: {
|
|
128
154
|
58: {
|
|
129
|
-
datasheet: "
|
|
130
|
-
description: "
|
|
131
|
-
images: "
|
|
155
|
+
datasheet: "AA",
|
|
156
|
+
description: "AA",
|
|
157
|
+
images: "AA"
|
|
132
158
|
},
|
|
133
159
|
59: {
|
|
134
|
-
images: "
|
|
160
|
+
images: "AA"
|
|
135
161
|
}
|
|
136
162
|
},
|
|
137
|
-
id_article: 55154,
|
|
138
163
|
retailersAvailable: [{
|
|
139
164
|
id: 58,
|
|
140
|
-
name: "The Home Depot Golden"
|
|
141
|
-
percentage: 100
|
|
165
|
+
name: "The Home Depot Golden"
|
|
142
166
|
}, {
|
|
143
167
|
id: 59,
|
|
144
|
-
name: "The Home Depot Platinum"
|
|
145
|
-
percentage: 100
|
|
168
|
+
name: "The Home Depot Platinum"
|
|
146
169
|
}],
|
|
147
|
-
|
|
170
|
+
categoryName: "SEGURIDAD|BATERÍAS Y PILAS|BATERÍAS Y PILAS",
|
|
171
|
+
upc: "977812",
|
|
172
|
+
id_article: 55154,
|
|
173
|
+
id_order: 96
|
|
148
174
|
}
|
|
149
175
|
},
|
|
150
176
|
location: {
|
|
@@ -157,36 +183,36 @@ ProviderProductEditionDefault.args = {
|
|
|
157
183
|
}
|
|
158
184
|
},
|
|
159
185
|
user: {
|
|
160
|
-
id_user:
|
|
161
|
-
name: "
|
|
162
|
-
last_name: "
|
|
163
|
-
email: "
|
|
164
|
-
position: "Admin",
|
|
186
|
+
id_user: 28,
|
|
187
|
+
name: "Proveedor",
|
|
188
|
+
last_name: "Colgate",
|
|
189
|
+
email: "ilopez@contentoh.com",
|
|
190
|
+
position: "Prueba Admin",
|
|
165
191
|
telephone: "+523111366336",
|
|
166
192
|
country: "México",
|
|
167
|
-
id_company:
|
|
168
|
-
id_cognito: "
|
|
193
|
+
id_company: 1,
|
|
194
|
+
id_cognito: "f5927f8e-cbf7-4922-9e09-e69ec0b2731a",
|
|
169
195
|
birth_Date: null,
|
|
170
196
|
about_me: null,
|
|
171
197
|
zip_code: null,
|
|
172
198
|
address: null,
|
|
173
199
|
job: null,
|
|
174
|
-
id_stripe: "",
|
|
200
|
+
id_stripe: "cus_KuEt6R6vwmN09f",
|
|
175
201
|
id_role: 0,
|
|
176
202
|
active: 1,
|
|
177
|
-
is_retailer:
|
|
178
|
-
email_notify:
|
|
203
|
+
is_retailer: 0,
|
|
204
|
+
email_notify: 0,
|
|
179
205
|
membership: {
|
|
180
|
-
id:
|
|
181
|
-
start_date: "
|
|
182
|
-
end_date: "
|
|
183
|
-
planID:
|
|
184
|
-
plan: "
|
|
185
|
-
name: "Plan
|
|
186
|
-
user_limit: "
|
|
187
|
-
products_limit: "
|
|
206
|
+
id: 38,
|
|
207
|
+
start_date: "2022-01-18T17:25:35.000Z",
|
|
208
|
+
end_date: "2023-01-18T17:25:35.000Z",
|
|
209
|
+
planID: 8,
|
|
210
|
+
plan: "prod_KtlhECVSFG2iro",
|
|
211
|
+
name: "Plan Pro",
|
|
212
|
+
user_limit: "20",
|
|
213
|
+
products_limit: "5000",
|
|
188
214
|
type: "Enterprise"
|
|
189
215
|
},
|
|
190
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
216
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-28/28.png?1656972421501"
|
|
191
217
|
}
|
|
192
218
|
};
|
|
@@ -46,48 +46,45 @@ RetailerProductEditionDefault.args = {
|
|
|
46
46
|
descriptions: 0,
|
|
47
47
|
images: 1
|
|
48
48
|
},
|
|
49
|
-
orderId:
|
|
49
|
+
orderId: 116,
|
|
50
50
|
status: "PA",
|
|
51
|
-
datasheet_status:
|
|
51
|
+
datasheet_status: null,
|
|
52
52
|
prio: "none",
|
|
53
53
|
version: 2,
|
|
54
|
-
description_status:
|
|
54
|
+
description_status: null,
|
|
55
55
|
images_status: null,
|
|
56
56
|
article: {
|
|
57
|
-
id_article:
|
|
58
|
-
id_category: "
|
|
59
|
-
name: "
|
|
60
|
-
upc: "
|
|
61
|
-
timestamp: "2022-07-
|
|
57
|
+
id_article: 76155,
|
|
58
|
+
id_category: "14",
|
|
59
|
+
name: "pan integral",
|
|
60
|
+
upc: "34243",
|
|
61
|
+
timestamp: "2022-07-13T16:51:20.000Z",
|
|
62
62
|
id_user: 28,
|
|
63
63
|
status: "NULL",
|
|
64
64
|
active: 1,
|
|
65
65
|
company_id: 1,
|
|
66
66
|
company_name: "COMPANY DEV",
|
|
67
67
|
country: "México",
|
|
68
|
-
id_order:
|
|
69
|
-
id_datasheet_especialist:
|
|
70
|
-
id_datasheet_facilitator:
|
|
71
|
-
id_description_especialist:
|
|
72
|
-
id_description_facilitator:
|
|
68
|
+
id_order: 116,
|
|
69
|
+
id_datasheet_especialist: 54,
|
|
70
|
+
id_datasheet_facilitator: 52,
|
|
71
|
+
id_description_especialist: 54,
|
|
72
|
+
id_description_facilitator: 52,
|
|
73
73
|
id_images_especialist: 55,
|
|
74
74
|
id_images_facilitator: 53,
|
|
75
75
|
id_auditor: 30,
|
|
76
76
|
id_recepcionist: null,
|
|
77
|
-
category: "
|
|
78
|
-
missingAttributes:
|
|
79
|
-
missingDescriptions:
|
|
80
|
-
missingImages:
|
|
77
|
+
category: "ABARROTES|ABARROTES SECOS|PAN DE CAJA",
|
|
78
|
+
missingAttributes: 0,
|
|
79
|
+
missingDescriptions: 0,
|
|
80
|
+
missingImages: 0
|
|
81
81
|
},
|
|
82
82
|
retailers: [{
|
|
83
|
-
id:
|
|
84
|
-
name: "
|
|
85
|
-
country: "México",
|
|
86
|
-
id_region: 1,
|
|
87
|
-
active: 1
|
|
83
|
+
id: 65,
|
|
84
|
+
name: "Súper Aki"
|
|
88
85
|
}],
|
|
89
86
|
country: "México",
|
|
90
|
-
upc: "
|
|
87
|
+
upc: "34243"
|
|
91
88
|
},
|
|
92
89
|
location: {
|
|
93
90
|
services: {
|
|
@@ -139,22 +136,22 @@ RetailerProductEditionDefault.args = {
|
|
|
139
136
|
upc: "807526"
|
|
140
137
|
},
|
|
141
138
|
user: {
|
|
142
|
-
id_user:
|
|
143
|
-
name: "
|
|
144
|
-
last_name: "",
|
|
145
|
-
email: "
|
|
146
|
-
position:
|
|
139
|
+
id_user: 30,
|
|
140
|
+
name: "Admin",
|
|
141
|
+
last_name: "Ulises",
|
|
142
|
+
email: "salmeron.5@hotmail.com",
|
|
143
|
+
position: "Admin",
|
|
147
144
|
telephone: null,
|
|
148
|
-
country:
|
|
145
|
+
country: "México",
|
|
149
146
|
id_company: 2,
|
|
150
|
-
id_cognito: "
|
|
147
|
+
id_cognito: "c94a7305-9365-46ff-a423-4b4bc3b8b180",
|
|
151
148
|
birth_Date: null,
|
|
152
149
|
about_me: null,
|
|
153
150
|
zip_code: null,
|
|
154
151
|
address: null,
|
|
155
152
|
job: null,
|
|
156
153
|
id_stripe: null,
|
|
157
|
-
id_role:
|
|
154
|
+
id_role: 6,
|
|
158
155
|
active: 1,
|
|
159
156
|
is_retailer: 0,
|
|
160
157
|
email_notify: 0,
|
|
@@ -169,6 +166,6 @@ RetailerProductEditionDefault.args = {
|
|
|
169
166
|
products_limit: "3",
|
|
170
167
|
type: "PyMES"
|
|
171
168
|
},
|
|
172
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
169
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-30/30.png?1657751241168"
|
|
173
170
|
}
|
|
174
171
|
};
|
|
@@ -1666,7 +1666,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1666
1666
|
|
|
1667
1667
|
return (product === null || product === void 0 ? void 0 : (_product$services = product.services) === null || _product$services === void 0 ? void 0 : _product$services.images) === 1 && updateImages();
|
|
1668
1668
|
},
|
|
1669
|
-
showSaveButton: userAssigned()
|
|
1669
|
+
showSaveButton: auditorAssigned() || userAssigned()
|
|
1670
1670
|
})]
|
|
1671
1671
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
1672
1672
|
className: "product-information",
|
|
@@ -1734,6 +1734,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1734
1734
|
})]);
|
|
1735
1735
|
}
|
|
1736
1736
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FullTabsMenu.FullTabsMenu, {
|
|
1737
|
+
canAssign: ![7, 8].includes(user.id_role),
|
|
1737
1738
|
tabsSections: tabsSections,
|
|
1738
1739
|
status: retailerStatus,
|
|
1739
1740
|
activeTab: activeTab,
|
|
@@ -13,7 +13,7 @@ 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 flex-direction: column;\n height: 100%;\n flex: 1;\n overflow: auto;\n\n .data-container {\n display: flex;\n flex: 0%;\n height: calc(100% - ", "px);\n .image-data-panel {\n width: 340px;\n\n & + * {\n margin-left: 10px;\n }\n }\n\n .product-information {\n width:
|
|
16
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n height: 100%;\n flex: 1;\n overflow: auto;\n\n .data-container {\n display: flex;\n flex: 0%;\n height: calc(100% - ", "px);\n .image-data-panel {\n width: 340px;\n\n & + * {\n margin-left: 10px;\n }\n }\n\n .product-information {\n width: 70%;\n display: flex;\n flex-direction: column;\n\n .services-information-container {\n height: 100%;\n overflow: auto;\n }\n\n .image-services {\n aside {\n display: grid;\n grid-template-columns: repeat(auto-fill, 179px);\n column-gap: 15px;\n row-gap: 15px;\n padding: 20px;\n }\n }\n\n .commentary-box {\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n padding: 10px;\n padding-left: 0;\n\n .commentary {\n display: flex;\n align-items: flex-end;\n\n .input-container {\n width: 500px;\n\n .quill {\n height: 100px;\n }\n\n & + * {\n margin-left: 5px;\n }\n }\n\n .buttons-box {\n display: flex;\n width: 210px;\n flex-wrap: wrap;\n\n .general-transparent-button {\n & + * {\n margin-top: 5px;\n }\n }\n\n .general-transparent-button,\n .general-green-button,\n .general-button-disabled {\n width: fit-content;\n min-width: 201px;\n height: 40px;\n }\n }\n }\n }\n\n .feedback-box {\n display: flex;\n }\n }\n }\n .container {\n width: 100%;\n height: 100%;\n .dropzone {\n height: 100%;\n width: 100%;\n }\n }\n"])), function (_ref) {
|
|
17
17
|
var headerTop = _ref.headerTop;
|
|
18
18
|
return headerTop;
|
|
19
19
|
});
|
|
@@ -280,17 +280,17 @@ var getNewStatus = function getNewStatus(statusArray) {
|
|
|
280
280
|
statusArray.forEach(function (element) {
|
|
281
281
|
return lookupString += element + "/";
|
|
282
282
|
});
|
|
283
|
-
if (lookupString.includes("RCA")) return "RCA";
|
|
284
283
|
if (lookupString.includes("RC")) return "RC";
|
|
285
284
|
if (lookupString.includes("RA")) return "RA";
|
|
286
285
|
if (lookupString.includes("RP")) return "RP";
|
|
287
|
-
if (lookupString.includes("
|
|
286
|
+
if (lookupString.includes("RCA")) return "RCA";
|
|
288
287
|
if (lookupString.includes("UNASSIGNED")) return "CA";
|
|
289
288
|
if (lookupString.includes("CA")) return "CA";
|
|
290
289
|
if (lookupString.includes("IE")) return "IE";
|
|
291
290
|
if (lookupString.includes("AC")) return "AC";
|
|
292
291
|
if (lookupString.includes("AA")) return "AA";
|
|
293
292
|
if (lookupString.includes("AP")) return "AP";
|
|
293
|
+
if (lookupString.includes("ACA")) return "ACA";
|
|
294
294
|
if (lookupString.includes("R")) return "R";
|
|
295
295
|
if (lookupString.includes("NA")) return "NA";
|
|
296
296
|
console.log("Status not found");
|
package/package.json
CHANGED
|
@@ -42,7 +42,6 @@ export const GeneralInput = ({
|
|
|
42
42
|
if (optionList?.length > 0) {
|
|
43
43
|
let index = evt.target.selectedIndex;
|
|
44
44
|
let valueSelected = evt.target.value;
|
|
45
|
-
console.log(valueSelected);
|
|
46
45
|
generalValue = valueSelected;
|
|
47
46
|
setTextValue({ value: generalValue });
|
|
48
47
|
} else {
|
|
@@ -13,7 +13,12 @@ export const HeaderTop = ({ setHeaderTop }) => {
|
|
|
13
13
|
return (
|
|
14
14
|
<Container ref={headerTop}>
|
|
15
15
|
<ScreenHeader text="Edición de producto" />
|
|
16
|
-
<Button
|
|
16
|
+
<Button
|
|
17
|
+
buttonType="close-button"
|
|
18
|
+
onClick={() => {
|
|
19
|
+
window.location.href = `/products`;
|
|
20
|
+
}}
|
|
21
|
+
/>
|
|
17
22
|
</Container>
|
|
18
23
|
);
|
|
19
24
|
};
|
|
@@ -3,6 +3,7 @@ import { Avatar } from "../../atoms/Avatar";
|
|
|
3
3
|
import { useEffect, useState } from "react";
|
|
4
4
|
import { AsignationOption } from "../../atoms/AsignationOption";
|
|
5
5
|
import { DropDownButton } from "../../atoms/DropDownButton";
|
|
6
|
+
import axios from "axios";
|
|
6
7
|
|
|
7
8
|
export const RetailerSelector = ({
|
|
8
9
|
retailers,
|
|
@@ -19,12 +20,27 @@ export const RetailerSelector = ({
|
|
|
19
20
|
}
|
|
20
21
|
};
|
|
21
22
|
|
|
23
|
+
const getRetailerImage = async () => {
|
|
24
|
+
console.log(
|
|
25
|
+
`https://content-management-images.s3.amazonaws.com/retailers/${activeRetailer.id}.png`
|
|
26
|
+
);
|
|
27
|
+
activeRetailer.image = `https://content-management-images.s3.amazonaws.com/retailers/${activeRetailer.id}.png`;
|
|
28
|
+
retailers.forEach(
|
|
29
|
+
(retailer) =>
|
|
30
|
+
(retailer.image = `https://content-management-images.s3.amazonaws.com/retailers/${retailer.id}.png`)
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
|
|
22
34
|
useEffect(() => {
|
|
23
35
|
if (retailersPanel) {
|
|
24
36
|
document.addEventListener("click", closeRetailersPanel, false);
|
|
25
37
|
}
|
|
26
38
|
}, [retailersPanel]);
|
|
27
39
|
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
getRetailerImage();
|
|
42
|
+
}, [activeRetailer]);
|
|
43
|
+
|
|
28
44
|
return (
|
|
29
45
|
<Container id="retailers-assignation">
|
|
30
46
|
<Avatar
|
|
@@ -25,6 +25,7 @@ export const StatusAsignationInfo = ({
|
|
|
25
25
|
id = "default-id",
|
|
26
26
|
onClickSave,
|
|
27
27
|
showSaveButton,
|
|
28
|
+
canAssign,
|
|
28
29
|
}) => {
|
|
29
30
|
const [showAsignationPanel, setShowAsignationPanel] = useState(false);
|
|
30
31
|
const [layout, setLayout] = useState(false);
|
|
@@ -123,7 +124,7 @@ export const StatusAsignationInfo = ({
|
|
|
123
124
|
fontFamily={"Avenir Next"}
|
|
124
125
|
headerType={"input-name-header"}
|
|
125
126
|
/>
|
|
126
|
-
{showAsignationPanel && (
|
|
127
|
+
{showAsignationPanel && canAssign && (
|
|
127
128
|
<div className="asignation-panel">
|
|
128
129
|
<div className="asignation-header">
|
|
129
130
|
<div className="asignation-status">
|
|
@@ -16,6 +16,7 @@ export const FullTabsMenu = ({
|
|
|
16
16
|
askToDeleteImages,
|
|
17
17
|
onClickSave,
|
|
18
18
|
showSaveButton,
|
|
19
|
+
canAssign,
|
|
19
20
|
}) => {
|
|
20
21
|
const [imagesSection, setImagesSection] = useState(false);
|
|
21
22
|
|
|
@@ -38,6 +39,7 @@ export const FullTabsMenu = ({
|
|
|
38
39
|
onClickSave={onClickSave}
|
|
39
40
|
askToDeleteImages={askToDeleteImages}
|
|
40
41
|
showSaveButton={showSaveButton}
|
|
42
|
+
canAssign={canAssign}
|
|
41
43
|
/>
|
|
42
44
|
</Container>
|
|
43
45
|
);
|
|
@@ -16,132 +16,158 @@ ProviderProductEditionDefault.args = {
|
|
|
16
16
|
Imágenes: true,
|
|
17
17
|
},
|
|
18
18
|
token:
|
|
19
|
-
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
19
|
+
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJmNTkyN2Y4ZS1jYmY3LTQ5MjItOWUwOS1lNjllYzBiMjczMWEiLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6ImY1OTI3ZjhlLWNiZjctNDkyMi05ZTA5LWU2OWVjMGIyNzMxYSIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiI2M2NhNWQ3ZS1hZTllLTQ3MWYtYmMxOS04NzVmNjM0NzUzNDIiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY1Njk3MjQxOSwibmFtZSI6IklzbWFlbCBMb3BleiIsInBob25lX251bWJlciI6Iis1MjMxMTEzNjYzMzYiLCJleHAiOjE2NTY5NzYwMTksImlhdCI6MTY1Njk3MjQxOSwiZW1haWwiOiJpbG9wZXpAY29udGVudG9oLmNvbSJ9.e9mij3RmJhlQgtHb2EaddPhLyOu5aQoM5A_H7sIPxHdRVy3r_eNsBB3G-oWt36051JCIs1Hr9ViCgBR_6dl4KHcIPi22xvzZoWzH13ZyKq7plG1I0Xa1b5Uw3G1sUdQTuytYLHoSu23I36Q2ItjETAkxd1-4U6dIEF-4IkGRDdMuTwy8-zkOjZn3AHw0hl0WvbbUZBbE7j0CBdZM-KXHlUIuO9bLaoOM_cKLZaMeNzxJEAdAOIRRdiS3BPSjSPMzqzzLSnFVd6gUtjVbAWTDMh29t44v9T4smGrT7GdbSQz8q8B8M1jsHoOIvDDQJjvJGkqu63B-d5_G2vf2u_LfcQ",
|
|
20
20
|
articleId: 55154,
|
|
21
21
|
category: 2568,
|
|
22
22
|
version: 3,
|
|
23
23
|
productSelected: {
|
|
24
24
|
orderId: 96,
|
|
25
|
-
|
|
26
|
-
datasheet_status: "
|
|
27
|
-
description_status: "ACA",
|
|
28
|
-
images_status: "ACA",
|
|
25
|
+
status: "AA",
|
|
26
|
+
datasheet_status: "AA",
|
|
29
27
|
prio: "none",
|
|
30
28
|
version: 3,
|
|
29
|
+
description_status: "AA",
|
|
30
|
+
images_status: "AA",
|
|
31
31
|
brand: null,
|
|
32
|
+
retailerOrder: 0,
|
|
33
|
+
missing: {
|
|
34
|
+
datasheet: null,
|
|
35
|
+
descriptions: null,
|
|
36
|
+
images: null,
|
|
37
|
+
},
|
|
38
|
+
services: {
|
|
39
|
+
datasheets: 1,
|
|
40
|
+
descriptions: 1,
|
|
41
|
+
images: 1,
|
|
42
|
+
},
|
|
32
43
|
article: {
|
|
33
44
|
category: "SEGURIDAD|BATERÍAS Y PILAS|BATERÍAS Y PILAS",
|
|
34
45
|
company_name: "COMPANY DEV",
|
|
35
46
|
country: "México",
|
|
36
47
|
id_category: "2568",
|
|
48
|
+
id_datasheet_especialist: 54,
|
|
49
|
+
id_datasheet_facilitator: 52,
|
|
50
|
+
id_description_especialist: 54,
|
|
51
|
+
id_description_facilitator: 52,
|
|
52
|
+
id_images_especialist: 55,
|
|
53
|
+
id_images_facilitator: 53,
|
|
54
|
+
id_order: 96,
|
|
37
55
|
id_article: 55154,
|
|
56
|
+
id_auditor: 37,
|
|
38
57
|
name: "Prueba 12312",
|
|
58
|
+
timestamp: "2022-07-04T22:17:43.000Z",
|
|
39
59
|
upc: "977812",
|
|
40
60
|
},
|
|
41
61
|
retailers: [
|
|
42
62
|
{
|
|
43
63
|
id: 58,
|
|
44
64
|
name: "The Home Depot Golden",
|
|
45
|
-
services: ["ACA", "ACA", "ACA", "NA"],
|
|
46
65
|
},
|
|
47
66
|
{
|
|
48
67
|
id: 59,
|
|
49
68
|
name: "The Home Depot Platinum",
|
|
50
|
-
services: ["NA", "NA", "NA", "AP"],
|
|
51
69
|
},
|
|
52
70
|
],
|
|
53
|
-
services: {
|
|
54
|
-
datasheets: 1,
|
|
55
|
-
descriptions: 1,
|
|
56
|
-
images: 1,
|
|
57
|
-
},
|
|
58
71
|
statusByRetailer: {
|
|
59
72
|
58: {
|
|
60
|
-
datasheet: "
|
|
61
|
-
description: "
|
|
62
|
-
images: "
|
|
73
|
+
datasheet: "AA",
|
|
74
|
+
description: "AA",
|
|
75
|
+
images: "AA",
|
|
63
76
|
},
|
|
64
77
|
59: {
|
|
65
|
-
images: "
|
|
78
|
+
images: "AA",
|
|
66
79
|
},
|
|
67
80
|
},
|
|
68
|
-
id_article: 55154,
|
|
69
81
|
retailersAvailable: [
|
|
70
82
|
{
|
|
71
83
|
id: 58,
|
|
72
84
|
name: "The Home Depot Golden",
|
|
73
|
-
percentage: 100,
|
|
74
85
|
},
|
|
75
86
|
{
|
|
76
87
|
id: 59,
|
|
77
88
|
name: "The Home Depot Platinum",
|
|
78
|
-
percentage: 100,
|
|
79
89
|
},
|
|
80
90
|
],
|
|
81
|
-
|
|
91
|
+
categoryName: "SEGURIDAD|BATERÍAS Y PILAS|BATERÍAS Y PILAS",
|
|
92
|
+
upc: "977812",
|
|
93
|
+
id_article: 55154,
|
|
94
|
+
id_order: 96,
|
|
82
95
|
},
|
|
83
96
|
productToEdit: {
|
|
84
97
|
ArticleId: 55154,
|
|
85
98
|
idCategory: "2568",
|
|
86
99
|
product: {
|
|
87
100
|
orderId: 96,
|
|
88
|
-
|
|
89
|
-
datasheet_status: "
|
|
90
|
-
description_status: "ACA",
|
|
91
|
-
images_status: "ACA",
|
|
101
|
+
status: "AA",
|
|
102
|
+
datasheet_status: "AA",
|
|
92
103
|
prio: "none",
|
|
93
104
|
version: 3,
|
|
105
|
+
description_status: "AA",
|
|
106
|
+
images_status: "AA",
|
|
94
107
|
brand: null,
|
|
108
|
+
retailerOrder: 0,
|
|
109
|
+
missing: {
|
|
110
|
+
datasheet: null,
|
|
111
|
+
descriptions: null,
|
|
112
|
+
images: null,
|
|
113
|
+
},
|
|
114
|
+
services: {
|
|
115
|
+
datasheets: 1,
|
|
116
|
+
descriptions: 1,
|
|
117
|
+
images: 1,
|
|
118
|
+
},
|
|
95
119
|
article: {
|
|
96
120
|
category: "SEGURIDAD|BATERÍAS Y PILAS|BATERÍAS Y PILAS",
|
|
97
121
|
company_name: "COMPANY DEV",
|
|
98
122
|
country: "México",
|
|
99
123
|
id_category: "2568",
|
|
124
|
+
id_datasheet_especialist: 54,
|
|
125
|
+
id_datasheet_facilitator: 52,
|
|
126
|
+
id_description_especialist: 54,
|
|
127
|
+
id_description_facilitator: 52,
|
|
128
|
+
id_images_especialist: 55,
|
|
129
|
+
id_images_facilitator: 53,
|
|
130
|
+
id_order: 96,
|
|
100
131
|
id_article: 55154,
|
|
132
|
+
id_auditor: 37,
|
|
101
133
|
name: "Prueba 12312",
|
|
134
|
+
timestamp: "2022-07-04T22:17:43.000Z",
|
|
102
135
|
upc: "977812",
|
|
103
136
|
},
|
|
104
137
|
retailers: [
|
|
105
138
|
{
|
|
106
139
|
id: 58,
|
|
107
140
|
name: "The Home Depot Golden",
|
|
108
|
-
services: ["ACA", "ACA", "ACA", "NA"],
|
|
109
141
|
},
|
|
110
142
|
{
|
|
111
143
|
id: 59,
|
|
112
144
|
name: "The Home Depot Platinum",
|
|
113
|
-
services: ["NA", "NA", "NA", "AP"],
|
|
114
145
|
},
|
|
115
146
|
],
|
|
116
|
-
services: {
|
|
117
|
-
datasheets: 1,
|
|
118
|
-
descriptions: 1,
|
|
119
|
-
images: 1,
|
|
120
|
-
},
|
|
121
147
|
statusByRetailer: {
|
|
122
148
|
58: {
|
|
123
|
-
datasheet: "
|
|
124
|
-
description: "
|
|
125
|
-
images: "
|
|
149
|
+
datasheet: "AA",
|
|
150
|
+
description: "AA",
|
|
151
|
+
images: "AA",
|
|
126
152
|
},
|
|
127
153
|
59: {
|
|
128
|
-
images: "
|
|
154
|
+
images: "AA",
|
|
129
155
|
},
|
|
130
156
|
},
|
|
131
|
-
id_article: 55154,
|
|
132
157
|
retailersAvailable: [
|
|
133
158
|
{
|
|
134
159
|
id: 58,
|
|
135
160
|
name: "The Home Depot Golden",
|
|
136
|
-
percentage: 100,
|
|
137
161
|
},
|
|
138
162
|
{
|
|
139
163
|
id: 59,
|
|
140
164
|
name: "The Home Depot Platinum",
|
|
141
|
-
percentage: 100,
|
|
142
165
|
},
|
|
143
166
|
],
|
|
144
|
-
|
|
167
|
+
categoryName: "SEGURIDAD|BATERÍAS Y PILAS|BATERÍAS Y PILAS",
|
|
168
|
+
upc: "977812",
|
|
169
|
+
id_article: 55154,
|
|
170
|
+
id_order: 96,
|
|
145
171
|
},
|
|
146
172
|
},
|
|
147
173
|
location: {
|
|
@@ -149,36 +175,36 @@ ProviderProductEditionDefault.args = {
|
|
|
149
175
|
state: { origin: "Contentoh" },
|
|
150
176
|
},
|
|
151
177
|
user: {
|
|
152
|
-
id_user:
|
|
153
|
-
name: "
|
|
154
|
-
last_name: "
|
|
155
|
-
email: "
|
|
156
|
-
position: "Admin",
|
|
178
|
+
id_user: 28,
|
|
179
|
+
name: "Proveedor",
|
|
180
|
+
last_name: "Colgate",
|
|
181
|
+
email: "ilopez@contentoh.com",
|
|
182
|
+
position: "Prueba Admin",
|
|
157
183
|
telephone: "+523111366336",
|
|
158
184
|
country: "México",
|
|
159
|
-
id_company:
|
|
160
|
-
id_cognito: "
|
|
185
|
+
id_company: 1,
|
|
186
|
+
id_cognito: "f5927f8e-cbf7-4922-9e09-e69ec0b2731a",
|
|
161
187
|
birth_Date: null,
|
|
162
188
|
about_me: null,
|
|
163
189
|
zip_code: null,
|
|
164
190
|
address: null,
|
|
165
191
|
job: null,
|
|
166
|
-
id_stripe: "",
|
|
192
|
+
id_stripe: "cus_KuEt6R6vwmN09f",
|
|
167
193
|
id_role: 0,
|
|
168
194
|
active: 1,
|
|
169
|
-
is_retailer:
|
|
170
|
-
email_notify:
|
|
195
|
+
is_retailer: 0,
|
|
196
|
+
email_notify: 0,
|
|
171
197
|
membership: {
|
|
172
|
-
id:
|
|
173
|
-
start_date: "
|
|
174
|
-
end_date: "
|
|
175
|
-
planID:
|
|
176
|
-
plan: "
|
|
177
|
-
name: "Plan
|
|
178
|
-
user_limit: "
|
|
179
|
-
products_limit: "
|
|
198
|
+
id: 38,
|
|
199
|
+
start_date: "2022-01-18T17:25:35.000Z",
|
|
200
|
+
end_date: "2023-01-18T17:25:35.000Z",
|
|
201
|
+
planID: 8,
|
|
202
|
+
plan: "prod_KtlhECVSFG2iro",
|
|
203
|
+
name: "Plan Pro",
|
|
204
|
+
user_limit: "20",
|
|
205
|
+
products_limit: "5000",
|
|
180
206
|
type: "Enterprise",
|
|
181
207
|
},
|
|
182
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
208
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-28/28.png?1656972421501",
|
|
183
209
|
},
|
|
184
210
|
};
|
|
@@ -31,50 +31,47 @@ RetailerProductEditionDefault.args = {
|
|
|
31
31
|
descriptions: 0,
|
|
32
32
|
images: 1,
|
|
33
33
|
},
|
|
34
|
-
orderId:
|
|
34
|
+
orderId: 116,
|
|
35
35
|
status: "PA",
|
|
36
|
-
datasheet_status:
|
|
36
|
+
datasheet_status: null,
|
|
37
37
|
prio: "none",
|
|
38
38
|
version: 2,
|
|
39
|
-
description_status:
|
|
39
|
+
description_status: null,
|
|
40
40
|
images_status: null,
|
|
41
41
|
article: {
|
|
42
|
-
id_article:
|
|
43
|
-
id_category: "
|
|
44
|
-
name: "
|
|
45
|
-
upc: "
|
|
46
|
-
timestamp: "2022-07-
|
|
42
|
+
id_article: 76155,
|
|
43
|
+
id_category: "14",
|
|
44
|
+
name: "pan integral",
|
|
45
|
+
upc: "34243",
|
|
46
|
+
timestamp: "2022-07-13T16:51:20.000Z",
|
|
47
47
|
id_user: 28,
|
|
48
48
|
status: "NULL",
|
|
49
49
|
active: 1,
|
|
50
50
|
company_id: 1,
|
|
51
51
|
company_name: "COMPANY DEV",
|
|
52
52
|
country: "México",
|
|
53
|
-
id_order:
|
|
54
|
-
id_datasheet_especialist:
|
|
55
|
-
id_datasheet_facilitator:
|
|
56
|
-
id_description_especialist:
|
|
57
|
-
id_description_facilitator:
|
|
53
|
+
id_order: 116,
|
|
54
|
+
id_datasheet_especialist: 54,
|
|
55
|
+
id_datasheet_facilitator: 52,
|
|
56
|
+
id_description_especialist: 54,
|
|
57
|
+
id_description_facilitator: 52,
|
|
58
58
|
id_images_especialist: 55,
|
|
59
59
|
id_images_facilitator: 53,
|
|
60
60
|
id_auditor: 30,
|
|
61
61
|
id_recepcionist: null,
|
|
62
|
-
category: "
|
|
63
|
-
missingAttributes:
|
|
64
|
-
missingDescriptions:
|
|
65
|
-
missingImages:
|
|
62
|
+
category: "ABARROTES|ABARROTES SECOS|PAN DE CAJA",
|
|
63
|
+
missingAttributes: 0,
|
|
64
|
+
missingDescriptions: 0,
|
|
65
|
+
missingImages: 0,
|
|
66
66
|
},
|
|
67
67
|
retailers: [
|
|
68
68
|
{
|
|
69
|
-
id:
|
|
70
|
-
name: "
|
|
71
|
-
country: "México",
|
|
72
|
-
id_region: 1,
|
|
73
|
-
active: 1,
|
|
69
|
+
id: 65,
|
|
70
|
+
name: "Súper Aki",
|
|
74
71
|
},
|
|
75
72
|
],
|
|
76
73
|
country: "México",
|
|
77
|
-
upc: "
|
|
74
|
+
upc: "34243",
|
|
78
75
|
},
|
|
79
76
|
location: {
|
|
80
77
|
services: {
|
|
@@ -128,22 +125,22 @@ RetailerProductEditionDefault.args = {
|
|
|
128
125
|
upc: "807526",
|
|
129
126
|
},
|
|
130
127
|
user: {
|
|
131
|
-
id_user:
|
|
132
|
-
name: "
|
|
133
|
-
last_name: "",
|
|
134
|
-
email: "
|
|
135
|
-
position:
|
|
128
|
+
id_user: 30,
|
|
129
|
+
name: "Admin",
|
|
130
|
+
last_name: "Ulises",
|
|
131
|
+
email: "salmeron.5@hotmail.com",
|
|
132
|
+
position: "Admin",
|
|
136
133
|
telephone: null,
|
|
137
|
-
country:
|
|
134
|
+
country: "México",
|
|
138
135
|
id_company: 2,
|
|
139
|
-
id_cognito: "
|
|
136
|
+
id_cognito: "c94a7305-9365-46ff-a423-4b4bc3b8b180",
|
|
140
137
|
birth_Date: null,
|
|
141
138
|
about_me: null,
|
|
142
139
|
zip_code: null,
|
|
143
140
|
address: null,
|
|
144
141
|
job: null,
|
|
145
142
|
id_stripe: null,
|
|
146
|
-
id_role:
|
|
143
|
+
id_role: 6,
|
|
147
144
|
active: 1,
|
|
148
145
|
is_retailer: 0,
|
|
149
146
|
email_notify: 0,
|
|
@@ -158,6 +155,6 @@ RetailerProductEditionDefault.args = {
|
|
|
158
155
|
products_limit: "3",
|
|
159
156
|
type: "PyMES",
|
|
160
157
|
},
|
|
161
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
158
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-30/30.png?1657751241168",
|
|
162
159
|
},
|
|
163
160
|
};
|
|
@@ -778,7 +778,7 @@ export const RetailerProductEdition = ({
|
|
|
778
778
|
const data = {
|
|
779
779
|
articleId: product?.article?.id_article,
|
|
780
780
|
orderId: product?.orderId,
|
|
781
|
-
message: body?.replace(/<.*?\/?>/gm,""),
|
|
781
|
+
message: body?.replace(/<.*?\/?>/gm, ""),
|
|
782
782
|
concept: concept,
|
|
783
783
|
version: version,
|
|
784
784
|
};
|
|
@@ -1134,7 +1134,7 @@ export const RetailerProductEdition = ({
|
|
|
1134
1134
|
onClickSave={() =>
|
|
1135
1135
|
product?.services?.images === 1 && updateImages()
|
|
1136
1136
|
}
|
|
1137
|
-
showSaveButton={userAssigned()}
|
|
1137
|
+
showSaveButton={auditorAssigned() || userAssigned()}
|
|
1138
1138
|
/>
|
|
1139
1139
|
</div>
|
|
1140
1140
|
<div className="product-information">
|
|
@@ -1226,6 +1226,7 @@ export const RetailerProductEdition = ({
|
|
|
1226
1226
|
}}
|
|
1227
1227
|
/>
|
|
1228
1228
|
<FullTabsMenu
|
|
1229
|
+
canAssign={![7, 8].includes(user.id_role)}
|
|
1229
1230
|
tabsSections={tabsSections}
|
|
1230
1231
|
status={retailerStatus}
|
|
1231
1232
|
activeTab={activeTab}
|
|
@@ -1364,7 +1365,7 @@ export const RetailerProductEdition = ({
|
|
|
1364
1365
|
) : (
|
|
1365
1366
|
<div className="feedback-box">
|
|
1366
1367
|
<Commentary
|
|
1367
|
-
comment={comment?.message?.replace(/<.*?\/?>/gm,"")}
|
|
1368
|
+
comment={comment?.message?.replace(/<.*?\/?>/gm, "")}
|
|
1368
1369
|
reviewed={crossComment}
|
|
1369
1370
|
/>
|
|
1370
1371
|
<Button
|
package/src/global-files/data.js
CHANGED
|
@@ -195,17 +195,17 @@ export const fetchUsers = async (auth) => {
|
|
|
195
195
|
export const getNewStatus = (statusArray) => {
|
|
196
196
|
let lookupString = "";
|
|
197
197
|
statusArray.forEach((element) => (lookupString += element + "/"));
|
|
198
|
-
if (lookupString.includes("RCA")) return "RCA";
|
|
199
198
|
if (lookupString.includes("RC")) return "RC";
|
|
200
199
|
if (lookupString.includes("RA")) return "RA";
|
|
201
200
|
if (lookupString.includes("RP")) return "RP";
|
|
202
|
-
if (lookupString.includes("
|
|
201
|
+
if (lookupString.includes("RCA")) return "RCA";
|
|
203
202
|
if (lookupString.includes("UNASSIGNED")) return "CA";
|
|
204
203
|
if (lookupString.includes("CA")) return "CA";
|
|
205
204
|
if (lookupString.includes("IE")) return "IE";
|
|
206
205
|
if (lookupString.includes("AC")) return "AC";
|
|
207
206
|
if (lookupString.includes("AA")) return "AA";
|
|
208
207
|
if (lookupString.includes("AP")) return "AP";
|
|
208
|
+
if (lookupString.includes("ACA")) return "ACA";
|
|
209
209
|
if (lookupString.includes("R")) return "R";
|
|
210
210
|
if (lookupString.includes("NA")) return "NA";
|
|
211
211
|
console.log("Status not found");
|