From d49c7a48d50b5c360d4e74c12fd3177a63fbe872 Mon Sep 17 00:00:00 2001 From: natib21 Date: Fri, 19 Jun 2026 13:07:03 +0000 Subject: [PATCH] vehicle --- .../src/components/fleet/FleetCardGrid.tsx | 39 ++++++--- .../components/fleet/FleetRecordActions.tsx | 81 +++++++++-------- .../src/pages/fleet/FleetResourcePage.tsx | 86 +++++++++++++------ 3 files changed, 129 insertions(+), 77 deletions(-) diff --git a/apps/edr-freight-web/backoffice/src/components/fleet/FleetCardGrid.tsx b/apps/edr-freight-web/backoffice/src/components/fleet/FleetCardGrid.tsx index 4eedb52b4..b523e309b 100644 --- a/apps/edr-freight-web/backoffice/src/components/fleet/FleetCardGrid.tsx +++ b/apps/edr-freight-web/backoffice/src/components/fleet/FleetCardGrid.tsx @@ -84,29 +84,46 @@ const FleetCardGrid = ({ radius="lg" padding="lg" withBorder - style={{ borderColor: "var(--mantine-color-gray-2)" }} + style={{ + borderColor: "var(--mantine-color-gray-2)", + transition: "all 200ms ease", + cursor: "pointer", + }} + className="hover:shadow-md hover:border-green-3" + onMouseEnter={(e) => { + e.currentTarget.style.boxShadow = + "0 4px 12px rgba(0, 0, 0, 0.08)"; + e.currentTarget.style.borderColor = + "var(--mantine-color-green-3)"; + }} + onMouseLeave={(e) => { + e.currentTarget.style.boxShadow = "none"; + e.currentTarget.style.borderColor = + "var(--mantine-color-gray-2)"; + }} > - +
{cardInitials(title)}
- - + + {title || "—"} {subtitle != null && subtitle !== "" ? ( @@ -120,7 +137,7 @@ const FleetCardGrid = ({
{code != null && code !== "" ? ( - + {String(code)} ) : null} diff --git a/apps/edr-freight-web/backoffice/src/components/fleet/FleetRecordActions.tsx b/apps/edr-freight-web/backoffice/src/components/fleet/FleetRecordActions.tsx index 2a594a645..2972b9d5b 100644 --- a/apps/edr-freight-web/backoffice/src/components/fleet/FleetRecordActions.tsx +++ b/apps/edr-freight-web/backoffice/src/components/fleet/FleetRecordActions.tsx @@ -1,4 +1,4 @@ -import { MoreHorizontal, Pencil, Trash2, Truck } from "lucide-react"; +import { MoreHorizontal, Pencil, Trash2, Eye, Copy } from "lucide-react"; import { ActionIcon, Button, Group, Menu, Tooltip } from "@mantine/core"; import { useNavigate } from "react-router-dom"; @@ -33,37 +33,40 @@ const FleetRecordActions = ({ return ( {showDetail ? ( - + + + + + ) : null} - - + + onEdit(record)} + > + + + + + onRemove(record)} + > + + + ); } @@ -71,22 +74,24 @@ const FleetRecordActions = ({ return ( {showDetail ? ( - - - + + + ) : null} - onEdit(record)}> + onEdit(record)}> - - - + + + + + } onClick={() => onRemove(record)}> diff --git a/apps/edr-freight-web/backoffice/src/pages/fleet/FleetResourcePage.tsx b/apps/edr-freight-web/backoffice/src/pages/fleet/FleetResourcePage.tsx index f246ad194..c9e56ae57 100644 --- a/apps/edr-freight-web/backoffice/src/pages/fleet/FleetResourcePage.tsx +++ b/apps/edr-freight-web/backoffice/src/pages/fleet/FleetResourcePage.tsx @@ -1,7 +1,8 @@ import { useEffect, useMemo, useState } from "react"; import { Navigate, useLocation } from "react-router-dom"; import type { ColumnDef } from "@edr/ui-common"; -import { Box, Button, Card, Group, Modal, Select, Stack, Text } from "@mantine/core"; +import { Box, Button, Card, Group, Modal, Stack, Text } from "@mantine/core"; +import { Badge } from "@mantine/core"; import FleetCardGrid from "@/components/fleet/FleetCardGrid"; import FleetFormDialog from "@/components/fleet/FleetFormDialog"; @@ -291,10 +292,23 @@ const FleetResourcePage = () => { const itemLabel = config.label.toLowerCase(); return ( - + + + +
+ + {config.label} + + + {config.subtitle} + +
+
+
+ - + { onViewModeChange={setViewMode} filters={ listFilterSelects ? ( - + {listFilterSelects.map((filter) => ( - v && setStatusFilter(v)} - data={statusFilterOptions} - w={160} - styles={{ input: { borderColor: "var(--mantine-color-gray-3)" } }} - /> + + Status: + + {[{ value: "ALL", label: "All" }, ...statusFilterOptions].map((option) => ( + + ))} + + ) : undefined } />