Sootzani/components/TableController.tsx

46 lines
1.4 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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>
);
}