62 lines
2.9 KiB
Plaintext
62 lines
2.9 KiB
Plaintext
JQC — "Instructions" on scheduled inspections
|
|
=============================================
|
|
NO migration. NO schema change (web or iOS). NO API change.
|
|
The field stays `notes` end-to-end: WTForms field name, ScheduledInspection.notes,
|
|
scheduled_inspections.notes column, and the JSON key in
|
|
GET /api/v1/scheduled-inspections. Only the wording changed.
|
|
|
|
--------------------------------------------------------------------
|
|
WEB — repo: lt_janitorial_quality_control
|
|
deploy root: /home/jqc/janitorial_qc/
|
|
--------------------------------------------------------------------
|
|
Overwrite:
|
|
app/utils/forms.py (label 'Notes' -> 'Instructions')
|
|
app/templates/scheduled_inspections/form.html (placeholder + visibility hint, rows 2->3)
|
|
app/templates/inspections/execute.html (NEW: instructions panel)
|
|
CLAUDE.md
|
|
|
|
Deploy (code only — no alembic step):
|
|
cd /home/jqc/janitorial_qc
|
|
git pull
|
|
sudo systemctl restart janitorial_qc
|
|
sudo systemctl status janitorial_qc --no-pager
|
|
|
|
--------------------------------------------------------------------
|
|
iOS — repo: jqc_ios_app
|
|
--------------------------------------------------------------------
|
|
Overwrite:
|
|
JanitorialQC/Models/LocalScheduledInspection.swift (computed `instructions`)
|
|
JanitorialQC/Views/Dashboard/ScheduledInspectionsView.swift
|
|
JanitorialQC/Views/Dashboard/StartInspectionView.swift
|
|
JanitorialQC/Views/Dashboard/ExecuteInspectionView.swift
|
|
JanitorialQC/Views/Dashboard/MyInspectionsView.swift
|
|
JanitorialQC/Views/Dashboard/DashboardView.swift
|
|
JanitorialQC/CLAUDE.md
|
|
|
|
No new files, none removed, no .xcodeproj edit
|
|
(PBXFileSystemSynchronizedRootGroup picks changes up automatically).
|
|
`instructions` is COMPUTED, not stored -> no SwiftData migration,
|
|
no need to delete the app from the iPad.
|
|
|
|
Build: Product > Clean Build Folder (Shift-Cmd-K), then run.
|
|
|
|
--------------------------------------------------------------------
|
|
VERIFY
|
|
--------------------------------------------------------------------
|
|
1. Web > Inspections > Scheduled > New Schedule
|
|
- field reads "Instructions", hint below it
|
|
- save some text
|
|
2. Web, as the assigned inspector: Start that schedule
|
|
- indigo "Instructions for this inspection" panel between header and form
|
|
3. iPad, after a sync:
|
|
- Dashboard SCHEDULED card: 1-line preview with an info icon
|
|
- tap the row: "Instructions" section at the top of the start screen
|
|
- Start Inspection: collapsible "Instructions" banner above the form,
|
|
tap the header to collapse/expand
|
|
4. Draft-resume regression: back out mid-inspection, reopen from the blue
|
|
"Inspection in progress" banner -> instructions still shown
|
|
5. Empty case: a schedule with no instructions shows NOTHING extra anywhere
|
|
(blank and whitespace-only both normalise to nil)
|
|
6. Submit regression: banner stays readable through the 2.5s success screen
|
|
and the app does not crash when the schedule row is deleted
|