From 8399677a0ada8ee386ede7d9d32b5cc097539805 Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Mon, 10 May 2021 15:12:18 +0300 Subject: [PATCH] Fix Dubai user issues --- lib/client/base_app_client.dart | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart index d6a72ab6..bd4b0cd4 100644 --- a/lib/client/base_app_client.dart +++ b/lib/client/base_app_client.dart @@ -67,10 +67,12 @@ class BaseAppClient { await sharedPref.getString(VIDA_REFRESH_TOKEN_ID); } - if (body['ProjectID'] != null && - (body['ProjectID'] == 2 || body['ProjectID'] == 3)) { - body['PatientOutSA'] = true; - } + int projectID = await sharedPref.getInt(PROJECT_ID); + if(projectID ==2 || projectID == 3) + body['PatientOutSA'] = true; + else + body['PatientOutSA'] = false; + body['DeviceTypeID'] = Platform.isAndroid ? 1 : 2; print("URL : $url"); print("Body : ${json.encode(body)}"); @@ -193,10 +195,11 @@ class BaseAppClient { body['PatientOutSA'] = 0; //user['OutSA']; //TODO change it body['SessionID'] = SESSION_ID; //getSe - if (body['ProjectID'] != null && - (body['ProjectID'] == 2 || body['ProjectID'] == 3)) { + int projectID = await sharedPref.getInt(PROJECT_ID); + if(projectID ==2 || projectID == 3) body['PatientOutSA'] = true; - } + else + body['PatientOutSA'] = false; print("URL : $url"); print("Body : ${json.encode(body)}");