update shipment info

This commit is contained in:
tzw
2024-01-30 17:47:17 +06:30
parent 9d72fbf694
commit a902a7bce5
4 changed files with 65 additions and 70 deletions

View File

@@ -73,11 +73,6 @@ class _FcsShipmentInfoState extends State<FcsShipmentInfo> {
@override
Widget build(BuildContext context) {
// final shipmentNumberBox = DisplayText(
// text: _shipmentNumberController.text,
// labelTextKey: "FCSshipment.number",
// iconData: Ionicons.ios_airplane,
// );
final cutoffDateDBox = DisplayText(
text: _cutoffDateController.text,
labelTextKey: "FCSshipment.cutoff_date",
@@ -99,12 +94,6 @@ class _FcsShipmentInfoState extends State<FcsShipmentInfo> {
iconData: Octicons.package,
);
// final departureDateBox = DisplayText(
// text: _departureDateControler.text,
// labelTextKey: "FCSshipment.departure_date",
// iconData: Icons.date_range,
// );
final shipTypeBox = DisplayText(
text: _shipmentTypeControler.text,
labelTextKey: "FCSshipment.shipment_type",
@@ -132,19 +121,34 @@ class _FcsShipmentInfoState extends State<FcsShipmentInfo> {
final statusBox = DisplayText(
text: _statusController.text,
labelTextKey: "FCSshipment.status",
iconData: Ionicons.md_chevron_back_circle_outline,
iconData: Feather.clock,
);
final shipBtn = LocalButton(
textKey: "FCSshipment.ship.btn",
callBack: _ship,
final shipBtn = Padding(
padding: const EdgeInsets.symmetric(horizontal: 30),
child: LocalButton(
textKey: "FCSshipment.ship.btn",
callBack: _ship,
),
);
final cancelBtn = Padding(
padding: const EdgeInsets.symmetric(horizontal: 30),
child: LocalButton(
color: dangerColor,
textKey: "FCSshipment.cancel.btn",
callBack: () {
showConfirmDialog(context, "FCSshipment.cancel.confirm", () {});
},
),
);
return LocalProgress(
inAsyncCall: _isLoading,
child: Scaffold(
appBar: LocalAppBar(
titleWidget: Text(_shipmentNumberController.text,style:TextStyle(fontSize: 20,color: primaryColor)),
titleWidget: Text(_shipmentNumberController.text,
style: TextStyle(fontSize: 20, color: primaryColor)),
backgroundColor: Colors.white,
labelColor: primaryColor,
arrowColor: primaryColor,
@@ -156,60 +160,46 @@ class _FcsShipmentInfoState extends State<FcsShipmentInfo> {
//menuPopWidget(context)
],
),
// appBar: AppBar(
// centerTitle: true,
// leading: new IconButton(
// icon: new Icon(CupertinoIcons.back, color: primaryColor, size: 30),
// onPressed: () => Navigator.of(context).pop(),
// ),
// shadowColor: Colors.transparent,
// backgroundColor: Colors.white,
// title: LocalText(
// context,
// "FCSshipment.form.title",
// fontSize: 20,
// color: primaryColor,
// ),
// actions: [
// IconButton(
// icon: Icon(Icons.edit, color: primaryColor),
// onPressed: _edit,
// ),
// menuPopWidget(context)
// ],
// ),
body: Card(
elevation: 0,
child: Column(
children: <Widget>[
Expanded(
child: Padding(
padding: const EdgeInsets.all(10.0),
child: ListView(children: <Widget>[
//shipmentNumberBox,
statusBox,
Row(mainAxisAlignment: MainAxisAlignment.end,
children:[Expanded(child: cutoffDateDBox,flex: 2,),
Expanded(child: etaBox,),
]),
// departureDateBox,
Row(children: [ Expanded(child: cartonBox,flex: 2,),
Flexible(child: packageBox),],),
shipTypeBox,
consigneeBox,
portBox,
destinationBox,
_fcsShipment?.status == fcs_shipment_confirmed_status
? shipBtn
: Container(),
SizedBox(
height: 20,
)
]),
)),
],
child: Padding(
padding: const EdgeInsets.all(10.0),
child: ListView(children: <Widget>[
statusBox,
Row(mainAxisAlignment: MainAxisAlignment.end, children: [
Expanded(
child: cutoffDateDBox,
flex: 2,
),
Flexible(
child: etaBox,
),
]),
Row(
children: [
Expanded(
child: cartonBox,
flex: 2,
),
Flexible(child: packageBox),
],
),
shipTypeBox,
consigneeBox,
portBox,
destinationBox,
const SizedBox(height: 30),
_fcsShipment?.status == fcs_shipment_confirmed_status
? shipBtn
: Container(),
_fcsShipment?.status == fcs_shipment_confirmed_status
? Container(
padding: EdgeInsets.only(top: 3), child: cancelBtn)
: Container(),
SizedBox(
height: 20,
)
]),
),
),
),