Wahab customer request (relay #748 v3 next-wave).
3a. Fix 'Tech #N' display:
- FM dashboard's "Technician Workload" card was built from
`Tech #${t.assigned_to}`; it now reads Ticket.assigned_technician_name
(falling back to 'Unassigned', matching /tickets).
- Template sweep confirms no other `Tech #` placeholder exists.
3b. Technician performance dashboard:
- New bearer-gated GET /api/tickets/tech-performance aggregating existing
ticket columns only (no schema change): per-technician total assigned,
completed, in progress, escalated, cancelled, pending, open tasks,
completion rate, and created_at -> closed_at resolution time with explicit
counts for finished tasks lacking a timestamp. Rows key on user id so
same-name technicians stay separate; labels are real names. Fleet totals
and an unassigned-ticket count are included.
- New /dashboard/tech-performance page (FM + CEO nav and links) with sortable
table, completion bars and empty states; same-origin vendored assets only.
- Bucket map, service, schemas and tests in app/services/ticket.py,
app/schemas/ticket.py, tests/test_tech_performance.py.
Tests: 111 passed (101 existing + 10 new).
Wahab can now enter historical tickets that keep their true reported date:
- Add nullable tickets.reported_at (DateTime) via alembic d5e0f2a1c3b4;
backfill existing rows from created_at so nothing shows empty.
- TicketCreate.reported_at (optional) is persisted by create_ticket and
defaults to now when omitted, so existing create behavior is unchanged.
- New-issue form gains a 'Reported Date' date picker (defaults to today,
past dates allowed, future blocked) and sends reported_at in the payload.
- List and detail pages show 'Reported' next to 'Created' (date-only,
labeled) so backdated tickets are obvious; SLA deadline is unchanged and
still runs from creation time so backfilling never instantly breaches.
- Tests: backdated create persists + is exposed on list/detail; omitted
reported_at defaults to now; SLA window unchanged; full datetime round trip.
- Add Cancelled as terminal status reachable from all active states; exclude
from SLA breach reporting and dashboard active counts; add to status pickers
- Persist customer phone on ticket create/update (was silently dropped);
add tickets.phone migration + legacy self-heal guard
- Add admin-only DELETE /api/tickets/{id} (removes timeline/photos/escalations)
- Add GET /api/auth/users for the assign-technician dropdown (was hardcoded)
- TicketOut now returns nested unit/category so the detail page stops showing
'—' for Unit/Property/Category
- Ticket numbering uses max+1 so deletions never re-issue a number
- New-issue form: require Category and (standard mode) Priority client-side
- Tests: 11 new cases covering cancellation, SLA exemption, phone, delete,
users endpoint, numbering
Items 1-5, 9, 11 from denya-wahab-feedback-s2:
- Category.show_in_form (alert-only flag): Gas Leak hidden from issue picker
but kept urgent for SLA/alert and reporting; emergency quick path on the
new-issue form creates urgent tickets via include_hidden categories.
- Seed: Aluminum/Glass, Carpentry, Mould & Damp (Medium default) maintenance
categories; Lost Property renamed Missing Item (+ sub).
- One alembic migration: add show_in_form (backfill True, Gas Leak False) +
data rename Lost Property -> Missing Item.
- Property -> Building -> Apartment cascade with searchable apartment combobox
on the new-issue form and ticket list filters; /api/tickets/units gains
building filter + /units/grouped variant; /api/tickets gains additive
building/unit_id filters. apartment_mapping.json committed (deterministic).
- Group-by-priority toggle on /tickets (four sections + unknown bucket,
age-sortable, composes with filters, URL deep links), FM dashboard active
tickets, and CS dashboard priority card click-through.
- Tests: 13 new (category visibility, seed idempotency/sync, unit grouping,
ticket building/unit filters).
- Move unit loading to use real /api/tickets/units endpoint
- Match unit code format to backend seed (0101E style)
- Send unit_id in create ticket payload
- Fix tech IDs to match seed order (9-15 for Prosper-Afful)
- Add customer_name and phone fields to TicketCreate schema
- Map form customer_name/phone into API payload
- Remove duplicate import
- Fix → in create ticket
- Fix → in ticket detail
- Add note field to TicketUpdate schema and handle note-only updates in backend
- Update frontend submitNote() to use PATCH endpoint
- Ticket CRUD with full 15-status lifecycle enforcement
- Auto-generated ticket numbers (PAV-YYYY-NNNNN)
- Status transitions validated and auto-logged to timeline
- Reopen with 7-day window + auto-escalation to Ama
- SLA engine: priority-based deadlines and breach detection
- Photo uploads to uploads/ with multipart support
- Category system seeded from PRD §7 taxonomy (20 top-level)
- Flat and tree category listing endpoints
- SLA status check endpoint (/api/tickets/{id}/sla)
- Paginated ticket listing with filters