mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 23:28:11 +00:00
chnages
This commit is contained in:
@@ -20,7 +20,7 @@ import { useDebouncedValue } from "@mantine/hooks";
|
||||
import { isAxiosError } from "axios";
|
||||
import {
|
||||
ArrowRight,
|
||||
Ban,
|
||||
// Ban, — used only by the commented-out "Cancel schedule" row action
|
||||
CalendarClock,
|
||||
Clock,
|
||||
Eye,
|
||||
@@ -196,7 +196,7 @@ export default function TrainScheduleV2ListPage() {
|
||||
}),
|
||||
);
|
||||
const create = useMutation(api.trainScheduling.createSchedule.mutationOptions());
|
||||
const cancel = useMutation(api.trainScheduling.cancelSchedule.mutationOptions());
|
||||
// const cancel = useMutation(api.trainScheduling.cancelSchedule.mutationOptions());
|
||||
|
||||
// Intercity (same-country / DOMESTIC) routes cannot be scheduled yet — the
|
||||
// API rejects them, so keep them out of the picker entirely.
|
||||
@@ -464,6 +464,9 @@ export default function TrainScheduleV2ListPage() {
|
||||
Booking window settings
|
||||
</Menu.Item>
|
||||
) : null}
|
||||
{/* Cancel schedule — hidden for now (frontend only; the
|
||||
cancelSchedule mutation is untouched). Restore by
|
||||
uncommenting.
|
||||
{["DRAFT", "SCHEDULED"].includes(schedule.status) ? (
|
||||
<Menu.Item
|
||||
color="red"
|
||||
@@ -487,6 +490,7 @@ export default function TrainScheduleV2ListPage() {
|
||||
Cancel schedule
|
||||
</Menu.Item>
|
||||
) : null}
|
||||
*/}
|
||||
</Menu.Dropdown>
|
||||
</Menu>
|
||||
</Group>
|
||||
@@ -494,7 +498,7 @@ export default function TrainScheduleV2ListPage() {
|
||||
},
|
||||
},
|
||||
];
|
||||
}, [navigate, cancel.isPending, cancel, toast]);
|
||||
}, [navigate, toast]);
|
||||
|
||||
const handleCreate = async () => {
|
||||
if (!routeId || !scheduleDate || !trainId) {
|
||||
|
||||
Reference in New Issue
Block a user