no 100% with 0/0 workers

This commit is contained in:
José Salazar
2026-01-29 22:05:18 -05:00
parent 3bed200625
commit c3263262af

View File

@@ -39,7 +39,7 @@ class CoverageShift extends Equatable {
/// Calculates the coverage percentage for this shift. /// Calculates the coverage percentage for this shift.
int get coveragePercent { int get coveragePercent {
if (workersNeeded == 0) return 100; if (workersNeeded == 0) return 0;
return ((workers.length / workersNeeded) * 100).round(); return ((workers.length / workersNeeded) * 100).round();
} }
@@ -118,7 +118,7 @@ class CoverageStats extends Equatable {
/// Calculates the overall coverage percentage. /// Calculates the overall coverage percentage.
int get coveragePercent { int get coveragePercent {
if (totalNeeded == 0) return 100; if (totalNeeded == 0) return 0;
return ((totalConfirmed / totalNeeded) * 100).round(); return ((totalConfirmed / totalNeeded) * 100).round();
} }