contentoh-components-library 21.4.27 → 21.4.29
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/.env.development +1 -0
- package/dist/assets/fonts/roboto/LICENSE.txt +202 -0
- package/dist/components/molecules/StripeCardForm/StripeCardForm.stories.js +2 -1
- package/dist/components/molecules/StripeCardForm/index.js +9 -2
- package/dist/components/molecules/StripeCardForm/paymentForm.js +4 -1
- package/dist/components/molecules/StripeCardForm/styles.js +4 -1
- package/dist/components/molecules/StripeCardSelector/index.js +15 -2
- package/dist/components/molecules/StripeCardSelector/styles.js +4 -1
- package/dist/components/organisms/Chat/ContentChat/styles.js +1 -1
- package/dist/components/organisms/Chat/Footer/styles.js +1 -1
- package/dist/components/organisms/Chat/styles.js +1 -1
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +112 -54
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +1 -1
- package/dist/components/pages/RetailerProductEdition/index.js +68 -74
- package/package.json +3 -3
- package/src/components/atoms/Card/index.js +1 -1
- package/src/components/molecules/StripeCardForm/StripeCardForm.stories.js +1 -0
- package/src/components/molecules/StripeCardForm/index.js +4 -1
- package/src/components/molecules/StripeCardForm/paymentForm.js +2 -1
- package/src/components/molecules/StripeCardForm/styles.js +2 -1
- package/src/components/molecules/StripeCardSelector/index.js +16 -3
- package/src/components/molecules/StripeCardSelector/styles.js +3 -1
- package/src/components/organisms/Chat/ContentChat/styles.js +0 -1
- package/src/components/organisms/Chat/Footer/styles.js +4 -0
- package/src/components/organisms/Chat/styles.js +1 -1
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +112 -60
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +1 -1
- package/src/components/pages/RetailerProductEdition/index.js +42 -47
- package/src/index.js +0 -1
|
@@ -21,80 +21,132 @@ ProviderProductEditionDefault.args = {
|
|
|
21
21
|
category: 846,
|
|
22
22
|
version: 2,
|
|
23
23
|
productSelected: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
orderId: 15275,
|
|
25
|
+
status: "AA",
|
|
26
|
+
datasheet_status: "AA",
|
|
27
|
+
prio: "none",
|
|
28
|
+
version: 3,
|
|
29
|
+
description_status: "AA",
|
|
30
|
+
images_status: "AA",
|
|
31
|
+
brand: null,
|
|
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: "Abarrotes|Abarrotes Secos|Frutos Secos",
|
|
45
|
+
company_name: "GRUPO BRAHMA",
|
|
46
|
+
country: "México",
|
|
47
|
+
id_category: "11",
|
|
48
|
+
id_datasheet_especialist: 54,
|
|
49
|
+
id_datasheet_facilitator: 52,
|
|
50
|
+
id_description_especialist: 54,
|
|
51
|
+
id_description_facilitator: 52,
|
|
52
|
+
id_images_especialist: 55,
|
|
53
|
+
id_images_facilitator: 53,
|
|
54
|
+
id_order: 15275,
|
|
55
|
+
id_article: 39485,
|
|
56
|
+
id_auditor: 37,
|
|
57
|
+
name: "Mix de nueces",
|
|
58
|
+
timestamp: "2023-07-14T21:03:19.000Z",
|
|
59
|
+
upc: "7543453453",
|
|
60
|
+
},
|
|
61
|
+
retailers: [
|
|
33
62
|
{
|
|
34
|
-
|
|
35
|
-
|
|
63
|
+
id: 34,
|
|
64
|
+
name: "San Pablo",
|
|
36
65
|
},
|
|
37
66
|
],
|
|
38
67
|
statusByRetailer: {
|
|
39
|
-
|
|
40
|
-
datasheet: "AA",
|
|
41
|
-
description: "AA",
|
|
42
|
-
images: "AA",
|
|
43
|
-
},
|
|
44
|
-
29: {
|
|
45
|
-
datasheet: "AA",
|
|
46
|
-
description: "AA",
|
|
47
|
-
images: "AA",
|
|
48
|
-
},
|
|
49
|
-
63: {
|
|
68
|
+
34: {
|
|
50
69
|
datasheet: "AA",
|
|
51
70
|
description: "AA",
|
|
52
71
|
images: "AA",
|
|
53
72
|
},
|
|
54
73
|
},
|
|
55
|
-
checked: false,
|
|
56
74
|
retailersAvailable: [
|
|
57
75
|
{
|
|
58
|
-
id:
|
|
59
|
-
name: "
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
id: 29,
|
|
63
|
-
name: "Farmacias del Ahorro",
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
id: 63,
|
|
67
|
-
name: "DAX",
|
|
76
|
+
id: 34,
|
|
77
|
+
name: "San Pablo",
|
|
68
78
|
},
|
|
69
79
|
],
|
|
70
|
-
categoryName:
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
id_order: 15142,
|
|
80
|
+
categoryName: "Abarrotes|Abarrotes Secos|Frutos Secos",
|
|
81
|
+
upc: "7543453453",
|
|
82
|
+
id_article: 39485,
|
|
83
|
+
id_order: 15275,
|
|
75
84
|
},
|
|
76
85
|
productToEdit: {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
product:
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
percentage: 2,
|
|
94
|
-
},
|
|
95
|
-
],
|
|
86
|
+
ArticleId: 39485,
|
|
87
|
+
idCategory: "11",
|
|
88
|
+
product: {
|
|
89
|
+
orderId: 15275,
|
|
90
|
+
status: "AA",
|
|
91
|
+
datasheet_status: "AA",
|
|
92
|
+
prio: "none",
|
|
93
|
+
version: 3,
|
|
94
|
+
description_status: "AA",
|
|
95
|
+
images_status: "AA",
|
|
96
|
+
brand: null,
|
|
97
|
+
retailerOrder: 0,
|
|
98
|
+
missing: {
|
|
99
|
+
datasheet: null,
|
|
100
|
+
descriptions: null,
|
|
101
|
+
images: null,
|
|
96
102
|
},
|
|
97
|
-
|
|
103
|
+
services: {
|
|
104
|
+
datasheets: 1,
|
|
105
|
+
descriptions: 1,
|
|
106
|
+
images: 1,
|
|
107
|
+
},
|
|
108
|
+
article: {
|
|
109
|
+
category: "Abarrotes|Abarrotes Secos|Frutos Secos",
|
|
110
|
+
company_name: "GRUPO BRAHMA",
|
|
111
|
+
country: "México",
|
|
112
|
+
id_category: "11",
|
|
113
|
+
id_datasheet_especialist: 54,
|
|
114
|
+
id_datasheet_facilitator: 52,
|
|
115
|
+
id_description_especialist: 54,
|
|
116
|
+
id_description_facilitator: 52,
|
|
117
|
+
id_images_especialist: 55,
|
|
118
|
+
id_images_facilitator: 53,
|
|
119
|
+
id_order: 15275,
|
|
120
|
+
id_article: 39485,
|
|
121
|
+
id_auditor: 37,
|
|
122
|
+
name: "Mix de nueces",
|
|
123
|
+
timestamp: "2023-07-14T21:03:19.000Z",
|
|
124
|
+
upc: "7543453453",
|
|
125
|
+
},
|
|
126
|
+
retailers: [
|
|
127
|
+
{
|
|
128
|
+
id: 34,
|
|
129
|
+
name: "San Pablo",
|
|
130
|
+
},
|
|
131
|
+
],
|
|
132
|
+
statusByRetailer: {
|
|
133
|
+
34: {
|
|
134
|
+
datasheet: "AA",
|
|
135
|
+
description: "AA",
|
|
136
|
+
images: "AA",
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
retailersAvailable: [
|
|
140
|
+
{
|
|
141
|
+
id: 34,
|
|
142
|
+
name: "San Pablo",
|
|
143
|
+
},
|
|
144
|
+
],
|
|
145
|
+
categoryName: "Abarrotes|Abarrotes Secos|Frutos Secos",
|
|
146
|
+
upc: "7543453453",
|
|
147
|
+
id_article: 39485,
|
|
148
|
+
id_order: 15275,
|
|
149
|
+
},
|
|
98
150
|
},
|
|
99
151
|
location: {
|
|
100
152
|
pathname: "/EditProducts",
|
|
@@ -135,11 +187,11 @@ ProviderProductEditionDefault.args = {
|
|
|
135
187
|
planID: 8,
|
|
136
188
|
plan: "prod_KtlhECVSFG2iro",
|
|
137
189
|
name: "Plan Pro",
|
|
138
|
-
user_limit: "
|
|
190
|
+
user_limit: "50",
|
|
139
191
|
products_limit: "5000",
|
|
140
192
|
type: "Enterprise",
|
|
141
193
|
},
|
|
142
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-28/28.png?
|
|
194
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-28/28.png?1693338334183",
|
|
143
195
|
},
|
|
144
196
|
company: {
|
|
145
197
|
id_company: 1,
|
|
@@ -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-37/37.png?
|
|
114
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-37/37.png?1692750648813",
|
|
115
115
|
},
|
|
116
116
|
};
|
|
@@ -828,26 +828,27 @@ export const RetailerProductEdition = ({
|
|
|
828
828
|
const articleId = product.article.id_article;
|
|
829
829
|
const orderId = product.orderId;
|
|
830
830
|
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
831
|
+
const body = {
|
|
832
|
+
orderArticleRetailers: [
|
|
833
|
+
{ orderId, articleId, retailersIds: [activeRetailer.id] },
|
|
834
|
+
],
|
|
835
|
+
isAproved: false,
|
|
836
|
+
service: concept,
|
|
837
837
|
};
|
|
838
838
|
let res;
|
|
839
839
|
let message;
|
|
840
840
|
if (result) {
|
|
841
|
-
|
|
842
|
-
res = await axios.
|
|
843
|
-
`${process.env.
|
|
844
|
-
|
|
841
|
+
body.isAproved = result === "A";
|
|
842
|
+
res = await axios.post(
|
|
843
|
+
`${process.env.REACT_APP_EVALUATION_REFACTOR}`,
|
|
844
|
+
body,
|
|
845
845
|
{
|
|
846
846
|
headers: {
|
|
847
847
|
Authorization: token,
|
|
848
848
|
},
|
|
849
849
|
}
|
|
850
850
|
);
|
|
851
|
+
console.log(JSON.parse(res.data.body), "res");
|
|
851
852
|
getServices();
|
|
852
853
|
} else {
|
|
853
854
|
const specialistDone = ["RC", "RA", "CA"].includes(evalStatus);
|
|
@@ -859,11 +860,15 @@ export const RetailerProductEdition = ({
|
|
|
859
860
|
message = "Evaluación enviada";
|
|
860
861
|
getSectionIcon();
|
|
861
862
|
}
|
|
862
|
-
res = await axios.
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
863
|
+
res = await axios.post(
|
|
864
|
+
`${process.env.REACT_APP_EVALUATION_REFACTOR}`,
|
|
865
|
+
body,
|
|
866
|
+
{
|
|
867
|
+
headers: {
|
|
868
|
+
Authorization: token,
|
|
869
|
+
},
|
|
870
|
+
}
|
|
871
|
+
);
|
|
867
872
|
}
|
|
868
873
|
if (res.data.statusCode === 200) {
|
|
869
874
|
const { newStatus, newOrderStatus, newArticleStatus } = JSON.parse(
|
|
@@ -1211,7 +1216,7 @@ export const RetailerProductEdition = ({
|
|
|
1211
1216
|
try {
|
|
1212
1217
|
setLoading(true);
|
|
1213
1218
|
const evaluationArray = [];
|
|
1214
|
-
let conceptArray = [];
|
|
1219
|
+
let conceptArray = ["description", "datasheet", "images"];
|
|
1215
1220
|
switch (user.id_role) {
|
|
1216
1221
|
case 4:
|
|
1217
1222
|
conceptArray = ["description", "datasheet"];
|
|
@@ -1228,38 +1233,28 @@ export const RetailerProductEdition = ({
|
|
|
1228
1233
|
const messages = [];
|
|
1229
1234
|
|
|
1230
1235
|
servicesData?.forEach((ret) => {
|
|
1231
|
-
if (
|
|
1232
|
-
|
|
1233
|
-
|
|
1236
|
+
if (!retailersIds.includes(ret.id_retailer))
|
|
1237
|
+
retailersIds.push(ret.id_retailer);
|
|
1238
|
+
});
|
|
1239
|
+
const body = {
|
|
1240
|
+
orderArticleRetailers: [
|
|
1241
|
+
{
|
|
1234
1242
|
orderId: product.id_order ?? product.orderId,
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
[{ type: "status", value: message }],
|
|
1251
|
-
ret.id_retailer
|
|
1252
|
-
)
|
|
1253
|
-
);
|
|
1254
|
-
}
|
|
1255
|
-
evaluationArray.push(
|
|
1256
|
-
axios.put(`${process.env.REACT_APP_EVALUATION_ENDPOINT}`, data, {
|
|
1257
|
-
headers: {
|
|
1258
|
-
Authorization: token,
|
|
1259
|
-
},
|
|
1260
|
-
})
|
|
1261
|
-
);
|
|
1262
|
-
}
|
|
1243
|
+
articleId: product.article.id_article,
|
|
1244
|
+
retailersIds,
|
|
1245
|
+
},
|
|
1246
|
+
],
|
|
1247
|
+
isAproved,
|
|
1248
|
+
};
|
|
1249
|
+
conceptArray.forEach((concept) => {
|
|
1250
|
+
body.service = concept;
|
|
1251
|
+
evaluationArray.push(
|
|
1252
|
+
axios.post(`${process.env.REACT_APP_EVALUATION_REFACTOR}`, body, {
|
|
1253
|
+
headers: {
|
|
1254
|
+
Authorization: token,
|
|
1255
|
+
},
|
|
1256
|
+
})
|
|
1257
|
+
);
|
|
1263
1258
|
});
|
|
1264
1259
|
await Promise.all(evaluationArray);
|
|
1265
1260
|
|
package/src/index.js
CHANGED
|
@@ -75,7 +75,6 @@ export * from "./components/molecules/StripeCardSelector/index";
|
|
|
75
75
|
export * from "./components/molecules/GridItem/index";
|
|
76
76
|
export * from "./components/molecules/HeaderItem/index";
|
|
77
77
|
export * from "./components/molecules/RowItem/index";
|
|
78
|
-
export * from "./components/molecules/RetailerSelector/index";
|
|
79
78
|
|
|
80
79
|
//organisms
|
|
81
80
|
export * from "./components/organisms/ChangePassword/index";
|