mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-10 19:38:56 +03:30
Fix some issue
This commit is contained in:
@@ -112,6 +112,12 @@ class AddLabelBox extends StatelessWidget {
|
||||
const EdgeInsets.symmetric(horizontal: 0),
|
||||
child: TextFormField(
|
||||
controller: values,
|
||||
validator: (val) {
|
||||
if (val!.isEmpty) {
|
||||
return 'Label required!';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
decoration: InputDecoration(
|
||||
contentPadding: EdgeInsets.only(
|
||||
bottom: 12,
|
||||
|
||||
@@ -49,23 +49,6 @@ class CycleAddSaveButton extends StatelessWidget {
|
||||
descriptionCTRL.text,
|
||||
striizerIdCTRL.text,
|
||||
);
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
content: Text('Cycle added.'),
|
||||
actions: <Widget>[
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Navigator.of(ctx).pop();
|
||||
},
|
||||
child: Text('Ok'),
|
||||
)
|
||||
],
|
||||
),
|
||||
).then((_) {
|
||||
Navigator.of(context)
|
||||
.pushReplacementNamed(Routes.cycleResultScreen);
|
||||
});
|
||||
Navigator.of(context).pushReplacementNamed(Routes.cycleResultScreen);
|
||||
Fluttertoast.showToast(
|
||||
msg: "Cycle added.",
|
||||
|
||||
@@ -109,6 +109,12 @@ class AddPackageBox extends StatelessWidget {
|
||||
const EdgeInsets.symmetric(horizontal: 0),
|
||||
child: TextFormField(
|
||||
controller: values,
|
||||
validator: (val) {
|
||||
if (val!.isEmpty) {
|
||||
return 'Package required!';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
decoration: InputDecoration(
|
||||
contentPadding: EdgeInsets.only(
|
||||
bottom: 12,
|
||||
|
||||
@@ -39,10 +39,9 @@ class LabelAddSaveButton extends StatelessWidget {
|
||||
if (!_form.currentState!.validate()) {
|
||||
return;
|
||||
}
|
||||
List<String> packages = [];
|
||||
for (TextEditingController package in packageValue) {
|
||||
packages.add(package.text);
|
||||
}
|
||||
int packageId;
|
||||
var pacagecValues = packageValue[0].text.split(" ");
|
||||
packageId = int.parse(pacagecValues[0]);
|
||||
await Provider.of<LabelsProvider>(context, listen: false)
|
||||
.createLabelResult(
|
||||
lotNumberCTRL.text,
|
||||
@@ -50,7 +49,7 @@ class LabelAddSaveButton extends StatelessWidget {
|
||||
sDateCTRL.text,
|
||||
// sDateValue,
|
||||
// {'id': packageValue[0], 'name': packageValue[1]},
|
||||
packages[0],
|
||||
packageId,
|
||||
eDateCTRL.text,
|
||||
// eDateValue,
|
||||
striizerIdCTRL.text,
|
||||
|
||||
Reference in New Issue
Block a user