diff --git a/lib/config/config.dart b/lib/config/config.dart index 1cbc4ee3..648d52ae 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -20,17 +20,17 @@ var PACKAGES_SHOPPING_CART = '/api/shopping_cart_items'; 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 = 'http://10.50.100.198:4422/'; -var BASE_URL = 'https://uat.hmgwebservices.com/'; +// var BASE_URL = 'http://10.50.100.198:2018/'; +// var BASE_URL = 'http://10.50.100.198:4422/'; +// var BASE_URL = 'https://uat.hmgwebservices.com/'; // var BASE_URL = 'https://hmgwebservices.com/'; -// var BASE_URL = 'http://10.20.200.111:1010/'; +// var BASE_URL = 'http://10.20.200.111:1010/'; // 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/'; -// var BASE_URL = 'https://webservices.hmg.com/'; +var BASE_URL = 'https://webservices.hmg.com/'; // var BASE_URL = 'http://10.50.100.198:4422/'; @@ -355,7 +355,7 @@ var CAN_PAY_FOR_FOR_WALKIN_APPOINTMENT = 'Services/Doctors.svc/REST/CanPayForWal var CHANNEL = 3; var GENERAL_ID = 'Cs2020@2016\$2958'; var IP_ADDRESS = '10.20.10.20'; -var VERSION_ID = 16.8; +var VERSION_ID = 16.9; var SETUP_ID = '91877'; var LANGUAGE = 2; // var PATIENT_OUT_SA = 0; @@ -698,10 +698,10 @@ var GET_PROJECT_FROM_NFC = 'Services/OUTPs.svc/Rest/GetProjectByNFC'; //PAYFORT var getPayFortProjectDetails = "Services/PayFort_Serv.svc/REST/GetPayFortProjectDetails"; var addPayFortApplePayResponse = "Services/PayFort_Serv.svc/REST/AddResponse"; -// var payFortEnvironment = FortEnvironment.production; -// var applePayMerchantId = "merchant.com.hmgwebservices"; -var payFortEnvironment = FortEnvironment.test; -var applePayMerchantId = "merchant.com.hmgwebservices.uat"; +var payFortEnvironment = FortEnvironment.production; +var applePayMerchantId = "merchant.com.hmgwebservices"; +// var payFortEnvironment = FortEnvironment.test; +// var applePayMerchantId = "merchant.com.hmgwebservices.uat"; class AppGlobal { static var context; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 87f17bbf..5912d123 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -2116,4 +2116,5 @@ const Map localizedValues = { "ar": "لقد قرأت وفهمت وأوافق على الشروط والأحكام المبينة أعلاه وأوافق على الإلتزام بالمتطلبات المذكورة تجاه المستشفى ، لقد قرأت التفاصيل المبينة في نموذج التسجيل الخاص بي وأقر بأنها صحيحة. أنا الموقع ادناه أقر بأنه أتيحت لي الفرصة لطرح الأسئلة والتحفظات بشأن هذه الموافقة، وتلقيت إجابات مرضية على جميع إستفساراتي." }, + "incorrectNationalId": {"en": "Incorrect National ID", "ar": "رقم الهوية غير صحيحة"}, }; diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index 37a3a722..ac2c60ca 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -184,7 +184,7 @@ class BaseAppClient { // body['IdentificationNo'] = 1023854217; // body['MobileNo'] = "531940021"; //0560717232 - // body['PatientID'] = 4768303; //4609100 + // body['PatientID'] = 4769791; //4609100 // body['TokenID'] = "@dm!n"; // Patient ID: 3027574 @@ -199,9 +199,9 @@ class BaseAppClient { // } // if (AppGlobal.isNetworkDebugEnabled) { - print("URL : $url"); + debugPrint("URL : $url"); final jsonBody = json.encode(body); - print(jsonBody); + debugPrint(jsonBody); // } if (await Utils.checkConnection(bypassConnectionCheck: bypassConnectionCheck)) { diff --git a/lib/models/Appointments/DoctorListResponse.dart b/lib/models/Appointments/DoctorListResponse.dart index 93cb81e5..c7ecdfcd 100644 --- a/lib/models/Appointments/DoctorListResponse.dart +++ b/lib/models/Appointments/DoctorListResponse.dart @@ -204,8 +204,10 @@ class PatientDoctorAppointmentList { String? filterName = ""; String? distanceInKMs = ""; List? patientDoctorAppointmentList = []; + String? projectTopName = ""; + String? projectBottomName = ""; - PatientDoctorAppointmentList({this.filterName, this.distanceInKMs, DoctorList? patientDoctorAppointment}) { + PatientDoctorAppointmentList({this.filterName, this.distanceInKMs, this.projectTopName, this.projectBottomName, DoctorList? patientDoctorAppointment}) { patientDoctorAppointmentList!.add(patientDoctorAppointment!); } } diff --git a/lib/models/hmg_services.dart b/lib/models/hmg_services.dart index c4163bd4..793800fa 100644 --- a/lib/models/hmg_services.dart +++ b/lib/models/hmg_services.dart @@ -4,6 +4,7 @@ class HmgServices { String subTitle; String icon; bool isLogin; + bool isLocked; - HmgServices(this.action, this.title, this.subTitle, this.icon,this.isLogin); + HmgServices(this.action, this.title, this.subTitle, this.icon, this.isLogin, {this.isLocked = false}); } diff --git a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bariatrics-screen.dart b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bariatrics-screen.dart index 66c50e5b..f3b88a60 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bariatrics-screen.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bariatrics-screen.dart @@ -190,7 +190,7 @@ class _BariatricsPageState extends State { } Future navigateToSearchResults(context, List docList, List patientDoctorAppointmentListHospital) async { - Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital))) + Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, isDoctorSearchResult: false,))) .then((value) { setState(() { // dropdownValue = null; diff --git a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/result_page.dart b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/result_page.dart index 95bfdf0a..26222569 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/result_page.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/result_page.dart @@ -188,7 +188,7 @@ class _ResultPageState extends State { } Future navigateToSearchResults(context, List docList, List patientDoctorAppointmentListHospital) async { - Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital))) + Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, isDoctorSearchResult: false,))) .then((value) { setState(() { // dropdownValue = null; diff --git a/lib/pages/AlHabibMedicalService/health_calculator/bmr_calculator/bmr_result_page.dart b/lib/pages/AlHabibMedicalService/health_calculator/bmr_calculator/bmr_result_page.dart index 33ff10b4..79060a2d 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/bmr_calculator/bmr_result_page.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/bmr_calculator/bmr_result_page.dart @@ -154,7 +154,7 @@ class BmrResultPage extends StatelessWidget { } }); - Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital))); + Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital, isDoctorSearchResult: false,))); } } }).catchError((err) { diff --git a/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat_result_page.dart b/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat_result_page.dart index 94e7796c..79014ba2 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat_result_page.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat_result_page.dart @@ -150,7 +150,7 @@ class FatResult extends StatelessWidget { } }); - Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital))); + Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital, isDoctorSearchResult: false,))); } } }).catchError((err) { diff --git a/lib/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_result_page.dart b/lib/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_result_page.dart index ac67f1d8..5844b006 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_result_page.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_result_page.dart @@ -155,7 +155,7 @@ class CalorieResultPage extends StatelessWidget { } }); - Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital))); + Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital, isDoctorSearchResult: false,))); } } }).catchError((err) { diff --git a/lib/pages/AlHabibMedicalService/health_calculator/carbs/carbs_result_page.dart b/lib/pages/AlHabibMedicalService/health_calculator/carbs/carbs_result_page.dart index 99ab9ecb..29257ccc 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/carbs/carbs_result_page.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/carbs/carbs_result_page.dart @@ -176,7 +176,7 @@ class CarbsResult extends StatelessWidget { } }); - Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital))); + Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital, isDoctorSearchResult: false,))); } } }).catchError((err) { diff --git a/lib/pages/AlHabibMedicalService/health_calculator/delivery_due/delivery_due_result_page.dart b/lib/pages/AlHabibMedicalService/health_calculator/delivery_due/delivery_due_result_page.dart index e1364e73..84dc5e5e 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/delivery_due/delivery_due_result_page.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/delivery_due/delivery_due_result_page.dart @@ -176,7 +176,7 @@ class DeliveryDueResult extends StatelessWidget { } }); - Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital))); + Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital, isDoctorSearchResult: false,))); } } }).catchError((err) { diff --git a/lib/pages/AlHabibMedicalService/health_calculator/ideal_body/ideal_body_result_page.dart b/lib/pages/AlHabibMedicalService/health_calculator/ideal_body/ideal_body_result_page.dart index 40dae7c9..1fa9d2a9 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/ideal_body/ideal_body_result_page.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/ideal_body/ideal_body_result_page.dart @@ -214,7 +214,7 @@ class IdealBodyResult extends StatelessWidget { BariatricsService service = new BariatricsService(); List doctorsList = []; - List _patientDoctorAppointmentListHospital =[]; + List _patientDoctorAppointmentListHospital = []; service.getCalculationDoctors(calculationID: 4).then((res) { GifLoaderDialogUtils.hideDialog(context); @@ -253,7 +253,15 @@ class IdealBodyResult extends StatelessWidget { } }); - Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital))); + Navigator.push( + context, + FadePage( + page: SearchResults( + isLiveCareAppointment: false, + doctorsList: doctorsList, + patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital, + isDoctorSearchResult: false, + ))); } } }).catchError((err) { diff --git a/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_result_page.dart b/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_result_page.dart index 300e96fa..8af51a3d 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_result_page.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_result_page.dart @@ -186,7 +186,7 @@ class OvulationResult extends StatelessWidget { } }); - Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital))); + Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital, isDoctorSearchResult: false,))); } } }).catchError((err) { diff --git a/lib/pages/BookAppointment/DentalComplaints.dart b/lib/pages/BookAppointment/DentalComplaints.dart index 7617f23a..44546b11 100644 --- a/lib/pages/BookAppointment/DentalComplaints.dart +++ b/lib/pages/BookAppointment/DentalComplaints.dart @@ -27,7 +27,7 @@ class DentalComplaints extends StatefulWidget { Function? onSelectedMethod; bool isDoctorNameSearch; - DentalComplaints({required this.searchInfo, this.onSelectedMethod, this.isDoctorNameSearch = false}); + DentalComplaints({required this.searchInfo, this.onSelectedMethod, this.isDoctorNameSearch = false}); @override _DentalComplaintsState createState() => _DentalComplaintsState(); @@ -243,8 +243,12 @@ class _DentalComplaintsState extends State { if (doctorByHospital.length != 0) { patientDoctorAppointmentListHospital[patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element); } else { - patientDoctorAppointmentListHospital - .add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element)); + patientDoctorAppointmentListHospital.add(PatientDoctorAppointmentList( + filterName: element.projectName, + distanceInKMs: element.projectDistanceInKiloMeters.toString(), + projectTopName: element.projectTopName, + projectBottomName: element.projectBottomName, + patientDoctorAppointment: element)); } }); } else {} diff --git a/lib/pages/BookAppointment/SearchResults.dart b/lib/pages/BookAppointment/SearchResults.dart index cf2a850a..12cff848 100644 --- a/lib/pages/BookAppointment/SearchResults.dart +++ b/lib/pages/BookAppointment/SearchResults.dart @@ -17,6 +17,7 @@ class SearchResults extends StatelessWidget { bool isObGyneAppointment; bool isDoctorNameSearch; OBGyneProcedureListResponse? obGyneProcedureListResponse; + bool isDoctorSearchResult; SearchResults( {required this.doctorsList, @@ -24,6 +25,7 @@ class SearchResults extends StatelessWidget { this.isObGyneAppointment = false, this.isDoctorNameSearch = false, required this.isLiveCareAppointment, + required this.isDoctorSearchResult, this.obGyneProcedureListResponse}); @override @@ -50,7 +52,16 @@ class SearchResults extends StatelessWidget { title: (patientDoctorAppointmentListHospital[index].distanceInKMs != "0") ? patientDoctorAppointmentListHospital[index].filterName! + " - " + patientDoctorAppointmentListHospital[index].distanceInKMs! + " " + TranslationBase.of(context).km : patientDoctorAppointmentListHospital[index].filterName, + projectTitleTop: patientDoctorAppointmentListHospital[index].projectTopName, + projectTitleBottom: (patientDoctorAppointmentListHospital[index].distanceInKMs != "0") + ? patientDoctorAppointmentListHospital[index].projectBottomName.toString() + + " - " + + patientDoctorAppointmentListHospital[index].distanceInKMs! + + " " + + TranslationBase.of(context).km + : patientDoctorAppointmentListHospital[index].projectBottomName.toString(), isTitleSingleLine: false, + isDoctorSearchResult: isDoctorSearchResult, isExpand: patientDoctorAppointmentListHospital.length == 1 ? true : false, bodyWidget: ListView.separated( shrinkWrap: true, diff --git a/lib/pages/BookAppointment/components/LaserClinic.dart b/lib/pages/BookAppointment/components/LaserClinic.dart index 17c63b09..a4fc5117 100644 --- a/lib/pages/BookAppointment/components/LaserClinic.dart +++ b/lib/pages/BookAppointment/components/LaserClinic.dart @@ -211,7 +211,7 @@ class _LaserClinicState extends State with SingleTickerProviderStat List arrDistance = []; List result; int numAll; - List _patientDoctorAppointmentListHospital =[]; + List _patientDoctorAppointmentListHospital = []; DoctorsListService service = new DoctorsListService(); projectViewModel.selectedBodyPartList = _selectedBodyPartList; @@ -234,8 +234,12 @@ class _LaserClinicState extends State with SingleTickerProviderStat if (doctorByHospital.length != 0) { _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element); } else { - _patientDoctorAppointmentListHospital - .add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element)); + _patientDoctorAppointmentListHospital.add(PatientDoctorAppointmentList( + filterName: element.projectName, + distanceInKMs: element.projectDistanceInKiloMeters.toString(), + projectTopName: element.projectTopName, + projectBottomName: element.projectBottomName, + patientDoctorAppointment: element)); } }); } else {} @@ -256,7 +260,7 @@ class _LaserClinicState extends State with SingleTickerProviderStat } Future navigateToSearchResults(context, List docList, List patientDoctorAppointmentListHospital) async { - Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital))) + Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, isDoctorSearchResult: true,))) .then((value) { setState(() { // dropdownValue = null; diff --git a/lib/pages/BookAppointment/components/SearchByClinic.dart b/lib/pages/BookAppointment/components/SearchByClinic.dart index a113e81b..158f2c49 100644 --- a/lib/pages/BookAppointment/components/SearchByClinic.dart +++ b/lib/pages/BookAppointment/components/SearchByClinic.dart @@ -657,8 +657,12 @@ class _SearchByClinicState extends State { if (doctorByHospital.length != 0) { _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element); } else { - _patientDoctorAppointmentListHospital - .add(PatientDoctorAppointmentList(filterName: element.getProjectCompleteName(), distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element)); + _patientDoctorAppointmentListHospital.add(PatientDoctorAppointmentList( + filterName: element.getProjectCompleteName(), + distanceInKMs: element.projectDistanceInKiloMeters.toString(), + projectTopName: element.projectTopName ?? "", + projectBottomName: element.projectBottomName ?? "", + patientDoctorAppointment: element)); } }); } else {} @@ -707,7 +711,7 @@ class _SearchByClinicState extends State { Future navigateToSearchResults(context, List docList, List patientDoctorAppointmentListHospital) async { isProjectLoaded = false; - Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital))) + Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, isDoctorSearchResult: true,))) .then((value) { setState(() { dropdownValue = "null"; diff --git a/lib/pages/BookAppointment/components/SearchByDoctor.dart b/lib/pages/BookAppointment/components/SearchByDoctor.dart index bc17a2ca..7c093958 100644 --- a/lib/pages/BookAppointment/components/SearchByDoctor.dart +++ b/lib/pages/BookAppointment/components/SearchByDoctor.dart @@ -93,7 +93,7 @@ class _SearchByDoctorState extends State { List doctorsList = []; DoctorsListService service = new DoctorsListService(); - List _patientDoctorAppointmentListHospital =[]; + List _patientDoctorAppointmentListHospital = []; service.getDoctorsListByName(doctorNameController.text, languageID, context).then((res) { // GifLoaderDialogUtils.hideDialog(context); @@ -105,13 +105,18 @@ class _SearchByDoctorState extends State { }); doctorsList.forEach((element) { - List doctorByHospital = _patientDoctorAppointmentListHospital.where((elementClinic) => elementClinic.filterName == element.getProjectCompleteName()).toList(); + List doctorByHospital = + _patientDoctorAppointmentListHospital.where((elementClinic) => elementClinic.filterName == element.getProjectCompleteName()).toList(); if (doctorByHospital.length != 0) { _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element); } else { - _patientDoctorAppointmentListHospital - .add(PatientDoctorAppointmentList(filterName: element.getProjectCompleteName(), distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element)); + _patientDoctorAppointmentListHospital.add(PatientDoctorAppointmentList( + filterName: element.getProjectCompleteName(), + distanceInKMs: element.projectDistanceInKiloMeters.toString(), + projectTopName: element.projectTopName, + projectBottomName: element.projectBottomName, + patientDoctorAppointment: element)); } }); } else { @@ -152,7 +157,8 @@ class _SearchByDoctorState extends State { } navigateToSearchResults(context, List docList, List patientDoctorAppointmentListHospital) { - Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, isDoctorNameSearch: true, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital))); + Navigator.push(context, + FadePage(page: SearchResults(isLiveCareAppointment: false, isDoctorNameSearch: true, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, isDoctorSearchResult: true,))); } Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String? prefix, bool isEnable = true, bool hasSelection = false}) { diff --git a/lib/pages/BookAppointment/components/search_by_hospital_name.dart b/lib/pages/BookAppointment/components/search_by_hospital_name.dart index 72503cb4..5d0d9f9c 100644 --- a/lib/pages/BookAppointment/components/search_by_hospital_name.dart +++ b/lib/pages/BookAppointment/components/search_by_hospital_name.dart @@ -475,6 +475,7 @@ class _SearchByHospitalState extends State { page: SearchResults( isLiveCareAppointment: false, doctorsList: docList, + isDoctorSearchResult: false, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital))) .then((value) { diff --git a/lib/pages/BookAppointment/widgets/DentalComplaintCard.dart b/lib/pages/BookAppointment/widgets/DentalComplaintCard.dart index 765e83fa..8f18a016 100644 --- a/lib/pages/BookAppointment/widgets/DentalComplaintCard.dart +++ b/lib/pages/BookAppointment/widgets/DentalComplaintCard.dart @@ -64,7 +64,7 @@ class _DentalComplaintCardState extends State { getChiefComplaintsList() { int languageID = Provider.of(context, listen: false).isArabic ? 1 : 2; List doctorsList = []; - List _patientDoctorAppointmentListHospital =[]; + List _patientDoctorAppointmentListHospital = []; GifLoaderDialogUtils.showMyDialog(context); ClinicListService service = new ClinicListService(); @@ -88,8 +88,12 @@ class _DentalComplaintCardState extends State { if (doctorByHospital.length != 0) { _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element); } else { - _patientDoctorAppointmentListHospital - .add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element)); + _patientDoctorAppointmentListHospital.add(PatientDoctorAppointmentList( + filterName: element.projectName, + distanceInKMs: element.projectDistanceInKiloMeters.toString(), + projectTopName: element.projectTopName, + projectBottomName: element.projectBottomName, + patientDoctorAppointment: element)); } }); navigateToSearchResults(context, doctorsList, _patientDoctorAppointmentListHospital); @@ -104,6 +108,6 @@ class _DentalComplaintCardState extends State { } Future navigateToSearchResults(context, List docList, List patientDoctorAppointmentListHospital) async { - Navigator.push(context, FadePage(page: SearchResults(doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, isLiveCareAppointment: false))); + Navigator.push(context, FadePage(page: SearchResults(doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, isLiveCareAppointment: false, isDoctorSearchResult: true,))); } } diff --git a/lib/pages/ErService/EROnlineCheckIn/EROnlineCheckInBookAppointment.dart b/lib/pages/ErService/EROnlineCheckIn/EROnlineCheckInBookAppointment.dart index b5da50d5..946f6003 100644 --- a/lib/pages/ErService/EROnlineCheckIn/EROnlineCheckInBookAppointment.dart +++ b/lib/pages/ErService/EROnlineCheckIn/EROnlineCheckInBookAppointment.dart @@ -85,7 +85,7 @@ class _EROnlineCheckInBookAppointmentState extends State( value: item, - child: new Text(item.name!), + child: new Text(item.name! + " - " + item.distanceInKilometers.toString() + " " + TranslationBase.of(context).km), ); }).toList(), onChanged: (newValue) async { diff --git a/lib/pages/ErService/EROnlineCheckIn/EROnlineCheckInHome.dart b/lib/pages/ErService/EROnlineCheckIn/EROnlineCheckInHome.dart index 307eceb6..bca3a0b0 100644 --- a/lib/pages/ErService/EROnlineCheckIn/EROnlineCheckInHome.dart +++ b/lib/pages/ErService/EROnlineCheckIn/EROnlineCheckInHome.dart @@ -8,6 +8,7 @@ import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/location_util.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; @@ -31,8 +32,11 @@ class _EROnlineCheckInHomePageState extends State with bool _supportsNFC = false; bool isPatientArrived = false; + late LocationUtils locationUtils; + @override void initState() { + locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context); WidgetsBinding.instance.addPostFrameCallback((_) { // checkIfPatientHasArrived(); if (projectViewModel.isLogin) checkPatientERAdvanceBalance(); @@ -436,6 +440,7 @@ class _EROnlineCheckInHomePageState extends State with } void checkPatientERAdvanceBalance() { + locationUtils.getCurrentLocation(); GifLoaderDialogUtils.showMyDialog(context); ClinicListService ancillaryOrdersService = new ClinicListService(); ancillaryOrdersService.checkPatientERAdvanceBalance(10).then((response) { diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart index c225987c..bd860008 100644 --- a/lib/pages/ToDoList/ToDo.dart +++ b/lib/pages/ToDoList/ToDo.dart @@ -902,6 +902,7 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { isLiveCareAppointment: false, isObGyneAppointment: true, doctorsList: docList, + isDoctorSearchResult: false, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, obGyneProcedureListResponse: obGyneProcedureListResponse))); } diff --git a/lib/pages/landing/fragments/home_page_fragment2.dart b/lib/pages/landing/fragments/home_page_fragment2.dart index d0c32fca..d01554ea 100644 --- a/lib/pages/landing/fragments/home_page_fragment2.dart +++ b/lib/pages/landing/fragments/home_page_fragment2.dart @@ -57,10 +57,12 @@ class _HomePageFragment2State extends State { hmgServices.add(HmgServices(1, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin)); projectViewModel.isIndoorNavigationEnabled - ? hmgServices.add(HmgServices(2, TranslationBase.of(context).hospitalNavigationTitle, TranslationBase.of(context).hospitalNavigationSubtitle, "assets/images/new/indoor_nav_home.svg", isLogin)) + ? hmgServices.add(HmgServices(2, TranslationBase.of(context).hospitalNavigationTitle, TranslationBase.of(context).hospitalNavigationSubtitle, "assets/images/new/indoor_nav_home.svg", isLogin, + isLocked: !projectViewModel.havePrivilege(107))) : hmgServices.add(HmgServices(2, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin)); - hmgServices.add(HmgServices(9, TranslationBase.of(context).emergency, TranslationBase.of(context).checkinOptions, "assets/images/new/emergency.svg", isLogin)); + hmgServices.add( + HmgServices(9, TranslationBase.of(context).emergency, TranslationBase.of(context).checkinOptions, "assets/images/new/emergency.svg", isLogin, isLocked: !projectViewModel.havePrivilege(108))); hmgServices.add(HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin)); hmgServices.add(HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin)); hmgServices.add(HmgServices(5, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", isLogin)); @@ -76,10 +78,12 @@ class _HomePageFragment2State extends State { // hmgServices.add(new HmgServices(2, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", isLogin)); projectViewModel.isIndoorNavigationEnabled - ? hmgServices.add(HmgServices(2, TranslationBase.of(context).hospitalNavigationTitle, TranslationBase.of(context).hospitalNavigationSubtitle, "assets/images/new/indoor_nav_home.svg", isLogin)) + ? hmgServices.add(HmgServices(2, TranslationBase.of(context).hospitalNavigationTitle, TranslationBase.of(context).hospitalNavigationSubtitle, "assets/images/new/indoor_nav_home.svg", isLogin, + isLocked: !projectViewModel.havePrivilege(107))) : hmgServices.add(HmgServices(2, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin)); - hmgServices.add(new HmgServices(9, TranslationBase.of(context).emergency, TranslationBase.of(context).checkinOptions, "assets/images/new/emergency.svg", isLogin)); + hmgServices.add(new HmgServices(9, TranslationBase.of(context).emergency, TranslationBase.of(context).checkinOptions, "assets/images/new/emergency.svg", isLogin, + isLocked: !projectViewModel.havePrivilege(108))); hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin)); hmgServices.add(new HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin)); @@ -358,8 +362,9 @@ class _HomePageFragment2State extends State { itemCount: hmgServices.length, padding: EdgeInsets.zero, itemBuilder: (BuildContext context, int index) { - return ServicesView(hmgServices[index], index, true, projectViewModel, - isLocked: (hmgServices[index].action == 2 && projectViewModel.isIndoorNavigationEnabled) ? !projectViewModel.havePrivilege(107) : false); + // return ServicesView(hmgServices[index], index, true, projectViewModel, + // isLocked: (hmgServices[index].action == 2 && projectViewModel.isIndoorNavigationEnabled) ? !projectViewModel.havePrivilege(107) : false); + return ServicesView(hmgServices[index], index, true, projectViewModel, isLocked: hmgServices[index].isLocked); }, ), ), diff --git a/lib/pages/landing/widgets/services_view.dart b/lib/pages/landing/widgets/services_view.dart index a98da010..b336887e 100644 --- a/lib/pages/landing/widgets/services_view.dart +++ b/lib/pages/landing/widgets/services_view.dart @@ -258,7 +258,7 @@ class ServicesView extends StatelessWidget { Navigator.push(context, FadePage(page: InPatientServicesHome())); locator().hmgServices.logServiceName('find us reach us'); } else if (hmgServices.action == 9) { - Navigator.push(context, FadePage(page: EROnlineCheckInHomePage())); + if (!isLocked) Navigator.push(context, FadePage(page: EROnlineCheckInHomePage())); locator().hmgServices.logServiceName('ER Online CheckIn'); } } diff --git a/lib/pages/livecare/widgets/clinic_list.dart b/lib/pages/livecare/widgets/clinic_list.dart index 76d70885..0f98deb6 100644 --- a/lib/pages/livecare/widgets/clinic_list.dart +++ b/lib/pages/livecare/widgets/clinic_list.dart @@ -954,7 +954,8 @@ class _clinic_listState extends State { } Future navigateToSearchResults(context, List docList, List patientDoctorAppointmentListHospital) async { - Navigator.push(context, FadePage(page: SearchResults(doctorsList: docList, isLiveCareAppointment: false, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital))); + Navigator.push(context, + FadePage(page: SearchResults(doctorsList: docList, isLiveCareAppointment: false, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, isDoctorSearchResult: false))); } updateSelectedIndex(PatientERGetClinicsList patientERGetClinicsList) { diff --git a/lib/pages/login/login.dart b/lib/pages/login/login.dart index 14ea9ab3..beb047f5 100644 --- a/lib/pages/login/login.dart +++ b/lib/pages/login/login.dart @@ -151,7 +151,7 @@ class _Login extends State { TranslationBase.of(context).login, () { if (isButtonDisabled) { - AppToast.showErrorToast(message: "National ID can only contain numbers"); + AppToast.showErrorToast(message: TranslationBase.of(context).incorrectNationalId, localContext: context); } else { this.startLogin(); } diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 862eb931..0f30731b 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -3020,6 +3020,7 @@ class TranslationBase { String get ERCheckInSuccess => localizedValues["ERCheckInSuccess"][locale.languageCode]; String get generalConsentTitle => localizedValues["generalConsentTitle"][locale.languageCode]; String get generalConsentSubTitle => localizedValues["generalConsentSubTitle"][locale.languageCode]; + String get incorrectNationalId => localizedValues["incorrectNationalId"][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index 6f61ac8a..692dfd5c 100644 --- a/lib/widgets/in_app_browser/InAppBrowser.dart +++ b/lib/widgets/in_app_browser/InAppBrowser.dart @@ -38,9 +38,9 @@ class MyInAppBrowser extends InAppBrowser { static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL LIVE // static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL UAT - static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT + // static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT - // static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE + static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE // static String SERVICE_URL = 'https://uat.hmgwebservices.com/payfortforvidaplus/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL UAT VIDA PLUS @@ -343,7 +343,7 @@ class MyInAppBrowser extends InAppBrowser { form = form.replaceFirst('PROJECT_ID_VALUE', projId); form = form.replaceFirst('PAYMENT_OPTION_VALUE', paymentMethod); form = form.replaceFirst('LANG_VALUE', currentLanguageID); - form = form.replaceFirst('SERVICE_URL_VALUE', "https://mdlaboratories.com/tamara/Home/Checkout"); + form = form.replaceFirst('SERVICE_URL_VALUE', "https://mdlaboratories.com/tamaralive/Home/Checkout"); form = form.replaceFirst('INSTALLMENTS_VALUE', installments); form = form.replaceFirst('CUSTNATIONALID_VALUE', authUser.patientIdentificationNo!); diff --git a/lib/widgets/others/app_expandable_notifier.dart b/lib/widgets/others/app_expandable_notifier.dart index ef058f9b..8790d1b3 100644 --- a/lib/widgets/others/app_expandable_notifier.dart +++ b/lib/widgets/others/app_expandable_notifier.dart @@ -24,6 +24,9 @@ class AppExpandableNotifier extends StatefulWidget { var controller = new ExpandableController(); bool isTitleSingleLine; bool isDisabled = false; + bool isDoctorSearchResult = false; + final String? projectTitleTop; + final String? projectTitleBottom; AppExpandableNotifier( {this.headerWidget, @@ -35,13 +38,15 @@ class AppExpandableNotifier extends StatefulWidget { this.hasCounter = false, this.counter = "0", this.widgetColor = Colors.white, - this.isDisabled = false}); + this.isDisabled = false, + this.isDoctorSearchResult = false, + this.projectTitleTop = "", + this.projectTitleBottom = ""}); _AppExpandableNotifier createState() => _AppExpandableNotifier(); } class _AppExpandableNotifier extends State { - @override void initState() { setState(() { @@ -55,12 +60,19 @@ class _AppExpandableNotifier extends State { @override Widget build(BuildContext context) { - String _mainTitle = (widget.title ?? TranslationBase.of(context).details).trim(); - String _title = _mainTitle.contains(" ") ? (context.read().isArabic ? (_mainTitle.split(" ").length < 1 ? _mainTitle : _mainTitle.split(" ")[1]) : _mainTitle.split(" ")[0]) : _mainTitle; - // String _title = _mainTitle.split(" ")[0]; - String _subTitle = _mainTitle.replaceAll(_title, "").trim(); + String _title = ""; + String _subTitle = ""; + if (widget.isDoctorSearchResult) { + _title = widget.projectTitleTop ?? (context.read().isArabic ? (_mainTitle.split(" ").length < 1 ? _mainTitle : _mainTitle.split(" ")[1]) : _mainTitle.split(" ")[0]); + _subTitle = widget.projectTitleBottom ?? _mainTitle.replaceAll(_title, "").trim(); + } else { + _title = + _mainTitle.contains(" ") ? (context.read().isArabic ? (_mainTitle.split(" ").length < 1 ? _mainTitle : _mainTitle.split(" ")[1]) : _mainTitle.split(" ")[0]) : _mainTitle; + // String _title = _mainTitle.split(" ")[0]; + _subTitle = _mainTitle.replaceAll(_title, "").trim(); + } if (_subTitle.length < 1) { _subTitle = double.tryParse(_subTitle) != null ? _title : _title.toLowerCase().capitalizeFirstofEach; _title = ""; @@ -68,6 +80,7 @@ class _AppExpandableNotifier extends State { _subTitle = double.tryParse(_subTitle) == null ? _subTitle : _subTitle.toLowerCase().capitalizeFirstofEach; _title = double.tryParse(_subTitle) == null ? _title : _title.toLowerCase().capitalizeFirstofEach; } + return ExpandableNotifier( child: Container( color: widget.widgetColor != null ? widget.widgetColor : Colors.white, @@ -80,7 +93,7 @@ class _AppExpandableNotifier extends State { scrollOnExpand: true, scrollOnCollapse: false, child: ExpandablePanel( - // hasIcon: false, + // hasIcon: false, theme: const ExpandableThemeData( hasIcon: false, headerAlignment: ExpandablePanelHeaderAlignment.center, diff --git a/pubspec.yaml b/pubspec.yaml index c1b12fcb..53123f35 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: diplomaticquarterapp description: A new Flutter application. -version: 4.5.070+4050070 +version: 4.5.073+4050073 environment: sdk: ">=3.0.0 <3.13.0"