insert call info updates

PatientApp_VIDA_Plus_3.3
haroon amjad 3 years ago
parent 7bc105c6c7
commit 31d8443f87

@ -18,8 +18,7 @@ class AskDoctorService extends BaseService {
dynamic localRes; dynamic localRes;
await baseAppClient.post(GET_CALL_INFO_HOURS_RESULT, await baseAppClient.post(GET_CALL_INFO_HOURS_RESULT, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -32,8 +31,7 @@ class AskDoctorService extends BaseService {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
await baseAppClient.post(GET_CALL_REQUEST_TYPE_LOV, await baseAppClient.post(GET_CALL_REQUEST_TYPE_LOV, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
askDoctorReqTypes.clear(); askDoctorReqTypes.clear();
response['ListReqTypes'].forEach((reqType) { response['ListReqTypes'].forEach((reqType) {
askDoctorReqTypes.add(AskDoctorReqTypes.fromJson(reqType)); askDoctorReqTypes.add(AskDoctorReqTypes.fromJson(reqType));
@ -48,12 +46,9 @@ class AskDoctorService extends BaseService {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
body['from'] = body['from'] = "${DateTime.now().year}-${DateTime.now().month}-${DateTime.now().day} 00:00:00";
"${DateTime.now().year}-${DateTime.now().month}-${DateTime.now().day} 00:00:00"; body['from'] = "${DateTime.now().year}-${DateTime.now().month}-${DateTime.now().day} ${DateTime.now().hour}:${DateTime.now().minute}:00";
body['from'] = await baseAppClient.post(GET_DOCTOR_RESPONSE, onSuccess: (dynamic response, int statusCode) {
"${DateTime.now().year}-${DateTime.now().month}-${DateTime.now().day} ${DateTime.now().hour}:${DateTime.now().minute}:00";
await baseAppClient.post(GET_DOCTOR_RESPONSE,
onSuccess: (dynamic response, int statusCode) {
doctorResponseList.clear(); doctorResponseList.clear();
response['List_DoctorResponse'].forEach((reqType) { response['List_DoctorResponse'].forEach((reqType) {
doctorResponseList.add(DoctorResponse.fromJson(reqType)); doctorResponseList.add(DoctorResponse.fromJson(reqType));
@ -69,8 +64,7 @@ class AskDoctorService extends BaseService {
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
body['TransactionNo'] = transactionNo; body['TransactionNo'] = transactionNo;
await baseAppClient.post(UPDATE_READ_STATUS, await baseAppClient.post(UPDATE_READ_STATUS, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
//TODO fix it //TODO fix it
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -78,7 +72,6 @@ class AskDoctorService extends BaseService {
}, body: body); }, body: body);
} }
Future sendRequestLOV({DoctorList doctorList, String requestType, String remark}) async { Future sendRequestLOV({DoctorList doctorList, String requestType, String remark}) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
@ -97,13 +90,11 @@ class AskDoctorService extends BaseService {
body['EditedOn'] = DateUtil.yearMonthDay(DateTime.now()); body['EditedOn'] = DateUtil.yearMonthDay(DateTime.now());
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
body['QuestionType'] = num.parse(requestType); body['QuestionType'] = num.parse(requestType);
await baseAppClient.post(INSERT_CALL_INFO, body['RequestType'] = num.parse(requestType);
onSuccess: (dynamic response, int statusCode) { body['RequestTypeID'] = num.parse(requestType);
await baseAppClient.post(INSERT_CALL_INFO, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) {
}, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: body); }, body: body);
} }
} }

Loading…
Cancel
Save