Aug 25 - Implement new function allow Director (internal & customer) to assign and inspection to another inspector
This commit is contained in:
@@ -49,6 +49,15 @@ final class LocalFollowUpRequest {
|
||||
/// Stored raw; read through `note` for the normalised form.
|
||||
var followUpNote: String?
|
||||
|
||||
/// Display name of the inspector this follow-up was handed to, when it was
|
||||
/// assigned to somebody other than whoever performed the original
|
||||
/// inspection (phase53). nil = it belongs to the original inspector.
|
||||
///
|
||||
/// Purely for display — the server only ever returns follow-ups this user
|
||||
/// owns, so nothing here decides what is shown. Optional so existing
|
||||
/// SwiftData stores migrate lightweight (rule 8).
|
||||
var assignedToName: String?
|
||||
|
||||
/// Set on device the moment a re-inspection of this request is submitted, so
|
||||
/// the FOLLOW-UP REQUESTED lists hide the row immediately — online or
|
||||
/// offline — without waiting for the round trip.
|
||||
@@ -128,6 +137,7 @@ final class LocalFollowUpRequest {
|
||||
self.overallScore = api.overallScore
|
||||
self.inspectionDateString = api.inspectionDate ?? ""
|
||||
self.followUpNote = api.followUpNote
|
||||
self.assignedToName = api.followUpAssignedToName
|
||||
self.fulfilledLocally = false
|
||||
self.parentFormDataJSON = Self.encode(api)
|
||||
self.updatedAt = Date()
|
||||
@@ -170,6 +180,7 @@ final class LocalFollowUpRequest {
|
||||
self.overallScore = api.overallScore
|
||||
self.inspectionDateString = api.inspectionDate ?? ""
|
||||
self.followUpNote = api.followUpNote
|
||||
self.assignedToName = api.followUpAssignedToName
|
||||
self.parentFormDataJSON = Self.encode(api)
|
||||
// The server is authoritative. Being returned by the pull at all means
|
||||
// the follow-up is still outstanding, so any local "just did it" flag is
|
||||
|
||||
Reference in New Issue
Block a user