@ -37,6 +37,7 @@ import 'package:hmg_patient_app_new/presentation/ask_doctor/doctor_response_page
import ' package:hmg_patient_app_new/presentation/book_appointment/widgets/appointment_calendar.dart ' ;
import ' package:hmg_patient_app_new/presentation/book_appointment/widgets/appointment_calendar.dart ' ;
import ' package:hmg_patient_app_new/presentation/contact_us/feedback_page.dart ' ;
import ' package:hmg_patient_app_new/presentation/contact_us/feedback_page.dart ' ;
import ' package:hmg_patient_app_new/presentation/prescriptions/prescription_detail_page.dart ' ;
import ' package:hmg_patient_app_new/presentation/prescriptions/prescription_detail_page.dart ' ;
import ' package:hmg_patient_app_new/services/dialog_service.dart ' ;
import ' package:hmg_patient_app_new/theme/colors.dart ' ;
import ' package:hmg_patient_app_new/theme/colors.dart ' ;
import ' package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart ' ;
import ' package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart ' ;
import ' package:hmg_patient_app_new/widgets/buttons/custom_button.dart ' ;
import ' package:hmg_patient_app_new/widgets/buttons/custom_button.dart ' ;
@ -148,23 +149,36 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
} ) ;
} ) ;
} ,
} ,
onCancelTap: ( ) async {
onCancelTap: ( ) async {
showCommonBottomSheetWithoutHeight (
title: LocaleKeys . notice . tr ( context: context ) ,
context ,
child: Utils . getWarningWidget (
loadingText: LocaleKeys . cancelAppointmentConfirmMessage . tr ( context: context ) ,
isShowActionButtons: true ,
onCancelTap: ( ) {
Navigator . of ( context ) . pop ( ) ;
} ,
onConfirmTap: ( ) async {
Navigator . of ( context ) . pop ( ) ;
LoaderBottomSheet . showLoader ( loadingText: LocaleKeys . cancellingAppointmentPleaseWait . tr ( context: context ) ) ;
LoaderBottomSheet . showLoader ( loadingText: LocaleKeys . cancellingAppointmentPleaseWait . tr ( context: context ) ) ;
await myAppointmentsViewModel . cancelAppointment (
await myAppointmentsViewModel . cancelAppointment (
patientAppointmentHistoryResponseModel: widget . patientAppointmentHistoryResponseModel ,
patientAppointmentHistoryResponseModel: widget . patientAppointmentHistoryResponseModel ,
onSuccess: ( apiResponse ) {
onSuccess: ( apiResponse ) async {
LoaderBottomSheet . hideLoader ( ) ;
LoaderBottomSheet . hideLoader ( ) ;
myAppointmentsViewModel . setIsAppointmentDataToBeLoaded ( true ) ;
myAppointmentsViewModel . setIsAppointmentDataToBeLoaded ( true ) ;
myAppointmentsViewModel . getPatientAppointments ( true , false ) ;
myAppointmentsViewModel . getPatientAppointments ( true , false ) ;
showCommonBottomSheetWithoutHeight (
showCommonBottomShee t(
context ,
context ,
child: Utils . getSuccessWidget ( loadingText: LocaleKeys . appointmentCancelledSuccessfully . tr ( context: context ) ) ,
child: Utils . getSuccessWidget ( loadingText: LocaleKeys . appointmentCancelledSuccessfully . tr ( context: context ) ) ,
callBackFunc: ( ) {
callBackFunc: ( str ) {
Navigator . of ( context ) . pop ( ) ;
Navigator . of ( context ) . pop ( ) ;
} ,
} ,
title: " " ,
title: " " ,
isCloseButtonVisible: tru e,
isCloseButtonVisible: fals e,
isDismissible: false ,
isDismissible: false ,
isFullScreen: false ,
isFullScreen: false ,
isAutoDismiss: true ,
height: ResponsiveExtension . screenHeight * 0.3 ,
) ;
) ;
} ,
} ,
onError: ( err ) {
onError: ( err ) {
@ -173,16 +187,17 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
context ,
context ,
child: Utils . getErrorWidget ( loadingText: err . toString ( ) ) ,
child: Utils . getErrorWidget ( loadingText: err . toString ( ) ) ,
callBackFunc: ( ) { } ,
callBackFunc: ( ) { } ,
title: " " ,
title: " " , isCloseButtonVisible: true , isDismissible: false , isFullScreen: false ) ;
isCloseButtonVisible: true ,
} ) ;
isDismissible: false ,
} ) ,
callBackFunc: ( ) { } ,
isFullScreen: false ,
isFullScreen: false ,
isCloseButtonVisible: true ,
) ;
) ;
} ) ;
/ / var isEventAddedOrRemoved = await CalenderUtilsNew . instance . checkAndRemove ( id: " ${ widget . patientAppointmentHistoryResponseModel . appointmentNo } " , ) ;
var isEventAddedOrRemoved = await CalenderUtilsNew . instance . checkAndRemove ( id: " ${ widget . patientAppointmentHistoryResponseModel . appointmentNo } " , ) ;
/ / setState ( ( ) {
setState ( ( ) {
/ / myAppointmentsViewModel . setAppointmentReminder ( isEventAddedOrRemoved , widget . patientAppointmentHistoryResponseModel ) ;
myAppointmentsViewModel . setAppointmentReminder ( isEventAddedOrRemoved , widget . patientAppointmentHistoryResponseModel ) ;
/ / } ) ;
} ) ;
} ,
} ,
onRescheduleTap: ( ) async {
onRescheduleTap: ( ) async {
openDoctorScheduleCalendar ( ) ;
openDoctorScheduleCalendar ( ) ;
@ -987,7 +1002,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
doctorImageURL: widget . patientAppointmentHistoryResponseModel . doctorImageURL ,
doctorImageURL: widget . patientAppointmentHistoryResponseModel . doctorImageURL ,
doctorTitle: widget . patientAppointmentHistoryResponseModel . doctorTitle ,
doctorTitle: widget . patientAppointmentHistoryResponseModel . doctorTitle ,
name: widget . patientAppointmentHistoryResponseModel . doctorNameObj ,
name: widget . patientAppointmentHistoryResponseModel . doctorNameObj ,
nationalityFlagURL: " https://hmgwebservices.com/Images/flag/SYR.png ",
nationalityFlagURL: " ",
speciality: [ ] ,
speciality: [ ] ,
clinicName: widget . patientAppointmentHistoryResponseModel . clinicName ,
clinicName: widget . patientAppointmentHistoryResponseModel . clinicName ,
projectName: widget . patientAppointmentHistoryResponseModel . projectName ,
projectName: widget . patientAppointmentHistoryResponseModel . projectName ,
@ -1036,17 +1051,18 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
myAppointmentsViewModel . initAppointmentsViewModel ( ) ;
myAppointmentsViewModel . initAppointmentsViewModel ( ) ;
myAppointmentsViewModel . getPatientAppointments ( true , false ) ;
myAppointmentsViewModel . getPatientAppointments ( true , false ) ;
Navigator . of ( context ) . pop ( ) ;
Navigator . of ( context ) . pop ( ) ;
} ,
} , title: " " , height: ResponsiveExtension . screenHeight * 0.3 , isAutoDismiss: true , isCloseButtonVisible: true , isDismissible: false , isFullScreen: false ,
title: " " ,
height: ResponsiveExtension . screenHeight * 0.3 ,
isCloseButtonVisible: true ,
isDismissible: false ,
isFullScreen: false ,
isSuccessDialog: true ) ;
isSuccessDialog: true ) ;
} ) ;
} ) ;
/ / LoaderBottomSheet . hideLoader ( ) ;
/ / LoaderBottomSheet . hideLoader ( ) ;
case 15 :
case 15 :
break ;
getIt . get < DialogService > ( ) . showCommonBottomSheetWithoutH (
message: LocaleKeys . upcomingPaymentPending . tr ( context: context ) ,
label: LocaleKeys . notice . tr ( ) ,
onOkPressed: ( ) { } ,
okLabel: " confirm " ,
cancelLabel: LocaleKeys . confirm . tr ( context: context ) ,
) ;
case 20 :
case 20 :
myAppointmentsViewModel . setIsPatientAppointmentShareLoading ( true ) ;
myAppointmentsViewModel . setIsPatientAppointmentShareLoading ( true ) ;
Navigator . of ( context ) . push (
Navigator . of ( context ) . push (