ng-easycommerce-v18 0.4.0 → 0.4.1-beta.1

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 (43) hide show
  1. package/README.md +7 -0
  2. package/assets/ec-i18n/ct.json +4 -0
  3. package/assets/ec-i18n/en.json +12 -1
  4. package/assets/ec-i18n/es.json +12 -1
  5. package/assets/ec-i18n/fr.json +4 -0
  6. package/assets/ec-i18n/gl.json +4 -0
  7. package/assets/ec-i18n/pr.json +4 -0
  8. package/esm2022/lib/ec-components/account-ec/order-ec/order-ec.component.mjs +5 -9
  9. package/esm2022/lib/ec-components/account-ec/orders-list-ec/orders-list-ec.component.mjs +11 -5
  10. package/esm2022/lib/ec-components/cart-ec/cart-ec.component.mjs +12 -3
  11. package/esm2022/lib/ec-components/checkout-ec/checkout-ec.component.mjs +8 -1
  12. package/esm2022/lib/ec-components/checkout-ec/detail-checkout-block-ec/detail-checkout-block-ec.component.mjs +5 -3
  13. package/esm2022/lib/ec-components/checkout-ec/payment-ec/payment-ec.component.mjs +44 -4
  14. package/esm2022/lib/ec-components/checkout-ec/success-ec/success-ec.component.mjs +4 -3
  15. package/esm2022/lib/ec-components/credit-account-banner-ec/credit-account-banner-ec.component.mjs +79 -0
  16. package/esm2022/lib/ec-components/header-ec/header-ec.component.mjs +25 -11
  17. package/esm2022/lib/ec-components/index.mjs +2 -1
  18. package/esm2022/lib/ec-components/product-ec/product-ec.component.mjs +3 -3
  19. package/esm2022/lib/ec-components/sidebar-ec/sidebar-ec.component.mjs +5 -7
  20. package/esm2022/lib/ec-components/widgets-ec/price-ec/price-ec.component.mjs +5 -11
  21. package/esm2022/lib/ec-services/cart.service.mjs +42 -7
  22. package/esm2022/lib/ec-services/index.mjs +2 -1
  23. package/esm2022/lib/ec-services/price-visibility.service.mjs +40 -0
  24. package/esm2022/lib/ec-services/product-detail.service.mjs +45 -7
  25. package/fesm2022/ng-easycommerce-v18.mjs +295 -61
  26. package/fesm2022/ng-easycommerce-v18.mjs.map +1 -1
  27. package/lib/ec-components/account-ec/order-ec/order-ec.component.d.ts +2 -2
  28. package/lib/ec-components/account-ec/orders-list-ec/orders-list-ec.component.d.ts +3 -0
  29. package/lib/ec-components/cart-ec/cart-ec.component.d.ts +4 -2
  30. package/lib/ec-components/checkout-ec/checkout-ec.component.d.ts +2 -0
  31. package/lib/ec-components/checkout-ec/detail-checkout-block-ec/detail-checkout-block-ec.component.d.ts +2 -0
  32. package/lib/ec-components/checkout-ec/payment-ec/payment-ec.component.d.ts +6 -0
  33. package/lib/ec-components/checkout-ec/success-ec/success-ec.component.d.ts +1 -0
  34. package/lib/ec-components/credit-account-banner-ec/credit-account-banner-ec.component.d.ts +27 -0
  35. package/lib/ec-components/header-ec/header-ec.component.d.ts +12 -4
  36. package/lib/ec-components/index.d.ts +1 -0
  37. package/lib/ec-components/sidebar-ec/sidebar-ec.component.d.ts +2 -1
  38. package/lib/ec-components/widgets-ec/price-ec/price-ec.component.d.ts +2 -4
  39. package/lib/ec-services/cart.service.d.ts +1 -0
  40. package/lib/ec-services/index.d.ts +1 -0
  41. package/lib/ec-services/price-visibility.service.d.ts +23 -0
  42. package/lib/ec-services/product-detail.service.d.ts +3 -0
  43. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, makeEnvironmentProviders, PLATFORM_ID, Injectable, Inject, Optional, APP_INITIALIZER, inject, RendererFactory2, afterNextRender, signal, EnvironmentInjector, runInInjectionContext, Component, ChangeDetectorRef, HostListener, CUSTOM_ELEMENTS_SCHEMA, Input, Pipe, Injector, EventEmitter, Output, forwardRef, afterRender, ViewChild, computed, NgZone, Renderer2, ChangeDetectionStrategy, Directive } from '@angular/core';
2
+ import { InjectionToken, makeEnvironmentProviders, PLATFORM_ID, Injectable, Inject, Optional, APP_INITIALIZER, inject, RendererFactory2, afterNextRender, signal, EnvironmentInjector, runInInjectionContext, computed, Component, ChangeDetectorRef, HostListener, CUSTOM_ELEMENTS_SCHEMA, Input, Pipe, Injector, EventEmitter, Output, forwardRef, afterRender, ViewChild, NgZone, Renderer2, ChangeDetectionStrategy, Directive } from '@angular/core';
3
3
  import * as i1$1 from '@angular/common';
4
4
  import { isPlatformBrowser, DOCUMENT, AsyncPipe, CommonModule, TitleCasePipe, JsonPipe, UpperCasePipe, Location } from '@angular/common';
5
- import { BehaviorSubject, of, take, shareReplay as shareReplay$1, map, catchError as catchError$1, filter, ReplaySubject, firstValueFrom, concatMap, throwError, tap as tap$1, distinctUntilChanged, switchMap, combineLatest, Subject, takeUntil } from 'rxjs';
5
+ import { BehaviorSubject, of, take, shareReplay as shareReplay$1, map, catchError as catchError$1, filter, ReplaySubject, firstValueFrom, concatMap, throwError, tap as tap$1, distinctUntilChanged, switchMap, combineLatest, Subscription, Subject, takeUntil } from 'rxjs';
6
6
  import * as i1 from '@angular/common/http';
7
7
  import { HttpClient, HttpHeaders } from '@angular/common/http';
8
8
  import { tap, shareReplay, catchError, filter as filter$1, skipWhile, take as take$1, switchMap as switchMap$1 } from 'rxjs/operators';
@@ -17,6 +17,7 @@ import moment from 'moment';
17
17
  import { StorageMap } from '@ngx-pwa/local-storage';
18
18
  import * as i1$4 from '@angular/forms';
19
19
  import { Validators, FormsModule, FormBuilder, NG_VALUE_ACCESSOR, ReactiveFormsModule } from '@angular/forms';
20
+ import { toSignal, toObservable } from '@angular/core/rxjs-interop';
20
21
  import { register } from 'swiper/element/bundle';
21
22
  import { register as register$1 } from 'swiper/element';
22
23
  import * as i1$5 from '@angular/platform-browser';
