mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-08 17:08:18 +00:00
fix issues
This commit is contained in:
@@ -64,6 +64,17 @@ export function useBookingMutations(bookingId: string) {
|
||||
onError: (error) => toast.error(parseApiError(error, "Failed to reject booking")),
|
||||
});
|
||||
|
||||
const rescheduleOperation = useMutation({
|
||||
mutationFn: (payload: {
|
||||
scheduledDate: string;
|
||||
trainScheduleId?: string;
|
||||
note?: string;
|
||||
}) => api.bookings.rescheduleOperation.call({ id: bookingId, ...payload }),
|
||||
onSuccess: (data) => onSuccess(data, "Shipment day updated"),
|
||||
onError: (error) =>
|
||||
toast.error(parseApiError(error, "Failed to change the shipment day")),
|
||||
});
|
||||
|
||||
const reviewOperation = useMutation({
|
||||
mutationFn: (payload: {
|
||||
decision: "ACCEPT" | "REQUEST_CHANGES";
|
||||
@@ -162,6 +173,7 @@ export function useBookingMutations(bookingId: string) {
|
||||
startTransit.isPending ||
|
||||
complete.isPending ||
|
||||
reviewOperation.isPending ||
|
||||
rescheduleOperation.isPending ||
|
||||
cancel.isPending;
|
||||
|
||||
return {
|
||||
@@ -170,6 +182,7 @@ export function useBookingMutations(bookingId: string) {
|
||||
requestChanges,
|
||||
staffReject,
|
||||
reviewOperation,
|
||||
rescheduleOperation,
|
||||
generateContract,
|
||||
signContract,
|
||||
payBooking,
|
||||
|
||||
Reference in New Issue
Block a user