Jul 10 - Update codes to catch up with the single tenant project

This commit is contained in:
2026-07-10 12:29:44 -04:00
parent faab9fd008
commit e41998b561
12 changed files with 375 additions and 13 deletions
+14
View File
@@ -84,6 +84,20 @@ class Issue(db.Model):
vendor_contact = db.Column(db.String(200), nullable=True) # phone or email
vendor_notes = db.Column(db.Text, nullable=True)
# Handler type — who is responsible for resolving the issue (phase39).
# NULL and 'internal' both mean janitorial staff (the default); 'facility'
# unlocks the facility_handler_* sub-fields; 'vendor' points to vendor_*.
handler_type = db.Column(db.Enum('internal', 'facility', 'vendor'), nullable=True)
facility_handler_name = db.Column(db.String(100), nullable=True)
facility_handler_contact = db.Column(db.String(200), nullable=True)
facility_handler_notes = db.Column(db.Text, nullable=True)
HANDLER_LABELS = {
'internal': 'Janitorial Staff',
'facility': 'Facility Staff',
'vendor': 'External Vendor',
}
# Relationships
# NOTE: Issue.area is provided by the backref on Area.issues (facility.py).
# Do NOT add a second explicit db.relationship('Area') here — it conflicts