remove reopen delay minutes from global rules and update related types

- Removed the  field from  and related components.
- Updated  to reflect the removal of the reopen delay input field.
- Modified  to include new train number fields:  and .
- Added  interface to manage active schedules with trade direction.
- Introduced  interface to track wagon shortages in bookings.
- Updated  logic to ensure consistent UI state representation.
- Created migrations to drop the  column and add  and  columns to the  table.
- Added tests for the new booking window display logic and wagon planning functionality.
This commit is contained in:
Marshal
2026-07-15 09:13:02 +00:00
parent 9be7f356f0
commit 11771e5f92
39 changed files with 1731 additions and 269 deletions

View File

@@ -15,6 +15,8 @@ export function DataTable<TData, TValue>({
data,
status,
onRowClick,
rowStyle,
rowClassName,
tableOptions,
pagination,
footer,
@@ -115,11 +117,15 @@ export function DataTable<TData, TValue>({
onRowClick(row.original);
}}
role={onRowClick ? "button" : ""}
className={
style={rowStyle?.(row.original)}
className={[
onRowClick
? "cursor-pointer hover:bg-accent hover:text-foreground "
: ""
}
? "cursor-pointer hover:bg-accent hover:text-foreground"
: "",
rowClassName?.(row.original) ?? "",
]
.join(" ")
.trim()}
>
{row.getVisibleCells().map((cell) => (
<Table.Td

View File

@@ -21,6 +21,10 @@ export interface DataTableProps<TData, TValue> {
data: TData[];
status?: "loading" | "error" | "success";
onRowClick?: (row: TData) => void;
/** Per-row inline style (e.g. data-driven background tints via CSS variables). */
rowStyle?: (row: TData) => React.CSSProperties | undefined;
/** Per-row extra class, appended after the built-in clickable-row classes. */
rowClassName?: (row: TData) => string | undefined;
tableOptions?: Omit<
TableOptions<TData>,
"data" | "columns" | "getCoreRowModel"