sebo-b / warp

Workspace Autonomous Reservation Program - a system to help you efficiently manage hybrid (assigned, hot-desks, etc) office space.
MIT License
139 stars 60 forks source link

Fix conflicting bookings login filter #40

Open aileo opened 6 months ago

aileo commented 6 months ago

Hi,

I found out that when selecting a time range overlapping user's existing booking and someone else's booking on a seat, the delete action deletes both bookings.

I think the cause is in WarpSeatFactory.getMyConflictingBookings :

!i.book.login == this.login casts i.book.login as boolean first then compare its opposite value to this.login.

i.book.login != this.login checks if values are different.

Another way to do it could be !(i.book.login == this.login)

Anbcorp commented 4 months ago

Hello,

I tested this fix locally with docker-compose and it seems to fix the issue.

Thanks,

sebo-b commented 3 months ago

Hi @aileo

I'm looking for a maintainer for this project, as I've not been able to spend much time on it recently. It seems that you have contributed a lot so far, so please let me know if you are interested.

Regards, /S