add signin function
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import 'package:fcs/model_fcs/box_model.dart';
|
||||
import 'package:fcs/model_fcs/package_model.dart';
|
||||
import 'package:fcs/theme/theme.dart';
|
||||
import 'package:fcs/fcs/common/theme.dart';
|
||||
import 'package:fcs/vo/box.dart';
|
||||
import 'package:fcs/widget/localization/app_translations.dart';
|
||||
import 'package:fcs/widget/progress.dart';
|
||||
@@ -61,7 +61,9 @@ class _BoxAdditionState extends State<BoxAddition> {
|
||||
icon: Icon(Icons.pages)),
|
||||
items: boxModel.processed
|
||||
.map((e) => DropdownMenuItem(
|
||||
child: Text('${e.shipmentNumber}-${e.receiverNumber} #${e.boxNumber}'), value: e))
|
||||
child: Text(
|
||||
'${e.shipmentNumber}-${e.receiverNumber} #${e.boxNumber}'),
|
||||
value: e))
|
||||
.toList(),
|
||||
onChanged: (map) => {},
|
||||
),
|
||||
|
||||
@@ -3,7 +3,7 @@ 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';
|
||||
import 'package:fcs/theme/theme.dart';
|
||||
import 'package:fcs/fcs/common/theme.dart';
|
||||
import 'package:fcs/widget/bottom_up_page_route.dart';
|
||||
import 'package:fcs/widget/local_text.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
@@ -39,7 +39,7 @@ class _InvoiceListState extends State<InvoiceList> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var owner = Provider.of<MainModel>(context).isOwner();
|
||||
var owner = Provider.of<MainModel>(context).isOwner();
|
||||
|
||||
return LocalProgress(
|
||||
inAsyncCall: _isLoading,
|
||||
@@ -73,16 +73,19 @@ class _InvoiceListState extends State<InvoiceList> {
|
||||
],
|
||||
),
|
||||
),
|
||||
floatingActionButton:owner? FloatingActionButton.extended(
|
||||
onPressed: () {
|
||||
_newInvoice();
|
||||
},
|
||||
icon: Icon(Icons.add),
|
||||
label: Text(AppTranslations.of(context).text("invoices.add")),
|
||||
backgroundColor: primaryColor,
|
||||
):null,
|
||||
floatingActionButton: owner
|
||||
? FloatingActionButton.extended(
|
||||
onPressed: () {
|
||||
_newInvoice();
|
||||
},
|
||||
icon: Icon(Icons.add),
|
||||
label:
|
||||
Text(AppTranslations.of(context).text("invoices.add")),
|
||||
backgroundColor: primaryColor,
|
||||
)
|
||||
: null,
|
||||
body: TabBarView(
|
||||
children: [ _pending(), _paided()],
|
||||
children: [_pending(), _paided()],
|
||||
)),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -2,7 +2,7 @@ import 'package:fcs/model/discount_model.dart';
|
||||
import 'package:fcs/model/main_model.dart';
|
||||
import 'package:fcs/model_fcs/box_model.dart';
|
||||
import 'package:fcs/pages/invoice/package_addition.dart';
|
||||
import 'package:fcs/theme/theme.dart';
|
||||
import 'package:fcs/fcs/common/theme.dart';
|
||||
import 'package:fcs/vo/box.dart';
|
||||
import 'package:fcs/vo/cargo.dart';
|
||||
import 'package:fcs/vo/invoice.dart';
|
||||
@@ -173,8 +173,9 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
|
||||
decoration: InputDecoration(
|
||||
fillColor: Colors.white,
|
||||
labelText: 'Invoice Date',
|
||||
labelStyle:
|
||||
TextStyle(fontSize: 16,),
|
||||
labelStyle: TextStyle(
|
||||
fontSize: 16,
|
||||
),
|
||||
filled: true,
|
||||
enabledBorder: InputBorder.none,
|
||||
focusedBorder: InputBorder.none,
|
||||
@@ -194,7 +195,8 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
|
||||
fillColor: Colors.white,
|
||||
labelText: 'Invoice Number',
|
||||
labelStyle: TextStyle(
|
||||
fontSize: 16,),
|
||||
fontSize: 16,
|
||||
),
|
||||
filled: true,
|
||||
enabledBorder: InputBorder.none,
|
||||
focusedBorder: InputBorder.none,
|
||||
@@ -213,8 +215,9 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
|
||||
decoration: InputDecoration(
|
||||
fillColor: Colors.white,
|
||||
labelText: 'Customer Name',
|
||||
labelStyle:
|
||||
TextStyle(fontSize: 16,),
|
||||
labelStyle: TextStyle(
|
||||
fontSize: 16,
|
||||
),
|
||||
filled: true,
|
||||
focusedBorder: UnderlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
@@ -243,7 +246,8 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
|
||||
fillColor: Colors.white,
|
||||
labelText: 'Customer Name',
|
||||
labelStyle: TextStyle(
|
||||
fontSize: 16,),
|
||||
fontSize: 16,
|
||||
),
|
||||
filled: true,
|
||||
enabledBorder: InputBorder.none,
|
||||
focusedBorder: InputBorder.none,
|
||||
@@ -288,7 +292,8 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
|
||||
fillColor: Colors.white,
|
||||
labelText: 'Status',
|
||||
labelStyle: TextStyle(
|
||||
fontSize: 16, ),
|
||||
fontSize: 16,
|
||||
),
|
||||
filled: true,
|
||||
enabledBorder: InputBorder.none,
|
||||
focusedBorder: InputBorder.none,
|
||||
@@ -307,8 +312,9 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
|
||||
decoration: InputDecoration(
|
||||
fillColor: Colors.white,
|
||||
labelText: 'Amount',
|
||||
labelStyle:
|
||||
TextStyle(fontSize: 16,),
|
||||
labelStyle: TextStyle(
|
||||
fontSize: 16,
|
||||
),
|
||||
filled: true,
|
||||
enabledBorder: InputBorder.none,
|
||||
focusedBorder: InputBorder.none,
|
||||
@@ -327,8 +333,9 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
|
||||
decoration: InputDecoration(
|
||||
fillColor: Colors.white,
|
||||
labelText: 'Balance',
|
||||
labelStyle:
|
||||
TextStyle(fontSize: 16, ),
|
||||
labelStyle: TextStyle(
|
||||
fontSize: 16,
|
||||
),
|
||||
filled: true,
|
||||
enabledBorder: InputBorder.none,
|
||||
focusedBorder: InputBorder.none,
|
||||
@@ -347,8 +354,9 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
|
||||
decoration: InputDecoration(
|
||||
fillColor: Colors.white,
|
||||
labelText: 'Handling Fee',
|
||||
labelStyle:
|
||||
TextStyle(fontSize: 16,),
|
||||
labelStyle: TextStyle(
|
||||
fontSize: 16,
|
||||
),
|
||||
filled: true,
|
||||
enabledBorder: InputBorder.none,
|
||||
focusedBorder: InputBorder.none,
|
||||
@@ -367,8 +375,9 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
|
||||
decoration: InputDecoration(
|
||||
fillColor: Colors.white,
|
||||
labelText: 'Customs Fee',
|
||||
labelStyle:
|
||||
TextStyle(fontSize: 16,),
|
||||
labelStyle: TextStyle(
|
||||
fontSize: 16,
|
||||
),
|
||||
filled: true,
|
||||
icon: Icon(
|
||||
FontAwesomeIcons.moneyBill,
|
||||
@@ -388,8 +397,9 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
|
||||
decoration: InputDecoration(
|
||||
fillColor: Colors.white,
|
||||
labelText: 'Customs Fee Description',
|
||||
labelStyle:
|
||||
TextStyle(fontSize: 16,),
|
||||
labelStyle: TextStyle(
|
||||
fontSize: 16,
|
||||
),
|
||||
filled: true,
|
||||
icon: Icon(
|
||||
Icons.comment,
|
||||
|
||||
@@ -3,7 +3,7 @@ import 'dart:io';
|
||||
|
||||
import 'package:fcs/model/main_model.dart';
|
||||
import 'package:fcs/pages/invoice/payment_pdf_screen.dart';
|
||||
import 'package:fcs/theme/theme.dart';
|
||||
import 'package:fcs/fcs/common/theme.dart';
|
||||
import 'package:fcs/vo/invoice.dart';
|
||||
import 'package:fcs/widget/bottom_up_page_route.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
@@ -132,29 +132,30 @@ class _InvoiceListRowState extends State<InvoiceListRow> {
|
||||
// padding: const EdgeInsets.all(0),
|
||||
// child: getStatus(_invoice.status),
|
||||
// ),
|
||||
_invoice.status=="Pending"?
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 10.0),
|
||||
child: InkWell(
|
||||
child: RaisedButton(
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Icon(
|
||||
Icons.payment,
|
||||
color: primaryColor,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left:8.0),
|
||||
child: Text("Payment"),
|
||||
)
|
||||
],
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.of(context)
|
||||
.push(BottomUpPageRoute(PaymentPage(invoice: _invoice)));
|
||||
},
|
||||
)),
|
||||
):Container(),
|
||||
_invoice.status == "Pending"
|
||||
? Padding(
|
||||
padding: const EdgeInsets.only(left: 10.0),
|
||||
child: InkWell(
|
||||
child: RaisedButton(
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Icon(
|
||||
Icons.payment,
|
||||
color: primaryColor,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 8.0),
|
||||
child: Text("Payment"),
|
||||
)
|
||||
],
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.of(context).push(
|
||||
BottomUpPageRoute(PaymentPage(invoice: _invoice)));
|
||||
},
|
||||
)),
|
||||
)
|
||||
: Container(),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 8.0),
|
||||
child: InkWell(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:fcs/model_fcs/package_model.dart';
|
||||
import 'package:fcs/theme/theme.dart';
|
||||
import 'package:fcs/fcs/common/theme.dart';
|
||||
import 'package:fcs/vo/package.dart';
|
||||
import 'package:fcs/widget/localization/app_translations.dart';
|
||||
import 'package:fcs/widget/progress.dart';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'package:fcs/model/main_model.dart';
|
||||
import 'package:fcs/model/pickup_model.dart';
|
||||
import 'package:fcs/theme/theme.dart';
|
||||
import 'package:fcs/fcs/common/theme.dart';
|
||||
import 'package:fcs/vo/package.dart';
|
||||
import 'package:fcs/widget/label_widgets.dart';
|
||||
import 'package:fcs/widget/localization/app_translations.dart';
|
||||
@@ -61,7 +61,9 @@ class _PackageInfoState extends State<PackageInfo> {
|
||||
padding: EdgeInsets.only(top: 10),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Icon(Icons.calendar_today,),
|
||||
Icon(
|
||||
Icons.calendar_today,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 8.0, left: 15),
|
||||
child: labeledText(
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'package:fcs/model/main_model.dart';
|
||||
import 'package:fcs/pages/util.dart';
|
||||
import 'package:fcs/theme/theme.dart';
|
||||
import 'package:fcs/fcs/common/theme.dart';
|
||||
import 'package:fcs/vo/invoice.dart';
|
||||
import 'package:fcs/vo/package.dart';
|
||||
import 'package:fcs/widget/local_text.dart';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:fcs/theme/theme.dart';
|
||||
import 'package:fcs/fcs/common/theme.dart';
|
||||
import 'package:fcs/widget/local_text.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -30,7 +30,7 @@ class _PaymentPDFScreenState extends State<PaymentPDFScreen>
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: primaryColor,
|
||||
title:Text("Invoice File"),
|
||||
title: Text("Invoice File"),
|
||||
actions: <Widget>[
|
||||
IconButton(
|
||||
icon: Icon(Icons.share),
|
||||
|
||||
Reference in New Issue
Block a user