diff --git a/.gitignore b/.gitignore index 55ad4693..d5b295f5 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,7 @@ pubspec.lock .pub/ /build/ /ios/Frameworks/ +/ios_old/ # Web related lib/generated_plugin_registrant.dart diff --git a/android/app/build.gradle b/android/app/build.gradle index 19e888fc..a9c4d5e9 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -148,6 +148,7 @@ dependencies { annotationProcessor 'com.github.bumptech.glide:compiler:4.16.0' implementation 'com.mapbox.maps:android:11.5.0' + implementation 'com.mapbox.mapboxsdk:mapbox-sdk-turf:7.3.1' // implementation 'com.mapbox.maps:android:11.4.0' // AARs diff --git a/android/app/libs/PenNavUI.aar b/android/app/libs/PenNavUI.aar index d423bc11..7832df8c 100644 Binary files a/android/app/libs/PenNavUI.aar and b/android/app/libs/PenNavUI.aar differ diff --git a/android/app/libs/Penguin.aar b/android/app/libs/Penguin.aar index 5c789c6f..a769c7a2 100644 Binary files a/android/app/libs/Penguin.aar and b/android/app/libs/Penguin.aar differ diff --git a/android/app/libs/PenguinRenderer.aar b/android/app/libs/PenguinRenderer.aar index b657ac66..2926e9ad 100644 Binary files a/android/app/libs/PenguinRenderer.aar and b/android/app/libs/PenguinRenderer.aar differ diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 9eef1012..67140928 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -52,7 +52,7 @@ - + @@ -138,6 +138,8 @@ android:name="push_kit_auto_init_enabled" android:value="true" /> + + ?) { + TODO("Not yet implemented") + } + + override fun onLocationMessage(locationMessage: LocationMessage?) { + TODO("Not yet implemented") + } } diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml index 6c4ac3df..6d9e5c53 100644 --- a/android/app/src/main/res/values/strings.xml +++ b/android/app/src/main/res/values/strings.xml @@ -19,5 +19,5 @@ Geofence requests happened too frequently. - sk.eyJ1IjoicndhaWQiLCJhIjoiY2x6NWo0bTMzMWZodzJrcGZpemYzc3Z4dSJ9.uSSZuwNSGCcCdPAiORECmg + pk.eyJ1IjoicndhaWQiLCJhIjoiY2x5cGo4aHNjMGNsbTJyc2djempobGQxaSJ9.RCaC6WrUt4A4YnZNfxnONQ diff --git a/assets/images/new/services.zip b/assets/images/new/services.zip new file mode 100644 index 00000000..dc5292d6 Binary files /dev/null and b/assets/images/new/services.zip differ diff --git a/ios/Podfile b/ios/Podfile index 8706dcdb..f82b82b0 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -30,7 +30,7 @@ flutter_ios_podfile_setup target 'Runner' do use_frameworks! use_modular_headers! - + pod 'OpenTok', '~> 2.22.0' pod 'VTO2Lib' pod 'MapboxMaps', '10.19.0' @@ -54,6 +54,8 @@ post_install do |installer| 'PERMISSION_EVENTS_FULL_ACCESS=1', ## dart: PermissionGroup.reminders 'PERMISSION_REMINDERS=1', + ## dart: PermissionGroup.notifications + 'PERMISSION_NOTIFICATIONS=1', ] build_configuration.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64 i386' build_configuration.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0' diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 6b99a743..0faecb4f 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -14,18 +14,18 @@ 306FE6C8271D790C002D6EFC /* OpenTokPlatformBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 306FE6C7271D790C002D6EFC /* OpenTokPlatformBridge.swift */; }; 306FE6CB271D8B73002D6EFC /* OpenTok.swift in Sources */ = {isa = PBXBuildFile; fileRef = 306FE6CA271D8B73002D6EFC /* OpenTok.swift */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 3DB328A4BC3A43F45E064B43 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E19F7CAE4CB09D1D186CB8A0 /* Pods_Runner.framework */; }; + 55AA48E49B1975752B97D5AC /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 722389C8A524DEC951FB496C /* Pods_Runner.framework */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 762D738E274E42650063CE73 /* ring_30Sec.caf in Resources */ = {isa = PBXBuildFile; fileRef = 762D738C274E42650063CE73 /* ring_30Sec.caf */; }; 762D738F274E42650063CE73 /* ring_30Sec.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 762D738D274E42650063CE73 /* ring_30Sec.mp3 */; }; - 7651B82F2D3E9CA40066B33A /* PenguinINRenderer.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7651B82C2D3E9CA40066B33A /* PenguinINRenderer.xcframework */; }; - 7651B8302D3E9CA40066B33A /* PenguinINRenderer.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 7651B82C2D3E9CA40066B33A /* PenguinINRenderer.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 7651B8312D3E9CA40066B33A /* Penguin.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7651B82D2D3E9CA40066B33A /* Penguin.xcframework */; }; - 7651B8322D3E9CA40066B33A /* Penguin.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 7651B82D2D3E9CA40066B33A /* Penguin.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 7651B8332D3E9CA40066B33A /* PenNavUI.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7651B82E2D3E9CA40066B33A /* PenNavUI.xcframework */; }; - 7651B8342D3E9CA40066B33A /* PenNavUI.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 7651B82E2D3E9CA40066B33A /* PenNavUI.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 76815B27275F381C00E66E94 /* HealthKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76815B26275F381C00E66E94 /* HealthKit.framework */; }; 76962ECE28AE5C10004EAE09 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 76962ECD28AE5C10004EAE09 /* GoogleService-Info.plist */; }; + 769B40D72F28A3BB00FC6445 /* Penguin.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 769B40D12F28A3B800FC6445 /* Penguin.xcframework */; }; + 769B40D82F28A3BB00FC6445 /* Penguin.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 769B40D12F28A3B800FC6445 /* Penguin.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 769B40D92F28A3BC00FC6445 /* PenguinINRenderer.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 769B40D22F28A3B800FC6445 /* PenguinINRenderer.xcframework */; }; + 769B40DA2F28A3BC00FC6445 /* PenguinINRenderer.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 769B40D22F28A3B800FC6445 /* PenguinINRenderer.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 769B40DB2F28A3BD00FC6445 /* PenNavUI.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 769B40D32F28A3B800FC6445 /* PenNavUI.xcframework */; }; + 769B40DC2F28A3BD00FC6445 /* PenNavUI.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 769B40D32F28A3B800FC6445 /* PenNavUI.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 76D71B672C6B7F9C00DAFB84 /* HMGPenguinInPlatformBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76D71B662C6B7F9C00DAFB84 /* HMGPenguinInPlatformBridge.swift */; }; 76D71B6A2C6B819000DAFB84 /* PenguinModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76D71B692C6B819000DAFB84 /* PenguinModel.swift */; }; 76D71B6C2C6B81B300DAFB84 /* PenguinView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76D71B6B2C6B81B300DAFB84 /* PenguinView.swift */; }; @@ -61,9 +61,9 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - 7651B8322D3E9CA40066B33A /* Penguin.xcframework in Embed Frameworks */, - 7651B8302D3E9CA40066B33A /* PenguinINRenderer.xcframework in Embed Frameworks */, - 7651B8342D3E9CA40066B33A /* PenNavUI.xcframework in Embed Frameworks */, + 769B40DA2F28A3BC00FC6445 /* PenguinINRenderer.xcframework in Embed Frameworks */, + 769B40D82F28A3BB00FC6445 /* Penguin.xcframework in Embed Frameworks */, + 769B40DC2F28A3BD00FC6445 /* PenNavUI.xcframework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -74,13 +74,14 @@ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 29631B9D2C96C7F600DF5916 /* PenguinNavigator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PenguinNavigator.swift; sourceTree = ""; }; + 2C6B6DB9E23FC83C372DD365 /* 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 = ""; }; 301C79AD27200D9F0016307B /* OpenTokRemoteVideoFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenTokRemoteVideoFactory.swift; sourceTree = ""; }; 301C79AF27200DED0016307B /* OpenTokLocalVideoFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenTokLocalVideoFactory.swift; sourceTree = ""; }; 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 = ""; }; - 54B166B4DC892AC4907E4EC3 /* 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 = ""; }; - 7289ADA1C0D9050B5D84D72D /* 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 = ""; }; + 6CD649749BB2F47B452A6202 /* 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 = ""; }; + 722389C8A524DEC951FB496C /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 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 = ""; }; @@ -88,11 +89,11 @@ 7643E4042BE0D0B400BD2F25 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/Main_Custom.strings; sourceTree = ""; }; 7643E4052BE0D0B400BD2F25 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/Main.strings; sourceTree = ""; }; 7643E4062BE0D0B400BD2F25 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/LaunchScreen.strings; sourceTree = ""; }; - 7651B82C2D3E9CA40066B33A /* PenguinINRenderer.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = PenguinINRenderer.xcframework; path = Frameworks/PenguinINRenderer.xcframework; sourceTree = ""; }; - 7651B82D2D3E9CA40066B33A /* Penguin.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Penguin.xcframework; path = Frameworks/Penguin.xcframework; sourceTree = ""; }; - 7651B82E2D3E9CA40066B33A /* PenNavUI.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = PenNavUI.xcframework; path = Frameworks/PenNavUI.xcframework; sourceTree = ""; }; 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 = ""; }; + 769B40D12F28A3B800FC6445 /* Penguin.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = Penguin.xcframework; sourceTree = ""; }; + 769B40D22F28A3B800FC6445 /* PenguinINRenderer.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = PenguinINRenderer.xcframework; sourceTree = ""; }; + 769B40D32F28A3B800FC6445 /* PenNavUI.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = PenNavUI.xcframework; sourceTree = ""; }; 76D71B662C6B7F9C00DAFB84 /* HMGPenguinInPlatformBridge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HMGPenguinInPlatformBridge.swift; sourceTree = ""; }; 76D71B692C6B819000DAFB84 /* PenguinModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PenguinModel.swift; sourceTree = ""; }; 76D71B6B2C6B81B300DAFB84 /* PenguinView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PenguinView.swift; sourceTree = ""; }; @@ -100,6 +101,7 @@ 76D71B6F2C6B81EA00DAFB84 /* PenguinViewFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PenguinViewFactory.swift; sourceTree = ""; }; 76F2556027F1FFED0062C1CD /* PassKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PassKit.framework; path = System/Library/Frameworks/PassKit.framework; sourceTree = SDKROOT; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 95022A170D86E777A3E61383 /* 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 = ""; }; 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; }; @@ -107,8 +109,6 @@ 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 = ""; }; - B3049EEB8BADB14F6A5B7CB0 /* 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 = ""; }; - E19F7CAE4CB09D1D186CB8A0 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 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 = ""; }; @@ -134,13 +134,13 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 7651B8312D3E9CA40066B33A /* Penguin.xcframework in Frameworks */, 76F2556127F1FFED0062C1CD /* PassKit.framework in Frameworks */, 76815B27275F381C00E66E94 /* HealthKit.framework in Frameworks */, E9620805255C2ED100D3A35D /* NetworkExtension.framework in Frameworks */, - 7651B8332D3E9CA40066B33A /* PenNavUI.xcframework in Frameworks */, - 7651B82F2D3E9CA40066B33A /* PenguinINRenderer.xcframework in Frameworks */, - 3DB328A4BC3A43F45E064B43 /* Pods_Runner.framework in Frameworks */, + 769B40DB2F28A3BD00FC6445 /* PenNavUI.xcframework in Frameworks */, + 769B40D72F28A3BB00FC6445 /* Penguin.xcframework in Frameworks */, + 769B40D92F28A3BC00FC6445 /* PenguinINRenderer.xcframework in Frameworks */, + 55AA48E49B1975752B97D5AC /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -160,13 +160,13 @@ 555EAAA626EFB641859EF0BE /* Frameworks */ = { isa = PBXGroup; children = ( - 7651B82D2D3E9CA40066B33A /* Penguin.xcframework */, - 7651B82C2D3E9CA40066B33A /* PenguinINRenderer.xcframework */, - 7651B82E2D3E9CA40066B33A /* PenNavUI.xcframework */, + 769B40D12F28A3B800FC6445 /* Penguin.xcframework */, + 769B40D22F28A3B800FC6445 /* PenguinINRenderer.xcframework */, + 769B40D32F28A3B800FC6445 /* PenNavUI.xcframework */, 76F2556027F1FFED0062C1CD /* PassKit.framework */, 76815B26275F381C00E66E94 /* HealthKit.framework */, E9620804255C2ED100D3A35D /* NetworkExtension.framework */, - E19F7CAE4CB09D1D186CB8A0 /* Pods_Runner.framework */, + 722389C8A524DEC951FB496C /* Pods_Runner.framework */, ); name = Frameworks; sourceTree = ""; @@ -174,9 +174,9 @@ 605039E5DDF72C245F9765FE /* Pods */ = { isa = PBXGroup; children = ( - 7289ADA1C0D9050B5D84D72D /* Pods-Runner.debug.xcconfig */, - B3049EEB8BADB14F6A5B7CB0 /* Pods-Runner.release.xcconfig */, - 54B166B4DC892AC4907E4EC3 /* Pods-Runner.profile.xcconfig */, + 2C6B6DB9E23FC83C372DD365 /* Pods-Runner.debug.xcconfig */, + 6CD649749BB2F47B452A6202 /* Pods-Runner.release.xcconfig */, + 95022A170D86E777A3E61383 /* Pods-Runner.profile.xcconfig */, ); path = Pods; sourceTree = ""; @@ -293,15 +293,15 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - 60AC8DEBE8BAE4B2EDC244F6 /* [CP] Check Pods Manifest.lock */, + 45F878899E79CC5E1FB4EC58 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 7651B8352D3E9CA50066B33A /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - F3C6EFB26D98B53D80BE1D19 /* [CP] Embed Pods Frameworks */, - 5193A841765CF1882FA9CCE8 /* [CP] Copy Pods Resources */, + BB3C9FF59088A86CD7C1B673 /* [CP] Embed Pods Frameworks */, + E9BC15C0E47D70948E8DA8FE /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -384,24 +384,7 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin\n"; }; - 5193A841765CF1882FA9CCE8 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 60AC8DEBE8BAE4B2EDC244F6 /* [CP] Check Pods Manifest.lock */ = { + 45F878899E79CC5E1FB4EC58 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -438,7 +421,7 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n"; }; - F3C6EFB26D98B53D80BE1D19 /* [CP] Embed Pods Frameworks */ = { + BB3C9FF59088A86CD7C1B673 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -455,6 +438,23 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; + E9BC15C0E47D70948E8DA8FE /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -583,7 +583,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 4; + CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 3A359E86ZF; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -601,7 +601,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - MARKETING_VERSION = 4.6.017; + MARKETING_VERSION = 4.6.028; PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -735,7 +735,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 4; + CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 3A359E86ZF; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -753,7 +753,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - MARKETING_VERSION = 4.6.017; + MARKETING_VERSION = 4.6.028; PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -779,7 +779,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 4; + CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 3A359E86ZF; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -797,7 +797,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - MARKETING_VERSION = 4.6.017; + MARKETING_VERSION = 4.6.028; PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index 41b17082..00000000 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift index 16ac97f2..84ae647d 100644 --- a/ios/Runner/AppDelegate.swift +++ b/ios/Runner/AppDelegate.swift @@ -26,7 +26,7 @@ var userNotificationCenterDelegate:UNUserNotificationCenterDelegate? = nil func initializePlatformChannels(){ - if let mainViewController = window.rootViewController as? MainFlutterVC{ // platform initialization suppose to be in foreground + if let mainViewController = window!.rootViewController as? MainFlutterVC{ // platform initialization suppose to be in foreground flutterViewController = mainViewController HMGPlatformBridge.initialize(flutterViewController: flutterViewController) OpenTokPlatformBridge.initialize(flutterViewController: flutterViewController, registrar: self.registrar(forPlugin: "open-tok")) diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json index 08f3422c..1eb27a20 100644 --- a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -109,7 +109,7 @@ "size" : "83.5x83.5" }, { - "filename" : "icon 1.jpg", + "filename" : "icon.jpg", "idiom" : "ios-marketing", "scale" : "1x", "size" : "1024x1024" diff --git a/lib/config/config.dart b/lib/config/config.dart index 755c9739..483138d6 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -357,7 +357,7 @@ var CAN_PAY_FOR_FOR_WALKIN_APPOINTMENT = 'Services/Doctors.svc/REST/CanPayForWal var CHANNEL = 3; var GENERAL_ID = 'Cs2020@2016\$2958'; var IP_ADDRESS = '10.20.10.20'; -var VERSION_ID = 20.5; +var VERSION_ID = 20.1; var SETUP_ID = '91877'; var LANGUAGE = 2; // var PATIENT_OUT_SA = 0; @@ -617,6 +617,7 @@ var SEND_DENTAL_APPOINTMENT_INVOICE_EMAIL = "Services/Notifications.svc/REST/Sen var GET_TAMARA_PLAN = 'https://mdlaboratories.com/tamaralive/Home/GetInstallments'; var GET_TAMARA_PAYMENT_STATUS = 'https://mdlaboratories.com/tamaralive/api/OnlineTamara/order_status?orderid='; +// var GET_TAMARA_PAYMENT_STATUS = 'https://epharmacy.hmg.com/tamara/api/OnlineTamara/order_status?orderid='; var UPDATE_TAMARA_STATUS = 'Services/PayFort_Serv.svc/REST/Tamara_UpdateRequestStatus'; @@ -705,9 +706,14 @@ var GET_OFFER_DETAILS = 'Services/Authentication.svc/REST/GetNDOfferData'; var GET_PRESCRIPTION_INSTRUCTIONS_PDF = 'Services/ChatBot_Service.svc/REST/Chatbot_SendMedicationInstructionByWhatsApp'; +var SEND_PATIENT_IMMEDIATE_UPDATE_INSURANCE_REQUEST = 'Services/OUTPs.svc/REST/PatientCompanyUpdate'; + //PAYFORT var getPayFortProjectDetails = "Services/PayFort_Serv.svc/REST/GetPayFortProjectDetails"; var addPayFortApplePayResponse = "Services/PayFort_Serv.svc/REST/AddResponse"; + +var GET_SERVICES_PRICE_LIST = 'Services/OUTPs.svc/REST/GetServicesPriceList'; + var payFortEnvironment = FortEnvironment.production; var applePayMerchantId = "merchant.com.hmgwebservices"; // var payFortEnvironment = FortEnvironment.test; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 857d7ffb..9dbcfa56 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1366,7 +1366,7 @@ const Map localizedValues = { "livecare-option-1": {"en": "Get consultation immediately", "ar": "الحصول على الاستشارة فورا"}, "livecare-option-2": {"en": "Instant video call", "ar": "اتصال فيديو فوري"}, "livecare-option-3": {"en": "Book Appointment", "ar": "حجز موعد"}, - "livecare-option-4": {"en": "Schedule video call", "ar": "اتصال فيديو مجدول"}, + "livecare-option-4": {"en": "Schedule Virtual Appointment", "ar": "جدولة موعد افتراضي"}, "sms_code": {"en": "Enter SMS Code here", "ar": "أدخل رمز التحقق هنا"}, "code_failure": {"en": "Didn’t received the code", "ar": "لم أستلم رمز التحقق"}, "resend": {"en": "Resend", "ar": "إعادة إرسال"}, @@ -2846,4 +2846,15 @@ const Map localizedValues = { "seeAllGraphValues": {"en": "View all results", "ar": "عرض جميع النتائج"}, "verify-with-biometric": {"en": "Biometric", "ar": "الحيوية"}, "medicationInstructions": {"en": "Medication Instructions", "ar": "تعليمات الدواء"}, + "servicePriceList": {"en": "Services Price List", "ar": "قائمة أسعار الخدمات"}, + + "servicePriceListDesc": {"en": "Below is the services price list outline the healthcare services fees for cash payments, where the insurance coverage, eligibility, and co-payment deductions will be processed in accordance with the insurance policy terms and the table of benefits of each insurance providers:", "ar": "توضح قائمة أسعار الخدمات أدناه رسوم الخدمات الصحية المقدمة للمرضى بنظام الدفع النقدي. أما فيما يتعلق بالخدمات المشمولة بالتأمين، فسيتم تطبيق التغطية التأمينية والتحقق من الأهلية واحتساب نسب التحمل وفقًا لشروط وثيقة التأمين وجدول المنافع المعتمد لكل شركة تأمين."}, + "servicePriceList1": {"en": "Consultant Physician Consultation", "ar": "كشف طبيب استشاري"}, + "servicePriceList2": {"en": "Specialist Physician Consultation", "ar": "كشف طبيب أخصائي"}, + "servicePriceList3": {"en": "General Physician Consultation", "ar": "كشف طبيب عام"}, + "servicePriceList4": {"en": "Dental Consultation", "ar": "كشف طبيب أسنان"}, + "servicePriceList5": {"en": "Optometrist Consultation", "ar": "كشف أخصائي بصريات"}, + "servicePriceList6": {"en": "Dietician Consultation", "ar": "كشف أخصائي تغذية"}, + "servicePriceList7": {"en": "LiveCare Consultation", "ar": "كشف استشارة عن بعد ( لايف كير )"}, + "servicePriceListRights": {"en": "The patient has the right to a free follow-up within 14 days of initial visit", "ar": "يحق للمريض الحصول على متابعة مجانية في غضون 14 يومًا من الزيارة الأولى"}, }; diff --git a/lib/core/model/services_price_list_response_model.dart b/lib/core/model/services_price_list_response_model.dart new file mode 100644 index 00000000..bb60094a --- /dev/null +++ b/lib/core/model/services_price_list_response_model.dart @@ -0,0 +1,54 @@ +class ServicesPriceListResponseModel { + int? createdBy; + String? createdOn; + int? editedBy; + String? editedOn; + int? id; + bool? isEnabled; + String? nameAR; + String? nameEN; + num? price; + int? rowID; + + ServicesPriceListResponseModel({ + this.createdBy, + this.createdOn, + this.editedBy, + this.editedOn, + this.id, + this.isEnabled, + this.nameAR, + this.nameEN, + this.price, + this.rowID, + }); + + ServicesPriceListResponseModel.fromJson(Map json) { + createdBy = json['CreatedBy']; + createdOn = json['CreatedOn']; + editedBy = json['EditedBy']; + editedOn = json['EditedOn']; + id = json['ID']; + isEnabled = json['IsEnabled']; + nameAR = json['NameAR']; + nameEN = json['NameEN']; + price = json['Price']; + rowID = json['RowID']; + } + + Map toJson() { + final Map data = {}; + data['CreatedBy'] = createdBy; + data['CreatedOn'] = createdOn; + data['EditedBy'] = editedBy; + data['EditedOn'] = editedOn; + data['ID'] = id; + data['IsEnabled'] = isEnabled; + data['NameAR'] = nameAR; + data['NameEN'] = nameEN; + data['Price'] = price; + data['RowID'] = rowID; + return data; + } +} + diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index 8506ad73..30d5958a 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -1,7 +1,9 @@ import 'dart:async'; import 'dart:convert'; +import 'dart:developer'; import 'dart:io' show Platform; +import 'package:flutter/foundation.dart'; import 'package:hmg_patient_app/analytics/google-analytics.dart'; import 'package:hmg_patient_app/config/config.dart'; import 'package:hmg_patient_app/config/shared_pref_kay.dart'; @@ -187,7 +189,7 @@ class BaseAppClient { // body['IdentificationNo'] = 1023854217; // body['MobileNo'] = "531940021"; //0560717232 - // body['PatientID'] = 4772161; //4609100 + // body['PatientID'] = 4773715; //4609100 // body['TokenID'] = "@dm!n"; // Patient ID: 3027574 @@ -202,9 +204,11 @@ class BaseAppClient { // } // if (AppGlobal.isNetworkDebugEnabled) { - debugPrint("URL : $url"); - final jsonBody = json.encode(body); - debugPrint(jsonBody); + if(!kReleaseMode) { + log("URL : $url"); + final jsonBody = json.encode(body); + log(jsonBody); + } // } if (await Utils.checkConnection(bypassConnectionCheck: bypassConnectionCheck)) { diff --git a/lib/core/service/medical/labs_service.dart b/lib/core/service/medical/labs_service.dart index b0a9e874..aec1c801 100644 --- a/lib/core/service/medical/labs_service.dart +++ b/lib/core/service/medical/labs_service.dart @@ -237,9 +237,12 @@ class LabsService extends BaseService { _requestSendLabReportEmail.languageID = languageID; // await baseAppClient.post(SEND_LAB_RESULT_EMAIL, onSuccess: (dynamic response, int statusCode) { - await baseAppClient.post(isVidaPlus ? SEND_LAB_RESULT_EMAIL : SEND_LAB_RESULT_EMAIL_NEW, onSuccess: (dynamic response, int statusCode) { + // await baseAppClient.post(isVidaPlus ? SEND_LAB_RESULT_EMAIL : SEND_LAB_RESULT_EMAIL_NEW, onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(SEND_LAB_RESULT_EMAIL_NEW, onSuccess: (dynamic response, int statusCode) { if (isDownload) { - labReportPDF = isVidaPlus ? response['LabReportsPDFContent'] : response['PdfContent']; + // labReportPDF = isVidaPlus ? response['LabReportsPDFContent'] : response['PdfContent']; + labReportPDF = response['PdfContent']; + hasError = false; } }, onFailure: (String error, int statusCode) { hasError = true; @@ -279,15 +282,12 @@ class LabsService extends BaseService { return copy; } - Map mapFirstItemByPriority( - List sortedResults) { + Map mapFirstItemByPriority(List sortedResults) { final Map priorityMap = {}; const priorityOrder = ['LCL', 'CL', 'L', 'N', 'H', 'CH', 'HCH']; for (final result in sortedResults) { final priority = result.calculatedResultFlag?.trim(); - if (priority != null && - priorityOrder.contains(priority) && - !priorityMap.containsKey(priority)) { + if (priority != null && priorityOrder.contains(priority) && !priorityMap.containsKey(priority)) { priorityMap[priority] = result; } @@ -307,8 +307,7 @@ class LabsService extends BaseService { print("the match iss not null"); final millis = int.tryParse(match.group(1)!); if (millis != null) { - print( - "the data and time is ${DateTime.fromMillisecondsSinceEpoch(millis)}"); + print("the data and time is ${DateTime.fromMillisecondsSinceEpoch(millis)}"); return DateTime.fromMillisecondsSinceEpoch(millis); } } @@ -335,14 +334,9 @@ class LabsService extends BaseService { return mapResultToThreshold(topResults, mapOfPriority); } - List mapResultToThreshold( - List results, Map mapOfPriority) { + List mapResultToThreshold(List results, Map mapOfPriority) { // Extract valid numeric results - List actualValues = results - .map((e) => double.tryParse(e.resultValue ?? '')) - .where((v) => v != null) - .cast() - .toList(); + List actualValues = results.map((e) => double.tryParse(e.resultValue ?? '')).where((v) => v != null).cast().toList(); if (actualValues.isEmpty) return []; @@ -376,14 +370,10 @@ class LabsService extends BaseService { var mapOfValues = inferThresholds(mapOfPriority); var item = results.first; - String? realCriticalLow = - (item.criticalLow == "0") ? null : item.criticalLow; - String? realReferenceHigh = - (item.referenceHigh == "0") ? null : item.referenceHigh; - String? realCriticalHigh = - (item.criticalHigh == "0") ? null : item.criticalHigh; - String? realReferenceLow = - (item.referenceLow == "0") ? null : item.referenceLow; + String? realCriticalLow = (item.criticalLow == "0") ? null : item.criticalLow; + String? realReferenceHigh = (item.referenceHigh == "0") ? null : item.referenceHigh; + String? realCriticalHigh = (item.criticalHigh == "0") ? null : item.criticalHigh; + String? realReferenceLow = (item.referenceLow == "0") ? null : item.referenceLow; final adjustedValues = adjustValues( criticalLow: mapOfValues['criticalLow'], low: mapOfValues['low'], @@ -393,53 +383,26 @@ class LabsService extends BaseService { ); return [ - ThresholdRange( - label: 'Critical Low', - value: adjustedValues["criticalLow"]!, - color: Color(0xffffffff), - lineColor: Color(0xFFe9a2a4), - actualValue: realCriticalLow), - ThresholdRange( - label: 'Low', - value: adjustedValues['low']!, - color: Color(0xFFf2fbf5), - lineColor: Color(0xFFefc481), - actualValue: realReferenceLow), - ThresholdRange( - label: 'Normal', - value: adjustedValues['normal']!, - color: Color(0xFFf2fbf5), - lineColor: Color(0xFF5dc36b)), - ThresholdRange( - label: 'High', - value: adjustedValues['high']!, - color: Color(0xffffffff), - lineColor: Color(0xFFefc481), - actualValue: realReferenceHigh), - ThresholdRange( - label: 'Critical High', - value: adjustedValues['criticalHigh']!, - color: Color(0xffffffff), - lineColor: Color(0xFFe9a2a4), - actualValue: realCriticalHigh), + ThresholdRange(label: 'Critical Low', value: adjustedValues["criticalLow"]!, color: Color(0xffffffff), lineColor: Color(0xFFe9a2a4), actualValue: realCriticalLow), + ThresholdRange(label: 'Low', value: adjustedValues['low']!, color: Color(0xFFf2fbf5), lineColor: Color(0xFFefc481), actualValue: realReferenceLow), + ThresholdRange(label: 'Normal', value: adjustedValues['normal']!, color: Color(0xFFf2fbf5), lineColor: Color(0xFF5dc36b)), + ThresholdRange(label: 'High', value: adjustedValues['high']!, color: Color(0xffffffff), lineColor: Color(0xFFefc481), actualValue: realReferenceHigh), + ThresholdRange(label: 'Critical High', value: adjustedValues['criticalHigh']!, color: Color(0xffffffff), lineColor: Color(0xFFe9a2a4), actualValue: realCriticalHigh), ]; } - Map inferThresholds( - Map mapOfPriority) { + Map inferThresholds(Map mapOfPriority) { double? parse(String? v) { final parsed = double.tryParse(v ?? ''); return (parsed == null || parsed < 0) ? null : parsed; } // Parse inputs - double? criticalLow = parse( - mapOfPriority['LCL']?.resultValue ?? mapOfPriority['CL']?.resultValue); + double? criticalLow = parse(mapOfPriority['LCL']?.resultValue ?? mapOfPriority['CL']?.resultValue); double? low = parse(mapOfPriority['L']?.resultValue); double? normal = parse(mapOfPriority['N']?.resultValue); double? high = parse(mapOfPriority['H']?.resultValue); - double? criticalHigh = parse( - mapOfPriority['CH']?.resultValue ?? mapOfPriority['HCH']?.resultValue); + double? criticalHigh = parse(mapOfPriority['CH']?.resultValue ?? mapOfPriority['HCH']?.resultValue); const step = 5.0; List values = [criticalLow, low, normal, high, criticalHigh]; @@ -453,11 +416,11 @@ class LabsService extends BaseService { return v < 0 ? 0 : v; }); var mapresult = { - 'criticalLow': values[0]??-1, - 'low': values[1]??-1, - 'normal': values[2]??-1, - 'high': values[3]??-1, - 'criticalHigh': values[4]??-1, + 'criticalLow': values[0] ?? -1, + 'low': values[1] ?? -1, + 'normal': values[2] ?? -1, + 'high': values[3] ?? -1, + 'criticalHigh': values[4] ?? -1, }; print("the result is $mapresult"); @@ -480,20 +443,23 @@ class LabsService extends BaseService { if (criticalLow == null || criticalLow == -1) criticalLowHasValue = false; if (low == null || low == -1) lowHasValue = false; - if (normal == null ||normal ==-1) normaHasValue = false; - if (high == null ||high ==-1) highHasValue = false; - if (criticalHigh == null ||criticalHigh ==-1) criticalHighHasValue = false; + if (normal == null || normal == -1) normaHasValue = false; + if (high == null || high == -1) highHasValue = false; + if (criticalHigh == null || criticalHigh == -1) criticalHighHasValue = false; print("the values arre $criticalLowHasValue $lowHasValue $normaHasValue $highHasValue $criticalHighHasValue"); if (!criticalLowHasValue) { criticalLow = 0; if (lowHasValue) { low = low! - step; - } if (normaHasValue && (criticalLow!= 0 || criticalLow != -1)) { + } + if (normaHasValue && (criticalLow != 0 || criticalLow != -1)) { low = normal! - step * 2; - } if (highHasValue && (criticalLow!= 0 || criticalLow != -1)) { + } + if (highHasValue && (criticalLow != 0 || criticalLow != -1)) { low = high! - step * 3; - } if (criticalHighHasValue && (criticalLow!= 0 || criticalLow != -1)) { + } + if (criticalHighHasValue && (criticalLow != 0 || criticalLow != -1)) { low = criticalHigh! - step * 4; } } @@ -503,25 +469,30 @@ class LabsService extends BaseService { if (criticalLowHasValue && (low != 0 || low != -1)) { low = criticalLow! + step; - } if (normaHasValue && (low != 0 || low != -1)) { + } + if (normaHasValue && (low != 0 || low != -1)) { low = normal! - step; - } if (highHasValue && (low != 0 || low != -1)) { + } + if (highHasValue && (low != 0 || low != -1)) { low = high! - step * 2; - } if (criticalHighHasValue && (low != 0 || low != -1)) { + } + if (criticalHighHasValue && (low != 0 || low != -1)) { low = criticalHigh! - step * 3; } - } if (!normaHasValue) { normal = 0; if (criticalLowHasValue && (normal != 0 || normal != -1)) { normal = criticalLow! + step * 2; - } if (lowHasValue) { + } + if (lowHasValue) { normal = low! + step; - } if (highHasValue) { + } + if (highHasValue) { normal = high! - step; - } if (criticalHighHasValue) { + } + if (criticalHighHasValue) { normal = criticalHigh! - step * 2; } } @@ -530,59 +501,62 @@ class LabsService extends BaseService { if (criticalLowHasValue) { high = criticalLow! + step * 3; - } if (lowHasValue) { + } + if (lowHasValue) { high = low! + step * 2; - } if (normaHasValue) { + } + if (normaHasValue) { high = normal! + step; - } if (criticalHighHasValue) { + } + if (criticalHighHasValue) { high = criticalHigh! - step; } } if (!criticalHighHasValue) { - criticalHigh = 0; if (criticalLowHasValue) { criticalHigh = criticalLow! + step * 4; - } if (lowHasValue) { + } + if (lowHasValue) { criticalHigh = low! + step * 3; - } if (normaHasValue) { + } + if (normaHasValue) { criticalHigh = normal! + step * 2; - } if (highHasValue) { + } + if (highHasValue) { criticalHigh = high! + step; } } - if(((criticalLow??0)<0) == true){ - var mod = ((low ?? 0) + (normal??0) )/2; + if (((criticalLow ?? 0) < 0) == true) { + var mod = ((low ?? 0) + (normal ?? 0)) / 2; criticalLow = mod; } - if(((low??0)<0) == true){ - var mod = ((criticalLow ?? 0) + (normal??0) )/2; + if (((low ?? 0) < 0) == true) { + var mod = ((criticalLow ?? 0) + (normal ?? 0)) / 2; low = mod; } - if(((normal??0)<0) == true){ - var mod = ((low ?? 0) + (high??0) )/2; + if (((normal ?? 0) < 0) == true) { + var mod = ((low ?? 0) + (high ?? 0)) / 2; normal = mod; } - if(((high??0)<0) == true){ - var mod = ((normal ?? 0) + (criticalHigh??0) )/2; + if (((high ?? 0) < 0) == true) { + var mod = ((normal ?? 0) + (criticalHigh ?? 0)) / 2; high = mod; } - if(((criticalHigh??0)<0) == true){ - criticalHigh = (high??0)+step; + if (((criticalHigh ?? 0) < 0) == true) { + criticalHigh = (high ?? 0) + step; } - - Map values = { - 'criticalLow':criticalLow , + 'criticalLow': criticalLow, 'low': low, - 'normal': normal , - 'high': high , - 'criticalHigh': criticalHigh, + 'normal': normal, + 'high': high, + 'criticalHigh': criticalHigh, }; print("thee adjusted values `are $values"); @@ -628,9 +602,7 @@ class LabsService extends BaseService { const priorityOrder = ['LCL', 'CL', 'L', 'N', 'H', 'CH', 'HCH']; // Sort results by priority order - results.sort((a, b) => priorityOrder - .indexOf(a.calculatedResultFlag ?? '') - .compareTo(priorityOrder.indexOf(b.calculatedResultFlag ?? ''))); + results.sort((a, b) => priorityOrder.indexOf(a.calculatedResultFlag ?? '').compareTo(priorityOrder.indexOf(b.calculatedResultFlag ?? ''))); // Extract values List values = results.map((r) { @@ -716,54 +688,15 @@ class LabsService extends BaseService { return transformedValue; } - - List getThresholdValue() { return [ - ThresholdRange( - label: 'LCL', - value: 0, - color: Color(0xffffffff), - lineColor: Color(0xFFe9a2a4)), ThresholdRange( - label: 'CL', - value: 0, - color: Color(0xffffffff), - lineColor: Color(0xFFe9a2a4)), - ThresholdRange( - label: 'L', - value: 20, - color: Color(0xFFf2fbf5), - lineColor: Color(0xFFeecd94)), - ThresholdRange( - label: 'N', - value: 40, - color: Color(0xFFf2fbf5), - lineColor: Color(0xFF5dc36b)), - ThresholdRange( - label: 'H', - value: 60, - color: Color(0xffffffff), - lineColor: Color(0xFFeecd94)), - ThresholdRange( - label: 'CH', - value: 80, - color: Color(0xffffffff), - lineColor: Color(0xFFe9a2a4)), ThresholdRange( - label: 'HCH', - value: 80, - color: Color(0xffffffff), - lineColor: Color(0xFFe9a2a4)), + ThresholdRange(label: 'LCL', value: 0, color: Color(0xffffffff), lineColor: Color(0xFFe9a2a4)), + ThresholdRange(label: 'CL', value: 0, color: Color(0xffffffff), lineColor: Color(0xFFe9a2a4)), + ThresholdRange(label: 'L', value: 20, color: Color(0xFFf2fbf5), lineColor: Color(0xFFeecd94)), + ThresholdRange(label: 'N', value: 40, color: Color(0xFFf2fbf5), lineColor: Color(0xFF5dc36b)), + ThresholdRange(label: 'H', value: 60, color: Color(0xffffffff), lineColor: Color(0xFFeecd94)), + ThresholdRange(label: 'CH', value: 80, color: Color(0xffffffff), lineColor: Color(0xFFe9a2a4)), + ThresholdRange(label: 'HCH', value: 80, color: Color(0xffffffff), lineColor: Color(0xFFe9a2a4)), ]; } - - } - - - - - - - - - diff --git a/lib/core/service/privilege_service.dart b/lib/core/service/privilege_service.dart index a572d1a8..cd4a2be7 100644 --- a/lib/core/service/privilege_service.dart +++ b/lib/core/service/privilege_service.dart @@ -3,6 +3,7 @@ import 'package:hmg_patient_app/core/model/privilege/HMCProjectListModel.dart'; import 'package:hmg_patient_app/core/model/privilege/PrivilegeModel.dart'; import 'package:hmg_patient_app/core/model/privilege/ProjectDetailListModel.dart'; import 'package:hmg_patient_app/core/model/privilege/VidaPlusProjectListModel.dart'; +import 'package:hmg_patient_app/core/model/services_price_list_response_model.dart'; import 'package:hmg_patient_app/core/service/base_service.dart'; import 'package:hmg_patient_app/main.dart'; @@ -12,6 +13,8 @@ class PrivilegeService extends BaseService { List hMCProjectListModel = []; List projectDetailListModel = []; + List servicesPriceList = []; + dynamic hisOffersList; Future offerDetailsAPICall() async { @@ -28,6 +31,25 @@ class PrivilegeService extends BaseService { return Future.value(localRes); } + Future getServicesPriceList({ + String searchKey = "", + int pageIndex = 0, + int pageSize = 0, + }) async { + Map request = {"ID": 1, "SearchKey": searchKey, "PageIndex": pageIndex, "PageSize": pageSize, "RowCount": 0, "TokenID": "@dm!n"}; + + dynamic localRes; + await baseAppClient.post(GET_SERVICES_PRICE_LIST, onSuccess: (response, statusCode) async { + response['getServicesPriceList'].forEach((item) { + servicesPriceList.add(ServicesPriceListResponseModel.fromJson(item)); + }); + servicesPriceList.removeWhere((element) => element.isEnabled == false); + }, onFailure: (String error, int statusCode) { + localRes = {"error": error}; + // throw error; + }, body: request); + } + Future getPrivilege() async { Map body = Map(); body['PatientType'] = 4; diff --git a/lib/core/viewModels/medical/labs_view_model.dart b/lib/core/viewModels/medical/labs_view_model.dart index 3bd78682..28742cb6 100644 --- a/lib/core/viewModels/medical/labs_view_model.dart +++ b/lib/core/viewModels/medical/labs_view_model.dart @@ -61,7 +61,7 @@ class LabsViewModel extends BaseViewModel { List patientLabOrdersHospital = _patientLabOrdersListHospital .where( (elementClinic) => elementClinic.filterName == element.projectName, - ) + ) .toList(); if (patientLabOrdersHospital.length != 0) { @@ -120,7 +120,13 @@ class LabsViewModel extends BaseViewModel { if (patientLabOrdersClinic.length != 0) { labResultLists[labResultLists.indexOf(patientLabOrdersClinic[0])].patientLabResultList!.add(element); } else { - labResultLists.add(LabResultList(filterName: element.testCode, description: element.packageShortDescription, lab: element)); + // labResultLists.add(LabResultList(filterName: element.testCode, description: element.packageShortDescription, lab: element)); + labResultLists.add( + LabResultList( + filterName: element.testCode, + description: ((element.testShortDescription != null && element.testShortDescription!.isNotEmpty) ? element.testShortDescription : element.packageShortDescription), + lab: element), + ); } }); setState(ViewState.Idle); @@ -208,7 +214,13 @@ class LabsViewModel extends BaseViewModel { maxYForThreeDots = double.parse(element.resultValue!); } // threePointGraphValue.add(DataPoint( labelValue: counter,value : _labsService.transformValueInRange(double.parse(element.resultValue!), element.calculatedResultFlag??""), label: "${months[dateTime.month-1]} ${dateTime.year}", date: dateTime)); - threePointGraphValue.add(DataPoint( labelValue: counter,value : double.parse(element.resultValue!), actualValue: element.resultValue!,label: formatDateAsMMYY(dateTime), date: dateTime, referenceRangeValue:element.calculatedResultFlag ??"IRR")); + threePointGraphValue.add(DataPoint( + labelValue: counter, + value: double.parse(element.resultValue!), + actualValue: element.resultValue!, + label: formatDateAsMMYY(dateTime), + date: dateTime, + referenceRangeValue: element.calculatedResultFlag ?? "IRR")); counter++; } catch (e) {} }); @@ -226,15 +238,21 @@ class LabsViewModel extends BaseViewModel { completeeGraphValues.clear(); setState(ViewState.Busy); double counter = 1; - threshold = _labsService.getThresholdValue(); + threshold = _labsService.getThresholdValue(); _labsService.labOrdersResultsList.reversed.forEach((element) { try { var dateTime = DateUtil.convertStringToDate(element.verifiedOnDateTime!); - if(double.parse(element.resultValue!)> maxYForCompleteGraph){ + if (double.parse(element.resultValue!) > maxYForCompleteGraph) { maxYForCompleteGraph = double.parse(element.resultValue!); } // completeeGraphValues.add(DataPoint( labelValue: counter,value : _labsService.transformValueInRange(double.parse(element.resultValue!), element.calculatedResultFlag??""), label: "${months[dateTime.month-1]} ${dateTime.year}", date: dateTime)); - completeeGraphValues.add(DataPoint( labelValue: counter,value : double.parse(element.resultValue!), label: formatDateAsMMYY(dateTime), date: dateTime,actualValue: element.resultValue!, referenceRangeValue:element.calculatedResultFlag??"IRR" )); + completeeGraphValues.add(DataPoint( + labelValue: counter, + value: double.parse(element.resultValue!), + label: formatDateAsMMYY(dateTime), + date: dateTime, + actualValue: element.resultValue!, + referenceRangeValue: element.calculatedResultFlag ?? "IRR")); } catch (e) { print("the mapping is having exception $e"); } @@ -251,6 +269,7 @@ class LabsViewModel extends BaseViewModel { String year = date.year.toString().substring(2); return '$month/$year'; } + sendLabReportEmail({PatientLabOrders? patientLabOrder, String? mes, AuthenticatedUser? userObj, required bool isVidaPlus, bool isDownload = false}) async { setState(ViewState.Busy); diff --git a/lib/pages/BookAppointment/BookConfirm.dart b/lib/pages/BookAppointment/BookConfirm.dart index d72509f8..d30cfbaa 100644 --- a/lib/pages/BookAppointment/BookConfirm.dart +++ b/lib/pages/BookAppointment/BookConfirm.dart @@ -303,7 +303,7 @@ class _BookConfirmState extends State { confirmMessage: errorMsg, okText: TranslationBase.of(context).updateInsuranceText, cancelText: TranslationBase.of(context).continueCash, - okFunction: () => {openUpdateInsurance()}, + okFunction: () => {openUpdateInsuranceForWalkIn()}, cancelFunction: () => {continueAsCashForWalkIn(widget.doctor.projectID!)}); dialog.showAlertDialog(context); } @@ -717,7 +717,7 @@ class _BookConfirmState extends State { confirmMessage: res['ErrorEndUserMessage'], okText: "Update insurance", cancelText: "Continue as cash", - okFunction: () => {openUpdateInsurance()}, + okFunction: () => {openUpdateInsurance(docObject, appointmentNo, false)}, cancelFunction: () => {continueAsCash(docObject, appointmentNo, false)}); dialog.showAlertDialog(context); } @@ -727,9 +727,28 @@ class _BookConfirmState extends State { }); } - void openUpdateInsurance() { - Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route r) => false); - Navigator.push(context, FadePage(page: InsuranceUpdate())); + void openUpdateInsurance(DoctorList docObject, String appointmentNo, bool isLiveCareAppointment) { + DoctorsListService service = new DoctorsListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.sendPatientUpdateRequest().then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res["MessageStatus"] == 1) { + if (isLiveCareAppointment) { + getLiveCareAppointmentPatientShare(context, appointmentNo, docObject!.clinicID!, docObject.projectID!, docObject); + } else { + getPatientShare(context, appointmentNo, docObject.clinicID!, docObject.projectID!, docObject); + } + getToDoCount(); + } else { + Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route r) => false); + Navigator.push(context, FadePage(page: InsuranceUpdate())); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route r) => false); + Navigator.push(context, FadePage(page: InsuranceUpdate())); + }); } void continueAsCash(DoctorList docObject, String appointmentNo, bool isLiveCareAppointment) { @@ -753,6 +772,29 @@ class _BookConfirmState extends State { }); } + void openUpdateInsuranceForWalkIn() { + DoctorsListService service = new DoctorsListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.sendPatientUpdateRequest().then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res["MessageStatus"] == 1) { + if (res["MessageStatus"] == 1) { + getWalkinAppointmentPatientShare(); + } else { + AppToast.showErrorToast(message: res["ErrorEndUserMessage"]); + } + } else { + Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route r) => false); + Navigator.push(context, FadePage(page: InsuranceUpdate())); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route r) => false); + Navigator.push(context, FadePage(page: InsuranceUpdate())); + }); + } + void continueAsCashForWalkIn(int projectID) { GifLoaderDialogUtils.showMyDialog(context); widget.service.convertPatientToCash(projectID).then((res) { @@ -893,6 +935,7 @@ class _BookConfirmState extends State { insertAppointment(context, widget.doctor, widget.initialSlotDuration); } }).onError((error, stackTrace) { + GifLoaderDialogUtils.hideDialog(context); insertAppointment(context, widget.doctor, widget.initialSlotDuration); }); } @@ -913,6 +956,7 @@ class _BookConfirmState extends State { Future.delayed(Duration(milliseconds: 500), () { // checkPatientNphiesEligibility(docObject, res['AppointmentNo'], context); + GifLoaderDialogUtils.hideDialog(context); getToDoCount(); getPatientShare(context, res['AppointmentNo'], docObject.clinicID!, docObject.projectID!, docObject); }); @@ -1025,6 +1069,7 @@ class _BookConfirmState extends State { String errorMsg = ""; GifLoaderDialogUtils.showMyDialog(context, barrierDismissible: false); widget.service.getPatientShare(appointmentNo, clinicID, projectID, languageID, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); projectViewModel.selectedBodyPartList.clear(); projectViewModel.laserSelectionDuration = 0; if (res['OnlineCheckInAppointments'].length != 0) { @@ -1052,8 +1097,8 @@ class _BookConfirmState extends State { confirmMessage: errorMsg, okText: TranslationBase.of(context).updateInsuranceText, cancelText: TranslationBase.of(context).continueCash, - okFunction: () => {openUpdateInsurance()}, - cancelFunction: () => {continueAsCash(docObject, appointmentNo, false)}); + okFunction: () => {Navigator.pop(context), openUpdateInsurance(docObject, appointmentNo, widget.patientShareResponse.isLiveCareAppointment!)}, + cancelFunction: () => {Navigator.pop(context), continueAsCash(docObject, appointmentNo, widget.patientShareResponse.isLiveCareAppointment!)}); dialog.showAlertDialog(context); } } @@ -1095,7 +1140,7 @@ class _BookConfirmState extends State { confirmMessage: errorMsg, okText: TranslationBase.of(context).updateInsuranceText, cancelText: TranslationBase.of(context).continueCash, - okFunction: () => {openUpdateInsurance()}, + okFunction: () => {openUpdateInsurance(docObject, appointmentNo, true)}, cancelFunction: () => {continueAsCash(docObject, appointmentNo, true)}); dialog.showAlertDialog(context); } diff --git a/lib/pages/BookAppointment/QRCode.dart b/lib/pages/BookAppointment/QRCode.dart index ed0ad0a7..cd2b3369 100644 --- a/lib/pages/BookAppointment/QRCode.dart +++ b/lib/pages/BookAppointment/QRCode.dart @@ -74,7 +74,7 @@ class _QRCodeState extends State { Future.delayed(const Duration(milliseconds: 500), () { showNfcReader(context, onNcfScan: (String nfcId) { Future.delayed(const Duration(milliseconds: 100), () { - sendNfcCheckInRequest(nfcId, 2); + sendNfcCheckInRequest(nfcId, 1); locator().todoList.to_do_list_nfc(widget.appointment!); }); }, onCancel: () { @@ -100,7 +100,7 @@ class _QRCodeState extends State { double dist = Utils.distance(value.latitude, value.longitude, double.parse(projectDetailListModel.latitude!), double.parse(projectDetailListModel.longitude!)).ceilToDouble() * 1000; print(dist); if (dist <= projectDetailListModel.geofenceRadius!) { - sendNfcCheckInRequest(projectDetailListModel.checkInQrCode!, 2); + sendNfcCheckInRequest(projectDetailListModel.checkInQrCode!, 3); } else { GifLoaderDialogUtils.hideDialog(context); AppToast.showErrorToast(message: TranslationBase.of(context).locationCheckInError); @@ -162,7 +162,7 @@ class _QRCodeState extends State { onTap: () { showNfcReader(context, onNcfScan: (String nfcId) { Future.delayed(const Duration(milliseconds: 100), () { - sendNfcCheckInRequest(nfcId, 2); + sendNfcCheckInRequest(nfcId, 1); locator().todoList.to_do_list_nfc(widget.appointment!); }); diff --git a/lib/pages/BookAppointment/components/SearchByClinic.dart b/lib/pages/BookAppointment/components/SearchByClinic.dart index e7357ef4..98444643 100644 --- a/lib/pages/BookAppointment/components/SearchByClinic.dart +++ b/lib/pages/BookAppointment/components/SearchByClinic.dart @@ -25,6 +25,7 @@ import 'package:hmg_patient_app/uitl/location_util.dart'; import 'package:hmg_patient_app/uitl/translations_delegate_base.dart'; import 'package:hmg_patient_app/uitl/utils_new.dart'; import 'package:hmg_patient_app/widgets/card/rounded_container.dart'; +import 'package:hmg_patient_app/widgets/dialogs/alert_dialog.dart'; import 'package:hmg_patient_app/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; @@ -696,7 +697,17 @@ class _SearchByClinicState extends State { }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); print(err); - AppToast.showErrorToast(message: err, localContext: context); + if(clinicID == 23) { + AlertDialogBox( + context: context, + confirmMessage: err.toString(), + okText: TranslationBase.of(context).ok, + okFunction: () { + AlertDialogBox.closeAlertDialog(context); + }).showAlertDialog(context); + } else { + AppToast.showErrorToast(message: err, localContext: context); + } }); } 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 c0767ba1..7d88242a 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 @@ -134,7 +134,7 @@ class RRTRequestPickupAddressPageState extends State( onModelReady: (vm) { viewModel = vm; - loadAddresses(); + // loadAddresses(); myAddresses = viewModel.addressesList; }, builder: (ctx, vm, widget) => AppScaffold( diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart index 753ed6c9..988c2833 100644 --- a/lib/pages/ToDoList/ToDo.dart +++ b/lib/pages/ToDoList/ToDo.dart @@ -6,6 +6,7 @@ import 'package:hmg_patient_app/config/shared_pref_kay.dart'; import 'package:hmg_patient_app/core/enum/PayfortEnums.dart'; import 'package:hmg_patient_app/core/model/ImagesInfo.dart'; import 'package:hmg_patient_app/core/viewModels/project_view_model.dart'; +import 'package:hmg_patient_app/locator.dart'; import 'package:hmg_patient_app/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:hmg_patient_app/models/Appointments/DoctorListResponse.dart'; import 'package:hmg_patient_app/models/Appointments/OBGyneProcedureListResponse.dart'; @@ -34,6 +35,7 @@ import 'package:hmg_patient_app/uitl/app_shared_preferences.dart'; import 'package:hmg_patient_app/uitl/app_toast.dart'; import 'package:hmg_patient_app/uitl/date_uitl.dart'; import 'package:hmg_patient_app/uitl/gif_loader_dialog_utils.dart'; +import 'package:hmg_patient_app/uitl/navigation_service.dart'; import 'package:hmg_patient_app/uitl/penguin_method_channel.dart'; import 'package:hmg_patient_app/uitl/translations_delegate_base.dart'; import 'package:hmg_patient_app/uitl/utils.dart'; @@ -967,7 +969,7 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { } }).catchError((err) { print(err); - GifLoaderDialogUtils.hideDialog(context); + GifLoaderDialogUtils.hideDialog(locator().navigatorKey.currentContext ?? context); err != null ?? AppToast.showErrorToast(message: err); }); getToDoCount(); @@ -1000,8 +1002,8 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { confirmMessage: res['ErrorEndUserMessage'], okText: "Update insurance", cancelText: "Continue as cash", - okFunction: () => {openUpdateInsurance()}, - cancelFunction: () => {continueAsCash(appo, false)}); + okFunction: () => {openUpdateInsurance(appo, appo.isLiveCareAppointment!)}, + cancelFunction: () => {continueAsCash(appo, appo.isLiveCareAppointment!)}); dialog.showAlertDialog(context); } }).catchError((err) { @@ -1010,9 +1012,28 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { }); } - void openUpdateInsurance() { - Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route r) => false); - Navigator.push(context, FadePage(page: InsuranceUpdate())); + void openUpdateInsurance(AppoitmentAllHistoryResultList appo, bool isLiveCareAppointment) { + DoctorsListService service = new DoctorsListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.sendPatientUpdateRequest().then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res["MessageStatus"] == 1) { + if (isLiveCareAppointment) { + getLiveCareAppointmentPatientShare(context, service, appo); + } else { + getPatientShare(context, appo); + } + // getToDoCount(); + } else { + Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route r) => false); + Navigator.push(context, FadePage(page: InsuranceUpdate())); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route r) => false); + Navigator.push(context, FadePage(page: InsuranceUpdate())); + }); } void continueAsCash(AppoitmentAllHistoryResultList appo, bool isLiveCareAppointment) { @@ -1071,8 +1092,8 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { confirmMessage: errorMsg, okText: TranslationBase.of(context).updateInsuranceText, cancelText: TranslationBase.of(context).continueCash, - okFunction: () => {openUpdateInsurance()}, - cancelFunction: () => {continueAsCash(appo, false)}); + okFunction: () => {openUpdateInsurance(appo, appo.isLiveCareAppointment!)}, + cancelFunction: () => {continueAsCash(appo, appo.isLiveCareAppointment!)}); dialog.showAlertDialog(context); } } @@ -1112,7 +1133,7 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { confirmMessage: errorMsg, okText: TranslationBase.of(context).updateInsuranceText, cancelText: TranslationBase.of(context).continueCash, - okFunction: () => {openUpdateInsurance()}, + okFunction: () => {openUpdateInsurance(appo, appo.isLiveCareAppointment!)}, cancelFunction: () => {continueAsCash(appo, true)}); dialog.showAlertDialog(context); } diff --git a/lib/pages/landing/fragments/offer_details_page.dart b/lib/pages/landing/fragments/offer_details_page.dart index 1b8a8de9..da17f891 100644 --- a/lib/pages/landing/fragments/offer_details_page.dart +++ b/lib/pages/landing/fragments/offer_details_page.dart @@ -76,15 +76,19 @@ class _OfferDetailsPageState extends State { child: Column( children: [ /// Banner - SvgPicture.asset( - "assets/images/svg/details_page_banner.svg", - height: 120, - fit: BoxFit.fill, - ), + projectViewModel.hisProjectOffers.first.projectArabic!.split("\$").length > 1 + ? SvgPicture.network( + projectViewModel.isArabic + ? projectViewModel.hisProjectOffers.first.projectArabic!.split("\$")[1].trim() + : projectViewModel.hisProjectOffers.first.projectEnglish!.split("\$")[1].trim(), + height: 120, + fit: BoxFit.cover, + ) + : SizedBox.shrink(), /// Arabic Offer Section Padding( - padding: const EdgeInsets.symmetric(horizontal: 24.0, vertical: 32.0), + padding: const EdgeInsets.symmetric(horizontal: 24.0, vertical: 12.0), child: Column( children: [ // Padding( @@ -142,9 +146,10 @@ class _OfferDetailsPageState extends State { style: TextStyle( fontSize: 22, fontWeight: FontWeight.bold, - color: Color(0xff008b4c), + // color: Color(0xff008b4c), ), ), + SizedBox(height: 12), Text( projectViewModel.isArabic ? projectViewModel.hisProjectOffers.first.descriptionArabic! : projectViewModel.hisProjectOffers.first.descriptionEnglish!, style: TextStyle( @@ -511,7 +516,8 @@ class _OfferDetailsPageState extends State { List projectsListLocal = []; projectViewModel.hisProjectOffers.forEach((project) { - projectsListLocal.add(new HospitalsModel(iD: project.projectId, name: project.projectEnglish, nameN: project.projectArabic, amountWithTax: project.amountWithTax)); + projectsListLocal.add( + new HospitalsModel(iD: project.projectId, name: project.projectEnglish!.split("\$")[0].trim(), nameN: project.projectArabic!.split("\$")[0].trim(), amountWithTax: project.amountWithTax)); }); showDialog( diff --git a/lib/pages/landing/widgets/services_view.dart b/lib/pages/landing/widgets/services_view.dart index c18a6b43..3524aaee 100644 --- a/lib/pages/landing/widgets/services_view.dart +++ b/lib/pages/landing/widgets/services_view.dart @@ -208,6 +208,10 @@ class ServicesView extends StatelessWidget { initPenguinSDK(int projectID) async { final bool permited = await AppPermission.askPenguinPermissions(); + NavigationClinicDetails data = NavigationClinicDetails(); + // data.clinicId = "49"; + data.patientId = projectViewModel.authenticatedUserObject.user.patientID.toString(); + data.projectId = projectID.toString(); if (!permited) { Map statuses = await [ Permission.location, @@ -216,7 +220,7 @@ class ServicesView extends StatelessWidget { Permission.bluetoothScan, Permission.activityRecognition, ].request().whenComplete(() { - PenguinMethodChannel().launch("penguin", projectViewModel.isArabic ? "ar" : "en", projectViewModel.authenticatedUserObject.user.patientID.toString()); + PenguinMethodChannel().launch("penguin", projectViewModel.isArabic ? "ar" : "en", projectViewModel.authenticatedUserObject.user.patientID.toString(), details: data); }); } } diff --git a/lib/pages/livecare/widgets/clinic_list.dart b/lib/pages/livecare/widgets/clinic_list.dart index 599b7df9..ae9bab81 100644 --- a/lib/pages/livecare/widgets/clinic_list.dart +++ b/lib/pages/livecare/widgets/clinic_list.dart @@ -239,8 +239,25 @@ class _clinic_listState extends State { } void openUpdateInsurance() { - Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route r) => false); - Navigator.push(context, FadePage(page: InsuranceUpdate())); + DoctorsListService service = new DoctorsListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.sendPatientUpdateRequest().then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res["MessageStatus"] == 1) { + startLiveCare(); + } else { + Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route r) => false); + Navigator.push(context, FadePage(page: InsuranceUpdate())); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route r) => false); + Navigator.push(context, FadePage(page: InsuranceUpdate())); + }); + + // Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route r) => false); + // Navigator.push(context, FadePage(page: InsuranceUpdate())); } showLiveCarePaymentDialog(GetERAppointmentFeesList getERAppointmentFeesList, int waitingTime) { diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index 0d3a8d52..b8445db2 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -845,32 +845,71 @@ class _ConfirmLogin extends State { appointmentRateViewModel .getIsLastAppointmentRatedList(projectViewModel.isArabic ? 1 : 2) .then((value) => { - GifLoaderDialogUtils.hideDialog(AppGlobal.context), - if (appointmentRateViewModel.isHaveAppointmentNotRate) - { - Navigator.pushAndRemoveUntil( - context, - FadePage( - page: RateAppointmentDoctor(), - ), - (r) => false) - } - else - { - Navigator.pushAndRemoveUntil( - context, - FadePage( - page: LandingPage(), - ), - (r) => false) - }, - insertIMEI() - }) + GifLoaderDialogUtils.hideDialog(AppGlobal.context), + if (appointmentRateViewModel.isHaveAppointmentNotRate) + { + Navigator.pushAndRemoveUntil( + context, + FadePage( + page: RateAppointmentDoctor(), + ), + (r) => false) + } + else + { + Navigator.pushAndRemoveUntil( + context, + FadePage( + page: LandingPage(), + ), + (r) => false) + }, + insertIMEI() + }) .catchError((err) { print(err); }); } + // goToHome() async { + // authenticatedUserObject.isLogin = true; + // appointmentRateViewModel.isLogin = true; + // projectViewModel.isLogin = true; + // projectViewModel.user = authenticatedUserObject.user; + // await authenticatedUserObject.getUser(getUser: true); + // + // // GifLoaderDialogUtils.hideDialog(context); + // getToDoCount(); + // checkIfIsInPatient(); + // // appointmentRateViewModel + // // .getIsLastAppointmentRatedList(projectViewModel.isArabic ? 1 : 2) + // // .then((value) => { + // // GifLoaderDialogUtils.hideDialog(AppGlobal.context), + // // if (appointmentRateViewModel.isHaveAppointmentNotRate) + // // { + // // Navigator.pushAndRemoveUntil( + // // context, + // // FadePage( + // // page: RateAppointmentDoctor(), + // // ), + // // (r) => false) + // // } + // // else + // // { + // Navigator.pushAndRemoveUntil( + // context, + // FadePage( + // page: LandingPage(), + // ), + // (r) => false); + // // }, + // insertIMEI(); + // // }) + // // .catchError((err) { + // // print(err); + // // }); + // } + loading(flag) { setState(() { isLoading = flag; diff --git a/lib/pages/login/user-login-agreement-page.dart b/lib/pages/login/user-login-agreement-page.dart index 35331569..a7bbafc5 100644 --- a/lib/pages/login/user-login-agreement-page.dart +++ b/lib/pages/login/user-login-agreement-page.dart @@ -777,34 +777,34 @@ class _UserLoginAgreementPageState extends State { // GifLoaderDialogUtils.hideDialog(context); getToDoCount(); checkIfIsInPatient(); - widget.appointmentRateViewModel - .getIsLastAppointmentRatedList(projectViewModel.isArabic ? 1 : 2) - .then((value) => { - GifLoaderDialogUtils.hideDialog(context), - if (widget.appointmentRateViewModel.isHaveAppointmentNotRate) - { - Navigator.pushAndRemoveUntil( - context, - FadePage( - page: RateAppointmentDoctor(), - ), - (r) => false) - } - else - { - GifLoaderDialogUtils.hideDialog(context), - Navigator.pushAndRemoveUntil( + // widget.appointmentRateViewModel + // .getIsLastAppointmentRatedList(projectViewModel.isArabic ? 1 : 2) + // .then((value) => { + // GifLoaderDialogUtils.hideDialog(context), + // if (widget.appointmentRateViewModel.isHaveAppointmentNotRate) + // { + // Navigator.pushAndRemoveUntil( + // context, + // FadePage( + // page: RateAppointmentDoctor(), + // ), + // (r) => false) + // } + // else + // { + // GifLoaderDialogUtils.hideDialog(context), + Navigator.pushAndRemoveUntil( context, FadePage( page: LandingPage(), ), - (r) => false) - }, - insertIMEI() - }) - .catchError((err) { - print(err); - }); + (r) => false); + // }, + insertIMEI(); + // }) + // .catchError((err) { + // print(err); + // }); } insertIMEI() { diff --git a/lib/pages/medical/balance/confirm_payment_page.dart b/lib/pages/medical/balance/confirm_payment_page.dart index 63a0c35b..0019fde0 100644 --- a/lib/pages/medical/balance/confirm_payment_page.dart +++ b/lib/pages/medical/balance/confirm_payment_page.dart @@ -355,7 +355,7 @@ class _ConfirmPaymentPageState extends State { }).catchError((err) { print(err); GifLoaderDialogUtils.hideDialog(context); - AppToast.showErrorToast(message: err); + AppToast.showErrorToast(message: err.toString()); }); } diff --git a/lib/pages/servicesPriceList/services_price_list.dart b/lib/pages/servicesPriceList/services_price_list.dart new file mode 100644 index 00000000..e6aff6c9 --- /dev/null +++ b/lib/pages/servicesPriceList/services_price_list.dart @@ -0,0 +1,168 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:hmg_patient_app/core/service/privilege_service.dart'; +import 'package:hmg_patient_app/core/viewModels/project_view_model.dart'; +import 'package:hmg_patient_app/locator.dart'; +import 'package:hmg_patient_app/theme/colors.dart'; +import 'package:hmg_patient_app/uitl/translations_delegate_base.dart'; +import 'package:hmg_patient_app/uitl/utils_new.dart'; +import 'package:hmg_patient_app/widgets/others/app_scaffold_widget.dart'; +import 'package:provider/provider.dart'; + +class ServicesPriceList extends StatelessWidget { + ServicesPriceList({super.key}); + + ProjectViewModel? projectViewModel; + PrivilegeService _privilegeService = locator(); + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + appBarTitle: TranslationBase.of(context).servicePriceList, + isShowAppBar: true, + showNewAppBar: true, + backgroundColor: Color(0xffF8F8F8), + showNewAppBarTitle: true, + showDropDown: false, + isShowDecPage: false, + body: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + children: [ + Container( + padding: EdgeInsets.all(16), + decoration: cardRadius(10), + child: Text( + TranslationBase.of(context).servicePriceListDesc, + style: TextStyle( + color: CustomColors.textColor, + fontSize: 12, + fontWeight: FontWeight.w500, + letterSpacing: -0.64, + fontFamily: projectViewModel!.isArabic ? 'Cairo' : 'Poppins', + ), + ), + ), + SizedBox(height: 16), + Container( + padding: EdgeInsets.all(16), + decoration: cardRadius(10), + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + TranslationBase.of(context).serviceName, + style: TextStyle( + color: CustomColors.textDarkColor, + fontSize: 16, + fontWeight: FontWeight.bold, + letterSpacing: -0.64, + ), + ), + Text( + TranslationBase.of(context).price, + style: TextStyle( + color: CustomColors.textDarkColor, + fontSize: 16, + fontWeight: FontWeight.bold, + letterSpacing: -0.64, + ), + ), + ], + ), + SizedBox(height: 8), + Divider( + height: 1, + color: CustomColors.black, + ), + SizedBox(height: 16), + + ListView.separated( + shrinkWrap: true, + padding: EdgeInsets.zero, + physics: NeverScrollableScrollPhysics(), + itemCount: _privilegeService.servicesPriceList.length, + separatorBuilder: (context, index) => + Padding( + padding: EdgeInsets.symmetric(vertical: 12), + child: Divider( + height: 1, + color: CustomColors.devider, + ), + ), + itemBuilder: (context, index) { + final service = _privilegeService.servicesPriceList[index]; + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: Text( + (projectViewModel!.isArabic ? service.nameAR ?? service.nameEN ?? '' : service.nameEN ?? service.nameAR ?? ''), + style: TextStyle( + color: CustomColors.textColor, + fontSize: 14, + fontWeight: FontWeight.bold, + letterSpacing: -0.64, + ), + ), + ), + Row( + children: [ + projectViewModel!.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + mWidth(6), + Text( + '${service.price ?? 0}', + style: TextStyle( + color: CustomColors.textDarkColor, + fontSize: 14, + fontWeight: FontWeight.bold, + letterSpacing: -0.64, + ), + ), + mWidth(6), + projectViewModel!.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), + ], + ), + ], + ), + ], + ); + }, + ), + ], + )), + + SizedBox(height: 16), + Container( + padding: EdgeInsets.all(16), + decoration: cardRadius(10), + child: Row( + children: [ + Expanded( + child: Text( + TranslationBase.of(context).servicePriceListRights, + maxLines: 2, + style: TextStyle( + color: CustomColors.textColor, + fontSize: 12, + fontWeight: FontWeight.w500, + letterSpacing: -0.64, + ), + ), + ), + ], + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/services/appointment_services/GetDoctorsList.dart b/lib/services/appointment_services/GetDoctorsList.dart index f8d8c1ee..f7b6f401 100644 --- a/lib/services/appointment_services/GetDoctorsList.dart +++ b/lib/services/appointment_services/GetDoctorsList.dart @@ -1931,6 +1931,19 @@ class DoctorsListService extends BaseService { return Future.value(localRes); } + Future sendPatientUpdateRequest() async { + Map request; + request = {}; + dynamic localRes; + await baseAppClient.post(SEND_PATIENT_IMMEDIATE_UPDATE_INSURANCE_REQUEST, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + + return Future.value(localRes); + } + Future getAncillaryOrders() async { Map body = Map(); diff --git a/lib/splashPage.dart b/lib/splashPage.dart index 9319ecc6..8fe39a48 100644 --- a/lib/splashPage.dart +++ b/lib/splashPage.dart @@ -51,6 +51,7 @@ class _SplashScreenState extends State { LocalNotification.init(onNotificationClick: (payload) {}); // LocalNotification.getInstance().showNow(title: "Payload", subtitle: "Subtitle", payload: "Payload"); if (!_privilegeService.hasError) { + _privilegeService.getServicesPriceList(); Navigator.of(context).pushReplacement( MaterialPageRoute( builder: (BuildContext context) => LandingPage(), diff --git a/lib/uitl/penguin_method_channel.dart b/lib/uitl/penguin_method_channel.dart index 50a642a7..3c3402b2 100644 --- a/lib/uitl/penguin_method_channel.dart +++ b/lib/uitl/penguin_method_channel.dart @@ -13,12 +13,12 @@ class PenguinMethodChannel { await _channel.invokeMethod('launchPenguin', { "storyboardName": storyboardName, "baseURL": "https://prod.hmg.nav.penguinin.com", - // "dataURL": "https://hmg.nav.penguinin.com", - // "positionURL": "https://hmg.nav.penguinin.com", - // "dataURL": "https://hmg-v33.local.penguinin.com", - // "positionURL": "https://hmg-v33.local.penguinin.com", "dataURL": "https://prod.hmg.nav.penguinin.com", "positionURL": "https://prod.hmg.nav.penguinin.com", + + // "baseURL": "https://penguinuat.hmg.com", + // "dataURL": "https://penguinuat.hmg.com", + // "positionURL": "https://penguinuat.hmg.com", "dataServiceName": "api", "positionServiceName": "pe", "clientID": "HMG", @@ -30,11 +30,12 @@ class PenguinMethodChannel { "isEnableReportIssue": true, "languageCode": languageCode, "clientKey": "UGVuZ3VpbklOX1Blbk5hdl9QSUY=", - "mapBoxKey": "sk.eyJ1IjoicndhaWQiLCJhIjoiY2x6NWo0bTMzMWZodzJrcGZpemYzc3Z4dSJ9.uSSZuwNSGCcCdPAiORECmg", - "clinicID": details?.clinicId ?? "", + "mapBoxKey": "pk.eyJ1IjoicndhaWQiLCJhIjoiY2x5cGo4aHNjMGNsbTJyc2djempobGQxaSJ9.RCaC6WrUt4A4YnZNfxnONQ", + // "clinicID": details?.clinicId ?? "", + "clinicID": "", // "clinicID": "108", // 46 ,49, 133 "patientID": details?.patientId ?? "", - "projectID": details?.projectId ?? "", + "projectID": int.parse(details?.projectId ?? "-1"), "loaderImage": image, }); } on PlatformException catch (e) { diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 72db3b20..ab1b77a8 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -3531,6 +3531,17 @@ class TranslationBase { String get low => localizedValues["low"][locale.languageCode]; String get verifyWithBiometric => localizedValues["verify-with-biometric"][locale.languageCode]; String get medicationInstructions => localizedValues["medicationInstructions"][locale.languageCode]; + String get servicePriceList => localizedValues["servicePriceList"][locale.languageCode]; + + String get servicePriceListDesc => localizedValues["servicePriceListDesc"][locale.languageCode]; + String get servicePriceList1 => localizedValues["servicePriceList1"][locale.languageCode]; + String get servicePriceList2 => localizedValues["servicePriceList2"][locale.languageCode]; + String get servicePriceList3 => localizedValues["servicePriceList3"][locale.languageCode]; + String get servicePriceList4 => localizedValues["servicePriceList4"][locale.languageCode]; + String get servicePriceList5 => localizedValues["servicePriceList5"][locale.languageCode]; + String get servicePriceList6 => localizedValues["servicePriceList6"][locale.languageCode]; + String get servicePriceList7 => localizedValues["servicePriceList7"][locale.languageCode]; + String get servicePriceListRights => localizedValues["servicePriceListRights"][locale.languageCode]; String getTranslation(String label) { switch (label) { diff --git a/lib/uitl/utils.dart b/lib/uitl/utils.dart index 71d9a3c2..f7eea46e 100644 --- a/lib/uitl/utils.dart +++ b/lib/uitl/utils.dart @@ -71,7 +71,7 @@ class Utils { { "Desciption": "Sahafa Hospital", "DesciptionN": "مستشفى الصحافة", - "ID": 130, + "ID": 1, // Campus ID "LegalName": "Sahafa Hospital", "LegalNameN": "مستشفى الصحافة", "Name": "Sahafa Hospital", @@ -88,7 +88,28 @@ class Utils { "MainProjectID": 130, "ProjectOutSA": false, "UsingInDoctorApp": false - } + }, + // { + // "Desciption": "Jeddah Fayhaa Hospital", + // "DesciptionN": "مستشفى جدة الفيحاء", + // "ID": 3, // Campus ID + // "LegalName": "Jeddah Fayhaa Hospital", + // "LegalNameN": "مستشفى جدة الفيحاء", + // "Name": "Jeddah Fayhaa Hospital", + // "NameN": "مستشفى جدة الفيحاء", + // "PhoneNumber": "+966115222222", + // "SetupID": "013311", + // "DistanceInKilometers": 0, + // "HasVida3": false, + // "IsActive": true, + // "IsHmg": true, + // "IsVidaPlus": false, + // "Latitude": "24.8113774", + // "Longitude": "46.6239813", + // "MainProjectID": 130, + // "ProjectOutSA": false, + // "UsingInDoctorApp": false + // } ]; ///show custom Error Toast diff --git a/lib/widgets/data_display/medical/LabResult/newUI/LabItem.dart b/lib/widgets/data_display/medical/LabResult/newUI/LabItem.dart index c7a2e1a0..fdff2f94 100644 --- a/lib/widgets/data_display/medical/LabResult/newUI/LabItem.dart +++ b/lib/widgets/data_display/medical/LabResult/newUI/LabItem.dart @@ -134,8 +134,6 @@ class _LabItemState extends State { } openFlowChart(BuildContext context, String procedure) { - print('openFlowChart: the bottom sheet is showing'); - showModalBottomSheet( backgroundColor: Colors.white, isScrollControlled: true, diff --git a/lib/widgets/drawer/app_drawer_widget.dart b/lib/widgets/drawer/app_drawer_widget.dart index 193c48c1..af59e66b 100644 --- a/lib/widgets/drawer/app_drawer_widget.dart +++ b/lib/widgets/drawer/app_drawer_widget.dart @@ -22,6 +22,7 @@ import 'package:hmg_patient_app/pages/DrawerPages/notifications/notifications_pa import 'package:hmg_patient_app/pages/landing/landing_page.dart'; import 'package:hmg_patient_app/pages/livecare/livecare_home.dart'; import 'package:hmg_patient_app/pages/rateAppointment/rate_appointment_doctor.dart'; +import 'package:hmg_patient_app/pages/servicesPriceList/services_price_list.dart'; import 'package:hmg_patient_app/routes.dart'; import 'package:hmg_patient_app/services/authentication/auth_provider.dart'; import 'package:hmg_patient_app/services/clinic_services/get_clinic_service.dart'; @@ -467,6 +468,13 @@ class _AppDrawerState extends State { login(); }, ), + projectProvider!.havePrivilege(113) ? InkWell( + child: DrawerItem(TranslationBase.of(context).servicePriceList, Icons.bookmark_added_sharp, letterSpacing: -0.84, fontSize: 14, bottomLine: false), + onTap: () { + Navigator.pop(context); + Navigator.of(context).push(FadePage(page: ServicesPriceList())); + }, + ) : SizedBox.shrink(), InkWell( child: DrawerItem(TranslationBase.of(context).privacyPolicy, Icons.web, letterSpacing: -0.84, fontSize: 14, bottomLine: false), onTap: () { @@ -481,7 +489,7 @@ class _AppDrawerState extends State { onTap: () { Navigator.of(context).push(FadePage(page: UserAgreementPage())); }, - ) + ), ], )) ], @@ -781,35 +789,44 @@ class _AppDrawerState extends State { checkIfIsInPatient(context); - appointmentRateViewModel - .getIsLastAppointmentRatedList(languageID) - .then((value) => { - getToDoCount(), - //Utils.hideProgressDialog(), - if (appointmentRateViewModel.isHaveAppointmentNotRate) - { - Navigator.pushAndRemoveUntil( - context, - FadePage( - page: RateAppointmentDoctor(), - ), - (r) => false) - } - else - { - Navigator.pushAndRemoveUntil( - context, - FadePage( - page: LandingPage(), - ), - (r) => false) - } - }) - .catchError((err) { - print(err); - //Utils.hideProgressDialog(); - // GifLoaderDialogUtils.hideDialog(context); - }); + Navigator.pushAndRemoveUntil( + context, + FadePage( + page: LandingPage(), + ), + (r) => false); + + // Commented as per the CR 18819 + + // appointmentRateViewModel + // .getIsLastAppointmentRatedList(languageID) + // .then((value) => { + // getToDoCount(), + // //Utils.hideProgressDialog(), + // if (appointmentRateViewModel.isHaveAppointmentNotRate) + // { + // Navigator.pushAndRemoveUntil( + // context, + // FadePage( + // page: RateAppointmentDoctor(), + // ), + // (r) => false) + // } + // else + // { + // Navigator.pushAndRemoveUntil( + // context, + // FadePage( + // page: LandingPage(), + // ), + // (r) => false) + // } + // }) + // .catchError((err) { + // print(err); + // //Utils.hideProgressDialog(); + // // GifLoaderDialogUtils.hideDialog(context); + // }); } openAppReviewDialog() async { diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index 1ebce592..d49c65cc 100644 --- a/lib/widgets/in_app_browser/InAppBrowser.dart +++ b/lib/widgets/in_app_browser/InAppBrowser.dart @@ -38,7 +38,7 @@ class MyInAppBrowser extends InAppBrowser { static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL LIVE // static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL UAT - // static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT + // static String SERVICE_URL = 'https://uat.hmgwebservices.com/HMGPayment/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE @@ -345,6 +345,7 @@ class MyInAppBrowser extends InAppBrowser { form = form.replaceFirst('PAYMENT_OPTION_VALUE', paymentMethod); form = form.replaceFirst('LANG_VALUE', currentLanguageID); form = form.replaceFirst('SERVICE_URL_VALUE', "https://mdlaboratories.com/tamaralive/Home/Checkout"); + // form = form.replaceFirst('SERVICE_URL_VALUE', "https://epharmacy.hmg.com/tamara/Home/Checkout"); form = form.replaceFirst('INSTALLMENTS_VALUE', installments); form = form.replaceFirst('CUSTNATIONALID_VALUE', authUser.patientIdentificationNo!); diff --git a/pubspec.yaml b/pubspec.yaml index 9b445b44..695de2b4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,8 +1,8 @@ name: hmg_patient_app description: A new Flutter application. -#version: 4.6.019+1 -version: 4.6.0979+40500979 +#version: 4.6.030+1 +version: 4.6.0984+40500984 environment: # sdk: ">=3.0.0 <3.13.0" @@ -225,9 +225,9 @@ flutter: # - asset: assets/fonts/ar/Cairo-Light/Cairo-Light.eot # - asset: assets/fonts/ar/Cairo-Light/Cairo-Light.otf - asset: assets/fonts/ar/Cairo-Regular/Cairo-Regular.ttf - # - asset: assets/fonts/ar/Cairo-Light/Cairo-Light.woff weight: 400 - + - asset: assets/fonts/ar/Cairo-Regular/Cairo-Regular.ttf + weight: 500 - asset: assets/fonts/ar/Cairo-Bold/Cairo-Bold.eot - asset: assets/fonts/ar/Cairo-Bold/Cairo-Bold.otf - asset: assets/fonts/ar/Cairo-Bold/Cairo-Bold.ttf