Per-type expiry tail on the shopfloor board, and a 2x2 recertification block

This commit is contained in:
2026-08-07 09:28:10 -04:00
parent dd6ccd7a55
commit 2f15610cfd
7 changed files with 277 additions and 25 deletions

View File

@@ -75,6 +75,14 @@ class NotificationType(db.Model):
showemployeephoto = db.Column(db.Boolean, default=False)
displaystyle = db.Column(db.String(20), default='standard')
# Minutes a card stays on the shopfloor board AFTER its end time, shown as
# RESOLVED. 0 (the default) means it leaves the board the moment it ends,
# which is what a reader expects from an end time. A type whose cards are
# worth acknowledging after the fact - an incident that just cleared - can
# opt into a tail.
gracewindowminutes = db.Column(db.Integer, nullable=False,
server_default='0', default=0)
def __repr__(self):
return f"<NotificationType {self.typename}>"
@@ -91,7 +99,8 @@ class NotificationType(db.Model):
'expiryminute': self.expiryminute if self.expiryminute is not None else 0,
'splitperemployee': bool(self.splitperemployee),
'showemployeephoto': bool(self.showemployeephoto),
'displaystyle': self.displaystyle or 'standard'
'displaystyle': self.displaystyle or 'standard',
'gracewindowminutes': int(self.gracewindowminutes or 0)
}