fix for slides
This commit is contained in:
@@ -209,8 +209,8 @@ class _HomePageState extends State<HomePage> {
|
||||
owner ? widgets.add(deliveryBtn) : "";
|
||||
owner ? widgets.add(customersBtn) : "";
|
||||
customer || owner ? widgets.add(invoicesBtn) : "";
|
||||
customer || owner ? widgets.add(paymentMethodBtn) : "";
|
||||
customer || owner ? widgets.add(discountBtn) : "";
|
||||
owner ? widgets.add(paymentMethodBtn) : "";
|
||||
owner ? widgets.add(discountBtn) : "";
|
||||
// widgets.add(termBtn);
|
||||
|
||||
return OfflineRedirect(
|
||||
@@ -352,7 +352,7 @@ class _HomePageState extends State<HomePage> {
|
||||
MaterialPageRoute(builder: (_) => Term()));
|
||||
},
|
||||
child: _buildSmallButton(
|
||||
"Terms of services", Icons.info_outline),
|
||||
"Terms of service", Icons.info_outline),
|
||||
),
|
||||
],
|
||||
)
|
||||
|
||||
@@ -143,7 +143,7 @@ class _HomePageWelcomeState extends State<HomePageWelcome> {
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(100.0),
|
||||
padding: const EdgeInsets.all(80.0),
|
||||
child: Text(
|
||||
"Welcome!",
|
||||
textAlign: TextAlign.center,
|
||||
@@ -154,7 +154,7 @@ class _HomePageWelcomeState extends State<HomePageWelcome> {
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 80.0),
|
||||
padding: const EdgeInsets.only(top: 0.0),
|
||||
child: Text(
|
||||
"Cargo Services",
|
||||
textAlign: TextAlign.center,
|
||||
@@ -260,7 +260,7 @@ class _HomePageWelcomeState extends State<HomePageWelcome> {
|
||||
MaterialPageRoute(builder: (_) => Term()));
|
||||
},
|
||||
child: _buildSmallButton(
|
||||
"Terms of services", Icons.info_outline),
|
||||
"Terms of service", Icons.info_outline),
|
||||
),
|
||||
],
|
||||
)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:fcs/model/invoice_model.dart';
|
||||
import 'package:fcs/model/main_model.dart';
|
||||
import 'package:fcs/model/shipment_model.dart';
|
||||
import 'package:fcs/model_fcs/package_model.dart';
|
||||
import 'package:fcs/pages_fcs/package_list_row.dart';
|
||||
@@ -38,10 +39,12 @@ class _InvoiceListState extends State<InvoiceList> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var owner = Provider.of<MainModel>(context).isOwner();
|
||||
|
||||
return LocalProgress(
|
||||
inAsyncCall: _isLoading,
|
||||
child: DefaultTabController(
|
||||
length: 3,
|
||||
length: 2,
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
centerTitle: true,
|
||||
@@ -65,22 +68,21 @@ class _InvoiceListState extends State<InvoiceList> {
|
||||
bottom: TabBar(
|
||||
unselectedLabelColor: Colors.grey,
|
||||
tabs: [
|
||||
Tab(text: "Boxes"),
|
||||
Tab(text: "Pending"),
|
||||
Tab(text: "Paid"),
|
||||
],
|
||||
),
|
||||
),
|
||||
floatingActionButton: FloatingActionButton.extended(
|
||||
floatingActionButton:owner? FloatingActionButton.extended(
|
||||
onPressed: () {
|
||||
_newInvoice();
|
||||
},
|
||||
icon: Icon(Icons.add),
|
||||
label: Text(AppTranslations.of(context).text("invoices.add")),
|
||||
backgroundColor: primaryColor,
|
||||
),
|
||||
):null,
|
||||
body: TabBarView(
|
||||
children: [_packages(), _pending(), _paided()],
|
||||
children: [ _pending(), _paided()],
|
||||
)),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -128,23 +128,33 @@ class _InvoiceListRowState extends State<InvoiceListRow> {
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(0),
|
||||
child: getStatus(_invoice.status),
|
||||
),
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.all(0),
|
||||
// child: getStatus(_invoice.status),
|
||||
// ),
|
||||
_invoice.status=="Pending"?
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 10.0),
|
||||
child: InkWell(
|
||||
child: Icon(
|
||||
Icons.payment,
|
||||
color: primaryColor,
|
||||
child: RaisedButton(
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Icon(
|
||||
Icons.payment,
|
||||
color: primaryColor,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left:8.0),
|
||||
child: Text("Payment"),
|
||||
)
|
||||
],
|
||||
),
|
||||
onTap: () {
|
||||
onPressed: () {
|
||||
Navigator.of(context)
|
||||
.push(BottomUpPageRoute(PaymentPage(invoice: _invoice)));
|
||||
},
|
||||
),
|
||||
),
|
||||
)),
|
||||
):Container(),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 8.0),
|
||||
child: InkWell(
|
||||
|
||||
@@ -30,8 +30,7 @@ class _PaymentPDFScreenState extends State<PaymentPDFScreen>
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: primaryColor,
|
||||
title: LocalText(context, 'pdf_view.title',
|
||||
color: Colors.white, fontSize: 20),
|
||||
title:Text("Invoice File"),
|
||||
actions: <Widget>[
|
||||
IconButton(
|
||||
icon: Icon(Icons.share),
|
||||
@@ -95,21 +94,21 @@ class _PaymentPDFScreenState extends State<PaymentPDFScreen>
|
||||
// )
|
||||
],
|
||||
),
|
||||
floatingActionButton: FutureBuilder<PDFViewController>(
|
||||
future: _controller.future,
|
||||
builder: (context, AsyncSnapshot<PDFViewController> snapshot) {
|
||||
if (snapshot.hasData) {
|
||||
return FloatingActionButton.extended(
|
||||
label: Text("Go to ${pages ~/ 2}"),
|
||||
onPressed: () async {
|
||||
await snapshot.data.setPage(pages ~/ 2);
|
||||
},
|
||||
);
|
||||
}
|
||||
// floatingActionButton: FutureBuilder<PDFViewController>(
|
||||
// future: _controller.future,
|
||||
// builder: (context, AsyncSnapshot<PDFViewController> snapshot) {
|
||||
// if (snapshot.hasData) {
|
||||
// return FloatingActionButton.extended(
|
||||
// label: Text("Go to ${pages ~/ 2}"),
|
||||
// onPressed: () async {
|
||||
// await snapshot.data.setPage(pages ~/ 2);
|
||||
// },
|
||||
// );
|
||||
// }
|
||||
|
||||
return Container();
|
||||
},
|
||||
),
|
||||
// return Container();
|
||||
// },
|
||||
// ),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -220,7 +220,7 @@ class _PickupBoxEditorState extends State<PickupBoxEditor> {
|
||||
),
|
||||
ExpansionTile(
|
||||
title: Text(
|
||||
'Address',
|
||||
'Shipment Address',
|
||||
style: TextStyle(
|
||||
color: primaryColor, fontWeight: FontWeight.bold),
|
||||
),
|
||||
|
||||
@@ -11,6 +11,8 @@ import 'package:fcs/vo/shipping_address.dart';
|
||||
import 'package:fcs/widget/bottom_up_page_route.dart';
|
||||
import 'package:fcs/widget/fcs_text_field.dart';
|
||||
import 'package:fcs/widget/fcs_text_field_readonly.dart';
|
||||
import 'package:fcs/widget/multi_img_controller.dart';
|
||||
import 'package:fcs/widget/multi_img_file.dart';
|
||||
import 'package:flutter_datetime_picker/flutter_datetime_picker.dart';
|
||||
import 'package:flutter_icons/flutter_icons.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
@@ -35,6 +37,7 @@ class PickUpEditor extends StatefulWidget {
|
||||
class _PickUpEditorState extends State<PickUpEditor> {
|
||||
var dateFormatter = new DateFormat('dd MMM yyyy');
|
||||
final numberFormatter = new NumberFormat("#,###");
|
||||
MultiImgController multiImgController = MultiImgController();
|
||||
|
||||
TextEditingController _addressEditingController = new TextEditingController();
|
||||
TextEditingController _fromTimeEditingController =
|
||||
@@ -273,19 +276,21 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
||||
? Padding(
|
||||
padding: const EdgeInsets.only(left: 15.0),
|
||||
child: fcsInputReadOnly(
|
||||
"Courier Fee", FontAwesomeIcons.moneyBill,
|
||||
"Handling Fee/Courier Fee",
|
||||
FontAwesomeIcons.moneyBill,
|
||||
controller: _handlingFeeController),
|
||||
)
|
||||
: Padding(
|
||||
padding: const EdgeInsets.only(left: 15.0),
|
||||
child: fcsInputReadOnly(
|
||||
"Handling Fee", FontAwesomeIcons.moneyBill,
|
||||
"Handling Fee/Courier Fee",
|
||||
FontAwesomeIcons.moneyBill,
|
||||
controller: _handlingFeeController),
|
||||
),
|
||||
|
||||
ExpansionTile(
|
||||
title: Text(
|
||||
'Shipment Type',
|
||||
'Pickup/Drop-off',
|
||||
style: TextStyle(
|
||||
color: primaryColor, fontWeight: FontWeight.bold),
|
||||
),
|
||||
@@ -313,7 +318,7 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
||||
? Container(
|
||||
child: ShippingAddressRow(
|
||||
shippingAddress: ShippingAddress(
|
||||
fullName: 'Myo Min',
|
||||
fullName: 'FCS Office',
|
||||
addressLine1: '154-19 64th Ave.',
|
||||
addressLine2: 'Flushing',
|
||||
city: 'NY',
|
||||
@@ -324,66 +329,22 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
||||
: _currVal == 4
|
||||
? Container(
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
ShippingAddressRow(
|
||||
shippingAddress:
|
||||
shipmentModel.shippingAddresses[1]),
|
||||
Container(
|
||||
padding: EdgeInsets.only(
|
||||
top: 20, bottom: 15, right: 15),
|
||||
child: Align(
|
||||
alignment: Alignment.bottomRight,
|
||||
child: Container(
|
||||
width: 120,
|
||||
height: 40,
|
||||
child: FloatingActionButton.extended(
|
||||
materialTapTargetSize:
|
||||
MaterialTapTargetSize.shrinkWrap,
|
||||
onPressed: () {},
|
||||
icon: Icon(Icons.add),
|
||||
label: Text(
|
||||
'Select\nAddress',
|
||||
style: TextStyle(fontSize: 12),
|
||||
),
|
||||
backgroundColor: primaryColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
))
|
||||
: ExpansionTile(
|
||||
title: Text(
|
||||
'Package Information',
|
||||
style: TextStyle(
|
||||
color: primaryColor,
|
||||
fontWeight: FontWeight.bold),
|
||||
),
|
||||
children: <Widget>[
|
||||
Column(
|
||||
children: getBoxList(context, boxModel.boxes),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.only(
|
||||
top: 20, bottom: 15, right: 15),
|
||||
child: Align(
|
||||
alignment: Alignment.bottomRight,
|
||||
alignment: Alignment.center,
|
||||
child: Container(
|
||||
width: 120,
|
||||
width: 350,
|
||||
height: 40,
|
||||
child: FloatingActionButton.extended(
|
||||
materialTapTargetSize:
|
||||
MaterialTapTargetSize.shrinkWrap,
|
||||
icon: Icon(Icons.add),
|
||||
onPressed: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
BottomUpPageRoute(
|
||||
PickupBoxEditor()),
|
||||
);
|
||||
},
|
||||
onPressed: () {},
|
||||
icon: Icon(Icons.arrow_right),
|
||||
label: Text(
|
||||
'Add Package',
|
||||
'Visit courier websie for nearest drop-off',
|
||||
style: TextStyle(fontSize: 12),
|
||||
),
|
||||
backgroundColor: primaryColor,
|
||||
@@ -391,9 +352,50 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 10.0),
|
||||
],
|
||||
))
|
||||
: Container(),
|
||||
|
||||
ExpansionTile(
|
||||
title: Text(
|
||||
'Package Information',
|
||||
style: TextStyle(
|
||||
color: primaryColor, fontWeight: FontWeight.bold),
|
||||
),
|
||||
children: <Widget>[
|
||||
Column(
|
||||
children: getBoxList(context, boxModel.boxes),
|
||||
),
|
||||
Container(
|
||||
padding:
|
||||
EdgeInsets.only(top: 20, bottom: 15, right: 15),
|
||||
child: Align(
|
||||
alignment: Alignment.bottomRight,
|
||||
child: Container(
|
||||
width: 120,
|
||||
height: 40,
|
||||
child: FloatingActionButton.extended(
|
||||
materialTapTargetSize:
|
||||
MaterialTapTargetSize.shrinkWrap,
|
||||
icon: Icon(Icons.add),
|
||||
onPressed: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
BottomUpPageRoute(PickupBoxEditor()),
|
||||
);
|
||||
},
|
||||
label: Text(
|
||||
'Add Package',
|
||||
style: TextStyle(fontSize: 12),
|
||||
),
|
||||
backgroundColor: primaryColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 10.0),
|
||||
],
|
||||
),
|
||||
_currVal == 3 || _currVal == 4
|
||||
? Container()
|
||||
: ExpansionTile(
|
||||
@@ -592,6 +594,30 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
||||
)
|
||||
: Container()
|
||||
: Container(),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 20),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
padding: EdgeInsets.only(top: 8),
|
||||
child: Text(
|
||||
'Attach Courier Shiping Labels',
|
||||
style: TextStyle(
|
||||
color: Colors.black, fontSize: 16),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.only(left: 10),
|
||||
child: MultiImageFile(
|
||||
enabled: true,
|
||||
controller: multiImgController,
|
||||
title: "Receipt File",
|
||||
)),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
]),
|
||||
@@ -603,7 +629,7 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
||||
child: Container(
|
||||
width: 250,
|
||||
child: FlatButton(
|
||||
child: Text('Request for shipment'),
|
||||
child: Text('Create shipment'),
|
||||
color: primaryColor,
|
||||
textColor: Colors.white,
|
||||
onPressed: () {
|
||||
@@ -635,7 +661,7 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
||||
child: Container(
|
||||
width: 250,
|
||||
child: FlatButton(
|
||||
child: Text('Assign Shipment'),
|
||||
child: Text('Confirm Shipment'),
|
||||
color: primaryColor,
|
||||
textColor: Colors.white,
|
||||
onPressed: () {
|
||||
|
||||
@@ -99,9 +99,9 @@ class _ShipmentRatesCalState extends State<ShipmentRatesCal> {
|
||||
),
|
||||
),
|
||||
_row('Width (inches)', "", "", "10", input: true),
|
||||
_row('Height', "", "", "10", input: true),
|
||||
_row('Length', "", "", "10", input: true),
|
||||
_row('Actual Weight', "", "", "0", input: true),
|
||||
_row('Height (inches)', "", "", "10", input: true),
|
||||
_row('Length (inches)', "", "", "10", input: true),
|
||||
_row('Actual Weight (pounds)', "", "", "0", input: true),
|
||||
Container(
|
||||
padding: EdgeInsets.only(left: 25, top: 15, bottom: 5),
|
||||
child: Row(
|
||||
@@ -174,7 +174,7 @@ class _ShipmentRatesCalState extends State<ShipmentRatesCal> {
|
||||
width: 50,
|
||||
),
|
||||
Container(
|
||||
width: 150,
|
||||
width: 50,
|
||||
child: TextFormField(
|
||||
initialValue: value,
|
||||
textAlign: TextAlign.end,
|
||||
|
||||
Reference in New Issue
Block a user