mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-09 02:28:18 +00:00
feat: enhance booking management with export train selection and rescheduling functionality
This commit is contained in:
@@ -1329,6 +1329,19 @@ export default function TrainScheduleV2DetailPage() {
|
||||
}
|
||||
action={
|
||||
<Group gap="sm" wrap="nowrap">
|
||||
{/* Booking shut only by the close offset — the one closed state
|
||||
staff can undo here, so it gets a visible button. */}
|
||||
{schedule.closeOffsetReopen?.eligible ? (
|
||||
<Button
|
||||
variant="filled"
|
||||
color="edr-green"
|
||||
size="compact-sm"
|
||||
leftSection={<Unlock size={14} />}
|
||||
onClick={() => setCloseOffsetOpen(true)}
|
||||
>
|
||||
Reduce close offset
|
||||
</Button>
|
||||
) : null}
|
||||
{/* Merging rewrites the consist, so it is offered only while
|
||||
the departure can still be edited. */}
|
||||
{canEditBookings ? (
|
||||
|
||||
@@ -378,12 +378,26 @@ export default function TrainScheduleV2ListPage() {
|
||||
},
|
||||
{
|
||||
id: "actions",
|
||||
size: 210,
|
||||
size: 330,
|
||||
meta: { headerClassName, cellClassName: `${cellClassName} whitespace-nowrap` },
|
||||
cell: ({ row }) => {
|
||||
const schedule = row.original;
|
||||
return (
|
||||
<Group gap="xs" justify="flex-end" wrap="nowrap" onClick={(e) => e.stopPropagation()}>
|
||||
{/* Booking shut only by the close offset: a visible button, since
|
||||
this is the one closed state staff can fix from the board. */}
|
||||
{schedule.closeOffsetReopen?.eligible ? (
|
||||
<Button
|
||||
variant="filled"
|
||||
color="edr-green"
|
||||
size="xs"
|
||||
radius="md"
|
||||
leftSection={<Unlock size={14} />}
|
||||
onClick={() => setCloseOffsetId(schedule.id)}
|
||||
>
|
||||
Reduce offset
|
||||
</Button>
|
||||
) : null}
|
||||
<Button
|
||||
variant="light"
|
||||
color="indigo"
|
||||
|
||||
Reference in New Issue
Block a user