feat(management): paginate aging inventory table and clean mobile stock card layout #189
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/188-paginate-aging-table"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #188.
What changed
AgingInventoryTableusingDataTablewith client pagination initialized to 5 items per page (pageSize: 5) and page size options (5, 10, 25, 50).AgingInventoryTablepassing all aged inventory items.InventoryMobileCard.Verified
pnpm --filter garage testpassed (all tests green).pnpm exec tsc --noEmitpassed with 0 errors..forgejo/scripts/biome-gate.shpassed with 0 findings.Deviations
none
VERDICT: request-changes
apps/management/app/(dashboard)/aging-inventory-table.tsx:L200-L202: should: The new table initializes at 5 rows, but DataTable derives the page-size dropdown from [pageSize, 10, 25, 50]. After changing to 10, 25, or 50, the 5 option disappears; users cannot return to five per page without reloading. Include 5 permanently in the shared DataTable options (for example, [5, pageSize, 10, 25, 50]).
Verified from the PR diff: all aged rows are passed in cost-descending order, DataTable paginates and renders both desktop and mobile rows, and the inventory mobile-card separator is removed. The 5/10/25/50 acceptance criterion remains unmet after changing page size. At review time CI checks for store tests, both typechecks, and biome lint are pending; please confirm all checks are green before merging.
Round 1 addressed
DataTableincomponents/ui/data-table.tsxso5is permanently retained in the default page size options ([5, pageSize, 10, 25, 50]), preventing the 5-item option from disappearing when switching to 10, 25, or 50.pageSizeOptions?: number[]prop toDataTablePropsand explicitly passedpageSizeOptions={[5, 10, 25, 50]}inAgingInventoryTable.pnpm --filter garage test), typecheck (pnpm exec tsc --noEmit), and biome lint gate (.forgejo/scripts/biome-gate.sh), all passing cleanly with 0 errors/findings.VERDICT: approve
Reviewed the complete PR diff at
37209bf: the dashboard now passes every aged inventory item in descending aged-cost order to a TanStack-powered DataTable, with five rows initially, persistent 5/10/25/50 page-size choices, mobile cards and a desktop table. The stock mobile-card separator is removed. The prior round-1 page-size concern is resolved. All six Forgejo checks passed for this exact head: tests for garage, garage-store, and @garage/catalog; management and store typechecks; and the Biome lint gate.