feat(tickets): wire Add Note, New, Log Time, Detail title (PMC-23) #28
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/pmc-23-tickets-ui"
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?
Summary
Closes PMC-23 (Tickets UI). Four commits, one per actionable sub-task. Already-resolved PMC-24 was closed in the audit pass; PMC-29 (filter/sort/pagination) and PMC-30 (search) were deferred to a follow-up that lands after the list-wire from PR #26 (PMC-2) merges, since both require a real Vec of remote tickets to operate on rather than hardcoded
TicketRowrsx blocks.PMC-28: detail-page header usesTicket {props.id}instead of the hardcoded "TKT-1234: Email server not responding" so every route gets a distinct browser title.PMC-26: Log Time button is now a Link to TimeEntryNew instead of a dead Button. Pre-populating the ticket via a query param is a follow-up that requires extending the router.PMC-27: TicketNewPage submit POSTs/api/v1/ticketsand navigates to the new detail page on success. Company UUID handling is best-effort until the company dropdown gets the contacts wire; failures surface on the console for now (toast lands with PMC-10 once #26 merges).PMC-25: Add Note modal bindsnote_type/note_contentsignals to its inputs and POSTs to/api/v1/tickets/{id}/notes. Empty content short-circuits; failures keep the modal open for retry.Test plan
cargo check --features webclean/tickets/abc123and confirm the header reads "Ticket abc123" and the browser tab title matches/time/new/api/v1/tickets; on auth-free dev, expect a 401 in devtools and the form staying mounted🤖 Generated with Claude Code
Replace the hardcoded "TKT-1234: Email server not responding" header with "Ticket {props.id}" so every detail-page URL gets a distinct title and the browser tab/back-button history reflect the route the user actually navigated to. Real ticket numbers and subjects will replace the bare id once the detail-page fetch lands (tracked under the API client story). #PMC-28 State DoneThe Add Note modal on TicketDetailPage was a UI shell: the Select and Textarea fed no signals, and the footer Add Note button had no onclick. Bind `note_type` / `note_content` signals to the inputs, wire the footer button to POST `/api/v1/tickets/{id}/notes` (using the route's `props.id`), close the modal and clear the textarea on success. Empty-content submissions short-circuit instead of round-tripping. POST failures log to the browser console; the toast surface from PMC-10 isn't on this branch yet so we keep the modal open and let the user retry. #PMC-25 State DonePull request closed