diff --git a/lib/core/service/operation_report_servive.dart b/lib/core/service/operation_report_servive.dart index 73843196..4eb7ad8d 100644 --- a/lib/core/service/operation_report_servive.dart +++ b/lib/core/service/operation_report_servive.dart @@ -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'; class OperationReportService extends BaseService { - List get operationReportList => List(); + List get _operationReportList => List(); + List get operationReportList => _operationReportList; Future getOperationReport( {GetOperationReportRequestModel getOperationReportRequestModel, @@ -17,10 +18,12 @@ class OperationReportService extends BaseService { await baseAppClient.post(GET_OPERATION_REPORT, onSuccess: (dynamic response, int statusCode) { print("Success"); - operationReportList.clear(); - response['List_OTReservationDetails'].forEach((v) { - operationReportList.add(GetOperationReportModel.fromJson(v)); - }); + _operationReportList.clear(); + response['List_OTReservationDetails'].forEach( + (v) { + _operationReportList.add(GetOperationReportModel.fromJson(v)); + }, + ); }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; diff --git a/lib/core/viewModel/operation_report_view_model.dart b/lib/core/viewModel/operation_report_view_model.dart index dc5d80d7..77867d95 100644 --- a/lib/core/viewModel/operation_report_view_model.dart +++ b/lib/core/viewModel/operation_report_view_model.dart @@ -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/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/get_operation_report_model.dart'; class OperationReportViewModel extends BaseViewModel { bool hasError = false; OperationReportService _operationReportService = locator(); - get operationReportList => _operationReportService.operationReportList; + List get operationReportList => + _operationReportService.operationReportList; Future getOperationReport(int patientId) async { hasError = false; diff --git a/lib/models/operation_report/get_operation_report_model.dart b/lib/models/operation_report/get_operation_report_model.dart index 4a84620c..29a0158c 100644 --- a/lib/models/operation_report/get_operation_report_model.dart +++ b/lib/models/operation_report/get_operation_report_model.dart @@ -18,7 +18,7 @@ class GetOperationReportModel { String endDate; String timeStart; String timeEnd; - Null remarks; + dynamic remarks; int status; int createdBy; String createdOn; diff --git a/lib/screens/patients/profile/operation_report/operation_report.dart b/lib/screens/patients/profile/operation_report/operation_report.dart index 2caaf964..b0dbab32 100644 --- a/lib/screens/patients/profile/operation_report/operation_report.dart +++ b/lib/screens/patients/profile/operation_report/operation_report.dart @@ -532,7 +532,7 @@ class _ProgressNoteState extends State { model .operationReportList[ index] - .notes, + .remarks, fontSize: 10, ), ),