Refactor patching of location and category information to autofil from bio and user location.
This commit is contained in:
@@ -119,10 +119,26 @@ export class AccountDetailsComponent implements OnInit {
|
||||
type: this.account.type,
|
||||
bio: this.account.products,
|
||||
gender: this.account.gender,
|
||||
businessCategory: this.account.category,
|
||||
businessCategory:
|
||||
this.account.category ||
|
||||
this.userService.getCategoryByProduct(this.account.products[0]),
|
||||
userLocation: this.account.location.area_name,
|
||||
location: this.account.location.area,
|
||||
locationType: this.account.location.area_type,
|
||||
location:
|
||||
this.account.location.area ||
|
||||
this.locationService
|
||||
.getAreaNameByLocation(this.account.location.area_name)
|
||||
.pipe(first())
|
||||
.subscribe((response) => {
|
||||
return response;
|
||||
}),
|
||||
locationType:
|
||||
this.account.location.area_type ||
|
||||
this.locationService
|
||||
.getAreaTypeByArea(this.accountInfoFormStub.location.value)
|
||||
.pipe(first())
|
||||
.subscribe((response) => {
|
||||
return response;
|
||||
}),
|
||||
});
|
||||
this.userService
|
||||
.getAccountStatus(this.account.vcard?.tel[0].value)
|
||||
|
||||
Reference in New Issue
Block a user