contentoh-components-library 21.6.59 → 21.6.60
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/pages/RetailerProductEdition/context/provider-product-edition.context.js
CHANGED
|
@@ -346,9 +346,9 @@ var ProviderProductEditionProvider = function ProviderProductEditionProvider(_re
|
|
|
346
346
|
// Imágenes/videos recién agregados a la galería (aún sin id en BD).
|
|
347
347
|
newImages = ((_state$images_values = state.images_values) === null || _state$images_values === void 0 ? void 0 : (_state$images_values$ = _state$images_values.values) === null || _state$images_values$ === void 0 ? void 0 : _state$images_values$.filter(function (e) {
|
|
348
348
|
return !e.id;
|
|
349
|
-
})) || []; // Salir solo si no hay nada que crear ni
|
|
349
|
+
})) || []; // Salir solo si no hay nada que crear, actualizar, ni atributos de imagen pendientes.
|
|
350
350
|
|
|
351
|
-
if (!(state.updated_images_values.length === 0 && newImages.length === 0)) {
|
|
351
|
+
if (!(state.updated_images_values.length === 0 && newImages.length === 0 && state.updated_attr_for_imgs.length === 0)) {
|
|
352
352
|
_context3.next = 3;
|
|
353
353
|
break;
|
|
354
354
|
}
|
package/package.json
CHANGED
package/src/components/pages/RetailerProductEdition/context/provider-product-edition.context.jsx
CHANGED
|
@@ -261,8 +261,12 @@ export const ProviderProductEditionProvider = ({ children }) => {
|
|
|
261
261
|
const updateImages = async (token) => {
|
|
262
262
|
// Imágenes/videos recién agregados a la galería (aún sin id en BD).
|
|
263
263
|
const newImages = state.images_values?.values?.filter((e) => !e.id) || [];
|
|
264
|
-
// Salir solo si no hay nada que crear ni
|
|
265
|
-
if (
|
|
264
|
+
// Salir solo si no hay nada que crear, actualizar, ni atributos de imagen pendientes.
|
|
265
|
+
if (
|
|
266
|
+
state.updated_images_values.length === 0 &&
|
|
267
|
+
newImages.length === 0 &&
|
|
268
|
+
state.updated_attr_for_imgs.length === 0
|
|
269
|
+
)
|
|
266
270
|
return;
|
|
267
271
|
const updatedImages = state.updated_images_values;
|
|
268
272
|
|