Merge pull request #329 from Oloodi/324-chore-add-total-number-of-shifts-as-a-count-in-the-coverage-page-next-to-the-title-shifts

324 chore add total number of shifts as a count in the coverage page next to the title shifts
This commit is contained in:
José Salazar
2026-01-29 22:16:19 -05:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

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

View File

@@ -113,7 +113,7 @@ class CoveragePage extends StatelessWidget {
const SizedBox(height: UiConstants.space5),
],
Text(
'Shifts',
'Shifts (${state.shifts.length})',
style: UiTypography.title2b.copyWith(
color: UiColors.textPrimary,
),