mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-13 01:58:56 +03:30
Fix get test result inputs changes
This commit is contained in:
@@ -11,18 +11,10 @@ class Inputs with ChangeNotifier {
|
||||
|
||||
Future<bool> getInputs({
|
||||
required String testResultId,
|
||||
required String name,
|
||||
required String uniqueCode,
|
||||
required String testTypeId,
|
||||
}) async {
|
||||
var response = await http.post(
|
||||
Uri.parse(Url.getInputs),
|
||||
body: {
|
||||
'test_type_id': testTypeId,
|
||||
'test_result_id': testResultId,
|
||||
'name': name,
|
||||
'unique_code': uniqueCode,
|
||||
},
|
||||
var response = await http.get(
|
||||
Uri.parse("${Url.getInputs}/$testTypeId"),
|
||||
headers: {
|
||||
'Authorization': User.token,
|
||||
'X-Requested-With': 'XMLHttpRequest',
|
||||
|
||||
@@ -15,12 +15,13 @@ import 'package:random_string/random_string.dart';
|
||||
class TestResultsProvider with ChangeNotifier {
|
||||
List<PlatformFile> catchImages = [];
|
||||
List<Uint8List> images = [];
|
||||
String testType = '';
|
||||
String testTypeId = '';
|
||||
String testCode = '';
|
||||
List<Map<String, String>> testTypeMap = [];
|
||||
|
||||
resetTests() {
|
||||
testCode = '';
|
||||
testType = '';
|
||||
testTypeId = '';
|
||||
}
|
||||
|
||||
setImages() async {
|
||||
@@ -208,9 +209,10 @@ class TestResultsProvider with ChangeNotifier {
|
||||
result.add(hospitals);
|
||||
for (var testType in filterDatas['data']['TestTypes']) {
|
||||
testTypes.addAll({testType['name']: testType['id'].toString()});
|
||||
testTypeMap.add(testTypes);
|
||||
}
|
||||
result.add(testTypes);
|
||||
|
||||
print("test type : ${testTypeMap}");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user