Merge branch 'development_v3.3' into Dev_3.3_InPatient_CR

# Conflicts:
#	lib/config/config.dart
#	lib/pages/landing/fragments/home_page_fragment2.dart
#	lib/pages/landing/widgets/services_view.dart
Dev_3.3_InPatient_CR
haroon amjad 3 years ago
commit 2fea4b2b07

@ -0,0 +1,6 @@
-----BEGIN PRIVATE KEY-----
MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgJ5XRSnefd1apSG/z
YJTQ55ffLMlPgKlGM9edg88mUZagCgYIKoZIzj0DAQehRANCAATSA2MbS+J0cQsc
uBU0xaoxOUgGvnHCQSEK4t22i8eeKPPhH6RHJhK1ugPvj+Eyadf7j6pn3QRonEJu
mIL+qvqC
-----END PRIVATE KEY-----

@ -6,6 +6,9 @@
In most cases you can leave this as-is, but you if you want to provide In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. --> FlutterApplication and put your custom class here. -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/> <uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />

@ -30,12 +30,12 @@ enum class GeofenceTransition(val value: Int) {
fun fromInt(value: Int) = GeofenceTransition.values().first { it.value == value } fun fromInt(value: Int) = GeofenceTransition.values().first { it.value == value }
} }
fun named():String{ fun named(): String {
if (value == 1)return "Enter" if (value == 1) return "Enter"
if (value == 2)return "Exit" if (value == 2) return "Exit"
if (value == 4)return "dWell" if (value == 4) return "dWell"
if (value == (ENTER.value or EXIT.value))return "Enter or Exit" if (value == (ENTER.value or EXIT.value)) return "Enter or Exit"
if (value == (DWELL.value or EXIT.value))return "DWell or Exit" if (value == (DWELL.value or EXIT.value)) return "DWell or Exit"
return "unknown" return "unknown"
} }
} }
@ -44,63 +44,65 @@ class HMG_Geofence {
// https://developer.android.com/training/location/geofencing#java // https://developer.android.com/training/location/geofencing#java
private lateinit var context: Context private lateinit var context: Context
private lateinit var preferences:SharedPreferences private lateinit var preferences: SharedPreferences
private val gson = Gson() private val gson = Gson()
private lateinit var geofencingClient:GeofencingClient private lateinit var geofencingClient: GeofencingClient
private val geofencePendingIntent: PendingIntent by lazy { private val geofencePendingIntent: PendingIntent by lazy {
val intent = Intent(context, GeofenceBroadcastReceiver::class.java) val intent = Intent(context, GeofenceBroadcastReceiver::class.java)
PendingIntent.getBroadcast( PendingIntent.getBroadcast(
context, context,
0, 0,
intent, intent,
PendingIntent.FLAG_UPDATE_CURRENT) PendingIntent.FLAG_IMMUTABLE
)
} }
companion object{ companion object {
var instance: HMG_Geofence? = null var instance: HMG_Geofence? = null
fun shared(context: Context) : HMG_Geofence { fun shared(context: Context): HMG_Geofence {
if (instance == null) { if (instance == null) {
instance = HMG_Geofence() instance = HMG_Geofence()
instance?.context = context instance?.context = context
instance?.geofencingClient = LocationServices.getGeofencingClient(context) instance?.geofencingClient = LocationServices.getGeofencingClient(context)
instance?.preferences = context.getSharedPreferences(PREFS_STORAGE, Context.MODE_PRIVATE) instance?.preferences =
context.getSharedPreferences(PREFS_STORAGE, Context.MODE_PRIVATE)
} }
return instance!! return instance!!
} }
} }
fun limitize(zones: List<GeoZoneModel>):List<GeoZoneModel>{ private fun limitize(zones: List<GeoZoneModel>): List<GeoZoneModel> {
var geoZones_ = zones var geoZones_ = zones
if(zones.size > 100) if (zones.size > 100)
geoZones_ = zones.subList(0, 99) geoZones_ = zones.subList(0, 99)
return geoZones_ return geoZones_
} }
fun register(completion:((Boolean, java.lang.Exception?)->Unit)){ fun register(completion: ((Boolean, java.lang.Exception?) -> Unit)) {
unRegisterAll { status, exception -> unRegisterAll { status, exception ->
val geoZones = getGeoZonesFromPreference(context) val geoZones = getGeoZonesFromPreference(context)
doRegister(geoZones){ status_, error -> doRegister(geoZones) { status_, error ->
completion.let { it(status_, error) } completion.let { it(status_, error) }
} }
} }
} }
fun unRegisterAll(completion: (status: Boolean, exception: Exception?) -> Unit){ fun unRegisterAll(completion: (status: Boolean, exception: Exception?) -> Unit) {
getActiveGeofences({ success -> getActiveGeofences({ success ->
removeActiveGeofences() removeActiveGeofences()
if(success.isNotEmpty()) if (success.isNotEmpty())
geofencingClient geofencingClient
.removeGeofences(success) .removeGeofences(success)
.addOnSuccessListener { .addOnSuccessListener {
completion(true, null) completion(true, null)
} }
.addOnFailureListener { .addOnFailureListener {
completion(false, it) completion(false, it)
saveLog(context, "error:REMOVE_GEOFENCES", it.localizedMessage) saveLog(context, "error:REMOVE_GEOFENCES", it.localizedMessage)
} }
else else
completion(true, null) completion(true, null)
@ -109,7 +111,10 @@ class HMG_Geofence {
}) })
} }
private fun doRegister(geoZones: List<GeoZoneModel>, completion:((Boolean, java.lang.Exception?)->Unit)? = null){ private fun doRegister(
geoZones: List<GeoZoneModel>,
completion: ((Boolean, java.lang.Exception?) -> Unit)? = null
) {
if (geoZones.isEmpty()) if (geoZones.isEmpty())
return return
@ -117,9 +122,9 @@ class HMG_Geofence {
fun buildGeofencingRequest(geofences: List<Geofence>): GeofencingRequest { fun buildGeofencingRequest(geofences: List<Geofence>): GeofencingRequest {
return GeofencingRequest.Builder() return GeofencingRequest.Builder()
.setInitialTrigger(GeofencingRequest.INITIAL_TRIGGER_DWELL) .setInitialTrigger(GeofencingRequest.INITIAL_TRIGGER_DWELL)
.addGeofences(geofences) .addGeofences(geofences)
.build() .build()
} }
getActiveGeofences({ active -> getActiveGeofences({ active ->
@ -135,26 +140,41 @@ class HMG_Geofence {
if (checkPermission() && geofences.isNotEmpty()) { if (checkPermission() && geofences.isNotEmpty()) {
geofencingClient geofencingClient
.addGeofences(buildGeofencingRequest(geofences), geofencePendingIntent) .addGeofences(buildGeofencingRequest(geofences), geofencePendingIntent)
.addOnSuccessListener { .addOnSuccessListener {
Logs.RegisterGeofence.save(context,"SUCCESS", "Successfuly registered the geofences", Logs.STATUS.SUCCESS) Logs.RegisterGeofence.save(
saveActiveGeofence(geofences.map { it.requestId }, listOf()) context,
completion?.let { it(true,null) } "SUCCESS",
} "Successfuly registered the geofences",
.addOnFailureListener { exc -> Logs.STATUS.SUCCESS
Logs.RegisterGeofence.save(context,"FAILED_TO_REGISTER", "Failed to register geofence",Logs.STATUS.ERROR) )
completion?.let { it(false,exc) } saveActiveGeofence(geofences.map { it.requestId }, listOf())
} completion?.let { it(true, null) }
}
.addOnFailureListener { exc ->
Logs.RegisterGeofence.save(
context,
"FAILED_TO_REGISTER",
"Failed to register geofence",
Logs.STATUS.ERROR
)
completion?.let { it(false, exc) }
}
// Schedule the job to register after specified duration (due to: events not calling after long period.. days or days [Needs to register fences again]) // Schedule the job to register after specified duration (due to: events not calling after long period.. days or days [Needs to register fences again])
HMGUtils.scheduleJob(context, ReregisterGeofenceJobService::class.java,ReregisterGeofenceJobService.JobID, ReregisterGeofenceJobService.TriggerIntervalDuration) HMGUtils.scheduleJob(
context,
ReregisterGeofenceJobService::class.java,
ReregisterGeofenceJobService.JobID,
ReregisterGeofenceJobService.TriggerIntervalDuration
)
} }
}, null) }, null)
} }
fun getGeoZonesFromPreference(context: Context):List<GeoZoneModel>{ fun getGeoZonesFromPreference(context: Context): List<GeoZoneModel> {
val pref = context.getSharedPreferences(PREFS_STORAGE, Context.MODE_PRIVATE) val pref = context.getSharedPreferences(PREFS_STORAGE, Context.MODE_PRIVATE)
val json = pref.getString(PREF_KEY_HMG_ZONES, "[]") val json = pref.getString(PREF_KEY_HMG_ZONES, "[]")
@ -162,26 +182,29 @@ class HMG_Geofence {
return geoZones return geoZones
} }
fun saveActiveGeofence(success: List<String>, failed: List<String>){ fun saveActiveGeofence(success: List<String>, failed: List<String>) {
val jsonSuccess = gson.toJson(success) val jsonSuccess = gson.toJson(success)
val jsonFailure = gson.toJson(failed) val jsonFailure = gson.toJson(failed)
preferences.edit().putString(PREF_KEY_SUCCESS, jsonSuccess).apply() preferences.edit().putString(PREF_KEY_SUCCESS, jsonSuccess).apply()
preferences.edit().putString(PREF_KEY_FAILED, jsonFailure).apply() preferences.edit().putString(PREF_KEY_FAILED, jsonFailure).apply()
} }
fun removeActiveGeofences(){ fun removeActiveGeofences() {
preferences.edit().putString(PREF_KEY_SUCCESS, "[]").apply() preferences.edit().putString(PREF_KEY_SUCCESS, "[]").apply()
preferences.edit().putString(PREF_KEY_FAILED, "[]").apply() preferences.edit().putString(PREF_KEY_FAILED, "[]").apply()
} }
fun getActiveGeofences(success: (success: List<String>) -> Unit, failure: ((failed: List<String>) -> Unit)?){ fun getActiveGeofences(
val type = object : TypeToken<List<String?>?>() {}.type success: (success: List<String>) -> Unit,
failure: ((failed: List<String>) -> Unit)?
) {
val type = object : TypeToken<List<String?>?>() {}.type
val jsonSuccess = preferences.getString(PREF_KEY_SUCCESS, "[]") val jsonSuccess = preferences.getString(PREF_KEY_SUCCESS, "[]")
val success = gson.fromJson<List<String>>(jsonSuccess, type) val success = gson.fromJson<List<String>>(jsonSuccess, type)
success(success) success(success)
if(failure != null){ if (failure != null) {
val jsonFailure = preferences.getString(PREF_KEY_FAILED, "[]") val jsonFailure = preferences.getString(PREF_KEY_FAILED, "[]")
val failed = gson.fromJson<List<String>>(jsonFailure, type) val failed = gson.fromJson<List<String>>(jsonFailure, type)
failure(failed) failure(failed)
@ -189,47 +212,74 @@ class HMG_Geofence {
} }
private fun checkPermission() : Boolean{ private fun checkPermission(): Boolean {
return ContextCompat.checkSelfPermission(context, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED return ContextCompat.checkSelfPermission(
context,
Manifest.permission.ACCESS_FINE_LOCATION
) == PackageManager.PERMISSION_GRANTED
} }
fun getPatientID():Int?{ fun getPatientID(): Int? {
var profileJson = preferences.getString("flutter.imei-user-data", null) var profileJson = preferences.getString("flutter.imei-user-data", null)
if (profileJson == null) if (profileJson == null)
profileJson = preferences.getString("flutter.user-profile", null) profileJson = preferences.getString("flutter.user-profile", null)
val type = object : TypeToken<Map<String?, Any?>?>() {}.type val type = object : TypeToken<Map<String?, Any?>?>() {}.type
return gson.fromJson<Map<String?, Any?>?>(profileJson, type) return gson.fromJson<Map<String?, Any?>?>(profileJson, type)
?.get("PatientID") ?.get("PatientID")
.toString() .toString()
.toDoubleOrNull() .toDoubleOrNull()
?.toInt() ?.toInt()
} }
fun handleEvent(triggerGeofences: List<Geofence>, location: Location, transition: GeofenceTransition) { fun handleEvent(
triggerGeofences: List<Geofence>,
location: Location,
transition: GeofenceTransition
) {
getPatientID()?.let { patientId -> getPatientID()?.let { patientId ->
getActiveGeofences({ activeGeofences -> getActiveGeofences({ activeGeofences ->
triggerGeofences.forEach { geofence -> triggerGeofences.forEach { geofence ->
// Extract PointID from 'geofence.requestId' and find from active geofences // Extract PointID from 'geofence.requestId' and find from active geofences
val pointID = activeGeofences.firstOrNull { it == geofence.requestId }?.split('_')?.first() val pointID =
activeGeofences.firstOrNull { it == geofence.requestId }?.split('_')
?.first()
if (!pointID.isNullOrEmpty() && pointID.toIntOrNull() != null) { if (!pointID.isNullOrEmpty() && pointID.toIntOrNull() != null) {
val body = mutableMapOf<String, Any?>( val body = mutableMapOf<String, Any?>(
"PointsID" to pointID.toIntOrNull(), "PointsID" to pointID.toIntOrNull(),
"GeoType" to transition.value, "GeoType" to transition.value,
"PatientID" to patientId "PatientID" to patientId
) )
body.putAll(HMGUtils.defaultHTTPParams(context)) body.putAll(HMGUtils.defaultHTTPParams(context))
httpPost<Map<String, Any>>(API.LOG_GEOFENCE, body, { response -> httpPost<Map<String, Any>>(API.LOG_GEOFENCE, body, { response ->
saveLog(context, "HMG_GEOFENCE_NOTIFY", "Success: Notified to server\uD83D\uDE0E.") saveLog(
sendNotification(context, transition.named(), geofence.requestId, "Notified to server.😎") context,
"HMG_GEOFENCE_NOTIFY",
"Success: Notified to server\uD83D\uDE0E."
)
sendNotification(
context,
transition.named(),
geofence.requestId,
"Notified to server.😎"
)
}, { exception -> }, { exception ->
val errorMessage = "${transition.named()}, ${geofence.requestId}" val errorMessage = "${transition.named()}, ${geofence.requestId}"
saveLog(context, "HMG_GEOFENCE_NOTIFY", "failed: $errorMessage | error: ${exception.localizedMessage}") saveLog(
sendNotification(context, transition.named(), geofence.requestId, "Failed to notify server😔 -> ${exception.localizedMessage}") context,
"HMG_GEOFENCE_NOTIFY",
"failed: $errorMessage | error: ${exception.localizedMessage}"
)
sendNotification(
context,
transition.named(),
geofence.requestId,
"Failed to notify server😔 -> ${exception.localizedMessage}"
)
}) })
} }

@ -52,6 +52,7 @@ post_install do |installer|
'PERMISSION_REMINDERS=1', 'PERMISSION_REMINDERS=1',
] ]
build_configuration.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64 i386' build_configuration.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64 i386'
build_configuration.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
if build_configuration.build_settings['WRAPPER_EXTENSION'] == 'bundle' if build_configuration.build_settings['WRAPPER_EXTENSION'] == 'bundle'
build_configuration.build_settings['DEVELOPMENT_TEAM'] = '3A359E86ZF' build_configuration.build_settings['DEVELOPMENT_TEAM'] = '3A359E86ZF'
end end

@ -13,6 +13,7 @@
306FE6C8271D790C002D6EFC /* OpenTokPlatformBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 306FE6C7271D790C002D6EFC /* OpenTokPlatformBridge.swift */; }; 306FE6C8271D790C002D6EFC /* OpenTokPlatformBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 306FE6C7271D790C002D6EFC /* OpenTokPlatformBridge.swift */; };
306FE6CB271D8B73002D6EFC /* OpenTok.swift in Sources */ = {isa = PBXBuildFile; fileRef = 306FE6CA271D8B73002D6EFC /* OpenTok.swift */; }; 306FE6CB271D8B73002D6EFC /* OpenTok.swift in Sources */ = {isa = PBXBuildFile; fileRef = 306FE6CA271D8B73002D6EFC /* OpenTok.swift */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
4EE411B2E3CB5D4F81AE5078 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D1513E0724DAFB89C198BDD /* Pods_Runner.framework */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
762D738E274E42650063CE73 /* ring_30Sec.caf in Resources */ = {isa = PBXBuildFile; fileRef = 762D738C274E42650063CE73 /* ring_30Sec.caf */; }; 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 */; }; 762D738F274E42650063CE73 /* ring_30Sec.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 762D738D274E42650063CE73 /* ring_30Sec.mp3 */; };
@ -22,7 +23,6 @@
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
B40C32A62DF065A3A0414845 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B99ADD0B93AC14DD8D0BAB0 /* Pods_Runner.framework */; };
E91B5396256AAA6500E96549 /* GlobalHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = E91B538D256AAA6500E96549 /* GlobalHelper.swift */; }; E91B5396256AAA6500E96549 /* GlobalHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = E91B538D256AAA6500E96549 /* GlobalHelper.swift */; };
E91B5397256AAA6500E96549 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = E91B538E256AAA6500E96549 /* Extensions.swift */; }; E91B5397256AAA6500E96549 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = E91B538E256AAA6500E96549 /* Extensions.swift */; };
E91B5398256AAA6500E96549 /* API.swift in Sources */ = {isa = PBXBuildFile; fileRef = E91B538F256AAA6500E96549 /* API.swift */; }; E91B5398256AAA6500E96549 /* API.swift in Sources */ = {isa = PBXBuildFile; fileRef = E91B538F256AAA6500E96549 /* API.swift */; };
@ -63,6 +63,8 @@
306FE6C7271D790C002D6EFC /* OpenTokPlatformBridge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenTokPlatformBridge.swift; sourceTree = "<group>"; }; 306FE6C7271D790C002D6EFC /* OpenTokPlatformBridge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenTokPlatformBridge.swift; sourceTree = "<group>"; };
306FE6CA271D8B73002D6EFC /* OpenTok.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenTok.swift; sourceTree = "<group>"; }; 306FE6CA271D8B73002D6EFC /* OpenTok.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenTok.swift; sourceTree = "<group>"; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
3D1513E0724DAFB89C198BDD /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
6EE8819867EC2775AB578377 /* 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 = "<group>"; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
762D738C274E42650063CE73 /* ring_30Sec.caf */ = {isa = PBXFileReference; lastKnownFileType = file; name = ring_30Sec.caf; path = ../../assets/sounds/ring_30Sec.caf; sourceTree = "<group>"; }; 762D738C274E42650063CE73 /* ring_30Sec.caf */ = {isa = PBXFileReference; lastKnownFileType = file; name = ring_30Sec.caf; path = ../../assets/sounds/ring_30Sec.caf; sourceTree = "<group>"; };
@ -70,9 +72,8 @@
76815B26275F381C00E66E94 /* HealthKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = HealthKit.framework; path = System/Library/Frameworks/HealthKit.framework; sourceTree = SDKROOT; }; 76815B26275F381C00E66E94 /* HealthKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = HealthKit.framework; path = System/Library/Frameworks/HealthKit.framework; sourceTree = SDKROOT; };
76962ECD28AE5C10004EAE09 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; }; 76962ECD28AE5C10004EAE09 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
76F2556027F1FFED0062C1CD /* PassKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PassKit.framework; path = System/Library/Frameworks/PassKit.framework; sourceTree = SDKROOT; }; 76F2556027F1FFED0062C1CD /* PassKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PassKit.framework; path = System/Library/Frameworks/PassKit.framework; sourceTree = SDKROOT; };
7805E271E86E72F39E68ADCC /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
8B99ADD0B93AC14DD8D0BAB0 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 838788A2BEDC4910F4B029A6 /* 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 = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
@ -80,7 +81,6 @@
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
BC1BA79F1F6E9D7BE59D2AE4 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
E91B538D256AAA6500E96549 /* GlobalHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GlobalHelper.swift; sourceTree = "<group>"; }; E91B538D256AAA6500E96549 /* GlobalHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GlobalHelper.swift; sourceTree = "<group>"; };
E91B538E256AAA6500E96549 /* Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = "<group>"; }; E91B538E256AAA6500E96549 /* Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = "<group>"; };
E91B538F256AAA6500E96549 /* API.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = API.swift; sourceTree = "<group>"; }; E91B538F256AAA6500E96549 /* API.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = API.swift; sourceTree = "<group>"; };
@ -99,7 +99,7 @@
E9C8C135256BACDA00EFFB62 /* HMG_Guest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMG_Guest.swift; sourceTree = "<group>"; }; E9C8C135256BACDA00EFFB62 /* HMG_Guest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMG_Guest.swift; sourceTree = "<group>"; };
E9E27167256E3A4000F49B69 /* LocalizedFromFlutter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalizedFromFlutter.swift; sourceTree = "<group>"; }; E9E27167256E3A4000F49B69 /* LocalizedFromFlutter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalizedFromFlutter.swift; sourceTree = "<group>"; };
E9F7623A25922BCE00FB5CCF /* FlutterConstants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FlutterConstants.swift; sourceTree = "<group>"; }; E9F7623A25922BCE00FB5CCF /* FlutterConstants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FlutterConstants.swift; sourceTree = "<group>"; };
EBA301C32F4CA9F09D2D7713 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; }; F2C7D3C4718A1DED85DA3AD4 /* 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 = "<group>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
@ -110,7 +110,7 @@
76F2556127F1FFED0062C1CD /* PassKit.framework in Frameworks */, 76F2556127F1FFED0062C1CD /* PassKit.framework in Frameworks */,
76815B27275F381C00E66E94 /* HealthKit.framework in Frameworks */, 76815B27275F381C00E66E94 /* HealthKit.framework in Frameworks */,
E9620805255C2ED100D3A35D /* NetworkExtension.framework in Frameworks */, E9620805255C2ED100D3A35D /* NetworkExtension.framework in Frameworks */,
B40C32A62DF065A3A0414845 /* Pods_Runner.framework in Frameworks */, 4EE411B2E3CB5D4F81AE5078 /* Pods_Runner.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -133,7 +133,7 @@
76F2556027F1FFED0062C1CD /* PassKit.framework */, 76F2556027F1FFED0062C1CD /* PassKit.framework */,
76815B26275F381C00E66E94 /* HealthKit.framework */, 76815B26275F381C00E66E94 /* HealthKit.framework */,
E9620804255C2ED100D3A35D /* NetworkExtension.framework */, E9620804255C2ED100D3A35D /* NetworkExtension.framework */,
8B99ADD0B93AC14DD8D0BAB0 /* Pods_Runner.framework */, 3D1513E0724DAFB89C198BDD /* Pods_Runner.framework */,
); );
name = Frameworks; name = Frameworks;
sourceTree = "<group>"; sourceTree = "<group>";
@ -141,9 +141,9 @@
605039E5DDF72C245F9765FE /* Pods */ = { 605039E5DDF72C245F9765FE /* Pods */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
EBA301C32F4CA9F09D2D7713 /* Pods-Runner.debug.xcconfig */, F2C7D3C4718A1DED85DA3AD4 /* Pods-Runner.debug.xcconfig */,
7805E271E86E72F39E68ADCC /* Pods-Runner.release.xcconfig */, 838788A2BEDC4910F4B029A6 /* Pods-Runner.release.xcconfig */,
BC1BA79F1F6E9D7BE59D2AE4 /* Pods-Runner.profile.xcconfig */, 6EE8819867EC2775AB578377 /* Pods-Runner.profile.xcconfig */,
); );
path = Pods; path = Pods;
sourceTree = "<group>"; sourceTree = "<group>";
@ -246,15 +246,15 @@
isa = PBXNativeTarget; isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = ( buildPhases = (
A37FFD337A0067237A8DACD6 /* [CP] Check Pods Manifest.lock */, 6D0B2FE51DC05E2D0395E861 /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */, 9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */, 97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */, 97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */, 97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */, 9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
E1D6AED972DEFC56AA7DB402 /* [CP] Embed Pods Frameworks */, 487FDD6493EB9AE7D8E39485 /* [CP] Embed Pods Frameworks */,
541D1D49FBD13BE6BA6DA5BC /* [CP] Copy Pods Resources */, 4671D3CD126F6635F4B75A6E /* [CP] Copy Pods Resources */,
); );
buildRules = ( buildRules = (
); );
@ -334,7 +334,7 @@
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin\n"; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin\n";
}; };
541D1D49FBD13BE6BA6DA5BC /* [CP] Copy Pods Resources */ = { 4671D3CD126F6635F4B75A6E /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
@ -351,21 +351,24 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
9740EEB61CF901F6004384FC /* Run Script */ = { 487FDD6493EB9AE7D8E39485 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
); );
inputPaths = ( inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
); );
name = "Run Script"; name = "[CP] Embed Pods Frameworks";
outputPaths = ( outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
}; };
A37FFD337A0067237A8DACD6 /* [CP] Check Pods Manifest.lock */ = { 6D0B2FE51DC05E2D0395E861 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
@ -387,22 +390,19 @@
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 = "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; showEnvVarsInLog = 0;
}; };
E1D6AED972DEFC56AA7DB402 /* [CP] Embed Pods Frameworks */ = { 9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
); );
inputFileListPaths = ( inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
); );
name = "[CP] Embed Pods Frameworks"; name = "Run Script";
outputFileListPaths = ( outputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
showEnvVarsInLog = 0;
}; };
/* End PBXShellScriptBuildPhase section */ /* End PBXShellScriptBuildPhase section */
@ -538,7 +538,7 @@
"$(inherited)", "$(inherited)",
"$(PROJECT_DIR)/Flutter", "$(PROJECT_DIR)/Flutter",
); );
MARKETING_VERSION = 4.5.57; MARKETING_VERSION = 4.5.63;
PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone"; PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
@ -682,7 +682,7 @@
"$(inherited)", "$(inherited)",
"$(PROJECT_DIR)/Flutter", "$(PROJECT_DIR)/Flutter",
); );
MARKETING_VERSION = 4.5.57; MARKETING_VERSION = 4.5.63;
PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone"; PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
@ -720,7 +720,7 @@
"$(inherited)", "$(inherited)",
"$(PROJECT_DIR)/Flutter", "$(PROJECT_DIR)/Flutter",
); );
MARKETING_VERSION = 4.5.57; MARKETING_VERSION = 4.5.63;
PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone"; PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";

