enhance booking windows section with pagination and improved UI

This commit is contained in:
Marshal
2026-07-04 00:41:28 +00:00
parent 61f70d5471
commit 97cc9d76b1
21 changed files with 805 additions and 285 deletions

View File

@@ -78,7 +78,13 @@ export function useBookingMutations(bookingId: string) {
note?: string;
}) => api.bookings.reviewOperation.call({ id: bookingId, ...payload }),
onSuccess: (data) => onSuccess(data, "Operation request reviewed"),
onError: () => toast.error("Failed to review operation request"),
onError: (error) => {
toast.error(parseApiError(error, "Failed to review operation request"));
// The transition may have committed even when the response errored (e.g.
// a post-accept step failed). Refetch so the UI shows the true state
// instead of requiring a manual refresh.
void invalidateBookingDetail(qc, bookingId);
},
});
const approveStep = useMutation({