Skip to content

Commit

Permalink
Merge pull request #1042 from Shelf-nu/fix-disabled-booking-actions-w…
Browse files Browse the repository at this point in the history
…hen-navigating

adding proper disabled state on buttons when changing booking state
  • Loading branch information
DonKoko authored Jun 10, 2024
2 parents ca18315 + 25b6f43 commit d1a3db0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/components/booking/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ export function BookingForm({
: "You need to add assets to your booking before you can reserve it",
}}
buttonProps={{
disabled: disabled,
type: "submit",
role: "link",
name: "intent",
Expand Down Expand Up @@ -217,6 +218,7 @@ export function BookingForm({
: "Some assets in this booking are not Available because they’re part of an Ongoing or Overdue booking",
}}
buttonProps={{
disabled: disabled,
type: "submit",
name: "intent",
value: "checkOut",
Expand All @@ -230,6 +232,7 @@ export function BookingForm({
{(bookingStatus?.isOngoing || bookingStatus?.isOverdue) &&
!isSelfService ? (
<Button
disabled={disabled}
type="submit"
name="intent"
value="checkIn"
Expand Down

0 comments on commit d1a3db0

Please sign in to comment.