Conflicts:
	lib/locator.dart
	lib/pages/DrawerPages/family/my-family.dart
	lib/pages/login/confirm-login.dart
	lib/pages/medical/medical_profile_page.dart
	lib/pages/medical/reports/report_home_page.dart
	lib/widgets/bottom_navigation/bottom_nav_bar.dart
	lib/widgets/drawer/app_drawer_widget.dart
merge-requests/224/merge
Mohammad Aljammal 4 years ago
commit 9dfd8a71dc

@ -26,6 +26,12 @@ apply plugin: 'kotlin-android'
apply plugin: 'com.google.gms.google-services'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
compileSdkVersion 30
@ -34,7 +40,9 @@ android {
}
lintOptions {
disable 'InvalidPackage'
// disable 'InvalidPackage'
checkReleaseBuilds false
abortOnError false
}
defaultConfig {
@ -48,21 +56,35 @@ android {
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
debug {}
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
staging {
// Specifies a sorted list of fallback build types that the
// plugin should try to use when a dependency does not include a
// "staging" build type. You may specify as many fallbacks as you
// like, and the plugin selects the first build type that's
// available in the dependency.
matchingFallbacks = ['debug', 'qa', 'release']
// signingConfig signingConfigs.debug
// useProguard true
// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfigs.release
}
// staging {
// // Specifies a sorted list of fallback build types that the
// // plugin should try to use when a dependency does not include a
// // "staging" build type. You may specify as many fallbacks as you
// // like, and the plugin selects the first build type that's
// // available in the dependency.
// matchingFallbacks = ['debug', 'qa', 'release']
// }
}
}

@ -1,39 +1,37 @@
{
"project_info": {
"project_number": "815750722565",
"firebase_url": "https://api-project-815750722565.firebaseio.com",
"project_id": "api-project-815750722565",
"storage_bucket": "api-project-815750722565.appspot.com"
"project_number": "864393916058",
"firebase_url": "https://diplomaticquarter-d2385.firebaseio.com",
"project_id": "diplomaticquarter-d2385",
"storage_bucket": "diplomaticquarter-d2385.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:815750722565:android:62281cd3e5df4063",
"mobilesdk_app_id": "1:864393916058:android:5b5a65cd6d8c18b4b97923",
"android_client_info": {
"package_name": "com.cloud.diplomaticquarterapp"
}
},
"oauth_client": [
{
"client_id": "815750722565-3a0gc7neins0eoahdrimrfksk0sqice8.apps.googleusercontent.com",
"client_id": "864393916058-tphjrn8j39ntevt32ekcvmll8aue7qql.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyDUfg6AKM1-00WyzpvLImUBC46wFrq9-qw"
"current_key": "AIzaSyBdV3mos1BPhUzNKCj2KANJtiO3o2zh9IM"
}
],
"services": {
"analytics_service": {
"status": 1
},
"appinvite_service": {
"status": 1,
"other_platform_oauth_client": []
},
"ads_service": {
"status": 2
"other_platform_oauth_client": [
{
"client_id": "864393916058-tphjrn8j39ntevt32ekcvmll8aue7qql.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}

@ -24,7 +24,7 @@
android:name="io.flutter.app.FlutterApplication"
android:icon="@mipmap/ic_launcher"
android:usesCleartextTraffic="true"
android:label="diplomaticquarterapp">
android:label="Dr. Alhabib MC">
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 544 B

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 442 B

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 721 B

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 11 KiB

@ -6,7 +6,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
classpath 'com.android.tools.build:gradle:3.6.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.2'
}

@ -1,6 +1,6 @@
#Thu Sep 03 16:26:30 EEST 2020
#Wed Nov 25 14:25:50 AST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip

@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>8.0</string>
<string>9.0</string>
</dict>
</plist>

@ -1,36 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CLIENT_ID</key>
<string>864393916058-ekeb4s8tgfo58dutv0l54399t7ivr06r.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.864393916058-ekeb4s8tgfo58dutv0l54399t7ivr06r</string>
<key>API_KEY</key>
<string>AIzaSyA_6ayGCk4fly7o7eTVBrj9kuHBYHMAOfs</string>
<key>GCM_SENDER_ID</key>
<string>864393916058</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.cloud.diplomaticquarterapp</string>
<key>PROJECT_ID</key>
<string>diplomaticquarter-d2385</string>
<key>STORAGE_BUCKET</key>
<string>diplomaticquarter-d2385.appspot.com</string>
<key>IS_ADS_ENABLED</key>
<false></false>
<key>IS_ANALYTICS_ENABLED</key>
<false></false>
<key>IS_APPINVITE_ENABLED</key>
<true></true>
<key>IS_GCM_ENABLED</key>
<true></true>
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>1:864393916058:ios:13f787bbfe6051f8b97923</string>
<key>DATABASE_URL</key>
<string>https://diplomaticquarter-d2385.firebaseio.com</string>
</dict>
</plist>

@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '11.0'
platform :ios, '11.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
@ -10,82 +10,32 @@ project 'Runner', {
'Release' => :release,
}
# pod 'FBSDKCoreKit'
# pod 'FBSDKLoginKit'
def parse_KV_file(file, separator='=')
file_abs_path = File.expand_path(file)
if !File.exists? file_abs_path
return [];
def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
generated_key_values = {}
skip_line_start_symbols = ["#", "/"]
File.foreach(file_abs_path) do |line|
next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
plugin = line.split(pattern=separator)
if plugin.length == 2
podname = plugin[0].strip()
path = plugin[1].strip()
podpath = File.expand_path("#{path}", file_abs_path)
generated_key_values[podname] = podpath
else
puts "Invalid plugin specification: #{line}"
end
File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
generated_key_values
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
flutter_ios_podfile_setup
target 'Runner' do
use_frameworks!
use_modular_headers!
# Flutter Pod
copied_flutter_dir = File.join(__dir__, 'Flutter')
copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework')
copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec')
unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path)
# Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet.
# That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration.
# CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist.
generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig')
unless File.exist?(generated_xcode_build_settings_path)
raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path)
cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR'];
unless File.exist?(copied_framework_path)
FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir)
end
unless File.exist?(copied_podspec_path)
FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir)
end
end
# Keep pod path relative so it can be checked into Podfile.lock.
pod 'Flutter', :path => 'Flutter'
# Plugin Pods
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.
system('rm -rf .symlinks')
system('mkdir -p .symlinks/plugins')
plugin_pods = parse_KV_file('../.flutter-plugins')
plugin_pods.each do |name, path|
symlink = File.join('.symlinks', 'plugins', name)
File.symlink(path, symlink)
pod name, :path => File.join(symlink, 'ios')
end
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
flutter_additional_ios_build_settings(target)
end
end
end

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
LastUpgradeVersion = "1200"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@ -27,8 +27,6 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
@ -38,8 +36,8 @@
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
@ -61,8 +59,6 @@
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Profile"

@ -2,6 +2,8 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DisableBuildSystemDeprecationWarning</key>
<true/>
<key>PreviewsEnabled</key>
<false/>
</dict>

@ -1,6 +1,5 @@
import UIKit
import Flutter
import GoogleMaps
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
@ -8,7 +7,6 @@ import GoogleMaps
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GMSServices.provideAPIKey("AIzaSyCiiJiHkocPbcziHt9O8rGWavDrxHRQys8")
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}

@ -1,122 +1 @@
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@3x.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@1x.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@1x.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@1x.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "Icon-App-83.5x83.5@2x.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "Icon-App-1024x1024@1x.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
{"images":[{"size":"60x60","expected-size":"180","filename":"180.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"40x40","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"60x60","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"57x57","expected-size":"57","filename":"57.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"87","filename":"87.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"57x57","expected-size":"114","filename":"114.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"60","filename":"60.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"1024x1024","filename":"1024.png","expected-size":"1024","idiom":"ios-marketing","folder":"Assets.xcassets/AppIcon.appiconset/","scale":"1x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"72x72","expected-size":"72","filename":"72.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"76x76","expected-size":"152","filename":"152.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"50x50","expected-size":"100","filename":"100.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"76x76","expected-size":"76","filename":"76.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"50x50","expected-size":"50","filename":"50.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"72x72","expected-size":"144","filename":"144.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"40x40","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"83.5x83.5","expected-size":"167","filename":"167.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"20x20","expected-size":"20","filename":"20.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"}]}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 564 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

@ -1,23 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "LaunchImage.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 B

@ -1,5 +0,0 @@
# Launch Screen Assets
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.

@ -1,10 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<scenes>
<!--Flutter View Controller-->
@ -16,14 +14,13 @@
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="96" y="-21"/>
</scene>
</scenes>
</document>

@ -1,36 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CLIENT_ID</key>
<string>864393916058-ekeb4s8tgfo58dutv0l54399t7ivr06r.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.864393916058-ekeb4s8tgfo58dutv0l54399t7ivr06r</string>
<key>API_KEY</key>
<string>AIzaSyA_6ayGCk4fly7o7eTVBrj9kuHBYHMAOfs</string>
<key>GCM_SENDER_ID</key>
<string>864393916058</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.cloud.diplomaticquarterapp</string>
<key>PROJECT_ID</key>
<string>diplomaticquarter-d2385</string>
<key>STORAGE_BUCKET</key>
<string>diplomaticquarter-d2385.appspot.com</string>
<key>IS_ADS_ENABLED</key>
<false></false>
<key>IS_ANALYTICS_ENABLED</key>
<false></false>
<key>IS_APPINVITE_ENABLED</key>
<true></true>
<key>IS_GCM_ENABLED</key>
<true></true>
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>1:864393916058:ios:13f787bbfe6051f8b97923</string>
<key>DATABASE_URL</key>
<string>https://diplomaticquarter-d2385.firebaseio.com</string>
</dict>
</plist>

@ -4,6 +4,8 @@
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>Dr. Alhabib MC</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
@ -11,7 +13,7 @@
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>diplomaticquarterapp</string>
<string>DiplomaticQuarter</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
@ -22,27 +24,47 @@
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>io.flutter.embedded_views_preview</key>
<true/>
<key>NSBluetoothAlwaysUsageDescription</key>
<string>This App requires access to Bluetooth to connect blood pressure &amp; blood sugar devices with the app to analyze the data.</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>This App requires access to Bluetooth to connect blood pressure &amp; blood sugar devices with the app to analyze the data.</string>
<key>NSCalendarsUsageDescription</key>
<string>This app requires calendar access to set reminders for Virtual &amp; Normal Appointments.</string>
<key>NSCameraUsageDescription</key>
<string>This app requires camera access to enable virtual consultation between patient &amp; doctor</string>
<key>NSContactsUsageDescription</key>
<string>This app requires contacts access to show incoming virtual consultation request.</string>
<key>NSFaceIDUsageDescription</key>
<string>This app requires Face ID to allow biometric authentication for app login.</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>This App requires access to your location to show the nearest hospitals &amp; ER Locations from your location.</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>This App requires access to your location to show the nearest hospitals from your location.</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>This App requires access to your location to show the nearest hospitals from your location.</string>
<key>NSMicrophoneUsageDescription</key>
<string>This app requires microphone access to enable virtual consultation between patient &amp; doctor</string>
<key>NSMotionUsageDescription</key>
<string>This app requires motion detection access to function properly.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>This app requires photo library access to select image as document &amp; upload it.</string>
<key>NSRemindersUsageDescription</key>
<string>This app requires calendar access to set reminders for Virtual &amp; Normal Appointments.</string>
<key>NSSpeechRecognitionUsageDescription</key>
<string>This app requires access to speech recognition to identify which words are spoken into the microphone.</string>
<key>NSAppleMusicUsageDescription</key>
<string>Required usage description for a Flutter dependency</string>
<key>UIBackgroundModes</key>
<array>
<string>remote-notification</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>NSMicrophoneUsageDescription</key>
<string>Need microphone access for uploading videos</string>
<key>NSCameraUsageDescription</key>
<string>Need camera access for uploading images</string>
<key>NSLocationUsageDescription</key>
<string>Need location access for updating nearby friends</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>This app will use your location to show cool stuffs near you.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Need photo library access for uploading images</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
@ -53,5 +75,7 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>io.flutter.embedded_views_preview</key>
<true/>
</dict>
</plist>

@ -1,4 +1,4 @@
storePassword=HmGsa123
keyPassword=HmGsa123
keyAlias=DQKey
keyAlias=key
storeFile=DQKey.jks

@ -6,15 +6,21 @@ import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart';
const MAX_SMALL_SCREEN = 660;
const BASE_URL = 'https://uat.hmgwebservices.com/';
// const BASE_URL = 'https://hmgwebservices.com/';
// const BASE_URL = 'https://uat.hmgwebservices.com/';
const BASE_URL = 'https://hmgwebservices.com/';
const GET_PROJECT = 'Services/Lists.svc/REST/GetProject';
//weather
const WEATHER_INDICATOR = 'Services/Weather.svc/REST/GetCityInfo';
///Doctor
const GET_MY_DOCTOR =
'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
const GET_DOCTOR_PROFILE = 'Services/Doctors.svc/REST/GetDocProfiles';
const GET_DOCTOR_RATING_NOTES =
'Services/Doctors.svc/REST/dr_GetNotesDoctorRating';
const GET_DOCTOR_RATING_DETAILS =
'Services/Doctors.svc/REST/dr_GetDoctorRatingDetails';
const GET_DOCTOR_RATING = 'Services/Doctors.svc/REST/dr_GetAvgDoctorRating';
///Prescriptions
@ -254,7 +260,7 @@ const PATIENT_TYPE = 1;
const PATIENT_TYPE_ID = 1;
var DEVICE_TOKEN = "";
var DeviceTypeID = Platform.isIOS ? 1 : 2;
const LANGUAGE_ID = 2;
const LANGUAGE_ID = 1;
const GET_PHARMCY_ITEMS = "Services/Lists.svc/REST/GetPharmcyItems_Region";
const GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList";
const GET_PAtIENTS_INSURANCE =
@ -262,8 +268,7 @@ const GET_PAtIENTS_INSURANCE =
const GET_PAtIENTS_INSURANCE_UPDATED =
"Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory";
const INSURANCE_DETAILS =
"Services/Patients.svc/REST/Get_InsuranceCheckList";
const INSURANCE_DETAILS = "Services/Patients.svc/REST/Get_InsuranceCheckList";
const GET_VACCINES = "Services/Patients.svc/REST/GetDoneVaccinesByPatientID";
const GET_VACCINES_EMAIL = "Services/Notifications.svc/REST/SendVaccinesEmail";
@ -377,6 +382,16 @@ const PUSH_NOTIFICATION_GET_ALL_NOTIFICATIONS =
'Services/MobileNotifications.svc/REST/PushNotification_GetAllNotifications';
const PUSH_NOTIFICATION_SET_MESSAGES_FROM_POOL_AS_READ =
'Services/MobileNotifications.svc/REST/PushNotification_SetMessagesFromPoolAsRead';
const GET_PATIENT_ALL_PRES_ORD= 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const PATIENT_ER_INSERT_PRES_ORDER= 'Services/Patients.svc/REST/PatientER_InsertPresOrder';
// External API
const ADD_ADDRESS_INFO= "https://mdlaboratories.com/exacartapi/api/addcustomeraddress";
const GET_CUSTOMER_ADDRESSES= "https://mdlaboratories.com/exacartapi/api/Customers/";
const GET_CUSTOMER_INFO = "https://mdlaboratories.com/exacartapi/api/VerifyCustomer";
const TIMER_MIN = 10;
const GOOGLE_API_KEY = "AIzaSyCmevVlr2Bh-c8W1VUzo8gt8JRY7n5PANw";

