diff --git a/lib/config/config.dart b/lib/config/config.dart index 3b774575..0eeacbad 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -20,8 +20,8 @@ var PACKAGES_ORDERS = '/api/orders'; var PACKAGES_ORDER_HISTORY = '/api/orders/items'; var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; // var BASE_URL = 'http://10.50.100.198:2018/'; - var BASE_URL = 'https://uat.hmgwebservices.com/'; -// var BASE_URL = 'https://hmgwebservices.com/'; + // var BASE_URL = 'https://uat.hmgwebservices.com/'; +var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'https://orash.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidamergeuat.cloudsolutions.com.sa/'; diff --git a/lib/config/shared_pref_kay.dart b/lib/config/shared_pref_kay.dart index ec82db11..f92841e3 100644 --- a/lib/config/shared_pref_kay.dart +++ b/lib/config/shared_pref_kay.dart @@ -43,3 +43,4 @@ const CLINICS_LIST = 'CLINICS_LIST'; const COVID_QA_LIST = 'COVID_QA_LIST'; const IS_COVID_CONSENT_SHOWN = 'IS_COVID_CONSENT_SHOWN'; const REGISTER_INFO_DUBAI ='register-info-dubai'; +const IS_LAST_APPOINTMENT_RATE_SHOWN ='is-last-appointment-rate-shown'; diff --git a/lib/core/model/rate/appoitment_rated.dart b/lib/core/model/rate/appoitment_rated.dart index 2f0d0dae..820e36a5 100644 --- a/lib/core/model/rate/appoitment_rated.dart +++ b/lib/core/model/rate/appoitment_rated.dart @@ -26,7 +26,7 @@ class AppoitmentRated { String arrivedOn; int editedBy; String editedOn; - String doctorName; + dynamic doctorName; String doctorNameN; String statusDesc; String statusDescN; diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index 8c9118c8..81fc2d6a 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -150,7 +150,7 @@ class BaseAppClient { // body['IdentificationNo'] = 1023854217; // body['MobileNo'] = "531940021"; - // body['PatientID'] = 1048710; //3844083 + // body['PatientID'] = 3183712; //3844083 // body['TokenID'] = "@dm!n"; // Patient ID: 3027574 diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index eef268ab..0ecdc0d4 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -645,35 +645,31 @@ class _LandingPageState extends State with WidgetsBindingObserver { var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE)); if (data != null) { authService.registeredAuthenticatedUser(data, token, 0, 0).then((res) => {}); - authService.getDashboard().then((value) => { - setState(() { - if (value != null) { - notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString(); - model.setState(model.count, true, notificationCount); - sharedPref.setString(NOTIFICATION_COUNT, notificationCount); - FlutterAppIconBadge.updateBadge(num.parse(notificationCount)); - - appointmentRateViewModel - .getIsLastAppointmentRatedList() - .then((value) => { - // getToDoCount(), - // GifLoaderDialogUtils.hideDialog(AppGlobal.context), - if (appointmentRateViewModel.isHaveAppointmentNotRate) - { - Navigator.push( - context, - FadePage( - page: RateAppointmentDoctor(), - ), - ), - } - }) - .catchError((err) { - print(err); - }); - } - }), + authService.getDashboard().then((value) async { + setState(() { + if (value != null) { + notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString(); + model.setState(model.count, true, notificationCount); + sharedPref.setString(NOTIFICATION_COUNT, notificationCount); + FlutterAppIconBadge.updateBadge(num.parse(notificationCount)); + } + }); + if (await AppSharedPreferences().getBool(IS_LAST_APPOINTMENT_RATE_SHOWN) == null || !await AppSharedPreferences().getBool(IS_LAST_APPOINTMENT_RATE_SHOWN)) { + appointmentRateViewModel.getIsLastAppointmentRatedList().then((value) async { + if (appointmentRateViewModel.isHaveAppointmentNotRate) { + await AppSharedPreferences().setBool(IS_LAST_APPOINTMENT_RATE_SHOWN, true); + Navigator.push( + context, + FadePage( + page: RateAppointmentDoctor(), + ), + ); + } + }).catchError((err) { + print(err); }); + } + }); } projectViewModel.analytics.setUser(data); } else {