I have a set of employees and a set of time slots. For example
Employees
EMP1
EMP2
EMP3
EMP4
EMP5
Time Slots
08:00AM-10:00AM
10:00AM-12:00PM
04:00PM-06:00PM
08:00AM-12:00PM
02:00PM-06:00PM
08:00AM-04:00PM
09:00AM-01:00PM
08:30AM-01:30PM
12:00PM-04:00PM
2:00PM-3:00PM
An employee can be allocated to any timeslots. What I need is that, if an Employee is allocated in time slots 8:00Am-12:00PM then that Employee should not be available in 08:00AM-10:00AM and 10:00AM-12:00PM slots. Similarly, if an employee is allocated in 04:00PM-06:00PM then that employee should not be available in any of the timeslots between 04:00PM-06:00PM, but can be available before and after time slots, not in between.
How to do this?