@ -20,9 +20,10 @@ var PACKAGES_ORDERS = '/api/orders';
var PACKAGES_ORDER_HISTORY = '/api/orders/items'; var PACKAGES_ORDER_HISTORY = '/api/orders/items';
var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
// var BASE_URL = 'http://10.50.100.198:3334/'; // var BASE_URL = 'http://10.50.100.198:3334/';
var BASE_URL = 'https://uat.hmgwebservices.com/'; // var BASE_URL = 'https://uat.hmgwebservices.com/';
// var BASE_URL = 'https://hmgwebservices.com/'; var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'https://orash.cloudsolutions.com.sa/'; // var BASE_URL = 'https://orash.cloudsolutions.com.sa/';
// var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/';
// Pharmacy UAT URLs // Pharmacy UAT URLs
// var BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; // var BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
@ -37,7 +38,7 @@ var PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/';
// var PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapitest/api/'; // var PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapitest/api/';
// RC API URL // RC API URL
var RC_BASE_URL = 'https://rc.hmg.com/mobile/'; var RC_BASE_URL = 'https://rc.hmg.com/';
var PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity'; var PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity';
@ -322,7 +323,7 @@ var UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnari
var CHANNEL = 3; var CHANNEL = 3;
var GENERAL_ID = 'Cs2020@2016\$2958'; var GENERAL_ID = 'Cs2020@2016\$2958';
var IP_ADDRESS = '10.20.10.20'; var IP_ADDRESS = '10.20.10.20';
var VERSION_ID = 10.3; var VERSION_ID = 10.5;
var SETUP_ID = '91877'; var SETUP_ID = '91877';
var LANGUAGE = 2; var LANGUAGE = 2;
// var PATIENT_OUT_SA = 0; // var PATIENT_OUT_SA = 0;
@ -590,6 +591,8 @@ var CANCEL_PHARMA_LIVECARE_REQUEST = 'https://vcallapi.hmg.com/api/PharmaLiveCar
var INSERT_FREE_SLOTS_LOGS = 'Services/Doctors.svc/Rest/InsertDoctorFreeSlotsLogs'; var INSERT_FREE_SLOTS_LOGS = 'Services/Doctors.svc/Rest/InsertDoctorFreeSlotsLogs';
var GET_NATIONALITY ='Services/Lists.svc/REST/GetNationality';
// Check If InPatient API // Check If InPatient API
var CHECK_IF_INPATIENT = 'Services/Patients.svc/REST/GetInPatientAdmissionInfo'; var CHECK_IF_INPATIENT = 'Services/Patients.svc/REST/GetInPatientAdmissionInfo';

