diff --git a/android/app/build.gradle b/android/app/build.gradle
index dc377f5c..89407e6f 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -67,6 +67,8 @@ android {
}
release {
signingConfig signingConfigs.config
+ minifyEnabled true
+ shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
staging {
diff --git a/applepay.json b/applepay.json
new file mode 100644
index 00000000..5b00d6d5
--- /dev/null
+++ b/applepay.json
@@ -0,0 +1,22 @@
+{
+ "provider": "apple_pay",
+ "data": {
+ "merchantIdentifier": "merchant.com.hmgwebservices",
+ "displayName": "Sulaiman Al Habib",
+ "merchantCapabilities": [
+ "3DS",
+ "debit",
+ "credit"
+ ],
+ "supportedNetworks": [
+ "amex",
+ "visa",
+ "discover",
+ "masterCard"
+ ],
+ "countryCode": "SA",
+ "currencyCode": "SAR",
+ "requiredBillingContactFields": null,
+ "requiredShippingContactFields": null
+ }
+}
\ No newline at end of file
diff --git a/assets/applepay.json b/assets/applepay.json
new file mode 100644
index 00000000..5b00d6d5
--- /dev/null
+++ b/assets/applepay.json
@@ -0,0 +1,22 @@
+{
+ "provider": "apple_pay",
+ "data": {
+ "merchantIdentifier": "merchant.com.hmgwebservices",
+ "displayName": "Sulaiman Al Habib",
+ "merchantCapabilities": [
+ "3DS",
+ "debit",
+ "credit"
+ ],
+ "supportedNetworks": [
+ "amex",
+ "visa",
+ "discover",
+ "masterCard"
+ ],
+ "countryCode": "SA",
+ "currencyCode": "SAR",
+ "requiredBillingContactFields": null,
+ "requiredShippingContactFields": null
+ }
+}
\ No newline at end of file
diff --git a/assets/images/new/CS/Family_Files.svg b/assets/images/new/CS/Family_Files.svg
new file mode 100644
index 00000000..ce47d959
--- /dev/null
+++ b/assets/images/new/CS/Family_Files.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/images/new/CS/Help.svg b/assets/images/new/CS/Help.svg
new file mode 100644
index 00000000..31d49e71
--- /dev/null
+++ b/assets/images/new/CS/Help.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/images/new/CS/My_File.svg b/assets/images/new/CS/My_File.svg
new file mode 100644
index 00000000..fc5c0096
--- /dev/null
+++ b/assets/images/new/CS/My_File.svg
@@ -0,0 +1,7 @@
+
diff --git a/assets/images/new/CS/Todo.svg b/assets/images/new/CS/Todo.svg
new file mode 100644
index 00000000..98232af9
--- /dev/null
+++ b/assets/images/new/CS/Todo.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/images/new/CS/emergency_request_CS.svg b/assets/images/new/CS/emergency_request_CS.svg
new file mode 100644
index 00000000..1796a80c
--- /dev/null
+++ b/assets/images/new/CS/emergency_request_CS.svg
@@ -0,0 +1,24 @@
+
diff --git a/assets/images/new/CS/home_health_care_CS.svg b/assets/images/new/CS/home_health_care_CS.svg
new file mode 100644
index 00000000..8cf044b1
--- /dev/null
+++ b/assets/images/new/CS/home_health_care_CS.svg
@@ -0,0 +1,14 @@
+
diff --git a/assets/images/new/CS/livecare_CS.svg b/assets/images/new/CS/livecare_CS.svg
new file mode 100644
index 00000000..8af91e8a
--- /dev/null
+++ b/assets/images/new/CS/livecare_CS.svg
@@ -0,0 +1,10 @@
+
diff --git a/assets/images/new/CS/loader.gif b/assets/images/new/CS/loader.gif
new file mode 100644
index 00000000..3e343727
Binary files /dev/null and b/assets/images/new/CS/loader.gif differ
diff --git a/assets/images/new/CS/pharmacy_CS.svg b/assets/images/new/CS/pharmacy_CS.svg
new file mode 100644
index 00000000..a3ad2b0c
--- /dev/null
+++ b/assets/images/new/CS/pharmacy_CS.svg
@@ -0,0 +1,16 @@
+
diff --git a/assets/images/new/CoronaIcon.svg b/assets/images/new/CoronaIcon.svg
new file mode 100644
index 00000000..c02f907b
--- /dev/null
+++ b/assets/images/new/CoronaIcon.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/ios/Flutter/.last_build_id b/ios/Flutter/.last_build_id
index b3315e38..b95e82c3 100644
--- a/ios/Flutter/.last_build_id
+++ b/ios/Flutter/.last_build_id
@@ -1 +1 @@
-8d8845c5c035b7f87f2849054cdedb69
\ No newline at end of file
+84018bae6147d7170a2e3bd8d9e051aa
\ No newline at end of file
diff --git a/ios/Podfile.lock b/ios/Podfile.lock
index 169a7b58..49f5e49b 100644
--- a/ios/Podfile.lock
+++ b/ios/Podfile.lock
@@ -1,9 +1,10 @@
PODS:
- audio_session (0.0.1):
- Flutter
- - barcode_scan_fix (0.0.1):
+ - barcode_scan2 (0.0.1):
- Flutter
- MTBBarcodeScanner
+ - SwiftProtobuf
- camera (0.0.1):
- Flutter
- connectivity (0.0.1):
@@ -11,6 +12,8 @@ PODS:
- Reachability
- device_calendar (0.0.1):
- Flutter
+ - device_info_plus (0.0.1):
+ - Flutter
- DKImagePickerController/Core (4.3.2):
- DKImagePickerController/ImageDataManager
- DKImagePickerController/Resource
@@ -59,10 +62,10 @@ PODS:
- Firebase/Analytics (= 8.9.0)
- firebase_core
- Flutter
- - firebase_core (1.10.0):
+ - firebase_core (1.10.5):
- Firebase/CoreOnly (= 8.9.0)
- Flutter
- - firebase_messaging (11.1.0):
+ - firebase_messaging (11.2.3):
- Firebase/Messaging (= 8.9.0)
- firebase_core
- Flutter
@@ -107,11 +110,7 @@ PODS:
- GoogleUtilities/Reachability (~> 7.6)
- GoogleUtilities/UserDefaults (~> 7.6)
- nanopb (~> 2.30908.0)
- - fit_kit (0.0.1):
- - Flutter
- Flutter (1.0.0)
- - flutter_flexible_toast (0.0.1):
- - Flutter
- flutter_hms_gms_availability (0.0.1):
- Flutter
- flutter_inappwebview (0.0.1):
@@ -123,15 +122,24 @@ PODS:
- OrderedSet (~> 5.0)
- flutter_local_notifications (0.0.1):
- Flutter
+ - flutter_native_timezone (0.0.1):
+ - Flutter
+ - flutter_nfc_kit (2.0.0):
+ - Flutter
- flutter_tts (0.0.1):
- Flutter
- flutter_webrtc (0.7.1):
- Flutter
- Libyuv (= 1703)
- WebRTC-SDK (= 92.4515.11)
+ - fluttertoast (0.0.2):
+ - Flutter
+ - Toast
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
+ - geocoding (1.0.5):
+ - Flutter
- geolocator_apple (1.2.0):
- Flutter
- google_maps_flutter (0.0.1):
@@ -185,6 +193,8 @@ PODS:
- GoogleUtilities/Logger
- GoogleUtilities/UserDefaults (7.6.0):
- GoogleUtilities/Logger
+ - health (1.0.4):
+ - Flutter
- image_picker (0.0.1):
- Flutter
- in_app_review (0.2.0):
@@ -198,6 +208,8 @@ PODS:
- Flutter
- manage_calendar_events (0.0.1):
- Flutter
+ - map_launcher (0.0.1):
+ - Flutter
- maps_launcher (0.0.1):
- Flutter
- MTBBarcodeScanner (5.0.11)
@@ -208,8 +220,6 @@ PODS:
- nanopb/encode (2.30908.0)
- native_device_orientation (0.0.1):
- Flutter
- - nfc_in_flutter (1.0.0):
- - Flutter
- OrderedSet (5.0.0)
- package_info_plus (0.4.5):
- Flutter
@@ -219,7 +229,7 @@ PODS:
- Flutter
- PromisesObjC (2.0.0)
- Reachability (3.2)
- - screen (0.0.1):
+ - screen_brightness_ios (0.0.1):
- Flutter
- SDWebImage (5.12.1):
- SDWebImage/Core (= 5.12.1)
@@ -234,7 +244,9 @@ PODS:
- sqflite (0.0.2):
- Flutter
- FMDB (>= 2.7.5)
+ - SwiftProtobuf (1.18.0)
- SwiftyGif (5.4.1)
+ - Toast (4.0.0)
- Try (2.1.1)
- url_launcher_ios (0.0.1):
- Flutter
@@ -252,37 +264,41 @@ PODS:
DEPENDENCIES:
- audio_session (from `.symlinks/plugins/audio_session/ios`)
- - barcode_scan_fix (from `.symlinks/plugins/barcode_scan_fix/ios`)
+ - barcode_scan2 (from `.symlinks/plugins/barcode_scan2/ios`)
- camera (from `.symlinks/plugins/camera/ios`)
- connectivity (from `.symlinks/plugins/connectivity/ios`)
- device_calendar (from `.symlinks/plugins/device_calendar/ios`)
+ - device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- file_picker (from `.symlinks/plugins/file_picker/ios`)
- firebase_analytics (from `.symlinks/plugins/firebase_analytics/ios`)
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
- firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`)
- - fit_kit (from `.symlinks/plugins/fit_kit/ios`)
- Flutter (from `Flutter`)
- - flutter_flexible_toast (from `.symlinks/plugins/flutter_flexible_toast/ios`)
- flutter_hms_gms_availability (from `.symlinks/plugins/flutter_hms_gms_availability/ios`)
- flutter_inappwebview (from `.symlinks/plugins/flutter_inappwebview/ios`)
- flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`)
+ - flutter_native_timezone (from `.symlinks/plugins/flutter_native_timezone/ios`)
+ - flutter_nfc_kit (from `.symlinks/plugins/flutter_nfc_kit/ios`)
- flutter_tts (from `.symlinks/plugins/flutter_tts/ios`)
- flutter_webrtc (from `.symlinks/plugins/flutter_webrtc/ios`)
+ - fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
+ - geocoding (from `.symlinks/plugins/geocoding/ios`)
- geolocator_apple (from `.symlinks/plugins/geolocator_apple/ios`)
- google_maps_flutter (from `.symlinks/plugins/google_maps_flutter/ios`)
+ - health (from `.symlinks/plugins/health/ios`)
- image_picker (from `.symlinks/plugins/image_picker/ios`)
- in_app_review (from `.symlinks/plugins/in_app_review/ios`)
- just_audio (from `.symlinks/plugins/just_audio/ios`)
- local_auth (from `.symlinks/plugins/local_auth/ios`)
- location (from `.symlinks/plugins/location/ios`)
- manage_calendar_events (from `.symlinks/plugins/manage_calendar_events/ios`)
+ - map_launcher (from `.symlinks/plugins/map_launcher/ios`)
- maps_launcher (from `.symlinks/plugins/maps_launcher/ios`)
- native_device_orientation (from `.symlinks/plugins/native_device_orientation/ios`)
- - nfc_in_flutter (from `.symlinks/plugins/nfc_in_flutter/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`)
- permission_handler (from `.symlinks/plugins/permission_handler/ios`)
- - screen (from `.symlinks/plugins/screen/ios`)
+ - screen_brightness_ios (from `.symlinks/plugins/screen_brightness_ios/ios`)
- searchable_dropdown (from `.symlinks/plugins/searchable_dropdown/ios`)
- shared_preferences_ios (from `.symlinks/plugins/shared_preferences_ios/ios`)
- speech_to_text (from `.symlinks/plugins/speech_to_text/ios`)
@@ -316,21 +332,25 @@ SPEC REPOS:
- PromisesObjC
- Reachability
- SDWebImage
+ - SwiftProtobuf
- SwiftyGif
+ - Toast
- Try
- WebRTC-SDK
EXTERNAL SOURCES:
audio_session:
:path: ".symlinks/plugins/audio_session/ios"
- barcode_scan_fix:
- :path: ".symlinks/plugins/barcode_scan_fix/ios"
+ barcode_scan2:
+ :path: ".symlinks/plugins/barcode_scan2/ios"
camera:
:path: ".symlinks/plugins/camera/ios"
connectivity:
:path: ".symlinks/plugins/connectivity/ios"
device_calendar:
:path: ".symlinks/plugins/device_calendar/ios"
+ device_info_plus:
+ :path: ".symlinks/plugins/device_info_plus/ios"
file_picker:
:path: ".symlinks/plugins/file_picker/ios"
firebase_analytics:
@@ -339,26 +359,32 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/firebase_core/ios"
firebase_messaging:
:path: ".symlinks/plugins/firebase_messaging/ios"
- fit_kit:
- :path: ".symlinks/plugins/fit_kit/ios"
Flutter:
:path: Flutter
- flutter_flexible_toast:
- :path: ".symlinks/plugins/flutter_flexible_toast/ios"
flutter_hms_gms_availability:
:path: ".symlinks/plugins/flutter_hms_gms_availability/ios"
flutter_inappwebview:
:path: ".symlinks/plugins/flutter_inappwebview/ios"
flutter_local_notifications:
:path: ".symlinks/plugins/flutter_local_notifications/ios"
+ flutter_native_timezone:
+ :path: ".symlinks/plugins/flutter_native_timezone/ios"
+ flutter_nfc_kit:
+ :path: ".symlinks/plugins/flutter_nfc_kit/ios"
flutter_tts:
:path: ".symlinks/plugins/flutter_tts/ios"
flutter_webrtc:
:path: ".symlinks/plugins/flutter_webrtc/ios"
+ fluttertoast:
+ :path: ".symlinks/plugins/fluttertoast/ios"
+ geocoding:
+ :path: ".symlinks/plugins/geocoding/ios"
geolocator_apple:
:path: ".symlinks/plugins/geolocator_apple/ios"
google_maps_flutter:
:path: ".symlinks/plugins/google_maps_flutter/ios"
+ health:
+ :path: ".symlinks/plugins/health/ios"
image_picker:
:path: ".symlinks/plugins/image_picker/ios"
in_app_review:
@@ -371,20 +397,20 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/location/ios"
manage_calendar_events:
:path: ".symlinks/plugins/manage_calendar_events/ios"
+ map_launcher:
+ :path: ".symlinks/plugins/map_launcher/ios"
maps_launcher:
:path: ".symlinks/plugins/maps_launcher/ios"
native_device_orientation:
:path: ".symlinks/plugins/native_device_orientation/ios"
- nfc_in_flutter:
- :path: ".symlinks/plugins/nfc_in_flutter/ios"
package_info_plus:
:path: ".symlinks/plugins/package_info_plus/ios"
path_provider_ios:
:path: ".symlinks/plugins/path_provider_ios/ios"
permission_handler:
:path: ".symlinks/plugins/permission_handler/ios"
- screen:
- :path: ".symlinks/plugins/screen/ios"
+ screen_brightness_ios:
+ :path: ".symlinks/plugins/screen_brightness_ios/ios"
searchable_dropdown:
:path: ".symlinks/plugins/searchable_dropdown/ios"
shared_preferences_ios:
@@ -408,37 +434,41 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
audio_session: 4f3e461722055d21515cf3261b64c973c062f345
- barcode_scan_fix: 80dd65de55f27eec6591dd077c8b85f2b79e31f1
+ barcode_scan2: 0af2bb63c81b4565aab6cd78278e4c0fa136dbb0
camera: fe33292aff715a981eb34d7ce7b35b54337ff34c
connectivity: c4130b2985d4ef6fd26f9702e886bd5260681467
- device_calendar: 23b28a5f1ab3bf77e34542fb1167e1b8b29a98f5
+ device_calendar: 9cb33f88a02e19652ec7b8b122ca778f751b1f7b
+ device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed
DKImagePickerController: b5eb7f7a388e4643264105d648d01f727110fc3d
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
file_picker: 3e6c3790de664ccf9b882732d9db5eaf6b8d4eb1
Firebase: 13d8d96499e2635428d5bf0ec675df21f95d9a95
firebase_analytics: 7a7528bb2abf4ca22cff7a57bbf909dcab73e13d
- firebase_core: f770e033e790657b3505f04be4cb24c482912f11
- firebase_messaging: 0c8d1a1732487db7f332fb65232053e93201e2fb
+ firebase_core: dfcae4c150a5e24436a0b7677c470478a234d5bf
+ firebase_messaging: c4696ded2f44fb5c2bf6e94f9a575105793e58fa
FirebaseAnalytics: 4ab446ce08a3fe52e8a4303dd997cf26276bf968
FirebaseCore: 599ee609343eaf4941bd188f85e3aa077ffe325b
FirebaseCoreDiagnostics: 56fb7216d87e0e6ec2feddefa9d8a392fe8b2c18
FirebaseInstallations: 830327b45345ffc859eaa9c17bcd5ae893fd5425
FirebaseMessaging: 82c4a48638f53f7b184f3cc9f6cd2cbe533ab316
- fit_kit: 7643191161673bcd32863ae3f10baed6ce55c7c0
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
- flutter_flexible_toast: 0547e740cae0c33bb7c51bcd931233f4584e1143
flutter_hms_gms_availability: babc50b18670e99780270bc18d9b17d0a07cd77e
flutter_inappwebview: bfd58618f49dc62f2676de690fc6dcda1d6c3721
flutter_local_notifications: 0c0b1ae97e741e1521e4c1629a459d04b9aec743
+ flutter_native_timezone: 5f05b2de06c9776b4cc70e1839f03de178394d22
+ flutter_nfc_kit: 965c98c3fa68f5609f1cc89abb968fe1b8ffdbaa
flutter_tts: 0f492aab6accf87059b72354fcb4ba934304771d
flutter_webrtc: a5a79904f0bca0ea23aff49c51ca765f70a0f703
+ fluttertoast: 6122fa75143e992b1d3470f61000f591a798cc58
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
+ geocoding: 32cfcdb16d38d907caaba65e2e42ad10d38bee58
geolocator_apple: b741765c55dc21950e3e106e8b3584e55cf81ce5
google_maps_flutter: abdb8dee6c52d4be36ad131ee6ebfacd14417c5a
GoogleAppMeasurement: 837649ad3987936c232f6717c5680216f6243d24
GoogleDataTransport: 629c20a4d363167143f30ea78320d5a7eb8bd940
GoogleMaps: 025272d5876d3b32604e5c080dc25eaf68764693
GoogleUtilities: 684ee790a24f73ebb2d1d966e9711c203f2a4237
+ health: e7a5807e45ec58fe6b89a730c97abc6caafe94a0
image_picker: 9aa50e1d8cdacdbed739e925b7eea16d014367e6
in_app_review: 4a97249f7a2f539a0f294c2d9196b7fe35e49541
just_audio: baa7252489dbcf47a4c7cc9ca663e9661c99aafa
@@ -446,24 +476,26 @@ SPEC CHECKSUMS:
local_auth: ef62030a2731330b95df7ef1331bd15f6a64b8a6
location: 3a2eed4dd2fab25e7b7baf2a9efefe82b512d740
manage_calendar_events: 0338d505ea26cdfd20cd883279bc28afa11eca34
+ map_launcher: e325db1261d029ff33e08e03baccffe09593ffea
maps_launcher: 2e5b6a2d664ec6c27f82ffa81b74228d770ab203
MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb
nanopb: a0ba3315591a9ae0a16a309ee504766e90db0c96
native_device_orientation: 3b4cfc9565a7b879cc4fde282b3e27745e852d0d
- nfc_in_flutter: c656fbfb1ec5b9d021da87b0c87629d62fd5264d
OrderedSet: aaeb196f7fef5a9edf55d89760da9176ad40b93c
package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e
path_provider_ios: 7d7ce634493af4477d156294792024ec3485acd5
permission_handler: ccb20a9fad0ee9b1314a52b70b76b473c5f8dab0
PromisesObjC: 68159ce6952d93e17b2dfe273b8c40907db5ba58
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
- screen: abd91ca7bf3426e1cc3646d27e9b2358d6bf07b0
+ screen_brightness_ios: e2f4c3492ec238bb8ea1f5558f67ea22557cf997
SDWebImage: 4dc3e42d9ec0c1028b960a33ac6b637bb432207b
searchable_dropdown: 5058be32fdc5e0481d300ff2087129072e71bd62
shared_preferences_ios: aef470a42dc4675a1cdd50e3158b42e3d1232b32
speech_to_text: b43a7d99aef037bd758ed8e45d79bbac035d2dfe
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
+ SwiftProtobuf: c3c12645230d9b09c72267e0de89468c5543bd86
SwiftyGif: 6895c887f5551618a3c5dd3ecb512419105bacca
+ Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
Try: 5ef669ae832617b3cee58cb2c6f99fb767a4ff96
url_launcher_ios: 02f1989d4e14e998335b02b67a7590fa34f971af
vibration: b5a33e764c3f609a975b9dca73dce20fdde627dc
@@ -473,6 +505,6 @@ SPEC CHECKSUMS:
webview_flutter_wkwebview: 005fbd90c888a42c5690919a1527ecc6649e1162
wifi: d7d77c94109e36c4175d845f0a5964eadba71060
-PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
+PODFILE CHECKSUM: cc1f88378b4bfcf93a6ce00d2c587857c6008d3b
COCOAPODS: 1.11.2
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index 14e77cd0..3e52d097 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -13,7 +13,11 @@
306FE6C8271D790C002D6EFC /* OpenTokPlatformBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 306FE6C7271D790C002D6EFC /* OpenTokPlatformBridge.swift */; };
306FE6CB271D8B73002D6EFC /* OpenTok.swift in Sources */ = {isa = PBXBuildFile; fileRef = 306FE6CA271D8B73002D6EFC /* OpenTok.swift */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
+ 475592F05034141EC172233D /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 784F1093F853B573C176EC8E /* Pods_Runner.framework */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
+ 762D738E274E42650063CE73 /* ring_30Sec.caf in Resources */ = {isa = PBXBuildFile; fileRef = 762D738C274E42650063CE73 /* ring_30Sec.caf */; };
+ 762D738F274E42650063CE73 /* ring_30Sec.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 762D738D274E42650063CE73 /* ring_30Sec.mp3 */; };
+ 76815B27275F381C00E66E94 /* HealthKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76815B26275F381C00E66E94 /* HealthKit.framework */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
@@ -35,7 +39,6 @@
E9C8C136256BACDA00EFFB62 /* HMG_Guest.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C8C135256BACDA00EFFB62 /* HMG_Guest.swift */; };
E9E27168256E3A4000F49B69 /* LocalizedFromFlutter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9E27167256E3A4000F49B69 /* LocalizedFromFlutter.swift */; };
E9F7623B25922BCE00FB5CCF /* FlutterConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9F7623A25922BCE00FB5CCF /* FlutterConstants.swift */; };
- FA0839686861F9C0546E6F45 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C703B0BB1CDBBCA30693DBD3 /* Pods_Runner.framework */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
@@ -52,6 +55,7 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
+ 0E1B56877369D77C273A75CC /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; };
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
301C79AD27200D9F0016307B /* OpenTokRemoteVideoFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenTokRemoteVideoFactory.swift; sourceTree = ""; };
@@ -59,11 +63,14 @@
306FE6C7271D790C002D6EFC /* OpenTokPlatformBridge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenTokPlatformBridge.swift; sourceTree = ""; };
306FE6CA271D8B73002D6EFC /* OpenTok.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenTok.swift; sourceTree = ""; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
- 44DB2098C8C4B08C2F3B1329 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; };
+ 578C284DFF3E98A58F201401 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
+ 762D738C274E42650063CE73 /* ring_30Sec.caf */ = {isa = PBXFileReference; lastKnownFileType = file; name = ring_30Sec.caf; path = ../../assets/sounds/ring_30Sec.caf; sourceTree = ""; };
+ 762D738D274E42650063CE73 /* ring_30Sec.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = ring_30Sec.mp3; path = ../../assets/sounds/ring_30Sec.mp3; sourceTree = ""; };
+ 76815B26275F381C00E66E94 /* HealthKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = HealthKit.framework; path = System/Library/Frameworks/HealthKit.framework; sourceTree = SDKROOT; };
+ 784F1093F853B573C176EC8E /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
- 84A70B284E0DDF62ECE83D3B /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -71,8 +78,7 @@
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- 9C2760F1A81999922ACAA9E6 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; };
- C703B0BB1CDBBCA30693DBD3 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ CA034E94472F7A2E6ADD99A0 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; };
E91B538D256AAA6500E96549 /* GlobalHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GlobalHelper.swift; sourceTree = ""; };
E91B538E256AAA6500E96549 /* Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; };
E91B538F256AAA6500E96549 /* API.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = API.swift; sourceTree = ""; };
@@ -99,8 +105,9 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ 76815B27275F381C00E66E94 /* HealthKit.framework in Frameworks */,
E9620805255C2ED100D3A35D /* NetworkExtension.framework in Frameworks */,
- FA0839686861F9C0546E6F45 /* Pods_Runner.framework in Frameworks */,
+ 475592F05034141EC172233D /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -120,8 +127,9 @@
555EAAA626EFB641859EF0BE /* Frameworks */ = {
isa = PBXGroup;
children = (
+ 76815B26275F381C00E66E94 /* HealthKit.framework */,
E9620804255C2ED100D3A35D /* NetworkExtension.framework */,
- C703B0BB1CDBBCA30693DBD3 /* Pods_Runner.framework */,
+ 784F1093F853B573C176EC8E /* Pods_Runner.framework */,
);
name = Frameworks;
sourceTree = "";
@@ -129,9 +137,9 @@
605039E5DDF72C245F9765FE /* Pods */ = {
isa = PBXGroup;
children = (
- 44DB2098C8C4B08C2F3B1329 /* Pods-Runner.debug.xcconfig */,
- 9C2760F1A81999922ACAA9E6 /* Pods-Runner.release.xcconfig */,
- 84A70B284E0DDF62ECE83D3B /* Pods-Runner.profile.xcconfig */,
+ 0E1B56877369D77C273A75CC /* Pods-Runner.debug.xcconfig */,
+ 578C284DFF3E98A58F201401 /* Pods-Runner.release.xcconfig */,
+ CA034E94472F7A2E6ADD99A0 /* Pods-Runner.profile.xcconfig */,
);
path = Pods;
sourceTree = "";
@@ -171,6 +179,8 @@
97C146F01CF9000F007C117D /* Runner */ = {
isa = PBXGroup;
children = (
+ 762D738C274E42650063CE73 /* ring_30Sec.caf */,
+ 762D738D274E42650063CE73 /* ring_30Sec.mp3 */,
306FE6C9271D8B54002D6EFC /* OpenTok */,
E91B539E256AAC1400E96549 /* GuestPOC_Certificate.cer */,
E91B539D256AAC1400E96549 /* GuestPOC_Certificate.p12 */,
@@ -232,15 +242,15 @@
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
- D74B98D9E413413D50043E1B /* [CP] Check Pods Manifest.lock */,
+ 90E681C38D6D36A73BF84E03 /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
- 796644D4DF82E4D5FBECBF3B /* [CP] Embed Pods Frameworks */,
- 0EF99525B5E50490BA0DF0A4 /* [CP] Copy Pods Resources */,
+ F4F7FCCC462E347C2D580F43 /* [CP] Embed Pods Frameworks */,
+ D767F6DDC3BD13ECA410CBAD /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@@ -298,29 +308,14 @@
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
E91B53A3256AAD8200E96549 /* Main_Custom.storyboard in Resources */,
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
+ 762D738E274E42650063CE73 /* ring_30Sec.caf in Resources */,
+ 762D738F274E42650063CE73 /* ring_30Sec.mp3 in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
- 0EF99525B5E50490BA0DF0A4 /* [CP] Copy Pods Resources */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
- );
- name = "[CP] Copy Pods Resources";
- outputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
- showEnvVarsInLog = 0;
- };
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@@ -335,21 +330,26 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
- 796644D4DF82E4D5FBECBF3B /* [CP] Embed Pods Frameworks */ = {
+ 90E681C38D6D36A73BF84E03 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
- name = "[CP] Embed Pods Frameworks";
+ inputPaths = (
+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
+ "${PODS_ROOT}/Manifest.lock",
+ );
+ name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
+ );
+ outputPaths = (
+ "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
+ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
9740EEB61CF901F6004384FC /* Run Script */ = {
@@ -366,26 +366,38 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
- D74B98D9E413413D50043E1B /* [CP] Check Pods Manifest.lock */ = {
+ D767F6DDC3BD13ECA410CBAD /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
);
- inputPaths = (
- "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
- "${PODS_ROOT}/Manifest.lock",
- );
- name = "[CP] Check Pods Manifest.lock";
+ name = "[CP] Copy Pods Resources";
outputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
);
- outputPaths = (
- "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
+ showEnvVarsInLog = 0;
+ };
+ F4F7FCCC462E347C2D580F43 /* [CP] Embed Pods Frameworks */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
+ );
+ name = "[CP] Embed Pods Frameworks";
+ outputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
+ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
@@ -520,7 +532,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
- MARKETING_VERSION = 1;
+ MARKETING_VERSION = 4.5.17;
PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -660,7 +672,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
- MARKETING_VERSION = 1;
+ MARKETING_VERSION = 4.5.17;
PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -694,7 +706,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
- MARKETING_VERSION = 1;
+ MARKETING_VERSION = 4.5.17;
PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist
index 3cf45d83..77d0dc81 100644
--- a/ios/Runner/Info.plist
+++ b/ios/Runner/Info.plist
@@ -22,14 +22,29 @@
$(FLUTTER_BUILD_NUMBER)
LSApplicationQueriesSchemes
+ googlechromes
comgooglemaps
+ iosamap
+ http
+ https
baidumap
iosamap
+ waze
+ yandexmaps
+ yandexnavi
+ citymapper
+ mapswithme
+ osmandmaps
+ dgis
+ qqmap
+ here-location
LSRequiresIPhoneOS
MinimumOSVersion
11.0
+ NFCReaderUsageDescription
+ This app requires NFC Usage access to allow for Online CheckIn for appointments.
NSAppTransportSecurity
NSAllowsArbitraryLoads
@@ -100,5 +115,13 @@
io.flutter.embedded_views_preview
+ LSApplicationQueriesSchemes
+
+ comgooglemaps
+ baidumap
+ iosamap
+
+
+
diff --git a/lib/config/config.dart b/lib/config/config.dart
index 0595a432..bdf1dffb 100644
--- a/lib/config/config.dart
+++ b/lib/config/config.dart
@@ -16,7 +16,8 @@ const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items';
const PACKAGES_ORDERS = '/api/orders';
const PACKAGES_ORDER_HISTORY = '/api/orders/items';
const PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
- // const BASE_URL = 'https://uat.hmgwebservices.com/';
+// const BASE_URL = 'http://10.50.100.198:3334/';
+// const BASE_URL = 'https://uat.hmgwebservices.com/';
const BASE_URL = 'https://hmgwebservices.com/';
// Pharmacy UAT URLs
@@ -370,11 +371,14 @@ const HAS_DENTAL_PLAN =
const LASER_BODY_PARTS = 'Services/Patients.svc/REST/Laser_GetBodyPartsByCategory';
+const INSERT_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnarie_Insert';
+const UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnarie_Update';
+
//URL to get medicine and pharmacies list
const CHANNEL = 3;
const GENERAL_ID = 'Cs2020@2016\$2958';
const IP_ADDRESS = '10.20.10.20';
-const VERSION_ID = 8.8;
+const VERSION_ID = 7.3;
const SETUP_ID = '91877';
const LANGUAGE = 2;
const PATIENT_OUT_SA = 0;
diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart
index 06c4f4f6..706bec87 100644
--- a/lib/config/localized_values.dart
+++ b/lib/config/localized_values.dart
@@ -1140,8 +1140,8 @@ const Map localizedValues = {
},
"updated-email": {"en": "Updated email successfully", "ar": "تم تحديث البريد الالكتروني"},
"view-list-children": {"en": "View List of Children", "ar": "عرض قائمة الأطفال"},
- "covidTest": {"en": "COVID-19 TEST", "ar": "فحص كورونا"},
- "driveThru": {"en": "Drive-Thru", "ar": "من داخل السيارة"},
+ "covidTest": {"en": "COVID-19", "ar": "فحص"},
+ "driveThru": {"en": "Test", "ar": "كورونا"},
"trackDeliveryDriver": {"en": "Track Delivery Driver", "ar": "تتبع السائق"},
"NearestErDesc": {
"en": "This service Displays nearest branch among all the branches of All Habib medical Group based on your current Location",
@@ -1748,5 +1748,7 @@ const Map localizedValues = {
"yourTurn": {"en": "your turn is after", "ar": "دورك بعد"},
"patients": {"en": "patients", "ar": "مرضي"},
"group": {"en": "Group", "ar": "مجموعة"},
+ "covidTestTodo": {"en": "Covid-19 Test", "ar": "فحص كورونا"},
"ancillaryOrdersPaymentConfirm": {"en": "Are you sure you want to make payment for selected orders?", "ar": "هل أنت متأكد أنك تريد سداد قيمة الطلبات المختارة؟"},
+ "successRegister": {"en": "Your account has been created.", "ar": "لقد تم إنشاء حسابك."},
};
diff --git a/lib/config/shared_pref_kay.dart b/lib/config/shared_pref_kay.dart
index 723e17a0..18b7261a 100644
--- a/lib/config/shared_pref_kay.dart
+++ b/lib/config/shared_pref_kay.dart
@@ -37,3 +37,4 @@ const LIVECARE_CLINIC_DATA = 'LIVECARE_CLINIC_DATA';
const DOCTOR_SCHEDULE_DATE_SEL = 'DOCTOR_SCHEDULE_DATE_SEL';
const APPOINTMENT_HISTORY_MEDICAL = 'APPOINTMENT_HISTORY_MEDICAL';
const CLINICS_LIST = 'CLINICS_LIST';
+const COVID_QA_LIST = 'COVID_QA_LIST';
diff --git a/lib/core/service/AlHabibMedicalService/customer_addresses_service.dart b/lib/core/service/AlHabibMedicalService/customer_addresses_service.dart
index 2f92fe5e..f3cc5dd7 100644
--- a/lib/core/service/AlHabibMedicalService/customer_addresses_service.dart
+++ b/lib/core/service/AlHabibMedicalService/customer_addresses_service.dart
@@ -11,11 +11,11 @@ class CustomerAddressesService extends BaseService {
CustomerInfo customerInfo = new CustomerInfo();
Future addAddressInfo({AddNewAddressRequestModel addNewAddressRequestModel}) async {
- addNewAddressRequestModel.customer.email = customerInfo.email;
- addNewAddressRequestModel.customer.id = customerInfo.customerId;
+ var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID);
+ addNewAddressRequestModel.customer.email = addNewAddressRequestModel.customer.addresses[0].email;
+ addNewAddressRequestModel.customer.id = customerId;
addNewAddressRequestModel.customer.roleIds = [3];
- addNewAddressRequestModel.customer.addresses[0].email = customerInfo.email;
- addNewAddressRequestModel.customer.addresses[0].phoneNumber = customerInfo.mobileNumber;
+ addNewAddressRequestModel.customer.addresses[0].phoneNumber = addNewAddressRequestModel.customer.addresses[0].phoneNumber;
addNewAddressRequestModel.customer.addresses[0].firstName = authenticatedUserObject.user.firstName;
addNewAddressRequestModel.customer.addresses[0].lastName = authenticatedUserObject.user.lastName;
addNewAddressRequestModel.customer.addresses[0].countryId = 69;
@@ -30,8 +30,8 @@ class CustomerAddressesService extends BaseService {
addressesList.add(AddressInfo.fromJson(data));
});
}, onFailure: (String error, int statusCode) {
- hasError = true;
- super.error = error;
+ hasError = false;
+ // super.error = error;
}, body: addNewAddressRequestModel.toJson(), isAllowAny: true);
}
diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart
index 0301d696..01050271 100644
--- a/lib/core/service/client/base_app_client.dart
+++ b/lib/core/service/client/base_app_client.dart
@@ -124,7 +124,7 @@ class BaseAppClient {
// body['IdentificationNo'] = 2076117163;
// body['MobileNo'] = "966503109207";
- // body['PatientID'] = 2478442; //3844083
+ // body['PatientID'] = 3648586; //3844083
// body['TokenID'] = "@dm!n";
// Patient ID: 2478442
diff --git a/lib/core/service/medical/labs_service.dart b/lib/core/service/medical/labs_service.dart
index 6571c76f..1ea29264 100644
--- a/lib/core/service/medical/labs_service.dart
+++ b/lib/core/service/medical/labs_service.dart
@@ -31,12 +31,13 @@ class LabsService extends BaseService {
List labResultList = List();
List labOrdersResultsList = List();
- Future getLaboratoryResult({String projectID, int clinicID, String invoiceNo, String orderNo}) async {
+ Future getLaboratoryResult({String projectID, int clinicID, String invoiceNo, String orderNo, String setupID}) async {
hasError = false;
_requestPatientLabSpecialResult.projectID = projectID;
_requestPatientLabSpecialResult.clinicID = clinicID;
_requestPatientLabSpecialResult.invoiceNo = invoiceNo;
_requestPatientLabSpecialResult.orderNo = orderNo;
+ _requestPatientLabSpecialResult.setupID = setupID;
await baseAppClient.post(GET_Patient_LAB_SPECIAL_RESULT, onSuccess: (dynamic response, int statusCode) {
patientLabSpecialResult.clear();
diff --git a/lib/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart b/lib/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart
index 23329a89..0aeb9f60 100644
--- a/lib/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart
+++ b/lib/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart
@@ -20,7 +20,7 @@ class AddNewAddressRequestModel {
class Customer {
List addresses;
- int id;
+ String id;
String email;
List roleIds;
@@ -51,7 +51,7 @@ class Customer {
}
class Addresses {
- int id;
+ String id;
String firstName;
String lastName;
String email;
@@ -67,7 +67,7 @@ class Addresses {
dynamic faxNumber;
String customerAttributes;
String createdOnUtc;
- Null province;
+ dynamic province;
String latLong;
Addresses(
diff --git a/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart b/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart
index 09b2a73d..41683165 100644
--- a/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart
+++ b/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart
@@ -1,3 +1,4 @@
+import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/enum/OrderService.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart';
diff --git a/lib/core/viewModels/medical/labs_view_model.dart b/lib/core/viewModels/medical/labs_view_model.dart
index 8e61e3f3..92f79436 100644
--- a/lib/core/viewModels/medical/labs_view_model.dart
+++ b/lib/core/viewModels/medical/labs_view_model.dart
@@ -71,9 +71,9 @@ class LabsViewModel extends BaseViewModel {
List labResultLists = List();
- getLaboratoryResult({String projectID, int clinicID, String invoiceNo, String orderNo}) async {
+ getLaboratoryResult({String projectID, int clinicID, String invoiceNo, String orderNo, String setupID}) async {
setState(ViewState.Busy);
- await _labsService.getLaboratoryResult(invoiceNo: invoiceNo, orderNo: orderNo, projectID: projectID, clinicID: clinicID);
+ await _labsService.getLaboratoryResult(invoiceNo: invoiceNo, orderNo: orderNo, projectID: projectID, clinicID: clinicID, setupID: setupID);
if (_labsService.hasError) {
error = _labsService.error;
setState(ViewState.Error);
diff --git a/lib/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart b/lib/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart
index 02783f9f..5a098b6f 100644
--- a/lib/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart
+++ b/lib/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart
@@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/model/pharmacies/Country.dart';
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart';
import 'package:diplomaticquarterapp/services/pharmacy_services/pharmacyAddress_service.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
+import 'package:geocoding/geocoding.dart';
import 'package:google_maps_place_picker/google_maps_place_picker.dart';
import '../../../locator.dart';
@@ -33,7 +34,8 @@ class PharmacyAddressesViewModel extends BaseViewModel {
}
}
- Future addEditAddress(PickResult value, AddressInfo editedAddress) async {
+ // Future addEditAddress(PickResult value, AddressInfo editedAddress) async {
+ Future addEditAddress(Placemark selectedPlace, AddressInfo editedAddress, {String latLong}) async {
setState(ViewState.Busy);
AddressInfo sendingAddress;
@@ -48,27 +50,34 @@ class PharmacyAddressesViewModel extends BaseViewModel {
} else {
sendingAddress = editedAddress;
}
- value.addressComponents.forEach((element) {
- if (element.types.contains("country")) {
- sendingAddress.country = element.longName;
- }
- if (element.types.contains("administrative_area_level_1")) {
- sendingAddress.city = element.longName;
- }
- if (element.types.contains("postal_code")) {
- sendingAddress.zipPostalCode = element.longName;
- }
- if (element.types.contains("administrative_area_level_2")) {
- sendingAddress.province = element.longName;
- }
- });
- sendingAddress.latLong = value.geometry.location.toString();
+
+ sendingAddress.country = selectedPlace.country;
+ sendingAddress.city = selectedPlace.locality;
+ sendingAddress.zipPostalCode = selectedPlace.postalCode;
+ sendingAddress.province = selectedPlace.locality;
+ sendingAddress.latLong = latLong;
+
+ // value.addressComponents.forEach((element) {
+ // if (element.types.contains("country")) {
+ // sendingAddress.country = element.longName;
+ // }
+ // if (element.types.contains("administrative_area_level_1")) {
+ // sendingAddress.city = element.longName;
+ // }
+ // if (element.types.contains("postal_code")) {
+ // sendingAddress.zipPostalCode = element.longName;
+ // }
+ // if (element.types.contains("administrative_area_level_2")) {
+ // sendingAddress.province = element.longName;
+ // }
+ // });
+ // sendingAddress.latLong = value.geometry.location.toString();
await _pharmacyAddressService.getCountries(sendingAddress.country);
sendingAddress.countryId = country.id;
sendingAddress.stateProvinceId = null;
- sendingAddress.address1 = value.formattedAddress;
- sendingAddress.address2 = "";
+ sendingAddress.address1 = selectedPlace.name;
+ sendingAddress.address2 = selectedPlace.street;
sendingAddress.phoneNumber = user.mobileNumber;
sendingAddress.faxNumber = user.faxNumber;
sendingAddress.customerAttributes = "";
@@ -76,8 +85,7 @@ class PharmacyAddressesViewModel extends BaseViewModel {
if (editedAddress == null) {
await _pharmacyAddressService.addCustomerAddress(sendingAddress);
} else {
- await _pharmacyAddressService.editCustomerAddress(sendingAddress).then((value) async {
- });
+ await _pharmacyAddressService.editCustomerAddress(sendingAddress).then((value) async {});
}
if (_pharmacyAddressService.hasError) {
diff --git a/lib/models/CovidDriveThru/DriveThroughTestingCenterModel.dart b/lib/models/CovidDriveThru/DriveThroughTestingCenterModel.dart
index c85a06b3..8e10af17 100644
--- a/lib/models/CovidDriveThru/DriveThroughTestingCenterModel.dart
+++ b/lib/models/CovidDriveThru/DriveThroughTestingCenterModel.dart
@@ -9,6 +9,8 @@ class DriveThroughTestingCenterModel {
bool isActive;
int createdBy;
String createdOn;
+ num testTypeEnum;
+ num testProcedureEnum;
dynamic editedBy;
dynamic editedON;
dynamic projectName;
@@ -16,19 +18,21 @@ class DriveThroughTestingCenterModel {
DriveThroughTestingCenterModel(
{this.rowID,
- this.iD,
- this.projectID,
- this.setupID,
- this.longitude,
- this.latitude,
- this.numberOfTracks,
- this.isActive,
- this.createdBy,
- this.createdOn,
- this.editedBy,
- this.editedON,
- this.projectName,
- this.projectNameN});
+ this.iD,
+ this.projectID,
+ this.setupID,
+ this.longitude,
+ this.latitude,
+ this.numberOfTracks,
+ this.isActive,
+ this.createdBy,
+ this.createdOn,
+ this.testTypeEnum,
+ this.testProcedureEnum,
+ this.editedBy,
+ this.editedON,
+ this.projectName,
+ this.projectNameN});
DriveThroughTestingCenterModel.fromJson(Map json) {
rowID = json['RowID'];
@@ -41,6 +45,8 @@ class DriveThroughTestingCenterModel {
isActive = json['IsActive'];
createdBy = json['CreatedBy'];
createdOn = json['CreatedOn'];
+ testTypeEnum = json['TestTypeEnum'];
+ testProcedureEnum = json['TestprocedureEnum'];
editedBy = json['EditedBy'];
editedON = json['EditedON'];
projectName = json['ProjectName'];
@@ -59,6 +65,8 @@ class DriveThroughTestingCenterModel {
data['IsActive'] = this.isActive;
data['CreatedBy'] = this.createdBy;
data['CreatedOn'] = this.createdOn;
+ data['TestTypeEnum'] = this.testTypeEnum;
+ data['TestprocedureEnum'] = this.testProcedureEnum;
data['EditedBy'] = this.editedBy;
data['EditedON'] = this.editedON;
data['ProjectName'] = this.projectName;
diff --git a/lib/models/apple_pay_request.dart b/lib/models/apple_pay_request.dart
new file mode 100644
index 00000000..88e16316
--- /dev/null
+++ b/lib/models/apple_pay_request.dart
@@ -0,0 +1,135 @@
+class ApplePayRequest {
+ String currency;
+ String language;
+ String customername;
+ dynamic customerEmail;
+ String orderdescription;
+ String liveServiceid;
+ String longitude;
+ String latitude;
+ String devicetoken;
+ String clientrequestid;
+ String projectid;
+ String serviceid;
+ String patientid;
+ String amount;
+ String appleData;
+ String appleSignature;
+ AppleHeader appleHeader;
+ ApplePaymentMethod applePaymentMethod;
+
+ ApplePayRequest(
+ {this.currency,
+ this.language,
+ this.customername,
+ this.customerEmail,
+ this.orderdescription,
+ this.liveServiceid,
+ this.longitude,
+ this.latitude,
+ this.devicetoken,
+ this.clientrequestid,
+ this.projectid,
+ this.serviceid,
+ this.patientid,
+ this.amount,
+ this.appleData,
+ this.appleSignature,
+ this.appleHeader,
+ this.applePaymentMethod});
+
+ ApplePayRequest.fromJson(Map json) {
+ currency = json['currency'];
+ language = json['language'];
+ customername = json['customername'];
+ customerEmail = json['customer_email'];
+ orderdescription = json['orderdescription'];
+ liveServiceid = json['live_serviceid'];
+ longitude = json['longitude'];
+ latitude = json['latitude'];
+ devicetoken = json['devicetoken'];
+ clientrequestid = json['clientrequestid'];
+ projectid = json['projectid'];
+ serviceid = json['serviceid'];
+ patientid = json['patientid'];
+ amount = json['Amount'];
+ appleData = json['apple_data'];
+ appleSignature = json['apple_signature'];
+ appleHeader = json['apple_header'] != null ? new AppleHeader.fromJson(json['apple_header']) : null;
+ applePaymentMethod = json['apple_paymentMethod'] != null ? new ApplePaymentMethod.fromJson(json['apple_paymentMethod']) : null;
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['currency'] = this.currency;
+ data['language'] = this.language;
+ data['customername'] = this.customername;
+ data['customer_email'] = this.customerEmail;
+ data['orderdescription'] = this.orderdescription;
+ data['live_serviceid'] = this.liveServiceid;
+ data['longitude'] = this.longitude;
+ data['latitude'] = this.latitude;
+ data['devicetoken'] = this.devicetoken;
+ data['clientrequestid'] = this.clientrequestid;
+ data['projectid'] = this.projectid;
+ data['serviceid'] = this.serviceid;
+ data['patientid'] = this.patientid;
+ data['Amount'] = this.amount;
+ data['apple_data'] = this.appleData;
+ data['apple_signature'] = this.appleSignature;
+ if (this.appleHeader != null) {
+ data['apple_header'] = this.appleHeader.toJson();
+ }
+ if (this.applePaymentMethod != null) {
+ data['apple_paymentMethod'] = this.applePaymentMethod.toJson();
+ }
+ return data;
+ }
+}
+
+class AppleHeader {
+ String appleApplicationData;
+ String appleEphemeralPublicKey;
+ String applePublicKeyHash;
+ String appleTransactionId;
+
+ AppleHeader({this.appleApplicationData, this.appleEphemeralPublicKey, this.applePublicKeyHash, this.appleTransactionId});
+
+ AppleHeader.fromJson(Map json) {
+ appleApplicationData = json['apple_applicationData'];
+ appleEphemeralPublicKey = json['apple_ephemeralPublicKey'];
+ applePublicKeyHash = json['apple_publicKeyHash'];
+ appleTransactionId = json['apple_transactionId'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['apple_applicationData'] = this.appleApplicationData;
+ data['apple_ephemeralPublicKey'] = this.appleEphemeralPublicKey;
+ data['apple_publicKeyHash'] = this.applePublicKeyHash;
+ data['apple_transactionId'] = this.appleTransactionId;
+ return data;
+ }
+}
+
+class ApplePaymentMethod {
+ String appleDisplayName;
+ String appleNetwork;
+ String appleType;
+
+ ApplePaymentMethod({this.appleDisplayName, this.appleNetwork, this.appleType});
+
+ ApplePaymentMethod.fromJson(Map json) {
+ appleDisplayName = json['apple_displayName'];
+ appleNetwork = json['apple_network'];
+ appleType = json['apple_type'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['apple_displayName'] = this.appleDisplayName;
+ data['apple_network'] = this.appleNetwork;
+ data['apple_type'] = this.appleType;
+ return data;
+ }
+}
diff --git a/lib/models/apple_pay_response.dart b/lib/models/apple_pay_response.dart
new file mode 100644
index 00000000..f53b3d50
--- /dev/null
+++ b/lib/models/apple_pay_response.dart
@@ -0,0 +1,112 @@
+import 'dart:convert';
+
+class ApplePayResponse {
+ PaymentMethod paymentMethod;
+ dynamic billingContact;
+ dynamic shippingMethod;
+ dynamic shippingContact;
+ Token token;
+
+ ApplePayResponse(
+ {this.paymentMethod,
+ this.billingContact,
+ this.shippingMethod,
+ this.shippingContact,
+ this.token});
+
+ ApplePayResponse.fromJson(Map jsonValue) {
+ paymentMethod = jsonValue['paymentMethod'] != null
+ ? new PaymentMethod.fromJson(jsonValue['paymentMethod'])
+ : null;
+ // billingContact = json['billingContact'] != null ? json['billingContact'] : "";
+ // shippingMethod = json['shippingMethod'] != null ? json['shippingMethod'] : "";
+ // shippingContact = json['shippingContact'] != null ? json['shippingContact'] : "";
+ token = jsonValue['token'] != null ? new Token.fromJson(json.decode(jsonValue['token'])) : null;
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ if (this.paymentMethod != null) {
+ data['paymentMethod'] = this.paymentMethod.toJson();
+ }
+ data['billingContact'] = this.billingContact;
+ data['shippingMethod'] = this.shippingMethod;
+ data['shippingContact'] = this.shippingContact;
+ if (this.token != null) {
+ data['token'] = this.token.toJson();
+ }
+ return data;
+ }
+}
+
+class PaymentMethod {
+ dynamic network;
+ dynamic displayName;
+ dynamic type;
+
+ PaymentMethod({this.network, this.displayName, this.type});
+
+ PaymentMethod.fromJson(Map json) {
+ network = json['network'];
+ displayName = json['displayName'];
+ type = json['type'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['network'] = this.network;
+ data['displayName'] = this.displayName;
+ data['type'] = this.type;
+ return data;
+ }
+}
+
+class Token {
+ String version;
+ String data;
+ String signature;
+ Header header;
+
+ Token({this.version, this.data, this.signature, this.header});
+
+ Token.fromJson(Map json) {
+ version = json['version'];
+ data = json['data'];
+ signature = json['signature'];
+ header =
+ json['header'] != null ? new Header.fromJson(json['header']) : null;
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['version'] = this.version;
+ data['data'] = this.data;
+ data['signature'] = this.signature;
+ if (this.header != null) {
+ data['header'] = this.header.toJson();
+ }
+ return data;
+ }
+}
+
+class Header {
+ String ephemeralPublicKey;
+ String publicKeyHash;
+ String transactionId;
+
+ Header({this.ephemeralPublicKey, this.publicKeyHash, this.transactionId});
+
+ Header.fromJson(Map json) {
+ ephemeralPublicKey = json['ephemeralPublicKey'];
+ publicKeyHash = json['publicKeyHash'];
+ transactionId = json['transactionId'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['ephemeralPublicKey'] = this.ephemeralPublicKey;
+ data['publicKeyHash'] = this.publicKeyHash;
+ data['transactionId'] = this.transactionId;
+ return data;
+ }
+}
diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/cmc_location_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/cmc_location_page.dart
index 41fe54b9..a7478371 100644
--- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/cmc_location_page.dart
+++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/cmc_location_page.dart
@@ -108,7 +108,7 @@ class _CMCLocationPageState extends State {
customerAttributes: "",
city: "",
createdOnUtc: "",
- id: 0,
+ id: "0",
latLong: selectedPlace.geometry.location.lat.toString() + "," + selectedPlace.geometry.location.lng.toString(),
email: "",
)
diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart
index ffbf5b18..a3fce7b4 100644
--- a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart
+++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart
@@ -1,16 +1,21 @@
+import 'dart:async';
+
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_shared_preferences.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/app_map/google_huawei_map.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
+import 'package:geocoding/geocoding.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:google_maps_place_picker/google_maps_place_picker.dart';
import 'package:provider/provider.dart';
@@ -32,6 +37,16 @@ class _LocationPageState extends State {
double longitude = 0;
bool showCurrentLocation = false;
+ AppMap appMap;
+ AppSharedPreferences sharedPref = AppSharedPreferences();
+ static CameraPosition _kGooglePlex = CameraPosition(
+ target: LatLng(37.42796133580664, -122.085749655962),
+ zoom: 14.4746,
+ );
+ LatLng currentPostion;
+ Completer mapController = Completer();
+ Placemark selectedPlace;
+
@override
void initState() {
latitude = widget.latitude;
@@ -39,6 +54,23 @@ class _LocationPageState extends State {
if (latitude == 0.0 && longitude == 0.0) {
showCurrentLocation = true;
}
+ appMap = AppMap(
+ _kGooglePlex.toMap(),
+ onCameraMove: (camera) {
+ _updatePosition(camera);
+ },
+ onMapCreated: () {
+ currentPostion = LatLng(widget.latitude, widget.longitude);
+ latitude = widget.latitude;
+ longitude = widget.longitude;
+ setMap();
+ setState(() {});
+ },
+ onCameraIdle: () async {
+ List placemarks = await placemarkFromCoordinates(latitude, longitude);
+ selectedPlace = placemarks[0];
+ },
+ );
super.initState();
}
@@ -54,7 +86,60 @@ class _LocationPageState extends State {
baseViewModel: model,
showNewAppBarTitle: true,
showNewAppBar: true,
- body: PlacePicker(
+ body:
+ // Column(
+ // children: [
+ // Expanded(
+ // child: Stack(
+ // alignment: Alignment.center,
+ // children: [
+ // if (appMap != null) appMap,
+ // Container(
+ // margin: EdgeInsets.only(bottom: 50.0),
+ // child: Icon(
+ // Icons.place,
+ // color: CustomColors.accentColor,
+ // size: 50,
+ // ),
+ // ),
+ // ],
+ // ),
+ // ),
+ // Container(
+ // padding: const EdgeInsets.only(left: 20, right: 20, top: 14, bottom: 14),
+ // child: DefaultButton(TranslationBase.of(context).addNewAddress, () async {
+ // AddNewAddressRequestModel addNewAddressRequestModel = new AddNewAddressRequestModel(
+ // customer: Customer(addresses: [
+ // Addresses(
+ // address1: selectedPlace.name,
+ // address2: selectedPlace.street,
+ // customerAttributes: "",
+ // city: selectedPlace.locality,
+ // createdOnUtc: "",
+ // id: "0",
+ // faxNumber: "",
+ // phoneNumber: projectViewModel.user.mobileNumber,
+ // province: selectedPlace.locality,
+ // countryId: 69,
+ // latLong: "$latitude,$longitude",
+ // country: selectedPlace.country,
+ // zipPostalCode: selectedPlace.postalCode,
+ // email: projectViewModel.user.emailAddress)
+ // ]),
+ // );
+ // 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(addNewAddressRequestModel);
+ // }),
+ // ),
+ // ],
+ // ),
+
+ PlacePicker(
apiKey: GOOGLE_API_KEY,
enableMyLocationButton: true,
automaticallyImplyAppBarLeading: false,
@@ -76,7 +161,7 @@ class _LocationPageState extends State {
width: 500,
borderRadius: BorderRadius.circular(0.0),
child: state == SearchingState.Searching
- ? SizedBox(height: 43,child: Center(child: CircularProgressIndicator())).insideContainer
+ ? SizedBox(height: 43, child: Center(child: CircularProgressIndicator())).insideContainer
: DefaultButton(TranslationBase.of(context).addNewAddress, () async {
AddNewAddressRequestModel addNewAddressRequestModel = new AddNewAddressRequestModel(
customer: Customer(addresses: [
@@ -84,11 +169,22 @@ class _LocationPageState extends State {
address1: selectedPlace.formattedAddress,
address2: selectedPlace.formattedAddress,
customerAttributes: "",
- city: "",
createdOnUtc: "",
- id: 0,
- latLong: "${selectedPlace.geometry.location}",
- email: "")
+ id: "0",
+ faxNumber: "",
+ phoneNumber: projectViewModel.user.mobileNumber,
+ countryId: 69,
+ latLong: "$latitude,$longitude",
+ email: projectViewModel.user.emailAddress)
+ // Addresses(
+ // address1: selectedPlace.formattedAddress,
+ // address2: selectedPlace.formattedAddress,
+ // customerAttributes: "",
+ // city: "",
+ // createdOnUtc: "",
+ // id: "0",
+ // latLong: "${selectedPlace.geometry.location}",
+ // email: "")
]),
);
@@ -111,8 +207,7 @@ class _LocationPageState extends State {
AppToast.showSuccessToast(message: "Address Added Successfully");
}
Navigator.of(context).pop(addNewAddressRequestModel);
- }).insideContainer
- );
+ }).insideContainer);
},
initialPosition: LatLng(latitude, longitude),
useCurrentLocation: showCurrentLocation,
@@ -120,4 +215,19 @@ class _LocationPageState extends State {
),
);
}
+
+ setMap() {
+ setState(() {
+ _kGooglePlex = CameraPosition(
+ target: currentPostion,
+ zoom: 14.4746,
+ );
+ appMap.moveTo(cameraPostion: _kGooglePlex);
+ });
+ }
+
+ void _updatePosition(CameraPosition _position) {
+ latitude = _position.target.latitude;
+ longitude = _position.target.longitude;
+ }
}
diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart
index 10418bc2..a872acee 100644
--- a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart
+++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart
@@ -4,26 +4,25 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.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/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_three_page.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/reminder_dialog.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
-import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
+import 'package:diplomaticquarterapp/widgets/app_map/google_huawei_map.dart';
+import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/select_location_dialog.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:geolocator/geolocator.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:google_maps_place_picker/google_maps_place_picker.dart';
import 'package:permission_handler/permission_handler.dart';
-import 'package:provider/provider.dart';
-import 'package:diplomaticquarterapp/widgets/app_map/google_huawei_map.dart';
+
import 'location_page.dart';
-import 'package:geolocator/geolocator.dart';
class NewHomeHealthCareStepTowPage extends StatefulWidget {
final Function(PickResult) onPick;
@@ -53,6 +52,7 @@ class _NewHomeHealthCareStepTowPageState extends State mapController = Completer();
+
@override
void initState() {
appMap = AppMap(
@@ -86,7 +86,7 @@ class _NewHomeHealthCareStepTowPageState extends State
hmgServices.clear();
hmgServices.add(new HmgServices(0, TranslationBase.of(context).liveCareTitle, TranslationBase.of(context).liveCareSubtitle, "assets/images/new/Live_Care.svg", isLogin));
- hmgServices.add(new HmgServices(1, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/covid_test_drive_thru.svg", isLogin));
+ hmgServices.add(new HmgServices(1, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/CoronaIcon.svg", isLogin));
hmgServices.add(new HmgServices(2, TranslationBase.of(context).onlinePayment, TranslationBase.of(context).onlinePaymentSubtitle, "assets/images/new/paymentMethods.png", isLogin));
hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin));
hmgServices.add(new HmgServices(4, TranslationBase.of(context).cmcTitle, TranslationBase.of(context).cmcSubtitle, "assets/images/new/comprehensive_checkup.svg", isLogin));
diff --git a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart
index 8d0ebabd..f2bc4091 100644
--- a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart
+++ b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart
@@ -367,10 +367,10 @@ class _AnicllaryOrdersState extends State with SingleTic
addSelectedProcedure(value[i]);
});
}),
- Utils.tableColumnValue('${value[i].procedureName.toString()}', isLast: true),
- Utils.tableColumnValue('${value[i].patientShare.toString() + " " + TranslationBase.of(context).sar.toUpperCase()}', isLast: true),
- Utils.tableColumnValue('${value[i].patientTaxAmount.toString() + " " + TranslationBase.of(context).sar.toUpperCase()}', isLast: true),
- Utils.tableColumnValue('${value[i].patientShareWithTax.toString() + " " + TranslationBase.of(context).sar.toUpperCase()}', isLast: true),
+ Utils.tableColumnValue('${value[i].procedureName}', isLast: true, isCapitable: false, mProjectViewModel: projectViewModel),
+ Utils.tableColumnValue('${value[i].patientShare.toString() + " " + TranslationBase.of(context).sar.toUpperCase()}', isLast: true, isCapitable: false, mProjectViewModel: projectViewModel),
+ Utils.tableColumnValue('${value[i].patientTaxAmount.toString() + " " + TranslationBase.of(context).sar.toUpperCase()}', isLast: true, isCapitable: false, mProjectViewModel: projectViewModel),
+ Utils.tableColumnValue('${value[i].patientShareWithTax.toString() + " " + TranslationBase.of(context).sar.toUpperCase()}', isLast: true, isCapitable: false, mProjectViewModel: projectViewModel),
]),
);
}
@@ -478,17 +478,17 @@ class _AnicllaryOrdersState extends State with SingleTic
addAdvancedNumberRequest(String advanceNumber, String paymentReference, dynamic appointmentID, AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService();
service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, AppGlobal.context).then((res) {
- print(res);
autoGenerateInvoice();
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
- AppToast.showErrorToast(message: err);
+ AppToast.showErrorToast(message: err.toString());
print(err);
});
}
autoGenerateInvoice() {
List selectedProcListAPI = [];
+ Map selectedProcListAPIMap;
selectedProcList.forEach((element) {
selectedProcListAPI.add({
diff --git a/lib/pages/BookAppointment/BookConfirm.dart b/lib/pages/BookAppointment/BookConfirm.dart
index caa287b0..04f50198 100644
--- a/lib/pages/BookAppointment/BookConfirm.dart
+++ b/lib/pages/BookAppointment/BookConfirm.dart
@@ -204,7 +204,8 @@ class _BookConfirmState extends State {
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () async {
- if (await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT) != null && !await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT)) {
+ bool isLiveCareSchedule = await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT);
+ if (isLiveCareSchedule != null && isLiveCareSchedule) {
insertLiveCareScheduledAppointment(context, widget.doctor);
} else {
insertAppointment(context, widget.doctor);
diff --git a/lib/pages/BookAppointment/DoctorProfile.dart b/lib/pages/BookAppointment/DoctorProfile.dart
index 09dbfdd0..033d360b 100644
--- a/lib/pages/BookAppointment/DoctorProfile.dart
+++ b/lib/pages/BookAppointment/DoctorProfile.dart
@@ -154,12 +154,13 @@ class _DoctorProfileState extends State with TickerProviderStateM
onTap: (index) {
setState(() {
if (index == 1) {
- // if (widget.doctor.clinicID == 17 || widget.doctor.clinicID == 23 || widget.doctor.clinicID == 47 || widget.isLiveCareAppointment) {
- // _tabController.index = _tabController.previousIndex;
+ if (widget.doctor.clinicID == 17 || widget.doctor.clinicID == 23 || widget.doctor.clinicID == 47 || widget.isLiveCareAppointment) {
+ _tabController.index = _tabController.previousIndex;
showFooterButton = false;
} else {
showFooterButton = true;
}
+ }
print(showFooterButton);
});
},
diff --git a/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart b/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart
index 672dae53..b4db054d 100644
--- a/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart
+++ b/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart
@@ -1,3 +1,4 @@
+import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
@@ -6,6 +7,7 @@ import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.da
import 'package:diplomaticquarterapp/models/Appointments/timeSlot.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidTestProceduresResponse.dart';
+import 'package:diplomaticquarterapp/models/CovidDriveThru/DriveThroughTestingCenterModel.dart';
import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-payment-alert.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
@@ -23,7 +25,6 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
import 'package:provider/provider.dart';
-
import 'package:syncfusion_flutter_calendar/calendar.dart';
class CovidTimeSlots extends StatefulWidget {
@@ -33,6 +34,7 @@ class CovidTimeSlots extends StatefulWidget {
static String selectedDate;
static String selectedTime;
CovidTestProceduresResponse selectedProcedure;
+ DriveThroughTestingCenterModel selectedProject;
int selectedClinicID;
int selectedDoctorID;
@@ -41,7 +43,7 @@ class CovidTimeSlots extends StatefulWidget {
PatientShareResponse patientShareResponse;
- CovidTimeSlots({@required this.projectID, @required this.selectedProcedure});
+ CovidTimeSlots({@required this.projectID, @required this.selectedProcedure, @required this.selectedProject});
@override
_CovidTimeSlotsState createState() => _CovidTimeSlotsState();
@@ -68,6 +70,7 @@ class _CovidTimeSlotsState extends State with TickerProviderStat
ScrollController _scrollController;
ToDoCountProviderModel toDoProvider;
+ ProjectViewModel projectViewModel;
@override
void initState() {
@@ -113,7 +116,7 @@ class _CovidTimeSlotsState extends State with TickerProviderStat
@override
Widget build(BuildContext context) {
- ProjectViewModel projectViewModel = Provider.of(context);
+ projectViewModel = Provider.of(context);
toDoProvider = Provider.of(context);
return AppScaffold(
appBarTitle: TranslationBase.of(context).covidTest,
@@ -359,7 +362,8 @@ class _CovidTimeSlotsState extends State with TickerProviderStat
Widget getSelectedButton(int index) {
return RaisedButton(
- color: CustomColors.green, //Color of the border
+ color: CustomColors.green,
+ //Color of the border
elevation: 0,
textColor: Colors.white,
onPressed: () {
@@ -374,23 +378,65 @@ class _CovidTimeSlotsState extends State with TickerProviderStat
}
bookCovidTestAppointment() {
- if(CovidTimeSlots.areSlotsAvailable) {
- GifLoaderDialogUtils.showMyDialog(context);
- DoctorList docObject = new DoctorList();
- docObject.doctorID = widget.selectedDoctorID;
- docObject.clinicID = widget.selectedClinicID;
- docObject.projectID = widget.projectID;
- insertAppointmentCovidTest(context, docObject);
+ if (CovidTimeSlots.areSlotsAvailable) {
+ var messageEn = "This Appointment is being booked for patient " +
+ projectViewModel.authenticatedUserObject.user.firstName +
+ " " +
+ projectViewModel.authenticatedUserObject.user.lastName +
+ ", Having file number " +
+ projectViewModel.authenticatedUserObject.user.patientID.toString() +
+ ". Please confirm!";
+ var messageAr = "يتم حجز هذا الموعد المراجع " +
+ projectViewModel.authenticatedUserObject.user.firstName +
+ " " +
+ projectViewModel.authenticatedUserObject.user.lastName +
+ ", وجود رقم الملف " +
+ projectViewModel.authenticatedUserObject.user.patientID.toString() +
+ ". يرجى تأكيد!";
+ ConfirmDialog dialog = new ConfirmDialog(
+ context: context,
+ confirmMessage: projectViewModel.isArabic ? messageAr : messageEn,
+ okText: TranslationBase.of(context).confirm,
+ cancelText: TranslationBase.of(context).cancel_nocaps,
+ okFunction: () {
+ GifLoaderDialogUtils.showMyDialog(context);
+ DoctorList docObject = new DoctorList();
+ docObject.doctorID = widget.selectedDoctorID;
+ docObject.clinicID = widget.selectedClinicID;
+ docObject.projectID = widget.projectID;
+ insertCovidQuestionnaire(context, docObject);
+ },
+ cancelFunction: () => {});
+ dialog.showAlertDialog(context);
} else {
AppToast.showErrorToast(message: TranslationBase.of(context).selectSlot);
}
}
+ insertCovidQuestionnaire(context, DoctorList docObject) async {
+ DoctorsListService service = new DoctorsListService();
+ List qa = await sharedPref.getObject(COVID_QA_LIST);
+ service.insertCovidQuestionnaire(qa, widget.projectID, widget.selectedProject.testTypeEnum, widget.selectedProject.testProcedureEnum).then((res) {
+ insertAppointmentCovidTest(context, docObject);
+ }).catchError((err) {
+ print(err);
+ });
+ }
+
+ updateCovidQuestionnaire(context, String appoNo) async {
+ DoctorsListService service = new DoctorsListService();
+ service.updateCovidQuestionnaire(appoNo, widget.projectID, widget.selectedProject.testTypeEnum, widget.selectedProject.testProcedureEnum).then((res) {
+ }).catchError((err) {
+ print(err);
+ });
+ }
+
insertAppointmentCovidTest(context, DoctorList docObject) {
DoctorsListService service = new DoctorsListService();
AppoitmentAllHistoryResultList appo;
service
- .insertAppointment(docObject.doctorID, docObject.clinicID, docObject.projectID, CovidTimeSlots.selectedTime, CovidTimeSlots.selectedDate, context, widget.selectedProcedure.procedureID)
+ .insertAppointment(docObject.doctorID, docObject.clinicID, docObject.projectID, CovidTimeSlots.selectedTime, CovidTimeSlots.selectedDate, context, widget.selectedProcedure.procedureID,
+ widget.selectedProject.testTypeEnum, widget.selectedProject.testProcedureEnum)
.then((res) {
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess);
@@ -463,6 +509,7 @@ class _CovidTimeSlotsState extends State with TickerProviderStat
GifLoaderDialogUtils.hideDialog(context);
print(res);
widget.patientShareResponse = new PatientShareResponse.fromJson(res);
+ updateCovidQuestionnaire(context, appointmentNo);
navigateToPaymentAlert();
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
@@ -482,7 +529,7 @@ class _CovidTimeSlotsState extends State with TickerProviderStat
getCovidFreeSlots(BuildContext context, int projectID) {
CovidDriveThruService service = new CovidDriveThruService();
GifLoaderDialogUtils.showMyDialog(context);
- service.getCovidFreeSlots(context, projectID).then((res) {
+ service.getCovidFreeSlots(context, projectID, widget.selectedProject.testTypeEnum, widget.selectedProject.testProcedureEnum).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
if (res['COVID19_FreeTimeSlots'].length != 0) {
diff --git a/lib/pages/Covid-DriveThru/covid-dirvethru-questions.dart b/lib/pages/Covid-DriveThru/covid-dirvethru-questions.dart
index 78ee36f0..cbf3bf21 100644
--- a/lib/pages/Covid-DriveThru/covid-dirvethru-questions.dart
+++ b/lib/pages/Covid-DriveThru/covid-dirvethru-questions.dart
@@ -1,11 +1,14 @@
import 'dart:convert';
+import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidPaymentInfoResponse.dart';
import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidTestProceduresResponse.dart';
+import 'package:diplomaticquarterapp/models/CovidDriveThru/DriveThroughTestingCenterModel.dart';
import 'package:diplomaticquarterapp/pages/medical/labs/passport_update_page.dart';
import 'package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
+import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@@ -21,8 +24,9 @@ import 'covid-payment-details.dart';
class CovidDirveThruQuestions extends StatefulWidget {
final String projectId;
final List proceduresList;
+ DriveThroughTestingCenterModel selectedProject;
- CovidDirveThruQuestions({@required this.projectId, @required this.proceduresList});
+ CovidDirveThruQuestions({@required this.projectId, @required this.proceduresList, @required this.selectedProject});
@override
CovidDirveThruQuestionsState createState() => CovidDirveThruQuestionsState();
@@ -263,6 +267,7 @@ class CovidDirveThruQuestionsState extends State {
}
next() async {
+ var sharedPref = new AppSharedPreferences();
bool all = true;
qa.forEach((element) {
all = all && (element["ans"] == 1 || element["ans"] == 0);
@@ -270,6 +275,7 @@ class CovidDirveThruQuestionsState extends State {
if (all) if (qa[0]["ans"] == 1) {
openPassportUpdatePage();
} else {
+ sharedPref.setObject(COVID_QA_LIST, qa);
getPaymentInfo(context, widget.projectId);
}
else
@@ -296,7 +302,7 @@ class CovidDirveThruQuestionsState extends State {
CovidDriveThruService service = new CovidDriveThruService();
CovidPaymentInfoResponse covidPaymentInfoResponse = new CovidPaymentInfoResponse();
GifLoaderDialogUtils.showMyDialog(context);
- service.getCovidPaymentInformation(context, int.parse(projectID), widget.proceduresList[0].procedureID).then((res) {
+ service.getCovidPaymentInformation(context, int.parse(projectID), widget.proceduresList[0].procedureID, widget.selectedProject.testTypeEnum, widget.selectedProject.testProcedureEnum).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
covidPaymentInfoResponse = CovidPaymentInfoResponse.fromJson(res['COVID19_PatientShare']);
@@ -307,6 +313,7 @@ class CovidDirveThruQuestionsState extends State {
covidPaymentInfoResponse: covidPaymentInfoResponse,
projectID: int.parse(projectID),
proceduresList: widget.proceduresList,
+ selectedProject: widget.selectedProject,
)));
} else {}
}).catchError((err) {
diff --git a/lib/pages/Covid-DriveThru/covid-drivethru-location.dart b/lib/pages/Covid-DriveThru/covid-drivethru-location.dart
index a0842a73..e1ddad8e 100644
--- a/lib/pages/Covid-DriveThru/covid-drivethru-location.dart
+++ b/lib/pages/Covid-DriveThru/covid-drivethru-location.dart
@@ -49,7 +49,6 @@ class _CovidDrivethruLocationState extends State {
WidgetsBinding.instance.addPostFrameCallback((_) {
if (projectViewModel.isLogin) {
getProjectsList(context);
- getTestProcedures(context);
}
});
super.initState();
@@ -129,7 +128,10 @@ class _CovidDrivethruLocationState extends State {
items: projectsList.map((DriveThroughTestingCenterModel item) {
return new DropdownMenuItem(
value: item,
- child: new Text(item.projectName),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [Text(item.projectName), getCovidTestTypeImage(item)],
+ ),
);
}).toList(),
onChanged: (newValue) {
@@ -256,6 +258,23 @@ class _CovidDrivethruLocationState extends State {
);
}
+ Widget getCovidTestTypeImage(DriveThroughTestingCenterModel item) {
+ if (item.testTypeEnum == 1) {
+ return Container(child: SvgPicture.asset("assets/images/new/DriveThru.svg", width: 20.0));
+ }
+ if (item.testTypeEnum == 2) {
+ return Container(child: SvgPicture.asset("assets/images/new/WalkIn.svg", width: 10.0));
+ }
+ if (item.testTypeEnum == 3) {
+ return Row(
+ children: [
+ Container(child: SvgPicture.asset("assets/images/new/WalkIn.svg", width: 10.0)),
+ Container(padding: EdgeInsets.only(left: 5.0, right: 5.0), child: SvgPicture.asset("assets/images/new/DriveThru.svg", width: 20.0)),
+ ],
+ );
+ }
+ }
+
getDirections() {
if (isLocationSelected) {
MapsLauncher.launchCoordinates(double.parse(projectLat), double.parse(projectLong), this.projectName);
@@ -266,7 +285,7 @@ class _CovidDrivethruLocationState extends State {
next() {
if (isLocationSelected) {
- Navigator.push(context, FadePage(page: CovidDirveThruQuestions(projectId: projectID, proceduresList: proceduresList)));
+ Navigator.push(context, FadePage(page: CovidDirveThruQuestions(projectId: projectID, proceduresList: proceduresList, selectedProject: selectedProject)));
} else {
Utils.showErrorToast("Please select address from the dropdown menu to continue");
}
@@ -284,13 +303,14 @@ class _CovidDrivethruLocationState extends State {
this.projectID = newValue.projectID.toString();
isLocationSelected = true;
});
+ getTestProcedures(context);
}
getPaymentInfo(BuildContext context, String projectID) {
CovidDriveThruService service = new CovidDriveThruService();
CovidPaymentInfoResponse covidPaymentInfoResponse = new CovidPaymentInfoResponse();
GifLoaderDialogUtils.showMyDialog(context);
- service.getCovidPaymentInformation(context, int.parse(projectID), proceduresList[0].procedureID).then((res) {
+ service.getCovidPaymentInformation(context, int.parse(projectID), proceduresList[0].procedureID, selectedProject.testTypeEnum, selectedProject.testProcedureEnum).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {
@@ -303,6 +323,7 @@ class _CovidDrivethruLocationState extends State {
covidPaymentInfoResponse: covidPaymentInfoResponse,
projectID: int.parse(projectID),
proceduresList: proceduresList,
+ selectedProject: selectedProject,
)));
} else {}
}).catchError((err) {
@@ -314,7 +335,7 @@ class _CovidDrivethruLocationState extends State {
CovidDriveThruService service = new CovidDriveThruService();
GifLoaderDialogUtils.showMyDialog(context);
- service.getCovidTestProceduresList(context).then((res) {
+ service.getCovidTestProceduresList(context, selectedProject.testTypeEnum, selectedProject.testProcedureEnum, selectedProject.projectID).then((res) {
if (res['MessageStatus'] == 1) {
setState(() {
res['COVID19_TestProceduresList'].forEach((v) {
diff --git a/lib/pages/Covid-DriveThru/covid-payment-details.dart b/lib/pages/Covid-DriveThru/covid-payment-details.dart
index 2301de51..7f2ba582 100644
--- a/lib/pages/Covid-DriveThru/covid-payment-details.dart
+++ b/lib/pages/Covid-DriveThru/covid-payment-details.dart
@@ -1,17 +1,16 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidPaymentInfoResponse.dart';
import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidTestProceduresResponse.dart';
+import 'package:diplomaticquarterapp/models/CovidDriveThru/DriveThroughTestingCenterModel.dart';
import 'package:diplomaticquarterapp/pages/Covid-DriveThru/Covid-TimeSlots.dart';
import 'package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.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/material.dart';
-import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
class CovidPaymentDetails extends StatefulWidget {
@@ -19,8 +18,9 @@ class CovidPaymentDetails extends StatefulWidget {
int projectID;
List proceduresList;
CovidTestProceduresResponse selectedProcedure;
+ DriveThroughTestingCenterModel selectedProject;
- CovidPaymentDetails({@required this.covidPaymentInfoResponse, @required this.projectID, @required this.proceduresList});
+ CovidPaymentDetails({@required this.covidPaymentInfoResponse, @required this.projectID, @required this.proceduresList, @required this.selectedProject});
@override
_CovidPaymentDetailsState createState() => _CovidPaymentDetailsState();
@@ -89,7 +89,6 @@ class _CovidPaymentDetailsState extends State {
getPaymentInfo(context, widget.projectID.toString(), widget.selectedProcedure.procedureID);
});
},
-
),
Text(
projectViewModel.isArabic ? widget.proceduresList[index].procedureNameN : widget.proceduresList[index].procedureName,
@@ -108,7 +107,6 @@ class _CovidPaymentDetailsState extends State {
],
),
),
-
Container(
decoration: cardRadius(12),
child: Padding(
@@ -171,7 +169,6 @@ class _CovidPaymentDetailsState extends State {
),
),
),
-
Container(
margin: EdgeInsets.fromLTRB(0.0, 0.0, 0.0, 0.0),
child: Row(
@@ -210,7 +207,6 @@ class _CovidPaymentDetailsState extends State {
),
),
mFlex(1),
-
Text(
TranslationBase.of(context).payOptions,
textAlign: TextAlign.center,
@@ -306,13 +302,7 @@ class _CovidPaymentDetailsState extends State {
}
void next() {
- Navigator.push(
- context,
- FadePage(
- page: CovidTimeSlots(
- projectID: widget.projectID,
- selectedProcedure: widget.selectedProcedure,
- )));
+ Navigator.push(context, FadePage(page: CovidTimeSlots(projectID: widget.projectID, selectedProcedure: widget.selectedProcedure, selectedProject: widget.selectedProject)));
}
cancel() {
@@ -322,7 +312,7 @@ class _CovidPaymentDetailsState extends State {
getPaymentInfo(BuildContext context, String projectID, String selectedProcedureID) {
CovidDriveThruService service = new CovidDriveThruService();
GifLoaderDialogUtils.showMyDialog(context);
- service.getCovidPaymentInformation(context, int.parse(projectID), selectedProcedureID).then((res) {
+ service.getCovidPaymentInformation(context, int.parse(projectID), selectedProcedureID, widget.selectedProject.testTypeEnum, widget.selectedProject.testProcedureEnum).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {
diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart
index c3351862..2a9b8e1b 100644
--- a/lib/pages/ToDoList/ToDo.dart
+++ b/lib/pages/ToDoList/ToDo.dart
@@ -115,7 +115,7 @@ class _ToDoState extends State {
child: widget.appoList[index].clinicID == 265
? Container(
margin: EdgeInsets.only(left: 5.0, right: 5.0),
- child: SvgPicture.asset("assets/images/new/drive-thru.svg"),
+ child: SvgPicture.asset("assets/images/new/CoronaIcon.svg", width: 35.0, height: 35.0),
)
: widget.appoList[index].isLiveCareAppointment
? SvgPicture.asset("assets/images/new/virtual.svg")
@@ -130,7 +130,7 @@ class _ToDoState extends State {
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: Text(
widget.appoList[index].clinicID == 265
- ? TranslationBase.of(context).drivethruAppo
+ ? TranslationBase.of(context).covidTestTodo
: widget.appoList[index].isLiveCareAppointment
? TranslationBase.of(context).liveCareAppo
: TranslationBase.of(context).walkinAppo,
diff --git a/lib/pages/ToDoList/payment_method_select.dart b/lib/pages/ToDoList/payment_method_select.dart
index ea583477..b0f65e13 100644
--- a/lib/pages/ToDoList/payment_method_select.dart
+++ b/lib/pages/ToDoList/payment_method_select.dart
@@ -6,6 +6,7 @@ import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
+import 'package:pay/pay.dart';
class PaymentMethod extends StatefulWidget {
Function onSelectedMethod;
@@ -300,35 +301,58 @@ class _PaymentMethodState extends State {
bottomSheet: Container(
padding: EdgeInsets.all(16),
color: Colors.white,
- child: Container(
- width: MediaQuery.of(context).size.width,
- height: 50.0,
- color: Colors.white,
- // margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 20.0),
- child: ButtonTheme(
- shape: RoundedRectangleBorder(
- borderRadius: BorderRadius.circular(10.0),
- ),
- minWidth: MediaQuery.of(context).size.height * 0.1,
- height: 45.0,
- child: RaisedButton(
- color: CustomColors.green,
- textColor: Colors.white,
- disabledTextColor: Colors.white,
- disabledColor: new Color(0xFFbcc2c4),
- elevation: 0,
- onPressed: () {
- widget.onSelectedMethod(selectedPaymentMethod);
- Navigator.pop(context, selectedPaymentMethod);
- },
- child: Text(TranslationBase.of(context).confirm.toUpperCase(),
- style: TextStyle(
- fontSize: 14.0,
- fontWeight: FontWeight.w600,
- )),
- ),
- ),
- ),
+ child:
+ // selectedPaymentMethod == "ApplePay"
+ // ? ApplePayButton(
+ // paymentConfigurationAsset: 'applepay.json',
+ // paymentItems: _paymentItems,
+ // style: ApplePayButtonStyle.black,
+ // type: ApplePayButtonType.inStore,
+ // width: MediaQuery.of(context).size.width,
+ // height: 50,
+ // margin: const EdgeInsets.only(top: 15.0),
+ // onPaymentResult: (value) {
+ // print(value);
+ // // applePayResponse = ApplePayResponse.fromJson(value);
+ // // print(applePayResponse.token.data);
+ // },
+ // onError: (error) {
+ // print(error);
+ // },
+ // loadingIndicator: const Center(
+ // child: CircularProgressIndicator(),
+ // ),
+ // )
+ // :
+ Container(
+ width: MediaQuery.of(context).size.width,
+ height: 50.0,
+ color: Colors.white,
+ // margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 20.0),
+ child: ButtonTheme(
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(10.0),
+ ),
+ minWidth: MediaQuery.of(context).size.height * 0.1,
+ height: 45.0,
+ child: RaisedButton(
+ color: CustomColors.green,
+ textColor: Colors.white,
+ disabledTextColor: Colors.white,
+ disabledColor: new Color(0xFFbcc2c4),
+ elevation: 0,
+ onPressed: () {
+ widget.onSelectedMethod(selectedPaymentMethod);
+ Navigator.pop(context, selectedPaymentMethod);
+ },
+ child: Text(TranslationBase.of(context).confirm.toUpperCase(),
+ style: TextStyle(
+ fontSize: 14.0,
+ fontWeight: FontWeight.w600,
+ )),
+ ),
+ ),
+ ),
),
);
}
diff --git a/lib/pages/landing/fragments/home_page_fragment2.dart b/lib/pages/landing/fragments/home_page_fragment2.dart
index 4bdc2445..d4706772 100644
--- a/lib/pages/landing/fragments/home_page_fragment2.dart
+++ b/lib/pages/landing/fragments/home_page_fragment2.dart
@@ -1,3 +1,4 @@
+import 'dart:convert';
import 'dart:math' as math;
import 'package:auto_size_text/auto_size_text.dart';
@@ -7,6 +8,7 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
+import 'package:diplomaticquarterapp/models/apple_pay_response.dart';
import 'package:diplomaticquarterapp/models/gradient_color.dart';
import 'package:diplomaticquarterapp/models/hmg_services.dart';
import 'package:diplomaticquarterapp/models/slider_data.dart';
@@ -23,7 +25,9 @@ import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
+import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:provider/provider.dart';
+import 'package:pay/pay.dart';
class HomePageFragment2 extends StatefulWidget {
DashboardViewModel model;
@@ -39,6 +43,7 @@ class _HomePageFragment2State extends State {
ProjectViewModel projectViewModel;
List hmgServices = [];
List appoList = [];
+ ApplePayResponse applePayResponse;
@override
void initState() {
@@ -52,7 +57,7 @@ class _HomePageFragment2State extends State {
initialiseHmgServices(bool isLogin) {
hmgServices.clear();
hmgServices.add(new HmgServices(0, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin));
- hmgServices.add(new HmgServices(1, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/covid_test_drive_thru.svg", isLogin));
+ hmgServices.add(new HmgServices(1, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/CoronaIcon.svg", isLogin));
hmgServices.add(new HmgServices(2, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", isLogin));
hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin));
hmgServices.add(new HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin));
@@ -562,6 +567,10 @@ class _HomePageFragment2State extends State {
);
}
+ callPayfortApplePayAPI(ApplePayResponse applePayResponse) {
+
+ }
+
Widget showFloating(String icon) {
return Container(
width: MediaQuery.of(context).size.width * 0.06,
diff --git a/lib/pages/login/register-info.dart b/lib/pages/login/register-info.dart
index c275ec38..35ff6838 100644
--- a/lib/pages/login/register-info.dart
+++ b/lib/pages/login/register-info.dart
@@ -3,38 +3,44 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/config/config.dart';
-import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
-import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
-import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart';
-import 'package:diplomaticquarterapp/routes.dart';
+import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
+import 'package:diplomaticquarterapp/locator.dart';
+import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart' as checkActivation;
import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart';
import 'package:diplomaticquarterapp/models/Authentication/register_info_response.dart';
-import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
+import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
+import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart';
+import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.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';
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/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.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';
import 'package:hijri/hijri_calendar.dart';
import 'package:intl/intl.dart';
import 'package:provider/provider.dart';
-import 'package:diplomaticquarterapp/uitl/utils_new.dart';
class RegisterInfo extends StatefulWidget {
final Function changePageViewIndex;
final int page;
+
const RegisterInfo({Key key, this.changePageViewIndex, this.page = 1}) : super(key: key);
+
@override
_RegisterInfo createState() => _RegisterInfo();
}
@@ -128,90 +134,6 @@ class _RegisterInfo extends State {
SizedBox(height: 20),
],
)
- // Column(
- // crossAxisAlignment: CrossAxisAlignment.start,
- // mainAxisAlignment: MainAxisAlignment.spaceEvenly,
- // children: [
- // AppText(TranslationBase.of(context).nationalID),
- // Container(
- // margin: EdgeInsets.only(bottom: 10),
- // child: TextFields(
- // hintText: registerInfo.idNumber,
- // prefixIcon: Icon(Icons.chrome_reader_mode, color: Colors.red),
- // padding: EdgeInsets.only(top: 20, bottom: 20, left: 10, right: 10),
- // readOnly: true,
- // )),
- // AppText(TranslationBase.of(context).firstName),
- // Container(
- // margin: EdgeInsets.only(bottom: 10),
- // child: TextFields(
- // hintText: registerInfo.firstNameEn == '-' ? registerInfo.firstNameAr : registerInfo.firstNameEn,
- // padding: EdgeInsets.only(top: 20, bottom: 20, left: 10, right: 10),
- // readOnly: true,
- // )),
- // AppText(TranslationBase.of(context).middleName),
- // Container(
- // margin: EdgeInsets.only(bottom: 10),
- // child: TextFields(
- // hintText: registerInfo.secondNameEn == '-' ? registerInfo.secondNameAr : registerInfo.secondNameEn,
- // padding: EdgeInsets.only(top: 20, bottom: 20, left: 10, right: 10),
- // readOnly: true,
- // )),
- // AppText(TranslationBase.of(context).lastName),
- // Container(
- // margin: EdgeInsets.only(bottom: 10),
- // child: TextFields(
- // hintText: registerInfo.lastNameEn == '-' ? registerInfo.lastNameAr : registerInfo.lastNameEn,
- // padding: EdgeInsets.only(top: 20, bottom: 20, left: 10, right: 10),
- // readOnly: true,
- // )),
- // AppText(TranslationBase.of(context).gender),
- // Container(
- // margin: EdgeInsets.only(bottom: 10),
- // child: TextFields(
- // hintText: registerInfo.maritalStatusCode == 'U'
- // ? 'Unknown'
- // : registerInfo.maritalStatusCode == 'M'
- // ? 'Male'
- // : 'Female',
- // padding: EdgeInsets.only(top: 20, bottom: 20, left: 10, right: 10),
- // readOnly: true,
- // )),
- // AppText(TranslationBase.of(context).maritalStatus),
- // Container(
- // margin: EdgeInsets.only(bottom: 10),
- // child: TextFields(
- // hintText: registerInfo.maritalStatus,
- // padding: EdgeInsets.only(top: 20, bottom: 20, left: 10, right: 10),
- // readOnly: true,
- // )),
- // AppText(TranslationBase.of(context).nationality),
- // Container(
- // margin: EdgeInsets.only(bottom: 10),
- // child: TextFields(
- // hintText: registerInfo.nationalityCode,
- // padding: EdgeInsets.only(top: 20, bottom: 20, left: 10, right: 10),
- // readOnly: true,
- // )),
- // AppText(TranslationBase.of(context).mobileNumber),
- // Container(
- // margin: EdgeInsets.only(bottom: 10),
- // child: TextFields(
- // hintText: registerd_data.patientMobileNumber.toString(),
- // padding: EdgeInsets.only(top: 20, bottom: 20, left: 10, right: 10),
- // readOnly: true,
- // )),
- // AppText(TranslationBase.of(context).dob),
- // Container(
- // margin: EdgeInsets.only(bottom: 10),
- // child: TextFields(
- // hintText: registerInfo.dateOfBirth,
- // padding: EdgeInsets.only(top: 20, bottom: 20, left: 10, right: 10),
- // readOnly: true,
- // )),
- // ],
- // )
-
: registerInfo != null && widget.page == 2
? Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -349,22 +271,6 @@ class _RegisterInfo extends State {
],
)
: SizedBox(),
- // Column(
- // mainAxisAlignment: MainAxisAlignment.end,
- // children: [
- // Row(
- // children: [
- // Expanded(
- // child: DefaultButton(
- // page == 1 ? TranslationBase.of(context).next : TranslationBase.of(context).register,
- // () => {nextPage()},
- // textColor: Colors.white,
- // color: this.isValid() == false && page == 2 ? Colors.grey : Colors.black,
- // ))
- // ],
- // ),
- // ],
- // )
]),
),
bottomSheet: Container(
@@ -417,8 +323,6 @@ class _RegisterInfo extends State {
.registerUser(request)
.then((result) => {
GifLoaderDialogUtils.hideDialog(context),
- // userData = result.list;
- //AuthenticatedUser.fromJson(result['List'][0]),
if (result is String)
{
new ConfirmDialog(
@@ -450,6 +354,7 @@ class _RegisterInfo extends State {
sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID),
sharedPref.setString(TOKEN, result.authenticationTokenID),
+ AppToast.showSuccessToast(message: TranslationBase.of(context).successRegister),
checkIfUserAgreedBefore(result),
}
})
@@ -496,7 +401,7 @@ class _RegisterInfo extends State {
return {
"Patientobject": {
"TempValue": true,
- "PatientIdentificationType": 1,
+ "PatientIdentificationType": registerInfo.idNumber.substring(0, 1) == "1" ? 1 : 2,
"PatientIdentificationNo": registerInfo.idNumber,
"MobileNumber": registerd_data.patientMobileNumber,
"PatientOutSA": registerd_data.zipCode == '966' ? 0 : 1,
@@ -541,13 +446,21 @@ class _RegisterInfo extends State {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
- AppText(
+ Text(
name1,
- fontSize: 12,
- fontWeight: FontWeight.bold,
+ style: TextStyle(
+ fontSize: 14,
+ fontWeight: FontWeight.bold,
+ letterSpacing: -0.44,
+ ),
),
- AppText(
+ Text(
value1,
+ style: TextStyle(
+ fontSize: 12,
+ fontWeight: FontWeight.w600,
+ letterSpacing: -0.44,
+ ),
),
],
)),
@@ -555,12 +468,22 @@ class _RegisterInfo extends State {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
- AppText(
+ Text(
name2,
- fontSize: 12,
- fontWeight: FontWeight.bold,
+ style: TextStyle(
+ fontSize: 14,
+ fontWeight: FontWeight.bold,
+ letterSpacing: -0.44,
+ ),
+ ),
+ Text(
+ value2,
+ style: TextStyle(
+ fontSize: 12,
+ fontWeight: FontWeight.w600,
+ letterSpacing: -0.44,
+ ),
),
- AppText(value2),
],
))
],
@@ -569,7 +492,7 @@ class _RegisterInfo extends State {
checkIfUserAgreedBefore(checkActivation.CheckActivationCode result) {
if (result.isNeedUserAgreement == true) {
- //need to implement agreement page here
+ //TODO need to implement agreement page here
insertIMEI();
} else {
insertIMEI();
@@ -581,7 +504,6 @@ class _RegisterInfo extends State {
authService.insertDeviceImei(selectedOption).then((value) => {goToHome()}).catchError((err) {
print(err);
});
- // authService.registeredAuthenticatedUser(data, token, 0, 0).then((res) => {});
}
goToHome() async {
@@ -637,11 +559,13 @@ class _RegisterInfo extends State {
class Language {
final String name;
final String value;
+
Language({this.name, this.value});
}
class Location {
final String name;
final String value;
+
Location({this.name, this.value});
}
diff --git a/lib/pages/medical/balance/confirm_payment_page.dart b/lib/pages/medical/balance/confirm_payment_page.dart
index 939a95f2..371d85b0 100644
--- a/lib/pages/medical/balance/confirm_payment_page.dart
+++ b/lib/pages/medical/balance/confirm_payment_page.dart
@@ -16,7 +16,6 @@ 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/defaultButton.dart';
-import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/otp/sms-popup.dart';
@@ -33,11 +32,7 @@ class ConfirmPaymentPage extends StatefulWidget {
final String selectedPaymentMethod;
AuthenticatedUser authenticatedUser;
- ConfirmPaymentPage(
- {this.advanceModel,
- this.patientInfoAndMobileNumber,
- this.selectedPaymentMethod,
- this.authenticatedUser});
+ ConfirmPaymentPage({this.advanceModel, this.patientInfoAndMobileNumber, this.selectedPaymentMethod, this.authenticatedUser});
@override
_ConfirmPaymentPageState createState() => _ConfirmPaymentPageState();
@@ -51,16 +46,25 @@ class _ConfirmPaymentPageState extends State {
String transID = "";
ProjectViewModel projectViewModel;
+ Pay _payClient = Pay.withAssets([
+ 'applepay.json',
+ ]);
+
+ var _paymentItems = [
+ PaymentItem(
+ label: 'Total',
+ amount: '99.99',
+ status: PaymentItemStatus.final_price,
+ )
+ ];
+
void submit(MyBalanceViewModel model, code) {
final activationCode = code;
GifLoaderDialogUtils.showMyDialog(AppGlobal.context);
- model
- .checkActivationCodeForAdvancePayment(activationCode: activationCode)
- .then((value) {
+ model.checkActivationCodeForAdvancePayment(activationCode: activationCode).then((value) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
Navigator.pop(context, true);
- AppoitmentAllHistoryResultList appo =
- new AppoitmentAllHistoryResultList();
+ AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList();
appo.projectID = widget.patientInfoAndMobileNumber.projectID;
projectViewModel.analytics.advancePayments.payment_otp_confirmation(method: widget.selectedPaymentMethod.toLowerCase(), type: 'wallet');
@@ -119,12 +123,10 @@ class _ConfirmPaymentPageState extends State {
height: 100.0,
padding: EdgeInsets.all(7.0),
width: MediaQuery.of(context).size.width * 0.30,
- child: Image.asset(
- getImagePath(widget.selectedPaymentMethod)),
+ child: Image.asset(getImagePath(widget.selectedPaymentMethod)),
),
Text(
- '${widget.advanceModel.amount} ' +
- TranslationBase.of(context).sar,
+ '${widget.advanceModel.amount} ' + TranslationBase.of(context).sar,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w900,
@@ -153,8 +155,7 @@ class _ConfirmPaymentPageState extends State {
margin: EdgeInsets.all(3),
child: NewTextFields(
hintText: TranslationBase.of(context).name,
- initialValue:
- widget.patientInfoAndMobileNumber.firstName,
+ initialValue: widget.patientInfoAndMobileNumber.firstName,
isEnabled: false,
),
),
@@ -174,11 +175,7 @@ class _ConfirmPaymentPageState extends State {
),
NewTextFields(
hintText: TranslationBase.of(context).depositorName,
- initialValue: model.user.firstName +
- " " +
- model.user.middleName +
- " " +
- model.user.lastName,
+ initialValue: model.user.firstName + " " + model.user.middleName + " " + model.user.lastName,
isEnabled: false,
),
SizedBox(
@@ -214,6 +211,11 @@ class _ConfirmPaymentPageState extends State {
if (model.state != ViewState.ErrorLocal &&
model.state != ViewState.Error) showSMSDialog(model);
});
+ // GifLoaderDialogUtils.showMyDialog(context);
+ // model.sendActivationCodeForAdvancePayment(patientID: int.parse(widget.advanceModel.fileNumber), projectID: widget.advanceModel.hospitalsModel.iD).then((value) {
+ // GifLoaderDialogUtils.hideDialog(context);
+ // if (model.state != ViewState.ErrorLocal && model.state != ViewState.Error) showSMSDialog(model);
+ // });
},
),
),
@@ -247,32 +249,13 @@ class _ConfirmPaymentPageState extends State {
return 'assets/images/new-design/mada.png';
}
- openPayment(String paymentMethod, AuthenticatedUser authenticatedUser,
- double amount, AppoitmentAllHistoryResultList appo) {
- browser = new MyInAppBrowser(
- onExitCallback: onBrowserExit,
- appo: appo,
- onLoadStartCallback: onBrowserLoadStart);
+ openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, double amount, AppoitmentAllHistoryResultList appo) {
+ browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart);
- transID = Utils.getAdvancePaymentTransID(
- widget.advanceModel.hospitalsModel.iD,
- int.parse(widget.advanceModel.fileNumber));
+ transID = Utils.getAdvancePaymentTransID(widget.advanceModel.hospitalsModel.iD, int.parse(widget.advanceModel.fileNumber));
- browser.openPaymentBrowser(
- amount,
- "Advance Payment",
- transID,
- widget.advanceModel.hospitalsModel.iD.toString(),
- widget.advanceModel.email,
- paymentMethod,
- widget.patientInfoAndMobileNumber.patientType,
- widget.advanceModel.patientName,
- widget.advanceModel.fileNumber,
- authenticatedUser,
- browser,
- false,
- "3",
- "");
+ browser.openPaymentBrowser(amount, "Advance Payment", transID, widget.advanceModel.hospitalsModel.iD.toString(), widget.advanceModel.email, paymentMethod,
+ widget.patientInfoAndMobileNumber.patientType, widget.advanceModel.patientName, widget.advanceModel.fileNumber, authenticatedUser, browser, false, "3", "");
}
onBrowserLoadStart(String url) {
@@ -322,22 +305,10 @@ class _ConfirmPaymentPageState extends State {
createAdvancePayment(res, AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService();
String paymentReference = res['Fort_id'].toString();
- service.HIS_createAdvancePayment(
- appo,
- widget.advanceModel.hospitalsModel.iD.toString(),
- res['Amount'],
- res['Fort_id'],
- res['PaymentMethod'],
- widget.patientInfoAndMobileNumber.patientType,
- widget.advanceModel.patientName,
- widget.advanceModel.fileNumber,
- AppGlobal.context)
+ service.HIS_createAdvancePayment(appo, widget.advanceModel.hospitalsModel.iD.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], widget.patientInfoAndMobileNumber.patientType,
+ widget.advanceModel.patientName, widget.advanceModel.fileNumber, AppGlobal.context)
.then((res) {
- addAdvancedNumberRequest(
- res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(),
- paymentReference,
- 0,
- appo);
+ addAdvancedNumberRequest(res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), paymentReference, 0, appo);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
AppToast.showErrorToast(message: err);
@@ -345,13 +316,9 @@ class _ConfirmPaymentPageState extends State {
});
}
- addAdvancedNumberRequest(String advanceNumber, String paymentReference,
- dynamic appointmentID, AppoitmentAllHistoryResultList appo) {
+ addAdvancedNumberRequest(String advanceNumber, String paymentReference, dynamic appointmentID, AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService();
- service
- .addAdvancedNumberRequest(
- advanceNumber, paymentReference, appointmentID, AppGlobal.context)
- .then((res) {
+ service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, AppGlobal.context).then((res) {
print(res);
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
navigateToHome(AppGlobal.context);
diff --git a/lib/pages/medical/labs/laboratory_result_page.dart b/lib/pages/medical/labs/laboratory_result_page.dart
index cf0ec4e2..20d09668 100644
--- a/lib/pages/medical/labs/laboratory_result_page.dart
+++ b/lib/pages/medical/labs/laboratory_result_page.dart
@@ -18,16 +18,18 @@ class LaboratoryResultPage extends StatefulWidget {
}
class _LaboratoryResultPageState extends State {
-
@override
Widget build(BuildContext context) {
-
return BaseView(
onModelReady: (model) => model.getLaboratoryResult(
- invoiceNo: widget.patientLabOrders.invoiceNo, clinicID: widget.patientLabOrders.clinicID, projectID: widget.patientLabOrders.projectID, orderNo: widget.patientLabOrders.orderNo),
+ invoiceNo: widget.patientLabOrders.invoiceNo,
+ clinicID: widget.patientLabOrders.clinicID,
+ projectID: widget.patientLabOrders.projectID,
+ orderNo: widget.patientLabOrders.orderNo,
+ setupID: widget.patientLabOrders.setupID),
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
- appBarTitle: widget.patientLabOrders.doctorName,
+ appBarTitle: widget.patientLabOrders.doctorName,
baseViewModel: model,
showNewAppBar: true,
showNewAppBarTitle: true,
diff --git a/lib/pages/pharmacies/my_reviews.dart b/lib/pages/pharmacies/my_reviews.dart
index 39304cac..82e1de8b 100644
--- a/lib/pages/pharmacies/my_reviews.dart
+++ b/lib/pages/pharmacies/my_reviews.dart
@@ -1,10 +1,10 @@
+import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/review_view_model.dart';
+import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
-import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
+import 'package:flutter/material.dart';
import 'package:rating_bar/rating_bar.dart';
-import 'package:diplomaticquarterapp/pages/base/base_view.dart';
-import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
class MyReviewsPage extends StatefulWidget {
@override
@@ -47,7 +47,8 @@ class _MyReviewsPageState extends State {
),
Padding(
padding: const EdgeInsets.all(8.0),
- child: Text(TranslationBase.of(context).noData,
+ child: Text(
+ TranslationBase.of(context).noData,
// 'There is no data',
style: TextStyle(fontSize: 30),
),
@@ -65,11 +66,8 @@ class _MyReviewsPageState extends State {
Container(
child: reviewDetails(
model.reviewListList[index],
- double.parse(model.reviewListList[index].product
- .approvedTotalReviews
- .toString()),
- double.parse(model.reviewListList[index].rating
- .toString()),
+ double.parse(model.reviewListList[index].product.approvedTotalReviews.toString()),
+ double.parse(model.reviewListList[index].rating.toString()),
),
),
Divider(height: 1, color: Colors.grey)
@@ -97,9 +95,7 @@ reviewDetails(data, rate, myRate) {
Row(
children: [
Container(
- margin: languageID == 'ar'
- ? EdgeInsets.only(top: 10, right: 10)
- : EdgeInsets.only(top: 10, left: 10),
+ margin: languageID == 'ar' ? EdgeInsets.only(top: 10, right: 10) : EdgeInsets.only(top: 10, left: 10),
child: Image.network(
data.product.images[0].src.trim(),
fit: BoxFit.cover,
@@ -114,18 +110,11 @@ reviewDetails(data, rate, myRate) {
Container(
margin: EdgeInsets.all(5),
child: Align(
- alignment: languageID == 'ar'
- ? Alignment.topRight
- : Alignment.topLeft,
+ alignment: languageID == 'ar' ? Alignment.topRight : Alignment.topLeft,
child: RichText(
text: TextSpan(
- text: languageID == 'ar'
- ? data.product.namen
- : data.product.name,
- style: TextStyle(
- color: Colors.black54,
- fontSize: languageID == 'ar' ? 12 : 13,
- fontWeight: FontWeight.bold),
+ text: languageID == 'ar' ? data.product.namen : data.product.name,
+ style: TextStyle(color: Colors.black54, fontSize: languageID == 'ar' ? 12 : 13, fontWeight: FontWeight.bold),
),
),
),
@@ -135,18 +124,11 @@ reviewDetails(data, rate, myRate) {
Container(
margin: EdgeInsets.all(5),
child: Align(
- alignment: languageID == 'ar'
- ? Alignment.topRight
- : Alignment.topLeft,
+ alignment: languageID == 'ar' ? Alignment.topRight : Alignment.topLeft,
child: RichText(
text: TextSpan(
- text: data.product.quantity.toString() +
- " " +
- data.product.currency,
- style: TextStyle(
- fontWeight: FontWeight.bold,
- color: Colors.black,
- fontSize: 13),
+ text: data.product.price.toString() + " " + data.product.currency,
+ style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13),
),
),
),
@@ -156,9 +138,7 @@ reviewDetails(data, rate, myRate) {
Container(
margin: EdgeInsets.all(5),
child: Align(
- alignment: languageID == 'ar'
- ? Alignment.topRight
- : Alignment.topLeft,
+ alignment: languageID == 'ar' ? Alignment.topRight : Alignment.topLeft,
child: RatingBar.readOnly(
initialRating: rate,
size: 15.0,
@@ -186,11 +166,7 @@ reviewDetails(data, rate, myRate) {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
- Container(
- padding: languageID == 'ar'
- ? EdgeInsets.only(right: 10)
- : EdgeInsets.only(left: 10),
- child: Text(data.createdOnUtc.toString().substring(0 , 11))),
+ Container(padding: languageID == 'ar' ? EdgeInsets.only(right: 10) : EdgeInsets.only(left: 10), child: Text(data.createdOnUtc.toString().substring(0, 11))),
],
),
),
@@ -200,9 +176,7 @@ reviewDetails(data, rate, myRate) {
mainAxisAlignment: MainAxisAlignment.end,
children: [
Container(
- padding: languageID == 'ar'
- ? EdgeInsets.only(right: 60)
- : EdgeInsets.only(left: 60),
+ padding: languageID == 'ar' ? EdgeInsets.only(right: 60) : EdgeInsets.only(left: 60),
child: RatingBar.readOnly(
initialRating: myRate,
size: 15.0,
@@ -225,10 +199,8 @@ reviewDetails(data, rate, myRate) {
),
Expanded(
child: Container(
- padding: languageID == 'ar'
- ? EdgeInsets.only(right: 10)
- : EdgeInsets.only(left: 10),
- child: Text(fixingString(data.reviewText.toString())),
+ padding: languageID == 'ar' ? EdgeInsets.only(right: 10) : EdgeInsets.only(left: 10),
+ child: Text(getReview(data) ?? ""),
),
),
],
@@ -238,6 +210,20 @@ reviewDetails(data, rate, myRate) {
);
}
+String getReview(data) {
+ String reviewTxt = "";
+
+ if (data.reviewText == null && data.replyText == null) {
+ reviewTxt = "";
+ }
+ if (data.reviewText == null)
+ reviewTxt = data.replyText;
+ else
+ reviewTxt = data.reviewText;
+
+ return reviewTxt;
+}
+
fixingString(txt) {
String stringTxt;
String newTxt;
diff --git a/lib/pages/pharmacies/screens/cart-page/cart-order-page.dart b/lib/pages/pharmacies/screens/cart-page/cart-order-page.dart
index 7a252bd6..654db47d 100644
--- a/lib/pages/pharmacies/screens/cart-page/cart-order-page.dart
+++ b/lib/pages/pharmacies/screens/cart-page/cart-order-page.dart
@@ -437,6 +437,7 @@ class _OrderBottomWidgetState extends State {
FadePage(
page: PharmacyAddressesPage(
orderPreviewViewModel: widget.model,
+ isShippingAddress: true,
))).then((result) async {
if (result != null) {
GifLoaderDialogUtils.showMyDialog(context);
diff --git a/lib/pages/pharmacies/screens/lakum-points-month-page.dart b/lib/pages/pharmacies/screens/lakum-points-month-page.dart
index 7f821f55..514804cc 100644
--- a/lib/pages/pharmacies/screens/lakum-points-month-page.dart
+++ b/lib/pages/pharmacies/screens/lakum-points-month-page.dart
@@ -6,7 +6,6 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
-import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class LakumPointMonthPage extends StatefulWidget {
diff --git a/lib/pages/pharmacy/pharmacyAddresses/AddAddress.dart b/lib/pages/pharmacy/pharmacyAddresses/AddAddress.dart
index 5e55d537..dcc4b299 100644
--- a/lib/pages/pharmacy/pharmacyAddresses/AddAddress.dart
+++ b/lib/pages/pharmacy/pharmacyAddresses/AddAddress.dart
@@ -1,17 +1,27 @@
-import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart';
+import 'dart:async';
+
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart';
+import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart';
+import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
+import 'package:diplomaticquarterapp/theme/colors.dart';
+import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
+import 'package:diplomaticquarterapp/widgets/app_map/google_huawei_map.dart';
+import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/pickupLocation/PickupLocationFromMap.dart';
import 'package:flutter/material.dart';
+import 'package:geocoding/geocoding.dart';
import 'package:geolocator/geolocator.dart';
+import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:google_maps_place_picker/google_maps_place_picker.dart';
+import 'package:provider/provider.dart';
class AddAddressPage extends StatefulWidget {
final AddressInfo editedAddress;
- final Function(PickResult) onPick;
+ final Function(Placemark, String) onPick;
AddAddressPage(this.editedAddress, this.onPick);
@@ -22,10 +32,21 @@ class AddAddressPage extends StatefulWidget {
class _AddAddressPageState extends State {
double _latitude;
double _longitude;
+ AppMap appMap;
+ AppSharedPreferences sharedPref = AppSharedPreferences();
+ LatLng currentPostion;
+ Completer mapController = Completer();
+ Placemark selectedPlace;
+
+ static CameraPosition _kGooglePlex = CameraPosition(
+ target: LatLng(37.42796133580664, -122.085749655962),
+ zoom: 14.4746,
+ );
@override
void initState() {
super.initState();
+
if (widget.editedAddress != null && widget.editedAddress.latLong != null && widget.editedAddress.latLong != "") {
List latLng = widget.editedAddress.latLong.split(",");
_latitude = double.parse(latLng[0]);
@@ -33,13 +54,43 @@ class _AddAddressPageState extends State {
} else {
_getCurrentLocation();
}
+ // setState(() {});
+ appMap = AppMap(
+ _kGooglePlex.toMap(),
+ onCameraMove: (camera) {
+ _updatePosition(camera);
+ },
+ onMapCreated: () {
+ currentPostion = LatLng(_latitude, _longitude);
+ // latitude = widget.latitude;
+ // longitude = widget.longitude;
+ setMap();
+ setState(() {});
+ },
+ onCameraIdle: () async {
+ List placemarks = await placemarkFromCoordinates(_latitude, _longitude);
+ selectedPlace = placemarks[0];
+ print(selectedPlace);
+ },
+ );
+ }
+
+ setMap() {
setState(() {
+ _kGooglePlex = CameraPosition(
+ target: currentPostion,
+ zoom: 14.4746,
+ );
+ appMap.moveTo(cameraPostion: _kGooglePlex);
});
}
-
-
+ void _updatePosition(CameraPosition _position) {
+ _latitude = _position.target.latitude;
+ _longitude = _position.target.longitude;
+ print(_position);
+ }
_getCurrentLocation() async {
await Geolocator.getLastKnownPosition().then((value) {
@@ -48,37 +99,93 @@ class _AddAddressPageState extends State {
}).catchError((e) {
_longitude = 0;
_latitude = 0;
-
-
});
}
-
@override
Widget build(BuildContext context) {
final mediaQuery = MediaQuery.of(context);
final height = mediaQuery.size.height - 60 - mediaQuery.padding.top;
+ ProjectViewModel projectViewModel = Provider.of(context);
return BaseView(
builder: (_, model, wi) => AppScaffold(
appBarTitle: TranslationBase.of(context).changeAddress,
- isShowAppBar: false,
+ isShowAppBar: true,
isPharmacy: true,
backgroundColor: Colors.white,
- body: Container(
- height: height * 1,
- child: PickupLocationFromMap(
- latitude: _latitude??0,
- longitude: _longitude??0,
- isWithAppBar: false,
- buttonColor: Color(0xFF5AB145),
- buttonLabel: TranslationBase.of(context).save,
- onPick: (value) {
- widget.onPick(value);
- },
- ),
+ showNewAppBarTitle: true,
+ showNewAppBar: true,
+ body: Column(
+ children: [
+ Expanded(
+ child: Stack(
+ alignment: Alignment.center,
+ children: [
+ if (appMap != null) appMap,
+ Container(
+ margin: EdgeInsets.only(bottom: 50.0),
+ child: Icon(
+ Icons.place,
+ color: CustomColors.accentColor,
+ size: 50,
+ ),
+ ),
+ ],
+ ),
+ ),
+ Container(
+ padding: const EdgeInsets.only(left: 20, right: 20, top: 14, bottom: 14),
+ child: DefaultButton(TranslationBase.of(context).addNewAddress, () async {
+ // AddNewAddressRequestModel addNewAddressRequestModel = new AddNewAddressRequestModel(
+ // customer: Customer(addresses: [
+ // Addresses(
+ // address1: selectedPlace.name,
+ // address2: selectedPlace.street,
+ // customerAttributes: "",
+ // city: selectedPlace.locality,
+ // createdOnUtc: "",
+ // id: "0",
+ // faxNumber: "",
+ // phoneNumber: projectViewModel.user.mobileNumber,
+ // province: selectedPlace.locality,
+ // countryId: 69,
+ // latLong: "$_latitude,$_longitude",
+ // country: selectedPlace.country,
+ // zipPostalCode: selectedPlace.postalCode,
+ // email: projectViewModel.user.emailAddress)
+ // ]),
+ // );
+
+ widget.onPick(selectedPlace, "$_latitude,$_longitude");
+ Navigator.of(context).pop();
+
+ // 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(addNewAddressRequestModel);
+ }),
+ ),
+ ],
),
- ),
- );
+
+ // Container(
+ // height: height * 1,
+ // child: PickupLocationFromMap(
+ // latitude: _latitude ?? 0,
+ // longitude: _longitude ?? 0,
+ // isWithAppBar: false,
+ // buttonColor: Color(0xFF5AB145),
+ // buttonLabel: TranslationBase.of(context).save,
+ // onPick: (value) {
+ // widget.onPick(value);
+ // },
+ // ),
+ ),
+ );
+ // );
}
}
diff --git a/lib/pages/pharmacy/pharmacyAddresses/PharmacyAddresses.dart b/lib/pages/pharmacy/pharmacyAddresses/PharmacyAddresses.dart
index 609606ec..3d811514 100644
--- a/lib/pages/pharmacy/pharmacyAddresses/PharmacyAddresses.dart
+++ b/lib/pages/pharmacy/pharmacyAddresses/PharmacyAddresses.dart
@@ -24,8 +24,9 @@ class PharmacyAddressesPage extends StatefulWidget {
final Function changeMainState;
final bool isUpdate;
+ final bool isShippingAddress;
- const PharmacyAddressesPage({Key key, this.orderPreviewViewModel, this.isUpdate = false, this.changeMainState}) : super(key: key);
+ const PharmacyAddressesPage({Key key, this.orderPreviewViewModel, this.isUpdate = false, this.isShippingAddress = false, this.changeMainState}) : super(key: key);
@override
_PharmacyAddressesState createState() => _PharmacyAddressesState();
@@ -38,8 +39,8 @@ class _PharmacyAddressesState extends State {
FadePage(
page: AddAddressPage(
address,
- (pickResult) async {
- await model.addEditAddress(pickResult, address);
+ (pickResult, latLong) async {
+ await model.addEditAddress(pickResult, address, latLong: latLong);
},
),
),
@@ -62,7 +63,7 @@ class _PharmacyAddressesState extends State {
baseViewModel: model,
backgroundColor: Colors.white,
body: Container(
- height: height * 0.90,
+ height: widget.isShippingAddress ? height * 0.90 : height * 0.99,
child: SingleChildScrollView(
child: Column(
children: [
@@ -106,52 +107,51 @@ class _PharmacyAddressesState extends State {
),
),
),
- bottomSheet: Container(
- height: height * 0.10,
- color: Colors.white,
- child: Column(
- children: [
- Divider(
- color: Colors.grey.shade300,
- height: 1,
- thickness: 1,
- indent: 0,
- endIndent: 0,
- ),
- Container(
- padding: EdgeInsets.symmetric(horizontal: 12, vertical: 8),
- child: BorderedButton(
- TranslationBase.of(context).confirmAddress,
- hasBorder: true,
- borderColor: Color(0xFF5AB145),
- textColor: Colors.white,
- fontWeight: FontWeight.bold,
- backgroundColor: Color(0xFF5AB145),
- fontSize: 14,
- vPadding: 8,
- handler: () async {
- //TODO Elham*
- widget.orderPreviewViewModel.paymentCheckoutData.address = Addresses.fromJson(model.addresses[model.selectedAddressIndex].toJson());
-
- GifLoaderDialogUtils.showMyDialog(context);
-
- await widget.orderPreviewViewModel.getInformationsByAddress(projectProvider.user.patientIdentificationNo);
- if (widget.orderPreviewViewModel.error == "") {
- await widget.orderPreviewViewModel.getShoppingCart();
- GifLoaderDialogUtils.hideDialog(context);
- model.saveSelectedAddressLocally(model.addresses[model.selectedAddressIndex]);
- _navigateToPaymentOption(model);
- } else {
- GifLoaderDialogUtils.hideDialog(context);
- AppToast.showErrorToast(message: widget.orderPreviewViewModel.error);
- return;
- }
- },
+ bottomSheet: widget.isShippingAddress
+ ? Container(
+ height: height * 0.10,
+ color: Colors.white,
+ child: Column(
+ children: [
+ Divider(
+ color: Colors.grey.shade300,
+ height: 1,
+ thickness: 1,
+ indent: 0,
+ endIndent: 0,
+ ),
+ Container(
+ padding: EdgeInsets.symmetric(horizontal: 12, vertical: 8),
+ child: BorderedButton(
+ TranslationBase.of(context).confirmAddress,
+ hasBorder: true,
+ borderColor: Color(0xFF5AB145),
+ textColor: Colors.white,
+ fontWeight: FontWeight.bold,
+ backgroundColor: Color(0xFF5AB145),
+ fontSize: 14,
+ vPadding: 8,
+ handler: () async {
+ widget.orderPreviewViewModel.paymentCheckoutData.address = Addresses.fromJson(model.addresses[model.selectedAddressIndex].toJson());
+ GifLoaderDialogUtils.showMyDialog(context);
+ await widget.orderPreviewViewModel.getInformationsByAddress(projectProvider.user.patientIdentificationNo);
+ if (widget.orderPreviewViewModel.error == "") {
+ await widget.orderPreviewViewModel.getShoppingCart();
+ GifLoaderDialogUtils.hideDialog(context);
+ model.saveSelectedAddressLocally(model.addresses[model.selectedAddressIndex]);
+ _navigateToPaymentOption(model);
+ } else {
+ GifLoaderDialogUtils.hideDialog(context);
+ AppToast.showErrorToast(message: widget.orderPreviewViewModel.error);
+ return;
+ }
+ },
+ ),
+ ),
+ ],
),
- ),
- ],
- ),
- ),
+ )
+ : SizedBox(),
),
);
}
diff --git a/lib/pages/pharmacy/profile/profile.dart b/lib/pages/pharmacy/profile/profile.dart
index 184cdccc..64fae48d 100644
--- a/lib/pages/pharmacy/profile/profile.dart
+++ b/lib/pages/pharmacy/profile/profile.dart
@@ -432,7 +432,7 @@ class _ProfilePageState extends State {
),
InkWell(
onTap: () {
- Navigator.push(context, FadePage(page: PharmacyAddressesPage()));
+ Navigator.push(context, FadePage(page: PharmacyAddressesPage(isShippingAddress: false)));
},
child: Row(
children: [
diff --git a/lib/pages/webRTC/signaling.dart b/lib/pages/webRTC/signaling.dart
index 1e50c534..44de7488 100644
--- a/lib/pages/webRTC/signaling.dart
+++ b/lib/pages/webRTC/signaling.dart
@@ -1,50 +1,50 @@
import 'dart:convert';
-// import 'package:cloud_firestore/cloud_firestore.dart';
-import 'package:diplomaticquarterapp/pages/webRTC/fcm/FCMSendNotification.dart';
import 'package:diplomaticquarterapp/uitl/SignalRUtil.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter_webrtc/flutter_webrtc.dart';
-import 'call_page.dart';
-
typedef void StreamStateCallback(MediaStream stream);
typedef void RTCIceGatheringStateCallback(RTCIceGatheringState state);
typedef void RTCPeerConnectionStateCallback(RTCPeerConnectionState state);
typedef void RTCSignalingStateCallback(RTCSignalingState state);
class Signaling {
-
- dispose(){
- if(peerConnection != null)
- peerConnection.dispose();
+ dispose() {
+ if (peerConnection != null) peerConnection.dispose();
signalR.closeConnection();
}
- init(){
+ init() {
// Create Peer Connection
- createPeerConnection(configuration).then((value){
+ createPeerConnection(configuration).then((value) {
peerConnection = value;
registerPeerConnectionListeners();
});
}
-
- initializeSignalR(String userName) async{
- if(signalR != null)
- await signalR.closeConnection();
+ initializeSignalR(String userName) async {
+ if (signalR != null) await signalR.closeConnection();
// https://vcallapi.hmg.com/webRTCHub?source=web&username=zohaib
signalR = SignalRUtil(hubName: "https://vcallapi.hmg.com/webRTCHub?source=mobile&username=$userName");
final connected = await signalR.openConnection();
- if(!connected)
- throw 'Failed to connect SignalR';
+ if (!connected) throw 'Failed to connect SignalR';
}
Map configuration = {
+ // 'iceServers': [
+ // {
+ // 'urls': ['stun:stun1.l.google.com:19302', 'stun:stun2.l.google.com:19302']
+ // }
+ // ]
+
'iceServers': [
- {
- 'urls': ['stun:stun1.l.google.com:19302', 'stun:stun2.l.google.com:19302']
- }
+ // {
+ // 'urls': ['stun:stun1.l.google.com:19302', 'stun:stun2.l.google.com:19302']
+ // }
+
+ {'url': "stun:ec2-15-185-116-59.me-south-1.compute.amazonaws.com:3478"},
+ {'url': "turn:ec2-15-185-116-59.me-south-1.compute.amazonaws.com:3479", 'credential': "admin", 'username': "admin"}
]
};
@@ -65,8 +65,7 @@ class Signaling {
// return isCallPlaced;
// }
-
- Future acceptCall(String caller, String receiver, {@required MediaStream localMediaStream, @required Function(MediaStream) onRemoteMediaStream}) async{
+ Future acceptCall(String caller, String receiver, {@required MediaStream localMediaStream, @required Function(MediaStream) onRemoteMediaStream}) async {
await initializeSignalR(receiver);
signalR.setContributors(caller: caller, receiver: receiver);
await signalR.acceptCall(receiver, caller).catchError((e) => throw 'Failed to inform signalR that i accepted a call');
@@ -81,35 +80,28 @@ class Signaling {
return true;
}
- Future hangupCall(String caller, String receiver) async{
+ Future hangupCall(String caller, String receiver) async {
await signalR.hangupCall(caller, receiver);
dispose();
}
- answerOffer(String sdp) async{
+ answerOffer(String sdp) async {
final offer = jsonDecode(sdp);
final caller = offer['caller'];
final receiver = offer['target'];
final offerSdp = offer['sdp'];
- peerConnection.setRemoteDescription(rtcSessionDescriptionFrom(offerSdp))
- .then((value) {
+ peerConnection.setRemoteDescription(rtcSessionDescriptionFrom(offerSdp)).then((value) {
return peerConnection.createAnswer();
- })
- .then((anwser) {
+ }).then((anwser) {
return peerConnection.setLocalDescription(anwser);
- })
- .then((value) {
+ }).then((value) {
return peerConnection.getLocalDescription();
- })
- .then((answer) {
+ }).then((answer) {
return signalR.answerOffer(answer, caller, receiver);
});
-
}
- Future hangUp(RTCVideoRenderer localVideo) async {
-
- }
+ Future hangUp(RTCVideoRenderer localVideo) async {}
Future createSdpAnswer(String toOfferSdp) async {
final offerSdp = rtcSessionDescriptionFrom(jsonDecode(toOfferSdp));
@@ -128,12 +120,12 @@ class Signaling {
return offerSdp;
}
- addCandidate(String candidateJson){
+ addCandidate(String candidateJson) {
peerConnection.addCandidate(rtcIceCandidateFrom(candidateJson));
}
void registerPeerConnectionListeners() {
- peerConnection.onIceCandidate = (RTCIceCandidate candidate){
+ peerConnection.onIceCandidate = (RTCIceCandidate candidate) {
// print(json.encode(candidate.toMap()));
signalR.addIceCandidate(json.encode(candidate.toMap()));
};
@@ -152,14 +144,14 @@ class Signaling {
}
}
-
-rtcSessionDescriptionFrom(Map sdp){
+rtcSessionDescriptionFrom(Map sdp) {
return RTCSessionDescription(
- sdp['sdp'],sdp['type'],
+ sdp['sdp'],
+ sdp['type'],
);
}
-rtcIceCandidateFrom(String json){
+rtcIceCandidateFrom(String json) {
final map = jsonDecode(json)['candidate'];
return RTCIceCandidate(map['candidate'], map['sdpMid'], map['sdpMLineIndex']);
}
diff --git a/lib/services/appointment_services/GetDoctorsList.dart b/lib/services/appointment_services/GetDoctorsList.dart
index b317e106..139d847c 100644
--- a/lib/services/appointment_services/GetDoctorsList.dart
+++ b/lib/services/appointment_services/GetDoctorsList.dart
@@ -9,10 +9,12 @@ import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.da
import 'package:diplomaticquarterapp/models/Appointments/doctor_pre_post_image.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/Request.dart';
+import 'package:diplomaticquarterapp/models/apple_pay_request.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
+import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:flutter/cupertino.dart';
class DoctorsListService extends BaseService {
@@ -315,7 +317,8 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
- Future