contentoh-components-library 21.1.53 → 21.1.56
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/pages/ProviderProductEdition/ProviderProductEdition.stories.js +152 -128
- package/dist/components/pages/ProviderProductEdition/index.js +71 -48
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +33 -33
- package/dist/components/pages/RetailerProductEdition/index.js +10 -8
- package/dist/global-files/data.js +2 -2
- package/package.json +1 -1
- package/src/components/atoms/GeneralInput/index.js +1 -0
- package/src/components/atoms/StatusTag/index.js +2 -12
- package/src/components/atoms/StatusTag/styles.js +11 -11
- package/src/components/atoms/ValidationPanel/index.js +1 -1
- package/src/components/molecules/HeaderTop/index.js +1 -6
- package/src/components/molecules/RetailerSelector/index.js +0 -15
- package/src/components/molecules/StatusAsignationInfo/index.js +2 -3
- package/src/components/organisms/FullProductNameHeader/index.js +1 -1
- package/src/components/organisms/FullTabsMenu/index.js +0 -2
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +131 -121
- package/src/components/pages/ProviderProductEdition/index.js +167 -171
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +87 -38
- package/src/components/pages/RetailerProductEdition/index.js +140 -166
- package/src/components/pages/RetailerProductEdition/styles.js +1 -1
- package/src/global-files/data.js +2 -1
- package/src/index.js +0 -1
|
@@ -31,154 +31,178 @@ ProviderProductEditionDefault.args = {
|
|
|
31
31
|
"Ficha técnica": false,
|
|
32
32
|
Imágenes: false
|
|
33
33
|
},
|
|
34
|
-
token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
35
|
-
articleId:
|
|
36
|
-
category:
|
|
34
|
+
token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJmNTkyN2Y4ZS1jYmY3LTQ5MjItOWUwOS1lNjllYzBiMjczMWEiLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6ImY1OTI3ZjhlLWNiZjctNDkyMi05ZTA5LWU2OWVjMGIyNzMxYSIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiJlMDk1ODJkMi03MDU0LTQ3OGEtYjgzOS1hZThiNWVmZTRjYWMiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY1NzU2OTA1MywibmFtZSI6IklzbWFlbCBMb3BleiIsInBob25lX251bWJlciI6Iis1MjMxMTEzNjYzMzYiLCJleHAiOjE2NTc1NzI2NTMsImlhdCI6MTY1NzU2OTA1MywiZW1haWwiOiJpbG9wZXpAY29udGVudG9oLmNvbSJ9.TQmeBJjBJC21O6Ag-Gi0ER2sLKjuSiCSM9PLON0JzQ00FC88hgrUxlPQHDnMDgWtcRRP3aylo0AB1UStV9GJlkyg7-8jNtTkIsgjCiPBV754NizoSDUonLgKTtjs5Sx-rM_Uv14h8tlybegw0X5Dqlyl2FNwl5Vr_096e5SD4gqrBoFXH9nMTxbUQlQ4i4fD_5xxdnhnFjnVT0z9hA59tdTj1jEYXZjNtod98hx_-Rm9LL5SpnYt7_uBsVbQkIIn8iKrGhJ3dG5RZFO3P3_Ydg1eWdbbKCSIO17kW2_orn3hGPiXtA29Hls5IbUu0xst6oppZmKx2mHGHmIdHx_IIA",
|
|
35
|
+
articleId: 55154,
|
|
36
|
+
category: 2568,
|
|
37
37
|
version: 3,
|
|
38
38
|
productSelected: {
|
|
39
|
-
orderId:
|
|
40
|
-
|
|
39
|
+
orderId: 96,
|
|
40
|
+
article_status: "AA",
|
|
41
41
|
datasheet_status: "AA",
|
|
42
|
-
prio: "none",
|
|
43
|
-
version: 3,
|
|
44
42
|
description_status: "AA",
|
|
45
43
|
images_status: "AA",
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
44
|
+
prio: "none",
|
|
45
|
+
version: 3,
|
|
46
|
+
brand: null,
|
|
47
|
+
article: {
|
|
48
|
+
category: "ILUMINACIÓN|FOCOS|FOCOS",
|
|
49
|
+
company_name: "THD Proveedor",
|
|
50
|
+
country: "México",
|
|
51
|
+
id_category: "2568",
|
|
52
|
+
id_article: 55154,
|
|
53
|
+
name: "Prueba 12312",
|
|
54
|
+
upc: "977812"
|
|
52
55
|
},
|
|
56
|
+
retailers: [{
|
|
57
|
+
id: 58,
|
|
58
|
+
name: "The Home Depot Golden",
|
|
59
|
+
services: ["AA", "AA", "AA", "AA"]
|
|
60
|
+
}, {
|
|
61
|
+
id: 59,
|
|
62
|
+
name: "The Home Depot Platinum",
|
|
63
|
+
services: ["NA", "NA", "NA", "AA"]
|
|
64
|
+
}],
|
|
53
65
|
services: {
|
|
54
66
|
datasheets: 1,
|
|
55
67
|
descriptions: 1,
|
|
56
68
|
images: 1
|
|
57
69
|
},
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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: 89,
|
|
70
|
-
id_article: 55157,
|
|
71
|
-
id_auditor: 37,
|
|
72
|
-
name: "testing",
|
|
73
|
-
upc: "807526"
|
|
74
|
-
},
|
|
75
|
-
retailers: [{
|
|
76
|
-
id: 3,
|
|
77
|
-
name: "Sam´s Club"
|
|
78
|
-
}],
|
|
79
|
-
retailersAvailable: [{
|
|
80
|
-
id: 3,
|
|
81
|
-
name: "Sam´s Club"
|
|
82
|
-
}],
|
|
83
|
-
categoryName: "ABARROTES|ABARROTES SECOS|ALIMENTOS DESHIDRATADOS",
|
|
84
|
-
upc: "807526",
|
|
85
|
-
id_article: 55157,
|
|
86
|
-
id_order: 89
|
|
87
|
-
},
|
|
88
|
-
productToEdit: {
|
|
89
|
-
ArticleId: 55157,
|
|
90
|
-
idCategory: "4",
|
|
91
|
-
product: {
|
|
92
|
-
orderId: 89,
|
|
93
|
-
status: "AA",
|
|
94
|
-
datasheet_status: "AA",
|
|
95
|
-
prio: "none",
|
|
96
|
-
version: 3,
|
|
97
|
-
description_status: "AA",
|
|
98
|
-
images_status: "AA",
|
|
99
|
-
brand: "123",
|
|
100
|
-
retailerOrder: 0,
|
|
101
|
-
missing: {
|
|
102
|
-
datasheet: 17,
|
|
103
|
-
descriptions: 4,
|
|
104
|
-
images: 3
|
|
70
|
+
statusByRetailer: {
|
|
71
|
+
58: {
|
|
72
|
+
datasheet: "AA",
|
|
73
|
+
description: "AA",
|
|
74
|
+
images: "AA"
|
|
105
75
|
},
|
|
106
76
|
services: {
|
|
107
77
|
datasheets: 1,
|
|
108
78
|
descriptions: 1,
|
|
109
79
|
images: 1
|
|
110
80
|
},
|
|
111
|
-
|
|
112
|
-
category: "ABARROTES|ABARROTES SECOS|ALIMENTOS DESHIDRATADOS",
|
|
113
|
-
company_name: "COMPANY DEV",
|
|
114
|
-
country: "México",
|
|
115
|
-
id_category: "4",
|
|
116
|
-
id_datasheet_especialist: 54,
|
|
117
|
-
id_datasheet_facilitator: 52,
|
|
118
|
-
id_description_especialist: 54,
|
|
119
|
-
id_description_facilitator: 52,
|
|
120
|
-
id_images_especialist: 55,
|
|
121
|
-
id_images_facilitator: 53,
|
|
122
|
-
id_order: 89,
|
|
123
|
-
id_article: 55157,
|
|
124
|
-
id_auditor: 37,
|
|
125
|
-
name: "testing",
|
|
126
|
-
upc: "807526"
|
|
127
|
-
},
|
|
128
|
-
retailers: [{
|
|
129
|
-
id: 3,
|
|
130
|
-
name: "Sam´s Club"
|
|
131
|
-
}],
|
|
81
|
+
id_article: 55154,
|
|
132
82
|
retailersAvailable: [{
|
|
133
|
-
id:
|
|
134
|
-
name: "
|
|
83
|
+
id: 58,
|
|
84
|
+
name: "The Home Depot Golden",
|
|
85
|
+
percentage: 100
|
|
86
|
+
}, {
|
|
87
|
+
id: 59,
|
|
88
|
+
name: "The Home Depot Platinum",
|
|
89
|
+
percentage: 100
|
|
90
|
+
}, {
|
|
91
|
+
id: 60,
|
|
92
|
+
name: "The Home Depot Resizing"
|
|
93
|
+
}, {
|
|
94
|
+
id: 61,
|
|
95
|
+
name: "Home Depot TAB"
|
|
135
96
|
}],
|
|
136
|
-
|
|
137
|
-
upc: "807526",
|
|
138
|
-
id_article: 55157,
|
|
139
|
-
id_order: 89
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
location: {
|
|
143
|
-
product: {
|
|
144
|
-
articleId: 55157,
|
|
145
|
-
versionId: 3
|
|
97
|
+
status: "AA"
|
|
146
98
|
},
|
|
147
|
-
|
|
148
|
-
|
|
99
|
+
productToEdit: {
|
|
100
|
+
ArticleId: 55118,
|
|
101
|
+
idCategory: "2143",
|
|
102
|
+
product: {
|
|
103
|
+
orderId: 96,
|
|
104
|
+
article_status: "AA",
|
|
105
|
+
datasheet_status: "AA",
|
|
106
|
+
description_status: "AA",
|
|
107
|
+
images_status: "AA",
|
|
108
|
+
prio: "none",
|
|
109
|
+
version: 3,
|
|
110
|
+
brand: null,
|
|
111
|
+
article: {
|
|
112
|
+
category: "ILUMINACIÓN|FOCOS|FOCOS",
|
|
113
|
+
company_name: "THD Proveedor",
|
|
114
|
+
country: "México",
|
|
115
|
+
id_category: "2568",
|
|
116
|
+
id_article: 55154,
|
|
117
|
+
name: "Prueba 12312",
|
|
118
|
+
upc: "977812"
|
|
119
|
+
},
|
|
120
|
+
retailers: [{
|
|
121
|
+
id: 58,
|
|
122
|
+
name: "The Home Depot Golden",
|
|
123
|
+
services: ["AA", "AA", "AA", "NA"]
|
|
124
|
+
}, {
|
|
125
|
+
id: 59,
|
|
126
|
+
name: "The Home Depot Platinum",
|
|
127
|
+
services: ["NA", "NA", "NA", "AA"]
|
|
128
|
+
}],
|
|
129
|
+
services: {
|
|
130
|
+
datasheets: 1,
|
|
131
|
+
descriptions: 1,
|
|
132
|
+
images: 1
|
|
133
|
+
},
|
|
134
|
+
statusByRetailer: {
|
|
135
|
+
58: {
|
|
136
|
+
datasheet: "AA",
|
|
137
|
+
description: "AA",
|
|
138
|
+
images: "AA"
|
|
139
|
+
},
|
|
140
|
+
services: {
|
|
141
|
+
datasheets: 1,
|
|
142
|
+
descriptions: 1,
|
|
143
|
+
images: 1
|
|
144
|
+
},
|
|
145
|
+
id_article: 55154,
|
|
146
|
+
retailersAvailable: [{
|
|
147
|
+
id: 58,
|
|
148
|
+
name: "The Home Depot Golden",
|
|
149
|
+
percentage: 100
|
|
150
|
+
}, {
|
|
151
|
+
id: 59,
|
|
152
|
+
name: "The Home Depot Platinum",
|
|
153
|
+
percentage: 100
|
|
154
|
+
}, {
|
|
155
|
+
id: 60,
|
|
156
|
+
name: "The Home Depot Resizing"
|
|
157
|
+
}, {
|
|
158
|
+
id: 61,
|
|
159
|
+
name: "Home Depot TAB"
|
|
160
|
+
}],
|
|
161
|
+
status: "AA"
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
location: {
|
|
165
|
+
product: {
|
|
166
|
+
articleId: 109485,
|
|
167
|
+
versionId: 3
|
|
168
|
+
},
|
|
169
|
+
state: {
|
|
170
|
+
origin: "Contentoh"
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
user: {
|
|
174
|
+
id_user: 59,
|
|
175
|
+
name: "The Home",
|
|
176
|
+
last_name: "Depot",
|
|
177
|
+
email: "cadena.ismael@allfreemail.net",
|
|
178
|
+
position: "Admin",
|
|
179
|
+
telephone: "+523111366336",
|
|
180
|
+
country: "México",
|
|
181
|
+
id_company: 7,
|
|
182
|
+
id_cognito: "5884ae34-59d6-4454-b98e-821518bcc3a7",
|
|
183
|
+
birth_Date: null,
|
|
184
|
+
about_me: null,
|
|
185
|
+
zip_code: null,
|
|
186
|
+
address: null,
|
|
187
|
+
job: null,
|
|
188
|
+
id_stripe: "",
|
|
189
|
+
id_role: 0,
|
|
190
|
+
active: 1,
|
|
191
|
+
is_retailer: 0,
|
|
192
|
+
email_notify: 1,
|
|
193
|
+
membership: {
|
|
194
|
+
id: 24,
|
|
195
|
+
start_date: "2021-11-23T03:35:50.000Z",
|
|
196
|
+
end_date: "2022-11-23T03:35:50.000Z",
|
|
197
|
+
planID: 9,
|
|
198
|
+
plan: "prod_KtlkzZVGq6bRTO",
|
|
199
|
+
name: "Plan Enterprise Full",
|
|
200
|
+
user_limit: "30",
|
|
201
|
+
products_limit: "10000",
|
|
202
|
+
type: "Enterprise"
|
|
203
|
+
},
|
|
204
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-59/59.png?1657069378649"
|
|
205
|
+
}
|
|
149
206
|
}
|
|
150
|
-
},
|
|
151
|
-
user: {
|
|
152
|
-
id_user: 28,
|
|
153
|
-
name: "Proveedor",
|
|
154
|
-
last_name: "Colgate",
|
|
155
|
-
email: "ilopez@contentoh.com",
|
|
156
|
-
position: "Prueba Admin",
|
|
157
|
-
telephone: "+523111366336",
|
|
158
|
-
country: "México",
|
|
159
|
-
id_company: 1,
|
|
160
|
-
id_cognito: "f5927f8e-cbf7-4922-9e09-e69ec0b2731a",
|
|
161
|
-
birth_Date: null,
|
|
162
|
-
about_me: null,
|
|
163
|
-
zip_code: null,
|
|
164
|
-
address: null,
|
|
165
|
-
job: null,
|
|
166
|
-
id_stripe: "cus_KuEt6R6vwmN09f",
|
|
167
|
-
id_role: 0,
|
|
168
|
-
active: 1,
|
|
169
|
-
is_retailer: 0,
|
|
170
|
-
email_notify: 0,
|
|
171
|
-
membership: {
|
|
172
|
-
id: 38,
|
|
173
|
-
start_date: "2022-01-18T17:25:35.000Z",
|
|
174
|
-
end_date: "2023-01-18T17:25:35.000Z",
|
|
175
|
-
planID: 8,
|
|
176
|
-
plan: "prod_KtlhECVSFG2iro",
|
|
177
|
-
name: "Plan Pro",
|
|
178
|
-
user_limit: "20",
|
|
179
|
-
products_limit: "5000",
|
|
180
|
-
type: "Enterprise"
|
|
181
|
-
},
|
|
182
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-28/28.png?1656607722122"
|
|
183
207
|
}
|
|
184
208
|
};
|
|
@@ -473,6 +473,11 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
473
473
|
saving = _useState82[0],
|
|
474
474
|
setSaving = _useState82[1];
|
|
475
475
|
|
|
476
|
+
var _useState83 = (0, _react.useState)(product.statusByRetailer),
|
|
477
|
+
_useState84 = (0, _slicedToArray2.default)(_useState83, 2),
|
|
478
|
+
retailerStatus = _useState84[0],
|
|
479
|
+
setRetailerStatus = _useState84[1];
|
|
480
|
+
|
|
476
481
|
(0, _react.useEffect)(function () {
|
|
477
482
|
checkAll && setSelectedImages(images.values);
|
|
478
483
|
}, [checkAll]);
|
|
@@ -1341,7 +1346,8 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1341
1346
|
var _ref13 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12(result) {
|
|
1342
1347
|
var _productTemp$id_order;
|
|
1343
1348
|
|
|
1344
|
-
var concept, productTemp, articleId, orderId, evalStatus, data, retailerId, res, orderStatus, newProductEdit;
|
|
1349
|
+
var concept, productTemp, articleId, orderId, sectionStatusKey, evalStatus, data, retailerId, res, newStatuses, orderStatus, serviceStatus, newProductEdit, _JSON$parse, newArticleStatus, newServiceStatus, newStatus, retailerStatusCopy, status;
|
|
1350
|
+
|
|
1345
1351
|
return _regenerator.default.wrap(function _callee12$(_context12) {
|
|
1346
1352
|
while (1) {
|
|
1347
1353
|
switch (_context12.prev = _context12.next) {
|
|
@@ -1351,7 +1357,8 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1351
1357
|
productTemp = product;
|
|
1352
1358
|
articleId = productTemp.id_article;
|
|
1353
1359
|
orderId = (_productTemp$id_order = productTemp.id_order) !== null && _productTemp$id_order !== void 0 ? _productTemp$id_order : productTemp.orderId;
|
|
1354
|
-
|
|
1360
|
+
sectionStatusKey = "".concat(getConcept(activeTab), "_status");
|
|
1361
|
+
evalStatus = product[sectionStatusKey] || (product === null || product === void 0 ? void 0 : product.version_status);
|
|
1355
1362
|
data = {
|
|
1356
1363
|
articleId: articleId,
|
|
1357
1364
|
orderId: orderId,
|
|
@@ -1359,77 +1366,83 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1359
1366
|
evalStatus: evalStatus
|
|
1360
1367
|
};
|
|
1361
1368
|
retailerId = activeRetailer === null || activeRetailer === void 0 ? void 0 : activeRetailer.id;
|
|
1362
|
-
_context12.prev =
|
|
1369
|
+
_context12.prev = 9;
|
|
1363
1370
|
|
|
1364
1371
|
if (!result) {
|
|
1365
|
-
_context12.next =
|
|
1372
|
+
_context12.next = 25;
|
|
1366
1373
|
break;
|
|
1367
1374
|
}
|
|
1368
1375
|
|
|
1369
1376
|
data.result = result;
|
|
1370
1377
|
data.retailerId = retailerId;
|
|
1371
|
-
_context12.next =
|
|
1378
|
+
_context12.next = 15;
|
|
1372
1379
|
return _axios.default.put("".concat(process.env.REACT_APP_EVALUATION_ENDPOINT), data, {
|
|
1373
1380
|
headers: {
|
|
1374
1381
|
Authorization: token
|
|
1375
1382
|
}
|
|
1376
1383
|
});
|
|
1377
1384
|
|
|
1378
|
-
case
|
|
1385
|
+
case 15:
|
|
1379
1386
|
res = _context12.sent;
|
|
1380
|
-
|
|
1387
|
+
newStatuses = JSON.parse(res.data.body);
|
|
1388
|
+
orderStatus = newStatuses.newOrderStatus;
|
|
1389
|
+
serviceStatus = newStatuses.newServiceStatus[articleId]["".concat(getConcept(activeTab), "Status")];
|
|
1390
|
+
newProductEdit = productEdit;
|
|
1391
|
+
newProductEdit.product[sectionStatusKey] = serviceStatus;
|
|
1392
|
+
setProductEdit(newProductEdit);
|
|
1381
1393
|
showSurvey && showSurvey(orderStatus[orderId] === "AP");
|
|
1382
|
-
_context12.next =
|
|
1394
|
+
_context12.next = 28;
|
|
1383
1395
|
break;
|
|
1384
1396
|
|
|
1385
|
-
case
|
|
1386
|
-
_context12.next =
|
|
1397
|
+
case 25:
|
|
1398
|
+
_context12.next = 27;
|
|
1387
1399
|
return _axios.default.put("".concat(process.env.REACT_APP_SEND_EVAL), data, {
|
|
1388
1400
|
headers: {
|
|
1389
1401
|
Authorization: token
|
|
1390
1402
|
}
|
|
1391
1403
|
});
|
|
1392
1404
|
|
|
1393
|
-
case
|
|
1405
|
+
case 27:
|
|
1394
1406
|
res = _context12.sent;
|
|
1395
1407
|
|
|
1396
|
-
case
|
|
1397
|
-
if (
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1408
|
+
case 28:
|
|
1409
|
+
if (res.data.statusCode === 200) {
|
|
1410
|
+
_JSON$parse = JSON.parse(res.data.body), newArticleStatus = _JSON$parse.newArticleStatus, newServiceStatus = _JSON$parse.newServiceStatus, newStatus = _JSON$parse.newStatus;
|
|
1411
|
+
if (newArticleStatus) productTemp.status = newArticleStatus[articleId];
|
|
1412
|
+
retailerStatusCopy = (0, _objectSpread3.default)({}, retailerStatus);
|
|
1413
|
+
retailerStatusCopy[activeRetailer.id][concept] = newStatus;
|
|
1414
|
+
setRetailerStatus(retailerStatusCopy);
|
|
1415
|
+
productTemp.statusByRetailer = retailerStatusCopy;
|
|
1416
|
+
|
|
1417
|
+
if (newServiceStatus) {
|
|
1418
|
+
status = newServiceStatus[articleId]["".concat(concept, "Status")];
|
|
1419
|
+
productTemp["".concat(concept, "_status")] = status;
|
|
1420
|
+
}
|
|
1401
1421
|
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
product: productTemp
|
|
1409
|
-
};
|
|
1410
|
-
setProductEdit(newProductEdit);
|
|
1411
|
-
sessionStorage.setItem("productEdit", JSON.stringify(newProductEdit));
|
|
1412
|
-
setOrigin(function (prev) {
|
|
1413
|
-
return (0, _objectSpread3.default)((0, _objectSpread3.default)({}, prev), {}, (0, _defineProperty2.default)({}, concept, "Evaluated"));
|
|
1414
|
-
});
|
|
1415
|
-
_context12.next = 32;
|
|
1416
|
-
return loadData();
|
|
1422
|
+
setProduct(productTemp);
|
|
1423
|
+
sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
|
|
1424
|
+
setOrigin(function (prev) {
|
|
1425
|
+
return (0, _objectSpread3.default)((0, _objectSpread3.default)({}, prev), {}, (0, _defineProperty2.default)({}, concept, status));
|
|
1426
|
+
});
|
|
1427
|
+
}
|
|
1417
1428
|
|
|
1418
|
-
|
|
1419
|
-
_context12.next = 37;
|
|
1429
|
+
_context12.next = 34;
|
|
1420
1430
|
break;
|
|
1421
1431
|
|
|
1422
|
-
case
|
|
1423
|
-
_context12.prev =
|
|
1424
|
-
_context12.t0 = _context12["catch"](
|
|
1432
|
+
case 31:
|
|
1433
|
+
_context12.prev = 31;
|
|
1434
|
+
_context12.t0 = _context12["catch"](9);
|
|
1425
1435
|
console.log(_context12.t0);
|
|
1426
1436
|
|
|
1427
|
-
case
|
|
1437
|
+
case 34:
|
|
1438
|
+
loadData();
|
|
1439
|
+
|
|
1440
|
+
case 35:
|
|
1428
1441
|
case "end":
|
|
1429
1442
|
return _context12.stop();
|
|
1430
1443
|
}
|
|
1431
1444
|
}
|
|
1432
|
-
}, _callee12, null, [[
|
|
1445
|
+
}, _callee12, null, [[9, 31]]);
|
|
1433
1446
|
}));
|
|
1434
1447
|
|
|
1435
1448
|
return function sendEvaluation(_x7) {
|
|
@@ -1439,7 +1452,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1439
1452
|
|
|
1440
1453
|
var validateAll = /*#__PURE__*/function () {
|
|
1441
1454
|
var _ref14 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13(result) {
|
|
1442
|
-
var evaluationArray, sendAll, conceptArray, productTemp;
|
|
1455
|
+
var evaluationArray, sendAll, conceptArray, productTemp, retailerStatusCopy;
|
|
1443
1456
|
return _regenerator.default.wrap(function _callee13$(_context13) {
|
|
1444
1457
|
while (1) {
|
|
1445
1458
|
switch (_context13.prev = _context13.next) {
|
|
@@ -1492,6 +1505,16 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1492
1505
|
productTemp.datasheet_status = productTemp.datasheet_status === "NA" ? "NA" : "".concat(result, "CA");
|
|
1493
1506
|
productTemp.description_status = productTemp.description_status === "NA" ? "NA" : "".concat(result, "CA");
|
|
1494
1507
|
productTemp.images_status = productTemp.images_status === "NA" ? "NA" : "".concat(result, "CA");
|
|
1508
|
+
retailerStatusCopy = (0, _objectSpread3.default)({}, retailerStatus);
|
|
1509
|
+
Object.keys(retailerStatusCopy).forEach(function (key) {
|
|
1510
|
+
conceptArray.forEach(function (concept) {
|
|
1511
|
+
if (retailerStatusCopy[key][concept]) {
|
|
1512
|
+
retailerStatusCopy[key][concept] = "".concat(result, "CA");
|
|
1513
|
+
}
|
|
1514
|
+
});
|
|
1515
|
+
});
|
|
1516
|
+
setRetailerStatus(retailerStatusCopy);
|
|
1517
|
+
productTemp.statusByRetailer = retailerStatusCopy;
|
|
1495
1518
|
setProduct(productTemp);
|
|
1496
1519
|
sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
|
|
1497
1520
|
setProductEdit({
|
|
@@ -1504,24 +1527,24 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1504
1527
|
idCategory: productTemp.article.id_category,
|
|
1505
1528
|
product: productTemp
|
|
1506
1529
|
}));
|
|
1507
|
-
_context13.next =
|
|
1530
|
+
_context13.next = 26;
|
|
1508
1531
|
return loadData();
|
|
1509
1532
|
|
|
1510
|
-
case
|
|
1511
|
-
_context13.next =
|
|
1533
|
+
case 26:
|
|
1534
|
+
_context13.next = 31;
|
|
1512
1535
|
break;
|
|
1513
1536
|
|
|
1514
|
-
case
|
|
1515
|
-
_context13.prev =
|
|
1537
|
+
case 28:
|
|
1538
|
+
_context13.prev = 28;
|
|
1516
1539
|
_context13.t0 = _context13["catch"](0);
|
|
1517
1540
|
console.log(_context13.t0);
|
|
1518
1541
|
|
|
1519
|
-
case
|
|
1542
|
+
case 31:
|
|
1520
1543
|
case "end":
|
|
1521
1544
|
return _context13.stop();
|
|
1522
1545
|
}
|
|
1523
1546
|
}
|
|
1524
|
-
}, _callee13, null, [[0,
|
|
1547
|
+
}, _callee13, null, [[0, 28]]);
|
|
1525
1548
|
}));
|
|
1526
1549
|
|
|
1527
1550
|
return function validateAll(_x8) {
|
|
@@ -1772,7 +1795,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1772
1795
|
}
|
|
1773
1796
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FullTabsMenu.FullTabsMenu, {
|
|
1774
1797
|
tabsSections: tabsSections,
|
|
1775
|
-
status:
|
|
1798
|
+
status: activeRetailer.id ? retailerStatus[activeRetailer === null || activeRetailer === void 0 ? void 0 : activeRetailer.id][getConcept(activeTab)] || "NS" : "-",
|
|
1776
1799
|
activeTab: activeTab,
|
|
1777
1800
|
setActiveTab: setActiveTab,
|
|
1778
1801
|
setImageLayout: setImageLayout,
|
|
@@ -1891,7 +1914,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1891
1914
|
}))
|
|
1892
1915
|
})]
|
|
1893
1916
|
})
|
|
1894
|
-
}) : revision
|
|
1917
|
+
}) : !revision && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
1895
1918
|
className: "required-inputs-message",
|
|
1896
1919
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
1897
1920
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
@@ -39,55 +39,55 @@ RetailerProductEditionDefault.args = {
|
|
|
39
39
|
"Ficha técnica": false,
|
|
40
40
|
Imágenes: false
|
|
41
41
|
},
|
|
42
|
-
token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
42
|
+
token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI3MTNhNzQ1Ny1mOTQzLTRiYzktOGViMC04NmI0MWY1YmQ0ZjgiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwiY29nbml0bzp1c2VybmFtZSI6IjcxM2E3NDU3LWY5NDMtNGJjOS04ZWIwLTg2YjQxZjViZDRmOCIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiI3ZTYxNmNhNi0yYmEwLTQzOWEtOTRjOS0yYTVjZDZlOWU1NjYiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY1NzA0Njk0NCwibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY1NzA1MDU0NCwiaWF0IjoxNjU3MDQ2OTQ0LCJlbWFpbCI6ImhjYXJyaWxsb0Bjb250ZW50b2guY29tIn0.btw_69CgSyAKV2UEUqxGTOfVdvoDlGLIpmw0SMrI59HcpCIMqwpfVKd0ZphiwARLhGGZRYC6rgzx6BS1XTs850UX6L2148A8hwt9toInXcTuhC0Wl2h7kJwZFh-KEnS2pFW88FExnPtTqfnbTyc-L_jyWDPnY39vFU0EdMibcSz1jlspDBNOGUXDvV0TtT97KzU1808eK9h7S_YiCiALLofN_C7veQ0sMfvbc155iic0Izl43otMbcCwim7FlX-WsuJHVciYjH36tv-9YHK1PprtLzybTSm1ih0poB3rXlNCcxoyjNfRJFCq1G6xlOsNCvKFl8GwhKNXGaGT_KK5MA",
|
|
43
43
|
productSelected: {
|
|
44
44
|
services: {
|
|
45
|
-
datasheets:
|
|
46
|
-
descriptions:
|
|
45
|
+
datasheets: 0,
|
|
46
|
+
descriptions: 0,
|
|
47
47
|
images: 1
|
|
48
48
|
},
|
|
49
|
-
orderId:
|
|
50
|
-
status: "
|
|
51
|
-
datasheet_status: "
|
|
49
|
+
orderId: 97,
|
|
50
|
+
status: "PA",
|
|
51
|
+
datasheet_status: "NS",
|
|
52
52
|
prio: "none",
|
|
53
|
-
version:
|
|
54
|
-
description_status: "
|
|
55
|
-
images_status:
|
|
53
|
+
version: 2,
|
|
54
|
+
description_status: "NS",
|
|
55
|
+
images_status: null,
|
|
56
56
|
article: {
|
|
57
|
-
id_article:
|
|
58
|
-
id_category: "
|
|
59
|
-
name: "
|
|
60
|
-
upc: "
|
|
61
|
-
timestamp: "2022-
|
|
57
|
+
id_article: 76130,
|
|
58
|
+
id_category: "696",
|
|
59
|
+
name: "mascarilla para cabello",
|
|
60
|
+
upc: "54645454",
|
|
61
|
+
timestamp: "2022-07-05T17:50:35.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: 97,
|
|
69
|
+
id_datasheet_especialist: null,
|
|
70
|
+
id_datasheet_facilitator: null,
|
|
71
|
+
id_description_especialist: null,
|
|
72
|
+
id_description_facilitator: null,
|
|
73
73
|
id_images_especialist: 55,
|
|
74
74
|
id_images_facilitator: 53,
|
|
75
|
-
id_auditor:
|
|
75
|
+
id_auditor: 30,
|
|
76
76
|
id_recepcionist: null,
|
|
77
|
-
category: "
|
|
78
|
-
missingAttributes:
|
|
79
|
-
missingDescriptions:
|
|
80
|
-
missingImages:
|
|
77
|
+
category: "SALUD Y BELLEZA|CUIDADO DEL CABELLO|CAPILARES",
|
|
78
|
+
missingAttributes: null,
|
|
79
|
+
missingDescriptions: null,
|
|
80
|
+
missingImages: null
|
|
81
81
|
},
|
|
82
82
|
retailers: [{
|
|
83
|
-
id:
|
|
84
|
-
name: "
|
|
83
|
+
id: 12,
|
|
84
|
+
name: "La Comer",
|
|
85
85
|
country: "México",
|
|
86
86
|
id_region: 1,
|
|
87
87
|
active: 1
|
|
88
88
|
}],
|
|
89
89
|
country: "México",
|
|
90
|
-
upc: "
|
|
90
|
+
upc: "54645454"
|
|
91
91
|
},
|
|
92
92
|
location: {
|
|
93
93
|
services: {
|
|
@@ -139,22 +139,22 @@ RetailerProductEditionDefault.args = {
|
|
|
139
139
|
upc: "807526"
|
|
140
140
|
},
|
|
141
141
|
user: {
|
|
142
|
-
id_user:
|
|
143
|
-
name: "
|
|
142
|
+
id_user: 55,
|
|
143
|
+
name: "ESPECIALISTA ED PRUEBA",
|
|
144
144
|
last_name: "",
|
|
145
|
-
email: "
|
|
145
|
+
email: "hcarrillo@contentoh.com",
|
|
146
146
|
position: null,
|
|
147
147
|
telephone: null,
|
|
148
148
|
country: null,
|
|
149
149
|
id_company: 2,
|
|
150
|
-
id_cognito: "
|
|
150
|
+
id_cognito: "713a7457-f943-4bc9-8eb0-86b41f5bd4f8",
|
|
151
151
|
birth_Date: null,
|
|
152
152
|
about_me: null,
|
|
153
153
|
zip_code: null,
|
|
154
154
|
address: null,
|
|
155
155
|
job: null,
|
|
156
156
|
id_stripe: null,
|
|
157
|
-
id_role:
|
|
157
|
+
id_role: 8,
|
|
158
158
|
active: 1,
|
|
159
159
|
is_retailer: 0,
|
|
160
160
|
email_notify: 0,
|
|
@@ -169,6 +169,6 @@ RetailerProductEditionDefault.args = {
|
|
|
169
169
|
products_limit: "3",
|
|
170
170
|
type: "PyMES"
|
|
171
171
|
},
|
|
172
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
172
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-55/55.png?1657046945610"
|
|
173
173
|
}
|
|
174
174
|
};
|