jonathanGB/ScheduleGeneratorWebApp

Add possibility of removing events from the calendar

jonathanGB opened this issue · 2 comments

Especially for testing purposes, it might be annoying to have to remove the created events from the calendar. What I suggest as a flow:

1- Once the "insertion" phase is over (with or without errors), show a toaster (underneath the success/error message) that says "click to cancel" or something like that
2- We need to show a UI feedback, just like when they are inserted (info-blue colour?)
3- Show a toaster when all of them have been removed

To remove them, we will need the ID of the event. When we insert, we can pass an ID, so we need to keep track of which IDs have been used for insertion; I suggest using UUIDs as IDs.

https://developers.google.com/calendar/v3/reference/events/instances

We first need to GET the list of recurring events coming from one eventId, then delete them one by one?

Edit: Not necessary to get the list, simply grab the eventId returned after inserting and use that eventId in the delete request.

Done!