update cargo type form from rate, update carton info and form
This commit is contained in:
@@ -56,7 +56,9 @@ class _CartonEditorState extends State<CartonEditor> {
|
||||
_isNew = false;
|
||||
|
||||
_consignee = User(
|
||||
id: _carton!.userID, fcsID: _carton!.fcsID, name: _carton!.userName);
|
||||
id: _carton!.consigneeID,
|
||||
fcsID: _carton!.consigneeFCSID,
|
||||
name: _carton!.consigneeName);
|
||||
_sender = User(
|
||||
id: _carton!.senderID,
|
||||
fcsID: _carton!.senderFCSID,
|
||||
@@ -129,7 +131,7 @@ class _CartonEditorState extends State<CartonEditor> {
|
||||
padding: const EdgeInsets.only(right: 5),
|
||||
child: InkResponse(
|
||||
radius: 30,
|
||||
onTap: () {
|
||||
onTap: () async {
|
||||
//for packages
|
||||
if (isFromPackages) {
|
||||
if (_sender == null) {
|
||||
@@ -149,20 +151,32 @@ class _CartonEditorState extends State<CartonEditor> {
|
||||
return;
|
||||
}
|
||||
|
||||
Navigator.push(
|
||||
Carton? carton = await Navigator.push(
|
||||
context,
|
||||
CupertinoPageRoute(
|
||||
builder: (context) => CartonPackageForm(
|
||||
sender: _sender!,
|
||||
consignee: _consignee!,
|
||||
)));
|
||||
|
||||
if (carton != null) {
|
||||
setState(() {
|
||||
_cartons.add(carton);
|
||||
});
|
||||
}
|
||||
}
|
||||
// for mix cartion
|
||||
else {
|
||||
Navigator.push(
|
||||
Carton? carton = await Navigator.push(
|
||||
context,
|
||||
CupertinoPageRoute(
|
||||
builder: (context) => const MixCartonForm()));
|
||||
|
||||
if (carton != null) {
|
||||
setState(() {
|
||||
_cartons.add(carton);
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
child: Icon(Icons.add_circle, color: primaryColor),
|
||||
|
||||
Reference in New Issue
Block a user