ng-easycommerce 0.0.465 → 0.0.466
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 +3 -0
- package/bundles/ng-easycommerce.umd.js +58 -6
- package/bundles/ng-easycommerce.umd.js.map +1 -1
- package/bundles/ng-easycommerce.umd.min.js +1 -1
- package/bundles/ng-easycommerce.umd.min.js.map +1 -1
- package/esm2015/lib/ec-component/product-detail-ec/product-detail-ec.component.js +28 -3
- package/esm2015/lib/ec-component/product-ec/product-ec.component.js +33 -5
- package/esm5/lib/ec-component/product-detail-ec/product-detail-ec.component.js +28 -3
- package/esm5/lib/ec-component/product-ec/product-ec.component.js +33 -5
- package/fesm2015/ng-easycommerce.js +58 -6
- package/fesm2015/ng-easycommerce.js.map +1 -1
- package/fesm5/ng-easycommerce.js +58 -6
- package/fesm5/ng-easycommerce.js.map +1 -1
- package/lib/ec-component/product-detail-ec/product-detail-ec.component.d.ts +11 -2
- package/lib/ec-component/product-ec/product-ec.component.d.ts +14 -3
- package/ng-easycommerce.metadata.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
# version 0.0.466
|
|
2
|
+
- Se mejoran las funciones **plus** y **less** de los componentes products y product-detail, para permitir agregar mas cantidad de uno y sus respectivos controles.
|
|
3
|
+
|
|
1
4
|
# version 0.0.465
|
|
2
5
|
- Se añade el metodo de pago Bancard-catastro (incompleto hasta esta version).
|
|
3
6
|
- Se añade un parametro en core.consts para poder seleccionar que paises mostrar en el checkout.
|
|
@@ -9262,8 +9262,33 @@
|
|
|
9262
9262
|
_this.saveRef = function (carousel) {
|
|
9263
9263
|
_this.carousel = carousel;
|
|
9264
9264
|
};
|
|
9265
|
-
|
|
9266
|
-
|
|
9265
|
+
/**
|
|
9266
|
+
* @description actualiza la variable quantity sumandole 'x' contenido.
|
|
9267
|
+
* @param stock debe recibir un number que contenga el stock disponible.
|
|
9268
|
+
* @param multipleQuantity debe recibir el multiplo de cantidad que se quiera incrementar.
|
|
9269
|
+
*/
|
|
9270
|
+
_this.plus = function (stock, multipleQuantity) {
|
|
9271
|
+
if (multipleQuantity && multipleQuantity > 0) {
|
|
9272
|
+
stock ? (_this.quantity < stock ? _this.quantity = _this.quantity + multipleQuantity : _this.toastrService.show('out-of-stock-actually'))
|
|
9273
|
+
: _this.quantity = _this.quantity + multipleQuantity;
|
|
9274
|
+
}
|
|
9275
|
+
else {
|
|
9276
|
+
stock ? (_this.quantity < stock ? _this.quantity = _this.quantity + 1 : _this.toastrService.show('out-of-stock-actually'))
|
|
9277
|
+
: _this.quantity = _this.quantity + 1;
|
|
9278
|
+
}
|
|
9279
|
+
};
|
|
9280
|
+
/**
|
|
9281
|
+
* @description actualiza la varible quantity restandole 'x' contenido.
|
|
9282
|
+
* @param multipleQuantity debe recibir el multiplo de cantidad que se quiera decrementar.
|
|
9283
|
+
*/
|
|
9284
|
+
_this.less = function (multipleQuantity) {
|
|
9285
|
+
if (multipleQuantity && multipleQuantity > 0) {
|
|
9286
|
+
_this.quantity > multipleQuantity ? _this.quantity = _this.quantity - multipleQuantity : null;
|
|
9287
|
+
}
|
|
9288
|
+
else {
|
|
9289
|
+
_this.quantity > 1 ? _this.quantity = _this.quantity - 1 : null;
|
|
9290
|
+
}
|
|
9291
|
+
};
|
|
9267
9292
|
_this.showContact = function () { return _this.show = true; };
|
|
9268
9293
|
_this.hideContact = function () { return _this.show = false; };
|
|
9269
9294
|
_this.thereIsMoreInfo = function (product) {
|
|
@@ -9349,12 +9374,13 @@
|
|
|
9349
9374
|
};
|
|
9350
9375
|
var ProductEcComponent = /** @class */ (function (_super) {
|
|
9351
9376
|
__extends$w(ProductEcComponent, _super);
|
|
9352
|
-
function ProductEcComponent(consts, router, productService, authService) {
|
|
9377
|
+
function ProductEcComponent(consts, router, productService, authService, toastrService) {
|
|
9353
9378
|
var _this = _super.call(this) || this;
|
|
9354
9379
|
_this.consts = consts;
|
|
9355
9380
|
_this.router = router;
|
|
9356
9381
|
_this.productService = productService;
|
|
9357
9382
|
_this.authService = authService;
|
|
9383
|
+
_this.toastrService = toastrService;
|
|
9358
9384
|
_this.quantity = 1;
|
|
9359
9385
|
_this.stock = 0;
|
|
9360
9386
|
_this.data = null;
|
|
@@ -9379,8 +9405,33 @@
|
|
|
9379
9405
|
}
|
|
9380
9406
|
_this.router.navigateByUrl("/product/" + idredirect + (variant ? '?variant=true' : ''));
|
|
9381
9407
|
};
|
|
9382
|
-
|
|
9383
|
-
|
|
9408
|
+
/**
|
|
9409
|
+
* @description actualiza la variable quantity sumandole 'x' contenido.
|
|
9410
|
+
* @param stock debe recibir un number que contenga el stock disponible.
|
|
9411
|
+
* @param multipleQuantity debe recibir el multiplo de cantidad que se quiera incrementar.
|
|
9412
|
+
*/
|
|
9413
|
+
_this.plus = function (stock, multipleQuantity) {
|
|
9414
|
+
if (multipleQuantity && multipleQuantity > 0) {
|
|
9415
|
+
stock ? (_this.quantity < stock ? _this.quantity = _this.quantity + multipleQuantity : _this.toastrService.show('out-of-stock-actually'))
|
|
9416
|
+
: _this.quantity = _this.quantity + multipleQuantity;
|
|
9417
|
+
}
|
|
9418
|
+
else {
|
|
9419
|
+
stock ? (_this.quantity < stock ? _this.quantity = _this.quantity + 1 : _this.toastrService.show('out-of-stock-actually'))
|
|
9420
|
+
: _this.quantity = _this.quantity + 1;
|
|
9421
|
+
}
|
|
9422
|
+
};
|
|
9423
|
+
/**
|
|
9424
|
+
* @description actualiza la varible quantity restandole 'x' contenido.
|
|
9425
|
+
* @param multipleQuantity debe recibir el multiplo de cantidad que se quiera decrementar.
|
|
9426
|
+
*/
|
|
9427
|
+
_this.less = function (multipleQuantity) {
|
|
9428
|
+
if (multipleQuantity && multipleQuantity > 0) {
|
|
9429
|
+
_this.quantity > multipleQuantity ? _this.quantity = _this.quantity - multipleQuantity : null;
|
|
9430
|
+
}
|
|
9431
|
+
else {
|
|
9432
|
+
_this.quantity > 1 ? _this.quantity = _this.quantity - 1 : null;
|
|
9433
|
+
}
|
|
9434
|
+
};
|
|
9384
9435
|
_this.addToCart = function () {
|
|
9385
9436
|
_this.productService.addToCart(+_this.quantity);
|
|
9386
9437
|
};
|
|
@@ -9405,7 +9456,8 @@
|
|
|
9405
9456
|
{ type: Constants },
|
|
9406
9457
|
{ type: router.Router },
|
|
9407
9458
|
{ type: ProductDetailService },
|
|
9408
|
-
{ type: AuthService }
|
|
9459
|
+
{ type: AuthService },
|
|
9460
|
+
{ type: ToastService }
|
|
9409
9461
|
]; };
|
|
9410
9462
|
__decorate$13([
|
|
9411
9463
|
core.Input()
|