GUI updates and misc fixes for the Cancel cutoff
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user