pagenation

This commit is contained in:
2026-09-07 11:00:44 +05:30
parent d3785cc303
commit 8defbd418f
22 changed files with 1094 additions and 226 deletions

View File

@@ -27,6 +27,8 @@ import { useCounterLabels, type CounterLabels } from '../counterLabels';
import { clockTime, spokenAge, UNASSIGNED } from '../posStatus';
import { BUCKET_LABEL, rupees, type Bucket } from '../terminalProblems';
import { useTerminalBoard, type BoardCard, type HealthyCounter } from '../useTerminalBoard';
import { TablePager } from '@/components/TablePager';
import { usePaged } from '@/components/usePaged';
/**
* Counters — the till board, written for the person who actually opens it.
@@ -573,6 +575,8 @@ function FineTable({
terminalId: counter.terminalId,
}));
const paged = usePaged(rows);
const columns: TableColumn<FineRowData>[] = [
{
key: 'name',
@@ -675,7 +679,7 @@ function FineTable({
<Card padding={0} variant="transparent">
<div style={{ ...panelStyle, overflow: 'hidden' }}>
<Table<FineRowData>
data={rows}
data={paged.rows}
columns={columns}
idKey="key"
density="balanced"
@@ -683,6 +687,7 @@ function FineTable({
dividers="rows"
/>
</div>
<TablePager paged={paged} label="terminals" />
</Card>
</VStack>
);