mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 20:10:56 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user