Merge branch 'fix_login' into 'development'

Fix login issue

See merge request Cloud_Solution/doctor_app_flutter!793
merge-requests/795/head
Mohammad Aljammal 4 years ago
commit fa9942ac24

@ -5,8 +5,8 @@ const ONLY_NUMBERS = "[0-9]";
const ONLY_LETTERS = "[a-zA-Z &'\"]";
const ONLY_DATE = "[0-9/]";
const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/';
const BASE_URL = 'https://hmgwebservices.com/';
// const BASE_URL = 'https://uat.hmgwebservices.com/';
// const BASE_URL = 'https://hmgwebservices.com/';
const BASE_URL = 'https://uat.hmgwebservices.com/';
const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh";
const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList";
const PATIENT_PROGRESS_NOTE_URL = "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient";

@ -1,15 +1,16 @@
final TOKEN = 'token';
final PROJECT_ID = 'projectID';
final VIDA_AUTH_TOKEN_ID = 'VidaAuthTokenID';
final VIDA_REFRESH_TOKEN_ID = 'VidaRefreshTokenID';
final LOGIN_TOKEN_ID = 'LogInToken';
final DOCTOR_ID = 'doctorID';
final SLECTED_PATIENT_TYPE = 'slectedPatientType';
final APP_Language = 'language';
final DOCTOR_PROFILE = 'doctorProfile';
final LIVE_CARE_PATIENT = 'livecare-patient-profile';
final LOGGED_IN_USER = 'loggedUser';
final DASHBOARD_DATA = 'dashboard-data';
final OTP_TYPE = 'otp-type';
final LAST_LOGIN_USER = 'last-login-user';
final CLINIC_NAME = 'clinic-name';
const TOKEN = 'token';
const PROJECT_ID = 'projectID';
const VIDA_AUTH_TOKEN_ID = 'VidaAuthTokenID';
const VIDA_REFRESH_TOKEN_ID = 'VidaRefreshTokenID';
const LOGIN_TOKEN_ID = 'LogInToken';
const DOCTOR_ID = 'doctorID';
const SLECTED_PATIENT_TYPE = 'slectedPatientType';
const APP_Language = 'language';
const DOCTOR_PROFILE = 'doctorProfile';
const LIVE_CARE_PATIENT = 'livecare-patient-profile';
const LOGGED_IN_USER = 'loggedUser';
const EMPLOYEE_ID = 'EmployeeID';
const DASHBOARD_DATA = 'dashboard-data';
const OTP_TYPE = 'otp-type';
const LAST_LOGIN_USER = 'last-login-user';
const CLINIC_NAME = 'clinic-name';

