account changes

This commit is contained in:
2024-06-03 09:35:42 -05:00
parent d488f90f48
commit 3d5b7e3f39
10 changed files with 615 additions and 64 deletions

View File

@@ -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;