Changes
Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
co-authored by
renee-png
parent
674e6329b3
commit
354ef188bc
@@ -366,6 +366,22 @@ function InvoicesIndex() {
|
||||
</table>
|
||||
</CardContent>
|
||||
</Card>
|
||||
{totalCount > PAGE_SIZE && (
|
||||
<div className="flex items-center justify-between mt-3 text-sm">
|
||||
<span className="text-muted-foreground">
|
||||
Showing {totalCount === 0 ? 0 : page * PAGE_SIZE + 1}–{Math.min((page + 1) * PAGE_SIZE, totalCount)} of {totalCount}
|
||||
</span>
|
||||
<div className="flex items-center gap-2">
|
||||
<Button variant="outline" size="sm" disabled={page === 0 || loading} onClick={() => setPage((p) => Math.max(0, p - 1))}>
|
||||
Previous
|
||||
</Button>
|
||||
<span className="text-muted-foreground">Page {page + 1} of {totalPages}</span>
|
||||
<Button variant="outline" size="sm" disabled={page + 1 >= totalPages || loading} onClick={() => setPage((p) => p + 1)}>
|
||||
Next
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</TabsContent>
|
||||
|
||||
<TabsContent value="time" className="mt-4">
|
||||
|
||||
Reference in New Issue
Block a user