ng-easycommerce 0.0.608 → 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.
Files changed (52) hide show
  1. package/README.md +9 -0
  2. package/assets/ec-i18n/ct.json +4 -1
  3. package/assets/ec-i18n/en.json +2 -0
  4. package/assets/ec-i18n/es.json +2 -0
  5. package/assets/ec-i18n/fr.json +4 -1
  6. package/assets/ec-i18n/gl.json +4 -1
  7. package/assets/ec-i18n/pr.json +4 -1
  8. package/bundles/ng-easycommerce.umd.js +147 -79
  9. package/bundles/ng-easycommerce.umd.js.map +1 -1
  10. package/bundles/ng-easycommerce.umd.min.js +1 -1
  11. package/bundles/ng-easycommerce.umd.min.js.map +1 -1
  12. package/esm2015/lib/ec-component/account-ec/order-ec/order-ec.component.js +4 -8
  13. package/esm2015/lib/ec-component/account-ec/orders-list-ec/orders-list-ec.component.js +4 -8
  14. package/esm2015/lib/ec-component/cart-ec/cart-ec.component.js +5 -3
  15. package/esm2015/lib/ec-component/checkout-ec/detail-checkout-block-ec/detail-checkout-block-ec.component.js +22 -18
  16. package/esm2015/lib/ec-component/checkout-ec/payment-ec/payment-ec.component.js +21 -4
  17. package/esm2015/lib/ec-component/header-ec/header-ec.component.js +2 -1
  18. package/esm2015/lib/ec-component/product-detail-ec/product-detail-ec.component.js +2 -2
  19. package/esm2015/lib/ec-component/product-ec/product-ec.component.js +2 -2
  20. package/esm2015/lib/ec-component/sidebar-ec/sidebar-ec.component.js +5 -1
  21. package/esm2015/lib/ec-component/widgets-ec/price-ec/price-ec.component.js +51 -6
  22. package/esm2015/lib/services/cart.service.js +34 -33
  23. package/esm2015/lib/services/checkout/checkout.service.js +5 -5
  24. package/esm2015/lib/services/products/product-detail.service.js +5 -2
  25. package/esm5/lib/ec-component/account-ec/order-ec/order-ec.component.js +4 -8
  26. package/esm5/lib/ec-component/account-ec/orders-list-ec/orders-list-ec.component.js +4 -8
  27. package/esm5/lib/ec-component/cart-ec/cart-ec.component.js +5 -3
  28. package/esm5/lib/ec-component/checkout-ec/detail-checkout-block-ec/detail-checkout-block-ec.component.js +22 -18
  29. package/esm5/lib/ec-component/checkout-ec/payment-ec/payment-ec.component.js +21 -4
  30. package/esm5/lib/ec-component/header-ec/header-ec.component.js +2 -1
  31. package/esm5/lib/ec-component/product-detail-ec/product-detail-ec.component.js +2 -2
  32. package/esm5/lib/ec-component/product-ec/product-ec.component.js +2 -2
  33. package/esm5/lib/ec-component/sidebar-ec/sidebar-ec.component.js +5 -1
  34. package/esm5/lib/ec-component/widgets-ec/price-ec/price-ec.component.js +52 -6
  35. package/esm5/lib/services/cart.service.js +34 -33
  36. package/esm5/lib/services/checkout/checkout.service.js +5 -5
  37. package/esm5/lib/services/products/product-detail.service.js +5 -2
  38. package/fesm2015/ng-easycommerce.js +146 -79
  39. package/fesm2015/ng-easycommerce.js.map +1 -1
  40. package/fesm5/ng-easycommerce.js +147 -79
  41. package/fesm5/ng-easycommerce.js.map +1 -1
  42. package/lib/ec-component/account-ec/order-ec/order-ec.component.d.ts +1 -2
  43. package/lib/ec-component/account-ec/orders-list-ec/orders-list-ec.component.d.ts +1 -2
  44. package/lib/ec-component/cart-ec/cart-ec.component.d.ts +2 -1
  45. package/lib/ec-component/checkout-ec/detail-checkout-block-ec/detail-checkout-block-ec.component.d.ts +5 -4
  46. package/lib/ec-component/checkout-ec/payment-ec/payment-ec.component.d.ts +5 -1
  47. package/lib/ec-component/product-detail-ec/product-detail-ec.component.d.ts +1 -1
  48. package/lib/ec-component/product-ec/product-ec.component.d.ts +1 -1
  49. package/lib/ec-component/sidebar-ec/sidebar-ec.component.d.ts +1 -0
  50. package/lib/ec-component/widgets-ec/price-ec/price-ec.component.d.ts +23 -6
  51. package/ng-easycommerce.metadata.json +1 -1
  52. package/package.json +1 -1
@@ -3617,9 +3617,9 @@ var CheckoutService = /** @class */ (function () {
3617
3617
  });
3618
3618
  }); };
