contentoh-components-library 21.0.96 → 21.0.99
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/AsignationOption/index.js +21 -2
- package/dist/components/atoms/AsignationOption/styles.js +1 -1
- package/dist/components/atoms/StatusTag/styles.js +1 -1
- package/dist/components/molecules/RetailerSelector/index.js +5 -2
- package/dist/components/molecules/StatusAsignationInfo/index.js +1 -1
- package/dist/components/organisms/FullProductNameHeader/index.js +29 -2
- package/dist/components/pages/ProviderProductEdition/index.js +74 -43
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +44 -32
- package/dist/components/pages/RetailerProductEdition/index.js +82 -44
- package/dist/global-files/data.js +2 -0
- package/package.json +1 -1
- package/src/components/atoms/AsignationOption/index.js +15 -0
- package/src/components/atoms/AsignationOption/styles.js +6 -0
- package/src/components/atoms/StatusTag/styles.js +2 -1
- package/src/components/molecules/RetailerSelector/index.js +3 -0
- package/src/components/molecules/StatusAsignationInfo/index.js +8 -6
- package/src/components/organisms/FullProductNameHeader/index.js +24 -2
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +130 -62
- package/src/components/pages/ProviderProductEdition/index.js +58 -33
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +31 -31
- package/src/components/pages/RetailerProductEdition/index.js +71 -21
- package/src/global-files/data.js +2 -0
|
@@ -16,102 +16,170 @@ ProviderProductEditionDefault.args = {
|
|
|
16
16
|
Imágenes: false,
|
|
17
17
|
},
|
|
18
18
|
token:
|
|
19
|
-
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
19
|
+
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOi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GLxa7HfQXNUs0ds7Ifkx4QYHggUQdkrNdmGeYGxqZFYgG5a4LWZ-17E6x5yL87LhH-oErepE6xe6oyy-DnHaf7rWnRPqxSuilW5lQ",
|
|
20
20
|
articleId: 238,
|
|
21
21
|
category: 846,
|
|
22
22
|
version: 2,
|
|
23
23
|
productSelected: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
categoryName: "ILUMINACIÓN|FOCOS|LEDS",
|
|
31
|
-
asignations: [],
|
|
24
|
+
orderId: 14,
|
|
25
|
+
article_status: "AP",
|
|
26
|
+
datasheet_status: "AC",
|
|
27
|
+
description_status: "AC",
|
|
28
|
+
images_status: "AP",
|
|
29
|
+
prio: "none",
|
|
32
30
|
version: 2,
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
brand: null,
|
|
32
|
+
article: {
|
|
33
|
+
category: "ILUMINACIÓN|FOCOS|LEDS",
|
|
34
|
+
company_name: "COMPANY DEV",
|
|
35
|
+
country: "México",
|
|
36
|
+
id_category: "2146",
|
|
37
|
+
id_article: 35705,
|
|
38
|
+
name: "FOCO LED A19 (60W) LUZ AMARILLA",
|
|
39
|
+
upc: "12087311111",
|
|
40
|
+
},
|
|
41
|
+
retailers: [
|
|
35
42
|
{
|
|
36
43
|
id: 58,
|
|
37
44
|
name: "The Home Depot Golden",
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: 59,
|
|
48
|
+
name: "The Home Depot Platinum",
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: 60,
|
|
52
|
+
name: "The Home Depot Resizing",
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
id: 61,
|
|
56
|
+
name: "Home Depot TAB",
|
|
41
57
|
},
|
|
42
58
|
],
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
59
|
+
services: {
|
|
60
|
+
datasheets: 1,
|
|
61
|
+
descriptions: 1,
|
|
62
|
+
images: 1,
|
|
47
63
|
},
|
|
64
|
+
id_article: 35705,
|
|
65
|
+
retailersAvailable: [
|
|
66
|
+
{
|
|
67
|
+
id: 58,
|
|
68
|
+
name: "The Home Depot Golden",
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: 59,
|
|
72
|
+
name: "The Home Depot Platinum",
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: 60,
|
|
76
|
+
name: "The Home Depot Resizing",
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
id: 61,
|
|
80
|
+
name: "Home Depot TAB",
|
|
81
|
+
},
|
|
82
|
+
],
|
|
48
83
|
},
|
|
49
84
|
productToEdit: {
|
|
85
|
+
ArticleId: 35705,
|
|
50
86
|
idCategory: "2146",
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
87
|
+
product: {
|
|
88
|
+
orderId: 14,
|
|
89
|
+
article_status: "AP",
|
|
90
|
+
datasheet_status: "AC",
|
|
91
|
+
description_status: "AC",
|
|
92
|
+
images_status: "AP",
|
|
93
|
+
prio: "none",
|
|
94
|
+
version: 2,
|
|
95
|
+
brand: null,
|
|
96
|
+
article: {
|
|
97
|
+
category: "ILUMINACIÓN|FOCOS|LEDS",
|
|
98
|
+
company_name: "COMPANY DEV",
|
|
99
|
+
country: "México",
|
|
55
100
|
id_category: "2146",
|
|
101
|
+
id_article: 35705,
|
|
56
102
|
name: "FOCO LED A19 (60W) LUZ AMARILLA",
|
|
57
|
-
upc: "
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
name: "The Home Depot Golden",
|
|
68
|
-
country: "México",
|
|
69
|
-
id_region: 1,
|
|
70
|
-
active: 1,
|
|
71
|
-
},
|
|
72
|
-
],
|
|
73
|
-
missing: {
|
|
74
|
-
datasheet: 33,
|
|
75
|
-
description: 0,
|
|
76
|
-
image: 23,
|
|
103
|
+
upc: "12087311111",
|
|
104
|
+
},
|
|
105
|
+
retailers: [
|
|
106
|
+
{
|
|
107
|
+
id: 58,
|
|
108
|
+
name: "The Home Depot Golden",
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
id: 59,
|
|
112
|
+
name: "The Home Depot Platinum",
|
|
77
113
|
},
|
|
114
|
+
{
|
|
115
|
+
id: 60,
|
|
116
|
+
name: "The Home Depot Resizing",
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
id: 61,
|
|
120
|
+
name: "Home Depot TAB",
|
|
121
|
+
},
|
|
122
|
+
],
|
|
123
|
+
services: {
|
|
124
|
+
datasheets: 1,
|
|
125
|
+
descriptions: 1,
|
|
126
|
+
images: 1,
|
|
78
127
|
},
|
|
79
|
-
|
|
128
|
+
id_article: 35705,
|
|
129
|
+
retailersAvailable: [
|
|
130
|
+
{
|
|
131
|
+
id: 58,
|
|
132
|
+
name: "The Home Depot Golden",
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
id: 59,
|
|
136
|
+
name: "The Home Depot Platinum",
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
id: 60,
|
|
140
|
+
name: "The Home Depot Resizing",
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
id: 61,
|
|
144
|
+
name: "Home Depot TAB",
|
|
145
|
+
},
|
|
146
|
+
],
|
|
147
|
+
},
|
|
80
148
|
},
|
|
81
149
|
location: {
|
|
82
150
|
product: { articleId: 109485, versionId: 3 },
|
|
83
|
-
state: { origin: "
|
|
151
|
+
state: { origin: "Contentoh" },
|
|
84
152
|
},
|
|
85
153
|
user: {
|
|
86
|
-
id_user:
|
|
87
|
-
name: "
|
|
88
|
-
last_name: "
|
|
89
|
-
email: "
|
|
90
|
-
position: "
|
|
154
|
+
id_user: 59,
|
|
155
|
+
name: "The Home",
|
|
156
|
+
last_name: "Depot",
|
|
157
|
+
email: "cadena.ismael@allfreemail.net",
|
|
158
|
+
position: "Admin",
|
|
91
159
|
telephone: "+523111366336",
|
|
92
160
|
country: "México",
|
|
93
|
-
id_company:
|
|
94
|
-
id_cognito: "
|
|
161
|
+
id_company: 7,
|
|
162
|
+
id_cognito: "5884ae34-59d6-4454-b98e-821518bcc3a7",
|
|
95
163
|
birth_Date: null,
|
|
96
164
|
about_me: null,
|
|
97
165
|
zip_code: null,
|
|
98
166
|
address: null,
|
|
99
167
|
job: null,
|
|
100
|
-
id_stripe: "
|
|
168
|
+
id_stripe: "",
|
|
101
169
|
id_role: 0,
|
|
102
170
|
active: 1,
|
|
103
|
-
is_retailer:
|
|
171
|
+
is_retailer: 1,
|
|
104
172
|
membership: {
|
|
105
|
-
id:
|
|
106
|
-
start_date: "
|
|
107
|
-
end_date: "
|
|
108
|
-
planID:
|
|
109
|
-
plan: "
|
|
110
|
-
name: "Plan
|
|
111
|
-
user_limit: "
|
|
112
|
-
products_limit: "
|
|
173
|
+
id: 24,
|
|
174
|
+
start_date: "2021-11-23T03:35:50.000Z",
|
|
175
|
+
end_date: "2022-11-23T03:35:50.000Z",
|
|
176
|
+
planID: 9,
|
|
177
|
+
plan: "prod_KtlkzZVGq6bRTO",
|
|
178
|
+
name: "Plan Enterprise Full",
|
|
179
|
+
user_limit: "30",
|
|
180
|
+
products_limit: "10000",
|
|
113
181
|
type: "Enterprise",
|
|
114
182
|
},
|
|
115
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
183
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-59/59.png?1655492937526",
|
|
116
184
|
},
|
|
117
185
|
};
|
|
@@ -48,6 +48,11 @@ const reducerImages = (state, action) => {
|
|
|
48
48
|
case "changeAttrValue":
|
|
49
49
|
attrForImgs[action.retailer][action.index].value = action.value;
|
|
50
50
|
return { ...state, attrForImgs, values };
|
|
51
|
+
case "deleteImage":
|
|
52
|
+
values = values.filter(
|
|
53
|
+
(value) => action.selectedImages.indexOf(value) === -1
|
|
54
|
+
);
|
|
55
|
+
return { ...state, values };
|
|
51
56
|
default:
|
|
52
57
|
return state;
|
|
53
58
|
}
|
|
@@ -195,6 +200,7 @@ export const ProviderProductEdition = ({
|
|
|
195
200
|
});
|
|
196
201
|
const [modalViewTextArea, setModalViewTextArea] = useState(false);
|
|
197
202
|
const [socketType, setSocketType] = useState(null);
|
|
203
|
+
const [saving, setSaving] = useState(loading);
|
|
198
204
|
|
|
199
205
|
useEffect(() => {
|
|
200
206
|
checkAll && setSelectedImages(images.values);
|
|
@@ -209,18 +215,15 @@ export const ProviderProductEdition = ({
|
|
|
209
215
|
|
|
210
216
|
//Converts the data inside the datasheets object to array
|
|
211
217
|
setServices(services);
|
|
218
|
+
getServices();
|
|
212
219
|
|
|
213
220
|
//setActiveRetailer(product?.retailers[0]);
|
|
214
221
|
setImages({
|
|
215
222
|
action: "init",
|
|
216
|
-
init:
|
|
223
|
+
init: services[2],
|
|
217
224
|
});
|
|
218
225
|
if (services[2]?.values?.length > 0) setActiveImage(0);
|
|
219
226
|
|
|
220
|
-
setActiveRetailer(
|
|
221
|
-
product.retailers ? product.retailers[0] : product.retailersAvailable[0]
|
|
222
|
-
);
|
|
223
|
-
|
|
224
227
|
getPercentage({ data: [product] }).then((res) => setPercentages(res));
|
|
225
228
|
setLoading(false);
|
|
226
229
|
};
|
|
@@ -295,11 +298,13 @@ export const ProviderProductEdition = ({
|
|
|
295
298
|
|
|
296
299
|
useEffect(async () => {
|
|
297
300
|
loadData();
|
|
301
|
+
setActiveRetailer(
|
|
302
|
+
product.retailers ? product.retailers[0] : product.retailersAvailable[0]
|
|
303
|
+
);
|
|
298
304
|
// getPercentage({ data: [product] }).then((res) =>
|
|
299
305
|
// setPercentages(res)
|
|
300
306
|
// );
|
|
301
307
|
getCart();
|
|
302
|
-
getServices();
|
|
303
308
|
setUserGroups(await fetchUsers(token));
|
|
304
309
|
let arr = [];
|
|
305
310
|
switch (user.id_role) {
|
|
@@ -500,6 +505,7 @@ export const ProviderProductEdition = ({
|
|
|
500
505
|
});
|
|
501
506
|
}
|
|
502
507
|
if (valid && duplicated?.length === 0) {
|
|
508
|
+
setLoading(true);
|
|
503
509
|
try {
|
|
504
510
|
data?.articleData?.forEach((e) => {
|
|
505
511
|
e.uuid = uuidv4();
|
|
@@ -541,7 +547,6 @@ export const ProviderProductEdition = ({
|
|
|
541
547
|
|
|
542
548
|
useEffect(async () => {
|
|
543
549
|
if (imagesUploaded) {
|
|
544
|
-
setLoading(true);
|
|
545
550
|
dataImages.articleData = dataImages?.articleData.map((e) => {
|
|
546
551
|
delete e.src;
|
|
547
552
|
e.imageID = e.image_id;
|
|
@@ -858,7 +863,21 @@ export const ProviderProductEdition = ({
|
|
|
858
863
|
});
|
|
859
864
|
|
|
860
865
|
objetcTemp["Descripción"] = desInputsRequired;
|
|
861
|
-
const
|
|
866
|
+
const retailersRequested = [];
|
|
867
|
+
services[2]?.retailerMandatories?.forEach((retMan) =>
|
|
868
|
+
retMan.forEach((rm) => retailersRequested.push(rm))
|
|
869
|
+
);
|
|
870
|
+
const requiredImages = services[2]?.inputs?.filter(
|
|
871
|
+
(e) =>
|
|
872
|
+
e.required === 1 &&
|
|
873
|
+
retailersRequested.filter(
|
|
874
|
+
(ret) =>
|
|
875
|
+
ret.id_image === e.id &&
|
|
876
|
+
servicesData.filter((srv) => srv.id_retailer === ret.id_retailer)
|
|
877
|
+
.length > 0
|
|
878
|
+
).length > 0
|
|
879
|
+
);
|
|
880
|
+
|
|
862
881
|
let requiredCounter = 0;
|
|
863
882
|
requiredImages?.forEach(
|
|
864
883
|
(req) =>
|
|
@@ -955,7 +974,6 @@ export const ProviderProductEdition = ({
|
|
|
955
974
|
|
|
956
975
|
const deleteImages = () => {
|
|
957
976
|
setLoading(true);
|
|
958
|
-
const imagesTemp = images;
|
|
959
977
|
const { values } = images;
|
|
960
978
|
const imgsInBack = [];
|
|
961
979
|
|
|
@@ -967,12 +985,10 @@ export const ProviderProductEdition = ({
|
|
|
967
985
|
(value) => selectedImages.indexOf(value) === -1
|
|
968
986
|
);
|
|
969
987
|
|
|
970
|
-
imagesTemp.values = imgsLeft;
|
|
971
|
-
|
|
972
988
|
if (imgsInBack.length > 0) {
|
|
973
989
|
const data = {
|
|
974
|
-
articleId: product
|
|
975
|
-
deleteImages:
|
|
990
|
+
articleId: product?.id_article || product?.article?.id_article,
|
|
991
|
+
deleteImages: imgsInBack,
|
|
976
992
|
};
|
|
977
993
|
try {
|
|
978
994
|
axios.put(
|
|
@@ -986,8 +1002,16 @@ export const ProviderProductEdition = ({
|
|
|
986
1002
|
console.log(err);
|
|
987
1003
|
}
|
|
988
1004
|
}
|
|
989
|
-
|
|
990
|
-
|
|
1005
|
+
|
|
1006
|
+
setImages({
|
|
1007
|
+
action: "deleteImage",
|
|
1008
|
+
selectedImages,
|
|
1009
|
+
});
|
|
1010
|
+
|
|
1011
|
+
setTimeout(() => {
|
|
1012
|
+
setLoading(false);
|
|
1013
|
+
}, 500);
|
|
1014
|
+
|
|
991
1015
|
setMessage("");
|
|
992
1016
|
setComponentsArray([]);
|
|
993
1017
|
};
|
|
@@ -1150,6 +1174,7 @@ export const ProviderProductEdition = ({
|
|
|
1150
1174
|
sessionStorage.setItem("productEdit", JSON.stringify(prod));
|
|
1151
1175
|
setProduct(prod);
|
|
1152
1176
|
setShowGenericModal && setShowGenericModal(false);
|
|
1177
|
+
loadData();
|
|
1153
1178
|
};
|
|
1154
1179
|
|
|
1155
1180
|
const getSectionStatus = () => {
|
|
@@ -1166,6 +1191,10 @@ export const ProviderProductEdition = ({
|
|
|
1166
1191
|
return true;
|
|
1167
1192
|
};
|
|
1168
1193
|
|
|
1194
|
+
useEffect(() => {
|
|
1195
|
+
setSaving(loading);
|
|
1196
|
+
}, [loading]);
|
|
1197
|
+
|
|
1169
1198
|
return (
|
|
1170
1199
|
<Container headerTop={headerTop}>
|
|
1171
1200
|
<HeaderTop setHeaderTop={setHeaderTop} />
|
|
@@ -1278,13 +1307,13 @@ export const ProviderProductEdition = ({
|
|
|
1278
1307
|
onClickSave={() => {
|
|
1279
1308
|
switch (activeTab) {
|
|
1280
1309
|
case "Descripción":
|
|
1281
|
-
saveDescriptions();
|
|
1310
|
+
!saving && saveDescriptions();
|
|
1282
1311
|
break;
|
|
1283
1312
|
case "Ficha técnica":
|
|
1284
|
-
saveDatasheets();
|
|
1313
|
+
!saving && saveDatasheets();
|
|
1285
1314
|
break;
|
|
1286
1315
|
case "Imágenes":
|
|
1287
|
-
updateImages();
|
|
1316
|
+
!saving && updateImages();
|
|
1288
1317
|
break;
|
|
1289
1318
|
default:
|
|
1290
1319
|
break;
|
|
@@ -1301,15 +1330,13 @@ export const ProviderProductEdition = ({
|
|
|
1301
1330
|
<Loading />
|
|
1302
1331
|
) : (
|
|
1303
1332
|
<>
|
|
1304
|
-
{!imageLayout &&
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
/>
|
|
1312
|
-
)}
|
|
1333
|
+
{!imageLayout && activeTab === "Imágenes" && (
|
|
1334
|
+
<GalleryHeader
|
|
1335
|
+
setSelectedImages={setSelectedImages}
|
|
1336
|
+
checkAll={checkAll}
|
|
1337
|
+
setCheckAll={setCheckAll}
|
|
1338
|
+
/>
|
|
1339
|
+
)}
|
|
1313
1340
|
{activeTab === "Ficha técnica" &&
|
|
1314
1341
|
(product?.datasheet_status !== "NS" ? (
|
|
1315
1342
|
datasheets[0]?.data?.map((dataGroup, index) => (
|
|
@@ -1420,9 +1447,7 @@ export const ProviderProductEdition = ({
|
|
|
1420
1447
|
onClick={() => {
|
|
1421
1448
|
//setModalSent(true);
|
|
1422
1449
|
sendEvaluation();
|
|
1423
|
-
setMessage(
|
|
1424
|
-
`¡Evaluación de ${translateConcept()} completada!`
|
|
1425
|
-
);
|
|
1450
|
+
setMessage(`¡Evaluación de ${activeTab} completada!`);
|
|
1426
1451
|
}}
|
|
1427
1452
|
/>
|
|
1428
1453
|
</div>
|
|
@@ -1437,10 +1462,10 @@ export const ProviderProductEdition = ({
|
|
|
1437
1462
|
</div>
|
|
1438
1463
|
{inCart ? (
|
|
1439
1464
|
<button type="button">
|
|
1440
|
-
<Link to="/checkout">
|
|
1465
|
+
{/* <Link to="/checkout">
|
|
1441
1466
|
<p>Articulo en carrito</p>
|
|
1442
1467
|
<p>Ir a checkout</p>
|
|
1443
|
-
</Link>
|
|
1468
|
+
</Link> */}
|
|
1444
1469
|
</button>
|
|
1445
1470
|
) : (
|
|
1446
1471
|
<Button
|
|
@@ -1459,7 +1484,7 @@ export const ProviderProductEdition = ({
|
|
|
1459
1484
|
{showModal && (
|
|
1460
1485
|
<ProductImageModal images={images} setShowModal={setShowModal} />
|
|
1461
1486
|
)}
|
|
1462
|
-
{message.length > 0 && (
|
|
1487
|
+
{message.length > 0 && !showSurvey && (
|
|
1463
1488
|
<GenericModal
|
|
1464
1489
|
buttonType={componentsArray.length > 0 && "delete-product"}
|
|
1465
1490
|
componentsArray={
|
|
@@ -16,7 +16,7 @@ RetailerProductEditionDefault.args = {
|
|
|
16
16
|
Imágenes: false,
|
|
17
17
|
},
|
|
18
18
|
token:
|
|
19
|
-
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
19
|
+
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJjOTRhNzMwNS05MzY1LTQ2ZmYtYTQyMy00YjRiYzNiOGIxODAiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtM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27
27
|
images: 1,
|
|
28
28
|
},
|
|
29
|
-
orderId:
|
|
30
|
-
status: "
|
|
31
|
-
datasheet_status: "
|
|
29
|
+
orderId: 1,
|
|
30
|
+
status: "AF",
|
|
31
|
+
datasheet_status: "AF",
|
|
32
32
|
prio: "none",
|
|
33
33
|
version: 2,
|
|
34
|
-
description_status: "
|
|
35
|
-
images_status: "
|
|
34
|
+
description_status: "AF",
|
|
35
|
+
images_status: "AF",
|
|
36
36
|
article: {
|
|
37
|
-
id_article:
|
|
38
|
-
id_category: "
|
|
39
|
-
name: "
|
|
40
|
-
upc: "
|
|
41
|
-
timestamp: "2022-06-
|
|
37
|
+
id_article: 33250,
|
|
38
|
+
id_category: "689",
|
|
39
|
+
name: "crema antiarrugas",
|
|
40
|
+
upc: "2512651",
|
|
41
|
+
timestamp: "2022-06-14T14:52:51.000Z",
|
|
42
42
|
id_user: 28,
|
|
43
43
|
status: "NULL",
|
|
44
44
|
active: 1,
|
|
45
45
|
company_id: 1,
|
|
46
46
|
company_name: "COMPANY DEV",
|
|
47
47
|
country: "México",
|
|
48
|
-
id_order:
|
|
48
|
+
id_order: 1,
|
|
49
49
|
id_datasheet_especialist: 54,
|
|
50
50
|
id_datasheet_facilitator: 52,
|
|
51
51
|
id_description_especialist: 54,
|
|
52
52
|
id_description_facilitator: 52,
|
|
53
53
|
id_images_especialist: 55,
|
|
54
54
|
id_images_facilitator: 53,
|
|
55
|
-
id_auditor:
|
|
55
|
+
id_auditor: 30,
|
|
56
56
|
id_recepcionist: null,
|
|
57
|
-
category: "
|
|
58
|
-
missingAttributes:
|
|
59
|
-
missingDescriptions:
|
|
60
|
-
missingImages:
|
|
57
|
+
category: "SALUD Y BELLEZA|CUIDADO CORPORAL|CREMAS FAMILIARES",
|
|
58
|
+
missingAttributes: null,
|
|
59
|
+
missingDescriptions: null,
|
|
60
|
+
missingImages: null,
|
|
61
61
|
},
|
|
62
62
|
retailers: [
|
|
63
63
|
{
|
|
64
|
-
id:
|
|
65
|
-
name: "
|
|
64
|
+
id: 4,
|
|
65
|
+
name: "Walmart Super y Superama",
|
|
66
66
|
country: "México",
|
|
67
67
|
id_region: 1,
|
|
68
68
|
active: 1,
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
|
-
id:
|
|
72
|
-
name: "
|
|
71
|
+
id: 26,
|
|
72
|
+
name: "Mercado Libre",
|
|
73
73
|
country: "México",
|
|
74
74
|
id_region: 1,
|
|
75
75
|
active: 1,
|
|
76
76
|
},
|
|
77
77
|
],
|
|
78
78
|
country: "México",
|
|
79
|
-
upc: "
|
|
79
|
+
upc: "2512651",
|
|
80
80
|
},
|
|
81
81
|
location: {
|
|
82
82
|
product: { articleId: 109485, versionId: 3 },
|
|
83
83
|
},
|
|
84
84
|
user: {
|
|
85
|
-
id_user:
|
|
86
|
-
name: "
|
|
87
|
-
last_name: "",
|
|
88
|
-
email: "
|
|
89
|
-
position:
|
|
85
|
+
id_user: 30,
|
|
86
|
+
name: "Admin",
|
|
87
|
+
last_name: "Ulises",
|
|
88
|
+
email: "salmeron.5@hotmail.com",
|
|
89
|
+
position: "Admin",
|
|
90
90
|
telephone: null,
|
|
91
|
-
country:
|
|
91
|
+
country: "México",
|
|
92
92
|
id_company: 2,
|
|
93
|
-
id_cognito: "
|
|
93
|
+
id_cognito: "c94a7305-9365-46ff-a423-4b4bc3b8b180",
|
|
94
94
|
birth_Date: null,
|
|
95
95
|
about_me: null,
|
|
96
96
|
zip_code: null,
|
|
97
97
|
address: null,
|
|
98
98
|
job: null,
|
|
99
99
|
id_stripe: null,
|
|
100
|
-
id_role:
|
|
100
|
+
id_role: 6,
|
|
101
101
|
active: 1,
|
|
102
102
|
is_retailer: 0,
|
|
103
103
|
membership: {
|
|
@@ -111,6 +111,6 @@ RetailerProductEditionDefault.args = {
|
|
|
111
111
|
products_limit: "3",
|
|
112
112
|
type: "PyMES",
|
|
113
113
|
},
|
|
114
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
114
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-30/30.png?1655502088129",
|
|
115
115
|
},
|
|
116
116
|
};
|