ng-easycommerce 0.0.609 → 0.0.610
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 +6 -0
- package/assets/ec-i18n/ct.json +4 -1
- package/assets/ec-i18n/en.json +2 -0
- package/assets/ec-i18n/es.json +2 -0
- package/assets/ec-i18n/fr.json +4 -1
- package/assets/ec-i18n/gl.json +4 -1
- package/assets/ec-i18n/pr.json +4 -1
- package/bundles/ng-easycommerce.umd.js +130 -80
- 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/account-ec/order-ec/order-ec.component.js +4 -8
- package/esm2015/lib/ec-component/account-ec/orders-list-ec/orders-list-ec.component.js +4 -8
- package/esm2015/lib/ec-component/cart-ec/cart-ec.component.js +5 -3
- package/esm2015/lib/ec-component/checkout-ec/detail-checkout-block-ec/detail-checkout-block-ec.component.js +22 -18
- package/esm2015/lib/ec-component/checkout-ec/payment-ec/payment-ec.component.js +6 -4
- package/esm2015/lib/ec-component/header-ec/header-ec.component.js +2 -1
- package/esm2015/lib/ec-component/product-detail-ec/product-detail-ec.component.js +2 -2
- package/esm2015/lib/ec-component/product-ec/product-ec.component.js +2 -2
- package/esm2015/lib/ec-component/sidebar-ec/sidebar-ec.component.js +2 -2
- package/esm2015/lib/ec-component/widgets-ec/price-ec/price-ec.component.js +51 -6
- package/esm2015/lib/services/cart.service.js +34 -33
- package/esm2015/lib/services/checkout/checkout.service.js +5 -5
- package/esm2015/lib/services/products/product-detail.service.js +5 -2
- package/esm5/lib/ec-component/account-ec/order-ec/order-ec.component.js +4 -8
- package/esm5/lib/ec-component/account-ec/orders-list-ec/orders-list-ec.component.js +4 -8
- package/esm5/lib/ec-component/cart-ec/cart-ec.component.js +5 -3
- package/esm5/lib/ec-component/checkout-ec/detail-checkout-block-ec/detail-checkout-block-ec.component.js +22 -18
- package/esm5/lib/ec-component/checkout-ec/payment-ec/payment-ec.component.js +6 -4
- package/esm5/lib/ec-component/header-ec/header-ec.component.js +2 -1
- package/esm5/lib/ec-component/product-detail-ec/product-detail-ec.component.js +2 -2
- package/esm5/lib/ec-component/product-ec/product-ec.component.js +2 -2
- package/esm5/lib/ec-component/sidebar-ec/sidebar-ec.component.js +2 -2
- package/esm5/lib/ec-component/widgets-ec/price-ec/price-ec.component.js +52 -6
- package/esm5/lib/services/cart.service.js +34 -33
- package/esm5/lib/services/checkout/checkout.service.js +5 -5
- package/esm5/lib/services/products/product-detail.service.js +5 -2
- package/fesm2015/ng-easycommerce.js +129 -80
- package/fesm2015/ng-easycommerce.js.map +1 -1
- package/fesm5/ng-easycommerce.js +130 -80
- package/fesm5/ng-easycommerce.js.map +1 -1
- package/lib/ec-component/account-ec/order-ec/order-ec.component.d.ts +1 -2
- package/lib/ec-component/account-ec/orders-list-ec/orders-list-ec.component.d.ts +1 -2
- package/lib/ec-component/cart-ec/cart-ec.component.d.ts +2 -1
- package/lib/ec-component/checkout-ec/detail-checkout-block-ec/detail-checkout-block-ec.component.d.ts +5 -4
- package/lib/ec-component/checkout-ec/payment-ec/payment-ec.component.d.ts +1 -1
- package/lib/ec-component/product-detail-ec/product-detail-ec.component.d.ts +1 -1
- package/lib/ec-component/product-ec/product-ec.component.d.ts +1 -1
- package/lib/ec-component/sidebar-ec/sidebar-ec.component.d.ts +1 -1
- package/lib/ec-component/widgets-ec/price-ec/price-ec.component.d.ts +23 -6
- package/ng-easycommerce.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -3603,9 +3603,9 @@
|
|
|
3603
3603
|
});
|
|
3604
3604
|
}); };
|
|
3605
3605
|
this.updateAsociatedData = function (cart) {
|
|
3606
|
-
var _a, _b
|
|
3606
|
+
var _a, _b;
|
|
3607
3607
|
var result = _this.orderUtils.getPromotions(cart);
|
|
3608
|
-
if (
|
|
3608
|
+
if (cart.totals.taxes != 0) {
|
|
3609
3609
|
var total = __assign$7({}, result[result.length - 1]);
|
|
3610
3610
|
result[result.length - 1] = {
|
|
3611
3611
|
type: 'taxes',
|
|
@@ -3614,9 +3614,9 @@
|
|
|
3614
3614
|
};
|
|
3615
3615
|
result.push(total);
|
|
3616
3616
|
}
|
|
3617
|
-
var shipment = (
|
|
3617
|
+
var shipment = (_a = result) === null || _a === void 0 ? void 0 : _a.find(function (promotion) { return promotion.type == "shipment"; });
|
|
3618
3618
|
if (!shipment && cart.totals.shipping != 0) {
|
|
3619
|
-
if (((
|
|
3619
|
+
if (((_b = result) === null || _b === void 0 ? void 0 : _b.length) && !result.find(function (item) { return item.type === "shipment"; })) {
|
|
3620
3620
|
var total = __assign$7({}, result[result.length - 1]);
|
|
3621
3621
|
result[result.length - 1] = {
|
|
3622
3622
|
type: 'shipment',
|
|
@@ -4613,16 +4613,7 @@
|
|
|
4613
4613
|
this.cartSubject = new rxjs.BehaviorSubject(null);
|
|
4614
4614
|
this.requestInProcess = new rxjs.BehaviorSubject(false);
|
|
4615
4615
|
this.promotionsSubject = new rxjs.BehaviorSubject([]);
|
|
4616
|
-
this.balanceCustomerSubject = new rxjs.BehaviorSubject(
|
|
4617
|
-
allowAnyPaymentMethod: false,
|
|
4618
|
-
allowExceedBalance: false,
|
|
4619
|
-
creditAmount: 0,
|
|
4620
|
-
showMax: false,
|
|
4621
|
-
showPrice: false,
|
|
4622
|
-
remainingCredits: 0,
|
|
4623
|
-
applyMaxOrders: false,
|
|
4624
|
-
maxOrders: Infinity
|
|
4625
|
-
});
|
|
4616
|
+
this.balanceCustomerSubject = new rxjs.BehaviorSubject(null);
|
|
4626
4617
|
this.items = [];
|
|
4627
4618
|
this.count = 0;
|
|
4628
4619
|
this.locale = "";
|
|
@@ -4645,11 +4636,11 @@
|
|
|
4645
4636
|
this.promotions = this.promotionsSubject.asObservable();
|
|
4646
4637
|
this.deleting = false;
|
|
4647
4638
|
this.balanceCustomer$ = this.balanceCustomerSubject.asObservable();
|
|
4648
|
-
this.allowAnyPaymentMethod$ = this.balanceCustomer$.pipe(operators.map(function (data) { return data.allowAnyPaymentMethod; }));
|
|
4649
|
-
this.allowExceedBalance$ = this.balanceCustomer$.pipe(operators.map(function (data) { return data.allowExceedBalance; }));
|
|
4650
|
-
this.creditAmount$ = this.balanceCustomer$.pipe(operators.map(function (data) { return data.creditAmount; }));
|
|
4651
|
-
this.showMax$ = this.balanceCustomer$.pipe(operators.map(function (data) { return data.showMax; }));
|
|
4652
|
-
this.showPrice$ = this.balanceCustomer$.pipe(operators.map(function (data) { return data.showPrice; }));
|
|
4639
|
+
this.allowAnyPaymentMethod$ = this.balanceCustomer$.pipe(operators.map(function (data) { var _a, _b; return _b = (_a = data) === null || _a === void 0 ? void 0 : _a.allowAnyPaymentMethod, (_b !== null && _b !== void 0 ? _b : null); }));
|
|
4640
|
+
this.allowExceedBalance$ = this.balanceCustomer$.pipe(operators.map(function (data) { var _a, _b; return _b = (_a = data) === null || _a === void 0 ? void 0 : _a.allowExceedBalance, (_b !== null && _b !== void 0 ? _b : null); }));
|
|
4641
|
+
this.creditAmount$ = this.balanceCustomer$.pipe(operators.map(function (data) { var _a, _b; return _b = (_a = data) === null || _a === void 0 ? void 0 : _a.creditAmount, (_b !== null && _b !== void 0 ? _b : null); }));
|
|
4642
|
+
this.showMax$ = this.balanceCustomer$.pipe(operators.map(function (data) { var _a, _b; return _b = (_a = data) === null || _a === void 0 ? void 0 : _a.showMax, (_b !== null && _b !== void 0 ? _b : null); }));
|
|
4643
|
+
this.showPrice$ = this.balanceCustomer$.pipe(operators.map(function (data) { var _a, _b; return _b = (_a = data) === null || _a === void 0 ? void 0 : _a.showPrice, (_b !== null && _b !== void 0 ? _b : null); }));
|
|
4653
4644
|
this.getAddressBook = function () { return __awaiter$5(_this, void 0, void 0, function () { return __generator$5(this, function (_a) {
|
|
4654
4645
|
return [2 /*return*/, this.connection.get(this.addressBookApi()).pipe(operators.map(function (res) { var _a; return ((_a = res) === null || _a === void 0 ? void 0 : _a.length) && res.map(function (addres) { return addres && __assign$a(__assign$a({}, addres), { selected: addres.default }); }) || null; })).toPromise()];
|
|
4655
4646
|
}); }); };
|
|
@@ -4784,8 +4775,11 @@
|
|
|
4784
4775
|
* CART CRUD
|
|
4785
4776
|
*/
|
|
4786
4777
|
this.addToCart = function (product, quantity, variant_id) {
|
|
4778
|
+
var _a, _b, _c, _d;
|
|
4787
4779
|
var balance = _this.balanceCustomerSubject.value;
|
|
4788
|
-
|
|
4780
|
+
var applyMaxOrders = (_b = (_a = balance) === null || _a === void 0 ? void 0 : _a.applyMaxOrders, (_b !== null && _b !== void 0 ? _b : false));
|
|
4781
|
+
var maxOrders = (_d = (_c = balance) === null || _c === void 0 ? void 0 : _c.maxOrders, (_d !== null && _d !== void 0 ? _d : Infinity));
|
|
4782
|
+
if (applyMaxOrders && (maxOrders <= 0 || maxOrders === null)) {
|
|
4789
4783
|
_this.toastrService.show('max-orders-reached');
|
|
4790
4784
|
return;
|
|
4791
4785
|
}
|
|
@@ -4898,10 +4892,11 @@
|
|
|
4898
4892
|
return true;
|
|
4899
4893
|
};
|
|
4900
4894
|
this.validatePriceAndCredits = function (item, quantity) {
|
|
4901
|
-
|
|
4895
|
+
var balance = _this.balanceCustomerSubject.value;
|
|
4896
|
+
if (!balance || balance.creditAmount === null || balance.creditAmount === undefined) {
|
|
4902
4897
|
return true;
|
|
4903
4898
|
}
|
|
4904
|
-
if (
|
|
4899
|
+
if (balance.remainingCredits === undefined) {
|
|
4905
4900
|
return false;
|
|
4906
4901
|
}
|
|
4907
4902
|
var unitPrice = item.total / item.quantity;
|
|
@@ -4910,20 +4905,21 @@
|
|
|
4910
4905
|
return true;
|
|
4911
4906
|
}
|
|
4912
4907
|
var additionalCost = unitPrice * additionalQuantity;
|
|
4913
|
-
if (additionalCost >
|
|
4908
|
+
if (additionalCost > balance.remainingCredits) {
|
|
4914
4909
|
_this.toastrService.show('not-enough-credits');
|
|
4915
4910
|
return false;
|
|
4916
4911
|
}
|
|
4917
4912
|
return true;
|
|
4918
4913
|
};
|
|
4919
4914
|
this.hasSufficientCreditsForCartTotal = function () {
|
|
4920
|
-
|
|
4915
|
+
var balance = _this.balanceCustomerSubject.value;
|
|
4916
|
+
if (!balance || balance.creditAmount === null || balance.creditAmount === undefined) {
|
|
4921
4917
|
return true;
|
|
4922
4918
|
}
|
|
4923
|
-
if (
|
|
4919
|
+
if (balance.remainingCredits === undefined) {
|
|
4924
4920
|
return false;
|
|
4925
4921
|
}
|
|
4926
|
-
if (_this.cartSubject.value.totals.total >
|
|
4922
|
+
if (_this.cartSubject.value.totals.total > balance.creditAmount) {
|
|
4927
4923
|
_this.toastrService.show('not-enough-credits');
|
|
4928
4924
|
return false;
|
|
4929
4925
|
}
|
|
@@ -5175,18 +5171,23 @@
|
|
|
5175
5171
|
}));
|
|
5176
5172
|
};
|
|
5177
5173
|
CartService$1.prototype.updateBalanceAttributes = function (cartData) {
|
|
5178
|
-
var _a, _b, _c
|
|
5174
|
+
var _a, _b, _c;
|
|
5175
|
+
var balance = (_a = cartData) === null || _a === void 0 ? void 0 : _a.balanceCustomer;
|
|
5176
|
+
if (!balance) {
|
|
5177
|
+
this.balanceCustomerSubject.next(null);
|
|
5178
|
+
return;
|
|
5179
|
+
}
|
|
5179
5180
|
var balanceData = {
|
|
5180
|
-
allowAnyPaymentMethod:
|
|
5181
|
-
allowExceedBalance:
|
|
5182
|
-
creditAmount:
|
|
5183
|
-
showMax:
|
|
5184
|
-
showPrice:
|
|
5185
|
-
remainingCredits: ((
|
|
5186
|
-
?
|
|
5181
|
+
allowAnyPaymentMethod: balance.allowAnyPaymentMethod,
|
|
5182
|
+
allowExceedBalance: balance.allowExceedBalance,
|
|
5183
|
+
creditAmount: balance.creditAmount,
|
|
5184
|
+
showMax: balance.showMax,
|
|
5185
|
+
showPrice: balance.showPrice,
|
|
5186
|
+
remainingCredits: balance.creditAmount && ((_c = (_b = cartData) === null || _b === void 0 ? void 0 : _b.totals) === null || _c === void 0 ? void 0 : _c.total) && balance.creditAmount >= cartData.totals.total
|
|
5187
|
+
? balance.creditAmount - cartData.totals.total
|
|
5187
5188
|
: 0,
|
|
5188
|
-
applyMaxOrders:
|
|
5189
|
-
maxOrders:
|
|
5189
|
+
applyMaxOrders: balance.applyMaxOrders,
|
|
5190
|
+
maxOrders: balance.maxOrders
|
|
5190
5191
|
};
|
|
5191
5192
|
this.balanceCustomerSubject.next(balanceData);
|
|
5192
5193
|
};
|
|
@@ -7409,7 +7410,8 @@
|
|
|
7409
7410
|
_this.hidePrices = false;
|
|
7410
7411
|
_this.hideDiscounts = false;
|
|
7411
7412
|
_this.hideTaxes = false;
|
|
7412
|
-
_this.creditAccountShowPrices =
|
|
7413
|
+
_this.creditAccountShowPrices = null;
|
|
7414
|
+
_this.showPriceWithoutTaxes = true;
|
|
7413
7415
|
_this.toDecimal = function (amount) { return _this.consts.toDecimal(amount); };
|
|
7414
7416
|
_this.actualizarCantidad = function (item, cantidad, stock, id) {
|
|
7415
7417
|
if (id) {
|
|
@@ -7495,10 +7497,11 @@
|
|
|
7495
7497
|
this.cartService.promotions.subscribe(function (promotions) { return _this.promotions = promotions; });
|
|
7496
7498
|
// console.log(this.cartService.getTaxes());
|
|
7497
7499
|
this.channelConfigService.channelConfig$.subscribe(function (channel) {
|
|
7498
|
-
var _a, _b, _c, _d, _e, _f;
|
|
7500
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
7499
7501
|
_this.hidePrices = (_b = (_a = channel) === null || _a === void 0 ? void 0 : _a.hidePrices, (_b !== null && _b !== void 0 ? _b : false));
|
|
7500
7502
|
_this.hideDiscounts = (_d = (_c = channel) === null || _c === void 0 ? void 0 : _c.hideDiscounts, (_d !== null && _d !== void 0 ? _d : false));
|
|
7501
7503
|
_this.hideTaxes = (_f = (_e = channel) === null || _e === void 0 ? void 0 : _e.hideTaxes, (_f !== null && _f !== void 0 ? _f : false));
|
|
7504
|
+
_this.showPriceWithoutTaxes = (_h = (_g = channel) === null || _g === void 0 ? void 0 : _g.showPriceWithoutTaxes, (_h !== null && _h !== void 0 ? _h : false));
|
|
7502
7505
|
if (_this.hidePrices) {
|
|
7503
7506
|
_this.router.navigate(['/']);
|
|
7504
7507
|
}
|
|
@@ -8655,7 +8658,7 @@
|
|
|
8655
8658
|
_this.loading_internal_mp = false;
|
|
8656
8659
|
_this.method_data$ = _this.methodDataSubject.asObservable();
|
|
8657
8660
|
_this.loading$ = _this.loadingSubject.asObservable();
|
|
8658
|
-
_this.allowAnyPaymentMethod =
|
|
8661
|
+
_this.allowAnyPaymentMethod = null;
|
|
8659
8662
|
_this.allData = function () { return (__assign$k(__assign$k({}, _this.paymentService.getUserData().shippingAddress), _this.paymentService.getShipmentData())); };
|
|
8660
8663
|
_this.setError = function (message) {
|
|
8661
8664
|
_this.error = message;
|
|
@@ -8731,8 +8734,8 @@
|
|
|
8731
8734
|
var _this = this;
|
|
8732
8735
|
this.paymentService.initialize(this.step_id);
|
|
8733
8736
|
this.checkoutService.asociatedData$.subscribe(function (data) { return _this.total_amount = (data.find(function (item) { return item.type == 'total'; })).amount; });
|
|
8734
|
-
this.cartService.allowAnyPaymentMethod$.subscribe(function (
|
|
8735
|
-
_this.allowAnyPaymentMethod =
|
|
8737
|
+
this.cartService.allowAnyPaymentMethod$.subscribe(function (value) {
|
|
8738
|
+
_this.allowAnyPaymentMethod = value;
|
|
8736
8739
|
});
|
|
8737
8740
|
this.ecOnInit();
|
|
8738
8741
|
};
|
|
@@ -8760,6 +8763,8 @@
|
|
|
8760
8763
|
PaymentEcComponent.prototype.shouldDisplayMethod = function (method) {
|
|
8761
8764
|
if (!method)
|
|
8762
8765
|
return false;
|
|
8766
|
+
if (this.allowAnyPaymentMethod === null)
|
|
8767
|
+
return true;
|
|
8763
8768
|
if (this.allowAnyPaymentMethod)
|
|
8764
8769
|
return true;
|
|
8765
8770
|
return this.isBalanceInAccount(method.code);
|
|
@@ -9842,6 +9847,7 @@
|
|
|
9842
9847
|
_this.envetUrlTransparent = ["/home", "/"];
|
|
9843
9848
|
_this.params = {};
|
|
9844
9849
|
_this.toggled = false;
|
|
9850
|
+
_this.balanceAttributes = null;
|
|
9845
9851
|
_this.locales = [];
|
|
9846
9852
|
_this.selectedLocale = 'ESP';
|
|
9847
9853
|
_this.hidePrices = false;
|
|
@@ -10583,7 +10589,7 @@
|
|
|
10583
10589
|
options && options.forEach(function (option) { return Object.keys(option).forEach(function (key) { return _this.setOption(key, option[key]); }); });
|
|
10584
10590
|
};
|
|
10585
10591
|
this.generateAsociatedDataFromVariants = function () {
|
|
10586
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
10592
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
10587
10593
|
var asociated = {};
|
|
10588
10594
|
if (_this.isReady()) {
|
|
10589
10595
|
asociated.stock = _this.variants[0].stock;
|
|
@@ -10616,6 +10622,9 @@
|
|
|
10616
10622
|
taxIncluded: (_r = _this.variants[0]) === null || _r === void 0 ? void 0 : _r.taxIncluded,
|
|
10617
10623
|
taxCategory: (_s = _this.variants[0]) === null || _s === void 0 ? void 0 : _s.taxCategory,
|
|
10618
10624
|
};
|
|
10625
|
+
asociated.taxeAmount = ((_t = _this.variants[0]) === null || _t === void 0 ? void 0 : _t.taxes) || undefined;
|
|
10626
|
+
asociated.taxRate = ((_u = _this.variants[0]) === null || _u === void 0 ? void 0 : _u.taxRate) || undefined;
|
|
10627
|
+
asociated.priceWithoutTaxes = ((_v = _this.variants[0]) === null || _v === void 0 ? void 0 : _v.priceWithoutTaxes) || undefined;
|
|
10619
10628
|
_this.asociatedDataSubject.next(asociated);
|
|
10620
10629
|
};
|
|
10621
10630
|
/**
|
|
@@ -10903,7 +10912,7 @@
|
|
|
10903
10912
|
_this.owlOptions = {};
|
|
10904
10913
|
_this.showReviews = false;
|
|
10905
10914
|
_this.hidePrices = false;
|
|
10906
|
-
_this.creditAccountShowPrices =
|
|
10915
|
+
_this.creditAccountShowPrices = null;
|
|
10907
10916
|
_this.addToCart = function () {
|
|
10908
10917
|
_this.quantity > 0 && _this.productService.addToCart(_this.quantity);
|
|
10909
10918
|
};
|
|
@@ -11069,7 +11078,7 @@
|
|
|
11069
11078
|
_this.stock = 0;
|
|
11070
11079
|
_this.data = null;
|
|
11071
11080
|
_this.hidePrices = false;
|
|
11072
|
-
_this.creditAccountShowPrices =
|
|
11081
|
+
_this.creditAccountShowPrices = null;
|
|
11073
11082
|
/**
|
|
11074
11083
|
* @description variable utilizada mutar de la vista de lista, a la de box.
|
|
11075
11084
|
*/
|
|
@@ -12306,18 +12315,30 @@
|
|
|
12306
12315
|
};
|
|
12307
12316
|
var PriceEcComponent = /** @class */ (function (_super) {
|
|
12308
12317
|
__extends$G(PriceEcComponent, _super);
|
|
12309
|
-
function PriceEcComponent(productsService) {
|
|
12318
|
+
function PriceEcComponent(productsService, channelConfigService) {
|
|
12310
12319
|
var _this = _super.call(this) || this;
|
|
12311
12320
|
_this.productsService = productsService;
|
|
12321
|
+
_this.channelConfigService = channelConfigService;
|
|
12312
12322
|
_this.priceSize = true;
|
|
12323
|
+
_this.taxeAmount = 0;
|
|
12324
|
+
_this.taxes = [];
|
|
12325
|
+
_this.showTaxLegendOnly = false;
|
|
12326
|
+
_this.disableTaxInfo = false;
|
|
12327
|
+
_this.showPriceWithoutTaxes = true;
|
|
12313
12328
|
_this.ecOnConstruct();
|
|
12314
12329
|
return _this;
|
|
12315
12330
|
}
|
|
12316
12331
|
PriceEcComponent.prototype.ngOnInit = function () {
|
|
12332
|
+
var _this = this;
|
|
12333
|
+
this.channelConfigService.channelConfig$.subscribe(function (channel) {
|
|
12334
|
+
var _a;
|
|
12335
|
+
_this.showPriceWithoutTaxes = (_a = channel) === null || _a === void 0 ? void 0 : _a.showPriceWithoutTaxes;
|
|
12336
|
+
});
|
|
12317
12337
|
this.ecOnInit();
|
|
12318
12338
|
};
|
|
12319
12339
|
PriceEcComponent.ctorParameters = function () { return [
|
|
12320
|
-
{ type: ProductsService }
|
|
12340
|
+
{ type: ProductsService },
|
|
12341
|
+
{ type: ChannelConfigService }
|
|
12321
12342
|
]; };
|
|
12322
12343
|
__decorate$1f([
|
|
12323
12344
|
core.Input()
|
|
@@ -12331,11 +12352,44 @@
|
|
|
12331
12352
|
__decorate$1f([
|
|
12332
12353
|
core.Input()
|
|
12333
12354
|
], PriceEcComponent.prototype, "classStrSpacing", void 0);
|
|
12355
|
+
__decorate$1f([
|
|
12356
|
+
core.Input()
|
|
12357
|
+
], PriceEcComponent.prototype, "basePrice", void 0);
|
|
12358
|
+
__decorate$1f([
|
|
12359
|
+
core.Input()
|
|
12360
|
+
], PriceEcComponent.prototype, "taxeAmount", void 0);
|
|
12361
|
+
__decorate$1f([
|
|
12362
|
+
core.Input()
|
|
12363
|
+
], PriceEcComponent.prototype, "taxes", void 0);
|
|
12364
|
+
__decorate$1f([
|
|
12365
|
+
core.Input()
|
|
12366
|
+
], PriceEcComponent.prototype, "showTaxLegendOnly", void 0);
|
|
12367
|
+
__decorate$1f([
|
|
12368
|
+
core.Input()
|
|
12369
|
+
], PriceEcComponent.prototype, "disableTaxInfo", void 0);
|
|
12370
|
+
__decorate$1f([
|
|
12371
|
+
core.Input()
|
|
12372
|
+
], PriceEcComponent.prototype, "customPriceTemplate", void 0);
|
|
12373
|
+
__decorate$1f([
|
|
12374
|
+
core.Input()
|
|
12375
|
+
], PriceEcComponent.prototype, "customSalePriceTemplate", void 0);
|
|
12376
|
+
__decorate$1f([
|
|
12377
|
+
core.Input()
|
|
12378
|
+
], PriceEcComponent.prototype, "customSimplePriceTemplate", void 0);
|
|
12379
|
+
__decorate$1f([
|
|
12380
|
+
core.Input()
|
|
12381
|
+
], PriceEcComponent.prototype, "customSimpleSalePriceTemplate", void 0);
|
|
12382
|
+
__decorate$1f([
|
|
12383
|
+
core.Input()
|
|
12384
|
+
], PriceEcComponent.prototype, "customTaxTemplate", void 0);
|
|
12385
|
+
__decorate$1f([
|
|
12386
|
+
core.Input()
|
|
12387
|
+
], PriceEcComponent.prototype, "customOnlyTaxLabelTemplate", void 0);
|
|
12334
12388
|
PriceEcComponent = __decorate$1f([
|
|
12335
12389
|
core.Component({
|
|
12336
12390
|
selector: 'app-price-ec',
|
|
12337
|
-
template: "<div *ngIf=\"saleprice; else onlyprice\" class=\"line-height-custom\">\n
|
|
12338
|
-
styles: [".price-sm{font-size:13px}.price{font-size:18px}.lnth{text-decoration:line-through;color:gray}"]
|
|
12391
|
+
template: "<!-- Si hay templates personalizados, se proyectan -->\n<ng-container *ngIf=\"customSalePriceTemplate || customPriceTemplate; else defaultPriceBlock\">\n <ng-container *ngTemplateOutlet=\"customPriceTemplate || defaultPriceBlock\"></ng-container>\n</ng-container>\n\n<ng-template #defaultPriceBlock>\n <div *ngIf=\"saleprice; else onlyprice\" class=\"line-height-custom\">\n <div [class]=\"(priceSize ? 'price-sm' : 'price')\"\n *ngIf=\"price && price.split(' - ').length > 1; else simplePriceDel\">\n <del class=\"tachado\">\n {{ price.split(' - ')[0] | ecCurrencySymbol }}\n {{ price.split(' - ')[1] | ecCurrencySymbol }}\n </del>\n </div>\n <div [class]=\"(priceSize ? 'price-sm' : 'price')\"\n *ngIf=\"saleprice && saleprice.split(' - ').length > 1; else simpleSalePrice\">\n {{ saleprice.split(' - ')[0] | ecCurrencySymbol }}\n {{ saleprice.split(' - ')[1] | ecCurrencySymbol }}\n </div>\n </div>\n\n <ng-template #onlyprice>\n <div [class]=\"(priceSize ? 'price-sm' : 'price')\"\n *ngIf=\"price && price.split(' - ').length > 1; else simplePrice\">\n {{ price.split(' - ')[0] | ecCurrencySymbol }} -\n {{ price.split(' - ')[1] | ecCurrencySymbol }}\n </div>\n </ng-template>\n\n <ng-template #simplePrice>\n <ng-container *ngIf=\"customSimplePriceTemplate; else fallbackSimplePrice\">\n <ng-container *ngTemplateOutlet=\"customSimplePriceTemplate\"></ng-container>\n </ng-container>\n </ng-template>\n\n <ng-template #fallbackSimplePrice>\n <div [class]=\"'uno line-height-custom ' + (priceSize ? 'price-sm' : 'price')\">\n {{ price | ecCurrencySymbol }}\n </div>\n </ng-template>\n\n <ng-template #simplePriceDel>\n <div [class]=\"'dos line-height-custom ' + (priceSize ? 'price-sm' : 'price')\">\n <span class=\"lnth\">{{ price | ecCurrencySymbol }}</span>\n </div>\n </ng-template>\n\n <ng-template #simpleSalePrice>\n <ng-container *ngIf=\"customSimpleSalePriceTemplate; else fallbackSimpleSalePrice\">\n <ng-container *ngTemplateOutlet=\"customSimpleSalePriceTemplate\"></ng-container>\n </ng-container>\n </ng-template>\n\n <ng-template #fallbackSimpleSalePrice>\n <div [class]=\"'tres line-height-custom ' + (priceSize ? 'price-sm' : 'price')\">\n {{ saleprice | ecCurrencySymbol }}\n </div>\n </ng-template>\n</ng-template>\n\n<!-- Secci\u00F3n de impuestos -->\n<ng-container *ngIf=\"!disableTaxInfo && !showPriceWithoutTaxes\">\n <ng-container *ngIf=\"showTaxLegendOnly; else detailedTaxBlock\">\n <ng-container *ngIf=\"customOnlyTaxLabelTemplate; else defaultOnlyTaxLabelBlock\">\n <ng-container *ngTemplateOutlet=\"customOnlyTaxLabelTemplate\"></ng-container>\n </ng-container>\n <ng-template #defaultOnlyTaxLabelBlock>\n <p class=\"taxes-title\">{{'price-without-national-taxes' | translate }}: {{ basePrice | ecCurrencySymbol }}</p>\n </ng-template>\n </ng-container>\n\n <ng-template #detailedTaxBlock>\n <ng-container *ngIf=\"customTaxTemplate; else defaultTaxBlock\">\n <ng-container *ngTemplateOutlet=\"customTaxTemplate\"></ng-container>\n </ng-container>\n </ng-template>\n</ng-container>\n\n<ng-template #defaultTaxBlock>\n <div class=\"taxes-section\">\n <p class=\"taxes-title\">{{'price-without-national-taxes' | translate }}: {{ basePrice | ecCurrencySymbol }}</p>\n <ul class=\"taxes-list\">\n <li>\n {{ taxes.Name }}: {{ taxeAmount | ecCurrencySymbol }}\n </li>\n </ul>\n </div>\n</ng-template>",
|
|
12392
|
+
styles: [".price-sm{font-size:13px}.price{font-size:18px}.lnth{text-decoration:line-through;color:gray}.taxes-section{margin-top:.5rem;border-radius:.5rem;font-size:.95rem;color:#333;line-height:1.4;max-width:400px}.taxes-title{font-weight:500;margin-bottom:.2rem;font-size:.7rem;color:#222}.taxes-list{list-style-type:none;padding-left:0;margin:0}.taxes-list li{margin-bottom:.05rem;font-size:.65rem;display:flex;justify-content:space-between}"]
|
|
12339
12393
|
})
|
|
12340
12394
|
], PriceEcComponent);
|
|
12341
12395
|
return PriceEcComponent;
|
|
@@ -12913,8 +12967,7 @@
|
|
|
12913
12967
|
_this.channelConfigService = channelConfigService;
|
|
12914
12968
|
_this.loading = true;
|
|
12915
12969
|
_this.showImage = true;
|
|
12916
|
-
_this.
|
|
12917
|
-
_this.creditAmountConfigured = false;
|
|
12970
|
+
_this.creditAccountShowPrices = null;
|
|
12918
12971
|
_this.hidePrices = false;
|
|
12919
12972
|
/**
|
|
12920
12973
|
* @description name -> nombre de clave de valuesToSort; asc -> true: ascendente, false: descendente
|
|
@@ -13055,10 +13108,7 @@
|
|
|
13055
13108
|
});
|
|
13056
13109
|
this.ecOnInit();
|
|
13057
13110
|
this.cartService.showPrice$.subscribe(function (showPrice) {
|
|
13058
|
-
_this.
|
|
13059
|
-
});
|
|
13060
|
-
this.cartService.creditAmount$.subscribe(function (creditAmount) {
|
|
13061
|
-
_this.creditAmountConfigured = creditAmount !== null;
|
|
13111
|
+
_this.creditAccountShowPrices = showPrice;
|
|
13062
13112
|
});
|
|
13063
13113
|
this.channelConfigService.channelConfig$.subscribe(function (channel) {
|
|
13064
13114
|
var _a, _b;
|
|
@@ -13078,7 +13128,7 @@
|
|
|
13078
13128
|
OrdersEcComponent = __decorate$1k([
|
|
13079
13129
|
core.Component({
|
|
13080
13130
|
selector: 'app-orders-ec',
|
|
13081
|
-
template: "<div class=\"container-fluid\" id=\"ordersEcComponent\">\n <section id=\"orders\" class=\"w-100\" *ngIf=\"!loading; else loadingView\">\n <ng-container *ngIf=\"!hidePrices\">\n <div *ngIf=\"orders && orders.length; else noOrders\">\n <div class=\"row mb-1 border-bottom\">\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'number' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('number')\">{{ 'order' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'paymentState' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('paymentState')\">{{ 'payment-state' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'method' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('method')\">{{ 'shipment-method' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12 \">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'methodState' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('methodState')\">\n {{ 'shipment-state' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'date' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('date')\">{{ 'date' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'total' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('total')\">{{ 'total' | translate }}:</p>\n </div>\n </div>\n <div class=\"row item border-bottom py-2\" *ngFor=\"let order of orders\">\n <div class=\"col-lg-2 col-12\">\n <h5 class=\"fw-bold\">\n {{ order.number }}\n </h5>\n <!-- <ng-container *ngIf=\"showImage\">\n <ng-container *ngIf=\"order.items[0].product.variants[0]?.images?.length ; else defaultpicture\">\n <img class=\"smc maxwidth\" [src]=\"mediaUrl + order.items[0].product.variants[0].images[0]\" alt=\"\">\n </ng-container>\n <ng-template #defaultpicture>\n <img *ngIf=\"order.items[0].product.picturesdefault\" class=\"smc maxwidth\"\n [src]=\"mediaUrl + order.items[0].product.picturesdefault[0]\" alt=\"\">\n </ng-template>\n </ng-container> -->\n </div>\n <div class=\"col-lg-2 col-12\">\n <p class=\"price\" *ngIf=\"order.payments && order.payments.length > 0\">\n {{ order.payments[0].state | translate | titlecase }}\n </p>\n </div>\n <div class=\"col-lg-2 col-12\">\n\n <p class=\"price\">\n {{ order.shipments[0].method.name }}\n </p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p class=\"price\">\n {{ order.shipments[0].state | translate | titlecase }}\n </p>\n <!-- ACA DEBERIA IR EL LINK DE SEGUIMIENTO -->\n <!-- <button class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver seguimiento</button> -->\n <a *ngIf=\"order.tracking\" [href]=\"order.tracking\"\n class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver\n seguimiento</a>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p class=\"price\">\n {{ toDate(order.checkoutCompletedAt, 'DD/MM/YYYY') | translate }}<br>\n {{ toDate(order.checkoutCompletedAt, 'h:mm:ss a') | translate }}\n </p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <h5 class=\"fw-bold text-nowrap\" *ngIf=\"(
|
|
13131
|
+
template: "<div class=\"container-fluid\" id=\"ordersEcComponent\">\n <section id=\"orders\" class=\"w-100\" *ngIf=\"!loading; else loadingView\">\n <ng-container *ngIf=\"!hidePrices\">\n <div *ngIf=\"orders && orders.length; else noOrders\">\n <div class=\"row mb-1 border-bottom\">\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'number' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('number')\">{{ 'order' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'paymentState' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('paymentState')\">{{ 'payment-state' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'method' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('method')\">{{ 'shipment-method' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12 \">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'methodState' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('methodState')\">\n {{ 'shipment-state' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'date' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('date')\">{{ 'date' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'total' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('total')\">{{ 'total' | translate }}:</p>\n </div>\n </div>\n <div class=\"row item border-bottom py-2\" *ngFor=\"let order of orders\">\n <div class=\"col-lg-2 col-12\">\n <h5 class=\"fw-bold\">\n {{ order.number }}\n </h5>\n <!-- <ng-container *ngIf=\"showImage\">\n <ng-container *ngIf=\"order.items[0].product.variants[0]?.images?.length ; else defaultpicture\">\n <img class=\"smc maxwidth\" [src]=\"mediaUrl + order.items[0].product.variants[0].images[0]\" alt=\"\">\n </ng-container>\n <ng-template #defaultpicture>\n <img *ngIf=\"order.items[0].product.picturesdefault\" class=\"smc maxwidth\"\n [src]=\"mediaUrl + order.items[0].product.picturesdefault[0]\" alt=\"\">\n </ng-template>\n </ng-container> -->\n </div>\n <div class=\"col-lg-2 col-12\">\n <p class=\"price\" *ngIf=\"order.payments && order.payments.length > 0\">\n {{ order.payments[0].state | translate | titlecase }}\n </p>\n </div>\n <div class=\"col-lg-2 col-12\">\n\n <p class=\"price\">\n {{ order.shipments[0].method.name }}\n </p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p class=\"price\">\n {{ order.shipments[0].state | translate | titlecase }}\n </p>\n <!-- ACA DEBERIA IR EL LINK DE SEGUIMIENTO -->\n <!-- <button class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver seguimiento</button> -->\n <a *ngIf=\"order.tracking\" [href]=\"order.tracking\"\n class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver\n seguimiento</a>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p class=\"price\">\n {{ toDate(order.checkoutCompletedAt, 'DD/MM/YYYY') | translate }}<br>\n {{ toDate(order.checkoutCompletedAt, 'h:mm:ss a') | translate }}\n </p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <h5 class=\"fw-bold text-nowrap\" *ngIf=\"(showPrice !== null ? showPrice : true)\">\n {{ (order.totals.total) | ecCurrencySymbol }}\n </h5>\n <button class=\"btn px-0 w-100 btdetalle\" (click)=\"goToOrder(order)\">{{\n 'see-order' | translate }}</button>\n </div>\n </div>\n </div>\n </ng-container>\n </section>\n</div>\n\n<ng-template #noOrders>\n <div class=\"w-100 h-50\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <h5>{{ 'no-orders' | translate }}</h5>\n </div>\n </div>\n</ng-template>\n\n<ng-template #errorView>\n <div class=\"w-100 h-50\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <h4>{{ 'orders-error' | translate }}</h4>\n </div>\n </div>\n</ng-template>\n\n<ng-template #loadingView>\n <div class=\"w-100 h-50 py-5\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n </div>\n</ng-template>",
|
|
13082
13132
|
styles: ["#ordersEcComponent .btn.btdetalle{background-color:#000;color:#fff;border-color:#000;border-width:1px;border-radius:10px;padding:10px 0}#ordersEcComponent .btn.btdetalle:hover{background-color:#fff;color:#000;border-color:#000}.asc.dropdown-toggle::after{transform:rotate(180deg)}.applied.dropdown-toggle::after{color:#198754}"]
|
|
13083
13133
|
})
|
|
13084
13134
|
], OrdersEcComponent);
|
|
@@ -13156,8 +13206,7 @@
|
|
|
13156
13206
|
_this.loading = true;
|
|
13157
13207
|
_this.numberOrder = null;
|
|
13158
13208
|
_this.allowRepeatOrders = false;
|
|
13159
|
-
_this.
|
|
13160
|
-
_this.creditAmountConfigured = false;
|
|
13209
|
+
_this.creditAccountShowPrices = null;
|
|
13161
13210
|
_this.hidePrices = false;
|
|
13162
13211
|
_this.hideDiscounts = false;
|
|
13163
13212
|
_this.hideTaxes = false;
|
|
@@ -13215,10 +13264,7 @@
|
|
|
13215
13264
|
_this.hideTaxes = (_f = (_e = config) === null || _e === void 0 ? void 0 : _e.hideTaxes, (_f !== null && _f !== void 0 ? _f : false));
|
|
13216
13265
|
});
|
|
13217
13266
|
this.cartService.showPrice$.subscribe(function (showPrice) {
|
|
13218
|
-
_this.
|
|
13219
|
-
});
|
|
13220
|
-
this.cartService.creditAmount$.subscribe(function (creditAmount) {
|
|
13221
|
-
_this.creditAmountConfigured = creditAmount !== null;
|
|
13267
|
+
_this.creditAccountShowPrices = showPrice;
|
|
13222
13268
|
});
|
|
13223
13269
|
this.ecOnInit();
|
|
13224
13270
|
};
|
|
@@ -13241,7 +13287,7 @@
|
|
|
13241
13287
|
OrderEcComponent = __decorate$1l([
|
|
13242
13288
|
core.Component({
|
|
13243
13289
|
selector: 'app-order-ec',
|
|
13244
|
-
template: "<main class=\"py-5\" id=\"orderEcComponent\">\n <div class=\"container\">\n <div class=\"wrap\" *ngIf=\"!loading; else loadingView\">\n <div *ngIf=\"order; else noOrder\">\n\n <div class=\"row justify-content-between \">\n <div class=\"col-sm-auto col-12 font-brandon\">\n <h4 class=\"tit1 fw-bold\">{{ ('order' | translate) + ': ' + order.number }}</h4>\n </div>\n <ng-container *ngIf=\"order?.invoice\">\n <div class=\"col-sm col-12 font-brandon\">\n <a target=\"_blank\" [href]=\"consts.getUrlBase().slice(0, -1) + order.invoice\"\n class=\"btn btn-link btn-invoice\">\n <i class=\"fas fa-file-download me-1\"></i>\n {{ 'download' | translate }} {{ 'invoices' | translate | titlecase }}\n </a>\n </div>\n </ng-container>\n <a (click)=\"volver()\" class=\"col-auto text-end\">\n <button class=\"btn btvolver bg-gray text-white\">{{ 'back-to-orders' | translate }}</button>\n </a>\n </div>\n\n <section id=\"orders\">\n <div class=\"row pt-2\">\n <div class=\"col-md-2 col-12\">\n <p class=\"st\">{{ 'payment-state' | translate }}:</p>\n <p class=\"\">\n {{ order.payments[0].state | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'shipment-state' | translate }}:</p>\n <p class=\"\">\n {{ order.shipments[0].state | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'payment-method' | translate }}:</p>\n <p class=\"\">\n {{ order.payments[0]?.method?.name | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'shipment-method' | translate }}:</p>\n <p class=\"\">\n {{ order.shipments[0].method.name }}\n </p>\n <!-- ACA DEBERIA IR EL LINK DE SEGUIMIENTO -->\n <a *ngIf=\"order.tracking\" [href]=\"order.tracking\"\n class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver\n seguimiento</a>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'date' | translate }}:</p>\n <p class=\"\">\n {{ toDate(order.checkoutCompletedAt, 'DD/MM/YYYY') | translate }}<br>\n {{ toDate(order.checkoutCompletedAt, 'h:mm:ss a') | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\" *ngIf=\"(creditAmountConfigured ? showPrice : true)\">\n <p class=\"st\">{{ 'total' | translate }}:</p>\n <h5 class=\"fw-bold\">\n {{ (order.totals.total) | ecCurrencySymbol}}\n\n </h5>\n </div>\n </div>\n </section>\n\n <div class=\"text-end mt-3\" *ngIf=\"!hidePrices && allowRepeatOrders\">\n <button class=\"btn btn-primary mb-2\" (click)=\"repeatOrder()\">\n {{ 'repeat-order' | translate }}\n </button>\n </div>\n\n <div class=\"container py-3 border-top border-bottom\">\n <div *ngIf=\"order.items.length; else noProducts\" class=\"row\">\n <div class=\"col-2 font-sm font-brandon d-none d-md-block\">\n {{ 'product' | translate | uppercase }}\n </div>\n <div class=\"col-4 font-sm font-brandon d-none d-md-block\">\n {{ 'description' | translate | uppercase }}\n </div>\n <div id=\"colLots\" *ngIf=\"ordersService.channelConfig.applyOrderLot\"\n class=\"col-1 font-sm font-brandon d-none d-md-block\">\n <!-- {{ 'description' | translate | uppercase }} -->\n {{ 'lots' | translate | uppercase }}\n </div>\n <div class=\"col-2 text-center font-sm font-brandon d-none d-md-block\"\n *ngIf=\"(creditAmountConfigured ? showPrice : true)\">\n {{ 'unit-price' | translate | uppercase }}\n </div>\n <div class=\"col-1 text-center font-sm font-brandon d-none d-md-block\">\n {{ 'quantity' | translate | uppercase }}\n </div>\n <div class=\"col-2 text-end font-sm font-brandon d-none d-md-block\"\n *ngIf=\"(creditAmountConfigured ? showPrice : true)\">\n {{ 'total' | translate | uppercase }}\n </div>\n </div>\n <ng-container *ngFor=\"let item of order.items; let i = index\">\n <div class=\"row cart-items\">\n <div class=\"col-5 col-md-2 py-2\">\n <ng-container *ngIf=\"item.product.variants[0]?.images?.length ; else defaultpicture\">\n <img class=\"smc maxwidth img-fluid rounded-custom \"\n [src]=\"consts.mediaUrl() + item.product.variants[0].images[0]\" alt=\"\">\n </ng-container>\n <ng-template #defaultpicture>\n <img *ngIf=\"item.product.picturesdefault\"\n class=\"smc maxwidth img-fluid rounded-custom\"\n [src]=\"consts.mediaUrl() + item.product.picturesdefault[0]\" alt=\"\">\n </ng-template>\n </div>\n <div\n class=\"col-md-4 col-7 flex-column flex-md-row justify-content-start d-flex align-items-center\">\n <p class=\"font-brandon d-flex w-100 mb-0\">\n {{ item.product.name }} (Cod:{{ item.product.variants[0].code }})\n </p>\n </div>\n <div class=\"col-md-1 col-1 flex-column flex-md-row justify-content-start d-flex align-items-center\"\n *ngIf=\"ordersService.channelConfig.applyOrderLot\">\n <input type=\"button\" class=\"btn btn-primary btnSeguir m-0 text-center\" type=\"button\"\n [attr.data-bs-toggle]=\"'collapse'\" [attr.data-bs-target]=\"'#collapseExample'+i\"\n aria-expanded=\"false\" [attr.aria-controls]=\"'collapseExample'+i\"\n value=\"{{ 'see' | translate | uppercase }}\">\n </div>\n <div class=\"container d-md-none\">\n <div class=\"row\">\n <div class=\"col-4\">\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\n </div>\n <div class=\"col-4 font-xl\" *ngIf=\"(creditAmountConfigured ? showPrice : true)\">\n <p class=\"text-center w-100 m-0\"> {{ (item.product.variants[0].saleprice ?\n item.product.variants[0].saleprice : item.product.variants[0].price) |\n ecCurrencySymbol}}</p>\n </div>\n <div class=\"col-4 font-xl\" *ngIf=\"(creditAmountConfigured ? showPrice : true)\">\n <p class=\"text-center w-100 m-0\"> {{ ((item.product.variants[0].saleprice ?\n item.product.variants[0].saleprice : item.product.variants[0].price) *\n item.quantity) | ecCurrencySymbol}}</p>\n </div>\n </div>\n </div>\n\n <div class=\"col-2 d-none d-md-flex align-items-center\"\n *ngIf=\"(creditAmountConfigured ? showPrice : true)\">\n <p class=\"text-center w-100 m-0\">\n {{ (item.product.variants[0].saleprice ? item.product.variants[0].saleprice :\n item.product.variants[0].price) | ecCurrencySymbol}}\n </p>\n </div>\n <div class=\"col-1 d-none d-md-flex align-items-center\">\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\n </div>\n <div class=\"col-2 d-none d-md-flex align-items-center\"\n *ngIf=\"(creditAmountConfigured ? showPrice : true)\">\n <p class=\"text-end w-100 m-0\">\n {{ ((item.product.variants[0].saleprice ? item.product.variants[0].saleprice :\n item.product.variants[0].price) * item.quantity) | ecCurrencySymbol}}</p>\n </div>\n <div class=\"collapse\" [attr.id]=\"'collapseExample'+i\">\n <div class=\"card card-body\">\n <table class=\"table table-striped\">\n <thead>\n <tr>\n <th scope=\"col\">#</th>\n <th scope=\"col\">Estado</th>\n <th scope=\"col\">Cantidad</th>\n <th scope=\"col\">Fecha Solicitada</th>\n <th scope=\"col\">Fecha Estimada</th>\n <th scope=\"col\">Sede</th>\n <th scope=\"col\">Nota</th>\n <th scope=\"col\">Total Lote</th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let lot of item.orderItemLot\">\n <tr>\n <th scope=\"row\">{{lot.id}}</th>\n <td>{{lot.lot_status}}</td>\n <td>{{lot.quantity}}</td>\n <td>{{ toDate(lot.date_request, 'DD/MM/YYYY') | translate }}</td>\n <td *ngIf=\"lot.date_deliver; else sinFechaEstimada\">{{\n toDate(lot.date_deliver, 'DD/MM/YYYY') | translate }}</td>\n <ng-template #sinFechaEstimada>\n <td>Pendiente</td>\n </ng-template>\n <td>{{lot.shipping_address_name}}</td>\n <td>{{lot.notes}}</td>\n <td>{{lot.total_lot | ecCurrencySymbol}}</td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n\n </ng-container>\n </div>\n\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-12 col-md-6\"></div>\n <div class=\"col-12 col-md-6\" *ngIf=\"(creditAmountConfigured ? showPrice : true)\">\n <div class=\"row py-4\">\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'total-products' |\n translate }}</div>\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\n {{ (order.totals.items) | ecCurrencySymbol }}\n </div>\n\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'shipment' |\n translate }}</div>\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\n {{ (order.totals.shipping || '0') | ecCurrencySymbol }}\n\n </div>\n\n <div *ngIf=\"!hideDiscounts && order.totals.promotion && order.totals.promotion != 0\"\n class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'discount' |\n translate }}</div>\n <div *ngIf=\"!hideDiscounts && order.totals.promotion && order.totals.promotion != 0\"\n class=\"col-6 font-brandon font-md text-gray border-bottom text-end text-end\">\n {{ (order.totals.promotion) | ecCurrencySymbol }}</div>\n\n <div *ngIf=\"!hideTaxes && order.totals.taxes && order.totals.taxes != 0 \"\n class=\"col-6 font-brandon font-md text-gray border-bottom \">\n {{ 'taxes' | translate }}</div>\n <div *ngIf=\"!hideTaxes && order.totals.taxes && order.totals.taxes != 0\"\n class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\n {{ (order.totals.taxes) | ecCurrencySymbol }}</div>\n\n <div class=\"col-6 font-brandon font-md\">{{ 'total' | translate | uppercase }}</div>\n <div class=\"col-6 font-brandon font-md text-end\">\n {{ (order.totals.total) | ecCurrencySymbol }}\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n</main>\n\n<ng-template #noOrder>\n <div class=\"w-100 h-50\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <h5>{{ 'no-orders' | translate }}</h5>\n </div>\n </div>\n</ng-template>\n\n<ng-template #loadingView>\n <div class=\"w-100 h-50 py-5\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n </div>\n</ng-template>",
|
|
13290
|
+
template: "<main class=\"py-5\" id=\"orderEcComponent\">\n <div class=\"container\">\n <div class=\"wrap\" *ngIf=\"!loading; else loadingView\">\n <div *ngIf=\"order; else noOrder\">\n\n <div class=\"row justify-content-between \">\n <div class=\"col-sm-auto col-12 font-brandon\">\n <h4 class=\"tit1 fw-bold\">{{ ('order' | translate) + ': ' + order.number }}</h4>\n </div>\n <ng-container *ngIf=\"order?.invoice\">\n <div class=\"col-sm col-12 font-brandon\">\n <a target=\"_blank\" [href]=\"consts.getUrlBase().slice(0, -1) + order.invoice\"\n class=\"btn btn-link btn-invoice\">\n <i class=\"fas fa-file-download me-1\"></i>\n {{ 'download' | translate }} {{ 'invoices' | translate | titlecase }}\n </a>\n </div>\n </ng-container>\n <a (click)=\"volver()\" class=\"col-auto text-end\">\n <button class=\"btn btvolver bg-gray text-white\">{{ 'back-to-orders' | translate }}</button>\n </a>\n </div>\n\n <section id=\"orders\">\n <div class=\"row pt-2\">\n <div class=\"col-md-2 col-12\">\n <p class=\"st\">{{ 'payment-state' | translate }}:</p>\n <p class=\"\">\n {{ order.payments[0].state | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'shipment-state' | translate }}:</p>\n <p class=\"\">\n {{ order.shipments[0].state | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'payment-method' | translate }}:</p>\n <p class=\"\">\n {{ order.payments[0]?.method?.name | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'shipment-method' | translate }}:</p>\n <p class=\"\">\n {{ order.shipments[0].method.name }}\n </p>\n <!-- ACA DEBERIA IR EL LINK DE SEGUIMIENTO -->\n <a *ngIf=\"order.tracking\" [href]=\"order.tracking\"\n class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver\n seguimiento</a>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'date' | translate }}:</p>\n <p class=\"\">\n {{ toDate(order.checkoutCompletedAt, 'DD/MM/YYYY') | translate }}<br>\n {{ toDate(order.checkoutCompletedAt, 'h:mm:ss a') | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\" *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n <p class=\"st\">{{ 'total' | translate }}:</p>\n <h5 class=\"fw-bold\">\n {{ (order.totals.total) | ecCurrencySymbol}}\n\n </h5>\n </div>\n </div>\n </section>\n\n <div class=\"text-end mt-3\" *ngIf=\"!hidePrices && allowRepeatOrders\">\n <button class=\"btn btn-primary mb-2\" (click)=\"repeatOrder()\">\n {{ 'repeat-order' | translate }}\n </button>\n </div>\n\n <div class=\"container py-3 border-top border-bottom\">\n <div *ngIf=\"order.items.length; else noProducts\" class=\"row\">\n <div class=\"col-2 font-sm font-brandon d-none d-md-block\">\n {{ 'product' | translate | uppercase }}\n </div>\n <div class=\"col-4 font-sm font-brandon d-none d-md-block\">\n {{ 'description' | translate | uppercase }}\n </div>\n <div id=\"colLots\" *ngIf=\"ordersService.channelConfig.applyOrderLot\"\n class=\"col-1 font-sm font-brandon d-none d-md-block\">\n <!-- {{ 'description' | translate | uppercase }} -->\n {{ 'lots' | translate | uppercase }}\n </div>\n <div class=\"col-2 text-center font-sm font-brandon d-none d-md-block\"\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n {{ 'unit-price' | translate | uppercase }}\n </div>\n <div class=\"col-1 text-center font-sm font-brandon d-none d-md-block\">\n {{ 'quantity' | translate | uppercase }}\n </div>\n <div class=\"col-2 text-end font-sm font-brandon d-none d-md-block\"\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n {{ 'total' | translate | uppercase }}\n </div>\n </div>\n <ng-container *ngFor=\"let item of order.items; let i = index\">\n <div class=\"row cart-items\">\n <div class=\"col-5 col-md-2 py-2\">\n <ng-container *ngIf=\"item.product.variants[0]?.images?.length ; else defaultpicture\">\n <img class=\"smc maxwidth img-fluid rounded-custom \"\n [src]=\"consts.mediaUrl() + item.product.variants[0].images[0]\" alt=\"\">\n </ng-container>\n <ng-template #defaultpicture>\n <img *ngIf=\"item.product.picturesdefault\"\n class=\"smc maxwidth img-fluid rounded-custom\"\n [src]=\"consts.mediaUrl() + item.product.picturesdefault[0]\" alt=\"\">\n </ng-template>\n </div>\n <div\n class=\"col-md-4 col-7 flex-column flex-md-row justify-content-start d-flex align-items-center\">\n <p class=\"font-brandon d-flex w-100 mb-0\">\n {{ item.product.name }} (Cod:{{ item.product.variants[0].code }})\n </p>\n </div>\n <div class=\"col-md-1 col-1 flex-column flex-md-row justify-content-start d-flex align-items-center\"\n *ngIf=\"ordersService.channelConfig.applyOrderLot\">\n <input type=\"button\" class=\"btn btn-primary btnSeguir m-0 text-center\" type=\"button\"\n [attr.data-bs-toggle]=\"'collapse'\" [attr.data-bs-target]=\"'#collapseExample'+i\"\n aria-expanded=\"false\" [attr.aria-controls]=\"'collapseExample'+i\"\n value=\"{{ 'see' | translate | uppercase }}\">\n </div>\n <div class=\"container d-md-none\">\n <div class=\"row\">\n <div class=\"col-4\">\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\n </div>\n <div class=\"col-4 font-xl\" *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n <p class=\"text-center w-100 m-0\"> {{ (item.product.variants[0].saleprice ?\n item.product.variants[0].saleprice : item.product.variants[0].price) |\n ecCurrencySymbol}}</p>\n </div>\n <div class=\"col-4 font-xl\" *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n <p class=\"text-center w-100 m-0\"> {{ ((item.product.variants[0].saleprice ?\n item.product.variants[0].saleprice : item.product.variants[0].price) *\n item.quantity) | ecCurrencySymbol}}</p>\n </div>\n </div>\n </div>\n\n <div class=\"col-2 d-none d-md-flex align-items-center\"\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n <p class=\"text-center w-100 m-0\">\n {{ (item.product.variants[0].saleprice ? item.product.variants[0].saleprice :\n item.product.variants[0].price) | ecCurrencySymbol}}\n </p>\n </div>\n <div class=\"col-1 d-none d-md-flex align-items-center\">\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\n </div>\n <div class=\"col-2 d-none d-md-flex align-items-center\"\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n <p class=\"text-end w-100 m-0\">\n {{ ((item.product.variants[0].saleprice ? item.product.variants[0].saleprice :\n item.product.variants[0].price) * item.quantity) | ecCurrencySymbol}}</p>\n </div>\n <div class=\"collapse\" [attr.id]=\"'collapseExample'+i\">\n <div class=\"card card-body\">\n <table class=\"table table-striped\">\n <thead>\n <tr>\n <th scope=\"col\">#</th>\n <th scope=\"col\">Estado</th>\n <th scope=\"col\">Cantidad</th>\n <th scope=\"col\">Fecha Solicitada</th>\n <th scope=\"col\">Fecha Estimada</th>\n <th scope=\"col\">Sede</th>\n <th scope=\"col\">Nota</th>\n <th scope=\"col\">Total Lote</th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let lot of item.orderItemLot\">\n <tr>\n <th scope=\"row\">{{lot.id}}</th>\n <td>{{lot.lot_status}}</td>\n <td>{{lot.quantity}}</td>\n <td>{{ toDate(lot.date_request, 'DD/MM/YYYY') | translate }}</td>\n <td *ngIf=\"lot.date_deliver; else sinFechaEstimada\">{{\n toDate(lot.date_deliver, 'DD/MM/YYYY') | translate }}</td>\n <ng-template #sinFechaEstimada>\n <td>Pendiente</td>\n </ng-template>\n <td>{{lot.shipping_address_name}}</td>\n <td>{{lot.notes}}</td>\n <td>{{lot.total_lot | ecCurrencySymbol}}</td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n\n </ng-container>\n </div>\n\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-12 col-md-6\"></div>\n <div class=\"col-12 col-md-6\" *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n <div class=\"row py-4\">\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'total-products' |\n translate }}</div>\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\n {{ (order.totals.items) | ecCurrencySymbol }}\n </div>\n\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'shipment' |\n translate }}</div>\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\n {{ (order.totals.shipping || '0') | ecCurrencySymbol }}\n\n </div>\n\n <div *ngIf=\"!hideDiscounts && order.totals.promotion && order.totals.promotion != 0\"\n class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'discount' |\n translate }}</div>\n <div *ngIf=\"!hideDiscounts && order.totals.promotion && order.totals.promotion != 0\"\n class=\"col-6 font-brandon font-md text-gray border-bottom text-end text-end\">\n {{ (order.totals.promotion) | ecCurrencySymbol }}</div>\n\n <div *ngIf=\"!hideTaxes && order.totals.taxes && order.totals.taxes != 0 \"\n class=\"col-6 font-brandon font-md text-gray border-bottom \">\n {{ 'taxes' | translate }}</div>\n <div *ngIf=\"!hideTaxes && order.totals.taxes && order.totals.taxes != 0\"\n class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\n {{ (order.totals.taxes) | ecCurrencySymbol }}</div>\n\n <div class=\"col-6 font-brandon font-md\">{{ 'total' | translate | uppercase }}</div>\n <div class=\"col-6 font-brandon font-md text-end\">\n {{ (order.totals.total) | ecCurrencySymbol }}\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n</main>\n\n<ng-template #noOrder>\n <div class=\"w-100 h-50\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <h5>{{ 'no-orders' | translate }}</h5>\n </div>\n </div>\n</ng-template>\n\n<ng-template #loadingView>\n <div class=\"w-100 h-50 py-5\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n </div>\n</ng-template>",
|
|
13245
13291
|
styles: [".maxwidth{max-width:100px}"]
|
|
13246
13292
|
})
|
|
13247
13293
|
], OrderEcComponent);
|
|
@@ -14263,25 +14309,25 @@
|
|
|
14263
14309
|
_this.data = null;
|
|
14264
14310
|
_this.discountTotal = 0;
|
|
14265
14311
|
_this.couponTotal = 0;
|
|
14266
|
-
_this.
|
|
14267
|
-
_this.creditAmountConfigured = false;
|
|
14312
|
+
_this.creditAccountShowPrices = null;
|
|
14268
14313
|
_this.hideDiscounts = false;
|
|
14269
14314
|
_this.hideTaxes = false;
|
|
14315
|
+
_this.showPriceWithoutTaxes = true;
|
|
14270
14316
|
_this.getIcon = function (data_item) {
|
|
14271
14317
|
switch (data_item.type) {
|
|
14272
|
-
case 'coupon': return 'fas fa-ticket-alt fa-
|
|
14273
|
-
case 'discount': return 'fas fa-tags fa-
|
|
14274
|
-
case 'shipment': return 'fas fa-shipping-fast fa-
|
|
14275
|
-
case 'subtotal': return 'fas fa-boxes fa-
|
|
14276
|
-
case 'taxes': return 'fas fa-file-invoice-dollar fa-
|
|
14277
|
-
case 'total': return 'fas fa-shopping-basket fa-
|
|
14278
|
-
default: return 'fas fa-tags fa-
|
|
14318
|
+
case 'coupon': return 'fas fa-ticket-alt fa-2x';
|
|
14319
|
+
case 'discount': return 'fas fa-tags fa-2x';
|
|
14320
|
+
case 'shipment': return 'fas fa-shipping-fast fa-2x';
|
|
14321
|
+
case 'subtotal': return 'fas fa-boxes fa-2x';
|
|
14322
|
+
case 'taxes': return 'fas fa-file-invoice-dollar fa-2x';
|
|
14323
|
+
case 'total': return 'fas fa-shopping-basket fa-2x';
|
|
14324
|
+
default: return 'fas fa-tags fa-2x';
|
|
14279
14325
|
}
|
|
14280
14326
|
};
|
|
14281
14327
|
_this.getIcon2 = function (data_type) {
|
|
14282
14328
|
switch (data_type) {
|
|
14283
|
-
case 'coupon': return 'fas fa-ticket-alt fa-
|
|
14284
|
-
case 'discount': return 'fas fa-tags fa-
|
|
14329
|
+
case 'coupon': return 'fas fa-ticket-alt fa-2x';
|
|
14330
|
+
case 'discount': return 'fas fa-tags fa-2x';
|
|
14285
14331
|
}
|
|
14286
14332
|
};
|
|
14287
14333
|
_this.ecOnConstruct();
|
|
@@ -14294,15 +14340,13 @@
|
|
|
14294
14340
|
this.calcularTotales();
|
|
14295
14341
|
this.ecOnInit();
|
|
14296
14342
|
this.cartService.showPrice$.subscribe(function (showPrice) {
|
|
14297
|
-
_this.
|
|
14298
|
-
});
|
|
14299
|
-
this.cartService.creditAmount$.subscribe(function (creditAmount) {
|
|
14300
|
-
_this.creditAmountConfigured = creditAmount !== null;
|
|
14343
|
+
_this.creditAccountShowPrices = showPrice;
|
|
14301
14344
|
});
|
|
14302
14345
|
this.channelConfigService.channelConfig$.subscribe(function (channel) {
|
|
14303
|
-
var _a, _b, _c, _d;
|
|
14346
|
+
var _a, _b, _c, _d, _e, _f;
|
|
14304
14347
|
_this.hideDiscounts = (_b = (_a = channel) === null || _a === void 0 ? void 0 : _a.hideDiscounts, (_b !== null && _b !== void 0 ? _b : false));
|
|
14305
14348
|
_this.hideTaxes = (_d = (_c = channel) === null || _c === void 0 ? void 0 : _c.hideTaxes, (_d !== null && _d !== void 0 ? _d : false));
|
|
14349
|
+
_this.showPriceWithoutTaxes = (_f = (_e = channel) === null || _e === void 0 ? void 0 : _e.showPriceWithoutTaxes, (_f !== null && _f !== void 0 ? _f : false));
|
|
14306
14350
|
});
|
|
14307
14351
|
};
|
|
14308
14352
|
DetailCheckoutBlockEcComponent.prototype.calcularTotales = function () {
|
|
@@ -14315,6 +14359,12 @@
|
|
|
14315
14359
|
.reduce(function (acc, curr) { return acc + curr.amount; }, 0);
|
|
14316
14360
|
}
|
|
14317
14361
|
};
|
|
14362
|
+
DetailCheckoutBlockEcComponent.prototype.getTypeLabel = function (type) {
|
|
14363
|
+
if (type === 'taxes') {
|
|
14364
|
+
return this.showPriceWithoutTaxes ? 'taxes' : 'national-taxes';
|
|
14365
|
+
}
|
|
14366
|
+
return type;
|
|
14367
|
+
};
|
|
14318
14368
|
DetailCheckoutBlockEcComponent.ctorParameters = function () { return [
|
|
14319
14369
|
{ type: CheckoutService },
|
|
14320
14370
|
{ type: CartService },
|
|
@@ -14326,7 +14376,7 @@
|
|
|
14326
14376
|
DetailCheckoutBlockEcComponent = __decorate$1u([
|
|
14327
14377
|
core.Component({
|
|
14328
14378
|
selector: 'app-detail-checkout-block-ec',
|
|
14329
|
-
template: "<div id=\"appDetailCheckoutBlockEc\" class=\"d-flex flex-row w-100 justify-content-center flex-wrap\"\n *ngIf=\"data && (
|
|
14379
|
+
template: "<div id=\"appDetailCheckoutBlockEc\" class=\"d-flex flex-row w-100 justify-content-center flex-wrap\"\n *ngIf=\"data && (creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n <ng-container *ngFor=\"let item of data; let i = index\">\n <ng-container *ngIf=\"item.type != 'discount' && item.type != 'coupon'\">\n <div class=\"d-flex flex-column justify-content-center mx-sm-3 mx-2 text-center mb-4 resumen\">\n <i ngClass=\"mb-2 colorIconoCheckout\" [class]=\"getIcon(item)\"></i>\n <strong class=\"text-center w-100 font-brandon font-md mb-1\">\n {{ getTypeLabel(item.type) | translate }}\n </strong>\n <span class=\"text-center w-100 font-brandon font-md text-gray\">{{ (item.amount != 0 ) ? (item.amount |\n ecCurrencySymbol) : ('free' | translate) }}</span>\n </div>\n </ng-container>\n\n\n <!-- Mostrar total de descuentos -->\n <div class=\"d-flex flex-column justify-content-center mx-sm-3 mx-2 text-center mb-4 resumen\"\n *ngIf=\"!hideDiscounts && this.discountTotal != 0 && i === 1\">\n <i ngClass=\"mb-2 colorIconoCheckout\" [class]=\"getIcon2('discount')\"></i>\n <strong class=\"text-center w-100 font-brandon font-md mb-1\">Descuento</strong>\n <span class=\"text-center w-100 font-brandon font-md text-gray\">{{ (this.discountTotal | ecCurrencySymbol)\n }}</span>\n </div>\n\n <!-- Mostrar total de cupones -->\n <div class=\"d-flex flex-column justify-content-center mx-sm-3 mx-2 text-center mb-4 resumen\"\n *ngIf=\"!hideDiscounts && this.couponTotal != 0 && i === 1\">\n <i ngClass=\"mb-2 colorIconoCheckout\" [class]=\"getIcon2('coupon')\"></i>\n <strong class=\"text-center w-100 font-brandon font-md mb-1\">Cupon</strong>\n <span class=\"text-center w-100 font-brandon font-md text-gray\">{{(this.couponTotal| ecCurrencySymbol)\n }}</span>\n </div>\n </ng-container>\n</div>",
|
|
14330
14380
|
styles: [""]
|
|
14331
14381
|
})
|
|
14332
14382
|
], DetailCheckoutBlockEcComponent);
|
|
@@ -18660,7 +18710,7 @@
|
|
|
18660
18710
|
this.variantsToShow = ['TALLE', 'COLOR'];
|
|
18661
18711
|
this.hideDiscounts = false;
|
|
18662
18712
|
this.hideTaxes = false;
|
|
18663
|
-
this.creditAccountShowPrices =
|
|
18713
|
+
this.creditAccountShowPrices = null;
|
|
18664
18714
|
this.actualizarCantidad = function (item, cantidad, stock, id) {
|
|
18665
18715
|
if (id) {
|
|
18666
18716
|
var elem_1 = document.getElementById(id);
|