Skip to content

Commit

Permalink
feat(bookings): [PPT-1781] ignore clash check forvisitor booking (#284)
Browse files Browse the repository at this point in the history
  • Loading branch information
naqvis authored Feb 21, 2025
1 parent 2199289 commit 8eac497
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/placeos-models/booking.cr
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ module PlaceOS::Model
end

def clashing? : Bool
return false if self.deleted || self.rejected || self.checked_out_at
return false if self.deleted || self.rejected || self.checked_out_at || self.booking_type.downcase == "visitor"
clashing_bookings.size > 0
end

Expand Down Expand Up @@ -591,6 +591,8 @@ module PlaceOS::Model
end

def clashing_bookings : Array(Booking)
return [] of Booking if self.booking_type.downcase == "visitor"

update_assets

# we need to check for clashes against each recurrence
Expand Down

0 comments on commit 8eac497

Please sign in to comment.