From c6787ff966b623a3ba18956e069ffbfaa0067381 Mon Sep 17 00:00:00 2001 From: "taha.alam" Date: Tue, 14 Jan 2025 10:42:44 +0300 Subject: [PATCH] WD: doctor list by region and sorting by name and distance --- .../diplomaticquarterapp/MainActivity.kt | 4 +- .../PenguinInPlatformBridge.kt | 104 +-- .../penguin/PenguinNavigator.kt | 194 +++--- .../penguin/PenguinView.kt | 636 +++++++++--------- android/app/src/main/res/values/strings.xml | 2 +- lib/config/localized_values.dart | 4 +- .../SearchResultsByRegion.dart | 16 +- .../components/SearchByDoctor.dart | 7 +- .../mock_doctor_response.dart | 4 +- 9 files changed, 486 insertions(+), 485 deletions(-) diff --git a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/MainActivity.kt b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/MainActivity.kt index df41e342..e03a9e8f 100644 --- a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/MainActivity.kt +++ b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/MainActivity.kt @@ -6,7 +6,7 @@ import android.util.Log import android.view.WindowManager import androidx.annotation.NonNull; import androidx.annotation.RequiresApi -import com.cloud.diplomaticquarterapp.PenguinInPlatformBridge +//import com.cloud.diplomaticquarterapp.PenguinInPlatformBridge import com.ejada.hmg.utils.* import io.flutter.embedding.android.FlutterFragmentActivity import io.flutter.embedding.engine.FlutterEngine @@ -21,7 +21,7 @@ class MainActivity: FlutterFragmentActivity() { PlatformBridge(flutterEngine, this).create() OpenTokPlatformBridge(flutterEngine, this).create() - PenguinInPlatformBridge(flutterEngine, this).create() +// PenguinInPlatformBridge(flutterEngine, this).create() // if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { // val mChannel = NotificationChannel("video_call_noti", "video call", NotificationManager.IMPORTANCE_HIGH) diff --git a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/PenguinInPlatformBridge.kt b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/PenguinInPlatformBridge.kt index 93affaef..bbbc1ab6 100644 --- a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/PenguinInPlatformBridge.kt +++ b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/PenguinInPlatformBridge.kt @@ -1,52 +1,52 @@ -package com.cloud.diplomaticquarterapp -import com.ejada.hmg.MainActivity -import android.os.Build -import android.util.Log -import androidx.annotation.RequiresApi -import com.cloud.diplomaticquarterapp.penguin.PenguinView -import io.flutter.embedding.engine.FlutterEngine -import io.flutter.plugin.common.MethodCall -import io.flutter.plugin.common.MethodChannel - -class PenguinInPlatformBridge( - private var flutterEngine: FlutterEngine, - private var mainActivity: MainActivity -) { - - private lateinit var channel: MethodChannel - - companion object { - private const val CHANNEL = "launch_penguin_ui" - } - - @RequiresApi(Build.VERSION_CODES.O) - fun create() { -// openTok = OpenTok(mainActivity, flutterEngine) - channel = MethodChannel(flutterEngine.dartExecutor.binaryMessenger, CHANNEL) - channel.setMethodCallHandler { call: MethodCall, result: MethodChannel.Result -> - when (call.method) { - "launchPenguin" -> { - print("the platform channel is being called") - val args = call.arguments as Map? - Log.d("TAG", "configureFlutterEngine: $args") - println("args") - args?.let { - PenguinView( - mainActivity, - 100, - args, - flutterEngine.dartExecutor.binaryMessenger, - activity = mainActivity, - channel - ) - } - } - - else -> { - result.notImplemented() - } - } - } - } - -} +//package com.cloud.diplomaticquarterapp +//import com.ejada.hmg.MainActivity +//import android.os.Build +//import android.util.Log +//import androidx.annotation.RequiresApi +//import com.cloud.diplomaticquarterapp.penguin.PenguinView +//import io.flutter.embedding.engine.FlutterEngine +//import io.flutter.plugin.common.MethodCall +//import io.flutter.plugin.common.MethodChannel +// +//class PenguinInPlatformBridge( +// private var flutterEngine: FlutterEngine, +// private var mainActivity: MainActivity +//) { +// +// private lateinit var channel: MethodChannel +// +// companion object { +// private const val CHANNEL = "launch_penguin_ui" +// } +// +// @RequiresApi(Build.VERSION_CODES.O) +// fun create() { +//// openTok = OpenTok(mainActivity, flutterEngine) +// channel = MethodChannel(flutterEngine.dartExecutor.binaryMessenger, CHANNEL) +// channel.setMethodCallHandler { call: MethodCall, result: MethodChannel.Result -> +// when (call.method) { +// "launchPenguin" -> { +// print("the platform channel is being called") +// val args = call.arguments as Map? +// Log.d("TAG", "configureFlutterEngine: $args") +// println("args") +// args?.let { +// PenguinView( +// mainActivity, +// 100, +// args, +// flutterEngine.dartExecutor.binaryMessenger, +// activity = mainActivity, +// channel +// ) +// } +// } +// +// else -> { +// result.notImplemented() +// } +// } +// } +// } +// +//} diff --git a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/penguin/PenguinNavigator.kt b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/penguin/PenguinNavigator.kt index 98245cc9..f0222d03 100644 --- a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/penguin/PenguinNavigator.kt +++ b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/penguin/PenguinNavigator.kt @@ -1,97 +1,97 @@ -package com.cloud.diplomaticquarterapp.penguin - -import android.content.Context -import com.google.gson.Gson -import com.peng.pennavmap.PlugAndPlaySDK -import com.peng.pennavmap.connections.ApiController -import com.peng.pennavmap.interfaces.RefIdDelegate -import com.peng.pennavmap.models.TokenModel -import com.peng.pennavmap.models.postmodels.PostToken -import com.peng.pennavmap.utils.AppSharedData -import okhttp3.ResponseBody -import retrofit2.Call -import retrofit2.Callback -import retrofit2.Response -import android.util.Log - - -class PenguinNavigator() { - - fun navigateTo(mContext: Context, refID: String, delegate: RefIdDelegate,clientID : String,clientKey : String ) { - val postToken = PostToken(clientID, clientKey) - getToken(mContext, postToken, object : RefIdDelegate { - override fun onRefByIDSuccess(PoiId: String?) { - Log.e("navigateTo", "PoiId is+++++++ $PoiId") - - PlugAndPlaySDK.navigateTo(mContext, refID, object : RefIdDelegate { - override fun onRefByIDSuccess(PoiId: String?) { - Log.e("navigateTo", "PoiId 2is+++++++ $PoiId") - - delegate.onRefByIDSuccess(refID) - - } - - override fun onGetByRefIDError(error: String?) { - delegate.onRefByIDSuccess(error) - } - - }) - - - } - - override fun onGetByRefIDError(error: String?) { - delegate.onRefByIDSuccess(error) - } - - }) - - } - - fun getToken(mContext: Context, postToken: PostToken?, apiTokenCallBack: RefIdDelegate) { - try { - // Create the API call - val purposesCall: Call = ApiController.getInstance(mContext) - .apiMethods - .getToken(postToken) - - // Enqueue the call for asynchronous execution - purposesCall.enqueue(object : Callback { - override fun onResponse( - call: Call, - response: Response - ) { - if (response.isSuccessful() && response.body() != null) { - try { - response.body()?.use { responseBody -> - val responseBodyString: String = responseBody.string() // Use `string()` to get the actual response content - if (responseBodyString.isNotEmpty()) { - val tokenModel = Gson().fromJson(responseBodyString, TokenModel::class.java) - if (tokenModel != null && tokenModel.token != null) { - AppSharedData.apiToken = tokenModel.token - apiTokenCallBack.onRefByIDSuccess(tokenModel.token) - } else { - apiTokenCallBack.onGetByRefIDError("Failed to parse token model") - } - } else { - apiTokenCallBack.onGetByRefIDError("Response body is empty") - } - } - } catch (e: Exception) { - apiTokenCallBack.onGetByRefIDError("An error occurred: ${e.message}") - } - } else { - apiTokenCallBack.onGetByRefIDError("Unsuccessful response: " + response.code()) - } - } - - override fun onFailure(call: Call, t: Throwable) { - apiTokenCallBack.onGetByRefIDError(t.message) - } - }) - } catch (error: Exception) { - apiTokenCallBack.onGetByRefIDError("Exception during API call: $error") - } - } - -} \ No newline at end of file +//package com.cloud.diplomaticquarterapp.penguin +// +//import android.content.Context +//import com.google.gson.Gson +//import com.peng.pennavmap.PlugAndPlaySDK +//import com.peng.pennavmap.connections.ApiController +//import com.peng.pennavmap.interfaces.RefIdDelegate +//import com.peng.pennavmap.models.TokenModel +//import com.peng.pennavmap.models.postmodels.PostToken +//import com.peng.pennavmap.utils.AppSharedData +//import okhttp3.ResponseBody +//import retrofit2.Call +//import retrofit2.Callback +//import retrofit2.Response +//import android.util.Log +// +// +//class PenguinNavigator() { +// +// fun navigateTo(mContext: Context, refID: String, delegate: RefIdDelegate,clientID : String,clientKey : String ) { +// val postToken = PostToken(clientID, clientKey) +// getToken(mContext, postToken, object : RefIdDelegate { +// override fun onRefByIDSuccess(PoiId: String?) { +// Log.e("navigateTo", "PoiId is+++++++ $PoiId") +// +// PlugAndPlaySDK.navigateTo(mContext, refID, object : RefIdDelegate { +// override fun onRefByIDSuccess(PoiId: String?) { +// Log.e("navigateTo", "PoiId 2is+++++++ $PoiId") +// +// delegate.onRefByIDSuccess(refID) +// +// } +// +// override fun onGetByRefIDError(error: String?) { +// delegate.onRefByIDSuccess(error) +// } +// +// }) +// +// +// } +// +// override fun onGetByRefIDError(error: String?) { +// delegate.onRefByIDSuccess(error) +// } +// +// }) +// +// } +// +// fun getToken(mContext: Context, postToken: PostToken?, apiTokenCallBack: RefIdDelegate) { +// try { +// // Create the API call +// val purposesCall: Call = ApiController.getInstance(mContext) +// .apiMethods +// .getToken(postToken) +// +// // Enqueue the call for asynchronous execution +// purposesCall.enqueue(object : Callback { +// override fun onResponse( +// call: Call, +// response: Response +// ) { +// if (response.isSuccessful() && response.body() != null) { +// try { +// response.body()?.use { responseBody -> +// val responseBodyString: String = responseBody.string() // Use `string()` to get the actual response content +// if (responseBodyString.isNotEmpty()) { +// val tokenModel = Gson().fromJson(responseBodyString, TokenModel::class.java) +// if (tokenModel != null && tokenModel.token != null) { +// AppSharedData.apiToken = tokenModel.token +// apiTokenCallBack.onRefByIDSuccess(tokenModel.token) +// } else { +// apiTokenCallBack.onGetByRefIDError("Failed to parse token model") +// } +// } else { +// apiTokenCallBack.onGetByRefIDError("Response body is empty") +// } +// } +// } catch (e: Exception) { +// apiTokenCallBack.onGetByRefIDError("An error occurred: ${e.message}") +// } +// } else { +// apiTokenCallBack.onGetByRefIDError("Unsuccessful response: " + response.code()) +// } +// } +// +// override fun onFailure(call: Call, t: Throwable) { +// apiTokenCallBack.onGetByRefIDError(t.message) +// } +// }) +// } catch (error: Exception) { +// apiTokenCallBack.onGetByRefIDError("Exception during API call: $error") +// } +// } +// +//} \ No newline at end of file diff --git a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/penguin/PenguinView.kt b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/penguin/PenguinView.kt index 9f74103f..34175bbb 100644 --- a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/penguin/PenguinView.kt +++ b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/penguin/PenguinView.kt @@ -1,321 +1,321 @@ -package com.cloud.diplomaticquarterapp.penguin - -import android.app.Activity -import android.content.Context -import android.content.Context.RECEIVER_EXPORTED -import android.content.IntentFilter -import android.graphics.Color -import android.os.Build -import android.util.Log -import android.view.View -import android.view.ViewGroup -import android.widget.RelativeLayout -import android.widget.Toast -import androidx.annotation.RequiresApi -import com.cloud.diplomaticquarterapp.PermissionManager.PermissionHelper -import com.cloud.diplomaticquarterapp.PermissionManager.PermissionManager -import com.cloud.diplomaticquarterapp.PermissionManager.PermissionResultReceiver -import com.ejada.hmg.MainActivity -import com.peng.pennavmap.PlugAndPlayConfiguration -import com.peng.pennavmap.PlugAndPlaySDK -import com.peng.pennavmap.enums.InitializationErrorType -import com.peng.pennavmap.interfaces.PenNavUIDelegate -import com.peng.pennavmap.utils.Languages -import io.flutter.plugin.common.BinaryMessenger -import io.flutter.plugin.common.MethodCall -import io.flutter.plugin.common.MethodChannel -import io.flutter.plugin.platform.PlatformView -import com.cloud.diplomaticquarterapp.penguin.PenguinNavigator -import com.peng.pennavmap.interfaces.PIEventsDelegate -import com.peng.pennavmap.interfaces.PILocationDelegate -import com.peng.pennavmap.interfaces.RefIdDelegate -import com.peng.pennavmap.models.PIReportIssue -/** - * Custom PlatformView for displaying Penguin UI components within a Flutter app. - * Implements `PlatformView` for rendering the view, `MethodChannel.MethodCallHandler` for handling method calls, - * and `PenNavUIDelegate` for handling SDK events. - */ -@RequiresApi(Build.VERSION_CODES.O) -internal class PenguinView( - context: Context, - id: Int, - val creationParams: Map, - messenger: BinaryMessenger, - activity: MainActivity, - val channel: MethodChannel -) : PlatformView, MethodChannel.MethodCallHandler, PenNavUIDelegate { - // The layout for displaying the Penguin UI - private val mapLayout: RelativeLayout = RelativeLayout(context) - private val _context: Context = context - - private val permissionResultReceiver: PermissionResultReceiver - private val permissionIntentFilter = IntentFilter("PERMISSION_RESULT_ACTION") - - private companion object { - const val PERMISSIONS_REQUEST_CODE = 1 - } - - private lateinit var permissionManager: PermissionManager - - // Reference to the main activity - private var _activity: Activity = activity - - private lateinit var mContext: Context - - lateinit var navigator: PenguinNavigator - - init { - // Set layout parameters for the mapLayout - mapLayout.layoutParams = ViewGroup.LayoutParams( - ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT - ) - - mContext = context - - - permissionResultReceiver = PermissionResultReceiver { granted -> - if (granted) { - onPermissionsGranted() - } else { - onPermissionsDenied() - } - } - if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { - mContext.registerReceiver( - permissionResultReceiver, - permissionIntentFilter, - RECEIVER_EXPORTED - ) - } else { - mContext.registerReceiver( - permissionResultReceiver, - permissionIntentFilter, - ) - } - - // Set the background color of the layout - mapLayout.setBackgroundColor(Color.RED) - - permissionManager = PermissionManager( - context = mContext, - listener = object : PermissionManager.PermissionListener { - override fun onPermissionGranted() { - // Handle permissions granted - onPermissionsGranted() - } - - override fun onPermissionDenied() { - // Handle permissions denied - onPermissionsDenied() - } - }, - requestCode = PERMISSIONS_REQUEST_CODE, - *PermissionHelper.getRequiredPermissions() - ) - - if (!permissionManager.arePermissionsGranted()) { - permissionManager.requestPermissions(_activity) - } else { - // Permissions already granted - permissionManager.listener.onPermissionGranted() - } - - - } - - private fun onPermissionsGranted() { - // Handle the actions when permissions are granted - Log.d("PermissionsResult", "onPermissionsGranted") - // Register the platform view factory for creating custom views - - // Initialize the Penguin SDK - initPenguin() - - - } - - private fun onPermissionsDenied() { - // Handle the actions when permissions are denied - Log.d("PermissionsResult", "onPermissionsDenied") - - } - - /** - * Returns the view associated with this PlatformView. - * - * @return The main view for this PlatformView. - */ - override fun getView(): View { - return mapLayout - } - - /** - * Cleans up resources associated with this PlatformView. - */ - override fun dispose() { - // Cleanup code if needed - } - - /** - * Handles method calls from Dart code. - * - * @param call The method call from Dart. - * @param result The result callback to send responses back to Dart. - */ - override fun onMethodCall(call: MethodCall, result: MethodChannel.Result) { - // Handle method calls from Dart code here - } - - /** - * Initializes the Penguin SDK with custom configuration and delegates. - */ - private fun initPenguin() { - navigator = PenguinNavigator() - // Configure the PlugAndPlaySDK - val language = when (creationParams["languageCode"] as String) { - "ar" -> Languages.ar - "en" -> Languages.en - else -> { - Languages.en - } - } - Log.d( - "TAG", - "initPenguin: ${Languages.getLanguageEnum(creationParams["languageCode"] as String)}" - ) - PlugAndPlaySDK.configuration = PlugAndPlayConfiguration.Builder() - .setBaseUrl( - creationParams["dataURL"] as String, - creationParams["positionURL"] as String - ) - .setServiceName( - creationParams["dataServiceName"] as String, - creationParams["positionServiceName"] as String - ) - .setClientData( - creationParams["clientID"] as String, - creationParams["clientKey"] as String - ) - .setUserName(creationParams["username"] as String) -// .setLanguageID(Languages.en) - .setLanguageID(language) - .setSimulationModeEnabled(creationParams["isSimulationModeEnabled"] as Boolean) - .setEnableBackButton(true) -// .setDeepLinkData("deeplink") - .setCustomizeColor("#2CA0AF") - .setDeepLinkSchema("") - .setIsEnableReportIssue(true) - .build() - - // Set location delegate to handle location updates -// PlugAndPlaySDK.setPiLocationDelegate { - // Example code to handle location updates - // Uncomment and modify as needed - // if (location.size() > 0) - // Toast.makeText(_context, "Location Info Latitude: ${location[0]}, Longitude: ${location[1]}", Toast.LENGTH_SHORT).show() -// } - - // Set events delegate for reporting issues -// PlugAndPlaySDK.setPiEventsDelegate(new PIEventsDelegate() { -// @Override -// public void onReportIssue(PIReportIssue issue) { -// Log.e("Issue Reported: ", issue.getReportType()); +//package com.cloud.diplomaticquarterapp.penguin +// +//import android.app.Activity +//import android.content.Context +//import android.content.Context.RECEIVER_EXPORTED +//import android.content.IntentFilter +//import android.graphics.Color +//import android.os.Build +//import android.util.Log +//import android.view.View +//import android.view.ViewGroup +//import android.widget.RelativeLayout +//import android.widget.Toast +//import androidx.annotation.RequiresApi +//import com.cloud.diplomaticquarterapp.PermissionManager.PermissionHelper +//import com.cloud.diplomaticquarterapp.PermissionManager.PermissionManager +//import com.cloud.diplomaticquarterapp.PermissionManager.PermissionResultReceiver +//import com.ejada.hmg.MainActivity +//import com.peng.pennavmap.PlugAndPlayConfiguration +//import com.peng.pennavmap.PlugAndPlaySDK +//import com.peng.pennavmap.enums.InitializationErrorType +//import com.peng.pennavmap.interfaces.PenNavUIDelegate +//import com.peng.pennavmap.utils.Languages +//import io.flutter.plugin.common.BinaryMessenger +//import io.flutter.plugin.common.MethodCall +//import io.flutter.plugin.common.MethodChannel +//import io.flutter.plugin.platform.PlatformView +//import com.cloud.diplomaticquarterapp.penguin.PenguinNavigator +//import com.peng.pennavmap.interfaces.PIEventsDelegate +//import com.peng.pennavmap.interfaces.PILocationDelegate +//import com.peng.pennavmap.interfaces.RefIdDelegate +//import com.peng.pennavmap.models.PIReportIssue +///** +// * Custom PlatformView for displaying Penguin UI components within a Flutter app. +// * Implements `PlatformView` for rendering the view, `MethodChannel.MethodCallHandler` for handling method calls, +// * and `PenNavUIDelegate` for handling SDK events. +// */ +//@RequiresApi(Build.VERSION_CODES.O) +//internal class PenguinView( +// context: Context, +// id: Int, +// val creationParams: Map, +// messenger: BinaryMessenger, +// activity: MainActivity, +// val channel: MethodChannel +//) : PlatformView, MethodChannel.MethodCallHandler, PenNavUIDelegate { +// // The layout for displaying the Penguin UI +// private val mapLayout: RelativeLayout = RelativeLayout(context) +// private val _context: Context = context +// +// private val permissionResultReceiver: PermissionResultReceiver +// private val permissionIntentFilter = IntentFilter("PERMISSION_RESULT_ACTION") +// +// private companion object { +// const val PERMISSIONS_REQUEST_CODE = 1 +// } +// +// private lateinit var permissionManager: PermissionManager +// +// // Reference to the main activity +// private var _activity: Activity = activity +// +// private lateinit var mContext: Context +// +// lateinit var navigator: PenguinNavigator +// +// init { +// // Set layout parameters for the mapLayout +// mapLayout.layoutParams = ViewGroup.LayoutParams( +// ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT +// ) +// +// mContext = context +// +// +// permissionResultReceiver = PermissionResultReceiver { granted -> +// if (granted) { +// onPermissionsGranted() +// } else { +// onPermissionsDenied() // } -// // Implement issue reporting logic here } -// @Override -// public void onSharedLocation(String link) { -// // Implement Shared location logic here +// } +// if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { +// mContext.registerReceiver( +// permissionResultReceiver, +// permissionIntentFilter, +// RECEIVER_EXPORTED +// ) +// } else { +// mContext.registerReceiver( +// permissionResultReceiver, +// permissionIntentFilter, +// ) +// } +// +// // Set the background color of the layout +// mapLayout.setBackgroundColor(Color.RED) +// +// permissionManager = PermissionManager( +// context = mContext, +// listener = object : PermissionManager.PermissionListener { +// override fun onPermissionGranted() { +// // Handle permissions granted +// onPermissionsGranted() +// } +// +// override fun onPermissionDenied() { +// // Handle permissions denied +// onPermissionsDenied() // } -// }) - - // Start the Penguin SDK - PlugAndPlaySDK.start(mContext, this) - } - - - /** - * Navigates to the specified reference ID. - * - * @param refID The reference ID to navigate to. - */ - fun navigateTo(refID: String) { - try { - if (refID.isBlank()) { - Log.e("navigateTo", "Invalid refID: The reference ID is blank.") - } -// referenceId = refID - navigator.navigateTo(mContext, refID,object : RefIdDelegate { - override fun onRefByIDSuccess(PoiId: String?) { - Log.e("navigateTo", "PoiId is penguin view+++++++ $PoiId") - -// channelFlutter.invokeMethod( -// PenguinMethod.navigateToPOI.name, -// "navigateTo Success" -// ) - } - - override fun onGetByRefIDError(error: String?) { - Log.e("navigateTo", "error is penguin view+++++++ $error") - -// channelFlutter.invokeMethod( -// PenguinMethod.navigateToPOI.name, -// "navigateTo Failed: Invalid refID" -// ) - } - } , creationParams["clientID"] as String, creationParams["clientKey"] as String ) - - } catch (e: Exception) { - Log.e("navigateTo", "Exception occurred during navigation: ${e.message}", e) -// channelFlutter.invokeMethod( -// PenguinMethod.navigateToPOI.name, -// "Failed: Exception - ${e.message}" +// }, +// requestCode = PERMISSIONS_REQUEST_CODE, +// *PermissionHelper.getRequiredPermissions() +// ) +// +// if (!permissionManager.arePermissionsGranted()) { +// permissionManager.requestPermissions(_activity) +// } else { +// // Permissions already granted +// permissionManager.listener.onPermissionGranted() +// } +// +// +// } +// +// private fun onPermissionsGranted() { +// // Handle the actions when permissions are granted +// Log.d("PermissionsResult", "onPermissionsGranted") +// // Register the platform view factory for creating custom views +// +// // Initialize the Penguin SDK +// initPenguin() +// +// +// } +// +// private fun onPermissionsDenied() { +// // Handle the actions when permissions are denied +// Log.d("PermissionsResult", "onPermissionsDenied") +// +// } +// +// /** +// * Returns the view associated with this PlatformView. +// * +// * @return The main view for this PlatformView. +// */ +// override fun getView(): View { +// return mapLayout +// } +// +// /** +// * Cleans up resources associated with this PlatformView. +// */ +// override fun dispose() { +// // Cleanup code if needed +// } +// +// /** +// * Handles method calls from Dart code. +// * +// * @param call The method call from Dart. +// * @param result The result callback to send responses back to Dart. +// */ +// override fun onMethodCall(call: MethodCall, result: MethodChannel.Result) { +// // Handle method calls from Dart code here +// } +// +// /** +// * Initializes the Penguin SDK with custom configuration and delegates. +// */ +// private fun initPenguin() { +// navigator = PenguinNavigator() +// // Configure the PlugAndPlaySDK +// val language = when (creationParams["languageCode"] as String) { +// "ar" -> Languages.ar +// "en" -> Languages.en +// else -> { +// Languages.en +// } +// } +// Log.d( +// "TAG", +// "initPenguin: ${Languages.getLanguageEnum(creationParams["languageCode"] as String)}" +// ) +// PlugAndPlaySDK.configuration = PlugAndPlayConfiguration.Builder() +// .setBaseUrl( +// creationParams["dataURL"] as String, +// creationParams["positionURL"] as String +// ) +// .setServiceName( +// creationParams["dataServiceName"] as String, +// creationParams["positionServiceName"] as String // ) - } - } - - /** - * Called when Penguin UI setup is successful. - * - * @param warningCode Optional warning code received from the SDK. - */ - override fun onPenNavSuccess(warningCode: String?) { - val clinicId = creationParams["clinicID"] as String - - if(clinicId.isEmpty()) return - - navigateTo(clinicId) - } - - /** - * Called when there is an initialization error with Penguin UI. - * - * @param description Description of the error. - * @param errorType Type of initialization error. - */ - override fun onPenNavInitializationError( - description: String?, - errorType: InitializationErrorType? - ) { - val arguments: Map = mapOf( - "description" to description, - "type" to errorType?.name - ) - - channel.invokeMethod(PenguinMethod.onPenNavInitializationError.name, arguments) - Toast.makeText(mContext, "Navigation Error: $description", Toast.LENGTH_SHORT).show() - } - - /** - * Called when Penguin UI is dismissed. - */ - override fun onPenNavUIDismiss() { - // Handle UI dismissal if needed - try { - mContext.unregisterReceiver(permissionResultReceiver) - dispose(); - } catch (e: IllegalArgumentException) { - Log.e("PenguinView", "Receiver not registered: $e") - } - } -} - +// .setClientData( +// creationParams["clientID"] as String, +// creationParams["clientKey"] as String +// ) +// .setUserName(creationParams["username"] as String) +//// .setLanguageID(Languages.en) +// .setLanguageID(language) +// .setSimulationModeEnabled(creationParams["isSimulationModeEnabled"] as Boolean) +// .setEnableBackButton(true) +//// .setDeepLinkData("deeplink") +// .setCustomizeColor("#2CA0AF") +// .setDeepLinkSchema("") +// .setIsEnableReportIssue(true) +// .build() +// +// // Set location delegate to handle location updates +//// PlugAndPlaySDK.setPiLocationDelegate { +// // Example code to handle location updates +// // Uncomment and modify as needed +// // if (location.size() > 0) +// // Toast.makeText(_context, "Location Info Latitude: ${location[0]}, Longitude: ${location[1]}", Toast.LENGTH_SHORT).show() +//// } +// +// // Set events delegate for reporting issues +//// PlugAndPlaySDK.setPiEventsDelegate(new PIEventsDelegate() { +//// @Override +//// public void onReportIssue(PIReportIssue issue) { +//// Log.e("Issue Reported: ", issue.getReportType()); +//// } +//// // Implement issue reporting logic here } +//// @Override +//// public void onSharedLocation(String link) { +//// // Implement Shared location logic here +//// } +//// }) +// +// // Start the Penguin SDK +// PlugAndPlaySDK.start(mContext, this) +// } +// +// +// /** +// * Navigates to the specified reference ID. +// * +// * @param refID The reference ID to navigate to. +// */ +// fun navigateTo(refID: String) { +// try { +// if (refID.isBlank()) { +// Log.e("navigateTo", "Invalid refID: The reference ID is blank.") +// } +//// referenceId = refID +// navigator.navigateTo(mContext, refID,object : RefIdDelegate { +// override fun onRefByIDSuccess(PoiId: String?) { +// Log.e("navigateTo", "PoiId is penguin view+++++++ $PoiId") +// +//// channelFlutter.invokeMethod( +//// PenguinMethod.navigateToPOI.name, +//// "navigateTo Success" +//// ) +// } +// +// override fun onGetByRefIDError(error: String?) { +// Log.e("navigateTo", "error is penguin view+++++++ $error") +// +//// channelFlutter.invokeMethod( +//// PenguinMethod.navigateToPOI.name, +//// "navigateTo Failed: Invalid refID" +//// ) +// } +// } , creationParams["clientID"] as String, creationParams["clientKey"] as String ) +// +// } catch (e: Exception) { +// Log.e("navigateTo", "Exception occurred during navigation: ${e.message}", e) +//// channelFlutter.invokeMethod( +//// PenguinMethod.navigateToPOI.name, +//// "Failed: Exception - ${e.message}" +//// ) +// } +// } +// +// /** +// * Called when Penguin UI setup is successful. +// * +// * @param warningCode Optional warning code received from the SDK. +// */ +// override fun onPenNavSuccess(warningCode: String?) { +// val clinicId = creationParams["clinicID"] as String +// +// if(clinicId.isEmpty()) return +// +// navigateTo(clinicId) +// } +// +// /** +// * Called when there is an initialization error with Penguin UI. +// * +// * @param description Description of the error. +// * @param errorType Type of initialization error. +// */ +// override fun onPenNavInitializationError( +// description: String?, +// errorType: InitializationErrorType? +// ) { +// val arguments: Map = mapOf( +// "description" to description, +// "type" to errorType?.name +// ) +// +// channel.invokeMethod(PenguinMethod.onPenNavInitializationError.name, arguments) +// Toast.makeText(mContext, "Navigation Error: $description", Toast.LENGTH_SHORT).show() +// } +// +// /** +// * Called when Penguin UI is dismissed. +// */ +// override fun onPenNavUIDismiss() { +// // Handle UI dismissal if needed +// try { +// mContext.unregisterReceiver(permissionResultReceiver) +// dispose(); +// } catch (e: IllegalArgumentException) { +// Log.e("PenguinView", "Receiver not registered: $e") +// } +// } +//} +// diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml index 1093435a..87d28a5f 100644 --- a/android/app/src/main/res/values/strings.xml +++ b/android/app/src/main/res/values/strings.xml @@ -19,5 +19,5 @@ Geofence requests happened too frequently. - sk.eyJ1IjoicndhaWQiLCJhIjoiY2x6NWo0bTMzMWZodzJrcGZpemYzc3Z4dSJ9.uSSZuwNSGCcCdPAiORECmg + pk.eyJ1IjoicndhaWQiLCJhIjoiY2x5cGo4aHNjMGNsbTJyc2djempobGQxaSJ9.RCaC6WrUt4A4YnZNfxnONQ diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 8f7eddfa..4cf6030e 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -2141,7 +2141,7 @@ const Map localizedValues = { "download": {"en": "Download", "ar": "تحميل"}, "share": {"en": "Share", "ar": "يشارك"}, "hmgHospital": {"en": "HMG Hospital", "ar": "مستشفى HMG"}, - "hmcHospital": {"en": "HMC Hospital", "ar": "مستشفى HMC"}, - "hmcHospitalCount": {"en": "@ HMC Hospital", "ar": "@ مستشفى HMC"}, + "hmcHospital": {"en": "HMC", "ar": "HMC"}, + "hmcHospitalCount": {"en": "@ HMC", "ar": "@ HMC"}, "hmgHospitalCount": {"en": "@ HMG Hospital", "ar": "@ مستشفى HMC"}, }; diff --git a/lib/pages/BookAppointment/SearchResultsByRegion.dart b/lib/pages/BookAppointment/SearchResultsByRegion.dart index f8d6b5eb..e7cbe538 100644 --- a/lib/pages/BookAppointment/SearchResultsByRegion.dart +++ b/lib/pages/BookAppointment/SearchResultsByRegion.dart @@ -276,7 +276,7 @@ class RegionTitle extends StatelessWidget { Text( title, style: TextStyle( - fontSize: 18, color: Colors.black, fontWeight: FontWeight.w700), + fontSize: 22, color: Colors.black, fontWeight: FontWeight.w700), ), SizedBox( height: 8, @@ -286,9 +286,9 @@ class RegionTitle extends StatelessWidget { Text( "${TranslationBase.of(context).hmgHospitalCount.replaceAll("@", hmgCount)} ,", style: TextStyle( - fontSize: 12, - color: Colors.red, - fontWeight: FontWeight.w400), + fontSize: 14, + color: Color(0xFFD02127), + fontWeight: FontWeight.w600), ), SizedBox( width: 8, @@ -296,9 +296,9 @@ class RegionTitle extends StatelessWidget { Text( "${TranslationBase.of(context).hmcHospitalCount.replaceAll("@", hmcCount)}", style: TextStyle( - fontSize: 12, - color: Colors.greenAccent, - fontWeight: FontWeight.w400), + fontSize: 14, + color: Color(0xFF40ACC9), + fontWeight: FontWeight.w600), ), ], ), @@ -338,7 +338,7 @@ class HospitalTitle extends StatelessWidget { title, style: TextStyle( fontSize: 18, - color: isHMC ? Colors.greenAccent : Colors.red, + color: isHMC ? Color(0xFF40ACC9) : Color(0xFFD02127), fontWeight: FontWeight.w600), ), ], diff --git a/lib/pages/BookAppointment/components/SearchByDoctor.dart b/lib/pages/BookAppointment/components/SearchByDoctor.dart index 93daa573..07e1c1f8 100644 --- a/lib/pages/BookAppointment/components/SearchByDoctor.dart +++ b/lib/pages/BookAppointment/components/SearchByDoctor.dart @@ -105,7 +105,6 @@ class _SearchByDoctorState extends State { if (res['MessageStatus'] == 1) { RegionList regionHospitalList = RegionList(); - setState(() async { if (res['DoctorList'].length != 0) { res['DoctorList'].forEach((v) { var reg = region[counter%4]; @@ -119,9 +118,11 @@ class _SearchByDoctorState extends State { regionHospitalList = await DoctorMapper.getMappedDoctor(doctorsList); - DoctorMapper.sortList(false, regionHospitalList); + regionHospitalList = await DoctorMapper.sortList(true, regionHospitalList); +setState(() { +}); // doctorsList.forEach((element) { // List doctorByHospital = // _patientDoctorAppointmentListHospital.where((elementClinic) => elementClinic.filterName == element.getProjectCompleteName()).toList(); @@ -141,7 +142,7 @@ class _SearchByDoctorState extends State { GifLoaderDialogUtils.hideDialog(context); AppToast.showErrorToast(message: res['ErrorSearchMsg']); } - }); + GifLoaderDialogUtils.hideDialog(context); // navigateToSearchResults(context, doctorsList, _patientDoctorAppointmentListHospital); navigateToSearchResults(context, regionHospitalList); diff --git a/lib/services/appointment_services/mock_doctor_response.dart b/lib/services/appointment_services/mock_doctor_response.dart index a661d5c8..3f30ee30 100644 --- a/lib/services/appointment_services/mock_doctor_response.dart +++ b/lib/services/appointment_services/mock_doctor_response.dart @@ -281,7 +281,7 @@ var response = { "NoOfPatientsRate": 1639, "OriginalClinicID": null, "PersonRate": 0, - "ProjectDistanceInKiloMeters": 1.2, + "ProjectDistanceInKiloMeters": 0.2, "ProjectNameBottom": "Hospital", "ProjectNameTop": "Olaya", "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExc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qMKZCigc/LknjFfV9FAHifw/wDFvirT/FV5pd/4U8QL4dvb1zp7SadKGsld1WNDk7I4EQHhQdvbivbKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA//2Q==", @@ -340,7 +340,7 @@ var response = { "NoOfPatientsRate": 1102, "OriginalClinicID": null, "PersonRate": 0, - "ProjectDistanceInKiloMeters": 1.2, + "ProjectDistanceInKiloMeters": 0.1, "ProjectNameBottom": "Hospital", "ProjectNameTop": "Olaya", "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk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