shoc-frontend-new/src/domain/locations/use-cases
Alexandre Brandizzi 301fe44b0c fix(workorders): Site dialog loads legacy site contacts and locks fields while saving
A site saved before the contacts list existed maps with no contacts, only
the legacy contact/phone fields. The site-record sync read the contacts
list alone, so the dialog blanked the POC, blocked a notes-only Save until
the contact was retyped, and when the work order had no POC the legacy
autofill made the diff report a contact edit nobody made. The legacy
contact is now the site's main contact for display, baseline and request.

Save sends the values it had when clicked, so the dialog's fields are now
disabled while the site update is in flight instead of accepting edits
that neither save would include.

The site-update mutation already toasts its own failure, so it sets
meta.suppressErrorToast and the global mutation toast no longer repeats it.
2026-09-25 19:52:03 -03:00
..
use-create-location.ts feat(sites): Add Site modal and site detail panel with in-place edit 2026-09-25 11:43:30 -03:00
use-delete-location.ts feat(sites): delete a site from the detail panel with an open work-order warning 2026-09-25 11:59:08 -03:00
use-location-detail.ts Feat/vite typescript migration (#16) 2026-06-18 14:41:17 -03:00
use-location-sites.ts style(locations): format site query mapping 2026-07-27 10:27:13 -03:00
use-locations-list.ts Feat/vite typescript migration (#16) 2026-06-18 14:41:17 -03:00
use-site-open-work-orders.ts feat(sites): delete a site from the detail panel with an open work-order warning 2026-09-25 11:59:08 -03:00
use-update-location.ts feat(sites): Add Site modal and site detail panel with in-place edit 2026-09-25 11:43:30 -03:00
use-update-site-contact-info.ts fix(workorders): Site dialog loads legacy site contacts and locks fields while saving 2026-09-25 19:52:03 -03:00