@ -208,7 +208,7 @@ const Map localizedValues = {
"last-name": {"en": "Last Name", "ar": "إسم العائلة"}, "last-name": {"en": "Last Name", "ar": "إسم العائلة"},
"female": {"en": "Female", "ar": "أنثى"}, "female": {"en": "Female", "ar": "أنثى"},
"male": {"en": "Male", "ar": "ذكر"}, "male": {"en": "Male", "ar": "ذكر"},
"preferred-language": {"en": "Preferred Language", "ar": "اللغة المفضلة"}, "preferred-language": {"en": "Preferred Language *", "ar": "اللغة المفضلة *"},
"english": {"en": "English", "ar": "الإنجليزية"}, "english": {"en": "English", "ar": "الإنجليزية"},
"arabic": {"en": "Arabic", "ar": "العربية"}, "arabic": {"en": "Arabic", "ar": "العربية"},
"locations-register": {"en": "Where do you want to create this file?", "ar": "أين تريد فتح هذا الملف؟"}, "locations-register": {"en": "Where do you want to create this file?", "ar": "أين تريد فتح هذا الملف؟"},
@ -682,7 +682,7 @@ const Map localizedValues = {
"ar": "ar":
"توفر هذه الخدمة مجموعه من خدمات الرعايه الصحيه المنزلية و متابعه مستمره وشامله للذين لا يستطيعون الوصول للمنشات الصحيه في اماكن اقامتهم (التحاليل المخبرية الاشعة التطعيمات العلاج الطبيعي) ..." "توفر هذه الخدمة مجموعه من خدمات الرعايه الصحيه المنزلية و متابعه مستمره وشامله للذين لا يستطيعون الوصول للمنشات الصحيه في اماكن اقامتهم (التحاليل المخبرية الاشعة التطعيمات العلاج الطبيعي) ..."
}, },
"email": {"en": "Email", "ar": "البريد الالكتروني"}, "email": {"en": "Email *", "ar": "البريد الالكتروني *"},
"Book": {"en": "Book", "ar": "حجز"}, "Book": {"en": "Book", "ar": "حجز"},
"AppointmentLabel": {"en": "Appointment", "ar": "موعد"}, "AppointmentLabel": {"en": "Appointment", "ar": "موعد"},
"BloodType": {"en": "Blood Type", "ar": "فصيلة الدم"}, "BloodType": {"en": "Blood Type", "ar": "فصيلة الدم"},
@ -1324,7 +1324,7 @@ const Map localizedValues = {
"notif-permission-title": {"en": "Could not set the water reminders", "ar": "لا يمكن ضبط اشعار شرب الماء"}, "notif-permission-title": {"en": "Could not set the water reminders", "ar": "لا يمكن ضبط اشعار شرب الماء"},
"notif-permission-msg": {"en": "To recieve water reminders, please turn on notifications in the system settings", "ar": "الرجاء تفعيل الاشعارات في الاعدادات"}, "notif-permission-msg": {"en": "To recieve water reminders, please turn on notifications in the system settings", "ar": "الرجاء تفعيل الاشعارات في الاعدادات"},
"verification_message_code": {"en": "Please enter verification code", "ar": "الرجاء إدخال رمز التحقق"}, "verification_message_code": {"en": "Please enter verification code", "ar": "الرجاء إدخال رمز التحقق"},
"select-location": {"en": "Select Location", "ar": "اختر الموقع"}, "select-location": {"en": "Select Location *", "ar": "اختر الموقع *"},
"result-header": {"en": "Get the result in Few Hours", "ar": "احصل على النتيجة خلال عدة ساعات"}, "result-header": {"en": "Get the result in Few Hours", "ar": "احصل على النتيجة خلال عدة ساعات"},
"please_select_gender": {"en": "Please select gender", "ar": "يرجى تحديد الجنس"}, "please_select_gender": {"en": "Please select gender", "ar": "يرجى تحديد الجنس"},
"covid-info": { "covid-info": {
@ -1865,7 +1865,7 @@ const Map localizedValues = {
"NFCNotSupported": { "en": "Your device does not support NFC. Please visit reception to Check-In", "ar": "جهازك لا يدعم NFC. يرجى زيارة مكتب الاستقبال لتسجيل الوصول" }, "NFCNotSupported": { "en": "Your device does not support NFC. Please visit reception to Check-In", "ar": "جهازك لا يدعم NFC. يرجى زيارة مكتب الاستقبال لتسجيل الوصول" },
"enter-workplace-name": {"en": "Please enter your workplace name:", "ar": "رجاء إدخال مكان العمل:"}, "enter-workplace-name": {"en": "Please enter your workplace name:", "ar": "رجاء إدخال مكان العمل:"},
"workplaceName": {"en": "Workplace name:", "ar": "مكان العمل:"}, "workplaceName": {"en": "Workplace name:", "ar": "مكان العمل:"},
"callLiveCareSupport": {"en": "Call LiveCare Support", "ar": "اتصل بدعم لايف كير"}, "callLiveCareSupport": {"en": "Call LiveCare Support", "ar": "اتصل بدعم اللايف كير"},
"needApproval": {"en": "Your sick leave is under process in medical administration, you will be notified once approved.", "ar": "جازتك المرضية تحت الإجراء في الإدارة الطبية ، سوف يتم إشعارك فور الموافقه عليها."}, "needApproval": {"en": "Your sick leave is under process in medical administration, you will be notified once approved.", "ar": "جازتك المرضية تحت الإجراء في الإدارة الطبية ، سوف يتم إشعارك فور الموافقه عليها."},
"pendingActivation": {"en": "Pending Activation", "ar": "في انتظار التنشيط"}, "pendingActivation": {"en": "Pending Activation", "ar": "في انتظار التنشيط"},
"awaitingApproval": {"en": "Awaiting Approval", "ar": "انتظر القبول"}, "awaitingApproval": {"en": "Awaiting Approval", "ar": "انتظر القبول"},

@ -42,3 +42,4 @@ const APPOINTMENT_HISTORY_MEDICAL = 'APPOINTMENT_HISTORY_MEDICAL';
const CLINICS_LIST = 'CLINICS_LIST'; const CLINICS_LIST = 'CLINICS_LIST';
const COVID_QA_LIST = 'COVID_QA_LIST'; const COVID_QA_LIST = 'COVID_QA_LIST';
const IS_COVID_CONSENT_SHOWN = 'IS_COVID_CONSENT_SHOWN'; const IS_COVID_CONSENT_SHOWN = 'IS_COVID_CONSENT_SHOWN';
const REGISTER_INFO_DUBAI ='register-info-dubai';

@ -158,11 +158,11 @@ class BaseAppClient {
body.removeWhere((key, value) => key == null || value == null); body.removeWhere((key, value) => key == null || value == null);
if (AppGlobal.isNetworkDebugEnabled) { // if (AppGlobal.isNetworkDebugEnabled) {
print("URL : $url"); print("URL : $url");
final jsonBody = json.encode(body); final jsonBody = json.encode(body);
print(jsonBody); print(jsonBody);
} // }
if (await Utils.checkConnection(bypassConnectionCheck: bypassConnectionCheck)) { if (await Utils.checkConnection(bypassConnectionCheck: bypassConnectionCheck)) {
final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers); final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers);

@ -32,6 +32,8 @@ class GeofencingServices extends BaseService {
AppSharedPreferences pref = AppSharedPreferences(); AppSharedPreferences pref = AppSharedPreferences();
await pref.setString(HMG_GEOFENCES, _zonesJsonString); await pref.setString(HMG_GEOFENCES, _zonesJsonString);
var res = await sharedPref.getStringWithDefaultValue(HMG_GEOFENCES, "[]");
print("-------GEO ZONES----------: $res");
return geoZones; return geoZones;
} }

@ -115,12 +115,12 @@ class LabsService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
Future updateWorkplaceName(String workplaceName, int requestNumber, String setupID, int projectID) async { Future updateWorkplaceName(String workplaceName, String workplaceNameAR, int requestNumber, String setupID, int projectID) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['Placeofwork'] = workplaceName; body['Placeofwork'] = workplaceName;
body['Placeofworkar'] = workplaceName; body['Placeofworkar'] = workplaceNameAR;
body['Req_ID'] = requestNumber; body['Req_ID'] = requestNumber;
body['TargetSetupID'] = setupID; body['TargetSetupID'] = setupID;
body['ProjectID'] = projectID; body['ProjectID'] = projectID;

@ -8,6 +8,7 @@ import 'package:diplomaticquarterapp/core/model/privilege/PrivilegeModel.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/laser_body_parts.dart'; import 'package:diplomaticquarterapp/models/Appointments/laser_body_parts.dart';
import 'package:diplomaticquarterapp/models/Authentication/register_info_response.dart';
import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart'; import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -40,9 +41,10 @@ class ProjectViewModel extends BaseViewModel {
double _latitude; double _latitude;
double _longitude; double _longitude;
RegisterInfoResponse _registerInfo =RegisterInfoResponse();
double get latitude => _latitude; double get latitude => _latitude;
double get longitude => _longitude; double get longitude => _longitude;
RegisterInfoResponse get registerInfo=> _registerInfo;
dynamic get searchValue => searchvalue; dynamic get searchValue => searchvalue;
Locale get appLocal => _appLocale; Locale get appLocal => _appLocale;
@ -176,4 +178,8 @@ class ProjectViewModel extends BaseViewModel {
searchvalue = data; searchvalue = data;
notifyListeners(); notifyListeners();
} }
setRegisterData(RegisterInfoResponse data){
_registerInfo =data;
notifyListeners();
}
} }

@ -15,7 +15,9 @@ class CheckPatientAuthenticationReq {
Null sessionID; Null sessionID;
bool isDentalAllowedBackend; bool isDentalAllowedBackend;
int deviceTypeID; int deviceTypeID;
String dob;
int isHijri;
String healthId;
CheckPatientAuthenticationReq( CheckPatientAuthenticationReq(
{this.patientMobileNumber, {this.patientMobileNumber,
this.zipCode, this.zipCode,
@ -32,7 +34,11 @@ class CheckPatientAuthenticationReq {
this.patientOutSA, this.patientOutSA,
this.sessionID, this.sessionID,
this.isDentalAllowedBackend, this.isDentalAllowedBackend,
this.deviceTypeID}); this.deviceTypeID,
this.dob,
this.isHijri,
this.healthId
});
CheckPatientAuthenticationReq.fromJson(Map<String, dynamic> json) { CheckPatientAuthenticationReq.fromJson(Map<String, dynamic> json) {
patientMobileNumber = json['PatientMobileNumber']; patientMobileNumber = json['PatientMobileNumber'];
@ -51,6 +57,9 @@ class CheckPatientAuthenticationReq {
sessionID = json['SessionID']; sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend']; isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID']; deviceTypeID = json['DeviceTypeID'];
dob = json['dob'];
isHijri = json['isHijri'];
healthId = json['HealthId'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -71,6 +80,9 @@ class CheckPatientAuthenticationReq {
data['SessionID'] = this.sessionID; data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend; data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID; data['DeviceTypeID'] = this.deviceTypeID;
data['dob'] =this.dob;
data['isHijri'] = this.isHijri;
data['HealthId'] = healthId;
return data; return data;
} }
} }

@ -0,0 +1,21 @@
class CountriesLists {
String iD;
String name;
dynamic nameN;
CountriesLists({this.iD, this.name, this.nameN});
CountriesLists.fromJson(Map<String, dynamic> json) {
iD = json['ID'];
name = json['Name'];
nameN = json['NameN'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ID'] = this.iD;
data['Name'] = this.name;
data['NameN'] = this.nameN;
return data;
}
}

@ -65,29 +65,53 @@ class _AllHabibMedicalSevicePage2State extends State<AllHabibMedicalSevicePage2>
initialiseHmgServices(bool isLogin) { initialiseHmgServices(bool isLogin) {
hmgServices.clear(); 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(0, TranslationBase.of(context).book, TranslationBase.of(context).appointmentLabel, "assets/images/new/book appointment.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(1, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.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(2, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin));
hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin)); hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin));
hmgServices.add(new HmgServices(4, TranslationBase.of(context).cmcTitle, TranslationBase.of(context).cmcSubtitle, "assets/images/new/comprehensive_checkup.svg", isLogin)); hmgServices.add(new HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin));
hmgServices.add(new HmgServices(5, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin)); hmgServices.add(new HmgServices(5, TranslationBase.of(context).pharmacyTitle, TranslationBase.of(context).pharmacySubtitle, "assets/images/new/Pharmacy.svg", isLogin));
hmgServices.add(new HmgServices(6, TranslationBase.of(context).ereferralTitle, TranslationBase.of(context).ereferralSubtitle, "assets/images/new/E_Referral.svg", isLogin));
hmgServices.add(new HmgServices(7, TranslationBase.of(context).waterTitle, TranslationBase.of(context).waterSubtitle, "assets/images/new/h2o.svg", isLogin)); hmgServices.add(new HmgServices(6, TranslationBase.of(context).medicalFileTitle2, TranslationBase.of(context).medicalFileSubtitle, "assets/images/new/medical file.svg", isLogin));
hmgServices.add(new HmgServices(8, TranslationBase.of(context).connectTitle, TranslationBase.of(context).connectSubtitle, "assets/images/new/reach_us.svg", isLogin)); hmgServices.add(new HmgServices(7, TranslationBase.of(context).familyTitle, TranslationBase.of(context).familySubtitle, "assets/images/new/my family.svg", isLogin));
hmgServices.add(new HmgServices(9, TranslationBase.of(context).medicalFileTitle2, TranslationBase.of(context).medicalFileSubtitle, "assets/images/new/medical file.svg", isLogin)); hmgServices.add(new HmgServices(8, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", isLogin));
hmgServices.add(new HmgServices(10, TranslationBase.of(context).book, TranslationBase.of(context).appointmentLabel, "assets/images/new/book appointment.svg", isLogin)); hmgServices.add(new HmgServices(9, TranslationBase.of(context).My_Child, TranslationBase.of(context).Vaccines, "assets/images/new/child vaccines.svg", isLogin));
hmgServices.add(new HmgServices(11, TranslationBase.of(context).pharmacyTitle, TranslationBase.of(context).pharmacySubtitle, "assets/images/new/Pharmacy.svg", isLogin)); hmgServices.add(new HmgServices(10, TranslationBase.of(context).updateInsurance, TranslationBase.of(context).updateInsuranceSubtitle, "assets/images/new/update insurance card.svg", isLogin));
hmgServices.add(new HmgServices(12, TranslationBase.of(context).updateInsurance, TranslationBase.of(context).updateInsuranceSubtitle, "assets/images/new/update insurance card.svg", isLogin)); hmgServices.add(new HmgServices(11, TranslationBase.of(context).ereferralTitle, TranslationBase.of(context).ereferralSubtitle, "assets/images/new/E_Referral.svg", isLogin));
hmgServices.add(new HmgServices(13, TranslationBase.of(context).familyTitle, TranslationBase.of(context).familySubtitle, "assets/images/new/my family.svg", isLogin)); hmgServices.add(new HmgServices(12, TranslationBase.of(context).waterTitle, TranslationBase.of(context).waterSubtitle, "assets/images/new/h2o.svg", isLogin));
hmgServices.add(new HmgServices(14, TranslationBase.of(context).My_Child, TranslationBase.of(context).Vaccines, "assets/images/new/child vaccines.svg", isLogin)); hmgServices.add(new HmgServices(13, TranslationBase.of(context).healthCalculatorTitle, TranslationBase.of(context).healthCalculatorSubtitle, "assets/images/new/health calculator.svg", isLogin));
hmgServices.add(new HmgServices(14, TranslationBase.of(context).healthConvertersTitle, TranslationBase.of(context).healthConvertersSubtitle, "assets/images/new/health converter.svg", isLogin));
hmgServices.add(new HmgServices(15, TranslationBase.of(context).Todo, TranslationBase.of(context).list, "assets/images/new/todo.svg", isLogin)); hmgServices.add(new HmgServices(15, TranslationBase.of(context).Todo, TranslationBase.of(context).list, "assets/images/new/todo.svg", isLogin));
hmgServices.add(new HmgServices(16, TranslationBase.of(context).Blood, TranslationBase.of(context).Donation, "assets/images/new/blood donation.svg", isLogin)); hmgServices.add(new HmgServices(16, TranslationBase.of(context).Blood, TranslationBase.of(context).Donation, "assets/images/new/blood donation.svg", isLogin));
hmgServices.add(new HmgServices(17, TranslationBase.of(context).healthCalculatorTitle, TranslationBase.of(context).healthCalculatorSubtitle, "assets/images/new/health calculator.svg", isLogin));
hmgServices.add(new HmgServices(18, TranslationBase.of(context).healthConvertersTitle, TranslationBase.of(context).healthConvertersSubtitle, "assets/images/new/health converter.svg", isLogin)); hmgServices.add(new HmgServices(17, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/CoronaIcon.svg", isLogin));
hmgServices.add(new HmgServices(18, TranslationBase.of(context).Virtual, TranslationBase.of(context).Tour, "assets/images/new/virtual tour.svg", isLogin));
hmgServices.add(new HmgServices(19, TranslationBase.of(context).smartWatches.split(" ")[0], TranslationBase.of(context).smartWatches.split(" ")[1], "assets/images/new/smart watch.svg", isLogin)); hmgServices.add(new HmgServices(19, TranslationBase.of(context).smartWatches.split(" ")[0], TranslationBase.of(context).smartWatches.split(" ")[1], "assets/images/new/smart watch.svg", isLogin));
hmgServices.add(new HmgServices(20, TranslationBase.of(context).parkingTitle2, TranslationBase.of(context).parkingSubtitle, "assets/images/new/parking details.svg", isLogin)); hmgServices.add(new HmgServices(20, TranslationBase.of(context).parkingTitle2, TranslationBase.of(context).parkingSubtitle, "assets/images/new/parking details.svg", isLogin));
hmgServices.add(new HmgServices(21, TranslationBase.of(context).Virtual, TranslationBase.of(context).Tour, "assets/images/new/virtual tour.svg", isLogin)); hmgServices.add(new HmgServices(21, TranslationBase.of(context).latestNews.split(" ")[0], TranslationBase.of(context).latestNews.split(" ")[1], "assets/images/new/latest news.svg", isLogin));
hmgServices.add(new HmgServices(22, TranslationBase.of(context).latestNews.split(" ")[0], TranslationBase.of(context).latestNews.split(" ")[1], "assets/images/new/latest news.svg", isLogin));
hmgServices.add(new HmgServices(22, TranslationBase.of(context).connectTitle, TranslationBase.of(context).connectSubtitle, "assets/images/new/reach_us.svg", isLogin));
// hmgServices.add(new HmgServices(5, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin));
// hmgServices.add(new HmgServices(6, TranslationBase.of(context).ereferralTitle, TranslationBase.of(context).ereferralSubtitle, "assets/images/new/E_Referral.svg", isLogin));
// hmgServices.add(new HmgServices(7, TranslationBase.of(context).waterTitle, TranslationBase.of(context).waterSubtitle, "assets/images/new/h2o.svg", isLogin));
// hmgServices.add(new HmgServices(8, TranslationBase.of(context).connectTitle, TranslationBase.of(context).connectSubtitle, "assets/images/new/reach_us.svg", isLogin));
// hmgServices.add(new HmgServices(9, TranslationBase.of(context).medicalFileTitle2, TranslationBase.of(context).medicalFileSubtitle, "assets/images/new/medical file.svg", isLogin));
// hmgServices.add(new HmgServices(10, TranslationBase.of(context).book, TranslationBase.of(context).appointmentLabel, "assets/images/new/book appointment.svg", isLogin));
// hmgServices.add(new HmgServices(11, TranslationBase.of(context).pharmacyTitle, TranslationBase.of(context).pharmacySubtitle, "assets/images/new/Pharmacy.svg", isLogin));
// hmgServices.add(new HmgServices(12, TranslationBase.of(context).updateInsurance, TranslationBase.of(context).updateInsuranceSubtitle, "assets/images/new/update insurance card.svg", isLogin));
// hmgServices.add(new HmgServices(13, TranslationBase.of(context).familyTitle, TranslationBase.of(context).familySubtitle, "assets/images/new/my family.svg", isLogin));
// hmgServices.add(new HmgServices(14, TranslationBase.of(context).My_Child, TranslationBase.of(context).Vaccines, "assets/images/new/child vaccines.svg", isLogin));
// hmgServices.add(new HmgServices(15, TranslationBase.of(context).Todo, TranslationBase.of(context).list, "assets/images/new/todo.svg", isLogin));
// hmgServices.add(new HmgServices(16, TranslationBase.of(context).Blood, TranslationBase.of(context).Donation, "assets/images/new/blood donation.svg", isLogin));
// hmgServices.add(new HmgServices(17, TranslationBase.of(context).healthCalculatorTitle, TranslationBase.of(context).healthCalculatorSubtitle, "assets/images/new/health calculator.svg", isLogin));
// hmgServices.add(new HmgServices(18, TranslationBase.of(context).healthConvertersTitle, TranslationBase.of(context).healthConvertersSubtitle, "assets/images/new/health converter.svg", isLogin));
// hmgServices.add(new HmgServices(19, TranslationBase.of(context).smartWatches.split(" ")[0], TranslationBase.of(context).smartWatches.split(" ")[1], "assets/images/new/smart watch.svg", isLogin));
// hmgServices.add(new HmgServices(20, TranslationBase.of(context).parkingTitle2, TranslationBase.of(context).parkingSubtitle, "assets/images/new/parking details.svg", isLogin));
// hmgServices.add(new HmgServices(21, TranslationBase.of(context).Virtual, TranslationBase.of(context).Tour, "assets/images/new/virtual tour.svg", isLogin));
// hmgServices.add(new HmgServices(22, TranslationBase.of(context).latestNews.split(" ")[0], TranslationBase.of(context).latestNews.split(" ")[1], "assets/images/new/latest news.svg", isLogin));
} }
@override @override
@ -211,7 +235,7 @@ class _AllHabibMedicalSevicePage2State extends State<AllHabibMedicalSevicePage2>
itemCount: hmgServices.length, itemCount: hmgServices.length,
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return ServicesView(hmgServices[index], index); return ServicesView(hmgServices[index], index, false);
}, },
), ),
), ),

