feat(contacts): attach existing contacts, new-ticket from company, breadcrumbs #204

Merged
David merged 3 commits from feat/mapps-207-relational-gaps into main 2026-06-17 12:08:49 +02:00
Owner

Close the MAPPS-207 relational gaps across the company and ticket flows.

Add a reusable ContactPicker component (mirrors CompanyPicker/AssetPicker): searches GET /contacts/contacts on each keystroke, reports the selected contact id and name through callbacks, and optionally scopes results to a company via the server's company_id filter.

Company "Add Contact" now opens an AddContactModal that searches and selects an existing contact, attaching it to the company with a single-field PUT to /contacts/contacts/{id} (the server's UpdateContactRequest accepts a bare company_id). Creating a brand-new contact is still offered inside the same modal via a link to the prefilled new-contact form.

The company Recent Tickets card gains a New Ticket affordance that links to /tickets/new with the company prefilled, alongside the existing View All. The New Ticket form reads that company prefill from the URL, seeds the CompanyPicker, and adds an optional ContactPicker scoped to the selected company; the picked contact is sent as contact_id on TicketCreateRequest and is cleared whenever the company changes.

Add breadcrumbs to the company detail, new-ticket, and new-contact pages so these flows always provide a way back (the View All destination previously left no path back, per PMS-312).

#MAPPS-207

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

Close the MAPPS-207 relational gaps across the company and ticket flows. Add a reusable ContactPicker component (mirrors CompanyPicker/AssetPicker): searches GET /contacts/contacts on each keystroke, reports the selected contact id and name through callbacks, and optionally scopes results to a company via the server's company_id filter. Company "Add Contact" now opens an AddContactModal that searches and selects an existing contact, attaching it to the company with a single-field PUT to /contacts/contacts/{id} (the server's UpdateContactRequest accepts a bare company_id). Creating a brand-new contact is still offered inside the same modal via a link to the prefilled new-contact form. The company Recent Tickets card gains a New Ticket affordance that links to /tickets/new with the company prefilled, alongside the existing View All. The New Ticket form reads that company prefill from the URL, seeds the CompanyPicker, and adds an optional ContactPicker scoped to the selected company; the picked contact is sent as contact_id on TicketCreateRequest and is cleared whenever the company changes. Add breadcrumbs to the company detail, new-ticket, and new-contact pages so these flows always provide a way back (the View All destination previously left no path back, per PMS-312). #MAPPS-207 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
feat(contacts): attach existing contacts, new-ticket from company, breadcrumbs
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 1m51s
584173c406
Close the MAPPS-207 relational gaps across the company and ticket flows.

Add a reusable ContactPicker component (mirrors CompanyPicker/AssetPicker): searches GET /contacts/contacts on each keystroke, reports the selected contact id and name through callbacks, and optionally scopes results to a company via the server's company_id filter.

Company "Add Contact" now opens an AddContactModal that searches and selects an existing contact, attaching it to the company with a single-field PUT to /contacts/contacts/{id} (the server's UpdateContactRequest accepts a bare company_id). Creating a brand-new contact is still offered inside the same modal via a link to the prefilled new-contact form.

The company Recent Tickets card gains a New Ticket affordance that links to /tickets/new with the company prefilled, alongside the existing View All. The New Ticket form reads that company prefill from the URL, seeds the CompanyPicker, and adds an optional ContactPicker scoped to the selected company; the picked contact is sent as contact_id on TicketCreateRequest and is cleared whenever the company changes.

Add breadcrumbs to the company detail, new-ticket, and new-contact pages so these flows always provide a way back (the View All destination previously left no path back, per PMS-312).

#MAPPS-207

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Merge main into feat/mapps-207-relational-gaps
Some checks failed
Check / clippy + fmt + tests (pull_request) Failing after 1m0s
e8f434ff6f
Resolve src/pages/contacts.rs: keep the MAPPS-207 enhanced CompanyTicketsCard (company_id/company_name to start a New Ticket from the company) together with the MAPPS-195 relationship cards (Contracts/Projects/Invoices/Assets) that landed on main via #208.

#MAPPS-207

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Merge branch 'main' into feat/mapps-207-relational-gaps
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 1m52s
Create release / Create release from merged PR (pull_request) Has been skipped
b18abada5b
David merged commit 3d3b3acecd into main 2026-06-17 12:08:49 +02:00
David deleted branch feat/mapps-207-relational-gaps 2026-06-17 12:08:49 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-apps!204
No description provided.