|
|
@ -242,6 +242,7 @@ const BasicTable = ({ |
|
|
|
{/* table LIST */} |
|
|
|
{/* table LIST */} |
|
|
|
{activeTab == 0 ? ( |
|
|
|
{activeTab == 0 ? ( |
|
|
|
<> |
|
|
|
<> |
|
|
|
|
|
|
|
{activeList === false && ( |
|
|
|
<table |
|
|
|
<table |
|
|
|
{...getTableProps()} |
|
|
|
{...getTableProps()} |
|
|
|
className="min-w-full divide-y divide-gray-200 mb-5" |
|
|
|
className="min-w-full divide-y divide-gray-200 mb-5" |
|
|
@ -354,23 +355,8 @@ const BasicTable = ({ |
|
|
|
})} |
|
|
|
})} |
|
|
|
</tbody> |
|
|
|
</tbody> |
|
|
|
</table> |
|
|
|
</table> |
|
|
|
{/* bottom table */} |
|
|
|
|
|
|
|
<GoToPage |
|
|
|
|
|
|
|
pageIndex={pageIndex} |
|
|
|
|
|
|
|
gotoPage={gotoPage} |
|
|
|
|
|
|
|
pageOptions={pageOptions} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
<ShowMoreRows pageSize={pageSize} setPageSize={setPageSize} /> |
|
|
|
|
|
|
|
</> |
|
|
|
|
|
|
|
) : ( |
|
|
|
|
|
|
|
<EditRow |
|
|
|
|
|
|
|
row={ |
|
|
|
|
|
|
|
rows.find((e) => e.original && +e.original.id === activeTab) |
|
|
|
|
|
|
|
?.original || {} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
columns={defaultColumn} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
)} |
|
|
|
)} |
|
|
|
|
|
|
|
|
|
|
|
{/* GRID LIST */} |
|
|
|
{/* GRID LIST */} |
|
|
|
{activeList === true && ( |
|
|
|
{activeList === true && ( |
|
|
|
<div className="flex flex-row gap-4"> |
|
|
|
<div className="flex flex-row gap-4"> |
|
|
@ -389,6 +375,23 @@ const BasicTable = ({ |
|
|
|
))} |
|
|
|
))} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
)} |
|
|
|
)} |
|
|
|
|
|
|
|
{/* bottom table */} |
|
|
|
|
|
|
|
<GoToPage |
|
|
|
|
|
|
|
pageIndex={pageIndex} |
|
|
|
|
|
|
|
gotoPage={gotoPage} |
|
|
|
|
|
|
|
pageOptions={pageOptions} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
<ShowMoreRows pageSize={pageSize} setPageSize={setPageSize} /> |
|
|
|
|
|
|
|
</> |
|
|
|
|
|
|
|
) : ( |
|
|
|
|
|
|
|
<EditRow |
|
|
|
|
|
|
|
row={ |
|
|
|
|
|
|
|
rows.find((e) => e.original && +e.original.id === activeTab) |
|
|
|
|
|
|
|
?.original || {} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
columns={defaultColumn} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
)} |
|
|
|
</> |
|
|
|
</> |
|
|
|
); |
|
|
|
); |
|
|
|
}; |
|
|
|
}; |
|
|
|