Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
gpt-engineer-app[bot]
2026-04-19 20:05:21 +00:00
co-authored by renee-png
parent 5544a43da1
commit c025689b26
+13 -1
View File
@@ -500,7 +500,7 @@ function InvoicesIndex() {
No matching time entries.
</td></tr>
)}
{visibleTime.map((t) => {
{pagedTime.map((t) => {
const amount = Number(t.hours) * Number(t.hourly_rate);
const marked = isPlaceholder(t.invoice_id);
return (
@@ -545,6 +545,18 @@ function InvoicesIndex() {
</table>
</CardContent>
</Card>
{visibleTime.length > TAB_PAGE_SIZE && (
<div className="flex items-center justify-between mt-3 text-sm">
<span className="text-muted-foreground">
Showing {timePage * TAB_PAGE_SIZE + 1}–{Math.min((timePage + 1) * TAB_PAGE_SIZE, visibleTime.length)} of {visibleTime.length}
</span>
<div className="flex items-center gap-2">
<Button variant="outline" size="sm" disabled={timePage === 0} onClick={() => setTimePage((p) => Math.max(0, p - 1))}>Previous</Button>
<span className="text-muted-foreground">Page {timePage + 1} of {timeTotalPages}</span>
<Button variant="outline" size="sm" disabled={timePage + 1 >= timeTotalPages} onClick={() => setTimePage((p) => p + 1)}>Next</Button>
</div>
</div>
)}
</TabsContent>
<TabsContent value="expenses" className="mt-4">