Skip to content
This repository has been archived by the owner on Apr 27, 2023. It is now read-only.

Commit

Permalink
fix(#642): fix issue with dismissing edit modal on BlackoutList.vue
Browse files Browse the repository at this point in the history
also fix the wording of out of bounds date validations
  • Loading branch information
a-drew authored and Alex-Hayeur committed Apr 7, 2021
1 parent 4cf60c9 commit f396a80
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app/Models/Room.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ public function verifyDatesAreWithinRoomRestrictionsValidation($startDate, $fail
$max_days = $special_max ?? $this->max_days_advance;

if (Carbon::today()->diffInDays($startTime) < $min_days) {
$fail('You can not book this room later than ' . $min_days . ' days in advance');
$fail('You can not book this room earlier than ' . $min_days . ' days in advance');
} elseif (Carbon::today()->diffInDays($startTime) > $max_days) {
$fail('You can not book this room sooner than ' . $max_days . ' days in advance');
$fail('You can not book this room later than ' . $max_days . ' days in advance');
}
}

Expand Down Expand Up @@ -215,7 +215,7 @@ private function notWithinAvailabilities($startDate, $endDate)
$endTime > $availabilityEnd->closing_hours;
}



public function minimumReservationTime($startDate, $endDate, $fail)
{
Expand Down
2 changes: 1 addition & 1 deletion resources/js/Pages/Admin/Blackouts/BlackoutList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<!--Update Blackout Form -->
<jet-confirmation-modal :show="blackoutBeingUpdated != null" @close="blackoutBeingUpdated = null">
<template #title>
Update Blackout: {{ blackoutBeingUpdated.name}}
Update Blackout: {{ blackoutBeingUpdated != null && blackoutBeingUpdated.name }}
</template>

<template #content>
Expand Down

0 comments on commit f396a80

Please sign in to comment.