contentoh-components-library 21.2.18 → 21.2.21
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/InputFormatter/index.js +3 -3
- package/dist/components/organisms/DashboardMetric/index.js +0 -1
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +173 -108
- package/dist/components/pages/ProviderProductEdition/index.js +54 -41
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +69 -193
- package/dist/components/pages/RetailerProductEdition/index.js +98 -45
- package/package.json +1 -1
- package/src/components/atoms/InputFormatter/index.js +8 -3
- package/src/components/organisms/DashboardMetric/index.js +0 -1
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +183 -117
- package/src/components/pages/ProviderProductEdition/index.js +15 -7
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +69 -489
- package/src/components/pages/RetailerProductEdition/index.js +64 -24
|
@@ -62,7 +62,7 @@ var InputFormatter = function InputFormatter(_ref) {
|
|
|
62
62
|
var maxLength = maxChar ? maxChar : 999;
|
|
63
63
|
|
|
64
64
|
var getValue = function getValue(value) {
|
|
65
|
-
var temp = value.replace(/\n/gm, "<br>").replace(/\&
|
|
65
|
+
var temp = value.replace(/\n/gm, "<br>").replace(/\ /gm, " ").replace(/\&/gm, "&");
|
|
66
66
|
return temp;
|
|
67
67
|
}; //const quillRef = useRef();
|
|
68
68
|
|
|
@@ -74,7 +74,7 @@ var InputFormatter = function InputFormatter(_ref) {
|
|
|
74
74
|
};
|
|
75
75
|
|
|
76
76
|
var valueFormater = function valueFormater(value) {
|
|
77
|
-
return value.replace(/<\/p><p>/gm, "\n").replace(/<\/?br>|<\/?p>/gm, "").replace(/\&
|
|
77
|
+
return value.replace(/<\/p><p>/gm, "\n").replace(/<\/?br>|<\/?p>/gm, "").replace(/\ /gm, " ").replace(/\&/gm, "&");
|
|
78
78
|
};
|
|
79
79
|
|
|
80
80
|
var _onChange = function onChange(valueInput, delta, user, h) {
|
|
@@ -82,7 +82,7 @@ var InputFormatter = function InputFormatter(_ref) {
|
|
|
82
82
|
|
|
83
83
|
try {
|
|
84
84
|
if (h.getLength() - 1 <= maxLength) {
|
|
85
|
-
var unformattedText = valueInput.replace(/<li.*?>/gm, " - ").replace(/<\/li>/gm, "\n").replace(/<\/p><p>/gm, "\n").replaceAll(/<\/?(?!\/?strong).*?>/gm, "").replace(/\&
|
|
85
|
+
var unformattedText = valueInput.replace(/<li.*?>/gm, " - ").replace(/<\/li>/gm, "\n").replace(/<\/p><p>/gm, "\n").replaceAll(/<\/?(?!\/?strong).*?>/gm, "").replace(/\ /gm, " ").replace(/\&/gm, "&");
|
|
86
86
|
setInputValue(valueInput);
|
|
87
87
|
value = unformattedText;
|
|
88
88
|
} else {
|
|
@@ -67,7 +67,6 @@ var DashboardMetric = function DashboardMetric(_ref) {
|
|
|
67
67
|
var diff = today.getDate() - today.getDay();
|
|
68
68
|
var start = new Date(today.setDate(diff));
|
|
69
69
|
var end = new Date();
|
|
70
|
-
console.log(diff, today.getDay() === 0 ? -6 : 1);
|
|
71
70
|
setStartDate(start);
|
|
72
71
|
setEndDate(end);
|
|
73
72
|
}, []);
|
|
@@ -31,96 +31,178 @@ ProviderProductEditionDefault.args = {
|
|
|
31
31
|
"Ficha técnica": true,
|
|
32
32
|
Imágenes: true
|
|
33
33
|
},
|
|
34
|
-
token: "
|
|
34
|
+
token: "eeyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJmNTkyN2Y4ZS1jYmY3LTQ5MjItOWUwOS1lNjllYzBiMjczMWEiLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6ImY1OTI3ZjhlLWNiZjctNDkyMi05ZTA5LWU2OWVjMGIyNzMxYSIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiIwNTE0MWZiOS1lNmM1LTQ0YWUtYTA4OS01MzM4N2IzZmQ2OWMiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY2MjEwNjk3MiwibmFtZSI6IklzbWFlbCBMb3BleiIsInBob25lX251bWJlciI6Iis1MjMxMTEzNjYzMzYiLCJleHAiOjE2NjIxMTA1NzIsImlhdCI6MTY2MjEwNjk3MiwiZW1haWwiOiJpbG9wZXpAY29udGVudG9oLmNvbSJ9.LtlrjlQ19EDcMR5iMoRyQpASYMQ62S9iqhyh0Nf7vTxkOK8FEynOmiQvxIvxWEjtzONHbSXc1mLweFdHOKecVsi6H2qobW-vxlmgBCxpcJ0svLqlsAyOTfN0Acwda2w4BMamfnrETEe6SFHNxIZV0bCKRrHC9dwXbpIhJ0g1-iN54wHxbZ1bCaPJ1KmJZwWtIYRUfUZrOOOYvaN1jvOk1t49uXLFsK1W5HjpdIVaRKampArVSw5GPR1d_BmhD-gb8SGXc3DlOdXNn_5x9pynKp3Yy4BbJlDLz3lGxJU93ZQRnJzQsfQXhYtvlTC0A4nAaF5rucoZedSC0sGeeEmtvw",
|
|
35
35
|
articleId: 238,
|
|
36
36
|
category: 846,
|
|
37
37
|
version: 2,
|
|
38
38
|
productSelected: {
|
|
39
|
-
orderId:
|
|
40
|
-
|
|
41
|
-
datasheet_status: "
|
|
42
|
-
description_status: "AP",
|
|
43
|
-
images_status: "ACA",
|
|
39
|
+
orderId: 125,
|
|
40
|
+
status: "AA",
|
|
41
|
+
datasheet_status: "AA",
|
|
44
42
|
prio: "none",
|
|
45
|
-
version:
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
name: "RACK PARA ROPA DOBLE NEGRO",
|
|
55
|
-
upc: "168462"
|
|
43
|
+
version: 3,
|
|
44
|
+
description_status: "AA",
|
|
45
|
+
images_status: "AA",
|
|
46
|
+
brand: "DESCRIPCION PRUEBA",
|
|
47
|
+
retailerOrder: 0,
|
|
48
|
+
missing: {
|
|
49
|
+
datasheet: null,
|
|
50
|
+
descriptions: null,
|
|
51
|
+
images: null
|
|
56
52
|
},
|
|
57
|
-
retailers: [{
|
|
58
|
-
id: 58,
|
|
59
|
-
name: "The Home Depot Golden"
|
|
60
|
-
}],
|
|
61
53
|
services: {
|
|
62
54
|
datasheets: 1,
|
|
63
55
|
descriptions: 1,
|
|
64
56
|
images: 1
|
|
65
57
|
},
|
|
58
|
+
article: {
|
|
59
|
+
category: "Salud y Belleza|Cosméticos y Accesorios|Cosméticos",
|
|
60
|
+
company_name: "COMPANY DEV",
|
|
61
|
+
country: "México",
|
|
62
|
+
id_category: "682",
|
|
63
|
+
id_datasheet_especialist: 54,
|
|
64
|
+
id_datasheet_facilitator: 52,
|
|
65
|
+
id_description_especialist: 55,
|
|
66
|
+
id_description_facilitator: 52,
|
|
67
|
+
id_images_especialist: 55,
|
|
68
|
+
id_images_facilitator: 53,
|
|
69
|
+
id_order: 125,
|
|
70
|
+
id_article: 76125,
|
|
71
|
+
id_auditor: 30,
|
|
72
|
+
name: "prueba 11",
|
|
73
|
+
timestamp: "2022-07-20T19:20:46.000Z",
|
|
74
|
+
upc: "35646655"
|
|
75
|
+
},
|
|
76
|
+
retailers: [{
|
|
77
|
+
id: 2,
|
|
78
|
+
name: "Walmart Mercancías Generales"
|
|
79
|
+
}, {
|
|
80
|
+
id: 3,
|
|
81
|
+
name: "Sam´s Club"
|
|
82
|
+
}, {
|
|
83
|
+
id: 5,
|
|
84
|
+
name: "Chedraui"
|
|
85
|
+
}],
|
|
66
86
|
statusByRetailer: {
|
|
67
|
-
|
|
68
|
-
datasheet: "
|
|
69
|
-
|
|
70
|
-
|
|
87
|
+
2: {
|
|
88
|
+
datasheet: "AA",
|
|
89
|
+
datasheetTranslations: "AA",
|
|
90
|
+
description: "AA",
|
|
91
|
+
images: "AA"
|
|
92
|
+
},
|
|
93
|
+
3: {
|
|
94
|
+
datasheet: "AA",
|
|
95
|
+
datasheetTranslations: "AA",
|
|
96
|
+
description: "AA",
|
|
97
|
+
images: "AA"
|
|
98
|
+
},
|
|
99
|
+
5: {
|
|
100
|
+
datasheet: "AA",
|
|
101
|
+
datasheetTranslations: "AA",
|
|
102
|
+
description: "AA",
|
|
103
|
+
images: "AA"
|
|
71
104
|
}
|
|
72
105
|
},
|
|
73
|
-
retailersWithService: ["58"],
|
|
74
|
-
id_article: 78773,
|
|
75
106
|
retailersAvailable: [{
|
|
76
|
-
id:
|
|
77
|
-
name: "
|
|
78
|
-
}
|
|
107
|
+
id: 2,
|
|
108
|
+
name: "Walmart Mercancías Generales"
|
|
109
|
+
}, {
|
|
110
|
+
id: 3,
|
|
111
|
+
name: "Sam´s Club"
|
|
112
|
+
}, {
|
|
113
|
+
id: 5,
|
|
114
|
+
name: "Chedraui"
|
|
115
|
+
}],
|
|
116
|
+
categoryName: "Salud y Belleza|Cosméticos y Accesorios|Cosméticos",
|
|
117
|
+
upc: "35646655",
|
|
118
|
+
id_article: 76125,
|
|
119
|
+
id_order: 125
|
|
79
120
|
},
|
|
80
121
|
productToEdit: {
|
|
81
|
-
ArticleId:
|
|
82
|
-
idCategory: "
|
|
122
|
+
ArticleId: 76125,
|
|
123
|
+
idCategory: "682",
|
|
83
124
|
product: {
|
|
84
|
-
orderId:
|
|
85
|
-
|
|
86
|
-
datasheet_status: "
|
|
87
|
-
description_status: "AP",
|
|
88
|
-
images_status: "ACA",
|
|
125
|
+
orderId: 125,
|
|
126
|
+
status: "AA",
|
|
127
|
+
datasheet_status: "AA",
|
|
89
128
|
prio: "none",
|
|
90
|
-
version:
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
name: "RACK PARA ROPA DOBLE NEGRO",
|
|
100
|
-
upc: "168462"
|
|
129
|
+
version: 3,
|
|
130
|
+
description_status: "AA",
|
|
131
|
+
images_status: "AA",
|
|
132
|
+
brand: "DESCRIPCION PRUEBA",
|
|
133
|
+
retailerOrder: 0,
|
|
134
|
+
missing: {
|
|
135
|
+
datasheet: null,
|
|
136
|
+
descriptions: null,
|
|
137
|
+
images: null
|
|
101
138
|
},
|
|
102
|
-
retailers: [{
|
|
103
|
-
id: 58,
|
|
104
|
-
name: "The Home Depot Golden"
|
|
105
|
-
}],
|
|
106
139
|
services: {
|
|
107
140
|
datasheets: 1,
|
|
108
141
|
descriptions: 1,
|
|
109
142
|
images: 1
|
|
110
143
|
},
|
|
144
|
+
article: {
|
|
145
|
+
category: "Salud y Belleza|Cosméticos y Accesorios|Cosméticos",
|
|
146
|
+
company_name: "COMPANY DEV",
|
|
147
|
+
country: "México",
|
|
148
|
+
id_category: "682",
|
|
149
|
+
id_datasheet_especialist: 54,
|
|
150
|
+
id_datasheet_facilitator: 52,
|
|
151
|
+
id_description_especialist: 55,
|
|
152
|
+
id_description_facilitator: 52,
|
|
153
|
+
id_images_especialist: 55,
|
|
154
|
+
id_images_facilitator: 53,
|
|
155
|
+
id_order: 125,
|
|
156
|
+
id_article: 76125,
|
|
157
|
+
id_auditor: 30,
|
|
158
|
+
name: "prueba 11",
|
|
159
|
+
timestamp: "2022-07-20T19:20:46.000Z",
|
|
160
|
+
upc: "35646655"
|
|
161
|
+
},
|
|
162
|
+
retailers: [{
|
|
163
|
+
id: 2,
|
|
164
|
+
name: "Walmart Mercancías Generales"
|
|
165
|
+
}, {
|
|
166
|
+
id: 3,
|
|
167
|
+
name: "Sam´s Club"
|
|
168
|
+
}, {
|
|
169
|
+
id: 5,
|
|
170
|
+
name: "Chedraui"
|
|
171
|
+
}],
|
|
111
172
|
statusByRetailer: {
|
|
112
|
-
|
|
113
|
-
datasheet: "
|
|
114
|
-
|
|
115
|
-
|
|
173
|
+
2: {
|
|
174
|
+
datasheet: "AA",
|
|
175
|
+
datasheetTranslations: "AA",
|
|
176
|
+
description: "AA",
|
|
177
|
+
images: "AA"
|
|
178
|
+
},
|
|
179
|
+
3: {
|
|
180
|
+
datasheet: "AA",
|
|
181
|
+
datasheetTranslations: "AA",
|
|
182
|
+
description: "AA",
|
|
183
|
+
images: "AA"
|
|
184
|
+
},
|
|
185
|
+
5: {
|
|
186
|
+
datasheet: "AA",
|
|
187
|
+
datasheetTranslations: "AA",
|
|
188
|
+
description: "AA",
|
|
189
|
+
images: "AA"
|
|
116
190
|
}
|
|
117
191
|
},
|
|
118
|
-
retailersWithService: ["58"],
|
|
119
|
-
id_article: 78773,
|
|
120
192
|
retailersAvailable: [{
|
|
121
|
-
id:
|
|
122
|
-
name: "
|
|
123
|
-
}
|
|
193
|
+
id: 2,
|
|
194
|
+
name: "Walmart Mercancías Generales"
|
|
195
|
+
}, {
|
|
196
|
+
id: 3,
|
|
197
|
+
name: "Sam´s Club"
|
|
198
|
+
}, {
|
|
199
|
+
id: 5,
|
|
200
|
+
name: "Chedraui"
|
|
201
|
+
}],
|
|
202
|
+
categoryName: "Salud y Belleza|Cosméticos y Accesorios|Cosméticos",
|
|
203
|
+
upc: "35646655",
|
|
204
|
+
id_article: 76125,
|
|
205
|
+
id_order: 125
|
|
124
206
|
}
|
|
125
207
|
},
|
|
126
208
|
location: {
|
|
@@ -129,67 +211,50 @@ ProviderProductEditionDefault.args = {
|
|
|
129
211
|
}
|
|
130
212
|
},
|
|
131
213
|
user: {
|
|
132
|
-
id_user:
|
|
133
|
-
name: "
|
|
134
|
-
last_name: "
|
|
135
|
-
email: "
|
|
136
|
-
position: "
|
|
137
|
-
telephone: "+
|
|
214
|
+
id_user: 28,
|
|
215
|
+
name: "Proveedor",
|
|
216
|
+
last_name: "Colgate",
|
|
217
|
+
email: "ilopez@contentoh.com",
|
|
218
|
+
position: "Prueba Admin",
|
|
219
|
+
telephone: "+523111366336",
|
|
138
220
|
country: "México",
|
|
139
|
-
id_company:
|
|
140
|
-
id_cognito: "
|
|
221
|
+
id_company: 1,
|
|
222
|
+
id_cognito: "f5927f8e-cbf7-4922-9e09-e69ec0b2731a",
|
|
141
223
|
birth_Date: null,
|
|
142
224
|
about_me: null,
|
|
143
225
|
zip_code: null,
|
|
144
226
|
address: null,
|
|
145
227
|
job: null,
|
|
146
|
-
id_stripe:
|
|
228
|
+
id_stripe: "cus_KuEt6R6vwmN09f",
|
|
147
229
|
id_role: 0,
|
|
148
230
|
active: 1,
|
|
149
|
-
is_retailer:
|
|
231
|
+
is_retailer: 0,
|
|
150
232
|
email_notify: 1,
|
|
151
233
|
membership: {
|
|
152
|
-
id:
|
|
153
|
-
start_date: "2022-
|
|
154
|
-
end_date: "2023-
|
|
155
|
-
planID:
|
|
156
|
-
plan: "
|
|
157
|
-
name: "Plan
|
|
158
|
-
user_limit: "
|
|
159
|
-
products_limit: "
|
|
234
|
+
id: 76,
|
|
235
|
+
start_date: "2022-01-18T17:25:35.000Z",
|
|
236
|
+
end_date: "2023-01-18T17:25:35.000Z",
|
|
237
|
+
planID: 8,
|
|
238
|
+
plan: "prod_KtlhECVSFG2iro",
|
|
239
|
+
name: "Plan Pro",
|
|
240
|
+
user_limit: "20",
|
|
241
|
+
products_limit: "5000",
|
|
160
242
|
type: "Enterprise"
|
|
161
243
|
},
|
|
162
|
-
src: "https://content-management-profile
|
|
244
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-28/28.png?1662106973155"
|
|
163
245
|
},
|
|
164
246
|
company: {
|
|
165
|
-
id_company:
|
|
166
|
-
trade_name: "
|
|
167
|
-
company_name: "
|
|
168
|
-
rfc:
|
|
169
|
-
adress: "
|
|
170
|
-
about_company:
|
|
171
|
-
telephone:
|
|
172
|
-
web_site:
|
|
173
|
-
zip_code:
|
|
247
|
+
id_company: 1,
|
|
248
|
+
trade_name: "COMPANY DEV",
|
|
249
|
+
company_name: "COMPANY DEV",
|
|
250
|
+
rfc: null,
|
|
251
|
+
adress: "",
|
|
252
|
+
about_company: "...",
|
|
253
|
+
telephone: "",
|
|
254
|
+
web_site: "",
|
|
255
|
+
zip_code: "",
|
|
174
256
|
email: null,
|
|
175
|
-
social_link:
|
|
176
|
-
is_retailer:
|
|
177
|
-
retailers: [{
|
|
178
|
-
id: 58,
|
|
179
|
-
name: "The Home Depot Golden",
|
|
180
|
-
country: "México"
|
|
181
|
-
}, {
|
|
182
|
-
id: 59,
|
|
183
|
-
name: "The Home Depot Platinum",
|
|
184
|
-
country: "México"
|
|
185
|
-
}, {
|
|
186
|
-
id: 60,
|
|
187
|
-
name: "The Home Depot Resizing",
|
|
188
|
-
country: "México"
|
|
189
|
-
}, {
|
|
190
|
-
id: 61,
|
|
191
|
-
name: "Home Depot TAB",
|
|
192
|
-
country: "México"
|
|
193
|
-
}]
|
|
257
|
+
social_link: "",
|
|
258
|
+
is_retailer: 0
|
|
194
259
|
}
|
|
195
260
|
};
|
|
@@ -453,38 +453,43 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
453
453
|
loading = _useState60[0],
|
|
454
454
|
setLoading = _useState60[1];
|
|
455
455
|
|
|
456
|
+
var _useState61 = (0, _react.useState)(false),
|
|
457
|
+
_useState62 = (0, _slicedToArray2.default)(_useState61, 2),
|
|
458
|
+
validatedAll = _useState62[0],
|
|
459
|
+
setValidatedAll = _useState62[1];
|
|
460
|
+
|
|
456
461
|
var originProp = location === null || location === void 0 ? void 0 : (_location$state = location.state) === null || _location$state === void 0 ? void 0 : _location$state.origin;
|
|
457
462
|
|
|
458
|
-
var
|
|
463
|
+
var _useState63 = (0, _react.useState)({
|
|
459
464
|
"Ficha técnica": originProp,
|
|
460
465
|
Descripción: originProp,
|
|
461
466
|
Imágenes: originProp
|
|
462
467
|
}),
|
|
463
|
-
_useState62 = (0, _slicedToArray2.default)(_useState61, 2),
|
|
464
|
-
origin = _useState62[0],
|
|
465
|
-
setOrigin = _useState62[1];
|
|
466
|
-
|
|
467
|
-
var _useState63 = (0, _react.useState)(false),
|
|
468
468
|
_useState64 = (0, _slicedToArray2.default)(_useState63, 2),
|
|
469
|
-
|
|
470
|
-
|
|
469
|
+
origin = _useState64[0],
|
|
470
|
+
setOrigin = _useState64[1];
|
|
471
471
|
|
|
472
472
|
var _useState65 = (0, _react.useState)(false),
|
|
473
473
|
_useState66 = (0, _slicedToArray2.default)(_useState65, 2),
|
|
474
|
-
|
|
475
|
-
|
|
474
|
+
inCart = _useState66[0],
|
|
475
|
+
setInCart = _useState66[1];
|
|
476
476
|
|
|
477
477
|
var _useState67 = (0, _react.useState)(false),
|
|
478
478
|
_useState68 = (0, _slicedToArray2.default)(_useState67, 2),
|
|
479
|
-
|
|
480
|
-
|
|
479
|
+
modalSent = _useState68[0],
|
|
480
|
+
setModalSent = _useState68[1];
|
|
481
481
|
|
|
482
482
|
var _useState69 = (0, _react.useState)(false),
|
|
483
483
|
_useState70 = (0, _slicedToArray2.default)(_useState69, 2),
|
|
484
|
-
|
|
485
|
-
|
|
484
|
+
modalViewError = _useState70[0],
|
|
485
|
+
setModalViewError = _useState70[1];
|
|
486
|
+
|
|
487
|
+
var _useState71 = (0, _react.useState)(false),
|
|
488
|
+
_useState72 = (0, _slicedToArray2.default)(_useState71, 2),
|
|
489
|
+
showGenericModal = _useState72[0],
|
|
490
|
+
setShowGenericModal = _useState72[1];
|
|
486
491
|
|
|
487
|
-
var
|
|
492
|
+
var _useState73 = (0, _react.useState)({
|
|
488
493
|
message: "¿Estás seguro de continuar?",
|
|
489
494
|
detail: " ".concat(user.is_retailer ? "Asegurate de haber revisado las tres secciones" : "Envíar el producto a la cadena"),
|
|
490
495
|
button1: {
|
|
@@ -501,34 +506,34 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
501
506
|
},
|
|
502
507
|
img: _defaultProfileImage.default
|
|
503
508
|
}),
|
|
504
|
-
_useState72 = (0, _slicedToArray2.default)(_useState71, 2),
|
|
505
|
-
dataGenericModal = _useState72[0],
|
|
506
|
-
setDataGenericModal = _useState72[1];
|
|
507
|
-
|
|
508
|
-
var _useState73 = (0, _react.useState)(false),
|
|
509
509
|
_useState74 = (0, _slicedToArray2.default)(_useState73, 2),
|
|
510
|
-
|
|
511
|
-
|
|
510
|
+
dataGenericModal = _useState74[0],
|
|
511
|
+
setDataGenericModal = _useState74[1];
|
|
512
512
|
|
|
513
|
-
var _useState75 = (0, _react.useState)(
|
|
513
|
+
var _useState75 = (0, _react.useState)(false),
|
|
514
514
|
_useState76 = (0, _slicedToArray2.default)(_useState75, 2),
|
|
515
|
-
|
|
516
|
-
|
|
515
|
+
modalViewTextArea = _useState76[0],
|
|
516
|
+
setModalViewTextArea = _useState76[1];
|
|
517
517
|
|
|
518
|
-
var _useState77 = (0, _react.useState)(
|
|
518
|
+
var _useState77 = (0, _react.useState)(null),
|
|
519
519
|
_useState78 = (0, _slicedToArray2.default)(_useState77, 2),
|
|
520
|
-
|
|
521
|
-
|
|
520
|
+
socketType = _useState78[0],
|
|
521
|
+
setSocketType = _useState78[1];
|
|
522
522
|
|
|
523
|
-
var _useState79 = (0, _react.useState)(
|
|
523
|
+
var _useState79 = (0, _react.useState)(loading),
|
|
524
524
|
_useState80 = (0, _slicedToArray2.default)(_useState79, 2),
|
|
525
|
-
|
|
526
|
-
|
|
525
|
+
saving = _useState80[0],
|
|
526
|
+
setSaving = _useState80[1];
|
|
527
527
|
|
|
528
|
-
var _useState81 = (0, _react.useState)(
|
|
528
|
+
var _useState81 = (0, _react.useState)(product.statusByRetailer),
|
|
529
529
|
_useState82 = (0, _slicedToArray2.default)(_useState81, 2),
|
|
530
|
-
|
|
531
|
-
|
|
530
|
+
retailerStatus = _useState82[0],
|
|
531
|
+
setRetailerStatus = _useState82[1];
|
|
532
|
+
|
|
533
|
+
var _useState83 = (0, _react.useState)(false),
|
|
534
|
+
_useState84 = (0, _slicedToArray2.default)(_useState83, 2),
|
|
535
|
+
showCreateVersion = _useState84[0],
|
|
536
|
+
setShowCreateVersion = _useState84[1];
|
|
532
537
|
|
|
533
538
|
var _useCloseModal = (0, _customHooks.useCloseModal)("version-selector"),
|
|
534
539
|
_useCloseModal2 = (0, _slicedToArray2.default)(_useCloseModal, 2),
|
|
@@ -1767,7 +1772,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1767
1772
|
return;
|
|
1768
1773
|
} else if (user.is_retailer) {
|
|
1769
1774
|
if (product.id_order || product.orderId) {
|
|
1770
|
-
|
|
1775
|
+
setValidatedAll(true);
|
|
1771
1776
|
setModalViewError(true);
|
|
1772
1777
|
} else {
|
|
1773
1778
|
setDataGenericModal(function (prev) {
|
|
@@ -1783,7 +1788,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1783
1788
|
setShowGenericModal(true);
|
|
1784
1789
|
}
|
|
1785
1790
|
} else {
|
|
1786
|
-
|
|
1791
|
+
setValidatedAll(true);
|
|
1787
1792
|
setModalViewError(true);
|
|
1788
1793
|
}
|
|
1789
1794
|
},
|
|
@@ -1825,7 +1830,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1825
1830
|
return;
|
|
1826
1831
|
} else if (user.is_retailer) {
|
|
1827
1832
|
if (product.id_order || product.orderId) {
|
|
1828
|
-
|
|
1833
|
+
setValidatedAll(false);
|
|
1829
1834
|
setModalViewError(true);
|
|
1830
1835
|
} else {
|
|
1831
1836
|
setDataGenericModal(function (prev) {
|
|
@@ -1841,7 +1846,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1841
1846
|
setShowGenericModal(true);
|
|
1842
1847
|
}
|
|
1843
1848
|
} else {
|
|
1844
|
-
|
|
1849
|
+
setValidatedAll(false);
|
|
1845
1850
|
setModalViewError(true);
|
|
1846
1851
|
}
|
|
1847
1852
|
}
|
|
@@ -2035,9 +2040,17 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
2035
2040
|
button1: {
|
|
2036
2041
|
name: "Enviar",
|
|
2037
2042
|
action: function action(e) {
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2043
|
+
var textArea = document.querySelector("#area");
|
|
2044
|
+
|
|
2045
|
+
if (textArea.value) {
|
|
2046
|
+
textArea.style.border = "none";
|
|
2047
|
+
createComment(e, textArea.value);
|
|
2048
|
+
setModalViewError(false);
|
|
2049
|
+
setModalViewTextArea(true);
|
|
2050
|
+
validatedAll ? validateAll("R") : sendEvaluation("R");
|
|
2051
|
+
} else {
|
|
2052
|
+
textArea.style.border = "2px solid red";
|
|
2053
|
+
}
|
|
2041
2054
|
}
|
|
2042
2055
|
},
|
|
2043
2056
|
img: _errorModal.default,
|