Feat - disable notes (#2249)

* Feat - disable notes

Stops notes from showing in calendar when checked.

* Removing index rename

* Update apps/web/lib/integrations/calendar/interfaces/Calendar.ts

Co-authored-by: Omar López <[email protected]>

* Rename to hideCalendarNotes

* Update schema.prisma

* Update webhookResponse-chromium.txt

Co-authored-by: Bailey Pumfleet <[email protected]>
Co-authored-by: Omar López <[email protected]>
Co-authored-by: Bailey Pumfleet <[email protected]>
Co-authored-by: Peer Richelsen <[email protected]>
This commit is contained in:
authored and GitHub committed 2022-03-28 18:07:13 +00:00
1 parent 4f1a380969
commit bd66ca183f
7 files changed
+22 -9

No files matched your search

+13 -8
View File
@@ -102,12 +102,17 @@ export const createEvent = async (credential: Credential, calEvent: CalendarEven
const calendar = getCalendar(credential);
let success = true;
// Check if the disabledNotes flag is set to true
if (calEvent.hideCalendarNotes) {
calEvent.description = "Notes have been hidden by the organiser"; // TODO: i18n this string?
}
const creationResult = calendar
? await calendar.createEvent(calEvent).catch((e) => {
log.error("createEvent failed", e, calEvent);
success = false;
return undefined;
})
log.error("createEvent failed", e, calEvent);
success = false;
return undefined;
})
: undefined;
return {
@@ -131,10 +136,10 @@ export const updateEvent = async (
const updatedResult =
calendar && bookingRefUid
? await calendar.updateEvent(bookingRefUid, calEvent).catch((e) => {
log.error("updateEvent failed", e, calEvent);
success = false;
return undefined;
})
log.error("updateEvent failed", e, calEvent);
success = false;
return undefined;
})
: undefined;
return {