Issues #47,#42, #35 resolved, request logging erweitert

This commit is contained in:
2024-05-24 18:15:33 -05:00
parent c9d94e973a
commit 0473f74241
7 changed files with 32 additions and 12 deletions

View File

@@ -49,7 +49,8 @@ export class DetailsCommercialPropertyListingComponent {
criteria: ListingCriteria;
mailinfo: MailInfo;
environment = environment;
user: KeycloakUser;
keycloakUser: KeycloakUser;
user: User;
listingUser: User;
description: SafeHtml;
ts = new Date().getTime();
@@ -75,7 +76,11 @@ export class DetailsCommercialPropertyListingComponent {
async ngOnInit() {
const token = await this.keycloakService.getToken();
this.user = map2User(token);
this.keycloakUser = map2User(token);
if (this.keycloakUser) {
this.user = await this.userService.getByMail(this.keycloakUser.email);
this.mailinfo.sender = { name: `${this.user.firstname} ${this.user.lastname}`, email: this.user.email, phoneNumber: this.user.email, state: this.user.companyLocation };
}
this.listing = await lastValueFrom(this.listingsService.getListingById(this.id, 'commercialProperty'));
this.listingUser = await this.userService.getById(this.listing.userId);
this.description = this.sanitizer.bypassSecurityTrustHtml(this.listing.description);