- 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.
95 lines
3.1 KiB
Dart
95 lines
3.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:p_tits_pas/widgets/messaging_sidebar.dart';
|
|
|
|
class WMainContentArea extends StatelessWidget {
|
|
const WMainContentArea({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
padding: const EdgeInsets.all(16),
|
|
color: Colors.white,
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
children: [
|
|
// 🔷 Informations assistante maternelle (ligne complète)
|
|
Card(
|
|
margin: const EdgeInsets.only(bottom: 16),
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(16),
|
|
child: Row(
|
|
children: [
|
|
const CircleAvatar(
|
|
radius: 30,
|
|
backgroundImage: AssetImage("assets/images/am_photo.jpg"), // à adapter
|
|
),
|
|
const SizedBox(width: 16),
|
|
Expanded(
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: const [
|
|
Text("Julie Dupont", style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold)),
|
|
SizedBox(height: 4),
|
|
Text("Taux horaire : 10€/h"),
|
|
Text("Frais journaliers : 5€"),
|
|
],
|
|
),
|
|
),
|
|
ElevatedButton(
|
|
onPressed: () {
|
|
// Ouvrir le contrat
|
|
},
|
|
child: const Text("Voir le contrat"),
|
|
)
|
|
],
|
|
),
|
|
),
|
|
),
|
|
|
|
// 🔷 Deux colonnes : planning + messagerie
|
|
Expanded(
|
|
child: Row(
|
|
children: [
|
|
// 📆 Planning de garde
|
|
Expanded(
|
|
flex: 2,
|
|
child: Card(
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(16),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: const [
|
|
Text("Planning de garde", style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold)),
|
|
SizedBox(height: 12),
|
|
Expanded(
|
|
child: Center(
|
|
child: Text("Composant calendrier à intégrer ici"),
|
|
),
|
|
)
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
|
|
const SizedBox(width: 16),
|
|
|
|
// 💬 Messagerie
|
|
Expanded(
|
|
flex: 1,
|
|
child: MessagingSidebar(
|
|
conversations: [],
|
|
notifications: [],
|
|
isCompact: false,
|
|
isMobile: false,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
)
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|