@ -350,7 +350,7 @@ class _H2oSettingState extends State<H2oSetting> {
TextField( TextField(
enabled: isEnable, enabled: isEnable,
scrollPadding: EdgeInsets.zero, scrollPadding: EdgeInsets.zero,
keyboardType: TextInputType.number, keyboardType: TextInputType.text,
controller: _controller, controller: _controller,
onChanged: (value) => { onChanged: (value) => {
// validateForm() // validateForm()

@ -52,6 +52,7 @@ class _SearchResultsState extends State<SearchResults> {
? widget.patientDoctorAppointmentListHospital[index].filterName + " - " + widget.patientDoctorAppointmentListHospital[index].distanceInKMs + " " + TranslationBase.of(context).km ? widget.patientDoctorAppointmentListHospital[index].filterName + " - " + widget.patientDoctorAppointmentListHospital[index].distanceInKMs + " " + TranslationBase.of(context).km
: widget.patientDoctorAppointmentListHospital[index].filterName, : widget.patientDoctorAppointmentListHospital[index].filterName,
isTitleSingleLine: false, isTitleSingleLine: false,
isExpand: widget.patientDoctorAppointmentListHospital.length == 1 ? true : false,
bodyWidget: ListView.separated( bodyWidget: ListView.separated(
shrinkWrap: true, shrinkWrap: true,
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),

@ -447,9 +447,9 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
} }
refreshFamily(context) { refreshFamily(context) {
GifLoaderDialogUtils.hideDialog(context);
setState(() { setState(() {
sharedPref.remove(FAMILY_FILE); sharedPref.remove(FAMILY_FILE);
checkUserData();
}); });
} }

@ -51,14 +51,15 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
initialiseHmgServices(bool isLogin) { initialiseHmgServices(bool isLogin) {
hmgServices.clear(); hmgServices.clear();
hmgServices.add(new HmgServices(0, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin));
hmgServices.add(new HmgServices(1, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/CoronaIcon.svg", isLogin)); hmgServices.add(new HmgServices(0, TranslationBase.of(context).book, TranslationBase.of(context).appointmentLabel, "assets/images/new/book appointment.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(1, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin));
hmgServices.add(new HmgServices(2, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin));
hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin)); hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin));
hmgServices.add(new HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin)); hmgServices.add(new HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin));
hmgServices.add(new HmgServices(5, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin)); hmgServices.add(new HmgServices(5, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", isLogin));
hmgServices.add(new HmgServices(6, TranslationBase.of(context).ereferralTitle, TranslationBase.of(context).ereferralSubtitle, "assets/images/new/E_Referral.svg", isLogin)); hmgServices.add(new HmgServices(6, TranslationBase.of(context).ereferralTitle, TranslationBase.of(context).ereferralSubtitle, "assets/images/new/E_Referral.svg", isLogin));
hmgServices.add(new HmgServices(7, "H\u2082O", TranslationBase.of(context).dailyWater, "assets/images/new/h2o.svg", isLogin)); hmgServices.add(new HmgServices(7, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/CoronaIcon.svg", isLogin));
hmgServices.add(new HmgServices(8, TranslationBase.of(context).connectTitle, TranslationBase.of(context).connectSubtitle, "assets/images/new/reach_us.svg", isLogin)); hmgServices.add(new HmgServices(8, TranslationBase.of(context).connectTitle, TranslationBase.of(context).connectSubtitle, "assets/images/new/reach_us.svg", isLogin));
} }
@ -289,15 +290,16 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
margin: projectViewModel.isArabic ? EdgeInsets.only(left: 12.0) : EdgeInsets.only(right: 12.0), margin: projectViewModel.isArabic ? EdgeInsets.only(left: 12.0) : EdgeInsets.only(right: 12.0),
child: AspectRatio( child: AspectRatio(
aspectRatio: 2.15, aspectRatio: 2.15,
child: child: ServicesView(
ServicesView(new HmgServices(2, TranslationBase.of(context).InPatient, TranslationBase.of(context).inPatientServices, "assets/images/new/hospital.png", false), 23)), new HmgServices(2, TranslationBase.of(context).InPatient, TranslationBase.of(context).inPatientServices, "assets/images/new/hospital.png", false), 23, true)),
), ),
), ),
Expanded( Expanded(
flex: 4, flex: 4,
child: AspectRatio( child: AspectRatio(
aspectRatio: 1.0, aspectRatio: 1.0,
child: ServicesView(new HmgServices(2, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", false), 2)), child: ServicesView(
new HmgServices(2, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", false), 2, true)),
), ),
], ],
), ),
@ -315,7 +317,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
itemCount: hmgServices.length, itemCount: hmgServices.length,
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return ServicesView(hmgServices[index], index); return ServicesView(hmgServices[index], index, true);
}, },
), ),
), ),
@ -334,7 +336,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
itemCount: hmgServices.length, itemCount: hmgServices.length,
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return ServicesView(hmgServices[index], index); return ServicesView(hmgServices[index], index, true);
}, },
), ),
), ),

