|
|
|
|
@ -40,17 +40,13 @@ class BaseAppClient {
|
|
|
|
|
try {
|
|
|
|
|
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
|
|
|
|
|
String token = await sharedPref.getString(TOKEN);
|
|
|
|
|
// String doctorID = await sharedPref.getString(DOCTOR_ID);
|
|
|
|
|
// if(doctorID != null)
|
|
|
|
|
// body['DoctorID'] = int.parse(doctorID);
|
|
|
|
|
|
|
|
|
|
if (profile != null) {
|
|
|
|
|
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
|
|
|
|
|
if (body['DoctorID'] == null) {
|
|
|
|
|
body['DoctorID'] = doctorProfile?.doctorID;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if (body['DoctorID'] == "")
|
|
|
|
|
body['DoctorID'] = null;
|
|
|
|
|
if (body['DoctorID'] == "") body['DoctorID'] = null;
|
|
|
|
|
if (body['EditedBy'] == null)
|
|
|
|
|
body['EditedBy'] = doctorProfile?.doctorID;
|
|
|
|
|
if (body['ProjectID'] == null) {
|
|
|
|
|
@ -59,10 +55,13 @@ class BaseAppClient {
|
|
|
|
|
|
|
|
|
|
if (body['ClinicID'] == null)
|
|
|
|
|
body['ClinicID'] = doctorProfile?.clinicID;
|
|
|
|
|
} else {
|
|
|
|
|
String doctorID = await sharedPref.getString(DOCTOR_ID);
|
|
|
|
|
if (body['DoctorID'] == '') {
|
|
|
|
|
body['DoctorID'] = null;
|
|
|
|
|
} else if (doctorID != null) body['DoctorID'] = int.parse(doctorID);
|
|
|
|
|
}
|
|
|
|
|
if (body['DoctorID'] == '') {
|
|
|
|
|
body['DoctorID'] = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (body['EditedBy'] == '') {
|
|
|
|
|
body.remove("EditedBy");
|
|
|
|
|
}
|
|
|
|
|
|