ng-easycommerce 0.0.649 → 0.0.650
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 +3 -0
- package/assets/ec-i18n/en.json +3 -1
- package/assets/ec-i18n/es.json +2 -1
- package/bundles/ng-easycommerce.umd.js +2 -2
- 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 +2 -2
- package/esm2015/lib/ec-component/checkout-ec/dataform-ec/dataform-ec.component.js +2 -2
- package/esm5/lib/ec-component/account-ec/order-ec/order-ec.component.js +2 -2
- package/esm5/lib/ec-component/checkout-ec/dataform-ec/dataform-ec.component.js +2 -2
- package/fesm2015/ng-easycommerce.js +2 -2
- package/fesm2015/ng-easycommerce.js.map +1 -1
- package/fesm5/ng-easycommerce.js +2 -2
- package/fesm5/ng-easycommerce.js.map +1 -1
- package/ng-easycommerce.metadata.json +1 -1
- package/package.json +1 -1
package/fesm5/ng-easycommerce.js
CHANGED
|
@@ -8565,7 +8565,7 @@ var DataFormEcComponent = /** @class */ (function (_super) {
|
|
|
8565
8565
|
DataFormEcComponent = __decorate$Q([
|
|
8566
8566
|
Component({
|
|
8567
8567
|
selector: 'app-dataform-ec',
|
|
8568
|
-
template: "<ng-container *ngIf=\"this.channelConfig.channelType != 'b2b' || (this.channelConfig.channelType == 'b2b' && authService.isAuthenticated()); else pleaseLogin\">\r\n<ng-container *ngIf=\"this.addressingService.modeSelectAddress == 'LOAD_ADDRESS_AND_SELECTION' && this.authService.isAuthenticated() && this.addressBook != null\">\r\n <div class=\"container card p-4 mb-3\">\r\n <div class=\"row justify-content-center\">\r\n <div class=\"col-12 col-md-10 col-lg-8 text-center\">\r\n <div class=\"btn-group btn-group-toggle\" data-bs-toggle=\"buttons\">\r\n <label [class]=\"'btn btn-outline-secondary ' + (!getMode() ? 'active' : '')\">\r\n <input type=\"radio\" name=\"options\" id=\"option1\" autocomplete=\"off\" checked\r\n (change)=\"setMode('seleccion')\"> {{'select-address' | translate | titlecase}}\r\n </label>\r\n\r\n <label [class]=\"'btn btn-outline-secondary ' + (getMode() ? 'active' : '')\" *ngIf=\"!getParamByChannelAndLanguage('btn_new_address_')\">\r\n <input type=\"radio\" name=\"options\" id=\"option2\" autocomplete=\"off\" (change)=\"setMode('carga')\">\r\n {{ 'new-address' | translate | titlecase}}\r\n </label>\r\n\r\n <label [class]=\"'btn btn-outline-secondary ' + (selectAddress ? 'active' : '')\" *ngIf=\"getParamByChannelAndLanguage('btn_new_address_') as param\">\r\n <input type=\"radio\" name=\"options\" id=\"option2\" autocomplete=\"off\" (change)=\"setMode('carga')\">\r\n {{ param.value}}\r\n </label>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-container>\r\n\r\n<ng-container *ngIf=\"getMode(); else addressSelection\">\r\n <div *ngIf=\"!require_login; else requireLoginView\">\r\n\r\n <ng-container *ngIf=\"this.addressingService.modeSelectAddress == 'ONLY_LOAD_ADDRESS'\">\r\n <div class=\"checkout-title my-2\">\r\n <h3>{{'billing-details'|translate}}</h3>\r\n </div>\r\n </ng-container>\r\n\r\n <form (submit)=\"verifyValidate(false,this.cartService.items)\">\r\n <div class=\"row mt-df\"><!--Fila 1-->\r\n <div class=\"form-group col-12 col-md-6\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.firstName.enabled\">\r\n <label class=\"field-label\">{{'first-name'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.firstName.required\"\r\n class=\"required\">*</span></label>\r\n <input class=\"form-control\" type=\"text\" name=\"firstName\"\r\n [formControl]=\"checkoutForm.controls['firstName']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.firstName.touched && checkoutForm.controls.firstName.errors?.required\">\r\n <span class=\"text-danger\">{{'first-name-help1'|translate}}</span>\r\n\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.firstName.touched && checkoutForm.controls.firstName.errors?.pattern\">\r\n <span class=\"text-danger\">\r\n {{'first-name-help2'|translate}}\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"form-group col-12 col-md-6\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.lastName.enabled\">\r\n <label class=\"field-label\">{{'last-name'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.lastName.required\"\r\n class=\"required\">*</span></label>\r\n <input class=\"form-control\" type=\"text\" name=\"lastName\"\r\n [formControl]=\"checkoutForm.controls['lastName']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.lastName.touched && checkoutForm.controls.lastName.errors?.required\">\r\n <span class=\"text-danger\">{{'last-name-help1'|translate}}</span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.lastName.touched && checkoutForm.controls.lastName.errors?.pattern\">\r\n <span class=\"text-danger\">{{'last-name-help2'|translate}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row mt-df\"><!--Fila 2-->\r\n <div class=\"form-group col-12 col-md-6\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.phoneNumber.enabled\">\r\n <label class=\"field-label\">{{'phone'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.phoneNumber.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"phoneNumber\"\r\n [formControl]=\"checkoutForm.controls['phoneNumber']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.phoneNumber.touched && checkoutForm.controls.phoneNumber.errors?.required\">\r\n <span class=\"text-danger\">\r\n\r\n {{'phone-help1'|translate}}\r\n </span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.phoneNumber.touched && checkoutForm.controls.phoneNumber.errors?.pattern\">\r\n <span class=\"text-danger\">\r\n {{'phone-help2'|translate}}\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"form-group col-12 col-md-6\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.email.enabled\">\r\n <label class=\"field-label\">{{'email-address'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.email.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"email\" name=\"email\"\r\n [formControl]=\"checkoutForm.controls['email']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.email.touched && checkoutForm.controls.email.errors?.required\">\r\n <span class=\"text-danger\">\r\n {{'email-address-help1'|translate}}\r\n </span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.email.touched && checkoutForm.controls.email.errors?.email\">\r\n <span class=\"text-danger\">\r\n {{'email-address-help2'|translate}}\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row mt-df\"><!--Fila 3-->\r\n <ng-container *ngIf=\"this.addressingService.getTypeForm().viewForms.countryCode.enabled\">\r\n <div class=\"form-group col-12 col-md-4\" *ngIf=\"(countries$ | async) as countries\">\r\n <label class=\"field-label\">{{'country'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.countryCode.required\"\r\n class=\"required\">*</span></label>\r\n <select class=\"form-select\" name=\"countryCode\"\r\n [formControl]=\"checkoutForm.controls['countryCode']\"\r\n (change)=\"onCountrySelected($event.target.value)\">\r\n <!-- <option selected [value]=\"countries[0].code\">{{ 'choose-country' | translate }}</option> -->\r\n <option *ngFor=\"let country of countries\" [value]=\"country.code\">{{ country.name }}</option>\r\n </select>\r\n <div *ngIf=\"checkoutForm.controls.countryCode.touched && checkoutForm.controls.countryCode.errors?.required\"\r\n class=\"text text-danger\">\r\n {{'country-help'|translate}}\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"this.addressingService.getTypeForm().viewForms.provinceCode.enabled\">\r\n <div class=\"form-group col-12 col-md-4\" *ngIf=\"(provinces$ | async) as provinces\">\r\n <label class=\"field-label\">{{'state'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.provinceCode.required\"\r\n class=\"required\">*</span></label>\r\n <select class=\"form-select\" name=\"provinceCode\"\r\n (change)=\"onProvincesSelected($event.target.value)\"\r\n [formControl]=\"checkoutForm.controls['provinceCode']\">\r\n<!-- <option selected [value]=\"null\">{{ 'choose-province' | translate }}</option>\r\n --> <option *ngFor=\"let province of provinces\" [value]=\"province.code\">{{ province.name }}\r\n </option>\r\n </select>\r\n <div *ngIf=\"checkoutForm.controls.provinceCode.touched && checkoutForm.controls.provinceCode.errors?.required\"\r\n class=\"text text-danger\">\r\n {{'state-help'|translate}}\r\n </div>\r\n </div>\r\n </ng-container>\r\n <div class=\"form-group col-12 col-md-4\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.city.enabled\">\r\n <label class=\"field-label\">{{'town-city'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.city.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"city\"\r\n [formControl]=\"checkoutForm.controls['city']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.city.touched && checkoutForm.controls.city.errors?.required\">\r\n <span class=\"text-danger\">{{'town-city-help'|translate}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row mt-df\"><!--Fila 4-->\r\n <div class=\"form-group col-12 col-md-8\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.street.enabled\">\r\n <label class=\"field-label\">{{'address'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.street.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"street\"\r\n [formControl]=\"checkoutForm.controls['street']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.street.touched && checkoutForm.controls.street.errors?.required\">\r\n <span class=\"text-danger\">{{'address-help1'|translate}}</span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.street.touched && checkoutForm.controls.street.errors?.maxlength\">\r\n <span class=\"text-danger\">{{'address-help2'|translate}}</span>\r\n </div>\r\n </div>\r\n\r\n <!-- form direcci\u00F3n -->\r\n <div class=\"form-group col-12 col-md-4\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.postcode.enabled\">\r\n <label class=\"field-label\">{{'postal-code'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.postcode.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"postcode\"\r\n [formControl]=\"checkoutForm.controls['postcode']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.postcode.touched && checkoutForm.controls.postcode.errors?.required\">\r\n <span class=\"text-danger\">{{'postal-code-help'|translate}}</span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.postcode.touched && checkoutForm.controls.postcode.errors?.pattern\">\r\n <span class=\"text-danger\"> {{postalCodeErrorMessage | translate}} </span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row mt-df\"><!--Fila 5-->\r\n <ng-container *ngIf=\"this.addressingService.getTypeForm().viewForms.documentType.enabled\">\r\n <div class=\"form-group col-12 col-md-4\" *ngIf=\"(documentTypes$ | async) as documentTypes\">\r\n <label class=\"field-label\">{{'document-type'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentType.required\"\r\n class=\"required\">*</span></label>\r\n <select name=\"documentType\" class=\"form-select\"\r\n (change)=\"onDocumentTypesSelected($event.target.value)\"\r\n [formControl]=\"checkoutForm.controls['documentType']\">\r\n<!-- <option [value]=\"''\" selected>{{'document-type'|translate}}</option>\r\n --> <option *ngFor=\"let item of documentTypes\" [value]=\"item.code\">{{item.name}}</option>\r\n </select>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.documentType.touched && checkoutForm.controls.documentType.errors?.required\">\r\n <span class=\"text-danger\">\r\n {{'type-document-help'|translate}}\r\n </span>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <div class=\"form-group col-12 col-md-4\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentNumber.enabled\">\r\n <label class=\"field-label\">{{'document-number'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentNumber.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\"\r\n [type]=\"'text'\" name=\"documentNumber\"\r\n [formControl]=\"checkoutForm.controls['documentNumber']\"\r\n placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.documentNumber.touched && checkoutForm.controls.documentNumber.errors?.required\">\r\n <span class=\"text-danger\">{{ 'document-number-help' | translate }}</span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.documentNumber.touched && checkoutForm.controls.documentNumber.errors?.pattern\">\r\n <span class=\"text-danger\">{{ documentErrorMessage | translate }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row mt-df\" *ngIf=\"this.consts.getChannel() != 'mdj-empresa-a'\"><!--Fila 6-->\r\n <div class=\"form-group col-12 col-md-12\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.enabled\">\r\n\r\n <label class=\"field-label\" *ngIf=\"!getLabelNotesParam()\">{{'notes'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\"\r\n class=\"required\">*</span></label>\r\n <label class=\"field-label\" *ngIf=\"getLabelNotesParam() as labelnotes\" [innerHTML]=\"labelnotes.value\"><span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\"\r\n class=\"required\">*</span></label>\r\n\r\n <!-- <label class=\"field-label\">{{'notes'|translate}}<span *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\" class=\"required\">*</span></label> -->\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"notes\"\r\n [formControl]=\"checkoutForm.controls['notes']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\r\n </div>\r\n </div>\r\n <div class=\"row mt-df\"><!--Fila 7-->\r\n <div class=\"form-group col-12 col-md-12\">\r\n <label for=\"formFact\"><b>{{ 'same-billing-address' | translate }}</b> <input type=\"checkbox\"\r\n class=\"ms-2\" [checked]=\"viewDataFacturacion\" (change)=\"showFormFacturacion()\"\r\n id=\"formFact\"></label>\r\n </div>\r\n </div>\r\n <div class=\"row mt-df\">\r\n <div class=\"col-12\">\r\n <p>\r\n <!-- <span class=\"required\"></span> -->\r\n <label class=\"required text-underline\">* {{ 'required-fields' | translate }}</label>\r\n </p>\r\n </div>\r\n </div>\r\n <div class=\"row mt-df\">\r\n <div class=\"form-group col-12 col-md-12\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.terms.enabled\">\r\n <span *ngIf=\"this.addressingService.getTypeForm().viewForms.terms.required\"\r\n class=\"required\">*</span>\r\n <label class=\"\" for=\"\"> {{ 'accept-terms' | translate }} <input class=\"ms-2\" name=\"terms\"\r\n [formControl]=\"checkoutForm.controls['terms']\" type=\"checkbox\" required\r\n (change)=\"onInputChange()\" /> </label><br />\r\n <a (click)=\"openModal(template)\" role=\"button\" class=\"ms-3 nota-input text-dark\">{{ 'whats-this' |\r\n translate }}</a>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.terms.touched && !checkoutForm.controls.terms.value\">\r\n <span class=\"text-danger\">{{ 'must-accept-terms' | translate }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row\" *ngIf=\"viewDataFacturacion ; else datosFormFacturacion\"> </div>\r\n <div class=\"checkout-btn-unique text-end\">\r\n <button type=\"submit\" [disabled]=\"!validado\" class=\"btn valid-btn mt-2\">\r\n {{(isLastOne ? 'finish-checkout' : (allready_data ? 'update' :\r\n 'ready-form')) | translate}}</button>\r\n\r\n\r\n </div>\r\n <div *ngIf=\"loading\" class=\"d-flex flex-column jusitfy-content-center align-items-center\">\r\n <app-loading-full-ec></app-loading-full-ec>\r\n </div>\r\n </form>\r\n </div>\r\n</ng-container>\r\n\r\n<ng-template #addressSelection>\r\n\r\n <ng-container *ngIf=\"this.addressingService.modeSelectAddress == 'ONLY_ADDRESS_SELECTION'\">\r\n <div class=\"checkout-title my-2\">\r\n <h3>{{'address-selection'|translate}}</h3>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"this.addressBook; else addressBookNotResult\">\r\n\r\n <ng-container *ngIf=\"this.addressBook?.length ;else addressBookLoading\">\r\n <div class=\"container\">\r\n <div class=\"row\">\r\n <div class=\"col-sm-6 col-12 my-3\" *ngFor=\"let item of addressBook; let i = index\">\r\n <div class=\"card p-3\">\r\n <input class=\"ms-1 mt-3 form-check-input input-size-lg\" type=\"radio\" [name]=\"'n-'+i\" [id]=\"i\"\r\n [checked]=\"item.selected\" (click)=\"setSelectAddress(item)\" (change)=\"onInputChange()\">\r\n <div class=\"ms-5\">\r\n <h4 class=\"card-title\">\r\n <strong>{{'address'|translate}}</strong><br>\r\n <span class=\"text-uppercase h3\">{{item.street}}</span>\r\n </h4>\r\n <div class=\"row\">\r\n <h5 class=\"card-subtitle mb-2 text-muted col-auto\">\r\n <strong>{{'country'|translate}}</strong> {{getCountry(item.countryCode)}}\r\n </h5>\r\n <h5 class=\"card-subtitle mb-2 text-muted col-auto\">\r\n <strong>{{'state'|translate}}</strong> {{getProvince(item.provinceCode)}}\r\n </h5>\r\n <h5 class=\"card-subtitle mb-2 text-muted col-auto\">\r\n <strong>{{'town-city'|translate}}</strong> {{item.city}}\r\n </h5>\r\n <h5 class=\"card-subtitle mb-2 text-muted col-auto\">\r\n <strong>{{'postal-code'|translate}}</strong> {{item.postcode}}\r\n </h5>\r\n </div>\r\n <div class=\"row px-3\">\r\n <div class=\"card p-2 bg-light w-100\">\r\n <div class=\"card-body\">\r\n <h5 class=\"card-title\">{{'address-contact'|translate}}</h5>\r\n <h6 class=\"card-subtitle mb-2 text-muted\">\r\n <strong>{{'first-name'|translate}}</strong>\r\n {{item.addressContact.firstName}}\r\n </h6>\r\n <h6 class=\"card-subtitle mb-2 text-muted\">\r\n <strong>{{'last-name'|translate}}</strong> {{item.addressContact.lastName}}\r\n </h6>\r\n <h6 class=\"card-subtitle mb-2 text-muted\">\r\n <strong>{{'document-type'|translate}}</strong>\r\n {{getDocumentType(item.addressContact.documentType)}}\r\n </h6>\r\n <h6 class=\"card-subtitle mb-2 text-muted\">\r\n <strong>{{'document-number'|translate}}</strong>\r\n {{item.addressContact.documentNumber}}\r\n </h6>\r\n <h6 class=\"card-subtitle mb-2 text-muted\">\r\n <strong>{{'email-address'|translate}}</strong> {{item.addressContact.email}}\r\n </h6>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n<!-- Se hardcodea el canal de mundo del juguete empresa A ya que se necesita con urgencia, se sustituira por un campo que llegara de backend. -->\r\n <div class=\"w-100\" *ngIf=\"this.consts.getChannel() != 'mdj-empresa-a'\"> \r\n <ng-container *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.enabled\">\r\n <div class=\"row mt-df\">\r\n <div class=\"form-group col-12 col-md-12\">\r\n <label class=\"field-label\" *ngIf=\"!getLabelNotesParam()\">{{'notes'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\"\r\n class=\"required\">*</span></label>\r\n <label class=\"field-label\"\r\n *ngIf=\"getLabelNotesParam() as labelnotes\" [innerHTML]=\"labelnotes.value\"></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"notes\"\r\n [(ngModel)]=\"this.addressBookSelected.notes\" #ctrl=\"ngModel\" value=\"\" placeholder=\"\"\r\n autocomplete=\"off\"> \r\n <div class=\"invalid-feedback d-block\" *ngIf=\"\r\n addressingService.getTypeForm().viewForms.notes.required\r\n && (!addressBookSelected.notes || !addressBookSelected.notes.trim())\r\n \">\r\n {{ 'required-field' | translate }}\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n <div class=\"checkout-btn-unique text-end\">\r\n <button (click)=\"selectAddress(this.cartService.items)\" class=\"btn valid-btn mt-2\">\r\n {{(isLastOne ? 'finish-checkout' : (allready_data ? 'update' :\r\n 'ready-form')) | translate}}\r\n </button>\r\n </div>\r\n <div *ngIf=\"loading\" class=\"d-flex flex-column jusitfy-content-center align-items-center\">\r\n <app-loading-full-ec></app-loading-full-ec>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n\r\n</ng-template>\r\n\r\n\r\n<ng-template #requireLoginView>\r\n <div id=\"loginCheckout\">\r\n <div class=\"d-flex flex-column jusitfy-content-center align-items-center\" *ngIf=\"require_login\">\r\n <div class=\"col-12\">\r\n <app-login-form-ec (ready)=\"verifyValidate($event)\" [redirect]=\"false\" [title]=\"'need-login'\">\r\n </app-login-form-ec>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n\r\n\r\n<ng-template #datosFormFacturacion>\r\n <div class=\"container-fluid px-0 px-md-2\">\r\n <div class=\"row\">\r\n <div class=\"col-12\">\r\n <div class=\"card \">\r\n <div class=\"card-header text-dark text-center\">\r\n <h3>{{'billing-data'|translate}}</h3>\r\n </div>\r\n <div class=\"card-body\">\r\n <form (submit)=\"verifyValidate()\">\r\n <div class=\"row mt-df\">\r\n <!--Fila 1-->\r\n <div class=\"form-group col-12 col-md-6\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.firstName.enabled\">\r\n <label class=\"field-label\">{{'first-name'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.firstName.required\"\r\n class=\"required\">*</span></label>\r\n <input class=\"form-control\" type=\"text\" name=\"firstName\"\r\n [formControl]=\"checkoutFormFacturacion.controls['firstName']\" value=\"\"\r\n placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.firstName.touched && checkoutFormFacturacion.controls.firstName.errors?.required\">\r\n <span class=\"text-danger\">{{'first-name-help1'|translate}}</span>\r\n\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.firstName.touched && checkoutFormFacturacion.controls.firstName.errors?.pattern\">\r\n <span class=\"text-danger\">\r\n {{'first-name-help2'|translate}}\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"form-group col-12 col-md-6\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.lastName.enabled\">\r\n <label class=\"field-label\">{{'last-name'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.lastName.required\"\r\n class=\"required\">*</span></label>\r\n <input class=\"form-control\" type=\"text\" name=\"lastName\"\r\n [formControl]=\"checkoutFormFacturacion.controls['lastName']\" value=\"\"\r\n placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.lastName.touched && checkoutFormFacturacion.controls.lastName.errors?.required\">\r\n <span class=\"text-danger\">{{'last-name-help1'|translate}}</span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.lastName.touched && checkoutFormFacturacion.controls.lastName.errors?.pattern\">\r\n <span class=\"text-danger\">{{'last-name-help2'|translate}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row mt-df\">\r\n <!--Fila 2-->\r\n <div class=\"form-group col-12 col-md-6\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.phoneNumber.enabled\">\r\n <label class=\"field-label\">{{'phone'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.phoneNumber.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\"\r\n name=\"phoneNumber\"\r\n [formControl]=\"checkoutFormFacturacion.controls['phoneNumber']\" value=\"\"\r\n placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.phoneNumber.touched && checkoutFormFacturacion.controls.phoneNumber.errors?.required\">\r\n <span class=\"text-danger\">\r\n {{'phone-help1'|translate}}\r\n </span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.phoneNumber.touched && checkoutFormFacturacion.controls.phoneNumber.errors?.pattern\">\r\n <span class=\"text-danger\">\r\n {{'phone-help2'|translate}}\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"form-group col-12 col-md-6\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.email.enabled\">\r\n <label class=\"field-label\">{{'email-address'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.email.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"email\" name=\"email\"\r\n [formControl]=\"checkoutFormFacturacion.controls['email']\" value=\"\"\r\n placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.email.touched && checkoutFormFacturacion.controls.email.errors?.required\">\r\n <span class=\"text-danger\">\r\n {{'email-address-help1'|translate}}\r\n </span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.email.touched && checkoutFormFacturacion.controls.email.errors?.email\">\r\n <span class=\"text-danger\">\r\n {{'email-address-help2'|translate}}\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row mt-df\">\r\n <!--Fila 3-->\r\n\r\n <ng-container\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.countryCode.enabled\">\r\n\r\n <div class=\"form-group col-12 col-md-4\"\r\n *ngIf=\"(countriesFacturacion$ | async) as countries\">\r\n <label class=\"field-label\">{{'country'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.countryCode.required\"\r\n class=\"required\">*</span></label>\r\n <select class=\"form-select\" name=\"countryCode\"\r\n [formControl]=\"checkoutFormFacturacion.controls['countryCode']\"\r\n (change)=\"onCountrySelectedFacturacion($event.target.value)\">\r\n <!-- <option selected [value]=\"null\">{{ 'choose-country' | translate }}</option> -->\r\n <option *ngFor=\"let country of countries\" [value]=\"country.code\">\r\n {{ country.name }}</option>\r\n </select>\r\n <div *ngIf=\"checkoutFormFacturacion.controls.countryCode.touched && checkoutFormFacturacion.controls.countryCode.errors?.required\"\r\n class=\"text text-danger\">\r\n {{'country-help'|translate}}\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.provinceCode.enabled\">\r\n\r\n <div class=\"form-group col-12 col-md-4\"\r\n *ngIf=\"(provincesFacturacion$ | async) as provinces\">\r\n <label class=\"field-label\">{{'state'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.provinceCode.required\"\r\n class=\"required\">*</span></label>\r\n <select class=\"form-select\" name=\"provinceCode\"\r\n (change)=\"onProvincesSelectedFacturacion($event.target.value)\"\r\n [formControl]=\"checkoutFormFacturacion.controls['provinceCode']\">\r\n <!-- <option selected [value]=\"null\">{{ 'choose-province' | translate }}</option> -->\r\n <option *ngFor=\"let province of provinces\" [value]=\"province.code\">\r\n {{ province.name }}\r\n </option>\r\n </select>\r\n <div *ngIf=\"checkoutFormFacturacion.controls.provinceCode.touched && checkoutFormFacturacion.controls.provinceCode.errors?.required\"\r\n class=\"text text-danger\">\r\n {{'state-help'|translate}}\r\n </div>\r\n </div>\r\n </ng-container>\r\n <div class=\"form-group col-12 col-md-4\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.city.enabled\">\r\n <label class=\"field-label\">{{'town-city'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.city.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"city\"\r\n [formControl]=\"checkoutFormFacturacion.controls['city']\" value=\"\" placeholder=\"\"\r\n autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.city.touched && checkoutFormFacturacion.controls.city.errors?.required\">\r\n <span class=\"text-danger\">{{'town-city-help'|translate}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row mt-df\">\r\n <!--Fila 4-->\r\n <div class=\"form-group col-12 col-md-8\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.street.enabled\">\r\n <label class=\"field-label\">{{'address'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.street.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"street\"\r\n [formControl]=\"checkoutFormFacturacion.controls['street']\" value=\"\"\r\n placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.street.touched && checkoutFormFacturacion.controls.street.errors?.required\">\r\n <span class=\"text-danger\">{{'address-help1'|translate}}</span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.street.touched && checkoutFormFacturacion.controls.street.errors?.maxlength\">\r\n <span class=\"text-danger\">{{'address-help2'|translate}}</span>\r\n </div>\r\n </div>\r\n <div class=\"form-group col-12 col-md-4\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.postcode.enabled\">\r\n <label class=\"field-label\">{{'postal-code'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.postcode.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"postcode\"\r\n [formControl]=\"checkoutFormFacturacion.controls['postcode']\" value=\"\"\r\n placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.postcode.touched && checkoutFormFacturacion.controls.postcode.errors?.required\">\r\n <span class=\"text-danger\">{{'postal-code-help'|translate}}</span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.postcode.touched && checkoutFormFacturacion.controls.postcode.errors?.pattern\">\r\n <span class=\"text-danger\">{{postalCodeErrorMessage |translate}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row mt-df\">\r\n <!--Fila 5-->\r\n <ng-container *ngIf=\"this.addressingService.getTypeForm().viewForms.documentType.enabled\">\r\n <div class=\"form-group col-12 col-md-4\" *ngIf=\"(documentTypesFacturacion$ | async) as documentTypes\">\r\n <label class=\"field-label\">{{'document-type'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentType.required\"\r\n class=\"required\">*</span></label>\r\n <select name=\"documentType\" class=\"form-select\"\r\n [formControl]=\"checkoutFormFacturacion.controls['documentType']\"\r\n (change)=\"onDocumentTypesSelectedFacturacion($event.target.value)\">\r\n <!-- <option [value]=\"''\" selected>{{'document-type'|translate}}</option> -->\r\n <option\r\n *ngFor=\"let item of documentTypes\"\r\n [value]=\"item.code\">{{item.name}}</option>\r\n </select>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.documentType.touched && checkoutFormFacturacion.controls.documentType.errors?.required\">\r\n <span class=\"text-danger\">\r\n {{'type-document-help'|translate}}\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"form-group col-12 col-md-4\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentNumber.enabled\">\r\n <label class=\"field-label\">{{'document-number'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentNumber.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\"\r\n [type]=\"'text'\" name=\"documentNumber\"\r\n [formControl]=\"checkoutFormFacturacion.controls['documentNumber']\"\r\n placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.documentNumber.touched && checkoutFormFacturacion.controls.documentNumber.errors?.required\">\r\n <span class=\"text-danger\">\r\n {{'document-number-help'|translate}}\r\n </span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.documentNumber.touched && checkoutFormFacturacion.controls.documentNumber.errors?.pattern\">\r\n <span class=\"text-danger\">{{ documentErrorMessage | translate }}</span>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n <div class=\"row mt-df\" *ngIf=\"this.consts.getChannel() != 'mdj-empresa-a'\">\r\n <div class=\"form-group col-12 col-md-12\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.enabled\">\r\n <label class=\"field-label\" *ngIf=\"!getLabelNotesParam()\">{{'notes'|translate}}aaa <span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\"\r\n class=\"required\">*</span></label>\r\n <label class=\"field-label\" *ngIf=\"getLabelNotesParam() as labelNotesHtml\">\r\n <div [innerHTML]=\"labelNotesHtml\"></div>\r\n <span *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\" class=\"required\">*</span>\r\n </label>\r\n\r\n <!-- <label class=\"field-label\">{{'notes'|translate}}<span *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\" class=\"required\">*</span></label> -->\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"notes\"\r\n [formControl]=\"checkoutFormFacturacion.controls['notes']\" value=\"\"\r\n placeholder=\"\" autocomplete=\"off\">\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n\r\n\r\n<ng-template #template>\r\n <div class=\"modal-content\">\r\n <div class=\"modal-header\">\r\n <button type=\"button\" class=\"btn-close float-end\" aria-label=\"Close\" (click)=\"modalRef.hide()\">\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <div class=\"modal-body scrol-if\">\r\n <app-section-container-ec [name]=\"'terminos-y-condiciones'\"> </app-section-container-ec>\r\n </div>\r\n\r\n</ng-template>\r\n\r\n\r\n<ng-template #addressBookNotResult>\r\n <div class=\"container\">\r\n <div class=\"row\">\r\n <div class=\"col-12 text-center my-2\">\r\n <h4> {{'address-book-not-result' | translate }} </h4>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #addressBookLoading>\r\n <div class=\"container\">\r\n <div class=\"row\">\r\n <div class=\"col-12 text-center my-2\">\r\n <div class=\"d-flex flex-column jusitfy-content-center align-items-center\">\r\n <app-loading-full-ec></app-loading-full-ec>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-template>\r\n</ng-container>\r\n\r\n<ng-template #pleaseLogin>\r\n <div class=\"container\">\r\n <p>Por favor <a [routerLink]=\"['/auth/login']\" > Inicie Sesi\u00F3n</a></p>\r\n </div>\r\n</ng-template>",
|
|
8568
|
+
template: "<ng-container *ngIf=\"this.channelConfig.channelType != 'b2b' || (this.channelConfig.channelType == 'b2b' && authService.isAuthenticated()); else pleaseLogin\">\r\n<ng-container *ngIf=\"this.addressingService.modeSelectAddress == 'LOAD_ADDRESS_AND_SELECTION' && this.authService.isAuthenticated() && this.addressBook != null\">\r\n <div class=\"container card p-4 mb-3\">\r\n <div class=\"row justify-content-center\">\r\n <div class=\"col-12 col-md-10 col-lg-8 text-center\">\r\n <div class=\"btn-group btn-group-toggle\" data-bs-toggle=\"buttons\">\r\n <label [class]=\"'btn btn-outline-secondary ' + (!getMode() ? 'active' : '')\">\r\n <input type=\"radio\" name=\"options\" id=\"option1\" autocomplete=\"off\" checked\r\n (change)=\"setMode('seleccion')\"> {{'select-address' | translate | titlecase}}\r\n </label>\r\n\r\n <label [class]=\"'btn btn-outline-secondary ' + (getMode() ? 'active' : '')\" *ngIf=\"!getParamByChannelAndLanguage('btn_new_address_')\">\r\n <input type=\"radio\" name=\"options\" id=\"option2\" autocomplete=\"off\" (change)=\"setMode('carga')\">\r\n {{ 'new-address' | translate | titlecase}}\r\n </label>\r\n\r\n <label [class]=\"'btn btn-outline-secondary ' + (selectAddress ? 'active' : '')\" *ngIf=\"getParamByChannelAndLanguage('btn_new_address_') as param\">\r\n <input type=\"radio\" name=\"options\" id=\"option2\" autocomplete=\"off\" (change)=\"setMode('carga')\">\r\n {{ param.value}}\r\n </label>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-container>\r\n\r\n<ng-container *ngIf=\"getMode(); else addressSelection\">\r\n <div *ngIf=\"!require_login; else requireLoginView\">\r\n\r\n <ng-container *ngIf=\"this.addressingService.modeSelectAddress == 'ONLY_LOAD_ADDRESS'\">\r\n <div class=\"checkout-title my-2\">\r\n <h3>{{'billing-details'|translate}}</h3>\r\n </div>\r\n </ng-container>\r\n\r\n <form (submit)=\"verifyValidate(false,this.cartService.items)\">\r\n <div class=\"row mt-df\"><!--Fila 1-->\r\n <div class=\"form-group col-12 col-md-6\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.firstName.enabled\">\r\n <label class=\"field-label\">{{'first-name'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.firstName.required\"\r\n class=\"required\">*</span></label>\r\n <input class=\"form-control\" type=\"text\" name=\"firstName\"\r\n [formControl]=\"checkoutForm.controls['firstName']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.firstName.touched && checkoutForm.controls.firstName.errors?.required\">\r\n <span class=\"text-danger\">{{'first-name-help1'|translate}}</span>\r\n\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.firstName.touched && checkoutForm.controls.firstName.errors?.pattern\">\r\n <span class=\"text-danger\">\r\n {{'first-name-help2'|translate}}\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"form-group col-12 col-md-6\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.lastName.enabled\">\r\n <label class=\"field-label\">{{'last-name'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.lastName.required\"\r\n class=\"required\">*</span></label>\r\n <input class=\"form-control\" type=\"text\" name=\"lastName\"\r\n [formControl]=\"checkoutForm.controls['lastName']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.lastName.touched && checkoutForm.controls.lastName.errors?.required\">\r\n <span class=\"text-danger\">{{'last-name-help1'|translate}}</span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.lastName.touched && checkoutForm.controls.lastName.errors?.pattern\">\r\n <span class=\"text-danger\">{{'last-name-help2'|translate}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row mt-df\"><!--Fila 2-->\r\n <div class=\"form-group col-12 col-md-6\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.phoneNumber.enabled\">\r\n <label class=\"field-label\">{{'phone'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.phoneNumber.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"phoneNumber\"\r\n [formControl]=\"checkoutForm.controls['phoneNumber']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.phoneNumber.touched && checkoutForm.controls.phoneNumber.errors?.required\">\r\n <span class=\"text-danger\">\r\n\r\n {{'phone-help1'|translate}}\r\n </span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.phoneNumber.touched && checkoutForm.controls.phoneNumber.errors?.pattern\">\r\n <span class=\"text-danger\">\r\n {{'phone-help2'|translate}}\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"form-group col-12 col-md-6\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.email.enabled\">\r\n <label class=\"field-label\">{{'email-address'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.email.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"email\" name=\"email\"\r\n [formControl]=\"checkoutForm.controls['email']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.email.touched && checkoutForm.controls.email.errors?.required\">\r\n <span class=\"text-danger\">\r\n {{'email-address-help1'|translate}}\r\n </span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.email.touched && checkoutForm.controls.email.errors?.email\">\r\n <span class=\"text-danger\">\r\n {{'email-address-help2'|translate}}\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row mt-df\"><!--Fila 3-->\r\n <ng-container *ngIf=\"this.addressingService.getTypeForm().viewForms.countryCode.enabled\">\r\n <div class=\"form-group col-12 col-md-4\" *ngIf=\"(countries$ | async) as countries\">\r\n <label class=\"field-label\">{{'country'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.countryCode.required\"\r\n class=\"required\">*</span></label>\r\n <select class=\"form-select\" name=\"countryCode\"\r\n [formControl]=\"checkoutForm.controls['countryCode']\"\r\n (change)=\"onCountrySelected($event.target.value)\">\r\n <!-- <option selected [value]=\"countries[0].code\">{{ 'choose-country' | translate }}</option> -->\r\n <option *ngFor=\"let country of countries\" [value]=\"country.code\">{{ country.name }}</option>\r\n </select>\r\n <div *ngIf=\"checkoutForm.controls.countryCode.touched && checkoutForm.controls.countryCode.errors?.required\"\r\n class=\"text text-danger\">\r\n {{'country-help'|translate}}\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"this.addressingService.getTypeForm().viewForms.provinceCode.enabled\">\r\n <div class=\"form-group col-12 col-md-4\" *ngIf=\"(provinces$ | async) as provinces\">\r\n <label class=\"field-label\">{{'state'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.provinceCode.required\"\r\n class=\"required\">*</span></label>\r\n <select class=\"form-select\" name=\"provinceCode\"\r\n (change)=\"onProvincesSelected($event.target.value)\"\r\n [formControl]=\"checkoutForm.controls['provinceCode']\">\r\n<!-- <option selected [value]=\"null\">{{ 'choose-province' | translate }}</option>\r\n --> <option *ngFor=\"let province of provinces\" [value]=\"province.code\">{{ province.name }}\r\n </option>\r\n </select>\r\n <div *ngIf=\"checkoutForm.controls.provinceCode.touched && checkoutForm.controls.provinceCode.errors?.required\"\r\n class=\"text text-danger\">\r\n {{'state-help'|translate}}\r\n </div>\r\n </div>\r\n </ng-container>\r\n <div class=\"form-group col-12 col-md-4\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.city.enabled\">\r\n <label class=\"field-label\">{{'town-city'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.city.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"city\"\r\n [formControl]=\"checkoutForm.controls['city']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.city.touched && checkoutForm.controls.city.errors?.required\">\r\n <span class=\"text-danger\">{{'town-city-help'|translate}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row mt-df\"><!--Fila 4-->\r\n <div class=\"form-group col-12 col-md-8\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.street.enabled\">\r\n <label class=\"field-label\">{{'address'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.street.required\"\r\n class=\"required\">*</span></label>\r\n <div class=\"char-count\" style=\"font-size: 0.9em; color: #888;\">\r\n {{ 50 - (checkoutForm.controls['street'].value?.length || 0) }} {{'remainingCharacters'|translate}}\r\n</div>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"street\"\r\n [formControl]=\"checkoutForm.controls['street']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.street.touched && checkoutForm.controls.street.errors?.required\">\r\n <span class=\"text-danger\">{{'address-help1'|translate}}</span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.street.touched && checkoutForm.controls.street.errors?.maxlength\">\r\n <span class=\"text-danger\">{{'address-help2'|translate}}</span>\r\n </div>\r\n </div>\r\n\r\n <!-- form direcci\u00F3n -->\r\n <div class=\"form-group col-12 col-md-4\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.postcode.enabled\">\r\n <label class=\"field-label\">{{'postal-code'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.postcode.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"postcode\"\r\n [formControl]=\"checkoutForm.controls['postcode']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.postcode.touched && checkoutForm.controls.postcode.errors?.required\">\r\n <span class=\"text-danger\">{{'postal-code-help'|translate}}</span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.postcode.touched && checkoutForm.controls.postcode.errors?.pattern\">\r\n <span class=\"text-danger\"> {{postalCodeErrorMessage | translate}} </span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row mt-df\"><!--Fila 5-->\r\n <ng-container *ngIf=\"this.addressingService.getTypeForm().viewForms.documentType.enabled\">\r\n <div class=\"form-group col-12 col-md-4\" *ngIf=\"(documentTypes$ | async) as documentTypes\">\r\n <label class=\"field-label\">{{'document-type'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentType.required\"\r\n class=\"required\">*</span></label>\r\n <select name=\"documentType\" class=\"form-select\"\r\n (change)=\"onDocumentTypesSelected($event.target.value)\"\r\n [formControl]=\"checkoutForm.controls['documentType']\">\r\n<!-- <option [value]=\"''\" selected>{{'document-type'|translate}}</option>\r\n --> <option *ngFor=\"let item of documentTypes\" [value]=\"item.code\">{{item.name}}</option>\r\n </select>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.documentType.touched && checkoutForm.controls.documentType.errors?.required\">\r\n <span class=\"text-danger\">\r\n {{'type-document-help'|translate}}\r\n </span>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <div class=\"form-group col-12 col-md-4\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentNumber.enabled\">\r\n <label class=\"field-label\">{{'document-number'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentNumber.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\"\r\n [type]=\"'text'\" name=\"documentNumber\"\r\n [formControl]=\"checkoutForm.controls['documentNumber']\"\r\n placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.documentNumber.touched && checkoutForm.controls.documentNumber.errors?.required\">\r\n <span class=\"text-danger\">{{ 'document-number-help' | translate }}</span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.documentNumber.touched && checkoutForm.controls.documentNumber.errors?.pattern\">\r\n <span class=\"text-danger\">{{ documentErrorMessage | translate }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row mt-df\" *ngIf=\"this.consts.getChannel() != 'mdj-empresa-a'\"><!--Fila 6-->\r\n <div class=\"form-group col-12 col-md-12\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.enabled\">\r\n\r\n <label class=\"field-label\" *ngIf=\"!getLabelNotesParam()\">{{'notes'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\"\r\n class=\"required\">*</span></label>\r\n <label class=\"field-label\" *ngIf=\"getLabelNotesParam() as labelnotes\" [innerHTML]=\"labelnotes.value\"><span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\"\r\n class=\"required\">*</span></label>\r\n\r\n <!-- <label class=\"field-label\">{{'notes'|translate}}<span *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\" class=\"required\">*</span></label> -->\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"notes\"\r\n [formControl]=\"checkoutForm.controls['notes']\" value=\"\" placeholder=\"\" autocomplete=\"off\">\r\n </div>\r\n </div>\r\n <div class=\"row mt-df\"><!--Fila 7-->\r\n <div class=\"form-group col-12 col-md-12\">\r\n <label for=\"formFact\"><b>{{ 'same-billing-address' | translate }}</b> <input type=\"checkbox\"\r\n class=\"ms-2\" [checked]=\"viewDataFacturacion\" (change)=\"showFormFacturacion()\"\r\n id=\"formFact\"></label>\r\n </div>\r\n </div>\r\n <div class=\"row mt-df\">\r\n <div class=\"col-12\">\r\n <p>\r\n <!-- <span class=\"required\"></span> -->\r\n <label class=\"required text-underline\">* {{ 'required-fields' | translate }}</label>\r\n </p>\r\n </div>\r\n </div>\r\n <div class=\"row mt-df\">\r\n <div class=\"form-group col-12 col-md-12\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.terms.enabled\">\r\n <span *ngIf=\"this.addressingService.getTypeForm().viewForms.terms.required\"\r\n class=\"required\">*</span>\r\n <label class=\"\" for=\"\"> {{ 'accept-terms' | translate }} <input class=\"ms-2\" name=\"terms\"\r\n [formControl]=\"checkoutForm.controls['terms']\" type=\"checkbox\" required\r\n (change)=\"onInputChange()\" /> </label><br />\r\n <a (click)=\"openModal(template)\" role=\"button\" class=\"ms-3 nota-input text-dark\">{{ 'whats-this' |\r\n translate }}</a>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutForm.controls.terms.touched && !checkoutForm.controls.terms.value\">\r\n <span class=\"text-danger\">{{ 'must-accept-terms' | translate }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row\" *ngIf=\"viewDataFacturacion ; else datosFormFacturacion\"> </div>\r\n <div class=\"checkout-btn-unique text-end\">\r\n <button type=\"submit\" [disabled]=\"!validado\" class=\"btn valid-btn mt-2\">\r\n {{(isLastOne ? 'finish-checkout' : (allready_data ? 'update' :\r\n 'ready-form')) | translate}}</button>\r\n\r\n\r\n </div>\r\n <div *ngIf=\"loading\" class=\"d-flex flex-column jusitfy-content-center align-items-center\">\r\n <app-loading-full-ec></app-loading-full-ec>\r\n </div>\r\n </form>\r\n </div>\r\n</ng-container>\r\n\r\n<ng-template #addressSelection>\r\n\r\n <ng-container *ngIf=\"this.addressingService.modeSelectAddress == 'ONLY_ADDRESS_SELECTION'\">\r\n <div class=\"checkout-title my-2\">\r\n <h3>{{'address-selection'|translate}}</h3>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"this.addressBook; else addressBookNotResult\">\r\n\r\n <ng-container *ngIf=\"this.addressBook?.length ;else addressBookLoading\">\r\n <div class=\"container\">\r\n <div class=\"row\">\r\n <div class=\"col-sm-6 col-12 my-3\" *ngFor=\"let item of addressBook; let i = index\">\r\n <div class=\"card p-3\">\r\n <input class=\"ms-1 mt-3 form-check-input input-size-lg\" type=\"radio\" [name]=\"'n-'+i\" [id]=\"i\"\r\n [checked]=\"item.selected\" (click)=\"setSelectAddress(item)\" (change)=\"onInputChange()\">\r\n <div class=\"ms-5\">\r\n <h4 class=\"card-title\">\r\n <strong>{{'address'|translate}}</strong><br>\r\n <span class=\"text-uppercase h3\">{{item.street}}</span>\r\n </h4>\r\n <div class=\"row\">\r\n <h5 class=\"card-subtitle mb-2 text-muted col-auto\">\r\n <strong>{{'country'|translate}}</strong> {{getCountry(item.countryCode)}}\r\n </h5>\r\n <h5 class=\"card-subtitle mb-2 text-muted col-auto\">\r\n <strong>{{'state'|translate}}</strong> {{getProvince(item.provinceCode)}}\r\n </h5>\r\n <h5 class=\"card-subtitle mb-2 text-muted col-auto\">\r\n <strong>{{'town-city'|translate}}</strong> {{item.city}}\r\n </h5>\r\n <h5 class=\"card-subtitle mb-2 text-muted col-auto\">\r\n <strong>{{'postal-code'|translate}}</strong> {{item.postcode}}\r\n </h5>\r\n </div>\r\n <div class=\"row px-3\">\r\n <div class=\"card p-2 bg-light w-100\">\r\n <div class=\"card-body\">\r\n <h5 class=\"card-title\">{{'address-contact'|translate}}</h5>\r\n <h6 class=\"card-subtitle mb-2 text-muted\">\r\n <strong>{{'first-name'|translate}}</strong>\r\n {{item.addressContact.firstName}}\r\n </h6>\r\n <h6 class=\"card-subtitle mb-2 text-muted\">\r\n <strong>{{'last-name'|translate}}</strong> {{item.addressContact.lastName}}\r\n </h6>\r\n <h6 class=\"card-subtitle mb-2 text-muted\">\r\n <strong>{{'document-type'|translate}}</strong>\r\n {{getDocumentType(item.addressContact.documentType)}}\r\n </h6>\r\n <h6 class=\"card-subtitle mb-2 text-muted\">\r\n <strong>{{'document-number'|translate}}</strong>\r\n {{item.addressContact.documentNumber}}\r\n </h6>\r\n <h6 class=\"card-subtitle mb-2 text-muted\">\r\n <strong>{{'email-address'|translate}}</strong> {{item.addressContact.email}}\r\n </h6>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n<!-- Se hardcodea el canal de mundo del juguete empresa A ya que se necesita con urgencia, se sustituira por un campo que llegara de backend. -->\r\n <div class=\"w-100\" *ngIf=\"this.consts.getChannel() != 'mdj-empresa-a'\"> \r\n <ng-container *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.enabled\">\r\n <div class=\"row mt-df\">\r\n <div class=\"form-group col-12 col-md-12\">\r\n <label class=\"field-label\" *ngIf=\"!getLabelNotesParam()\">{{'notes'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\"\r\n class=\"required\">*</span></label>\r\n <label class=\"field-label\"\r\n *ngIf=\"getLabelNotesParam() as labelnotes\" [innerHTML]=\"labelnotes.value\"></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"notes\"\r\n [(ngModel)]=\"this.addressBookSelected.notes\" #ctrl=\"ngModel\" value=\"\" placeholder=\"\"\r\n autocomplete=\"off\"> \r\n <div class=\"invalid-feedback d-block\" *ngIf=\"\r\n addressingService.getTypeForm().viewForms.notes.required\r\n && (!addressBookSelected.notes || !addressBookSelected.notes.trim())\r\n \">\r\n {{ 'required-field' | translate }}\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n <div class=\"checkout-btn-unique text-end\">\r\n <button (click)=\"selectAddress(this.cartService.items)\" class=\"btn valid-btn mt-2\">\r\n {{(isLastOne ? 'finish-checkout' : (allready_data ? 'update' :\r\n 'ready-form')) | translate}}\r\n </button>\r\n </div>\r\n <div *ngIf=\"loading\" class=\"d-flex flex-column jusitfy-content-center align-items-center\">\r\n <app-loading-full-ec></app-loading-full-ec>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n\r\n</ng-template>\r\n\r\n\r\n<ng-template #requireLoginView>\r\n <div id=\"loginCheckout\">\r\n <div class=\"d-flex flex-column jusitfy-content-center align-items-center\" *ngIf=\"require_login\">\r\n <div class=\"col-12\">\r\n <app-login-form-ec (ready)=\"verifyValidate($event)\" [redirect]=\"false\" [title]=\"'need-login'\">\r\n </app-login-form-ec>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n\r\n\r\n<ng-template #datosFormFacturacion>\r\n <div class=\"container-fluid px-0 px-md-2\">\r\n <div class=\"row\">\r\n <div class=\"col-12\">\r\n <div class=\"card \">\r\n <div class=\"card-header text-dark text-center\">\r\n <h3>{{'billing-data'|translate}}</h3>\r\n </div>\r\n <div class=\"card-body\">\r\n <form (submit)=\"verifyValidate()\">\r\n <div class=\"row mt-df\">\r\n <!--Fila 1-->\r\n <div class=\"form-group col-12 col-md-6\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.firstName.enabled\">\r\n <label class=\"field-label\">{{'first-name'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.firstName.required\"\r\n class=\"required\">*</span></label>\r\n <input class=\"form-control\" type=\"text\" name=\"firstName\"\r\n [formControl]=\"checkoutFormFacturacion.controls['firstName']\" value=\"\"\r\n placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.firstName.touched && checkoutFormFacturacion.controls.firstName.errors?.required\">\r\n <span class=\"text-danger\">{{'first-name-help1'|translate}}</span>\r\n\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.firstName.touched && checkoutFormFacturacion.controls.firstName.errors?.pattern\">\r\n <span class=\"text-danger\">\r\n {{'first-name-help2'|translate}}\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"form-group col-12 col-md-6\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.lastName.enabled\">\r\n <label class=\"field-label\">{{'last-name'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.lastName.required\"\r\n class=\"required\">*</span></label>\r\n <input class=\"form-control\" type=\"text\" name=\"lastName\"\r\n [formControl]=\"checkoutFormFacturacion.controls['lastName']\" value=\"\"\r\n placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.lastName.touched && checkoutFormFacturacion.controls.lastName.errors?.required\">\r\n <span class=\"text-danger\">{{'last-name-help1'|translate}}</span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.lastName.touched && checkoutFormFacturacion.controls.lastName.errors?.pattern\">\r\n <span class=\"text-danger\">{{'last-name-help2'|translate}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row mt-df\">\r\n <!--Fila 2-->\r\n <div class=\"form-group col-12 col-md-6\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.phoneNumber.enabled\">\r\n <label class=\"field-label\">{{'phone'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.phoneNumber.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\"\r\n name=\"phoneNumber\"\r\n [formControl]=\"checkoutFormFacturacion.controls['phoneNumber']\" value=\"\"\r\n placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.phoneNumber.touched && checkoutFormFacturacion.controls.phoneNumber.errors?.required\">\r\n <span class=\"text-danger\">\r\n {{'phone-help1'|translate}}\r\n </span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.phoneNumber.touched && checkoutFormFacturacion.controls.phoneNumber.errors?.pattern\">\r\n <span class=\"text-danger\">\r\n {{'phone-help2'|translate}}\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"form-group col-12 col-md-6\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.email.enabled\">\r\n <label class=\"field-label\">{{'email-address'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.email.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"email\" name=\"email\"\r\n [formControl]=\"checkoutFormFacturacion.controls['email']\" value=\"\"\r\n placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.email.touched && checkoutFormFacturacion.controls.email.errors?.required\">\r\n <span class=\"text-danger\">\r\n {{'email-address-help1'|translate}}\r\n </span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.email.touched && checkoutFormFacturacion.controls.email.errors?.email\">\r\n <span class=\"text-danger\">\r\n {{'email-address-help2'|translate}}\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row mt-df\">\r\n <!--Fila 3-->\r\n\r\n <ng-container\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.countryCode.enabled\">\r\n\r\n <div class=\"form-group col-12 col-md-4\"\r\n *ngIf=\"(countriesFacturacion$ | async) as countries\">\r\n <label class=\"field-label\">{{'country'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.countryCode.required\"\r\n class=\"required\">*</span></label>\r\n <select class=\"form-select\" name=\"countryCode\"\r\n [formControl]=\"checkoutFormFacturacion.controls['countryCode']\"\r\n (change)=\"onCountrySelectedFacturacion($event.target.value)\">\r\n <!-- <option selected [value]=\"null\">{{ 'choose-country' | translate }}</option> -->\r\n <option *ngFor=\"let country of countries\" [value]=\"country.code\">\r\n {{ country.name }}</option>\r\n </select>\r\n <div *ngIf=\"checkoutFormFacturacion.controls.countryCode.touched && checkoutFormFacturacion.controls.countryCode.errors?.required\"\r\n class=\"text text-danger\">\r\n {{'country-help'|translate}}\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.provinceCode.enabled\">\r\n\r\n <div class=\"form-group col-12 col-md-4\"\r\n *ngIf=\"(provincesFacturacion$ | async) as provinces\">\r\n <label class=\"field-label\">{{'state'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.provinceCode.required\"\r\n class=\"required\">*</span></label>\r\n <select class=\"form-select\" name=\"provinceCode\"\r\n (change)=\"onProvincesSelectedFacturacion($event.target.value)\"\r\n [formControl]=\"checkoutFormFacturacion.controls['provinceCode']\">\r\n <!-- <option selected [value]=\"null\">{{ 'choose-province' | translate }}</option> -->\r\n <option *ngFor=\"let province of provinces\" [value]=\"province.code\">\r\n {{ province.name }}\r\n </option>\r\n </select>\r\n <div *ngIf=\"checkoutFormFacturacion.controls.provinceCode.touched && checkoutFormFacturacion.controls.provinceCode.errors?.required\"\r\n class=\"text text-danger\">\r\n {{'state-help'|translate}}\r\n </div>\r\n </div>\r\n </ng-container>\r\n <div class=\"form-group col-12 col-md-4\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.city.enabled\">\r\n <label class=\"field-label\">{{'town-city'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.city.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"city\"\r\n [formControl]=\"checkoutFormFacturacion.controls['city']\" value=\"\" placeholder=\"\"\r\n autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.city.touched && checkoutFormFacturacion.controls.city.errors?.required\">\r\n <span class=\"text-danger\">{{'town-city-help'|translate}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row mt-df\">\r\n <!--Fila 4-->\r\n <div class=\"form-group col-12 col-md-8\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.street.enabled\">\r\n <label class=\"field-label\">{{'address'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.street.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"street\"\r\n [formControl]=\"checkoutFormFacturacion.controls['street']\" value=\"\"\r\n placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.street.touched && checkoutFormFacturacion.controls.street.errors?.required\">\r\n <span class=\"text-danger\">{{'address-help1'|translate}}</span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.street.touched && checkoutFormFacturacion.controls.street.errors?.maxlength\">\r\n <span class=\"text-danger\">{{'address-help2'|translate}}</span>\r\n </div>\r\n </div>\r\n <div class=\"form-group col-12 col-md-4\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.postcode.enabled\">\r\n <label class=\"field-label\">{{'postal-code'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.postcode.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"postcode\"\r\n [formControl]=\"checkoutFormFacturacion.controls['postcode']\" value=\"\"\r\n placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.postcode.touched && checkoutFormFacturacion.controls.postcode.errors?.required\">\r\n <span class=\"text-danger\">{{'postal-code-help'|translate}}</span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.postcode.touched && checkoutFormFacturacion.controls.postcode.errors?.pattern\">\r\n <span class=\"text-danger\">{{postalCodeErrorMessage |translate}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row mt-df\">\r\n <!--Fila 5-->\r\n <ng-container *ngIf=\"this.addressingService.getTypeForm().viewForms.documentType.enabled\">\r\n <div class=\"form-group col-12 col-md-4\" *ngIf=\"(documentTypesFacturacion$ | async) as documentTypes\">\r\n <label class=\"field-label\">{{'document-type'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentType.required\"\r\n class=\"required\">*</span></label>\r\n <select name=\"documentType\" class=\"form-select\"\r\n [formControl]=\"checkoutFormFacturacion.controls['documentType']\"\r\n (change)=\"onDocumentTypesSelectedFacturacion($event.target.value)\">\r\n <!-- <option [value]=\"''\" selected>{{'document-type'|translate}}</option> -->\r\n <option\r\n *ngFor=\"let item of documentTypes\"\r\n [value]=\"item.code\">{{item.name}}</option>\r\n </select>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.documentType.touched && checkoutFormFacturacion.controls.documentType.errors?.required\">\r\n <span class=\"text-danger\">\r\n {{'type-document-help'|translate}}\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"form-group col-12 col-md-4\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentNumber.enabled\">\r\n <label class=\"field-label\">{{'document-number'|translate}}<span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.documentNumber.required\"\r\n class=\"required\">*</span></label>\r\n <input (change)=\"onInputChange()\" class=\"form-control\"\r\n [type]=\"'text'\" name=\"documentNumber\"\r\n [formControl]=\"checkoutFormFacturacion.controls['documentNumber']\"\r\n placeholder=\"\" autocomplete=\"off\">\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.documentNumber.touched && checkoutFormFacturacion.controls.documentNumber.errors?.required\">\r\n <span class=\"text-danger\">\r\n {{'document-number-help'|translate}}\r\n </span>\r\n </div>\r\n <div class=\"text-danger-container\"\r\n *ngIf=\"checkoutFormFacturacion.controls.documentNumber.touched && checkoutFormFacturacion.controls.documentNumber.errors?.pattern\">\r\n <span class=\"text-danger\">{{ documentErrorMessage | translate }}</span>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n <div class=\"row mt-df\" *ngIf=\"this.consts.getChannel() != 'mdj-empresa-a'\">\r\n <div class=\"form-group col-12 col-md-12\"\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.enabled\">\r\n <label class=\"field-label\" *ngIf=\"!getLabelNotesParam()\">{{'notes'|translate}}aaa <span\r\n *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\"\r\n class=\"required\">*</span></label>\r\n <label class=\"field-label\" *ngIf=\"getLabelNotesParam() as labelNotesHtml\">\r\n <div [innerHTML]=\"labelNotesHtml\"></div>\r\n <span *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\" class=\"required\">*</span>\r\n </label>\r\n\r\n <!-- <label class=\"field-label\">{{'notes'|translate}}<span *ngIf=\"this.addressingService.getTypeForm().viewForms.notes.required\" class=\"required\">*</span></label> -->\r\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"notes\"\r\n [formControl]=\"checkoutFormFacturacion.controls['notes']\" value=\"\"\r\n placeholder=\"\" autocomplete=\"off\">\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n\r\n\r\n<ng-template #template>\r\n <div class=\"modal-content\">\r\n <div class=\"modal-header\">\r\n <button type=\"button\" class=\"btn-close float-end\" aria-label=\"Close\" (click)=\"modalRef.hide()\">\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <div class=\"modal-body scrol-if\">\r\n <app-section-container-ec [name]=\"'terminos-y-condiciones'\"> </app-section-container-ec>\r\n </div>\r\n\r\n</ng-template>\r\n\r\n\r\n<ng-template #addressBookNotResult>\r\n <div class=\"container\">\r\n <div class=\"row\">\r\n <div class=\"col-12 text-center my-2\">\r\n <h4> {{'address-book-not-result' | translate }} </h4>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #addressBookLoading>\r\n <div class=\"container\">\r\n <div class=\"row\">\r\n <div class=\"col-12 text-center my-2\">\r\n <div class=\"d-flex flex-column jusitfy-content-center align-items-center\">\r\n <app-loading-full-ec></app-loading-full-ec>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-template>\r\n</ng-container>\r\n\r\n<ng-template #pleaseLogin>\r\n <div class=\"container\">\r\n <p>Por favor <a [routerLink]=\"['/auth/login']\" > Inicie Sesi\u00F3n</a></p>\r\n </div>\r\n</ng-template>",
|
|
8569
8569
|
providers: [BsModalService],
|
|
8570
8570
|
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}"]
|
|
8571
8571
|
})
|
|
@@ -13609,7 +13609,7 @@ var OrderEcComponent = /** @class */ (function (_super) {
|
|
|
13609
13609
|
OrderEcComponent = __decorate$1l([
|
|
13610
13610
|
Component({
|
|
13611
13611
|
selector: 'app-order-ec',
|
|
13612
|
-
template: "<main class=\"py-5\" id=\"orderEcComponent\">\r\n <div class=\"container\">\r\n <div class=\"wrap\" *ngIf=\"!loading; else loadingView\">\r\n <div *ngIf=\"order; else noOrder\">\r\n\r\n <div class=\"row justify-content-between \">\r\n <div class=\"col-sm-auto col-12 font-brandon\">\r\n <h4 class=\"tit1 fw-bold\">{{ ('order' | translate) + ': ' + order.number }}</h4>\r\n </div>\r\n <ng-container *ngIf=\"order?.invoice\">\r\n <div class=\"col-sm col-12 font-brandon\">\r\n <a target=\"_blank\" [href]=\"consts.getUrlBase().slice(0, -1) + order.invoice\"\r\n class=\"btn btn-link btn-invoice\">\r\n <i class=\"fas fa-file-download me-1\"></i>\r\n {{ 'download' | translate }} {{ 'invoices' | translate | titlecase }}\r\n </a>\r\n </div>\r\n </ng-container>\r\n <a (click)=\"volver()\" class=\"col-auto text-end\">\r\n <button class=\"btn btvolver bg-gray text-white\">{{ 'back-to-orders' | translate }}</button>\r\n </a>\r\n </div>\r\n\r\n <section id=\"orders\">\r\n <div class=\"row pt-2\">\r\n <div class=\"col-md-2 col-12\">\r\n <p class=\"st\">{{ 'payment-state' | translate }}:</p>\r\n <p class=\"\">\r\n {{ order.payments[0].state | translate }}\r\n </p>\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\">\r\n <p class=\"st\">{{ 'shipment-state' | translate }}:</p>\r\n <p class=\"\">\r\n {{ order.shipments[0].state | translate }}\r\n </p>\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\">\r\n <p class=\"st\">{{ 'payment-method' | translate }}:</p>\r\n <p class=\"\">\r\n {{ order.payments[0]?.method?.name | translate }}\r\n </p>\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\">\r\n <p class=\"st\">{{ 'shipment-method' | translate }}:</p>\r\n <p class=\"\">\r\n {{ order.shipments[0].method.name }}\r\n </p>\r\n <!-- ACA DEBERIA IR EL LINK DE SEGUIMIENTO -->\r\n <a *ngIf=\"order.tracking\" [href]=\"order.tracking\"\r\n class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver\r\n seguimiento</a>\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\">\r\n <p class=\"st\">{{ 'date' | translate }}:</p>\r\n <p class=\"\">\r\n {{ toDate(order.checkoutCompletedAt, 'DD/MM/YYYY') | translate }}<br>\r\n {{ toDate(order.checkoutCompletedAt, 'h:mm:ss a') | translate }}\r\n </p>\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <p class=\"st\">{{ 'total' | translate }}:</p>\r\n <h5 class=\"fw-bold\">\r\n {{ (order.totals.total) | ecCurrencySymbol:'alwaysShowDecimals'}}\r\n\r\n </h5>\r\n </div>\r\n </div>\r\n </section>\r\n\r\n <div class=\"text-end mt-3\" *ngIf=\"!hidePrices && allowRepeatOrders\">\r\n <button class=\"btn btn-primary mb-2\" (click)=\"repeatOrder()\">\r\n {{ 'repeat-order' | translate }}\r\n </button>\r\n </div>\r\n\r\n <div class=\"container py-3 border-top border-bottom\">\r\n <div *ngIf=\"order.items.length; else noProducts\" class=\"row\">\r\n <div class=\"col-2 font-sm font-brandon d-none d-md-block\">\r\n {{ 'product' | translate | uppercase }}\r\n </div>\r\n <div class=\"col-4 font-sm font-brandon d-none d-md-block\">\r\n {{ 'description' | translate | uppercase }}\r\n </div>\r\n <div id=\"colLots\" *ngIf=\"ordersService.channelConfig.applyOrderLot\"\r\n class=\"col-1 font-sm font-brandon d-none d-md-block\">\r\n <!-- {{ 'description' | translate | uppercase }} -->\r\n {{ 'lots' | translate | uppercase }}\r\n </div>\r\n <div class=\"col-2 text-center font-sm font-brandon d-none d-md-block\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n {{ 'unit-price' | translate | uppercase }}\r\n </div>\r\n <div class=\"col-1 text-center font-sm font-brandon d-none d-md-block\">\r\n {{ 'quantity' | translate | uppercase }}\r\n </div>\r\n <div class=\"col-2 text-end font-sm font-brandon d-none d-md-block\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n {{ 'total' | translate | uppercase }}\r\n </div>\r\n </div>\r\n <ng-container *ngFor=\"let item of order.items; let i = index\">\r\n <div class=\"row cart-items\">\r\n <div class=\"col-5 col-md-2 py-2\">\r\n <ng-container *ngIf=\"item.product.variants[0]?.images?.length ; else defaultpicture\">\r\n <img class=\"smc maxwidth img-fluid rounded-custom \"\r\n [src]=\"consts.mediaUrl() + item.product.variants[0].images[0]\" alt=\"\">\r\n </ng-container>\r\n <ng-template #defaultpicture>\r\n <img *ngIf=\"item.product.picturesdefault\"\r\n class=\"smc maxwidth img-fluid rounded-custom\"\r\n [src]=\"consts.mediaUrl() + item.product.picturesdefault[0]\" alt=\"\">\r\n </ng-template>\r\n </div> \r\n <div\r\n class=\"col-md-4 col-7 d-flex flex-column justify-content-center\">\r\n <p class=\"font-brandon d-flex w-100 mb-0\">\r\n {{ item.product.name }} (Cod:{{ item.product.variants[0].code }})\r\n </p>\r\n <p *ngIf=\"item.comments\" class=\"comment-truncated fst-italic small text-muted mt-1\">\r\n \"{{ item.comments }}\"\r\n </p>\r\n </div>\r\n <div class=\"col-md-1 col-1 flex-column flex-md-row justify-content-start d-flex align-items-center\"\r\n *ngIf=\"ordersService.channelConfig.applyOrderLot\">\r\n <input type=\"button\" class=\"btn btn-primary btnSeguir m-0 text-center\" type=\"button\"\r\n [attr.data-bs-toggle]=\"'collapse'\" [attr.data-bs-target]=\"'#collapseExample'+i\"\r\n aria-expanded=\"false\" [attr.aria-controls]=\"'collapseExample'+i\"\r\n value=\"{{ 'see' | translate | uppercase }}\">\r\n </div>\r\n <div class=\"container d-md-none\">\r\n <div class=\"row\">\r\n <div class=\"col-4\">\r\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\r\n </div>\r\n <div class=\"col-4 font-xl\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <p class=\"text-center w-100 m-0\"> {{ (item.product.variants[0].saleprice ?\r\n item.product.variants[0].saleprice : item.product.variants[0].price) |\r\n ecCurrencySymbol:'alwaysShowDecimals'}}</p>\r\n </div>\r\n <div class=\"col-4 font-xl\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <p class=\"text-center w-100 m-0\"> {{ ((item.product.variants[0].saleprice ?\r\n item.product.variants[0].saleprice : item.product.variants[0].price) *\r\n item.quantity) | ecCurrencySymbol:'alwaysShowDecimals'}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-2 d-none d-md-flex align-items-center\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <p class=\"text-center w-100 m-0\">\r\n {{ (item.product.variants[0].saleprice ? item.product.variants[0].saleprice :\r\n item.product.variants[0].price) | ecCurrencySymbol:'alwaysShowDecimals'}}\r\n </p>\r\n </div>\r\n <div class=\"col-1 d-none d-md-flex align-items-center\">\r\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\r\n </div>\r\n <div class=\"col-2 d-none d-md-flex align-items-center\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <p class=\"text-end w-100 m-0\">\r\n {{ ((item.product.variants[0].saleprice ? item.product.variants[0].saleprice :\r\n item.product.variants[0].price) * item.quantity) | ecCurrencySymbol:'alwaysShowDecimals'}}</p>\r\n </div>\r\n <div class=\"collapse\" [attr.id]=\"'collapseExample'+i\">\r\n <div class=\"card card-body\">\r\n <table class=\"table table-striped\">\r\n <thead>\r\n <tr>\r\n <th scope=\"col\">#</th>\r\n <th scope=\"col\">Estado</th>\r\n <th scope=\"col\">Cantidad</th>\r\n <th scope=\"col\">Fecha Solicitada</th>\r\n <th scope=\"col\">Fecha Estimada</th>\r\n <th scope=\"col\">Sede</th>\r\n <th scope=\"col\">Nota</th>\r\n <th scope=\"col\">Total Lote</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <ng-container *ngFor=\"let lot of item.orderItemLot\">\r\n <tr>\r\n <th scope=\"row\">{{lot.id}}</th>\r\n <td>{{lot.lot_status}}</td>\r\n <td>{{lot.quantity}}</td>\r\n <td>{{ toDate(lot.date_request, 'DD/MM/YYYY') | translate }}</td>\r\n <td *ngIf=\"lot.date_deliver; else sinFechaEstimada\">{{\r\n toDate(lot.date_deliver, 'DD/MM/YYYY') | translate }}</td>\r\n <ng-template #sinFechaEstimada>\r\n <td>Pendiente</td>\r\n </ng-template>\r\n <td>{{lot.shipping_address_name}}</td>\r\n <td>{{lot.notes}}</td>\r\n <td>{{lot.total_lot | ecCurrencySymbol:'alwaysShowDecimals'}}</td>\r\n </tr>\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </ng-container>\r\n </div>\r\n\r\n <div class=\"container\">\r\n <div class=\"row\">\r\n <div class=\"col-12 col-md-6\"></div>\r\n <div class=\"col-12 col-md-6\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <div class=\"row py-4\">\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'total-products' |\r\n translate }}</div>\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\r\n {{ (order.totals.subtotal) | ecCurrencySymbol:'alwaysShowDecimals' }}\r\n </div>\r\n\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'shipment' |\r\n translate }}</div>\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\r\n {{ (order.totals.shipping || '0') | ecCurrencySymbol:'alwaysShowDecimals' }}\r\n\r\n </div>\r\n\r\n <div *ngIf=\"!hideDiscounts && order.totals.promotion && order.totals.promotion != 0\"\r\n class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'discount' |\r\n translate }}</div>\r\n <div *ngIf=\"!hideDiscounts && order.totals.promotion && order.totals.promotion != 0\"\r\n class=\"col-6 font-brandon font-md text-gray border-bottom text-end text-end\">\r\n {{ (order.totals.promotion) | ecCurrencySymbol:'alwaysShowDecimals' }}</div>\r\n\r\n <div *ngIf=\"!hideTaxes && order.totals.taxes && order.totals.taxes != 0 \"\r\n class=\"col-6 font-brandon font-md text-gray border-bottom \">\r\n {{ 'taxes' | translate }}</div>\r\n <div *ngIf=\"!hideTaxes && order.totals.taxes && order.totals.taxes != 0\"\r\n class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\r\n {{ (order.totals.taxes) | ecCurrencySymbol:'alwaysShowDecimals' }}</div>\r\n\r\n <div class=\"col-6 font-brandon font-md\">{{ 'total' | translate | uppercase }}</div>\r\n <div class=\"col-6 font-brandon font-md text-end\">\r\n {{ (order.totals.total) | ecCurrencySymbol:'alwaysShowDecimals' }}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n</main>\r\n\r\n<ng-template #noOrder>\r\n <div class=\"w-100 h-50\">\r\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\r\n <h5>{{ 'no-orders' | translate }}</h5>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #loadingView>\r\n <div class=\"w-100 h-50 py-5\">\r\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\r\n <app-loading-full-ec></app-loading-full-ec>\r\n </div>\r\n </div>\r\n</ng-template>",
|
|
13612
|
+
template: "<main class=\"py-5\" id=\"orderEcComponent\">\r\n <div class=\"container\">\r\n <div class=\"wrap\" *ngIf=\"!loading; else loadingView\">\r\n <div *ngIf=\"order; else noOrder\">\r\n\r\n <div class=\"row justify-content-between \">\r\n <div class=\"col-sm-auto col-12 font-brandon\">\r\n <h4 class=\"tit1 fw-bold\">{{ ('order' | translate) + ': ' + order.number }}</h4>\r\n </div>\r\n <ng-container *ngIf=\"order?.invoice\">\r\n <div class=\"col-sm col-12 font-brandon\" *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <a target=\"_blank\" [href]=\"consts.getUrlBase().slice(0, -1) + order.invoice\"\r\n class=\"btn btn-link btn-invoice\">\r\n <i class=\"fas fa-file-download me-1\"></i>\r\n {{ 'download' | translate }} {{ 'invoices' | translate | titlecase }}\r\n </a>\r\n </div>\r\n </ng-container>\r\n <a (click)=\"volver()\" class=\"col-auto text-end\">\r\n <button class=\"btn btvolver bg-gray text-white\">{{ 'back-to-orders' | translate }}</button>\r\n </a>\r\n </div>\r\n\r\n <section id=\"orders\">\r\n <div class=\"row pt-2\">\r\n <div class=\"col-md-2 col-12\">\r\n <p class=\"st\">{{ 'payment-state' | translate }}:</p>\r\n <p class=\"\">\r\n {{ order.payments[0].state | translate }}\r\n </p>\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\">\r\n <p class=\"st\">{{ 'shipment-state' | translate }}:</p>\r\n <p class=\"\">\r\n {{ order.shipments[0].state | translate }}\r\n </p>\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\">\r\n <p class=\"st\">{{ 'payment-method' | translate }}:</p>\r\n <p class=\"\">\r\n {{ order.payments[0]?.method?.name | translate }}\r\n </p>\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\">\r\n <p class=\"st\">{{ 'shipment-method' | translate }}:</p>\r\n <p class=\"\">\r\n {{ order.shipments[0].method.name }}\r\n </p>\r\n <!-- ACA DEBERIA IR EL LINK DE SEGUIMIENTO -->\r\n <a *ngIf=\"order.tracking\" [href]=\"order.tracking\"\r\n class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver\r\n seguimiento</a>\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\">\r\n <p class=\"st\">{{ 'date' | translate }}:</p>\r\n <p class=\"\">\r\n {{ toDate(order.checkoutCompletedAt, 'DD/MM/YYYY') | translate }}<br>\r\n {{ toDate(order.checkoutCompletedAt, 'h:mm:ss a') | translate }}\r\n </p>\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <p class=\"st\">{{ 'total' | translate }}:</p>\r\n <h5 class=\"fw-bold\">\r\n {{ (order.totals.total) | ecCurrencySymbol:'alwaysShowDecimals'}}\r\n\r\n </h5>\r\n </div>\r\n </div>\r\n </section>\r\n\r\n <div class=\"text-end mt-3\" *ngIf=\"!hidePrices && allowRepeatOrders\">\r\n <button class=\"btn btn-primary mb-2\" (click)=\"repeatOrder()\">\r\n {{ 'repeat-order' | translate }}\r\n </button>\r\n </div>\r\n\r\n <div class=\"container py-3 border-top border-bottom\">\r\n <div *ngIf=\"order.items.length; else noProducts\" class=\"row\">\r\n <div class=\"col-2 font-sm font-brandon d-none d-md-block\">\r\n {{ 'product' | translate | uppercase }}\r\n </div>\r\n <div class=\"col-4 font-sm font-brandon d-none d-md-block\">\r\n {{ 'description' | translate | uppercase }}\r\n </div>\r\n <div id=\"colLots\" *ngIf=\"ordersService.channelConfig.applyOrderLot\"\r\n class=\"col-1 font-sm font-brandon d-none d-md-block\">\r\n <!-- {{ 'description' | translate | uppercase }} -->\r\n {{ 'lots' | translate | uppercase }}\r\n </div>\r\n <div class=\"col-2 text-center font-sm font-brandon d-none d-md-block\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n {{ 'unit-price' | translate | uppercase }}\r\n </div>\r\n <div class=\"col-1 text-center font-sm font-brandon d-none d-md-block\">\r\n {{ 'quantity' | translate | uppercase }}\r\n </div>\r\n <div class=\"col-2 text-end font-sm font-brandon d-none d-md-block\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n {{ 'total' | translate | uppercase }}\r\n </div>\r\n </div>\r\n <ng-container *ngFor=\"let item of order.items; let i = index\">\r\n <div class=\"row cart-items\">\r\n <div class=\"col-5 col-md-2 py-2\">\r\n <ng-container *ngIf=\"item.product.variants[0]?.images?.length ; else defaultpicture\">\r\n <img class=\"smc maxwidth img-fluid rounded-custom \"\r\n [src]=\"consts.mediaUrl() + item.product.variants[0].images[0]\" alt=\"\">\r\n </ng-container>\r\n <ng-template #defaultpicture>\r\n <img *ngIf=\"item.product.picturesdefault\"\r\n class=\"smc maxwidth img-fluid rounded-custom\"\r\n [src]=\"consts.mediaUrl() + item.product.picturesdefault[0]\" alt=\"\">\r\n </ng-template>\r\n </div> \r\n <div\r\n class=\"col-md-4 col-7 d-flex flex-column justify-content-center\">\r\n <p class=\"font-brandon d-flex w-100 mb-0\">\r\n {{ item.product.name }} (Cod:{{ item.product.variants[0].code }})\r\n </p>\r\n <p *ngIf=\"item.comments\" class=\"comment-truncated fst-italic small text-muted mt-1\">\r\n \"{{ item.comments }}\"\r\n </p>\r\n </div>\r\n <div class=\"col-md-1 col-1 flex-column flex-md-row justify-content-start d-flex align-items-center\"\r\n *ngIf=\"ordersService.channelConfig.applyOrderLot\">\r\n <input type=\"button\" class=\"btn btn-primary btnSeguir m-0 text-center\" type=\"button\"\r\n [attr.data-bs-toggle]=\"'collapse'\" [attr.data-bs-target]=\"'#collapseExample'+i\"\r\n aria-expanded=\"false\" [attr.aria-controls]=\"'collapseExample'+i\"\r\n value=\"{{ 'see' | translate | uppercase }}\">\r\n </div>\r\n <div class=\"container d-md-none\">\r\n <div class=\"row\">\r\n <div class=\"col-4\">\r\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\r\n </div>\r\n <div class=\"col-4 font-xl\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <p class=\"text-center w-100 m-0\"> {{ (item.product.variants[0].saleprice ?\r\n item.product.variants[0].saleprice : item.product.variants[0].price) |\r\n ecCurrencySymbol:'alwaysShowDecimals'}}</p>\r\n </div>\r\n <div class=\"col-4 font-xl\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <p class=\"text-center w-100 m-0\"> {{ ((item.product.variants[0].saleprice ?\r\n item.product.variants[0].saleprice : item.product.variants[0].price) *\r\n item.quantity) | ecCurrencySymbol:'alwaysShowDecimals'}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-2 d-none d-md-flex align-items-center\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <p class=\"text-center w-100 m-0\">\r\n {{ (item.product.variants[0].saleprice ? item.product.variants[0].saleprice :\r\n item.product.variants[0].price) | ecCurrencySymbol:'alwaysShowDecimals'}}\r\n </p>\r\n </div>\r\n <div class=\"col-1 d-none d-md-flex align-items-center\">\r\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\r\n </div>\r\n <div class=\"col-2 d-none d-md-flex align-items-center\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <p class=\"text-end w-100 m-0\">\r\n {{ ((item.product.variants[0].saleprice ? item.product.variants[0].saleprice :\r\n item.product.variants[0].price) * item.quantity) | ecCurrencySymbol:'alwaysShowDecimals'}}</p>\r\n </div>\r\n <div class=\"collapse\" [attr.id]=\"'collapseExample'+i\">\r\n <div class=\"card card-body\">\r\n <table class=\"table table-striped\">\r\n <thead>\r\n <tr>\r\n <th scope=\"col\">#</th>\r\n <th scope=\"col\">Estado</th>\r\n <th scope=\"col\">Cantidad</th>\r\n <th scope=\"col\">Fecha Solicitada</th>\r\n <th scope=\"col\">Fecha Estimada</th>\r\n <th scope=\"col\">Sede</th>\r\n <th scope=\"col\">Nota</th>\r\n <th scope=\"col\">Total Lote</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <ng-container *ngFor=\"let lot of item.orderItemLot\">\r\n <tr>\r\n <th scope=\"row\">{{lot.id}}</th>\r\n <td>{{lot.lot_status}}</td>\r\n <td>{{lot.quantity}}</td>\r\n <td>{{ toDate(lot.date_request, 'DD/MM/YYYY') | translate }}</td>\r\n <td *ngIf=\"lot.date_deliver; else sinFechaEstimada\">{{\r\n toDate(lot.date_deliver, 'DD/MM/YYYY') | translate }}</td>\r\n <ng-template #sinFechaEstimada>\r\n <td>Pendiente</td>\r\n </ng-template>\r\n <td>{{lot.shipping_address_name}}</td>\r\n <td>{{lot.notes}}</td>\r\n <td>{{lot.total_lot | ecCurrencySymbol:'alwaysShowDecimals'}}</td>\r\n </tr>\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </ng-container>\r\n </div>\r\n\r\n <div class=\"container\">\r\n <div class=\"row\">\r\n <div class=\"col-12 col-md-6\"></div>\r\n <div class=\"col-12 col-md-6\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <div class=\"row py-4\">\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'total-products' |\r\n translate }}</div>\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\r\n {{ (order.totals.subtotal) | ecCurrencySymbol:'alwaysShowDecimals' }}\r\n </div>\r\n\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'shipment' |\r\n translate }}</div>\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\r\n {{ (order.totals.shipping || '0') | ecCurrencySymbol:'alwaysShowDecimals' }}\r\n\r\n </div>\r\n\r\n <div *ngIf=\"!hideDiscounts && order.totals.promotion && order.totals.promotion != 0\"\r\n class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'discount' |\r\n translate }}</div>\r\n <div *ngIf=\"!hideDiscounts && order.totals.promotion && order.totals.promotion != 0\"\r\n class=\"col-6 font-brandon font-md text-gray border-bottom text-end text-end\">\r\n {{ (order.totals.promotion) | ecCurrencySymbol:'alwaysShowDecimals' }}</div>\r\n\r\n <div *ngIf=\"!hideTaxes && order.totals.taxes && order.totals.taxes != 0 \"\r\n class=\"col-6 font-brandon font-md text-gray border-bottom \">\r\n {{ 'taxes' | translate }}</div>\r\n <div *ngIf=\"!hideTaxes && order.totals.taxes && order.totals.taxes != 0\"\r\n class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\r\n {{ (order.totals.taxes) | ecCurrencySymbol:'alwaysShowDecimals' }}</div>\r\n\r\n <div class=\"col-6 font-brandon font-md\">{{ 'total' | translate | uppercase }}</div>\r\n <div class=\"col-6 font-brandon font-md text-end\">\r\n {{ (order.totals.total) | ecCurrencySymbol:'alwaysShowDecimals' }}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n</main>\r\n\r\n<ng-template #noOrder>\r\n <div class=\"w-100 h-50\">\r\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\r\n <h5>{{ 'no-orders' | translate }}</h5>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #loadingView>\r\n <div class=\"w-100 h-50 py-5\">\r\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\r\n <app-loading-full-ec></app-loading-full-ec>\r\n </div>\r\n </div>\r\n</ng-template>",
|
|
13613
13613
|
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}"]
|
|
13614
13614
|
})
|
|
13615
13615
|
], OrderEcComponent);
|