parent
2feed85a1a
commit
eefb829f75
1 changed files with 4 additions and 14 deletions
|
@ -82,8 +82,8 @@ export default class EventManager {
|
||||||
let evt = EventManager.processLocation(event);
|
let evt = EventManager.processLocation(event);
|
||||||
const isDedicated = evt.location ? EventManager.isDedicatedIntegration(evt.location) : null;
|
const isDedicated = evt.location ? EventManager.isDedicatedIntegration(evt.location) : null;
|
||||||
|
|
||||||
let results: Array<EventResult> = [];
|
// First, create all calendar events. If this is a dedicated integration event, don't send a mail right here.
|
||||||
|
const results: Array<EventResult> = await this.createAllCalendarEvents(evt, isDedicated);
|
||||||
// If and only if event type is a dedicated meeting, create a dedicated video meeting.
|
// If and only if event type is a dedicated meeting, create a dedicated video meeting.
|
||||||
if (isDedicated) {
|
if (isDedicated) {
|
||||||
const result = await this.createVideoEvent(evt);
|
const result = await this.createVideoEvent(evt);
|
||||||
|
@ -95,10 +95,6 @@ export default class EventManager {
|
||||||
await EventManager.sendAttendeeMail("new", results, evt);
|
await EventManager.sendAttendeeMail("new", results, evt);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now create all calendar events. If this is a dedicated integration event,
|
|
||||||
// don't send a mail right here, because it has already been sent.
|
|
||||||
results = results.concat(await this.createAllCalendarEvents(evt, isDedicated));
|
|
||||||
|
|
||||||
const referencesToCreate: Array<PartialReference> = results.map((result: EventResult) => {
|
const referencesToCreate: Array<PartialReference> = results.map((result: EventResult) => {
|
||||||
let uid = "";
|
let uid = "";
|
||||||
if (result.createdEvent) {
|
if (result.createdEvent) {
|
||||||
|
@ -162,9 +158,8 @@ export default class EventManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
const isDedicated = evt.location ? EventManager.isDedicatedIntegration(evt.location) : null;
|
const isDedicated = evt.location ? EventManager.isDedicatedIntegration(evt.location) : null;
|
||||||
|
// First, create all calendar events. If this is a dedicated integration event, don't send a mail right here.
|
||||||
let results: Array<EventResult> = [];
|
const results: Array<EventResult> = await this.updateAllCalendarEvents(evt, booking, isDedicated);
|
||||||
|
|
||||||
// If and only if event type is a dedicated meeting, update the dedicated video meeting.
|
// If and only if event type is a dedicated meeting, update the dedicated video meeting.
|
||||||
if (isDedicated) {
|
if (isDedicated) {
|
||||||
const result = await this.updateVideoEvent(evt, booking);
|
const result = await this.updateVideoEvent(evt, booking);
|
||||||
|
@ -175,11 +170,6 @@ export default class EventManager {
|
||||||
} else {
|
} else {
|
||||||
await EventManager.sendAttendeeMail("reschedule", results, evt);
|
await EventManager.sendAttendeeMail("reschedule", results, evt);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now update all calendar events. If this is a dedicated integration event,
|
|
||||||
// don't send a mail right here, because it has already been sent.
|
|
||||||
results = results.concat(await this.updateAllCalendarEvents(evt, booking, isDedicated));
|
|
||||||
|
|
||||||
// Now we can delete the old booking and its references.
|
// Now we can delete the old booking and its references.
|
||||||
const bookingReferenceDeletes = prisma.bookingReference.deleteMany({
|
const bookingReferenceDeletes = prisma.bookingReference.deleteMany({
|
||||||
where: {
|
where: {
|
||||||
|
|
Loading…
Reference in a new issue