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

@@ -15,7 +15,7 @@ import { MailService } from '../../../services/mail.service';
import { SelectOptionsService } from '../../../services/select-options.service';
import { UserService } from '../../../services/user.service';
import { SharedModule } from '../../../shared/shared/shared.module';
import { getCriteriaStateObject, getSessionStorageHandler } from '../../../utils/utils';
import { getCriteriaStateObject, getSessionStorageHandler, map2User } from '../../../utils/utils';
@Component({
selector: 'app-details-business-listing',
@@ -49,7 +49,8 @@ export class DetailsBusinessListingComponent {
criteria: ListingCriteria;
mailinfo: MailInfo;
environment = environment;
user: KeycloakUser;
keycloakUser: KeycloakUser;
user: User;
listingUser: User;
description: SafeHtml;
private history: string[] = [];
@@ -73,11 +74,16 @@ export class DetailsBusinessListingComponent {
}
});
this.mailinfo = { sender: {}, userId: '', email: '', url: environment.mailinfoUrl };
this.user;
this.criteria = onChange(getCriteriaStateObject(), getSessionStorageHandler);
}
async ngOnInit() {
const token = await this.keycloakService.getToken();
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, 'business'));
this.listingUser = await this.userService.getById(this.listing.userId);
this.description = this.sanitizer.bypassSecurityTrustHtml(this.listing.description);