Compare commits
2 Commits
95649452be
...
6a86af4d88
| Author | SHA1 | Date |
|---|---|---|
|
|
6a86af4d88 | |
|
|
ecb5290e49 |
|
|
@ -46,6 +46,7 @@ export default function Pagination({
|
||||||
activeLinkClassName=" text-white w-full p-1 h-full"
|
activeLinkClassName=" text-white w-full p-1 h-full"
|
||||||
previousLinkClassName=" w-10 h-10 grid place-content-center rounded-lg text-sm shadow-md"
|
previousLinkClassName=" w-10 h-10 grid place-content-center rounded-lg text-sm shadow-md"
|
||||||
nextLinkClassName=" w-10 h-10 grid place-content-center rounded-lg text-sm shadow-md"
|
nextLinkClassName=" w-10 h-10 grid place-content-center rounded-lg text-sm shadow-md"
|
||||||
|
pageLinkClassName="p-4"
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ export default function Search({
|
||||||
ref={inputRef}
|
ref={inputRef}
|
||||||
id="default-search"
|
id="default-search"
|
||||||
className={`mb-0 h-8 bg-[#E9E9E9] border-none focus-visible:none rounded-lg
|
className={`mb-0 h-8 bg-[#E9E9E9] border-none focus-visible:none rounded-lg
|
||||||
block w-full min-w-[13rem] text-xs md:text-sm text-black
|
block w-full text-xs md:text-sm text-black
|
||||||
text-opacity-60 dark:text-white
|
text-opacity-60 dark:text-white
|
||||||
${mode === "controller" && "h-14 "}
|
${mode === "controller" && "h-14 "}
|
||||||
${
|
${
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ interface Complaint {
|
||||||
export default function TableController({
|
export default function TableController({
|
||||||
data,
|
data,
|
||||||
pageSize,
|
pageSize,
|
||||||
currentPage
|
currentPage,
|
||||||
}: {
|
}: {
|
||||||
data: Complaint[];
|
data: Complaint[];
|
||||||
pageSize: number;
|
pageSize: number;
|
||||||
|
|
@ -63,8 +63,9 @@ export default function TableController({
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className=" overflow-hidden">
|
||||||
<Table className="border-[1px] border-solid border-muted rounded-md w-full min-w-[40rem] overflow-y-auto scrollbar-thumb-gray-600 scrollbar-track-gray-100 scrollbar-thin mb-20">
|
<div className="max-h-[50vh] lg:max-h-[65vh] overflow-auto scrollbar-thin scrollbar-thumb-gray-500 scrollbar-track-gray-100">
|
||||||
|
<Table className="border-[1px] border-solid border-muted rounded-md w-full min-w-[40rem] mb-8 md:mb-4 2xl:mb-0 ">
|
||||||
{/* <TableCaption>A list of your recent invoices.</TableCaption> */}
|
{/* <TableCaption>A list of your recent invoices.</TableCaption> */}
|
||||||
<TableHeader>
|
<TableHeader>
|
||||||
<TableRow>
|
<TableRow>
|
||||||
|
|
@ -86,13 +87,15 @@ export default function TableController({
|
||||||
`/UserPanel/ControllerDashboard/Complaints/${item.id}`
|
`/UserPanel/ControllerDashboard/Complaints/${item.id}`
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
className="cursor-pointer hover:bg-gray-200"
|
className="cursor-pointer hover:bg-gray-200 "
|
||||||
key={item.id}
|
key={item.id}
|
||||||
>
|
>
|
||||||
<TableCell className="w-1/12 font-medium ">
|
<TableCell className="w-1/12 font-medium ">
|
||||||
{pageSize * (currentPage - 1) + (index + 1)}
|
{pageSize * (currentPage - 1) + (index + 1)}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell className="w-1/12">{item.trackingNumber}</TableCell>
|
<TableCell className="w-1/12">
|
||||||
|
{item.trackingNumber}
|
||||||
|
</TableCell>
|
||||||
<TableCell className="w-2/12">
|
<TableCell className="w-2/12">
|
||||||
{convertDate(item.registeredAt)}
|
{convertDate(item.registeredAt)}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
|
|
@ -110,17 +113,9 @@ export default function TableController({
|
||||||
</TableRow>
|
</TableRow>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
{/* {data.length != 0 &&
|
|
||||||
[...Array(5 - data.length)].map(() => {
|
|
||||||
return (
|
|
||||||
<TableRow
|
|
||||||
key={Math.random()}
|
|
||||||
className="border border-t-0 border-b-0"
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
})} */}
|
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</Table>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue