feat: Enhance shift filtering logic and update header text style for improved UI

This commit is contained in:
Achintha Isuru
2026-02-01 02:46:30 -05:00
parent 3ed1add2cc
commit 56dbf7728f
2 changed files with 10 additions and 4 deletions

View File

@@ -63,7 +63,15 @@ class HomeRepositoryImpl implements HomeRepository {
final response = await ExampleConnector.instance.listShifts().execute();
return response.data.shifts
.where((s) => s.status is Known && (s.status as Known).value == ShiftStatus.OPEN)
.where((s) {
final isOpen = s.status is Known && (s.status as Known).value == ShiftStatus.OPEN;
if (!isOpen) return false;
final start = s.startTime?.toDate();
if (start == null) return false;
return start.isAfter(DateTime.now());
})
.take(10)
.map((s) => _mapConnectorShiftToDomain(s))
.toList();

View File

@@ -53,9 +53,7 @@ class HomeHeader extends StatelessWidget {
children: [
Text(
headerI18n.welcome_back,
style: UiTypography.body3r.copyWith(
color: UiColors.mutedForeground,
),
style: UiTypography.body3r.textSecondary,
),
Text(nameToDisplay, style: UiTypography.headline4m),
],