add buttons in shipment info page

This commit is contained in:
sma
2024-01-31 16:20:59 +06:30
parent 00f76c0341
commit 1dcc641352
6 changed files with 66 additions and 16 deletions

View File

@@ -131,6 +131,27 @@ class _FcsShipmentInfoState extends State<FcsShipmentInfo> {
callBack: _ship,
),
);
final processBtn = Padding(
padding: const EdgeInsets.symmetric(horizontal: 30),
child: LocalButton(
textKey: "FCSshipment.process.btn",
callBack: _ship,
),
);
final arriveBtn = Padding(
padding: const EdgeInsets.symmetric(horizontal: 30),
child: LocalButton(
textKey: "FCSshipment.arrive.btn",
callBack: _ship,
),
);
final invoiceBtn = Padding(
padding: const EdgeInsets.symmetric(horizontal: 30),
child: LocalButton(
textKey: "FCSshipment.invoice.btn",
callBack: _ship,
),
);
final cancelBtn = Padding(
padding: const EdgeInsets.symmetric(horizontal: 30),
@@ -189,13 +210,22 @@ class _FcsShipmentInfoState extends State<FcsShipmentInfo> {
portBox,
destinationBox,
const SizedBox(height: 30),
_fcsShipment?.status == fcs_shipment_confirmed_status
? shipBtn
_fcsShipment?.status == fcs_shipment_pending_status
? processBtn
: Container(),
_fcsShipment?.status == fcs_shipment_confirmed_status
_fcsShipment?.status == fcs_shipment_pending_status
? Container(
padding: EdgeInsets.only(top: 3), child: cancelBtn)
: Container(),
_fcsShipment?.status == fcs_shipment_processing_status
? shipBtn
: Container(),
_fcsShipment?.status == fcs_shipment_shipped_status
? arriveBtn
: Container(),
_fcsShipment?.status == fcs_shipment_arrived_status
? invoiceBtn
: Container(),
SizedBox(
height: 20,
)