mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 02:58:11 +00:00
enhance phase countdown and booking window descriptions for clarity
This commit is contained in:
@@ -12,6 +12,7 @@ export interface FleetRecordActionsProps {
|
||||
onRemove: (record: FleetRecord) => void;
|
||||
onAssignDriver?: (record: FleetRecord) => void;
|
||||
onHistory?: (record: FleetRecord) => void;
|
||||
onViewDetail?: (record: FleetRecord) => void;
|
||||
layout?: "row" | "compact";
|
||||
}
|
||||
|
||||
@@ -22,11 +23,13 @@ const FleetRecordActions = ({
|
||||
onRemove,
|
||||
onAssignDriver,
|
||||
onHistory,
|
||||
onViewDetail,
|
||||
layout = "row",
|
||||
}: FleetRecordActionsProps) => {
|
||||
const navigate = useNavigate();
|
||||
const removeLabel = config.removeActionLabel ?? "Delete";
|
||||
const showDetail = Boolean(config.detailPath && "id" in record);
|
||||
const showViewDetail = Boolean(onViewDetail);
|
||||
const isVehicle = config.slug === "vehicles";
|
||||
const showHistory =
|
||||
Boolean(onHistory) &&
|
||||
@@ -62,6 +65,14 @@ const FleetRecordActions = ({
|
||||
>
|
||||
Edit
|
||||
</MenuItem>
|
||||
{showViewDetail ? (
|
||||
<MenuItem
|
||||
onClick={() => onViewDetail?.(record)}
|
||||
leftSection={<Eye size={14} strokeWidth={2} />}
|
||||
>
|
||||
View detail
|
||||
</MenuItem>
|
||||
) : null}
|
||||
{showHistory ? (
|
||||
<MenuItem
|
||||
onClick={() => onHistory?.(record)}
|
||||
@@ -114,6 +125,14 @@ const FleetRecordActions = ({
|
||||
>
|
||||
Edit
|
||||
</MenuItem>
|
||||
{showViewDetail ? (
|
||||
<MenuItem
|
||||
onClick={() => onViewDetail?.(record)}
|
||||
leftSection={<Eye size={14} strokeWidth={2} />}
|
||||
>
|
||||
View detail
|
||||
</MenuItem>
|
||||
) : null}
|
||||
{showDetail ? (
|
||||
<MenuItem
|
||||
onClick={handleDetail}
|
||||
|
||||
Reference in New Issue
Block a user