ng-easycommerce 0.0.664 → 0.0.665-beta.2
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 +4 -0
- package/assets/ec-i18n/es.json +1 -0
- package/bundles/ng-easycommerce.umd.js +16 -1
- 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/cart-ec/cart-ec.component.js +17 -2
- package/esm5/lib/ec-component/cart-ec/cart-ec.component.js +17 -2
- package/fesm2015/ng-easycommerce.js +16 -1
- package/fesm2015/ng-easycommerce.js.map +1 -1
- package/fesm5/ng-easycommerce.js +16 -1
- package/fesm5/ng-easycommerce.js.map +1 -1
- package/lib/ec-component/cart-ec/cart-ec.component.d.ts +1 -1
- package/package.json +1 -1
package/fesm5/ng-easycommerce.js
CHANGED
|
@@ -7574,7 +7574,22 @@ var CartEcComponent = /** @class */ (function (_super) {
|
|
|
7574
7574
|
_this.getMinimumPurchaseAmount = function () {
|
|
7575
7575
|
return _this.channel.type == 'b2b' ? _this.channel.wholesalerMinimumPurchaseAmount : _this.channel.retailerMinimumPurchaseAmount;
|
|
7576
7576
|
};
|
|
7577
|
-
_this.exceedsMinimumAmount = function (value) {
|
|
7577
|
+
_this.exceedsMinimumAmount = function (value) {
|
|
7578
|
+
if (value >= _this.getMinimumPurchaseAmount()) {
|
|
7579
|
+
return _this.redirectCheckout();
|
|
7580
|
+
}
|
|
7581
|
+
else {
|
|
7582
|
+
// Verificar si hay un balance de cliente activo
|
|
7583
|
+
_this.cartService.balanceCustomer$.subscribe(function (balanceCustomer) {
|
|
7584
|
+
if (balanceCustomer && balanceCustomer.creditAmount !== null && balanceCustomer.creditAmount !== undefined) {
|
|
7585
|
+
_this.toastrService.show('quantity-not-exceeded-whitout-amount');
|
|
7586
|
+
}
|
|
7587
|
+
else {
|
|
7588
|
+
_this.toastrService.show('quantity-not-exceeded', { amount: _this.getMinimumPurchaseAmount() });
|
|
7589
|
+
}
|
|
7590
|
+
}).unsubscribe(); // Desuscribirse inmediatamente después de obtener el valor
|
|
7591
|
+
}
|
|
7592
|
+
};
|
|
7578
7593
|
_this.ecOnConstruct();
|
|
7579
7594
|
_this.isLoggedIn = _this.authService.isAuthenticated();
|
|
7580
7595
|
_this.mediaUrl = _this.consts.mediaUrl();
|