3619
3619
  this.updateAsociatedData = function (cart) {
3620
- var _a, _b, _c;
3620
+ var _a, _b;
3621
3621
  var result = _this.orderUtils.getPromotions(cart);
3622
- if (((_a = _this.authService.getUserProfileAsUser()) === null || _a === void 0 ? void 0 : _a.isWholesaler()) && cart.totals.taxes != 0) {
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 = (_b = result) === null || _b === void 0 ? void 0 : _b.find(function (promotion) { return promotion.type == "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 (((_c = result) === null || _c === void 0 ? void 0 : _c.length) && !result.find(function (item) { return item.type === "shipment"; })) {
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
- if (balance.applyMaxOrders && (balance.maxOrders <= 0 || balance.maxOrders === null)) {
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
- if (_this.balanceCustomerSubject.value.creditAmount === null) {
4909
+ var balance = _this.balanceCustomerSubject.value;
4910
+ if (!balance || balance.creditAmount === null || balance.creditAmount === undefined) {
4916
4911
  return true;
4917
4912
  }
4918
- if (_this.balanceCustomerSubject.value.remainingCredits === undefined) {
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 > _this.balanceCustomerSubject.value.remainingCredits) {
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
- if (_this.balanceCustomerSubject.value.creditAmount === null) {
4929
+ var balance = _this.balanceCustomerSubject.value;
4930
+ if (!balance || balance.creditAmount === null || balance.creditAmount === undefined) {
4935
4931
  return true;
4936
4932
  }
4937
- if (_this.balanceCustomerSubject.value.remainingCredits === undefined) {
4933
+ if (balance.remainingCredits === undefined) {
4938
4934
  return false;
4939
4935
  }
4940
- if (_this.cartSubject.value.totals.total > _this.balanceCustomerSubject.value.creditAmount) {
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, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
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: (_b = (_a = cartData) === null || _a === void 0 ? void 0 : _a.allowAnyPaymentMethod, (_b !== null && _b !== void 0 ? _b : false)),
5195
- allowExceedBalance: (_d = (_c = cartData) === null || _c === void 0 ? void 0 : _c.allowExceedBalance, (_d !== null && _d !== void 0 ? _d : false)),
5196
- creditAmount: (_f = (_e = cartData) === null || _e === void 0 ? void 0 : _e.creditAmount, (_f !== null && _f !== void 0 ? _f : null)),
5197
- showMax: (_h = (_g = cartData) === null || _g === void 0 ? void 0 : _g.showMax, (_h !== null && _h !== void 0 ? _h : false)),
5198
- showPrice: (_k = (_j = cartData) === null || _j === void 0 ? void 0 : _j.showPrice, (_k !== null && _k !== void 0 ? _k : false)),
5199
- remainingCredits: ((_l = cartData) === null || _l === void 0 ? void 0 : _l.creditAmount) && ((_m = cartData) === null || _m === void 0 ? void 0 : _m.creditAmount) >= ((_o = cartData) === null || _o === void 0 ? void 0 : _o.totals.total)
5200
- ? ((_p = cartData) === null || _p === void 0 ? void 0 : _p.creditAmount) - ((_q = cartData) === null || _q === void 0 ? void 0 : _q.totals.total)
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: (_s = (_r = cartData) === null || _r === void 0 ? void 0 : _r.applyMaxOrders, (_s !== null && _s !== void 0 ? _s : false)),
5203
- maxOrders: (_u = (_t = cartData) === null || _t === void 0 ? void 0 : _t.maxOrders, (_u !== null && _u !== void 0 ? _u : Infinity))
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 = false;
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
  }
@@ -8655,12 +8658,13 @@ var __values$1 = (this && this.__values) || function(o) {
8655
8658
  };
8656
8659
  var PaymentEcComponent = /** @class */ (function (_super) {
8657
8660
  __extends$k(PaymentEcComponent, _super);
8658
- function PaymentEcComponent(renderer, toastr, paymentService, checkoutService) {
8661
+ function PaymentEcComponent(renderer, toastr, paymentService, checkoutService, cartService) {
8659
8662
  var _this = _super.call(this) || this;
8660
8663
  _this.renderer = renderer;
8661
8664
  _this.toastr = toastr;
8662
8665
  _this.paymentService = paymentService;
8663
8666
  _this.checkoutService = checkoutService;
8667
+ _this.cartService = cartService;
8664
8668
  _this.methodDataSubject = new BehaviorSubject(null);
8665
8669
  _this.loadingSubject = new BehaviorSubject(false);
8666
8670
  _this.loading_internal = false;
@@ -8668,6 +8672,7 @@ var PaymentEcComponent = /** @class */ (function (_super) {
8668
8672
  _this.loading_internal_mp = false;
8669
8673
  _this.method_data$ = _this.methodDataSubject.asObservable();
8670
8674
  _this.loading$ = _this.loadingSubject.asObservable();
8675
+ _this.allowAnyPaymentMethod = null;
8671
8676
  _this.allData = function () { return (__assign$k(__assign$k({}, _this.paymentService.getUserData().shippingAddress), _this.paymentService.getShipmentData())); };
8672
8677
  _this.setError = function (message) {
8673
8678
  _this.error = message;
@@ -8743,6 +8748,9 @@ var PaymentEcComponent = /** @class */ (function (_super) {
8743
8748
  var _this = this;
8744
8749
  this.paymentService.initialize(this.step_id);
8745
8750
  this.checkoutService.asociatedData$.subscribe(function (data) { return _this.total_amount = (data.find(function (item) { return item.type == 'total'; })).amount; });
8751
+ this.cartService.allowAnyPaymentMethod$.subscribe(function (value) {
8752
+ _this.allowAnyPaymentMethod = value;
8753
+ });
8746
8754
  this.ecOnInit();
8747
8755
  };
8748
8756
  PaymentEcComponent.prototype.setActive = function (e) {
@@ -8765,11 +8773,22 @@ var PaymentEcComponent = /** @class */ (function (_super) {
8765
8773
  }
8766
8774
  e.target.classList.add("active");
8767
8775
  };
8776
+ // si cuenta corriente tiene la configuración allowAnyPaymentMethod en false, no se debe permitir otros metodos de pago.
8777
+ PaymentEcComponent.prototype.shouldDisplayMethod = function (method) {
8778
+ if (!method)
8779
+ return false;
8780
+ if (this.allowAnyPaymentMethod === null)
8781
+ return true;
8782
+ if (this.allowAnyPaymentMethod)
8783
+ return true;
8784
+ return this.isBalanceInAccount(method.code);
8785
+ };
8768
8786
  PaymentEcComponent.ctorParameters = function () { return [
8769
8787
  { type: Renderer2 },
8770
8788
  { type: ToastService },
8771
8789
  { type: PaymentService },
8772
- { type: CheckoutService }
8790
+ { type: CheckoutService },
8791
+ { type: CartService }
8773
8792
  ]; };
8774
8793
  __decorate$S([
8775
8794
  Input()
@@ -8780,7 +8799,7 @@ var PaymentEcComponent = /** @class */ (function (_super) {
8780
8799
  PaymentEcComponent = __decorate$S([
8781
8800
  Component({
8782
8801
  selector: 'app-payment-ec',
8783
- template: "<div class=\"container-fluid\" *ngIf=\"(paymentService.methods$ | async) as methods\">\n\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"card \">\n <div class=\"card-header text-dark text-center\">\n <h4>{{ 'select-method' | translate }}</h4>\n <div class=\"btn-toolbar justify-content-center\" role=\"toolbar\" aria-label=\"Envios toolbar\">\n <div class=\"\" role=\"group\" aria-label=\"Grupo botones envio\">\n <div class=\"d-flex align-content-start justify-content-center flex-wrap\">\n <button type=\"button\" class=\"btn btn-outline-secondary mx-1 mb-1\"\n *ngFor=\"let method of methods; let x = index\"\n (click)=\"setMethod(method) ; setActive($event)\">\n {{ method.name | translate }}\n </button>\n </div>\n </div>\n </div>\n </div>\n <div class=\"card-body text-center\">\n <div class=\"row justify-content-center\" *ngIf=\"(method_data$ | async) as method\">\n <ng-container *ngIf=\"!loading_internal ; else loading\">\n <div class=\"method-container text-dark\" *ngIf=\"isMP(method.code)\">\n <p id=\"faqs\" class=\"qt px-5 \">{{ method.description }}</p>\n <p class=\"px-5\">{{ method.instructions }}</p>\n <app-mp-redirect-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n [paymentServiceInst]=\"paymentService\" [allData]=\"allData()\"></app-mp-redirect-ec>\n </div>\n <div class=\"method-container text-dark text-left\" *ngIf=\"isMPTarjetaDeCredito(method.code)\">\n <div class=\"row\">\n <div class=\"col-12\">\n <p id=\"faqs\" class=\"qt px-5 \">{{ method.description }}</p>\n <p class=\"px-5\">{{ method.instructions }}</p>\n <div app-mp-credit-ec (ready)=\"verifyValidate()\" [public_key]=\"getPK(method)\"\n [user_data]=\"allData()\" [total_amount]=\"total_amount\">\n </div>\n </div>\n </div>\n </div>\n <div class=\"method-container text-dark text-start\" *ngIf=\"isRedirectRedsys(method.code)\">\n <div class=\"row\">\n <div class=\"col-12\">\n <ng-container\n *ngIf=\"!method.code.includes('bizum') && !method.code.includes('_out_')\">\n <app-redsys-redirect-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n [user_data]=\"allData()\">\n </app-redsys-redirect-ec>\n </ng-container>\n <ng-container\n *ngIf=\"method.code.includes('bizum') || method.code.includes('_out_')\">\n <app-redsys-redirect-out-ec (ready)=\"verifyValidate($event)\"\n [method]=\"method\" [user_data]=\"allData()\">\n </app-redsys-redirect-out-ec>\n </ng-container>\n </div>\n </div>\n </div>\n <div class=\"method-container text-dark text-start\" *ngIf=\"isRedirectCecaBank(method.code)\">\n <div class=\"row\">\n <div class=\"col-12\">\n <app-ceca-redirect-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n [user_data]=\"allData()\">\n </app-ceca-redirect-ec>\n </div>\n </div>\n </div>\n <div class=\"method-container text-dark text-start\" *ngIf=\"isPeyPalExpress(method.code)\">\n <div class=\"container\">\n <div class=\"row justify-content-center\">\n <div class=\"col-12\">\n <app-paypal-express-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n [user_data]=\"allData()\" [total_amount]=\"total_amount\">\n </app-paypal-express-ec>\n </div>\n </div>\n </div>\n </div>\n <div class=\"method-container text-dark text-start\" *ngIf=\"isMobbex(method.code)\">\n <div class=\"container\">\n <div class=\"row justify-content-center\">\n <div class=\"col-12\">\n <app-mobbex-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n [user_data]=\"allData()\" [paymentServiceInst]=\"paymentService\"\n [total_amount]=\"total_amount\">\n </app-mobbex-ec>\n </div>\n </div>\n </div>\n </div>\n <div class=\"method-container text-dark text-start\" *ngIf=\"isBancard(method.code)\">\n <div class=\"container\">\n <div class=\"row justify-content-center\">\n <div class=\"col-12\">\n <app-bancard-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n [user_data]=\"allData()\" [paymentServiceInst]=\"paymentService\"\n [total_amount]=\"total_amount\">\n </app-bancard-ec>\n </div>\n </div>\n </div>\n </div>\n <div class=\"method-container text-dark text-start\" *ngIf=\"isDecidir(method.code)\">\n <div class=\"container\">\n <div class=\"row justify-content-center\">\n <div class=\"col-12\">\n <app-decidir-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n [user_data]=\"allData()\" [paymentServiceInst]=\"paymentService\"\n [total_amount]=\"total_amount\">\n </app-decidir-ec>\n </div>\n </div>\n </div>\n </div>\n <div class=\"method-container text-dark\" *ngIf=\"isMethodOffline(method.code)\">\n <p id=\"faqs\" class=\"qt px-5\">{{ method.description }}</p>\n <p class=\"px-5\">{{ method.instructions }}</p>\n <div class=\"end-button\">\n <button class=\"btn comprar\" (click)=\"setLoading() && verifyValidate()\">{{\n ('pay-with-offline'| translate) }}</button>\n </div>\n <ng-container *ngIf=\"(loading$ | async) as load\">\n <div class=\"mt-2\" *ngIf=\"load\">\n <app-loading-inline-ec></app-loading-inline-ec>\n </div>\n </ng-container>\n </div>\n <div class=\"method-container text-dark text-start\" *ngIf=\"isCulqi(method.code)\">\n <div class=\"container\">\n <div class=\"row justify-content-center\">\n <div class=\"col-12\">\n <!-- <app-mobbex-ec (ready)=\"verifyValidate($event)\" [method]=\"method\" [user_data]=\"allData()\" [paymentServiceInst]=\"paymentService\"\n [total_amount]=\"total_amount\">\n </app-mobbex-ec> -->\n <app-culqi-ec [apiKey]=\"getPKCulqi(method)\" [method]=\"method\"\n [amount]=\"total_amount\" [customStyle]=\"true\"\n (ready)=\"verifyValidate()\"></app-culqi-ec>\n </div>\n </div>\n </div>\n </div>\n <div class=\"method-container text-dark text-start\" *ngIf=\"isCatastro(method.code)\">\n <div class=\"container\">\n <div class=\"row justify-content-center\">\n <div class=\"col-12\">\n <app-bancard-catastro-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n [user_data]=\"allData()\" [paymentServiceInst]=\"paymentService\"\n [total_amount]=\"total_amount\"></app-bancard-catastro-ec>\n </div>\n </div>\n </div>\n </div>\n <div class=\"method-container text-dark text-start\" *ngIf=\"isBamboo(method.code)\">\n <div class=\"container\">\n <div class=\"row justify-content-center\">\n <div class=\"col-12\">\n <app-bamboo-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n [user_data]=\"allData()\" [paymentServiceInst]=\"paymentService\"\n [total_amount]=\"total_amount\"></app-bamboo-ec>\n </div>\n </div>\n </div>\n </div>\n <div class=\"method-container text-dark\" *ngIf=\"isBankTransfer(method.code)\">\n <div class=\"row px-0 description-cont\">\n <ng-container *ngFor=\"let line of method.description.split('\\r\\n'); let i=index\">\n <p [id]=\"'faqs-'+i\" [class]=\"'qt px-5 m-0 line-'+i\">{{ line }}</p>\n </ng-container>\n </div>\n <hr *ngIf=\"method.instructions\">\n <div *ngIf=\"method.instructions\" class=\"row px-0 instructions-cont mb-1\">\n <h5 class=\"instructions-title\">{{ ('instructions' | translate) }}</h5>\n <ng-container *ngFor=\"let line of method.instructions.split('\\r\\n'); let i=index\">\n <p [class]=\"'px-5 m-0 instructions-text line-'+i \">{{ line }}</p>\n </ng-container>\n </div>\n\n <div class=\"end-button\">\n <button class=\"btn comprar\" (click)=\"setLoading() && verifyValidate()\">{{\n ('pay-with-transfer'\n | translate) }}</button>\n </div>\n <ng-container *ngIf=\"(loading$ | async) as load\">\n <div class=\"mt-2\" *ngIf=\"load\">\n <app-loading-inline-ec></app-loading-inline-ec>\n </div>\n </ng-container>\n </div>\n <div class=\"method-container text-dark\" *ngIf=\"isPlaceToPay(method.code)\">\n <p id=\"faqs\" class=\"qt px-5 \">{{ method.description }}</p>\n <p class=\"px-5\">{{ method.instructions }}</p>\n <app-place-to-pay-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n [paymentServiceInst]=\"paymentService\" [allData]=\"allData()\">\n </app-place-to-pay-ec>\n </div>\n <div class=\"method-container text-dark\" *ngIf=\"isBalanceInAccount(method.code)\">\n <div class=\"row px-0 description-cont\" *ngIf=\"method.description\">\n <ng-container *ngFor=\"let line of method.description.split('\\r\\n'); let i = index\">\n <p [id]=\"'cc-desc-'+i\" [class]=\"'qt px-5 m-0 line-'+i\">{{ line }}</p>\n </ng-container>\n </div>\n\n <hr *ngIf=\"method.instructions\">\n\n <div *ngIf=\"method.instructions\" class=\"row px-0 instructions-cont mb-1\">\n <h5 class=\"instructions-title\">{{ ('instructions' | translate) }}</h5>\n <ng-container *ngFor=\"let line of method.instructions.split('\\r\\n'); let i = index\">\n <p [class]=\"'px-5 m-0 instructions-text line-'+i \">{{ line }}</p>\n </ng-container>\n </div>\n\n <div class=\"end-button\">\n <button class=\"btn comprar\" (click)=\"setLoading() && verifyValidate()\">\n {{ 'pay-with' | translate }} {{ method.name }}\n </button>\n </div>\n <ng-container *ngIf=\"(loading$ | async) as load\">\n <div class=\"mt-2\" *ngIf=\"load\">\n <app-loading-inline-ec></app-loading-inline-ec>\n </div>\n </ng-container>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n\n<ng-template #mercadoPago>\n <div class=\"row \">\n <div class=\"col-12 text-center\">\n <app-loading-inline-ec *ngIf=\"loading_internal_mp\"></app-loading-inline-ec>\n <form action=\"javascript:void(0)\" #formContainer></form>\n </div>\n </div>\n</ng-template>\n\n<ng-template #loading>\n <app-loading-inline-ec></app-loading-inline-ec>\n</ng-template>",
8802
+ template: "<div class=\"container-fluid\" *ngIf=\"(paymentService.methods$ | async) as methods\">\n\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"card \">\n <div class=\"card-header text-dark text-center\">\n <h4>{{ 'select-method' | translate }}</h4>\n <div class=\"btn-toolbar justify-content-center\" role=\"toolbar\" aria-label=\"Envios toolbar\">\n <div class=\"\" role=\"group\" aria-label=\"Grupo botones envio\">\n <div class=\"d-flex align-content-start justify-content-center flex-wrap\">\n <button type=\"button\" class=\"btn btn-outline-secondary mx-1 mb-1\"\n *ngFor=\"let method of methods; let x = index\"\n (click)=\"setMethod(method) ; setActive($event)\">\n {{ method.name | translate }}\n </button>\n </div>\n </div>\n </div>\n </div>\n <div class=\"card-body text-center\">\n <div class=\"row justify-content-center\" *ngIf=\"(method_data$ | async) as method\">\n <ng-container *ngIf=\"!loading_internal ; else loading\">\n <!-- cuenta corriente tiene una configuari\u00F3n de permitir o no otros metodos de pago -->\n <ng-container *ngIf=\"method && shouldDisplayMethod(method)\">\n <div class=\"method-container text-dark\" *ngIf=\"isMP(method.code)\">\n <p id=\"faqs\" class=\"qt px-5 \">{{ method.description }}</p>\n <p class=\"px-5\">{{ method.instructions }}</p>\n <app-mp-redirect-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n [paymentServiceInst]=\"paymentService\" [allData]=\"allData()\"></app-mp-redirect-ec>\n </div>\n <div class=\"method-container text-dark text-left\" *ngIf=\"isMPTarjetaDeCredito(method.code)\">\n <div class=\"row\">\n <div class=\"col-12\">\n <p id=\"faqs\" class=\"qt px-5 \">{{ method.description }}</p>\n <p class=\"px-5\">{{ method.instructions }}</p>\n <div app-mp-credit-ec (ready)=\"verifyValidate()\" [public_key]=\"getPK(method)\"\n [user_data]=\"allData()\" [total_amount]=\"total_amount\">\n </div>\n </div>\n </div>\n </div>\n <div class=\"method-container text-dark text-start\" *ngIf=\"isRedirectRedsys(method.code)\">\n <div class=\"row\">\n <div class=\"col-12\">\n <ng-container\n *ngIf=\"!method.code.includes('bizum') && !method.code.includes('_out_')\">\n <app-redsys-redirect-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n [user_data]=\"allData()\">\n </app-redsys-redirect-ec>\n </ng-container>\n <ng-container\n *ngIf=\"method.code.includes('bizum') || method.code.includes('_out_')\">\n <app-redsys-redirect-out-ec (ready)=\"verifyValidate($event)\"\n [method]=\"method\" [user_data]=\"allData()\">\n </app-redsys-redirect-out-ec>\n </ng-container>\n </div>\n </div>\n </div>\n <div class=\"method-container text-dark text-start\" *ngIf=\"isRedirectCecaBank(method.code)\">\n <div class=\"row\">\n <div class=\"col-12\">\n <app-ceca-redirect-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n [user_data]=\"allData()\">\n </app-ceca-redirect-ec>\n </div>\n </div>\n </div>\n <div class=\"method-container text-dark text-start\" *ngIf=\"isPeyPalExpress(method.code)\">\n <div class=\"container\">\n <div class=\"row justify-content-center\">\n <div class=\"col-12\">\n <app-paypal-express-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n [user_data]=\"allData()\" [total_amount]=\"total_amount\">\n </app-paypal-express-ec>\n </div>\n </div>\n </div>\n </div>\n <div class=\"method-container text-dark text-start\" *ngIf=\"isMobbex(method.code)\">\n <div class=\"container\">\n <div class=\"row justify-content-center\">\n <div class=\"col-12\">\n <app-mobbex-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n [user_data]=\"allData()\" [paymentServiceInst]=\"paymentService\"\n [total_amount]=\"total_amount\">\n </app-mobbex-ec>\n </div>\n </div>\n </div>\n </div>\n <div class=\"method-container text-dark text-start\" *ngIf=\"isBancard(method.code)\">\n <div class=\"container\">\n <div class=\"row justify-content-center\">\n <div class=\"col-12\">\n <app-bancard-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n [user_data]=\"allData()\" [paymentServiceInst]=\"paymentService\"\n [total_amount]=\"total_amount\">\n </app-bancard-ec>\n </div>\n </div>\n </div>\n </div>\n <div class=\"method-container text-dark text-start\" *ngIf=\"isDecidir(method.code)\">\n <div class=\"container\">\n <div class=\"row justify-content-center\">\n <div class=\"col-12\">\n <app-decidir-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n [user_data]=\"allData()\" [paymentServiceInst]=\"paymentService\"\n [total_amount]=\"total_amount\">\n </app-decidir-ec>\n </div>\n </div>\n </div>\n </div>\n <div class=\"method-container text-dark\" *ngIf=\"isMethodOffline(method.code)\">\n <p id=\"faqs\" class=\"qt px-5\">{{ method.description }}</p>\n <p class=\"px-5\">{{ method.instructions }}</p>\n <div class=\"end-button\">\n <button class=\"btn comprar\" (click)=\"setLoading() && verifyValidate()\">{{\n ('pay-with-offline'| translate) }}</button>\n </div>\n <ng-container *ngIf=\"(loading$ | async) as load\">\n <div class=\"mt-2\" *ngIf=\"load\">\n <app-loading-inline-ec></app-loading-inline-ec>\n </div>\n </ng-container>\n </div>\n <div class=\"method-container text-dark text-start\" *ngIf=\"isCulqi(method.code)\">\n <div class=\"container\">\n <div class=\"row justify-content-center\">\n <div class=\"col-12\">\n <!-- <app-mobbex-ec (ready)=\"verifyValidate($event)\" [method]=\"method\" [user_data]=\"allData()\" [paymentServiceInst]=\"paymentService\"\n [total_amount]=\"total_amount\">\n </app-mobbex-ec> -->\n <app-culqi-ec [apiKey]=\"getPKCulqi(method)\" [method]=\"method\"\n [amount]=\"total_amount\" [customStyle]=\"true\"\n (ready)=\"verifyValidate()\"></app-culqi-ec>\n </div>\n </div>\n </div>\n </div>\n <div class=\"method-container text-dark text-start\" *ngIf=\"isCatastro(method.code)\">\n <div class=\"container\">\n <div class=\"row justify-content-center\">\n <div class=\"col-12\">\n <app-bancard-catastro-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n [user_data]=\"allData()\" [paymentServiceInst]=\"paymentService\"\n [total_amount]=\"total_amount\"></app-bancard-catastro-ec>\n </div>\n </div>\n </div>\n </div>\n <div class=\"method-container text-dark text-start\" *ngIf=\"isBamboo(method.code)\">\n <div class=\"container\">\n <div class=\"row justify-content-center\">\n <div class=\"col-12\">\n <app-bamboo-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n [user_data]=\"allData()\" [paymentServiceInst]=\"paymentService\"\n [total_amount]=\"total_amount\"></app-bamboo-ec>\n </div>\n </div>\n </div>\n </div>\n <div class=\"method-container text-dark\" *ngIf=\"isBankTransfer(method.code)\">\n <div class=\"row px-0 description-cont\">\n <ng-container *ngFor=\"let line of method.description.split('\\r\\n'); let i=index\">\n <p [id]=\"'faqs-'+i\" [class]=\"'qt px-5 m-0 line-'+i\">{{ line }}</p>\n </ng-container>\n </div>\n <hr *ngIf=\"method.instructions\">\n <div *ngIf=\"method.instructions\" class=\"row px-0 instructions-cont mb-1\">\n <h5 class=\"instructions-title\">{{ ('instructions' | translate) }}</h5>\n <ng-container *ngFor=\"let line of method.instructions.split('\\r\\n'); let i=index\">\n <p [class]=\"'px-5 m-0 instructions-text line-'+i \">{{ line }}</p>\n </ng-container>\n </div>\n \n <div class=\"end-button\">\n <button class=\"btn comprar\" (click)=\"setLoading() && verifyValidate()\">{{\n ('pay-with-transfer'\n | translate) }}</button>\n </div>\n <ng-container *ngIf=\"(loading$ | async) as load\">\n <div class=\"mt-2\" *ngIf=\"load\">\n <app-loading-inline-ec></app-loading-inline-ec>\n </div>\n </ng-container>\n </div>\n <div class=\"method-container text-dark\" *ngIf=\"isPlaceToPay(method.code)\">\n <p id=\"faqs\" class=\"qt px-5 \">{{ method.description }}</p>\n <p class=\"px-5\">{{ method.instructions }}</p>\n <app-place-to-pay-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n [paymentServiceInst]=\"paymentService\" [allData]=\"allData()\">\n </app-place-to-pay-ec>\n </div>\n </ng-container>\n <div class=\"method-container text-dark\" *ngIf=\"isBalanceInAccount(method.code)\">\n <div class=\"row px-0 description-cont\" *ngIf=\"method.description\">\n <ng-container *ngFor=\"let line of method.description.split('\\r\\n'); let i = index\">\n <p [id]=\"'cc-desc-'+i\" [class]=\"'qt px-5 m-0 line-'+i\">{{ line }}</p>\n </ng-container>\n </div>\n\n <hr *ngIf=\"method.instructions\">\n\n <div *ngIf=\"method.instructions\" class=\"row px-0 instructions-cont mb-1\">\n <h5 class=\"instructions-title\">{{ ('instructions' | translate) }}</h5>\n <ng-container *ngFor=\"let line of method.instructions.split('\\r\\n'); let i = index\">\n <p [class]=\"'px-5 m-0 instructions-text line-'+i \">{{ line }}</p>\n </ng-container>\n </div>\n\n <div class=\"end-button\">\n <button class=\"btn comprar\" (click)=\"setLoading() && verifyValidate()\">\n {{ 'pay-with' | translate }} {{ method.name }}\n </button>\n </div>\n <ng-container *ngIf=\"(loading$ | async) as load\">\n <div class=\"mt-2\" *ngIf=\"load\">\n <app-loading-inline-ec></app-loading-inline-ec>\n </div>\n </ng-container>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n\n<ng-template #mercadoPago>\n <div class=\"row \">\n <div class=\"col-12 text-center\">\n <app-loading-inline-ec *ngIf=\"loading_internal_mp\"></app-loading-inline-ec>\n <form action=\"javascript:void(0)\" #formContainer></form>\n </div>\n </div>\n</ng-template>\n\n<ng-template #loading>\n <app-loading-inline-ec></app-loading-inline-ec>\n</ng-template>",
8784
8803
  providers: [PaymentService],
8785
8804
  styles: ["div.col-12 form{text-align:center}.option-container>div{margin-bottom:15px}@media only screen and (min-width:600px){.option-container{display:flex;justify-content:space-between;margin-top:20px}}.method-container{width:100%}.active{background-color:#000!important;color:#fff!important}.comprar{background:#000;color:#fff;display:inline-block;font-size:18px;font-weight:600;padding:10px 25px;text-decoration:none;text-transform:uppercase}"]
8786
8805
  })
@@ -9842,6 +9861,7 @@ var HeaderEcComponent = /** @class */ (function (_super) {
9842
9861
  _this.envetUrlTransparent = ["/home", "/"];
9843
9862
  _this.params = {};
9844
9863
  _this.toggled = false;
9864
+ _this.balanceAttributes = null;
9845
9865
  _this.locales = [];
9846
9866
  _this.selectedLocale = 'ESP';
9847
9867
  _this.hidePrices = false;
@@ -10583,7 +10603,7 @@ var ProductDetailService = /** @class */ (function () {
10583
10603
  options && options.forEach(function (option) { return Object.keys(option).forEach(function (key) { return _this.setOption(key, option[key]); }); });
10584
10604
  };
10585
10605
  this.generateAsociatedDataFromVariants = function () {
10586
- 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;
10587
10607
  var asociated = {};
10588
10608
  if (_this.isReady()) {
10589
10609
  asociated.stock = _this.variants[0].stock;
@@ -10616,6 +10636,9 @@ var ProductDetailService = /** @class */ (function () {
10616
10636
  taxIncluded: (_r = _this.variants[0]) === null || _r === void 0 ? void 0 : _r.taxIncluded,
10617
10637
  taxCategory: (_s = _this.variants[0]) === null || _s === void 0 ? void 0 : _s.taxCategory,
10618
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;
10619
10642
  _this.asociatedDataSubject.next(asociated);
10620
10643
  };
10621
10644
  /**
@@ -10903,7 +10926,7 @@ var ProductDetailEcComponent = /** @class */ (function (_super) {
10903
10926
  _this.owlOptions = {};
10904
10927
  _this.showReviews = false;
10905
10928
  _this.hidePrices = false;
10906
- _this.creditAccountShowPrices = false;
10929
+ _this.creditAccountShowPrices = null;
10907
10930
  _this.addToCart = function () {
10908
10931
  _this.quantity > 0 && _this.productService.addToCart(_this.quantity);
10909
10932
  };
@@ -11069,7 +11092,7 @@ var ProductEcComponent = /** @class */ (function (_super) {
11069
11092
  _this.stock = 0;
11070
11093
  _this.data = null;
11071
11094
  _this.hidePrices = false;
11072
- _this.creditAccountShowPrices = false;
11095
+ _this.creditAccountShowPrices = null;
11073
11096
  /**
11074
11097
  * @description variable utilizada mutar de la vista de lista, a la de box.
11075
11098
  */
@@ -12306,18 +12329,30 @@ var __decorate$1f = (this && this.__decorate) || function (decorators, target, k
12306
12329
  };
12307
12330
  var PriceEcComponent = /** @class */ (function (_super) {
12308
12331
  __extends$G(PriceEcComponent, _super);
12309
- function PriceEcComponent(productsService) {
12332
+ function PriceEcComponent(productsService, channelConfigService) {
12310
12333
  var _this = _super.call(this) || this;
12311
12334
  _this.productsService = productsService;
12335
+ _this.channelConfigService = channelConfigService;
12312
12336
  _this.priceSize = true;
12337
+ _this.taxeAmount = 0;
12338
+ _this.taxes = [];
12339
+ _this.showTaxLegendOnly = false;
12340
+ _this.disableTaxInfo = false;
12341
+ _this.showPriceWithoutTaxes = true;
12313
12342
  _this.ecOnConstruct();
12314
12343
  return _this;
12315
12344
  }
12316
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
+ });
12317
12351
  this.ecOnInit();
12318
12352
  };
12319
12353
  PriceEcComponent.ctorParameters = function () { return [
12320
- { type: ProductsService }
12354
+ { type: ProductsService },
12355
+ { type: ChannelConfigService }
12321
12356
  ]; };
12322
12357
  __decorate$1f([
12323
12358
  Input()
@@ -12331,11 +12366,44 @@ var PriceEcComponent = /** @class */ (function (_super) {
12331
12366
  __decorate$1f([
12332
12367
  Input()
12333
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);
12334
12402
  PriceEcComponent = __decorate$1f([
12335
12403
  Component({
12336
12404
  selector: 'app-price-ec',
12337
- template: "<div *ngIf=\"saleprice; else onlyprice\" class=\"line-height-custom\">\n <div [class]=\"(priceSize ? 'price-sm':'price')\" *ngIf=\"price && price.split(' - ').length > 1; else simplePriceDel\">\n <del class=\"tachado\">\n {{ price.split(' - ')[0] | currency:productsService?.currency:'symbol' }}\n {{ price.split(' - ')[1] | currency:productsService?.currency:'symbol' }}\n </del>\n </div>\n <div [class]=\"(priceSize ? 'price-sm':'price')\" *ngIf=\"saleprice && saleprice.split(' - ').length > 1; else simpleSalePrice\">\n {{ saleprice.split(' - ')[0] | currency:productsService?.currency:'symbol' }}\n {{ saleprice.split(' - ')[1] | currency:productsService?.currency:'symbol' }}\n </div>\n</div>\n\n<ng-template #onlyprice>\n <div [class]=\"(priceSize ? 'price-sm':'price')\" *ngIf=\"price && price.split(' - ').length > 1; else simplePrice\">\n {{ price.split(' - ')[0] | currency:productsService?.currency:'symbol' }} - \n {{ price.split(' - ')[1] | currency:productsService?.currency:'symbol' }}\n </div>\n</ng-template>\n\n<ng-template #simplePrice>\n <div [class]=\"'uno line-height-custom ' + (priceSize ? 'price-sm':'price')\" >{{ price | currency:productsService?.currency:'symbol' }} </div>\n</ng-template>\n\n<ng-template #simplePriceDel>\n <div [class]=\"'dos line-height-custom ' + (priceSize ? 'price-sm':'price')\" ><span class=\"lnth\">{{ price | currency:productsService?.currency:'symbol' }}</span></div>\n</ng-template>\n\n<ng-template #simpleSalePrice>\n <div [class]=\"'tres line-height-custom ' + (priceSize ? 'price-sm':'price')\" >{{ saleprice | currency:productsService?.currency:'symbol' }} </div>\n</ng-template>",
12338
- 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}"]
12339
12407
  })
12340
12408
  ], PriceEcComponent);
12341
12409
  return PriceEcComponent;
@@ -12913,8 +12981,7 @@ var OrdersEcComponent = /** @class */ (function (_super) {
12913
12981
  _this.channelConfigService = channelConfigService;
12914
12982
  _this.loading = true;
12915
12983
  _this.showImage = true;
12916
- _this.showPrice = false;
12917
- _this.creditAmountConfigured = false;
12984
+ _this.creditAccountShowPrices = null;
12918
12985
  _this.hidePrices = false;
12919
12986
  /**
12920
12987
  * @description name -> nombre de clave de valuesToSort; asc -> true: ascendente, false: descendente
@@ -13055,10 +13122,7 @@ var OrdersEcComponent = /** @class */ (function (_super) {
13055
13122
  });
13056
13123
  this.ecOnInit();
13057
13124
  this.cartService.showPrice$.subscribe(function (showPrice) {
13058
- _this.showPrice = showPrice;
13059
- });
13060
- this.cartService.creditAmount$.subscribe(function (creditAmount) {
13061
- _this.creditAmountConfigured = creditAmount !== null;
13125
+ _this.creditAccountShowPrices = showPrice;
13062
13126
  });
13063
13127
  this.channelConfigService.channelConfig$.subscribe(function (channel) {
13064
13128
  var _a, _b;
@@ -13078,7 +13142,7 @@ var OrdersEcComponent = /** @class */ (function (_super) {
13078
13142
  OrdersEcComponent = __decorate$1k([
13079
13143
  Component({
13080
13144
  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=\"(creditAmountConfigured ? 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>",
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>",
13082
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}"]
13083
13147
  })
13084
13148
  ], OrdersEcComponent);
@@ -13156,8 +13220,7 @@ var OrderEcComponent = /** @class */ (function (_super) {
13156
13220
  _this.loading = true;
13157
13221
  _this.numberOrder = null;
13158
13222
  _this.allowRepeatOrders = false;
13159
- _this.showPrice = false;
13160
- _this.creditAmountConfigured = false;
13223
+ _this.creditAccountShowPrices = null;
13161
13224
  _this.hidePrices = false;
13162
13225
  _this.hideDiscounts = false;
13163
13226
  _this.hideTaxes = false;
@@ -13215,10 +13278,7 @@ var OrderEcComponent = /** @class */ (function (_super) {
13215
13278
  _this.hideTaxes = (_f = (_e = config) === null || _e === void 0 ? void 0 : _e.hideTaxes, (_f !== null && _f !== void 0 ? _f : false));
13216
13279
  });
13217
13280
  this.cartService.showPrice$.subscribe(function (showPrice) {
13218
- _this.showPrice = showPrice;
13219
- });
13220
- this.cartService.creditAmount$.subscribe(function (creditAmount) {
13221
- _this.creditAmountConfigured = creditAmount !== null;
13281
+ _this.creditAccountShowPrices = showPrice;
13222
13282
  });
13223
13283
  this.ecOnInit();
13224
13284
  };
@@ -13241,7 +13301,7 @@ var OrderEcComponent = /** @class */ (function (_super) {
13241
13301
  OrderEcComponent = __decorate$1l([
13242
13302
  Component({
13243
13303
  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>",
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>",
13245
13305
  styles: [".maxwidth{max-width:100px}"]
13246
13306
  })
13247
13307
  ], OrderEcComponent);
@@ -14263,25 +14323,25 @@ var DetailCheckoutBlockEcComponent = /** @class */ (function (_super) {
14263
14323
  _this.data = null;
14264
14324
  _this.discountTotal = 0;
14265
14325
  _this.couponTotal = 0;
14266
- _this.showPrice = false;
14267
- _this.creditAmountConfigured = false;
14326
+ _this.creditAccountShowPrices = null;
14268
14327
  _this.hideDiscounts = false;
14269
14328
  _this.hideTaxes = false;
14329
+ _this.showPriceWithoutTaxes = true;
14270
14330
  _this.getIcon = function (data_item) {
14271
14331
  switch (data_item.type) {
14272
- case 'coupon': return 'fas fa-ticket-alt fa-3x';
14273
- case 'discount': return 'fas fa-tags fa-3x';
14274
- case 'shipment': return 'fas fa-shipping-fast fa-3x';
14275
- case 'subtotal': return 'fas fa-boxes fa-3x';
14276
- case 'taxes': return 'fas fa-file-invoice-dollar fa-3x';
14277
- case 'total': return 'fas fa-shopping-basket fa-3x';
14278
- default: return 'fas fa-tags fa-3x';
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';
14279
14339
  }
14280
14340
  };
14281
14341
  _this.getIcon2 = function (data_type) {
14282
14342
  switch (data_type) {
14283
- case 'coupon': return 'fas fa-ticket-alt fa-3x';
14284
- case 'discount': return 'fas fa-tags fa-3x';
14343
+ case 'coupon': return 'fas fa-ticket-alt fa-2x';
14344
+ case 'discount': return 'fas fa-tags fa-2x';
14285
14345
  }
14286
14346
  };
14287
14347
  _this.ecOnConstruct();
@@ -14294,15 +14354,13 @@ var DetailCheckoutBlockEcComponent = /** @class */ (function (_super) {
14294
14354
  this.calcularTotales();
14295
14355
  this.ecOnInit();
14296
14356
  this.cartService.showPrice$.subscribe(function (showPrice) {
14297
- _this.showPrice = showPrice;
14298
- });
14299
- this.cartService.creditAmount$.subscribe(function (creditAmount) {
14300
- _this.creditAmountConfigured = creditAmount !== null;
14357
+ _this.creditAccountShowPrices = showPrice;
14301
14358
  });
14302
14359
  this.channelConfigService.channelConfig$.subscribe(function (channel) {
14303
- var _a, _b, _c, _d;
14360
+ var _a, _b, _c, _d, _e, _f;
14304
14361
  _this.hideDiscounts = (_b = (_a = channel) === null || _a === void 0 ? void 0 : _a.hideDiscounts, (_b !== null && _b !== void 0 ? _b : false));
14305
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));
14306
14364
  });
14307
14365
  };
14308
14366
  DetailCheckoutBlockEcComponent.prototype.calcularTotales = function () {
@@ -14315,6 +14373,12 @@ var DetailCheckoutBlockEcComponent = /** @class */ (function (_super) {
14315
14373
  .reduce(function (acc, curr) { return acc + curr.amount; }, 0);
14316
14374
  }
14317
14375
  };
14376
+ DetailCheckoutBlockEcComponent.prototype.getTypeLabel = function (type) {
14377
+ if (type === 'taxes') {
14378
+ return this.showPriceWithoutTaxes ? 'taxes' : 'national-taxes';
14379
+ }
14380
+ return type;
14381
+ };
14318
14382
  DetailCheckoutBlockEcComponent.ctorParameters = function () { return [
14319
14383
  { type: CheckoutService },
14320
14384
  { type: CartService },
@@ -14326,7 +14390,7 @@ var DetailCheckoutBlockEcComponent = /** @class */ (function (_super) {
14326
14390
  DetailCheckoutBlockEcComponent = __decorate$1u([
14327
14391
  Component({
14328
14392
  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 && (creditAmountConfigured ? showPrice : 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\">{{ item.type | translate }}</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>",
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>",
14330
14394
  styles: [""]
14331
14395
  })
14332
14396
  ], DetailCheckoutBlockEcComponent);
@@ -18660,6 +18724,7 @@ var SidebarEcComponent = /** @class */ (function () {
18660
18724
  this.variantsToShow = ['TALLE', 'COLOR'];
18661
18725
  this.hideDiscounts = false;
18662
18726
  this.hideTaxes = false;
18727
+ this.creditAccountShowPrices = null;
18663
18728
  this.actualizarCantidad = function (item, cantidad, stock, id) {
18664
18729
  if (id) {
18665
18730
  var elem_1 = document.getElementById(id);
@@ -18728,6 +18793,9 @@ var SidebarEcComponent = /** @class */ (function () {
18728
18793
  _this.hideDiscounts = (_b = (_a = channel) === null || _a === void 0 ? void 0 : _a.hideDiscounts, (_b !== null && _b !== void 0 ? _b : false));
18729
18794
  _this.hideTaxes = (_d = (_c = channel) === null || _c === void 0 ? void 0 : _c.hideTaxes, (_d !== null && _d !== void 0 ? _d : false));
18730
18795
  });
18796
+ this.cartService.showPrice$.subscribe(function (showPrice) {
18797
+ _this.creditAccountShowPrices = showPrice;
18798
+ });
18731
18799
  };
18732
18800
  SidebarEcComponent.prototype.redirectDetailProduct = function (product) {
18733
18801
  var variant = product.variants[0];