@@ -5023,16 +5024,19 @@ class CartService {
5023
5024
  this._items = JSON.parse(this._localStorage.getItem(this.CART_KEY) || '[]');
5024
5025
  this.cartToken = this._localStorage.getItem(this.CART_TOKEN_KEY) || null;
5025
5026
  // 🔑 CLAVE: Suscripción a cambios de estado de login
5026
- this._authService.loggedIn$.subscribe(isLoggedIn => {
5027
- if (isLoggedIn && !this._cartInitialized) {
5027
+ this._authService.loggedIn$.pipe(distinctUntilChanged()).subscribe(isLoggedIn => {
5028
+ if (isLoggedIn) {
5029
+ // Al pasar de invitado -> logueado, siempre sincronizar para traer balanceCustomer
5030
+ // (si no, el header no muestra cuenta corriente hasta recargar).
5028
5031
  this.syncCartOnLogin();
5029
5032
  this._cartInitialized = true;
5033
+ return;
5030
5034
  }
5031
- else if (!isLoggedIn && this._cartInitialized) {
5035
+ if (this._cartInitialized) {
5032
5036
  // Usuario cerró sesión, limpiar y resetear carrito
5033
5037
  this.clearAndResetCustomerCart();
5034
- this._cartInitialized = false; // Reset flag para permitir nueva inicialización
5035
5038
  }
5039
+ this._cartInitialized = false; // Reset flag para permitir nueva inicialización
5036
5040
  });
5037
5041
  this._channelService.channel$.subscribe(res => this.channelConfig = res);
5038
5042
  // ⚠️ FIX: Solo inicializar para usuarios no autenticados
@@ -5124,6 +5128,11 @@ class CartService {
5124
5128
  this._toastService.show('must-select-customer');
5125
5129
  return;
5126
5130
  }
5131
+ const isExistingItem = this._items.some((item) => item.product.id === product.id && item.variant_id === variantId);
5132
+ // Validación de saldo para items nuevos (los existentes se validan en updateItemQuantity)
5133
+ if (!isExistingItem && !this.hasCreditsForNewItem(product, quantity, variantId)) {
5134
+ return;
5135
+ }
5127
5136
  this._requestInProcess.next(true);
5128
5137
  let added = this.addIfAllreadyExists(product, variantId, quantity);
5129
5138
  if (!added) {
@@ -5494,10 +5503,14 @@ class CartService {
5494
5503
  if (!balance || balance.creditAmount === null || balance.creditAmount === undefined) {
5495
5504
  return true;
5496
5505
  }
5506
+ if (balance.allowAnyPaymentMethod) {
5507
+ return true;
5508
+ }
5497
5509
  if (balance.remainingCredits === undefined) {
5498
5510
  return false;
5499
5511
  }
5500
- if ((this._cartSubject.value?.totals?.total ?? 0) > balance.creditAmount) {
5512
+ const total = this._cartSubject.value?.totals?.total ?? 0;
5513
+ if (!balance.allowExceedBalance && total > balance.creditAmount) {
5501
5514
  this._toastService.show('not-enough-credits');
5502
5515
  return false;
5503
5516
  }
@@ -5508,6 +5521,9 @@ class CartService {
5508
5521
  if (!balance || balance.creditAmount === null || balance.creditAmount === undefined) {
5509
5522
  return true;
5510
5523
  }
5524
+ if (balance.allowAnyPaymentMethod) {
5525
+ return true;
5526
+ }
5511
5527
  if (balance.remainingCredits === undefined) {
5512
5528
  return false;
5513
5529
  }
@@ -5523,6 +5539,26 @@ class CartService {
5523
5539
  }
5524
5540
  return true;
5525
5541
  };
5542
+ hasCreditsForNewItem = (product, quantity, variantId) => {
5543
+ const balance = this._balanceCustomerSubject.value;
5544
+ if (!balance || balance.creditAmount === null || balance.creditAmount === undefined) {
5545
+ return true;
5546
+ }
5547
+ if (balance.allowAnyPaymentMethod) {
5548
+ return true;
5549
+ }
5550
+ if (balance.remainingCredits === undefined) {
5551
+ return false;
5552
+ }
5553
+ const variant = product?.variants?.find(v => v.code === variantId) ?? product?.variants?.[0];
5554
+ const unitPrice = variant?.saleprice ?? variant?.price ?? product?.price ?? 0;
5555
+ const totalCost = unitPrice * quantity;
5556
+ if (!balance.allowExceedBalance && totalCost > balance.remainingCredits) {
5557
+ this._toastService.show('not-enough-credits');
5558
+ return false;
5559
+ }
5560
+ return true;
5561
+ };
5526
5562
  addRepeatOrderToCart(items) {
5527
5563
  if (this._cartItemsSubject.value.length > 0) {
5528
5564
  this._toastService.show('cart-not-empty');
@@ -5598,7 +5634,16 @@ class ProductDetailService {
5598
5634
  options$ = this._optionsSubject.asObservable();
5599
5635
  associatedData$ = this._associatedDataSubject.asObservable();
5600
5636
  variants = [];
5601
- constructor() { }
5637
+ _currentTotalAmount = null;
5638
+ _balanceCustomer = null;
5639
+ constructor() {
5640
+ this._cartService.getTotalAmount().subscribe(total => {
5641
+ this._currentTotalAmount = total ?? null;
5642
+ });
5643
+ this._cartService.balanceCustomer$.subscribe(balanceCustomer => {
5644
+ this._balanceCustomer = balanceCustomer;
5645
+ });
5646
+ }
5602
5647
  /**
5603
5648
  * Obtengo el producto a traves de su codigo e inicializo la configuración
5604
5649
  * del Servicio.
@@ -5848,7 +5893,12 @@ class ProductDetailService {
5848
5893
  }
5849
5894
  if (!variant)
5850
5895
  return;
5851
- if (!this.validateQuantity(quantity))
5896
+ if (!this.validateQuantity(quantity, variant.code))
5897
+ return;
5898
+ const priceToValidate = productSelected.saleprice
5899
+ ? productSelected.saleprice * quantity
5900
+ : productSelected.price * quantity;
5901
+ if (!this.validatePriceAndCredits(priceToValidate))
5852
5902
  return;
5853
5903
  //agregar al servicio del carrito
5854
5904
  this._cartService.addToCart(this.makeAffordableProduct(productSelected), quantity, variant.code);
@@ -5872,14 +5922,22 @@ class ProductDetailService {
5872
5922
  * @param quantity
5873
5923
  * @returns
5874
5924
  */
5875
- validateQuantity = (quantity) => {
5876
- const actualQuantity = this._cartService.getCountFromItemInCart(this.variants[0].code);
5925
+ validateQuantity = (quantity, variantCode) => {
5926
+ const codeToCheck = variantCode || this.variants[0].code;
5927
+ const actualQuantity = this._cartService.getCountFromItemInCart(codeToCheck);
5877
5928
  const asociatedData = this._associatedDataSubject.value;
5878
- if ((actualQuantity + quantity) > asociatedData.maximumItemsQuantity) {
5929
+ const variant = this.variants.find(v => v.code === codeToCheck);
5930
+ const stock = variant?.stock ?? 0;
5931
+ const totalQuantity = actualQuantity + quantity;
5932
+ if (totalQuantity > stock) {
5933
+ this._toastService.show('out-of-stock-actually');
5934
+ return false;
5935
+ }
5936
+ if ((totalQuantity) > asociatedData.maximumItemsQuantity) {
5879
5937
  this._toastService.show('maximum-items-quantity', { quantity: asociatedData.maximumItemsQuantity });
5880
5938
  return false;
5881
5939
  }
5882
- if ((actualQuantity + quantity) < asociatedData.minimumItemsQuantity) {
5940
+ if ((totalQuantity) < asociatedData.minimumItemsQuantity) {
5883
5941
  this._toastService.show('minimum-items-quantity', { quantity: asociatedData.minimumItemsQuantity });
5884
5942
  return false;
5885
5943
  }
@@ -5894,6 +5952,22 @@ class ProductDetailService {
5894
5952
  }
5895
5953
  return true;
5896
5954
  };
5955
+ validatePriceAndCredits = (price) => {
5956
+ if (this._balanceCustomer === null) {
5957
+ return true;
5958
+ }
5959
+ if (this._balanceCustomer.allowAnyPaymentMethod) {
5960
+ return true;
5961
+ }
5962
+ if (this._balanceCustomer.remainingCredits === undefined) {
5963
+ return false;
5964
+ }
5965
+ if (price > this._balanceCustomer.remainingCredits) {
5966
+ this._toastService.show('not-enough-credits');
5967
+ return false;
5968
+ }
5969
+ return true;
5970
+ };
5897
5971
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ProductDetailService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5898
5972
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ProductDetailService, providedIn: 'root' });
5899
5973
  }
@@ -6805,6 +6879,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
6805
6879
  }]
6806
6880
  }], ctorParameters: () => [{ type: i1.HttpClient }, { type: RuntimeConfigService }] });
6807
6881
 
6882
+ /**
6883
+ * Gestiona la visibilidad global de precios según:
6884
+ * - configuración del canal (hidePrices, showPricesOnlyToLoggedUsers)
6885
+ * - estado de autenticación
6886
+ * - restricciones por cuenta corriente (showPrice desde balance)
6887
+ *
6888
+ * Nota: este servicio no contempla reglas por producto (shouldShowPrice, etc.).
6889
+ */
6890
+ class PriceVisibilityService {
6891
+ channelService = inject(ChannelService);
6892
+ authService = inject(AuthService);
6893
+ cartService = inject(CartService);
6894
+ channelConfig = toSignal(this.channelService.channel$, { initialValue: null });
6895
+ loggedIn = toSignal(this.authService.loggedIn$, { initialValue: this.authService.isAuthenticated() });
6896
+ creditAccountShowPrices = toSignal(this.cartService.showPrice$, { initialValue: null });
6897
+ hidePrices = computed(() => !!this.channelConfig()?.hidePrices);
6898
+ showPricesOnlyToLoggedUsers = computed(() => !!this.channelConfig()?.showPricesOnlyToLoggedUsers);
6899
+ canShowPrices = computed(() => {
6900
+ const hide = this.hidePrices();
6901
+ const onlyLogged = this.showPricesOnlyToLoggedUsers();
6902
+ const logged = this.loggedIn();
6903
+ const creditAllowed = this.creditAccountShowPrices();
6904
+ const creditPass = creditAllowed === null ? true : !!creditAllowed;
6905
+ return !hide && (!onlyLogged || logged) && creditPass;
6906
+ });
6907
+ canShowPrices$ = toObservable(this.canShowPrices);
6908
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PriceVisibilityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6909
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PriceVisibilityService, providedIn: 'root' });
6910
+ }
6911
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PriceVisibilityService, decorators: [{
6912
+ type: Injectable,
6913
+ args: [{ providedIn: 'root' }]
6914
+ }] });
6915
+
6808
6916
  /**
6809
6917
  * Componente que sirve para abstraer la funcionalidad que comparten
6810
6918
  * el menú y el footer.
@@ -7076,13 +7184,16 @@ class HeaderEcComponent extends MenuEcComponent {
7076
7184
  transparent = false;
7077
7185
  isHome = false; // Nueva variable para verificar si estamos en /home
7078
7186
  isScrolled = false;
7079
- showPricesOnlyToLoggedUsers = false;
7080
- hidePrices = false;
7187
+ balanceAttributes = null;
7188
+ subscriptions = new Subscription();
7081
7189
  __authService = inject(AuthService);
7082
7190
  _channelService = inject(ChannelService);
7191
+ priceVisibility = inject(PriceVisibilityService);
7083
7192
  changeDetector = inject(ChangeDetectorRef);
7084
7193
  appRouter = inject(Router);
7085
7194
  platformId = inject(PLATFORM_ID);
7195
+ _cartService = inject(CartService);
7196
+ balanceAttributes$ = this._cartService.balanceCustomer$;
7086
7197
  mobileDropdownOpen = signal(false);
7087
7198
  isMenuOpen = signal(false);
7088
7199
  // Observable del estado de autenticación
@@ -7090,10 +7201,6 @@ class HeaderEcComponent extends MenuEcComponent {
7090
7201
  isAuthenticated$ = this.__authService.isAuthenticated();
7091
7202
  constructor() {
7092
7203
  super();
7093
- this._channelService.channel$.subscribe(cfg => {
7094
- this.showPricesOnlyToLoggedUsers = !!cfg.showPricesOnlyToLoggedUsers;
7095
- this.hidePrices = !!cfg.hidePrices;
7096
- });
7097
7204
  }
7098
7205
  coreConstantsService = inject(CoreConstantsService);
7099
7206
  router = inject(Router);
@@ -7109,18 +7216,19 @@ class HeaderEcComponent extends MenuEcComponent {
7109
7216
  // Usar el Observable del AuthService
7110
7217
  this.logged$ = this.__authService.loggedIn$;
7111
7218
  // Suscribirse al Observable y forzar detección de cambios cuando sea necesario
7112
- this.logged$.subscribe(isLoggedIn => {
7219
+ this.subscriptions.add(this.logged$.subscribe(isLoggedIn => {
7113
7220
  this.changeDetector.detectChanges();
7114
- });
7221
+ }));
7222
+ this.subscribeToBalance();
7115
7223
  if (isPlatformBrowser(this.platformId)) {
7116
- this.appRouter.events.subscribe(evt => {
7224
+ this.subscriptions.add(this.appRouter.events.subscribe(evt => {
7117
7225
  if (evt instanceof NavigationEnd) {
7118
7226
  // Forzar detección de cambios después de navegación
7119
7227
  setTimeout(() => {
7120
7228
  this.changeDetector.detectChanges();
7121
7229
  }, 100);
7122
7230
  }
7123
- });
7231
+ }));
7124
7232
  }
7125
7233
  }
7126
7234
  ngAfterViewInit() {
@@ -7305,6 +7413,17 @@ class HeaderEcComponent extends MenuEcComponent {
7305
7413
  });
7306
7414
  }
7307
7415
  }
7416
+ get canShowPrices() {
7417
+ return this.priceVisibility.canShowPrices();
7418
+ }
7419
+ ngOnDestroy() {
7420
+ this.subscriptions.unsubscribe();
7421
+ }
7422
+ subscribeToBalance() {
7423
+ this.subscriptions.add(this._cartService.balanceCustomer$.subscribe(balanceData => {
7424
+ this.balanceAttributes = balanceData;
7425
+ }));
7426
+ }
7308
7427
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: HeaderEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7309
7428
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: HeaderEcComponent, isStandalone: true, selector: "lib-header-ec", host: { listeners: { "window:scroll": "onWindowScroll()" } }, usesInheritance: true, ngImport: i0, template: "<p>header-ec works!</p>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
7310
7429
  }
@@ -7798,20 +7917,14 @@ class PriceEcComponent {
7798
7917
  customTaxTemplate = null;
7799
7918
  customOnlyTaxLabelTemplate = null;
7800
7919
  _channelService = inject(ChannelService);
7801
- _authService = inject(AuthService);
7920
+ priceVisibility = inject(PriceVisibilityService);
7802
7921
  showTaxLegend = false;
7803
7922
  hideTaxes = false;
7804
- showPricesOnlyToLoggedUsers = false;
7805
- logged = false;
7806
- hidePrices = false;
7807
7923
  ngOnInit() {
7808
7924
  this._channelService.channel$.subscribe(cfg => {
7809
7925
  this.showTaxLegend = !!cfg.showTaxLegend;
7810
7926
  this.hideTaxes = !!cfg.hideTaxes;
7811
- this.showPricesOnlyToLoggedUsers = !!cfg.showPricesOnlyToLoggedUsers;
7812
- this.hidePrices = !!cfg.hidePrices;
7813
7927
  });
7814
- this.logged = this._authService.isAuthenticated();
7815
7928
  }
7816
7929
  /** Determina si mostrar la sección de impuestos */
7817
7930
  get shouldShowTaxes() {
@@ -7830,11 +7943,11 @@ class PriceEcComponent {
7830
7943
  return !!value && value.split(' - ').length === 2;
7831
7944
  }
7832
7945
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PriceEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7833
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: PriceEcComponent, isStandalone: true, selector: "app-price-ec", inputs: { price: "price", saleprice: "saleprice", basePrice: "basePrice", taxeAmount: "taxeAmount", taxes: "taxes", priceSize: "priceSize", showTaxLegendOnly: "showTaxLegendOnly", disableTaxInfo: "disableTaxInfo", customPriceTemplate: "customPriceTemplate", customSalePriceTemplate: "customSalePriceTemplate", customSimplePriceTemplate: "customSimplePriceTemplate", customSimpleSalePriceTemplate: "customSimpleSalePriceTemplate", customTaxTemplate: "customTaxTemplate", customOnlyTaxLabelTemplate: "customOnlyTaxLabelTemplate" }, ngImport: i0, template: "@if(!hidePrices){\n@if (!showPricesOnlyToLoggedUsers || logged) {\n<ng-container *ngIf=\"customSalePriceTemplate || customPriceTemplate; else defaultPriceBlock\">\n <ng-container *ngTemplateOutlet=\"customSalePriceTemplate || customPriceTemplate\">\n </ng-container>\n</ng-container>\n\n<ng-template #defaultPriceBlock>\n <div class=\"price\">\n <!-- Con precio de oferta -->\n <div *ngIf=\"saleprice; else onlyPriceBlock\" class=\"line-height-custom\">\n\n <!-- Precio original como rango o tachado simple -->\n <div *ngIf=\"hasRange(price); else simplePriceDel\" class=\"price-whithSaleprice\">\n <del class=\"\">\n {{\n price!.split(' - ')[0] | ecCurrencySymbol\n }}\n {{\n price!.split(' - ')[1] | ecCurrencySymbol\n }}\n </del>\n </div>\n\n <!-- Oferta como rango o simple -->\n <div *ngIf=\"hasRange(saleprice); else simpleSalePrice\" class=\"\">\n {{\n saleprice!.split(' - ')[0] | ecCurrencySymbol\n }}\n {{\n saleprice!.split(' - ')[1] | ecCurrencySymbol\n }}\n </div>\n </div>\n\n <!-- S\u00F3lo precio sin oferta -->\n <ng-template #onlyPriceBlock>\n <div *ngIf=\"hasRange(price); else simplePrice\" class=\"price-onlyPrice\">\n {{\n price!.split(' - ')[0] | ecCurrencySymbol\n }} -\n {{\n price!.split(' - ')[1] | ecCurrencySymbol\n }}\n </div>\n </ng-template>\n\n <!-- Fallback simple price -->\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 <ng-template #fallbackSimplePrice>\n <del>&nbsp;</del>\n <div class=\"price-simplePrice\">\n {{ price | ecCurrencySymbol }}\n </div>\n </ng-template>\n\n <!-- Fallback simple price-del -->\n <ng-template #simplePriceDel>\n <div class=\"price-simpleDel\">\n <del class=\"\">{{ price | ecCurrencySymbol }}</del>\n </div>\n </ng-template>\n\n <!-- Fallback simple saleprice -->\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 <ng-template #fallbackSimpleSalePrice>\n <div class=\"price-simpleSaleprice\">\n {{ saleprice | ecCurrencySymbol }}\n </div>\n </ng-template>\n </div>\n</ng-template>\n\n<!-- Secci\u00F3n de impuestos -->\n<ng-container *ngIf=\"shouldShowTaxes\">\n <!-- S\u00F3lo leyenda -->\n <ng-container *ngIf=\"showTaxLegendOnly; else detailedTaxBlock\">\n <ng-container *ngIf=\"customOnlyTaxLabelTemplate; else defaultOnlyTaxLabel\">\n <ng-container *ngTemplateOutlet=\"customOnlyTaxLabelTemplate\"></ng-container>\n </ng-container>\n <ng-template #defaultOnlyTaxLabel>\n <p class=\"taxes-title\">\n {{ 'price-without-national-taxes' | translate }}:\n {{ basePrice! | ecCurrencySymbol }}\n </p>\n </ng-template>\n </ng-container>\n\n <!-- Detalle impuestos -->\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\">\n {{ 'price-without-national-taxes' | translate }}:\n {{ basePrice! | ecCurrencySymbol }}\n </p>\n <ul class=\"taxes-list\">\n <li>\n {{ taxes.Name }}: {{ taxeAmount | ecCurrencySymbol }}\n </li>\n </ul>\n </div>\n</ng-template>\n}\n}", styles: [".price-sm{font-size:13px}.price{font-size:18px}.line-height-custom{line-height:1.2}.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:none;padding:0;margin:0}.taxes-list li{display:flex;justify-content:space-between;margin-bottom:.1rem;font-size:.65rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: EcCurrencySymbolPipe, name: "ecCurrencySymbol" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }] });
7946
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: PriceEcComponent, isStandalone: true, selector: "app-price-ec", inputs: { price: "price", saleprice: "saleprice", basePrice: "basePrice", taxeAmount: "taxeAmount", taxes: "taxes", priceSize: "priceSize", showTaxLegendOnly: "showTaxLegendOnly", disableTaxInfo: "disableTaxInfo", customPriceTemplate: "customPriceTemplate", customSalePriceTemplate: "customSalePriceTemplate", customSimplePriceTemplate: "customSimplePriceTemplate", customSimpleSalePriceTemplate: "customSimpleSalePriceTemplate", customTaxTemplate: "customTaxTemplate", customOnlyTaxLabelTemplate: "customOnlyTaxLabelTemplate" }, ngImport: i0, template: "@if (priceVisibility.canShowPrices()) {\n<ng-container *ngIf=\"customSalePriceTemplate || customPriceTemplate; else defaultPriceBlock\">\n <ng-container *ngTemplateOutlet=\"customSalePriceTemplate || customPriceTemplate\">\n </ng-container>\n</ng-container>\n\n<ng-template #defaultPriceBlock>\n <div class=\"price\">\n <!-- Con precio de oferta -->\n <div *ngIf=\"saleprice; else onlyPriceBlock\" class=\"line-height-custom\">\n\n <!-- Precio original como rango o tachado simple -->\n <div *ngIf=\"hasRange(price); else simplePriceDel\" class=\"price-whithSaleprice\">\n <del class=\"\">\n {{\n price!.split(' - ')[0] | ecCurrencySymbol\n }}\n {{\n price!.split(' - ')[1] | ecCurrencySymbol\n }}\n </del>\n </div>\n\n <!-- Oferta como rango o simple -->\n <div *ngIf=\"hasRange(saleprice); else simpleSalePrice\" class=\"\">\n {{\n saleprice!.split(' - ')[0] | ecCurrencySymbol\n }}\n {{\n saleprice!.split(' - ')[1] | ecCurrencySymbol\n }}\n </div>\n </div>\n\n <!-- S\u00F3lo precio sin oferta -->\n <ng-template #onlyPriceBlock>\n <div *ngIf=\"hasRange(price); else simplePrice\" class=\"price-onlyPrice\">\n {{\n price!.split(' - ')[0] | ecCurrencySymbol\n }} -\n {{\n price!.split(' - ')[1] | ecCurrencySymbol\n }}\n </div>\n </ng-template>\n\n <!-- Fallback simple price -->\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 <ng-template #fallbackSimplePrice>\n <del>&nbsp;</del>\n <div class=\"price-simplePrice\">\n {{ price | ecCurrencySymbol }}\n </div>\n </ng-template>\n\n <!-- Fallback simple price-del -->\n <ng-template #simplePriceDel>\n <div class=\"price-simpleDel\">\n <del class=\"\">{{ price | ecCurrencySymbol }}</del>\n </div>\n </ng-template>\n\n <!-- Fallback simple saleprice -->\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 <ng-template #fallbackSimpleSalePrice>\n <div class=\"price-simpleSaleprice\">\n {{ saleprice | ecCurrencySymbol }}\n </div>\n </ng-template>\n </div>\n</ng-template>\n\n<!-- Secci\u00F3n de impuestos -->\n<ng-container *ngIf=\"shouldShowTaxes\">\n <!-- S\u00F3lo leyenda -->\n <ng-container *ngIf=\"showTaxLegendOnly; else detailedTaxBlock\">\n <ng-container *ngIf=\"customOnlyTaxLabelTemplate; else defaultOnlyTaxLabel\">\n <ng-container *ngTemplateOutlet=\"customOnlyTaxLabelTemplate\"></ng-container>\n </ng-container>\n <ng-template #defaultOnlyTaxLabel>\n <p class=\"taxes-title\">\n {{ 'price-without-national-taxes' | translate }}:\n {{ basePrice! | ecCurrencySymbol }}\n </p>\n </ng-template>\n </ng-container>\n\n <!-- Detalle impuestos -->\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\">\n {{ 'price-without-national-taxes' | translate }}:\n {{ basePrice! | ecCurrencySymbol }}\n </p>\n <ul class=\"taxes-list\">\n <li>\n {{ taxes.Name }}: {{ taxeAmount | ecCurrencySymbol }}\n </li>\n </ul>\n </div>\n</ng-template>\n}\n", styles: [".price-sm{font-size:13px}.price{font-size:18px}.line-height-custom{line-height:1.2}.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:none;padding:0;margin:0}.taxes-list li{display:flex;justify-content:space-between;margin-bottom:.1rem;font-size:.65rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: EcCurrencySymbolPipe, name: "ecCurrencySymbol" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }] });
7834
7947
  }
7835
7948
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PriceEcComponent, decorators: [{
7836
7949
  type: Component,
7837
- args: [{ selector: 'app-price-ec', standalone: true, imports: [CommonModule, EcCurrencySymbolPipe, TranslateModule], template: "@if(!hidePrices){\n@if (!showPricesOnlyToLoggedUsers || logged) {\n<ng-container *ngIf=\"customSalePriceTemplate || customPriceTemplate; else defaultPriceBlock\">\n <ng-container *ngTemplateOutlet=\"customSalePriceTemplate || customPriceTemplate\">\n </ng-container>\n</ng-container>\n\n<ng-template #defaultPriceBlock>\n <div class=\"price\">\n <!-- Con precio de oferta -->\n <div *ngIf=\"saleprice; else onlyPriceBlock\" class=\"line-height-custom\">\n\n <!-- Precio original como rango o tachado simple -->\n <div *ngIf=\"hasRange(price); else simplePriceDel\" class=\"price-whithSaleprice\">\n <del class=\"\">\n {{\n price!.split(' - ')[0] | ecCurrencySymbol\n }}\n {{\n price!.split(' - ')[1] | ecCurrencySymbol\n }}\n </del>\n </div>\n\n <!-- Oferta como rango o simple -->\n <div *ngIf=\"hasRange(saleprice); else simpleSalePrice\" class=\"\">\n {{\n saleprice!.split(' - ')[0] | ecCurrencySymbol\n }}\n {{\n saleprice!.split(' - ')[1] | ecCurrencySymbol\n }}\n </div>\n </div>\n\n <!-- S\u00F3lo precio sin oferta -->\n <ng-template #onlyPriceBlock>\n <div *ngIf=\"hasRange(price); else simplePrice\" class=\"price-onlyPrice\">\n {{\n price!.split(' - ')[0] | ecCurrencySymbol\n }} -\n {{\n price!.split(' - ')[1] | ecCurrencySymbol\n }}\n </div>\n </ng-template>\n\n <!-- Fallback simple price -->\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 <ng-template #fallbackSimplePrice>\n <del>&nbsp;</del>\n <div class=\"price-simplePrice\">\n {{ price | ecCurrencySymbol }}\n </div>\n </ng-template>\n\n <!-- Fallback simple price-del -->\n <ng-template #simplePriceDel>\n <div class=\"price-simpleDel\">\n <del class=\"\">{{ price | ecCurrencySymbol }}</del>\n </div>\n </ng-template>\n\n <!-- Fallback simple saleprice -->\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 <ng-template #fallbackSimpleSalePrice>\n <div class=\"price-simpleSaleprice\">\n {{ saleprice | ecCurrencySymbol }}\n </div>\n </ng-template>\n </div>\n</ng-template>\n\n<!-- Secci\u00F3n de impuestos -->\n<ng-container *ngIf=\"shouldShowTaxes\">\n <!-- S\u00F3lo leyenda -->\n <ng-container *ngIf=\"showTaxLegendOnly; else detailedTaxBlock\">\n <ng-container *ngIf=\"customOnlyTaxLabelTemplate; else defaultOnlyTaxLabel\">\n <ng-container *ngTemplateOutlet=\"customOnlyTaxLabelTemplate\"></ng-container>\n </ng-container>\n <ng-template #defaultOnlyTaxLabel>\n <p class=\"taxes-title\">\n {{ 'price-without-national-taxes' | translate }}:\n {{ basePrice! | ecCurrencySymbol }}\n </p>\n </ng-template>\n </ng-container>\n\n <!-- Detalle impuestos -->\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\">\n {{ 'price-without-national-taxes' | translate }}:\n {{ basePrice! | ecCurrencySymbol }}\n </p>\n <ul class=\"taxes-list\">\n <li>\n {{ taxes.Name }}: {{ taxeAmount | ecCurrencySymbol }}\n </li>\n </ul>\n </div>\n</ng-template>\n}\n}", styles: [".price-sm{font-size:13px}.price{font-size:18px}.line-height-custom{line-height:1.2}.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:none;padding:0;margin:0}.taxes-list li{display:flex;justify-content:space-between;margin-bottom:.1rem;font-size:.65rem}\n"] }]
7950
+ args: [{ selector: 'app-price-ec', standalone: true, imports: [CommonModule, EcCurrencySymbolPipe, TranslateModule], template: "@if (priceVisibility.canShowPrices()) {\n<ng-container *ngIf=\"customSalePriceTemplate || customPriceTemplate; else defaultPriceBlock\">\n <ng-container *ngTemplateOutlet=\"customSalePriceTemplate || customPriceTemplate\">\n </ng-container>\n</ng-container>\n\n<ng-template #defaultPriceBlock>\n <div class=\"price\">\n <!-- Con precio de oferta -->\n <div *ngIf=\"saleprice; else onlyPriceBlock\" class=\"line-height-custom\">\n\n <!-- Precio original como rango o tachado simple -->\n <div *ngIf=\"hasRange(price); else simplePriceDel\" class=\"price-whithSaleprice\">\n <del class=\"\">\n {{\n price!.split(' - ')[0] | ecCurrencySymbol\n }}\n {{\n price!.split(' - ')[1] | ecCurrencySymbol\n }}\n </del>\n </div>\n\n <!-- Oferta como rango o simple -->\n <div *ngIf=\"hasRange(saleprice); else simpleSalePrice\" class=\"\">\n {{\n saleprice!.split(' - ')[0] | ecCurrencySymbol\n }}\n {{\n saleprice!.split(' - ')[1] | ecCurrencySymbol\n }}\n </div>\n </div>\n\n <!-- S\u00F3lo precio sin oferta -->\n <ng-template #onlyPriceBlock>\n <div *ngIf=\"hasRange(price); else simplePrice\" class=\"price-onlyPrice\">\n {{\n price!.split(' - ')[0] | ecCurrencySymbol\n }} -\n {{\n price!.split(' - ')[1] | ecCurrencySymbol\n }}\n </div>\n </ng-template>\n\n <!-- Fallback simple price -->\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 <ng-template #fallbackSimplePrice>\n <del>&nbsp;</del>\n <div class=\"price-simplePrice\">\n {{ price | ecCurrencySymbol }}\n </div>\n </ng-template>\n\n <!-- Fallback simple price-del -->\n <ng-template #simplePriceDel>\n <div class=\"price-simpleDel\">\n <del class=\"\">{{ price | ecCurrencySymbol }}</del>\n </div>\n </ng-template>\n\n <!-- Fallback simple saleprice -->\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 <ng-template #fallbackSimpleSalePrice>\n <div class=\"price-simpleSaleprice\">\n {{ saleprice | ecCurrencySymbol }}\n </div>\n </ng-template>\n </div>\n</ng-template>\n\n<!-- Secci\u00F3n de impuestos -->\n<ng-container *ngIf=\"shouldShowTaxes\">\n <!-- S\u00F3lo leyenda -->\n <ng-container *ngIf=\"showTaxLegendOnly; else detailedTaxBlock\">\n <ng-container *ngIf=\"customOnlyTaxLabelTemplate; else defaultOnlyTaxLabel\">\n <ng-container *ngTemplateOutlet=\"customOnlyTaxLabelTemplate\"></ng-container>\n </ng-container>\n <ng-template #defaultOnlyTaxLabel>\n <p class=\"taxes-title\">\n {{ 'price-without-national-taxes' | translate }}:\n {{ basePrice! | ecCurrencySymbol }}\n </p>\n </ng-template>\n </ng-container>\n\n <!-- Detalle impuestos -->\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\">\n {{ 'price-without-national-taxes' | translate }}:\n {{ basePrice! | ecCurrencySymbol }}\n </p>\n <ul class=\"taxes-list\">\n <li>\n {{ taxes.Name }}: {{ taxeAmount | ecCurrencySymbol }}\n </li>\n </ul>\n </div>\n</ng-template>\n}\n", styles: [".price-sm{font-size:13px}.price{font-size:18px}.line-height-custom{line-height:1.2}.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:none;padding:0;margin:0}.taxes-list li{display:flex;justify-content:space-between;margin-bottom:.1rem;font-size:.65rem}\n"] }]
7838
7951
  }], propDecorators: { price: [{
7839
7952
  type: Input
7840
7953
  }], saleprice: [{
@@ -8082,11 +8195,11 @@ class ProductEcComponent {
8082
8195
  }
8083
8196
  }
8084
8197
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ProductEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8085
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ProductEcComponent, isStandalone: true, selector: "app-product-ec", inputs: { product: "product", isProductBox: "isProductBox", isCollection: "isCollection" }, outputs: { loaded: "loaded" }, ngImport: i0, template: "<a [routerLink]=\"['/product', product.id]\" class=\"text-decoration-none producto\">\n <!-- Marca especial y descuento -->\n <!-- <div *ngIf=\"product.saleprice || (product.special_mark && product.special_mark !== null && product.special_mark !== undefined && product.special_mark.length >0)\"\n class=\"marcas\">\n <div *ecProductStock=\"product\" [ecProductMini]=\"product.special_mark\"></div>\n <ng-container *ngIf=\"shouldShowPrice\">\n <div *ecProductStock=\"product\" [ngClass]=\"{'tag-dsc float-right': product.saleprice}\"\n [ecProductOff]=\"product\">\n </div>\n </ng-container>\n </div> -->\n\n <!-- Imagen del producto -->\n <div class=\"foto\">\n @if(product.picturesdefault){\n @if (product.picturesdefault && product.picturesdefault.length > 1 ) {\n <img [src]=\"mediaUrl + product.picturesdefault[0]\" alt=\"Imagen principal\" class=\"w-100 pic01\" />\n <img [src]=\"mediaUrl + product.picturesdefault[1]\" alt=\"Imagen secundaria\" class=\"w-100 pic02\" />\n } @else {\n <img [src]=\"mediaUrl + product.picturesdefault[0]\" alt=\"Imagen principal\" class=\"w-100 pic01\" />\n }\n }\n </div>\n <!-- Precio -->\n\n\n <!-- Nombre del producto -->\n <h6 class=\"title\">{{ product.name | titlecase }}</h6>\n\n <div class=\"sku\" [innerHTML]=\"product.shortdetails\"></div>\n\n @if (shouldShowPrice) {\n <app-price-ec [price]=\"product.price\" [saleprice]=\"product.saleprice\" class=\"\" />\n }\n @if(!hidePrices){\n @if(!showPricesOnlyToLoggedUsers || isAuthenticated$){\n\n <div class=\"fixBottom\">\n\n <!-- Bot\u00F3n de acciones -->\n <!-- <ng-container *ecProductStock=\"product; else noStock\"> -->\n <!-- Cuando no tiene marca especial o es de tipo 'standard' -->\n @if (!product.special_mark || product.special_mark.length === 0 || product.special_mark[0]?.type ===\n 'standard') {\n <button class=\"btn standard\" [ngClass]=\"isCollection ? 'px-2 w-100 d-sm-block' : 'py-2 px-4'\">\n <ng-container *ngIf=\"isCollection; else normalText\">\n <span> {{(\"buy\" | translate) | uppercase}} </span>\n </ng-container>\n <ng-template #normalText>\n {{(\"buy\" | translate) | uppercase}}\n </ng-template>\n </button>\n }@else {\n <!-- Caso 1: Agotado o Disponible muy pronto -->\n @if (product.special_mark[0]?.type === 'out_of_stock' || product.special_mark[0]?.type === 'coming_soon') {\n <button class=\"btn\" [ngClass]=\"isCollection ? 'px-2 w-100 d-sm-block' : 'py-2 px-4'\">\n @if(isCollection){\n <span>{{ product.special_mark[0].name | uppercase }} </span>\n }@else {\n {{ product.special_mark[0]?.name | uppercase }}\n }\n </button>}\n <!-- Caso 2: Contacto por WhatsApp -->\n @if (product.special_mark[0].type === 'whatsapp_contact') {\n <button class=\"btn\" [ngClass]=\"isCollection ? 'px-2 w-100 d-sm-block' : 'py-2 px-4'\"\n (click)=\"openWhatsApp(product.special_mark[0]?.whatsappContact)\">\n @if(isCollection){\n <span>{{ product.special_mark[0]?.name | uppercase }}</span>\n }@else {\n {{ product.special_mark[0]?.name | uppercase }}\n }\n\n </button>\n }\n <!-- Caso 3: Solicitar m\u00E1s informaci\u00F3n -->\n @if (product.special_mark[0]?.type === 'more_info') {\n <button class=\"btn\" [ngClass]=\"isCollection ? 'px-2 w-100 d-sm-block' : 'py-2 px-4'\">\n @if(isCollection){\n <span>{{ product.special_mark[0]?.name | uppercase }}</span>\n }@else {\n {{ product.special_mark[0]?.name | uppercase }}\n }\n </button>\n }\n }\n </div>\n }}\n</a>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.UpperCasePipe, name: "uppercase" }, { kind: "pipe", type: i1$1.TitleCasePipe, name: "titlecase" }, { kind: "component", type: PriceEcComponent, selector: "app-price-ec", inputs: ["price", "saleprice", "basePrice", "taxeAmount", "taxes", "priceSize", "showTaxLegendOnly", "disableTaxInfo", "customPriceTemplate", "customSalePriceTemplate", "customSimplePriceTemplate", "customSimpleSalePriceTemplate", "customTaxTemplate", "customOnlyTaxLabelTemplate"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormsModule }] });
8198
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ProductEcComponent, isStandalone: true, selector: "app-product-ec", inputs: { product: "product", isProductBox: "isProductBox", isCollection: "isCollection" }, outputs: { loaded: "loaded" }, ngImport: i0, template: "<a [routerLink]=\"['/product', product.id]\" class=\"text-decoration-none producto\">\n <!-- Marca especial y descuento -->\n <!-- <div *ngIf=\"product.saleprice || (product.special_mark && product.special_mark !== null && product.special_mark !== undefined && product.special_mark.length >0)\"\n class=\"marcas\">\n <div *ecProductStock=\"product\" [ecProductMini]=\"product.special_mark\"></div>\n <ng-container *ngIf=\"shouldShowPrice\">\n <div *ecProductStock=\"product\" [ngClass]=\"{'tag-dsc float-right': product.saleprice}\"\n [ecProductOff]=\"product\">\n </div>\n </ng-container>\n </div> -->\n\n <!-- Imagen del producto -->\n <div class=\"foto\">\n @if(product.picturesdefault){\n @if (product.picturesdefault && product.picturesdefault.length > 1 ) {\n <img [src]=\"mediaUrl + product.picturesdefault[0]\" alt=\"Imagen principal\" class=\"w-100 pic01\" />\n <img [src]=\"mediaUrl + product.picturesdefault[1]\" alt=\"Imagen secundaria\" class=\"w-100 pic02\" />\n } @else {\n <img [src]=\"mediaUrl + product.picturesdefault[0]\" alt=\"Imagen principal\" class=\"w-100 pic01\" />\n }\n }\n </div>\n <!-- Precio -->\n\n\n <!-- Nombre del producto -->\n <h6 class=\"title\">{{ product.name | titlecase }}</h6>\n\n <div class=\"sku\" [innerHTML]=\"product.shortdetails\"></div>\n\n @if (shouldShowPrice) {\n <app-price-ec [price]=\"product.price\" [saleprice]=\"product.saleprice\" class=\"\" />\n }\n @if(!hidePrices){\n @if(!showPricesOnlyToLoggedUsers || isAuthenticated$){\n\n <div class=\"fixBottom\">\n\n <!-- Bot\u00F3n de acciones -->\n <!-- <ng-container *ecProductStock=\"product; else noStock\"> -->\n <!-- Cuando no tiene marca especial o es de tipo 'standard' -->\n @if (!product.special_mark || product.special_mark.length === 0 || product.special_mark[0]?.type ===\n 'standard') {\n <button class=\"btn standard\" [ngClass]=\"isCollection ? 'px-2 w-100 d-sm-block' : 'py-2 px-4'\">\n <ng-container *ngIf=\"isCollection; else normalText\">\n <span> {{(\"buy\" | translate) | uppercase}} </span>\n </ng-container>\n <ng-template #normalText>\n {{(\"buy\" | translate) | uppercase}}\n </ng-template>\n </button>\n }@else {\n <!-- Caso 1: Agotado o Disponible muy pronto -->\n @if (product.special_mark[0]?.type === 'out_of_stock' || product.special_mark[0]?.type === 'coming_soon') {\n <button class=\"btn\" [ngClass]=\"isCollection ? 'px-2 w-100 d-sm-block' : 'py-2 px-4'\">\n @if(isCollection){\n <span>{{ product.special_mark[0].name | uppercase }} </span>\n }@else {\n {{ product.special_mark[0]?.name | uppercase }}\n }\n </button>}\n <!-- Caso 2: Contacto por WhatsApp -->\n @if (product.special_mark[0].type === 'whatsapp_contact') {\n <button class=\"btn\" [ngClass]=\"isCollection ? 'px-2 w-100 d-sm-block' : 'py-2 px-4'\"\n (click)=\"openWhatsApp(product.special_mark[0]?.whatsappContact)\">\n @if(isCollection){\n <span>{{ product.special_mark[0]?.name | uppercase }}</span>\n }@else {\n {{ product.special_mark[0]?.name | uppercase }}\n }\n\n </button>\n }\n <!-- Caso 3: Solicitar m\u00E1s informaci\u00F3n -->\n @if (product.special_mark[0]?.type === 'more_info') {\n <button class=\"btn\" [ngClass]=\"isCollection ? 'px-2 w-100 d-sm-block' : 'py-2 px-4'\">\n @if(isCollection){\n <span>{{ product.special_mark[0]?.name | uppercase }}</span>\n }@else {\n {{ product.special_mark[0]?.name | uppercase }}\n }\n </button>\n }\n }\n </div>\n }}\n</a>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.UpperCasePipe, name: "uppercase" }, { kind: "pipe", type: i1$1.TitleCasePipe, name: "titlecase" }, { kind: "component", type: PriceEcComponent, selector: "app-price-ec", inputs: ["price", "saleprice", "basePrice", "taxeAmount", "taxes", "priceSize", "showTaxLegendOnly", "disableTaxInfo", "customPriceTemplate", "customSalePriceTemplate", "customSimplePriceTemplate", "customSimpleSalePriceTemplate", "customTaxTemplate", "customOnlyTaxLabelTemplate"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormsModule }] });
8086
8199
  }
8087
8200
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ProductEcComponent, decorators: [{
8088
8201
  type: Component,
8089
- args: [{ selector: 'app-product-ec', standalone: true, imports: [CommonModule, PriceEcComponent, RouterLink, TranslateModule, FormsModule], template: "<a [routerLink]=\"['/product', product.id]\" class=\"text-decoration-none producto\">\n <!-- Marca especial y descuento -->\n <!-- <div *ngIf=\"product.saleprice || (product.special_mark && product.special_mark !== null && product.special_mark !== undefined && product.special_mark.length >0)\"\n class=\"marcas\">\n <div *ecProductStock=\"product\" [ecProductMini]=\"product.special_mark\"></div>\n <ng-container *ngIf=\"shouldShowPrice\">\n <div *ecProductStock=\"product\" [ngClass]=\"{'tag-dsc float-right': product.saleprice}\"\n [ecProductOff]=\"product\">\n </div>\n </ng-container>\n </div> -->\n\n <!-- Imagen del producto -->\n <div class=\"foto\">\n @if(product.picturesdefault){\n @if (product.picturesdefault && product.picturesdefault.length > 1 ) {\n <img [src]=\"mediaUrl + product.picturesdefault[0]\" alt=\"Imagen principal\" class=\"w-100 pic01\" />\n <img [src]=\"mediaUrl + product.picturesdefault[1]\" alt=\"Imagen secundaria\" class=\"w-100 pic02\" />\n } @else {\n <img [src]=\"mediaUrl + product.picturesdefault[0]\" alt=\"Imagen principal\" class=\"w-100 pic01\" />\n }\n }\n </div>\n <!-- Precio -->\n\n\n <!-- Nombre del producto -->\n <h6 class=\"title\">{{ product.name | titlecase }}</h6>\n\n <div class=\"sku\" [innerHTML]=\"product.shortdetails\"></div>\n\n @if (shouldShowPrice) {\n <app-price-ec [price]=\"product.price\" [saleprice]=\"product.saleprice\" class=\"\" />\n }\n @if(!hidePrices){\n @if(!showPricesOnlyToLoggedUsers || isAuthenticated$){\n\n <div class=\"fixBottom\">\n\n <!-- Bot\u00F3n de acciones -->\n <!-- <ng-container *ecProductStock=\"product; else noStock\"> -->\n <!-- Cuando no tiene marca especial o es de tipo 'standard' -->\n @if (!product.special_mark || product.special_mark.length === 0 || product.special_mark[0]?.type ===\n 'standard') {\n <button class=\"btn standard\" [ngClass]=\"isCollection ? 'px-2 w-100 d-sm-block' : 'py-2 px-4'\">\n <ng-container *ngIf=\"isCollection; else normalText\">\n <span> {{(\"buy\" | translate) | uppercase}} </span>\n </ng-container>\n <ng-template #normalText>\n {{(\"buy\" | translate) | uppercase}}\n </ng-template>\n </button>\n }@else {\n <!-- Caso 1: Agotado o Disponible muy pronto -->\n @if (product.special_mark[0]?.type === 'out_of_stock' || product.special_mark[0]?.type === 'coming_soon') {\n <button class=\"btn\" [ngClass]=\"isCollection ? 'px-2 w-100 d-sm-block' : 'py-2 px-4'\">\n @if(isCollection){\n <span>{{ product.special_mark[0].name | uppercase }} </span>\n }@else {\n {{ product.special_mark[0]?.name | uppercase }}\n }\n </button>}\n <!-- Caso 2: Contacto por WhatsApp -->\n @if (product.special_mark[0].type === 'whatsapp_contact') {\n <button class=\"btn\" [ngClass]=\"isCollection ? 'px-2 w-100 d-sm-block' : 'py-2 px-4'\"\n (click)=\"openWhatsApp(product.special_mark[0]?.whatsappContact)\">\n @if(isCollection){\n <span>{{ product.special_mark[0]?.name | uppercase }}</span>\n }@else {\n {{ product.special_mark[0]?.name | uppercase }}\n }\n\n </button>\n }\n <!-- Caso 3: Solicitar m\u00E1s informaci\u00F3n -->\n @if (product.special_mark[0]?.type === 'more_info') {\n <button class=\"btn\" [ngClass]=\"isCollection ? 'px-2 w-100 d-sm-block' : 'py-2 px-4'\">\n @if(isCollection){\n <span>{{ product.special_mark[0]?.name | uppercase }}</span>\n }@else {\n {{ product.special_mark[0]?.name | uppercase }}\n }\n </button>\n }\n }\n </div>\n }}\n</a>" }]
8202
+ args: [{ selector: 'app-product-ec', standalone: true, imports: [CommonModule, PriceEcComponent, RouterLink, TranslateModule, FormsModule], template: "<a [routerLink]=\"['/product', product.id]\" class=\"text-decoration-none producto\">\n <!-- Marca especial y descuento -->\n <!-- <div *ngIf=\"product.saleprice || (product.special_mark && product.special_mark !== null && product.special_mark !== undefined && product.special_mark.length >0)\"\n class=\"marcas\">\n <div *ecProductStock=\"product\" [ecProductMini]=\"product.special_mark\"></div>\n <ng-container *ngIf=\"shouldShowPrice\">\n <div *ecProductStock=\"product\" [ngClass]=\"{'tag-dsc float-right': product.saleprice}\"\n [ecProductOff]=\"product\">\n </div>\n </ng-container>\n </div> -->\n\n <!-- Imagen del producto -->\n <div class=\"foto\">\n @if(product.picturesdefault){\n @if (product.picturesdefault && product.picturesdefault.length > 1 ) {\n <img [src]=\"mediaUrl + product.picturesdefault[0]\" alt=\"Imagen principal\" class=\"w-100 pic01\" />\n <img [src]=\"mediaUrl + product.picturesdefault[1]\" alt=\"Imagen secundaria\" class=\"w-100 pic02\" />\n } @else {\n <img [src]=\"mediaUrl + product.picturesdefault[0]\" alt=\"Imagen principal\" class=\"w-100 pic01\" />\n }\n }\n </div>\n <!-- Precio -->\n\n\n <!-- Nombre del producto -->\n <h6 class=\"title\">{{ product.name | titlecase }}</h6>\n\n <div class=\"sku\" [innerHTML]=\"product.shortdetails\"></div>\n\n @if (shouldShowPrice) {\n <app-price-ec [price]=\"product.price\" [saleprice]=\"product.saleprice\" class=\"\" />\n }\n @if(!hidePrices){\n @if(!showPricesOnlyToLoggedUsers || isAuthenticated$){\n\n <div class=\"fixBottom\">\n\n <!-- Bot\u00F3n de acciones -->\n <!-- <ng-container *ecProductStock=\"product; else noStock\"> -->\n <!-- Cuando no tiene marca especial o es de tipo 'standard' -->\n @if (!product.special_mark || product.special_mark.length === 0 || product.special_mark[0]?.type ===\n 'standard') {\n <button class=\"btn standard\" [ngClass]=\"isCollection ? 'px-2 w-100 d-sm-block' : 'py-2 px-4'\">\n <ng-container *ngIf=\"isCollection; else normalText\">\n <span> {{(\"buy\" | translate) | uppercase}} </span>\n </ng-container>\n <ng-template #normalText>\n {{(\"buy\" | translate) | uppercase}}\n </ng-template>\n </button>\n }@else {\n <!-- Caso 1: Agotado o Disponible muy pronto -->\n @if (product.special_mark[0]?.type === 'out_of_stock' || product.special_mark[0]?.type === 'coming_soon') {\n <button class=\"btn\" [ngClass]=\"isCollection ? 'px-2 w-100 d-sm-block' : 'py-2 px-4'\">\n @if(isCollection){\n <span>{{ product.special_mark[0].name | uppercase }} </span>\n }@else {\n {{ product.special_mark[0]?.name | uppercase }}\n }\n </button>}\n <!-- Caso 2: Contacto por WhatsApp -->\n @if (product.special_mark[0].type === 'whatsapp_contact') {\n <button class=\"btn\" [ngClass]=\"isCollection ? 'px-2 w-100 d-sm-block' : 'py-2 px-4'\"\n (click)=\"openWhatsApp(product.special_mark[0]?.whatsappContact)\">\n @if(isCollection){\n <span>{{ product.special_mark[0]?.name | uppercase }}</span>\n }@else {\n {{ product.special_mark[0]?.name | uppercase }}\n }\n\n </button>\n }\n <!-- Caso 3: Solicitar m\u00E1s informaci\u00F3n -->\n @if (product.special_mark[0]?.type === 'more_info') {\n <button class=\"btn\" [ngClass]=\"isCollection ? 'px-2 w-100 d-sm-block' : 'py-2 px-4'\">\n @if(isCollection){\n <span>{{ product.special_mark[0]?.name | uppercase }}</span>\n }@else {\n {{ product.special_mark[0]?.name | uppercase }}\n }\n </button>\n }\n }\n </div>\n }}\n</a>" }]
8090
8203
  }], ctorParameters: () => [], propDecorators: { product: [{
8091
8204
  type: Input,
8092
8205
  args: [{
@@ -10239,6 +10352,7 @@ class CartEcComponent {
10239
10352
  totalPromotionAmount$ = this._cartService.getTotalPromotionAmount();
10240
10353
  taxesAmount$ = this._cartService.getTaxesAmount();
10241
10354
  totalAmount$ = this._cartService.getTotalAmount();
10355
+ creditAccountShowPrices$ = this._cartService.showPrice$;
10242
10356
  _authService = inject(AuthService);
10243
10357
  isAuthenticated$ = this._authService.isAuthenticated();
10244
10358
  getTotalAmount = this._cartService.getTotalAmount();
@@ -10257,6 +10371,12 @@ class CartEcComponent {
10257
10371
  this.hideTaxes = !!channel.hideTaxes;
10258
10372
  });
10259
10373
  }
10374
+ ngOnInit() {
10375
+ this._channelService.channel$.subscribe(channel => {
10376
+ this.hideTaxes = !!channel?.hideTaxes;
10377
+ this.channel = channel;
10378
+ });
10379
+ }
10260
10380
  removeCoupon() {
10261
10381
  // console.log(this.couponCode$)
10262
10382
  this._cartService.removeCoupon();
@@ -10293,11 +10413,11 @@ class CartEcComponent {
10293
10413
  }
10294
10414
  };
10295
10415
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CartEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10296
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: CartEcComponent, isStandalone: true, selector: "lib-cart-ec", ngImport: i0, template: "<p>cart-ec works!</p>\n", styles: [""] });
10416
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: CartEcComponent, isStandalone: true, selector: "lib-cart-ec", ngImport: i0, template: "<p>cart-ec works!</p>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TranslateModule }] });
10297
10417
  }
10298
10418
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CartEcComponent, decorators: [{
10299
10419
  type: Component,
10300
- args: [{ selector: 'lib-cart-ec', standalone: true, imports: [], template: "<p>cart-ec works!</p>\n" }]
10420
+ args: [{ selector: 'lib-cart-ec', standalone: true, imports: [CommonModule, TranslateModule], template: "<p>cart-ec works!</p>\n" }]
10301
10421
  }], ctorParameters: () => [] });
10302
10422
 
10303
10423
  class EcSafeHtmlPipe {
@@ -11404,6 +11524,7 @@ class PaymentEcComponent {
11404
11524
  _paymentService = inject(PaymentService);
11405
11525
  _checkoutService = inject(CheckoutService);
11406
11526
  _cartService = inject(CartService);
11527
+ _toastService = inject(ToastService);
11407
11528
  _methodDataSubject = new BehaviorSubject(null);
11408
11529
  _loadingSubject = new BehaviorSubject(false);
11409
11530
  methods$ = this._paymentService.methods$;
@@ -11411,12 +11532,18 @@ class PaymentEcComponent {
11411
11532
  methodData$ = this._methodDataSubject.asObservable();
11412
11533
  loadingInternal = false;
11413
11534
  total_amount = 0;
11535
+ allowAnyPaymentMethod = null;
11536
+ balanceMethodRejected = false;
11537
+ showMethodError = false;
11414
11538
  constructor() { }
11415
11539
  ngOnInit() {
11416
11540
  this._checkoutService.associatedData$.subscribe((data) => {
11417
11541
  const totalItem = data.find(item => item.type == 'total');
11418
11542
  this.total_amount = totalItem?.amount ?? 0;
11419
11543
  });
11544
+ this._cartService.allowAnyPaymentMethod$.subscribe(value => {
11545
+ this.allowAnyPaymentMethod = value;
11546
+ });
11420
11547
  // console.log('PaymentEcComponent initialized with total_amount:', this.total_amount);
11421
11548
  }
11422
11549
  setActive($event) {
@@ -11430,7 +11557,34 @@ class PaymentEcComponent {
11430
11557
  }
11431
11558
  async setMethod(method) {
11432
11559
  this._methodDataSubject.next(null);
11433
- let result = await this._paymentService.putPayment(method.code);
11560
+ this.showMethodError = false;
11561
+ const result = await this._paymentService.putPayment(method.code);
11562
+ const balanceCustomer = result?.balanceCustomer;
11563
+ const totals = result?.totals;
11564
+ this._cartService.updateBalanceAttributes(balanceCustomer, totals?.total);
11565
+ const isBalanceMethod = this.isBalanceInAccount(method.code);
11566
+ const allowAny = balanceCustomer?.allowAnyPaymentMethod;
11567
+ if ((balanceCustomer && allowAny === false && !isBalanceMethod) ||
11568
+ (isBalanceMethod && !balanceCustomer)) {
11569
+ this.handleMethodError('this-payment-method-cannot-be-used', method);
11570
+ return;
11571
+ }
11572
+ if (isBalanceMethod &&
11573
+ balanceCustomer &&
11574
+ totals &&
11575
+ balanceCustomer.allowExceedBalance === false &&
11576
+ balanceCustomer.creditAmount < totals.total) {
11577
+ this._toastService.show('insufficient_credit');
11578
+ this.balanceMethodRejected = true;
11579
+ }
11580
+ else if (isBalanceMethod) {
11581
+ this.balanceMethodRejected = false;
11582
+ }
11583
+ this._methodDataSubject.next(method);
11584
+ }
11585
+ handleMethodError(message, method) {
11586
+ this.showMethodError = true;
11587
+ this._toastService.show(message);
11434
11588
  this._methodDataSubject.next(method);
11435
11589
  }
11436
11590
  //Funciones para chequear el metodo de pago.
@@ -11453,6 +11607,7 @@ class PaymentEcComponent {
11453
11607
  isBankTransfer = (code) => !!code?.toLowerCase().includes('bank_transfer');
11454
11608
  isCatastro = (code) => !!code?.toLowerCase().includes('catastro');
11455
11609
  isBamboo = (code) => !!code?.toLowerCase().includes('bamboo');
11610
+ isBalanceInAccount = (code) => !!code?.toLowerCase().includes('balance_in_account');
11456
11611
  allData() {
11457
11612
  return {
11458
11613
  ...this._paymentService.getUserData().shippingAddress,
@@ -11469,6 +11624,10 @@ class PaymentEcComponent {
11469
11624
  return true;
11470
11625
  };
11471
11626
  verifyValidate = ($event = true) => {
11627
+ if (this.balanceMethodRejected) {
11628
+ this.setLoading(false);
11629
+ return;
11630
+ }
11472
11631
  if ($event === false) {
11473
11632
  this.setLoading(false);
11474
11633
  return;
@@ -11483,7 +11642,7 @@ class PaymentEcComponent {
11483
11642
  this._checkoutService.back();
11484
11643
  };
11485
11644
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PaymentEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
11486
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: PaymentEcComponent, isStandalone: true, selector: "app-payment-ec", ngImport: i0, template: "@if(methods$ | async; as methods){\n<div class=\"container-fluid\">\n\n\t<div class=\"row\">\n\t\t<div class=\"col-12\">\n\t\t\t<div class=\"card \">\n\t\t\t\t<div class=\"card-header text-dark text-center\">\n\t\t\t\t\t<h4>{{ 'select-method' | translate }}</h4>\n\t\t\t\t\t<div class=\"btn-toolbar justify-content-center\" role=\"toolbar\" aria-label=\"Envios toolbar\">\n\t\t\t\t\t\t<div class=\"\" role=\"group\" aria-label=\"Grupo botones envio\">\n\t\t\t\t\t\t\t<div class=\"d-flex align-content-start justify-content-center flex-wrap\">\n\t\t\t\t\t\t\t\t@for (method of methods; track $index; let x = $index) {\n\t\t\t\t\t\t\t\t<button type=\"button\" class=\"btn btn-outline-secondary mx-1 mb-1\"(click)=\"setMethod(method) ; setActive($event)\">\n\t\t\t\t\t\t\t\t\t{{ method.name | translate }}\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"card-body text-center\">\n\t\t\t\t\t@if(methodData$ | async; as method){\n\t\t\t\t\t<div class=\"row justify-content-center\">\n\t\t\t\t\t\t@if(!loadingInternal){\n\t\t\t\t\t\t\t@if(isMP(method.code)){\n\t\t\t\t\t\t\t\t<div class=\"method-container text-dark\">\n\t\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<p id=\"faqs\" class=\"qt px-5 \">{{ method.description }}</p>\n\t\t\t\t\t\t\t\t\t\t\t<p class=\"px-5\">{{ method.instructions }}</p>\n\t\t\t\t\t\t\t\t\t\t<app-mp-redirect-ec (ready)=\"verifyValidate($event)\" \t[method]=\"method\"></app-mp-redirect-ec>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t<!-- <div class=\"method-container text-dark text-left\" *ngIf=\"isMPTarjetaDeCredito(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t<p id=\"faqs\" class=\"qt px-5 \">{{ method.description }}</p>\n\t\t\t\t\t\t\t\t\t\t<p class=\"px-5\">{{ method.instructions }}</p>\n\t\t\t\t\t\t\t\t\t\t<div app-mp-credit-ec (ready)=\"verifyValidate()\" [public_key]=\"getPK(method)\"\n\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\" [total_amount]=\"total_amount\">\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isRedirectRedsys(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t<ng-container\n\t\t\t\t\t\t\t\t\t\t\t*ngIf=\"!method.code.includes('bizum') && !method.code.includes('_out_')\">\n\t\t\t\t\t\t\t\t\t\t\t<app-redsys-redirect-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\">\n\t\t\t\t\t\t\t\t\t\t\t</app-redsys-redirect-ec>\n\t\t\t\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t\t\t\t\t<ng-container\n\t\t\t\t\t\t\t\t\t\t\t*ngIf=\"method.code.includes('bizum') || method.code.includes('_out_')\">\n\t\t\t\t\t\t\t\t\t\t\t<app-redsys-redirect-out-ec (ready)=\"verifyValidate($event)\"\n\t\t\t\t\t\t\t\t\t\t\t\t[method]=\"method\" [user_data]=\"allData()\">\n\t\t\t\t\t\t\t\t\t\t\t</app-redsys-redirect-out-ec>\n\t\t\t\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isRedirectCecaBank(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t<app-ceca-redirect-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\">\n\t\t\t\t\t\t\t\t\t\t</app-ceca-redirect-ec>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isPeyPalExpress(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"container\">\n\t\t\t\t\t\t\t\t\t<div class=\"row justify-content-center\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<app-paypal-express-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\" [total_amount]=\"total_amount\">\n\t\t\t\t\t\t\t\t\t\t\t</app-paypal-express-ec>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isMobbex(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"container\">\n\t\t\t\t\t\t\t\t\t<div class=\"row justify-content-center\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<app-mobbex-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\" [paymentServiceInst]=\"paymentService\"\n\t\t\t\t\t\t\t\t\t\t\t\t[total_amount]=\"total_amount\">\n\t\t\t\t\t\t\t\t\t\t\t</app-mobbex-ec>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isBancard(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"container\">\n\t\t\t\t\t\t\t\t\t<div class=\"row justify-content-center\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<app-bancard-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\" [paymentServiceInst]=\"paymentService\"\n\t\t\t\t\t\t\t\t\t\t\t\t[total_amount]=\"total_amount\">\n\t\t\t\t\t\t\t\t\t\t\t</app-bancard-ec>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>-->\n\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isDecidir(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"container\">\n\t\t\t\t\t\t\t\t\t<div class=\"row justify-content-center\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<app-decidir-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\" [paymentServiceInst]=\"_paymentService\"\n\t\t\t\t\t\t\t\t\t\t\t\t[total_amount]=\"total_amount\">\n\t\t\t\t\t\t\t\t\t\t\t</app-decidir-ec>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div> \n\t\t\t\t\t\t\t@if(isMethodOffline(method.code)){\n\t\t\t\t\t\t\t<div class=\"method-container text-dark\">\n\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t<app-offline-ec \n\t\t\t\t\t\t\t\t\t\t[method]=\"method\" \n\t\t\t\t\t\t\t\t\t\t[verifyValidate]= \"verifyValidate\"\n\t\t\t\t\t\t\t\t\t\t[setLoading] = \"setLoading\" />\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<!--\n\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isCulqi(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"container\">\n\t\t\t\t\t\t\t\t\t<div class=\"row justify-content-center\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<app-culqi-ec [apiKey]=\"getPKCulqi(method)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t\t[amount]=\"total_amount\" [customStyle]=\"true\"\n\t\t\t\t\t\t\t\t\t\t\t\t(ready)=\"verifyValidate()\"></app-culqi-ec>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isCatastro(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"container\">\n\t\t\t\t\t\t\t\t\t<div class=\"row justify-content-center\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<app-bancard-catastro-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\" [paymentServiceInst]=\"paymentService\"\n\t\t\t\t\t\t\t\t\t\t\t\t[total_amount]=\"total_amount\"></app-bancard-catastro-ec>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isBamboo(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"container\">\n\t\t\t\t\t\t\t\t\t<div class=\"row justify-content-center\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<app-bamboo-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\" [paymentServiceInst]=\"paymentService\"\n\t\t\t\t\t\t\t\t\t\t\t\t[total_amount]=\"total_amount\"></app-bamboo-ec>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div> -->\n\t\t\t\t\t\t\t@if(isBankTransfer(method.code)){\n\t\t\t\t\t\t\t\t<div class=\"method-container text-dark\">\n\t\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<app-bank-transfer-ec \n\t\t\t\t\t\t\t\t\t\t\t\t[method]=\"method\" \n\t\t\t\t\t\t\t\t\t\t\t\t[verifyValidate]= \"verifyValidate\"\n\t\t\t\t\t\t\t\t\t\t\t\t[setLoading] = \"setLoading\" />\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t<app-loading-inline-ec></app-loading-inline-ec>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"row d-flex flex-row\">\n\t\t\t\t<div class=\"col-12 d-flex justify-content-between\">\n\t\t\t\t\t<button class=\"btn btn-primary text-white\" (click)=\"goBack()\">{{'back'|translate}}</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n}", styles: [""], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }, { kind: "component", type: LoadingInlineEcComponent, selector: "app-loading-inline-ec", inputs: ["type"] }, { kind: "component", type: MpRedirectEcComponent, selector: "app-mp-redirect-ec", inputs: ["method", "total_amount", "allData"], outputs: ["ready"] }, { kind: "component", type: BankTransferEcComponent, selector: "app-bank-transfer-ec", inputs: ["method", "verifyValidate", "setLoading"] }, { kind: "component", type: OfflineEcComponent, selector: "app-offline-ec", inputs: ["method", "verifyValidate", "setLoading"] }, { kind: "component", type: DecidirEcComponent, selector: "app-decidir-ec", inputs: ["paymentServiceInst", "method", "total_amount", "allData", "user_data"], outputs: ["ready"] }] });
11645
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: PaymentEcComponent, isStandalone: true, selector: "app-payment-ec", ngImport: i0, template: "@if(methods$ | async; as methods){\n<div class=\"container-fluid\">\n\n\t<div class=\"row\">\n\t\t<div class=\"col-12\">\n\t\t\t<div class=\"card \">\n\t\t\t\t<div class=\"card-header text-dark text-center\">\n\t\t\t\t\t<h4>{{ 'select-method' | translate }}</h4>\n\t\t\t\t\t<div class=\"btn-toolbar justify-content-center\" role=\"toolbar\" aria-label=\"Envios toolbar\">\n\t\t\t\t\t\t<div class=\"\" role=\"group\" aria-label=\"Grupo botones envio\">\n\t\t\t\t\t\t\t<div class=\"d-flex align-content-start justify-content-center flex-wrap\">\n\t\t\t\t\t\t\t\t@for (method of methods; track $index; let x = $index) {\n\t\t\t\t\t\t\t\t<button type=\"button\" class=\"btn btn-outline-secondary mx-1 mb-1\" (click)=\"setMethod(method) ; setActive($event)\">\n\t\t\t\t\t\t\t\t\t{{ method.name | translate }}\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"card-body text-center\">\n\t\t\t\t\t@if(methodData$ | async; as method){\n\t\t\t\t\t<div class=\"row justify-content-center\">\n\t\t\t\t\t\t@if(!loadingInternal){\n\t\t\t\t\t\t\t@if(method && !showMethodError){\n\t\t\t\t\t\t\t\t@if(isMP(method.code)){\n\t\t\t\t\t\t\t\t\t<div class=\"method-container text-dark\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t\t<p id=\"faqs\" class=\"qt px-5 \">{{ method.description }}</p>\n\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"px-5\">{{ method.instructions }}</p>\n\t\t\t\t\t\t\t\t\t\t\t<app-mp-redirect-ec (ready)=\"verifyValidate($event)\" \t[method]=\"method\"></app-mp-redirect-ec>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isDecidir(method.code)\">\n\t\t\t\t\t\t\t\t\t<div class=\"container\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"row justify-content-center\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t\t<app-decidir-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\" [paymentServiceInst]=\"_paymentService\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t[total_amount]=\"total_amount\">\n\t\t\t\t\t\t\t\t\t\t\t\t</app-decidir-ec>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div> \n\t\t\t\t\t\t\t\t@if(isMethodOffline(method.code)){\n\t\t\t\t\t\t\t\t<div class=\"method-container text-dark\">\n\t\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<app-offline-ec \n\t\t\t\t\t\t\t\t\t\t\t[method]=\"method\" \n\t\t\t\t\t\t\t\t\t\t\t[verifyValidate]= \"verifyValidate\"\n\t\t\t\t\t\t\t\t\t\t\t[setLoading] = \"setLoading\" />\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t@if(isBankTransfer(method.code)){\n\t\t\t\t\t\t\t\t\t<div class=\"method-container text-dark\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t\t<app-bank-transfer-ec \n\t\t\t\t\t\t\t\t\t\t\t\t\t[method]=\"method\" \n\t\t\t\t\t\t\t\t\t\t\t\t\t[verifyValidate]= \"verifyValidate\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t[setLoading] = \"setLoading\" />\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if(showMethodError){\n\t\t\t\t\t\t\t\t<div class=\"text-danger mt-2 px-3 fw-bold\">\n\t\t\t\t\t\t\t\t\t{{ 'this-payment-method-cannot-be-used' | translate }}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if(isBalanceInAccount(method.code) && !showMethodError){\n\t\t\t\t\t\t\t\t<div class=\"method-container text-dark\">\n\t\t\t\t\t\t\t\t\t<div class=\"row px-0 description-cont\" *ngIf=\"method.description\">\n\t\t\t\t\t\t\t\t\t\t<ng-container *ngFor=\"let line of method.description.split('\\r\\n'); let i = index\">\n\t\t\t\t\t\t\t\t\t\t\t<p [id]=\"'cc-desc-'+i\" [class]=\"'qt px-5 m-0 line-'+i\">{{ line }}</p>\n\t\t\t\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<hr *ngIf=\"method.instructions\">\n\t\t\t\t\t\t\t\t\t<div *ngIf=\"method.instructions\" class=\"row px-0 instructions-cont mb-1\">\n\t\t\t\t\t\t\t\t\t\t<h5 class=\"instructions-title\">{{ ('instructions' | translate) }}</h5>\n\t\t\t\t\t\t\t\t\t\t<ng-container *ngFor=\"let line of method.instructions.split('\\r\\n'); let i = index\">\n\t\t\t\t\t\t\t\t\t\t\t<p [class]=\"'px-5 m-0 instructions-text line-'+i \">{{ line }}</p>\n\t\t\t\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t<ng-container *ngIf=\"!balanceMethodRejected; else showCreditError\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"end-button\">\n\t\t\t\t\t\t\t\t\t\t\t<button class=\"btn comprar\" (click)=\"setLoading() && verifyValidate()\">\n\t\t\t\t\t\t\t\t\t\t\t\t{{ 'pay-with' | translate }} {{ method.name }}\n\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</ng-container>\n\n\t\t\t\t\t\t\t\t\t<ng-template #showCreditError>\n\t\t\t\t\t\t\t\t\t\t<div class=\"text-danger mt-2 px-3 fw-bold\">\n\t\t\t\t\t\t\t\t\t\t\t{{ 'not-enough-credits-to-complete' | translate }}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</ng-template>\n\n\t\t\t\t\t\t\t\t\t<ng-container *ngIf=\"(loading$ | async) as load\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"mt-2\" *ngIf=\"load\">\n\t\t\t\t\t\t\t\t\t\t\t<app-loading-inline-ec></app-loading-inline-ec>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t<app-loading-inline-ec></app-loading-inline-ec>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"row d-flex flex-row\">\n\t\t\t\t<div class=\"col-12 d-flex justify-content-between\">\n\t\t\t\t\t<button class=\"btn btn-primary text-white\" (click)=\"goBack()\">{{'back'|translate}}</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n}\n", styles: [""], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }, { kind: "component", type: LoadingInlineEcComponent, selector: "app-loading-inline-ec", inputs: ["type"] }, { kind: "component", type: MpRedirectEcComponent, selector: "app-mp-redirect-ec", inputs: ["method", "total_amount", "allData"], outputs: ["ready"] }, { kind: "component", type: BankTransferEcComponent, selector: "app-bank-transfer-ec", inputs: ["method", "verifyValidate", "setLoading"] }, { kind: "component", type: OfflineEcComponent, selector: "app-offline-ec", inputs: ["method", "verifyValidate", "setLoading"] }, { kind: "component", type: DecidirEcComponent, selector: "app-decidir-ec", inputs: ["paymentServiceInst", "method", "total_amount", "allData", "user_data"], outputs: ["ready"] }] });
11487
11646
  }
11488
11647
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PaymentEcComponent, decorators: [{
11489
11648
  type: Component,
@@ -11495,7 +11654,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
11495
11654
  BankTransferEcComponent,
11496
11655
  OfflineEcComponent,
11497
11656
  DecidirEcComponent
11498
- ], template: "@if(methods$ | async; as methods){\n<div class=\"container-fluid\">\n\n\t<div class=\"row\">\n\t\t<div class=\"col-12\">\n\t\t\t<div class=\"card \">\n\t\t\t\t<div class=\"card-header text-dark text-center\">\n\t\t\t\t\t<h4>{{ 'select-method' | translate }}</h4>\n\t\t\t\t\t<div class=\"btn-toolbar justify-content-center\" role=\"toolbar\" aria-label=\"Envios toolbar\">\n\t\t\t\t\t\t<div class=\"\" role=\"group\" aria-label=\"Grupo botones envio\">\n\t\t\t\t\t\t\t<div class=\"d-flex align-content-start justify-content-center flex-wrap\">\n\t\t\t\t\t\t\t\t@for (method of methods; track $index; let x = $index) {\n\t\t\t\t\t\t\t\t<button type=\"button\" class=\"btn btn-outline-secondary mx-1 mb-1\"(click)=\"setMethod(method) ; setActive($event)\">\n\t\t\t\t\t\t\t\t\t{{ method.name | translate }}\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"card-body text-center\">\n\t\t\t\t\t@if(methodData$ | async; as method){\n\t\t\t\t\t<div class=\"row justify-content-center\">\n\t\t\t\t\t\t@if(!loadingInternal){\n\t\t\t\t\t\t\t@if(isMP(method.code)){\n\t\t\t\t\t\t\t\t<div class=\"method-container text-dark\">\n\t\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<p id=\"faqs\" class=\"qt px-5 \">{{ method.description }}</p>\n\t\t\t\t\t\t\t\t\t\t\t<p class=\"px-5\">{{ method.instructions }}</p>\n\t\t\t\t\t\t\t\t\t\t<app-mp-redirect-ec (ready)=\"verifyValidate($event)\" \t[method]=\"method\"></app-mp-redirect-ec>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t<!-- <div class=\"method-container text-dark text-left\" *ngIf=\"isMPTarjetaDeCredito(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t<p id=\"faqs\" class=\"qt px-5 \">{{ method.description }}</p>\n\t\t\t\t\t\t\t\t\t\t<p class=\"px-5\">{{ method.instructions }}</p>\n\t\t\t\t\t\t\t\t\t\t<div app-mp-credit-ec (ready)=\"verifyValidate()\" [public_key]=\"getPK(method)\"\n\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\" [total_amount]=\"total_amount\">\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isRedirectRedsys(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t<ng-container\n\t\t\t\t\t\t\t\t\t\t\t*ngIf=\"!method.code.includes('bizum') && !method.code.includes('_out_')\">\n\t\t\t\t\t\t\t\t\t\t\t<app-redsys-redirect-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\">\n\t\t\t\t\t\t\t\t\t\t\t</app-redsys-redirect-ec>\n\t\t\t\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t\t\t\t\t<ng-container\n\t\t\t\t\t\t\t\t\t\t\t*ngIf=\"method.code.includes('bizum') || method.code.includes('_out_')\">\n\t\t\t\t\t\t\t\t\t\t\t<app-redsys-redirect-out-ec (ready)=\"verifyValidate($event)\"\n\t\t\t\t\t\t\t\t\t\t\t\t[method]=\"method\" [user_data]=\"allData()\">\n\t\t\t\t\t\t\t\t\t\t\t</app-redsys-redirect-out-ec>\n\t\t\t\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isRedirectCecaBank(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t<app-ceca-redirect-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\">\n\t\t\t\t\t\t\t\t\t\t</app-ceca-redirect-ec>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isPeyPalExpress(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"container\">\n\t\t\t\t\t\t\t\t\t<div class=\"row justify-content-center\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<app-paypal-express-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\" [total_amount]=\"total_amount\">\n\t\t\t\t\t\t\t\t\t\t\t</app-paypal-express-ec>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isMobbex(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"container\">\n\t\t\t\t\t\t\t\t\t<div class=\"row justify-content-center\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<app-mobbex-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\" [paymentServiceInst]=\"paymentService\"\n\t\t\t\t\t\t\t\t\t\t\t\t[total_amount]=\"total_amount\">\n\t\t\t\t\t\t\t\t\t\t\t</app-mobbex-ec>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isBancard(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"container\">\n\t\t\t\t\t\t\t\t\t<div class=\"row justify-content-center\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<app-bancard-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\" [paymentServiceInst]=\"paymentService\"\n\t\t\t\t\t\t\t\t\t\t\t\t[total_amount]=\"total_amount\">\n\t\t\t\t\t\t\t\t\t\t\t</app-bancard-ec>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>-->\n\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isDecidir(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"container\">\n\t\t\t\t\t\t\t\t\t<div class=\"row justify-content-center\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<app-decidir-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\" [paymentServiceInst]=\"_paymentService\"\n\t\t\t\t\t\t\t\t\t\t\t\t[total_amount]=\"total_amount\">\n\t\t\t\t\t\t\t\t\t\t\t</app-decidir-ec>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div> \n\t\t\t\t\t\t\t@if(isMethodOffline(method.code)){\n\t\t\t\t\t\t\t<div class=\"method-container text-dark\">\n\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t<app-offline-ec \n\t\t\t\t\t\t\t\t\t\t[method]=\"method\" \n\t\t\t\t\t\t\t\t\t\t[verifyValidate]= \"verifyValidate\"\n\t\t\t\t\t\t\t\t\t\t[setLoading] = \"setLoading\" />\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<!--\n\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isCulqi(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"container\">\n\t\t\t\t\t\t\t\t\t<div class=\"row justify-content-center\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<app-culqi-ec [apiKey]=\"getPKCulqi(method)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t\t[amount]=\"total_amount\" [customStyle]=\"true\"\n\t\t\t\t\t\t\t\t\t\t\t\t(ready)=\"verifyValidate()\"></app-culqi-ec>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isCatastro(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"container\">\n\t\t\t\t\t\t\t\t\t<div class=\"row justify-content-center\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<app-bancard-catastro-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\" [paymentServiceInst]=\"paymentService\"\n\t\t\t\t\t\t\t\t\t\t\t\t[total_amount]=\"total_amount\"></app-bancard-catastro-ec>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isBamboo(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"container\">\n\t\t\t\t\t\t\t\t\t<div class=\"row justify-content-center\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<app-bamboo-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\" [paymentServiceInst]=\"paymentService\"\n\t\t\t\t\t\t\t\t\t\t\t\t[total_amount]=\"total_amount\"></app-bamboo-ec>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div> -->\n\t\t\t\t\t\t\t@if(isBankTransfer(method.code)){\n\t\t\t\t\t\t\t\t<div class=\"method-container text-dark\">\n\t\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<app-bank-transfer-ec \n\t\t\t\t\t\t\t\t\t\t\t\t[method]=\"method\" \n\t\t\t\t\t\t\t\t\t\t\t\t[verifyValidate]= \"verifyValidate\"\n\t\t\t\t\t\t\t\t\t\t\t\t[setLoading] = \"setLoading\" />\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t<app-loading-inline-ec></app-loading-inline-ec>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"row d-flex flex-row\">\n\t\t\t\t<div class=\"col-12 d-flex justify-content-between\">\n\t\t\t\t\t<button class=\"btn btn-primary text-white\" (click)=\"goBack()\">{{'back'|translate}}</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n}" }]
11657
+ ], template: "@if(methods$ | async; as methods){\n<div class=\"container-fluid\">\n\n\t<div class=\"row\">\n\t\t<div class=\"col-12\">\n\t\t\t<div class=\"card \">\n\t\t\t\t<div class=\"card-header text-dark text-center\">\n\t\t\t\t\t<h4>{{ 'select-method' | translate }}</h4>\n\t\t\t\t\t<div class=\"btn-toolbar justify-content-center\" role=\"toolbar\" aria-label=\"Envios toolbar\">\n\t\t\t\t\t\t<div class=\"\" role=\"group\" aria-label=\"Grupo botones envio\">\n\t\t\t\t\t\t\t<div class=\"d-flex align-content-start justify-content-center flex-wrap\">\n\t\t\t\t\t\t\t\t@for (method of methods; track $index; let x = $index) {\n\t\t\t\t\t\t\t\t<button type=\"button\" class=\"btn btn-outline-secondary mx-1 mb-1\" (click)=\"setMethod(method) ; setActive($event)\">\n\t\t\t\t\t\t\t\t\t{{ method.name | translate }}\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"card-body text-center\">\n\t\t\t\t\t@if(methodData$ | async; as method){\n\t\t\t\t\t<div class=\"row justify-content-center\">\n\t\t\t\t\t\t@if(!loadingInternal){\n\t\t\t\t\t\t\t@if(method && !showMethodError){\n\t\t\t\t\t\t\t\t@if(isMP(method.code)){\n\t\t\t\t\t\t\t\t\t<div class=\"method-container text-dark\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t\t<p id=\"faqs\" class=\"qt px-5 \">{{ method.description }}</p>\n\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"px-5\">{{ method.instructions }}</p>\n\t\t\t\t\t\t\t\t\t\t\t<app-mp-redirect-ec (ready)=\"verifyValidate($event)\" \t[method]=\"method\"></app-mp-redirect-ec>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isDecidir(method.code)\">\n\t\t\t\t\t\t\t\t\t<div class=\"container\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"row justify-content-center\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t\t<app-decidir-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\" [paymentServiceInst]=\"_paymentService\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t[total_amount]=\"total_amount\">\n\t\t\t\t\t\t\t\t\t\t\t\t</app-decidir-ec>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div> \n\t\t\t\t\t\t\t\t@if(isMethodOffline(method.code)){\n\t\t\t\t\t\t\t\t<div class=\"method-container text-dark\">\n\t\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<app-offline-ec \n\t\t\t\t\t\t\t\t\t\t\t[method]=\"method\" \n\t\t\t\t\t\t\t\t\t\t\t[verifyValidate]= \"verifyValidate\"\n\t\t\t\t\t\t\t\t\t\t\t[setLoading] = \"setLoading\" />\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t@if(isBankTransfer(method.code)){\n\t\t\t\t\t\t\t\t\t<div class=\"method-container text-dark\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t\t<app-bank-transfer-ec \n\t\t\t\t\t\t\t\t\t\t\t\t\t[method]=\"method\" \n\t\t\t\t\t\t\t\t\t\t\t\t\t[verifyValidate]= \"verifyValidate\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t[setLoading] = \"setLoading\" />\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if(showMethodError){\n\t\t\t\t\t\t\t\t<div class=\"text-danger mt-2 px-3 fw-bold\">\n\t\t\t\t\t\t\t\t\t{{ 'this-payment-method-cannot-be-used' | translate }}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if(isBalanceInAccount(method.code) && !showMethodError){\n\t\t\t\t\t\t\t\t<div class=\"method-container text-dark\">\n\t\t\t\t\t\t\t\t\t<div class=\"row px-0 description-cont\" *ngIf=\"method.description\">\n\t\t\t\t\t\t\t\t\t\t<ng-container *ngFor=\"let line of method.description.split('\\r\\n'); let i = index\">\n\t\t\t\t\t\t\t\t\t\t\t<p [id]=\"'cc-desc-'+i\" [class]=\"'qt px-5 m-0 line-'+i\">{{ line }}</p>\n\t\t\t\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<hr *ngIf=\"method.instructions\">\n\t\t\t\t\t\t\t\t\t<div *ngIf=\"method.instructions\" class=\"row px-0 instructions-cont mb-1\">\n\t\t\t\t\t\t\t\t\t\t<h5 class=\"instructions-title\">{{ ('instructions' | translate) }}</h5>\n\t\t\t\t\t\t\t\t\t\t<ng-container *ngFor=\"let line of method.instructions.split('\\r\\n'); let i = index\">\n\t\t\t\t\t\t\t\t\t\t\t<p [class]=\"'px-5 m-0 instructions-text line-'+i \">{{ line }}</p>\n\t\t\t\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t<ng-container *ngIf=\"!balanceMethodRejected; else showCreditError\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"end-button\">\n\t\t\t\t\t\t\t\t\t\t\t<button class=\"btn comprar\" (click)=\"setLoading() && verifyValidate()\">\n\t\t\t\t\t\t\t\t\t\t\t\t{{ 'pay-with' | translate }} {{ method.name }}\n\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</ng-container>\n\n\t\t\t\t\t\t\t\t\t<ng-template #showCreditError>\n\t\t\t\t\t\t\t\t\t\t<div class=\"text-danger mt-2 px-3 fw-bold\">\n\t\t\t\t\t\t\t\t\t\t\t{{ 'not-enough-credits-to-complete' | translate }}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</ng-template>\n\n\t\t\t\t\t\t\t\t\t<ng-container *ngIf=\"(loading$ | async) as load\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"mt-2\" *ngIf=\"load\">\n\t\t\t\t\t\t\t\t\t\t\t<app-loading-inline-ec></app-loading-inline-ec>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t<app-loading-inline-ec></app-loading-inline-ec>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"row d-flex flex-row\">\n\t\t\t\t<div class=\"col-12 d-flex justify-content-between\">\n\t\t\t\t\t<button class=\"btn btn-primary text-white\" (click)=\"goBack()\">{{'back'|translate}}</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n}\n" }]
11499
11658
  }], ctorParameters: () => [] });
