This commit is contained in:
2024-09-11 16:51:42 +02:00
parent 8a7e26d2b6
commit 60866473f7
15 changed files with 135 additions and 117 deletions

View File

@@ -110,7 +110,6 @@ export class DetailsBusinessListingComponent {
this.mailinfo.listing = this.listing;
await this.mailService.mail(this.mailinfo);
this.messageService.addMessage({ severity: 'success', text: 'Your message has been sent to the creator of the listing', duration: 3000 });
this.mailinfo = createMailInfo(this.user);
} catch (error) {
this.messageService.addMessage({
severity: 'danger',
@@ -121,6 +120,9 @@ export class DetailsBusinessListingComponent {
this.validationMessagesService.updateMessages(error.error.message);
}
}
if (this.user) {
this.mailinfo = createMailInfo(this.user);
}
}
get listingDetails() {
let typeOfRealEstate = '';
@@ -158,8 +160,8 @@ export class DetailsBusinessListingComponent {
}
async showShareByEMail() {
const result = await this.emailService.showShareByEMail({
email: this.user.email,
name: `${this.user.firstname} ${this.user.lastname}`,
yourEmail: this.user ? this.user.email : null,
yourName: this.user ? `${this.user.firstname} ${this.user.lastname}` : null,
url: environment.mailinfoUrl,
listingTitle: this.listing.title,
id: this.listing.id,