46 lines
1.4 KiB
TypeScript
46 lines
1.4 KiB
TypeScript
import React from "react";
|
||
import {
|
||
Table,
|
||
TableBody,
|
||
TableCaption,
|
||
TableCell,
|
||
TableHead,
|
||
TableHeader,
|
||
TableRow,
|
||
} from "@/components/ui/table";
|
||
import { ControllerTableItems } from "@/constants";
|
||
import Link from "next/link";
|
||
|
||
export default function TableController() {
|
||
return (
|
||
<Table className="border-[1px] border-solid border-muted rounded-md ">
|
||
{/* <TableCaption>A list of your recent invoices.</TableCaption> */}
|
||
<TableHeader>
|
||
<TableRow>
|
||
<TableHead>ردیف</TableHead>
|
||
<TableHead>تاریخ</TableHead>
|
||
<TableHead>موضوع</TableHead>
|
||
<TableHead>دستگاه مربوطه</TableHead>
|
||
</TableRow>
|
||
</TableHeader>
|
||
<TableBody className="bg-[#F5F5F5]">
|
||
{ControllerTableItems.map((item) => {
|
||
return (
|
||
<TableRow key={item.id}>
|
||
<Link
|
||
href={`/UserPanel/ControllerDashboard/Complaints/${item.id}`}
|
||
className="contents "
|
||
>
|
||
<TableCell className="w-1/12 font-medium ">{item.id}</TableCell>
|
||
<TableCell className="w-2/12">{item.date}</TableCell>
|
||
<TableCell className="w-2/12">{item.title}</TableCell>
|
||
<TableCell className="w-7/12">{item.content}</TableCell>
|
||
</Link>
|
||
</TableRow>
|
||
);
|
||
})}
|
||
</TableBody>
|
||
</Table>
|
||
);
|
||
}
|