@ -21,8 +21,8 @@ import 'package:diplomaticquarterapp/pages/ContactUs/contact_us_page.dart';
import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-drivethru-location.dart'; import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-drivethru-location.dart';
import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart'; import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart';
import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart'; import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart';
import 'package:diplomaticquarterapp/pages/InPatientServices/inpatient_home.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page_new.dart'; import 'package:diplomaticquarterapp/pages/medical/medical_profile_page_new.dart';
import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/smart_watch_instructions.dart'; import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/smart_watch_instructions.dart';
@ -40,7 +40,6 @@ import 'package:flutter_svg/flutter_svg.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
import '../../../locator.dart'; import '../../../locator.dart';
import '../landing_page.dart';
import '../landing_page_pharmcy.dart'; import '../landing_page_pharmcy.dart';
class ServicesView extends StatelessWidget { class ServicesView extends StatelessWidget {
@ -50,136 +49,18 @@ class ServicesView extends StatelessWidget {
AuthProvider authProvider = new AuthProvider(); AuthProvider authProvider = new AuthProvider();
PharmacyModuleViewModel pharmacyModuleViewModel = locator<PharmacyModuleViewModel>(); PharmacyModuleViewModel pharmacyModuleViewModel = locator<PharmacyModuleViewModel>();
LocationUtils locationUtils; LocationUtils locationUtils;
bool isHomePage;
ServicesView(this.hmgServices, this.index); ServicesView(this.hmgServices, this.index, this.isHomePage);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return InkWell( return InkWell(
onTap: () { onTap: () {
if (index == 0) { if (isHomePage) {
openLiveCare(context); handleHomePageServices(hmgServices, context);
} else if (index == 1) { } else {
showCovidDialog(context); handleAllServices(hmgServices, context);
locator<GAnalytics>().hmgServices.logServiceName('covid-test drive-thru');
} else if (index == 2) {
Navigator.push(context, FadePage(page: PaymentService()));
locator<GAnalytics>().hmgServices.logServiceName('online payments');
} else if (index == 3) {
Navigator.push(context, FadePage(page: HomeHealthCarePage()));
locator<GAnalytics>().hmgServices.logServiceName('home health care');
} else if (index == 4) {
Navigator.push(context, FadePage(page: CMCPage()));
locator<GAnalytics>().hmgServices.logServiceName('comprehensive medical checkup');
} else if (index == 5) {
Navigator.push(context, FadePage(page: ErOptions(isAppbar: true)));
locator<GAnalytics>().hmgServices.logServiceName('emergency service');
} else if (index == 6) {
Navigator.push(context, FadePage(page: EReferralPage()));
locator<GAnalytics>().hmgServices.logServiceName('e-referral service');
} else if (index == 7) {
Navigator.push(context, FadePage(page: H2OPage()));
locator<GAnalytics>().hmgServices.logServiceName('water consumption');
} else if (index == 8) {
Navigator.push(context, FadePage(page: ContactUsPage()));
locator<GAnalytics>().hmgServices.logServiceName('find us reach us');
} else if (index == 9) {
Navigator.push(
context,
FadePage(
page: MedicalProfilePageNew(),
),
);
locator<GAnalytics>().hmgServices.logServiceName('my medical details');
} else if (index == 10) {
Navigator.push(
context,
FadePage(
page: Search(),
),
);
locator<GAnalytics>().hmgServices.logServiceName('book appointment');
} else if (index == 11) {
getPharmacyToken(context);
locator<GAnalytics>().hmgServices.logServiceName('al habib pharmacy');
} else if (index == 12) {
Navigator.push(
context,
FadePage(
page: InsuranceUpdate(),
),
);
locator<GAnalytics>().hmgServices.logServiceName('update insurance');
} else if (index == 13) {
Navigator.push(
context,
FadePage(
page: MyFamily(),
),
);
locator<GAnalytics>().hmgServices.logServiceName('my family files');
} else if (index == 14) {
Navigator.push(
context,
FadePage(page: ChildInitialPage()),
);
locator<GAnalytics>().hmgServices.logServiceName('my child vaccines');
} else if (index == 15) {
// Navigator.pop(context);
LandingPage.shared.switchToDoFromHMGServices();
locator<GAnalytics>().hmgServices.logServiceName('todo list');
} else if (index == 16) {
Navigator.push(
context,
FadePage(page: BloodDonationPage()),
);
locator<GAnalytics>().hmgServices.logServiceName('blood donation');
} else if (index == 17) {
Navigator.push(
context,
FadePage(
page: (HealthCalculators()),
),
);
locator<GAnalytics>().hmgServices.logServiceName('health calculator');
} else if (index == 18) {
Navigator.push(
context,
FadePage(
page: HealthConverter(),
),
);
locator<GAnalytics>().hmgServices.logServiceName('heath converters');
} else if (index == 19) {
Navigator.push(
context,
FadePage(page: SmartWatchInstructions()),
);
locator<GAnalytics>().hmgServices.logServiceName('smart watches');
} else if (index == 20) {
locator<GAnalytics>().hmgServices.logServiceName('car parcking service');
Navigator.push(
context,
FadePage(
page: ParkingPage(),
),
);
} else if (index == 21) {
launch("https://hmgwebservices.com/vt_mobile/html/index.html");
locator<GAnalytics>().hmgServices.logServiceName('virtual tour');
} else if (index == 22) {
Navigator.of(context).push(
MaterialPageRoute(
builder: (BuildContext context) => MyWebView(
title: "HMG News",
selectedUrl: "https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live",
),
),
);
locator<GAnalytics>().hmgServices.logServiceName('latest news');
} else if (index == 23) {
Navigator.push(context, FadePage(page: InPatientServicesHome()));
locator<GAnalytics>().hmgServices.logServiceName('InPatient Services');
} }
}, },
child: Container( child: Container(
@ -206,7 +87,7 @@ class ServicesView extends StatelessWidget {
padding: const EdgeInsets.all(12.0), padding: const EdgeInsets.all(12.0),
child: Opacity( child: Opacity(
opacity: 0.04, opacity: 0.04,
child: hmgServices.action == 2 child: hmgServices.action == 5
? Image.asset( ? Image.asset(
hmgServices.icon, hmgServices.icon,
width: double.infinity, width: double.infinity,
@ -235,7 +116,7 @@ class ServicesView extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
mFlex(1), mFlex(1),
hmgServices.action == 2 hmgServices.action == (isHomePage ? 5 : 8)
? Image.asset( ? Image.asset(
hmgServices.icon, hmgServices.icon,
height: index == 0 ? MediaQuery.of(context).size.width / 18 : MediaQuery.of(context).size.width / 18, height: index == 0 ? MediaQuery.of(context).size.width / 18 : MediaQuery.of(context).size.width / 18,
@ -282,6 +163,236 @@ class ServicesView extends StatelessWidget {
); );
} }
handleHomePageServices(HmgServices hmgServices, BuildContext context) {
if (hmgServices.action == 0) {
Navigator.push(context, FadePage(page: Search()));
locator<GAnalytics>().hmgServices.logServiceName('book appointment');
} else if (hmgServices.action == 1) {
openLiveCare(context);
} else if (hmgServices.action == 2) {
Navigator.push(context, FadePage(page: ErOptions(isAppbar: true)));
locator<GAnalytics>().hmgServices.logServiceName('emergency service');
} else if (hmgServices.action == 3) {
Navigator.push(context, FadePage(page: HomeHealthCarePage()));
locator<GAnalytics>().hmgServices.logServiceName('home health care');
} else if (hmgServices.action == 4) {
Navigator.push(context, FadePage(page: CMCPage()));
locator<GAnalytics>().hmgServices.logServiceName('comprehensive medical checkup');
} else if (hmgServices.action == 5) {
Navigator.push(context, FadePage(page: PaymentService()));
locator<GAnalytics>().hmgServices.logServiceName('online payments');
} else if (hmgServices.action == 6) {
Navigator.push(context, FadePage(page: EReferralPage()));
locator<GAnalytics>().hmgServices.logServiceName('e-referral service');
} else if (hmgServices.action == 7) {
showCovidDialog(context);
locator<GAnalytics>().hmgServices.logServiceName('covid-test drive-thru');
} else if (hmgServices.action == 8) {
Navigator.push(context, FadePage(page: ContactUsPage()));
locator<GAnalytics>().hmgServices.logServiceName('find us reach us');
}
}
handleAllServices(HmgServices hmgServices, BuildContext context) {
if (hmgServices.action == 0) {
Navigator.push(context, FadePage(page: Search()));
locator<GAnalytics>().hmgServices.logServiceName('book appointment');
} else if (hmgServices.action == 1) {
openLiveCare(context);
} else if (hmgServices.action == 2) {
Navigator.push(context, FadePage(page: ErOptions(isAppbar: true)));
locator<GAnalytics>().hmgServices.logServiceName('emergency service');
} else if (hmgServices.action == 3) {
Navigator.push(context, FadePage(page: HomeHealthCarePage()));
locator<GAnalytics>().hmgServices.logServiceName('home health care');
} else if (hmgServices.action == 4) {
Navigator.push(context, FadePage(page: CMCPage()));
locator<GAnalytics>().hmgServices.logServiceName('comprehensive medical checkup');
} else if (hmgServices.action == 5) {
getPharmacyToken(context);
locator<GAnalytics>().hmgServices.logServiceName('al habib pharmacy');
} else if (hmgServices.action == 6) {
Navigator.push(context, FadePage(page: MedicalProfilePageNew()));
} else if (hmgServices.action == 7) {
Navigator.push(context, FadePage(page: MyFamily()));
locator<GAnalytics>().hmgServices.logServiceName('my family files');
} else if (hmgServices.action == 8) {
Navigator.push(context, FadePage(page: PaymentService()));
locator<GAnalytics>().hmgServices.logServiceName('online payments');
} else if (hmgServices.action == 9) {
Navigator.push(context, FadePage(page: ChildInitialPage()));
locator<GAnalytics>().hmgServices.logServiceName('my child vaccines');
} else if (hmgServices.action == 10) {
Navigator.push(context, FadePage(page: InsuranceUpdate()));
locator<GAnalytics>().hmgServices.logServiceName('update insurance');
} else if (hmgServices.action == 11) {
Navigator.push(context, FadePage(page: EReferralPage()));
locator<GAnalytics>().hmgServices.logServiceName('e-referral service');
} else if (hmgServices.action == 12) {
Navigator.push(context, FadePage(page: H2OPage()));
locator<GAnalytics>().hmgServices.logServiceName('water consumption');
} else if (hmgServices.action == 13) {
Navigator.push(context, FadePage(page: (HealthCalculators())));
locator<GAnalytics>().hmgServices.logServiceName('health calculator');
} else if (hmgServices.action == 14) {
Navigator.push(context, FadePage(page: HealthConverter()));
locator<GAnalytics>().hmgServices.logServiceName('heath converters');
} else if (hmgServices.action == 15) {
Navigator.pop(context);
LandingPage.shared.switchToDoFromHMGServices();
locator<GAnalytics>().hmgServices.logServiceName('todo list');
} else if (hmgServices.action == 16) {
Navigator.push(context, FadePage(page: BloodDonationPage()));
locator<GAnalytics>().hmgServices.logServiceName('blood donation');
} else if (hmgServices.action == 17) {
showCovidDialog(context);
locator<GAnalytics>().hmgServices.logServiceName('covid-test drive-thru');
} else if (hmgServices.action == 18) {
launch("https://hmgwebservices.com/vt_mobile/html/index.html");
locator<GAnalytics>().hmgServices.logServiceName('virtual tour');
} else if (hmgServices.action == 19) {
Navigator.push(context, FadePage(page: SmartWatchInstructions()));
locator<GAnalytics>().hmgServices.logServiceName('smart watches');
} else if (hmgServices.action == 20) {
Navigator.push(context, FadePage(page: ParkingPage()));
locator<GAnalytics>().hmgServices.logServiceName('car parcking service');
} else if (hmgServices.action == 21) {
Navigator.of(context).push(
MaterialPageRoute(
builder: (BuildContext context) => MyWebView(
title: "HMG News",
selectedUrl: "https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live",
),
),
);
locator<GAnalytics>().hmgServices.logServiceName('latest news');
} else if (hmgServices.action == 22) {
Navigator.push(context, FadePage(page: ContactUsPage()));
locator<GAnalytics>().hmgServices.logServiceName('find us reach us');
}
// if (hmgServices.action == 10) {
// openLiveCare(context);
// } else if (index == 1) {
// showCovidDialog(context);
// locator<GAnalytics>().hmgServices.logServiceName('covid-test drive-thru');
// } else if (index == 2) {
// Navigator.push(context, FadePage(page: PaymentService()));
// locator<GAnalytics>().hmgServices.logServiceName('online payments');
// } else if (index == 3) {
// Navigator.push(context, FadePage(page: HomeHealthCarePage()));
// locator<GAnalytics>().hmgServices.logServiceName('home health care');
// } else if (index == 4) {
// Navigator.push(context, FadePage(page: CMCPage()));
// locator<GAnalytics>().hmgServices.logServiceName('comprehensive medical checkup');
// } else if (index == 5) {
// Navigator.push(context, FadePage(page: ErOptions(isAppbar: true)));
// locator<GAnalytics>().hmgServices.logServiceName('emergency service');
// } else if (index == 6) {
// Navigator.push(context, FadePage(page: EReferralPage()));
// locator<GAnalytics>().hmgServices.logServiceName('e-referral service');
// } else if (index == 7) {
// Navigator.push(context, FadePage(page: H2OPage()));
// locator<GAnalytics>().hmgServices.logServiceName('water consumption');
// } else if (index == 8) {
// Navigator.push(context, FadePage(page: ContactUsPage()));
// locator<GAnalytics>().hmgServices.logServiceName('find us reach us');
// } else if (index == 9) {
// Navigator.push(
// context,
// FadePage(
// page: MedicalProfilePageNew(),
// ),
// );
// locator<GAnalytics>().hmgServices.logServiceName('my medical details');
// } else if (index == 10) {
// Navigator.push(
// context,
// FadePage(
// page: Search(),
// ),
// );
// locator<GAnalytics>().hmgServices.logServiceName('book appointment');
// } else if (index == 11) {
// getPharmacyToken(context);
// locator<GAnalytics>().hmgServices.logServiceName('al habib pharmacy');
// } else if (index == 12) {
// Navigator.push(
// context,
// FadePage(
// page: InsuranceUpdate(),
// ),
// );
// locator<GAnalytics>().hmgServices.logServiceName('update insurance');
// } else if (index == 13) {
// Navigator.push(
// context,
// FadePage(
// page: MyFamily(),
// ),
// );
// locator<GAnalytics>().hmgServices.logServiceName('my family files');
// } else if (index == 14) {
// Navigator.push(
// context,
// FadePage(page: ChildInitialPage()),
// );
// locator<GAnalytics>().hmgServices.logServiceName('my child vaccines');
// } else if (index == 15) {
// LandingPage.shared.switchToDoFromHMGServices();
// locator<GAnalytics>().hmgServices.logServiceName('todo list');
// } else if (index == 16) {
// Navigator.push(
// context,
// FadePage(page: BloodDonationPage()),
// );
// locator<GAnalytics>().hmgServices.logServiceName('blood donation');
// } else if (index == 17) {
// Navigator.push(
// context,
// FadePage(
// page: (HealthCalculators()),
// ),
// );
// locator<GAnalytics>().hmgServices.logServiceName('health calculator');
// } else if (index == 18) {
// Navigator.push(
// context,
// FadePage(
// page: HealthConverter(),
// ),
// );
// locator<GAnalytics>().hmgServices.logServiceName('heath converters');
// } else if (index == 19) {
// Navigator.push(
// context,
// FadePage(page: SmartWatchInstructions()),
// );
// locator<GAnalytics>().hmgServices.logServiceName('smart watches');
// } else if (index == 20) {
// locator<GAnalytics>().hmgServices.logServiceName('car parcking service');
// Navigator.push(
// context,
// FadePage(
// page: ParkingPage(),
// ),
// );
// } else if (index == 21) {
// launch("https://hmgwebservices.com/vt_mobile/html/index.html");
// locator<GAnalytics>().hmgServices.logServiceName('virtual tour');
// } else if (index == 22) {
// Navigator.of(context).push(
// MaterialPageRoute(
// builder: (BuildContext context) => MyWebView(
// title: "HMG News",
// selectedUrl: "https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live",
// ),
// ),
// );
// locator<GAnalytics>().hmgServices.logServiceName('latest news');
// }
}
showCovidDialog(BuildContext context) { showCovidDialog(BuildContext context) {
if (Platform.isAndroid) { if (Platform.isAndroid) {
showDialog( showDialog(

@ -96,15 +96,15 @@ class _LiveCarePendingRequestState extends State<LiveCarePendingRequest> {
child: Text(TranslationBase.of(context).yourTurn + " " + widget.pendingERRequestHistoryList.patCount.toString() + " " + TranslationBase.of(context).patients, child: Text(TranslationBase.of(context).yourTurn + " " + widget.pendingERRequestHistoryList.patCount.toString() + " " + TranslationBase.of(context).patients,
style: TextStyle(fontSize: 12.0, fontWeight: FontWeight.w600, letterSpacing: -0.48)), style: TextStyle(fontSize: 12.0, fontWeight: FontWeight.w600, letterSpacing: -0.48)),
), ),
Row( // Row(
children: [ // children: [
Container( // Container(
padding: const EdgeInsets.all(5.0), // padding: const EdgeInsets.all(5.0),
child: Text(TranslationBase.of(context).liveCareSupportContact, style: TextStyle(fontSize: 12.0, fontWeight: FontWeight.w600, letterSpacing: -0.48)), // child: Text(TranslationBase.of(context).liveCareSupportContact, style: TextStyle(fontSize: 12.0, fontWeight: FontWeight.w600, letterSpacing: -0.48)),
), // ),
Directionality(textDirection: TextDirection.ltr, child: Text("011 525 9553", style: TextStyle(fontSize: 12.0, fontWeight: FontWeight.w600, letterSpacing: -0.48))) // Directionality(textDirection: TextDirection.ltr, child: Text("011 525 9553", style: TextStyle(fontSize: 12.0, fontWeight: FontWeight.w600, letterSpacing: -0.48)))
], // ],
), // ),
mHeight(12.0), mHeight(12.0),
Container( Container(
child: DefaultButton(TranslationBase.of(context).callLiveCareSupport, () { child: DefaultButton(TranslationBase.of(context).callLiveCareSupport, () {

@ -42,8 +42,8 @@ import 'package:provider/provider.dart';
class ConfirmLogin extends StatefulWidget { class ConfirmLogin extends StatefulWidget {
final Function changePageViewIndex; final Function changePageViewIndex;
final fromRegistration; final fromRegistration;
final bool isDubai;
const ConfirmLogin({Key key, this.changePageViewIndex, this.fromRegistration = false}) : super(key: key); const ConfirmLogin({Key key, this.changePageViewIndex, this.fromRegistration = false, this.isDubai =false}) : super(key: key);
@override @override
_ConfirmLogin createState() => _ConfirmLogin(); _ConfirmLogin createState() => _ConfirmLogin();
@ -385,8 +385,10 @@ class _ConfirmLogin extends State<ConfirmLogin> {
var request = this.getCommonRequest(type: type); var request = this.getCommonRequest(type: type);
request.sMSSignature = await SMSOTP.getSignature(); request.sMSSignature = await SMSOTP.getSignature();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
if (healthId != null) { if (healthId != null || widget.isDubai) {
request.dob = dob; //isHijri == 1 ? dob : dateFormat2.format(dateFormat.parse(dob)); if(!widget.isDubai){
request.dob = dob; //isHijri == 1 ? dob : dateFormat2.format(dateFormat.parse(dob));
}
request.healthId = healthId; request.healthId = healthId;
request.isHijri = isHijri; request.isHijri = isHijri;
await this.authService.sendActivationCodeRegister(request).then((result) { await this.authService.sendActivationCodeRegister(request).then((result) {
@ -547,7 +549,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
request.searchType = this.registerd_data.searchType != null ? this.registerd_data.searchType : 1; request.searchType = this.registerd_data.searchType != null ? this.registerd_data.searchType : 1;
request.patientID = this.registerd_data.patientID != null ? this.registerd_data.patientID : 0; request.patientID = this.registerd_data.patientID != null ? this.registerd_data.patientID : 0;
request.patientIdentificationID = request.nationalID = this.registerd_data.patientIdentificationID != null ? this.registerd_data.patientIdentificationID : '0'; request.patientIdentificationID = request.nationalID = this.registerd_data.patientIdentificationID != null ? this.registerd_data.patientIdentificationID : '0';
request.dob = this.registerd_data.dob;
request.isRegister = this.registerd_data.isRegister; request.isRegister = this.registerd_data.isRegister;
} else { } else {
request.searchType = request.searchType != null ? request.searchType : 2; request.searchType = request.searchType != null ? request.searchType : 2;
@ -565,8 +567,10 @@ class _ConfirmLogin extends State<ConfirmLogin> {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
var request = this.getCommonRequest().toJson(); var request = this.getCommonRequest().toJson();
dynamic res; dynamic res;
if (healthId != null) { if (healthId != null || widget.isDubai) {
request['DOB'] = dob; if(!widget.isDubai) {
request['DOB'] = dob;
}
request['HealthId'] = healthId; request['HealthId'] = healthId;
request['IsHijri'] = isHijri; request['IsHijri'] = isHijri;
@ -579,6 +583,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
result = CheckActivationCode.fromJson(result), result = CheckActivationCode.fromJson(result),
if (this.registerd_data != null && this.registerd_data.isRegister == true) if (this.registerd_data != null && this.registerd_data.isRegister == true)
{ {
// if(widget.isDubai ==false){
widget.changePageViewIndex(1), widget.changePageViewIndex(1),
Navigator.popUntil(context, (route) => Utils.route(route, equalsTo: RegisterNew)), Navigator.popUntil(context, (route) => Utils.route(route, equalsTo: RegisterNew)),
} }

@ -8,6 +8,7 @@ import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.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_activation_code_response.dart' as checkActivation;
import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart';
import 'package:diplomaticquarterapp/models/Authentication/countries_list.dart';
import 'package:diplomaticquarterapp/models/Authentication/register_info_response.dart'; import 'package:diplomaticquarterapp/models/Authentication/register_info_response.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart'; import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart';
@ -45,21 +46,30 @@ class RegisterInfo extends StatefulWidget {
class _RegisterInfo extends State<RegisterInfo> { class _RegisterInfo extends State<RegisterInfo> {
final authService = new AuthProvider(); final authService = new AuthProvider();
final sharedPref = new AppSharedPreferences(); final sharedPref = new AppSharedPreferences();
RegisterInfoResponse registerInfo; RegisterInfoResponse registerInfo = RegisterInfoResponse();
bool isLoading; bool isLoading;
int page; int page;
final List<Location> locationList = [ final List<Location> locationList = [
new Location(name: 'KSA', value: '1'), new Location(name: 'KSA', value: '1', nameAr: "السعودية"),
new Location(name: 'Dubai', value: '2'), new Location(name: 'Dubai', value: '2', nameAr: "دبي"),
]; ];
String language = '1'; String language = '1';
var registerd_data; CheckPatientAuthenticationReq registerd_data;
final List<Language> languageList = [ final List<Language> languageList = [
new Language(name: 'English', value: '2'), new Language(name: 'English', value: '2', nameAr: "إنجليزي"),
new Language(name: 'Arabic', value: '1'), new Language(name: 'Arabic', value: '1', nameAr: "عربي"),
];
final List<Language> genderList = [
new Language(name: 'Male', value: 'M', nameAr: "ذكر"),
new Language(name: 'Female', value: 'F', nameAr: "أنثى"),
];
final List<Language> maritalList = [
new Language(name: 'Married', value: 'M', nameAr: "متزوج"),
new Language(name: 'Single', value: 'S', nameAr: "اعزب"),
new Language(name: 'Divorce', value: 'D', nameAr: "الطلاق"),
]; ];
String email = ''; String email = '';
List<CountriesLists> countriesList = [];
ToDoCountProviderModel toDoProvider; ToDoCountProviderModel toDoProvider;
String location = '1'; String location = '1';
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>(); AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
@ -67,16 +77,22 @@ class _RegisterInfo extends State<RegisterInfo> {
ProjectViewModel projectViewModel; ProjectViewModel projectViewModel;
AppointmentRateViewModel appointmentRateViewModel = locator<AppointmentRateViewModel>(); AppointmentRateViewModel appointmentRateViewModel = locator<AppointmentRateViewModel>();
bool isDubai = false;
RegisterInfoResponse data = RegisterInfoResponse();
CheckPatientAuthenticationReq data2;
String gender = 'M';
String maritalStatus = 'M';
String nationality = 'SAU';
@override @override
void initState() { void initState() {
if (widget.page == 1) {
getCountries();
}
WidgetsBinding.instance.addPostFrameCallback((timeStamp) { WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
getRegisterInfo(); getRegisterInfo();
}); });
setState(() { page = widget.page;
page = widget.page;
});
super.initState(); super.initState();
} }
@ -105,169 +121,279 @@ class _RegisterInfo extends State<RegisterInfo> {
], ],
), ),
SizedBox(height: 20), SizedBox(height: 20),
registerInfo != null && page == 1 (isDubai && page == 1)
? Column( ? Column(
children: [ children: [
SizedBox(height: 20), SizedBox(height: 20),
getnameField(TranslationBase.of(context).identificationNumber, registerInfo.idNumber, TranslationBase.of(context).firstName, getnameField(TranslationBase.of(context).identificationNumber, registerd_data.patientIdentificationID, TranslationBase.of(context).mobileNumber,
registerInfo.firstNameEn == '-' ? registerInfo.firstNameAr : registerInfo.firstNameEn), registerd_data.patientMobileNumber.toString()),
SizedBox(height: 20), // SizedBox(height: 20),
getnameField(TranslationBase.of(context).middleName, registerInfo.secondNameEn == '-' ? registerInfo.secondNameEn : registerInfo.secondNameEn, projectViewModel.isArabic
TranslationBase.of(context).lastName, registerInfo.lastNameEn == '-' ? registerInfo.lastNameEn : registerInfo.lastNameEn), ? getnameField(
'',
inputWidget("First Name", "First Name English", 'fNameEn'),
'',
inputWidget("Last Name", "Last Name English", 'lNameEn'),
)
: SizedBox(
height: 0,
),
getnameField(
'',
inputWidget(TranslationBase.of(context).firstName, TranslationBase.of(context).firstName, 'fName'),
'',
inputWidget(TranslationBase.of(context).middleName, TranslationBase.of(context).middleName, 'sName'),
),
getnameField(
'',
inputWidget(TranslationBase.of(context).lastName, TranslationBase.of(context).lastName, 'lName'),
TranslationBase.of(context).gender,
Container(
height: 20,
child: DropdownButtonHideUnderline(
child: DropdownButton(
isExpanded: true,
value: gender,
hint: Text(TranslationBase.of(context).gender),
iconSize: 40,
elevation: 16,
onChanged: (value) => {
setState(() {
gender = value;
registerInfo.gender = value;
})
},
items: genderList.map<DropdownMenuItem<String>>((Language value) {
return DropdownMenuItem<String>(
value: value.value,
child: Text(
projectViewModel.isArabic == 1 ? value.nameAr : value.name,
),
);
}).toList()))),
),
SizedBox(height: 20), SizedBox(height: 20),
getnameField( getnameField(
TranslationBase.of(context).gender,
registerInfo.maritalStatusCode == 'U'
? 'Unknown'
: registerInfo.maritalStatusCode == 'M'
? 'Male'
: 'Female',
TranslationBase.of(context).maritalStatus, TranslationBase.of(context).maritalStatus,
registerInfo.maritalStatus), Container(
SizedBox(height: 20), height: 18,
getnameField(TranslationBase.of(context).nationality, registerInfo.nationality, TranslationBase.of(context).mobileNumber, registerd_data.patientMobileNumber.toString()), child: DropdownButtonHideUnderline(
child: DropdownButton(
isExpanded: true,
value: maritalStatus,
hint: Text(TranslationBase.of(context).maritalStatus),
iconSize: 40,
elevation: 16,
onChanged: (value) => {
setState(() {
maritalStatus = value;
registerInfo.maritalStatusCode = value;
})
},
items: maritalList.map<DropdownMenuItem<String>>((Language value) {
return DropdownMenuItem<String>(
value: value.value,
child: Text(
projectViewModel.isArabic == 1 ? value.nameAr : value.name,
),
);
}).toList()))),
TranslationBase.of(context).nationality,
Container(
height: 22,
child: DropdownButtonHideUnderline(
child: DropdownButton(
isExpanded: true,
value: nationality,
hint: Text(TranslationBase.of(context).nationality),
iconSize: 40,
elevation: 16,
onChanged: (value) => {
setState(() {
nationality = value;
registerInfo.nationalityCode = value;
})
},
items: countriesList.map<DropdownMenuItem<String>>((CountriesLists value) {
return DropdownMenuItem<String>(
value: value.iD,
child: Text(
value.name,
),
);
}).toList())))),
SizedBox(height: 20), SizedBox(height: 20),
getnameField(TranslationBase.of(context).dateOfBirth, registerInfo.dateOfBirth, "", ""), getnameField(TranslationBase.of(context).dateOfBirth, registerd_data.dob, "", ""),
SizedBox(height: 20), SizedBox(height: 20),
], ],
) )
: registerInfo != null && widget.page == 2 : (registerInfo.healthId != null && page == 1)
? Column( ? Column(
crossAxisAlignment: CrossAxisAlignment.start, children: [
children: <Widget>[ SizedBox(height: 20),
Container( getnameField(TranslationBase.of(context).identificationNumber, registerInfo.idNumber, TranslationBase.of(context).firstName,
width: double.infinity, registerInfo.firstNameEn == '-' ? registerInfo.firstNameAr : registerInfo.firstNameEn),
decoration: containerRadius(Colors.white, 12), SizedBox(height: 20),
padding: EdgeInsets.only(left: 10, right: 10, top: 5, bottom: 25), getnameField(TranslationBase.of(context).middleName, registerInfo.secondNameEn == '-' ? registerInfo.secondNameEn : registerInfo.secondNameEn,
child: Row(children: [ TranslationBase.of(context).lastName, registerInfo.lastNameEn == '-' ? registerInfo.lastNameEn : registerInfo.lastNameEn),
Flexible( SizedBox(height: 20),
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ getnameField(
Text( TranslationBase.of(context).gender,
TranslationBase.of(context).prefferedLanguage, registerInfo.maritalStatusCode == 'U'
style: TextStyle( ? 'Unknown'
fontSize: 11, : registerInfo.maritalStatusCode == 'M'
letterSpacing: -0.44, ? 'Male'
fontWeight: FontWeight.w600, : 'Female',
), TranslationBase.of(context).maritalStatus,
), registerInfo.maritalStatus),
Container( SizedBox(height: 20),
height: 18, getnameField(TranslationBase.of(context).nationality, registerInfo.nationality, TranslationBase.of(context).mobileNumber, registerd_data.patientMobileNumber.toString()),
child: DropdownButtonHideUnderline( SizedBox(height: 20),
child: DropdownButton( getnameField(TranslationBase.of(context).dateOfBirth, registerInfo.dateOfBirth, "", ""),
isExpanded: true, SizedBox(height: 20),
value: language,
hint: Text(TranslationBase.of(context).prefferedLanguage),
iconSize: 40,
elevation: 16,
onChanged: (value) => {
setState(() {
language = value;
})
},
items: languageList.map<DropdownMenuItem<String>>((Language value) {
return DropdownMenuItem<String>(
value: value.value,
child: Text(value.name),
);
}).toList())))
]))
])),
SizedBox(
height: 20,
),
Container(
width: double.infinity,
decoration: containerRadius(Colors.white, 12),
padding: EdgeInsets.only(left: 10, right: 10, top: 5, bottom: 25),
child: Row(children: [
Flexible(
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
Text(
TranslationBase.of(context).selectLocation,
style: TextStyle(
fontSize: 11,
letterSpacing: -0.44,
fontWeight: FontWeight.w600,
),
),
Container(
height: 18,
child: DropdownButtonHideUnderline(
child: DropdownButton(
isExpanded: true,
value: location,
hint: Text(TranslationBase.of(context).selectLocation),
iconSize: 40,
elevation: 16,
onChanged: (value) => {
setState(() {
location = value;
})
},
items: locationList.map<DropdownMenuItem<String>>((Location value) {
return DropdownMenuItem<String>(
value: value.value,
child: Text(
value.name,
),
);
}).toList())))
]))
])),
SizedBox(
height: 20,
),
Container(
width: double.infinity,
decoration: containerRadius(Colors.white, 12),
padding: EdgeInsets.only(left: 10, right: 10, top: 5, bottom: 12),
margin: EdgeInsets.only(bottom: 0),
child: Row(children: [
Flexible(
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
Text(
TranslationBase.of(context).email,
style: TextStyle(
fontSize: 11,
letterSpacing: -0.44,
fontWeight: FontWeight.w600,
),
),
Container(
child: TextField(
onChanged: (value) {
setState(() {
email = value;
});
},
style: TextStyle(
fontSize: 14,
height: 21 / 14,
fontWeight: FontWeight.w400,
color: Color(0xff2B353E),
letterSpacing: -0.44,
),
decoration: InputDecoration(
isDense: true,
hintStyle: TextStyle(
fontSize: 14,
height: 21 / 14,
fontWeight: FontWeight.w400,
color: Color(0xff575757),
letterSpacing: -0.56,
),
prefixIconConstraints: BoxConstraints(minWidth: 50),
contentPadding: EdgeInsets.zero,
border: InputBorder.none,
focusedBorder: InputBorder.none,
enabledBorder: InputBorder.none,
),
))
]))
])),
], ],
) )
: SizedBox(), : widget.page == 2
? Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
width: double.infinity,
decoration: containerRadius(Colors.white, 12),
padding: EdgeInsets.only(left: 10, right: 10, top: 5, bottom: 25),
child: Row(children: [
Flexible(
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
Text(
TranslationBase.of(context).prefferedLanguage,
style: TextStyle(
fontSize: 11,
letterSpacing: -0.44,
fontWeight: FontWeight.w600,
),
),
Container(
height: 18,
child: DropdownButtonHideUnderline(
child: DropdownButton(
isExpanded: true,
value: language,
hint: Text(TranslationBase.of(context).prefferedLanguage),
iconSize: 40,
elevation: 16,
onChanged: (value) => {
setState(() {
language = value;
})
},
items: languageList.map<DropdownMenuItem<String>>((Language value) {
return DropdownMenuItem<String>(
value: value.value,
child: Text(
projectViewModel.isArabic == 1 ? value.nameAr : value.name,
),
);
}).toList())))
]))
])),
SizedBox(
height: 20,
),
Container(
width: double.infinity,
decoration: containerRadius(Colors.white, 12),
padding: EdgeInsets.only(left: 10, right: 10, top: 5, bottom: 25),
child: Row(children: [
Flexible(
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
Text(
TranslationBase.of(context).selectLocation,
style: TextStyle(
fontSize: 11,
letterSpacing: -0.44,
fontWeight: FontWeight.w600,
),
),
Container(
height: 18,
child: DropdownButtonHideUnderline(
child: DropdownButton(
isExpanded: true,
value: location,
hint: Text(TranslationBase.of(context).selectLocation),
iconSize: 40,
elevation: 16,
onChanged: (value) => {
setState(() {
location = value;
})
},
items: locationList.map<DropdownMenuItem<String>>((Location value) {
return DropdownMenuItem<String>(
value: value.value,
child: Text(
projectViewModel.isArabic == 1 ? value.nameAr : value.name,
),
);
}).toList())))
]))
])),
SizedBox(
height: 20,
),
Container(
width: double.infinity,
decoration: containerRadius(Colors.white, 12),
padding: EdgeInsets.only(left: 10, right: 10, top: 5, bottom: 12),
margin: EdgeInsets.only(bottom: 0),
child: Row(children: [
Flexible(
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
Text(
TranslationBase.of(context).email,
style: TextStyle(
fontSize: 11,
letterSpacing: -0.44,
fontWeight: FontWeight.w600,
),
),
Container(
child: TextField(
keyboardType: TextInputType.emailAddress,
onChanged: (value) {
setState(() {
email = value;
});
},
style: TextStyle(
fontSize: 14,
height: 21 / 14,
fontWeight: FontWeight.w400,
color: Color(0xff2B353E),
letterSpacing: -0.44,
),
decoration: InputDecoration(
isDense: true,
hintStyle: TextStyle(
fontSize: 14,
height: 21 / 14,
fontWeight: FontWeight.w400,
color: Color(0xff575757),
letterSpacing: -0.56,
),
prefixIconConstraints: BoxConstraints(minWidth: 50),
contentPadding: EdgeInsets.zero,
border: InputBorder.none,
focusedBorder: InputBorder.none,
enabledBorder: InputBorder.none,
),
))
]))
])),
],
)
: SizedBox(),
]), ]),
), ),
bottomSheet: Container( bottomSheet: Container(
@ -289,24 +415,40 @@ class _RegisterInfo extends State<RegisterInfo> {
child: DefaultButton(page == 1 ? TranslationBase.of(context).next : TranslationBase.of(context).register, () { child: DefaultButton(page == 1 ? TranslationBase.of(context).next : TranslationBase.of(context).register, () {
nextPage(); nextPage();
page == 1 ? locator<GAnalytics>().loginRegistration.registration_personal_info() : locator<GAnalytics>().loginRegistration.registration_patient_info(); page == 1 ? locator<GAnalytics>().loginRegistration.registration_personal_info() : locator<GAnalytics>().loginRegistration.registration_patient_info();
}, textColor: Colors.white, color: isValid() == true && page == 2 || page == 1 ? Color(0xff359846) : Colors.grey)), }, textColor: Colors.white, color: isValid() == true ? Color(0xff359846) : Colors.grey)),
), ),
], ],
))); )));
} }
nextPage() { nextPage() async {
if (page == 1) { if (page == 1) {
setState(() { if (isDubai) {
await setRegisterData();
widget.changePageViewIndex(2); widget.changePageViewIndex(2);
}); } else {
widget.changePageViewIndex(2);
}
} else { } else {
registerNow(); registerNow();
} }
} }
setRegisterData() async {
registerInfo.gender = gender;
registerInfo.maritalStatusCode = maritalStatus;
registerInfo.nationalityCode = nationality;
projectViewModel.setRegisterData(registerInfo);
// await sharedPref.setObject(REGISTER_INFO_DUBAI, registerInfo);
}
registerNow() { registerNow() {
dynamic request = getTempUserRequest(); dynamic request;
if (isDubai)
request = getTempUserRequestDubai();
else
request = getTempUserRequest();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
dynamic res; dynamic res;
this this
@ -374,14 +516,17 @@ class _RegisterInfo extends State<RegisterInfo> {
} }
getRegisterInfo() async { getRegisterInfo() async {
var data = RegisterInfoResponse.fromJson(await sharedPref.getObject(NHIC_DATA)); if (await sharedPref.getObject(NHIC_DATA) != null) {
data = RegisterInfoResponse.fromJson(await sharedPref.getObject(NHIC_DATA));
this.registerInfo = data;
}
if (await sharedPref.getObject(REGISTER_DATA_FOR_LOGIIN) != null) { if (await sharedPref.getObject(REGISTER_DATA_FOR_LOGIIN) != null) {
var data2 = CheckPatientAuthenticationReq.fromJson(await sharedPref.getObject(REGISTER_DATA_FOR_LOGIIN)); data2 = CheckPatientAuthenticationReq.fromJson(await sharedPref.getObject(REGISTER_DATA_FOR_LOGIIN));
setState(() { setState(() {
this.registerInfo = data;
this.registerd_data = data2; this.registerd_data = data2;
isDubai = data2.patientOutSA == 1 ? true : false;
if (isDubai) location = '2';
}); });
} }
} }
@ -424,8 +569,54 @@ class _RegisterInfo extends State<RegisterInfo> {
}; };
} }
getTempUserRequestDubai() {
DateFormat dateFormat = DateFormat("mm/dd/yyyy");
registerInfo = projectViewModel.registerInfo;
print(dateFormat.parse(registerd_data.dob));
var hDate = new HijriCalendar.fromDate(dateFormat.parse(registerd_data.dob));
var date = hDate.toString();
final DateFormat dateFormat1 = DateFormat('MM/dd/yyyy');
final DateFormat dateFormat2 = DateFormat('dd/MM/yyyy');
return {
"Patientobject": {
"TempValue": true,
"PatientIdentificationType": registerd_data.patientIdentificationID.substring(0, 1) == "1" ? 1 : 2,
"PatientIdentificationNo": registerd_data.patientIdentificationID,
"MobileNumber": registerd_data.patientMobileNumber,
"PatientOutSA": (registerd_data.zipCode == '966' || registerd_data.zipCode == '+966') ? 0 : 1,
"FirstNameN": registerInfo.firstNameAr ?? "",
"FirstName": registerInfo.firstNameEn ?? "",
"MiddleNameN": registerInfo.secondNameAr ?? ".",
"MiddleName": registerInfo.secondNameEn ?? ".",
"LastNameN": registerInfo.lastNameAr ?? "",
"LastName": registerInfo.lastNameEn ?? "",
"StrDateofBirth": dateFormat1.format(dateFormat2.parse(registerd_data.dob)),
"DateofBirth": DateUtil.convertISODateToJsonDate(registerd_data.dob.replaceAll('/', '-')),
"Gender": registerInfo.gender == 'M' ? 1 : 2,
"NationalityID": registerInfo.nationalityCode,
"eHealthIDField": null,
"DateofBirthN": date,
"EmailAddress": email,
"SourceType": location,
"PreferredLanguage": registerd_data.languageID.toString(),
"Marital": registerInfo.maritalStatusCode == 'U'
? '0'
: registerInfo.maritalStatusCode == 'M'
? '1'
: '2',
},
"PatientIdentificationID": registerd_data.patientIdentificationID,
"PatientMobileNumber": registerd_data.patientMobileNumber.toString()[0] == '0' ? registerd_data.patientMobileNumber : '0' + registerd_data.patientMobileNumber.toString(),
"DOB": registerd_data.dob,
"IsHijri": registerd_data.isHijri
};
}
bool isValid() { bool isValid() {
if (location != null && language != null && Utils.validEmail(email) == true) { if ((location != null && language != null && Utils.validEmail(email) == true) ||
(registerInfo.firstNameEn != null && registerInfo.lastNameEn != null) ||
(projectViewModel.isArabic && registerInfo.firstNameEn != null && registerInfo.firstNameAr != null && registerInfo.lastNameEn != null && registerInfo.lastNameAr != null)) {
return true; return true;
} else { } else {
return false; return false;
@ -436,49 +627,57 @@ class _RegisterInfo extends State<RegisterInfo> {
return Row( return Row(
children: [ children: [
Expanded( Expanded(
child: Column( child: Padding(
crossAxisAlignment: CrossAxisAlignment.start, padding: EdgeInsets.only(left: 5, right: 5),
children: [ child: Column(
Text( crossAxisAlignment: CrossAxisAlignment.start,
name1, children: [
style: TextStyle( Text(
fontSize: 14, name1,
fontWeight: FontWeight.bold, style: TextStyle(
letterSpacing: -0.44, fontSize: 14,
), fontWeight: FontWeight.bold,
), letterSpacing: -0.44,
Text( ),
value1, ),
style: TextStyle( value1 is String
fontSize: 12, ? Text(
fontWeight: FontWeight.w600, value1,
letterSpacing: -0.44, style: TextStyle(
), fontSize: 12,
), fontWeight: FontWeight.w600,
], letterSpacing: -0.44,
)), ),
)
: value1,
],
))),
Expanded( Expanded(
child: Column( child: Padding(
crossAxisAlignment: CrossAxisAlignment.start, padding: EdgeInsets.only(left: 5, right: 5),
children: [ child: Column(
Text( crossAxisAlignment: CrossAxisAlignment.start,
name2, children: [
style: TextStyle( Text(
fontSize: 14, name2,
fontWeight: FontWeight.bold, style: TextStyle(
letterSpacing: -0.44, fontSize: 14,
), fontWeight: FontWeight.bold,
), letterSpacing: -0.44,
Text( ),
value2, ),
style: TextStyle( value2 is String
fontSize: 12, ? Text(
fontWeight: FontWeight.w600, value2,
letterSpacing: -0.44, style: TextStyle(
), fontSize: 12,
), fontWeight: FontWeight.w600,
], letterSpacing: -0.44,
)) ),
)
: value2,
],
)))
], ],
); );
} }
@ -547,18 +746,146 @@ class _RegisterInfo extends State<RegisterInfo> {
print(err); print(err);
}); });
} }
getCountries() {
ClinicListService service = new ClinicListService();
service.getCountries().then((res) {
if (res['MessageStatus'] == 1) {
res['ListNationality'].forEach((items) => {countriesList.add(CountriesLists.fromJson(items))});
setState(() {});
}
}).catchError((err) {
print(err);
});
}
Widget inputWidget(String _labelText, String _hintText, String name, {String prefix, bool isEnable = true, bool hasSelection = false}) {
return Container(
padding: EdgeInsets.only(left: 10, right: 10, bottom: 5, top: 5),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: Colors.white,
border: Border.all(
color: Color(0xffefefef),
width: 1,
),
),
child: InkWell(
onTap: hasSelection ? () {} : null,
child: Row(
children: [
Expanded(
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
_labelText,
style: TextStyle(
fontSize: 11,
fontWeight: FontWeight.w600,
color: Color(0xff2B353E),
letterSpacing: -0.44,
),
),
TextField(
enabled: isEnable,
scrollPadding: EdgeInsets.zero,
keyboardType: TextInputType.text,
// controller: _controller,
onChanged: (value) => {
setState(() {
switch (name) {
case 'fName':
{
if (projectViewModel.isArabic) {
registerInfo.firstNameAr = value;
} else {
registerInfo.firstNameEn = value;
registerInfo.firstNameAr = '...';
}
}
break;
case 'sName':
{
if (projectViewModel.isArabic) {
registerInfo.secondNameAr = value.isEmpty ? "." : value;
registerInfo.secondNameEn = '...';
} else {
registerInfo.secondNameEn = value.isEmpty ? "." : value;
registerInfo.secondNameAr = '...';
}
}
break;
case 'lName':
{
if (projectViewModel.isArabic) {
registerInfo.lastNameAr = value;
} else {
registerInfo.lastNameEn = value;
registerInfo.lastNameAr = '...';
}
}
break;
case 'fNameEn':
registerInfo.firstNameEn = value;
break;
case 'lNameEn':
registerInfo.lastNameEn = value;
break;
}
})
//_controller.text =value
},
style: TextStyle(
fontSize: 14,
height: 21 / 14,
fontWeight: FontWeight.w400,
color: Color(0xff2B353E),
letterSpacing: -0.44,
),
decoration: InputDecoration(
isDense: true,
hintText: _hintText,
hintStyle: TextStyle(
fontSize: 14,
height: 21 / 14,
fontWeight: FontWeight.w400,
color: Color(0xff575757),
letterSpacing: -0.56,
),
prefixIconConstraints: BoxConstraints(minWidth: 50),
contentPadding: EdgeInsets.zero,
border: InputBorder.none,
focusedBorder: InputBorder.none,
enabledBorder: InputBorder.none,
),
),
],
),
),
if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined),
],
),
),
);
}
} }
class Language { class Language {
final String name; final String name;
final String value; final String value;
final String nameAr;
Language({this.name, this.value}); Language({this.name, this.value, this.nameAr});
} }
class Location { class Location {
final String name; final String name;
final String value; final String value;
final String nameAr;
Location({this.name, this.value}); Location({this.name, this.value, this.nameAr});
} }

