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 = {
headName: React.ReactNode|undefined;
publicReuseFacility: { [key: string]: string | number | boolean }[];
tableData: { [key: string]: string | number | boolean }[];
headlist: UiHeadProps[];
pageSize: number;
total: number;
@@ -16,7 +16,7 @@ type UiHeadProps={
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;
return (
@@ -25,14 +25,14 @@ export function UiTable({ publicReuseFacility, headlist,pageSize , total, childr
<Table>
<TableHeader>
{children? <>{children}</>:<TableRow>
{headlist.map((head) => (
{headlist?.map((head) => (
<TableHead key={head.id}>{head.title}</TableHead>
))}
</TableRow>}
</TableHeader>
<TableBody>
{publicReuseFacility.map((el: { [key: string]: string | number | boolean },index) => (
<TableBody className='text-center'>
{tableData?.map((el: { [key: string]: string | number | boolean },index) => (
<TableRow key={index+"row"} >
{headlist.map((head) => (
<TableCell key={head.id+index}>{el[head.id]}</TableCell>
@@ -43,7 +43,7 @@ export function UiTable({ publicReuseFacility, headlist,pageSize , total, childr
</TableBody>
</Table>
<UiPageNations total={total} cur={cur} pageSize={pageSize} />
{total <=0? <></>: <UiPageNations total={total} cur={cur} pageSize={pageSize} />}
</>
);
}