mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 01:48:12 +00:00
enhance booking windows section with pagination and improved UI
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user