v3
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import 'package:country_code_picker/country_code.dart';
|
||||
import 'package:fcs/model/main_model.dart';
|
||||
import 'package:fcs/pages/shipment_list.dart';
|
||||
import 'package:fcs/pages_fcs/box_list.dart';
|
||||
import 'package:fcs/pages_fcs/package_list.dart';
|
||||
import 'package:fcs/widget/bottom_up_page_route.dart';
|
||||
import 'package:fcs/widget/localization/transalation.dart';
|
||||
@@ -111,6 +112,11 @@ class _HomePageState extends State<HomePage> {
|
||||
btnCallback: () =>
|
||||
Navigator.of(context).push(BottomUpPageRoute(PackageList())));
|
||||
|
||||
final boxesBtn = _buildBtn2("boxes.name",
|
||||
icon: MaterialCommunityIcons.package,
|
||||
btnCallback: () =>
|
||||
Navigator.of(context).push(BottomUpPageRoute(BoxList())));
|
||||
|
||||
final pickUpBtn = _buildBtn2("pickup",
|
||||
icon: SimpleLineIcons.direction,
|
||||
btnCallback: () =>
|
||||
@@ -182,6 +188,7 @@ class _HomePageState extends State<HomePage> {
|
||||
owner ? widgets.add(fcsProfileBtn) : "";
|
||||
widgets.add(shipmentCostBtn);
|
||||
customer || owner ? widgets.add(packagesBtn) : "";
|
||||
customer || owner ? widgets.add(boxesBtn) : "";
|
||||
owner ? widgets.add(customersBtn) : "";
|
||||
customer || owner ? widgets.add(invoicesBtn) : "";
|
||||
widgets.add(termBtn);
|
||||
|
||||
@@ -65,7 +65,7 @@ class _InvoiceListState extends State<InvoiceList> {
|
||||
bottom: TabBar(
|
||||
unselectedLabelColor: Colors.grey,
|
||||
tabs: [
|
||||
Tab(text: "Packages"),
|
||||
Tab(text: "Boxes"),
|
||||
Tab(text: "Pending"),
|
||||
Tab(text: "Paid"),
|
||||
],
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:fcs/model/main_model.dart';
|
||||
import 'package:fcs/pages/invoice/package_addition.dart';
|
||||
import 'package:fcs/theme/theme.dart';
|
||||
import 'package:fcs/vo/invoice.dart';
|
||||
@@ -86,6 +87,8 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var mainModel = Provider.of<MainModel>(context);
|
||||
|
||||
return LocalProgress(
|
||||
inAsyncCall: _isLoading,
|
||||
child: Scaffold(
|
||||
@@ -246,7 +249,7 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
|
||||
],
|
||||
),
|
||||
ExpansionTile(
|
||||
title: Text('Package Informations'),
|
||||
title: Text('Box Information'),
|
||||
children: <Widget>[
|
||||
Container(
|
||||
child: SingleChildScrollView(
|
||||
@@ -288,14 +291,14 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
mainModel.isOwner()?Container(
|
||||
padding: EdgeInsets.only(top: 20),
|
||||
child: Align(
|
||||
alignment: Alignment.bottomRight,
|
||||
child: FloatingActionButton.extended(
|
||||
icon: Icon(Icons.add),
|
||||
label: Text(AppTranslations.of(context)
|
||||
.text("invoice.add_package")),
|
||||
.text("invoice.add_box")),
|
||||
backgroundColor: primaryColor,
|
||||
onPressed: () {
|
||||
Navigator.of(context)
|
||||
@@ -303,7 +306,7 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
):Container(),
|
||||
SizedBox(height: 25),
|
||||
],
|
||||
),
|
||||
@@ -324,7 +327,7 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
|
||||
},
|
||||
),
|
||||
)))
|
||||
: Container(
|
||||
:mainModel.isCustomer()?Container():Container(
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Align(
|
||||
@@ -351,7 +354,7 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
|
||||
child: Container(
|
||||
width: 250,
|
||||
child: FlatButton(
|
||||
child: Text('Confirm Payment'),
|
||||
child: Text('Attach Payment Receipt'),
|
||||
color: primaryColor,
|
||||
textColor: Colors.white,
|
||||
onPressed: () {
|
||||
|
||||
@@ -270,7 +270,7 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
||||
],
|
||||
),
|
||||
ExpansionTile(
|
||||
title: Text('Package Informations'),
|
||||
title: Text('Package Information'),
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 20.0),
|
||||
@@ -302,7 +302,7 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
||||
],
|
||||
),
|
||||
ExpansionTile(
|
||||
title: Text('Recipient Informations'),
|
||||
title: Text('Recipient Information'),
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 20.0),
|
||||
@@ -346,6 +346,7 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
||||
_recipientAddressEditingController)),
|
||||
],
|
||||
),
|
||||
mainModel.isCustomer()?Container():
|
||||
ExpansionTile(
|
||||
title: Text('For FCS'),
|
||||
children: <Widget>[
|
||||
|
||||
@@ -109,7 +109,7 @@ class _ShipmentRatesState extends State<ShipmentRates> {
|
||||
Navigator.of(context)
|
||||
.push(MaterialPageRoute(builder: (_) => Term()));
|
||||
}),
|
||||
fcsButton(context, "Calculate", callack: () {
|
||||
fcsButton(context, "Estimate shipping cost", callack: () {
|
||||
Navigator.of(context)
|
||||
.push(BottomUpPageRoute(ShipmentRatesCal()));
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user