|
|
|
|
@ -108,7 +108,7 @@ class MedicalFileAppointmentCard extends StatelessWidget {
|
|
|
|
|
borderColor: AppointmentType.getNextActionButtonColor(patientAppointmentHistoryResponseModel.nextAction).withOpacity(0.01),
|
|
|
|
|
textColor: AppointmentType.getNextActionTextColor(patientAppointmentHistoryResponseModel.nextAction),
|
|
|
|
|
fontSize: 14.f,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
borderRadius: 12.r,
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 10.w),
|
|
|
|
|
height: 40.h,
|
|
|
|
|
@ -118,8 +118,13 @@ class MedicalFileAppointmentCard extends StatelessWidget {
|
|
|
|
|
).toShimmer2(isShow: myAppointmentsViewModel.isMyAppointmentsLoading),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(width: 8.w),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 2,
|
|
|
|
|
((((patientAppointmentHistoryResponseModel.isLiveCareAppointment ?? false) ||
|
|
|
|
|
(patientAppointmentHistoryResponseModel.isExecludeDoctor ?? false) ||
|
|
|
|
|
!Utils.isClinicAllowedForRebook(patientAppointmentHistoryResponseModel.clinicID ?? 0))) &&
|
|
|
|
|
AppointmentType.isArrived(patientAppointmentHistoryResponseModel))
|
|
|
|
|
? SizedBox.shrink()
|
|
|
|
|
: Expanded(
|
|
|
|
|
flex: 2,
|
|
|
|
|
child: Container(
|
|
|
|
|
height: 40.h,
|
|
|
|
|
width: 40.w,
|
|
|
|
|
@ -163,42 +168,75 @@ class MedicalFileAppointmentCard extends StatelessWidget {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Widget getArrivedAppointmentButton(BuildContext context) {
|
|
|
|
|
return
|
|
|
|
|
// DateTime.now().difference(DateUtil.convertStringToDate(patientAppointmentHistoryResponseModel.appointmentDate)).inDays <= 15
|
|
|
|
|
// ? CustomButton(
|
|
|
|
|
// text: LocaleKeys.askDoctor.tr(context: context),
|
|
|
|
|
// onPressed: () {
|
|
|
|
|
// onAskDoctorTap();
|
|
|
|
|
// },
|
|
|
|
|
// backgroundColor: AppColors.secondaryLightRedColor,
|
|
|
|
|
// borderColor: AppColors.secondaryLightRedColor,
|
|
|
|
|
// textColor: AppColors.primaryRedColor,
|
|
|
|
|
// fontSize: 14.f,
|
|
|
|
|
// fontWeight: FontWeight.w600,
|
|
|
|
|
// borderRadius: 12.r,
|
|
|
|
|
// padding: EdgeInsets.symmetric(horizontal: 10.w),
|
|
|
|
|
// height: 40.h,
|
|
|
|
|
// icon: AppAssets.ask_doctor_icon,
|
|
|
|
|
// iconColor: AppColors.primaryRedColor,
|
|
|
|
|
// iconSize: 16.h,
|
|
|
|
|
// )
|
|
|
|
|
// :
|
|
|
|
|
CustomButton(
|
|
|
|
|
text: LocaleKeys.rebook.tr(context: context),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
onRescheduleTap();
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: AppColors.greyColor,
|
|
|
|
|
borderColor: AppColors.greyColor,
|
|
|
|
|
textColor: AppColors.blackColor,
|
|
|
|
|
fontSize: 14.f,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
borderRadius: 12.r,
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 10.w),
|
|
|
|
|
height: 40.h,
|
|
|
|
|
icon: AppAssets.rebook_appointment_icon,
|
|
|
|
|
iconColor: AppColors.blackColor,
|
|
|
|
|
iconSize: 16.h,
|
|
|
|
|
);
|
|
|
|
|
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
|
|
|
|
|
// DateTime.now().difference(DateUtil.convertStringToDate(patientAppointmentHistoryResponseModel.appointmentDate)).inDays <= 15
|
|
|
|
|
// ? CustomButton(
|
|
|
|
|
// text: LocaleKeys.askDoctor.tr(context: context),
|
|
|
|
|
// onPressed: () {
|
|
|
|
|
// onAskDoctorTap();
|
|
|
|
|
// },
|
|
|
|
|
// backgroundColor: AppColors.secondaryLightRedColor,
|
|
|
|
|
// borderColor: AppColors.secondaryLightRedColor,
|
|
|
|
|
// textColor: AppColors.primaryRedColor,
|
|
|
|
|
// fontSize: 14.f,
|
|
|
|
|
// fontWeight: FontWeight.w600,
|
|
|
|
|
// borderRadius: 12.r,
|
|
|
|
|
// padding: EdgeInsets.symmetric(horizontal: 10.w),
|
|
|
|
|
// height: 40.h,
|
|
|
|
|
// icon: AppAssets.ask_doctor_icon,
|
|
|
|
|
// iconColor: AppColors.primaryRedColor,
|
|
|
|
|
// iconSize: 16.h,
|
|
|
|
|
// )
|
|
|
|
|
// :
|
|
|
|
|
CustomButton(
|
|
|
|
|
text: LocaleKeys.rebook.tr(context: context),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
onRescheduleTap();
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: AppColors.greyColor,
|
|
|
|
|
borderColor: AppColors.greyColor,
|
|
|
|
|
textColor: AppColors.blackColor,
|
|
|
|
|
fontSize: 14.f,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
borderRadius: 12.r,
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 10.w),
|
|
|
|
|
height: 40.h,
|
|
|
|
|
icon: AppAssets.rebook_appointment_icon,
|
|
|
|
|
iconColor: AppColors.blackColor,
|
|
|
|
|
iconSize: 16.h,
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|