@ -1,6 +1,7 @@
class ActivationCodeModel {
int channel;
int languageID;
int loginDoctorID;
double versionID;
int memberID;
int facilityId;
@ -14,7 +15,7 @@ class ActivationCodeModel {
this.memberID,
this.facilityId,
this.otpSendType,
this.generalid});
this.generalid,this.loginDoctorID});
ActivationCodeModel.fromJson(Map<String, dynamic> json) {
channel = json['Channel'];
@ -24,6 +25,7 @@ class ActivationCodeModel {
facilityId = json['facilityId'];
otpSendType = json['OTP_SendType'];
generalid = json['generalid'];
loginDoctorID = json['LoginDoctorID'];
}
Map<String, dynamic> toJson() {
@ -35,6 +37,7 @@ class ActivationCodeModel {
data['facilityId'] = this.facilityId;
data['OTP_SendType'] = otpSendType;
data['generalid'] = this.generalid;
data['LoginDoctorID'] = this.loginDoctorID;
return data;
}
}

@ -3,6 +3,7 @@ class ActivationCodeForVerificationScreenModel {
String mobileNumber;
String zipCode;
int channel;
int loginDoctorID;
int languageID;
double versionID;
int memberID;
@ -25,7 +26,7 @@ class ActivationCodeForVerificationScreenModel {
this.isMobileFingerPrint,
this.vidaAuthTokenID,
this.vidaRefreshTokenID,
this.iMEI});
this.iMEI,this.loginDoctorID});
ActivationCodeForVerificationScreenModel.fromJson(Map<String, dynamic> json) {
oTPSendType = json['OTP_SendType'];
@ -41,6 +42,7 @@ class ActivationCodeForVerificationScreenModel {
vidaAuthTokenID = json['VidaAuthTokenID'];
vidaRefreshTokenID = json['VidaRefreshTokenID'];
iMEI = json['IMEI'];
loginDoctorID = json['LoginDoctorID'];
}
Map<String, dynamic> toJson() {
@ -56,6 +58,7 @@ class ActivationCodeForVerificationScreenModel {
data['generalid'] = this.generalid;
data['IsMobileFingerPrint'] = this.isMobileFingerPrint;
data['IMEI'] = this.iMEI;
data['LoginDoctorID'] = this.loginDoctorID;
return data;
}
}

@ -3,6 +3,7 @@ class CheckActivationCodeRequestModel {
String zipCode;
int doctorID;
int memberID;
int loginDoctorID;
String password;
String facilityId;
String iPAdress;
@ -32,7 +33,7 @@ class CheckActivationCodeRequestModel {
this.activationCode,
this.vidaAuthTokenID,
this.vidaRefreshTokenID,
this.oTPSendType,this.password,this.facilityId,this.memberID,this.isForSilentLogin=false,this.iMEI});
this.oTPSendType,this.password,this.facilityId,this.memberID,this.isForSilentLogin=false,this.iMEI,this.loginDoctorID});
CheckActivationCodeRequestModel.fromJson(Map<String, dynamic> json) {
mobileNumber = json['MobileNumber'];
@ -49,6 +50,7 @@ class CheckActivationCodeRequestModel {
vidaAuthTokenID = json['VidaAuthTokenID'];
vidaRefreshTokenID = json['VidaRefreshTokenID'];
oTPSendType = json['OTP_SendType'];
loginDoctorID = json['LoginDoctorID'];
}
Map<String, dynamic> toJson() {
@ -72,6 +74,7 @@ class CheckActivationCodeRequestModel {
data['Password'] = this.password;
data['IMEI'] = this.iMEI;
data['IsForSilentLogin'] = this.isForSilentLogin;
data['LoginDoctorID'] = this.loginDoctorID;
return data;
}
}

@ -142,6 +142,7 @@ class AuthenticationViewModel extends BaseViewModel {
iMEI: user.iMEI,
facilityId: user.projectID,
memberID: user.doctorID,
loginDoctorID: user.doctorID,
zipCode: user.outSA == true ? '971' : '966',
mobileNumber: user.mobile,
oTPSendType: authMethodType.getTypeIdService(),
@ -163,6 +164,7 @@ class AuthenticationViewModel extends BaseViewModel {
ActivationCodeModel activationCodeModel = ActivationCodeModel(
facilityId: projectID,
memberID: loggedUser.listMemberInformation[0].memberID,
loginDoctorID: loggedUser.listMemberInformation[0].employeeID,
otpSendType: authMethodType.getTypeIdService().toString(),
);
await _authService.sendActivationCodeForDoctorApp(activationCodeModel);
@ -196,6 +198,7 @@ class AuthenticationViewModel extends BaseViewModel {
facilityId:userInfo.projectID!=null? userInfo.projectID.toString():user.projectID.toString(),
oTPSendType: await sharedPref.getInt(OTP_TYPE),
iMEI: localToken,
loginDoctorID:userInfo.userID!=null? int.parse(userInfo.userID):user.doctorID,// loggedUser.listMemberInformation[0].employeeID,
isForSilentLogin:isSilentLogin,
generalid: "Cs2020@2016\$2958");
await _authService.checkActivationCodeForDoctorApp(checkActivationCodeForDoctorApp);

Loading…
Cancel
Save