diff --git a/android/app/build.gradle b/android/app/build.gradle
index 92b87fbc..91c15cde 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -78,16 +78,15 @@ dependencies {
implementation 'com.google.guava:guava:27.0.1-android'
// Dependency on local binaries
implementation fileTree(dir: 'libs', include: ['*.jar'])
- implementation 'androidx.appcompat:appcompat:1.1.0'
- implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
+ // Dependency on a remote binary
+// implementation 'com.example.android:app-magic:12.3'
+
+
+ // Native Dependency
implementation "org.jetbrains.anko:anko-commons:0.10.4"
implementation 'com.github.kittinunf.fuel:fuel:2.3.0' //for JVM
implementation 'com.github.kittinunf.fuel:fuel-android:2.3.0' //for Android
- implementation 'com.wang.avi:library:2.1.3'
- // Dependency on a remote binary
-// implementation 'com.example.android:app-magic:12.3'
-
}
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index 8162b752..9bff802f 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -1,13 +1,10 @@
-
-
+ FlutterApplication and put your custom class here. -->
@@ -20,72 +17,38 @@
+
+
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ android:usesCleartextTraffic="true"
+ android:label="diplomaticquarterapp">
-
-
+ to determine the Window background behind the Flutter UI. -->
-
-
+ Flutter's first frame. -->
@@ -94,20 +57,18 @@
-
-
+
+
-
-
+
+
@@ -115,9 +76,14 @@
-
+
+
+
-
\ No newline at end of file
+
+
+
+
+
diff --git a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/BaseActivity.kt b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/BaseActivity.kt
deleted file mode 100644
index 5790abf6..00000000
--- a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/BaseActivity.kt
+++ /dev/null
@@ -1,51 +0,0 @@
-package com.cloud.diplomaticquarterapp
-
-import android.content.Intent
-import androidx.appcompat.app.AppCompatActivity
-import android.os.Bundle
-import android.widget.RelativeLayout
-import android.widget.TextView
-import com.cloud.diplomaticquarterapp.utils.PlatformBridge
-import com.wang.avi.AVLoadingIndicatorView
-import io.flutter.embedding.android.FlutterView
-import io.flutter.embedding.engine.FlutterEngine
-import io.flutter.embedding.engine.dart.DartExecutor
-import io.flutter.plugin.common.MethodChannel
-import io.flutter.view.FlutterMain
-import org.jetbrains.anko.find
-import java.util.ArrayList
-
-open class BaseActivity : AppCompatActivity() {
-
- lateinit var loadingView:RelativeLayout
- lateinit var lblLoadingView:TextView
- lateinit var avLoadingView:AVLoadingIndicatorView
-
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- }
-
- override fun setContentView(layoutResID: Int) {
- super.setContentView(layoutResID)
-
- loadingView = find(R.id.loadingView)
- lblLoadingView = find(R.id.lblLoadingView)
- avLoadingView = find(R.id.avLoadingView)
- }
-
- override fun onResume() {
- super.onResume()
- }
-
- override fun onPause() {
- super.onPause()
- }
-
- override fun onStop() {
- super.onStop()
- }
-
- override fun onDestroy() {
- super.onDestroy()
- }
-}
\ No newline at end of file
diff --git a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/FlutterMainActivity.kt b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/FlutterMainActivity.kt
deleted file mode 100644
index 387c35a4..00000000
--- a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/FlutterMainActivity.kt
+++ /dev/null
@@ -1,93 +0,0 @@
-package com.cloud.diplomaticquarterapp
-
-import android.content.Intent
-import androidx.appcompat.app.AppCompatActivity
-import android.os.Bundle
-import com.cloud.diplomaticquarterapp.utils.PlatformBridge
-import io.flutter.embedding.android.FlutterView
-import io.flutter.embedding.engine.FlutterEngine
-import io.flutter.embedding.engine.dart.DartExecutor
-import io.flutter.plugin.common.MethodChannel
-import io.flutter.view.FlutterMain
-import java.util.ArrayList
-
-class FlutterMainActivity : BaseActivity() {
-
-
- private var flutterView: FlutterView? = null
- companion object {
- private var flutterEngine: FlutterEngine? = null
-
- private lateinit var instance:FlutterMainActivity
- fun getInstance() : FlutterMainActivity{
- return instance
- }
- }
-
-
- // to get and check returned intent
- private fun getArgsFromIntent(intent: Intent): Array? {
- // Before adding more entries to this list, consider that arbitrary
- // Android applications can generate intents with extra data and that
- // there are many security-sensitive args in the binary.
- val args = ArrayList()
- if (intent.getBooleanExtra("trace-startup", false)) {
- args.add("--trace-startup")
- }
- if (intent.getBooleanExtra("start-paused", false)) {
- args.add("--start-paused")
- }
- if (intent.getBooleanExtra("enable-dart-profiling", false)) {
- args.add("--enable-dart-profiling")
- }
- if (!args.isEmpty()) {
- return args.toTypedArray()
- }
- return null
- }
-
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
-
- val args = getArgsFromIntent(intent)
-
- // check if flutterEngine is null
- if (flutterEngine == null) {
- println(args)
- flutterEngine = FlutterEngine(this, args)
- flutterEngine!!.dartExecutor.executeDartEntrypoint(
- // set which of dart methode will be used here
- DartExecutor.DartEntrypoint(FlutterMain.findAppBundlePath(), "main")
- )
- }
-
- setContentView(R.layout.activity_flutter_main)
-
- flutterView = findViewById(R.id.flutterView)
- flutterView!!.attachToFlutterEngine(flutterEngine!!)
-
- PlatformBridge(flutterEngine!!.dartExecutor.binaryMessenger, this).create()
- }
-
-
- override fun onResume() {
- super.onResume()
- flutterEngine!!.lifecycleChannel.appIsResumed()
- instance = this
- }
-
- override fun onPause() {
- super.onPause()
- flutterEngine!!.lifecycleChannel.appIsInactive()
- }
-
- override fun onStop() {
- super.onStop()
- flutterEngine!!.lifecycleChannel.appIsPaused()
- }
-
- override fun onDestroy() {
- flutterView!!.detachFromFlutterEngine()
- super.onDestroy()
- }
-}
\ No newline at end of file
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 ac33db7c..8b73b0c7 100644
--- a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/MainActivity.kt
+++ b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/MainActivity.kt
@@ -1,21 +1,23 @@
package com.cloud.diplomaticquarterapp
import android.os.Bundle
-import android.os.PersistableBundle
+import android.util.Log
import androidx.annotation.NonNull;
- import io.flutter.embedding.android.FlutterFragmentActivity
+import com.cloud.diplomaticquarterapp.utils.FlutterText
+import com.cloud.diplomaticquarterapp.utils.PlatformBridge
+import io.flutter.embedding.android.FlutterFragmentActivity
import io.flutter.embedding.engine.FlutterEngine
- import io.flutter.plugins.GeneratedPluginRegistrant
import io.flutter.plugin.common.MethodChannel
-import io.flutter.plugin.common.MethodCall
+import io.flutter.plugins.GeneratedPluginRegistrant
class MainActivity: FlutterFragmentActivity() {
+ override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
+ GeneratedPluginRegistrant.registerWith(flutterEngine);
+ // Create Flutter Platform Bridge
+ PlatformBridge(flutterEngine.dartExecutor.binaryMessenger, this).create()
+ }
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
+ override fun onResume() {
+ super.onResume()
}
-
- override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
- GeneratedPluginRegistrant.registerWith(flutterEngine);
- }
}
\ No newline at end of file
diff --git a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/hmgwifi/HMG_Guest.kt b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/hmgwifi/HMG_Guest.kt
new file mode 100644
index 00000000..a60cefb7
--- /dev/null
+++ b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/hmgwifi/HMG_Guest.kt
@@ -0,0 +1,177 @@
+package com.cloud.diplomaticquarterapp.hmgwifi
+
+import android.content.Context
+import android.net.ConnectivityManager
+import android.net.wifi.WifiConfiguration
+import android.net.wifi.WifiInfo
+import android.net.wifi.WifiManager
+import android.os.Build
+import android.util.Log
+import android.widget.Toast
+import com.cloud.diplomaticquarterapp.MainActivity
+import com.cloud.diplomaticquarterapp.utils.FlutterText
+import com.cloud.diplomaticquarterapp.utils.HMGUtils
+
+
+class HMG_Guest(context: MainActivity) {
+ private var wifiManager: WifiManager? = context.applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager?
+ private var connectivityManager: ConnectivityManager? = context.applicationContext.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager?
+ private var context = context
+
+ private val TAG = "HMG_Guest"
+ private val TEST = false
+ private var SSID = """"HMG-MobileApp""""
+
+ private lateinit var completionListener: ((status: Boolean, message: String) -> Unit)
+
+ fun completionOnUiThread(status: Boolean, message: String){
+ context.runOnUiThread {
+ completionListener(status, message)
+ }
+ }
+
+ /*
+ * Helpful:
+ * http://stackoverflow.com/questions/8818290/how-to-connect-to-a-specific-wifi-network-in-android-programmatically
+ */
+ fun connectToHMGGuestNetwork(completion: (status: Boolean, message: String) -> Unit) {
+ wifiManager?.let { wm ->
+ completionListener = completion
+
+ if (!wm.isWifiEnabled){
+ wm.isWifiEnabled = true
+ HMGUtils.popFlutterText(context,"enablingWifi");
+ HMGUtils.timer(2000,false){
+ connect()
+ }
+ }else{
+ connect()
+ }
+
+ }
+
+ }
+
+
+ private fun connect(){
+ val security = "OPEN"
+ val networkPass = ""
+ Log.d(TAG, "Connecting to SSID \"$SSID\" with password \"$networkPass\" and with security \"$security\" ...")
+
+ // You need to create WifiConfiguration instance like this:
+ val conf = WifiConfiguration()
+ conf.SSID = SSID
+ conf.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE)
+ conf.networkId = ssidToNetworkId(SSID)
+
+ val wm = wifiManager!!
+
+ if (conf.networkId == -1) {
+ wm.addNetwork(conf)
+ } else {
+ Log.v(TAG, "WiFi found - updating it.\n")
+ wm.updateNetwork(conf)
+ }
+
+ conf.networkId = ssidToNetworkId(SSID)
+ Log.d(TAG, "Network ID: ${conf.networkId}")
+
+ val networkIdToConnect = conf.networkId
+ if (networkIdToConnect >= 0) {
+ Log.v(TAG, "Start connecting to $SSID Wifi...")
+
+ // We disable the network before connecting, because if this was the last connection before
+ // a disconnect(), this will not reconnect.
+ wm.disableNetwork(networkIdToConnect)
+ val result = wm.enableNetwork(networkIdToConnect, true)
+ if(result){
+ HMGUtils.timer(8000,false){
+ if(wm.getConnectionInfo().getSSID() == SSID){
+ FlutterText.with("successConnectingHmgNetwork"){ localized ->
+ completionOnUiThread(true, localized)
+ }
+ }else{
+ errorConnecting()
+ }
+ }
+
+ }else{
+ errorConnecting()
+ }
+
+
+
+ }else{
+ Log.v(TAG, "Cannot connect to $SSID network")
+ errorConnecting()
+ }
+ }
+
+ private fun errorConnecting(){
+ FlutterText.with("errorConnectingHmgNetwork"){ localized ->
+ completionOnUiThread(false, localized)
+ }
+ }
+
+ // If CompileSDK is greater and equals to APILevel 29
+ private fun connectNewer(wm:WifiManager){
+
+// Log.e(TAG, "connection wifi Q")
+//
+// val wifiNetworkSpecifier: WifiNetworkSpecifier = WifiNetworkSpecifier.Builder()
+// .setSsid(ssid)
+// .setWpa2Passphrase(password)
+// .build()
+//
+// val networkRequest: NetworkRequest = NetworkRequest.Builder()
+// .addTransportType(NetworkCapabilities.TRANSPORT_WIFI)
+// .setNetworkSpecifier(wifiNetworkSpecifier)
+// .build()
+//
+// var connectivityManager = context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
+// var networkCallback = object : ConnectivityManager.NetworkCallback() {
+// override fun onAvailable(network: Network) {
+// super.onAvailable(network)
+// connectivityManager.bindProcessToNetwork(network)
+// Log.e(TAG, "onAvailable")
+// }
+//
+// override fun onLosing(network: Network, maxMsToLive: Int) {
+// super.onLosing(network, maxMsToLive)
+// Log.e(TAG, "onLosing")
+// }
+//
+// override fun onLost(network: Network) {
+// super.onLost(network)
+// Log.e(TAG, "onLosing")
+// Log.e(TAG, "losing active connection")
+// }
+//
+// override fun onUnavailable() {
+// super.onUnavailable()
+// Log.e(TAG, "onUnavailable")
+// }
+// }
+// connectivityManager.requestNetwork(networkRequest, networkCallback)
+ }
+
+
+ /**
+ * This method takes a given String, searches the current list of configured WiFi
+ * networks, and returns the networkId for the network if the SSID matches. If not,
+ * it returns -1.
+ */
+ private fun ssidToNetworkId(ssid: String): Int {
+ val currentNetworks = wifiManager!!.configuredNetworks
+ var networkId = -1
+
+ // For each network in the list, compare the SSID with the given one
+ for (test in currentNetworks) {
+ if (test.SSID == ssid) {
+ networkId = test.networkId
+ break
+ }
+ }
+ return networkId
+ }
+}
\ No newline at end of file
diff --git a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/hmgwifi/HMG_Wifi.kt b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/hmgwifi/HMG_Internet.kt
similarity index 66%
rename from android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/hmgwifi/HMG_Wifi.kt
rename to android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/hmgwifi/HMG_Internet.kt
index e594cc83..25ae4617 100644
--- a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/hmgwifi/HMG_Wifi.kt
+++ b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/hmgwifi/HMG_Internet.kt
@@ -1,21 +1,20 @@
package com.cloud.diplomaticquarterapp.hmgwifi
import android.annotation.SuppressLint
-import android.util.Log
-import com.cloud.diplomaticquarterapp.API
-import com.cloud.diplomaticquarterapp.FlutterMainActivity
-import com.github.kittinunf.fuel.Fuel
+import com.cloud.diplomaticquarterapp.utils.API
+import com.cloud.diplomaticquarterapp.MainActivity
+import com.cloud.diplomaticquarterapp.utils.FlutterText
import com.github.kittinunf.fuel.core.extensions.jsonBody
import com.github.kittinunf.fuel.httpGet
import com.github.kittinunf.fuel.httpPost
-import org.jetbrains.anko.doAsync
import org.json.JSONObject
+import java.util.*
@SuppressLint("MissingPermission")
-class HMG_Wifi(flutterMainActivity: FlutterMainActivity) {
+class HMG_Internet(flutterMainActivity: MainActivity) {
private val TAG = "HMG_Wifi"
- private val TEST = true
+ private val TEST = false
private var context = flutterMainActivity;
@@ -35,7 +34,7 @@ class HMG_Wifi(flutterMainActivity: FlutterMainActivity) {
* Helpful:
* http://stackoverflow.com/questions/8818290/how-to-connect-to-a-specific-wifi-network-in-android-programmatically
*/
- fun connectToHMGGuestNetwork(patientId: String, completion: (status: Boolean, message: String) -> Unit): HMG_Wifi {
+ fun connectToHMGGuestNetwork(patientId: String, completion: (status: Boolean, message: String) -> Unit): HMG_Internet {
completionListener = completion
getWifiCredentials(patientId) {
WPA(context,SSID).connect(USER_NAME,PASSWORD) { status, message ->
@@ -50,19 +49,27 @@ class HMG_Wifi(flutterMainActivity: FlutterMainActivity) {
completion(true)
"https://captive.apple.com".httpGet().response { request, response, result ->
- val have = response.statusCode == 200 && String(response.data).contains("Success", true)
- completion(have)
+ result.fold(success = {
+ val html = String(it).toLowerCase(Locale.ENGLISH)
+ .replace(" ", "", true)
+ .replace("\n","",true)
+ val have = html.contains("success", true)
+ completion(have)
+
+ },failure = {
+ completion(false)
+ })
}
}
- private fun getWifiCredentials(patientId:String, completion: (() -> Unit)){
-// if (TEST){
-// SSID = "GUEST-POC"
-// USER_NAME = "0696"
-// PASSWORD = "0000"
-// completion()
-// return
-// }
+ private fun getWifiCredentials(patientId:String, success: (() -> Unit)){
+ if (TEST){
+ SSID = "GUEST-POC"
+ USER_NAME = "0696"
+ PASSWORD = "0000"
+ success()
+ return
+ }
val jsonBody = """{"PatientID":$patientId}"""
API.WIFI_CREDENTIALS.
@@ -83,16 +90,20 @@ class HMG_Wifi(flutterMainActivity: FlutterMainActivity) {
if (object_.has("UserName") && object_.has("UserName")){
USER_NAME = object_.getString("UserName")
PASSWORD = object_.getString("Password")
- completion()
+ success()
}else{
- completionOnUiThread(false, "Failed to get your internet credentials")
+ FlutterText.with("somethingWentWrong"){localized ->
+ completionOnUiThread(false, localized)
+ }
}
}
}
}
},failure = { error ->
- completionOnUiThread(false, error.localizedMessage )
+ FlutterText.with("somethingWentWrong"){localized ->
+ completionOnUiThread(false, error.localizedMessage )
+ }
})
}
}
diff --git a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/hmgwifi/WPA.kt b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/hmgwifi/WPA.kt
index 18bfc1a7..e5989a49 100644
--- a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/hmgwifi/WPA.kt
+++ b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/hmgwifi/WPA.kt
@@ -1,13 +1,17 @@
package com.cloud.diplomaticquarterapp.hmgwifi
+import android.annotation.SuppressLint
import android.content.Context
import android.net.ConnectivityManager
import android.net.wifi.*
+import android.net.wifi.SupplicantState.ASSOCIATED
+import android.net.wifi.SupplicantState.COMPLETED
import android.util.Log
-import com.cloud.diplomaticquarterapp.FlutterMainActivity
+import com.cloud.diplomaticquarterapp.MainActivity
+import com.cloud.diplomaticquarterapp.utils.FlutterText
import com.cloud.diplomaticquarterapp.utils.HMGUtils
-class WPA(mainActivity: FlutterMainActivity, SSID:String) {
+class WPA(mainActivity: MainActivity, SSID:String) {
private var TAG = "WPA"
private var SSID = "GUEST-POC"
private var wifiManager_: WifiManager? = null
@@ -20,7 +24,9 @@ class WPA(mainActivity: FlutterMainActivity, SSID:String) {
fun connect(identity:String, password:String, completion: (status: Boolean, message: String) -> Unit) {
if(wifiManager_ == null || connectivityManager_ == null){
- completion(false, "Failed to access system connectivity services")
+ FlutterText.with("errorConnectingHmgNetwork"){ localized ->
+ completion(false,localized)
+ }
return
}
@@ -65,15 +71,24 @@ class WPA(mainActivity: FlutterMainActivity, SSID:String) {
HMGUtils.timer(5000,false){
supState = wifiInfo.supplicantState
Log.i(TAG, "WifiWizard: Done connect to network : status = $supState")
- if (supState == SupplicantState.COMPLETED)
- completion(true,"Connected to Wifi")
+ val successStates = listOf(COMPLETED, ASSOCIATED)
+ if (successStates.contains(COMPLETED /*supState*/))
+
+ FlutterText.with("Connected to internet Wifi"){ localized ->
+ completion(true,localized)
+ }
+
else
- completion(false,"Failed to connect with HMG network")
+ FlutterText.with("errorConnectingHmgNetwork"){ localized ->
+ completion(false,localized)
+ }
}
} else {
Log.v(TAG, "WifiWizard: cannot connect to network")
- completion(false,"Failed to connect to Wifi")
+ FlutterText.with("errorConnectingHmgNetwork"){ localized ->
+ completion(false,localized)
+ }
}
}
@@ -82,6 +97,7 @@ class WPA(mainActivity: FlutterMainActivity, SSID:String) {
* networks, and returns the networkId for the network if the SSID matches. If not,
* it returns -1.
*/
+ @SuppressLint("MissingPermission")
private fun ssidToNetworkId(ssid: String): Int {
val currentNetworks = wifiManager_!!.configuredNetworks
var networkId = -1
diff --git a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/API.kt b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/utils/API.kt
similarity index 84%
rename from android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/API.kt
rename to android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/utils/API.kt
index f8cc815e..0d5f1e7e 100644
--- a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/API.kt
+++ b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/utils/API.kt
@@ -1,9 +1,10 @@
-package com.cloud.diplomaticquarterapp
+package com.cloud.diplomaticquarterapp.utils
class API {
companion object{
private val BASE = "https://uat.hmgwebservices.com"
private val SERVICE = "Services/Patients.svc/REST"
+
val WIFI_CREDENTIALS = "$BASE/$SERVICE/Hmg_SMS_Get_By_ProjectID_And_PatientID"
}
}
\ No newline at end of file
diff --git a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/utils/FlutterText.kt b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/utils/FlutterText.kt
new file mode 100644
index 00000000..419eb340
--- /dev/null
+++ b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/utils/FlutterText.kt
@@ -0,0 +1,36 @@
+package com.cloud.diplomaticquarterapp.utils
+
+import io.flutter.plugin.common.MethodChannel
+import io.flutter.plugin.common.MethodChannel.Result
+
+class FlutterText{
+
+ companion object{
+ fun with(key:String, completion:(String)->Unit){
+ HMGUtils.getPlatformChannel().invokeMethod("localizedValue",key, object:MethodChannel.Result{
+ override fun success(result: Any?) {
+ val localized = result as String?
+ if (localized != null){
+ completion(localized)
+ }else{
+ completion(key)
+ }
+ }
+
+ override fun error(errorCode: String?, errorMessage: String?, errorDetails: Any?) {
+ completion(key)
+ require(false){
+ "'localizedValue' $errorMessage"
+ }
+ }
+
+ override fun notImplemented() {
+ require(false){
+ "'localizedValue' method not implemented at flutter"
+ }
+ }
+
+ })
+ }
+ }
+}
\ No newline at end of file
diff --git a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/utils/HMGUtils.kt b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/utils/HMGUtils.kt
index 71488c1d..0b178245 100644
--- a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/utils/HMGUtils.kt
+++ b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/utils/HMGUtils.kt
@@ -1,15 +1,23 @@
package com.cloud.diplomaticquarterapp.utils
-import android.opengl.Visibility
import android.view.View
import android.widget.Toast
-import com.cloud.diplomaticquarterapp.BaseActivity
+import com.cloud.diplomaticquarterapp.MainActivity
+import io.flutter.plugin.common.MethodChannel
import java.util.*
import kotlin.concurrent.timerTask
class HMGUtils {
companion object{
+ private lateinit var platformChannel: MethodChannel
+ fun getPlatformChannel():MethodChannel{
+ return platformChannel
+ }
+ fun setPlatformChannel(channel:MethodChannel){
+ platformChannel = channel
+ }
+
fun timer(delay:Long, repeat:Boolean, tick:(Timer)->Unit) : Timer{
val timer = Timer()
if(repeat)
@@ -24,22 +32,14 @@ class HMGUtils {
return timer
}
-
- fun showLoading(context: BaseActivity, show:Boolean = true, message:String = "Please wait"){
- if(show){
- context.loadingView.visibility = View.VISIBLE
- context.avLoadingView.smoothToShow()
- context.lblLoadingView.text = message
- }else{
- context.loadingView.visibility = View.GONE
- context.avLoadingView.smoothToHide()
- context.lblLoadingView.text = ""
- }
-
+ fun popMessage(context:MainActivity, message:String){
+ Toast.makeText(context,message,Toast.LENGTH_LONG).show()
}
- fun showMessage(context:BaseActivity, title:String = "", message:String){
- Toast.makeText(context,message,Toast.LENGTH_LONG).show()
+ fun popFlutterText(context:MainActivity, key:String){
+ FlutterText.with(key){
+ Toast.makeText(context,it,Toast.LENGTH_LONG).show()
+ }
}
}
diff --git a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/utils/HMG_Wifi_.kt b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/utils/HMG_Wifi_.kt
index 9bb6196e..decc9bdf 100644
--- a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/utils/HMG_Wifi_.kt
+++ b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/utils/HMG_Wifi_.kt
@@ -1,256 +1,256 @@
-package com.cloud.diplomaticquarterapp.utils
-
-import android.annotation.SuppressLint
-import android.content.Context
-import android.net.ConnectivityManager
-import android.net.Network
-import android.net.NetworkCapabilities
-import android.net.NetworkRequest
-import android.net.wifi.ScanResult
-import android.net.wifi.WifiConfiguration
-import android.net.wifi.WifiManager
-import android.util.Log
-import com.cloud.diplomaticquarterapp.API
-import com.cloud.diplomaticquarterapp.FlutterMainActivity
-import com.github.kittinunf.fuel.core.extensions.jsonBody
-import com.github.kittinunf.fuel.httpGet
-import com.github.kittinunf.fuel.httpPost
-import org.json.JSONObject
-import java.util.*
-
-
-@SuppressLint("MissingPermission")
-class HMG_Wifi_(flutterMainActivity: FlutterMainActivity) {
- val TAG = "WIFI"
- val TEST = true
-
- var context = flutterMainActivity;
- var completionListener: ((status: Boolean, message: String) -> Unit)? = null
-
-
- private var SSID = "HMG-GUEST"
- private var USER_NAME = ""
- private var PASSWORD = ""
- var NETWORK_ID = -1 // HMG-GUEST Assigned Network ID by Android
- private lateinit var PATIENT_ID:String
- /*
- * Helpful:
- * http://stackoverflow.com/questions/5452940/how-can-i-get-android-wifi-scan-results-into-a-list
- */
- fun triggerWifiScan(context: Context) {
- val wifi = context.getSystemService(Context.WIFI_SERVICE) as WifiManager
- wifi.startScan()
- }
-
- /*
- * Helpful:
- * http://stackoverflow.com/questions/8818290/how-to-connect-to-a-specific-wifi-network-in-android-programmatically
- */
- fun connectToWifiNetworkWith(patientId: String): HMG_Wifi_ {
-
- val connectivityManager = context.applicationContext.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
-
- PATIENT_ID = patientId
-
- val security = "OPEN"
- val networkPass = ""
- Log.d(TAG, "Connecting to SSID \"$SSID\" with password \"$networkPass\" and with security \"$security\" ...")
-
- // You need to create WifiConfiguration instance like this:
- val conf = WifiConfiguration()
- conf.SSID = "\"" + SSID + "\""
-
- if (security == "OPEN") {
- conf.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE)
- } else if (security == "WEP") {
- conf.wepKeys[0] = "\"" + networkPass + "\""
- conf.wepTxKeyIndex = 0
- conf.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE)
- conf.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.WEP40)
- } else {
- conf.preSharedKey = "\"" + networkPass + "\""
- }
-
- // Then, you need to add it to Android wifi manager settings:
- val wifiManager = context.applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager
-
- NETWORK_ID = wifiManager.addNetwork(conf)
- Log.d(TAG, "Network ID: $NETWORK_ID")
-
- //wifiManager.disconnect();
- val result = wifiManager.enableNetwork(NETWORK_ID, true)
- //wifiManager.reconnect();
- wifiManager.saveConfiguration()
-
- if(result == true){
- authNetworkConnection(NETWORK_ID);
- }else{
- completionListener?.let { it(false, "Error connecting to HMG network") }
- }
- return this
- }
-
- private var authTimer:Timer? = null
- fun authNetworkConnection(networkId: Int){
- authTimer = Timer()
- authTimer?.scheduleAtFixedRate(object : TimerTask() {
- override fun run() {
- if (connectedNetworkId() == networkId && connectedNetworkIPAddress() > 0) {
- authServerCall()
- authTimer?.cancel()
- }
- }
-
- }, 2000, 1000)
-
- // If wifi not connected in 5 sec terminate with fail status
- Timer().schedule(object : TimerTask() {
- override fun run() {
- if (null != authTimer) {
- authTimer?.cancel()
- completionListener?.let { it(false, "Error connecting to HMG network") }
- }
- }
- }, 5000)
-
- }
-
- fun authServerCall(){
-
- fun call(){
-
- forceNetworkCallOverWifi()
-
- val params = listOf("cmd" to "authenticate", "password" to PASSWORD, "user" to USER_NAME)
- val serverUrl = "https://captiveportal-login.hmg.com/cgi-bin/login"
-// val serverUrl = "http://192.168.102.223/cgi-bin/login"
- serverUrl
- .httpPost(params)
- .timeout(10000)
- .response { request, response, result ->
- Log.v(TAG, response.statusCode.toString())
-
- haveInternet { have ->
- if(have){
- Log.v(TAG, "Connected to internet via $SSID network at HMG")
- completionListener?.let { it(true, "Successfully connected to the internet") }
- }else{
- Log.e(TAG, "failed to connect to internet via $SSID network at HMG")
- completionListener?.let { it(false, "Authentication failed or you are already using your credentials on another device") }
- }
- }
- }
- }
-
- haveInternet { has ->
- if (has){
- getAuthCredentials {
- call()
- }
- }else{
- completionListener?.let { it(false, "You must have active internet connection to connect with HMG Network") }
- }
- }
- }
-
- fun haveInternet(completion: ((status: Boolean) -> Unit)){
- if (TEST)
- completion(true)
-
- "https://captive.apple.com".httpGet().response { request, response, result ->
- val have = response.statusCode == 200 && String(response.data).contains("Success", true)
- completion(have)
- }
- }
-
- fun getAuthCredentials(completion: (() -> Unit)){
- if (TEST){
- USER_NAME = "2300"
- PASSWORD = "1820"
- completion()
- return
- }
-
- val jsonBody = """{"PatientID":$PATIENT_ID}"""
- API.WIFI_CREDENTIALS
- .httpPost()
- .jsonBody(jsonBody, Charsets.UTF_8)
- .response { request, response, result ->
- val jsonString = String(response.data)
- Log.d(TAG, "JSON $jsonString")
-
- if (response.statusCode == 200){
-
- val jsonObject = JSONObject(jsonString)
- if(!jsonObject.getString("ErrorMessage").equals("null")){
- val errorMsg = jsonObject.getString("ErrorMessage")
- completionListener?.let { it(false, errorMsg) }
-
- }else{
- jsonObject.getJSONArray("Hmg_SMS_Get_By_ProjectID_And_PatientIDList").let { array ->
- array.getJSONObject(0).let { object_ ->
- if (object_.has("UserName") && object_.has("UserName")){
- USER_NAME = object_.getString("UserName")
- PASSWORD = object_.getString("Password")
- completion()
- }else{
- completionListener?.let { it(false, "Failed to get your internet credentials") }
- }
- }
- }
- }
-
- }else{
- completionListener?.let { it(false, "Failed to get your internet credentials") }
- }
- }
- }
-
- fun forceNetworkCallOverWifi(){
- val connectivityManager = context.applicationContext.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
-// val network = Network
-// connectivityManager.activeNetwork
- // Exit app if Network disappears.
- // Exit app if Network disappears.
-// val networkCapabilities: NetworkCapabilities = ConnectivityManager.from(context).getNetworkCapabilities(network)
-// val networkCapabilities: NetworkCapabilities = connectivityManager.getNetworkCapabilities(network)
-
-// if (networkCapabilities == null) {
+//package com.cloud.diplomaticquarterapp.utils
+//
+//import android.annotation.SuppressLint
+//import android.content.Context
+//import android.net.ConnectivityManager
+//import android.net.Network
+//import android.net.NetworkCapabilities
+//import android.net.NetworkRequest
+//import android.net.wifi.ScanResult
+//import android.net.wifi.WifiConfiguration
+//import android.net.wifi.WifiManager
+//import android.util.Log
+//import com.cloud.diplomaticquarterapp.utils.API
+//import com.cloud.diplomaticquarterapp.FlutterMainActivity
+//import com.github.kittinunf.fuel.core.extensions.jsonBody
+//import com.github.kittinunf.fuel.httpGet
+//import com.github.kittinunf.fuel.httpPost
+//import org.json.JSONObject
+//import java.util.*
+//
+//
+//@SuppressLint("MissingPermission")
+//class HMG_Wifi_(flutterMainActivity: FlutterMainActivity) {
+// val TAG = "WIFI"
+// val TEST = true
+//
+// var context = flutterMainActivity;
+// var completionListener: ((status: Boolean, message: String) -> Unit)? = null
+//
+//
+// private var SSID = "HMG-GUEST"
+// private var USER_NAME = ""
+// private var PASSWORD = ""
+// var NETWORK_ID = -1 // HMG-GUEST Assigned Network ID by Android
+// private lateinit var PATIENT_ID:String
+// /*
+// * Helpful:
+// * http://stackoverflow.com/questions/5452940/how-can-i-get-android-wifi-scan-results-into-a-list
+// */
+// fun triggerWifiScan(context: Context) {
+// val wifi = context.getSystemService(Context.WIFI_SERVICE) as WifiManager
+// wifi.startScan()
+// }
+//
+// /*
+// * Helpful:
+// * http://stackoverflow.com/questions/8818290/how-to-connect-to-a-specific-wifi-network-in-android-programmatically
+// */
+// fun connectToWifiNetworkWith(patientId: String): HMG_Wifi_ {
+//
+// val connectivityManager = context.applicationContext.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
+//
+// PATIENT_ID = patientId
+//
+// val security = "OPEN"
+// val networkPass = ""
+// Log.d(TAG, "Connecting to SSID \"$SSID\" with password \"$networkPass\" and with security \"$security\" ...")
+//
+// // You need to create WifiConfiguration instance like this:
+// val conf = WifiConfiguration()
+// conf.SSID = "\"" + SSID + "\""
+//
+// if (security == "OPEN") {
+// conf.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE)
+// } else if (security == "WEP") {
+// conf.wepKeys[0] = "\"" + networkPass + "\""
+// conf.wepTxKeyIndex = 0
+// conf.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE)
+// conf.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.WEP40)
+// } else {
+// conf.preSharedKey = "\"" + networkPass + "\""
+// }
+//
+// // Then, you need to add it to Android wifi manager settings:
+// val wifiManager = context.applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager
+//
+// NETWORK_ID = wifiManager.addNetwork(conf)
+// Log.d(TAG, "Network ID: $NETWORK_ID")
+//
+// //wifiManager.disconnect();
+// val result = wifiManager.enableNetwork(NETWORK_ID, true)
+// //wifiManager.reconnect();
+// wifiManager.saveConfiguration()
+//
+// if(result == true){
+// authNetworkConnection(NETWORK_ID);
+// }else{
+// completionListener?.let { it(false, "Error connecting to HMG network") }
+// }
+// return this
+// }
+//
+// private var authTimer:Timer? = null
+// fun authNetworkConnection(networkId: Int){
+// authTimer = Timer()
+// authTimer?.scheduleAtFixedRate(object : TimerTask() {
+// override fun run() {
+// if (connectedNetworkId() == networkId && connectedNetworkIPAddress() > 0) {
+// authServerCall()
+// authTimer?.cancel()
+// }
+// }
+//
+// }, 2000, 1000)
+//
+// // If wifi not connected in 5 sec terminate with fail status
+// Timer().schedule(object : TimerTask() {
+// override fun run() {
+// if (null != authTimer) {
+// authTimer?.cancel()
+// completionListener?.let { it(false, "Error connecting to HMG network") }
+// }
+// }
+// }, 5000)
+//
+// }
+//
+// fun authServerCall(){
+//
+// fun call(){
+//
+// forceNetworkCallOverWifi()
+//
+// val params = listOf("cmd" to "authenticate", "password" to PASSWORD, "user" to USER_NAME)
+// val serverUrl = "https://captiveportal-login.hmg.com/cgi-bin/login"
+//// val serverUrl = "http://192.168.102.223/cgi-bin/login"
+// serverUrl
+// .httpPost(params)
+// .timeout(10000)
+// .response { request, response, result ->
+// Log.v(TAG, response.statusCode.toString())
+//
+// haveInternet { have ->
+// if(have){
+// Log.v(TAG, "Connected to internet via $SSID network at HMG")
+// completionListener?.let { it(true, "Successfully connected to the internet") }
+// }else{
+// Log.e(TAG, "failed to connect to internet via $SSID network at HMG")
+// completionListener?.let { it(false, "Authentication failed or you are already using your credentials on another device") }
+// }
+// }
+// }
+// }
+//
+// haveInternet { has ->
+// if (has){
+// getAuthCredentials {
+// call()
+// }
+// }else{
+// completionListener?.let { it(false, "You must have active internet connection to connect with HMG Network") }
+// }
+// }
+// }
+//
+// fun haveInternet(completion: ((status: Boolean) -> Unit)){
+// if (TEST)
+// completion(true)
+//
+// "https://captive.apple.com".httpGet().response { request, response, result ->
+// val have = response.statusCode == 200 && String(response.data).contains("Success", true)
+// completion(have)
+// }
+// }
+//
+// fun getAuthCredentials(completion: (() -> Unit)){
+// if (TEST){
+// USER_NAME = "2300"
+// PASSWORD = "1820"
+// completion()
// return
// }
-
- val mNetworkCallback = object : ConnectivityManager.NetworkCallback() {
- override fun onLost(lostNetwork: Network?) {
-// if (network.equals(lostNetwork)){
-// //GlyphLayout.done(false)
+//
+// val jsonBody = """{"PatientID":$PATIENT_ID}"""
+// API.WIFI_CREDENTIALS
+// .httpPost()
+// .jsonBody(jsonBody, Charsets.UTF_8)
+// .response { request, response, result ->
+// val jsonString = String(response.data)
+// Log.d(TAG, "JSON $jsonString")
+//
+// if (response.statusCode == 200){
+//
+// val jsonObject = JSONObject(jsonString)
+// if(!jsonObject.getString("ErrorMessage").equals("null")){
+// val errorMsg = jsonObject.getString("ErrorMessage")
+// completionListener?.let { it(false, errorMsg) }
+//
+// }else{
+// jsonObject.getJSONArray("Hmg_SMS_Get_By_ProjectID_And_PatientIDList").let { array ->
+// array.getJSONObject(0).let { object_ ->
+// if (object_.has("UserName") && object_.has("UserName")){
+// USER_NAME = object_.getString("UserName")
+// PASSWORD = object_.getString("Password")
+// completion()
+// }else{
+// completionListener?.let { it(false, "Failed to get your internet credentials") }
+// }
+// }
+// }
+// }
+//
+// }else{
+// completionListener?.let { it(false, "Failed to get your internet credentials") }
+// }
// }
- }
- }
- val builder: NetworkRequest.Builder = NetworkRequest.Builder()
-// for (transportType in networkCapabilities.getTransportTypes()) {
-// builder.addTransportType(transportType)
+// }
+//
+// fun forceNetworkCallOverWifi(){
+// val connectivityManager = context.applicationContext.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
+//// val network = Network
+//// connectivityManager.activeNetwork
+// // Exit app if Network disappears.
+// // Exit app if Network disappears.
+//// val networkCapabilities: NetworkCapabilities = ConnectivityManager.from(context).getNetworkCapabilities(network)
+//// val networkCapabilities: NetworkCapabilities = connectivityManager.getNetworkCapabilities(network)
+//
+//// if (networkCapabilities == null) {
+//// return
+//// }
+//
+// val mNetworkCallback = object : ConnectivityManager.NetworkCallback() {
+// override fun onLost(lostNetwork: Network?) {
+//// if (network.equals(lostNetwork)){
+//// //GlyphLayout.done(false)
+//// }
+// }
// }
- connectivityManager.registerNetworkCallback(builder.build(), mNetworkCallback)
- }
-
- /*
- * Helpful:
- * http://stackoverflow.com/questions/6517314/android-wifi-connection-programmatically
- */
- fun getScanResultSecurity(result: ScanResult): String? {
- val capabilities: String = result.capabilities
- val securityModes = arrayOf("WEP", "PSK", "EAP")
- for (securityMode in securityModes) {
- if (capabilities.contains(securityMode)) {
- return securityMode
- }
- }
- return "OPEN"
- }
-
- //connects to the given ssid
- fun connectToWPAWiFi(ssid: String, password: String){
-
+// val builder: NetworkRequest.Builder = NetworkRequest.Builder()
+//// for (transportType in networkCapabilities.getTransportTypes()) {
+//// builder.addTransportType(transportType)
+//// }
+// connectivityManager.registerNetworkCallback(builder.build(), mNetworkCallback)
+// }
+//
+// /*
+// * Helpful:
+// * http://stackoverflow.com/questions/6517314/android-wifi-connection-programmatically
+// */
+// fun getScanResultSecurity(result: ScanResult): String? {
+// val capabilities: String = result.capabilities
+// val securityModes = arrayOf("WEP", "PSK", "EAP")
+// for (securityMode in securityModes) {
+// if (capabilities.contains(securityMode)) {
+// return securityMode
+// }
+// }
+// return "OPEN"
+// }
+//
+// //connects to the given ssid
+// fun connectToWPAWiFi(ssid: String, password: String){
+//
// WifiUtils.withContext(context)
// .connectWith(ssid, "")
// .setTimeout(40000)
@@ -327,25 +327,25 @@ class HMG_Wifi_(flutterMainActivity: FlutterMainActivity) {
// Log.v(TAG,"HMG-GUEST failed to connect")
// }
// }
-
- }
-
- fun connectedNetworkId():Int{
- val wm:WifiManager= context.applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager
- return wm.connectionInfo.networkId
- }
-
- fun connectedNetworkIPAddress():Int{
- val wm:WifiManager= context.applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager
- return wm.connectionInfo.ipAddress
- }
-
- fun isConnectedTo(bssid: String):Boolean{
- val wm:WifiManager= context.applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager
- if(wm.connectionInfo.bssid == bssid){
- return true
- }
- return false
- }
-
-}
\ No newline at end of file
+//
+// }
+//
+// fun connectedNetworkId():Int{
+// val wm:WifiManager= context.applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager
+// return wm.connectionInfo.networkId
+// }
+//
+// fun connectedNetworkIPAddress():Int{
+// val wm:WifiManager= context.applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager
+// return wm.connectionInfo.ipAddress
+// }
+//
+// fun isConnectedTo(bssid: String):Boolean{
+// val wm:WifiManager= context.applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager
+// if(wm.connectionInfo.bssid == bssid){
+// return true
+// }
+// return false
+// }
+//
+//}
\ No newline at end of file
diff --git a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/utils/HTTPRequest.kt b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/utils/HTTPRequest.kt
index 6bc738c8..e34c7c9b 100644
--- a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/utils/HTTPRequest.kt
+++ b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/utils/HTTPRequest.kt
@@ -1,8 +1,5 @@
package com.cloud.diplomaticquarterapp.utils
-import android.os.AsyncTask
-import android.os.Parcel
-import android.os.Parcelable
import android.util.Log
import java.io.BufferedReader
import java.io.InputStreamReader
diff --git a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/utils/PlatformBridge.kt b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/utils/PlatformBridge.kt
index 22852a56..2033cc03 100644
--- a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/utils/PlatformBridge.kt
+++ b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/utils/PlatformBridge.kt
@@ -1,14 +1,16 @@
package com.cloud.diplomaticquarterapp.utils
+import android.content.Context
+import android.net.wifi.WifiManager
import android.util.Log
-import android.widget.Toast
-import com.cloud.diplomaticquarterapp.FlutterMainActivity
-import com.cloud.diplomaticquarterapp.hmgwifi.HMG_Wifi
+import com.cloud.diplomaticquarterapp.MainActivity
+import com.cloud.diplomaticquarterapp.hmgwifi.HMG_Guest
+import com.cloud.diplomaticquarterapp.hmgwifi.HMG_Internet
import io.flutter.plugin.common.BinaryMessenger
import io.flutter.plugin.common.MethodCall
import io.flutter.plugin.common.MethodChannel
-class PlatformBridge(binaryMessenger: BinaryMessenger, flutterMainActivity: FlutterMainActivity) {
+class PlatformBridge(binaryMessenger: BinaryMessenger, flutterMainActivity: MainActivity) {
private var binaryMessenger = binaryMessenger
private var mainActivity = flutterMainActivity
@@ -16,40 +18,51 @@ class PlatformBridge(binaryMessenger: BinaryMessenger, flutterMainActivity: Flut
companion object {
private const val CHANNEL = "HMG-Platform-Bridge"
- private const val METHOD_CONNECT_WIFI = "connectHMGGuestWifi"
- private const val METHOD_SHOW_LOADING = "loading"
+ private const val HMG_INTERNET_WIFI_CONNECT_METHOD = "connectHMGInternetWifi"
+ private const val HMG_GUEST_WIFI_CONNECT_METHOD = "connectHMGGuestWifi"
+ private const val ENABLE_WIFI_IF_NOT = "enableWifiIfNot"
+
}
fun create(){
channel = MethodChannel(binaryMessenger, CHANNEL)
+ HMGUtils.setPlatformChannel(channel)
channel.setMethodCallHandler { methodCall: MethodCall, result: MethodChannel.Result ->
- if (methodCall.method == METHOD_CONNECT_WIFI) {
+
+ if (methodCall.method == HMG_INTERNET_WIFI_CONNECT_METHOD) {
+ connectHMGInternetWifi(methodCall,result)
+
+ }else if (methodCall.method == HMG_GUEST_WIFI_CONNECT_METHOD) {
connectHMGGuestWifi(methodCall,result)
- }else if (methodCall.method == METHOD_SHOW_LOADING) {
- showLoading(methodCall,result)
+ }else if (methodCall.method == ENABLE_WIFI_IF_NOT) {
+ enableWifiIfNot(methodCall,result)
+ }else{
- }else {
result.notImplemented()
}
+
}
+
+ val res = channel.invokeMethod("localizedValue","errorConnectingHmgNetwork")
+ print(res)
}
- private fun connectHMGGuestWifi(methodCall: MethodCall, result: MethodChannel.Result){
+ private fun connectHMGInternetWifi(methodCall: MethodCall, result: MethodChannel.Result){
(methodCall.arguments as ArrayList<*>).let {
require(it.size > 0 && (it[0] is String),lazyMessage = {
"Missing or invalid arguments (Must have one argument 'String at 0'"
})
val patientId = it[0].toString()
-// HMGUtils.showLoading(mainActivity,true,"Connecting...")
- HMG_Wifi(mainActivity)
+ HMG_Internet(mainActivity)
.connectToHMGGuestNetwork(patientId){ status, message ->
- HMGUtils.showLoading(mainActivity,false)
+ result.success(if(status) 1 else 0)
+
if(status){
- HMGUtils.showMessage(mainActivity,"Error", message)
+ HMGUtils.popMessage(mainActivity, message)
}else{
- HMGUtils.showMessage(mainActivity,"Success",message)
+ HMGUtils.popMessage(mainActivity,message)
}
Log.v(this.javaClass.simpleName, "$status | $message")
@@ -57,15 +70,28 @@ class PlatformBridge(binaryMessenger: BinaryMessenger, flutterMainActivity: Flut
}
}
- private fun showLoading(methodCall: MethodCall, result: MethodChannel.Result){
- (methodCall.arguments as ArrayList<*>).let {
- require(it.size > 1 && (it[0] is String) && (it[1] is Boolean),lazyMessage = {
- "Missing or invalid arguments (Must have two argument 'String at 1' and 'Boolean at 1'"
- })
- val message = it[0] as String
- val show = it[1] as Boolean
- HMGUtils.showLoading(mainActivity,show,message)
+ private fun connectHMGGuestWifi(methodCall: MethodCall, result: MethodChannel.Result){
+ HMG_Guest(mainActivity).connectToHMGGuestNetwork { status, message ->
+ result.success(if(status) 1 else 0)
+
+ if(status){
+ HMGUtils.popMessage(mainActivity, message)
+ }else{
+ HMGUtils.popMessage(mainActivity,message)
+ }
+ Log.v(this.javaClass.simpleName, "$status | $message")
+ }
+ }
+
+ private fun enableWifiIfNot(methodCall: MethodCall, result: MethodChannel.Result) {
+ val wm = mainActivity.applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager?
+ if (wm != null){
+ if (!wm.isWifiEnabled)
+ wm.isWifiEnabled = true
+ result.success(true)
+ }else{
+ result.error("101","Error while opening wifi, Please try to open wifi yourself and try again","'WifiManager' service failed");
}
}
}
\ No newline at end of file
diff --git a/android/app/src/main/res/layout/activity_flutter_main.xml b/android/app/src/main/res/layout/activity_flutter_main.xml
deleted file mode 100644
index bbaac9bb..00000000
--- a/android/app/src/main/res/layout/activity_flutter_main.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/android/app/src/main/res/layout/loading_view.xml b/android/app/src/main/res/layout/loading_view.xml
deleted file mode 100644
index da629a27..00000000
--- a/android/app/src/main/res/layout/loading_view.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml
deleted file mode 100644
index 73862c41..00000000
--- a/android/app/src/main/res/values/strings.xml
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/android/build.gradle b/android/build.gradle
index 84dd6f91..8e56476b 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -1,5 +1,5 @@
buildscript {
- ext.kotlin_version = '1.4.10'
+ ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
diff --git a/assets/app_icons/config.json b/assets/app_icons/config.json
index e0f1051d..0bedcb06 100644
--- a/assets/app_icons/config.json
+++ b/assets/app_icons/config.json
@@ -133,171 +133,129 @@
]
},
{
- "uid": "03df3404af4fa2db99c8dfb9e9729367",
- "css": "more_menu_icon",
+ "uid": "3a1701f9a414e497ab81ae1bb58d3e7c",
+ "css": "blood_type_icon",
"code": 59401,
"src": "custom_icons",
"selected": true,
"svg": {
- "path": "",
- "width": 222
+ "path": "M567.7 248.5A2004.5 2004.5 0 0 0 452.6 80.5C395.1 5.9 378.7 0 363.3 0S331.4 5.9 273.8 80.5A2004.4 2004.4 0 0 0 158.8 248.6C99.6 344.8 0 523.3 0 636.7A363.3 363.3 0 0 0 726.5 636.7C726.5 523.3 627 344.8 567.7 248.5ZM510.7 696.3H392.6V814.4A29.3 29.3 0 1 1 334 814.4V696.3H215.8A29.3 29.3 0 0 1 215.8 637.7H334V519.5A29.3 29.3 0 1 1 392.6 519.5V637.7H510.7A29.3 29.3 0 0 1 510.7 696.3Z",
+ "width": 727
},
"search": [
- "more_menu_icon"
+ "blood_type_icon"
]
},
{
- "uid": "8882d4d64a842809f1cb078522c9b867",
- "css": "offer_icon",
+ "uid": "2073f5ad66d9ab6e47cc1be6e6e20146",
+ "css": "height_icon",
"code": 59402,
"src": "custom_icons",
"selected": true,
"svg": {
- "path": "M1089.5 567L1107.2 972.1 1406.5 924.4 1467.7 530ZM1089.5 567L1107.2 972.1 934 924.4 873.6 530ZM856.1 506L865 588.4 1083.3 622.8 1080.4 541.3ZM1495.6 506L1482 588.4 1083.3 622.8 1080.4 541.3ZM856.1 506L1080.4 541.3 1495.5 506 1221.9 481.9ZM994.9 527.4L1351 493.3 1288 487.7 934 518.2ZM1336 519.5L1100 489.9 1059 492.6 1272.6 524.9ZM882.9 591.2L886 611 1092.9 645.6 1455.7 608.2 1458.4 590.4 1092 622.1 1083.4 622.8ZM1308.7 940L1251.5 949.1 1272.6 524.9 1336 519.5ZM1328.3 381.2C1277.7 331.5 1175.8 491.5 1175.8 491.5L1178.7 502.5S1296.2 431.6 1332.9 428.5C1361.9 426 1361.3 449.9 1331.2 461.8 1303.7 472.6 1178.7 502.5 1178.7 502.5A747 747 0 0 0 1274.4 487.3C1351.9 473.5 1369.4 456.8 1369.9 431.4S1349.7 402.1 1328.3 381.2ZM1274.4 487.2C1349.2 473.9 1368.1 457.9 1369.8 434A63.5 63.5 0 0 0 1332.9 428.4C1361.9 425.9 1361.3 449.9 1331.2 461.7 1303.7 472.5 1178.7 502.4 1178.7 502.4H1178.7A880 880 0 0 0 1274.4 487.2ZM1249 462.9S1245.7 453.6 1229.5 452.2 1212.6 441.2 1212.6 441.1A594.4 594.4 0 0 0 1175.8 491.5L1178.7 502.5S1212.2 482.4 1249 463ZM1023.4 381.2C1073.9 331.5 1175.8 491.5 1175.8 491.5L1172.9 502.5S1055.4 431.6 1018.7 428.5C989.8 426 990.3 449.9 1020.5 461.8 1047.9 472.6 1172.9 502.5 1172.9 502.5A747 747 0 0 1 1077.3 487.3C999.8 473.5 982.2 456.8 981.7 431.4S1002 402.1 1023.4 381.2ZM1077.3 487.2C1002.5 473.9 983.5 457.9 981.9 434A63.5 63.5 0 0 1 1018.7 428.4C989.8 425.9 990.3 449.9 1020.5 461.7 1047.9 472.5 1172.9 502.4 1172.9 502.4H1172.9A880 880 0 0 1 1077.3 487.2ZM1102.6 462.9S1105.9 453.6 1122.1 452.2 1139.1 441.2 1139.1 441.1A595 595 0 0 1 1175.8 491.5L1172.9 502.5S1139.4 482.4 1102.6 463ZM1211.9 506H1135.9A5 5 0 0 1 1131.2 500.7H1131.2A16.4 16.4 0 0 1 1146.7 483.6H1201.1A16.4 16.4 0 0 1 1216.6 500.7H1216.6A5 5 0 0 1 1211.9 506ZM233.4 567L251.1 972.1 550.4 924.4 611.6 530ZM233.4 567L251.1 972.1 78 924.4 17.5 530ZM0 506L8.9 588.4 227.1 622.8 224.2 541.3ZM639.5 506L625.9 588.4 227.1 622.8 224.3 541.3ZM0 506L224.2 541.3 639.4 506 365.8 481.9ZM138.8 527.4L494.9 493.3 431.9 487.7 78 518.2ZM479.9 519.5L243.9 489.9 202.9 492.6 416.5 524.9ZM26.8 591.2L29.8 611 236.8 645.6 599.6 608.2 602.3 590.4 235.9 622.1 227.2 622.8ZM452.6 940L395.4 949.1 416.5 524.9 479.9 519.5ZM116.8 935.2L167.5 949.1 138.8 527.4 77.9 518.2ZM472.2 381.2C421.6 331.5 319.8 491.5 319.8 491.5L322.7 502.5S440.1 431.6 476.8 428.5C505.8 426 505.3 449.9 475.1 461.8 447.6 472.6 322.7 502.5 322.7 502.5A747 747 0 0 0 418.3 487.3C495.8 473.5 513.4 456.8 513.8 431.4S493.6 402.1 472.2 381.2ZM418.3 487.2C493.1 473.9 512.1 457.9 513.7 434A63.5 63.5 0 0 0 476.8 428.4C505.8 425.9 505.3 449.9 475.1 461.7 447.6 472.5 322.7 502.4 322.7 502.4H322.7A880 880 0 0 0 418.3 487.2ZM393 462.9S389.7 453.6 373.4 452.2 356.5 441.2 356.5 441.1A595.1 595.1 0 0 0 319.8 491.5L322.7 502.5S356.2 482.4 393 463ZM167.3 381.2C217.8 331.5 319.7 491.5 319.7 491.5L316.8 502.5S199.3 431.6 162.6 428.5C133.6 426 134.2 449.9 164.3 461.8 191.8 472.6 316.8 502.5 316.8 502.5A747 747 0 0 1 221.1 487.3C143.6 473.5 126.1 456.8 125.6 431.4S145.9 402.1 167.3 381.2ZM221.1 487.2C146.3 473.9 127.4 457.9 125.7 434A63.5 63.5 0 0 1 162.7 428.4C133.7 426 134.3 449.9 164.4 461.7 191.9 472.6 316.9 502.5 316.9 502.5H316.9A880.2 880.2 0 0 1 221.1 487.2ZM246.5 462.9S249.8 453.6 266.1 452.2 283 441.2 283 441.1A594.5 594.5 0 0 1 319.8 491.5L316.8 502.5S283.4 482.4 246.6 463ZM355.8 506H279.8A5 5 0 0 1 275.1 500.7H275.1A16.4 16.4 0 0 1 290.6 483.6H345A16.4 16.4 0 0 1 360.6 500.7H360.6A5 5 0 0 1 355.8 506ZM442.3 310.5L747.8 362.8 1053.3 310.5 747.8 276ZM595.1 336.7L747.8 362.9 900.6 336.7 747.8 319.4ZM905 493.5L868 497A388.3 388.3 0 0 1 1017.1 154.2 341.6 341.6 0 0 0 1005.2 189.2 271.6 271.6 0 0 1 1037.7 188.2 345.8 345.8 0 0 0 905 493.5ZM977.3 471.4L937.5 464.6C958 318.6 1048.8 196.5 1174.5 145.9A349.9 349.9 0 0 0 1153.7 179.4 299.7 299.7 0 0 1 1188.3 187.6 354.4 354.4 0 0 0 977.3 471.4ZM811.4 491.9L773.1 489.4A555.9 555.9 0 0 1 946.6 109.9 504.1 504.1 0 0 0 938.1 175.9 517.9 517.9 0 0 0 811.4 491.9ZM562.9 381.4L599.5 374.8A366.4 366.4 0 0 0 378.9 82.6 185.9 185.9 0 0 0 366.4 121.2 326.3 326.3 0 0 1 562.9 381.4ZM535.3 463.1L574.1 451.5C538.7 309 435.9 199.1 305.7 164.6A338.6 338.6 0 0 1 329.9 195.3 302.9 302.9 0 0 0 296.4 207.8 343.9 343.9 0 0 1 535.3 463.1ZM688.7 486.7L726.8 483A552.6 552.6 0 0 0 543.9 109 503.8 503.8 0 0 1 554 174.7 515.1 515.1 0 0 1 688.7 486.7ZM747.8 362.8V1000L985.2 937.7 1053.3 310.5ZM747.8 362.8V1000L510.4 937.7 442.3 310.5ZM973.1 823S943.9 837.1 937.9 904.5A135.6 135.6 0 0 1 925.4 953.4L848 973.7A166.3 166.3 0 0 0 871.7 919C879 883.9 879.9 875.1 879.9 875.1S884.8 854.4 935.2 826.3A61.6 61.6 0 0 1 973.1 823ZM879.9 875.2A105 105 0 0 1 927.1 804.3C1032.3 744.5 1161.9 869.9 1161.9 869.9L1143.7 867.9 1147.7 889.3 1126.3 886.3 1135.7 907 1115.5 902.6 1120.9 918.9 1099.4 912.9 1096.5 938.4S1034.2 853.5 998.2 838.5A100.5 100.5 0 0 0 879.9 875.2ZM522.5 823.1S550.4 840.7 559.5 909A160.3 160.3 0 0 0 570.1 953.4L647.6 973.9A166.4 166.4 0 0 1 623.9 919.1C616.6 884 615.7 875.3 615.7 875.3S610.8 854.6 560.3 826.5A61.6 61.6 0 0 0 522.5 823.1ZM615.7 875.3A105.1 105.1 0 0 0 568.5 804.4C463.3 744.7 333.7 870.1 333.7 870.1L351.9 868.1 347.8 889.5 369.3 886.5 359.9 907.2 380.1 902.8 374.7 919 396.2 913.1 399.1 938.6S463.9 854.9 499.8 839.8A96.5 96.5 0 0 1 615.7 875.3ZM463.6 75.2A38.7 38.7 0 0 0 437.4 56.9L441.1 31.4A62 62 0 0 1 482.9 60.6ZM902.8 42.4A41.8 41.8 0 0 0 882.1 67.7L859.9 59.4A66.8 66.8 0 0 1 893.1 18.9ZM1096.4 123.4A32.9 32.9 0 0 0 1070.9 134.7L1056.2 118.6A52.7 52.7 0 0 1 1096.9 100.4ZM773.5 28.6A41.4 41.4 0 0 0 768.4 58.4L748.3 63.4A66.3 66.3 0 0 1 756.3 15.8ZM632.6 122.7A38.6 38.6 0 0 0 617.6 97.3L629.1 78.3A61.8 61.8 0 0 1 653 118.9ZM206 205.9A34.3 34.3 0 0 0 179.8 193.4Q179.8 181.5 179.8 169.6A55 55 0 0 1 221.6 189.6ZM1171.1 285.2A61.2 61.2 0 0 0 1138.9 287.6 83.4 83.4 0 0 1 1197.3 250.9Q1198.5 262.3 1199.6 273.8A60.3 60.3 0 0 0 1171.1 285.2ZM828.8 208.3A75.2 75.2 0 0 0 810.9 238.1 102.1 102.1 0 0 1 819.9 164.4L837.8 176.3A75.9 75.9 0 0 0 828.8 208.3ZM284 117.2A61.7 61.7 0 0 1 315.8 123.5 85.9 85.9 0 0 0 261.4 79.7L256.8 102.2A61.8 61.8 0 0 1 284 117.2ZM278.4 313.3A59.7 59.7 0 0 1 350.7 314.2L360.8 305.2A64.5 64.5 0 0 0 264.1 293.9ZM221.7 4.5L253 0 274.9 19.2 223.6 20.3ZM728.1 145.8L739 178.5 726.9 206.3 714.7 151.2ZM1240.6 60.6L1209.4 66.5 1193.7 92.1 1243 76.4Z",
- "width": 1496
+ "path": "M615.2 883H527.3V820.3H566.5A29.3 29.3 0 1 0 566.5 761.7H527.3V703.1H605.6A29.3 29.3 0 0 0 605.6 644.5H527.3V585.9H566.5A29.3 29.3 0 1 0 566.5 527.3H527.3V468.8H605.6A29.3 29.3 0 0 0 605.6 410.2H527.3V351.6H566.5A29.3 29.3 0 1 0 566.5 293H527.3V234.4H605.6A29.3 29.3 0 0 0 605.6 175.7H527.3V117.2H566.5A29.3 29.3 0 1 0 566.5 58.6H527.3V29.3A29.3 29.3 0 1 0 468.7 29.3V883H363L375.5 683.7H152.1L164.6 883H29.3A29.3 29.3 0 0 0 0 912.2V970.8A29.3 29.3 0 0 0 58.6 970.8V941.6H585.9V970.8A29.3 29.3 0 1 0 644.6 970.8V912.1A29.3 29.3 0 0 0 615.2 883ZM146.7 625H381A29.3 29.3 0 0 0 410.2 595.7V400.5A146 146 0 0 0 363.3 293.2 146.1 146.1 0 0 1 164.4 293.2 146 146 0 0 0 117.4 400.6V595.8A29.3 29.3 0 0 0 146.7 625Z",
+ "width": 645
},
"search": [
- "offer_icon"
+ "height_icon"
]
},
{
- "uid": "48bf5922e89257ff0ba5f3ae4a47297d",
- "css": "prescription_icon",
+ "uid": "0f1a73756e84a7173b6426ac45ca4a5a",
+ "css": "online_payment_icon",
"code": 59403,
"src": "custom_icons",
"selected": true,
"svg": {
- "path": "M466 297H414.1V245A19.5 19.5 0 1 0 374.9 245V297H323A19.5 19.5 0 0 0 323 336.1H374.9V388A19.5 19.5 0 0 0 414.1 388V336.1H466A19.5 19.5 0 1 0 466 297ZM394.5 144.6A171.9 171.9 0 1 0 566.4 316.5 172.1 172.1 0 0 0 394.5 144.6ZM394.5 449.3A132.8 132.8 0 1 1 527.3 316.5 133 133 0 0 1 394.5 449.3ZM783.4 179.6L609.5 5.7A19.5 19.5 0 0 0 595.7 0H58.6A58.7 58.7 0 0 0 0 58.6V941.4A58.7 58.7 0 0 0 58.6 1000H431.7A19.5 19.5 0 1 0 431.7 960.8H58.6A19.6 19.6 0 0 1 39.2 941.4V58.6A19.6 19.6 0 0 1 58.7 39.1H576.2V154.2A58.7 58.7 0 0 0 634.8 212.8H750.1V560.5A19.5 19.5 0 1 0 789.2 560.5V193.4A19.5 19.5 0 0 0 783.4 179.6ZM634.8 173.8A19.6 19.6 0 0 1 615.2 154.3V66.7L722.4 173.8H634.8ZM644.5 546.9H305.3A19.5 19.5 0 0 0 305.3 586.1H644.5A19.5 19.5 0 0 0 644.5 546.9ZM208.2 546.9H144.5A19.5 19.5 0 0 0 144.5 586.1H208.2A19.5 19.5 0 0 0 208.2 546.9ZM500 656.3H305.3A19.5 19.5 0 0 0 305.3 695.4H500A19.5 19.5 0 1 0 500 656.3ZM208.2 656.3H144.5A19.5 19.5 0 0 0 144.5 695.4H208.2A19.5 19.5 0 0 0 208.2 656.3ZM319.1 771.4A19.5 19.5 0 1 0 324.9 785.2 19.6 19.6 0 0 0 319.1 771.4ZM208.2 765.6H144.5A19.5 19.5 0 1 0 144.5 804.8H208.2A19.5 19.5 0 1 0 208.2 765.6ZM879 757.8A121.3 121.3 0 0 0 862.1 759 121.1 121.1 0 0 0 660.5 638.6L505.8 793.3A121.1 121.1 0 0 0 677 964.5L758 883.6A121.1 121.1 0 1 0 878.9 757.9ZM649.4 936.9A82 82 0 1 1 533.4 820.9L597 757.4 713 873.4ZM740.6 845.8L624.6 729.8 688.1 666.2A82 82 0 1 1 804.1 782.2ZM859.4 958.6A82 82 0 0 1 859.4 799.3ZM898.6 958.6V799.3A82 82 0 0 1 898.6 958.6Z",
- "width": 1000
+ "path": "M1214.7 273.8L1213.8 274A29 29 0 0 1 1207.2 274.8C1202 274.8 1195.9 272.2 1195.9 259.6 1195.9 253.1 1197 244.7 1206.7 244.7H1206.7A29.1 29.1 0 0 1 1213.7 246L1214.5 246.2V273.8ZM1216.2 211.5L1214.7 211.8V234.9L1213.2 234.5 1212.8 234.4A32.6 32.6 0 0 0 1204.1 232.8C1184.8 232.8 1180.7 247.5 1180.7 259.8A23.9 23.9 0 0 0 1206.6 286.3 52.5 52.5 0 0 0 1224 283.8 7.6 7.6 0 0 0 1230.5 275.5V209.1C1225.9 209.9 1221.1 210.7 1216.5 211.5M1272.2 274.3L1271.4 274.5 1268.4 275.3A30.7 30.7 0 0 1 1261.3 276.4C1256.8 276.4 1254 274.2 1254 270.3 1254 267.8 1255.2 263.6 1262.6 263.6H1272.2ZM1265.4 232.5A65.2 65.2 0 0 0 1245.7 236L1240.8 237.4 1242.4 248.7 1247.3 247.1A56.9 56.9 0 0 1 1263.4 244.3C1265.5 244.3 1272.1 244.3 1272.1 251.4V254.4H1263C1246.6 254.4 1239 259.7 1239 271 1239 280.6 1246 286.3 1257.8 286.3A60.9 60.9 0 0 0 1270.8 284.6L1271.1 284.6 1271.3 284.6 1272.8 284.8C1277.4 285.7 1282.2 286.5 1286.8 287.4V250.5C1286.8 238.6 1279.6 232.5 1265.5 232.5M1157.5 274.3L1156.7 274.5 1153.8 275.3A30.3 30.3 0 0 1 1146.6 276.4C1142.1 276.4 1139.4 274.2 1139.4 270.3 1139.4 267.8 1140.5 263.6 1147.9 263.6H1157.5L1157.5 274.3ZM1150.8 232.5A65 65 0 0 0 1131.1 236L1126.2 237.4 1127.8 248.7 1132.7 247.1A56.9 56.9 0 0 1 1148.8 244.3C1150.9 244.3 1157.5 244.3 1157.5 251.4V254.4H1148.4C1132 254.4 1124.3 259.7 1124.3 271 1124.3 280.6 1131.3 286.3 1143.2 286.3A60.9 60.9 0 0 0 1156.2 284.6L1156.5 284.6 1156.7 284.6 1158.1 284.8C1162.8 285.7 1167.5 286.5 1172.2 287.4V250.6C1172.2 238.5 1165 232.5 1150.9 232.5M1095.4 232.6A39.8 39.8 0 0 0 1079.4 236.2L1078.8 236.5 1078.3 236A24.2 24.2 0 0 0 1063.9 232.6 58.7 58.7 0 0 0 1047 235.1C1042 236.7 1040 239.1 1040 243.6V285.7H1055.7V246.8L1056.5 246.5A20 20 0 0 1 1063.4 245.3 6.2 6.2 0 0 1 1070.3 252.4V285.7H1085.7V251.8A11.4 11.4 0 0 0 1085.2 248.4L1084.7 247.4 1085.8 246.9A18.6 18.6 0 0 1 1093.5 245.3 6.3 6.3 0 0 1 1100.3 252.4V285.7H1115.7V250.9C1115.7 238.6 1109.2 232.7 1095.4 232.7M1260.6 174A53.6 53.6 0 0 1 1251.5 173.1L1250.6 173V150.3A11 11 0 0 0 1250.2 147.1L1249.7 146 1250.7 145.6C1251 145.5 1251.2 145.4 1251.5 145.3L1251.7 145.2 1252.7 144.8A1.5 1.5 0 0 1 1253.1 144.7 36.7 36.7 0 0 1 1261.2 143.8H1261.2C1270.8 143.8 1272 152.4 1272 158.8 1272 171.3 1265.7 174 1260.6 174M1260.6 130.8H1260.2A27.8 27.8 0 0 0 1238.5 138.1 14.7 14.7 0 0 0 1235.7 146.8H1235.7V170.3A6.9 6.9 0 0 1 1235.2 173.3L1234.7 174.2H1206.2V158H1206.2A24.3 24.3 0 0 0 1181 131.3H1166.6C1166 135.5 1165.5 138.5 1165 142.7H1179.2C1186.7 142.7 1190.7 149 1190.7 158.8V175.3L1189.7 174.7A10.9 10.9 0 0 0 1186.3 174.2H1161.7C1161.2 177.4 1160.6 181.4 1159.9 185.5H1235.8C1238.3 185 1241.4 184.5 1244 184.1A42.7 42.7 0 0 0 1259.8 187 25.9 25.9 0 0 0 1287 159 26.1 26.1 0 0 0 1260.6 130.8M1127.6 192.4H1128.3C1144.8 192.4 1152.5 187 1152.5 173.6A17.2 17.2 0 0 0 1133.7 156.2H1118.4A6.5 6.5 0 0 1 1111.2 149.3C1111.2 146.3 1112.3 142.7 1119.7 142.7H1152.9C1153.6 138.4 1154 135.7 1154.6 131.4H1120.2C1104.1 131.4 1096 138.1 1096 149.3S1103.1 166.2 1114.9 166.2H1130.1A7.2 7.2 0 0 1 1137.3 173.6 7.4 7.4 0 0 1 1128.8 181.2H1126.3L1077.7 181.1H1068.9C1061.4 181.1 1056.2 176.7 1056.2 167V160.2C1056.2 150 1060.2 143.6 1068.9 143.6H1083.3C1083.9 139.2 1084.3 136.5 1084.9 132.3H1065.4A24.6 24.6 0 0 0 1040.1 159.3H1040.1V167A23.3 23.3 0 0 0 1065.3 192.3H1079.6L1105.9 192.3H1127.7ZM1266.9 488.1A134.9 134.9 0 1 1 997.1 488.1H997.1A134.9 134.9 0 1 1 1266.9 488.1ZM1132 353.2A135.3 135.3 0 0 1 1266.9 488.1H1266.9A134.9 134.9 0 1 1 997 488.1M1132 353.2A135.3 135.3 0 0 1 1266.9 488.1H1266.9A134.8 134.8 0 0 1 1132 623M950.7 353.2A134.9 134.9 0 0 0 952.1 623 136.5 136.5 0 0 0 1042.8 588H1042.8A128.3 128.3 0 0 0 1056.3 573.8H1028.5A164.7 164.7 0 0 1 1018.5 560.2H1066.3A91.4 91.4 0 0 0 1074.2 545.9H1010.7A85.1 85.1 0 0 1 1004.9 531.6H1079.2A141.7 141.7 0 0 0 1086.3 488.8 184.3 184.3 0 0 0 1083.5 460.2H1000.6A104.3 104.3 0 0 1 1004.2 446H1078.4A85.1 85.1 0 0 0 1072.7 431.7H1009.9A141.6 141.6 0 0 1 1017.8 417.4H1065.6A67.9 67.9 0 0 0 1054.9 403.1H1028.5A121.7 121.7 0 0 1 1042 389.5 131.7 131.7 0 0 0 951.4 354.6C951.4 353.2 951.4 353.2 950.7 353.2ZM817.2 488.1A134.8 134.8 0 0 0 952.1 623 136.5 136.5 0 0 0 1042.7 588H1042.7A128.3 128.3 0 0 0 1056.3 573.8H1028.5A164.7 164.7 0 0 1 1018.5 560.2H1066.3A91.5 91.5 0 0 0 1074.2 545.9H1010.7A85.1 85.1 0 0 1 1004.9 531.6H1079.2A141.8 141.8 0 0 0 1086.3 488.8 184.3 184.3 0 0 0 1083.5 460.2H1000.6A104.3 104.3 0 0 1 1004.1 445.9H1078.4A85.1 85.1 0 0 0 1072.7 431.6H1009.9A141.6 141.6 0 0 1 1017.8 417.3H1065.6A67.9 67.9 0 0 0 1054.9 403.1H1028.5A121.7 121.7 0 0 1 1042 389.5 131.7 131.7 0 0 0 951.4 354.5H950.7M952.1 623A136.5 136.5 0 0 0 1042.8 588H1042.8A128.3 128.3 0 0 0 1056.3 573.8H1028.5A164.7 164.7 0 0 1 1018.5 560.2H1066.3A91.4 91.4 0 0 0 1074.2 545.9H1010.6A85.1 85.1 0 0 1 1004.9 531.6H1079.1A141.7 141.7 0 0 0 1086.3 488.8 184.3 184.3 0 0 0 1083.4 460.2H1000.7A104.3 104.3 0 0 1 1004.2 446H1078.5A85.1 85.1 0 0 0 1072.8 431.7H1009.9A141.6 141.6 0 0 1 1017.8 417.4H1065.6A67.9 67.9 0 0 0 1054.9 403.1H1028.5A121.7 121.7 0 0 1 1042 389.5 131.7 131.7 0 0 0 951.4 354.6H950.7M999.9 522.4L1002.1 510.2A30.9 30.9 0 0 1 998.5 511C993.5 511 992.8 508.1 993.5 506.6L997.9 481.6H1005.7L1007.9 468.1H1000.8L1002.2 459.5H987.9S979.3 506.6 979.3 512.3A10.7 10.7 0 0 0 990.8 524.5 21.9 21.9 0 0 0 999.9 522.4ZM1004.9 499.5A22.7 22.7 0 0 0 1029.9 524.5 37 37 0 0 0 1044.9 522.3L1047.7 508.8A42.8 42.8 0 0 1 1032.7 512.3C1017 512.3 1019.9 500.9 1019.9 500.9H1049.2A92.5 92.5 0 0 0 1051.3 488.1 19.3 19.3 0 0 0 1030.6 467.4C1015.6 466 1004.9 481.7 1004.9 499.5ZM1029.9 478.8C1037.7 478.8 1036.4 488.1 1036.4 488.8H1020.7C1020.6 488.1 1022 478.8 1029.9 478.8ZM1120.6 522.3L1123.4 506.7A35.1 35.1 0 0 1 1111.3 510.2C1101.3 510.2 1097 502.4 1097 493.8 1097 476.7 1105.6 467.4 1115.6 467.4A23.9 23.9 0 0 1 1128.4 471.7L1130.6 456.7A50.2 50.2 0 0 0 1114.2 453.2C1097.8 453.2 1081.3 467.5 1081.3 494.5 1081.3 512.3 1089.9 524.5 1107 524.5A64.1 64.1 0 0 0 1120.6 522.3ZM921.4 466A50.6 50.6 0 0 0 904.3 468.8L902.1 480.9A42.2 42.2 0 0 1 917.8 478.1C922.8 478.1 927.1 478.8 927.1 483.1 927.1 485.9 926.3 486.7 926.3 486.7H919.8C907.7 486.7 894.1 491.7 894.1 508.1 894.1 520.9 902.7 523.8 907.7 523.8A21.5 21.5 0 0 0 922.7 517.2L922 523H934.8L940.5 483.7A16.9 16.9 0 0 0 921.4 466ZM924.2 498.1C924.2 500.3 922.8 511.7 914.2 511.7A5.6 5.6 0 0 1 908.5 505.9C908.5 502.4 910.7 497.4 921.4 497.4A11.3 11.3 0 0 0 924.2 498.1ZM954.2 523.8A18.3 18.3 0 0 0 975.6 505.2C975.6 487.4 958.5 490.9 958.5 483.8 958.5 480.2 961.3 478.8 966.3 478.8 968.5 478.8 976.3 479.5 976.3 479.5L978.5 466.7A54.2 54.2 0 0 0 965 465.2C954.2 465.2 943.5 469.6 943.5 483.8 943.5 500.2 961.4 498.8 961.4 505.2 961.4 509.6 956.4 510.2 952.8 510.2A46.7 46.7 0 0 1 940 508L937.8 520.9C938.5 522.3 942.2 523.8 954.2 523.8ZM1239.1 454.5L1236.2 473.8A19.8 19.8 0 0 0 1222.7 466.7C1209.8 466.7 1198.4 482.4 1198.4 501 1198.4 512.4 1204.1 524.5 1216.2 524.5A19.1 19.1 0 0 0 1229.8 518.8L1229.1 523.8H1243.4L1254.1 455.3ZM1232.5 492.4C1232.5 500.2 1229 510.2 1221.1 510.2 1216.1 510.2 1213.3 505.9 1213.3 498.8 1213.3 487.4 1218.3 480.2 1224.7 480.2 1229.8 480.2 1232.6 483.8 1232.6 492.4ZM843.6 523.1L852.2 471.7 853.6 523.1H863.6L882.2 471.7 874.3 523.1H889.3L900.7 454.5H877.1L862.8 496.7 862.1 454.5H841.4L830 523.1ZM1064.9 523.1C1069.2 499.5 1069.9 480.2 1079.9 483.8A56.1 56.1 0 0 1 1084.9 467.4H1082C1075.5 467.4 1070.6 476 1070.6 476L1072 468.1H1058.5L1049.2 523.8H1064.9ZM1153.4 466A50.6 50.6 0 0 0 1136.3 468.8L1134.1 480.9A42.2 42.2 0 0 1 1149.8 478.1C1154.8 478.1 1159.1 478.8 1159.1 483.1 1159.1 485.9 1158.4 486.7 1158.4 486.7H1151.8C1139.7 486.7 1126.2 491.7 1126.2 508.1 1126.2 520.9 1134.7 523.8 1139.7 523.8A21.5 21.5 0 0 0 1154.7 517.2L1154 523H1166.8L1172.6 483.7A16.7 16.7 0 0 0 1153.4 466ZM1157 498.1C1157 500.3 1155.5 511.7 1147 511.7A5.6 5.6 0 0 1 1141.3 505.9C1141.3 502.4 1143.4 497.4 1154.1 497.4 1156.3 498.1 1156.3 498.1 1157 498.1ZM1184.8 523.1C1189.2 499.5 1189.8 480.2 1199.8 483.8A56 56 0 0 1 1204.8 467.4H1202C1195.4 467.4 1190.5 476 1190.5 476L1192 468.1H1178.4L1169.1 523.8H1184.8ZM977.8 512.4A10.7 10.7 0 0 0 989.2 524.5 27.2 27.2 0 0 0 999.9 522.3L1002.1 510.2A30.9 30.9 0 0 1 998.5 510.9C993.5 510.9 992.8 508.1 993.5 506.6L997.9 481.6H1005.7L1007.9 468H1000.8L1002.2 459.5M1012.1 499.5C1012.1 519.5 1018.6 524.5 1029.9 524.5A37 37 0 0 0 1044.9 522.3L1047.8 508.8A42.8 42.8 0 0 1 1032.8 512.3C1017.1 512.3 1019.9 500.9 1019.9 500.9H1049.2A92.5 92.5 0 0 0 1051.3 488.1 19.3 19.3 0 0 0 1030.7 467.4C1015.6 466 1012.1 481.7 1012.1 499.5ZM1029.9 478.8C1037.8 478.8 1039.2 488.1 1039.2 488.8H1020.6C1020.6 488.1 1022.1 478.8 1029.9 478.8ZM1120.6 522.3L1123.4 506.7A35.1 35.1 0 0 1 1111.3 510.2C1101.3 510.2 1097 502.4 1097 493.8 1097 476.7 1105.6 467.4 1115.6 467.4A23.9 23.9 0 0 1 1128.4 471.7L1130.6 456.7A50.2 50.2 0 0 0 1114.2 453.2C1097.8 453.2 1088.5 467.5 1088.5 494.5 1088.5 512.3 1089.9 524.5 1107 524.5A64.1 64.1 0 0 0 1120.6 522.3ZM902.1 481.7A42.2 42.2 0 0 1 917.8 478.8C922.8 478.8 927.1 479.5 927.1 483.8 927.1 486.7 926.4 487.4 926.4 487.4H919.8C907.7 487.4 894.2 492.4 894.2 508.8 894.2 521.7 902.7 524.5 907.7 524.5A21.5 21.5 0 0 0 922.7 518L922 523.7H934.8L940.6 484.4C940.6 468 926.3 467.3 920.6 467.3M931.3 498A23.4 23.4 0 0 1 914.2 511.6 5.6 5.6 0 0 1 908.5 505.8C908.5 502.3 910.6 497.3 921.3 497.3A58.3 58.3 0 0 0 931.4 498.1ZM938.5 522.3A60.4 60.4 0 0 0 954.9 523.8 18.3 18.3 0 0 0 976.3 505.2C976.3 487.4 959.2 490.9 959.2 483.8 959.2 480.2 962.1 478.8 967.1 478.8 969.2 478.8 977.1 479.5 977.1 479.5L979.2 466.7A54.2 54.2 0 0 0 965.7 465.2C955 465.2 951.4 469.6 951.4 483.8 951.4 500.2 962.1 498.8 962.1 505.2 962.1 509.6 957.1 510.2 953.5 510.2M1236.2 473.8A19.8 19.8 0 0 0 1222.7 466.7C1209.8 466.7 1205.5 482.4 1205.5 501 1205.5 512.4 1204.1 524.5 1216.2 524.5A19.1 19.1 0 0 0 1229.8 518.8L1229.1 523.8H1243.4L1254.1 455.3M1235.5 492.4C1235.5 500.3 1229 510.3 1221.2 510.3 1216.2 510.3 1213.4 505.9 1213.4 498.8 1213.4 487.4 1218.4 480.3 1224.8 480.3A10.9 10.9 0 0 1 1235.5 492.4ZM843.6 523.1L852.2 471.7 853.6 523.1H863.6L882.2 471.7 874.3 523.1H889.3L900.7 454.5H882.8L862.9 496.7 862.2 454.5H854.3L830 523.1ZM1049.9 523.1H1064.9C1069.2 499.5 1069.9 480.2 1079.9 483.8A56 56 0 0 1 1084.9 467.4H1082C1075.5 467.4 1070.6 476 1070.6 476L1072.1 468.1M1134.1 481.7A42.2 42.2 0 0 1 1149.8 478.8C1154.8 478.8 1159.1 479.5 1159.1 483.8 1159.1 486.7 1158.4 487.4 1158.4 487.4H1151.9C1139.7 487.4 1126.2 492.4 1126.2 508.8 1126.2 521.7 1134.7 524.5 1139.7 524.5A21.5 21.5 0 0 0 1154.7 518L1154 523.7H1166.9L1172.6 484.4C1172.6 468 1158.3 467.3 1152.6 467.3M1163.3 498A23.4 23.4 0 0 1 1146.2 511.6 5.6 5.6 0 0 1 1140.5 505.8C1140.5 502.3 1142.7 497.3 1153.3 497.3A62.8 62.8 0 0 0 1163.4 498.1ZM1169.8 523.1H1184.8C1189.2 499.5 1189.8 480.2 1199.8 483.8A56.1 56.1 0 0 1 1204.8 467.4H1202C1195.5 467.4 1190.6 476 1190.6 476L1192 468.1M440.6 102.4C438.6 108.2 405 200.6 393.7 231.3H393.7A0.6 0.6 0 0 1 393.7 231.5 15.2 15.2 0 0 1 380.5 241H362.5C373.4 211.2 398.5 142.3 413 102.4ZM734.2 171.7L722.6 203.4A15.5 15.5 0 0 1 709.2 213.3H690A51.2 51.2 0 0 0 694.9 203.4L706.5 171.7H678.7L667.2 203.4A15.6 15.6 0 0 1 653.8 213.3H634.6A50 50 0 0 0 639.5 203.4L651 171.7H623.3L611.7 203.4A15.5 15.5 0 0 1 598.3 213.3H509.7A48.6 48.6 0 0 0 514.7 203.6L517.6 195.5A25.5 25.5 0 0 0 493.7 157.8H462.2L452.1 185.6H483.7A6.7 6.7 0 0 1 490 195.5L486.9 203.6A15.2 15.2 0 0 1 473.5 213.3H427.9L417.8 241H699.4A59 59 0 0 0 750.3 203.6L762 171.7ZM297.1 241H223.8L233.9 213.3H307.2A15.7 15.7 0 0 0 320.7 203.4L323.5 195.5A6.7 6.7 0 0 0 317.2 185.6H271.7L281.8 157.8H327.3A25.5 25.5 0 0 1 351.2 195.5L348.3 203.4A59.6 59.6 0 0 1 297 241M396 561.7L421.6 417.2H461.8L436.9 561.7ZM396 561.7L428.9 417.2H461.8L436.9 561.7ZM582.2 418.9A101.8 101.8 0 0 0 545.2 412.4C505.1 412.4 476.2 432.4 476.2 461.3 476.2 483.1 496.3 494.2 512.3 501.5S533.2 513.5 533.2 519.9C533.2 529.5 520.3 534.4 509.1 534.4A87.2 87.2 0 0 1 470.6 526.3L465 523.9 459.4 556.8A130.1 130.1 0 0 0 505 564.9C547.6 564.9 575.7 544.8 575.7 514.3 575.7 497.5 565.2 484.6 541.1 474.2 526.7 467 517.8 462.9 517.8 455.7 517.8 449.2 525.1 442.9 541.1 442.9A73.6 73.6 0 0 1 571.6 448.5L575.6 450.1 582.1 418.8ZM582.2 418.9A101.8 101.8 0 0 0 545.2 412.4C505.1 412.4 483.4 432.4 483.4 461.3A42 42 0 0 0 512.3 501.5C528.3 508.7 533.2 513.5 533.2 519.9 533.2 529.5 520.3 534.4 509.1 534.4A87.2 87.2 0 0 1 470.6 526.3L465 523.9 459.4 556.8A130.1 130.1 0 0 0 505 564.9C547.6 564.9 575.7 544.8 575.7 514.3 575.7 497.5 565.2 484.6 541.1 474.2 526.7 467 517.8 462.9 517.8 455.7 517.8 449.2 525.1 442.9 541.1 442.9A73.6 73.6 0 0 1 571.6 448.5L575.6 450.1 582.1 418.8ZM651.2 417.2C641.6 417.2 634.3 418 630.3 427.6L570.1 561.7H613.5L621.5 537.6H672.9L677.7 561.7H716.2L682.5 417.2ZM632.7 513.5C635.2 506.3 648.8 471 648.8 471S652 462.1 654.4 456.5L656.8 470.2S664.8 506.3 666.4 514.3H632.7ZM660.8 417.2C651.2 417.2 644 418 640 427.6L570.1 561.7H613.5L621.5 537.6H672.9L677.7 561.7H716.2L682.5 417.2ZM632.7 513.5C636 505.5 648.8 471 648.8 471S652 462.1 654.4 456.5L656.8 470.2S664.8 506.3 666.4 514.3H632.7ZM322.1 518.3L318.1 497.4A116.3 116.3 0 0 0 261.9 434L298 562.4H341.4L406.4 418H363.1ZM322.1 518.3L318.1 497.4A116.3 116.3 0 0 0 261.9 434L298 562.4H341.4L406.4 418H371.1ZM210.6 417.2L217.8 418.8A135.3 135.3 0 0 1 318.1 497.5L303.7 429.2C301.2 419.6 294 417.2 285.2 417.2ZM210.6 417.2H210.6C261.9 429.2 304.5 460.5 318.1 496.7L304.5 439.7A19.6 19.6 0 0 0 285.2 424.5ZM210.6 417.2H210.6C261.9 429.2 304.5 460.5 318.1 496.7L308.5 465.3A28.3 28.3 0 0 0 291.6 442.1ZM362.3 513.5L335 486.2 322.1 516.7 318.9 496.6A116.3 116.3 0 0 0 262.7 433.2L298.8 561.7H342.2ZM436.9 561.7L402.5 526.3 396 561.7ZM529.2 511.9H529.2C532.4 515.1 534 517.5 533.2 520.7 533.2 530.3 520.4 535.2 509.1 535.2A87.2 87.2 0 0 1 470.6 527.2L465 524.7 459.4 557.5A130.1 130.1 0 0 0 505 565.6 79.5 79.5 0 0 0 563.7 545.5ZM575.8 561.7H613.5L621.5 537.6H672.9L677.7 561.7H716.2L702.5 503 654.4 456.4 656.8 469.3S664.8 505.4 666.4 513.4H632.7C635.9 505.4 648.8 470.9 648.8 470.9S652 462 654.4 456.4M745.6 844.7A15.6 15.6 0 0 1 730 829.2V747.1A15.6 15.6 0 0 1 761.2 747.1V829.2A15.6 15.6 0 0 1 745.6 844.7ZM803.2 844.7A15.6 15.6 0 0 1 787.7 829.2V747.1A15.6 15.6 0 1 1 818.8 747.1V829.2A15.6 15.6 0 0 1 803.2 844.7ZM860.9 844.7A15.6 15.6 0 0 1 845.3 829.2V747.1A15.6 15.6 0 1 1 876.4 747.1V829.2A15.6 15.6 0 0 1 860.9 844.7ZM210.1 698.8A18 18 0 0 1 228.3 680.6 18.2 18.2 0 0 1 246.8 698.8 18.4 18.4 0 0 1 228.3 717.3 18.2 18.2 0 0 1 210.1 698.8ZM214.2 740.7A5.1 5.1 0 0 1 219.3 735.6H238A5.1 5.1 0 0 1 243.1 740.7V837.2A5.3 5.3 0 0 1 238 842.3H219.3A5.3 5.3 0 0 1 214.2 837.2ZM260 740.6A5.1 5.1 0 0 1 265.1 735.5H273.8A4.1 4.1 0 0 1 278.1 738.8L282.1 748.7A43.1 43.1 0 0 1 316.5 733.2C350.5 733.2 359.3 756.1 359.3 782V837.2A5.3 5.3 0 0 1 354.2 842.3H335.5A5.1 5.1 0 0 1 330.4 837.2V782C330.4 768.1 324.9 759.6 311.9 759.6A23.5 23.5 0 0 0 288.8 776.2V837.2C288.8 841.2 287.2 842.3 282.1 842.3H265A5.3 5.3 0 0 1 259.9 837.2ZM371.8 835.2A4.7 4.7 0 0 1 370.5 829.4L377.4 815.5A4 4 0 0 1 383.6 813.7 43.2 43.2 0 0 0 407.2 820.6C415.3 820.6 419 817.6 419 813S413 803.7 398.9 798.2C378.3 790.3 369.1 780.6 369.1 764.4S381.3 733.2 407.4 733.2A58.1 58.1 0 0 1 439.1 741.1 6 6 0 0 1 441.4 748.5L435.4 760.7A5.3 5.3 0 0 1 428.7 762.9 51.1 51.1 0 0 0 407.4 757.6C400.3 757.6 397.3 761 397.3 764.5 397.3 769.4 402.6 771.9 412.5 776.1 433 784.4 447.8 791.8 447.8 813 447.8 829.9 433.5 844.9 406.7 844.9A59.7 59.7 0 0 1 371.8 835.2ZM465 761.4H454.6A5.1 5.1 0 0 1 449.7 756.3V740.6A4.8 4.8 0 0 1 454.6 735.5H465V706A5.3 5.3 0 0 1 470.1 700.9H489A4.9 4.9 0 0 1 493.9 706V735.5H518.8A5 5 0 0 1 523.9 740.6V756.3A5.3 5.3 0 0 1 518.8 761.4H493.8V809.6C493.8 816.8 497.3 818.3 502.5 818.3A70.6 70.6 0 0 0 518.7 814.8 4.1 4.1 0 0 1 524.7 817.6L527.7 831.7A5.2 5.2 0 0 1 524.7 837.9 84.4 84.4 0 0 1 494.7 844.9C470.8 844.9 464.8 828.9 464.8 810.4ZM570.3 774.8A78.3 78.3 0 0 1 590.9 777.8C591.3 764.2 587.4 757.7 576.1 757.7A133.7 133.7 0 0 0 546.1 761.7C542.6 762.8 540.5 760.3 540.1 757L537.8 745A4.9 4.9 0 0 1 541.2 738.5 134.9 134.9 0 0 1 577.7 733.2C611 733.2 618 750.6 618 779.6V837.2A5.1 5.1 0 0 1 612.9 842.2H605C603.2 842.2 601.8 841.5 600.4 838.5L597.4 831.4A46.8 46.8 0 0 1 563.9 844.8 34 34 0 0 1 527.8 808.3C527.8 789.4 543.3 774.8 570.3 774.8ZM571 823.3A22.9 22.9 0 0 0 590.2 812V796.3A42.5 42.5 0 0 0 574.5 793.1C562.2 793.1 555.5 798.8 555.5 808.3A14.1 14.1 0 0 0 571 823.4ZM634.1 685.7A5.5 5.5 0 0 1 639.2 680.6H657.9A5.5 5.5 0 0 1 663 685.7V837.2A5.3 5.3 0 0 1 657.9 842.3H639.2A5.3 5.3 0 0 1 634.1 837.2ZM680.3 685.7A5.5 5.5 0 0 1 685.4 680.6H704.1A5.5 5.5 0 0 1 709.2 685.7V837.2A5.3 5.3 0 0 1 704.1 842.3H685.4A5.3 5.3 0 0 1 680.3 837.2ZM944.7 733.2A47.8 47.8 0 0 1 993.7 782.7C993.7 784.3 993.4 788 993.2 789.6A5.4 5.4 0 0 1 988.1 794.5H919.7A25.7 25.7 0 0 0 946.3 819.2 35.4 35.4 0 0 0 969.2 811.4C971.7 809.2 974.5 809.1 976.1 811.4L985.1 823.4A4.5 4.5 0 0 1 984.7 830.3 60.3 60.3 0 0 1 944.9 844.9 55.8 55.8 0 0 1 944.7 733.3ZM964.5 775.5A19.6 19.6 0 0 0 944 757 21.2 21.2 0 0 0 921.3 775.5ZM1002.7 740.6A5.1 5.1 0 0 1 1007.8 735.5H1016.5A4.1 4.1 0 0 1 1020.8 738.8L1024.7 748.7A43.1 43.1 0 0 1 1059.2 733.2C1093.2 733.2 1101.9 756.1 1101.9 782V837.2A5.3 5.3 0 0 1 1096.8 842.3H1078.1A5.1 5.1 0 0 1 1073 837.2V782C1073 768.1 1067.5 759.6 1054.6 759.6A23.5 23.5 0 0 0 1031.5 776.2V837.2C1031.5 841.2 1029.8 842.3 1024.8 842.3H1007.7A5.3 5.3 0 0 1 1002.6 837.2ZM1124 761.4H1113.6A5.1 5.1 0 0 1 1108.7 756.3V740.6A4.8 4.8 0 0 1 1113.6 735.5H1124V706A5.3 5.3 0 0 1 1129.1 700.9H1148A4.9 4.9 0 0 1 1152.9 706V735.5H1177.8A5 5 0 0 1 1182.9 740.6V756.3A5.3 5.3 0 0 1 1177.8 761.4H1152.9V809.6C1152.9 816.8 1156.3 818.3 1161.6 818.3A70.6 70.6 0 0 0 1177.7 814.8 4.1 4.1 0 0 1 1183.7 817.6L1186.7 831.7A5.2 5.2 0 0 1 1183.7 837.9 84.3 84.3 0 0 1 1153.7 844.9C1129.9 844.9 1123.9 828.9 1123.9 810.4ZM1191 835.2A4.7 4.7 0 0 1 1189.6 829.4L1196.5 815.5A4 4 0 0 1 1202.8 813.7 43.2 43.2 0 0 0 1226.3 820.6C1234.4 820.6 1238.1 817.6 1238.1 813S1232.1 803.7 1218 798.2C1197.5 790.3 1188.2 780.6 1188.2 764.4S1200.5 733.2 1226.6 733.2A58.1 58.1 0 0 1 1258.2 741.1 6 6 0 0 1 1260.5 748.5L1254.5 760.7A5.3 5.3 0 0 1 1247.8 762.9 51.1 51.1 0 0 0 1226.6 757.6C1219.4 757.6 1216.4 761 1216.4 764.5 1216.4 769.4 1221.7 771.9 1231.6 776.1 1252.2 784.4 1267 791.8 1267 813 1267 829.9 1252.7 844.9 1225.8 844.9A59.7 59.7 0 0 1 1191 835.2ZM892.2 863A0.8 0.8 0 0 1 893 862.2H901.7A8.9 8.9 0 1 1 901.7 879.9H895.2V889.3A0.8 0.8 0 0 1 894.4 890H892.9A0.8 0.8 0 0 1 892.2 889.3ZM901.6 877A5.9 5.9 0 0 0 907.6 870.9 5.7 5.7 0 0 0 901.6 865.2H895.3V877ZM922.3 871.3A9.6 9.6 0 1 1 913.1 880.8 9.5 9.5 0 0 1 922.3 871.3ZM922.3 887.8A7 7 0 1 0 916 880.8 6.5 6.5 0 0 0 922.3 887.8ZM947.1 876.2L941.7 890A0.7 0.7 0 0 1 940.9 890.5H940.7A0.8 0.8 0 0 1 939.9 890L934.8 872.6C934.6 872 934.8 871.5 935.5 871.5H936.8A0.8 0.8 0 0 1 937.7 872.1L941 884.5H941L946.2 871.5A0.8 0.8 0 0 1 947 871.1H947.2A0.8 0.8 0 0 1 948 871.5L953.1 884.5H953.1L956.5 872A0.7 0.7 0 0 1 957.3 871.5H958.8C959.5 871.5 959.7 871.9 959.5 872.5L954.5 889.9A0.8 0.8 0 0 1 953.7 890.4H953.5A0.9 0.9 0 0 1 952.7 889.9L947.1 876.2ZM971.7 871.3A8.1 8.1 0 0 1 980 879.6 10.1 10.1 0 0 1 980 880.7 0.8 0.8 0 0 1 979.2 881.5H965.8A6.5 6.5 0 0 0 971.8 887.8 8.5 8.5 0 0 0 976.8 886.3C977.5 885.8 977.7 885.7 978.2 886.4L978.7 887C979.1 887.6 979.2 887.8 978.5 888.3A11.3 11.3 0 0 1 971.8 890.5 9.6 9.6 0 0 1 971.8 871.3ZM977.1 879.2A5.4 5.4 0 0 0 971.7 873.9 6 6 0 0 0 965.8 879.2ZM984.7 872.5A0.9 0.9 0 0 1 985.6 871.7H986.2A0.8 0.8 0 0 1 987 872.3L987.3 873.6A7.3 7.3 0 0 1 993 871.3C994.4 871.3 996.6 871.5 996.2 872.7L995.7 874.2A0.7 0.7 0 0 1 994.6 874.6 4.6 4.6 0 0 0 992.6 874.1 5.8 5.8 0 0 0 987.7 876.4V889.2A0.9 0.9 0 0 1 986.8 890H985.6A0.9 0.9 0 0 1 984.7 889.2ZM1007.3 871.3A8.1 8.1 0 0 1 1015.6 879.6 9.8 9.8 0 0 1 1015.6 880.7 0.8 0.8 0 0 1 1014.8 881.5H1001.4A6.5 6.5 0 0 0 1007.4 887.8 8.5 8.5 0 0 0 1012.4 886.3C1013 885.8 1013.3 885.7 1013.8 886.4L1014.3 887C1014.6 887.6 1014.8 887.8 1014.1 888.3A11.3 11.3 0 0 1 1007.4 890.5 9.6 9.6 0 0 1 1007.4 871.3ZM1012.7 879.2A5.4 5.4 0 0 0 1007.3 873.9 6 6 0 0 0 1001.4 879.2ZM1028 871.3A11.3 11.3 0 0 1 1033.1 872.4V863.1A0.9 0.9 0 0 1 1033.9 862.2H1035A1 1 0 0 1 1036 863.1V889.2A0.9 0.9 0 0 1 1035 890H1034.3C1033.9 890 1033.7 889.7 1033.5 889.3L1033.3 888.1A8.8 8.8 0 0 1 1027.5 890.5 9 9 0 0 1 1019.3 880.8 8.7 8.7 0 0 1 1028 871.3ZM1027.9 887.8A6.8 6.8 0 0 0 1033.1 884.8V875A12.1 12.1 0 0 0 1028.4 873.9 6.3 6.3 0 0 0 1022.2 880.8 6.4 6.4 0 0 0 1027.9 887.8ZM1051.7 863.1A0.9 0.9 0 0 1 1052.6 862.2H1053.8A0.9 0.9 0 0 1 1054.6 863.1V872.4A11.1 11.1 0 0 1 1059.7 871.3 8.7 8.7 0 0 1 1068.4 880.8 9 9 0 0 1 1060.2 890.5 8 8 0 0 1 1054.4 888.1L1054.2 889.3A0.8 0.8 0 0 1 1053.3 890H1052.6A0.9 0.9 0 0 1 1051.8 889.2ZM1059.8 887.8A6.3 6.3 0 0 0 1065.4 880.8 6.3 6.3 0 0 0 1059.3 873.9 10.9 10.9 0 0 0 1054.6 875.1V884.8A6.8 6.8 0 0 0 1059.7 887.8ZM1071.1 872.7C1070.8 872.1 1071.1 871.7 1071.8 871.7H1073.5A0.8 0.8 0 0 1 1074.3 872.2L1079.5 886.8H1079.5L1085.7 872.2A0.8 0.8 0 0 1 1086.5 871.7H1088C1088.7 871.7 1089 872.1 1088.7 872.7L1077.2 898.9A1 1 0 0 1 1076.4 899.5H1075C1074.3 899.5 1073.9 899 1074.2 898.4L1077.8 890ZM1102.1 863A0.8 0.8 0 0 1 1102.8 862.2H1111.5A8.9 8.9 0 1 1 1111.5 879.9H1105V889.3A0.8 0.8 0 0 1 1104.3 890H1102.8A0.8 0.8 0 0 1 1102 889.3ZM1111.4 877A5.9 5.9 0 0 0 1117.5 870.9 5.7 5.7 0 0 0 1111.4 865.2H1105.1V877ZM1120.4 889L1132.5 862.2A0.7 0.7 0 0 1 1133.2 861.8H1133.6A0.7 0.7 0 0 1 1134.2 862.2L1146.2 889A0.7 0.7 0 0 1 1145.6 890H1144A0.7 0.7 0 0 1 1143.3 889.6L1140.4 883H1126.3L1123.4 889.6A0.7 0.7 0 0 1 1122.7 890H1121.1A0.7 0.7 0 0 1 1120.4 889ZM1139.3 880.6C1137.3 876.2 1135.4 871.9 1133.5 867.5H1133.2L1127.3 880.6ZM1154.2 876.7L1144.6 863.4A0.7 0.7 0 0 1 1145.2 862.3H1147.1A0.8 0.8 0 0 1 1147.7 862.6L1155.8 873.7 1163.8 862.6A0.8 0.8 0 0 1 1164.4 862.3H1166.3A0.7 0.7 0 0 1 1166.9 863.4L1157.2 876.7V889.3A0.8 0.8 0 0 1 1156.5 890.1H1154.9A0.8 0.8 0 0 1 1154.2 889.3ZM1171 863A0.8 0.8 0 0 1 1171.7 862.2H1187.4A0.8 0.8 0 0 1 1188.1 863V864.1A0.8 0.8 0 0 1 1187.4 864.9H1174V875.7H1185.4A0.8 0.8 0 0 1 1186.2 876.5V877.7A0.8 0.8 0 0 1 1185.4 878.4H1174V889.3A0.8 0.8 0 0 1 1173.3 890H1171.7A0.8 0.8 0 0 1 1171 889.3ZM1205.5 861.8A14.3 14.3 0 1 1 1191.2 876.2 14.3 14.3 0 0 1 1205.5 861.8ZM1205.5 887.6A11.5 11.5 0 1 0 1194 876.2 11.5 11.5 0 0 0 1205.5 887.6ZM1225.6 863A0.8 0.8 0 0 1 1226.4 862.2H1236.7A8.5 8.5 0 0 1 1245.3 870.7 8.9 8.9 0 0 1 1239.5 878.8L1244.9 888.8A0.8 0.8 0 0 1 1244.2 890H1242.3A0.8 0.8 0 0 1 1241.4 889.4L1236.3 879.1H1228.7V889.3A0.8 0.8 0 0 1 1227.9 890H1226.4A0.8 0.8 0 0 1 1225.6 889.3ZM1236.5 876.5A5.7 5.7 0 1 0 1236.5 865.1H1228.8V876.5ZM1256.1 864.9H1249.2A0.8 0.8 0 0 1 1248.4 864.1V863A0.8 0.8 0 0 1 1249.2 862.2H1266A0.8 0.8 0 0 1 1266.8 863V864.1A0.8 0.8 0 0 1 1266 864.9H1259.1V889.3A0.8 0.8 0 0 1 1258.3 890H1256.8A0.8 0.8 0 0 1 1256.1 889.3Z",
+ "width": 1478
},
"search": [
- "prescription_icon"
+ "online_payment_icon"
]
},
{
- "uid": "fce0d47a8f283966d22c8450b4c63f70",
- "css": "search_scan_icon",
- "code": 59404,
+ "uid": "3238628d101e2f79eeaaf407332b3052",
+ "css": "vital_sign_icon",
+ "code": 59405,
"src": "custom_icons",
"selected": true,
"svg": {
- "path": "M846.2 544.3A19.5 19.5 0 0 1 828.4 532.9 74.4 74.4 0 0 0 729.8 496.2 19.5 19.5 0 0 1 713.5 460.7 113.5 113.5 0 0 1 863.9 516.6 19.5 19.5 0 0 1 846.2 544.3ZM185.6 174.1V500A19.5 19.5 0 0 0 224.7 500V174.1A19.5 19.5 0 0 0 185.6 174.1ZM305.5 465.2V174.1A19.5 19.5 0 0 0 266.4 174.1V465.2A19.5 19.5 0 0 0 305.5 465.2ZM347.2 454.6A19.5 19.5 0 0 0 386.3 454.6V453.1A19.5 19.5 0 1 0 347.2 453.1ZM366.7 389.9A19.5 19.5 0 0 0 386.2 370.4V174.1A19.5 19.5 0 0 0 347.2 174.1V370.4A19.5 19.5 0 0 0 366.7 389.9ZM467 500V174.1A19.5 19.5 0 0 0 428 174.1V500A19.5 19.5 0 1 0 467 500ZM528.3 389.9A19.5 19.5 0 0 0 547.8 370.4V174.1A19.5 19.5 0 1 0 508.7 174.1V370.4A19.5 19.5 0 0 0 528.3 389.9ZM508.7 454.6A19.5 19.5 0 0 0 547.8 454.6V453.1A19.5 19.5 0 1 0 508.7 453.1ZM249.5 96.4A19.5 19.5 0 0 0 230 76.9H96.3A19.5 19.5 0 0 0 76.8 96.4V230.3A19.5 19.5 0 1 0 115.9 230.3V116H230A19.5 19.5 0 0 0 249.5 96.4ZM76.8 597.8A19.5 19.5 0 0 0 96.3 617.3H230A19.5 19.5 0 0 0 230 578.2H115.9V463.9A19.5 19.5 0 1 0 76.8 463.9ZM798.7 249.8A19.5 19.5 0 0 0 818.2 230.3V96.4A19.5 19.5 0 0 0 798.7 76.9H665A19.5 19.5 0 0 0 665 116H779.1V230.3A19.5 19.5 0 0 0 798.7 249.8ZM993.4 896.6L944.6 790.7A19.5 19.5 0 0 0 918.7 781.1L888.1 795.2 859.6 732.9A196 196 0 0 0 895 421.4V52.9A52.9 52.9 0 0 0 842.3 0H52.8A52.9 52.9 0 0 0-0.1 52.9V259.3A19.5 19.5 0 0 0 39 259.3V52.9A13.8 13.8 0 0 1 52.7 39.1H842.3A13.8 13.8 0 0 1 856 52.9V392.8A198.1 198.1 0 0 0 829.1 380.3 193.8 193.8 0 0 0 709.5 374.9V174.1A19.5 19.5 0 1 0 670.4 174.1V390.5A194.3 194.3 0 0 0 628.6 419.9V174.1A19.5 19.5 0 0 0 589.5 174.1V469.9A195.7 195.7 0 0 0 583.2 645.4C584.7 648.7 586.3 651.9 588 655.1H52.8A13.8 13.8 0 0 1 39.1 641.3V434.9A19.5 19.5 0 1 0-0.1 434.9V641.4A52.9 52.9 0 0 0 52.7 694.3H614.8A194.8 194.8 0 0 0 824 749.2L852.5 811.7 821.8 825.9A19.5 19.5 0 0 0 812.3 851.8L861 957.8A72.8 72.8 0 0 0 993.3 896.8ZM826 706.4A156.2 156.2 0 0 1 618.7 629.2 156.9 156.9 0 0 1 695.8 421.5 156.5 156.5 0 0 1 862.7 444.9L863.1 445.3A156.9 156.9 0 0 1 826 706.4ZM941.3 957.8A33.2 33.2 0 0 1 915.7 958.8 33.6 33.6 0 0 1 896.6 941.3L856 853 917.3 824.9 957.8 913A33.9 33.9 0 0 1 941.2 958ZM19.5 366.7A19.5 19.5 0 1 0-0.1 347V347A19.5 19.5 0 0 0 19.5 366.7Z",
- "width": 1000
+ "path": "M1145 758.4A14.1 14.1 0 0 0 1130.9 772.5 51.9 51.9 0 0 1 1079 824.3H275.7A51.9 51.9 0 0 1 223.9 772.4V232.3A51.9 51.9 0 0 1 275.7 180.5H725.2A14.1 14.1 0 0 0 725.2 152.2H275.7A80.2 80.2 0 0 0 195.7 232.3V772.4A80.2 80.2 0 0 0 275.7 852.5H1079A80.2 80.2 0 0 0 1159.1 772.4 14.1 14.1 0 0 0 1145 758.4ZM1079 152.2H792.5A14.1 14.1 0 0 0 792.5 180.4H1079A51.9 51.9 0 0 1 1130.8 232.3V704.7A14.1 14.1 0 0 0 1159.1 704.7V232.3A80.2 80.2 0 0 0 1079 152.2ZM907.5 585V300.1A36.8 36.8 0 0 0 870.8 263.3H477A14.1 14.1 0 1 0 477 291.6H870.7A8.5 8.5 0 0 1 879.2 300.1V421.1H821.6L799.2 398.7A19.8 19.8 0 0 0 771.2 398.7L712 458 689.3 435.3A19.8 19.8 0 0 0 661.3 435.3L622.9 473.6 521.1 371.8A19.8 19.8 0 0 0 493.1 371.8L443.8 421.1H352.5V300.1A8.5 8.5 0 0 1 361 291.6H406.6A14.1 14.1 0 1 0 406.6 263.3H361A36.8 36.8 0 0 0 324.2 300.1V585A36.8 36.8 0 0 0 361 621.8H870.7A36.8 36.8 0 0 0 907.5 585ZM352.6 585V449.3H447.3A19.6 19.6 0 0 0 461.3 443.5L507.1 397.8 608.9 499.6A19.8 19.8 0 0 0 636.9 499.6L675.2 461.2 697.9 484A19.8 19.8 0 0 0 725.9 484L785.2 424.7 804 443.6A19.6 19.6 0 0 0 818 449.4H879.2V585.1A8.5 8.5 0 0 1 870.7 593.5H361.1A8.5 8.5 0 0 1 352.6 585.1ZM637.6 716.5A57.6 57.6 0 1 0 695.2 658.9 57.7 57.7 0 0 0 637.6 716.5ZM724.5 716.5A29.3 29.3 0 1 1 695.2 687.2 29.4 29.4 0 0 1 724.5 716.5ZM431.7 696.3A57.6 57.6 0 1 0 431.7 736.6 57.6 57.6 0 1 0 431.7 696.3ZM377.8 745.8A29.3 29.3 0 1 1 407.1 716.5 29.4 29.4 0 0 1 377.8 745.8ZM515 716.5A29.3 29.3 0 1 1 485.7 687.2 29.4 29.4 0 0 1 515 716.5Z",
+ "width": 1348
},
"search": [
- "search_scan_icon"
+ "vital_sign_icon"
]
},
{
- "uid": "4aab61c6fa11812333db81c2bb204c83",
- "css": "share_icon",
- "code": 59405,
+ "uid": "e714a92298dafff5fead849df18d449b",
+ "css": "weight_icon",
+ "code": 59406,
"src": "custom_icons",
"selected": true,
"svg": {
- "path": "M872.7 173.8A139.7 139.7 0 1 1 732.9 34.1 139.7 139.7 0 0 1 872.7 173.8ZM313.7 500A139.7 139.7 0 1 1 173.8 360.2 139.7 139.7 0 0 1 313.7 500ZM872.7 826.1A139.7 139.7 0 1 1 732.9 686.4 139.7 139.7 0 0 1 872.7 826.1ZM294.6 570.3L612.8 755.8M612.3 244.2L294.6 429.7",
- "width": 907
+ "path": "M491.7 0A263 263 0 0 1 716.9 127Q794.5 140.1 882.6 162A131.3 131.3 0 0 1 982.2 303.3L922.3 881.9A132 132 0 0 1 791.4 1000.1H191.9A131.6 131.6 0 0 1 61 881.9L1.1 303.2A118.4 118.4 0 0 1 100.7 162Q184.1 141.4 266.3 127A263 263 0 0 1 491.7 0ZM240.1 185.1Q151.9 203.4 113.1 212.9A79.2 79.2 0 0 0 53.5 297.7L113.4 876.5A79.8 79.8 0 0 0 191.9 947.3H791.7A80.5 80.5 0 0 0 870.2 876.5L929.9 297.7A78.8 78.8 0 0 0 870.1 212.9Q817.9 200.2 743.1 185.2A253.9 253.9 0 0 1 754.8 263.2 263.1 263.1 0 0 1 228.5 263.2 252.6 252.6 0 0 1 240.1 185.1ZM491.7 52.5A210.5 210.5 0 1 0 702.2 263.1 211.1 211.1 0 0 0 491.7 52.5ZM491.7 105.1A27 27 0 0 1 518 131.3V262.9A26.3 26.3 0 0 1 491.7 289.2 25.9 25.9 0 0 1 465.4 262.9V131.6A26.3 26.3 0 0 1 491.7 105.1Z",
+ "width": 983
},
"search": [
- "share_icon"
+ "weight_icon"
]
},
{
- "uid": "65fb587059226e09ea7e14cd39772bb1",
- "css": "wishlist_add_icon",
- "code": 59406,
+ "uid": "48c8955311a2a09660e070396941b78b",
+ "css": "search_medicine_icon",
+ "code": 59404,
"src": "custom_icons",
"selected": true,
"svg": {
- "path": "M785.4 0A320.4 320.4 0 0 0 541.7 114.3 320.4 320.4 0 0 0 297.9 0 294.5 294.5 0 0 0 0 299.7C0 506.8 184.1 673 463 929.4L541.7 1000.3 620.4 929.4C899.2 673.2 1083.4 507.1 1083.4 299.7A294.5 294.5 0 0 0 785.4 0Z",
- "width": 1083
+ "path": "M442.2 620.3A223.9 223.9 0 1 0 369.1 547.3L195.7 720.8 268.7 793.8ZM559.5 240.6A189.3 189.3 0 1 1 370.2 429.9 189.5 189.5 0 0 1 559.5 240.6ZM389.7 575.4A226.8 226.8 0 0 0 414 599.7L377.3 636.5 353 612.1ZM328.7 636.5L353 660.8 268.7 745.1 244.3 720.8ZM328.7 636.5M571.7 515.1L644.7 442.1A68.8 68.8 0 1 0 547.4 344.7L474.3 417.7A68.8 68.8 0 1 0 571.7 515.1ZM571.7 369.1A34.4 34.4 0 0 1 620.4 417.7L596 442.1 547.4 393.4ZM498.7 442.1L523 417.7 571.7 466.4 547.4 490.8A34.4 34.4 0 0 1 498.7 442.1ZM498.7 442.1",
+ "width": 1000
},
"search": [
- "wishlist_add_icon"
+ "search_medicine_icon"
]
},
{
- "uid": "c752092fa3a1a55f5bc0ae60f4beb4c7",
- "css": "wishlist_icon",
+ "uid": "2cfd058dc6a521015f26957251d5f9dd",
+ "css": "my_medical_file",
"code": 59407,
"src": "custom_icons",
"selected": true,
"svg": {
- "path": "M785.4 0A320.4 320.4 0 0 0 541.7 114.3 320.4 320.4 0 0 0 297.9 0 294.5 294.5 0 0 0 0 299.7C0 506.8 184.1 673 463 929.4L541.7 1000.3 620.4 929.4C899.2 673.2 1083.4 507.1 1083.4 299.7A294.5 294.5 0 0 0 785.4 0ZM575 857.5L564 867.7 541.6 888 519.2 867.7 508.2 857.5A3310.1 3310.1 0 0 1 188.7 539.8 382.1 382.1 0 0 1 83.6 299.7 216.7 216.7 0 0 1 145.4 145.3 211.9 211.9 0 0 1 298 83.4 238.8 238.8 0 0 1 478 168L541.7 243.8 605.5 168A237.9 237.9 0 0 1 785.4 83.4 212.9 212.9 0 0 1 938.3 145.3 217.1 217.1 0 0 1 1000.1 299.7 384.1 384.1 0 0 1 894.8 539.8 3316.8 3316.8 0 0 1 575 857.5Z",
- "width": 1083
+ "path": "M730.5 105.5H609.8A88.9 88.9 0 0 0 531.4 58.6H469.3A78.1 78.1 0 0 0 318.2 58.6H256.1A88.9 88.9 0 0 0 177.7 105.5H58.6A58.8 58.8 0 0 0 0 164.1V941.6A58.8 58.8 0 0 0 58.6 1000.1H730.6A58.8 58.8 0 0 0 789.1 941.6V164.1A58.8 58.8 0 0 0 730.5 105.5ZM206.1 147.4A49.8 49.8 0 0 1 256 97.6H335A19.6 19.6 0 0 0 354.6 78.1 39.1 39.1 0 1 1 432.7 78.1 19.6 19.6 0 0 0 452.2 97.6H531.3A50 50 0 0 1 578.2 130.6C578.2 130.8 578.4 131 578.4 131.4A49.6 49.6 0 0 1 581.3 147.7V178.3A21 21 0 0 1 560.2 199.4H227.3A21 21 0 0 1 206.3 178.3ZM656.1 238.3V869.7H133.4V238.3ZM750 941.6A19.6 19.6 0 0 1 730.5 961.1H58.4A19.6 19.6 0 0 1 38.9 941.6V164.1A19.6 19.6 0 0 1 58.4 144.5H167V178.1A58.6 58.6 0 0 0 171 199.2H113.7A19.6 19.6 0 0 0 94.2 218.7V889.1A19.6 19.6 0 0 0 113.7 908.6H675.7A19.6 19.6 0 0 0 695.2 889.1V218.7A19.6 19.6 0 0 0 675.7 199.4H616.4A58.6 58.6 0 0 0 620.3 178.3V144.7H730.5A19.6 19.6 0 0 1 750 164.2ZM407.3 111.1A19.3 19.3 0 0 0 393.4 105.5 20.5 20.5 0 0 0 379.5 111.1 19.3 19.3 0 0 0 373.9 125 20.5 20.5 0 0 0 379.5 138.9 19.3 19.3 0 0 0 393.4 144.5 20.5 20.5 0 0 0 407.3 138.9 19.8 19.8 0 0 0 407.3 111.1ZM500 753.9H209.6A19.5 19.5 0 1 0 209.6 793H500A19.5 19.5 0 1 0 500 753.9ZM593 759.6A19.3 19.3 0 0 0 579.1 753.9 20.2 20.2 0 0 0 565.2 759.6 19.3 19.3 0 0 0 559.6 773.4 20.2 20.2 0 0 0 565.2 787.3 19.3 19.3 0 0 0 579.1 793 20.2 20.2 0 0 0 593 787.3 19.8 19.8 0 0 0 593 759.6ZM579.5 675.8H209.6A19.5 19.5 0 0 0 209.6 714.8H579.5A19.5 19.5 0 0 0 579.5 675.8ZM511.9 616.4H275.6A40.3 40.3 0 0 1 235.4 576.2V339.8A40.3 40.3 0 0 1 275.6 299.6H511.9A40.3 40.3 0 0 1 552.2 339.8V576.2A40.6 40.6 0 0 1 511.9 616.4ZM300.6 564.7L359.7 564.9C367.1 564.9 372.6 557.2 373 546.4V497.1C373 486.2 377.9 478.3 385.1 477.7L403.2 477.5C410.4 477.9 415.5 486.1 415.5 496.9V546.5C415.9 557.2 420.9 564.5 427.9 564.5L507.6 564.6 507.7 503.5C507.7 492.8 502.6 484.7 495.4 484.3L463.5 484.2C456.1 484.2 450.8 476.5 450.6 465.8L450.4 449.1C450.8 438.5 456.3 430.7 463.5 430.7H495.7C502.6 430.3 507.8 421.9 507.8 411.1V335.3A32.2 32.2 0 0 1 483.3 350.6H429.1C421.7 350.6 416.2 358.6 415.8 369.1V418.2C415.4 428.9 410 436.6 402.9 436.6L386.6 436.4C379.2 436.4 373.9 428.8 373.4 418.3V368.9C373 358.2 367.7 350.8 360.4 350.8H281.8V411.7C281.8 422.8 286.9 430.7 294.2 431.1L326.4 430.9C333.4 431.3 338.9 439.8 338.9 450.4V464.5C338.9 475.3 333.7 483.4 326.6 483.8H294.4C287 484.4 282.1 492.3 282.1 503.2L281.7 564.6Z",
+ "width": 789
},
"search": [
- "wishlist_icon"
+ "my_medical_file"
]
},
{
- "uid": "88b990d06e49752b331bb5c6704b3d42",
- "css": "bg_1",
+ "uid": "40c03b22028e1b34f230c522b40ca125",
+ "css": "family",
"code": 59408,
"src": "custom_icons",
"selected": true,
"svg": {
- "path": "M80.6 6.2H2052.5A74.4 74.4 0 0 1 2126.9 80.6V923.9A74.4 74.4 0 0 1 2052.5 998.3H80.6A74.4 74.4 0 0 1 6.2 923.9V80.6A74.4 74.4 0 0 1 80.6 6.2ZM1063.2 993.8H1037.3L1039 992.1 1036 993.8H987.3L1020.5 981.6 889 993.8H29.8A52.5 52.5 0 0 1 6.2 946.5V867.8L1027.4 962.7 6.2 565.1V321L1034.3 947 89.8 6.2H367.8L1039.9 927.1 645.9 6.2H809L1059.9 937.4 996.5 6.2H1136.5L1074.3 920.2V920.2L1335.1 6.2H1499.5L1081.7 942.6 1765.2 6.2H2043.3L1103.6 942.1V942.1L1103.6 942.1 2126.9 344.5V586.4L1102.1 963.1 2126.9 867.9V946.5A52.5 52.5 0 0 1 2103.3 993.8H1243.6L1103.2 980.8 1136.7 993.8H1063.2Z",
- "width": 2133
+ "path": "M1255.3 571.5A27.7 27.7 0 0 0 1211.5 605.3 207.6 207.6 0 0 1 1255 733.1 27.7 27.7 0 1 0 1310.4 733.1 262.5 262.5 0 0 0 1255.3 571.5ZM1162.3 385.9A210.9 210.9 0 1 0 926.7 385.9 364.6 364.6 0 0 0 813.6 448.4 155.5 155.5 0 0 0 597.6 448.4 364.8 364.8 0 0 0 484.5 385.9 210.9 210.9 0 1 0 248.9 385.9 367.5 367.5 0 0 0 0 732.4C0 732.6 0 732.8 0 733.1 0 775.5 24.1 838.2 139.1 895.7A1060.2 1060.2 0 0 0 464.8 984.6 1904.1 1904.1 0 0 0 946.5 984.6 1059.9 1059.9 0 0 0 1272.3 895.7C1387.3 838.3 1411.4 775.6 1411.4 733.1A367.5 367.5 0 0 0 1162.3 385.9ZM889 211A155.5 155.5 0 1 1 1044.5 366.5 155.5 155.5 0 0 1 889.1 210.9ZM623 503.3A100.5 100.5 0 0 1 788.2 503.3H788.2A100.5 100.5 0 1 1 623 503.3ZM211.1 210.9A155.5 155.5 0 1 1 366.6 366.4 155.5 155.5 0 0 1 211.1 210.9ZM440.8 925.4A960.1 960.1 0 0 1 163.9 846.2C94.1 811.3 55.5 771.3 55.5 733.4 55.5 733.4 55.5 733.4 55.5 733.1A311.3 311.3 0 0 1 565.3 493.2 155.8 155.8 0 0 0 606.4 680.5 265.2 265.2 0 0 0 440.8 925.4ZM915.2 932.8A1857 1857 0 0 1 496.1 932.8V926A209.5 209.5 0 0 1 915.2 926ZM1247.4 846.2A959.9 959.9 0 0 1 970.5 925.4 265.3 265.3 0 0 0 805.1 680.3 155.7 155.7 0 0 0 846.2 493 311.3 311.3 0 0 1 1356 732.9C1356 771.1 1317.4 811.2 1247.4 846.2ZM1172.6 506.5A27.7 27.7 0 0 0 1172.6 561.8 27.7 27.7 0 0 0 1172.6 506.5Z",
+ "width": 1411
},
"search": [
- "bg_1"
+ "family"
]
},
{
- "uid": "ace5228aabf92ff4bf5524cef4c6409f",
- "css": "bg_2",
+ "uid": "28e30de5c20857758e187ef8e56eddc1",
+ "css": "calendar-(2)",
"code": 59409,
"src": "custom_icons",
"selected": true,
"svg": {
- "path": "M75 1000A75 75 0 0 1 0 925V75A75 75 0 0 1 75 0H2062.5A75 75 0 0 1 2137.5 75V925A75 75 0 0 1 2062.5 1000ZM2142 792.6C2084.5 793.1 2087.9 773.2 2043.5 760.2S1990.1 764.4 1953.4 739.3 1930.2 698.9 1905.4 667 1863.7 645 1847.6 605.3 1850.5 559.6 1845.2 519.5 1820.1 479 1824.9 436.1 1848.9 397.8 1863.1 360.3 1860.4 312.2 1886.3 277.7 1926 257.1 1960.1 232.7 1984.7 190.3 2031.5 175.4 2082.4 179.8 2136.4 179.3M2141.7 750.7C2091.8 751.2 2095.1 731.3 2057.1 720.2S2009.8 726.4 1977.9 704.4 1959.6 667.4 1938.2 640 1900 622.7 1886 588.1 1890.9 547.8 1886.4 513.3 1862.3 478.7 1866.5 441.5 1889.7 409.1 1902 376.8 1897.2 334 1919.7 304.1 1956 288 1985.3 267.1 2005.1 228.2 2045.8 215.3 2090.2 221.5 2136.6 221.1M2141.3 711.9C2098.5 712.2 2101.8 692.5 2069.6 683S2028.1 690.9 2000.7 672 1987 638.3 1968.8 615 1933.8 601.9 1921.9 572.2 1928.8 536.8 1925 507.6 1901.4 478.2 1905.1 446.4 1927.7 419.2 1938.2 391.9 1931.5 354 1950.6 328.4 1983.7 316.9 2008.8 298.9 2024.1 263.2 2059.1 252.3 2097.8 260.4 2137.1 260M742.2 1004.9C740.7 947.4 760.5 950.5 772.8 905.9S767.6 852.6 792.1 815.5 832 791.6 863.4 766.3 884.6 724.1 924.1 707.4 969.8 709.4 1009.8 703.4 1049.8 677.6 1092.7 681.7 1131.4 704.9 1169.1 718.5 1217.1 714.9 1252.1 740.1 1273.4 779.4 1298.4 813.1 1341.2 837 1356.9 883.4 1353.5 934.3 1354.9 988.3M784 1003.8C782.6 954 802.5 956.9 813 918.7S806 871.7 827.4 839.3 864 820.4 890.9 798.5 907.6 760 941.9 745.4 982.3 749.6 1016.6 744.5 1050.8 719.8 1088 723.3 1120.9 745.9 1153.4 757.6 1196 752.1 1226.4 774 1243.1 810 1264.5 838.9 1303.7 858 1317.4 898.4 1311.9 942.9 1313.1 989.2M822.8 1002.7C821.7 960 841.5 962.9 850.4 930.5S841.7 889.3 860.1 861.5 893.5 847.3 916.5 828.7 929 793.4 958.4 781 993.9 787.3 1023.1 782.9 1052 758.8 1083.9 762 1111.4 784.1 1138.9 794 1176.6 786.6 1202.5 805.4 1214.7 838.2 1233.1 862.9 1269 877.6 1280.6 912.4 1273.2 951.2 1274.3 990.5",
- "width": 2138
- },
- "search": [
- "bg_2"
- ]
- },
- {
- "uid": "0887f8af7107badceb2618215c9d8053",
- "css": "bg_3",
- "code": 59410,
- "src": "custom_icons",
- "selected": true,
- "svg": {
- "path": "M808.5 441.7C833.6 416.6 869 452 894.1 426.9S883.8 366.4 908.9 341.3 969.4 351.6 994.5 326.4 984.2 266 1009.4 240.9 1069.8 251.1 1094.9 226 1084.7 165.5 1109.8 140.4 1170.3 150.6 1195.4 125.5 1185.2 65.1 1210.3 39.9 1270.8 50.1 1295.9 25M85.1 848.6C120.5 851.1 117 901 152.4 903.5S191.3 856.1 226.7 858.5 258.7 910.9 294.1 913.4 333 866 368.4 868.4 400.4 920.8 435.8 923.3 474.7 875.9 510.2 878.3 542.1 930.7 577.5 933.2 616.5 885.8 651.9 888.3 683.9 940.6 719.4 943.1",
- "width": 2138
- },
- "search": [
- "bg_3"
- ]
- },
- {
- "uid": "15d14398ff70be8823b96215f803bf80",
- "css": "bg_4",
- "code": 59411,
- "src": "custom_icons",
- "selected": true,
- "svg": {
- "path": "M1546 479.2C1571.1 454.1 1606.5 489.5 1631.6 464.4S1621.3 403.9 1646.4 378.8 1706.9 389.1 1732 363.9 1721.7 303.5 1746.9 278.4 1807.3 288.6 1832.4 263.5 1822.2 203 1847.3 177.9 1907.8 188.1 1932.9 163 1922.7 102.6 1947.8 77.4 2008.3 87.6 2033.4 62.5M1354.2 796L1262.5 743.1V849ZM1549.7 796L1458.1 743.1V849ZM1745.3 796L1653.6 743.1V849Z",
- "width": 2138
- },
- "search": [
- "bg_4"
- ]
- },
- {
- "uid": "1ad61f1d7131991dd2361861dd272499",
- "css": "medication_icon",
- "code": 59412,
- "src": "custom_icons",
- "selected": true,
- "svg": {
- "path": "M578.7 308A105.9 105.9 0 0 0 476.3 229.1 106.8 106.8 0 0 0 384.1 282.2L317.1 398.2V398.2L250.1 514.2A106.3 106.3 0 0 0 428.9 628.6Q429.2 628.2 429.4 627.8L568.1 388.5A105.3 105.3 0 0 0 578.7 308ZM411.4 616.8A85.1 85.1 0 0 1 268.4 524.8L330.1 418 353 431.2H353L477.4 503ZM549.8 377.9L487.9 484.6 372.7 418.1 402.3 366.9A10.6 10.6 0 0 0 383.9 356.3L354.4 407.6 340.6 399.6 402.3 292.8A85.6 85.6 0 0 1 476.3 250.3 85.1 85.1 0 0 1 549.6 377.8ZM718.7 591.9A407.8 407.8 0 0 0 526.8 591.9C496.1 600.6 480.5 613 480.5 628.6 480.5 628.6 480.5 628.6 480.5 628.6V722.6C480.5 738.4 496 750.6 526.7 759.4A409.2 409.2 0 0 0 718.7 759.4C749.4 750.7 765 738.3 765 722.6V628.6L765 628.6C765 613 749.4 600.7 718.7 591.9ZM532.6 612.2A387.3 387.3 0 0 1 712.8 612.2C738.3 619.5 743.8 627.4 743.8 628.6H743.8C743.8 629.9 738.3 637.7 712.9 645A387.3 387.3 0 0 1 532.6 645C507 637.7 501.6 629.9 501.6 628.6S507 619.5 532.6 612.2ZM743.8 722.7C743.8 724.2 738.3 731.9 712.9 739.1A388.7 388.7 0 0 1 532.5 739.1C507.1 731.9 501.6 724.2 501.6 722.7V655.7A130.1 130.1 0 0 0 526.8 665.4 407.7 407.7 0 0 0 718.7 665.4 130.2 130.2 0 0 0 743.8 655.7V682.1A222 222 0 0 1 688.6 699.8 10.6 10.6 0 1 0 692.6 720.6 257.9 257.9 0 0 0 743.8 705.4ZM414.4 324.9A10.6 10.6 0 0 0 399.9 328.8L399.7 329.1A10.6 10.6 0 1 0 418.1 339.6L418.2 339.3A10.6 10.6 0 0 0 414.4 324.9ZM669.4 713.7A10.6 10.6 0 0 0 657.8 704.2H657.6A10.6 10.6 0 0 0 658.6 725.3L659.6 725.3 659.9 725.3A10.6 10.6 0 0 0 669.4 713.7ZM999.5 500A500 500 0 0 1 499.5 1000 35.7 35.7 0 1 1 499.5 928.6 428.6 428.6 0 0 0 821 217.1V250A35.7 35.7 0 0 1 749.5 250V107.1A35.7 35.7 0 0 1 785.2 71.4H928.1A35.7 35.7 0 1 1 928.1 142.9H820.9V145.7A35.7 35.7 0 0 1 860.2 153.9 496.8 496.8 0 0 1 999.5 500ZM213.8 678.6A35.7 35.7 0 0 0 178.1 714.3V782.9A428.6 428.6 0 0 1 499.5 71.4 35.7 35.7 0 1 0 499.5 0 500 500 0 0 0 116.9 821.4H70.9A35.7 35.7 0 1 0 70.9 892.8H213.8A35.7 35.7 0 0 0 249.6 857.2V714.3A35.7 35.7 0 0 0 213.8 678.6Z",
+ "path": "M544.9 710.9A78.2 78.2 0 0 0 623 789H714.9A78.2 78.2 0 0 0 793 710.9V619.1A78.2 78.2 0 0 0 714.8 541H623A78.2 78.2 0 0 0 544.9 619.1ZM623 619.1H714.9V710.9H623ZM961 687.5A39 39 0 0 0 1000 648.5V234.4A156.4 156.4 0 0 0 843.8 78.1H793V39A39 39 0 0 0 714.8 39V78.1H537.1V39A39 39 0 1 0 459 39V78.1H283.2V39A39 39 0 1 0 205 39V78.1H156.3A156.4 156.4 0 0 0 0 234.4V843.8A156.4 156.4 0 0 0 156.3 1000H843.8A156.4 156.4 0 0 0 1000 843.8 39 39 0 0 0 921.9 843.8 78.2 78.2 0 0 1 843.7 921.9H156.3A78.2 78.2 0 0 1 78.1 843.8V234.4A78.2 78.2 0 0 1 156.3 156.3H205.1V195.5A39 39 0 0 0 283.2 195.5V156.3H459.1V195.5A39 39 0 0 0 537.2 195.5V156.3H715V195.5A39 39 0 0 0 793.1 195.5V156.3H843.9A78.2 78.2 0 0 1 922 234.4V648.5A39 39 0 0 0 961 687.5Z",
"width": 1000
},
"search": [
- "medication_icon"
+ "calendar-(2)"
]
}
]
diff --git a/assets/app_icons/fonts/DQIcons.ttf b/assets/app_icons/fonts/DQIcons.ttf
index 474ea22c..3cff7aa3 100644
Binary files a/assets/app_icons/fonts/DQIcons.ttf and b/assets/app_icons/fonts/DQIcons.ttf differ
diff --git a/assets/images/DQ/DQ_logo.png b/assets/images/DQ/DQ_logo.png
new file mode 100644
index 00000000..993a1bd3
Binary files /dev/null and b/assets/images/DQ/DQ_logo.png differ
diff --git a/assets/images/DQ/dq_logo_icon.png b/assets/images/DQ/dq_logo_icon.png
new file mode 100644
index 00000000..71626bd8
Binary files /dev/null and b/assets/images/DQ/dq_logo_icon.png differ
diff --git a/assets/images/Weather_ico.png b/assets/images/Weather_ico.png
new file mode 100644
index 00000000..2e00ae8c
Binary files /dev/null and b/assets/images/Weather_ico.png differ
diff --git a/assets/images/Weather_img.png b/assets/images/Weather_img.png
new file mode 100644
index 00000000..57901477
Binary files /dev/null and b/assets/images/Weather_img.png differ
diff --git a/assets/images/ask_doctor.png b/assets/images/ask_doctor.png
new file mode 100644
index 00000000..f74ac6a8
Binary files /dev/null and b/assets/images/ask_doctor.png differ
diff --git a/assets/images/ask_doctor_bg.png b/assets/images/ask_doctor_bg.png
new file mode 100644
index 00000000..16e8e9d7
Binary files /dev/null and b/assets/images/ask_doctor_bg.png differ
diff --git a/assets/images/blood-drop.png b/assets/images/blood-drop.png
new file mode 100644
index 00000000..a981e3d3
Binary files /dev/null and b/assets/images/blood-drop.png differ
diff --git a/assets/images/contact_us_bg.png b/assets/images/contact_us_bg.png
index 1a7cc71e..40564039 100644
Binary files a/assets/images/contact_us_bg.png and b/assets/images/contact_us_bg.png differ
diff --git a/assets/images/dq_home_page_bg_image.png b/assets/images/dq_home_page_bg_image.png
new file mode 100644
index 00000000..f70df2ae
Binary files /dev/null and b/assets/images/dq_home_page_bg_image.png differ
diff --git a/assets/images/height_icon.png b/assets/images/height_icon.png
index a837fb3d..cca88ac0 100644
Binary files a/assets/images/height_icon.png and b/assets/images/height_icon.png differ
diff --git a/assets/images/new-design/height_icon.png b/assets/images/new-design/height_icon.png
index a3a8575f..cca88ac0 100644
Binary files a/assets/images/new-design/height_icon.png and b/assets/images/new-design/height_icon.png differ
diff --git a/assets/images/new-design/vidamobile.png b/assets/images/new-design/vidamobile.png
new file mode 100644
index 00000000..f096e8a7
Binary files /dev/null and b/assets/images/new-design/vidamobile.png differ
diff --git a/assets/images/notf.png b/assets/images/notf.png
new file mode 100644
index 00000000..39eb3fb3
Binary files /dev/null and b/assets/images/notf.png differ
diff --git a/assets/images/online_payment_icon.png b/assets/images/online_payment_icon.png
new file mode 100644
index 00000000..a6e0150a
Binary files /dev/null and b/assets/images/online_payment_icon.png differ
diff --git a/assets/images/online_payments_bg.png b/assets/images/online_payments_bg.png
new file mode 100644
index 00000000..72f8e331
Binary files /dev/null and b/assets/images/online_payments_bg.png differ
diff --git a/assets/images/progress-loading.gif b/assets/images/progress-loading.gif
new file mode 100644
index 00000000..0d7769b7
Binary files /dev/null and b/assets/images/progress-loading.gif differ
diff --git a/assets/images/rectangle.png b/assets/images/rectangle.png
new file mode 100644
index 00000000..e4bdb0b6
Binary files /dev/null and b/assets/images/rectangle.png differ
diff --git a/assets/images/search_medicine_icon.png b/assets/images/search_medicine_icon.png
new file mode 100644
index 00000000..349620a5
Binary files /dev/null and b/assets/images/search_medicine_icon.png differ
diff --git a/assets/images/test-weight.png b/assets/images/test-weight.png
new file mode 100644
index 00000000..934b2467
Binary files /dev/null and b/assets/images/test-weight.png differ
diff --git a/assets/images/vital_sign_icon.png b/assets/images/vital_sign_icon.png
new file mode 100644
index 00000000..fbd0908b
Binary files /dev/null and b/assets/images/vital_sign_icon.png differ
diff --git a/ios/.gitignore b/ios/.gitignore
index ce2e85b9..e67828a4 100644
--- a/ios/.gitignore
+++ b/ios/.gitignore
@@ -32,3 +32,4 @@ Runner/GeneratedPluginRegistrant.*
!default.perspectivev3
/Runner.xcworkspace/contents.xcworkspacedata
/Runner.xcodeproj/project.pbxproj
+/Flutter/.last_build_id
diff --git a/ios/Flutter/.last_build_id b/ios/Flutter/.last_build_id
index d5a1e7da..0e335bcd 100644
--- a/ios/Flutter/.last_build_id
+++ b/ios/Flutter/.last_build_id
@@ -1 +1 @@
-c948a9de8d5fb4b791dcd366c30ba789
\ No newline at end of file
+4592a16118bc51c556d89309892cf794
\ No newline at end of file
diff --git a/ios/Podfile b/ios/Podfile
index 77760fe1..d68afba2 100644
--- a/ios/Podfile
+++ b/ios/Podfile
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
-platform :ios, '11.0'
+# platform :ios, '11.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
@@ -12,7 +12,6 @@ project 'Runner', {
# pod 'FBSDKCoreKit'
# pod 'FBSDKLoginKit'
-pod 'NVActivityIndicatorView'
def parse_KV_file(file, separator='=')
file_abs_path = File.expand_path(file)
@@ -40,8 +39,11 @@ target 'Runner' do
use_frameworks!
use_modular_headers!
+ # Native Pods
+ pod 'NVActivityIndicatorView'
+
+
# Flutter Pod
-
copied_flutter_dir = File.join(__dir__, 'Flutter')
copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework')
copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec')
@@ -89,3 +91,4 @@ post_install do |installer|
end
end
end
+
diff --git a/ios/Podfile.lock b/ios/Podfile.lock
index 1094393e..6a965de8 100644
--- a/ios/Podfile.lock
+++ b/ios/Podfile.lock
@@ -1,4 +1,9 @@
PODS:
+ - android_intent (0.0.1):
+ - Flutter
+ - barcode_scan_fix (0.0.1):
+ - Flutter
+ - MTBBarcodeScanner
- connectivity (0.0.1):
- Flutter
- Reachability
@@ -111,6 +116,7 @@ PODS:
- Flutter
- maps_launcher (0.0.1):
- Flutter
+ - MTBBarcodeScanner (5.0.11)
- nanopb (1.30906.0):
- nanopb/decode (= 1.30906.0)
- nanopb/encode (= 1.30906.0)
@@ -175,8 +181,12 @@ PODS:
- Flutter
- webview_flutter (0.0.1):
- Flutter
+ - wifi (0.0.1):
+ - Flutter
DEPENDENCIES:
+ - android_intent (from `.symlinks/plugins/android_intent/ios`)
+ - barcode_scan_fix (from `.symlinks/plugins/barcode_scan_fix/ios`)
- connectivity (from `.symlinks/plugins/connectivity/ios`)
- connectivity_for_web (from `.symlinks/plugins/connectivity_for_web/ios`)
- connectivity_macos (from `.symlinks/plugins/connectivity_macos/ios`)
@@ -227,6 +237,7 @@ DEPENDENCIES:
- video_player_web (from `.symlinks/plugins/video_player_web/ios`)
- wakelock (from `.symlinks/plugins/wakelock/ios`)
- webview_flutter (from `.symlinks/plugins/webview_flutter/ios`)
+ - wifi (from `.symlinks/plugins/wifi/ios`)
SPEC REPOS:
trunk:
@@ -239,6 +250,7 @@ SPEC REPOS:
- GoogleDataTransport
- GoogleMaps
- GoogleUtilities
+ - MTBBarcodeScanner
- nanopb
- NVActivityIndicatorView
- PromisesObjC
@@ -249,6 +261,10 @@ SPEC REPOS:
- TwilioVideo
EXTERNAL SOURCES:
+ android_intent:
+ :path: ".symlinks/plugins/android_intent/ios"
+ barcode_scan_fix:
+ :path: ".symlinks/plugins/barcode_scan_fix/ios"
connectivity:
:path: ".symlinks/plugins/connectivity/ios"
connectivity_for_web:
@@ -347,8 +363,12 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/wakelock/ios"
webview_flutter:
:path: ".symlinks/plugins/webview_flutter/ios"
+ wifi:
+ :path: ".symlinks/plugins/wifi/ios"
SPEC CHECKSUMS:
+ android_intent: 367df2f1277a74e4a90e14a8ab3df3112d087052
+ barcode_scan_fix: 80dd65de55f27eec6591dd077c8b85f2b79e31f1
connectivity: c4130b2985d4ef6fd26f9702e886bd5260681467
connectivity_for_web: 2b8584556930d4bd490d82b836bcf45067ce345b
connectivity_macos: e2e9731b6b22dda39eb1b128f6969d574460e191
@@ -383,6 +403,7 @@ SPEC CHECKSUMS:
manage_calendar_events: 0338d505ea26cdfd20cd883279bc28afa11eca34
map_launcher: e325db1261d029ff33e08e03baccffe09593ffea
maps_launcher: eae38ee13a9c3f210fa04e04bb4c073fa4c6ed92
+ MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb
nanopb: 59317e09cf1f1a0af72f12af412d54edf52603fc
native_device_orientation: e24d00be281de72996640885d80e706142707660
native_progress_hud: f95f5529742b36a3c7fdecfa88dc018319e39bf9
@@ -415,7 +436,8 @@ SPEC CHECKSUMS:
video_player_web: da8cadb8274ed4f8dbee8d7171b420dedd437ce7
wakelock: 0d4a70faf8950410735e3f61fb15d517c8a6efc4
webview_flutter: d2b4d6c66968ad042ad94cbb791f5b72b4678a96
+ wifi: d7d77c94109e36c4175d845f0a5964eadba71060
-PODFILE CHECKSUM: fd41bba6db38332890981ce38f0747bdb94c61f2
+PODFILE CHECKSUM: ac5efa1ac3c9555d0008dc18004313c84746da62
COCOAPODS: 1.10.0
diff --git a/ios/Runner/Base.lproj/Main.storyboard b/ios/Runner/Base.lproj/Main.storyboard
index de2d580c..8ae1ba59 100644
--- a/ios/Runner/Base.lproj/Main.storyboard
+++ b/ios/Runner/Base.lproj/Main.storyboard
@@ -7,10 +7,10 @@
-
+
-
+
@@ -18,85 +18,12 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/ios/Runner/Base.lproj/Main_Custom.storyboard b/ios/Runner/Base.lproj/Main_Custom.storyboard
new file mode 100644
index 00000000..de2d580c
--- /dev/null
+++ b/ios/Runner/Base.lproj/Main_Custom.storyboard
@@ -0,0 +1,102 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ios/Runner/Controllers/MainFlutterVC.swift b/ios/Runner/Controllers/MainFlutterVC.swift
index ba67f0a5..22aa5e55 100644
--- a/ios/Runner/Controllers/MainFlutterVC.swift
+++ b/ios/Runner/Controllers/MainFlutterVC.swift
@@ -7,25 +7,126 @@
import UIKit
import Flutter
+import NetworkExtension
+import SystemConfiguration.CaptiveNetwork
+var flutterMethodChannel:FlutterMethodChannel? = nil
class MainFlutterVC: FlutterViewController {
- var root_view:MainViewController?
-
+
override func viewDidLoad() {
super.viewDidLoad()
-
+
+ flutterMethodChannel = FlutterMethodChannel(name: "HMG-Platform-Bridge",binaryMessenger: binaryMessenger)
+ flutterMethodChannel?.setMethodCallHandler { (methodCall, result) in
+
+ if methodCall.method == "connectHMGInternetWifi"{
+ self.connectHMGInternetWifi(methodCall:methodCall, result: result)
+
+ }else if methodCall.method == "connectHMGGuestWifi"{
+ self.connectHMGGuestWifi(methodCall:methodCall, result: result)
+
+ }else if methodCall.method == "isHMGNetworkAvailable"{
+ self.isHMGNetworkAvailable(methodCall:methodCall, result: result)
+
+ }else{
+
+ }
+
+ print("")
+ }
+
+ FlutterText.with(key: "errorConnectingHmgNetwork") { (localized) in
+ print(localized)
+ }
+
}
-
- /*
- // MARK: - Navigation
-
- // In a storyboard-based application, you will often want to do a little preparation before navigation
- override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
- // Get the new view controller using segue.destination.
- // Pass the selected object to the new view controller.
+ // Connect HMG Wifi and Internet
+ func connectHMGInternetWifi(methodCall:FlutterMethodCall ,result: @escaping FlutterResult){
+
+ guard let pateintId = (methodCall.arguments as? [Any])?.first as? String
+ else { return assert(true, "Missing or invalid arguments (Must have one argument 'String at 0'") }
+
+
+ HMG_Internet.shared.connect(patientId: pateintId) { (status, message) in
+ result(status ? 1 : 0)
+ if status{
+ self.showMessage(title:"Congratulations", message:message)
+ }else{
+ self.showMessage(title:"Ooops,", message:message)
+ }
+ }
}
- */
-
+
+ // Connect HMG-Guest for App Access
+ func connectHMGGuestWifi(methodCall:FlutterMethodCall ,result: @escaping FlutterResult){
+ HMG_GUEST.shared.connect() { (status, message) in
+ result(status ? 1 : 0)
+ if status{
+ self.showMessage(title:"Congratulations", message:message)
+ }else{
+ self.showMessage(title:"Ooops,", message:message)
+ }
+ }
+ }
+
+ func isHMGNetworkAvailable(methodCall:FlutterMethodCall ,result: @escaping FlutterResult) -> Bool{
+ guard let ssid = methodCall.arguments as? String else {
+ assert(true, "Missing or invalid arguments (Must have one argument 'String at 0'")
+ return false
+ }
+
+ let queue = DispatchQueue.init(label: "com.hmg.wifilist")
+ NEHotspotHelper.register(options: nil, queue: queue) { (command) in
+ print(command)
+
+ if(command.commandType == NEHotspotHelperCommandType.filterScanList) {
+ if let networkList = command.networkList{
+ for network in networkList{
+ print(network.ssid)
+ }
+ }
+ }
+ }
+
+ // [NEHotspotHelper registerWithOptions:nil queue:queue handler: ^(NEHotspotHelperCommand * cmd) {
+ // if(cmd.commandType == kNEHotspotHelperCommandTypeFilterScanList) {
+ // for (NEHotspotNetwork* network in cmd.networkList) {
+ // NSLog(@"network.SSID = %@",network.SSID);
+ // }
+ // }
+ // }];
+
+
+
+
+ return false
+
+ }
+
+
+ // Message Dailog
+ func showMessage(title:String, message:String){
+ DispatchQueue.main.async {
+ let alert = UIAlertController(title: title, message: message, preferredStyle: .alert )
+ alert.addAction(UIAlertAction(title: "OK", style: .destructive, handler: nil))
+ self.present(alert, animated: true) {
+
+ }
+ }
+ }
+
+
+
+ /*
+ // MARK: - Navigation
+
+ // In a storyboard-based application, you will often want to do a little preparation before navigation
+ override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
+ // Get the new view controller using segue.destination.
+ // Pass the selected object to the new view controller.
+ }
+ */
+
}
diff --git a/ios/Runner/Controllers/MainViewController.swift b/ios/Runner/Controllers/MainViewController.swift
deleted file mode 100644
index 94a355f9..00000000
--- a/ios/Runner/Controllers/MainViewController.swift
+++ /dev/null
@@ -1,96 +0,0 @@
-//
-// MainViewController.swift
-// Runner
-//
-// Created by ZiKambrani on 26/03/1442 AH.
-//
-
-import UIKit
-import NVActivityIndicatorView
-
-class MainViewController: UIViewController {
- @IBOutlet weak var lblLoadingText: UILabel!
- @IBOutlet weak var loading: NVActivityIndicatorView!
-
- override func viewDidLoad() {
- super.viewDidLoad()
- print(loading)
- }
-
- func createBridge(flutterViewController:FlutterViewController){
- let connectHMGGuestWifi = FlutterMethodChannel(name: "HMG-Platform-Bridge",binaryMessenger: flutterViewController.binaryMessenger)
- connectHMGGuestWifi.setMethodCallHandler { (methodCall, result) in
- if methodCall.method == "connectHMGGuestWifi"{
- self.connectWifi(result: result)
- }else if methodCall.method == "loading"{
- self.showLoading(flutterMethodCall: methodCall)
- }else{
-
- }
- print("")
- }
- }
-
-
- // Connect HMG-Guest Wifi and Internet
- func connectWifi(result: @escaping FlutterResult){
- showLoading(message: "Connecting...")
- HMG_GUEST.shared.connect { (status, message) in
- result(status ? 1 : 0)
- self.showLoading(false);
- if status{
- self.showMessage(title:"Congratulations", message:message)
- }else{
- self.showMessage(title:"Ooops,", message:message)
- }
- }
- }
-
-
- // Loading/Progress
- private func showLoading(flutterMethodCall:FlutterMethodCall){
- if let args = flutterMethodCall.arguments as? [Any],
- let message = args.first as? String, let show = args.last as? Bool{
- showLoading(message: message, show)
- }else{
- assert(true, "Missing or invalid arguments (Must have two argument 'String at 0' and Boolean at 1)")
- }
- }
- func showLoading(message:String = "Please wait...", _ show:Bool = true){
- DispatchQueue.main.async {
- if show{
- self.lblLoadingText.text = message
- self.loading.superview?.isHidden = false
- self.loading.startAnimating()
- }else{
- self.lblLoadingText.text = ""
- self.loading.superview?.isHidden = true
- self.loading.stopAnimating()
- }
- }
- }
-
-
- // Message Dailog
- func showMessage(title:String, message:String){
- DispatchQueue.main.async {
- let alert = UIAlertController(title: title, message: message, preferredStyle: .alert )
- alert.addAction(UIAlertAction(title: "OK", style: .destructive, handler: nil))
- self.present(alert, animated: true) {
-
- }
- }
- }
-
-
- // MARK: - Navigation
-
- // In a storyboard-based application, you will often want to do a little preparation before navigation
- override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
- if let flutterVC = segue.destination as? MainFlutterVC{
- flutterVC.root_view = self
- createBridge(flutterViewController: flutterVC)
- }
- }
-
-}
diff --git a/ios/Runner/GuestPOC_Certificate.cer b/ios/Runner/GuestPOC_Certificate.cer
new file mode 100644
index 00000000..f3804f6e
Binary files /dev/null and b/ios/Runner/GuestPOC_Certificate.cer differ
diff --git a/ios/Runner/GuestPOC_Certificate.p12 b/ios/Runner/GuestPOC_Certificate.p12
new file mode 100644
index 00000000..8e289212
Binary files /dev/null and b/ios/Runner/GuestPOC_Certificate.p12 differ
diff --git a/ios/Runner/Helper/API.swift b/ios/Runner/Helper/API.swift
new file mode 100644
index 00000000..763147c8
--- /dev/null
+++ b/ios/Runner/Helper/API.swift
@@ -0,0 +1,17 @@
+//
+// API.swift
+// Runner
+//
+// Created by ZiKambrani on 04/04/1442 AH.
+//
+
+import UIKit
+
+fileprivate let DOMAIN = "https://uat.hmgwebservices.com"
+fileprivate let SERVICE = "Services/Patients.svc/REST"
+fileprivate let BASE_URL = "\(DOMAIN)/\(SERVICE)"
+
+struct API {
+ static let WIFI_CREDENTIALS = "\(BASE_URL)/Hmg_SMS_Get_By_ProjectID_And_PatientID"
+
+}
diff --git a/ios/Runner/Helper/Extensions.swift b/ios/Runner/Helper/Extensions.swift
new file mode 100644
index 00000000..6da82ce3
--- /dev/null
+++ b/ios/Runner/Helper/Extensions.swift
@@ -0,0 +1,118 @@
+//
+// Extensions.swift
+// Runner
+//
+// Created by ZiKambrani on 04/04/1442 AH.
+//
+
+import UIKit
+
+
+extension String{
+ func toUrl() -> URL?{
+ return URL(string: self)
+ }
+}
+
+extension Bundle {
+
+ func certificate(named name: String) -> SecCertificate {
+ let cerURL = self.url(forResource: name, withExtension: "cer")!
+ let cerData = try! Data(contentsOf: cerURL)
+ let cer = SecCertificateCreateWithData(nil, cerData as CFData)!
+ return cer
+ }
+
+ func identity(named name: String, password: String) -> SecIdentity {
+ let p12URL = self.url(forResource: name, withExtension: "p12")!
+ let p12Data = try! Data(contentsOf: p12URL)
+
+ var importedCF: CFArray? = nil
+ let options = [kSecImportExportPassphrase as String: password]
+ let err = SecPKCS12Import(p12Data as CFData, options as CFDictionary, &importedCF)
+ precondition(err == errSecSuccess)
+ let imported = importedCF! as NSArray as! [[String:AnyObject]]
+ precondition(imported.count == 1)
+
+ return (imported[0][kSecImportItemIdentity as String]!) as! SecIdentity
+ }
+
+
+}
+
+extension SecCertificate{
+ func trust() -> Bool?{
+ var optionalTrust: SecTrust?
+ let policy = SecPolicyCreateBasicX509()
+
+ let status = SecTrustCreateWithCertificates([self] as AnyObject,
+ policy,
+ &optionalTrust)
+ guard status == errSecSuccess else { return false}
+ let trust = optionalTrust!
+
+ let stat = optionalTrust?.evaluateAllowing(rootCertificates: [self])
+ return stat
+ }
+
+ func secTrustObject() -> SecTrust?{
+ var optionalTrust: SecTrust?
+ let policy = SecPolicyCreateBasicX509()
+
+ let status = SecTrustCreateWithCertificates([self] as AnyObject,
+ policy,
+ &optionalTrust)
+ return optionalTrust
+ }
+}
+
+
+extension SecTrust {
+
+ func evaluate() -> Bool {
+ var trustResult: SecTrustResultType = .invalid
+ let err = SecTrustEvaluate(self, &trustResult)
+ guard err == errSecSuccess else { return false }
+ return [.proceed, .unspecified].contains(trustResult)
+ }
+
+ func evaluateAllowing(rootCertificates: [SecCertificate]) -> Bool {
+
+ // Apply our custom root to the trust object.
+
+ var err = SecTrustSetAnchorCertificates(self, rootCertificates as CFArray)
+ guard err == errSecSuccess else { return false }
+
+ // Re-enable the system's built-in root certificates.
+
+ err = SecTrustSetAnchorCertificatesOnly(self, false)
+ guard err == errSecSuccess else { return false }
+
+ // Run a trust evaluation and only allow the connection if it succeeds.
+
+ return self.evaluate()
+ }
+}
+
+
+extension UIView{
+ func show(){
+ self.alpha = 0.0
+ self.isHidden = false
+ UIView.animate(withDuration: 0.25, animations: {
+ self.alpha = 1
+ }) { (complete) in
+
+ }
+ }
+
+ func hide(){
+ UIView.animate(withDuration: 0.25, animations: {
+ self.alpha = 0.0
+ }) { (complete) in
+ self.isHidden = true
+ }
+ }
+}
+
+
diff --git a/ios/Runner/Helper/LocalizedFromFlutter.swift b/ios/Runner/Helper/LocalizedFromFlutter.swift
new file mode 100644
index 00000000..88530649
--- /dev/null
+++ b/ios/Runner/Helper/LocalizedFromFlutter.swift
@@ -0,0 +1,22 @@
+//
+// LocalizedFromFlutter.swift
+// Runner
+//
+// Created by ZiKambrani on 10/04/1442 AH.
+//
+
+import UIKit
+
+class FlutterText{
+
+ class func with(key:String,completion: @escaping (String)->Void){
+ flutterMethodChannel?.invokeMethod("localizedValue", arguments: key, result: { (result) in
+ if let localized = result as? String{
+ completion(localized)
+ }else{
+ completion(key)
+ }
+ })
+ }
+
+}
diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist
index 1d97a387..8c6c1ed1 100644
--- a/ios/Runner/Info.plist
+++ b/ios/Runner/Info.plist
@@ -2,11 +2,6 @@
- NSAppTransportSecurity
-
- NSAllowsArbitraryLoads
-
-
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
@@ -27,22 +22,20 @@
$(FLUTTER_BUILD_NUMBER)
LSRequiresIPhoneOS
- io.flutter.embedded_views_preview
-
- UILaunchStoryboardName
- LaunchScreen
- UIMainStoryboardFile
- Main
- NSMicrophoneUsageDescription
- Need microphone access for uploading videos
NSCameraUsageDescription
Need camera access for uploading images
NSLocationUsageDescription
Need location access for updating nearby friends
NSLocationWhenInUseUsageDescription
This app will use your location to show cool stuffs near you.
+ NSMicrophoneUsageDescription
+ Need microphone access for uploading videos
NSPhotoLibraryUsageDescription
Need photo library access for uploading images
+ UILaunchStoryboardName
+ LaunchScreen
+ UIMainStoryboardFile
+ Main
UISupportedInterfaceOrientations
UIInterfaceOrientationPortrait
@@ -58,5 +51,7 @@
UIViewControllerBasedStatusBarAppearance
+ io.flutter.embedded_views_preview
+
diff --git a/ios/Runner/Runner.entitlements b/ios/Runner/Runner.entitlements
index ea0c25e7..be2e0283 100644
--- a/ios/Runner/Runner.entitlements
+++ b/ios/Runner/Runner.entitlements
@@ -2,6 +2,8 @@
+
+
aps-environment
development
com.apple.developer.networking.HotspotConfiguration
diff --git a/ios/Runner/WifiConnect/HMG_GUEST.swift b/ios/Runner/WifiConnect/HMG_GUEST.swift
index a578309f..ad6d3922 100644
--- a/ios/Runner/WifiConnect/HMG_GUEST.swift
+++ b/ios/Runner/WifiConnect/HMG_GUEST.swift
@@ -10,25 +10,18 @@ import UIKit
import NetworkExtension
import SystemConfiguration.CaptiveNetwork
+fileprivate let SSID = "HMG-MobileApp"
class HMG_GUEST{
static let shared = HMG_GUEST()
- private let SSID = "HMG-GUEST"
- private let USER = "1301"
- private let PASS = "8928"
- var complete:((_ status:Bool, _ message:String) -> Void)!
+ private var complete:((_ status:Bool, _ message:String) -> Void)!
func connect(completion:@escaping ((_ status:Bool, _ message:String) -> Void)){
complete = completion
if isAlreadyConnected() {
- hasInternet { (has) in
- if has == true{
- self.complete(true, "You already connected to internet")
- return
- }else{
- self.authenticate()
- }
+ FlutterText.with(key: "alreadyConnectedHmgNetwork") { (localized) in
+ self.complete(true, localized )
}
}else{
connect()
@@ -36,56 +29,33 @@ class HMG_GUEST{
}
private func connect() {
- let hotspotConfig = NEHotspotConfiguration(ssid: SSID)
- hotspotConfig.joinOnce = true
+ let hotspotConfig = NEHotspotConfiguration(ssid: "\(SSID)")
+ hotspotConfig.joinOnce = false
NEHotspotConfigurationManager.shared.apply(hotspotConfig) {[weak self] (error) in
guard let self = self else { return; }
-
+
if let error = error {
- self.complete(false, error.localizedDescription ?? "Error connecting to HMG wifi network" )
+ FlutterText.with(key: "errorConnectingHmgNetwork") { (localized) in
+ self.complete(false, localized )
+ }
}else{
- _ = Timer.scheduledTimer(withTimeInterval: 2, repeats: false) { (timer) in
- self.authenticate()
+ _ = Timer.scheduledTimer(withTimeInterval: 10, repeats: false) { (timer) in
+ let connected = self.isAlreadyConnected()
+ let message = connected ? "successConnectingHmgNetwork" : "failedConnectingHmgNetwork"
+ FlutterText.with(key: message) { (localized) in
+ self.complete(false, localized )
+ }
}
}
}
- }
- func authenticate(){
- func callLogin(){
-
- let parameters = "Login=Log%20In&cmd=authenticate&password=1820&user=2300"
- let postData = parameters.data(using: .utf8)
-
- var request = URLRequest(url: URL(string: "https://captiveportal-login.hmg.com/cgi-bin/login")!,timeoutInterval: 5)
- request.addValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")
-
- request.httpMethod = "POST"
- request.httpBody = postData
-
- let task = URLSession.shared.dataTask(with: request) { data, response, error in
- // guard let data = data else {
- // self.complete(false, "Error at authentication")
- // return
- // }
-
- self.hasInternet { (has) in
- self.complete(has, has ? "Successfully connected to the internet" : "Authentication failed or you are already using your credentials on another device")
- }
- }
- task.resume()
-
- }
-
- self.hasInternet { (has) in
- if has == true{
- self.complete(true, "Your internet account is already authenticated")
- }else{
- callLogin()
- }
- }
+// NSMutableURLRequest(url: URL(string: "www.google.com")!).bind(to: command)
+// NEHotspotHelper.register(options: [:], queue: DispatchQueue.global()) { (command) in
+// command
+// print(command)
+// }
}
@@ -104,26 +74,4 @@ class HMG_GUEST{
return currentSSID == SSID
}
-
- func hasInternet( completion:@escaping ((Bool)->Void)){
-
- let testUrl = "https://captive.apple.com"
- var request = URLRequest(url: URL(string: testUrl)!,timeoutInterval: 5)
- request.httpMethod = "GET"
- let task = URLSession.shared.dataTask(with: request) { data, response, error in
- guard let data = data else {
- completion(false)
- return
- }
- let resp = String(data: data, encoding: .utf8)!
- if resp.contains("Success"){
- completion(true)
- }else{
- completion(false)
- }
-
- }
- task.resume()
- }
-
}
diff --git a/ios/Runner/WifiConnect/HMG_GUEST_bkp.swift b/ios/Runner/WifiConnect/HMG_GUEST_bkp.swift
new file mode 100644
index 00000000..e3dfd468
--- /dev/null
+++ b/ios/Runner/WifiConnect/HMG_GUEST_bkp.swift
@@ -0,0 +1,129 @@
+////
+//// HMG_GUEST.swift
+//// HMG-iOS-Wifi
+////
+//// Created by ZiKambrani on 23/03/1442 AH.
+//// Copyright © 1442 ZiKambrani. All rights reserved.
+////
+//
+//import UIKit
+//import NetworkExtension
+//import SystemConfiguration.CaptiveNetwork
+//
+//
+//class HMG_GUEST{
+// static let shared = HMG_GUEST()
+// private let SSID = "GUEST-POC"
+// private let USER = "1301"
+// private let PASS = "8928"
+//
+// var complete:((_ status:Bool, _ message:String) -> Void)!
+// func connect(completion:@escaping ((_ status:Bool, _ message:String) -> Void)){
+// complete = completion
+//
+// if isAlreadyConnected() {
+// hasInternet { (has) in
+// if has == true{
+// self.complete(true, "You already connected to internet")
+// return
+// }else{
+// self.authenticate()
+// }
+// }
+// }else{
+// connect()
+// }
+// }
+//
+// private func connect() {
+// let hotspotConfig = NEHotspotConfiguration(ssid: SSID)
+// hotspotConfig.joinOnce = true
+//
+// NEHotspotConfigurationManager.shared.apply(hotspotConfig) {[weak self] (error) in
+// guard let self = self else { return; }
+//
+// if let error = error {
+// self.complete(false, error.localizedDescription ?? "Error connecting to HMG wifi network" )
+// }else{
+// _ = Timer.scheduledTimer(withTimeInterval: 2, repeats: false) { (timer) in
+// self.authenticate()
+// }
+// }
+// }
+// }
+//
+// func authenticate(){
+//
+// func callLogin(){
+//
+// let parameters = "Login=Log%20In&cmd=authenticate&password=1820&user=2300"
+// let postData = parameters.data(using: .utf8)
+//
+// var request = URLRequest(url: URL(string: "https://captiveportal-login.hmg.com/cgi-bin/login")!,timeoutInterval: 5)
+// request.addValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")
+//
+// request.httpMethod = "POST"
+// request.httpBody = postData
+//
+// let task = URLSession.shared.dataTask(with: request) { data, response, error in
+// // guard let data = data else {
+// // self.complete(false, "Error at authentication")
+// // return
+// // }
+//
+// self.hasInternet { (has) in
+// self.complete(has, has ? "Successfully connected to the internet" : "Authentication failed or you are already using your credentials on another device")
+// }
+// }
+// task.resume()
+//
+// }
+//
+// self.hasInternet { (has) in
+// if has == true{
+// self.complete(true, "Your internet account is already authenticated")
+// }else{
+// callLogin()
+// }
+// }
+//
+// }
+//
+// private func isAlreadyConnected() -> Bool{
+// var currentSSID: String?
+// if let interfaces = CNCopySupportedInterfaces() as NSArray? {
+// for interface in interfaces {
+// if let interfaceInfo = CNCopyCurrentNetworkInfo(interface as! CFString) as NSDictionary? {
+// currentSSID = interfaceInfo[kCNNetworkInfoKeySSID as String] as? String
+// break
+// }
+// }
+// }
+//
+// print("CurrentConnectedSSID: \(currentSSID)")
+// return currentSSID == SSID
+// }
+//
+//
+// func hasInternet( completion:@escaping ((Bool)->Void)){
+//
+// let testUrl = "https://captive.apple.com"
+// var request = URLRequest(url: URL(string: testUrl)!,timeoutInterval: 5)
+// request.httpMethod = "GET"
+// let task = URLSession.shared.dataTask(with: request) { data, response, error in
+// guard let data = data else {
+// completion(false)
+// return
+// }
+// let resp = String(data: data, encoding: .utf8)!
+// if resp.contains("Success"){
+// completion(true)
+// }else{
+// completion(false)
+// }
+//
+// }
+// task.resume()
+// }
+//
+//}
diff --git a/ios/Runner/WifiConnect/HMG_Internet.swift b/ios/Runner/WifiConnect/HMG_Internet.swift
new file mode 100644
index 00000000..00ac172f
--- /dev/null
+++ b/ios/Runner/WifiConnect/HMG_Internet.swift
@@ -0,0 +1,193 @@
+//
+// HMG_GUEST.swift
+// HMG-iOS-Wifi
+//
+// Created by ZiKambrani on 23/03/1442 AH.
+// Copyright © 1442 ZiKambrani. All rights reserved.
+//
+
+import UIKit
+import NetworkExtension
+import SystemConfiguration.SCNetworkConnection
+
+fileprivate var TEST = false
+fileprivate let SSID = "GUEST-POC"
+fileprivate var USER = ""
+fileprivate var PASS = ""
+
+fileprivate func supportedEAPTypes() -> [NSNumber]{
+ let peap = NEHotspotEAPSettings.EAPType.EAPPEAP.rawValue
+ let fast = NEHotspotEAPSettings.EAPType.EAPFAST.rawValue
+ let tls = NEHotspotEAPSettings.EAPType.EAPTLS.rawValue
+ let ttls = NEHotspotEAPSettings.EAPType.EAPTTLS.rawValue
+ return [NSNumber(value: peap), NSNumber(value: fast), NSNumber(value: tls), NSNumber(value: ttls)]
+}
+
+class HMG_Internet{
+ static let shared = HMG_Internet()
+
+ private var complete:((_ status:Bool, _ message:String) -> Void)!
+ func connect(patientId:String, completion:@escaping ((_ status:Bool, _ message:String) -> Void)){
+ complete = completion
+
+ if isAlreadyConnected() {
+ hasInternet { (has) in
+ if has == true{
+ FlutterText.with(key: "alreadyConnectedHmgNetwork"){ localized in
+ self.complete(true, localized)
+ }
+ return
+ }else{
+ FlutterText.with(key: "connectedToHmgNetworkWithNoInternet"){ localized in
+ self.complete(false, localized)
+ }
+ }
+ }
+ }else{
+ connect(patientId: patientId)
+ }
+ }
+
+ private func connect(patientId:String) {
+
+ getWifiCredentials(patientId: patientId) {
+ let trust_cert = Bundle.main.certificate(named: "GuestPOC_Certificate")
+ guard trust_cert.trust() == true else{
+ FlutterText.with(key: "notConnectedToHmgNetworkSecurityIssue"){ localized in
+ self.complete(false,localized)
+ }
+ return
+ }
+
+ let eapSettings = NEHotspotEAPSettings()
+ eapSettings.username = USER
+ eapSettings.password = PASS
+ eapSettings.trustedServerNames = ["*.hmg.com","onboard.hmg.com","hmg.com"]
+ eapSettings.supportedEAPTypes = [supportedEAPTypes().first!]
+// eapSettings.isTLSClientCertificateRequired = true
+// eapSettings.ttlsInnerAuthenticationType = .eapttlsInnerAuthenticationMSCHAPv2 // MSCHAPv2
+// eapSettings.setIdentity(Bundle.main.identity(named: "GuestPOC_Certificate", password: "1"))
+// eapSettings.setTrustedServerCertificates([trust_cert])
+
+ let hotspotConfig = NEHotspotConfiguration(ssid: SSID, eapSettings: eapSettings)
+ NEHotspotConfigurationManager.shared.apply(hotspotConfig) {[weak self] (error) in
+ guard let self = self else { return; }
+
+ if let error = error {
+
+ FlutterText.with(key: "errorConnectingHmgNetwork"){ localized in
+ self.complete(false,localized)
+ }
+
+ }else{
+ _ = Timer.scheduledTimer(withTimeInterval: 5, repeats: false) { (timer) in
+ self.hasInternet { (has) in
+ if has == true{
+ FlutterText.with(key: "connectedHmgNetworkWithInternet"){ localized in
+ self.complete(true,localized)
+ }
+ return
+ }else{
+ FlutterText.with(key: "connectedToHmgNetworkWithNoInternet"){ localized in
+ self.complete(false,localized)
+ }
+ }
+ }
+ }
+ }
+ }
+
+ }
+ }
+
+ private func isAlreadyConnected() -> Bool{
+ var currentSSID: String?
+ if let interfaces = CNCopySupportedInterfaces() as NSArray? {
+ for interface in interfaces {
+ if let interfaceInfo = CNCopyCurrentNetworkInfo(interface as! CFString) as NSDictionary? {
+ currentSSID = interfaceInfo[kCNNetworkInfoKeySSID as String] as? String
+ break
+ }
+ }
+ }
+ print("CurrentConnectedSSID: \(currentSSID)")
+ return currentSSID == SSID
+ }
+
+
+ private func getWifiCredentials(patientId:String, success: @escaping (() -> Void)){
+ if TEST {
+ success()
+ return
+ }
+
+ guard let url = API.WIFI_CREDENTIALS.toUrl() else { return assert(true, "Invalid URL: \(API.WIFI_CREDENTIALS)") }
+
+ // JSON Body for HTTP Request
+ let json: [String: Any] = ["PatientID": patientId]
+ let jsonData = try? JSONSerialization.data(withJSONObject: json)
+
+ var request = URLRequest(url: url, timeoutInterval: 20)
+ request.httpMethod = "POST"
+ request.setValue("application/json", forHTTPHeaderField: "Content-Type")
+ request.httpBody = jsonData
+
+ let task = URLSession.shared.dataTask(with: request) { data, response, error in
+ guard let data = data else {
+ self.somethingWentWrong()
+ return
+ }
+
+ if let responseJSON = try? JSONSerialization.jsonObject(with: data, options: []) as? [String: Any]{
+ if let requiredData = (responseJSON["Hmg_SMS_Get_By_ProjectID_And_PatientIDList"] as? [[String:Any]])?.first,
+ let userName = requiredData["UserName"] as? String, let password = requiredData["Password"] as? String{
+
+ USER = userName
+ PASS = password
+ success()
+
+ }else if let errorMessage = responseJSON["ErrorMessage"] as? String{
+ self.complete(false, errorMessage)
+ }else{
+ self.somethingWentWrong()
+ }
+ }else{
+ self.somethingWentWrong()
+ }
+
+ }
+ task.resume()
+
+ }
+
+ private func somethingWentWrong(){
+ FlutterText.with(key: "somethingWentWrong") { (localized) in
+ self.complete(false, localized)
+ }
+ }
+
+
+ func hasInternet( completion:@escaping ((Bool)->Void)){
+
+ let testUrl = "https://captive.apple.com"
+ var request = URLRequest(url: URL(string: testUrl)!,timeoutInterval: 5)
+ request.httpMethod = "GET"
+ let task = URLSession.shared.dataTask(with: request) { data, response, error in
+ guard let data = data else {
+ completion(false)
+ return
+ }
+
+ completion(
+ String(data: data, encoding: .utf8)!
+ .replacingOccurrences(of: " ", with: "")
+ .replacingOccurrences(of: "\n", with: "")
+ .lowercased()
+ .contains("success")
+ )
+
+ }
+ task.resume()
+ }
+
+}
diff --git a/ios/Runner/WifiConnect/HMG_Wifi.swift b/ios/Runner/WifiConnect/HMG_Wifi.swift
new file mode 100644
index 00000000..1335f766
--- /dev/null
+++ b/ios/Runner/WifiConnect/HMG_Wifi.swift
@@ -0,0 +1,172 @@
+//
+// HMG_GUEST.swift
+// HMG-iOS-Wifi
+//
+// Created by ZiKambrani on 23/03/1442 AH.
+// Copyright © 1442 ZiKambrani. All rights reserved.
+//
+
+import UIKit
+import NetworkExtension
+import SystemConfiguration.CaptiveNetwork
+
+fileprivate var TEST = true
+fileprivate let SSID = "GUEST-POC"
+fileprivate var USER = "0696"
+fileprivate var PASS = "0000"
+
+fileprivate func supportedEAPTypes() -> [NSNumber]{
+ let peap = NEHotspotEAPSettings.EAPType.EAPPEAP.rawValue
+ let fast = NEHotspotEAPSettings.EAPType.EAPFAST.rawValue
+ let tls = NEHotspotEAPSettings.EAPType.EAPTLS.rawValue
+ let ttls = NEHotspotEAPSettings.EAPType.EAPTTLS.rawValue
+ return [NSNumber(value: peap), NSNumber(value: fast), NSNumber(value: tls), NSNumber(value: ttls)]
+}
+
+class HMG_Internet{
+ static let shared = HMG_Wifi()
+
+ private var complete:((_ status:Bool, _ message:String) -> Void)!
+ func connect(patientId:String, completion:@escaping ((_ status:Bool, _ message:String) -> Void)){
+ complete = completion
+
+ if isAlreadyConnected() {
+ hasInternet { (has) in
+ if has == true{
+ self.complete(true, "You already connected to HMG network to access internet")
+ return
+ }else{
+ self.complete(false, "You are connected to HMG network but it have no internet access")
+ }
+ }
+ }else{
+ connect(patientId: patientId)
+ }
+ }
+
+ private func connect(patientId:String) {
+
+ getWifiCredentials(patientId: patientId) {
+ let trust_cert = Bundle.main.certificate(named: "GuestPOC_Certificate")
+ guard trust_cert.trust() == true else{
+ self.complete(false,"We are not able to connect you to HMG network due to security certificate")
+ return
+ }
+
+ let eapSettings = NEHotspotEAPSettings()
+ eapSettings.username = USER
+ eapSettings.password = PASS
+ eapSettings.trustedServerNames = ["*.hmg.com","onboard.hmg.com","hmg.com"]
+ eapSettings.supportedEAPTypes = [supportedEAPTypes().first!]
+// eapSettings.isTLSClientCertificateRequired = true
+// eapSettings.ttlsInnerAuthenticationType = .eapttlsInnerAuthenticationMSCHAPv2 // MSCHAPv2
+// eapSettings.setIdentity(Bundle.main.identity(named: "GuestPOC_Certificate", password: "1"))
+// eapSettings.setTrustedServerCertificates([trust_cert])
+
+ let hotspotConfig = NEHotspotConfiguration(ssid: SSID, eapSettings: eapSettings)
+ NEHotspotConfigurationManager.shared.apply(hotspotConfig) {[weak self] (error) in
+ guard let self = self else { return; }
+
+ if let error = error {
+ self.complete(false, "Error connecting to HMG network" /*error.localizedDescription*/ )
+ }else{
+ _ = Timer.scheduledTimer(withTimeInterval: 3, repeats: false) { (timer) in
+ self.hasInternet { (has) in
+ if has == true{
+ self.complete(true, "Successfully connected to the HMG network to access internet")
+ return
+ }else{
+ self.complete(false, "Successfully connected to the HMG network but it have no internet access")
+ }
+ }
+ }
+ }
+ }
+
+ }
+ }
+
+ private func isAlreadyConnected() -> Bool{
+ var currentSSID: String?
+ if let interfaces = CNCopySupportedInterfaces() as NSArray? {
+ for interface in interfaces {
+ if let interfaceInfo = CNCopyCurrentNetworkInfo(interface as! CFString) as NSDictionary? {
+ currentSSID = interfaceInfo[kCNNetworkInfoKeySSID as String] as? String
+ break
+ }
+ }
+ }
+
+ print("CurrentConnectedSSID: \(currentSSID)")
+ return currentSSID == SSID
+ }
+
+
+ private func getWifiCredentials(patientId:String, completion: @escaping (() -> Void)){
+ if TEST {
+ completion()
+ return
+ }
+
+ guard let url = API.WIFI_CREDENTIALS.toUrl() else { return assert(true, "Invalid URL: \(API.WIFI_CREDENTIALS)") }
+
+ // JSON Body for HTTP Request
+ let json: [String: Any] = ["PatientID": patientId]
+ let jsonData = try? JSONSerialization.data(withJSONObject: json)
+
+ var request = URLRequest(url: url, timeoutInterval: 20)
+ request.httpMethod = "POST"
+ request.setValue("application/json", forHTTPHeaderField: "Content-Type")
+ request.httpBody = jsonData
+
+ let task = URLSession.shared.dataTask(with: request) { data, response, error in
+ guard let data = data else {
+ self.complete(false, "Failed to get your internet credentials")
+ return
+ }
+
+ if let responseJSON = try? JSONSerialization.jsonObject(with: data, options: []) as? [String: Any]{
+ if let requiredData = responseJSON["Hmg_SMS_Get_By_ProjectID_And_PatientIDList"] as? [String:Any],
+ let userName = requiredData["UserName"] as? String, let password = requiredData["Password"] as? String{
+
+ USER = userName
+ PASS = password
+ completion()
+
+ }else if let errorMessage = responseJSON["ErrorMessage"] as? String{
+ self.complete(false, errorMessage)
+ }
+ }else{
+ self.complete(false, "Failed to get your internet credentials")
+ }
+
+ }
+ task.resume()
+
+ }
+
+
+ func hasInternet( completion:@escaping ((Bool)->Void)){
+
+ let testUrl = "https://captive.apple.com"
+ var request = URLRequest(url: URL(string: testUrl)!,timeoutInterval: 5)
+ request.httpMethod = "GET"
+ let task = URLSession.shared.dataTask(with: request) { data, response, error in
+ guard let data = data else {
+ completion(false)
+ return
+ }
+
+ completion(
+ String(data: data, encoding: .utf8)!
+ .replacingOccurrences(of: " ", with: "")
+ .replacingOccurrences(of: "\n", with: "")
+ .lowercased()
+ .contains("success")
+ )
+
+ }
+ task.resume()
+ }
+
+}
diff --git a/lib/config/config.dart b/lib/config/config.dart
index ce8b79de..eb9c2d92 100644
--- a/lib/config/config.dart
+++ b/lib/config/config.dart
@@ -7,40 +7,33 @@ import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart';
const MAX_SMALL_SCREEN = 660;
const BASE_URL = 'https://uat.hmgwebservices.com/';
+const PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity';
+// const BASE_URL = 'https://hmgwebservices.com/';
const GET_PROJECT = 'Services/Lists.svc/REST/GetProject';
///Doctor
-const GET_MY_DOCTOR =
- 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
+const GET_MY_DOCTOR = 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
const GET_DOCTOR_PROFILE = 'Services/Doctors.svc/REST/GetDocProfiles';
const GET_DOCTOR_RATING = 'Services/Doctors.svc/REST/dr_GetAvgDoctorRating';
///Prescriptions
const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList';
-const GET_PRESCRIPTIONS_ALL_ORDERS =
- 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
-const GET_PRESCRIPTION_REPORT =
- 'Services/Patients.svc/REST/INP_GetPrescriptionReport';
-const SEND_PRESCRIPTION_EMAIL =
- 'Services/Notifications.svc/REST/SendPrescriptionEmail';
-const GET_PRESCRIPTION_REPORT_ENH =
- 'Services/Patients.svc/REST/GetPrescriptionReport_enh';
+const GET_PRESCRIPTIONS_ALL_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
+const GET_PRESCRIPTION_REPORT = 'Services/Patients.svc/REST/INP_GetPrescriptionReport';
+const SEND_PRESCRIPTION_EMAIL = 'Services/Notifications.svc/REST/SendPrescriptionEmail';
+const GET_PRESCRIPTION_REPORT_ENH = 'Services/Patients.svc/REST/GetPrescriptionReport_enh';
///Lab Order
const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders';
-const GET_Patient_LAB_SPECIAL_RESULT =
- 'Services/Patients.svc/REST/GetPatientLabSpecialResults';
-const GET_Patient_LAB_RESULT =
- '/Services/Patients.svc/REST/GetPatientLabResults';
+const GET_Patient_LAB_SPECIAL_RESULT = 'Services/Patients.svc/REST/GetPatientLabSpecialResults';
+const GET_Patient_LAB_RESULT = 'Services/Patients.svc/REST/GetPatientLabResults';
///
const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders';
-const GET_PATIENT_ORDERS_DETAILS =
- 'Services/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead';
+const GET_PATIENT_ORDERS_DETAILS = 'Services/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead';
const GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL';
-const SEND_RAD_REPORT_EMAIL =
- 'Services/Notifications.svc/REST/SendRadReportEmail';
+const SEND_RAD_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendRadReportEmail';
///Feedback
const SEND_FEEDBACK = 'Services/COCWS.svc/REST/InsertCOCItemInSPList';
@@ -49,24 +42,17 @@ const GET_PATIENT_AppointmentHistory = 'Services'
'/Doctors.svc/REST/PateintHasAppoimentHistory';
///VITAL SIGN
-const GET_PATIENT_VITAL_SIGN =
- 'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign';
+const GET_PATIENT_VITAL_SIGN = 'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign';
///Er Nearest
-const GET_NEAREST_HOSPITAL =
- 'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime';
+const GET_NEAREST_HOSPITAL = 'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime';
///Er Nearest
-const GET_AMBULANCE_REQUEST =
- 'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod';
-const GET_PATIENT_ALL_PRES_ORDERS =
- 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
-const GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID =
- 'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID';
-const UPDATE_PRESS_ORDER =
- 'Services/Patients.svc/REST/PatientER_UpdatePresOrder';
-const INSERT_ER_INERT_PRES_ORDER =
- 'Services/Patients.svc/REST/PatientER_InsertPresOrder';
+const GET_AMBULANCE_REQUEST = 'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod';
+const GET_PATIENT_ALL_PRES_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
+const GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID = 'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID';
+const UPDATE_PRESS_ORDER = 'Services/Patients.svc/REST/PatientER_UpdatePresOrder';
+const INSERT_ER_INERT_PRES_ORDER = 'Services/Patients.svc/REST/PatientER_InsertPresOrder';
///FindUs
const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations';
@@ -75,15 +61,13 @@ const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations';
const GET_LIVECHAT_REQUEST = 'Services/Patients.svc/REST/GetPatientICProjects';
///babyInformation
-const GET_BABYINFORMATION_REQUEST =
- 'Services/Community.svc/REST/GetBabyByUserID';
+const GET_BABYINFORMATION_REQUEST = 'Services/Community.svc/REST/GetBabyByUserID';
///Get Baby By User ID
const GET_BABY_BY_USER_ID = 'Services/Community.svc/REST/GetBabyByUserID';
///userInformation
-const GET_USERINFORMATION_REQUEST =
- 'Services/Community.svc/REST/GetUserInformation_New';
+const GET_USERINFORMATION_REQUEST = 'Services/Community.svc/REST/GetUserInformation_New';
///addNewChild
const GET_NEWCHILD_REQUEST = 'Services/Community.svc/REST/CreateNewBaby';
@@ -101,19 +85,15 @@ const GET_TABLE_REQUEST = 'Services/Community.svc/REST/CreateVaccinationTable';
const GET_CITIES_REQUEST = 'Services/Lists.svc/REST/GetAllCities';
///BloodDetails
-const GET_BLOOD_REQUEST =
- 'services/PatientVarification.svc/REST/BloodDonation_GetBloodGroupDetails';
+const GET_BLOOD_REQUEST = 'services/PatientVarification.svc/REST/BloodDonation_GetBloodGroupDetails';
///Reports
const REPORTS = 'Services/Doctors.svc/REST/GetPatientMedicalReportStatusInfo';
-const INSERT_REQUEST_FOR_MEDICAL_REPORT =
- 'Services/Doctors.svc/REST/InsertRequestForMedicalReport';
+const INSERT_REQUEST_FOR_MEDICAL_REPORT = 'Services/Doctors.svc/REST/InsertRequestForMedicalReport';
///Rate
-const IS_LAST_APPOITMENT_RATED =
- 'Services/Doctors.svc/REST/IsLastAppoitmentRated';
-const GET_APPOINTMENT_DETAILS_BY_NO =
- 'Services/MobileNotifications.svc/REST/GetAppointmentDetailsByApptNo';
+const IS_LAST_APPOITMENT_RATED = 'Services/Doctors.svc/REST/IsLastAppoitmentRated';
+const GET_APPOINTMENT_DETAILS_BY_NO = 'Services/MobileNotifications.svc/REST/GetAppointmentDetailsByApptNo';
const GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID';
@@ -124,6 +104,9 @@ const GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID';
//URL to get clinic list
const GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized";
+//URL to get active appointment list
+const GET_ACTIVE_APPOINTMENTS_LIST_URL = "Services/Doctors.svc/Rest/Dr_GetAppointmentActiveNumber";
+
//URL to get projects list
const GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject';
@@ -131,100 +114,76 @@ const GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject';
const GET_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/SearchDoctorsByTime";
//URL to dental doctors list
-const GET_DENTAL_DOCTORS_LIST_URL =
- "Services/Doctors.svc/REST/Dental_DoctorChiefComplaintMapping";
+const GET_DENTAL_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/Dental_DoctorChiefComplaintMapping";
//URL to get doctor free slots
const GET_DOCTOR_FREE_SLOTS = "Services/Doctors.svc/REST/GetDoctorFreeSlots";
//URL to insert appointment
-const INSERT_SPECIFIC_APPOINTMENT =
- "Services/Doctors.svc/REST/InsertSpecificAppointment";
+const INSERT_SPECIFIC_APPOINTMENT = "Services/Doctors.svc/REST/InsertSpecificAppointment";
//URL to get patient share
-const GET_PATIENT_SHARE =
- "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNO";
+const GET_PATIENT_SHARE = "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNO";
//URL to get patient appointment history
-const GET_PATIENT_APPOINTMENT_HISTORY =
- "Services/Doctors.svc/REST/PateintHasAppoimentHistory";
+const GET_PATIENT_APPOINTMENT_HISTORY = "Services/Doctors.svc/REST/PateintHasAppoimentHistory";
//URL to get patient appointment curfew history
-const GET_PATIENT_APPOINTMENT_CURFEW_HISTORY =
- "Services/Doctors.svc/REST/AppoimentHistoryForCurfew";
+const GET_PATIENT_APPOINTMENT_CURFEW_HISTORY = "Services/Doctors.svc/REST/AppoimentHistoryForCurfew";
//URL to confirm appointment
-const CONFIRM_APPOINTMENT =
- "Services/MobileNotifications.svc/REST/ConfirmAppointment";
+const CONFIRM_APPOINTMENT = "Services/MobileNotifications.svc/REST/ConfirmAppointment";
-const INSERT_VIDA_REQUEST =
- "Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart";
+const INSERT_VIDA_REQUEST = "Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart";
//URL to cancel appointment
const CANCEL_APPOINTMENT = "Services/Doctors.svc/REST/CancelAppointment";
//URL get appointment QR
-const GENERATE_QR_APPOINTMENT =
- "Services/Doctors.svc/REST/GenerateQRAppointmentNo";
+const GENERATE_QR_APPOINTMENT = "Services/Doctors.svc/REST/GenerateQRAppointmentNo";
//URL send email appointment QR
-const EMAIL_QR_APPOINTMENT =
- "Services/Notifications.svc/REST/sendEmailForOnLineCheckin";
+const EMAIL_QR_APPOINTMENT = "Services/Notifications.svc/REST/sendEmailForOnLineCheckin";
//URL check payment status
-const CHECK_PAYMENT_STATUS =
- "Services/PayFort_Serv.svc/REST/GetRequestStatusByRequestID";
+const CHECK_PAYMENT_STATUS = "Services/PayFort_Serv.svc/REST/GetRequestStatusByRequestID";
//URL create advance payment
const CREATE_ADVANCE_PAYMENT = "Services/Doctors.svc/REST/CreateAdvancePayment";
-const ADD_ADVANCE_NUMBER_REQUEST =
- 'Services/PayFort_Serv.svc/REST/AddAdvancedNumberRequest';
+const HIS_CREATE_ADVANCE_PAYMENT = "Services/Patients.svc/REST/HIS_CreateAdvancePayment";
+
+const ADD_ADVANCE_NUMBER_REQUEST = 'Services/PayFort_Serv.svc/REST/AddAdvancedNumberRequest';
-const IS_ALLOW_ASK_DOCTOR =
- 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
-const GET_CALL_REQUEST_TYPE =
- 'Services/Doctors.svc/REST/GetCallRequestType_LOV';
+const IS_ALLOW_ASK_DOCTOR = 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
+const GET_CALL_REQUEST_TYPE = 'Services/Doctors.svc/REST/GetCallRequestType_LOV';
const SEND_CALL_REQUEST = 'Services/Doctors.svc/REST/InsertCallInfo';
-const GET_LIVECARE_CLINICS =
- 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinics';
+const GET_LIVECARE_CLINICS = 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinics';
-const GET_LIVECARE_SCHEDULE_CLINICS =
- 'Services/Doctors.svc/REST/PatientER_GetClinicsHaveSchedule';
+const GET_LIVECARE_SCHEDULE_CLINICS = 'Services/Doctors.svc/REST/PatientER_GetClinicsHaveSchedule';
-const GET_LIVECARE_SCHEDULE_CLINIC_DOCTOR_LIST =
- 'Services/Doctors.svc/REST/PatientER_GetDoctorByClinicID';
+const GET_LIVECARE_SCHEDULE_CLINIC_DOCTOR_LIST = 'Services/Doctors.svc/REST/PatientER_GetDoctorByClinicID';
-const GET_LIVECARE_SCHEDULE_DOCTOR_TIME_SLOTS =
- 'Services/Doctors.svc/REST/PatientER_GetDoctorFreeSlots';
+const GET_LIVECARE_SCHEDULE_DOCTOR_TIME_SLOTS = 'Services/Doctors.svc/REST/PatientER_GetDoctorFreeSlots';
-const INSERT_LIVECARE_SCHEDULE_APPOINTMENT =
- 'Services/Doctors.svc/REST/InsertSpecificAppoitmentForSchedule';
+const INSERT_LIVECARE_SCHEDULE_APPOINTMENT = 'Services/Doctors.svc/REST/InsertSpecificAppoitmentForSchedule';
-const GET_PATIENT_SHARE_LIVECARE =
- "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNOForLiveCare";
+const GET_PATIENT_SHARE_LIVECARE = "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNOForLiveCare";
-const GET_LIVECARE_CLINIC_TIMING =
- 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinicsServiceTimingsSchedule';
+const GET_LIVECARE_CLINIC_TIMING = 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinicsServiceTimingsSchedule';
-const GET_ER_APPOINTMENT_FEES =
- 'Services/DoctorApplication.svc/REST/GetERAppointmentFees';
+const GET_ER_APPOINTMENT_FEES = 'Services/DoctorApplication.svc/REST/GetERAppointmentFees';
const GET_ER_APPOINTMENT_TIME = 'Services/ER_VirtualCall.svc/REST/GetRestTime';
-const ADD_NEW_CALL_FOR_PATIENT_ER =
- 'Services/DoctorApplication.svc/REST/NewCallForPatientER';
+const ADD_NEW_CALL_FOR_PATIENT_ER = 'Services/DoctorApplication.svc/REST/NewCallForPatientER';
-const GET_LIVECARE_HISTORY =
- 'Services/ER_VirtualCall.svc/REST/GetPatientErVirtualHistory';
-const CANCEL_LIVECARE_REQUEST =
- 'Services/ER_VirtualCall.svc/REST/DeleteErRequest';
-const SEND_LIVECARE_INVOICE_EMAIL =
- 'Services/Notifications.svc/REST/SendInvoiceForLiveCare';
+const GET_LIVECARE_HISTORY = 'Services/ER_VirtualCall.svc/REST/GetPatientErVirtualHistory';
+const CANCEL_LIVECARE_REQUEST = 'Services/ER_VirtualCall.svc/REST/DeleteErRequest';
+const SEND_LIVECARE_INVOICE_EMAIL = 'Services/Notifications.svc/REST/SendInvoiceForLiveCare';
const GET_USER_TERMS = '/Services/Patients.svc/REST/GetUserTermsAndConditions';
-const UPDATE_HEALTH_TERMS =
- '/services/Patients.svc/REST/UpdatePateintHealthSummaryReport';
+const UPDATE_HEALTH_TERMS = '/services/Patients.svc/REST/UpdatePateintHealthSummaryReport';
//URL to get medicine and pharmacies list
const CHANNEL = 3;
@@ -236,20 +195,21 @@ const LANGUAGE = 2;
const PATIENT_OUT_SA = 0;
const SESSION_ID = 'TMRhVmkGhOsvamErw';
const IS_DENTAL_ALLOWED_BACKEND = false;
-const PATIENT_TYPE = 1;
-const PATIENT_TYPE_ID = 1;
+const PATIENT_TYPE = 2;
+const PATIENT_TYPE_ID = 2;
+var DEVICE_TOKEN = "";
var DeviceTypeID = Platform.isIOS ? 1 : 2;
const LANGUAGE_ID = 2;
const GET_PHARMCY_ITEMS = "Services/Lists.svc/REST/GetPharmcyItems_Region";
const GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList";
-const GET_PAtIENTS_INSURANCE =
- "Services/Patients.svc/REST/Get_PatientInsuranceDetails";
-const GET_PAtIENTS_INSURANCE_UPDATED =
- "Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory";
+const GET_PAtIENTS_INSURANCE = "Services/Patients.svc/REST/Get_PatientInsuranceDetails";
+const GET_PAtIENTS_INSURANCE_UPDATED = "Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory";
+
+const INSURANCE_DETAILS = "Services/Patients.svc/REST/Get_InsuranceCheckList";
+
const GET_VACCINES = "Services/Patients.svc/REST/GetDoneVaccinesByPatientID";
const GET_VACCINES_EMAIL = "Services/Notifications.svc/REST/SendVaccinesEmail";
-const GET_PAtIENTS_INSURANCE_APPROVALS =
- "Services/Patients.svc/REST/GetApprovalStatus";
+const GET_PAtIENTS_INSURANCE_APPROVALS = "Services/Patients.svc/REST/GetApprovalStatus";
const SEARCH_BOT = 'HabibiChatBotApi/BotInterface/GetVoiceCommandResponse';
const GET_VACCINATIONS_ITEMS = "/Services/ERP.svc/REST/GET_VACCINATIONS_ITEMS";
@@ -259,59 +219,38 @@ const GET_PATIENT_SICK_LEAVE = 'Services/Patients.svc/REST/GetPatientSickLeave';
const SendSickLeaveEmail = 'Services/Notifications.svc/REST/SendSickLeaveEmail';
-const GET_PATIENT_AdVANCE_BALANCE_AMOUNT =
- 'Services/Patients.svc/REST/GetPatientAdvanceBalanceAmount';
-const GET_PATIENT_INFO_BY_ID =
- 'Services/Doctors.svc/REST/GetPatientInfoByPatientID';
-const GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER =
- 'Services/Patients.svc/REST/AP_GetPatientInfoByPatientIDandMobileNumber';
-const SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT =
- 'Services/Authentication.svc/REST/SendActivationCodeForAdvancePayment';
-const CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT =
- 'Services/Authentication.svc/REST/CheckActivationCodeForAdvancePayment';
+const GET_PATIENT_AdVANCE_BALANCE_AMOUNT = 'Services/Patients.svc/REST/GetPatientAdvanceBalanceAmount';
+const GET_PATIENT_INFO_BY_ID = 'Services/Doctors.svc/REST/GetPatientInfoByPatientID';
+const GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER = 'Services/Patients.svc/REST/AP_GetPatientInfoByPatientIDandMobileNumber';
+const SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = 'Services/Authentication.svc/REST/SendActivationCodeForAdvancePayment';
+const CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = 'Services/Authentication.svc/REST/CheckActivationCodeForAdvancePayment';
-const GET_COVID_DRIVETHRU_PROJECT_LIST =
- 'Services/Doctors.svc/REST/COVID19_ProjectDriveThroughTestingCenter';
+const GET_COVID_DRIVETHRU_PROJECT_LIST = 'Services/Doctors.svc/REST/COVID19_ProjectDriveThroughTestingCenter';
-const GET_COVID_DRIVETHRU_PAYMENT_INFO =
- 'Services/Doctors.svc/REST/COVID19_GetPatientPaymentInormation';
+const GET_COVID_DRIVETHRU_PAYMENT_INFO = 'Services/Doctors.svc/REST/COVID19_GetPatientPaymentInormation';
-const GET_COVID_DRIVETHRU_FREE_SLOTS =
- 'Services/Doctors.svc/REST/COVID19_GetFreeSlots';
+const GET_COVID_DRIVETHRU_FREE_SLOTS = 'Services/Doctors.svc/REST/COVID19_GetFreeSlots';
///Smartwatch Integration Services
-const GET_PATIENT_LAST_RECORD =
- 'Services/Patients.svc/REST/Med_GetPatientLastRecord';
+const GET_PATIENT_LAST_RECORD = 'Services/Patients.svc/REST/Med_GetPatientLastRecord';
///My Trackers
-const GET_DIABETIC_RESULT_AVERAGE =
- 'Services/Patients.svc/REST/Patient_GetDiabeticResultAverage';
-const GET_DIABTEC_RESULT =
- 'Services/Patients.svc/REST/Patient_GetDiabtecResults';
-const ADD_DIABTEC_RESULT =
- 'Services/Patients.svc/REST/Patient_AddDiabtecResult';
-
-const GET_BLOOD_PRESSURE_RESULT_AVERAGE =
- 'Services/Patients.svc/REST/Patient_GetBloodPressureResultAverage';
-const GET_BLOOD_PRESSURE_RESULT =
- 'Services/Patients.svc/REST/Patient_GetBloodPressureResult';
-const ADD_BLOOD_PRESSURE_RESULT =
- 'Services/Patients.svc/REST/Patient_AddBloodPressureResult';
-
-const GET_WEIGHT_PRESSURE_RESULT_AVERAGE =
- 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResultAverage';
-const GET_WEIGHT_PRESSURE_RESULT =
- 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResult';
-const ADD_WEIGHT_PRESSURE_RESULT =
- 'Services/Patients.svc/REST/Patient_AddWeightMeasurementResult';
-
-const ADD_ACTIVE_PRESCRIPTIONS_REPORT_BY_PATIENT_ID =
- 'Services/Patients.svc/Rest/GetActivePrescriptionReportByPatientID';
-
-const GET_CALL_INFO_HOURS_RESULT =
- 'Services/Doctors.svc/REST/GetCallInfoHoursResult';
-const GET_CALL_REQUEST_TYPE_LOV =
- 'Services/Doctors.svc/REST/GetCallRequestType_LOV';
+const GET_DIABETIC_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetDiabeticResultAverage';
+const GET_DIABTEC_RESULT = 'Services/Patients.svc/REST/Patient_GetDiabtecResults';
+const ADD_DIABTEC_RESULT = 'Services/Patients.svc/REST/Patient_AddDiabtecResult';
+
+const GET_BLOOD_PRESSURE_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetBloodPressureResultAverage';
+const GET_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_GetBloodPressureResult';
+const ADD_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_AddBloodPressureResult';
+
+const GET_WEIGHT_PRESSURE_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResultAverage';
+const GET_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResult';
+const ADD_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_AddWeightMeasurementResult';
+
+const ADD_ACTIVE_PRESCRIPTIONS_REPORT_BY_PATIENT_ID = 'Services/Patients.svc/Rest/GetActivePrescriptionReportByPatientID';
+
+const GET_CALL_INFO_HOURS_RESULT = 'Services/Doctors.svc/REST/GetCallInfoHoursResult';
+const GET_CALL_REQUEST_TYPE_LOV = 'Services/Doctors.svc/REST/GetCallRequestType_LOV';
const GET_DOCTOR_RESPONSE = 'Services/Patients.svc/REST/GetDoctorResponse';
const UPDATE_READ_STATUS = 'Services/Patients.svc/REST/UpdateReadStatus';
const INSERT_CALL_INFO = 'Services/Doctors.svc/REST/InsertCallInfo';
@@ -319,18 +258,13 @@ const INSERT_CALL_INFO = 'Services/Doctors.svc/REST/InsertCallInfo';
const GET_PATIENT_ALLERGIES = 'Services/Patients.svc/REST/GetPatientAllergies';
// H2O
-const H2O_GET_USER_PROGRESS =
- "Services/H2ORemainder.svc/REST/H2O_GetUserProgress";
-const H2O_INSERT_USER_ACTIVITY =
- "Services/H2ORemainder.svc/REST/H2O_InsertUserActivity";
+const H2O_GET_USER_PROGRESS = "Services/H2ORemainder.svc/REST/H2O_GetUserProgress";
+const H2O_INSERT_USER_ACTIVITY = "Services/H2ORemainder.svc/REST/H2O_InsertUserActivity";
//E_Referral Services
-const GET_ALL_RELATIONSHIP_TYPES =
- "Services/Patients.svc/REST/GetAllRelationshipTypes";
-const SEND_ACTIVATION_CODE_FOR_E_REFERRAL =
- 'Services/Authentication.svc/REST/SendActivationCodeForEReferral';
-const CHECK_ACTIVATION_CODE_FOR_E_REFERRAL =
- 'Services/Authentication.svc/REST/CheckActivationCodeForEReferral';
+const GET_ALL_RELATIONSHIP_TYPES = "Services/Patients.svc/REST/GetAllRelationshipTypes";
+const SEND_ACTIVATION_CODE_FOR_E_REFERRAL = 'Services/Authentication.svc/REST/SendActivationCodeForEReferral';
+const CHECK_ACTIVATION_CODE_FOR_E_REFERRAL = 'Services/Authentication.svc/REST/CheckActivationCodeForEReferral';
const GET_ALL_CITIES = 'services/Lists.svc/rest/GetAllCities';
const CREATE_E_REFERRAL = "Services/Patients.svc/REST/CreateEReferral";
const GET_E_REFERRALS = "Services/Patients.svc/REST/GetEReferrals";
@@ -343,18 +277,14 @@ const GET_PHARMACY_PRODUCTs_BY_IDS = "epharmacy/api/productsbyids/";
const GET_CUSTOMERS_ADDRESSES = "epharmacy/api/Customers/";
// Home Health Care
-const HHC_GET_ALL_SERVICES =
- "Services/Patients.svc/REST/PatientER_HHC_GetAllServices";
-const HHC_GET_ALL_CMC_SERVICES =
- "Services/Patients.svc/REST/PatientER_CMC_GetAllServices";
-const PATIENT_ER_UPDATE_PRES_ORDER =
- "Services/Patients.svc/REST/PatientER_UpdatePresOrder";
-const GET_ORDER_DETAIL_BY_ID =
- "Services/Patients.svc/REST/PatientER_HHC_GetTransactionsForOrder";
-const GET_CMC_ORDER_DETAIL_BY_ID =
- "Services/Patients.svc/REST/PatientER_CMC_GetTransactionsForOrder";
+const HHC_GET_ALL_SERVICES = "Services/Patients.svc/REST/PatientER_HHC_GetAllServices";
+const HHC_GET_ALL_CMC_SERVICES = "Services/Patients.svc/REST/PatientER_CMC_GetAllServices";
+const PATIENT_ER_UPDATE_PRES_ORDER = "Services/Patients.svc/REST/PatientER_UpdatePresOrder";
+const GET_ORDER_DETAIL_BY_ID = "Services/Patients.svc/REST/PatientER_HHC_GetTransactionsForOrder";
+const GET_CMC_ORDER_DETAIL_BY_ID = "Services/Patients.svc/REST/PatientER_CMC_GetTransactionsForOrder";
const GET_CHECK_UP_ITEMS = "Services/Patients.svc/REST/GetCheckUpItems";
-
+const PUSH_NOTIFICATION_GET_ALL_NOTIFICATIONS = 'Services/MobileNotifications.svc/REST/PushNotification_GetAllNotifications';
+const PUSH_NOTIFICATION_SET_MESSAGES_FROM_POOL_AS_READ = 'Services/MobileNotifications.svc/REST/PushNotification_SetMessagesFromPoolAsRead';
const TIMER_MIN = 10;
const GOOGLE_API_KEY = "AIzaSyCmevVlr2Bh-c8W1VUzo8gt8JRY7n5PANw";
diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart
index 77cb1c44..07edb523 100644
--- a/lib/config/localized_values.dart
+++ b/lib/config/localized_values.dart
@@ -1,4 +1,28 @@
-const Map> localizedValues = {
+// --------- - -- - - - - - - - - ----------------
+// Used for Native through Platform Method Channel
+// --------- - -- - - - - - - - - ----------------
+const Map platformLocalizedValues = {
+ "errorConnectingHmgNetwork": {"en": "Sorry you are not connecting to HMG network", "ar": "نعتذر لست متصل في شكبة مستشفى د.سليمان الحبيب"},
+ "successConnectingHmgNetwork": {"en": "You connected to HMG network successfully, you can access the app", "ar": "تم التصال بشبكة د.سليمان الحبيب بنجاح, تستطيع الان استخدام تطبيق الحبيب"},
+ "failedConnectingHmgNetwork": {
+ "en": "Sorry the connection to HMG network had been failed, make sure you are in range of HMG network",
+ "ar": "نعتذر لقد فشل الاتصال بشبكة د.سليمان الحبيب, تاكد من وجودك داخل نطاق الشبكة"
+ },
+ "alreadyConnectedHmgNetwork": {"en": " You already connected to HMG network to access Alhabib app", "ar": "انت متصل مسبقاً بالشبكة تستطيع استخدام تطبيق الحبيب"},
+ "somethingWentWrong": {"en": "Sorry something went wrong please try again later", "ar": "نعتذر لخدمتكم يرجى المحاولة لاحقا"},
+ "enablingWifi": {"en": "Enabling wifi...", "ar": "Enabling wifi..."},
+ "connectedHmgNetworkWithInternet": {"en": "Successfully connected to the HMG network to access internet", "ar": "Successfully connected to the HMG network to access internet"},
+ "connectedToHmgNetworkWithNoInternet": {
+ "en": "Successfully connected to the HMG network but it have no internet access",
+ "ar": "Successfully connected to the HMG network but it have no internet access"
+ },
+ "notConnectedToHmgNetworkSecurityIssue": {
+ "en": "We are not able to connect you to HMG network due to security reasons",
+ "ar": "We are not able to connect you to HMG network due to security reasons"
+ }
+};
+
+const Map localizedValues = {
'dashboardScreenToolbarTitle': {'ar': 'الرئيسة', 'en': 'Home'},
'settings': {'en': 'Settings', 'ar': 'الاعدادات'},
'language': {'en': 'App Language', 'ar': 'لغة التطبيق'},
@@ -21,10 +45,7 @@ const Map> localizedValues = {
'clinicName': {'en': 'Clinic Name', 'ar': 'اسم العيادة'},
'doctorName': {'en': 'Doctor Name', 'ar': 'إسم الطبيب'},
'nearestAppo': {'en': 'Nearest appointment', 'ar': 'أقرب موعد'},
- 'searchByDocText': {
- 'en': 'Type the name of the doctor to help you find him',
- 'ar': 'اكتب اسم الطبيب لمساعدتك في العثور عليه'
- },
+ 'searchByDocText': {'en': 'Type the name of the doctor to help you find him', 'ar': 'اكتب اسم الطبيب لمساعدتك في العثور عليه'},
'enterDocName': {'en': 'Enter Doctor name', 'ar': 'أدخل إسم الطبيب'},
'search': {'en': 'Search', 'ar': 'بحث'},
'bookNow': {'en': 'BOOK NOW', 'ar': 'احجز الآن'},
@@ -34,17 +55,11 @@ const Map> localizedValues = {
'gender': {'en': 'Gender', 'ar': 'الجنس'},
'nationality': {'en': 'Nationality', 'ar': 'الجنسية'},
'docQualifications': {'en': 'Doctor Qualifications', 'ar': 'مؤهلات الطبيب'},
- 'confirmAppoHeading': {
- 'en': 'Kindly confirm your Appointment',
- 'ar': 'يرجى تأكيد موعدك'
- },
+ 'confirmAppoHeading': {'en': 'Kindly confirm your Appointment', 'ar': 'يرجى تأكيد موعدك'},
'patientInfo': {'en': 'Patient Information', 'ar': 'معلومات المريض'},
'bookSuccess': {'en': 'Book Success', 'ar': 'تم حجز الموعد بنجاح'},
'patientShare': {'en': 'Patient Share', 'ar': 'المبلغ المستحق'},
- 'patientShareWithTax': {
- 'en': 'Patient Share with Tax',
- 'ar': 'المبلغ الإجمالي المستحق'
- },
+ 'patientShareWithTax': {'en': 'Patient Share with Tax', 'ar': 'المبلغ الإجمالي المستحق'},
'confirmAppo': {'en': 'Confirm Appointment', 'ar': 'تأكيد الموعد'},
'confirm': {'en': 'Confirm', 'ar': 'تأكيد'},
'confirmLiveCare': {'en': 'Confirm LiveCare', 'ar': 'تأكيد لايف كير'},
@@ -61,41 +76,15 @@ const Map> localizedValues = {
'instruction': {'en': 'Instructions', 'ar': 'تعليمات'},
'livecare': {'en': 'LiveCare', 'ar': 'لايف كير'},
'livecareAppo': {'en': 'LiveCare Appointment', 'ar': 'الموعد لايف كير'},
- 'cancelAppoMsg': {
- 'en': 'Are you sure you want to cancel this appointment?',
- 'ar': 'هل أنت متأكد أنك تريد إلغاء هذا الموعد؟'
- },
+ 'cancelAppoMsg': {'en': 'Are you sure you want to cancel this appointment?', 'ar': 'هل أنت متأكد أنك تريد إلغاء هذا الموعد؟'},
- 'upcoming-noAction': {
- 'en': 'No Action Required',
- 'ar': 'لا يوجد إجراء مطلوب'
- },
- 'upcoming-confirm': {
- 'en': 'Please confirm the appointment to avoid cancellation',
- 'ar': 'يرجى تأكيد الموعد لتفادي الإلغاء'
- },
- 'upcoming-payment-pending': {
- 'en':
- 'Online Payment will be Activated before 24 Hours of Appointment Time',
- 'ar': 'سيتم تفعيل خدمة الدفع الالكتروني قبل 24 ساعة من موعد الحجز'
- },
- 'upcoming-payment-now': {
- 'en': 'Pay Online now to avoid long waiting queue',
- 'ar': 'ادفع الآن لتفادي الانتظار'
- },
- 'upcoming-QR': {
- 'en': 'Use the QR Code to Check-In in hospital',
- 'ar': 'استخدم الرمز لتسجيل الحضور في المستشفى'
- },
- 'upcoming-virtual': {
- 'en':
- 'This is a virtual appointment, Please adhere to the instructions for a seamless experience.',
- 'ar': 'هذا موعد اتصال مرئي عن بعد ، يرجى اتباع تعليمات الخدمة.'
- },
- 'upcoming-livecare': {
- 'en': 'This is a LiveCare appointment',
- 'ar': 'هذا موعد لايف كير'
- },
+ 'upcoming-noAction': {'en': 'No Action Required', 'ar': 'لا يوجد إجراء مطلوب'},
+ 'upcoming-confirm': {'en': 'Please confirm the appointment to avoid cancellation', 'ar': 'يرجى تأكيد الموعد لتفادي الإلغاء'},
+ 'upcoming-payment-pending': {'en': 'Online Payment will be Activated before 24 Hours of Appointment Time', 'ar': 'سيتم تفعيل خدمة الدفع الالكتروني قبل 24 ساعة من موعد الحجز'},
+ 'upcoming-payment-now': {'en': 'Pay Online now to avoid long waiting queue', 'ar': 'ادفع الآن لتفادي الانتظار'},
+ 'upcoming-QR': {'en': 'Use the QR Code to Check-In in hospital', 'ar': 'استخدم الرمز لتسجيل الحضور في المستشفى'},
+ 'upcoming-virtual': {'en': 'This is a virtual appointment, Please adhere to the instructions for a seamless experience.', 'ar': 'هذا موعد اتصال مرئي عن بعد ، يرجى اتباع تعليمات الخدمة.'},
+ 'upcoming-livecare': {'en': 'This is a LiveCare appointment', 'ar': 'هذا موعد لايف كير'},
'upcoming-details': {'en': 'More Details', 'ar': 'المزيد'},
'reschedule': {'en': 'Reschedule', 'ar': 'إعادة جدولة'},
'raise': {'en': 'Raise', 'ar': 'رفع'},
@@ -109,46 +98,30 @@ const Map> localizedValues = {
'set-reminder': {'en': 'Set Reminder', 'ar': 'تعيين تذكير'},
'login': {'en': 'Login', 'ar': 'تسجيل الدخول'},
- 'loginregister': {'en': 'Login / Register', 'ar': 'دخولتسجيل'},
- 'welcome': {'en': 'Welcome', 'ar': 'أهلا بك'},
- 'welcome_text': {
- 'en': 'Dr. Sulaiman Al Habib Mobile Application ',
- 'ar': 'الدكتور سليمان الحبيب لتطبيقات الهاتف المتحرك'
- },
- 'welcome_text2': {
- 'en': 'Have you visited AlHabib Medical Group before? ',
- 'ar': 'الدكتور سليمان الحبيب لتطبيقات الهاتف المتحرك'
- },
+ 'loginregister': {'en': 'Login / Register', 'ar': 'تسجيل الدخول'},
+ 'poweredBy': {'en': 'Powered By', 'ar': 'مشغل بواسطة'},
+ "welcome": {"en": "Welcome", "ar": "مرحبا"},
+ "welcome_text": {"en": "Dr. Sulaiman Al Habib Mobile Application", "ar": "الدكتور سليمان الحبيب لتطبيقات الهاتف المتحرك"},
+ 'welcome_text2': {'en': 'Have you visited AlHabib Medical Group before? ', 'ar': 'هل قمت بزيارة مجموعة الحبيب الطبية من قبل؟'},
'yes': {'en': 'Yes', 'ar': 'نعم'},
'no': {'en': 'No', 'ar': 'لا'},
- "logintyperadio": {
- "en": "Choose from below options to login to your medical file.",
- "ar": "اختر من الخيارات أدناه لتسجيل الدخول إلى ملفك الطبي."
- },
+ "logintyperadio": {"en": "Choose from below options to login to your medical file.", "ar": "اختر من الخيارات أدناه لتسجيل الدخول إلى ملفك الطبي."},
"registernow": {"en": "Register Now", "ar": "تسجيل الان"},
- "nationalID": {"en": "National ID", "ar": "رقم الهوية"},
+ "nationalID": {"en": "Enter the Identification Number", "ar": "أدخل رقم الهوية الوطنية او الاقامة"},
+ "national-id": {"en": "National ID", "ar": "رقم الهوية"},
"fileNo": {"en": "File Number", "ar": "رقم الملف"},
+ "fileno": {"en": "File No", "ar": "رقم الملف"},
"forgotFileNo": {"en": "Forgot file Number?", "ar": "نسيت رقم الملف الطبي؟"},
- "enter-national-id": {
- "en": "Please enter mobile number and national ID / Iqama",
- "ar": "الرجاء إدخال رقم الجوال والهوية الوطنية / الاقامة"
- },
- "profile-info": {
- "en": "Please enter profile information",
- "ar": "الرجاء إدخال معلومات الملف الشخصي"
- },
+ "forgotFileNoTitle": {"en": "Forgot medical file Number", "ar": "نسيت رقم الملف"},
+
+ "enter-national-id": {"en": "Please enter mobile number and identification number", "ar": "الرجاء إدخال رقم الجوال ورقم الهوية"},
+ "profile-info": {"en": "Please enter profile information", "ar": "الرجاء إدخال معلومات الملف الشخصي"},
"submit": {"en": "Submit", "ar": "ارسال"},
- "forgot-desc": {
- "en": "Enter the mobile number to receive the Medical file Number via SMS",
- "ar": "أدخل رقم الجوال المسجل لاستلام رقم الملف عن طريق الرسائل النصية"
- },
+ "forgot-desc": {"en": "Enter the mobile number to receive the Medical file Number via SMS", "ar": "أدخل رقم الجوال المسجل لاستلام رقم الملف عن طريق الرسائل النصية"},
"dob": {"en": "Birth Date:", "ar": "تاريخ الميلاد"},
"hijri-date": {"en": "Hijri Date", "ar": "التاريخ الهجري"},
"gregorian-date": {"en": "Gregorian Date", "ar": "التاريخ الميلادي"},
- "verify-login-with": {
- "en": "Please choose one of the following options to verify",
- "ar": "الرجاء اختيار احدى الخيارات التالية للتحقق من البيانات"
- },
+ "verify-login-with": {"en": "Please choose one of the following options to verify", "ar": "الرجاء اختيار احدى الخيارات التالية للتحقق من البيانات"},
"register-user": {"en": "Register", "ar": "تسجيل"},
"verify-with-fingerprint": {"en": "Fingerprint", "ar": "بصمة"},
"verify-with-faceid": {"en": "Face ID", "ar": "معرف الوجه"},
@@ -157,32 +130,18 @@ const Map> localizedValues = {
"last-login": {"en": "LAST LOGIN AT:", "ar": "آخر تسجيل دخول"},
"last-login-with": {"en": "VERIFICATION TYPE:", "ar": "نوع التحقق:"},
"verify-fingerprint": {
- "en":
- "To activate the fingerprint login service, please verify data by using one of the following options.",
- "ar":
- "لتفعيل خدمة الدخول بالبصمة، يرجى اختيار احدى القنوات التالية للتحقق من البيانات"
+ "en": "To activate the fingerprint login service, please verify data by using one of the following options.",
+ "ar": "لتفعيل خدمة الدخول بالبصمة، يرجى اختيار احدى القنوات التالية للتحقق من البيانات"
},
'searchMedicine': {'en': 'Search Medicine', 'ar': 'البحث عن الدواء'},
'pharmaciesList': {'en': 'Pharmacies List', 'ar': 'قائمة الصيدلايات'},
- 'searchMedicineHere': {
- 'en': 'Search Medicine Here',
- 'ar': 'ابحث عن الدواء هنا'
- },
+ 'searchMedicineHere': {'en': 'Search Medicine Here', 'ar': 'ابحث عن الدواء هنا'},
'description': {'en': 'Description', 'ar': 'الوصف'},
'price': {'en': 'Price', 'ar': 'السعر'},
'youCanFindItIn': {'en': 'You can find it in', 'ar': 'يمكنكة ان تجده في'},
- 'pleaseEnterMedicineName': {
- 'en': 'Please Enter Medicine Name',
- 'ar': 'الرجائ ادخال اسم الدواء'
- },
- "verification_message": {
- "en": "Please enter verification code",
- "ar": "الرجاء إدخال رمز التحقق"
- },
- "validation_message": {
- "en": "The verification code expires in",
- "ar": "تنتهي صلاحية رمز التحقق خلال"
- },
+ 'pleaseEnterMedicineName': {'en': 'Please Enter Medicine Name', 'ar': 'الرجائ ادخال اسم الدواء'},
+ "verification_message": {"en": "Please enter verification code", "ar": "الرجاء إدخال رمز التحقق"},
+ "validation_message": {"en": "The verification code expires in", "ar": "تنتهي صلاحية رمز التحقق خلال"},
"arabic-change": {"en": "عربي", "ar": "English"},
"notification": {"en": "Notifications", "ar": "إشعارات"},
"app-settings": {"en": "App Settings", "ar": "إعدادات التطبيق"},
@@ -190,80 +149,31 @@ const Map> localizedValues = {
"before": {"en": "Before", "ar": "قبل"},
"minute": {"en": "Minutes", "ar": "دقيقة"},
"hour": {"en": "Hour", "ar": "ساعة"},
- "reminderSuccess": {
- "en": "The reminder has been added successfully",
- "ar": "يضاف التذكير بنجاح"
- },
- "patientShareToDo": {
- "en": "Amount before tax: ",
- "ar": "المبلغ قبل الضريبة:"
- },
+ "reminderSuccess": {"en": "The reminder has been added successfully", "ar": "يضاف التذكير بنجاح"},
+ "patientShareToDo": {"en": "Amount before tax: ", "ar": "المبلغ قبل الضريبة:"},
"patientTaxToDo": {"en": "Tax amount: ", "ar": "قيمة الضريبة:"},
- "patientShareTotalToDo": {
- "en": "Total amount Due: ",
- "ar": "المبلغ الإجمالي المستحق:"
- },
+ "patientShareTotalToDo": {"en": "Total amount Due: ", "ar": "المبلغ الإجمالي المستحق:"},
'paymentMethod': {'en': 'Payment Method', 'ar': 'طريقة الدفع او السداد'},
- 'noNeedToWaitInLine': {
- 'en': 'No need to stand in line.',
- 'ar': 'لا داعي للوقوف في الطابور.'
- },
- 'useQRAppoAttend': {
- 'en': 'Use the QR code to register the appointment attendance.',
- 'ar': 'استخدم الكود لتسجيل الحضور في المستشفى.'
- },
- 'passQRAppoAttend': {
- 'en':
- 'Pass the QR code through the attendance devices available in the Hospital.',
- 'ar': 'تمرير الكود من خلال اجهزة تسجيل الحضور المتوفرة في الفرع.'
- },
- 'sitWaitingQR': {
- 'en': 'Sit in the waiting rooms until called by the nurse.',
- 'ar': 'الجلوس في غرف الانتظار لحين منادتك من قبل الممرضة.'
- },
- 'attendRegisterCode': {
- 'en': 'Attendance registration code',
- 'ar': 'رمز تسجيل الحضور'
- },
- 'scanQRHospital': {
- 'en': 'Scan above QR Code to Check-In on the Machine in Hospital',
- 'ar': 'مسح فوق رمز الاستجابة السريعة للتحقق في الجهاز في المستشفى'
- },
+ 'noNeedToWaitInLine': {'en': 'No need to stand in line.', 'ar': 'لا داعي للوقوف في الطابور.'},
+ 'useQRAppoAttend': {'en': 'Use the QR code to register the appointment attendance.', 'ar': 'استخدم الكود لتسجيل الحضور في المستشفى.'},
+ 'passQRAppoAttend': {'en': 'Pass the QR code through the attendance devices available in the Hospital.', 'ar': 'تمرير الكود من خلال اجهزة تسجيل الحضور المتوفرة في الفرع.'},
+ 'sitWaitingQR': {'en': 'Sit in the waiting rooms until called by the nurse.', 'ar': 'الجلوس في غرف الانتظار لحين منادتك من قبل الممرضة.'},
+ 'attendRegisterCode': {'en': 'Attendance registration code', 'ar': 'رمز تسجيل الحضور'},
+ 'scanQRHospital': {'en': 'Scan above QR Code to Check-In on the Machine in Hospital', 'ar': 'مسح فوق رمز الاستجابة السريعة للتحقق في الجهاز في المستشفى'},
"sendEmail": {"en": "Send Email", "ar": "ارسال نسخة"},
- "EmailSentSuccessfully": {
- "en": "Email Sent Successfully",
- "ar": "تم إرسال البريد الإلكتروني بنجاح"
- },
+ "EmailSentSuccessfully": {"en": "Email Sent Successfully", "ar": "تم إرسال البريد الإلكتروني بنجاح"},
"close": {"en": "Close", "ar": "مغلق"},
"booked": {"en": "Booked", "ar": "محجوز"},
"confirmed": {"en": "Confirmed", "ar": "مؤكد"},
"arrived": {"en": "Arrived", "ar": "تم الحضور"},
- "payNowBookSuccess": {
- "en": "Pay now via Al Habib App",
- "ar": "ادفع الآن عبر تطبيق الحبيب"
- },
- "payNowBookSuccesstext1": {
- "en": "Pay Now using online payment service From secure payment gateways",
- "ar": "ادفع الآن باستخدام خدمة الدفع عبر الإنترنت من بوابات الدفع الآمنة"
- },
- "payNowBookSuccesstext2": {
- "en": "You can also Pay Later via online payment Or in Hospital",
- "ar": "يمكنك أيضًا الدفع لاحقًا عبر الدفع عبر الإنترنت أو في المستشفى"
- },
+ "payNowBookSuccess": {"en": "Pay now via Al Habib App", "ar": "ادفع الآن عبر تطبيق الحبيب"},
+ "payNowBookSuccesstext1": {"en": "Pay Now using online payment service From secure payment gateways", "ar": "ادفع الآن باستخدام خدمة الدفع عبر الإنترنت من بوابات الدفع الآمنة"},
+ "payNowBookSuccesstext2": {"en": "You can also Pay Later via online payment Or in Hospital", "ar": "يمكنك أيضًا الدفع لاحقًا عبر الدفع عبر الإنترنت أو في المستشفى"},
'payLater': {'en': 'Pay Later', 'ar': 'ادفع لاحقا'},
- 'askDocNotAllowed': {
- 'en': 'This service will be available for last 15 days doctor Visit only',
- 'ar': 'هذه الخدمة متاحة للزيارات خلال اخر 15 يوم فقط'
- },
- "more-verify": {
- "en": "More Verification Options",
- "ar": "المزيد من خيارات التحقق"
- },
+ 'askDocNotAllowed': {'en': 'This service will be available for last 15 days doctor Visit only', 'ar': 'هذه الخدمة متاحة للزيارات خلال اخر 15 يوم فقط'},
+ "more-verify": {"en": "More Verification Options", "ar": "المزيد من خيارات التحقق"},
"welcome-back": {"en": "Welcome back!", "ar": "مرحبا بعودتك!"},
- "account-info": {
- "en": "Would you like to login with current username?",
- "ar": "هل ترغب في تسجيل الدخول باسم المستخدم الحالي؟"
- },
+ "account-info": {"en": "Would you like to login with current username?", "ar": "هل ترغب في تسجيل الدخول باسم المستخدم الحالي؟"},
"another-acc": {"en": "Use Another Account", "ar": "استخدم حسابا آخر"},
"next": {"en": "Next", "ar": 'التالى'},
"first-name": {"en": "First Name", "ar": "الاسم الأول"},
@@ -274,15 +184,13 @@ const Map> localizedValues = {
"preferred-language": {"en": "Preferred Language", "ar": "اللغة المفضلة"},
"english": {"en": "English", "ar": "الإنجليزية"},
"arabic": {"en": "Arabic", "ar": "العربية"},
- "locations-register": {
- "en": "Where do you want to create this file?",
- "ar": "أين تريد فتح هذا الملف؟"
- },
+ "locations-register": {"en": "Where do you want to create this file?", "ar": "أين تريد فتح هذا الملف؟"},
"ksa": {"en": "KSA", "ar": "السعودية"},
"dubai": {"en": "Dubai", "ar": "دبي"},
"enter-email": {"en": "Enter Email", "ar": "ادخل البريد الالكتروني"},
"family": {"en": "My Family", "ar": "عائلتي"},
"family-title": {"en": "My Family Files", "ar": "ملفات العائلة"},
+ "myFamily": {"en": "My Family", "ar": "ملفات العائلة"},
"add-new-member": {"en": "Add Family Member", "ar": "إضافة عضو جديد"},
"sent-requests": {"en": "Sent Requests", "ar": "الطلبات المرسلة"},
"recieved-requests": {"en": "Recieved Requests", "ar": "الطلبات المستلمة"},
@@ -315,10 +223,7 @@ const Map> localizedValues = {
"procedureStatus": {"en": "Procedure Status: ", "ar": "حالة الاجراء"},
"usageStatus": {"en": "Usage Status", "ar": "جالة الاستخدام"},
"unusedCount": {"en": "Unused Count: ", "ar": "غير مستخدم: "},
- "totalApproval": {
- "en": "Total approval unused",
- "ar": "اجمالي الموافقات الغير مستخدمة"
- },
+ "totalApproval": {"en": "Total approval unused", "ar": "اجمالي الموافقات الغير مستخدمة"},
"category": {"en": "Category: ", "ar": "الفئة"},
"expirationDate": {"en": "Expiration Date: ", "ar": "تاريخ الانتهاء"},
"patientCard": {"en": "Patient Card ID: ", "ar": "رقم الاشتراك"},
@@ -326,68 +231,33 @@ const Map> localizedValues = {
"seeDetails": {"en": "SEE DETAILS", "ar": "منافعك التامينية"},
"insuranceCards": {"en": "Insurance Cards", "ar": "بطاقات التأمين"},
"requestType": {"en": "Request Type", "ar": "نوع الاستفسار"},
- "register-info-family": {
- "en": "How would like to add the new member?",
- "ar": "كيف ترغب باضافة العضو الجديد؟"
- },
- "remove-family-member": {
- "en": "Remove this member?",
- "ar": "إزالة ملف العضو؟"
- },
+ "register-info-family": {"en": "How would like to add the new member?", "ar": "كيف ترغب باضافة العضو الجديد؟"},
+ "remove-family-member": {"en": "Remove this member?", "ar": "إزالة ملف العضو؟"},
"MyMedicalFile": {"en": "My Medical File", 'ar': 'ملف الطبي الالكتروني'},
- "myMedicalFileSubTitle": {
- "en": "All your medical records",
- 'ar': 'جميع سجلاتك البية'
- },
+ "myMedicalFileSubTitle": {"en": "All your medical records", 'ar': 'جميع سجلاتك الطبية'},
"viewMore": {"en": "View More", 'ar': 'عرض المزيد'},
- "homeHealthCareService": {
- "en": "Home Health Care Service",
- 'ar': 'الرعاية الصحية المنزلية'
- },
+ "homeHealthCareService": {"en": "Home Health Care Service", 'ar': 'الرعاية الصحية المنزلية'},
"OnlinePharmacy": {"en": "Online Pharmacy", 'ar': 'صيدليات الحبيب'},
"EmergencyService": {"en": "Emergency Service", 'ar': 'الفحص الطبي الشامل'},
- "OnlinePaymentService": {
- "en": "Online Payment Service",
- 'ar': 'خدمة الدفع عبر الإلكتدوني'
- },
- "OffersAndPackages": {
- "en": "Online transfer request",
- 'ar': 'طلب التحويل الالكتروني'
- },
- "ComprehensiveMedicalCheckup": {
- "en": "Comprehensive Medical Check up",
- 'ar': 'فحص طبي شامل'
- },
+ "OnlinePaymentService": {"en": "Online Payment Service", 'ar': 'خدمة الدفع الإلكتدوني'},
+ "OffersAndPackages": {"en": "Online transfer request", 'ar': 'طلب التحويل الالكتروني'},
+ "ComprehensiveMedicalCheckup": {"en": "Comprehensive Medical Check up", 'ar': 'فحص طبي شامل'},
"HMGService": {"en": "HMG Service", 'ar': 'جميع خدمات الحبيب'},
- "ViewAllHabibMedicalService": {
- "en": "View All Habib Medical Service",
- 'ar': 'عرض خدمات الحبيب الطبية'
- },
+ "ViewAllHabibMedicalService": {"en": "View All Habib Medical Service", 'ar': 'عرض خدمات الحبيب الطبية'},
"viewAll": {"en": "View All", 'ar': 'عرض الكل'},
"ContactUs": {"en": "Contact Us", 'ar': 'الوصول إلينا'},
- "ViewAllWaysReachUs": {
- "en": "View All Ways Reach Us",
- 'ar': 'جميع طرق الاتصال بنا'
- },
+ "ViewAllWaysReachUs": {"en": "View All Ways Reach Us", 'ar': 'جميع طرق الاتصال بنا'},
"medicalProfile": {"en": "Medical Profile", 'ar': 'الملف الطبي'},
"consultation": {"en": "Consultation", "ar": "استشارة"},
"logs": {"en": "Logs", "ar": "السجلات"},
"textToSpeech": {"en": "How May I Help You?", "ar": "كيف يمكنني مساعدتك؟"},
"locationDialogMessage": {
- "en":
- "Allow the HMG app to access your location will assist you in showing the hospitals according to the nearest to you.",
- "ar":
- "السماح لتطبيق مجموعة الحبيب الطبية بالوصول إلى موقعك سيساعدك في إظهار المستشفيات وفقًا للأقرب إليك."
+ "en": "Allow the HMG app to access your location will assist you in showing the hospitals according to the nearest to you.",
+ "ar": "السماح لتطبيق مجموعة الحبيب الطبية بالوصول إلى موقعك سيساعدك في إظهار المستشفيات وفقًا للأقرب إليك."
},
- "user-view-requester": {
- "en": "User Wants To View Your Medical File",
- "ar": "أشخاص يرغبون الاطلاع على ملفك الطبي"
- },
- "user-view": {
- "en": "User Can View Your Medical File",
- "ar": "أشخاص يمكنهم الاطلاع على ملفك الطبي"
- },
+ "user-view-requester": {"en": "User Wants To View Your Medical File", "ar": "أشخاص يرغبون الاطلاع على ملفك الطبي"},
+ "user-view": {"en": "User Can View Your Medical File", "ar": "أشخاص يمكنهم الاطلاع على ملفك الطبي"},
"parking": {"en": "Parking", "ar": "مواقف"},
"alhabiServices": {"en": "HMG Service", "ar": "خدمات الحبيب"},
@@ -409,19 +279,10 @@ const Map> localizedValues = {
"locationa": {"en": "location:", "ar": "الموقع"},
"ambulancerequest": {"en": "Ambulance :", "ar": "طلب نقل "},
"requestA": {"en": "Request:", "ar": "اسعاف"},
- "MyAppointments": {"en": "My Appointments", "ar": "مواعيدي"},
- "NoBookedAppointments": {
- "en": "No Booked Appointments",
- "ar": "لا توجد مواعيد محجوزة"
- },
- "NoConfirmedAppointments": {
- "en": "No Confirmed Appointments",
- "ar": "لا توجد مواعيد مؤكدة"
- },
- "noArrivedAppointments": {
- "en": "No Arrived Appointments",
- "ar": "لم تصل المواعيد"
- },
+ "MyAppointments": {"en": "Appointments", "ar": "مواعيدي"},
+ "NoBookedAppointments": {"en": "No Booked Appointments", "ar": "لا توجد مواعيد محجوزة"},
+ "NoConfirmedAppointments": {"en": "No Confirmed Appointments", "ar": "لا توجد مواعيد مؤكدة"},
+ "noArrivedAppointments": {"en": "No Arrived Appointments", "ar": "لم تصل المواعيد"},
"MyAppointmentsList": {"en": "List", "ar": "قائمة بمواعدي"},
"Radiology": {"en": "Radiology", "ar": "الأشعة"},
"RadiologySubtitle": {"en": "Result", "ar": "صور وتقارير"},
@@ -477,19 +338,10 @@ const Map> localizedValues = {
"VitalSign": {"en": "Vital Sign", "ar": "العلامة حيوية"},
"MonthlyReports": {"en": "Monthly Reports", "ar": "تقارير شهرية"},
"km": {"en": "KMs:", "ar": "كم"},
- "PatientHealthSummaryReport": {
- "en": "Patient Health Summary Report",
- "ar": " ملخص التقارير الشهرية"
- },
- "ToViewTheTermsAndConditions": {
- "en": "To View The Terms And Conditions Report",
- "ar": " عرض الشروط والأحكام "
- },
+ "PatientHealthSummaryReport": {"en": "Patient Health Summary Report", "ar": " ملخص التقارير الشهرية"},
+ "ToViewTheTermsAndConditions": {"en": "To View The Terms And Conditions Report", "ar": " عرض الشروط والأحكام "},
"ClickHere": {"en": "Click here", "ar": "أنقر هنا"},
- "IAgreeToTheTermsAndConditions": {
- "en": "I agree to the terms and conditions ",
- "ar": "أوافق على الشروط والاحكام "
- },
+ "IAgreeToTheTermsAndConditions": {"en": "I agree to the terms and conditions ", "ar": "أوافق على الشروط والاحكام "},
"IAgreeToTheTermsAndConditionsSubtitle": {
"en": "I agree to the terms and conditions ",
"ar":
@@ -498,36 +350,20 @@ const Map> localizedValues = {
"Save": {"en": "Save", "ar": "حفظ "},
"UserAgreement": {"en": "User Agreement", "ar": "اتفاقية الخصوصية "},
"UpdateSuccessfully": {"en": "Update Successfully", "ar": "تم التحديث بنجاح"},
- "CHECK_VACCINE_AVAILABILITY": {
- "en": "CHECK VACCINE AVAILABILITY",
- "ar": "تحقق من توافر اللقاح"
- },
- "MyVaccinesAvailability": {
- "en": "MyVaccinesAvailability",
- "ar": "توفر لقاحي"
- },
+ "CHECK_VACCINE_AVAILABILITY": {"en": "CHECK VACCINE AVAILABILITY", "ar": "تحقق من توافر اللقاح"},
+ "MyVaccinesAvailability": {"en": "MyVaccinesAvailability", "ar": "توفر لقاحي"},
"PaymentService": {"en": "Payment Service", "ar": "خدمة المدفوعات"},
"PaymentOnline": {"en": "Service", "ar": "الالكتروني"},
"OnlineCheckIn": {"en": "Online Check-In", "ar": "مدفوعات معلقة"},
"MyBalances": {"en": "My Balances", "ar": "رصيدي"},
"BalanceAmount": {"en": "Balance Amount", "ar": "رصيدالحساب"},
"TotalBalance": {"en": "Total Balance", "ar": "الرصيد الكلي"},
- "CreateAdvancedPayment": {
- "en": "Create Advanced Payment",
- "ar": "إنشاء دفعة مقدمة"
- },
+ "CreateAdvancedPayment": {"en": "Create Advanced Payment", "ar": "إنشاء دفعة مقدمة"},
"AdvancePayment": {"en": "Advance Payment", "ar": "الدفع مقدما"},
- "AdvancePaymentLabel": {
- "en":
- "You can create and add an Advanced Payment for you account or other accounts.",
- "ar": "يمكنك تحويل مبلغ لحسابك لدى المجموعة أو لحساب احد المراجعين"
- },
+ "AdvancePaymentLabel": {"en": "You can create and add an Advanced Payment for you account or other accounts.", "ar": "يمكنك تحويل مبلغ لحسابك لدى المجموعة أو لحساب احد المراجعين"},
"FileNumber": {"en": "File Number", "ar": "رقم الملف"},
"Amount": {"en": "Amount *", "ar": "المبلغ *"},
- "DepositorEmail": {
- "en": "Depositor Email *",
- "ar": "البريد الإلكتروني للمودع *"
- },
+ "DepositorEmail": {"en": "Depositor Email *", "ar": "البريد الإلكتروني للمودع *"},
"Notes": {"en": "Notes", "ar": "ملاحظات"},
"SelectPatientName": {"en": "Select Patient Name", "ar": "اختر اسم المريض"},
"SelectFamilyPatientName": {"en": "Family Members", "ar": "أفراد الأسرة"},
@@ -539,14 +375,8 @@ const Map> localizedValues = {
"DepositorName": {"en": "Depositor Name", "ar": "اسم المودع *"},
"MobileNumber": {"en": "Mobile Number", "ar": "رقم الجوال"},
"Ok": {"en": "Ok", "ar": "حسنا"},
- "TheVerificationCodeExpiresIn": {
- "en": "The Verification Code Expires In",
- "ar": "تنتهي صلاحية رمز التحقق في"
- },
- "PleaseEnterTheVerificationCode": {
- "en": "Please enter the verification code send to",
- "ar": "الرجاء إدخال رمز التحقق المرسل إلى"
- },
+ "TheVerificationCodeExpiresIn": {"en": "The Verification Code Expires In", "ar": "تنتهي صلاحية رمز التحقق في"},
+ "PleaseEnterTheVerificationCode": {"en": "Please enter the verification code send to", "ar": "الرجاء إدخال رمز التحقق المرسل إلى"},
"EyeMeasurements": {"en": "Eye Measurements", "ar": "قياسات النظر"},
"Measurements": {"en": "Measurements", "ar": "قياسات"},
"Classes": {"en": "Classes", "ar": "نظارات"},
@@ -569,10 +399,8 @@ const Map> localizedValues = {
"DailyQuantity": {"en": "Daily Quantity :", "ar": "جرعات يومية"},
"AddReminder": {"en": "Add Reminder", "ar": "إضافة تذكير"},
"reminderDes": {
- "en":
- "Please select treatment start day and time to be notified when it\'s time to take the medicine",
- "ar":
- " يرجى تحديد يوم بدء العلاج والوقت ليتم ارسال تنبيه عندما يحين الوقت لتناول الدواء"
+ "en": "Please select treatment start day and time to be notified when it\'s time to take the medicine",
+ "ar": " يرجى تحديد يوم بدء العلاج والوقت ليتم ارسال تنبيه عندما يحين الوقت لتناول الدواء"
},
"StartDay": {"en": "Start Day", "ar": "يوم البداية"},
"EndDay": {"en": "End Day", "ar": "يوم الانتهاء"},
@@ -582,24 +410,12 @@ const Map> localizedValues = {
"DoctorResponses": {"en": "Doctor Responses", "ar": "ردود الأطباء"},
"New": {"en": "New", "ar": "جديد"},
"All": {"en": "All", "ar": "الكل"},
- "QuestionHere": {
- "en": "Enter the question here...",
- "ar": "اضف الاستفسار هنا"
- },
- "ViewDoctorResponses": {
- "en": "View Doctor Responses",
- "ar": "الاطلاع على ردود الأطباء"
- },
+ "QuestionHere": {"en": "Enter the question here...", "ar": "اضف الاستفسار هنا"},
+ "ViewDoctorResponses": {"en": "View Doctor Responses", "ar": "الاطلاع على ردود الأطباء"},
"ServiceInformationButton": {"en": "LOGIN / REGISTER", "ar": "دخول / تسجيل"},
- "ServiceInformationTitle": {
- "en": "Service Information",
- "ar": "معلومات الخدمة"
- },
+ "ServiceInformationTitle": {"en": "Service Information", "ar": "معلومات الخدمة"},
"ServiceInformation": {"en": "Service Information", "ar": "معلومات الخدمة"},
- "HomeHealthCare": {
- "en": "Home Health Care",
- "ar": " الرعاية الصحية المنزلية "
- },
+ "HomeHealthCare": {"en": "Home Health Care", "ar": " الرعاية الصحية المنزلية "},
"HomeHealthCareText": {
"en":
"This service provides a set of home health care services, continuous and comprehensive follow-up in their places of residence for those who cannot access health facilities, such as (laboratory analyzes - radiology - vaccinations - physical therapy), etc.",
@@ -609,96 +425,233 @@ const Map> localizedValues = {
"LoginRegister": {"en": "Login/Register", "ar": "دخول / تسجيل"},
"OrderLog": {"en": "Order Log", "ar": " سجل الطلبات"},
"info-lab": {
- "en":
- "This service allows you to view the results of all laboratory tests performed in Al Habib Medical Group as well as sending the report via e-mail.",
- "ar":
- "خدمة نتائج المختبر: هذه الخدمة تمكنك من الاطلاع على نتائج جميع الفحوصات المخبرية التي تمت في مجموعة الحبيب الطبية."
+ "en": "This service allows you to view the results of all laboratory tests performed in Al Habib Medical Group as well as sending the report via e-mail.",
+ "ar": "خدمة نتائج المختبر: هذه الخدمة تمكنك من الاطلاع على نتائج جميع الفحوصات المخبرية التي تمت في مجموعة الحبيب الطبية."
},
"info-radiology": {
- "en":
- "This service allows you to view the reports and photos of radiology in Al Habib Medical Group as well as send the report by e-mail.",
- "ar":
- "خدمة الاشعة: هذه الخدمة تمكنك من الاطلاع على تقارير وصور الاشعة التي تمت في مجموعة الحبيب الطبية وكذلك ارسال التقرير عن طريق الايميل."
+ "en": "This service allows you to view the reports and photos of radiology in Al Habib Medical Group as well as send the report by e-mail.",
+ "ar": "خدمة الاشعة: هذه الخدمة تمكنك من الاطلاع على تقارير وصور الاشعة التي تمت في مجموعة الحبيب الطبية وكذلك ارسال التقرير عن طريق الايميل."
},
"TermsService": {"en": "Terms of Service", "ar": "شروط الخدمه"},
- "Beforeusing": {
- "en": "Before using the checkup, please read Terms of Service.",
- "ar": "قبل استخدام الفحص ، يرجى قراءة شروط الخدمة"
- },
- "accept": {
- "en": "I read and accept Terms of Service and Privacy Policy",
- "ar": "قرأت ووافقت على شروط الخدمة وسياسة الخصوصية"
- },
- "data-safe-info": {
- "en":
- "Information that you provide is anonymous and not shared with anyone.",
- "ar": "المعلومات التي تقدمها لا تتم مشاركتها مع أي شخص"
- },
+ "Beforeusing": {"en": "Before using the checkup, please read Terms of Service.", "ar": "قبل استخدام الفحص ، يرجى قراءة شروط الخدمة"},
+ "accept": {"en": "I read and accept Terms of Service and Privacy Policy", "ar": "قرأت ووافقت على شروط الخدمة وسياسة الخصوصية"},
+ "data-safe-info": {"en": "Information that you provide is anonymous and not shared with anyone.", "ar": "المعلومات التي تقدمها لا تتم مشاركتها مع أي شخص"},
"data-safe": {"en": " Your data is safe.", "ar": "بياناتك آمنة"},
- "informational": {
- "en":
- "Checkup is for informational purposes and is not a qualified medical opinion",
- "ar": "الفحص هو لأغراض معلوماتية وليس رأي طبي مؤهل"
- },
- "not-use-in-emerbency": {
- "en": "Do not use in emergencies.",
- "ar": "لا تستخدم في حالات الطوارئ"
- },
- "not-use-in-emerbency-details": {
- "en": "In case of health emergency, ",
- "ar": "في حالة الطوارئ اتصل بأقرب رقم للطوارئ على الفور"
- },
- "not-use-in-emerbency-details-call": {
- "en": "call the nearest emergency number immediately",
- "ar": " اتصل بأقرب رقم للطوارئ على الفور"
- },
- "check-diagnosis": {
- "en": "Checkup is not a diagnosis.",
- "ar": "الفحص ليس تشخيص."
- },
+ "informational": {"en": "Checkup is for informational purposes and is not a qualified medical opinion", "ar": "الفحص هو لأغراض معلوماتية وليس رأي طبي مؤهل"},
+ "not-use-in-emerbency": {"en": "Do not use in emergencies.", "ar": "لا تستخدم في حالات الطوارئ"},
+ "not-use-in-emerbency-details": {"en": "In case of health emergency, ", "ar": "في حالة الطوارئ اتصل بأقرب رقم للطوارئ على الفور"},
+ "not-use-in-emerbency-details-call": {"en": "call the nearest emergency number immediately", "ar": " اتصل بأقرب رقم للطوارئ على الفور"},
+ "check-diagnosis": {"en": "Checkup is not a diagnosis.", "ar": "الفحص ليس تشخيص."},
"remeberthat": {"en": "Remember that", "ar": "تذكر ذلك:"},
+ "loginToUseService": {"en": "You need to login to use this service", "ar": "هذة الخدمة تتطلب تسجيل الدخول"},
// pharmacy module
- "medicationRefill": {
- "en": "MEDICATION REFILL",
- "ar": "إعادة تعبئة الدواء"
- },
- "offersAndPromotions": {
- "en": "OFFERS & SPECIAL PROMOTIONS",
- "ar": "العروض والترقيات الخاصة"
- },
- "myPrescriptions": {
- "en": "MY PRESCRIPTIONS",
- "ar": "وصفاتي"
+ "medicationRefill": {"en": "MEDICATION REFILL", "ar": "إعادة تعبئة الدواء"},
+ "offersAndPromotions": {"en": "OFFERS & SPECIAL PROMOTIONS", "ar": "العروض والترقيات الخاصة"},
+ "myPrescriptions": {"en": "MY PRESCRIPTIONS", "ar": "وصفاتي"},
+ "searchAndScanMedication": {"en": "SEARCH & SCAN FOR MEDICATION", "ar": "البحث والمسح للأدوية"},
+ "shopByBrands": {"en": "Shop By Brands", "ar": "تسوق حسب الماركات"},
+ "recentlyViewed": {"en": "Recently Viewed", "ar": "شوهدت مؤخرا"},
+ "bestSellers": {"en": "Best Sellers", "ar": "أفضل البائعين"},
+ "deleteAllItems": {"en": "Delete All Items", "ar": "حذف كافة العناصر"},
+ "select-gender": {"en": "Select Gender", "ar": "اختر الجنس"},
+ "i-am-a": {"en": "I am a ...", "ar": "أنا ..."},
+ "select-age": {"en": "Select Your Age", "ar": "حدد العمر"},
+ "i-am": {"en": "I am", "ar": "أنا"},
+ "years-old": {"en": "years old", "ar": "سنة"},
+ "drag-point": {"en": "Drag point to change your age", "ar": "اسحب لتغيير عمرك"},
+ "email": {"en": "Email", "ar": "البريد الالكتروني"},
+ "Book": {"en": "Book", "ar": "احجز"},
+ "AppointmentLabel": {"en": "Appointment", "ar": "موعد"},
+ "BloodType": {"en": "Blood Type", "ar": "فصيلة الدم"},
+ "marital-status": {"en": "Marital status", "ar": "الحالة الإجتماعية"},
+ "general": {"en": "General", "ar": "عام"},
+ "profile": {"en": "Profile", "ar": "ملفي"},
+ "notifications": {"en": "Notifications", "ar": "إشعارات"},
+ "notificationDetails": {"en": "Notification Details", "ar": "تفاصيل الاشعار"},
+ "notificationDetailsa": {"en": "Notification Details", "ar": "تفاصيل الاشعار"},
+
+ "info-my-doctor-points": {
+ "en": [
+ "View the doctor's profile and qualifications.",
+ "View the doctor's schedule.",
+ "View details of your appointments with the selected doctor.",
+ "Book appointment with the doctor. ",
+ ],
+ "ar": ["الاطلاع على معلومات الطبيب ومؤهلاته.", "الاطلاع على جدول الطبيب.", "الاطلاع على تفاصيل المواعيد التي تمت مع الطبيب.", "حجز موعد مع الطبيب."]
+ },
+ "info-my-doctor": {
+ "en": "This service allows you to see all the doctors you have visited in Al Habib Medical Group, and through this service:",
+ "ar": "خدمة اطبائي: هذه الخدمة تمكنك من الاطلاع على جميع الاطباء الذين قمت بزيارتهم في مجموعة الحبيب الطبية, كما تستطيع من خلال هذه الخدمة:"
+ },
+ "info-prescriptions": {
+ "en": "This service allows you to view all the medical prescriptions issued by Al Habib Medical Group, and through this service, you can:",
+ "ar": "خدمة الوصفات الطبية: هذه الخدمة تمكنك من الاطلاع على جميع الوصفات الطبية التي تم اصدارها في مجموعة الحبيب الطبية، كما تستطيع من خلال هذه الخدمة:"
+ },
+ "info-my-prescription-points": {
+ "en": [
+ "View the duration days.",
+ "View the frequency timing.",
+ "View the doctor's remarks.",
+ "Add a reminder to remind you when to take medicine doses.",
+ "Search in AlHabib Pharmacies about the branches where medicines are available, pharmacies locations and contact numbers.",
+ "Ordering and delivery medications online.",
+ "View the prices of the drug. ",
+ ],
+ "ar": [
+ "الاطلاع على طريقة تناول العلاج.",
+ "الاطلاع على مدة تناول العلاج.",
+ "الاطلاع على ملاحظات الطبيب.",
+ "اضافة منبه للتذكير بموعد تناول جرعات الادوية.",
+ "البحث في صيدليات الحبيب عن الفروع التي يتوفر فيها العلاج وكذلك مواقع الصيدليات وارقام الاتصال. ",
+ "امكانية شراء وتوصيل العلاج عن طريق الانترنت.",
+ "الاطلاع على اسعار الادوية المصروفة."
+ ]
},
- "searchAndScanMedication": {
- "en": "SEARCH & SCAN FOR MEDICATION",
- "ar": "البحث والمسح للأدوية"
+
+ "info-insurance-cards": {
+ "en": "This service allows you to view all the insurance cards that recorded during your visits to Al Habib Medical Group in addition to:",
+ "ar": "خدمة بطاقات التامين: هذه الخدمة تمكنك من الاطلاع على جميع بطاقات التامين والتي تم تسجيلها اثناء زياراتك لمجموعة الحبيب الطبية بالاضافة الى:"
},
- "shopByBrands": {
- "en": "Shop By Brands",
- "ar": "تسوق حسب الماركات"
+
+ "info-insurance-cards-points": {
+ "en": [
+ "Name of the insurance company.",
+ "Insurance category.",
+ "Insurance policy number.",
+ "The expiry date of insurance.",
+ "The status of the insurance card (active or inactive).",
+ "Details of the coverage, e.x the room category covered as well some cases covered by the insurance.",
+ ],
+ "ar": [
+ "اسم شركة التامين.",
+ "فئة التامين.",
+ "رقم بوليصة التامين.",
+ "تاريخ انتهاء التامين.",
+ "حالة بطاقة التامين (فعالة او غير فعالة).",
+ "تفاصيل التامين، مثلاً: مستوى الغرفة التي يغطيها التامين وكذلك الحالات التي يغطيها التامين.",
+ ]
},
- "recentlyViewed": {
- "en": "Recently Viewed",
- "ar": "شوهدت مؤخرا"
+
+ "info-allergies": {
+ "en": "This service allows you to view all types of allergies recorded during your visits to Al Habib Medical Group.",
+ "ar": "خدمة الحساسية: هذه الخدمة تمكنك من الاطلاع على جميع انواع الحساسية التي تم تسجيلها خلال زياراتك في مجموعة الحبيب الطبية."
},
- "bestSellers": {
- "en": "Best Sellers",
- "ar": "أفضل البائعين"
+
+ "sick-leaves": {"en": "Sick Leaves", "ar": "الاجازات المرضية"},
+
+ "info-sick-leaves": {
+ "en": "This service allows you to view all sick leaves that were taken in Al Habib Medical Group in addition to:",
+ "ar": "الاجازات المرضية: هذه الخدمة تمكنك من الاطلاع على جميع الاجازات المرضية والتي تم اصدارها في مجموعة الحبيب الطبية بالاضافة الى:"
+ },
+ "info-sick-leave-points": {
+ "en": [
+ "Doctor Name",
+ "Sick leave date ",
+ "Sick leave days",
+ "Branch that patient take the vaccination form.",
+ "Sending a report of vaccinations to the email. ",
+ ],
+ "ar": ["اسم الطبيب", "تاريخ الاجازة.", "عدد ايام الاجازة.", "الفرع الذي تم اصدار الاجازة منه.", "ارسال نسخة مختومة من الاجازة الى البريد الالكتروني."]
},
- "deleteAllItems": {
- "en": "Delete All Items",
- "ar": "حذف كافة العناصر"
+
+ "info-approvals": {
+ "en": "This service allows you to view all approvals requests that have been sent to the insurance companies in addition to:",
+ "ar": "خدمة الموافقات: هذه الخدمة تمكنك من الاطلاع على جميع طلبات الموافقات والتي تم ارسالها الى شركات التامين بالاضافة الى:"
},
- "select-gender": {"en": "Select Gender", "ar": "اختر الجنس"},
- "i-am-a": {"en": "I am a ...", "ar": "أنا ..."},
- "select-age": {"en": "Select Your Age", "ar": "حدد العمر"},
- "i-am": {"en": "I am", "ar": "أنا"},
- "years-old": {"en": "years old", "ar": "سنة"},
- "drag-point": {
- "en": "Drag point to change your age",
- "ar": "اسحب لتغيير عمرك"
+
+ "info-approval-points": {
+ "en": [
+ "View the total unused approvals.",
+ "Track the approvals status.",
+ ],
+ "ar": [
+ "الاطلاع على اجمالي الموافقات الغير مستخدمة.",
+ "تتبع حالة الموافقة.",
+ ]
},
+
+ "month-report": {"en": "Monthly Reports", "ar": "تقاريري الشهرية"},
+ "info-month-report": {
+ "en":
+ "Upon activation of this service, the system will send a monthly report automatically to the registered email which lists the vital signs and the results for the last visits made in AlHabib Medical Group.",
+ "ar": "خدمة التقارير الشهرية: عند تفعيل هذه الخدمة سيقوم النظام بارسال تقرير شهري بشكل آلي على الايميل المسجل والذي يسرد المؤشرات الحيوية ونتائج التحاليل لآخر زيارات تمت بمجموعة الحبيب الطبية."
+ },
+ "language-setting": {"en": "SMS and Confirmation Calls Language", "ar": "لغة الرسائل القصيرة و الاتصال الآلي"},
+ "alert": {"en": "Alerts", "ar": "التنبيهات"},
+ "email-alert": {"en": "Alert By Email", "ar": "استلام التنبيهات بالبريد الالكتروني"},
+ "sms-alert": {"en": "Alert By SMS", "ar": "استلام التنبيهات بالرسائل القصيرة"},
+ "contact-info": {"en": "Contact Information", "ar": "معلومات التواصل"},
+ "emrg-name": {"en": "Emergency Contact Name", "ar": "اسم للتواصل في حالة الطوارئ"},
+ "emrg-no": {"en": "Emergency Contact Number", "ar": "رقم للتواصل في حالة الطوارئ"},
+ "modes": {"en": "Modes", "ar": "الاوضاع"},
+ "vibration": {"en": "Vibration Touch Feedback", "ar": "الاهتزاز عند اللمس"},
+ "blind-modes": {"en": "Modes for Partially Blind", "ar": "تأثيرات لدعم ضعاف البصر"},
+ "invert-theme": {"en": "Invert", "ar": "ألوان سلبية"},
+ "off-theme": {"en": "Off", "ar": "إيقاف"},
+ "dim-theme": {"en": "Dim", "ar": "ضوء خافت"},
+ "bw-theme": {"en": "Black and White", "ar": "أبيض و أسود"},
+ "permissions": {"en": "Permission", "ar": "الصلاحيات"},
+ "camera-permission": {"en": "Camera", "ar": "الكاميرا"},
+ "location-permission": {"en": "Location", "ar": "تحديد المواقع"},
+
+ "accessibility": {"en": "Accessibility Mode", "ar": "وضع امكانية الوصول"},
+ "orderStatus": {"en": "Order Status", "ar": "حالة الطلب"},
+ "CancelOrder": {"en": "Cancel Order", "ar": "الغاء الطلب"},
+ "FindUs": {"en": "Find Us", "ar": "اين تجدنا"},
+ "Feedback": {"en": "Feedback", "ar": "رأيك يهمنا"},
+ "LiveChat": {"en": "Live Chat", "ar": "محادثة مباشرة"},
+ "Service": {"en": "Service", "ar": "خدمة"},
+ "HMGServiceLabel": {"en": "HMG Service", 'ar': 'خدمات الحبيب'},
+ "HealthWeatherIndicators": {"en": "Health Weather Indicators", 'ar': ' مؤشرات الطقس الصحية '},
+ "HealthTipsBasedOnCurrentWeather": {"en": "Health Tips Based On Current Weather", 'ar': ' نصائح صحية على أساس الطقس الحالي '},
+ "MoreDetails": {"en": "More details", "ar": " المزيد من التفاصيل "},
+ "SendCopy": {"en": "Send Copy", "ar": "ارسال نسخة"},
+ "ResendOrder": {"en": "Resend order & deliver", "ar": "إعادة طلب و توصيل"},
+ "Ports": {"en": "Ports", "ar": "المنافذ"},
+ "Way": {"en": "Way", "ar": "الطزيقة"},
+ "Average": {"en": "Average", "ar": "المعدل"},
+ "DailyDoses": {"en": "Daily Doses", "ar": "جرعات يومية"},
+ "Period": {"en": "Period", "ar": "الفترة"},
+ "cm": {"en": "CM", "ar": "سم"},
+ "kg": {"en": "kg", "ar": "كجم"},
+ "mass": {"en": "Mass", "ar": "كتلة"},
+ "temp-c": {"en": "°C", "ar": "°س"},
+ "bpm": {"en": "bpm", "ar": "نبضة"},
+ "respiration-signs": {"en": "Respiration", "ar": "تنفس"},
+ "sys-dias": {"en": "SBP/DBP", "ar": "إنقباض/إنبساط"},
+ "body": {"en": "Body \n Mass", "ar": "كتلة\nالجسم"},
+ "feedback": {"en": "Feedback", "ar": "رأيك يهمنا"},
+ "send": {"en": "Send", "ar": "أرسل"},
+ "status": {"en": "Status", "ar": "الحالة"},
+ "like-to-hear": {
+ "en": "We would love to hear the feedback, concerns on healthcare services and eServices experience. Please use the below form",
+ "ar": "يسعدنا سماع ملاحظاتك حول خدمات الرعاية الصحية والخدمات الإلكترونية. يرجى تعبئة الحقول المطلوبة"
+ },
+ "subject": {"en": "Subject", "ar": "الموضوع"},
+ "message": {"en": "Message", "ar": "رسالة"},
+ "empty-subject": {"en": "Please enter the subject", "ar": "يرجى ادخال الموضوع"},
+ "empty-message": {"en": "Please enter message", "ar": "يرجى ادخال الموضوع"},
+ "select-attachment": {"en": "Select Attachment", "ar": "إختر المرفق"},
+ "complain-appo": {"en": "Complaint for appointment", "ar": "شكوى على موعد"},
+ "complain-without-appo": {"en": "Complaint without appointment", "ar": "شكوى بدون موعد"},
+ "question": {"en": "Question", "ar": "سؤال"},
+ "message-type": {"en": "Message Type", "ar": "نوع الرسالة"},
+ "compliment": {"en": "compliment", "ar": "ثناء"},
+ "suggestion": {"en": "Suggestion", "ar": "إقتراح"},
+ "your-feedback": {"en": "Your feedback was sent", "ar": "إقتراح"},
+ "select-part": {"en": "Please select the part that complain about", "ar": "يرجى تحديد الجزء الذي تشكو منه"},
+ "number": {"en": "Number", "ar": "الرقم"},
+ "not-classified": {"en": "Not classified", "ar": "غير محدد"},
+ "selectClinic": {"en": "Select Clinic", "ar": " بحث بالعيادة"},
+ "reviews": {"en": "Reviews", "ar": "تقييمات"},
+ "searchItemError": {"en": "Item name should be more than 3 character ", "ar": "يجب أن يكون اسم العنصر أكثر من 3 أحرف"},
+ "YouCanFind": {"en": "YouCanFind", "ar": "باستطاعتك العثور على "},
+ "ItemInSearch": {"en": " Item In Search", "ar": " عنصر في البحث "},
+ "wantConnectHmgNetwork": {
+ "en": "Dear customer there is no internet access, Do you want to connect with HMG network to use our app, make sure you are in range of HMG network",
+ "ar": "عزيز العميل لا يوجد اتصال بالإنترنت, هل تريد الاتصال بشبكة مستشفى د. سليمان الحبيب لاستخدام التطبيق. يجب عليك ان تكون في نطاق شبكة المستشفى"
+ },
+ "failedToAccessHmgServices": {"en": "Connected with HMG Network,\n\nBut failed to access HMG services", "ar": "Connected with HMG Network,\n\nBut failed to access HMG services"},
};
diff --git a/lib/config/shared_pref_kay.dart b/lib/config/shared_pref_kay.dart
index c5fafe03..b79edb08 100644
--- a/lib/config/shared_pref_kay.dart
+++ b/lib/config/shared_pref_kay.dart
@@ -16,4 +16,7 @@ const USER_LONG = 'user-long';
const IS_GO_TO_PARKING = 'IS_GO_TO_PARKING';
const IS_SEARCH_APPO = 'is-search-appo';
const IS_LIVECARE_APPOINTMENT = 'is_livecare_appointment';
+const IS_VIBRATION = 'is_vibration';
+const THEME_VALUE = 'is_vibration';
+const MAIN_USER = 'main-user';
const PHARMACY_LAST_VISITED_PRODUCTS = 'last-visited';
diff --git a/lib/core/model/insurance/insurance_card.dart b/lib/core/model/insurance/insurance_card.dart
index 998df241..ebab8d71 100644
--- a/lib/core/model/insurance/insurance_card.dart
+++ b/lib/core/model/insurance/insurance_card.dart
@@ -16,7 +16,9 @@ class InsuranceCardModel {
int patientType;
String groupName;
String companyName;
+ int companyID;
String subCategoryDesc;
+ int subCategoryID;
String patientCardID;
String insurancePolicyNumber;
bool isActive;
@@ -25,6 +27,7 @@ class InsuranceCardModel {
InsuranceCardModel({
this.insurancePolicyNumber,
this.subCategoryDesc,
+ this.subCategoryID,
this.versionID,
this.channel,
this.languageID,
@@ -40,6 +43,7 @@ class InsuranceCardModel {
this.patientType,
this.groupName,
this.companyName,
+ this.companyID,
this.patientCardID,
this.isActive,
this.cardValidTo
@@ -50,6 +54,7 @@ class InsuranceCardModel {
insurancePolicyNumber = json['InsurancePolicyNo'];
patientCardID = json['PatientCardID'];
companyName = json['CompanyName'];
+ companyID = json['CompanyID'];
groupName = json['GroupName'];
versionID = json['VersionID'];
channel = json['Channel'];
@@ -65,6 +70,7 @@ class InsuranceCardModel {
patientTypeID = json['PatientTypeID'];
patientType = json['PatientType'];
subCategoryDesc = json['SubCategoryDesc'];
+ subCategoryID = json["SubCategoryID"];
cardValidTo = json['CardValidTo'];
}
diff --git a/lib/core/model/labs/lab_result.dart b/lib/core/model/labs/lab_result.dart
index 23b3363d..c9acd809 100644
--- a/lib/core/model/labs/lab_result.dart
+++ b/lib/core/model/labs/lab_result.dart
@@ -86,3 +86,14 @@ class LabResult {
return data;
}
}
+
+
+class LabResultList {
+ String filterName = "";
+ List patientLabResultList = List();
+
+ LabResultList(
+ {this.filterName, LabResult lab}) {
+ patientLabResultList.add(lab);
+ }
+}
diff --git a/lib/core/model/my_balance/AdvanceModel.dart b/lib/core/model/my_balance/AdvanceModel.dart
index b95e08a2..d2792990 100644
--- a/lib/core/model/my_balance/AdvanceModel.dart
+++ b/lib/core/model/my_balance/AdvanceModel.dart
@@ -8,6 +8,9 @@ class AdvanceModel {
String email;
String note;
String depositorName;
+ String mobileNumber;
+ String patientName;
+ int projectID;
CitiesModel citiessModel;
AdvanceModel(
@@ -17,5 +20,8 @@ class AdvanceModel {
this.hospitalsModel,
this.fileNumber,
this.depositorName,
+ this.mobileNumber,
+ this.patientName,
+ this.projectID,
this.citiessModel});
}
diff --git a/lib/core/model/notifications/get_notifications_request_model.dart b/lib/core/model/notifications/get_notifications_request_model.dart
new file mode 100644
index 00000000..9659754a
--- /dev/null
+++ b/lib/core/model/notifications/get_notifications_request_model.dart
@@ -0,0 +1,22 @@
+class GetNotificationsRequestModel {
+ int notificationStatusID;
+ int pagingSize;
+ int currentPage;
+
+ GetNotificationsRequestModel(
+ {this.notificationStatusID, this.pagingSize, this.currentPage});
+
+ GetNotificationsRequestModel.fromJson(Map json) {
+ notificationStatusID = json['NotificationStatusID'];
+ pagingSize = json['pagingSize'];
+ currentPage = json['currentPage'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['NotificationStatusID'] = this.notificationStatusID;
+ data['pagingSize'] = this.pagingSize;
+ data['currentPage'] = this.currentPage;
+ return data;
+ }
+}
diff --git a/lib/core/model/notifications/get_notifications_response_model.dart b/lib/core/model/notifications/get_notifications_response_model.dart
new file mode 100644
index 00000000..1f3bbc28
--- /dev/null
+++ b/lib/core/model/notifications/get_notifications_response_model.dart
@@ -0,0 +1,96 @@
+class GetNotificationsResponseModel {
+ int id;
+ int recordId;
+ int patientID;
+ bool projectOutSA;
+ String deviceType;
+ String deviceToken;
+ String message;
+ String messageType;
+ String messageTypeData;
+ dynamic videoURL;
+ bool isQueue;
+ String isQueueOn;
+ String createdOn;
+ String createdBy;
+ String notificationType;
+ bool isSent;
+ String isSentOn;
+ bool isRead;
+ String isReadOn;
+ int channelID;
+ int projectID;
+
+ GetNotificationsResponseModel(
+ {this.id,
+ this.recordId,
+ this.patientID,
+ this.projectOutSA,
+ this.deviceType,
+ this.deviceToken,
+ this.message,
+ this.messageType,
+ this.messageTypeData,
+ this.videoURL,
+ this.isQueue,
+ this.isQueueOn,
+ this.createdOn,
+ this.createdBy,
+ this.notificationType,
+ this.isSent,
+ this.isSentOn,
+ this.isRead,
+ this.isReadOn,
+ this.channelID,
+ this.projectID});
+
+ GetNotificationsResponseModel.fromJson(Map json) {
+ id = json['Id'];
+ recordId = json['RecordId'];
+ patientID = json['PatientID'];
+ projectOutSA = json['ProjectOutSA'];
+ deviceType = json['DeviceType'];
+ deviceToken = json['DeviceToken'];
+ message = json['Message'];
+ messageType = json['MessageType'];
+ messageTypeData = json['MessageTypeData'];
+ videoURL = json['VideoURL'];
+ isQueue = json['IsQueue'];
+ isQueueOn = json['IsQueueOn'];
+ createdOn = json['CreatedOn'];
+ createdBy = json['CreatedBy'];
+ notificationType = json['NotificationType'];
+ isSent = json['IsSent'];
+ isSentOn = json['IsSentOn'];
+ isRead = json['IsRead'];
+ isReadOn = json['IsReadOn'];
+ channelID = json['ChannelID'];
+ projectID = json['ProjectID'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['Id'] = this.id;
+ data['RecordId'] = this.recordId;
+ data['PatientID'] = this.patientID;
+ data['ProjectOutSA'] = this.projectOutSA;
+ data['DeviceType'] = this.deviceType;
+ data['DeviceToken'] = this.deviceToken;
+ data['Message'] = this.message;
+ data['MessageType'] = this.messageType;
+ data['MessageTypeData'] = this.messageTypeData;
+ data['VideoURL'] = this.videoURL;
+ data['IsQueue'] = this.isQueue;
+ data['IsQueueOn'] = this.isQueueOn;
+ data['CreatedOn'] = this.createdOn;
+ data['CreatedBy'] = this.createdBy;
+ data['NotificationType'] = this.notificationType;
+ data['IsSent'] = this.isSent;
+ data['IsSentOn'] = this.isSentOn;
+ data['IsRead'] = this.isRead;
+ data['IsReadOn'] = this.isReadOn;
+ data['ChannelID'] = this.channelID;
+ data['ProjectID'] = this.projectID;
+ return data;
+ }
+}
diff --git a/lib/core/model/notifications/mark_message_as_read_request_model.dart b/lib/core/model/notifications/mark_message_as_read_request_model.dart
new file mode 100644
index 00000000..99dab006
--- /dev/null
+++ b/lib/core/model/notifications/mark_message_as_read_request_model.dart
@@ -0,0 +1,15 @@
+class MarkMessageAsReadRequestModel {
+ int notificationPoolID;
+
+ MarkMessageAsReadRequestModel({this.notificationPoolID});
+
+ MarkMessageAsReadRequestModel.fromJson(Map json) {
+ notificationPoolID = json['NotificationPoolID'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['NotificationPoolID'] = this.notificationPoolID;
+ return data;
+ }
+}
diff --git a/lib/core/model/prescriptions/perscription_pharmacy.dart b/lib/core/model/prescriptions/perscription_pharmacy.dart
index 5180689f..3adaef7e 100644
--- a/lib/core/model/prescriptions/perscription_pharmacy.dart
+++ b/lib/core/model/prescriptions/perscription_pharmacy.dart
@@ -1,6 +1,6 @@
class PharmacyPrescriptions {
String expiryDate;
- double sellingPrice;
+ dynamic sellingPrice;
int quantity;
int itemID;
int locationID;
diff --git a/lib/core/model/prescriptions/request_prescription_report_enh.dart b/lib/core/model/prescriptions/request_prescription_report_enh.dart
index 42b89c15..4905fc2a 100644
--- a/lib/core/model/prescriptions/request_prescription_report_enh.dart
+++ b/lib/core/model/prescriptions/request_prescription_report_enh.dart
@@ -14,6 +14,7 @@ class RequestPrescriptionReportEnh {
int patientType;
int appointmentNo;
String setupID;
+ int dischargeNo;
int episodeID;
int clinicID;
int projectID;
@@ -36,7 +37,7 @@ class RequestPrescriptionReportEnh {
this.setupID,
this.episodeID,
this.clinicID,
- this.projectID});
+ this.projectID,this.dischargeNo});
RequestPrescriptionReportEnh.fromJson(Map json) {
versionID = json['VersionID'];
@@ -79,6 +80,7 @@ class RequestPrescriptionReportEnh {
data['EpisodeID'] = this.episodeID;
data['ClinicID'] = this.clinicID;
data['ProjectID'] = this.projectID;
+ data['DischargeNo'] = this.dischargeNo;
return data;
}
}
diff --git a/lib/core/model/rate/appointment_details.dart b/lib/core/model/rate/appointment_details.dart
index 30280b4a..77d759db 100644
--- a/lib/core/model/rate/appointment_details.dart
+++ b/lib/core/model/rate/appointment_details.dart
@@ -5,13 +5,13 @@ class AppointmentDetails {
int appointmentNo;
int clinicID;
int doctorID;
- String startTime;
- String endTime;
- String appointmentDate;
- String clinicName;
- String doctorImageURL;
- String doctorName;
- String projectName;
+ dynamic startTime;
+ dynamic endTime;
+ dynamic appointmentDate;
+ dynamic clinicName;
+ dynamic doctorImageURL;
+ dynamic doctorName;
+ dynamic projectName;
AppointmentDetails(
{this.setupID,
diff --git a/lib/core/service/AuthenticatedUserObject.dart b/lib/core/service/AuthenticatedUserObject.dart
index 600e17e1..f48b1179 100644
--- a/lib/core/service/AuthenticatedUserObject.dart
+++ b/lib/core/service/AuthenticatedUserObject.dart
@@ -17,8 +17,8 @@ class AuthenticatedUserObject {
if (userData != null) user = AuthenticatedUser.fromJson(userData);
}
- var isLogin = await sharedPref.getString(LOGIN_TOKEN_ID);
- this.isLogin = isLogin != null;
+ // var isLogin = await sharedPref.getString(LOGIN_TOKEN_ID);
+ this.isLogin = user != null;
}
logout() async {
diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart
index 696489c6..fb1039b4 100644
--- a/lib/core/service/client/base_app_client.dart
+++ b/lib/core/service/client/base_app_client.dart
@@ -2,12 +2,16 @@ import 'dart:convert';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
+import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:flutter/cupertino.dart';
import 'package:http/http.dart' as http;
+import 'package:provider/provider.dart';
+import '../../../locator.dart';
import '../../../routes.dart';
+import '../AuthenticatedUserObject.dart';
AppSharedPreferences sharedPref = new AppSharedPreferences();
@@ -16,19 +20,16 @@ AppSharedPreferences sharedPref = new AppSharedPreferences();
/// onSuccess: (dynamic response, int statusCode) {},
/// onFailure: (String error, int statusCode) {},
/// body: Map();
+///
+AuthenticatedUserObject authenticatedUserObject = locator();
class BaseAppClient {
- post(String endPoint,
- {Map body,
- Function(dynamic response, int statusCode) onSuccess,
- Function(String error, int statusCode) onFailure,
- bool isAllowAny = false}) async {
+ post(String endPoint, {Map body, Function(dynamic response, int statusCode) onSuccess, Function(String error, int statusCode) onFailure, bool isAllowAny = false}) async {
String url = BASE_URL + endPoint;
try {
//Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
String token = await sharedPref.getString(TOKEN);
- var languageID =
- await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'en');
+ var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
var user = await sharedPref.getObject(USER_PROFILE);
if (body.containsKey('SetupID')) {
body['SetupID'] = body.containsKey('SetupID')
@@ -39,7 +40,16 @@ class BaseAppClient {
}
body['VersionID'] = VERSION_ID;
body['Channel'] = CHANNEL;
- body['LanguageID'] = languageID == 'ar' ? 1 : 2;
+ body['LanguageID'] = body.containsKey('LanguageID')
+ ? body['LanguageID'] != null
+ ? body['LanguageID']
+ : languageID == 'ar'
+ ? 1
+ : 2
+ : languageID == 'ar'
+ ? 1
+ : 2;
+
body['IPAdress'] = IP_ADDRESS;
body['generalid'] = GENERAL_ID;
body['PatientOutSA'] = body.containsKey('PatientOutSA')
@@ -49,12 +59,11 @@ class BaseAppClient {
: PATIENT_OUT_SA;
if (body.containsKey('isDentalAllowedBackend')) {
- body['isDentalAllowedBackend'] =
- body.containsKey('isDentalAllowedBackend')
- ? body['isDentalAllowedBackend'] != null
- ? body['isDentalAllowedBackend']
- : IS_DENTAL_ALLOWED_BACKEND
- : IS_DENTAL_ALLOWED_BACKEND;
+ body['isDentalAllowedBackend'] = body.containsKey('isDentalAllowedBackend')
+ ? body['isDentalAllowedBackend'] != null
+ ? body['isDentalAllowedBackend']
+ : IS_DENTAL_ALLOWED_BACKEND
+ : IS_DENTAL_ALLOWED_BACKEND;
}
body['DeviceTypeID'] = DeviceTypeID;
@@ -63,19 +72,21 @@ class BaseAppClient {
body['PatientType'] = body.containsKey('PatientType')
? body['PatientType'] != null
? body['PatientType']
- : PATIENT_TYPE
+ : user['PatientType'] != null
+ ? user['PatientType']
+ : PATIENT_TYPE
: PATIENT_TYPE;
body['PatientTypeID'] = body.containsKey('PatientTypeID')
? body['PatientTypeID'] != null
? body['PatientTypeID']
- : PATIENT_TYPE_ID
+ : user['PatientTypeID'] != null
+ ? user['PatientTypeID']
+ : PATIENT_TYPE_ID
: PATIENT_TYPE_ID;
-
if (user != null) {
body['TokenID'] = token;
- body['PatientID'] =
- body['PatientID'] != null ? body['PatientID'] : user['PatientID'];
+ body['PatientID'] = body['PatientID'] != null ? body['PatientID'] : user['PatientID'];
body['PatientOutSA'] = user['OutSA'];
body['SessionID'] = SESSION_ID; //getSessionId(token);
}
@@ -86,12 +97,7 @@ class BaseAppClient {
var ss = json.encode(body);
if (await Utils.checkConnection()) {
- final response = await http.post(url.trim(),
- body: json.encode(body),
- headers: {
- 'Content-Type': 'application/json',
- 'Accept': 'application/json'
- });
+ final response = await http.post(url.trim(), body: json.encode(body), headers: {'Content-Type': 'application/json', 'Accept': 'application/json'});
final int statusCode = response.statusCode;
print("statusCode :$statusCode");
if (statusCode < 200 || statusCode >= 400 || json == null) {
@@ -111,21 +117,19 @@ class BaseAppClient {
} else if (parsed['Result'] == 'OK') {
onSuccess(parsed, statusCode);
} else {
- onFailure(
- parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
- statusCode);
- logout();
+ onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
}
- } else if (parsed['MessageStatus'] == 1 ||
- parsed['SMSLoginRequired'] == true) {
+ } else if (parsed['MessageStatus'] == 1 || parsed['SMSLoginRequired'] == true) {
onSuccess(parsed, statusCode);
+ } else if (!parsed['IsAuthenticated']) {
+ await logout();
+
+ //helpers.showErrorToast('Your session expired Please login agian');
} else {
if (parsed['SameClinicApptList'] != null) {
onSuccess(parsed, statusCode);
} else {
- onFailure(
- parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
- statusCode);
+ onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
}
}
}
@@ -139,10 +143,7 @@ class BaseAppClient {
}
}
- get(String endPoint,
- {Function(dynamic response, int statusCode) onSuccess,
- Function(String error, int statusCode) onFailure,
- Map queryParams}) async {
+ get(String endPoint, {Function(dynamic response, int statusCode) onSuccess, Function(String error, int statusCode) onFailure, Map queryParams}) async {
String url = BASE_URL + endPoint;
if (queryParams != null) {
String queryString = Uri(queryParameters: queryParams).query;
@@ -152,10 +153,10 @@ class BaseAppClient {
print("URL : $url");
if (await Utils.checkConnection()) {
- final response = await http.get(url.trim(), headers: {
- 'Content-Type': 'application/json',
- 'Accept': 'application/json'
- },);
+ final response = await http.get(
+ url.trim(),
+ headers: {'Content-Type': 'application/json', 'Accept': 'application/json'},
+ );
final int statusCode = response.statusCode;
print("statusCode :$statusCode");
@@ -170,9 +171,39 @@ class BaseAppClient {
}
}
+ simpleGet(String fullUrl, {Function(dynamic response, int statusCode) onSuccess, Function(String error, int statusCode) onFailure, Map queryParams}) async {
+ String url = fullUrl;
+ if (queryParams != null) {
+ String queryString = Uri(queryParameters: queryParams).query;
+ url += '?' + queryString;
+ }
+
+ print("URL : $url");
+
+ if (await Utils.checkConnection()) {
+ final response = await http.get(
+ url.trim(),
+ headers: {'Content-Type': 'application/json', 'Accept': 'application/json'},
+ );
+
+ final int statusCode = response.statusCode;
+ print("statusCode :$statusCode");
+
+ if (statusCode < 200 || statusCode >= 400 || json == null) {
+ onFailure('Error While Fetching data', statusCode);
+ } else {
+ onSuccess(response.body.toString(), statusCode);
+ }
+ } else {
+ onFailure('Please Check The Internet Connection', -1);
+ }
+ }
+
logout() async {
await sharedPref.remove(LOGIN_TOKEN_ID);
- Navigator.of(AppGlobal.context).pushReplacementNamed(LOGIN_TYPE);
+ await authenticatedUserObject.getUser();
+ Provider.of(AppGlobal.context, listen: false).isLogin = false;
+ Navigator.of(AppGlobal.context).pushReplacementNamed(HOME);
}
String getSessionId(String id) {
diff --git a/lib/core/service/feedback/feedback_service.dart b/lib/core/service/feedback/feedback_service.dart
index 74107585..9df5b0a6 100644
--- a/lib/core/service/feedback/feedback_service.dart
+++ b/lib/core/service/feedback/feedback_service.dart
@@ -1,5 +1,4 @@
import 'dart:io';
-
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/feedback/COC_items.dart';
@@ -45,8 +44,7 @@ class FeedbackService extends BaseService {
if (appointHistory != null) {
body['AppoinmentNo'] = appointHistory.appointmentNo;
- body['AppointmentDate'] =
- DateUtil.convertDateToString(appointHistory.appointmentDate);
+ body['AppointmentDate'] = DateUtil.convertDateToString(appointHistory.appointmentDate);
body['ClinicID'] = appointHistory.clinicID;
body['ClinicName'] = appointHistory.clinicName;
body['DoctorID'] = appointHistory.doctorID;
diff --git a/lib/core/service/insurance_service.dart b/lib/core/service/insurance_service.dart
index 7fee6615..790003e9 100644
--- a/lib/core/service/insurance_service.dart
+++ b/lib/core/service/insurance_service.dart
@@ -31,48 +31,9 @@ class InsuranceCardService extends BaseService {
_cardUpdated.clear();
}
- InsuranceCardModel _insuranceCardModel = InsuranceCardModel(
- channel: 3,
- deviceTypeID: 2,
- generalid: "Cs2020@2016\$2958",
- iPAdress: "10.20.10.20",
- isDentalAllowedBackend: false,
- languageID: 1,
- patientID: 1231755,
- patientOutSA: 0,
- patientType: 1,
- patientTypeID: 1,
- sessionID: "uoKFXSLUwEaHYPwKZNA",
- tokenID: "@dm!n",
- versionID: 5.5,
- );
-
- InsuranceUpdateModel _insuranceUpdateModel = InsuranceUpdateModel(
- channel: 3,
- deviceTypeID: 2,
- generalid: "Cs2020@2016\$2958",
- iPAdress: "10.20.10.20",
- isDentalAllowedBackend: false,
- patientID: 1231755,
- patientType: 1,
- versionID: 5.5,
- languageID: 2,
- patientOutSA: 0,
- sessionID: "ENRSJBKXnzCuuVQ",
- );
InsuranceApprovalModel _insuranceApprovalModel = InsuranceApprovalModel(
- versionID: 5.5,
- channel: 3,
- languageID: LANGUAGE_ID,
- iPAdress: "10.20.10.20",
- generalid: "Cs2020@2016\$2958",
- patientOutSA: 0,
- sessionID: "DypNmtMkivzURHjeYg",
isDentalAllowedBackend: false,
- deviceTypeID: 2,
- patientID: 1231755,
- tokenID: "@dm!n",
patientTypeID: 1,
patientType: 1,
eXuldAPPNO: 0,
@@ -89,21 +50,22 @@ class InsuranceCardService extends BaseService {
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
- }, body: _insuranceCardModel.toJson());
+ }, body: Map());
}
Future getInsuranceUpdate() async {
hasError = false;
- // _cardList.clear();
+ _cardList.clear();
await baseAppClient.post(GET_PAtIENTS_INSURANCE_UPDATED,
onSuccess: (dynamic response, int statusCode) {
+ _cardUpdated.clear();
response['List_PatientInsuranceCardHistory'].forEach((item) {
_cardUpdated.add(InsuranceUpdateModel.fromJson(item));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
- }, body: _insuranceUpdateModel.toJson());
+ }, body: Map());
}
Future getInsuranceApproval({int appointmentNo}) async {
@@ -163,4 +125,15 @@ class InsuranceCardService extends BaseService {
throw error;
}
}
+ Future getInsuranceDetails(data) async{
+ dynamic localRes;
+ await baseAppClient.post(INSURANCE_DETAILS,
+ onSuccess: (dynamic response, int statusCode) {
+ localRes = response['List_InsuranceCheckList'];
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body:{'CompanyID': data.companyID,'SubCategoryID':data.subCategoryID },);
+ return Future.value(localRes);
+ }
}
diff --git a/lib/core/service/medical/BloodPressureService.dart b/lib/core/service/medical/BloodPressureService.dart
index 048c98e9..f2681191 100644
--- a/lib/core/service/medical/BloodPressureService.dart
+++ b/lib/core/service/medical/BloodPressureService.dart
@@ -3,10 +3,6 @@ import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/BloodPr
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/MonthBloodPressureResultAverage.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/WeekBloodPressureResultAverage.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/YearBloodPressureResultAverage.dart';
-import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart';
-import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/MonthDiabtectResultAverage.dart';
-import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/WeekDiabtectResultAverage.dart';
-import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/YearDiabtecResultAverage.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
class BloodPressureService extends BaseService {
diff --git a/lib/core/service/medical/WeightPressureService.dart b/lib/core/service/medical/WeightPressureService.dart
index 006de821..27048dc8 100644
--- a/lib/core/service/medical/WeightPressureService.dart
+++ b/lib/core/service/medical/WeightPressureService.dart
@@ -1,12 +1,4 @@
import 'package:diplomaticquarterapp/config/config.dart';
-import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/BloodPressureResult.dart';
-import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/MonthBloodPressureResultAverage.dart';
-import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/WeekBloodPressureResultAverage.dart';
-import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/YearBloodPressureResultAverage.dart';
-import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart';
-import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/MonthDiabtectResultAverage.dart';
-import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/WeekDiabtectResultAverage.dart';
-import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/YearDiabtecResultAverage.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/weight/MonthWeightMeasurementResultAverage.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/weight/WeekWeightMeasurementResultAverage.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/weight/WeightMeasurementResult.dart';
diff --git a/lib/core/service/medical/labs_service.dart b/lib/core/service/medical/labs_service.dart
index c1ad65f3..b9b9a16c 100644
--- a/lib/core/service/medical/labs_service.dart
+++ b/lib/core/service/medical/labs_service.dart
@@ -9,10 +9,12 @@ import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
class LabsService extends BaseService {
- RequestPatientLabOrders _requestPatientLabOrders = RequestPatientLabOrders();
List patientLabOrdersList = List();
Future getPatientLabOrdersList() async {
+ hasError = false;
+ Map body = Map();
+ body['isDentalAllowedBackend'] = false;
await baseAppClient.post(GET_Patient_LAB_ORDERS,
onSuccess: (dynamic response, int statusCode) {
patientLabOrdersList.clear();
@@ -22,7 +24,7 @@ class LabsService extends BaseService {
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
- }, body: _requestPatientLabOrders.toJson());
+ }, body: body);
}
RequestPatientLabSpecialResult _requestPatientLabSpecialResult =
@@ -39,7 +41,7 @@ class LabsService extends BaseService {
hasError = false;
_requestPatientLabSpecialResult.projectID = projectID;
_requestPatientLabSpecialResult.clinicID = clinicID;
- _requestPatientLabSpecialResult.invoiceNo = invoiceNo; //'1800296522';//;
+ _requestPatientLabSpecialResult.invoiceNo = invoiceNo;
_requestPatientLabSpecialResult.orderNo = orderNo;
await baseAppClient.post(GET_Patient_LAB_SPECIAL_RESULT,
@@ -59,10 +61,10 @@ class LabsService extends BaseService {
Map body = Map();
body['InvoiceNo'] = patientLabOrder.invoiceNo;
body['OrderNo'] = patientLabOrder.orderNo;
- body['Procedure'] = "U/A";
+ body['isDentalAllowedBackend'] = false;
+ body['SetupID'] = patientLabOrder.setupID;
body['ProjectID'] = patientLabOrder.projectID;
body['ClinicID'] = patientLabOrder.clinicID;
- //TODO Check the res
await baseAppClient.post(GET_Patient_LAB_RESULT,
onSuccess: (dynamic response, int statusCode) {
patientLabSpecialResult.clear();
diff --git a/lib/core/service/medical/my_balance_service.dart b/lib/core/service/medical/my_balance_service.dart
index 27d5d602..c456b38c 100644
--- a/lib/core/service/medical/my_balance_service.dart
+++ b/lib/core/service/medical/my_balance_service.dart
@@ -2,10 +2,13 @@ import 'dart:convert';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
+import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/patient_advance_balance_amount.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobile_number.dart';
+import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
+import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordsByStatusReq.dart';
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart';
@@ -21,6 +24,8 @@ class MyBalanceService extends BaseService {
String logInTokenID;
String verificationCode;
+ AuthenticatedUserObject authenticatedUserObject = locator();
+
getPatientAdvanceBalanceAmount() async {
hasError = false;
super.error = "";
@@ -61,8 +66,8 @@ class MyBalanceService extends BaseService {
super.error = "";
Map body = Map();
body['isDentalAllowedBackend'] = false;
- body['MobileNo'] = user.mobileNumber;
- body['ProjectID'] = user.projectID;
+ body['MobileNo'] = authenticatedUserObject.user.mobileNumber;
+ body['ProjectID'] = authenticatedUserObject.user.projectID;
await baseAppClient.post(GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER,
onSuccess: (response, statusCode) async {
@@ -143,7 +148,7 @@ class MyBalanceService extends BaseService {
await sharedPref.getObject(FAMILY_FILE));
return getAllSharedRecordsByStatusResponse;
} else {
- return getSharedRecordByStatus();
+ return await getSharedRecordByStatus();
}
}
}
diff --git a/lib/core/service/medical/my_doctor_service.dart b/lib/core/service/medical/my_doctor_service.dart
index f2ba067a..3d9e14b7 100644
--- a/lib/core/service/medical/my_doctor_service.dart
+++ b/lib/core/service/medical/my_doctor_service.dart
@@ -22,12 +22,6 @@ class MyDoctorService extends BaseService {
channel: 3,
deviceTypeID: 2,
doctorID: 2477,
- iPAdress: '10.20.10.20',
- languageID: 2,
- patientOutSA: 0,
- sessionID: 'CvsUFeJkyLDnFQqw',
- versionID: 5.5,
- generalid: 'Cs2020@2016\$2958',
isDentalAllowedBackend: false);
Future getPatientDoctorAppointmentList({int top = 0, int beforeDays = 0,int exludType=4}) async {
@@ -52,18 +46,6 @@ class MyDoctorService extends BaseService {
RequestDoctorProfile _requestDoctorProfile = RequestDoctorProfile(
license: true,
isRegistered: true,
- projectID: 12,
- clinicID: 501,
- patientID: 1231755,
- versionID: 5.5,
- channel: 3,
- languageID: 2,
- iPAdress: '10.20.10.20',
- generalid: 'Cs2020@2016\$2958',
- patientOutSA: 0,
- sessionID: 'nstatCtNEmuwxeuVAOUmw',
- isDentalAllowedBackend: false,
- deviceTypeID: 2,
);
Future getDoctorProfileAndRating(
@@ -87,7 +69,7 @@ class MyDoctorService extends BaseService {
}, body: _requestDoctorProfile.toJson());
///GET DOCTOR RATING
- //_requestDoctorRating.doctorID = doctorId;
+ _requestDoctorRating.doctorID = doctorId;
await baseAppClient.post(GET_DOCTOR_RATING,
onSuccess: (dynamic response, int statusCode) {
doctorRating = DoctorRating.fromJson(response['AvgDoctorRatingList'][0]);
diff --git a/lib/core/service/medical/prescriptions_service.dart b/lib/core/service/medical/prescriptions_service.dart
index 294ef897..b920499c 100644
--- a/lib/core/service/medical/prescriptions_service.dart
+++ b/lib/core/service/medical/prescriptions_service.dart
@@ -11,40 +11,17 @@ import 'package:diplomaticquarterapp/core/model/prescriptions/request_prescripti
import 'package:diplomaticquarterapp/core/model/prescriptions/request_prescriptions_orders.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/request_send_prescription_email.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
+import 'package:flutter/cupertino.dart';
class PrescriptionsService extends BaseService {
List prescriptionsList = List();
- RequestPrescriptions _requestPrescriptions = RequestPrescriptions(
- versionID: 5.5,
- channel: 3,
- languageID: 2,
- iPAdress: '10.20.10.20',
- generalid: 'Cs2020@2016\$2958',
- patientOutSA: 0,
- sessionID: 'KIbLoqkytuKJEWECHQ',
- isDentalAllowedBackend: false,
- deviceTypeID: 2,
- patientID: 1231755,
- tokenID: '@dm!n',
- patientTypeID: 1,
- patientType: 1);
List prescriptionsOrderList = List();
- RequestPrescriptionsOrders _requestPrescriptionsOrders =
- RequestPrescriptionsOrders(
- patientID: 1231755,
- patientOutSA: 0,
- versionID: 5.5,
- channel: 3,
- languageID: 1,
- iPAdress: '10.20.10.20',
- generalid: 'Cs2020@2016\$2958',
- sessionID: 'KIbLoqkytuKJEWECHQ',
- isDentalAllowedBackend: false,
- deviceTypeID: 2);
Future getPrescriptions() async {
hasError = false;
+ Map body = Map();
+ body['isDentalAllowedBackend'] = false;
await baseAppClient.post(PRESCRIPTIONS,
onSuccess: (dynamic response, int statusCode) {
prescriptionsList.clear();
@@ -54,10 +31,12 @@ class PrescriptionsService extends BaseService {
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
- }, body: _requestPrescriptions.toJson());
+ }, body: body);
}
Future getPrescriptionsOrders() async {
+ Map body = Map();
+ body['isDentalAllowedBackend'] = false;
await baseAppClient.post(GET_PRESCRIPTIONS_ALL_ORDERS,
onSuccess: (dynamic response, int statusCode) {
prescriptionsOrderList.clear();
@@ -69,35 +48,23 @@ class PrescriptionsService extends BaseService {
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
- }, body: _requestPrescriptionsOrders.toJson());
+ }, body: body);
}
RequestPrescriptionReport _requestPrescriptionReport =
RequestPrescriptionReport(
- appointmentNo: 0,
- channel: 3,
- clinicID: 4,
- deviceTypeID: 2,
- dischargeNo: 2018003246,
- episodeID: 0,
- iPAdress: '10.20.10.20',
- languageID: 1,
- patientID: 1231755,
- patientOutSA: 0,
- patientType: 1,
- patientTypeID: 1,
- projectID: 12,
- sessionID: 'wgKuHpsPsEuLnlJhAYCQ',
- tokenID: '@dm!n',
- setupID: "91877",
- versionID: 5.5,
- generalid: 'Cs2020@2016\$2958',
- isDentalAllowedBackend: false);
+ appointmentNo: 0, isDentalAllowedBackend: false);
List prescriptionReportList = List();
- Future getPrescriptionReport({int dischargeNo}) async {
+ Future getPrescriptionReport(
+ {int dischargeNo, int projectId, int clinicID, String setupID,int episodeID}) async {
hasError = false;
_requestPrescriptionReport.dischargeNo = dischargeNo;
+ _requestPrescriptionReport.projectID = projectId;
+ _requestPrescriptionReport.clinicID = clinicID;
+ _requestPrescriptionReport.setupID = setupID;
+ _requestPrescriptionReport.episodeID = episodeID;
+
await baseAppClient.post(GET_PRESCRIPTION_REPORT,
onSuccess: (dynamic response, int statusCode) {
prescriptionReportList.clear();
@@ -112,24 +79,7 @@ class PrescriptionsService extends BaseService {
RequestSendPrescriptionEmail _requestSendPrescriptionEmail =
RequestSendPrescriptionEmail(
- versionID: 5.5,
- languageID: 2,
- channel: 3,
- iPAdress: '10.20.10.20',
- generalid: 'Cs2020@2016\$2958',
- patientOutSA: 0,
- sessionID: 'twIUmHfOHqFdDfVcyw',
- isDentalAllowedBackend: false,
- deviceTypeID: 2,
- tokenID: '@dm!n',
- patientTypeID: 1,
- patientType: 1,
- to: 'aljammalzmohammad@outlook.com',
- dateofBirth: '/Date(536743800000+0300)/',
- patientIditificationNum: '2344670985',
- patientMobileNumber: '537503378',
- patientName: 'TAMER FANASHEH',
- setupID: '91877');
+ isDentalAllowedBackend: false,);
Future sendPrescriptionEmail(String appointmentDate, int patientID,
String clinicName, String doctorName, int projectID) async {
@@ -139,28 +89,25 @@ class PrescriptionsService extends BaseService {
_requestSendPrescriptionEmail.clinicName = clinicName;
_requestSendPrescriptionEmail.doctorName = doctorName;
_requestSendPrescriptionEmail.projectID = projectID;
+ _requestSendPrescriptionEmail.to = user.emailAddress;
+ _requestSendPrescriptionEmail.dateofBirth = user.dateofBirth;
+ _requestSendPrescriptionEmail.patientIditificationNum = user.patientIdentificationNo;
+ _requestSendPrescriptionEmail.patientMobileNumber = user.mobileNumber;
+ _requestSendPrescriptionEmail.patientName = user.firstName +" "+ user.lastName;
+ _requestSendPrescriptionEmail.setupID = user.setupID;
hasError = false;
- await baseAppClient.post(SEND_PRESCRIPTION_EMAIL,
- onFailure: (String error, int statusCode) {
+ await baseAppClient.post(SEND_PRESCRIPTION_EMAIL, onSuccess: (response, statusCode) {},
+ onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _requestSendPrescriptionEmail.toJson());
}
- RequestGetListPharmacyForPrescriptions
- requestGetListPharmacyForPrescriptions =
- RequestGetListPharmacyForPrescriptions(
+ RequestGetListPharmacyForPrescriptions requestGetListPharmacyForPrescriptions = RequestGetListPharmacyForPrescriptions(
latitude: 0,
longitude: 0,
- versionID: 5.5,
- channel: 3,
- languageID: 2,
- iPAdress: '10.20.10.20',
- generalid: 'Cs2020@2016\$2958',
- patientOutSA: 0,
- sessionID: 'HGNerTUSXhpaHXBg',
isDentalAllowedBackend: false,
- deviceTypeID: 2,
+
);
List pharmacyPrescriptionsList = List();
@@ -180,44 +127,85 @@ class PrescriptionsService extends BaseService {
}, body: requestGetListPharmacyForPrescriptions.toJson());
}
+ RequestPrescriptionReportEnh _requestPrescriptionReportEnh =
+ RequestPrescriptionReportEnh(isDentalAllowedBackend: false,);
- RequestPrescriptionReportEnh _requestPrescriptionReportEnh = RequestPrescriptionReportEnh(
- versionID: 5.5,
- channel: 3,
- languageID: 2,
- iPAdress: '10.20.10.20',
- generalid: 'Cs2020@2016\$2958',
- patientOutSA: 0,
- sessionID: 'bQQdesEKpyYKTFMVNeg',
- isDentalAllowedBackend: false,
- deviceTypeID: 2,
- patientID: 1231755,
- tokenID: '@dm!n',
- patientTypeID: 1,
- patientType: 1,
- setupID: '91877',
- appointmentNo: 5926390,
- episodeID: 140251928,
- clinicID: 25,
- projectID: 12
+ List prescriptionReportEnhList = List();
- );
+ Future getPrescriptionReportEnh({PrescriptionsOrder prescriptionsOrder}) async {
+
+ ///This logic copy from the old app from class [order-history.component.ts] in line 45
+ bool isInPatient = false;
+ prescriptionsList.forEach((element) {
+ if (prescriptionsOrder.appointmentNo == "0") {
+ if (element.dischargeNo == int.parse(prescriptionsOrder.dischargeID)) {
+
+ _requestPrescriptionReportEnh.appointmentNo = element.appointmentNo;
+ _requestPrescriptionReportEnh.clinicID = element.clinicID;
+ _requestPrescriptionReportEnh.projectID = element.projectID;
+ _requestPrescriptionReportEnh.episodeID = element.episodeID;
+ _requestPrescriptionReportEnh.setupID = element.setupID;
+ _requestPrescriptionReportEnh.dischargeNo = element.dischargeNo;
+ isInPatient = element.isInOutPatient;
+ }
+ } else {
+ if (int.parse(prescriptionsOrder.appointmentNo) == element.appointmentNo) {
+ _requestPrescriptionReportEnh.appointmentNo = element.appointmentNo;
+ _requestPrescriptionReportEnh.clinicID = element.clinicID;
+ _requestPrescriptionReportEnh.projectID = element.projectID;
+ _requestPrescriptionReportEnh.episodeID = element.episodeID;
+ _requestPrescriptionReportEnh.setupID = element.setupID;
+ _requestPrescriptionReportEnh.dischargeNo = element.dischargeNo;
+ isInPatient = element.isInOutPatient;///call inpGetPrescriptionReport
+ }
+ }
+ });
- List prescriptionReportEnhList = List();
- Future getPrescriptionReportEnh({PrescriptionsOrder prescriptionsOrder})async{
hasError = false;
- // _requestPrescriptionReportEnh.appointmentNo = int.parse(prescriptionsOrder.appointmentNo);
- // _requestPrescriptionReportEnh.patientID = prescriptionsOrder.projectID;
- await baseAppClient.post(GET_PRESCRIPTION_REPORT_ENH,
+ await baseAppClient.post(isInPatient? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT,
onSuccess: (dynamic response, int statusCode) {
- prescriptionReportEnhList.clear();
- response['ListPRM'].forEach((prescriptions) {
- prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(prescriptions));
- });
+ prescriptionReportEnhList.clear();
+
+ if(isInPatient){
+ response['ListPRM'].forEach((prescriptions) {
+ prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(prescriptions));
+ });
+ }else{
+ response['INP_GetPrescriptionReport_List'].forEach((prescriptions) {
+
+ PrescriptionReportEnh reportEnh = PrescriptionReportEnh.fromJson(prescriptions);
+ reportEnh.itemDescription = prescriptions['ItemDescriptionN'];
+ prescriptionReportEnhList.add(reportEnh);
+
+ });
+
+ }
+
+
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: _requestPrescriptionReportEnh.toJson());
+
+
+ }
+
+ Future updatePressOrder({@required int presOrderID}) async {
+ hasError = false;
+ Map body = Map();
+ body['PresOrderID'] = presOrderID;
+ body['EditedBy'] = user.patientID;
+ body['RejectionReason'] = '';
+ body['PresOrderStatus'] = 4;
+ body['isDentalAllowedBackend'] = false;
+ await baseAppClient.post(UPDATE_PRESS_ORDER,
+ onSuccess: (dynamic response, int statusCode) {
+
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
- }, body: _requestPrescriptionReportEnh.toJson());
+ }, body: body);
}
+
}
diff --git a/lib/core/service/medical/reports_monthly_service.dart b/lib/core/service/medical/reports_monthly_service.dart
index 5e643669..479360ac 100644
--- a/lib/core/service/medical/reports_monthly_service.dart
+++ b/lib/core/service/medical/reports_monthly_service.dart
@@ -12,19 +12,8 @@ class ReportsMonthlyService extends BaseService {
isReport: true,
encounterType: 1,
requestType: 1,
- versionID: 5.5,
- channel: 3,
- languageID: 2,
- iPAdress: "10.20.10.20",
- generalid: 'Cs2020@2016\$2958',
- patientOutSA: 0,
- sessionID: 'KIbLoqkytuKJEWECHQ',
isDentalAllowedBackend: false,
- deviceTypeID: 2,
- patientID: 1231755,
- tokenID: '@dm!n',
- patientTypeID: 1,
- patientType: 1);
+ );
Future getReports() async {
hasError = false;
diff --git a/lib/core/service/medical/reports_service.dart b/lib/core/service/medical/reports_service.dart
index 316872ed..19f86e2e 100644
--- a/lib/core/service/medical/reports_service.dart
+++ b/lib/core/service/medical/reports_service.dart
@@ -12,19 +12,8 @@ class ReportsService extends BaseService {
isReport: true,
encounterType: 1,
requestType: 1,
- versionID: 5.5,
- channel: 3,
- languageID: 2,
- iPAdress: "10.20.10.20",
- generalid: 'Cs2020@2016\$2958',
patientOutSA: 0,
- sessionID: 'KIbLoqkytuKJEWECHQ',
- isDentalAllowedBackend: false,
- deviceTypeID: 2,
- patientID: 1231755,
- tokenID: '@dm!n',
- patientTypeID: 1,
- patientType: 1);
+ );
Future getReports() async {
hasError = false;
diff --git a/lib/core/service/notifications_service.dart b/lib/core/service/notifications_service.dart
new file mode 100644
index 00000000..f2cac55e
--- /dev/null
+++ b/lib/core/service/notifications_service.dart
@@ -0,0 +1,40 @@
+import 'package:diplomaticquarterapp/config/config.dart';
+import 'package:diplomaticquarterapp/core/model/notifications/get_notifications_request_model.dart';
+import 'package:diplomaticquarterapp/core/model/notifications/get_notifications_response_model.dart';
+import 'package:diplomaticquarterapp/core/model/notifications/mark_message_as_read_request_model.dart';
+import 'package:diplomaticquarterapp/core/service/base_service.dart';
+
+class NotificationService extends BaseService {
+ List notificationsList = List();
+
+ Future getAllNotifications(GetNotificationsRequestModel getNotificationsRequestModel ) async {
+ hasError = false;
+ await baseAppClient.post(PUSH_NOTIFICATION_GET_ALL_NOTIFICATIONS,
+ onSuccess: (dynamic response, int statusCode) {
+ if(getNotificationsRequestModel.currentPage ==0)
+ notificationsList.clear();
+ response['List_GetAllNotificationsFromPool'].forEach((appoint) {
+ notificationsList.add(GetNotificationsResponseModel.fromJson(appoint));
+ });
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: getNotificationsRequestModel.toJson());
+ }
+ Future markAsRead(MarkMessageAsReadRequestModel markMessageAsReadRequestModel ) async {
+ hasError = false;
+ await baseAppClient.post(PUSH_NOTIFICATION_SET_MESSAGES_FROM_POOL_AS_READ,
+ onSuccess: (dynamic response, int statusCode) {
+ updateNotification(markMessageAsReadRequestModel.notificationPoolID);
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: markMessageAsReadRequestModel.toJson());
+ }
+
+ updateNotification(id) {
+ int index = notificationsList.indexWhere((element) => element.id == id);
+ notificationsList[index].isRead = true;
+
+ }
+}
diff --git a/lib/core/viewModels/base_view_model.dart b/lib/core/viewModels/base_view_model.dart
index 18ab02e3..d8ea5196 100644
--- a/lib/core/viewModels/base_view_model.dart
+++ b/lib/core/viewModels/base_view_model.dart
@@ -30,6 +30,9 @@ class BaseViewModel extends ChangeNotifier {
}
BaseViewModel() {
+ //authenticatedUserObject.getUser();
+ user = authenticatedUserObject.user;
+ this.isLogin = authenticatedUserObject.isLogin;
_getUser();
}
diff --git a/lib/core/viewModels/dashboard_view_model.dart b/lib/core/viewModels/dashboard_view_model.dart
index e2523120..4cf22b23 100644
--- a/lib/core/viewModels/dashboard_view_model.dart
+++ b/lib/core/viewModels/dashboard_view_model.dart
@@ -10,7 +10,7 @@ class DashboardViewModel extends BaseViewModel {
String bloadType = "";
getPatientRadOrders() async {
- if (!isLogin && _vitalSignService.weightKg.isEmpty) {
+ if (isLogin && _vitalSignService.weightKg.isEmpty) {
setState(ViewState.Busy);
await _vitalSignService.getPatientRadOrders();
if (_vitalSignService.hasError) {
diff --git a/lib/core/viewModels/feedback/feedback_view_model.dart b/lib/core/viewModels/feedback/feedback_view_model.dart
index d5f14e2d..4956024d 100644
--- a/lib/core/viewModels/feedback/feedback_view_model.dart
+++ b/lib/core/viewModels/feedback/feedback_view_model.dart
@@ -3,6 +3,8 @@ import 'package:diplomaticquarterapp/core/model/feedback/COC_items.dart';
import 'package:diplomaticquarterapp/core/service/feedback/feedback_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart';
+import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
+import 'package:flutter/cupertino.dart';
import '../../../locator.dart';
@@ -22,7 +24,31 @@ class FeedbackViewModel extends BaseViewModel {
MessageType messageType = MessageType.NON;
MessageType messageTypeDialog = MessageType.NON;
- String selected = "not selected";
+
+
+ String getSelected(BuildContext context) {
+ switch (messageType) {
+ case MessageType.ComplaintOnAnAppointment:
+ return TranslationBase.of(context).complainAppo;
+ break;
+ case MessageType.ComplaintWithoutAppointment:
+ return TranslationBase.of(context).complainWithoutAppo;
+ break;
+ case MessageType.Question:
+ return TranslationBase.of(context).question;
+ break;
+ case MessageType.Compliment:
+ return TranslationBase.of(context).compliment;
+ break;
+ case MessageType.Suggestion:
+ return TranslationBase.of(context).suggestion;
+ break;
+ case MessageType.NON:
+ return TranslationBase.of(context).notClassified;
+ break;
+ }
+ return TranslationBase.of(context).notClassified;
+ }
setMessageDialogType(MessageType messageType) {
messageTypeDialog = messageType;
@@ -33,19 +59,14 @@ class FeedbackViewModel extends BaseViewModel {
this.messageType = messageType;
switch (messageType) {
case MessageType.ComplaintOnAnAppointment:
- selected = "Complaint on an appointment";
break;
case MessageType.ComplaintWithoutAppointment:
- selected = "Complaint without appointment";
break;
case MessageType.Question:
- selected = "Question";
break;
case MessageType.Compliment:
- selected = "Compliment";
break;
case MessageType.Suggestion:
- selected = "Suggestion";
break;
case MessageType.NON:
break;
diff --git a/lib/core/viewModels/insurance_card_View_model.dart b/lib/core/viewModels/insurance_card_View_model.dart
index e99a53f6..7029f082 100644
--- a/lib/core/viewModels/insurance_card_View_model.dart
+++ b/lib/core/viewModels/insurance_card_View_model.dart
@@ -65,11 +65,12 @@ class InsuranceViewModel extends BaseViewModel {
}
Future getFamilyFiles() async {
- await _insuranceCardService.getFamilyFiles();
+ await _insuranceCardService.getSharedRecordByStatus();
if (_insuranceCardService.hasError) {
error = _insuranceCardService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
+
}
diff --git a/lib/core/viewModels/medical/labs_view_model.dart b/lib/core/viewModels/medical/labs_view_model.dart
index 8cbf0efc..582ee745 100644
--- a/lib/core/viewModels/medical/labs_view_model.dart
+++ b/lib/core/viewModels/medical/labs_view_model.dart
@@ -82,6 +82,8 @@ class LabsViewModel extends BaseViewModel {
List get labResultList => _labsService.labResultList;
+ List labResultLists = List();
+
getLaboratoryResult(
{String projectID,
int clinicID,
@@ -110,6 +112,24 @@ class LabsViewModel extends BaseViewModel {
error = _labsService.error;
setState(ViewState.Error);
} else {
+ _labsService.labResultList.forEach((element) {
+ List patientLabOrdersClinic =
+ labResultLists
+ .where((elementClinic) =>
+ elementClinic.filterName == element.testCode)
+ .toList();
+
+ if (patientLabOrdersClinic.length != 0) {
+ labResultLists[labResultLists.indexOf(patientLabOrdersClinic[0])]
+ .patientLabResultList
+ .add(element);
+ } else {
+ labResultLists.add(LabResultList(
+ filterName: element.testCode,
+ lab: element));
+ }
+
+ });
setState(ViewState.Idle);
}
}
diff --git a/lib/core/viewModels/medical/medical_view_model.dart b/lib/core/viewModels/medical/medical_view_model.dart
index f8b14c6e..52fd221a 100644
--- a/lib/core/viewModels/medical/medical_view_model.dart
+++ b/lib/core/viewModels/medical/medical_view_model.dart
@@ -14,7 +14,6 @@ class MedicalViewModel extends BaseViewModel {
getAppointmentHistory() async {
if (authenticatedUserObject.isLogin) {
setState(ViewState.Busy);
- if (_medicalService.appoitmentAllHistoryResultList.length == 0)
await _medicalService.getAppointmentHistory();
if (_medicalService.hasError) {
error = _medicalService.error;
diff --git a/lib/core/viewModels/medical/my_balance_view_model.dart b/lib/core/viewModels/medical/my_balance_view_model.dart
index b110edcb..af4e126e 100644
--- a/lib/core/viewModels/medical/my_balance_view_model.dart
+++ b/lib/core/viewModels/medical/my_balance_view_model.dart
@@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/blooddonation/blood_groub_details.dart';
import 'package:diplomaticquarterapp/core/model/blooddonation/get_all_cities.dart';
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
+import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/patient_advance_balance_amount.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobile_number.dart';
@@ -25,11 +26,15 @@ class MyBalanceViewModel extends BaseViewModel {
_myBalanceService.patientAdvanceBalanceAmountList;
//========================
- BloodDonationService _bloodDonationService =locator();
- List get CitiesModelList => _bloodDonationService.CitiesModelList;
- BloodDetailsService _bloodDetailsService =locator();
- List get BloodDetailsModelList => _bloodDetailsService.BloodModelList;//_bloodDonationService.CitiesModelList;
+ BloodDonationService _bloodDonationService = locator();
+ List get CitiesModelList =>
+ _bloodDonationService.CitiesModelList;
+ BloodDetailsService _bloodDetailsService = locator();
+
+ List get BloodDetailsModelList =>
+ _bloodDetailsService
+ .BloodModelList; //_bloodDonationService.CitiesModelList;
//===========================
@@ -44,8 +49,8 @@ class MyBalanceViewModel extends BaseViewModel {
PatientInfoAndMobileNumber get patientInfoAndMobileNumber =>
_myBalanceService.patientInfoAndMobileNumber;
-
String get logInTokenID => _myBalanceService.logInTokenID;
+
String get verificationCode => _myBalanceService.verificationCode;
getPatientAdvanceBalanceAmount() async {
@@ -68,6 +73,7 @@ class MyBalanceViewModel extends BaseViewModel {
} else
setState(ViewState.Idle);
}
+
//==============
Future getCities() async {
setState(ViewState.Busy);
@@ -79,9 +85,11 @@ class MyBalanceViewModel extends BaseViewModel {
} else
setState(ViewState.Idle);
}
+
Future getBlood() async {
setState(ViewState.Busy);
- await _bloodDetailsService .getAllBloodOrders();;
+ await _bloodDetailsService.getAllBloodOrders();
+ ;
if (_bloodDetailsService.hasError) {
error = _bloodDetailsService.error;
@@ -89,6 +97,7 @@ class MyBalanceViewModel extends BaseViewModel {
} else
setState(ViewState.Idle);
}
+
//===============
Future getPatientInfoByPatientID({String id}) async {
@@ -105,7 +114,8 @@ class MyBalanceViewModel extends BaseViewModel {
Future getPatientInfoByPatientIDAndMobileNumber() async {
setState(ViewState.Busy);
- await _myBalanceService.getPatientInfoByPatientIDAndMobileNumber();
+ await _myBalanceService
+ .getPatientInfoByPatientIDAndMobileNumber();
if (_myBalanceService.hasError) {
error = _myBalanceService.error;
setState(ViewState.ErrorLocal);
@@ -115,9 +125,11 @@ class MyBalanceViewModel extends BaseViewModel {
}
}
- Future sendActivationCodeForAdvancePayment({int patientID,int projectID}) async {
+ Future sendActivationCodeForAdvancePayment(
+ {int patientID, int projectID}) async {
setState(ViewState.Busy);
- await _myBalanceService.sendActivationCodeForAdvancePayment(patientID: patientID,projectID: projectID);
+ await _myBalanceService.sendActivationCodeForAdvancePayment(
+ patientID: patientID, projectID: projectID);
if (_myBalanceService.hasError) {
error = _myBalanceService.error;
setState(ViewState.ErrorLocal);
@@ -126,9 +138,12 @@ class MyBalanceViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
}
- Future checkActivationCodeForAdvancePayment({String activationCode}) async {
+
+ Future checkActivationCodeForAdvancePayment(
+ {String activationCode, String patientMobileNumber}) async {
setState(ViewState.Busy);
- await _myBalanceService.checkActivationCodeForAdvancePayment(activationCode: activationCode);
+ await _myBalanceService.checkActivationCodeForAdvancePayment(
+ activationCode: activationCode);
if (_myBalanceService.hasError) {
error = _myBalanceService.error;
setState(ViewState.ErrorLocal);
diff --git a/lib/core/viewModels/medical/prescriptions_view_model.dart b/lib/core/viewModels/medical/prescriptions_view_model.dart
index 27b954d4..054dc4ef 100644
--- a/lib/core/viewModels/medical/prescriptions_view_model.dart
+++ b/lib/core/viewModels/medical/prescriptions_view_model.dart
@@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_repor
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_enh.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
+import 'package:flutter/cupertino.dart';
import '../../../core/enum/filter_type.dart';
import '../../../core/enum/viewstate.dart';
@@ -102,9 +103,9 @@ class PrescriptionsViewModel extends BaseViewModel {
notifyListeners();
}
- getPrescriptionReport({int dischargeNo}) async {
+ getPrescriptionReport({int dischargeNo,int projectId,int clinicID,String setupID,int episodeID}) async {
setState(ViewState.Busy);
- await _prescriptionsService.getPrescriptionReport(dischargeNo: dischargeNo);
+ await _prescriptionsService.getPrescriptionReport(dischargeNo: dischargeNo,projectId: projectId,clinicID: clinicID,setupID: setupID,episodeID: episodeID);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.ErrorLocal);
@@ -157,4 +158,16 @@ class PrescriptionsViewModel extends BaseViewModel {
}
}
+
+ Future updatePressOrder({@required int presOrderID}) async {
+ setState(ViewState.Busy);
+ await _prescriptionsService.updatePressOrder(presOrderID: presOrderID);
+ if (_prescriptionsService.hasError) {
+ error = _prescriptionsService.error;
+ setState(ViewState.Error);
+ } else {
+ await getPrescriptions();
+ }
+ }
+
}
diff --git a/lib/core/viewModels/notifications_view_model.dart b/lib/core/viewModels/notifications_view_model.dart
new file mode 100644
index 00000000..ac09e3b2
--- /dev/null
+++ b/lib/core/viewModels/notifications_view_model.dart
@@ -0,0 +1,40 @@
+import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
+import 'package:diplomaticquarterapp/core/model/notifications/get_notifications_request_model.dart';
+import 'package:diplomaticquarterapp/core/model/notifications/get_notifications_response_model.dart';
+import 'package:diplomaticquarterapp/core/model/notifications/mark_message_as_read_request_model.dart';
+import 'package:diplomaticquarterapp/core/service/notifications_service.dart';
+import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
+import 'package:flutter/material.dart';
+
+import '../../locator.dart';
+import 'base_view_model.dart';
+
+class NotificationViewModel extends BaseViewModel {
+ NotificationService _notificationService = locator();
+
+ List get notifications =>
+ _notificationService.notificationsList;
+
+ Future getNotifications(
+ GetNotificationsRequestModel getNotificationsRequestModel, BuildContext context) async {
+ if(getNotificationsRequestModel.currentPage == 0)
+ setState(ViewState.Busy);
+
+ await _notificationService
+ .getAllNotifications(getNotificationsRequestModel);
+ if (_notificationService.hasError) {
+ error = _notificationService.error;
+ setState(ViewState.Error);
+ } else {
+ setState(ViewState.Idle);
+ }
+ }
+
+ Future markAsRead(id) async {
+ // setState(ViewState.Busy);
+ MarkMessageAsReadRequestModel markMessageAsReadRequestModel =
+ new MarkMessageAsReadRequestModel(notificationPoolID: id);
+ await _notificationService.markAsRead(markMessageAsReadRequestModel);
+ setState(ViewState.Idle);
+ }
+}
\ No newline at end of file
diff --git a/lib/core/viewModels/project_view_model.dart b/lib/core/viewModels/project_view_model.dart
index 407c181b..e65a70f7 100644
--- a/lib/core/viewModels/project_view_model.dart
+++ b/lib/core/viewModels/project_view_model.dart
@@ -12,32 +12,36 @@ import 'package:flutter_datetime_picker/flutter_datetime_picker.dart';
class ProjectViewModel extends BaseViewModel {
// Platform Bridge
PlatformBridge platformBridge() {
- return PlatformBridge();
+ return PlatformBridge.shared();
}
AppSharedPreferences sharedPref = AppSharedPreferences();
- Locale _appLocale;
- String currentLanguage = 'en';
+ Locale _appLocale = Locale('ar');
+ String currentLanguage = 'ar';
bool _isArabic = false;
bool isInternetConnection = true;
bool isLoading = false;
bool isError = false;
String error = '';
dynamic searchvalue;
+ bool isLogin = false;
+
dynamic get searchValue => searchvalue;
+
Locale get appLocal => _appLocale;
LocaleType get localeType => isArabic ? LocaleType.en : LocaleType.ar;
+
bool get isArabic => _isArabic;
+
// BaseViewModel baseViewModel = locator()
StreamSubscription subscription;
ProjectViewModel() {
+ // PlatformBridge.init(context); // Moved to 'main.dart' due to context availability
loadSharedPrefLanguage();
- subscription = Connectivity()
- .onConnectivityChanged
- .listen((ConnectivityResult result) {
+ subscription = Connectivity().onConnectivityChanged.listen((ConnectivityResult result) {
switch (result) {
case ConnectivityResult.wifi:
isInternetConnection = true;
@@ -54,13 +58,9 @@ class ProjectViewModel extends BaseViewModel {
}
void loadSharedPrefLanguage() async {
- currentLanguage = await sharedPref.getString(APP_LANGUAGE);
- _appLocale = Locale(currentLanguage ?? 'en');
- _isArabic = currentLanguage != null
- ? currentLanguage == 'ar'
- ? true
- : false
- : true;
+ currentLanguage = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
+ _appLocale = Locale(currentLanguage);
+ _isArabic = currentLanguage == 'ar';
notifyListeners();
}
diff --git a/lib/core/viewModels/qr_view_model.dart b/lib/core/viewModels/qr_view_model.dart
index 03c88462..9833d6c8 100644
--- a/lib/core/viewModels/qr_view_model.dart
+++ b/lib/core/viewModels/qr_view_model.dart
@@ -1,11 +1,11 @@
import 'dart:convert';
-
-// import 'package:barcode_scan/platform_wrapper.dart';
+import 'package:barcode_scan_fix/barcode_scan.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/qr/qr_parking_model.dart';
import 'package:diplomaticquarterapp/core/service/qr_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
+
import '../../locator.dart';
class QrViewModel extends BaseViewModel {
@@ -15,25 +15,25 @@ class QrViewModel extends BaseViewModel {
readQr() async {
//TODO fix the barcode scan
- // var result = await BarcodeScanner.scan();
- // var data = json.decode(result.rawContent);
- // var qRParkingID = data['QRParkingID'];
- // setState(ViewState.BusyLocal);
- // await _qrService.getQRParkingByID(qRParkingID);
- // if (_qrService.hasError) {
- // error = _qrService.error;
- // setState(ViewState.ErrorLocal);
- // } else {
- // if (_qrService.qRParkingList.length > 0) {
- // qrParkingModel = _qrService.qRParkingList[0];
- // await sharedPref.setObject(IS_GO_TO_PARKING, qrParkingModel);
- // isSavePark = true;
- // setState(ViewState.Idle);
- // } else {
- // error = "Invalid Qr Code";
- // setState(ViewState.ErrorLocal);
- // }
- // }
+ String result = await BarcodeScanner.scan();
+ var data = json.decode(result);
+ var qRParkingID = data['QRParkingID'];
+ setState(ViewState.BusyLocal);
+ await _qrService.getQRParkingByID(qRParkingID);
+ if (_qrService.hasError) {
+ error = _qrService.error;
+ setState(ViewState.ErrorLocal);
+ } else {
+ if (_qrService.qRParkingList.length > 0) {
+ qrParkingModel = _qrService.qRParkingList[0];
+ await sharedPref.setObject(IS_GO_TO_PARKING, qrParkingModel);
+ isSavePark = true;
+ setState(ViewState.Idle);
+ } else {
+ error = "Invalid Qr Code";
+ setState(ViewState.ErrorLocal);
+ }
+ }
}
getIsSaveParking() async {
diff --git a/lib/d_q_icons_icons.dart b/lib/d_q_icons_icons.dart
index 040e6e08..c3b64559 100644
--- a/lib/d_q_icons_icons.dart
+++ b/lib/d_q_icons_icons.dart
@@ -30,16 +30,13 @@ class DQIcons {
static const IconData thermometer = IconData(0xe806, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData weight_scale = IconData(0xe807, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData parking_icon = IconData(0xe808, fontFamily: _kFontFam, fontPackage: _kFontPkg);
- static const IconData more_menu_icon = IconData(0xe809, fontFamily: _kFontFam, fontPackage: _kFontPkg);
- static const IconData offer_icon = IconData(0xe80a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
- static const IconData prescription_icon = IconData(0xe80b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
- static const IconData search_scan_icon = IconData(0xe80c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
- static const IconData share_icon = IconData(0xe80d, fontFamily: _kFontFam, fontPackage: _kFontPkg);
- static const IconData wishlist_add_icon = IconData(0xe80e, fontFamily: _kFontFam, fontPackage: _kFontPkg);
- static const IconData wishlist_icon = IconData(0xe80f, fontFamily: _kFontFam, fontPackage: _kFontPkg);
- static const IconData bg_1 = IconData(0xe810, fontFamily: _kFontFam, fontPackage: _kFontPkg);
- static const IconData bg_2 = IconData(0xe811, fontFamily: _kFontFam, fontPackage: _kFontPkg);
- static const IconData bg_3 = IconData(0xe812, fontFamily: _kFontFam, fontPackage: _kFontPkg);
- static const IconData bg_4 = IconData(0xe813, fontFamily: _kFontFam, fontPackage: _kFontPkg);
- static const IconData medication_icon = IconData(0xe814, fontFamily: _kFontFam, fontPackage: _kFontPkg);
+ static const IconData blood_type_icon = IconData(0xe809, fontFamily: _kFontFam, fontPackage: _kFontPkg);
+ static const IconData height_icon = IconData(0xe80a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
+ static const IconData online_payment_icon = IconData(0xe80b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
+ static const IconData search_medicine_icon = IconData(0xe80c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
+ static const IconData vital_sign_icon = IconData(0xe80d, fontFamily: _kFontFam, fontPackage: _kFontPkg);
+ static const IconData weight_icon = IconData(0xe80e, fontFamily: _kFontFam, fontPackage: _kFontPkg);
+ static const IconData my_medical_file = IconData(0xe80f, fontFamily: _kFontFam, fontPackage: _kFontPkg);
+ static const IconData family = IconData(0xe810, fontFamily: _kFontFam, fontPackage: _kFontPkg);
+ static const IconData calendar__2_ = IconData(0xe811, fontFamily: _kFontFam, fontPackage: _kFontPkg);
}
diff --git a/lib/locator.dart b/lib/locator.dart
index a7352b47..6b7bb076 100644
--- a/lib/locator.dart
+++ b/lib/locator.dart
@@ -43,6 +43,7 @@ import 'core/service/medical/radiology_service.dart';
import 'core/service/medical/reports_monthly_service.dart';
import 'core/service/medical/vital_sign_service.dart';
import 'core/service/parmacyModule/order-preview-service.dart';
+import 'core/service/notifications_service.dart';
import 'core/viewModels/AlHabibMedicalService/cmc_view_model.dart';
import 'core/service/parmacyModule/parmacy_module_service.dart';
@@ -77,6 +78,7 @@ import 'core/viewModels/medical/reports_monthly_view_model.dart';
import 'core/viewModels/medical/vital_sign_view_model.dart';
import 'core/viewModels/medical/reports_view_model.dart';
import 'core/viewModels/medical/weight_pressure_view_model.dart';
+import 'core/viewModels/notifications_view_model.dart';
import 'core/viewModels/pharmacies_view_model.dart';
import 'core/service/pharmacies_service.dart';
import 'core/service/insurance_service.dart';
@@ -115,8 +117,6 @@ void setupLocator() {
locator.registerLazySingleton(() => EReferralService());
locator.registerLazySingleton(() => HomeHealthCareService());
locator.registerLazySingleton(() => CMCService());
-
-
locator.registerLazySingleton(() => PatientSickLeaveService());
locator.registerLazySingleton(() => MyBalanceService());
locator.registerLazySingleton(() => BloodSugarService());
@@ -129,7 +129,6 @@ void setupLocator() {
locator.registerLazySingleton(() => FindusService());
locator.registerLazySingleton(() => LiveChatService());
locator.registerLazySingleton(() => H2OService());
-
locator.registerLazySingleton(() => BloodDonationService());
locator.registerLazySingleton(() => BloodDetailsService());
locator.registerLazySingleton(() => ChildVaccinesService());
@@ -138,6 +137,7 @@ void setupLocator() {
locator.registerLazySingleton(() => DeleteBabyService());
locator.registerLazySingleton(() => VaccinationTableService());
+ locator.registerLazySingleton(() => NotificationService());
locator.registerLazySingleton(() => PharmacyModuleService());
@@ -173,9 +173,6 @@ void setupLocator() {
locator.registerFactory(() => ChildVaccinesViewModel());
locator.registerFactory(() => UserInformationViewModel());
locator.registerFactory(() => VaccinationTableViewModel());
-
-
-
locator.registerFactory(() => AddNewChildViewModel());
locator.registerFactory(() => H2OViewModel());
locator.registerFactory(() => BloodSugarViewMode());
@@ -188,6 +185,7 @@ void setupLocator() {
locator.registerFactory(() => AllergiesViewModel());
locator.registerFactory(() => HomeHealthCareViewModel());
locator.registerFactory(() => CMCViewModel());
+ locator.registerFactory(() => NotificationViewModel());
diff --git a/lib/main.dart b/lib/main.dart
index 9597f72b..83492d81 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -1,30 +1,30 @@
+import 'package:diplomaticquarterapp/theme/theme_notifier.dart';
+import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/routes.dart';
+import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
+import 'package:diplomaticquarterapp/services/robo_search/search_provider.dart';
+import 'package:diplomaticquarterapp/theme/theme_value.dart';
+import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
-import 'package:diplomaticquarterapp/services/robo_search/search_provider.dart';
+
import 'config/size_config.dart';
import 'core/viewModels/project_view_model.dart';
import 'locator.dart';
-import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
-
-@pragma('vm:entry-point')
-void customMainDartMethod() {
- setupLocator();
- runApp(MyApp());
-}
void main() async {
setupLocator();
- runApp(MyApp());
+ runApp(ChangeNotifierProvider(create: (context) => ThemeNotifier(defaultTheme), child: MyApp()));
}
class MyApp extends StatelessWidget {
- /// static final _myTabbedPageKey = new GlobalKey<_LandingPageState>();
@override
Widget build(BuildContext context) {
+ PlatformBridge.init(context);
+
return LayoutBuilder(
builder: (context, constraints) {
return OrientationBuilder(
@@ -35,8 +35,8 @@ class MyApp extends StatelessWidget {
ChangeNotifierProvider(
create: (context) => ProjectViewModel(),
),
- ChangeNotifierProvider(
- create: (context) => SearchProvider()),
+ ChangeNotifierProvider(create: (context) => ToDoCountProviderModel()),
+ ChangeNotifierProvider(create: (context) => SearchProvider()),
ChangeNotifierProvider.value(
value: SearchProvider(),
),
@@ -54,6 +54,7 @@ class MyApp extends StatelessWidget {
TranslationBaseDelegate(),
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
+ GlobalCupertinoLocalizations.delegate,
],
supportedLocales: [
const Locale('ar', ''), // Arabic
@@ -73,8 +74,7 @@ class MyApp extends StatelessWidget {
hintColor: Colors.grey[400],
disabledColor: Colors.grey[300],
errorColor: Color.fromRGBO(235, 80, 60, 1.0),
- scaffoldBackgroundColor:
- HexColor('#E9E9E9'), // Colors.grey[100],
+ scaffoldBackgroundColor: Color(0xffE9E9E9), // Colors.grey[100],
textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5),
textSelectionHandleColor: Colors.grey,
canvasColor: Colors.white,
@@ -82,8 +82,7 @@ class MyApp extends StatelessWidget {
highlightColor: Colors.grey[100].withOpacity(0.4),
splashColor: Colors.transparent,
primaryColor: Colors.grey,
- bottomSheetTheme: BottomSheetThemeData(
- backgroundColor: HexColor('#E0E0E0')),
+ bottomSheetTheme: BottomSheetThemeData(backgroundColor: HexColor('#E0E0E0')),
cursorColor: Colors.grey,
iconTheme: IconThemeData(),
appBarTheme: AppBarTheme(
@@ -95,7 +94,7 @@ class MyApp extends StatelessWidget {
),
),
),
- initialRoute: HOME,
+ initialRoute: SPLASH,
routes: routes,
debugShowCheckedModeBanner: false,
),
diff --git a/lib/models/Appointments/toDoCountProviderModel.dart b/lib/models/Appointments/toDoCountProviderModel.dart
new file mode 100644
index 00000000..0fd83491
--- /dev/null
+++ b/lib/models/Appointments/toDoCountProviderModel.dart
@@ -0,0 +1,12 @@
+import 'package:flutter/cupertino.dart';
+
+class ToDoCountProviderModel with ChangeNotifier {
+ int _count;
+
+ int get count => _count == null ? 0 : _count;
+
+ void setState(int count) {
+ _count = count;
+ notifyListeners();
+ }
+}
diff --git a/lib/models/Authentication/authenticated_user.dart b/lib/models/Authentication/authenticated_user.dart
index efccc068..4c7974a3 100644
--- a/lib/models/Authentication/authenticated_user.dart
+++ b/lib/models/Authentication/authenticated_user.dart
@@ -60,6 +60,7 @@ class AuthenticatedUser {
dynamic strDateofBirth;
dynamic tempAddress;
dynamic zipCode;
+ dynamic isFamily;
// dynamic patientPayType;
// dynamic patientType;
// dynamic status;
@@ -123,6 +124,7 @@ class AuthenticatedUser {
this.strDateofBirth,
this.tempAddress,
this.zipCode,
+ this.isFamily
});
AuthenticatedUser.fromJson(Map json) {
@@ -190,6 +192,7 @@ class AuthenticatedUser {
strDateofBirth = json['StrDateofBirth'];
tempAddress = json['TempAddress'];
zipCode = json['ZipCode'];
+ isFamily = json['IsFamily'];
}
Map toJson() {
@@ -255,7 +258,7 @@ class AuthenticatedUser {
data['StrDateofBirth'] = this.strDateofBirth;
data['TempAddress'] = this.tempAddress;
data['ZipCode'] = this.zipCode;
-
+ data['IsFamily'] = this.isFamily;
return data;
}
}
diff --git a/lib/models/Authentication/check_activation_code_request.dart b/lib/models/Authentication/check_activation_code_request.dart
index a4bf79c3..af139ba5 100644
--- a/lib/models/Authentication/check_activation_code_request.dart
+++ b/lib/models/Authentication/check_activation_code_request.dart
@@ -2,7 +2,7 @@ class CheckActivationCodeReq {
int patientMobileNumber;
String mobileNo;
String deviceToken;
- int projectOutSA;
+ bool projectOutSA;
int loginType;
String zipCode;
bool isRegister;
diff --git a/lib/models/Authentication/register_user_requet.dart b/lib/models/Authentication/register_user_requet.dart
index ebefcfcf..7758ce5b 100644
--- a/lib/models/Authentication/register_user_requet.dart
+++ b/lib/models/Authentication/register_user_requet.dart
@@ -76,6 +76,9 @@ class Patientobject {
String firstName;
String middleName;
String lastName;
+ String firstNameN;
+ String middleNameN;
+ String lastNameN;
dynamic strDateofBirth;
String dateofBirth;
int gender;
@@ -93,8 +96,11 @@ class Patientobject {
this.mobileNumber,
this.patientOutSA,
this.firstName,
- this.middleName,
- this.lastName,
+ this.middleName,
+ this.lastName,
+ this.firstNameN,
+ this.middleNameN,
+ this.lastNameN,
this.strDateofBirth,
this.dateofBirth,
this.gender,
@@ -114,6 +120,9 @@ class Patientobject {
firstName = json['FirstName'];
middleName = json['MiddleName'];
lastName = json['LastName'];
+ firstNameN = json['FirstNameN'];
+ middleNameN = json['MiddleNameN'];
+ lastNameN = json['LastNameN'];
strDateofBirth = json['StrDateofBirth'];
dateofBirth = json['DateofBirth'];
gender = json['Gender'];
@@ -136,6 +145,9 @@ class Patientobject {
data['FirstName'] = this.firstName;
data['MiddleName'] = this.middleName;
data['LastName'] = this.lastName;
+ data['FirstNameN'] = this.firstNameN;
+ data['MiddleNameN'] = this.middleNameN;
+ data['LastNameN'] = this.lastNameN;
data['StrDateofBirth'] = this.strDateofBirth;
data['DateofBirth'] = this.dateofBirth;
data['Gender'] = this.gender;
diff --git a/lib/models/Authentication/send_activation_request.dart b/lib/models/Authentication/send_activation_request.dart
index 804f6ef0..b53e19b8 100644
--- a/lib/models/Authentication/send_activation_request.dart
+++ b/lib/models/Authentication/send_activation_request.dart
@@ -2,7 +2,7 @@ class SendActivationRequest {
int patientMobileNumber;
String mobileNo;
String deviceToken;
- int projectOutSA;
+ bool projectOutSA;
int loginType;
String zipCode;
bool isRegister;
diff --git a/lib/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart b/lib/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart
index da848b65..b21d940f 100644
--- a/lib/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart
+++ b/lib/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart
@@ -1,68 +1,68 @@
class GetAllSharedRecordsByStatusResponse {
- Null date;
+ dynamic date;
int languageID;
int serviceName;
- Null time;
- Null androidLink;
- Null authenticationTokenID;
- Null data;
+ dynamic time;
+ dynamic androidLink;
+ dynamic authenticationTokenID;
+ dynamic data;
bool dataw;
int dietType;
- Null errorCode;
- Null errorEndUserMessage;
- Null errorEndUserMessageN;
- Null errorMessage;
+ dynamic errorCode;
+ dynamic errorEndUserMessage;
+ dynamic errorEndUserMessageN;
+ dynamic errorMessage;
int errorType;
int foodCategory;
- Null iOSLink;
+ dynamic iOSLink;
bool isAuthenticated;
int mealOrderStatus;
int mealType;
int messageStatus;
int numberOfResultRecords;
- Null patientBlodType;
- Null successMsg;
- Null successMsgN;
- Null doctorInformationList;
- Null getAllPendingRecordsList;
+ dynamic patientBlodType;
+ dynamic successMsg;
+ dynamic successMsgN;
+ dynamic doctorInformationList;
+ List getAllPendingRecordsList;
List getAllSharedRecordsByStatusList;
- Null getResponseFileList;
+ List getResponseFileList;
bool isHMGPatient;
bool isLoginSuccessfully;
bool isNeedUpdateIdintificationNo;
bool kioskSendSMS;
- Null list;
- Null listAskHabibMobileLoginInfo;
- Null listAskHabibPatientFile;
- Null listMergeFiles;
- Null listMobileLoginInfo;
- Null listPatientCount;
- Null logInTokenID;
- Null mohemmPrivilegeList;
+ dynamic list;
+ dynamic listAskHabibMobileLoginInfo;
+ dynamic listAskHabibPatientFile;
+ dynamic listMergeFiles;
+ dynamic listMobileLoginInfo;
+ dynamic listPatientCount;
+ dynamic logInTokenID;
+ dynamic mohemmPrivilegeList;
int pateintID;
- Null patientBloodType;
- Null patientERDriverFile;
- Null patientERDriverFileList;
+ dynamic patientBloodType;
+ dynamic patientERDriverFile;
+ dynamic patientERDriverFileList;
bool patientHasFile;
- Null patientMergedIDs;
+ dynamic patientMergedIDs;
bool patientOutSA;
int patientShareRequestID;
int patientType;
int projectIDOut;
- Null returnMessage;
+ dynamic returnMessage;
bool sMSLoginRequired;
- Null servicePrivilegeList;
- Null sharePatientName;
- Null verificationCode;
- Null email;
- Null errorList;
+ dynamic servicePrivilegeList;
+ dynamic sharePatientName;
+ dynamic verificationCode;
+ dynamic email;
+ dynamic errorList;
bool hasFile;
bool isActiveCode;
bool isMerged;
bool isNeedUserAgreement;
bool isSMSSent;
- Null memberList;
- Null message;
+ dynamic memberList;
+ dynamic message;
int statusCode;
GetAllSharedRecordsByStatusResponse(
@@ -133,78 +133,92 @@ class GetAllSharedRecordsByStatusResponse {
this.statusCode});
GetAllSharedRecordsByStatusResponse.fromJson(Map json) {
- date = json['Date'];
- languageID = json['LanguageID'];
- serviceName = json['ServiceName'];
- time = json['Time'];
- androidLink = json['AndroidLink'];
- authenticationTokenID = json['AuthenticationTokenID'];
- data = json['Data'];
- dataw = json['Dataw'];
- dietType = json['DietType'];
- errorCode = json['ErrorCode'];
- errorEndUserMessage = json['ErrorEndUserMessage'];
- errorEndUserMessageN = json['ErrorEndUserMessageN'];
- errorMessage = json['ErrorMessage'];
- errorType = json['ErrorType'];
- foodCategory = json['FoodCategory'];
- iOSLink = json['IOSLink'];
- isAuthenticated = json['IsAuthenticated'];
- mealOrderStatus = json['MealOrderStatus'];
- mealType = json['MealType'];
- messageStatus = json['MessageStatus'];
- numberOfResultRecords = json['NumberOfResultRecords'];
- patientBlodType = json['PatientBlodType'];
- successMsg = json['SuccessMsg'];
- successMsgN = json['SuccessMsgN'];
- doctorInformationList = json['DoctorInformation_List'];
- getAllPendingRecordsList = json['GetAllPendingRecordsList'];
- if (json['GetAllSharedRecordsByStatusList'] != null) {
- getAllSharedRecordsByStatusList =
- new List();
- json['GetAllSharedRecordsByStatusList'].forEach((v) {
- getAllSharedRecordsByStatusList
- .add(new GetAllSharedRecordsByStatusList.fromJson(v));
- });
+ try {
+ date = json['Date'];
+ languageID = json['LanguageID'];
+ serviceName = json['ServiceName'];
+ time = json['Time'];
+ androidLink = json['AndroidLink'];
+ authenticationTokenID = json['AuthenticationTokenID'];
+ data = json['Data'];
+ dataw = json['Dataw'];
+ dietType = json['DietType'];
+ errorCode = json['ErrorCode'];
+ errorEndUserMessage = json['ErrorEndUserMessage'];
+ errorEndUserMessageN = json['ErrorEndUserMessageN'];
+ errorMessage = json['ErrorMessage'];
+ errorType = json['ErrorType'];
+ foodCategory = json['FoodCategory'];
+ iOSLink = json['IOSLink'];
+ isAuthenticated = json['IsAuthenticated'];
+ mealOrderStatus = json['MealOrderStatus'];
+ mealType = json['MealType'];
+ messageStatus = json['MessageStatus'];
+ numberOfResultRecords = json['NumberOfResultRecords'];
+ patientBlodType = json['PatientBlodType'];
+ successMsg = json['SuccessMsg'];
+ successMsgN = json['SuccessMsgN'];
+ doctorInformationList = json['DoctorInformation_List'];
+// getAllPendingRecordsList = json['GetAllPendingRecordsList'];
+
+ if (json['GetAllPendingRecordsList'] != null) {
+ getAllSharedRecordsByStatusList = new List();
+ json['GetAllPendingRecordsList'].forEach((v) {
+ getAllSharedRecordsByStatusList
+ .add(new GetAllSharedRecordsByStatusList.fromJson(v));
+ });
+ }
+
+ if (json['GetAllSharedRecordsByStatusList'] != null) {
+ getAllSharedRecordsByStatusList = new List();
+ json['GetAllSharedRecordsByStatusList'].forEach((v) {
+ getAllSharedRecordsByStatusList
+ .add(new GetAllSharedRecordsByStatusList.fromJson(v));
+ });
+ }
+ getResponseFileList = json['GetResponseFileList'];
+ isHMGPatient = json['IsHMGPatient'];
+ isLoginSuccessfully = json['IsLoginSuccessfully'];
+ isNeedUpdateIdintificationNo = json['IsNeedUpdateIdintificationNo'];
+ kioskSendSMS = json['KioskSendSMS'];
+ list = json['List'];
+ listAskHabibMobileLoginInfo = json['List_AskHabibMobileLoginInfo'];
+ listAskHabibPatientFile = json['List_AskHabibPatientFile'];
+ listMergeFiles = json['List_MergeFiles'];
+ listMobileLoginInfo = json['List_MobileLoginInfo'];
+ listPatientCount = json['List_PatientCount'];
+ logInTokenID = json['LogInTokenID'];
+ mohemmPrivilegeList = json['MohemmPrivilege_List'];
+ pateintID = json['PateintID'];
+ patientBloodType = json['PatientBloodType'];
+ patientERDriverFile = json['PatientER_DriverFile'];
+ patientERDriverFileList = json['PatientER_DriverFileList'];
+ patientHasFile = json['PatientHasFile'];
+ patientMergedIDs = json['PatientMergedIDs'];
+ patientOutSA = json['PatientOutSA'];
+ patientShareRequestID = json['PatientShareRequestID'];
+ patientType = json['PatientType'];
+ projectIDOut = json['ProjectIDOut'];
+ returnMessage = json['ReturnMessage'];
+ sMSLoginRequired = json['SMSLoginRequired'];
+ servicePrivilegeList = json['ServicePrivilege_List'];
+ sharePatientName = json['SharePatientName'];
+ verificationCode = json['VerificationCode'];
+ email = json['email'];
+ errorList = json['errorList'];
+ hasFile = json['hasFile'];
+ isActiveCode = json['isActiveCode'];
+ isMerged = json['isMerged'];
+ isNeedUserAgreement = json['isNeedUserAgreement'];
+ isSMSSent = json['isSMSSent'];
+ memberList = json['memberList'];
+ message = json['message'];
+ statusCode = json['statusCode'];
+ }catch (e){
+ var asd ="";
+ print(e);
+
}
- getResponseFileList = json['GetResponseFileList'];
- isHMGPatient = json['IsHMGPatient'];
- isLoginSuccessfully = json['IsLoginSuccessfully'];
- isNeedUpdateIdintificationNo = json['IsNeedUpdateIdintificationNo'];
- kioskSendSMS = json['KioskSendSMS'];
- list = json['List'];
- listAskHabibMobileLoginInfo = json['List_AskHabibMobileLoginInfo'];
- listAskHabibPatientFile = json['List_AskHabibPatientFile'];
- listMergeFiles = json['List_MergeFiles'];
- listMobileLoginInfo = json['List_MobileLoginInfo'];
- listPatientCount = json['List_PatientCount'];
- logInTokenID = json['LogInTokenID'];
- mohemmPrivilegeList = json['MohemmPrivilege_List'];
- pateintID = json['PateintID'];
- patientBloodType = json['PatientBloodType'];
- patientERDriverFile = json['PatientER_DriverFile'];
- patientERDriverFileList = json['PatientER_DriverFileList'];
- patientHasFile = json['PatientHasFile'];
- patientMergedIDs = json['PatientMergedIDs'];
- patientOutSA = json['PatientOutSA'];
- patientShareRequestID = json['PatientShareRequestID'];
- patientType = json['PatientType'];
- projectIDOut = json['ProjectIDOut'];
- returnMessage = json['ReturnMessage'];
- sMSLoginRequired = json['SMSLoginRequired'];
- servicePrivilegeList = json['ServicePrivilege_List'];
- sharePatientName = json['SharePatientName'];
- verificationCode = json['VerificationCode'];
- email = json['email'];
- errorList = json['errorList'];
- hasFile = json['hasFile'];
- isActiveCode = json['isActiveCode'];
- isMerged = json['isMerged'];
- isNeedUserAgreement = json['isNeedUserAgreement'];
- isSMSSent = json['isSMSSent'];
- memberList = json['memberList'];
- message = json['message'];
- statusCode = json['statusCode'];
}
Map toJson() {
@@ -287,7 +301,7 @@ class GetAllSharedRecordsByStatusList {
int responseID;
int regionID;
int status;
- Null isActive;
+ dynamic isActive;
String editedOn;
String createdOn;
String emaiLAddress;
diff --git a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart
index ea98921d..7e3d4181 100644
--- a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart
+++ b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart
@@ -10,9 +10,10 @@ import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/parking_page.da
import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart';
import 'package:diplomaticquarterapp/pages/ChildVaccines/child_vaccines_page.dart';
+import 'package:diplomaticquarterapp/pages/ContactUs/findus/findus_page.dart';
+import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart';
import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
-import 'package:diplomaticquarterapp/pages/family/my-family.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
@@ -22,6 +23,7 @@ import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/services)contaniner.dart';
+import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
@@ -29,6 +31,11 @@ import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';
class AllHabibMedicalService extends StatefulWidget {
+ //TODO
+ final Function goToMyProfile;
+
+ AllHabibMedicalService({Key key, this.goToMyProfile});
+
@override
_AllHabibMedicalServiceState createState() => _AllHabibMedicalServiceState();
}
@@ -60,61 +67,63 @@ class _AllHabibMedicalServiceState extends State {
shrinkWrap: true,
children: [
Container(
+ margin: EdgeInsets.all(8),
width: double.infinity,
- height: 190,
+ height: 150,
decoration: BoxDecoration(
- image: DecorationImage(
- image: ExactAssetImage('assets/images/timeline_bg.png'),
- fit: BoxFit.cover,
- ),
- ),
+ image: DecorationImage(
+ image: ExactAssetImage('assets/images/Weather_img.png'),
+ fit: BoxFit.cover,
+ ),
+ borderRadius: BorderRadius.circular(8.0)),
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 10.0),
- child: Column(
- mainAxisAlignment: MainAxisAlignment.center,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Text(
- 'Health Weather Indicators',
- style: TextStyle(
+ child: Row(
+ children: [
+ Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Texts(
+ TranslationBase.of(context)
+ .healthWeatherIndicators,
color: Colors.white,
- fontSize: 22.0,
fontWeight: FontWeight.w600,
),
- ),
- SizedBox(
- height: 35.0,
- ),
- Text(
- 'Health Tips Based On Current Weather',
- style: TextStyle(
+ Texts(
+ TranslationBase.of(context).healthTipsBasedOnCurrentWeather,
color: Colors.white,
+ fontSize: 14,
),
+ ],
+ ),
+ Expanded(
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.spaceAround,
+ children: [
+ Image.asset('assets/images/Weather_ico.png',width: 80,height: 80,),
+ Texts(
+ TranslationBase.of(context).moreDetails,
+ color: Colors.white,
+ decoration: TextDecoration.underline,
+ ),
+ ],
),
- ]),
+ )
+ ],
+ ),
),
),
ServicesContainer(
- onTap: () => Navigator.push(
- context,
- FadePage(
- page: MedicalProfilePage(),
- ),
- ),
+ onTap: () {
+ Navigator.pop(context);
+ widget.goToMyProfile();
+ },
imageLocation:
'assets/images/new-design/my_file_bottom_bar.png',
title: TranslationBase.of(context).myMedicalFile,
),
- ServicesContainer(
- onTap: () => Navigator.push(
- context,
- FadePage(
- page: LiveCareHome(),
- ),
- ),
- imageLocation: 'assets/images/new-design/liveCare_ar_bg.png',
- title: TranslationBase.of(context).livecare,
- ),
+
ServicesContainer(
onTap: () => Navigator.push(
context,
@@ -139,15 +148,7 @@ class _AllHabibMedicalServiceState extends State {
'assets/images/al-habib_online_payment_service_icon.png',
title: TranslationBase.of(context).onlinePaymentService,
),
- ServicesContainer(
- onTap: () => Navigator.push(
- context,
- FadePage(),
- ),
- imageLocation:
- 'assets/images/al-habib_online_payment_service_icon.png',
- title: 'Covid-19- Drive-Thru Test',
- ),
+
ServicesContainer(
onTap: () {
Navigator.push(
@@ -162,37 +163,7 @@ class _AllHabibMedicalServiceState extends State {
imageLocation: 'assets/images/emergency_service_image.png',
title: TranslationBase.of(context).emergencyService,
),
- ServicesContainer(
- onTap: () => Navigator.push(
- context,
- FadePage(
- page: ParkingPage(),
- ),
- ),
- imageLocation: 'assets/images/pharmacy_logo.png',
- title: 'Pharmacy'),
- ServicesContainer(
- onTap: () => Navigator.push(
- context,
- FadePage(
- page: InsuranceUpdate(),
- ),
- ),
- imageLocation:
- 'assets/images/medical/insurance_card_icon.png',
- title: TranslationBase.of(context).updateInsurance,
- ),
- ServicesContainer(
- onTap: () => Navigator.push(
- context,
- FadePage(
- page: authUser.patientID == null
- ? EReferralIndexPage()
- : EReferralPage()),
- ),
- imageLocation: 'assets/images/ereferral_service_icon.png',
- title: 'E-Referral',
- ),
+
ServicesContainer(
onTap: () => Navigator.push(
context,
@@ -204,15 +175,7 @@ class _AllHabibMedicalServiceState extends State {
'assets/images/new-design/family_menu_icon_red.png',
title: 'My Family',
),
- ServicesContainer(
- onTap: () => Navigator.push(
- context,
- FadePage(page: ChildVaccinesPage()),
- ),
- imageLocation:
- 'assets/images/new-design/children_vaccines_icon.png',
- title: 'Child Vaccines',
- ),
+
ServicesContainer(
onTap: () => Navigator.push(
context,
@@ -224,61 +187,7 @@ class _AllHabibMedicalServiceState extends State {
'assets/images/new-design/upcoming_icon_bottom_bar.png',
title: TranslationBase.of(context).todoList,
),
- ServicesContainer(
- onTap: () => Navigator.push(
- context,
- FadePage(page: SymptomInfo()),
- ),
- imageLocation: 'assets/images/new-design/body_icon.png',
- title: 'Symptom Checker'),
- ServicesContainer(
- onTap: () => Navigator.push(
- context,
- FadePage(page: BloodDonationPage()),
- ),
- imageLocation: 'assets/images/new-design/blood_icon.png',
- title: 'Blood Donation',
- ),
- ServicesContainer(
- onTap: () => Navigator.push(
- context,
- FadePage(
- page: (HealthCalculators()),
- ),
- ),
- imageLocation:
- 'assets/images/new-design/health_calculator_icon.png',
- title: 'Health Calculators',
- ),
- ServicesContainer(
- onTap: () => Navigator.push(
- context,
- FadePage(
- page: HealthConverter(),
- ),
- ),
- imageLocation:
- 'assets/images/new-design/health_convertor_icon.png',
- title: 'Health Converter',
- ),
- ServicesContainer(
- onTap: () => Navigator.push(
- context,
- FadePage(
- page: H2OPageIndexPage(),
- ),
- ),
- imageLocation: 'assets/images/new-design/water_icon.png',
- title: 'H2O',
- ),
- ServicesContainer(
- onTap: () => Navigator.push(
- context,
- FadePage(),
- ),
- imageLocation: 'assets/images/new-design/smartwatch_icon.png',
- title: TranslationBase.of(context).smartWatches,
- ),
+
ServicesContainer(
onTap: () => Navigator.push(
context,
@@ -314,7 +223,7 @@ class _AllHabibMedicalServiceState extends State {
onTap: () => Navigator.push(
context,
FadePage(
- page: ParkingPage(),
+ page: FindUsPage(),
),
),
imageLocation: 'assets/images/new-design/find_us_icon.png',
diff --git a/lib/pages/AlHabibMedicalService/h2o/widgets/h20_floating_action_button.dart b/lib/pages/AlHabibMedicalService/h2o/widgets/h20_floating_action_button.dart
index 253530b2..7eaed1a8 100644
--- a/lib/pages/AlHabibMedicalService/h2o/widgets/h20_floating_action_button.dart
+++ b/lib/pages/AlHabibMedicalService/h2o/widgets/h20_floating_action_button.dart
@@ -12,19 +12,21 @@ import 'package:flutter/material.dart';
import '../add_custom_amount.dart';
class H20FloatingActionButton extends StatefulWidget {
- const H20FloatingActionButton(
- {Key key, @required AnimationController controller, @required this.model})
- : super(key: key);
+ const H20FloatingActionButton({
+ Key key,
+ @required AnimationController controller,
+ @required this.model
+
+ }) :
+ super(key: key);
final H2OViewModel model;
@override
- _H20FloatingActionButtonState createState() =>
- _H20FloatingActionButtonState();
+ _H20FloatingActionButtonState createState() => _H20FloatingActionButtonState();
}
-class _H20FloatingActionButtonState extends State
- with TickerProviderStateMixin {
+class _H20FloatingActionButtonState extends State with TickerProviderStateMixin {
AnimationController _controller;
@override
void initState() {
@@ -37,13 +39,9 @@ class _H20FloatingActionButtonState extends State
@override
Widget build(BuildContext context) {
+
void showConfirmMessage(int amount, H2OViewModel model) {
- showDialog(
- context: context,
- child: ConfirmAddAmountDialog(
- model: model,
- amount: amount,
- ));
+ showDialog(context: context, child: ConfirmAddAmountDialog(model: model,amount:amount,));
}
return Container(
@@ -186,15 +184,16 @@ class ActionButton extends StatelessWidget {
curve: new Interval(0.0, 1.0 - 0 / 6 / 2.0, curve: Curves.easeOut),
),
child: new FloatingActionButton(
- heroTag: null,
- backgroundColor: Colors.white,
- mini: true,
- child: Text(
- text,
- textAlign: TextAlign.center,
- style: TextStyle(fontSize: 14.0, color: Colors.grey),
- ),
- onPressed: onTap),
+ heroTag: null,
+ backgroundColor: Colors.white,
+ mini: true,
+ child: Text(
+ text,
+ textAlign: TextAlign.center,
+ style: TextStyle(fontSize: 14.0, color: Colors.grey),
+ ),
+ onPressed: onTap
+ ),
),
);
}
diff --git a/lib/pages/Blood/confirm_payment_page.dart b/lib/pages/Blood/confirm_payment_page.dart
index cc5df0a6..3d9fccb2 100644
--- a/lib/pages/Blood/confirm_payment_page.dart
+++ b/lib/pages/Blood/confirm_payment_page.dart
@@ -269,7 +269,7 @@ class ConfirmPaymentPage extends StatelessWidget {
DoctorsListService service = new DoctorsListService();
String paymentReference = res['Fort_id'].toString();
service
- .createAdvancePayment(appo, res['Amount'], res['Fort_id'],
+ .createAdvancePayment(appo, appo.projectID.toString(), res['Amount'], res['Fort_id'],
res['PaymentMethod'], AppGlobal.context)
.then((res) {
print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']);
diff --git a/lib/pages/Blood/dialogs/ConfirmSMSDialog.dart b/lib/pages/Blood/dialogs/ConfirmSMSDialog.dart
index 8dd2b29e..d165a895 100644
--- a/lib/pages/Blood/dialogs/ConfirmSMSDialog.dart
+++ b/lib/pages/Blood/dialogs/ConfirmSMSDialog.dart
@@ -6,12 +6,14 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobile_number.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart';
+import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
+import 'package:provider/provider.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class ConfirmSMSDialog extends StatefulWidget {
@@ -97,6 +99,7 @@ class _ConfirmSMSDialogState extends State {
@override
Widget build(BuildContext context) {
+ ProjectViewModel projectViewModel = Provider.of(context);
return BaseView(
builder: (_, model, w) => Dialog(
elevation: 0.6,
@@ -107,20 +110,18 @@ class _ConfirmSMSDialogState extends State {
Container(
width: double.infinity,
height: 40,
- color: Colors.grey[700],
- child: Row(
- crossAxisAlignment: CrossAxisAlignment.center,
+ color: Theme.of(context).primaryColor,
+ child: Stack(
+
children: [
- Expanded(
- flex: 4,
- child: Center(
- child: Texts(
+ Center(
+ child: Texts(
'SMS',
color: Colors.white,
textAlign: TextAlign.center,
- ))),
- Expanded(
- flex: 1,
+ ),
+ ),
+ Positioned(child: Container(
child: InkWell(
onTap: () => Navigator.pop(context),
child: Container(
@@ -131,8 +132,12 @@ class _ConfirmSMSDialogState extends State {
color: Colors.grey[900],
)),
),
+ ),
+ left: projectViewModel.isArabic? 2:0,
+ right: projectViewModel.isArabic? 0:2,
)
],
+
),
),
Image.asset(
diff --git a/lib/pages/BookAppointment/BookConfirm.dart b/lib/pages/BookAppointment/BookConfirm.dart
index b0110d2b..fa69d913 100644
--- a/lib/pages/BookAppointment/BookConfirm.dart
+++ b/lib/pages/BookAppointment/BookConfirm.dart
@@ -3,10 +3,12 @@ import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResu
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
+import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
+import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@@ -100,7 +102,7 @@ class _BookConfirmState extends State {
fit: BoxFit.fill, height: 70.0, width: 70.0),
),
Container(
- width: MediaQuery.of(context).size.width * 0.6,
+ width: MediaQuery.of(context).size.width * 0.58,
margin: EdgeInsets.fromLTRB(20.0, 5.0, 10.0, 5.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -302,7 +304,7 @@ class _BookConfirmState extends State {
width: 60.0),
),
Container(
- width: MediaQuery.of(context).size.width * 0.6,
+ width: MediaQuery.of(context).size.width * 0.58,
margin: EdgeInsets.fromLTRB(10.0, 5.0, 10.0, 5.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -382,8 +384,10 @@ class _BookConfirmState extends State {
cancelAppointment(DoctorList docObject, AppoitmentAllHistoryResultList appo,
BuildContext context) {
ConfirmDialog.closeAlertDialog(context);
+ GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.cancelAppointment(appo, context).then((res) {
+ GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
Future.delayed(new Duration(milliseconds: 1500), () {
if (!widget.isLiveCareAppointment) {
@@ -397,11 +401,12 @@ class _BookConfirmState extends State {
}
}).catchError((err) {
print(err);
- }).showProgressBar(
- text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ GifLoaderDialogUtils.hideDialog(context);
+ });
}
insertAppointment(context, DoctorList docObject) {
+ GifLoaderDialogUtils.showMyDialog(context);
AppoitmentAllHistoryResultList appo;
widget.service
.insertAppointment(
@@ -421,6 +426,7 @@ class _BookConfirmState extends State {
docObject.projectID, docObject);
});
} else {
+ GifLoaderDialogUtils.hideDialog(context);
appo = new AppoitmentAllHistoryResultList();
appo.appointmentNo = res['SameClinicApptList'][0]['AppointmentNo'];
appo.clinicID = res['SameClinicApptList'][0]['DoctorID'];
@@ -445,11 +451,11 @@ class _BookConfirmState extends State {
}).catchError((err) {
AppToast.showErrorToast(message: err);
print(err);
- }).showProgressBar(
- text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ });
}
insertLiveCareScheduledAppointment(context, DoctorList docObject) {
+ GifLoaderDialogUtils.showMyDialog(context);
AppoitmentAllHistoryResultList appo;
widget.service
.insertLiveCareScheduleAppointment(
@@ -470,6 +476,7 @@ class _BookConfirmState extends State {
docObject.clinicID, docObject.projectID, docObject);
});
} else {
+ GifLoaderDialogUtils.hideDialog(context);
appo = new AppoitmentAllHistoryResultList();
appo.appointmentNo = res['SameClinicApptList'][0]['AppointmentNo'];
appo.clinicID = res['SameClinicApptList'][0]['DoctorID'];
@@ -507,13 +514,16 @@ class _BookConfirmState extends State {
widget.patientShareResponse = new PatientShareResponse.fromJson(res);
navigateToBookSuccess(context, docObject, widget.patientShareResponse);
}).catchError((err) {
+ GifLoaderDialogUtils.hideDialog(context);
+ AppToast.showErrorToast(message: err);
+ navigateToHome(context);
print(err);
- }).showProgressBar(
- text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ });
}
getLiveCareAppointmentPatientShare(context, String appointmentNo,
int clinicID, int projectID, DoctorList docObject) {
+ GifLoaderDialogUtils.hideDialog(context);
widget.service
.getLiveCareAppointmentPatientShare(
appointmentNo, clinicID, projectID, context)
@@ -522,9 +532,11 @@ class _BookConfirmState extends State {
widget.patientShareResponse = new PatientShareResponse.fromJson(res);
navigateToBookSuccess(context, docObject, widget.patientShareResponse);
}).catchError((err) {
+ GifLoaderDialogUtils.hideDialog(context);
+ AppToast.showErrorToast(message: err);
+ navigateToHome(context);
print(err);
- }).showProgressBar(
- text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ });
}
String getTime(DateTime dateTime) {
@@ -579,8 +591,13 @@ class _BookConfirmState extends State {
}
}
+ Future navigateToHome(context) async {
+ Navigator.of(context).popAndPushNamed(HOME);
+ }
+
Future navigateToBookSuccess(context, DoctorList docObject,
PatientShareResponse patientShareResponse) async {
+ GifLoaderDialogUtils.hideDialog(context);
Navigator.push(
context,
MaterialPageRoute(
diff --git a/lib/pages/BookAppointment/BookSuccess.dart b/lib/pages/BookAppointment/BookSuccess.dart
index 34dbdc2f..39e290a1 100644
--- a/lib/pages/BookAppointment/BookSuccess.dart
+++ b/lib/pages/BookAppointment/BookSuccess.dart
@@ -8,10 +8,12 @@ import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
+import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:flutter/material.dart';
+import 'package:flutter_inappwebview/flutter_inappwebview.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'QRCode.dart';
@@ -21,6 +23,8 @@ class BookSuccess extends StatefulWidget {
DoctorList docObject;
MyInAppBrowser browser;
+ final ChromeSafariBrowser chromeBrowser =
+ new MyChromeSafariBrowser(new MyInAppBrowser());
String appoDateFormatted;
String appoTimeFormatted;
@@ -78,12 +82,14 @@ class _BookSuccessState extends State {
width: 80.0),
),
Container(
+ width: MediaQuery.of(context).size.width * 0.62,
margin: EdgeInsets.fromLTRB(10.0, 5.0, 10.0, 5.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: [
Text(widget.docObject.projectName,
+ overflow: TextOverflow.clip,
style: _getTextStyling()),
Container(
margin: EdgeInsets.only(top: 5.0),
@@ -93,6 +99,7 @@ class _BookSuccessState extends State {
Container(
margin: EdgeInsets.only(top: 5.0, bottom: 3.0),
child: Text(widget.docObject.clinicName,
+ overflow: TextOverflow.clip,
style: _getTextStyling()),
),
Container(
@@ -101,6 +108,7 @@ class _BookSuccessState extends State {
widget.appoDateFormatted +
", " +
widget.appoTimeFormatted,
+ overflow: TextOverflow.clip,
style: _getTextStyling()),
),
Container(
@@ -110,7 +118,7 @@ class _BookSuccessState extends State {
widget.docObject.doctorTitle +
" " +
widget.docObject.name,
- overflow: TextOverflow.ellipsis,
+ overflow: TextOverflow.clip,
style: _getTextStyling()),
),
],
@@ -230,9 +238,10 @@ class _BookSuccessState extends State {
children: [
_getBulletPoint("1"),
Container(
+ width: MediaQuery.of(context).size.width * 0.8,
child: Text(
"Please confirm the appointment to avoid the cancellation",
- overflow: TextOverflow.fade,
+ overflow: TextOverflow.clip,
style: TextStyle(fontSize: 13.0)),
),
],
@@ -294,7 +303,8 @@ class _BookSuccessState extends State {
appo.appointmentNo =
widget.patientShareResponse.appointmentNo;
appo.serviceID = widget.patientShareResponse.serviceID;
- appo.isLiveCareAppointment = widget.patientShareResponse.isLiveCareAppointment;
+ appo.isLiveCareAppointment =
+ widget.patientShareResponse.isLiveCareAppointment;
appo.doctorID = widget.patientShareResponse.doctorID;
confirmAppointment(appo);
},
@@ -314,7 +324,7 @@ class _BookSuccessState extends State {
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
- color: new Color(0xFFc5272d),
+ color: new Color(0xFF40ACC9),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
@@ -340,8 +350,8 @@ class _BookSuccessState extends State {
confirmAppointment(AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService();
service
- .confirmAppointment(
- appo.appointmentNo, appo.clinicID, appo.projectID, appo.isLiveCareAppointment, context)
+ .confirmAppointment(appo.appointmentNo, appo.clinicID, appo.projectID,
+ appo.isLiveCareAppointment, context)
.then((res) {
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
@@ -483,7 +493,7 @@ class _BookSuccessState extends State {
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
- color: new Color(0xFFc5272d),
+ color: new Color(0xFF40ACC9),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
@@ -541,22 +551,31 @@ class _BookSuccessState extends State {
AuthenticatedUser authenticatedUser,
double amount,
PatientShareResponse patientShareResponse,
- AppoitmentAllHistoryResultList appo) {
- widget.browser = new MyInAppBrowser(
- onExitCallback: onBrowserExit,
- appo: appo,
- onLoadStartCallback: onBrowserLoadStart);
-
- widget.browser.openPaymentBrowser(
- amount,
- "Appointment check in",
- Utils.getAppointmentTransID(
- appo.projectID, appo.clinicID, appo.appointmentNo),
- appo.projectID.toString(),
- authenticatedUser.emailAddress,
- paymentMethod,
- authenticatedUser,
- widget.browser);
+ AppoitmentAllHistoryResultList appo) async {
+ if (paymentMethod == "ApplePay") {
+ await widget.chromeBrowser.open(
+ url: "https://flutter.dev/",
+ options: ChromeSafariBrowserClassOptions(
+ android: AndroidChromeCustomTabsOptions(
+ addDefaultShareMenuItem: false),
+ ios: IOSSafariOptions(barCollapsingEnabled: true)));
+ } else {
+ widget.browser = new MyInAppBrowser(
+ onExitCallback: onBrowserExit,
+ appo: appo,
+ onLoadStartCallback: onBrowserLoadStart);
+
+ widget.browser.openPaymentBrowser(
+ amount,
+ "Appointment check in",
+ Utils.getAppointmentTransID(
+ appo.projectID, appo.clinicID, appo.appointmentNo),
+ appo.projectID.toString(),
+ authenticatedUser.emailAddress,
+ paymentMethod,
+ authenticatedUser,
+ widget.browser);
+ }
}
onBrowserLoadStart(String url) {
@@ -586,6 +605,31 @@ class _BookSuccessState extends State {
}
checkPaymentStatus(AppoitmentAllHistoryResultList appo) {
+ GifLoaderDialogUtils.showMyDialog(context);
+ DoctorsListService service = new DoctorsListService();
+ service
+ .checkPaymentStatus(
+ Utils.getAppointmentTransID(
+ appo.projectID, appo.clinicID, appo.appointmentNo),
+ context)
+ .then((res) {
+ print("Printing Payment Status Reponse!!!!");
+ print(res);
+ String paymentInfo = res['Response_Message'];
+ if (paymentInfo == 'Success') {
+ createAdvancePayment(res, appo);
+ } else {
+ GifLoaderDialogUtils.hideDialog(context);
+ AppToast.showErrorToast(message: res['Response_Message']);
+ }
+ }).catchError((err) {
+ GifLoaderDialogUtils.hideDialog(context);
+ AppToast.showErrorToast(message: err);
+ print(err);
+ });
+ }
+
+ getApplePayAPQ(AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService();
service
.checkPaymentStatus(
@@ -611,8 +655,8 @@ class _BookSuccessState extends State {
DoctorsListService service = new DoctorsListService();
String paymentReference = res['Fort_id'].toString();
service
- .createAdvancePayment(
- appo, res['Amount'], res['Fort_id'], res['PaymentMethod'], context)
+ .createAdvancePayment(appo, appo.projectID.toString(), res['Amount'],
+ res['Fort_id'], res['PaymentMethod'], context)
.then((res) {
print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']);
addAdvancedNumberRequest(
@@ -620,9 +664,10 @@ class _BookSuccessState extends State {
paymentReference,
appo.appointmentNo.toString());
}).catchError((err) {
+ GifLoaderDialogUtils.hideDialog(context);
+ AppToast.showErrorToast(message: err);
print(err);
- }).showProgressBar(
- text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ });
}
addAdvancedNumberRequest(
@@ -635,9 +680,10 @@ class _BookSuccessState extends State {
print(res);
getAppoQR(context);
}).catchError((err) {
+ GifLoaderDialogUtils.hideDialog(context);
+ AppToast.showErrorToast(message: err);
print(err);
- }).showProgressBar(
- text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ });
}
Widget _getQRAppo() {
@@ -791,11 +837,13 @@ class _BookSuccessState extends State {
.generateAppointmentQR(widget.patientShareResponse, context)
.then((res) {
print(res);
+ GifLoaderDialogUtils.hideDialog(context);
navigateToQR(context, res['AppointmentQR']);
}).catchError((err) {
+ GifLoaderDialogUtils.hideDialog(context);
+ AppToast.showErrorToast(message: err);
print(err);
- }).showProgressBar(
- text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ });
}
Future navigateToQR(context, String appoQR) async {
diff --git a/lib/pages/BookAppointment/BookingOptions.dart b/lib/pages/BookAppointment/BookingOptions.dart
index b6dc5500..83af454f 100644
--- a/lib/pages/BookAppointment/BookingOptions.dart
+++ b/lib/pages/BookAppointment/BookingOptions.dart
@@ -31,6 +31,7 @@ class _BookingOptionsState extends State {
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: widget.isAppbar,
+ isShowDecPage: false,
appBarTitle: TranslationBase.of(context).bookAppo,
body: Container(
margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0),
diff --git a/lib/pages/BookAppointment/DentalComplaints.dart b/lib/pages/BookAppointment/DentalComplaints.dart
index 9d3da450..34a7e1e1 100644
--- a/lib/pages/BookAppointment/DentalComplaints.dart
+++ b/lib/pages/BookAppointment/DentalComplaints.dart
@@ -55,7 +55,7 @@ class _DentalComplaintsState extends State {
}
getLanguageID() async {
- languageID = await sharedPref.getString(APP_LANGUAGE);
+ languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
}
getChiefComplaintsList() {
diff --git a/lib/pages/BookAppointment/DoctorProfile.dart b/lib/pages/BookAppointment/DoctorProfile.dart
index d6986f6f..6864e6b1 100644
--- a/lib/pages/BookAppointment/DoctorProfile.dart
+++ b/lib/pages/BookAppointment/DoctorProfile.dart
@@ -40,6 +40,8 @@ class _DoctorProfileState extends State
bool showFooterButton = false;
var event = RobotProvider();
+ AppSharedPreferences sharedPref = AppSharedPreferences();
+
@override
void initState() {
_tabController = new TabController(
@@ -69,6 +71,7 @@ class _DoctorProfileState extends State
return AppScaffold(
appBarTitle: TranslationBase.of(context).bookAppo,
isShowAppBar: true,
+ isShowDecPage: false,
bottomSheet: showFooterButton
? Container(
width: MediaQuery.of(context).size.width,
@@ -153,7 +156,7 @@ class _DoctorProfileState extends State
child: Text(
"(" +
widget.doctor.noOfPatientsRate.toString() +
- " Reviews)",
+ " " + TranslationBase.of(context).reviews + ")",
style: TextStyle(
fontSize: 14.0,
color: Colors.blue[800],
@@ -211,7 +214,6 @@ class _DoctorProfileState extends State
}
getPatientData() async {
- AppSharedPreferences sharedPref = AppSharedPreferences();
if (await sharedPref.getObject(USER_PROFILE) != null) {
var data =
AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
@@ -222,14 +224,14 @@ class _DoctorProfileState extends State
}
}
- void goToBookConfirm() {
+ void goToBookConfirm() async {
if (DocAvailableAppointments.areSlotsAvailable) {
- if (widget.authUser.patientID != null) {
+ if (await sharedPref.getObject(USER_PROFILE) != null) {
navigateToBookConfirm(context);
} else {
ConfirmDialog dialog = new ConfirmDialog(
context: context,
- confirmMessage: "You have to login to use this service",
+ confirmMessage: TranslationBase.of(context).loginToUseService,
okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () => {navigateToLogin()},
diff --git a/lib/pages/BookAppointment/QRCode.dart b/lib/pages/BookAppointment/QRCode.dart
index c632a26e..e92c2348 100644
--- a/lib/pages/BookAppointment/QRCode.dart
+++ b/lib/pages/BookAppointment/QRCode.dart
@@ -151,6 +151,7 @@ class _QRCodeState extends State {
),
),
Container(
+ margin: EdgeInsets.zero,
alignment: Alignment.bottomCenter,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
@@ -252,7 +253,9 @@ class _QRCodeState extends State {
ConfirmDialog.closeAlertDialog(context);
AppToast.showErrorToast(message: err);
print(err);
- }).showProgressBar(text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ }).showProgressBar(
+ text: "Loading",
+ backgroundColor: Colors.blue.withOpacity(0.6));
},
cancelFunction: () => {});
dialog.showAlertDialog(context);
@@ -290,9 +293,11 @@ class _QRCodeState extends State {
String getDoctorSpeciality(List docSpecial) {
String docSpeciality = "";
- docSpecial.forEach((v) {
- docSpeciality = docSpeciality + v + "\n";
- });
+ if (docSpecial != null && docSpecial.length != 0) {
+ docSpecial.forEach((v) {
+ docSpeciality = docSpeciality + v + "\n";
+ });
+ }
return docSpeciality;
}
}
diff --git a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart
index 3e9ae0cd..70b6aaa0 100644
--- a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart
+++ b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart
@@ -1,13 +1,14 @@
+import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/FreeSlot.dart';
import 'package:diplomaticquarterapp/models/Appointments/timeSlot.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
+import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
-import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'package:table_calendar/table_calendar.dart';
import '../../../uitl/date_uitl.dart';
@@ -49,6 +50,8 @@ class _DocAvailableAppointmentsState extends State
ScrollController _scrollController;
+ var language;
+
@override
void initState() {
// TODO: implement initState
@@ -62,6 +65,7 @@ class _DocAvailableAppointmentsState extends State
};
WidgetsBinding.instance.addPostFrameCallback((_) async {
+ getCurrentLanguage();
if (widget.isLiveCareAppointment)
getDoctorScheduledFreeSlots(context, widget.doctor);
else {
@@ -88,7 +92,8 @@ class _DocAvailableAppointmentsState extends State
void _onDaySelected(DateTime day, List events) {
final DateFormat formatter = DateFormat('yyyy-MM-dd');
setState(() {
- this.selectedDate = DateUtil.getMonthDayYearDateFormatted(day);
+ this.selectedDate =
+ DateUtil.getWeekDayMonthDayYearDateFormatted(day, language);
openTimeSlotsPickerForDate(day, docFreeSlots);
DocAvailableAppointments.selectedDate = formatter.format(day);
print(DocAvailableAppointments.selectedDate);
@@ -154,7 +159,7 @@ class _DocAvailableAppointmentsState extends State
Widget _buildTableCalendarWithBuilders() {
return TableCalendar(
- locale: 'en_US',
+ locale: language == "en" ? 'en_US' : 'ar_SA',
calendarController: _calendarController,
events: _events,
initialCalendarFormat: CalendarFormat.month,
@@ -219,9 +224,8 @@ class _DocAvailableAppointmentsState extends State
),
);
},
- markersBuilder: (context, date, events, holidays) {
+ markersBuilder: (context, date, events, _) {
final children = [];
-
if (events.isNotEmpty) {
children.add(
Positioned(
@@ -235,8 +239,8 @@ class _DocAvailableAppointmentsState extends State
return children;
},
),
- onDaySelected: (date, events,format) {
- _onDaySelected(date, events);
+ onDaySelected: (date, event, _) {
+ _onDaySelected(date, event);
_animationController.forward(from: 0.0);
},
onVisibleDaysChanged: _onVisibleDaysChanged,
@@ -287,8 +291,8 @@ class _DocAvailableAppointmentsState extends State
setState(() {
DocAvailableAppointments.selectedDate = dateFormatter
.format(DateUtil.convertStringToDate(freeSlotsResponse[0]));
- selectedDate = DateUtil.getMonthDayYearDateFormatted(
- DateUtil.convertStringToDate(freeSlotsResponse[0]));
+ selectedDate = DateUtil.getWeekDayMonthDayYearDateFormatted(
+ DateUtil.convertStringToDate(freeSlotsResponse[0]), language);
selectedDateJSON = freeSlotsResponse[0];
});
openTimeSlotsPickerForDate(
@@ -331,11 +335,13 @@ class _DocAvailableAppointmentsState extends State
}
getDoctorFreeSlots(context, DoctorList docObject) {
+ GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service
.getDoctorFreeSlots(docObject.doctorID, docObject.clinicID,
docObject.projectID, context)
.then((res) {
+ GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
if (res['FreeTimeSlots'].length != 0) {
freeSlotsResponse = res['FreeTimeSlots'];
@@ -350,16 +356,17 @@ class _DocAvailableAppointmentsState extends State
}
}).catchError((err) {
print(err);
- }).showProgressBar(
- text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ });
}
getDoctorScheduledFreeSlots(context, DoctorList docObject) {
+ GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service
.getDoctorScheduledFreeSlots(docObject.doctorID, docObject.clinicID,
docObject.projectID, docObject.serviceID, context)
.then((res) {
+ GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
if (res['PatientER_DoctorFreeSlots'].length != 0) {
freeSlotsResponse = res['PatientER_DoctorFreeSlots'];
@@ -374,8 +381,15 @@ class _DocAvailableAppointmentsState extends State
}
}).catchError((err) {
print(err);
- }).showProgressBar(
- text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ });
+ }
+
+ getCurrentLanguage() async {
+ var languageID =
+ await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
+ setState(() {
+ this.language = languageID;
+ });
}
Widget _buildEventsMarker(DateTime date, List events) {
diff --git a/lib/pages/BookAppointment/components/DocInfo.dart b/lib/pages/BookAppointment/components/DocInfo.dart
index ff24b1ca..aa6e3b9f 100644
--- a/lib/pages/BookAppointment/components/DocInfo.dart
+++ b/lib/pages/BookAppointment/components/DocInfo.dart
@@ -1,9 +1,9 @@
import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart';
+import 'package:flutter_svg/flutter_svg.dart';
class DoctorInformation extends StatelessWidget {
-
DoctorProfileList docProfileList;
DoctorInformation({@required this.docProfileList});
@@ -27,8 +27,8 @@ class DoctorInformation extends StatelessWidget {
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
- Image.asset(
- "assets/images/new-design/doctor_information_icon.png"),
+ SvgPicture.asset(
+ "assets/images/DQ/doctor_information_icon.svg"),
Container(
margin: EdgeInsets.fromLTRB(15.0, 5.0, 15.0, 0.0),
child: Text(TranslationBase.of(context).docInfo,
@@ -43,12 +43,21 @@ class DoctorInformation extends StatelessWidget {
child: Table(
children: [
TableRow(children: [
- TableCell(child: _getHeadingText(TranslationBase.of(context).gender)),
- TableCell(child: _getHeadingText(TranslationBase.of(context).nationality)),
+ TableCell(
+ child: _getHeadingText(
+ TranslationBase.of(context).gender)),
+ TableCell(
+ child: _getHeadingText(
+ TranslationBase.of(context).nationality)),
]),
TableRow(children: [
- TableCell(child: _getNormalText(docProfileList.genderDescription)),
- TableCell(child: _getNormalTextWithIcon(docProfileList.nationalityName, docProfileList.nationalityFlagURL)),
+ TableCell(
+ child: _getNormalText(
+ docProfileList.genderDescription)),
+ TableCell(
+ child: _getNormalTextWithIcon(
+ docProfileList.nationalityName,
+ docProfileList.nationalityFlagURL)),
]),
],
),
@@ -82,13 +91,14 @@ class DoctorInformation extends StatelessWidget {
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
- Image.asset(
- "assets/images/new-design/doctor_qualification_icon.png"),
+ SvgPicture.asset(
+ "assets/images/DQ/doctor_qualification_icon.svg"),
Container(
margin: EdgeInsets.fromLTRB(15.0, 5.0, 15.0, 0.0),
- child: Text(TranslationBase.of(context).docQualifications,
+ child: Text(
+ TranslationBase.of(context).docQualifications,
style:
- TextStyle(fontSize: 16.0, letterSpacing: 0.8)),
+ TextStyle(fontSize: 16.0, letterSpacing: 0.8)),
),
],
),
@@ -146,10 +156,7 @@ class DoctorInformation extends StatelessWidget {
color: Colors.grey[700])),
Container(
margin: EdgeInsets.only(left: 5.0, right: 5.0),
- child: Image.network(
- icon,
- width: 18.0,
- height: 18.0),
+ child: Image.network(icon, width: 18.0, height: 18.0),
),
],
),
diff --git a/lib/pages/BookAppointment/components/SearchByClinic.dart b/lib/pages/BookAppointment/components/SearchByClinic.dart
index 9d833db1..7943e423 100644
--- a/lib/pages/BookAppointment/components/SearchByClinic.dart
+++ b/lib/pages/BookAppointment/components/SearchByClinic.dart
@@ -8,8 +8,8 @@ import 'package:diplomaticquarterapp/pages/BookAppointment/DentalComplaints.dart
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
-import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
+import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart';
import 'package:flutter/material.dart';
@@ -17,7 +17,9 @@ import 'package:smart_progress_bar/smart_progress_bar.dart';
class SearchByClinic extends StatefulWidget {
final List clnicIds;
+
SearchByClinic({this.clnicIds});
+
@override
_SearchByClinicState createState() => _SearchByClinicState();
}
@@ -26,11 +28,13 @@ class _SearchByClinicState extends State {
bool nearestAppo = false;
String dropdownValue;
String projectDropdownValue;
+
// var event = RobotProvider();
List clinicsList = [];
List projectsList = [];
bool isMobileAppDentalAllow = false;
bool isLoaded = false;
+
@override
void initState() {
WidgetsBinding.instance.addPostFrameCallback((_) => getClinicsList());
@@ -47,7 +51,7 @@ class _SearchByClinicState extends State {
Row(
children: [
Checkbox(
- activeColor: new Color(0xFFc5272d),
+ activeColor: new Color(0xFF40ACC9),
value: nearestAppo,
onChanged: (bool value) {
setState(() {
@@ -77,12 +81,6 @@ class _SearchByClinicState extends State {
}
});
},
- // trailing: Icon(TranslationBase.of(AppGlobal.context)
- // .locale
- // .languageCode ==
- // 'en'
- // ? Icons.keyboard_arrow_right
- // : Icons.keyboard_arrow_left),
title: Text(result.clinicDescription,
style: TextStyle(
fontSize: 14.0,
@@ -104,7 +102,7 @@ class _SearchByClinicState extends State {
width: MediaQuery.of(context).size.width,
child: DropdownButtonHideUnderline(
child: DropdownButton(
- hint: new Text("Select Clinic"),
+ hint: new Text(TranslationBase.of(context).selectClinic),
value: dropdownValue,
items: clinicsList.map((item) {
return new DropdownMenuItem(
@@ -168,27 +166,21 @@ class _SearchByClinicState extends State {
}
getClinicsList() {
+ GifLoaderDialogUtils.showMyDialog(context);
ClinicListService service = new ClinicListService();
- service
- .getClinicsList(context)
- .then((res) {
- if (res['MessageStatus'] == 1) {
- setState(() {
- isMobileAppDentalAllow = res['ISMobileAppDentalAllow'];
- res['ListClinicCentralized'].forEach((v) {
- clinicsList.add(new ListClinicCentralized.fromJson(v));
- });
- });
- } else {}
- })
- .catchError((err) {
- print(err);
- })
- .showProgressBar(
- text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6))
- .then((value) {
- getProjectsList();
+ service.getClinicsList(context).then((res) {
+ if (res['MessageStatus'] == 1) {
+ setState(() {
+ isMobileAppDentalAllow = res['ISMobileAppDentalAllow'];
+ res['ListClinicCentralized'].forEach((v) {
+ clinicsList.add(new ListClinicCentralized.fromJson(v));
+ });
});
+ getProjectsList();
+ } else {}
+ }).catchError((err) {
+ print(err);
+ });
}
getProjectsList() {
@@ -199,23 +191,24 @@ class _SearchByClinicState extends State {
res['ListProject'].forEach((v) {
projectsList.add(new HospitalsModel.fromJson(v));
});
- print(projectsList.length);
});
+ GifLoaderDialogUtils.hideDialog(context);
filterClinic();
} else {}
}).catchError((err) {
print(err);
- }).showProgressBar(
- text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ });
}
getDoctorsList(BuildContext context) {
+ GifLoaderDialogUtils.showMyDialog(context);
SearchInfo searchInfo = new SearchInfo();
if (dropdownValue == "17") {
searchInfo.ProjectID = int.parse(projectDropdownValue);
searchInfo.ClinicID = int.parse(dropdownValue);
searchInfo.date = DateTime.now();
+ GifLoaderDialogUtils.hideDialog(context);
navigateToDentalComplaints(context, searchInfo);
} else {
List doctorsList = [];
@@ -231,6 +224,7 @@ class _SearchByClinicState extends State {
nearestAppo,
context)
.then((res) {
+ GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {
if (res['DoctorList'].length != 0) {
@@ -249,17 +243,16 @@ class _SearchByClinicState extends State {
result = LinkedHashSet.from(arr).toList();
numAll = result.length;
-
navigateToSearchResults(
context, doctorsList, result, numAll, arrDistance);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
+ GifLoaderDialogUtils.hideDialog(context);
print(err);
AppToast.showErrorToast(message: err);
- }).showProgressBar(
- text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ });
}
}
@@ -296,8 +289,6 @@ class _SearchByClinicState extends State {
.where((i) => widget.clnicIds.indexOf(i.clinicID) > -1)
.toList();
isLoaded = true;
-
- ///print(clinicsList);
}
});
}
diff --git a/lib/pages/BookAppointment/components/SearchByDoctor.dart b/lib/pages/BookAppointment/components/SearchByDoctor.dart
index 80288085..1e1945b5 100644
--- a/lib/pages/BookAppointment/components/SearchByDoctor.dart
+++ b/lib/pages/BookAppointment/components/SearchByDoctor.dart
@@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
+import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
@@ -82,6 +83,7 @@ class _SearchByDoctorState extends State {
}
getDoctorsList(BuildContext context) {
+ GifLoaderDialogUtils.showMyDialog(context);
List doctorsList = [];
DoctorsListService service = new DoctorsListService();
@@ -123,7 +125,7 @@ class _SearchByDoctorState extends State {
});
} else {}
});
-
+ GifLoaderDialogUtils.hideDialog(context);
navigateToSearchResults(
context, doctorsList, _patientDoctorAppointmentListHospital);
} else {
@@ -131,8 +133,7 @@ class _SearchByDoctorState extends State {
}
}).catchError((err) {
print(err);
- }).showProgressBar(
- text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ });
}
_onDocTextChanged(content) {
diff --git a/lib/pages/BookAppointment/widgets/BranchView.dart b/lib/pages/BookAppointment/widgets/BranchView.dart
index 4ba5a9d3..747775d5 100644
--- a/lib/pages/BookAppointment/widgets/BranchView.dart
+++ b/lib/pages/BookAppointment/widgets/BranchView.dart
@@ -27,6 +27,7 @@ class _BranchViewState extends State {
return AppScaffold(
appBarTitle: TranslationBase.of(context).bookAppo,
isShowAppBar: true,
+ isShowDecPage: false,
isBottomBar: false,
body: new ListView.builder(
itemBuilder: (BuildContext context, int index) {
@@ -109,7 +110,7 @@ class _ExpandableListViewState extends State {
height: 28.0,
width: 30.0,
decoration: new BoxDecoration(
- color: Colors.red,
+ color: Color(0xFF40ACC9),
shape: BoxShape.circle,
),
child: new Center(
diff --git a/lib/pages/BookAppointment/widgets/CardCommon.dart b/lib/pages/BookAppointment/widgets/CardCommon.dart
index a6cf648f..e56ba965 100644
--- a/lib/pages/BookAppointment/widgets/CardCommon.dart
+++ b/lib/pages/BookAppointment/widgets/CardCommon.dart
@@ -31,7 +31,7 @@ class CardCommon extends StatelessWidget {
child: Text(this.text,
overflow: TextOverflow.clip,
style: TextStyle(
- color: new Color(0xFFc5272d),
+ color: new Color(0xFF40ACC9),
letterSpacing: 1.0,
fontSize: 20.0)),
),
diff --git a/lib/pages/BookAppointment/widgets/DoctorView.dart b/lib/pages/BookAppointment/widgets/DoctorView.dart
index 40c0e2fc..d419e4af 100644
--- a/lib/pages/BookAppointment/widgets/DoctorView.dart
+++ b/lib/pages/BookAppointment/widgets/DoctorView.dart
@@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
+import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:flutter/material.dart';
import 'package:rating_bar/rating_bar.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
@@ -135,12 +136,14 @@ class DoctorView extends StatelessWidget {
}
getDoctorsProfile(context, DoctorList docObject, {isAppo}) {
+ GifLoaderDialogUtils.showMyDialog(context);
List docProfileList = [];
DoctorsListService service = new DoctorsListService();
service
.getDoctorsProfile(docObject.doctorID, docObject.clinicID,
docObject.projectID, context)
.then((res) {
+ GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
if (res['DoctorProfileList'].length != 0) {
res['DoctorProfileList'].forEach((v) {
@@ -154,7 +157,7 @@ class DoctorView extends StatelessWidget {
}
}).catchError((err) {
print(err);
- }).showProgressBar(text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ });
}
String getDate(String date) {
diff --git a/lib/pages/ContactUs/contact_us_page.dart b/lib/pages/ContactUs/contact_us_page.dart
index 7d2192f9..d301df3e 100644
--- a/lib/pages/ContactUs/contact_us_page.dart
+++ b/lib/pages/ContactUs/contact_us_page.dart
@@ -27,8 +27,8 @@ class _ContactUsPageState extends State {
@override
Widget build(BuildContext context) {
return AppScaffold(
- isShowAppBar: true,//widget.isAppbar,
- appBarTitle: "HMG Services",//TranslationBase.of(context).bookAppo,
+ isShowAppBar: true,
+ appBarTitle: TranslationBase.of(context).hMGServiceLabel,
isShowDecPage: false,
body: Container(
margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0),
@@ -43,7 +43,7 @@ class _ContactUsPageState extends State {
Expanded(
child: CardCommonContact(
image: 'assets/images/new-design/find_us_icon.png',
- text: "Find us",
+ text: TranslationBase.of(context).findUs,
subText: "",
type: 0,
@@ -52,7 +52,7 @@ class _ContactUsPageState extends State {
Expanded(
child: CardCommonContact(
image: 'assets/images/new-design/feedback_icon.png',
- text: "Feedback",
+ text: TranslationBase.of(context).feedback,
subText: "",
type: 1),
@@ -66,21 +66,14 @@ class _ContactUsPageState extends State {
Expanded(
child: CardCommonContact(
image: 'assets/images/new-design/live_chat_icon.png',
- text: "Live Chat",
- subText: "Service",
+ text: TranslationBase.of(context).liveChat,
+ subText: TranslationBase.of(context).service,
type: 2,
),
),
Expanded(
- child: Opacity(
- opacity: 0,
- child: CardCommonContact(
- image: 'assets/images/new-design/feedback_icon.png',
- text: "Feedback",
- subText: "",
- type: 3),
- ),
+ child: Container(),
),
],
diff --git a/lib/pages/ContactUs/findus/findus_page.dart b/lib/pages/ContactUs/findus/findus_page.dart
index 9b39de3a..807ac1c7 100644
--- a/lib/pages/ContactUs/findus/findus_page.dart
+++ b/lib/pages/ContactUs/findus/findus_page.dart
@@ -34,9 +34,11 @@ class _FindUsPageState extends State
@override
Widget build(BuildContext context) {
return BaseView(
+ allowAny: true,
onModelReady: (model) => model.getFindUsRequestOrders(), //model.getCOC(),
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
+ isShowDecPage: false,
appBarTitle: 'Locations',
baseViewModel: model,
body: Scaffold(
diff --git a/lib/pages/ContactUs/findus/hospitrals_page.dart b/lib/pages/ContactUs/findus/hospitrals_page.dart
index d8d898e3..7aa968a5 100644
--- a/lib/pages/ContactUs/findus/hospitrals_page.dart
+++ b/lib/pages/ContactUs/findus/hospitrals_page.dart
@@ -23,6 +23,7 @@ class _HospitalsPageState extends State {
@override
Widget build(BuildContext context) {
return AppScaffold(
+ isShowDecPage: false,
body: SingleChildScrollView(
child: Container(
// margin: EdgeInsets.only(left: 15,right: 15,top: 70),
diff --git a/lib/pages/ContactUs/findus/pharmacies_page.dart b/lib/pages/ContactUs/findus/pharmacies_page.dart
index 663bd3ec..cab201e3 100644
--- a/lib/pages/ContactUs/findus/pharmacies_page.dart
+++ b/lib/pages/ContactUs/findus/pharmacies_page.dart
@@ -23,6 +23,7 @@ class _PharmaciesPageState extends State {
@override
Widget build(BuildContext context) {
return AppScaffold(
+ isShowDecPage: false,
body: SingleChildScrollView(
child: Container(
margin: EdgeInsets.only(left: 15, right: 15, top: 70),
diff --git a/lib/pages/ContactUs/widgets/card_common_contat.dart b/lib/pages/ContactUs/widgets/card_common_contat.dart
index 9ad74aff..67580dbf 100644
--- a/lib/pages/ContactUs/widgets/card_common_contat.dart
+++ b/lib/pages/ContactUs/widgets/card_common_contat.dart
@@ -1,8 +1,10 @@
+import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/LiveChat/livechat_page.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/findus/findus_page.dart';
import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
+import 'package:provider/provider.dart';
class CardCommonContact extends StatelessWidget {
final image;
@@ -17,6 +19,7 @@ class CardCommonContact extends StatelessWidget {
@override
Widget build(BuildContext context) {
+ ProjectViewModel projectViewModel = Provider.of(context);
return GestureDetector(
onTap: () {
navigateToSearch(context, this.type);
@@ -45,10 +48,12 @@ class CardCommonContact extends StatelessWidget {
style: TextStyle(
color: Colors.black, letterSpacing: 1.0, fontSize: 15.0)),
),
- Container(
- alignment: Alignment.bottomRight,
- margin: EdgeInsets.fromLTRB(0.0, 0.0, 10.0, 8.0),
- child: Image.asset(this.image, width: 60.0, height: 60.0),
+ Align(
+ alignment: projectViewModel.isArabic? Alignment.bottomLeft:Alignment.bottomRight,
+ child: Container(
+ margin: EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 8.0),
+ child: Image.asset(this.image, width: 60.0, height: 60.0),
+ ),
),
],
),
diff --git a/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart b/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart
index 9f2418fd..3e58b657 100644
--- a/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart
+++ b/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart
@@ -348,8 +348,11 @@ class _CovidTimeSlotsState extends State
return children;
},
),
- onDaySelected: (date, event,formats) {
- _onDaySelected(date, event,);
+ onDaySelected: (date, event, _) {
+ _onDaySelected(
+ date,
+ event,
+ );
_animationController.forward(from: 0.0);
},
onVisibleDaysChanged: _onVisibleDaysChanged,
diff --git a/lib/pages/family/add-family-member.dart b/lib/pages/DrawerPages/family/add-family-member.dart
similarity index 96%
rename from lib/pages/family/add-family-member.dart
rename to lib/pages/DrawerPages/family/add-family-member.dart
index f1742141..35b19ccd 100644
--- a/lib/pages/family/add-family-member.dart
+++ b/lib/pages/DrawerPages/family/add-family-member.dart
@@ -3,7 +3,6 @@ import 'package:diplomaticquarterapp/core/model/family-file/add_family_file_requ
import 'package:diplomaticquarterapp/core/model/family-file/insert_share_file_request.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
-import 'package:diplomaticquarterapp/pages/family/add-family_type.dart';
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@@ -20,6 +19,8 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
+import 'add-family_type.dart';
+
class AddMember extends StatefulWidget {
@override
_AddMember createState() => _AddMember();
@@ -179,8 +180,7 @@ class _AddMember extends State {
request.regionID = 1;
}
loading(true);
- this
- .familyFileProvider
+ familyFileProvider
.insertNewMember(request)
.then((value) => sendActivationCode(value));
}
@@ -189,8 +189,7 @@ class _AddMember extends State {
// var request = this.getCommonRequest();
loading(true);
patientShareRequestID = result['PatientShareRequestID'];
- this
- .familyFileProvider
+ familyFileProvider
.sendActivationCode(mobileNo, countryCode, nationalIDorFile.text)
.then((result) => {
if (result != null && result['isSMSSent'] == true)
@@ -203,11 +202,13 @@ class _AddMember extends State {
startSMSService(type, result) {
loading(false);
- new SMSOTP(
+ SMSOTP(
context,
type,
- this.mobileNo,
- (value) => {this.checkActivationCode(value, result)},
+ mobileNo,
+ (value) {
+ this.checkActivationCode(value, result);
+ },
() => {
print('Faild..'),
},
@@ -215,8 +216,7 @@ class _AddMember extends State {
}
checkActivationCode(value, result) {
- this
- .familyFileProvider
+ familyFileProvider
.checkActivationCode(
result['LogInTokenID'], value, nationalIDorFile.text, mobileNo)
.then((result) => {
@@ -226,8 +226,7 @@ class _AddMember extends State {
}
handleFamilyRequests(id, stauts) {
- this
- .familyFileProvider
+ familyFileProvider
.acceptAndRejectRecievedRequests(id, stauts)
.then((result) => {
sharedPref.remove(FAMILY_FILE),
diff --git a/lib/pages/family/add-family_type.dart b/lib/pages/DrawerPages/family/add-family_type.dart
similarity index 100%
rename from lib/pages/family/add-family_type.dart
rename to lib/pages/DrawerPages/family/add-family_type.dart
diff --git a/lib/pages/family/my-family.dart b/lib/pages/DrawerPages/family/my-family.dart
similarity index 57%
rename from lib/pages/family/my-family.dart
rename to lib/pages/DrawerPages/family/my-family.dart
index b4024b0a..d3de1b62 100644
--- a/lib/pages/family/my-family.dart
+++ b/lib/pages/DrawerPages/family/my-family.dart
@@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStat
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart';
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
+import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart';
@@ -19,6 +20,8 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/routes.dart';
class MyFamily extends StatefulWidget {
+ final bool isAppbarVisible;
+ MyFamily({this.isAppbarVisible =true});
@override
_MyFamily createState() => _MyFamily();
}
@@ -38,65 +41,66 @@ class _MyFamily extends State with TickerProviderStateMixin {
bool expandFlag = false;
Widget build(BuildContext context) {
- return Scaffold(
- appBar: AppBar(
- bottom: TabBar(
- indicatorColor: Colors.red,
- tabs: [
- Padding(
- padding: EdgeInsets.all(6),
- child: AppText(
- TranslationBase.of(context).family,
- color: Colors.white,
- )),
- Padding(
- padding: EdgeInsets.all(6),
- child: AppText(
- TranslationBase.of(context).request,
- color: Colors.white,
- )),
- ],
- controller: _tabController,
- ),
- title: AppText(TranslationBase.of(context).myFamilyFiles,
- color: Colors.white)),
- body: TabBarView(
- // physics: NeverScrollableScrollPhysics(),
- children: [myFamilyDetails(context), myFamilyRequest(context)],
- controller: _tabController),
- bottomNavigationBar: BottomBarSearch());
+ // return Scaffold(
+ // appBar: AppBar(
+ // bottom: TabBar(
+ // indicatorColor: Colors.red,
+ // tabs: [
+ // Padding(
+ // padding: EdgeInsets.all(6),
+ // child: AppText(
+ // TranslationBase.of(context).family,
+ // color: Colors.white,
+ // )),
+ // Padding(
+ // padding: EdgeInsets.all(6),
+ // child: AppText(
+ // TranslationBase.of(context).request,
+ // color: Colors.white,
+ // )),
+ // ],
+ // controller: _tabController,
+ // ),
+ //
+ // ),
+ // body: TabBarView(
+ // // physics: NeverScrollableScrollPhysics(),
+ // children: [myFamilyDetails(context), myFamilyRequest(context)],
+ // controller: _tabController),
+ // );
+ // //bottomNavigationBar: BottomBarSearch());
- // AppScaffold(
- // appBarTitle: TranslationBase.of(context).myFamilyFiles,
- // isShowAppBar: true,
- // body: SingleChildScrollView(
- // child: Container(
- // height: SizeConfig.screenHeight,
- // width: SizeConfig.realScreenWidth,
- // padding: EdgeInsets.all(20),
- // child: Stack(
- // children: [
- // TabBar(
- // controller: _tabController,
- // indicatorColor: Colors.red,
- // tabs: [
- // Padding(
- // padding: EdgeInsets.all(6),
- // child: Text(TranslationBase.of(context).family)),
- // Padding(
- // padding: EdgeInsets.all(6),
- // child: Text(TranslationBase.of(context).request)),
- // ],
- // ),
- // TabBarView(
- // controller: _tabController,
- // children: [
- // myFamilyDetails(context),
- // myFamilyRequest(context)
- // ],
- // )
- // ],
- // ))));
+ return AppScaffold(
+ appBarTitle: TranslationBase.of(context).myFamilyFiles,
+ isShowAppBar: widget.isAppbarVisible,
+ body: SingleChildScrollView(
+ child: Container(
+ height: SizeConfig.screenHeight,
+ width: SizeConfig.realScreenWidth,
+ padding: EdgeInsets.all(20),
+ child: Stack(
+ children: [
+ TabBar(
+ controller: _tabController,
+ indicatorColor: Colors.red,
+ tabs: [
+ Padding(
+ padding: EdgeInsets.all(6),
+ child: Text(TranslationBase.of(context).family)),
+ Padding(
+ padding: EdgeInsets.all(6),
+ child: Text(TranslationBase.of(context).request)),
+ ],
+ ),
+ TabBarView(
+ controller: _tabController,
+ children: [
+ myFamilyDetails(context),
+ myFamilyRequest(context)
+ ],
+ )
+ ],
+ ))));
}
Widget myFamilyDetails(context) {
@@ -218,22 +222,176 @@ class _MyFamily extends State with TickerProviderStateMixin {
}
Widget myFamilyRequest(context) {
- return Padding(
- padding: const EdgeInsets.symmetric(horizontal: 10.0),
- child: Column(
- children: [
- // SizedBox(height: 20.0),
- RoundedContainer(
- child: ExpansionTile(
+ return //Padding(
+ // padding: const EdgeInsets.symmetric(horizontal: 10.0),
+ // child:
+ SingleChildScrollView(
+ child: Container(
+ height: MediaQuery.of(context).size.height,
+ margin: EdgeInsets.only(top:50),
+ child: Column(
+ children: [
+ RoundedContainer(
+ child: ExpansionTile(
+ title: Text(
+ TranslationBase.of(context).userViewRequest,
+ style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold),
+ ),
+ children: [
+ FutureBuilder(
+ future: getUserViewRequest(), // async work
+ builder: (BuildContext context,
+ AsyncSnapshot snapshot) {
+ switch (snapshot.connectionState) {
+ case ConnectionState.waiting:
+ return Padding(
+ padding: EdgeInsets.only(top: 50),
+ child: Text('Loading....'));
+ default:
+ if (snapshot.hasError)
+ return Padding(
+ padding: EdgeInsets.all(10),
+ child: Text('No data found'));
+ else
+ return Column(
+ children: [
+ Row(
+ mainAxisAlignment:
+ MainAxisAlignment.spaceBetween,
+ children: [
+ Expanded(
+ flex: 3,
+ child: Text(TranslationBase.of(context)
+ .request)),
+ Expanded(
+ flex: 2,
+ child: Text(
+ TranslationBase.of(context)
+ .switchUser,
+ )),
+ Expanded(
+ flex: 1,
+ child: Text(
+ TranslationBase.of(context)
+ .deleteView,
+ )),
+ ],
+ ),
+ Column(children: [
+ Row(children: [
+ Expanded(flex: 3, child: AppText('Name')),
+ Expanded(flex: 1, child: AppText('Allow')),
+ Expanded(flex: 1, child: AppText('Reject')),
+ ]),
+ Column(
+ children:familyFileProvider.allSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList
+ .map((result) {
+ return Padding(
+ padding: EdgeInsets.all(10),
+ child: Row(
+ children: [
+ Expanded(
+ flex: 3,
+ child:
+ Text(result.patientName)),
+ Expanded(
+ flex: 1,
+ child: IconButton(
+ icon: Icon(
+ Icons.check_circle,
+ color: Colors.black,
+ ),
+ onPressed: () {
+ acceptRequest(
+ result, context);
+ },
+ )),
+ Expanded(
+ flex: 1,
+ child: IconButton(
+ icon: Icon(
+ Icons.delete,
+ color: Colors.black,
+ ),
+ onPressed: () {
+ deleteRequest(
+ result, context);
+ },
+ ))
+ ],
+ ));
+ }).toList())
+ ])
+ ],
+ );
+ }
+ })
+ ],
+ ),
+ ),
+ RoundedContainer(
+ child: ExpansionTile(
title: Text(
- TranslationBase.of(context).userViewRequest,
+ TranslationBase.of(context).sentRequest,
style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold),
),
children: [
FutureBuilder(
- future: getUserViewRequest(), // async work
+ future: getSentRequest(), // async work
builder: (BuildContext context,
- AsyncSnapshot snapshot) {
+ AsyncSnapshot
+ snapshot) {
+ switch (snapshot.connectionState) {
+ case ConnectionState.waiting:
+ return Padding(
+ padding: EdgeInsets.only(top: 50),
+ child: Text('Loading....'));
+ default:
+ if (snapshot.hasError)
+ return Padding(
+ padding: EdgeInsets.all(10),
+ child: Text('No data found'));
+ else
+ return SingleChildScrollView(
+ child: Container(
+ height: SizeConfig.screenHeight * .3,
+ child: ListView(
+ children: snapshot
+ .data.getAllSharedRecordsByStatusList
+ .map((result) {
+ return Padding(
+ padding: EdgeInsets.all(10),
+ child: Row(
+ children: [
+ Expanded(
+ flex: 3,
+ child:
+ Text(result.patientName)),
+ Expanded(
+ flex: 2,
+ child: AppText(
+ result.statusDescription,
+ color: Colors.red,
+ )),
+ ],
+ ));
+ }).toList(),
+ )));
+ }
+ })
+ ],
+ )),
+ RoundedContainer(
+ child: ExpansionTile(
+ title: Text(
+ TranslationBase.of(context).userView,
+ style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold),
+ ),
+ children: [
+ FutureBuilder(
+ future: getUserViewRequest(), // async work
+ builder:
+ (BuildContext context, AsyncSnapshot snapshot) {
switch (snapshot.connectionState) {
case ConnectionState.waiting:
return Padding(
@@ -253,31 +411,27 @@ class _MyFamily extends State with TickerProviderStateMixin {
children: [
Expanded(
flex: 3,
- child: Text(TranslationBase.of(context)
- .request)),
+ child: Text(
+ TranslationBase.of(context).request)),
Expanded(
flex: 2,
child: Text(
- TranslationBase.of(context)
- .switchUser,
+ TranslationBase.of(context).switchUser,
)),
Expanded(
flex: 1,
child: Text(
- TranslationBase.of(context)
- .deleteView,
+ TranslationBase.of(context).deleteView,
)),
],
),
Column(children: [
Row(children: [
Expanded(flex: 3, child: AppText('Name')),
- Expanded(flex: 1, child: AppText('Allow')),
- Expanded(flex: 1, child: AppText('Reject')),
+ Expanded(flex: 1, child: AppText('Delete')),
]),
Column(
- children: snapshot
- .data['GetAllPendingRecordsList']
+ children: familyFileProvider.allSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList
.map((result) {
return Padding(
padding: EdgeInsets.all(10),
@@ -285,20 +439,7 @@ class _MyFamily extends State with TickerProviderStateMixin {
children: [
Expanded(
flex: 3,
- child:
- Text(result.patientName)),
- Expanded(
- flex: 1,
- child: IconButton(
- icon: Icon(
- Icons.check_circle,
- color: Colors.black,
- ),
- onPressed: () {
- acceptRequest(
- result, context);
- },
- )),
+ child: Text(result.patientName)),
Expanded(
flex: 1,
child: IconButton(
@@ -310,7 +451,7 @@ class _MyFamily extends State with TickerProviderStateMixin {
deleteRequest(
result, context);
},
- ))
+ )),
],
));
}).toList())
@@ -320,143 +461,9 @@ class _MyFamily extends State with TickerProviderStateMixin {
}
})
],
- ),
- ),
- RoundedContainer(
- child: ExpansionTile(
- title: Text(
- TranslationBase.of(context).sentRequest,
- style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold),
- ),
- children: [
- FutureBuilder(
- future: getSentRequest(), // async work
- builder: (BuildContext context,
- AsyncSnapshot
- snapshot) {
- switch (snapshot.connectionState) {
- case ConnectionState.waiting:
- return Padding(
- padding: EdgeInsets.only(top: 50),
- child: Text('Loading....'));
- default:
- if (snapshot.hasError)
- return Padding(
- padding: EdgeInsets.all(10),
- child: Text('No data found'));
- else
- return SingleChildScrollView(
- child: Container(
- height: SizeConfig.screenHeight * .3,
- child: ListView(
- children: snapshot
- .data.getAllSharedRecordsByStatusList
- .map((result) {
- return Padding(
- padding: EdgeInsets.all(10),
- child: Row(
- children: [
- Expanded(
- flex: 3,
- child:
- Text(result.patientName)),
- Expanded(
- flex: 2,
- child: AppText(
- result.statusDescription,
- color: Colors.red,
- )),
- ],
- ));
- }).toList(),
- )));
- }
- })
- ],
- )),
- RoundedContainer(
- child: ExpansionTile(
- title: Text(
- TranslationBase.of(context).userView,
- style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold),
- ),
- children: [
- FutureBuilder(
- future: getUserViewRequest(), // async work
- builder:
- (BuildContext context, AsyncSnapshot snapshot) {
- switch (snapshot.connectionState) {
- case ConnectionState.waiting:
- return Padding(
- padding: EdgeInsets.only(top: 50),
- child: Text('Loading....'));
- default:
- if (snapshot.hasError)
- return Padding(
- padding: EdgeInsets.all(10),
- child: Text('No data found'));
- else
- return Column(
- children: [
- Row(
- mainAxisAlignment:
- MainAxisAlignment.spaceBetween,
- children: [
- Expanded(
- flex: 3,
- child: Text(
- TranslationBase.of(context).request)),
- Expanded(
- flex: 2,
- child: Text(
- TranslationBase.of(context).switchUser,
- )),
- Expanded(
- flex: 1,
- child: Text(
- TranslationBase.of(context).deleteView,
- )),
- ],
- ),
- Column(children: [
- Row(children: [
- Expanded(flex: 3, child: AppText('Name')),
- Expanded(flex: 1, child: AppText('Delete')),
- ]),
- Column(
- children: snapshot
- .data['GetAllPendingRecordsList']
- .map((result) {
- return Padding(
- padding: EdgeInsets.all(10),
- child: Row(
- children: [
- Expanded(
- flex: 3,
- child: Text(result.patientName)),
- Expanded(
- flex: 1,
- child: IconButton(
- icon: Icon(
- Icons.delete,
- color: Colors.black,
- ),
- onPressed: () {
- deleteRequest(
- result, context);
- },
- )),
- ],
- ));
- }).toList())
- ])
- ],
- );
- }
- })
- ],
- ))
- ],
+ ))
+ ],
+ ),
),
);
}
@@ -512,17 +519,19 @@ class _MyFamily extends State with TickerProviderStateMixin {
}
switchUser(user, context) {
- Utils.showProgressDialog(context);
+ GifLoaderDialogUtils.showMyDialog(context);
this
.familyFileProvider
.silentLoggin(user)
.then((value) => loginAfter(value, context));
}
- loginAfter(result, context) {
- Utils.hideProgressDialog();
+ loginAfter(result, context) async{
+ GifLoaderDialogUtils.hideDialog(context);
+ var familyFile = await sharedPref.getObject(FAMILY_FILE);
result = CheckActivationCode.fromJson(result);
this.sharedPref.clear();
+ this.sharedPref.setObject(FAMILY_FILE, familyFile);
this.sharedPref.setObject(USER_PROFILE, result.list);
this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID);
this.sharedPref.setString(TOKEN, result.authenticationTokenID);
diff --git a/lib/pages/DrawerPages/notifications/notification_details_page.dart b/lib/pages/DrawerPages/notifications/notification_details_page.dart
new file mode 100644
index 00000000..3858c940
--- /dev/null
+++ b/lib/pages/DrawerPages/notifications/notification_details_page.dart
@@ -0,0 +1,103 @@
+import 'package:diplomaticquarterapp/core/model/notifications/get_notifications_response_model.dart';
+import 'package:diplomaticquarterapp/core/viewModels/notifications_view_model.dart';
+import 'package:diplomaticquarterapp/pages/base/base_view.dart';
+import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
+import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
+import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
+import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
+import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart';
+import 'package:flutter/material.dart';
+
+class NotificationsDetailsPage extends StatelessWidget {
+ final GetNotificationsResponseModel notification;
+
+ NotificationsDetailsPage({this.notification});
+
+ getDateForm(String date) {
+ DateTime d = DateUtil.convertStringToDate(date);
+ String monthName = DateUtil.getMonth(d.month).toString();
+ TimeOfDay timeOfDay = TimeOfDay(hour: d.hour, minute: d.minute);
+ String minute = timeOfDay.minute < 10
+ ? timeOfDay.minute.toString().padLeft(2, '0')
+ : timeOfDay.minute.toString();
+
+ String hour = '${timeOfDay.hourOfPeriod}:$minute';
+ if (timeOfDay.period == DayPeriod.am) {
+ hour = hour + "AM";
+ } else {
+ {
+ hour = hour + "PM";
+ }
+ }
+ return monthName + ',${d.day},${d.year}, $hour';
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return BaseView(
+ builder: (_, model, widget) => AppScaffold(
+ isShowAppBar: true,
+ appBarTitle: TranslationBase.of(context).notificationDetails,
+ body: SingleChildScrollView(
+ child: Center(
+ child: FractionallySizedBox(
+ widthFactor: 0.9,
+ child: Column(
+ children: [
+ SizedBox(
+ height: 25,
+ ),
+ Container(
+ // margin: EdgeInsets.only(left: 30),
+ width: double.infinity,
+ color: Colors.grey[400],
+ child: Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: Texts(
+ getDateForm(notification.createdOn),
+ fontSize: 16,
+ ),
+ ),
+ ),
+ SizedBox(
+ height: 15,
+ ),
+ if (notification.messageTypeData.length != 0)
+ FractionallySizedBox(
+ widthFactor: 0.9,
+ child: Image.network(notification.messageTypeData,
+ loadingBuilder: (BuildContext context, Widget child,
+ ImageChunkEvent loadingProgress) {
+ if (loadingProgress == null) return child;
+ return Center(
+ child: SizedBox(
+ width: 40.0,
+ height: 40.0,
+ child: AppCircularProgressIndicator(),
+ ),
+ );
+ },
+ fit: BoxFit
+ .fill) //Image.network(notification.messageTypeData),
+ ),
+ SizedBox(
+ height: 15,
+ ),
+ Row(
+ children: [
+ Expanded(
+ child: Center(
+ child: Texts(notification.message),
+ ),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/pages/DrawerPages/notifications/notifications_page.dart b/lib/pages/DrawerPages/notifications/notifications_page.dart
new file mode 100644
index 00000000..53aad843
--- /dev/null
+++ b/lib/pages/DrawerPages/notifications/notifications_page.dart
@@ -0,0 +1,148 @@
+import 'package:diplomaticquarterapp/core/model/notifications/get_notifications_request_model.dart';
+import 'package:diplomaticquarterapp/core/viewModels/notifications_view_model.dart';
+import 'package:diplomaticquarterapp/pages/DrawerPages/notifications/notification_details_page.dart';
+import 'package:diplomaticquarterapp/pages/base/base_view.dart';
+import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
+import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
+import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
+import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
+import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
+import 'package:flutter/material.dart';
+import 'package:font_awesome_flutter/font_awesome_flutter.dart';
+
+// ignore: must_be_immutable
+class NotificationsPage extends StatelessWidget {
+ getDateForm(String date) {
+ DateTime d = DateUtil.convertStringToDate(date);
+ String monthName = DateUtil.getMonth(d.month).toString();
+ TimeOfDay timeOfDay = TimeOfDay(hour: d.hour, minute: d.minute);
+ String minute = timeOfDay.minute < 10
+ ? timeOfDay.minute.toString().padLeft(2, '0')
+ : timeOfDay.minute.toString();
+
+ String hour = '${timeOfDay.hourOfPeriod}:$minute';
+ if (timeOfDay.period == DayPeriod.am) {
+ hour = hour + "AM";
+ } else {
+ {
+ hour = hour + "PM";
+ }
+ }
+
+ //DayPeriod.am
+ return monthName + ',${d.day},${d.year}, $hour';
+ }
+
+ int currentIndex = 0;
+
+ @override
+ Widget build(BuildContext context) {
+ var prescriptionReport;
+ return BaseView(
+ onModelReady: (model) {
+ GetNotificationsRequestModel getNotificationsRequestModel =
+ new GetNotificationsRequestModel(
+ currentPage: currentIndex,
+ pagingSize: 14,
+ notificationStatusID: 2);
+
+ model.getNotifications(getNotificationsRequestModel, context);
+ },
+ builder: (_, model, widget) => AppScaffold(
+ isShowAppBar: true,
+ appBarTitle: TranslationBase.of(context).notifications,
+ baseViewModel: model,
+ body: ListView(
+ children: model.notifications
+ .map(
+ (notification) => InkWell(
+ onTap: () async {
+ if(!notification.isRead)
+ model.markAsRead(notification.id);
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (BuildContext context) =>
+ NotificationsDetailsPage(
+ notification: notification,
+ )));
+ },
+ child: Container(
+ width: double.infinity,
+ margin: EdgeInsets.only(
+ top: 5, left: 10, right: 10, bottom: 5),
+ padding: EdgeInsets.all(8.0),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.all(
+ Radius.circular(10.0),
+ ),
+ border: Border.all(
+ color: notification.isRead
+ ? Colors.grey[200]
+ : Theme.of(context).primaryColor,
+ width: 0.5),
+ ),
+ child: Row(
+ children: [
+ Expanded(
+ child: Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Texts(getDateForm(notification.createdOn)),
+ SizedBox(
+ height: 5,
+ ),
+ Row(
+ children: [
+ Expanded(
+ child: Texts(notification.message)),
+ if (notification.messageType == "image")
+ Icon(FontAwesomeIcons.images)
+ ],
+ ),
+ SizedBox(
+ height: 5,
+ ),
+ ],
+ ),
+ ),
+ ),
+ SizedBox(
+ width: 15,
+ ),
+ ],
+ ),
+ ),
+ ),
+ )
+ .toList()
+ ..add(
+ InkWell(
+ onTap: () async {
+ GifLoaderDialogUtils.showMyDialog(
+ context);
+ currentIndex++;
+ GetNotificationsRequestModel
+ getNotificationsRequestModel =
+ new GetNotificationsRequestModel(
+ currentPage: currentIndex,
+ pagingSize: 14,
+ notificationStatusID: 2);
+
+ await model.getNotifications(getNotificationsRequestModel,context);
+ GifLoaderDialogUtils.hideDialog(
+ context);
+
+ },
+ child: Center(
+ child: Image.asset('assets/images/notf.png'),
+ ),
+ ),
+ )),
+ ),
+ );
+ }
+}
diff --git a/lib/pages/MyAppointments/MyAppointments.dart b/lib/pages/MyAppointments/MyAppointments.dart
index 379c6e71..95485da5 100644
--- a/lib/pages/MyAppointments/MyAppointments.dart
+++ b/lib/pages/MyAppointments/MyAppointments.dart
@@ -1,15 +1,19 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
+import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
+import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
+import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/AppointmentCardView.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
+import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
-import 'package:smart_progress_bar/smart_progress_bar.dart';
+import 'package:provider/provider.dart';
class MyAppointments extends StatefulWidget {
List appoList = [];
@@ -33,11 +37,15 @@ class _MyAppointmentsState extends State
bool isDataLoaded = false;
var sharedPref = new AppSharedPreferences();
+ AuthenticatedUserObject authenticatedUserObject =
+ locator();
+
@override
void initState() {
_tabController = new TabController(length: 3, vsync: this);
- WidgetsBinding.instance
- .addPostFrameCallback((_) => getPatientAppointmentHistory());
+ WidgetsBinding.instance.addPostFrameCallback((_) {
+ if (Provider.of(context, listen: false).isLogin) getPatientAppointmentHistory();
+ });
super.initState();
}
@@ -77,14 +85,21 @@ class _MyAppointmentsState extends State
}
getPatientAppointmentHistory() {
+ GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
widget.appoList.clear();
widget.bookedAppoList.clear();
widget.confirmedAppoList.clear();
widget.arrivedAppoList.clear();
+
+ widget._patientBookedAppointmentListHospital.clear();
+ widget._patientConfirmedAppointmentListHospital.clear();
+ widget._patientArrivedAppointmentListHospital.clear();
+
service.getPatientAppointmentHistory(false, context).then((res) {
print(res['AppoimentAllHistoryResultList'].length);
if (res['MessageStatus'] == 1) {
+ GifLoaderDialogUtils.hideDialog(context);
setState(() {
if (res['AppoimentAllHistoryResultList'].length != 0) {
res['AppoimentAllHistoryResultList'].forEach((v) {
@@ -100,11 +115,11 @@ class _MyAppointmentsState extends State
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
+ GifLoaderDialogUtils.hideDialog(context);
print(err);
AppToast.showErrorToast(message: err);
Navigator.of(context).pop();
- }).showProgressBar(
- text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ });
}
bool isConfirmed(AppoitmentAllHistoryResultList appo) {
@@ -228,91 +243,57 @@ class _MyAppointmentsState extends State
Widget getBookedAppointments() {
return Container(
+ child: Container(
child: widget.bookedAppoList.length != 0
- ? new ListView.builder(
- itemCount: widget.bookedAppoList.length,
- itemBuilder: (context, i) {
- return AppointmentCard(
- appo: widget.bookedAppoList[i],
- onReloadAppointmentHistory: getPatientAppointmentHistory,
- );
- },
+ ? SingleChildScrollView(
+ physics: BouncingScrollPhysics(),
+ child: Column(
+ children: [
+ ...List.generate(
+ widget._patientBookedAppointmentListHospital.length,
+ (index) => AppExpandableNotifier(
+ title: widget
+ ._patientBookedAppointmentListHospital[index]
+ .filterName,
+ bodyWidget: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: widget
+ ._patientBookedAppointmentListHospital[index]
+ .patientDoctorAppointmentList
+ .map((doctor) {
+ return AppointmentCard(
+ appo: doctor,
+ onReloadAppointmentHistory:
+ getPatientAppointmentHistory,
+ );
+ }).toList(),
+ )),
+ )
+ ],
+ ),
)
: Container(
child: Center(
- child: Column(
- mainAxisAlignment: MainAxisAlignment.center,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- // Image.asset(
- // "assets/images/new-design/noAppointmentIcon.png"),
- // Container(
- // margin: EdgeInsets.only(top: 10.0),
- // child: Text(TranslationBase.of(context).noBookedAppointments,
- // style: TextStyle(
- // fontSize: 16.0,
- // )),
- // ),
- Container(
- margin: EdgeInsets.only(top: 10.0),
- child: Container(
- child: widget.bookedAppoList.length != 0
- ? SingleChildScrollView(
- physics: BouncingScrollPhysics(),
- child: Column(
- children: [
- ...List.generate(
- widget._patientBookedAppointmentListHospital
- .length,
- (index) => AppExpandableNotifier(
- title: widget
- ._patientBookedAppointmentListHospital[
- index]
- .filterName,
- bodyWidget: Column(
- crossAxisAlignment:
- CrossAxisAlignment.start,
- mainAxisAlignment:
- MainAxisAlignment.spaceBetween,
- children: widget
- ._patientBookedAppointmentListHospital[
- index]
- .patientDoctorAppointmentList
- .map((doctor) {
- return AppointmentCard(
- appo: doctor,
- onReloadAppointmentHistory:
- getPatientAppointmentHistory,
- );
- }).toList(),
- )),
- )
- ],
- ),
- )
- : Container(
- child: Center(
- child: Column(
- mainAxisAlignment: MainAxisAlignment.center,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- Image.asset(
- "assets/images/new-design/noAppointmentIcon.png"),
- Container(
- margin: EdgeInsets.only(top: 10.0),
- child: Text("No Booked Appointments",
- style: TextStyle(
- fontSize: 16.0,
- )),
- ),
- ],
- ),
- ),
- ),
- ),
- )
- ],
- ))));
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ Image.asset(
+ "assets/images/new-design/noAppointmentIcon.png"),
+ Container(
+ margin: EdgeInsets.only(top: 10.0),
+ child: Text("No Booked Appointments",
+ style: TextStyle(
+ fontSize: 16.0,
+ )),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ );
}
Widget getConfirmedAppointments() {
diff --git a/lib/pages/MyAppointments/widgets/AppointmentActions.dart b/lib/pages/MyAppointments/widgets/AppointmentActions.dart
index 18740ce7..7bb45bad 100644
--- a/lib/pages/MyAppointments/widgets/AppointmentActions.dart
+++ b/lib/pages/MyAppointments/widgets/AppointmentActions.dart
@@ -18,12 +18,12 @@ import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_details_p
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
+import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
-import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'package:url_launcher/url_launcher.dart';
class AppointmentActions extends StatefulWidget {
@@ -94,7 +94,7 @@ class _AppointmentActionsState extends State {
child: Text(e.title,
overflow: TextOverflow.clip,
style: TextStyle(
- color: new Color(0xFFc5272d),
+ color: new Color(0xFF40ACC9),
letterSpacing: 1.0,
fontSize: 20.0)),
),
@@ -351,49 +351,49 @@ class _AppointmentActionsState extends State {
cancelAppointment() {
ConfirmDialog.closeAlertDialog(context);
+ GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
- service
- .cancelAppointment(widget.appo, context)
- .then((res) {
- print(res);
- if (res['MessageStatus'] == 1) {
- AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
- } else {
- AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
- }
- })
- .catchError((err) {
- print(err);
- })
- .showProgressBar(
- text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6))
- .then((value) {
- Navigator.of(context).pop();
- });
+ service.cancelAppointment(widget.appo, context).then((res) {
+ GifLoaderDialogUtils.hideDialog(context);
+ print(res);
+ if (res['MessageStatus'] == 1) {
+ AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
+ Navigator.of(context).pop();
+ } else {
+ AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
+ }
+ }).catchError((err) {
+ GifLoaderDialogUtils.hideDialog(context);
+ print(err);
+ });
}
openAppointmentRadiology() {
+ GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
FinalRadiology finalRadiology = new FinalRadiology();
service
.getPatientRadOrders(widget.appo.appointmentNo.toString(), context)
.then((res) {
+ GifLoaderDialogUtils.hideDialog(context);
print(res['FinalRadiologyList']);
finalRadiology =
new FinalRadiology.fromJson(res['FinalRadiologyList'][0]);
print(finalRadiology.reportData);
navigateToRadiologyDetails(finalRadiology);
}).catchError((err) {
+ GifLoaderDialogUtils.hideDialog(context);
print(err);
AppToast.showErrorToast(message: err);
- }).showProgressBar(
- text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ });
}
openPrescriptionReport() {
+ GifLoaderDialogUtils.showMyDialog(context);
List prescriptionReportEnhList = List();
DoctorsListService service = new DoctorsListService();
service.getPatientPrescriptionReports(widget.appo, context).then((res) {
+ GifLoaderDialogUtils.hideDialog(context);
res['ListPRM'].forEach((report) {
prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(report));
});
@@ -405,10 +405,10 @@ class _AppointmentActionsState extends State {
AppToast.showErrorToast(message: "Sorry there is no data");
}
}).catchError((err) {
+ GifLoaderDialogUtils.hideDialog(context);
print(err);
AppToast.showErrorToast(message: err);
- }).showProgressBar(
- text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ });
}
Future navigateToMedicinePrescriptionReport(
@@ -463,8 +463,10 @@ class _AppointmentActionsState extends State {
}
askYourDoc() {
+ GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.isAllowedToAskDoctor(widget.appo.doctorID, context).then((res) {
+ GifLoaderDialogUtils.hideDialog(context);
print(res['PatientDoctorAppointmentResultList']);
if (res['PatientDoctorAppointmentResultList'].length != 0) {
getCallRequestType();
@@ -473,15 +475,17 @@ class _AppointmentActionsState extends State {
message: TranslationBase.of(context).askDocNotAllowed);
}
}).catchError((err) {
+ GifLoaderDialogUtils.hideDialog(context);
print(err);
AppToast.showErrorToast(message: err);
- }).showProgressBar(
- text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ });
}
getCallRequestType() {
+ GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.getCallRequestType(context).then((res) {
+ GifLoaderDialogUtils.hideDialog(context);
List requestData = new List();
res['ListReqTypes'].forEach((element) {
requestData.add(new AskDocRequestType.fromJson(element));
@@ -490,9 +494,9 @@ class _AppointmentActionsState extends State {
showAskDocRequestDialog(requestData);
});
}).catchError((err) {
+ GifLoaderDialogUtils.hideDialog(context);
print(err);
- }).showProgressBar(
- text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ });
}
showAskDocRequestDialog(List requestData) {
@@ -525,28 +529,32 @@ class _AppointmentActionsState extends State {
}
sendAskDocRequest(int requestType) {
+ GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service
.sendAskDocCallRequest(widget.appo, requestType.toString(), context)
.then((res) {
+ GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: "Request Sent Successfully");
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
+ GifLoaderDialogUtils.hideDialog(context);
print(err);
AppToast.showErrorToast(message: err);
- }).showProgressBar(
- text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ });
}
confirmAppointment() {
+ GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service
.confirmAppointment(widget.appo.appointmentNo, widget.appo.clinicID,
widget.appo.projectID, widget.appo.isLiveCareAppointment, context)
.then((res) {
+ GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
Navigator.of(context).pop();
@@ -554,9 +562,9 @@ class _AppointmentActionsState extends State {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
+ GifLoaderDialogUtils.hideDialog(context);
print(err);
- }).showProgressBar(
- text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ });
}
navigateToInsuranceApprovals(int appoNo) {
diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart
index 9ba57084..b0315d28 100644
--- a/lib/pages/ToDoList/ToDo.dart
+++ b/lib/pages/ToDoList/ToDo.dart
@@ -1,4 +1,6 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
+import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
+import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
@@ -7,10 +9,10 @@ import 'package:diplomaticquarterapp/pages/MyAppointments/AppointmentDetails.dar
import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/widgets/paymentDialog.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
-import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
+import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
@@ -18,7 +20,6 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:rating_bar/rating_bar.dart';
-import 'package:smart_progress_bar/smart_progress_bar.dart';
class ToDo extends StatefulWidget {
PatientShareResponse patientShareResponse;
@@ -34,13 +35,15 @@ class _ToDoState extends State {
AppSharedPreferences sharedPref = AppSharedPreferences();
AuthenticatedUser authUser;
- AuthProvider authProvider = new AuthProvider();
+ AuthenticatedUserObject authenticatedUserObject =
+ locator();
@override
void initState() {
widget.patientShareResponse = new PatientShareResponse();
- WidgetsBinding.instance
- .addPostFrameCallback((_) => getPatientAppointmentHistory());
+ WidgetsBinding.instance.addPostFrameCallback((_) {
+ if (authenticatedUserObject.isLogin) getPatientAppointmentHistory();
+ });
super.initState();
}
@@ -82,7 +85,7 @@ class _ToDoState extends State {
height: 20.0),
Container(
margin:
- EdgeInsets.only(left: 5.0, right: 25.0),
+ EdgeInsets.only(left: 5.0, right: 20.0),
child: Text(
getDate(widget
.appoList[index].appointmentDate),
@@ -106,7 +109,14 @@ class _ToDoState extends State {
TranslationBase.of(context)
.liveCareAppo,
style: TextStyle(fontSize: 12.0))
- : Text(widget.appoList[index].projectName != null ? widget.appoList[index].projectName : "-",
+ : Text(
+ widget.appoList[index].projectName !=
+ null
+ ? widget
+ .appoList[index].projectName
+ : "-",
+ overflow: TextOverflow.clip,
+ maxLines: 2,
style: TextStyle(fontSize: 11.0)),
),
],
@@ -253,7 +263,7 @@ class _ToDoState extends State