ng-easycommerce 0.0.627 → 0.0.628

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,5 @@
1
+ # version 0.0.628
2
+ - Se ajustó el método `less` en `product-detail.component` para que reciba y aplique correctamente la cantidad mínima (`minimumItemsQuantity`), evitando que la cantidad seleccionada del producto pueda ser inferior al mínimo establecido.
1
3
  # version 0.0.627
2
4
  - En el componente `filters-ec.component` se agrego un metodo `hasAppliedFilters` para verificar si hay filtros aplicados
3
5
  # version 0.0.626
@@ -11054,8 +11054,9 @@
11054
11054
  * @param changeAmount cantidad que se quiere restar.
11055
11055
  * @param forceMultiple si es true, obliga a que el resultado sea múltiplo de changeAmount.
11056
11056
  */
11057
- _this.less = function (changeAmount, forceMultiple) {
11057
+ _this.less = function (changeAmount, minimum, forceMultiple) {
11058
11058
  if (changeAmount === void 0) { changeAmount = 1; }
11059
+ if (minimum === void 0) { minimum = 1; }
11059
11060
  if (forceMultiple === void 0) { forceMultiple = false; }
11060
11061
  var newQuantity = _this.quantity - changeAmount;
11061
11062
  if (forceMultiple && changeAmount > 0) {
@@ -11069,9 +11070,12 @@
11069
11070
  newQuantity = changeAmount;
11070
11071
  }
11071
11072
  }
11072
- if (newQuantity >= 1) {
11073
+ if (newQuantity >= minimum) {
11073
11074
  _this.quantity = newQuantity;
11074
11075
  }
11076
+ else {
11077
+ _this.quantity = minimum;
11078
+ }
11075
11079
  };
11076
11080
  _this.showContact = function () { return _this.show = true; };
11077
11081
  _this.hideContact = function () { return _this.show = false; };