mirror of
https://github.com/Sea-Haven-Industries/seahaven-ap.git
synced 2026-10-04 05:23:13 +00:00
fix(web): count filtered rows on invoice tabs
This commit is contained in:
parent
668c0076ba
commit
1ab723f68d
2 changed files with 6 additions and 5 deletions
|
|
@ -16,6 +16,7 @@ test.describe("Invoice Processing filters (AP-43)", () => {
|
|||
await page.getByTestId("vendor-filter").fill("Harbor");
|
||||
await expect(page.getByTestId("filter-toggle").locator(".MuiBadge-badge")).toHaveText("2");
|
||||
await expect(grid.locator(".MuiDataGrid-row")).toHaveCount(1);
|
||||
await expect(page.getByTestId("tab-pending").locator("span").last()).toHaveText("1");
|
||||
await expect(page.getByTestId("attention-banner")).toContainText(
|
||||
"1 invoices require approval. Show invoices ready to approve.",
|
||||
);
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ export function DashboardGrids() {
|
|||
label={
|
||||
<InvoiceTabLabel
|
||||
title="For My Attention"
|
||||
count={attentionRows.length}
|
||||
count={filteredAttention.length}
|
||||
active={tab === "attention"}
|
||||
/>
|
||||
}
|
||||
|
|
@ -173,7 +173,7 @@ export function DashboardGrids() {
|
|||
label={
|
||||
<InvoiceTabLabel
|
||||
title="New Invoices"
|
||||
count={invoices.length}
|
||||
count={filteredAll.length}
|
||||
active={tab === "all"}
|
||||
/>
|
||||
}
|
||||
|
|
@ -184,7 +184,7 @@ export function DashboardGrids() {
|
|||
label={
|
||||
<InvoiceTabLabel
|
||||
title="Approved Invoices"
|
||||
count={approvedRows.length}
|
||||
count={filteredApproved.length}
|
||||
active={tab === "approved"}
|
||||
/>
|
||||
}
|
||||
|
|
@ -195,7 +195,7 @@ export function DashboardGrids() {
|
|||
label={
|
||||
<InvoiceTabLabel
|
||||
title="Rejected Invoices"
|
||||
count={rejectedRows.length}
|
||||
count={filteredRejected.length}
|
||||
active={tab === "rejected"}
|
||||
/>
|
||||
}
|
||||
|
|
@ -206,7 +206,7 @@ export function DashboardGrids() {
|
|||
label={
|
||||
<InvoiceTabLabel
|
||||
title="Late Invoices"
|
||||
count={lateRows.length}
|
||||
count={filteredLate.length}
|
||||
active={tab === "late"}
|
||||
urgency
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue