|
|
|
@ -451,7 +451,7 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
height: isTablet ? 290.h : 255.h,
|
|
|
|
height: isTablet ? 290.h : 255.h,
|
|
|
|
child: ListView.separated(
|
|
|
|
child: ListView.separated(
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
itemCount: 3,
|
|
|
|
itemCount: myAppointmentsVM.patientAppointmentsHistoryList.length < 3 ? myAppointmentsVM.patientAppointmentsHistoryList.length : 3,
|
|
|
|
shrinkWrap: true,
|
|
|
|
shrinkWrap: true,
|
|
|
|
padding: EdgeInsets.only(left: 16.h, right: 16.h),
|
|
|
|
padding: EdgeInsets.only(left: 16.h, right: 16.h),
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
@ -980,11 +980,16 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
// );
|
|
|
|
// );
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Safety check: ensure list has at least 2 items
|
|
|
|
|
|
|
|
if (myAppointmentsViewModel.patientAppointmentsHistoryList.length > 1) {
|
|
|
|
return _buildAppointmentCardWrapper(
|
|
|
|
return _buildAppointmentCardWrapper(
|
|
|
|
myAppointmentsViewModel.patientAppointmentsHistoryList[1],
|
|
|
|
myAppointmentsViewModel.patientAppointmentsHistoryList[1],
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return Container(); // Return empty container if not enough items
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Third slot: Shows ancillary orders or appointment
|
|
|
|
// Third slot: Shows ancillary orders or appointment
|
|
|
|
Widget _buildThirdCardSlot() {
|
|
|
|
Widget _buildThirdCardSlot() {
|
|
|
|
final hasQueueOrLiveCare = myAppointmentsViewModel.isPatientHasQueueAppointment || immediateLiveCareViewModel.patientHasPendingLiveCareRequest;
|
|
|
|
final hasQueueOrLiveCare = myAppointmentsViewModel.isPatientHasQueueAppointment || immediateLiveCareViewModel.patientHasPendingLiveCareRequest;
|
|
|
|
@ -996,11 +1001,16 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
// );
|
|
|
|
// );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Safety check: ensure list has at least 3 items
|
|
|
|
|
|
|
|
if (myAppointmentsViewModel.patientAppointmentsHistoryList.length > 2) {
|
|
|
|
return _buildAppointmentCardWrapper(
|
|
|
|
return _buildAppointmentCardWrapper(
|
|
|
|
myAppointmentsViewModel.patientAppointmentsHistoryList[2],
|
|
|
|
myAppointmentsViewModel.patientAppointmentsHistoryList[2],
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return Container(); // Return empty container if not enough items
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Queue Card Widget
|
|
|
|
// Queue Card Widget
|
|
|
|
Widget _buildQueueCard() {
|
|
|
|
Widget _buildQueueCard() {
|
|
|
|
final currentQueue = myAppointmentsViewModel.currentPatientQueueDetails;
|
|
|
|
final currentQueue = myAppointmentsViewModel.currentPatientQueueDetails;
|
|
|
|
|