contentoh-components-library 21.3.55 → 21.3.57
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/ButtonV2/styles.js +1 -1
- package/dist/components/atoms/Status/styles.js +1 -1
- package/dist/components/atoms/VerticalSideMenuMainPage/index.js +18 -23
- package/dist/components/atoms/VerticalSideMenuMainPage/styles.js +4 -4
- package/dist/components/organisms/DashboardMetric/dashboardMetricUtils.js +27 -0
- package/dist/components/organisms/GlobalModal/styles.js +1 -1
- package/dist/components/organisms/OrderDetail/styles.js +1 -1
- package/dist/components/organisms/OrderDetail/utils/Table/styles.js +1 -1
- package/dist/components/pages/Dashboard/Dashboard.stories.js +35 -54
- package/dist/components/pages/Dashboard/index.js +8 -4
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +98 -26
- package/dist/components/pages/ProviderProductEdition/index.js +623 -386
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +103 -153
- package/dist/components/pages/RetailerProductEdition/index.js +33 -35
- package/dist/index.js +13 -0
- package/package.json +7 -6
- package/src/components/atoms/ButtonV2/styles.js +1 -1
- package/src/components/atoms/Status/styles.js +4 -0
- package/src/components/atoms/VerticalSideMenuMainPage/index.js +18 -22
- package/src/components/atoms/VerticalSideMenuMainPage/styles.js +3 -4
- package/src/components/organisms/DashboardMetric/dashboardMetricUtils.js +18 -1
- package/src/components/organisms/GlobalModal/styles.js +10 -0
- package/src/components/organisms/OrderDetail/styles.js +1 -1
- package/src/components/organisms/OrderDetail/utils/Table/styles.js +0 -1
- package/src/components/organisms/TableResizable/TableResizable.stories.js +17 -0
- package/src/components/organisms/TableResizable/index.js +119 -0
- package/src/components/organisms/TableResizable/styles.js +133 -0
- package/src/components/organisms/TableResizable/utils.js +46 -0
- package/src/components/pages/Dashboard/Dashboard.stories.js +35 -59
- package/src/components/pages/Dashboard/index.js +4 -3
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +110 -31
- package/src/components/pages/ProviderProductEdition/index.js +244 -131
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +93 -145
- package/src/components/pages/RetailerProductEdition/index.js +24 -22
- package/src/index.js +1 -0
|
@@ -12,183 +12,131 @@ export const RetailerProductEditionDefault = Template.bind({});
|
|
|
12
12
|
RetailerProductEditionDefault.args = {
|
|
13
13
|
tabsSections: {
|
|
14
14
|
Descripción: true,
|
|
15
|
-
"Ficha técnica":
|
|
16
|
-
Imágenes:
|
|
15
|
+
"Ficha técnica": false,
|
|
16
|
+
Imágenes: false,
|
|
17
17
|
},
|
|
18
18
|
token:
|
|
19
|
-
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
19
|
+
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJhNmM0ZDNkNi0yNGE0LTQxZDQtYWQwZi1kMDg3NDM4YWI1YjYiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwiY29nbml0bzp1c2VybmFtZSI6ImE2YzRkM2Q2LTI0YTQtNDFkNC1hZDBmLWQwODc0MzhhYjViNiIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiIyYjU3MjZlMy04MjM2LTRmYzMtODBkMi05NWVmYmU4ODdjOTYiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY4MjAxNjI5MSwibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY4MjAxOTg5MSwiaWF0IjoxNjgyMDE2MjkxLCJlbWFpbCI6ImV0Y0Bjb250ZW50b2guY29tIn0.SCj_yp1NkGCED59JHoDSdFAOakIOvZVeC0yLwt9z0BtenDXlU0m5cUofQQonnWPM8Q70yMFEkyMGI9kQs_fz1gxrmrSc2FGefn3B_1Vymq3pQ_S1JrY_syYf88m_GtJKOywEnE6--Ef9lZhFBFKGtqRJ4H8JBa9Xb96uCjAKyEMCSURDlw37pk2RQdULlZPj17Zb6Xrqi2lwrhpI1ByptX3__UoTiZklnTXwIxM4JdU7yuhXLznaEH8NOSd2Jw-CV6FCUbYBHlnRYBQg7B5mwyVKtDQm6QpRgBTBPCvljJJpFjRKUcnon8WZiFXx1qVbkWPt2vCT1TZqqoSLdlP6lA",
|
|
20
20
|
productSelected: {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
images: 1,
|
|
25
|
-
},
|
|
26
|
-
orderId: 4106,
|
|
27
|
-
status: "PA",
|
|
28
|
-
datasheet_status: "PA",
|
|
21
|
+
orderId: 15160,
|
|
22
|
+
status: "SAC",
|
|
23
|
+
datasheet_status: "SAC",
|
|
29
24
|
prio: "none",
|
|
30
25
|
version: 7,
|
|
31
|
-
description_status: "
|
|
32
|
-
images_status: "
|
|
26
|
+
description_status: "SAC",
|
|
27
|
+
images_status: "SAC",
|
|
28
|
+
brand: null,
|
|
29
|
+
retailerOrder: 1,
|
|
30
|
+
missing: {
|
|
31
|
+
datasheet: null,
|
|
32
|
+
descriptions: null,
|
|
33
|
+
images: null,
|
|
34
|
+
},
|
|
35
|
+
orderId: 14606,
|
|
36
|
+
status: "AC",
|
|
37
|
+
datasheet_status: "AC",
|
|
38
|
+
prio: "none",
|
|
39
|
+
version: 3,
|
|
40
|
+
description_status: "AC",
|
|
41
|
+
images_status: "AC",
|
|
33
42
|
statusByRetailer: {
|
|
43
|
+
4: {
|
|
44
|
+
datasheet: "AC",
|
|
45
|
+
description: "AC",
|
|
46
|
+
images: "AC",
|
|
47
|
+
},
|
|
34
48
|
5: {
|
|
35
|
-
datasheet: "
|
|
36
|
-
description: "
|
|
37
|
-
images: "
|
|
49
|
+
datasheet: "AC",
|
|
50
|
+
description: "AC",
|
|
51
|
+
images: "AC",
|
|
52
|
+
},
|
|
53
|
+
6: {
|
|
54
|
+
description: "AC",
|
|
55
|
+
images: "AC",
|
|
56
|
+
datasheet: "AC",
|
|
38
57
|
},
|
|
39
|
-
|
|
40
|
-
datasheet: "
|
|
41
|
-
description: "
|
|
58
|
+
12: {
|
|
59
|
+
datasheet: "AC",
|
|
60
|
+
description: "AC",
|
|
61
|
+
images: "AC",
|
|
62
|
+
},
|
|
63
|
+
17: {
|
|
64
|
+
datasheet: "AC",
|
|
65
|
+
description: "AC",
|
|
42
66
|
images: "AC",
|
|
43
67
|
},
|
|
44
68
|
},
|
|
45
69
|
article: {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
timestamp: "2021-10-09T16:33:17.000Z",
|
|
51
|
-
id_user: 203,
|
|
52
|
-
status: "RECEPTION",
|
|
53
|
-
active: 1,
|
|
54
|
-
company_id: 226,
|
|
55
|
-
verified_upc: 750954665709,
|
|
56
|
-
Descripcion: null,
|
|
57
|
-
Proveedor: null,
|
|
58
|
-
id_proveedor: 0,
|
|
59
|
-
company_name: "COLGATE PALMOLIVE S.A. DE C.V.",
|
|
60
|
-
country: "null",
|
|
61
|
-
id_order: 4106,
|
|
70
|
+
category: "Puertas y Ventanas|Molduras|Molduras Madera Blanda",
|
|
71
|
+
company_name: "Demo",
|
|
72
|
+
country: "México",
|
|
73
|
+
id_category: "2366",
|
|
62
74
|
id_datasheet_especialist: null,
|
|
63
75
|
id_datasheet_facilitator: null,
|
|
64
76
|
id_description_especialist: null,
|
|
65
77
|
id_description_facilitator: null,
|
|
66
|
-
id_images_especialist:
|
|
78
|
+
id_images_especialist: null,
|
|
67
79
|
id_images_facilitator: null,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
80
|
+
id_order: 15160,
|
|
81
|
+
id_article: 39290,
|
|
82
|
+
id_auditor: 37,
|
|
83
|
+
name: "MOLDURA MARCO MODER 11X4X244 CM",
|
|
84
|
+
timestamp: "2023-04-19T21:36:02.000Z",
|
|
85
|
+
upc: "100030",
|
|
74
86
|
},
|
|
75
87
|
retailers: [
|
|
76
88
|
{
|
|
77
|
-
id:
|
|
78
|
-
name: "
|
|
79
|
-
country: "México",
|
|
80
|
-
id_region: 1,
|
|
81
|
-
active: 1,
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
id: 5,
|
|
85
|
-
name: "Chedraui",
|
|
86
|
-
country: "México",
|
|
87
|
-
id_region: 1,
|
|
88
|
-
active: 1,
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
id: 6,
|
|
92
|
-
name: "HEB",
|
|
93
|
-
country: "México",
|
|
94
|
-
id_region: 1,
|
|
95
|
-
active: 1,
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
id: 12,
|
|
99
|
-
name: "La Comer",
|
|
100
|
-
country: "México",
|
|
101
|
-
id_region: 1,
|
|
102
|
-
active: 1,
|
|
89
|
+
id: 58,
|
|
90
|
+
name: "The Home Depot Golden",
|
|
103
91
|
},
|
|
104
92
|
{
|
|
105
|
-
id:
|
|
106
|
-
name: "
|
|
107
|
-
country: "México",
|
|
108
|
-
id_region: 1,
|
|
109
|
-
active: 1,
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
id: 16,
|
|
113
|
-
name: "Rappi",
|
|
114
|
-
country: "México",
|
|
115
|
-
id_region: 1,
|
|
116
|
-
active: 1,
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
id: 17,
|
|
120
|
-
name: "Genérico",
|
|
121
|
-
country: "México",
|
|
122
|
-
id_region: 1,
|
|
123
|
-
active: 1,
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
id: 20,
|
|
127
|
-
name: "Cornershop",
|
|
128
|
-
country: "México",
|
|
129
|
-
id_region: 1,
|
|
130
|
-
active: 1,
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
id: 24,
|
|
134
|
-
name: "Alsuper",
|
|
135
|
-
country: "México",
|
|
136
|
-
id_region: 1,
|
|
137
|
-
active: 1,
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
id: 27,
|
|
141
|
-
name: "IMPIRA México",
|
|
142
|
-
country: "México",
|
|
143
|
-
id_region: 1,
|
|
144
|
-
active: 1,
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
id: 38,
|
|
148
|
-
name: "Del Sol",
|
|
149
|
-
country: "México",
|
|
150
|
-
id_region: 1,
|
|
151
|
-
active: 1,
|
|
93
|
+
id: 68,
|
|
94
|
+
name: "The Home Depot Merchants",
|
|
152
95
|
},
|
|
153
96
|
],
|
|
154
|
-
|
|
155
|
-
|
|
97
|
+
statusByRetailer: {
|
|
98
|
+
58: {
|
|
99
|
+
datasheet: "SAC",
|
|
100
|
+
description: "SAC",
|
|
101
|
+
images: "SAC",
|
|
102
|
+
},
|
|
103
|
+
},
|
|
156
104
|
},
|
|
157
105
|
location: {
|
|
158
|
-
product: { articleId:
|
|
106
|
+
product: { articleId: 39290, versionId: 7 },
|
|
159
107
|
},
|
|
160
108
|
user: {
|
|
161
|
-
id_user:
|
|
162
|
-
name: "
|
|
163
|
-
last_name: "
|
|
164
|
-
email: "
|
|
165
|
-
position: "
|
|
166
|
-
telephone:
|
|
167
|
-
country: "
|
|
168
|
-
id_company:
|
|
169
|
-
id_cognito: "
|
|
170
|
-
birth_Date:
|
|
171
|
-
about_me:
|
|
172
|
-
zip_code:
|
|
173
|
-
address:
|
|
174
|
-
job:
|
|
175
|
-
id_stripe:
|
|
176
|
-
id_role:
|
|
109
|
+
id_user: 51,
|
|
110
|
+
name: "ADMIN PRUEBA",
|
|
111
|
+
last_name: "",
|
|
112
|
+
email: "etc@contentoh.com",
|
|
113
|
+
position: "",
|
|
114
|
+
telephone: "",
|
|
115
|
+
country: "",
|
|
116
|
+
id_company: 2,
|
|
117
|
+
id_cognito: "a6c4d3d6-24a4-41d4-ad0f-d087438ab5b6",
|
|
118
|
+
birth_Date: null,
|
|
119
|
+
about_me: "",
|
|
120
|
+
zip_code: "",
|
|
121
|
+
address: "",
|
|
122
|
+
job: "",
|
|
123
|
+
id_stripe: "",
|
|
124
|
+
id_role: 1,
|
|
177
125
|
active: 1,
|
|
178
126
|
is_retailer: 0,
|
|
179
127
|
email_notify: 1,
|
|
180
|
-
is_user_tech:
|
|
128
|
+
is_user_tech: null,
|
|
181
129
|
membership: {
|
|
182
|
-
id:
|
|
183
|
-
start_date: "
|
|
184
|
-
end_date: "
|
|
185
|
-
planID:
|
|
186
|
-
plan: "
|
|
187
|
-
name: "Plan
|
|
188
|
-
user_limit: "
|
|
189
|
-
products_limit: "
|
|
190
|
-
type: "
|
|
130
|
+
id: 2,
|
|
131
|
+
start_date: "2021-11-05T02:35:12.000Z",
|
|
132
|
+
end_date: "2022-11-05T02:34:49.000Z",
|
|
133
|
+
planID: 1,
|
|
134
|
+
plan: "prod_KtkvuFFLpOdP6e",
|
|
135
|
+
name: "Plan Free",
|
|
136
|
+
user_limit: "1",
|
|
137
|
+
products_limit: "3",
|
|
138
|
+
type: "PyMES",
|
|
191
139
|
},
|
|
192
|
-
src: "https://content-management-profile
|
|
140
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-51/51.png?1682016291518",
|
|
193
141
|
},
|
|
194
142
|
};
|
|
@@ -752,7 +752,7 @@ export const RetailerProductEdition = ({
|
|
|
752
752
|
const adminFacilitatorCanEvaluate =
|
|
753
753
|
retailerStatus === "IE" && [1, 4, 5].includes(user.id_role);
|
|
754
754
|
const adminAuditorCanEvaluate =
|
|
755
|
-
["AC", "RP", "RCA"].includes(retailerStatus) &&
|
|
755
|
+
["AC", "RP", "RCA", "SAC"].includes(retailerStatus) &&
|
|
756
756
|
[1, 6].includes(user.id_role);
|
|
757
757
|
return adminFacilitatorCanEvaluate || adminAuditorCanEvaluate;
|
|
758
758
|
};
|
|
@@ -1208,27 +1208,29 @@ export const RetailerProductEdition = ({
|
|
|
1208
1208
|
break;
|
|
1209
1209
|
}
|
|
1210
1210
|
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1211
|
+
//We comment this part of the code because it does not match with the correct flow
|
|
1212
|
+
|
|
1213
|
+
// servicesData?.forEach((ret) => {
|
|
1214
|
+
// if (conceptArray.includes(ret.service)) {
|
|
1215
|
+
// let data = {
|
|
1216
|
+
// articleId: product.article.id_article,
|
|
1217
|
+
// orderId: product.id_order ?? product.orderId,
|
|
1218
|
+
// concept: ret.service,
|
|
1219
|
+
// result: result,
|
|
1220
|
+
// evalStatus: product[`${ret.service}_status`],
|
|
1221
|
+
// retailerId: ret.id_retailer,
|
|
1222
|
+
// };
|
|
1223
|
+
// evaluationArray.push(
|
|
1224
|
+
// axios.put(`${process.env.REACT_APP_EVALUATION_ENDPOINT}`, data, {
|
|
1225
|
+
// headers: {
|
|
1226
|
+
// Authorization: token,
|
|
1227
|
+
// },
|
|
1228
|
+
// })
|
|
1229
|
+
// );
|
|
1230
|
+
// }
|
|
1231
|
+
// });
|
|
1232
|
+
|
|
1233
|
+
// await Promise.all(evaluationArray);
|
|
1232
1234
|
|
|
1233
1235
|
conceptArray?.forEach((concept) => {
|
|
1234
1236
|
let data = {
|
package/src/index.js
CHANGED
|
@@ -78,6 +78,7 @@ export * from "./components/organisms/Chat/index";
|
|
|
78
78
|
export * from "./components/organisms/Modal/index";
|
|
79
79
|
export * from "./components/organisms/OrderDetail/index";
|
|
80
80
|
export * from "./components/organisms/RangeCalendar";
|
|
81
|
+
export * from "./components/organisms/TableResizable";
|
|
81
82
|
|
|
82
83
|
//pages
|
|
83
84
|
export * from "./components/pages/ChangePasswordLogin";
|