diff --git a/lib/config/config.dart b/lib/config/config.dart index f223ab40..d025d082 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -23,15 +23,15 @@ 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 = 'https://hmgwebservices.com/'; +var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'http://10.20.200.111:1010/'; // 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/'; + // var BASE_URL = 'http://10.200.204.42/'; // Pharmacy UAT URLs // var BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; @@ -354,7 +354,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.4; +var VERSION_ID = 16.5; var SETUP_ID = '91877'; var LANGUAGE = 2; // var PATIENT_OUT_SA = 0; @@ -611,9 +611,9 @@ var GET_DENTAL_APPOINTMENT_INVOICE = "Services/Patients.svc/REST/HIS_eInvoiceFor var SEND_DENTAL_APPOINTMENT_INVOICE_EMAIL = "Services/Notifications.svc/REST/SendInvoiceForDental"; -var GET_TAMARA_PLAN = 'https://mdlaboratories.com/tamara/Home/GetInstallments'; +var GET_TAMARA_PLAN = 'https://mdlaboratories.com/tamaralive/Home/GetInstallments'; -var GET_TAMARA_PAYMENT_STATUS = 'https://mdlaboratories.com/tamara/api/OnlineTamara/order_status?orderid='; +var GET_TAMARA_PAYMENT_STATUS = 'https://mdlaboratories.com/tamaralive/api/OnlineTamara/order_status?orderid='; var UPDATE_TAMARA_STATUS = 'Services/PayFort_Serv.svc/REST/Tamara_UpdateRequestStatus'; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index b9a5a5ec..a962e009 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1994,5 +1994,7 @@ const Map localizedValues = { "addToWaitingList": {"en": "Add to waiting list", "ar": "اضافه الى قائمة الانتظار"}, "searchClinic": {"en": "Search Clinic", "ar": "بحث العيادة"}, "selectBranch":{"en":"Select Branch", "ar":"اختر الفرع"}, - "searchByBranch":{"en":"Search By Branch Name", "ar":"البحث عن طريق اسم الفرع"} + "searchByBranch":{"en":"Search By Branch Name", "ar":"البحث عن طريق اسم الفرع"}, + "hospitalNavigationTitle": {"en": "Hospital", "ar": "الملاحة"}, + "hospitalNavigationSubtitle": {"en": "Navigation", "ar": "المستشفى"}, }; diff --git a/lib/core/service/medical/medical_service.dart b/lib/core/service/medical/medical_service.dart index a77729c9..445f5ab6 100644 --- a/lib/core/service/medical/medical_service.dart +++ b/lib/core/service/medical/medical_service.dart @@ -72,11 +72,15 @@ class MedicalService extends BaseService { dynamic localRes; await baseAppClient.post(GET_DOCTOR_FREE_SLOTS, onSuccess: (response, statusCode) async { localRes = response; + freeSlots.clear(); + localRes['FreeTimeSlots'].forEach((item) => freeSlots.add(item)); }, onFailure: (String error, int statusCode) { - throw error; + hasError = true; + super.error = error; + // throw error; }, body: request); - freeSlots.clear(); - localRes['FreeTimeSlots'].forEach((item) => freeSlots.add(item)); + // freeSlots.clear(); + // localRes['FreeTimeSlots'].forEach((item) => freeSlots.add(item)); // localRes['List_DoctorWorkingHoursTable'].forEach((item) => // {doctorScheduleResponse.add(DoctorScheduleResponse.fromJson(item))}); } diff --git a/lib/core/viewModels/project_view_model.dart b/lib/core/viewModels/project_view_model.dart index d4707aa9..57362d6f 100644 --- a/lib/core/viewModels/project_view_model.dart +++ b/lib/core/viewModels/project_view_model.dart @@ -48,7 +48,7 @@ class ProjectViewModel extends BaseViewModel { GetAdmissionInfoResponseModel getAdmissionInfoResponseModel = GetAdmissionInfoResponseModel(); GetAdmissionRequestInfoResponseModel getAdmissionRequestInfoResponseModel = GetAdmissionRequestInfoResponseModel(); - bool isIndoorNavigationEnabled = false; + bool isIndoorNavigationEnabled = true; int waitingAppointmentProjectID = 0; DoctorList? waitingAppointmentDoctor; diff --git a/lib/pages/MyAppointments/widgets/AppointmentActions.dart b/lib/pages/MyAppointments/widgets/AppointmentActions.dart index fcb698b3..e7e7b1d0 100644 --- a/lib/pages/MyAppointments/widgets/AppointmentActions.dart +++ b/lib/pages/MyAppointments/widgets/AppointmentActions.dart @@ -191,8 +191,8 @@ class _AppointmentActionsState extends State { initPenguinSDK() async { NavigationClinicDetails data = NavigationClinicDetails(); - // data.clinicId = widget.appo.clinicID.toString(); - data.clinicId = "49"; + data.clinicId = widget.appo.clinicID.toString(); + // data.clinicId = "49"; data.patientId = widget.appo.patientID.toString(); data.projectId = widget.appo.projectID.toString(); final bool permited = await AppPermission.askPenguinPermissions(); diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart index 2c7f89fc..6ab67f12 100644 --- a/lib/pages/ToDoList/ToDo.dart +++ b/lib/pages/ToDoList/ToDo.dart @@ -378,12 +378,12 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { ), ), ), - if (projectViewModel.isIndoorNavigationEnabled) + if (projectViewModel.isIndoorNavigationEnabled && projectViewModel.havePrivilege(107) && appoList[index].projectID == 130) InkWell( onTap: () { NavigationClinicDetails data = NavigationClinicDetails(); - // data.clinicId = appoList[index].clinicID.toString(); - data.clinicId = "46"; + data.clinicId = appoList[index].clinicID.toString(); + // data.clinicId = "46"; data.patientId = appoList[index].patientID.toString(); data.projectId = appoList[index].projectID.toString(); initPenguinSDK(data); diff --git a/lib/pages/landing/fragments/home_page_fragment2.dart b/lib/pages/landing/fragments/home_page_fragment2.dart index 7711b4ff..a1e12240 100644 --- a/lib/pages/landing/fragments/home_page_fragment2.dart +++ b/lib/pages/landing/fragments/home_page_fragment2.dart @@ -54,7 +54,7 @@ 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, "Hospital", "Navigation", "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)) : hmgServices.add(HmgServices(2, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin)); hmgServices.add(HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin)); @@ -346,7 +346,7 @@ 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.havePrivilege(107) : false); + return ServicesView(hmgServices[index], index, true, projectViewModel, isLocked: (hmgServices[index].action == 2 && projectViewModel.isIndoorNavigationEnabled) ? !projectViewModel.havePrivilege(107) : false); }, ), ), diff --git a/lib/pages/landing/widgets/services_view.dart b/lib/pages/landing/widgets/services_view.dart index c69f772c..e98855aa 100644 --- a/lib/pages/landing/widgets/services_view.dart +++ b/lib/pages/landing/widgets/services_view.dart @@ -195,6 +195,7 @@ class ServicesView extends StatelessWidget { showDialog( context: context, builder: (cxt) => LocationSelectionDialog( + isArabic: projectViewModel.isArabic, data: projectsListLocal, selectedIndex: _selectedHospitalIndex, onValueSelected: (index) { @@ -215,7 +216,7 @@ class ServicesView extends StatelessWidget { Permission.bluetoothScan, Permission.activityRecognition, ].request().whenComplete(() { - PenguinMethodChannel.launch("penguin", projectViewModel.isArabic ? "ar" : "en", "1231755"); + PenguinMethodChannel.launch("penguin", projectViewModel.isArabic ? "ar" : "en", projectViewModel.authenticatedUserObject.user.patientID.toString()); }); } // } diff --git a/lib/uitl/penguin_method_channel.dart b/lib/uitl/penguin_method_channel.dart index 12421f5e..f2d51573 100644 --- a/lib/uitl/penguin_method_channel.dart +++ b/lib/uitl/penguin_method_channel.dart @@ -17,7 +17,8 @@ class PenguinMethodChannel { "dataServiceName": "api", "positionServiceName": "pe", "clientID": "HMG", - "username": "test", + // "username": "test", + "username": username, "isSimulationModeEnabled": false, "isShowUserName": false, "isUpdateUserLocationSmoothly": true, diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 87bb5f6f..db5033e2 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2983,6 +2983,9 @@ class TranslationBase { String get continueOrbookNew => localizedValues["continueOrbookNew"][locale.languageCode]; String get newAppointment => localizedValues["newAppointment"][locale.languageCode]; String get proceedPackage => localizedValues["proceedPackage"][locale.languageCode]; + + String get hospitalNavigationTitle => localizedValues["hospitalNavigationTitle"][locale.languageCode]; + String get hospitalNavigationSubtitle => localizedValues["hospitalNavigationSubtitle"][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/uitl/utils.dart b/lib/uitl/utils.dart index 01779851..1529d605 100644 --- a/lib/uitl/utils.dart +++ b/lib/uitl/utils.dart @@ -68,12 +68,12 @@ class Utils { static var navigationProjectsList = [ { "Desciption": "Sahafa Hospital", - "DesciptionN": null, + "DesciptionN": "مستشفى الصحافة", "ID": 130, "LegalName": "Sahafa Hospital", "LegalNameN": "مستشفى الصحافة", "Name": "Sahafa Hospital", - "NameN": null, + "NameN": "مستشفى الصحافة", "PhoneNumber": "+966115222222", "SetupID": "013311", "DistanceInKilometers": 0, diff --git a/lib/widgets/dialogs/location_selection_dialog.dart b/lib/widgets/dialogs/location_selection_dialog.dart index 9181615f..9ffb2635 100644 --- a/lib/widgets/dialogs/location_selection_dialog.dart +++ b/lib/widgets/dialogs/location_selection_dialog.dart @@ -10,12 +10,9 @@ class LocationSelectionDialog extends StatelessWidget { final List data; final Function(int)? onValueSelected; final int? selectedIndex; + final bool isArabic; - const LocationSelectionDialog( - {super.key, - required this.data, - this.onValueSelected, - this.selectedIndex}); + const LocationSelectionDialog({super.key, required this.data, this.onValueSelected, this.selectedIndex, required this.isArabic}); @override Widget build(BuildContext context) { @@ -25,6 +22,7 @@ class LocationSelectionDialog extends StatelessWidget { borderRadius: BorderRadius.circular(8), ), child: LocationDialogBody( + isArabic: isArabic, data: data, onValueSelected: onValueSelected, selectedIndex: selectedIndex, @@ -36,12 +34,9 @@ class LocationDialogBody extends StatefulWidget { final List data; final Function(int)? onValueSelected; final int? selectedIndex; + final bool isArabic; - const LocationDialogBody( - {super.key, - required this.data, - this.onValueSelected, - this.selectedIndex}); + const LocationDialogBody({super.key, required this.data, this.onValueSelected, this.selectedIndex, required this.isArabic}); @override State createState() => _LocationDialogBodyState(); @@ -55,6 +50,7 @@ class _LocationDialogBodyState extends State { Widget build(BuildContext context) { return isListVisible ? LocationListExpandedBody( + isArabic: widget.isArabic, data: widget.data, onItemClick: (data) { if (data.isEmpty) return; @@ -78,22 +74,19 @@ class _LocationDialogBodyState extends State { isListVisible = true; }); }, - selectedText: currentlySelected == -1 - ? "" - : widget.data[currentlySelected].name ?? ""); + selectedText: currentlySelected == -1 ? "" : widget.data[currentlySelected].name ?? ""); } } class LocationListExpandedBody extends StatefulWidget { final List data; final Function(String) onItemClick; + final bool isArabic; - const LocationListExpandedBody( - {super.key, required this.data, required this.onItemClick}); + const LocationListExpandedBody({super.key, required this.data, required this.onItemClick, required this.isArabic}); @override - State createState() => - _LocationListExpandedBodyState(); + State createState() => _LocationListExpandedBodyState(); } class _LocationListExpandedBodyState extends State { @@ -117,17 +110,16 @@ class _LocationListExpandedBodyState extends State { mainAxisSize: MainAxisSize.min, children: [ SelectBranchHeader(), - SizedBox(height: 8,), + SizedBox( + height: 8, + ), TextField( controller: controller, onChanged: (v) { tempListData.clear(); if (v.length > 0) { for (int i = 0; i < widget.data.length; i++) { - if (widget.data[i].name - ?.toLowerCase() - .contains(v.toLowerCase()) == - true) { + if (widget.data[i].name?.toLowerCase().contains(v.toLowerCase()) == true) { tempListData.add(widget.data[i]); } } @@ -140,7 +132,7 @@ class _LocationListExpandedBodyState extends State { hintStyle: TextStyle(fontSize: 12), hintText: TranslationBase.of(context).searchByBranch, suffixIcon: Icon(Icons.search), - contentPadding: EdgeInsets.symmetric(vertical: 9,horizontal: 14), + contentPadding: EdgeInsets.symmetric(vertical: 9, horizontal: 14), border: OutlineInputBorder( borderRadius: BorderRadius.circular(8.0), borderSide: BorderSide( @@ -163,16 +155,11 @@ class _LocationListExpandedBodyState extends State { height: 24, child: InkWell( onTap: () { - widget - .onItemClick(tempListData[index].name ?? ""); + widget.onItemClick(tempListData[index].name ?? ""); }, child: Text( - "${tempListData[index].name ?? ""} ( ${tempListData[index].distanceInKilometers} km )", - style: TextStyle( - fontSize: 14, - fontWeight: FontWeight.w600, - color: Colors.black, - letterSpacing: -0.96), + "${widget.isArabic ? tempListData[index].nameN : tempListData[index].name ?? ""}", + style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Colors.black, letterSpacing: -0.96), ), ), ), @@ -190,11 +177,7 @@ class LocationListWrapBody extends StatelessWidget { final VoidCallback? onTextBoxClicked; final String selectedText; - const LocationListWrapBody( - {super.key, - this.onConfirmClicked, - this.onTextBoxClicked, - required this.selectedText}); + const LocationListWrapBody({super.key, this.onConfirmClicked, this.onTextBoxClicked, required this.selectedText}); @override Widget build(BuildContext context) { @@ -203,7 +186,7 @@ class LocationListWrapBody extends StatelessWidget { child: Column( mainAxisSize: MainAxisSize.min, children: [ - SelectBranchHeader(), + SelectBranchHeader(), SizedBox( height: 24, ), @@ -213,21 +196,13 @@ class LocationListWrapBody extends StatelessWidget { }, title: Text( TranslationBase.of(context).selectBranch, - style: TextStyle( - fontSize: 14, - fontWeight: FontWeight.w600, - color: Colors.black, - letterSpacing: -0.96), + style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Colors.black, letterSpacing: -0.96), ), subtitle: selectedText.isEmpty ? null : Text( selectedText, - style: TextStyle( - fontSize: 16, - fontWeight: FontWeight.w400, - color: Colors.black, - letterSpacing: -0.96), + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w400, color: Colors.black, letterSpacing: -0.96), ), trailing: Icon( Icons.arrow_drop_down_outlined, @@ -262,19 +237,15 @@ class LocationListWrapBody extends StatelessWidget { } } -class SelectBranchHeader extends StatelessWidget{ +class SelectBranchHeader extends StatelessWidget { @override Widget build(BuildContext context) { - return Row( + return Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( TranslationBase.of(context).selectBranch, - style: TextStyle( - fontSize: 24, - fontWeight: FontWeight.w600, - color: Colors.black, - letterSpacing: -0.96), + style: TextStyle(fontSize: 24, fontWeight: FontWeight.w600, color: Colors.black, letterSpacing: -0.96), ), InkWell( onTap: () { diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index 6f61ac8a..ee68f743 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 diff --git a/pubspec.yaml b/pubspec.yaml index 02c894e1..475a72f2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: diplomaticquarterapp description: A new Flutter application. -version: 4.5.065+4050065 +version: 4.5.067+4050067 environment: sdk: ">=3.0.0 <3.13.0" @@ -107,7 +107,7 @@ dependencies: flutter_svg: ^2.0.8 #Calendar Events - manage_calendar_events: ^2.0.3 + manage_calendar_events: 2.0.3 #InAppBrowser flutter_inappwebview: ^6.1.5