@ -2,7 +2,6 @@ import 'package:diplomaticquarterapp/analytics/flows/login_registration.dart';
import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_user_status_reponse.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_user_status_reponse.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_user_status_req.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_user_status_req.dart';
@ -56,125 +55,127 @@ class _Register extends State<Register> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).register,
appBarTitle: TranslationBase.of(context).register, isShowAppBar: false,
isShowAppBar: false, isShowDecPage: false,
isShowDecPage: false, showNewAppBar: false,
showNewAppBar: false, showNewAppBarTitle: true,
showNewAppBarTitle: true, body: Column(
body: Column( children: [
children: [ Expanded(
Expanded( child: ListView(
child: ListView( padding: EdgeInsets.all(21),
padding: EdgeInsets.all(21), physics: BouncingScrollPhysics(),
physics: BouncingScrollPhysics(), children: [
children: [ SizedBox(height: 10),
SizedBox(height: 10), Padding(
Padding( padding: EdgeInsets.all(10),
padding: EdgeInsets.all(10), child: Text(
child: Text( TranslationBase.of(context).enterNationalId,
TranslationBase.of(context).enterNationalId, style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16),
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16), )),
)), SizedBox(height: 10),
SizedBox(height: 10), PhoneNumberSelectorWidget(onNumberChange: (value) => {mobileNo = value, validateForm()}, onCountryChange: (value) => countryCode = value),
PhoneNumberSelectorWidget(onNumberChange: (value) => {mobileNo = value, validateForm()}, onCountryChange: (value) => countryCode = value), SizedBox(height: 12),
SizedBox(height: 12), Directionality(textDirection: TextDirection.ltr, child: inputWidget(TranslationBase.of(context).nationalIdNumber, "Xxxxxxxxx", nationalIDorFile)),
Directionality(textDirection: TextDirection.ltr, child: inputWidget(TranslationBase.of(context).nationalIdNumber, "Xxxxxxxxx", nationalIDorFile)), SizedBox(height: 20),
SizedBox(height: 20), Row(
Row( children: <Widget>[
children: <Widget>[ Expanded(
Expanded( child: Row(
child: Row( children: <Widget>[
children: <Widget>[ Radio(
Radio( value: 1,
value: 1, groupValue: isHijri,
groupValue: isHijri, onChanged: (value) {
onChanged: (value) { setState(() {
setState(() { isHijri = value;
isHijri = value; });
}); validateForm();
validateForm(); },
}, ),
), Text(TranslationBase.of(context).hijriDate),
Text(TranslationBase.of(context).hijriDate), ],
],
),
), ),
Expanded( ),
child: Row( Expanded(
children: <Widget>[ child: Row(
Radio( children: <Widget>[
value: 0, Radio(
groupValue: isHijri, value: 0,
onChanged: (value) { groupValue: isHijri,
setState(() { onChanged: (value) {
isHijri = value; setState(() {
}); isHijri = value;
validateForm(); });
}, validateForm();
), },
Text(TranslationBase.of(context).gregorianDate), ),
], Text(TranslationBase.of(context).gregorianDate),
), ],
), ),
], ),
), ],
Row(children: <Widget>[ ),
Container( Row(children: <Widget>[
width: SizeConfig.realScreenWidth * .9, Container(
child: isHijri == 1 width: SizeConfig.realScreenWidth * .89,
? Directionality( child: isHijri == 1
textDirection: TextDirection.ltr, ? Directionality(
child: inputWidget(TranslationBase.of(context).dob, "DD/MM/YYYYY", dob, textDirection: TextDirection.ltr,
isNumber: false, child: inputWidget(TranslationBase.of(context).dob, "DD/MM/YYYYY", dob,
suffix: Icon( isNumber: false,
Icons.calendar_today, suffix: Icon(
size: 16, Icons.calendar_today,
))) size: 16,
: Container( )))
child: InkWell( : Container(
onTap: () { child: InkWell(
if (isHijri != null) _selectDate(context); onTap: () {
}, if (isHijri != null) _selectDate(context);
child: Directionality( },
textDirection: TextDirection.ltr, child: Directionality(
child: inputWidget(TranslationBase.of(context).dob, "DD/MM/YYYYY", dobEn, textDirection: TextDirection.ltr,
isNumber: false, child: inputWidget(TranslationBase.of(context).dob, "DD/MM/YYYYY", dobEn,
isEnable: false, isNumber: false,
suffix: Icon( isEnable: false,
Icons.calendar_today, suffix: Icon(
size: 16, Icons.calendar_today,
)))))), size: 16,
]) )))))),
], ])
), ],
), ),
Container( ),
width: double.maxFinite, Container(
// height: 80.0, width: double.maxFinite,
color: Colors.white, // height: 80.0,
// margin: EdgeInsets.only(bottom: 50.0), color: Colors.white,
child: Row( // margin: EdgeInsets.only(bottom: 50.0),
children: [ child: Row(
Expanded( children: [
child: Padding( Expanded(
padding: EdgeInsets.all(10), child: DefaultButton(TranslationBase.of(context).cancel, () { child: Padding(
Navigator.of(context).pop(); padding: EdgeInsets.all(10),
locator<GAnalytics>().loginRegistration.registration_cancel(step: 'enter details'); child: DefaultButton(TranslationBase.of(context).cancel, () {
}, textColor: Colors.white, color: Color(0xffD02127))), Navigator.of(context).pop();
), locator<GAnalytics>().loginRegistration.registration_cancel(step: 'enter details');
Expanded( }, textColor: Colors.white, color: Color(0xffD02127))),
child: Padding( ),
padding: EdgeInsets.all(10), Expanded(
child: DefaultButton(TranslationBase.of(context).next, (){ child: Padding(
startRegistration(); padding: EdgeInsets.all(10),
locator<GAnalytics>().loginRegistration.registration_enter_details(); child: DefaultButton(TranslationBase.of(context).next, () {
}, textColor: Colors.white, color: isButtonDisabled == true ? Colors.grey : Color(0xff359846))), startRegistration();
), locator<GAnalytics>().loginRegistration.registration_enter_details();
], }, textColor: Colors.white, color: isButtonDisabled == true ? Colors.grey : Color(0xff359846))),
),) ),
], ],
),); ),
)
],
),
);
} }
Future<Null> _selectDate(BuildContext context) async { Future<Null> _selectDate(BuildContext context) async {
@ -349,12 +350,19 @@ class _Register extends State<Register> {
cancelFunction: () {}) cancelFunction: () {})
.showAlertDialog(context); .showAlertDialog(context);
} else { } else {
final intl.DateFormat dateFormat = intl.DateFormat('dd/MM/yyyy');
nRequest['forRegister'] = true; nRequest['forRegister'] = true;
nRequest['isRegister'] = true; nRequest['isRegister'] = true;
nRequest["PatientIdentificationID"] = nRequest["PatientIdentificationID"].toString(); nRequest["PatientIdentificationID"] = nRequest["PatientIdentificationID"].toString();
nRequest['dob'] = isHijri == 1 ? dob.text : dateFormat.format(selectedDate);
nRequest['isHijri'] = isHijri;
sharedPref.setObject(REGISTER_DATA_FOR_LOGIIN, nRequest); sharedPref.setObject(REGISTER_DATA_FOR_LOGIIN, nRequest);
sharedPref.setString(LOGIN_TOKEN_ID, response['LogInTokenID']); sharedPref.setString(LOGIN_TOKEN_ID, response['LogInTokenID']);
this.chekUserData(response['LogInTokenID']); if(request.patientOutSA ==0 ) {
this.chekUserData(response['LogInTokenID']);
}else{
Navigator.of(context).push(FadePage(page: ConfirmLogin(changePageViewIndex: widget.changePageViewIndex, fromRegistration: true, isDubai:true)));
}
} }
} else { } else {
// if (response['ErrorCode'] == '-986') { // if (response['ErrorCode'] == '-986') {

@ -47,7 +47,7 @@ class AllergiesPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Texts(TranslationBase.of(context).remarks+" :"), Texts(TranslationBase.of(context).remarks+" :"),
Texts(TranslationBase.of(context).description + model.allergies[index].description ?? ''), Texts(TranslationBase.of(context).description + ": " + model.allergies[index].description ?? ''),
], ],
), ),
) )

