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.
Files changed (35) hide show
  1. package/dist/components/atoms/ButtonV2/styles.js +1 -1
  2. package/dist/components/atoms/Status/styles.js +1 -1
  3. package/dist/components/atoms/VerticalSideMenuMainPage/index.js +18 -23
  4. package/dist/components/atoms/VerticalSideMenuMainPage/styles.js +4 -4
  5. package/dist/components/organisms/DashboardMetric/dashboardMetricUtils.js +27 -0
  6. package/dist/components/organisms/GlobalModal/styles.js +1 -1
  7. package/dist/components/organisms/OrderDetail/styles.js +1 -1
  8. package/dist/components/organisms/OrderDetail/utils/Table/styles.js +1 -1
  9. package/dist/components/pages/Dashboard/Dashboard.stories.js +35 -54
  10. package/dist/components/pages/Dashboard/index.js +8 -4
  11. package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +98 -26
  12. package/dist/components/pages/ProviderProductEdition/index.js +623 -386
  13. package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +103 -153
  14. package/dist/components/pages/RetailerProductEdition/index.js +33 -35
  15. package/dist/index.js +13 -0
  16. package/package.json +7 -6
  17. package/src/components/atoms/ButtonV2/styles.js +1 -1
  18. package/src/components/atoms/Status/styles.js +4 -0
  19. package/src/components/atoms/VerticalSideMenuMainPage/index.js +18 -22
  20. package/src/components/atoms/VerticalSideMenuMainPage/styles.js +3 -4
  21. package/src/components/organisms/DashboardMetric/dashboardMetricUtils.js +18 -1
  22. package/src/components/organisms/GlobalModal/styles.js +10 -0
  23. package/src/components/organisms/OrderDetail/styles.js +1 -1
  24. package/src/components/organisms/OrderDetail/utils/Table/styles.js +0 -1
  25. package/src/components/organisms/TableResizable/TableResizable.stories.js +17 -0
  26. package/src/components/organisms/TableResizable/index.js +119 -0
  27. package/src/components/organisms/TableResizable/styles.js +133 -0
  28. package/src/components/organisms/TableResizable/utils.js +46 -0
  29. package/src/components/pages/Dashboard/Dashboard.stories.js +35 -59
  30. package/src/components/pages/Dashboard/index.js +4 -3
  31. package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +110 -31
  32. package/src/components/pages/ProviderProductEdition/index.js +244 -131
  33. package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +93 -145
  34. package/src/components/pages/RetailerProductEdition/index.js +24 -22
  35. 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": true,
16
- Imágenes: true,
15
+ "Ficha técnica": false,
16
+ Imágenes: false,
17
17
  },
18
18
  token:
