fix(shifts): minor overlap fix
This commit is contained in:
parent
b513f02fe5
commit
7e95e8dae3
|
|
@ -157,7 +157,7 @@ export class ShiftsUpdateDeleteService {
|
|||
private overlapChecker = async (shifts: ShiftDto[]): Promise<Result<void, string>> => {
|
||||
for (const shift_a of shifts) {
|
||||
for(const shift_b of shifts){
|
||||
if(shift_a.date === shift_b.date){
|
||||
if((shift_a.date === shift_b.date) && (shift_a.id !== shift_b.id)){
|
||||
const has_overlap = overlaps(
|
||||
{ start: toHHmmFromString(shift_a.start_time), end: toHHmmFromString(shift_a.end_time) },
|
||||
{ start: toDateFromString(shift_b.start_time), end: toDateFromString(shift_b.end_time) },
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user