ng-easycommerce 0.0.609 → 0.0.610
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/assets/ec-i18n/ct.json +4 -1
- package/assets/ec-i18n/en.json +2 -0
- package/assets/ec-i18n/es.json +2 -0
- package/assets/ec-i18n/fr.json +4 -1
- package/assets/ec-i18n/gl.json +4 -1
- package/assets/ec-i18n/pr.json +4 -1
- package/bundles/ng-easycommerce.umd.js +130 -80
- package/bundles/ng-easycommerce.umd.js.map +1 -1
- package/bundles/ng-easycommerce.umd.min.js +1 -1
- package/bundles/ng-easycommerce.umd.min.js.map +1 -1
- package/esm2015/lib/ec-component/account-ec/order-ec/order-ec.component.js +4 -8
- package/esm2015/lib/ec-component/account-ec/orders-list-ec/orders-list-ec.component.js +4 -8
- package/esm2015/lib/ec-component/cart-ec/cart-ec.component.js +5 -3
- package/esm2015/lib/ec-component/checkout-ec/detail-checkout-block-ec/detail-checkout-block-ec.component.js +22 -18
- package/esm2015/lib/ec-component/checkout-ec/payment-ec/payment-ec.component.js +6 -4
- package/esm2015/lib/ec-component/header-ec/header-ec.component.js +2 -1
- package/esm2015/lib/ec-component/product-detail-ec/product-detail-ec.component.js +2 -2
- package/esm2015/lib/ec-component/product-ec/product-ec.component.js +2 -2
- package/esm2015/lib/ec-component/sidebar-ec/sidebar-ec.component.js +2 -2
- package/esm2015/lib/ec-component/widgets-ec/price-ec/price-ec.component.js +51 -6
- package/esm2015/lib/services/cart.service.js +34 -33
- package/esm2015/lib/services/checkout/checkout.service.js +5 -5
- package/esm2015/lib/services/products/product-detail.service.js +5 -2
- package/esm5/lib/ec-component/account-ec/order-ec/order-ec.component.js +4 -8
- package/esm5/lib/ec-component/account-ec/orders-list-ec/orders-list-ec.component.js +4 -8
- package/esm5/lib/ec-component/cart-ec/cart-ec.component.js +5 -3
- package/esm5/lib/ec-component/checkout-ec/detail-checkout-block-ec/detail-checkout-block-ec.component.js +22 -18
- package/esm5/lib/ec-component/checkout-ec/payment-ec/payment-ec.component.js +6 -4
- package/esm5/lib/ec-component/header-ec/header-ec.component.js +2 -1
- package/esm5/lib/ec-component/product-detail-ec/product-detail-ec.component.js +2 -2
- package/esm5/lib/ec-component/product-ec/product-ec.component.js +2 -2
- package/esm5/lib/ec-component/sidebar-ec/sidebar-ec.component.js +2 -2
- package/esm5/lib/ec-component/widgets-ec/price-ec/price-ec.component.js +52 -6
- package/esm5/lib/services/cart.service.js +34 -33
- package/esm5/lib/services/checkout/checkout.service.js +5 -5
- package/esm5/lib/services/products/product-detail.service.js +5 -2
- package/fesm2015/ng-easycommerce.js +129 -80
- package/fesm2015/ng-easycommerce.js.map +1 -1
- package/fesm5/ng-easycommerce.js +130 -80
- package/fesm5/ng-easycommerce.js.map +1 -1
- package/lib/ec-component/account-ec/order-ec/order-ec.component.d.ts +1 -2
- package/lib/ec-component/account-ec/orders-list-ec/orders-list-ec.component.d.ts +1 -2
- package/lib/ec-component/cart-ec/cart-ec.component.d.ts +2 -1
- package/lib/ec-component/checkout-ec/detail-checkout-block-ec/detail-checkout-block-ec.component.d.ts +5 -4
- package/lib/ec-component/checkout-ec/payment-ec/payment-ec.component.d.ts +1 -1
- package/lib/ec-component/product-detail-ec/product-detail-ec.component.d.ts +1 -1
- package/lib/ec-component/product-ec/product-ec.component.d.ts +1 -1
- package/lib/ec-component/sidebar-ec/sidebar-ec.component.d.ts +1 -1
- package/lib/ec-component/widgets-ec/price-ec/price-ec.component.d.ts +23 -6
- package/ng-easycommerce.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -3138,9 +3138,9 @@ let CheckoutService = class CheckoutService {
|
|
|
3138
3138
|
return ({ ok: true, require_login: false, message: '' });
|
|
3139
3139
|
});
|
|
3140
3140
|
this.updateAsociatedData = (cart) => {
|
|
3141
|
-
var _a, _b
|
|
3141
|
+
var _a, _b;
|
|
3142
3142
|
let result = this.orderUtils.getPromotions(cart);
|
|
3143
|
-
if (
|
|
3143
|
+
if (cart.totals.taxes != 0) {
|
|
3144
3144
|
let total = Object.assign({}, result[result.length - 1]);
|
|
3145
3145
|
result[result.length - 1] = {
|
|
3146
3146
|
type: 'taxes',
|
|
@@ -3149,9 +3149,9 @@ let CheckoutService = class CheckoutService {
|
|
|
3149
3149
|
};
|
|
3150
3150
|
result.push(total);
|
|
3151
3151
|
}
|
|
3152
|
-
let shipment = (
|
|
3152
|
+
let shipment = (_a = result) === null || _a === void 0 ? void 0 : _a.find(promotion => promotion.type == "shipment");
|
|
3153
3153
|
if (!shipment && cart.totals.shipping != 0) {
|
|
3154
|
-
if (((
|
|
3154
|
+
if (((_b = result) === null || _b === void 0 ? void 0 : _b.length) && !result.find(item => item.type === "shipment")) {
|
|
3155
3155
|
let total = Object.assign({}, result[result.length - 1]);
|
|
3156
3156
|
result[result.length - 1] = {
|
|
3157
3157
|
type: 'shipment',
|
|
@@ -3919,16 +3919,7 @@ let CartService = class CartService {
|
|
|
3919
3919
|
this.cartSubject = new BehaviorSubject(null);
|
|
3920
3920
|
this.requestInProcess = new BehaviorSubject(false);
|
|
3921
3921
|
this.promotionsSubject = new BehaviorSubject([]);
|
|
3922
|
-
this.balanceCustomerSubject = new BehaviorSubject(
|
|
3923
|
-
allowAnyPaymentMethod: false,
|
|
3924
|
-
allowExceedBalance: false,
|
|
3925
|
-
creditAmount: 0,
|
|
3926
|
-
showMax: false,
|
|
3927
|
-
showPrice: false,
|
|
3928
|
-
remainingCredits: 0,
|
|
3929
|
-
applyMaxOrders: false,
|
|
3930
|
-
maxOrders: Infinity
|
|
3931
|
-
});
|
|
3922
|
+
this.balanceCustomerSubject = new BehaviorSubject(null);
|
|
3932
3923
|
this.items = [];
|
|
3933
3924
|
this.count = 0;
|
|
3934
3925
|
this.locale = "";
|
|
@@ -3951,11 +3942,11 @@ let CartService = class CartService {
|
|
|
3951
3942
|
this.promotions = this.promotionsSubject.asObservable();
|
|
3952
3943
|
this.deleting = false;
|
|
3953
3944
|
this.balanceCustomer$ = this.balanceCustomerSubject.asObservable();
|
|
3954
|
-
this.allowAnyPaymentMethod$ = this.balanceCustomer$.pipe(map(data => data.allowAnyPaymentMethod));
|
|
3955
|
-
this.allowExceedBalance$ = this.balanceCustomer$.pipe(map(data => data.allowExceedBalance));
|
|
3956
|
-
this.creditAmount$ = this.balanceCustomer$.pipe(map(data => data.creditAmount));
|
|
3957
|
-
this.showMax$ = this.balanceCustomer$.pipe(map(data => data.showMax));
|
|
3958
|
-
this.showPrice$ = this.balanceCustomer$.pipe(map(data => data.showPrice));
|
|
3945
|
+
this.allowAnyPaymentMethod$ = this.balanceCustomer$.pipe(map(data => { var _a, _b; return _b = (_a = data) === null || _a === void 0 ? void 0 : _a.allowAnyPaymentMethod, (_b !== null && _b !== void 0 ? _b : null); }));
|
|
3946
|
+
this.allowExceedBalance$ = this.balanceCustomer$.pipe(map(data => { var _a, _b; return _b = (_a = data) === null || _a === void 0 ? void 0 : _a.allowExceedBalance, (_b !== null && _b !== void 0 ? _b : null); }));
|
|
3947
|
+
this.creditAmount$ = this.balanceCustomer$.pipe(map(data => { var _a, _b; return _b = (_a = data) === null || _a === void 0 ? void 0 : _a.creditAmount, (_b !== null && _b !== void 0 ? _b : null); }));
|
|
3948
|
+
this.showMax$ = this.balanceCustomer$.pipe(map(data => { var _a, _b; return _b = (_a = data) === null || _a === void 0 ? void 0 : _a.showMax, (_b !== null && _b !== void 0 ? _b : null); }));
|
|
3949
|
+
this.showPrice$ = this.balanceCustomer$.pipe(map(data => { var _a, _b; return _b = (_a = data) === null || _a === void 0 ? void 0 : _a.showPrice, (_b !== null && _b !== void 0 ? _b : null); }));
|
|
3959
3950
|
this.getAddressBook = () => __awaiter$5(this, void 0, void 0, function* () { return this.connection.get(this.addressBookApi()).pipe(map(res => { var _a; return ((_a = res) === null || _a === void 0 ? void 0 : _a.length) && res.map(addres => { return addres && Object.assign(Object.assign({}, addres), { selected: addres.default }); }) || null; })).toPromise(); });
|
|
3960
3951
|
this.getTaxes = () => __awaiter$5(this, void 0, void 0, function* () { return this.connection.post(this.taxesApi(), { token: this.cart_token }).subscribe(res => res); });
|
|
3961
3952
|
this.getCart = () => __awaiter$5(this, void 0, void 0, function* () {
|
|
@@ -4067,8 +4058,11 @@ let CartService = class CartService {
|
|
|
4067
4058
|
* CART CRUD
|
|
4068
4059
|
*/
|
|
4069
4060
|
this.addToCart = (product, quantity, variant_id) => {
|
|
4061
|
+
var _a, _b, _c, _d;
|
|
4070
4062
|
const balance = this.balanceCustomerSubject.value;
|
|
4071
|
-
|
|
4063
|
+
const applyMaxOrders = (_b = (_a = balance) === null || _a === void 0 ? void 0 : _a.applyMaxOrders, (_b !== null && _b !== void 0 ? _b : false));
|
|
4064
|
+
const maxOrders = (_d = (_c = balance) === null || _c === void 0 ? void 0 : _c.maxOrders, (_d !== null && _d !== void 0 ? _d : Infinity));
|
|
4065
|
+
if (applyMaxOrders && (maxOrders <= 0 || maxOrders === null)) {
|
|
4072
4066
|
this.toastrService.show('max-orders-reached');
|
|
4073
4067
|
return;
|
|
4074
4068
|
}
|
|
@@ -4173,10 +4167,11 @@ let CartService = class CartService {
|
|
|
4173
4167
|
return true;
|
|
4174
4168
|
};
|
|
4175
4169
|
this.validatePriceAndCredits = (item, quantity) => {
|
|
4176
|
-
|
|
4170
|
+
const balance = this.balanceCustomerSubject.value;
|
|
4171
|
+
if (!balance || balance.creditAmount === null || balance.creditAmount === undefined) {
|
|
4177
4172
|
return true;
|
|
4178
4173
|
}
|
|
4179
|
-
if (
|
|
4174
|
+
if (balance.remainingCredits === undefined) {
|
|
4180
4175
|
return false;
|
|
4181
4176
|
}
|
|
4182
4177
|
const unitPrice = item.total / item.quantity;
|
|
@@ -4185,20 +4180,21 @@ let CartService = class CartService {
|
|
|
4185
4180
|
return true;
|
|
4186
4181
|
}
|
|
4187
4182
|
const additionalCost = unitPrice * additionalQuantity;
|
|
4188
|
-
if (additionalCost >
|
|
4183
|
+
if (additionalCost > balance.remainingCredits) {
|
|
4189
4184
|
this.toastrService.show('not-enough-credits');
|
|
4190
4185
|
return false;
|
|
4191
4186
|
}
|
|
4192
4187
|
return true;
|
|
4193
4188
|
};
|
|
4194
4189
|
this.hasSufficientCreditsForCartTotal = () => {
|
|
4195
|
-
|
|
4190
|
+
const balance = this.balanceCustomerSubject.value;
|
|
4191
|
+
if (!balance || balance.creditAmount === null || balance.creditAmount === undefined) {
|
|
4196
4192
|
return true;
|
|
4197
4193
|
}
|
|
4198
|
-
if (
|
|
4194
|
+
if (balance.remainingCredits === undefined) {
|
|
4199
4195
|
return false;
|
|
4200
4196
|
}
|
|
4201
|
-
if (this.cartSubject.value.totals.total >
|
|
4197
|
+
if (this.cartSubject.value.totals.total > balance.creditAmount) {
|
|
4202
4198
|
this.toastrService.show('not-enough-credits');
|
|
4203
4199
|
return false;
|
|
4204
4200
|
}
|
|
@@ -4412,18 +4408,23 @@ let CartService = class CartService {
|
|
|
4412
4408
|
}));
|
|
4413
4409
|
}
|
|
4414
4410
|
updateBalanceAttributes(cartData) {
|
|
4415
|
-
var _a, _b, _c
|
|
4411
|
+
var _a, _b, _c;
|
|
4412
|
+
const balance = (_a = cartData) === null || _a === void 0 ? void 0 : _a.balanceCustomer;
|
|
4413
|
+
if (!balance) {
|
|
4414
|
+
this.balanceCustomerSubject.next(null);
|
|
4415
|
+
return;
|
|
4416
|
+
}
|
|
4416
4417
|
const balanceData = {
|
|
4417
|
-
allowAnyPaymentMethod:
|
|
4418
|
-
allowExceedBalance:
|
|
4419
|
-
creditAmount:
|
|
4420
|
-
showMax:
|
|
4421
|
-
showPrice:
|
|
4422
|
-
remainingCredits: ((
|
|
4423
|
-
?
|
|
4418
|
+
allowAnyPaymentMethod: balance.allowAnyPaymentMethod,
|
|
4419
|
+
allowExceedBalance: balance.allowExceedBalance,
|
|
4420
|
+
creditAmount: balance.creditAmount,
|
|
4421
|
+
showMax: balance.showMax,
|
|
4422
|
+
showPrice: balance.showPrice,
|
|
4423
|
+
remainingCredits: balance.creditAmount && ((_c = (_b = cartData) === null || _b === void 0 ? void 0 : _b.totals) === null || _c === void 0 ? void 0 : _c.total) && balance.creditAmount >= cartData.totals.total
|
|
4424
|
+
? balance.creditAmount - cartData.totals.total
|
|
4424
4425
|
: 0,
|
|
4425
|
-
applyMaxOrders:
|
|
4426
|
-
maxOrders:
|
|
4426
|
+
applyMaxOrders: balance.applyMaxOrders,
|
|
4427
|
+
maxOrders: balance.maxOrders
|
|
4427
4428
|
};
|
|
4428
4429
|
this.balanceCustomerSubject.next(balanceData);
|
|
4429
4430
|
}
|
|
@@ -6226,7 +6227,8 @@ let CartEcComponent = class CartEcComponent extends ComponentHelper {
|
|
|
6226
6227
|
this.hidePrices = false;
|
|
6227
6228
|
this.hideDiscounts = false;
|
|
6228
6229
|
this.hideTaxes = false;
|
|
6229
|
-
this.creditAccountShowPrices =
|
|
6230
|
+
this.creditAccountShowPrices = null;
|
|
6231
|
+
this.showPriceWithoutTaxes = true;
|
|
6230
6232
|
this.toDecimal = (amount) => this.consts.toDecimal(amount);
|
|
6231
6233
|
this.actualizarCantidad = (item, cantidad, stock, id) => {
|
|
6232
6234
|
if (id) {
|
|
@@ -6310,10 +6312,11 @@ let CartEcComponent = class CartEcComponent extends ComponentHelper {
|
|
|
6310
6312
|
this.cartService.promotions.subscribe(promotions => this.promotions = promotions);
|
|
6311
6313
|
// console.log(this.cartService.getTaxes());
|
|
6312
6314
|
this.channelConfigService.channelConfig$.subscribe(channel => {
|
|
6313
|
-
var _a, _b, _c, _d, _e, _f;
|
|
6315
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
6314
6316
|
this.hidePrices = (_b = (_a = channel) === null || _a === void 0 ? void 0 : _a.hidePrices, (_b !== null && _b !== void 0 ? _b : false));
|
|
6315
6317
|
this.hideDiscounts = (_d = (_c = channel) === null || _c === void 0 ? void 0 : _c.hideDiscounts, (_d !== null && _d !== void 0 ? _d : false));
|
|
6316
6318
|
this.hideTaxes = (_f = (_e = channel) === null || _e === void 0 ? void 0 : _e.hideTaxes, (_f !== null && _f !== void 0 ? _f : false));
|
|
6319
|
+
this.showPriceWithoutTaxes = (_h = (_g = channel) === null || _g === void 0 ? void 0 : _g.showPriceWithoutTaxes, (_h !== null && _h !== void 0 ? _h : false));
|
|
6317
6320
|
if (this.hidePrices) {
|
|
6318
6321
|
this.router.navigate(['/']);
|
|
6319
6322
|
}
|
|
@@ -7225,7 +7228,7 @@ let PaymentEcComponent = class PaymentEcComponent extends ComponentHelper {
|
|
|
7225
7228
|
this.loading_internal_mp = false;
|
|
7226
7229
|
this.method_data$ = this.methodDataSubject.asObservable();
|
|
7227
7230
|
this.loading$ = this.loadingSubject.asObservable();
|
|
7228
|
-
this.allowAnyPaymentMethod =
|
|
7231
|
+
this.allowAnyPaymentMethod = null;
|
|
7229
7232
|
this.allData = () => (Object.assign(Object.assign({}, this.paymentService.getUserData().shippingAddress), this.paymentService.getShipmentData()));
|
|
7230
7233
|
this.setError = (message) => {
|
|
7231
7234
|
this.error = message;
|
|
@@ -7286,8 +7289,8 @@ let PaymentEcComponent = class PaymentEcComponent extends ComponentHelper {
|
|
|
7286
7289
|
ngOnInit() {
|
|
7287
7290
|
this.paymentService.initialize(this.step_id);
|
|
7288
7291
|
this.checkoutService.asociatedData$.subscribe((data) => this.total_amount = (data.find(item => item.type == 'total')).amount);
|
|
7289
|
-
this.cartService.allowAnyPaymentMethod$.subscribe((
|
|
7290
|
-
this.allowAnyPaymentMethod =
|
|
7292
|
+
this.cartService.allowAnyPaymentMethod$.subscribe((value) => {
|
|
7293
|
+
this.allowAnyPaymentMethod = value;
|
|
7291
7294
|
});
|
|
7292
7295
|
this.ecOnInit();
|
|
7293
7296
|
}
|
|
@@ -7304,6 +7307,8 @@ let PaymentEcComponent = class PaymentEcComponent extends ComponentHelper {
|
|
|
7304
7307
|
shouldDisplayMethod(method) {
|
|
7305
7308
|
if (!method)
|
|
7306
7309
|
return false;
|
|
7310
|
+
if (this.allowAnyPaymentMethod === null)
|
|
7311
|
+
return true;
|
|
7307
7312
|
if (this.allowAnyPaymentMethod)
|
|
7308
7313
|
return true;
|
|
7309
7314
|
return this.isBalanceInAccount(method.code);
|
|
@@ -8136,6 +8141,7 @@ let HeaderEcComponent = class HeaderEcComponent extends ComponentHelper {
|
|
|
8136
8141
|
this.envetUrlTransparent = ["/home", "/"];
|
|
8137
8142
|
this.params = {};
|
|
8138
8143
|
this.toggled = false;
|
|
8144
|
+
this.balanceAttributes = null;
|
|
8139
8145
|
this.locales = [];
|
|
8140
8146
|
this.selectedLocale = 'ESP';
|
|
8141
8147
|
this.hidePrices = false;
|
|
@@ -8727,7 +8733,7 @@ let ProductDetailService = class ProductDetailService {
|
|
|
8727
8733
|
options && options.forEach(option => Object.keys(option).forEach(key => this.setOption(key, option[key])));
|
|
8728
8734
|
};
|
|
8729
8735
|
this.generateAsociatedDataFromVariants = () => {
|
|
8730
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
8736
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
8731
8737
|
let asociated = {};
|
|
8732
8738
|
if (this.isReady()) {
|
|
8733
8739
|
asociated.stock = this.variants[0].stock;
|
|
@@ -8760,6 +8766,9 @@ let ProductDetailService = class ProductDetailService {
|
|
|
8760
8766
|
taxIncluded: (_r = this.variants[0]) === null || _r === void 0 ? void 0 : _r.taxIncluded,
|
|
8761
8767
|
taxCategory: (_s = this.variants[0]) === null || _s === void 0 ? void 0 : _s.taxCategory,
|
|
8762
8768
|
};
|
|
8769
|
+
asociated.taxeAmount = ((_t = this.variants[0]) === null || _t === void 0 ? void 0 : _t.taxes) || undefined;
|
|
8770
|
+
asociated.taxRate = ((_u = this.variants[0]) === null || _u === void 0 ? void 0 : _u.taxRate) || undefined;
|
|
8771
|
+
asociated.priceWithoutTaxes = ((_v = this.variants[0]) === null || _v === void 0 ? void 0 : _v.priceWithoutTaxes) || undefined;
|
|
8763
8772
|
this.asociatedDataSubject.next(asociated);
|
|
8764
8773
|
};
|
|
8765
8774
|
/**
|
|
@@ -9017,7 +9026,7 @@ let ProductDetailEcComponent = class ProductDetailEcComponent extends ComponentH
|
|
|
9017
9026
|
this.owlOptions = {};
|
|
9018
9027
|
this.showReviews = false;
|
|
9019
9028
|
this.hidePrices = false;
|
|
9020
|
-
this.creditAccountShowPrices =
|
|
9029
|
+
this.creditAccountShowPrices = null;
|
|
9021
9030
|
this.addToCart = () => {
|
|
9022
9031
|
this.quantity > 0 && this.productService.addToCart(this.quantity);
|
|
9023
9032
|
};
|
|
@@ -9167,7 +9176,7 @@ let ProductEcComponent = class ProductEcComponent extends ComponentHelper {
|
|
|
9167
9176
|
this.stock = 0;
|
|
9168
9177
|
this.data = null;
|
|
9169
9178
|
this.hidePrices = false;
|
|
9170
|
-
this.creditAccountShowPrices =
|
|
9179
|
+
this.creditAccountShowPrices = null;
|
|
9171
9180
|
/**
|
|
9172
9181
|
* @description variable utilizada mutar de la vista de lista, a la de box.
|
|
9173
9182
|
*/
|
|
@@ -10233,18 +10242,29 @@ var __decorate$1f = (this && this.__decorate) || function (decorators, target, k
|
|
|
10233
10242
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
10234
10243
|
};
|
|
10235
10244
|
let PriceEcComponent = class PriceEcComponent extends ComponentHelper {
|
|
10236
|
-
constructor(productsService) {
|
|
10245
|
+
constructor(productsService, channelConfigService) {
|
|
10237
10246
|
super();
|
|
10238
10247
|
this.productsService = productsService;
|
|
10248
|
+
this.channelConfigService = channelConfigService;
|
|
10239
10249
|
this.priceSize = true;
|
|
10250
|
+
this.taxeAmount = 0;
|
|
10251
|
+
this.taxes = [];
|
|
10252
|
+
this.showTaxLegendOnly = false;
|
|
10253
|
+
this.disableTaxInfo = false;
|
|
10254
|
+
this.showPriceWithoutTaxes = true;
|
|
10240
10255
|
this.ecOnConstruct();
|
|
10241
10256
|
}
|
|
10242
10257
|
ngOnInit() {
|
|
10258
|
+
this.channelConfigService.channelConfig$.subscribe(channel => {
|
|
10259
|
+
var _a;
|
|
10260
|
+
this.showPriceWithoutTaxes = (_a = channel) === null || _a === void 0 ? void 0 : _a.showPriceWithoutTaxes;
|
|
10261
|
+
});
|
|
10243
10262
|
this.ecOnInit();
|
|
10244
10263
|
}
|
|
10245
10264
|
};
|
|
10246
10265
|
PriceEcComponent.ctorParameters = () => [
|
|
10247
|
-
{ type: ProductsService }
|
|
10266
|
+
{ type: ProductsService },
|
|
10267
|
+
{ type: ChannelConfigService }
|
|
10248
10268
|
];
|
|
10249
10269
|
__decorate$1f([
|
|
10250
10270
|
Input()
|
|
@@ -10258,11 +10278,44 @@ __decorate$1f([
|
|
|
10258
10278
|
__decorate$1f([
|
|
10259
10279
|
Input()
|
|
10260
10280
|
], PriceEcComponent.prototype, "classStrSpacing", void 0);
|
|
10281
|
+
__decorate$1f([
|
|
10282
|
+
Input()
|
|
10283
|
+
], PriceEcComponent.prototype, "basePrice", void 0);
|
|
10284
|
+
__decorate$1f([
|
|
10285
|
+
Input()
|
|
10286
|
+
], PriceEcComponent.prototype, "taxeAmount", void 0);
|
|
10287
|
+
__decorate$1f([
|
|
10288
|
+
Input()
|
|
10289
|
+
], PriceEcComponent.prototype, "taxes", void 0);
|
|
10290
|
+
__decorate$1f([
|
|
10291
|
+
Input()
|
|
10292
|
+
], PriceEcComponent.prototype, "showTaxLegendOnly", void 0);
|
|
10293
|
+
__decorate$1f([
|
|
10294
|
+
Input()
|
|
10295
|
+
], PriceEcComponent.prototype, "disableTaxInfo", void 0);
|
|
10296
|
+
__decorate$1f([
|
|
10297
|
+
Input()
|
|
10298
|
+
], PriceEcComponent.prototype, "customPriceTemplate", void 0);
|
|
10299
|
+
__decorate$1f([
|
|
10300
|
+
Input()
|
|
10301
|
+
], PriceEcComponent.prototype, "customSalePriceTemplate", void 0);
|
|
10302
|
+
__decorate$1f([
|
|
10303
|
+
Input()
|
|
10304
|
+
], PriceEcComponent.prototype, "customSimplePriceTemplate", void 0);
|
|
10305
|
+
__decorate$1f([
|
|
10306
|
+
Input()
|
|
10307
|
+
], PriceEcComponent.prototype, "customSimpleSalePriceTemplate", void 0);
|
|
10308
|
+
__decorate$1f([
|
|
10309
|
+
Input()
|
|
10310
|
+
], PriceEcComponent.prototype, "customTaxTemplate", void 0);
|
|
10311
|
+
__decorate$1f([
|
|
10312
|
+
Input()
|
|
10313
|
+
], PriceEcComponent.prototype, "customOnlyTaxLabelTemplate", void 0);
|
|
10261
10314
|
PriceEcComponent = __decorate$1f([
|
|
10262
10315
|
Component({
|
|
10263
10316
|
selector: 'app-price-ec',
|
|
10264
|
-
template: "<div *ngIf=\"saleprice; else onlyprice\" class=\"line-height-custom\">\n
|
|
10265
|
-
styles: [".price-sm{font-size:13px}.price{font-size:18px}.lnth{text-decoration:line-through;color:gray}"]
|
|
10317
|
+
template: "<!-- Si hay templates personalizados, se proyectan -->\n<ng-container *ngIf=\"customSalePriceTemplate || customPriceTemplate; else defaultPriceBlock\">\n <ng-container *ngTemplateOutlet=\"customPriceTemplate || defaultPriceBlock\"></ng-container>\n</ng-container>\n\n<ng-template #defaultPriceBlock>\n <div *ngIf=\"saleprice; else onlyprice\" class=\"line-height-custom\">\n <div [class]=\"(priceSize ? 'price-sm' : 'price')\"\n *ngIf=\"price && price.split(' - ').length > 1; else simplePriceDel\">\n <del class=\"tachado\">\n {{ price.split(' - ')[0] | ecCurrencySymbol }}\n {{ price.split(' - ')[1] | ecCurrencySymbol }}\n </del>\n </div>\n <div [class]=\"(priceSize ? 'price-sm' : 'price')\"\n *ngIf=\"saleprice && saleprice.split(' - ').length > 1; else simpleSalePrice\">\n {{ saleprice.split(' - ')[0] | ecCurrencySymbol }}\n {{ saleprice.split(' - ')[1] | ecCurrencySymbol }}\n </div>\n </div>\n\n <ng-template #onlyprice>\n <div [class]=\"(priceSize ? 'price-sm' : 'price')\"\n *ngIf=\"price && price.split(' - ').length > 1; else simplePrice\">\n {{ price.split(' - ')[0] | ecCurrencySymbol }} -\n {{ price.split(' - ')[1] | ecCurrencySymbol }}\n </div>\n </ng-template>\n\n <ng-template #simplePrice>\n <ng-container *ngIf=\"customSimplePriceTemplate; else fallbackSimplePrice\">\n <ng-container *ngTemplateOutlet=\"customSimplePriceTemplate\"></ng-container>\n </ng-container>\n </ng-template>\n\n <ng-template #fallbackSimplePrice>\n <div [class]=\"'uno line-height-custom ' + (priceSize ? 'price-sm' : 'price')\">\n {{ price | ecCurrencySymbol }}\n </div>\n </ng-template>\n\n <ng-template #simplePriceDel>\n <div [class]=\"'dos line-height-custom ' + (priceSize ? 'price-sm' : 'price')\">\n <span class=\"lnth\">{{ price | ecCurrencySymbol }}</span>\n </div>\n </ng-template>\n\n <ng-template #simpleSalePrice>\n <ng-container *ngIf=\"customSimpleSalePriceTemplate; else fallbackSimpleSalePrice\">\n <ng-container *ngTemplateOutlet=\"customSimpleSalePriceTemplate\"></ng-container>\n </ng-container>\n </ng-template>\n\n <ng-template #fallbackSimpleSalePrice>\n <div [class]=\"'tres line-height-custom ' + (priceSize ? 'price-sm' : 'price')\">\n {{ saleprice | ecCurrencySymbol }}\n </div>\n </ng-template>\n</ng-template>\n\n<!-- Secci\u00F3n de impuestos -->\n<ng-container *ngIf=\"!disableTaxInfo && !showPriceWithoutTaxes\">\n <ng-container *ngIf=\"showTaxLegendOnly; else detailedTaxBlock\">\n <ng-container *ngIf=\"customOnlyTaxLabelTemplate; else defaultOnlyTaxLabelBlock\">\n <ng-container *ngTemplateOutlet=\"customOnlyTaxLabelTemplate\"></ng-container>\n </ng-container>\n <ng-template #defaultOnlyTaxLabelBlock>\n <p class=\"taxes-title\">{{'price-without-national-taxes' | translate }}: {{ basePrice | ecCurrencySymbol }}</p>\n </ng-template>\n </ng-container>\n\n <ng-template #detailedTaxBlock>\n <ng-container *ngIf=\"customTaxTemplate; else defaultTaxBlock\">\n <ng-container *ngTemplateOutlet=\"customTaxTemplate\"></ng-container>\n </ng-container>\n </ng-template>\n</ng-container>\n\n<ng-template #defaultTaxBlock>\n <div class=\"taxes-section\">\n <p class=\"taxes-title\">{{'price-without-national-taxes' | translate }}: {{ basePrice | ecCurrencySymbol }}</p>\n <ul class=\"taxes-list\">\n <li>\n {{ taxes.Name }}: {{ taxeAmount | ecCurrencySymbol }}\n </li>\n </ul>\n </div>\n</ng-template>",
|
|
10318
|
+
styles: [".price-sm{font-size:13px}.price{font-size:18px}.lnth{text-decoration:line-through;color:gray}.taxes-section{margin-top:.5rem;border-radius:.5rem;font-size:.95rem;color:#333;line-height:1.4;max-width:400px}.taxes-title{font-weight:500;margin-bottom:.2rem;font-size:.7rem;color:#222}.taxes-list{list-style-type:none;padding-left:0;margin:0}.taxes-list li{margin-bottom:.05rem;font-size:.65rem;display:flex;justify-content:space-between}"]
|
|
10266
10319
|
})
|
|
10267
10320
|
], PriceEcComponent);
|
|
10268
10321
|
|
|
@@ -10742,8 +10795,7 @@ let OrdersEcComponent = class OrdersEcComponent extends ComponentHelper {
|
|
|
10742
10795
|
this.channelConfigService = channelConfigService;
|
|
10743
10796
|
this.loading = true;
|
|
10744
10797
|
this.showImage = true;
|
|
10745
|
-
this.
|
|
10746
|
-
this.creditAmountConfigured = false;
|
|
10798
|
+
this.creditAccountShowPrices = null;
|
|
10747
10799
|
this.hidePrices = false;
|
|
10748
10800
|
/**
|
|
10749
10801
|
* @description name -> nombre de clave de valuesToSort; asc -> true: ascendente, false: descendente
|
|
@@ -10882,10 +10934,7 @@ let OrdersEcComponent = class OrdersEcComponent extends ComponentHelper {
|
|
|
10882
10934
|
});
|
|
10883
10935
|
this.ecOnInit();
|
|
10884
10936
|
this.cartService.showPrice$.subscribe((showPrice) => {
|
|
10885
|
-
this.
|
|
10886
|
-
});
|
|
10887
|
-
this.cartService.creditAmount$.subscribe((creditAmount) => {
|
|
10888
|
-
this.creditAmountConfigured = creditAmount !== null;
|
|
10937
|
+
this.creditAccountShowPrices = showPrice;
|
|
10889
10938
|
});
|
|
10890
10939
|
this.channelConfigService.channelConfig$.subscribe(channel => {
|
|
10891
10940
|
var _a, _b;
|
|
@@ -10906,7 +10955,7 @@ __decorate$1k([
|
|
|
10906
10955
|
OrdersEcComponent = __decorate$1k([
|
|
10907
10956
|
Component({
|
|
10908
10957
|
selector: 'app-orders-ec',
|
|
10909
|
-
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=\"(
|
|
10958
|
+
template: "<div class=\"container-fluid\" id=\"ordersEcComponent\">\n <section id=\"orders\" class=\"w-100\" *ngIf=\"!loading; else loadingView\">\n <ng-container *ngIf=\"!hidePrices\">\n <div *ngIf=\"orders && orders.length; else noOrders\">\n <div class=\"row mb-1 border-bottom\">\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'number' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('number')\">{{ 'order' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'paymentState' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('paymentState')\">{{ 'payment-state' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'method' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('method')\">{{ 'shipment-method' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12 \">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'methodState' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('methodState')\">\n {{ 'shipment-state' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'date' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('date')\">{{ 'date' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'total' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('total')\">{{ 'total' | translate }}:</p>\n </div>\n </div>\n <div class=\"row item border-bottom py-2\" *ngFor=\"let order of orders\">\n <div class=\"col-lg-2 col-12\">\n <h5 class=\"fw-bold\">\n {{ order.number }}\n </h5>\n <!-- <ng-container *ngIf=\"showImage\">\n <ng-container *ngIf=\"order.items[0].product.variants[0]?.images?.length ; else defaultpicture\">\n <img class=\"smc maxwidth\" [src]=\"mediaUrl + order.items[0].product.variants[0].images[0]\" alt=\"\">\n </ng-container>\n <ng-template #defaultpicture>\n <img *ngIf=\"order.items[0].product.picturesdefault\" class=\"smc maxwidth\"\n [src]=\"mediaUrl + order.items[0].product.picturesdefault[0]\" alt=\"\">\n </ng-template>\n </ng-container> -->\n </div>\n <div class=\"col-lg-2 col-12\">\n <p class=\"price\" *ngIf=\"order.payments && order.payments.length > 0\">\n {{ order.payments[0].state | translate | titlecase }}\n </p>\n </div>\n <div class=\"col-lg-2 col-12\">\n\n <p class=\"price\">\n {{ order.shipments[0].method.name }}\n </p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p class=\"price\">\n {{ order.shipments[0].state | translate | titlecase }}\n </p>\n <!-- ACA DEBERIA IR EL LINK DE SEGUIMIENTO -->\n <!-- <button class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver seguimiento</button> -->\n <a *ngIf=\"order.tracking\" [href]=\"order.tracking\"\n class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver\n seguimiento</a>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p class=\"price\">\n {{ toDate(order.checkoutCompletedAt, 'DD/MM/YYYY') | translate }}<br>\n {{ toDate(order.checkoutCompletedAt, 'h:mm:ss a') | translate }}\n </p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <h5 class=\"fw-bold text-nowrap\" *ngIf=\"(showPrice !== null ? showPrice : true)\">\n {{ (order.totals.total) | ecCurrencySymbol }}\n </h5>\n <button class=\"btn px-0 w-100 btdetalle\" (click)=\"goToOrder(order)\">{{\n 'see-order' | translate }}</button>\n </div>\n </div>\n </div>\n </ng-container>\n </section>\n</div>\n\n<ng-template #noOrders>\n <div class=\"w-100 h-50\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <h5>{{ 'no-orders' | translate }}</h5>\n </div>\n </div>\n</ng-template>\n\n<ng-template #errorView>\n <div class=\"w-100 h-50\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <h4>{{ 'orders-error' | translate }}</h4>\n </div>\n </div>\n</ng-template>\n\n<ng-template #loadingView>\n <div class=\"w-100 h-50 py-5\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n </div>\n</ng-template>",
|
|
10910
10959
|
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}"]
|
|
10911
10960
|
})
|
|
10912
10961
|
], OrdersEcComponent);
|
|
@@ -10941,8 +10990,7 @@ let OrderEcComponent = class OrderEcComponent extends ComponentHelper {
|
|
|
10941
10990
|
this.loading = true;
|
|
10942
10991
|
this.numberOrder = null;
|
|
10943
10992
|
this.allowRepeatOrders = false;
|
|
10944
|
-
this.
|
|
10945
|
-
this.creditAmountConfigured = false;
|
|
10993
|
+
this.creditAccountShowPrices = null;
|
|
10946
10994
|
this.hidePrices = false;
|
|
10947
10995
|
this.hideDiscounts = false;
|
|
10948
10996
|
this.hideTaxes = false;
|
|
@@ -10988,10 +11036,7 @@ let OrderEcComponent = class OrderEcComponent extends ComponentHelper {
|
|
|
10988
11036
|
this.hideTaxes = (_f = (_e = config) === null || _e === void 0 ? void 0 : _e.hideTaxes, (_f !== null && _f !== void 0 ? _f : false));
|
|
10989
11037
|
});
|
|
10990
11038
|
this.cartService.showPrice$.subscribe((showPrice) => {
|
|
10991
|
-
this.
|
|
10992
|
-
});
|
|
10993
|
-
this.cartService.creditAmount$.subscribe((creditAmount) => {
|
|
10994
|
-
this.creditAmountConfigured = creditAmount !== null;
|
|
11039
|
+
this.creditAccountShowPrices = showPrice;
|
|
10995
11040
|
});
|
|
10996
11041
|
this.ecOnInit();
|
|
10997
11042
|
}
|
|
@@ -11015,7 +11060,7 @@ __decorate$1l([
|
|
|
11015
11060
|
OrderEcComponent = __decorate$1l([
|
|
11016
11061
|
Component({
|
|
11017
11062
|
selector: 'app-order-ec',
|
|
11018
|
-
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>",
|
|
11063
|
+
template: "<main class=\"py-5\" id=\"orderEcComponent\">\n <div class=\"container\">\n <div class=\"wrap\" *ngIf=\"!loading; else loadingView\">\n <div *ngIf=\"order; else noOrder\">\n\n <div class=\"row justify-content-between \">\n <div class=\"col-sm-auto col-12 font-brandon\">\n <h4 class=\"tit1 fw-bold\">{{ ('order' | translate) + ': ' + order.number }}</h4>\n </div>\n <ng-container *ngIf=\"order?.invoice\">\n <div class=\"col-sm col-12 font-brandon\">\n <a target=\"_blank\" [href]=\"consts.getUrlBase().slice(0, -1) + order.invoice\"\n class=\"btn btn-link btn-invoice\">\n <i class=\"fas fa-file-download me-1\"></i>\n {{ 'download' | translate }} {{ 'invoices' | translate | titlecase }}\n </a>\n </div>\n </ng-container>\n <a (click)=\"volver()\" class=\"col-auto text-end\">\n <button class=\"btn btvolver bg-gray text-white\">{{ 'back-to-orders' | translate }}</button>\n </a>\n </div>\n\n <section id=\"orders\">\n <div class=\"row pt-2\">\n <div class=\"col-md-2 col-12\">\n <p class=\"st\">{{ 'payment-state' | translate }}:</p>\n <p class=\"\">\n {{ order.payments[0].state | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'shipment-state' | translate }}:</p>\n <p class=\"\">\n {{ order.shipments[0].state | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'payment-method' | translate }}:</p>\n <p class=\"\">\n {{ order.payments[0]?.method?.name | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'shipment-method' | translate }}:</p>\n <p class=\"\">\n {{ order.shipments[0].method.name }}\n </p>\n <!-- ACA DEBERIA IR EL LINK DE SEGUIMIENTO -->\n <a *ngIf=\"order.tracking\" [href]=\"order.tracking\"\n class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver\n seguimiento</a>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'date' | translate }}:</p>\n <p class=\"\">\n {{ toDate(order.checkoutCompletedAt, 'DD/MM/YYYY') | translate }}<br>\n {{ toDate(order.checkoutCompletedAt, 'h:mm:ss a') | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\" *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n <p class=\"st\">{{ 'total' | translate }}:</p>\n <h5 class=\"fw-bold\">\n {{ (order.totals.total) | ecCurrencySymbol}}\n\n </h5>\n </div>\n </div>\n </section>\n\n <div class=\"text-end mt-3\" *ngIf=\"!hidePrices && allowRepeatOrders\">\n <button class=\"btn btn-primary mb-2\" (click)=\"repeatOrder()\">\n {{ 'repeat-order' | translate }}\n </button>\n </div>\n\n <div class=\"container py-3 border-top border-bottom\">\n <div *ngIf=\"order.items.length; else noProducts\" class=\"row\">\n <div class=\"col-2 font-sm font-brandon d-none d-md-block\">\n {{ 'product' | translate | uppercase }}\n </div>\n <div class=\"col-4 font-sm font-brandon d-none d-md-block\">\n {{ 'description' | translate | uppercase }}\n </div>\n <div id=\"colLots\" *ngIf=\"ordersService.channelConfig.applyOrderLot\"\n class=\"col-1 font-sm font-brandon d-none d-md-block\">\n <!-- {{ 'description' | translate | uppercase }} -->\n {{ 'lots' | translate | uppercase }}\n </div>\n <div class=\"col-2 text-center font-sm font-brandon d-none d-md-block\"\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n {{ 'unit-price' | translate | uppercase }}\n </div>\n <div class=\"col-1 text-center font-sm font-brandon d-none d-md-block\">\n {{ 'quantity' | translate | uppercase }}\n </div>\n <div class=\"col-2 text-end font-sm font-brandon d-none d-md-block\"\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n {{ 'total' | translate | uppercase }}\n </div>\n </div>\n <ng-container *ngFor=\"let item of order.items; let i = index\">\n <div class=\"row cart-items\">\n <div class=\"col-5 col-md-2 py-2\">\n <ng-container *ngIf=\"item.product.variants[0]?.images?.length ; else defaultpicture\">\n <img class=\"smc maxwidth img-fluid rounded-custom \"\n [src]=\"consts.mediaUrl() + item.product.variants[0].images[0]\" alt=\"\">\n </ng-container>\n <ng-template #defaultpicture>\n <img *ngIf=\"item.product.picturesdefault\"\n class=\"smc maxwidth img-fluid rounded-custom\"\n [src]=\"consts.mediaUrl() + item.product.picturesdefault[0]\" alt=\"\">\n </ng-template>\n </div>\n <div\n class=\"col-md-4 col-7 flex-column flex-md-row justify-content-start d-flex align-items-center\">\n <p class=\"font-brandon d-flex w-100 mb-0\">\n {{ item.product.name }} (Cod:{{ item.product.variants[0].code }})\n </p>\n </div>\n <div class=\"col-md-1 col-1 flex-column flex-md-row justify-content-start d-flex align-items-center\"\n *ngIf=\"ordersService.channelConfig.applyOrderLot\">\n <input type=\"button\" class=\"btn btn-primary btnSeguir m-0 text-center\" type=\"button\"\n [attr.data-bs-toggle]=\"'collapse'\" [attr.data-bs-target]=\"'#collapseExample'+i\"\n aria-expanded=\"false\" [attr.aria-controls]=\"'collapseExample'+i\"\n value=\"{{ 'see' | translate | uppercase }}\">\n </div>\n <div class=\"container d-md-none\">\n <div class=\"row\">\n <div class=\"col-4\">\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\n </div>\n <div class=\"col-4 font-xl\" *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n <p class=\"text-center w-100 m-0\"> {{ (item.product.variants[0].saleprice ?\n item.product.variants[0].saleprice : item.product.variants[0].price) |\n ecCurrencySymbol}}</p>\n </div>\n <div class=\"col-4 font-xl\" *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n <p class=\"text-center w-100 m-0\"> {{ ((item.product.variants[0].saleprice ?\n item.product.variants[0].saleprice : item.product.variants[0].price) *\n item.quantity) | ecCurrencySymbol}}</p>\n </div>\n </div>\n </div>\n\n <div class=\"col-2 d-none d-md-flex align-items-center\"\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n <p class=\"text-center w-100 m-0\">\n {{ (item.product.variants[0].saleprice ? item.product.variants[0].saleprice :\n item.product.variants[0].price) | ecCurrencySymbol}}\n </p>\n </div>\n <div class=\"col-1 d-none d-md-flex align-items-center\">\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\n </div>\n <div class=\"col-2 d-none d-md-flex align-items-center\"\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n <p class=\"text-end w-100 m-0\">\n {{ ((item.product.variants[0].saleprice ? item.product.variants[0].saleprice :\n item.product.variants[0].price) * item.quantity) | ecCurrencySymbol}}</p>\n </div>\n <div class=\"collapse\" [attr.id]=\"'collapseExample'+i\">\n <div class=\"card card-body\">\n <table class=\"table table-striped\">\n <thead>\n <tr>\n <th scope=\"col\">#</th>\n <th scope=\"col\">Estado</th>\n <th scope=\"col\">Cantidad</th>\n <th scope=\"col\">Fecha Solicitada</th>\n <th scope=\"col\">Fecha Estimada</th>\n <th scope=\"col\">Sede</th>\n <th scope=\"col\">Nota</th>\n <th scope=\"col\">Total Lote</th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let lot of item.orderItemLot\">\n <tr>\n <th scope=\"row\">{{lot.id}}</th>\n <td>{{lot.lot_status}}</td>\n <td>{{lot.quantity}}</td>\n <td>{{ toDate(lot.date_request, 'DD/MM/YYYY') | translate }}</td>\n <td *ngIf=\"lot.date_deliver; else sinFechaEstimada\">{{\n toDate(lot.date_deliver, 'DD/MM/YYYY') | translate }}</td>\n <ng-template #sinFechaEstimada>\n <td>Pendiente</td>\n </ng-template>\n <td>{{lot.shipping_address_name}}</td>\n <td>{{lot.notes}}</td>\n <td>{{lot.total_lot | ecCurrencySymbol}}</td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n\n </ng-container>\n </div>\n\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-12 col-md-6\"></div>\n <div class=\"col-12 col-md-6\" *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n <div class=\"row py-4\">\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'total-products' |\n translate }}</div>\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\n {{ (order.totals.items) | ecCurrencySymbol }}\n </div>\n\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'shipment' |\n translate }}</div>\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\n {{ (order.totals.shipping || '0') | ecCurrencySymbol }}\n\n </div>\n\n <div *ngIf=\"!hideDiscounts && order.totals.promotion && order.totals.promotion != 0\"\n class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'discount' |\n translate }}</div>\n <div *ngIf=\"!hideDiscounts && order.totals.promotion && order.totals.promotion != 0\"\n class=\"col-6 font-brandon font-md text-gray border-bottom text-end text-end\">\n {{ (order.totals.promotion) | ecCurrencySymbol }}</div>\n\n <div *ngIf=\"!hideTaxes && order.totals.taxes && order.totals.taxes != 0 \"\n class=\"col-6 font-brandon font-md text-gray border-bottom \">\n {{ 'taxes' | translate }}</div>\n <div *ngIf=\"!hideTaxes && order.totals.taxes && order.totals.taxes != 0\"\n class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\n {{ (order.totals.taxes) | ecCurrencySymbol }}</div>\n\n <div class=\"col-6 font-brandon font-md\">{{ 'total' | translate | uppercase }}</div>\n <div class=\"col-6 font-brandon font-md text-end\">\n {{ (order.totals.total) | ecCurrencySymbol }}\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n</main>\n\n<ng-template #noOrder>\n <div class=\"w-100 h-50\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <h5>{{ 'no-orders' | translate }}</h5>\n </div>\n </div>\n</ng-template>\n\n<ng-template #loadingView>\n <div class=\"w-100 h-50 py-5\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n </div>\n</ng-template>",
|
|
11019
11064
|
styles: [".maxwidth{max-width:100px}"]
|
|
11020
11065
|
})
|
|
11021
11066
|
], OrderEcComponent);
|
|
@@ -11888,25 +11933,25 @@ let DetailCheckoutBlockEcComponent = class DetailCheckoutBlockEcComponent extend
|
|
|
11888
11933
|
this.data = null;
|
|
11889
11934
|
this.discountTotal = 0;
|
|
11890
11935
|
this.couponTotal = 0;
|
|
11891
|
-
this.
|
|
11892
|
-
this.creditAmountConfigured = false;
|
|
11936
|
+
this.creditAccountShowPrices = null;
|
|
11893
11937
|
this.hideDiscounts = false;
|
|
11894
11938
|
this.hideTaxes = false;
|
|
11939
|
+
this.showPriceWithoutTaxes = true;
|
|
11895
11940
|
this.getIcon = (data_item) => {
|
|
11896
11941
|
switch (data_item.type) {
|
|
11897
|
-
case 'coupon': return 'fas fa-ticket-alt fa-
|
|
11898
|
-
case 'discount': return 'fas fa-tags fa-
|
|
11899
|
-
case 'shipment': return 'fas fa-shipping-fast fa-
|
|
11900
|
-
case 'subtotal': return 'fas fa-boxes fa-
|
|
11901
|
-
case 'taxes': return 'fas fa-file-invoice-dollar fa-
|
|
11902
|
-
case 'total': return 'fas fa-shopping-basket fa-
|
|
11903
|
-
default: return 'fas fa-tags fa-
|
|
11942
|
+
case 'coupon': return 'fas fa-ticket-alt fa-2x';
|
|
11943
|
+
case 'discount': return 'fas fa-tags fa-2x';
|
|
11944
|
+
case 'shipment': return 'fas fa-shipping-fast fa-2x';
|
|
11945
|
+
case 'subtotal': return 'fas fa-boxes fa-2x';
|
|
11946
|
+
case 'taxes': return 'fas fa-file-invoice-dollar fa-2x';
|
|
11947
|
+
case 'total': return 'fas fa-shopping-basket fa-2x';
|
|
11948
|
+
default: return 'fas fa-tags fa-2x';
|
|
11904
11949
|
}
|
|
11905
11950
|
};
|
|
11906
11951
|
this.getIcon2 = (data_type) => {
|
|
11907
11952
|
switch (data_type) {
|
|
11908
|
-
case 'coupon': return 'fas fa-ticket-alt fa-
|
|
11909
|
-
case 'discount': return 'fas fa-tags fa-
|
|
11953
|
+
case 'coupon': return 'fas fa-ticket-alt fa-2x';
|
|
11954
|
+
case 'discount': return 'fas fa-tags fa-2x';
|
|
11910
11955
|
}
|
|
11911
11956
|
};
|
|
11912
11957
|
this.ecOnConstruct();
|
|
@@ -11917,15 +11962,13 @@ let DetailCheckoutBlockEcComponent = class DetailCheckoutBlockEcComponent extend
|
|
|
11917
11962
|
this.calcularTotales();
|
|
11918
11963
|
this.ecOnInit();
|
|
11919
11964
|
this.cartService.showPrice$.subscribe((showPrice) => {
|
|
11920
|
-
this.
|
|
11921
|
-
});
|
|
11922
|
-
this.cartService.creditAmount$.subscribe((creditAmount) => {
|
|
11923
|
-
this.creditAmountConfigured = creditAmount !== null;
|
|
11965
|
+
this.creditAccountShowPrices = showPrice;
|
|
11924
11966
|
});
|
|
11925
11967
|
this.channelConfigService.channelConfig$.subscribe(channel => {
|
|
11926
|
-
var _a, _b, _c, _d;
|
|
11968
|
+
var _a, _b, _c, _d, _e, _f;
|
|
11927
11969
|
this.hideDiscounts = (_b = (_a = channel) === null || _a === void 0 ? void 0 : _a.hideDiscounts, (_b !== null && _b !== void 0 ? _b : false));
|
|
11928
11970
|
this.hideTaxes = (_d = (_c = channel) === null || _c === void 0 ? void 0 : _c.hideTaxes, (_d !== null && _d !== void 0 ? _d : false));
|
|
11971
|
+
this.showPriceWithoutTaxes = (_f = (_e = channel) === null || _e === void 0 ? void 0 : _e.showPriceWithoutTaxes, (_f !== null && _f !== void 0 ? _f : false));
|
|
11929
11972
|
});
|
|
11930
11973
|
}
|
|
11931
11974
|
calcularTotales() {
|
|
@@ -11938,6 +11981,12 @@ let DetailCheckoutBlockEcComponent = class DetailCheckoutBlockEcComponent extend
|
|
|
11938
11981
|
.reduce((acc, curr) => acc + curr.amount, 0);
|
|
11939
11982
|
}
|
|
11940
11983
|
}
|
|
11984
|
+
getTypeLabel(type) {
|
|
11985
|
+
if (type === 'taxes') {
|
|
11986
|
+
return this.showPriceWithoutTaxes ? 'taxes' : 'national-taxes';
|
|
11987
|
+
}
|
|
11988
|
+
return type;
|
|
11989
|
+
}
|
|
11941
11990
|
};
|
|
11942
11991
|
DetailCheckoutBlockEcComponent.ctorParameters = () => [
|
|
11943
11992
|
{ type: CheckoutService },
|
|
@@ -11950,7 +11999,7 @@ __decorate$1u([
|
|
|
11950
11999
|
DetailCheckoutBlockEcComponent = __decorate$1u([
|
|
11951
12000
|
Component({
|
|
11952
12001
|
selector: 'app-detail-checkout-block-ec',
|
|
11953
|
-
template: "<div id=\"appDetailCheckoutBlockEc\" class=\"d-flex flex-row w-100 justify-content-center flex-wrap\"\n *ngIf=\"data && (
|
|
12002
|
+
template: "<div id=\"appDetailCheckoutBlockEc\" class=\"d-flex flex-row w-100 justify-content-center flex-wrap\"\n *ngIf=\"data && (creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n <ng-container *ngFor=\"let item of data; let i = index\">\n <ng-container *ngIf=\"item.type != 'discount' && item.type != 'coupon'\">\n <div class=\"d-flex flex-column justify-content-center mx-sm-3 mx-2 text-center mb-4 resumen\">\n <i ngClass=\"mb-2 colorIconoCheckout\" [class]=\"getIcon(item)\"></i>\n <strong class=\"text-center w-100 font-brandon font-md mb-1\">\n {{ getTypeLabel(item.type) | translate }}\n </strong>\n <span class=\"text-center w-100 font-brandon font-md text-gray\">{{ (item.amount != 0 ) ? (item.amount |\n ecCurrencySymbol) : ('free' | translate) }}</span>\n </div>\n </ng-container>\n\n\n <!-- Mostrar total de descuentos -->\n <div class=\"d-flex flex-column justify-content-center mx-sm-3 mx-2 text-center mb-4 resumen\"\n *ngIf=\"!hideDiscounts && this.discountTotal != 0 && i === 1\">\n <i ngClass=\"mb-2 colorIconoCheckout\" [class]=\"getIcon2('discount')\"></i>\n <strong class=\"text-center w-100 font-brandon font-md mb-1\">Descuento</strong>\n <span class=\"text-center w-100 font-brandon font-md text-gray\">{{ (this.discountTotal | ecCurrencySymbol)\n }}</span>\n </div>\n\n <!-- Mostrar total de cupones -->\n <div class=\"d-flex flex-column justify-content-center mx-sm-3 mx-2 text-center mb-4 resumen\"\n *ngIf=\"!hideDiscounts && this.couponTotal != 0 && i === 1\">\n <i ngClass=\"mb-2 colorIconoCheckout\" [class]=\"getIcon2('coupon')\"></i>\n <strong class=\"text-center w-100 font-brandon font-md mb-1\">Cupon</strong>\n <span class=\"text-center w-100 font-brandon font-md text-gray\">{{(this.couponTotal| ecCurrencySymbol)\n }}</span>\n </div>\n </ng-container>\n</div>",
|
|
11954
12003
|
styles: [""]
|
|
11955
12004
|
})
|
|
11956
12005
|
], DetailCheckoutBlockEcComponent);
|
|
@@ -15749,7 +15798,7 @@ let SidebarEcComponent = class SidebarEcComponent {
|
|
|
15749
15798
|
this.variantsToShow = ['TALLE', 'COLOR'];
|
|
15750
15799
|
this.hideDiscounts = false;
|
|
15751
15800
|
this.hideTaxes = false;
|
|
15752
|
-
this.creditAccountShowPrices =
|
|
15801
|
+
this.creditAccountShowPrices = null;
|
|
15753
15802
|
this.actualizarCantidad = (item, cantidad, stock, id) => {
|
|
15754
15803
|
if (id) {
|
|
15755
15804
|
const elem = document.getElementById(id);
|