diff --git a/apps/mobile/packages/domain/lib/src/entities/shifts/open_shift.dart b/apps/mobile/packages/domain/lib/src/entities/shifts/open_shift.dart index 2da02a03..856deef5 100644 --- a/apps/mobile/packages/domain/lib/src/entities/shifts/open_shift.dart +++ b/apps/mobile/packages/domain/lib/src/entities/shifts/open_shift.dart @@ -12,6 +12,7 @@ class OpenShift extends Equatable { required this.shiftId, required this.roleId, required this.roleName, + this.clientName = '', required this.location, required this.date, required this.startTime, @@ -29,6 +30,7 @@ class OpenShift extends Equatable { shiftId: json['shiftId'] as String, roleId: json['roleId'] as String, roleName: json['roleName'] as String, + clientName: json['clientName'] as String? ?? '', location: json['location'] as String? ?? '', date: DateTime.parse(json['date'] as String), startTime: DateTime.parse(json['startTime'] as String), @@ -50,6 +52,9 @@ class OpenShift extends Equatable { /// Display name of the role. final String roleName; + /// Name of the client/business offering this shift. + final String clientName; + /// Human-readable location label. final String location; @@ -83,6 +88,7 @@ class OpenShift extends Equatable { 'shiftId': shiftId, 'roleId': roleId, 'roleName': roleName, + 'clientName': clientName, 'location': location, 'date': date.toIso8601String(), 'startTime': startTime.toIso8601String(), @@ -100,6 +106,7 @@ class OpenShift extends Equatable { shiftId, roleId, roleName, + clientName, location, date, startTime, diff --git a/apps/mobile/packages/features/staff/home/lib/src/presentation/widgets/home_page/recommended_shift_card.dart b/apps/mobile/packages/features/staff/home/lib/src/presentation/widgets/home_page/recommended_shift_card.dart index 2257e679..ba255380 100644 --- a/apps/mobile/packages/features/staff/home/lib/src/presentation/widgets/home_page/recommended_shift_card.dart +++ b/apps/mobile/packages/features/staff/home/lib/src/presentation/widgets/home_page/recommended_shift_card.dart @@ -78,7 +78,9 @@ class RecommendedShiftCard extends StatelessWidget { children: [ Flexible( child: Text( - shift.roleName, + shift.roleName.isNotEmpty + ? shift.roleName + : shift.clientName, style: UiTypography.body1m.textPrimary, overflow: TextOverflow.ellipsis, ), @@ -94,7 +96,9 @@ class RecommendedShiftCard extends StatelessWidget { spacing: UiConstants.space1, children: [ Text( - shift.orderType.toJson(), + shift.clientName.isNotEmpty + ? shift.clientName + : shift.orderType.toJson(), style: UiTypography.body3r.textSecondary, ), Text(