diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index 8fde2166..4d04378a 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -55,22 +55,24 @@ class BaseAppClient { body['DeviceTypeID'] = DeviceTypeID; - body['PatientType'] = body.containsKey('PatientType') - ? body['PatientType'] != null ? body['PatientType'] : PATIENT_TYPE - : PATIENT_TYPE; + if(!body.containsKey('IsPublicRequest')) { + body['PatientType'] = body.containsKey('PatientType') + ? body['PatientType'] != null ? body['PatientType'] : PATIENT_TYPE + : PATIENT_TYPE; - body['PatientTypeID'] = body.containsKey('PatientTypeID') - ? body['PatientTypeID'] != null - ? body['PatientTypeID'] - : PATIENT_TYPE_ID - : PATIENT_TYPE_ID; + body['PatientTypeID'] = body.containsKey('PatientTypeID') + ? body['PatientTypeID'] != null + ? body['PatientTypeID'] + : PATIENT_TYPE_ID + : PATIENT_TYPE_ID; - if (user != null) { - body['TokenID'] = token; - body['PatientID'] = - body['PatientID'] != null ? body['PatientID'] : user['PatientID']; - body['PatientOutSA'] = user['OutSA']; - body['SessionID'] = getSessionId(token); + if (user != null) { + body['TokenID'] = token; + body['PatientID'] = + body['PatientID'] != null ? body['PatientID'] : user['PatientID']; + body['PatientOutSA'] = user['OutSA']; + body['SessionID'] = getSessionId(token); + } } print("URL : $url"); diff --git a/lib/pages/BookAppointment/components/SearchByClinic.dart b/lib/pages/BookAppointment/components/SearchByClinic.dart index 6b3eff38..9c4d778f 100644 --- a/lib/pages/BookAppointment/components/SearchByClinic.dart +++ b/lib/pages/BookAppointment/components/SearchByClinic.dart @@ -223,6 +223,7 @@ class _SearchByClinicState extends State { } }).catchError((err) { print(err); + AppToast.showErrorToast(message: err); }).showProgressBar( text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); } diff --git a/lib/services/clinic_services/get_clinic_service.dart b/lib/services/clinic_services/get_clinic_service.dart index 8cc1e469..61c5ad59 100644 --- a/lib/services/clinic_services/get_clinic_service.dart +++ b/lib/services/clinic_services/get_clinic_service.dart @@ -148,7 +148,8 @@ class ClinicListService extends BaseService { "isDentalAllowedBackend": true, "Latitude": lat.toString(), "Longitude": long.toString(), - "DeviceTypeID": 1 + "DeviceTypeID": req.DeviceTypeID, + "IsPublicRequest" : true }; dynamic localRes;