ng-easycommerce-v18 0.4.5 → 0.4.6
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.
|
@@ -10706,7 +10706,14 @@ class DataformEcComponent {
|
|
|
10706
10706
|
(this._addressingService.modeSelectAddress == 'LOAD_ADDRESS_AND_SELECTION' || this._addressingService.modeSelectAddress == 'ONLY_ADDRESS_SELECTION')
|
|
10707
10707
|
&& firstValueFrom(this._addressingService.getAddressBook()).then(res => {
|
|
10708
10708
|
this.addressBook = res && res || null;
|
|
10709
|
-
this.addressBook
|
|
10709
|
+
if (this.addressBook && this.addressBook.length > 0) {
|
|
10710
|
+
// Seleccionar la primera dirección por defecto
|
|
10711
|
+
this.addressBook[0].selected = true;
|
|
10712
|
+
this.addressBookSelected.id = this.addressBook[0].id;
|
|
10713
|
+
}
|
|
10714
|
+
else {
|
|
10715
|
+
this.addressBook == null && this.setMode('carga');
|
|
10716
|
+
}
|
|
10710
10717
|
}).catch(err => console.error(err.error.message));
|
|
10711
10718
|
// Para formulario principal
|
|
10712
10719
|
this.countries$.subscribe(countries => {
|