enhance phase countdown and booking window descriptions for clarity

This commit is contained in:
natib21
2026-07-03 23:24:41 +00:00
parent 1d8f095831
commit 18926c32cb
6 changed files with 756 additions and 0 deletions

View File

@@ -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}