mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-13 09:58:55 +03:30
Other Changes
This commit is contained in:
@@ -30,7 +30,7 @@ class PackageProvider extends ChangeNotifier {
|
||||
addItemVal() {
|
||||
curItemVal += 1;
|
||||
TextEditingController lbl = new TextEditingController();
|
||||
lbl.text = initialItemValue;
|
||||
lbl.text = '';
|
||||
itemValues.add(lbl);
|
||||
notifyListeners();
|
||||
}
|
||||
@@ -43,11 +43,18 @@ class PackageProvider extends ChangeNotifier {
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
// var isDuplicateItem = false;
|
||||
changeItemVal(String value, int index) {
|
||||
for (var item in filteredItems!) {
|
||||
if (item.udi_name == value) {
|
||||
itemValues[index].text = item.id;
|
||||
}
|
||||
// if(itemValues.length > 1 && value != itemValues[index-1].text){
|
||||
if (item.udi_name == value) {
|
||||
itemValues[index].text = item.id;
|
||||
}
|
||||
// }else {
|
||||
// // isDuplicateItem = true;
|
||||
// print("it is a problem!!!!!!!!!!");
|
||||
// }
|
||||
|
||||
}
|
||||
notifyListeners();
|
||||
}
|
||||
@@ -174,7 +181,7 @@ class PackageProvider extends ChangeNotifier {
|
||||
itemVals = result;
|
||||
initialItemValue = itemVals[0];
|
||||
TextEditingController newLbl = new TextEditingController();
|
||||
newLbl.text = initialItemValue;
|
||||
newLbl.text = "";
|
||||
itemValues.add(newLbl);
|
||||
notifyListeners();
|
||||
return result;
|
||||
|
||||
@@ -102,6 +102,39 @@ class TestResultsProvider with ChangeNotifier {
|
||||
// notifyListeners();
|
||||
}
|
||||
|
||||
// bool isChangeVerify = false;
|
||||
// List<String> newVal = [];
|
||||
// Future<void> setChangeVerify (String id, String value) async {
|
||||
// // if(await changeVerification(id , value) == true){
|
||||
// // isChangeVerify = true;
|
||||
// //
|
||||
// // // for(var testStatus in testResultData['data']['verified']){
|
||||
// // // var iii = 0;
|
||||
// // // newVal.add(testStatus.toString());
|
||||
// // // print("i is : $iii $testStatus.");
|
||||
// // // iii +1;
|
||||
// // // }
|
||||
// // getTestResults();
|
||||
// // for(var item in items!)
|
||||
// // newVal.add(item.verified);
|
||||
// // notifyListeners();
|
||||
// // }
|
||||
// }
|
||||
// void reSetChangeVerify (){
|
||||
// isChangeVerify = false;
|
||||
// }
|
||||
|
||||
bool isloadingButton = false;
|
||||
void resetLoadingButton() {
|
||||
isloadingButton = false;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
void setLoadingButton() {
|
||||
isloadingButton = true;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
TestResultFilterObject get filters {
|
||||
return _filters;
|
||||
}
|
||||
@@ -217,7 +250,7 @@ class TestResultsProvider with ChangeNotifier {
|
||||
'Authorization': User.token,
|
||||
},
|
||||
);
|
||||
|
||||
print(response.body);
|
||||
var testResultData = json.decode(response.body);
|
||||
if (pageNumber == 1) {
|
||||
originalItems = [];
|
||||
@@ -228,7 +261,7 @@ class TestResultsProvider with ChangeNotifier {
|
||||
TestResultObject(
|
||||
id: item['id'].toString(),
|
||||
name: item['test_type'] != null ? item['test_type']['name'] : '',
|
||||
deviceId: item['device_id'].toString(),
|
||||
deviceId: item['device_id'] != null ? item['device_id'].toString() : '',
|
||||
result: item['result'] == 'Accept' ? 'Accepted' : 'Not Accepted',
|
||||
date: item['created_at'].toString().substring(0, 10),
|
||||
hospital: item['user']['medical_center']['name'],
|
||||
|
||||
Reference in New Issue
Block a user