Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into fix_bugs_new

merge-requests/809/head
mosazaid 5 years ago
commit 829d7b9be7

@ -26,7 +26,8 @@ class BaseAppClient {
Function(dynamic response, int statusCode) onSuccess, Function(dynamic response, int statusCode) onSuccess,
Function(String error, int statusCode) onFailure, Function(String error, int statusCode) onFailure,
bool isAllowAny = false, bool isAllowAny = false,
bool isLiveCare = false}) async { bool isLiveCare = false,
bool isFallLanguage=false}) async {
String url; String url;
if (isLiveCare) if (isLiveCare)
url = BASE_URL_LIVE_CARE + endPoint; url = BASE_URL_LIVE_CARE + endPoint;
@ -58,12 +59,13 @@ class BaseAppClient {
body['TokenID'] = token ?? ''; body['TokenID'] = token ?? '';
} }
// body['TokenID'] = "@dm!n" ?? ''; // body['TokenID'] = "@dm!n" ?? '';
if(!isFallLanguage) {
String lang = await sharedPref.getString(APP_Language); String lang = await sharedPref.getString(APP_Language);
if (lang != null && lang == 'ar') if (lang != null && lang == 'ar')
body['LanguageID'] = 1; body['LanguageID'] = 1;
else else
body['LanguageID'] = 2; body['LanguageID'] = 2;
}
body['stamp'] = DateTime.now().toIso8601String(); body['stamp'] = DateTime.now().toIso8601String();
// if(!body.containsKey("IPAdress")) // if(!body.containsKey("IPAdress"))
body['IPAdress'] = IP_ADDRESS; body['IPAdress'] = IP_ADDRESS;

File diff suppressed because it is too large Load Diff

@ -21,6 +21,6 @@ class ScheduleService extends BaseService {
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: _requestSchedule.toJson(),); }, body: _requestSchedule.toJson(),isFallLanguage: true);
} }
} }

@ -142,7 +142,7 @@ class AuthenticationViewModel extends BaseViewModel {
iMEI: user.iMEI, iMEI: user.iMEI,
facilityId: user.projectID, facilityId: user.projectID,
memberID: user.doctorID, memberID: user.doctorID,
loginDoctorID: user.doctorID, loginDoctorID: int.parse(user.editedBy.toString()),
zipCode: user.outSA == true ? '971' : '966', zipCode: user.outSA == true ? '971' : '966',
mobileNumber: user.mobile, mobileNumber: user.mobile,
oTPSendType: authMethodType.getTypeIdService(), oTPSendType: authMethodType.getTypeIdService(),
@ -172,7 +172,7 @@ class AuthenticationViewModel extends BaseViewModel {
error = _authService.error; error = _authService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
} else { } else {
await sharedPref.setString(LOGIN_TOKEN_ID, await sharedPref.setString(TOKEN,
_authService.activationCodeForDoctorAppRes.logInTokenID); _authService.activationCodeForDoctorAppRes.logInTokenID);
setState(ViewState.Idle); setState(ViewState.Idle);
} }
@ -191,14 +191,14 @@ class AuthenticationViewModel extends BaseViewModel {
projectID: await sharedPref.getInt(PROJECT_ID) != null projectID: await sharedPref.getInt(PROJECT_ID) != null
? await sharedPref.getInt(PROJECT_ID) ? await sharedPref.getInt(PROJECT_ID)
: user.projectID, : user.projectID,
logInTokenID: await sharedPref.getString(LOGIN_TOKEN_ID), logInTokenID: await sharedPref.getString(TOKEN),
activationCode: activationCode ?? '0000', activationCode: activationCode ?? '0000',
memberID:userInfo.userID!=null? int.parse(userInfo.userID):user.doctorID , memberID:userInfo.userID!=null? int.parse(userInfo.userID):user.doctorID ,
password: userInfo.password, password: userInfo.password,
facilityId:userInfo.projectID!=null? userInfo.projectID.toString():user.projectID.toString(), facilityId:userInfo.projectID!=null? userInfo.projectID.toString():user.projectID.toString(),
oTPSendType: await sharedPref.getInt(OTP_TYPE), oTPSendType: await sharedPref.getInt(OTP_TYPE),
iMEI: localToken, iMEI: localToken,
loginDoctorID:userInfo.userID!=null? int.parse(userInfo.userID):user.doctorID,// loggedUser.listMemberInformation[0].employeeID, loginDoctorID:userInfo.userID!=null? int.parse(userInfo.userID):user.editedBy,// loggedUser.listMemberInformation[0].employeeID,
isForSilentLogin:isSilentLogin, isForSilentLogin:isSilentLogin,
generalid: "Cs2020@2016\$2958"); generalid: "Cs2020@2016\$2958");
await _authService.checkActivationCodeForDoctorApp(checkActivationCodeForDoctorApp); await _authService.checkActivationCodeForDoctorApp(checkActivationCodeForDoctorApp);
@ -258,7 +258,7 @@ class AuthenticationViewModel extends BaseViewModel {
sendActivationCodeForDoctorAppResponseModel.vidaAuthTokenID); sendActivationCodeForDoctorAppResponseModel.vidaAuthTokenID);
await sharedPref.setString(VIDA_REFRESH_TOKEN_ID, await sharedPref.setString(VIDA_REFRESH_TOKEN_ID,
sendActivationCodeForDoctorAppResponseModel.vidaRefreshTokenID); sendActivationCodeForDoctorAppResponseModel.vidaRefreshTokenID);
await sharedPref.setString(LOGIN_TOKEN_ID, await sharedPref.setString(TOKEN,
sendActivationCodeForDoctorAppResponseModel.authenticationTokenID); sendActivationCodeForDoctorAppResponseModel.authenticationTokenID);
} }

