ng-easycommerce-v18 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/classes/filters/PriceRangeFilter.mjs +48 -0
- package/esm2022/lib/ec-components/account-ec/order-ec/order-ec.component.mjs +75 -6
- package/esm2022/lib/ec-components/account-ec/orders-list-ec/orders-list-ec.component.mjs +3 -3
- package/esm2022/lib/ec-components/blocks-ec/block-products-ec/block-products-ec.component.mjs +1 -1
- package/esm2022/lib/ec-components/cart-ec/cart-item-ec/cart-item-ec.component.mjs +53 -3
- package/esm2022/lib/ec-components/filters-ec/filters-ec.component.mjs +95 -4
- package/esm2022/lib/ec-components/index.mjs +5 -1
- package/esm2022/lib/ec-components/product-detail-ec/product-detail-ec.component.mjs +25 -1
- package/esm2022/lib/ec-components/product-ec/product-ec.component.mjs +20 -3
- package/esm2022/lib/ec-components/sidebar-ec/sidebar-ec.component.mjs +60 -0
- package/esm2022/lib/ec-components/widgets-ec/index.mjs +2 -1
- package/esm2022/lib/ec-services/auth.service.mjs +17 -6
- package/esm2022/lib/ec-services/cart.service.mjs +19 -2
- package/esm2022/lib/ec-services/filters.service.mjs +3 -2
- package/esm2022/lib/ec-services/ngx-local-storage.service.mjs +7 -7
- package/esm2022/lib/ec-services/orders.service.mjs +28 -1
- package/esm2022/lib/ec-services/pagination.service.mjs +8 -1
- package/esm2022/lib/ec-services/product-detail.service.mjs +1 -1
- package/esm2022/lib/ec-services/products.service.mjs +29 -1
- package/esm2022/lib/interfaces/filter.mjs +1 -1
- package/esm2022/lib/interfaces/product.mjs +1 -1
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/ng-easycommerce-v18.mjs +455 -28
- package/fesm2022/ng-easycommerce-v18.mjs.map +1 -1
- package/lib/classes/filters/PriceRangeFilter.d.ts +23 -0
- package/lib/ec-components/account-ec/order-ec/order-ec.component.d.ts +23 -1
- package/lib/ec-components/cart-ec/cart-item-ec/cart-item-ec.component.d.ts +4 -1
- package/lib/ec-components/filters-ec/filters-ec.component.d.ts +20 -1
- package/lib/ec-components/index.d.ts +1 -0
- package/lib/ec-components/product-detail-ec/product-detail-ec.component.d.ts +9 -0
- package/lib/ec-components/product-ec/product-ec.component.d.ts +5 -1
- package/lib/ec-components/sidebar-ec/sidebar-ec.component.d.ts +29 -0
- package/lib/ec-services/auth.service.d.ts +3 -1
- package/lib/ec-services/cart.service.d.ts +10 -1
- package/lib/ec-services/orders.service.d.ts +6 -0
- package/lib/ec-services/pagination.service.d.ts +5 -0
- package/lib/ec-services/products.service.d.ts +14 -0
- package/lib/interfaces/filter.d.ts +2 -2
- package/lib/interfaces/product.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, makeEnvironmentProviders, inject, Injectable, PLATFORM_ID, RendererFactory2, afterNextRender, signal, EnvironmentInjector, runInInjectionContext, Component, CUSTOM_ELEMENTS_SCHEMA, Input, Pipe, EventEmitter, Output, forwardRef, afterRender, ViewChild } from '@angular/core';
|
|
2
|
+
import { InjectionToken, makeEnvironmentProviders, inject, Injectable, PLATFORM_ID, RendererFactory2, afterNextRender, signal, EnvironmentInjector, runInInjectionContext, Component, CUSTOM_ELEMENTS_SCHEMA, Input, Pipe, EventEmitter, Output, forwardRef, afterRender, ViewChild, Injector } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { isPlatformBrowser, DOCUMENT, AsyncPipe, CommonModule, JsonPipe, UpperCasePipe, Location, TitleCasePipe } from '@angular/common';
|
|
5
5
|
import { take, BehaviorSubject, shareReplay, map, catchError, of, filter, ReplaySubject, firstValueFrom, concatMap, switchMap, combineLatest, throwError } from 'rxjs';
|
|
@@ -12,7 +12,7 @@ import { Router, NavigationEnd, RouterLink, RouterModule, ActivatedRoute, Router
|
|
|
12
12
|
import { signalStore, withState, withMethods, patchState } from '@ngrx/signals';
|
|
13
13
|
import { ToastrService } from 'ngx-toastr';
|
|
14
14
|
import moment from 'moment';
|
|
15
|
-
import {
|
|
15
|
+
import { StorageMap } from '@ngx-pwa/local-storage';
|
|
16
16
|
import * as i1$3 from '@angular/forms';
|
|
17
17
|
import { Validators, FormBuilder, NG_VALUE_ACCESSOR, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
18
18
|
import { register } from 'swiper/element/bundle';
|
|
@@ -3283,11 +3283,12 @@ class AuthService {
|
|
|
3283
3283
|
* Chequea si un usuario esta habilitado a comprar o no.
|
|
3284
3284
|
* @returns
|
|
3285
3285
|
*/
|
|
3286
|
-
isAbleToBuy() {
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
}
|
|
3286
|
+
// isAbleToBuy():boolean {
|
|
3287
|
+
// const currentUser = this.getUserProfileAsUser() as User;
|
|
3288
|
+
// const isSeller = currentUser.typeUser && currentUser.typeUser == 'seller' || false
|
|
3289
|
+
// return !isSeller || !this.getCustomer();
|
|
3290
|
+
// }
|
|
3291
|
+
isAbleToBuy = () => !this.getUserProfileAsUser()?.isSeller() || !!this.getCustomer();
|
|
3291
3292
|
/**
|
|
3292
3293
|
* Retorna un usuario de tipo cliente.
|
|
3293
3294
|
* @returns
|
|
@@ -3374,6 +3375,16 @@ class AuthService {
|
|
|
3374
3375
|
locale: channelConfig.locale
|
|
3375
3376
|
});
|
|
3376
3377
|
};
|
|
3378
|
+
getUserProfile() {
|
|
3379
|
+
return (this._user && of(this._user)) || this.getCurrentUser();
|
|
3380
|
+
}
|
|
3381
|
+
getCurrentUser() {
|
|
3382
|
+
this._user = new User();
|
|
3383
|
+
if (!this.loadUserFromStorage()) {
|
|
3384
|
+
this._user = null;
|
|
3385
|
+
}
|
|
3386
|
+
return of(this._user);
|
|
3387
|
+
}
|
|
3377
3388
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3378
3389
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AuthService, providedIn: 'root' });
|
|
3379
3390
|
}
|
|
@@ -3448,7 +3459,7 @@ class FiltersService {
|
|
|
3448
3459
|
setFilters(paginationSettings) {
|
|
3449
3460
|
let final_filters = [];
|
|
3450
3461
|
if (this._optionsFilters?.includes('all'))
|
|
3451
|
-
this._optionsFilters = ['attributes', 'categories', 'dynamics', 'sort'];
|
|
3462
|
+
this._optionsFilters = ['attributes', 'categories', 'dynamics', 'sort', 'price_range'];
|
|
3452
3463
|
runInInjectionContext(this.environmentInjector, () => {
|
|
3453
3464
|
const filterFactory = new FilterFactory();
|
|
3454
3465
|
this._optionsFilters?.forEach(filter => final_filters.push(filterFactory.create(filter, paginationSettings)));
|
|
@@ -3458,6 +3469,7 @@ class FiltersService {
|
|
|
3458
3469
|
filter && filterDefault.codes.forEach(value => filter.setSelected(value));
|
|
3459
3470
|
});
|
|
3460
3471
|
this._filtersSubject.next(final_filters);
|
|
3472
|
+
// case 'price_range': instance = new PriceRangeFilter(); break; COMO ADAPTO ESTE CODIGO A LA NUEVA ESTRUCTURA DE FILTROS
|
|
3461
3473
|
}
|
|
3462
3474
|
/**
|
|
3463
3475
|
* Obtengo filtros especificos según el tipo.
|
|
@@ -3544,6 +3556,8 @@ class PaginationService {
|
|
|
3544
3556
|
nextProducts$ = this._nextProductsSubject.asObservable();
|
|
3545
3557
|
_resetSubject = new BehaviorSubject(false);
|
|
3546
3558
|
reset$ = this._resetSubject.asObservable();
|
|
3559
|
+
priceRangeSubject = new BehaviorSubject({ price_min: 0, price_max: 0 });
|
|
3560
|
+
priceRange$ = this.priceRangeSubject.asObservable();
|
|
3547
3561
|
constructor() { }
|
|
3548
3562
|
/**
|
|
3549
3563
|
* Inicializa la configuración para el Servicio de Paginación.
|
|
@@ -3589,6 +3603,11 @@ class PaginationService {
|
|
|
3589
3603
|
this._dataPagination.set({ ...response, called: true });
|
|
3590
3604
|
this._finished = (response.page == response.pages);
|
|
3591
3605
|
this._waiting = false;
|
|
3606
|
+
// Emitir los valores de price_min y price_max a través de priceRangeSubject
|
|
3607
|
+
// this.priceRangeSubject.next({
|
|
3608
|
+
// price_min: response.price_min,
|
|
3609
|
+
// price_max: response.price_max
|
|
3610
|
+
// });
|
|
3592
3611
|
}
|
|
3593
3612
|
/**
|
|
3594
3613
|
* Marca el final de las paginas, es decir cuando ya no queda mas elementos que mostrar.
|
|
@@ -3671,6 +3690,54 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
3671
3690
|
}]
|
|
3672
3691
|
}], ctorParameters: () => [] });
|
|
3673
3692
|
|
|
3693
|
+
class PriceRangeFilter extends Filter {
|
|
3694
|
+
minPrice = 0;
|
|
3695
|
+
maxPrice = 1000;
|
|
3696
|
+
currentMinPrice = null;
|
|
3697
|
+
currentMaxPrice = null;
|
|
3698
|
+
type = () => 'price_range';
|
|
3699
|
+
// Método para configurar el rango de precios inicial
|
|
3700
|
+
setContent = (options) => {
|
|
3701
|
+
this.minPrice = options.minPrice || this.minPrice;
|
|
3702
|
+
this.maxPrice = options.maxPrice || this.maxPrice;
|
|
3703
|
+
this.currentMinPrice = options.currentMinPrice || this.minPrice;
|
|
3704
|
+
this.currentMaxPrice = options.currentMaxPrice || this.maxPrice;
|
|
3705
|
+
};
|
|
3706
|
+
updatePrices(min, max) {
|
|
3707
|
+
this.minPrice = min;
|
|
3708
|
+
this.maxPrice = max;
|
|
3709
|
+
}
|
|
3710
|
+
// Método para actualizar los valores seleccionados
|
|
3711
|
+
setSelected = (min, max) => {
|
|
3712
|
+
this.currentMinPrice = min;
|
|
3713
|
+
this.currentMaxPrice = max;
|
|
3714
|
+
};
|
|
3715
|
+
// Retorna los valores seleccionados (rango de precios)
|
|
3716
|
+
getSelectedRange = () => {
|
|
3717
|
+
return {
|
|
3718
|
+
min: this.currentMinPrice || this.minPrice,
|
|
3719
|
+
max: this.currentMaxPrice || this.maxPrice,
|
|
3720
|
+
};
|
|
3721
|
+
};
|
|
3722
|
+
// Genera los parámetros de la URL en base al rango de precios seleccionado
|
|
3723
|
+
toUrlParams = () => {
|
|
3724
|
+
let params = '';
|
|
3725
|
+
if (this.currentMinPrice !== null) {
|
|
3726
|
+
params += `&price_min=${this.currentMinPrice}`;
|
|
3727
|
+
}
|
|
3728
|
+
if (this.currentMaxPrice !== null) {
|
|
3729
|
+
params += `&price_max=${this.currentMaxPrice}`;
|
|
3730
|
+
}
|
|
3731
|
+
return params;
|
|
3732
|
+
};
|
|
3733
|
+
// Restablece el filtro a los valores por defecto
|
|
3734
|
+
reset = () => {
|
|
3735
|
+
this.currentMinPrice = 0;
|
|
3736
|
+
this.currentMaxPrice = this.maxPrice;
|
|
3737
|
+
};
|
|
3738
|
+
}
|
|
3739
|
+
|
|
3740
|
+
;
|
|
3674
3741
|
class ProductsService {
|
|
3675
3742
|
_connection = inject(ConnectionService);
|
|
3676
3743
|
_apiConsts = inject(ApiConstantsService);
|
|
@@ -3680,6 +3747,8 @@ class ProductsService {
|
|
|
3680
3747
|
_productsSubject = new BehaviorSubject([]);
|
|
3681
3748
|
products$ = this._productsSubject.asObservable();
|
|
3682
3749
|
_filtersService = inject(FiltersService);
|
|
3750
|
+
filtersSubject = new BehaviorSubject([]);
|
|
3751
|
+
filters$ = this.filtersSubject.asObservable();
|
|
3683
3752
|
searchValue = signal('');
|
|
3684
3753
|
constructor() {
|
|
3685
3754
|
this._paginationService.reset$.subscribe(res => {
|
|
@@ -3692,10 +3761,18 @@ class ProductsService {
|
|
|
3692
3761
|
const currentProducts = this._productsSubject.value;
|
|
3693
3762
|
this._productsSubject.next([...currentProducts, ...products]);
|
|
3694
3763
|
});
|
|
3764
|
+
// Suscribirse a los cambios en el rango de precios
|
|
3765
|
+
this._paginationService.priceRange$.subscribe(range => {
|
|
3766
|
+
this.updatePriceRangeFilter(range.price_min, range.price_max);
|
|
3767
|
+
});
|
|
3695
3768
|
}
|
|
3696
3769
|
//API URL
|
|
3697
3770
|
_shopApiUrl = this._apiConsts.SHOP_API_URL;
|
|
3698
3771
|
productByCodeApi(code, variant) { return this._shopApiUrl + this._apiConsts.CHANNEL + '/products/by-code/' + (variant ? 'variant/' : '') + code + '?locale=' + this._apiConsts.LOCALE; }
|
|
3772
|
+
// review
|
|
3773
|
+
saveProductReviewsApi(code) { return this._shopApiUrl + this._apiConsts.CHANNEL + '/products/by-code/' + code + '/reviews'; }
|
|
3774
|
+
//related products
|
|
3775
|
+
relatedProductsApi = (key) => 'shop-api/' + this._apiConsts.CHANNEL + '/products/related/by-code/' + key + '?locale=' + this._apiConsts.LOCALE;
|
|
3699
3776
|
/**
|
|
3700
3777
|
* Setea los filtros para obtener los productos.
|
|
3701
3778
|
* @param paginationSettings
|
|
@@ -3722,6 +3799,13 @@ class ProductsService {
|
|
|
3722
3799
|
getProductByCode(code, variant) {
|
|
3723
3800
|
return this._connection.get(this.productByCodeApi(code, variant));
|
|
3724
3801
|
}
|
|
3802
|
+
/**
|
|
3803
|
+
* @description Guarda la reseña de un producto.
|
|
3804
|
+
* @param code
|
|
3805
|
+
* @param form_data
|
|
3806
|
+
* @returns
|
|
3807
|
+
*/
|
|
3808
|
+
saveReviews = (code, form_data) => this._connection.post(this.saveProductReviewsApi(code), form_data);
|
|
3725
3809
|
/**
|
|
3726
3810
|
* Recibe una lista de productos y retorna los mismos productos tantas veces como variantes tenga.
|
|
3727
3811
|
* cada producto retornado tendrá una única variante.
|
|
@@ -3801,6 +3885,15 @@ class ProductsService {
|
|
|
3801
3885
|
getObjectWithVariant = () => {
|
|
3802
3886
|
return this._consts.getParamsProductsWithUniqueVariant();
|
|
3803
3887
|
};
|
|
3888
|
+
updatePriceRangeFilter(min, max) {
|
|
3889
|
+
const final_filters = this.filtersSubject.value;
|
|
3890
|
+
const priceRangeFilter = final_filters.find(filter => filter instanceof PriceRangeFilter);
|
|
3891
|
+
if (priceRangeFilter) {
|
|
3892
|
+
priceRangeFilter.updatePrices(min, max);
|
|
3893
|
+
this.filtersSubject.next(final_filters);
|
|
3894
|
+
}
|
|
3895
|
+
}
|
|
3896
|
+
getRelatedProducts = (key) => this._connection.get(this.relatedProductsApi(key));
|
|
3804
3897
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ProductsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3805
3898
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ProductsService, providedIn: 'root' });
|
|
3806
3899
|
}
|
|
@@ -3820,11 +3913,11 @@ class NgxLocalStorageService {
|
|
|
3820
3913
|
/**
|
|
3821
3914
|
* Servicio usado para guardar los datos en el localstorage.
|
|
3822
3915
|
*/
|
|
3823
|
-
_storage = inject(
|
|
3916
|
+
_storage = inject(StorageMap);
|
|
3824
3917
|
constructor() { }
|
|
3825
3918
|
getItemPromise(key) {
|
|
3826
3919
|
return new Promise((resolve, reject) => {
|
|
3827
|
-
this._storage.
|
|
3920
|
+
this._storage.get(key).subscribe({
|
|
3828
3921
|
next: (data) => resolve(data),
|
|
3829
3922
|
error: (err) => reject(err),
|
|
3830
3923
|
});
|
|
@@ -3836,7 +3929,7 @@ class NgxLocalStorageService {
|
|
|
3836
3929
|
* @returns
|
|
3837
3930
|
*/
|
|
3838
3931
|
getItem(key) {
|
|
3839
|
-
return this._storage.
|
|
3932
|
+
return this._storage.get(key);
|
|
3840
3933
|
}
|
|
3841
3934
|
/**
|
|
3842
3935
|
* Guarda un dato en el storage.
|
|
@@ -3845,7 +3938,7 @@ class NgxLocalStorageService {
|
|
|
3845
3938
|
* @param metadata Opciones extra que puede necesitar el servicio.
|
|
3846
3939
|
*/
|
|
3847
3940
|
setItem(key, value, metadata = { path: '/' }) {
|
|
3848
|
-
this._storage.
|
|
3941
|
+
this._storage.set(key, value).subscribe(() => { });
|
|
3849
3942
|
}
|
|
3850
3943
|
/**
|
|
3851
3944
|
* Remueve el item del storage.
|
|
@@ -3853,7 +3946,7 @@ class NgxLocalStorageService {
|
|
|
3853
3946
|
* @param metadata Opciones extra que puede necesitar el servicio.
|
|
3854
3947
|
*/
|
|
3855
3948
|
removeItem(key, metadata) {
|
|
3856
|
-
this._storage.
|
|
3949
|
+
this._storage.delete(key).subscribe(() => { });
|
|
3857
3950
|
}
|
|
3858
3951
|
/**
|
|
3859
3952
|
* Limpia el Storage.
|
|
@@ -3896,6 +3989,8 @@ class CartService {
|
|
|
3896
3989
|
showMax: false,
|
|
3897
3990
|
showPrice: false,
|
|
3898
3991
|
remainingCredits: 0,
|
|
3992
|
+
applyMaxOrders: false,
|
|
3993
|
+
maxOrders: Infinity
|
|
3899
3994
|
});
|
|
3900
3995
|
CART_KEY = 'cart';
|
|
3901
3996
|
CART_TOKEN_KEY = 'cart_token';
|
|
@@ -3909,6 +4004,13 @@ class CartService {
|
|
|
3909
4004
|
cart$ = this._cartSubject.asObservable();
|
|
3910
4005
|
loading$ = this._requestInProcess.asObservable();
|
|
3911
4006
|
_haveToUpdate = true;
|
|
4007
|
+
balanceCustomer$ = this._balanceCustomerSubject.asObservable();
|
|
4008
|
+
allowAnyPaymentMethod$ = this.balanceCustomer$.pipe(map(data => data.allowAnyPaymentMethod));
|
|
4009
|
+
allowExceedBalance$ = this.balanceCustomer$.pipe(map(data => data.allowExceedBalance));
|
|
4010
|
+
creditAmount$ = this.balanceCustomer$.pipe(map(data => data.creditAmount));
|
|
4011
|
+
showMax$ = this.balanceCustomer$.pipe(map(data => data.showMax));
|
|
4012
|
+
showPrice$ = this.balanceCustomer$.pipe(map(data => data.showPrice));
|
|
4013
|
+
promotions$ = this._promotionsSubject.asObservable();
|
|
3912
4014
|
//API URL
|
|
3913
4015
|
_cartBaseUrl = `${this._apiConsts.SHOP_API_URL}${this._apiConsts.CHANNEL}/carts`;
|
|
3914
4016
|
updateItemQuantityApi(item_id) { return this._cartBaseUrl + '/' + this.cartToken + '/items/' + item_id + '?locale=' + this._apiConsts.LOCALE; }
|
|
@@ -3979,7 +4081,11 @@ class CartService {
|
|
|
3979
4081
|
* @returns
|
|
3980
4082
|
*/
|
|
3981
4083
|
addToCart(product, quantity, variantId) {
|
|
3982
|
-
|
|
4084
|
+
const balance = this._balanceCustomerSubject.value;
|
|
4085
|
+
if (balance.applyMaxOrders && (balance.maxOrders && (balance.maxOrders <= 0 || balance.maxOrders === null))) {
|
|
4086
|
+
this._toastService.show('max-orders-reached');
|
|
4087
|
+
return;
|
|
4088
|
+
}
|
|
3983
4089
|
if (!this._authService.isAbleToBuy()) {
|
|
3984
4090
|
this._toastService.show('must-select-customer');
|
|
3985
4091
|
return;
|
|
@@ -4302,6 +4408,8 @@ class CartService {
|
|
|
4302
4408
|
remainingCredits: cartData?.creditAmount && cartData?.creditAmount >= cartData?.totals.total
|
|
4303
4409
|
? cartData?.creditAmount - cartData?.totals.total
|
|
4304
4410
|
: 0,
|
|
4411
|
+
applyMaxOrders: cartData?.applyMaxOrders ?? false,
|
|
4412
|
+
maxOrders: cartData?.maxOrders ?? Infinity
|
|
4305
4413
|
};
|
|
4306
4414
|
this._balanceCustomerSubject.next(balanceData);
|
|
4307
4415
|
console.log(balanceData);
|
|
@@ -4318,6 +4426,8 @@ class CartService {
|
|
|
4318
4426
|
error: (err) => this.handleError(err)
|
|
4319
4427
|
});
|
|
4320
4428
|
}
|
|
4429
|
+
getCreditAmount = () => this._balanceCustomerSubject.pipe(map((balanceCustomer) => balanceCustomer?.creditAmount ?? null));
|
|
4430
|
+
getRemainingCredits = () => this._balanceCustomerSubject.pipe(map((balanceCustomer) => balanceCustomer?.remainingCredits));
|
|
4321
4431
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: CartService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4322
4432
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: CartService, providedIn: 'root' });
|
|
4323
4433
|
}
|
|
@@ -5243,10 +5353,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
5243
5353
|
class OrdersService {
|
|
5244
5354
|
_connection = inject(ConnectionService);
|
|
5245
5355
|
_apiConsts = inject(ApiConstantsService);
|
|
5356
|
+
_cartService = inject(CartService);
|
|
5246
5357
|
_ordersSubject = new BehaviorSubject(null);
|
|
5247
5358
|
_errorSubject = new BehaviorSubject(null);
|
|
5359
|
+
_selectedOrderSubject = new BehaviorSubject(null);
|
|
5248
5360
|
orders$ = this._ordersSubject.asObservable();
|
|
5361
|
+
selectedOrder$ = this._selectedOrderSubject.asObservable();
|
|
5249
5362
|
loading = false;
|
|
5363
|
+
channelConfig = {};
|
|
5250
5364
|
//API URL
|
|
5251
5365
|
ordersListapi() { return `shop-api/${this._apiConsts.CHANNEL}/orders`; }
|
|
5252
5366
|
;
|
|
@@ -5273,6 +5387,28 @@ class OrdersService {
|
|
|
5273
5387
|
return order;
|
|
5274
5388
|
});
|
|
5275
5389
|
}
|
|
5390
|
+
setSelectedOrder(order) {
|
|
5391
|
+
this._selectedOrderSubject.next(order);
|
|
5392
|
+
this.channelConfig = (this._cartService.channelConfig);
|
|
5393
|
+
}
|
|
5394
|
+
getOrderByNumber(number) {
|
|
5395
|
+
this.loading = true;
|
|
5396
|
+
this._connection.get(this.ordersListapi())
|
|
5397
|
+
.pipe(map(res => {
|
|
5398
|
+
let orders = this.mapOrdersAndAddInfo(res);
|
|
5399
|
+
const order = orders.find((order) => order.number == number);
|
|
5400
|
+
return order;
|
|
5401
|
+
}))
|
|
5402
|
+
.subscribe({
|
|
5403
|
+
next: (response) => {
|
|
5404
|
+
this._selectedOrderSubject.next(response);
|
|
5405
|
+
this.loading = false;
|
|
5406
|
+
},
|
|
5407
|
+
error: (e) => {
|
|
5408
|
+
this._errorSubject.next({ message: 'unable-get-orders' });
|
|
5409
|
+
}
|
|
5410
|
+
});
|
|
5411
|
+
}
|
|
5276
5412
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: OrdersService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5277
5413
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: OrdersService, providedIn: 'root' });
|
|
5278
5414
|
}
|
|
@@ -5875,6 +6011,7 @@ class ProductEcComponent {
|
|
|
5875
6011
|
* Constantes del core
|
|
5876
6012
|
*/
|
|
5877
6013
|
loaded = new EventEmitter();
|
|
6014
|
+
isCollection = false;
|
|
5878
6015
|
ngOnInit() {
|
|
5879
6016
|
this.loaded.emit(this.product.id);
|
|
5880
6017
|
}
|
|
@@ -5885,12 +6022,23 @@ class ProductEcComponent {
|
|
|
5885
6022
|
* URL para las imagenes del producto.
|
|
5886
6023
|
*/
|
|
5887
6024
|
mediaUrl = this.consts.mediaUrl();
|
|
6025
|
+
openWhatsApp(url) {
|
|
6026
|
+
if (url) {
|
|
6027
|
+
window.open(url, '_blank');
|
|
6028
|
+
}
|
|
6029
|
+
}
|
|
6030
|
+
get shouldShowPrice() {
|
|
6031
|
+
return !this.product?.special_mark || this.product.special_mark.length === 0 || this.product.special_mark[0]?.showPrice;
|
|
6032
|
+
}
|
|
6033
|
+
get hasDiscount() {
|
|
6034
|
+
return this.product.saleprice && this.product.saleprice !== this.product.price;
|
|
6035
|
+
}
|
|
5888
6036
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ProductEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5889
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: ProductEcComponent, isStandalone: true, selector: "app-product-ec", inputs: { product: "product", isProductBox: "isProductBox" }, outputs: { loaded: "loaded" }, ngImport: i0, template: "
|
|
6037
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", 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\">\r\n <!-- Marca especial y descuento -->\r\n <!-- <div *ngIf=\"product.saleprice || (product.special_mark && product.special_mark !== null && product.special_mark !== undefined && product.special_mark.length >0)\"\r\n class=\"marcas\">\r\n <div *ecProductStock=\"product\" [ecProductMini]=\"product.special_mark\"></div>\r\n <ng-container *ngIf=\"shouldShowPrice\">\r\n <div *ecProductStock=\"product\" [ngClass]=\"{'tag-dsc float-right': product.saleprice}\"\r\n [ecProductOff]=\"product\">\r\n </div>\r\n </ng-container>\r\n </div> -->\r\n\r\n <!-- Imagen del producto -->\r\n <div class=\"foto\">\r\n @if(product.picturesdefault){\r\n @if (product.picturesdefault && product.picturesdefault.length > 1 ) {\r\n <img [src]=\"mediaUrl + product.picturesdefault[0]\" alt=\"Imagen principal\" class=\"w-100 pic01\" />\r\n <img [src]=\"mediaUrl + product.picturesdefault[1]\" alt=\"Imagen secundaria\" class=\"w-100 pic02\" />\r\n } @else {\r\n <img [src]=\"mediaUrl + product.picturesdefault[0]\" alt=\"Imagen principal\" class=\"w-100 pic01\" />\r\n }\r\n }\r\n </div>\r\n <!-- Precio -->\r\n @if (shouldShowPrice) {\r\n <app-price-ec [price]=\"product.price\" [saleprice]=\"product.saleprice\" class=\"\" />\r\n }@else {\r\n <p class=\"noPrice mb-1 mt-2 pt-1\"></p>\r\n }\r\n\r\n <!-- Nombre del producto -->\r\n <h6 class=\"my-0\">{{ product.name | titlecase }}</h6>\r\n\r\n <p class=\"sku mt-2\" [innerHTML]=\"product.shortdetails\"></p>\r\n\r\n <div class=\"fixBottom mt-1\">\r\n\r\n <!-- Bot\u00F3n de acciones -->\r\n <!-- <ng-container *ecProductStock=\"product; else noStock\"> -->\r\n <!-- Cuando no tiene marca especial o es de tipo 'standard' -->\r\n @if (!product?.special_mark || product.special_mark?.length === 0 || product.special_mark?.[0]?.type ===\r\n 'standard') {\r\n <button class=\"btn\" [ngClass]=\"isCollection ? 'px-2 w-100 d-sm-block' : 'py-2 px-4'\">\r\n <ng-container *ngIf=\"isCollection; else normalText\">\r\n <span> {{(\"buy\" | translate) | uppercase}} </span>\r\n </ng-container>\r\n <ng-template #normalText>\r\n {{(\"buy\" | translate) | uppercase}}\r\n </ng-template>\r\n </button>\r\n }\r\n <!-- Cuando tiene marca especial y el tipo no es 'standard' -->\r\n @if(product?.special_mark?.[0]?.type !== 'standard'){\r\n @for (item of product.special_mark; track $index) {\r\n <!-- Caso 1: Agotado o Disponible muy pronto -->\r\n @if (item.type === 'out_of_stock' || item.type === 'coming_soon') {\r\n <button class=\"btn\" [ngClass]=\"isCollection ? 'px-2 w-100 d-sm-block' : 'py-2 px-4'\">\r\n @if(isCollection){\r\n <span>{{ item.name | uppercase }}</span>\r\n }@else {\r\n {{ item.name | uppercase }}\r\n }\r\n </button>}\r\n <!-- Caso 2: Contacto por WhatsApp -->\r\n @if (item.type === 'whatsapp_contact') {\r\n <button class=\"btn\" [ngClass]=\"isCollection ? 'px-2 w-100 d-sm-block' : 'py-2 px-4'\"\r\n (click)=\"openWhatsApp(item.whatsappContact)\">\r\n @if(isCollection){\r\n <span>{{ item.name | uppercase }}</span>\r\n }@else {\r\n {{ item.name | uppercase }}\r\n }\r\n\r\n </button>\r\n }\r\n <!-- Caso 3: Solicitar m\u00E1s informaci\u00F3n -->\r\n @if (item.type === 'more_info') {\r\n <button *ngIf=\"\" class=\"btn\" [ngClass]=\"isCollection ? 'px-2 w-100 d-sm-block' : 'py-2 px-4'\">\r\n\r\n @if(isCollection){\r\n <span>{{ item.name | uppercase }}</span>\r\n }@else {\r\n {{ item.name | uppercase }}\r\n }\r\n </button>\r\n }\r\n\r\n }\r\n }\r\n\r\n <!-- </ng-container>\r\n <ng-template #noStock>\r\n <button class=\"btn\" [ngClass]=\"isCollection ? 'px-2 w-100 d-sm-block' : 'py-2 px-4'\">\r\n <ng-container *ngIf=\"isCollection; else normalText\">\r\n <span>{{(\"out-of-stock-short\" | translate) | uppercase}}</span>\r\n </ng-container>\r\n <ng-template #normalText>\r\n {{(\"out-of-stock-short\" | translate) | uppercase}}\r\n </ng-template>\r\n </button>\r\n </ng-template> -->\r\n </div>\r\n</a>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.UpperCasePipe, name: "uppercase" }, { kind: "pipe", type: i1.TitleCasePipe, name: "titlecase" }, { kind: "component", type: PriceEcComponent, selector: "app-price-ec", inputs: ["price", "saleprice"] }, { 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$1.TranslatePipe, name: "translate" }] });
|
|
5890
6038
|
}
|
|
5891
6039
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ProductEcComponent, decorators: [{
|
|
5892
6040
|
type: Component,
|
|
5893
|
-
args: [{ selector: 'app-product-ec', standalone: true, imports: [CommonModule, PriceEcComponent, RouterLink], template: "
|
|
6041
|
+
args: [{ selector: 'app-product-ec', standalone: true, imports: [CommonModule, PriceEcComponent, RouterLink, TranslateModule], template: "<a [routerLink]=\"['/product', product.id]\" class=\"text-decoration-none\">\r\n <!-- Marca especial y descuento -->\r\n <!-- <div *ngIf=\"product.saleprice || (product.special_mark && product.special_mark !== null && product.special_mark !== undefined && product.special_mark.length >0)\"\r\n class=\"marcas\">\r\n <div *ecProductStock=\"product\" [ecProductMini]=\"product.special_mark\"></div>\r\n <ng-container *ngIf=\"shouldShowPrice\">\r\n <div *ecProductStock=\"product\" [ngClass]=\"{'tag-dsc float-right': product.saleprice}\"\r\n [ecProductOff]=\"product\">\r\n </div>\r\n </ng-container>\r\n </div> -->\r\n\r\n <!-- Imagen del producto -->\r\n <div class=\"foto\">\r\n @if(product.picturesdefault){\r\n @if (product.picturesdefault && product.picturesdefault.length > 1 ) {\r\n <img [src]=\"mediaUrl + product.picturesdefault[0]\" alt=\"Imagen principal\" class=\"w-100 pic01\" />\r\n <img [src]=\"mediaUrl + product.picturesdefault[1]\" alt=\"Imagen secundaria\" class=\"w-100 pic02\" />\r\n } @else {\r\n <img [src]=\"mediaUrl + product.picturesdefault[0]\" alt=\"Imagen principal\" class=\"w-100 pic01\" />\r\n }\r\n }\r\n </div>\r\n <!-- Precio -->\r\n @if (shouldShowPrice) {\r\n <app-price-ec [price]=\"product.price\" [saleprice]=\"product.saleprice\" class=\"\" />\r\n }@else {\r\n <p class=\"noPrice mb-1 mt-2 pt-1\"></p>\r\n }\r\n\r\n <!-- Nombre del producto -->\r\n <h6 class=\"my-0\">{{ product.name | titlecase }}</h6>\r\n\r\n <p class=\"sku mt-2\" [innerHTML]=\"product.shortdetails\"></p>\r\n\r\n <div class=\"fixBottom mt-1\">\r\n\r\n <!-- Bot\u00F3n de acciones -->\r\n <!-- <ng-container *ecProductStock=\"product; else noStock\"> -->\r\n <!-- Cuando no tiene marca especial o es de tipo 'standard' -->\r\n @if (!product?.special_mark || product.special_mark?.length === 0 || product.special_mark?.[0]?.type ===\r\n 'standard') {\r\n <button class=\"btn\" [ngClass]=\"isCollection ? 'px-2 w-100 d-sm-block' : 'py-2 px-4'\">\r\n <ng-container *ngIf=\"isCollection; else normalText\">\r\n <span> {{(\"buy\" | translate) | uppercase}} </span>\r\n </ng-container>\r\n <ng-template #normalText>\r\n {{(\"buy\" | translate) | uppercase}}\r\n </ng-template>\r\n </button>\r\n }\r\n <!-- Cuando tiene marca especial y el tipo no es 'standard' -->\r\n @if(product?.special_mark?.[0]?.type !== 'standard'){\r\n @for (item of product.special_mark; track $index) {\r\n <!-- Caso 1: Agotado o Disponible muy pronto -->\r\n @if (item.type === 'out_of_stock' || item.type === 'coming_soon') {\r\n <button class=\"btn\" [ngClass]=\"isCollection ? 'px-2 w-100 d-sm-block' : 'py-2 px-4'\">\r\n @if(isCollection){\r\n <span>{{ item.name | uppercase }}</span>\r\n }@else {\r\n {{ item.name | uppercase }}\r\n }\r\n </button>}\r\n <!-- Caso 2: Contacto por WhatsApp -->\r\n @if (item.type === 'whatsapp_contact') {\r\n <button class=\"btn\" [ngClass]=\"isCollection ? 'px-2 w-100 d-sm-block' : 'py-2 px-4'\"\r\n (click)=\"openWhatsApp(item.whatsappContact)\">\r\n @if(isCollection){\r\n <span>{{ item.name | uppercase }}</span>\r\n }@else {\r\n {{ item.name | uppercase }}\r\n }\r\n\r\n </button>\r\n }\r\n <!-- Caso 3: Solicitar m\u00E1s informaci\u00F3n -->\r\n @if (item.type === 'more_info') {\r\n <button *ngIf=\"\" class=\"btn\" [ngClass]=\"isCollection ? 'px-2 w-100 d-sm-block' : 'py-2 px-4'\">\r\n\r\n @if(isCollection){\r\n <span>{{ item.name | uppercase }}</span>\r\n }@else {\r\n {{ item.name | uppercase }}\r\n }\r\n </button>\r\n }\r\n\r\n }\r\n }\r\n\r\n <!-- </ng-container>\r\n <ng-template #noStock>\r\n <button class=\"btn\" [ngClass]=\"isCollection ? 'px-2 w-100 d-sm-block' : 'py-2 px-4'\">\r\n <ng-container *ngIf=\"isCollection; else normalText\">\r\n <span>{{(\"out-of-stock-short\" | translate) | uppercase}}</span>\r\n </ng-container>\r\n <ng-template #normalText>\r\n {{(\"out-of-stock-short\" | translate) | uppercase}}\r\n </ng-template>\r\n </button>\r\n </ng-template> -->\r\n </div>\r\n</a>" }]
|
|
5894
6042
|
}], propDecorators: { product: [{
|
|
5895
6043
|
type: Input,
|
|
5896
6044
|
args: [{
|
|
@@ -5900,6 +6048,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
5900
6048
|
type: Input
|
|
5901
6049
|
}], loaded: [{
|
|
5902
6050
|
type: Output
|
|
6051
|
+
}], isCollection: [{
|
|
6052
|
+
type: Input
|
|
5903
6053
|
}] } });
|
|
5904
6054
|
|
|
5905
6055
|
register();
|
|
@@ -5983,7 +6133,7 @@ class BlockProductsEcComponent extends BlockEcComponent {
|
|
|
5983
6133
|
this.analyticsService.callEvent('select_promotion', item);
|
|
5984
6134
|
}
|
|
5985
6135
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: BlockProductsEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5986
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: BlockProductsEcComponent, isStandalone: true, selector: "app-block-products-ec", inputs: { appProduct: "appProduct", products: "products", meta: "meta" }, usesInheritance: true, ngImport: i0, template: "<section [ngClass]=\"trimClassBlock(meta.code) + ' container-fluid'\">\r\n\r\n <div class=\"blockProduct block-product\">\r\n @if(meta.name){\r\n <div class=\"row\">\r\n <div class=\"col-12 mt-4\">\r\n <h2 class=\"font-weight-normal font-gd\">\r\n <span>{{meta.name}}</span>\r\n </h2>\r\n </div>\r\n </div>\r\n }\r\n\r\n\r\n @if(meta.styles && meta.styles.carrousel == false){\r\n <div class=\"row \">\r\n @for (product of products; track $index) {\r\n <div [class]=\"'item '+ ' col-'+ (meta.styles.items?.sm) + ' col-md-' + (meta.styles.items?.md) + ' col-lg-' + (meta.styles.items?.lg) + ' px-2'\" [id]=\"$index\">\r\n <!-- verifica que si vienen un template para un custom appProduct llamado \"appProduct\" con un objeto \"product\"- sino usa por defecto el del core -->\r\n <ng-container *ngTemplateOutlet=\"appProduct ? appProduct : defaultAppProduct; context: {product:product}\"></ng-container> \r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <swiper-container init=\"false\" [id]=\"meta?.code\">\r\n @for (product of products; track $index) {\r\n <swiper-slide>\r\n <ng-container *ngTemplateOutlet=\"appProduct ? appProduct : defaultAppProduct; context: {product:product}\"></ng-container> \r\n </swiper-slide>\r\n }\r\n </swiper-container>\r\n }\r\n </div>\r\n</section>\r\n\r\n\r\n<!-- componente por defecto (tomara como producto el contexto pasado como \"product\") -->\r\n<ng-template #defaultAppProduct let-product=\"product\" > \r\n <app-product-ec [product]=\"product\"></app-product-ec>\r\n</ng-template>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ProductEcComponent, selector: "app-product-ec", inputs: ["product", "isProductBox"], outputs: ["loaded"] }] });
|
|
6136
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: BlockProductsEcComponent, isStandalone: true, selector: "app-block-products-ec", inputs: { appProduct: "appProduct", products: "products", meta: "meta" }, usesInheritance: true, ngImport: i0, template: "<section [ngClass]=\"trimClassBlock(meta.code) + ' container-fluid'\">\r\n\r\n <div class=\"blockProduct block-product\">\r\n @if(meta.name){\r\n <div class=\"row\">\r\n <div class=\"col-12 mt-4\">\r\n <h2 class=\"font-weight-normal font-gd\">\r\n <span>{{meta.name}}</span>\r\n </h2>\r\n </div>\r\n </div>\r\n }\r\n\r\n\r\n @if(meta.styles && meta.styles.carrousel == false){\r\n <div class=\"row \">\r\n @for (product of products; track $index) {\r\n <div [class]=\"'item '+ ' col-'+ (meta.styles.items?.sm) + ' col-md-' + (meta.styles.items?.md) + ' col-lg-' + (meta.styles.items?.lg) + ' px-2'\" [id]=\"$index\">\r\n <!-- verifica que si vienen un template para un custom appProduct llamado \"appProduct\" con un objeto \"product\"- sino usa por defecto el del core -->\r\n <ng-container *ngTemplateOutlet=\"appProduct ? appProduct : defaultAppProduct; context: {product:product}\"></ng-container> \r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <swiper-container init=\"false\" [id]=\"meta?.code\">\r\n @for (product of products; track $index) {\r\n <swiper-slide>\r\n <ng-container *ngTemplateOutlet=\"appProduct ? appProduct : defaultAppProduct; context: {product:product}\"></ng-container> \r\n </swiper-slide>\r\n }\r\n </swiper-container>\r\n }\r\n </div>\r\n</section>\r\n\r\n\r\n<!-- componente por defecto (tomara como producto el contexto pasado como \"product\") -->\r\n<ng-template #defaultAppProduct let-product=\"product\" > \r\n <app-product-ec [product]=\"product\"></app-product-ec>\r\n</ng-template>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ProductEcComponent, selector: "app-product-ec", inputs: ["product", "isProductBox", "isCollection"], outputs: ["loaded"] }] });
|
|
5987
6137
|
}
|
|
5988
6138
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: BlockProductsEcComponent, decorators: [{
|
|
5989
6139
|
type: Component,
|
|
@@ -6351,6 +6501,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
6351
6501
|
args: ['mainCanvas', { static: true }]
|
|
6352
6502
|
}] } });
|
|
6353
6503
|
|
|
6504
|
+
// export * from './rating-ec/rating-ec.component';
|
|
6505
|
+
|
|
6354
6506
|
class BlockFormContactEcComponent extends BlockEcComponent {
|
|
6355
6507
|
block;
|
|
6356
6508
|
success_message;
|
|
@@ -7015,6 +7167,7 @@ class FiltersEcComponent {
|
|
|
7015
7167
|
_filtersService = inject(FiltersService);
|
|
7016
7168
|
filters = [];
|
|
7017
7169
|
filter$ = this._filtersService.filters$;
|
|
7170
|
+
setSelect;
|
|
7018
7171
|
constructor() {
|
|
7019
7172
|
this.filter$.subscribe(res => {
|
|
7020
7173
|
this.filters = this._filtersService.getSpecificFilters(['attributes', 'categories', 'dynamics']);
|
|
@@ -7038,13 +7191,102 @@ class FiltersEcComponent {
|
|
|
7038
7191
|
console.log("set", filter);
|
|
7039
7192
|
filter && this._filtersService.setFilterSelected(filter, selected);
|
|
7040
7193
|
}
|
|
7194
|
+
/**
|
|
7195
|
+
* Redondea al múltiplo de 'step' respetando el redondeo entero:
|
|
7196
|
+
* - Mínimo: redondea hacia abajo.
|
|
7197
|
+
* - Máximo: redondea hacia arriba.
|
|
7198
|
+
*/
|
|
7199
|
+
roundToNearest(value, step, type, filter) {
|
|
7200
|
+
let rounded = Math.round(value / step) * step;
|
|
7201
|
+
if (type === 'max' && rounded < filter.maxPrice) {
|
|
7202
|
+
rounded = Math.ceil(value / step) * step;
|
|
7203
|
+
}
|
|
7204
|
+
if (type === 'min' && rounded > filter.minPrice) {
|
|
7205
|
+
rounded = Math.floor(value / step) * step;
|
|
7206
|
+
}
|
|
7207
|
+
return rounded;
|
|
7208
|
+
}
|
|
7209
|
+
uniqueSelection(filter, filterChild) {
|
|
7210
|
+
// Buscar si hay un filtro de tipo PriceRangeFilter en la lista de filtros
|
|
7211
|
+
const priceRangeFilter = this.filters.find(f => f instanceof PriceRangeFilter);
|
|
7212
|
+
if (priceRangeFilter) {
|
|
7213
|
+
priceRangeFilter.reset();
|
|
7214
|
+
}
|
|
7215
|
+
filter.data.forEach(filterElement => {
|
|
7216
|
+
if (filterElement.selected) {
|
|
7217
|
+
filterElement.selected = false;
|
|
7218
|
+
}
|
|
7219
|
+
filterElement.children.forEach((filterChildren) => {
|
|
7220
|
+
if (filterChildren != filterChild && filterChildren.selected) {
|
|
7221
|
+
filterChildren.selected = false;
|
|
7222
|
+
}
|
|
7223
|
+
});
|
|
7224
|
+
});
|
|
7225
|
+
}
|
|
7226
|
+
/**
|
|
7227
|
+
* Actualiza los valores del filtro permitiendo que un input empuje al otro.
|
|
7228
|
+
*/
|
|
7229
|
+
updateFilterPrices(type, value, filter, priceGap) {
|
|
7230
|
+
const globalMin = filter.minPrice ?? 0;
|
|
7231
|
+
const globalMax = filter.maxPrice;
|
|
7232
|
+
let currentMin = filter.currentMinPrice ?? globalMin;
|
|
7233
|
+
let currentMax = filter.currentMaxPrice ?? globalMax;
|
|
7234
|
+
if (type === 'min') {
|
|
7235
|
+
let newMin = Math.min(Math.max(value, globalMin), globalMax);
|
|
7236
|
+
if (newMin + priceGap > currentMax) {
|
|
7237
|
+
let newMaxCandidate = newMin + priceGap;
|
|
7238
|
+
if (newMaxCandidate <= globalMax) {
|
|
7239
|
+
currentMax = newMaxCandidate;
|
|
7240
|
+
}
|
|
7241
|
+
else {
|
|
7242
|
+
newMin = globalMax - priceGap;
|
|
7243
|
+
}
|
|
7244
|
+
}
|
|
7245
|
+
filter.currentMinPrice = newMin;
|
|
7246
|
+
filter.currentMaxPrice = currentMax;
|
|
7247
|
+
}
|
|
7248
|
+
else if (type === 'max') {
|
|
7249
|
+
let newMax = Math.max(Math.min(value, globalMax), globalMin);
|
|
7250
|
+
if (newMax - priceGap < currentMin) {
|
|
7251
|
+
let newMinCandidate = newMax - priceGap;
|
|
7252
|
+
if (newMinCandidate >= globalMin) {
|
|
7253
|
+
currentMin = newMinCandidate;
|
|
7254
|
+
}
|
|
7255
|
+
else {
|
|
7256
|
+
newMax = globalMin + priceGap;
|
|
7257
|
+
}
|
|
7258
|
+
}
|
|
7259
|
+
filter.currentMaxPrice = newMax;
|
|
7260
|
+
filter.currentMinPrice = currentMin;
|
|
7261
|
+
}
|
|
7262
|
+
}
|
|
7263
|
+
// Método para actualizar los valores de precio seleccionados
|
|
7264
|
+
updatePriceRange(min, max, priceFilter) {
|
|
7265
|
+
priceFilter.setSelected(min, max);
|
|
7266
|
+
this.setSelect(priceFilter);
|
|
7267
|
+
}
|
|
7268
|
+
// Métodos para actualizar la barra del filtro por precio
|
|
7269
|
+
calculateLeftPercentage(currentMinPrice, minPrice, maxPrice) {
|
|
7270
|
+
const minVal = Math.max(minPrice, Math.min(currentMinPrice ?? minPrice, maxPrice));
|
|
7271
|
+
return Math.max(0, Math.min(((minVal - minPrice) / (maxPrice - minPrice)) * 100, 100));
|
|
7272
|
+
}
|
|
7273
|
+
calculateRightPercentage(currentMaxPrice, minPrice, maxPrice) {
|
|
7274
|
+
const maxVal = Math.max(minPrice, Math.min(currentMaxPrice ?? maxPrice, maxPrice));
|
|
7275
|
+
return Math.max(0, Math.min(100 - ((maxVal - minPrice) / (maxPrice - minPrice)) * 100, 100));
|
|
7276
|
+
}
|
|
7277
|
+
scrollUp = () => {
|
|
7278
|
+
window.scroll(0, 0);
|
|
7279
|
+
return true;
|
|
7280
|
+
};
|
|
7041
7281
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: FiltersEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7042
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: FiltersEcComponent, isStandalone: true, selector: "lib-filters-ec", ngImport: i0, template: "<p>filters-ec works!</p>\r\n", styles: [""] });
|
|
7282
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: FiltersEcComponent, isStandalone: true, selector: "lib-filters-ec", inputs: { setSelect: "setSelect" }, ngImport: i0, template: "<p>filters-ec works!</p>\r\n", styles: [""] });
|
|
7043
7283
|
}
|
|
7044
7284
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: FiltersEcComponent, decorators: [{
|
|
7045
7285
|
type: Component,
|
|
7046
7286
|
args: [{ selector: 'lib-filters-ec', standalone: true, imports: [], template: "<p>filters-ec works!</p>\r\n" }]
|
|
7047
|
-
}], ctorParameters: () => []
|
|
7287
|
+
}], ctorParameters: () => [], propDecorators: { setSelect: [{
|
|
7288
|
+
type: Input
|
|
7289
|
+
}] } });
|
|
7048
7290
|
|
|
7049
7291
|
class ProductDetailEcComponent {
|
|
7050
7292
|
_productDetailService = inject(ProductDetailService);
|
|
@@ -7053,6 +7295,8 @@ class ProductDetailEcComponent {
|
|
|
7053
7295
|
_domSanitizer = inject(DomSanitizer);
|
|
7054
7296
|
_consts = inject(CoreConstantsService);
|
|
7055
7297
|
_toastService = inject(ToastService);
|
|
7298
|
+
parametersService = inject(ParametersService);
|
|
7299
|
+
injector = inject(Injector);
|
|
7056
7300
|
_meta = inject(Meta);
|
|
7057
7301
|
_title = inject(Title);
|
|
7058
7302
|
_location = inject(Location);
|
|
@@ -7061,12 +7305,23 @@ class ProductDetailEcComponent {
|
|
|
7061
7305
|
data$ = this._productDetailService.associatedData$;
|
|
7062
7306
|
mediaUrl = this._consts.mediaUrl();
|
|
7063
7307
|
code = '';
|
|
7308
|
+
showFormContact = false;
|
|
7309
|
+
showReviews = false;
|
|
7064
7310
|
quantity = signal(1);
|
|
7311
|
+
parameters$ = this.parametersService.getParameters();
|
|
7312
|
+
hasParams = this.parametersService.hasParams;
|
|
7065
7313
|
constructor() {
|
|
7066
7314
|
this._activedRoute.params.subscribe(queryParams => {
|
|
7067
7315
|
this.code = queryParams["id"];
|
|
7068
7316
|
this._productDetailService.loadProduct(this.code);
|
|
7069
7317
|
});
|
|
7318
|
+
this._activedRoute.params.subscribe(queryParams => {
|
|
7319
|
+
this.code = queryParams["id"];
|
|
7320
|
+
this._productDetailService.loadProduct(this.code);
|
|
7321
|
+
});
|
|
7322
|
+
this.injector.get(ChannelService).channel$.subscribe(channel => {
|
|
7323
|
+
this.showReviews = channel.showReviews;
|
|
7324
|
+
});
|
|
7070
7325
|
}
|
|
7071
7326
|
ngOnInit() {
|
|
7072
7327
|
this.product$.subscribe(product => {
|
|
@@ -7115,6 +7370,15 @@ class ProductDetailEcComponent {
|
|
|
7115
7370
|
if (this.quantity() >= stock)
|
|
7116
7371
|
this.quantity.set(stock);
|
|
7117
7372
|
}
|
|
7373
|
+
goToSection(section) {
|
|
7374
|
+
this.showFormContact = true;
|
|
7375
|
+
setTimeout(() => {
|
|
7376
|
+
const element = document.getElementById(section);
|
|
7377
|
+
if (element) {
|
|
7378
|
+
element.scrollIntoView({ behavior: 'smooth' });
|
|
7379
|
+
}
|
|
7380
|
+
}, 500);
|
|
7381
|
+
}
|
|
7118
7382
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ProductDetailEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7119
7383
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: ProductDetailEcComponent, isStandalone: true, selector: "app-product-detail-ec", ngImport: i0, template: "", styles: [""] });
|
|
7120
7384
|
}
|
|
@@ -7177,13 +7441,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
7177
7441
|
|
|
7178
7442
|
class CartItemEcComponent {
|
|
7179
7443
|
item;
|
|
7444
|
+
inSidebar = false;
|
|
7180
7445
|
_cartService = inject(CartService);
|
|
7181
7446
|
_toastService = inject(ToastService);
|
|
7182
7447
|
_constants = inject(CoreConstantsService);
|
|
7183
7448
|
mediaUrl = this._constants.mediaUrl();
|
|
7184
7449
|
quantity = 0;
|
|
7450
|
+
variantsToShow = ['TALLE', 'COLOR'];
|
|
7185
7451
|
ngOnInit() {
|
|
7186
7452
|
this.quantity = this.item.quantity;
|
|
7453
|
+
console.log(this.item, this.mediaUrl);
|
|
7187
7454
|
}
|
|
7188
7455
|
updateQuantity(stock) {
|
|
7189
7456
|
if (this.quantity > 0 && this.quantity <= stock) {
|
|
@@ -7205,17 +7472,59 @@ class CartItemEcComponent {
|
|
|
7205
7472
|
deleteCartItem() {
|
|
7206
7473
|
this._cartService.deleteCartItem(this.item);
|
|
7207
7474
|
}
|
|
7475
|
+
getVariants(product) {
|
|
7476
|
+
let item = product.product;
|
|
7477
|
+
if (item.variants && item.variants.length && item.variants[0].options && item.variants[0].options.length) {
|
|
7478
|
+
let options = item.variants[0].options;
|
|
7479
|
+
options = options.filter((option) => this.variantsToShow.find((name) => option.hasOwnProperty(name)));
|
|
7480
|
+
let optionsMap = [];
|
|
7481
|
+
options.map((option) => {
|
|
7482
|
+
Object.keys(option).forEach((entry) => {
|
|
7483
|
+
let optionAdded = false; // Variable para evitar múltiples inserciones
|
|
7484
|
+
item.options.forEach((option2) => {
|
|
7485
|
+
if (option2.code == 'COLOR') {
|
|
7486
|
+
option2.values.forEach((color) => {
|
|
7487
|
+
if (color.code == option[entry] && !optionAdded) {
|
|
7488
|
+
optionsMap.push({ name: entry, value: option[entry], image: color.image, mobileImage: color.mobileImage });
|
|
7489
|
+
optionAdded = true; // Marcar opción agregada
|
|
7490
|
+
}
|
|
7491
|
+
});
|
|
7492
|
+
}
|
|
7493
|
+
});
|
|
7494
|
+
// Si no se añadió la opción de COLOR, manejar otras opciones
|
|
7495
|
+
if (!optionAdded) {
|
|
7496
|
+
item.options.forEach((option2) => {
|
|
7497
|
+
if (option2.code !== 'COLOR') {
|
|
7498
|
+
optionsMap.push({
|
|
7499
|
+
name: entry,
|
|
7500
|
+
value: option[entry]
|
|
7501
|
+
});
|
|
7502
|
+
optionAdded = true;
|
|
7503
|
+
}
|
|
7504
|
+
});
|
|
7505
|
+
}
|
|
7506
|
+
});
|
|
7507
|
+
return optionsMap;
|
|
7508
|
+
});
|
|
7509
|
+
return optionsMap;
|
|
7510
|
+
}
|
|
7511
|
+
else {
|
|
7512
|
+
return null;
|
|
7513
|
+
}
|
|
7514
|
+
}
|
|
7208
7515
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: CartItemEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7209
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
7516
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: CartItemEcComponent, isStandalone: true, selector: "app-cart-item-ec", inputs: { item: "item", inSidebar: "inSidebar" }, ngImport: i0, template: "@if(!inSidebar){\r\n<p>cart-item-ec works!</p>\r\n}@else{\r\n\r\n<div class=\"row\">\r\n <div class=\"col-2\">\r\n @let product= item.product;\r\n @if(item.variant_id && product.variants.length>0){\r\n <img [src]=\"mediaUrl + product.variants[0].images[0]\" alt=\"\" class=\"img-fluid\">\r\n }@else{\r\n <img [src]=\"mediaUrl + product.picturesdefault[0]\" alt=\"\" class=\"img-fluid\">\r\n }\r\n </div>\r\n <div class=\"col-8\">\r\n <div class=\"info d-flex flex-column align-items-start\">\r\n <a class=\"title text-dark text-decoration-none m-0 p-0 h6 mb-0\"\r\n [routerLink]=\"['/product', item.variant_id]\">{{\r\n item.product.name | titlecase\r\n }}</a>\r\n <div class=\"qty1\">\r\n <span>{{ item.product.id}}</span>\r\n </div>\r\n <div class=\"price h6 fw-bold mb-0 pb-0\">{{ item.product.price | ecCurrencySymbol\r\n }}</div>\r\n @if(getVariants(item); as options){\r\n <div class=\"d-flex align-items-center p-0\">\r\n @for(option of options; track $index){\r\n <span class=\"me-1\"> {{option.name | titlecase}}:</span>\r\n @if(option.name == 'COLOR'){\r\n <div class=\"p-2 rounded\" [style.background]=\"'#' + option.value\"></div>\r\n }@else{\r\n <b>{{option.value}}</b>\r\n }\r\n }\r\n </div>\r\n }\r\n <div class=\"input-group mb-3\">\r\n <button (click)=\"less(item.product.variants[0]?.stock)\" class=\"btn btn-outline-secondary\" type=\"button\" id=\"button-addon1\">\r\n <i class=\"fa fa-minus\" aria-hidden=\"true\"></i>\r\n </button>\r\n <input type=\"text\" class=\"form-control text-center\" placeholder=\"\" aria-label=\"Example text with button addon\"\r\n aria-describedby=\"button-addon1\" [value]=\"item.quantity\" min=\"1\" step=\"1\" [(ngModel)]=\"quantity\"\r\n (change)=\"updateQuantity(item.product.variants[0]?.stock)\">\r\n <button (click)=\"plus(item.product.variants[0]?.stock)\" class=\"btn btn-outline-secondary\" type=\"button\" id=\"button-addon1\">\r\n <i class=\"fa fa-plus\" aria-hidden=\"true\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-2\">\r\n <a (click)=\"deleteCartItem()\" class=\"btn botBorrar\"><i class=\"fa fa-trash\" aria-hidden=\"true\"></i></a>\r\n </div>\r\n</div>\r\n\r\n\r\n\r\n\r\n\r\n}", styles: [""], dependencies: [{ kind: "pipe", type: TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: EcCurrencySymbolPipe, name: "ecCurrencySymbol" }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
7210
7517
|
}
|
|
7211
7518
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: CartItemEcComponent, decorators: [{
|
|
7212
7519
|
type: Component,
|
|
7213
|
-
args: [{ selector: '
|
|
7520
|
+
args: [{ selector: 'app-cart-item-ec', standalone: true, imports: [TitleCasePipe, EcCurrencySymbolPipe, RouterLink, FormsModule], template: "@if(!inSidebar){\r\n<p>cart-item-ec works!</p>\r\n}@else{\r\n\r\n<div class=\"row\">\r\n <div class=\"col-2\">\r\n @let product= item.product;\r\n @if(item.variant_id && product.variants.length>0){\r\n <img [src]=\"mediaUrl + product.variants[0].images[0]\" alt=\"\" class=\"img-fluid\">\r\n }@else{\r\n <img [src]=\"mediaUrl + product.picturesdefault[0]\" alt=\"\" class=\"img-fluid\">\r\n }\r\n </div>\r\n <div class=\"col-8\">\r\n <div class=\"info d-flex flex-column align-items-start\">\r\n <a class=\"title text-dark text-decoration-none m-0 p-0 h6 mb-0\"\r\n [routerLink]=\"['/product', item.variant_id]\">{{\r\n item.product.name | titlecase\r\n }}</a>\r\n <div class=\"qty1\">\r\n <span>{{ item.product.id}}</span>\r\n </div>\r\n <div class=\"price h6 fw-bold mb-0 pb-0\">{{ item.product.price | ecCurrencySymbol\r\n }}</div>\r\n @if(getVariants(item); as options){\r\n <div class=\"d-flex align-items-center p-0\">\r\n @for(option of options; track $index){\r\n <span class=\"me-1\"> {{option.name | titlecase}}:</span>\r\n @if(option.name == 'COLOR'){\r\n <div class=\"p-2 rounded\" [style.background]=\"'#' + option.value\"></div>\r\n }@else{\r\n <b>{{option.value}}</b>\r\n }\r\n }\r\n </div>\r\n }\r\n <div class=\"input-group mb-3\">\r\n <button (click)=\"less(item.product.variants[0]?.stock)\" class=\"btn btn-outline-secondary\" type=\"button\" id=\"button-addon1\">\r\n <i class=\"fa fa-minus\" aria-hidden=\"true\"></i>\r\n </button>\r\n <input type=\"text\" class=\"form-control text-center\" placeholder=\"\" aria-label=\"Example text with button addon\"\r\n aria-describedby=\"button-addon1\" [value]=\"item.quantity\" min=\"1\" step=\"1\" [(ngModel)]=\"quantity\"\r\n (change)=\"updateQuantity(item.product.variants[0]?.stock)\">\r\n <button (click)=\"plus(item.product.variants[0]?.stock)\" class=\"btn btn-outline-secondary\" type=\"button\" id=\"button-addon1\">\r\n <i class=\"fa fa-plus\" aria-hidden=\"true\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-2\">\r\n <a (click)=\"deleteCartItem()\" class=\"btn botBorrar\"><i class=\"fa fa-trash\" aria-hidden=\"true\"></i></a>\r\n </div>\r\n</div>\r\n\r\n\r\n\r\n\r\n\r\n}" }]
|
|
7214
7521
|
}], propDecorators: { item: [{
|
|
7215
7522
|
type: Input,
|
|
7216
7523
|
args: [{
|
|
7217
7524
|
required: true
|
|
7218
7525
|
}]
|
|
7526
|
+
}], inSidebar: [{
|
|
7527
|
+
type: Input
|
|
7219
7528
|
}] } });
|
|
7220
7529
|
|
|
7221
7530
|
class CouponEcComponent {
|
|
@@ -8126,8 +8435,8 @@ class OrdersListEcComponent {
|
|
|
8126
8435
|
}
|
|
8127
8436
|
toDate(date, format) { return moment(date).format(!format && 'DD/MM/YYYY, h:mm:ss a' || format); }
|
|
8128
8437
|
goToOrder(order) {
|
|
8129
|
-
|
|
8130
|
-
|
|
8438
|
+
this._ordersService.setSelectedOrder(order);
|
|
8439
|
+
this._router.navigateByUrl((`account/orders/${order.number}`));
|
|
8131
8440
|
}
|
|
8132
8441
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: OrdersListEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8133
8442
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: OrdersListEcComponent, isStandalone: true, selector: "app-orders-ec", ngImport: i0, template: "<div class=\"container-fluid\" id=\"ordersEcComponent\">\r\n @if(!loading){\r\n <section id=\"orders\" class=\"w-100\">\r\n @if(orders && orders.length){\r\n <div class=\"row mb-1 border-bottom\">\r\n <div class=\"col-lg-2 col-12\">\r\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'number' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\r\n (click)=\"sortOrders('number')\">{{ 'order' | translate }}:</p>\r\n </div>\r\n <div class=\"col-lg-2 col-12\">\r\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'paymentState' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\r\n (click)=\"sortOrders('paymentState')\">{{ 'payment-state' | translate }}:</p>\r\n </div>\r\n <div class=\"col-lg-2 col-12\">\r\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'method' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\r\n (click)=\"sortOrders('method')\">{{ 'shipment-method' | translate }}:</p>\r\n </div>\r\n <div class=\"col-lg-2 col-12 \">\r\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'methodState' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\r\n (click)=\"sortOrders('methodState')\">\r\n {{ 'shipment-state' | translate }}:</p>\r\n </div>\r\n <div class=\"col-lg-2 col-12\">\r\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'date' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\r\n (click)=\"sortOrders('date')\">{{ 'date' | translate }}:</p>\r\n </div>\r\n <div class=\"col-lg-2 col-12\">\r\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'total' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\r\n (click)=\"sortOrders('total')\">{{ 'total' | translate }}:</p>\r\n </div>\r\n </div>\r\n @for(order of orders; track $index){\r\n <div class=\"row item border-bottom py-2\">\r\n <div class=\"col-lg-2 col-12\">\r\n <h5 class=\"fw-bold\">\r\n {{ order.number }}\r\n </h5>\r\n </div>\r\n <div class=\"col-lg-2 col-12\">\r\n @if(order.payments && order.payments.length > 0){\r\n <p class=\"price\">\r\n {{ order.payments[0].state | translate | titlecase }}\r\n </p>\r\n }\r\n </div>\r\n <div class=\"col-lg-2 col-12\">\r\n <p class=\"price\">\r\n {{ order.shipments[0].method.name }}\r\n </p>\r\n </div>\r\n <div class=\"col-lg-2 col-12\">\r\n <p class=\"price\">\r\n {{ order.shipments[0].state | translate | titlecase }}\r\n </p>\r\n <!-- ACA DEBERIA IR EL LINK DE SEGUIMIENTO -->\r\n <!-- <button class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver seguimiento</button> -->\r\n @if(order.tracking){\r\n <a [href]=\"order.tracking\"\r\n class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver seguimiento</a>\r\n }\r\n </div>\r\n <div class=\"col-lg-2 col-12\">\r\n <p class=\"price\">\r\n {{ toDate(order.checkoutCompletedAt, 'DD/MM/YYYY') | translate }}<br>\r\n {{ toDate(order.checkoutCompletedAt, 'h:mm:ss a') | translate }}\r\n </p>\r\n </div>\r\n <div class=\"col-lg-2 col-12 d-flex\">\r\n @if(creditAmountConfigured ? showPrice : true){\r\n <h5 class=\"fw-bold text-nowrap\">\r\n {{ (order.totals.total) | ecCurrencySymbol }}\r\n </h5>\r\n }\r\n <!-- <button class=\"btn px-0 w-100 btdetalle\" (click)=\"goToOrder(order)\">{{\r\n 'see-order' | translate }}</button> -->\r\n <button class=\"btn px-0 w-100 btdetalle\" (click)=\"goToOrder(order)\">\r\n <i class=\"bi bi-box-arrow-in-right\"></i></button>\r\n </div>\r\n </div>\r\n }\r\n }@else {\r\n <div class=\"w-100 h-50\">\r\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\r\n <h5>{{ 'no-orders' | translate }}</h5>\r\n </div>\r\n </div>\r\n }\r\n </section>\r\n }@else {\r\n <div class=\"w-100 h-50 py-5\">\r\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\r\n <app-loading-full-ec></app-loading-full-ec>\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n\r\n<ng-template #errorView>\r\n <div class=\"w-100 h-50\">\r\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\r\n <h4>{{ 'orders-error' | translate }}</h4>\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: [""], dependencies: [{ kind: "component", type: LoadingFullEcComponent, selector: "app-loading-full-ec" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: EcCurrencySymbolPipe, name: "ecCurrencySymbol" }] });
|
|
@@ -8155,18 +8464,134 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
8155
8464
|
}] });
|
|
8156
8465
|
|
|
8157
8466
|
class OrderEcComponent {
|
|
8158
|
-
|
|
8467
|
+
_ordersService = inject(OrdersService);
|
|
8468
|
+
_consts = inject(ApiConstantsService);
|
|
8469
|
+
_constants = inject(CoreConstantsService);
|
|
8470
|
+
_router = inject(Router);
|
|
8471
|
+
_cartService = inject(CartService);
|
|
8472
|
+
_channelConfigService = inject(ChannelService);
|
|
8473
|
+
_activedRoute = inject(ActivatedRoute);
|
|
8474
|
+
order$ = this._ordersService.selectedOrder$;
|
|
8475
|
+
allowRepeatOrders = false;
|
|
8476
|
+
loading = false;
|
|
8477
|
+
showPrice = false;
|
|
8478
|
+
creditAmountConfigured = false;
|
|
8479
|
+
hidePrices = false;
|
|
8480
|
+
hideDiscounts = false;
|
|
8481
|
+
hideTaxes = false;
|
|
8482
|
+
channelConfig = this._ordersService.channelConfig;
|
|
8483
|
+
numberOrder;
|
|
8159
8484
|
ngOnInit() {
|
|
8160
|
-
|
|
8485
|
+
this.loading = true;
|
|
8486
|
+
this._ordersService.selectedOrder$.subscribe(res => {
|
|
8487
|
+
if (!res) {
|
|
8488
|
+
const number = this._activedRoute.snapshot.params["number"];
|
|
8489
|
+
this._ordersService.getOrderByNumber(number);
|
|
8490
|
+
}
|
|
8491
|
+
console.log('inside');
|
|
8492
|
+
});
|
|
8493
|
+
this._channelConfigService.channel$.subscribe((config) => {
|
|
8494
|
+
if (config && config.allowRepeatOrders !== undefined) {
|
|
8495
|
+
this.allowRepeatOrders = config.allowRepeatOrders;
|
|
8496
|
+
}
|
|
8497
|
+
else {
|
|
8498
|
+
this.allowRepeatOrders = false;
|
|
8499
|
+
}
|
|
8500
|
+
this.hidePrices = config?.hidePrices ?? false;
|
|
8501
|
+
this.hideDiscounts = config?.hideDiscounts ?? false;
|
|
8502
|
+
this.hideTaxes = config?.hideTaxes ?? false;
|
|
8503
|
+
});
|
|
8504
|
+
this._cartService.showPrice$.subscribe((showPrice) => {
|
|
8505
|
+
this.showPrice = showPrice;
|
|
8506
|
+
});
|
|
8507
|
+
this._cartService.creditAmount$.subscribe((creditAmount) => {
|
|
8508
|
+
this.creditAmountConfigured = creditAmount !== null;
|
|
8509
|
+
});
|
|
8161
8510
|
}
|
|
8511
|
+
getUrlBase() {
|
|
8512
|
+
return this._consts.getUrlBase();
|
|
8513
|
+
}
|
|
8514
|
+
back() {
|
|
8515
|
+
this._router.navigateByUrl('account/orders');
|
|
8516
|
+
}
|
|
8517
|
+
toDate(date, format) {
|
|
8518
|
+
return moment(date).format(!format && 'DD/MM/YYYY, h:mm:ss a' || format);
|
|
8519
|
+
}
|
|
8520
|
+
repeatOrder(order) {
|
|
8521
|
+
if (this.allowRepeatOrders && order) {
|
|
8522
|
+
//this._cartService.addRepeatOrderToCart(this.order.items);
|
|
8523
|
+
}
|
|
8524
|
+
}
|
|
8525
|
+
mediaUrl = () => this._constants.mediaUrl();
|
|
8162
8526
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: OrderEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8163
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: OrderEcComponent, isStandalone: true, selector: "app-order-ec", ngImport: i0, template: "<p>order-ec works!</p>\r\n", styles: [""] });
|
|
8527
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: OrderEcComponent, isStandalone: true, selector: "app-order-ec", ngImport: i0, template: "<main class=\"py-5\" id=\"orderEcComponent\">\r\n <div class=\"container\">\r\n @if(order$ | async; as order){\r\n <div class=\"wrap\">\r\n @if(order){\r\n\r\n <div class=\"row justify-content-between \">\r\n <div class=\"col-sm-auto col-12 font-brandon\">\r\n <h4 class=\"tit1 fw-bold\">{{ ('order' | translate) + ': ' + order.number }}</h4>\r\n </div>\r\n @if(order?.invoice){\r\n <div class=\"col-sm col-12 font-brandon\">\r\n <a target=\"_blank\" [href]=\"getUrlBase().slice(0, -1) + order.invoice\"\r\n class=\"btn btn-link btn-invoice\">\r\n <i class=\"fas fa-file-download me-1\"></i>\r\n {{ 'download' | translate }} {{ 'invoices' | translate | titlecase }}\r\n </a>\r\n </div>\r\n }\r\n <a (click)=\"back()\" class=\"col-auto text-end\">\r\n <button class=\"btn btn-outline-dark btvolver border\">{{ 'back-to-orders' | translate }}</button>\r\n </a>\r\n </div>\r\n\r\n <section id=\"orders\">\r\n <div class=\"row pt-2\">\r\n <div class=\"col-md-2 col-12\">\r\n <p class=\"st\">{{ 'payment-state' | translate }}:</p>\r\n <p class=\"\">\r\n {{ order.payments[0].state | translate }}\r\n </p>\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\">\r\n <p class=\"st\">{{ 'shipment-state' | translate }}:</p>\r\n <p class=\"\">\r\n {{ order.shipments[0].state | translate }}\r\n </p>\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\">\r\n <p class=\"st\">{{ 'payment-method' | translate }}:</p>\r\n <p class=\"\">\r\n {{ order.payments[0]?.method?.name | translate }}\r\n </p>\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\">\r\n <p class=\"st\">{{ 'shipment-method' | translate }}:</p>\r\n <p class=\"\">\r\n {{ order.shipments[0].method.name }}\r\n </p>\r\n <!-- ACA DEBERIA IR EL LINK DE SEGUIMIENTO -->\r\n @if(order.tracking){\r\n <a [href]=\"order.tracking\"\r\n class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">\r\n Ver seguimiento</a>\r\n }\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\">\r\n <p class=\"st\">{{ 'date' | translate }}:</p>\r\n <p class=\"\">\r\n {{ toDate(order.checkoutCompletedAt, 'DD/MM/YYYY') | translate }}<br>\r\n {{ toDate(order.checkoutCompletedAt, 'h:mm:ss a') | translate }}\r\n </p>\r\n </div>\r\n @if(creditAmountConfigured ? showPrice : true){\r\n <div class=\"col-md-2 col-12 font-brandon\">\r\n <p class=\"st\">{{ 'total' | translate }}:</p>\r\n <h5 class=\"fw-bold\">\r\n {{ (order.totals.total) | ecCurrencySymbol}}\r\n\r\n </h5>\r\n </div>\r\n }\r\n </div>\r\n </section>\r\n @if(!hidePrices && allowRepeatOrders){\r\n <div class=\"text-end mt-3\">\r\n <button class=\"btn btn-primary mb-2\" (click)=\"repeatOrder(order)\">\r\n {{ 'repeat-order' | translate }}\r\n </button>\r\n </div>\r\n }\r\n\r\n <div class=\"container py-3 border-top border-bottom\">\r\n @if(order.items.length){\r\n <div class=\"row\">\r\n <div class=\"col-2 font-sm font-brandon d-none d-md-block\">\r\n {{ 'product' | translate | uppercase }}\r\n </div>\r\n <div class=\"col-4 font-sm font-brandon d-none d-md-block\">\r\n {{ 'description' | translate | uppercase }}\r\n </div>\r\n @if(channelConfig.applyOrderLot){\r\n <div id=\"colLots\" class=\"col-1 font-sm font-brandon d-none d-md-block\">\r\n <!-- {{ 'description' | translate | uppercase }} -->\r\n {{ 'lots' | translate | uppercase }}\r\n </div>\r\n }\r\n @if(creditAmountConfigured ? showPrice : true){\r\n <div class=\"col-2 text-center font-sm font-brandon d-none d-md-block\">\r\n {{ 'unit-price' | translate | uppercase }}\r\n </div>\r\n }\r\n <div class=\"col-1 text-center font-sm font-brandon d-none d-md-block\">\r\n {{ 'quantity' | translate | uppercase }}\r\n </div>\r\n @if(creditAmountConfigured ? showPrice : true){\r\n <div class=\"col-2 text-end font-sm font-brandon d-none d-md-block\">\r\n {{ 'total' | translate | uppercase }}\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n\r\n }\r\n @for(item of order.items; track $index; let i = $index){\r\n <div class=\"row cart-items\">\r\n <div class=\"col-5 col-md-2 py-2\">\r\n @if(item.product.variants[0]?.images?.length){\r\n <img class=\"smc maxwidth img-fluid rounded-custom \"\r\n [src]=\"mediaUrl() + item.product.variants[0].images[0]\" alt=\"\">\r\n } @else {\r\n @if(item.product.picturesdefault){\r\n <img class=\"smc maxwidth img-fluid rounded-custom\"\r\n [src]=\"mediaUrl() + item.product.picturesdefault[0]\" alt=\"\">\r\n }\r\n }\r\n </div>\r\n <div\r\n class=\"col-md-4 col-7 flex-column flex-md-row justify-content-start d-flex align-items-center\">\r\n <p class=\"font-brandon d-flex w-100 mb-0\">\r\n {{ item.product.name }} (Cod:{{ item.product.variants[0].code }})\r\n </p>\r\n </div>\r\n @if(channelConfig.applyOrderLot){\r\n <div class=\"col-md-1 col-1 flex-column flex-md-row justify-content-start d-flex align-items-center\">\r\n <input type=\"button\" class=\"btn btn-primary btnSeguir m-0 text-center\" type=\"button\"\r\n [attr.data-bs-toggle]=\"'collapse'\" [attr.data-bs-target]=\"'#collapseExample'+i\"\r\n aria-expanded=\"false\" [attr.aria-controls]=\"'collapseExample'+i\"\r\n value=\"{{ 'see' | translate | uppercase }}\">\r\n </div>\r\n }\r\n <div class=\"container d-md-none\">\r\n <div class=\"row\">\r\n <div class=\"col-4\">\r\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\r\n </div>\r\n @if(creditAmountConfigured ? showPrice : true){\r\n <div class=\"col-4 font-xl\">\r\n <p class=\"text-center w-100 m-0\"> {{ (item.product.variants[0].saleprice ?\r\n item.product.variants[0].saleprice : item.product.variants[0].price) |\r\n ecCurrencySymbol}}</p>\r\n </div>\r\n }\r\n @if(creditAmountConfigured ? showPrice : true){\r\n <div class=\"col-4 font-xl\">\r\n <p class=\"text-center w-100 m-0\"> {{ ((item.product.variants[0].saleprice ?\r\n item.product.variants[0].saleprice : item.product.variants[0].price) *\r\n item.quantity) | ecCurrencySymbol}}</p>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n @if(creditAmountConfigured ? showPrice : true){\r\n <div class=\"col-2 d-none d-md-flex align-items-center\">\r\n <p class=\"text-center w-100 m-0\">\r\n {{ (item.product.variants[0].saleprice ? item.product.variants[0].saleprice :\r\n item.product.variants[0].price) | ecCurrencySymbol}}\r\n </p>\r\n </div>\r\n }\r\n <div class=\"col-1 d-none d-md-flex align-items-center\">\r\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\r\n </div>\r\n @if(creditAmountConfigured ? showPrice : true){\r\n <div class=\"col-2 d-none d-md-flex align-items-center\">\r\n <p class=\"text-end w-100 m-0\">\r\n {{ ((item.product.variants[0].saleprice ? item.product.variants[0].saleprice :\r\n item.product.variants[0].price) * item.quantity) | ecCurrencySymbol}}</p>\r\n </div>\r\n }\r\n <div class=\"collapse\" [attr.id]=\"'collapseExample'+i\">\r\n <div class=\"card card-body\">\r\n <table class=\"table table-striped\">\r\n <thead>\r\n <tr>\r\n <th scope=\"col\">#</th>\r\n <th scope=\"col\">Estado</th>\r\n <th scope=\"col\">Cantidad</th>\r\n <th scope=\"col\">Fecha Solicitada</th>\r\n <th scope=\"col\">Fecha Estimada</th>\r\n <th scope=\"col\">Sede</th>\r\n <th scope=\"col\">Nota</th>\r\n <th scope=\"col\">Total Lote</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @for( lot of item.orderItemLot; track $index){\r\n <tr>\r\n <th scope=\"row\">{{lot.id}}</th>\r\n <td>{{lot.lot_status}}</td>\r\n <td>{{lot.quantity}}</td>\r\n <td>{{ toDate(lot.date_request, 'DD/MM/YYYY') | translate }}</td>\r\n @if(lot.date_deliver){\r\n <td>{{\r\n toDate(lot.date_deliver, 'DD/MM/YYYY') | translate }}</td>\r\n } @else {\r\n <td>Pendiente</td>\r\n }\r\n <td>{{lot.shipping_address_name}}</td>\r\n <td>{{lot.notes}}</td>\r\n <td>{{lot.total_lot | ecCurrencySymbol}}</td>\r\n </tr>\r\n }\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n\r\n <div class=\"container\">\r\n <div class=\"row\">\r\n <div class=\"col-12 col-md-6\"></div>\r\n @if(creditAmountConfigured ? showPrice : true){\r\n <div class=\"col-12 col-md-6\">\r\n <div class=\"row py-4\">\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'total-products' |\r\n translate }}</div>\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\r\n {{ (order.totals.items) | ecCurrencySymbol }}\r\n </div>\r\n\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'shipment' |\r\n translate }}</div>\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\r\n {{ (order.totals.shipping || '0') | ecCurrencySymbol }}\r\n\r\n </div>\r\n @if(!hideDiscounts && order.totals.promotion && order.totals.promotion != 0){\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'discount' |\r\n translate }}</div>\r\n }\r\n @if(!hideDiscounts && order.totals.promotion && order.totals.promotion != 0){\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end text-end\">\r\n {{ (order.totals.promotion) | ecCurrencySymbol }}</div>\r\n }\r\n @if(!hideTaxes && order.totals.taxes && order.totals.taxes != 0 ){\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'taxes' | translate }}</div>\r\n }\r\n @if(!hideTaxes && order.totals.taxes && order.totals.taxes != 0){\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\r\n {{ (order.totals.taxes) | ecCurrencySymbol }}</div>\r\n }\r\n\r\n <div class=\"col-6 font-brandon font-md\">{{ 'total' | translate | uppercase }}</div>\r\n <div class=\"col-6 font-brandon font-md text-end\">\r\n {{ (order.totals.total) | ecCurrencySymbol }}\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n } @else {\r\n <div class=\"w-100 h-50\">\r\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\r\n <h5>{{ 'no-orders' | translate }}</h5>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n\r\n } @else {\r\n <div class=\"w-100 h-50 py-5\">\r\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\r\n <app-loading-full-ec></app-loading-full-ec>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n</main>", styles: [""], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.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" }] });
|
|
8164
8528
|
}
|
|
8165
8529
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: OrderEcComponent, decorators: [{
|
|
8166
8530
|
type: Component,
|
|
8167
|
-
args: [{ selector: 'app-order-ec', standalone: true, imports: [
|
|
8531
|
+
args: [{ selector: 'app-order-ec', standalone: true, imports: [TranslateModule,
|
|
8532
|
+
EcCurrencySymbolPipe,
|
|
8533
|
+
LoadingFullEcComponent,
|
|
8534
|
+
AsyncPipe,
|
|
8535
|
+
TitleCasePipe,
|
|
8536
|
+
UpperCasePipe
|
|
8537
|
+
], template: "<main class=\"py-5\" id=\"orderEcComponent\">\r\n <div class=\"container\">\r\n @if(order$ | async; as order){\r\n <div class=\"wrap\">\r\n @if(order){\r\n\r\n <div class=\"row justify-content-between \">\r\n <div class=\"col-sm-auto col-12 font-brandon\">\r\n <h4 class=\"tit1 fw-bold\">{{ ('order' | translate) + ': ' + order.number }}</h4>\r\n </div>\r\n @if(order?.invoice){\r\n <div class=\"col-sm col-12 font-brandon\">\r\n <a target=\"_blank\" [href]=\"getUrlBase().slice(0, -1) + order.invoice\"\r\n class=\"btn btn-link btn-invoice\">\r\n <i class=\"fas fa-file-download me-1\"></i>\r\n {{ 'download' | translate }} {{ 'invoices' | translate | titlecase }}\r\n </a>\r\n </div>\r\n }\r\n <a (click)=\"back()\" class=\"col-auto text-end\">\r\n <button class=\"btn btn-outline-dark btvolver border\">{{ 'back-to-orders' | translate }}</button>\r\n </a>\r\n </div>\r\n\r\n <section id=\"orders\">\r\n <div class=\"row pt-2\">\r\n <div class=\"col-md-2 col-12\">\r\n <p class=\"st\">{{ 'payment-state' | translate }}:</p>\r\n <p class=\"\">\r\n {{ order.payments[0].state | translate }}\r\n </p>\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\">\r\n <p class=\"st\">{{ 'shipment-state' | translate }}:</p>\r\n <p class=\"\">\r\n {{ order.shipments[0].state | translate }}\r\n </p>\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\">\r\n <p class=\"st\">{{ 'payment-method' | translate }}:</p>\r\n <p class=\"\">\r\n {{ order.payments[0]?.method?.name | translate }}\r\n </p>\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\">\r\n <p class=\"st\">{{ 'shipment-method' | translate }}:</p>\r\n <p class=\"\">\r\n {{ order.shipments[0].method.name }}\r\n </p>\r\n <!-- ACA DEBERIA IR EL LINK DE SEGUIMIENTO -->\r\n @if(order.tracking){\r\n <a [href]=\"order.tracking\"\r\n class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">\r\n Ver seguimiento</a>\r\n }\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\">\r\n <p class=\"st\">{{ 'date' | translate }}:</p>\r\n <p class=\"\">\r\n {{ toDate(order.checkoutCompletedAt, 'DD/MM/YYYY') | translate }}<br>\r\n {{ toDate(order.checkoutCompletedAt, 'h:mm:ss a') | translate }}\r\n </p>\r\n </div>\r\n @if(creditAmountConfigured ? showPrice : true){\r\n <div class=\"col-md-2 col-12 font-brandon\">\r\n <p class=\"st\">{{ 'total' | translate }}:</p>\r\n <h5 class=\"fw-bold\">\r\n {{ (order.totals.total) | ecCurrencySymbol}}\r\n\r\n </h5>\r\n </div>\r\n }\r\n </div>\r\n </section>\r\n @if(!hidePrices && allowRepeatOrders){\r\n <div class=\"text-end mt-3\">\r\n <button class=\"btn btn-primary mb-2\" (click)=\"repeatOrder(order)\">\r\n {{ 'repeat-order' | translate }}\r\n </button>\r\n </div>\r\n }\r\n\r\n <div class=\"container py-3 border-top border-bottom\">\r\n @if(order.items.length){\r\n <div class=\"row\">\r\n <div class=\"col-2 font-sm font-brandon d-none d-md-block\">\r\n {{ 'product' | translate | uppercase }}\r\n </div>\r\n <div class=\"col-4 font-sm font-brandon d-none d-md-block\">\r\n {{ 'description' | translate | uppercase }}\r\n </div>\r\n @if(channelConfig.applyOrderLot){\r\n <div id=\"colLots\" class=\"col-1 font-sm font-brandon d-none d-md-block\">\r\n <!-- {{ 'description' | translate | uppercase }} -->\r\n {{ 'lots' | translate | uppercase }}\r\n </div>\r\n }\r\n @if(creditAmountConfigured ? showPrice : true){\r\n <div class=\"col-2 text-center font-sm font-brandon d-none d-md-block\">\r\n {{ 'unit-price' | translate | uppercase }}\r\n </div>\r\n }\r\n <div class=\"col-1 text-center font-sm font-brandon d-none d-md-block\">\r\n {{ 'quantity' | translate | uppercase }}\r\n </div>\r\n @if(creditAmountConfigured ? showPrice : true){\r\n <div class=\"col-2 text-end font-sm font-brandon d-none d-md-block\">\r\n {{ 'total' | translate | uppercase }}\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n\r\n }\r\n @for(item of order.items; track $index; let i = $index){\r\n <div class=\"row cart-items\">\r\n <div class=\"col-5 col-md-2 py-2\">\r\n @if(item.product.variants[0]?.images?.length){\r\n <img class=\"smc maxwidth img-fluid rounded-custom \"\r\n [src]=\"mediaUrl() + item.product.variants[0].images[0]\" alt=\"\">\r\n } @else {\r\n @if(item.product.picturesdefault){\r\n <img class=\"smc maxwidth img-fluid rounded-custom\"\r\n [src]=\"mediaUrl() + item.product.picturesdefault[0]\" alt=\"\">\r\n }\r\n }\r\n </div>\r\n <div\r\n class=\"col-md-4 col-7 flex-column flex-md-row justify-content-start d-flex align-items-center\">\r\n <p class=\"font-brandon d-flex w-100 mb-0\">\r\n {{ item.product.name }} (Cod:{{ item.product.variants[0].code }})\r\n </p>\r\n </div>\r\n @if(channelConfig.applyOrderLot){\r\n <div class=\"col-md-1 col-1 flex-column flex-md-row justify-content-start d-flex align-items-center\">\r\n <input type=\"button\" class=\"btn btn-primary btnSeguir m-0 text-center\" type=\"button\"\r\n [attr.data-bs-toggle]=\"'collapse'\" [attr.data-bs-target]=\"'#collapseExample'+i\"\r\n aria-expanded=\"false\" [attr.aria-controls]=\"'collapseExample'+i\"\r\n value=\"{{ 'see' | translate | uppercase }}\">\r\n </div>\r\n }\r\n <div class=\"container d-md-none\">\r\n <div class=\"row\">\r\n <div class=\"col-4\">\r\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\r\n </div>\r\n @if(creditAmountConfigured ? showPrice : true){\r\n <div class=\"col-4 font-xl\">\r\n <p class=\"text-center w-100 m-0\"> {{ (item.product.variants[0].saleprice ?\r\n item.product.variants[0].saleprice : item.product.variants[0].price) |\r\n ecCurrencySymbol}}</p>\r\n </div>\r\n }\r\n @if(creditAmountConfigured ? showPrice : true){\r\n <div class=\"col-4 font-xl\">\r\n <p class=\"text-center w-100 m-0\"> {{ ((item.product.variants[0].saleprice ?\r\n item.product.variants[0].saleprice : item.product.variants[0].price) *\r\n item.quantity) | ecCurrencySymbol}}</p>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n @if(creditAmountConfigured ? showPrice : true){\r\n <div class=\"col-2 d-none d-md-flex align-items-center\">\r\n <p class=\"text-center w-100 m-0\">\r\n {{ (item.product.variants[0].saleprice ? item.product.variants[0].saleprice :\r\n item.product.variants[0].price) | ecCurrencySymbol}}\r\n </p>\r\n </div>\r\n }\r\n <div class=\"col-1 d-none d-md-flex align-items-center\">\r\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\r\n </div>\r\n @if(creditAmountConfigured ? showPrice : true){\r\n <div class=\"col-2 d-none d-md-flex align-items-center\">\r\n <p class=\"text-end w-100 m-0\">\r\n {{ ((item.product.variants[0].saleprice ? item.product.variants[0].saleprice :\r\n item.product.variants[0].price) * item.quantity) | ecCurrencySymbol}}</p>\r\n </div>\r\n }\r\n <div class=\"collapse\" [attr.id]=\"'collapseExample'+i\">\r\n <div class=\"card card-body\">\r\n <table class=\"table table-striped\">\r\n <thead>\r\n <tr>\r\n <th scope=\"col\">#</th>\r\n <th scope=\"col\">Estado</th>\r\n <th scope=\"col\">Cantidad</th>\r\n <th scope=\"col\">Fecha Solicitada</th>\r\n <th scope=\"col\">Fecha Estimada</th>\r\n <th scope=\"col\">Sede</th>\r\n <th scope=\"col\">Nota</th>\r\n <th scope=\"col\">Total Lote</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @for( lot of item.orderItemLot; track $index){\r\n <tr>\r\n <th scope=\"row\">{{lot.id}}</th>\r\n <td>{{lot.lot_status}}</td>\r\n <td>{{lot.quantity}}</td>\r\n <td>{{ toDate(lot.date_request, 'DD/MM/YYYY') | translate }}</td>\r\n @if(lot.date_deliver){\r\n <td>{{\r\n toDate(lot.date_deliver, 'DD/MM/YYYY') | translate }}</td>\r\n } @else {\r\n <td>Pendiente</td>\r\n }\r\n <td>{{lot.shipping_address_name}}</td>\r\n <td>{{lot.notes}}</td>\r\n <td>{{lot.total_lot | ecCurrencySymbol}}</td>\r\n </tr>\r\n }\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n\r\n <div class=\"container\">\r\n <div class=\"row\">\r\n <div class=\"col-12 col-md-6\"></div>\r\n @if(creditAmountConfigured ? showPrice : true){\r\n <div class=\"col-12 col-md-6\">\r\n <div class=\"row py-4\">\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'total-products' |\r\n translate }}</div>\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\r\n {{ (order.totals.items) | ecCurrencySymbol }}\r\n </div>\r\n\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'shipment' |\r\n translate }}</div>\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\r\n {{ (order.totals.shipping || '0') | ecCurrencySymbol }}\r\n\r\n </div>\r\n @if(!hideDiscounts && order.totals.promotion && order.totals.promotion != 0){\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'discount' |\r\n translate }}</div>\r\n }\r\n @if(!hideDiscounts && order.totals.promotion && order.totals.promotion != 0){\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end text-end\">\r\n {{ (order.totals.promotion) | ecCurrencySymbol }}</div>\r\n }\r\n @if(!hideTaxes && order.totals.taxes && order.totals.taxes != 0 ){\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'taxes' | translate }}</div>\r\n }\r\n @if(!hideTaxes && order.totals.taxes && order.totals.taxes != 0){\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\r\n {{ (order.totals.taxes) | ecCurrencySymbol }}</div>\r\n }\r\n\r\n <div class=\"col-6 font-brandon font-md\">{{ 'total' | translate | uppercase }}</div>\r\n <div class=\"col-6 font-brandon font-md text-end\">\r\n {{ (order.totals.total) | ecCurrencySymbol }}\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n } @else {\r\n <div class=\"w-100 h-50\">\r\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\r\n <h5>{{ 'no-orders' | translate }}</h5>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n\r\n } @else {\r\n <div class=\"w-100 h-50 py-5\">\r\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\r\n <app-loading-full-ec></app-loading-full-ec>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n</main>" }]
|
|
8168
8538
|
}] });
|
|
8169
8539
|
|
|
8540
|
+
class SidebarEcComponent {
|
|
8541
|
+
_cartService = inject(CartService);
|
|
8542
|
+
_consts = inject(CoreConstantsService);
|
|
8543
|
+
_authService = inject(AuthService);
|
|
8544
|
+
_router = inject(Router);
|
|
8545
|
+
_toastrService = inject(ToastService);
|
|
8546
|
+
_channelService = inject(ChannelService);
|
|
8547
|
+
user = null;
|
|
8548
|
+
mediaUrl = this._consts.mediaUrl();
|
|
8549
|
+
promotions = [];
|
|
8550
|
+
variantsToShow = ['TALLE', 'COLOR'];
|
|
8551
|
+
hideDiscounts = false;
|
|
8552
|
+
hideTaxes = false;
|
|
8553
|
+
cartItems$ = this._cartService.cartItems$;
|
|
8554
|
+
subTotalAmount$ = this._cartService.getSubTotalAmount();
|
|
8555
|
+
totalPromotionAmount$ = this._cartService.getTotalPromotionAmount();
|
|
8556
|
+
taxesAmount$ = this._cartService.getTaxesAmount();
|
|
8557
|
+
totalAmount$ = this._cartService.getTotalAmount();
|
|
8558
|
+
ngOnInit() {
|
|
8559
|
+
this._cartService.promotions$.subscribe(promotions => this.promotions = promotions);
|
|
8560
|
+
this._authService.getUserProfile().subscribe(u => {
|
|
8561
|
+
this.user = u;
|
|
8562
|
+
});
|
|
8563
|
+
this._channelService.channel$.subscribe(channel => {
|
|
8564
|
+
this.hideDiscounts = channel?.hideDiscounts ?? false;
|
|
8565
|
+
this.hideTaxes = channel?.hideTaxes ?? false;
|
|
8566
|
+
});
|
|
8567
|
+
}
|
|
8568
|
+
actualizarCantidad(_t13, arg1, arg2, arg3, arg4) {
|
|
8569
|
+
throw new Error('Method not implemented.');
|
|
8570
|
+
}
|
|
8571
|
+
getVariants(_t8) {
|
|
8572
|
+
throw new Error('Method not implemented.');
|
|
8573
|
+
}
|
|
8574
|
+
getTotalAmount() {
|
|
8575
|
+
throw new Error('Method not implemented.');
|
|
8576
|
+
}
|
|
8577
|
+
removeCoupon() {
|
|
8578
|
+
throw new Error('Method not implemented.');
|
|
8579
|
+
}
|
|
8580
|
+
deleteCartItem(_t8, arg1) {
|
|
8581
|
+
throw new Error('Method not implemented.');
|
|
8582
|
+
}
|
|
8583
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: SidebarEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8584
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: SidebarEcComponent, isStandalone: true, selector: "app-sidebar-ec", ngImport: i0, template: "<div class=\"nav my-4 mx-0 position-relative text-center shadow-sm border-bottom d-flex justify-content-center\">\r\n <h2 class=\"row text-center\">Mi carrito</h2>\r\n <div class=\" me-3 closeCart position-absolute end-0\" data-bs-dismiss=\"offcanvas\" aria-label=\"Close\">\r\n <i class=\"fa fa-times-circle fs-5\" aria-hidden=\"true\"></i>\r\n </div>\r\n</div>\r\n\r\n\r\n@if(cartItems$ | async; as items){\r\n @if(items.length > 0){\r\n <!-- PRODUCTO -->\r\n <div class=\"d-flex flex-column mb-4 items\">\r\n @for(item of items; track $index; let i = $index){\r\n <div class=\"productoCarrito mt-1 mb-2 w-100\">\r\n <app-cart-item-ec [inSidebar]=\"true\" [item]=\"item\"></app-cart-item-ec>\r\n </div>\r\n }\r\n </div>\r\n <div class=\"d-flex mx-4 justify-content-between border-top \">\r\n <p>Subtotal</p>\r\n <p class=\"fw-700\">{{ (subTotalAmount$ | async) | ecCurrencySymbol}}</p>\r\n </div>\r\n <div class=\"mx-4 bordeBot\">\r\n <app-coupon-ec></app-coupon-ec>\r\n </div>\r\n <div class=\"d-flex mx-4 justify-content-between bordeBot2\">\r\n <p>Descuentos:</p>\r\n <p>{{ (totalPromotionAmount$ | async) |ecCurrencySymbol }}</p>\r\n </div>\r\n\r\n <div class=\"d-flex mx-4 justify-content-between bordeBot2\">\r\n <!-- @if(this._cartService.cart.source.value.couponCode){\r\n <a class=\"quitar-cupon text-dark\" role=\"button\"\r\n (click)=\"removeCoupon()\">(Quitar cup\u00F3n)</a>\r\n } -->\r\n </div>\r\n <div class=\"d-flex mx-4 justify-content-between mb-3 mt-2\">\r\n <p class=\"fw-bold h5\">TOTAL</p>\r\n <p class=\"fw-bold h5\">{{(totalAmount$ | async) | ecCurrencySymbol}}</p>\r\n </div>\r\n <div class=\"d-flex flex-column mx-4 justify-content-between mb-3\" data-bs-dismiss=\"offcanvas\" aria-label=\"Close\">\r\n <a [routerLink]=\"['/cart']\" class=\"btn btn-primary btn-block w-100 btnComprar mb-2 mt-3 \">CONFIRMAR PEDIDO</a>\r\n <a [routerLink]=\"['/collection']\" class=\"btn btn-secondary btn-block w-100 btnSeguir\">SEGUIR COMPRANDO</a>\r\n </div>\r\n\r\n\r\n } @else {\r\n <div class=\"container-lg px-lg-0 px-md-4 my-5\">\r\n <div class=\"row\">\r\n <div class=\"col-12\">\r\n <h5 class=\"text-center mb-sm-4 text-uppercase\"> \u00B7 Su carrito se\r\n encuentra vac\u00EDo \u00B7 </h5>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n}", styles: [".items{max-height:35vh;overflow-y:scroll;overflow-x:hidden}\n"], 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" }] });
|
|
8585
|
+
}
|
|
8586
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: SidebarEcComponent, decorators: [{
|
|
8587
|
+
type: Component,
|
|
8588
|
+
args: [{ selector: 'app-sidebar-ec', standalone: true, imports: [RouterLink, AsyncPipe, CouponEcComponent, CartItemEcComponent, EcCurrencySymbolPipe], template: "<div class=\"nav my-4 mx-0 position-relative text-center shadow-sm border-bottom d-flex justify-content-center\">\r\n <h2 class=\"row text-center\">Mi carrito</h2>\r\n <div class=\" me-3 closeCart position-absolute end-0\" data-bs-dismiss=\"offcanvas\" aria-label=\"Close\">\r\n <i class=\"fa fa-times-circle fs-5\" aria-hidden=\"true\"></i>\r\n </div>\r\n</div>\r\n\r\n\r\n@if(cartItems$ | async; as items){\r\n @if(items.length > 0){\r\n <!-- PRODUCTO -->\r\n <div class=\"d-flex flex-column mb-4 items\">\r\n @for(item of items; track $index; let i = $index){\r\n <div class=\"productoCarrito mt-1 mb-2 w-100\">\r\n <app-cart-item-ec [inSidebar]=\"true\" [item]=\"item\"></app-cart-item-ec>\r\n </div>\r\n }\r\n </div>\r\n <div class=\"d-flex mx-4 justify-content-between border-top \">\r\n <p>Subtotal</p>\r\n <p class=\"fw-700\">{{ (subTotalAmount$ | async) | ecCurrencySymbol}}</p>\r\n </div>\r\n <div class=\"mx-4 bordeBot\">\r\n <app-coupon-ec></app-coupon-ec>\r\n </div>\r\n <div class=\"d-flex mx-4 justify-content-between bordeBot2\">\r\n <p>Descuentos:</p>\r\n <p>{{ (totalPromotionAmount$ | async) |ecCurrencySymbol }}</p>\r\n </div>\r\n\r\n <div class=\"d-flex mx-4 justify-content-between bordeBot2\">\r\n <!-- @if(this._cartService.cart.source.value.couponCode){\r\n <a class=\"quitar-cupon text-dark\" role=\"button\"\r\n (click)=\"removeCoupon()\">(Quitar cup\u00F3n)</a>\r\n } -->\r\n </div>\r\n <div class=\"d-flex mx-4 justify-content-between mb-3 mt-2\">\r\n <p class=\"fw-bold h5\">TOTAL</p>\r\n <p class=\"fw-bold h5\">{{(totalAmount$ | async) | ecCurrencySymbol}}</p>\r\n </div>\r\n <div class=\"d-flex flex-column mx-4 justify-content-between mb-3\" data-bs-dismiss=\"offcanvas\" aria-label=\"Close\">\r\n <a [routerLink]=\"['/cart']\" class=\"btn btn-primary btn-block w-100 btnComprar mb-2 mt-3 \">CONFIRMAR PEDIDO</a>\r\n <a [routerLink]=\"['/collection']\" class=\"btn btn-secondary btn-block w-100 btnSeguir\">SEGUIR COMPRANDO</a>\r\n </div>\r\n\r\n\r\n } @else {\r\n <div class=\"container-lg px-lg-0 px-md-4 my-5\">\r\n <div class=\"row\">\r\n <div class=\"col-12\">\r\n <h5 class=\"text-center mb-sm-4 text-uppercase\"> \u00B7 Su carrito se\r\n encuentra vac\u00EDo \u00B7 </h5>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n}", styles: [".items{max-height:35vh;overflow-y:scroll;overflow-x:hidden}\n"] }]
|
|
8589
|
+
}] });
|
|
8590
|
+
|
|
8591
|
+
// export * from './related-products-ec/related-products-ec.component';
|
|
8592
|
+
// export * from './reviews-form-ec/reviews-form-ec.component';
|
|
8593
|
+
// export * from './reviews-ec/reviews-ec.component';
|
|
8594
|
+
|
|
8170
8595
|
//Types
|
|
8171
8596
|
|
|
8172
8597
|
/**
|
|
@@ -8219,10 +8644,12 @@ const authInterceptor = (req, next) => {
|
|
|
8219
8644
|
* Public API Surface of ng-easycommerce
|
|
8220
8645
|
*/
|
|
8221
8646
|
//Components
|
|
8647
|
+
// Directives
|
|
8648
|
+
//export * from './lib/ec-directive/index';
|
|
8222
8649
|
|
|
8223
8650
|
/**
|
|
8224
8651
|
* Generated bundle index. Do not edit.
|
|
8225
8652
|
*/
|
|
8226
8653
|
|
|
8227
|
-
export { AccountEcComponent, AddressingService, AnalyticsService, AuthEcComponent, AuthService, AuthStorageService, BlockBannerBoxEcComponent, BlockBannerFullEcComponent, BlockFormContactEcComponent, BlockHtmlEcComponent, BlockNewsletterEcComponent, BlockProductsEcComponent, BlocksEcComponent, BlocksRepositoryService, BlocksService, BreadcrumbEcComponent, CartEcComponent, CartItemEcComponent, CartService, ChannelService, CheckoutEcComponent, CheckoutService, CollectionEcComponent, ConfirmAccountEcComponent, CoreConstantsService, CouponEcComponent, CurrencyService, DopplerService, ENVIRONMENT_TOKEN, EcCurrencySymbolPipe, FacebookPixelService, 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, PaymentService, PriceEcComponent, ProductDetailEcComponent, ProductDetailService, ProductEcComponent, ProductsService, ReCaptchaEcComponent, ReCaptchaService, RegisterFormEcComponent, RegisterWholesalerFormEcComponent, ShipmentService, SuccessEcComponent, TestService, ToastService, VariantsEcComponent, authGuard, authInterceptor, provideEnvironment };
|
|
8654
|
+
export { AccountEcComponent, AddressingService, AnalyticsService, AuthEcComponent, AuthService, AuthStorageService, BlockBannerBoxEcComponent, BlockBannerFullEcComponent, BlockFormContactEcComponent, BlockHtmlEcComponent, BlockNewsletterEcComponent, BlockProductsEcComponent, BlocksEcComponent, BlocksRepositoryService, BlocksService, BreadcrumbEcComponent, CartEcComponent, CartItemEcComponent, CartService, ChannelService, CheckoutEcComponent, CheckoutService, CollectionEcComponent, ConfirmAccountEcComponent, CoreConstantsService, CouponEcComponent, CurrencyService, DopplerService, ENVIRONMENT_TOKEN, EcCurrencySymbolPipe, FacebookPixelService, 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, PaymentService, PriceEcComponent, ProductDetailEcComponent, ProductDetailService, ProductEcComponent, ProductsService, ReCaptchaEcComponent, ReCaptchaService, RegisterFormEcComponent, RegisterWholesalerFormEcComponent, ShipmentService, SidebarEcComponent, SuccessEcComponent, TestService, ToastService, VariantsEcComponent, authGuard, authInterceptor, provideEnvironment };
|
|
8228
8655
|
//# sourceMappingURL=ng-easycommerce-v18.mjs.map
|