@ -47,13 +47,26 @@ class _LaboratoryResultPageState extends State<LaboratoryResultPage> {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
}, },
billNo: widget.patientLabOrders.invoiceNo, billNo: widget.patientLabOrders.invoiceNo,
details: model.patientLabSpecialResult[index].resultDataHTML, // details: model.patientLabSpecialResult[index].resultDataHTML,
details: model.patientLabSpecialResult.isEmpty ? null : getSpecialResults(model),
orderNo: widget.patientLabOrders.orderNo, orderNo: widget.patientLabOrders.orderNo,
patientLabOrder: widget.patientLabOrders, patientLabOrder: widget.patientLabOrders,
), ),
itemCount: model.patientLabSpecialResult.length, itemCount: 1,
), ),
), ),
); );
} }
String getSpecialResults(LabsViewModel model) {
String labResults = "";
model.patientLabSpecialResult.forEach((element) {
if (element.resultDataHTML != null) {
labResults += (element.resultDataHTML + "<br/> <br/>");
} else {
labResults += ("<h6>No Result Available</h6>");
}
});
return labResults;
}
} }

@ -57,8 +57,8 @@ class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
subName: model.sickLeaveList[index].clinicName, subName: model.sickLeaveList[index].clinicName,
isSortByClinic: false, isSortByClinic: false,
isInOutPatient: model.sickLeaveList[index].isInOutPatient, isInOutPatient: model.sickLeaveList[index].isInOutPatient,
// isSickLeave: true, isSickLeave: true,
// sickLeaveStatus: model.sickLeaveList[index].status, sickLeaveStatus: model.sickLeaveList[index].status,
onEmailTap: () { onEmailTap: () {
showConfirmMessage(model, index); showConfirmMessage(model, index);
}, },
@ -69,13 +69,13 @@ class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
} }
void showConfirmMessage(PatientSickLeaveViewMode model, int index) { void showConfirmMessage(PatientSickLeaveViewMode model, int index) {
// if (model.sickLeaveList[index].status == 1) { if (model.sickLeaveList[index].status == 1) {
// openWorkPlaceUpdatePage(model.sickLeaveList[index].requestNo, model.sickLeaveList[index].setupID, model, index, model.sickLeaveList[index].projectID); openWorkPlaceUpdatePage(model.sickLeaveList[index].requestNo, model.sickLeaveList[index].setupID, model, index, model.sickLeaveList[index].projectID);
// } else if (model.sickLeaveList[index].status == 2) { } else if (model.sickLeaveList[index].status == 2) {
showEmailDialog(model, index); showEmailDialog(model, index);
// } else { } else {
// showApprovalDialog(); showApprovalDialog();
// } }
} }
void showApprovalDialog() { void showApprovalDialog() {
@ -111,7 +111,14 @@ class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
} }
void openWorkPlaceUpdatePage(int requestNumber, String setupID, PatientSickLeaveViewMode model, int index, int projectID) { void openWorkPlaceUpdatePage(int requestNumber, String setupID, PatientSickLeaveViewMode model, int index, int projectID) {
Navigator.push(context, FadePage(page: WorkplaceUpdatePage(requestNumber: requestNumber, setupID: setupID, projectID: projectID,))).then((value) { Navigator.push(
context,
FadePage(
page: WorkplaceUpdatePage(
requestNumber: requestNumber,
setupID: setupID,
projectID: projectID,
))).then((value) {
print(value); print(value);
if (value != null && value == true) { if (value != null && value == true) {
model.getSickLeave(); model.getSickLeave();

@ -222,7 +222,9 @@ class _WorkplaceUpdatePageState extends State<WorkplaceUpdatePage> {
LabsService service = new LabsService(); LabsService service = new LabsService();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
service.updateWorkplaceName(workplaceName.text, widget.requestNumber, widget.setupID, widget.projectID).then((res) { service
.updateWorkplaceName(projectViewModel.isArabic ? "-" : workplaceName.text, projectViewModel.isArabic ? workplaceName.text : "-", widget.requestNumber, widget.setupID, widget.projectID)
.then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
Navigator.of(context).pop(true); Navigator.of(context).pop(true);
}).catchError((err) { }).catchError((err) {

@ -35,7 +35,7 @@ class VitalSingChartBloodPressure extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
generateData(); generateData();
return SingleChildScrollView( return SingleChildScrollView(
child: Column( child: Column(

@ -248,7 +248,7 @@ class AuthProvider with ChangeNotifier {
return Future.value(localRes); return Future.value(localRes);
} }
Future<dynamic> checkActivationCode(request, [value]) async { Future<dynamic> checkActivationCode(request, [value]) async {
var neRequest = CheckActivationCodeReq.fromJson(request); var neRequest = CheckActivationCodeReq.fromJson(request);
neRequest.activationCode = value ?? "0000"; neRequest.activationCode = value ?? "0000";
@ -377,10 +377,16 @@ class AuthProvider with ChangeNotifier {
requestN.patientOutSA = requestN.patientobject.patientOutSA; requestN.patientOutSA = requestN.patientobject.patientOutSA;
final DateFormat dateFormat = DateFormat('MM/dd/yyyy'); final DateFormat dateFormat = DateFormat('MM/dd/yyyy');
final DateFormat dateFormat2 = DateFormat('dd/MM/yyyy'); final DateFormat dateFormat2 = DateFormat('dd/MM/yyyy');
requestN.dob = nhic['IsHijri'] ? nhic['DateOfBirth'] : dateFormat2.format(dateFormat.parse(nhic['DateOfBirth'])); if(nhic !=null) {
requestN.dob = nhic['IsHijri'] ? nhic['DateOfBirth'] : dateFormat2.format(
dateFormat.parse(nhic['DateOfBirth']));
requestN.isHijri = nhic['IsHijri'] ? 1 : 0;
requestN.healthId = requestN.patientobject.eHealthIDField;
}
requestN.zipCode = requestN.patientOutSA == 1 ? '971' : '966'; requestN.zipCode = requestN.patientOutSA == 1 ? '971' : '966';
requestN.healthId = requestN.patientobject.eHealthIDField;
requestN.isHijri = nhic['IsHijri'] ? 1 : 0;
await sharedPref.remove(USER_PROFILE); await sharedPref.remove(USER_PROFILE);
dynamic localRes; dynamic localRes;

@ -199,4 +199,14 @@ class ClinicListService extends BaseService {
}, body: request); }, body: request);
return Future.value(localRes); return Future.value(localRes);
} }
Future<Map> getCountries() async {
Map<String, dynamic> request ={};
dynamic localRes;
await baseAppClient.post(GET_NATIONALITY, onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
} }

@ -359,6 +359,10 @@ class PushNotificationHandler {
onToken(token); onToken(token);
}); });
FirebaseMessaging.instance.getAPNSToken().then((value) {
print("Push APNS getToken: " + value);
});
FirebaseMessaging.onBackgroundMessage(backgroundMessageHandler); FirebaseMessaging.onBackgroundMessage(backgroundMessageHandler);
} }

@ -183,9 +183,13 @@ class ShowChart extends StatelessWidget {
getMaxX(); getMaxX();
getMin(); getMin();
getMinY(); getMinY();
increasingY = ((maxY - minY) / timeSeries.length - 1) * 15; try {
maxY += increasingY.abs(); increasingY = ((maxY - minY) / timeSeries.length - 1) * 15;
minY -= increasingY.abs(); maxY += increasingY.abs();
minY -= increasingY.abs();
} catch(ex) {
print(ex);
}
} }
double _fetchLeftTileInterval() { double _fetchLeftTileInterval() {
@ -259,7 +263,7 @@ class ShowChart extends StatelessWidget {
barWidth: 1.5, barWidth: 1.5,
isStrokeCapRound: true, isStrokeCapRound: true,
dotData: FlDotData( dotData: FlDotData(
show: false, show: true,
), ),
belowBarData: BarAreaData( belowBarData: BarAreaData(
show: false, show: false,

@ -116,7 +116,7 @@ class DoctorCard extends StatelessWidget {
), ),
Expanded( Expanded(
child: Padding( child: Padding(
padding: const EdgeInsets.only(left: 20, right: 12, top: 12, bottom: 12), padding: const EdgeInsets.only(left: 20, right: 12, top: 12, bottom: 10),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
@ -224,7 +224,7 @@ class DoctorCard extends StatelessWidget {
onTap: onEmailTap, onTap: onEmailTap,
child: Icon( child: Icon(
Icons.email, Icons.email,
color: Theme.of(context).primaryColor, color: sickLeaveStatus != 3 ? Theme.of(context).primaryColor : Colors.grey[400],
), ),
) )
: onTap != null : onTap != null

@ -302,7 +302,7 @@ class DoctorHeader extends StatelessWidget {
], ],
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0, left: 20.0, right: 20.0), margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0),
child: Text(getRatingWidth(doctorDetailsList[0].patientNumber).round().toString() + "%", child: Text(getRatingWidth(doctorDetailsList[0].patientNumber).round().toString() + "%",
style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)), style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
), ),
@ -323,7 +323,7 @@ class DoctorHeader extends StatelessWidget {
], ],
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0, left: 20.0, right: 20.0), margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0),
child: Text(getRatingWidth(doctorDetailsList[1].patientNumber).round().toString() + "%", child: Text(getRatingWidth(doctorDetailsList[1].patientNumber).round().toString() + "%",
style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)), style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
), ),
@ -344,7 +344,7 @@ class DoctorHeader extends StatelessWidget {
], ],
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0, left: 20.0, right: 20.0), margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0),
child: Text(getRatingWidth(doctorDetailsList[2].patientNumber).round().toString() + "%", child: Text(getRatingWidth(doctorDetailsList[2].patientNumber).round().toString() + "%",
style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)), style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
), ),
@ -365,7 +365,7 @@ class DoctorHeader extends StatelessWidget {
], ],
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0, left: 20.0, right: 20.0), margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0),
child: Text(getRatingWidth(doctorDetailsList[3].patientNumber).round().toString() + "%", child: Text(getRatingWidth(doctorDetailsList[3].patientNumber).round().toString() + "%",
style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)), style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
), ),
@ -387,7 +387,7 @@ class DoctorHeader extends StatelessWidget {
], ],
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0, left: 20.0, right: 20.0), margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0),
child: Text(getRatingWidth(doctorDetailsList[4].patientNumber).round().toString() + "%", child: Text(getRatingWidth(doctorDetailsList[4].patientNumber).round().toString() + "%",
style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)), style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
), ),

