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

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

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

Loading…
Cancel
Save