From c13d7a08a089d5e5b3a44217d95a22013c27af86 Mon Sep 17 00:00:00 2001 From: Sultan khan <> Date: Mon, 19 Aug 2024 10:10:38 +0300 Subject: [PATCH] logout issue fixed. --- lib/client/base_app_client.dart | 2 +- lib/core/viewModel/authentication_view_model.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart index 7c06836d..67917cb0 100644 --- a/lib/client/base_app_client.dart +++ b/lib/client/base_app_client.dart @@ -44,7 +44,7 @@ class BaseAppClient { if (body == null || body['DoctorID'] == null) { body!['DoctorID'] = doctorProfile.doctorID; } - if (body['DoctorID'] == "") body['DoctorID'] = null; + if (body['DoctorID'] == "") body['DoctorID'] = doctorProfile.doctorID; // changed from null; because create update episode not working if (body['EditedBy'] == null) body['EditedBy'] = doctorProfile.doctorID; if (body['ProjectID'] == null) { body['ProjectID'] = doctorProfile.projectID; diff --git a/lib/core/viewModel/authentication_view_model.dart b/lib/core/viewModel/authentication_view_model.dart index 28279db7..bd242a88 100644 --- a/lib/core/viewModel/authentication_view_model.dart +++ b/lib/core/viewModel/authentication_view_model.dart @@ -101,7 +101,7 @@ class AuthenticationViewModel extends BaseViewModel { insertIMEIDetailsModel.vidaAuthTokenID = await sharedPref.getString(VIDA_AUTH_TOKEN_ID); insertIMEIDetailsModel.vidaRefreshTokenID = await sharedPref.getString(VIDA_REFRESH_TOKEN_ID); insertIMEIDetailsModel.password = userInfo.password; - insertIMEIDetailsModel.loginDoctorID = loggedUser != null ? loggedUser!.listMemberInformation![0].employeeID : user!.doctorID; + insertIMEIDetailsModel.loginDoctorID = loggedUser != null ? loggedUser!.listMemberInformation![0].employeeID : user!.editedBy; await _authService.insertDeviceImei(insertIMEIDetailsModel); if (_authService.hasError) {