maintenance/frontend/src
jtricerolph 2d2541576d Merge asset recurring templates into the main Recurring/Summary pages
Assets.tsx had its own bare-bones template-creation form (title/interval/
next_due only, no description/priority-choice/assignee/schedule_mode/
lead_days/group) with zero edit or delete path — a linked recurring task
could only ever be created from here, never managed. The backend already
sourced the asset detail's tasks/templates straight from the main tasks
and task_templates tables (no separate storage), so the fix is entirely
frontend: stop duplicating the editor, link back to the real one.

- Assets.tsx: removed the bespoke ServiceTaskForm entirely. Each linked
  template row now navigates to /recurring?edit=<id> (opens that
  template's full edit form there, including delete). "+ Add" navigates
  to /recurring?new_asset=&new_location= for a prefilled New Template
  form. Added a matching "+ Report fault" action navigating to
  /summary?new_asset=&new_location= for one-off tasks, since there was
  previously no way to create a plain task from the Assets page at all.
  Existing tasks still open in-place via TaskModal, unchanged.
- Recurring.tsx / Summary.tsx: read those query params on mount, open
  the appropriate form/modal prefilled, then strip the params from the
  URL (replace, no history pollution).
- NewTaskModal.tsx + Recurring.tsx template form: asset picker is no
  longer gated behind picking a location first — it always shows the
  full register (grouped by location) or the location-filtered list
  once one's chosen, and selecting an asset now back-fills its location
  automatically. Makes tagging routine servicing to a specific asset
  (fixed or floating recurring) the natural way in, for both one-off
  and recurring tasks.
- Asset list/detail counts (open tasks, recurring templates) are
  unchanged — still sourced from the same main-table queries.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-26 15:09:24 +00:00
..
components Merge asset recurring templates into the main Recurring/Summary pages 2026-08-26 15:09:24 +00:00
hooks Add Web Push notifications for task assignment 2026-07-20 22:59:16 +00:00
pages Merge asset recurring templates into the main Recurring/Summary pages 2026-08-26 15:09:24 +00:00
api.ts Add delete action for recurring templates 2026-08-26 11:58:52 +00:00
App.tsx Add iOS install hint + Apple PWA meta tags 2026-08-06 14:12:12 +00:00
index.css Add template groups: bulk multi-location creation + duplicate action 2026-08-26 10:33:19 +00:00
main.tsx Make maintenance installable as a PWA 2026-07-11 11:27:00 +00:00
sw.js Add Web Push notifications for task assignment 2026-07-20 22:59:16 +00:00
types.ts Add lead time to recurring templates — generate before actually due 2026-08-26 12:20:50 +00:00
vite-env.d.ts Maintenance log book app — initial scaffold 2026-07-03 21:28:57 +00:00