mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-12 19:03:47 +00:00
Invert overtime (#1715)
* refactor: invert offset calculation * chore: update tests * chore: flip offset in UI * fix seconds display on group target duration * update comment * fix rebase
This commit is contained in:
committed by
Carlos Valente
parent
4665f9c2f7
commit
e0149c1cbf
@@ -21,5 +21,6 @@ export function getOffsetText(offset: MaybeNumber): string {
|
||||
export function getOffsetState(offset: MaybeNumber): 'over' | 'under' | 'muted' | null {
|
||||
if (offset === null) return 'muted';
|
||||
if (offset === 0) return null;
|
||||
return offset < 0 ? 'over' : 'under';
|
||||
// a positive value means that we are in over time aka behind schedule
|
||||
return offset > 0 ? 'over' : 'under';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user