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

@@ -339,8 +339,10 @@
"FCSshipment.cargo_manifest":"Download cargo manifest",
"FCSshipment.create":"Create new shipment",
"FCSshipment.update":"Update shipment",
"FCSshipment.ship.btn":"Ship",
"FCSshipment.ship.btn":"Ship this shipment",
"FCSshipment.ship.confirm":"Confirm ship?",
"FCSshipment.cancel.btn":"Cancel this shipment",
"FCSshipment.cancel.confirm":"Cancel this shipment?",
"FCSshipment.popupmenu.all":"All shipments",
"FCSshipment.popupmenu.active":"Active shipments",
"FCSshipment.popupmenu.shipped":"Shipped shipments",

View File

@@ -338,8 +338,10 @@
"FCSshipment.cargo_manifest":"ကုန်ပစ္စည်းကိုဒေါင်းမည်",
"FCSshipment.create":"တင်ပို့ခြင်းအသစ်ပြုလုပ်မည်",
"FCSshipment.update":"တင်ပို့ခြင်းပြုပြင်မည်",
"FCSshipment.ship.btn":"Ship",
"FCSshipment.ship.btn":"Ship this shipment",
"FCSshipment.ship.confirm":"Confirm ship?",
"FCSshipment.cancel.btn":"Cancel this shipment",
"FCSshipment.cancel.confirm":"Cancel this shipment?",
"FCSshipment.popupmenu.all":"All shipments",
"FCSshipment.popupmenu.active":"Active shipments",
"FCSshipment.popupmenu.shipped":"Shipped shipments",

View File

@@ -8,6 +8,7 @@ const buttonColor = const Color(0xFFFFFFFF);
const buttonBkColor = const Color(0xFF268944);
const labelColor = const Color(0xFF757575);
var dividerColor = Colors.grey.shade400;
const dangerColor= const Color(0xffff0606);
const TextStyle labelStyle =
TextStyle(fontSize: 20, color: labelColor, fontWeight: FontWeight.w500);

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(
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,),
Row(mainAxisAlignment: MainAxisAlignment.end, children: [
Expanded(
child: cutoffDateDBox,
flex: 2,
),
Flexible(
child: etaBox,
),
]),
// departureDateBox,
Row(children: [ Expanded(child: cartonBox,flex: 2,),
Flexible(child: packageBox),],),
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,
)
]),
)),
],
),
),
),