[Issue]: Remove the Approved From and Approved to search field #136
Labels
No labels
bug
claude-failed
claude-pr
claude-queue
claude-working
epic
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#136
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
It's unnecessary.
Priority
P2 — Medium
Context
/historyClaude triage
Triage — Issue #136: Remove the "Approved From" and "Approved To" search fields
Page:
/history(PO History) · Priority: P2 · Raised by: Kaushal Pal Singh (MANAGER)Interpretation
The PO History filter bar currently exposes two date inputs — "Approved From" and
"Approved To" — that filter POs by their approval date (
approvedAt), in addition to theexisting From/To (created-date) range. The manager considers these two fields unnecessary
and wants them removed from the filter UI.
This is a UI simplification: drop the two date pickers from the History filter form. The
intent is the visible search fields, not necessarily the underlying URL-param machinery,
which is also used by deep-links from elsewhere (see open questions).
Action items
app/(portal)/history/history-filters.tsx(primary, client component) — remove:<div>blocks rendering the "Approved From" and "Approved To"<input type="date">fields (lines ~115–124).approvedFrom/approvedTouseStatehooks (lines 39–40) and setter usages.buildParams()(lines 68–69),clear()(line 86), and thehasFilterscheck (line 93).
sm:grid-cols-4; removingtwo cells leaves From, To, Cost Centre, Accounting Code, Status (5 fields). No structural
change needed, but confirm no dangling/empty cell.
app/(portal)/history/page.tsx,lib/history-filter.ts, andapp/api/reports/export/route.tsso existing deep-links keep filtering.Files / areas involved
app/(portal)/history/history-filters.tsx— the only file that must change (the filter UI).approvedFrom/approvedToparams that should KEEP working (do not break):app/(portal)/dashboard/page.tsx:184— "Approved This Month" card links to/history?approvedFrom=....app/(portal)/reports/accounting-codes/[id]/page.tsx:96andreports/cost-centres/[id]/page.tsx:87— "View POs" drill-downs appendapprovedFrom/approvedTo.app/(portal)/history/page.tsx,lib/history-filter.ts(buildPoHistoryWhere),app/api/reports/export/route.ts— read the params server-side, independent of the filtercomponent. The deep-link filtering survives even after the input fields are gone.
tests/staging/issue-32-approved-month-clickthrough.spec.ts— asserts only the dashboardcard lands on
/history?approvedFrom=...(URL + filtered results); it does not interactwith the removed input, so it is unaffected.
Open questions
leave
page.tsx/history-filter.ts/ export route readingapprovedFrom/approvedTo, sothe dashboard card and report drill-downs continue to pre-filter History by approval date.
Fully ripping out the params would break those flows (and the #32 staging test) — out of
scope for "remove the search field".
approvedFromset and then clicks Apply on other filters will no longer re-carry theapproved-date params (they're dropped from
buildParams). This is the expected consequenceof removing the field; flag if the manager actually wants the deep-linked filter preserved
on re-apply.
Routing rationale
Routing rationale: Localized single-file UI removal in a client component with clear acceptance (two fields gone, deep-links preserved), no DB/auth/payments/migrations, verifiable by type-check + lint → claude-queue.
Routing:
claude-queue| Type:feature[Claude] Started working on this issue on branch
claude/issue-136.[Claude] Opened PR #137 with a proposed fix. Review and merge it, then create a release tag to deploy.