ng-easycommerce 0.0.675 → 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,6 @@
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.
1
4
  # version 0.0.675
2
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`.
3
6
  - `PaginationService.cleanRoute`: ahora valida rutas vacías/undefined y retorna string seguro.
@@ -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",
@@ -7888,7 +7888,22 @@
7888
7888
  _this.getMinimumPurchaseAmount = function () {
7889
7889
  return _this.channel.type == 'b2b' ? _this.channel.wholesalerMinimumPurchaseAmount : _this.channel.retailerMinimumPurchaseAmount;
7890
7890
  };
7891
- _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
+ };
7892
7907
  _this.ecOnConstruct();
7893
7908
  _this.isLoggedIn = _this.authService.isAuthenticated();
7894
7909
  _this.mediaUrl = _this.consts.mediaUrl();