account changes
This commit is contained in:
@@ -75,7 +75,7 @@ export class AccountComponent {
|
||||
try {
|
||||
this.user = await this.userService.getByMail(email);
|
||||
} catch (e) {
|
||||
this.user = { email, firstname: keycloakUser.firstName, lastname: keycloakUser.lastName, areasServed: [], licensedIn: [], companyOverview: '', offeredServices: '' };
|
||||
this.user = { email, firstname: keycloakUser.firstName, lastname: keycloakUser.lastName, areasServed: [], licensedIn: [], companyOverview: '', offeredServices: '', customerType: 'broker' };
|
||||
this.user = await this.userService.save(this.user);
|
||||
}
|
||||
}
|
||||
@@ -121,6 +121,9 @@ export class AccountComponent {
|
||||
removeArea() {
|
||||
this.user.areasServed.splice(this.user.areasServed.length - 1, 1);
|
||||
}
|
||||
get isProfessional() {
|
||||
return this.user.customerType === 'broker' || this.user.customerType === 'professional';
|
||||
}
|
||||
select(event: any, type: 'company' | 'profile') {
|
||||
const imageUrl = URL.createObjectURL(event.files[0]);
|
||||
this.type = type;
|
||||
|
||||
Reference in New Issue
Block a user