11500
11659
 
11501
11660
  class StepContainerEcComponent {
@@ -11529,6 +11688,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
11529
11688
 
11530
11689
  class DetailCheckoutBlockEcComponent {
11531
11690
  _checkoutService = inject(CheckoutService);
11691
+ priceVisibility = inject(PriceVisibilityService);
11532
11692
  data$ = this._checkoutService.associatedData$;
11533
11693
  data = null;
11534
11694
  getIcon = (data_type) => {
@@ -11558,16 +11718,17 @@ class DetailCheckoutBlockEcComponent {
11558
11718
  }
11559
11719
  }
11560
11720
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DetailCheckoutBlockEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
11561
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: DetailCheckoutBlockEcComponent, isStandalone: true, selector: "app-detail-checkout-block-ec", ngImport: i0, template: "@if(data$ | async; as datos){\n <div id=\"appDetailCheckoutBlockEc\" class=\"d-flex flex-row w-100 justify-content-center flex-wrap\">\n @for(item of data; track $index; let i = $index){\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.type)\"></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 }\n </div>\n}", styles: [""], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }, { kind: "pipe", type: EcCurrencySymbolPipe, name: "ecCurrencySymbol" }, { kind: "pipe", type: AsyncPipe, name: "async" }] });
11721
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: DetailCheckoutBlockEcComponent, isStandalone: true, selector: "app-detail-checkout-block-ec", ngImport: i0, template: "@if (priceVisibility.canShowPrices()) {\n@if(data$ | async; as datos){\n <div id=\"appDetailCheckoutBlockEc\" class=\"d-flex flex-row w-100 justify-content-center flex-wrap\">\n @for(item of data; track $index; let i = $index){\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.type)\"></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 }\n </div>\n}\n}", styles: [""], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }, { kind: "pipe", type: EcCurrencySymbolPipe, name: "ecCurrencySymbol" }, { kind: "pipe", type: AsyncPipe, name: "async" }] });
11562
11722
  }
