add FCS UI
This commit is contained in:
@@ -59,6 +59,9 @@ class _FcsShipmentEditorState extends State<FcsShipmentEditor> {
|
||||
_consigneeController.text = _shipment.consignee;
|
||||
_portController.text = _shipment.port;
|
||||
_destinationController.text = _shipment.destination;
|
||||
}else{
|
||||
var mainModel = Provider.of<MainModel>(context,listen: false);
|
||||
_currentShipmentType =mainModel.setting.shipmentTypes[0];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,11 +116,11 @@ class _FcsShipmentEditorState extends State<FcsShipmentEditor> {
|
||||
iconData: Icons.date_range,
|
||||
controller: _cutoffDateController,
|
||||
),
|
||||
InputDate(
|
||||
labelTextKey: "FCSshipment.departure_date",
|
||||
iconData: Icons.date_range,
|
||||
controller: _departureDateControler,
|
||||
),
|
||||
// InputDate(
|
||||
// labelTextKey: "FCSshipment.departure_date",
|
||||
// iconData: Icons.date_range,
|
||||
// controller: _departureDateControler,
|
||||
// ),
|
||||
InputDate(
|
||||
labelTextKey: "FCSshipment.ETA",
|
||||
iconData: Icons.date_range,
|
||||
@@ -184,13 +187,13 @@ class _FcsShipmentEditorState extends State<FcsShipmentEditor> {
|
||||
try {
|
||||
var cutoffDate = _cutoffDateController.text;
|
||||
var arrivalDate = _arrivalDateController.text;
|
||||
var depDate = _departureDateControler.text;
|
||||
// var depDate = _departureDateControler.text;
|
||||
fcsShipment.cutoffDate =
|
||||
cutoffDate == "" ? null : dateFormatter.parse(cutoffDate);
|
||||
fcsShipment.arrivalDate =
|
||||
arrivalDate == "" ? null : dateFormatter.parse(arrivalDate);
|
||||
fcsShipment.departureDate =
|
||||
depDate == "" ? null : dateFormatter.parse(depDate);
|
||||
// fcsShipment.departureDate =
|
||||
// depDate == "" ? null : dateFormatter.parse(depDate);
|
||||
} catch (e) {
|
||||
showMsgDialog(context, "Error", e.toString()); // shold never happen
|
||||
}
|
||||
@@ -214,10 +217,10 @@ class _FcsShipmentEditorState extends State<FcsShipmentEditor> {
|
||||
await showMsgDialog(context, "Error", "Invalid ETA date!");
|
||||
return false;
|
||||
}
|
||||
if (fcsShipment.departureDate == null) {
|
||||
await showMsgDialog(context, "Error", "Invalid departure date!");
|
||||
return false;
|
||||
}
|
||||
// if (fcsShipment.departureDate == null) {
|
||||
// await showMsgDialog(context, "Error", "Invalid departure date!");
|
||||
// return false;
|
||||
// }
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@ class _FcsShipmentInfoState extends State<FcsShipmentInfo> {
|
||||
child: ListView(children: <Widget>[
|
||||
shipmentNumberBox,
|
||||
cutoffDateDBox,
|
||||
departureDateBox,
|
||||
// departureDateBox,
|
||||
etaBox,
|
||||
shipTypeBox,
|
||||
consigneeBox,
|
||||
|
||||
Reference in New Issue
Block a user