contentoh-components-library 21.5.99 → 21.6.1
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/GeneralButton/styles.js +1 -1
- package/dist/components/atoms/GeneralInput/index.js +249 -54
- package/dist/components/atoms/GeneralInput/styles.js +7 -3
- package/dist/components/atoms/InputFormatter/index.js +223 -68
- package/dist/components/atoms/InputFormatter/styles.js +20 -4
- package/dist/components/molecules/StatusAsignationInfo/index.js +11 -1
- package/dist/components/molecules/TabsMenu/index.js +13 -1
- package/dist/components/molecules/TagAndInput/index.js +364 -24
- package/dist/components/molecules/TagAndInput/styles.js +2 -2
- package/dist/components/organisms/FullProductNameHeader/index.js +6 -22
- package/dist/components/organisms/InputGroup/index.js +22 -18
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +150 -337
- package/dist/components/pages/ProviderProductEdition/context/provider-product-edition.context.js +15 -15
- package/dist/components/pages/ProviderProductEdition/index.js +393 -352
- package/dist/components/pages/ProviderProductEdition/utils.js +1 -0
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +125 -211
- package/dist/components/pages/RetailerProductEdition/index.js +1743 -2239
- package/dist/components/pages/RetailerProductEdition/styles.js +4 -2
- package/dist/components/pages/RetailerProductEdition/utils.js +251 -2
- package/dist/contexts/AiProductEdition.js +34 -22
- package/package.json +4 -2
- package/src/ai/utils/compare-strings.js +45 -0
- package/src/assets/images/Icons/arrow.png +0 -0
- package/src/assets/images/Icons/cancel.png +0 -0
- package/src/assets/images/Icons/ia-icon.png +0 -0
- package/src/assets/images/Icons/loading.svg +5 -0
- package/src/assets/images/Icons/reload.png +0 -0
- package/src/components/atoms/GeneralButton/styles.js +4 -0
- package/src/components/atoms/GeneralInput/index.js +241 -60
- package/src/components/atoms/GeneralInput/styles.js +81 -0
- package/src/components/atoms/InputFormatter/index.js +200 -51
- package/src/components/atoms/InputFormatter/styles.js +284 -0
- package/src/components/atoms/RetailerSelector/RetailerSelector.stories.js +10 -0
- package/src/components/atoms/RetailerSelector/index.js +3 -0
- package/src/components/atoms/RetailerSelector/styles.js +0 -0
- package/src/components/molecules/StatusAsignationInfo/index.js +9 -1
- package/src/components/molecules/TabsMenu/index.js +12 -0
- package/src/components/molecules/TagAndInput/index.js +294 -21
- package/src/components/molecules/TagAndInput/styles.js +59 -17
- package/src/components/organisms/ChangeStatusModal/index.jsx +488 -0
- package/src/components/organisms/ChangeStatusModal/styles.js +333 -0
- package/src/components/organisms/FullProductNameHeader/index.js +4 -28
- package/src/components/organisms/FullTabsMenu/index.js +1 -1
- package/src/components/organisms/InputGroup/index.js +12 -4
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +174 -202
- package/src/components/pages/ProviderProductEdition/context/provider-product-edition.context.jsx +14 -14
- package/src/components/pages/ProviderProductEdition/index.js +486 -417
- package/src/components/pages/ProviderProductEdition/utils.js +2 -2
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +136 -243
- package/src/components/pages/RetailerProductEdition/context/provider-product-edition.context.jsx +575 -0
- package/src/components/pages/RetailerProductEdition/context/provider-product-edition.reducer.js +62 -0
- package/src/components/pages/RetailerProductEdition/context/reducers/active-state.js +344 -0
- package/src/components/pages/RetailerProductEdition/context/reducers/inputs.js +155 -0
- package/src/components/pages/RetailerProductEdition/context/reducers/product.js +114 -0
- package/src/components/pages/RetailerProductEdition/context/reducers/system.js +60 -0
- package/src/components/pages/RetailerProductEdition/index.js +1580 -1719
- package/src/components/pages/RetailerProductEdition/index_old.js +1979 -0
- package/src/components/pages/RetailerProductEdition/stories/Auditor.stories.js +101 -0
- package/src/components/pages/RetailerProductEdition/stories/ImageEditor.stories.js +115 -0
- package/src/components/pages/RetailerProductEdition/stories/TextEditor.stories.js +174 -0
- package/src/components/pages/RetailerProductEdition/styles.js +67 -2
- package/src/components/pages/RetailerProductEdition/utils.js +240 -0
- package/src/contexts/AiProductEdition.jsx +356 -0
- package/src/global-files/statusDictionary.js +103 -0
|
@@ -36,357 +36,170 @@ ProviderProductEditionFromProducts.args = {
|
|
|
36
36
|
category: 102,
|
|
37
37
|
version: 3,
|
|
38
38
|
productSelected: {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
39
|
+
"orderId": 10458,
|
|
40
|
+
"status": "AA",
|
|
41
|
+
"datasheet_status": "AA",
|
|
42
|
+
"prio": "none",
|
|
43
|
+
"version": 3,
|
|
44
|
+
"description_status": "AA",
|
|
45
|
+
"images_status": "AA",
|
|
46
|
+
"brand": "Generico",
|
|
47
|
+
"retailerOrder": 0,
|
|
48
|
+
"missing": {
|
|
49
|
+
"datasheet": null,
|
|
50
|
+
"descriptions": null,
|
|
51
|
+
"images": null
|
|
52
|
+
},
|
|
53
|
+
"services": {
|
|
54
|
+
"datasheets": 1,
|
|
55
|
+
"descriptions": 1,
|
|
56
|
+
"images": 1
|
|
57
|
+
},
|
|
58
|
+
"article": {
|
|
59
|
+
"category": "Bebé|Actividad y Entretenimiento|Actividad y Entretenimiento",
|
|
60
|
+
"company_name": "LATAM LOGISTICS",
|
|
61
|
+
"country": "México",
|
|
62
|
+
"id_category": "6186",
|
|
63
|
+
"id_datasheet_especialist": 426,
|
|
64
|
+
"id_datasheet_facilitator": null,
|
|
65
|
+
"id_description_especialist": 426,
|
|
66
|
+
"id_description_facilitator": null,
|
|
67
|
+
"id_images_especialist": 427,
|
|
68
|
+
"id_images_facilitator": null,
|
|
69
|
+
"id_order": 10458,
|
|
70
|
+
"id_article": 145207,
|
|
71
|
+
"id_auditor": 425,
|
|
72
|
+
"name": "Serna Status Bug 5",
|
|
73
|
+
"timestamp": "2026-05-07T15:00:25.000Z",
|
|
74
|
+
"upc": "897654352",
|
|
75
|
+
"sku": "764535242",
|
|
76
|
+
"categoryRetailer": [{
|
|
77
|
+
"id_category": 4010,
|
|
78
|
+
"id_retailer": 70,
|
|
79
|
+
"category_name": "Accesorios de Bebés|Cuarto del Bebé Niño|Cuarto del Bebé Niño",
|
|
80
|
+
"retailer_name": "Bodega Aurrera"
|
|
81
|
+
}, {
|
|
82
|
+
"id_category": 6186,
|
|
83
|
+
"id_retailer": 9,
|
|
84
|
+
"category_name": "Bebé|Actividad y Entretenimiento|Actividad y Entretenimiento",
|
|
85
|
+
"retailer_name": "Amazon"
|
|
86
|
+
}]
|
|
87
|
+
},
|
|
88
|
+
"retailers": [{
|
|
89
|
+
"id": 9,
|
|
90
|
+
"name": "Amazon"
|
|
60
91
|
}, {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
categoryName: "Ropa, Accesorios, Fragancias y Joyería|Accesorios|Bolsas",
|
|
64
|
-
retailerName: "Palacio de Hierro"
|
|
92
|
+
"id": 70,
|
|
93
|
+
"name": "Bodega Aurrera"
|
|
65
94
|
}],
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
general: 79.72
|
|
95
|
+
"statusByRetailer": {
|
|
96
|
+
"9": {
|
|
97
|
+
"datasheet": "AA",
|
|
98
|
+
"description": "AA",
|
|
99
|
+
"images": "AA"
|
|
72
100
|
},
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
images: {
|
|
78
|
-
required: 100,
|
|
79
|
-
general: 80.01,
|
|
80
|
-
details: {
|
|
81
|
-
mandatoryShots: {
|
|
82
|
-
total: 1,
|
|
83
|
-
completed: 1,
|
|
84
|
-
percentage: 100
|
|
85
|
-
},
|
|
86
|
-
optionalShots: {
|
|
87
|
-
total: 35,
|
|
88
|
-
completed: 3,
|
|
89
|
-
percentage: 8.57
|
|
90
|
-
},
|
|
91
|
-
namingAttributes: {
|
|
92
|
-
total: 1,
|
|
93
|
-
completed: 1,
|
|
94
|
-
percentage: 100
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
percentagesGeneral: {
|
|
99
|
-
required: 100,
|
|
100
|
-
general: 63.6
|
|
101
|
+
"70": {
|
|
102
|
+
"datasheet": "AA",
|
|
103
|
+
"description": "AA",
|
|
104
|
+
"images": "AA"
|
|
101
105
|
}
|
|
106
|
+
},
|
|
107
|
+
"retailersAvailable": [{
|
|
108
|
+
"id": 9,
|
|
109
|
+
"name": "Amazon"
|
|
102
110
|
}, {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
datasheet: {
|
|
106
|
-
required: 100,
|
|
107
|
-
general: 98.46
|
|
108
|
-
},
|
|
109
|
-
descriptions: {
|
|
110
|
-
required: 100,
|
|
111
|
-
general: 100
|
|
112
|
-
},
|
|
113
|
-
images: {
|
|
114
|
-
required: 100,
|
|
115
|
-
general: 80.01,
|
|
116
|
-
details: {
|
|
117
|
-
mandatoryShots: {
|
|
118
|
-
total: 1,
|
|
119
|
-
completed: 1,
|
|
120
|
-
percentage: 100
|
|
121
|
-
},
|
|
122
|
-
optionalShots: {
|
|
123
|
-
total: 35,
|
|
124
|
-
completed: 3,
|
|
125
|
-
percentage: 8.57
|
|
126
|
-
},
|
|
127
|
-
namingAttributes: {
|
|
128
|
-
total: 1,
|
|
129
|
-
completed: 1,
|
|
130
|
-
percentage: 100
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
percentagesGeneral: {
|
|
135
|
-
required: 100,
|
|
136
|
-
general: 69.85
|
|
137
|
-
}
|
|
111
|
+
"id": 70,
|
|
112
|
+
"name": "Bodega Aurrera"
|
|
138
113
|
}],
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
},
|
|
144
|
-
article: {
|
|
145
|
-
id_article: 84864
|
|
146
|
-
}
|
|
114
|
+
"categoryName": "Bebé|Actividad y Entretenimiento|Actividad y Entretenimiento",
|
|
115
|
+
"upc": "897654352",
|
|
116
|
+
"id_article": 145207,
|
|
117
|
+
"id_order": 10458
|
|
147
118
|
},
|
|
148
119
|
productToEdit: {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
product:
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
},
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
120
|
+
"ArticleId": 145207,
|
|
121
|
+
"idCategory": "6186",
|
|
122
|
+
"product": {
|
|
123
|
+
"orderId": 10458,
|
|
124
|
+
"status": "AA",
|
|
125
|
+
"datasheet_status": "AA",
|
|
126
|
+
"prio": "none",
|
|
127
|
+
"version": 3,
|
|
128
|
+
"description_status": "AA",
|
|
129
|
+
"images_status": "AA",
|
|
130
|
+
"brand": "Generico",
|
|
131
|
+
"retailerOrder": 0,
|
|
132
|
+
"missing": {
|
|
133
|
+
"datasheet": null,
|
|
134
|
+
"descriptions": null,
|
|
135
|
+
"images": null
|
|
136
|
+
},
|
|
137
|
+
"services": {
|
|
138
|
+
"datasheets": 1,
|
|
139
|
+
"descriptions": 1,
|
|
140
|
+
"images": 1
|
|
141
|
+
},
|
|
142
|
+
"article": {
|
|
143
|
+
"category": "Bebé|Actividad y Entretenimiento|Actividad y Entretenimiento",
|
|
144
|
+
"company_name": "LATAM LOGISTICS",
|
|
145
|
+
"country": "México",
|
|
146
|
+
"id_category": "6186",
|
|
147
|
+
"id_datasheet_especialist": 426,
|
|
148
|
+
"id_datasheet_facilitator": null,
|
|
149
|
+
"id_description_especialist": 426,
|
|
150
|
+
"id_description_facilitator": null,
|
|
151
|
+
"id_images_especialist": 427,
|
|
152
|
+
"id_images_facilitator": null,
|
|
153
|
+
"id_order": 10458,
|
|
154
|
+
"id_article": 145207,
|
|
155
|
+
"id_auditor": 425,
|
|
156
|
+
"name": "Serna Status Bug 5",
|
|
157
|
+
"timestamp": "2026-05-07T15:00:25.000Z",
|
|
158
|
+
"upc": "897654352",
|
|
159
|
+
"sku": "764535242",
|
|
160
|
+
"categoryRetailer": [{
|
|
161
|
+
"id_category": 4010,
|
|
162
|
+
"id_retailer": 70,
|
|
163
|
+
"category_name": "Accesorios de Bebés|Cuarto del Bebé Niño|Cuarto del Bebé Niño",
|
|
164
|
+
"retailer_name": "Bodega Aurrera"
|
|
165
|
+
}, {
|
|
166
|
+
"id_category": 6186,
|
|
167
|
+
"id_retailer": 9,
|
|
168
|
+
"category_name": "Bebé|Actividad y Entretenimiento|Actividad y Entretenimiento",
|
|
169
|
+
"retailer_name": "Amazon"
|
|
170
|
+
}]
|
|
171
|
+
},
|
|
172
|
+
"retailers": [{
|
|
173
|
+
"id": 9,
|
|
174
|
+
"name": "Amazon"
|
|
197
175
|
}, {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
categoryName: "Categoría Supermercado|Categoría Supermercado|Categoría Supermercado",
|
|
201
|
-
retailerName: "Chedraui"
|
|
176
|
+
"id": 70,
|
|
177
|
+
"name": "Bodega Aurrera"
|
|
202
178
|
}],
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
general: 10
|
|
209
|
-
},
|
|
210
|
-
descriptions: {
|
|
211
|
-
required: 0,
|
|
212
|
-
general: 0
|
|
179
|
+
"statusByRetailer": {
|
|
180
|
+
"9": {
|
|
181
|
+
"datasheet": "AA",
|
|
182
|
+
"description": "AA",
|
|
183
|
+
"images": "AA"
|
|
213
184
|
},
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
mandatoryShots: {
|
|
219
|
-
total: 2,
|
|
220
|
-
completed: 1,
|
|
221
|
-
percentage: 50
|
|
222
|
-
},
|
|
223
|
-
optionalShots: {
|
|
224
|
-
total: 10,
|
|
225
|
-
completed: 0,
|
|
226
|
-
percentage: 0
|
|
227
|
-
},
|
|
228
|
-
namingAttributes: {
|
|
229
|
-
total: 1,
|
|
230
|
-
completed: 1,
|
|
231
|
-
percentage: 100
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
},
|
|
235
|
-
percentagesGeneral: {
|
|
236
|
-
required: 23.33,
|
|
237
|
-
general: 6.11
|
|
238
|
-
}
|
|
239
|
-
}, {
|
|
240
|
-
id_retailer: 6,
|
|
241
|
-
id_category: 4767,
|
|
242
|
-
datasheet: {
|
|
243
|
-
required: 25,
|
|
244
|
-
general: 16.66
|
|
245
|
-
},
|
|
246
|
-
descriptions: {
|
|
247
|
-
required: 0,
|
|
248
|
-
general: 0
|
|
249
|
-
},
|
|
250
|
-
images: {
|
|
251
|
-
required: 100,
|
|
252
|
-
general: 80.01,
|
|
253
|
-
details: {
|
|
254
|
-
mandatoryShots: {
|
|
255
|
-
total: 1,
|
|
256
|
-
completed: 1,
|
|
257
|
-
percentage: 100
|
|
258
|
-
},
|
|
259
|
-
optionalShots: {
|
|
260
|
-
total: 36,
|
|
261
|
-
completed: 2,
|
|
262
|
-
percentage: 5.55
|
|
263
|
-
},
|
|
264
|
-
namingAttributes: {
|
|
265
|
-
total: 1,
|
|
266
|
-
completed: 1,
|
|
267
|
-
percentage: 100
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
},
|
|
271
|
-
percentagesGeneral: {
|
|
272
|
-
required: 41.67,
|
|
273
|
-
general: 8.25
|
|
274
|
-
}
|
|
275
|
-
}, {
|
|
276
|
-
id_retailer: 13,
|
|
277
|
-
id_category: 4941,
|
|
278
|
-
datasheet: {
|
|
279
|
-
required: 14.28,
|
|
280
|
-
general: 3.84
|
|
281
|
-
},
|
|
282
|
-
descriptions: {
|
|
283
|
-
required: 0,
|
|
284
|
-
general: 0
|
|
285
|
-
},
|
|
286
|
-
images: {
|
|
287
|
-
required: 100,
|
|
288
|
-
general: 80.01,
|
|
289
|
-
details: {
|
|
290
|
-
mandatoryShots: {
|
|
291
|
-
total: 1,
|
|
292
|
-
completed: 1,
|
|
293
|
-
percentage: 100
|
|
294
|
-
},
|
|
295
|
-
optionalShots: {
|
|
296
|
-
total: 37,
|
|
297
|
-
completed: 2,
|
|
298
|
-
percentage: 5.4
|
|
299
|
-
},
|
|
300
|
-
namingAttributes: {
|
|
301
|
-
total: 1,
|
|
302
|
-
completed: 1,
|
|
303
|
-
percentage: 100
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
},
|
|
307
|
-
percentagesGeneral: {
|
|
308
|
-
required: 38.09,
|
|
309
|
-
general: 3.91
|
|
310
|
-
}
|
|
311
|
-
}, {
|
|
312
|
-
id_retailer: 4,
|
|
313
|
-
id_category: 6098,
|
|
314
|
-
datasheet: {
|
|
315
|
-
required: 20,
|
|
316
|
-
general: 4.54
|
|
317
|
-
},
|
|
318
|
-
descriptions: {
|
|
319
|
-
required: 0,
|
|
320
|
-
general: 0
|
|
321
|
-
},
|
|
322
|
-
images: {
|
|
323
|
-
required: 100,
|
|
324
|
-
general: 80.01,
|
|
325
|
-
details: {
|
|
326
|
-
mandatoryShots: {
|
|
327
|
-
total: 1,
|
|
328
|
-
completed: 1,
|
|
329
|
-
percentage: 100
|
|
330
|
-
},
|
|
331
|
-
optionalShots: {
|
|
332
|
-
total: 37,
|
|
333
|
-
completed: 3,
|
|
334
|
-
percentage: 8.1
|
|
335
|
-
},
|
|
336
|
-
namingAttributes: {
|
|
337
|
-
total: 1,
|
|
338
|
-
completed: 1,
|
|
339
|
-
percentage: 100
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
},
|
|
343
|
-
percentagesGeneral: {
|
|
344
|
-
required: 40,
|
|
345
|
-
general: 5.02
|
|
185
|
+
"70": {
|
|
186
|
+
"datasheet": "AA",
|
|
187
|
+
"description": "AA",
|
|
188
|
+
"images": "AA"
|
|
346
189
|
}
|
|
190
|
+
},
|
|
191
|
+
"retailersAvailable": [{
|
|
192
|
+
"id": 9,
|
|
193
|
+
"name": "Amazon"
|
|
347
194
|
}, {
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
datasheet: {
|
|
351
|
-
required: 7.14,
|
|
352
|
-
general: 2.63
|
|
353
|
-
},
|
|
354
|
-
descriptions: {
|
|
355
|
-
required: 0,
|
|
356
|
-
general: 0
|
|
357
|
-
},
|
|
358
|
-
images: {
|
|
359
|
-
required: 100,
|
|
360
|
-
general: 80,
|
|
361
|
-
details: {
|
|
362
|
-
mandatoryShots: {
|
|
363
|
-
total: 1,
|
|
364
|
-
completed: 1,
|
|
365
|
-
percentage: 100
|
|
366
|
-
},
|
|
367
|
-
optionalShots: {
|
|
368
|
-
total: 34,
|
|
369
|
-
completed: 1,
|
|
370
|
-
percentage: 2.94
|
|
371
|
-
},
|
|
372
|
-
namingAttributes: {
|
|
373
|
-
total: 1,
|
|
374
|
-
completed: 1,
|
|
375
|
-
percentage: 100
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
},
|
|
379
|
-
percentagesGeneral: {
|
|
380
|
-
required: 35.71,
|
|
381
|
-
general: 2.78
|
|
382
|
-
}
|
|
195
|
+
"id": 70,
|
|
196
|
+
"name": "Bodega Aurrera"
|
|
383
197
|
}],
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
}]
|
|
198
|
+
"categoryName": "Bebé|Actividad y Entretenimiento|Actividad y Entretenimiento",
|
|
199
|
+
"upc": "897654352",
|
|
200
|
+
"id_article": 145207,
|
|
201
|
+
"id_order": 10458
|
|
202
|
+
}
|
|
390
203
|
},
|
|
391
204
|
location: {
|
|
392
205
|
pathname: "/EditProducts",
|
package/dist/components/pages/ProviderProductEdition/context/provider-product-edition.context.js
CHANGED
|
@@ -57,7 +57,20 @@ var myBucket = new _awsSdk.default.S3({
|
|
|
57
57
|
}); // Re-export ACTIONS for external use
|
|
58
58
|
|
|
59
59
|
// Create context
|
|
60
|
-
var ProductEditionContext = /*#__PURE__*/(0, _react.createContext)(); //
|
|
60
|
+
var ProductEditionContext = /*#__PURE__*/(0, _react.createContext)(); // Custom hook to use the context
|
|
61
|
+
|
|
62
|
+
var useProviderProductEdition = function useProviderProductEdition() {
|
|
63
|
+
var context = (0, _react.useContext)(ProductEditionContext);
|
|
64
|
+
|
|
65
|
+
if (!context) {
|
|
66
|
+
throw new Error("useProviderProductEdition must be used within a ProviderProductEditionProvider");
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return context;
|
|
70
|
+
}; // Provider component
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
exports.useProviderProductEdition = useProviderProductEdition;
|
|
61
74
|
|
|
62
75
|
var ProviderProductEditionProvider = function ProviderProductEditionProvider(_ref) {
|
|
63
76
|
var children = _ref.children;
|
|
@@ -604,17 +617,4 @@ var ProviderProductEditionProvider = function ProviderProductEditionProvider(_re
|
|
|
604
617
|
});
|
|
605
618
|
};
|
|
606
619
|
|
|
607
|
-
exports.ProviderProductEditionProvider = ProviderProductEditionProvider;
|
|
608
|
-
|
|
609
|
-
// Custom hook to use the context
|
|
610
|
-
var useProviderProductEdition = function useProviderProductEdition() {
|
|
611
|
-
var context = (0, _react.useContext)(ProductEditionContext);
|
|
612
|
-
|
|
613
|
-
if (!context) {
|
|
614
|
-
throw new Error("useProviderProductEdition must be used within a ProviderProductEditionProvider");
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
return context;
|
|
618
|
-
};
|
|
619
|
-
|
|
620
|
-
exports.useProviderProductEdition = useProviderProductEdition;
|
|
620
|
+
exports.ProviderProductEditionProvider = ProviderProductEditionProvider;
|