@ -111,10 +111,7 @@ const Map localizedValues = {
'login': {'en': 'Login', 'ar': 'تسجيل الدخول'},
'loginregister': {'en': 'Login / Register', 'ar': 'تسجيل الدخول'},
'poweredBy': {'en': 'Powered By', 'ar': 'مشغل بواسطة'},
"welcome": {
"en": "Welcome",
"ar": "مرحبا"
},
"welcome": {"en": "Welcome", "ar": "مرحبا"},
"welcome_text": {
"en": "Dr. Sulaiman Al Habib Mobile Application",
"ar": "الدكتور سليمان الحبيب لتطبيقات الهاتف المتحرك"
@ -130,12 +127,11 @@ const Map localizedValues = {
"ar": "اختر من الخيارات أدناه لتسجيل الدخول إلى ملفك الطبي."
},
"registernow": {"en": "Register Now", "ar": "تسجيل الان"},
"nationalID": { "en": "Enter the Identification Number",
"ar": "أدخل رقم الهوية الوطنية او الاقامة"},
"national-id": {
"en": "National ID",
"ar": "رقم الهوية"
"nationalID": {
"en": "Enter the Identification Number",
"ar": "أدخل رقم الهوية الوطنية او الاقامة"
},
"national-id": {"en": "National ID", "ar": "رقم الهوية"},
"fileNo": {"en": "File Number", "ar": "رقم الملف"},
"fileno": {"en": "File No", "ar": "رقم الملف"},
"forgotFileNo": {"en": "Forgot file Number?", "ar": "نسيت رقم الملف الطبي؟"},
@ -191,8 +187,8 @@ const Map localizedValues = {
'ar': 'الرجائ ادخال اسم الدواء'
},
"verification_message": {
"en": "Please enter verification code",
"ar": "الرجاء إدخال رمز التحقق"
"en": "Please enter the Verification Code sent to",
"ar": "الرجاء ادخال رمز التحقق الذي تم إرساله إلى"
},
"validation_message": {
"en": "The verification code expires in",
@ -526,11 +522,11 @@ const Map localizedValues = {
"PaymentOnline": {"en": "Service", "ar": "الالكتروني"},
"OnlineCheckIn": {"en": "Online Check-In", "ar": "مدفوعات معلقة"},
"MyBalances": {"en": "My Balances", "ar": "رصيدي"},
"BalanceAmount": {"en": "Balance Amount", "ar": "رصيدالحساب"},
"TotalBalance": {"en": "Total Balance", "ar": "الرصيد الكلي"},
"BalanceAmount": { "en": "Wallet Amount", "ar": "مبلغ المحفظة"},
"TotalBalance": { "en": "Total Amount", "ar": "المبلغ الإجمالي"},
"CreateAdvancedPayment": {
"en": "Create Advanced Payment",
"ar": "إنشاء دفعة مقدمة"
"en": "Recharge Wallet",
"ar": "إعادة شحن المحفظة"
},
"AdvancePayment": {"en": "Advance Payment", "ar": "الدفع مقدما"},
"AdvancePaymentLabel": {
@ -720,6 +716,9 @@ const Map localizedValues = {
"drag-point": {
"en": "Drag point to change your age",
"ar": "اسحب لتغيير عمرك"
},"HHCNotAuthMsg": {
"en": "This service provides a set of home health care services, continuous and comprehensive follow-up in their places of residence for those who cannot access health facilities, such as (laboratory analyzes - radiology - vaccinations - physical therapy), etc.",
"ar": "من خلال هذه الخدمة يمكنك طلب مجموعة من الفحوصات التي تساعدك وتساعد طبيبك في فهم حالتك الصحية الحالية ومن ثم تحديد المخاطر المحتملة"
},
"email": {"en": "Email", "ar": "البريد الالكتروني"},
"Book": {"en": "Book", "ar": "احجز"},
@ -909,8 +908,14 @@ const Map localizedValues = {
"LiveChat": {"en": "Live Chat", "ar": "محادثة مباشرة"},
"Service": {"en": "Service", "ar": "خدمة"},
"HMGServiceLabel": {"en": "HMG Service", 'ar': 'خدمات الحبيب'},
"HealthWeatherIndicators": {"en": "Health Weather Indicators", 'ar': ' مؤشرات الطقس الصحية '},
"HealthTipsBasedOnCurrentWeather": {"en": "Health Tips Based On Current Weather", 'ar': ' نصائح صحية على أساس الطقس الحالي '},
"HealthWeatherIndicators": {
"en": "Health Weather Indicators",
'ar': ' مؤشرات الطقس الصحية '
},
"HealthTipsBasedOnCurrentWeather": {
"en": "Health Tips Based On Current Weather",
'ar': ' نصائح صحية على أساس الطقس الحالي '
},
"MoreDetails": {"en": "More details", "ar": " المزيد من التفاصيل "},
"SendCopy": {"en": "Send Copy", "ar": "ارسال نسخة"},
"ResendOrder": {"en": "Resend order & deliver", "ar": "إعادة طلب و توصيل"},
@ -919,154 +924,281 @@ const Map localizedValues = {
"Average": {"en": "Average", "ar": "المعدل"},
"DailyDoses": {"en": "Daily Doses", "ar": "جرعات يومية"},
"Period": {"en": "Period", "ar": "الفترة"},
"cm": {
"en": "CM",
"ar": "سم"
"cm": {"en": "CM", "ar": "سم"},
"kg": {"en": "kg", "ar": "كجم"},
"mass": {"en": "Mass", "ar": "كتلة"},
"temp-c": {"en": "°C", "ar": "°س"},
"bpm": {"en": "bpm", "ar": "نبضة"},
"respiration-signs": {"en": "Respiration", "ar": "تنفس"},
"sys-dias": {"en": "SBP/DBP", "ar": "إنقباض/إنبساط"},
"body": {"en": "Body \n Mass", "ar": "كتلة\nالجسم"},
"feedback": {"en": "Feedback", "ar": "رأيك يهمنا"},
"send": {"en": "Send", "ar": "أرسل"},
"status": {"en": "Status", "ar": "الحالة"},
"like-to-hear": {
"en":
"We would love to hear the feedback, concerns on healthcare services and eServices experience. Please use the below form",
"ar":
"يسعدنا سماع ملاحظاتك حول خدمات الرعاية الصحية والخدمات الإلكترونية. يرجى تعبئة الحقول المطلوبة"
},
"kg": {
"en": "kg",
"ar": "كجم"
"subject": {"en": "Subject", "ar": "الموضوع"},
"message": {"en": "Message", "ar": "رسالة"},
"empty-subject": {
"en": "Please enter the subject",
"ar": "يرجى ادخال الموضوع"
},
"mass": {
"en": "Mass",
"ar": "كتلة"
"empty-message": {"en": "Please enter message", "ar": "يرجى ادخال الموضوع"},
"select-attachment": {"en": "Select Attachment", "ar": "إختر المرفق"},
"complain-appo": {"en": "Complaint for appointment", "ar": "شكوى على موعد"},
"complain-without-appo": {
"en": "Complaint without appointment",
"ar": "شكوى بدون موعد"
},
"temp-c": {
"en": "°C",
"ar": "°س"
"question": {"en": "Question", "ar": "سؤال"},
"message-type": {"en": "Message Type", "ar": "نوع الرسالة"},
"compliment": {"en": "compliment", "ar": "ثناء"},
"suggestion": {"en": "Suggestion", "ar": "إقتراح"},
"your-feedback": {"en": "Your feedback was sent", "ar": "إقتراح"},
"select-part": {
"en": "Please select the part that complain about",
"ar": "يرجى تحديد الجزء الذي تشكو منه"
},
"bpm": {
"en": "bpm",
"ar": "نبضة"
"number": {"en": "Number", "ar": "الرقم"},
"not-classified": {"en": "Not classified", "ar": "غير محدد"},
"selectClinic": {"en": "Select Clinic", "ar": " بحث بالعيادة"},
"reviews": {"en": "Reviews", "ar": "تقييمات"},
"searchItemError": {
"en": "Item name should be more than 3 character ",
"ar": "يجب أن يكون اسم العنصر أكثر من 3 أحرف"
},
"respiration-signs": {
"en": "Respiration",
"ar": "تنفس"
"YouCanFind": {"en": "You Can Find ", "ar": "باستطاعتك العثور على "},
"ItemInSearch": {"en": " Item In Search", "ar": " عنصر في البحث "},
"InvoiceNo": {"en": " Invoice No", "ar": "رقم الفاتورة"},
"SpecialResult": {"en": " Special Result", "ar": "نتيجة خاصة"},
"GeneralResult": {"en": "General Result", "ar": "نتيجة عامة"},
"show-more-btn": {"en": "Flow Chart", "ar": "النتائج التراكمية"},
"value": {"en": "Value", "ar": "القيمة"},
"range": {"en": "Range", "ar": "المدى"},
"out-patient": {"en": "Out Patient", "ar": "عيادات خارجية"},
"in-patient": {"en": "In Patient", "ar": "تنويم"},
"report": {"en": "Radiology Report", "ar": "تقرير الاشعة"},
"open-rad": {"en": "Open Image", "ar": "فتح صور الاشعة"},
"send-copy": {"en": "Email the Report", "ar": "أرسل التقرير"},
"appoSurvey": {"en": "Survey", "ar": "إستبيان"},
"appoSurveySubtitle": {"en": "Survey", "ar": "إستبيان"},
"labResults": {"en": "Lab Result", "ar": "نتيجة المختبر"},
"doctorRating": {"en": "Doctor Rating", "ar": "تقييم الطبيب"},
"good": {"en": "Good", "ar": "جيد"},
"v-good": {"en": "Very Good", "ar": "جيد جدا"},
"excellent": {"en": "Excellent", "ar": "ممتاز"},
"average": {"en": "Average", "ar": "متوسط"},
"below-average": {"en": "Below Average", "ar": "أقل من المتوسط"},
"info-signs": {
"en":
"This service allows you to view all vital signs were performed in the Habib Medical Group, e.x (height, weight, body mass index, heart rate, etc.) as well shows some statistics charts.",
"ar":
"خدمة المؤشرات الحيوية: هذه الخدمة تمكنك من الاطلاع على جميع المؤشرات الحيوية على سبيل المثال (الطول، الوزن، مؤشر كتلة الجسم، معدل نبضات القلب الخ..) التي تمت في مجموعة الحبيب الطبية وكذلك رسوم بيانية على مستوى المؤشر."
},
"sys-dias": {
"en": "SBP/DBP",
"ar": "إنقباض/إنبساط"
"info-advance-payment": {
"en":
"This service designed so that you can deposit an amount in advance either in your account or in someone else's account with Al Habib Medical Group.",
"ar":
"تم تصميم هذه الخدمة حتى تتمكن من دفع مبلغ مقدما او تحت الحساب سواء في حسابك او في حساب شخص اخر لدى مجموعة الحبيب الطبية."
},
"body": {
"en": "Body \n Mass",
"ar": "كتلة\nالجسم"
"info-my-balance": {
"en": "This service allows you to check your balance in all branchs",
"ar": "هذه الخدمه تتيح لك الاطلاع رصيدك في كل الفروع"
},
"feedback": {
"en": "Feedback",
"ar": "رأيك يهمنا"
"er-contant": {
"en":
"This service displays nearest branch among all the branches of Al Habib Medical Group based on your current location.",
"ar":
"تعرض هذه الخدمة أقرب فرع من بين جميع فروع مجموعة الحبيب الطبية بناءً على موقعك الحالي."
},
"send": {
"en": "Send",
"ar": "أرسل"
"er": {"en": "ER", "ar": "الطوارىء"},
"transportation-Service": {"en": "Ambulance Request", "ar": "طلب نقل اسعاف"},
"info-ambulance": {
"en":
"Through this service, you can request evacuation by ambulance, whether from home or to home, in addition to a set of other services",
"ar":
"عن طريق هذه الخدمة يمكنك طلب اخلاء بواسطة سيارة اسعاف سواء من المزل او الى المنزل بالاضافة الى مجموعة من الخدمات الاخرى"
},
"RRT-transport-heading": {
"en": "Select Transportation Method",
"ar": "حدد طريقة النقل"
},
"sar": {"en": "SR", "ar": "ر.س"},
"RRT-direction-heading": {"en": "Select Direction", "ar": "حدد الاتجاه"},
"to-hospital": {"en": "To Hospital", "ar": "الى المستشفى"},
"from-hospital": {"en": "From Hospital", "ar": "من المستشفى"},
"one-direc": {"en": "One Way", "ar": "ذهاب"},
"two-direc": {"en": "Two Ways", "ar": "ذهاب وعودة"},
"pickup-location": {"en": "Pickup Location", "ar": "نقطة الانطلاق"},
"pickup-spot": {"en": "Pickup Spot", "ar": "نقطة اللقاء"},
"inside-home": {"en": "Inside Home", "ar": "داخل المنزل"},
"have-appo": {"en": "Do you have an appointment?", "ar": "هل لديك موعد؟"},
"dropoff-location": {"en": "Dropoff Location", "ar": "نقطة الوصول"},
"select-all": {
"en": "Please select all fields",
"ar": "يرجى تحديد جميع الحقول"
},
"select-map": {"en": "Select From Map", "ar": "حدد من الخريطة"},
"no-appointment": {
"en": "You don't have any appointments yet",
"ar": "ليس لديك أي مواعيد حتى الآن"
},
"patient-share": {"en": "Amount before tax: ", "ar": "المبلغ قبل الضريبة:"},
"patient-share-tax": {"en": "Tax amount: ", "ar": "قيمة الضريبة:"},
"patient-share-total": {
"en": "Total amount payable: ",
"ar": "المبلغ الإجمالي المستحق:"
},
"status": {
"en": "Status",
"ar": "الحالة"
"select-ambulate": {"en": "Select Ambulate", "ar": "بحاجة للتنقل بواسطة"},
"wheelchair": {"en": "Wheelchair", "ar": "كرسي متحرك"},
"walker": {"en": "Walker", "ar": "مشاية"},
"stretcher": {"en": "Stretcher", "ar": "نقالة"},
"none": {"en": "None", "ar": "لا شيء"},
"RRT-Summary": {"en": "Summary", "ar": "ملخص الطلب"},
"bill-amount": {"en": "Bill Amount", "ar": "مبلغ الفاتورة"},
"transport-method": {"en": "Transportation Method", "ar": "طريقة النقل"},
"directions": {"en": "Directions", "ar": "الاتجاهات"},
"info-my-appointments": {
"en":
"This service allows you to see all the appointment you have visited in Al Habib Medical Group, and through this service:",
"ar":
"خدمة مواعيدي: هذه الخدمة تمكنك من الاطلاع على جميع المواعيد التي قمت بزيارتهم في مجموعة الحبيب الطبية, كما تستطيع من خلال هذه الخدمة:"
},
"like-to-hear": {
"en": "We would love to hear the feedback, concerns on healthcare services and eServices experience. Please use the below form",
"ar": "يسعدنا سماع ملاحظاتك حول خدمات الرعاية الصحية والخدمات الإلكترونية. يرجى تعبئة الحقول المطلوبة"
"info-todo": {
"en":
"This service is designed to enable you to have a quick link to the list of tasks that need to be done",
"ar":
"هذه الخدمة تم تصميمها لتمكنك من الوصول الى رابط سريع لقائمة المهام التي يجب القيام بها"
},
"subject": {
"en": "Subject",
"ar": "الموضوع"
"family-info": {
"en":
"Through this service, you will be able to link your family medical files to your medical file so that you can manage their records by login to your medical file.",
"ar":
"هذه الخدمة تم تصميمها لتتمكن من ربط الملفات الطبية للعائلة بملفك الطبي حتى تتمكن من إدارة سجلاتهم عن طريق تسجيل الدخول إلى ملفك الطبي."
},
"message": {
"en": "Message",
"ar": "رسالة"
"dental-complains": {
"en": "Symptoms",
"ar": "الأعراض"
},
"empty-subject": {
"en": "Please enter the subject",
"ar": "يرجى ادخال الموضوع"
"empty-result": {
"en": "There is no search results found",
"ar": "لايوجد نتائج"
},
"empty-message": {
"en": "Please enter message",
"ar": "يرجى ادخال الموضوع"
"no-booked-appointment": {
"en": "No booked appointments",
"ar": "لا يوجد مواعيد محجوزة"
},
"select-attachment": {
"en": "Select Attachment",
"ar": "إختر المرفق"
"no-confirmed-appointment": {
"en": "No confirmed appointments",
"ar": "لا توجد مواعيد مؤكدة"
},
"complain-appo": {
"en": "Complaint for appointment",
"ar": "شكوى على موعد"
"no-arrived-appointment": {
"en": "No arrived appointments",
"ar": "لا يوجد مواعيد"
},
"complain-without-appo": {
"en": "Complaint without appointment",
"ar": "شكوى بدون موعد"
"upcoming-empty": {
"en": "You do not have any Todo actions yet.",
"ar": "ليس لديك أي إجراءات الآن."
},
"question": {
"en": "Question",
"ar": "سؤال"
"upcoming-timeLeft": {
"en": "time left for appointment",
"ar": "الوقت المتبقي للموعد"
},
"message-type": {
"en": "Message Type",
"ar": "نوع الرسالة"
"covid-test-all-services": {
"en": "Covid-19 Drive-Thru Test",
"ar": "فحص كورونا من داخل السيارة"
},
"compliment": {
"en": "compliment",
"ar": "ثناء"
"pharmacy": {
"en": "Pharmacy",
"ar": "الصيدلية"
},
"suggestion": {
"en": "Suggestion",
"ar": "إقتراح"
"ereferral": {
"en": "E-Referral",
"ar": "طلب التحويل"
},
"your-feedback": {
"en": "Your feedback was sent",
"ar": "إقتراح"
"child-vaccine": {
"en": "Child Vaccines",
"ar": "تطعيمات الأطفال"
},
"select-part": {
"en": "Please select the part that complain about",
"ar": "يرجى تحديد الجزء الذي تشكو منه"
"calculators": {
"en": "Health Calculators",
"ar": "الحاسبات الصحية"
},
"number": {
"en": "Number",
"ar": "الرقم"
"converters": {
"en": "Health Converter",
"ar": "تحويل القياسات"
},
"not-classified": {
"en": "Not classified",
"ar": "غير محدد"
"h2o": {
"en": "Water Tracker",
"ar": "حساب كمية الماء"
},
"selectClinic": {"en": "Select Clinic", "ar": " بحث بالعيادة"},
"reviews": {"en": "Reviews", "ar": "تقييمات"},
"searchItemError": {"en": "Item name should be more than 3 character ", "ar": "يجب أن يكون اسم العنصر أكثر من 3 أحرف"},
"YouCanFind": {"en": "YouCanFind", "ar": "باستطاعتك العثور على "},
"ItemInSearch": {"en": " Item In Search", "ar": " عنصر في البحث "},
"InvoiceNo": {"en": " Invoice No", "ar": "رقم الفاتورة"},
"SpecialResult": {"en": " Special Result", "ar": "نتيجة خاصة"},
"GeneralResult": {"en": "General Result", "ar": "نتيجة عامة"},
"show-more-btn": {
"en": "Flow Chart",
"ar": "النتائج التراكمية"
"v-tour": {
"en": "Virtual Tour",
"ar": "جولة إفتراضية"
},
"value": {
"en": "Value",
"ar": "القيمة"
"hmg-news": {
"en": "HMG News",
"ar": "أخبار المجموعة"
},
"blood-d": {
"en": "Blood Donation",
"ar": "تبرع بالدم"
},
"symptomCheckerTitle": {
"en": "Symptom Checker",
"ar": "مدقق الأعراض"
},
"latest-news": {
"en": "Latest News",
"ar": "أحدث الأخبار"
},
"our-location": {
"en": "Our Locations",
"ar": "موقعنا"
},
"range": {
"en": "Range",
"ar": "المدى"
"pharmacies": {
"en": "Pharmacies",
"ar": "الصيدليات"
},
"out-patient": {
"en": "Out Patient",
"ar": "عيادات خارجية"
"hospitals": {
"en": "Hospitals",
"ar": "المستشفيات"
},
"wallet": {
"en": "Wallet",
"ar": "محفظة نقود"
},
"hmg": {
"en": "Al Habib",
"ar": "الحبيب"
},
"requested": {
"en": "Requested",
"ar": "مطلوب"
},
"in-patient": {
"en": "In Patient",
"ar": "تنويم"
"ready": {
"en": "Ready",
"ar": "جاهز"
},
"report": {
"en": "Radiology Report",
"ar": "تقرير الاشعة"
"completed": {
"en": "Completed",
"ar": "مكتمل"
},
"open-rad": {
"en": "Open Image",
"ar": "فتح صور الاشعة"
"cancelled": {
"en": "Cancelled",
"ar": "ملغى"
},
"send-copy": {
"en": "Email the Report",
"ar": "أرسل التقرير"
"request-medical-report": {
"en": "Request medical report",
"ar": "طلب تقرير طبي"
},
"vaccination": {
@ -1152,4 +1284,46 @@ const Map localizedValues = {
"en": "The request was successful. You have added a child to the vaccination schedule subscription service.",
"ar": "تمت الاضافة بنجاح."
},
"appUpdate": {
"en": "UPDATE THE APP",
"ar": "تحديث التطبيق"
},
"ereferralSaveSuccess": {
"en": "The referral request has been submitted successfully, you will be contacted ASAP to complete the process. Referral request no is ",
"ar": " تم إرسال طلب الإحالة بنجاح ، وسيتم الاتصال بك في أسرع وقت ممكن لإكمال العملية. رقم طلب الإحالة"
},
"referralStatus": {
"en": "Referral Status",
"ar": "حالة الإحالة"
},
"referralDate": {
"en": "Referral Date",
"ar": "تاريخ الإحالة"
},
"patientName": {
"en": "Patient Name",
"ar": "اسم المريض"
},
"referralNumber": {
"en": "Referral Number",
"ar": "رقم الإحالة"
},
"requestID": {
"en": "Request ID",
"ar": " رقم الطلب"
},
"OrderStatus": {
"en": "Status",
"ar": "الحاله"
},"pickupDate": {"en": "Pickup Date", "ar": "التاريخ"},
"serviceName": {"en": "Service Name", "ar": " اسم الخدمة"},
"orderLocation": {"en": "Location", "ar": "الموقع"},
"selectService": {"en": "Select Service", "ar": "حدد الخدمة"},
"coveredService": {"en": "Covered Service : ", "ar": " الخدمات المغطاة : "},
"selectAddress": {"en": "Select Address", "ar": "حدد العنوان"},
"addNewAddress": {"en": "Add New Address", "ar": "أضف عنوان جديد"},
"selectedService": {"en": "Selected Service : ", "ar": " الخدمات المختارة : "},
"cancelOrderMsg": {"en": "Are you sure!! want to cancel this order", "ar": "هل أنت واثق!! تريد إلغاء هذا الطلب"},
"processDoneSuccessfully": {"en": "Process Done Successfully", "ar": "تمت العملية بنجاح"},
"selectHomeHealthCareServices": {"en": "Select Home Health Care Services", "ar": " حدد خدمات الرعاية الصحية المنزلية"},
};

@ -19,4 +19,5 @@ const IS_LIVECARE_APPOINTMENT = 'is_livecare_appointment';
const IS_VIBRATION = 'is_vibration';
const THEME_VALUE = 'is_vibration';
const MAIN_USER = 'main-user';
const WEATHER = 'weather';
const PHARMACY_LAST_VISITED_PRODUCTS = 'last-visited';

@ -0,0 +1,76 @@
class GetAllProjectsResponseModel {
String desciption;
Null desciptionN;
int iD;
String legalName;
String legalNameN;
String name;
Null nameN;
String phoneNumber;
String setupID;
int distanceInKilometers;
bool isActive;
String latitude;
String longitude;
int mainProjectID;
Null projectOutSA;
bool usingInDoctorApp;
GetAllProjectsResponseModel(
{this.desciption,
this.desciptionN,
this.iD,
this.legalName,
this.legalNameN,
this.name,
this.nameN,
this.phoneNumber,
this.setupID,
this.distanceInKilometers,
this.isActive,
this.latitude,
this.longitude,
this.mainProjectID,
this.projectOutSA,
this.usingInDoctorApp});
GetAllProjectsResponseModel.fromJson(Map<String, dynamic> json) {
desciption = json['Desciption'];
desciptionN = json['DesciptionN'];
iD = json['ID'];
legalName = json['LegalName'];
legalNameN = json['LegalNameN'];
name = json['Name'];
nameN = json['NameN'];
phoneNumber = json['PhoneNumber'];
setupID = json['SetupID'];
distanceInKilometers = json['DistanceInKilometers'];
isActive = json['IsActive'];
latitude = json['Latitude'];
longitude = json['Longitude'];
mainProjectID = json['MainProjectID'];
projectOutSA = json['ProjectOutSA'];
usingInDoctorApp = json['UsingInDoctorApp'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['Desciption'] = this.desciption;
data['DesciptionN'] = this.desciptionN;
data['ID'] = this.iD;
data['LegalName'] = this.legalName;
data['LegalNameN'] = this.legalNameN;
data['Name'] = this.name;
data['NameN'] = this.nameN;
data['PhoneNumber'] = this.phoneNumber;
data['SetupID'] = this.setupID;
data['DistanceInKilometers'] = this.distanceInKilometers;
data['IsActive'] = this.isActive;
data['Latitude'] = this.latitude;
data['Longitude'] = this.longitude;
data['MainProjectID'] = this.mainProjectID;
data['ProjectOutSA'] = this.projectOutSA;
data['UsingInDoctorApp'] = this.usingInDoctorApp;
return data;
}
}

@ -0,0 +1,128 @@
class GetEReferralResponseModel {
dynamic acceptedBrachCode;
dynamic acceptedBranchName;
dynamic acceptedBranchNameAr;
Channel channel;
dynamic identityCardAttachment;
String identityNumber;
dynamic insuranceCardAttachment;
bool isInsuredPatient;
String otherRelationship;
String patientContactNo;
int patientId;
String patientName;
int preferredBranchCode;
String preferredBranchName;
String referralDate;
int referralNumber;
Channel relationshipType;
String requesterContactNo;
String requesterName;
String status;
String statusAr;
GetEReferralResponseModel(
{this.acceptedBrachCode,
this.acceptedBranchName,
this.acceptedBranchNameAr,
this.channel,
this.identityCardAttachment,
this.identityNumber,
this.insuranceCardAttachment,
this.isInsuredPatient,
this.otherRelationship,
this.patientContactNo,
this.patientId,
this.patientName,
this.preferredBranchCode,
this.preferredBranchName,
this.referralDate,
this.referralNumber,
this.relationshipType,
this.requesterContactNo,
this.requesterName,
this.status,
this.statusAr});
GetEReferralResponseModel.fromJson(Map<String, dynamic> json) {
acceptedBrachCode = json['AcceptedBrachCode'];
acceptedBranchName = json['AcceptedBranchName'];
acceptedBranchNameAr = json['AcceptedBranchNameAr'];
channel =
json['Channel'] != null ? new Channel.fromJson(json['Channel']) : null;
identityCardAttachment = json['IdentityCardAttachment'];
identityNumber = json['IdentityNumber'];
insuranceCardAttachment = json['InsuranceCardAttachment'];
isInsuredPatient = json['IsInsuredPatient'];
otherRelationship = json['OtherRelationship'];
patientContactNo = json['PatientContactNo'];
patientId = json['PatientId'];
patientName = json['PatientName'];
preferredBranchCode = json['PreferredBranchCode'];
preferredBranchName = json['PreferredBranchName'];
referralDate = json['ReferralDate'];
referralNumber = json['ReferralNumber'];
relationshipType = json['RelationshipType'] != null
? new Channel.fromJson(json['RelationshipType'])
: null;
requesterContactNo = json['RequesterContactNo'];
requesterName = json['RequesterName'];
status = json['Status'];
statusAr = json['StatusAr'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['AcceptedBrachCode'] = this.acceptedBrachCode;
data['AcceptedBranchName'] = this.acceptedBranchName;
data['AcceptedBranchNameAr'] = this.acceptedBranchNameAr;
if (this.channel != null) {
data['Channel'] = this.channel.toJson();
}
data['IdentityCardAttachment'] = this.identityCardAttachment;
data['IdentityNumber'] = this.identityNumber;
data['InsuranceCardAttachment'] = this.insuranceCardAttachment;
data['IsInsuredPatient'] = this.isInsuredPatient;
data['OtherRelationship'] = this.otherRelationship;
data['PatientContactNo'] = this.patientContactNo;
data['PatientId'] = this.patientId;
data['PatientName'] = this.patientName;
data['PreferredBranchCode'] = this.preferredBranchCode;
data['PreferredBranchName'] = this.preferredBranchName;
data['ReferralDate'] = this.referralDate;
data['ReferralNumber'] = this.referralNumber;
if (this.relationshipType != null) {
data['RelationshipType'] = this.relationshipType.toJson();
}
data['RequesterContactNo'] = this.requesterContactNo;
data['RequesterName'] = this.requesterName;
data['Status'] = this.status;
data['StatusAr'] = this.statusAr;
return data;
}
}
class Channel {
int iD;
String text;
String textAr;
String textEn;
Channel({this.iD, this.text, this.textAr, this.textEn});
Channel.fromJson(Map<String, dynamic> json) {
iD = json['ID'];
text = json['Text'];
textAr = json['Text_Ar'];
textEn = json['Text_En'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ID'] = this.iD;
data['Text'] = this.text;
data['Text_Ar'] = this.textAr;
data['Text_En'] = this.textEn;
return data;
}
}

@ -0,0 +1,6 @@
class ImagesInfo {
final String imageAr;
final String imageEn;
ImagesInfo({this.imageAr, this.imageEn});
}

@ -4,7 +4,7 @@ class PharmaciesListModel {
int languageID;
String stamp;
String iPAdress;
double versionID;
dynamic versionID;
String tokenID;
String sessionID;
bool isLoginForDoctorApp;
@ -14,7 +14,7 @@ class PharmaciesListModel {
int editedBy;
int projectID;
int clinicID;
double price;
dynamic price;
String imageLocation;
String desLocation;
String itemDes;

@ -0,0 +1,266 @@
class WeatherIndicatorModel {
Null date;
int languageID;
int serviceName;
Null time;
Null androidLink;
Null authenticationTokenID;
Null data;
bool dataw;
int dietType;
Null errorCode;
Null errorEndUserMessage;
Null errorEndUserMessageN;
Null errorMessage;
int errorType;
int foodCategory;
Null iOSLink;
bool isAuthenticated;
int mealOrderStatus;
int mealType;
int messageStatus;
int numberOfResultRecords;
Null patientBlodType;
Null successMsg;
Null successMsgN;
Null citiesList;
Null cityName;
Null get5DaysWeatherForecastList;
List<GetCityInfoList> getCityInfoList;
Null getTodayWeatherForecastList;
Null iniciesList;
WeatherIndicatorModel(
{this.date,
this.languageID,
this.serviceName,
this.time,
this.androidLink,
this.authenticationTokenID,
this.data,
this.dataw,
this.dietType,
this.errorCode,
this.errorEndUserMessage,
this.errorEndUserMessageN,
this.errorMessage,
this.errorType,
this.foodCategory,
this.iOSLink,
this.isAuthenticated,
this.mealOrderStatus,
this.mealType,
this.messageStatus,
this.numberOfResultRecords,
this.patientBlodType,
this.successMsg,
this.successMsgN,
this.citiesList,
this.cityName,
this.get5DaysWeatherForecastList,
this.getCityInfoList,
this.getTodayWeatherForecastList,
this.iniciesList});
WeatherIndicatorModel.fromJson(Map<String, dynamic> json) {
date = json['Date'];
languageID = json['LanguageID'];
serviceName = json['ServiceName'];
time = json['Time'];
androidLink = json['AndroidLink'];
authenticationTokenID = json['AuthenticationTokenID'];
data = json['Data'];
dataw = json['Dataw'];
dietType = json['DietType'];
errorCode = json['ErrorCode'];
errorEndUserMessage = json['ErrorEndUserMessage'];
errorEndUserMessageN = json['ErrorEndUserMessageN'];
errorMessage = json['ErrorMessage'];
errorType = json['ErrorType'];
foodCategory = json['FoodCategory'];
iOSLink = json['IOSLink'];
isAuthenticated = json['IsAuthenticated'];
mealOrderStatus = json['MealOrderStatus'];
mealType = json['MealType'];
messageStatus = json['MessageStatus'];
numberOfResultRecords = json['NumberOfResultRecords'];
patientBlodType = json['PatientBlodType'];
successMsg = json['SuccessMsg'];
successMsgN = json['SuccessMsgN'];
citiesList = json['CitiesList'];
cityName = json['CityName'];
get5DaysWeatherForecastList = json['Get5DaysWeatherForecastList'];
if (json['GetCityInfo_List'] != null) {
getCityInfoList = new List<GetCityInfoList>();
json['GetCityInfo_List'].forEach((v) {
getCityInfoList.add(new GetCityInfoList.fromJson(v));
});
}
getTodayWeatherForecastList = json['GetTodayWeatherForecastList'];
iniciesList = json['IniciesList'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['Date'] = this.date;
data['LanguageID'] = this.languageID;
data['ServiceName'] = this.serviceName;
data['Time'] = this.time;
data['AndroidLink'] = this.androidLink;
data['AuthenticationTokenID'] = this.authenticationTokenID;
data['Data'] = this.data;
data['Dataw'] = this.dataw;
data['DietType'] = this.dietType;
data['ErrorCode'] = this.errorCode;
data['ErrorEndUserMessage'] = this.errorEndUserMessage;
data['ErrorEndUserMessageN'] = this.errorEndUserMessageN;
data['ErrorMessage'] = this.errorMessage;
data['ErrorType'] = this.errorType;
data['FoodCategory'] = this.foodCategory;
data['IOSLink'] = this.iOSLink;
data['IsAuthenticated'] = this.isAuthenticated;
data['MealOrderStatus'] = this.mealOrderStatus;
data['MealType'] = this.mealType;
data['MessageStatus'] = this.messageStatus;
data['NumberOfResultRecords'] = this.numberOfResultRecords;
data['PatientBlodType'] = this.patientBlodType;
data['SuccessMsg'] = this.successMsg;
data['SuccessMsgN'] = this.successMsgN;
data['CitiesList'] = this.citiesList;
data['CityName'] = this.cityName;
data['Get5DaysWeatherForecastList'] = this.get5DaysWeatherForecastList;
if (this.getCityInfoList != null) {
data['GetCityInfo_List'] =
this.getCityInfoList.map((v) => v.toJson()).toList();
}
data['GetTodayWeatherForecastList'] = this.getTodayWeatherForecastList;
data['IniciesList'] = this.iniciesList;
return data;
}
}
class GetCityInfoList {
CategoriesNames categoriesNames;
String category;
String categoryValue;
int cityID;
String cityName;
String cityNameN;
String colorName;
String createdOn;
String iD;
int iniceID;
bool isOrderEmpty;
bool isValuesReversed;
bool language;
double latitude;
double longitude;
String name;
int orderNum;
double temperature;
String value;
GetCityInfoList(
{this.categoriesNames,
this.category,
this.categoryValue,
this.cityID,
this.cityName,
this.cityNameN,
this.colorName,
this.createdOn,
this.iD,
this.iniceID,
this.isOrderEmpty,
this.isValuesReversed,
this.language,
this.latitude,
this.longitude,
this.name,
this.orderNum,
this.temperature,
this.value});
GetCityInfoList.fromJson(Map<String, dynamic> json) {
categoriesNames = json['CategoriesNames'] != null
? new CategoriesNames.fromJson(json['CategoriesNames'])
: null;
category = json['Category'];
categoryValue = json['CategoryValue'];
cityID = json['CityID'];
cityName = json['CityName'];
cityNameN = json['CityNameN'];
colorName = json['ColorName'];
createdOn = json['CreatedOn'];
iD = json['ID'];
iniceID = json['IniceID'];
isOrderEmpty = json['IsOrderEmpty'];
isValuesReversed = json['IsValuesReversed'];
language = json['Language'];
latitude = json['Latitude'];
longitude = json['Longitude'];
name = json['Name'];
orderNum = json['OrderNum'];
temperature = json['Temperature'];
value = json['Value'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.categoriesNames != null) {
data['CategoriesNames'] = this.categoriesNames.toJson();
}
data['Category'] = this.category;
data['CategoryValue'] = this.categoryValue;
data['CityID'] = this.cityID;
data['CityName'] = this.cityName;
data['CityNameN'] = this.cityNameN;
data['ColorName'] = this.colorName;
data['CreatedOn'] = this.createdOn;
data['ID'] = this.iD;
data['IniceID'] = this.iniceID;
data['IsOrderEmpty'] = this.isOrderEmpty;
data['IsValuesReversed'] = this.isValuesReversed;
data['Language'] = this.language;
data['Latitude'] = this.latitude;
data['Longitude'] = this.longitude;
data['Name'] = this.name;
data['OrderNum'] = this.orderNum;
data['Temperature'] = this.temperature;
data['Value'] = this.value;
return data;
}
}
class CategoriesNames {
String category1;
String category2;
String category3;
String category4;
String category5;
CategoriesNames(
{this.category1,
this.category2,
this.category3,
this.category4,
this.category5});
CategoriesNames.fromJson(Map<String, dynamic> json) {
category1 = json['Category1'];
category2 = json['Category2'];
category3 = json['Category3'];
category4 = json['Category4'];
category5 = json['Category5'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['Category1'] = this.category1;
data['Category2'] = this.category2;
data['Category3'] = this.category3;
data['Category4'] = this.category4;
data['Category5'] = this.category5;
return data;
}
}

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/enum/OrderService.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_get_items_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_get_items_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart';
@ -47,8 +48,9 @@ class CMCService extends BaseService {
await baseAppClient.post(GET_PATIENT_ALL_PRES_ORDERS,
onSuccess: (dynamic response, int statusCode) {
cmcAllPresOrdersList.clear();
cmcAllOrderDetail.clear();
response['PatientER_GetPatientAllPresOrdersList'].forEach((data) {
if (data['ServiceID'] == 3)
if (data['ServiceID'] == OrderService.Comprehensive_Medical_Checkup.getIdOrderService())
cmcAllPresOrdersList
.add(GetHHCAllPresOrdersResponseModel.fromJson(data));
});
@ -104,7 +106,7 @@ class CMCService extends BaseService {
Future insertPresPresOrder({CMCInsertPresOrderRequestModel order}) async {
hasError = false;
await baseAppClient.post(PATIENT_ER_UPDATE_PRES_ORDER,
await baseAppClient.post(PATIENT_ER_INSERT_PRES_ORDER,
onSuccess: (dynamic response, int statusCode) {
isOrderUpdated = true;
}, onFailure: (String error, int statusCode) {

@ -0,0 +1,211 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/enum/OrderService.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_request_modle.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hHC_all_pres_orders_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hhc_all_pres_orders_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart';
import 'package:intl/intl.dart';
import '../base_service.dart';
class CustomerAddressesService extends BaseService {
List<AddressInfo> addressesList = List();
CustomerInfo customerInfo;
Future addAddressInfo({ AddNewAddressRequestModel
addNewAddressRequestModel }) async {
addNewAddressRequestModel.customer.email = customerInfo.email;
addNewAddressRequestModel.customer.id = customerInfo.customerId;
addNewAddressRequestModel.customer.roleIds = [3];
addNewAddressRequestModel.customer.addresses[0].email = customerInfo.email;
addNewAddressRequestModel.customer.addresses[0].phoneNumber = customerInfo.mobileNumber;
addNewAddressRequestModel.customer.addresses[0].firstName = user.firstName;
addNewAddressRequestModel.customer.addresses[0].lastName = user.lastName;
addNewAddressRequestModel.customer.addresses[0].countryId = 69;
var f = DateFormat('E, d MMM yyyy HH:mm:ss');
var date = f.format(DateTime.now().toUtc()) + " GMT";
addNewAddressRequestModel.customer.addresses[0].createdOnUtc = date;
hasError = false;
await baseAppClient.post(ADD_ADDRESS_INFO,
onSuccess: (dynamic response, int statusCode) {
addressesList.clear();
response["customers"][0]["addresses"].forEach((data) {
addressesList
.add(AddressInfo.fromJson(data));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: addNewAddressRequestModel.toJson(), isExternal: true, isAllowAny: true);
}
Future getCustomerAddresses() async {
Map<String, String> queryParams = {
'fields':'addresses'
};
hasError = false;
await baseAppClient.get("$GET_CUSTOMER_ADDRESSES${customerInfo.customerId}",
onSuccess: (dynamic response, int statusCode) {
addressesList.clear();
response["customers"][0]["addresses"].forEach((data) {
addressesList
.add(AddressInfo.fromJson(data));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, queryParams: queryParams, isExternal: true);
}
Future getCustomerInfo() async {
Map<String, String> queryParams = {
'FileNumber':'${user.patientID}'
};
hasError = false;
await baseAppClient.get(GET_CUSTOMER_INFO,
onSuccess: (dynamic response, int statusCode) {
customerInfo= CustomerInfo.fromJson(response);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, queryParams: queryParams, isExternal: true);
}
}
class CustomerInfo {
bool isRegistered;
String userName;
Null password;
String email;
Null errorMessage;
String mobileNumber;
int customerId;
CustomerInfo(
{this.isRegistered,
this.userName,
this.password,
this.email,
this.errorMessage,
this.mobileNumber,
this.customerId});
CustomerInfo.fromJson(Map<String, dynamic> json) {
isRegistered = json['IsRegistered'];
userName = json['UserName'];
password = json['Password'];
email = json['Email'];
errorMessage = json['ErrorMessage'];
mobileNumber = json['MobileNumber'];
customerId = json['CustomerId'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['IsRegistered'] = this.isRegistered;
data['UserName'] = this.userName;
data['Password'] = this.password;
data['Email'] = this.email;
data['ErrorMessage'] = this.errorMessage;
data['MobileNumber'] = this.mobileNumber;
data['CustomerId'] = this.customerId;
return data;
}
}
class AddressInfo {
String id;
String firstName;
String lastName;
String email;
Null company;
int countryId;
String country;
Null stateProvinceId;
String city;
String address1;
String address2;
String zipPostalCode;
String phoneNumber;
Null faxNumber;
String customerAttributes;
String createdOnUtc;
Null province;
String latLong;
AddressInfo(
{this.id,
this.firstName,
this.lastName,
this.email,
this.company,
this.countryId,
this.country,
this.stateProvinceId,
this.city,
this.address1,
this.address2,
this.zipPostalCode,
this.phoneNumber,
this.faxNumber,
this.customerAttributes,
this.createdOnUtc,
this.province,
this.latLong});
AddressInfo.fromJson(Map<String, dynamic> json) {
id = json['id'];
firstName = json['first_name'];
lastName = json['last_name'];
email = json['email'];
company = json['company'];
countryId = json['country_id'];
country = json['country'];
stateProvinceId = json['state_province_id'];
city = json['city'];
address1 = json['address1'];
address2 = json['address2'];
zipPostalCode = json['zip_postal_code'];
phoneNumber = json['phone_number'];
faxNumber = json['fax_number'];
customerAttributes = json['customer_attributes'];
createdOnUtc = json['created_on_utc'];
province = json['province'];
latLong = json['lat_long'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['first_name'] = this.firstName;
data['last_name'] = this.lastName;
data['email'] = this.email;
data['company'] = this.company;
data['country_id'] = this.countryId;
data['country'] = this.country;
data['state_province_id'] = this.stateProvinceId;
data['city'] = this.city;
data['address1'] = this.address1;
data['address2'] = this.address2;
data['zip_postal_code'] = this.zipPostalCode;
data['phone_number'] = this.phoneNumber;
data['fax_number'] = this.faxNumber;
data['customer_attributes'] = this.customerAttributes;
data['created_on_utc'] = this.createdOnUtc;
data['province'] = this.province;
data['lat_long'] = this.latLong;
return data;
}
}

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/check_activation_code_for_e_referral_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/create_e_referral_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_all_cities_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_all_projects_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_all_relationship_types_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/search_e_referral_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/search_e_referral_response_model.dart';
@ -10,11 +11,18 @@ import 'package:diplomaticquarterapp/core/service/base_service.dart';
class EReferralService extends BaseService {
List<GetAllRelationshipTypeResponseModel> _relationTypes = List();
List<GetAllRelationshipTypeResponseModel> get relationTypes => _relationTypes;
List<GetAllCitiesResponseModel> _allCities = List();
List<GetAllCitiesResponseModel> get allCities => _allCities;
List<GetAllProjectsResponseModel> _allProjects = List();
List<GetAllProjectsResponseModel> get allProjects => _allProjects;
List<SearchEReferralResponseModel> _allReferral = List();
List<SearchEReferralResponseModel> get allReferral => _allReferral;
String _activationCode;
String _logInTokenID;
@ -42,84 +50,106 @@ class EReferralService extends BaseService {
Future getAllCities() async {
await baseAppClient.post(GET_ALL_CITIES,
onSuccess: (dynamic response, int statusCode) {
_allCities.clear();
response['ListCities'].forEach((city) {
_allCities
.add(GetAllCitiesResponseModel.fromJson(city));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: {});
_allCities.clear();
response['ListCities'].forEach((city) {
_allCities.add(GetAllCitiesResponseModel.fromJson(city));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: {});
}
Future sendActivationCodeForEReferral(
Future getAllProjects() async {
await baseAppClient.post(GET_PROJECT,
onSuccess: (dynamic response, int statusCode) {
_allProjects.clear();
response['ListProject'].forEach((city) {
_allProjects.add(GetAllProjectsResponseModel.fromJson(city));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: {});
}
Future sendActivationCodeForEReferral(
SendActivationCodeForEReferralRequestModel
sendActivationCodeForEReferralRequestModel) async {
hasError = false;
await baseAppClient.post(SEND_ACTIVATION_CODE_FOR_E_REFERRAL,
onSuccess: (dynamic response, int statusCode) {
print(response["VerificationCode"]);
_activationCode = response["VerificationCode"];
_logInTokenID = response["LogInTokenID"];
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: sendActivationCodeForEReferralRequestModel.toJson());
}
Future checkActivationCodeForEReferral(
CheckActivationCodeForEReferralResponseModel
checkActivationCodeForEReferralRequestModel) async {
checkActivationCodeForEReferralRequestModel.isDentalAllowedBackend = false;
checkActivationCodeForEReferralRequestModel.logInTokenID= _logInTokenID;
hasError =false;
checkActivationCodeForEReferralRequestModel.logInTokenID = _logInTokenID;
hasError = false;
await baseAppClient.post(CHECK_ACTIVATION_CODE_FOR_E_REFERRAL,
onSuccess: (dynamic response, int statusCode) {
_isActivationCodeValid = true;
_isActivationCodeValid = true;
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: checkActivationCodeForEReferralRequestModel.toJson());
}
Future createEReferral(
CreateEReferralRequestModel createEReferralRequestModel
) async {
hasError = false;
await baseAppClient.post(CREATE_E_REFERRAL/*'Services/Patients.svc/REST/CreateEReferral'*/,
Future<dynamic> createEReferral(
CreateEReferralRequestModel createEReferralRequestModel) async {
hasError = false;
dynamic localRes;
await baseAppClient.post(
CREATE_E_REFERRAL /*'Services/Patients.svc/REST/CreateEReferral'*/,
onSuccess: (dynamic response, int statusCode) {
// TODO Waiting for fix service
localRes = response;
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: createEReferralRequestModel.toJson());
return Future.value(localRes);
}
Future getEReferrals(
SearchEReferralRequestModel searchEReferralRequestModel) async {
hasError = false;
dynamic localRes;
await baseAppClient.post(GET_E_REFERRALS,
onSuccess: (dynamic response, int statusCode) {
// TODO Waiting for fix service
var asd= ("EEEEEE");
print("EEEEEE");
_allReferral.clear();
localRes = response;
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: searchEReferralRequestModel.toJson());
return Future.value(localRes);
}
Future getEReferralsIfLogin(String mobileNo) async {
hasError = false;
dynamic localRes;
Map<String, dynamic> request = {};
request['PatientMobileNumber'] = mobileNo;
await baseAppClient.post(GET_E_REFERRALS,
onSuccess: (dynamic response, int statusCode) {
print("EEEEEE");
_allReferral.clear();
localRes = response;
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: createEReferralRequestModel.toJson());
}, body: request);
return Future.value(localRes);
}
Future getEReferrals(
SearchEReferralRequestModel searchEReferralRequestModel
) async {
hasError = false;
// TODO return this code when the fix the server
// await baseAppClient.post(GET_E_REFERRALS,
// onSuccess: (dynamic response, int statusCode) {
// print("EEEEEE");
// // TODO Waiting for fix service
// // ToDo change this one when you have data
// _allReferral.clear();
// // response['ListCities'].forEach((city) {
// // _allReferral
// // .add(SearchEReferralResponseModel.fromJson(city));
// // });
//
// }, onFailure: (String error, int statusCode) {
// hasError = true;
// super.error = error;
// }, body: searchEReferralRequestModel.toJson());
}
}

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/enum/OrderService.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_request_modle.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hHC_all_pres_orders_request_model.dart';
@ -7,6 +8,8 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealth
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart';
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart';
import '../base_service.dart';
@ -15,9 +18,10 @@ class HomeHealthCareService extends BaseService {
List<GetHHCAllPresOrdersResponseModel> hhcAllPresOrdersList = List();
List<GetOrderDetailByOrderIDResponseModel> hhcAllOrderDetail = List();
List<AddressInfo> addressesList = List();
bool isOrderUpdated;
CustomerInfo customerInfo;
Future getHHCAllServices(
HHCGetAllServicesRequestModel hHCGetAllServicesRequestModel) async {
hasError = false;
@ -37,11 +41,11 @@ class HomeHealthCareService extends BaseService {
GetHHCAllPresOrdersRequestModel getHHCAllPresOrdersRequestModel =
GetHHCAllPresOrdersRequestModel();
hasError = false;
await baseAppClient.post(GET_PATIENT_ALL_PRES_ORDERS,
await baseAppClient.post(GET_PATIENT_ALL_PRES_ORD,
onSuccess: (dynamic response, int statusCode) {
hhcAllPresOrdersList.clear();
response['PatientER_GetPatientAllPresOrdersList'].forEach((data) {
if (data['ServiceID'] == 2)
if (data['ServiceID'] == OrderService.HOME_HEALTH_CARE.getIdOrderService())
hhcAllPresOrdersList
.add(GetHHCAllPresOrdersResponseModel.fromJson(data));
});
@ -91,3 +95,5 @@ class HomeHealthCareService extends BaseService {
}, body: order.toJson());
}
}

@ -4,9 +4,11 @@ import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/appUpdatePage/app_update_page.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
import 'package:provider/provider.dart';
@ -31,74 +33,83 @@ class BaseAppClient {
{Map<String, dynamic> body,
Function(dynamic response, int statusCode) onSuccess,
Function(String error, int statusCode) onFailure,
bool isAllowAny = false}) async {
String url = BASE_URL + endPoint;
bool isAllowAny = false,
bool isExternal = false}) async {
String url;
if (isExternal) {
url = endPoint;
} else {
url = BASE_URL + endPoint;
}
try {
//Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
String token = await sharedPref.getString(TOKEN);
var languageID =
await sharedPref.getString(APP_LANGUAGE);
var user = await sharedPref.getObject(USER_PROFILE);
if (body.containsKey('SetupID')) {
body['SetupID'] = body.containsKey('SetupID')
? body['SetupID'] != null
? body['SetupID']
: SETUP_ID
: SETUP_ID;
}
body['VersionID'] = VERSION_ID;
body['Channel'] = CHANNEL;
body['LanguageID'] = body.containsKey('LanguageID')
? body['LanguageID'] != null
? body['LanguageID']
: languageID == 'ar'
? 1
: 2
: languageID == 'ar'
? 1
: 2;
body['IPAdress'] = IP_ADDRESS;
body['generalid'] = GENERAL_ID;
body['PatientOutSA'] = body.containsKey('PatientOutSA')
? body['PatientOutSA'] != null
? body['PatientOutSA']
: PATIENT_OUT_SA
: PATIENT_OUT_SA;
if (body.containsKey('isDentalAllowedBackend')) {
body['isDentalAllowedBackend'] =
body.containsKey('isDentalAllowedBackend')
? body['isDentalAllowedBackend'] != null
? body['isDentalAllowedBackend']
: IS_DENTAL_ALLOWED_BACKEND
: IS_DENTAL_ALLOWED_BACKEND;
}
if (!isExternal) {
String token = await sharedPref.getString(TOKEN);
var languageID = await sharedPref.getString(APP_LANGUAGE)?? 'ar';
var user = await sharedPref.getObject(USER_PROFILE);
if (body.containsKey('SetupID')) {
body['SetupID'] = body.containsKey('SetupID')
? body['SetupID'] != null
? body['SetupID']
: SETUP_ID
: SETUP_ID;
}
body['DeviceTypeID'] = DeviceTypeID;
if (!body.containsKey('IsPublicRequest')) {
body['PatientType'] = body.containsKey('PatientType')
? body['PatientType'] != null
? body['PatientType']
: user['PatientType'] != null
? user['PatientType']
: PATIENT_TYPE
: PATIENT_TYPE;
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'] = token;
body['PatientID'] =
body['PatientID'] != null ? body['PatientID'] : user['PatientID'];
body['PatientOutSA'] = user['OutSA'];
body['SessionID'] = SESSION_ID; //getSessionId(token);
body['VersionID'] = VERSION_ID;
body['Channel'] = CHANNEL;
body['LanguageID'] = body.containsKey('LanguageID')
? body['LanguageID'] != null
? body['LanguageID']
: languageID == 'ar'
? 1
: 2
: languageID == 'en'
? 2
: 1;
body['IPAdress'] = IP_ADDRESS;
body['generalid'] = GENERAL_ID;
body['PatientOutSA'] = body.containsKey('PatientOutSA')
? body['PatientOutSA'] != null
? body['PatientOutSA']
: PATIENT_OUT_SA
: PATIENT_OUT_SA;
if (body.containsKey('isDentalAllowedBackend')) {
body['isDentalAllowedBackend'] =
body.containsKey('isDentalAllowedBackend')
? body['isDentalAllowedBackend'] != null
? body['isDentalAllowedBackend']
: IS_DENTAL_ALLOWED_BACKEND
: IS_DENTAL_ALLOWED_BACKEND;
}
body['DeviceTypeID'] = DeviceTypeID;
if (!body.containsKey('IsPublicRequest')) {
body['PatientType'] = body.containsKey('PatientType')
? body['PatientType'] != null
? body['PatientType']
: user['PatientType'] != null
? user['PatientType']
: PATIENT_TYPE
: PATIENT_TYPE;
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'] = token;
body['PatientID'] = body['PatientID'] != null
? body['PatientID']
: user['PatientID'];
body['PatientOutSA'] = user['OutSA'];
body['SessionID'] = SESSION_ID; //getSessionId(token);
}
}
}
@ -122,6 +133,10 @@ class BaseAppClient {
if (parsed['Response_Message'] != null) {
onSuccess(parsed, statusCode);
} else {
if (parsed['ErrorType'] == 4) {
navigateToAppUpdate(
AppGlobal.context, parsed['ErrorEndUserMessage']);
}
if (isAllowAny) {
onSuccess(parsed, statusCode);
} else if (parsed['IsAuthenticated'] == null) {
@ -159,15 +174,29 @@ class BaseAppClient {
}
} catch (e) {
print(e);
onFailure(e.toString(), -1);
onFailure('Failed to connect to the server', -1);
// onFailure(e.toString(), -1);
}
}
Future navigateToAppUpdate(context, String text) async {
Navigator.pushReplacement(
context,
MaterialPageRoute(
builder: (context) => AppUpdatePage(appUpdateText: text)));
}
get(String endPoint,
{Function(dynamic response, int statusCode) onSuccess,
Function(String error, int statusCode) onFailure,
Map<String, String> queryParams}) async {
String url = BASE_URL + endPoint;
Map<String, String> queryParams,
bool isExternal = false}) async {
String url;
if (isExternal) {
url = endPoint;
} else {
url = BASE_URL + endPoint;
}
if (queryParams != null) {
String queryString = Uri(queryParameters: queryParams).query;
url += '?' + queryString;
@ -176,10 +205,13 @@ class BaseAppClient {
print("URL : $url");
if (await Utils.checkConnection()) {
final response = await http.get(url.trim(), headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
},);
final response = await http.get(
url.trim(),
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
},
);
final int statusCode = response.statusCode;
print("statusCode :$statusCode");
@ -197,9 +229,10 @@ class BaseAppClient {
logout() async {
await sharedPref.remove(LOGIN_TOKEN_ID);
await authenticatedUserObject.getUser();
Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).isLogin = false;
_vitalSignService.weightKg ="";
_vitalSignService.heightCm="";
Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).isLogin =
false;
_vitalSignService.weightKg = "";
_vitalSignService.heightCm = "";
Navigator.of(AppGlobal.context).pushReplacementNamed(HOME);
}

@ -0,0 +1,37 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/weahter/weather_model.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
class WeatherService extends BaseService {
List<GetCityInfoList> weatherIndicatorData = List();
Map<String, dynamic> body = Map();
String Latitude = "";
String Longitude = "";
String PhoneNumber = "";
Future getWeatherData() async {
hasError = false;
var lat = await sharedPref.getDouble(USER_LAT);
var long = await sharedPref.getDouble(USER_LONG);
body['Latitude'] = lat ?? 0;
body['Longitude'] = long ?? 0;
await baseAppClient.post(WEATHER_INDICATOR,
onSuccess: (dynamic response, int statusCode) {
response['GetCityInfo_List'].forEach((data) {
weatherIndicatorData.add(GetCityInfoList.fromJson(data));
});
print(weatherIndicatorData);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
await this.sharedPref.setObject(WEATHER,weatherIndicatorData[0]);
}
}

@ -0,0 +1,136 @@
class AddNewAddressRequestModel {
Customer customer;
AddNewAddressRequestModel({this.customer});
AddNewAddressRequestModel.fromJson(Map<String, dynamic> json) {
customer = json['customer'] != null
? new Customer.fromJson(json['customer'])
: null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.customer != null) {
data['customer'] = this.customer.toJson();
}
return data;
}
}
class Customer {
List<Addresses> addresses;
int id;
String email;
List<int> roleIds;
Customer({this.addresses, this.id, this.email, this.roleIds});
Customer.fromJson(Map<String, dynamic> json) {
if (json['addresses'] != null) {
addresses = new List<Addresses>();
json['addresses'].forEach((v) {
addresses.add(new Addresses.fromJson(v));
});
}
id = json['id'];
email = json['email'];
roleIds = json['role_ids'].cast<int>();
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.addresses != null) {
data['addresses'] = this.addresses.map((v) => v.toJson()).toList();
}
data['id'] = this.id;
data['email'] = this.email;
data['role_ids'] = this.roleIds;
return data;
}
}
class Addresses {
int id;
String firstName;
String lastName;
String email;
Null company;
int countryId;
String country;
Null stateProvinceId;
String city;
String address1;
String address2;
String zipPostalCode;
String phoneNumber;
Null faxNumber;
String customerAttributes;
String createdOnUtc;
Null province;
String latLong;
Addresses(
{this.id,
this.firstName,
this.lastName,
this.email,
this.company,
this.countryId,
this.country,
this.stateProvinceId,
this.city,
this.address1,
this.address2,
this.zipPostalCode,
this.phoneNumber,
this.faxNumber,
this.customerAttributes,
this.createdOnUtc,
this.province,
this.latLong});
Addresses.fromJson(Map<String, dynamic> json) {
id = json['id'];
firstName = json['first_name'];
lastName = json['last_name'];
email = json['email'];
company = json['company'];
countryId = json['country_id'];
country = json['country'];
stateProvinceId = json['state_province_id'];
city = json['city'];
address1 = json['address1'];
address2 = json['address2'];
zipPostalCode = json['zip_postal_code'];
phoneNumber = json['phone_number'];
faxNumber = json['fax_number'];
customerAttributes = json['customer_attributes'];
createdOnUtc = json['created_on_utc'];
province = json['province'];
latLong = json['lat_long'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['first_name'] = this.firstName;
data['last_name'] = this.lastName;
data['email'] = this.email;
data['company'] = this.company;
data['country_id'] = this.countryId;
data['country'] = this.country;
data['state_province_id'] = this.stateProvinceId;
data['city'] = this.city;
data['address1'] = this.address1;
data['address2'] = this.address2;
data['zip_postal_code'] = this.zipPostalCode;
data['phone_number'] = this.phoneNumber;
data['fax_number'] = this.faxNumber;
data['customer_attributes'] = this.customerAttributes;
data['created_on_utc'] = this.createdOnUtc;
data['province'] = this.province;
data['lat_long'] = this.latLong;
return data;
}
}

@ -9,14 +9,19 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealth
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart';
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/cmc_service.dart';
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import '../../../locator.dart';
import 'add_new_address_Request_Model.dart';
class CMCViewModel extends BaseViewModel {
CMCService _cMCService =
locator<CMCService>();
CustomerAddressesService _customerAddressesService =
locator<CustomerAddressesService>();
List<AddressInfo> get addressesList =>
_customerAddressesService.addressesList;
List<GetCMCServicesResponseModel> get cmcAllServicesList =>
_cMCService.cmcAllServicesList;
@ -94,7 +99,6 @@ class CMCViewModel extends BaseViewModel {
await _cMCService
.getOrderDetailByOrderID(getOrderDetailByOrderIDRequestModel);
}
//TODO check it in uat
Future insertPresPresOrder({CMCInsertPresOrderRequestModel order}) async {
setState(ViewState.Busy);
order.createdBy = user.patientID;
@ -107,4 +111,44 @@ class CMCViewModel extends BaseViewModel {
getCmcAllPresOrders();
}
}
Future getCustomerAddresses() async {
setState(ViewState.Busy);
await _customerAddressesService.getCustomerAddresses(
);
if (_customerAddressesService.hasError) {
error = _customerAddressesService.error;
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle);
}
}
Future getCustomerInfo() async {
setState(ViewState.Busy);
await _customerAddressesService.getCustomerInfo(
);
if (_customerAddressesService.hasError) {
error = _customerAddressesService.error;
setState(ViewState.ErrorLocal);
} else {
await getCustomerAddresses();
}
}
Future addAddressInfo(
{AddNewAddressRequestModel addNewAddressRequestModel}) async {
setState(ViewState.Busy);
await _customerAddressesService.addAddressInfo(
addNewAddressRequestModel: addNewAddressRequestModel
);
if (_customerAddressesService.hasError) {
error = _customerAddressesService.error;
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle);
}
}
}

@ -8,18 +8,28 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealth
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart';
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart';
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/home_health_care_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:intl/intl.dart';
import '../../../locator.dart';
import 'add_new_address_Request_Model.dart';
class HomeHealthCareViewModel extends BaseViewModel {
HomeHealthCareService _homeHealthCareService =
locator<HomeHealthCareService>();
CustomerAddressesService _customerAddressesService =
locator<CustomerAddressesService>();
List<HHCGetAllServicesResponseModel> get hhcAllServicesList =>
_homeHealthCareService.hhcAllServicesList;
List<AddressInfo> get addressesList =>
_customerAddressesService.addressesList;
List<GetHHCAllPresOrdersResponseModel> get hhcAllPresOrders =>
_homeHealthCareService.hhcAllPresOrdersList;
@ -93,5 +103,44 @@ class HomeHealthCareViewModel extends BaseViewModel {
}
Future getCustomerAddresses() async {
setState(ViewState.Busy);
await _customerAddressesService.getCustomerAddresses(
);
if (_customerAddressesService.hasError) {
error = _customerAddressesService.error;
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle);
}
}
Future getCustomerInfo() async {
setState(ViewState.Busy);
await _customerAddressesService.getCustomerInfo(
);
if (_customerAddressesService.hasError) {
error = _customerAddressesService.error;
setState(ViewState.ErrorLocal);
} else {
await getCustomerAddresses();
}
}
Future addAddressInfo(
{AddNewAddressRequestModel addNewAddressRequestModel}) async {
setState(ViewState.Busy);
await _customerAddressesService.addAddressInfo(
addNewAddressRequestModel: addNewAddressRequestModel
);
if (_customerAddressesService.hasError) {
error = _customerAddressesService.error;
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle);
}
}
}

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/check_activation_code_for_e_referral_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/create_e_referral_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_all_cities_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_all_projects_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_all_relationship_types_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/search_e_referral_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/search_e_referral_response_model.dart';
@ -18,74 +19,108 @@ class EReferralViewModel extends BaseViewModel {
List<GetAllRelationshipTypeResponseModel> get relationTypes =>
_eReferralService.relationTypes;
List<GetAllCitiesResponseModel> get allCities => _eReferralService.allCities;
List<SearchEReferralResponseModel> get allReferral => _eReferralService.allReferral;
List<GetAllProjectsResponseModel> get allHospitals =>
_eReferralService.allProjects;
List<SearchEReferralResponseModel> get allReferral =>
_eReferralService.allReferral;
void getRelationTypes() async {
void getRelationTypes() async {
setState(ViewState.Busy);
await _eReferralService.getRelationTypes();
if (_eReferralService.hasError) {
error = _eReferralService.error;
setState(ViewState.Error);
} else{
} else {
setState(ViewState.Idle);
}
}
void getAllCities() async {
void getAllCities() async {
setState(ViewState.Busy);
await _eReferralService.getAllCities();
if (_eReferralService.hasError) {
error = _eReferralService.error;
setState(ViewState.Error);
} else{
} else {
setState(ViewState.Idle);
}
}
void sendActivationCodeForEReferral(SendActivationCodeForEReferralRequestModel sendActivationCodeForEReferralRequestModel) async {
void getAllProjects() async {
setState(ViewState.Busy);
await _eReferralService.getAllProjects();
if (_eReferralService.hasError) {
error = _eReferralService.error;
setState(ViewState.Error);
} else {
setState(ViewState.Idle);
}
}
void sendActivationCodeForEReferral(
SendActivationCodeForEReferralRequestModel
sendActivationCodeForEReferralRequestModel) async {
setState(ViewState.BusyLocal);
await _eReferralService.sendActivationCodeForEReferral(sendActivationCodeForEReferralRequestModel);
await _eReferralService.sendActivationCodeForEReferral(
sendActivationCodeForEReferralRequestModel);
if (_eReferralService.hasError) {
error = _eReferralService.error;
setState(ViewState.ErrorLocal);
} else{
} else {
setState(ViewState.Idle);
}
}
checkActivationCodeForEReferral(CheckActivationCodeForEReferralResponseModel checkActivationCodeForEReferralRequestModel) async {
checkActivationCodeForEReferral(
CheckActivationCodeForEReferralResponseModel
checkActivationCodeForEReferralRequestModel) async {
setState(ViewState.BusyLocal);
await _eReferralService.checkActivationCodeForEReferral(checkActivationCodeForEReferralRequestModel);
await _eReferralService.checkActivationCodeForEReferral(
checkActivationCodeForEReferralRequestModel);
if (_eReferralService.hasError) {
error = _eReferralService.error;
setState(ViewState.ErrorLocal);
} else{
} else {
setState(ViewState.Idle);
}
}
void createEReferral(
Future<dynamic> createEReferral(
CreateEReferralRequestModel createEReferralRequestModel) async {
dynamic localRes;
setState(ViewState.BusyLocal);
await _eReferralService.createEReferral(createEReferralRequestModel);
await _eReferralService
.createEReferral(createEReferralRequestModel)
.then((response) {
localRes = response;
});
if (_eReferralService.hasError) {
error = _eReferralService.error;
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle);
}
return Future.value(localRes);
}
getEReferrals(SearchEReferralRequestModel searchEReferralRequestModel) async {
Future getEReferrals(SearchEReferralRequestModel searchEReferralRequestModel) async {
setState(ViewState.BusyLocal);
await _eReferralService.getEReferrals(searchEReferralRequestModel);
dynamic localRes;
await _eReferralService.getEReferrals(searchEReferralRequestModel).then((response) {
localRes = response;
});
if (_eReferralService.hasError) {
error = _eReferralService.error;
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle);
}
return Future.value(localRes);
}
}

@ -1,14 +1,20 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import '../../locator.dart';
class DashboardViewModel extends BaseViewModel {
VitalSignService _vitalSignService = locator<VitalSignService>();
String get weightKg => _vitalSignService.weightKg;
String get heightCm => _vitalSignService.heightCm;
String get weightKg => _vitalSignService.weightKg;
String get heightCm => _vitalSignService.heightCm;
String bloadType = "";
// ToDoCountProviderModel toDoProvider =
// Provider.of<ToDoCountProviderModel>(AppGlobal.context);
getPatientRadOrders() async {
if (isLogin && _vitalSignService.weightKg.isEmpty) {
setState(ViewState.Busy);
@ -17,7 +23,21 @@ class DashboardViewModel extends BaseViewModel {
error = _vitalSignService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
setState(ViewState.Idle);
// getToDoCount();
}
}
// getToDoCount() {
// toDoProvider.setState(0);
// ClinicListService service = new ClinicListService();
// service.getActiveAppointmentNo(AppGlobal.context).then((res) {
// print(res['AppointmentActiveNumber']);
// if (res['MessageStatus'] == 1) {
// toDoProvider.setState(res['AppointmentActiveNumber']);
// } else {}
// }).catchError((err) {
// print(err);
// });
// }
}

@ -0,0 +1,31 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/er/projectavgerwaitingtime.dart';
import 'package:diplomaticquarterapp/core/model/weahter/weather_model.dart';
import 'package:diplomaticquarterapp/core/service/er/er_service.dart';
import 'package:diplomaticquarterapp/core/service/weather_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart';
import '../../../locator.dart';
class WeatherViewModel extends BaseViewModel {
WeatherService _weatherService = locator<WeatherService>();
List<GetCityInfoList> get weatherIndicatorData =>
_weatherService.weatherIndicatorData;
getWeatherData() async {
setState(ViewState.Busy);
// if (id != null && projectID != null) {
// await _erService.getProjectAvgERWaitingTimeOrders(
// id: id, projectID: projectID);
// } else {
await _weatherService.getWeatherData();
// }
if (_weatherService.hasError) {
error = _weatherService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
}

@ -1,13 +1,16 @@
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/H2O_service.dart';
import 'package:diplomaticquarterapp/core/service/qr_service.dart';
import 'package:diplomaticquarterapp/core/service/weather_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/user_information_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/weather/weather_view_model.dart';
import 'package:diplomaticquarterapp/uitl/navigation_service.dart';
import 'package:get_it/get_it.dart';
import 'core/service/AlHabibMedicalService/cmc_service.dart';
import 'core/service/AlHabibMedicalService/customer_addresses_service.dart';
import 'core/service/AlHabibMedicalService/e_referral_service.dart';
import 'core/service/AlHabibMedicalService/home_health_care_service.dart';
import 'core/service/AuthenticatedUserObject.dart';
@ -138,8 +141,10 @@ void setupLocator() {
locator.registerLazySingleton(() => DeleteBabyService());
locator.registerLazySingleton(() => VaccinationTableService());
locator.registerLazySingleton(() => NotificationService());
locator.registerLazySingleton(() => WeatherService());
locator.registerLazySingleton(() => PharmacyModuleService());
locator.registerLazySingleton(() => OrderPreviewService());
locator.registerLazySingleton(() => CustomerAddressesService());
locator.registerLazySingleton(() => PrivilegeService());
@ -161,6 +166,7 @@ void setupLocator() {
locator.registerFactory(() => QrViewModel());
locator.registerFactory(() => ReportsMonthlyViewModel());
locator.registerFactory(() => NearHospitalViewModel());
locator.registerFactory(() => WeatherViewModel());
locator.registerFactory(() => AmRequestViewModel());
locator.registerFactory(() => PatientSickLeaveViewMode());
locator.registerFactory(() => MyBalanceViewModel());

@ -63,7 +63,7 @@ class MyApp extends StatelessWidget {
const Locale('ar', ''), // Arabic
const Locale('en', ''), // English
],
//theme: themeNotifier.getTheme(),
// theme: themeNotifier.getTheme(),
theme:ThemeData(
fontFamily:projectProvider.isArabic ? 'Cairo' : 'WorkSans',
primarySwatch: Colors.blue,
@ -76,6 +76,11 @@ class MyApp extends StatelessWidget {
},
),
hintColor: Colors.grey[400],
textTheme: TextTheme(
headline1: TextStyle(
color: Color(0xffB8382C),
),
),
disabledColor: Colors.grey[300],
errorColor: Color.fromRGBO(235, 80, 60, 1.0),
scaffoldBackgroundColor: Color(0xffE9E9E9), // Colors.grey[100],

@ -0,0 +1,32 @@
class DoctorRateDetails {
dynamic doctorID;
dynamic projectID;
dynamic clinicID;
dynamic rate;
dynamic patientNumber;
DoctorRateDetails(
{this.doctorID,
this.projectID,
this.clinicID,
this.rate,
this.patientNumber});
DoctorRateDetails.fromJson(Map<String, dynamic> json) {
doctorID = json['DoctorID'];
projectID = json['ProjectID'];
clinicID = json['ClinicID'];
rate = json['Rate'];
patientNumber = json['PatientNumber'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['DoctorID'] = this.doctorID;
data['ProjectID'] = this.projectID;
data['ClinicID'] = this.clinicID;
data['Rate'] = this.rate;
data['PatientNumber'] = this.patientNumber;
return data;
}
}

@ -30,7 +30,7 @@ class _ConfirmCancelOrderDialogState extends State<ConfirmCancelOrderDialog> {
contentPadding: EdgeInsets.fromLTRB(28.0, 24.0, 28.0, 0.0),
title: Center(
child: Texts(
"Confirm",
TranslationBase.of(context).confirm,
color: Colors.black,
),
),
@ -40,7 +40,7 @@ class _ConfirmCancelOrderDialogState extends State<ConfirmCancelOrderDialog> {
Divider(),
Center(
child: Texts(
"Are you sure!! want to cancel this order",
TranslationBase.of(context).cancelOrderMsg ,
color: Colors.grey,
),
),

@ -0,0 +1,148 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.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 CMCLocationPage extends StatefulWidget {
final Function(PickResult) onPick;
final double latitude;
final double longitude;
final dynamic model;
const CMCLocationPage({Key key, this.onPick, this.latitude, this.longitude, this.model})
: super(key: key);
@override
_CMCLocationPageState createState() =>
_CMCLocationPageState();
}
class _CMCLocationPageState
extends State<CMCLocationPage> {
double latitude = 0;
double longitude = 0;
@override
void initState() {
latitude = widget.latitude;
longitude = widget.longitude;
super.initState();
}
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<CMCViewModel>(
onModelReady: (model) {},
builder: (_, model, widget) => AppScaffold(
isShowDecPage: false,
isShowAppBar: true,
baseViewModel: model,
body: PlacePicker(
apiKey: GOOGLE_API_KEY,
enableMyLocationButton: true,
automaticallyImplyAppBarLeading: false,
autocompleteOnTrailingWhitespace: true,
selectInitialPosition: true,
autocompleteLanguage: projectViewModel.currentLanguage,
enableMapTypeButton: true,
searchForInitialValue: false,
onPlacePicked: (PickResult result) {
print(result.adrAddress);
},
selectedPlaceWidgetBuilder:
(_, selectedPlace, state, isSearchBarFocused) {
print("state: $state, isSearchBarFocused: $isSearchBarFocused");
return isSearchBarFocused
? Container()
: FloatingCard(
bottomPosition: 0.0,
leftPosition: 0.0,
rightPosition: 0.0,
width: 500,
borderRadius: BorderRadius.circular(12.0),
child: state == SearchingState.Searching
? Center(child: CircularProgressIndicator())
: Container(
margin: EdgeInsets.all(12),
child: Column(
children: [
SecondaryButton(
color: Colors.grey[800],
textColor: Colors.white,
onTap: () async {
print(selectedPlace);
AddNewAddressRequestModel
addNewAddressRequestModel =
new AddNewAddressRequestModel(
customer: Customer(addresses: [
Addresses(
address1:
selectedPlace.formattedAddress,
address2: selectedPlace
.formattedAddress,
customerAttributes: "",
city: "",
createdOnUtc: "",
id: 0,
latLong: "$latitude,$longitude",
email: "")
]),
);
selectedPlace.addressComponents.forEach((e) {
if (e.types.contains("country")) {
addNewAddressRequestModel.customer
.addresses[0].country = e.longName;
}
if (e.types.contains("postal_code")) {
addNewAddressRequestModel.customer
.addresses[0].zipPostalCode =
e.longName;
}
if (e.types.contains("locality")) {
addNewAddressRequestModel.customer
.addresses[0].city =
e.longName;
}
});
await model.addAddressInfo(
addNewAddressRequestModel: addNewAddressRequestModel);
if (model.state == ViewState.ErrorLocal) {
Utils.showErrorToast(model.error);
} else {
AppToast.showSuccessToast(
message: "Address Added Successfully");
}
Navigator.of(context).pop();
},
label: TranslationBase.of(context).addNewAddress,
),
],
),
),
);
},
initialPosition: LatLng(latitude, longitude),
useCurrentLocation: false,
),
));
}
}

@ -3,15 +3,18 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/Comprehens
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/Dialog/confirm_cancel_order_dialog.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/StepsWidget.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/material.dart';
import 'package:geolocator/geolocator.dart';
import 'package:provider/provider.dart';
import 'new_cmc_step_one_page.dart';
import 'new_cmc_step_three_page.dart';
@ -46,7 +49,7 @@ class _NewCMCPageState extends State<NewCMCPage>
price: widget.model.cmcAllServicesList[0].price,
serviceID: widget.model.cmcAllServicesList[0].serviceID.toString(),
selectedServiceName: widget.model.cmcAllServicesList[0].description,
selectedServiceNameAR: widget.model.cmcAllServicesList[0].description,
selectedServiceNameAR: widget.model.cmcAllServicesList[0].descriptionN,
recordID: 1,
totalPrice: widget.model.cmcAllServicesList[0].totalPrice,
vAT: widget.model.cmcAllServicesList[0].vAT);
@ -85,6 +88,8 @@ class _NewCMCPageState extends State<NewCMCPage>
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
void showConfirmMessage(
CMCViewModel model, GetOrderDetailByOrderIDResponseModel order) {
showDialog(
@ -101,7 +106,7 @@ class _NewCMCPageState extends State<NewCMCPage>
if (model.state == ViewState.ErrorLocal) {
Utils.showErrorToast(model.error);
} else {
AppToast.showSuccessToast(message: "Done Successfully");
AppToast.showSuccessToast(message:TranslationBase.of(context).processDoneSuccessfully );
await model.getCmcAllPresOrders();
}
},
@ -134,183 +139,192 @@ class _NewCMCPageState extends State<NewCMCPage>
children: <Widget>[
widget.model.cmcAllOrderDetail.length != 0
? FractionallySizedBox(
heightFactor: 0.8,
widthFactor: 0.9,
child: Container(
width: double.infinity,
margin: EdgeInsets.only(top: 15),
decoration: BoxDecoration(
border:
Border.all(color: Colors.grey, width: 1),
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 12,
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
margin: EdgeInsets.only(top: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
),
// borderRadius: BorderRadius.circular(12),
border:
Border.all(color: Colors.grey, width: 1),
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
"Request ID",
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
height: 12,
),
Texts(
widget.model.cmcAllOrderDetail[0].iD.toString(),
fontSize: 22,
),
],
),
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15,right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
TranslationBase
.of(context)
.requestID,
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
widget.model.cmcAllOrderDetail[0].iD.toString(),
fontSize: 22,
),
],
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
"Status",
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
"Pending",
fontSize: 22,
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15,right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
TranslationBase
.of(context)
.OrderStatus,
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
projectViewModel.isArabic ? widget.model.cmcAllOrderDetail[0]
.descriptionN : widget.model.cmcAllOrderDetail[0].description,
fontSize: 22,
),
],
),
),
],
),
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15,right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
TranslationBase.of(context).pickupDate,
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
DateUtil.getDayMonthYearDateFormatted(
DateUtil.convertStringToDate(widget.model.cmcAllOrderDetail[0].createdOn)),
fontSize: 22,
),
],
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
"Pickup Date",
bold: false,
fontSize: 13,
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
TranslationBase.of(context).serviceName,
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
!projectViewModel.isArabic?widget.model.cmcAllOrderDetail[0].description
.toString() :
widget.model.cmcAllOrderDetail[0]
.descriptionN
.toString(),
fontSize: 22,
),
],
),
),
SizedBox(
height: 4,
),
Texts(
DateUtil.getDayMonthYearDateFormatted(
DateUtil.convertStringToDate(
widget.model.cmcAllOrderDetail[0]
.createdOn)),
fontSize: 22,
height: 12,
),
],
),
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
Center(
child: Container(
width: MediaQuery
.of(context)
.size
.width *
0.85,
child: SecondaryButton(
label: TranslationBase.of(context).cancel.toUpperCase(),
onTap: () {
showConfirmMessage(widget.model,
widget.model.cmcAllOrderDetail[0]);
}
,
color: Colors.red[800],
disabled: false,
textColor: Theme
.of(context)
.backgroundColor),
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
"Service Name",
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
widget.model.cmcAllOrderDetail[0].description
.toString() ??
widget.model.cmcAllOrderDetail[0]
.descriptionN
.toString(),
fontSize: 22,
height: 22,
),
],
),
),
SizedBox(
height: 12,
),
Center(
child: Container(
width: MediaQuery
.of(context)
.size
.width *
0.85,
child: SecondaryButton(
label: "Cancel".toUpperCase(),
onTap: () {
showConfirmMessage(widget.model,
widget.model.cmcAllOrderDetail[0]);
}
,
color: Colors.red[800],
disabled: false,
textColor: Theme
.of(context)
.backgroundColor),
),
),
SizedBox(
height: 12,
height: 22,
),
],
),

@ -1,11 +1,16 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_get_items_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class NewCMCStepOnePage extends StatefulWidget {
final CMCInsertPresOrderRequestModel cMCInsertPresOrderRequestModel;
@ -31,6 +36,8 @@ class _NewCMCStepOnePageState extends State<NewCMCStepOnePage> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
isShowAppBar: false,
baseViewModel: widget.model,
@ -50,17 +57,17 @@ class _NewCMCStepOnePageState extends State<NewCMCStepOnePage> {
height: 20,
),
Texts(
"Select Home Health Care Services",
TranslationBase.of(context).selectService,
textAlign: TextAlign.center,
),
Column(
children:
widget.model.cmcAllServicesList.map((service) {
widget.model.cmcAllServicesList.map((service) {
return Container(
margin: EdgeInsets.only(top: 15),
decoration: BoxDecoration(
border:
Border.all(color: Colors.grey, width: 1),
Border.all(color: Colors.grey, width: 1),
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
@ -72,50 +79,53 @@ class _NewCMCStepOnePageState extends State<NewCMCStepOnePage> {
activeColor: Colors.red[800],
onChanged: (newValue) async {
PatientERCMCInsertServicesList
patientERCMCInsertServicesList =
new PatientERCMCInsertServicesList(
price: service.price,
serviceID: service.serviceID
.toString(),
selectedServiceName:
service.description,
selectedServiceNameAR:
service.description,
recordID: 1,
totalPrice:
service.totalPrice,
vAT: service.vAT);
patientERCMCInsertServicesList =
new PatientERCMCInsertServicesList(
price: service.price,
serviceID: service.serviceID
.toString(),
selectedServiceName:
service.description,
selectedServiceNameAR:
service.descriptionN,
recordID: 1,
totalPrice:
service.totalPrice,
vAT: service.vAT);
setState(() {
widget
.cMCInsertPresOrderRequestModel
.patientERCMCInsertServicesList = [
.patientERCMCInsertServicesList =
[
patientERCMCInsertServicesList
];
});
CMCGetItemsRequestModel
cMCGetItemsRequestModel =
new CMCGetItemsRequestModel(
checkupType: newValue);
cMCGetItemsRequestModel =
new CMCGetItemsRequestModel(
checkupType: newValue);
await widget.model.getCheckupItems(
cMCGetItemsRequestModel:
cMCGetItemsRequestModel);
cMCGetItemsRequestModel);
},
groupValue: widget
.cMCInsertPresOrderRequestModel
.patientERCMCInsertServicesList
.length >
0
.cMCInsertPresOrderRequestModel
.patientERCMCInsertServicesList
.length >
0
? int.parse(widget
.cMCInsertPresOrderRequestModel
.patientERCMCInsertServicesList[
0]
.serviceID)
.cMCInsertPresOrderRequestModel
.patientERCMCInsertServicesList[
0]
.serviceID)
: 1),
Expanded(
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Texts(
service.description,
projectViewModel.isArabic ? service
.descriptionN : service
.description,
fontSize: 15,
),
),
@ -137,52 +147,67 @@ class _NewCMCStepOnePageState extends State<NewCMCStepOnePage> {
color: Colors.white,
width: double.infinity,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: widget.model.checkupItems.map((item) {
return Center(
child: FractionallySizedBox(
widthFactor: 1,
child: Container(
margin: EdgeInsets.only(top: 15),
decoration: BoxDecoration(color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 12,
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 5, top: 5),
decoration: BoxDecoration(
border: BorderDirectional(
bottom: BorderSide(
style: BorderStyle.solid,
width: 0.5,
color: Colors.grey)),
//borderRadius: ,
color: Colors.white),
child: Column(
crossAxisAlignment:
children: [
Row(
children: [
Container(margin: EdgeInsets.only(
right: 10, left: 10), child: Texts(TranslationBase.of(context).coveredService, fontWeight: FontWeight.bold,))
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: widget.model.checkupItems.map((item) {
return Center(
child: FractionallySizedBox(
widthFactor: 1,
child: Container(
margin: EdgeInsets.only(top: 15),
decoration: BoxDecoration(
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment
.start,
children: [
SizedBox(
height: 12,
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 5, top: 5),
decoration: BoxDecoration(
border: BorderDirectional(
bottom: BorderSide(
style: BorderStyle.solid,
width: 0.5,
color: Colors.grey)),
//borderRadius: ,
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
item.itemName,
fontSize: 15,
children: [
Container(margin: EdgeInsets.only(
right: 10, left: 10),
child: Texts(
item.itemName,
fontSize: 15, fontWeight: FontWeight.bold
),
),
],
),
],
),
),
SizedBox(
height: 12,
),
SizedBox(
height: 12,
),
],
),
],
),
),
),
),
);
}).toList()),
);
}).toList()),
],
),
)
],
),
@ -197,28 +222,48 @@ class _NewCMCStepOnePageState extends State<NewCMCStepOnePage> {
Container(
width: MediaQuery.of(context).size.width * 0.9,
child: SecondaryButton(
label: "Next",
textColor: Theme.of(context).backgroundColor,
onTap: () {
if (widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList.length = null) {
label: TranslationBase
.of(context)
.next,
textColor: Theme
.of(context)
.backgroundColor,
color: Colors.grey[800],
onTap: () async {
if (widget.cMCInsertPresOrderRequestModel
.patientERCMCInsertServicesList.length !=
0 ||
widget.cMCInsertPresOrderRequestModel
.patientERCMCInsertServicesList ==
null) {
int index = widget.model.cmcAllServicesList.length;
PatientERCMCInsertServicesList
patientERCMCInsertServicesList =
new PatientERCMCInsertServicesList(
price: widget.model.cmcAllServicesList[index-1].price,
serviceID: widget.model.cmcAllServicesList[index-1].serviceID.toString(),
selectedServiceName: widget.model.cmcAllServicesList[index-1].description,
selectedServiceNameAR: widget.model.cmcAllServicesList[index-1].description,
recordID: 1,
totalPrice: widget.model.cmcAllServicesList[index-1].totalPrice,
vAT: widget.model.cmcAllServicesList[index-1].vAT);
patientERCMCInsertServicesList =
new PatientERCMCInsertServicesList(
price: widget
.model.cmcAllServicesList[index - 1].price,
serviceID: widget
.model.cmcAllServicesList[index - 1].serviceID
.toString(),
selectedServiceName: widget.model
.cmcAllServicesList[index - 1].description,
selectedServiceNameAR: widget.model
.cmcAllServicesList[index - 1].descriptionN,
recordID: 1,
totalPrice: widget
.model.cmcAllServicesList[index - 1].totalPrice,
vAT: widget.model.cmcAllServicesList[index - 1].vAT);
widget.cMCInsertPresOrderRequestModel
.patientERCMCInsertServicesList = [
patientERCMCInsertServicesList
];
widget.changePageViewIndex(1);
await widget.model.getCustomerInfo();
if (widget.model.state == ViewState.ErrorLocal) {
Utils.showErrorToast();
} else {
widget.changePageViewIndex(1);
}
}
},
),

@ -2,15 +2,16 @@ import 'dart:async';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:provider/provider.dart';
class NewCMCStepThreePage extends StatefulWidget {
final CMCInsertPresOrderRequestModel cmcInsertPresOrderRequestModel;
@ -63,19 +64,23 @@ class _NewCMCStepThreePageState
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
isShowDecPage: false,
baseViewModel: widget.model,
body: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Container(
height: 400,
height: 500,
width: double.maxFinite,
margin: EdgeInsets.only(left: 12, right: 12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts('Order Details'),
Texts(
TranslationBase.of(context).orderDetails,
fontWeight: FontWeight.bold,
),
SizedBox(
height: 12,
),
@ -87,7 +92,9 @@ class _NewCMCStepThreePageState
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts('Location :'),
Texts(TranslationBase
.of(context)
.orderLocation + " : ", fontWeight: FontWeight.bold,),
SizedBox(
height: 12,
),
@ -108,30 +115,40 @@ class _NewCMCStepThreePageState
SizedBox(
height: 12,
),
Texts('Selected Service :'),
Texts(TranslationBase
.of(context)
.selectedService),
...List.generate(
widget.cmcInsertPresOrderRequestModel.patientERCMCInsertServicesList.length,
(index) => Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
'Service Name :',
fontSize: 12,
),
SizedBox(
height: 5,
),
Texts(
widget
.cmcInsertPresOrderRequestModel.patientERCMCInsertServicesList[index]
.selectedServiceName,
fontSize: 15,
bold: true,
widget.cmcInsertPresOrderRequestModel
.patientERCMCInsertServicesList.length,
(index) =>
Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
TranslationBase
.of(context)
.serviceName,
fontSize: 12, fontWeight: FontWeight.bold,
),
SizedBox(
height: 5,
),
Texts(
projectViewModel.isArabic ? widget
.cmcInsertPresOrderRequestModel
.patientERCMCInsertServicesList[index]
.selectedServiceNameAR : widget
.cmcInsertPresOrderRequestModel
.patientERCMCInsertServicesList[index]
.selectedServiceName,
fontSize: 15,
bold: true,
),
],
),
],
),
),
),
)
],
),
@ -148,14 +165,20 @@ class _NewCMCStepThreePageState
Container(
width: MediaQuery.of(context).size.width * 0.9,
child: SecondaryButton(
label: "Confirm",
label: TranslationBase
.of(context)
.confirm,
color: Colors.grey[800],
onTap: () async {
await widget.model.insertPresPresOrder(order: widget.cmcInsertPresOrderRequestModel);
await widget.model.insertPresPresOrder(
order: widget.cmcInsertPresOrderRequestModel);
if (widget.model.state != ViewState.ErrorLocal) {
widget.changePageViewIndex(0);
}
},
textColor: Theme.of(context).backgroundColor),
textColor: Theme
.of(context)
.backgroundColor),
),
],
),

@ -1,19 +1,22 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/select_location_dialog.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/close_back.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_flutter/google_maps_flutter.dart';
import 'package:google_maps_place_picker/google_maps_place_picker.dart';
import 'package:provider/provider.dart';
import 'cmc_location_page.dart';
class NewCMCStepTowPage extends StatefulWidget {
final Function(PickResult) onPick;
final double latitude;
@ -41,12 +44,13 @@ class _NewCMCStepTowPageState
extends State<NewCMCStepTowPage> {
double latitude = 0;
double longitude = 0;
AddressInfo _selectedAddress;
@override
void initState() {
if (widget.cmcInsertPresOrderRequestModel.latitude == null) {
latitude = widget.latitude;
longitude = widget.longitude;
setLatitudeAndLongitude();
} else {
latitude = widget.cmcInsertPresOrderRequestModel.latitude;
longitude = widget.cmcInsertPresOrderRequestModel.longitude;
@ -54,60 +58,152 @@ class _NewCMCStepTowPageState
super.initState();
}
setLatitudeAndLongitude({bool isSetState = false, String latLong}) {
if (latLong == null)
latLong = widget.model.addressesList[widget.model.addressesList
.length - 1].latLong;
List latLongArr = latLong.split(',');
latitude = double.parse(latLongArr[0]);
longitude = double.parse(latLongArr[1]);
}
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
return AppScaffold(
isShowDecPage: false,
body: PlacePicker(
apiKey: GOOGLE_API_KEY,
enableMyLocationButton: true,
automaticallyImplyAppBarLeading: false,
autocompleteOnTrailingWhitespace: true,
selectInitialPosition: true,
autocompleteLanguage: projectViewModel.currentLanguage,
enableMapTypeButton: true,
onPlacePicked: (PickResult result) {
print(result.adrAddress);
widget.changePageViewIndex(3);
},
selectedPlaceWidgetBuilder:
(_, selectedPlace, state, isSearchBarFocused) {
print("state: $state, isSearchBarFocused: $isSearchBarFocused");
return isSearchBarFocused
? Container()
: FloatingCard(
bottomPosition: 0.0,
leftPosition: 0.0,
rightPosition: 0.0,
width: 500,
borderRadius: BorderRadius.circular(12.0),
child: state == SearchingState.Searching
? Center(child: CircularProgressIndicator())
: Container(
margin: EdgeInsets.all(12),
child: SecondaryButton(
color: Colors.grey[800],
textColor: Colors.white,
onTap: () {
setState(() {
widget.cmcInsertPresOrderRequestModel
.latitude =
selectedPlace.geometry.location.lat;
widget.cmcInsertPresOrderRequestModel
.longitude =
selectedPlace.geometry.location.lng;
});
widget.changePageViewIndex(3);
},
label: TranslationBase.of(context).next,
),
body: Stack(
children: [
PlacePicker(
apiKey: GOOGLE_API_KEY,
enableMyLocationButton: true,
automaticallyImplyAppBarLeading: false,
autocompleteOnTrailingWhitespace: true,
selectInitialPosition: true,
autocompleteLanguage: projectViewModel.currentLanguage,
enableMapTypeButton: true,
searchForInitialValue: false,
onPlacePicked: (PickResult result) {
print(result.adrAddress);
widget.changePageViewIndex(3);
},
selectedPlaceWidgetBuilder:
(_, selectedPlace, state, isSearchBarFocused) {
print("state: $state, isSearchBarFocused: $isSearchBarFocused");
return isSearchBarFocused
? Container()
: FloatingCard(
bottomPosition: 0.0,
leftPosition: 0.0,
rightPosition: 0.0,
width: 500,
borderRadius: BorderRadius.circular(12.0),
child: state == SearchingState.Searching
? Center(child: CircularProgressIndicator())
: Container(
margin: EdgeInsets.all(12),
child: Column(
children: [
SecondaryButton(
color: Colors.grey[800],
textColor: Colors.white,
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (BuildContext context) =>
CMCLocationPage(
latitude: latitude,
longitude: longitude,
),
),
);
},
label: TranslationBase.of(context).addNewAddress,
),
SizedBox(height: 10,),
SecondaryButton(
color: Colors.red
[800],
textColor: Colors.white,
onTap: () {
setState(() {
widget.cmcInsertPresOrderRequestModel
.latitude =
selectedPlace.geometry.location.lat;
widget.cmcInsertPresOrderRequestModel
.longitude =
selectedPlace.geometry.location.lng;
});
widget.changePageViewIndex(3);
},
label: TranslationBase.of(context).confirm,
),
);
],
)
),
);
},
initialPosition: LatLng(latitude, longitude),
useCurrentLocation: false,
),
Container(
child: InkWell(
onTap: () =>
confirmSelectLocationDialog(widget.model.addressesList),
child: Container(
padding: EdgeInsets.all(10),
width: double.infinity,
// height: 65,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Colors.white),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Expanded(child: Texts(getAddressName(), fontSize: 14,),),
Icon(Icons.arrow_drop_down)
],
),
),
),
height: 56, width: double.infinity, color: Theme
.of(context)
.scaffoldBackgroundColor,
)
],
),
);
}
void confirmSelectLocationDialog(List<AddressInfo> addresses) {
showDialog(
context: context,
child: SelectLocationDialog(
addresses: addresses,
selectedAddress: _selectedAddress
,
onValueSelected: (value) {
setLatitudeAndLongitude(latLong: value.latLong);
setState(() {
_selectedAddress = value;
});
},
initialPosition: LatLng(latitude, longitude),
useCurrentLocation: true,
),
);
}
String getAddressName() {
if (_selectedAddress != null)
return _selectedAddress.address1;
else
return TranslationBase.of(context).selectAddress;
}
}

@ -1,68 +0,0 @@
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package: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:hexcolor/hexcolor.dart';
import 'cmc_page.dart';
class CMCIndexPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).serviceInformation,
body: SingleChildScrollView(
padding: EdgeInsets.all(12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(
"CMC",
fontWeight: FontWeight.normal,
fontSize: 25,
color: Color(0xff60686b),
),
SizedBox(
height: 12,
),
Texts(
"This service is designed to help you to set drinking water goals and track the volume of water you are drinking on a daily basis. This service allows for schedule reminders and offers a basic statistical analysis of the amount of what you have consumed over the course of a day, week or month.",
fontWeight: FontWeight.normal,
fontSize: 17,
),
SizedBox(
height: 22,
),
Center(
child: Image.asset(
'assets/images/AlHabibMedicalService/Wifi-AR.png')),
SizedBox(
height: 77,
),
],
)),
bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.10,
width: double.infinity,
child: Column(
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width * 0.9,
child: SecondaryButton(
onTap: () => Navigator.push(
context,
FadePage(
page: CMCPage(),
),
),
label: "CMC",
textColor: Theme.of(context).backgroundColor),
),
],
),
));
}
}

@ -40,7 +40,8 @@ class _CMCPageState extends State<CMCPage>
},
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).homeHealthCare,
description: TranslationBase.of(context).HHCNotAuthMsg,
appBarTitle: TranslationBase.of(context).comprehensiveMedicalCheckup,
body: Scaffold(
extendBodyBehindAppBar: true,
appBar: PreferredSize(
@ -88,7 +89,8 @@ class _CMCPageState extends State<CMCPage>
Container(
width: MediaQuery.of(context).size.width * 0.37,
child: Center(
child: Texts("CMC Service"),
child: Texts(TranslationBase.of(context)
.comprehensiveMedicalCheckup),
),
),
Container(

@ -2,13 +2,16 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hhc_all_pres_orders_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'Dialog/confirm_cancel_order_dialog.dart';
@ -19,6 +22,9 @@ class OrdersLogDetailsPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
void showConfirmMessage(
CMCViewModel model, GetHHCAllPresOrdersResponseModel order) {
showDialog(
@ -35,7 +41,7 @@ class OrdersLogDetailsPage extends StatelessWidget {
if(model.state == ViewState.ErrorLocal) {
Utils.showErrorToast(model.error);
} else {
AppToast.showSuccessToast(message: "Done Successfully");
AppToast.showSuccessToast(message:TranslationBase.of(context).processDoneSuccessfully );
await model.getCmcAllPresOrders();
}
},
@ -78,7 +84,7 @@ class OrdersLogDetailsPage extends StatelessWidget {
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
left: 15, bottom: 15, top: 15,right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
@ -89,11 +95,12 @@ class OrdersLogDetailsPage extends StatelessWidget {
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
"Request ID",
TranslationBase
.of(context)
.requestID,
bold: false,
fontSize: 13,
),
@ -110,7 +117,7 @@ class OrdersLogDetailsPage extends StatelessWidget {
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
left: 15, bottom: 15, top: 15,right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
@ -121,11 +128,12 @@ class OrdersLogDetailsPage extends StatelessWidget {
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
"Status",
TranslationBase
.of(context)
.OrderStatus,
bold: false,
fontSize: 13,
),
@ -133,7 +141,9 @@ class OrdersLogDetailsPage extends StatelessWidget {
height: 4,
),
Texts(
order.description,
projectViewModel.isArabic ? order
.descriptionN : order.description,
fontSize: 22,
),
],
@ -142,7 +152,7 @@ class OrdersLogDetailsPage extends StatelessWidget {
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
left: 15, bottom: 15, top: 15,right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
@ -153,11 +163,10 @@ class OrdersLogDetailsPage extends StatelessWidget {
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
"Pickup Date",
TranslationBase.of(context).pickupDate,
bold: false,
fontSize: 13,
),
@ -166,8 +175,7 @@ class OrdersLogDetailsPage extends StatelessWidget {
),
Texts(
DateUtil.getDayMonthYearDateFormatted(
DateUtil.convertStringToDate(
order.createdOn)),
DateUtil.convertStringToDate(order.createdOn)),
fontSize: 22,
),
],
@ -176,7 +184,7 @@ class OrdersLogDetailsPage extends StatelessWidget {
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
left: 15, bottom: 15, top: 15,right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
@ -191,7 +199,7 @@ class OrdersLogDetailsPage extends StatelessWidget {
CrossAxisAlignment.start,
children: [
Texts(
"Location",
TranslationBase.of(context).orderLocation,
bold: false,
fontSize: 13,
),
@ -199,10 +207,11 @@ class OrdersLogDetailsPage extends StatelessWidget {
height: 4,
),
Texts(
order.nearestProjectDescription
.toString() ??
order.nearestProjectDescriptionN
.toString(),
!projectViewModel.isArabic?order.
projectDescription.toString() :
order
.projectDescriptionN
.toString(),
fontSize: 22,
),
],
@ -212,32 +221,33 @@ class OrdersLogDetailsPage extends StatelessWidget {
height: 12,
),
if (order.status == 1 ||order.status == 2 )
Center(
child: Container(
width: MediaQuery
.of(context)
.size
.width *
0.85,
child: SecondaryButton(
label: "Cancel".toUpperCase(),
onTap: () {
showConfirmMessage(model, order);
}
,
color: Colors.red[800],
disabled: false,
textColor: Theme
.of(context)
.backgroundColor),
),
Center(
child: Container(
width: MediaQuery
.of(context)
.size
.width *
0.85,
child: SecondaryButton(
label: TranslationBase.of(context).cancel.toUpperCase(),
onTap: () {
showConfirmMessage(model,
order);
}
,
color: Colors.red[800],
disabled: false,
textColor: Theme
.of(context)
.backgroundColor),
),
),
SizedBox(
height: 12,
),
],
),
);
height: 22,
),
],
),
);
}).toList())
],
),

@ -40,34 +40,32 @@ class _StartIndexForNewEReferralState extends State<StartIndexForNewEReferral>
@override
Widget build(BuildContext context) {
return Scaffold(
body: SafeArea(
child: SingleChildScrollView(
child: Container(
height: MediaQuery.of(context).size.height * 0.9,
child: PageView(
physics: NeverScrollableScrollPhysics(),
controller: _controller,
onPageChanged: (index) {
setState(() {
_currentIndex = index;
});
},
scrollDirection: Axis.horizontal,
children: <Widget>[
NewEReferralStepOnePage(
changePageViewIndex: changePageViewIndex,
createEReferralRequestModel: createEReferralRequestModel,
),
NewEReferralStepTowPage(
changePageViewIndex: changePageViewIndex,
createEReferralRequestModel: createEReferralRequestModel,
),
NewEReferralStepThreePage(
changePageViewIndex: changePageViewIndex,
createEReferralRequestModel: createEReferralRequestModel,
),
],
),
body: SingleChildScrollView(
child: Container(
height: MediaQuery.of(context).size.height * 0.9,
child: PageView(
physics: NeverScrollableScrollPhysics(),
controller: _controller,
onPageChanged: (index) {
setState(() {
_currentIndex = index;
});
},
scrollDirection: Axis.horizontal,
children: <Widget>[
NewEReferralStepOnePage(
changePageViewIndex: changePageViewIndex,
createEReferralRequestModel: createEReferralRequestModel,
),
NewEReferralStepTowPage(
changePageViewIndex: changePageViewIndex,
createEReferralRequestModel: createEReferralRequestModel,
),
NewEReferralStepThreePage(
changePageViewIndex: changePageViewIndex,
createEReferralRequestModel: createEReferralRequestModel,
),
],
),
),
),

@ -6,9 +6,9 @@ import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart';
import 'package:diplomaticquarterapp/core/viewModels/all_habib_medical_services/e_referral_view_model.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/e_referral_confirm_sms_dialog.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/dialogs/select_country_ingo_Dialog.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/dialogs/select_relation_type_dialog.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/e_referral_confirm_sms_dialog.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/balance/new_text_Field.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
@ -19,15 +19,17 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class NewEReferralStepOnePage extends StatefulWidget {
final CreateEReferralRequestModel createEReferralRequestModel;
final Function changePageViewIndex;
const NewEReferralStepOnePage({Key key, this.createEReferralRequestModel, this.changePageViewIndex}) : super(key: key);
const NewEReferralStepOnePage(
{Key key, this.createEReferralRequestModel, this.changePageViewIndex})
: super(key: key);
@override
_NewEReferralStepOnePageState createState() => _NewEReferralStepOnePageState();
_NewEReferralStepOnePageState createState() =>
_NewEReferralStepOnePageState();
}
class _NewEReferralStepOnePageState extends State<NewEReferralStepOnePage> {
@ -64,27 +66,25 @@ class _NewEReferralStepOnePageState extends State<NewEReferralStepOnePage> {
context: context,
barrierDismissible: false,
child: EReferralConfirmSMSDialog(
phoneNumber: _selectedCountry['code']+_mobileTextController.text,
onSucces: (){
Navigator.of(context).pop();
widget.changePageViewIndex(1);
widget.createEReferralRequestModel.requesterName=_nameTextController.text;
widget.createEReferralRequestModel.requesterContactNo = _selectedCountry['code'].toString().substring(1)+_mobileTextController.text;
widget.createEReferralRequestModel.requesterRelationship=_selectedRelation.iD;
}
),
phoneNumber: _selectedCountry['code'] + _mobileTextController.text,
onSucces: () {
Navigator.of(context).pop();
widget.changePageViewIndex(1);
widget.createEReferralRequestModel.requesterName =
_nameTextController.text;
widget.createEReferralRequestModel.requesterContactNo =
_selectedCountry['code'].toString().substring(1) +
_mobileTextController.text;
widget.createEReferralRequestModel.requesterRelationship =
_selectedRelation.iD;
}),
).then((value) {
print("dialog dismissed");
print(value);
if (value != null && value) {
}
if (value != null && value) {}
});
}
return BaseView<EReferralViewModel>(
onModelReady: (model) => model.getRelationTypes(),
builder: (_, model, widget) => AppScaffold(
@ -92,7 +92,7 @@ class _NewEReferralStepOnePageState extends State<NewEReferralStepOnePage> {
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(
margin: EdgeInsets.all(12),
margin: EdgeInsets.all(10),
child: Center(
child: FractionallySizedBox(
widthFactor: 0.9,
@ -100,11 +100,10 @@ class _NewEReferralStepOnePageState extends State<NewEReferralStepOnePage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 20,
height: 80,
),
Center(
child: Texts(
// TranslationBase.of(context).advancePaymentLabel,
"Referral requester information",
textAlign: TextAlign.center,
),
@ -185,34 +184,30 @@ class _NewEReferralStepOnePageState extends State<NewEReferralStepOnePage> {
),
),
bottomSheet: Container(
height: MediaQuery
.of(context)
.size
.height * 0.1,
height: MediaQuery.of(context).size.height * 0.1,
width: double.infinity,
padding: EdgeInsets.all(9),
child: SecondaryButton(
textColor: Colors.white,
label: "Next",
onTap: () async {
SendActivationCodeForEReferralRequestModel sendActivationCodeForEReferralRequestModel =
SendActivationCodeForEReferralRequestModel(
label: TranslationBase.of(context).next,
onTap: () async {
SendActivationCodeForEReferralRequestModel
sendActivationCodeForEReferralRequestModel =
SendActivationCodeForEReferralRequestModel(
zipCode: _selectedCountry['code'],
patientMobileNumber: int.parse(
_mobileTextController.text),);
await model.sendActivationCodeForEReferral(sendActivationCodeForEReferralRequestModel);
patientMobileNumber: int.parse(_mobileTextController.text),
);
await model.sendActivationCodeForEReferral(
sendActivationCodeForEReferralRequestModel);
showSMSDialog();
},
loading: model.state == ViewState.BusyLocal,
disabled:
_nameTextController.text.isEmpty ||
disabled: _nameTextController.text.isEmpty ||
_selectedRelation == null ||
_mobileTextController.text.isEmpty,
),
)));
}
void confirmSelectRelationTypeDialog(
@ -261,12 +256,8 @@ class _NewEReferralStepOnePageState extends State<NewEReferralStepOnePage> {
}
class MobileNumberTextFiled extends StatelessWidget {
const MobileNumberTextFiled({
Key key,
this.controller,
this.code
}) : super(key: key);
const MobileNumberTextFiled({Key key, this.controller, this.code})
: super(key: key);
final TextEditingController controller;
final String code;

@ -1,21 +1,23 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/create_e_referral_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_all_cities_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_all_projects_response_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/all_habib_medical_services/e_referral_view_model.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/dialogs/select_project_dialog.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/bottom_options/BottomSheet.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/alert_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import '../dialogs/select_city_dialog.dart';
class NewEReferralStepThreePage extends StatefulWidget {
final CreateEReferralRequestModel createEReferralRequestModel;
final Function changePageViewIndex;
@ -32,7 +34,8 @@ class NewEReferralStepThreePage extends StatefulWidget {
class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
TextEditingController _nameTextController = TextEditingController();
TextEditingController _mobileTextController = TextEditingController();
GetAllCitiesResponseModel _selectedCity;
GetAllProjectsResponseModel _selectedHospital;
GetAllSharedRecordsByStatusList selectedPatientFamily;
List<EReferralAttachment> medicalReportImages = [];
@ -50,6 +53,7 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
@override
Widget build(BuildContext context) {
return BaseView<EReferralViewModel>(
onModelReady: (model) => model.getAllProjects(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: false,
body: SingleChildScrollView(
@ -64,7 +68,7 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 20,
height: 80,
),
Center(
child: Texts(
@ -103,8 +107,13 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
ImageOptions.showImageOptions(context,
(String image) {
setState(() {
EReferralAttachment eReferralAttachment = new EReferralAttachment(fileName: 'image ${ medicalReportImages.length +1}.png',base64String: image );
medicalReportImages.add(eReferralAttachment);
EReferralAttachment eReferralAttachment =
new EReferralAttachment(
fileName:
'image ${medicalReportImages.length + 1}.png',
base64String: image);
medicalReportImages
.add(eReferralAttachment);
});
});
},
@ -158,15 +167,17 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
width: 8,
),
Texts(
medicalReportImages[index].fileName,
medicalReportImages[index]
.fileName,
),
],
),
InkWell(
onTap: () {
setState(() {
medicalReportImages
.remove(medicalReportImages[index]);
medicalReportImages.remove(
medicalReportImages[
index]);
});
},
child: Icon(
@ -205,7 +216,7 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
),
InkWell(
onTap: () =>
confirmSelectCityDialog(model.allCities),
confirmSelectHospital(model.allHospitals),
child: Container(
padding: EdgeInsets.all(12),
width: double.infinity,
@ -262,12 +273,12 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
],
),
),
if(isPatientInsured)
SizedBox(
height: 12,
),
if (isPatientInsured)
SizedBox(
height: 12,
),
Opacity(
opacity: isPatientInsured?1:0,
opacity: isPatientInsured ? 1 : 0,
child: Container(
padding: EdgeInsets.only(top: 10),
decoration: BoxDecoration(
@ -276,16 +287,21 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
),
child: Column(
children: [
InkWell(
onTap: () {
ImageOptions.showImageOptions(context,
(String image) {
setState(() {
EReferralAttachment
eReferralAttachment =
new EReferralAttachment(
fileName:
'image ${medicalReportImages.length + 1}.png',
base64String: image);
EReferralAttachment eReferralAttachment = new EReferralAttachment(fileName: 'image ${ medicalReportImages.length +1}.png',base64String: image );
insuredPatientImages=[eReferralAttachment];
insuredPatientImages = [
eReferralAttachment
];
});
});
},
@ -333,8 +349,8 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Icon(
FontAwesomeIcons.paperclip),
Icon(FontAwesomeIcons
.paperclip),
SizedBox(
width: 8,
),
@ -346,8 +362,9 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
InkWell(
onTap: () {
setState(() {
insuredPatientImages
.remove(insuredPatientImages[index]);
insuredPatientImages.remove(
insuredPatientImages[
index]);
});
},
child: Icon(
@ -378,50 +395,72 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
textColor: Colors.white,
label: "Submit",
onTap: () async {
this.widget.createEReferralRequestModel.medicalReportAttachment = medicalReportImages;
this.widget.createEReferralRequestModel.insuranceCardAttachment = insuredPatientImages.length !=0?insuredPatientImages[0]:null;
this.widget.createEReferralRequestModel.isInsuredPatient = isPatientInsured;
this
.widget
.createEReferralRequestModel
.medicalReportAttachment = medicalReportImages;
this
.widget
.createEReferralRequestModel
.insuranceCardAttachment =
insuredPatientImages.length != 0
? insuredPatientImages[0]
: null;
this.widget.createEReferralRequestModel.isInsuredPatient =
isPatientInsured;
// ToDo make the preferred Branch info dynamic
this.widget.createEReferralRequestModel.preferredBranchCode = 15;
this.widget.createEReferralRequestModel. preferredBranchName= "Arryan Hospital";
this.widget.createEReferralRequestModel.preferredBranchCode =
_selectedHospital.iD;
this.widget.createEReferralRequestModel.preferredBranchName =
_selectedHospital.desciption;
this.widget.createEReferralRequestModel.otherRelationship =
"";
// this.widget.createEReferralRequestModel.fullName= "";
this.widget.createEReferralRequestModel.otherRelationship= "";
// this.widget.createEReferralRequestModel.;
// this.widget.createEReferralRequestModel. preferredBranchName= "Arryan Hospital";
// this.widget.createEReferralRequestModel. preferredBranchName= "Arryan Hospital";
await model.createEReferral(this.widget.createEReferralRequestModel);
await model
.createEReferral(this.widget.createEReferralRequestModel)
.then((value) {
AlertDialogBox(
context: context,
confirmMessage:
TranslationBase.of(context).ereferralSaveSuccess +
value['ReferralNumber'].toString(),
okText: TranslationBase.of(context).ok,
okFunction: () {
AlertDialogBox.closeAlertDialog(context);
navigateToHome(context);
}).showAlertDialog(context);
});
},
loading: model.state == ViewState.BusyLocal,
disabled: medicalReportImages.length == 0 ,
disabled: medicalReportImages.length == 0,
),
)));
}
void confirmSelectCityDialog(List<GetAllCitiesResponseModel> cities) {
Future navigateToHome(context) async {
Navigator.of(context).popAndPushNamed(HOME);
}
void confirmSelectHospital(List<GetAllProjectsResponseModel> projects) {
showDialog(
context: context,
child: SelectCityDialog(
cities: cities,
selectedCity: _selectedCity,
child: SelectHospitalDialog(
hospitals: projects,
selectedHospital: _selectedHospital,
onValueSelected: (value) {
setState(() {
_selectedCity = value;
_selectedHospital = value;
});
},
),
);
}
String getRelationName() {
if (_selectedCity != null)
return _selectedCity.description;
if (_selectedHospital != null)
return _selectedHospital.desciption;
else
return "Select Relationship" /*TranslationBase.of(context).selectHospital*/;
return "Select Hospital*" /*TranslationBase.of(context).selectHospital*/;
}
}

@ -8,6 +8,7 @@ import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/dial
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/balance/new_text_Field.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/bottom_options/BottomSheet.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -71,7 +72,7 @@ class _NewEReferralStepTowPageState extends State<NewEReferralStepTowPage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 30,
height: 80,
),
Center(
child: Texts(
@ -179,7 +180,7 @@ class _NewEReferralStepTowPageState extends State<NewEReferralStepTowPage> {
padding: EdgeInsets.all(9),
child: SecondaryButton(
textColor: Colors.white,
label: "Next",
label: TranslationBase.of(context).next,
onTap: () async {
this.widget.changePageViewIndex(2);
this.widget.createEReferralRequestModel.identificationNo = int.parse( _patientIdentificationTextController.text);

@ -0,0 +1,129 @@
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_all_projects_response_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/material.dart';
class SelectHospitalDialog extends StatefulWidget {
final List<GetAllProjectsResponseModel> hospitals;
final Function(GetAllProjectsResponseModel) onValueSelected;
GetAllProjectsResponseModel selectedHospital;
SelectHospitalDialog(
{Key key, this.hospitals, this.onValueSelected, this.selectedHospital});
@override
_SelectHospitalDialogState createState() => _SelectHospitalDialogState();
}
class _SelectHospitalDialogState extends State<SelectHospitalDialog> {
@override
void initState() {
super.initState();
widget.selectedHospital = widget.selectedHospital ?? widget.hospitals[0];
}
@override
Widget build(BuildContext context) {
return SimpleDialog(
children: [
Column(
children: [
Divider(),
...List.generate(
widget.hospitals.length,
(index) => Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 2,
),
Row(
children: <Widget>[
Expanded(
flex: 1,
child: InkWell(
onTap: () {
setState(() {
widget.selectedHospital = widget.hospitals[index];
});
},
child: ListTile(
title: Text(widget.hospitals[index].desciption),
leading: Radio(
value: widget.hospitals[index],
groupValue: widget.selectedHospital,
activeColor: Colors.red[800],
onChanged: (value) {
setState(() {
widget.selectedHospital = value;
});
},
),
),
),
)
],
),
SizedBox(
height: 5.0,
),
],
),
),
SizedBox(
height: 5.0,
),
Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.pop(context);
},
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
child: Center(
child: Texts(
TranslationBase.of(context).cancel.toUpperCase(),
color: Colors.red,
),
),
),
),
),
),
Container(
width: 1,
height: 30,
color: Colors.grey[500],
),
Expanded(
flex: 1,
child: InkWell(
onTap: () {
widget.onValueSelected(widget.selectedHospital);
Navigator.pop(context);
},
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Center(
child: Texts(
TranslationBase.of(context).ok,
fontWeight: FontWeight.w400,
)),
),
),
),
],
)
],
)
],
);
}
}

@ -88,13 +88,13 @@ class _EReferralPageState extends State<EReferralPage>
Container(
width: MediaQuery.of(context).size.width * 0.37,
child: Center(
child: Texts("New Referral"),
child: Texts("New Referral", fontSize: 14.0),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.37,
child: Center(
child: Texts("Search for Referrals"),
child: Texts("Search for Referrals", fontSize: 14.0),
),
),
],

@ -0,0 +1,100 @@
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_ereferral_response_model.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
class ReferralDetails extends StatefulWidget {
GetEReferralResponseModel getEReferralResponseModel;
ReferralDetails({@required this.getEReferralResponseModel});
@override
_ReferralDetailsState createState() => _ReferralDetailsState();
}
class _ReferralDetailsState extends State<ReferralDetails> {
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowDecPage: false,
isShowAppBar: true,
appBarTitle: "Referral Details",
body: Container(
margin: EdgeInsets.only(top: 20.0, left: 20.0, right: 20.0),
child: Table(
border: TableBorder.all(color: Colors.grey[600]),
children: [
TableRow(children: [
TableCell(
child: _getNormalText(
TranslationBase.of(context).referralStatus)),
TableCell(
child:
_getNormalText(widget.getEReferralResponseModel.status)),
]),
TableRow(children: [
TableCell(
child:
_getNormalText(TranslationBase.of(context).patientName)),
TableCell(
child: _getNormalText(
widget.getEReferralResponseModel.patientName)),
]),
TableRow(children: [
TableCell(
child: _getNormalText(
TranslationBase.of(context).referralNumber)),
TableCell(
child: _getNormalText(widget
.getEReferralResponseModel.referralNumber
.toString())),
]),
TableRow(children: [
TableCell(
child: _getNormalText(
TranslationBase.of(context).referralDate)),
TableCell(
child: _getNormalText(DateUtil.getMonthDayYearDateFormatted(
DateUtil.convertStringToDateNoTimeZone(
widget.getEReferralResponseModel.referralDate)))),
]),
TableRow(children: [
TableCell(
child: _getNormalText(TranslationBase.of(context).hospital)),
TableCell(
child: _getNormalText(
widget.getEReferralResponseModel.preferredBranchName)),
]),
],
),
),
);
}
_getNormalText(text) {
return Container(
color: Colors.white,
padding: EdgeInsets.only(top: 12.0, bottom: 12.0),
child: Text(text,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 14,
fontFamily: 'Open-Sans',
letterSpacing: 0.5,
color: Colors.grey[800])),
);
}
_getHeadingText(text) {
return Container(
padding: EdgeInsets.only(bottom: 10.0),
child: Text(text,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 26.0,
fontFamily: 'Open-Sans',
letterSpacing: 0.5,
color: Colors.white)));
}
}

@ -1,17 +1,25 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_ereferral_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/search_criteria_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/search_e_referral_request_model.dart';
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/e_referral_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/all_habib_medical_services/e_referral_view_model.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/referral_details.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/balance/new_text_Field.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/errors/app_embedded_error.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../../../locator.dart';
import 'New_E_Referral/new_e_referral_step_one_page.dart';
import 'dialogs/select_country_ingo_Dialog.dart';
import 'dialogs/select_search_criteria_dialog.dart';
@ -28,6 +36,9 @@ class _SearchForReferralsPageState extends State<SearchForReferralsPage> {
TextEditingController _mobileTextController = TextEditingController();
bool _isSubmitted = false;
AuthenticatedUser authUser;
List<GetEReferralResponseModel> allReferrals = List();
dynamic _selectedCountry = {
"name": "Saudi Arabia",
@ -41,6 +52,13 @@ class _SearchForReferralsPageState extends State<SearchForReferralsPage> {
SearchCriteriaModel selectedCriteria = SearchCriteriaModel(
name: "Identification Number", nameAr: "رقم المحول", value: 1);
@override
void initState() {
authUser = new AuthenticatedUser();
WidgetsBinding.instance.addPostFrameCallback((_) => getPatientData());
super.initState();
}
@override
Widget build(BuildContext context) {
return BaseView<EReferralViewModel>(
@ -117,35 +135,102 @@ class _SearchForReferralsPageState extends State<SearchForReferralsPage> {
? "11"
: _selectedCountry["code"],
),
SizedBox(
height: 12,
),
if ((model.state == ViewState.Idle &&
model.allReferral.length == 0))
Text("There's No Referral To deliver"),
if ((
model.state == ViewState.ErrorLocal))
AppEmbeddedError( error:model.error),
NetworkBaseView(
baseViewModel: model,
child: ListView.builder(
shrinkWrap: true,
scrollDirection: Axis.vertical,
itemCount: model.allReferral == null
? 0
: model.allReferral.length < 3
? model.allReferral.length
: 3,
itemBuilder: (BuildContext context, int index) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 0.2),
child: Container(
child: Texts("TODO add referral info"),
allReferrals.length != 0
? Container(
transform:
Matrix4.translationValues(0.0, -40.0, 0.0),
child: ListView.builder(
shrinkWrap: true,
scrollDirection: Axis.vertical,
physics: ScrollPhysics(),
itemCount: allReferrals.length,
itemBuilder:
(BuildContext context, int index) {
return Container(
child: InkWell(
onTap: () {
navigateToReferralDetails(
allReferrals[index]);
},
child: Card(
margin: EdgeInsets.only(bottom: 10.0),
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(10),
),
child: Container(
margin: EdgeInsets.only(
left: 10.0, right: 10.0),
padding: EdgeInsets.all(5.0),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Container(
margin:
EdgeInsets.all(5.0),
child: Text(
allReferrals[index]
.status,
style: TextStyle(
fontSize: 16.0))),
Container(
margin:
EdgeInsets.all(5.0),
child: Text(
allReferrals[index]
.patientName,
style: TextStyle(
fontSize: 16.0,
color: Colors
.grey[600]))),
Container(
margin:
EdgeInsets.all(5.0),
child: Text(
allReferrals[index]
.preferredBranchName,
style: TextStyle(
fontSize: 16.0,
color: Colors
.grey[600]))),
Container(
margin:
EdgeInsets.all(5.0),
child: Text(
DateUtil.getMonthDayYearDateFormatted(
DateUtil.convertStringToDateNoTimeZone(
allReferrals[
index]
.referralDate)),
style: TextStyle(
fontSize: 16.0,
color: Colors
.grey[600]))),
],
),
Container(
child: Icon(Icons.arrow_forward,
size: 20.0,
color: Colors.grey[700]),
),
],
),
),
),
));
},
),
);
},
),
),
)
: Container(),
SizedBox(
height: 70.0,
)
],
),
),
@ -160,10 +245,13 @@ class _SearchForReferralsPageState extends State<SearchForReferralsPage> {
textColor: Colors.white,
label: "Search",
onTap: () async {
GifLoaderDialogUtils.showMyDialog(context);
SearchEReferralRequestModel searchEReferralRequestModel =
new SearchEReferralRequestModel(
patientMobileNumber:
_selectedCountry['code'] + _mobileTextController.text,
patientMobileNumber: _selectedCountry['code']
.toString()
.replaceFirst("+", "") +
_mobileTextController.text,
);
if (selectedCriteria.value == 1) {
searchEReferralRequestModel.identificationNo =
@ -174,9 +262,19 @@ class _SearchForReferralsPageState extends State<SearchForReferralsPage> {
int.parse(_searchTextController.text);
searchEReferralRequestModel.identificationNo = '';
}
await model.getEReferrals(searchEReferralRequestModel);
setState(() {
_isSubmitted = true;
await model
.getEReferrals(searchEReferralRequestModel)
.then((response) {
GifLoaderDialogUtils.hideDialog(context);
print(response['List_EReferrals']);
allReferrals.clear();
setState(() {
response['List_EReferrals'].forEach((data) {
allReferrals
.add(GetEReferralResponseModel.fromJson(data));
_isSubmitted = true;
});
});
});
},
loading: model.state == ViewState.BusyLocal,
@ -186,6 +284,49 @@ class _SearchForReferralsPageState extends State<SearchForReferralsPage> {
)));
}
void getEreferralsIsLogin() {
EReferralService _eReferralService = locator<EReferralService>();
String mobileNumber;
String zipCode;
if (authUser.mobileNumber.length > 9) {
mobileNumber =
authUser.mobileNumber.substring(1, authUser.mobileNumber.length);
} else {
mobileNumber = authUser.mobileNumber;
}
if (authUser.outSA == 0) {
zipCode = "966";
} else {
zipCode = "971";
}
_eReferralService
.getEReferralsIfLogin(zipCode + mobileNumber)
.then((response) {
allReferrals.clear();
setState(() {
response['List_EReferrals'].forEach((data) {
allReferrals.add(GetEReferralResponseModel.fromJson(data));
});
});
}).catchError(() {});
}
getPatientData() async {
AppSharedPreferences sharedPref = AppSharedPreferences();
if (await sharedPref.getObject(USER_PROFILE) != null) {
var data =
AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
setState(() {
authUser = data;
getEreferralsIsLogin();
});
}
}
void confirmSelectCountryTypeDialog() {
showDialog(
context: context,
@ -200,6 +341,15 @@ class _SearchForReferralsPageState extends State<SearchForReferralsPage> {
);
}
navigateToReferralDetails(
GetEReferralResponseModel getEReferralResponseModel) {
Navigator.push(
context,
FadePage(
page: ReferralDetails(
getEReferralResponseModel: getEReferralResponseModel)));
}
String getCountryName() {
if (_selectedCountry != null)
return _selectedCountry["name"];

@ -29,7 +29,7 @@ class _ConfirmCancelOrderDialogState extends State<ConfirmCancelOrderDialog> {
contentPadding: EdgeInsets.fromLTRB(28.0, 24.0, 28.0, 0.0),
title: Center(
child: Texts(
"Confirm",
TranslationBase.of(context).confirm,
color: Colors.black,
),
),
@ -39,7 +39,7 @@ class _ConfirmCancelOrderDialogState extends State<ConfirmCancelOrderDialog> {
Divider(),
Center(
child: Texts(
"Are you sure!! want to cancel this order",
TranslationBase.of(context).cancelOrderMsg ,
color: Colors.grey,
),
),

@ -0,0 +1,146 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.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 LocationPage extends StatefulWidget {
final Function(PickResult) onPick;
final double latitude;
final double longitude;
final dynamic model;
const LocationPage({Key key, this.onPick, this.latitude, this.longitude, this.model})
: super(key: key);
@override
_LocationPageState createState() =>
_LocationPageState();
}
class _LocationPageState
extends State<LocationPage> {
double latitude = 0;
double longitude = 0;
@override
void initState() {
latitude = widget.latitude;
longitude = widget.longitude;
super.initState();
}
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<HomeHealthCareViewModel>(
onModelReady: (model) {},
builder: (_, model, widget) => AppScaffold(
isShowDecPage: false,
isShowAppBar: true,
baseViewModel: model,
body: PlacePicker(
apiKey: GOOGLE_API_KEY,
enableMyLocationButton: true,
automaticallyImplyAppBarLeading: false,
autocompleteOnTrailingWhitespace: true,
selectInitialPosition: true,
autocompleteLanguage: projectViewModel.currentLanguage,
enableMapTypeButton: true,
searchForInitialValue: false,
onPlacePicked: (PickResult result) {
print(result.adrAddress);
},
selectedPlaceWidgetBuilder:
(_, selectedPlace, state, isSearchBarFocused) {
print("state: $state, isSearchBarFocused: $isSearchBarFocused");
return isSearchBarFocused
? Container()
: FloatingCard(
bottomPosition: 0.0,
leftPosition: 0.0,
rightPosition: 0.0,
width: 500,
borderRadius: BorderRadius.circular(12.0),
child: state == SearchingState.Searching
? Center(child: CircularProgressIndicator())
: Container(
margin: EdgeInsets.all(12),
child: Column(
children: [
SecondaryButton(
color: Colors.grey[800],
textColor: Colors.white,
onTap: () async {
AddNewAddressRequestModel
addNewAddressRequestModel =
new AddNewAddressRequestModel(
customer: Customer(addresses: [
Addresses(
address1:
selectedPlace.formattedAddress,
address2: selectedPlace
.formattedAddress,
customerAttributes: "",
city: "",
createdOnUtc: "",
id: 0,
latLong: "$latitude,$longitude",
email: "")
]),
);
selectedPlace.addressComponents.forEach((e) {
if (e.types.contains("country")) {
addNewAddressRequestModel.customer
.addresses[0].country = e.longName;
}
if (e.types.contains("postal_code")) {
addNewAddressRequestModel.customer
.addresses[0].zipPostalCode =
e.longName;
}
if (e.types.contains("locality")) {
addNewAddressRequestModel.customer
.addresses[0].city =
e.longName;
}
});
await model.addAddressInfo(
addNewAddressRequestModel: addNewAddressRequestModel);
if (model.state == ViewState.ErrorLocal) {
Utils.showErrorToast(model.error);
} else {
AppToast.showSuccessToast(
message: "Address Added Successfully");
}
Navigator.of(context).pop();
},
label: TranslationBase.of(context).addNewAddress,
),
],
),
),
);
},
initialPosition: LatLng(latitude, longitude),
useCurrentLocation: false,
),
));
}
}

@ -2,15 +2,16 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/PatientERHHCInsertServicesList.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/pickupLocation/PickupLocationFromMap.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:geolocator/geolocator.dart';
import 'package:google_maps_place_picker/google_maps_place_picker.dart';
import 'package:provider/provider.dart';
class NewHomeHealthCareStepOnePage extends StatefulWidget {
final PatientERInsertPresOrderRequestModel
@ -45,6 +46,8 @@ class _NewHomeHealthCareStepOnePageState extends State<NewHomeHealthCareStepOneP
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
isShowAppBar: false,
baseViewModel: widget.model,
@ -64,7 +67,9 @@ class _NewHomeHealthCareStepOnePageState extends State<NewHomeHealthCareStepOneP
height: 12,
),
Texts(
"Select Home Health Care Services",
TranslationBase
.of(context)
.selectHomeHealthCareServices,
textAlign: TextAlign.center,
),
Column(
@ -90,13 +95,13 @@ class _NewHomeHealthCareStepOnePageState extends State<NewHomeHealthCareStepOneP
.patientERInsertPresOrderRequestModel
.patientERHHCInsertServicesList
.add(PatientERHHCInsertServicesList(
recordID: widget
.patientERInsertPresOrderRequestModel
.patientERHHCInsertServicesList
.length,
serviceID: service.serviceID,
serviceName:
service.description));
recordID: widget
.patientERInsertPresOrderRequestModel
.patientERHHCInsertServicesList
.length,
serviceID: service.serviceID,
serviceName:
service.description));
else
removeSelected(service.serviceID);
// widget.patientERInsertPresOrderRequestModel
@ -107,7 +112,8 @@ class _NewHomeHealthCareStepOnePageState extends State<NewHomeHealthCareStepOneP
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Texts(
service.description,
projectViewModel.isArabic ? service
.descriptionN : service.description,
fontSize: 15,
),
),
@ -133,14 +139,23 @@ class _NewHomeHealthCareStepOnePageState extends State<NewHomeHealthCareStepOneP
Container(
width: MediaQuery.of(context).size.width * 0.9,
child: SecondaryButton(
label: "Next",
label: TranslationBase
.of(context)
.next,
disabled: this
.widget
.patientERInsertPresOrderRequestModel
.patientERHHCInsertServicesList
.length == 0,
onTap: (){
widget.changePageViewIndex(1);
.widget
.patientERInsertPresOrderRequestModel
.patientERHHCInsertServicesList
.length == 0 || widget.model.state == ViewState.BusyLocal,
color: Colors.grey[800],
loading: widget.model.state == ViewState.BusyLocal,
onTap: () async {
await widget.model.getCustomerInfo();
if (widget.model.state == ViewState.ErrorLocal) {
Utils.showErrorToast();
} else {
widget.changePageViewIndex(1);
}
},
textColor: Theme.of(context).backgroundColor),
),

@ -3,12 +3,15 @@ import 'dart:async';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:provider/provider.dart';
class NewHomeHealthCareStepThreePage extends StatefulWidget {
final PatientERInsertPresOrderRequestModel
@ -62,6 +65,8 @@ class _NewHomeHealthCareStepThreePageState
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
isShowDecPage: false,
baseViewModel: widget.model,
@ -73,7 +78,7 @@ class _NewHomeHealthCareStepThreePageState
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts('Order Details'),
Texts(TranslationBase.of(context).orderDetails, fontWeight: FontWeight.bold,),
SizedBox(
height: 12,
),
@ -85,7 +90,7 @@ class _NewHomeHealthCareStepThreePageState
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts('Location :'),
Texts(TranslationBase.of(context).orderLocation, fontWeight: FontWeight.bold),
SizedBox(
height: 12,
),
@ -106,7 +111,7 @@ class _NewHomeHealthCareStepThreePageState
SizedBox(
height: 12,
),
Texts('Selected Service :'),
Texts(TranslationBase.of(context).selectedService + " : ", fontWeight: FontWeight.bold),
...List.generate(
widget.patientERInsertPresOrderRequestModel
.patientERHHCInsertServicesList.length,
@ -115,7 +120,7 @@ class _NewHomeHealthCareStepThreePageState
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
'Service Name :',
TranslationBase.of(context).serviceName,
fontSize: 12,
),
SizedBox(
@ -151,10 +156,11 @@ class _NewHomeHealthCareStepThreePageState
Container(
width: MediaQuery.of(context).size.width * 0.9,
child: SecondaryButton(
label: "Confirm",
label: TranslationBase.of(context).confirm,
disabled: widget.patientERInsertPresOrderRequestModel
.patientERHHCInsertServicesList.length ==
0,
color: Colors.grey[800],
onTap: () async {
await widget.model.insertPresPresOrder(
order: widget.patientERInsertPresOrderRequestModel);

@ -1,17 +1,21 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/select_location_dialog.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/close_back.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_flutter/google_maps_flutter.dart';
import 'package:google_maps_place_picker/google_maps_place_picker.dart';
import 'package:provider/provider.dart';
import 'location_page.dart';
class NewHomeHealthCareStepTowPage extends StatefulWidget {
final Function(PickResult) onPick;
final double latitude;
@ -40,73 +44,163 @@ class _NewHomeHealthCareStepTowPageState
extends State<NewHomeHealthCareStepTowPage> {
double latitude = 0;
double longitude = 0;
AddressInfo _selectedAddress;
@override
void initState() {
if (widget.patientERInsertPresOrderRequestModel.latitude == null) {
latitude = widget.latitude;
longitude = widget.longitude;
setLatitudeAndLongitude();
} else {
latitude = widget.patientERInsertPresOrderRequestModel.latitude;
longitude = widget.patientERInsertPresOrderRequestModel.longitude;
}
super.initState();
}
setLatitudeAndLongitude({bool isSetState = false, String latLong}) {
if (latLong == null)
latLong = widget.model.addressesList[widget.model.addressesList
.length - 1].latLong;
List latLongArr = latLong.split(',');
latitude = double.parse(latLongArr[0]);
longitude = double.parse(latLongArr[1]);
}
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
isShowDecPage: false,
body: PlacePicker(
apiKey: GOOGLE_API_KEY,
enableMyLocationButton: true,
automaticallyImplyAppBarLeading: false,
autocompleteOnTrailingWhitespace: true,
selectInitialPosition: true,
autocompleteLanguage: projectViewModel.currentLanguage,
enableMapTypeButton: true,
onPlacePicked: (PickResult result) {
print(result.adrAddress);
widget.changePageViewIndex(3);
},
selectedPlaceWidgetBuilder:
(_, selectedPlace, state, isSearchBarFocused) {
print("state: $state, isSearchBarFocused: $isSearchBarFocused");
return isSearchBarFocused
? Container()
: FloatingCard(
bottomPosition: 0.0,
leftPosition: 0.0,
rightPosition: 0.0,
width: 500,
borderRadius: BorderRadius.circular(12.0),
child: state == SearchingState.Searching
? Center(child: CircularProgressIndicator())
: Container(
margin: EdgeInsets.all(12),
child: SecondaryButton(
color: Colors.grey[800],
textColor: Colors.white,
onTap: () {
setState(() {
widget.patientERInsertPresOrderRequestModel
.latitude =
selectedPlace.geometry.location.lat;
widget.patientERInsertPresOrderRequestModel
.longitude =
selectedPlace.geometry.location.lng;
});
widget.changePageViewIndex(3);
},
label: TranslationBase.of(context).next,
),
),
);
body: Stack(
children: [
PlacePicker(
apiKey: GOOGLE_API_KEY,
enableMyLocationButton: true,
automaticallyImplyAppBarLeading: false,
autocompleteOnTrailingWhitespace: true,
selectInitialPosition: true,
autocompleteLanguage: projectViewModel.currentLanguage,
enableMapTypeButton: true,
searchForInitialValue: false,
onPlacePicked: (PickResult result) {
print(result.adrAddress);
widget.changePageViewIndex(3);
},
selectedPlaceWidgetBuilder:
(_, selectedPlace, state, isSearchBarFocused) {
print("state: $state, isSearchBarFocused: $isSearchBarFocused");
return isSearchBarFocused
? Container()
: FloatingCard(
bottomPosition: 0.0,
leftPosition: 0.0,
rightPosition: 0.0,
width: 500,
borderRadius: BorderRadius.circular(12.0),
child: state == SearchingState.Searching
? Center(child: CircularProgressIndicator())
: Container(
margin: EdgeInsets.all(12),
child: Column(
children: [
SecondaryButton(
color: Colors.grey[800],
textColor: Colors.white,
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (BuildContext context) =>
LocationPage(
latitude: latitude,
longitude: longitude,
),
),
);
},
label: TranslationBase.of(context).addNewAddress,
),
SizedBox(height: 10,),
SecondaryButton(
color: Colors.red[800],
textColor: Colors.white,
onTap: () {
setState(() {
widget.patientERInsertPresOrderRequestModel
.latitude =
selectedPlace.geometry.location.lat;
widget.patientERInsertPresOrderRequestModel
.longitude =
selectedPlace.geometry.location.lng;
});
widget.changePageViewIndex(3);
},
label: TranslationBase.of(context).confirm,
),
],
),
),
);
},
initialPosition: LatLng(latitude, longitude),
useCurrentLocation: false,
),
Container(
child: InkWell(
onTap: () =>
confirmSelectLocationDialog(widget.model.addressesList),
child: Container(
padding: EdgeInsets.all(10),
width: double.infinity,
// height: 65,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Colors.white),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Expanded(child: Texts(getAddressName(), fontSize: 14,),),
Icon(Icons.arrow_drop_down)
],
),
),
),
height: 56, width: double.infinity, color: Theme
.of(context)
.scaffoldBackgroundColor,
)
],
),
);
}
void confirmSelectLocationDialog(List<AddressInfo> addresses) {
showDialog(
context: context,
child: SelectLocationDialog(
addresses: addresses,
selectedAddress: _selectedAddress
,
onValueSelected: (value) {
setLatitudeAndLongitude(latLong: value.latLong);
setState(() {
_selectedAddress = value;
});
},
initialPosition: LatLng(latitude, longitude),
useCurrentLocation: true,
),
);
}
String getAddressName() {
if (_selectedAddress != null)
return _selectedAddress.address1;
else
return TranslationBase.of(context).selectAddress;
}
}

@ -3,16 +3,19 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealth
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/Dialog/confirm_cancel_order_dialog.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_three_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/material.dart';
import 'package:geolocator/geolocator.dart';
import 'package:provider/provider.dart';
import '../StepsWidget.dart';
import 'new_Home_health_care_step_one_page.dart';
@ -84,7 +87,7 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
if (model.state == ViewState.ErrorLocal) {
Utils.showErrorToast(model.error);
} else {
AppToast.showSuccessToast(message: "Done Successfully");
AppToast.showSuccessToast(message:TranslationBase.of(context).processDoneSuccessfully );
await model.getHHCAllPresOrders();
// await model.getHHCAllServices();
}
@ -92,6 +95,8 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
));
}
ProjectViewModel projectViewModel = Provider.of(context);
return Scaffold(
body: SafeArea(
child: SingleChildScrollView(
@ -99,7 +104,6 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
height: MediaQuery.of(context).size.height * 0.8,
child: Column(
children: [
Container(
margin: EdgeInsets.only(left: MediaQuery.of(context).size.width*0.05, right: MediaQuery.of(context).size.width*0.05),
child: StepsWidget(
@ -138,7 +142,7 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
left: 15, bottom: 15, top: 15,right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
@ -152,7 +156,9 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
"Request ID",
TranslationBase
.of(context)
.requestID,
bold: false,
fontSize: 13,
),
@ -169,7 +175,7 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
left: 15, bottom: 15, top: 15,right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
@ -183,7 +189,9 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
"Status",
TranslationBase
.of(context)
.OrderStatus,
bold: false,
fontSize: 13,
),
@ -191,7 +199,11 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
height: 4,
),
Texts(
widget.model.pendingOrder.description,
projectViewModel.isArabic ? widget
.model.pendingOrder
.descriptionN : widget.model
.pendingOrder.description,
fontSize: 22,
),
],
@ -200,7 +212,7 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
left: 15, bottom: 15, top: 15,right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
@ -214,7 +226,7 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
"Pickup Date",
TranslationBase.of(context).pickupDate,
bold: false,
fontSize: 13,
),
@ -235,7 +247,7 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
(index) => Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
left: 15, bottom: 15, top: 15,right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
@ -250,7 +262,9 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
CrossAxisAlignment.start,
children: [
Texts(
"Service Name",
TranslationBase
.of(context)
.serviceName,
bold: false,
fontSize: 13,
),
@ -258,7 +272,12 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
height: 4,
),
Texts(
widget.model.hhcAllOrderDetail[index]
projectViewModel.isArabic
? widget.model
.hhcAllOrderDetail[index]
.descriptionN
: widget.model
.hhcAllOrderDetail[index]
.description,
fontSize: 22,
bold: true,
@ -275,7 +294,7 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
width:
MediaQuery.of(context).size.width * 0.85,
child: SecondaryButton(
label: "Cancel".toUpperCase(),
label: TranslationBase.of(context).cancel.toUpperCase(),
onTap: () {
showConfirmMessage(widget.model,
widget.model.hhcAllOrderDetail[0]);

@ -1,69 +0,0 @@
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package: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:hexcolor/hexcolor.dart';
import 'home_health_care_page.dart';
class HomeHealthCareIndexPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).serviceInformation,
body: SingleChildScrollView(
padding: EdgeInsets.all(12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(
TranslationBase.of(context).homeHealthCare,
fontWeight: FontWeight.normal,
fontSize: 25,
color: Color(0xff60686b),
),
SizedBox(
height: 12,
),
Texts(
TranslationBase.of(context).homeHealthCareText,
fontWeight: FontWeight.normal,
fontSize: 17,
),
SizedBox(
height: 22,
),
Center(
child: Image.asset(
'assets/images/AlHabibMedicalService/Wifi-AR.png')),
SizedBox(
height: 77,
),
],
)),
bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.10,
width: double.infinity,
child: Column(
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width * 0.9,
child: SecondaryButton(
onTap: () => Navigator.push(
context,
FadePage(
page: HomeHealthCarePage(),
),
),
label: TranslationBase.of(context).loginRegister,
textColor: Theme.of(context).backgroundColor),
),
],
),
));
}
}

@ -42,6 +42,7 @@ class _HomeHealthCarePageState extends State<HomeHealthCarePage>
},
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
description: TranslationBase.of(context).HHCNotAuthMsg,
appBarTitle: TranslationBase.of(context).homeHealthCare,
body: Scaffold(
extendBodyBehindAppBar: true,

@ -2,13 +2,16 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hhc_all_pres_orders_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'Dialog/confirm_cancel_order_dialog.dart';
@ -19,6 +22,8 @@ class OrdersLogDetailsPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
void showConfirmMessage(
HomeHealthCareViewModel model, GetHHCAllPresOrdersResponseModel order) {
showDialog(
@ -29,212 +34,219 @@ class OrdersLogDetailsPage extends StatelessWidget {
UpdatePresOrderRequestModel updatePresOrderRequestModel =
UpdatePresOrderRequestModel(
presOrderID: order.iD,
rejectionReason: "",
presOrderStatus: 4, editedBy: 3);
rejectionReason: "",
presOrderStatus: 4, editedBy: 3);
await model.updateHHCPresOrder(updatePresOrderRequestModel);
if(model.state == ViewState.ErrorLocal) {
Utils.showErrorToast(model.error);
Utils.showErrorToast(model.error);
} else {
AppToast.showSuccessToast(message: "Done Successfully");
AppToast.showSuccessToast(message:TranslationBase.of(context).processDoneSuccessfully );
await model.getHHCAllPresOrders();
// await model.getHHCAllServices();
// await model.getHHCAllServices();
}
},
));
}
return AppScaffold(
isShowAppBar: false,
baseViewModel: model,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(
margin: EdgeInsets.all(12),
child: Center(
child: FractionallySizedBox(
widthFactor: 0.94,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 50,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: model.hhcAllPresOrders.map((order) {
return Container(
width: double.infinity,
margin: EdgeInsets.only(top: 15),
decoration: BoxDecoration(
border:
Border.all(color: Colors.grey, width: 1),
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 12,
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
"Request ID",
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
order.iD.toString(),
fontSize: 22,
isShowAppBar: false,
baseViewModel: model,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(
margin: EdgeInsets.all(12),
child: Center(
child: FractionallySizedBox(
widthFactor: 0.94,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 50,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: model.hhcAllPresOrders.map((order) {
return Container(
width: double.infinity,
margin: EdgeInsets.only(top: 15),
decoration: BoxDecoration(
border:
Border.all(color: Colors.grey, width: 1),
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 12,
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15, right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
],
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
TranslationBase
.of(context)
.requestID,
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
order.iD.toString(),
fontSize: 22,
),
],
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
"Status",
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
order.description,
fontSize: 22,
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15, right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
],
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
TranslationBase
.of(context)
.OrderStatus,
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
projectViewModel.isArabic ? order.descriptionN : order.description,
fontSize: 22,
),
],
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
"Pickup Date",
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
DateUtil.getDayMonthYearDateFormatted(
DateUtil.convertStringToDate(
order.createdOn)),
fontSize: 22,
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15, right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
],
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
TranslationBase
.of(context)
.pickupDate,
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
DateUtil.getDayMonthYearDateFormatted(
DateUtil.convertStringToDate(order.createdOn)),
fontSize: 22,
),
],
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
"Location",
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
order.nearestProjectDescription
.toString() ??
order.nearestProjectDescriptionN
.toString(),
fontSize: 22,
),
SizedBox(
height: 12,
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15, right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
],
),
),
SizedBox(
height: 12,
),
if (order.status == 1 ||order.status == 2 )
Center(
child: Container(
width: MediaQuery
.of(context)
.size
.width *
0.85,
child: SecondaryButton(
label: "Cancel".toUpperCase(),
onTap: () {
showConfirmMessage(model, order);
}
,
color: Colors.red[800],
disabled: false,
textColor: Theme
.of(context)
.backgroundColor),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
TranslationBase.of(context).orderLocation,
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
!projectViewModel.isArabic ?order.nearestProjectDescription
.toString() :
order.nearestProjectDescriptionN
.toString(),
fontSize: 22,
),
],
),
),
SizedBox(
height: 12,
),
if (order.status == 1 ||order.status == 2 )
Center(
child: Container(
width: MediaQuery
.of(context)
.size
.width *
0.85,
child: SecondaryButton(
label: "Cancel".toUpperCase(),
onTap: () {
showConfirmMessage(model, order);
}
,
color: Colors.red[800],
disabled: false,
textColor: Theme
.of(context)
.backgroundColor),
),
SizedBox(
height: 12,
),
SizedBox(
height: 12,
),
],
),

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/%E2%80%8B%20hea
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/e_referral_index_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/h2o_index_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health-weather/health-weather-indicator.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_converter.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/my_web_view.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/parking_page.dart';
@ -22,10 +23,12 @@ import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart';
import 'package:diplomaticquarterapp/pages/symptom-checker/info.dart';
import 'package:diplomaticquarterapp/routes.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/data_display/services)contaniner.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -224,7 +227,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
),
imageLocation:
'assets/images/new-design/family_menu_icon_red.png',
title: 'My Family',
title: TranslationBase.of(context).family,
),
if(projectViewModel.havePrivilege(35))
ServicesContainer(
@ -322,20 +325,23 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
"https://hmgwebservices.com/vt_mobile/html/index.html"),
imageLocation:
'assets/images/new-design/virtual_tour_icon.png',
title: 'Virtual Tour',
title: TranslationBase.of(context).vTour,
),
ServicesContainer(
onTap: () {
Navigator.of(context).push(MaterialPageRoute(
Navigator.of(context).push(
MaterialPageRoute(
builder: (BuildContext context) => MyWebView(
title: "HMG News",
selectedUrl:
"https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live",
)));
title: TranslationBase.of(context).hmgNews,
selectedUrl:
"https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live",
),
),
);
},
imageLocation:
'assets/images/new-design/twitter_dashboard_icon.png',
title: 'Latest News',
title: TranslationBase.of(context).latestNews,
),
ServicesContainer(
onTap: () => Navigator.push(
@ -345,7 +351,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
),
),
imageLocation: 'assets/images/new-design/find_us_icon.png',
title: 'Find Us',
title: TranslationBase.of(context).findUs,
),
],
),

@ -0,0 +1,137 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/weather/weather_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.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/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:diplomaticquarterapp/widgets/weather_slider/weather_slider.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart';
class HealthWeatherIndicator extends StatefulWidget {
@override
_HospitalsPageState createState() => _HospitalsPageState();
}
class _HospitalsPageState extends State<HealthWeatherIndicator> {
var data;
LocationUtils locationUtils;
AppSharedPreferences sharedPref = AppSharedPreferences();
var weather = '--';
@override
void initState() {
locationUtils =
new LocationUtils(isShowConfirmDialog: true, context: context);
WidgetsBinding.instance
.addPostFrameCallback((_) => locationUtils.getCurrentLocation());
getWeather();
super.initState();
}
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<WeatherViewModel>(
onModelReady: (model) => model.getWeatherData(),
allowAny: true,
builder: (_, mode, widget) => AppScaffold(
isShowDecPage: false,
appBarTitle: TranslationBase.of(context).healthWeatherIndicators,
isShowAppBar: true,
body: mode.weatherIndicatorData.length > 0
? SingleChildScrollView(
child: Column(children: [
Container(
margin: EdgeInsets.all(8),
width: double.infinity,
height: 150,
decoration: BoxDecoration(
image: DecorationImage(
image:
ExactAssetImage('assets/images/Weather_img.png'),
fit: BoxFit.cover,
),
borderRadius: BorderRadius.circular(8.0)),
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 10.0),
child: Row(
children: [
Expanded(
flex: 3,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context)
.healthWeatherIndicators,
color: Colors.white,
fontWeight: FontWeight.w600,
),
AppText(
TranslationBase.of(context)
.healthTipsBasedOnCurrentWeather,
color: Colors.white,
fontSize: 14,
),
],
)),
Expanded(
flex: 2,
child: InkWell(
onTap: () {},
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: [
Image.asset(
'assets/images/Weather_ico.png',
width: 60,
height: 60,
),
AppText(weather,
fontSize: 22, color: Colors.white)
],
),
],
)),
)
],
),
),
),
Padding(
padding: EdgeInsets.all(15),
child: AppText(
projectViewModel.isArabic
? mode.weatherIndicatorData[0].cityNameN
: mode.weatherIndicatorData[0].cityName,
fontSize: 24,
fontWeight: FontWeight.bold,
)),
Padding(
padding: EdgeInsets.all(15),
child: Column(
children: mode.weatherIndicatorData.map((data) {
return WeatherSlider(data);
}).toList()))
]))
: Center(child: AppCircularProgressIndicator())),
);
}
getWeather() async {
var data = await this.sharedPref.getObject(WEATHER);
setState(() {
weather = data['Temperature'].toString() + '\u2103' ?? '--';
});
}
}

@ -18,6 +18,7 @@ class ParkingPage extends StatelessWidget {
onModelReady: (model) => model.getIsSaveParking(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
isShowDecPage: false,
appBarTitle: TranslationBase.of(context).parking,
body: SingleChildScrollView(
padding: EdgeInsets.all(12),

@ -27,7 +27,6 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:giffy_dialog/giffy_dialog.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
//import '../../../core/model/my_balance/AdvanceModel.dart';
import 'confirm_payment_page.dart';

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobile_number.dart';
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
@ -10,6 +11,7 @@ import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
@ -18,7 +20,6 @@ import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'dialogs/ConfirmSMSDialog.dart';
import 'new_text_Field.dart';
@ -159,16 +160,16 @@ class ConfirmPaymentPage extends StatelessWidget {
label: TranslationBase.of(context).confirm.toUpperCase(),
disabled: model.state == ViewState.Busy,
onTap: () {
GifLoaderDialogUtils.showMyDialog(context);
model
.sendActivationCodeForAdvancePayment(
patientID: int.parse(advanceModel.fileNumber),
projectID: advanceModel.hospitalsModel.iD)
.then((value) {
GifLoaderDialogUtils.hideDialog(context);
if (model.state != ViewState.ErrorLocal &&
model.state != ViewState.Error) showSMSDialog();
}).showProgressBar(
text: "Loading",
backgroundColor: Colors.blue.withOpacity(0.6));
});
},
),
),
@ -248,12 +249,14 @@ 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) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
print("Printing Payment Status Reponse!!!!");
print(res);
String paymentInfo = res['Response_Message'];
@ -263,18 +266,21 @@ class ConfirmPaymentPage extends StatelessWidget {
AppToast.showErrorToast(message: res['Response_Message']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
AppToast.showErrorToast(message: err);
print(err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
});
}
createAdvancePayment(res, AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService();
String paymentReference = res['Fort_id'].toString();
GifLoaderDialogUtils.showMyDialog(AppGlobal.context);
service
.createAdvancePayment(appo, appo.projectID.toString(), res['Amount'], res['Fort_id'],
res['PaymentMethod'], AppGlobal.context)
.then((res) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']);
addAdvancedNumberRequest(
res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(),
@ -282,24 +288,28 @@ class ConfirmPaymentPage extends StatelessWidget {
appo.appointmentNo.toString(),
appo);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
AppToast.showErrorToast(message: err);
print(err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
});
}
addAdvancedNumberRequest(String advanceNumber, String paymentReference,
String appointmentID, AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(AppGlobal.context);
service
.addAdvancedNumberRequest(
advanceNumber, paymentReference, appointmentID, AppGlobal.context)
.then((res) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
print(res);
navigateToHome(AppGlobal.context);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
AppToast.showErrorToast(message: err);
print(err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
});
}
Future navigateToHome(context) async {

@ -8,13 +8,13 @@ import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobi
import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class ConfirmSMSDialog extends StatefulWidget {
final String phoneNumber;
@ -112,32 +112,31 @@ class _ConfirmSMSDialogState extends State<ConfirmSMSDialog> {
height: 40,
color: Theme.of(context).primaryColor,
child: Stack(
children: [
Center(
child: Texts(
'SMS',
color: Colors.white,
textAlign: TextAlign.center,
),
),
Positioned(child: Container(
child: InkWell(
onTap: () => Navigator.pop(context),
child: Container(
decoration: BoxDecoration(
shape: BoxShape.circle, color: Colors.white),
child: Icon(
Icons.clear,
color: Colors.grey[900],
)),
child: Texts(
'SMS',
color: Colors.white,
textAlign: TextAlign.center,
),
),
left: projectViewModel.isArabic? 2:0,
right: projectViewModel.isArabic? 0:2,
Positioned(
child: Container(
child: InkWell(
onTap: () => Navigator.pop(context),
child: Container(
decoration: BoxDecoration(
shape: BoxShape.circle, color: Colors.white),
child: Icon(
Icons.clear,
color: Colors.grey[900],
)),
),
),
left: projectViewModel.isArabic ? 2 : 0,
right: projectViewModel.isArabic ? 0 : 2,
)
],
),
),
Image.asset(
@ -334,15 +333,14 @@ class _ConfirmSMSDialogState extends State<ConfirmSMSDialog> {
}
void submit(MyBalanceViewModel model) {
GifLoaderDialogUtils.showMyDialog(context);
if (verifyAccountForm.currentState.validate()) {
final activationCode =
digit1.text + digit2.text + digit3.text + digit4.text;
model
.checkActivationCodeForAdvancePayment(activationCode: activationCode)
.then((value) {})
.showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6))
.then((value) {
GifLoaderDialogUtils.hideDialog(context);
Navigator.pop(context, true);
});
}

@ -2,9 +2,11 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
@ -14,8 +16,8 @@ import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
import 'package:provider/provider.dart';
import 'package:rating_bar/rating_bar.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'BookSuccess.dart';
@ -43,6 +45,8 @@ class BookConfirm extends StatefulWidget {
}
class _BookConfirmState extends State<BookConfirm> {
ToDoCountProviderModel toDoProvider;
@override
void initState() {
widget.authUser = new AuthenticatedUser();
@ -54,6 +58,7 @@ class _BookConfirmState extends State<BookConfirm> {
@override
Widget build(BuildContext context) {
toDoProvider = Provider.of<ToDoCountProviderModel>(context);
return AppScaffold(
appBarTitle: TranslationBase.of(context).bookAppo,
isShowAppBar: true,
@ -421,9 +426,10 @@ class _BookConfirmState extends State<BookConfirm> {
AppToast.showSuccessToast(message: "Appointment Booked Successfully");
print(res['AppointmentNo']);
Future.delayed(new Duration(milliseconds: 1800), () {
Future.delayed(new Duration(milliseconds: 500), () {
getPatientShare(context, res['AppointmentNo'], docObject.clinicID,
docObject.projectID, docObject);
getToDoCount();
});
} else {
GifLoaderDialogUtils.hideDialog(context);
@ -471,9 +477,10 @@ class _BookConfirmState extends State<BookConfirm> {
AppToast.showSuccessToast(message: "Appointment Booked Successfully");
print(res['AppointmentNo']);
Future.delayed(new Duration(milliseconds: 1800), () {
Future.delayed(new Duration(milliseconds: 500), () {
getLiveCareAppointmentPatientShare(context, res['AppointmentNo'],
docObject.clinicID, docObject.projectID, docObject);
getToDoCount();
});
} else {
GifLoaderDialogUtils.hideDialog(context);
@ -499,10 +506,23 @@ class _BookConfirmState extends State<BookConfirm> {
dialog.showAlertDialog(context);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
});
}
getToDoCount() {
toDoProvider.setState(0);
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber']);
} else {}
}).catchError((err) {
print(err);
});
}
getPatientShare(context, String appointmentNo, int clinicID, int projectID,

@ -14,7 +14,6 @@ import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:flutter/material.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'QRCode.dart';
@ -349,36 +348,37 @@ class _BookSuccessState extends State<BookSuccess> {
confirmAppointment(AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
service
.confirmAppointment(appo.appointmentNo, appo.clinicID, appo.projectID,
appo.isLiveCareAppointment, context)
.then((res) {
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
})
.catchError((err) {
print(err);
})
.showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6))
.then((value) {
if (appo.isLiveCareAppointment) {
insertLiveCareVIDARequest(appo);
} else {
navigateToHome(context);
}
});
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
if (appo.isLiveCareAppointment) {
insertLiveCareVIDARequest(appo);
} else {
navigateToHome(context);
}
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err);
});
}
insertLiveCareVIDARequest(AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
service
.insertVIDARequest(appo.appointmentNo, appo.clinicID, appo.projectID,
appo.serviceID, appo.doctorID, context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
navigateToHome(context);
@ -386,9 +386,10 @@ class _BookSuccessState extends State<BookSuccess> {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
});
}
Widget _getPayNowAppo() {
@ -554,7 +555,7 @@ class _BookSuccessState extends State<BookSuccess> {
AppoitmentAllHistoryResultList appo) async {
if (paymentMethod == "ApplePay") {
await widget.chromeBrowser.open(
url: "https://flutter.dev/",
url: "https://applepay-datatrans-sample.herokuapp.com/",
options: ChromeSafariBrowserClassOptions(
android: AndroidChromeCustomTabsOptions(
addDefaultShareMenuItem: false),
@ -633,6 +634,7 @@ class _BookSuccessState extends State<BookSuccess> {
}
getApplePayAPQ(AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service
.checkPaymentStatus(
@ -640,6 +642,7 @@ class _BookSuccessState extends State<BookSuccess> {
appo.projectID, appo.clinicID, appo.appointmentNo),
context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
print("Printing Payment Status Reponse!!!!");
print(res);
String paymentInfo = res['Response_Message'];
@ -649,9 +652,10 @@ class _BookSuccessState extends State<BookSuccess> {
AppToast.showErrorToast(message: res['Response_Message']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
});
}
createAdvancePayment(res, AppoitmentAllHistoryResultList appo) {

@ -52,11 +52,10 @@ class _BookingOptionsState extends State<BookingOptions> {
children: <Widget>[
Expanded(
child: CardCommon(
image: 'assets/images/new-design/search_by_clinic.png',
text: TranslationBase.of(context).clinic,
subText: TranslationBase.of(context).name,
type: 0,
),
image: 'assets/images/new-design/search_by_clinic.png',
text: TranslationBase.of(context).clinic,
subText: TranslationBase.of(context).name,
type: 0),
),
Expanded(
child: CardCommon(

@ -2,12 +2,13 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/models/Appointments/DentalChiefComplaintsModel.dart';
import 'package:diplomaticquarterapp/models/Appointments/SearchInfoModel.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DentalComplaintCard.dart';
import 'package:diplomaticquarterapp/pages/livecare/widgets/clinic_card.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class DentalComplaints extends StatefulWidget {
SearchInfo searchInfo;
@ -35,7 +36,8 @@ class _DentalComplaintsState extends State<DentalComplaints> {
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: "Symptoms",
appBarTitle: TranslationBase.of(context).dentalComplaints,
isShowDecPage: false,
body: Container(
margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0),
child: ListView.builder(
@ -59,12 +61,14 @@ class _DentalComplaintsState extends State<DentalComplaints> {
}
getChiefComplaintsList() {
GifLoaderDialogUtils.showMyDialog(context);
getLanguageID();
ClinicListService service = new ClinicListService();
service
.getChiefComplaintsList(
widget.searchInfo.ClinicID, widget.searchInfo.ProjectID, context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
print(res['List_DentalChiefComplain']);
setState(() {
@ -73,10 +77,13 @@ class _DentalComplaintsState extends State<DentalComplaints> {
});
print(complaintsList.length);
});
} else {}
} else {
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
});
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save