@ -55,7 +55,7 @@ class RequestSchedule {
data['ClinicID'] = this.clinicID; data['ClinicID'] = this.clinicID;
data['DoctorID'] = this.doctorID; data['DoctorID'] = this.doctorID;
data['DoctorWorkingHoursDays'] = this.doctorWorkingHoursDays; data['DoctorWorkingHoursDays'] = this.doctorWorkingHoursDays;
data['LanguageID'] = this.languageID; data['LanguageID'] = 2;
data['stamp'] = this.stamp; data['stamp'] = this.stamp;
data['IPAdress'] = this.iPAdress; data['IPAdress'] = this.iPAdress;
data['VersionID'] = this.versionID; data['VersionID'] = this.versionID;

@ -455,7 +455,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
Helpers.showErrorToast(authenticationViewModel.error); Helpers.showErrorToast(authenticationViewModel.error);
} else { } else {
await sharedPref.setString(LOGIN_TOKEN_ID, await sharedPref.setString(TOKEN,
authenticationViewModel.activationCodeVerificationScreenRes.logInTokenID); authenticationViewModel.activationCodeVerificationScreenRes.logInTokenID);
if (authMethodType == AuthMethodTypes.SMS || if (authMethodType == AuthMethodTypes.SMS ||
authMethodType == AuthMethodTypes.WhatsApp) { authMethodType == AuthMethodTypes.WhatsApp) {

@ -90,7 +90,7 @@ class _DoctorReplyScreenState extends State<DoctorReplyScreen> {
); );
}), }),
onNotification: (t) { onNotification: (t) {
if (t is ScrollEndNotification && if (t is ScrollUpdateNotification && t.metrics.pixels >= t.metrics.maxScrollExtent - 50 &&
model.state != ViewState.BusyLocal) { model.state != ViewState.BusyLocal) {
setState(() { setState(() {
pageIndex++; pageIndex++;

@ -249,7 +249,7 @@ class _PatientInPatientScreenState extends State<PatientInPatientScreen>
TranslationBase.of(context).inPatientAll, TranslationBase.of(context).inPatientAll,
counter: model.inPatientList.length), counter: model.inPatientList.length),
tabWidget( tabWidget(
screenSize, _activeTab == 1, "My InPatients", screenSize, _activeTab == 1, TranslationBase.of(context).inPatient,
counter: model.myIinPatientList.length), counter: model.myIinPatientList.length),
tabWidget(screenSize, _activeTab == 2, tabWidget(screenSize, _activeTab == 2,
TranslationBase.of(context).discharged), TranslationBase.of(context).discharged),

Loading…
Cancel
Save