No description
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> |
||
|---|---|---|
| backend | ||
| frontend | ||
| .gitignore | ||
| docker-compose.yml | ||
| seed-app.js | ||