Merge branch 'patient_app_services' into 'development'

hot fix

See merge request Cloud_Solution/doctor_app_flutter!507
merge-requests/506/merge
Mohammad Aljammal 4 years ago
commit 72387e0d42

@ -35,7 +35,7 @@ class BaseAppClient {
String endPoint, {
Map<String, dynamic> body,
Function(dynamic response, int statusCode) onSuccess,
Function(String error, int statusCode) onFailure,
Function(String error, int statusCode) onFailure,bool isAllowAny = false
}) async {
String url = BASE_URL + endPoint;
try {
@ -105,10 +105,13 @@ class BaseAppClient {
if (!parsed['IsAuthenticated']) {
if (body['OTP_SendType'] != null) {
onFailure(getError(parsed), statusCode);
} else {
} else if(!isAllowAny){
await helpers.logout();
helpers.showErrorToast('Your session expired Please login agian');
}
if(isAllowAny){
onFailure(getError(parsed), statusCode);
}
} else if (parsed['MessageStatus'] == 1) {
if (!parsed['IsAuthenticated'])
onFailure(getError(parsed), statusCode);

@ -23,7 +23,7 @@ class PatientMuseService extends BaseService {
hasError = true;
super.error = error;
},
body: body,
body: body,isAllowAny: true
);
}
}

@ -126,14 +126,21 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
.entityList[0]
.timelines[index]
.doctorImage,
episode: model
episode:
model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.timeLineEvents[0]
.consulations.isNotEmpty?
model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.timeLineEvents[0]
.consulations[0]
.episodeID
.toString(),
.toString():"",
vistDate: model
.medicalFileList[0]
.entityList[0]

Loading…
Cancel
Save