19
- "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJhNmM0ZDNkNi0yNGE0LTQxZDQtYWQwZi1kMDg3NDM4YWI1YjYiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwiY29nbml0bzp1c2VybmFtZSI6ImE2YzRkM2Q2LTI0YTQtNDFkNC1hZDBmLWQwODc0MzhhYjViNiIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiJhY2FmNjhiOC00MmU1LTQ1NzAtYThiMC04YWY4NmY3MGU5YTEiLCJ0b2tlbl91c2UiOiJpZCIsImF1d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lIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiIyYjU3MjZlMy04MjM2LTRmYzMtODBkMi05NWVmYmU4ODdjOTYiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY4MjAxNjI5MSwibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY4MjAxOTg5MSwiaWF0IjoxNjgyMDE2MjkxLCJlbWFpbCI6ImV0Y0Bjb250ZW50b2guY29tIn0.SCj_yp1NkGCED59JHoDSdFAOakIOvZVeC0yLwt9z0BtenDXlU0m5cUofQQonnWPM8Q70yMFEkyMGI9kQs_fz1gxrmrSc2FGefn3B_1Vymq3pQ_S1JrY_syYf88m_GtJKOywEnE6--Ef9lZhFBFKGtqRJ4H8JBa9Xb96uCjAKyEMCSURDlw37pk2RQdULlZPj17Zb6Xrqi2lwrhpI1ByptX3__UoTiZklnTXwIxM4JdU7yuhXLznaEH8NOSd2Jw-CV6FCUbYBHlnRYBQg7B5mwyVKtDQm6QpRgBTBPCvljJJpFjRKUcnon8WZiFXx1qVbkWPt2vCT1TZqqoSLdlP6lA",
20
20
  productSelected: {
21
- services: {
22
- datasheets: 1,
23
- descriptions: 1,
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: "PA",
32
- images_status: "CA",
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: "PA",
36
- description: "PA",
37
- images: "CA",
49
+ datasheet: "AC",
50
+ description: "AC",
51
+ images: "AC",
52
+ },
53
+ 6: {
54
+ description: "AC",
55
+ images: "AC",
56
+ datasheet: "AC",
38
57
  },
39
- 16: {
40
- datasheet: "PA",
41
- description: "PA",
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
- id_article: 18376,
47
- id_category: "692",
48
- name: "Jabón para Manos Palmolive Aquarium Series Líquido Rellena-Pack 800 ml",
49
- upc: "7509546657097",
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: 1251,
78
+ id_images_especialist: null,
67
79
  id_images_facilitator: null,
68
- id_auditor: null,
69
- id_recepcionist: null,
70
- category: "Salud y Belleza|Cuidado Corporal|Jabones de Tocador",
71
- missingAttributes: null,
72
- missingDescriptions: null,
73
- missingImages: null,
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: 4,
78
- name: "Walmart Super y Superama",
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: 13,
106
- name: "Soriana",
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
- country: "null",
155
- upc: "7509546657097",
97
+ statusByRetailer: {
98
+ 58: {
99
+ datasheet: "SAC",
100
+ description: "SAC",
101
+ images: "SAC",
102
+ },
103
+ },
156
104
  },
157
105
  location: {
158
- product: { articleId: 354, versionId: 3 },
106
+ product: { articleId: 39290, versionId: 7 },
159
107
  },
160
108
  user: {
161
- id_user: 1251,
162
- name: "Ismael",
163
- last_name: "López",
164
- email: "ilopez@contentoh.com",
165
- position: "Full Stack Developer",
166
- telephone: null,
167
- country: "México",
168
- id_company: 254,
169
- id_cognito: "9d0cc5c8-a89e-4bdd-9e2d-358a01cc9a62",
170
- birth_Date: "1997-08-15T00:00:00.000Z",
171
- about_me: null,
172
- zip_code: null,
173
- address: null,
174
- job: null,
175
- id_stripe: null,
176
- id_role: 7,
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: "ADMIN-AS",
128
+ is_user_tech: null,
181
129
  membership: {
182
- id: 750,
183
- start_date: "2022-01-07T21:32:54.000Z",
184
- end_date: "2023-01-07T21:32:54.000Z",
185
- planID: 6,
186
- plan: "prod_KvGd6YSTJyR3AP",
187
- name: "Plan Small",
188
- user_limit: "10",
189
- products_limit: "1000",
190
- type: "Enterprise",
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-prod.s3.amazonaws.com/id-460/460.png?1684511182259",
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
- servicesData?.forEach((ret) => {
1212
- if (conceptArray.includes(ret.service)) {
1213
- let data = {
1214
- articleId: product.article.id_article,
1215
- orderId: product.id_order ?? product.orderId,
1216
- concept: ret.service,
1217
- result: result,
1218
- evalStatus: product[`${ret.service}_status`],
1219
- retailerId: ret.id_retailer,
1220
- };
1221
- evaluationArray.push(
1222
- axios.put(`${process.env.REACT_APP_EVALUATION_ENDPOINT}`, data, {
1223
- headers: {
1224
- Authorization: token,
1225
- },
1226
- })
1227
- );
1228
- }
1229
- });
1230
-
1231
- await Promise.all(evaluationArray);
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";