Get Account
This commit is contained in:
parent
2d69a024c1
commit
ce344e4a98
@ -333,63 +333,67 @@ const AccountListTable = () => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className='overflow-x-auto'>
|
<div className='overflow-x-auto'>
|
||||||
<table className={tableStyles.table}>
|
{isLoading ? (
|
||||||
<thead>
|
<Loading />
|
||||||
{table.getHeaderGroups().map(headerGroup => (
|
) : (
|
||||||
<tr key={headerGroup.id}>
|
<table className={tableStyles.table}>
|
||||||
{headerGroup.headers.map(header => (
|
<thead>
|
||||||
<th key={header.id}>
|
{table.getHeaderGroups().map(headerGroup => (
|
||||||
{header.isPlaceholder ? null : (
|
<tr key={headerGroup.id}>
|
||||||
<>
|
{headerGroup.headers.map(header => (
|
||||||
<div
|
<th key={header.id}>
|
||||||
className={classnames({
|
{header.isPlaceholder ? null : (
|
||||||
'flex items-center': header.column.getIsSorted(),
|
<>
|
||||||
'cursor-pointer select-none': header.column.getCanSort()
|
<div
|
||||||
})}
|
className={classnames({
|
||||||
onClick={header.column.getToggleSortingHandler()}
|
'flex items-center': header.column.getIsSorted(),
|
||||||
>
|
'cursor-pointer select-none': header.column.getCanSort()
|
||||||
{flexRender(header.column.columnDef.header, header.getContext())}
|
})}
|
||||||
{{
|
onClick={header.column.getToggleSortingHandler()}
|
||||||
asc: <i className='tabler-chevron-up text-xl' />,
|
>
|
||||||
desc: <i className='tabler-chevron-down text-xl' />
|
{flexRender(header.column.columnDef.header, header.getContext())}
|
||||||
}[header.column.getIsSorted() as 'asc' | 'desc'] ?? null}
|
{{
|
||||||
</div>
|
asc: <i className='tabler-chevron-up text-xl' />,
|
||||||
</>
|
desc: <i className='tabler-chevron-down text-xl' />
|
||||||
)}
|
}[header.column.getIsSorted() as 'asc' | 'desc'] ?? null}
|
||||||
</th>
|
</div>
|
||||||
))}
|
</>
|
||||||
</tr>
|
)}
|
||||||
))}
|
</th>
|
||||||
</thead>
|
))}
|
||||||
{accounts.length === 0 ? (
|
</tr>
|
||||||
<tbody>
|
))}
|
||||||
<tr>
|
</thead>
|
||||||
<td colSpan={table.getVisibleFlatColumns().length} className='text-center'>
|
{accounts.length === 0 ? (
|
||||||
Tidak ada data tersedia
|
<tbody>
|
||||||
</td>
|
<tr>
|
||||||
</tr>
|
<td colSpan={table.getVisibleFlatColumns().length} className='text-center'>
|
||||||
</tbody>
|
Tidak ada data tersedia
|
||||||
) : (
|
</td>
|
||||||
<tbody>
|
</tr>
|
||||||
{table.getRowModel().rows.map(row => {
|
</tbody>
|
||||||
return (
|
) : (
|
||||||
<tr
|
<tbody>
|
||||||
key={row.id}
|
{table.getRowModel().rows.map(row => {
|
||||||
className={classnames({
|
return (
|
||||||
selected: row.getIsSelected(),
|
<tr
|
||||||
'cursor-pointer hover:bg-gray-50': true
|
key={row.id}
|
||||||
})}
|
className={classnames({
|
||||||
onClick={e => handleRowClick(row.original, e)}
|
selected: row.getIsSelected(),
|
||||||
>
|
'cursor-pointer hover:bg-gray-50': true
|
||||||
{row.getVisibleCells().map(cell => (
|
})}
|
||||||
<td key={cell.id}>{flexRender(cell.column.columnDef.cell, cell.getContext())}</td>
|
onClick={e => handleRowClick(row.original, e)}
|
||||||
))}
|
>
|
||||||
</tr>
|
{row.getVisibleCells().map(cell => (
|
||||||
)
|
<td key={cell.id}>{flexRender(cell.column.columnDef.cell, cell.getContext())}</td>
|
||||||
})}
|
))}
|
||||||
</tbody>
|
</tr>
|
||||||
)}
|
)
|
||||||
</table>
|
})}
|
||||||
|
</tbody>
|
||||||
|
)}
|
||||||
|
</table>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<TablePagination
|
<TablePagination
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user