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
@@ -16,244 +16,187 @@ ProviderProductEditionDefault.args = {
16
16
  Imágenes: true,
17
17
  },
18
18
  token:
19
- "eeyJraWQiOiJkQWJkZCtlclw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JbpinyPv_38xvwwT_td3M_vP3xEffZ6dI0Xl3B9EVjPF7uW4ctZ_B7nKydPyUcB6LTaYEzCI1RfAgZpUQUFbYTfFHJ3T9kgwa9b9mDeDx3kiy2GK3CdYIuWiii5ZivxVKK10gV871OvxDish4w-vEOsClXDncoTX2zAx3wDM4xO83UdI0ahECOTYszuGB3FRnkrHnWJO0b2dpsyhqAmhw0aEcw6gwbqP5l-spOjMM3lE-bGm89pK_9oLYcyRMr09vcGJartmk_ctUisCflrYudnwVgwTwCi1PRBkiaUoDywYeGr6HxRoU1zsiC3LwB-m9b2YnNhEZmPanLfPstKVbw",
20
20
  articleId: 238,
21
21
  category: 846,
22
22
  version: 2,
23
23
  productSelected: {
24
- orderId: 125,
25
- status: "AA",
26
- datasheet_status: "AA",
27
- prio: "none",
28
- version: 3,
29
- description_status: "AA",
30
- images_status: "AA",
31
- brand: "DESCRIPCION PRUEBA",
32
- retailerOrder: 0,
33
- missing: {
34
- datasheet: null,
35
- descriptions: null,
36
- images: null,
24
+ "orderId": 3366,
25
+ "article_status": "AP",
26
+ "datasheet_status": "NS",
27
+ "description_status": "NS",
28
+ "images_status": "AP",
29
+ "prio": "none",
30
+ "version": 3,
31
+ "brand": null,
32
+ "article": {
33
+ "category": "Iluminación|Lámparas|Lámparas de Mesa",
34
+ "company_name": "Norday",
35
+ "id_company": 810,
36
+ "country": "México",
37
+ "id_category": "2454",
38
+ "id_article": 84492,
39
+ "name": "prueba dos",
40
+ "upc": "8375"
37
41
  },
38
- services: {
39
- datasheets: 1,
40
- descriptions: 1,
41
- images: 1,
42
- },
43
- article: {
44
- category: "Salud y Belleza|Cosméticos y Accesorios|Cosméticos",
45
- company_name: "COMPANY DEV",
46
- country: "México",
47
- id_category: "682",
48
- id_datasheet_especialist: 54,
49
- id_datasheet_facilitator: 52,
50
- id_description_especialist: 55,
51
- id_description_facilitator: 52,
52
- id_images_especialist: 55,
53
- id_images_facilitator: 53,
54
- id_order: 125,
55
- id_article: 76125,
56
- id_auditor: 30,
57
- name: "prueba 11",
58
- timestamp: "2022-07-20T19:20:46.000Z",
59
- upc: "35646655",
60
- },
61
- retailers: [
62
- {
63
- id: 2,
64
- name: "Walmart Mercancías Generales",
65
- },
66
- {
67
- id: 3,
68
- name: "Sam´s Club",
69
- },
70
- {
71
- id: 5,
72
- name: "Chedraui",
73
- },
42
+ "retailers": [
43
+ {
44
+ "id": 59,
45
+ "name": "The Home Depot Platinum"
46
+ }
74
47
  ],
75
- statusByRetailer: {
76
- 2: {
77
- datasheet: "AA",
78
- datasheetTranslations: "AA",
79
- description: "AA",
80
- images: "AA",
81
- },
82
- 3: {
83
- datasheet: "AA",
84
- datasheetTranslations: "AA",
85
- description: "AA",
86
- images: "AA",
87
- },
88
- 5: {
89
- datasheet: "AA",
90
- datasheetTranslations: "AA",
91
- description: "AA",
92
- images: "AA",
93
- },
48
+ "services": {
49
+ "datasheets": 0,
50
+ "descriptions": 0,
51
+ "images": 1
52
+ },
53
+ "statusByRetailer": {
54
+ "59": {
55
+ "images": "AP"
56
+ }
94
57
  },
95
- retailersAvailable: [
96
- {
97
- id: 2,
98
- name: "Walmart Mercancías Generales",
99
- },
100
- {
101
- id: 3,
102
- name: "Sam´s Club",
103
- },
104
- {
105
- id: 5,
106
- name: "Chedraui",
107
- },
58
+ "retailersWithService": [
59
+ "59"
108
60
  ],
109
- categoryName: "Salud y Belleza|Cosméticos y Accesorios|Cosméticos",
110
- upc: "35646655",
111
- id_article: 76125,
112
- id_order: 125,
61
+ "id_article": 84492,
62
+ "retailersAvailable": [
63
+ {
64
+ "id": 59,
65
+ "name": "The Home Depot Platinum"
66
+ }
67
+ ]
113
68
  },
114
69
  productToEdit: {
115
- ArticleId: 76125,
116
- idCategory: "682",
117
- product: {
118
- orderId: 125,
119
- status: "AA",
120
- datasheet_status: "AA",
121
- prio: "none",
122
- version: 3,
123
- description_status: "AA",
124
- images_status: "AA",
125
- brand: "DESCRIPCION PRUEBA",
126
- retailerOrder: 0,
127
- missing: {
128
- datasheet: null,
129
- descriptions: null,
130
- images: null,
131
- },
132
- services: {
133
- datasheets: 1,
134
- descriptions: 1,
135
- images: 1,
136
- },
137
- article: {
138
- category: "Salud y Belleza|Cosméticos y Accesorios|Cosméticos",
139
- company_name: "COMPANY DEV",
140
- country: "México",
141
- id_category: "682",
142
- id_datasheet_especialist: 54,
143
- id_datasheet_facilitator: 52,
144
- id_description_especialist: 55,
145
- id_description_facilitator: 52,
146
- id_images_especialist: 55,
147
- id_images_facilitator: 53,
148
- id_order: 125,
149
- id_article: 76125,
150
- id_auditor: 30,
151
- name: "prueba 11",
152
- timestamp: "2022-07-20T19:20:46.000Z",
153
- upc: "35646655",
154
- },
155
- retailers: [
156
- {
157
- id: 2,
158
- name: "Walmart Mercancías Generales",
159
- },
160
- {
161
- id: 3,
162
- name: "Sam´s Club",
163
- },
164
- {
165
- id: 5,
166
- name: "Chedraui",
167
- },
168
- ],
169
- statusByRetailer: {
170
- 2: {
171
- datasheet: "AA",
172
- datasheetTranslations: "AA",
173
- description: "AA",
174
- images: "AA",
70
+ "ArticleId": 84492,
71
+ "idCategory": "2454",
72
+ "product": {
73
+ "orderId": 3366,
74
+ "article_status": "AP",
75
+ "datasheet_status": "NS",
76
+ "description_status": "NS",
77
+ "images_status": "AP",
78
+ "prio": "none",
79
+ "version": 3,
80
+ "brand": null,
81
+ "article": {
82
+ "category": "Iluminación|Lámparas|Lámparas de Mesa",
83
+ "company_name": "Norday",
84
+ "id_company": 810,
85
+ "country": "México",
86
+ "id_category": "2454",
87
+ "id_article": 84492,
88
+ "name": "prueba dos",
89
+ "upc": "8375"
175
90
  },
176
- 3: {
177
- datasheet: "AA",
178
- datasheetTranslations: "AA",
179
- description: "AA",
180
- images: "AA",
91
+ "retailers": [
92
+ {
93
+ "id": 59,
94
+ "name": "The Home Depot Platinum"
95
+ }
96
+ ],
97
+ "services": {
98
+ "datasheets": 0,
99
+ "descriptions": 0,
100
+ "images": 1
181
101
  },
182
- 5: {
183
- datasheet: "AA",
184
- datasheetTranslations: "AA",
185
- description: "AA",
186
- images: "AA",
102
+ "statusByRetailer": {
103
+ "59": {
104
+ "images": "AP"
105
+ }
187
106
  },
188
- },
189
- retailersAvailable: [
190
- {
191
- id: 2,
192
- name: "Walmart Mercancías Generales",
193
- },
194
- {
195
- id: 3,
196
- name: "Sam´s Club",
197
- },
198
- {
199
- id: 5,
200
- name: "Chedraui",
201
- },
202
- ],
203
- categoryName: "Salud y Belleza|Cosméticos y Accesorios|Cosméticos",
204
- upc: "35646655",
205
- id_article: 76125,
206
- id_order: 125,
207
- },
107
+ "retailersWithService": [
108
+ "59"
109
+ ],
110
+ "id_article": 84492,
111
+ "retailersAvailable": [
112
+ {
113
+ "id": 59,
114
+ "name": "The Home Depot Platinum"
115
+ }
116
+ ]
117
+ }
208
118
  },
209
119
  location: {
210
120
  state: { origin: "Contentoh" },
211
121
  },
212
122
  user: {
213
- id_user: 28,
214
- name: "Proveedor",
215
- last_name: "Colgate",
216
- email: "ilopez@contentoh.com",
217
- position: "Prueba Admin",
218
- telephone: "+523111366336",
219
- country: "México",
220
- id_company: 1,
221
- id_cognito: "f5927f8e-cbf7-4922-9e09-e69ec0b2731a",
222
- birth_Date: null,
223
- about_me: null,
224
- zip_code: null,
225
- address: null,
226
- job: null,
227
- id_stripe: "cus_KuEt6R6vwmN09f",
228
- id_role: 0,
229
- active: 1,
230
- is_retailer: 0,
231
- email_notify: 1,
232
- membership: {
233
- id: 76,
234
- start_date: "2022-01-18T17:25:35.000Z",
235
- end_date: "2023-01-18T17:25:35.000Z",
236
- planID: 8,
237
- plan: "prod_KtlhECVSFG2iro",
238
- name: "Plan Pro",
239
- user_limit: "20",
240
- products_limit: "5000",
241
- type: "Enterprise",
123
+ "id_user": 59,
124
+ "name": "The Home",
125
+ "last_name": "Depot",
126
+ "email": "cadena.ismael@allfreemail.net",
127
+ "position": "Admin",
128
+ "telephone": "+523111366336",
129
+ "country": "México",
130
+ "id_company": 817,
131
+ "id_cognito": "5884ae34-59d6-4454-b98e-821518bcc3a7",
132
+ "birth_Date": null,
133
+ "about_me": "",
134
+ "zip_code": "",
135
+ "address": "",
136
+ "job": "",
137
+ "id_stripe": "",
138
+ "id_role": 0,
139
+ "active": 1,
140
+ "is_retailer": 1,
141
+ "email_notify": 0,
142
+ "is_user_tech": null,
143
+ "membership": {
144
+ "id": 47,
145
+ "start_date": "2022-05-25T14:31:12.000Z",
146
+ "end_date": "2023-05-25T14:31:12.000Z",
147
+ "planID": 5,
148
+ "plan": "prod_Ktl6B5Ou2gqTB2",
149
+ "name": "Plan Pro",
150
+ "user_limit": "5",
151
+ "products_limit": "500",
152
+ "type": "PyMES"
242
153
  },
243
- src: "https://content-management-profile.s3.amazonaws.com/id-28/28.png?1662106973155",
154
+ "src": "https://content-management-profile.s3.amazonaws.com/id-59/59.png?1668127460068"
244
155
  },
245
156
  company: {
246
- id_company: 1,
247
- trade_name: "COMPANY DEV",
248
- company_name: "COMPANY DEV",
249
- rfc: null,
250
- adress: "",
251
- about_company: "...",
252
- telephone: "",
253
- web_site: "",
254
- zip_code: "",
255
- email: null,
256
- social_link: "",
257
- is_retailer: 0,
157
+ "id_company": 817,
158
+ "trade_name": "Retailer acc",
159
+ "company_name": "Retailer acc",
160
+ "rfc": "ASER12345",
161
+ "adress": "Av. Insurgentes",
162
+ "about_company": null,
163
+ "telephone": null,
164
+ "web_site": null,
165
+ "zip_code": null,
166
+ "email": null,
167
+ "social_link": null,
168
+ "is_retailer": 1,
169
+ "financedRetailers": [
170
+ {
171
+ "id": 68,
172
+ "name": "The Home Depot Merchants",
173
+ "country": "México",
174
+ "id_region": 1,
175
+ "active": 1
176
+ }
177
+ ],
178
+ "retailers": [
179
+ {
180
+ "id": 59,
181
+ "name": "The Home Depot Platinum",
182
+ "country": "México"
183
+ },
184
+ {
185
+ "id": 60,
186
+ "name": "The Home Depot Resizing",
187
+ "country": "México"
188
+ },
189
+ {
190
+ "id": 61,
191
+ "name": "Home Depot TAB",
192
+ "country": "México"
193
+ },
194
+ {
195
+ "id": 68,
196
+ "name": "The Home Depot Merchants",
197
+ "country": "México"
198
+ }
199
+ ]
258
200
  },
201
+ showSurvey: (v) => v && alert('se muestra'),
259
202
  };
@@ -877,8 +877,10 @@ export const ProviderProductEdition = ({
877
877
  const newProductEdit = productEdit;
878
878
  newProductEdit.product[sectionStatusKey] = serviceStatus;
879
879
  setProductEdit(newProductEdit);
880
- showSurvey &&
881
- showSurvey(!user.is_retailer && orderStatus[orderId] === "AP");
880
+ const showSurveyByProvider = !user.is_retailer && orderStatus[orderId] === "AP";
881
+ const showSurveyByRetailer = user.is_retailer && orderStatus[orderId] === "ACA";
882
+ showSurvey &&
883
+ showSurvey(showSurveyByProvider || showSurveyByRetailer);
882
884
  } else {
883
885
  res = await axios.put(`${process.env.REACT_APP_SEND_EVAL}`, data, {
884
886
  headers: {