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 1336ae07..76cbe43a 100644 --- a/lib/views/pages/user/requests/report/create_service_report.dart +++ b/lib/views/pages/user/requests/report/create_service_report.dart @@ -194,6 +194,7 @@ class _CreateServiceReportState extends State with TickerPr ]), child: Column( mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, children: [ // Report type and Reasons Row( @@ -453,6 +454,7 @@ class _CreateServiceReportState extends State with TickerPr ), ], ), + const SizedBox(height: 8), ASubTitle(_subtitle.workingHours), const SizedBox(height: 4), ATextFormField( @@ -498,80 +500,9 @@ class _CreateServiceReportState extends State with TickerPr ], ), ), - const SizedBox( - height: 8, - ), + // Report status and Service Type - Row( - children: [ - // report status - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - ASubTitle(_subtitle.reportStatus), - _validate && _serviceReport.status == null - ? ASubTitle( - _subtitle.requiredWord, - color: Colors.red, - ) - : const SizedBox.shrink(), - const SizedBox( - height: 4, - ), - ServiceReportStatusMenu( - report: _serviceReport, - request: widget.request, - onSelect: (status) { - _serviceReport.status = status; - _showCommentField = _serviceReport.status?.name == "Resolved"; - setState(() {}); - }, - ), - ], - ), - ), - const SizedBox( - width: 8, - ), - // Provider.of(context).isLoading == null - // ? const SizedBox.shrink(): - // Call's last Situation - Consumer( - builder: (_, provider, __) { - if (provider.isLoading == null) return const SizedBox.shrink(); - return Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - ASubTitle(_subtitle.callLastSituation), - _validate && _serviceReport.callLastSituation == null - ? ASubTitle( - _subtitle.requiredWord, - color: Colors.red, - ) - : const SizedBox.shrink(), - const SizedBox( - height: 4, - ), - ServiceReportLastCallsMenu( - report: _serviceReport, - onSelect: (status) { - if (status?.value == 12 || _serviceReport.callLastSituation?.value == 12) { - _serviceReport.callLastSituation = status; - setState(() {}); - } else { - _serviceReport.callLastSituation = status; - } - }, - ), - ], - ), - ); - }, - ), - ], - ), + if (_showCommentField) const SizedBox( height: 8, @@ -590,28 +521,7 @@ class _CreateServiceReportState extends State with TickerPr SizedBox( height: 8 * AppStyle.getScaleFactor(context), ), - // const ASubTitle("Assigned Employee"), - // const SizedBox( - // height: 8, - // ), - // _validate && _serviceReport.engineer == null - // ? ASubTitle( - // _subtitle.requiredWord, - // color: Colors.red, - // ) - // : const SizedBox.shrink(), - // const SizedBox( - // height: 4, - // ), - // EngineersMenu( - // initialValue: _serviceReport.engineer, - // onSelect: (engineer) { - // _serviceReport.engineer = engineer; - // }, - // ), - const SizedBox( - height: 8, - ), + // invoice number & code _serviceReport.callLastSituation?.id != 12 ? const SizedBox.shrink()