From 9865a51e822064b00798cf941ef50d30b59a6499 Mon Sep 17 00:00:00 2001 From: yaso Date: Thu, 7 Nov 2024 11:59:55 +0200 Subject: [PATCH] add selected date paramater --- .../appointment/appointments.dart | 30 +++++++++++++------ 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/Frontend/patient_manager/lib/mih_packages/appointment/appointments.dart b/Frontend/patient_manager/lib/mih_packages/appointment/appointments.dart index 963a1f20..eb876b50 100644 --- a/Frontend/patient_manager/lib/mih_packages/appointment/appointments.dart +++ b/Frontend/patient_manager/lib/mih_packages/appointment/appointments.dart @@ -38,6 +38,7 @@ class _PatientAccessRequestState extends State { String accessFilter = ""; bool forceRefresh = false; late String selectedDropdown; + String selectedDay = DateTime.now().toString().split(" ")[0]; late Future> accessRequestResults; @@ -250,18 +251,29 @@ class _PatientAccessRequestState extends State { return MIHBody( borderOn: true, bodyItems: [ - const MIHCalendar( - calendarWidth: 500, - rowHeight: 35, - ), + MIHCalendar( + calendarWidth: 500, + rowHeight: 35, + setDate: (value) { + setState(() { + selectedDay = value; + }); + }), Divider( color: MzanziInnovationHub.of(context)!.theme.secondaryColor(), ), - const Center( - child: Text( - "Work Inprogress!!!", - style: TextStyle(fontSize: 35), - )) + Row( + mainAxisSize: MainAxisSize.max, + children: [ + Expanded( + child: Text( + "Work Inprogress!!!\nSelected Day: $selectedDay", + textAlign: TextAlign.center, + style: const TextStyle(fontSize: 35), + ), + ), + ], + ) // const SizedBox(height: 10), // Row( // mainAxisAlignment: MainAxisAlignment.center,