Files
JQC_iOS_App/JanitorialQC/PLACEMENT_MAP.txt
T

45 lines
1.8 KiB
Plaintext

JQC iOS — scheduled inspection fulfilment fix
=============================================
Repo: jqc_ios_app Branch target: main
All paths are relative to the repo root (the folder containing JanitorialQC.xcodeproj).
DROP-IN (overwrite):
JanitorialQC/Views/Dashboard/ExecuteInspectionView.swift
JanitorialQC/Views/Dashboard/ScheduledInspectionsView.swift
JanitorialQC/Views/Dashboard/MyInspectionsView.swift
JanitorialQC/Views/Dashboard/DashboardView.swift
JanitorialQC/CLAUDE.md
NO new files. NO files removed. NO Xcode project edits
(the target uses PBXFileSystemSynchronizedRootGroup — new/changed
files under JanitorialQC/ are picked up automatically).
NO server changes. NO SwiftData schema change, so no migration
and no need to delete the app from the iPad.
BUILD
1. git pull / copy files in
2. Xcode → Product → Clean Build Folder (Shift-Cmd-K)
3. Build & run on the iPad
VERIFY
A. Scheduled row path
Dashboard → SCHEDULED → tap row → Start → complete → Submit
→ SCHEDULED card clears immediately
→ web: Inspections → Scheduled → one-time schedule shows "Inactive"
B. "+" path (this is the case that was broken)
Dashboard/My Inspections → "+" → pick the SAME facility + template
as a schedule due today or earlier → complete → Submit
→ same result as A
C. Offline
Airplane mode → run A → SCHEDULED card clears at once
→ re-enable network → schedule goes Inactive on the web
D. Regression
Re-inspection (History → Re-inspect) must NOT deactivate any schedule
Ad-hoc inspection for a facility whose schedule is due NEXT month
must NOT deactivate it
SERVER-SIDE CHECK
sudo journalctl -u janitorial_qc --since "10 min ago" | grep "API INSPECTIONS"
expect: API INSPECTIONS | schedule fulfilled | schedule=N | inspection=M | next=deactivated