mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-12 12:08:55 +03:30
1.7.0
This commit is contained in:
+15
-11
@@ -13,14 +13,14 @@ class Inputs with ChangeNotifier {
|
||||
String name = "",
|
||||
String uniqueCode = "",
|
||||
String testTypeId = ""}) async {
|
||||
print(
|
||||
{
|
||||
'test_type_id': testTypeId,
|
||||
'test_result_id': testResultId,
|
||||
'name': name,
|
||||
'unique_code': uniqueCode,
|
||||
},
|
||||
);
|
||||
// print(
|
||||
// {
|
||||
// 'test_type_id': testTypeId,
|
||||
// 'test_result_id': testResultId,
|
||||
// 'name': name,
|
||||
// 'unique_code': uniqueCode,
|
||||
// },
|
||||
// );
|
||||
var response = await http.post(
|
||||
Url.getInputs,
|
||||
body: {
|
||||
@@ -41,8 +41,10 @@ class Inputs with ChangeNotifier {
|
||||
}
|
||||
final responseData = json.decode(response.body);
|
||||
|
||||
// print(responseData);
|
||||
|
||||
// print(responseData['data']['inputs']);
|
||||
// for (var item in responseData['data']['testType'].keys) {
|
||||
// print(item);
|
||||
// }
|
||||
Map<String, dynamic> values;
|
||||
if (testResultId.isNotEmpty) {
|
||||
response = await http.get(Url.testResultFormValues(testResultId),
|
||||
@@ -72,11 +74,12 @@ class Inputs with ChangeNotifier {
|
||||
'value': general['id']
|
||||
});
|
||||
|
||||
// print(responseData['data']['inputs']);
|
||||
inputItems.add({
|
||||
'type': 'Text',
|
||||
'key': 'device_id',
|
||||
'name': general['device_label'],
|
||||
'value': deviceLabel
|
||||
'value': deviceLabel,
|
||||
});
|
||||
inputItems.add(
|
||||
{'type': 'Date', 'key': 'date', 'name': 'date', 'value': dateTime});
|
||||
@@ -86,6 +89,7 @@ class Inputs with ChangeNotifier {
|
||||
setValues(inputs, values);
|
||||
for (var input in inputs) {
|
||||
inputItems.add(input as Map<String, dynamic>);
|
||||
// print(input);
|
||||
}
|
||||
inputItems.add({
|
||||
'type': 'Image',
|
||||
|
||||
Reference in New Issue
Block a user