add permissions and fix issues

This commit is contained in:
Marshal
2026-07-23 20:24:20 +00:00
parent 40f16f3cec
commit 668b5e1c9d
40 changed files with 18634 additions and 342 deletions

View File

@@ -657,7 +657,16 @@ export const api = {
"finalize-schedule",
(id) => trainSchedulingService.finalizeSchedule(id),
undefined,
() => TRAIN_SCHEDULING_INVALIDATIONS,
// Finalize only flips statuses (schedule DRAFT→SCHEDULED + each booking's
// schedulingStatus) — it never touches allocation or loading. Refresh only
// the schedule detail/list + booking views instead of the broad
// train-scheduling ROOT, which refired the eligible-bookings / pool /
// yard-work queries and made the booking lists visibly reload.
() => [
["train-scheduling", "schedule"],
["train-scheduling", "schedules"],
QUERY_KEYS.BOOKINGS.ROOT,
],
),
dispatchSchedule: endpoint<string, TrainScheduleDetail>(

View File

@@ -97,6 +97,7 @@ export interface ContractView {
contractId: string;
reference: string;
status: string;
freightType: "BULK" | "CONTAINER";
templateKey: string;
title: string;
html: string;