|
|
|
|
@ -948,8 +948,8 @@ class BookAppointmentsViewModel extends ChangeNotifier {
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future<void> cancelAppointment({required PatientAppointmentHistoryResponseModel patientAppointmentHistoryResponseModel, Function(dynamic)? onSuccess, Function(String)? onError}) async {
|
|
|
|
|
final result = await bookAppointmentsRepo.cancelAppointment(patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel);
|
|
|
|
|
Future<void> cancelAppointment({required PatientAppointmentHistoryResponseModel patientAppointmentHistoryResponseModel, bool isReschedule = false, Function(dynamic)? onSuccess, Function(String)? onError}) async {
|
|
|
|
|
final result = await bookAppointmentsRepo.cancelAppointment(patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel, isReschedule: isReschedule);
|
|
|
|
|
|
|
|
|
|
result.fold(
|
|
|
|
|
(failure) async => await errorHandlerService.handleError(failure: failure),
|
|
|
|
|
@ -1011,7 +1011,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
|
|
|
|
|
appointmentDate: apiResponse.data["SameClinicApptList"][0]['AppointmentDate'],
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
await cancelAppointment(patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel).then((val) async {
|
|
|
|
|
await cancelAppointment(patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel, isReschedule: true).then((val) async {
|
|
|
|
|
// LoaderBottomSheet.hideLoader();
|
|
|
|
|
Future.delayed(Duration(milliseconds: 50)).then((value) async {});
|
|
|
|
|
// LoaderBottomSheet.showLoader(loadingText: LocaleKeys.bookingYourAppointment.tr());
|
|
|
|
|
@ -1069,7 +1069,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
|
|
|
|
|
// loadingText: LocaleKeys.reschedulingAppo.tr(context: navigationService.navigatorKey.currentContext!),
|
|
|
|
|
loadingText: LocaleKeys.loadingText.tr(context: navigationService.navigatorKey.currentContext!),
|
|
|
|
|
);
|
|
|
|
|
await cancelAppointment(patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel).then((val) async {
|
|
|
|
|
await cancelAppointment(patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel, isReschedule: true).then((val) async {
|
|
|
|
|
LoaderBottomSheet.hideLoader();
|
|
|
|
|
Future.delayed(Duration(milliseconds: 50)).then((value) async {});
|
|
|
|
|
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.bookingYourAppointment.tr());
|
|
|
|
|
@ -1174,7 +1174,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
|
|
|
|
|
isCloseButtonVisible: false,
|
|
|
|
|
isDismissible: false,
|
|
|
|
|
isFullScreen: false);
|
|
|
|
|
await cancelAppointment(patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel).then((val) async {
|
|
|
|
|
await cancelAppointment(patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel, isReschedule: true).then((val) async {
|
|
|
|
|
navigationService.pop();
|
|
|
|
|
Future.delayed(Duration(milliseconds: 50)).then((value) async {});
|
|
|
|
|
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.bookingYourAppointment.tr());
|
|
|
|
|
|