@ -1,7 +1,7 @@
name: diplomaticquarterapp name: diplomaticquarterapp
description: A new Flutter application. description: A new Flutter application.
version: 4.5.61+1 version: 4.5.64+1
environment: environment:
sdk: ">=2.7.0 <3.0.0" sdk: ">=2.7.0 <3.0.0"
@ -34,7 +34,7 @@ dependencies:
health: ^3.0.3 health: ^3.0.3
#chart #chart
fl_chart: ^0.40.2 fl_chart: ^0.45.0
#Camera Preview #Camera Preview
camera: ^0.10.1 camera: ^0.10.1
@ -172,6 +172,8 @@ dependencies:
flutter_nfc_kit: ^3.3.1 flutter_nfc_kit: ^3.3.1
geofencing: ^0.1.0
# speech_to_text: ^6.1.1 # speech_to_text: ^6.1.1
# path: speech_to_text # path: speech_to_text
@ -205,6 +207,7 @@ dependencies:
sms_otp_auto_verify: ^2.1.0 sms_otp_auto_verify: ^2.1.0
flutter_ios_voip_kit: ^0.0.5 flutter_ios_voip_kit: ^0.0.5
google_api_availability: ^3.0.1 google_api_availability: ^3.0.1
# flutter_callkit_incoming: ^1.0.3+3
# firebase_core: 1.12.0 # firebase_core: 1.12.0
dependency_overrides: dependency_overrides:

Loading…
Cancel
Save