improvement

merge-requests/31/head
Sikander Saleem 2 years ago
parent b4aac2a8b8
commit 79d987d49e

@ -194,6 +194,7 @@ class _CreateServiceReportState extends State<CreateServiceReport> with TickerPr
]),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Report type and Reasons
Row(
@ -453,6 +454,7 @@ class _CreateServiceReportState extends State<CreateServiceReport> with TickerPr
),
],
),
const SizedBox(height: 8),
ASubTitle(_subtitle.workingHours),
const SizedBox(height: 4),
ATextFormField(
@ -498,80 +500,9 @@ class _CreateServiceReportState extends State<CreateServiceReport> 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<ServiceReportLastCallsProvider>(context).isLoading == null
// ? const SizedBox.shrink():
// Call's last Situation
Consumer<ServiceReportLastCallsProvider>(
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<CreateServiceReport> 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()

Loading…
Cancel
Save