|
|
|
|
@ -55,6 +55,7 @@ class _CreateServiceReportState extends State<CreateServiceReport> with TickerPr
|
|
|
|
|
bool _validate = false;
|
|
|
|
|
ServiceReport _serviceReport;
|
|
|
|
|
bool _isLoading = false;
|
|
|
|
|
bool _showCommentField = false;
|
|
|
|
|
|
|
|
|
|
Subtitle _subtitle;
|
|
|
|
|
File _image;
|
|
|
|
|
@ -282,6 +283,8 @@ class _CreateServiceReportState extends State<CreateServiceReport> with TickerPr
|
|
|
|
|
request: widget.request,
|
|
|
|
|
onSelect: (status) {
|
|
|
|
|
_serviceReport.status = status;
|
|
|
|
|
_showCommentField = _serviceReport.status?.name == "Resolved";
|
|
|
|
|
setState(() {});
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
@ -328,6 +331,21 @@ class _CreateServiceReportState extends State<CreateServiceReport> with TickerPr
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
if (_showCommentField)
|
|
|
|
|
const SizedBox(
|
|
|
|
|
height: 8,
|
|
|
|
|
),
|
|
|
|
|
if (_showCommentField)
|
|
|
|
|
ATextFormField(
|
|
|
|
|
initialValue: _serviceReport?.comment,
|
|
|
|
|
hintText: _subtitle.comment,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
style: Theme.of(context).textTheme.titleMedium,
|
|
|
|
|
textInputType: TextInputType.multiline,
|
|
|
|
|
onSaved: (value) {
|
|
|
|
|
_serviceReport.comment = value;
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 8 * AppStyle.getScaleFactor(context),
|
|
|
|
|
),
|
|
|
|
|
@ -587,19 +605,6 @@ class _CreateServiceReportState extends State<CreateServiceReport> with TickerPr
|
|
|
|
|
_serviceReport.travelingExpense = int.tryParse(value) ?? 0;
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(
|
|
|
|
|
height: 8,
|
|
|
|
|
),
|
|
|
|
|
ATextFormField(
|
|
|
|
|
initialValue: _serviceReport?.comment,
|
|
|
|
|
hintText: _subtitle.comment,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
style: Theme.of(context).textTheme.titleMedium,
|
|
|
|
|
textInputType: TextInputType.multiline,
|
|
|
|
|
onSaved: (value) {
|
|
|
|
|
_serviceReport.comment = value;
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
const SizedBox(
|
|
|
|
|
height: 8,
|
|
|
|
|
|