contentoh-components-library 21.0.97 → 21.1.0
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 +1 -11
- package/dist/components/atoms/GeneralInput/index.js +13 -7
- package/dist/components/molecules/LoginPasswordStrength/index.js +8 -13
- package/dist/components/molecules/TagAndInput/index.js +4 -2
- package/dist/components/organisms/FullProductNameHeader/index.js +1 -1
- package/dist/components/pages/ChangePasswordLogin/index.js +12 -35
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +115 -61
- package/dist/components/pages/ProviderProductEdition/index.js +9 -16
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +35 -47
- package/dist/components/pages/RetailerProductEdition/index.js +25 -25
- package/dist/global-files/data.js +2 -0
- package/package.json +1 -1
- package/src/components/atoms/AsignationOption/index.js +2 -8
- package/src/components/atoms/GeneralInput/index.js +11 -6
- package/src/components/molecules/LoginPasswordStrength/index.js +6 -16
- package/src/components/molecules/TagAndInput/index.js +2 -0
- package/src/components/organisms/FullProductNameHeader/index.js +5 -1
- package/src/components/pages/ChangePasswordLogin/index.js +1 -2
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +130 -62
- package/src/components/pages/ProviderProductEdition/index.js +9 -11
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +35 -49
- package/src/components/pages/RetailerProductEdition/index.js +14 -5
- package/src/global-files/data.js +2 -0
|
@@ -16,7 +16,7 @@ RetailerProductEditionDefault.args = {
|
|
|
16
16
|
Imágenes: false,
|
|
17
17
|
},
|
|
18
18
|
token:
|
|
19
|
-
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
19
|
+
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ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gLIfvbTm-eEJu-pkB5WtBDQki-UY1yi3bIjk9mNVSM4cdEFA7_84zKWL1O2eUUCOVC7Cn2NXQ0OEgphYmSftTU7nVN_xvl8JSUXdqRpSpkCYka849zCL5OJV7Q",
|
|
20
20
|
articleId: 238,
|
|
21
21
|
category: 846,
|
|
22
22
|
version: 2,
|
|
@@ -26,18 +26,18 @@ RetailerProductEditionDefault.args = {
|
|
|
26
26
|
descriptions: 1,
|
|
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
|
-
version:
|
|
34
|
-
description_status:
|
|
35
|
-
images_status:
|
|
33
|
+
version: 2,
|
|
34
|
+
description_status: "AF",
|
|
35
|
+
images_status: "AF",
|
|
36
36
|
article: {
|
|
37
|
-
id_article:
|
|
38
|
-
id_category: "
|
|
39
|
-
name: "
|
|
40
|
-
upc: "
|
|
37
|
+
id_article: 33250,
|
|
38
|
+
id_category: "689",
|
|
39
|
+
name: "crema antiarrugas",
|
|
40
|
+
upc: "2512651",
|
|
41
41
|
timestamp: "2022-06-14T14:52:51.000Z",
|
|
42
42
|
id_user: 28,
|
|
43
43
|
status: "NULL",
|
|
@@ -45,19 +45,19 @@ RetailerProductEditionDefault.args = {
|
|
|
45
45
|
company_id: 1,
|
|
46
46
|
company_name: "COMPANY DEV",
|
|
47
47
|
country: "México",
|
|
48
|
-
id_order:
|
|
49
|
-
id_datasheet_especialist:
|
|
50
|
-
id_datasheet_facilitator:
|
|
51
|
-
id_description_especialist:
|
|
52
|
-
id_description_facilitator:
|
|
53
|
-
id_images_especialist:
|
|
54
|
-
id_images_facilitator:
|
|
55
|
-
id_auditor:
|
|
48
|
+
id_order: 1,
|
|
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_auditor: 30,
|
|
56
56
|
id_recepcionist: null,
|
|
57
|
-
category: "SALUD Y BELLEZA|CUIDADO
|
|
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
|
{
|
|
@@ -68,50 +68,36 @@ RetailerProductEditionDefault.args = {
|
|
|
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
|
-
{
|
|
78
|
-
id: 1013,
|
|
79
|
-
name: "Cencosud Colombia",
|
|
80
|
-
country: "Colombia",
|
|
81
|
-
id_region: 2,
|
|
82
|
-
active: 1,
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
id: 2005,
|
|
86
|
-
name: "ClubCo",
|
|
87
|
-
country: "Costa Rica",
|
|
88
|
-
id_region: 3,
|
|
89
|
-
active: 1,
|
|
90
|
-
},
|
|
91
77
|
],
|
|
92
78
|
country: "México",
|
|
93
|
-
upc: "
|
|
79
|
+
upc: "2512651",
|
|
94
80
|
},
|
|
95
81
|
location: {
|
|
96
82
|
product: { articleId: 109485, versionId: 3 },
|
|
97
83
|
},
|
|
98
84
|
user: {
|
|
99
|
-
id_user:
|
|
100
|
-
name: "
|
|
101
|
-
last_name: "",
|
|
102
|
-
email: "
|
|
103
|
-
position:
|
|
85
|
+
id_user: 30,
|
|
86
|
+
name: "Admin",
|
|
87
|
+
last_name: "Ulises",
|
|
88
|
+
email: "salmeron.5@hotmail.com",
|
|
89
|
+
position: "Admin",
|
|
104
90
|
telephone: null,
|
|
105
|
-
country:
|
|
91
|
+
country: "México",
|
|
106
92
|
id_company: 2,
|
|
107
|
-
id_cognito: "
|
|
93
|
+
id_cognito: "c94a7305-9365-46ff-a423-4b4bc3b8b180",
|
|
108
94
|
birth_Date: null,
|
|
109
95
|
about_me: null,
|
|
110
96
|
zip_code: null,
|
|
111
97
|
address: null,
|
|
112
98
|
job: null,
|
|
113
99
|
id_stripe: null,
|
|
114
|
-
id_role:
|
|
100
|
+
id_role: 6,
|
|
115
101
|
active: 1,
|
|
116
102
|
is_retailer: 0,
|
|
117
103
|
membership: {
|
|
@@ -125,6 +111,6 @@ RetailerProductEditionDefault.args = {
|
|
|
125
111
|
products_limit: "3",
|
|
126
112
|
type: "PyMES",
|
|
127
113
|
},
|
|
128
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
114
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-30/30.png?1655502088129",
|
|
129
115
|
},
|
|
130
116
|
};
|
|
@@ -238,8 +238,12 @@ export const RetailerProductEdition = ({
|
|
|
238
238
|
// getPercentage({ data: [product] }).then((res) =>
|
|
239
239
|
// setPercentages(res)
|
|
240
240
|
// );
|
|
241
|
-
setActiveRetailer(
|
|
242
|
-
|
|
241
|
+
setActiveRetailer((current) =>
|
|
242
|
+
current.id
|
|
243
|
+
? current
|
|
244
|
+
: product.retailers
|
|
245
|
+
? product.retailers[0]
|
|
246
|
+
: product.retailersAvailable[0]
|
|
243
247
|
);
|
|
244
248
|
getComments();
|
|
245
249
|
setUserGroups(await fetchUsers(token));
|
|
@@ -567,6 +571,10 @@ export const RetailerProductEdition = ({
|
|
|
567
571
|
product[`${getConcept(tab)}_status`] === "QF" ||
|
|
568
572
|
product[`${getConcept(tab)}_status`] === "IN_PROGRESS";
|
|
569
573
|
|
|
574
|
+
const auditorUnvalidated = !["RA", "AA"].includes(
|
|
575
|
+
product[`${getConcept(tab)}_status`]
|
|
576
|
+
);
|
|
577
|
+
|
|
570
578
|
switch (userId) {
|
|
571
579
|
case 7:
|
|
572
580
|
case 8:
|
|
@@ -588,7 +596,8 @@ export const RetailerProductEdition = ({
|
|
|
588
596
|
case 6:
|
|
589
597
|
return (
|
|
590
598
|
statusArray.includes(product.status) &&
|
|
591
|
-
servicesData.every((serv) => ["RA", "AA"].includes(serv.status))
|
|
599
|
+
servicesData.every((serv) => ["RA", "AA"].includes(serv.status)) &&
|
|
600
|
+
auditorUnvalidated
|
|
592
601
|
);
|
|
593
602
|
default:
|
|
594
603
|
break;
|
|
@@ -666,7 +675,7 @@ export const RetailerProductEdition = ({
|
|
|
666
675
|
Authorization: token,
|
|
667
676
|
},
|
|
668
677
|
});
|
|
669
|
-
getServices();
|
|
678
|
+
//getServices();
|
|
670
679
|
} else {
|
|
671
680
|
const specialistDone =
|
|
672
681
|
evalStatus === "RF" ||
|
|
@@ -729,8 +738,8 @@ export const RetailerProductEdition = ({
|
|
|
729
738
|
Authorization: token,
|
|
730
739
|
},
|
|
731
740
|
});
|
|
732
|
-
getServices();
|
|
733
741
|
}
|
|
742
|
+
loadData();
|
|
734
743
|
sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
|
|
735
744
|
setProduct(productTemp);
|
|
736
745
|
} catch (error) {
|
package/src/global-files/data.js
CHANGED
|
@@ -194,5 +194,7 @@ export const getNewStatus = (statusArray) => {
|
|
|
194
194
|
if (lookupString.includes("AA")) return "AA";
|
|
195
195
|
if (lookupString.includes("AP")) return "AP";
|
|
196
196
|
if (lookupString.includes("AC")) return "AC";
|
|
197
|
+
if (lookupString.includes("RECEIVED")) return "RECEIVED";
|
|
198
|
+
if (lookupString.includes("NA")) return "NA";
|
|
197
199
|
return new Error("Status not found");
|
|
198
200
|
};
|