Time slots over lapping

just an overview of what im trying to implement.

  • An instructor can set his/her available time slots with different durations.
  • User is also able to set A slot for whole month by using a toggle if he/she wants to replicate the slots for the whole month. e.g user sets slot for monday from 5pm to 6 pm it will automatically replicate to 3 consecutive mondays.
  • User can also delete the slots one at a time.
    the problem im facing is if I create a slot for Mondays 5 pm to 6 pm of the whole month. and delete the slot of the first monday and again create the slot from 5pm to 6pm it will be fine for the first monday but for other 3 consecutive monday there is already a slot set for that time. i will create overlapping time slots how can i avoid this.
    here is the loom link of demonstration what i want to say.
    https://www.loom.com/share/944409fecdc740c18fd0fd72daca81c6?sid=e898c5b2-5631-4ea6-b5ed-67d995314696

Like you said, you are deleting one record and then creating for entire month but the rest of the month was never deleted. You def want to untooggle duplicate set for entire month post any slots being created.

1 Like