mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-12 07:08:55 +03:30
Fix some issue
This commit is contained in:
@@ -110,10 +110,11 @@ class CyclesProvider extends ChangeNotifier {
|
||||
result.add(label['id'].toString());
|
||||
// print(hospital['name']);
|
||||
}
|
||||
if (result.isEmpty) result.add("");
|
||||
labelVals = result;
|
||||
initialLabelValue = labelVals[0];
|
||||
TextEditingController newLbl = new TextEditingController();
|
||||
newLbl.text = initialLabelValue;
|
||||
newLbl.text = "";
|
||||
labelValues.add(newLbl);
|
||||
notifyListeners();
|
||||
return result;
|
||||
|
||||
@@ -103,16 +103,17 @@ class LabelsProvider extends ChangeNotifier {
|
||||
// "${package['name']} - ${package['package_id'] != null ? package['package_id'] : ''}");
|
||||
result.add("${package['id'].toString()} - ${package['name'].toString()}");
|
||||
}
|
||||
if (result.isEmpty) result.add("");
|
||||
packageVals = result;
|
||||
initialPackageValue = packageId ?? packageVals[0];
|
||||
TextEditingController newLbl = new TextEditingController();
|
||||
newLbl.text = initialPackageValue;
|
||||
newLbl.text = "";
|
||||
packageValues.add(newLbl);
|
||||
notifyListeners();
|
||||
return result;
|
||||
}
|
||||
|
||||
Future<void> createLabelResult(lotNumber, cycleNumber, sterileDate, packages,
|
||||
Future<void> createLabelResult(lotNumber, cycleNumber, sterileDate, packageId,
|
||||
expireDate, sterilizerId) async {
|
||||
// List<Map<String, Object>> pkgs = [];
|
||||
// for (var package in packages) {
|
||||
@@ -126,7 +127,7 @@ class LabelsProvider extends ChangeNotifier {
|
||||
'sterilizer_id': sterilizerId,
|
||||
'cycle_number': cycleNumber,
|
||||
'lot_number': lotNumber,
|
||||
'package_id': packages,
|
||||
'package_id': packageId,
|
||||
},
|
||||
),
|
||||
headers: {
|
||||
@@ -268,8 +269,8 @@ class LabelsProvider extends ChangeNotifier {
|
||||
LabelResultObject(
|
||||
expireDate: item['expire_date'],
|
||||
id: item['id'].toString(),
|
||||
package: item['package']['name'],
|
||||
packageId: item['package']['id'].toString(),
|
||||
package: item['package'] != null ? item['package']['name'].toString() : ' ',
|
||||
packageId: item['package'] != null ? item['package']['id'].toString() : ' ',
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -303,8 +304,8 @@ class LabelsProvider extends ChangeNotifier {
|
||||
print(data);
|
||||
result = LabelDetailsObject(
|
||||
id: data['id'].toString(),
|
||||
package: data['package']['name'] != null ? data['package']['name'] : '',
|
||||
packageId: data['package']['id'].toString() != 'null'
|
||||
package: data['package'] != null ? data['package']['name'] : '',
|
||||
packageId: data['package'] != null
|
||||
? data['package']['id'].toString()
|
||||
: '',
|
||||
hospitalName: data['user']['medical_center']['name'],
|
||||
|
||||
Reference in New Issue
Block a user