contentoh-components-library 21.2.81 → 21.2.82

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 (26) hide show
  1. package/dist/assets/images/chatPopup/Spinner.gif +0 -0
  2. package/dist/assets/images/chatPopup/close.svg +3 -0
  3. package/dist/assets/images/chatPopup/defaultImage.png +0 -0
  4. package/dist/assets/images/chatPopup/defaultProfile.png +0 -0
  5. package/dist/assets/images/chatPopup/doc.svg +1 -0
  6. package/dist/assets/images/chatPopup/document.svg +1 -0
  7. package/dist/assets/images/chatPopup/iconChat.svg +19 -0
  8. package/dist/assets/images/chatPopup/iconPlus.svg +3 -0
  9. package/dist/assets/images/chatPopup/pdf.svg +75 -0
  10. package/dist/assets/images/chatPopup/remove.svg +4 -0
  11. package/dist/assets/images/chatPopup/send.svg +3 -0
  12. package/dist/assets/images/chatPopup/svgIcon.svg +109 -0
  13. package/dist/assets/images/chatPopup/upload_file.svg +3 -0
  14. package/dist/assets/images/chatPopup/xls.svg +53 -0
  15. package/dist/components/atoms/ChatPopUp/ChatPopUp.stories.js +28 -0
  16. package/dist/components/atoms/ChatPopUp/index.js +841 -0
  17. package/dist/components/atoms/ChatPopUp/styles.js +27 -0
  18. package/dist/components/atoms/ChatPopUp/utils/handlersChat.js +182 -0
  19. package/dist/components/atoms/Tooltip/Tooltip.stories.js +36 -0
  20. package/dist/components/atoms/Tooltip/index.js +55 -0
  21. package/dist/components/atoms/Tooltip/styles.js +18 -0
  22. package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +142 -200
  23. package/dist/components/pages/ProviderProductEdition/index.js +16 -14
  24. package/package.json +1 -1
  25. package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +161 -218
  26. package/src/components/pages/ProviderProductEdition/index.js +4 -2
@@ -31,178 +31,92 @@ ProviderProductEditionDefault.args = {
31
31
  "Ficha técnica": true,
32
32
  Imágenes: true
33
33
  },
34
- token: "eeyJraWQiOiJk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pbC5jb20ifQ.JbpinyPv_38xvwwT_td3M_vP3xEffZ6dI0Xl3B9EVjPF7uW4ctZ_B7nKydPyUcB6LTaYEzCI1RfAgZpUQUFbYTfFHJ3T9kgwa9b9mDeDx3kiy2GK3CdYIuWiii5ZivxVKK10gV871OvxDish4w-vEOsClXDncoTX2zAx3wDM4xO83UdI0ahECOTYszuGB3FRnkrHnWJO0b2dpsyhqAmhw0aEcw6gwbqP5l-spOjMM3lE-bGm89pK_9oLYcyRMr09vcGJartmk_ctUisCflrYudnwVgwTwCi1PRBkiaUoDywYeGr6HxRoU1zsiC3LwB-m9b2YnNhEZmPanLfPstKVbw",
35
35
  articleId: 238,
36
36
  category: 846,
37
37
  version: 2,
