Hanim 9f874f30e7 feat: Add dashboard layout with sidebar and main content area
- Implemented AppFooter widget for mobile and desktop views.
- Created ChildrenSidebar widget to display children's information.
- Developed AppLayout to manage app structure with optional footer.
- Added ChildrenSidebar for selecting children and displaying their status.
- Introduced DashboardAppBar for navigation and user actions.
- Built WMainContentArea for displaying assistant details and calendar.
- Created MainContentArea to manage contracts and events display.
- Implemented MessagingSidebar for messaging functionality.
- Updated widget tests to reflect new structure and imports.
2025-08-28 12:58:44 +02:00

51 lines
1.3 KiB
Dart

class AssistantModel {
final String id;
final String firstName;
final String lastName;
final String? photoUrl;
final double hourlyRate;
final double dailyFees;
final AssistantStatus status;
final String? address;
final String? phone;
final String? email;
AssistantModel({
required this.id,
required this.firstName,
required this.lastName,
this.photoUrl,
required this.hourlyRate,
required this.dailyFees,
required this.status,
this.address,
this.phone,
this.email,
});
factory AssistantModel.fromJson(Map<String, dynamic> json) {
return AssistantModel(
id: json['id'],
firstName: json['firstName'],
lastName: json['lastName'],
photoUrl: json['photoUrl'],
hourlyRate: json['hourlyRate'].toDouble(),
dailyFees: json['dailyFees'].toDouble(),
status: AssistantStatus.values.byName(json['status']),
address: json['address'],
phone: json['phone'],
email: json['email'],
);
}
String get fullName => '$firstName $lastName';
String get hourlyRateFormatted => '${hourlyRate.toStringAsFixed(2)} €/h';
String get dailyFeesFormatted => '${dailyFees.toStringAsFixed(2)} €/jour';
}
enum AssistantStatus {
available,
busy,
onHoliday,
unavailable,
}