diff --git a/android/app/build.gradle b/android/app/build.gradle index bdabb828..965934fd 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -21,6 +21,12 @@ if (flutterVersionName == null) { flutterVersionName = '1.0' } +def keystoreProperties = new Properties() +def keystorePropertiesFile = rootProject.file('key.properties') +if (keystorePropertiesFile.exists()) { + keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) +} + apply plugin: 'com.android.application' apply plugin: 'com.huawei.agconnect' apply plugin: 'kotlin-android' @@ -51,29 +57,29 @@ android { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.ejada.hmg" minSdkVersion 21 - targetSdkVersion 30 + targetSdkVersion 33 versionCode flutterVersionCode.toInteger() versionName flutterVersionName multiDexEnabled true } signingConfigs { - config{ - storeFile file('key') - keyAlias 'hmg' - storePassword 'HmGsa123' - keyPassword 'HmGsa123' + release { + keyAlias keystoreProperties['keyAlias'] + keyPassword keystoreProperties['keyPassword'] + storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null + storePassword keystoreProperties['storePassword'] } } buildTypes { debug { debuggable true - signingConfig signingConfigs.config + signingConfig signingConfigs.release } release { debuggable false - signingConfig signingConfigs.config + signingConfig signingConfigs.release minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' @@ -127,10 +133,11 @@ dependencies { implementation 'com.github.kittinunf.fuel:fuel-android:2.3.0' implementation 'com.google.android.gms:play-services-location:17.1.0'//for Android implementation 'com.google.android.gms:play-services-basement:17.5.0' - implementation "com.opentok.android:opentok-android-sdk:2.19.1" + implementation "com.opentok.android:opentok-android-sdk:2.21.4" implementation 'com.facebook.stetho:stetho:1.5.1' implementation 'com.facebook.stetho:stetho-urlconnection:1.5.1' implementation 'androidx.core:core-ktx:1.6.0' implementation 'androidx.appcompat:appcompat:1.3.1' + androidTestImplementation "androidx.test:core:1.4.0" } diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index ab5e631b..6c937f09 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -4,4 +4,4 @@ to allow setting breakpoints, to provide hot reload, etc. --> - + \ No newline at end of file diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index e6601b40..de6f8030 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -6,6 +6,7 @@ In most cases you can leave this as-is, but you if you want to provide additional functionality it is fine to subclass or reimplement FlutterApplication and put your custom class here. --> + @@ -34,9 +35,9 @@ - + - + @@ -49,7 +50,6 @@ android:showOnLockScreen="true" android:screenOrientation="sensorPortrait" android:allowBackup="false" - tools:replace="android:allowBackup,android:label" android:label="Dr. Alhabib"> @@ -89,23 +89,23 @@ - - - - - - + + + + + + - - + + - + @@ -117,20 +117,19 @@ Huawei Push Notifications Set push kit auto enable to true (for obtaining the token on initialize) --> - + + + - + - + android:enabled="true" + android:exported="false" /> - - - - + + + + diff --git a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/geofence/intent_receivers/GeofenceBroadcastReceiver.kt b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/geofence/intent_receivers/GeofenceBroadcastReceiver.kt index 2820daae..2ed2daf4 100644 --- a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/geofence/intent_receivers/GeofenceBroadcastReceiver.kt +++ b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/geofence/intent_receivers/GeofenceBroadcastReceiver.kt @@ -1,7 +1,6 @@ - - package com.ejada.hmg.geofence.intent_receivers +import android.annotation.SuppressLint import android.content.BroadcastReceiver import android.content.Context import android.content.Intent @@ -13,37 +12,60 @@ import com.google.android.gms.location.GeofenceStatusCodes import com.google.android.gms.location.GeofencingEvent class GeofenceBroadcastReceiver : BroadcastReceiver() { - private val LOG_TAG = "GeofenceBroadcastReceiver" - override fun onReceive(context: Context, intent: Intent) { - - val geofencingEvent = GeofencingEvent.fromIntent(intent) - if (geofencingEvent.hasError()) { - val errorMessage = GeofenceErrorMessages.getErrorString(context, geofencingEvent.errorCode) - Log.e(LOG_TAG, errorMessage) - - Logs.GeofenceEvent.save(context,LOG_TAG,"Error while triggering geofence event",Logs.STATUS.ERROR) - doReRegisterIfRequired(context,geofencingEvent.errorCode) - - return - } + private val LOG_TAG = "GeofenceBroadcastReceiver" + + @SuppressLint("LongLogTag") + override fun onReceive(context: Context, intent: Intent) { + + val geofencingEvent = GeofencingEvent.fromIntent(intent) + if (geofencingEvent != null) { + if (geofencingEvent.hasError()) { + val errorMessage = + GeofenceErrorMessages.getErrorString(context, geofencingEvent.errorCode) + Log.e(LOG_TAG, errorMessage) - Logs.GeofenceEvent.save(context,LOG_TAG,"Geofence event triggered: ${GeofenceTransition.fromInt(geofencingEvent.geofenceTransition).value} for ${geofencingEvent.triggeringGeofences.map {it.requestId}}",Logs.STATUS.SUCCESS) - HMG_Geofence.shared(context).handleEvent(geofencingEvent.triggeringGeofences,geofencingEvent.triggeringLocation, GeofenceTransition.fromInt(geofencingEvent.geofenceTransition)); - - } + Logs.GeofenceEvent.save( + context, + LOG_TAG, + "Error while triggering geofence event", + Logs.STATUS.ERROR + ) + doReRegisterIfRequired(context, geofencingEvent.errorCode) - fun doReRegisterIfRequired(context: Context, errorCode: Int){ - val errorRequiredReregister = listOf( + return + } + } + if (geofencingEvent != null) { + Logs.GeofenceEvent.save( + context, + LOG_TAG, + "Geofence event triggered: ${GeofenceTransition.fromInt(geofencingEvent.geofenceTransition).value} for ${geofencingEvent.triggeringGeofences?.map { it.requestId }}", + Logs.STATUS.SUCCESS + ) + geofencingEvent.triggeringLocation?.let { + geofencingEvent.triggeringGeofences?.let { it1 -> + HMG_Geofence.shared(context).handleEvent( + it1, + it, GeofenceTransition.fromInt(geofencingEvent.geofenceTransition) + ) + } + } + }; + + } + + fun doReRegisterIfRequired(context: Context, errorCode: Int) { + val errorRequiredReregister = listOf( GeofenceStatusCodes.GEOFENCE_NOT_AVAILABLE, GeofenceStatusCodes.GEOFENCE_TOO_MANY_GEOFENCES, GeofenceStatusCodes.GEOFENCE_TOO_MANY_PENDING_INTENTS, GeofenceStatusCodes.GEOFENCE_REQUEST_TOO_FREQUENT - ) + ) - if(errorRequiredReregister.contains(errorCode)) - HMG_Geofence.shared(context).register(){ status, error -> + if (errorRequiredReregister.contains(errorCode)) + HMG_Geofence.shared(context).register() { status, error -> - } + } - } + } } \ No newline at end of file diff --git a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/geofence/intent_receivers/GeofenceTransitionsJobIntentService.kt b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/geofence/intent_receivers/GeofenceTransitionsJobIntentService.kt index 21090f0f..b083e04e 100644 --- a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/geofence/intent_receivers/GeofenceTransitionsJobIntentService.kt +++ b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/geofence/intent_receivers/GeofenceTransitionsJobIntentService.kt @@ -59,18 +59,25 @@ class GeofenceTransitionsJobIntentService : JobIntentService() { override fun onHandleWork(intent: Intent) { val geofencingEvent = GeofencingEvent.fromIntent(intent) - if (geofencingEvent.hasError()) { - val errorMessage = GeofenceErrorMessages.getErrorString(context_!!, geofencingEvent.errorCode) - Log.e(LOG_TAG, errorMessage) + if (geofencingEvent != null) { + if (geofencingEvent.hasError()) { + val errorMessage = GeofenceErrorMessages.getErrorString(context_!!, geofencingEvent.errorCode) + Log.e(LOG_TAG, errorMessage) - saveLog(context_!!,LOG_TAG,errorMessage) - doReRegisterIfRequired(context_!!, geofencingEvent.errorCode) + saveLog(context_!!,LOG_TAG,errorMessage) + doReRegisterIfRequired(context_!!, geofencingEvent.errorCode) - return - } + return + } + } - HMG_Geofence.shared(context_!!).handleEvent(geofencingEvent.triggeringGeofences,geofencingEvent.triggeringLocation, GeofenceTransition.fromInt(geofencingEvent.geofenceTransition)); + if (geofencingEvent != null) { + geofencingEvent.triggeringGeofences?.let { geofencingEvent.triggeringLocation?.let { it1 -> + HMG_Geofence.shared(context_!!).handleEvent(it, + it1, GeofenceTransition.fromInt(geofencingEvent.geofenceTransition)) + } } + }; } diff --git a/android/build.gradle b/android/build.gradle index edb27f2a..e723adba 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -11,7 +11,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:7.0.3' + classpath 'com.android.tools.build:gradle:7.1.3' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'com.google.gms:google-services:4.3.8' // classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1' diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 6e8ae021..1acad296 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip diff --git a/assets/images/new/booth_image.png b/assets/images/new/booth_image.png new file mode 100644 index 00000000..0a3427e4 Binary files /dev/null and b/assets/images/new/booth_image.png differ diff --git a/ios/Podfile b/ios/Podfile index ebcf3c8c..c92f7e80 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -40,7 +40,19 @@ post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) target.build_configurations.each do |build_configuration| + build_configuration.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [ + '$(inherited)', + ## dart: [PermissionGroup.location, PermissionGroup.locationAlways, PermissionGroup.locationWhenInUse] + 'PERMISSION_LOCATION=1', + 'PERMISSION_CAMERA=1', + 'PERMISSION_MICROPHONE=1', + ## dart: PermissionGroup.calendar + 'PERMISSION_EVENTS=1', + ## dart: PermissionGroup.reminders + 'PERMISSION_REMINDERS=1', + ] build_configuration.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64 i386' + build_configuration.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0' if build_configuration.build_settings['WRAPPER_EXTENSION'] == 'bundle' build_configuration.build_settings['DEVELOPMENT_TEAM'] = '3A359E86ZF' end diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index f43f5eaf..5fea0490 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -19,10 +19,10 @@ 76815B27275F381C00E66E94 /* HealthKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76815B26275F381C00E66E94 /* HealthKit.framework */; }; 76962ECE28AE5C10004EAE09 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 76962ECD28AE5C10004EAE09 /* GoogleService-Info.plist */; }; 76F2556127F1FFED0062C1CD /* PassKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76F2556027F1FFED0062C1CD /* PassKit.framework */; }; - 888788C5457DD4B4291ED407 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DBECDFA177FC32F0D92001A8 /* Pods_Runner.framework */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; + B40C32A62DF065A3A0414845 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B99ADD0B93AC14DD8D0BAB0 /* Pods_Runner.framework */; }; E91B5396256AAA6500E96549 /* GlobalHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = E91B538D256AAA6500E96549 /* GlobalHelper.swift */; }; E91B5397256AAA6500E96549 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = E91B538E256AAA6500E96549 /* Extensions.swift */; }; E91B5398256AAA6500E96549 /* API.swift in Sources */ = {isa = PBXBuildFile; fileRef = E91B538F256AAA6500E96549 /* API.swift */; }; @@ -63,7 +63,6 @@ 306FE6C7271D790C002D6EFC /* OpenTokPlatformBridge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenTokPlatformBridge.swift; sourceTree = ""; }; 306FE6CA271D8B73002D6EFC /* OpenTok.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenTok.swift; sourceTree = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 7339683046E679D7577A50D3 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 762D738C274E42650063CE73 /* ring_30Sec.caf */ = {isa = PBXFileReference; lastKnownFileType = file; name = ring_30Sec.caf; path = ../../assets/sounds/ring_30Sec.caf; sourceTree = ""; }; @@ -71,7 +70,9 @@ 76815B26275F381C00E66E94 /* HealthKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = HealthKit.framework; path = System/Library/Frameworks/HealthKit.framework; sourceTree = SDKROOT; }; 76962ECD28AE5C10004EAE09 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; 76F2556027F1FFED0062C1CD /* PassKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PassKit.framework; path = System/Library/Frameworks/PassKit.framework; sourceTree = SDKROOT; }; + 7805E271E86E72F39E68ADCC /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 8B99ADD0B93AC14DD8D0BAB0 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -79,9 +80,7 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - C43E6143D6D42F3BF36E6E30 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; - DBECDFA177FC32F0D92001A8 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - E88A1DAFD417EE86EE2F7F02 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + BC1BA79F1F6E9D7BE59D2AE4 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; E91B538D256AAA6500E96549 /* GlobalHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GlobalHelper.swift; sourceTree = ""; }; E91B538E256AAA6500E96549 /* Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; E91B538F256AAA6500E96549 /* API.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = API.swift; sourceTree = ""; }; @@ -100,6 +99,7 @@ E9C8C135256BACDA00EFFB62 /* HMG_Guest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMG_Guest.swift; sourceTree = ""; }; E9E27167256E3A4000F49B69 /* LocalizedFromFlutter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalizedFromFlutter.swift; sourceTree = ""; }; E9F7623A25922BCE00FB5CCF /* FlutterConstants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FlutterConstants.swift; sourceTree = ""; }; + EBA301C32F4CA9F09D2D7713 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -110,7 +110,7 @@ 76F2556127F1FFED0062C1CD /* PassKit.framework in Frameworks */, 76815B27275F381C00E66E94 /* HealthKit.framework in Frameworks */, E9620805255C2ED100D3A35D /* NetworkExtension.framework in Frameworks */, - 888788C5457DD4B4291ED407 /* Pods_Runner.framework in Frameworks */, + B40C32A62DF065A3A0414845 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -133,7 +133,7 @@ 76F2556027F1FFED0062C1CD /* PassKit.framework */, 76815B26275F381C00E66E94 /* HealthKit.framework */, E9620804255C2ED100D3A35D /* NetworkExtension.framework */, - DBECDFA177FC32F0D92001A8 /* Pods_Runner.framework */, + 8B99ADD0B93AC14DD8D0BAB0 /* Pods_Runner.framework */, ); name = Frameworks; sourceTree = ""; @@ -141,9 +141,9 @@ 605039E5DDF72C245F9765FE /* Pods */ = { isa = PBXGroup; children = ( - C43E6143D6D42F3BF36E6E30 /* Pods-Runner.debug.xcconfig */, - 7339683046E679D7577A50D3 /* Pods-Runner.release.xcconfig */, - E88A1DAFD417EE86EE2F7F02 /* Pods-Runner.profile.xcconfig */, + EBA301C32F4CA9F09D2D7713 /* Pods-Runner.debug.xcconfig */, + 7805E271E86E72F39E68ADCC /* Pods-Runner.release.xcconfig */, + BC1BA79F1F6E9D7BE59D2AE4 /* Pods-Runner.profile.xcconfig */, ); path = Pods; sourceTree = ""; @@ -246,15 +246,15 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - 6CEC06A85A1BC01F415967B9 /* [CP] Check Pods Manifest.lock */, + A37FFD337A0067237A8DACD6 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - EB708D648E256F1D924823C6 /* [CP] Embed Pods Frameworks */, - 1FDB0C9B620EC9533D2358F3 /* [CP] Copy Pods Resources */, + E1D6AED972DEFC56AA7DB402 /* [CP] Embed Pods Frameworks */, + 541D1D49FBD13BE6BA6DA5BC /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -320,7 +320,21 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 1FDB0C9B620EC9533D2358F3 /* [CP] Copy Pods Resources */ = { + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin\n"; + }; + 541D1D49FBD13BE6BA6DA5BC /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -337,21 +351,21 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; showEnvVarsInLog = 0; }; - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Thin Binary"; + name = "Run Script"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin\n"; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; - 6CEC06A85A1BC01F415967B9 /* [CP] Check Pods Manifest.lock */ = { + A37FFD337A0067237A8DACD6 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -373,21 +387,7 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; - EB708D648E256F1D924823C6 /* [CP] Embed Pods Frameworks */ = { + E1D6AED972DEFC56AA7DB402 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -538,7 +538,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - MARKETING_VERSION = 4.5.56; + MARKETING_VERSION = 4.5.57; PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -682,7 +682,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - MARKETING_VERSION = 4.5.56; + MARKETING_VERSION = 4.5.57; PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -720,7 +720,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - MARKETING_VERSION = 4.5.56; + MARKETING_VERSION = 4.5.57; PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/lib/config/config.dart b/lib/config/config.dart index 9680994d..cd192911 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -3,757 +3,595 @@ import 'dart:io'; import 'package:diplomaticquarterapp/models/Request.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; -var MAX_SMALL_SCREEN = 660; +var MAX_SMALL_SCREEN = 660; final OPENTOK_API_KEY = '46209962'; // final OPENTOK_API_KEY = '47464241'; // PACKAGES and OFFERS -var EXA_CART_API_BASE_URL = 'https://mdlaboratories.com/offersdiscounts'; +var EXA_CART_API_BASE_URL = 'https://mdlaboratories.com/offersdiscounts'; // var EXA_CART_API_BASE_URL = 'http://10.200.101.75:9000'; -var PACKAGES_CATEGORIES = '/api/categories'; -var PACKAGES_STORES = '/api/stores'; -var PACKAGES_TOKEN = '/api/token'; -var PACKAGES_PRODUCTS = '/api/products'; -var PACKAGES_CUSTOMER = '/api/customers'; -var PACKAGES_SHOPPING_CART = '/api/shopping_cart_items'; -var PACKAGES_ORDERS = '/api/orders'; -var PACKAGES_ORDER_HISTORY = '/api/orders/items'; -var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; -// var BASE_URL = 'http://10.50.100.198:3334/'; -// var BASE_URL = 'https://uat.hmgwebservices.com/'; -// var BASE_URL = 'https://hmgwebservices.com/'; -var BASE_URL = 'https://orash.cloudsolutions.com.sa/'; +var PACKAGES_CATEGORIES = '/api/categories'; +var PACKAGES_STORES = '/api/stores'; +var PACKAGES_TOKEN = '/api/token'; +var PACKAGES_PRODUCTS = '/api/products'; +var PACKAGES_CUSTOMER = '/api/customers'; +var PACKAGES_SHOPPING_CART = '/api/shopping_cart_items'; +var PACKAGES_ORDERS = '/api/orders'; +var PACKAGES_ORDER_HISTORY = '/api/orders/items'; +var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; + // var BASE_URL = 'http://10.50.100.198:2018/'; + // var BASE_URL = 'https://uat.hmgwebservices.com/'; +var BASE_URL = 'https://hmgwebservices.com/'; +// var BASE_URL = 'https://orash.cloudsolutions.com.sa/'; +// var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; // Pharmacy UAT URLs // var BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; // var PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; // // Pharmacy Production URLs -var BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/'; -var PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/'; +var BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/'; +var PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/'; // // Pharmacy Pre-Production URLs // var BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapitest/api/'; // var PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapitest/api/'; // RC API URL -var RC_BASE_URL = 'https://rc.hmg.com/'; +var RC_BASE_URL = 'https://rc.hmg.com/'; -var PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity'; +var PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity'; -var GET_PROJECT = 'Services/Lists.svc/REST/GetProject'; +var GET_PROJECT = 'Services/Lists.svc/REST/GetProject'; ///Geofencing -var GET_GEO_ZONES = 'Services/Patients.svc/REST/GeoF_GetAllPoints'; -var LOG_GEO_ZONES = 'Services/Patients.svc/REST/GeoF_InsertPatientFileInfo'; +var GET_GEO_ZONES = 'Services/Patients.svc/REST/GeoF_GetAllPoints'; +var LOG_GEO_ZONES = 'Services/Patients.svc/REST/GeoF_InsertPatientFileInfo'; // Delivery Driver -var DRIVER_LOCATION = - 'Services/Patients.svc/REST/PatientER_GetDriverLocation'; +var DRIVER_LOCATION = 'Services/Patients.svc/REST/PatientER_GetDriverLocation'; //weather -var WEATHER_INDICATOR = 'Services/Weather.svc/REST/GetCityInfo'; +var WEATHER_INDICATOR = 'Services/Weather.svc/REST/GetCityInfo'; -var GET_PRIVILEGE = 'Services/Patients.svc/REST/Service_Privilege'; +var GET_PRIVILEGE = 'Services/Patients.svc/REST/Service_Privilege'; // Wifi Credentials -var WIFI_CREDENTIALS = - "Services/Patients.svc/Hmg_SMS_Get_By_ProjectID_And_PatientID"; +var WIFI_CREDENTIALS = "Services/Patients.svc/Hmg_SMS_Get_By_ProjectID_And_PatientID"; ///Doctor -var GET_MY_DOCTOR = - 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult'; -var GET_DOCTOR_PROFILE = 'Services/Doctors.svc/REST/GetDocProfiles'; -var GET_DOCTOR_PRE_POST_IMAGES = - 'Services/Doctors.svc/REST/GetDoctorPrePostImages'; -var GET_DOCTOR_RATING_NOTES = - 'Services/Doctors.svc/REST/dr_GetNotesDoctorRating'; -var GET_DOCTOR_RATING_DETAILS = - 'Services/Doctors.svc/REST/dr_GetDoctorRatingDetails'; - -var GET_DOCTOR_RATING = 'Services/Doctors.svc/REST/dr_GetAvgDoctorRating'; +var GET_MY_DOCTOR = 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult'; +var GET_DOCTOR_PROFILE = 'Services/Doctors.svc/REST/GetDocProfiles'; +var GET_DOCTOR_PRE_POST_IMAGES = 'Services/Doctors.svc/REST/GetDoctorPrePostImages'; +var GET_DOCTOR_RATING_NOTES = 'Services/Doctors.svc/REST/dr_GetNotesDoctorRating'; +var GET_DOCTOR_RATING_DETAILS = 'Services/Doctors.svc/REST/dr_GetDoctorRatingDetails'; + +var GET_DOCTOR_RATING = 'Services/Doctors.svc/REST/dr_GetAvgDoctorRating'; ///Prescriptions // var PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList'; -var PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList_Async'; +var PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList_Async'; -var GET_PRESCRIPTIONS_ALL_ORDERS = - 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; -var GET_PRESCRIPTION_REPORT = - 'Services/Patients.svc/REST/INP_GetPrescriptionReport'; -var SEND_PRESCRIPTION_EMAIL = - 'Services/Notifications.svc/REST/SendPrescriptionEmail'; -var GET_PRESCRIPTION_REPORT_ENH = - 'Services/Patients.svc/REST/GetPrescriptionReport_enh'; +var GET_PRESCRIPTIONS_ALL_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; +var GET_PRESCRIPTION_REPORT = 'Services/Patients.svc/REST/INP_GetPrescriptionReport'; +var SEND_PRESCRIPTION_EMAIL = 'Services/Notifications.svc/REST/SendPrescriptionEmail'; +var GET_PRESCRIPTION_REPORT_ENH = 'Services/Patients.svc/REST/GetPrescriptionReport_enh'; ///Lab Order -var GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders'; -var GET_Patient_LAB_SPECIAL_RESULT = - 'Services/Patients.svc/REST/GetPatientLabSpecialResults'; -var SEND_LAB_RESULT_EMAIL = - 'Services/Notifications.svc/REST/SendLabReportEmail'; -var GET_Patient_LAB_RESULT = - 'Services/Patients.svc/REST/GetPatientLabResults'; -var GET_Patient_LAB_ORDERS_RESULT = - 'Services/Patients.svc/REST/GetPatientLabOrdersResults'; -var SEND_COVID_LAB_RESULT_EMAIL = - 'Services/Notifications.svc/REST/GenerateCOVIDReport'; -var COVID_PASSPORT_UPDATE = - 'Services/Patients.svc/REST/Covid19_Certificate_PassportUpdate'; -var GET_PATIENT_PASSPORT_NUMBER = - 'Services/Patients.svc/REST/Covid19_Certificate_GetPassport'; - -var UPDATE_WORKPLACE_NAME = - 'Services/Patients.svc/REST/ActivateSickLeave_FromVida'; +var GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders'; +var GET_Patient_LAB_SPECIAL_RESULT = 'Services/Patients.svc/REST/GetPatientLabSpecialResults'; +var SEND_LAB_RESULT_EMAIL = 'Services/Notifications.svc/REST/SendLabReportEmail'; +var GET_Patient_LAB_RESULT = 'Services/Patients.svc/REST/GetPatientLabResults'; +var GET_Patient_LAB_ORDERS_RESULT = 'Services/Patients.svc/REST/GetPatientLabOrdersResults'; +var SEND_COVID_LAB_RESULT_EMAIL = 'Services/Notifications.svc/REST/GenerateCOVIDReport'; +var COVID_PASSPORT_UPDATE = 'Services/Patients.svc/REST/Covid19_Certificate_PassportUpdate'; +var GET_PATIENT_PASSPORT_NUMBER = 'Services/Patients.svc/REST/Covid19_Certificate_GetPassport'; + +var UPDATE_WORKPLACE_NAME = 'Services/Patients.svc/REST/ActivateSickLeave_FromVida'; /// -var GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders'; -var GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT = - 'Services/Patients.svc/REST/GetPatientLabResultsByAppointmentNo'; +var GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders'; +var GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT = 'Services/Patients.svc/REST/GetPatientLabResultsByAppointmentNo'; -var GET_PATIENT_ORDERS_DETAILS = - 'Services/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead'; -var GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL'; -var SEND_RAD_REPORT_EMAIL = - 'Services/Notifications.svc/REST/SendRadReportEmail'; +var GET_PATIENT_ORDERS_DETAILS = 'Services/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead'; +var GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL'; +var SEND_RAD_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendRadReportEmail'; ///Feedback -var SEND_FEEDBACK = 'Services/COCWS.svc/REST/InsertCOCItemInSPList'; -var GET_STATUS_FOR_COCO = 'Services/COCWS.svc/REST/GetStatusforCOC'; +var SEND_FEEDBACK = 'Services/COCWS.svc/REST/InsertCOCItemInSPList'; +var GET_STATUS_FOR_COCO = 'Services/COCWS.svc/REST/GetStatusforCOC'; // var GET_PATIENT_AppointmentHistory = 'Services' // '/Doctors.svc/REST/PateintHasAppoimentHistory'; -var GET_PATIENT_AppointmentHistory = 'Services' +var GET_PATIENT_AppointmentHistory = 'Services' '/Doctors.svc/REST/PateintHasAppoimentHistory_Async'; ///VITAL SIGN -var GET_PATIENT_VITAL_SIGN = - 'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign'; +var GET_PATIENT_VITAL_SIGN = 'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign'; ///Er Nearest -var GET_NEAREST_HOSPITAL = - 'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime'; +var GET_NEAREST_HOSPITAL = 'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime'; ///ED Online -var ER_GET_VISUAL_TRIAGE_QUESTIONS = - "services/Doctors.svc/REST/ER_GetVisualTriageQuestions"; -var ER_SAVE_TRIAGE_INFORMATION = - "services/Doctors.svc/REST/ER_SaveTriageInformation"; -var ER_GetPatientPaymentInformationForERClinic = - "services/Doctors.svc/REST/ER_GetPatientPaymentInformationForERClinic"; +var ER_GET_VISUAL_TRIAGE_QUESTIONS = "services/Doctors.svc/REST/ER_GetVisualTriageQuestions"; +var ER_SAVE_TRIAGE_INFORMATION = "services/Doctors.svc/REST/ER_SaveTriageInformation"; +var ER_GetPatientPaymentInformationForERClinic = "services/Doctors.svc/REST/ER_GetPatientPaymentInformationForERClinic"; ///Er Nearest -var GET_AMBULANCE_REQUEST = - 'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod'; -var GET_PATIENT_ALL_PRES_ORDERS = - 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; -var GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID = - 'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID'; -var UPDATE_PRESS_ORDER = - 'Services/Patients.svc/REST/PatientER_UpdatePresOrder'; -var INSERT_ER_INERT_PRES_ORDER = - 'Services/Patients.svc/REST/PatientER_InsertPresOrder'; +var GET_AMBULANCE_REQUEST = 'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod'; +var GET_PATIENT_ALL_PRES_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; +var GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID = 'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID'; +var UPDATE_PRESS_ORDER = 'Services/Patients.svc/REST/PatientER_UpdatePresOrder'; +var INSERT_ER_INERT_PRES_ORDER = 'Services/Patients.svc/REST/PatientER_InsertPresOrder'; /// ER RRT -var GET_ALL_RC_TRANSPORTATION = 'api/Transportation/getalltransportation'; -var GET_ALL_TRANSPORTATIONS_RC = 'api/Transportation/getalltransportation'; -var GET_ALL_RRT_QUESTIONS = - 'Services/Patients.svc/REST/PatientER_RRT_GetAllQuestions'; -var GET_RRT_SERVICE_PRICE = - 'Services/Patients.svc/REST/PatientE_RealRRT_GetServicePrice'; +var GET_ALL_RC_TRANSPORTATION = 'api/Transportation/getalltransportation'; +var GET_ALL_TRANSPORTATIONS_RC = 'api/Transportation/getalltransportation'; +var GET_ALL_RRT_QUESTIONS = 'Services/Patients.svc/REST/PatientER_RRT_GetAllQuestions'; +var GET_RRT_SERVICE_PRICE = 'Services/Patients.svc/REST/PatientE_RealRRT_GetServicePrice'; -var GET_ALL_TRANSPORTATIONS_ORDERS = 'api/Transportation/get'; +var GET_ALL_TRANSPORTATIONS_ORDERS = 'api/Transportation/get'; -var CANCEL_AMBULANCE_REQUEST = "api/Transportation/update"; +var CANCEL_AMBULANCE_REQUEST = "api/Transportation/update"; -var INSERT_TRANSPORTATION_ORDER_RC = "api/Transportation/add"; +var INSERT_TRANSPORTATION_ORDER_RC = "api/Transportation/add"; ///FindUs -var GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations'; +var GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations'; ///LiveChat -var GET_LIVECHAT_REQUEST = 'Services/Patients.svc/REST/GetPatientICProjects'; +var GET_LIVECHAT_REQUEST = 'Services/Patients.svc/REST/GetPatientICProjects'; ///babyInformation -var GET_BABYINFORMATION_REQUEST = - 'Services/Community.svc/REST/GetBabyByUserID'; +var GET_BABYINFORMATION_REQUEST = 'Services/Community.svc/REST/GetBabyByUserID'; ///Get Baby By User ID -var GET_BABY_BY_USER_ID = 'Services/Community.svc/REST/GetBabyByUserID'; +var GET_BABY_BY_USER_ID = 'Services/Community.svc/REST/GetBabyByUserID'; ///userInformation -var GET_USERINFORMATION_REQUEST = - 'Services/Community.svc/REST/GetUserInformation_New'; +var GET_USERINFORMATION_REQUEST = 'Services/Community.svc/REST/GetUserInformation_New'; ///Update email -var UPDATE_PATENT_EMAIL = 'Services/Patients.svc/REST/UpdatePateintEmail'; -var UPDATE_PATENT_INFO = 'Services/Community.svc/REST/UpdateUserInfo_New'; +var UPDATE_PATENT_EMAIL = 'Services/Patients.svc/REST/UpdatePateintEmail'; +var UPDATE_PATENT_INFO = 'Services/Community.svc/REST/UpdateUserInfo_New'; ///addNewChild -var GET_NEWCHILD_REQUEST = 'Services/Community.svc/REST/CreateNewBaby'; +var GET_NEWCHILD_REQUEST = 'Services/Community.svc/REST/CreateNewBaby'; ///newUserId -var GET_NEW_USER_REQUEST = 'Services/Community.svc/REST/CreateNewUser_New'; +var GET_NEW_USER_REQUEST = 'Services/Community.svc/REST/CreateNewUser_New'; ///delete Child -var DELETE_CHILD_REQUEST = 'Services/Community.svc/REST/DeleteBaby'; +var DELETE_CHILD_REQUEST = 'Services/Community.svc/REST/DeleteBaby'; ///addNewTABLE -var GET_TABLE_REQUEST = 'Services/Community.svc/REST/CreateVaccinationTable'; +var GET_TABLE_REQUEST = 'Services/Community.svc/REST/CreateVaccinationTable'; ///BloodDenote -var GET_CITIES_REQUEST = 'Services/Lists.svc/REST/GetAllCities'; +var GET_CITIES_REQUEST = 'Services/Lists.svc/REST/GetAllCities'; ///BloodDetails -var GET_BLOOD_REQUEST = - 'services/PatientVarification.svc/REST/BloodDonation_GetBloodGroupDetails'; +var GET_BLOOD_REQUEST = 'services/PatientVarification.svc/REST/BloodDonation_GetBloodGroupDetails'; -var SAVE_BLOOD_REQUEST = - 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType'; +var SAVE_BLOOD_REQUEST = 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType'; -var GET_BLOOD_AGREEMENT = - 'Services/PatientVarification.svc/REST/CheckUserAgreementForBloodDonation'; -var SAVE_BLOOD_AGREEMENT = - 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation'; +var GET_BLOOD_AGREEMENT = 'Services/PatientVarification.svc/REST/CheckUserAgreementForBloodDonation'; +var SAVE_BLOOD_AGREEMENT = 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation'; ///Reports -var REPORTS = 'Services/Doctors.svc/REST/GetPatientMedicalReportStatusInfo'; -var INSERT_REQUEST_FOR_MEDICAL_REPORT = - 'Services/Doctors.svc/REST/InsertRequestForMedicalReport'; -var SEND_MEDICAL_REPORT_EMAIL = - 'Services/Notifications.svc/REST/SendMedicalReportEmail'; +var REPORTS = 'Services/Doctors.svc/REST/GetPatientMedicalReportStatusInfo'; +var INSERT_REQUEST_FOR_MEDICAL_REPORT = 'Services/Doctors.svc/REST/InsertRequestForMedicalReport'; +var SEND_MEDICAL_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendMedicalReportEmail'; ///Rate // var IS_LAST_APPOITMENT_RATED = 'Services/Doctors.svc/REST/IsLastAppoitmentRated'; -var IS_LAST_APPOITMENT_RATED = - 'Services/Doctors.svc/REST/IsLastAppoitmentRated_Async'; -var GET_APPOINTMENT_DETAILS_BY_NO = - 'Services/MobileNotifications.svc/REST/GetAppointmentDetailsByApptNo'; -var NEW_RATE_APPOINTMENT_URL = - "Services/Doctors.svc/REST/AppointmentsRating_InsertAppointmentRate"; -var NEW_RATE_DOCTOR_URL = - "Services/Doctors.svc/REST/DoctorsRating_InsertDoctorRate"; +var IS_LAST_APPOITMENT_RATED = 'Services/Doctors.svc/REST/IsLastAppoitmentRated_Async'; +var GET_APPOINTMENT_DETAILS_BY_NO = 'Services/MobileNotifications.svc/REST/GetAppointmentDetailsByApptNo'; +var NEW_RATE_APPOINTMENT_URL = "Services/Doctors.svc/REST/AppointmentsRating_InsertAppointmentRate"; +var NEW_RATE_DOCTOR_URL = "Services/Doctors.svc/REST/DoctorsRating_InsertDoctorRate"; -var GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID'; +var GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID'; //URL to get clinic list -var GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized"; +var GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized"; //URL to get active appointment list -var GET_ACTIVE_APPOINTMENTS_LIST_URL = - "Services/Doctors.svc/Rest/Dr_GetAppointmentActiveNumber"; +var GET_ACTIVE_APPOINTMENTS_LIST_URL = "Services/Doctors.svc/Rest/Dr_GetAppointmentActiveNumber"; //URL to get projects list -var GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject'; +var GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject'; //URL to get doctors list -var GET_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/SearchDoctorsByTime"; +var GET_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/SearchDoctorsByTime"; //URL to dental doctors list -var GET_DENTAL_DOCTORS_LIST_URL = - "Services/Doctors.svc/REST/Dental_DoctorChiefComplaintMapping"; +var GET_DENTAL_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/Dental_DoctorChiefComplaintMapping"; //URL to get doctor free slots -var GET_DOCTOR_FREE_SLOTS = "Services/Doctors.svc/REST/GetDoctorFreeSlots"; +var GET_DOCTOR_FREE_SLOTS = "Services/Doctors.svc/REST/GetDoctorFreeSlots"; //URL to insert appointment -var INSERT_SPECIFIC_APPOINTMENT = - "Services/Doctors.svc/REST/InsertSpecificAppointment"; +var INSERT_SPECIFIC_APPOINTMENT = "Services/Doctors.svc/REST/InsertSpecificAppointment"; //URL to get patient share -var GET_PATIENT_SHARE = - "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNO"; +var GET_PATIENT_SHARE = "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNO"; //URL to get patient appointment history -var GET_PATIENT_APPOINTMENT_HISTORY = - "Services/Doctors.svc/REST/PateintHasAppoimentHistory"; +var GET_PATIENT_APPOINTMENT_HISTORY = "Services/Doctors.svc/REST/PateintHasAppoimentHistory"; -var GET_OBGYNE_ORDERS_LIST = - "services/Patients.svc/REST/HIS_OBGYNEProcedureGet"; +var GET_OBGYNE_ORDERS_LIST = "services/Patients.svc/REST/HIS_OBGYNEProcedureGet"; -var GET_OBGYNE_DOCTORS_LIST = - "services/Doctors.svc/REST/HIS_ObgyneUltrasoundDoctors"; +var GET_OBGYNE_DOCTORS_LIST = "services/Doctors.svc/REST/HIS_ObgyneUltrasoundDoctors"; -var OBGYNE_PROCEDURE_UPDATE = - "services/Patients.svc/REST/HIS_OBGYNEProcedure_Update"; +var OBGYNE_PROCEDURE_UPDATE = "services/Patients.svc/REST/HIS_OBGYNEProcedure_Update"; -var GET_RRT_PROCEDURE_LIST = - "Services/Patients.svc/REST/GetRRTProcedureDetailsListFromVida"; +var GET_RRT_PROCEDURE_LIST = "Services/Patients.svc/REST/GetRRTProcedureDetailsListFromVida"; -var DOCTOR_SCHEDULE_URL = - 'Services/Doctors.svc/REST/GetDoctorWorkingHoursTable'; +var DOCTOR_SCHEDULE_URL = 'Services/Doctors.svc/REST/GetDoctorWorkingHoursTable'; -var SEND_REPORT_EYE_EMAIL = - "Services/Notifications.svc/REST/SendGlassesPrescriptionEmail"; +var SEND_REPORT_EYE_EMAIL = "Services/Notifications.svc/REST/SendGlassesPrescriptionEmail"; -var SEND_CONTACT_LENS_PRESCRIPTION_EMAIL = - "Services/Notifications.svc/REST/SendContactLensPrescriptionEmail"; +var SEND_CONTACT_LENS_PRESCRIPTION_EMAIL = "Services/Notifications.svc/REST/SendContactLensPrescriptionEmail"; //URL to get patient appointment curfew history // var GET_PATIENT_APPOINTMENT_CURFEW_HISTORY = "Services/Doctors.svc/REST/AppoimentHistoryForCurfew"; -var GET_PATIENT_APPOINTMENT_CURFEW_HISTORY = - "Services/Doctors.svc/REST/AppoimentHistoryForCurfew_Async"; +var GET_PATIENT_APPOINTMENT_CURFEW_HISTORY = "Services/Doctors.svc/REST/AppoimentHistoryForCurfew_Async"; //URL to confirm appointment -var CONFIRM_APPOINTMENT = - "Services/MobileNotifications.svc/REST/ConfirmAppointment"; +var CONFIRM_APPOINTMENT = "Services/MobileNotifications.svc/REST/ConfirmAppointment"; -var INSERT_VIDA_REQUEST = - "Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart"; +var INSERT_VIDA_REQUEST = "Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart"; //URL to cancel appointment -var CANCEL_APPOINTMENT = "Services/Doctors.svc/REST/CancelAppointment"; +var CANCEL_APPOINTMENT = "Services/Doctors.svc/REST/CancelAppointment"; //URL get appointment QR -var GENERATE_QR_APPOINTMENT = - "Services/Doctors.svc/REST/GenerateQRAppointmentNo"; +var GENERATE_QR_APPOINTMENT = "Services/Doctors.svc/REST/GenerateQRAppointmentNo"; //URL send email appointment QR -var EMAIL_QR_APPOINTMENT = - "Services/Notifications.svc/REST/sendEmailForOnLineCheckin"; +var EMAIL_QR_APPOINTMENT = "Services/Notifications.svc/REST/sendEmailForOnLineCheckin"; //URL check payment status -var CHECK_PAYMENT_STATUS = - "Services/PayFort_Serv.svc/REST/GetRequestStatusByRequestID"; +var CHECK_PAYMENT_STATUS = "Services/PayFort_Serv.svc/REST/GetRequestStatusByRequestID"; //URL create advance payment -var CREATE_ADVANCE_PAYMENT = "Services/Doctors.svc/REST/CreateAdvancePayment"; +var CREATE_ADVANCE_PAYMENT = "Services/Doctors.svc/REST/CreateAdvancePayment"; -var HIS_CREATE_ADVANCE_PAYMENT = - "Services/Patients.svc/REST/HIS_CreateAdvancePayment"; +var HIS_CREATE_ADVANCE_PAYMENT = "Services/Patients.svc/REST/HIS_CreateAdvancePayment"; -var ER_CREATE_ADVANCE_PAYMENT = - "services/Doctors.svc/REST/ER_CreateAdvancePaymentForClinic"; +var ER_CREATE_ADVANCE_PAYMENT = "services/Doctors.svc/REST/ER_CreateAdvancePaymentForClinic"; -var ER_INSERT_ADVANCE_PAYMENT = - "services/Doctors.svc/REST/ER_InsertEROnlinePaymentDetails"; +var ER_INSERT_ADVANCE_PAYMENT = "services/Doctors.svc/REST/ER_InsertEROnlinePaymentDetails"; -var ADD_ADVANCE_NUMBER_REQUEST = - 'Services/PayFort_Serv.svc/REST/AddAdvancedNumberRequest'; +var ADD_ADVANCE_NUMBER_REQUEST = 'Services/PayFort_Serv.svc/REST/AddAdvancedNumberRequest'; -var GENERATE_ANCILLARY_ORDERS_INVOICE = - 'Services/Doctors.svc/REST/AutoGenerateAncillaryOrderInvoice'; +var GENERATE_ANCILLARY_ORDERS_INVOICE = 'Services/Doctors.svc/REST/AutoGenerateAncillaryOrderInvoice'; -var IS_ALLOW_ASK_DOCTOR = - 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult'; -var GET_CALL_REQUEST_TYPE = - 'Services/Doctors.svc/REST/GetCallRequestType_LOV'; -var ADD_VIDA_REQUEST = - 'Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart'; +var IS_ALLOW_ASK_DOCTOR = 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult'; +var GET_CALL_REQUEST_TYPE = 'Services/Doctors.svc/REST/GetCallRequestType_LOV'; +var ADD_VIDA_REQUEST = 'Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart'; -var SEND_CALL_REQUEST = 'Services/Doctors.svc/REST/InsertCallInfo'; +var SEND_CALL_REQUEST = 'Services/Doctors.svc/REST/InsertCallInfo'; -var GET_LIVECARE_CLINICS = - 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinics'; +var GET_LIVECARE_CLINICS = 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinics'; -var GET_LIVECARE_SCHEDULE_CLINICS = - 'Services/Doctors.svc/REST/PatientER_GetClinicsHaveSchedule'; +var GET_LIVECARE_SCHEDULE_CLINICS = 'Services/Doctors.svc/REST/PatientER_GetClinicsHaveSchedule'; -var GET_LIVECARE_SCHEDULE_CLINIC_DOCTOR_LIST = - 'Services/Doctors.svc/REST/PatientER_GetDoctorByClinicID'; +var GET_LIVECARE_SCHEDULE_CLINIC_DOCTOR_LIST = 'Services/Doctors.svc/REST/PatientER_GetDoctorByClinicID'; -var GET_LIVECARE_SCHEDULE_DOCTOR_TIME_SLOTS = - 'Services/Doctors.svc/REST/PatientER_GetDoctorFreeSlots'; +var GET_LIVECARE_SCHEDULE_DOCTOR_TIME_SLOTS = 'Services/Doctors.svc/REST/PatientER_GetDoctorFreeSlots'; -var INSERT_LIVECARE_SCHEDULE_APPOINTMENT = - 'Services/Doctors.svc/REST/InsertSpecificAppoitmentForSchedule'; +var INSERT_LIVECARE_SCHEDULE_APPOINTMENT = 'Services/Doctors.svc/REST/InsertSpecificAppoitmentForSchedule'; -var GET_PATIENT_SHARE_LIVECARE = - "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNOForLiveCare"; +var GET_PATIENT_SHARE_LIVECARE = "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNOForLiveCare"; -var SET_ONLINE_CHECKIN_FOR_APPOINTMENT = - "Services/Patients.svc/REST/SetOnlineCheckInForAppointment"; +var SET_ONLINE_CHECKIN_FOR_APPOINTMENT = "Services/Patients.svc/REST/SetOnlineCheckInForAppointment"; -var GET_LIVECARE_CLINIC_TIMING = - 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinicsServiceTimingsSchedule'; +var GET_LIVECARE_CLINIC_TIMING = 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinicsServiceTimingsSchedule'; -var GET_ER_APPOINTMENT_FEES = - 'Services/DoctorApplication.svc/REST/GetERAppointmentFees'; -var GET_ER_APPOINTMENT_TIME = 'Services/ER_VirtualCall.svc/REST/GetRestTime'; +var GET_ER_APPOINTMENT_FEES = 'Services/DoctorApplication.svc/REST/GetERAppointmentFees'; +var GET_ER_APPOINTMENT_TIME = 'Services/ER_VirtualCall.svc/REST/GetRestTime'; -var ADD_NEW_CALL_FOR_PATIENT_ER = - 'Services/DoctorApplication.svc/REST/NewCallForPatientER'; +var ADD_NEW_CALL_FOR_PATIENT_ER = 'Services/DoctorApplication.svc/REST/NewCallForPatientER'; -var GET_LIVECARE_HISTORY = - 'Services/ER_VirtualCall.svc/REST/GetPatientErVirtualHistory'; -var CANCEL_LIVECARE_REQUEST = - 'Services/ER_VirtualCall.svc/REST/DeleteErRequest'; -var SEND_LIVECARE_INVOICE_EMAIL = - 'Services/Notifications.svc/REST/SendInvoiceForLiveCare'; +var GET_LIVECARE_HISTORY = 'Services/ER_VirtualCall.svc/REST/GetPatientErVirtualHistory'; +var CANCEL_LIVECARE_REQUEST = 'Services/ER_VirtualCall.svc/REST/DeleteErRequest'; +var SEND_LIVECARE_INVOICE_EMAIL = 'Services/Notifications.svc/REST/SendInvoiceForLiveCare'; -var CHANGE_PATIENT_ER_SESSION = - 'Services/DoctorApplication.svc/REST/ChangePatientERSession'; +var CHANGE_PATIENT_ER_SESSION = 'Services/DoctorApplication.svc/REST/ChangePatientERSession'; -var APPLE_PAY_INSERT_REQUEST = - 'Services/PayFort_Serv.svc/REST/PayFort_ApplePayRequestData_Insert'; +var APPLE_PAY_INSERT_REQUEST = 'Services/PayFort_Serv.svc/REST/PayFort_ApplePayRequestData_Insert'; -var GET_USER_TERMS = 'Services/Patients.svc/REST/GetUserTermsAndConditions'; +var GET_USER_TERMS = 'Services/Patients.svc/REST/GetUserTermsAndConditions'; -var TAMARA_REQUEST_INSERT = 'Services/PayFort_Serv.svc/REST/AddTamaraRequest'; +var TAMARA_REQUEST_INSERT = 'Services/PayFort_Serv.svc/REST/AddTamaraRequest'; -var UPDATE_HEALTH_TERMS = - 'services/Patients.svc/REST/UpdatePateintHealthSummaryReport'; +var UPDATE_HEALTH_TERMS = 'services/Patients.svc/REST/UpdatePateintHealthSummaryReport'; -var GET_PATIENT_HEALTH_STATS = - 'Services/Patients.svc/REST/Med_GetTransactionsSts'; +var GET_PATIENT_HEALTH_STATS = 'Services/Patients.svc/REST/Med_GetTransactionsSts'; -var SEND_CHECK_IN_NFC_REQUEST = - 'Services/Patients.svc/REST/Patient_CheckAppointmentValidation_ForNFC'; +var SEND_CHECK_IN_NFC_REQUEST = 'Services/Patients.svc/REST/Patient_CheckAppointmentValidation_ForNFC'; -var HAS_DENTAL_PLAN = - 'Services/Doctors.svc/REST/Dental_IsPatientHasOnGoingEstimation'; +var HAS_DENTAL_PLAN = 'Services/Doctors.svc/REST/Dental_IsPatientHasOnGoingEstimation'; -var LASER_BODY_PARTS = 'Services/Patients.svc/REST/Laser_GetBodyPartsByCategory'; +var LASER_BODY_PARTS = 'Services/Patients.svc/REST/Laser_GetBodyPartsByCategory'; -var INSERT_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnarie_Insert'; -var UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnarie_Update'; +var INSERT_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnarie_Insert'; +var UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnarie_Update'; //URL to get medicine and pharmacies list -var CHANNEL = 3; -var GENERAL_ID = 'Cs2020@2016\$2958'; -var IP_ADDRESS = '10.20.10.20'; -var VERSION_ID = 9.9; -var SETUP_ID = '91877'; -var LANGUAGE = 2; +var CHANNEL = 3; +var GENERAL_ID = 'Cs2020@2016\$2958'; +var IP_ADDRESS = '10.20.10.20'; +var VERSION_ID = 10.4; +var SETUP_ID = '91877'; +var LANGUAGE = 2; // var PATIENT_OUT_SA = 0; -var SESSION_ID = 'TMRhVmkGhOsvamErw'; -var IS_DENTAL_ALLOWED_BACKEND = false; -var PATIENT_TYPE = 1; -var PATIENT_TYPE_ID = null; +var SESSION_ID = 'TMRhVmkGhOsvamErw'; +var IS_DENTAL_ALLOWED_BACKEND = false; +var PATIENT_TYPE = 1; +var PATIENT_TYPE_ID = 1; var DEVICE_TOKEN = ""; var IS_VOICE_COMMAND_CLOSED = true; var IS_TEXT_COMPLETED = false; // var DeviceTypeID = Platform.isIOS ? 1 : 2; // var LANGUAGE_ID = 2; -var GET_PHARMCY_ITEMS = "Services/Lists.svc/REST/GetPharmcyItems_Region"; -var GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList"; -var GET_PAtIENTS_INSURANCE = - "Services/Patients.svc/REST/Get_PatientInsuranceDetails"; -var GET_PAtIENTS_INSURANCE_UPDATED = - "Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory"; - -var INSURANCE_DETAILS = "Services/Patients.svc/REST/Get_InsuranceCheckList"; -var INSURANCE_SCHEMES = "Services/Patients.svc/REST/PatientER_SchemesOfAactiveCompaniesGet"; -var UPDATE_MANUAL_INSURANCE = "Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate"; -var INSURANCE_COMPANIES = "Services/Patients.svc/REST/PatientER_InsuranceCompanyGet"; -var GET_PATIENT_INSURANCE_DETAILS = - "Services/Patients.svc/REST/PatientER_GetPatientInsuranceDetails"; -var UPLOAD_INSURANCE_CARD = - 'Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate'; - -var GET_VACCINES = "Services/Patients.svc/REST/GetDoneVaccinesByPatientID"; -var GET_VACCINES_EMAIL = "Services/Notifications.svc/REST/SendVaccinesEmail"; -var GET_PAtIENTS_INSURANCE_APPROVALS = - "Services/Patients.svc/REST/GetApprovalStatus_Async"; +var GET_PHARMCY_ITEMS = "Services/Lists.svc/REST/GetPharmcyItems_Region"; +var GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList"; +var GET_PAtIENTS_INSURANCE = "Services/Patients.svc/REST/Get_PatientInsuranceDetails"; +var GET_PAtIENTS_INSURANCE_UPDATED = "Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory"; + +var INSURANCE_DETAILS = "Services/Patients.svc/REST/Get_InsuranceCheckList"; +var INSURANCE_SCHEMES = "Services/Patients.svc/REST/PatientER_SchemesOfAactiveCompaniesGet"; +var UPDATE_MANUAL_INSURANCE = "Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate"; +var INSURANCE_COMPANIES = "Services/Patients.svc/REST/PatientER_InsuranceCompanyGet"; +var GET_PATIENT_INSURANCE_DETAILS = "Services/Patients.svc/REST/PatientER_GetPatientInsuranceDetails"; +var UPLOAD_INSURANCE_CARD = 'Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate'; + +var GET_VACCINES = "Services/Patients.svc/REST/GetDoneVaccinesByPatientID"; +var GET_VACCINES_EMAIL = "Services/Notifications.svc/REST/SendVaccinesEmail"; +var GET_PAtIENTS_INSURANCE_APPROVALS = "Services/Patients.svc/REST/GetApprovalStatus_Async"; // var GET_PAtIENTS_INSURANCE_APPROVALS = "Services/Patients.svc/REST/GetApprovalStatus"; -var SEARCH_BOT = 'HabibiChatBotApi/BotInterface/GetVoiceCommandResponse'; +var SEARCH_BOT = 'HabibiChatBotApi/BotInterface/GetVoiceCommandResponse'; -var GET_VACCINATIONS_ITEMS = "/Services/ERP.svc/REST/GET_VACCINATIONS_ITEMS"; -var GET_VACCINATION_ONHAND = "/Services/ERP.svc/REST/GET_VACCINATION_ONHAND"; +var GET_VACCINATIONS_ITEMS = "/Services/ERP.svc/REST/GET_VACCINATIONS_ITEMS"; +var GET_VACCINATION_ONHAND = "/Services/ERP.svc/REST/GET_VACCINATION_ONHAND"; -var GET_PATIENT_SICK_LEAVE = 'Services/Patients.svc/REST/GetPatientSickLeave'; +var GET_PATIENT_SICK_LEAVE = 'Services/Patients.svc/REST/GetPatientSickLeave'; -var GET_PATIENT_SICK_LEAVE_STATUS = 'Services/Patients.svc/REST/GetPatientSickLeave_Status'; +var GET_PATIENT_SICK_LEAVE_STATUS = 'Services/Patients.svc/REST/GetPatientSickLeave_Status'; -var SendSickLeaveEmail = 'Services/Notifications.svc/REST/SendSickLeaveEmail'; +var SendSickLeaveEmail = 'Services/Notifications.svc/REST/SendSickLeaveEmail'; -var GET_PATIENT_AdVANCE_BALANCE_AMOUNT = - 'Services/Patients.svc/REST/GetPatientAdvanceBalanceAmount'; -var GET_PATIENT_INFO_BY_ID = - 'Services/Doctors.svc/REST/GetPatientInfoByPatientID'; -var GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER = - 'Services/Patients.svc/REST/AP_GetPatientInfoByPatientIDandMobileNumber'; -var SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = - 'Services/Authentication.svc/REST/SendActivationCodeForAdvancePayment'; -var CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = - 'Services/Authentication.svc/REST/CheckActivationCodeForAdvancePayment'; +var GET_PATIENT_AdVANCE_BALANCE_AMOUNT = 'Services/Patients.svc/REST/GetPatientAdvanceBalanceAmount'; +var GET_PATIENT_INFO_BY_ID = 'Services/Doctors.svc/REST/GetPatientInfoByPatientID'; +var GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER = 'Services/Patients.svc/REST/AP_GetPatientInfoByPatientIDandMobileNumber'; +var SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = 'Services/Authentication.svc/REST/SendActivationCodeForAdvancePayment'; +var CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = 'Services/Authentication.svc/REST/CheckActivationCodeForAdvancePayment'; -var GET_COVID_DRIVETHRU_PROJECT_LIST = - 'Services/Doctors.svc/REST/COVID19_ProjectDriveThroughTestingCenter'; +var GET_COVID_DRIVETHRU_PROJECT_LIST = 'Services/Doctors.svc/REST/COVID19_ProjectDriveThroughTestingCenter'; -var GET_COVID_DRIVETHRU_PAYMENT_INFO = - 'Services/Doctors.svc/REST/COVID19_GetPatientPaymentInormation'; +var GET_COVID_DRIVETHRU_PAYMENT_INFO = 'Services/Doctors.svc/REST/COVID19_GetPatientPaymentInormation'; -var GET_COVID_DRIVETHRU_FREE_SLOTS = - 'Services/Doctors.svc/REST/COVID19_GetFreeSlots'; +var GET_COVID_DRIVETHRU_FREE_SLOTS = 'Services/Doctors.svc/REST/COVID19_GetFreeSlots'; -var GET_COVID_DRIVETHRU_PROCEDURES_LIST = - 'Services/Doctors.svc/REST/COVID19_GetTestProcedures'; +var GET_COVID_DRIVETHRU_PROCEDURES_LIST = 'Services/Doctors.svc/REST/COVID19_GetTestProcedures'; ///Smartwatch Integration Services -var GET_PATIENT_LAST_RECORD = - 'Services/Patients.svc/REST/Med_GetPatientLastRecord'; -var INSERT_PATIENT_HEALTH_DATA = - 'Services/Patients.svc/REST/Med_InsertTransactions'; +var GET_PATIENT_LAST_RECORD = 'Services/Patients.svc/REST/Med_GetPatientLastRecord'; +var INSERT_PATIENT_HEALTH_DATA = 'Services/Patients.svc/REST/Med_InsertTransactions'; ///My Trackers -var GET_DIABETIC_RESULT_AVERAGE = - 'Services/Patients.svc/REST/Patient_GetDiabeticResultAverage'; -var GET_DIABTEC_RESULT = - 'Services/Patients.svc/REST/Patient_GetDiabtecResults'; -var ADD_DIABTEC_RESULT = - 'Services/Patients.svc/REST/Patient_AddDiabtecResult'; - -var GET_BLOOD_PRESSURE_RESULT_AVERAGE = - 'Services/Patients.svc/REST/Patient_GetBloodPressureResultAverage'; -var GET_BLOOD_PRESSURE_RESULT = - 'Services/Patients.svc/REST/Patient_GetBloodPressureResult'; -var ADD_BLOOD_PRESSURE_RESULT = - 'Services/Patients.svc/REST/Patient_AddBloodPressureResult'; - -var GET_WEIGHT_PRESSURE_RESULT_AVERAGE = - 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResultAverage'; -var GET_WEIGHT_PRESSURE_RESULT = - 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResult'; -var ADD_WEIGHT_PRESSURE_RESULT = - 'Services/Patients.svc/REST/Patient_AddWeightMeasurementResult'; - -var ADD_ACTIVE_PRESCRIPTIONS_REPORT_BY_PATIENT_ID = - 'Services/Patients.svc/Rest/GetActivePrescriptionReportByPatientID'; - -var GET_CALL_INFO_HOURS_RESULT = - 'Services/Doctors.svc/REST/GetCallInfoHoursResult'; -var GET_CALL_REQUEST_TYPE_LOV = - 'Services/Doctors.svc/REST/GetCallRequestType_LOV'; - -var UPDATE_DIABETIC_RESULT = - 'Services/Patients.svc/REST/Patient_UpdateDiabeticResult'; - -var SEND_AVERAGE_BLOOD_SUGAR_REPORT = - 'Services/Notifications.svc/REST/SendAverageBloodSugarReport'; -var DEACTIVATE_DIABETIC_STATUS = - 'services/Patients.svc/REST/Patient_DeactivateDiabeticStatus'; -var DEACTIVATE_BLOOD_PRESSURES_STATUS = - 'services/Patients.svc/REST/Patient_DeactivateBloodPressureStatus'; - -var UPDATE_BLOOD_PRESSURE_RESULT = - 'Services/Patients.svc/REST/Patient_UpdateBloodPressureResult'; -var SEND_AVERAGE_BLOOD_WEIGHT_REPORT = - 'Services/Notifications.svc/REST/SendAverageBodyWeightReport'; -var SEND_AVERAGE_BLOOD_PRESSURE_REPORT = - 'Services/Notifications.svc/REST/SendAverageBloodPressureReport'; - -var UPDATE_WEIGHT_PRESSURE_RESULT = - 'Services/Patients.svc/REST/Patient_UpdateWeightMeasurementResult'; -var DEACTIVATE_WEIGHT_PRESSURE_RESULT = - 'services/Patients.svc/REST/Patient_DeactivateWeightMeasurementStatus'; -var GET_DOCTOR_RESPONSE = 'Services/Patients.svc/REST/GetDoctorResponse'; -var UPDATE_READ_STATUS = 'Services/Patients.svc/REST/UpdateReadStatus'; -var INSERT_CALL_INFO = 'Services/Doctors.svc/REST/InsertCallInfo'; - -var GET_PATIENT_ALLERGIES = 'Services/Patients.svc/REST/GetPatientAllergies'; +var GET_DIABETIC_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetDiabeticResultAverage'; +var GET_DIABTEC_RESULT = 'Services/Patients.svc/REST/Patient_GetDiabtecResults'; +var ADD_DIABTEC_RESULT = 'Services/Patients.svc/REST/Patient_AddDiabtecResult'; + +var GET_BLOOD_PRESSURE_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetBloodPressureResultAverage'; +var GET_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_GetBloodPressureResult'; +var ADD_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_AddBloodPressureResult'; + +var GET_WEIGHT_PRESSURE_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResultAverage'; +var GET_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResult'; +var ADD_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_AddWeightMeasurementResult'; + +var ADD_ACTIVE_PRESCRIPTIONS_REPORT_BY_PATIENT_ID = 'Services/Patients.svc/Rest/GetActivePrescriptionReportByPatientID'; + +var GET_CALL_INFO_HOURS_RESULT = 'Services/Doctors.svc/REST/GetCallInfoHoursResult'; +var GET_CALL_REQUEST_TYPE_LOV = 'Services/Doctors.svc/REST/GetCallRequestType_LOV'; + +var UPDATE_DIABETIC_RESULT = 'Services/Patients.svc/REST/Patient_UpdateDiabeticResult'; + +var SEND_AVERAGE_BLOOD_SUGAR_REPORT = 'Services/Notifications.svc/REST/SendAverageBloodSugarReport'; +var DEACTIVATE_DIABETIC_STATUS = 'services/Patients.svc/REST/Patient_DeactivateDiabeticStatus'; +var DEACTIVATE_BLOOD_PRESSURES_STATUS = 'services/Patients.svc/REST/Patient_DeactivateBloodPressureStatus'; + +var UPDATE_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_UpdateBloodPressureResult'; +var SEND_AVERAGE_BLOOD_WEIGHT_REPORT = 'Services/Notifications.svc/REST/SendAverageBodyWeightReport'; +var SEND_AVERAGE_BLOOD_PRESSURE_REPORT = 'Services/Notifications.svc/REST/SendAverageBloodPressureReport'; + +var UPDATE_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_UpdateWeightMeasurementResult'; +var DEACTIVATE_WEIGHT_PRESSURE_RESULT = 'services/Patients.svc/REST/Patient_DeactivateWeightMeasurementStatus'; +var GET_DOCTOR_RESPONSE = 'Services/Patients.svc/REST/GetDoctorResponse'; +var UPDATE_READ_STATUS = 'Services/Patients.svc/REST/UpdateReadStatus'; +var INSERT_CALL_INFO = 'Services/Doctors.svc/REST/InsertCallInfo'; + +var GET_PATIENT_ALLERGIES = 'Services/Patients.svc/REST/GetPatientAllergies'; // H2O -var H2O_GET_USER_PROGRESS = - "Services/H2ORemainder.svc/REST/H2O_GetUserProgress"; -var H2O_INSERT_USER_ACTIVITY = - "Services/H2ORemainder.svc/REST/H2O_InsertUserActivity"; -var H2O_GET_USER_DETAIL = - "Services/H2ORemainder.svc/REST/H2O_GetUserDetails_New"; -var H2O_UPDATE_USER_DETAIL = - "Services/H2ORemainder.svc/REST/H2O_UpdateUserDetails_New"; -var H2O_UNDO_USER_ACTIVITY = - "Services/H2ORemainder.svc/REST/H2o_UndoUserActivity"; +var H2O_GET_USER_PROGRESS = "Services/H2ORemainder.svc/REST/H2O_GetUserProgress"; +var H2O_INSERT_USER_ACTIVITY = "Services/H2ORemainder.svc/REST/H2O_InsertUserActivity"; +var H2O_GET_USER_DETAIL = "Services/H2ORemainder.svc/REST/H2O_GetUserDetails_New"; +var H2O_UPDATE_USER_DETAIL = "Services/H2ORemainder.svc/REST/H2O_UpdateUserDetails_New"; +var H2O_UNDO_USER_ACTIVITY = "Services/H2ORemainder.svc/REST/H2o_UndoUserActivity"; //E_Referral Services -var GET_ALL_RELATIONSHIP_TYPES = - "Services/Patients.svc/REST/GetAllRelationshipTypes"; -var SEND_ACTIVATION_CODE_FOR_E_REFERRAL = - 'Services/Authentication.svc/REST/SendActivationCodeForEReferral'; -var CHECK_ACTIVATION_CODE_FOR_E_REFERRAL = - 'Services/Authentication.svc/REST/CheckActivationCodeForEReferral'; -var GET_ALL_CITIES = 'services/Lists.svc/rest/GetAllCities'; -var CREATE_E_REFERRAL = "Services/Patients.svc/REST/CreateEReferral"; -var GET_E_REFERRALS = "Services/Patients.svc/REST/GetEReferrals"; +var GET_ALL_RELATIONSHIP_TYPES = "Services/Patients.svc/REST/GetAllRelationshipTypes"; +var SEND_ACTIVATION_CODE_FOR_E_REFERRAL = 'Services/Authentication.svc/REST/SendActivationCodeForEReferral'; +var CHECK_ACTIVATION_CODE_FOR_E_REFERRAL = 'Services/Authentication.svc/REST/CheckActivationCodeForEReferral'; +var GET_ALL_CITIES = 'services/Lists.svc/rest/GetAllCities'; +var CREATE_E_REFERRAL = "Services/Patients.svc/REST/CreateEReferral"; +var GET_E_REFERRALS = "Services/Patients.svc/REST/GetEReferrals"; // Encillary Orders -var GET_ANCILLARY_ORDERS = - 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderList'; +var GET_ANCILLARY_ORDERS = 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderList'; -var GET_ANCILLARY_ORDERS_DETAILS = - 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderProcList'; +var GET_ANCILLARY_ORDERS_DETAILS = 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderProcList'; //Pharmacy wishlist // var GET_WISHLIST = "http://swd-pharapp-01:7200/api/shopping_cart_items/"; -var GET_DOCTOR_LIST_BY_TIME = "Services/Doctors.svc/REST/SearchDoctorsByTime"; +var GET_DOCTOR_LIST_BY_TIME = "Services/Doctors.svc/REST/SearchDoctorsByTime"; // pharmacy -var PHARMACY_AUTORZIE_CUSTOMER = "AutorizeCustomer"; -var PHARMACY_VERIFY_CUSTOMER = "VerifyCustomer"; -var PHARMACY_GET_COUNTRY = "countries"; +var PHARMACY_AUTORZIE_CUSTOMER = "AutorizeCustomer"; +var PHARMACY_VERIFY_CUSTOMER = "VerifyCustomer"; +var PHARMACY_GET_COUNTRY = "countries"; // var PHARMACY_CREATE_CUSTOMER = "epharmacy/api/CreateCustomer"; -var PHARMACY_CREATE_CUSTOMER = "getorcreateCustomer"; -var GET_PHARMACY_BANNER = "promotionbanners"; -var GET_PHARMACY_TOP_MANUFACTURER = "topmanufacturer"; -var GET_PHARMACY_BEST_SELLER_PRODUCT = "bestsellerproducts"; -var GET_PHARMACY_PRODUCTs_BY_IDS = "productsbyids/"; -var GET_PHARMACY_PRODUCTs_BY_SKU = "productbysku/"; -var GET_CUSTOMERS_ADDRESSES = "Customers/"; -var SUBSCRIBE_PRODUCT = "subscribe?"; -var GET_ORDER = "orders?"; -var GET_ORDER_DETAILS = "orders/"; -var ADD_CUSTOMER_ADDRESS = "addcustomeraddress"; -var EDIT_CUSTOMER_ADDRESS = "editcustomeraddress"; -var DELETE_CUSTOMER_ADDRESS = "deletecustomeraddress"; -var GET_ADDRESS = "Customers/"; -var GET_Cancel_ORDER = "cancelorder/"; -var WRITE_REVIEW = "Content-Type" + "text/plain; charset=utf-8"; -var GET_SHOPPING_CART = "shopping_cart_items/"; -var GET_SHIPPING_OPTIONS = "get_shipping_option/"; -var DELETE_SHOPPING_CART = "delete_shopping_cart_items/"; -var DELETE_SHOPPING_CART_ALL = "delete_shopping_cart_item_by_customer/"; -var ORDER_SHOPPING_CART = "orders"; -var GET_LACUM_ACCOUNT_INFORMATION = - "Services/Patients.svc/REST/GetLakumAccountInformation"; -var GET_LACUM_GROUP_INFORMATION = - "Services/Patients.svc/REST/GetlakumInQueryInfoGrouping"; -var LACUM_ACCOUNT_ACTIVATE = - "Services/Patients.svc/REST/LakumAccountActivation"; -var LACUM_ACCOUNT_DEACTIVATE = - "Services/Patients.svc/REST/LakumAccountDeactivation"; -var CREATE_LAKUM_ACCOUNT = - "Services/Patients.svc/REST/PHR_CreateLakumAccount"; -var TRANSFER_YAHALA_LOYALITY_POINTS = - "Services/Patients.svc/REST/TransferYaHalaLoyaltyPoints"; -var LAKUM_GET_USER_TERMS_AND_CONDITIONS = - "Services/ERP.svc/REST/GetUserTermsAndConditionsForEPharmcy"; +var PHARMACY_CREATE_CUSTOMER = "getorcreateCustomer"; +var GET_PHARMACY_BANNER = "promotionbanners"; +var GET_PHARMACY_TOP_MANUFACTURER = "topmanufacturer"; +var GET_PHARMACY_BEST_SELLER_PRODUCT = "bestsellerproducts"; +var GET_PHARMACY_PRODUCTs_BY_IDS = "productsbyids/"; +var GET_PHARMACY_PRODUCTs_BY_SKU = "productbysku/"; +var GET_CUSTOMERS_ADDRESSES = "Customers/"; +var SUBSCRIBE_PRODUCT = "subscribe?"; +var GET_ORDER = "orders?"; +var GET_ORDER_DETAILS = "orders/"; +var ADD_CUSTOMER_ADDRESS = "addcustomeraddress"; +var EDIT_CUSTOMER_ADDRESS = "editcustomeraddress"; +var DELETE_CUSTOMER_ADDRESS = "deletecustomeraddress"; +var GET_ADDRESS = "Customers/"; +var GET_Cancel_ORDER = "cancelorder/"; +var WRITE_REVIEW = "Content-Type" + "text/plain; charset=utf-8"; +var GET_SHOPPING_CART = "shopping_cart_items/"; +var GET_SHIPPING_OPTIONS = "get_shipping_option/"; +var DELETE_SHOPPING_CART = "delete_shopping_cart_items/"; +var DELETE_SHOPPING_CART_ALL = "delete_shopping_cart_item_by_customer/"; +var ORDER_SHOPPING_CART = "orders"; +var GET_LACUM_ACCOUNT_INFORMATION = "Services/Patients.svc/REST/GetLakumAccountInformation"; +var GET_LACUM_GROUP_INFORMATION = "Services/Patients.svc/REST/GetlakumInQueryInfoGrouping"; +var LACUM_ACCOUNT_ACTIVATE = "Services/Patients.svc/REST/LakumAccountActivation"; +var LACUM_ACCOUNT_DEACTIVATE = "Services/Patients.svc/REST/LakumAccountDeactivation"; +var CREATE_LAKUM_ACCOUNT = "Services/Patients.svc/REST/PHR_CreateLakumAccount"; +var TRANSFER_YAHALA_LOYALITY_POINTS = "Services/Patients.svc/REST/TransferYaHalaLoyaltyPoints"; +var LAKUM_GET_USER_TERMS_AND_CONDITIONS = "Services/ERP.svc/REST/GetUserTermsAndConditionsForEPharmcy"; // var PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList'; -var PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList_Async'; +var PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList_Async'; -var GET_RECOMMENDED_PRODUCT = 'alsoProduct/'; -var GET_MOST_VIEWED_PRODUCTS = "mostview"; -var GET_NEW_PRODUCTS = "newproducts"; +var GET_RECOMMENDED_PRODUCT = 'alsoProduct/'; +var GET_MOST_VIEWED_PRODUCTS = "mostview"; +var GET_NEW_PRODUCTS = "newproducts"; // Home Health Care -var HHC_GET_ALL_SERVICES = - "Services/Patients.svc/REST/PatientER_HHC_GetAllServices"; -var HHC_GET_ALL_CMC_SERVICES = - "Services/Patients.svc/REST/PatientER_CMC_GetAllServices"; -var PATIENT_ER_UPDATE_PRES_ORDER = - "Services/Patients.svc/REST/PatientER_UpdatePresOrder"; -var GET_ORDER_DETAIL_BY_ID = - "Services/Patients.svc/REST/PatientER_HHC_GetTransactionsForOrder"; -var GET_CMC_ORDER_DETAIL_BY_ID = - "Services/Patients.svc/REST/PatientER_CMC_GetTransactionsForOrder"; -var GET_CHECK_UP_ITEMS = "Services/Patients.svc/REST/GetCheckUpItems"; -var PUSH_NOTIFICATION_GET_ALL_NOTIFICATIONS = - 'Services/MobileNotifications.svc/REST/PushNotification_GetAllNotifications'; -var PUSH_NOTIFICATION_SET_MESSAGES_FROM_POOL_AS_READ = - 'Services/MobileNotifications.svc/REST/PushNotification_SetMessagesFromPoolAsRead'; -var GET_PATIENT_ALL_PRES_ORD = - 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; -var PATIENT_ER_INSERT_PRES_ORDER = - 'Services/Patients.svc/REST/PatientER_InsertPresOrder'; -var BLOOD_DONATION_REGISTER_BLOOD_TYPE = - 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType'; -var ADD_USER_AGREEMENT_FOR_BLOOD_DONATION = - 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation'; +var HHC_GET_ALL_SERVICES = "Services/Patients.svc/REST/PatientER_HHC_GetAllServices"; +var HHC_GET_ALL_CMC_SERVICES = "Services/Patients.svc/REST/PatientER_CMC_GetAllServices"; +var PATIENT_ER_UPDATE_PRES_ORDER = "Services/Patients.svc/REST/PatientER_UpdatePresOrder"; +var GET_ORDER_DETAIL_BY_ID = "Services/Patients.svc/REST/PatientER_HHC_GetTransactionsForOrder"; +var GET_CMC_ORDER_DETAIL_BY_ID = "Services/Patients.svc/REST/PatientER_CMC_GetTransactionsForOrder"; +var GET_CHECK_UP_ITEMS = "Services/Patients.svc/REST/GetCheckUpItems"; +var PUSH_NOTIFICATION_GET_ALL_NOTIFICATIONS = 'Services/MobileNotifications.svc/REST/PushNotification_GetAllNotifications'; +var PUSH_NOTIFICATION_SET_MESSAGES_FROM_POOL_AS_READ = 'Services/MobileNotifications.svc/REST/PushNotification_SetMessagesFromPoolAsRead'; +var GET_PATIENT_ALL_PRES_ORD = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; +var PATIENT_ER_INSERT_PRES_ORDER = 'Services/Patients.svc/REST/PatientER_InsertPresOrder'; +var BLOOD_DONATION_REGISTER_BLOOD_TYPE = 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType'; +var ADD_USER_AGREEMENT_FOR_BLOOD_DONATION = 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation'; // HHC RC SERVICES -var HHC_GET_ALL_SERVICES_RC = "api/HHC/getallhhc"; -var ADD_HHC_ORDER_RC = "api/HHC/add"; -var GET_ALL_HHC_ORDERS_RC = 'api/hhc/list'; -var UPDATE_HHC_ORDER_RC = 'api/hhc/update'; +var HHC_GET_ALL_SERVICES_RC = "api/HHC/getallhhc"; +var ADD_HHC_ORDER_RC = "api/HHC/add"; +var GET_ALL_HHC_ORDERS_RC = 'api/hhc/list'; +var UPDATE_HHC_ORDER_RC = 'api/hhc/update'; // CMC RC SERVICES -var GET_ALL_CMC_SERVICES_RC = 'api/cmc/getallcmc'; -var ADD_CMC_ORDER_RC = 'api/cmc/add'; -var GET_ALL_CMC_ORDERS_RC = 'api/cmc/list'; -var UPDATE_CMC_ORDER_RC = 'api/cmc/update'; +var GET_ALL_CMC_SERVICES_RC = 'api/cmc/getallcmc'; +var ADD_CMC_ORDER_RC = 'api/cmc/add'; +var GET_ALL_CMC_ORDERS_RC = 'api/cmc/list'; +var UPDATE_CMC_ORDER_RC = 'api/cmc/update'; // RRT RC SERVICES -var ADD_RRT_ORDER_RC = "api/rrt/add"; -var GET_ALL_RRT_ORDERS_RC = "api/rrt/list"; -var UPDATE_RRT_ORDER_RC = 'api/rrt/update'; +var ADD_RRT_ORDER_RC = "api/rrt/add"; +var GET_ALL_RRT_ORDERS_RC = "api/rrt/list"; +var UPDATE_RRT_ORDER_RC = 'api/rrt/update'; // PRESCRIPTION RC SERVICES -var ADD_PRESCRIPTION_ORDER_RC = "api/prescription/add"; -var GET_ALL_PRESCRIPTION_ORDERS_RC = "api/prescription/list"; -var GET_ALL_PRESCRIPTION_INFO_RC = "api/Prescription/info"; -var UPDATE_PRESCRIPTION_ORDER_RC = 'api/prescription/update'; +var ADD_PRESCRIPTION_ORDER_RC = "api/prescription/add"; +var GET_ALL_PRESCRIPTION_ORDERS_RC = "api/prescription/list"; +var GET_ALL_PRESCRIPTION_INFO_RC = "api/Prescription/info"; +var UPDATE_PRESCRIPTION_ORDER_RC = 'api/prescription/update'; //Pharmacy wishlist -var GET_WISHLIST = "shopping_cart_items/"; -var DELETE_WISHLIST = "delete_shopping_cart_item_by_product?customer_id="; -var GET_REVIEW = "customerreviews/"; -var GET_BRANDS = "manufacturer"; -var GET_TOP_BRANDS = "topmanufacturer?page=1&limit=8"; -var GET_PRODUCT_DETAIL = "products/"; -var GET_LOCATION = "Services/Patients.svc/REST/GetPharmcyListBySKU"; -var GET_SPECIFICATION = "productspecification/"; -var GET_BRAND_ITEMS = "products"; -var PHARMACY_MAKE_REVIEW = 'insertreviews'; +var GET_WISHLIST = "shopping_cart_items/"; +var DELETE_WISHLIST = "delete_shopping_cart_item_by_product?customer_id="; +var GET_REVIEW = "customerreviews/"; +var GET_BRANDS = "manufacturer"; +var GET_TOP_BRANDS = "topmanufacturer?page=1&limit=8"; +var GET_PRODUCT_DETAIL = "products/"; +var GET_LOCATION = "Services/Patients.svc/REST/GetPharmcyListBySKU"; +var GET_SPECIFICATION = "productspecification/"; +var GET_BRAND_ITEMS = "products"; +var PHARMACY_MAKE_REVIEW = 'insertreviews'; // External API -var ADD_ADDRESS_INFO = "addcustomeraddress"; -var GET_CUSTOMER_ADDRESSES = "Customers/"; -var GET_CUSTOMER_INFO = "VerifyCustomer"; +var ADD_ADDRESS_INFO = "addcustomeraddress"; +var GET_CUSTOMER_ADDRESSES = "Customers/"; +var GET_CUSTOMER_INFO = "VerifyCustomer"; //Pharmacy -var GET_PHARMACY_CATEGORISE = - 'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id=0'; -var GET_OFFERS_CATEGORISE = 'discountcategories'; -var GET_OFFERS_PRODUCTS = 'offerproducts/'; -var GET_CATEGORISE_PARENT = - 'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id='; -var GET_PARENT_PRODUCTS = 'products?categoryid='; -var GET_SUB_CATEGORISE = - 'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id='; -var GET_SUB_PRODUCTS = 'products?categoryid='; -var GET_FINAL_PRODUCTS = +var GET_PHARMACY_CATEGORISE = 'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id=0'; +var GET_OFFERS_CATEGORISE = 'discountcategories'; +var GET_OFFERS_PRODUCTS = 'offerproducts/'; +var GET_CATEGORISE_PARENT = 'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id='; +var GET_PARENT_PRODUCTS = 'products?categoryid='; +var GET_SUB_CATEGORISE = 'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id='; +var GET_SUB_PRODUCTS = 'products?categoryid='; +var GET_FINAL_PRODUCTS = 'products?fields=id,reviews,discount_ids,name,namen,localized_names,display_order,short_description,full_description,full_descriptionn,sku,order_minimum_quantity,order_maximum_quantity,price,old_price,images,is_rx,rx_message,rx_messagen,discount_name,discount_namen,approved_rating_sum,approved_total_reviews,allow_back_in_stock_subscriptions,stock_quantity,stock_availability,stock_availabilityn,discount_percentage&CategoryId='; -var GET_CLINIC_CATEGORY = 'Services/Doctors.svc/REST/DP_GetClinicCategory'; -var GET_DISEASE_BY_CLINIC_ID = - 'Services/Doctors.svc/REST/DP_GetDiseasesByClinicID'; -var SEARCH_DOCTOR_BY_TIME = 'Services/Doctors.svc/REST/SearchDoctorsByTime'; +var GET_CLINIC_CATEGORY = 'Services/Doctors.svc/REST/DP_GetClinicCategory'; +var GET_DISEASE_BY_CLINIC_ID = 'Services/Doctors.svc/REST/DP_GetDiseasesByClinicID'; +var SEARCH_DOCTOR_BY_TIME = 'Services/Doctors.svc/REST/SearchDoctorsByTime'; -var TIMER_MIN = 10; +var TIMER_MIN = 10; -var GOOGLE_API_KEY = "AIzaSyCmevVlr2Bh-c8W1VUzo8gt8JRY7n5PANw"; +var GOOGLE_API_KEY = "AIzaSyCmevVlr2Bh-c8W1VUzo8gt8JRY7n5PANw"; -var GET_BRANDS_LIST = 'categoryManufacturer?categoryids='; +var GET_BRANDS_LIST = 'categoryManufacturer?categoryids='; -var GET_SEARCH_PRODUCTS = +var GET_SEARCH_PRODUCTS = 'searchproducts?fields=id,discount_ids,reviews,name,namen,localized_names,display_order,short_description,full_description,full_descriptionn,sku,order_minimum_quantity,order_maximum_quantity,price,old_price,images,is_rx,rx_message,rx_messagen,discount_name,discount_namen,approved_rating_sum,approved_total_reviews,allow_back_in_stock_subscriptions,stock_quantity,stock_availability,stock_availabilityn,discount_percentage&search_key='; -var SCAN_QR_CODE = 'productbysku/'; +var SCAN_QR_CODE = 'productbysku/'; + +var FILTERED_PRODUCTS = 'products?categoryids='; + +var GET_DOCTOR_LIST_CALCULATION = "Services/Doctors.svc/REST/GetCallculationDoctors"; + +var GET_ALL_APPOINTMENTS_FOR_DENTAL_CLINIC = "Services/Patients.svc/REST/GetDentalAppointments"; -var FILTERED_PRODUCTS = 'products?categoryids='; +var GET_DENTAL_APPOINTMENT_INVOICE = "Services/Patients.svc/REST/HIS_eInvoiceForDentalByAppointmentNo"; -var GET_DOCTOR_LIST_CALCULATION = - "Services/Doctors.svc/REST/GetCallculationDoctors"; +var SEND_DENTAL_APPOINTMENT_INVOICE_EMAIL = "Services/Notifications.svc/REST/SendInvoiceForDental"; -var GET_ALL_APPOINTMENTS_FOR_DENTAL_CLINIC = - "Services/Patients.svc/REST/GetDentalAppointments"; +var GET_TAMARA_PLAN = 'https://mdlaboratories.com/tamaralive/Home/GetInstallments'; -var GET_DENTAL_APPOINTMENT_INVOICE = - "Services/Patients.svc/REST/HIS_eInvoiceForDentalByAppointmentNo"; +var GET_TAMARA_PAYMENT_STATUS = 'https://mdlaboratories.com/tamaralive/api/OnlineTamara/order_status?orderid='; -var SEND_DENTAL_APPOINTMENT_INVOICE_EMAIL = - "Services/Notifications.svc/REST/SendInvoiceForDental"; +var UPDATE_TAMARA_STATUS = 'Services/PayFort_Serv.svc/REST/Tamara_UpdateRequestStatus'; -var GET_TAMARA_PLAN = - 'https://mdlaboratories.com/tamaralive/Home/GetInstallments'; +var MARK_APPOINTMENT_TAMARA_STATUS = 'Services/Patients.svc/REST/MarkAppointmentForTamaraPayment_FromVida'; -var GET_TAMARA_PAYMENT_STATUS = - 'https://mdlaboratories.com/tamaralive/api/OnlineTamara/order_status?orderid='; +var AUTO_GENERATE_INVOICE_TAMARA = 'Services/PayFort_Serv.svc/REST/Tamara_GetinfoByAppointmentNo_AutoGenerateInvoice'; -var UPDATE_TAMARA_STATUS = - 'Services/PayFort_Serv.svc/REST/Tamara_UpdateRequestStatus'; +var GET_ONESIGNAL_VOIP_TOKEN = 'https://onesignal.com/api/v1/players'; -var MARK_APPOINTMENT_TAMARA_STATUS = - 'Services/Patients.svc/REST/MarkAppointmentForTamaraPayment_FromVida'; +var CANCEL_PHARMA_LIVECARE_REQUEST = 'https://vcallapi.hmg.com/api/PharmaLiveCare/SendPaymentStatus'; -var AUTO_GENERATE_INVOICE_TAMARA = - 'Services/PayFort_Serv.svc/REST/Tamara_GetinfoByAppointmentNo_AutoGenerateInvoice'; +var INSERT_FREE_SLOTS_LOGS = 'Services/Doctors.svc/Rest/InsertDoctorFreeSlotsLogs'; -var GET_ONESIGNAL_VOIP_TOKEN = - 'https://onesignal.com/api/v1/players'; +var GET_NATIONALITY ='Services/Lists.svc/REST/GetNationality'; class AppGlobal { static var context; @@ -774,7 +612,6 @@ class AppGlobal { request.generalid = GENERAL_ID; //'Cs2020@2016\$2958'; request.PatientOutSA = 0; request.SessionID = "wEVNbagIkaNhGECWZjHaA"; - request.TokenID = "@dm!n"; request.isDentalAllowedBackend = false; request.DeviceTypeID = Platform.isIOS ? 1 : 2; request.DeviceType = Platform.isIOS ? "iOS" : "Android"; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 958b451d..5fe40ec1 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -67,7 +67,7 @@ const Map localizedValues = { 'pressAgain': {'en': 'Press again to exit the app', 'ar': 'اضغط مرة أخرى للخروج من التطبيق'}, 'laserMaxLimitReach': {'en': "Maximum limit is 90 minutes", 'ar': "الحد الأقصى هو 90 دقيقة"}, 'confirmAppoHeading': {'en': 'Kindly review your Appointment', 'ar': 'يرجى تأكيد موعدك'}, - 'patientInfo': {'en': 'Patient Information', 'ar': 'معلومات المريض'}, + 'patientInfo': {'en': 'Patient Information', 'ar': 'معلومات المراجع'}, 'doctorFilter': {'en': 'Doctors will be filtered based on your gender and age', 'ar': 'سيتم تصفية الأطباء بناءً على جنسك وعمرك'}, 'bookSuccess': {'en': 'Book Success', 'ar': 'تم حجز الموعد بنجاح'}, 'patientShare': {'en': 'Patient Share', 'ar': 'نسبة العميل'}, @@ -120,7 +120,7 @@ const Map localizedValues = { 'poweredBy': {'en': 'Powered by', 'ar': 'مشغل بواسطة'}, "welcome": {"en": "Welcome", "ar": "مرحبا بكم"}, "welcome-to": {"en": "Welcome to", "ar": "مرحبا بك في"}, - "patient-app": {"en": "Patient App", "ar": "تطبيق المرضى"}, + "patient-app": {"en": "Patient App", "ar": "تطبيق المراجعين"}, "welcome_text": {"en": "Dr. Sulaiman Al Habib Mobile Application", "ar": "الدكتور سليمان الحبيب لتطبيقات الهاتف"}, "dr-sulaiman-text": {"en": "Dr. Sulaiman Al Habib", "ar": "د. سليمان الحبيب"}, 'welcome_text2': {'en': 'Have you previously visited the hospitals or medical centers of Dr. Sulaiman Al Habib?', 'ar': 'هل قمت مسبقا بزيارة مستشفيات او مراكز الدكتور سليمان الحبيب الطبية ؟'}, @@ -183,6 +183,7 @@ const Map localizedValues = { 'sitWaitingQR': {'en': 'Sit in the waiting rooms until called by the nurse.', 'ar': 'الجلوس في غرف الانتظار لحين منادتك من قبل الممرضة.'}, 'attendRegisterCode': {'en': 'Attendance registration code', 'ar': 'رمز تسجيل الحضور'}, 'scanQRHospital': {'en': 'Approach the Online Check-In board in the hospital & scan via NFC to Check-In', 'ar': 'اقترب من لوحة تسجيل الوصول عبر الإنترنت في المستشفى وافحصها عبر NFC لتسجيل الوصول'}, + 'scanNFC': {'en': 'Scan NFC to Check-In', 'ar': 'مسح NFC لتسجيل الوصول'}, "sendEmail": {"en": "Send Email", "ar": "ارسال نسخة"}, "success": {"en": "Done successfully", "ar": "تم تنفذ الطلب بنجاح"}, "EmailSentSuccessfully": {"en": "Email Sent Successfully", "ar": "تم إرسال البريد الإلكتروني بنجاح"}, @@ -207,7 +208,7 @@ const Map localizedValues = { "last-name": {"en": "Last Name", "ar": "إسم العائلة"}, "female": {"en": "Female", "ar": "أنثى"}, "male": {"en": "Male", "ar": "ذكر"}, - "preferred-language": {"en": "Preferred Language", "ar": "اللغة المفضلة"}, + "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": "أين تريد فتح هذا الملف؟"}, @@ -418,7 +419,7 @@ const Map localizedValues = { "Amount": {"en": "Amount *", "ar": "المبلغ *"}, "DepositorEmail": {"en": "Depositor Email *", "ar": "البريد الإلكتروني للمودع *"}, "Notes": {"en": "Notes", "ar": "ملاحظات"}, - "SelectPatientName": {"en": "Select Patient Name", "ar": "اختر اسم المريض"}, + "SelectPatientName": {"en": "Select Patient Name", "ar": "اختر اسم المراجع"}, "SelectFamilyPatientName": {"en": "Family Members", "ar": "أفراد الأسرة"}, "SelectHospital": {"en": "Select Hospital", "ar": "اختر المستشفى"}, "selectCity": {"en": "Select City", "ar": "اختر المدينة"}, @@ -681,7 +682,7 @@ const Map localizedValues = { "ar": "توفر هذه الخدمة مجموعه من خدمات الرعايه الصحيه المنزلية و متابعه مستمره وشامله للذين لا يستطيعون الوصول للمنشات الصحيه في اماكن اقامتهم (التحاليل المخبرية – الاشعة – التطعيمات – العلاج الطبيعي) ..." }, - "email": {"en": "Email", "ar": "البريد الالكتروني"}, + "email": {"en": "Email *", "ar": "البريد الالكتروني *"}, "Book": {"en": "Book", "ar": "حجز"}, "AppointmentLabel": {"en": "Appointment", "ar": "موعد"}, "BloodType": {"en": "Blood Type", "ar": "فصيلة الدم"}, @@ -863,7 +864,7 @@ const Map localizedValues = { "question": {"en": "Question", "ar": "سؤال"}, "message-type": {"en": "Message Type", "ar": "نوع الرسالة"}, "feedback-type": {"en": "Feedback Type", "ar": "نوع الرسالة"}, - "compliment": {"en": "compliment", "ar": "شكوى"}, + "compliment": {"en": "Appreciation", "ar": "تقدير"}, "suggestion": {"en": "Suggestion", "ar": "إقتراح"}, "your-feedback": {"en": "Your feedback was sent", "ar": "لقد تم ارسال اقتراحك شكرا لك"}, "select-part": {"en": "Please select the part that complain about", "ar": "يرجى تحديد الجزء الذي تشكو منه"}, @@ -1118,7 +1119,7 @@ const Map localizedValues = { "visit": {"en": "Visit", "ar": "زيارة"}, "referralStatus": {"en": "Referral Status", "ar": "حالة الإحالة"}, "referralDate": {"en": "Referral Date", "ar": "تاريخ الإحالة"}, - "patientName": {"en": "Patient Name", "ar": "اسم المريض"}, + "patientName": {"en": "Patient Name", "ar": "اسم المراجع"}, "referralNumber": {"en": "Referral Number", "ar": "رقم الإحالة"}, "requestID": {"en": "Req ID", "ar": " رقم الطلب"}, "OrderStatus": {"en": "Status", "ar": "الحاله"}, @@ -1323,7 +1324,7 @@ const Map localizedValues = { "notif-permission-title": {"en": "Could not set the water reminders", "ar": "لا يمكن ضبط اشعار شرب الماء"}, "notif-permission-msg": {"en": "To recieve water reminders, please turn on notifications in the system settings", "ar": "الرجاء تفعيل الاشعارات في الاعدادات"}, "verification_message_code": {"en": "Please enter verification code", "ar": "الرجاء إدخال رمز التحقق"}, - "select-location": {"en": "Select Location", "ar": "اختر الموقع"}, + "select-location": {"en": "Select Location *", "ar": "اختر الموقع *"}, "result-header": {"en": "Get the result in Few Hours", "ar": "احصل على النتيجة خلال عدة ساعات"}, "please_select_gender": {"en": "Please select gender", "ar": "يرجى تحديد الجنس"}, "covid-info": { @@ -1411,7 +1412,7 @@ const Map localizedValues = { "online-consultation": {"en": "Online Consultation", "ar": "استشارة مباشرة"}, "expected-weiting": {"en": "Waiting time to start LiveCare consultation ", "ar": "وقت الانتظار المتوقع لبدء استشارة لايف كير"}, "er-consult-fee": {"en": "Consultation Fee", "ar": "رسوم الاستشارة"}, - "insured-patient": {"en": "If you're Insurance patient, you have only have to pay the co-payment", "ar": "إذا كنت مريضًا في مجال التأمين ، فليس عليك سوى دفع المبلغ المشترك"}, + "insured-patient": {"en": "If you're Insurance patient, you have only have to pay the co-payment", "ar": "إذا كنت مراجع في مجال التأمين ، فليس عليك سوى دفع المبلغ المشترك"}, "i-accept-terms": {"en": "I Accept the Terms and Conditions", "ar": "موافق على الشروط والأحكام"}, "upcoming-pay-options": {"en": "You can pay by the following Options:", "ar": "يمكنك الدفع عن طريق الخيارات التالية:"}, "please-accept-terms": {"en": "Please accept terms & conditions to continue", "ar": "يرجى قبول الشروط والأحكام للمتابعة"}, @@ -1420,7 +1421,7 @@ const Map localizedValues = { "en": "This service allows you to submit a Referral request from any health care providers either inside or outside the kingdom of Saudi Arabia to any of HMG Hospitals, by filling some of the patient's data and attaching the medical reports, moreover you can track the request status (Under process, Accepted or Rejected)", "ar": - "تتيح لك هذه الخدمة إرسال طلب إحالة من أي من مقدمي الرعاية الصحية سواء داخل المملكة العربية السعودية أو خارجها إلى أي من مستشفيات HMG ، عن طريق ملء بعض بيانات المريض وإرفاق التقارير الطبية ، علاوة على ذلك يمكنك تتبع حالة الطلب (قيد المعالجة ، مقبول أو مرفوض)" + "تتيح لك هذه الخدمة إرسال طلب إحالة من أي من مقدمي الرعاية الصحية سواء داخل المملكة العربية السعودية أو خارجها إلى أي من مستشفيات HMG ، عن طريق ملء بعض بيانات المراجع وإرفاق التقارير الطبية ، علاوة على ذلك يمكنك تتبع حالة الطلب (قيد المعالجة ، مقبول أو مرفوض)" }, "er-consultation": { "en": "This service allows you to make an online virtual consultation via video call directly with the doctor from anywhere at any time.", @@ -1557,10 +1558,10 @@ const Map localizedValues = { "insuranceCompany": {"en": "Insurance Company", "ar": "شركة تأمين"}, "preferredBranch": {"en": "Preferred Branch", "ar": "الفرع المفضل"}, "selectPreferredBranch": {"en": "Select Preferred Branch", "ar": "اختر الفرع المفضل"}, - "patientLocated": {"en": "Where the patient located", "ar": "اين موقع المريض"}, + "patientLocated": {"en": "Where the patient located", "ar": "اين موقع المراجع"}, "otherInfo": {"en": "Other details", "ar": "تفاصيل أخرى"}, "medicalReport": {"en": "Medical Report", "ar": "تقرير طبي"}, - "insuredPatient": {"en": "Insured Patient", "ar": "هل لدى المريض تامين؟"}, + "insuredPatient": {"en": "Insured Patient", "ar": "هل لدى المراجع تامين؟"}, "rateDoctor": {"en": "Rate Doctor", "ar": "تقييم الطبيب"}, "rateAppointment": {"en": "Rate Appointment", "ar": "تقييم الموعد"}, "noInsuranceCardAttached": {"en": "Please attach your insurance card image to continue", "ar": "يرجى إرفاق صورة بطاقة التأمين الخاصة بك للمتابعة"}, @@ -1588,7 +1589,7 @@ const Map localizedValues = { "patientAge": {"en": "y", "ar": "سنة"}, "searchCriteria": {"en": "Select Search Criteria", "ar": "حدد معايير البحث"}, "RequesterInfo": {"en": "Requester Info", "ar": "معلومات مقدم الطلب"}, - "PatientInfo": {"en": "Patient Info", "ar": "معلومات المريض"}, + "PatientInfo": {"en": "Patient Info", "ar": "معلومات المراجع"}, "OtherInfo": {"en": "Other Info", "ar": "معلومات اخرى"}, "inPrgress": {"en": "In Progress", "ar": "في تقدم"}, "locked": {"en": "Locked", "ar": "مقفل"}, @@ -1787,7 +1788,7 @@ const Map localizedValues = { "productOutOfStock": {"en": "Out Of Stock", "ar": "إنتهى من المخزن"}, "productQuantity": {"en": "Quantity", "ar": "كمية"}, "yourTurn": {"en": "your turn is after", "ar": "دورك بعد"}, - "patients": {"en": "patients", "ar": "مرضي"}, + "patients": {"en": "patients", "ar": "مريض"}, "group": {"en": "Group", "ar": "مجموعة"}, "covidTestTodo": {"en": "Covid-19 Test", "ar": "فحص كورونا"}, "ancillaryOrdersPaymentConfirm": {"en": "Are you sure you want to make payment for selected orders?", "ar": "هل أنت متأكد أنك تريد سداد قيمة الطلبات المختارة؟"}, @@ -1809,7 +1810,7 @@ const Map localizedValues = { }, "cameraPermissionDialog": { "en": "Dr. Al Habib app needs to access Camera to enable virtual consultation between patient & doctor, attach images and scan QR for parking service.", - "ar": "يحتاج تطبيق دكتور الحبيب الى صلاحية الوصول إلى الكاميرا لخدمة الاستشارة الافتراضية بين المريض والطبيب وإرفاق الصور ومسح رمز الاستجابة السريع لخدمة مواقف السيارات." + "ar": "يحتاج تطبيق دكتور الحبيب الى صلاحية الوصول إلى الكاميرا لخدمة الاستشارة الافتراضية بين المراجع والطبيب وإرفاق الصور ومسح رمز الاستجابة السريع لخدمة مواقف السيارات." }, "galleryPermission": { "en": "Dr. Al Habib app needs to access Read & write external storage to upload images & documents in the E-Referral module and renew and update the insurance cards.", @@ -1843,7 +1844,7 @@ const Map localizedValues = { "privacyPolicy": {"en": "Privacy Policy", "ar": "سياسة الخصوصية"}, "termsConditions": {"en": "Terms & Conditions", "ar": "الأحكام والشروط"}, "prescriptionDeliveryError": {"en": "This clinic does not support refill & delivery.", "ar": "هذه العيادة لا تدعم إعادة التعبئة والتسليم."}, - "liveCarePermissions": {"en": "LiveCare requires Camera, Microphone & Location permissions, Please allow these to proceed.", "ar": "يتطلب لايف كير أذونات الكاميرا والميكروفون والموقع، يرجى السماح لها بالمتابعة."}, + "liveCarePermissions": {"en": "LiveCare requires Camera, Microphone & Location permissions to enable virtual consultation between patient & doctor, Please allow these to proceed.", "ar": "يتطلب لايف كير أذونات الكاميرا والميكروفون والموقع، يرجى السماح لها بالمتابعة."}, "lakumUnhold": { "en": "The account has already been activated", "ar": "لقد تم تفعيل الحساب من قبل" }, "lakumDiscontinue": { "en": "The account is closed", "ar": "الحساب مغلق" }, "lakumSuccess": { "en": "The account has been activated successfully", "ar": "تم تفعيل الحساب بنجاح" }, @@ -1864,9 +1865,22 @@ const Map localizedValues = { "NFCNotSupported": { "en": "Your device does not support NFC. Please visit reception to Check-In", "ar": "جهازك لا يدعم NFC. يرجى زيارة مكتب الاستقبال لتسجيل الوصول" }, "enter-workplace-name": {"en": "Please enter your workplace name:", "ar": "رجاء إدخال مكان العمل:"}, "workplaceName": {"en": "Workplace name:", "ar": "مكان العمل:"}, - "callLiveCareSupport": {"en": "Call LiveCare Support", "ar": "اتصل بدعم لايف كير"}, + "callLiveCareSupport": {"en": "Call LiveCare Support", "ar": "اتصل بدعم اللايف كير"}, "needApproval": {"en": "Your sick leave is under process in medical administration, you will be notified once approved.", "ar": "جازتك المرضية تحت الإجراء في الإدارة الطبية ، سوف يتم إشعارك فور الموافقه عليها."}, "pendingActivation": {"en": "Pending Activation", "ar": "في انتظار التنشيط"}, "awaitingApproval": {"en": "Awaiting Approval", "ar": "انتظر القبول"}, "liveCareSupportContact": {"en": "LiveCare Support Contact: ", "ar": "اتصل لايف كير: "}, + "pharmaLiveCare": {"en": "Pharma LiveCare", "ar": "لايف كير الصيدلية"}, + "pharmaLiveCare1": {"en": "What is Pharma LiveCare?", "ar": "ما هولايف كير الصيدلية؟"}, + "pharmaLiveCareDesc1": {"en": "Pharma LiveCare allows you to get consultation from your doctor virtually being in HMG Pharmacy booth.", "ar": "تتيح لك خدمة لايف كير الصيدلية الحصول على استشارة من طبيبك المتواجد فعليًا في كشك صيدلية د.سليمان الحبيب."}, + "wherePharmaLiveCare": {"en": "Where can i find Pharma LiveCare?", "ar": "أين يمكنني أن أجد لايف كير الصيدلية؟"}, + "pharmaLiveCareDesc2": {"en": "You can find the booth in HMG Pharmacies.", "ar": "يمكنك العثور على الكشك في صيدليات مستشفى د.سليمان الحبيب."}, + "howPharmaLiveCare": {"en": "How can i use Pharma LiveCare?", "ar": "كيف يمكنني استخدام لايف كير الصيدلية؟"}, + "pharmaLiveCareDesc3": {"en": "Following the below steps you can easily benefit from the virtual consultation service:", "ar": "باتباع الخطوات التالية يمكنك الاستفادة بسهولة من خدمة الاستشارة الافتراضية:"}, + "pharmaLiveCareScanQR": {"en": "Scan QR Code", "ar": "مسح رمز الاستجابة السريعة"}, + "pharmaLiveCareScanQR1": {"en": "Scan the QR Code in the booth to make the connection", "ar": "امسح رمز الاستجابة السريعة في المقصورة لإجراء الاتصال"}, + "pharmaLiveCareMakePayment": {"en": "Make Payment Online", "ar": "قم بالدفع عبر الإنترنت"}, + "pharmaLiveCareMakePayment1": {"en": "Make the payment through the mobile app", "ar": "قم بالدفع من خلال تطبيق الهاتف المحمول"}, + "pharmaLiveCareJoinConsultation": {"en": "Join the virtual consultation from booth", "ar": "انضم إلى الاستشارة الافتراضية من الكبينة"}, + "pharmaLiveCareJoinConsultation1": {"en": "Wait for the doctor in the pharma booth to join you", "ar": "انتظر حتى ينضم إليك الطبيب في كبينة لايف كير الصيدلية"}, }; \ No newline at end of file diff --git a/lib/config/shared_pref_kay.dart b/lib/config/shared_pref_kay.dart index 9e5c4f27..ec82db11 100644 --- a/lib/config/shared_pref_kay.dart +++ b/lib/config/shared_pref_kay.dart @@ -42,3 +42,4 @@ const APPOINTMENT_HISTORY_MEDICAL = 'APPOINTMENT_HISTORY_MEDICAL'; const CLINICS_LIST = 'CLINICS_LIST'; const COVID_QA_LIST = 'COVID_QA_LIST'; const IS_COVID_CONSENT_SHOWN = 'IS_COVID_CONSENT_SHOWN'; +const REGISTER_INFO_DUBAI ='register-info-dubai'; diff --git a/lib/core/model/eye/AppoimentAllHistoryResult.dart b/lib/core/model/eye/AppoimentAllHistoryResult.dart index 71c9573b..b431943d 100644 --- a/lib/core/model/eye/AppoimentAllHistoryResult.dart +++ b/lib/core/model/eye/AppoimentAllHistoryResult.dart @@ -178,7 +178,7 @@ class AppoimentAllHistoryResultList { doctorImageURL = json['DoctorImageURL']; doctorNameObj = json['DoctorNameObj']; doctorRate = json['DoctorRate']; - doctorSpeciality = json['DoctorSpeciality'].cast(); + if (doctorSpeciality != null) doctorSpeciality = json['DoctorSpeciality'].cast(); doctorTitle = json['DoctorTitle']; gender = json['Gender']; genderDescription = json['GenderDescription']; diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index 041c3bb0..db9cc5e8 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -99,12 +99,31 @@ class BaseAppClient { } else { body['PatientType'] = PATIENT_TYPE; } + // } + // body['PatientType'] = body.containsKey('PatientType') + // ? body['PatientType'] != null + // ? body['PatientType'] + // : user['PatientType'] != null + // ? user['PatientType'] + // : PATIENT_TYPE + // : PATIENT_TYPE; + + // if (!body.containsKey('PatientTypeID')) { if (user != null && user['PatientType'] != null) { body['PatientTypeID'] = user['PatientType']; } else { body['PatientType'] = PATIENT_TYPE_ID; } + // } + + // body['PatientTypeID'] = body.containsKey('PatientTypeID') + // ? body['PatientTypeID'] != null + // ? body['PatientTypeID'] + // : user['PatientType'] != null + // ? user['PatientType'] + // : PATIENT_TYPE_ID + // : PATIENT_TYPE_ID; if (user != null) { body['TokenID'] = body['TokenID'] != null ? body['TokenID'] : token; @@ -140,11 +159,11 @@ class BaseAppClient { body.removeWhere((key, value) => key == null || value == null); - // if (AppGlobal.isNetworkDebugEnabled) { - print("Debug URL : $url"); + if (AppGlobal.isNetworkDebugEnabled) { + print("URL : $url"); final jsonBody = json.encode(body); - print("Debug Body : $jsonBody"); - // } + print(jsonBody); + } if (await Utils.checkConnection(bypassConnectionCheck: bypassConnectionCheck)) { final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers); diff --git a/lib/core/service/geofencing/GeofencingServices.dart b/lib/core/service/geofencing/GeofencingServices.dart index 362416da..fe679984 100644 --- a/lib/core/service/geofencing/GeofencingServices.dart +++ b/lib/core/service/geofencing/GeofencingServices.dart @@ -32,6 +32,8 @@ class GeofencingServices extends BaseService { AppSharedPreferences pref = AppSharedPreferences(); await pref.setString(HMG_GEOFENCES, _zonesJsonString); + var res = await sharedPref.getStringWithDefaultValue(HMG_GEOFENCES, "[]"); + print("-------GEO ZONES----------: $res"); return geoZones; } diff --git a/lib/core/service/medical/labs_service.dart b/lib/core/service/medical/labs_service.dart index b967d41c..9703874e 100644 --- a/lib/core/service/medical/labs_service.dart +++ b/lib/core/service/medical/labs_service.dart @@ -117,12 +117,12 @@ class LabsService extends BaseService { return Future.value(localRes); } - Future updateWorkplaceName(String workplaceName, int requestNumber, String setupID, int projectID) async { + Future updateWorkplaceName(String workplaceName, String workplaceNameAR, int requestNumber, String setupID, int projectID) async { hasError = false; Map body = Map(); body['Placeofwork'] = workplaceName; - body['Placeofworkar'] = workplaceName; + body['Placeofworkar'] = workplaceNameAR; body['Req_ID'] = requestNumber; body['TargetSetupID'] = setupID; body['ProjectID'] = projectID; diff --git a/lib/core/viewModels/dashboard_view_model.dart b/lib/core/viewModels/dashboard_view_model.dart index fca76cbf..931e94b3 100644 --- a/lib/core/viewModels/dashboard_view_model.dart +++ b/lib/core/viewModels/dashboard_view_model.dart @@ -21,6 +21,7 @@ class DashboardViewModel extends BaseViewModel { if (isLogin && _vitalSignService.weightKg.isEmpty) { setState(ViewState.Busy); await _vitalSignService.getPatientRadOrders(); + booldType = await sharedPref.getString(BLOOD_TYPE) ?? "-"; if (_vitalSignService.hasError) { error = _vitalSignService.error; diff --git a/lib/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart b/lib/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart index 947ace34..ea9af54d 100644 --- a/lib/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart +++ b/lib/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart @@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer import 'package:diplomaticquarterapp/services/pharmacy_services/pharmacyAddress_service.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:geocoding/geocoding.dart'; +import 'package:google_maps_place_picker_mb/google_maps_place_picker.dart'; import '../../../locator.dart'; import '../base_view_model.dart'; diff --git a/lib/core/viewModels/project_view_model.dart b/lib/core/viewModels/project_view_model.dart index a536d527..c45e7dd8 100644 --- a/lib/core/viewModels/project_view_model.dart +++ b/lib/core/viewModels/project_view_model.dart @@ -8,6 +8,7 @@ import 'package:diplomaticquarterapp/core/model/privilege/PrivilegeModel.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/models/Appointments/laser_body_parts.dart'; +import 'package:diplomaticquarterapp/models/Authentication/register_info_response.dart'; import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:flutter/cupertino.dart'; @@ -38,9 +39,10 @@ class ProjectViewModel extends BaseViewModel { double _latitude; double _longitude; + RegisterInfoResponse _registerInfo =RegisterInfoResponse(); double get latitude => _latitude; double get longitude => _longitude; - + RegisterInfoResponse get registerInfo=> _registerInfo; dynamic get searchValue => searchvalue; Locale get appLocal => _appLocale; @@ -164,4 +166,8 @@ class ProjectViewModel extends BaseViewModel { searchvalue = data; notifyListeners(); } + setRegisterData(RegisterInfoResponse data){ + _registerInfo =data; + notifyListeners(); + } } diff --git a/lib/models/Appointments/timeSlot.dart b/lib/models/Appointments/timeSlot.dart index 58926fac..b7f1a8cc 100644 --- a/lib/models/Appointments/timeSlot.dart +++ b/lib/models/Appointments/timeSlot.dart @@ -4,7 +4,7 @@ class TimeSlot { String isoTime; DateTime start; DateTime end; - - TimeSlot({@required this.isoTime, @required this.start, @required this.end}); + String vidaDate; + TimeSlot({@required this.isoTime, @required this.start, @required this.end, this.vidaDate}); } diff --git a/lib/models/Authentication/check_paitent_authentication_req.dart b/lib/models/Authentication/check_paitent_authentication_req.dart index 2846c1fc..76493f87 100644 --- a/lib/models/Authentication/check_paitent_authentication_req.dart +++ b/lib/models/Authentication/check_paitent_authentication_req.dart @@ -15,7 +15,9 @@ class CheckPatientAuthenticationReq { Null sessionID; bool isDentalAllowedBackend; int deviceTypeID; - + String dob; + int isHijri; + String healthId; CheckPatientAuthenticationReq( {this.patientMobileNumber, this.zipCode, @@ -32,7 +34,11 @@ class CheckPatientAuthenticationReq { this.patientOutSA, this.sessionID, this.isDentalAllowedBackend, - this.deviceTypeID}); + this.deviceTypeID, + this.dob, + this.isHijri, + this.healthId + }); CheckPatientAuthenticationReq.fromJson(Map json) { patientMobileNumber = json['PatientMobileNumber']; @@ -51,6 +57,9 @@ class CheckPatientAuthenticationReq { sessionID = json['SessionID']; isDentalAllowedBackend = json['isDentalAllowedBackend']; deviceTypeID = json['DeviceTypeID']; + dob = json['dob']; + isHijri = json['isHijri']; + healthId = json['HealthId']; } Map toJson() { @@ -71,6 +80,9 @@ class CheckPatientAuthenticationReq { data['SessionID'] = this.sessionID; data['isDentalAllowedBackend'] = this.isDentalAllowedBackend; data['DeviceTypeID'] = this.deviceTypeID; + data['dob'] =this.dob; + data['isHijri'] = this.isHijri; + data['HealthId'] = healthId; return data; } } diff --git a/lib/models/Authentication/countries_list.dart b/lib/models/Authentication/countries_list.dart new file mode 100644 index 00000000..3c314da9 --- /dev/null +++ b/lib/models/Authentication/countries_list.dart @@ -0,0 +1,21 @@ +class CountriesLists { + String iD; + String name; + dynamic nameN; + + CountriesLists({this.iD, this.name, this.nameN}); + + CountriesLists.fromJson(Map json) { + iD = json['ID']; + name = json['Name']; + nameN = json['NameN']; + } + + Map toJson() { + final Map data = new Map(); + data['ID'] = this.iD; + data['Name'] = this.name; + data['NameN'] = this.nameN; + return data; + } +} \ No newline at end of file diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/cmc_location_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/cmc_location_page.dart index fbef90e6..f45d2942 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/cmc_location_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/cmc_location_page.dart @@ -25,7 +25,7 @@ import 'package:flutter/material.dart'; import 'package:geocoding/geocoding.dart'; import 'package:geolocator/geolocator.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; -import 'package:google_maps_place_picker/google_maps_place_picker.dart'; +import 'package:google_maps_place_picker_mb/google_maps_place_picker.dart'; import 'package:huawei_hmsavailability/huawei_hmsavailability.dart'; import 'package:provider/provider.dart'; diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_tow_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_tow_page.dart index 87d55b72..e846d31c 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_tow_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_tow_page.dart @@ -20,7 +20,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:geolocator/geolocator.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; -import 'package:google_maps_place_picker/google_maps_place_picker.dart'; +import 'package:google_maps_place_picker_mb/google_maps_place_picker.dart'; import 'package:permission_handler/permission_handler.dart'; import 'cmc_location_page.dart'; diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart index e96ddcc7..78e13982 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart @@ -23,7 +23,7 @@ import 'package:flutter/material.dart'; import 'package:geocoding/geocoding.dart'; import 'package:geolocator/geolocator.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; -import 'package:google_maps_place_picker/google_maps_place_picker.dart'; +import 'package:google_maps_place_picker_mb/google_maps_place_picker.dart'; import 'package:huawei_hmsavailability/huawei_hmsavailability.dart'; import 'package:provider/provider.dart'; diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart index 7984cbbf..3a59b21e 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart @@ -12,7 +12,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:google_maps_place_picker/google_maps_place_picker.dart'; +import 'package:google_maps_place_picker_mb/google_maps_place_picker.dart'; import 'package:provider/provider.dart'; class NewHomeHealthCareStepOnePage extends StatefulWidget { diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart index 5328bfba..79f10be7 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart @@ -9,6 +9,7 @@ import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/ import 'package:diplomaticquarterapp/services/permission/permission_service.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/location_util.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; @@ -21,7 +22,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:geolocator/geolocator.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; -import 'package:google_maps_place_picker/google_maps_place_picker.dart'; +import 'package:google_maps_place_picker_mb/google_maps_place_picker.dart'; import 'location_page.dart'; @@ -53,6 +54,7 @@ class _NewHomeHealthCareStepTowPageState extends State mapController = Completer(); + LocationUtils locationUtils; @override void initState() { @@ -62,7 +64,6 @@ class _NewHomeHealthCareStepTowPageState extends State initialiseHmgServices(bool isLogin) { hmgServices.clear(); - hmgServices.add(new HmgServices(0, TranslationBase.of(context).liveCareTitle, TranslationBase.of(context).liveCareSubtitle, "assets/images/new/Live_Care.svg", isLogin)); - hmgServices.add(new HmgServices(1, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/CoronaIcon.svg", isLogin)); - hmgServices.add(new HmgServices(2, TranslationBase.of(context).onlinePayment, TranslationBase.of(context).onlinePaymentSubtitle, "assets/images/new/paymentMethods.png", isLogin)); + hmgServices.add(new HmgServices(0, TranslationBase.of(context).book, TranslationBase.of(context).appointmentLabel, "assets/images/new/book appointment.svg", isLogin)); + hmgServices.add(new HmgServices(1, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin)); + hmgServices.add(new HmgServices(2, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin)); hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin)); - hmgServices.add(new HmgServices(4, TranslationBase.of(context).cmcTitle, TranslationBase.of(context).cmcSubtitle, "assets/images/new/comprehensive_checkup.svg", isLogin)); - hmgServices.add(new HmgServices(5, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin)); - hmgServices.add(new HmgServices(6, TranslationBase.of(context).ereferralTitle, TranslationBase.of(context).ereferralSubtitle, "assets/images/new/E_Referral.svg", isLogin)); - hmgServices.add(new HmgServices(7, TranslationBase.of(context).waterTitle, TranslationBase.of(context).waterSubtitle, "assets/images/new/h2o.svg", isLogin)); - hmgServices.add(new HmgServices(8, TranslationBase.of(context).connectTitle, TranslationBase.of(context).connectSubtitle, "assets/images/new/reach_us.svg", isLogin)); - hmgServices.add(new HmgServices(9, TranslationBase.of(context).medicalFileTitle2, TranslationBase.of(context).medicalFileSubtitle, "assets/images/new/medical file.svg", isLogin)); - hmgServices.add(new HmgServices(10, TranslationBase.of(context).book, TranslationBase.of(context).appointmentLabel, "assets/images/new/book appointment.svg", isLogin)); - hmgServices.add(new HmgServices(11, TranslationBase.of(context).pharmacyTitle, TranslationBase.of(context).pharmacySubtitle, "assets/images/new/Pharmacy.svg", isLogin)); - hmgServices.add(new HmgServices(12, TranslationBase.of(context).updateInsurance, TranslationBase.of(context).updateInsuranceSubtitle, "assets/images/new/update insurance card.svg", isLogin)); - hmgServices.add(new HmgServices(13, TranslationBase.of(context).familyTitle, TranslationBase.of(context).familySubtitle, "assets/images/new/my family.svg", isLogin)); - hmgServices.add(new HmgServices(14, TranslationBase.of(context).My_Child, TranslationBase.of(context).Vaccines, "assets/images/new/child vaccines.svg", isLogin)); + hmgServices.add(new HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin)); + hmgServices.add(new HmgServices(5, TranslationBase.of(context).pharmacyTitle, TranslationBase.of(context).pharmacySubtitle, "assets/images/new/Pharmacy.svg", isLogin)); + + hmgServices.add(new HmgServices(6, TranslationBase.of(context).medicalFileTitle2, TranslationBase.of(context).medicalFileSubtitle, "assets/images/new/medical file.svg", isLogin)); + hmgServices.add(new HmgServices(7, TranslationBase.of(context).familyTitle, TranslationBase.of(context).familySubtitle, "assets/images/new/my family.svg", isLogin)); + hmgServices.add(new HmgServices(8, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", isLogin)); + hmgServices.add(new HmgServices(9, TranslationBase.of(context).My_Child, TranslationBase.of(context).Vaccines, "assets/images/new/child vaccines.svg", isLogin)); + hmgServices.add(new HmgServices(10, TranslationBase.of(context).updateInsurance, TranslationBase.of(context).updateInsuranceSubtitle, "assets/images/new/update insurance card.svg", isLogin)); + hmgServices.add(new HmgServices(11, TranslationBase.of(context).ereferralTitle, TranslationBase.of(context).ereferralSubtitle, "assets/images/new/E_Referral.svg", isLogin)); + hmgServices.add(new HmgServices(12, TranslationBase.of(context).waterTitle, TranslationBase.of(context).waterSubtitle, "assets/images/new/h2o.svg", isLogin)); + hmgServices.add(new HmgServices(13, TranslationBase.of(context).healthCalculatorTitle, TranslationBase.of(context).healthCalculatorSubtitle, "assets/images/new/health calculator.svg", isLogin)); + hmgServices.add(new HmgServices(14, TranslationBase.of(context).healthConvertersTitle, TranslationBase.of(context).healthConvertersSubtitle, "assets/images/new/health converter.svg", isLogin)); hmgServices.add(new HmgServices(15, TranslationBase.of(context).Todo, TranslationBase.of(context).list, "assets/images/new/todo.svg", isLogin)); hmgServices.add(new HmgServices(16, TranslationBase.of(context).Blood, TranslationBase.of(context).Donation, "assets/images/new/blood donation.svg", isLogin)); - hmgServices.add(new HmgServices(17, TranslationBase.of(context).healthCalculatorTitle, TranslationBase.of(context).healthCalculatorSubtitle, "assets/images/new/health calculator.svg", isLogin)); - hmgServices.add(new HmgServices(18, TranslationBase.of(context).healthConvertersTitle, TranslationBase.of(context).healthConvertersSubtitle, "assets/images/new/health converter.svg", isLogin)); + + hmgServices.add(new HmgServices(17, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/CoronaIcon.svg", isLogin)); + + hmgServices.add(new HmgServices(18, TranslationBase.of(context).Virtual, TranslationBase.of(context).Tour, "assets/images/new/virtual tour.svg", isLogin)); hmgServices.add(new HmgServices(19, TranslationBase.of(context).smartWatches.split(" ")[0], TranslationBase.of(context).smartWatches.split(" ")[1], "assets/images/new/smart watch.svg", isLogin)); hmgServices.add(new HmgServices(20, TranslationBase.of(context).parkingTitle2, TranslationBase.of(context).parkingSubtitle, "assets/images/new/parking details.svg", isLogin)); - hmgServices.add(new HmgServices(21, TranslationBase.of(context).Virtual, TranslationBase.of(context).Tour, "assets/images/new/virtual tour.svg", isLogin)); - hmgServices.add(new HmgServices(22, TranslationBase.of(context).latestNews.split(" ")[0], TranslationBase.of(context).latestNews.split(" ")[1], "assets/images/new/latest news.svg", isLogin)); + hmgServices.add(new HmgServices(21, TranslationBase.of(context).latestNews.split(" ")[0], TranslationBase.of(context).latestNews.split(" ")[1], "assets/images/new/latest news.svg", isLogin)); + + hmgServices.add(new HmgServices(22, TranslationBase.of(context).connectTitle, TranslationBase.of(context).connectSubtitle, "assets/images/new/reach_us.svg", isLogin)); + + + // hmgServices.add(new HmgServices(5, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin)); + // hmgServices.add(new HmgServices(6, TranslationBase.of(context).ereferralTitle, TranslationBase.of(context).ereferralSubtitle, "assets/images/new/E_Referral.svg", isLogin)); + // hmgServices.add(new HmgServices(7, TranslationBase.of(context).waterTitle, TranslationBase.of(context).waterSubtitle, "assets/images/new/h2o.svg", isLogin)); + // hmgServices.add(new HmgServices(8, TranslationBase.of(context).connectTitle, TranslationBase.of(context).connectSubtitle, "assets/images/new/reach_us.svg", isLogin)); + // hmgServices.add(new HmgServices(9, TranslationBase.of(context).medicalFileTitle2, TranslationBase.of(context).medicalFileSubtitle, "assets/images/new/medical file.svg", isLogin)); + // hmgServices.add(new HmgServices(10, TranslationBase.of(context).book, TranslationBase.of(context).appointmentLabel, "assets/images/new/book appointment.svg", isLogin)); + // hmgServices.add(new HmgServices(11, TranslationBase.of(context).pharmacyTitle, TranslationBase.of(context).pharmacySubtitle, "assets/images/new/Pharmacy.svg", isLogin)); + // hmgServices.add(new HmgServices(12, TranslationBase.of(context).updateInsurance, TranslationBase.of(context).updateInsuranceSubtitle, "assets/images/new/update insurance card.svg", isLogin)); + // hmgServices.add(new HmgServices(13, TranslationBase.of(context).familyTitle, TranslationBase.of(context).familySubtitle, "assets/images/new/my family.svg", isLogin)); + // hmgServices.add(new HmgServices(14, TranslationBase.of(context).My_Child, TranslationBase.of(context).Vaccines, "assets/images/new/child vaccines.svg", isLogin)); + // hmgServices.add(new HmgServices(15, TranslationBase.of(context).Todo, TranslationBase.of(context).list, "assets/images/new/todo.svg", isLogin)); + // hmgServices.add(new HmgServices(16, TranslationBase.of(context).Blood, TranslationBase.of(context).Donation, "assets/images/new/blood donation.svg", isLogin)); + // hmgServices.add(new HmgServices(17, TranslationBase.of(context).healthCalculatorTitle, TranslationBase.of(context).healthCalculatorSubtitle, "assets/images/new/health calculator.svg", isLogin)); + // hmgServices.add(new HmgServices(18, TranslationBase.of(context).healthConvertersTitle, TranslationBase.of(context).healthConvertersSubtitle, "assets/images/new/health converter.svg", isLogin)); + // hmgServices.add(new HmgServices(19, TranslationBase.of(context).smartWatches.split(" ")[0], TranslationBase.of(context).smartWatches.split(" ")[1], "assets/images/new/smart watch.svg", isLogin)); + // hmgServices.add(new HmgServices(20, TranslationBase.of(context).parkingTitle2, TranslationBase.of(context).parkingSubtitle, "assets/images/new/parking details.svg", isLogin)); + // hmgServices.add(new HmgServices(21, TranslationBase.of(context).Virtual, TranslationBase.of(context).Tour, "assets/images/new/virtual tour.svg", isLogin)); + // hmgServices.add(new HmgServices(22, TranslationBase.of(context).latestNews.split(" ")[0], TranslationBase.of(context).latestNews.split(" ")[1], "assets/images/new/latest news.svg", isLogin)); } @override @@ -211,7 +235,7 @@ class _AllHabibMedicalSevicePage2State extends State itemCount: hmgServices.length, padding: EdgeInsets.zero, itemBuilder: (BuildContext context, int index) { - return ServicesView(hmgServices[index], index); + return ServicesView(hmgServices[index], index, false); }, ), ), diff --git a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrders.dart b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrders.dart index 244754b2..3b708c46 100644 --- a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrders.dart +++ b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrders.dart @@ -148,7 +148,7 @@ class _AnicllaryOrdersState extends State with SingleTickerProv return DoctorCard( onTap: () => ancillaryOrdersDetails(model.ancillaryLists[0].ancillaryOrderList[index], model.ancillaryLists[0].projectID), isInOutPatient: true, - name: TranslationBase.of(context).dr.toString() + " " + (model.ancillaryLists[0].ancillaryOrderList[index].doctorName), + name: TranslationBase.of(context).dr.toString() + " " + (model.ancillaryLists[0].ancillaryOrderList[index].doctorName ?? ""), billNo: model.ancillaryLists[0].ancillaryOrderList[index].orderNo.toString(), profileUrl: "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", subName: model.ancillaryLists[0].projectName, diff --git a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart index e4ea7eaa..1dd34876 100644 --- a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart +++ b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart @@ -484,7 +484,7 @@ class _AnicllaryOrdersState extends State with SingleTic onSelectedMethod: (String method, [String selectedInstallmentPlan]) { selectedPaymentMethod = method; this.selectedInstallmentPlan = selectedInstallmentPlan; - openPayment(selectedPaymentMethod, projectViewModel.authenticatedUserObject.user, double.parse(getTotalValue()), null, model, selectedInstallmentPlan); + openPayment(selectedPaymentMethod, projectViewModel.user, double.parse(getTotalValue()), null, model, selectedInstallmentPlan); }, patientShare: double.parse(getTotalValue()), isFromAdvancePayment: !projectViewModel.havePrivilege(94), @@ -494,24 +494,25 @@ class _AnicllaryOrdersState extends State with SingleTic openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, num amount, AppoitmentAllHistoryResultList appo, AnciallryOrdersViewModel model, [String selectedInstallmentPlan]) { browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart); - transID = Utils.getAdvancePaymentTransID(widget.projectID, projectViewModel.authenticatedUserObject.user.patientID); + transID = Utils.getAdvancePaymentTransID(widget.projectID, projectViewModel.user.patientID); browser.openPaymentBrowser( amount, "Ancillary Orders Payment", transID, widget.projectID.toString(), - projectViewModel.authenticatedUserObject.user.emailAddress, + projectViewModel.user.emailAddress, paymentMethod, - projectViewModel.authenticatedUserObject.user.patientType, - projectViewModel.authenticatedUserObject.user.firstName + " " + projectViewModel.authenticatedUserObject.user.lastName, - projectViewModel.authenticatedUserObject.user.patientID, + projectViewModel.user.patientType, + projectViewModel.user.firstName + " " + projectViewModel.user.lastName, + projectViewModel.user.patientID, authenticatedUser, browser, false, "3", // Need to get new Service ID from Ayman for Ancillary Tamara "", + context, model.ancillaryListsDetails[0].appointmentDate, model.ancillaryListsDetails[0].appointmentNo, model.ancillaryListsDetails[0].clinicID, @@ -603,7 +604,7 @@ class _AnicllaryOrdersState extends State with SingleTic checkPaymentStatus(AppoitmentAllHistoryResultList appo) { GifLoaderDialogUtils.showMyDialog(localContext); DoctorsListService service = new DoctorsListService(); - service.checkPaymentStatus(transID, localContext).then((res) { + service.checkPaymentStatus(transID, false, localContext).then((res) { String paymentInfo = res['Response_Message']; if (paymentInfo == 'Success') { createAdvancePayment(res, appo); @@ -627,9 +628,9 @@ class _AnicllaryOrdersState extends State with SingleTic res['Amount'], res['Fort_id'], res['PaymentMethod'], - projectViewModel.authenticatedUserObject.user.patientType, - projectViewModel.authenticatedUserObject.user.firstName + " " + projectViewModel.authenticatedUserObject.user.lastName, - projectViewModel.authenticatedUserObject.user.patientID, + projectViewModel.user.patientType, + projectViewModel.user.firstName + " " + projectViewModel.user.lastName, + projectViewModel.user.patientID, localContext) .then((res) { addAdvancedNumberRequest(res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), paymentReference, 0, appo); diff --git a/lib/pages/AlHabibMedicalService/h2o/h20_setting.dart b/lib/pages/AlHabibMedicalService/h2o/h20_setting.dart index 38d7a568..2feb7f0f 100644 --- a/lib/pages/AlHabibMedicalService/h2o/h20_setting.dart +++ b/lib/pages/AlHabibMedicalService/h2o/h20_setting.dart @@ -350,7 +350,7 @@ class _H2oSettingState extends State { TextField( enabled: isEnable, scrollPadding: EdgeInsets.zero, - keyboardType: TextInputType.number, + keyboardType: TextInputType.text, controller: _controller, onChanged: (value) => { // validateForm() diff --git a/lib/pages/Blood/confirm_payment_page.dart b/lib/pages/Blood/confirm_payment_page.dart index e5845194..4b3f96e2 100644 --- a/lib/pages/Blood/confirm_payment_page.dart +++ b/lib/pages/Blood/confirm_payment_page.dart @@ -195,7 +195,7 @@ class ConfirmPaymentPage extends StatelessWidget { browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart); browser.openPaymentBrowser(amount, "Advance Payment", Utils.getAdvancePaymentTransID(authenticatedUser.projectID, authenticatedUser.patientID), appo.projectID.toString(), - authenticatedUser.emailAddress, paymentMethod, authenticatedUser.patientType, authenticatedUser.firstName, authenticatedUser.patientID, authenticatedUser, browser, false, "3", ""); + authenticatedUser.emailAddress, paymentMethod, authenticatedUser.patientType, authenticatedUser.firstName, authenticatedUser.patientID, authenticatedUser, browser, false, "3", "", null); } onBrowserLoadStart(String url) { @@ -227,7 +227,7 @@ class ConfirmPaymentPage extends StatelessWidget { checkPaymentStatus(AppoitmentAllHistoryResultList appo) { DoctorsListService service = new DoctorsListService(); GifLoaderDialogUtils.showMyDialog(AppGlobal.context); - service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), AppGlobal.context).then((res) { + service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), false, AppGlobal.context).then((res) { GifLoaderDialogUtils.hideDialog(AppGlobal.context); print("Printing Payment Status Reponse!!!!"); print(res); diff --git a/lib/pages/BookAppointment/BookConfirm.dart b/lib/pages/BookAppointment/BookConfirm.dart index 635f74a0..473c8650 100644 --- a/lib/pages/BookAppointment/BookConfirm.dart +++ b/lib/pages/BookAppointment/BookConfirm.dart @@ -1,3 +1,5 @@ +import 'dart:convert'; + import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; @@ -269,9 +271,10 @@ class _BookConfirmState extends State { }); } - insertAppointment(context, DoctorList docObject, int initialSlotDuration) { + insertAppointment(context, DoctorList docObject, int initialSlotDuration) async{ final timeSlot = DocAvailableAppointments.selectedAppoDateTime; - + String logs = await sharedPref.getString('selectedLogSlots'); + List decodedLogs = json.decode(logs); GifLoaderDialogUtils.showMyDialog(context); AppoitmentAllHistoryResultList appo; widget.service @@ -284,6 +287,14 @@ class _BookConfirmState extends State { getPatientShare(context, res['AppointmentNo'], docObject.clinicID, docObject.projectID, docObject); getToDoCount(); }); + + widget.service.logDoctorFreeSlots(docObject.doctorID, docObject.clinicID, docObject.projectID, decodedLogs,res['AppointmentNo'], context).then((res) { + if (res['MessageStatus'] == 1) { + print("Logs Saved"); + }else{ + print("Error Saving logs"); + } + }); projectViewModel.analytics.appointment.book_appointment_confirmation_success(appointment_type: 'regular', dateTime: timeSlot, doctor: widget.doctor); } else { GifLoaderDialogUtils.hideDialog(context); diff --git a/lib/pages/BookAppointment/BookSuccess.dart b/lib/pages/BookAppointment/BookSuccess.dart index 6de4a31c..890b96d8 100644 --- a/lib/pages/BookAppointment/BookSuccess.dart +++ b/lib/pages/BookAppointment/BookSuccess.dart @@ -46,7 +46,7 @@ class BookSuccess extends StatefulWidget { class _BookSuccessState extends State { AppSharedPreferences sharedPref = AppSharedPreferences(); - AuthenticatedUser authUser; + // AuthenticatedUser authUser; ProjectViewModel projectViewModel; String selectedPaymentMethod = ""; @@ -284,8 +284,8 @@ class _BookSuccessState extends State { ), height: 45.0, child: CustomTextButton( - backgroundColor: Color(0xffc5272d), - elevation: 0, + backgroundColor: CustomColors.green, + elevation: 0, onPressed: () { AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList(); appo.clinicID = widget.docObject.clinicID; @@ -300,7 +300,8 @@ class _BookSuccessState extends State { confirmAppointment(appo); } }, - child: Text(widget.patientShareResponse.isLiveCareAppointment ? TranslationBase.of(context).confirmLiveCare : TranslationBase.of(context).confirm, style: TextStyle(fontSize: 16.0, color: Colors.white)), + child: Text(widget.patientShareResponse.isLiveCareAppointment ? TranslationBase.of(context).confirmLiveCare : TranslationBase.of(context).confirm, + style: TextStyle(fontSize: 16.0, color: Colors.white)), ), ), ), @@ -534,13 +535,6 @@ class _BookSuccessState extends State { } Future navigateToPaymentMethod(context, PatientShareResponse patientShareResponse) async { - if (await this.sharedPref.getObject(USER_PROFILE) != null) { - var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); - setState(() { - authUser = data; - }); - } - AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList(); appo.projectID = widget.patientShareResponse.projectID; appo.clinicID = widget.patientShareResponse.clinicID; @@ -562,7 +556,7 @@ class _BookSuccessState extends State { patientShare: widget.patientShareResponse.patientShareWithTax))) .then((value) { if (value != null) { - openPayment(value, authUser, double.parse(patientShareResponse.patientShareWithTax.toString()), patientShareResponse, appo); + openPayment(value, projectViewModel.user, double.parse(patientShareResponse.patientShareWithTax.toString()), patientShareResponse, appo); projectViewModel.analytics.appointment.payment_method(appointment_type: 'regular', clinic: widget.docObject.clinicName, payment_method: value[0], payment_type: 'appointment'); } }); @@ -587,6 +581,7 @@ class _BookSuccessState extends State { widget.patientShareResponse.isLiveCareAppointment, "2", widget.patientShareResponse.isLiveCareAppointment ? widget.patientShareResponse.clinicID.toString() : "", + context, widget.patientShareResponse.appointmentDate, widget.patientShareResponse.appointmentNo, widget.patientShareResponse.clinicID, @@ -729,7 +724,7 @@ class _BookSuccessState extends State { final currency = projectViewModel.user.outSA == 0 ? "sar" : 'aed'; GifLoaderDialogUtils.showMyDialog(context); DoctorsListService service = new DoctorsListService(); - service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), context).then((res) { + service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), false, context).then((res) { String paymentInfo = res['Response_Message']; if (paymentInfo == 'Success') { txn_ref = res['Merchant_Reference']; @@ -760,7 +755,7 @@ class _BookSuccessState extends State { getApplePayAPQ(AppoitmentAllHistoryResultList appo) { GifLoaderDialogUtils.showMyDialog(context); DoctorsListService service = new DoctorsListService(); - service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), context).then((res) { + service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), false, context).then((res) { GifLoaderDialogUtils.hideDialog(context); String paymentInfo = res['Response_Message']; @@ -954,12 +949,29 @@ class _BookSuccessState extends State { } Future navigateToQR(context, String appoQR) async { + AppoitmentAllHistoryResultList appointment = new AppoitmentAllHistoryResultList(); + + appointment.doctorTitle = "Dr. "; + appointment.doctorNameObj = widget.patientShareResponse.doctorNameObj; + appointment.doctorImageURL = widget.patientShareResponse.doctorImageURL; + appointment.doctorSpeciality = widget.patientShareResponse.doctorSpeciality; + appointment.projectName = widget.patientShareResponse.projectName; + appointment.projectID = widget.patientShareResponse.projectID; + appointment.appointmentDate = widget.patientShareResponse.appointmentDate; + appointment.isLiveCareAppointment = widget.patientShareResponse.isLiveCareAppointment; + appointment.startTime = widget.patientShareResponse.startTime; + appointment.doctorRate = 5; + appointment.actualDoctorRate = 5; + appointment.noOfPatientsRate = 0; + appointment.clinicName = widget.patientShareResponse.clinicName; + Navigator.push( context, FadePage( page: QRCode( patientShareResponse: widget.patientShareResponse, appoQR: appoQR, + appointment: appointment, ))); } diff --git a/lib/pages/BookAppointment/DentalComplaints.dart b/lib/pages/BookAppointment/DentalComplaints.dart index 25bb200b..27cb951e 100644 --- a/lib/pages/BookAppointment/DentalComplaints.dart +++ b/lib/pages/BookAppointment/DentalComplaints.dart @@ -1,5 +1,6 @@ import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/models/Appointments/DentalChiefComplaintsModel.dart'; import 'package:diplomaticquarterapp/models/Appointments/DentalProceduresModel.dart'; @@ -19,6 +20,7 @@ import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.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:provider/provider.dart'; class DentalComplaints extends StatefulWidget { SearchInfo searchInfo; @@ -44,6 +46,8 @@ class _DentalComplaintsState extends State { DentalProceduresModel dentalProceduresModel; List patientDoctorAppointmentListHospital = List(); + ProjectViewModel projectViewModel; + @override void initState() { WidgetsBinding.instance.addPostFrameCallback((_) => checkIfHasDentalPlan()); @@ -52,6 +56,7 @@ class _DentalComplaintsState extends State { @override Widget build(BuildContext context) { + projectViewModel = Provider.of(context); return AppScaffold( isShowAppBar: true, appBarTitle: TranslationBase.of(context).chiefComplaints, diff --git a/lib/pages/BookAppointment/DoctorProfile.dart b/lib/pages/BookAppointment/DoctorProfile.dart index c806e818..426df212 100644 --- a/lib/pages/BookAppointment/DoctorProfile.dart +++ b/lib/pages/BookAppointment/DoctorProfile.dart @@ -492,27 +492,31 @@ class _DoctorProfileState extends State with TickerProviderStateM } void goToBookConfirm() async { - if (widget.isDoctorNameSearch && widget.doctor.clinicID == 17) { - navigateToDentalComplaints(context); - } else { - if (DocAvailableAppointments.areSlotsAvailable) { - if (projectViewModel.isLogin) { + // if (widget.isDoctorNameSearch && widget.doctor.clinicID == 17) { + // navigateToDentalComplaints(context); + // } else { + if (DocAvailableAppointments.areSlotsAvailable) { + if (projectViewModel.isLogin) { + if (widget.isDoctorNameSearch && widget.doctor.clinicID == 17 && projectViewModel.user.age > 12) { + navigateToDentalComplaints(context); + } else { final timeSlot = DocAvailableAppointments.selectedAppoDateTime; navigateToBookConfirm(context); projectViewModel.analytics.appointment.book_appointment_review(appointment_type: 'regular', dateTime: timeSlot, doctor: widget.doctor); - } else { - ConfirmDialog dialog = new ConfirmDialog( - context: context, - confirmMessage: TranslationBase.of(context).loginToUseService, - okText: TranslationBase.of(context).confirm, - cancelText: TranslationBase.of(context).cancel_nocaps, - okFunction: () => {navigateToLogin()}, - cancelFunction: () => {}); - dialog.showAlertDialog(context); } - } else - AppToast.showErrorToast(message: TranslationBase.of(context).selectSlot); - } + } else { + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: TranslationBase.of(context).loginToUseService, + okText: TranslationBase.of(context).confirm, + cancelText: TranslationBase.of(context).cancel_nocaps, + okFunction: () => {navigateToLogin()}, + cancelFunction: () => {}); + dialog.showAlertDialog(context); + } + } else + AppToast.showErrorToast(message: TranslationBase.of(context).selectSlot); + // } } Future navigateToDentalComplaints(BuildContext context) async { diff --git a/lib/pages/BookAppointment/QRCode.dart b/lib/pages/BookAppointment/QRCode.dart index d85f4505..2f861bd3 100644 --- a/lib/pages/BookAppointment/QRCode.dart +++ b/lib/pages/BookAppointment/QRCode.dart @@ -1,4 +1,3 @@ -import 'dart:convert'; import 'dart:typed_data'; import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; @@ -8,15 +7,18 @@ 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/models/header_model.dart'; import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/theme/colors.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/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart'; import 'package:diplomaticquarterapp/widgets/nfc/nfc_reader_sheet.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; @@ -53,159 +55,131 @@ class _QRCodeState extends State { }); WidgetsBinding.instance.addPostFrameCallback((timeStamp) { - Future.delayed(const Duration(milliseconds: 500), () { - showNfcReader(context, onNcfScan: (String nfcId) { - Future.delayed(const Duration(milliseconds: 100), () { - sendNfcCheckInRequest(nfcId); - locator().todoList.to_do_list_nfc(widget.appointment); - }); - }, onCancel: () { - // Navigator.of(context).pop(); - locator().todoList.to_do_list_nfc_cancel(widget.appointment); - }); - }); + startNFCScan(); }); super.initState(); } + startNFCScan() { + Future.delayed(const Duration(milliseconds: 500), () { + showNfcReader(context, onNcfScan: (String nfcId) { + Future.delayed(const Duration(milliseconds: 100), () { + sendNfcCheckInRequest(nfcId); + locator().todoList.to_do_list_nfc(widget.appointment); + }); + }, onCancel: () { + // Navigator.of(context).pop(); + locator().todoList.to_do_list_nfc_cancel(widget.appointment); + }); + }); + } + @override Widget build(BuildContext context) { _context = context; return AppScaffold( - appBarTitle: TranslationBase.of(context).attendRegisterCode, + appBarTitle: TranslationBase.of(context).onlineCheckIn, isShowAppBar: true, showNewAppBar: true, showNewAppBarTitle: true, body: SingleChildScrollView( - child: Container( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.max, - children: [ - Container( - width: double.infinity, - height: MediaQuery.of(context).size.width / 3, - child: Row( - children: [ - Expanded( - flex: 1, - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - InkWell( - child: Container( - margin: EdgeInsets.only(top: 30.0), - alignment: Alignment.center, - padding: EdgeInsets.all(8), - decoration: BoxDecoration( - border: Border.all(color: Colors.black), - borderRadius: BorderRadius.circular(10), - ), - child: SvgPicture.asset("assets/images/nfc/contactless.svg"), - ), - onTap: () { - showNfcReader(context, onNcfScan: (String nfcId) { - Future.delayed(const Duration(milliseconds: 100), () { - sendNfcCheckInRequest(nfcId); - locator().todoList.to_do_list_nfc(widget.appointment); - }); - }, onCancel: () { - // Navigator.of(context).pop(); - locator().todoList.to_do_list_nfc_cancel(widget.appointment); - }); - }, - ), - ], - ), - ), - // Expanded( - // flex: 1, - // child: Container( - // margin: EdgeInsets.only(top: 30.0), - // alignment: Alignment.center, - // child: Image.memory( - // _bytes, - // ), - // ), - // ), - ], - ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + DoctorHeader( + headerModel: HeaderModel( + widget.appointment.doctorTitle + " " + widget.appointment.doctorNameObj, + widget.appointment.doctorID, + widget.appointment.doctorImageURL, + widget.appointment.doctorSpeciality, + "", + widget.appointment.projectName, + DateUtil.convertStringToDate(widget.appointment.appointmentDate), + widget.appointment.isLiveCareAppointment + ? DateUtil.convertStringToDate(widget.appointment.appointmentDate).toString().split(" ")[1].substring(0, 5) + : widget.appointment.startTime.substring(0, 5), + null, + widget.appointment.doctorRate, + widget.appointment.actualDoctorRate, + widget.appointment.noOfPatientsRate, + "", ), - Container( - margin: EdgeInsets.only(top: 20.0, left: 20.0, right: 20.0), - child: Divider( - color: Colors.red[700], - thickness: 0.8, + isShowName: true, + isNeedToShowButton: false, + buttonTitle: '', + onTap: () {}, + onRatingAndReviewTap: () {}, + ), + InkWell( + child: Container( + margin: EdgeInsets.only(top: 30.0), + padding: EdgeInsets.all(8), + child: SvgPicture.asset( + "assets/images/nfc/contactless.svg", + width: 80.0, + height: 80.0, ), ), - Row( - children: [ - Expanded( - child: Container( - width: double.infinity, - margin: EdgeInsets.only(top: 15.0, bottom: 10.0, left: 20.0, right: 20.0), - child: Text(TranslationBase.of(context).scanQRHospital, style: TextStyle(color: Colors.red[700], fontSize: 18.0, fontWeight: FontWeight.bold)), - ), + onTap: () { + showNfcReader(context, onNcfScan: (String nfcId) { + Future.delayed(const Duration(milliseconds: 100), () { + sendNfcCheckInRequest(nfcId); + locator().todoList.to_do_list_nfc(widget.appointment); + }); + }, onCancel: () { + // Navigator.of(context).pop(); + locator().todoList.to_do_list_nfc_cancel(widget.appointment); + }); + }, + ), + Row( + children: [ + Expanded( + child: Container( + width: double.infinity, + margin: EdgeInsets.only(top: 15.0, bottom: 10.0, left: 20.0, right: 20.0), + child: Text(TranslationBase.of(context).scanQRHospital, + style: TextStyle( + fontSize: 20, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + )), ), - ], - ), - Container( - margin: EdgeInsets.only(top: 10.0, left: 20.0, right: 20.0), - child: Divider( - color: Colors.red[700], - thickness: 0.8, ), - ), - Container( - margin: EdgeInsets.only(top: 15.0, bottom: 10.0, left: 20.0, right: 20.0), - child: Text(TranslationBase.of(context).appoInfo, style: TextStyle(fontSize: 18.0, color: Colors.grey[700], fontWeight: FontWeight.bold)), - ), - Container( - margin: EdgeInsets.only(left: 20.0, bottom: 20.0, right: 20.0), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10), - color: Colors.grey[200], - boxShadow: [ - BoxShadow(color: Colors.grey, spreadRadius: 2), - ], + ], + ), + ], + ), + ), + bottomSheet: Container( + color: CustomColors.appBackgroudGreyColor, + padding: EdgeInsets.all(21), + // height: 45.0, + child: Row( + children: [ + Expanded( + flex: 1, + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - margin: EdgeInsets.only(top: 15.0, bottom: 10.0, left: 20.0, right: 20.0), - child: Text(widget.patientShareResponse.doctorNameObj, style: TextStyle(fontSize: 18.0, color: Colors.grey[700], fontWeight: FontWeight.bold)), - ), - if (getDoctorSpeciality(widget.patientShareResponse.doctorSpeciality) != "null\n") - Container( - margin: EdgeInsets.only(bottom: 10.0, left: 20.0, right: 20.0), - child: Text(getDoctorSpeciality(widget.patientShareResponse.doctorSpeciality), style: TextStyle(fontSize: 18.0, color: Colors.grey[700])), - ), - Container( - margin: EdgeInsets.only(top: 0.0, bottom: 10.0, left: 20.0, right: 20.0), - child: Text(widget.patientShareResponse.projectName, style: TextStyle(fontSize: 18.0, color: Colors.grey[700])), - ), - Container( - margin: EdgeInsets.only(top: 0.0, bottom: 10.0, left: 20.0, right: 20.0), - child: Text(getDate(widget.patientShareResponse.appointmentDate), style: TextStyle(fontSize: 18.0, color: Colors.grey[700])), - ), - ], + height: 45.0, + child: CustomTextButton( + backgroundColor: CustomColors.green, + elevation: 0, + onPressed: () { + startNFCScan(); + }, + child: Text(TranslationBase.of(context).scanNFC, + style: TextStyle( + fontSize: 18.0, + color: Colors.white, + )), ), ), - // Container( - // margin: EdgeInsets.only(left: 20.0, right: 20.0, top: 15.0), - // alignment: Alignment.bottomCenter, - // child: Column( - // mainAxisAlignment: MainAxisAlignment.end, - // children: [ - // DefaultButton(TranslationBase.of(context).sendEmail.toUpperCase(), () => {sendEmail()}) - // ], - // ), - // ), - ], - ), + ), + ], ), ), ); diff --git a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart index 9b5374ef..04f6d1b0 100644 --- a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart +++ b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart @@ -16,7 +16,7 @@ import 'package:flutter/material.dart'; import 'package:intl/intl.dart'; import 'package:provider/provider.dart'; import 'package:syncfusion_flutter_calendar/calendar.dart'; - +import 'dart:convert'; import '../../../uitl/date_uitl.dart'; class DocAvailableAppointments extends StatefulWidget { @@ -58,6 +58,7 @@ class _DocAvailableAppointmentsState extends State wit var language; bool isLiveCareSchedule; + // String selectedLogSlots =''; @override void didUpdateWidget(covariant DocAvailableAppointments oldWidget) { @@ -212,6 +213,22 @@ class _DocAvailableAppointmentsState extends State wit if (dayEvents.length != 0) { DocAvailableAppointments.areSlotsAvailable = true; selectedButtonIndex = 0; + // selectedLogSlots = dayEvents[selectedButtonIndex].toString(); + List> timeList =[]; + for(var i =0; i timeSlot={ + "isoTime":dayEvents[i].isoTime, + "start":dayEvents[i].start.toString(), + "end":dayEvents[i].end.toString(), + "vidaDate":dayEvents[i].vidaDate + }; + timeList.add(timeSlot); + } + + + + AppSharedPreferences sharedPref = new AppSharedPreferences(); + sharedPref.setString('selectedLogSlots', json.encode(timeList)); DocAvailableAppointments.selectedTime = dayEvents[selectedButtonIndex].isoTime; } else DocAvailableAppointments.areSlotsAvailable = false; @@ -229,7 +246,7 @@ class _DocAvailableAppointmentsState extends State wit ? DateUtil.convertStringToDate(freeSlotsResponse[i]) : DateUtil.convertStringToDateSaudiTimezone(freeSlotsResponse[i], widget.doctor.projectID); slotsList.add(FreeSlot(date, ['slot'])); - docFreeSlots.add(TimeSlot(isoTime: formatter.format(date), start: new DateTime(date.year, date.month, date.day, 0, 0, 0, 0), end: date)); + docFreeSlots.add(TimeSlot(isoTime: formatter.format(date), start: new DateTime(date.year, date.month, date.day, 0, 0, 0, 0), end: date, vidaDate: freeSlotsResponse[i])); } _eventsParsed = Map.fromIterable(slotsList, key: (e) => e.slot, value: (e) => e.event); setState(() { @@ -300,9 +317,10 @@ class _DocAvailableAppointmentsState extends State wit } getDoctorFreeSlots(context, DoctorList docObject) { + print(DocAvailableAppointments.initialSlotDuration); GifLoaderDialogUtils.showMyDialog(context); DoctorsListService service = new DoctorsListService(); - service.getDoctorFreeSlots(docObject.doctorID, docObject.clinicID, docObject.projectID, context).then((res) { + service.getDoctorFreeSlots(docObject.doctorID, docObject.clinicID, docObject.projectID, context, projectViewModel).then((res) { GifLoaderDialogUtils.hideDialog(context); if (res['MessageStatus'] == 1) { if (res['FreeTimeSlots'].length != 0) { diff --git a/lib/pages/BookAppointment/components/SearchByClinic.dart b/lib/pages/BookAppointment/components/SearchByClinic.dart index b8f1a378..891d01cb 100644 --- a/lib/pages/BookAppointment/components/SearchByClinic.dart +++ b/lib/pages/BookAppointment/components/SearchByClinic.dart @@ -531,7 +531,15 @@ class _SearchByClinicState extends State { searchInfo.clinic = selectedClinic; searchInfo.date = DateTime.now(); - navigateToDentalComplaints(context, searchInfo); + if(projectViewModel.isLogin) { + if(projectViewModel.user.age > 12) { + navigateToDentalComplaints(context, searchInfo); + } else { + callDoctorsSearchAPI(17); + } + } else { + navigateToDentalComplaints(context, searchInfo); + } } else if (dropdownValue.split("-")[0] == "253") { navigateToLaserClinic(context); // callDoctorsSearchAPI(); @@ -552,15 +560,15 @@ class _SearchByClinicState extends State { Navigator.push(context, FadePage(page: LiveCareHome())); } if (value == "schedule") { - callDoctorsSearchAPI(); + callDoctorsSearchAPI(int.parse(dropdownValue.split("-")[0])); } }); } else { - callDoctorsSearchAPI(); + callDoctorsSearchAPI(int.parse(dropdownValue.split("-")[0])); } } - callDoctorsSearchAPI() { + callDoctorsSearchAPI(int clinicID) { GifLoaderDialogUtils.showMyDialog(context); List doctorsList = []; List arr = []; @@ -570,7 +578,7 @@ class _SearchByClinicState extends State { List _patientDoctorAppointmentListHospital = List(); DoctorsListService service = new DoctorsListService(); - service.getDoctorsList(int.parse(dropdownValue.split("-")[0]), projectDropdownValue != "" ? int.parse(projectDropdownValue) : 0, nearestAppo, context).then((res) { + service.getDoctorsList(clinicID, projectDropdownValue != "" ? int.parse(projectDropdownValue) : 0, nearestAppo, context).then((res) { GifLoaderDialogUtils.hideDialog(context); if (res['MessageStatus'] == 1) { setState(() { diff --git a/lib/pages/Covid-DriveThru/covid-payment-summary.dart b/lib/pages/Covid-DriveThru/covid-payment-summary.dart index 6c814066..d23be14a 100644 --- a/lib/pages/Covid-DriveThru/covid-payment-summary.dart +++ b/lib/pages/Covid-DriveThru/covid-payment-summary.dart @@ -376,7 +376,7 @@ class _CovidPaymentSummaryState 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) { + service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), false, context).then((res) { print("Printing Payment Status Reponse!!!!"); print(res); String paymentInfo = res['Response_Message']; diff --git a/lib/pages/DrawerPages/family/my-family.dart b/lib/pages/DrawerPages/family/my-family.dart index d9f15af8..f7d58b36 100644 --- a/lib/pages/DrawerPages/family/my-family.dart +++ b/lib/pages/DrawerPages/family/my-family.dart @@ -447,9 +447,9 @@ class _MyFamily extends State with TickerProviderStateMixin { } refreshFamily(context) { - GifLoaderDialogUtils.hideDialog(context); setState(() { sharedPref.remove(FAMILY_FILE); + checkUserData(); }); } diff --git a/lib/pages/DrawerPages/notifications/notification_details_page.dart b/lib/pages/DrawerPages/notifications/notification_details_page.dart index ad4815d9..65547b39 100644 --- a/lib/pages/DrawerPages/notifications/notification_details_page.dart +++ b/lib/pages/DrawerPages/notifications/notification_details_page.dart @@ -87,20 +87,21 @@ class _NotificationsDetailsPageState extends State { showVideoProgressIndicator: true, ), ), - if (widget.notification.messageTypeData.length != 0 && widget.notification.notificationType != "2") - Padding( - padding: const EdgeInsets.only(top: 18), - child: Image.network(widget.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), - ), + if (widget.notification.messageTypeData != null) + if (widget.notification.messageTypeData.length != 0 && widget.notification.notificationType != "2") + Padding( + padding: const EdgeInsets.only(top: 18), + child: Image.network(widget.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), + ), SizedBox(height: 18), Text( widget.notification.message.trim(), diff --git a/lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart b/lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart index d69ed4f3..057cb5c2 100644 --- a/lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart +++ b/lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart @@ -102,19 +102,23 @@ class _PickupLocationState extends State { ), child: InkWell( onTap: () { - Navigator.push( - context, - FadePage( - page: PickupLocationFromMap( - latitude: projectViewModel.latitude ?? 0, - longitude: projectViewModel.longitude ?? 0, - onPick: (value) { - setState(() { - _result = value; - }); - }, - )), - ); + if (projectViewModel.latitude != null && projectViewModel.longitude != null) { + Navigator.push( + context, + FadePage( + page: PickupLocationFromMap( + latitude: projectViewModel.latitude ?? 0, + longitude: projectViewModel.longitude ?? 0, + onPick: (value) { + setState(() { + _result = value; + }); + }, + )), + ); + } else { + locationUtils.getCurrentLocation(); + } }, child: Row( children: [ @@ -438,20 +442,24 @@ class _PickupLocationState extends State { ), child: InkWell( onTap: () { - Navigator.push( - context, - FadePage( - page: PickupLocationFromMap( - latitude: projectViewModel.latitude, - longitude: projectViewModel.longitude, - onPick: (value) { - setState(() { - _result = value; - }); - }, + if (projectViewModel.latitude != null && projectViewModel.longitude != null) { + Navigator.push( + context, + FadePage( + page: PickupLocationFromMap( + latitude: projectViewModel.latitude, + longitude: projectViewModel.longitude, + onPick: (value) { + setState(() { + _result = value; + }); + }, + ), ), - ), - ); + ); + } else { + locationUtils.getCurrentLocation(); + } }, child: Row( children: [ diff --git a/lib/pages/ErService/EdOnline/EdPaymentInformationPage.dart b/lib/pages/ErService/EdOnline/EdPaymentInformationPage.dart index 6b313a47..9a276ebd 100644 --- a/lib/pages/ErService/EdOnline/EdPaymentInformationPage.dart +++ b/lib/pages/ErService/EdOnline/EdPaymentInformationPage.dart @@ -168,7 +168,7 @@ class _EdPaymentInformationPageState extends State { browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart); transID = Utils.getAdvancePaymentTransID(widget.selectedHospital.iD, projectViewModel.user.patientID); browser.openPaymentBrowser(amount, "ER Online Check-In", transID, appo.projectID.toString(), authenticatedUser.emailAddress, paymentMethod, authenticatedUser.patientType, - authenticatedUser.firstName, authenticatedUser.patientID, authenticatedUser, browser, false, "3", ""); + authenticatedUser.firstName, authenticatedUser.patientID, authenticatedUser, browser, false, "3", "", context); } onBrowserLoadStart(String url) { @@ -200,7 +200,7 @@ class _EdPaymentInformationPageState extends State { checkPaymentStatus(AppoitmentAllHistoryResultList appo) { DoctorsListService service = new DoctorsListService(); GifLoaderDialogUtils.showMyDialog(AppGlobal.context); - service.checkPaymentStatus(transID, AppGlobal.context).then((res) { + service.checkPaymentStatus(transID, false, AppGlobal.context).then((res) { GifLoaderDialogUtils.hideDialog(AppGlobal.context); String paymentInfo = res['Response_Message']; if (paymentInfo == 'Success') { diff --git a/lib/pages/ErService/rapid-response-team/rrt-pickup-address-page.dart b/lib/pages/ErService/rapid-response-team/rrt-pickup-address-page.dart index c12cdb26..56033e8c 100644 --- a/lib/pages/ErService/rapid-response-team/rrt-pickup-address-page.dart +++ b/lib/pages/ErService/rapid-response-team/rrt-pickup-address-page.dart @@ -309,6 +309,11 @@ class RRTRequestPickupAddressPageState extends State { padding: EdgeInsets.all(21), shrinkWrap: true, itemBuilder: (context, index) { - bool shouldEnable = (widget.appo.clinicID == 17 && widget.appo.clinicID == 47 && appoButtonsList[index].caller == "openReschedule"); + bool shouldEnable = ((widget.appo.clinicID == 17 || widget.appo.clinicID == 47) && appoButtonsList[index].caller == "openReschedule"); return InkWell( onTap: shouldEnable ? null @@ -106,13 +107,18 @@ class _AppointmentActionsState extends State { locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'hospital location'); break; case "addReminder": + GAnalytics.APPOINTMENT_DETAIL_FLOW_TYPE = 'my appointment'; showReminderDialog( context, - DateUtil.convertStringToDate(widget.appo.appointmentDate), + new DateFormat("dd MMM yyyy hh:mm") + .parse(DateUtil.formatDateToDate(DateUtil.convertStringToDate(widget.appo.appointmentDate), widget.projectViewModel.isArabic) + " " + widget.appo.startTime), + //DateUtil.convertStringToDate(widget.appo.appointmentDate), widget.appo.doctorNameObj, "", + DateUtil.formatDateToDate(DateUtil.convertStringToDate(widget.appo.appointmentDate), widget.projectViewModel.isArabic), - DateUtil.formatDateToTime(DateUtil.convertStringToDate(widget.appo.appointmentDate)), + // DateUtil.formatDateToTime(DateUtil.convertStringToDate(widget.appo.appointmentDate)), + widget.appo.startTime, onSuccess: () { AppToast.showSuccessToast(message: TranslationBase.of(context).reminderSuccess); }, diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart index 5e151793..d8eeded9 100644 --- a/lib/pages/ToDoList/ToDo.dart +++ b/lib/pages/ToDoList/ToDo.dart @@ -360,7 +360,7 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { return DoctorCard( onTap: () => ancillaryOrdersDetails(widget.ancillaryLists[0].ancillaryOrderList[index], widget.ancillaryLists[0].projectID), isInOutPatient: true, - name: TranslationBase.of(context).dr.toString() + " " + (widget.ancillaryLists[0].ancillaryOrderList[index].doctorName), + name: TranslationBase.of(context).dr.toString() + " " + (widget.ancillaryLists[0].ancillaryOrderList[index].doctorName ?? ""), billNo: widget.ancillaryLists[0].ancillaryOrderList[index].orderNo.toString(), profileUrl: "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", subName: widget.ancillaryLists[0].projectName, @@ -960,6 +960,7 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { appo.isLiveCareAppointment, "2", appo.isLiveCareAppointment ? widget.patientShareResponse.clinicID.toString() : "", + context, appo.appointmentDate, appo.appointmentNo, appo.clinicID, @@ -1096,7 +1097,7 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { final currency = projectViewModel.user.outSA == 0 ? "sar" : 'aed'; GifLoaderDialogUtils.showMyDialog(context); DoctorsListService service = new DoctorsListService(); - service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), context).then((res) { + service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), false, context).then((res) { GifLoaderDialogUtils.hideDialog(context); String paymentInfo = res['Response_Message']; if (paymentInfo == 'Success') { diff --git a/lib/pages/insurance/insurance_page.dart b/lib/pages/insurance/insurance_page.dart index 75acbffb..2ea4213f 100644 --- a/lib/pages/insurance/insurance_page.dart +++ b/lib/pages/insurance/insurance_page.dart @@ -143,10 +143,10 @@ class InsurancePage extends StatelessWidget { } getDetails({String setupID, int projectID, String patientIdentificationID, int patientID, String name, bool isFamily, int parentID = 0, BuildContext context}) { - // GifLoaderDialogUtils.showMyDialog(context); - // _insuranceCardService.getPatientInsuranceDetails(setupID: setupID, projectID: projectID, patientID: patientID, patientIdentificationID: patientIdentificationID, isFamily: isFamily, parentID: parentID).then((value) { - // GifLoaderDialogUtils.hideDialog(context); - // if (!_insuranceCardService.hasError && _insuranceCardService.isHaveInsuranceCard) { + GifLoaderDialogUtils.showMyDialog(context); + _insuranceCardService.getPatientInsuranceDetails(setupID: setupID, projectID: projectID, patientID: patientID, patientIdentificationID: patientIdentificationID, isFamily: isFamily, parentID: parentID).then((value) { + GifLoaderDialogUtils.hideDialog(context); + if (!_insuranceCardService.hasError && _insuranceCardService.isHaveInsuranceCard) { Navigator.push( context, FadePage( @@ -158,9 +158,9 @@ class InsurancePage extends StatelessWidget { ))).then((value) { model.getInsuranceUpdated(); }); - // } else { - // AppToast.showErrorToast(message: _insuranceCardService.error); - // } - // }); + } else { + AppToast.showErrorToast(message: _insuranceCardService.error); + } + }); } } diff --git a/lib/pages/landing/fragments/home_page_fragment2.dart b/lib/pages/landing/fragments/home_page_fragment2.dart index 06229ccc..9111c2ab 100644 --- a/lib/pages/landing/fragments/home_page_fragment2.dart +++ b/lib/pages/landing/fragments/home_page_fragment2.dart @@ -52,14 +52,15 @@ class _HomePageFragment2State extends State { initialiseHmgServices(bool isLogin) { hmgServices.clear(); - hmgServices.add(new HmgServices(0, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin)); - hmgServices.add(new HmgServices(1, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/CoronaIcon.svg", isLogin)); - hmgServices.add(new HmgServices(2, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", isLogin)); + + hmgServices.add(new HmgServices(0, TranslationBase.of(context).book, TranslationBase.of(context).appointmentLabel, "assets/images/new/book appointment.svg", isLogin)); + hmgServices.add(new HmgServices(1, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin)); + hmgServices.add(new HmgServices(2, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin)); hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin)); hmgServices.add(new HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin)); - hmgServices.add(new HmgServices(5, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin)); + hmgServices.add(new HmgServices(5, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", isLogin)); hmgServices.add(new HmgServices(6, TranslationBase.of(context).ereferralTitle, TranslationBase.of(context).ereferralSubtitle, "assets/images/new/E_Referral.svg", isLogin)); - hmgServices.add(new HmgServices(7, "H\u2082O", TranslationBase.of(context).dailyWater, "assets/images/new/h2o.svg", isLogin)); + hmgServices.add(new HmgServices(7, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/CoronaIcon.svg", isLogin)); hmgServices.add(new HmgServices(8, TranslationBase.of(context).connectTitle, TranslationBase.of(context).connectSubtitle, "assets/images/new/reach_us.svg", isLogin)); } @@ -270,7 +271,7 @@ class _HomePageFragment2State extends State { itemCount: hmgServices.length, padding: EdgeInsets.zero, itemBuilder: (BuildContext context, int index) { - return ServicesView(hmgServices[index], index); + return ServicesView(hmgServices[index], index, true); }, ), ), @@ -460,112 +461,126 @@ class _HomePageFragment2State extends State { flex: 1, child: InkWell( onTap: () { - widget.onPharmacyClick(); + if (projectViewModel.havePrivilege(100)) widget.onPharmacyClick(); }, - child: Container( - width: double.infinity, - height: double.infinity, - clipBehavior: Clip.antiAlias, - decoration: containerRadiusWithGradientServices(20, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.lightGreyColor), - child: Stack( - children: [ - Container( - width: double.infinity, - height: double.infinity, - // color: Color(0xFF2B353E), - decoration: containerRadius(Color(0xFF359846), 20), - ), - Container( - width: double.infinity, - height: double.infinity, - clipBehavior: Clip.antiAlias, - decoration: projectViewModel.isArabic - ? containerBottomRightRadiusWithGradientForAr(60, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.lightGreyColor) - : containerBottomRightRadiusWithGradient(60, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.lightGreyColor), - child: Stack( - children: [ - SvgPicture.asset( - "assets/images/new/strips.svg", - width: double.infinity, - height: double.infinity, - fit: BoxFit.cover, - ), - ], + child: Stack(children: [ + Container( + width: double.infinity, + height: double.infinity, + clipBehavior: Clip.antiAlias, + decoration: containerRadiusWithGradientServices(20, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.lightGreyColor), + child: Stack( + children: [ + Container( + width: double.infinity, + height: double.infinity, + // color: Color(0xFF2B353E), + decoration: containerRadius(Color(0xFF359846), 20), ), - ), - projectViewModel.isArabic - ? Positioned( - left: 20, - top: 12, - child: Opacity( - opacity: 0.04, - child: SvgPicture.asset( - "assets/images/new/Pharmacy.svg", - height: MediaQuery.of(context).size.width * 0.15, + Container( + width: double.infinity, + height: double.infinity, + clipBehavior: Clip.antiAlias, + decoration: projectViewModel.isArabic + ? containerBottomRightRadiusWithGradientForAr(60, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.lightGreyColor) + : containerBottomRightRadiusWithGradient(60, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.lightGreyColor), + child: Stack( + children: [ + SvgPicture.asset( + "assets/images/new/strips.svg", + width: double.infinity, + height: double.infinity, + fit: BoxFit.cover, + ), + ], + ), + ), + projectViewModel.isArabic + ? Positioned( + left: 20, + top: 12, + child: Opacity( + opacity: 0.04, + child: SvgPicture.asset( + "assets/images/new/Pharmacy.svg", + height: MediaQuery.of(context).size.width * 0.15, + ), + ), + ) + : Positioned( + right: 20, + top: 12, + child: Opacity( + opacity: 0.04, + child: SvgPicture.asset( + "assets/images/new/Pharmacy.svg", + height: MediaQuery.of(context).size.width * 0.15, + ), ), ), - ) - : Positioned( - right: 20, - top: 12, - child: Opacity( - opacity: 0.04, + Container( + width: double.infinity, + height: double.infinity, + padding: EdgeInsets.all(SizeConfig.widthMultiplier * 3.4), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + color: Colors.yellow, + // width: MediaQuery.of(context).size.width * 0.065, child: SvgPicture.asset( "assets/images/new/Pharmacy.svg", - height: MediaQuery.of(context).size.width * 0.15, + height: MediaQuery.of(context).size.width * 0.08, ), ), - ), - Container( - width: double.infinity, - height: double.infinity, - padding: EdgeInsets.all(SizeConfig.widthMultiplier * 3.4), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Container( - color: Colors.yellow, - // width: MediaQuery.of(context).size.width * 0.065, - child: SvgPicture.asset( - "assets/images/new/Pharmacy.svg", - height: MediaQuery.of(context).size.width * 0.08, - ), - ), - mFlex(1), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - TranslationBase.of(context).onlinePharmacy, - style: TextStyle( - color: Colors.black, - fontSize: 14, - fontWeight: FontWeight.bold, - letterSpacing: -0.45, - height: 1, + mFlex(1), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + TranslationBase.of(context).onlinePharmacy, + style: TextStyle( + color: Colors.black, + fontSize: 14, + fontWeight: FontWeight.bold, + letterSpacing: -0.45, + height: 1, + ), ), - ), - projectViewModel.isArabic ? mHeight(5) : Container(), - Text( - TranslationBase.of(context).ecommerceSolution, - style: TextStyle( - color: Colors.black, - fontSize: 9, - fontWeight: FontWeight.w600, - letterSpacing: -0.27, - height: projectViewModel.isArabic ? 0.2 : 1, + projectViewModel.isArabic ? mHeight(5) : Container(), + Text( + TranslationBase.of(context).ecommerceSolution, + style: TextStyle( + color: Colors.black, + fontSize: 9, + fontWeight: FontWeight.w600, + letterSpacing: -0.27, + height: projectViewModel.isArabic ? 0.2 : 1, + ), ), - ), - ], - ), - ], + ], + ), + ], + ), ), - ), - ], + ], + ), ), - ), + projectViewModel.havePrivilege(100) + ? Container() + : Container( + width: double.infinity, + height: double.infinity, + clipBehavior: Clip.antiAlias, + decoration: containerRadiusWithGradientServices(20, lightColor: CustomColors.lightGreyColor.withOpacity(0.7), darkColor: CustomColors.lightGreyColor.withOpacity(0.7)), + child: Icon( + Icons.lock_outline, + size: 40, + ), + ) + ]), ), ); } diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index cd9e5ac7..e9fbd62c 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -46,7 +46,6 @@ import 'package:flutter_local_notifications/flutter_local_notifications.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:permission_handler/permission_handler.dart'; import 'package:provider/provider.dart'; -import 'package:wifi/wifi.dart'; import '../../locator.dart'; import '../../routes.dart'; @@ -290,8 +289,6 @@ class _LandingPageState extends State with WidgetsBindingObserver { WidgetsBinding.instance.addObserver(this); AppGlobal.context = context; - - _requestIOSPermissions(); pageController = PageController(keepPage: true); _firebaseMessaging.setAutoInitEnabled(true); @@ -309,7 +306,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { _firebaseMessaging.getToken().then((String token) { print("Firebase Token: " + token); sharedPref.setString(PUSH_TOKEN, token); - if(Platform.isIOS) { + if (Platform.isIOS) { voIPKit.getVoIPToken().then((value) { print('🎈 example: getVoIPToken: $value'); AppSharedPreferences().setString(APNS_TOKEN, value); @@ -639,6 +636,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { } void checkUserStatus(token) async { + await PushNotificationHandler.getInstance().isAndroidPermissionGranted(); authService.selectDeviceImei(token).then((SelectDeviceIMEIRES value) => setUserValues(value)); if (authenticatedUserObject.isLogin) { var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE)); diff --git a/lib/pages/landing/widgets/logged_slider_view.dart b/lib/pages/landing/widgets/logged_slider_view.dart index 54417ee4..a74e2231 100644 --- a/lib/pages/landing/widgets/logged_slider_view.dart +++ b/lib/pages/landing/widgets/logged_slider_view.dart @@ -191,7 +191,7 @@ class LoggedSliderView extends StatelessWidget { Texts( '${TranslationBase.of(context).bloodType1} ${model.booldType}', color: Colors.white, - fontSize: 8, + fontSize: 7, ) ], ), diff --git a/lib/pages/landing/widgets/services_view.dart b/lib/pages/landing/widgets/services_view.dart index 1a505e03..f1753f3c 100644 --- a/lib/pages/landing/widgets/services_view.dart +++ b/lib/pages/landing/widgets/services_view.dart @@ -22,6 +22,7 @@ import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-drivethru-locat import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart'; import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; +import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; import 'package:diplomaticquarterapp/pages/medical/medical_profile_page_new.dart'; import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/smart_watch_instructions.dart'; @@ -39,7 +40,6 @@ import 'package:flutter_svg/flutter_svg.dart'; import 'package:url_launcher/url_launcher.dart'; import '../../../locator.dart'; -import '../landing_page.dart'; import '../landing_page_pharmcy.dart'; class ServicesView extends StatelessWidget { @@ -49,133 +49,18 @@ class ServicesView extends StatelessWidget { AuthProvider authProvider = new AuthProvider(); PharmacyModuleViewModel pharmacyModuleViewModel = locator(); LocationUtils locationUtils; + bool isHomePage; - ServicesView(this.hmgServices, this.index); + ServicesView(this.hmgServices, this.index, this.isHomePage); @override Widget build(BuildContext context) { return InkWell( onTap: () { - if (index == 0) { - openLiveCare(context); - } else if (index == 1) { - showCovidDialog(context); - locator().hmgServices.logServiceName('covid-test drive-thru'); - } else if (index == 2) { - Navigator.push(context, FadePage(page: PaymentService())); - locator().hmgServices.logServiceName('online payments'); - } else if (index == 3) { - Navigator.push(context, FadePage(page: HomeHealthCarePage())); - locator().hmgServices.logServiceName('home health care'); - } else if (index == 4) { - Navigator.push(context, FadePage(page: CMCPage())); - locator().hmgServices.logServiceName('comprehensive medical checkup'); - } else if (index == 5) { - Navigator.push(context, FadePage(page: ErOptions(isAppbar: true))); - locator().hmgServices.logServiceName('emergency service'); - } else if (index == 6) { - Navigator.push(context, FadePage(page: EReferralPage())); - locator().hmgServices.logServiceName('e-referral service'); - } else if (index == 7) { - Navigator.push(context, FadePage(page: H2OPage())); - locator().hmgServices.logServiceName('water consumption'); - } else if (index == 8) { - Navigator.push(context, FadePage(page: ContactUsPage())); - locator().hmgServices.logServiceName('find us reach us'); - } else if (index == 9) { - Navigator.push( - context, - FadePage( - page: MedicalProfilePageNew(), - ), - ); - locator().hmgServices.logServiceName('my medical details'); - } else if (index == 10) { - Navigator.push( - context, - FadePage( - page: Search(), - ), - ); - locator().hmgServices.logServiceName('book appointment'); - } else if (index == 11) { - getPharmacyToken(context); - locator().hmgServices.logServiceName('al habib pharmacy'); - } else if (index == 12) { - Navigator.push( - context, - FadePage( - page: InsuranceUpdate(), - ), - ); - locator().hmgServices.logServiceName('update insurance'); - } else if (index == 13) { - Navigator.push( - context, - FadePage( - page: MyFamily(), - ), - ); - locator().hmgServices.logServiceName('my family files'); - } else if (index == 14) { - Navigator.push( - context, - FadePage(page: ChildInitialPage()), - ); - locator().hmgServices.logServiceName('my child vaccines'); - } else if (index == 15) { - // Navigator.pop(context); - LandingPage.shared.switchToDoFromHMGServices(); - locator().hmgServices.logServiceName('todo list'); - } else if (index == 16) { - Navigator.push( - context, - FadePage(page: BloodDonationPage()), - ); - locator().hmgServices.logServiceName('blood donation'); - } else if (index == 17) { - Navigator.push( - context, - FadePage( - page: (HealthCalculators()), - ), - ); - locator().hmgServices.logServiceName('health calculator'); - } else if (index == 18) { - Navigator.push( - context, - FadePage( - page: HealthConverter(), - ), - ); - locator().hmgServices.logServiceName('heath converters'); - } else if (index == 19) { - Navigator.push( - context, - FadePage(page: SmartWatchInstructions()), - ); - locator().hmgServices.logServiceName('smart watches'); - } else if (index == 20) { - locator().hmgServices.logServiceName('car parcking service'); - Navigator.push( - context, - FadePage( - page: ParkingPage(), - ), - ); - } else if (index == 21) { - launch("https://hmgwebservices.com/vt_mobile/html/index.html"); - locator().hmgServices.logServiceName('virtual tour'); - } else if (index == 22) { - Navigator.of(context).push( - MaterialPageRoute( - builder: (BuildContext context) => MyWebView( - title: "HMG News", - selectedUrl: "https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live", - ), - ), - ); - locator().hmgServices.logServiceName('latest news'); + if (isHomePage) { + handleHomePageServices(hmgServices, context); + } else { + handleAllServices(hmgServices, context); } }, child: Container( @@ -202,7 +87,7 @@ class ServicesView extends StatelessWidget { padding: const EdgeInsets.all(12.0), child: Opacity( opacity: 0.04, - child: hmgServices.action == 2 + child: hmgServices.action == 5 ? Image.asset( hmgServices.icon, width: double.infinity, @@ -231,7 +116,7 @@ class ServicesView extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ mFlex(1), - hmgServices.action == 2 + hmgServices.action == (isHomePage ? 5 : 8) ? Image.asset( hmgServices.icon, height: index == 0 ? MediaQuery.of(context).size.width / 18 : MediaQuery.of(context).size.width / 18, @@ -278,6 +163,236 @@ class ServicesView extends StatelessWidget { ); } + handleHomePageServices(HmgServices hmgServices, BuildContext context) { + if (hmgServices.action == 0) { + Navigator.push(context, FadePage(page: Search())); + locator().hmgServices.logServiceName('book appointment'); + } else if (hmgServices.action == 1) { + openLiveCare(context); + } else if (hmgServices.action == 2) { + Navigator.push(context, FadePage(page: ErOptions(isAppbar: true))); + locator().hmgServices.logServiceName('emergency service'); + } else if (hmgServices.action == 3) { + Navigator.push(context, FadePage(page: HomeHealthCarePage())); + locator().hmgServices.logServiceName('home health care'); + } else if (hmgServices.action == 4) { + Navigator.push(context, FadePage(page: CMCPage())); + locator().hmgServices.logServiceName('comprehensive medical checkup'); + } else if (hmgServices.action == 5) { + Navigator.push(context, FadePage(page: PaymentService())); + locator().hmgServices.logServiceName('online payments'); + } else if (hmgServices.action == 6) { + Navigator.push(context, FadePage(page: EReferralPage())); + locator().hmgServices.logServiceName('e-referral service'); + } else if (hmgServices.action == 7) { + showCovidDialog(context); + locator().hmgServices.logServiceName('covid-test drive-thru'); + } else if (hmgServices.action == 8) { + Navigator.push(context, FadePage(page: ContactUsPage())); + locator().hmgServices.logServiceName('find us reach us'); + } + } + + handleAllServices(HmgServices hmgServices, BuildContext context) { + if (hmgServices.action == 0) { + Navigator.push(context, FadePage(page: Search())); + locator().hmgServices.logServiceName('book appointment'); + } else if (hmgServices.action == 1) { + openLiveCare(context); + } else if (hmgServices.action == 2) { + Navigator.push(context, FadePage(page: ErOptions(isAppbar: true))); + locator().hmgServices.logServiceName('emergency service'); + } else if (hmgServices.action == 3) { + Navigator.push(context, FadePage(page: HomeHealthCarePage())); + locator().hmgServices.logServiceName('home health care'); + } else if (hmgServices.action == 4) { + Navigator.push(context, FadePage(page: CMCPage())); + locator().hmgServices.logServiceName('comprehensive medical checkup'); + } else if (hmgServices.action == 5) { + getPharmacyToken(context); + locator().hmgServices.logServiceName('al habib pharmacy'); + } else if (hmgServices.action == 6) { + Navigator.push(context, FadePage(page: MedicalProfilePageNew())); + } else if (hmgServices.action == 7) { + Navigator.push(context, FadePage(page: MyFamily())); + locator().hmgServices.logServiceName('my family files'); + } else if (hmgServices.action == 8) { + Navigator.push(context, FadePage(page: PaymentService())); + locator().hmgServices.logServiceName('online payments'); + } else if (hmgServices.action == 9) { + Navigator.push(context, FadePage(page: ChildInitialPage())); + locator().hmgServices.logServiceName('my child vaccines'); + } else if (hmgServices.action == 10) { + Navigator.push(context, FadePage(page: InsuranceUpdate())); + locator().hmgServices.logServiceName('update insurance'); + } else if (hmgServices.action == 11) { + Navigator.push(context, FadePage(page: EReferralPage())); + locator().hmgServices.logServiceName('e-referral service'); + } else if (hmgServices.action == 12) { + Navigator.push(context, FadePage(page: H2OPage())); + locator().hmgServices.logServiceName('water consumption'); + } else if (hmgServices.action == 13) { + Navigator.push(context, FadePage(page: (HealthCalculators()))); + locator().hmgServices.logServiceName('health calculator'); + } else if (hmgServices.action == 14) { + Navigator.push(context, FadePage(page: HealthConverter())); + locator().hmgServices.logServiceName('heath converters'); + } else if (hmgServices.action == 15) { + Navigator.pop(context); + LandingPage.shared.switchToDoFromHMGServices(); + locator().hmgServices.logServiceName('todo list'); + } else if (hmgServices.action == 16) { + Navigator.push(context, FadePage(page: BloodDonationPage())); + locator().hmgServices.logServiceName('blood donation'); + } else if (hmgServices.action == 17) { + showCovidDialog(context); + locator().hmgServices.logServiceName('covid-test drive-thru'); + } else if (hmgServices.action == 18) { + launch("https://hmgwebservices.com/vt_mobile/html/index.html"); + locator().hmgServices.logServiceName('virtual tour'); + } else if (hmgServices.action == 19) { + Navigator.push(context, FadePage(page: SmartWatchInstructions())); + locator().hmgServices.logServiceName('smart watches'); + } else if (hmgServices.action == 20) { + Navigator.push(context, FadePage(page: ParkingPage())); + locator().hmgServices.logServiceName('car parcking service'); + } else if (hmgServices.action == 21) { + Navigator.of(context).push( + MaterialPageRoute( + builder: (BuildContext context) => MyWebView( + title: "HMG News", + selectedUrl: "https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live", + ), + ), + ); + locator().hmgServices.logServiceName('latest news'); + } else if (hmgServices.action == 22) { + Navigator.push(context, FadePage(page: ContactUsPage())); + locator().hmgServices.logServiceName('find us reach us'); + } + + // if (hmgServices.action == 10) { + // openLiveCare(context); + // } else if (index == 1) { + // showCovidDialog(context); + // locator().hmgServices.logServiceName('covid-test drive-thru'); + // } else if (index == 2) { + // Navigator.push(context, FadePage(page: PaymentService())); + // locator().hmgServices.logServiceName('online payments'); + // } else if (index == 3) { + // Navigator.push(context, FadePage(page: HomeHealthCarePage())); + // locator().hmgServices.logServiceName('home health care'); + // } else if (index == 4) { + // Navigator.push(context, FadePage(page: CMCPage())); + // locator().hmgServices.logServiceName('comprehensive medical checkup'); + // } else if (index == 5) { + // Navigator.push(context, FadePage(page: ErOptions(isAppbar: true))); + // locator().hmgServices.logServiceName('emergency service'); + // } else if (index == 6) { + // Navigator.push(context, FadePage(page: EReferralPage())); + // locator().hmgServices.logServiceName('e-referral service'); + // } else if (index == 7) { + // Navigator.push(context, FadePage(page: H2OPage())); + // locator().hmgServices.logServiceName('water consumption'); + // } else if (index == 8) { + // Navigator.push(context, FadePage(page: ContactUsPage())); + // locator().hmgServices.logServiceName('find us reach us'); + // } else if (index == 9) { + // Navigator.push( + // context, + // FadePage( + // page: MedicalProfilePageNew(), + // ), + // ); + // locator().hmgServices.logServiceName('my medical details'); + // } else if (index == 10) { + // Navigator.push( + // context, + // FadePage( + // page: Search(), + // ), + // ); + // locator().hmgServices.logServiceName('book appointment'); + // } else if (index == 11) { + // getPharmacyToken(context); + // locator().hmgServices.logServiceName('al habib pharmacy'); + // } else if (index == 12) { + // Navigator.push( + // context, + // FadePage( + // page: InsuranceUpdate(), + // ), + // ); + // locator().hmgServices.logServiceName('update insurance'); + // } else if (index == 13) { + // Navigator.push( + // context, + // FadePage( + // page: MyFamily(), + // ), + // ); + // locator().hmgServices.logServiceName('my family files'); + // } else if (index == 14) { + // Navigator.push( + // context, + // FadePage(page: ChildInitialPage()), + // ); + // locator().hmgServices.logServiceName('my child vaccines'); + // } else if (index == 15) { + // LandingPage.shared.switchToDoFromHMGServices(); + // locator().hmgServices.logServiceName('todo list'); + // } else if (index == 16) { + // Navigator.push( + // context, + // FadePage(page: BloodDonationPage()), + // ); + // locator().hmgServices.logServiceName('blood donation'); + // } else if (index == 17) { + // Navigator.push( + // context, + // FadePage( + // page: (HealthCalculators()), + // ), + // ); + // locator().hmgServices.logServiceName('health calculator'); + // } else if (index == 18) { + // Navigator.push( + // context, + // FadePage( + // page: HealthConverter(), + // ), + // ); + // locator().hmgServices.logServiceName('heath converters'); + // } else if (index == 19) { + // Navigator.push( + // context, + // FadePage(page: SmartWatchInstructions()), + // ); + // locator().hmgServices.logServiceName('smart watches'); + // } else if (index == 20) { + // locator().hmgServices.logServiceName('car parcking service'); + // Navigator.push( + // context, + // FadePage( + // page: ParkingPage(), + // ), + // ); + // } else if (index == 21) { + // launch("https://hmgwebservices.com/vt_mobile/html/index.html"); + // locator().hmgServices.logServiceName('virtual tour'); + // } else if (index == 22) { + // Navigator.of(context).push( + // MaterialPageRoute( + // builder: (BuildContext context) => MyWebView( + // title: "HMG News", + // selectedUrl: "https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live", + // ), + // ), + // ); + // locator().hmgServices.logServiceName('latest news'); + // } + } + showCovidDialog(BuildContext context) { if (Platform.isAndroid) { showDialog( diff --git a/lib/pages/livecare/incoming_call.dart b/lib/pages/livecare/incoming_call.dart index 69ae98f6..da8c507e 100644 --- a/lib/pages/livecare/incoming_call.dart +++ b/lib/pages/livecare/incoming_call.dart @@ -49,7 +49,7 @@ class _IncomingCallState extends State with SingleTickerProviderSt void dispose() { _animationController.dispose(); player.stop(); - _controller.dispose(); + // _controller.dispose(); disposeAudioResources(); super.dispose(); } @@ -62,17 +62,17 @@ class _IncomingCallState extends State with SingleTickerProviderSt body: FutureBuilder( future: _initializeControllerFuture, builder: (context, snapshot) { - if (snapshot.connectionState == ConnectionState.done) { + // if (snapshot.connectionState == ConnectionState.done) { return Stack( alignment: FractionalOffset.center, children: [ - new Positioned.fill( - child: new AspectRatio(aspectRatio: _controller.value.aspectRatio, child: new CameraPreview(_controller)), - ), + // new Positioned.fill( + // child: new AspectRatio(aspectRatio: _controller.value.aspectRatio, child: new CameraPreview(_controller)), + // ), new Positioned.fill( child: new ClipRect( - child: new BackdropFilter( - filter: new ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0), + // child: new BackdropFilter( + // filter: new ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0), child: new Container( decoration: new BoxDecoration(color: Colors.grey[800].withOpacity(0.8)), child: Column( @@ -191,29 +191,18 @@ class _IncomingCallState extends State with SingleTickerProviderSt ), ), ), - ), + // ), ], ); - } else { - return const Center(child: CircularProgressIndicator()); - } + // } else { + // return const Center(child: CircularProgressIndicator()); + // } }, ), ); } void _runAnimation() async { - final cameras = await availableCameras(); - final firstCamera = cameras[1]; - - _controller = CameraController( - // Get a specific camera from the list of available cameras. - firstCamera, - // Define the resolution to use. - ResolutionPreset.medium, - ); - _initializeControllerFuture = _controller.initialize(); - setState(() { isCameraReady = true; }); @@ -229,7 +218,7 @@ class _IncomingCallState extends State with SingleTickerProviderSt try { // backToHome(); // final roomModel = RoomModel(name: widget.incomingCallData.name, token: widget.incomingCallData.sessionId, identity: widget.incomingCallData.identity); - await _controller.dispose(); + // await _controller.dispose(); changeCallStatusAPI(4); await Navigator.of(context).pushReplacement( MaterialPageRoute( diff --git a/lib/pages/livecare/live_care_payment_page.dart b/lib/pages/livecare/live_care_payment_page.dart index 375249b3..78627450 100644 --- a/lib/pages/livecare/live_care_payment_page.dart +++ b/lib/pages/livecare/live_care_payment_page.dart @@ -2,6 +2,7 @@ import 'dart:io'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/LiveCare/ERAppointmentFeesResponse.dart'; +import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; @@ -10,6 +11,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/covid_consent_dialog.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; @@ -21,8 +23,10 @@ class LiveCarePatmentPage extends StatefulWidget { GetERAppointmentFeesList getERAppointmentFeesList; int waitingTime; String clinicName; + bool isPharmaLiveCare; + String pharmaLiveCareClientID; - LiveCarePatmentPage({@required this.getERAppointmentFeesList, @required this.waitingTime, @required this.clinicName}); + LiveCarePatmentPage({@required this.getERAppointmentFeesList, @required this.waitingTime, @required this.clinicName, this.isPharmaLiveCare = false, this.pharmaLiveCareClientID = ""}); @override _LiveCarePatmentPageState createState() => _LiveCarePatmentPageState(); @@ -46,6 +50,10 @@ class _LiveCarePatmentPageState extends State { showNewAppBarTitle: true, showNewAppBar: true, description: TranslationBase.of(context).erConsultation, + onTap: () { + Navigator.pop(context); + Navigator.pop(context); + }, body: Container( width: double.infinity, height: double.infinity, @@ -277,6 +285,7 @@ class _LiveCarePatmentPageState extends State { child: DefaultButton( TranslationBase.of(context).cancel, () { + if (widget.isPharmaLiveCare) cancelAPI(); Navigator.pop(context, false); }, ), @@ -289,24 +298,28 @@ class _LiveCarePatmentPageState extends State { if (_selected == 0) { AppToast.showErrorToast(message: TranslationBase.of(context).pleaseAcceptTerms); } else { - askVideoCallPermission().then((value) async { - if (value) { - locationUtils = new LocationUtils(isShowConfirmDialog: false, context: context); - locationUtils.getCurrentLocation(callBack: (value) { - print(value); - }); - if (Platform.isAndroid && !(await PlatformBridge.shared().isDrawOverAppsPermissionAllowed())) { - await drawOverAppsMessageDialog(context).then((value) { - return false; + if (widget.isPharmaLiveCare) { + Navigator.pop(context, true); + } else { + askVideoCallPermission().then((value) async { + if (value == true) { + locationUtils = new LocationUtils(isShowConfirmDialog: false, context: context); + locationUtils.getCurrentLocation(callBack: (value) { + print(value); }); + if (Platform.isAndroid && !(await PlatformBridge.shared().isDrawOverAppsPermissionAllowed())) { + await drawOverAppsMessageDialog(context).then((value) { + return false; + }); + } else { + Navigator.pop(context, true); + projectViewModel.analytics.liveCare.livecare_immediate_consultation_TnC(clinic: widget.clinicName); + } } else { - Navigator.pop(context, true); - projectViewModel.analytics.liveCare.livecare_immediate_consultation_TnC(clinic: widget.clinicName); + openPermissionsDialog(); } - } else { - openPermissionsDialog(); - } - }); + }); + } } }, color: CustomColors.green, @@ -321,11 +334,39 @@ class _LiveCarePatmentPageState extends State { ); } + @override + void dispose() { + // cancelAPI(); + super.dispose(); + } + Future askVideoCallPermission() async { - if (!(await Permission.camera.request().isGranted) || !(await Permission.microphone.request().isGranted) || !(await Permission.location.request().isGranted)) { - return false; + if (Platform.isIOS) { + if (!(await Permission.camera.request().isGranted) || !(await Permission.microphone.request().isGranted) || !(await Permission.location.request().isGranted)) { + return false; + } + } else { + await showDialog( + context: context, + builder: (cxt) => CovidConsentDialog( + okTitle: TranslationBase.of(context).acceptLbl, + title: TranslationBase.of(context).covidConsentHeader, + message: TranslationBase.of(context).liveCarePermissions, + onTap: () async { + if (!(await Permission.notification.request().isGranted) || + !(await Permission.camera.request().isGranted) || + !(await Permission.microphone.request().isGranted) || + !(await Permission.location.request().isGranted)) { + return false; + } + }, + )); } return true; + // if (!(await Permission.camera.request().isGranted) || !(await Permission.microphone.request().isGranted) || !(await Permission.location.request().isGranted)) { + // return false; + // } + // return true; } openPermissionsDialog() { @@ -342,6 +383,17 @@ class _LiveCarePatmentPageState extends State { dialog.showAlertDialog(context); } + openPermissionsConsentDialog() { + showDialog( + context: context, + builder: (cxt) => CovidConsentDialog( + okTitle: TranslationBase.of(context).acceptLbl, + title: TranslationBase.of(context).covidConsentHeader, + message: TranslationBase.of(context).covidConsent, + onTap: () async {}, + )); + } + Future drawOverAppsMessageDialog(BuildContext context) async { ConfirmDialog dialog = new ConfirmDialog( context: context, @@ -356,6 +408,13 @@ class _LiveCarePatmentPageState extends State { dialog.showAlertDialog(context); } + void cancelAPI() { + LiveCareService service = new LiveCareService(); + service.cancelPharmaLiveCareRequest(widget.pharmaLiveCareClientID, context).then((res) {}).catchError((err) { + print(err); + }); + } + void onRadioChanged(int value) { setState(() { _selected = value; diff --git a/lib/pages/livecare/livecare_home.dart b/lib/pages/livecare/livecare_home.dart index f5e9bf53..f7656d37 100644 --- a/lib/pages/livecare/livecare_home.dart +++ b/lib/pages/livecare/livecare_home.dart @@ -17,6 +17,10 @@ import 'package:provider/provider.dart'; class LiveCareHome extends StatefulWidget { static bool showFooterButton = true; static bool isLiveCareTypeSelected = false; + final bool isPharmacyLiveCare; + final String pharmacyLiveCareQRCode; + + const LiveCareHome({Key key, this.isPharmacyLiveCare = false, this.pharmacyLiveCareQRCode = ""}) : super(key: key); @override _LiveCareHomeState createState() => _LiveCareHomeState(); @@ -121,6 +125,8 @@ class _LiveCareHomeState extends State with SingleTickerProviderSt isDataLoaded && !hasLiveCareRequest ? ClinicList( getLiveCareHistory: getLiveCareHistory, + isPharmacyLiveCare: widget.isPharmacyLiveCare, + pharmacyLiveCareQRCode: widget.pharmacyLiveCareQRCode, ) : isDataLoaded ? LiveCarePendingRequest(getLiveCareHistory: getLiveCareHistory, pendingERRequestHistoryList: pendingERRequestHistoryList) diff --git a/lib/pages/livecare/livecare_type_select.dart b/lib/pages/livecare/livecare_type_select.dart index 4c8fadce..6f6bf571 100644 --- a/lib/pages/livecare/livecare_type_select.dart +++ b/lib/pages/livecare/livecare_type_select.dart @@ -1,9 +1,14 @@ +import 'package:barcode_scan2/barcode_scan2.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/livecare/pharma_livecare_intro_page.dart'; +import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart'; import 'package:diplomaticquarterapp/theme/colors.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/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:provider/provider.dart'; @@ -18,6 +23,7 @@ class _LiveCareTypeSelectState extends State { AppSharedPreferences sharedPref = AppSharedPreferences(); ProjectViewModel projectViewModel; + String pharmacyLiveCareQRCode = ""; @override void initState() { @@ -89,7 +95,6 @@ class _LiveCareTypeSelectState extends State { Container( margin: EdgeInsets.only(top: 20.0), child: Text(TranslationBase.of(context).livecareSummary, style: TextStyle(fontSize: 14.0, letterSpacing: -0.64, color: CustomColors.textColor, fontWeight: FontWeight.w600))), - GridView( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, crossAxisSpacing: 13, mainAxisSpacing: 9), physics: NeverScrollableScrollPhysics(), @@ -98,6 +103,7 @@ class _LiveCareTypeSelectState extends State { children: [ _loginOptionButton(TranslationBase.of(context).livecareOption1, 'assets/images/new/Live_Care.svg', 1), _loginOptionButton(TranslationBase.of(context).livecareOption4, 'assets/images/new/book appointment.svg', 2), + _loginOptionButton(TranslationBase.of(context).pharmaLiveCare, 'assets/images/new/pharma.svg', 3, isEnable: projectViewModel.havePrivilege(99)), ], ), SizedBox( @@ -110,46 +116,105 @@ class _LiveCareTypeSelectState extends State { ); } - Widget _loginOptionButton(String _title, String _icon, int _loginIndex) { + Widget _loginOptionButton(String _title, String _icon, int _loginIndex, {bool isEnable = true}) { return InkWell( onTap: () { if (_loginIndex == 1) { Navigator.pop(context, "immediate"); projectViewModel.analytics.liveCare.livecare_immediate_consultation(); - } else { + } else if (_loginIndex == 2) { Navigator.pop(context, "schedule"); projectViewModel.analytics.liveCare.livecare_schedule_video_call(); + } else { + //Pharmacy LiveCare + if (isEnable) { + Navigator.push( + context, + FadePage( + page: PharmaLiveCareIntroPage(), + ), + ).then((value) { + if (value != null && value.contains("pharmacy/")) { + pharmacyLiveCareQRCode = value.split("/")[1]; + startPharmacyLiveCareProcess(); + } + }); + } } }, - child: Container( - padding: EdgeInsets.only(left: 20, right: 20, bottom: 3, top: 28), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(15), - color: Colors.white, - border: Border.all( - color: Color(0xffefefef), - width: 1, - ), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - SvgPicture.asset( - _icon, - height: _loginIndex == 1 ? 60 : 50, - width: _loginIndex == 1 ? 60 : 50, + child: Stack(children: [ + AspectRatio( + aspectRatio: 1.0, + child: Container( + padding: EdgeInsets.only(left: 20, right: 20, bottom: 3, top: 28), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), ), - Text( - _title, - style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 20 / 16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + SvgPicture.asset( + _icon, + height: _loginIndex == 3 ? 80 : 60, + width: _loginIndex == 3 ? 80 : 60, + ), + Text( + _title, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 20 / 16), + ), + ], ), - ], + ), ), - ), + isEnable + ? Container() + : Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.grey.withOpacity(0.6), + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + width: double.infinity, + height: double.infinity, + child: Icon( + Icons.lock_outline, + size: 40, + ), + ) + ]), ); } + readQRCode() async { + pharmacyLiveCareQRCode = (await BarcodeScanner.scan())?.rawContent; + if (pharmacyLiveCareQRCode != "") { + GifLoaderDialogUtils.showMyDialog(context); + LiveCareService service = new LiveCareService(); + service.getPatientInfoByQR(pharmacyLiveCareQRCode, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + startPharmacyLiveCareProcess(); + }); + } else {} + } + + startPharmacyLiveCareProcess() { + sharedPref.setString(LIVECARE_CLINIC_DATA, "Pharmacy LiveCare" + "-" + "501" + "-" + "1"); + Navigator.pop(context, "pharmacy/$pharmacyLiveCareQRCode"); + // Navigator.push(context, FadePage(page: LiveCareHome(isPharmacyLiveCare: true, pharmacyLiveCareQRCode: pharmacyLiveCareQRCode,))); + } + getLanguageID() async { var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); setState(() { diff --git a/lib/pages/livecare/pharma_livecare_intro_page.dart b/lib/pages/livecare/pharma_livecare_intro_page.dart new file mode 100644 index 00000000..56890c32 --- /dev/null +++ b/lib/pages/livecare/pharma_livecare_intro_page.dart @@ -0,0 +1,207 @@ +import 'package:barcode_scan2/barcode_scan2.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; + +import '../../uitl/utils.dart'; + +class PharmaLiveCareIntroPage extends StatefulWidget { + const PharmaLiveCareIntroPage({Key key}) : super(key: key); + + @override + State createState() => _PharmaLiveCareIntroPageState(); +} + +class _PharmaLiveCareIntroPageState extends State { + ProjectViewModel projectViewModel; + String pharmacyLiveCareQRCode = ""; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + appBarTitle: TranslationBase.of(context).pharmaLiveCare, + isShowAppBar: true, + showNewAppBarTitle: true, + showNewAppBar: true, + body: SingleChildScrollView( + child: Container( + margin: EdgeInsets.only(left: 20.0, right: 20.0, top: 20.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container(child: Text(TranslationBase.of(context).pharmaLiveCare1, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0, letterSpacing: -0.64, color: CustomColors.darkGrey))), + Container( + margin: EdgeInsets.only(top: 7.0), + child: Text(TranslationBase.of(context).pharmaLiveCareDesc1, style: TextStyle(fontSize: 14.0, letterSpacing: -0.64, color: CustomColors.textColor, fontWeight: FontWeight.w600))), + Container( + margin: EdgeInsets.only(top: 20.0), + child: Text(TranslationBase.of(context).wherePharmaLiveCare, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0, letterSpacing: -0.64, color: CustomColors.darkGrey))), + Container( + margin: EdgeInsets.only(top: 7.0), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Image.asset( + "assets/images/new/booth_image.png", + ), + Container( + width: MediaQuery.of(context).size.width * 0.6, + margin: EdgeInsets.only(left: 10.0, right: 10.0), + child: Text(TranslationBase.of(context).pharmaLiveCareDesc2, + style: TextStyle(fontSize: 14.0, letterSpacing: -0.64, color: CustomColors.textColor, fontWeight: FontWeight.w600))), + ], + )), + Container( + margin: EdgeInsets.only(top: 20.0), + child: Text(TranslationBase.of(context).howPharmaLiveCare, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0, letterSpacing: -0.64, color: CustomColors.darkGrey))), + Container( + margin: EdgeInsets.only(top: 7.0), + child: Text(TranslationBase.of(context).pharmaLiveCareDesc3, style: TextStyle(fontSize: 14.0, letterSpacing: -0.64, color: CustomColors.textColor, fontWeight: FontWeight.w600))), + Container( + margin: EdgeInsets.only(top: 7.0), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(top: 7.0), + padding: EdgeInsets.fromLTRB(14.0, 5.0, 14.0, 5.0), + decoration: BoxDecoration(color: CustomColors.green, borderRadius: BorderRadius.all(Radius.circular(100.0))), + child: Text("1", style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, color: CustomColors.white, fontWeight: FontWeight.w600))), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: SvgPicture.asset("assets/images/new/qr_code.svg", width: 40), + ), + Container( + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text(TranslationBase.of(context).pharmaLiveCareScanQR, + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0, letterSpacing: -0.64, color: CustomColors.darkGrey))), + Container( + width: MediaQuery.of(context).size.width * 0.7, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text(TranslationBase.of(context).pharmaLiveCareScanQR1, + style: TextStyle(fontSize: 14.0, letterSpacing: -0.64, color: CustomColors.textColor, fontWeight: FontWeight.w600))), + ], + ), + ], + ), + ), + Container( + margin: EdgeInsets.only(top: 7.0), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(top: 7.0), + padding: EdgeInsets.fromLTRB(12.0, 5.0, 12.0, 5.0), + decoration: BoxDecoration(color: CustomColors.green, borderRadius: BorderRadius.all(Radius.circular(100.0))), + child: Text("2", style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, color: CustomColors.white, fontWeight: FontWeight.w600))), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: SvgPicture.asset("assets/images/new/payment.svg", width: 40), + ), + Container( + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text(TranslationBase.of(context).pharmaLiveCareMakePayment, + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0, letterSpacing: -0.64, color: CustomColors.darkGrey))), + Container( + width: MediaQuery.of(context).size.width * 0.7, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text(TranslationBase.of(context).pharmaLiveCareMakePayment1, + style: TextStyle(fontSize: 14.0, letterSpacing: -0.64, color: CustomColors.textColor, fontWeight: FontWeight.w600))), + ], + ), + ], + ), + ), + Container( + margin: EdgeInsets.only(top: 7.0), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(top: 7.0), + padding: EdgeInsets.fromLTRB(12.0, 5.0, 12.0, 5.0), + decoration: BoxDecoration(color: CustomColors.green, borderRadius: BorderRadius.all(Radius.circular(100.0))), + child: Text("3", style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, color: CustomColors.white, fontWeight: FontWeight.w600))), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: SvgPicture.asset("assets/images/new/pharmaicon.svg", width: 40), + ), + Container( + width: MediaQuery.of(context).size.width * 0.7, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text(TranslationBase.of(context).pharmaLiveCareJoinConsultation, + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0, letterSpacing: -0.64, color: CustomColors.darkGrey))), + Container( + width: MediaQuery.of(context).size.width * 0.7, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text(TranslationBase.of(context).pharmaLiveCareJoinConsultation1, + style: TextStyle(fontSize: 14.0, letterSpacing: -0.64, color: CustomColors.textColor, fontWeight: FontWeight.w600))), + ], + ), + ], + ), + ), + SizedBox( + height: 100.0, + ) + ], + ), + ), + ), + bottomSheet: Container( + height: MediaQuery.of(context).size.height * 0.08, + width: double.infinity, + color: Colors.white, + child: Column( + children: [ + Container( + width: MediaQuery.of(context).size.width * 0.9, + child: DefaultButton(TranslationBase.of(context).pharmaLiveCareScanQR, () { + readQRCode(); + }), + ), + ], + ), + ), + ); + } + + readQRCode() async { + pharmacyLiveCareQRCode = (await BarcodeScanner.scan())?.rawContent; + if (pharmacyLiveCareQRCode != "") { + GifLoaderDialogUtils.showMyDialog(context); + LiveCareService service = new LiveCareService(); + service.getPatientInfoByQR(pharmacyLiveCareQRCode, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + startPharmacyLiveCareProcess(); + }); + } else {} + } + + startPharmacyLiveCareProcess() { + sharedPref.setString(LIVECARE_CLINIC_DATA, "Pharmacy LiveCare" + "-" + "501" + "-" + "1"); + Navigator.pop(context, "pharmacy/$pharmacyLiveCareQRCode"); + } +} diff --git a/lib/pages/livecare/widgets/LiveCarePendingRequest.dart b/lib/pages/livecare/widgets/LiveCarePendingRequest.dart index 7f22c7b6..a5392c8d 100644 --- a/lib/pages/livecare/widgets/LiveCarePendingRequest.dart +++ b/lib/pages/livecare/widgets/LiveCarePendingRequest.dart @@ -96,15 +96,15 @@ class _LiveCarePendingRequestState extends State { child: Text(TranslationBase.of(context).yourTurn + " " + widget.pendingERRequestHistoryList.patCount.toString() + " " + TranslationBase.of(context).patients, style: TextStyle(fontSize: 12.0, fontWeight: FontWeight.w600, letterSpacing: -0.48)), ), - Row( - children: [ - Container( - padding: const EdgeInsets.all(5.0), - child: Text(TranslationBase.of(context).liveCareSupportContact, style: TextStyle(fontSize: 12.0, fontWeight: FontWeight.w600, letterSpacing: -0.48)), - ), - Directionality(textDirection: TextDirection.ltr, child: Text("011 525 9553", style: TextStyle(fontSize: 12.0, fontWeight: FontWeight.w600, letterSpacing: -0.48))) - ], - ), + // Row( + // children: [ + // Container( + // padding: const EdgeInsets.all(5.0), + // child: Text(TranslationBase.of(context).liveCareSupportContact, style: TextStyle(fontSize: 12.0, fontWeight: FontWeight.w600, letterSpacing: -0.48)), + // ), + // Directionality(textDirection: TextDirection.ltr, child: Text("011 525 9553", style: TextStyle(fontSize: 12.0, fontWeight: FontWeight.w600, letterSpacing: -0.48))) + // ], + // ), mHeight(12.0), Container( child: DefaultButton(TranslationBase.of(context).callLiveCareSupport, () { @@ -112,120 +112,17 @@ class _LiveCarePendingRequestState extends State { // cancelLiveCareRequest(); }), ), + // DefaultButton( + // TranslationBase.of(context).cancel, + // () { + // cancelLiveCareRequest(); + // }, + // ), ], ), ), ], ), - // Column( - // crossAxisAlignment: CrossAxisAlignment.start, - // mainAxisSize: MainAxisSize.min, - // children: [ - // Container( - // child: Text("In Progress:", - // style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)), - // ), - // Container( - // alignment: Alignment.center, - // margin: EdgeInsets.only(top: 10.0), - // child: Text("Estimated Waiting Time: ", - // style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold)), - // ), - // Container( - // transform: Matrix4.translationValues(0.0, -50.0, 0.0), - // alignment: Alignment.center, - // child: CircularCountDownTimer( - // duration: - // widget.pendingERRequestHistoryList.watingtimeInteger * 60, - // width: MediaQuery.of(context).size.width / 3, - // height: MediaQuery.of(context).size.height / 3, - // color: Colors.white, - // fillColor: Colors.green[700], - // strokeWidth: 15.0, - // textStyle: TextStyle( - // fontSize: 22.0, - // color: Colors.black87, - // fontWeight: FontWeight.bold), - // isReverse: true, - // isTimerTextShown: true, - // onComplete: () { - // print('Countdown Ended'); - // }, - // ), - // ), - // Container( - // transform: Matrix4.translationValues(0.0, -60.0, 0.0), - // child: Divider( - // color: Colors.grey[500], - // thickness: 0.7, - // ), - // ), - // Container( - // transform: Matrix4.translationValues(0.0, -50.0, 0.0), - // child: Text("Requested date:", - // style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.bold)), - // ), - // Container( - // transform: Matrix4.translationValues(0.0, -30.0, 0.0), - // child: Text( - // DateUtil.getDateFormatted( - // widget.pendingERRequestHistoryList.arrivalTime), - // style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold)), - // ), - // Container( - // transform: Matrix4.translationValues(0.0, -20.0, 0.0), - // padding: EdgeInsets.all(7.0), - // decoration: BoxDecoration( - // shape: BoxShape.rectangle, - // borderRadius: BorderRadius.all(Radius.circular(5)), - // color: Colors.red[800], - // ), - // margin: EdgeInsets.only(top: 5.0, bottom: 5.0), - // child: Text(widget.pendingERRequestHistoryList.stringCallStatus, - // style: TextStyle(fontSize: 14.0, color: Colors.white)), - // ), - // Container( - // transform: Matrix4.translationValues(0.0, 0.0, 0.0), - // child: Divider( - // color: Colors.grey[500], - // thickness: 0.7, - // ), - // ), - // Container( - // alignment: Alignment.center, - // transform: Matrix4.translationValues(0.0, 10.0, 0.0), - // child: Text( - // "Your turn is after " + - // widget.pendingERRequestHistoryList.patCount.toString() + - // " Patients", - // style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)), - // ), - // Container( - // transform: Matrix4.translationValues(0.0, 110.0, 0.0), - // alignment: Alignment.bottomCenter, - // width: MediaQuery.of(context).size.width, - // child: ButtonTheme( - // shape: RoundedRectangleBorder( - // borderRadius: BorderRadius.circular(10.0), - // ), - // minWidth: MediaQuery.of(context).size.width, - // height: 45.0, - // child: RaisedButton( - // color: Colors.red[800], - // textColor: Colors.white, - // elevation: 0, - // disabledTextColor: Colors.white, - // disabledColor: new Color(0xFFbcc2c4), - // onPressed: () { - // cancelLiveCareRequest(); - // }, - // child: Text(TranslationBase.of(context).cancel, - // style: TextStyle(fontSize: 18.0)), - // ), - // ), - // ), - // ], - // ), ); } diff --git a/lib/pages/livecare/widgets/clinic_list.dart b/lib/pages/livecare/widgets/clinic_list.dart index 05dd19b1..361d2381 100644 --- a/lib/pages/livecare/widgets/clinic_list.dart +++ b/lib/pages/livecare/widgets/clinic_list.dart @@ -10,6 +10,7 @@ import 'package:diplomaticquarterapp/models/LiveCare/LiveCareClinicsListResponse import 'package:diplomaticquarterapp/models/LiveCare/LiveCareScheduleClinicsListResponse.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart'; import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart'; +import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_scheduling/schedule_clinic_card.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_type_select.dart'; @@ -39,8 +40,10 @@ import '../live_care_payment_page.dart'; class ClinicList extends StatefulWidget { final Function getLiveCareHistory; + bool isPharmacyLiveCare; + String pharmacyLiveCareQRCode; - ClinicList({@required this.getLiveCareHistory}); + ClinicList({@required this.getLiveCareHistory, this.isPharmacyLiveCare = false, this.pharmacyLiveCareQRCode = ""}); @override _clinic_listState createState() => _clinic_listState(); @@ -117,7 +120,7 @@ class _clinic_listState extends State { LiveCareService service = new LiveCareService(); GifLoaderDialogUtils.showMyDialog(context); ERAppointmentFeesResponse erAppointmentFeesResponse = new ERAppointmentFeesResponse(); - service.getERAppointmentFees(selectedClinicID, context).then((res) { + service.getERAppointmentFees(selectedClinicID, widget.isPharmacyLiveCare, context).then((res) { GifLoaderDialogUtils.hideDialog(context); if (res['HasAppointment'] == true) { isError = true; @@ -182,7 +185,7 @@ class _clinic_listState extends State { getERAppointmentTime(GetERAppointmentFeesList getERAppointmentFeesList) { LiveCareService service = new LiveCareService(); GifLoaderDialogUtils.showMyDialog(context); - service.getERAppointmentTime(selectedClinicID, context).then((res) { + service.getERAppointmentTime(selectedClinicID, widget.isPharmacyLiveCare, context).then((res) { GifLoaderDialogUtils.hideDialog(context); showLiveCarePaymentDialog(getERAppointmentFeesList, res['WatingtimeInteger']); }).catchError((err) { @@ -193,7 +196,15 @@ class _clinic_listState extends State { } showLiveCarePaymentDialog(GetERAppointmentFeesList getERAppointmentFeesList, int waitingTime) { - navigateTo(context, LiveCarePatmentPage(getERAppointmentFeesList: getERAppointmentFeesList, waitingTime: waitingTime, clinicName: selectedClinicName)).then( + navigateTo( + context, + LiveCarePatmentPage( + getERAppointmentFeesList: getERAppointmentFeesList, + waitingTime: waitingTime, + clinicName: selectedClinicName, + isPharmaLiveCare: widget.isPharmacyLiveCare, + pharmaLiveCareClientID: widget.pharmacyLiveCareQRCode)) + .then( (value) { if (value) { if (getERAppointmentFeesList.total == "0" || getERAppointmentFeesList.total == "0.0") { @@ -211,6 +222,8 @@ class _clinic_listState extends State { // } // } // }); + } else { + Navigator.pop(context); } }, ); @@ -291,6 +304,9 @@ class _clinic_listState extends State { }); } + bool isPharmacyLiveCare = widget.isPharmacyLiveCare; + String pharmaLiveCareQRCodeValue = widget.pharmacyLiveCareQRCode; + Navigator.push( context, FadePage( @@ -299,8 +315,11 @@ class _clinic_listState extends State { setState(() {}); }, patientShare: num.parse(getERAppointmentFeesList.total), + isFromAdvancePayment: widget.isPharmacyLiveCare, ))).then((value) { print(value); + widget.isPharmacyLiveCare = isPharmacyLiveCare; + widget.pharmacyLiveCareQRCode = pharmaLiveCareQRCodeValue; if (value != null) { openPayment(value, authUser, num.parse(getERAppointmentFeesList.total), appo); projectViewModel.analytics.liveCare.payment_method(appointment_type: 'livecare', clinic: selectedClinicName, payment_method: value[0], payment_type: 'appointment'); @@ -315,8 +334,27 @@ class _clinic_listState extends State { selectedInstallmentPlan = paymentMethod[1]; this.amount = amount.toString(); - browser.openPaymentBrowser(amount, "LiveCare Payment", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), "12", authenticatedUser.emailAddress, paymentMethod[0], - authenticatedUser.patientType, authenticatedUser.firstName, authenticatedUser.patientID, authenticatedUser, browser, false, "4", selectedClinicID, "", "", "", "", paymentMethod[1]); + browser.openPaymentBrowser( + amount, + "LiveCare Payment", + widget.isPharmacyLiveCare ? widget.pharmacyLiveCareQRCode : Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), + "12", + authenticatedUser.emailAddress, + paymentMethod[0], + authenticatedUser.patientType, + authenticatedUser.firstName, + authenticatedUser.patientID, + authenticatedUser, + browser, + false, + "4", + selectedClinicID, + context, + "", + "", + "", + "", + paymentMethod[1]); } onBrowserLoadStart(String url) { @@ -424,17 +462,25 @@ class _clinic_listState extends State { final currency = projectViewModel.user.outSA == 0 ? "sar" : 'aed'; DoctorsListService service = new DoctorsListService(); GifLoaderDialogUtils.showMyDialog(context); - service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), context).then((res) { + service + .checkPaymentStatus( + widget.isPharmacyLiveCare ? widget.pharmacyLiveCareQRCode : Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), widget.isPharmacyLiveCare, context) + .then((res) { GifLoaderDialogUtils.hideDialog(context); String paymentInfo = res['Response_Message']; amount = res['Amount'].toString(); payment_method = res['PaymentMethod']; if (paymentInfo == 'Success') { - addNewCallForPatientER(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo)); + addNewCallForPatientER(widget.isPharmacyLiveCare ? widget.pharmacyLiveCareQRCode : Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo)); } else { AppToast.showErrorToast(message: res['Response_Message']); projectViewModel.analytics.liveCare.livecare_immediate_consultation_payment_failed( appointment_type: 'livecare', payment_type: 'appointment', payment_method: selectedPaymentMethod, txn_amount: this.amount, txn_currency: currency, error_message: res['Response_Message']); + Navigator.pushAndRemoveUntil( + context, + MaterialPageRoute(builder: (context) => LandingPage()), + (Route route) => false, + ); } }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); @@ -446,7 +492,7 @@ class _clinic_listState extends State { addNewCallForPatientER(String clientRequestID) { LiveCareService service = new LiveCareService(); GifLoaderDialogUtils.showMyDialog(context); - service.addNewCallForPatientER(selectedClinicID, clientRequestID, context).then((res) { + service.addNewCallForPatientER(selectedClinicID, clientRequestID, widget.isPharmacyLiveCare, context).then((res) { GifLoaderDialogUtils.hideDialog(context); AppToast.showSuccessToast(message: "New Call has been added successfully"); widget.getLiveCareHistory(); @@ -526,13 +572,18 @@ class _clinic_listState extends State { openLiveCareSelectionDialog() async { liveCareClinicIDs = await sharedPref.getString(LIVECARE_CLINIC_DATA); + sharedPref.remove(LIVECARE_CLINIC_DATA); if (liveCareClinicIDs != null) { selectedClinicID = int.parse(liveCareClinicIDs.split("-")[2]); setState(() { currentSelectedLiveCareType = "immediate"; }); + // if(widget.isPharmacyLiveCare) { + // + // } else { getLiveCareClinicsList(); startLiveCare(); + // } } else { Navigator.of(context) .push(new MaterialPageRoute( @@ -540,9 +591,17 @@ class _clinic_listState extends State { return LiveCareTypeSelect(); }, fullscreenDialog: true)) - .then((value) { + .then((value) async { if (value == null) { Navigator.pop(context); + } else if (value.contains("/")) { + widget.isPharmacyLiveCare = true; + widget.pharmacyLiveCareQRCode = value.split("/")[1]; + liveCareClinicIDs = await sharedPref.getString(LIVECARE_CLINIC_DATA); + selectedClinicID = 1; + selectedClinicName = TranslationBase.of(context).pharmaLiveCare; + sharedPref.remove(LIVECARE_CLINIC_DATA); + startLiveCare(); } else { print(value); if (value == "immediate") { diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index 1fd3bbda..73012bd5 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -42,8 +42,8 @@ import 'package:provider/provider.dart'; class ConfirmLogin extends StatefulWidget { final Function changePageViewIndex; final fromRegistration; - - const ConfirmLogin({Key key, this.changePageViewIndex, this.fromRegistration = false}) : super(key: key); + final bool isDubai; + const ConfirmLogin({Key key, this.changePageViewIndex, this.fromRegistration = false, this.isDubai =false}) : super(key: key); @override _ConfirmLogin createState() => _ConfirmLogin(); @@ -385,8 +385,10 @@ class _ConfirmLogin extends State { var request = this.getCommonRequest(type: type); request.sMSSignature = await SMSOTP.getSignature(); GifLoaderDialogUtils.showMyDialog(context); - if (healthId != null) { - request.dob = dob; //isHijri == 1 ? dob : dateFormat2.format(dateFormat.parse(dob)); + if (healthId != null || widget.isDubai) { + if(!widget.isDubai){ + request.dob = dob; //isHijri == 1 ? dob : dateFormat2.format(dateFormat.parse(dob)); + } request.healthId = healthId; request.isHijri = isHijri; await this.authService.sendActivationCodeRegister(request).then((result) { @@ -547,7 +549,7 @@ class _ConfirmLogin extends State { request.searchType = this.registerd_data.searchType != null ? this.registerd_data.searchType : 1; request.patientID = this.registerd_data.patientID != null ? this.registerd_data.patientID : 0; request.patientIdentificationID = request.nationalID = this.registerd_data.patientIdentificationID != null ? this.registerd_data.patientIdentificationID : '0'; - + request.dob = this.registerd_data.dob; request.isRegister = this.registerd_data.isRegister; } else { request.searchType = request.searchType != null ? request.searchType : 2; @@ -565,8 +567,10 @@ class _ConfirmLogin extends State { GifLoaderDialogUtils.showMyDialog(context); var request = this.getCommonRequest().toJson(); dynamic res; - if (healthId != null) { - request['DOB'] = dob; + if (healthId != null || widget.isDubai) { + if(!widget.isDubai) { + request['DOB'] = dob; + } request['HealthId'] = healthId; request['IsHijri'] = isHijri; @@ -579,6 +583,7 @@ class _ConfirmLogin extends State { result = CheckActivationCode.fromJson(result), if (this.registerd_data != null && this.registerd_data.isRegister == true) { + // if(widget.isDubai ==false){ widget.changePageViewIndex(1), Navigator.popUntil(context, (route) => Utils.route(route, equalsTo: RegisterNew)), } diff --git a/lib/pages/login/register-info.dart b/lib/pages/login/register-info.dart index 5d7db69f..1b81dbfb 100644 --- a/lib/pages/login/register-info.dart +++ b/lib/pages/login/register-info.dart @@ -8,6 +8,7 @@ import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart' as checkActivation; import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart'; +import 'package:diplomaticquarterapp/models/Authentication/countries_list.dart'; import 'package:diplomaticquarterapp/models/Authentication/register_info_response.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart'; @@ -45,21 +46,30 @@ class RegisterInfo extends StatefulWidget { class _RegisterInfo extends State { final authService = new AuthProvider(); final sharedPref = new AppSharedPreferences(); - RegisterInfoResponse registerInfo; + RegisterInfoResponse registerInfo = RegisterInfoResponse(); bool isLoading; int page; final List locationList = [ - new Location(name: 'KSA', value: '1'), - new Location(name: 'Dubai', value: '2'), + new Location(name: 'KSA', value: '1', nameAr: "السعودية"), + new Location(name: 'Dubai', value: '2', nameAr: "دبي"), ]; String language = '1'; - var registerd_data; + CheckPatientAuthenticationReq registerd_data; final List languageList = [ - new Language(name: 'English', value: '2'), - new Language(name: 'Arabic', value: '1'), + new Language(name: 'English', value: '2', nameAr: "إنجليزي"), + new Language(name: 'Arabic', value: '1', nameAr: "عربي"), + ]; + final List genderList = [ + new Language(name: 'Male', value: 'M', nameAr: "ذكر"), + new Language(name: 'Female', value: 'F', nameAr: "أنثى"), + ]; + final List maritalList = [ + new Language(name: 'Married', value: 'M', nameAr: "متزوج"), + new Language(name: 'Single', value: 'S', nameAr: "اعزب"), + new Language(name: 'Divorce', value: 'D', nameAr: "الطلاق"), ]; String email = ''; - + List countriesList = []; ToDoCountProviderModel toDoProvider; String location = '1'; AuthenticatedUserObject authenticatedUserObject = locator(); @@ -67,16 +77,22 @@ class _RegisterInfo extends State { ProjectViewModel projectViewModel; AppointmentRateViewModel appointmentRateViewModel = locator(); + bool isDubai = false; + RegisterInfoResponse data = RegisterInfoResponse(); + CheckPatientAuthenticationReq data2; + String gender = 'M'; + String maritalStatus = 'M'; + String nationality = 'SAU'; @override void initState() { + if (widget.page == 1) { + getCountries(); + } WidgetsBinding.instance.addPostFrameCallback((timeStamp) { getRegisterInfo(); }); - setState(() { - page = widget.page; - }); - + page = widget.page; super.initState(); } @@ -105,169 +121,279 @@ class _RegisterInfo extends State { ], ), SizedBox(height: 20), - registerInfo != null && page == 1 + (isDubai && page == 1) ? Column( children: [ SizedBox(height: 20), - getnameField(TranslationBase.of(context).identificationNumber, registerInfo.idNumber, TranslationBase.of(context).firstName, - registerInfo.firstNameEn == '-' ? registerInfo.firstNameAr : registerInfo.firstNameEn), - SizedBox(height: 20), - getnameField(TranslationBase.of(context).middleName, registerInfo.secondNameEn == '-' ? registerInfo.secondNameEn : registerInfo.secondNameEn, - TranslationBase.of(context).lastName, registerInfo.lastNameEn == '-' ? registerInfo.lastNameEn : registerInfo.lastNameEn), + getnameField(TranslationBase.of(context).identificationNumber, registerd_data.patientIdentificationID, TranslationBase.of(context).mobileNumber, + registerd_data.patientMobileNumber.toString()), + // SizedBox(height: 20), + projectViewModel.isArabic + ? getnameField( + '', + inputWidget("First Name", "First Name English", 'fNameEn'), + '', + inputWidget("Last Name", "Last Name English", 'lNameEn'), + ) + : SizedBox( + height: 0, + ), + getnameField( + '', + inputWidget(TranslationBase.of(context).firstName, TranslationBase.of(context).firstName, 'fName'), + '', + inputWidget(TranslationBase.of(context).middleName, TranslationBase.of(context).middleName, 'sName'), + ), + + getnameField( + '', + inputWidget(TranslationBase.of(context).lastName, TranslationBase.of(context).lastName, 'lName'), + TranslationBase.of(context).gender, + Container( + height: 20, + child: DropdownButtonHideUnderline( + child: DropdownButton( + isExpanded: true, + value: gender, + hint: Text(TranslationBase.of(context).gender), + iconSize: 40, + elevation: 16, + onChanged: (value) => { + setState(() { + gender = value; + registerInfo.gender = value; + }) + }, + items: genderList.map>((Language value) { + return DropdownMenuItem( + value: value.value, + child: Text( + projectViewModel.isArabic == 1 ? value.nameAr : value.name, + ), + ); + }).toList()))), + ), SizedBox(height: 20), getnameField( - TranslationBase.of(context).gender, - registerInfo.maritalStatusCode == 'U' - ? 'Unknown' - : registerInfo.maritalStatusCode == 'M' - ? 'Male' - : 'Female', TranslationBase.of(context).maritalStatus, - registerInfo.maritalStatus), - SizedBox(height: 20), - getnameField(TranslationBase.of(context).nationality, registerInfo.nationality, TranslationBase.of(context).mobileNumber, registerd_data.patientMobileNumber.toString()), + Container( + height: 18, + child: DropdownButtonHideUnderline( + child: DropdownButton( + isExpanded: true, + value: maritalStatus, + hint: Text(TranslationBase.of(context).maritalStatus), + iconSize: 40, + elevation: 16, + onChanged: (value) => { + setState(() { + maritalStatus = value; + registerInfo.maritalStatusCode = value; + }) + }, + items: maritalList.map>((Language value) { + return DropdownMenuItem( + value: value.value, + child: Text( + projectViewModel.isArabic == 1 ? value.nameAr : value.name, + ), + ); + }).toList()))), + TranslationBase.of(context).nationality, + Container( + height: 22, + child: DropdownButtonHideUnderline( + child: DropdownButton( + isExpanded: true, + value: nationality, + hint: Text(TranslationBase.of(context).nationality), + iconSize: 40, + elevation: 16, + onChanged: (value) => { + setState(() { + nationality = value; + registerInfo.nationalityCode = value; + }) + }, + items: countriesList.map>((CountriesLists value) { + return DropdownMenuItem( + value: value.iD, + child: Text( + value.name, + ), + ); + }).toList())))), SizedBox(height: 20), - getnameField(TranslationBase.of(context).dateOfBirth, registerInfo.dateOfBirth, "", ""), + getnameField(TranslationBase.of(context).dateOfBirth, registerd_data.dob, "", ""), SizedBox(height: 20), ], ) - : registerInfo != null && widget.page == 2 + : (registerInfo.healthId != null && page == 1) ? Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - width: double.infinity, - decoration: containerRadius(Colors.white, 12), - padding: EdgeInsets.only(left: 10, right: 10, top: 5, bottom: 25), - child: Row(children: [ - Flexible( - child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( - TranslationBase.of(context).prefferedLanguage, - style: TextStyle( - fontSize: 11, - letterSpacing: -0.44, - fontWeight: FontWeight.w600, - ), - ), - Container( - height: 18, - child: DropdownButtonHideUnderline( - child: DropdownButton( - isExpanded: true, - value: language, - hint: Text(TranslationBase.of(context).prefferedLanguage), - iconSize: 40, - elevation: 16, - onChanged: (value) => { - setState(() { - language = value; - }) - }, - items: languageList.map>((Language value) { - return DropdownMenuItem( - value: value.value, - child: Text(value.name), - ); - }).toList()))) - ])) - ])), - SizedBox( - height: 20, - ), - Container( - width: double.infinity, - decoration: containerRadius(Colors.white, 12), - padding: EdgeInsets.only(left: 10, right: 10, top: 5, bottom: 25), - child: Row(children: [ - Flexible( - child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( - TranslationBase.of(context).selectLocation, - style: TextStyle( - fontSize: 11, - letterSpacing: -0.44, - fontWeight: FontWeight.w600, - ), - ), - Container( - height: 18, - child: DropdownButtonHideUnderline( - child: DropdownButton( - isExpanded: true, - value: location, - hint: Text(TranslationBase.of(context).selectLocation), - iconSize: 40, - elevation: 16, - onChanged: (value) => { - setState(() { - location = value; - }) - }, - items: locationList.map>((Location value) { - return DropdownMenuItem( - value: value.value, - child: Text( - value.name, - ), - ); - }).toList()))) - ])) - ])), - SizedBox( - height: 20, - ), - Container( - width: double.infinity, - decoration: containerRadius(Colors.white, 12), - padding: EdgeInsets.only(left: 10, right: 10, top: 5, bottom: 12), - margin: EdgeInsets.only(bottom: 0), - child: Row(children: [ - Flexible( - child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( - TranslationBase.of(context).email, - style: TextStyle( - fontSize: 11, - letterSpacing: -0.44, - fontWeight: FontWeight.w600, - ), - ), - Container( - child: TextField( - onChanged: (value) { - setState(() { - email = value; - }); - }, - style: TextStyle( - fontSize: 14, - height: 21 / 14, - fontWeight: FontWeight.w400, - color: Color(0xff2B353E), - letterSpacing: -0.44, - ), - decoration: InputDecoration( - isDense: true, - hintStyle: TextStyle( - fontSize: 14, - height: 21 / 14, - fontWeight: FontWeight.w400, - color: Color(0xff575757), - letterSpacing: -0.56, - ), - prefixIconConstraints: BoxConstraints(minWidth: 50), - contentPadding: EdgeInsets.zero, - border: InputBorder.none, - focusedBorder: InputBorder.none, - enabledBorder: InputBorder.none, - ), - )) - ])) - ])), + children: [ + SizedBox(height: 20), + getnameField(TranslationBase.of(context).identificationNumber, registerInfo.idNumber, TranslationBase.of(context).firstName, + registerInfo.firstNameEn == '-' ? registerInfo.firstNameAr : registerInfo.firstNameEn), + SizedBox(height: 20), + getnameField(TranslationBase.of(context).middleName, registerInfo.secondNameEn == '-' ? registerInfo.secondNameEn : registerInfo.secondNameEn, + TranslationBase.of(context).lastName, registerInfo.lastNameEn == '-' ? registerInfo.lastNameEn : registerInfo.lastNameEn), + SizedBox(height: 20), + getnameField( + TranslationBase.of(context).gender, + registerInfo.maritalStatusCode == 'U' + ? 'Unknown' + : registerInfo.maritalStatusCode == 'M' + ? 'Male' + : 'Female', + TranslationBase.of(context).maritalStatus, + registerInfo.maritalStatus), + SizedBox(height: 20), + getnameField(TranslationBase.of(context).nationality, registerInfo.nationality, TranslationBase.of(context).mobileNumber, registerd_data.patientMobileNumber.toString()), + SizedBox(height: 20), + getnameField(TranslationBase.of(context).dateOfBirth, registerInfo.dateOfBirth, "", ""), + SizedBox(height: 20), ], ) - : SizedBox(), + : widget.page == 2 + ? Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + width: double.infinity, + decoration: containerRadius(Colors.white, 12), + padding: EdgeInsets.only(left: 10, right: 10, top: 5, bottom: 25), + child: Row(children: [ + Flexible( + child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Text( + TranslationBase.of(context).prefferedLanguage, + style: TextStyle( + fontSize: 11, + letterSpacing: -0.44, + fontWeight: FontWeight.w600, + ), + ), + Container( + height: 18, + child: DropdownButtonHideUnderline( + child: DropdownButton( + isExpanded: true, + value: language, + hint: Text(TranslationBase.of(context).prefferedLanguage), + iconSize: 40, + elevation: 16, + onChanged: (value) => { + setState(() { + language = value; + }) + }, + items: languageList.map>((Language value) { + return DropdownMenuItem( + value: value.value, + child: Text( + projectViewModel.isArabic == 1 ? value.nameAr : value.name, + ), + ); + }).toList()))) + ])) + ])), + SizedBox( + height: 20, + ), + Container( + width: double.infinity, + decoration: containerRadius(Colors.white, 12), + padding: EdgeInsets.only(left: 10, right: 10, top: 5, bottom: 25), + child: Row(children: [ + Flexible( + child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Text( + TranslationBase.of(context).selectLocation, + style: TextStyle( + fontSize: 11, + letterSpacing: -0.44, + fontWeight: FontWeight.w600, + ), + ), + Container( + height: 18, + child: DropdownButtonHideUnderline( + child: DropdownButton( + isExpanded: true, + value: location, + hint: Text(TranslationBase.of(context).selectLocation), + iconSize: 40, + elevation: 16, + onChanged: (value) => { + setState(() { + location = value; + }) + }, + items: locationList.map>((Location value) { + return DropdownMenuItem( + value: value.value, + child: Text( + projectViewModel.isArabic == 1 ? value.nameAr : value.name, + ), + ); + }).toList()))) + ])) + ])), + SizedBox( + height: 20, + ), + Container( + width: double.infinity, + decoration: containerRadius(Colors.white, 12), + padding: EdgeInsets.only(left: 10, right: 10, top: 5, bottom: 12), + margin: EdgeInsets.only(bottom: 0), + child: Row(children: [ + Flexible( + child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Text( + TranslationBase.of(context).email, + style: TextStyle( + fontSize: 11, + letterSpacing: -0.44, + fontWeight: FontWeight.w600, + ), + ), + Container( + child: TextField( + keyboardType: TextInputType.emailAddress, + onChanged: (value) { + setState(() { + email = value; + }); + }, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + decoration: InputDecoration( + isDense: true, + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + prefixIconConstraints: BoxConstraints(minWidth: 50), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + )) + ])) + ])), + ], + ) + : SizedBox(), ]), ), bottomSheet: Container( @@ -289,24 +415,40 @@ class _RegisterInfo extends State { child: DefaultButton(page == 1 ? TranslationBase.of(context).next : TranslationBase.of(context).register, () { nextPage(); page == 1 ? locator().loginRegistration.registration_personal_info() : locator().loginRegistration.registration_patient_info(); - }, textColor: Colors.white, color: isValid() == true && page == 2 || page == 1 ? Color(0xff359846) : Colors.grey)), + }, textColor: Colors.white, color: isValid() == true ? Color(0xff359846) : Colors.grey)), ), ], ))); } - nextPage() { + nextPage() async { if (page == 1) { - setState(() { + if (isDubai) { + await setRegisterData(); widget.changePageViewIndex(2); - }); + } else { + widget.changePageViewIndex(2); + } } else { registerNow(); } } + setRegisterData() async { + registerInfo.gender = gender; + registerInfo.maritalStatusCode = maritalStatus; + registerInfo.nationalityCode = nationality; + projectViewModel.setRegisterData(registerInfo); + // await sharedPref.setObject(REGISTER_INFO_DUBAI, registerInfo); + } + registerNow() { - dynamic request = getTempUserRequest(); + dynamic request; + if (isDubai) + request = getTempUserRequestDubai(); + else + request = getTempUserRequest(); + GifLoaderDialogUtils.showMyDialog(context); dynamic res; this @@ -374,14 +516,17 @@ class _RegisterInfo extends State { } getRegisterInfo() async { - var data = RegisterInfoResponse.fromJson(await sharedPref.getObject(NHIC_DATA)); + if (await sharedPref.getObject(NHIC_DATA) != null) { + data = RegisterInfoResponse.fromJson(await sharedPref.getObject(NHIC_DATA)); + this.registerInfo = data; + } if (await sharedPref.getObject(REGISTER_DATA_FOR_LOGIIN) != null) { - var data2 = CheckPatientAuthenticationReq.fromJson(await sharedPref.getObject(REGISTER_DATA_FOR_LOGIIN)); + data2 = CheckPatientAuthenticationReq.fromJson(await sharedPref.getObject(REGISTER_DATA_FOR_LOGIIN)); setState(() { - this.registerInfo = data; - this.registerd_data = data2; + isDubai = data2.patientOutSA == 1 ? true : false; + if (isDubai) location = '2'; }); } } @@ -424,8 +569,54 @@ class _RegisterInfo extends State { }; } + getTempUserRequestDubai() { + DateFormat dateFormat = DateFormat("mm/dd/yyyy"); + registerInfo = projectViewModel.registerInfo; + print(dateFormat.parse(registerd_data.dob)); + var hDate = new HijriCalendar.fromDate(dateFormat.parse(registerd_data.dob)); + var date = hDate.toString(); + final DateFormat dateFormat1 = DateFormat('MM/dd/yyyy'); + final DateFormat dateFormat2 = DateFormat('dd/MM/yyyy'); + + return { + "Patientobject": { + "TempValue": true, + "PatientIdentificationType": registerd_data.patientIdentificationID.substring(0, 1) == "1" ? 1 : 2, + "PatientIdentificationNo": registerd_data.patientIdentificationID, + "MobileNumber": registerd_data.patientMobileNumber, + "PatientOutSA": (registerd_data.zipCode == '966' || registerd_data.zipCode == '+966') ? 0 : 1, + "FirstNameN": registerInfo.firstNameAr ?? "", + "FirstName": registerInfo.firstNameEn ?? "", + "MiddleNameN": registerInfo.secondNameAr ?? ".", + "MiddleName": registerInfo.secondNameEn ?? ".", + "LastNameN": registerInfo.lastNameAr ?? "", + "LastName": registerInfo.lastNameEn ?? "", + "StrDateofBirth": dateFormat1.format(dateFormat2.parse(registerd_data.dob)), + "DateofBirth": DateUtil.convertISODateToJsonDate(registerd_data.dob.replaceAll('/', '-')), + "Gender": registerInfo.gender == 'M' ? 1 : 2, + "NationalityID": registerInfo.nationalityCode, + "eHealthIDField": null, + "DateofBirthN": date, + "EmailAddress": email, + "SourceType": location, + "PreferredLanguage": registerd_data.languageID.toString(), + "Marital": registerInfo.maritalStatusCode == 'U' + ? '0' + : registerInfo.maritalStatusCode == 'M' + ? '1' + : '2', + }, + "PatientIdentificationID": registerd_data.patientIdentificationID, + "PatientMobileNumber": registerd_data.patientMobileNumber.toString()[0] == '0' ? registerd_data.patientMobileNumber : '0' + registerd_data.patientMobileNumber.toString(), + "DOB": registerd_data.dob, + "IsHijri": registerd_data.isHijri + }; + } + bool isValid() { - if (location != null && language != null && Utils.validEmail(email) == true) { + if ((location != null && language != null && Utils.validEmail(email) == true) || + (registerInfo.firstNameEn != null && registerInfo.lastNameEn != null) || + (projectViewModel.isArabic && registerInfo.firstNameEn != null && registerInfo.firstNameAr != null && registerInfo.lastNameEn != null && registerInfo.lastNameAr != null)) { return true; } else { return false; @@ -436,49 +627,57 @@ class _RegisterInfo extends State { return Row( children: [ Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - name1, - style: TextStyle( - fontSize: 14, - fontWeight: FontWeight.bold, - letterSpacing: -0.44, - ), - ), - Text( - value1, - style: TextStyle( - fontSize: 12, - fontWeight: FontWeight.w600, - letterSpacing: -0.44, - ), - ), - ], - )), + child: Padding( + padding: EdgeInsets.only(left: 5, right: 5), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + name1, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.bold, + letterSpacing: -0.44, + ), + ), + value1 is String + ? Text( + value1, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + letterSpacing: -0.44, + ), + ) + : value1, + ], + ))), Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - name2, - style: TextStyle( - fontSize: 14, - fontWeight: FontWeight.bold, - letterSpacing: -0.44, - ), - ), - Text( - value2, - style: TextStyle( - fontSize: 12, - fontWeight: FontWeight.w600, - letterSpacing: -0.44, - ), - ), - ], - )) + child: Padding( + padding: EdgeInsets.only(left: 5, right: 5), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + name2, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.bold, + letterSpacing: -0.44, + ), + ), + value2 is String + ? Text( + value2, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + letterSpacing: -0.44, + ), + ) + : value2, + ], + ))) ], ); } @@ -547,18 +746,146 @@ class _RegisterInfo extends State { print(err); }); } + + getCountries() { + ClinicListService service = new ClinicListService(); + service.getCountries().then((res) { + if (res['MessageStatus'] == 1) { + res['ListNationality'].forEach((items) => {countriesList.add(CountriesLists.fromJson(items))}); + + setState(() {}); + } + }).catchError((err) { + print(err); + }); + } + + Widget inputWidget(String _labelText, String _hintText, String name, {String prefix, bool isEnable = true, bool hasSelection = false}) { + return Container( + padding: EdgeInsets.only(left: 10, right: 10, bottom: 5, top: 5), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: InkWell( + onTap: hasSelection ? () {} : null, + child: Row( + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _labelText, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + TextField( + enabled: isEnable, + scrollPadding: EdgeInsets.zero, + keyboardType: TextInputType.text, + // controller: _controller, + onChanged: (value) => { + setState(() { + switch (name) { + case 'fName': + { + if (projectViewModel.isArabic) { + registerInfo.firstNameAr = value; + } else { + registerInfo.firstNameEn = value; + registerInfo.firstNameAr = '...'; + } + } + break; + case 'sName': + { + if (projectViewModel.isArabic) { + registerInfo.secondNameAr = value.isEmpty ? "." : value; + registerInfo.secondNameEn = '...'; + } else { + registerInfo.secondNameEn = value.isEmpty ? "." : value; + registerInfo.secondNameAr = '...'; + } + } + break; + case 'lName': + { + if (projectViewModel.isArabic) { + registerInfo.lastNameAr = value; + } else { + registerInfo.lastNameEn = value; + registerInfo.lastNameAr = '...'; + } + } + break; + case 'fNameEn': + registerInfo.firstNameEn = value; + break; + case 'lNameEn': + registerInfo.lastNameEn = value; + break; + } + }) + //_controller.text =value + }, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + decoration: InputDecoration( + isDense: true, + hintText: _hintText, + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + prefixIconConstraints: BoxConstraints(minWidth: 50), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined), + ], + ), + ), + ); + } } class Language { final String name; final String value; + final String nameAr; - Language({this.name, this.value}); + Language({this.name, this.value, this.nameAr}); } class Location { final String name; final String value; + final String nameAr; - Location({this.name, this.value}); + Location({this.name, this.value, this.nameAr}); } diff --git a/lib/pages/login/register.dart b/lib/pages/login/register.dart index bdb2b623..c3e8a275 100644 --- a/lib/pages/login/register.dart +++ b/lib/pages/login/register.dart @@ -2,7 +2,6 @@ import 'package:diplomaticquarterapp/analytics/flows/login_registration.dart'; import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/size_config.dart'; -import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_user_status_reponse.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_user_status_req.dart'; @@ -56,125 +55,127 @@ class _Register extends State { @override Widget build(BuildContext context) { return AppScaffold( - - appBarTitle: TranslationBase.of(context).register, - isShowAppBar: false, - isShowDecPage: false, - showNewAppBar: false, - showNewAppBarTitle: true, - body: Column( - children: [ - Expanded( - child: ListView( - padding: EdgeInsets.all(21), - physics: BouncingScrollPhysics(), - children: [ - SizedBox(height: 10), - Padding( - padding: EdgeInsets.all(10), - child: Text( - TranslationBase.of(context).enterNationalId, - style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16), - )), - SizedBox(height: 10), - PhoneNumberSelectorWidget(onNumberChange: (value) => {mobileNo = value, validateForm()}, onCountryChange: (value) => countryCode = value), - SizedBox(height: 12), - Directionality(textDirection: TextDirection.ltr, child: inputWidget(TranslationBase.of(context).nationalIdNumber, "Xxxxxxxxx", nationalIDorFile)), - SizedBox(height: 20), - Row( - children: [ - Expanded( - child: Row( - children: [ - Radio( - value: 1, - groupValue: isHijri, - onChanged: (value) { - setState(() { - isHijri = value; - }); - validateForm(); - }, - ), - Text(TranslationBase.of(context).hijriDate), - ], - ), + appBarTitle: TranslationBase.of(context).register, + isShowAppBar: false, + isShowDecPage: false, + showNewAppBar: false, + showNewAppBarTitle: true, + body: Column( + children: [ + Expanded( + child: ListView( + padding: EdgeInsets.all(21), + physics: BouncingScrollPhysics(), + children: [ + SizedBox(height: 10), + Padding( + padding: EdgeInsets.all(10), + child: Text( + TranslationBase.of(context).enterNationalId, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16), + )), + SizedBox(height: 10), + PhoneNumberSelectorWidget(onNumberChange: (value) => {mobileNo = value, validateForm()}, onCountryChange: (value) => countryCode = value), + SizedBox(height: 12), + Directionality(textDirection: TextDirection.ltr, child: inputWidget(TranslationBase.of(context).nationalIdNumber, "Xxxxxxxxx", nationalIDorFile)), + SizedBox(height: 20), + Row( + children: [ + Expanded( + child: Row( + children: [ + Radio( + value: 1, + groupValue: isHijri, + onChanged: (value) { + setState(() { + isHijri = value; + }); + validateForm(); + }, + ), + Text(TranslationBase.of(context).hijriDate), + ], ), - Expanded( - child: Row( - children: [ - Radio( - value: 0, - groupValue: isHijri, - onChanged: (value) { - setState(() { - isHijri = value; - }); - validateForm(); - }, - ), - Text(TranslationBase.of(context).gregorianDate), - ], - ), + ), + Expanded( + child: Row( + children: [ + Radio( + value: 0, + groupValue: isHijri, + onChanged: (value) { + setState(() { + isHijri = value; + }); + validateForm(); + }, + ), + Text(TranslationBase.of(context).gregorianDate), + ], ), - ], - ), - Row(children: [ - Container( - width: SizeConfig.realScreenWidth * .9, - child: isHijri == 1 - ? Directionality( - textDirection: TextDirection.ltr, - child: inputWidget(TranslationBase.of(context).dob, "DD/MM/YYYYY", dob, - isNumber: false, - suffix: Icon( - Icons.calendar_today, - size: 16, - ))) - : Container( - child: InkWell( - onTap: () { - if (isHijri != null) _selectDate(context); - }, - child: Directionality( - textDirection: TextDirection.ltr, - child: inputWidget(TranslationBase.of(context).dob, "DD/MM/YYYYY", dobEn, - isNumber: false, - isEnable: false, - suffix: Icon( - Icons.calendar_today, - size: 16, - )))))), - ]) - ], - ), + ), + ], + ), + Row(children: [ + Container( + width: SizeConfig.realScreenWidth * .89, + child: isHijri == 1 + ? Directionality( + textDirection: TextDirection.ltr, + child: inputWidget(TranslationBase.of(context).dob, "DD/MM/YYYYY", dob, + isNumber: false, + suffix: Icon( + Icons.calendar_today, + size: 16, + ))) + : Container( + child: InkWell( + onTap: () { + if (isHijri != null) _selectDate(context); + }, + child: Directionality( + textDirection: TextDirection.ltr, + child: inputWidget(TranslationBase.of(context).dob, "DD/MM/YYYYY", dobEn, + isNumber: false, + isEnable: false, + suffix: Icon( + Icons.calendar_today, + size: 16, + )))))), + ]) + ], ), - Container( - width: double.maxFinite, - // height: 80.0, - color: Colors.white, - // margin: EdgeInsets.only(bottom: 50.0), - child: Row( - children: [ - Expanded( - child: Padding( - padding: EdgeInsets.all(10), child: DefaultButton(TranslationBase.of(context).cancel, () { - Navigator.of(context).pop(); - locator().loginRegistration.registration_cancel(step: 'enter details'); - }, textColor: Colors.white, color: Color(0xffD02127))), - ), - Expanded( - child: Padding( - padding: EdgeInsets.all(10), - child: DefaultButton(TranslationBase.of(context).next, (){ - startRegistration(); - locator().loginRegistration.registration_enter_details(); - }, textColor: Colors.white, color: isButtonDisabled == true ? Colors.grey : Color(0xff359846))), - ), - ], - ),) - ], - ),); + ), + Container( + width: double.maxFinite, + // height: 80.0, + color: Colors.white, + // margin: EdgeInsets.only(bottom: 50.0), + child: Row( + children: [ + Expanded( + child: Padding( + padding: EdgeInsets.all(10), + child: DefaultButton(TranslationBase.of(context).cancel, () { + Navigator.of(context).pop(); + locator().loginRegistration.registration_cancel(step: 'enter details'); + }, textColor: Colors.white, color: Color(0xffD02127))), + ), + Expanded( + child: Padding( + padding: EdgeInsets.all(10), + child: DefaultButton(TranslationBase.of(context).next, () { + startRegistration(); + locator().loginRegistration.registration_enter_details(); + }, textColor: Colors.white, color: isButtonDisabled == true ? Colors.grey : Color(0xff359846))), + ), + ], + ), + ) + ], + ), + ); } Future _selectDate(BuildContext context) async { @@ -349,12 +350,19 @@ class _Register extends State { cancelFunction: () {}) .showAlertDialog(context); } else { + final intl.DateFormat dateFormat = intl.DateFormat('dd/MM/yyyy'); nRequest['forRegister'] = true; nRequest['isRegister'] = true; nRequest["PatientIdentificationID"] = nRequest["PatientIdentificationID"].toString(); + nRequest['dob'] = isHijri == 1 ? dob.text : dateFormat.format(selectedDate); + nRequest['isHijri'] = isHijri; sharedPref.setObject(REGISTER_DATA_FOR_LOGIIN, nRequest); sharedPref.setString(LOGIN_TOKEN_ID, response['LogInTokenID']); - this.chekUserData(response['LogInTokenID']); + if(request.patientOutSA ==0 ) { + this.chekUserData(response['LogInTokenID']); + }else{ + Navigator.of(context).push(FadePage(page: ConfirmLogin(changePageViewIndex: widget.changePageViewIndex, fromRegistration: true, isDubai:true))); + } } } else { // if (response['ErrorCode'] == '-986') { diff --git a/lib/pages/login/register_new_dubai.dart b/lib/pages/login/register_new_dubai.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/pages/medical/allergies_page.dart b/lib/pages/medical/allergies_page.dart index e83cf1d5..b3f54a60 100644 --- a/lib/pages/medical/allergies_page.dart +++ b/lib/pages/medical/allergies_page.dart @@ -47,7 +47,7 @@ class AllergiesPage extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Texts(TranslationBase.of(context).remarks+" :"), - Texts(TranslationBase.of(context).description + model.allergies[index].description ?? ''), + Texts(TranslationBase.of(context).description + ": " + model.allergies[index].description ?? ''), ], ), ) diff --git a/lib/pages/medical/balance/confirm_payment_page.dart b/lib/pages/medical/balance/confirm_payment_page.dart index b4d79d49..7c562b43 100644 --- a/lib/pages/medical/balance/confirm_payment_page.dart +++ b/lib/pages/medical/balance/confirm_payment_page.dart @@ -367,6 +367,7 @@ class _ConfirmPaymentPageState extends State { false, "3", "0", + context, "", "", "", @@ -427,7 +428,7 @@ class _ConfirmPaymentPageState extends State { final currency = projectViewModel.user.outSA == 0 ? "sar" : 'aed'; GifLoaderDialogUtils.showMyDialog(AppGlobal.context); DoctorsListService service = new DoctorsListService(); - service.checkPaymentStatus(transID, AppGlobal.context).then((res) { + service.checkPaymentStatus(transID, false, AppGlobal.context).then((res) { String paymentInfo = res['Response_Message']; if (paymentInfo == 'Success') { txn_ref = res['Merchant_Reference']; diff --git a/lib/pages/medical/labs/laboratory_result_page.dart b/lib/pages/medical/labs/laboratory_result_page.dart index 4bd29c19..847f979b 100644 --- a/lib/pages/medical/labs/laboratory_result_page.dart +++ b/lib/pages/medical/labs/laboratory_result_page.dart @@ -47,13 +47,26 @@ class _LaboratoryResultPageState extends State { GifLoaderDialogUtils.hideDialog(context); }, billNo: widget.patientLabOrders.invoiceNo, - details: model.patientLabSpecialResult[index].resultDataHTML, + // details: model.patientLabSpecialResult[index].resultDataHTML, + details: model.patientLabSpecialResult.isEmpty ? null : getSpecialResults(model), orderNo: widget.patientLabOrders.orderNo, patientLabOrder: widget.patientLabOrders, ), - itemCount: model.patientLabSpecialResult.length, + itemCount: 1, ), ), ); } + + String getSpecialResults(LabsViewModel model) { + String labResults = ""; + model.patientLabSpecialResult.forEach((element) { + if (element.resultDataHTML != null) { + labResults += (element.resultDataHTML + "

"); + } else { + labResults += ("
No Result Available
"); + } + }); + return labResults; + } } diff --git a/lib/pages/medical/patient_sick_leave_page.dart b/lib/pages/medical/patient_sick_leave_page.dart index f132741e..1ca32e02 100644 --- a/lib/pages/medical/patient_sick_leave_page.dart +++ b/lib/pages/medical/patient_sick_leave_page.dart @@ -57,8 +57,8 @@ class _PatientSickLeavePageState extends State { subName: model.sickLeaveList[index].clinicName, isSortByClinic: false, isInOutPatient: model.sickLeaveList[index].isInOutPatient, - isSickLeave: true, - sickLeaveStatus: model.sickLeaveList[index].status, + // isSickLeave: true, + // sickLeaveStatus: model.sickLeaveList[index].status, onEmailTap: () { showConfirmMessage(model, index); }, @@ -69,13 +69,13 @@ class _PatientSickLeavePageState extends State { } void showConfirmMessage(PatientSickLeaveViewMode model, int index) { - if (model.sickLeaveList[index].status == 1) { - openWorkPlaceUpdatePage(model.sickLeaveList[index].requestNo, model.sickLeaveList[index].setupID, model, index, model.sickLeaveList[index].projectID); - } else if (model.sickLeaveList[index].status == 2) { + // if (model.sickLeaveList[index].status == 1) { + // openWorkPlaceUpdatePage(model.sickLeaveList[index].requestNo, model.sickLeaveList[index].setupID, model, index, model.sickLeaveList[index].projectID); + // } else if (model.sickLeaveList[index].status == 2) { showEmailDialog(model, index); - } else { - showApprovalDialog(); - } + // } else { + // showApprovalDialog(); + // } } void showApprovalDialog() { diff --git a/lib/pages/medical/sickleave_workplace_update_page.dart b/lib/pages/medical/sickleave_workplace_update_page.dart index 47ff2e1a..3b4a1f1b 100644 --- a/lib/pages/medical/sickleave_workplace_update_page.dart +++ b/lib/pages/medical/sickleave_workplace_update_page.dart @@ -222,7 +222,9 @@ class _WorkplaceUpdatePageState extends State { LabsService service = new LabsService(); GifLoaderDialogUtils.showMyDialog(context); - service.updateWorkplaceName(workplaceName.text, widget.requestNumber, widget.setupID, widget.projectID).then((res) { + service + .updateWorkplaceName(projectViewModel.isArabic ? "-" : workplaceName.text, projectViewModel.isArabic ? workplaceName.text : "-", widget.requestNumber, widget.setupID, widget.projectID) + .then((res) { GifLoaderDialogUtils.hideDialog(context); Navigator.of(context).pop(true); }).catchError((err) { diff --git a/lib/pages/medical/vital_sign/vital_sing_chart_blood_pressure.dart b/lib/pages/medical/vital_sign/vital_sing_chart_blood_pressure.dart index 424b0c90..2d04e91a 100644 --- a/lib/pages/medical/vital_sign/vital_sing_chart_blood_pressure.dart +++ b/lib/pages/medical/vital_sign/vital_sing_chart_blood_pressure.dart @@ -35,7 +35,7 @@ class VitalSingChartBloodPressure extends StatelessWidget { @override Widget build(BuildContext context) { - projectViewModel = Provider.of(context); + projectViewModel = Provider.of(context); generateData(); return SingleChildScrollView( child: Column( diff --git a/lib/pages/pharmacy/pharmacyAddresses/AddAddress.dart b/lib/pages/pharmacy/pharmacyAddresses/AddAddress.dart index dcc4b299..f57bb478 100644 --- a/lib/pages/pharmacy/pharmacyAddresses/AddAddress.dart +++ b/lib/pages/pharmacy/pharmacyAddresses/AddAddress.dart @@ -1,22 +1,20 @@ import 'dart:async'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; -import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/location_util.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/app_map/google_huawei_map.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:diplomaticquarterapp/widgets/pickupLocation/PickupLocationFromMap.dart'; import 'package:flutter/material.dart'; import 'package:geocoding/geocoding.dart'; -import 'package:geolocator/geolocator.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; -import 'package:google_maps_place_picker/google_maps_place_picker.dart'; import 'package:provider/provider.dart'; class AddAddressPage extends StatefulWidget { @@ -37,6 +35,7 @@ class _AddAddressPageState extends State { LatLng currentPostion; Completer mapController = Completer(); Placemark selectedPlace; + LocationUtils locationUtils; static CameraPosition _kGooglePlex = CameraPosition( target: LatLng(37.42796133580664, -122.085749655962), @@ -93,13 +92,28 @@ class _AddAddressPageState extends State { } _getCurrentLocation() async { - await Geolocator.getLastKnownPosition().then((value) { - _latitude = value.latitude; - _longitude = value.longitude; - }).catchError((e) { - _longitude = 0; - _latitude = 0; - }); + if (await this.sharedPref.getDouble(USER_LAT) != null && await this.sharedPref.getDouble(USER_LONG) != null) { + var lat = await this.sharedPref.getDouble(USER_LAT); + var long = await this.sharedPref.getDouble(USER_LONG); + _latitude = lat; + _longitude = long; + currentPostion = LatLng(lat, long); + setMap(); + } else { + locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context); + locationUtils.getCurrentLocation(callBack: (value) { + print(value); + setMap(); + }); + } + + // await Geolocator.getLastKnownPosition().then((value) { + // _latitude = value.latitude; + // _longitude = value.longitude; + // }).catchError((e) { + // _longitude = 0; + // _latitude = 0; + // }); } @override @@ -184,8 +198,8 @@ class _AddAddressPageState extends State { // widget.onPick(value); // }, // ), - ), - ); + ), + ); // ); } } diff --git a/lib/services/appointment_services/GetDoctorsList.dart b/lib/services/appointment_services/GetDoctorsList.dart index ca65e4de..effa4445 100644 --- a/lib/services/appointment_services/GetDoctorsList.dart +++ b/lib/services/appointment_services/GetDoctorsList.dart @@ -1,3 +1,4 @@ +import 'dart:convert'; import 'dart:io'; import 'package:diplomaticquarterapp/config/config.dart'; @@ -65,12 +66,13 @@ class DoctorsListService extends BaseService { "PatientID": authUser.patientID != null ? authUser.patientID : 0, "gender": authUser.gender != null ? authUser.gender : 0, "age": authUser.age != null ? authUser.age : 0, + "DateofBirth": authUser.dateofBirth != null ? authUser.dateofBirth : null, "IsGetNearAppointment": false, "SearchForVoiceCommand": doctorId != null && doctorId.length > 0 ? true : false, "DoctorIDsList": doctorId, "Latitude": lat != null ? lat.toString() : 0, "Longitude": long != null ? long.toString() : 0, - "isDentalAllowedBackend": isContinueDentalPlan, + "isDentalAllowedBackend": clinicID == 17 ? true : isContinueDentalPlan, "IsGetNearAppointment": isNearest, if (isNearest) "SelectedDate": DateUtil.convertDateToString(DateTime.now()), "License": true @@ -119,6 +121,7 @@ class DoctorsListService extends BaseService { "ContinueDentalPlan": false, "IsSearchAppointmnetByClinicID": false, "DoctorName": docName, + "DateofBirth": authUser.dateofBirth != null ? authUser.dateofBirth : null, "PatientID": authUser.patientID != null ? authUser.patientID : 0, "gender": authUser.gender != null ? authUser.gender : 0, "age": authUser.age != null ? authUser.age : 0, @@ -253,7 +256,7 @@ class DoctorsListService extends BaseService { return Future.value(localRes); } - Future getDoctorFreeSlots(int docID, int clinicID, int projectID, BuildContext context) async { + Future getDoctorFreeSlots(int docID, int clinicID, int projectID, BuildContext context, [ProjectViewModel projectViewModel]) async { Map request; var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); Request req = appGlobal.getPublicRequest(); @@ -276,6 +279,16 @@ class DoctorsListService extends BaseService { "DeviceTypeID": 1 }; + if (clinicID == 253) { + List procedureID = projectViewModel.selectedBodyPartList.map((element) => element.id.toString()).toList(); + request["GeneralProcedureList"] = procedureID; + if (procedureID.length == 1 && procedureID[0] == "1") { + request["ProcedureSlotDuration"] = 90; + } else { + request["ProcedureSlotDuration"] = projectViewModel.laserSelectionDuration; + } + } + dynamic localRes; await baseAppClient.post(GET_DOCTOR_FREE_SLOTS, onSuccess: (response, statusCode) async { @@ -893,7 +906,7 @@ class DoctorsListService extends BaseService { return Future.value(localRes); } - Future checkPaymentStatus(String transactionID, BuildContext context) async { + Future checkPaymentStatus(String transactionID, bool isPharma, BuildContext context) async { Map request; if (await this.sharedPref.getObject(USER_PROFILE) != null) { var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); @@ -903,6 +916,7 @@ class DoctorsListService extends BaseService { Request req = appGlobal.getPublicRequest(); request = { "ClientRequestID": transactionID, + "IsPharmacy": isPharma, "VersionID": req.VersionID, "Channel": req.Channel, "LanguageID": languageID == 'ar' ? 1 : 2, @@ -1742,4 +1756,51 @@ class DoctorsListService extends BaseService { return Future.value(localRes); } + + + + Future logDoctorFreeSlots(int docID, int clinicID, int projectID, List selectedfreeSlots, dynamic appoNumber, BuildContext context, [ProjectViewModel projectViewModel]) async { + Map requestFreeSlots; + Map request; + + var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); + Request req = appGlobal.getPublicRequest(); + requestFreeSlots = { + "DoctorID": docID, + "IsBookingForLiveCare": 0, + "ClinicID": clinicID, + "ProjectID": projectID, + "OriginalClinicID": clinicID, + "days": 0, + "isReschadual": false, + "VersionID": req.VersionID, + "Channel": 3, + "LanguageID": languageID == 'ar' ? 1 : 2, + "IPAdress": "10.20.10.20", + "generalid": "Cs2020@2016\$2958", + "PatientOutSA": authProvider.isLogin ? authUser.outSA : 0, + "SessionID": null, + "isDentalAllowedBackend": false, + "DeviceTypeID": 1 + }; + + request = { + "ClinicID": clinicID, + "ProjectID": projectID, + "AppointmentNo":appoNumber, + "DoctorFreeSlotRequest":requestFreeSlots, + "DoctorFreeSlotResponse":selectedfreeSlots, + "Value1":docID + }; + dynamic localRes; + await baseAppClient.post(INSERT_FREE_SLOTS_LOGS, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + + return Future.value(localRes); + } + + } diff --git a/lib/services/authentication/auth_provider.dart b/lib/services/authentication/auth_provider.dart index f833ad5d..d61e8ef7 100644 --- a/lib/services/authentication/auth_provider.dart +++ b/lib/services/authentication/auth_provider.dart @@ -247,7 +247,7 @@ class AuthProvider with ChangeNotifier { return Future.value(localRes); } - Future checkActivationCode(request, [value]) async { + Future checkActivationCode(request, [value]) async { var neRequest = CheckActivationCodeReq.fromJson(request); neRequest.activationCode = value ?? "0000"; @@ -376,10 +376,16 @@ class AuthProvider with ChangeNotifier { requestN.patientOutSA = requestN.patientobject.patientOutSA; final DateFormat dateFormat = DateFormat('MM/dd/yyyy'); final DateFormat dateFormat2 = DateFormat('dd/MM/yyyy'); - requestN.dob = nhic['IsHijri'] ? nhic['DateOfBirth'] : dateFormat2.format(dateFormat.parse(nhic['DateOfBirth'])); + if(nhic !=null) { + requestN.dob = nhic['IsHijri'] ? nhic['DateOfBirth'] : dateFormat2.format( + dateFormat.parse(nhic['DateOfBirth'])); + requestN.isHijri = nhic['IsHijri'] ? 1 : 0; + requestN.healthId = requestN.patientobject.eHealthIDField; + } + requestN.zipCode = requestN.patientOutSA == 1 ? '971' : '966'; - requestN.healthId = requestN.patientobject.eHealthIDField; - requestN.isHijri = nhic['IsHijri'] ? 1 : 0; + + await sharedPref.remove(USER_PROFILE); dynamic localRes; diff --git a/lib/services/clinic_services/get_clinic_service.dart b/lib/services/clinic_services/get_clinic_service.dart index e6efb110..8bf3a0ec 100644 --- a/lib/services/clinic_services/get_clinic_service.dart +++ b/lib/services/clinic_services/get_clinic_service.dart @@ -123,7 +123,8 @@ class ClinicListService extends BaseService { "DeviceTypeID": 1, "PatientID": 1, "ContinueDentalPlan": true, - "IsSearchAppointmnetByClinicID": false + "IsSearchAppointmnetByClinicID": false, + "DateofBirth": authUser.dateofBirth }; dynamic localRes; @@ -176,4 +177,14 @@ class ClinicListService extends BaseService { }, body: request); return Future.value(localRes); } + Future getCountries() async { + Map request ={}; + dynamic localRes; + await baseAppClient.post(GET_NATIONALITY, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); +} } diff --git a/lib/services/livecare_services/livecare_provider.dart b/lib/services/livecare_services/livecare_provider.dart index 703ff4cb..a784d161 100644 --- a/lib/services/livecare_services/livecare_provider.dart +++ b/lib/services/livecare_services/livecare_provider.dart @@ -146,7 +146,7 @@ class LiveCareService extends BaseService { return Future.value(localRes); } - Future getERAppointmentFees(int serviceID, BuildContext context) async { + Future getERAppointmentFees(int serviceID, bool isPharmaLiveCare, BuildContext context) async { Map request; if (await this.sharedPref.getObject(USER_PROFILE) != null) { @@ -155,8 +155,9 @@ class LiveCareService extends BaseService { } request = { + "IsPharmacy": isPharmaLiveCare, "ServiceID": serviceID, - "ProjectID": 15, + "ProjectID": 12, "PatientID": authUser.patientID != null ? authUser.patientID : 0, "Age": authUser.age != null ? authUser.age : 0, "Gender": authUser.gender != null ? authUser.gender : 0 @@ -172,7 +173,7 @@ class LiveCareService extends BaseService { return Future.value(localRes); } - Future getERAppointmentTime(int serviceID, BuildContext context) async { + Future getERAppointmentTime(int serviceID, bool isPharmaLiveCare, BuildContext context) async { Map request; if (await this.sharedPref.getObject(USER_PROFILE) != null) { @@ -181,8 +182,9 @@ class LiveCareService extends BaseService { } request = { + "IsPharmacy": isPharmaLiveCare, "ServiceID": serviceID, - "ProjectID": 15, + "ProjectID": 12, "Age": authUser.age != null ? authUser.age : 0, "PatientID": authUser.patientID != null ? authUser.patientID : 0, "Gender": authUser.gender != null ? authUser.gender : 0 @@ -198,7 +200,7 @@ class LiveCareService extends BaseService { return Future.value(localRes); } - Future addNewCallForPatientER(int serviceID, String clientRequestID, BuildContext context) async { + Future addNewCallForPatientER(int serviceID, String clientRequestID, bool isPharma, BuildContext context) async { Map request; String deviceToken; @@ -214,6 +216,7 @@ class LiveCareService extends BaseService { } request = { + "IsPharmacy": isPharma, "ErServiceID": serviceID, "ClientRequestID": clientRequestID, "DeviceToken": deviceToken, @@ -326,9 +329,7 @@ class LiveCareService extends BaseService { Future getOneSignalVOIPToken(String voipToken, BuildContext context) async { Map request; - - // request = {"app_id": "b87a754b-9a2a-437c-960b-39a079c57586", "identifier": voipToken, "device_type": 0, "test_type": 1}; - request = { "app_id": "b87a754b-9a2a-437c-960b-39a079c57586", "identifier": voipToken, "device_type": 0 }; + request = {"app_id": "b87a754b-9a2a-437c-960b-39a079c57586", "identifier": voipToken, "device_type": 0}; dynamic localRes; @@ -339,4 +340,19 @@ class LiveCareService extends BaseService { }, body: request); return Future.value(localRes); } + + Future cancelPharmaLiveCareRequest(String pharmaClientRequestID, BuildContext context) async { + Map request; + request = {"clientid": pharmaClientRequestID, "status": "Cancel"}; + + dynamic localRes; + + await baseAppClient.post(CANCEL_PHARMA_LIVECARE_REQUEST, isExternal: true, isAllowAny: true, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + } diff --git a/lib/uitl/CalendarUtils.dart b/lib/uitl/CalendarUtils.dart index b79ea3ef..75af015c 100644 --- a/lib/uitl/CalendarUtils.dart +++ b/lib/uitl/CalendarUtils.dart @@ -62,10 +62,10 @@ class CalendarUtils { TZDateTime scheduleDateTimeUTZ = TZDateTime.from(scheduleDateTime, _currentLocation); - print("eventId: " + eventId); - print("writableCalendars-name: " + writableCalendars.name); - print("writableCalendars-Id: " + writableCalendars.id); - print("writableCalendarsToString: " + writableCalendars.toString()); + // print("eventId: " + eventId); + // print("writableCalendars-name: " + writableCalendars.name); + // print("writableCalendars-Id: " + writableCalendars.id); + // print("writableCalendarsToString: " + writableCalendars.toString()); Event event = Event(writableCalendars.id, start: scheduleDateTimeUTZ, end: scheduleDateTimeUTZ.add(Duration(minutes: 30)), title: title, description: description); deviceCalendarPlugin.createOrUpdateEvent(event).catchError((e) { print("catchError " + e.toString()); diff --git a/lib/uitl/app-permissions.dart b/lib/uitl/app-permissions.dart index bdd72e54..62fd484a 100644 --- a/lib/uitl/app-permissions.dart +++ b/lib/uitl/app-permissions.dart @@ -14,10 +14,10 @@ class AppPermission{ if (!(await Permission.camera.request().isGranted) || !(await Permission.microphone.request().isGranted)) { return false; } - if (Platform.isAndroid && !(await PlatformBridge.shared().isDrawOverAppsPermissionAllowed())) { - await _drawOverAppsMessageDialog(context); - return false; - } + // if (Platform.isAndroid && !(await PlatformBridge.shared().isDrawOverAppsPermissionAllowed())) { + // await _drawOverAppsMessageDialog(context); + // return false; + // } return true; } diff --git a/lib/uitl/location_util.dart b/lib/uitl/location_util.dart index bb215613..3eb6388f 100644 --- a/lib/uitl/location_util.dart +++ b/lib/uitl/location_util.dart @@ -24,6 +24,7 @@ class LocationUtils { bool isShowConfirmDialog; BuildContext context; bool isHuawei; + final GeolocatorPlatform _geolocatorPlatform = GeolocatorPlatform.instance; LocationUtils({@required this.isShowConfirmDialog, @required this.context, this.isHuawei = false}); @@ -43,11 +44,16 @@ class LocationUtils { if (permission == LocationPermission.denied || permission == LocationPermission.deniedForever) { if (Platform.isAndroid) { - Utils.showPermissionConsentDialog(context, TranslationBase.of(context).locationPermissionDialog, () { - Geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.medium, timeLimit: Duration(seconds: 10)).then((value) { - setLocation(value); - if (callBack != null) callBack(LatLng(value.latitude, value.longitude)); - }); + Utils.showPermissionConsentDialog(context, TranslationBase.of(context).locationPermissionDialog, () async { + final hasPermission = await _handlePermission(); + if (hasPermission) { + Geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.medium, timeLimit: Duration(seconds: 10)).then((value) { + setLocation(value); + if (callBack != null) callBack(LatLng(value.latitude, value.longitude)); + }); + } else { + if (isShowConfirmDialog) showErrorLocationDialog(false); + } }); } else { if (await Permission.location.request().isGranted) { @@ -70,6 +76,29 @@ class LocationUtils { } } + Future _handlePermission() async { + bool serviceEnabled; + LocationPermission permission; + + serviceEnabled = await _geolocatorPlatform.isLocationServiceEnabled(); + if (!serviceEnabled) { + return false; + } + + permission = await _geolocatorPlatform.checkPermission(); + if (permission == LocationPermission.denied) { + permission = await _geolocatorPlatform.requestPermission(); + if (permission == LocationPermission.denied) { + return false; + } + } + + if (permission == LocationPermission.deniedForever) { + return false; + } + return true; + } + LocationCallback _locationCallback; _getHMSCurrentLocation(Function(LatLng) callBack) async { diff --git a/lib/uitl/push-notification-handler.dart b/lib/uitl/push-notification-handler.dart index dcd90cdb..3e765c17 100644 --- a/lib/uitl/push-notification-handler.dart +++ b/lib/uitl/push-notification-handler.dart @@ -10,18 +10,21 @@ import 'package:diplomaticquarterapp/pages/DrawerPages/notifications/notificatio import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/livecare/incoming_call.dart'; import 'package:diplomaticquarterapp/pages/webRTC/OpenTok/OpenTok.dart'; +import 'package:diplomaticquarterapp/uitl/LocalNotification.dart'; import 'package:diplomaticquarterapp/uitl/app-permissions.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:firebase_messaging/firebase_messaging.dart' as fir; import 'package:flutter/cupertino.dart'; +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; - -// import 'package:flutter_hms_gms_availability/flutter_hms_gms_availability.dart'; import 'package:flutter_ios_voip_kit/call_state_type.dart'; import 'package:flutter_ios_voip_kit/flutter_ios_voip_kit.dart'; -// import 'package:huawei_hmsavailability/huawei_hmsavailability.dart'; +import 'package:flutter_local_notifications/flutter_local_notifications.dart'; +import 'package:huawei_hmsavailability/huawei_hmsavailability.dart'; import 'package:huawei_push/huawei_push.dart' as h_push; +import 'package:permission_handler/permission_handler.dart'; import 'app_shared_preferences.dart'; import 'navigation_service.dart'; @@ -115,7 +118,7 @@ class PushNotificationHandler { final BuildContext context; static PushNotificationHandler _instance; final voIPKit = FlutterIOSVoIPKit.instance; - // HmsApiAvailability hmsApiAvailability; + HmsApiAvailability hmsApiAvailability; Timer timeOutTimer; bool isTalking = false; @@ -161,7 +164,6 @@ class PushNotificationHandler { } init() async { - // hmsApiAvailability = new HmsApiAvailability(); // VoIP Callbacks voIPKit.getVoIPToken().then((value) { print('🎈 example: getVoIPToken: $value'); @@ -223,39 +225,56 @@ class PushNotificationHandler { // if (Platform.isAndroid && (!await FlutterHmsGmsAvailability.isHmsAvailable)) { if (Platform.isAndroid) { - // await hmsApiAvailability.isHMSAvailable().then((value) async { - // if (value != 0) { - // final fcmToken = await FirebaseMessaging.instance.getToken(); - // if (fcmToken != null) onToken(fcmToken); - // } - // }).catchError((err) {}); + try { + if (!(await Utils.isGoogleServicesAvailable())) { + h_push.Push.enableLogger(); + final result = await h_push.Push.setAutoInitEnabled(true); + + h_push.Push.onNotificationOpenedApp.listen((message) { + newMessage(toFirebaseRemoteMessage(message)); + }, onError: (e) => print(e.toString())); + + h_push.Push.onMessageReceivedStream.listen((message) { + newMessage(toFirebaseRemoteMessage(message)); + }, onError: (e) => print(e.toString())); + + h_push.Push.getTokenStream.listen((token) { + onToken(token); + }, onError: (e) => print(e.toString())); + await h_push.Push.getToken(''); + + h_push.Push.registerBackgroundMessageHandler(backgroundMessageHandler); + } else { + final fcmToken = await FirebaseMessaging.instance.getToken(); + if (fcmToken != null) onToken(fcmToken); + } + } catch (ex) {} } if (Platform.isIOS) { + await FirebaseMessaging.instance.setForegroundNotificationPresentationOptions( + alert: true, // Required to display a heads up notification + badge: true, + sound: true, + ); final permission = await FirebaseMessaging.instance.requestPermission(); if (permission.authorizationStatus == AuthorizationStatus.denied) return; - } - - // 'Android HMS' (Handle Huawei Push_Kit Streams) - // if (Platform.isAndroid) { - // if (Platform.isAndroid && (await FlutterHmsGmsAvailability.isHmsAvailable)) { - - // } else { - // 'Android GMS or iOS' (Handle Firebase Messaging Streams - - FirebaseMessaging.instance.getInitialMessage().then((RemoteMessage message) async { - subscribeFCMTopic(); - if (Platform.isIOS) - await Future.delayed(Duration(milliseconds: 3000)).then((value) { - if (message != null) newMessage(message); - }); - else if (message != null) newMessage(message); - }); + } else {} + + try { + FirebaseMessaging.instance.getInitialMessage().then((RemoteMessage message) async { + if (message != null) { + if (Platform.isIOS) + await Future.delayed(Duration(milliseconds: 3000)).then((value) { + if (message != null) newMessage(message); + }); + else if (message != null) newMessage(message); + } + }); + } catch (ex) {} FirebaseMessaging.onMessage.listen((RemoteMessage message) async { print("Firebase onMessage!!!"); - // Utils.showPermissionConsentDialog(context, "onMessage", (){}); - // newMessage(message); if (Platform.isIOS) await Future.delayed(Duration(milliseconds: 3000)).then((value) { newMessage(message); @@ -284,40 +303,11 @@ class PushNotificationHandler { onToken(token); }); - FirebaseMessaging.onBackgroundMessage(backgroundMessageHandler); - - if (Platform.isAndroid) { - // await hmsApiAvailability.isHMSAvailable().then((value) async { - // if (value == 0) { - // h_push.Push.enableLogger(); - // final result = await h_push.Push.setAutoInitEnabled(true); - // - // h_push.Push.onNotificationOpenedApp.listen((message) { - // newMessage(toFirebaseRemoteMessage(message)); - // }, onError: (e) => print(e.toString())); - // - // h_push.Push.onMessageReceivedStream.listen((message) { - // newMessage(toFirebaseRemoteMessage(message)); - // }, onError: (e) => print(e.toString())); - // - // h_push.Push.getTokenStream.listen((token) { - // onToken(token); - // }, onError: (e) => print(e.toString())); - // await h_push.Push.getToken(''); - // - // h_push.Push.registerBackgroundMessageHandler(backgroundMessageHandler); - // } - // }).catchError((err) { - // print(err); - // }); - } - } - - subscribeFCMTopic() async { - print("subscribeFCMTopic!!!"); - await FirebaseMessaging.instance.unsubscribeFromTopic('all_hmg_patients').then((value) async { - await FirebaseMessaging.instance.subscribeToTopic('all_hmg_patients'); + FirebaseMessaging.instance.getAPNSToken().then((value) { + print("Push APNS getToken: " + value); }); + + FirebaseMessaging.onBackgroundMessage(backgroundMessageHandler); } newMessage(RemoteMessage remoteMessage) async { @@ -356,109 +346,25 @@ class PushNotificationHandler { _incomingCall(call_data); } } -} -/* todo verify all functionality */ -// _firebaseMessaging.configure( -// // onMessage: (Map message) async { -// // // showDialog("onMessage: $message"); -// // print("onMessage: $message"); -// // print(message); -// // print(message['name']); -// // print(message['appointmentdate']); -// // -// // if (Platform.isIOS) { -// // if (message['is_call'] == "true") { -// // var route = ModalRoute.of(context); -// // -// // if (route != null) { -// // print(route.settings.name); -// // } -// //s -// // Map myMap = new Map.from(mesage); -// // print(myMap); -// // LandingPage.isOpenCallPage = true; -// // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); -// // if (!isPageNavigated) { -// // isPageNavigated = true; -// // Navigator.push(context, MaterialPageRoute(builder: (context) => IncomingCall(incomingCallData: LandingPage.incomingCallData))).then((value) { -// // isPageNavigated = false; -// // }); -// // } -// // } else { -// // print("Is Call Not Found iOS"); -// // } -// // } else { -// // print("Is Call Not Found iOS"); -// // } -// // -// // if (Platform.isAndroid) { -// // if (message['data'].containsKey("is_call")) { -// // var route = ModalRoute.of(context); -// // -// // if (route != null) { -// // print(route.settings.name); -// // } -// // -// // Map myMap = new Map.from(message['data']); -// // print(myMap); -// // if (LandingPage.isOpenCallPage) { -// // return; -// // } -// // LandingPage.isOpenCallPage = true; -// // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); -// // if (!isPageNavigated) { -// // isPageNavigated = true; -// // Navigator.push(context, MaterialPageRoute(builder: (context) => IncomingCall(incomingCallData: LandingPage.incomingCallData))).then((value) { -// // Future.delayed(Duration(seconds: 5), () { -// // isPageNavigated = false; -// // }); -// // }); -// // } -// // } else { -// // print("Is Call Not Found Android"); -// // LocalNotification.getInstance().showNow(title: message['notification']['title'], subtitle: message['notification']['body']); -// // } -// // } else { -// // print("Is Call Not Found Android"); -// // } -// // }, -// onBackgroundMessage: Platform.isIOS ? null : myBackgroundMessageHandler, -// onLaunch: (Map message) async { -// print("onLaunch: $message"); -// // showDialog("onLaunch: $message"); -// }, -// onResume: (Map message) async { -// print("onResume: $message"); -// print(message); -// print(message['name']); -// print(message['appointmentdate']); -// -// // showDialog("onResume: $message"); -// -// if (Platform.isIOS) { -// if (message['is_call'] == "true") { -// var route = ModalRoute.of(context); -// -// if (route != null) { -// print(route.settings.name); -// } -// -// Map myMap = new Map.from(message); -// print(myMap); -// LandingPage.isOpenCallPage = true; -// LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); -// if (!isPageNavigated) { -// isPageNavigated = true; -// Navigator.push(context, MaterialPageRoute(builder: (context) => IncomingCall(incomingCallData: LandingPage.incomingCallData))).then((value) { -// isPageNavigated = false; -// }); -// } -// } else { -// print("Is Call Not Found iOS"); -// } -// } else { -// print("Is Call Not Found iOS"); -// } -// }, -// ); + Future isAndroidPermissionGranted() async { + if (Platform.isAndroid) { + final bool granted = await flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation()?.areNotificationsEnabled() ?? false; + if (!granted) { + await requestPermissions(); + } + } + } + + Future requestPermissions() async { + try { + if (Platform.isIOS) { + await flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation()?.requestPermissions(alert: true, badge: true, sound: true); + } else if (Platform.isAndroid) { + Permission.notification.request(); + } + } catch (err) { + debugPrint(err); + } + } +} diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 705118e7..dabe80ab 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2877,6 +2877,20 @@ class TranslationBase { String get pendingActivation => localizedValues["pendingActivation"][locale.languageCode]; String get awaitingApproval => localizedValues["awaitingApproval"][locale.languageCode]; String get liveCareSupportContact => localizedValues["liveCareSupportContact"][locale.languageCode]; + String get scanNFC => localizedValues["scanNFC"][locale.languageCode]; + String get pharmaLiveCare => localizedValues["pharmaLiveCare"][locale.languageCode]; + String get pharmaLiveCare1 => localizedValues["pharmaLiveCare1"][locale.languageCode]; + String get pharmaLiveCareDesc1 => localizedValues["pharmaLiveCareDesc1"][locale.languageCode]; + String get wherePharmaLiveCare => localizedValues["wherePharmaLiveCare"][locale.languageCode]; + String get pharmaLiveCareDesc2 => localizedValues["pharmaLiveCareDesc2"][locale.languageCode]; + String get howPharmaLiveCare => localizedValues["howPharmaLiveCare"][locale.languageCode]; + String get pharmaLiveCareDesc3 => localizedValues["pharmaLiveCareDesc3"][locale.languageCode]; + String get pharmaLiveCareScanQR => localizedValues["pharmaLiveCareScanQR"][locale.languageCode]; + String get pharmaLiveCareScanQR1 => localizedValues["pharmaLiveCareScanQR1"][locale.languageCode]; + String get pharmaLiveCareMakePayment => localizedValues["pharmaLiveCareMakePayment"][locale.languageCode]; + String get pharmaLiveCareMakePayment1 => localizedValues["pharmaLiveCareMakePayment1"][locale.languageCode]; + String get pharmaLiveCareJoinConsultation => localizedValues["pharmaLiveCareJoinConsultation"][locale.languageCode]; + String get pharmaLiveCareJoinConsultation1 => localizedValues["pharmaLiveCareJoinConsultation1"][locale.languageCode]; } diff --git a/lib/uitl/utils.dart b/lib/uitl/utils.dart index dbfdac5a..001baf50 100644 --- a/lib/uitl/utils.dart +++ b/lib/uitl/utils.dart @@ -44,6 +44,7 @@ import 'package:diplomaticquarterapp/widgets/dialogs/covid_consent_dialog.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:google_api_availability/google_api_availability.dart'; // import 'package:flutter_hms_gms_availability/flutter_hms_gms_availability.dart'; import 'package:provider/provider.dart'; @@ -772,6 +773,15 @@ class Utils { ); } + static Future isGoogleServicesAvailable() async { + GooglePlayServicesAvailability availability = await GoogleApiAvailability.instance.checkGooglePlayServicesAvailability(); + String status = availability.toString().split('.').last; + if (status == "success") { + return true; + } + return false; + } + static Widget tableColumnValueWithUnderLine(String text, {bool isLast = false, bool isCapitable = true}) { return Column( crossAxisAlignment: CrossAxisAlignment.start, diff --git a/lib/uitl/utils_new.dart b/lib/uitl/utils_new.dart index 49b213f2..822137cd 100644 --- a/lib/uitl/utils_new.dart +++ b/lib/uitl/utils_new.dart @@ -1,6 +1,5 @@ import 'dart:ui'; -import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; diff --git a/lib/widgets/app_map/google_huawei_map.dart b/lib/widgets/app_map/google_huawei_map.dart index 57e23d81..35eabfdc 100644 --- a/lib/widgets/app_map/google_huawei_map.dart +++ b/lib/widgets/app_map/google_huawei_map.dart @@ -47,6 +47,7 @@ class AppMapState extends State { checkIsHuawei() async { await hmsApiAvailability.isHMSAvailable().then((value) { isHuawei = value == 0 ? true : false; + hmsMap.HuaweiMapInitializer.initializeMap(); }); print(isHuawei); setState(() {}); diff --git a/lib/widgets/charts/show_chart.dart b/lib/widgets/charts/show_chart.dart index 49273611..4d69cd84 100644 --- a/lib/widgets/charts/show_chart.dart +++ b/lib/widgets/charts/show_chart.dart @@ -183,9 +183,13 @@ class ShowChart extends StatelessWidget { getMaxX(); getMin(); getMinY(); - increasingY = ((maxY - minY) / timeSeries.length - 1) * 15; - maxY += increasingY.abs(); - minY -= increasingY.abs(); + try { + increasingY = ((maxY - minY) / timeSeries.length - 1) * 15; + maxY += increasingY.abs(); + minY -= increasingY.abs(); + } catch(ex) { + print(ex); + } } double _fetchLeftTileInterval() { @@ -259,7 +263,7 @@ class ShowChart extends StatelessWidget { barWidth: 1.5, isStrokeCapRound: true, dotData: FlDotData( - show: false, + show: true, ), belowBarData: BarAreaData( show: false, diff --git a/lib/widgets/data_display/medical/LabResult/LabResultWidget.dart b/lib/widgets/data_display/medical/LabResult/LabResultWidget.dart index f2d8a693..9a974aef 100644 --- a/lib/widgets/data_display/medical/LabResult/LabResultWidget.dart +++ b/lib/widgets/data_display/medical/LabResult/LabResultWidget.dart @@ -194,7 +194,7 @@ class LabResultWidget extends StatelessWidget { context, FadePage( page: FlowChartPage( - filterName: filterName, + filterName: labResultList[i].description, patientLabOrder: patientLabOrder, ), ), diff --git a/lib/widgets/data_display/medical/doctor_card.dart b/lib/widgets/data_display/medical/doctor_card.dart index d58dccf3..20b2714e 100644 --- a/lib/widgets/data_display/medical/doctor_card.dart +++ b/lib/widgets/data_display/medical/doctor_card.dart @@ -116,7 +116,7 @@ class DoctorCard extends StatelessWidget { ), Expanded( child: Padding( - padding: const EdgeInsets.only(left: 20, right: 12, top: 12, bottom: 12), + padding: const EdgeInsets.only(left: 20, right: 12, top: 12, bottom: 10), child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, @@ -224,7 +224,7 @@ class DoctorCard extends StatelessWidget { onTap: onEmailTap, child: Icon( Icons.email, - color: Theme.of(context).primaryColor, + color: sickLeaveStatus != 3 ? Theme.of(context).primaryColor : Colors.grey[400], ), ) : onTap != null diff --git a/lib/widgets/drawer/app_drawer_widget.dart b/lib/widgets/drawer/app_drawer_widget.dart index 79f080a5..debf1656 100644 --- a/lib/widgets/drawer/app_drawer_widget.dart +++ b/lib/widgets/drawer/app_drawer_widget.dart @@ -1,5 +1,3 @@ -import 'dart:io'; - import 'package:barcode_scan2/barcode_scan2.dart'; import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; import 'package:diplomaticquarterapp/config/config.dart'; @@ -18,6 +16,7 @@ import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStat import 'package:diplomaticquarterapp/pages/Blood/user_agreement_page.dart'; import 'package:diplomaticquarterapp/pages/DrawerPages/notifications/notifications_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; +import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart'; import 'package:diplomaticquarterapp/pages/webRTC/call_page.dart'; import 'package:diplomaticquarterapp/routes.dart'; @@ -76,6 +75,7 @@ class _AppDrawerState extends State { String booldType; String notificationCount; final authService = new AuthProvider(); + String pharmacyLiveCareQRCode = ""; @override Widget build(BuildContext context) { @@ -496,18 +496,25 @@ class _AppDrawerState extends State { } readQRCode() async { - String result = (await BarcodeScanner.scan())?.rawContent; - print(result); + pharmacyLiveCareQRCode = (await BarcodeScanner.scan())?.rawContent; + print(pharmacyLiveCareQRCode); GifLoaderDialogUtils.showMyDialog(context); LiveCareService service = new LiveCareService(); - service.getPatientInfoByQR(result, context).then((res) { + service.getPatientInfoByQR(pharmacyLiveCareQRCode, context).then((res) { GifLoaderDialogUtils.hideDialog(context); }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); print(err); + Navigator.pop(context); + startPharmacyLiveCareProcess(); }); } + startPharmacyLiveCareProcess() { + sharedPref.setString(LIVECARE_CLINIC_DATA, "Pharmacy LiveCare" + "-" + "501" + "-" + "7"); + Navigator.push(context, FadePage(page: LiveCareHome(isPharmacyLiveCare: true, pharmacyLiveCareQRCode: pharmacyLiveCareQRCode,))); + } + drawerNavigator(context, routeName) { Navigator.of(context).pushNamed(routeName); } @@ -594,6 +601,7 @@ class _AppDrawerState extends State { switchUser(user, context) { GifLoaderDialogUtils.showMyDialog(context); + sharedPref.remove(BLOOD_TYPE); this.familyFileProvider.silentLoggin(user is AuthenticatedUser ? null : user, mainUser: user is AuthenticatedUser).then((value) { // GifLoaderDialogUtils.hideDialog(context); // Navigator.of(context).pop(); diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index 3bdf50ce..e91990b4 100644 --- a/lib/widgets/in_app_browser/InAppBrowser.dart +++ b/lib/widgets/in_app_browser/InAppBrowser.dart @@ -41,6 +41,8 @@ class MyInAppBrowser extends InAppBrowser { static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE + // static String SERVICE_URL = 'https://uat.hmgwebservices.com/payfortforvidaplus/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL UAT VIDA PLUS + // static String PRESCRIPTION_PAYMENT_WITH_ORDERID = // 'https://uat.hmgwebservices.com/epharmacy/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID='; @@ -63,7 +65,7 @@ class MyInAppBrowser extends InAppBrowser { AuthProvider authProvider = new AuthProvider(); InAppBrowser browser = new InAppBrowser(); - AuthenticatedUser authUser; + // AuthenticatedUser authUser; AppoitmentAllHistoryResultList appo; String deviceToken; @@ -125,16 +127,16 @@ class MyInAppBrowser extends InAppBrowser { this.deviceToken = deviceToken; } - getPatientData() async { - if (await this.sharedPref.getObject(USER_PROFILE) != null) { - var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); - authUser = data; - } - if (await this.sharedPref.getDouble(USER_LAT) != null && await this.sharedPref.getDouble(USER_LONG) != null) { - lat = await this.sharedPref.getDouble(USER_LAT); - long = await this.sharedPref.getDouble(USER_LONG); - } - } + // getPatientData() async { + // if (await this.sharedPref.getObject(USER_PROFILE) != null) { + // var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + // authUser = data; + // } + // if (await this.sharedPref.getDouble(USER_LAT) != null && await this.sharedPref.getDouble(USER_LONG) != null) { + // lat = await this.sharedPref.getDouble(USER_LAT); + // long = await this.sharedPref.getDouble(USER_LONG); + // } + // } openPackagesPaymentBrowser({@required int customer_id, @required int order_id}) { paymentType = _PAYMENT_TYPE.PACKAGES; @@ -143,10 +145,10 @@ class MyInAppBrowser extends InAppBrowser { } openPaymentBrowser(num amount, String orderDesc, String transactionID, String projId, String emailId, String paymentMethod, dynamic patientType, String patientName, dynamic patientID, - AuthenticatedUser authenticatedUser, InAppBrowser browser, bool isLiveCareAppo, var servID, var LiveServID, + AuthenticatedUser authenticatedUser, InAppBrowser browser, bool isLiveCareAppo, var servID, var LiveServID, BuildContext context, [var appoDate, var appoNo, var clinicID, var doctorID, var installments]) async { this.browser = browser; - await getPatientData(); + // await getPatientData(); if (paymentMethod == "ApplePay") { getDeviceToken(); MyChromeSafariBrowser safariBrowser = new MyChromeSafariBrowser(new MyInAppBrowser(), onExitCallback: browser.onExit, onLoadStartCallback: this.browser.onLoadStart, appo: this.appo); @@ -187,7 +189,8 @@ class MyInAppBrowser extends InAppBrowser { service.applePayInsertRequest(applePayInsertRequest, context).then((res) { if (context != null) GifLoaderDialogUtils.hideDialog(context); - String url = "https://hmgwebservices.com/HMGApplePayLive/applepay/pay?apq=" + res['result']; + String url = "https://hmgwebservices.com/HMGApplePayLive/applepay/pay?apq=" + res['result']; // Prod + // String url = "https://uat.hmgwebservices.com/HMGApplePayLiveNew/applepay/pay?apq=" + res['result']; // UAT // safariBrowser.open(url: Uri.parse(url)); this.browser.openUrlRequest(urlRequest: URLRequest(url: Uri.parse(url)), options: _InAppBrowserOptions); }).catchError((err) { @@ -212,7 +215,7 @@ class MyInAppBrowser extends InAppBrowser { tamaraRequestModel.orderDescription = orderDesc; tamaraRequestModel.isInstallment = true; tamaraRequestModel.projectID = num.parse(projId); - tamaraRequestModel.accessCode = authUser.mobileNumber; + tamaraRequestModel.accessCode = authenticatedUser.mobileNumber; tamaraRequestModel.appointmentNo = (appoNo != null && appoNo != "") ? appoNo.toString() : "0"; tamaraRequestModel.customerName = patientName; tamaraRequestModel.fileNumber = patientID.toString(); @@ -253,7 +256,7 @@ class MyInAppBrowser extends InAppBrowser { AuthenticatedUser authenticatedUser, InAppBrowser browser) { this.browser = browser; MyChromeSafariBrowser safariBrowser = new MyChromeSafariBrowser(new MyInAppBrowser(), onExitCallback: browser.onExit, onLoadStartCallback: this.browser.onLoadStart, appo: this.appo); - getPatientData(); + // getPatientData(); generatePharmacyURL(order, amount, orderDesc, transactionID, emailId, paymentMethod, patientName, patientID, authenticatedUser).then((value) { if (order.customValuesXml.contains("ApplePay")) { safariBrowser.open(url: Uri.parse(value)); @@ -299,7 +302,7 @@ class MyInAppBrowser extends InAppBrowser { // if (servID == "4") // form = form.replaceFirst('SERVICE_URL_VALUE', MyInAppBrowser.PREAUTH_SERVICE_URL); // else - form = form.replaceFirst('SERVICE_URL_VALUE', MyInAppBrowser.SERVICE_URL); + form = form.replaceFirst('SERVICE_URL_VALUE', MyInAppBrowser.SERVICE_URL); if (servID != null) { form = form.replaceFirst('SERV_ID', servID); diff --git a/lib/widgets/new_design/doctor_header.dart b/lib/widgets/new_design/doctor_header.dart index 5c556efb..806cbb4a 100644 --- a/lib/widgets/new_design/doctor_header.dart +++ b/lib/widgets/new_design/doctor_header.dart @@ -22,6 +22,7 @@ class DoctorHeader extends StatelessWidget { final String buttonTitle; final String buttonIcon; final bool isNeedToShowButton; + final bool isShowName; DoctorHeader( {Key key, @@ -29,6 +30,7 @@ class DoctorHeader extends StatelessWidget { @required this.buttonTitle, @required this.onTap, this.isNeedToShowButton = true, + this.isShowName = false, this.buttonIcon, this.showConfirmMessageDialog = true, @required this.onRatingAndReviewTap}) @@ -44,7 +46,18 @@ class DoctorHeader extends StatelessWidget { color: Colors.white, child: Column( mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, children: [ + if (isShowName) + Padding( + padding: EdgeInsets.only(left: 21, right: 21, bottom: 12), + child: Text( + headerModel.doctorName, + maxLines: 1, + style: TextStyle( + fontSize: 24, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + ), Padding( padding: EdgeInsets.only(left: 21, right: 21, bottom: 12), child: Row( @@ -289,7 +302,7 @@ class DoctorHeader extends StatelessWidget { ], ), Container( - margin: EdgeInsets.only(top: 10.0, left: 20.0, right: 20.0), + margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0), child: Text(getRatingWidth(doctorDetailsList[0].patientNumber).round().toString() + "%", style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)), ), @@ -310,7 +323,7 @@ class DoctorHeader extends StatelessWidget { ], ), Container( - margin: EdgeInsets.only(top: 10.0, left: 20.0, right: 20.0), + margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0), child: Text(getRatingWidth(doctorDetailsList[1].patientNumber).round().toString() + "%", style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)), ), @@ -331,7 +344,7 @@ class DoctorHeader extends StatelessWidget { ], ), Container( - margin: EdgeInsets.only(top: 10.0, left: 20.0, right: 20.0), + margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0), child: Text(getRatingWidth(doctorDetailsList[2].patientNumber).round().toString() + "%", style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)), ), @@ -352,7 +365,7 @@ class DoctorHeader extends StatelessWidget { ], ), Container( - margin: EdgeInsets.only(top: 10.0, left: 20.0, right: 20.0), + margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0), child: Text(getRatingWidth(doctorDetailsList[3].patientNumber).round().toString() + "%", style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)), ), @@ -374,7 +387,7 @@ class DoctorHeader extends StatelessWidget { ], ), Container( - margin: EdgeInsets.only(top: 10.0, left: 20.0, right: 20.0), + margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0), child: Text(getRatingWidth(doctorDetailsList[4].patientNumber).round().toString() + "%", style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)), ), diff --git a/lib/widgets/nfc/nfc_reader_sheet.dart b/lib/widgets/nfc/nfc_reader_sheet.dart index 4257501f..8881cb29 100644 --- a/lib/widgets/nfc/nfc_reader_sheet.dart +++ b/lib/widgets/nfc/nfc_reader_sheet.dart @@ -44,6 +44,7 @@ class _NfcLayoutState extends State { } void readNFC() async { + FlutterNfcKit.finish(); FlutterNfcKit.poll(timeout: Duration(seconds: 10), androidPlatformSound: true, androidCheckNDEF: false, iosMultipleTagMessage: "Multiple tags found!").then((value) async { setState(() { _reading = true; @@ -55,6 +56,9 @@ class _NfcLayoutState extends State { Navigator.pop(context); }); nfcId = value.id; + }).catchError((err) { + print(err); + Navigator.of(context).pop(); }); } diff --git a/lib/widgets/pickupLocation/PickupLocationFromMap.dart b/lib/widgets/pickupLocation/PickupLocationFromMap.dart index e5639f5c..d8aa1642 100644 --- a/lib/widgets/pickupLocation/PickupLocationFromMap.dart +++ b/lib/widgets/pickupLocation/PickupLocationFromMap.dart @@ -13,7 +13,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:geocoding/geocoding.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; -import 'package:google_maps_place_picker/google_maps_place_picker.dart'; +import 'package:google_maps_place_picker_mb/google_maps_place_picker.dart'; import 'package:huawei_hmsavailability/huawei_hmsavailability.dart'; import 'package:provider/provider.dart'; diff --git a/pubspec.yaml b/pubspec.yaml index 30b311be..834913a8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: diplomaticquarterapp description: A new Flutter application. -version: 4.5.005+4050005 +version: 4.5.63+1 environment: sdk: ">=2.7.0 <3.0.0" @@ -22,7 +22,8 @@ dependencies: connectivity: ^3.0.6 async: ^2.8.1 - audio_wave: ^0.1.2 + audio_wave: ^0.1.4 +# audio_session: ^0.1.13 # State Management provider: ^6.0.1 @@ -33,13 +34,13 @@ dependencies: health: ^3.0.3 #chart - fl_chart: ^0.40.2 + fl_chart: ^0.45.0 #Camera Preview - camera: ^0.9.4+5 + camera: ^0.10.1 # Permissions - permission_handler: ^8.3.0 + permission_handler: ^10.2.0 # Flutter Html View flutter_html: ^2.2.1 @@ -89,8 +90,8 @@ dependencies: google_maps_flutter: ^2.1.1 # Huawei - huawei_map: 6.0.1+305 - huawei_push: ^5.3.0+304 + huawei_map: 6.5.0+301 + huawei_push: ^6.5.0+300 # Qr code Scanner TODO fix it # barcode_scanner: ^1.0.1 @@ -98,7 +99,7 @@ dependencies: location: ^4.3.0 # Qr code Scanner # barcode_scan_fix: ^1.0.2 - barcode_scan2: ^4.2.1 + barcode_scan2: ^4.2.2 # Rating Stars rating_bar: ^0.2.0 @@ -113,13 +114,13 @@ dependencies: manage_calendar_events: ^2.0.1 #InAppBrowser -# flutter_inappwebview: ^5.3.2 + flutter_inappwebview: 5.7.2+3 #Circular progress bar for reverse timer circular_countdown_timer: ^0.2.0 #Just Audio to play ringing for incoming video call - just_audio: ^0.9.18 + just_audio: ^0.9.30 #hijri hijri: ^2.0.3 @@ -130,13 +131,13 @@ dependencies: carousel_pro: ^1.0.0 #local_notifications - flutter_local_notifications: ^9.1.4 + flutter_local_notifications: any #device_calendar device_calendar: ^4.2.0 #Handle Geolocation - geolocator: ^7.7.1 + geolocator: ^9.0.2 #Handle lat long to address geocoding: ^2.0.1 @@ -150,7 +151,8 @@ dependencies: #google maps places - google_maps_place_picker: ^2.1.0-nullsafety.3 + google_maps_place_picker_mb: ^3.0.0 +# google_maps_place_picker: ^2.1.0-nullsafety.3 map_launcher: ^1.1.3 #countdown timer for Upcoming List flutter_countdown_timer: ^4.1.0 @@ -170,8 +172,10 @@ dependencies: flutter_nfc_kit: ^3.3.1 - speech_to_text: - path: speech_to_text + geofencing: ^0.1.0 + +# speech_to_text: ^6.1.1 +# path: speech_to_text in_app_update: ^3.0.0 @@ -202,14 +206,16 @@ dependencies: # sms_retriever: ^1.0.0 sms_otp_auto_verify: ^2.1.0 flutter_ios_voip_kit: ^0.0.5 + google_api_availability: ^3.0.1 +# flutter_callkit_incoming: ^1.0.3+3 # firebase_core: 1.12.0 dependency_overrides: provider : ^5.0.0 - permission_handler : ^6.0.1+1 +# permission_handler : ^10.2.0 flutter_svg: ^1.0.0 # firebase_messaging_platform_interface: any - flutter_inappwebview: 5.7.2+3 +# flutter_inappwebview: 5.7.2+3 # git: # url: https://github.com/CodeEagle/flutter_inappwebview