06/11 Fix some errors: submission datetime incorrect; inspection & issue not linked, etc

This commit is contained in:
Nguyen Ngo
2026-06-11 17:18:30 -04:00
parent 3643fb1828
commit 7b4496a456
7 changed files with 223 additions and 18 deletions
@@ -51,6 +51,13 @@ final class LocalInspection {
/// followUpRequired badge without relying on parentServerId being non-nil.
var parentLocalId: String?
// GPS (captured at submit time via CoreLocation)
/// Device latitude at the moment the inspector tapped Submit. Nil if
/// location permission was denied or a fix could not be obtained in time.
var submitLatitude: Double?
/// Device longitude at the moment the inspector tapped Submit.
var submitLongitude: Double?
// Relationships
@Relationship(deleteRule: .cascade) var pendingPhotos: [PendingPhoto]
@Relationship(deleteRule: .cascade) var localIssues: [LocalIssue]
@@ -82,6 +89,8 @@ final class LocalInspection {
self.followUpNote = nil
self.parentServerId = nil
self.parentLocalId = nil
self.submitLatitude = nil
self.submitLongitude = nil
self.pendingPhotos = []
self.localIssues = []
}