Show recently sent request forms on the builder (PMS-764) #519
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/PMS-764-recently-sent-panel"
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?
PMS-764. A sent request form had exactly one status surface and nothing led to it.
What it was
/companies/{id}has a "Request forms" card: every link sent to that client, with status and expiry. It is good, and it is the only place any of that appears anywhere in the SPA (CompanyRequestFormsCard, the sole reader of link status)./admin/formslists the definitions with Edit, Preview and Send, and refers to nothing ever having been sent. You send a form, get a toast reading "Request form sent to someone@example.com", and the page you are standing on looks exactly as it did before. The send modal does say "you ... see what has already been sent, on their company page" - but on its second step, after a company has been picked, so it is read while sending rather than when wondering, and it is prose, not a link.What it is now
A "Recently sent" panel under the definitions: Form, Client, Sent to, Status, Expires, newest first.
No server change
GET /form-request-linksalready takescompany_idas an optional filter; without it mokosh-server returns the tenant's whole list,ORDER BY created_at DESC, and the DTO already carriescompany_idandcompany_namebeside the form name, recipient, expiry andused_at. Status is derived through the sameRequestLink::statusthe company card uses, so the two surfaces cannot come to disagree about what Submitted means (there, Submitted deliberately wins over Expired: a link used before it lapsed is still a request that came in).Known limitation, deliberately accepted
The endpoint has no
limit, so the tenant-wide fetch returns every link the tenant has ever issued and the panel renders the first eight. Rows are small and current volumes are tens, so it is not worth coupling a frontend fix to a server deploy today. If a tenant's history grows into the thousands, the endpoint should take?limit=and this panel should pass it. Say the word and I will open that as a follow-up.Not doing
Checks
just checkclean,just test315 pass, three of them new (the cap reports what it hides, a short or empty list claims nothing hidden, and the server's newest-first ordering is preserved).Worth a look on the deploy, since the point of it is what a new user sees: open Request Forms, send one, and confirm the row appears with "Awaiting reply" and the client's name as a link.