ng-easycommerce 0.0.660-beta.1 → 0.0.661
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 +22 -58
- package/assets/ec-i18n/en.json +3 -1
- package/assets/ec-i18n/es.json +3 -1
- package/bundles/ng-easycommerce.umd.js +179 -512
- 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/core.consts.js +6 -1
- package/esm2015/lib/ec-component/account-ec/order-ec/order-ec.component.js +5 -3
- package/esm2015/lib/ec-component/cart-ec/cart-ec.component.js +8 -5
- package/esm2015/lib/ec-component/checkout-ec/dataform-ec/dataform-ec.component.js +11 -5
- package/esm2015/lib/ec-component/collection-ec/collection-ec.component.js +14 -450
- package/esm2015/lib/ec-component/product-detail-ec/product-detail-ec.component.js +30 -3
- package/esm2015/lib/ec-component/product-ec/product-ec.component.js +1 -2
- package/esm2015/lib/ec-component/sidebar-ec/sidebar-ec.component.js +8 -5
- package/esm2015/lib/ec-component/widgets-ec/paypal-express-ec/paypal-express-ec.component.js +1 -3
- package/esm2015/lib/ec-component/widgets-ec/price-ec/price-ec.component.js +3 -3
- package/esm2015/lib/ec-pipe/ec-currency-symbol.pipe.js +2 -1
- package/esm2015/lib/services/cart.service.js +27 -12
- package/esm2015/lib/services/currency.service.js +43 -7
- package/esm5/lib/core.consts.js +6 -1
- package/esm5/lib/ec-component/account-ec/order-ec/order-ec.component.js +5 -3
- package/esm5/lib/ec-component/cart-ec/cart-ec.component.js +8 -5
- package/esm5/lib/ec-component/checkout-ec/dataform-ec/dataform-ec.component.js +11 -5
- package/esm5/lib/ec-component/collection-ec/collection-ec.component.js +13 -458
- package/esm5/lib/ec-component/product-detail-ec/product-detail-ec.component.js +48 -3
- package/esm5/lib/ec-component/product-ec/product-ec.component.js +1 -2
- package/esm5/lib/ec-component/sidebar-ec/sidebar-ec.component.js +8 -5
- package/esm5/lib/ec-component/widgets-ec/paypal-express-ec/paypal-express-ec.component.js +1 -3
- package/esm5/lib/ec-component/widgets-ec/price-ec/price-ec.component.js +3 -3
- package/esm5/lib/ec-pipe/ec-currency-symbol.pipe.js +2 -1
- package/esm5/lib/services/cart.service.js +27 -12
- package/esm5/lib/services/currency.service.js +43 -7
- package/fesm2015/ng-easycommerce.js +157 -499
- package/fesm2015/ng-easycommerce.js.map +1 -1
- package/fesm5/ng-easycommerce.js +180 -513
- package/fesm5/ng-easycommerce.js.map +1 -1
- package/lib/core.consts.d.ts +5 -0
- package/lib/ec-component/account-ec/order-ec/order-ec.component.d.ts +1 -0
- package/lib/ec-component/cart-ec/cart-ec.component.d.ts +1 -0
- package/lib/ec-component/collection-ec/collection-ec.component.d.ts +4 -34
- package/lib/ec-component/product-detail-ec/product-detail-ec.component.d.ts +3 -0
- package/lib/ec-component/sidebar-ec/sidebar-ec.component.d.ts +1 -0
- package/lib/services/cart.service.d.ts +2 -2
- package/lib/services/currency.service.d.ts +14 -2
- package/ng-easycommerce.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -499,6 +499,11 @@
|
|
|
499
499
|
* @example ['AR','ES','GB']
|
|
500
500
|
*/
|
|
501
501
|
this.countries = [];
|
|
502
|
+
/**
|
|
503
|
+
* @description contiene un arreglo de string cuyo contenido son los codigos de los paises a excluir.
|
|
504
|
+
* @example ['GB']
|
|
505
|
+
*/
|
|
506
|
+
this.excludedCountries = [];
|
|
502
507
|
/**
|
|
503
508
|
*
|
|
504
509
|
* @param countries debe contener los codigos de los paises que se quiere mostrar
|
|
@@ -4744,12 +4749,22 @@
|
|
|
4744
4749
|
_this.updateLocalCart();
|
|
4745
4750
|
_this.requestInProcess.next(false);
|
|
4746
4751
|
};
|
|
4747
|
-
this.updateCartItemQuantity = function (variant_id, quantity) {
|
|
4748
|
-
var
|
|
4752
|
+
this.updateCartItemQuantity = function (variant_id, quantity, comments) {
|
|
4753
|
+
var normalizedComments = comments !== undefined ? ((comments !== null && comments !== void 0 ? comments : '')).trim() : undefined;
|
|
4754
|
+
var newItems = _this.items.map(function (it) {
|
|
4755
|
+
if (it.variant_id !== variant_id)
|
|
4756
|
+
return it;
|
|
4757
|
+
var updated = __assign$a(__assign$a({}, it), { quantity: Number(quantity) });
|
|
4758
|
+
if (normalizedComments !== undefined) {
|
|
4759
|
+
updated.comments = normalizedComments;
|
|
4760
|
+
}
|
|
4761
|
+
return updated;
|
|
4762
|
+
});
|
|
4763
|
+
_this.items = newItems;
|
|
4749
4764
|
_this.cartItemsSubject.next(_this.items);
|
|
4750
4765
|
_this.requestInProcess.next(false);
|
|
4751
4766
|
_this.updateLocalCart();
|
|
4752
|
-
_this.toastrService.show('product-updated', { quantity:
|
|
4767
|
+
_this.toastrService.show('product-updated', { quantity: quantity });
|
|
4753
4768
|
};
|
|
4754
4769
|
this.appendToCart = function (cart) {
|
|
4755
4770
|
_this.updateCartObj(cart);
|
|
@@ -4771,11 +4786,11 @@
|
|
|
4771
4786
|
// this.googleAnalytics.removeFromCart(product);
|
|
4772
4787
|
_this.analyticsService.callEvent('remove_from_cart', __assign$a(__assign$a({}, product), { currency: _this.consts.currency.code }));
|
|
4773
4788
|
};
|
|
4774
|
-
this.addIfAllreadyExists = function (product, variant_id, quantityAdd) {
|
|
4789
|
+
this.addIfAllreadyExists = function (product, variant_id, quantityAdd, comments) {
|
|
4775
4790
|
if (quantityAdd === void 0) { quantityAdd = 1; }
|
|
4776
4791
|
return _this.items.find(function (item, index) {
|
|
4777
4792
|
if (item.product.id == product.id && item.variant_id == variant_id) {
|
|
4778
|
-
_this.updateItemQuantity(item, _this.findItem(product.id).quantity + quantityAdd);
|
|
4793
|
+
_this.updateItemQuantity(item, _this.findItem(product.id).quantity + quantityAdd, comments);
|
|
4779
4794
|
return true;
|
|
4780
4795
|
}
|
|
4781
4796
|
return false;
|
|
@@ -4829,7 +4844,7 @@
|
|
|
4829
4844
|
return;
|
|
4830
4845
|
}
|
|
4831
4846
|
_this.requestInProcess.next(true);
|
|
4832
|
-
var added = _this.addIfAllreadyExists(product, variant_id, quantity);
|
|
4847
|
+
var added = _this.addIfAllreadyExists(product, variant_id, quantity, comments);
|
|
4833
4848
|
if (!added) {
|
|
4834
4849
|
var payload = {
|
|
4835
4850
|
productCode: product.id,
|
|
@@ -4869,7 +4884,7 @@
|
|
|
4869
4884
|
!added && _this.connection.post(_this.addItemApi(), { productCode: product.id, quantity: quantity, variantCode: variant_id, id: id || '', order_item_id: order_item_id || '', lot_quantity: lot_quantity || '', unit_price: unit_price || '', unit_total: unit_total || '', ajustement_total: ajustement_total || '', total_lot: total_lot || '', lot_status: lot_status || '', date_request: date_request || '', notes: notes || '', shipping_address_id: shipping_address_id || '', shipping_address_name: shipping_address_name || '', action: action || 'newlot' })
|
|
4870
4885
|
.subscribe(function (res) { return _this.appendToCart(res); }, function (err) { return _this.handleError(err); });
|
|
4871
4886
|
};
|
|
4872
|
-
this.addToCartPromise = function (product, quantity, variant_id) { return __awaiter$5(_this, void 0, void 0, function () {
|
|
4887
|
+
this.addToCartPromise = function (product, quantity, variant_id, comments) { return __awaiter$5(_this, void 0, void 0, function () {
|
|
4873
4888
|
var added, result;
|
|
4874
4889
|
return __generator$5(this, function (_a) {
|
|
4875
4890
|
switch (_a.label) {
|
|
@@ -4879,7 +4894,7 @@
|
|
|
4879
4894
|
return [2 /*return*/];
|
|
4880
4895
|
}
|
|
4881
4896
|
this.requestInProcess.next(true);
|
|
4882
|
-
added = this.addIfAllreadyExists(product, variant_id, quantity);
|
|
4897
|
+
added = this.addIfAllreadyExists(product, variant_id, quantity, comments);
|
|
4883
4898
|
if (!!added) return [3 /*break*/, 2];
|
|
4884
4899
|
return [4 /*yield*/, (this.connection.post(this.addItemApi(), { productCode: product.id, quantity: quantity, variantCode: variant_id }).toPromise())];
|
|
4885
4900
|
case 1:
|
|
@@ -4925,13 +4940,18 @@
|
|
|
4925
4940
|
items = items.filter(function (itemParam) { return !_this.items.find(function (item) { return itemParam.variantCode == item.variant_id; }); });
|
|
4926
4941
|
return __spread$3(items, paramsMerge);
|
|
4927
4942
|
};
|
|
4928
|
-
this.updateItemQuantity = function (item, quantity) {
|
|
4943
|
+
this.updateItemQuantity = function (item, quantity, comments) {
|
|
4929
4944
|
if (_this.validateQuantity(item, quantity) && (_this.validatePriceAndCredits(item, quantity))) {
|
|
4930
4945
|
_this.requestInProcess.next(true);
|
|
4946
|
+
var payload = { quantity: Number(quantity) };
|
|
4947
|
+
if (comments !== undefined) {
|
|
4948
|
+
var cleaned = ((comments !== null && comments !== void 0 ? comments : '')).trim();
|
|
4949
|
+
payload.comments = cleaned;
|
|
4950
|
+
}
|
|
4931
4951
|
_this.connection
|
|
4932
|
-
.put(_this.updateItemQuantityApi(_this.findItemByIdVariant(item.variant_id)),
|
|
4952
|
+
.put(_this.updateItemQuantityApi(_this.findItemByIdVariant(item.variant_id)), payload)
|
|
4933
4953
|
.pipe(operators.finalize(function () { return _this.requestInProcess.next(false); }))
|
|
4934
|
-
.subscribe(function (res) { return _this.updateCartObj(res) && _this.updateCartItemQuantity(item.variant_id, Number(quantity)); }, function (err) { return _this.handleError(err); });
|
|
4954
|
+
.subscribe(function (res) { return _this.updateCartObj(res) && _this.updateCartItemQuantity(item.variant_id, Number(quantity), comments); }, function (err) { return _this.handleError(err); });
|
|
4935
4955
|
}
|
|
4936
4956
|
};
|
|
4937
4957
|
this.validateQuantity = function (item, quantity) {
|
|
@@ -7494,6 +7514,7 @@
|
|
|
7494
7514
|
_this.creditAccountShowPrices = null;
|
|
7495
7515
|
_this.showTaxLegend = false;
|
|
7496
7516
|
_this.cartLoading = false;
|
|
7517
|
+
_this.enableFieldNotesInArticleFile = false;
|
|
7497
7518
|
_this.toDecimal = function (amount) { return _this.consts.toDecimal(amount); };
|
|
7498
7519
|
_this.redirectRegister = function () { return _this.router.navigateByUrl("/auth/login"); };
|
|
7499
7520
|
_this.getVariants = function (product) {
|
|
@@ -7557,11 +7578,12 @@
|
|
|
7557
7578
|
this.cartService.promotions.subscribe(function (promotions) { return _this.promotions = promotions; });
|
|
7558
7579
|
// console.log(this.cartService.getTaxes());
|
|
7559
7580
|
this.channelConfigService.channelConfig$.subscribe(function (channel) {
|
|
7560
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
7581
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
7561
7582
|
_this.hidePrices = (_b = (_a = channel) === null || _a === void 0 ? void 0 : _a.hidePrices, (_b !== null && _b !== void 0 ? _b : false));
|
|
7562
7583
|
_this.hideDiscounts = (_d = (_c = channel) === null || _c === void 0 ? void 0 : _c.hideDiscounts, (_d !== null && _d !== void 0 ? _d : false));
|
|
7563
7584
|
_this.hideTaxes = (_f = (_e = channel) === null || _e === void 0 ? void 0 : _e.hideTaxes, (_f !== null && _f !== void 0 ? _f : false));
|
|
7564
7585
|
_this.showTaxLegend = (_h = (_g = channel) === null || _g === void 0 ? void 0 : _g.showTaxLegend, (_h !== null && _h !== void 0 ? _h : false));
|
|
7586
|
+
_this.enableFieldNotesInArticleFile = (_k = (_j = channel) === null || _j === void 0 ? void 0 : _j.enableFieldNotesInArticleFile, (_k !== null && _k !== void 0 ? _k : false));
|
|
7565
7587
|
if (_this.hidePrices) {
|
|
7566
7588
|
_this.router.navigate(['/']);
|
|
7567
7589
|
}
|
|
@@ -7576,7 +7598,7 @@
|
|
|
7576
7598
|
};
|
|
7577
7599
|
CartEcComponent.prototype.actualizarCantidad = function (item, cantidad, stock, id) {
|
|
7578
7600
|
var _this = this;
|
|
7579
|
-
var _a;
|
|
7601
|
+
var _a, _b, _c;
|
|
7580
7602
|
if (this.cartLoading) {
|
|
7581
7603
|
return;
|
|
7582
7604
|
}
|
|
@@ -7596,10 +7618,11 @@
|
|
|
7596
7618
|
newQuantity = Math.round(newQuantity / step) * step;
|
|
7597
7619
|
}
|
|
7598
7620
|
}
|
|
7621
|
+
var keepSameComment = (_c = (_b = item) === null || _b === void 0 ? void 0 : _b.comments, (_c !== null && _c !== void 0 ? _c : undefined));
|
|
7599
7622
|
if (id) {
|
|
7600
7623
|
this.isDisabled = true; // Actualiza la propiedad vinculada a `[disabled]`
|
|
7601
7624
|
if (newQuantity > 0 && newQuantity <= stock) {
|
|
7602
|
-
this.cartService.updateItemQuantity(item, newQuantity);
|
|
7625
|
+
this.cartService.updateItemQuantity(item, newQuantity, keepSameComment);
|
|
7603
7626
|
}
|
|
7604
7627
|
else {
|
|
7605
7628
|
this.toastrService.show('out-of-stock-actually');
|
|
@@ -7610,7 +7633,7 @@
|
|
|
7610
7633
|
}
|
|
7611
7634
|
else {
|
|
7612
7635
|
if (newQuantity > 0 && newQuantity <= stock) {
|
|
7613
|
-
this.cartService.updateItemQuantity(item, newQuantity);
|
|
7636
|
+
this.cartService.updateItemQuantity(item, newQuantity, keepSameComment);
|
|
7614
7637
|
}
|
|
7615
7638
|
else {
|
|
7616
7639
|
this.toastrService.show('out-of-stock-actually');
|
|
@@ -8175,18 +8198,24 @@
|
|
|
8175
8198
|
* @returns un arreglo de countries.
|
|
8176
8199
|
*/
|
|
8177
8200
|
_this.filterCountryByCode = function (countries) {
|
|
8201
|
+
// 1. Si hay países EXCLUIDOS, quítalos siempre
|
|
8202
|
+
var filtered = countries;
|
|
8203
|
+
if (_this.consts.excludedCountries && _this.consts.excludedCountries.length > 0) {
|
|
8204
|
+
filtered = filtered.filter(function (elem) { return !_this.consts.excludedCountries.includes(elem.code); });
|
|
8205
|
+
}
|
|
8206
|
+
// 2. Si hay países INCLUIDOS, aplica el filtro de inclusión
|
|
8178
8207
|
if (_this.consts.getCountries().length > 0) {
|
|
8179
|
-
var countriesFiltered =
|
|
8208
|
+
var countriesFiltered = filtered.filter(function (elem) { return _this.consts.getCountries().includes(elem.code); });
|
|
8180
8209
|
if (countriesFiltered.length > 0) {
|
|
8181
8210
|
return countriesFiltered;
|
|
8182
8211
|
}
|
|
8183
8212
|
else {
|
|
8184
8213
|
console.error('El/los codigo/s ingresado/s no coinciden con los provistos desde el backend');
|
|
8185
|
-
return
|
|
8214
|
+
return filtered;
|
|
8186
8215
|
}
|
|
8187
8216
|
}
|
|
8188
8217
|
else {
|
|
8189
|
-
return
|
|
8218
|
+
return filtered;
|
|
8190
8219
|
}
|
|
8191
8220
|
};
|
|
8192
8221
|
_this.showFormFacturacion = function () {
|
|
@@ -8551,7 +8580,7 @@
|
|
|
8551
8580
|
DataFormEcComponent = __decorate$Q([
|
|
8552
8581
|
core.Component({
|
|
8553
8582
|
selector: 'app-dataform-ec',
|
|
8554
|
-
template: "<ng-container *ngIf=\"this.channelConfig.channelType != 'b2b' || (this.channelConfig.channelType == 'b2b' && authService.isAuthenticated()); else pleaseLogin\">\r\n<ng-container *ngIf=\"this.addressingService.modeSelectAddress == 'LOAD_ADDRESS_AND_SELECTION' && this.authService.isAuthenticated() && this.addressBook != null\">\r\n <div class=\"container card p-4 mb-3\">\r\n <div class=\"row justify-content-center\">\r\n <div class=\"col-12 col-md-10 col-lg-8 text-center\">\r\n <div class=\"btn-group btn-group-toggle\" data-bs-toggle=\"buttons\">\r\n <label [class]=\"'btn btn-outline-secondary ' + (!getMode() ? 'active' : '')\">\r\n <input type=\"radio\" name=\"options\" id=\"option1\" autocomplete=\"off\" checked\r\n (change)=\"setMode('seleccion')\"> {{'select-address' | translate | titlecase}}\r\n </label>\r\n\r\n <label [class]=\"'btn btn-outline-secondary ' + (getMode() ? 'active' : '')\" *ngIf=\"!getParamByChannelAndLanguage('btn_new_address_')\">\r\n <input type=\"radio\" name=\"options\" id=\"option2\" autocomplete=\"off\" (change)=\"setMode('carga')\">\r\n {{ 'new-address' | translate | titlecase}}\r\n </label>\r\n\r\n <label [class]=\"'btn btn-outline-secondary ' + (selectAddress ? 'active' : '')\" *ngIf=\"getParamByChannelAndLanguage('btn_new_address_') as param\">\r\n <input type=\"radio\" name=\"options\" id=\"option2\" autocomplete=\"off\" (change)=\"setMode('carga')\">\r\n {{ param.value}}\r\n </label>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-container>\r\n\r\n<ng-container *ngIf=\"getMode(); else addressSelection\">\r\n <div *ngIf=\"!require_login; else requireLoginView\">\r\n\r\n <ng-container *ngIf=\"this.addressingService.modeSelectAddress == 'ONLY_LOAD_ADDRESS'\">\r\n <div class=\"checkout-title my-2\">\r\n <h3>{{'billing-details'|translate}}</h3>\r\n </div>\r\n </ng-container>\r\n\r\n <form (submit)=\"verifyValidate(false,this.cartService.items)\">\r\n <div class=\"row mt-df\"><!--Fila 1-->\r\n <div class=\"form-group col-12 col-md-6\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.firstName.enabled\">\r\n <label class=\"field-label\">{{'first-name'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.firstName.required\"\r\n class=\"required\">*</span></label>\r\n <input class=\"form-control\" type=\"text\" name=\"firstName\"\r\n [formControl]=\"checkoutForm.controls['firstName']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.firstName.touched && checkoutForm.controls.firstName.errors?.required\">\r\n <span class=\"text-danger\">{{'first-name-help1'|translate}}</span>\r\n\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.firstName.touched && checkoutForm.controls.firstName.errors?.pattern\">\r\n <span class=\"text-danger\">\r\n {{'first-name-help2'|translate}}\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"form-group col-12 col-md-6\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.lastName.enabled\">\r\n <label class=\"field-label\">{{'last-name'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.lastName.required\"\r\n class=\"required\">*</span></label>\r\n <input class=\"form-control\" type=\"text\" name=\"lastName\"\r\n [formControl]=\"checkoutForm.controls['lastName']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.lastName.touched && checkoutForm.controls.lastName.errors?.required\">\r\n <span class=\"text-danger\">{{'last-name-help1'|translate}}</span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.lastName.touched && checkoutForm.controls.lastName.errors?.pattern\">\r\n <span class=\"text-danger\">{{'last-name-help2'|translate}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row mt-df\"><!--Fila 2-->\r\n <div class=\"form-group col-12 col-md-6\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.phoneNumber.enabled\">\r\n <label class=\"field-label\">{{'phone'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.phoneNumber.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"phoneNumber\"\r\n [formControl]=\"checkoutForm.controls['phoneNumber']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.phoneNumber.touched && checkoutForm.controls.phoneNumber.errors?.required\">\r\n <span class=\"text-danger\">\r\n\r\n {{'phone-help1'|translate}}\r\n </span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.phoneNumber.touched && checkoutForm.controls.phoneNumber.errors?.pattern\">\r\n <span class=\"text-danger\">\r\n {{'phone-help2'|translate}}\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"form-group col-12 col-md-6\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.email.enabled\">\r\n <label class=\"field-label\">{{'email-address'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.email.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"email\" name=\"email\"\r\n [formControl]=\"checkoutForm.controls['email']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.email.touched && checkoutForm.controls.email.errors?.required\">\r\n <span class=\"text-danger\">\r\n {{'email-address-help1'|translate}}\r\n </span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.email.touched && checkoutForm.controls.email.errors?.email\">\r\n <span class=\"text-danger\">\r\n {{'email-address-help2'|translate}}\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row mt-df\"><!--Fila 3-->\r\n <ng-container *ngIf=\"this.addressingService.getTypeForm().viewForms.countryCode.enabled\">\r\n <div class=\"form-group col-12 col-md-4\" *ngIf=\"(countries$ | async) as countries\">\r\n <label class=\"field-label\">{{'country'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.countryCode.required\"\r\n class=\"required\">*</span></label>\r\n <select class=\"form-select\" name=\"countryCode\"\r\n [formControl]=\"checkoutForm.controls['countryCode']\"\r\n (change)=\"onCountrySelected($event.target.value)\">\r\n <!-- <option selected [value]=\"countries[0].code\">{{ 'choose-country' | translate }}</option> -->\r\n <option *ngFor=\"let country of countries\" [value]=\"country.code\">{{ country.name }}</option>\r\n </select>\r\n <div *ngIf=\"checkoutForm.controls.countryCode.touched && checkoutForm.controls.countryCode.errors?.required\"\r\n class=\"text text-danger\">\r\n {{'country-help'|translate}}\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"this.addressingService.getTypeForm().viewForms.provinceCode.enabled\">\r\n <div class=\"form-group col-12 col-md-4\" *ngIf=\"(provinces$ | async) as provinces\">\r\n <label class=\"field-label\">{{'state'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.provinceCode.required\"\r\n class=\"required\">*</span></label>\r\n <select class=\"form-select\" name=\"provinceCode\"\r\n (change)=\"onProvincesSelected($event.target.value)\"\r\n [formControl]=\"checkoutForm.controls['provinceCode']\">\r\n<!-- <option selected [value]=\"null\">{{ 'choose-province' | translate }}</option>\r\n --> <option *ngFor=\"let province of provinces\" [value]=\"province.code\">{{ province.name }}\r\n </option>\r\n </select>\r\n <div *ngIf=\"checkoutForm.controls.provinceCode.touched && checkoutForm.controls.provinceCode.errors?.required\"\r\n class=\"text text-danger\">\r\n {{'state-help'|translate}}\r\n </div>\r\n </div>\r\n </ng-container>\r\n <div class=\"form-group col-12 col-md-4\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.city.enabled\">\r\n <label class=\"field-label\">{{'town-city'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.city.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"city\"\r\n [formControl]=\"checkoutForm.controls['city']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.city.touched && checkoutForm.controls.city.errors?.required\">\r\n <span class=\"text-danger\">{{'town-city-help'|translate}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row mt-df\"><!--Fila 4-->\r\n <div class=\"form-group col-12 col-md-8\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.street.enabled\">\r\n <label class=\"field-label\">{{'address'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.street.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"street\"\r\n [formControl]=\"checkoutForm.controls['street']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.street.touched && checkoutForm.controls.street.errors?.required\">\r\n <span class=\"text-danger\">{{'address-help1'|translate}}</span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.street.touched && checkoutForm.controls.street.errors?.maxlength\">\r\n <span class=\"text-danger\">{{'address-help2'|translate}}</span>\r\n </div>\r\n </div>\r\n\r\n <!-- form direcci\u00F3n -->\r\n <div class=\"form-group col-12 col-md-4\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.postcode.enabled\">\r\n <label class=\"field-label\">{{'postal-code'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.postcode.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"postcode\"\r\n [formControl]=\"checkoutForm.controls['postcode']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.postcode.touched && checkoutForm.controls.postcode.errors?.required\">\r\n <span class=\"text-danger\">{{'postal-code-help'|translate}}</span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.postcode.touched && checkoutForm.controls.postcode.errors?.pattern\">\r\n <span class=\"text-danger\"> {{postalCodeErrorMessage | translate}} </span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row mt-df\"><!--Fila 5-->\r\n <ng-container *ngIf=\"this.addressingService.getTypeForm().viewForms.documentType.enabled\">\r\n <div class=\"form-group col-12 col-md-4\" *ngIf=\"(documentTypes$ | async) as documentTypes\">\r\n <label class=\"field-label\">{{'document-type'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentType.required\"\r\n class=\"required\">*</span></label>\r\n <select name=\"documentType\" class=\"form-select\"\r\n (change)=\"onDocumentTypesSelected($event.target.value)\"\r\n [formControl]=\"checkoutForm.controls['documentType']\">\r\n<!-- <option [value]=\"''\" selected>{{'document-type'|translate}}</option>\r\n --> <option *ngFor=\"let item of documentTypes\" [value]=\"item.code\">{{item.name}}</option>\r\n </select>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.documentType.touched && checkoutForm.controls.documentType.errors?.required\">\r\n <span class=\"text-danger\">\r\n {{'type-document-help'|translate}}\r\n </span>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <div class=\"form-group col-12 col-md-4\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentNumber.enabled\">\r\n <label class=\"field-label\">{{'document-number'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentNumber.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\"\r\n [type]=\"'text'\" name=\"documentNumber\"\r\n [formControl]=\"checkoutForm.controls['documentNumber']\"\r\n placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.documentNumber.touched && checkoutForm.controls.documentNumber.errors?.required\">\r\n <span class=\"text-danger\">{{ 'document-number-help' | translate }}</span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.documentNumber.touched && checkoutForm.controls.documentNumber.errors?.pattern\">\r\n <span class=\"text-danger\">{{ documentErrorMessage | translate }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row mt-df\" *ngIf=\"this.consts.getChannel() != 'mdj-empresa-a'\"><!--Fila 6-->\r\n <div class=\"form-group col-12 col-md-12\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.enabled\">\r\n\r\n <label class=\"field-label\" *ngIf=\"!getLabelNotesParam()\">{{'notes'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\"\r\n class=\"required\">*</span></label>\r\n <label class=\"field-label\" *ngIf=\"getLabelNotesParam() as labelnotes\" [innerHTML]=\"labelnotes.value\"><span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\"\r\n class=\"required\">*</span></label>\r\n\r\n <!-- <label class=\"field-label\">{{'notes'|translate}}<span *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\" class=\"required\">*</span></label> -->\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"notes\"\r\n [formControl]=\"checkoutForm.controls['notes']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\r\n </div>\r\n </div>\r\n <div class=\"row mt-df\"><!--Fila 7-->\r\n <div class=\"form-group col-12 col-md-12\">\r\n <label for=\"formFact\"><b>{{ 'same-billing-address' | translate }}</b> <input type=\"checkbox\"\r\n class=\"ms-2\" [checked]=\"viewDataFacturacion\" (change)=\"showFormFacturacion()\"\r\n id=\"formFact\"></label>\r\n </div>\r\n </div>\r\n <div class=\"row mt-df\">\r\n <div class=\"col-12\">\r\n <p>\r\n <!-- <span class=\"required\"></span> -->\r\n <label class=\"required text-underline\">* {{ 'required-fields' | translate }}</label>\r\n </p>\r\n </div>\r\n </div>\r\n <div class=\"row mt-df\">\r\n <div class=\"form-group col-12 col-md-12\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.terms.enabled\">\r\n <span *ngIf=\"this.addressingService.getTypeForm().viewForms.terms.required\"\r\n class=\"required\">*</span>\r\n <label class=\"\" for=\"\"> {{ 'accept-terms' | translate }} <input class=\"ms-2\" name=\"terms\"\r\n [formControl]=\"checkoutForm.controls['terms']\" type=\"checkbox\" required\r\n (change)=\"onInputChange()\" /> </label><br />\r\n <a (click)=\"openModal(template)\" role=\"button\" class=\"ms-3 nota-input text-dark\">{{ 'whats-this' |\r\n translate }}</a>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.terms.touched && !checkoutForm.controls.terms.value\">\r\n <span class=\"text-danger\">{{ 'must-accept-terms' | translate }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row\" *ngIf=\"viewDataFacturacion ; else datosFormFacturacion\"> </div>\r\n <div class=\"checkout-btn-unique text-end\">\r\n <button type=\"submit\" [disabled]=\"!validado\" class=\"btn valid-btn mt-2\">\r\n {{(isLastOne ? 'finish-checkout' : (allready_data ? 'update' :\r\n 'ready-form')) | translate}}</button>\r\n\r\n\r\n </div>\r\n <div *ngIf=\"loading\" class=\"d-flex flex-column jusitfy-content-center align-items-center\">\r\n <app-loading-full-ec></app-loading-full-ec>\r\n </div>\r\n </form>\r\n </div>\r\n</ng-container>\r\n\r\n<ng-template #addressSelection>\r\n\r\n <ng-container *ngIf=\"this.addressingService.modeSelectAddress == 'ONLY_ADDRESS_SELECTION'\">\r\n <div class=\"checkout-title my-2\">\r\n <h3>{{'address-selection'|translate}}</h3>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"this.addressBook; else addressBookNotResult\">\r\n\r\n <ng-container *ngIf=\"this.addressBook?.length ;else addressBookLoading\">\r\n <div class=\"container\">\r\n <div class=\"row\">\r\n <div class=\"col-sm-6 col-12 my-3\" *ngFor=\"let item of addressBook; let i = index\">\r\n <div class=\"card p-3\">\r\n <input class=\"ms-1 mt-3 form-check-input input-size-lg\" type=\"radio\" [name]=\"'n-'+i\" [id]=\"i\"\r\n [checked]=\"item.selected\" (click)=\"setSelectAddress(item)\" (change)=\"onInputChange()\">\r\n <div class=\"ms-5\">\r\n <h4 class=\"card-title\">\r\n <strong>{{'address'|translate}}</strong><br>\r\n <span class=\"text-uppercase h3\">{{item.street}}</span>\r\n </h4>\r\n <div class=\"row\">\r\n <h5 class=\"card-subtitle mb-2 text-muted col-auto\">\r\n <strong>{{'country'|translate}}</strong> {{getCountry(item.countryCode)}}\r\n </h5>\r\n <h5 class=\"card-subtitle mb-2 text-muted col-auto\">\r\n <strong>{{'state'|translate}}</strong> {{getProvince(item.provinceCode)}}\r\n </h5>\r\n <h5 class=\"card-subtitle mb-2 text-muted col-auto\">\r\n <strong>{{'town-city'|translate}}</strong> {{item.city}}\r\n </h5>\r\n <h5 class=\"card-subtitle mb-2 text-muted col-auto\">\r\n <strong>{{'postal-code'|translate}}</strong> {{item.postcode}}\r\n </h5>\r\n </div>\r\n <div class=\"row px-3\">\r\n <div class=\"card p-2 bg-light w-100\">\r\n <div class=\"card-body\">\r\n <h5 class=\"card-title\">{{'address-contact'|translate}}</h5>\r\n <h6 class=\"card-subtitle mb-2 text-muted\">\r\n <strong>{{'first-name'|translate}}</strong>\r\n {{item.addressContact.firstName}}\r\n </h6>\r\n <h6 class=\"card-subtitle mb-2 text-muted\">\r\n <strong>{{'last-name'|translate}}</strong> {{item.addressContact.lastName}}\r\n </h6>\r\n <h6 class=\"card-subtitle mb-2 text-muted\">\r\n <strong>{{'document-type'|translate}}</strong>\r\n {{getDocumentType(item.addressContact.documentType)}}\r\n </h6>\r\n <h6 class=\"card-subtitle mb-2 text-muted\">\r\n <strong>{{'document-number'|translate}}</strong>\r\n {{item.addressContact.documentNumber}}\r\n </h6>\r\n <h6 class=\"card-subtitle mb-2 text-muted\">\r\n <strong>{{'email-address'|translate}}</strong> {{item.addressContact.email}}\r\n </h6>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n<!-- Se hardcodea el canal de mundo del juguete empresa A ya que se necesita con urgencia, se sustituira por un campo que llegara de backend. -->\r\n <div class=\"w-100\" *ngIf=\"this.consts.getChannel() != 'mdj-empresa-a'\"> \r\n <ng-container *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.enabled\">\r\n <div class=\"row mt-df\">\r\n <div class=\"form-group col-12 col-md-12\">\r\n <label class=\"field-label\" *ngIf=\"!getLabelNotesParam()\">{{'notes'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\"\r\n class=\"required\">*</span></label>\r\n <label class=\"field-label\"\r\n *ngIf=\"getLabelNotesParam() as labelnotes\" [innerHTML]=\"labelnotes.value\"></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"notes\"\r\n [(ngModel)]=\"this.addressBookSelected.notes\" #ctrl=\"ngModel\" value=\"\" placeholder=\"\"\r\n autocomplete=\"off\"> \r\n <div class=\"invalid-feedback d-block\" *ngIf=\"\r\n addressingService.getTypeForm().viewForms.notes.required\r\n && (!addressBookSelected.notes || !addressBookSelected.notes.trim())\r\n \">\r\n {{ 'required-field' | translate }}\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n <div class=\"checkout-btn-unique text-end\">\r\n <button (click)=\"selectAddress(this.cartService.items)\" class=\"btn valid-btn mt-2\">\r\n {{(isLastOne ? 'finish-checkout' : (allready_data ? 'update' :\r\n 'ready-form')) | translate}}\r\n </button>\r\n </div>\r\n <div *ngIf=\"loading\" class=\"d-flex flex-column jusitfy-content-center align-items-center\">\r\n <app-loading-full-ec></app-loading-full-ec>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n\r\n</ng-template>\r\n\r\n\r\n<ng-template #requireLoginView>\r\n <div id=\"loginCheckout\">\r\n <div class=\"d-flex flex-column jusitfy-content-center align-items-center\" *ngIf=\"require_login\">\r\n <div class=\"col-12\">\r\n <app-login-form-ec (ready)=\"verifyValidate($event)\" [redirect]=\"false\" [title]=\"'need-login'\">\r\n </app-login-form-ec>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n\r\n\r\n<ng-template #datosFormFacturacion>\r\n <div class=\"container-fluid px-0 px-md-2\">\r\n <div class=\"row\">\r\n <div class=\"col-12\">\r\n <div class=\"card \">\r\n <div class=\"card-header text-dark text-center\">\r\n <h3>{{'billing-data'|translate}}</h3>\r\n </div>\r\n <div class=\"card-body\">\r\n <form (submit)=\"verifyValidate()\">\r\n <div class=\"row mt-df\">\r\n <!--Fila 1-->\r\n <div class=\"form-group col-12 col-md-6\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.firstName.enabled\">\r\n <label class=\"field-label\">{{'first-name'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.firstName.required\"\r\n class=\"required\">*</span></label>\r\n <input class=\"form-control\" type=\"text\" name=\"firstName\"\r\n [formControl]=\"checkoutFormFacturacion.controls['firstName']\" value=\"\"\r\n placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.firstName.touched && checkoutFormFacturacion.controls.firstName.errors?.required\">\r\n <span class=\"text-danger\">{{'first-name-help1'|translate}}</span>\r\n\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.firstName.touched && checkoutFormFacturacion.controls.firstName.errors?.pattern\">\r\n <span class=\"text-danger\">\r\n {{'first-name-help2'|translate}}\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"form-group col-12 col-md-6\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.lastName.enabled\">\r\n <label class=\"field-label\">{{'last-name'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.lastName.required\"\r\n class=\"required\">*</span></label>\r\n <input class=\"form-control\" type=\"text\" name=\"lastName\"\r\n [formControl]=\"checkoutFormFacturacion.controls['lastName']\" value=\"\"\r\n placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.lastName.touched && checkoutFormFacturacion.controls.lastName.errors?.required\">\r\n <span class=\"text-danger\">{{'last-name-help1'|translate}}</span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.lastName.touched && checkoutFormFacturacion.controls.lastName.errors?.pattern\">\r\n <span class=\"text-danger\">{{'last-name-help2'|translate}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row mt-df\">\r\n <!--Fila 2-->\r\n <div class=\"form-group col-12 col-md-6\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.phoneNumber.enabled\">\r\n <label class=\"field-label\">{{'phone'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.phoneNumber.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\"\r\n name=\"phoneNumber\"\r\n [formControl]=\"checkoutFormFacturacion.controls['phoneNumber']\" value=\"\"\r\n placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.phoneNumber.touched && checkoutFormFacturacion.controls.phoneNumber.errors?.required\">\r\n <span class=\"text-danger\">\r\n {{'phone-help1'|translate}}\r\n </span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.phoneNumber.touched && checkoutFormFacturacion.controls.phoneNumber.errors?.pattern\">\r\n <span class=\"text-danger\">\r\n {{'phone-help2'|translate}}\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"form-group col-12 col-md-6\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.email.enabled\">\r\n <label class=\"field-label\">{{'email-address'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.email.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"email\" name=\"email\"\r\n [formControl]=\"checkoutFormFacturacion.controls['email']\" value=\"\"\r\n placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.email.touched && checkoutFormFacturacion.controls.email.errors?.required\">\r\n <span class=\"text-danger\">\r\n {{'email-address-help1'|translate}}\r\n </span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.email.touched && checkoutFormFacturacion.controls.email.errors?.email\">\r\n <span class=\"text-danger\">\r\n {{'email-address-help2'|translate}}\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row mt-df\">\r\n <!--Fila 3-->\r\n\r\n <ng-container\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.countryCode.enabled\">\r\n\r\n <div class=\"form-group col-12 col-md-4\"\r\n *ngIf=\"(countriesFacturacion$ | async) as countries\">\r\n <label class=\"field-label\">{{'country'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.countryCode.required\"\r\n class=\"required\">*</span></label>\r\n <select class=\"form-select\" name=\"countryCode\"\r\n [formControl]=\"checkoutFormFacturacion.controls['countryCode']\"\r\n (change)=\"onCountrySelectedFacturacion($event.target.value)\">\r\n <!-- <option selected [value]=\"null\">{{ 'choose-country' | translate }}</option> -->\r\n <option *ngFor=\"let country of countries\" [value]=\"country.code\">\r\n {{ country.name }}</option>\r\n </select>\r\n <div *ngIf=\"checkoutFormFacturacion.controls.countryCode.touched && checkoutFormFacturacion.controls.countryCode.errors?.required\"\r\n class=\"text text-danger\">\r\n {{'country-help'|translate}}\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.provinceCode.enabled\">\r\n\r\n <div class=\"form-group col-12 col-md-4\"\r\n *ngIf=\"(provincesFacturacion$ | async) as provinces\">\r\n <label class=\"field-label\">{{'state'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.provinceCode.required\"\r\n class=\"required\">*</span></label>\r\n <select class=\"form-select\" name=\"provinceCode\"\r\n (change)=\"onProvincesSelectedFacturacion($event.target.value)\"\r\n [formControl]=\"checkoutFormFacturacion.controls['provinceCode']\">\r\n <!-- <option selected [value]=\"null\">{{ 'choose-province' | translate }}</option> -->\r\n <option *ngFor=\"let province of provinces\" [value]=\"province.code\">\r\n {{ province.name }}\r\n </option>\r\n </select>\r\n <div *ngIf=\"checkoutFormFacturacion.controls.provinceCode.touched && checkoutFormFacturacion.controls.provinceCode.errors?.required\"\r\n class=\"text text-danger\">\r\n {{'state-help'|translate}}\r\n </div>\r\n </div>\r\n </ng-container>\r\n <div class=\"form-group col-12 col-md-4\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.city.enabled\">\r\n <label class=\"field-label\">{{'town-city'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.city.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"city\"\r\n [formControl]=\"checkoutFormFacturacion.controls['city']\" value=\"\" placeholder=\"\"\r\n autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.city.touched && checkoutFormFacturacion.controls.city.errors?.required\">\r\n <span class=\"text-danger\">{{'town-city-help'|translate}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row mt-df\">\r\n <!--Fila 4-->\r\n <div class=\"form-group col-12 col-md-8\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.street.enabled\">\r\n <label class=\"field-label\">{{'address'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.street.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"street\"\r\n [formControl]=\"checkoutFormFacturacion.controls['street']\" value=\"\"\r\n placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.street.touched && checkoutFormFacturacion.controls.street.errors?.required\">\r\n <span class=\"text-danger\">{{'address-help1'|translate}}</span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.street.touched && checkoutFormFacturacion.controls.street.errors?.maxlength\">\r\n <span class=\"text-danger\">{{'address-help2'|translate}}</span>\r\n </div>\r\n </div>\r\n <div class=\"form-group col-12 col-md-4\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.postcode.enabled\">\r\n <label class=\"field-label\">{{'postal-code'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.postcode.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"postcode\"\r\n [formControl]=\"checkoutFormFacturacion.controls['postcode']\" value=\"\"\r\n placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.postcode.touched && checkoutFormFacturacion.controls.postcode.errors?.required\">\r\n <span class=\"text-danger\">{{'postal-code-help'|translate}}</span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.postcode.touched && checkoutFormFacturacion.controls.postcode.errors?.pattern\">\r\n <span class=\"text-danger\">{{postalCodeErrorMessage |translate}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row mt-df\">\r\n <!--Fila 5-->\r\n <ng-container *ngIf=\"this.addressingService.getTypeForm().viewForms.documentType.enabled\">\r\n <div class=\"form-group col-12 col-md-4\" *ngIf=\"(documentTypesFacturacion$ | async) as documentTypes\">\r\n <label class=\"field-label\">{{'document-type'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentType.required\"\r\n class=\"required\">*</span></label>\r\n <select name=\"documentType\" class=\"form-select\"\r\n [formControl]=\"checkoutFormFacturacion.controls['documentType']\"\r\n (change)=\"onDocumentTypesSelectedFacturacion($event.target.value)\">\r\n <!-- <option [value]=\"''\" selected>{{'document-type'|translate}}</option> -->\r\n <option\r\n *ngFor=\"let item of documentTypes\"\r\n [value]=\"item.code\">{{item.name}}</option>\r\n </select>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.documentType.touched && checkoutFormFacturacion.controls.documentType.errors?.required\">\r\n <span class=\"text-danger\">\r\n {{'type-document-help'|translate}}\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"form-group col-12 col-md-4\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentNumber.enabled\">\r\n <label class=\"field-label\">{{'document-number'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentNumber.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\"\r\n [type]=\"'text'\" name=\"documentNumber\"\r\n [formControl]=\"checkoutFormFacturacion.controls['documentNumber']\"\r\n placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.documentNumber.touched && checkoutFormFacturacion.controls.documentNumber.errors?.required\">\r\n <span class=\"text-danger\">\r\n {{'document-number-help'|translate}}\r\n </span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.documentNumber.touched && checkoutFormFacturacion.controls.documentNumber.errors?.pattern\">\r\n <span class=\"text-danger\">{{ documentErrorMessage | translate }}</span>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n <div class=\"row mt-df\" *ngIf=\"this.consts.getChannel() != 'mdj-empresa-a'\">\r\n <div class=\"form-group col-12 col-md-12\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.enabled\">\r\n <label class=\"field-label\" *ngIf=\"!getLabelNotesParam()\">{{'notes'|translate}}aaa <span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\"\r\n class=\"required\">*</span></label>\r\n <label class=\"field-label\" *ngIf=\"getLabelNotesParam() as labelNotesHtml\">\r\n <div [innerHTML]=\"labelNotesHtml\"></div>\r\n <span *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\" class=\"required\">*</span>\r\n </label>\r\n\r\n <!-- <label class=\"field-label\">{{'notes'|translate}}<span *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\" class=\"required\">*</span></label> -->\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"notes\"\r\n [formControl]=\"checkoutFormFacturacion.controls['notes']\" value=\"\"\r\n placeholder=\"\" autocomplete=\"off\">\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n\r\n\r\n<ng-template #template>\r\n <div class=\"modal-content\">\r\n <div class=\"modal-header\">\r\n <button type=\"button\" class=\"btn-close float-end\" aria-label=\"Close\" (click)=\"modalRef.hide()\">\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <div class=\"modal-body scrol-if\">\r\n <app-section-container-ec [name]=\"'terminos-y-condiciones'\"> </app-section-container-ec>\r\n </div>\r\n\r\n</ng-template>\r\n\r\n\r\n<ng-template #addressBookNotResult>\r\n <div class=\"container\">\r\n <div class=\"row\">\r\n <div class=\"col-12 text-center my-2\">\r\n <h4> {{'address-book-not-result' | translate }} </h4>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #addressBookLoading>\r\n <div class=\"container\">\r\n <div class=\"row\">\r\n <div class=\"col-12 text-center my-2\">\r\n <div class=\"d-flex flex-column jusitfy-content-center align-items-center\">\r\n <app-loading-full-ec></app-loading-full-ec>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-template>\r\n</ng-container>\r\n\r\n<ng-template #pleaseLogin>\r\n <div class=\"container\">\r\n <p>Por favor <a [routerLink]=\"['/auth/login']\" > Inicie Sesi\u00F3n</a></p>\r\n </div>\r\n</ng-template>",
|
|
8583
|
+
template: "<ng-container\r\n *ngIf=\"this.channelConfig.channelType != 'b2b' || (this.channelConfig.channelType == 'b2b' && authService.isAuthenticated()); else pleaseLogin\">\r\n <ng-container\r\n *ngIf=\"this.addressingService.modeSelectAddress == 'LOAD_ADDRESS_AND_SELECTION' && this.authService.isAuthenticated() && this.addressBook != null\">\r\n <div class=\"container card p-4 mb-3\">\r\n <div class=\"row justify-content-center\">\r\n <div class=\"col-12 col-md-10 col-lg-8 text-center\">\r\n <div class=\"btn-group btn-group-toggle\" data-bs-toggle=\"buttons\">\r\n <label [class]=\"'btn btn-outline-secondary ' + (!getMode() ? 'active' : '')\">\r\n <input type=\"radio\" name=\"options\" id=\"option1\" autocomplete=\"off\" checked\r\n (change)=\"setMode('seleccion')\"> {{'select-address' | translate | titlecase}}\r\n </label>\r\n\r\n <label [class]=\"'btn btn-outline-secondary ' + (getMode() ? 'active' : '')\"\r\n *ngIf=\"!getParamByChannelAndLanguage('btn_new_address_')\">\r\n <input type=\"radio\" name=\"options\" id=\"option2\" autocomplete=\"off\"\r\n (change)=\"setMode('carga')\">\r\n {{ 'new-address' | translate | titlecase}}\r\n </label>\r\n\r\n <label [class]=\"'btn btn-outline-secondary ' + (selectAddress ? 'active' : '')\"\r\n *ngIf=\"getParamByChannelAndLanguage('btn_new_address_') as param\">\r\n <input type=\"radio\" name=\"options\" id=\"option2\" autocomplete=\"off\"\r\n (change)=\"setMode('carga')\">\r\n {{ param.value}}\r\n </label>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"getMode(); else addressSelection\">\r\n <div *ngIf=\"!require_login; else requireLoginView\">\r\n\r\n <ng-container *ngIf=\"this.addressingService.modeSelectAddress == 'ONLY_LOAD_ADDRESS'\">\r\n <div class=\"checkout-title my-2\">\r\n <h3>{{'billing-details'|translate}}</h3>\r\n </div>\r\n </ng-container>\r\n\r\n <form (submit)=\"verifyValidate(false,this.cartService.items)\">\r\n <div class=\"row mt-df\"><!--Fila 1-->\r\n <div class=\"form-group col-12 col-md-6\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.firstName.enabled\">\r\n <label class=\"field-label\">{{'first-name'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.firstName.required\"\r\n class=\"required\">*</span></label>\r\n <input class=\"form-control\" type=\"text\" name=\"firstName\"\r\n [formControl]=\"checkoutForm.controls['firstName']\" value=\"\" placeholder=\"\"\r\n autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.firstName.touched && checkoutForm.controls.firstName.errors?.required\">\r\n <span class=\"text-danger\">{{'first-name-help1'|translate}}</span>\r\n\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.firstName.touched && checkoutForm.controls.firstName.errors?.pattern\">\r\n <span class=\"text-danger\">\r\n {{'first-name-help2'|translate}}\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"form-group col-12 col-md-6\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.lastName.enabled\">\r\n <label class=\"field-label\">{{'last-name'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.lastName.required\"\r\n class=\"required\">*</span></label>\r\n <input class=\"form-control\" type=\"text\" name=\"lastName\"\r\n [formControl]=\"checkoutForm.controls['lastName']\" value=\"\" placeholder=\"\"\r\n autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.lastName.touched && checkoutForm.controls.lastName.errors?.required\">\r\n <span class=\"text-danger\">{{'last-name-help1'|translate}}</span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.lastName.touched && checkoutForm.controls.lastName.errors?.pattern\">\r\n <span class=\"text-danger\">{{'last-name-help2'|translate}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row mt-df\"><!--Fila 2-->\r\n <div class=\"form-group col-12 col-md-6\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.phoneNumber.enabled\">\r\n <label class=\"field-label\">{{'phone'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.phoneNumber.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"phoneNumber\"\r\n [formControl]=\"checkoutForm.controls['phoneNumber']\" value=\"\" placeholder=\"\"\r\n autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.phoneNumber.touched && checkoutForm.controls.phoneNumber.errors?.required\">\r\n <span class=\"text-danger\">\r\n\r\n {{'phone-help1'|translate}}\r\n </span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.phoneNumber.touched && checkoutForm.controls.phoneNumber.errors?.pattern\">\r\n <span class=\"text-danger\">\r\n {{'phone-help2'|translate}}\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"form-group col-12 col-md-6\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.email.enabled\">\r\n <label class=\"field-label\">{{'email-address'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.email.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"email\" name=\"email\"\r\n [formControl]=\"checkoutForm.controls['email']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.email.touched && checkoutForm.controls.email.errors?.required\">\r\n <span class=\"text-danger\">\r\n {{'email-address-help1'|translate}}\r\n </span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.email.touched && checkoutForm.controls.email.errors?.email\">\r\n <span class=\"text-danger\">\r\n {{'email-address-help2'|translate}}\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row mt-df\"><!--Fila 3-->\r\n <ng-container *ngIf=\"this.addressingService.getTypeForm().viewForms.countryCode.enabled\">\r\n <div class=\"form-group col-12 col-md-4\" *ngIf=\"(countries$ | async) as countries\">\r\n <label class=\"field-label\">{{'country'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.countryCode.required\"\r\n class=\"required\">*</span></label>\r\n <select class=\"form-select\" name=\"countryCode\"\r\n [formControl]=\"checkoutForm.controls['countryCode']\"\r\n (change)=\"onCountrySelected($event.target.value)\">\r\n <!-- <option selected [value]=\"countries[0].code\">{{ 'choose-country' | translate }}</option> -->\r\n <option *ngFor=\"let country of countries\" [value]=\"country.code\">{{ country.name }}\r\n </option>\r\n </select>\r\n <div *ngIf=\"checkoutForm.controls.countryCode.touched && checkoutForm.controls.countryCode.errors?.required\"\r\n class=\"text text-danger\">\r\n {{'country-help'|translate}}\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"this.addressingService.getTypeForm().viewForms.provinceCode.enabled\">\r\n <div class=\"form-group col-12 col-md-4\" *ngIf=\"(provinces$ | async) as provinces\">\r\n <label class=\"field-label\">{{'state'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.provinceCode.required\"\r\n class=\"required\">*</span></label>\r\n <select class=\"form-select\" name=\"provinceCode\"\r\n (change)=\"onProvincesSelected($event.target.value)\"\r\n [formControl]=\"checkoutForm.controls['provinceCode']\">\r\n <!-- <option selected [value]=\"null\">{{ 'choose-province' | translate }}</option>\r\n -->\r\n <option *ngFor=\"let province of provinces\" [value]=\"province.code\">{{ province.name }}\r\n </option>\r\n </select>\r\n <div *ngIf=\"checkoutForm.controls.provinceCode.touched && checkoutForm.controls.provinceCode.errors?.required\"\r\n class=\"text text-danger\">\r\n {{'state-help'|translate}}\r\n </div>\r\n </div>\r\n </ng-container>\r\n <div class=\"form-group col-12 col-md-4\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.city.enabled\">\r\n <label class=\"field-label\">{{'town-city'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.city.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"city\"\r\n [formControl]=\"checkoutForm.controls['city']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.city.touched && checkoutForm.controls.city.errors?.required\">\r\n <span class=\"text-danger\">{{'town-city-help'|translate}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row mt-df\"><!--Fila 4-->\r\n <div class=\"form-group col-12 col-md-8\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.street.enabled\">\r\n <label class=\"field-label\">{{'address'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.street.required\"\r\n class=\"required\">*</span>\r\n <span class=\"char-count ms-2\" style=\"font-size: 0.9em; color: #888;\">\r\n {{ 50 - (checkoutForm.controls['street'].value?.length || 0) }} {{'remainingCharacters'|translate}}\r\n </span>\r\n </label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"street\"\r\n [formControl]=\"checkoutForm.controls['street']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.street.touched && checkoutForm.controls.street.errors?.required\">\r\n <span class=\"text-danger\">{{'address-help1'|translate}}</span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.street.touched && checkoutForm.controls.street.errors?.maxlength\">\r\n <span class=\"text-danger\">{{'address-help2'|translate}}</span>\r\n </div>\r\n </div>\r\n\r\n <!-- form direcci\u00F3n -->\r\n <div class=\"form-group col-12 col-md-4\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.postcode.enabled\">\r\n <label class=\"field-label\">{{'postal-code'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.postcode.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"postcode\"\r\n [formControl]=\"checkoutForm.controls['postcode']\" value=\"\" placeholder=\"\"\r\n autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.postcode.touched && checkoutForm.controls.postcode.errors?.required\">\r\n <span class=\"text-danger\">{{'postal-code-help'|translate}}</span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.postcode.touched && checkoutForm.controls.postcode.errors?.pattern\">\r\n <span class=\"text-danger\"> {{postalCodeErrorMessage | translate}} </span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row mt-df\"><!--Fila 5-->\r\n <ng-container *ngIf=\"this.addressingService.getTypeForm().viewForms.documentType.enabled\">\r\n <div class=\"form-group col-12 col-md-4\" *ngIf=\"(documentTypes$ | async) as documentTypes\">\r\n <label class=\"field-label\">{{'document-type'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentType.required\"\r\n class=\"required\">*</span></label>\r\n <select name=\"documentType\" class=\"form-select\"\r\n (change)=\"onDocumentTypesSelected($event.target.value)\"\r\n [formControl]=\"checkoutForm.controls['documentType']\">\r\n <!-- <option [value]=\"''\" selected>{{'document-type'|translate}}</option>\r\n -->\r\n <option *ngFor=\"let item of documentTypes\" [value]=\"item.code\">{{item.name}}</option>\r\n </select>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.documentType.touched && checkoutForm.controls.documentType.errors?.required\">\r\n <span class=\"text-danger\">\r\n {{'type-document-help'|translate}}\r\n </span>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <div class=\"form-group col-12 col-md-4\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentNumber.enabled\">\r\n <label class=\"field-label\">{{'document-number'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentNumber.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" [type]=\"'text'\" name=\"documentNumber\"\r\n [formControl]=\"checkoutForm.controls['documentNumber']\" placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.documentNumber.touched && checkoutForm.controls.documentNumber.errors?.required\">\r\n <span class=\"text-danger\">{{ 'document-number-help' | translate }}</span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.documentNumber.touched && checkoutForm.controls.documentNumber.errors?.pattern\">\r\n <span class=\"text-danger\">{{ documentErrorMessage | translate }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row mt-df\" *ngIf=\"this.consts.getChannel() != 'mdj-empresa-a'\"><!--Fila 6-->\r\n <div class=\"form-group col-12 col-md-12\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.enabled\">\r\n\r\n <label class=\"field-label\" *ngIf=\"!getLabelNotesParam()\">{{'notes'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\"\r\n class=\"required\">*</span></label>\r\n <label class=\"field-label\" *ngIf=\"getLabelNotesParam() as labelnotes\"\r\n [innerHTML]=\"labelnotes.value\"><span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\"\r\n class=\"required\">*</span></label>\r\n\r\n <!-- <label class=\"field-label\">{{'notes'|translate}}<span *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\" class=\"required\">*</span></label> -->\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"notes\"\r\n [formControl]=\"checkoutForm.controls['notes']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\r\n </div>\r\n </div>\r\n <div class=\"row mt-df\"><!--Fila 7-->\r\n <div class=\"form-group col-12 col-md-12\">\r\n <label for=\"formFact\"><b>{{ 'same-billing-address' | translate }}</b> <input type=\"checkbox\"\r\n class=\"ms-2\" [checked]=\"viewDataFacturacion\" (change)=\"showFormFacturacion()\"\r\n id=\"formFact\"></label>\r\n </div>\r\n </div>\r\n <div class=\"row mt-df\">\r\n <div class=\"col-12\">\r\n <p>\r\n <!-- <span class=\"required\"></span> -->\r\n <label class=\"required text-underline\">* {{ 'required-fields' | translate }}</label>\r\n </p>\r\n </div>\r\n </div>\r\n <div class=\"row mt-df\">\r\n <div class=\"form-group col-12 col-md-12\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.terms.enabled\">\r\n <span *ngIf=\"this.addressingService.getTypeForm().viewForms.terms.required\"\r\n class=\"required\">*</span>\r\n <label class=\"\" for=\"\"> {{ 'accept-terms' | translate }} <input class=\"ms-2\" name=\"terms\"\r\n [formControl]=\"checkoutForm.controls['terms']\" type=\"checkbox\" required\r\n (change)=\"onInputChange()\" /> </label><br />\r\n <a (click)=\"openModal(template)\" role=\"button\" class=\"ms-3 nota-input text-dark\">{{ 'whats-this'\r\n |\r\n translate }}</a>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.terms.touched && !checkoutForm.controls.terms.value\">\r\n <span class=\"text-danger\">{{ 'must-accept-terms' | translate }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row\" *ngIf=\"viewDataFacturacion ; else datosFormFacturacion\"> </div>\r\n <div class=\"checkout-btn-unique text-end\">\r\n <button type=\"submit\" [disabled]=\"!validado\" class=\"btn valid-btn mt-2\">\r\n {{(isLastOne ? 'finish-checkout' : (allready_data ? 'update' :\r\n 'ready-form')) | translate}}</button>\r\n\r\n\r\n </div>\r\n <div *ngIf=\"loading\" class=\"d-flex flex-column jusitfy-content-center align-items-center\">\r\n <app-loading-full-ec></app-loading-full-ec>\r\n </div>\r\n </form>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-template #addressSelection>\r\n\r\n <ng-container *ngIf=\"this.addressingService.modeSelectAddress == 'ONLY_ADDRESS_SELECTION'\">\r\n <div class=\"checkout-title my-2\">\r\n <h3>{{'address-selection'|translate}}</h3>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"this.addressBook; else addressBookNotResult\">\r\n\r\n <ng-container *ngIf=\"this.addressBook?.length ;else addressBookLoading\">\r\n <div class=\"container\">\r\n <div class=\"row\">\r\n <div class=\"col-sm-6 col-12 my-3\" *ngFor=\"let item of addressBook; let i = index\">\r\n <div class=\"card p-3\">\r\n <input class=\"ms-1 mt-3 form-check-input input-size-lg\" type=\"radio\" [name]=\"'n-'+i\"\r\n [id]=\"i\" [checked]=\"item.selected\" (click)=\"setSelectAddress(item)\"\r\n (change)=\"onInputChange()\">\r\n <div class=\"ms-5\">\r\n <h4 class=\"card-title\">\r\n <strong>{{'address'|translate}}</strong><br>\r\n <span class=\"text-uppercase h3\">{{item.street}}</span>\r\n </h4>\r\n <div class=\"row\">\r\n <h5 class=\"card-subtitle mb-2 text-muted col-auto\">\r\n <strong>{{'country'|translate}}</strong> {{getCountry(item.countryCode)}}\r\n </h5>\r\n <h5 class=\"card-subtitle mb-2 text-muted col-auto\">\r\n <strong>{{'state'|translate}}</strong> {{getProvince(item.provinceCode)}}\r\n </h5>\r\n <h5 class=\"card-subtitle mb-2 text-muted col-auto\">\r\n <strong>{{'town-city'|translate}}</strong> {{item.city}}\r\n </h5>\r\n <h5 class=\"card-subtitle mb-2 text-muted col-auto\">\r\n <strong>{{'postal-code'|translate}}</strong> {{item.postcode}}\r\n </h5>\r\n </div>\r\n <div class=\"row px-3\">\r\n <div class=\"card p-2 bg-light w-100\">\r\n <div class=\"card-body\">\r\n <h5 class=\"card-title\">{{'address-contact'|translate}}</h5>\r\n <h6 class=\"card-subtitle mb-2 text-muted\">\r\n <strong>{{'first-name'|translate}}</strong>\r\n {{item.addressContact.firstName}}\r\n </h6>\r\n <h6 class=\"card-subtitle mb-2 text-muted\">\r\n <strong>{{'last-name'|translate}}</strong>\r\n {{item.addressContact.lastName}}\r\n </h6>\r\n <h6 class=\"card-subtitle mb-2 text-muted\">\r\n <strong>{{'document-type'|translate}}</strong>\r\n {{getDocumentType(item.addressContact.documentType)}}\r\n </h6>\r\n <h6 class=\"card-subtitle mb-2 text-muted\">\r\n <strong>{{'document-number'|translate}}</strong>\r\n {{item.addressContact.documentNumber}}\r\n </h6>\r\n <h6 class=\"card-subtitle mb-2 text-muted\">\r\n <strong>{{'email-address'|translate}}</strong>\r\n {{item.addressContact.email}}\r\n </h6>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n <!-- Se hardcodea el canal de mundo del juguete empresa A ya que se necesita con urgencia, se sustituira por un campo que llegara de backend. -->\r\n <div class=\"w-100\" *ngIf=\"this.consts.getChannel() != 'mdj-empresa-a'\">\r\n <ng-container *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.enabled\">\r\n <div class=\"row mt-df\">\r\n <div class=\"form-group col-12 col-md-12\">\r\n <label class=\"field-label\" *ngIf=\"!getLabelNotesParam()\">{{'notes'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\"\r\n class=\"required\">*</span></label>\r\n <label class=\"field-label\" *ngIf=\"getLabelNotesParam() as labelnotes\"\r\n [innerHTML]=\"labelnotes.value\"></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"notes\"\r\n [(ngModel)]=\"this.addressBookSelected.notes\" #ctrl=\"ngModel\" value=\"\"\r\n placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"invalid-feedback d-block\" *ngIf=\"\r\n addressingService.getTypeForm().viewForms.notes.required\r\n && (!addressBookSelected.notes || !addressBookSelected.notes.trim())\r\n \">\r\n {{ 'required-field' | translate }}\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n <div class=\"checkout-btn-unique text-end\">\r\n <button (click)=\"selectAddress(this.cartService.items)\" class=\"btn valid-btn mt-2\">\r\n {{(isLastOne ? 'finish-checkout' : (allready_data ? 'update' :\r\n 'ready-form')) | translate}}\r\n </button>\r\n </div>\r\n <div *ngIf=\"loading\" class=\"d-flex flex-column jusitfy-content-center align-items-center\">\r\n <app-loading-full-ec></app-loading-full-ec>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n\r\n </ng-template>\r\n\r\n\r\n <ng-template #requireLoginView>\r\n <div id=\"loginCheckout\">\r\n <div class=\"d-flex flex-column jusitfy-content-center align-items-center\" *ngIf=\"require_login\">\r\n <div class=\"col-12\">\r\n <app-login-form-ec (ready)=\"verifyValidate($event)\" [redirect]=\"false\" [title]=\"'need-login'\">\r\n </app-login-form-ec>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n\r\n\r\n <ng-template #datosFormFacturacion>\r\n <div class=\"container-fluid px-0 px-md-2\">\r\n <div class=\"row\">\r\n <div class=\"col-12\">\r\n <div class=\"card \">\r\n <div class=\"card-header text-dark text-center\">\r\n <h3>{{'billing-data'|translate}}</h3>\r\n </div>\r\n <div class=\"card-body\">\r\n <form (submit)=\"verifyValidate()\">\r\n <div class=\"row mt-df\">\r\n <!--Fila 1-->\r\n <div class=\"form-group col-12 col-md-6\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.firstName.enabled\">\r\n <label class=\"field-label\">{{'first-name'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.firstName.required\"\r\n class=\"required\">*</span></label>\r\n <input class=\"form-control\" type=\"text\" name=\"firstName\"\r\n [formControl]=\"checkoutFormFacturacion.controls['firstName']\" value=\"\"\r\n placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.firstName.touched && checkoutFormFacturacion.controls.firstName.errors?.required\">\r\n <span class=\"text-danger\">{{'first-name-help1'|translate}}</span>\r\n\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.firstName.touched && checkoutFormFacturacion.controls.firstName.errors?.pattern\">\r\n <span class=\"text-danger\">\r\n {{'first-name-help2'|translate}}\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"form-group col-12 col-md-6\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.lastName.enabled\">\r\n <label class=\"field-label\">{{'last-name'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.lastName.required\"\r\n class=\"required\">*</span></label>\r\n <input class=\"form-control\" type=\"text\" name=\"lastName\"\r\n [formControl]=\"checkoutFormFacturacion.controls['lastName']\" value=\"\"\r\n placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.lastName.touched && checkoutFormFacturacion.controls.lastName.errors?.required\">\r\n <span class=\"text-danger\">{{'last-name-help1'|translate}}</span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.lastName.touched && checkoutFormFacturacion.controls.lastName.errors?.pattern\">\r\n <span class=\"text-danger\">{{'last-name-help2'|translate}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row mt-df\">\r\n <!--Fila 2-->\r\n <div class=\"form-group col-12 col-md-6\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.phoneNumber.enabled\">\r\n <label class=\"field-label\">{{'phone'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.phoneNumber.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\"\r\n name=\"phoneNumber\"\r\n [formControl]=\"checkoutFormFacturacion.controls['phoneNumber']\" value=\"\"\r\n placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.phoneNumber.touched && checkoutFormFacturacion.controls.phoneNumber.errors?.required\">\r\n <span class=\"text-danger\">\r\n {{'phone-help1'|translate}}\r\n </span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.phoneNumber.touched && checkoutFormFacturacion.controls.phoneNumber.errors?.pattern\">\r\n <span class=\"text-danger\">\r\n {{'phone-help2'|translate}}\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"form-group col-12 col-md-6\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.email.enabled\">\r\n <label class=\"field-label\">{{'email-address'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.email.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"email\" name=\"email\"\r\n [formControl]=\"checkoutFormFacturacion.controls['email']\" value=\"\"\r\n placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.email.touched && checkoutFormFacturacion.controls.email.errors?.required\">\r\n <span class=\"text-danger\">\r\n {{'email-address-help1'|translate}}\r\n </span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.email.touched && checkoutFormFacturacion.controls.email.errors?.email\">\r\n <span class=\"text-danger\">\r\n {{'email-address-help2'|translate}}\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row mt-df\">\r\n <!--Fila 3-->\r\n\r\n <ng-container\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.countryCode.enabled\">\r\n\r\n <div class=\"form-group col-12 col-md-4\"\r\n *ngIf=\"(countriesFacturacion$ | async) as countries\">\r\n <label class=\"field-label\">{{'country'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.countryCode.required\"\r\n class=\"required\">*</span></label>\r\n <select class=\"form-select\" name=\"countryCode\"\r\n [formControl]=\"checkoutFormFacturacion.controls['countryCode']\"\r\n (change)=\"onCountrySelectedFacturacion($event.target.value)\">\r\n <!-- <option selected [value]=\"null\">{{ 'choose-country' | translate }}</option> -->\r\n <option *ngFor=\"let country of countries\" [value]=\"country.code\">\r\n {{ country.name }}</option>\r\n </select>\r\n <div *ngIf=\"checkoutFormFacturacion.controls.countryCode.touched && checkoutFormFacturacion.controls.countryCode.errors?.required\"\r\n class=\"text text-danger\">\r\n {{'country-help'|translate}}\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.provinceCode.enabled\">\r\n\r\n <div class=\"form-group col-12 col-md-4\"\r\n *ngIf=\"(provincesFacturacion$ | async) as provinces\">\r\n <label class=\"field-label\">{{'state'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.provinceCode.required\"\r\n class=\"required\">*</span></label>\r\n <select class=\"form-select\" name=\"provinceCode\"\r\n (change)=\"onProvincesSelectedFacturacion($event.target.value)\"\r\n [formControl]=\"checkoutFormFacturacion.controls['provinceCode']\">\r\n <!-- <option selected [value]=\"null\">{{ 'choose-province' | translate }}</option> -->\r\n <option *ngFor=\"let province of provinces\" [value]=\"province.code\">\r\n {{ province.name }}\r\n </option>\r\n </select>\r\n <div *ngIf=\"checkoutFormFacturacion.controls.provinceCode.touched && checkoutFormFacturacion.controls.provinceCode.errors?.required\"\r\n class=\"text text-danger\">\r\n {{'state-help'|translate}}\r\n </div>\r\n </div>\r\n </ng-container>\r\n <div class=\"form-group col-12 col-md-4\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.city.enabled\">\r\n <label class=\"field-label\">{{'town-city'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.city.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"city\"\r\n [formControl]=\"checkoutFormFacturacion.controls['city']\" value=\"\"\r\n placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.city.touched && checkoutFormFacturacion.controls.city.errors?.required\">\r\n <span class=\"text-danger\">{{'town-city-help'|translate}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row mt-df\">\r\n <!--Fila 4-->\r\n <div class=\"form-group col-12 col-md-8\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.street.enabled\">\r\n <label class=\"field-label\">{{'address'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.street.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"street\"\r\n [formControl]=\"checkoutFormFacturacion.controls['street']\" value=\"\"\r\n placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.street.touched && checkoutFormFacturacion.controls.street.errors?.required\">\r\n <span class=\"text-danger\">{{'address-help1'|translate}}</span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.street.touched && checkoutFormFacturacion.controls.street.errors?.maxlength\">\r\n <span class=\"text-danger\">{{'address-help2'|translate}}</span>\r\n </div>\r\n </div>\r\n <div class=\"form-group col-12 col-md-4\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.postcode.enabled\">\r\n <label class=\"field-label\">{{'postal-code'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.postcode.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\"\r\n name=\"postcode\" [formControl]=\"checkoutFormFacturacion.controls['postcode']\"\r\n value=\"\" placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.postcode.touched && checkoutFormFacturacion.controls.postcode.errors?.required\">\r\n <span class=\"text-danger\">{{'postal-code-help'|translate}}</span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.postcode.touched && checkoutFormFacturacion.controls.postcode.errors?.pattern\">\r\n <span class=\"text-danger\">{{postalCodeErrorMessage |translate}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row mt-df\">\r\n <!--Fila 5-->\r\n <ng-container\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentType.enabled\">\r\n <div class=\"form-group col-12 col-md-4\"\r\n *ngIf=\"(documentTypesFacturacion$ | async) as documentTypes\">\r\n <label class=\"field-label\">{{'document-type'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentType.required\"\r\n class=\"required\">*</span></label>\r\n <select name=\"documentType\" class=\"form-select\"\r\n [formControl]=\"checkoutFormFacturacion.controls['documentType']\"\r\n (change)=\"onDocumentTypesSelectedFacturacion($event.target.value)\">\r\n <!-- <option [value]=\"''\" selected>{{'document-type'|translate}}</option> -->\r\n <option *ngFor=\"let item of documentTypes\" [value]=\"item.code\">\r\n {{item.name}}</option>\r\n </select>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.documentType.touched && checkoutFormFacturacion.controls.documentType.errors?.required\">\r\n <span class=\"text-danger\">\r\n {{'type-document-help'|translate}}\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"form-group col-12 col-md-4\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentNumber.enabled\">\r\n <label class=\"field-label\">{{'document-number'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentNumber.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" [type]=\"'text'\"\r\n name=\"documentNumber\"\r\n [formControl]=\"checkoutFormFacturacion.controls['documentNumber']\"\r\n placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.documentNumber.touched && checkoutFormFacturacion.controls.documentNumber.errors?.required\">\r\n <span class=\"text-danger\">\r\n {{'document-number-help'|translate}}\r\n </span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.documentNumber.touched && checkoutFormFacturacion.controls.documentNumber.errors?.pattern\">\r\n <span class=\"text-danger\">{{ documentErrorMessage | translate }}</span>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n <div class=\"row mt-df\" *ngIf=\"this.consts.getChannel() != 'mdj-empresa-a'\">\r\n <div class=\"form-group col-12 col-md-12\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.enabled\">\r\n <label class=\"field-label\"\r\n *ngIf=\"!getLabelNotesParam()\">{{'notes'|translate}} <span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\"\r\n class=\"required\">*</span></label>\r\n <label class=\"field-label\" *ngIf=\"getLabelNotesParam() as labelNotesHtml\">\r\n <div [innerHTML]=\"labelNotesHtml\"></div>\r\n <span *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\"\r\n class=\"required\">*</span>\r\n </label>\r\n\r\n <!-- <label class=\"field-label\">{{'notes'|translate}}<span *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\" class=\"required\">*</span></label> -->\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"notes\"\r\n [formControl]=\"checkoutFormFacturacion.controls['notes']\" value=\"\"\r\n placeholder=\"\" autocomplete=\"off\">\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n\r\n\r\n <ng-template #template>\r\n <div class=\"modal-content\">\r\n <div class=\"modal-header\">\r\n <button type=\"button\" class=\"btn-close float-end\" aria-label=\"Close\" (click)=\"modalRef.hide()\">\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <div class=\"modal-body scrol-if\">\r\n <app-section-container-ec [name]=\"'terminos-y-condiciones'\"> </app-section-container-ec>\r\n </div>\r\n\r\n </ng-template>\r\n\r\n\r\n <ng-template #addressBookNotResult>\r\n <div class=\"container\">\r\n <div class=\"row\">\r\n <div class=\"col-12 text-center my-2\">\r\n <h4> {{'address-book-not-result' | translate }} </h4>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #addressBookLoading>\r\n <div class=\"container\">\r\n <div class=\"row\">\r\n <div class=\"col-12 text-center my-2\">\r\n <div class=\"d-flex flex-column jusitfy-content-center align-items-center\">\r\n <app-loading-full-ec></app-loading-full-ec>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n</ng-container>\r\n\r\n<ng-template #pleaseLogin>\r\n <div class=\"container\">\r\n <p>Por favor <a [routerLink]=\"['/auth/login']\"> Inicie Sesi\u00F3n</a></p>\r\n </div>\r\n</ng-template>",
|
|
8555
8584
|
providers: [modal.BsModalService],
|
|
8556
8585
|
styles: [".mt-df{margin:10px auto 0}.btn.btn-outline-secondary.active,.btn.btn-outline-secondary:hover{color:#fff!important}.required{color:red}.field-label{color:#000}.btn.valid-btn{background-color:#000;color:#fff;margin-right:-3px;margin-bottom:10px}label{color:#000}.input-size-lg{width:1.8rem;height:1.8rem}"]
|
|
8557
8586
|
})
|
|
@@ -9193,9 +9222,6 @@
|
|
|
9193
9222
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
9194
9223
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
9195
9224
|
};
|
|
9196
|
-
var __param$7 = (this && this.__param) || function (paramIndex, decorator) {
|
|
9197
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
9198
|
-
};
|
|
9199
9225
|
var __read$5 = (this && this.__read) || function (o, n) {
|
|
9200
9226
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
9201
9227
|
if (!m) return o;
|
|
@@ -9218,7 +9244,7 @@
|
|
|
9218
9244
|
};
|
|
9219
9245
|
var CollectionEcComponent = /** @class */ (function (_super) {
|
|
9220
9246
|
__extends$n(CollectionEcComponent, _super);
|
|
9221
|
-
function CollectionEcComponent(productsService, paramsSrv, activeRoute, optionsService, authService, analyticsService, cartService, consts, filtersService
|
|
9247
|
+
function CollectionEcComponent(productsService, paramsSrv, activeRoute, optionsService, authService, analyticsService, cartService, consts, filtersService) {
|
|
9222
9248
|
var _this = _super.call(this) || this;
|
|
9223
9249
|
_this.productsService = productsService;
|
|
9224
9250
|
_this.paramsSrv = paramsSrv;
|
|
@@ -9229,21 +9255,12 @@
|
|
|
9229
9255
|
_this.cartService = cartService;
|
|
9230
9256
|
_this.consts = consts;
|
|
9231
9257
|
_this.filtersService = filtersService;
|
|
9232
|
-
_this.router = router;
|
|
9233
9258
|
_this.filters = [];
|
|
9234
9259
|
_this.filtersConfig = { filters: [] };
|
|
9235
9260
|
_this.finished = false;
|
|
9236
9261
|
_this.loading = true;
|
|
9237
9262
|
_this.breadcrumb = [];
|
|
9238
9263
|
_this.isCollection = true;
|
|
9239
|
-
_this.usingCachedProducts = false;
|
|
9240
|
-
_this.allCachedProducts = [];
|
|
9241
|
-
_this.subscriptionsConfigured = false;
|
|
9242
|
-
_this.isScrolling = false;
|
|
9243
|
-
_this.pendingScrollPosition = null;
|
|
9244
|
-
_this.expectedProductCount = 0;
|
|
9245
|
-
_this.filtersFromCache = false; // Flag para indicar si los filtros vienen del cache
|
|
9246
|
-
_this.isCategoryChange = false; // Flag para indicar si es un cambio de categoría
|
|
9247
9264
|
_this.productsWithUniqueVariant = false;
|
|
9248
9265
|
_this.optionsFilters = ['all'];
|
|
9249
9266
|
/**
|
|
@@ -9314,117 +9331,26 @@
|
|
|
9314
9331
|
_this.getObjectWithVariant = function () {
|
|
9315
9332
|
return _this.consts.getParamsProductsWithUniqueVariant();
|
|
9316
9333
|
};
|
|
9317
|
-
// Método personalizado para manejar selección de filtros que invalidará cache
|
|
9318
|
-
_this.customSetFilterSelected = function (filter, filterElement) {
|
|
9319
|
-
// Invalidar cache completamente cuando se selecciona un filtro
|
|
9320
|
-
_this.usingCachedProducts = false;
|
|
9321
|
-
_this.allCachedProducts = [];
|
|
9322
|
-
_this.filtersFromCache = false; // Ya no usamos filtros del cache
|
|
9323
|
-
_this.isCategoryChange = true; // Marcar como cambio para reemplazar productos
|
|
9324
|
-
CollectionEcComponent_1.stateCache.delete(_this.stateKey);
|
|
9325
|
-
console.log('🔄 Filtro seleccionado, invalidando cache y recargando desde endpoint para:', _this.stateKey);
|
|
9326
|
-
// Solo limpiar productos, NO limpiar filtros para que no desaparezcan
|
|
9327
|
-
_this.products = [];
|
|
9328
|
-
_this.loading = true;
|
|
9329
|
-
// Llamar al método original del ProductsService que iniciará una carga completa
|
|
9330
|
-
var result = _this.productsService.setFilterSelected(filter, filterElement);
|
|
9331
|
-
// La suscripción principal automáticamente actualizará los filtros
|
|
9332
|
-
// porque filtersFromCache = false y usingCachedProducts = false
|
|
9333
|
-
return result;
|
|
9334
|
-
};
|
|
9335
9334
|
_this.paramsSrv.parameters.subscribe(function (param) { return _this.params = param; });
|
|
9336
9335
|
_this.defaultFilters = _this.consts.getDefaultFilters();
|
|
9337
9336
|
_this.filtersConfig.filters = _this.consts.getFilterConfig();
|
|
9338
9337
|
_this.productsService.filtersInView$.subscribe(function (res) { return _this.filterInView = res; });
|
|
9339
|
-
// Inicializar propiedades de scroll y cache
|
|
9340
|
-
_this.platformId = platformId;
|
|
9341
|
-
_this.isRestoringState = false;
|
|
9342
|
-
_this.usingCachedProducts = false;
|
|
9343
|
-
_this.allCachedProducts = [];
|
|
9344
|
-
_this.subscriptionsConfigured = false;
|
|
9345
|
-
_this.isScrolling = false;
|
|
9346
|
-
_this.pendingScrollPosition = null;
|
|
9347
|
-
_this.expectedProductCount = 0;
|
|
9348
|
-
_this.filtersFromCache = false;
|
|
9349
9338
|
_this.ecOnConstruct();
|
|
9350
9339
|
return _this;
|
|
9351
9340
|
}
|
|
9352
|
-
CollectionEcComponent_1 = CollectionEcComponent;
|
|
9353
9341
|
CollectionEcComponent.prototype.ngOnInit = function () {
|
|
9354
|
-
|
|
9355
|
-
|
|
9356
|
-
|
|
9357
|
-
|
|
9358
|
-
// NO llamar window.scroll(0, 0) para preservar posición
|
|
9359
|
-
this.products = [];
|
|
9360
|
-
this.ecOnInit();
|
|
9361
|
-
this.getProductsAndSubscribe(); // Llamar directamente
|
|
9362
|
-
}
|
|
9363
|
-
else {
|
|
9364
|
-
// Comportamiento normal con scroll al inicio
|
|
9365
|
-
window.scroll(0, 0);
|
|
9366
|
-
this.products = [];
|
|
9367
|
-
this.ecOnInit();
|
|
9368
|
-
this.getProductsAndSubscribe();
|
|
9369
|
-
}
|
|
9370
|
-
// Configurar manejo de estado
|
|
9371
|
-
this.setupBeforeUnloadHandler();
|
|
9342
|
+
window.scroll(0, 0);
|
|
9343
|
+
this.products = [];
|
|
9344
|
+
this.ecOnInit();
|
|
9345
|
+
this.getProductsAndSubscribe();
|
|
9372
9346
|
};
|
|
9373
9347
|
CollectionEcComponent.prototype.getProductsAndSubscribe = function () {
|
|
9374
|
-
// Verificar PRIMERO si hay estado guardado
|
|
9375
|
-
var savedState = CollectionEcComponent_1.stateCache.get(this.stateKey);
|
|
9376
|
-
if (savedState && savedState.products.length > 0) {
|
|
9377
|
-
console.log('📦 Restaurando desde cache:', savedState.products.length, 'productos');
|
|
9378
|
-
// Configurar modo cache ANTES de restaurar
|
|
9379
|
-
this.usingCachedProducts = true;
|
|
9380
|
-
this.allCachedProducts = __spread$4(savedState.products);
|
|
9381
|
-
this.isRestoringState = true;
|
|
9382
|
-
// Restaurar productos inmediatamente
|
|
9383
|
-
this.products = __spread$4(savedState.products);
|
|
9384
|
-
this.finished = savedState.finished;
|
|
9385
|
-
this.loading = false;
|
|
9386
|
-
// Restaurar filtros si están disponibles
|
|
9387
|
-
if (savedState.filters) {
|
|
9388
|
-
this.filters = __spread$4(savedState.filters);
|
|
9389
|
-
this.filtersFromCache = true; // Marcar que estos filtros vienen del cache
|
|
9390
|
-
console.log('📦 Filtros restaurados desde cache:', this.filters.length);
|
|
9391
|
-
}
|
|
9392
|
-
if (savedState.filters_top) {
|
|
9393
|
-
this.filters_top = __spread$4(savedState.filters_top);
|
|
9394
|
-
console.log('📦 Filtros top restaurados desde cache:', this.filters_top.length);
|
|
9395
|
-
}
|
|
9396
|
-
if (savedState.breadcrumb) {
|
|
9397
|
-
this.breadcrumb = __spread$4(savedState.breadcrumb);
|
|
9398
|
-
console.log('📦 Breadcrumb restaurado desde cache:', this.breadcrumb);
|
|
9399
|
-
}
|
|
9400
|
-
// IMPORTANTE: Configurar TODAS las suscripciones del padre (filtros, breadcrumb, etc.)
|
|
9401
|
-
// pero SIN resetear productos ni hacer petición inicial
|
|
9402
|
-
this.setupParentSubscriptionsOnly();
|
|
9403
|
-
// Configurar suscripción personalizada para detectar cambios de categoría
|
|
9404
|
-
this.setupCustomSubscription();
|
|
9405
|
-
this.subscriptionsConfigured = true;
|
|
9406
|
-
// Restaurar scroll después de que los productos se rendericen
|
|
9407
|
-
this.waitForProductRendering(savedState.scrollPosition);
|
|
9408
|
-
return;
|
|
9409
|
-
}
|
|
9410
|
-
console.log('🔄 No hay cache, carga normal');
|
|
9411
|
-
// Si no hay estado guardado, comportamiento normal
|
|
9412
|
-
this.usingCachedProducts = false;
|
|
9413
|
-
this.allCachedProducts = [];
|
|
9414
|
-
this.filtersFromCache = false; // No hay filtros del cache
|
|
9415
|
-
// Llamar al comportamiento original
|
|
9416
|
-
this.originalGetProductsAndSubscribe();
|
|
9417
|
-
this.subscriptionsConfigured = true;
|
|
9418
|
-
};
|
|
9419
|
-
CollectionEcComponent.prototype.originalGetProductsAndSubscribe = function () {
|
|
9420
9348
|
var _this = this;
|
|
9421
9349
|
rxjs.combineLatest([this.activeRoute.params, this.optionsService.ready, this.activeRoute.queryParams]).subscribe(function (_a) {
|
|
9422
9350
|
var _b = __read$5(_a, 3), params = _b[0], ready = _b[1], queryParams = _b[2];
|
|
9423
9351
|
if (ready.readyAll) {
|
|
9424
9352
|
var cambio_1 = false;
|
|
9425
9353
|
_this.products = [];
|
|
9426
|
-
// Marcar como cambio de categoría para la carga inicial
|
|
9427
|
-
_this.isCategoryChange = true;
|
|
9428
9354
|
if (!params['type'] || !params['value']) {
|
|
9429
9355
|
_this.productsService.getProductsForFilter({ latest: true, limit: 10 }, _this.optionsFilters, queryParams.search, _this.defaultFilters);
|
|
9430
9356
|
}
|
|
@@ -9455,16 +9381,7 @@
|
|
|
9455
9381
|
}
|
|
9456
9382
|
else {
|
|
9457
9383
|
res = _this.productsService.getProductsWithUniqueVariant(res, _this.getObjectWithVariant());
|
|
9458
|
-
|
|
9459
|
-
var existingIds_1 = new Set(_this.products.map(function (p) { return p.id; }));
|
|
9460
|
-
var uniqueProducts = res.filter(function (p) { return !existingIds_1.has(p.id); });
|
|
9461
|
-
if (uniqueProducts.length > 0) {
|
|
9462
|
-
console.log('➕ CollectionEC (variants): Agregando', uniqueProducts.length, 'de', res.length, 'productos únicos');
|
|
9463
|
-
(_a = _this.products).push.apply(_a, __spread$4(uniqueProducts));
|
|
9464
|
-
}
|
|
9465
|
-
else {
|
|
9466
|
-
console.log('⚠️ CollectionEC (variants): Todos los productos ya existen - ignorando', res.length, 'productos');
|
|
9467
|
-
}
|
|
9384
|
+
(_a = _this.products).push.apply(_a, __spread$4(res));
|
|
9468
9385
|
_this.applyFiltersInView();
|
|
9469
9386
|
}
|
|
9470
9387
|
;
|
|
@@ -9476,16 +9393,7 @@
|
|
|
9476
9393
|
cambio_1 = false;
|
|
9477
9394
|
}
|
|
9478
9395
|
else {
|
|
9479
|
-
|
|
9480
|
-
var existingIds_2 = new Set(_this.products.map(function (p) { return p.id; }));
|
|
9481
|
-
var uniqueProducts = res.filter(function (p) { return !existingIds_2.has(p.id); });
|
|
9482
|
-
if (uniqueProducts.length > 0) {
|
|
9483
|
-
console.log('➕ CollectionEC: Agregando', uniqueProducts.length, 'de', res.length, 'productos únicos');
|
|
9484
|
-
(_b = _this.products).push.apply(_b, __spread$4(uniqueProducts));
|
|
9485
|
-
}
|
|
9486
|
-
else {
|
|
9487
|
-
console.log('⚠️ CollectionEC: Todos los productos ya existen - ignorando', res.length, 'productos');
|
|
9488
|
-
}
|
|
9396
|
+
(_b = _this.products).push.apply(_b, __spread$4(res));
|
|
9489
9397
|
_this.applyFiltersInView();
|
|
9490
9398
|
}
|
|
9491
9399
|
}
|
|
@@ -9502,145 +9410,6 @@
|
|
|
9502
9410
|
}
|
|
9503
9411
|
});
|
|
9504
9412
|
};
|
|
9505
|
-
CollectionEcComponent.prototype.setupParentSubscriptionsOnly = function () {
|
|
9506
|
-
var _this = this;
|
|
9507
|
-
var _a;
|
|
9508
|
-
// Desuscribir cualquier suscripción anterior
|
|
9509
|
-
try {
|
|
9510
|
-
(_a = this.suscripcion) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
9511
|
-
}
|
|
9512
|
-
catch (e) { }
|
|
9513
|
-
// IMPORTANTE: Configurar suscripción a productos para navegación posterior
|
|
9514
|
-
this.suscripcion = this.productsService.products$.subscribe(function (res) {
|
|
9515
|
-
var _a, _b;
|
|
9516
|
-
var _c;
|
|
9517
|
-
console.log('📦 Suscripción products$ (desde cache):', (_c = res) === null || _c === void 0 ? void 0 : _c.length, 'productos');
|
|
9518
|
-
_this.loading = false;
|
|
9519
|
-
if (res && res.length > 0) {
|
|
9520
|
-
// Si estamos usando cache, agregar solo productos nuevos únicos
|
|
9521
|
-
if (_this.usingCachedProducts) {
|
|
9522
|
-
var existingIds_3 = new Set(_this.products.map(function (p) { return p.id; }));
|
|
9523
|
-
var uniqueProducts = res.filter(function (p) { return !existingIds_3.has(p.id); });
|
|
9524
|
-
if (uniqueProducts.length > 0) {
|
|
9525
|
-
console.log('➕ Cache: Agregando', uniqueProducts.length, 'productos adicionales');
|
|
9526
|
-
(_a = _this.products).push.apply(_a, __spread$4(uniqueProducts));
|
|
9527
|
-
_this.usingCachedProducts = false; // Ya no solo cache
|
|
9528
|
-
}
|
|
9529
|
-
}
|
|
9530
|
-
else {
|
|
9531
|
-
// Determinar si es cambio de categoría o scroll infinito
|
|
9532
|
-
if (_this.isCategoryChange) {
|
|
9533
|
-
// Cambio de categoría: reemplazar completamente
|
|
9534
|
-
console.log('🔄 Cambio de categoría: Reemplazando productos completamente');
|
|
9535
|
-
if (_this.productsWithUniqueVariant) {
|
|
9536
|
-
_this.products = _this.productsService.getProductsWithUniqueVariant(res, _this.getObjectWithVariant());
|
|
9537
|
-
}
|
|
9538
|
-
else {
|
|
9539
|
-
_this.products = res;
|
|
9540
|
-
}
|
|
9541
|
-
_this.applyFiltersInView();
|
|
9542
|
-
_this.isCategoryChange = false; // Resetear bandera
|
|
9543
|
-
}
|
|
9544
|
-
else {
|
|
9545
|
-
// Scroll infinito: agregar productos únicos
|
|
9546
|
-
console.log('📜 Scroll infinito: Agregando productos únicos');
|
|
9547
|
-
var existingIds_4 = new Set(_this.products.map(function (p) { return p.id; }));
|
|
9548
|
-
var newProducts = res;
|
|
9549
|
-
if (_this.productsWithUniqueVariant) {
|
|
9550
|
-
newProducts = _this.productsService.getProductsWithUniqueVariant(res, _this.getObjectWithVariant());
|
|
9551
|
-
}
|
|
9552
|
-
var uniqueProducts = newProducts.filter(function (p) { return !existingIds_4.has(p.id); });
|
|
9553
|
-
if (uniqueProducts.length > 0) {
|
|
9554
|
-
console.log('➕ Agregando', uniqueProducts.length, 'productos únicos por scroll');
|
|
9555
|
-
(_b = _this.products).push.apply(_b, __spread$4(uniqueProducts));
|
|
9556
|
-
}
|
|
9557
|
-
else {
|
|
9558
|
-
console.log('⚠️ Todos los productos del scroll ya existen');
|
|
9559
|
-
}
|
|
9560
|
-
_this.applyFiltersInView();
|
|
9561
|
-
}
|
|
9562
|
-
}
|
|
9563
|
-
}
|
|
9564
|
-
else if (res && res.length === 0) {
|
|
9565
|
-
// Si recibimos array vacío y no estamos usando cache, limpiar productos
|
|
9566
|
-
if (!_this.usingCachedProducts) {
|
|
9567
|
-
_this.products = [];
|
|
9568
|
-
}
|
|
9569
|
-
}
|
|
9570
|
-
_this.finished = _this.productsService.isFinished();
|
|
9571
|
-
_this.analyticsService.callEvent('view_item_list', { products: _this.products, item_list_name: 'Collection', item_list_id: 0 });
|
|
9572
|
-
});
|
|
9573
|
-
// Configurar suscripciones de filtros
|
|
9574
|
-
this.productsService.filters$.subscribe(function (res) {
|
|
9575
|
-
// IMPORTANTE: Solo actualizar filtros si NO vienen del cache
|
|
9576
|
-
if (!_this.filtersFromCache) {
|
|
9577
|
-
console.log('🔄 Actualizando filtros desde server');
|
|
9578
|
-
_this.breadcrumb = _this.optionsService.getBreadcrumbByFilters(res);
|
|
9579
|
-
_this.filters = _this.getSpecificFilters(res, _this.filtersConfig.filters);
|
|
9580
|
-
_this.filters_top = _this.getSpecificFilters(res, ['sort']);
|
|
9581
|
-
}
|
|
9582
|
-
else {
|
|
9583
|
-
console.log('🚫 Saltando actualización de filtros (usando cache)');
|
|
9584
|
-
// Una vez que han sido utilizados, resetear el flag
|
|
9585
|
-
_this.filtersFromCache = false;
|
|
9586
|
-
}
|
|
9587
|
-
});
|
|
9588
|
-
this.productsService.finished().subscribe(function (res) { return _this.finished = res; });
|
|
9589
|
-
};
|
|
9590
|
-
CollectionEcComponent.prototype.setupCustomSubscription = function () {
|
|
9591
|
-
var _this = this;
|
|
9592
|
-
// Suscripción personalizada para detectar cambios de categoría/búsqueda
|
|
9593
|
-
rxjs.combineLatest([this.activeRoute.params, this.optionsService.ready, this.activeRoute.queryParams]).subscribe(function (_a) {
|
|
9594
|
-
var _b = __read$5(_a, 3), params = _b[0], ready = _b[1], queryParams = _b[2];
|
|
9595
|
-
if (ready.readyAll && _this.subscriptionsConfigured) {
|
|
9596
|
-
var currentKey = _this.generateStateKey();
|
|
9597
|
-
// Si la clave cambió, significa que navegamos a una categoría diferente
|
|
9598
|
-
if (currentKey !== _this.stateKey) {
|
|
9599
|
-
console.log('🔄 Cambio de categoría detectado, invalidando cache y recargando');
|
|
9600
|
-
_this.stateKey = currentKey;
|
|
9601
|
-
// Limpiar cache y recargar normalmente
|
|
9602
|
-
_this.invalidateCache();
|
|
9603
|
-
_this.usingCachedProducts = false;
|
|
9604
|
-
_this.allCachedProducts = [];
|
|
9605
|
-
_this.filtersFromCache = false;
|
|
9606
|
-
// IMPORTANTE: Marcar que es cambio de categoría y resetear estado
|
|
9607
|
-
_this.isCategoryChange = true;
|
|
9608
|
-
_this.loading = true;
|
|
9609
|
-
_this.products = [];
|
|
9610
|
-
// Recargar normalmente - pero solo la petición, no reconfigurar suscripciones
|
|
9611
|
-
_this.loadNewCategory(params, queryParams);
|
|
9612
|
-
}
|
|
9613
|
-
}
|
|
9614
|
-
});
|
|
9615
|
-
};
|
|
9616
|
-
CollectionEcComponent.prototype.loadNewCategory = function (params, queryParams) {
|
|
9617
|
-
// Hacer solo la petición de productos sin reconfigurar todas las suscripciones
|
|
9618
|
-
var cambio = false;
|
|
9619
|
-
if (!params['type'] || !params['value']) {
|
|
9620
|
-
this.productsService.getProductsForFilter({ latest: true, limit: 10 }, this.optionsFilters, queryParams.search, this.defaultFilters);
|
|
9621
|
-
}
|
|
9622
|
-
else {
|
|
9623
|
-
this.productsService.getProductsForFilter({ type: params.type, value: params.value }, this.optionsFilters, queryParams.search, this.defaultFilters);
|
|
9624
|
-
cambio = true;
|
|
9625
|
-
this.type = params['type'];
|
|
9626
|
-
this.value = params['value'];
|
|
9627
|
-
}
|
|
9628
|
-
console.log('🔄 Nueva petición enviada para categoría:', params.type, params.value);
|
|
9629
|
-
};
|
|
9630
|
-
CollectionEcComponent.prototype.generateStateKey = function () {
|
|
9631
|
-
// Incluir ruta y parámetros para generar clave única
|
|
9632
|
-
var route = this.router.url.split('?')[0]; // Sin query params
|
|
9633
|
-
var params = this.activeRoute.snapshot.params;
|
|
9634
|
-
return route + "_" + JSON.stringify(params);
|
|
9635
|
-
};
|
|
9636
|
-
CollectionEcComponent.prototype.invalidateCache = function () {
|
|
9637
|
-
// Limpiar cache específico y sessionStorage
|
|
9638
|
-
console.log('🗑️ Invalidando cache para:', this.stateKey);
|
|
9639
|
-
CollectionEcComponent_1.stateCache.delete(this.stateKey);
|
|
9640
|
-
if (common.isPlatformBrowser(this.platformId)) {
|
|
9641
|
-
sessionStorage.removeItem("collection_scroll_" + this.stateKey);
|
|
9642
|
-
}
|
|
9643
|
-
};
|
|
9644
9413
|
CollectionEcComponent.prototype.onScroll = function () {
|
|
9645
9414
|
this.loading = true;
|
|
9646
9415
|
if (!this.productsService.isWaiting() && !this.productsService.getNext()) {
|
|
@@ -9648,187 +9417,6 @@
|
|
|
9648
9417
|
this.loading = false;
|
|
9649
9418
|
}
|
|
9650
9419
|
};
|
|
9651
|
-
// Métodos de ciclo de vida requeridos
|
|
9652
|
-
CollectionEcComponent.prototype.ngAfterViewChecked = function () {
|
|
9653
|
-
var _this = this;
|
|
9654
|
-
// Solo verificar si hay un scroll pendiente
|
|
9655
|
-
if (this.pendingScrollPosition !== null && common.isPlatformBrowser(this.platformId)) {
|
|
9656
|
-
var productElements = document.querySelectorAll('.col-lg-3, .col-md-4, .col-6, [class*="product"], .product-item, .card');
|
|
9657
|
-
var currentProductCount = productElements.length;
|
|
9658
|
-
// Verificar si se han renderizado suficientes productos
|
|
9659
|
-
if (currentProductCount >= Math.min(this.expectedProductCount, 10)) {
|
|
9660
|
-
var targetPosition_1 = this.pendingScrollPosition;
|
|
9661
|
-
this.pendingScrollPosition = null; // Limpiar para evitar loops
|
|
9662
|
-
// Usar requestAnimationFrame para asegurar que el rendering esté completo
|
|
9663
|
-
requestAnimationFrame(function () {
|
|
9664
|
-
requestAnimationFrame(function () {
|
|
9665
|
-
_this.restoreScrollWithRetries(targetPosition_1);
|
|
9666
|
-
_this.isRestoringState = false;
|
|
9667
|
-
});
|
|
9668
|
-
});
|
|
9669
|
-
}
|
|
9670
|
-
}
|
|
9671
|
-
};
|
|
9672
|
-
CollectionEcComponent.prototype.ngOnDestroy = function () {
|
|
9673
|
-
var _a;
|
|
9674
|
-
(_a = this.routerSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
9675
|
-
this.saveCurrentState();
|
|
9676
|
-
// Limpiar scroll pendiente
|
|
9677
|
-
this.pendingScrollPosition = null;
|
|
9678
|
-
// Limpiar event listeners
|
|
9679
|
-
if (this.clickHandler) {
|
|
9680
|
-
document.removeEventListener('click', this.clickHandler);
|
|
9681
|
-
}
|
|
9682
|
-
};
|
|
9683
|
-
// Métodos de manejo de scroll y cache
|
|
9684
|
-
CollectionEcComponent.prototype.setupBeforeUnloadHandler = function () {
|
|
9685
|
-
var _this = this;
|
|
9686
|
-
if (common.isPlatformBrowser(this.platformId)) {
|
|
9687
|
-
// Interceptar clics en productos para guardar estado
|
|
9688
|
-
this.clickHandler = function (event) {
|
|
9689
|
-
var target = event.target;
|
|
9690
|
-
// Buscar si el clic es en un enlace a producto
|
|
9691
|
-
var link = target.closest('a[href*="/product/"]');
|
|
9692
|
-
if (link && _this.router.url.includes('/collection/')) {
|
|
9693
|
-
console.log('🎯 Clic en producto detectado, guardando estado');
|
|
9694
|
-
_this.saveCurrentState();
|
|
9695
|
-
}
|
|
9696
|
-
};
|
|
9697
|
-
document.addEventListener('click', this.clickHandler);
|
|
9698
|
-
// Guardar durante scroll en la página de colección
|
|
9699
|
-
var scrollTimer_1;
|
|
9700
|
-
window.addEventListener('scroll', function () {
|
|
9701
|
-
// Solo guardar si estamos en una página de colección
|
|
9702
|
-
if (_this.router.url.includes('/collection/')) {
|
|
9703
|
-
clearTimeout(scrollTimer_1);
|
|
9704
|
-
scrollTimer_1 = setTimeout(function () { return _this.saveCurrentState(); }, 300);
|
|
9705
|
-
}
|
|
9706
|
-
});
|
|
9707
|
-
// Guardar antes de que el usuario salga de la página
|
|
9708
|
-
window.addEventListener('beforeunload', function () {
|
|
9709
|
-
if (_this.router.url.includes('/collection/')) {
|
|
9710
|
-
_this.saveCurrentState();
|
|
9711
|
-
}
|
|
9712
|
-
});
|
|
9713
|
-
}
|
|
9714
|
-
};
|
|
9715
|
-
CollectionEcComponent.prototype.saveCurrentState = function () {
|
|
9716
|
-
if (common.isPlatformBrowser(this.platformId) && this.products && this.products.length > 0) {
|
|
9717
|
-
// Obtener posición de scroll de múltiples fuentes
|
|
9718
|
-
var scrollPos = Math.max(window.pageYOffset || 0, document.documentElement.scrollTop || 0, document.body.scrollTop || 0);
|
|
9719
|
-
// Solo guardar si tenemos una posición significativa o productos suficientes
|
|
9720
|
-
if (scrollPos > 10 || this.products.length > 10) {
|
|
9721
|
-
var state = {
|
|
9722
|
-
products: __spread$4(this.products),
|
|
9723
|
-
scrollPosition: scrollPos,
|
|
9724
|
-
finished: this.finished,
|
|
9725
|
-
loading: this.loading,
|
|
9726
|
-
page: Math.ceil(this.products.length / 10),
|
|
9727
|
-
allCachedProducts: this.usingCachedProducts ? __spread$4(this.allCachedProducts) : __spread$4(this.products),
|
|
9728
|
-
filters: this.filters ? __spread$4(this.filters) : undefined,
|
|
9729
|
-
filters_top: this.filters_top ? __spread$4(this.filters_top) : undefined,
|
|
9730
|
-
breadcrumb: this.breadcrumb ? __spread$4(this.breadcrumb) : undefined
|
|
9731
|
-
};
|
|
9732
|
-
CollectionEcComponent_1.stateCache.set(this.stateKey, state);
|
|
9733
|
-
// También guardar en sessionStorage como backup
|
|
9734
|
-
try {
|
|
9735
|
-
sessionStorage.setItem("collection_scroll_" + this.stateKey, scrollPos.toString());
|
|
9736
|
-
sessionStorage.setItem("collection_products_" + this.stateKey, this.products.length.toString());
|
|
9737
|
-
}
|
|
9738
|
-
catch (e) { }
|
|
9739
|
-
}
|
|
9740
|
-
}
|
|
9741
|
-
};
|
|
9742
|
-
CollectionEcComponent.prototype.restoreScrollWithRetries = function (targetPosition) {
|
|
9743
|
-
var _this = this;
|
|
9744
|
-
if (this.isScrolling) {
|
|
9745
|
-
return;
|
|
9746
|
-
}
|
|
9747
|
-
// Verificar si el target es mayor que la altura del documento
|
|
9748
|
-
var documentHeight = document.documentElement.scrollHeight;
|
|
9749
|
-
if (targetPosition > documentHeight) {
|
|
9750
|
-
targetPosition = Math.max(0, documentHeight - window.innerHeight);
|
|
9751
|
-
}
|
|
9752
|
-
// Solo verificar si el usuario ha hecho scroll muy lejos
|
|
9753
|
-
var currentPos = window.pageYOffset || document.documentElement.scrollTop;
|
|
9754
|
-
if (currentPos > 500 && Math.abs(currentPos - targetPosition) > 1000) {
|
|
9755
|
-
return;
|
|
9756
|
-
}
|
|
9757
|
-
this.isScrolling = true;
|
|
9758
|
-
// Intentar encontrar una posición más precisa basada en elementos del DOM
|
|
9759
|
-
var improvedPosition = this.tryScrollToProductByIndex(targetPosition);
|
|
9760
|
-
if (improvedPosition !== targetPosition) {
|
|
9761
|
-
targetPosition = improvedPosition;
|
|
9762
|
-
}
|
|
9763
|
-
var attempts = 0;
|
|
9764
|
-
var maxAttempts = 15;
|
|
9765
|
-
var tryScroll = function () {
|
|
9766
|
-
attempts++;
|
|
9767
|
-
// Usar scroll más agresivo si es necesario
|
|
9768
|
-
if (attempts < 3) {
|
|
9769
|
-
// Primeros intentos con smooth
|
|
9770
|
-
window.scrollTo({
|
|
9771
|
-
top: targetPosition,
|
|
9772
|
-
behavior: 'smooth'
|
|
9773
|
-
});
|
|
9774
|
-
}
|
|
9775
|
-
else {
|
|
9776
|
-
// Intentos posteriores más directos
|
|
9777
|
-
window.scrollTo(0, targetPosition);
|
|
9778
|
-
document.documentElement.scrollTop = targetPosition;
|
|
9779
|
-
document.body.scrollTop = targetPosition;
|
|
9780
|
-
}
|
|
9781
|
-
// Verificar después de un momento
|
|
9782
|
-
setTimeout(function () {
|
|
9783
|
-
var currentPos = window.pageYOffset || document.documentElement.scrollTop;
|
|
9784
|
-
var difference = Math.abs(currentPos - targetPosition);
|
|
9785
|
-
if (difference > 50 && attempts < maxAttempts) {
|
|
9786
|
-
var delay = attempts < 5 ? 100 : attempts < 10 ? 200 : 300;
|
|
9787
|
-
setTimeout(tryScroll, delay);
|
|
9788
|
-
}
|
|
9789
|
-
else {
|
|
9790
|
-
_this.isScrolling = false; // Liberar flag cuando termine
|
|
9791
|
-
}
|
|
9792
|
-
}, 100);
|
|
9793
|
-
};
|
|
9794
|
-
// Intentar solo una vez inicialmente
|
|
9795
|
-
tryScroll();
|
|
9796
|
-
};
|
|
9797
|
-
CollectionEcComponent.prototype.tryScrollToProductByIndex = function (targetPosition) {
|
|
9798
|
-
// Intentar calcular a qué producto corresponde la posición
|
|
9799
|
-
var approximateIndex = Math.floor(targetPosition / 400); // Asumiendo ~400px por producto
|
|
9800
|
-
// Buscar elementos de producto
|
|
9801
|
-
var productElements = document.querySelectorAll('.col-lg-3, .col-md-4, .col-6, [class*="product"], .product-item, .card');
|
|
9802
|
-
if (productElements.length > approximateIndex && approximateIndex >= 0) {
|
|
9803
|
-
var targetElement = productElements[approximateIndex];
|
|
9804
|
-
var elementPosition = targetElement.offsetTop;
|
|
9805
|
-
// Usar la posición del elemento si es razonable
|
|
9806
|
-
if (Math.abs(elementPosition - targetPosition) < 800) {
|
|
9807
|
-
return elementPosition;
|
|
9808
|
-
}
|
|
9809
|
-
}
|
|
9810
|
-
return targetPosition; // Usar posición original si no encuentra elemento adecuado
|
|
9811
|
-
};
|
|
9812
|
-
CollectionEcComponent.prototype.waitForProductRendering = function (targetPosition) {
|
|
9813
|
-
var _this = this;
|
|
9814
|
-
var _a;
|
|
9815
|
-
// Configurar el scroll pendiente para que ngAfterViewChecked lo maneje
|
|
9816
|
-
this.pendingScrollPosition = targetPosition;
|
|
9817
|
-
this.expectedProductCount = ((_a = this.products) === null || _a === void 0 ? void 0 : _a.length) || 0;
|
|
9818
|
-
// Timeout de seguridad en caso de que ngAfterViewChecked no se ejecute
|
|
9819
|
-
setTimeout(function () {
|
|
9820
|
-
if (_this.pendingScrollPosition !== null) {
|
|
9821
|
-
var targetPos = _this.pendingScrollPosition;
|
|
9822
|
-
_this.pendingScrollPosition = null;
|
|
9823
|
-
_this.restoreScrollWithRetries(targetPos);
|
|
9824
|
-
_this.isRestoringState = false;
|
|
9825
|
-
}
|
|
9826
|
-
}, 2000);
|
|
9827
|
-
};
|
|
9828
|
-
var CollectionEcComponent_1;
|
|
9829
|
-
// Propiedades para scroll y cache
|
|
9830
|
-
CollectionEcComponent.stateCache = new Map();
|
|
9831
|
-
CollectionEcComponent.maxCacheSize = 10;
|
|
9832
9420
|
CollectionEcComponent.ctorParameters = function () { return [
|
|
9833
9421
|
{ type: ProductsService },
|
|
9834
9422
|
{ type: ParametersService },
|
|
@@ -9838,9 +9426,7 @@
|
|
|
9838
9426
|
{ type: AnalyticsService },
|
|
9839
9427
|
{ type: CartService },
|
|
9840
9428
|
{ type: Constants },
|
|
9841
|
-
{ type: FiltersService }
|
|
9842
|
-
{ type: router.Router },
|
|
9843
|
-
{ type: Object, decorators: [{ type: core.Inject, args: [core.PLATFORM_ID,] }] }
|
|
9429
|
+
{ type: FiltersService }
|
|
9844
9430
|
]; };
|
|
9845
9431
|
__decorate$V([
|
|
9846
9432
|
core.Input()
|
|
@@ -9854,13 +9440,12 @@
|
|
|
9854
9440
|
__decorate$V([
|
|
9855
9441
|
core.Input()
|
|
9856
9442
|
], CollectionEcComponent.prototype, "optionsFilters", void 0);
|
|
9857
|
-
CollectionEcComponent =
|
|
9443
|
+
CollectionEcComponent = __decorate$V([
|
|
9858
9444
|
core.Component({
|
|
9859
9445
|
selector: 'app-collection-ec',
|
|
9860
9446
|
template: "\r\n<div>\r\n <div class=\"collection\">\r\n <ng-content select=\"[collection]\"> </ng-content>\r\n </div>\r\n\r\n <div class=\"all\">\r\n <ng-content select=\"[all]\"> </ng-content>\r\n </div>\r\n</div>\r\n\r\n<app-blocks-ec [section]=\"'collection'\"></app-blocks-ec>",
|
|
9861
9447
|
styles: [".h1-custom{color:#00f}"]
|
|
9862
|
-
})
|
|
9863
|
-
__param$7(10, core.Inject(core.PLATFORM_ID))
|
|
9448
|
+
})
|
|
9864
9449
|
], CollectionEcComponent);
|
|
9865
9450
|
return CollectionEcComponent;
|
|
9866
9451
|
}(ComponentHelper));
|
|
@@ -10011,7 +9596,7 @@
|
|
|
10011
9596
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
10012
9597
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
10013
9598
|
};
|
|
10014
|
-
var __param$
|
|
9599
|
+
var __param$7 = (this && this.__param) || function (paramIndex, decorator) {
|
|
10015
9600
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
10016
9601
|
};
|
|
10017
9602
|
/** @dynamic */
|
|
@@ -10212,7 +9797,7 @@
|
|
|
10212
9797
|
template: "",
|
|
10213
9798
|
styles: [""]
|
|
10214
9799
|
}),
|
|
10215
|
-
__param$
|
|
9800
|
+
__param$7(1, core.Inject(common.DOCUMENT))
|
|
10216
9801
|
], FiltersEcComponent);
|
|
10217
9802
|
return FiltersEcComponent;
|
|
10218
9803
|
}(ComponentHelper));
|
|
@@ -10236,7 +9821,7 @@
|
|
|
10236
9821
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
10237
9822
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
10238
9823
|
};
|
|
10239
|
-
var __param$
|
|
9824
|
+
var __param$8 = (this && this.__param) || function (paramIndex, decorator) {
|
|
10240
9825
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
10241
9826
|
};
|
|
10242
9827
|
/** @dynamic */
|
|
@@ -10325,7 +9910,7 @@
|
|
|
10325
9910
|
template: "",
|
|
10326
9911
|
styles: [".min-width-large{min-width:150px}"]
|
|
10327
9912
|
}),
|
|
10328
|
-
__param$
|
|
9913
|
+
__param$8(1, core.Inject(common.DOCUMENT))
|
|
10329
9914
|
], FiltersTopEcComponent);
|
|
10330
9915
|
return FiltersTopEcComponent;
|
|
10331
9916
|
}(ComponentHelper));
|
|
@@ -10902,11 +10487,28 @@
|
|
|
10902
10487
|
this.getCurrencyListApi = function () { return 'shop-api/currencies'; };
|
|
10903
10488
|
this.getConvertibilityApi = function (baseCurrency, targetCurrency) { return 'shop-api/currencies?baseCurrency=' + baseCurrency + '&targetCurrency=' + targetCurrency; };
|
|
10904
10489
|
/**
|
|
10905
|
-
* @description Se carga la moneda por defecto.
|
|
10490
|
+
* @description Se carga la moneda por defecto con metadatos (símbolo, posición, decimales).
|
|
10906
10491
|
*/
|
|
10907
|
-
this.loadDefaultCurrency = function (
|
|
10908
|
-
|
|
10909
|
-
_this.
|
|
10492
|
+
this.loadDefaultCurrency = function (currencyCode) {
|
|
10493
|
+
// Trae la lista igual para tener la configuración completa
|
|
10494
|
+
_this.connection.get(_this.getCurrencyListApi()).toPromise().then(function (list) {
|
|
10495
|
+
var _a;
|
|
10496
|
+
_this.currencyListSubject.next(list);
|
|
10497
|
+
_this.consts.setCurrencyTypeConfig(list);
|
|
10498
|
+
var cfg = (_a = list) === null || _a === void 0 ? void 0 : _a.find(function (c) { return c.code === currencyCode; });
|
|
10499
|
+
if (cfg) {
|
|
10500
|
+
// Setea moneda activa con su configuración completa
|
|
10501
|
+
_this.consts.setCurrency(cfg.code, cfg);
|
|
10502
|
+
}
|
|
10503
|
+
else {
|
|
10504
|
+
_this.consts.setCurrency(currencyCode);
|
|
10505
|
+
}
|
|
10506
|
+
_this.load();
|
|
10507
|
+
}).catch(function () {
|
|
10508
|
+
// En caso de error, al menos fijá el código para no romper el flujo
|
|
10509
|
+
_this.consts.setCurrency(currencyCode);
|
|
10510
|
+
_this.load();
|
|
10511
|
+
});
|
|
10910
10512
|
};
|
|
10911
10513
|
/**
|
|
10912
10514
|
* @description calcula la convetibilidad del precio pasado por paramentro segun esta formula:
|
|
@@ -10928,12 +10530,32 @@
|
|
|
10928
10530
|
});
|
|
10929
10531
|
}); };
|
|
10930
10532
|
/**
|
|
10931
|
-
*
|
|
10533
|
+
* Carga la lista de monedas desde la API y registra la configuración completa en `Constants`.
|
|
10534
|
+
*
|
|
10535
|
+
* Si no existe una moneda activa guardada en `localStorage`, inicializa la moneda activa
|
|
10536
|
+
* tomando la moneda base del canal (`ChannelConfigService.baseCurrency`) y sus metadatos
|
|
10537
|
+
* obtenidos de la lista (símbolo, posición, decimales). Si no se encuentra la base en la
|
|
10538
|
+
* lista, usa la primera disponible.
|
|
10539
|
+
*
|
|
10540
|
+
* Finalmente, llama a `load()` para propagar la configuración a los observables y (si aplica)
|
|
10541
|
+
* actualizar `localStorage`.
|
|
10542
|
+
*
|
|
10543
|
+
* @sideEffect Actualiza `currencyList$`, `Constants.setCurrencyTypeConfig` y potencialmente
|
|
10544
|
+
* `Constants.setCurrency`.
|
|
10545
|
+
* @returns void
|
|
10932
10546
|
*/
|
|
10933
10547
|
this.loadCurrencyList = function () {
|
|
10934
10548
|
_this.connection.get(_this.getCurrencyListApi()).toPromise().then(function (res) {
|
|
10549
|
+
var _a, _b, _c, _d;
|
|
10935
10550
|
_this.currencyListSubject.next(res);
|
|
10936
10551
|
_this.consts.setCurrencyTypeConfig(res);
|
|
10552
|
+
var stored = localStorage.getItem('currency');
|
|
10553
|
+
if (!stored) {
|
|
10554
|
+
var base_1 = (_a = _this.injector.get(ChannelConfigService).getActiveChannel()) === null || _a === void 0 ? void 0 : _a.baseCurrency;
|
|
10555
|
+
var cfg = (_c = (_b = res) === null || _b === void 0 ? void 0 : _b.find(function (c) { return c.code === base_1; }), (_c !== null && _c !== void 0 ? _c : (_d = res) === null || _d === void 0 ? void 0 : _d[0]));
|
|
10556
|
+
if (cfg)
|
|
10557
|
+
_this.consts.setCurrency(cfg.code, cfg);
|
|
10558
|
+
}
|
|
10937
10559
|
_this.load();
|
|
10938
10560
|
});
|
|
10939
10561
|
};
|
|
@@ -11019,7 +10641,6 @@
|
|
|
11019
10641
|
}
|
|
11020
10642
|
};
|
|
11021
10643
|
this.injector.get(ChannelConfigService).channelConfig$.subscribe(function (channel) {
|
|
11022
|
-
console.log(channel);
|
|
11023
10644
|
channel.applyCurrencyExchange ? _this.loadCurrencyList() : _this.loadDefaultCurrency(channel.baseCurrency);
|
|
11024
10645
|
console.log(_this.enableApplyCurrencyExchange);
|
|
11025
10646
|
});
|
|
@@ -11587,6 +11208,22 @@
|
|
|
11587
11208
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
11588
11209
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
11589
11210
|
};
|
|
11211
|
+
var __read$7 = (this && this.__read) || function (o, n) {
|
|
11212
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
11213
|
+
if (!m) return o;
|
|
11214
|
+
var i = m.call(o), r, ar = [], e;
|
|
11215
|
+
try {
|
|
11216
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
11217
|
+
}
|
|
11218
|
+
catch (error) { e = { error: error }; }
|
|
11219
|
+
finally {
|
|
11220
|
+
try {
|
|
11221
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
11222
|
+
}
|
|
11223
|
+
finally { if (e) throw e.error; }
|
|
11224
|
+
}
|
|
11225
|
+
return ar;
|
|
11226
|
+
};
|
|
11590
11227
|
var ProductDetailEcComponent = /** @class */ (function (_super) {
|
|
11591
11228
|
__extends$w(ProductDetailEcComponent, _super);
|
|
11592
11229
|
function ProductDetailEcComponent(productService, consts, activedRoute, cartService, optionsService, productsService, analyticsService, router, toastrService, meta, injector) {
|
|
@@ -11612,9 +11249,11 @@
|
|
|
11612
11249
|
_this.showReviews = false;
|
|
11613
11250
|
_this.hidePrices = false;
|
|
11614
11251
|
_this.creditAccountShowPrices = null;
|
|
11252
|
+
_this.enableFieldNotesInArticleFile = false;
|
|
11615
11253
|
_this.addToCart = function () {
|
|
11616
11254
|
var _a;
|
|
11617
|
-
|
|
11255
|
+
var note = ((_a = _this.comments) === null || _a === void 0 ? void 0 : _a.trim()) || null;
|
|
11256
|
+
_this.quantity > 0 && _this.productService.addToCart(_this.quantity, undefined, note);
|
|
11618
11257
|
};
|
|
11619
11258
|
_this.addAllProductosToCart = function () {
|
|
11620
11259
|
var _a, _b;
|
|
@@ -11720,9 +11359,10 @@
|
|
|
11720
11359
|
_this.changeImgFocus(productParam.picturesdefault[0]);
|
|
11721
11360
|
});
|
|
11722
11361
|
_this.injector.get(ChannelConfigService).channelConfig$.subscribe(function (channel) {
|
|
11723
|
-
var _a, _b;
|
|
11362
|
+
var _a, _b, _c, _d;
|
|
11724
11363
|
_this.showReviews = channel.showReviews;
|
|
11725
11364
|
_this.hidePrices = (_b = (_a = channel) === null || _a === void 0 ? void 0 : _a.hidePrices, (_b !== null && _b !== void 0 ? _b : false));
|
|
11365
|
+
_this.enableFieldNotesInArticleFile = (_d = (_c = channel) === null || _c === void 0 ? void 0 : _c.enableFieldNotesInArticleFile, (_d !== null && _d !== void 0 ? _d : false));
|
|
11726
11366
|
});
|
|
11727
11367
|
_this.cartService.showPrice$.subscribe(function (showPrice) {
|
|
11728
11368
|
_this.creditAccountShowPrices = showPrice;
|
|
@@ -11737,7 +11377,31 @@
|
|
|
11737
11377
|
return cadena.replace(expresionRegular, '');
|
|
11738
11378
|
};
|
|
11739
11379
|
ProductDetailEcComponent.prototype.ngOnInit = function () {
|
|
11380
|
+
var _this = this;
|
|
11740
11381
|
this.ecOnInit();
|
|
11382
|
+
// Prellenar comentarios cuando:
|
|
11383
|
+
// - cargue el producto
|
|
11384
|
+
// - cambie la variante seleccionada (asociatedData$)
|
|
11385
|
+
// - cambien los ítems del carrito
|
|
11386
|
+
this.prefillSub = rxjs.combineLatest([
|
|
11387
|
+
this.productService.product$.pipe(operators.filter(function (p) { return !!p && !!p.id; })),
|
|
11388
|
+
this.productService.asociatedData$.pipe(operators.startWith(null)),
|
|
11389
|
+
this.cartService.cartItems.pipe(operators.startWith([])),
|
|
11390
|
+
]).subscribe(function (_a) {
|
|
11391
|
+
var _b = __read$7(_a, 3), product = _b[0], data = _b[1], items = _b[2];
|
|
11392
|
+
var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
11393
|
+
var variantId = (_k = (_f = (_d = (_c = data) === null || _c === void 0 ? void 0 : _c.variantCode, (_d !== null && _d !== void 0 ? _d : (_e = data) === null || _e === void 0 ? void 0 : _e.variant_id)), (_f !== null && _f !== void 0 ? _f : (_j = (_h = (_g = product) === null || _g === void 0 ? void 0 : _g.variants) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.code)), (_k !== null && _k !== void 0 ? _k : null));
|
|
11394
|
+
var match = (_l = items) === null || _l === void 0 ? void 0 : _l.find(function (it) {
|
|
11395
|
+
var _a, _b, _c, _d;
|
|
11396
|
+
return ((_b = (_a = it) === null || _a === void 0 ? void 0 : _a.product) === null || _b === void 0 ? void 0 : _b.id) === ((_c = product) === null || _c === void 0 ? void 0 : _c.id) &&
|
|
11397
|
+
(variantId ? ((_d = it) === null || _d === void 0 ? void 0 : _d.variant_id) === variantId : true);
|
|
11398
|
+
});
|
|
11399
|
+
_this.comments = (_o = (_m = match) === null || _m === void 0 ? void 0 : _m.comments, (_o !== null && _o !== void 0 ? _o : ''));
|
|
11400
|
+
});
|
|
11401
|
+
};
|
|
11402
|
+
ProductDetailEcComponent.prototype.ngOnDestroy = function () {
|
|
11403
|
+
var _a;
|
|
11404
|
+
(_a = this.prefillSub) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
11741
11405
|
};
|
|
11742
11406
|
ProductDetailEcComponent.prototype.scroll = function () {
|
|
11743
11407
|
var el = this.contact.nativeElement;
|
|
@@ -11886,7 +11550,6 @@
|
|
|
11886
11550
|
ProductEcComponent.prototype.ngOnChanges = function () {
|
|
11887
11551
|
};
|
|
11888
11552
|
ProductEcComponent.prototype.selectItem = function (product) {
|
|
11889
|
-
console.log('entro');
|
|
11890
11553
|
this.analyticsService.callEvent('select_item', product);
|
|
11891
11554
|
};
|
|
11892
11555
|
ProductEcComponent.ctorParameters = function () { return [
|
|
@@ -12407,7 +12070,7 @@
|
|
|
12407
12070
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
12408
12071
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
12409
12072
|
};
|
|
12410
|
-
var __param$
|
|
12073
|
+
var __param$9 = (this && this.__param) || function (paramIndex, decorator) {
|
|
12411
12074
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12412
12075
|
};
|
|
12413
12076
|
var SellerDashboardContainerEcComponent = /** @class */ (function (_super) {
|
|
@@ -12524,7 +12187,7 @@
|
|
|
12524
12187
|
template: "<section *ngIf=\"user\" id=\"seller-dashboard\">\r\n <div class=\"section-content mt-5 mb-2 tablaVendedores\">\r\n <div class=\"container-xl\">\r\n <div class=\"row\">\r\n <main class=\"col-md-12\">\r\n\r\n <ul *ngIf=\"hasHeader()\" class=\"nav nav-tabs\">\r\n <li class=\"nav-item col-12 col-lg-2\">\r\n <a *ngIf=\"hasUIComponent('HEADER_TAB')\" class=\"nav-link active cursor-pointer px-4\"\r\n aria-current=\"page\">\r\n {{ 'my-clients' | translate }}\r\n </a>\r\n </li>\r\n <li class=\"ms-auto row\">\r\n <div\r\n class=\"d-flex justify-content-end justify-content-lg-end justify-content-xl-end col-12 col-md-12 col-lg-auto\">\r\n <ng-container *ngIf=\"hasUIComponent('GENERATE_BUDGET_BTN') \">\r\n <a *ngIf=\"authService.getCustomer()?.id; else withoutCustomer\"\r\n [routerLink]=\"'/collection'\"\r\n class=\"btn btn-seller-primary text-white btnGestionar d-flex align-items-center\"><i\r\n class=\"bi bi-file-earmark me-2 mr-2\"></i>{{ 'generate-budget' | translate }}\r\n </a>\r\n <ng-template #withoutCustomer>\r\n <a class=\"btn btn-seller-primary text-white btnGestionar d-flex align-items-center\"\r\n (click)=\"toastrService.show('must-select-customer')\">\r\n <i class=\"bi bi-file-earmark me-2 mr-2\"></i>{{ 'generate-budget' | translate\r\n }}\r\n </a>\r\n </ng-template>\r\n </ng-container>\r\n <a *ngIf=\"hasUIComponent('MANAGE_ORDERS_BTN')\"\r\n (click)=\"navigateExternal(constants.getUrlBase())\"\r\n class=\"btn btn-seller-primary text-white btnGestionar d-flex align-items-center me- me-lg-4 mr- mr-lg-4\"><i\r\n class=\"bi bi-archive-fill me-2 mr-2\"></i>{{ 'manage-orders' | translate }}</a>\r\n </div>\r\n <div class=\"d-flex camposVendedores col-12 col-md-12 col-lg-auto justify-content-end\">\r\n <select *ngIf=\"hasUIComponent('SORT_SELECT')\" id=\"customerSort\" name=\"customerSort\"\r\n (change)=\"sortCustomers($event.target.value)\" class=\"mb-1 ordenarVendedores form-select\">\r\n <option selected hidden disabled>{{ 'order-by' | translate }}</option>\r\n <option value='asc_firstName'>{{ 'client' | translate }} (A-Z)</option>\r\n <option value='desc_firstName'>{{ 'client' | translate }} (Z-A)</option>\r\n <option value='asc_id'>Menor a Mayor c\u00F3digo</option>\r\n <option value='desc_id'>Mayor a Menor c\u00F3digo</option>\r\n </select>\r\n <form *ngIf=\"hasUIComponent('SEARCH_FORM')\"\r\n class=\"col-lg-auto mb-lg-0 d-flex ms-3 ml-3 d-flex buscadorVendedores\">\r\n <input type=\"text\" name=\"searchInput\" class=\"form-control\"\r\n placeholder=\"{{ 'search' | translate }}\" [(ngModel)]=\"searchInput\"\r\n (keyup.enter)=\"updateCustomers()\">\r\n <button class=\"btn btn-primary ms-1 ml-1 bg-white border-dark btnSearch\"><i\r\n class=\"bi bi-search text-dark\" (click)=\"updateCustomers()\"></i></button>\r\n </form>\r\n </div>\r\n </li>\r\n </ul>\r\n\r\n <ng-container *ngIf=\"user.customers?.length; else noCustomers\">\r\n\r\n <article class=\"card card-body mb-1 carritoProductoHeader m-0 py-0 mt-4\">\r\n <div class=\"row align-items-center font-bold border-bottom\">\r\n <div class=\"col-3 col-md-2 text-left\">\r\n <small>{{ 'code' | translate | uppercase }}</small>\r\n </div>\r\n <div class=\"col-5 col-md-3 mb-md-0\">\r\n <small>{{ 'client' | translate | uppercase }}</small>\r\n </div>\r\n <div class=\"col-4 col-md-3 text-left d-none d-md-block\">\r\n <small>{{ 'user' | translate | uppercase }}</small>\r\n </div>\r\n <div class=\"col-4 col-md-2 text-left\">\r\n <small>{{ 'new-orders' | translate | uppercase }}</small>\r\n </div>\r\n <div class=\"col-2 col-md-2 text-left d-none d-md-block\">\r\n <small></small>\r\n </div>\r\n\r\n </div>\r\n </article>\r\n\r\n <article *ngFor=\"let customer of filteredCustomers\" [class]=\"'card card-body mb-3 cadaVendedor ' + (isActive(customer) ? 'activo':'')\">\r\n <div class=\"row d-flex align-items-center\">\r\n <div class=\"col-3 col-md-2 text-left ps-2 pl-2\">\r\n <div class=\"price h6 pb-0 mb-0 ps-3 pl-1\">\r\n {{ customer.managementSystemInternalCode || 'n/a' }}\r\n </div>\r\n </div>\r\n <div class=\"col-5 col-md-3 text-left\">\r\n <div class=\"price h6 fw-normal ps-2 pl-2 pb-0 mb-0\">\r\n {{ customer.firstName }} {{ customer.lastName }}\r\n <p class=\"d-block d-md-none fs-6 mt-1 mb-0 p-0 userMobile\">\r\n {{ customer.email }}\r\n </p>\r\n </div>\r\n </div>\r\n <div class=\"col-4 col-md-3 text-left d-none d-md-block\">\r\n <div class=\"price h6 fw-normal pb-0 mb-0 ps-2 pl-2\">\r\n {{ customer.email }}\r\n </div>\r\n </div>\r\n <div class=\"col-4 col-md-2 text-left ps-2 pl-2\">\r\n <div *ngIf=\"true\" class=\"contNumero\">\r\n {{ customer.ordersNotApproved }}\r\n </div>\r\n </div>\r\n <div class=\"col-12 col-md-2 btnIngresar\">\r\n\r\n <ng-container\r\n *ngIf=\"authService.getCustomer()?.id == customer.id; else noActiveCustomer\">\r\n <a (click)=\"changeCustomer(null)\"\r\n class=\"btn btn-seller-primary justify-content-center\">\r\n <i class=\"bi bi-box-arrow-left me-2 mr-2\"></i>\r\n <small class=\"me-2 mr-2 d-none d-md-block\">\r\n {{ 'exit' | translate | uppercase }}\r\n </small>\r\n </a>\r\n </ng-container>\r\n <ng-template #noActiveCustomer>\r\n <a (click)=\"changeCustomer(customer)\"\r\n class=\"btn btn-seller-primary justify-content-center\">\r\n <i class=\"bi bi-box-arrow-in-right me-2 mr-2\"></i>\r\n <small class=\"me-2 mr-2 d-none d-md-block\">\r\n {{ 'operate-as' | translate | uppercase }}\r\n </small>\r\n </a>\r\n </ng-template>\r\n\r\n </div>\r\n </div>\r\n </article>\r\n\r\n </ng-container>\r\n\r\n </main>\r\n </div>\r\n </div>\r\n </div>\r\n</section>\r\n\r\n<ng-template #noCustomers>\r\n <h4 class=\"text-center p-5\">{{ 'no-customers' | translate }}</h4>\r\n</ng-template>",
|
|
12525
12188
|
styles: ["#seller-dashboard{--seller-dashboard-primary-color:0,0,0}.btn-seller-primary{color:#fff!important;background-color:rgba(var(--seller-dashboard-primary-color),1)!important;border-color:rgba(var(--seller-dashboard-primary-color),1)!important}.btn-seller-primary:hover{background-color:rgba(var(--seller-dashboard-primary-color),.9)!important}.btn-seller-primary:active{background-color:rgba(var(--seller-dashboard-primary-color),.8)!important}.btnGestionar{padding:6px 12px!important;height:36px;display:flex;align-items:center;justify-content:center;margin-left:10px}.ordenarVendedores{width:150px!important;color:#8b8b8b!important;background-color:#fff;border:1px solid #b6b6b6!important;border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px}.buscadorVendedores{margin-bottom:4px!important}.buscadorVendedores input{border:1px solid #b6b6b6!important;width:200px}.buscadorVendedores .btnSearch{border:1px solid #b6b6b6!important;padding:.375rem .75rem;font-size:1rem}.buscadorVendedores .btnSearch:focus{background-color:#fff!important}.carritoProductoHeader{border:none!important}.carritoProductoHeader small{font-size:13px}.cadaVendedor{padding:5px 0;margin-bottom:0!important;border:none!important;border-bottom:1px solid #ccc!important;border-radius:0!important;-webkit-border-radius:0}.cadaVendedor .btnIngresar a{padding:10px!important;border-width:1px!important;border-style:solid!important;display:flex;align-items:center;width:100%!important;margin-left:auto;color:#fff}.cadaVendedor .btnIngresar .contNumero{background-color:#eee;width:20px;height:20px;color:#000;font-size:13px;display:flex;align-items:center;justify-content:center;font-weight:600;border-radius:20px;-webkit-border-radius:20px;-moz-border-radius:20px;-ms-border-radius:20px;-o-border-radius:20px}.userMobile{font-size:14px!important;font-style:italic!important}.cadaVendedor .btnIngresar a:hover{background-color:rgba(var(--seller-dashboard-primary-color),.85)}.cadaVendedor .btnIngresar a:active{background-color:rgba(var(--seller-dashboard-primary-color),.8)}.cursor-pointer{cursor:pointer}.font-bold{font-weight:700}.border-bottom{border-bottom:1px solid #000!important}@media screen and (max-width:1200px){.btnGestionar{font-size:12px}}@media screen and (max-width:992px){.camposVendedores{justify-content:flex-end;margin-top:8px;margin-bottom:4px}}@media all and (max-width:768px){.ordenarVendedores{width:140px!important}.buscadorVendedores input{width:140px}.cadaVendedor .btnIngresar a{width:70px!important}}@media all and (max-width:576px){.tablaVendedores .nav-tabs .nav-link{font-size:13px;padding:6px!important}.btnGestionar{padding:6px 8px!important;font-size:13px;height:36px;display:flex;align-items:center;justify-content:center;margin-top:3px;margin-left:10px}.buscadorVendedores input,.ordenarVendedores{font-size:13px}}.fs-6{font-size:1rem!important}.cadaVendedor.activo{background-color:#eee}"]
|
|
12526
12189
|
}),
|
|
12527
|
-
__param$
|
|
12190
|
+
__param$9(3, core.Inject('env'))
|
|
12528
12191
|
], SellerDashboardContainerEcComponent);
|
|
12529
12192
|
return SellerDashboardContainerEcComponent;
|
|
12530
12193
|
}(ComponentHelper));
|
|
@@ -13131,8 +12794,8 @@
|
|
|
13131
12794
|
PriceEcComponent = __decorate$1f([
|
|
13132
12795
|
core.Component({
|
|
13133
12796
|
selector: 'app-price-ec',
|
|
13134
|
-
template: "<!-- Si hay templates personalizados, se proyectan -->\r\n<ng-container *ngIf=\"customSalePriceTemplate || customPriceTemplate; else defaultPriceBlock\">\r\n <ng-container *ngTemplateOutlet=\"customPriceTemplate || defaultPriceBlock\"></ng-container>\r\n</ng-container>\r\n\r\n<ng-template #defaultPriceBlock>\r\n <div *ngIf=\"saleprice; else onlyprice\" class=\"line-height-custom\">\r\n <div [class]=\"(priceSize ? 'price-sm' : 'price')\"\r\n *ngIf=\"price && price.split(' - ').length > 1; else simplePriceDel\">\r\n <del class=\"tachado\">\r\n {{ price.split(' - ')[0] | ecCurrencySymbol }}\r\n {{ price.split(' - ')[1] | ecCurrencySymbol }}\r\n </del>\r\n </div>\r\n <div [class]=\"(priceSize ? 'price-sm' : 'price')\"\r\n *ngIf=\"saleprice && saleprice.split(' - ').length > 1; else simpleSalePrice\">\r\n {{ saleprice.split(' - ')[0] | ecCurrencySymbol }}\r\n {{ saleprice.split(' - ')[1] | ecCurrencySymbol }}\r\n </div>\r\n </div>\r\n\r\n <ng-template #onlyprice>\r\n <div [class]=\"(priceSize ? 'price-sm' : 'price')\"\r\n *ngIf=\"price && price.split(' - ').length > 1; else simplePrice\">\r\n {{ price.split(' - ')[0] | ecCurrencySymbol }} -\r\n {{ price.split(' - ')[1] | ecCurrencySymbol }}\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #simplePrice>\r\n <ng-container *ngIf=\"customSimplePriceTemplate; else fallbackSimplePrice\">\r\n <ng-container *ngTemplateOutlet=\"customSimplePriceTemplate\"></ng-container>\r\n </ng-container>\r\n </ng-template>\r\n\r\n <ng-template #fallbackSimplePrice>\r\n <div [class]=\"'uno line-height-custom ' + (priceSize ? 'price-sm' : 'price')\">\r\n {{ price | ecCurrencySymbol }}\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #simplePriceDel>\r\n <div [class]=\"'dos line-height-custom ' + (priceSize ? 'price-sm' : 'price')\">\r\n <span class=\"lnth\">{{ price | ecCurrencySymbol }}</span>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #simpleSalePrice>\r\n <ng-container *ngIf=\"customSimpleSalePriceTemplate; else fallbackSimpleSalePrice\">\r\n <ng-container *ngTemplateOutlet=\"customSimpleSalePriceTemplate\"></ng-container>\r\n </ng-container>\r\n </ng-template>\r\n\r\n <ng-template #fallbackSimpleSalePrice>\r\n <div [class]=\"'tres line-height-custom ' + (priceSize ? 'price-sm' : 'price')\">\r\n {{ saleprice | ecCurrencySymbol }}\r\n </div>\r\n </ng-template>\r\n</ng-template>\r\n\r\n<!-- Secci\u00F3n de impuestos -->\r\n<ng-container *ngIf=\"shouldShowTaxes\">\r\n <ng-container *ngIf=\"showTaxLegendOnly; else detailedTaxBlock\">\r\n <ng-container *ngIf=\"customOnlyTaxLabelTemplate; else defaultOnlyTaxLabelBlock\">\r\n <ng-container *ngTemplateOutlet=\"customOnlyTaxLabelTemplate\"></ng-container>\r\n </ng-container>\r\n <ng-template #defaultOnlyTaxLabelBlock>\r\n <p class=\"taxes-title\">{{'price-without-national-taxes' | translate }}: {{ basePrice | ecCurrencySymbol }}
|
|
13135
|
-
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}"]
|
|
12797
|
+
template: "<!-- Si hay templates personalizados, se proyectan -->\r\n<ng-container *ngIf=\"customSalePriceTemplate || customPriceTemplate; else defaultPriceBlock\">\r\n <ng-container *ngTemplateOutlet=\"customPriceTemplate || defaultPriceBlock\"></ng-container>\r\n</ng-container>\r\n\r\n<ng-template #defaultPriceBlock>\r\n <div *ngIf=\"saleprice; else onlyprice\" class=\"line-height-custom\">\r\n <div [class]=\"(priceSize ? 'price-sm' : 'price')\"\r\n *ngIf=\"price && price.split(' - ').length > 1; else simplePriceDel\">\r\n <del class=\"tachado\">\r\n {{ price.split(' - ')[0] | ecCurrencySymbol }}\r\n {{ price.split(' - ')[1] | ecCurrencySymbol }}\r\n </del>\r\n </div>\r\n <div [class]=\"(priceSize ? 'price-sm' : 'price')\"\r\n *ngIf=\"saleprice && saleprice.split(' - ').length > 1; else simpleSalePrice\">\r\n {{ saleprice.split(' - ')[0] | ecCurrencySymbol }}\r\n {{ saleprice.split(' - ')[1] | ecCurrencySymbol }}\r\n </div>\r\n </div>\r\n\r\n <ng-template #onlyprice>\r\n <div [class]=\"(priceSize ? 'price-sm' : 'price')\"\r\n *ngIf=\"price && price.split(' - ').length > 1; else simplePrice\">\r\n {{ price.split(' - ')[0] | ecCurrencySymbol }} -\r\n {{ price.split(' - ')[1] | ecCurrencySymbol }}\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #simplePrice>\r\n <ng-container *ngIf=\"customSimplePriceTemplate; else fallbackSimplePrice\">\r\n <ng-container *ngTemplateOutlet=\"customSimplePriceTemplate\"></ng-container>\r\n </ng-container>\r\n </ng-template>\r\n\r\n <ng-template #fallbackSimplePrice>\r\n <div [class]=\"'uno line-height-custom ' + (priceSize ? 'price-sm' : 'price')\">\r\n {{ price | ecCurrencySymbol }}\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #simplePriceDel>\r\n <div [class]=\"'dos line-height-custom ' + (priceSize ? 'price-sm' : 'price')\">\r\n <span class=\"lnth\">{{ price | ecCurrencySymbol }}</span>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #simpleSalePrice>\r\n <ng-container *ngIf=\"customSimpleSalePriceTemplate; else fallbackSimpleSalePrice\">\r\n <ng-container *ngTemplateOutlet=\"customSimpleSalePriceTemplate\"></ng-container>\r\n </ng-container>\r\n </ng-template>\r\n\r\n <ng-template #fallbackSimpleSalePrice>\r\n <div [class]=\"'tres line-height-custom ' + (priceSize ? 'price-sm' : 'price')\">\r\n {{ saleprice | ecCurrencySymbol }}\r\n </div>\r\n </ng-template>\r\n</ng-template>\r\n\r\n<!-- Secci\u00F3n de impuestos -->\r\n<ng-container *ngIf=\"shouldShowTaxes\">\r\n <ng-container *ngIf=\"showTaxLegendOnly; else detailedTaxBlock\">\r\n <ng-container *ngIf=\"customOnlyTaxLabelTemplate; else defaultOnlyTaxLabelBlock\">\r\n <ng-container *ngTemplateOutlet=\"customOnlyTaxLabelTemplate\"></ng-container>\r\n </ng-container>\r\n <ng-template #defaultOnlyTaxLabelBlock>\r\n <p class=\"taxes-title\">{{'price-without-national-taxes' | translate }}: <span class=\"nowrap-price\">{{ basePrice | ecCurrencySymbol }}</span>\r\n </p>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <ng-template #detailedTaxBlock>\r\n <ng-container *ngIf=\"customTaxTemplate; else defaultTaxBlock\">\r\n <ng-container *ngTemplateOutlet=\"customTaxTemplate\"></ng-container>\r\n </ng-container>\r\n </ng-template>\r\n</ng-container>\r\n\r\n<ng-template #defaultTaxBlock>\r\n <div class=\"taxes-section\">\r\n <p class=\"taxes-title\">{{'price-without-national-taxes' | translate }}: <span class=\"nowrap-price\">{{ basePrice | ecCurrencySymbol }}</span></p>\r\n <ul class=\"taxes-list\">\r\n <li>\r\n {{ taxes.Name }}: {{ taxeAmount | ecCurrencySymbol }}\r\n </li>\r\n </ul>\r\n </div>\r\n</ng-template>",
|
|
12798
|
+
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}.nowrap-price{white-space:nowrap}"]
|
|
13136
12799
|
})
|
|
13137
12800
|
], PriceEcComponent);
|
|
13138
12801
|
return PriceEcComponent;
|
|
@@ -13157,7 +12820,7 @@
|
|
|
13157
12820
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
13158
12821
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
13159
12822
|
};
|
|
13160
|
-
var __read$
|
|
12823
|
+
var __read$8 = (this && this.__read) || function (o, n) {
|
|
13161
12824
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
13162
12825
|
if (!m) return o;
|
|
13163
12826
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -13201,7 +12864,7 @@
|
|
|
13201
12864
|
var _this = this;
|
|
13202
12865
|
var state;
|
|
13203
12866
|
rxjs.combineLatest([this.activedRoute.params, this.activedRoute.queryParams]).subscribe(function (_a) {
|
|
13204
|
-
var _b = __read$
|
|
12867
|
+
var _b = __read$8(_a, 2), queryRouter = _b[0], queryParams = _b[1];
|
|
13205
12868
|
state = queryRouter.state;
|
|
13206
12869
|
state && state == 'statuspayment' && (state = queryParams.status);
|
|
13207
12870
|
console.log('PARAMETROS STATE -> ', state);
|
|
@@ -13284,7 +12947,7 @@
|
|
|
13284
12947
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
13285
12948
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
13286
12949
|
};
|
|
13287
|
-
var __param$
|
|
12950
|
+
var __param$a = (this && this.__param) || function (paramIndex, decorator) {
|
|
13288
12951
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13289
12952
|
};
|
|
13290
12953
|
/** @dynamic */
|
|
@@ -13409,7 +13072,7 @@
|
|
|
13409
13072
|
providers: [modal.BsModalService],
|
|
13410
13073
|
styles: [".half-width{width:49%!important}.ml-1{margin-left:1%}#card-form{height:450px}.iframeStyle{height:800px;width:100%;max-height:800px}"]
|
|
13411
13074
|
}),
|
|
13412
|
-
__param$
|
|
13075
|
+
__param$a(6, core.Inject(common.DOCUMENT))
|
|
13413
13076
|
], RedSysProEcComponent);
|
|
13414
13077
|
return RedSysProEcComponent;
|
|
13415
13078
|
}(ComponentHelper));
|
|
@@ -13962,6 +13625,7 @@
|
|
|
13962
13625
|
_this.hidePrices = false;
|
|
13963
13626
|
_this.hideDiscounts = false;
|
|
13964
13627
|
_this.hideTaxes = false;
|
|
13628
|
+
_this.enableFieldNotesInArticleFile = false;
|
|
13965
13629
|
_this.toDate = function (date, format) { return moment(date).format(!format && 'DD/MM/YYYY, h:mm:ss a' || format); };
|
|
13966
13630
|
_this.callError = function () {
|
|
13967
13631
|
_this.error = '?';
|
|
@@ -14004,7 +13668,7 @@
|
|
|
14004
13668
|
_this.callError();
|
|
14005
13669
|
};
|
|
14006
13670
|
this.channelConfigService.channelConfig$.subscribe(function (config) {
|
|
14007
|
-
var _a, _b, _c, _d, _e, _f;
|
|
13671
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
14008
13672
|
if (config && config.allowRepeatOrders !== undefined) {
|
|
14009
13673
|
_this.allowRepeatOrders = config.allowRepeatOrders;
|
|
14010
13674
|
}
|
|
@@ -14014,6 +13678,7 @@
|
|
|
14014
13678
|
_this.hidePrices = (_b = (_a = config) === null || _a === void 0 ? void 0 : _a.hidePrices, (_b !== null && _b !== void 0 ? _b : false));
|
|
14015
13679
|
_this.hideDiscounts = (_d = (_c = config) === null || _c === void 0 ? void 0 : _c.hideDiscounts, (_d !== null && _d !== void 0 ? _d : false));
|
|
14016
13680
|
_this.hideTaxes = (_f = (_e = config) === null || _e === void 0 ? void 0 : _e.hideTaxes, (_f !== null && _f !== void 0 ? _f : false));
|
|
13681
|
+
_this.enableFieldNotesInArticleFile = (_h = (_g = config) === null || _g === void 0 ? void 0 : _g.enableFieldNotesInArticleFile, (_h !== null && _h !== void 0 ? _h : false));
|
|
14017
13682
|
});
|
|
14018
13683
|
this.cartService.showPrice$.subscribe(function (showPrice) {
|
|
14019
13684
|
_this.creditAccountShowPrices = showPrice;
|
|
@@ -14039,7 +13704,7 @@
|
|
|
14039
13704
|
OrderEcComponent = __decorate$1l([
|
|
14040
13705
|
core.Component({
|
|
14041
13706
|
selector: 'app-order-ec',
|
|
14042
|
-
template: "<main class=\"py-5\" id=\"orderEcComponent\">\r\n <div class=\"container\">\r\n <div class=\"wrap\" *ngIf=\"!loading; else loadingView\">\r\n <div *ngIf=\"order; else noOrder\">\r\n\r\n <div class=\"row justify-content-between \">\r\n <div class=\"col-sm-auto col-12 font-brandon\">\r\n <h4 class=\"tit1 fw-bold\">{{ ('order' | translate) + ': ' + order.number }}</h4>\r\n </div>\r\n <ng-container *ngIf=\"order?.invoice\">\r\n <div class=\"col-sm col-12 font-brandon\">\r\n <a target=\"_blank\" [href]=\"consts.getUrlBase().slice(0, -1) + order.invoice\"\r\n class=\"btn btn-link btn-invoice\">\r\n <i class=\"fas fa-file-download me-1\"></i>\r\n {{ 'download' | translate }} {{ 'invoices' | translate | titlecase }}\r\n </a>\r\n </div>\r\n </ng-container>\r\n <a (click)=\"volver()\" class=\"col-auto text-end\">\r\n <button class=\"btn btvolver bg-gray text-white\">{{ 'back-to-orders' | translate }}</button>\r\n </a>\r\n </div>\r\n\r\n <section id=\"orders\">\r\n <div class=\"row pt-2\">\r\n <div class=\"col-md-2 col-12\">\r\n <p class=\"st\">{{ 'payment-state' | translate }}:</p>\r\n <p class=\"\">\r\n {{ order.payments[0].state | translate }}\r\n </p>\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\">\r\n <p class=\"st\">{{ 'shipment-state' | translate }}:</p>\r\n <p class=\"\">\r\n {{ order.shipments[0].state | translate }}\r\n </p>\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\">\r\n <p class=\"st\">{{ 'payment-method' | translate }}:</p>\r\n <p class=\"\">\r\n {{ order.payments[0]?.method?.name | translate }}\r\n </p>\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\">\r\n <p class=\"st\">{{ 'shipment-method' | translate }}:</p>\r\n <p class=\"\">\r\n {{ order.shipments[0].method.name }}\r\n </p>\r\n <!-- ACA DEBERIA IR EL LINK DE SEGUIMIENTO -->\r\n <a *ngIf=\"order.tracking\" [href]=\"order.tracking\"\r\n class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver\r\n seguimiento</a>\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\">\r\n <p class=\"st\">{{ 'date' | translate }}:</p>\r\n <p class=\"\">\r\n {{ toDate(order.checkoutCompletedAt, 'DD/MM/YYYY') | translate }}<br>\r\n {{ toDate(order.checkoutCompletedAt, 'h:mm:ss a') | translate }}\r\n </p>\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <p class=\"st\">{{ 'total' | translate }}:</p>\r\n <h5 class=\"fw-bold\">\r\n {{ (order.totals.total) | ecCurrencySymbol:'alwaysShowDecimals'}}\r\n\r\n </h5>\r\n </div>\r\n </div>\r\n </section>\r\n\r\n <div class=\"text-end mt-3\" *ngIf=\"!hidePrices && allowRepeatOrders\">\r\n <button class=\"btn btn-primary mb-2\" (click)=\"repeatOrder()\">\r\n {{ 'repeat-order' | translate }}\r\n </button>\r\n </div>\r\n\r\n <div class=\"container py-3 border-top border-bottom\">\r\n <div *ngIf=\"order.items.length; else noProducts\" class=\"row\">\r\n <div class=\"col-2 font-sm font-brandon d-none d-md-block\">\r\n {{ 'product' | translate | uppercase }}\r\n </div>\r\n <div class=\"col-4 font-sm font-brandon d-none d-md-block\">\r\n {{ 'description' | translate | uppercase }}\r\n </div>\r\n <div id=\"colLots\" *ngIf=\"ordersService.channelConfig.applyOrderLot\"\r\n class=\"col-1 font-sm font-brandon d-none d-md-block\">\r\n <!-- {{ 'description' | translate | uppercase }} -->\r\n {{ 'lots' | translate | uppercase }}\r\n </div>\r\n <div class=\"col-2 text-center font-sm font-brandon d-none d-md-block\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n {{ 'unit-price' | translate | uppercase }}\r\n </div>\r\n <div class=\"col-1 text-center font-sm font-brandon d-none d-md-block\">\r\n {{ 'quantity' | translate | uppercase }}\r\n </div>\r\n <div class=\"col-2 text-end font-sm font-brandon d-none d-md-block\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n {{ 'total' | translate | uppercase }}\r\n </div>\r\n </div>\r\n <ng-container *ngFor=\"let item of order.items; let i = index\">\r\n <div class=\"row cart-items\">\r\n <div class=\"col-5 col-md-2 py-2\">\r\n <ng-container *ngIf=\"item.product.variants[0]?.images?.length ; else defaultpicture\">\r\n <img class=\"smc maxwidth img-fluid rounded-custom \"\r\n [src]=\"consts.mediaUrl() + item.product.variants[0].images[0]\" alt=\"\">\r\n </ng-container>\r\n <ng-template #defaultpicture>\r\n <img *ngIf=\"item.product.picturesdefault\"\r\n class=\"smc maxwidth img-fluid rounded-custom\"\r\n [src]=\"consts.mediaUrl() + item.product.picturesdefault[0]\" alt=\"\">\r\n </ng-template>\r\n </div> \r\n <div\r\n class=\"col-md-4 col-7 d-flex flex-column justify-content-center\">\r\n <p class=\"font-brandon d-flex w-100 mb-0\">\r\n {{ item.product.name }} (Cod:{{ item.product.variants[0].code }})\r\n </p>\r\n <p *ngIf=\"item.comments\" class=\"comment-truncated fst-italic small text-muted mt-1\">\r\n \"{{ item.comments }}\"\r\n </p>\r\n </div>\r\n <div class=\"col-md-1 col-1 flex-column flex-md-row justify-content-start d-flex align-items-center\"\r\n *ngIf=\"ordersService.channelConfig.applyOrderLot\">\r\n <input type=\"button\" class=\"btn btn-primary btnSeguir m-0 text-center\" type=\"button\"\r\n [attr.data-bs-toggle]=\"'collapse'\" [attr.data-bs-target]=\"'#collapseExample'+i\"\r\n aria-expanded=\"false\" [attr.aria-controls]=\"'collapseExample'+i\"\r\n value=\"{{ 'see' | translate | uppercase }}\">\r\n </div>\r\n <div class=\"container d-md-none\">\r\n <div class=\"row\">\r\n <div class=\"col-4\">\r\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\r\n </div>\r\n <div class=\"col-4 font-xl\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <p class=\"text-center w-100 m-0\"> {{ (item.product.variants[0].saleprice ?\r\n item.product.variants[0].saleprice : item.product.variants[0].price) |\r\n ecCurrencySymbol:'alwaysShowDecimals'}}</p>\r\n </div>\r\n <div class=\"col-4 font-xl\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <p class=\"text-center w-100 m-0\"> {{ ((item.product.variants[0].saleprice ?\r\n item.product.variants[0].saleprice : item.product.variants[0].price) *\r\n item.quantity) | ecCurrencySymbol:'alwaysShowDecimals'}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-2 d-none d-md-flex align-items-center\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <p class=\"text-center w-100 m-0\">\r\n {{ (item.product.variants[0].saleprice ? item.product.variants[0].saleprice :\r\n item.product.variants[0].price) | ecCurrencySymbol:'alwaysShowDecimals'}}\r\n </p>\r\n </div>\r\n <div class=\"col-1 d-none d-md-flex align-items-center\">\r\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\r\n </div>\r\n <div class=\"col-2 d-none d-md-flex align-items-center\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <p class=\"text-end w-100 m-0\">\r\n {{ ((item.product.variants[0].saleprice ? item.product.variants[0].saleprice :\r\n item.product.variants[0].price) * item.quantity) | ecCurrencySymbol:'alwaysShowDecimals'}}</p>\r\n </div>\r\n <div class=\"collapse\" [attr.id]=\"'collapseExample'+i\">\r\n <div class=\"card card-body\">\r\n <table class=\"table table-striped\">\r\n <thead>\r\n <tr>\r\n <th scope=\"col\">#</th>\r\n <th scope=\"col\">Estado</th>\r\n <th scope=\"col\">Cantidad</th>\r\n <th scope=\"col\">Fecha Solicitada</th>\r\n <th scope=\"col\">Fecha Estimada</th>\r\n <th scope=\"col\">Sede</th>\r\n <th scope=\"col\">Nota</th>\r\n <th scope=\"col\">Total Lote</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <ng-container *ngFor=\"let lot of item.orderItemLot\">\r\n <tr>\r\n <th scope=\"row\">{{lot.id}}</th>\r\n <td>{{lot.lot_status}}</td>\r\n <td>{{lot.quantity}}</td>\r\n <td>{{ toDate(lot.date_request, 'DD/MM/YYYY') | translate }}</td>\r\n <td *ngIf=\"lot.date_deliver; else sinFechaEstimada\">{{\r\n toDate(lot.date_deliver, 'DD/MM/YYYY') | translate }}</td>\r\n <ng-template #sinFechaEstimada>\r\n <td>Pendiente</td>\r\n </ng-template>\r\n <td>{{lot.shipping_address_name}}</td>\r\n <td>{{lot.notes}}</td>\r\n <td>{{lot.total_lot | ecCurrencySymbol:'alwaysShowDecimals'}}</td>\r\n </tr>\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </ng-container>\r\n </div>\r\n\r\n <div class=\"container\">\r\n <div class=\"row\">\r\n <div class=\"col-12 col-md-6\"></div>\r\n <div class=\"col-12 col-md-6\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <div class=\"row py-4\">\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'total-products' |\r\n translate }}</div>\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\r\n {{ (order.totals.subtotal) | ecCurrencySymbol:'alwaysShowDecimals' }}\r\n </div>\r\n\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'shipment' |\r\n translate }}</div>\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\r\n {{ (order.totals.shipping || '0') | ecCurrencySymbol:'alwaysShowDecimals' }}\r\n\r\n </div>\r\n\r\n <div *ngIf=\"!hideDiscounts && order.totals.promotion && order.totals.promotion != 0\"\r\n class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'discount' |\r\n translate }}</div>\r\n <div *ngIf=\"!hideDiscounts && order.totals.promotion && order.totals.promotion != 0\"\r\n class=\"col-6 font-brandon font-md text-gray border-bottom text-end text-end\">\r\n {{ (order.totals.promotion) | ecCurrencySymbol:'alwaysShowDecimals' }}</div>\r\n\r\n <div *ngIf=\"!hideTaxes && order.totals.taxes && order.totals.taxes != 0 \"\r\n class=\"col-6 font-brandon font-md text-gray border-bottom \">\r\n {{ 'taxes' | translate }}</div>\r\n <div *ngIf=\"!hideTaxes && order.totals.taxes && order.totals.taxes != 0\"\r\n class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\r\n {{ (order.totals.taxes) | ecCurrencySymbol:'alwaysShowDecimals' }}</div>\r\n\r\n <div class=\"col-6 font-brandon font-md\">{{ 'total' | translate | uppercase }}</div>\r\n <div class=\"col-6 font-brandon font-md text-end\">\r\n {{ (order.totals.total) | ecCurrencySymbol:'alwaysShowDecimals' }}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n</main>\r\n\r\n<ng-template #noOrder>\r\n <div class=\"w-100 h-50\">\r\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\r\n <h5>{{ 'no-orders' | translate }}</h5>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #loadingView>\r\n <div class=\"w-100 h-50 py-5\">\r\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\r\n <app-loading-full-ec></app-loading-full-ec>\r\n </div>\r\n </div>\r\n</ng-template>",
|
|
13707
|
+
template: "<main class=\"py-5\" id=\"orderEcComponent\">\r\n <div class=\"container\">\r\n <div class=\"wrap\" *ngIf=\"!loading; else loadingView\">\r\n <div *ngIf=\"order; else noOrder\">\r\n\r\n <div class=\"row justify-content-between \">\r\n <div class=\"col-sm-auto col-12 font-brandon\">\r\n <h4 class=\"tit1 fw-bold\">{{ ('order' | translate) + ': ' + order.number }}</h4>\r\n </div>\r\n <ng-container *ngIf=\"order?.invoice\">\r\n <div class=\"col-sm col-12 font-brandon\" *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <a target=\"_blank\" [href]=\"consts.getUrlBase().slice(0, -1) + order.invoice\"\r\n class=\"btn btn-link btn-invoice\">\r\n <i class=\"fas fa-file-download me-1\"></i>\r\n {{ 'download' | translate }} {{ 'invoices' | translate | titlecase }}\r\n </a>\r\n </div>\r\n </ng-container>\r\n <a (click)=\"volver()\" class=\"col-auto text-end\">\r\n <button class=\"btn btvolver bg-gray text-white\">{{ 'back-to-orders' | translate }}</button>\r\n </a>\r\n </div>\r\n\r\n <section id=\"orders\">\r\n <div class=\"row pt-2\">\r\n <div class=\"col-md-2 col-12\">\r\n <p class=\"st\">{{ 'payment-state' | translate }}:</p>\r\n <p class=\"\">\r\n {{ order.payments[0].state | translate }}\r\n </p>\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\">\r\n <p class=\"st\">{{ 'shipment-state' | translate }}:</p>\r\n <p class=\"\">\r\n {{ order.shipments[0].state | translate }}\r\n </p>\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\">\r\n <p class=\"st\">{{ 'payment-method' | translate }}:</p>\r\n <p class=\"\">\r\n {{ order.payments[0]?.method?.name | translate }}\r\n </p>\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\">\r\n <p class=\"st\">{{ 'shipment-method' | translate }}:</p>\r\n <p class=\"\">\r\n {{ order.shipments[0].method.name }}\r\n </p>\r\n <!-- ACA DEBERIA IR EL LINK DE SEGUIMIENTO -->\r\n <a *ngIf=\"order.tracking\" [href]=\"order.tracking\"\r\n class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver\r\n seguimiento</a>\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\">\r\n <p class=\"st\">{{ 'date' | translate }}:</p>\r\n <p class=\"\">\r\n {{ toDate(order.checkoutCompletedAt, 'DD/MM/YYYY') | translate }}<br>\r\n {{ toDate(order.checkoutCompletedAt, 'h:mm:ss a') | translate }}\r\n </p>\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <p class=\"st\">{{ 'total' | translate }}:</p>\r\n <h5 class=\"fw-bold\">\r\n {{ (order.totals.total) | ecCurrencySymbol:'alwaysShowDecimals'}}\r\n\r\n </h5>\r\n </div>\r\n </div>\r\n </section>\r\n\r\n <div class=\"text-end mt-3\" *ngIf=\"!hidePrices && allowRepeatOrders\">\r\n <button class=\"btn btn-primary mb-2\" (click)=\"repeatOrder()\">\r\n {{ 'repeat-order' | translate }}\r\n </button>\r\n </div>\r\n\r\n <div class=\"container py-3 border-top border-bottom\">\r\n <div *ngIf=\"order.items.length; else noProducts\" class=\"row\">\r\n <div class=\"col-2 font-sm font-brandon d-none d-md-block\">\r\n {{ 'product' | translate | uppercase }}\r\n </div>\r\n <div class=\"col-4 font-sm font-brandon d-none d-md-block\">\r\n {{ 'description' | translate | uppercase }}\r\n </div>\r\n <div id=\"colLots\" *ngIf=\"ordersService.channelConfig.applyOrderLot\"\r\n class=\"col-1 font-sm font-brandon d-none d-md-block\">\r\n <!-- {{ 'description' | translate | uppercase }} -->\r\n {{ 'lots' | translate | uppercase }}\r\n </div>\r\n <div class=\"col-2 text-center font-sm font-brandon d-none d-md-block\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n {{ 'unit-price' | translate | uppercase }}\r\n </div>\r\n <div class=\"col-1 text-center font-sm font-brandon d-none d-md-block\">\r\n {{ 'quantity' | translate | uppercase }}\r\n </div>\r\n <div class=\"col-2 text-end font-sm font-brandon d-none d-md-block\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n {{ 'total' | translate | uppercase }}\r\n </div>\r\n </div>\r\n <ng-container *ngFor=\"let item of order.items; let i = index\">\r\n <div class=\"row cart-items\">\r\n <div class=\"col-5 col-md-2 py-2\">\r\n <ng-container *ngIf=\"item.product.variants[0]?.images?.length ; else defaultpicture\">\r\n <img class=\"smc maxwidth img-fluid rounded-custom \"\r\n [src]=\"consts.mediaUrl() + item.product.variants[0].images[0]\" alt=\"\">\r\n </ng-container>\r\n <ng-template #defaultpicture>\r\n <img *ngIf=\"item.product.picturesdefault\"\r\n class=\"smc maxwidth img-fluid rounded-custom\"\r\n [src]=\"consts.mediaUrl() + item.product.picturesdefault[0]\" alt=\"\">\r\n </ng-template>\r\n </div> \r\n <div\r\n class=\"col-md-4 col-7 d-flex flex-column justify-content-center\">\r\n <p class=\"font-brandon d-flex w-100 mb-0\">\r\n {{ item.product.name }} (Cod:{{ item.product.variants[0].code }})\r\n </p>\r\n <p *ngIf=\"enableFieldNotesInArticleFile && item.comments\" class=\"comment-truncated fst-italic small text-muted mt-1\">\r\n \"{{ item.comments }}\"\r\n </p>\r\n </div>\r\n <div class=\"col-md-1 col-1 flex-column flex-md-row justify-content-start d-flex align-items-center\"\r\n *ngIf=\"ordersService.channelConfig.applyOrderLot\">\r\n <input type=\"button\" class=\"btn btn-primary btnSeguir m-0 text-center\" type=\"button\"\r\n [attr.data-bs-toggle]=\"'collapse'\" [attr.data-bs-target]=\"'#collapseExample'+i\"\r\n aria-expanded=\"false\" [attr.aria-controls]=\"'collapseExample'+i\"\r\n value=\"{{ 'see' | translate | uppercase }}\">\r\n </div>\r\n <div class=\"container d-md-none\">\r\n <div class=\"row\">\r\n <div class=\"col-4\">\r\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\r\n </div>\r\n <div class=\"col-4 font-xl\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <p class=\"text-center w-100 m-0\"> {{ (item.product.variants[0].saleprice ?\r\n item.product.variants[0].saleprice : item.product.variants[0].price) |\r\n ecCurrencySymbol:'alwaysShowDecimals'}}</p>\r\n </div>\r\n <div class=\"col-4 font-xl\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <p class=\"text-center w-100 m-0\"> {{ ((item.product.variants[0].saleprice ?\r\n item.product.variants[0].saleprice : item.product.variants[0].price) *\r\n item.quantity) | ecCurrencySymbol:'alwaysShowDecimals'}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-2 d-none d-md-flex align-items-center\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <p class=\"text-center w-100 m-0\">\r\n {{ (item.product.variants[0].saleprice ? item.product.variants[0].saleprice :\r\n item.product.variants[0].price) | ecCurrencySymbol:'alwaysShowDecimals'}}\r\n </p>\r\n </div>\r\n <div class=\"col-1 d-none d-md-flex align-items-center\">\r\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\r\n </div>\r\n <div class=\"col-2 d-none d-md-flex align-items-center\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <p class=\"text-end w-100 m-0\">\r\n {{ ((item.product.variants[0].saleprice ? item.product.variants[0].saleprice :\r\n item.product.variants[0].price) * item.quantity) | ecCurrencySymbol:'alwaysShowDecimals'}}</p>\r\n </div>\r\n <div class=\"collapse\" [attr.id]=\"'collapseExample'+i\">\r\n <div class=\"card card-body\">\r\n <table class=\"table table-striped\">\r\n <thead>\r\n <tr>\r\n <th scope=\"col\">#</th>\r\n <th scope=\"col\">Estado</th>\r\n <th scope=\"col\">Cantidad</th>\r\n <th scope=\"col\">Fecha Solicitada</th>\r\n <th scope=\"col\">Fecha Estimada</th>\r\n <th scope=\"col\">Sede</th>\r\n <th scope=\"col\">Nota</th>\r\n <th scope=\"col\">Total Lote</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <ng-container *ngFor=\"let lot of item.orderItemLot\">\r\n <tr>\r\n <th scope=\"row\">{{lot.id}}</th>\r\n <td>{{lot.lot_status}}</td>\r\n <td>{{lot.quantity}}</td>\r\n <td>{{ toDate(lot.date_request, 'DD/MM/YYYY') | translate }}</td>\r\n <td *ngIf=\"lot.date_deliver; else sinFechaEstimada\">{{\r\n toDate(lot.date_deliver, 'DD/MM/YYYY') | translate }}</td>\r\n <ng-template #sinFechaEstimada>\r\n <td>Pendiente</td>\r\n </ng-template>\r\n <td>{{lot.shipping_address_name}}</td>\r\n <td>{{lot.notes}}</td>\r\n <td>{{lot.total_lot | ecCurrencySymbol:'alwaysShowDecimals'}}</td>\r\n </tr>\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </ng-container>\r\n </div>\r\n\r\n <div class=\"container\">\r\n <div class=\"row\">\r\n <div class=\"col-12 col-md-6\"></div>\r\n <div class=\"col-12 col-md-6\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <div class=\"row py-4\">\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'total-products' |\r\n translate }}</div>\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\r\n {{ (order.totals.subtotal) | ecCurrencySymbol:'alwaysShowDecimals' }}\r\n </div>\r\n\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'shipment' |\r\n translate }}</div>\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\r\n {{ (order.totals.shipping || '0') | ecCurrencySymbol:'alwaysShowDecimals' }}\r\n\r\n </div>\r\n\r\n <div *ngIf=\"!hideDiscounts && order.totals.promotion && order.totals.promotion != 0\"\r\n class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'discount' |\r\n translate }}</div>\r\n <div *ngIf=\"!hideDiscounts && order.totals.promotion && order.totals.promotion != 0\"\r\n class=\"col-6 font-brandon font-md text-gray border-bottom text-end text-end\">\r\n {{ (order.totals.promotion) | ecCurrencySymbol:'alwaysShowDecimals' }}</div>\r\n\r\n <div *ngIf=\"!hideTaxes && order.totals.taxes && order.totals.taxes != 0 \"\r\n class=\"col-6 font-brandon font-md text-gray border-bottom \">\r\n {{ 'taxes' | translate }}</div>\r\n <div *ngIf=\"!hideTaxes && order.totals.taxes && order.totals.taxes != 0\"\r\n class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\r\n {{ (order.totals.taxes) | ecCurrencySymbol:'alwaysShowDecimals' }}</div>\r\n\r\n <div class=\"col-6 font-brandon font-md\">{{ 'total' | translate | uppercase }}</div>\r\n <div class=\"col-6 font-brandon font-md text-end\">\r\n {{ (order.totals.total) | ecCurrencySymbol:'alwaysShowDecimals' }}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n</main>\r\n\r\n<ng-template #noOrder>\r\n <div class=\"w-100 h-50\">\r\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\r\n <h5>{{ 'no-orders' | translate }}</h5>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #loadingView>\r\n <div class=\"w-100 h-50 py-5\">\r\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\r\n <app-loading-full-ec></app-loading-full-ec>\r\n </div>\r\n </div>\r\n</ng-template>",
|
|
14043
13708
|
styles: [".maxwidth{max-width:100px}.comment-truncated{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;white-space:normal;max-height:3em}"]
|
|
14044
13709
|
})
|
|
14045
13710
|
], OrderEcComponent);
|
|
@@ -15822,12 +15487,10 @@
|
|
|
15822
15487
|
_this.loading = false;
|
|
15823
15488
|
}
|
|
15824
15489
|
else {
|
|
15825
|
-
/* console.log('Entro al else'); */
|
|
15826
15490
|
_this.renderPayPal();
|
|
15827
15491
|
}
|
|
15828
15492
|
}
|
|
15829
15493
|
catch (error) {
|
|
15830
|
-
/* console.log('Entro al catch'); */
|
|
15831
15494
|
_this.renderPayPal();
|
|
15832
15495
|
}
|
|
15833
15496
|
}, 1000);
|
|
@@ -16500,7 +16163,7 @@
|
|
|
16500
16163
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
16501
16164
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
16502
16165
|
};
|
|
16503
|
-
var __read$
|
|
16166
|
+
var __read$9 = (this && this.__read) || function (o, n) {
|
|
16504
16167
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
16505
16168
|
if (!m) return o;
|
|
16506
16169
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -16532,7 +16195,7 @@
|
|
|
16532
16195
|
var _this = this;
|
|
16533
16196
|
var token;
|
|
16534
16197
|
rxjs.combineLatest([this.activedRoute.params, this.activedRoute.queryParams]).subscribe(function (_a) {
|
|
16535
|
-
var _b = __read$
|
|
16198
|
+
var _b = __read$9(_a, 2), queryRouter = _b[0], queryParams = _b[1];
|
|
16536
16199
|
token = queryRouter.token;
|
|
16537
16200
|
console.log('PARAMETROS token -> ', token);
|
|
16538
16201
|
_this.cartService.loadCartByToken(token).then(function (res) {
|
|
@@ -19614,6 +19277,7 @@
|
|
|
19614
19277
|
this.creditAccountShowPrices = null;
|
|
19615
19278
|
this.showTaxLegend = false;
|
|
19616
19279
|
this.cartLoading = false;
|
|
19280
|
+
this.enableFieldNotesInArticleFile = false;
|
|
19617
19281
|
this.getVariants = function (product) {
|
|
19618
19282
|
var item = product.product;
|
|
19619
19283
|
if (item.variants && item.variants.length && item.variants[0].options && item.variants[0].options.length) {
|
|
@@ -19663,10 +19327,11 @@
|
|
|
19663
19327
|
_this.user = u;
|
|
19664
19328
|
});
|
|
19665
19329
|
this.channelConfigService.channelConfig$.subscribe(function (channel) {
|
|
19666
|
-
var _a, _b, _c, _d, _e, _f;
|
|
19330
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
19667
19331
|
_this.hideDiscounts = (_b = (_a = channel) === null || _a === void 0 ? void 0 : _a.hideDiscounts, (_b !== null && _b !== void 0 ? _b : false));
|
|
19668
19332
|
_this.hideTaxes = (_d = (_c = channel) === null || _c === void 0 ? void 0 : _c.hideTaxes, (_d !== null && _d !== void 0 ? _d : false));
|
|
19669
19333
|
_this.showTaxLegend = (_f = (_e = channel) === null || _e === void 0 ? void 0 : _e.showTaxLegend, (_f !== null && _f !== void 0 ? _f : false));
|
|
19334
|
+
_this.enableFieldNotesInArticleFile = (_h = (_g = channel) === null || _g === void 0 ? void 0 : _g.enableFieldNotesInArticleFile, (_h !== null && _h !== void 0 ? _h : false));
|
|
19670
19335
|
});
|
|
19671
19336
|
this.cartService.showPrice$.subscribe(function (showPrice) {
|
|
19672
19337
|
_this.creditAccountShowPrices = showPrice;
|
|
@@ -19676,7 +19341,7 @@
|
|
|
19676
19341
|
});
|
|
19677
19342
|
};
|
|
19678
19343
|
SidebarEcComponent.prototype.actualizarCantidad = function (item, cantidad, stock, id) {
|
|
19679
|
-
var _a;
|
|
19344
|
+
var _a, _b, _c;
|
|
19680
19345
|
if (this.cartLoading) {
|
|
19681
19346
|
return;
|
|
19682
19347
|
}
|
|
@@ -19696,13 +19361,14 @@
|
|
|
19696
19361
|
newQuantity = Math.round(newQuantity / step) * step;
|
|
19697
19362
|
}
|
|
19698
19363
|
}
|
|
19364
|
+
var keepSameComment = (_c = (_b = item) === null || _b === void 0 ? void 0 : _b.comments, (_c !== null && _c !== void 0 ? _c : undefined));
|
|
19699
19365
|
if (id) {
|
|
19700
19366
|
var elem_1 = document.getElementById(id);
|
|
19701
19367
|
if (elem_1) {
|
|
19702
19368
|
elem_1.disabled = true;
|
|
19703
19369
|
}
|
|
19704
19370
|
if (newQuantity > 0 && newQuantity <= stock) {
|
|
19705
|
-
this.cartService.updateItemQuantity(item, newQuantity);
|
|
19371
|
+
this.cartService.updateItemQuantity(item, newQuantity, keepSameComment);
|
|
19706
19372
|
}
|
|
19707
19373
|
else {
|
|
19708
19374
|
this.toastrService.show('out-of-stock-actually');
|
|
@@ -19715,7 +19381,7 @@
|
|
|
19715
19381
|
}
|
|
19716
19382
|
else {
|
|
19717
19383
|
if (newQuantity > 0 && newQuantity <= stock) {
|
|
19718
|
-
this.cartService.updateItemQuantity(item, newQuantity);
|
|
19384
|
+
this.cartService.updateItemQuantity(item, newQuantity, keepSameComment);
|
|
19719
19385
|
}
|
|
19720
19386
|
}
|
|
19721
19387
|
};
|
|
@@ -20004,7 +19670,7 @@
|
|
|
20004
19670
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
20005
19671
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
20006
19672
|
};
|
|
20007
|
-
var __param$
|
|
19673
|
+
var __param$b = (this && this.__param) || function (paramIndex, decorator) {
|
|
20008
19674
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
20009
19675
|
};
|
|
20010
19676
|
var ParamsContext = /** @class */ (function () {
|
|
@@ -20091,7 +19757,7 @@
|
|
|
20091
19757
|
core.Directive({
|
|
20092
19758
|
selector: "[ecAddActionRedirect]",
|
|
20093
19759
|
}),
|
|
20094
|
-
__param$
|
|
19760
|
+
__param$b(0, core.Inject(common.DOCUMENT))
|
|
20095
19761
|
], AddActionRedirectDirective);
|
|
20096
19762
|
return AddActionRedirectDirective;
|
|
20097
19763
|
}());
|
|
@@ -20181,7 +19847,7 @@
|
|
|
20181
19847
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
20182
19848
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
20183
19849
|
};
|
|
20184
|
-
var __param$
|
|
19850
|
+
var __param$c = (this && this.__param) || function (paramIndex, decorator) {
|
|
20185
19851
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
20186
19852
|
};
|
|
20187
19853
|
var ParamsContext$1 = /** @class */ (function () {
|
|
@@ -20329,7 +19995,7 @@
|
|
|
20329
19995
|
core.Directive({
|
|
20330
19996
|
selector: "[ecProductOff]",
|
|
20331
19997
|
}),
|
|
20332
|
-
__param$
|
|
19998
|
+
__param$c(0, core.Inject(common.DOCUMENT))
|
|
20333
19999
|
], ProductOffDirective);
|
|
20334
20000
|
return ProductOffDirective;
|
|
20335
20001
|
}());
|
|
@@ -20514,7 +20180,7 @@
|
|
|
20514
20180
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
20515
20181
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
20516
20182
|
};
|
|
20517
|
-
var __read$
|
|
20183
|
+
var __read$a = (this && this.__read) || function (o, n) {
|
|
20518
20184
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
20519
20185
|
if (!m) return o;
|
|
20520
20186
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -20580,7 +20246,7 @@
|
|
|
20580
20246
|
var forceShow = mode === 'alwaysShowDecimals';
|
|
20581
20247
|
var forceHide = mode === 'alwaysHideDecimals';
|
|
20582
20248
|
var showDecimals = forceShow ? true : forceHide ? false : !withoutDecimalGlobal;
|
|
20583
|
-
var _b = __read$
|
|
20249
|
+
var _b = __read$a((value || '').split(','), 2), ent = _b[0], _c = _b[1], dec = _c === void 0 ? '00' : _c;
|
|
20584
20250
|
if (showDecimals) {
|
|
20585
20251
|
if (dec.length > 2)
|
|
20586
20252
|
dec = dec.slice(0, 2);
|
|
@@ -20600,6 +20266,7 @@
|
|
|
20600
20266
|
ecCurrencySymbolPipe = __decorate$27([
|
|
20601
20267
|
core.Pipe({
|
|
20602
20268
|
name: 'ecCurrencySymbol',
|
|
20269
|
+
pure: false
|
|
20603
20270
|
})
|
|
20604
20271
|
], ecCurrencySymbolPipe);
|
|
20605
20272
|
return ecCurrencySymbolPipe;
|
|
@@ -20911,7 +20578,7 @@
|
|
|
20911
20578
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
20912
20579
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
20913
20580
|
};
|
|
20914
|
-
var __param$
|
|
20581
|
+
var __param$d = (this && this.__param) || function (paramIndex, decorator) {
|
|
20915
20582
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
20916
20583
|
};
|
|
20917
20584
|
var StandardReuseStrategy = /** @class */ (function () {
|
|
@@ -20942,7 +20609,7 @@
|
|
|
20942
20609
|
]; };
|
|
20943
20610
|
StandardReuseStrategy = __decorate$2d([
|
|
20944
20611
|
core.Injectable(),
|
|
20945
|
-
__param$
|
|
20612
|
+
__param$d(0, core.Inject('env'))
|
|
20946
20613
|
], StandardReuseStrategy);
|
|
20947
20614
|
return StandardReuseStrategy;
|
|
20948
20615
|
}());
|