38
38
  productSelected: {
39
- orderId: 125,
40
- status: "AA",
41
- datasheet_status: "AA",
42
- prio: "none",
43
- version: 3,
44
- description_status: "AA",
45
- images_status: "AA",
46
- brand: "DESCRIPCION PRUEBA",
47
- retailerOrder: 0,
48
- missing: {
49
- datasheet: null,
50
- descriptions: null,
51
- images: null
39
+ "orderId": 3366,
40
+ "article_status": "AP",
41
+ "datasheet_status": "NS",
42
+ "description_status": "NS",
43
+ "images_status": "AP",
44
+ "prio": "none",
45
+ "version": 3,
46
+ "brand": null,
47
+ "article": {
48
+ "category": "Iluminación|Lámparas|Lámparas de Mesa",
49
+ "company_name": "Norday",
50
+ "id_company": 810,
51
+ "country": "México",
52
+ "id_category": "2454",
53
+ "id_article": 84492,
54
+ "name": "prueba dos",
55
+ "upc": "8375"
52
56
  },
53
- services: {
54
- datasheets: 1,
55
- descriptions: 1,
56
- images: 1
57
- },
58
- article: {
59
- category: "Salud y Belleza|Cosméticos y Accesorios|Cosméticos",
60
- company_name: "COMPANY DEV",
61
- country: "México",
62
- id_category: "682",
63
- id_datasheet_especialist: 54,
64
- id_datasheet_facilitator: 52,
65
- id_description_especialist: 55,
66
- id_description_facilitator: 52,
67
- id_images_especialist: 55,
68
- id_images_facilitator: 53,
69
- id_order: 125,
70
- id_article: 76125,
71
- id_auditor: 30,
72
- name: "prueba 11",
73
- timestamp: "2022-07-20T19:20:46.000Z",
74
- upc: "35646655"
75
- },
76
- retailers: [{
77
- id: 2,
78
- name: "Walmart Mercancías Generales"
79
- }, {
80
- id: 3,
81
- name: "Sam´s Club"
82
- }, {
83
- id: 5,
84
- name: "Chedraui"
57
+ "retailers": [{
58
+ "id": 59,
59
+ "name": "The Home Depot Platinum"
85
60
  }],
86
- statusByRetailer: {
87
- 2: {
88
- datasheet: "AA",
89
- datasheetTranslations: "AA",
90
- description: "AA",
91
- images: "AA"
92
- },
93
- 3: {
94
- datasheet: "AA",
95
- datasheetTranslations: "AA",
96
- description: "AA",
97
- images: "AA"
98
- },
99
- 5: {
100
- datasheet: "AA",
101
- datasheetTranslations: "AA",
102
- description: "AA",
103
- images: "AA"
61
+ "services": {
62
+ "datasheets": 0,
63
+ "descriptions": 0,
64
+ "images": 1
65
+ },
66
+ "statusByRetailer": {
67
+ "59": {
68
+ "images": "AP"
104
69
  }
105
70
  },
106
- retailersAvailable: [{
107
- id: 2,
108
- name: "Walmart Mercancías Generales"
109
- }, {
110
- id: 3,
111
- name: "Sam´s Club"
112
- }, {
113
- id: 5,
114
- name: "Chedraui"
115
- }],
116
- categoryName: "Salud y Belleza|Cosméticos y Accesorios|Cosméticos",
117
- upc: "35646655",
118
- id_article: 76125,
119
- id_order: 125
71
+ "retailersWithService": ["59"],
72
+ "id_article": 84492,
73
+ "retailersAvailable": [{
74
+ "id": 59,
75
+ "name": "The Home Depot Platinum"
76
+ }]
120
77
  },
121
78
  productToEdit: {
122
- ArticleId: 76125,
123
- idCategory: "682",
124
- product: {
125
- orderId: 125,
126
- status: "AA",
127
- datasheet_status: "AA",
128
- prio: "none",
129
- version: 3,
130
- description_status: "AA",
131
- images_status: "AA",
132
- brand: "DESCRIPCION PRUEBA",
133
- retailerOrder: 0,
134
- missing: {
135
- datasheet: null,
136
- descriptions: null,
137
- images: null
79
+ "ArticleId": 84492,
80
+ "idCategory": "2454",
81
+ "product": {
82
+ "orderId": 3366,
83
+ "article_status": "AP",
84
+ "datasheet_status": "NS",
85
+ "description_status": "NS",
86
+ "images_status": "AP",
87
+ "prio": "none",
88
+ "version": 3,
89
+ "brand": null,
90
+ "article": {
91
+ "category": "Iluminación|Lámparas|Lámparas de Mesa",
92
+ "company_name": "Norday",
93
+ "id_company": 810,
94
+ "country": "México",
95
+ "id_category": "2454",
96
+ "id_article": 84492,
97
+ "name": "prueba dos",
98
+ "upc": "8375"
138
99
  },
139
- services: {
140
- datasheets: 1,
141
- descriptions: 1,
142
- images: 1
143
- },
144
- article: {
145
- category: "Salud y Belleza|Cosméticos y Accesorios|Cosméticos",
146
- company_name: "COMPANY DEV",
147
- country: "México",
148
- id_category: "682",
149
- id_datasheet_especialist: 54,
150
- id_datasheet_facilitator: 52,
151
- id_description_especialist: 55,
152
- id_description_facilitator: 52,
153
- id_images_especialist: 55,
154
- id_images_facilitator: 53,
155
- id_order: 125,
156
- id_article: 76125,
157
- id_auditor: 30,
158
- name: "prueba 11",
159
- timestamp: "2022-07-20T19:20:46.000Z",
160
- upc: "35646655"
161
- },
162
- retailers: [{
163
- id: 2,
164
- name: "Walmart Mercancías Generales"
165
- }, {
166
- id: 3,
167
- name: "Sam´s Club"
168
- }, {
169
- id: 5,
170
- name: "Chedraui"
100
+ "retailers": [{
101
+ "id": 59,
102
+ "name": "The Home Depot Platinum"
171
103
  }],
172
- statusByRetailer: {
173
- 2: {
174
- datasheet: "AA",
175
- datasheetTranslations: "AA",
176
- description: "AA",
177
- images: "AA"
178
- },
179
- 3: {
180
- datasheet: "AA",
181
- datasheetTranslations: "AA",
182
- description: "AA",
183
- images: "AA"
184
- },
185
- 5: {
186
- datasheet: "AA",
187
- datasheetTranslations: "AA",
188
- description: "AA",
189
- images: "AA"
104
+ "services": {
105
+ "datasheets": 0,
106
+ "descriptions": 0,
107
+ "images": 1
108
+ },
109
+ "statusByRetailer": {
110
+ "59": {
111
+ "images": "AP"
190
112
  }
191
113
  },
192
- retailersAvailable: [{
193
- id: 2,
194
- name: "Walmart Mercancías Generales"
195
- }, {
196
- id: 3,
197
- name: "Sam´s Club"
198
- }, {
199
- id: 5,
200
- name: "Chedraui"
201
- }],
202
- categoryName: "Salud y Belleza|Cosméticos y Accesorios|Cosméticos",
203
- upc: "35646655",
204
- id_article: 76125,
205
- id_order: 125
114
+ "retailersWithService": ["59"],
115
+ "id_article": 84492,
116
+ "retailersAvailable": [{
117
+ "id": 59,
118
+ "name": "The Home Depot Platinum"
119
+ }]
206
120
  }
207
121
  },
208
122
  location: {
@@ -211,50 +125,78 @@ ProviderProductEditionDefault.args = {
211
125
  }
212
126
  },
213
127
  user: {
214
- id_user: 28,
215
- name: "Proveedor",
216
- last_name: "Colgate",
217
- email: "ilopez@contentoh.com",
218
- position: "Prueba Admin",
219
- telephone: "+523111366336",
220
- country: "México",
221
- id_company: 1,
222
- id_cognito: "f5927f8e-cbf7-4922-9e09-e69ec0b2731a",
223
- birth_Date: null,
224
- about_me: null,
225
- zip_code: null,
226
- address: null,
227
- job: null,
228
- id_stripe: "cus_KuEt6R6vwmN09f",
229
- id_role: 0,
230
- active: 1,
231
- is_retailer: 0,
232
- email_notify: 1,
233
- membership: {
234
- id: 76,
235
- start_date: "2022-01-18T17:25:35.000Z",
236
- end_date: "2023-01-18T17:25:35.000Z",
237
- planID: 8,
238
- plan: "prod_KtlhECVSFG2iro",
239
- name: "Plan Pro",
240
- user_limit: "20",
241
- products_limit: "5000",
242
- type: "Enterprise"
128
+ "id_user": 59,
129
+ "name": "The Home",
130
+ "last_name": "Depot",
131
+ "email": "cadena.ismael@allfreemail.net",
132
+ "position": "Admin",
133
+ "telephone": "+523111366336",
134
+ "country": "México",
135
+ "id_company": 817,
136
+ "id_cognito": "5884ae34-59d6-4454-b98e-821518bcc3a7",
137
+ "birth_Date": null,
138
+ "about_me": "",
139
+ "zip_code": "",
140
+ "address": "",
141
+ "job": "",
142
+ "id_stripe": "",
143
+ "id_role": 0,
144
+ "active": 1,
145
+ "is_retailer": 1,
146
+ "email_notify": 0,
147
+ "is_user_tech": null,
148
+ "membership": {
149
+ "id": 47,
150
+ "start_date": "2022-05-25T14:31:12.000Z",
151
+ "end_date": "2023-05-25T14:31:12.000Z",
152
+ "planID": 5,
153
+ "plan": "prod_Ktl6B5Ou2gqTB2",
154
+ "name": "Plan Pro",
155
+ "user_limit": "5",
156
+ "products_limit": "500",
157
+ "type": "PyMES"
243
158
  },
244
- src: "https://content-management-profile.s3.amazonaws.com/id-28/28.png?1662106973155"
159
+ "src": "https://content-management-profile.s3.amazonaws.com/id-59/59.png?1668127460068"
245
160
  },
246
161
  company: {
247
- id_company: 1,
248
- trade_name: "COMPANY DEV",
249
- company_name: "COMPANY DEV",
250
- rfc: null,
251
- adress: "",
252
- about_company: "...",
253
- telephone: "",
254
- web_site: "",
255
- zip_code: "",
256
- email: null,
257
- social_link: "",
258
- is_retailer: 0
162
+ "id_company": 817,
163
+ "trade_name": "Retailer acc",
164
+ "company_name": "Retailer acc",
165
+ "rfc": "ASER12345",
166
+ "adress": "Av. Insurgentes",
167
+ "about_company": null,
168
+ "telephone": null,
169
+ "web_site": null,
170
+ "zip_code": null,
171
+ "email": null,
172
+ "social_link": null,
173
+ "is_retailer": 1,
174
+ "financedRetailers": [{
175
+ "id": 68,
176
+ "name": "The Home Depot Merchants",
177
+ "country": "México",
178
+ "id_region": 1,
179
+ "active": 1
180
+ }],
181
+ "retailers": [{
182
+ "id": 59,
183
+ "name": "The Home Depot Platinum",
184
+ "country": "México"
185
+ }, {
186
+ "id": 60,
187
+ "name": "The Home Depot Resizing",
188
+ "country": "México"
189
+ }, {
190
+ "id": 61,
191
+ "name": "Home Depot TAB",
192
+ "country": "México"
193
+ }, {
194
+ "id": 68,
195
+ "name": "The Home Depot Merchants",
196
+ "country": "México"
197
+ }]
198
+ },
199
+ showSurvey: function showSurvey(v) {
200
+ return v && alert('se muestra');
259
201
  }
260
202
  };
@@ -1409,7 +1409,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1409
1409
  var _ref13 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12(result) {
1410
1410
  var _productTemp$id_order;
1411
1411
 
1412
- var concept, productTemp, articleId, orderId, sectionStatusKey, evalStatus, data, retailerId, res, newStatuses, orderStatus, serviceStatus, newProductEdit, _JSON$parse, newArticleStatus, newServiceStatus, newStatus, retailerStatusCopy, status;
1412
+ var concept, productTemp, articleId, orderId, sectionStatusKey, evalStatus, data, retailerId, res, newStatuses, orderStatus, serviceStatus, newProductEdit, showSurveyByProvider, showSurveyByRetailer, _JSON$parse, newArticleStatus, newServiceStatus, newStatus, retailerStatusCopy, status;
1413
1413
 
1414
1414
  return _regenerator.default.wrap(function _callee12$(_context12) {
1415
1415
  while (1) {
@@ -1432,7 +1432,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1432
1432
  _context12.prev = 9;
1433
1433
 
1434
1434
  if (!result) {
1435
- _context12.next = 25;
1435
+ _context12.next = 27;
1436
1436
  break;
1437
1437
  }
1438
1438
 
@@ -1453,22 +1453,24 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1453
1453
  newProductEdit = productEdit;
1454
1454
  newProductEdit.product[sectionStatusKey] = serviceStatus;
1455
1455
  setProductEdit(newProductEdit);
1456
- showSurvey && showSurvey(!user.is_retailer && orderStatus[orderId] === "AP");
1457
- _context12.next = 28;
1456
+ showSurveyByProvider = !user.is_retailer && orderStatus[orderId] === "AP";
1457
+ showSurveyByRetailer = user.is_retailer && orderStatus[orderId] === "ACA";
1458
+ showSurvey && showSurvey(showSurveyByProvider || showSurveyByRetailer);
1459
+ _context12.next = 30;
1458
1460
  break;
1459
1461
 
1460
- case 25:
1461
- _context12.next = 27;
1462
+ case 27:
1463
+ _context12.next = 29;
1462
1464
  return _axios.default.put("".concat(process.env.REACT_APP_SEND_EVAL), data, {
1463
1465
  headers: {
1464
1466
  Authorization: token
1465
1467
  }
1466
1468
  });
1467
1469
 
1468
- case 27:
1470
+ case 29:
1469
1471
  res = _context12.sent;
1470
1472
 
1471
- case 28:
1473
+ case 30:
1472
1474
  if (res.data.statusCode === 200) {
1473
1475
  _JSON$parse = JSON.parse(res.data.body), newArticleStatus = _JSON$parse.newArticleStatus, newServiceStatus = _JSON$parse.newServiceStatus, newStatus = _JSON$parse.newStatus;
1474
1476
  if (newArticleStatus) productTemp.status = newArticleStatus[articleId];
@@ -1489,23 +1491,23 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1489
1491
  });
1490
1492
  }
1491
1493
 
1492
- _context12.next = 34;
1494
+ _context12.next = 36;
1493
1495
  break;
1494
1496
 
1495
- case 31:
1496
- _context12.prev = 31;
1497
+ case 33:
1498
+ _context12.prev = 33;
1497
1499
  _context12.t0 = _context12["catch"](9);
1498
1500
  console.log(_context12.t0);
1499
1501
 
1500
- case 34:
1502
+ case 36:
1501
1503
  loadData();
1502
1504
 
1503
- case 35:
1505
+ case 37:
1504
1506
  case "end":
1505
1507
  return _context12.stop();
1506
1508
  }
1507
1509
  }
1508
- }, _callee12, null, [[9, 31]]);
1510
+ }, _callee12, null, [[9, 33]]);
1509
1511
  }));
1510
1512
 
1511
1513
  return function sendEvaluation(_x7) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentoh-components-library",
3
- "version": "21.2.81",
3
+ "version": "21.2.82",
4
4
  "dependencies": {
5
5
  "@aws-amplify/auth": "^4.5.3",
6
6
  "@aws-amplify/datastore": "^3.11.0",