update carton form and add recent search
This commit is contained in:
@@ -151,6 +151,7 @@ class _CargoWidgetState extends State<CargoWidget> {
|
||||
);
|
||||
|
||||
final userRow = Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(child: senderBox, flex: 2),
|
||||
Flexible(child: consigneeBox)
|
||||
@@ -265,7 +266,7 @@ class _CargoWidgetState extends State<CargoWidget> {
|
||||
_surchargeControllers.clear();
|
||||
_surchareItems.asMap().entries.forEach((e) {
|
||||
var editor = new TextEditingController();
|
||||
editor.text = e.value.qty == 0 ? "" : e.value.qty.toString();
|
||||
editor.text = e.value.qty.toString();
|
||||
_surchargeControllers.add(editor);
|
||||
});
|
||||
|
||||
@@ -314,6 +315,12 @@ class _CargoWidgetState extends State<CargoWidget> {
|
||||
final continueBtn = ContinueButton(
|
||||
onTap: () {
|
||||
if (widget.onContinue != null) {
|
||||
|
||||
if(_surchareItems.isNotEmpty && _surchareItems.any((item)=> item.qty == 0)){
|
||||
showMsgDialog(context, "Error", "Please insert surcharge item quantity");
|
||||
return;
|
||||
}
|
||||
|
||||
widget.onContinue!(_cargoTypes, _surchareItems);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user