Merge branch 'get_operation_report' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into get_operation_report

 Conflicts:
	lib/core/viewModel/operation_report_view_model.dart
merge-requests/862/head
Elham Rababh 4 years ago
commit 4ebecc4277

@ -5,7 +5,8 @@ import 'package:doctor_app_flutter/models/operation_report/get_operation_report_
import 'package:doctor_app_flutter/models/operation_report/get_operation_report_request_model.dart'; import 'package:doctor_app_flutter/models/operation_report/get_operation_report_request_model.dart';
class OperationReportService extends BaseService { class OperationReportService extends BaseService {
List<GetOperationReportModel> get operationReportList => List(); List<GetOperationReportModel> get _operationReportList => List();
List<GetOperationReportModel> get operationReportList => _operationReportList;
Future getOperationReport( Future getOperationReport(
{GetOperationReportRequestModel getOperationReportRequestModel, {GetOperationReportRequestModel getOperationReportRequestModel,
@ -17,10 +18,12 @@ class OperationReportService extends BaseService {
await baseAppClient.post(GET_OPERATION_REPORT, await baseAppClient.post(GET_OPERATION_REPORT,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");
operationReportList.clear(); _operationReportList.clear();
response['List_OTReservationDetails'].forEach((v) { response['List_OTReservationDetails'].forEach(
operationReportList.add(GetOperationReportModel.fromJson(v)); (v) {
}); _operationReportList.add(GetOperationReportModel.fromJson(v));
},
);
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;

@ -3,13 +3,15 @@ import 'package:doctor_app_flutter/core/service/operation_report_servive.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/locator.dart'; import 'package:doctor_app_flutter/locator.dart';
import 'package:doctor_app_flutter/models/operation_report/create_update_operation_report_request_model.dart'; import 'package:doctor_app_flutter/models/operation_report/create_update_operation_report_request_model.dart';
import 'package:doctor_app_flutter/models/operation_report/get_operation_report_model.dart';
class OperationReportViewModel extends BaseViewModel { class OperationReportViewModel extends BaseViewModel {
bool hasError = false; bool hasError = false;
OperationReportService _operationReportService = OperationReportService _operationReportService =
locator<OperationReportService>(); locator<OperationReportService>();
get operationReportList => _operationReportService.operationReportList; List<GetOperationReportModel> get operationReportList =>
_operationReportService.operationReportList;
Future getOperationReport(int patientId) async { Future getOperationReport(int patientId) async {
hasError = false; hasError = false;

@ -18,7 +18,7 @@ class GetOperationReportModel {
String endDate; String endDate;
String timeStart; String timeStart;
String timeEnd; String timeEnd;
Null remarks; dynamic remarks;
int status; int status;
int createdBy; int createdBy;
String createdOn; String createdOn;

@ -532,7 +532,7 @@ class _ProgressNoteState extends State<OperationReportScreen> {
model model
.operationReportList[ .operationReportList[
index] index]
.notes, .remarks,
fontSize: 10, fontSize: 10,
), ),
), ),

Loading…
Cancel
Save