GUI updates and misc fixes for the Cancel cutoff

This commit is contained in:
2026-08-31 17:01:13 -05:00
parent 9651b82415
commit df9958cb97
7 changed files with 148 additions and 61 deletions
+13
View File
@@ -36,3 +36,16 @@ def is_past_cutoff(created_at: Optional[dt.datetime], cutoff: Optional[dt.time])
if not created_at or not cutoff:
return False
return created_at.time() > cutoff
def is_past_cutoff_today(created_at: Optional[dt.datetime], cutoff: Optional[dt.time]) -> bool:
"""
Same as is_past_cutoff, but only true for TODAY's late arrivals - the
flag is meant to mean "this one came in too late for today's window",
not a permanent marker. Once the next business day starts, a ticket
that arrived late yesterday is carryover (a different, already-tracked
concept), not "past cutoff" anymore.
"""
if not created_at or created_at.date() != dt.date.today():
return False
return is_past_cutoff(created_at, cutoff)