iipbs_cs #9

Merged
chanii8 merged 141 commits from iipbs_cs into main 2025-03-17 18:51:48 +09:00
Showing only changes of commit fa0d220aab - Show all commits
@@ -4,7 +4,7 @@ import UiPageNations from "./uiPageNations";
type UiTableProps = { type UiTableProps = {
headName: React.ReactNode|undefined; headName: React.ReactNode|undefined;
publicReuseFacility: { [key: string]: string | number | boolean }[]; tableData: { [key: string]: string | number | boolean }[];
headlist: UiHeadProps[]; headlist: UiHeadProps[];
pageSize: number; pageSize: number;
total: number; total: number;
@@ -16,7 +16,7 @@ type UiHeadProps={
title:string; title:string;
} }
export function UiTable({ publicReuseFacility, headlist,pageSize , total, children,headName}: UiTableProps) { export function UiTable({ tableData, headlist,pageSize , total, children,headName}: UiTableProps) {
const cur = 1; const cur = 1;
return ( return (
@@ -25,14 +25,14 @@ export function UiTable({ publicReuseFacility, headlist,pageSize , total, childr
<Table> <Table>
<TableHeader> <TableHeader>
{children? <>{children}</>:<TableRow> {children? <>{children}</>:<TableRow>
{headlist.map((head) => ( {headlist?.map((head) => (
<TableHead key={head.id}>{head.title}</TableHead> <TableHead key={head.id}>{head.title}</TableHead>
))} ))}
</TableRow>} </TableRow>}
</TableHeader> </TableHeader>
<TableBody> <TableBody className='text-center'>
{publicReuseFacility.map((el: { [key: string]: string | number | boolean },index) => ( {tableData?.map((el: { [key: string]: string | number | boolean },index) => (
<TableRow key={index+"row"} > <TableRow key={index+"row"} >
{headlist.map((head) => ( {headlist.map((head) => (
<TableCell key={head.id+index}>{el[head.id]}</TableCell> <TableCell key={head.id+index}>{el[head.id]}</TableCell>
@@ -43,7 +43,7 @@ export function UiTable({ publicReuseFacility, headlist,pageSize , total, childr
</TableBody> </TableBody>
</Table> </Table>
<UiPageNations total={total} cur={cur} pageSize={pageSize} /> {total <=0? <></>: <UiPageNations total={total} cur={cur} pageSize={pageSize} />}
</> </>
); );
} }