|
|
|
@ -73,6 +73,7 @@ class _MyRequestsPageState extends State<MyRequestsPage> {
|
|
|
|
final result = await Navigator.push(context, MaterialPageRoute(builder: (context) => AllRequestsSearchPage(data: _search)));
|
|
|
|
final result = await Navigator.push(context, MaterialPageRoute(builder: (context) => AllRequestsSearchPage(data: _search)));
|
|
|
|
if (result != null) {
|
|
|
|
if (result != null) {
|
|
|
|
_search = result;
|
|
|
|
_search = result;
|
|
|
|
|
|
|
|
setState(() {});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}).expanded,
|
|
|
|
}).expanded,
|
|
|
|
16.width,
|
|
|
|
16.width,
|
|
|
|
@ -83,6 +84,7 @@ class _MyRequestsPageState extends State<MyRequestsPage> {
|
|
|
|
final result = await Navigator.push(context, MaterialPageRoute(builder: (context) => AllRequestsFilterPage(data: _search)));
|
|
|
|
final result = await Navigator.push(context, MaterialPageRoute(builder: (context) => AllRequestsFilterPage(data: _search)));
|
|
|
|
if (result != null) {
|
|
|
|
if (result != null) {
|
|
|
|
_search = result;
|
|
|
|
_search = result;
|
|
|
|
|
|
|
|
setState(() {});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
@ -90,6 +92,7 @@ class _MyRequestsPageState extends State<MyRequestsPage> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
body: Column(
|
|
|
|
body: Column(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
|
|
|
|
if (_filterIsEmpty())
|
|
|
|
SizedBox(
|
|
|
|
SizedBox(
|
|
|
|
height: 34 + 16.0,
|
|
|
|
height: 34 + 16.0,
|
|
|
|
child: ListView.separated(
|
|
|
|
child: ListView.separated(
|
|
|
|
@ -131,4 +134,19 @@ class _MyRequestsPageState extends State<MyRequestsPage> {
|
|
|
|
],
|
|
|
|
],
|
|
|
|
));
|
|
|
|
));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool _filterIsEmpty() {
|
|
|
|
|
|
|
|
if (_search == null) return true;
|
|
|
|
|
|
|
|
if ((_search.requestNumber?.value?.isNotEmpty ?? false) ||
|
|
|
|
|
|
|
|
(_search.assetNo?.value?.isNotEmpty ?? false) ||
|
|
|
|
|
|
|
|
(_search.assetName?.value?.isNotEmpty ?? false) ||
|
|
|
|
|
|
|
|
(_search.manufacture?.value?.isNotEmpty ?? false) ||
|
|
|
|
|
|
|
|
(_search.sn?.value?.isNotEmpty ?? false) ||
|
|
|
|
|
|
|
|
(_search.statuses?.isNotEmpty ?? false) ||
|
|
|
|
|
|
|
|
(_search.startDate != null) ||
|
|
|
|
|
|
|
|
(_search.endDate != null)) {
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|