ng-easycommerce 0.0.674 → 0.0.676

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/README.md CHANGED
@@ -1,3 +1,10 @@
1
+ # Version 0.0.676
2
+ - Se agrega traduccion en ingles.
3
+ - Se modifica el mensaje de alerta de precio minimo de compra para que si tiene cuenta corriente no muestre la cantidad.
4
+ # version 0.0.675
5
+ - `PaginationService`: se corrige el flujo de búsqueda/paginado cuando la respuesta no trae `links.next` (búsquedas sin resultados), evitando errores de `slice` sobre `undefined`.
6
+ - `PaginationService.cleanRoute`: ahora valida rutas vacías/undefined y retorna string seguro.
7
+ - `PaginationService.initialize`: emite `finishedSubject.next(false)` al iniciar una nueva búsqueda para resetear correctamente el estado de carga/finalización.
1
8
  # version 0.0.674
2
9
  - Checkout single (envíos): `shipping-option` vuelve a enviar los datos que antes se persistían vía `shipping-contract` para contratos de sucursal OCA.
3
10
  - Checkout single (envíos): se completa el payload con `name`, `price`, `selected`, datos de sucursal (`street`, `number`, `province`, `city`, `code`, `description`, `address`, `computed`) y claves de método (`shipping_method_contract`, `shipping_method_branch_code`).
@@ -423,6 +423,7 @@
423
423
  "clientTaxes": "Impuesto por cliente",
424
424
  "email_already_registered": "El email ingresado ya se encuentra registrado.",
425
425
  "quantity-not-exceeded": "Debe realizar un pedido con un monto mínimo de {{ amount }} para finalizar su compra.",
426
+ "quantity-not-exceeded-whitout-amount": "No llega a la cantidad mínima para finalizar su compra.",
426
427
  "mail-enter": "Correo electronico",
427
428
  "this-payment-method-cannot-be-used": "Por el momento este método no está disponible, por favor elige otro.",
428
429
  "payment-date": "Fecha de pago",
@@ -750,13 +750,14 @@
750
750
  _this.nextSubject.next(response.items);
751
751
  _this.waiting = false;
752
752
  };
753
- this.cleanRoute = function (route) { return route.slice(1); };
753
+ this.cleanRoute = function (route) { return route ? route.slice(1) : ''; };
754
754
  this.isFinished = function () { return _this.finished; };
755
755
  }
756
756
  PaginationService.prototype.initialize = function (api, limit, initialValues) {
757
757
  this.api = api;
758
758
  this.limit = limit || this.limit || 10;
759
759
  this.finished = false;
760
+ this.finishedSubject.next(false);
760
761
  this.nextSubject.next([]);
761
762
  };
762
763
  PaginationService.prototype.getNext = function (next) {
@@ -767,7 +768,7 @@
767
768
  ? this.connection.get(this.api, { limit: this.limit, page: 1 })
768
769
  : this.connection.get(this.api);
769
770
  !this.finished && nextProducts.subscribe(function (response) {
770
- response.links ? _this.updatePageData(response) : _this.finalize(response);
771
+ response.links && response.links.next ? _this.updatePageData(response) : _this.finalize(response);
771
772
  next && next(response);
772
773
  });
773
774
  return true;
@@ -7887,7 +7888,22 @@
7887
7888
  _this.getMinimumPurchaseAmount = function () {
7888
7889
  return _this.channel.type == 'b2b' ? _this.channel.wholesalerMinimumPurchaseAmount : _this.channel.retailerMinimumPurchaseAmount;
7889
7890
  };
7890
- _this.exceedsMinimumAmount = function (value) { return value >= _this.getMinimumPurchaseAmount() ? _this.redirectCheckout() : _this.toastrService.show('quantity-not-exceeded', { amount: _this.getMinimumPurchaseAmount() }); };
7891
+ _this.exceedsMinimumAmount = function (value) {
7892
+ if (value >= _this.getMinimumPurchaseAmount()) {
7893
+ return _this.redirectCheckout();
7894
+ }
7895
+ else {
7896
+ // Verificar si hay un balance de cliente activo
7897
+ _this.cartService.balanceCustomer$.subscribe(function (balanceCustomer) {
7898
+ if (balanceCustomer && balanceCustomer.creditAmount !== null && balanceCustomer.creditAmount !== undefined) {
7899
+ _this.toastrService.show('quantity-not-exceeded-whitout-amount');
7900
+ }
7901
+ else {
7902
+ _this.toastrService.show('quantity-not-exceeded', { amount: _this.getMinimumPurchaseAmount() });
7903
+ }
7904
+ }).unsubscribe(); // Desuscribirse inmediatamente después de obtener el valor
7905
+ }
7906
+ };
7891
7907
  _this.ecOnConstruct();
7892
7908
  _this.isLoggedIn = _this.authService.isAuthenticated();
7893
7909
  _this.mediaUrl = _this.consts.mediaUrl();