mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-13 18:48:57 +03:30
fix bugs!
This commit is contained in:
@@ -33,6 +33,7 @@ class _ItemAddScreenState extends State<ItemAddScreen> {
|
|||||||
final batchId = randomString(10);
|
final batchId = randomString(10);
|
||||||
|
|
||||||
int curLabelVal = 1;
|
int curLabelVal = 1;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
descriptionCTRL.text = '';
|
descriptionCTRL.text = '';
|
||||||
@@ -43,7 +44,8 @@ class _ItemAddScreenState extends State<ItemAddScreen> {
|
|||||||
super.initState();
|
super.initState();
|
||||||
}
|
}
|
||||||
|
|
||||||
void _saveForm(String name, String size, String specific, String udi,String description) {
|
void _saveForm(String name, String size, String specific, String udi,
|
||||||
|
String description) {
|
||||||
setState(() {
|
setState(() {
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
});
|
});
|
||||||
@@ -78,8 +80,23 @@ class _ItemAddScreenState extends State<ItemAddScreen> {
|
|||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
).then((value) => Navigator.of(context)
|
).then((value) =>
|
||||||
.popAndPushNamed(Routes.itemResultScreen));
|
Navigator.of(context).popAndPushNamed(Routes.itemResultScreen));
|
||||||
|
} else if (result == 'error') {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (ctx) => AlertDialog(
|
||||||
|
content: Text('error.'),
|
||||||
|
actions: <Widget>[
|
||||||
|
TextButton(
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.of(ctx).pop();
|
||||||
|
},
|
||||||
|
child: Text('Ok'),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@@ -129,7 +146,12 @@ class _ItemAddScreenState extends State<ItemAddScreen> {
|
|||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
titleSpacing: -10,
|
titleSpacing: -10,
|
||||||
title: Text('Items', style: TextStyle(color: Colors.white,),),
|
title: Text(
|
||||||
|
'Items',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
backgroundColor: Colors.black,
|
backgroundColor: Colors.black,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
|
|||||||
@@ -239,7 +239,24 @@ class ItemProvider extends ChangeNotifier {
|
|||||||
items = [];
|
items = [];
|
||||||
searchBoxValue = value;
|
searchBoxValue = value;
|
||||||
originalItems!.forEach((result) {
|
originalItems!.forEach((result) {
|
||||||
if (result.udi.toString().contains(searchBoxValue)) {
|
if (
|
||||||
|
result.udi
|
||||||
|
.toString()
|
||||||
|
.toLowerCase()
|
||||||
|
.contains(searchBoxValue.toLowerCase()) ||
|
||||||
|
result.udi
|
||||||
|
.toString()
|
||||||
|
.toUpperCase()
|
||||||
|
.contains(searchBoxValue.toUpperCase()) ||
|
||||||
|
result.udi
|
||||||
|
.toString()
|
||||||
|
.toLowerCase()
|
||||||
|
.contains(searchBoxValue.toUpperCase()) ||
|
||||||
|
result.udi
|
||||||
|
.toString()
|
||||||
|
.toUpperCase()
|
||||||
|
.contains(searchBoxValue.toLowerCase())
|
||||||
|
) {
|
||||||
items!.add(result);
|
items!.add(result);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -289,7 +306,7 @@ class ItemProvider extends ChangeNotifier {
|
|||||||
userName: item['user'] != null ? item['user']['name'] : '',
|
userName: item['user'] != null ? item['user']['name'] : '',
|
||||||
status: item['status'],
|
status: item['status'],
|
||||||
udi: item['udi'],
|
udi: item['udi'],
|
||||||
packageId: item['package_id'],
|
packageId: item['package_id'].toString(),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -247,7 +247,24 @@ class PackageProvider extends ChangeNotifier {
|
|||||||
items = [];
|
items = [];
|
||||||
searchBoxValue = value;
|
searchBoxValue = value;
|
||||||
originalItems!.forEach((result) {
|
originalItems!.forEach((result) {
|
||||||
if (result.id.toString().contains(searchBoxValue)) {
|
if (
|
||||||
|
result.id
|
||||||
|
.toString()
|
||||||
|
.toLowerCase()
|
||||||
|
.contains(searchBoxValue.toLowerCase()) ||
|
||||||
|
result.id
|
||||||
|
.toString()
|
||||||
|
.toUpperCase()
|
||||||
|
.contains(searchBoxValue.toUpperCase()) ||
|
||||||
|
result.id
|
||||||
|
.toString()
|
||||||
|
.toLowerCase()
|
||||||
|
.contains(searchBoxValue.toUpperCase()) ||
|
||||||
|
result.id
|
||||||
|
.toString()
|
||||||
|
.toUpperCase()
|
||||||
|
.contains(searchBoxValue.toLowerCase())
|
||||||
|
) {
|
||||||
items!.add(result);
|
items!.add(result);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -88,8 +88,10 @@ class TestResultsProvider with ChangeNotifier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int pageNumber = 1;
|
int pageNumber = 1;
|
||||||
|
|
||||||
void resetPageNumber() => pageNumber = 1;
|
void resetPageNumber() => pageNumber = 1;
|
||||||
bool isloading = false;
|
bool isloading = false;
|
||||||
|
|
||||||
void resetLoading() {
|
void resetLoading() {
|
||||||
isloading = false;
|
isloading = false;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
@@ -109,7 +111,24 @@ class TestResultsProvider with ChangeNotifier {
|
|||||||
items = [];
|
items = [];
|
||||||
searchBoxValue = value;
|
searchBoxValue = value;
|
||||||
originalItems!.forEach((result) {
|
originalItems!.forEach((result) {
|
||||||
if (result.name.toString().contains(searchBoxValue)) {
|
if (
|
||||||
|
result.name
|
||||||
|
.toString()
|
||||||
|
.toLowerCase()
|
||||||
|
.contains(searchBoxValue.toLowerCase()) ||
|
||||||
|
result.name
|
||||||
|
.toString()
|
||||||
|
.toUpperCase()
|
||||||
|
.contains(searchBoxValue.toUpperCase()) ||
|
||||||
|
result.name
|
||||||
|
.toString()
|
||||||
|
.toLowerCase()
|
||||||
|
.contains(searchBoxValue.toUpperCase()) ||
|
||||||
|
result.name
|
||||||
|
.toString()
|
||||||
|
.toUpperCase()
|
||||||
|
.contains(searchBoxValue.toLowerCase())
|
||||||
|
) {
|
||||||
items!.add(result);
|
items!.add(result);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ class ItemItemBox extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
width: 33 * _deviceBlockSize,
|
width: 50 * _deviceBlockSize,
|
||||||
child: Row(
|
child: Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Text(
|
Text(
|
||||||
|
|||||||
Reference in New Issue
Block a user