ng-easycommerce 0.0.595 → 0.0.597
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/bundles/ng-easycommerce.umd.js +81 -13
- package/bundles/ng-easycommerce.umd.js.map +1 -1
- package/bundles/ng-easycommerce.umd.min.js +1 -1
- package/bundles/ng-easycommerce.umd.min.js.map +1 -1
- package/esm2015/lib/ec-component/account-ec/order-ec/order-ec.component.js +9 -2
- package/esm2015/lib/ec-component/account-ec/orders-list-ec/orders-list-ec.component.js +12 -4
- package/esm2015/lib/ec-component/cart-ec/cart-ec.component.js +18 -3
- package/esm2015/lib/ec-component/checkout-ec/checkout-ec.component.js +7 -1
- package/esm2015/lib/ec-component/checkout-ec/detail-checkout-block-ec/detail-checkout-block-ec.component.js +14 -4
- package/esm2015/lib/ec-component/header-ec/header-ec.component.js +6 -1
- package/esm2015/lib/ec-component/product-detail-ec/product-detail-ec.component.js +4 -1
- package/esm2015/lib/ec-component/product-ec/product-ec.component.js +13 -3
- package/esm2015/lib/ec-component/sidebar-ec/sidebar-ec.component.js +13 -3
- package/esm5/lib/ec-component/account-ec/order-ec/order-ec.component.js +9 -2
- package/esm5/lib/ec-component/account-ec/orders-list-ec/orders-list-ec.component.js +12 -4
- package/esm5/lib/ec-component/cart-ec/cart-ec.component.js +18 -3
- package/esm5/lib/ec-component/checkout-ec/checkout-ec.component.js +7 -1
- package/esm5/lib/ec-component/checkout-ec/detail-checkout-block-ec/detail-checkout-block-ec.component.js +14 -4
- package/esm5/lib/ec-component/header-ec/header-ec.component.js +6 -1
- package/esm5/lib/ec-component/product-detail-ec/product-detail-ec.component.js +4 -1
- package/esm5/lib/ec-component/product-ec/product-ec.component.js +13 -3
- package/esm5/lib/ec-component/sidebar-ec/sidebar-ec.component.js +13 -3
- package/fesm2015/ng-easycommerce.js +81 -13
- package/fesm2015/ng-easycommerce.js.map +1 -1
- package/fesm5/ng-easycommerce.js +81 -13
- package/fesm5/ng-easycommerce.js.map +1 -1
- package/lib/ec-component/account-ec/order-ec/order-ec.component.d.ts +3 -0
- package/lib/ec-component/account-ec/orders-list-ec/orders-list-ec.component.d.ts +4 -1
- package/lib/ec-component/cart-ec/cart-ec.component.d.ts +6 -1
- package/lib/ec-component/checkout-ec/checkout-ec.component.d.ts +1 -0
- package/lib/ec-component/checkout-ec/detail-checkout-block-ec/detail-checkout-block-ec.component.d.ts +5 -1
- package/lib/ec-component/header-ec/header-ec.component.d.ts +1 -0
- package/lib/ec-component/product-detail-ec/product-detail-ec.component.d.ts +1 -0
- package/lib/ec-component/product-ec/product-ec.component.d.ts +4 -1
- package/lib/ec-component/sidebar-ec/sidebar-ec.component.d.ts +5 -1
- package/ng-easycommerce.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -6178,7 +6178,7 @@ var __awaiter$8 = (this && this.__awaiter) || function (thisArg, _arguments, P,
|
|
|
6178
6178
|
});
|
|
6179
6179
|
};
|
|
6180
6180
|
let CartEcComponent = class CartEcComponent extends ComponentHelper {
|
|
6181
|
-
constructor(cartService, authService, consts, productsService, router, modalService, toastrService, addressingService) {
|
|
6181
|
+
constructor(cartService, authService, consts, productsService, router, modalService, toastrService, addressingService, channelConfigService) {
|
|
6182
6182
|
super();
|
|
6183
6183
|
this.cartService = cartService;
|
|
6184
6184
|
this.authService = authService;
|
|
@@ -6188,6 +6188,7 @@ let CartEcComponent = class CartEcComponent extends ComponentHelper {
|
|
|
6188
6188
|
this.modalService = modalService;
|
|
6189
6189
|
this.toastrService = toastrService;
|
|
6190
6190
|
this.addressingService = addressingService;
|
|
6191
|
+
this.channelConfigService = channelConfigService;
|
|
6191
6192
|
this.variantsToShow = ['TALLE', 'COLOR'];
|
|
6192
6193
|
this.isLoggedIn = false;
|
|
6193
6194
|
this.mediaUrl = '';
|
|
@@ -6197,6 +6198,9 @@ let CartEcComponent = class CartEcComponent extends ComponentHelper {
|
|
|
6197
6198
|
this.updateStock = false;
|
|
6198
6199
|
this.exitUpdate = false;
|
|
6199
6200
|
this.isDisabled = false;
|
|
6201
|
+
this.hidePrices = false;
|
|
6202
|
+
this.hideDiscounts = false;
|
|
6203
|
+
this.hideTaxes = false;
|
|
6200
6204
|
this.toDecimal = (amount) => this.consts.toDecimal(amount);
|
|
6201
6205
|
this.actualizarCantidad = (item, cantidad, stock, id) => {
|
|
6202
6206
|
if (id) {
|
|
@@ -6279,6 +6283,15 @@ let CartEcComponent = class CartEcComponent extends ComponentHelper {
|
|
|
6279
6283
|
window.scroll(0, 0);
|
|
6280
6284
|
this.cartService.promotions.subscribe(promotions => this.promotions = promotions);
|
|
6281
6285
|
// console.log(this.cartService.getTaxes());
|
|
6286
|
+
this.channelConfigService.channelConfig$.subscribe(channel => {
|
|
6287
|
+
var _a, _b, _c, _d, _e, _f;
|
|
6288
|
+
this.hidePrices = (_b = (_a = channel) === null || _a === void 0 ? void 0 : _a.hidePrices, (_b !== null && _b !== void 0 ? _b : false));
|
|
6289
|
+
this.hideDiscounts = (_d = (_c = channel) === null || _c === void 0 ? void 0 : _c.hideDiscounts, (_d !== null && _d !== void 0 ? _d : false));
|
|
6290
|
+
this.hideTaxes = (_f = (_e = channel) === null || _e === void 0 ? void 0 : _e.hideTaxes, (_f !== null && _f !== void 0 ? _f : false));
|
|
6291
|
+
if (this.hidePrices) {
|
|
6292
|
+
this.router.navigate(['/']);
|
|
6293
|
+
}
|
|
6294
|
+
});
|
|
6282
6295
|
this.ecOnInit();
|
|
6283
6296
|
}
|
|
6284
6297
|
redirectCheckout() {
|
|
@@ -6524,7 +6537,8 @@ CartEcComponent.ctorParameters = () => [
|
|
|
6524
6537
|
{ type: Router },
|
|
6525
6538
|
{ type: BsModalService },
|
|
6526
6539
|
{ type: ToastService },
|
|
6527
|
-
{ type: AddressingService }
|
|
6540
|
+
{ type: AddressingService },
|
|
6541
|
+
{ type: ChannelConfigService }
|
|
6528
6542
|
];
|
|
6529
6543
|
CartEcComponent = __decorate$O([
|
|
6530
6544
|
Component({
|
|
@@ -6553,6 +6567,7 @@ let CheckoutEcComponent = class CheckoutEcComponent extends ComponentHelper {
|
|
|
6553
6567
|
this.canCheckout = false;
|
|
6554
6568
|
this.require_login = false;
|
|
6555
6569
|
this.steps = [];
|
|
6570
|
+
this.hidePrices = false;
|
|
6556
6571
|
this.loading$ = this.loadingSubject.asObservable();
|
|
6557
6572
|
this.initializeCheckout = () => {
|
|
6558
6573
|
var _a, _b, _c, _d;
|
|
@@ -6631,8 +6646,13 @@ let CheckoutEcComponent = class CheckoutEcComponent extends ComponentHelper {
|
|
|
6631
6646
|
}
|
|
6632
6647
|
};
|
|
6633
6648
|
this.channelService.channelConfig$.subscribe(res => {
|
|
6649
|
+
var _a, _b;
|
|
6634
6650
|
this.channel = res;
|
|
6635
6651
|
this.initializeSteps();
|
|
6652
|
+
this.hidePrices = (_b = (_a = res) === null || _a === void 0 ? void 0 : _a.hidePrices, (_b !== null && _b !== void 0 ? _b : false));
|
|
6653
|
+
if (this.hidePrices) {
|
|
6654
|
+
this.router.navigate(['/']);
|
|
6655
|
+
}
|
|
6636
6656
|
//console.log(this.stepEnabled(3))
|
|
6637
6657
|
});
|
|
6638
6658
|
this.ecOnConstruct();
|
|
@@ -8000,6 +8020,7 @@ let HeaderEcComponent = class HeaderEcComponent extends ComponentHelper {
|
|
|
8000
8020
|
this.toggled = false;
|
|
8001
8021
|
this.locales = [];
|
|
8002
8022
|
this.selectedLocale = 'ESP';
|
|
8023
|
+
this.hidePrices = false;
|
|
8003
8024
|
this.updateMenuItemSection = (elements) => {
|
|
8004
8025
|
this.menuItemsSections = this.optionsService.generateMenu(elements);
|
|
8005
8026
|
this.menuItemsSections = this.ecUpdateMenuItemSection(this.menuItemsSections);
|
|
@@ -8113,6 +8134,10 @@ let HeaderEcComponent = class HeaderEcComponent extends ComponentHelper {
|
|
|
8113
8134
|
this.selectedLocale = this.locales[0].name;
|
|
8114
8135
|
}
|
|
8115
8136
|
});
|
|
8137
|
+
this.channelConfigService.channelConfig$.subscribe(channel => {
|
|
8138
|
+
var _a, _b;
|
|
8139
|
+
this.hidePrices = (_b = (_a = channel) === null || _a === void 0 ? void 0 : _a.hidePrices, (_b !== null && _b !== void 0 ? _b : false));
|
|
8140
|
+
});
|
|
8116
8141
|
}
|
|
8117
8142
|
subscribeToBalance() {
|
|
8118
8143
|
this.balanceSubscription = this.cartService.balanceCustomer$.subscribe(balanceData => {
|
|
@@ -8868,6 +8893,7 @@ let ProductDetailEcComponent = class ProductDetailEcComponent extends ComponentH
|
|
|
8868
8893
|
this.focusImage = null;
|
|
8869
8894
|
this.owlOptions = {};
|
|
8870
8895
|
this.showReviews = false;
|
|
8896
|
+
this.hidePrices = false;
|
|
8871
8897
|
this.addToCart = () => {
|
|
8872
8898
|
this.quantity > 0 && this.productService.addToCart(this.quantity);
|
|
8873
8899
|
};
|
|
@@ -8948,7 +8974,9 @@ let ProductDetailEcComponent = class ProductDetailEcComponent extends ComponentH
|
|
|
8948
8974
|
this.changeImgFocus(productParam.picturesdefault[0]);
|
|
8949
8975
|
});
|
|
8950
8976
|
this.injector.get(ChannelConfigService).channelConfig$.subscribe(channel => {
|
|
8977
|
+
var _a, _b;
|
|
8951
8978
|
this.showReviews = channel.showReviews;
|
|
8979
|
+
this.hidePrices = (_b = (_a = channel) === null || _a === void 0 ? void 0 : _a.hidePrices, (_b !== null && _b !== void 0 ? _b : false));
|
|
8952
8980
|
});
|
|
8953
8981
|
this.ecOnConstruct();
|
|
8954
8982
|
}
|
|
@@ -8998,7 +9026,7 @@ var __decorate$15 = (this && this.__decorate) || function (decorators, target, k
|
|
|
8998
9026
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
8999
9027
|
};
|
|
9000
9028
|
let ProductEcComponent = class ProductEcComponent extends ComponentHelper {
|
|
9001
|
-
constructor(consts, router, productService, authService, toastrService, analyticsService) {
|
|
9029
|
+
constructor(consts, router, productService, authService, toastrService, analyticsService, injector) {
|
|
9002
9030
|
super();
|
|
9003
9031
|
this.consts = consts;
|
|
9004
9032
|
this.router = router;
|
|
@@ -9006,9 +9034,11 @@ let ProductEcComponent = class ProductEcComponent extends ComponentHelper {
|
|
|
9006
9034
|
this.authService = authService;
|
|
9007
9035
|
this.toastrService = toastrService;
|
|
9008
9036
|
this.analyticsService = analyticsService;
|
|
9037
|
+
this.injector = injector;
|
|
9009
9038
|
this.quantity = 1;
|
|
9010
9039
|
this.stock = 0;
|
|
9011
9040
|
this.data = null;
|
|
9041
|
+
this.hidePrices = false;
|
|
9012
9042
|
/**
|
|
9013
9043
|
* @description variable utilizada mutar de la vista de lista, a la de box.
|
|
9014
9044
|
*/
|
|
@@ -9068,6 +9098,11 @@ let ProductEcComponent = class ProductEcComponent extends ComponentHelper {
|
|
|
9068
9098
|
.filter(attribute => attribute.code === 'marca')
|
|
9069
9099
|
.map(attribute => attribute.children[0].name);
|
|
9070
9100
|
};
|
|
9101
|
+
const channelConfigService = this.injector.get(ChannelConfigService);
|
|
9102
|
+
channelConfigService.channelConfig$.subscribe(channel => {
|
|
9103
|
+
var _a, _b;
|
|
9104
|
+
this.hidePrices = (_b = (_a = channel) === null || _a === void 0 ? void 0 : _a.hidePrices, (_b !== null && _b !== void 0 ? _b : false));
|
|
9105
|
+
});
|
|
9071
9106
|
this.ecOnConstruct();
|
|
9072
9107
|
}
|
|
9073
9108
|
ngOnInit() {
|
|
@@ -9088,7 +9123,8 @@ ProductEcComponent.ctorParameters = () => [
|
|
|
9088
9123
|
{ type: ProductDetailService },
|
|
9089
9124
|
{ type: AuthService },
|
|
9090
9125
|
{ type: ToastService },
|
|
9091
|
-
{ type: AnalyticsService }
|
|
9126
|
+
{ type: AnalyticsService },
|
|
9127
|
+
{ type: Injector }
|
|
9092
9128
|
];
|
|
9093
9129
|
__decorate$15([
|
|
9094
9130
|
Input()
|
|
@@ -10564,16 +10600,18 @@ var __decorate$1k = (this && this.__decorate) || function (decorators, target, k
|
|
|
10564
10600
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
10565
10601
|
};
|
|
10566
10602
|
let OrdersEcComponent = class OrdersEcComponent extends ComponentHelper {
|
|
10567
|
-
constructor(ordersService, router, consts, cartService) {
|
|
10603
|
+
constructor(ordersService, router, consts, cartService, channelConfigService) {
|
|
10568
10604
|
super();
|
|
10569
10605
|
this.ordersService = ordersService;
|
|
10570
10606
|
this.router = router;
|
|
10571
10607
|
this.consts = consts;
|
|
10572
10608
|
this.cartService = cartService;
|
|
10609
|
+
this.channelConfigService = channelConfigService;
|
|
10573
10610
|
this.loading = true;
|
|
10574
10611
|
this.showImage = true;
|
|
10575
10612
|
this.showPrice = false;
|
|
10576
10613
|
this.creditAmountConfigured = false;
|
|
10614
|
+
this.hidePrices = false;
|
|
10577
10615
|
/**
|
|
10578
10616
|
* @description name -> nombre de clave de valuesToSort; asc -> true: ascendente, false: descendente
|
|
10579
10617
|
*/
|
|
@@ -10716,13 +10754,18 @@ let OrdersEcComponent = class OrdersEcComponent extends ComponentHelper {
|
|
|
10716
10754
|
this.cartService.creditAmount$.subscribe((creditAmount) => {
|
|
10717
10755
|
this.creditAmountConfigured = creditAmount !== null;
|
|
10718
10756
|
});
|
|
10757
|
+
this.channelConfigService.channelConfig$.subscribe(channel => {
|
|
10758
|
+
var _a, _b;
|
|
10759
|
+
this.hidePrices = (_b = (_a = channel) === null || _a === void 0 ? void 0 : _a.hidePrices, (_b !== null && _b !== void 0 ? _b : false));
|
|
10760
|
+
});
|
|
10719
10761
|
}
|
|
10720
10762
|
};
|
|
10721
10763
|
OrdersEcComponent.ctorParameters = () => [
|
|
10722
10764
|
{ type: OrdersService },
|
|
10723
10765
|
{ type: Router },
|
|
10724
10766
|
{ type: Constants },
|
|
10725
|
-
{ type: CartService }
|
|
10767
|
+
{ type: CartService },
|
|
10768
|
+
{ type: ChannelConfigService }
|
|
10726
10769
|
];
|
|
10727
10770
|
__decorate$1k([
|
|
10728
10771
|
Input()
|
|
@@ -10730,7 +10773,7 @@ __decorate$1k([
|
|
|
10730
10773
|
OrdersEcComponent = __decorate$1k([
|
|
10731
10774
|
Component({
|
|
10732
10775
|
selector: 'app-orders-ec',
|
|
10733
|
-
template: "<div class=\"container-fluid\" id=\"ordersEcComponent\">\n <section id=\"orders\" class=\"w-100\" *ngIf=\"!loading; else loadingView\">\n <div *ngIf=\"orders && orders.length; else noOrders\">\n
|
|
10776
|
+
template: "<div class=\"container-fluid\" id=\"ordersEcComponent\">\n <section id=\"orders\" class=\"w-100\" *ngIf=\"!loading; else loadingView\">\n <ng-container *ngIf=\"!hidePrices\">\n <div *ngIf=\"orders && orders.length; else noOrders\">\n <div class=\"row mb-1 border-bottom\">\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'number' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('number')\">{{ 'order' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'paymentState' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('paymentState')\">{{ 'payment-state' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'method' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('method')\">{{ 'shipment-method' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12 \">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'methodState' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('methodState')\">\n {{ 'shipment-state' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'date' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('date')\">{{ 'date' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'total' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('total')\">{{ 'total' | translate }}:</p>\n </div>\n </div>\n <div class=\"row item border-bottom py-2\" *ngFor=\"let order of orders\">\n <div class=\"col-lg-2 col-12\">\n <h5 class=\"fw-bold\">\n {{ order.number }}\n </h5>\n <!-- <ng-container *ngIf=\"showImage\">\n <ng-container *ngIf=\"order.items[0].product.variants[0]?.images?.length ; else defaultpicture\">\n <img class=\"smc maxwidth\" [src]=\"mediaUrl + order.items[0].product.variants[0].images[0]\" alt=\"\">\n </ng-container>\n <ng-template #defaultpicture>\n <img *ngIf=\"order.items[0].product.picturesdefault\" class=\"smc maxwidth\"\n [src]=\"mediaUrl + order.items[0].product.picturesdefault[0]\" alt=\"\">\n </ng-template>\n </ng-container> -->\n </div>\n <div class=\"col-lg-2 col-12\">\n <p class=\"price\" *ngIf=\"order.payments && order.payments.length > 0\">\n {{ order.payments[0].state | translate | titlecase }}\n </p>\n </div>\n <div class=\"col-lg-2 col-12\">\n\n <p class=\"price\">\n {{ order.shipments[0].method.name }}\n </p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p class=\"price\">\n {{ order.shipments[0].state | translate | titlecase }}\n </p>\n <!-- ACA DEBERIA IR EL LINK DE SEGUIMIENTO -->\n <!-- <button class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver seguimiento</button> -->\n <a *ngIf=\"order.tracking\" [href]=\"order.tracking\"\n class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver\n seguimiento</a>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p class=\"price\">\n {{ toDate(order.checkoutCompletedAt, 'DD/MM/YYYY') | translate }}<br>\n {{ toDate(order.checkoutCompletedAt, 'h:mm:ss a') | translate }}\n </p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <h5 class=\"fw-bold text-nowrap\" *ngIf=\"(creditAmountConfigured ? showPrice : true)\">\n {{ (order.totals.total) | ecCurrencySymbol }}\n </h5>\n <button class=\"btn px-0 w-100 btdetalle\" (click)=\"goToOrder(order)\">{{\n 'see-order' | translate }}</button>\n </div>\n </div>\n </div>\n </ng-container>\n </section>\n</div>\n\n<ng-template #noOrders>\n <div class=\"w-100 h-50\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <h5>{{ 'no-orders' | translate }}</h5>\n </div>\n </div>\n</ng-template>\n\n<ng-template #errorView>\n <div class=\"w-100 h-50\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <h4>{{ 'orders-error' | translate }}</h4>\n </div>\n </div>\n</ng-template>\n\n<ng-template #loadingView>\n <div class=\"w-100 h-50 py-5\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n </div>\n</ng-template>",
|
|
10734
10777
|
styles: ["#ordersEcComponent .btn.btdetalle{background-color:#000;color:#fff;border-color:#000;border-width:1px;border-radius:10px;padding:10px 0}#ordersEcComponent .btn.btdetalle:hover{background-color:#fff;color:#000;border-color:#000}.asc.dropdown-toggle::after{transform:rotate(180deg)}.applied.dropdown-toggle::after{color:#198754}"]
|
|
10735
10778
|
})
|
|
10736
10779
|
], OrdersEcComponent);
|
|
@@ -10767,6 +10810,9 @@ let OrderEcComponent = class OrderEcComponent extends ComponentHelper {
|
|
|
10767
10810
|
this.allowRepeatOrders = false;
|
|
10768
10811
|
this.showPrice = false;
|
|
10769
10812
|
this.creditAmountConfigured = false;
|
|
10813
|
+
this.hidePrices = false;
|
|
10814
|
+
this.hideDiscounts = false;
|
|
10815
|
+
this.hideTaxes = false;
|
|
10770
10816
|
this.toDate = (date, format) => moment(date).format(!format && 'DD/MM/YYYY, h:mm:ss a' || format);
|
|
10771
10817
|
this.callError = () => {
|
|
10772
10818
|
this.error = '?';
|
|
@@ -10797,12 +10843,16 @@ let OrderEcComponent = class OrderEcComponent extends ComponentHelper {
|
|
|
10797
10843
|
this.callError();
|
|
10798
10844
|
};
|
|
10799
10845
|
this.channelConfigService.channelConfig$.subscribe((config) => {
|
|
10846
|
+
var _a, _b, _c, _d, _e, _f;
|
|
10800
10847
|
if (config && config.allowRepeatOrders !== undefined) {
|
|
10801
10848
|
this.allowRepeatOrders = config.allowRepeatOrders;
|
|
10802
10849
|
}
|
|
10803
10850
|
else {
|
|
10804
10851
|
this.allowRepeatOrders = false;
|
|
10805
10852
|
}
|
|
10853
|
+
this.hidePrices = (_b = (_a = config) === null || _a === void 0 ? void 0 : _a.hidePrices, (_b !== null && _b !== void 0 ? _b : false));
|
|
10854
|
+
this.hideDiscounts = (_d = (_c = config) === null || _c === void 0 ? void 0 : _c.hideDiscounts, (_d !== null && _d !== void 0 ? _d : false));
|
|
10855
|
+
this.hideTaxes = (_f = (_e = config) === null || _e === void 0 ? void 0 : _e.hideTaxes, (_f !== null && _f !== void 0 ? _f : false));
|
|
10806
10856
|
});
|
|
10807
10857
|
this.cartService.showPrice$.subscribe((showPrice) => {
|
|
10808
10858
|
this.showPrice = showPrice;
|
|
@@ -10832,7 +10882,7 @@ __decorate$1l([
|
|
|
10832
10882
|
OrderEcComponent = __decorate$1l([
|
|
10833
10883
|
Component({
|
|
10834
10884
|
selector: 'app-order-ec',
|
|
10835
|
-
template: "<main class=\"py-5\" id=\"orderEcComponent\">\n <div class=\"container\">\n <div class=\"wrap\" *ngIf=\"!loading; else loadingView\">\n <div *ngIf=\"order; else noOrder\">\n\n <div class=\"row justify-content-between \">\n <div class=\"col-sm-auto col-12 font-brandon\">\n <h4 class=\"tit1 fw-bold\">{{ ('order' | translate) + ': ' + order.number }}</h4>\n </div>\n <ng-container *ngIf=\"order?.invoice\">\n <div class=\"col-sm col-12 font-brandon\">\n <a target=\"_blank\" [href]=\"consts.getUrlBase().slice(0, -1) + order.invoice\"\n class=\"btn btn-link btn-invoice\">\n <i class=\"fas fa-file-download me-1\"></i>\n {{ 'download' | translate }} {{ 'invoices' | translate | titlecase }}\n </a>\n </div>\n </ng-container>\n <a (click)=\"volver()\" class=\"col-auto text-end\">\n <button class=\"btn btvolver bg-gray text-white\">{{ 'back-to-orders' | translate }}</button>\n </a>\n </div>\n\n <section id=\"orders\">\n <div class=\"row pt-2\">\n <div class=\"col-md-2 col-12\">\n <p class=\"st\">{{ 'payment-state' | translate }}:</p>\n <p class=\"\">\n {{ order.payments[0].state | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'shipment-state' | translate }}:</p>\n <p class=\"\">\n {{ order.shipments[0].state | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'payment-method' | translate }}:</p>\n <p class=\"\">\n {{ order.payments[0]?.method?.name | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'shipment-method' | translate }}:</p>\n <p class=\"\">\n {{ order.shipments[0].method.name }}\n </p>\n <!-- ACA DEBERIA IR EL LINK DE SEGUIMIENTO -->\n <a *ngIf=\"order.tracking\" [href]=\"order.tracking\"\n class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver\n seguimiento</a>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'date' | translate }}:</p>\n <p class=\"\">\n {{ toDate(order.checkoutCompletedAt, 'DD/MM/YYYY') | translate }}<br>\n {{ toDate(order.checkoutCompletedAt, 'h:mm:ss a') | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\" *ngIf=\"(creditAmountConfigured ? showPrice : true)\">\n <p class=\"st\">{{ 'total' | translate }}:</p>\n <h5 class=\"fw-bold\">\n {{ (order.totals.total) | ecCurrencySymbol}}\n\n </h5>\n </div>\n </div>\n </section>\n\n <div class=\"text-end mt-3\" *ngIf=\"allowRepeatOrders\">\n <button class=\"btn btn-primary mb-2\" (click)=\"repeatOrder()\">\n {{ 'repeat-order' | translate }}\n </button>\n </div>\n\n <div class=\"container py-3 border-top border-bottom\">\n <div *ngIf=\"order.items.length; else noProducts\" class=\"row\">\n <div class=\"col-2 font-sm font-brandon d-none d-md-block\">\n {{ 'product' | translate | uppercase }}\n </div>\n <div class=\"col-4 font-sm font-brandon d-none d-md-block\">\n {{ 'description' | translate | uppercase }}\n </div>\n <div id=\"colLots\" *ngIf=\"ordersService.channelConfig.applyOrderLot\"\n class=\"col-1 font-sm font-brandon d-none d-md-block\">\n <!-- {{ 'description' | translate | uppercase }} -->\n {{ 'lots' | translate | uppercase }}\n </div>\n <div class=\"col-2 text-center font-sm font-brandon d-none d-md-block\"\n *ngIf=\"(creditAmountConfigured ? showPrice : true)\">\n {{ 'unit-price' | translate | uppercase }}\n </div>\n <div class=\"col-1 text-center font-sm font-brandon d-none d-md-block\">\n {{ 'quantity' | translate | uppercase }}\n </div>\n <div class=\"col-2 text-end font-sm font-brandon d-none d-md-block\"\n *ngIf=\"(creditAmountConfigured ? showPrice : true)\">\n {{ 'total' | translate | uppercase }}\n </div>\n </div>\n <ng-container *ngFor=\"let item of order.items; let i = index\">\n <div class=\"row cart-items\">\n <div class=\"col-5 col-md-2 py-2\">\n <ng-container *ngIf=\"item.product.variants[0]?.images?.length ; else defaultpicture\">\n <img class=\"smc maxwidth img-fluid rounded-custom \"\n [src]=\"consts.mediaUrl() + item.product.variants[0].images[0]\" alt=\"\">\n </ng-container>\n <ng-template #defaultpicture>\n <img *ngIf=\"item.product.picturesdefault\"\n class=\"smc maxwidth img-fluid rounded-custom\"\n [src]=\"consts.mediaUrl() + item.product.picturesdefault[0]\" alt=\"\">\n </ng-template>\n </div>\n <div\n class=\"col-md-4 col-7 flex-column flex-md-row justify-content-start d-flex align-items-center\">\n <p class=\"font-brandon d-flex w-100 mb-0\">\n {{ item.product.name }} (Cod:{{ item.product.variants[0].code }})\n </p>\n </div>\n <div class=\"col-md-1 col-1 flex-column flex-md-row justify-content-start d-flex align-items-center\"\n *ngIf=\"ordersService.channelConfig.applyOrderLot\">\n <input type=\"button\" class=\"btn btn-primary btnSeguir m-0 text-center\" type=\"button\"\n [attr.data-bs-toggle]=\"'collapse'\" [attr.data-bs-target]=\"'#collapseExample'+i\"\n aria-expanded=\"false\" [attr.aria-controls]=\"'collapseExample'+i\"\n value=\"{{ 'see' | translate | uppercase }}\">\n </div>\n <div class=\"container d-md-none\">\n <div class=\"row\">\n <div class=\"col-4\">\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\n </div>\n <div class=\"col-4 font-xl\" *ngIf=\"(creditAmountConfigured ? showPrice : true)\">\n <p class=\"text-center w-100 m-0\"> {{ (item.product.variants[0].saleprice ?\n item.product.variants[0].saleprice : item.product.variants[0].price) |\n ecCurrencySymbol}}</p>\n </div>\n <div class=\"col-4 font-xl\" *ngIf=\"(creditAmountConfigured ? showPrice : true)\">\n <p class=\"text-center w-100 m-0\"> {{ ((item.product.variants[0].saleprice ?\n item.product.variants[0].saleprice : item.product.variants[0].price) *\n item.quantity) | ecCurrencySymbol}}</p>\n </div>\n </div>\n </div>\n\n <div class=\"col-2 d-none d-md-flex align-items-center\"\n *ngIf=\"(creditAmountConfigured ? showPrice : true)\">\n <p class=\"text-center w-100 m-0\">\n {{ (item.product.variants[0].saleprice ? item.product.variants[0].saleprice :\n item.product.variants[0].price) | ecCurrencySymbol}}\n </p>\n </div>\n <div class=\"col-1 d-none d-md-flex align-items-center\">\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\n </div>\n <div class=\"col-2 d-none d-md-flex align-items-center\"\n *ngIf=\"(creditAmountConfigured ? showPrice : true)\">\n <p class=\"text-end w-100 m-0\">\n {{ ((item.product.variants[0].saleprice ? item.product.variants[0].saleprice :\n item.product.variants[0].price) * item.quantity) | ecCurrencySymbol}}</p>\n </div>\n <div class=\"collapse\" [attr.id]=\"'collapseExample'+i\">\n <div class=\"card card-body\">\n <table class=\"table table-striped\">\n <thead>\n <tr>\n <th scope=\"col\">#</th>\n <th scope=\"col\">Estado</th>\n <th scope=\"col\">Cantidad</th>\n <th scope=\"col\">Fecha Solicitada</th>\n <th scope=\"col\">Fecha Estimada</th>\n <th scope=\"col\">Sede</th>\n <th scope=\"col\">Nota</th>\n <th scope=\"col\">Total Lote</th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let lot of item.orderItemLot\">\n <tr>\n <th scope=\"row\">{{lot.id}}</th>\n <td>{{lot.lot_status}}</td>\n <td>{{lot.quantity}}</td>\n <td>{{ toDate(lot.date_request, 'DD/MM/YYYY') | translate }}</td>\n <td *ngIf=\"lot.date_deliver; else sinFechaEstimada\">{{\n toDate(lot.date_deliver, 'DD/MM/YYYY') | translate }}</td>\n <ng-template #sinFechaEstimada>\n <td>Pendiente</td>\n </ng-template>\n <td>{{lot.shipping_address_name}}</td>\n <td>{{lot.notes}}</td>\n <td>{{lot.total_lot | ecCurrencySymbol}}</td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n\n </ng-container>\n </div>\n\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-12 col-md-6\"></div>\n <div class=\"col-12 col-md-6\" *ngIf=\"(creditAmountConfigured ? showPrice : true)\">\n <div class=\"row py-4\">\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'total-products' |\n translate }}</div>\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\n {{ (order.totals.items) | ecCurrencySymbol }}\n </div>\n\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'shipment' |\n translate }}</div>\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\n {{ (order.totals.shipping || '0') | ecCurrencySymbol }}\n\n </div>\n\n <div *ngIf=\"order.totals.promotion && order.totals.promotion != 0\"\n class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'discount' |\n translate }}</div>\n <div *ngIf=\"order.totals.promotion && order.totals.promotion != 0\"\n class=\"col-6 font-brandon font-md text-gray border-bottom text-end text-end\">\n {{ (order.totals.promotion) | ecCurrencySymbol }}</div>\n\n <div *ngIf=\"order.totals.taxes && order.totals.taxes != 0 \"\n class=\"col-6 font-brandon font-md text-gray border-bottom \">\n {{ 'taxes' | translate }}</div>\n <div *ngIf=\"order.totals.taxes && order.totals.taxes != 0\"\n class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\n {{ (order.totals.taxes) | ecCurrencySymbol }}</div>\n\n <div class=\"col-6 font-brandon font-md\">{{ 'total' | translate | uppercase }}</div>\n <div class=\"col-6 font-brandon font-md text-end\">\n {{ (order.totals.total) | ecCurrencySymbol }}\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n</main>\n\n<ng-template #noOrder>\n <div class=\"w-100 h-50\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <h5>{{ 'no-orders' | translate }}</h5>\n </div>\n </div>\n</ng-template>\n\n<ng-template #loadingView>\n <div class=\"w-100 h-50 py-5\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n </div>\n</ng-template>",
|
|
10885
|
+
template: "<main class=\"py-5\" id=\"orderEcComponent\">\n <div class=\"container\">\n <div class=\"wrap\" *ngIf=\"!loading; else loadingView\">\n <div *ngIf=\"order; else noOrder\">\n\n <div class=\"row justify-content-between \">\n <div class=\"col-sm-auto col-12 font-brandon\">\n <h4 class=\"tit1 fw-bold\">{{ ('order' | translate) + ': ' + order.number }}</h4>\n </div>\n <ng-container *ngIf=\"order?.invoice\">\n <div class=\"col-sm col-12 font-brandon\">\n <a target=\"_blank\" [href]=\"consts.getUrlBase().slice(0, -1) + order.invoice\"\n class=\"btn btn-link btn-invoice\">\n <i class=\"fas fa-file-download me-1\"></i>\n {{ 'download' | translate }} {{ 'invoices' | translate | titlecase }}\n </a>\n </div>\n </ng-container>\n <a (click)=\"volver()\" class=\"col-auto text-end\">\n <button class=\"btn btvolver bg-gray text-white\">{{ 'back-to-orders' | translate }}</button>\n </a>\n </div>\n\n <section id=\"orders\">\n <div class=\"row pt-2\">\n <div class=\"col-md-2 col-12\">\n <p class=\"st\">{{ 'payment-state' | translate }}:</p>\n <p class=\"\">\n {{ order.payments[0].state | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'shipment-state' | translate }}:</p>\n <p class=\"\">\n {{ order.shipments[0].state | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'payment-method' | translate }}:</p>\n <p class=\"\">\n {{ order.payments[0]?.method?.name | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'shipment-method' | translate }}:</p>\n <p class=\"\">\n {{ order.shipments[0].method.name }}\n </p>\n <!-- ACA DEBERIA IR EL LINK DE SEGUIMIENTO -->\n <a *ngIf=\"order.tracking\" [href]=\"order.tracking\"\n class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver\n seguimiento</a>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'date' | translate }}:</p>\n <p class=\"\">\n {{ toDate(order.checkoutCompletedAt, 'DD/MM/YYYY') | translate }}<br>\n {{ toDate(order.checkoutCompletedAt, 'h:mm:ss a') | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\" *ngIf=\"(creditAmountConfigured ? showPrice : true)\">\n <p class=\"st\">{{ 'total' | translate }}:</p>\n <h5 class=\"fw-bold\">\n {{ (order.totals.total) | ecCurrencySymbol}}\n\n </h5>\n </div>\n </div>\n </section>\n\n <div class=\"text-end mt-3\" *ngIf=\"!hidePrices && allowRepeatOrders\">\n <button class=\"btn btn-primary mb-2\" (click)=\"repeatOrder()\">\n {{ 'repeat-order' | translate }}\n </button>\n </div>\n\n <div class=\"container py-3 border-top border-bottom\">\n <div *ngIf=\"order.items.length; else noProducts\" class=\"row\">\n <div class=\"col-2 font-sm font-brandon d-none d-md-block\">\n {{ 'product' | translate | uppercase }}\n </div>\n <div class=\"col-4 font-sm font-brandon d-none d-md-block\">\n {{ 'description' | translate | uppercase }}\n </div>\n <div id=\"colLots\" *ngIf=\"ordersService.channelConfig.applyOrderLot\"\n class=\"col-1 font-sm font-brandon d-none d-md-block\">\n <!-- {{ 'description' | translate | uppercase }} -->\n {{ 'lots' | translate | uppercase }}\n </div>\n <div class=\"col-2 text-center font-sm font-brandon d-none d-md-block\"\n *ngIf=\"(creditAmountConfigured ? showPrice : true)\">\n {{ 'unit-price' | translate | uppercase }}\n </div>\n <div class=\"col-1 text-center font-sm font-brandon d-none d-md-block\">\n {{ 'quantity' | translate | uppercase }}\n </div>\n <div class=\"col-2 text-end font-sm font-brandon d-none d-md-block\"\n *ngIf=\"(creditAmountConfigured ? showPrice : true)\">\n {{ 'total' | translate | uppercase }}\n </div>\n </div>\n <ng-container *ngFor=\"let item of order.items; let i = index\">\n <div class=\"row cart-items\">\n <div class=\"col-5 col-md-2 py-2\">\n <ng-container *ngIf=\"item.product.variants[0]?.images?.length ; else defaultpicture\">\n <img class=\"smc maxwidth img-fluid rounded-custom \"\n [src]=\"consts.mediaUrl() + item.product.variants[0].images[0]\" alt=\"\">\n </ng-container>\n <ng-template #defaultpicture>\n <img *ngIf=\"item.product.picturesdefault\"\n class=\"smc maxwidth img-fluid rounded-custom\"\n [src]=\"consts.mediaUrl() + item.product.picturesdefault[0]\" alt=\"\">\n </ng-template>\n </div>\n <div\n class=\"col-md-4 col-7 flex-column flex-md-row justify-content-start d-flex align-items-center\">\n <p class=\"font-brandon d-flex w-100 mb-0\">\n {{ item.product.name }} (Cod:{{ item.product.variants[0].code }})\n </p>\n </div>\n <div class=\"col-md-1 col-1 flex-column flex-md-row justify-content-start d-flex align-items-center\"\n *ngIf=\"ordersService.channelConfig.applyOrderLot\">\n <input type=\"button\" class=\"btn btn-primary btnSeguir m-0 text-center\" type=\"button\"\n [attr.data-bs-toggle]=\"'collapse'\" [attr.data-bs-target]=\"'#collapseExample'+i\"\n aria-expanded=\"false\" [attr.aria-controls]=\"'collapseExample'+i\"\n value=\"{{ 'see' | translate | uppercase }}\">\n </div>\n <div class=\"container d-md-none\">\n <div class=\"row\">\n <div class=\"col-4\">\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\n </div>\n <div class=\"col-4 font-xl\" *ngIf=\"(creditAmountConfigured ? showPrice : true)\">\n <p class=\"text-center w-100 m-0\"> {{ (item.product.variants[0].saleprice ?\n item.product.variants[0].saleprice : item.product.variants[0].price) |\n ecCurrencySymbol}}</p>\n </div>\n <div class=\"col-4 font-xl\" *ngIf=\"(creditAmountConfigured ? showPrice : true)\">\n <p class=\"text-center w-100 m-0\"> {{ ((item.product.variants[0].saleprice ?\n item.product.variants[0].saleprice : item.product.variants[0].price) *\n item.quantity) | ecCurrencySymbol}}</p>\n </div>\n </div>\n </div>\n\n <div class=\"col-2 d-none d-md-flex align-items-center\"\n *ngIf=\"(creditAmountConfigured ? showPrice : true)\">\n <p class=\"text-center w-100 m-0\">\n {{ (item.product.variants[0].saleprice ? item.product.variants[0].saleprice :\n item.product.variants[0].price) | ecCurrencySymbol}}\n </p>\n </div>\n <div class=\"col-1 d-none d-md-flex align-items-center\">\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\n </div>\n <div class=\"col-2 d-none d-md-flex align-items-center\"\n *ngIf=\"(creditAmountConfigured ? showPrice : true)\">\n <p class=\"text-end w-100 m-0\">\n {{ ((item.product.variants[0].saleprice ? item.product.variants[0].saleprice :\n item.product.variants[0].price) * item.quantity) | ecCurrencySymbol}}</p>\n </div>\n <div class=\"collapse\" [attr.id]=\"'collapseExample'+i\">\n <div class=\"card card-body\">\n <table class=\"table table-striped\">\n <thead>\n <tr>\n <th scope=\"col\">#</th>\n <th scope=\"col\">Estado</th>\n <th scope=\"col\">Cantidad</th>\n <th scope=\"col\">Fecha Solicitada</th>\n <th scope=\"col\">Fecha Estimada</th>\n <th scope=\"col\">Sede</th>\n <th scope=\"col\">Nota</th>\n <th scope=\"col\">Total Lote</th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let lot of item.orderItemLot\">\n <tr>\n <th scope=\"row\">{{lot.id}}</th>\n <td>{{lot.lot_status}}</td>\n <td>{{lot.quantity}}</td>\n <td>{{ toDate(lot.date_request, 'DD/MM/YYYY') | translate }}</td>\n <td *ngIf=\"lot.date_deliver; else sinFechaEstimada\">{{\n toDate(lot.date_deliver, 'DD/MM/YYYY') | translate }}</td>\n <ng-template #sinFechaEstimada>\n <td>Pendiente</td>\n </ng-template>\n <td>{{lot.shipping_address_name}}</td>\n <td>{{lot.notes}}</td>\n <td>{{lot.total_lot | ecCurrencySymbol}}</td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n\n </ng-container>\n </div>\n\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-12 col-md-6\"></div>\n <div class=\"col-12 col-md-6\" *ngIf=\"(creditAmountConfigured ? showPrice : true)\">\n <div class=\"row py-4\">\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'total-products' |\n translate }}</div>\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\n {{ (order.totals.items) | ecCurrencySymbol }}\n </div>\n\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'shipment' |\n translate }}</div>\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\n {{ (order.totals.shipping || '0') | ecCurrencySymbol }}\n\n </div>\n\n <div *ngIf=\"!hideDiscounts && order.totals.promotion && order.totals.promotion != 0\"\n class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'discount' |\n translate }}</div>\n <div *ngIf=\"!hideDiscounts && order.totals.promotion && order.totals.promotion != 0\"\n class=\"col-6 font-brandon font-md text-gray border-bottom text-end text-end\">\n {{ (order.totals.promotion) | ecCurrencySymbol }}</div>\n\n <div *ngIf=\"!hideTaxes && order.totals.taxes && order.totals.taxes != 0 \"\n class=\"col-6 font-brandon font-md text-gray border-bottom \">\n {{ 'taxes' | translate }}</div>\n <div *ngIf=\"!hideTaxes && order.totals.taxes && order.totals.taxes != 0\"\n class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\n {{ (order.totals.taxes) | ecCurrencySymbol }}</div>\n\n <div class=\"col-6 font-brandon font-md\">{{ 'total' | translate | uppercase }}</div>\n <div class=\"col-6 font-brandon font-md text-end\">\n {{ (order.totals.total) | ecCurrencySymbol }}\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n</main>\n\n<ng-template #noOrder>\n <div class=\"w-100 h-50\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <h5>{{ 'no-orders' | translate }}</h5>\n </div>\n </div>\n</ng-template>\n\n<ng-template #loadingView>\n <div class=\"w-100 h-50 py-5\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n </div>\n</ng-template>",
|
|
10836
10886
|
styles: [".maxwidth{max-width:100px}"]
|
|
10837
10887
|
})
|
|
10838
10888
|
], OrderEcComponent);
|
|
@@ -11695,15 +11745,18 @@ var __decorate$1u = (this && this.__decorate) || function (decorators, target, k
|
|
|
11695
11745
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
11696
11746
|
};
|
|
11697
11747
|
let DetailCheckoutBlockEcComponent = class DetailCheckoutBlockEcComponent extends ComponentHelper {
|
|
11698
|
-
constructor(checkoutService, cartService) {
|
|
11748
|
+
constructor(checkoutService, cartService, channelConfigService) {
|
|
11699
11749
|
super();
|
|
11700
11750
|
this.checkoutService = checkoutService;
|
|
11701
11751
|
this.cartService = cartService;
|
|
11752
|
+
this.channelConfigService = channelConfigService;
|
|
11702
11753
|
this.data = null;
|
|
11703
11754
|
this.discountTotal = 0;
|
|
11704
11755
|
this.couponTotal = 0;
|
|
11705
11756
|
this.showPrice = false;
|
|
11706
11757
|
this.creditAmountConfigured = false;
|
|
11758
|
+
this.hideDiscounts = false;
|
|
11759
|
+
this.hideTaxes = false;
|
|
11707
11760
|
this.getIcon = (data_item) => {
|
|
11708
11761
|
switch (data_item.type) {
|
|
11709
11762
|
case 'coupon': return 'fas fa-ticket-alt fa-3x';
|
|
@@ -11734,6 +11787,11 @@ let DetailCheckoutBlockEcComponent = class DetailCheckoutBlockEcComponent extend
|
|
|
11734
11787
|
this.cartService.creditAmount$.subscribe((creditAmount) => {
|
|
11735
11788
|
this.creditAmountConfigured = creditAmount !== null;
|
|
11736
11789
|
});
|
|
11790
|
+
this.channelConfigService.channelConfig$.subscribe(channel => {
|
|
11791
|
+
var _a, _b, _c, _d;
|
|
11792
|
+
this.hideDiscounts = (_b = (_a = channel) === null || _a === void 0 ? void 0 : _a.hideDiscounts, (_b !== null && _b !== void 0 ? _b : false));
|
|
11793
|
+
this.hideTaxes = (_d = (_c = channel) === null || _c === void 0 ? void 0 : _c.hideTaxes, (_d !== null && _d !== void 0 ? _d : false));
|
|
11794
|
+
});
|
|
11737
11795
|
}
|
|
11738
11796
|
calcularTotales() {
|
|
11739
11797
|
if (this.data) {
|
|
@@ -11748,7 +11806,8 @@ let DetailCheckoutBlockEcComponent = class DetailCheckoutBlockEcComponent extend
|
|
|
11748
11806
|
};
|
|
11749
11807
|
DetailCheckoutBlockEcComponent.ctorParameters = () => [
|
|
11750
11808
|
{ type: CheckoutService },
|
|
11751
|
-
{ type: CartService }
|
|
11809
|
+
{ type: CartService },
|
|
11810
|
+
{ type: ChannelConfigService }
|
|
11752
11811
|
];
|
|
11753
11812
|
__decorate$1u([
|
|
11754
11813
|
Input()
|
|
@@ -11756,7 +11815,7 @@ __decorate$1u([
|
|
|
11756
11815
|
DetailCheckoutBlockEcComponent = __decorate$1u([
|
|
11757
11816
|
Component({
|
|
11758
11817
|
selector: 'app-detail-checkout-block-ec',
|
|
11759
|
-
template: "<div id=\"appDetailCheckoutBlockEc\" class=\"d-flex flex-row w-100 justify-content-center flex-wrap\"\n *ngIf=\"data && (creditAmountConfigured ? showPrice : true)\">\n <ng-container *ngFor=\"let item of data; let i = index\">\n <ng-container *ngIf=\"item.type != 'discount' && item.type != 'coupon'\">\n <div class=\"d-flex flex-column justify-content-center mx-sm-3 mx-2 text-center mb-4 resumen\">\n <i ngClass=\"mb-2 colorIconoCheckout\" [class]=\"getIcon(item)\"></i>\n <strong class=\"text-center w-100 font-brandon font-md mb-1\">{{ item.type | translate }}</strong>\n <span class=\"text-center w-100 font-brandon font-md text-gray\">{{ (item.amount != 0 ) ? (item.amount |\n ecCurrencySymbol) : ('free' | translate) }}</span>\n </div>\n </ng-container>\n\n\n <!-- Mostrar total de descuentos -->\n <div class=\"d-flex flex-column justify-content-center mx-sm-3 mx-2 text-center mb-4 resumen\"\n *ngIf=\"this.discountTotal != 0 && i === 1\">\n <i ngClass=\"mb-2 colorIconoCheckout\" [class]=\"getIcon2('discount')\"></i>\n <strong class=\"text-center w-100 font-brandon font-md mb-1\">Descuento</strong>\n <span class=\"text-center w-100 font-brandon font-md text-gray\">{{ (this.discountTotal | ecCurrencySymbol)\n }}</span>\n </div>\n\n <!-- Mostrar total de cupones -->\n <div class=\"d-flex flex-column justify-content-center mx-sm-3 mx-2 text-center mb-4 resumen\"\n *ngIf=\"this.couponTotal != 0 && i === 1\">\n <i ngClass=\"mb-2 colorIconoCheckout\" [class]=\"getIcon2('coupon')\"></i>\n <strong class=\"text-center w-100 font-brandon font-md mb-1\">Cupon</strong>\n <span class=\"text-center w-100 font-brandon font-md text-gray\">{{(this.couponTotal| ecCurrencySymbol)\n }}</span>\n </div>\n </ng-container>\n</div>",
|
|
11818
|
+
template: "<div id=\"appDetailCheckoutBlockEc\" class=\"d-flex flex-row w-100 justify-content-center flex-wrap\"\n *ngIf=\"data && (creditAmountConfigured ? showPrice : true)\">\n <ng-container *ngFor=\"let item of data; let i = index\">\n <ng-container *ngIf=\"item.type != 'discount' && item.type != 'coupon'\">\n <div class=\"d-flex flex-column justify-content-center mx-sm-3 mx-2 text-center mb-4 resumen\">\n <i ngClass=\"mb-2 colorIconoCheckout\" [class]=\"getIcon(item)\"></i>\n <strong class=\"text-center w-100 font-brandon font-md mb-1\">{{ item.type | translate }}</strong>\n <span class=\"text-center w-100 font-brandon font-md text-gray\">{{ (item.amount != 0 ) ? (item.amount |\n ecCurrencySymbol) : ('free' | translate) }}</span>\n </div>\n </ng-container>\n\n\n <!-- Mostrar total de descuentos -->\n <div class=\"d-flex flex-column justify-content-center mx-sm-3 mx-2 text-center mb-4 resumen\"\n *ngIf=\"!hideDiscounts && this.discountTotal != 0 && i === 1\">\n <i ngClass=\"mb-2 colorIconoCheckout\" [class]=\"getIcon2('discount')\"></i>\n <strong class=\"text-center w-100 font-brandon font-md mb-1\">Descuento</strong>\n <span class=\"text-center w-100 font-brandon font-md text-gray\">{{ (this.discountTotal | ecCurrencySymbol)\n }}</span>\n </div>\n\n <!-- Mostrar total de cupones -->\n <div class=\"d-flex flex-column justify-content-center mx-sm-3 mx-2 text-center mb-4 resumen\"\n *ngIf=\"!hideDiscounts && this.couponTotal != 0 && i === 1\">\n <i ngClass=\"mb-2 colorIconoCheckout\" [class]=\"getIcon2('coupon')\"></i>\n <strong class=\"text-center w-100 font-brandon font-md mb-1\">Cupon</strong>\n <span class=\"text-center w-100 font-brandon font-md text-gray\">{{(this.couponTotal| ecCurrencySymbol)\n }}</span>\n </div>\n </ng-container>\n</div>",
|
|
11760
11819
|
styles: [""]
|
|
11761
11820
|
})
|
|
11762
11821
|
], DetailCheckoutBlockEcComponent);
|
|
@@ -15543,15 +15602,18 @@ var __decorate$1$ = (this && this.__decorate) || function (decorators, target, k
|
|
|
15543
15602
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15544
15603
|
};
|
|
15545
15604
|
let SidebarEcComponent = class SidebarEcComponent {
|
|
15546
|
-
constructor(cartService, consts, authService, router, toastrService) {
|
|
15605
|
+
constructor(cartService, consts, authService, router, toastrService, channelConfigService) {
|
|
15547
15606
|
this.cartService = cartService;
|
|
15548
15607
|
this.consts = consts;
|
|
15549
15608
|
this.authService = authService;
|
|
15550
15609
|
this.router = router;
|
|
15551
15610
|
this.toastrService = toastrService;
|
|
15611
|
+
this.channelConfigService = channelConfigService;
|
|
15552
15612
|
this.user = null;
|
|
15553
15613
|
this.promotions = [];
|
|
15554
15614
|
this.variantsToShow = ['TALLE', 'COLOR'];
|
|
15615
|
+
this.hideDiscounts = false;
|
|
15616
|
+
this.hideTaxes = false;
|
|
15555
15617
|
this.actualizarCantidad = (item, cantidad, stock, id) => {
|
|
15556
15618
|
if (id) {
|
|
15557
15619
|
const elem = document.getElementById(id);
|
|
@@ -15614,6 +15676,11 @@ let SidebarEcComponent = class SidebarEcComponent {
|
|
|
15614
15676
|
this.authService.getUserProfile().subscribe(u => {
|
|
15615
15677
|
this.user = u;
|
|
15616
15678
|
});
|
|
15679
|
+
this.channelConfigService.channelConfig$.subscribe(channel => {
|
|
15680
|
+
var _a, _b, _c, _d;
|
|
15681
|
+
this.hideDiscounts = (_b = (_a = channel) === null || _a === void 0 ? void 0 : _a.hideDiscounts, (_b !== null && _b !== void 0 ? _b : false));
|
|
15682
|
+
this.hideTaxes = (_d = (_c = channel) === null || _c === void 0 ? void 0 : _c.hideTaxes, (_d !== null && _d !== void 0 ? _d : false));
|
|
15683
|
+
});
|
|
15617
15684
|
}
|
|
15618
15685
|
redirectDetailProduct(product) {
|
|
15619
15686
|
let variant = product.variants[0];
|
|
@@ -15636,7 +15703,8 @@ SidebarEcComponent.ctorParameters = () => [
|
|
|
15636
15703
|
{ type: Constants },
|
|
15637
15704
|
{ type: AuthService },
|
|
15638
15705
|
{ type: Router },
|
|
15639
|
-
{ type: ToastService }
|
|
15706
|
+
{ type: ToastService },
|
|
15707
|
+
{ type: ChannelConfigService }
|
|
15640
15708
|
];
|
|
15641
15709
|
SidebarEcComponent = __decorate$1$([
|
|
15642
15710
|
Component({
|