[Issue]: Add Vendor-ID to /inventory/vendors search #57
Labels
No labels
bug
claude-failed
claude-pr
claude-queue
claude-working
feature
interactive
portal
triaged
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: shad0w/pelagia-portal#57
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Raised by
Kaushal Pal Singh (kps@pelagiamarine.com, MANAGER) — via portal Report Issue button
Description
Allow vendors on purchasing /inventory/vendors screen to be searchable by vendor id. Also make the ID show up next to the name (same column)
Priority
P2 — Medium
Context
/inventory/vendorsClaude triage
Triage — Issue #57: Add Vendor-ID to /inventory/vendors search
Type: Feature (enhancement to existing search + display behaviour)
Routing: claude-queue
Priority: P2 — Medium
Request interpretation
Kaushal (Manager) wants two things on the purchasing Vendors screen (
/inventory/vendors):vendorId(the formal verified vendor code), in addition to the existing name / GSTIN / address matching.vendorIdin the same column as the vendor name.Key finding — the data is already there
vendorIdis already queried and threaded into the table rows:App/app/(portal)/inventory/vendors/page.tsx:55—vendorId: v.vendorId ?? nullis already on each row.App/app/(portal)/inventory/vendors/vendors-table.tsx:11—VendorRow.vendorId: string | nullis already in the row type.So no server/DB/query changes are needed —
vendorIdis unused in the client component today. This is a pure client-side presentation/filter change in one file.Concrete action items
vendorIdto the search filter —vendors-table.tsx:41-46, in thefiltereduseMemo. Add a clause like(v.vendorId && v.vendorId.toLowerCase().includes(q))alongside the existing name/gstin/address checks.vendors-table.tsx:149-160, inside the "Vendor" cell. Rendervendor.vendorIdadjacent to the<Link>name (e.g. a muted/mono badge or trailing text). Handle thenullcase gracefully (omit, don't render an em-dash, since many vendors are unverified and have novendorId).vendors-table.tsx:92,placeholder="Search by name, GSTIN or address…"→ include "ID" so users discover the new capability.Files / areas involved
App/app/(portal)/inventory/vendors/vendors-table.tsx— the only file expected to change (client component: filter, Vendor cell, placeholder text).App/app/(portal)/inventory/vendors/page.tsx— read-only confirmation thatvendorIdis already supplied; no change anticipated.Open questions (non-blocking; sensible defaults assumed)
Vendor.vendorId(the verified vendor code, per CLAUDE.md "Vendors" section), not the internal cuidid. This is the natural reading and the field already on the row.vendorIdis null: unverified vendors have novendorId. Default: simply omit it for those rows rather than showing a placeholder.Verifiability
pnpm type-checkandpnpm lintcover correctness of the single-file change.Routing rationale: Localized single-file client-side change (filter + display) with the required
vendorIddata already passed to the component, clear acceptance criteria, and no DB/auth/payments/external-system involvement — safely automatable and verifiable by type-check/lint.Routing:
claude-queue| Type:feature[Claude] Started working on this issue on branch
claude/issue-57.[Claude] Opened PR #58 with a proposed fix. Review and merge it, then create a release tag to deploy.