|
|
|
@ -118,7 +118,12 @@ class MedicalFileAppointmentCard extends StatelessWidget {
|
|
|
|
).toShimmer2(isShow: myAppointmentsViewModel.isMyAppointmentsLoading),
|
|
|
|
).toShimmer2(isShow: myAppointmentsViewModel.isMyAppointmentsLoading),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(width: 8.w),
|
|
|
|
SizedBox(width: 8.w),
|
|
|
|
Expanded(
|
|
|
|
((((patientAppointmentHistoryResponseModel.isLiveCareAppointment ?? false) ||
|
|
|
|
|
|
|
|
(patientAppointmentHistoryResponseModel.isExecludeDoctor ?? false) ||
|
|
|
|
|
|
|
|
!Utils.isClinicAllowedForRebook(patientAppointmentHistoryResponseModel.clinicID ?? 0))) &&
|
|
|
|
|
|
|
|
AppointmentType.isArrived(patientAppointmentHistoryResponseModel))
|
|
|
|
|
|
|
|
? SizedBox.shrink()
|
|
|
|
|
|
|
|
: Expanded(
|
|
|
|
flex: 2,
|
|
|
|
flex: 2,
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
height: 40.h,
|
|
|
|
height: 40.h,
|
|
|
|
@ -163,6 +168,38 @@ class MedicalFileAppointmentCard extends StatelessWidget {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Widget getArrivedAppointmentButton(BuildContext context) {
|
|
|
|
Widget getArrivedAppointmentButton(BuildContext context) {
|
|
|
|
|
|
|
|
if ((((patientAppointmentHistoryResponseModel.isLiveCareAppointment ?? false) ||
|
|
|
|
|
|
|
|
(patientAppointmentHistoryResponseModel.isExecludeDoctor ?? false) ||
|
|
|
|
|
|
|
|
!Utils.isClinicAllowedForRebook(patientAppointmentHistoryResponseModel.clinicID ?? 0))) &&
|
|
|
|
|
|
|
|
AppointmentType.isArrived(patientAppointmentHistoryResponseModel)) {
|
|
|
|
|
|
|
|
return CustomButton(
|
|
|
|
|
|
|
|
text: LocaleKeys.viewDetails.tr(context: context),
|
|
|
|
|
|
|
|
onPressed: () {
|
|
|
|
|
|
|
|
Navigator.of(context)
|
|
|
|
|
|
|
|
.push(
|
|
|
|
|
|
|
|
CustomPageRoute(
|
|
|
|
|
|
|
|
page: AppointmentDetailsPage(patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
.then((_) {
|
|
|
|
|
|
|
|
myAppointmentsViewModel.initAppointmentsViewModel();
|
|
|
|
|
|
|
|
myAppointmentsViewModel.getPatientAppointments(true, false);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
backgroundColor: AppColors.secondaryLightRedColor,
|
|
|
|
|
|
|
|
borderColor: AppColors.secondaryLightRedColor,
|
|
|
|
|
|
|
|
textColor: AppColors.primaryRedColor,
|
|
|
|
|
|
|
|
fontSize: (isFoldable || isTablet) ? 12.f : 14.f,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
|
|
|
borderRadius: 12.r,
|
|
|
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 10.w),
|
|
|
|
|
|
|
|
// height: isTablet || isFoldable ? 46.h : 40.h,
|
|
|
|
|
|
|
|
height: 40.h,
|
|
|
|
|
|
|
|
icon: null,
|
|
|
|
|
|
|
|
iconColor: AppColors.primaryRedColor,
|
|
|
|
|
|
|
|
iconSize: 16.h,
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
return
|
|
|
|
return
|
|
|
|
// DateTime.now().difference(DateUtil.convertStringToDate(patientAppointmentHistoryResponseModel.appointmentDate)).inDays <= 15
|
|
|
|
// DateTime.now().difference(DateUtil.convertStringToDate(patientAppointmentHistoryResponseModel.appointmentDate)).inDays <= 15
|
|
|
|
// ? CustomButton(
|
|
|
|
// ? CustomButton(
|
|
|
|
@ -201,4 +238,5 @@ class MedicalFileAppointmentCard extends StatelessWidget {
|
|
|
|
iconSize: 16.h,
|
|
|
|
iconSize: 16.h,
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|