feat: add ShiftAssignmentCard widget and StaffShifts module

- Implemented ShiftAssignmentCard widget for displaying shift assignments with client details, pay calculation, and confirmation actions.
- Created StaffShiftsModule to manage dependencies, routes, and use cases related to staff shifts.
- Added necessary dependencies in pubspec.yaml and generated pubspec.lock.
This commit is contained in:
Achintha Isuru
2026-01-25 16:09:11 -05:00
parent 533a545da7
commit 8e429dda03
29 changed files with 2992 additions and 13 deletions

View File

@@ -18,16 +18,17 @@ export 'src/entities/business/business.dart';
export 'src/entities/business/business_setting.dart';
export 'src/entities/business/hub.dart';
export 'src/entities/business/hub_department.dart';
export 'src/entities/business/biz_contract.dart';
export 'src/entities/business/vendor.dart';
// Events & Shifts
// Events & Assignments
export 'src/entities/events/event.dart';
export 'src/entities/events/event_shift.dart';
export 'src/entities/events/event_shift_position.dart';
export 'src/entities/events/assignment.dart';
export 'src/entities/events/work_session.dart';
// Shifts
export 'src/entities/shifts/shift.dart';
// Orders & Requests
export 'src/entities/orders/order_type.dart';
export 'src/entities/orders/one_time_order.dart';

View File

@@ -0,0 +1,91 @@
import 'package:equatable/equatable.dart';
class Shift extends Equatable {
final String id;
final String title;
final String clientName;
final String? logoUrl;
final double hourlyRate;
final String location;
final String locationAddress;
final String date;
final String startTime;
final String endTime;
final String createdDate;
final bool? tipsAvailable;
final bool? travelTime;
final bool? mealProvided;
final bool? parkingAvailable;
final bool? gasCompensation;
final String? description;
final String? instructions;
final List<ShiftManager>? managers;
final double? latitude;
final double? longitude;
final String? status;
final int? durationDays; // For multi-day shifts
const Shift({
required this.id,
required this.title,
required this.clientName,
this.logoUrl,
required this.hourlyRate,
required this.location,
required this.locationAddress,
required this.date,
required this.startTime,
required this.endTime,
required this.createdDate,
this.tipsAvailable,
this.travelTime,
this.mealProvided,
this.parkingAvailable,
this.gasCompensation,
this.description,
this.instructions,
this.managers,
this.latitude,
this.longitude,
this.status,
this.durationDays,
});
@override
List<Object?> get props => [
id,
title,
clientName,
logoUrl,
hourlyRate,
location,
locationAddress,
date,
startTime,
endTime,
createdDate,
tipsAvailable,
travelTime,
mealProvided,
parkingAvailable,
gasCompensation,
description,
instructions,
managers,
latitude,
longitude,
status,
durationDays,
];
}
class ShiftManager extends Equatable {
final String name;
final String phone;
final String? avatar;
const ShiftManager({required this.name, required this.phone, this.avatar});
@override
List<Object?> get props => [name, phone, avatar];
}