fix: check for overlapping appointments
This commit is contained in:
parent
640ea4031d
commit
3da430b577
1 changed files with 5 additions and 0 deletions
|
@ -144,6 +144,11 @@ export default function Type(props) {
|
|||
if (dayjs(times[i]).isBetween(startTime, endTime)) {
|
||||
times.splice(i, 1);
|
||||
}
|
||||
|
||||
// Check if slot end time is between start and end time
|
||||
if (dayjs(times[i]).add(props.eventType.length, 'minutes').isBetween(startTime, endTime)) {
|
||||
times.splice(i, 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue