|
|
|
|
@ -59,6 +59,7 @@ import 'package:hmg_patient_app_new/presentation/todo_section/todo_page.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/presentation/todo_section/widgets/ancillary_orders_list.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/routes/app_routes.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/services/cache_service.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/services/navigation_service.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/theme/colors.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
|
|
|
|
|
@ -156,9 +157,13 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
|
appointmentRatingViewModel.getLastRatingAppointment(
|
|
|
|
|
onSuccess: (response) {
|
|
|
|
|
if (appointmentRatingViewModel.appointmentRatedList.isNotEmpty) {
|
|
|
|
|
final lastAppointment = appointmentRatingViewModel.appointmentRatedList.last;
|
|
|
|
|
final appointmentNo = lastAppointment.appointmentNo;
|
|
|
|
|
final projectID = lastAppointment.projectID;
|
|
|
|
|
if (appointmentNo == null || projectID == null) return;
|
|
|
|
|
appointmentRatingViewModel.getAppointmentDetails(
|
|
|
|
|
appointmentRatingViewModel.appointmentRatedList.last.appointmentNo!,
|
|
|
|
|
appointmentRatingViewModel.appointmentRatedList.last.projectID!,
|
|
|
|
|
appointmentNo,
|
|
|
|
|
projectID,
|
|
|
|
|
onSuccess: ((response) {
|
|
|
|
|
appointmentRatingViewModel.setClinicOrDoctor(false);
|
|
|
|
|
appointmentRatingViewModel.setTitle(LocaleKeys.rateDoctor.tr(context: context));
|
|
|
|
|
@ -214,23 +219,24 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
|
immediateLiveCareViewModel.initImmediateLiveCare();
|
|
|
|
|
immediateLiveCareViewModel.getPatientLiveCareHistory();
|
|
|
|
|
|
|
|
|
|
appointmentRatingViewModel.getLastRatingAppointment(
|
|
|
|
|
onSuccess: (response) {
|
|
|
|
|
if (appointmentRatingViewModel.appointmentRatedList.isNotEmpty) {
|
|
|
|
|
appointmentRatingViewModel.getAppointmentDetails(
|
|
|
|
|
appointmentRatingViewModel.appointmentRatedList.last.appointmentNo!,
|
|
|
|
|
appointmentRatingViewModel.appointmentRatedList.last.projectID!,
|
|
|
|
|
onSuccess: ((response) {
|
|
|
|
|
appointmentRatingViewModel.setClinicOrDoctor(false);
|
|
|
|
|
appointmentRatingViewModel.setTitle(LocaleKeys.rateDoctor.tr(context: context));
|
|
|
|
|
appointmentRatingViewModel.setSubTitle(LocaleKeys.howWasYourLastVisitWithDoctor.tr(context: context));
|
|
|
|
|
openLastRating();
|
|
|
|
|
appState.setRatedVisible(true);
|
|
|
|
|
}),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
// appointmentRatingViewModel.getLastRatingAppointment(
|
|
|
|
|
// onSuccess: (response) {
|
|
|
|
|
// if (appointmentRatingViewModel.appointmentRatedList.isNotEmpty) {
|
|
|
|
|
// appointmentRatingViewModel.getAppointmentDetails(
|
|
|
|
|
// appointmentRatingViewModel.appointmentRatedList.last.appointmentNo!,
|
|
|
|
|
// appointmentRatingViewModel.appointmentRatedList.last.projectID!,
|
|
|
|
|
// onSuccess: ((response) {
|
|
|
|
|
// appointmentRatingViewModel.setClinicOrDoctor(false);
|
|
|
|
|
// appointmentRatingViewModel.setTitle(LocaleKeys.rateDoctor.tr(context: context));
|
|
|
|
|
// appointmentRatingViewModel.setSubTitle(LocaleKeys.howWasYourLastVisitWithDoctor.tr(context: context));
|
|
|
|
|
// openLastRating();
|
|
|
|
|
// appState.setRatedVisible(true);
|
|
|
|
|
// }),
|
|
|
|
|
// );
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
// );
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
|
@ -1394,7 +1400,7 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
|
|
|
|
|
|
void showQuickLogin(BuildContext context) {
|
|
|
|
|
showCommonBottomSheetWithoutHeight(
|
|
|
|
|
context,
|
|
|
|
|
getIt<NavigationService>().navigatorKey.currentContext!,
|
|
|
|
|
// title: "",
|
|
|
|
|
isCloseButtonVisible: false,
|
|
|
|
|
child: StatefulBuilder(
|
|
|
|
|
|