update carton filter and merge api for shipment
This commit is contained in:
@@ -59,7 +59,7 @@ class _FcsShipmentInfoState extends State<FcsShipmentInfo> {
|
||||
if (_fcsShipment?.departureDate != null)
|
||||
_departureDateControler.text =
|
||||
dateFormatter.format(_fcsShipment!.departureDate!);
|
||||
_shipmentTypeControler.text = _fcsShipment!.shipType ?? "";
|
||||
_shipmentTypeControler.text = _fcsShipment!.shipTypeName ?? "";
|
||||
_consigneeController.text = _fcsShipment!.consignee ?? "";
|
||||
_portController.text = _fcsShipment!.port ?? "";
|
||||
_destinationController.text = _fcsShipment!.destination ?? "";
|
||||
@@ -148,7 +148,7 @@ class _FcsShipmentInfoState extends State<FcsShipmentInfo> {
|
||||
final invoiceBtn = Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 30),
|
||||
child: LocalButton(
|
||||
textKey: "FCSshipment.invoice.btn",
|
||||
textKey: "FCSshipment.invoiced.btn",
|
||||
callBack: _invoice,
|
||||
),
|
||||
);
|
||||
@@ -194,19 +194,17 @@ class _FcsShipmentInfoState extends State<FcsShipmentInfo> {
|
||||
Row(mainAxisAlignment: MainAxisAlignment.end, children: [
|
||||
Expanded(
|
||||
child: cutoffDateDBox,
|
||||
flex: 2,
|
||||
),
|
||||
Flexible(
|
||||
child: etaBox,
|
||||
// flex: 2,
|
||||
),
|
||||
Flexible(child: etaBox),
|
||||
]),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: cartonBox,
|
||||
flex: 2,
|
||||
// flex: 2,
|
||||
),
|
||||
Flexible(child: packageBox),
|
||||
Flexible(child: packageBox)
|
||||
],
|
||||
),
|
||||
shipTypeBox,
|
||||
@@ -296,9 +294,7 @@ class _FcsShipmentInfoState extends State<FcsShipmentInfo> {
|
||||
_isLoading = true;
|
||||
});
|
||||
try {
|
||||
FcsShipmentModel fcsShipmentModel =
|
||||
Provider.of<FcsShipmentModel>(context, listen: false);
|
||||
await fcsShipmentModel.process(_fcsShipment!.id!);
|
||||
await context.read<FcsShipmentModel>().process(_fcsShipment!.id!);
|
||||
Navigator.pop(context, true);
|
||||
} catch (e) {
|
||||
showMsgDialog(context, "Error", e.toString());
|
||||
@@ -320,9 +316,7 @@ class _FcsShipmentInfoState extends State<FcsShipmentInfo> {
|
||||
_isLoading = true;
|
||||
});
|
||||
try {
|
||||
FcsShipmentModel fcsShipmentModel =
|
||||
Provider.of<FcsShipmentModel>(context, listen: false);
|
||||
await fcsShipmentModel.ship(_fcsShipment!.id!);
|
||||
await context.read<FcsShipmentModel>().ship(_fcsShipment!.id!);
|
||||
Navigator.pop(context, true);
|
||||
} catch (e) {
|
||||
showMsgDialog(context, "Error", e.toString());
|
||||
@@ -344,9 +338,7 @@ class _FcsShipmentInfoState extends State<FcsShipmentInfo> {
|
||||
_isLoading = true;
|
||||
});
|
||||
try {
|
||||
FcsShipmentModel fcsShipmentModel =
|
||||
Provider.of<FcsShipmentModel>(context, listen: false);
|
||||
await fcsShipmentModel.arrive(_fcsShipment!.id!);
|
||||
await context.read<FcsShipmentModel>().arrive(_fcsShipment!.id!);
|
||||
Navigator.pop(context, true);
|
||||
} catch (e) {
|
||||
showMsgDialog(context, "Error", e.toString());
|
||||
@@ -368,9 +360,7 @@ class _FcsShipmentInfoState extends State<FcsShipmentInfo> {
|
||||
_isLoading = true;
|
||||
});
|
||||
try {
|
||||
FcsShipmentModel fcsShipmentModel =
|
||||
Provider.of<FcsShipmentModel>(context, listen: false);
|
||||
await fcsShipmentModel.invoice(_fcsShipment!.id!);
|
||||
await context.read<FcsShipmentModel>().invoice(_fcsShipment!.id!);
|
||||
Navigator.pop(context, true);
|
||||
} catch (e) {
|
||||
showMsgDialog(context, "Error", e.toString());
|
||||
@@ -386,9 +376,7 @@ class _FcsShipmentInfoState extends State<FcsShipmentInfo> {
|
||||
_isLoading = true;
|
||||
});
|
||||
try {
|
||||
FcsShipmentModel fcsShipmentModel =
|
||||
Provider.of<FcsShipmentModel>(context, listen: false);
|
||||
await fcsShipmentModel.cancel(_fcsShipment!.id!);
|
||||
await context.read<FcsShipmentModel>().cancel(_fcsShipment!.id!);
|
||||
Navigator.pop(context, true);
|
||||
} catch (e) {
|
||||
showMsgDialog(context, "Error", e.toString());
|
||||
|
||||
Reference in New Issue
Block a user