contentoh-components-library 21.3.29 → 21.3.31
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/molecules/StatusAsignationInfo/index.js +1 -1
- package/dist/components/organisms/ProductImageModal/index.js +10 -3
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +231 -62
- package/dist/components/pages/ProviderProductEdition/index.js +71 -55
- package/dist/components/pages/RetailerProductEdition/index.js +1 -1
- package/package.json +1 -1
- package/src/components/molecules/StatusAsignationInfo/index.js +11 -9
- package/src/components/organisms/ProductImageModal/index.js +6 -3
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +256 -67
- package/src/components/pages/ProviderProductEdition/index.js +72 -58
- package/src/components/pages/RetailerProductEdition/index.js +1 -1
|
@@ -106,7 +106,7 @@ var StatusAsignationInfo = function StatusAsignationInfo(_ref) {
|
|
|
106
106
|
slidefront: slidefront,
|
|
107
107
|
iconSize: "medium-image",
|
|
108
108
|
slidePosition: "bottom-slide"
|
|
109
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
109
|
+
}), version && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
110
110
|
buttonType: "general circular-button version-button",
|
|
111
111
|
onClick: function onClick(e) {
|
|
112
112
|
e.stopPropagation();
|
|
@@ -33,7 +33,9 @@ var ProductImageModal = function ProductImageModal(_ref) {
|
|
|
33
33
|
headerInfo = _ref.headerInfo,
|
|
34
34
|
validation = _ref.validation,
|
|
35
35
|
setShowModal = _ref.setShowModal,
|
|
36
|
-
sendToFacilitator = _ref.sendToFacilitator
|
|
36
|
+
sendToFacilitator = _ref.sendToFacilitator,
|
|
37
|
+
_ref$approveRejectBut = _ref.approveRejectButtons,
|
|
38
|
+
approveRejectButtons = _ref$approveRejectBut === void 0 ? false : _ref$approveRejectBut;
|
|
37
39
|
|
|
38
40
|
var _useState = (0, _react.useState)(0),
|
|
39
41
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -78,7 +80,7 @@ var ProductImageModal = function ProductImageModal(_ref) {
|
|
|
78
80
|
className: "validation-and-table-container",
|
|
79
81
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
80
82
|
className: "validation-panel",
|
|
81
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
83
|
+
children: [approveRejectButtons && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
82
84
|
buttonType: "circular-button ".concat(buttonType),
|
|
83
85
|
onClick: function onClick() {
|
|
84
86
|
return setShowValidationPanel(true);
|
|
@@ -92,7 +94,12 @@ var ProductImageModal = function ProductImageModal(_ref) {
|
|
|
92
94
|
id: "validation-panel",
|
|
93
95
|
setOptionClicked: setButtonType,
|
|
94
96
|
setShowValidationPanel: setShowValidationPanel,
|
|
95
|
-
|
|
97
|
+
approve: function approve() {
|
|
98
|
+
return sendToFacilitator && sendToFacilitator("A");
|
|
99
|
+
},
|
|
100
|
+
reject: function reject() {
|
|
101
|
+
return sendToFacilitator && sendToFacilitator("R");
|
|
102
|
+
}
|
|
96
103
|
})]
|
|
97
104
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ImageDataTable.ImageDataTable, {
|
|
98
105
|
imageData: images === null || images === void 0 ? void 0 : (_images$values$active3 = images.values[activeImage]) === null || _images$values$active3 === void 0 ? void 0 : _images$values$active3.data,
|
|
@@ -31,41 +31,217 @@ ProviderProductEditionDefault.args = {
|
|
|
31
31
|
"Ficha técnica": true,
|
|
32
32
|
Imágenes: true
|
|
33
33
|
},
|
|
34
|
-
token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
34
|
+
token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJmNTkyN2Y4ZS1jYmY3LTQ5MjItOWUwOS1lNjllYzBiMjczMWEiLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6ImY1OTI3ZjhlLWNiZjctNDkyMi05ZTA5LWU2OWVjMGIyNzMxYSIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiIzZTNmZTBhOS1kY2U2LTRjYjAtYTg3MS02YzljNTBiMmRmZmQiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY3OTYxMDg4NywibmFtZSI6IklzbWFlbCBMb3BleiIsInBob25lX251bWJlciI6Iis1MjMxMTEzNjYzMzYiLCJleHAiOjE2Nzk2MTQ0ODYsImlhdCI6MTY3OTYxMDg4NywiZW1haWwiOiJpbG9wZXpAY29udGVudG9oLmNvbSJ9.HcyeyeK54av0Fnzto54OA_5FfdlUy50CuuXObgxBJswJLvMMZK13jWE06xnpmQCn5a_T20-xSLllgYDPzpEs5c40nm9sA3dJs9YWZGUOXg4SAZUqHVi_LTeCWv3dy3yjewlmGmcS-uTkuEI6GrT3559PcgYn1KTgGuPgqL9t4cb8A89-8n3o-ihhRfdSpUuYgqspurQXARjLlkESw2Z1gzFqJBd4u3BXMtusANta9G9TsBaQ9zTfMW79ksrQeiMXpKDmap_cdM7pSrykHf180GOHj0MZpWGC9U-32wpiNQ_DBeAyIWiIKCyh7mU8WHA_3Nm27lkL2LwioGCz9rHPqg",
|
|
35
35
|
articleId: 238,
|
|
36
36
|
category: 846,
|
|
37
37
|
version: 2,
|
|
38
38
|
productSelected: {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
39
|
+
orderId: 14606,
|
|
40
|
+
status: "AA",
|
|
41
|
+
datasheet_status: "AA",
|
|
42
|
+
prio: "none",
|
|
43
|
+
version: 3,
|
|
44
|
+
description_status: "AA",
|
|
45
|
+
images_status: "AA",
|
|
46
|
+
brand: "Axion",
|
|
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
|
+
},
|
|
58
|
+
article: {
|
|
59
|
+
category: "Consumibles|Productos de Limpieza y Lavandería|Jabones y Lavatrastes",
|
|
60
|
+
company_name: "GRUPO BRAHMA",
|
|
61
|
+
country: "México",
|
|
62
|
+
id_category: "157",
|
|
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: 14606,
|
|
70
|
+
id_article: 37317,
|
|
71
|
+
id_auditor: 37,
|
|
72
|
+
name: "Detergente lavatrastres líquido Axion Complete tricloro 1.1 l",
|
|
73
|
+
timestamp: "2023-03-10T20:19:46.000Z",
|
|
74
|
+
upc: "7509546078915"
|
|
75
|
+
},
|
|
76
|
+
retailers: [{
|
|
77
|
+
id: 4,
|
|
78
|
+
name: "Walmart Super y Superama"
|
|
79
|
+
}, {
|
|
80
|
+
id: 5,
|
|
81
|
+
name: "Chedraui"
|
|
82
|
+
}, {
|
|
83
|
+
id: 6,
|
|
84
|
+
name: "HEB"
|
|
85
|
+
}, {
|
|
86
|
+
id: 12,
|
|
87
|
+
name: "La Comer"
|
|
88
|
+
}, {
|
|
89
|
+
id: 17,
|
|
90
|
+
name: "Genérico"
|
|
91
|
+
}],
|
|
92
|
+
statusByRetailer: {
|
|
93
|
+
4: {
|
|
94
|
+
datasheet: "AA",
|
|
95
|
+
description: "AA",
|
|
96
|
+
images: "AA"
|
|
97
|
+
},
|
|
98
|
+
5: {
|
|
99
|
+
datasheet: "AA",
|
|
100
|
+
description: "AA",
|
|
101
|
+
images: "AA"
|
|
102
|
+
},
|
|
103
|
+
6: {
|
|
104
|
+
datasheet: "AA",
|
|
105
|
+
description: "AA",
|
|
106
|
+
images: "AA"
|
|
107
|
+
},
|
|
108
|
+
12: {
|
|
109
|
+
datasheet: "AA",
|
|
110
|
+
description: "AA",
|
|
111
|
+
images: "AA"
|
|
112
|
+
},
|
|
113
|
+
17: {
|
|
114
|
+
datasheet: "AA",
|
|
115
|
+
description: "AA",
|
|
116
|
+
images: "AA"
|
|
117
|
+
}
|
|
118
|
+
},
|
|
47
119
|
retailersAvailable: [{
|
|
48
|
-
id:
|
|
49
|
-
name: "
|
|
50
|
-
}
|
|
120
|
+
id: 4,
|
|
121
|
+
name: "Walmart Super y Superama"
|
|
122
|
+
}, {
|
|
123
|
+
id: 5,
|
|
124
|
+
name: "Chedraui"
|
|
125
|
+
}, {
|
|
126
|
+
id: 6,
|
|
127
|
+
name: "HEB"
|
|
128
|
+
}, {
|
|
129
|
+
id: 12,
|
|
130
|
+
name: "La Comer"
|
|
131
|
+
}, {
|
|
132
|
+
id: 17,
|
|
133
|
+
name: "Genérico"
|
|
134
|
+
}],
|
|
135
|
+
categoryName: "Consumibles|Productos de Limpieza y Lavandería|Jabones y Lavatrastes",
|
|
136
|
+
upc: "7509546078915",
|
|
137
|
+
id_article: 37317,
|
|
138
|
+
id_order: 14606
|
|
51
139
|
},
|
|
52
140
|
productToEdit: {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
product:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
141
|
+
ArticleId: 37317,
|
|
142
|
+
idCategory: "157",
|
|
143
|
+
product: {
|
|
144
|
+
orderId: 14606,
|
|
145
|
+
status: "AA",
|
|
146
|
+
datasheet_status: "AA",
|
|
147
|
+
prio: "none",
|
|
148
|
+
version: 3,
|
|
149
|
+
description_status: "AA",
|
|
150
|
+
images_status: "AA",
|
|
151
|
+
brand: "Axion",
|
|
152
|
+
retailerOrder: 0,
|
|
153
|
+
missing: {
|
|
154
|
+
datasheet: null,
|
|
155
|
+
descriptions: null,
|
|
156
|
+
images: null
|
|
157
|
+
},
|
|
158
|
+
services: {
|
|
159
|
+
datasheets: 1,
|
|
160
|
+
descriptions: 1,
|
|
161
|
+
images: 1
|
|
162
|
+
},
|
|
163
|
+
article: {
|
|
164
|
+
category: "Consumibles|Productos de Limpieza y Lavandería|Jabones y Lavatrastes",
|
|
165
|
+
company_name: "GRUPO BRAHMA",
|
|
166
|
+
country: "México",
|
|
167
|
+
id_category: "157",
|
|
168
|
+
id_datasheet_especialist: 54,
|
|
169
|
+
id_datasheet_facilitator: 52,
|
|
170
|
+
id_description_especialist: 54,
|
|
171
|
+
id_description_facilitator: 52,
|
|
172
|
+
id_images_especialist: 55,
|
|
173
|
+
id_images_facilitator: 53,
|
|
174
|
+
id_order: 14606,
|
|
175
|
+
id_article: 37317,
|
|
176
|
+
id_auditor: 37,
|
|
177
|
+
name: "Detergente lavatrastres líquido Axion Complete tricloro 1.1 l",
|
|
178
|
+
timestamp: "2023-03-10T20:19:46.000Z",
|
|
179
|
+
upc: "7509546078915"
|
|
180
|
+
},
|
|
181
|
+
retailers: [{
|
|
182
|
+
id: 4,
|
|
183
|
+
name: "Walmart Super y Superama"
|
|
184
|
+
}, {
|
|
185
|
+
id: 5,
|
|
186
|
+
name: "Chedraui"
|
|
187
|
+
}, {
|
|
188
|
+
id: 6,
|
|
189
|
+
name: "HEB"
|
|
190
|
+
}, {
|
|
191
|
+
id: 12,
|
|
192
|
+
name: "La Comer"
|
|
193
|
+
}, {
|
|
194
|
+
id: 17,
|
|
195
|
+
name: "Genérico"
|
|
196
|
+
}],
|
|
197
|
+
statusByRetailer: {
|
|
198
|
+
4: {
|
|
199
|
+
datasheet: "AA",
|
|
200
|
+
description: "AA",
|
|
201
|
+
images: "AA"
|
|
202
|
+
},
|
|
203
|
+
5: {
|
|
204
|
+
datasheet: "AA",
|
|
205
|
+
description: "AA",
|
|
206
|
+
images: "AA"
|
|
207
|
+
},
|
|
208
|
+
6: {
|
|
209
|
+
datasheet: "AA",
|
|
210
|
+
description: "AA",
|
|
211
|
+
images: "AA"
|
|
212
|
+
},
|
|
213
|
+
12: {
|
|
214
|
+
datasheet: "AA",
|
|
215
|
+
description: "AA",
|
|
216
|
+
images: "AA"
|
|
217
|
+
},
|
|
218
|
+
17: {
|
|
219
|
+
datasheet: "AA",
|
|
220
|
+
description: "AA",
|
|
221
|
+
images: "AA"
|
|
222
|
+
}
|
|
223
|
+
},
|
|
64
224
|
retailersAvailable: [{
|
|
65
|
-
id:
|
|
66
|
-
name: "
|
|
67
|
-
}
|
|
68
|
-
|
|
225
|
+
id: 4,
|
|
226
|
+
name: "Walmart Super y Superama"
|
|
227
|
+
}, {
|
|
228
|
+
id: 5,
|
|
229
|
+
name: "Chedraui"
|
|
230
|
+
}, {
|
|
231
|
+
id: 6,
|
|
232
|
+
name: "HEB"
|
|
233
|
+
}, {
|
|
234
|
+
id: 12,
|
|
235
|
+
name: "La Comer"
|
|
236
|
+
}, {
|
|
237
|
+
id: 17,
|
|
238
|
+
name: "Genérico"
|
|
239
|
+
}],
|
|
240
|
+
categoryName: "Consumibles|Productos de Limpieza y Lavandería|Jabones y Lavatrastes",
|
|
241
|
+
upc: "7509546078915",
|
|
242
|
+
id_article: 37317,
|
|
243
|
+
id_order: 14606
|
|
244
|
+
}
|
|
69
245
|
},
|
|
70
246
|
location: {
|
|
71
247
|
state: {
|
|
@@ -74,30 +250,30 @@ ProviderProductEditionDefault.args = {
|
|
|
74
250
|
}
|
|
75
251
|
},
|
|
76
252
|
user: {
|
|
77
|
-
id_user:
|
|
78
|
-
name: "
|
|
79
|
-
last_name: "
|
|
80
|
-
email: "
|
|
81
|
-
position: "
|
|
82
|
-
telephone: "+
|
|
253
|
+
id_user: 28,
|
|
254
|
+
name: "Ismael",
|
|
255
|
+
last_name: "López",
|
|
256
|
+
email: "ilopez@contentoh.com",
|
|
257
|
+
position: "Test States",
|
|
258
|
+
telephone: "+523111366336",
|
|
83
259
|
country: "México",
|
|
84
|
-
id_company:
|
|
85
|
-
id_cognito: "
|
|
260
|
+
id_company: 1,
|
|
261
|
+
id_cognito: "f5927f8e-cbf7-4922-9e09-e69ec0b2731a",
|
|
86
262
|
birth_Date: null,
|
|
87
|
-
about_me:
|
|
88
|
-
zip_code:
|
|
89
|
-
address:
|
|
90
|
-
job:
|
|
91
|
-
id_stripe:
|
|
263
|
+
about_me: "",
|
|
264
|
+
zip_code: "",
|
|
265
|
+
address: "",
|
|
266
|
+
job: "",
|
|
267
|
+
id_stripe: "cus_KuEt6R6vwmN09f",
|
|
92
268
|
id_role: 0,
|
|
93
269
|
active: 1,
|
|
94
270
|
is_retailer: 0,
|
|
95
271
|
email_notify: 1,
|
|
96
|
-
is_user_tech:
|
|
272
|
+
is_user_tech: "ADMIN-AS",
|
|
97
273
|
membership: {
|
|
98
|
-
id:
|
|
99
|
-
start_date: "
|
|
100
|
-
end_date: "
|
|
274
|
+
id: 76,
|
|
275
|
+
start_date: "2022-01-18T17:25:35.000Z",
|
|
276
|
+
end_date: "2023-01-18T17:25:35.000Z",
|
|
101
277
|
planID: 8,
|
|
102
278
|
plan: "prod_KtlhECVSFG2iro",
|
|
103
279
|
name: "Plan Pro",
|
|
@@ -105,28 +281,21 @@ ProviderProductEditionDefault.args = {
|
|
|
105
281
|
products_limit: "5000",
|
|
106
282
|
type: "Enterprise"
|
|
107
283
|
},
|
|
108
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
284
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-28/28.png?1679610888753"
|
|
109
285
|
},
|
|
110
286
|
company: {
|
|
111
|
-
id_company:
|
|
112
|
-
trade_name: "
|
|
113
|
-
company_name: "
|
|
114
|
-
rfc: "
|
|
115
|
-
adress: "
|
|
116
|
-
about_company:
|
|
117
|
-
telephone:
|
|
118
|
-
web_site:
|
|
119
|
-
zip_code:
|
|
287
|
+
id_company: 1,
|
|
288
|
+
trade_name: "GRUPO BRAHMA",
|
|
289
|
+
company_name: "GRUPO BRAHMA",
|
|
290
|
+
rfc: "XAXX010101000",
|
|
291
|
+
adress: "AA",
|
|
292
|
+
about_company: "",
|
|
293
|
+
telephone: "",
|
|
294
|
+
web_site: "",
|
|
295
|
+
zip_code: "",
|
|
120
296
|
email: null,
|
|
121
|
-
social_link:
|
|
297
|
+
social_link: "",
|
|
122
298
|
is_retailer: 0,
|
|
123
|
-
financedRetailers: [{
|
|
124
|
-
id: 68,
|
|
125
|
-
name: "The Home Depot Merchants",
|
|
126
|
-
country: "México",
|
|
127
|
-
id_region: 1,
|
|
128
|
-
active: 1
|
|
129
|
-
}],
|
|
130
299
|
retailers: [{
|
|
131
300
|
id: null,
|
|
132
301
|
name: null,
|
|
@@ -537,6 +537,11 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
537
537
|
(0, _react.useEffect)(function () {
|
|
538
538
|
checkAll && setSelectedImages(images.values);
|
|
539
539
|
}, [checkAll]);
|
|
540
|
+
(0, _react.useEffect)(function () {
|
|
541
|
+
if (showModal) {
|
|
542
|
+
setActiveTab("Imágenes");
|
|
543
|
+
}
|
|
544
|
+
}, [showModal]);
|
|
540
545
|
|
|
541
546
|
var loadData = /*#__PURE__*/function () {
|
|
542
547
|
var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
@@ -1680,6 +1685,67 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1680
1685
|
title: "Bienvenido al modo Content-oh!",
|
|
1681
1686
|
description: "Finalmente elige la forma de pago que más te guste, procede con el pago y listo."
|
|
1682
1687
|
}];
|
|
1688
|
+
|
|
1689
|
+
var sendToEvaluation = function sendToEvaluation(result) {
|
|
1690
|
+
if (result === "A") {
|
|
1691
|
+
if (origin[activeTab] === "RequestWithoutContentoh" && !user.is_retailer && (!product.id_order || !product.orderId)) {
|
|
1692
|
+
setDataGenericModal(function (prev) {
|
|
1693
|
+
return (0, _objectSpread3.default)((0, _objectSpread3.default)({}, prev), {}, {
|
|
1694
|
+
button2: {
|
|
1695
|
+
name: "Continuar",
|
|
1696
|
+
action: function action() {
|
|
1697
|
+
return evaluationToRetailer("A");
|
|
1698
|
+
}
|
|
1699
|
+
}
|
|
1700
|
+
});
|
|
1701
|
+
});
|
|
1702
|
+
setShowGenericModal(true);
|
|
1703
|
+
} else if (user.is_retailer) {
|
|
1704
|
+
if (product.id_order || product.orderId) {
|
|
1705
|
+
sendEvaluation("A");
|
|
1706
|
+
} else {
|
|
1707
|
+
setDataGenericModal(function (prev) {
|
|
1708
|
+
return (0, _objectSpread3.default)((0, _objectSpread3.default)({}, prev), {}, {
|
|
1709
|
+
button2: {
|
|
1710
|
+
name: "Continuar",
|
|
1711
|
+
action: function action() {
|
|
1712
|
+
return evaluationToRetailer("A");
|
|
1713
|
+
}
|
|
1714
|
+
}
|
|
1715
|
+
});
|
|
1716
|
+
});
|
|
1717
|
+
setShowGenericModal(true);
|
|
1718
|
+
}
|
|
1719
|
+
} else {
|
|
1720
|
+
sendEvaluation("A");
|
|
1721
|
+
}
|
|
1722
|
+
} else {
|
|
1723
|
+
if (originProp === "RequestWithoutContentoh" && !user.is_retailer && (!product.id_order || !product.orderId)) {
|
|
1724
|
+
return;
|
|
1725
|
+
} else if (user.is_retailer) {
|
|
1726
|
+
if (product.id_order || product.orderId) {
|
|
1727
|
+
setValidatedAll(true);
|
|
1728
|
+
setModalViewError(true);
|
|
1729
|
+
} else {
|
|
1730
|
+
setDataGenericModal(function (prev) {
|
|
1731
|
+
return (0, _objectSpread3.default)((0, _objectSpread3.default)({}, prev), {}, {
|
|
1732
|
+
button2: {
|
|
1733
|
+
name: "Continuar",
|
|
1734
|
+
action: function action() {
|
|
1735
|
+
return evaluationToRetailer("R");
|
|
1736
|
+
}
|
|
1737
|
+
}
|
|
1738
|
+
});
|
|
1739
|
+
});
|
|
1740
|
+
setShowGenericModal(true);
|
|
1741
|
+
}
|
|
1742
|
+
} else {
|
|
1743
|
+
setValidatedAll(true);
|
|
1744
|
+
setModalViewError(true);
|
|
1745
|
+
}
|
|
1746
|
+
}
|
|
1747
|
+
};
|
|
1748
|
+
|
|
1683
1749
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
1684
1750
|
headerTop: headerTop,
|
|
1685
1751
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_HeaderTop.HeaderTop, {
|
|
@@ -1782,62 +1848,10 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1782
1848
|
}
|
|
1783
1849
|
},
|
|
1784
1850
|
approve: function approve() {
|
|
1785
|
-
|
|
1786
|
-
setDataGenericModal(function (prev) {
|
|
1787
|
-
return (0, _objectSpread3.default)((0, _objectSpread3.default)({}, prev), {}, {
|
|
1788
|
-
button2: {
|
|
1789
|
-
name: "Continuar",
|
|
1790
|
-
action: function action() {
|
|
1791
|
-
return evaluationToRetailer("A");
|
|
1792
|
-
}
|
|
1793
|
-
}
|
|
1794
|
-
});
|
|
1795
|
-
});
|
|
1796
|
-
setShowGenericModal(true);
|
|
1797
|
-
} else if (user.is_retailer) {
|
|
1798
|
-
if (product.id_order || product.orderId) {
|
|
1799
|
-
sendEvaluation("A");
|
|
1800
|
-
} else {
|
|
1801
|
-
setDataGenericModal(function (prev) {
|
|
1802
|
-
return (0, _objectSpread3.default)((0, _objectSpread3.default)({}, prev), {}, {
|
|
1803
|
-
button2: {
|
|
1804
|
-
name: "Continuar",
|
|
1805
|
-
action: function action() {
|
|
1806
|
-
return evaluationToRetailer("A");
|
|
1807
|
-
}
|
|
1808
|
-
}
|
|
1809
|
-
});
|
|
1810
|
-
});
|
|
1811
|
-
setShowGenericModal(true);
|
|
1812
|
-
}
|
|
1813
|
-
} else {
|
|
1814
|
-
sendEvaluation("A");
|
|
1815
|
-
}
|
|
1851
|
+
return sendToEvaluation("A");
|
|
1816
1852
|
},
|
|
1817
1853
|
reject: function reject() {
|
|
1818
|
-
|
|
1819
|
-
return;
|
|
1820
|
-
} else if (user.is_retailer) {
|
|
1821
|
-
if (product.id_order || product.orderId) {
|
|
1822
|
-
setValidatedAll(false);
|
|
1823
|
-
setModalViewError(true);
|
|
1824
|
-
} else {
|
|
1825
|
-
setDataGenericModal(function (prev) {
|
|
1826
|
-
return (0, _objectSpread3.default)((0, _objectSpread3.default)({}, prev), {}, {
|
|
1827
|
-
button2: {
|
|
1828
|
-
name: "Continuar",
|
|
1829
|
-
action: function action() {
|
|
1830
|
-
return evaluationToRetailer("R");
|
|
1831
|
-
}
|
|
1832
|
-
}
|
|
1833
|
-
});
|
|
1834
|
-
});
|
|
1835
|
-
setShowGenericModal(true);
|
|
1836
|
-
}
|
|
1837
|
-
} else {
|
|
1838
|
-
setValidatedAll(false);
|
|
1839
|
-
setModalViewError(true);
|
|
1840
|
-
}
|
|
1854
|
+
return sendToEvaluation("R");
|
|
1841
1855
|
}
|
|
1842
1856
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FullTabsMenu.FullTabsMenu, {
|
|
1843
1857
|
tabsSections: tabsSections,
|
|
@@ -1996,7 +2010,9 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1996
2010
|
})]
|
|
1997
2011
|
}), showModal && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ProductImageModal.ProductImageModal, {
|
|
1998
2012
|
images: images,
|
|
1999
|
-
setShowModal: setShowModal
|
|
2013
|
+
setShowModal: setShowModal,
|
|
2014
|
+
approveRejectButtons: isRevision() && getSectionStatus(),
|
|
2015
|
+
sendToFacilitator: sendToEvaluation
|
|
2000
2016
|
}), message.length > 0 && !showSurvey && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GenericModal.GenericModal, {
|
|
2001
2017
|
buttonType: componentsArray.length > 0 && "delete-product",
|
|
2002
2018
|
componentsArray: componentsArray.length > 0 ? componentsArray : [/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
@@ -2129,7 +2129,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
2129
2129
|
images: images,
|
|
2130
2130
|
setShowModal: setShowModal,
|
|
2131
2131
|
sendToFacilitator: sendToFacilitator,
|
|
2132
|
-
approveRejectButtons: approveRejectButtons
|
|
2132
|
+
approveRejectButtons: approveRejectButtons()
|
|
2133
2133
|
}), message.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GenericModal.GenericModal, {
|
|
2134
2134
|
buttonType: componentsArray.length > 0 && "delete-product",
|
|
2135
2135
|
componentsArray: componentsArray.length > 0 ? componentsArray : [/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
package/package.json
CHANGED
|
@@ -74,15 +74,17 @@ export const StatusAsignationInfo = ({
|
|
|
74
74
|
iconSize={"medium-image"}
|
|
75
75
|
slidePosition={"bottom-slide"}
|
|
76
76
|
/>
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
e
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
77
|
+
{version && (
|
|
78
|
+
<Button
|
|
79
|
+
buttonType={"general circular-button version-button"}
|
|
80
|
+
onClick={(e) => {
|
|
81
|
+
e.stopPropagation();
|
|
82
|
+
e.preventDefault();
|
|
83
|
+
setShowVersionSelector(true);
|
|
84
|
+
}}
|
|
85
|
+
label={`V${version}`}
|
|
86
|
+
/>
|
|
87
|
+
)}
|
|
86
88
|
{status !== "-" && <StatusTag statusType={status} ovalForm={true} />}
|
|
87
89
|
{showSaveButton && (
|
|
88
90
|
<Button
|
|
@@ -12,6 +12,7 @@ export const ProductImageModal = ({
|
|
|
12
12
|
validation,
|
|
13
13
|
setShowModal,
|
|
14
14
|
sendToFacilitator,
|
|
15
|
+
approveRejectButtons = false,
|
|
15
16
|
}) => {
|
|
16
17
|
const [activeImage, setActiveImage] = useState(0);
|
|
17
18
|
const [buttonType, setButtonType] = useState(
|
|
@@ -53,12 +54,12 @@ export const ProductImageModal = ({
|
|
|
53
54
|
<div className="modal-data-container">
|
|
54
55
|
<div className="validation-and-table-container">
|
|
55
56
|
<div className="validation-panel">
|
|
56
|
-
{
|
|
57
|
+
{approveRejectButtons && (
|
|
57
58
|
<Button
|
|
58
59
|
buttonType={`circular-button ${buttonType}`}
|
|
59
60
|
onClick={() => setShowValidationPanel(true)}
|
|
60
61
|
/>
|
|
61
|
-
}
|
|
62
|
+
)}
|
|
62
63
|
<Button
|
|
63
64
|
buttonType={"close-button"}
|
|
64
65
|
onClick={() => {
|
|
@@ -71,10 +72,12 @@ export const ProductImageModal = ({
|
|
|
71
72
|
id="validation-panel"
|
|
72
73
|
setOptionClicked={setButtonType}
|
|
73
74
|
setShowValidationPanel={setShowValidationPanel}
|
|
74
|
-
|
|
75
|
+
approve={() => sendToFacilitator && sendToFacilitator("A")}
|
|
76
|
+
reject={() => sendToFacilitator && sendToFacilitator("R")}
|
|
75
77
|
/>
|
|
76
78
|
)}
|
|
77
79
|
</div>
|
|
80
|
+
|
|
78
81
|
<ImageDataTable
|
|
79
82
|
imageData={images?.values[activeImage]?.data}
|
|
80
83
|
headerInfo={headerInfo}
|
|
@@ -16,76 +16,274 @@ ProviderProductEditionDefault.args = {
|
|
|
16
16
|
Imágenes: true,
|
|
17
17
|
},
|
|
18
18
|
token:
|
|
19
|
-
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
19
|
+
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJmNTkyN2Y4ZS1jYmY3LTQ5MjItOWUwOS1lNjllYzBiMjczMWEiLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6ImY1OTI3ZjhlLWNiZjctNDkyMi05ZTA5LWU2OWVjMGIyNzMxYSIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiIzZTNmZTBhOS1kY2U2LTRjYjAtYTg3MS02YzljNTBiMmRmZmQiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY3OTYxMDg4NywibmFtZSI6IklzbWFlbCBMb3BleiIsInBob25lX251bWJlciI6Iis1MjMxMTEzNjYzMzYiLCJleHAiOjE2Nzk2MTQ0ODYsImlhdCI6MTY3OTYxMDg4NywiZW1haWwiOiJpbG9wZXpAY29udGVudG9oLmNvbSJ9.HcyeyeK54av0Fnzto54OA_5FfdlUy50CuuXObgxBJswJLvMMZK13jWE06xnpmQCn5a_T20-xSLllgYDPzpEs5c40nm9sA3dJs9YWZGUOXg4SAZUqHVi_LTeCWv3dy3yjewlmGmcS-uTkuEI6GrT3559PcgYn1KTgGuPgqL9t4cb8A89-8n3o-ihhRfdSpUuYgqspurQXARjLlkESw2Z1gzFqJBd4u3BXMtusANta9G9TsBaQ9zTfMW79ksrQeiMXpKDmap_cdM7pSrykHf180GOHj0MZpWGC9U-32wpiNQ_DBeAyIWiIKCyh7mU8WHA_3Nm27lkL2LwioGCz9rHPqg",
|
|
20
20
|
articleId: 238,
|
|
21
21
|
category: 846,
|
|
22
22
|
version: 2,
|
|
23
23
|
productSelected: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
orderId: 14606,
|
|
25
|
+
status: "AA",
|
|
26
|
+
datasheet_status: "AA",
|
|
27
|
+
prio: "none",
|
|
28
|
+
version: 3,
|
|
29
|
+
description_status: "AA",
|
|
30
|
+
images_status: "AA",
|
|
31
|
+
brand: "Axion",
|
|
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
|
+
},
|
|
43
|
+
article: {
|
|
44
|
+
category:
|
|
45
|
+
"Consumibles|Productos de Limpieza y Lavandería|Jabones y Lavatrastes",
|
|
46
|
+
company_name: "GRUPO BRAHMA",
|
|
47
|
+
country: "México",
|
|
48
|
+
id_category: "157",
|
|
49
|
+
id_datasheet_especialist: 54,
|
|
50
|
+
id_datasheet_facilitator: 52,
|
|
51
|
+
id_description_especialist: 54,
|
|
52
|
+
id_description_facilitator: 52,
|
|
53
|
+
id_images_especialist: 55,
|
|
54
|
+
id_images_facilitator: 53,
|
|
55
|
+
id_order: 14606,
|
|
56
|
+
id_article: 37317,
|
|
57
|
+
id_auditor: 37,
|
|
58
|
+
name: "Detergente lavatrastres líquido Axion Complete tricloro 1.1 l",
|
|
59
|
+
timestamp: "2023-03-10T20:19:46.000Z",
|
|
60
|
+
upc: "7509546078915",
|
|
61
|
+
},
|
|
62
|
+
retailers: [
|
|
63
|
+
{
|
|
64
|
+
id: 4,
|
|
65
|
+
name: "Walmart Super y Superama",
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
id: 5,
|
|
69
|
+
name: "Chedraui",
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
id: 6,
|
|
73
|
+
name: "HEB",
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
id: 12,
|
|
77
|
+
name: "La Comer",
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
id: 17,
|
|
81
|
+
name: "Genérico",
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
statusByRetailer: {
|
|
85
|
+
4: {
|
|
86
|
+
datasheet: "AA",
|
|
87
|
+
description: "AA",
|
|
88
|
+
images: "AA",
|
|
89
|
+
},
|
|
90
|
+
5: {
|
|
91
|
+
datasheet: "AA",
|
|
92
|
+
description: "AA",
|
|
93
|
+
images: "AA",
|
|
94
|
+
},
|
|
95
|
+
6: {
|
|
96
|
+
datasheet: "AA",
|
|
97
|
+
description: "AA",
|
|
98
|
+
images: "AA",
|
|
99
|
+
},
|
|
100
|
+
12: {
|
|
101
|
+
datasheet: "AA",
|
|
102
|
+
description: "AA",
|
|
103
|
+
images: "AA",
|
|
104
|
+
},
|
|
105
|
+
17: {
|
|
106
|
+
datasheet: "AA",
|
|
107
|
+
description: "AA",
|
|
108
|
+
images: "AA",
|
|
109
|
+
},
|
|
110
|
+
},
|
|
32
111
|
retailersAvailable: [
|
|
33
112
|
{
|
|
34
|
-
id:
|
|
35
|
-
name: "
|
|
113
|
+
id: 4,
|
|
114
|
+
name: "Walmart Super y Superama",
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
id: 5,
|
|
118
|
+
name: "Chedraui",
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
id: 6,
|
|
122
|
+
name: "HEB",
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
id: 12,
|
|
126
|
+
name: "La Comer",
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
id: 17,
|
|
130
|
+
name: "Genérico",
|
|
36
131
|
},
|
|
37
132
|
],
|
|
133
|
+
categoryName:
|
|
134
|
+
"Consumibles|Productos de Limpieza y Lavandería|Jabones y Lavatrastes",
|
|
135
|
+
upc: "7509546078915",
|
|
136
|
+
id_article: 37317,
|
|
137
|
+
id_order: 14606,
|
|
38
138
|
},
|
|
39
139
|
productToEdit: {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
product:
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
},
|
|
57
|
-
],
|
|
140
|
+
ArticleId: 37317,
|
|
141
|
+
idCategory: "157",
|
|
142
|
+
product: {
|
|
143
|
+
orderId: 14606,
|
|
144
|
+
status: "AA",
|
|
145
|
+
datasheet_status: "AA",
|
|
146
|
+
prio: "none",
|
|
147
|
+
version: 3,
|
|
148
|
+
description_status: "AA",
|
|
149
|
+
images_status: "AA",
|
|
150
|
+
brand: "Axion",
|
|
151
|
+
retailerOrder: 0,
|
|
152
|
+
missing: {
|
|
153
|
+
datasheet: null,
|
|
154
|
+
descriptions: null,
|
|
155
|
+
images: null,
|
|
58
156
|
},
|
|
59
|
-
|
|
157
|
+
services: {
|
|
158
|
+
datasheets: 1,
|
|
159
|
+
descriptions: 1,
|
|
160
|
+
images: 1,
|
|
161
|
+
},
|
|
162
|
+
article: {
|
|
163
|
+
category:
|
|
164
|
+
"Consumibles|Productos de Limpieza y Lavandería|Jabones y Lavatrastes",
|
|
165
|
+
company_name: "GRUPO BRAHMA",
|
|
166
|
+
country: "México",
|
|
167
|
+
id_category: "157",
|
|
168
|
+
id_datasheet_especialist: 54,
|
|
169
|
+
id_datasheet_facilitator: 52,
|
|
170
|
+
id_description_especialist: 54,
|
|
171
|
+
id_description_facilitator: 52,
|
|
172
|
+
id_images_especialist: 55,
|
|
173
|
+
id_images_facilitator: 53,
|
|
174
|
+
id_order: 14606,
|
|
175
|
+
id_article: 37317,
|
|
176
|
+
id_auditor: 37,
|
|
177
|
+
name: "Detergente lavatrastres líquido Axion Complete tricloro 1.1 l",
|
|
178
|
+
timestamp: "2023-03-10T20:19:46.000Z",
|
|
179
|
+
upc: "7509546078915",
|
|
180
|
+
},
|
|
181
|
+
retailers: [
|
|
182
|
+
{
|
|
183
|
+
id: 4,
|
|
184
|
+
name: "Walmart Super y Superama",
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
id: 5,
|
|
188
|
+
name: "Chedraui",
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
id: 6,
|
|
192
|
+
name: "HEB",
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
id: 12,
|
|
196
|
+
name: "La Comer",
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
id: 17,
|
|
200
|
+
name: "Genérico",
|
|
201
|
+
},
|
|
202
|
+
],
|
|
203
|
+
statusByRetailer: {
|
|
204
|
+
4: {
|
|
205
|
+
datasheet: "AA",
|
|
206
|
+
description: "AA",
|
|
207
|
+
images: "AA",
|
|
208
|
+
},
|
|
209
|
+
5: {
|
|
210
|
+
datasheet: "AA",
|
|
211
|
+
description: "AA",
|
|
212
|
+
images: "AA",
|
|
213
|
+
},
|
|
214
|
+
6: {
|
|
215
|
+
datasheet: "AA",
|
|
216
|
+
description: "AA",
|
|
217
|
+
images: "AA",
|
|
218
|
+
},
|
|
219
|
+
12: {
|
|
220
|
+
datasheet: "AA",
|
|
221
|
+
description: "AA",
|
|
222
|
+
images: "AA",
|
|
223
|
+
},
|
|
224
|
+
17: {
|
|
225
|
+
datasheet: "AA",
|
|
226
|
+
description: "AA",
|
|
227
|
+
images: "AA",
|
|
228
|
+
},
|
|
229
|
+
},
|
|
230
|
+
retailersAvailable: [
|
|
231
|
+
{
|
|
232
|
+
id: 4,
|
|
233
|
+
name: "Walmart Super y Superama",
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
id: 5,
|
|
237
|
+
name: "Chedraui",
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
id: 6,
|
|
241
|
+
name: "HEB",
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
id: 12,
|
|
245
|
+
name: "La Comer",
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
id: 17,
|
|
249
|
+
name: "Genérico",
|
|
250
|
+
},
|
|
251
|
+
],
|
|
252
|
+
categoryName:
|
|
253
|
+
"Consumibles|Productos de Limpieza y Lavandería|Jabones y Lavatrastes",
|
|
254
|
+
upc: "7509546078915",
|
|
255
|
+
id_article: 37317,
|
|
256
|
+
id_order: 14606,
|
|
257
|
+
},
|
|
60
258
|
},
|
|
61
259
|
location: {
|
|
62
260
|
state: { origin: "Contentoh", withChat: true },
|
|
63
261
|
},
|
|
64
262
|
user: {
|
|
65
|
-
id_user:
|
|
66
|
-
name: "
|
|
67
|
-
last_name: "
|
|
68
|
-
email: "
|
|
69
|
-
position: "
|
|
70
|
-
telephone: "+
|
|
263
|
+
id_user: 28,
|
|
264
|
+
name: "Ismael",
|
|
265
|
+
last_name: "López",
|
|
266
|
+
email: "ilopez@contentoh.com",
|
|
267
|
+
position: "Test States",
|
|
268
|
+
telephone: "+523111366336",
|
|
71
269
|
country: "México",
|
|
72
|
-
id_company:
|
|
73
|
-
id_cognito: "
|
|
270
|
+
id_company: 1,
|
|
271
|
+
id_cognito: "f5927f8e-cbf7-4922-9e09-e69ec0b2731a",
|
|
74
272
|
birth_Date: null,
|
|
75
|
-
about_me:
|
|
76
|
-
zip_code:
|
|
77
|
-
address:
|
|
78
|
-
job:
|
|
79
|
-
id_stripe:
|
|
273
|
+
about_me: "",
|
|
274
|
+
zip_code: "",
|
|
275
|
+
address: "",
|
|
276
|
+
job: "",
|
|
277
|
+
id_stripe: "cus_KuEt6R6vwmN09f",
|
|
80
278
|
id_role: 0,
|
|
81
279
|
active: 1,
|
|
82
280
|
is_retailer: 0,
|
|
83
281
|
email_notify: 1,
|
|
84
|
-
is_user_tech:
|
|
282
|
+
is_user_tech: "ADMIN-AS",
|
|
85
283
|
membership: {
|
|
86
|
-
id:
|
|
87
|
-
start_date: "
|
|
88
|
-
end_date: "
|
|
284
|
+
id: 76,
|
|
285
|
+
start_date: "2022-01-18T17:25:35.000Z",
|
|
286
|
+
end_date: "2023-01-18T17:25:35.000Z",
|
|
89
287
|
planID: 8,
|
|
90
288
|
plan: "prod_KtlhECVSFG2iro",
|
|
91
289
|
name: "Plan Pro",
|
|
@@ -93,30 +291,21 @@ ProviderProductEditionDefault.args = {
|
|
|
93
291
|
products_limit: "5000",
|
|
94
292
|
type: "Enterprise",
|
|
95
293
|
},
|
|
96
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
294
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-28/28.png?1679610888753",
|
|
97
295
|
},
|
|
98
296
|
company: {
|
|
99
|
-
id_company:
|
|
100
|
-
trade_name: "
|
|
101
|
-
company_name: "
|
|
102
|
-
rfc: "
|
|
103
|
-
adress: "
|
|
104
|
-
about_company:
|
|
105
|
-
telephone:
|
|
106
|
-
web_site:
|
|
107
|
-
zip_code:
|
|
297
|
+
id_company: 1,
|
|
298
|
+
trade_name: "GRUPO BRAHMA",
|
|
299
|
+
company_name: "GRUPO BRAHMA",
|
|
300
|
+
rfc: "XAXX010101000",
|
|
301
|
+
adress: "AA",
|
|
302
|
+
about_company: "",
|
|
303
|
+
telephone: "",
|
|
304
|
+
web_site: "",
|
|
305
|
+
zip_code: "",
|
|
108
306
|
email: null,
|
|
109
|
-
social_link:
|
|
307
|
+
social_link: "",
|
|
110
308
|
is_retailer: 0,
|
|
111
|
-
financedRetailers: [
|
|
112
|
-
{
|
|
113
|
-
id: 68,
|
|
114
|
-
name: "The Home Depot Merchants",
|
|
115
|
-
country: "México",
|
|
116
|
-
id_region: 1,
|
|
117
|
-
active: 1,
|
|
118
|
-
},
|
|
119
|
-
],
|
|
120
309
|
retailers: [
|
|
121
310
|
{
|
|
122
311
|
id: null,
|
|
@@ -260,6 +260,12 @@ export const ProviderProductEdition = ({
|
|
|
260
260
|
checkAll && setSelectedImages(images.values);
|
|
261
261
|
}, [checkAll]);
|
|
262
262
|
|
|
263
|
+
useEffect(() => {
|
|
264
|
+
if (showModal) {
|
|
265
|
+
setActiveTab("Imágenes");
|
|
266
|
+
}
|
|
267
|
+
}, [showModal]);
|
|
268
|
+
|
|
263
269
|
const loadData = async () => {
|
|
264
270
|
const services = await getRetailerServices(
|
|
265
271
|
product?.id_article || product?.article?.id_article,
|
|
@@ -1056,6 +1062,64 @@ export const ProviderProductEdition = ({
|
|
|
1056
1062
|
"Finalmente elige la forma de pago que más te guste, procede con el pago y listo.",
|
|
1057
1063
|
},
|
|
1058
1064
|
];
|
|
1065
|
+
const sendToEvaluation = (result) => {
|
|
1066
|
+
if (result === "A") {
|
|
1067
|
+
if (
|
|
1068
|
+
origin[activeTab] === "RequestWithoutContentoh" &&
|
|
1069
|
+
!user.is_retailer &&
|
|
1070
|
+
(!product.id_order || !product.orderId)
|
|
1071
|
+
) {
|
|
1072
|
+
setDataGenericModal((prev) => ({
|
|
1073
|
+
...prev,
|
|
1074
|
+
button2: {
|
|
1075
|
+
name: "Continuar",
|
|
1076
|
+
action: () => evaluationToRetailer("A"),
|
|
1077
|
+
},
|
|
1078
|
+
}));
|
|
1079
|
+
setShowGenericModal(true);
|
|
1080
|
+
} else if (user.is_retailer) {
|
|
1081
|
+
if (product.id_order || product.orderId) {
|
|
1082
|
+
sendEvaluation("A");
|
|
1083
|
+
} else {
|
|
1084
|
+
setDataGenericModal((prev) => ({
|
|
1085
|
+
...prev,
|
|
1086
|
+
button2: {
|
|
1087
|
+
name: "Continuar",
|
|
1088
|
+
action: () => evaluationToRetailer("A"),
|
|
1089
|
+
},
|
|
1090
|
+
}));
|
|
1091
|
+
setShowGenericModal(true);
|
|
1092
|
+
}
|
|
1093
|
+
} else {
|
|
1094
|
+
sendEvaluation("A");
|
|
1095
|
+
}
|
|
1096
|
+
} else {
|
|
1097
|
+
if (
|
|
1098
|
+
originProp === "RequestWithoutContentoh" &&
|
|
1099
|
+
!user.is_retailer &&
|
|
1100
|
+
(!product.id_order || !product.orderId)
|
|
1101
|
+
) {
|
|
1102
|
+
return;
|
|
1103
|
+
} else if (user.is_retailer) {
|
|
1104
|
+
if (product.id_order || product.orderId) {
|
|
1105
|
+
setValidatedAll(true);
|
|
1106
|
+
setModalViewError(true);
|
|
1107
|
+
} else {
|
|
1108
|
+
setDataGenericModal((prev) => ({
|
|
1109
|
+
...prev,
|
|
1110
|
+
button2: {
|
|
1111
|
+
name: "Continuar",
|
|
1112
|
+
action: () => evaluationToRetailer("R"),
|
|
1113
|
+
},
|
|
1114
|
+
}));
|
|
1115
|
+
setShowGenericModal(true);
|
|
1116
|
+
}
|
|
1117
|
+
} else {
|
|
1118
|
+
setValidatedAll(true);
|
|
1119
|
+
setModalViewError(true);
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
};
|
|
1059
1123
|
return (
|
|
1060
1124
|
<Container headerTop={headerTop}>
|
|
1061
1125
|
<HeaderTop
|
|
@@ -1154,63 +1218,8 @@ export const ProviderProductEdition = ({
|
|
|
1154
1218
|
setModalViewError(true);
|
|
1155
1219
|
}
|
|
1156
1220
|
}}
|
|
1157
|
-
approve={() =>
|
|
1158
|
-
|
|
1159
|
-
origin[activeTab] === "RequestWithoutContentoh" &&
|
|
1160
|
-
!user.is_retailer &&
|
|
1161
|
-
(!product.id_order || !product.orderId)
|
|
1162
|
-
) {
|
|
1163
|
-
setDataGenericModal((prev) => ({
|
|
1164
|
-
...prev,
|
|
1165
|
-
button2: {
|
|
1166
|
-
name: "Continuar",
|
|
1167
|
-
action: () => evaluationToRetailer("A"),
|
|
1168
|
-
},
|
|
1169
|
-
}));
|
|
1170
|
-
setShowGenericModal(true);
|
|
1171
|
-
} else if (user.is_retailer) {
|
|
1172
|
-
if (product.id_order || product.orderId) {
|
|
1173
|
-
sendEvaluation("A");
|
|
1174
|
-
} else {
|
|
1175
|
-
setDataGenericModal((prev) => ({
|
|
1176
|
-
...prev,
|
|
1177
|
-
button2: {
|
|
1178
|
-
name: "Continuar",
|
|
1179
|
-
action: () => evaluationToRetailer("A"),
|
|
1180
|
-
},
|
|
1181
|
-
}));
|
|
1182
|
-
setShowGenericModal(true);
|
|
1183
|
-
}
|
|
1184
|
-
} else {
|
|
1185
|
-
sendEvaluation("A");
|
|
1186
|
-
}
|
|
1187
|
-
}}
|
|
1188
|
-
reject={() => {
|
|
1189
|
-
if (
|
|
1190
|
-
origin[activeTab] === "RequestWithoutContentoh" &&
|
|
1191
|
-
!user.is_retailer &&
|
|
1192
|
-
(!product.id_order || !product.orderId)
|
|
1193
|
-
) {
|
|
1194
|
-
return;
|
|
1195
|
-
} else if (user.is_retailer) {
|
|
1196
|
-
if (product.id_order || product.orderId) {
|
|
1197
|
-
setValidatedAll(false);
|
|
1198
|
-
setModalViewError(true);
|
|
1199
|
-
} else {
|
|
1200
|
-
setDataGenericModal((prev) => ({
|
|
1201
|
-
...prev,
|
|
1202
|
-
button2: {
|
|
1203
|
-
name: "Continuar",
|
|
1204
|
-
action: () => evaluationToRetailer("R"),
|
|
1205
|
-
},
|
|
1206
|
-
}));
|
|
1207
|
-
setShowGenericModal(true);
|
|
1208
|
-
}
|
|
1209
|
-
} else {
|
|
1210
|
-
setValidatedAll(false);
|
|
1211
|
-
setModalViewError(true);
|
|
1212
|
-
}
|
|
1213
|
-
}}
|
|
1221
|
+
approve={() => sendToEvaluation("A")}
|
|
1222
|
+
reject={() => sendToEvaluation("R")}
|
|
1214
1223
|
/>
|
|
1215
1224
|
<FullTabsMenu
|
|
1216
1225
|
tabsSections={tabsSections}
|
|
@@ -1407,7 +1416,12 @@ export const ProviderProductEdition = ({
|
|
|
1407
1416
|
</div>
|
|
1408
1417
|
</div>
|
|
1409
1418
|
{showModal && (
|
|
1410
|
-
<ProductImageModal
|
|
1419
|
+
<ProductImageModal
|
|
1420
|
+
images={images}
|
|
1421
|
+
setShowModal={setShowModal}
|
|
1422
|
+
approveRejectButtons={isRevision() && getSectionStatus()}
|
|
1423
|
+
sendToFacilitator={sendToEvaluation}
|
|
1424
|
+
/>
|
|
1411
1425
|
)}
|
|
1412
1426
|
{message.length > 0 && !showSurvey && (
|
|
1413
1427
|
<GenericModal
|
|
@@ -1562,7 +1562,7 @@ export const RetailerProductEdition = ({
|
|
|
1562
1562
|
images={images}
|
|
1563
1563
|
setShowModal={setShowModal}
|
|
1564
1564
|
sendToFacilitator={sendToFacilitator}
|
|
1565
|
-
approveRejectButtons={approveRejectButtons}
|
|
1565
|
+
approveRejectButtons={approveRejectButtons()}
|
|
1566
1566
|
/>
|
|
1567
1567
|
)}
|
|
1568
1568
|
{message.length > 0 && (
|