From b40727b92079442416dd22d282c0b48ed856f097 Mon Sep 17 00:00:00 2001 From: nextwo <1234> Date: Thu, 13 Jul 2023 08:20:24 +0300 Subject: [PATCH] review comment --- .../api/service_requests_provider.dart | 2 +- .../pages/user/requests/create_request.dart | 2 +- .../report/create_service_report.dart | 30 +++++++++---------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/lib/controllers/providers/api/service_requests_provider.dart b/lib/controllers/providers/api/service_requests_provider.dart index edf5a749..8f89d695 100644 --- a/lib/controllers/providers/api/service_requests_provider.dart +++ b/lib/controllers/providers/api/service_requests_provider.dart @@ -336,7 +336,7 @@ class ServiceRequestsProvider extends ChangeNotifier { }, ) ?.toList(), - "reviewComment": report.reviewComment ?? "", + "reviewComment": "", "comment": report.comment, "attachmentsWorkOrder": request.devicePhotos?.map((e) => {"name": e})?.toList(), "equipmentStatus": report.equipmentStatus?.toMap(), diff --git a/lib/views/pages/user/requests/create_request.dart b/lib/views/pages/user/requests/create_request.dart index bcd45204..63c426e0 100644 --- a/lib/views/pages/user/requests/create_request.dart +++ b/lib/views/pages/user/requests/create_request.dart @@ -306,7 +306,7 @@ class CreateRequestPageState extends State { Fluttertoast.showToast(msg: _subtitle.pickDevice); return; } - if (_serviceRequest.firstAction.name == "Need a visit" && _dateTime == null) { + if (_serviceRequest.firstAction?.name == "Need a visit" && _dateTime == null) { Fluttertoast.showToast(msg: _subtitle.noDateFound); return; } diff --git a/lib/views/pages/user/requests/report/create_service_report.dart b/lib/views/pages/user/requests/report/create_service_report.dart index 8ff8b431..4eac7042 100644 --- a/lib/views/pages/user/requests/report/create_service_report.dart +++ b/lib/views/pages/user/requests/report/create_service_report.dart @@ -397,21 +397,21 @@ class _CreateServiceReportState extends State with TickerPr ), ], ), - if (_showCommentField) - const SizedBox( - height: 8, - ), - if (_showCommentField) - ATextFormField( - initialValue: _serviceReport?.reviewComment, - hintText: "Review Comment", - textAlign: TextAlign.center, - style: Theme.of(context).textTheme.titleMedium, - textInputType: TextInputType.multiline, - onSaved: (value) { - _serviceReport.reviewComment = value; - }, - ), + // if (_showCommentField) + // const SizedBox( + // height: 8, + // ), + // if (_showCommentField) + // ATextFormField( + // initialValue: _serviceReport?.reviewComment, + // hintText: "Review Comment", + // textAlign: TextAlign.center, + // style: Theme.of(context).textTheme.titleMedium, + // textInputType: TextInputType.multiline, + // onSaved: (value) { + // _serviceReport.reviewComment = value; + // }, + // ), SizedBox( height: 8 * AppStyle.getScaleFactor(context), ),