add buttons in shipment info page
This commit is contained in:
@@ -340,12 +340,12 @@
|
||||
"FCSshipment.create":"Create new shipment",
|
||||
"FCSshipment.update":"Update shipment",
|
||||
"FCSshipment.ship.btn":"Ship this shipment",
|
||||
"FCSshipment.process.btn":"Processed this shipment",
|
||||
"FCSshipment.arrive.btn":"Arrived this shipment",
|
||||
"FCSshipment.invoiced.btn":"Invoiced 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",
|
||||
"FCSshipment.carton":"Cartons",
|
||||
"FCSshipment.package":"Packages",
|
||||
"FCS Shipment End ================================================================":"",
|
||||
|
||||
@@ -338,7 +338,10 @@
|
||||
"FCSshipment.cargo_manifest":"ကုန်ပစ္စည်းကိုဒေါင်းမည်",
|
||||
"FCSshipment.create":"တင်ပို့ခြင်းအသစ်ပြုလုပ်မည်",
|
||||
"FCSshipment.update":"တင်ပို့ခြင်းပြုပြင်မည်",
|
||||
"FCSshipment.ship.btn":"Ship this shipment",
|
||||
"FCSshipment.ship.btn":"ပို့ဆောင်နေသည်",
|
||||
"FCSshipment.process.btn":"လုပ်ဆောင်နေသည်",
|
||||
"FCSshipment.arrive.btn":"ရောက်ရှိသည်",
|
||||
"FCSshipment.invoiced.btn":"ပြေစာယူသည်",
|
||||
"FCSshipment.ship.confirm":"Confirm ship?",
|
||||
"FCSshipment.cancel.btn":"Cancel this shipment",
|
||||
"FCSshipment.cancel.confirm":"Cancel this shipment?",
|
||||
|
||||
@@ -49,6 +49,10 @@ const message_type_shipment = "t_s";
|
||||
// Fcs shipment status
|
||||
const fcs_shipment_confirmed_status = "confirmed";
|
||||
const fcs_shipment_shipped_status = "shipped";
|
||||
const fcs_shipment_pending_status = "pending";
|
||||
const fcs_shipment_processing_status = "processing";
|
||||
const fcs_shipment_arrived_status = "arrived";
|
||||
const fcs_shipment_invoiced_status = "invoiced";
|
||||
const fcs_shipment_delivered_status = "delivered";
|
||||
|
||||
// Package status
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
|
||||
@@ -9,7 +9,6 @@ import 'package:fcs/pagination/paginator_listview.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../../domain/entities/fcs_shipment.dart';
|
||||
import 'fcs_shipment_editor.dart';
|
||||
import 'fcs_shipment_list_row.dart';
|
||||
@@ -46,16 +45,28 @@ class _FcsShipmentListState extends State<FcsShipmentList> {
|
||||
popmenus: [
|
||||
LocalPopupMenu(
|
||||
id: 0,
|
||||
textKey: "FCSshipment.popupmenu.all",
|
||||
text: "All",
|
||||
selected: shipmentModel.selectedIndex == 0),
|
||||
LocalPopupMenu(
|
||||
id: 1,
|
||||
textKey: "FCSshipment.popupmenu.active",
|
||||
text: "Pending",
|
||||
selected: shipmentModel.selectedIndex == 1),
|
||||
LocalPopupMenu(
|
||||
id: 2,
|
||||
textKey: "FCSshipment.popupmenu.shipped",
|
||||
selected: shipmentModel.selectedIndex == 2)
|
||||
text: "Processing",
|
||||
selected: shipmentModel.selectedIndex == 2),
|
||||
LocalPopupMenu(
|
||||
id: 3,
|
||||
text: "Shipped",
|
||||
selected: shipmentModel.selectedIndex == 3),
|
||||
LocalPopupMenu(
|
||||
id: 4,
|
||||
text: "Arrived",
|
||||
selected: shipmentModel.selectedIndex == 4),
|
||||
LocalPopupMenu(
|
||||
id: 5,
|
||||
text: "Invoiced",
|
||||
selected: shipmentModel.selectedIndex == 5)
|
||||
],
|
||||
popupMenuCallback: (p) {
|
||||
setState(() {
|
||||
|
||||
@@ -71,15 +71,16 @@ class _LocalPopupMenuButtonState extends State<LocalPopupMenuButton> {
|
||||
height: 30,
|
||||
decoration: new BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Colors.white,
|
||||
//color: Colors.white,
|
||||
),
|
||||
child: Stack(
|
||||
fit: StackFit.expand,
|
||||
children: <Widget>[
|
||||
Icon(
|
||||
widget.buttonIcon ?? Icons.filter_list,
|
||||
color: widget.buttonColor,
|
||||
color: Colors.white,
|
||||
),
|
||||
|
||||
hightlight
|
||||
? Positioned(
|
||||
bottom: 0,
|
||||
@@ -89,7 +90,7 @@ class _LocalPopupMenuButtonState extends State<LocalPopupMenuButton> {
|
||||
height: 10,
|
||||
decoration: new BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: secondaryColor,
|
||||
color: secondaryColor,
|
||||
),
|
||||
),
|
||||
)
|
||||
@@ -118,7 +119,8 @@ class _LocalPopupMenuButtonState extends State<LocalPopupMenuButton> {
|
||||
Icons.check,
|
||||
color: Colors.grey,
|
||||
)
|
||||
: Container(),
|
||||
: Container(
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user