11563
11723
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DetailCheckoutBlockEcComponent, decorators: [{
11564
11724
  type: Component,
11565
- args: [{ selector: 'app-detail-checkout-block-ec', standalone: true, imports: [TranslateModule, EcCurrencySymbolPipe, AsyncPipe], template: "@if(data$ | async; as datos){\n <div id=\"appDetailCheckoutBlockEc\" class=\"d-flex flex-row w-100 justify-content-center flex-wrap\">\n @for(item of data; track $index; let i = $index){\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.type)\"></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 }\n </div>\n}" }]
11725
+ args: [{ selector: 'app-detail-checkout-block-ec', standalone: true, imports: [TranslateModule, EcCurrencySymbolPipe, AsyncPipe], template: "@if (priceVisibility.canShowPrices()) {\n@if(data$ | async; as datos){\n <div id=\"appDetailCheckoutBlockEc\" class=\"d-flex flex-row w-100 justify-content-center flex-wrap\">\n @for(item of data; track $index; let i = $index){\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.type)\"></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 }\n </div>\n}\n}" }]
11566
11726
  }], ctorParameters: () => [] });
11567
11727
 
11568
11728
  class CheckoutEcComponent {
11569
11729
  _channelService = inject(ChannelService);
11570
11730
  _checkoutService = inject(CheckoutService);
11731
+ _router = inject(Router);
11571
11732
  ADDRESS = 'address';
11572
11733
  SHIPMENT = 'shipment';
11573
11734
  PAYMENT = 'payment';
@@ -11578,11 +11739,16 @@ class CheckoutEcComponent {
11578
11739
  //public steps: Step[] = [];
11579
11740
  subCan;
11580
11741
  canCheckout = false;
11742
+ hidePrices = false;
11581
11743
  constructor() {
11582
11744
  //console.log("constructo.....");
11583
11745
  this._channelService.channel$.subscribe((res) => {
11584
11746
  //console.log("construct")
11585
11747
  this.channel = res;
11748
+ this.hidePrices = !!res?.hidePrices;
11749
+ if (this.hidePrices) {
11750
+ this._router.navigate(['/']);
11751
+ }
11586
11752
  //this.initializeSteps();
11587
11753
  });
11588
11754
  }
@@ -11652,22 +11818,25 @@ class SuccessEcComponent {
11652
11818
  * @returns el bloque si lo encontro.
11653
11819
  */
11654
11820
  containsBlock(codeBlock) { return this.blocks.find((block) => block.code == codeBlock); }
11821
+ isBalanceInAccount = (code) => code && code.toLocaleLowerCase().includes('balance_in_account');
11655
11822
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SuccessEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
11656
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: SuccessEcComponent, isStandalone: true, selector: "app-order-success-ec", ngImport: i0, template: "<div id=\"container \" class=\"flex-center generalContainer container-xl py-5\">\n\t@if(payments && payments[0].method.code){\n\t<div class=\"Main card my-2\">\n\t\t@if(this.blocks && this.blocks.length > 0){ \n\t\t\t@if(containsBlock(this.payments[0].method.code); as bloque) {\n\t\t\t\t<div class=\"wrap my-4 card-body\" [id]=\"bloque.code\">\n\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t<div class=\"col-md-12 col-12\">\n\t\t\t\t\t\t\t<h5 [class]=\"bloque.code+'-title'\">{{ (bloque?.translations[locale]?.name ?\n\t\t\t\t\t\t\t\tbloque.translations[locale].name :\n\t\t\t\t\t\t\t\t'thanks-for-buying') | translate\n\t\t\t\t\t\t\t\t| uppercase }}</h5>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t<div class=\"col-md-12 col-12 text-start\">\n\t\t\t\t\t\t\t<app-blocks-ec [section]=\"'info_metodo_pago'\" [blockFilters]=\"payments[0].method.code\">\n\t\t\t\t\t\t\t</app-blocks-ec>\n\t\t\t\t\t\t\t<div class=\"d-flex flex-column details\">\n\t\t\t\t\t\t\t\t<p class=\"card-text\">{{ ('number' | translate) + ': ' + params.external_reference }}</p>\n\t\t\t\t\t\t\t\t<p class=\"card-text\">{{((params.payment_status || 'pending') | translate)}}</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t}@else {\n\t\t\t\t<ng-container *ngTemplateOutlet=\"notInfoToMethodTemplate ? notInfoToMethodTemplate : notInfoToMethod; context: { $implicit: params }\"></ng-container>\n\t\t\t}\n\t\t} @else{\n\t\t\t<ng-container *ngTemplateOutlet=\"notInfoToMethodTemplate ? notInfoToMethodTemplate : notInfoToMethod; context: { $implicit: params }\"></ng-container>\n\t}\n\t</div>\n\t} @else {\n\t\t<app-loading-full-ec></app-loading-full-ec>\t\n\t}\n</div>\n\n<ng-template #notInfoToMethod let-params>\n\n\t<div class=\"wrap my-4 card-body\">\n\t\t<div class=\"row\">\n\t\t\t<div class=\"col-md-12 col-12\">\n\t\t\t\t<h5 class=\"card-title titpage center-block text-center\">\n\t\t\t\t\t{{ 'thanks-for-buying' | translate | uppercase }}\n\t\t\t\t</h5>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"row\">\n\t\t\t<div class=\"col-md-12 col-12 text-center py-3\">\n\t\t\t\t<h4 class=\"thanks-details\">{{ 'thanks-details' | translate }}</h4>\n\t\t\t\t<h5 class=\"number\">{{ ('number' | translate) + ': ' + params.external_reference }}</h5>\n\t\t\t\t<h5 class=\"pending\">{{ ((params.payment_status || 'pending') | translate) }}</h5>\n\t\t\t\t<!-- <h5 *ngIf=\"!from_mp\">{{ ('will_contact' | translate) }}</h5> -->\n\n\t\t\t\t<!-- <a routerLink=\"/collection\"><button class=\"comprar\">{{ 'continue-shopping' | translate }}</button></a> -->\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</ng-template>", styles: [""], dependencies: [{ kind: "component", type: BlocksEcComponent, selector: "app-blocks-ec", inputs: ["templates", "show_loading", "section", "blockFilters"] }, { kind: "component", type: LoadingFullEcComponent, selector: "app-loading-full-ec" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }, { kind: "pipe", type: UpperCasePipe, name: "uppercase" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
11823
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: SuccessEcComponent, isStandalone: true, selector: "app-order-success-ec", ngImport: i0, template: "<div id=\"container \" class=\"flex-center generalContainer container-xl py-5\">\n\t@if(payments && payments[0].method.code){\n\t<div class=\"Main card my-2\">\n\t\t@if(this.blocks && this.blocks.length > 0){ \n\t\t\t@if(containsBlock(this.payments[0].method.code); as bloque) {\n\t\t\t\t<div class=\"wrap my-4 card-body\" [id]=\"bloque.code\">\n\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t<div class=\"col-md-12 col-12\">\n\t\t\t\t\t\t\t<h5 [class]=\"bloque.code+'-title'\">{{ (bloque?.translations[locale]?.name ?\n\t\t\t\t\t\t\t\tbloque.translations[locale].name :\n\t\t\t\t\t\t\t\t'thanks-for-buying') | translate\n\t\t\t\t\t\t\t\t| uppercase }}</h5>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t<div class=\"col-md-12 col-12 text-start\">\n\t\t\t\t\t\t\t\t\t<app-blocks-ec [section]=\"'info_metodo_pago'\" [blockFilters]=\"payments[0].method.code\">\n\t\t\t\t\t\t\t\t\t</app-blocks-ec>\n\t\t\t\t\t\t\t\t\t<div class=\"d-flex flex-column details\">\n\t\t\t\t\t\t\t\t\t\t<p class=\"card-text\">{{ ('number' | translate) + ': ' + params.external_reference }}</p>\n\t\t\t\t\t\t\t\t\t\t<p class=\"card-text\">\n\t\t\t\t\t\t\t\t\t\t\t{{ isBalanceInAccount(payments[0].method.code)\n\t\t\t\t\t\t\t\t\t\t\t\t? ('balance-in-account-message' | translate)\n\t\t\t\t\t\t\t\t\t\t\t\t: ((params.payment_status || 'pending') | translate) }}\n\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}@else {\n\t\t\t\t<ng-container *ngTemplateOutlet=\"notInfoToMethodTemplate ? notInfoToMethodTemplate : notInfoToMethod; context: { $implicit: params }\"></ng-container>\n\t\t\t}\n\t\t} @else{\n\t\t\t<ng-container *ngTemplateOutlet=\"notInfoToMethodTemplate ? notInfoToMethodTemplate : notInfoToMethod; context: { $implicit: params }\"></ng-container>\n\t}\n\t</div>\n\t} @else {\n\t\t<app-loading-full-ec></app-loading-full-ec>\t\n\t}\n</div>\n\n<ng-template #notInfoToMethod let-params>\n\n\t<div class=\"wrap my-4 card-body\">\n\t\t<div class=\"row\">\n\t\t\t<div class=\"col-md-12 col-12\">\n\t\t\t\t<h5 class=\"card-title titpage center-block text-center\">\n\t\t\t\t\t{{ 'thanks-for-buying' | translate | uppercase }}\n\t\t\t\t</h5>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"row\">\n\t\t\t<div class=\"col-md-12 col-12 text-center py-3\">\n\t\t\t\t<h4 class=\"thanks-details\">{{ 'thanks-details' | translate }}</h4>\n\t\t\t\t<h5 class=\"number\">{{ ('number' | translate) + ': ' + params.external_reference }}</h5>\n\t\t\t\t<h5 class=\"pending\">\n\t\t\t\t\t{{ payments && payments[0]?.method?.code && isBalanceInAccount(payments[0].method.code)\n\t\t\t\t\t\t? ('balance-in-account-message' | translate)\n\t\t\t\t\t\t: ((params.payment_status || 'pending') | translate) }}\n\t\t\t\t</h5>\n\t\t\t\t<!-- <h5 *ngIf=\"!from_mp\">{{ ('will_contact' | translate) }}</h5> -->\n\n\t\t\t\t<!-- <a routerLink=\"/collection\"><button class=\"comprar\">{{ 'continue-shopping' | translate }}</button></a> -->\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</ng-template>", styles: [""], dependencies: [{ kind: "component", type: BlocksEcComponent, selector: "app-blocks-ec", inputs: ["templates", "show_loading", "section", "blockFilters"] }, { kind: "component", type: LoadingFullEcComponent, selector: "app-loading-full-ec" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }, { kind: "pipe", type: UpperCasePipe, name: "uppercase" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
11657
11824
  }
11658
11825
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SuccessEcComponent, decorators: [{
11659
11826
  type: Component,
11660
- args: [{ selector: 'app-order-success-ec', standalone: true, imports: [BlocksEcComponent, LoadingFullEcComponent, TranslateModule, UpperCasePipe, CommonModule], template: "<div id=\"container \" class=\"flex-center generalContainer container-xl py-5\">\n\t@if(payments && payments[0].method.code){\n\t<div class=\"Main card my-2\">\n\t\t@if(this.blocks && this.blocks.length > 0){ \n\t\t\t@if(containsBlock(this.payments[0].method.code); as bloque) {\n\t\t\t\t<div class=\"wrap my-4 card-body\" [id]=\"bloque.code\">\n\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t<div class=\"col-md-12 col-12\">\n\t\t\t\t\t\t\t<h5 [class]=\"bloque.code+'-title'\">{{ (bloque?.translations[locale]?.name ?\n\t\t\t\t\t\t\t\tbloque.translations[locale].name :\n\t\t\t\t\t\t\t\t'thanks-for-buying') | translate\n\t\t\t\t\t\t\t\t| uppercase }}</h5>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t<div class=\"col-md-12 col-12 text-start\">\n\t\t\t\t\t\t\t<app-blocks-ec [section]=\"'info_metodo_pago'\" [blockFilters]=\"payments[0].method.code\">\n\t\t\t\t\t\t\t</app-blocks-ec>\n\t\t\t\t\t\t\t<div class=\"d-flex flex-column details\">\n\t\t\t\t\t\t\t\t<p class=\"card-text\">{{ ('number' | translate) + ': ' + params.external_reference }}</p>\n\t\t\t\t\t\t\t\t<p class=\"card-text\">{{((params.payment_status || 'pending') | translate)}}</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t}@else {\n\t\t\t\t<ng-container *ngTemplateOutlet=\"notInfoToMethodTemplate ? notInfoToMethodTemplate : notInfoToMethod; context: { $implicit: params }\"></ng-container>\n\t\t\t}\n\t\t} @else{\n\t\t\t<ng-container *ngTemplateOutlet=\"notInfoToMethodTemplate ? notInfoToMethodTemplate : notInfoToMethod; context: { $implicit: params }\"></ng-container>\n\t}\n\t</div>\n\t} @else {\n\t\t<app-loading-full-ec></app-loading-full-ec>\t\n\t}\n</div>\n\n<ng-template #notInfoToMethod let-params>\n\n\t<div class=\"wrap my-4 card-body\">\n\t\t<div class=\"row\">\n\t\t\t<div class=\"col-md-12 col-12\">\n\t\t\t\t<h5 class=\"card-title titpage center-block text-center\">\n\t\t\t\t\t{{ 'thanks-for-buying' | translate | uppercase }}\n\t\t\t\t</h5>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"row\">\n\t\t\t<div class=\"col-md-12 col-12 text-center py-3\">\n\t\t\t\t<h4 class=\"thanks-details\">{{ 'thanks-details' | translate }}</h4>\n\t\t\t\t<h5 class=\"number\">{{ ('number' | translate) + ': ' + params.external_reference }}</h5>\n\t\t\t\t<h5 class=\"pending\">{{ ((params.payment_status || 'pending') | translate) }}</h5>\n\t\t\t\t<!-- <h5 *ngIf=\"!from_mp\">{{ ('will_contact' | translate) }}</h5> -->\n\n\t\t\t\t<!-- <a routerLink=\"/collection\"><button class=\"comprar\">{{ 'continue-shopping' | translate }}</button></a> -->\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</ng-template>" }]
11827
+ args: [{ selector: 'app-order-success-ec', standalone: true, imports: [BlocksEcComponent, LoadingFullEcComponent, TranslateModule, UpperCasePipe, CommonModule], template: "<div id=\"container \" class=\"flex-center generalContainer container-xl py-5\">\n\t@if(payments && payments[0].method.code){\n\t<div class=\"Main card my-2\">\n\t\t@if(this.blocks && this.blocks.length > 0){ \n\t\t\t@if(containsBlock(this.payments[0].method.code); as bloque) {\n\t\t\t\t<div class=\"wrap my-4 card-body\" [id]=\"bloque.code\">\n\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t<div class=\"col-md-12 col-12\">\n\t\t\t\t\t\t\t<h5 [class]=\"bloque.code+'-title'\">{{ (bloque?.translations[locale]?.name ?\n\t\t\t\t\t\t\t\tbloque.translations[locale].name :\n\t\t\t\t\t\t\t\t'thanks-for-buying') | translate\n\t\t\t\t\t\t\t\t| uppercase }}</h5>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t<div class=\"col-md-12 col-12 text-start\">\n\t\t\t\t\t\t\t\t\t<app-blocks-ec [section]=\"'info_metodo_pago'\" [blockFilters]=\"payments[0].method.code\">\n\t\t\t\t\t\t\t\t\t</app-blocks-ec>\n\t\t\t\t\t\t\t\t\t<div class=\"d-flex flex-column details\">\n\t\t\t\t\t\t\t\t\t\t<p class=\"card-text\">{{ ('number' | translate) + ': ' + params.external_reference }}</p>\n\t\t\t\t\t\t\t\t\t\t<p class=\"card-text\">\n\t\t\t\t\t\t\t\t\t\t\t{{ isBalanceInAccount(payments[0].method.code)\n\t\t\t\t\t\t\t\t\t\t\t\t? ('balance-in-account-message' | translate)\n\t\t\t\t\t\t\t\t\t\t\t\t: ((params.payment_status || 'pending') | translate) }}\n\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}@else {\n\t\t\t\t<ng-container *ngTemplateOutlet=\"notInfoToMethodTemplate ? notInfoToMethodTemplate : notInfoToMethod; context: { $implicit: params }\"></ng-container>\n\t\t\t}\n\t\t} @else{\n\t\t\t<ng-container *ngTemplateOutlet=\"notInfoToMethodTemplate ? notInfoToMethodTemplate : notInfoToMethod; context: { $implicit: params }\"></ng-container>\n\t}\n\t</div>\n\t} @else {\n\t\t<app-loading-full-ec></app-loading-full-ec>\t\n\t}\n</div>\n\n<ng-template #notInfoToMethod let-params>\n\n\t<div class=\"wrap my-4 card-body\">\n\t\t<div class=\"row\">\n\t\t\t<div class=\"col-md-12 col-12\">\n\t\t\t\t<h5 class=\"card-title titpage center-block text-center\">\n\t\t\t\t\t{{ 'thanks-for-buying' | translate | uppercase }}\n\t\t\t\t</h5>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"row\">\n\t\t\t<div class=\"col-md-12 col-12 text-center py-3\">\n\t\t\t\t<h4 class=\"thanks-details\">{{ 'thanks-details' | translate }}</h4>\n\t\t\t\t<h5 class=\"number\">{{ ('number' | translate) + ': ' + params.external_reference }}</h5>\n\t\t\t\t<h5 class=\"pending\">\n\t\t\t\t\t{{ payments && payments[0]?.method?.code && isBalanceInAccount(payments[0].method.code)\n\t\t\t\t\t\t? ('balance-in-account-message' | translate)\n\t\t\t\t\t\t: ((params.payment_status || 'pending') | translate) }}\n\t\t\t\t</h5>\n\t\t\t\t<!-- <h5 *ngIf=\"!from_mp\">{{ ('will_contact' | translate) }}</h5> -->\n\n\t\t\t\t<!-- <a routerLink=\"/collection\"><button class=\"comprar\">{{ 'continue-shopping' | translate }}</button></a> -->\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</ng-template>" }]
11661
11828
  }], ctorParameters: () => [] });
11662
11829
 
11663
11830
  class OrdersListEcComponent {
11664
11831
  _ordersService = inject(OrdersService);
11665
11832
  _router = inject(Router);
11833
+ _cartService = inject(CartService);
11834
+ priceVisibility = inject(PriceVisibilityService);
11666
11835
  loading = false;
11667
11836
  orders = [];
11668
11837
  error = "";
11669
11838
  sortValue;
11670
- showPrice = false;
11839
+ showPrice = true;
11671
11840
  creditAmountConfigured = false;
11672
11841
  /**
11673
11842
  * @description name -> nombre de clave de valuesToSort; asc -> true: ascendente, false: descendente
@@ -11697,6 +11866,9 @@ class OrdersListEcComponent {
11697
11866
  this.error = 'orders-error';
11698
11867
  }
11699
11868
  });
11869
+ this._cartService.creditAmount$.subscribe(amount => {
11870
+ this.creditAmountConfigured = amount !== null;
11871
+ });
11700
11872
  }
11701
11873
  sortedByNewest(orders) {
11702
11874
  return orders && orders.length && orders.sort((anOrder, otherOrder) => anOrder.number > otherOrder.number ? -1 : 1);
@@ -11792,11 +11964,11 @@ class OrdersListEcComponent {
11792
11964
  this._router.navigateByUrl((`account/orders/${order.number}`));
11793
11965
  }
11794
11966
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OrdersListEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
11795
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: OrdersListEcComponent, isStandalone: true, selector: "app-orders-ec", ngImport: i0, template: "<div class=\"container-fluid\" id=\"ordersEcComponent\">\n @if(!loading){\n <section id=\"orders\" class=\"w-100\">\n @if(orders && orders.length){\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 @for(order of orders; track $index){\n <div class=\"row item border-bottom py-2\">\n <div class=\"col-lg-2 col-12\">\n <h5 class=\"fw-bold\">\n {{ order.number }}\n </h5>\n </div>\n <div class=\"col-lg-2 col-12\">\n @if(order.payments && order.payments.length > 0){\n <p class=\"price\">\n {{ order.payments[0].state | translate | titlecase }}\n </p>\n }\n </div>\n <div class=\"col-lg-2 col-12\">\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 @if(order.tracking){\n <a [href]=\"order.tracking\"\n class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver seguimiento</a>\n }\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 d-flex\">\n @if(creditAmountConfigured ? showPrice : true){\n <h5 class=\"fw-bold text-nowrap\">\n {{ (order.totals.total) | ecCurrencySymbol }}\n </h5>\n }\n <!-- <button class=\"btn px-0 w-100 btdetalle\" (click)=\"goToOrder(order)\">{{\n 'see-order' | translate }}</button> -->\n <button class=\"btn px-0 w-100 btdetalle\" (click)=\"goToOrder(order)\">\n <i class=\"bi bi-box-arrow-in-right\"></i></button>\n </div>\n </div>\n }\n }@else {\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 }\n </section>\n }@else {\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 }\n</div>\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", styles: [""], dependencies: [{ kind: "component", type: LoadingFullEcComponent, selector: "app-loading-full-ec" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }, { kind: "pipe", type: TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: EcCurrencySymbolPipe, name: "ecCurrencySymbol" }] });
11967
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: OrdersListEcComponent, isStandalone: true, selector: "app-orders-ec", ngImport: i0, template: "<div class=\"container-fluid\" id=\"ordersEcComponent\">\n @if(!loading){\n <section id=\"orders\" class=\"w-100\">\n @if(!priceVisibility.hidePrices()){\n @if(orders && orders.length){\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 @for(order of orders; track $index){\n <div class=\"row item border-bottom py-2\">\n <div class=\"col-lg-2 col-12\">\n <h5 class=\"fw-bold\">\n {{ order.number }}\n </h5>\n </div>\n <div class=\"col-lg-2 col-12\">\n @if(order.payments && order.payments.length > 0){\n <p class=\"price\">\n {{ order.payments[0].state | translate | titlecase }}\n </p>\n }\n </div>\n <div class=\"col-lg-2 col-12\">\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 @if(order.tracking){\n <a [href]=\"order.tracking\"\n class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver seguimiento</a>\n }\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 d-flex\">\n @if(priceVisibility.canShowPrices()){\n <h5 class=\"fw-bold text-nowrap\">\n {{ (order.totals.total) | ecCurrencySymbol }}\n </h5>\n }\n <!-- <button class=\"btn px-0 w-100 btdetalle\" (click)=\"goToOrder(order)\">{{\n 'see-order' | translate }}</button> -->\n <button class=\"btn px-0 w-100 btdetalle\" (click)=\"goToOrder(order)\">\n <i class=\"bi bi-box-arrow-in-right\"></i></button>\n </div>\n </div>\n }\n }@else {\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 }\n }\n </section>\n }@else {\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 }\n</div>\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", styles: [""], dependencies: [{ kind: "component", type: LoadingFullEcComponent, selector: "app-loading-full-ec" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }, { kind: "pipe", type: TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: EcCurrencySymbolPipe, name: "ecCurrencySymbol" }] });
11796
11968
  }
11797
11969
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OrdersListEcComponent, decorators: [{
11798
11970
  type: Component,
11799
- args: [{ selector: 'app-orders-ec', standalone: true, imports: [LoadingFullEcComponent, TranslateModule, TitleCasePipe, EcCurrencySymbolPipe], template: "<div class=\"container-fluid\" id=\"ordersEcComponent\">\n @if(!loading){\n <section id=\"orders\" class=\"w-100\">\n @if(orders && orders.length){\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 @for(order of orders; track $index){\n <div class=\"row item border-bottom py-2\">\n <div class=\"col-lg-2 col-12\">\n <h5 class=\"fw-bold\">\n {{ order.number }}\n </h5>\n </div>\n <div class=\"col-lg-2 col-12\">\n @if(order.payments && order.payments.length > 0){\n <p class=\"price\">\n {{ order.payments[0].state | translate | titlecase }}\n </p>\n }\n </div>\n <div class=\"col-lg-2 col-12\">\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 @if(order.tracking){\n <a [href]=\"order.tracking\"\n class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver seguimiento</a>\n }\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 d-flex\">\n @if(creditAmountConfigured ? showPrice : true){\n <h5 class=\"fw-bold text-nowrap\">\n {{ (order.totals.total) | ecCurrencySymbol }}\n </h5>\n }\n <!-- <button class=\"btn px-0 w-100 btdetalle\" (click)=\"goToOrder(order)\">{{\n 'see-order' | translate }}</button> -->\n <button class=\"btn px-0 w-100 btdetalle\" (click)=\"goToOrder(order)\">\n <i class=\"bi bi-box-arrow-in-right\"></i></button>\n </div>\n </div>\n }\n }@else {\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 }\n </section>\n }@else {\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 }\n</div>\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" }]
11971
+ args: [{ selector: 'app-orders-ec', standalone: true, imports: [LoadingFullEcComponent, TranslateModule, TitleCasePipe, EcCurrencySymbolPipe], template: "<div class=\"container-fluid\" id=\"ordersEcComponent\">\n @if(!loading){\n <section id=\"orders\" class=\"w-100\">\n @if(!priceVisibility.hidePrices()){\n @if(orders && orders.length){\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 @for(order of orders; track $index){\n <div class=\"row item border-bottom py-2\">\n <div class=\"col-lg-2 col-12\">\n <h5 class=\"fw-bold\">\n {{ order.number }}\n </h5>\n </div>\n <div class=\"col-lg-2 col-12\">\n @if(order.payments && order.payments.length > 0){\n <p class=\"price\">\n {{ order.payments[0].state | translate | titlecase }}\n </p>\n }\n </div>\n <div class=\"col-lg-2 col-12\">\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 @if(order.tracking){\n <a [href]=\"order.tracking\"\n class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver seguimiento</a>\n }\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 d-flex\">\n @if(priceVisibility.canShowPrices()){\n <h5 class=\"fw-bold text-nowrap\">\n {{ (order.totals.total) | ecCurrencySymbol }}\n </h5>\n }\n <!-- <button class=\"btn px-0 w-100 btdetalle\" (click)=\"goToOrder(order)\">{{\n 'see-order' | translate }}</button> -->\n <button class=\"btn px-0 w-100 btdetalle\" (click)=\"goToOrder(order)\">\n <i class=\"bi bi-box-arrow-in-right\"></i></button>\n </div>\n </div>\n }\n }@else {\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 }\n }\n </section>\n }@else {\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 }\n</div>\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" }]
11800
11972
  }] });
11801
11973
 
11802
11974
  class AccountEcComponent {
@@ -11824,11 +11996,10 @@ class OrderEcComponent {
11824
11996
  _cartService = inject(CartService);
11825
11997
  _channelConfigService = inject(ChannelService);
11826
11998
  _activedRoute = inject(ActivatedRoute);
11999
+ priceVisibility = inject(PriceVisibilityService);
11827
12000
  order$ = this._ordersService.selectedOrder$;
11828
12001
  allowRepeatOrders = false;
11829
12002
  loading = false;
11830
- creditAccountShowPrices = null;
11831
- hidePrices = false;
11832
12003
  hideDiscounts = false;
11833
12004
  hideTaxes = false;
11834
12005
  channelConfig = this._ordersService.channelConfig;
@@ -11853,13 +12024,9 @@ class OrderEcComponent {
11853
12024
  else {
11854
12025
  this.allowRepeatOrders = false;
11855
12026
  }
11856
- this.hidePrices = config?.hidePrices ?? false;
11857
12027
  this.hideDiscounts = config?.hideDiscounts ?? false;
11858
12028
  this.hideTaxes = config?.hideTaxes ?? false;
11859
12029
  });
11860
- this._cartService.showPrice$.subscribe((showPrice) => {
11861
- this.creditAccountShowPrices = showPrice;
11862
- });
11863
12030
  }
11864
12031
  getUrlBase() {
11865
12032
  return this._consts.getUrlBase();
@@ -11877,7 +12044,7 @@ class OrderEcComponent {
11877
12044
  }
11878
12045
  mediaUrl = () => this._constants.mediaUrl();
11879
12046
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OrderEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
11880
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: OrderEcComponent, isStandalone: true, selector: "app-order-ec", ngImport: i0, template: "<main class=\"py-5\" id=\"orderEcComponent\">\n <div class=\"container\">\n @if(order$ | async; as order){\n <div class=\"wrap\">\n @if(order){\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 @if(order?.invoice){\n <div class=\"col-sm col-12 font-brandon\">\n <a target=\"_blank\" [href]=\"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 }\n <a (click)=\"back()\" class=\"col-auto text-end\">\n <button class=\"btn btn-outline-dark btvolver border\">{{ '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 @if(order.tracking){\n <a [href]=\"order.tracking\"\n class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">\n Ver seguimiento</a>\n }\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 @if(creditAccountShowPrices !== null ? creditAccountShowPrices : true){\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'total' | translate }}:</p>\n <h5 class=\"fw-bold\">\n {{ (order.totals.total) | ecCurrencySymbol}}\n\n </h5>\n </div>\n }\n </div>\n </section>\n @if(!hidePrices && allowRepeatOrders){\n <div class=\"text-end mt-3\">\n <button class=\"btn btn-primary mb-2 btnRepeatOrder\" (click)=\"repeatOrder()\">\n {{ 'repeat-order' | translate }}\n </button>\n </div> \n }\n\n <div class=\"container py-3 border-top border-bottom\">\n @if(order.items.length){\n <div 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 @if(channelConfig.applyOrderLot){\n <div id=\"colLots\" class=\"col-1 font-sm font-brandon d-none d-md-block\">\n <!-- {{ 'description' | translate | uppercase }} -->\n {{ 'lots' | translate | uppercase }}\n </div>\n }\n @if(creditAccountShowPrices !== null ? creditAccountShowPrices : true){\n <div class=\"col-2 text-center font-sm font-brandon d-none d-md-block\">\n {{ 'unit-price' | translate | uppercase }}\n </div>\n }\n <div class=\"col-1 text-center font-sm font-brandon d-none d-md-block\">\n {{ 'quantity' | translate | uppercase }}\n </div>\n @if(creditAccountShowPrices !== null ? creditAccountShowPrices : true){\n <div class=\"col-2 text-end font-sm font-brandon d-none d-md-block\">\n {{ 'total' | translate | uppercase }}\n </div>\n }\n </div>\n } @else {\n\n }\n @for(item of order.items; track $index; let i = $index){\n <div class=\"row cart-items\">\n <div class=\"col-5 col-md-2 py-2\">\n @if(item.product.variants[0]?.images?.length){\n <img class=\"smc maxwidth img-fluid rounded-custom \"\n [src]=\"mediaUrl() + item.product.variants[0].images[0]\" alt=\"\">\n } @else {\n @if(item.product.picturesdefault){\n <img class=\"smc maxwidth img-fluid rounded-custom\"\n [src]=\"mediaUrl() + item.product.picturesdefault[0]\" alt=\"\">\n }\n }\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 @if(channelConfig.applyOrderLot){\n <div class=\"col-md-1 col-1 flex-column flex-md-row justify-content-start d-flex align-items-center\">\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 }\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 @if(creditAccountShowPrices !== null ? creditAccountShowPrices : true){\n <div class=\"col-4 font-xl\">\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 }\n @if(creditAccountShowPrices !== null ? creditAccountShowPrices : true){\n <div class=\"col-4 font-xl\">\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}}aaaa</p>\n </div>\n }\n </div>\n </div>\n @if(creditAccountShowPrices !== null ? creditAccountShowPrices : true){\n <div class=\"col-2 d-none d-md-flex align-items-center\">\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 }\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 @if(creditAccountShowPrices !== null ? creditAccountShowPrices : true){\n <div class=\"col-2 d-none d-md-flex align-items-center\">\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 }\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 @for( lot of item.orderItemLot; track $index){\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 @if(lot.date_deliver){\n <td>{{\n toDate(lot.date_deliver, 'DD/MM/YYYY') | translate }}</td>\n } @else {\n <td>Pendiente</td>\n }\n <td>{{lot.shipping_address_name}}</td>\n <td>{{lot.notes}}</td>\n <td>{{lot.total_lot | ecCurrencySymbol}}</td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n </div>\n </div>\n }\n </div>\n\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-12 col-md-6\"></div>\n @if(creditAccountShowPrices !== null ? creditAccountShowPrices : true){\n <div class=\"col-12 col-md-6\">\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 @if(!hideDiscounts && order.totals.promotion && order.totals.promotion != 0){\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'discount' |\n translate }}</div>\n }\n @if(!hideDiscounts && order.totals.promotion && order.totals.promotion != 0){\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end text-end\">\n {{ (order.totals.promotion) | ecCurrencySymbol }}</div>\n }\n @if(!hideTaxes && order.totals.taxes && order.totals.taxes != 0 ){\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'taxes' | translate }}</div>\n }\n @if(!hideTaxes && order.totals.taxes && order.totals.taxes != 0){\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\n {{ (order.totals.taxes) | ecCurrencySymbol }}</div>\n }\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 }\n </div>\n </div>\n\n } @else {\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 }\n </div>\n\n } @else {\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 }\n </div>\n</main>", styles: [""], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }, { kind: "pipe", type: EcCurrencySymbolPipe, name: "ecCurrencySymbol" }, { kind: "component", type: LoadingFullEcComponent, selector: "app-loading-full-ec" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: UpperCasePipe, name: "uppercase" }] });
12047
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: OrderEcComponent, isStandalone: true, selector: "app-order-ec", ngImport: i0, template: "<main class=\"py-5\" id=\"orderEcComponent\">\n <div class=\"container\">\n @if(order$ | async; as order){\n <div class=\"wrap\">\n @if(order){\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 @if(order?.invoice){\n <div class=\"col-sm col-12 font-brandon\">\n <a target=\"_blank\" [href]=\"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 }\n <a (click)=\"back()\" class=\"col-auto text-end\">\n <button class=\"btn btn-outline-dark btvolver border\">{{ '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 @if(order.tracking){\n <a [href]=\"order.tracking\"\n class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">\n Ver seguimiento</a>\n }\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 @if(priceVisibility.canShowPrices()){\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'total' | translate }}:</p>\n <h5 class=\"fw-bold\">\n {{ (order.totals.total) | ecCurrencySymbol}}\n\n </h5>\n </div>\n }\n </div>\n </section>\n @if(!priceVisibility.hidePrices() && allowRepeatOrders){\n <div class=\"text-end mt-3\">\n <button class=\"btn btn-primary mb-2 btnRepeatOrder\" (click)=\"repeatOrder()\">\n {{ 'repeat-order' | translate }}\n </button>\n </div> \n }\n\n <div class=\"container py-3 border-top border-bottom\">\n @if(order.items.length){\n <div 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 @if(channelConfig.applyOrderLot){\n <div id=\"colLots\" class=\"col-1 font-sm font-brandon d-none d-md-block\">\n <!-- {{ 'description' | translate | uppercase }} -->\n {{ 'lots' | translate | uppercase }}\n </div>\n }\n @if(priceVisibility.canShowPrices()){\n <div class=\"col-2 text-center font-sm font-brandon d-none d-md-block\">\n {{ 'unit-price' | translate | uppercase }}\n </div>\n }\n <div class=\"col-1 text-center font-sm font-brandon d-none d-md-block\">\n {{ 'quantity' | translate | uppercase }}\n </div>\n @if(priceVisibility.canShowPrices()){\n <div class=\"col-2 text-end font-sm font-brandon d-none d-md-block\">\n {{ 'total' | translate | uppercase }}\n </div>\n }\n </div>\n } @else {\n\n }\n @for(item of order.items; track $index; let i = $index){\n <div class=\"row cart-items\">\n <div class=\"col-5 col-md-2 py-2\">\n @if(item.product.variants[0]?.images?.length){\n <img class=\"smc maxwidth img-fluid rounded-custom \"\n [src]=\"mediaUrl() + item.product.variants[0].images[0]\" alt=\"\">\n } @else {\n @if(item.product.picturesdefault){\n <img class=\"smc maxwidth img-fluid rounded-custom\"\n [src]=\"mediaUrl() + item.product.picturesdefault[0]\" alt=\"\">\n }\n }\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 @if(channelConfig.applyOrderLot){\n <div class=\"col-md-1 col-1 flex-column flex-md-row justify-content-start d-flex align-items-center\">\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 }\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 @if(priceVisibility.canShowPrices()){\n <div class=\"col-4 font-xl\">\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 }\n @if(priceVisibility.canShowPrices()){\n <div class=\"col-4 font-xl\">\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}}aaaa</p>\n </div>\n }\n </div>\n </div>\n @if(priceVisibility.canShowPrices()){\n <div class=\"col-2 d-none d-md-flex align-items-center\">\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 }\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 @if(priceVisibility.canShowPrices()){\n <div class=\"col-2 d-none d-md-flex align-items-center\">\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 }\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 @for( lot of item.orderItemLot; track $index){\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 @if(lot.date_deliver){\n <td>{{\n toDate(lot.date_deliver, 'DD/MM/YYYY') | translate }}</td>\n } @else {\n <td>Pendiente</td>\n }\n <td>{{lot.shipping_address_name}}</td>\n <td>{{lot.notes}}</td>\n <td>{{lot.total_lot | ecCurrencySymbol}}</td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n </div>\n </div>\n }\n </div>\n\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-12 col-md-6\"></div>\n @if(priceVisibility.canShowPrices()){\n <div class=\"col-12 col-md-6\">\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 @if(!hideDiscounts && order.totals.promotion && order.totals.promotion != 0){\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'discount' |\n translate }}</div>\n }\n @if(!hideDiscounts && order.totals.promotion && order.totals.promotion != 0){\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end text-end\">\n {{ (order.totals.promotion) | ecCurrencySymbol }}</div>\n }\n @if(!hideTaxes && order.totals.taxes && order.totals.taxes != 0 ){\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'taxes' | translate }}</div>\n }\n @if(!hideTaxes && order.totals.taxes && order.totals.taxes != 0){\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\n {{ (order.totals.taxes) | ecCurrencySymbol }}</div>\n }\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 }\n </div>\n </div>\n\n } @else {\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 }\n </div>\n\n } @else {\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 }\n </div>\n</main>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }, { kind: "pipe", type: EcCurrencySymbolPipe, name: "ecCurrencySymbol" }, { kind: "component", type: LoadingFullEcComponent, selector: "app-loading-full-ec" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: UpperCasePipe, name: "uppercase" }] });
11881
12048
  }
11882
12049
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OrderEcComponent, decorators: [{
11883
12050
  type: Component,
@@ -11887,7 +12054,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
11887
12054
  AsyncPipe,
11888
12055
  TitleCasePipe,
11889
12056
  UpperCasePipe
11890
- ], template: "<main class=\"py-5\" id=\"orderEcComponent\">\n <div class=\"container\">\n @if(order$ | async; as order){\n <div class=\"wrap\">\n @if(order){\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 @if(order?.invoice){\n <div class=\"col-sm col-12 font-brandon\">\n <a target=\"_blank\" [href]=\"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 }\n <a (click)=\"back()\" class=\"col-auto text-end\">\n <button class=\"btn btn-outline-dark btvolver border\">{{ '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 @if(order.tracking){\n <a [href]=\"order.tracking\"\n class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">\n Ver seguimiento</a>\n }\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 @if(creditAccountShowPrices !== null ? creditAccountShowPrices : true){\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'total' | translate }}:</p>\n <h5 class=\"fw-bold\">\n {{ (order.totals.total) | ecCurrencySymbol}}\n\n </h5>\n </div>\n }\n </div>\n </section>\n @if(!hidePrices && allowRepeatOrders){\n <div class=\"text-end mt-3\">\n <button class=\"btn btn-primary mb-2 btnRepeatOrder\" (click)=\"repeatOrder()\">\n {{ 'repeat-order' | translate }}\n </button>\n </div> \n }\n\n <div class=\"container py-3 border-top border-bottom\">\n @if(order.items.length){\n <div 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 @if(channelConfig.applyOrderLot){\n <div id=\"colLots\" class=\"col-1 font-sm font-brandon d-none d-md-block\">\n <!-- {{ 'description' | translate | uppercase }} -->\n {{ 'lots' | translate | uppercase }}\n </div>\n }\n @if(creditAccountShowPrices !== null ? creditAccountShowPrices : true){\n <div class=\"col-2 text-center font-sm font-brandon d-none d-md-block\">\n {{ 'unit-price' | translate | uppercase }}\n </div>\n }\n <div class=\"col-1 text-center font-sm font-brandon d-none d-md-block\">\n {{ 'quantity' | translate | uppercase }}\n </div>\n @if(creditAccountShowPrices !== null ? creditAccountShowPrices : true){\n <div class=\"col-2 text-end font-sm font-brandon d-none d-md-block\">\n {{ 'total' | translate | uppercase }}\n </div>\n }\n </div>\n } @else {\n\n }\n @for(item of order.items; track $index; let i = $index){\n <div class=\"row cart-items\">\n <div class=\"col-5 col-md-2 py-2\">\n @if(item.product.variants[0]?.images?.length){\n <img class=\"smc maxwidth img-fluid rounded-custom \"\n [src]=\"mediaUrl() + item.product.variants[0].images[0]\" alt=\"\">\n } @else {\n @if(item.product.picturesdefault){\n <img class=\"smc maxwidth img-fluid rounded-custom\"\n [src]=\"mediaUrl() + item.product.picturesdefault[0]\" alt=\"\">\n }\n }\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 @if(channelConfig.applyOrderLot){\n <div class=\"col-md-1 col-1 flex-column flex-md-row justify-content-start d-flex align-items-center\">\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 }\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 @if(creditAccountShowPrices !== null ? creditAccountShowPrices : true){\n <div class=\"col-4 font-xl\">\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 }\n @if(creditAccountShowPrices !== null ? creditAccountShowPrices : true){\n <div class=\"col-4 font-xl\">\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}}aaaa</p>\n </div>\n }\n </div>\n </div>\n @if(creditAccountShowPrices !== null ? creditAccountShowPrices : true){\n <div class=\"col-2 d-none d-md-flex align-items-center\">\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 }\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 @if(creditAccountShowPrices !== null ? creditAccountShowPrices : true){\n <div class=\"col-2 d-none d-md-flex align-items-center\">\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 }\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 @for( lot of item.orderItemLot; track $index){\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 @if(lot.date_deliver){\n <td>{{\n toDate(lot.date_deliver, 'DD/MM/YYYY') | translate }}</td>\n } @else {\n <td>Pendiente</td>\n }\n <td>{{lot.shipping_address_name}}</td>\n <td>{{lot.notes}}</td>\n <td>{{lot.total_lot | ecCurrencySymbol}}</td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n </div>\n </div>\n }\n </div>\n\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-12 col-md-6\"></div>\n @if(creditAccountShowPrices !== null ? creditAccountShowPrices : true){\n <div class=\"col-12 col-md-6\">\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 @if(!hideDiscounts && order.totals.promotion && order.totals.promotion != 0){\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'discount' |\n translate }}</div>\n }\n @if(!hideDiscounts && order.totals.promotion && order.totals.promotion != 0){\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end text-end\">\n {{ (order.totals.promotion) | ecCurrencySymbol }}</div>\n }\n @if(!hideTaxes && order.totals.taxes && order.totals.taxes != 0 ){\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'taxes' | translate }}</div>\n }\n @if(!hideTaxes && order.totals.taxes && order.totals.taxes != 0){\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\n {{ (order.totals.taxes) | ecCurrencySymbol }}</div>\n }\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 }\n </div>\n </div>\n\n } @else {\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 }\n </div>\n\n } @else {\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 }\n </div>\n</main>" }]
12057
+ ], template: "<main class=\"py-5\" id=\"orderEcComponent\">\n <div class=\"container\">\n @if(order$ | async; as order){\n <div class=\"wrap\">\n @if(order){\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 @if(order?.invoice){\n <div class=\"col-sm col-12 font-brandon\">\n <a target=\"_blank\" [href]=\"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 }\n <a (click)=\"back()\" class=\"col-auto text-end\">\n <button class=\"btn btn-outline-dark btvolver border\">{{ '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 @if(order.tracking){\n <a [href]=\"order.tracking\"\n class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">\n Ver seguimiento</a>\n }\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 @if(priceVisibility.canShowPrices()){\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'total' | translate }}:</p>\n <h5 class=\"fw-bold\">\n {{ (order.totals.total) | ecCurrencySymbol}}\n\n </h5>\n </div>\n }\n </div>\n </section>\n @if(!priceVisibility.hidePrices() && allowRepeatOrders){\n <div class=\"text-end mt-3\">\n <button class=\"btn btn-primary mb-2 btnRepeatOrder\" (click)=\"repeatOrder()\">\n {{ 'repeat-order' | translate }}\n </button>\n </div> \n }\n\n <div class=\"container py-3 border-top border-bottom\">\n @if(order.items.length){\n <div 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 @if(channelConfig.applyOrderLot){\n <div id=\"colLots\" class=\"col-1 font-sm font-brandon d-none d-md-block\">\n <!-- {{ 'description' | translate | uppercase }} -->\n {{ 'lots' | translate | uppercase }}\n </div>\n }\n @if(priceVisibility.canShowPrices()){\n <div class=\"col-2 text-center font-sm font-brandon d-none d-md-block\">\n {{ 'unit-price' | translate | uppercase }}\n </div>\n }\n <div class=\"col-1 text-center font-sm font-brandon d-none d-md-block\">\n {{ 'quantity' | translate | uppercase }}\n </div>\n @if(priceVisibility.canShowPrices()){\n <div class=\"col-2 text-end font-sm font-brandon d-none d-md-block\">\n {{ 'total' | translate | uppercase }}\n </div>\n }\n </div>\n } @else {\n\n }\n @for(item of order.items; track $index; let i = $index){\n <div class=\"row cart-items\">\n <div class=\"col-5 col-md-2 py-2\">\n @if(item.product.variants[0]?.images?.length){\n <img class=\"smc maxwidth img-fluid rounded-custom \"\n [src]=\"mediaUrl() + item.product.variants[0].images[0]\" alt=\"\">\n } @else {\n @if(item.product.picturesdefault){\n <img class=\"smc maxwidth img-fluid rounded-custom\"\n [src]=\"mediaUrl() + item.product.picturesdefault[0]\" alt=\"\">\n }\n }\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 @if(channelConfig.applyOrderLot){\n <div class=\"col-md-1 col-1 flex-column flex-md-row justify-content-start d-flex align-items-center\">\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 }\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 @if(priceVisibility.canShowPrices()){\n <div class=\"col-4 font-xl\">\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 }\n @if(priceVisibility.canShowPrices()){\n <div class=\"col-4 font-xl\">\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}}aaaa</p>\n </div>\n }\n </div>\n </div>\n @if(priceVisibility.canShowPrices()){\n <div class=\"col-2 d-none d-md-flex align-items-center\">\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 }\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 @if(priceVisibility.canShowPrices()){\n <div class=\"col-2 d-none d-md-flex align-items-center\">\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 }\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 @for( lot of item.orderItemLot; track $index){\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 @if(lot.date_deliver){\n <td>{{\n toDate(lot.date_deliver, 'DD/MM/YYYY') | translate }}</td>\n } @else {\n <td>Pendiente</td>\n }\n <td>{{lot.shipping_address_name}}</td>\n <td>{{lot.notes}}</td>\n <td>{{lot.total_lot | ecCurrencySymbol}}</td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n </div>\n </div>\n }\n </div>\n\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-12 col-md-6\"></div>\n @if(priceVisibility.canShowPrices()){\n <div class=\"col-12 col-md-6\">\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 @if(!hideDiscounts && order.totals.promotion && order.totals.promotion != 0){\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'discount' |\n translate }}</div>\n }\n @if(!hideDiscounts && order.totals.promotion && order.totals.promotion != 0){\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end text-end\">\n {{ (order.totals.promotion) | ecCurrencySymbol }}</div>\n }\n @if(!hideTaxes && order.totals.taxes && order.totals.taxes != 0 ){\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'taxes' | translate }}</div>\n }\n @if(!hideTaxes && order.totals.taxes && order.totals.taxes != 0){\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\n {{ (order.totals.taxes) | ecCurrencySymbol }}</div>\n }\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 }\n </div>\n </div>\n\n } @else {\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 }\n </div>\n\n } @else {\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 }\n </div>\n</main>\n" }]
11891
12058
  }] });
11892
12059
 
11893
12060
  class SidebarEcComponent {
@@ -11897,13 +12064,13 @@ class SidebarEcComponent {
11897
12064
  _router = inject(Router);
11898
12065
  _toastrService = inject(ToastService);
11899
12066
  _channelService = inject(ChannelService);
12067
+ priceVisibility = inject(PriceVisibilityService);
11900
12068
  user = null;
11901
12069
  mediaUrl = this._consts.mediaUrl();
11902
12070
  promotions = [];
11903
12071
  variantsToShow = ['TALLE', 'COLOR'];
11904
12072
  hideDiscounts = false;
11905
12073
  hideTaxes = false;
11906
- creditAccountShowPrices = null;
11907
12074
  cartItems$ = this._cartService.cartItems$;
11908
12075
  subTotalAmount$ = this._cartService.getSubTotalAmount();
11909
12076
  totalPromotionAmount$ = this._cartService.getTotalPromotionAmount();
@@ -11918,9 +12085,6 @@ class SidebarEcComponent {
11918
12085
  this.hideDiscounts = channel?.hideDiscounts ?? false;
11919
12086
  this.hideTaxes = channel?.hideTaxes ?? false;
11920
12087
  });
11921
- this._cartService.showPrice$.subscribe((showPrice) => {
11922
- this.creditAccountShowPrices = showPrice;
11923
- });
11924
12088
  }
11925
12089
  actualizarCantidad(_t13, arg1, arg2, arg3, arg4) {
11926
12090
  throw new Error('Method not implemented.');
@@ -11938,11 +12102,11 @@ class SidebarEcComponent {
11938
12102
  throw new Error('Method not implemented.');
11939
12103
  }
11940
12104
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SidebarEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
11941
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: SidebarEcComponent, isStandalone: true, selector: "app-sidebar-ec", ngImport: i0, template: "<div class=\"nav nav-sidebar py-4 mx-0 position-relative text-center shadow-sm border-bottom d-flex justify-content-center\">\n <h2 class=\"row text-center\">Mi pedido</h2>\n <div class=\" me-3 closeCart position-absolute end-0\" data-bs-dismiss=\"offcanvas\" aria-label=\"Close\">\n <i class=\"fa fa-times-circle fs-5\" aria-hidden=\"true\"></i>\n </div>\n</div>\n\n\n@if(cartItems$ | async; as items){\n @if(items.length > 0){\n <!-- PRODUCTO -->\n <div class=\"d-flex flex-column mb-4 items border-bottom\">\n @for(item of items; track $index; let i = $index){\n <div class=\"productoCarrito mt-1 mb-2 w-100\">\n <app-cart-item-ec [inSidebar]=\"true\" [item]=\"item\"></app-cart-item-ec>\n </div>\n }\n </div>\n <div class=\"d-flex mx-4 justify-content-between mt-2 \">\n <p class=\"fw-bold\">Subtotal</p>\n <p class=\"fw-700\">{{ (subTotalAmount$ | async) | ecCurrencySymbol}}</p>\n </div>\n <div class=\"mx-4 bordeBot py-2\">\n <app-coupon-ec></app-coupon-ec>\n </div>\n <div class=\"d-flex mx-4 justify-content-between bordeBot2 mt-2\">\n <p class=\"fw-bold\">Descuentos:</p>\n <p>{{ (totalPromotionAmount$ | async) |ecCurrencySymbol }}</p>\n </div>\n\n <div class=\"d-flex mx-4 justify-content-between bordeBot2 pt-2\">\n <!-- @if(this._cartService.cart.source.value.couponCode){\n <a class=\"quitar-cupon text-dark\" role=\"button\"\n (click)=\"removeCoupon()\">(Quitar cup\u00F3n)</a>\n } -->\n </div>\n <div class=\"d-flex mx-4 justify-content-between mb-3 mt-2\">\n <p class=\"fw-bold h5\">TOTAL</p>\n <p class=\"fw-bold h5\">{{(totalAmount$ | async) | ecCurrencySymbol}}</p>\n </div>\n <div class=\"d-flex flex-column mx-4 justify-content-between mb-3\" data-bs-dismiss=\"offcanvas\" aria-label=\"Close\">\n <a [routerLink]=\"['/cart']\" class=\"btn btnPedido mb-2\">FINALIZAR PEDIDO</a>\n <a [routerLink]=\"['/collection']\" class=\"btn btnSeguir mb-3\">SEGUIR COMPRANDO</a>\n </div>\n\n\n } @else {\n <div class=\"container-lg px-lg-0 px-md-4 my-5\">\n <div class=\"row\">\n <div class=\"col-12\">\n <h5 class=\"text-center mb-sm-4 text-uppercase\"> \u00B7 Su carrito se\n encuentra vac\u00EDo \u00B7 </h5>\n </div>\n </div>\n </div>\n }\n}", styles: [""], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: CouponEcComponent, selector: "app-coupon-ec" }, { kind: "component", type: CartItemEcComponent, selector: "app-cart-item-ec", inputs: ["item", "inSidebar"] }, { kind: "pipe", type: EcCurrencySymbolPipe, name: "ecCurrencySymbol" }] });
12105
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: SidebarEcComponent, isStandalone: true, selector: "app-sidebar-ec", ngImport: i0, template: "<div class=\"nav nav-sidebar py-4 mx-0 position-relative text-center shadow-sm border-bottom d-flex justify-content-center\">\n <h2 class=\"row text-center\">Mi pedido</h2>\n <div class=\" me-3 closeCart position-absolute end-0\" data-bs-dismiss=\"offcanvas\" aria-label=\"Close\">\n <i class=\"fa fa-times-circle fs-5\" aria-hidden=\"true\"></i>\n </div>\n</div>\n\n\n@if(cartItems$ | async; as items){\n @if(items.length > 0){\n <!-- PRODUCTO -->\n <div class=\"d-flex flex-column mb-4 items border-bottom\">\n @for(item of items; track $index; let i = $index){\n <div class=\"productoCarrito mt-1 mb-2 w-100\">\n <app-cart-item-ec [inSidebar]=\"true\" [item]=\"item\"></app-cart-item-ec>\n </div>\n }\n </div>\n @if (priceVisibility.canShowPrices()) {\n <div class=\"d-flex mx-4 justify-content-between mt-2 \">\n <p class=\"fw-bold\">Subtotal</p>\n <p class=\"fw-700\">{{ (subTotalAmount$ | async) | ecCurrencySymbol}}</p>\n </div>\n <div class=\"mx-4 bordeBot py-2\">\n <app-coupon-ec></app-coupon-ec>\n </div>\n <div class=\"d-flex mx-4 justify-content-between bordeBot2 mt-2\">\n <p class=\"fw-bold\">Descuentos:</p>\n <p>{{ (totalPromotionAmount$ | async) |ecCurrencySymbol }}</p>\n </div>\n\n <div class=\"d-flex mx-4 justify-content-between bordeBot2 pt-2\">\n <!-- @if(this._cartService.cart.source.value.couponCode){\n <a class=\"quitar-cupon text-dark\" role=\"button\"\n (click)=\"removeCoupon()\">(Quitar cup\u00F3n)</a>\n } -->\n </div>\n <div class=\"d-flex mx-4 justify-content-between mb-3 mt-2\">\n <p class=\"fw-bold h5\">TOTAL</p>\n <p class=\"fw-bold h5\">{{(totalAmount$ | async) | ecCurrencySymbol}}</p>\n </div>\n }\n <div class=\"d-flex flex-column mx-4 justify-content-between mb-3\" data-bs-dismiss=\"offcanvas\" aria-label=\"Close\">\n <a [routerLink]=\"['/cart']\" class=\"btn btnPedido mb-2\">FINALIZAR PEDIDO</a>\n <a [routerLink]=\"['/collection']\" class=\"btn btnSeguir mb-3\">SEGUIR COMPRANDO</a>\n </div>\n\n\n } @else {\n <div class=\"container-lg px-lg-0 px-md-4 my-5\">\n <div class=\"row\">\n <div class=\"col-12\">\n <h5 class=\"text-center mb-sm-4 text-uppercase\"> \u00B7 Su carrito se\n encuentra vac\u00EDo \u00B7 </h5>\n </div>\n </div>\n </div>\n }\n}", styles: [""], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: CouponEcComponent, selector: "app-coupon-ec" }, { kind: "component", type: CartItemEcComponent, selector: "app-cart-item-ec", inputs: ["item", "inSidebar"] }, { kind: "pipe", type: EcCurrencySymbolPipe, name: "ecCurrencySymbol" }] });
11942
12106
  }
11943
12107
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SidebarEcComponent, decorators: [{
11944
12108
  type: Component,
11945
- args: [{ selector: 'app-sidebar-ec', standalone: true, imports: [RouterLink, AsyncPipe, CouponEcComponent, CartItemEcComponent, EcCurrencySymbolPipe, CouponEcComponent], template: "<div class=\"nav nav-sidebar py-4 mx-0 position-relative text-center shadow-sm border-bottom d-flex justify-content-center\">\n <h2 class=\"row text-center\">Mi pedido</h2>\n <div class=\" me-3 closeCart position-absolute end-0\" data-bs-dismiss=\"offcanvas\" aria-label=\"Close\">\n <i class=\"fa fa-times-circle fs-5\" aria-hidden=\"true\"></i>\n </div>\n</div>\n\n\n@if(cartItems$ | async; as items){\n @if(items.length > 0){\n <!-- PRODUCTO -->\n <div class=\"d-flex flex-column mb-4 items border-bottom\">\n @for(item of items; track $index; let i = $index){\n <div class=\"productoCarrito mt-1 mb-2 w-100\">\n <app-cart-item-ec [inSidebar]=\"true\" [item]=\"item\"></app-cart-item-ec>\n </div>\n }\n </div>\n <div class=\"d-flex mx-4 justify-content-between mt-2 \">\n <p class=\"fw-bold\">Subtotal</p>\n <p class=\"fw-700\">{{ (subTotalAmount$ | async) | ecCurrencySymbol}}</p>\n </div>\n <div class=\"mx-4 bordeBot py-2\">\n <app-coupon-ec></app-coupon-ec>\n </div>\n <div class=\"d-flex mx-4 justify-content-between bordeBot2 mt-2\">\n <p class=\"fw-bold\">Descuentos:</p>\n <p>{{ (totalPromotionAmount$ | async) |ecCurrencySymbol }}</p>\n </div>\n\n <div class=\"d-flex mx-4 justify-content-between bordeBot2 pt-2\">\n <!-- @if(this._cartService.cart.source.value.couponCode){\n <a class=\"quitar-cupon text-dark\" role=\"button\"\n (click)=\"removeCoupon()\">(Quitar cup\u00F3n)</a>\n } -->\n </div>\n <div class=\"d-flex mx-4 justify-content-between mb-3 mt-2\">\n <p class=\"fw-bold h5\">TOTAL</p>\n <p class=\"fw-bold h5\">{{(totalAmount$ | async) | ecCurrencySymbol}}</p>\n </div>\n <div class=\"d-flex flex-column mx-4 justify-content-between mb-3\" data-bs-dismiss=\"offcanvas\" aria-label=\"Close\">\n <a [routerLink]=\"['/cart']\" class=\"btn btnPedido mb-2\">FINALIZAR PEDIDO</a>\n <a [routerLink]=\"['/collection']\" class=\"btn btnSeguir mb-3\">SEGUIR COMPRANDO</a>\n </div>\n\n\n } @else {\n <div class=\"container-lg px-lg-0 px-md-4 my-5\">\n <div class=\"row\">\n <div class=\"col-12\">\n <h5 class=\"text-center mb-sm-4 text-uppercase\"> \u00B7 Su carrito se\n encuentra vac\u00EDo \u00B7 </h5>\n </div>\n </div>\n </div>\n }\n}" }]
12109
+ args: [{ selector: 'app-sidebar-ec', standalone: true, imports: [RouterLink, AsyncPipe, CouponEcComponent, CartItemEcComponent, EcCurrencySymbolPipe, CouponEcComponent], template: "<div class=\"nav nav-sidebar py-4 mx-0 position-relative text-center shadow-sm border-bottom d-flex justify-content-center\">\n <h2 class=\"row text-center\">Mi pedido</h2>\n <div class=\" me-3 closeCart position-absolute end-0\" data-bs-dismiss=\"offcanvas\" aria-label=\"Close\">\n <i class=\"fa fa-times-circle fs-5\" aria-hidden=\"true\"></i>\n </div>\n</div>\n\n\n@if(cartItems$ | async; as items){\n @if(items.length > 0){\n <!-- PRODUCTO -->\n <div class=\"d-flex flex-column mb-4 items border-bottom\">\n @for(item of items; track $index; let i = $index){\n <div class=\"productoCarrito mt-1 mb-2 w-100\">\n <app-cart-item-ec [inSidebar]=\"true\" [item]=\"item\"></app-cart-item-ec>\n </div>\n }\n </div>\n @if (priceVisibility.canShowPrices()) {\n <div class=\"d-flex mx-4 justify-content-between mt-2 \">\n <p class=\"fw-bold\">Subtotal</p>\n <p class=\"fw-700\">{{ (subTotalAmount$ | async) | ecCurrencySymbol}}</p>\n </div>\n <div class=\"mx-4 bordeBot py-2\">\n <app-coupon-ec></app-coupon-ec>\n </div>\n <div class=\"d-flex mx-4 justify-content-between bordeBot2 mt-2\">\n <p class=\"fw-bold\">Descuentos:</p>\n <p>{{ (totalPromotionAmount$ | async) |ecCurrencySymbol }}</p>\n </div>\n\n <div class=\"d-flex mx-4 justify-content-between bordeBot2 pt-2\">\n <!-- @if(this._cartService.cart.source.value.couponCode){\n <a class=\"quitar-cupon text-dark\" role=\"button\"\n (click)=\"removeCoupon()\">(Quitar cup\u00F3n)</a>\n } -->\n </div>\n <div class=\"d-flex mx-4 justify-content-between mb-3 mt-2\">\n <p class=\"fw-bold h5\">TOTAL</p>\n <p class=\"fw-bold h5\">{{(totalAmount$ | async) | ecCurrencySymbol}}</p>\n </div>\n }\n <div class=\"d-flex flex-column mx-4 justify-content-between mb-3\" data-bs-dismiss=\"offcanvas\" aria-label=\"Close\">\n <a [routerLink]=\"['/cart']\" class=\"btn btnPedido mb-2\">FINALIZAR PEDIDO</a>\n <a [routerLink]=\"['/collection']\" class=\"btn btnSeguir mb-3\">SEGUIR COMPRANDO</a>\n </div>\n\n\n } @else {\n <div class=\"container-lg px-lg-0 px-md-4 my-5\">\n <div class=\"row\">\n <div class=\"col-12\">\n <h5 class=\"text-center mb-sm-4 text-uppercase\"> \u00B7 Su carrito se\n encuentra vac\u00EDo \u00B7 </h5>\n </div>\n </div>\n </div>\n }\n}" }]
11946
12110
  }] });
11947
12111
 
11948
12112
  class RelatedProductsEcComponent extends BlockEcComponent {
@@ -13032,6 +13196,76 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
13032
13196
  type: Output
13033
13197
  }] } });
13034
13198
 
13199
+ class CreditAccountBannerEcComponent {
13200
+ cartService = inject(CartService);
13201
+ authService = inject(AuthService);
13202
+ layout = 'inline';
13203
+ title;
13204
+ subtitle;
13205
+ availableLabel;
13206
+ limitLabel;
13207
+ titleKey = 'credit-account-banner.title';
13208
+ subtitleKey = 'credit-account-banner.subtitle';
13209
+ availableLabelKey = 'credit-account-banner.available';
13210
+ limitLabelKey = 'credit-account-banner.limit';
13211
+ requireLogged = false;
13212
+ balance = toSignal(this.cartService.balanceCustomer$, { initialValue: null });
13213
+ loggedIn = toSignal(this.authService.loggedIn$, { initialValue: this.authService.isAuthenticated() });
13214
+ showMax = computed(() => !!this.balance()?.showMax);
13215
+ canShowAmounts = computed(() => !!this.balance()?.showPrice);
13216
+ remainingCredits = computed(() => this.balance()?.remainingCredits ?? 0);
13217
+ creditAmount = computed(() => this.balance()?.creditAmount ?? 0);
13218
+ progress = computed(() => {
13219
+ const credit = this.creditAmount();
13220
+ const remaining = this.remainingCredits();
13221
+ if (!credit)
13222
+ return 0;
13223
+ const percentage = (remaining / credit) * 100;
13224
+ return Math.max(0, Math.min(100, percentage));
13225
+ });
13226
+ barColor = computed(() => {
13227
+ const credit = this.creditAmount();
13228
+ const remaining = this.remainingCredits();
13229
+ if (!credit)
13230
+ return '#6c757d';
13231
+ const ratio = remaining / credit;
13232
+ if (ratio >= 0.66)
13233
+ return '#198754';
13234
+ if (ratio >= 0.33)
13235
+ return '#ffc107';
13236
+ return '#dc3545';
13237
+ });
13238
+ shouldRender() {
13239
+ return this.showMax() && (!this.requireLogged || this.loggedIn());
13240
+ }
13241
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CreditAccountBannerEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
13242
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: CreditAccountBannerEcComponent, isStandalone: true, selector: "app-credit-account-banner-ec", inputs: { layout: "layout", title: "title", subtitle: "subtitle", availableLabel: "availableLabel", limitLabel: "limitLabel", titleKey: "titleKey", subtitleKey: "subtitleKey", availableLabelKey: "availableLabelKey", limitLabelKey: "limitLabelKey", requireLogged: "requireLogged" }, ngImport: i0, template: "@if (shouldRender()) {\n\t<div class=\"credits-banner\" [class.credits-inline]=\"layout === 'inline'\" [class.credits-mobile]=\"layout === 'mobile'\">\n\t\t<div class=\"d-flex align-items-center gap-2\">\n\t\t\t<div class=\"credits-icon d-flex align-items-center justify-content-center\">\n\t\t\t\t<span class=\"credits-icon-text\">$</span>\n\t\t\t</div>\n\t\t\t<div class=\"d-flex flex-column\">\n\t\t\t\t@if (layout === 'mobile') {\n\t\t\t\t\t<span class=\"credits-label text-uppercase mb-1\">{{ title || (titleKey | translate) }}</span>\n\t\t\t\t\t<span class=\"credits-title\">{{ subtitle || (subtitleKey | translate) }}</span>\n\t\t\t\t} @else {\n\t\t\t\t\t<span class=\"credits-title\">{{ title || (titleKey | translate) }}</span>\n\t\t\t\t}\n\t\t\t</div>\n\t\t</div>\n\n\t\t<div class=\"credits-content flex-grow-1\">\n\t\t\t@if (canShowAmounts()) {\n\t\t\t\t<div class=\"d-flex justify-content-between align-items-center flex-wrap gap-2 credits-summary\" [class.credits-mobile-values]=\"layout === 'mobile'\">\n\t\t\t\t\t<div class=\"credits-pill\" [class.credits-mobile-value]=\"layout === 'mobile'\">\n\t\t\t\t\t\t<small class=\"me-1 text-uppercase\">{{ availableLabel || (availableLabelKey | translate) }}</small>\n\t\t\t\t\t\t<span class=\"fw-700\">{{ remainingCredits() | number:'1.0-0' }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"credits-pill\" [class.credits-pill-light]=\"layout === 'inline'\" [class.credits-mobile-value]=\"layout === 'mobile'\" [class.text-end]=\"layout === 'mobile'\">\n\t\t\t\t\t\t<small class=\"me-1 text-uppercase\">{{ limitLabel || (limitLabelKey | translate) }}</small>\n\t\t\t\t\t\t<span class=\"fw-700\">{{ creditAmount() | number:'1.0-0' }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t}\n\n\t\t\t<div class=\"credits-progress mt-1\">\n\t\t\t\t<div\n\t\t\t\t\tclass=\"credits-progress-fill\"\n\t\t\t\t\t[ngStyle]=\"{ width: progress() + '%', background: barColor() }\"\n\t\t\t\t\t[attr.aria-valuenow]=\"remainingCredits()\"\n\t\t\t\t\t[attr.aria-valuemin]=\"0\"\n\t\t\t\t\t[attr.aria-valuemax]=\"creditAmount()\"\n\t\t\t\t></div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n}\n", styles: [":host{--ec-credits-bg: linear-gradient(120deg, #0c1536 0%, #1b3080 100%);--ec-credits-radius: 14px;--ec-credits-padding: 10px 12px;--ec-credits-color: #fff;--ec-credits-shadow: 0 8px 22px rgba(12, 21, 54, .18);--ec-credits-border: 1px solid rgba(255, 255, 255, .08);--ec-credits-icon-bg: rgba(255, 255, 255, .08);--ec-credits-icon-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);--ec-credits-pill-bg: rgba(255, 255, 255, .08);--ec-credits-pill-border: 1px solid rgba(255, 255, 255, .12);--ec-credits-pill-light-bg: rgba(255, 255, 255, .04);--ec-credits-pill-light-color: #d7def8;--ec-credits-progress-bg: rgba(255, 255, 255, .14);--ec-credits-progress-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06)}.credits-banner{background:var(--ec-credits-bg);border-radius:var(--ec-credits-radius);padding:var(--ec-credits-padding);color:var(--ec-credits-color);box-shadow:var(--ec-credits-shadow);border:var(--ec-credits-border);display:flex;align-items:center;gap:12px}.credits-icon{width:44px;height:44px;border-radius:12px;background:var(--ec-credits-icon-bg);box-shadow:var(--ec-credits-icon-shadow);flex:0 0 auto}.credits-icon-text{color:#fff;font-weight:800;font-size:20px;letter-spacing:.04em}.credits-label{color:#ffffffb8;font-size:11px;letter-spacing:.08em}.credits-title{color:#fff;font-weight:700;line-height:1.1;font-size:16px}.credits-content .credits-pill{background:var(--ec-credits-pill-bg);color:var(--ec-credits-color);border:var(--ec-credits-pill-border);border-radius:12px;padding:6px 12px;display:inline-flex;align-items:center;gap:4px;white-space:nowrap}.credits-content .credits-pill-light{background:var(--ec-credits-pill-light-bg);color:var(--ec-credits-pill-light-color)}.credits-progress{background:var(--ec-credits-progress-bg);border-radius:999px;height:12px;overflow:hidden;box-shadow:var(--ec-credits-progress-shadow)}.credits-progress-fill{height:100%;border-radius:inherit;transition:width .35s ease}.credits-footnote{color:#ffffffc7}.credits-footnote small{color:inherit;opacity:.9;font-size:11px}.dot{width:8px;height:8px;border-radius:50%;display:inline-block}.dot-green{background-color:#198754}.dot-amber{background-color:#ffc107}.dot-red{background-color:#dc3545}@media (max-width: 768px){.credits-banner{padding:12px}.credits-footnote{gap:8px}}.credits-inline{min-width:280px;max-width:400px;height:68px;flex:0 0 auto;padding:8px 12px;overflow:hidden}.credits-inline .credits-icon{width:36px;height:36px;border-radius:10px}.credits-inline .credits-title{font-size:14px}.credits-inline .credits-label{font-size:10px}.credits-inline .credits-pill{padding:4px 10px}.credits-inline .credits-progress{height:8px}.credits-summary{flex-wrap:nowrap!important;gap:8px!important}.credits-mobile{width:100%;padding:12px;flex-direction:column;align-items:stretch}.credits-mobile .credits-progress{height:8px}.credits-mobile .credits-pill{padding:4px 10px}.credits-mobile-values{display:grid;grid-template-columns:repeat(2,1fr);gap:6px;width:100%}.credits-mobile-value small{color:#ffffffb3;letter-spacing:.08em}.credits-mobile-value span{display:block;color:#fff}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "pipe", type: i1$1.DecimalPipe, name: "number" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }] });
13243
+ }
13244
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CreditAccountBannerEcComponent, decorators: [{
13245
+ type: Component,
13246
+ args: [{ selector: 'app-credit-account-banner-ec', standalone: true, imports: [CommonModule, TranslateModule], template: "@if (shouldRender()) {\n\t<div class=\"credits-banner\" [class.credits-inline]=\"layout === 'inline'\" [class.credits-mobile]=\"layout === 'mobile'\">\n\t\t<div class=\"d-flex align-items-center gap-2\">\n\t\t\t<div class=\"credits-icon d-flex align-items-center justify-content-center\">\n\t\t\t\t<span class=\"credits-icon-text\">$</span>\n\t\t\t</div>\n\t\t\t<div class=\"d-flex flex-column\">\n\t\t\t\t@if (layout === 'mobile') {\n\t\t\t\t\t<span class=\"credits-label text-uppercase mb-1\">{{ title || (titleKey | translate) }}</span>\n\t\t\t\t\t<span class=\"credits-title\">{{ subtitle || (subtitleKey | translate) }}</span>\n\t\t\t\t} @else {\n\t\t\t\t\t<span class=\"credits-title\">{{ title || (titleKey | translate) }}</span>\n\t\t\t\t}\n\t\t\t</div>\n\t\t</div>\n\n\t\t<div class=\"credits-content flex-grow-1\">\n\t\t\t@if (canShowAmounts()) {\n\t\t\t\t<div class=\"d-flex justify-content-between align-items-center flex-wrap gap-2 credits-summary\" [class.credits-mobile-values]=\"layout === 'mobile'\">\n\t\t\t\t\t<div class=\"credits-pill\" [class.credits-mobile-value]=\"layout === 'mobile'\">\n\t\t\t\t\t\t<small class=\"me-1 text-uppercase\">{{ availableLabel || (availableLabelKey | translate) }}</small>\n\t\t\t\t\t\t<span class=\"fw-700\">{{ remainingCredits() | number:'1.0-0' }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"credits-pill\" [class.credits-pill-light]=\"layout === 'inline'\" [class.credits-mobile-value]=\"layout === 'mobile'\" [class.text-end]=\"layout === 'mobile'\">\n\t\t\t\t\t\t<small class=\"me-1 text-uppercase\">{{ limitLabel || (limitLabelKey | translate) }}</small>\n\t\t\t\t\t\t<span class=\"fw-700\">{{ creditAmount() | number:'1.0-0' }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t}\n\n\t\t\t<div class=\"credits-progress mt-1\">\n\t\t\t\t<div\n\t\t\t\t\tclass=\"credits-progress-fill\"\n\t\t\t\t\t[ngStyle]=\"{ width: progress() + '%', background: barColor() }\"\n\t\t\t\t\t[attr.aria-valuenow]=\"remainingCredits()\"\n\t\t\t\t\t[attr.aria-valuemin]=\"0\"\n\t\t\t\t\t[attr.aria-valuemax]=\"creditAmount()\"\n\t\t\t\t></div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n}\n", styles: [":host{--ec-credits-bg: linear-gradient(120deg, #0c1536 0%, #1b3080 100%);--ec-credits-radius: 14px;--ec-credits-padding: 10px 12px;--ec-credits-color: #fff;--ec-credits-shadow: 0 8px 22px rgba(12, 21, 54, .18);--ec-credits-border: 1px solid rgba(255, 255, 255, .08);--ec-credits-icon-bg: rgba(255, 255, 255, .08);--ec-credits-icon-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);--ec-credits-pill-bg: rgba(255, 255, 255, .08);--ec-credits-pill-border: 1px solid rgba(255, 255, 255, .12);--ec-credits-pill-light-bg: rgba(255, 255, 255, .04);--ec-credits-pill-light-color: #d7def8;--ec-credits-progress-bg: rgba(255, 255, 255, .14);--ec-credits-progress-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06)}.credits-banner{background:var(--ec-credits-bg);border-radius:var(--ec-credits-radius);padding:var(--ec-credits-padding);color:var(--ec-credits-color);box-shadow:var(--ec-credits-shadow);border:var(--ec-credits-border);display:flex;align-items:center;gap:12px}.credits-icon{width:44px;height:44px;border-radius:12px;background:var(--ec-credits-icon-bg);box-shadow:var(--ec-credits-icon-shadow);flex:0 0 auto}.credits-icon-text{color:#fff;font-weight:800;font-size:20px;letter-spacing:.04em}.credits-label{color:#ffffffb8;font-size:11px;letter-spacing:.08em}.credits-title{color:#fff;font-weight:700;line-height:1.1;font-size:16px}.credits-content .credits-pill{background:var(--ec-credits-pill-bg);color:var(--ec-credits-color);border:var(--ec-credits-pill-border);border-radius:12px;padding:6px 12px;display:inline-flex;align-items:center;gap:4px;white-space:nowrap}.credits-content .credits-pill-light{background:var(--ec-credits-pill-light-bg);color:var(--ec-credits-pill-light-color)}.credits-progress{background:var(--ec-credits-progress-bg);border-radius:999px;height:12px;overflow:hidden;box-shadow:var(--ec-credits-progress-shadow)}.credits-progress-fill{height:100%;border-radius:inherit;transition:width .35s ease}.credits-footnote{color:#ffffffc7}.credits-footnote small{color:inherit;opacity:.9;font-size:11px}.dot{width:8px;height:8px;border-radius:50%;display:inline-block}.dot-green{background-color:#198754}.dot-amber{background-color:#ffc107}.dot-red{background-color:#dc3545}@media (max-width: 768px){.credits-banner{padding:12px}.credits-footnote{gap:8px}}.credits-inline{min-width:280px;max-width:400px;height:68px;flex:0 0 auto;padding:8px 12px;overflow:hidden}.credits-inline .credits-icon{width:36px;height:36px;border-radius:10px}.credits-inline .credits-title{font-size:14px}.credits-inline .credits-label{font-size:10px}.credits-inline .credits-pill{padding:4px 10px}.credits-inline .credits-progress{height:8px}.credits-summary{flex-wrap:nowrap!important;gap:8px!important}.credits-mobile{width:100%;padding:12px;flex-direction:column;align-items:stretch}.credits-mobile .credits-progress{height:8px}.credits-mobile .credits-pill{padding:4px 10px}.credits-mobile-values{display:grid;grid-template-columns:repeat(2,1fr);gap:6px;width:100%}.credits-mobile-value small{color:#ffffffb3;letter-spacing:.08em}.credits-mobile-value span{display:block;color:#fff}\n"] }]
13247
+ }], propDecorators: { layout: [{
13248
+ type: Input
13249
+ }], title: [{
13250
+ type: Input
13251
+ }], subtitle: [{
13252
+ type: Input
13253
+ }], availableLabel: [{
13254
+ type: Input
13255
+ }], limitLabel: [{
13256
+ type: Input
13257
+ }], titleKey: [{
13258
+ type: Input
13259
+ }], subtitleKey: [{
13260
+ type: Input
13261
+ }], availableLabelKey: [{
13262
+ type: Input
13263
+ }], limitLabelKey: [{
13264
+ type: Input
13265
+ }], requireLogged: [{
13266
+ type: Input
13267
+ }] } });
13268
+
13035
13269
  //Types
13036
13270
 
13037
13271
  /**
@@ -13319,5 +13553,5 @@ const directives = [
13319
13553
  * Generated bundle index. Do not edit.
13320
13554
  */
13321
13555
 
13322
- export { AccountEcComponent, AddressingService, AnalyticsService, AuthEcComponent, AuthService, AuthStorageService, BaseApiService, BlockBannerBoxEcComponent, BlockBannerFullEcComponent, BlockFormContactEcComponent, BlockHtmlEcComponent, BlockNewsletterEcComponent, BlockProductsEcComponent, BlocksEcComponent, BlocksRepositoryService, BlocksService, BreadcrumbEcComponent, CartEcComponent, CartItemEcComponent, CartService, ChannelService, CheckoutEcComponent, CheckoutService, CollectionEcComponent, ConfirmAccountEcComponent, ContactEcComponent, CoreConstantsService, CouponEcComponent, CurrencyService, DopplerService, ENVIRONMENT_TOKEN, EcCurrencySymbolPipe, EcSafeHtmlPipe, FacebookPixelService, FaqsEcComponent, FiltersEcComponent, FiltersService, FiltersSortEcComponent, FooterEcComponent, ForgotPasswordEcComponent, FormService, GTMService, GoogleAnalyticsService, HeaderEcComponent, HomeEcComponent, LoadingFullEcComponent, LoadingInlineEcComponent, LoadingSectionEcComponent, LocalStorageService, LoginFormEcComponent, MagnizoomEcComponent, MetricoolPixelService, NgxLocalStorageService, OptionsService, OrderEcComponent, OrderUtilityService, OrdersListEcComponent, OrdersService, PaginationService, ParametersService, ParamsContext, PasswordResetEcComponent, PaymentService, PriceEcComponent, PriceRangeFilterComponent, ProductDetailEcComponent, ProductDetailService, ProductEcComponent, ProductOffDirective, ProductStockDirective, ProductsService, ReCaptchaEcComponent, ReCaptchaService, RedsysCatchEcComponent, RegisterFormEcComponent, RegisterWholesalerFormEcComponent, RelatedProductsEcComponent, ReviewsEcComponent, ReviewsFormEcComponent, RuntimeConfigService, SectionContainerEcComponent, ShareEcComponent, ShipmentService, SidebarEcComponent, StoresEcComponent, SuccessEcComponent, TestService, ToastService, VariantsEcComponent, authGuard, authInterceptor, directives, initializeRuntimeConfig, provideEnvironment, provideRuntimeConfig, runtimeConfigInterceptor };
13556
+ export { AccountEcComponent, AddressingService, AnalyticsService, AuthEcComponent, AuthService, AuthStorageService, BaseApiService, BlockBannerBoxEcComponent, BlockBannerFullEcComponent, BlockFormContactEcComponent, BlockHtmlEcComponent, BlockNewsletterEcComponent, BlockProductsEcComponent, BlocksEcComponent, BlocksRepositoryService, BlocksService, BreadcrumbEcComponent, CartEcComponent, CartItemEcComponent, CartService, ChannelService, CheckoutEcComponent, CheckoutService, CollectionEcComponent, ConfirmAccountEcComponent, ContactEcComponent, CoreConstantsService, CouponEcComponent, CreditAccountBannerEcComponent, CurrencyService, DopplerService, ENVIRONMENT_TOKEN, EcCurrencySymbolPipe, EcSafeHtmlPipe, FacebookPixelService, FaqsEcComponent, FiltersEcComponent, FiltersService, FiltersSortEcComponent, FooterEcComponent, ForgotPasswordEcComponent, FormService, GTMService, GoogleAnalyticsService, HeaderEcComponent, HomeEcComponent, LoadingFullEcComponent, LoadingInlineEcComponent, LoadingSectionEcComponent, LocalStorageService, LoginFormEcComponent, MagnizoomEcComponent, MetricoolPixelService, NgxLocalStorageService, OptionsService, OrderEcComponent, OrderUtilityService, OrdersListEcComponent, OrdersService, PaginationService, ParametersService, ParamsContext, PasswordResetEcComponent, PaymentService, PriceEcComponent, PriceRangeFilterComponent, PriceVisibilityService, ProductDetailEcComponent, ProductDetailService, ProductEcComponent, ProductOffDirective, ProductStockDirective, ProductsService, ReCaptchaEcComponent, ReCaptchaService, RedsysCatchEcComponent, RegisterFormEcComponent, RegisterWholesalerFormEcComponent, RelatedProductsEcComponent, ReviewsEcComponent, ReviewsFormEcComponent, RuntimeConfigService, SectionContainerEcComponent, ShareEcComponent, ShipmentService, SidebarEcComponent, StoresEcComponent, SuccessEcComponent, TestService, ToastService, VariantsEcComponent, authGuard, authInterceptor, directives, initializeRuntimeConfig, provideEnvironment, provideRuntimeConfig, runtimeConfigInterceptor };
13323
13557
  //# sourceMappingURL=ng-easycommerce-v18.mjs.map