Skip to content

Commit

Permalink
chore(bookings): tweak handling of visitor cal links when no booking
Browse files Browse the repository at this point in the history
  • Loading branch information
MrYuion committed Jan 22, 2025
1 parent 54420b2 commit dfb0e9e
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions libs/bookings/src/lib/invite-visitor-form.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -524,20 +524,22 @@ export class InviteVisitorFormComponent
]);
await (this.multiple ? this._bookForMany() : this._bookForOne());
this.last_success = this._service.last_success;
const event: CalEvent = {
...this.last_success,
host: this.last_success.user_email,
organiser: {
name: this.last_success.user_name,
email: this.last_success.user_email,
} as any,
attendees: this.last_success.attendees.map((_) => _.email),
body: this.last_success.description,
location: this.last_success.asset_name,
};
this.outlook_link = generateMicrosoftCalendarLink(event);
this.google_link = generateGoogleCalendarLink(event);
this.ical_link = generateCalendarFileLink(event);
if (this.last_success) {
const event: CalEvent = {
...this.last_success,
host: this.last_success.user_email,
organiser: {
name: this.last_success.user_name,
email: this.last_success.user_email,
} as any,
attendees: this.last_success.attendees.map((_) => _.email),
body: this.last_success.description,
location: this.last_success.asset_name,
};
this.outlook_link = generateMicrosoftCalendarLink(event);
this.google_link = generateGoogleCalendarLink(event);
this.ical_link = generateCalendarFileLink(event);
}
await this.initFormZone();
this.sent = true;
}
Expand Down

0 comments on commit dfb0e9e

Please sign in to comment.