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
package/fesm5/ng-easycommerce.js
CHANGED
|
@@ -3617,9 +3617,9 @@ var CheckoutService = /** @class */ (function () {
|
|
|
3617
3617
|
});
|
|
3618
3618
|
}); };
|
|
3619
3619
|
this.updateAsociatedData = function (cart) {
|
|
3620
|
-
var _a, _b
|
|
3620
|
+
var _a, _b;
|
|
3621
3621
|
var result = _this.orderUtils.getPromotions(cart);
|
|
3622
|
-
if (
|
|
3622
|
+
if (cart.totals.taxes != 0) {
|
|
3623
3623
|
var total = __assign$7({}, result[result.length - 1]);
|
|
3624
3624
|
result[result.length - 1] = {
|
|
3625
3625
|
type: 'taxes',
|
|
@@ -3628,9 +3628,9 @@ var CheckoutService = /** @class */ (function () {
|
|
|
3628
3628
|
};
|
|
3629
3629
|
result.push(total);
|
|
3630
3630
|
}
|
|
3631
|
-
var shipment = (
|
|
3631
|
+
var shipment = (_a = result) === null || _a === void 0 ? void 0 : _a.find(function (promotion) { return promotion.type == "shipment"; });
|
|
3632
3632
|
if (!shipment && cart.totals.shipping != 0) {
|
|
3633
|
-
if (((
|
|
3633
|
+
if (((_b = result) === null || _b === void 0 ? void 0 : _b.length) && !result.find(function (item) { return item.type === "shipment"; })) {
|
|
3634
3634
|
var total = __assign$7({}, result[result.length - 1]);
|
|
3635
3635
|
result[result.length - 1] = {
|
|
3636
3636
|
type: 'shipment',
|
|
@@ -4627,16 +4627,7 @@ var CartService = /** @class */ (function () {
|
|
|
4627
4627
|
this.cartSubject = new BehaviorSubject(null);
|
|
4628
4628
|
this.requestInProcess = new BehaviorSubject(false);
|
|
4629
4629
|
this.promotionsSubject = new BehaviorSubject([]);
|
|
4630
|
-
this.balanceCustomerSubject = new BehaviorSubject(
|
|
4631
|
-
allowAnyPaymentMethod: false,
|
|
4632
|
-
allowExceedBalance: false,
|
|
4633
|
-
creditAmount: 0,
|
|
4634
|
-
showMax: false,
|
|
4635
|
-
showPrice: false,
|
|
4636
|
-
remainingCredits: 0,
|
|
4637
|
-
applyMaxOrders: false,
|
|
4638
|
-
maxOrders: Infinity
|
|
4639
|
-
});
|
|
4630
|
+
this.balanceCustomerSubject = new BehaviorSubject(null);
|
|
4640
4631
|
this.items = [];
|
|
4641
4632
|
this.count = 0;
|
|
4642
4633
|
this.locale = "";
|
|
@@ -4659,11 +4650,11 @@ var CartService = /** @class */ (function () {
|
|
|
4659
4650
|
this.promotions = this.promotionsSubject.asObservable();
|
|
4660
4651
|
this.deleting = false;
|
|
4661
4652
|
this.balanceCustomer$ = this.balanceCustomerSubject.asObservable();
|
|
4662
|
-
this.allowAnyPaymentMethod$ = this.balanceCustomer$.pipe(map(function (data) { return data.allowAnyPaymentMethod; }));
|
|
4663
|
-
this.allowExceedBalance$ = this.balanceCustomer$.pipe(map(function (data) { return data.allowExceedBalance; }));
|
|
4664
|
-
this.creditAmount$ = this.balanceCustomer$.pipe(map(function (data) { return data.creditAmount; }));
|
|
4665
|
-
this.showMax$ = this.balanceCustomer$.pipe(map(function (data) { return data.showMax; }));
|
|
4666
|
-
this.showPrice$ = this.balanceCustomer$.pipe(map(function (data) { return data.showPrice; }));
|
|
4653
|
+
this.allowAnyPaymentMethod$ = this.balanceCustomer$.pipe(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); }));
|
|
4654
|
+
this.allowExceedBalance$ = this.balanceCustomer$.pipe(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); }));
|
|
4655
|
+
this.creditAmount$ = this.balanceCustomer$.pipe(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); }));
|
|
4656
|
+
this.showMax$ = this.balanceCustomer$.pipe(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); }));
|
|
4657
|
+
this.showPrice$ = this.balanceCustomer$.pipe(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); }));
|
|
4667
4658
|
this.getAddressBook = function () { return __awaiter$5(_this, void 0, void 0, function () { return __generator$5(this, function (_a) {
|
|
4668
4659
|
return [2 /*return*/, this.connection.get(this.addressBookApi()).pipe(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()];
|
|
4669
4660
|
}); }); };
|
|
@@ -4798,8 +4789,11 @@ var CartService = /** @class */ (function () {
|
|
|
4798
4789
|
* CART CRUD
|
|
4799
4790
|
*/
|
|
4800
4791
|
this.addToCart = function (product, quantity, variant_id) {
|
|
4792
|
+
var _a, _b, _c, _d;
|
|
4801
4793
|
var balance = _this.balanceCustomerSubject.value;
|
|
4802
|
-
|
|
4794
|
+
var applyMaxOrders = (_b = (_a = balance) === null || _a === void 0 ? void 0 : _a.applyMaxOrders, (_b !== null && _b !== void 0 ? _b : false));
|
|
4795
|
+
var maxOrders = (_d = (_c = balance) === null || _c === void 0 ? void 0 : _c.maxOrders, (_d !== null && _d !== void 0 ? _d : Infinity));
|
|
4796
|
+
if (applyMaxOrders && (maxOrders <= 0 || maxOrders === null)) {
|
|
4803
4797
|
_this.toastrService.show('max-orders-reached');
|
|
4804
4798
|
return;
|
|
4805
4799
|
}
|
|
@@ -4912,10 +4906,11 @@ var CartService = /** @class */ (function () {
|
|
|
4912
4906
|
return true;
|
|
4913
4907
|
};
|
|
4914
4908
|
this.validatePriceAndCredits = function (item, quantity) {
|
|
4915
|
-
|
|
4909
|
+
var balance = _this.balanceCustomerSubject.value;
|
|
4910
|
+
if (!balance || balance.creditAmount === null || balance.creditAmount === undefined) {
|
|
4916
4911
|
return true;
|
|
4917
4912
|
}
|
|
4918
|
-
if (
|
|
4913
|
+
if (balance.remainingCredits === undefined) {
|
|
4919
4914
|
return false;
|
|
4920
4915
|
}
|
|
4921
4916
|
var unitPrice = item.total / item.quantity;
|
|
@@ -4924,20 +4919,21 @@ var CartService = /** @class */ (function () {
|
|
|
4924
4919
|
return true;
|
|
4925
4920
|
}
|
|
4926
4921
|
var additionalCost = unitPrice * additionalQuantity;
|
|
4927
|
-
if (additionalCost >
|
|
4922
|
+
if (additionalCost > balance.remainingCredits) {
|
|
4928
4923
|
_this.toastrService.show('not-enough-credits');
|
|
4929
4924
|
return false;
|
|
4930
4925
|
}
|
|
4931
4926
|
return true;
|
|
4932
4927
|
};
|
|
4933
4928
|
this.hasSufficientCreditsForCartTotal = function () {
|
|
4934
|
-
|
|
4929
|
+
var balance = _this.balanceCustomerSubject.value;
|
|
4930
|
+
if (!balance || balance.creditAmount === null || balance.creditAmount === undefined) {
|
|
4935
4931
|
return true;
|
|
4936
4932
|
}
|
|
4937
|
-
if (
|
|
4933
|
+
if (balance.remainingCredits === undefined) {
|
|
4938
4934
|
return false;
|
|
4939
4935
|
}
|
|
4940
|
-
if (_this.cartSubject.value.totals.total >
|
|
4936
|
+
if (_this.cartSubject.value.totals.total > balance.creditAmount) {
|
|
4941
4937
|
_this.toastrService.show('not-enough-credits');
|
|
4942
4938
|
return false;
|
|
4943
4939
|
}
|
|
@@ -5189,18 +5185,23 @@ var CartService = /** @class */ (function () {
|
|
|
5189
5185
|
}));
|
|
5190
5186
|
};
|
|
5191
5187
|
CartService$1.prototype.updateBalanceAttributes = function (cartData) {
|
|
5192
|
-
var _a, _b, _c
|
|
5188
|
+
var _a, _b, _c;
|
|
5189
|
+
var balance = (_a = cartData) === null || _a === void 0 ? void 0 : _a.balanceCustomer;
|
|
5190
|
+
if (!balance) {
|
|
5191
|
+
this.balanceCustomerSubject.next(null);
|
|
5192
|
+
return;
|
|
5193
|
+
}
|
|
5193
5194
|
var balanceData = {
|
|
5194
|
-
allowAnyPaymentMethod:
|
|
5195
|
-
allowExceedBalance:
|
|
5196
|
-
creditAmount:
|
|
5197
|
-
showMax:
|
|
5198
|
-
showPrice:
|
|
5199
|
-
remainingCredits: ((
|
|
5200
|
-
?
|
|
5195
|
+
allowAnyPaymentMethod: balance.allowAnyPaymentMethod,
|
|
5196
|
+
allowExceedBalance: balance.allowExceedBalance,
|
|
5197
|
+
creditAmount: balance.creditAmount,
|
|
5198
|
+
showMax: balance.showMax,
|
|
5199
|
+
showPrice: balance.showPrice,
|
|
5200
|
+
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
|
|
5201
|
+
? balance.creditAmount - cartData.totals.total
|
|
5201
5202
|
: 0,
|
|
5202
|
-
applyMaxOrders:
|
|
5203
|
-
maxOrders:
|
|
5203
|
+
applyMaxOrders: balance.applyMaxOrders,
|
|
5204
|
+
maxOrders: balance.maxOrders
|
|
5204
5205
|
};
|
|
5205
5206
|
this.balanceCustomerSubject.next(balanceData);
|
|
5206
5207
|
};
|
|
@@ -7423,7 +7424,8 @@ var CartEcComponent = /** @class */ (function (_super) {
|
|
|
7423
7424
|
_this.hidePrices = false;
|
|
7424
7425
|
_this.hideDiscounts = false;
|
|
7425
7426
|
_this.hideTaxes = false;
|
|
7426
|
-
_this.creditAccountShowPrices =
|
|
7427
|
+
_this.creditAccountShowPrices = null;
|
|
7428
|
+
_this.showPriceWithoutTaxes = true;
|
|
7427
7429
|
_this.toDecimal = function (amount) { return _this.consts.toDecimal(amount); };
|
|
7428
7430
|
_this.actualizarCantidad = function (item, cantidad, stock, id) {
|
|
7429
7431
|
if (id) {
|
|
@@ -7509,10 +7511,11 @@ var CartEcComponent = /** @class */ (function (_super) {
|
|
|
7509
7511
|
this.cartService.promotions.subscribe(function (promotions) { return _this.promotions = promotions; });
|
|
7510
7512
|
// console.log(this.cartService.getTaxes());
|
|
7511
7513
|
this.channelConfigService.channelConfig$.subscribe(function (channel) {
|
|
7512
|
-
var _a, _b, _c, _d, _e, _f;
|
|
7514
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
7513
7515
|
_this.hidePrices = (_b = (_a = channel) === null || _a === void 0 ? void 0 : _a.hidePrices, (_b !== null && _b !== void 0 ? _b : false));
|
|
7514
7516
|
_this.hideDiscounts = (_d = (_c = channel) === null || _c === void 0 ? void 0 : _c.hideDiscounts, (_d !== null && _d !== void 0 ? _d : false));
|
|
7515
7517
|
_this.hideTaxes = (_f = (_e = channel) === null || _e === void 0 ? void 0 : _e.hideTaxes, (_f !== null && _f !== void 0 ? _f : false));
|
|
7518
|
+
_this.showPriceWithoutTaxes = (_h = (_g = channel) === null || _g === void 0 ? void 0 : _g.showPriceWithoutTaxes, (_h !== null && _h !== void 0 ? _h : false));
|
|
7516
7519
|
if (_this.hidePrices) {
|
|
7517
7520
|
_this.router.navigate(['/']);
|
|
7518
7521
|
}
|
|
@@ -8669,7 +8672,7 @@ var PaymentEcComponent = /** @class */ (function (_super) {
|
|
|
8669
8672
|
_this.loading_internal_mp = false;
|
|
8670
8673
|
_this.method_data$ = _this.methodDataSubject.asObservable();
|
|
8671
8674
|
_this.loading$ = _this.loadingSubject.asObservable();
|
|
8672
|
-
_this.allowAnyPaymentMethod =
|
|
8675
|
+
_this.allowAnyPaymentMethod = null;
|
|
8673
8676
|
_this.allData = function () { return (__assign$k(__assign$k({}, _this.paymentService.getUserData().shippingAddress), _this.paymentService.getShipmentData())); };
|
|
8674
8677
|
_this.setError = function (message) {
|
|
8675
8678
|
_this.error = message;
|
|
@@ -8745,8 +8748,8 @@ var PaymentEcComponent = /** @class */ (function (_super) {
|
|
|
8745
8748
|
var _this = this;
|
|
8746
8749
|
this.paymentService.initialize(this.step_id);
|
|
8747
8750
|
this.checkoutService.asociatedData$.subscribe(function (data) { return _this.total_amount = (data.find(function (item) { return item.type == 'total'; })).amount; });
|
|
8748
|
-
this.cartService.allowAnyPaymentMethod$.subscribe(function (
|
|
8749
|
-
_this.allowAnyPaymentMethod =
|
|
8751
|
+
this.cartService.allowAnyPaymentMethod$.subscribe(function (value) {
|
|
8752
|
+
_this.allowAnyPaymentMethod = value;
|
|
8750
8753
|
});
|
|
8751
8754
|
this.ecOnInit();
|
|
8752
8755
|
};
|
|
@@ -8774,6 +8777,8 @@ var PaymentEcComponent = /** @class */ (function (_super) {
|
|
|
8774
8777
|
PaymentEcComponent.prototype.shouldDisplayMethod = function (method) {
|
|
8775
8778
|
if (!method)
|
|
8776
8779
|
return false;
|
|
8780
|
+
if (this.allowAnyPaymentMethod === null)
|
|
8781
|
+
return true;
|
|
8777
8782
|
if (this.allowAnyPaymentMethod)
|
|
8778
8783
|
return true;
|
|
8779
8784
|
return this.isBalanceInAccount(method.code);
|
|
@@ -9856,6 +9861,7 @@ var HeaderEcComponent = /** @class */ (function (_super) {
|
|
|
9856
9861
|
_this.envetUrlTransparent = ["/home", "/"];
|
|
9857
9862
|
_this.params = {};
|
|
9858
9863
|
_this.toggled = false;
|
|
9864
|
+
_this.balanceAttributes = null;
|
|
9859
9865
|
_this.locales = [];
|
|
9860
9866
|
_this.selectedLocale = 'ESP';
|
|
9861
9867
|
_this.hidePrices = false;
|
|
@@ -10597,7 +10603,7 @@ var ProductDetailService = /** @class */ (function () {
|
|
|
10597
10603
|
options && options.forEach(function (option) { return Object.keys(option).forEach(function (key) { return _this.setOption(key, option[key]); }); });
|
|
10598
10604
|
};
|
|
10599
10605
|
this.generateAsociatedDataFromVariants = function () {
|
|
10600
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
10606
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
10601
10607
|
var asociated = {};
|
|
10602
10608
|
if (_this.isReady()) {
|
|
10603
10609
|
asociated.stock = _this.variants[0].stock;
|
|
@@ -10630,6 +10636,9 @@ var ProductDetailService = /** @class */ (function () {
|
|
|
10630
10636
|
taxIncluded: (_r = _this.variants[0]) === null || _r === void 0 ? void 0 : _r.taxIncluded,
|
|
10631
10637
|
taxCategory: (_s = _this.variants[0]) === null || _s === void 0 ? void 0 : _s.taxCategory,
|
|
10632
10638
|
};
|
|
10639
|
+
asociated.taxeAmount = ((_t = _this.variants[0]) === null || _t === void 0 ? void 0 : _t.taxes) || undefined;
|
|
10640
|
+
asociated.taxRate = ((_u = _this.variants[0]) === null || _u === void 0 ? void 0 : _u.taxRate) || undefined;
|
|
10641
|
+
asociated.priceWithoutTaxes = ((_v = _this.variants[0]) === null || _v === void 0 ? void 0 : _v.priceWithoutTaxes) || undefined;
|
|
10633
10642
|
_this.asociatedDataSubject.next(asociated);
|
|
10634
10643
|
};
|
|
10635
10644
|
/**
|
|
@@ -10917,7 +10926,7 @@ var ProductDetailEcComponent = /** @class */ (function (_super) {
|
|
|
10917
10926
|
_this.owlOptions = {};
|
|
10918
10927
|
_this.showReviews = false;
|
|
10919
10928
|
_this.hidePrices = false;
|
|
10920
|
-
_this.creditAccountShowPrices =
|
|
10929
|
+
_this.creditAccountShowPrices = null;
|
|
10921
10930
|
_this.addToCart = function () {
|
|
10922
10931
|
_this.quantity > 0 && _this.productService.addToCart(_this.quantity);
|
|
10923
10932
|
};
|
|
@@ -11083,7 +11092,7 @@ var ProductEcComponent = /** @class */ (function (_super) {
|
|
|
11083
11092
|
_this.stock = 0;
|
|
11084
11093
|
_this.data = null;
|
|
11085
11094
|
_this.hidePrices = false;
|
|
11086
|
-
_this.creditAccountShowPrices =
|
|
11095
|
+
_this.creditAccountShowPrices = null;
|
|
11087
11096
|
/**
|
|
11088
11097
|
* @description variable utilizada mutar de la vista de lista, a la de box.
|
|
11089
11098
|
*/
|
|
@@ -12320,18 +12329,30 @@ var __decorate$1f = (this && this.__decorate) || function (decorators, target, k
|
|
|
12320
12329
|
};
|
|
12321
12330
|
var PriceEcComponent = /** @class */ (function (_super) {
|
|
12322
12331
|
__extends$G(PriceEcComponent, _super);
|
|
12323
|
-
function PriceEcComponent(productsService) {
|
|
12332
|
+
function PriceEcComponent(productsService, channelConfigService) {
|
|
12324
12333
|
var _this = _super.call(this) || this;
|
|
12325
12334
|
_this.productsService = productsService;
|
|
12335
|
+
_this.channelConfigService = channelConfigService;
|
|
12326
12336
|
_this.priceSize = true;
|
|
12337
|
+
_this.taxeAmount = 0;
|
|
12338
|
+
_this.taxes = [];
|
|
12339
|
+
_this.showTaxLegendOnly = false;
|
|
12340
|
+
_this.disableTaxInfo = false;
|
|
12341
|
+
_this.showPriceWithoutTaxes = true;
|
|
12327
12342
|
_this.ecOnConstruct();
|
|
12328
12343
|
return _this;
|
|
12329
12344
|
}
|
|
12330
12345
|
PriceEcComponent.prototype.ngOnInit = function () {
|
|
12346
|
+
var _this = this;
|
|
12347
|
+
this.channelConfigService.channelConfig$.subscribe(function (channel) {
|
|
12348
|
+
var _a;
|
|
12349
|
+
_this.showPriceWithoutTaxes = (_a = channel) === null || _a === void 0 ? void 0 : _a.showPriceWithoutTaxes;
|
|
12350
|
+
});
|
|
12331
12351
|
this.ecOnInit();
|
|
12332
12352
|
};
|
|
12333
12353
|
PriceEcComponent.ctorParameters = function () { return [
|
|
12334
|
-
{ type: ProductsService }
|
|
12354
|
+
{ type: ProductsService },
|
|
12355
|
+
{ type: ChannelConfigService }
|
|
12335
12356
|
]; };
|
|
12336
12357
|
__decorate$1f([
|
|
12337
12358
|
Input()
|
|
@@ -12345,11 +12366,44 @@ var PriceEcComponent = /** @class */ (function (_super) {
|
|
|
12345
12366
|
__decorate$1f([
|
|
12346
12367
|
Input()
|
|
12347
12368
|
], PriceEcComponent.prototype, "classStrSpacing", void 0);
|
|
12369
|
+
__decorate$1f([
|
|
12370
|
+
Input()
|
|
12371
|
+
], PriceEcComponent.prototype, "basePrice", void 0);
|
|
12372
|
+
__decorate$1f([
|
|
12373
|
+
Input()
|
|
12374
|
+
], PriceEcComponent.prototype, "taxeAmount", void 0);
|
|
12375
|
+
__decorate$1f([
|
|
12376
|
+
Input()
|
|
12377
|
+
], PriceEcComponent.prototype, "taxes", void 0);
|
|
12378
|
+
__decorate$1f([
|
|
12379
|
+
Input()
|
|
12380
|
+
], PriceEcComponent.prototype, "showTaxLegendOnly", void 0);
|
|
12381
|
+
__decorate$1f([
|
|
12382
|
+
Input()
|
|
12383
|
+
], PriceEcComponent.prototype, "disableTaxInfo", void 0);
|
|
12384
|
+
__decorate$1f([
|
|
12385
|
+
Input()
|
|
12386
|
+
], PriceEcComponent.prototype, "customPriceTemplate", void 0);
|
|
12387
|
+
__decorate$1f([
|
|
12388
|
+
Input()
|
|
12389
|
+
], PriceEcComponent.prototype, "customSalePriceTemplate", void 0);
|
|
12390
|
+
__decorate$1f([
|
|
12391
|
+
Input()
|
|
12392
|
+
], PriceEcComponent.prototype, "customSimplePriceTemplate", void 0);
|
|
12393
|
+
__decorate$1f([
|
|
12394
|
+
Input()
|
|
12395
|
+
], PriceEcComponent.prototype, "customSimpleSalePriceTemplate", void 0);
|
|
12396
|
+
__decorate$1f([
|
|
12397
|
+
Input()
|
|
12398
|
+
], PriceEcComponent.prototype, "customTaxTemplate", void 0);
|
|
12399
|
+
__decorate$1f([
|
|
12400
|
+
Input()
|
|
12401
|
+
], PriceEcComponent.prototype, "customOnlyTaxLabelTemplate", void 0);
|
|
12348
12402
|
PriceEcComponent = __decorate$1f([
|
|
12349
12403
|
Component({
|
|
12350
12404
|
selector: 'app-price-ec',
|
|
12351
|
-
template: "<div *ngIf=\"saleprice; else onlyprice\" class=\"line-height-custom\">\n
|
|
12352
|
-
styles: [".price-sm{font-size:13px}.price{font-size:18px}.lnth{text-decoration:line-through;color:gray}"]
|
|
12405
|
+
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>",
|
|
12406
|
+
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}"]
|
|
12353
12407
|
})
|
|
12354
12408
|
], PriceEcComponent);
|
|
12355
12409
|
return PriceEcComponent;
|
|
@@ -12927,8 +12981,7 @@ var OrdersEcComponent = /** @class */ (function (_super) {
|
|
|
12927
12981
|
_this.channelConfigService = channelConfigService;
|
|
12928
12982
|
_this.loading = true;
|
|
12929
12983
|
_this.showImage = true;
|
|
12930
|
-
_this.
|
|
12931
|
-
_this.creditAmountConfigured = false;
|
|
12984
|
+
_this.creditAccountShowPrices = null;
|
|
12932
12985
|
_this.hidePrices = false;
|
|
12933
12986
|
/**
|
|
12934
12987
|
* @description name -> nombre de clave de valuesToSort; asc -> true: ascendente, false: descendente
|
|
@@ -13069,10 +13122,7 @@ var OrdersEcComponent = /** @class */ (function (_super) {
|
|
|
13069
13122
|
});
|
|
13070
13123
|
this.ecOnInit();
|
|
13071
13124
|
this.cartService.showPrice$.subscribe(function (showPrice) {
|
|
13072
|
-
_this.
|
|
13073
|
-
});
|
|
13074
|
-
this.cartService.creditAmount$.subscribe(function (creditAmount) {
|
|
13075
|
-
_this.creditAmountConfigured = creditAmount !== null;
|
|
13125
|
+
_this.creditAccountShowPrices = showPrice;
|
|
13076
13126
|
});
|
|
13077
13127
|
this.channelConfigService.channelConfig$.subscribe(function (channel) {
|
|
13078
13128
|
var _a, _b;
|
|
@@ -13092,7 +13142,7 @@ var OrdersEcComponent = /** @class */ (function (_super) {
|
|
|
13092
13142
|
OrdersEcComponent = __decorate$1k([
|
|
13093
13143
|
Component({
|
|
13094
13144
|
selector: 'app-orders-ec',
|
|
13095
|
-
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=\"(
|
|
13145
|
+
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>",
|
|
13096
13146
|
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}"]
|
|
13097
13147
|
})
|
|
13098
13148
|
], OrdersEcComponent);
|
|
@@ -13170,8 +13220,7 @@ var OrderEcComponent = /** @class */ (function (_super) {
|
|
|
13170
13220
|
_this.loading = true;
|
|
13171
13221
|
_this.numberOrder = null;
|
|
13172
13222
|
_this.allowRepeatOrders = false;
|
|
13173
|
-
_this.
|
|
13174
|
-
_this.creditAmountConfigured = false;
|
|
13223
|
+
_this.creditAccountShowPrices = null;
|
|
13175
13224
|
_this.hidePrices = false;
|
|
13176
13225
|
_this.hideDiscounts = false;
|
|
13177
13226
|
_this.hideTaxes = false;
|
|
@@ -13229,10 +13278,7 @@ var OrderEcComponent = /** @class */ (function (_super) {
|
|
|
13229
13278
|
_this.hideTaxes = (_f = (_e = config) === null || _e === void 0 ? void 0 : _e.hideTaxes, (_f !== null && _f !== void 0 ? _f : false));
|
|
13230
13279
|
});
|
|
13231
13280
|
this.cartService.showPrice$.subscribe(function (showPrice) {
|
|
13232
|
-
_this.
|
|
13233
|
-
});
|
|
13234
|
-
this.cartService.creditAmount$.subscribe(function (creditAmount) {
|
|
13235
|
-
_this.creditAmountConfigured = creditAmount !== null;
|
|
13281
|
+
_this.creditAccountShowPrices = showPrice;
|
|
13236
13282
|
});
|
|
13237
13283
|
this.ecOnInit();
|
|
13238
13284
|
};
|
|
@@ -13255,7 +13301,7 @@ var OrderEcComponent = /** @class */ (function (_super) {
|
|
|
13255
13301
|
OrderEcComponent = __decorate$1l([
|
|
13256
13302
|
Component({
|
|
13257
13303
|
selector: 'app-order-ec',
|
|
13258
|
-
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>",
|
|
13304
|
+
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>",
|
|
13259
13305
|
styles: [".maxwidth{max-width:100px}"]
|
|
13260
13306
|
})
|
|
13261
13307
|
], OrderEcComponent);
|
|
@@ -14277,25 +14323,25 @@ var DetailCheckoutBlockEcComponent = /** @class */ (function (_super) {
|
|
|
14277
14323
|
_this.data = null;
|
|
14278
14324
|
_this.discountTotal = 0;
|
|
14279
14325
|
_this.couponTotal = 0;
|
|
14280
|
-
_this.
|
|
14281
|
-
_this.creditAmountConfigured = false;
|
|
14326
|
+
_this.creditAccountShowPrices = null;
|
|
14282
14327
|
_this.hideDiscounts = false;
|
|
14283
14328
|
_this.hideTaxes = false;
|
|
14329
|
+
_this.showPriceWithoutTaxes = true;
|
|
14284
14330
|
_this.getIcon = function (data_item) {
|
|
14285
14331
|
switch (data_item.type) {
|
|
14286
|
-
case 'coupon': return 'fas fa-ticket-alt fa-
|
|
14287
|
-
case 'discount': return 'fas fa-tags fa-
|
|
14288
|
-
case 'shipment': return 'fas fa-shipping-fast fa-
|
|
14289
|
-
case 'subtotal': return 'fas fa-boxes fa-
|
|
14290
|
-
case 'taxes': return 'fas fa-file-invoice-dollar fa-
|
|
14291
|
-
case 'total': return 'fas fa-shopping-basket fa-
|
|
14292
|
-
default: return 'fas fa-tags fa-
|
|
14332
|
+
case 'coupon': return 'fas fa-ticket-alt fa-2x';
|
|
14333
|
+
case 'discount': return 'fas fa-tags fa-2x';
|
|
14334
|
+
case 'shipment': return 'fas fa-shipping-fast fa-2x';
|
|
14335
|
+
case 'subtotal': return 'fas fa-boxes fa-2x';
|
|
14336
|
+
case 'taxes': return 'fas fa-file-invoice-dollar fa-2x';
|
|
14337
|
+
case 'total': return 'fas fa-shopping-basket fa-2x';
|
|
14338
|
+
default: return 'fas fa-tags fa-2x';
|
|
14293
14339
|
}
|
|
14294
14340
|
};
|
|
14295
14341
|
_this.getIcon2 = function (data_type) {
|
|
14296
14342
|
switch (data_type) {
|
|
14297
|
-
case 'coupon': return 'fas fa-ticket-alt fa-
|
|
14298
|
-
case 'discount': return 'fas fa-tags fa-
|
|
14343
|
+
case 'coupon': return 'fas fa-ticket-alt fa-2x';
|
|
14344
|
+
case 'discount': return 'fas fa-tags fa-2x';
|
|
14299
14345
|
}
|
|
14300
14346
|
};
|
|
14301
14347
|
_this.ecOnConstruct();
|
|
@@ -14308,15 +14354,13 @@ var DetailCheckoutBlockEcComponent = /** @class */ (function (_super) {
|
|
|
14308
14354
|
this.calcularTotales();
|
|
14309
14355
|
this.ecOnInit();
|
|
14310
14356
|
this.cartService.showPrice$.subscribe(function (showPrice) {
|
|
14311
|
-
_this.
|
|
14312
|
-
});
|
|
14313
|
-
this.cartService.creditAmount$.subscribe(function (creditAmount) {
|
|
14314
|
-
_this.creditAmountConfigured = creditAmount !== null;
|
|
14357
|
+
_this.creditAccountShowPrices = showPrice;
|
|
14315
14358
|
});
|
|
14316
14359
|
this.channelConfigService.channelConfig$.subscribe(function (channel) {
|
|
14317
|
-
var _a, _b, _c, _d;
|
|
14360
|
+
var _a, _b, _c, _d, _e, _f;
|
|
14318
14361
|
_this.hideDiscounts = (_b = (_a = channel) === null || _a === void 0 ? void 0 : _a.hideDiscounts, (_b !== null && _b !== void 0 ? _b : false));
|
|
14319
14362
|
_this.hideTaxes = (_d = (_c = channel) === null || _c === void 0 ? void 0 : _c.hideTaxes, (_d !== null && _d !== void 0 ? _d : false));
|
|
14363
|
+
_this.showPriceWithoutTaxes = (_f = (_e = channel) === null || _e === void 0 ? void 0 : _e.showPriceWithoutTaxes, (_f !== null && _f !== void 0 ? _f : false));
|
|
14320
14364
|
});
|
|
14321
14365
|
};
|
|
14322
14366
|
DetailCheckoutBlockEcComponent.prototype.calcularTotales = function () {
|
|
@@ -14329,6 +14373,12 @@ var DetailCheckoutBlockEcComponent = /** @class */ (function (_super) {
|
|
|
14329
14373
|
.reduce(function (acc, curr) { return acc + curr.amount; }, 0);
|
|
14330
14374
|
}
|
|
14331
14375
|
};
|
|
14376
|
+
DetailCheckoutBlockEcComponent.prototype.getTypeLabel = function (type) {
|
|
14377
|
+
if (type === 'taxes') {
|
|
14378
|
+
return this.showPriceWithoutTaxes ? 'taxes' : 'national-taxes';
|
|
14379
|
+
}
|
|
14380
|
+
return type;
|
|
14381
|
+
};
|
|
14332
14382
|
DetailCheckoutBlockEcComponent.ctorParameters = function () { return [
|
|
14333
14383
|
{ type: CheckoutService },
|
|
14334
14384
|
{ type: CartService },
|
|
@@ -14340,7 +14390,7 @@ var DetailCheckoutBlockEcComponent = /** @class */ (function (_super) {
|
|
|
14340
14390
|
DetailCheckoutBlockEcComponent = __decorate$1u([
|
|
14341
14391
|
Component({
|
|
14342
14392
|
selector: 'app-detail-checkout-block-ec',
|
|
14343
|
-
template: "<div id=\"appDetailCheckoutBlockEc\" class=\"d-flex flex-row w-100 justify-content-center flex-wrap\"\n *ngIf=\"data && (
|
|
14393
|
+
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>",
|
|
14344
14394
|
styles: [""]
|
|
14345
14395
|
})
|
|
14346
14396
|
], DetailCheckoutBlockEcComponent);
|
|
@@ -18674,7 +18724,7 @@ var SidebarEcComponent = /** @class */ (function () {
|
|
|
18674
18724
|
this.variantsToShow = ['TALLE', 'COLOR'];
|
|
18675
18725
|
this.hideDiscounts = false;
|
|
18676
18726
|
this.hideTaxes = false;
|
|
18677
|
-
this.creditAccountShowPrices =
|
|
18727
|
+
this.creditAccountShowPrices = null;
|
|
18678
18728
|
this.actualizarCantidad = function (item, cantidad, stock, id) {
|
|
18679
18729
|
if (id) {
|
|
18680
18730
|
var elem_1 = document.getElementById(id);
|