diff --git a/ApiCore-Frontend/src/app/(app)/apiaries/page.tsx b/ApiCore-Frontend/src/app/(app)/apiaries/page.tsx index 57b169a..1062827 100644 --- a/ApiCore-Frontend/src/app/(app)/apiaries/page.tsx +++ b/ApiCore-Frontend/src/app/(app)/apiaries/page.tsx @@ -5,30 +5,30 @@ import Link from "next/link"; import { MapPin } from "lucide-react"; import { useQuery } from "@tanstack/react-query"; import { fetchApiaries } from "@/lib/apiaries/api"; -import { ApiaryStatus } from "@/lib/apiaries/types"; import { Button } from "@/components/ui/button"; import { Badge } from "@/components/ui/badge"; import { Input } from "@/components/ui/input"; import { PageHeader } from "@/components/page-header"; import { EmptyState } from "@/components/empty-state"; -import { ListItemCard } from "@/components/list-item-card"; -import { - Select, - SelectContent, - SelectItem, - SelectTrigger, - SelectValue, -} from "@/components/ui/select"; +import { EntityCard } from "@/components/entity-card"; +import { ActiveHistoryTabs, type EntityLifecycleTab } from "@/components/active-history-tabs"; export default function ApiariesPage() { - const [status, setStatus] = useState(""); + const [tab, setTab] = useState("active"); const [location, setLocation] = useState(""); const { data: apiaries, isLoading, isError } = useQuery({ - queryKey: ["apiaries", status, location], - queryFn: () => fetchApiaries({ status: status || undefined, location: location || undefined }), + queryKey: ["apiaries"], + queryFn: () => fetchApiaries({}), }); + const byLocation = (apiaries ?? []).filter((apiary) => + location ? (apiary.location ?? "").toLowerCase().includes(location.toLowerCase()) : true, + ); + const activeApiaries = byLocation.filter((apiary) => apiary.status === "ACTIVE"); + const historyApiaries = byLocation.filter((apiary) => apiary.status !== "ACTIVE"); + const visibleApiaries = tab === "active" ? activeApiaries : historyApiaries; + return (
- + ) : null} - {apiaries && apiaries.length === 0 ? ( + {apiaries && visibleApiaries.length === 0 ? ( ) : null} - {apiaries && apiaries.length > 0 ? ( -
- {apiaries.map((apiary) => ( - 0 ? ( +
+ {visibleApiaries.map((apiary) => ( + {apiary.status === "ACTIVE" ? "Aktiv" : "Inaktiv"} } + fields={[{ label: "Adresse", value: apiary.address ?? "—" }]} /> ))}
diff --git a/ApiCore-Frontend/src/app/(app)/colonies/page.tsx b/ApiCore-Frontend/src/app/(app)/colonies/page.tsx index 4e9e97a..8a807f8 100644 --- a/ApiCore-Frontend/src/app/(app)/colonies/page.tsx +++ b/ApiCore-Frontend/src/app/(app)/colonies/page.tsx @@ -12,7 +12,8 @@ import { Button } from "@/components/ui/button"; import { Badge } from "@/components/ui/badge"; import { PageHeader } from "@/components/page-header"; import { EmptyState } from "@/components/empty-state"; -import { ListItemCard } from "@/components/list-item-card"; +import { EntityCard } from "@/components/entity-card"; +import { ActiveHistoryTabs, type EntityLifecycleTab } from "@/components/active-history-tabs"; import { Select, SelectContent, @@ -21,27 +22,26 @@ import { SelectValue, } from "@/components/ui/select"; -const STATUS_OPTIONS: ColonyStatus[] = [ - "ACTIVE", - "WEAK", - "CONSPICUOUS", - "QUEENLESS", - "DISSOLVED", - "SOLD", - "DECEASED", - "MERGED", -]; +const ACTIVE_STATUS_OPTIONS: ColonyStatus[] = ["ACTIVE", "WEAK", "CONSPICUOUS", "QUEENLESS"]; +const HISTORY_STATUS_OPTIONS: ColonyStatus[] = ["DISSOLVED", "SOLD", "DECEASED", "MERGED"]; export default function ColoniesPage() { + const [tab, setTab] = useState("active"); const [status, setStatus] = useState(""); const { data: colonies, isLoading, isError } = useQuery({ - queryKey: ["colonies", status], - queryFn: () => fetchColonies({ status: status || undefined }), + queryKey: ["colonies"], + queryFn: () => fetchColonies({}), }); const exportMutation = useMutation({ mutationFn: exportColoniesCsv }); + const activeColonies = (colonies ?? []).filter((colony) => colony.deactivatedAt === null); + const historyColonies = (colonies ?? []).filter((colony) => colony.deactivatedAt !== null); + const bucketColonies = tab === "active" ? activeColonies : historyColonies; + const visibleColonies = status ? bucketColonies.filter((colony) => colony.status === status) : bucketColonies; + const statusOptions = tab === "active" ? ACTIVE_STATUS_OPTIONS : HISTORY_STATUS_OPTIONS; + return (
- +
+ { + setTab(next); + setStatus(""); + }} + activeCount={activeColonies.length} + historyCount={historyColonies.length} + /> + +
{isLoading ?

Lädt…

: null} {isError ? ( @@ -88,24 +99,32 @@ export default function ColoniesPage() {

) : null} - {colonies && colonies.length === 0 ? ( + {colonies && visibleColonies.length === 0 ? ( ) : null} - {colonies && colonies.length > 0 ? ( -
- {colonies.map((colony) => ( - 0 ? ( +
+ {visibleColonies.map((colony) => ( + {colony.code}} subtitle={colony.colonyType} - trailing={{colony.status}} + badge={{colony.status}} + fields={[ + { label: "Stärke", value: colony.strength ?? "—" }, + { label: "Gesundheit", value: colony.healthStatus ?? "—" }, + ]} /> ))}
diff --git a/ApiCore-Frontend/src/app/(app)/equipment/page.tsx b/ApiCore-Frontend/src/app/(app)/equipment/page.tsx index 48cbec0..a41dafd 100644 --- a/ApiCore-Frontend/src/app/(app)/equipment/page.tsx +++ b/ApiCore-Frontend/src/app/(app)/equipment/page.tsx @@ -9,7 +9,7 @@ import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { PageHeader } from "@/components/page-header"; import { EmptyState } from "@/components/empty-state"; -import { ListItemCard } from "@/components/list-item-card"; +import { EntityCard } from "@/components/entity-card"; export default function EquipmentPage() { const { data: equipmentList, isLoading, isError } = useQuery({ @@ -47,16 +47,17 @@ export default function EquipmentPage() { ) : null} {equipmentList && equipmentList.length > 0 ? ( -
+
{equipmentList.map((item) => ( - {item.condition}} + subtitle={item.inventoryNumber} + badge={{item.condition}} + fields={[{ label: "Standort", value: item.location ?? "—" }]} /> ))}
diff --git a/ApiCore-Frontend/src/app/(app)/honey-batches/page.tsx b/ApiCore-Frontend/src/app/(app)/honey-batches/page.tsx index 8ea9a07..3fe1a1a 100644 --- a/ApiCore-Frontend/src/app/(app)/honey-batches/page.tsx +++ b/ApiCore-Frontend/src/app/(app)/honey-batches/page.tsx @@ -11,37 +11,30 @@ import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { PageHeader } from "@/components/page-header"; import { EmptyState } from "@/components/empty-state"; -import { ListItemCard } from "@/components/list-item-card"; -import { - Select, - SelectContent, - SelectItem, - SelectTrigger, - SelectValue, -} from "@/components/ui/select"; +import { EntityCard } from "@/components/entity-card"; +import { ActiveHistoryTabs, type EntityLifecycleTab } from "@/components/active-history-tabs"; import { CreateHoneyBatchDialog } from "./create-honey-batch-dialog"; -const STATUS_OPTIONS: HoneyBatchStatus[] = [ - "RAW", - "EXTRACTED", - "CLARIFIED", - "CREAMED", - "STORED", - "BOTTLED", - "SOLD", - "CONSUMED", -]; +const HISTORY_STATUSES: HoneyBatchStatus[] = ["SOLD", "CONSUMED"]; export default function HoneyBatchesPage() { - const [status, setStatus] = useState(""); + const [tab, setTab] = useState("active"); const { data: honeyBatches, isLoading, isError } = useQuery({ - queryKey: ["honey-batches", status], - queryFn: () => fetchHoneyBatches({ status: status || undefined }), + queryKey: ["honey-batches"], + queryFn: () => fetchHoneyBatches({}), }); const exportMutation = useMutation({ mutationFn: exportHoneyBatchesCsv }); + const activeBatches = (honeyBatches ?? []).filter( + (batch) => !HISTORY_STATUSES.includes(batch.status), + ); + const historyBatches = (honeyBatches ?? []).filter((batch) => + HISTORY_STATUSES.includes(batch.status), + ); + const visibleBatches = tab === "active" ? activeBatches : historyBatches; + return (
- + {isLoading ?

Lädt…

: null} {isError ? ( @@ -88,28 +69,34 @@ export default function HoneyBatchesPage() {

) : null} - {honeyBatches && honeyBatches.length === 0 ? ( + {honeyBatches && visibleBatches.length === 0 ? ( ) : null} - {honeyBatches && honeyBatches.length > 0 ? ( -
- {honeyBatches.map((honeyBatch) => ( - 0 ? ( +
+ {visibleBatches.map((honeyBatch) => ( + {honeyBatch.batchNumber}} - subtitle={`${honeyBatch.honeyType ?? "—"} · ${ - honeyBatch.amount !== null ? `${honeyBatch.amount} kg` : "—" - }`} - trailing={ - {honeyBatch.status} - } + subtitle={honeyBatch.honeyType ?? "—"} + badge={{honeyBatch.status}} + fields={[ + { + label: "Menge", + value: honeyBatch.amount !== null ? `${honeyBatch.amount} kg` : "—", + }, + ]} /> ))}
diff --git a/ApiCore-Frontend/src/app/(app)/products/page.tsx b/ApiCore-Frontend/src/app/(app)/products/page.tsx index 509d8a1..46d2829 100644 --- a/ApiCore-Frontend/src/app/(app)/products/page.tsx +++ b/ApiCore-Frontend/src/app/(app)/products/page.tsx @@ -1,5 +1,6 @@ "use client"; +import { useState } from "react"; import Link from "next/link"; import { ShoppingBag } from "lucide-react"; import { useQuery } from "@tanstack/react-query"; @@ -8,14 +9,21 @@ import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { PageHeader } from "@/components/page-header"; import { EmptyState } from "@/components/empty-state"; -import { ListItemCard } from "@/components/list-item-card"; +import { EntityCard } from "@/components/entity-card"; +import { ActiveHistoryTabs, type EntityLifecycleTab } from "@/components/active-history-tabs"; export default function ProductsPage() { + const [tab, setTab] = useState("active"); + const { data: products, isLoading, isError } = useQuery({ queryKey: ["products"], queryFn: () => fetchProducts(), }); + const activeProducts = (products ?? []).filter((product) => product.status === "ACTIVE"); + const historyProducts = (products ?? []).filter((product) => product.status !== "ACTIVE"); + const visibleProducts = tab === "active" ? activeProducts : historyProducts; + return (
+ + {isLoading ?

Lädt…

: null} {isError ? (

@@ -36,27 +51,34 @@ export default function ProductsPage() {

) : null} - {products && products.length === 0 ? ( + {products && visibleProducts.length === 0 ? ( ) : null} - {products && products.length > 0 ? ( -
- {products.map((product) => ( - 0 ? ( +
+ {visibleProducts.map((product) => ( + {product.status} } + fields={[ + { label: "SKU", value: product.sku ?? "—" }, + { label: "Einheit", value: product.salesUnit ?? "—" }, + ]} /> ))}
diff --git a/ApiCore-Frontend/src/app/(app)/queens/page.tsx b/ApiCore-Frontend/src/app/(app)/queens/page.tsx index 67a0ef0..51102b2 100644 --- a/ApiCore-Frontend/src/app/(app)/queens/page.tsx +++ b/ApiCore-Frontend/src/app/(app)/queens/page.tsx @@ -10,7 +10,8 @@ import { Button } from "@/components/ui/button"; import { Badge } from "@/components/ui/badge"; import { PageHeader } from "@/components/page-header"; import { EmptyState } from "@/components/empty-state"; -import { ListItemCard } from "@/components/list-item-card"; +import { EntityCard } from "@/components/entity-card"; +import { ActiveHistoryTabs, type EntityLifecycleTab } from "@/components/active-history-tabs"; import { Select, SelectContent, @@ -31,13 +32,19 @@ const STATUS_OPTIONS: QueenStatus[] = [ ]; export default function QueensPage() { + const [tab, setTab] = useState("active"); const [status, setStatus] = useState(""); const { data: queens, isLoading, isError } = useQuery({ - queryKey: ["queens", status], - queryFn: () => fetchQueens({ status: status || undefined }), + queryKey: ["queens"], + queryFn: () => fetchQueens({}), }); + const activeQueens = (queens ?? []).filter((queen) => queen.deactivatedAt === null); + const historyQueens = (queens ?? []).filter((queen) => queen.deactivatedAt !== null); + const bucketQueens = tab === "active" ? activeQueens : historyQueens; + const visibleQueens = status ? bucketQueens.filter((queen) => queen.status === status) : bucketQueens; + return (
- +
+ { + setTab(next); + setStatus(""); + }} + activeCount={activeQueens.length} + historyCount={historyQueens.length} + /> + +
{isLoading ?

Lädt…

: null} {isError ? ( @@ -76,29 +94,34 @@ export default function QueensPage() {

) : null} - {queens && queens.length === 0 ? ( + {queens && visibleQueens.length === 0 ? ( ) : null} - {queens && queens.length > 0 ? ( -
- {queens.map((queen) => ( - 0 ? ( +
+ {visibleQueens.map((queen) => ( + {queen.status} } + fields={[{ label: "Schlupfjahr", value: queen.hatchYear ?? "—" }]} /> ))}
diff --git a/ApiCore-Frontend/src/app/(app)/settings/task-templates/page.tsx b/ApiCore-Frontend/src/app/(app)/settings/task-templates/page.tsx index ce83e7b..ea45fe1 100644 --- a/ApiCore-Frontend/src/app/(app)/settings/task-templates/page.tsx +++ b/ApiCore-Frontend/src/app/(app)/settings/task-templates/page.tsx @@ -1,5 +1,6 @@ "use client"; +import { useState } from "react"; import { Repeat } from "lucide-react"; import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; import { toast } from "sonner"; @@ -8,7 +9,9 @@ import { TaskTemplate, TaskTemplateRecurrenceType } from "@/lib/task-templates/t import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { PageHeader } from "@/components/page-header"; -import { ListItemCard } from "@/components/list-item-card"; +import { EmptyState } from "@/components/empty-state"; +import { EntityCard } from "@/components/entity-card"; +import { ActiveHistoryTabs, type EntityLifecycleTab } from "@/components/active-history-tabs"; import { CreateTaskTemplateDialog } from "./create-task-template-dialog"; const RECURRENCE_LABELS: Record = { @@ -33,6 +36,7 @@ function formatDate(value: string): string { export default function TaskTemplatesPage() { const queryClient = useQueryClient(); + const [tab, setTab] = useState("active"); const { data: templates, isLoading, isError } = useQuery({ queryKey: ["task-templates"], queryFn: fetchTaskTemplates, @@ -47,6 +51,10 @@ export default function TaskTemplatesPage() { onError: () => toast.error("Vorlage konnte nicht deaktiviert werden"), }); + const activeTemplates = (templates ?? []).filter((template) => template.active); + const historyTemplates = (templates ?? []).filter((template) => !template.active); + const visibleTemplates = tab === "active" ? activeTemplates : historyTemplates; + return (
} /> + + {isLoading ?

Lädt…

: null} {isError ? (

@@ -64,34 +79,45 @@ export default function TaskTemplatesPage() {

) : null} - {templates && templates.length === 0 ? ( -

Noch keine Vorlagen angelegt.

+ {templates && visibleTemplates.length === 0 ? ( + ) : null} - {templates && templates.length > 0 ? ( -
- {templates.map((template) => ( - 0 ? ( +
+ {visibleTemplates.map((template) => ( + - - {template.active ? "Aktiv" : "Inaktiv"} - - - + badge={ + + {template.active ? "Aktiv" : "Inaktiv"} + + } + fields={[ + { label: "Wiederholung", value: describeRecurrence(template) }, + { label: "Nächste Fälligkeit", value: formatDate(template.nextDueDate) }, + ]} + actions={ + } /> ))} diff --git a/ApiCore-Frontend/src/app/(app)/storage/page.tsx b/ApiCore-Frontend/src/app/(app)/storage/page.tsx index 4045bb3..628d81e 100644 --- a/ApiCore-Frontend/src/app/(app)/storage/page.tsx +++ b/ApiCore-Frontend/src/app/(app)/storage/page.tsx @@ -1,18 +1,21 @@ "use client"; +import { useState } from "react"; import { Package, Warehouse } from "lucide-react"; import { useQuery } from "@tanstack/react-query"; import { fetchStockItems, fetchStorageContainers } from "@/lib/storage/api"; import { QrCodeDialog } from "@/components/qr-code-dialog"; import { PageHeader } from "@/components/page-header"; import { EmptyState } from "@/components/empty-state"; -import { ListItemCard } from "@/components/list-item-card"; +import { EntityCard } from "@/components/entity-card"; +import { ActiveHistoryTabs, type EntityLifecycleTab } from "@/components/active-history-tabs"; import { Badge } from "@/components/ui/badge"; import { CreateStorageContainerDialog } from "./create-storage-container-dialog"; import { CreateStockItemDialog } from "./create-stock-item-dialog"; import { RecordMovementDialog } from "./record-movement-dialog"; export default function StoragePage() { + const [containerTab, setContainerTab] = useState("active"); const { data: containers, isLoading: containersLoading } = useQuery({ queryKey: ["storage-containers"], queryFn: fetchStorageContainers, @@ -22,6 +25,14 @@ export default function StoragePage() { queryFn: fetchStockItems, }); + const activeContainers = (containers ?? []).filter( + (container) => container.status !== "OUT_OF_SERVICE", + ); + const historyContainers = (containers ?? []).filter( + (container) => container.status === "OUT_OF_SERVICE", + ); + const visibleContainers = containerTab === "active" ? activeContainers : historyContainers; + return (
@@ -32,32 +43,45 @@ export default function StoragePage() { gradient="var(--gradient-sky)" actions={} /> -

Lagerbehälter

+
+

Lagerbehälter

+ +
{containersLoading ?

Lädt…

: null} - {containers && containers.length === 0 ? ( + {containers && visibleContainers.length === 0 ? ( ) : null} - {containers && containers.length > 0 ? ( -
- {containers.map((container) => ( - 0 ? ( +
+ {visibleContainers.map((container) => ( + {container.code}} - subtitle={`${container.containerType ?? "—"} · ${container.location ?? "—"}`} - trailing={ - <> - - {container.status} - - - + subtitle={container.containerType ?? "—"} + badge={ + + {container.status} + + } + fields={[{ label: "Standort", value: container.location ?? "—" }]} + actions={ + } /> ))} @@ -80,25 +104,21 @@ export default function StoragePage() { ) : null} {stockItems && stockItems.length > 0 ? ( -
+
{stockItems.map((item) => ( - - - {item.quantity} {item.unit} - - {item.minThreshold !== null && item.quantity < item.minThreshold ? ( - Niedrig - ) : null} - - + badge={ + item.minThreshold !== null && item.quantity < item.minThreshold ? ( + Niedrig + ) : undefined } + fields={[{ label: "Bestand", value: `${item.quantity} ${item.unit}` }]} + actions={} /> ))}
diff --git a/ApiCore-Frontend/src/app/(app)/tasks/page.tsx b/ApiCore-Frontend/src/app/(app)/tasks/page.tsx index 07bb541..2fe2c4b 100644 --- a/ApiCore-Frontend/src/app/(app)/tasks/page.tsx +++ b/ApiCore-Frontend/src/app/(app)/tasks/page.tsx @@ -10,7 +10,8 @@ import { Button } from "@/components/ui/button"; import { Badge } from "@/components/ui/badge"; import { PageHeader } from "@/components/page-header"; import { EmptyState } from "@/components/empty-state"; -import { ListItemCard } from "@/components/list-item-card"; +import { EntityCard } from "@/components/entity-card"; +import { ActiveHistoryTabs, type EntityLifecycleTab } from "@/components/active-history-tabs"; import { Select, SelectContent, @@ -20,22 +21,18 @@ import { } from "@/components/ui/select"; import { TaskEditDialog } from "./task-edit-dialog"; -const STATUS_OPTIONS: TaskStatus[] = ["OPEN", "IN_PROGRESS", "DONE", "CANCELLED"]; const PRIORITY_OPTIONS: TaskPriority[] = ["LOW", "NORMAL", "HIGH", "URGENT"]; +const HISTORY_STATUSES: TaskStatus[] = ["DONE", "CANCELLED"]; export default function TasksPage() { const queryClient = useQueryClient(); - const [status, setStatus] = useState(""); + const [tab, setTab] = useState("active"); const [priority, setPriority] = useState(""); const [onlyOverdue, setOnlyOverdue] = useState(false); const { data: tasks, isLoading, isError } = useQuery({ - queryKey: ["tasks", status, priority], - queryFn: () => - fetchTasks({ - status: status || undefined, - priority: priority || undefined, - }), + queryKey: ["tasks"], + queryFn: () => fetchTasks({ priority: priority || undefined }), }); const completeMutation = useMutation({ @@ -46,7 +43,10 @@ export default function TasksPage() { }); const [now] = useState(() => Date.now()); - const visibleTasks = (tasks ?? []).filter((task) => { + const activeTasks = (tasks ?? []).filter((task) => !HISTORY_STATUSES.includes(task.status)); + const historyTasks = (tasks ?? []).filter((task) => HISTORY_STATUSES.includes(task.status)); + const bucketTasks = tab === "active" ? activeTasks : historyTasks; + const visibleTasks = bucketTasks.filter((task) => { if (!onlyOverdue) return true; return task.dueDate !== null && new Date(task.dueDate).getTime() < now; }); @@ -66,22 +66,12 @@ export default function TasksPage() { />
- + - + {tab === "active" ? ( + + ) : null}
{isLoading ?

Lädt…

: null} @@ -120,31 +112,39 @@ export default function TasksPage() { {tasks && visibleTasks.length === 0 ? ( ) : null} - {tasks && visibleTasks.length > 0 ? ( -
+ {visibleTasks.length > 0 ? ( +
{visibleTasks.map((task) => ( - + {task.status} + + } + fields={[ + { label: "Priorität", value: task.priority }, + { + label: "Fällig", + value: task.dueDate ? new Date(task.dueDate).toLocaleDateString("de-DE") : "—", + }, + ]} + actions={ <> - - {task.status} - {task.status !== "DONE" && task.status !== "CANCELLED" ? ( + +
+ ); +} diff --git a/ApiCore-Frontend/src/components/entity-card.tsx b/ApiCore-Frontend/src/components/entity-card.tsx new file mode 100644 index 0000000..6150829 --- /dev/null +++ b/ApiCore-Frontend/src/components/entity-card.tsx @@ -0,0 +1,83 @@ +import { ReactNode } from "react"; +import Link from "next/link"; +import { type LucideIcon } from "lucide-react"; +import { Card, CardContent } from "@/components/ui/card"; + +interface EntityCardField { + label: string; + value: ReactNode; +} + +interface EntityCardProps { + href?: string; + icon: LucideIcon; + gradient?: string; + title: ReactNode; + subtitle?: ReactNode; + badge?: ReactNode; + fields?: EntityCardField[]; + actions?: ReactNode; + className?: string; +} + +export function EntityCard({ + href, + icon: Icon, + gradient = "var(--gradient-honey)", + title, + subtitle, + badge, + fields, + actions, + className, +}: EntityCardProps) { + const body = ( + + +
+
+
+ +
+
+

{title}

+ {subtitle ? ( +

{subtitle}

+ ) : null} +
+
+ {badge ?
{badge}
: null} +
+ + {fields && fields.length > 0 ? ( +
+ {fields.map((field) => ( +
+

{field.label}

+

{field.value}

+
+ ))} +
+ ) : null} + + {actions ? ( +
+ {actions} +
+ ) : null} +
+
+ ); + + if (href) { + return ( + + {body} + + ); + } + return body; +} diff --git a/ApiCore-Frontend/src/components/list-item-card.tsx b/ApiCore-Frontend/src/components/list-item-card.tsx deleted file mode 100644 index 8cdaaa2..0000000 --- a/ApiCore-Frontend/src/components/list-item-card.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import { ReactNode } from "react"; -import Link from "next/link"; -import { ChevronRight, type LucideIcon } from "lucide-react"; -import { Card, CardContent } from "@/components/ui/card"; - -interface ListItemCardProps { - href?: string; - icon: LucideIcon; - gradient?: string; - title: ReactNode; - subtitle?: ReactNode; - trailing?: ReactNode; - className?: string; -} - -export function ListItemCard({ - href, - icon: Icon, - gradient = "var(--gradient-honey)", - title, - subtitle, - trailing, - className, -}: ListItemCardProps) { - const body = ( - - -
- -
-
-

{title}

- {subtitle ? ( -

{subtitle}

- ) : null} -
- {trailing ?
{trailing}
: null} - {href ? ( - - ) : null} -
-
- ); - - if (href) { - return ( - - {body} - - ); - } - return body; -}