ng-easycommerce 0.0.651-beta.2 → 0.0.652
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 +4 -6
- package/assets/ec-i18n/es.json +2 -1
- package/bundles/ng-easycommerce.umd.js +20 -49
- package/bundles/ng-easycommerce.umd.js.map +1 -1
- package/bundles/ng-easycommerce.umd.min.js +1 -1
- package/bundles/ng-easycommerce.umd.min.js.map +1 -1
- package/esm2015/lib/ec-component/account-ec/order-ec/order-ec.component.js +5 -3
- package/esm2015/lib/ec-component/cart-ec/cart-ec.component.js +4 -2
- package/esm2015/lib/ec-component/checkout-ec/dataform-ec/dataform-ec.component.js +2 -2
- package/esm2015/lib/ec-component/product-detail-ec/product-detail-ec.component.js +4 -2
- package/esm2015/lib/ec-component/sidebar-ec/sidebar-ec.component.js +4 -2
- package/esm2015/lib/ec-pipe/ec-currency-symbol.pipe.js +1 -2
- package/esm2015/lib/services/currency.service.js +7 -43
- 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 +4 -2
- package/esm5/lib/ec-component/checkout-ec/dataform-ec/dataform-ec.component.js +2 -2
- package/esm5/lib/ec-component/product-detail-ec/product-detail-ec.component.js +4 -2
- package/esm5/lib/ec-component/sidebar-ec/sidebar-ec.component.js +4 -2
- package/esm5/lib/ec-pipe/ec-currency-symbol.pipe.js +1 -2
- package/esm5/lib/services/currency.service.js +7 -43
- package/fesm2015/ng-easycommerce.js +20 -49
- package/fesm2015/ng-easycommerce.js.map +1 -1
- package/fesm5/ng-easycommerce.js +20 -49
- package/fesm5/ng-easycommerce.js.map +1 -1
- 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/product-detail-ec/product-detail-ec.component.d.ts +1 -0
- package/lib/ec-component/sidebar-ec/sidebar-ec.component.d.ts +1 -0
- package/lib/services/currency.service.d.ts +2 -14
- package/ng-easycommerce.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -6304,6 +6304,7 @@ let CartEcComponent = class CartEcComponent extends ComponentHelper {
|
|
|
6304
6304
|
this.creditAccountShowPrices = null;
|
|
6305
6305
|
this.showTaxLegend = false;
|
|
6306
6306
|
this.cartLoading = false;
|
|
6307
|
+
this.enableFieldNotesInArticleFile = false;
|
|
6307
6308
|
this.toDecimal = (amount) => this.consts.toDecimal(amount);
|
|
6308
6309
|
this.redirectRegister = () => this.router.navigateByUrl(`/auth/login`);
|
|
6309
6310
|
this.getVariants = product => {
|
|
@@ -6365,11 +6366,12 @@ let CartEcComponent = class CartEcComponent extends ComponentHelper {
|
|
|
6365
6366
|
this.cartService.promotions.subscribe(promotions => this.promotions = promotions);
|
|
6366
6367
|
// console.log(this.cartService.getTaxes());
|
|
6367
6368
|
this.channelConfigService.channelConfig$.subscribe(channel => {
|
|
6368
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
6369
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
6369
6370
|
this.hidePrices = (_b = (_a = channel) === null || _a === void 0 ? void 0 : _a.hidePrices, (_b !== null && _b !== void 0 ? _b : false));
|
|
6370
6371
|
this.hideDiscounts = (_d = (_c = channel) === null || _c === void 0 ? void 0 : _c.hideDiscounts, (_d !== null && _d !== void 0 ? _d : false));
|
|
6371
6372
|
this.hideTaxes = (_f = (_e = channel) === null || _e === void 0 ? void 0 : _e.hideTaxes, (_f !== null && _f !== void 0 ? _f : false));
|
|
6372
6373
|
this.showTaxLegend = (_h = (_g = channel) === null || _g === void 0 ? void 0 : _g.showTaxLegend, (_h !== null && _h !== void 0 ? _h : false));
|
|
6374
|
+
this.enableFieldNotesInArticleFile = (_k = (_j = channel) === null || _j === void 0 ? void 0 : _j.enableFieldNotesInArticleFile, (_k !== null && _k !== void 0 ? _k : false));
|
|
6373
6375
|
if (this.hidePrices) {
|
|
6374
6376
|
this.router.navigate(['/']);
|
|
6375
6377
|
}
|
|
@@ -7228,7 +7230,7 @@ __decorate$Q([
|
|
|
7228
7230
|
DataFormEcComponent = __decorate$Q([
|
|
7229
7231
|
Component({
|
|
7230
7232
|
selector: 'app-dataform-ec',
|
|
7231
|
-
template: "<ng-container *ngIf=\"this.channelConfig.channelType != 'b2b' || (this.channelConfig.channelType == 'b2b' && authService.isAuthenticated()); else pleaseLogin\">\n<ng-container *ngIf=\"this.addressingService.modeSelectAddress == 'LOAD_ADDRESS_AND_SELECTION' && this.authService.isAuthenticated() && this.addressBook != null\">\n <div class=\"container card p-4 mb-3\">\n <div class=\"row justify-content-center\">\n <div class=\"col-12 col-md-10 col-lg-8 text-center\">\n <div class=\"btn-group btn-group-toggle\" data-bs-toggle=\"buttons\">\n <label [class]=\"'btn btn-outline-secondary ' + (!getMode() ? 'active' : '')\">\n <input type=\"radio\" name=\"options\" id=\"option1\" autocomplete=\"off\" checked\n (change)=\"setMode('seleccion')\"> {{'select-address' | translate | titlecase}}\n </label>\n\n <label [class]=\"'btn btn-outline-secondary ' + (getMode() ? 'active' : '')\" *ngIf=\"!getParamByChannelAndLanguage('btn_new_address_')\">\n <input type=\"radio\" name=\"options\" id=\"option2\" autocomplete=\"off\" (change)=\"setMode('carga')\">\n {{ 'new-address' | translate | titlecase}}\n </label>\n\n <label [class]=\"'btn btn-outline-secondary ' + (selectAddress ? 'active' : '')\" *ngIf=\"getParamByChannelAndLanguage('btn_new_address_') as param\">\n <input type=\"radio\" name=\"options\" id=\"option2\" autocomplete=\"off\" (change)=\"setMode('carga')\">\n {{ param.value}}\n </label>\n\n </div>\n </div>\n </div>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"getMode(); else addressSelection\">\n <div *ngIf=\"!require_login; else requireLoginView\">\n\n <ng-container *ngIf=\"this.addressingService.modeSelectAddress == 'ONLY_LOAD_ADDRESS'\">\n <div class=\"checkout-title my-2\">\n <h3>{{'billing-details'|translate}}</h3>\n </div>\n </ng-container>\n\n <form (submit)=\"verifyValidate(false,this.cartService.items)\">\n <div class=\"row mt-df\"><!--Fila 1-->\n <div class=\"form-group col-12 col-md-6\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.firstName.enabled\">\n <label class=\"field-label\">{{'first-name'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.firstName.required\"\n class=\"required\">*</span></label>\n <input class=\"form-control\" type=\"text\" name=\"firstName\"\n [formControl]=\"checkoutForm.controls['firstName']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutForm.controls.firstName.touched && checkoutForm.controls.firstName.errors?.required\">\n <span class=\"text-danger\">{{'first-name-help1'|translate}}</span>\n\n </div>\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutForm.controls.firstName.touched && checkoutForm.controls.firstName.errors?.pattern\">\n <span class=\"text-danger\">\n {{'first-name-help2'|translate}}\n </span>\n </div>\n </div>\n <div class=\"form-group col-12 col-md-6\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.lastName.enabled\">\n <label class=\"field-label\">{{'last-name'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.lastName.required\"\n class=\"required\">*</span></label>\n <input class=\"form-control\" type=\"text\" name=\"lastName\"\n [formControl]=\"checkoutForm.controls['lastName']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutForm.controls.lastName.touched && checkoutForm.controls.lastName.errors?.required\">\n <span class=\"text-danger\">{{'last-name-help1'|translate}}</span>\n </div>\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutForm.controls.lastName.touched && checkoutForm.controls.lastName.errors?.pattern\">\n <span class=\"text-danger\">{{'last-name-help2'|translate}}</span>\n </div>\n </div>\n </div>\n <div class=\"row mt-df\"><!--Fila 2-->\n <div class=\"form-group col-12 col-md-6\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.phoneNumber.enabled\">\n <label class=\"field-label\">{{'phone'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.phoneNumber.required\"\n class=\"required\">*</span></label>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"phoneNumber\"\n [formControl]=\"checkoutForm.controls['phoneNumber']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutForm.controls.phoneNumber.touched && checkoutForm.controls.phoneNumber.errors?.required\">\n <span class=\"text-danger\">\n\n {{'phone-help1'|translate}}\n </span>\n </div>\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutForm.controls.phoneNumber.touched && checkoutForm.controls.phoneNumber.errors?.pattern\">\n <span class=\"text-danger\">\n {{'phone-help2'|translate}}\n </span>\n </div>\n </div>\n <div class=\"form-group col-12 col-md-6\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.email.enabled\">\n <label class=\"field-label\">{{'email-address'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.email.required\"\n class=\"required\">*</span></label>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"email\" name=\"email\"\n [formControl]=\"checkoutForm.controls['email']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutForm.controls.email.touched && checkoutForm.controls.email.errors?.required\">\n <span class=\"text-danger\">\n {{'email-address-help1'|translate}}\n </span>\n </div>\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutForm.controls.email.touched && checkoutForm.controls.email.errors?.email\">\n <span class=\"text-danger\">\n {{'email-address-help2'|translate}}\n </span>\n </div>\n </div>\n </div>\n\n <div class=\"row mt-df\"><!--Fila 3-->\n <ng-container *ngIf=\"this.addressingService.getTypeForm().viewForms.countryCode.enabled\">\n <div class=\"form-group col-12 col-md-4\" *ngIf=\"(countries$ | async) as countries\">\n <label class=\"field-label\">{{'country'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.countryCode.required\"\n class=\"required\">*</span></label>\n <select class=\"form-select\" name=\"countryCode\"\n [formControl]=\"checkoutForm.controls['countryCode']\"\n (change)=\"onCountrySelected($event.target.value)\">\n <!-- <option selected [value]=\"countries[0].code\">{{ 'choose-country' | translate }}</option> -->\n <option *ngFor=\"let country of countries\" [value]=\"country.code\">{{ country.name }}</option>\n </select>\n <div *ngIf=\"checkoutForm.controls.countryCode.touched && checkoutForm.controls.countryCode.errors?.required\"\n class=\"text text-danger\">\n {{'country-help'|translate}}\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"this.addressingService.getTypeForm().viewForms.provinceCode.enabled\">\n <div class=\"form-group col-12 col-md-4\" *ngIf=\"(provinces$ | async) as provinces\">\n <label class=\"field-label\">{{'state'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.provinceCode.required\"\n class=\"required\">*</span></label>\n <select class=\"form-select\" name=\"provinceCode\"\n (change)=\"onProvincesSelected($event.target.value)\"\n [formControl]=\"checkoutForm.controls['provinceCode']\">\n<!-- <option selected [value]=\"null\">{{ 'choose-province' | translate }}</option>\n --> <option *ngFor=\"let province of provinces\" [value]=\"province.code\">{{ province.name }}\n </option>\n </select>\n <div *ngIf=\"checkoutForm.controls.provinceCode.touched && checkoutForm.controls.provinceCode.errors?.required\"\n class=\"text text-danger\">\n {{'state-help'|translate}}\n </div>\n </div>\n </ng-container>\n <div class=\"form-group col-12 col-md-4\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.city.enabled\">\n <label class=\"field-label\">{{'town-city'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.city.required\"\n class=\"required\">*</span></label>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"city\"\n [formControl]=\"checkoutForm.controls['city']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutForm.controls.city.touched && checkoutForm.controls.city.errors?.required\">\n <span class=\"text-danger\">{{'town-city-help'|translate}}</span>\n </div>\n </div>\n </div>\n\n <div class=\"row mt-df\"><!--Fila 4-->\n <div class=\"form-group col-12 col-md-8\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.street.enabled\">\n <label class=\"field-label\">{{'address'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.street.required\"\n class=\"required\">*</span></label>\n <div class=\"char-count\" style=\"font-size: 0.9em; color: #888;\">\n {{ 50 - (checkoutForm.controls['street'].value?.length || 0) }} {{'remainingCharacters'|translate}}\n</div>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"street\"\n [formControl]=\"checkoutForm.controls['street']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutForm.controls.street.touched && checkoutForm.controls.street.errors?.required\">\n <span class=\"text-danger\">{{'address-help1'|translate}}</span>\n </div>\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutForm.controls.street.touched && checkoutForm.controls.street.errors?.maxlength\">\n <span class=\"text-danger\">{{'address-help2'|translate}}</span>\n </div>\n </div>\n\n <!-- form direcci\u00F3n -->\n <div class=\"form-group col-12 col-md-4\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.postcode.enabled\">\n <label class=\"field-label\">{{'postal-code'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.postcode.required\"\n class=\"required\">*</span></label>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"postcode\"\n [formControl]=\"checkoutForm.controls['postcode']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutForm.controls.postcode.touched && checkoutForm.controls.postcode.errors?.required\">\n <span class=\"text-danger\">{{'postal-code-help'|translate}}</span>\n </div>\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutForm.controls.postcode.touched && checkoutForm.controls.postcode.errors?.pattern\">\n <span class=\"text-danger\"> {{postalCodeErrorMessage | translate}} </span>\n </div>\n </div>\n </div>\n\n <div class=\"row mt-df\"><!--Fila 5-->\n <ng-container *ngIf=\"this.addressingService.getTypeForm().viewForms.documentType.enabled\">\n <div class=\"form-group col-12 col-md-4\" *ngIf=\"(documentTypes$ | async) as documentTypes\">\n <label class=\"field-label\">{{'document-type'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentType.required\"\n class=\"required\">*</span></label>\n <select name=\"documentType\" class=\"form-select\"\n (change)=\"onDocumentTypesSelected($event.target.value)\"\n [formControl]=\"checkoutForm.controls['documentType']\">\n<!-- <option [value]=\"''\" selected>{{'document-type'|translate}}</option>\n --> <option *ngFor=\"let item of documentTypes\" [value]=\"item.code\">{{item.name}}</option>\n </select>\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutForm.controls.documentType.touched && checkoutForm.controls.documentType.errors?.required\">\n <span class=\"text-danger\">\n {{'type-document-help'|translate}}\n </span>\n </div>\n </div>\n </ng-container>\n <div class=\"form-group col-12 col-md-4\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentNumber.enabled\">\n <label class=\"field-label\">{{'document-number'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentNumber.required\"\n class=\"required\">*</span></label>\n <input (change)=\"onInputChange()\" class=\"form-control\"\n [type]=\"'text'\" name=\"documentNumber\"\n [formControl]=\"checkoutForm.controls['documentNumber']\"\n placeholder=\"\" autocomplete=\"off\">\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutForm.controls.documentNumber.touched && checkoutForm.controls.documentNumber.errors?.required\">\n <span class=\"text-danger\">{{ 'document-number-help' | translate }}</span>\n </div>\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutForm.controls.documentNumber.touched && checkoutForm.controls.documentNumber.errors?.pattern\">\n <span class=\"text-danger\">{{ documentErrorMessage | translate }}</span>\n </div>\n </div>\n </div>\n\n <div class=\"row mt-df\" *ngIf=\"this.consts.getChannel() != 'mdj-empresa-a'\"><!--Fila 6-->\n <div class=\"form-group col-12 col-md-12\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.enabled\">\n\n <label class=\"field-label\" *ngIf=\"!getLabelNotesParam()\">{{'notes'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\"\n class=\"required\">*</span></label>\n <label class=\"field-label\" *ngIf=\"getLabelNotesParam() as labelnotes\" [innerHTML]=\"labelnotes.value\"><span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\"\n class=\"required\">*</span></label>\n\n <!-- <label class=\"field-label\">{{'notes'|translate}}<span *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\" class=\"required\">*</span></label> -->\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"notes\"\n [formControl]=\"checkoutForm.controls['notes']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\n </div>\n </div>\n <div class=\"row mt-df\"><!--Fila 7-->\n <div class=\"form-group col-12 col-md-12\">\n <label for=\"formFact\"><b>{{ 'same-billing-address' | translate }}</b> <input type=\"checkbox\"\n class=\"ms-2\" [checked]=\"viewDataFacturacion\" (change)=\"showFormFacturacion()\"\n id=\"formFact\"></label>\n </div>\n </div>\n <div class=\"row mt-df\">\n <div class=\"col-12\">\n <p>\n <!-- <span class=\"required\"></span> -->\n <label class=\"required text-underline\">* {{ 'required-fields' | translate }}</label>\n </p>\n </div>\n </div>\n <div class=\"row mt-df\">\n <div class=\"form-group col-12 col-md-12\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.terms.enabled\">\n <span *ngIf=\"this.addressingService.getTypeForm().viewForms.terms.required\"\n class=\"required\">*</span>\n <label class=\"\" for=\"\"> {{ 'accept-terms' | translate }} <input class=\"ms-2\" name=\"terms\"\n [formControl]=\"checkoutForm.controls['terms']\" type=\"checkbox\" required\n (change)=\"onInputChange()\" /> </label><br />\n <a (click)=\"openModal(template)\" role=\"button\" class=\"ms-3 nota-input text-dark\">{{ 'whats-this' |\n translate }}</a>\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutForm.controls.terms.touched && !checkoutForm.controls.terms.value\">\n <span class=\"text-danger\">{{ 'must-accept-terms' | translate }}</span>\n </div>\n </div>\n </div>\n <div class=\"row\" *ngIf=\"viewDataFacturacion ; else datosFormFacturacion\"> </div>\n <div class=\"checkout-btn-unique text-end\">\n <button type=\"submit\" [disabled]=\"!validado\" class=\"btn valid-btn mt-2\">\n {{(isLastOne ? 'finish-checkout' : (allready_data ? 'update' :\n 'ready-form')) | translate}}</button>\n\n\n </div>\n <div *ngIf=\"loading\" class=\"d-flex flex-column jusitfy-content-center align-items-center\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n </form>\n </div>\n</ng-container>\n\n<ng-template #addressSelection>\n\n <ng-container *ngIf=\"this.addressingService.modeSelectAddress == 'ONLY_ADDRESS_SELECTION'\">\n <div class=\"checkout-title my-2\">\n <h3>{{'address-selection'|translate}}</h3>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"this.addressBook; else addressBookNotResult\">\n\n <ng-container *ngIf=\"this.addressBook?.length ;else addressBookLoading\">\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-sm-6 col-12 my-3\" *ngFor=\"let item of addressBook; let i = index\">\n <div class=\"card p-3\">\n <input class=\"ms-1 mt-3 form-check-input input-size-lg\" type=\"radio\" [name]=\"'n-'+i\" [id]=\"i\"\n [checked]=\"item.selected\" (click)=\"setSelectAddress(item)\" (change)=\"onInputChange()\">\n <div class=\"ms-5\">\n <h4 class=\"card-title\">\n <strong>{{'address'|translate}}</strong><br>\n <span class=\"text-uppercase h3\">{{item.street}}</span>\n </h4>\n <div class=\"row\">\n <h5 class=\"card-subtitle mb-2 text-muted col-auto\">\n <strong>{{'country'|translate}}</strong> {{getCountry(item.countryCode)}}\n </h5>\n <h5 class=\"card-subtitle mb-2 text-muted col-auto\">\n <strong>{{'state'|translate}}</strong> {{getProvince(item.provinceCode)}}\n </h5>\n <h5 class=\"card-subtitle mb-2 text-muted col-auto\">\n <strong>{{'town-city'|translate}}</strong> {{item.city}}\n </h5>\n <h5 class=\"card-subtitle mb-2 text-muted col-auto\">\n <strong>{{'postal-code'|translate}}</strong> {{item.postcode}}\n </h5>\n </div>\n <div class=\"row px-3\">\n <div class=\"card p-2 bg-light w-100\">\n <div class=\"card-body\">\n <h5 class=\"card-title\">{{'address-contact'|translate}}</h5>\n <h6 class=\"card-subtitle mb-2 text-muted\">\n <strong>{{'first-name'|translate}}</strong>\n {{item.addressContact.firstName}}\n </h6>\n <h6 class=\"card-subtitle mb-2 text-muted\">\n <strong>{{'last-name'|translate}}</strong> {{item.addressContact.lastName}}\n </h6>\n <h6 class=\"card-subtitle mb-2 text-muted\">\n <strong>{{'document-type'|translate}}</strong>\n {{getDocumentType(item.addressContact.documentType)}}\n </h6>\n <h6 class=\"card-subtitle mb-2 text-muted\">\n <strong>{{'document-number'|translate}}</strong>\n {{item.addressContact.documentNumber}}\n </h6>\n <h6 class=\"card-subtitle mb-2 text-muted\">\n <strong>{{'email-address'|translate}}</strong> {{item.addressContact.email}}\n </h6>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n </div>\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. -->\n <div class=\"w-100\" *ngIf=\"this.consts.getChannel() != 'mdj-empresa-a'\"> \n <ng-container *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.enabled\">\n <div class=\"row mt-df\">\n <div class=\"form-group col-12 col-md-12\">\n <label class=\"field-label\" *ngIf=\"!getLabelNotesParam()\">{{'notes'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\"\n class=\"required\">*</span></label>\n <label class=\"field-label\"\n *ngIf=\"getLabelNotesParam() as labelnotes\" [innerHTML]=\"labelnotes.value\"></label>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"notes\"\n [(ngModel)]=\"this.addressBookSelected.notes\" #ctrl=\"ngModel\" value=\"\" placeholder=\"\"\n autocomplete=\"off\"> \n <div class=\"invalid-feedback d-block\" *ngIf=\"\n addressingService.getTypeForm().viewForms.notes.required\n && (!addressBookSelected.notes || !addressBookSelected.notes.trim())\n \">\n {{ 'required-field' | translate }}\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n <div class=\"checkout-btn-unique text-end\">\n <button (click)=\"selectAddress(this.cartService.items)\" class=\"btn valid-btn mt-2\">\n {{(isLastOne ? 'finish-checkout' : (allready_data ? 'update' :\n 'ready-form')) | translate}}\n </button>\n </div>\n <div *ngIf=\"loading\" class=\"d-flex flex-column jusitfy-content-center align-items-center\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n </div>\n </ng-container>\n </ng-container>\n\n</ng-template>\n\n\n<ng-template #requireLoginView>\n <div id=\"loginCheckout\">\n <div class=\"d-flex flex-column jusitfy-content-center align-items-center\" *ngIf=\"require_login\">\n <div class=\"col-12\">\n <app-login-form-ec (ready)=\"verifyValidate($event)\" [redirect]=\"false\" [title]=\"'need-login'\">\n </app-login-form-ec>\n </div>\n </div>\n </div>\n</ng-template>\n\n\n\n<ng-template #datosFormFacturacion>\n <div class=\"container-fluid px-0 px-md-2\">\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"card \">\n <div class=\"card-header text-dark text-center\">\n <h3>{{'billing-data'|translate}}</h3>\n </div>\n <div class=\"card-body\">\n <form (submit)=\"verifyValidate()\">\n <div class=\"row mt-df\">\n <!--Fila 1-->\n <div class=\"form-group col-12 col-md-6\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.firstName.enabled\">\n <label class=\"field-label\">{{'first-name'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.firstName.required\"\n class=\"required\">*</span></label>\n <input class=\"form-control\" type=\"text\" name=\"firstName\"\n [formControl]=\"checkoutFormFacturacion.controls['firstName']\" value=\"\"\n placeholder=\"\" autocomplete=\"off\">\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutFormFacturacion.controls.firstName.touched && checkoutFormFacturacion.controls.firstName.errors?.required\">\n <span class=\"text-danger\">{{'first-name-help1'|translate}}</span>\n\n </div>\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutFormFacturacion.controls.firstName.touched && checkoutFormFacturacion.controls.firstName.errors?.pattern\">\n <span class=\"text-danger\">\n {{'first-name-help2'|translate}}\n </span>\n </div>\n </div>\n <div class=\"form-group col-12 col-md-6\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.lastName.enabled\">\n <label class=\"field-label\">{{'last-name'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.lastName.required\"\n class=\"required\">*</span></label>\n <input class=\"form-control\" type=\"text\" name=\"lastName\"\n [formControl]=\"checkoutFormFacturacion.controls['lastName']\" value=\"\"\n placeholder=\"\" autocomplete=\"off\">\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutFormFacturacion.controls.lastName.touched && checkoutFormFacturacion.controls.lastName.errors?.required\">\n <span class=\"text-danger\">{{'last-name-help1'|translate}}</span>\n </div>\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutFormFacturacion.controls.lastName.touched && checkoutFormFacturacion.controls.lastName.errors?.pattern\">\n <span class=\"text-danger\">{{'last-name-help2'|translate}}</span>\n </div>\n </div>\n </div>\n <div class=\"row mt-df\">\n <!--Fila 2-->\n <div class=\"form-group col-12 col-md-6\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.phoneNumber.enabled\">\n <label class=\"field-label\">{{'phone'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.phoneNumber.required\"\n class=\"required\">*</span></label>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\"\n name=\"phoneNumber\"\n [formControl]=\"checkoutFormFacturacion.controls['phoneNumber']\" value=\"\"\n placeholder=\"\" autocomplete=\"off\">\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutFormFacturacion.controls.phoneNumber.touched && checkoutFormFacturacion.controls.phoneNumber.errors?.required\">\n <span class=\"text-danger\">\n {{'phone-help1'|translate}}\n </span>\n </div>\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutFormFacturacion.controls.phoneNumber.touched && checkoutFormFacturacion.controls.phoneNumber.errors?.pattern\">\n <span class=\"text-danger\">\n {{'phone-help2'|translate}}\n </span>\n </div>\n </div>\n <div class=\"form-group col-12 col-md-6\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.email.enabled\">\n <label class=\"field-label\">{{'email-address'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.email.required\"\n class=\"required\">*</span></label>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"email\" name=\"email\"\n [formControl]=\"checkoutFormFacturacion.controls['email']\" value=\"\"\n placeholder=\"\" autocomplete=\"off\">\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutFormFacturacion.controls.email.touched && checkoutFormFacturacion.controls.email.errors?.required\">\n <span class=\"text-danger\">\n {{'email-address-help1'|translate}}\n </span>\n </div>\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutFormFacturacion.controls.email.touched && checkoutFormFacturacion.controls.email.errors?.email\">\n <span class=\"text-danger\">\n {{'email-address-help2'|translate}}\n </span>\n </div>\n </div>\n </div>\n <div class=\"row mt-df\">\n <!--Fila 3-->\n\n <ng-container\n *ngIf=\"this.addressingService.getTypeForm().viewForms.countryCode.enabled\">\n\n <div class=\"form-group col-12 col-md-4\"\n *ngIf=\"(countriesFacturacion$ | async) as countries\">\n <label class=\"field-label\">{{'country'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.countryCode.required\"\n class=\"required\">*</span></label>\n <select class=\"form-select\" name=\"countryCode\"\n [formControl]=\"checkoutFormFacturacion.controls['countryCode']\"\n (change)=\"onCountrySelectedFacturacion($event.target.value)\">\n <!-- <option selected [value]=\"null\">{{ 'choose-country' | translate }}</option> -->\n <option *ngFor=\"let country of countries\" [value]=\"country.code\">\n {{ country.name }}</option>\n </select>\n <div *ngIf=\"checkoutFormFacturacion.controls.countryCode.touched && checkoutFormFacturacion.controls.countryCode.errors?.required\"\n class=\"text text-danger\">\n {{'country-help'|translate}}\n </div>\n </div>\n </ng-container>\n <ng-container\n *ngIf=\"this.addressingService.getTypeForm().viewForms.provinceCode.enabled\">\n\n <div class=\"form-group col-12 col-md-4\"\n *ngIf=\"(provincesFacturacion$ | async) as provinces\">\n <label class=\"field-label\">{{'state'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.provinceCode.required\"\n class=\"required\">*</span></label>\n <select class=\"form-select\" name=\"provinceCode\"\n (change)=\"onProvincesSelectedFacturacion($event.target.value)\"\n [formControl]=\"checkoutFormFacturacion.controls['provinceCode']\">\n <!-- <option selected [value]=\"null\">{{ 'choose-province' | translate }}</option> -->\n <option *ngFor=\"let province of provinces\" [value]=\"province.code\">\n {{ province.name }}\n </option>\n </select>\n <div *ngIf=\"checkoutFormFacturacion.controls.provinceCode.touched && checkoutFormFacturacion.controls.provinceCode.errors?.required\"\n class=\"text text-danger\">\n {{'state-help'|translate}}\n </div>\n </div>\n </ng-container>\n <div class=\"form-group col-12 col-md-4\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.city.enabled\">\n <label class=\"field-label\">{{'town-city'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.city.required\"\n class=\"required\">*</span></label>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"city\"\n [formControl]=\"checkoutFormFacturacion.controls['city']\" value=\"\" placeholder=\"\"\n autocomplete=\"off\">\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutFormFacturacion.controls.city.touched && checkoutFormFacturacion.controls.city.errors?.required\">\n <span class=\"text-danger\">{{'town-city-help'|translate}}</span>\n </div>\n </div>\n </div>\n <div class=\"row mt-df\">\n <!--Fila 4-->\n <div class=\"form-group col-12 col-md-8\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.street.enabled\">\n <label class=\"field-label\">{{'address'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.street.required\"\n class=\"required\">*</span></label>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"street\"\n [formControl]=\"checkoutFormFacturacion.controls['street']\" value=\"\"\n placeholder=\"\" autocomplete=\"off\">\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutFormFacturacion.controls.street.touched && checkoutFormFacturacion.controls.street.errors?.required\">\n <span class=\"text-danger\">{{'address-help1'|translate}}</span>\n </div>\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutFormFacturacion.controls.street.touched && checkoutFormFacturacion.controls.street.errors?.maxlength\">\n <span class=\"text-danger\">{{'address-help2'|translate}}</span>\n </div>\n </div>\n <div class=\"form-group col-12 col-md-4\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.postcode.enabled\">\n <label class=\"field-label\">{{'postal-code'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.postcode.required\"\n class=\"required\">*</span></label>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"postcode\"\n [formControl]=\"checkoutFormFacturacion.controls['postcode']\" value=\"\"\n placeholder=\"\" autocomplete=\"off\">\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutFormFacturacion.controls.postcode.touched && checkoutFormFacturacion.controls.postcode.errors?.required\">\n <span class=\"text-danger\">{{'postal-code-help'|translate}}</span>\n </div>\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutFormFacturacion.controls.postcode.touched && checkoutFormFacturacion.controls.postcode.errors?.pattern\">\n <span class=\"text-danger\">{{postalCodeErrorMessage |translate}}</span>\n </div>\n </div>\n </div>\n <div class=\"row mt-df\">\n <!--Fila 5-->\n <ng-container *ngIf=\"this.addressingService.getTypeForm().viewForms.documentType.enabled\">\n <div class=\"form-group col-12 col-md-4\" *ngIf=\"(documentTypesFacturacion$ | async) as documentTypes\">\n <label class=\"field-label\">{{'document-type'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentType.required\"\n class=\"required\">*</span></label>\n <select name=\"documentType\" class=\"form-select\"\n [formControl]=\"checkoutFormFacturacion.controls['documentType']\"\n (change)=\"onDocumentTypesSelectedFacturacion($event.target.value)\">\n <!-- <option [value]=\"''\" selected>{{'document-type'|translate}}</option> -->\n <option\n *ngFor=\"let item of documentTypes\"\n [value]=\"item.code\">{{item.name}}</option>\n </select>\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutFormFacturacion.controls.documentType.touched && checkoutFormFacturacion.controls.documentType.errors?.required\">\n <span class=\"text-danger\">\n {{'type-document-help'|translate}}\n </span>\n </div>\n </div>\n <div class=\"form-group col-12 col-md-4\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentNumber.enabled\">\n <label class=\"field-label\">{{'document-number'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentNumber.required\"\n class=\"required\">*</span></label>\n <input (change)=\"onInputChange()\" class=\"form-control\"\n [type]=\"'text'\" name=\"documentNumber\"\n [formControl]=\"checkoutFormFacturacion.controls['documentNumber']\"\n placeholder=\"\" autocomplete=\"off\">\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutFormFacturacion.controls.documentNumber.touched && checkoutFormFacturacion.controls.documentNumber.errors?.required\">\n <span class=\"text-danger\">\n {{'document-number-help'|translate}}\n </span>\n </div>\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutFormFacturacion.controls.documentNumber.touched && checkoutFormFacturacion.controls.documentNumber.errors?.pattern\">\n <span class=\"text-danger\">{{ documentErrorMessage | translate }}</span>\n </div>\n </div>\n </ng-container>\n </div>\n <div class=\"row mt-df\" *ngIf=\"this.consts.getChannel() != 'mdj-empresa-a'\">\n <div class=\"form-group col-12 col-md-12\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.enabled\">\n <label class=\"field-label\" *ngIf=\"!getLabelNotesParam()\">{{'notes'|translate}}aaa <span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\"\n class=\"required\">*</span></label>\n <label class=\"field-label\" *ngIf=\"getLabelNotesParam() as labelNotesHtml\">\n <div [innerHTML]=\"labelNotesHtml\"></div>\n <span *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\" class=\"required\">*</span>\n </label>\n\n <!-- <label class=\"field-label\">{{'notes'|translate}}<span *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\" class=\"required\">*</span></label> -->\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"notes\"\n [formControl]=\"checkoutFormFacturacion.controls['notes']\" value=\"\"\n placeholder=\"\" autocomplete=\"off\">\n </div>\n </div>\n </form>\n </div>\n\n </div>\n </div>\n </div>\n </div>\n</ng-template>\n\n\n\n<ng-template #template>\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <button type=\"button\" class=\"btn-close float-end\" aria-label=\"Close\" (click)=\"modalRef.hide()\">\n </button>\n </div>\n </div>\n\n <div class=\"modal-body scrol-if\">\n <app-section-container-ec [name]=\"'terminos-y-condiciones'\"> </app-section-container-ec>\n </div>\n\n</ng-template>\n\n\n<ng-template #addressBookNotResult>\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-12 text-center my-2\">\n <h4> {{'address-book-not-result' | translate }} </h4>\n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #addressBookLoading>\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-12 text-center my-2\">\n <div class=\"d-flex flex-column jusitfy-content-center align-items-center\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n </div>\n </div>\n </div>\n</ng-template>\n</ng-container>\n\n<ng-template #pleaseLogin>\n <div class=\"container\">\n <p>Por favor <a [routerLink]=\"['/auth/login']\" > Inicie Sesi\u00F3n</a></p>\n </div>\n</ng-template>",
|
|
7233
|
+
template: "<ng-container\n *ngIf=\"this.channelConfig.channelType != 'b2b' || (this.channelConfig.channelType == 'b2b' && authService.isAuthenticated()); else pleaseLogin\">\n <ng-container\n *ngIf=\"this.addressingService.modeSelectAddress == 'LOAD_ADDRESS_AND_SELECTION' && this.authService.isAuthenticated() && this.addressBook != null\">\n <div class=\"container card p-4 mb-3\">\n <div class=\"row justify-content-center\">\n <div class=\"col-12 col-md-10 col-lg-8 text-center\">\n <div class=\"btn-group btn-group-toggle\" data-bs-toggle=\"buttons\">\n <label [class]=\"'btn btn-outline-secondary ' + (!getMode() ? 'active' : '')\">\n <input type=\"radio\" name=\"options\" id=\"option1\" autocomplete=\"off\" checked\n (change)=\"setMode('seleccion')\"> {{'select-address' | translate | titlecase}}\n </label>\n\n <label [class]=\"'btn btn-outline-secondary ' + (getMode() ? 'active' : '')\"\n *ngIf=\"!getParamByChannelAndLanguage('btn_new_address_')\">\n <input type=\"radio\" name=\"options\" id=\"option2\" autocomplete=\"off\"\n (change)=\"setMode('carga')\">\n {{ 'new-address' | translate | titlecase}}\n </label>\n\n <label [class]=\"'btn btn-outline-secondary ' + (selectAddress ? 'active' : '')\"\n *ngIf=\"getParamByChannelAndLanguage('btn_new_address_') as param\">\n <input type=\"radio\" name=\"options\" id=\"option2\" autocomplete=\"off\"\n (change)=\"setMode('carga')\">\n {{ param.value}}\n </label>\n\n </div>\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"getMode(); else addressSelection\">\n <div *ngIf=\"!require_login; else requireLoginView\">\n\n <ng-container *ngIf=\"this.addressingService.modeSelectAddress == 'ONLY_LOAD_ADDRESS'\">\n <div class=\"checkout-title my-2\">\n <h3>{{'billing-details'|translate}}</h3>\n </div>\n </ng-container>\n\n <form (submit)=\"verifyValidate(false,this.cartService.items)\">\n <div class=\"row mt-df\"><!--Fila 1-->\n <div class=\"form-group col-12 col-md-6\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.firstName.enabled\">\n <label class=\"field-label\">{{'first-name'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.firstName.required\"\n class=\"required\">*</span></label>\n <input class=\"form-control\" type=\"text\" name=\"firstName\"\n [formControl]=\"checkoutForm.controls['firstName']\" value=\"\" placeholder=\"\"\n autocomplete=\"off\">\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutForm.controls.firstName.touched && checkoutForm.controls.firstName.errors?.required\">\n <span class=\"text-danger\">{{'first-name-help1'|translate}}</span>\n\n </div>\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutForm.controls.firstName.touched && checkoutForm.controls.firstName.errors?.pattern\">\n <span class=\"text-danger\">\n {{'first-name-help2'|translate}}\n </span>\n </div>\n </div>\n <div class=\"form-group col-12 col-md-6\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.lastName.enabled\">\n <label class=\"field-label\">{{'last-name'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.lastName.required\"\n class=\"required\">*</span></label>\n <input class=\"form-control\" type=\"text\" name=\"lastName\"\n [formControl]=\"checkoutForm.controls['lastName']\" value=\"\" placeholder=\"\"\n autocomplete=\"off\">\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutForm.controls.lastName.touched && checkoutForm.controls.lastName.errors?.required\">\n <span class=\"text-danger\">{{'last-name-help1'|translate}}</span>\n </div>\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutForm.controls.lastName.touched && checkoutForm.controls.lastName.errors?.pattern\">\n <span class=\"text-danger\">{{'last-name-help2'|translate}}</span>\n </div>\n </div>\n </div>\n <div class=\"row mt-df\"><!--Fila 2-->\n <div class=\"form-group col-12 col-md-6\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.phoneNumber.enabled\">\n <label class=\"field-label\">{{'phone'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.phoneNumber.required\"\n class=\"required\">*</span></label>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"phoneNumber\"\n [formControl]=\"checkoutForm.controls['phoneNumber']\" value=\"\" placeholder=\"\"\n autocomplete=\"off\">\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutForm.controls.phoneNumber.touched && checkoutForm.controls.phoneNumber.errors?.required\">\n <span class=\"text-danger\">\n\n {{'phone-help1'|translate}}\n </span>\n </div>\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutForm.controls.phoneNumber.touched && checkoutForm.controls.phoneNumber.errors?.pattern\">\n <span class=\"text-danger\">\n {{'phone-help2'|translate}}\n </span>\n </div>\n </div>\n <div class=\"form-group col-12 col-md-6\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.email.enabled\">\n <label class=\"field-label\">{{'email-address'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.email.required\"\n class=\"required\">*</span></label>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"email\" name=\"email\"\n [formControl]=\"checkoutForm.controls['email']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutForm.controls.email.touched && checkoutForm.controls.email.errors?.required\">\n <span class=\"text-danger\">\n {{'email-address-help1'|translate}}\n </span>\n </div>\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutForm.controls.email.touched && checkoutForm.controls.email.errors?.email\">\n <span class=\"text-danger\">\n {{'email-address-help2'|translate}}\n </span>\n </div>\n </div>\n </div>\n\n <div class=\"row mt-df\"><!--Fila 3-->\n <ng-container *ngIf=\"this.addressingService.getTypeForm().viewForms.countryCode.enabled\">\n <div class=\"form-group col-12 col-md-4\" *ngIf=\"(countries$ | async) as countries\">\n <label class=\"field-label\">{{'country'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.countryCode.required\"\n class=\"required\">*</span></label>\n <select class=\"form-select\" name=\"countryCode\"\n [formControl]=\"checkoutForm.controls['countryCode']\"\n (change)=\"onCountrySelected($event.target.value)\">\n <!-- <option selected [value]=\"countries[0].code\">{{ 'choose-country' | translate }}</option> -->\n <option *ngFor=\"let country of countries\" [value]=\"country.code\">{{ country.name }}\n </option>\n </select>\n <div *ngIf=\"checkoutForm.controls.countryCode.touched && checkoutForm.controls.countryCode.errors?.required\"\n class=\"text text-danger\">\n {{'country-help'|translate}}\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"this.addressingService.getTypeForm().viewForms.provinceCode.enabled\">\n <div class=\"form-group col-12 col-md-4\" *ngIf=\"(provinces$ | async) as provinces\">\n <label class=\"field-label\">{{'state'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.provinceCode.required\"\n class=\"required\">*</span></label>\n <select class=\"form-select\" name=\"provinceCode\"\n (change)=\"onProvincesSelected($event.target.value)\"\n [formControl]=\"checkoutForm.controls['provinceCode']\">\n <!-- <option selected [value]=\"null\">{{ 'choose-province' | translate }}</option>\n -->\n <option *ngFor=\"let province of provinces\" [value]=\"province.code\">{{ province.name }}\n </option>\n </select>\n <div *ngIf=\"checkoutForm.controls.provinceCode.touched && checkoutForm.controls.provinceCode.errors?.required\"\n class=\"text text-danger\">\n {{'state-help'|translate}}\n </div>\n </div>\n </ng-container>\n <div class=\"form-group col-12 col-md-4\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.city.enabled\">\n <label class=\"field-label\">{{'town-city'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.city.required\"\n class=\"required\">*</span></label>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"city\"\n [formControl]=\"checkoutForm.controls['city']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutForm.controls.city.touched && checkoutForm.controls.city.errors?.required\">\n <span class=\"text-danger\">{{'town-city-help'|translate}}</span>\n </div>\n </div>\n </div>\n\n <div class=\"row mt-df\"><!--Fila 4-->\n <div class=\"form-group col-12 col-md-8\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.street.enabled\">\n <label class=\"field-label\">{{'address'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.street.required\"\n class=\"required\">*</span>\n <span class=\"char-count ms-2\" style=\"font-size: 0.9em; color: #888;\">\n {{ 50 - (checkoutForm.controls['street'].value?.length || 0) }} {{'remainingCharacters'|translate}}\n </span>\n </label>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"street\"\n [formControl]=\"checkoutForm.controls['street']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutForm.controls.street.touched && checkoutForm.controls.street.errors?.required\">\n <span class=\"text-danger\">{{'address-help1'|translate}}</span>\n </div>\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutForm.controls.street.touched && checkoutForm.controls.street.errors?.maxlength\">\n <span class=\"text-danger\">{{'address-help2'|translate}}</span>\n </div>\n </div>\n\n <!-- form direcci\u00F3n -->\n <div class=\"form-group col-12 col-md-4\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.postcode.enabled\">\n <label class=\"field-label\">{{'postal-code'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.postcode.required\"\n class=\"required\">*</span></label>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"postcode\"\n [formControl]=\"checkoutForm.controls['postcode']\" value=\"\" placeholder=\"\"\n autocomplete=\"off\">\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutForm.controls.postcode.touched && checkoutForm.controls.postcode.errors?.required\">\n <span class=\"text-danger\">{{'postal-code-help'|translate}}</span>\n </div>\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutForm.controls.postcode.touched && checkoutForm.controls.postcode.errors?.pattern\">\n <span class=\"text-danger\"> {{postalCodeErrorMessage | translate}} </span>\n </div>\n </div>\n </div>\n\n <div class=\"row mt-df\"><!--Fila 5-->\n <ng-container *ngIf=\"this.addressingService.getTypeForm().viewForms.documentType.enabled\">\n <div class=\"form-group col-12 col-md-4\" *ngIf=\"(documentTypes$ | async) as documentTypes\">\n <label class=\"field-label\">{{'document-type'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentType.required\"\n class=\"required\">*</span></label>\n <select name=\"documentType\" class=\"form-select\"\n (change)=\"onDocumentTypesSelected($event.target.value)\"\n [formControl]=\"checkoutForm.controls['documentType']\">\n <!-- <option [value]=\"''\" selected>{{'document-type'|translate}}</option>\n -->\n <option *ngFor=\"let item of documentTypes\" [value]=\"item.code\">{{item.name}}</option>\n </select>\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutForm.controls.documentType.touched && checkoutForm.controls.documentType.errors?.required\">\n <span class=\"text-danger\">\n {{'type-document-help'|translate}}\n </span>\n </div>\n </div>\n </ng-container>\n <div class=\"form-group col-12 col-md-4\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentNumber.enabled\">\n <label class=\"field-label\">{{'document-number'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentNumber.required\"\n class=\"required\">*</span></label>\n <input (change)=\"onInputChange()\" class=\"form-control\" [type]=\"'text'\" name=\"documentNumber\"\n [formControl]=\"checkoutForm.controls['documentNumber']\" placeholder=\"\" autocomplete=\"off\">\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutForm.controls.documentNumber.touched && checkoutForm.controls.documentNumber.errors?.required\">\n <span class=\"text-danger\">{{ 'document-number-help' | translate }}</span>\n </div>\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutForm.controls.documentNumber.touched && checkoutForm.controls.documentNumber.errors?.pattern\">\n <span class=\"text-danger\">{{ documentErrorMessage | translate }}</span>\n </div>\n </div>\n </div>\n\n <div class=\"row mt-df\" *ngIf=\"this.consts.getChannel() != 'mdj-empresa-a'\"><!--Fila 6-->\n <div class=\"form-group col-12 col-md-12\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.enabled\">\n\n <label class=\"field-label\" *ngIf=\"!getLabelNotesParam()\">{{'notes'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\"\n class=\"required\">*</span></label>\n <label class=\"field-label\" *ngIf=\"getLabelNotesParam() as labelnotes\"\n [innerHTML]=\"labelnotes.value\"><span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\"\n class=\"required\">*</span></label>\n\n <!-- <label class=\"field-label\">{{'notes'|translate}}<span *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\" class=\"required\">*</span></label> -->\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"notes\"\n [formControl]=\"checkoutForm.controls['notes']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\n </div>\n </div>\n <div class=\"row mt-df\"><!--Fila 7-->\n <div class=\"form-group col-12 col-md-12\">\n <label for=\"formFact\"><b>{{ 'same-billing-address' | translate }}</b> <input type=\"checkbox\"\n class=\"ms-2\" [checked]=\"viewDataFacturacion\" (change)=\"showFormFacturacion()\"\n id=\"formFact\"></label>\n </div>\n </div>\n <div class=\"row mt-df\">\n <div class=\"col-12\">\n <p>\n <!-- <span class=\"required\"></span> -->\n <label class=\"required text-underline\">* {{ 'required-fields' | translate }}</label>\n </p>\n </div>\n </div>\n <div class=\"row mt-df\">\n <div class=\"form-group col-12 col-md-12\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.terms.enabled\">\n <span *ngIf=\"this.addressingService.getTypeForm().viewForms.terms.required\"\n class=\"required\">*</span>\n <label class=\"\" for=\"\"> {{ 'accept-terms' | translate }} <input class=\"ms-2\" name=\"terms\"\n [formControl]=\"checkoutForm.controls['terms']\" type=\"checkbox\" required\n (change)=\"onInputChange()\" /> </label><br />\n <a (click)=\"openModal(template)\" role=\"button\" class=\"ms-3 nota-input text-dark\">{{ 'whats-this'\n |\n translate }}</a>\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutForm.controls.terms.touched && !checkoutForm.controls.terms.value\">\n <span class=\"text-danger\">{{ 'must-accept-terms' | translate }}</span>\n </div>\n </div>\n </div>\n <div class=\"row\" *ngIf=\"viewDataFacturacion ; else datosFormFacturacion\"> </div>\n <div class=\"checkout-btn-unique text-end\">\n <button type=\"submit\" [disabled]=\"!validado\" class=\"btn valid-btn mt-2\">\n {{(isLastOne ? 'finish-checkout' : (allready_data ? 'update' :\n 'ready-form')) | translate}}</button>\n\n\n </div>\n <div *ngIf=\"loading\" class=\"d-flex flex-column jusitfy-content-center align-items-center\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n </form>\n </div>\n </ng-container>\n\n <ng-template #addressSelection>\n\n <ng-container *ngIf=\"this.addressingService.modeSelectAddress == 'ONLY_ADDRESS_SELECTION'\">\n <div class=\"checkout-title my-2\">\n <h3>{{'address-selection'|translate}}</h3>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"this.addressBook; else addressBookNotResult\">\n\n <ng-container *ngIf=\"this.addressBook?.length ;else addressBookLoading\">\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-sm-6 col-12 my-3\" *ngFor=\"let item of addressBook; let i = index\">\n <div class=\"card p-3\">\n <input class=\"ms-1 mt-3 form-check-input input-size-lg\" type=\"radio\" [name]=\"'n-'+i\"\n [id]=\"i\" [checked]=\"item.selected\" (click)=\"setSelectAddress(item)\"\n (change)=\"onInputChange()\">\n <div class=\"ms-5\">\n <h4 class=\"card-title\">\n <strong>{{'address'|translate}}</strong><br>\n <span class=\"text-uppercase h3\">{{item.street}}</span>\n </h4>\n <div class=\"row\">\n <h5 class=\"card-subtitle mb-2 text-muted col-auto\">\n <strong>{{'country'|translate}}</strong> {{getCountry(item.countryCode)}}\n </h5>\n <h5 class=\"card-subtitle mb-2 text-muted col-auto\">\n <strong>{{'state'|translate}}</strong> {{getProvince(item.provinceCode)}}\n </h5>\n <h5 class=\"card-subtitle mb-2 text-muted col-auto\">\n <strong>{{'town-city'|translate}}</strong> {{item.city}}\n </h5>\n <h5 class=\"card-subtitle mb-2 text-muted col-auto\">\n <strong>{{'postal-code'|translate}}</strong> {{item.postcode}}\n </h5>\n </div>\n <div class=\"row px-3\">\n <div class=\"card p-2 bg-light w-100\">\n <div class=\"card-body\">\n <h5 class=\"card-title\">{{'address-contact'|translate}}</h5>\n <h6 class=\"card-subtitle mb-2 text-muted\">\n <strong>{{'first-name'|translate}}</strong>\n {{item.addressContact.firstName}}\n </h6>\n <h6 class=\"card-subtitle mb-2 text-muted\">\n <strong>{{'last-name'|translate}}</strong>\n {{item.addressContact.lastName}}\n </h6>\n <h6 class=\"card-subtitle mb-2 text-muted\">\n <strong>{{'document-type'|translate}}</strong>\n {{getDocumentType(item.addressContact.documentType)}}\n </h6>\n <h6 class=\"card-subtitle mb-2 text-muted\">\n <strong>{{'document-number'|translate}}</strong>\n {{item.addressContact.documentNumber}}\n </h6>\n <h6 class=\"card-subtitle mb-2 text-muted\">\n <strong>{{'email-address'|translate}}</strong>\n {{item.addressContact.email}}\n </h6>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n </div>\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. -->\n <div class=\"w-100\" *ngIf=\"this.consts.getChannel() != 'mdj-empresa-a'\">\n <ng-container *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.enabled\">\n <div class=\"row mt-df\">\n <div class=\"form-group col-12 col-md-12\">\n <label class=\"field-label\" *ngIf=\"!getLabelNotesParam()\">{{'notes'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\"\n class=\"required\">*</span></label>\n <label class=\"field-label\" *ngIf=\"getLabelNotesParam() as labelnotes\"\n [innerHTML]=\"labelnotes.value\"></label>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"notes\"\n [(ngModel)]=\"this.addressBookSelected.notes\" #ctrl=\"ngModel\" value=\"\"\n placeholder=\"\" autocomplete=\"off\">\n <div class=\"invalid-feedback d-block\" *ngIf=\"\n addressingService.getTypeForm().viewForms.notes.required\n && (!addressBookSelected.notes || !addressBookSelected.notes.trim())\n \">\n {{ 'required-field' | translate }}\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n <div class=\"checkout-btn-unique text-end\">\n <button (click)=\"selectAddress(this.cartService.items)\" class=\"btn valid-btn mt-2\">\n {{(isLastOne ? 'finish-checkout' : (allready_data ? 'update' :\n 'ready-form')) | translate}}\n </button>\n </div>\n <div *ngIf=\"loading\" class=\"d-flex flex-column jusitfy-content-center align-items-center\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n </div>\n </ng-container>\n </ng-container>\n\n </ng-template>\n\n\n <ng-template #requireLoginView>\n <div id=\"loginCheckout\">\n <div class=\"d-flex flex-column jusitfy-content-center align-items-center\" *ngIf=\"require_login\">\n <div class=\"col-12\">\n <app-login-form-ec (ready)=\"verifyValidate($event)\" [redirect]=\"false\" [title]=\"'need-login'\">\n </app-login-form-ec>\n </div>\n </div>\n </div>\n </ng-template>\n\n\n\n <ng-template #datosFormFacturacion>\n <div class=\"container-fluid px-0 px-md-2\">\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"card \">\n <div class=\"card-header text-dark text-center\">\n <h3>{{'billing-data'|translate}}</h3>\n </div>\n <div class=\"card-body\">\n <form (submit)=\"verifyValidate()\">\n <div class=\"row mt-df\">\n <!--Fila 1-->\n <div class=\"form-group col-12 col-md-6\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.firstName.enabled\">\n <label class=\"field-label\">{{'first-name'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.firstName.required\"\n class=\"required\">*</span></label>\n <input class=\"form-control\" type=\"text\" name=\"firstName\"\n [formControl]=\"checkoutFormFacturacion.controls['firstName']\" value=\"\"\n placeholder=\"\" autocomplete=\"off\">\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutFormFacturacion.controls.firstName.touched && checkoutFormFacturacion.controls.firstName.errors?.required\">\n <span class=\"text-danger\">{{'first-name-help1'|translate}}</span>\n\n </div>\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutFormFacturacion.controls.firstName.touched && checkoutFormFacturacion.controls.firstName.errors?.pattern\">\n <span class=\"text-danger\">\n {{'first-name-help2'|translate}}\n </span>\n </div>\n </div>\n <div class=\"form-group col-12 col-md-6\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.lastName.enabled\">\n <label class=\"field-label\">{{'last-name'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.lastName.required\"\n class=\"required\">*</span></label>\n <input class=\"form-control\" type=\"text\" name=\"lastName\"\n [formControl]=\"checkoutFormFacturacion.controls['lastName']\" value=\"\"\n placeholder=\"\" autocomplete=\"off\">\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutFormFacturacion.controls.lastName.touched && checkoutFormFacturacion.controls.lastName.errors?.required\">\n <span class=\"text-danger\">{{'last-name-help1'|translate}}</span>\n </div>\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutFormFacturacion.controls.lastName.touched && checkoutFormFacturacion.controls.lastName.errors?.pattern\">\n <span class=\"text-danger\">{{'last-name-help2'|translate}}</span>\n </div>\n </div>\n </div>\n <div class=\"row mt-df\">\n <!--Fila 2-->\n <div class=\"form-group col-12 col-md-6\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.phoneNumber.enabled\">\n <label class=\"field-label\">{{'phone'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.phoneNumber.required\"\n class=\"required\">*</span></label>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\"\n name=\"phoneNumber\"\n [formControl]=\"checkoutFormFacturacion.controls['phoneNumber']\" value=\"\"\n placeholder=\"\" autocomplete=\"off\">\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutFormFacturacion.controls.phoneNumber.touched && checkoutFormFacturacion.controls.phoneNumber.errors?.required\">\n <span class=\"text-danger\">\n {{'phone-help1'|translate}}\n </span>\n </div>\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutFormFacturacion.controls.phoneNumber.touched && checkoutFormFacturacion.controls.phoneNumber.errors?.pattern\">\n <span class=\"text-danger\">\n {{'phone-help2'|translate}}\n </span>\n </div>\n </div>\n <div class=\"form-group col-12 col-md-6\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.email.enabled\">\n <label class=\"field-label\">{{'email-address'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.email.required\"\n class=\"required\">*</span></label>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"email\" name=\"email\"\n [formControl]=\"checkoutFormFacturacion.controls['email']\" value=\"\"\n placeholder=\"\" autocomplete=\"off\">\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutFormFacturacion.controls.email.touched && checkoutFormFacturacion.controls.email.errors?.required\">\n <span class=\"text-danger\">\n {{'email-address-help1'|translate}}\n </span>\n </div>\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutFormFacturacion.controls.email.touched && checkoutFormFacturacion.controls.email.errors?.email\">\n <span class=\"text-danger\">\n {{'email-address-help2'|translate}}\n </span>\n </div>\n </div>\n </div>\n <div class=\"row mt-df\">\n <!--Fila 3-->\n\n <ng-container\n *ngIf=\"this.addressingService.getTypeForm().viewForms.countryCode.enabled\">\n\n <div class=\"form-group col-12 col-md-4\"\n *ngIf=\"(countriesFacturacion$ | async) as countries\">\n <label class=\"field-label\">{{'country'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.countryCode.required\"\n class=\"required\">*</span></label>\n <select class=\"form-select\" name=\"countryCode\"\n [formControl]=\"checkoutFormFacturacion.controls['countryCode']\"\n (change)=\"onCountrySelectedFacturacion($event.target.value)\">\n <!-- <option selected [value]=\"null\">{{ 'choose-country' | translate }}</option> -->\n <option *ngFor=\"let country of countries\" [value]=\"country.code\">\n {{ country.name }}</option>\n </select>\n <div *ngIf=\"checkoutFormFacturacion.controls.countryCode.touched && checkoutFormFacturacion.controls.countryCode.errors?.required\"\n class=\"text text-danger\">\n {{'country-help'|translate}}\n </div>\n </div>\n </ng-container>\n <ng-container\n *ngIf=\"this.addressingService.getTypeForm().viewForms.provinceCode.enabled\">\n\n <div class=\"form-group col-12 col-md-4\"\n *ngIf=\"(provincesFacturacion$ | async) as provinces\">\n <label class=\"field-label\">{{'state'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.provinceCode.required\"\n class=\"required\">*</span></label>\n <select class=\"form-select\" name=\"provinceCode\"\n (change)=\"onProvincesSelectedFacturacion($event.target.value)\"\n [formControl]=\"checkoutFormFacturacion.controls['provinceCode']\">\n <!-- <option selected [value]=\"null\">{{ 'choose-province' | translate }}</option> -->\n <option *ngFor=\"let province of provinces\" [value]=\"province.code\">\n {{ province.name }}\n </option>\n </select>\n <div *ngIf=\"checkoutFormFacturacion.controls.provinceCode.touched && checkoutFormFacturacion.controls.provinceCode.errors?.required\"\n class=\"text text-danger\">\n {{'state-help'|translate}}\n </div>\n </div>\n </ng-container>\n <div class=\"form-group col-12 col-md-4\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.city.enabled\">\n <label class=\"field-label\">{{'town-city'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.city.required\"\n class=\"required\">*</span></label>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"city\"\n [formControl]=\"checkoutFormFacturacion.controls['city']\" value=\"\"\n placeholder=\"\" autocomplete=\"off\">\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutFormFacturacion.controls.city.touched && checkoutFormFacturacion.controls.city.errors?.required\">\n <span class=\"text-danger\">{{'town-city-help'|translate}}</span>\n </div>\n </div>\n </div>\n <div class=\"row mt-df\">\n <!--Fila 4-->\n <div class=\"form-group col-12 col-md-8\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.street.enabled\">\n <label class=\"field-label\">{{'address'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.street.required\"\n class=\"required\">*</span></label>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"street\"\n [formControl]=\"checkoutFormFacturacion.controls['street']\" value=\"\"\n placeholder=\"\" autocomplete=\"off\">\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutFormFacturacion.controls.street.touched && checkoutFormFacturacion.controls.street.errors?.required\">\n <span class=\"text-danger\">{{'address-help1'|translate}}</span>\n </div>\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutFormFacturacion.controls.street.touched && checkoutFormFacturacion.controls.street.errors?.maxlength\">\n <span class=\"text-danger\">{{'address-help2'|translate}}</span>\n </div>\n </div>\n <div class=\"form-group col-12 col-md-4\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.postcode.enabled\">\n <label class=\"field-label\">{{'postal-code'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.postcode.required\"\n class=\"required\">*</span></label>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\"\n name=\"postcode\" [formControl]=\"checkoutFormFacturacion.controls['postcode']\"\n value=\"\" placeholder=\"\" autocomplete=\"off\">\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutFormFacturacion.controls.postcode.touched && checkoutFormFacturacion.controls.postcode.errors?.required\">\n <span class=\"text-danger\">{{'postal-code-help'|translate}}</span>\n </div>\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutFormFacturacion.controls.postcode.touched && checkoutFormFacturacion.controls.postcode.errors?.pattern\">\n <span class=\"text-danger\">{{postalCodeErrorMessage |translate}}</span>\n </div>\n </div>\n </div>\n <div class=\"row mt-df\">\n <!--Fila 5-->\n <ng-container\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentType.enabled\">\n <div class=\"form-group col-12 col-md-4\"\n *ngIf=\"(documentTypesFacturacion$ | async) as documentTypes\">\n <label class=\"field-label\">{{'document-type'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentType.required\"\n class=\"required\">*</span></label>\n <select name=\"documentType\" class=\"form-select\"\n [formControl]=\"checkoutFormFacturacion.controls['documentType']\"\n (change)=\"onDocumentTypesSelectedFacturacion($event.target.value)\">\n <!-- <option [value]=\"''\" selected>{{'document-type'|translate}}</option> -->\n <option *ngFor=\"let item of documentTypes\" [value]=\"item.code\">\n {{item.name}}</option>\n </select>\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutFormFacturacion.controls.documentType.touched && checkoutFormFacturacion.controls.documentType.errors?.required\">\n <span class=\"text-danger\">\n {{'type-document-help'|translate}}\n </span>\n </div>\n </div>\n <div class=\"form-group col-12 col-md-4\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentNumber.enabled\">\n <label class=\"field-label\">{{'document-number'|translate}}<span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentNumber.required\"\n class=\"required\">*</span></label>\n <input (change)=\"onInputChange()\" class=\"form-control\" [type]=\"'text'\"\n name=\"documentNumber\"\n [formControl]=\"checkoutFormFacturacion.controls['documentNumber']\"\n placeholder=\"\" autocomplete=\"off\">\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutFormFacturacion.controls.documentNumber.touched && checkoutFormFacturacion.controls.documentNumber.errors?.required\">\n <span class=\"text-danger\">\n {{'document-number-help'|translate}}\n </span>\n </div>\n <div class=\"text-danger-container\"\n *ngIf=\"checkoutFormFacturacion.controls.documentNumber.touched && checkoutFormFacturacion.controls.documentNumber.errors?.pattern\">\n <span class=\"text-danger\">{{ documentErrorMessage | translate }}</span>\n </div>\n </div>\n </ng-container>\n </div>\n <div class=\"row mt-df\" *ngIf=\"this.consts.getChannel() != 'mdj-empresa-a'\">\n <div class=\"form-group col-12 col-md-12\"\n *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.enabled\">\n <label class=\"field-label\"\n *ngIf=\"!getLabelNotesParam()\">{{'notes'|translate}}aaa <span\n *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\"\n class=\"required\">*</span></label>\n <label class=\"field-label\" *ngIf=\"getLabelNotesParam() as labelNotesHtml\">\n <div [innerHTML]=\"labelNotesHtml\"></div>\n <span *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\"\n class=\"required\">*</span>\n </label>\n\n <!-- <label class=\"field-label\">{{'notes'|translate}}<span *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\" class=\"required\">*</span></label> -->\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"notes\"\n [formControl]=\"checkoutFormFacturacion.controls['notes']\" value=\"\"\n placeholder=\"\" autocomplete=\"off\">\n </div>\n </div>\n </form>\n </div>\n\n </div>\n </div>\n </div>\n </div>\n </ng-template>\n\n\n\n <ng-template #template>\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <button type=\"button\" class=\"btn-close float-end\" aria-label=\"Close\" (click)=\"modalRef.hide()\">\n </button>\n </div>\n </div>\n\n <div class=\"modal-body scrol-if\">\n <app-section-container-ec [name]=\"'terminos-y-condiciones'\"> </app-section-container-ec>\n </div>\n\n </ng-template>\n\n\n <ng-template #addressBookNotResult>\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-12 text-center my-2\">\n <h4> {{'address-book-not-result' | translate }} </h4>\n </div>\n </div>\n </div>\n </ng-template>\n\n <ng-template #addressBookLoading>\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-12 text-center my-2\">\n <div class=\"d-flex flex-column jusitfy-content-center align-items-center\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n </div>\n </div>\n </div>\n </ng-template>\n</ng-container>\n\n<ng-template #pleaseLogin>\n <div class=\"container\">\n <p>Por favor <a [routerLink]=\"['/auth/login']\"> Inicie Sesi\u00F3n</a></p>\n </div>\n</ng-template>",
|
|
7232
7234
|
providers: [BsModalService],
|
|
7233
7235
|
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}"]
|
|
7234
7236
|
})
|
|
@@ -8666,28 +8668,11 @@ let CurrencyService = class CurrencyService {
|
|
|
8666
8668
|
this.getCurrencyListApi = () => 'shop-api/currencies';
|
|
8667
8669
|
this.getConvertibilityApi = (baseCurrency, targetCurrency) => 'shop-api/currencies?baseCurrency=' + baseCurrency + '&targetCurrency=' + targetCurrency;
|
|
8668
8670
|
/**
|
|
8669
|
-
* @description Se carga la moneda por defecto
|
|
8671
|
+
* @description Se carga la moneda por defecto.
|
|
8670
8672
|
*/
|
|
8671
|
-
this.loadDefaultCurrency = (
|
|
8672
|
-
|
|
8673
|
-
this.
|
|
8674
|
-
var _a;
|
|
8675
|
-
this.currencyListSubject.next(list);
|
|
8676
|
-
this.consts.setCurrencyTypeConfig(list);
|
|
8677
|
-
const cfg = (_a = list) === null || _a === void 0 ? void 0 : _a.find(c => c.code === currencyCode);
|
|
8678
|
-
if (cfg) {
|
|
8679
|
-
// Setea moneda activa con su configuración completa
|
|
8680
|
-
this.consts.setCurrency(cfg.code, cfg);
|
|
8681
|
-
}
|
|
8682
|
-
else {
|
|
8683
|
-
this.consts.setCurrency(currencyCode);
|
|
8684
|
-
}
|
|
8685
|
-
this.load();
|
|
8686
|
-
}).catch(() => {
|
|
8687
|
-
// En caso de error, al menos fijá el código para no romper el flujo
|
|
8688
|
-
this.consts.setCurrency(currencyCode);
|
|
8689
|
-
this.load();
|
|
8690
|
-
});
|
|
8673
|
+
this.loadDefaultCurrency = (currency) => {
|
|
8674
|
+
this.consts.setCurrency(currency);
|
|
8675
|
+
this.load();
|
|
8691
8676
|
};
|
|
8692
8677
|
/**
|
|
8693
8678
|
* @description calcula la convetibilidad del precio pasado por paramentro segun esta formula:
|
|
@@ -8706,32 +8691,12 @@ let CurrencyService = class CurrencyService {
|
|
|
8706
8691
|
this.getConvertibility(this.consts.currency.code, code);
|
|
8707
8692
|
});
|
|
8708
8693
|
/**
|
|
8709
|
-
* Carga la lista de monedas
|
|
8710
|
-
*
|
|
8711
|
-
* Si no existe una moneda activa guardada en `localStorage`, inicializa la moneda activa
|
|
8712
|
-
* tomando la moneda base del canal (`ChannelConfigService.baseCurrency`) y sus metadatos
|
|
8713
|
-
* obtenidos de la lista (símbolo, posición, decimales). Si no se encuentra la base en la
|
|
8714
|
-
* lista, usa la primera disponible.
|
|
8715
|
-
*
|
|
8716
|
-
* Finalmente, llama a `load()` para propagar la configuración a los observables y (si aplica)
|
|
8717
|
-
* actualizar `localStorage`.
|
|
8718
|
-
*
|
|
8719
|
-
* @sideEffect Actualiza `currencyList$`, `Constants.setCurrencyTypeConfig` y potencialmente
|
|
8720
|
-
* `Constants.setCurrency`.
|
|
8721
|
-
* @returns void
|
|
8694
|
+
* @description Carga la lista de monedas/currencies.
|
|
8722
8695
|
*/
|
|
8723
8696
|
this.loadCurrencyList = () => {
|
|
8724
8697
|
this.connection.get(this.getCurrencyListApi()).toPromise().then(res => {
|
|
8725
|
-
var _a, _b, _c, _d;
|
|
8726
8698
|
this.currencyListSubject.next(res);
|
|
8727
8699
|
this.consts.setCurrencyTypeConfig(res);
|
|
8728
|
-
const stored = localStorage.getItem('currency');
|
|
8729
|
-
if (!stored) {
|
|
8730
|
-
const base = (_a = this.injector.get(ChannelConfigService).getActiveChannel()) === null || _a === void 0 ? void 0 : _a.baseCurrency;
|
|
8731
|
-
const cfg = (_c = (_b = res) === null || _b === void 0 ? void 0 : _b.find(c => c.code === base), (_c !== null && _c !== void 0 ? _c : (_d = res) === null || _d === void 0 ? void 0 : _d[0]));
|
|
8732
|
-
if (cfg)
|
|
8733
|
-
this.consts.setCurrency(cfg.code, cfg);
|
|
8734
|
-
}
|
|
8735
8700
|
this.load();
|
|
8736
8701
|
});
|
|
8737
8702
|
};
|
|
@@ -8805,6 +8770,7 @@ let CurrencyService = class CurrencyService {
|
|
|
8805
8770
|
}
|
|
8806
8771
|
};
|
|
8807
8772
|
this.injector.get(ChannelConfigService).channelConfig$.subscribe(channel => {
|
|
8773
|
+
console.log(channel);
|
|
8808
8774
|
channel.applyCurrencyExchange ? this.loadCurrencyList() : this.loadDefaultCurrency(channel.baseCurrency);
|
|
8809
8775
|
console.log(this.enableApplyCurrencyExchange);
|
|
8810
8776
|
});
|
|
@@ -9306,6 +9272,7 @@ let ProductDetailEcComponent = class ProductDetailEcComponent extends ComponentH
|
|
|
9306
9272
|
this.showReviews = false;
|
|
9307
9273
|
this.hidePrices = false;
|
|
9308
9274
|
this.creditAccountShowPrices = null;
|
|
9275
|
+
this.enableFieldNotesInArticleFile = false;
|
|
9309
9276
|
this.addToCart = () => {
|
|
9310
9277
|
var _a;
|
|
9311
9278
|
this.quantity > 0 && this.productService.addToCart(this.quantity, undefined, ((_a = this.comments) === null || _a === void 0 ? void 0 : _a.trim()) || null);
|
|
@@ -9409,9 +9376,10 @@ let ProductDetailEcComponent = class ProductDetailEcComponent extends ComponentH
|
|
|
9409
9376
|
this.changeImgFocus(productParam.picturesdefault[0]);
|
|
9410
9377
|
});
|
|
9411
9378
|
this.injector.get(ChannelConfigService).channelConfig$.subscribe(channel => {
|
|
9412
|
-
var _a, _b;
|
|
9379
|
+
var _a, _b, _c, _d;
|
|
9413
9380
|
this.showReviews = channel.showReviews;
|
|
9414
9381
|
this.hidePrices = (_b = (_a = channel) === null || _a === void 0 ? void 0 : _a.hidePrices, (_b !== null && _b !== void 0 ? _b : false));
|
|
9382
|
+
this.enableFieldNotesInArticleFile = (_d = (_c = channel) === null || _c === void 0 ? void 0 : _c.enableFieldNotesInArticleFile, (_d !== null && _d !== void 0 ? _d : false));
|
|
9415
9383
|
});
|
|
9416
9384
|
this.cartService.showPrice$.subscribe((showPrice) => {
|
|
9417
9385
|
this.creditAccountShowPrices = showPrice;
|
|
@@ -11317,6 +11285,7 @@ let OrderEcComponent = class OrderEcComponent extends ComponentHelper {
|
|
|
11317
11285
|
this.hidePrices = false;
|
|
11318
11286
|
this.hideDiscounts = false;
|
|
11319
11287
|
this.hideTaxes = false;
|
|
11288
|
+
this.enableFieldNotesInArticleFile = false;
|
|
11320
11289
|
this.toDate = (date, format) => moment(date).format(!format && 'DD/MM/YYYY, h:mm:ss a' || format);
|
|
11321
11290
|
this.callError = () => {
|
|
11322
11291
|
this.error = '?';
|
|
@@ -11347,7 +11316,7 @@ let OrderEcComponent = class OrderEcComponent extends ComponentHelper {
|
|
|
11347
11316
|
this.callError();
|
|
11348
11317
|
};
|
|
11349
11318
|
this.channelConfigService.channelConfig$.subscribe((config) => {
|
|
11350
|
-
var _a, _b, _c, _d, _e, _f;
|
|
11319
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
11351
11320
|
if (config && config.allowRepeatOrders !== undefined) {
|
|
11352
11321
|
this.allowRepeatOrders = config.allowRepeatOrders;
|
|
11353
11322
|
}
|
|
@@ -11357,6 +11326,7 @@ let OrderEcComponent = class OrderEcComponent extends ComponentHelper {
|
|
|
11357
11326
|
this.hidePrices = (_b = (_a = config) === null || _a === void 0 ? void 0 : _a.hidePrices, (_b !== null && _b !== void 0 ? _b : false));
|
|
11358
11327
|
this.hideDiscounts = (_d = (_c = config) === null || _c === void 0 ? void 0 : _c.hideDiscounts, (_d !== null && _d !== void 0 ? _d : false));
|
|
11359
11328
|
this.hideTaxes = (_f = (_e = config) === null || _e === void 0 ? void 0 : _e.hideTaxes, (_f !== null && _f !== void 0 ? _f : false));
|
|
11329
|
+
this.enableFieldNotesInArticleFile = (_h = (_g = config) === null || _g === void 0 ? void 0 : _g.enableFieldNotesInArticleFile, (_h !== null && _h !== void 0 ? _h : false));
|
|
11360
11330
|
});
|
|
11361
11331
|
this.cartService.showPrice$.subscribe((showPrice) => {
|
|
11362
11332
|
this.creditAccountShowPrices = showPrice;
|
|
@@ -11383,7 +11353,7 @@ __decorate$1l([
|
|
|
11383
11353
|
OrderEcComponent = __decorate$1l([
|
|
11384
11354
|
Component({
|
|
11385
11355
|
selector: 'app-order-ec',
|
|
11386
|
-
template: "<main class=\"py-5\" id=\"orderEcComponent\">\n <div class=\"container\">\n <div class=\"wrap\" *ngIf=\"!loading; else loadingView\">\n <div *ngIf=\"order; else noOrder\">\n\n <div class=\"row justify-content-between \">\n <div class=\"col-sm-auto col-12 font-brandon\">\n <h4 class=\"tit1 fw-bold\">{{ ('order' | translate) + ': ' + order.number }}</h4>\n </div>\n <ng-container *ngIf=\"order?.invoice\">\n <div class=\"col-sm col-12 font-brandon\" *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n <a target=\"_blank\" [href]=\"consts.getUrlBase().slice(0, -1) + order.invoice\"\n class=\"btn btn-link btn-invoice\">\n <i class=\"fas fa-file-download me-1\"></i>\n {{ 'download' | translate }} {{ 'invoices' | translate | titlecase }}\n </a>\n </div>\n </ng-container>\n <a (click)=\"volver()\" class=\"col-auto text-end\">\n <button class=\"btn btvolver bg-gray text-white\">{{ 'back-to-orders' | translate }}</button>\n </a>\n </div>\n\n <section id=\"orders\">\n <div class=\"row pt-2\">\n <div class=\"col-md-2 col-12\">\n <p class=\"st\">{{ 'payment-state' | translate }}:</p>\n <p class=\"\">\n {{ order.payments[0].state | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'shipment-state' | translate }}:</p>\n <p class=\"\">\n {{ order.shipments[0].state | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'payment-method' | translate }}:</p>\n <p class=\"\">\n {{ order.payments[0]?.method?.name | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'shipment-method' | translate }}:</p>\n <p class=\"\">\n {{ order.shipments[0].method.name }}\n </p>\n <!-- ACA DEBERIA IR EL LINK DE SEGUIMIENTO -->\n <a *ngIf=\"order.tracking\" [href]=\"order.tracking\"\n class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver\n seguimiento</a>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'date' | translate }}:</p>\n <p class=\"\">\n {{ toDate(order.checkoutCompletedAt, 'DD/MM/YYYY') | translate }}<br>\n {{ toDate(order.checkoutCompletedAt, 'h:mm:ss a') | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\"\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n <p class=\"st\">{{ 'total' | translate }}:</p>\n <h5 class=\"fw-bold\">\n {{ (order.totals.total) | ecCurrencySymbol:'alwaysShowDecimals'}}\n\n </h5>\n </div>\n </div>\n </section>\n\n <div class=\"text-end mt-3\" *ngIf=\"!hidePrices && allowRepeatOrders\">\n <button class=\"btn btn-primary mb-2\" (click)=\"repeatOrder()\">\n {{ 'repeat-order' | translate }}\n </button>\n </div>\n\n <div class=\"container py-3 border-top border-bottom\">\n <div *ngIf=\"order.items.length; else noProducts\" class=\"row\">\n <div class=\"col-2 font-sm font-brandon d-none d-md-block\">\n {{ 'product' | translate | uppercase }}\n </div>\n <div class=\"col-4 font-sm font-brandon d-none d-md-block\">\n {{ 'description' | translate | uppercase }}\n </div>\n <div id=\"colLots\" *ngIf=\"ordersService.channelConfig.applyOrderLot\"\n class=\"col-1 font-sm font-brandon d-none d-md-block\">\n <!-- {{ 'description' | translate | uppercase }} -->\n {{ 'lots' | translate | uppercase }}\n </div>\n <div class=\"col-2 text-center font-sm font-brandon d-none d-md-block\"\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n {{ 'unit-price' | translate | uppercase }}\n </div>\n <div class=\"col-1 text-center font-sm font-brandon d-none d-md-block\">\n {{ 'quantity' | translate | uppercase }}\n </div>\n <div class=\"col-2 text-end font-sm font-brandon d-none d-md-block\"\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n {{ 'total' | translate | uppercase }}\n </div>\n </div>\n <ng-container *ngFor=\"let item of order.items; let i = index\">\n <div class=\"row cart-items\">\n <div class=\"col-5 col-md-2 py-2\">\n <ng-container *ngIf=\"item.product.variants[0]?.images?.length ; else defaultpicture\">\n <img class=\"smc maxwidth img-fluid rounded-custom \"\n [src]=\"consts.mediaUrl() + item.product.variants[0].images[0]\" alt=\"\">\n </ng-container>\n <ng-template #defaultpicture>\n <img *ngIf=\"item.product.picturesdefault\"\n class=\"smc maxwidth img-fluid rounded-custom\"\n [src]=\"consts.mediaUrl() + item.product.picturesdefault[0]\" alt=\"\">\n </ng-template>\n </div> \n <div\n class=\"col-md-4 col-7 d-flex flex-column justify-content-center\">\n <p class=\"font-brandon d-flex w-100 mb-0\">\n {{ item.product.name }} (Cod:{{ item.product.variants[0].code }})\n </p>\n <p *ngIf=\"item.comments\" class=\"comment-truncated fst-italic small text-muted mt-1\">\n \"{{ item.comments }}\"\n </p>\n </div>\n <div class=\"col-md-1 col-1 flex-column flex-md-row justify-content-start d-flex align-items-center\"\n *ngIf=\"ordersService.channelConfig.applyOrderLot\">\n <input type=\"button\" class=\"btn btn-primary btnSeguir m-0 text-center\" type=\"button\"\n [attr.data-bs-toggle]=\"'collapse'\" [attr.data-bs-target]=\"'#collapseExample'+i\"\n aria-expanded=\"false\" [attr.aria-controls]=\"'collapseExample'+i\"\n value=\"{{ 'see' | translate | uppercase }}\">\n </div>\n <div class=\"container d-md-none\">\n <div class=\"row\">\n <div class=\"col-4\">\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\n </div>\n <div class=\"col-4 font-xl\"\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n <p class=\"text-center w-100 m-0\"> {{ (item.product.variants[0].saleprice ?\n item.product.variants[0].saleprice : item.product.variants[0].price) |\n ecCurrencySymbol:'alwaysShowDecimals'}}</p>\n </div>\n <div class=\"col-4 font-xl\"\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n <p class=\"text-center w-100 m-0\"> {{ ((item.product.variants[0].saleprice ?\n item.product.variants[0].saleprice : item.product.variants[0].price) *\n item.quantity) | ecCurrencySymbol:'alwaysShowDecimals'}}</p>\n </div>\n </div>\n </div>\n\n <div class=\"col-2 d-none d-md-flex align-items-center\"\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n <p class=\"text-center w-100 m-0\">\n {{ (item.product.variants[0].saleprice ? item.product.variants[0].saleprice :\n item.product.variants[0].price) | ecCurrencySymbol:'alwaysShowDecimals'}}\n </p>\n </div>\n <div class=\"col-1 d-none d-md-flex align-items-center\">\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\n </div>\n <div class=\"col-2 d-none d-md-flex align-items-center\"\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n <p class=\"text-end w-100 m-0\">\n {{ ((item.product.variants[0].saleprice ? item.product.variants[0].saleprice :\n item.product.variants[0].price) * item.quantity) | ecCurrencySymbol:'alwaysShowDecimals'}}</p>\n </div>\n <div class=\"collapse\" [attr.id]=\"'collapseExample'+i\">\n <div class=\"card card-body\">\n <table class=\"table table-striped\">\n <thead>\n <tr>\n <th scope=\"col\">#</th>\n <th scope=\"col\">Estado</th>\n <th scope=\"col\">Cantidad</th>\n <th scope=\"col\">Fecha Solicitada</th>\n <th scope=\"col\">Fecha Estimada</th>\n <th scope=\"col\">Sede</th>\n <th scope=\"col\">Nota</th>\n <th scope=\"col\">Total Lote</th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let lot of item.orderItemLot\">\n <tr>\n <th scope=\"row\">{{lot.id}}</th>\n <td>{{lot.lot_status}}</td>\n <td>{{lot.quantity}}</td>\n <td>{{ toDate(lot.date_request, 'DD/MM/YYYY') | translate }}</td>\n <td *ngIf=\"lot.date_deliver; else sinFechaEstimada\">{{\n toDate(lot.date_deliver, 'DD/MM/YYYY') | translate }}</td>\n <ng-template #sinFechaEstimada>\n <td>Pendiente</td>\n </ng-template>\n <td>{{lot.shipping_address_name}}</td>\n <td>{{lot.notes}}</td>\n <td>{{lot.total_lot | ecCurrencySymbol:'alwaysShowDecimals'}}</td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n\n </ng-container>\n </div>\n\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-12 col-md-6\"></div>\n <div class=\"col-12 col-md-6\"\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n <div class=\"row py-4\">\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'total-products' |\n translate }}</div>\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\n {{ (order.totals.subtotal) | ecCurrencySymbol:'alwaysShowDecimals' }}\n </div>\n\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'shipment' |\n translate }}</div>\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\n {{ (order.totals.shipping || '0') | ecCurrencySymbol:'alwaysShowDecimals' }}\n\n </div>\n\n <div *ngIf=\"!hideDiscounts && order.totals.promotion && order.totals.promotion != 0\"\n class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'discount' |\n translate }}</div>\n <div *ngIf=\"!hideDiscounts && order.totals.promotion && order.totals.promotion != 0\"\n class=\"col-6 font-brandon font-md text-gray border-bottom text-end text-end\">\n {{ (order.totals.promotion) | ecCurrencySymbol:'alwaysShowDecimals' }}</div>\n\n <div *ngIf=\"!hideTaxes && order.totals.taxes && order.totals.taxes != 0 \"\n class=\"col-6 font-brandon font-md text-gray border-bottom \">\n {{ 'taxes' | translate }}</div>\n <div *ngIf=\"!hideTaxes && order.totals.taxes && order.totals.taxes != 0\"\n class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\n {{ (order.totals.taxes) | ecCurrencySymbol:'alwaysShowDecimals' }}</div>\n\n <div class=\"col-6 font-brandon font-md\">{{ 'total' | translate | uppercase }}</div>\n <div class=\"col-6 font-brandon font-md text-end\">\n {{ (order.totals.total) | ecCurrencySymbol:'alwaysShowDecimals' }}\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n</main>\n\n<ng-template #noOrder>\n <div class=\"w-100 h-50\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <h5>{{ 'no-orders' | translate }}</h5>\n </div>\n </div>\n</ng-template>\n\n<ng-template #loadingView>\n <div class=\"w-100 h-50 py-5\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n </div>\n</ng-template>",
|
|
11356
|
+
template: "<main class=\"py-5\" id=\"orderEcComponent\">\n <div class=\"container\">\n <div class=\"wrap\" *ngIf=\"!loading; else loadingView\">\n <div *ngIf=\"order; else noOrder\">\n\n <div class=\"row justify-content-between \">\n <div class=\"col-sm-auto col-12 font-brandon\">\n <h4 class=\"tit1 fw-bold\">{{ ('order' | translate) + ': ' + order.number }}</h4>\n </div>\n <ng-container *ngIf=\"order?.invoice\">\n <div class=\"col-sm col-12 font-brandon\" *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n <a target=\"_blank\" [href]=\"consts.getUrlBase().slice(0, -1) + order.invoice\"\n class=\"btn btn-link btn-invoice\">\n <i class=\"fas fa-file-download me-1\"></i>\n {{ 'download' | translate }} {{ 'invoices' | translate | titlecase }}\n </a>\n </div>\n </ng-container>\n <a (click)=\"volver()\" class=\"col-auto text-end\">\n <button class=\"btn btvolver bg-gray text-white\">{{ 'back-to-orders' | translate }}</button>\n </a>\n </div>\n\n <section id=\"orders\">\n <div class=\"row pt-2\">\n <div class=\"col-md-2 col-12\">\n <p class=\"st\">{{ 'payment-state' | translate }}:</p>\n <p class=\"\">\n {{ order.payments[0].state | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'shipment-state' | translate }}:</p>\n <p class=\"\">\n {{ order.shipments[0].state | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'payment-method' | translate }}:</p>\n <p class=\"\">\n {{ order.payments[0]?.method?.name | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'shipment-method' | translate }}:</p>\n <p class=\"\">\n {{ order.shipments[0].method.name }}\n </p>\n <!-- ACA DEBERIA IR EL LINK DE SEGUIMIENTO -->\n <a *ngIf=\"order.tracking\" [href]=\"order.tracking\"\n class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver\n seguimiento</a>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'date' | translate }}:</p>\n <p class=\"\">\n {{ toDate(order.checkoutCompletedAt, 'DD/MM/YYYY') | translate }}<br>\n {{ toDate(order.checkoutCompletedAt, 'h:mm:ss a') | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\"\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n <p class=\"st\">{{ 'total' | translate }}:</p>\n <h5 class=\"fw-bold\">\n {{ (order.totals.total) | ecCurrencySymbol:'alwaysShowDecimals'}}\n\n </h5>\n </div>\n </div>\n </section>\n\n <div class=\"text-end mt-3\" *ngIf=\"!hidePrices && allowRepeatOrders\">\n <button class=\"btn btn-primary mb-2\" (click)=\"repeatOrder()\">\n {{ 'repeat-order' | translate }}\n </button>\n </div>\n\n <div class=\"container py-3 border-top border-bottom\">\n <div *ngIf=\"order.items.length; else noProducts\" class=\"row\">\n <div class=\"col-2 font-sm font-brandon d-none d-md-block\">\n {{ 'product' | translate | uppercase }}\n </div>\n <div class=\"col-4 font-sm font-brandon d-none d-md-block\">\n {{ 'description' | translate | uppercase }}\n </div>\n <div id=\"colLots\" *ngIf=\"ordersService.channelConfig.applyOrderLot\"\n class=\"col-1 font-sm font-brandon d-none d-md-block\">\n <!-- {{ 'description' | translate | uppercase }} -->\n {{ 'lots' | translate | uppercase }}\n </div>\n <div class=\"col-2 text-center font-sm font-brandon d-none d-md-block\"\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n {{ 'unit-price' | translate | uppercase }}\n </div>\n <div class=\"col-1 text-center font-sm font-brandon d-none d-md-block\">\n {{ 'quantity' | translate | uppercase }}\n </div>\n <div class=\"col-2 text-end font-sm font-brandon d-none d-md-block\"\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n {{ 'total' | translate | uppercase }}\n </div>\n </div>\n <ng-container *ngFor=\"let item of order.items; let i = index\">\n <div class=\"row cart-items\">\n <div class=\"col-5 col-md-2 py-2\">\n <ng-container *ngIf=\"item.product.variants[0]?.images?.length ; else defaultpicture\">\n <img class=\"smc maxwidth img-fluid rounded-custom \"\n [src]=\"consts.mediaUrl() + item.product.variants[0].images[0]\" alt=\"\">\n </ng-container>\n <ng-template #defaultpicture>\n <img *ngIf=\"item.product.picturesdefault\"\n class=\"smc maxwidth img-fluid rounded-custom\"\n [src]=\"consts.mediaUrl() + item.product.picturesdefault[0]\" alt=\"\">\n </ng-template>\n </div> \n <div\n class=\"col-md-4 col-7 d-flex flex-column justify-content-center\">\n <p class=\"font-brandon d-flex w-100 mb-0\">\n {{ item.product.name }} (Cod:{{ item.product.variants[0].code }})\n </p>\n <p *ngIf=\"enableFieldNotesInArticleFile && item.comments\" class=\"comment-truncated fst-italic small text-muted mt-1\">\n \"{{ item.comments }}\"\n </p>\n </div>\n <div class=\"col-md-1 col-1 flex-column flex-md-row justify-content-start d-flex align-items-center\"\n *ngIf=\"ordersService.channelConfig.applyOrderLot\">\n <input type=\"button\" class=\"btn btn-primary btnSeguir m-0 text-center\" type=\"button\"\n [attr.data-bs-toggle]=\"'collapse'\" [attr.data-bs-target]=\"'#collapseExample'+i\"\n aria-expanded=\"false\" [attr.aria-controls]=\"'collapseExample'+i\"\n value=\"{{ 'see' | translate | uppercase }}\">\n </div>\n <div class=\"container d-md-none\">\n <div class=\"row\">\n <div class=\"col-4\">\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\n </div>\n <div class=\"col-4 font-xl\"\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n <p class=\"text-center w-100 m-0\"> {{ (item.product.variants[0].saleprice ?\n item.product.variants[0].saleprice : item.product.variants[0].price) |\n ecCurrencySymbol:'alwaysShowDecimals'}}</p>\n </div>\n <div class=\"col-4 font-xl\"\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n <p class=\"text-center w-100 m-0\"> {{ ((item.product.variants[0].saleprice ?\n item.product.variants[0].saleprice : item.product.variants[0].price) *\n item.quantity) | ecCurrencySymbol:'alwaysShowDecimals'}}</p>\n </div>\n </div>\n </div>\n\n <div class=\"col-2 d-none d-md-flex align-items-center\"\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n <p class=\"text-center w-100 m-0\">\n {{ (item.product.variants[0].saleprice ? item.product.variants[0].saleprice :\n item.product.variants[0].price) | ecCurrencySymbol:'alwaysShowDecimals'}}\n </p>\n </div>\n <div class=\"col-1 d-none d-md-flex align-items-center\">\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\n </div>\n <div class=\"col-2 d-none d-md-flex align-items-center\"\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n <p class=\"text-end w-100 m-0\">\n {{ ((item.product.variants[0].saleprice ? item.product.variants[0].saleprice :\n item.product.variants[0].price) * item.quantity) | ecCurrencySymbol:'alwaysShowDecimals'}}</p>\n </div>\n <div class=\"collapse\" [attr.id]=\"'collapseExample'+i\">\n <div class=\"card card-body\">\n <table class=\"table table-striped\">\n <thead>\n <tr>\n <th scope=\"col\">#</th>\n <th scope=\"col\">Estado</th>\n <th scope=\"col\">Cantidad</th>\n <th scope=\"col\">Fecha Solicitada</th>\n <th scope=\"col\">Fecha Estimada</th>\n <th scope=\"col\">Sede</th>\n <th scope=\"col\">Nota</th>\n <th scope=\"col\">Total Lote</th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let lot of item.orderItemLot\">\n <tr>\n <th scope=\"row\">{{lot.id}}</th>\n <td>{{lot.lot_status}}</td>\n <td>{{lot.quantity}}</td>\n <td>{{ toDate(lot.date_request, 'DD/MM/YYYY') | translate }}</td>\n <td *ngIf=\"lot.date_deliver; else sinFechaEstimada\">{{\n toDate(lot.date_deliver, 'DD/MM/YYYY') | translate }}</td>\n <ng-template #sinFechaEstimada>\n <td>Pendiente</td>\n </ng-template>\n <td>{{lot.shipping_address_name}}</td>\n <td>{{lot.notes}}</td>\n <td>{{lot.total_lot | ecCurrencySymbol:'alwaysShowDecimals'}}</td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n\n </ng-container>\n </div>\n\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-12 col-md-6\"></div>\n <div class=\"col-12 col-md-6\"\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\n <div class=\"row py-4\">\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'total-products' |\n translate }}</div>\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\n {{ (order.totals.subtotal) | ecCurrencySymbol:'alwaysShowDecimals' }}\n </div>\n\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'shipment' |\n translate }}</div>\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\n {{ (order.totals.shipping || '0') | ecCurrencySymbol:'alwaysShowDecimals' }}\n\n </div>\n\n <div *ngIf=\"!hideDiscounts && order.totals.promotion && order.totals.promotion != 0\"\n class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'discount' |\n translate }}</div>\n <div *ngIf=\"!hideDiscounts && order.totals.promotion && order.totals.promotion != 0\"\n class=\"col-6 font-brandon font-md text-gray border-bottom text-end text-end\">\n {{ (order.totals.promotion) | ecCurrencySymbol:'alwaysShowDecimals' }}</div>\n\n <div *ngIf=\"!hideTaxes && order.totals.taxes && order.totals.taxes != 0 \"\n class=\"col-6 font-brandon font-md text-gray border-bottom \">\n {{ 'taxes' | translate }}</div>\n <div *ngIf=\"!hideTaxes && order.totals.taxes && order.totals.taxes != 0\"\n class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\n {{ (order.totals.taxes) | ecCurrencySymbol:'alwaysShowDecimals' }}</div>\n\n <div class=\"col-6 font-brandon font-md\">{{ 'total' | translate | uppercase }}</div>\n <div class=\"col-6 font-brandon font-md text-end\">\n {{ (order.totals.total) | ecCurrencySymbol:'alwaysShowDecimals' }}\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n</main>\n\n<ng-template #noOrder>\n <div class=\"w-100 h-50\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <h5>{{ 'no-orders' | translate }}</h5>\n </div>\n </div>\n</ng-template>\n\n<ng-template #loadingView>\n <div class=\"w-100 h-50 py-5\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n </div>\n</ng-template>",
|
|
11387
11357
|
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}"]
|
|
11388
11358
|
})
|
|
11389
11359
|
], OrderEcComponent);
|
|
@@ -16247,6 +16217,7 @@ let SidebarEcComponent = class SidebarEcComponent {
|
|
|
16247
16217
|
this.creditAccountShowPrices = null;
|
|
16248
16218
|
this.showTaxLegend = false;
|
|
16249
16219
|
this.cartLoading = false;
|
|
16220
|
+
this.enableFieldNotesInArticleFile = false;
|
|
16250
16221
|
this.getVariants = product => {
|
|
16251
16222
|
let item = product.product;
|
|
16252
16223
|
if (item.variants && item.variants.length && item.variants[0].options && item.variants[0].options.length) {
|
|
@@ -16295,10 +16266,11 @@ let SidebarEcComponent = class SidebarEcComponent {
|
|
|
16295
16266
|
this.user = u;
|
|
16296
16267
|
});
|
|
16297
16268
|
this.channelConfigService.channelConfig$.subscribe(channel => {
|
|
16298
|
-
var _a, _b, _c, _d, _e, _f;
|
|
16269
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
16299
16270
|
this.hideDiscounts = (_b = (_a = channel) === null || _a === void 0 ? void 0 : _a.hideDiscounts, (_b !== null && _b !== void 0 ? _b : false));
|
|
16300
16271
|
this.hideTaxes = (_d = (_c = channel) === null || _c === void 0 ? void 0 : _c.hideTaxes, (_d !== null && _d !== void 0 ? _d : false));
|
|
16301
16272
|
this.showTaxLegend = (_f = (_e = channel) === null || _e === void 0 ? void 0 : _e.showTaxLegend, (_f !== null && _f !== void 0 ? _f : false));
|
|
16273
|
+
this.enableFieldNotesInArticleFile = (_h = (_g = channel) === null || _g === void 0 ? void 0 : _g.enableFieldNotesInArticleFile, (_h !== null && _h !== void 0 ? _h : false));
|
|
16302
16274
|
});
|
|
16303
16275
|
this.cartService.showPrice$.subscribe((showPrice) => {
|
|
16304
16276
|
this.creditAccountShowPrices = showPrice;
|
|
@@ -17140,7 +17112,6 @@ ecCurrencySymbolPipe.ctorParameters = () => [
|
|
|
17140
17112
|
ecCurrencySymbolPipe = __decorate$27([
|
|
17141
17113
|
Pipe({
|
|
17142
17114
|
name: 'ecCurrencySymbol',
|
|
17143
|
-
pure: false
|
|
17144
17115
|
})
|
|
17145
17116
|
], ecCurrencySymbolPipe);
|
|
17146
17117
|
|