diff --git a/assets/local/localization_en.json b/assets/local/localization_en.json index 3cd6d7b..0afef26 100644 --- a/assets/local/localization_en.json +++ b/assets/local/localization_en.json @@ -271,6 +271,7 @@ "term.iagree":"I agree on terms and condition.", "noti.title":"Notifications", + "noti.list.title":"NOTIFICATIONS", "log.title":"Logs", "document.log.title":"Document Logs", @@ -490,11 +491,17 @@ "notifications.title":"Notification", "staff.title":"FCS staffs", - "staff.form.title":"FCS staff", + "staff.list.title":"FCS STAFFS", + "staff.new":"New Staff", + "staff.form.title":"FCS STAFF", + "staff.add":"Add", "staff.update":"Update", "shipment.title":"Shipments", + "shipment.list.title":"SHIPMENTS", "shipment.add":"New shipment", + "shipment.form.title":"SHIPMENT", + "shipment.number":"Shipment number", "pickup": "Pickups", "pickup.title": "PICKUPS", diff --git a/assets/local/localization_mu.json b/assets/local/localization_mu.json index 331fe37..b0b9afc 100644 --- a/assets/local/localization_mu.json +++ b/assets/local/localization_mu.json @@ -266,6 +266,7 @@ "term.iagree":"ကျွန်တော် သဘောတူပါသည်", "noti.title":"အသိပေးချက်များ", + "noti.list.title":"NOTIFICATIONS", "log.title":"မှတ်တမ်းများ", "document.log.title":"မှတ်တမ်းများ", @@ -522,11 +523,17 @@ "notifications.title":"Notifications", "staff.title":"FCS staffs", - "staff.form.title":"FCS staff", + "staff.list.title":"FCS STAFFS", + "staff.new":"New Staff", + "staff.form.title":"FCS STAFF", + "staff.add":"Add", "staff.update":"Update", "shipment.title":"Shipments", + "shipment.list.title":"SHIPMENTS", "shipment.add":"New shipment", + "shipment.form.title":"SHIPMENT", + "shipment.number":"Shipment number", "pickup.title": "Pickups", "pickup.new": "New Pickup", diff --git a/lib/app.dart b/lib/app.dart index 613dabf..4f0a766 100644 --- a/lib/app.dart +++ b/lib/app.dart @@ -1,3 +1,4 @@ +import 'package:fcs/model/shipment_model.dart'; import 'package:flutter/material.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:provider/provider.dart'; @@ -63,6 +64,7 @@ class _AppState extends State { final ReportUserModel reportUserModel = new ReportUserModel(); final PickUpModel pickUpModel = new PickUpModel(); final ShipmentRateModel shipmentRateModel = new ShipmentRateModel(); + final ShipmentModel shipmentModel = new ShipmentModel(); AppTranslationsDelegate _newLocaleDelegate; @@ -94,7 +96,8 @@ class _AppState extends State { ..addModel(testModel) ..addModel(reportUserModel) ..addModel(pickUpModel) - ..addModel(shipmentRateModel); + ..addModel(shipmentRateModel) + ..addModel(shipmentModel); this.mainModel.init(); } @@ -145,6 +148,7 @@ class _AppState extends State { ChangeNotifierProvider(builder: (context) => reportUserModel), ChangeNotifierProvider(builder: (context) => pickUpModel), ChangeNotifierProvider(builder: (context) => shipmentRateModel), + ChangeNotifierProvider(builder: (context) => shipmentModel), ChangeNotifierProvider( builder: (context) => testModel, ), diff --git a/lib/model/announcement_model.dart b/lib/model/announcement_model.dart index 0a8b0e7..88c9c24 100644 --- a/lib/model/announcement_model.dart +++ b/lib/model/announcement_model.dart @@ -2,7 +2,6 @@ import 'dart:async'; import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:fcs/vo/announcement.dart'; -import 'package:fcs/vo/shipment.dart'; import 'base_model.dart'; import 'constants.dart'; @@ -11,12 +10,6 @@ import 'firebase_helper.dart'; class AnnouncementModel extends BaseModel { List announcements = []; - List shipments = [ - Shipment(shipDate: DateTime(2020, 4, 23), shipmentNumber: 'A103B',status: 'In progress'), - Shipment(shipDate: DateTime(2020, 4, 2), shipmentNumber: 'A100A',status: 'Delivered'), - Shipment(shipDate: DateTime(2020, 4, 2), shipmentNumber: 'A100B',status: 'Delivered') - ]; - void initUser(user) { super.initUser(user); _loadAnnouncements(); diff --git a/lib/model/shipment_model.dart b/lib/model/shipment_model.dart new file mode 100644 index 0000000..073328a --- /dev/null +++ b/lib/model/shipment_model.dart @@ -0,0 +1,83 @@ +import 'package:fcs/vo/shipment.dart'; + +import 'base_model.dart'; + +class ShipmentModel extends BaseModel { + List shipmentType = ['Air', 'Ship', 'Cargo Truck']; + List shipments = [ + Shipment( + shipDate: DateTime(2020, 4, 23), + shipmentNumber: 'A103B', + status: 'Pending', + arrivalDate: DateTime(2020, 4, 30), + departureDate: DateTime(2020, 4, 23)), + Shipment( + shipDate: DateTime(2020, 4, 2), + shipmentNumber: 'A100A', + status: 'Delivered', + arrivalDate: DateTime(2020, 4, 28), + departureDate: DateTime(2020, 4, 15)), + Shipment( + shipDate: DateTime(2020, 4, 2), + shipmentNumber: 'A100B', + status: 'Delivered', + arrivalDate: DateTime(2020, 4, 28), + departureDate: DateTime(2020, 4, 15)), + Shipment( + shipDate: DateTime(2020, 4, 10), + shipmentNumber: 'A102B', + status: 'Canceled', + arrivalDate: DateTime(2020, 4, 20), + departureDate: DateTime(2020, 4, 10)), + Shipment( + shipDate: DateTime(2020, 4, 2), + shipmentNumber: 'A100B', + status: 'Canceled', + arrivalDate: DateTime(2020, 4, 20), + departureDate: DateTime(2020, 4, 23)), + Shipment( + shipDate: DateTime(2020, 4, 10), + shipmentNumber: 'A102B', + status: 'Assigned', + arrivalDate: DateTime(2020, 4, 30), + departureDate: DateTime(2020, 4, 20), + ) + ]; + + List get canceled { + List _p = shipments.where((e) => e.status == "Canceled").toList() + ..sort((e1, e2) { + return e2.shipDate.compareTo(e1.shipDate); + }); + return _p; + } + + List get completed { + return shipments.where((e) => e.status == "Delivered").toList() + ..sort((e1, e2) { + return e2.shipDate.compareTo(e1.shipDate); + }); + } + + List get upcoming { + return shipments + .where((e) => + e.status == "Pending" || + e.status == "Assigned" || + e.status == "Processed" || + e.status == "Rescheduled") + .toList() + ..sort((e1, e2) { + return e2.shipDate.compareTo(e1.shipDate); + }); + } + + void initUser(user) { + super.initUser(user); + } + + @override + logout() async { + shipments = []; + } +} diff --git a/lib/pages/code_page.dart b/lib/pages/code_page.dart index 96922e8..dfdf604 100644 --- a/lib/pages/code_page.dart +++ b/lib/pages/code_page.dart @@ -7,7 +7,6 @@ import 'package:flutter/material.dart'; import 'package:pin_input_text_field/pin_input_text_field.dart'; import 'package:provider/provider.dart'; -import '../theme/theme.dart'; import '../theme/theme.dart'; import '../widget/local_text.dart'; import '../widget/progress.dart'; @@ -66,6 +65,11 @@ class _CodePageState extends State { inAsyncCall: _isLoading, child: Scaffold( appBar: AppBar( + centerTitle: true, + leading: new IconButton( + icon: new Icon(Icons.close), + onPressed: () => Navigator.of(context).pop(), + ), backgroundColor: primaryColor, ), body: ListView( @@ -82,7 +86,7 @@ class _CodePageState extends State { context, 'singup.verify.title', fontSize: 21, - color: secondaryColor, + color: primaryColor, fontWeight: FontWeight.bold, ), ), @@ -161,6 +165,7 @@ class _CodePageState extends State { 'login.smscode.retry', fontSize: 15, translationVariables: [_start.toString()], + color: primaryColor, ), ], ), @@ -185,7 +190,7 @@ class _CodePageState extends State { _resend() async {} _verify() async { - Provider.of(context).saveUser(pin,widget.phoneNumber); + Provider.of(context).saveUser(pin, widget.phoneNumber); await Navigator.push( context, MaterialPageRoute(builder: (context) => UserEditPage()), diff --git a/lib/pages/home_page.dart b/lib/pages/home_page.dart index 8efa029..f9dcf93 100644 --- a/lib/pages/home_page.dart +++ b/lib/pages/home_page.dart @@ -1,4 +1,5 @@ import 'package:fcs/model/main_model.dart'; +import 'package:fcs/pages/shipment_list.dart'; import 'package:fcs/widget/bottom_up_page_route.dart'; import 'package:flutter/material.dart'; import 'package:flutter_icons/flutter_icons.dart'; @@ -45,7 +46,6 @@ import 'buying_online.dart'; import 'do/do_list.dart'; import 'my_registeration.dart'; import 'pd/pd_list.dart'; -import 'po/shipment_list.dart'; import 'products_list.dart'; import 'profile_page.dart'; import 'signin_page.dart'; @@ -96,7 +96,7 @@ class _HomePageState extends State { @override Widget build(BuildContext context) { - login=Provider.of(context).isLogin(); + login = Provider.of(context).isLogin(); final helpBtn = _buildBtn2("manual.title", icon: FontAwesomeIcons.readme, imgIcon: Image.asset( @@ -105,8 +105,8 @@ class _HomePageState extends State { height: 40, color: primaryColor, ), - btnCallback: () => Navigator.of(context) - .push(BottomUpPageRoute(ManualPage())) + btnCallback: () => + Navigator.of(context).push(BottomUpPageRoute(ManualPage())) // btnCallback: () => Navigator.of(context) // .push(MaterialPageRoute(builder: (_) => TestList())) ); @@ -138,13 +138,13 @@ class _HomePageState extends State { final pickUpBtn = _buildBtn2("pickup", icon: MaterialCommunityIcons.directions, - btnCallback: () => Navigator.of(context) - .push(BottomUpPageRoute(PickUpList()))); + btnCallback: () => + Navigator.of(context).push(BottomUpPageRoute(PickUpList()))); final shipmentCostBtn = _buildBtn2("rate", icon: FontAwesomeIcons.calculator, - btnCallback: () => Navigator.of(context) - .push(BottomUpPageRoute(ShipmentRates()))); + btnCallback: () => + Navigator.of(context).push(BottomUpPageRoute(ShipmentRates()))); final fcsProfileBtn = _buildBtn2("profile.title", icon: Icons.account_circle, @@ -229,14 +229,11 @@ class _HomePageState extends State { ); }); - final buyingBtn = _buildBtn2("buy_online", icon: MaterialCommunityIcons.cart_outline, btnCallback: () { - Navigator.push( - context, - BottomUpPageRoute(BuyingOnlinePage()) - // MaterialPageRoute(builder: (context) => BuyingOnlinePage()), - ); + Navigator.push(context, BottomUpPageRoute(BuyingOnlinePage()) + // MaterialPageRoute(builder: (context) => BuyingOnlinePage()), + ); }); final notiBtn = _buildBtn2("notifications.title", icon: Icons.notifications, @@ -413,7 +410,7 @@ class _HomePageState extends State { ), ] : [ - FlatButton( + FlatButton( onPressed: () { Navigator.push( context, @@ -422,7 +419,10 @@ class _HomePageState extends State { ); }, // iconSize: 30, - child: Text("Sign in",style: siginButtonStyle,), + child: Text( + "Sign in", + style: siginButtonStyle, + ), ), IconButton( onPressed: () { diff --git a/lib/pages/instruction.dart b/lib/pages/instruction.dart index 4889b97..ac37309 100644 --- a/lib/pages/instruction.dart +++ b/lib/pages/instruction.dart @@ -45,15 +45,17 @@ class _InstructionPageState extends State { appBar: AppBar( centerTitle: true, leading: new IconButton( - icon: new Icon(Icons.close, color: secondaryColor), + icon: new Icon(Icons.close, color: Colors.white), onPressed: () => Navigator.of(context).pop(), ), title: Text(widget.name), backgroundColor: primaryColor, ), body: Container( - child: FittedBox( - child: Image.asset(widget.image), fit: BoxFit.contain), + padding: EdgeInsets.only(left: 5, right: 5, top: 5), + child: Card(elevation: 0, + child: FittedBox( + child: Image.asset(widget.image), fit: BoxFit.contain)), ), ), ); diff --git a/lib/pages/manual/manual_page.dart b/lib/pages/manual/manual_page.dart index 7d77b9b..dde65f9 100644 --- a/lib/pages/manual/manual_page.dart +++ b/lib/pages/manual/manual_page.dart @@ -50,7 +50,7 @@ class _ManualPageState extends State { child: Scaffold( appBar: AppBar( leading: new IconButton( - icon: new Icon(Icons.close, color: secondaryColor), + icon: new Icon(Icons.close, color: Colors.white), onPressed: () => Navigator.of(context).pop(), ), title: Text(widget.marketplace == null ? '' : widget.marketplace), diff --git a/lib/pages/notification_list.dart b/lib/pages/notification_list.dart index ea3d98d..0bb0ac3 100644 --- a/lib/pages/notification_list.dart +++ b/lib/pages/notification_list.dart @@ -3,7 +3,6 @@ import 'package:intl/intl.dart'; import 'package:provider/provider.dart'; import 'package:fcs/model/notification_model.dart'; import 'package:fcs/vo/notification.dart' as Noti; -import 'package:fcs/widget/localization/app_translations.dart'; import 'package:fcs/widget/progress.dart'; import '../theme/theme.dart'; @@ -33,14 +32,16 @@ class _NotificationListState extends State { appBar: AppBar( centerTitle: true, leading: new IconButton( - icon: new Icon(Icons.close, ), + icon: new Icon( + Icons.close, + ), onPressed: () => Navigator.of(context).pop(), ), backgroundColor: primaryColor, title: LocalText( context, - 'noti.title', - fontSize: 18, + 'noti.list.title', + fontSize: 20, color: Colors.white, ), ), @@ -65,12 +66,11 @@ class _NotificationListState extends State { padding: const EdgeInsets.symmetric(vertical: 10.0), child: new Row( children: [ - // new Padding( - // padding: new EdgeInsets.symmetric( - // horizontal: 32.0 - dotSize / 2), - // child: Icon(Icons.message), - // ), - new Padding(padding: EdgeInsets.only(left: 10)), + new Padding( + padding: new EdgeInsets.symmetric( + horizontal: 32.0 - dotSize / 2), + child: Icon(Icons.message,color: primaryColor,), + ), new Expanded( child: new Column( crossAxisAlignment: @@ -85,20 +85,24 @@ class _NotificationListState extends State { noti.marketPlace == null ? Container() : Padding( - padding: const EdgeInsets.only(top:8.0), - child: new Text( + padding: const EdgeInsets.only( + top: 8.0), + child: new Text( noti.marketPlace, style: new TextStyle( fontSize: 15.0, color: primaryColor), ), - ), + ), Padding( - padding: const EdgeInsets.only(top:8.0), + padding: + const EdgeInsets.only(top: 8.0), child: new Text( - noti.status == null ? "" : noti.status, + noti.status == null + ? "" + : noti.status, style: new TextStyle( - fontSize: 16.0, + fontSize: 15.0, color: Colors.grey), ), ), @@ -123,7 +127,7 @@ class _NotificationListState extends State { ) ], ), - ), + ), ], ); }), diff --git a/lib/pages/po/shipment_list.dart b/lib/pages/po/shipment_list.dart deleted file mode 100644 index 0263b14..0000000 --- a/lib/pages/po/shipment_list.dart +++ /dev/null @@ -1,163 +0,0 @@ -import 'package:fcs/vo/shipment.dart'; -import 'package:flutter/material.dart'; -import 'package:intl/intl.dart'; -import 'package:provider/provider.dart'; -import 'package:fcs/theme/theme.dart'; -import 'package:fcs/widget/progress.dart'; - -import '../../model/announcement_model.dart'; -import '../../widget/local_text.dart'; -import '../util.dart'; - -class ShipmentList extends StatefulWidget { - @override - _ShipmentListState createState() => _ShipmentListState(); -} - -class _ShipmentListState extends State { - var dateFormatter = new DateFormat('dd MMM yyyy'); - final double dotSize = 10.0; - String status; - - bool _isLoading = false; - - @override - void initState() { - super.initState(); - } - - @override - void dispose() { - super.dispose(); - } - - @override - Widget build(BuildContext context) { - var shipmentModel = Provider.of(context); - final addbutton = Container( - padding: EdgeInsets.only(left: 10, right: 10, top: 10), - child: Container( - height: 45.0, - decoration: BoxDecoration( - color: primaryColor, - shape: BoxShape.rectangle, - borderRadius: BorderRadius.all(Radius.circular(10.0))), - child: ButtonTheme( - minWidth: 900.0, - height: 100.0, - child: FlatButton( - onPressed: () { - // Navigator.push( - // context, - // MaterialPageRoute( - // builder: (context) => ManualPage( - // marketplace: 'Amazon', - // ))); - }, - child: LocalText( - context, - 'shipment.add', - color: Colors.white, - fontSize: 16, - fontWeight: FontWeight.bold, - ), - ), - ), - ), - ); - - return LocalProgress( - inAsyncCall: _isLoading, - child: Scaffold( - appBar: AppBar( - backgroundColor: primaryColor, - title: LocalText(context, 'shipment.title', - fontSize: 18, color: Colors.white), - ), - body: Column( - children: [ - Expanded( - child: new ListView.builder( - scrollDirection: Axis.vertical, - padding: EdgeInsets.only(left: 15, right: 15, top: 15), - shrinkWrap: true, - itemCount: shipmentModel.shipments.length, - itemBuilder: (BuildContext context, int index) { - Shipment _shipment = shipmentModel.shipments[index]; - return Card( - elevation: 10, - color: Colors.white, - child: InkWell( - onTap: () { - // Navigator.push( - // context, - // MaterialPageRoute( - // builder: (context) => POSubmissionForm( - // poSubmission: _shipment, - // )), - // ); - }, - child: Row( - children: [ - Expanded( - child: new Padding( - padding: - const EdgeInsets.symmetric(vertical: 16.0), - child: new Row( - children: [ - new Padding( - padding: new EdgeInsets.symmetric( - horizontal: 15.0 - dotSize / 2), - child: Padding( - padding: EdgeInsets.all(5.0), - child: Image.asset( - "assets/truck.png", - width: 40, - height: 40, - color: primaryColor, - ), - ), - ), - new Expanded( - child: new Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - new Text( - _shipment.shipmentNumber.toString(), - style: new TextStyle( - fontSize: 12.0, - color: Colors.black), - ), - new Text( - dateFormatter - .format(_shipment.shipDate), - style: new TextStyle( - fontSize: 12.0, - color: Colors.grey), - ), - ], - ), - ), - ], - ), - ), - ), - Padding( - padding: const EdgeInsets.only(right: 18.0), - child: getStatus(_shipment.status), - ), - ], - ), - ), - ); - }), - ), - addbutton, - SizedBox(height: 15) - ], - ), - ), - ); - } -} diff --git a/lib/pages/shipment_editor.dart b/lib/pages/shipment_editor.dart new file mode 100644 index 0000000..8f61321 --- /dev/null +++ b/lib/pages/shipment_editor.dart @@ -0,0 +1,371 @@ +import 'package:fcs/model/main_model.dart'; +import 'package:fcs/model/shipment_model.dart'; +import 'package:fcs/pages/util.dart'; +import 'package:fcs/vo/shipment.dart'; +import 'package:fcs/vo/user.dart'; +import 'package:fcs/widget/label_widgets.dart'; +import 'package:flutter_icons/flutter_icons.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'package:intl/intl.dart'; +import 'package:provider/provider.dart'; +import 'package:fcs/widget/localization/app_translations.dart'; + +import 'package:flutter/material.dart'; +import 'package:fcs/widget/progress.dart'; + +import '../theme/theme.dart'; + +class ShipmentEditor extends StatefulWidget { + final Shipment shipment; + ShipmentEditor({this.shipment}); + + @override + _ShipmentEditorState createState() => _ShipmentEditorState(); +} + +class _ShipmentEditorState extends State { + var dateFormatter = new DateFormat('dd MMM yyyy'); + TextEditingController _shipmentNumberController = new TextEditingController(); + TextEditingController _cutoffDateController = new TextEditingController(); + TextEditingController _arrivalDateController = new TextEditingController(); + TextEditingController _departureDateControler = new TextEditingController(); + TextEditingController _consigneeController = new TextEditingController(); + TextEditingController _portController = new TextEditingController(); + TextEditingController _destinationController = new TextEditingController(); + TextEditingController _statusController = new TextEditingController(); + TextEditingController _remarkController = new TextEditingController(); + + Shipment _shipment = new Shipment(); + bool _isLoading = false; + String _currentShipment; + + @override + void initState() { + super.initState(); + if (widget.shipment != null) { + _shipment = widget.shipment; + _shipmentNumberController.text = _shipment.shipmentNumber; + _arrivalDateController.text = dateFormatter.format(_shipment.arrivalDate); + _departureDateControler.text = + dateFormatter.format(_shipment.departureDate); + _statusController.text = _shipment.status; + } + } + + @override + void dispose() { + super.dispose(); + } + + Widget _showCustomerData(User customer) { + return Column( + children: [ + Padding( + padding: const EdgeInsets.only(left: 10.0, top: 8), + child: Text( + customer.name, + style: TextStyle( + color: Colors.black87, + fontSize: 18, + fontWeight: FontWeight.bold), + ), + ), + Padding( + padding: const EdgeInsets.only(left: 10.0, top: 8), + child: Text( + customer.phoneNumber, + style: TextStyle( + color: Colors.black87, + fontSize: 18, + fontWeight: FontWeight.bold), + ), + ), + widget.shipment == null + ? Container() + : Padding( + padding: const EdgeInsets.only(left: 10.0, top: 8), + child: Text( + _shipmentNumberController.text, + style: TextStyle( + color: Colors.black87, + fontSize: 16, + fontWeight: FontWeight.bold), + ), + ), + ], + ); + } + + Widget showShipmentNumber(BuildContext context) { + return Container( + padding: EdgeInsets.only(top: 10), + child: Row( + children: [ + Icon(Icons.text_rotation_none), + Padding( + padding: const EdgeInsets.only(right: 8.0), + child: labeledText( + context, _shipmentNumberController.text, "shipment.number"), + ), + ], + ), + ); + } + + Widget showShipmentTypes(BuildContext context, ShipmentModel shipmentModel) { + return Row( + mainAxisSize: MainAxisSize.max, + children: [ + Icon(MaterialCommunityIcons.box_shadow), + SizedBox( + width: 10, + ), + new Flexible( + child: Container( + width: 200.0, + child: DropdownButton( + value: _currentShipment, + isExpanded: true, + hint: Text( + 'Select shipment type', + ), + onChanged: changedDropDown, + items: shipmentModel.shipmentType + .map>((String shipment) { + return new DropdownMenuItem( + value: shipment, + child: new Text(shipment, + style: + new TextStyle(color: Colors.black87, fontSize: 17)), + ); + }).toList(), + ), + ), + ), + ], + ); + } + + void changedDropDown(selected) { + setState(() { + _currentShipment = selected; + }); + } + + @override + Widget build(BuildContext context) { + var shipmentModel = Provider.of(context); + + final statusBox = Container( + padding: EdgeInsets.only(top: 10), + child: TextFormField( + maxLines: null, + controller: _statusController, + cursorColor: primaryColor, + style: textStyle, + decoration: new InputDecoration( + labelText: 'Status', + labelStyle: TextStyle(fontSize: 14, color: Colors.grey), + enabledBorder: UnderlineInputBorder( + borderSide: BorderSide(color: primaryColor, width: 1.0)), + focusedBorder: UnderlineInputBorder( + borderSide: BorderSide(color: primaryColor, width: 1.0)), + ), + )); + + MainModel mainModel = Provider.of(context); + + final commercialBtn = Container( + padding: EdgeInsets.only(top: 20), + child: Align( + alignment: Alignment.bottomCenter, + child: Center( + child: Container( + width: 250, + child: FlatButton( + child: Text('Download commercial invoice'), + color: primaryColor, + textColor: Colors.white, + onPressed: () { + Navigator.pop(context); + }, + ), + ))), + ); + + final packingBtn = Container( + padding: EdgeInsets.only(top: 5), + child: Align( + alignment: Alignment.bottomCenter, + child: Center( + child: Container( + width: 250, + child: FlatButton( + child: Text('Download packing list'), + color: primaryColor, + textColor: Colors.white, + onPressed: () { + Navigator.pop(context); + }, + ), + ))), + ); + + final dmsBtn = Container( + padding: EdgeInsets.only(top: 5), + child: Align( + alignment: Alignment.bottomCenter, + child: Center( + child: Container( + width: 250, + child: FlatButton( + child: Text('Download DMS'), + color: primaryColor, + textColor: Colors.white, + onPressed: () { + Navigator.pop(context); + }, + ), + ))), + ); + + final createBtn = Container( + padding: EdgeInsets.only(top: 20), + child: Align( + alignment: Alignment.bottomCenter, + child: Center( + child: Container( + width: 250, + child: FlatButton( + child: Text('Create'), + color: primaryColor, + textColor: Colors.white, + onPressed: () { + Navigator.pop(context); + }, + ), + ))), + ); + final updateBtn = Container( + padding: EdgeInsets.only(top: 5), + child: Align( + alignment: Alignment.bottomCenter, + child: Center( + child: Container( + width: 250, + child: FlatButton( + child: Text('Update'), + color: primaryColor, + textColor: Colors.white, + onPressed: () { + Navigator.pop(context); + }, + ), + ))), + ); + return LocalProgress( + inAsyncCall: _isLoading, + child: Scaffold( + appBar: AppBar( + centerTitle: true, + leading: new IconButton( + icon: new Icon(Icons.close), + onPressed: () => Navigator.of(context).pop(), + ), + backgroundColor: primaryColor, + title: Text(AppTranslations.of(context).text("shipment.form.title")), + ), + body: Card( + child: Column( + children: [ + Expanded( + child: Padding( + padding: const EdgeInsets.all(10.0), + child: ListView(children: [ + _showCustomerData(mainModel.customer), + widget.shipment == null + ? fcsInput('Shipment number', Icons.text_rotation_none, + controller: _shipmentNumberController) + : Container(), + widget.shipment == null + ? Container( + padding: EdgeInsets.only(top: 15), + child: fcsInput('Cutoff date', Icons.date_range, + controller: _cutoffDateController), + ) + : Container(), + widget.shipment == null + ? Container( + padding: EdgeInsets.only(top: 15), + child: showShipmentTypes(context, shipmentModel)) + : Container(), + Container( + padding: EdgeInsets.only(top: 15), + child: fcsInput('Arrival date', Icons.date_range, + controller: _arrivalDateController), + ), + Container( + padding: EdgeInsets.only(top: 15), + child: fcsInput('Departure date', Icons.date_range, + controller: _departureDateControler), + ), + widget.shipment == null + ? Container( + padding: EdgeInsets.only(top: 15), + child: fcsInput('Consignee', Icons.work, + controller: _consigneeController), + ) + : Container(), + widget.shipment == null + ? Container( + padding: EdgeInsets.only(top: 15), + child: fcsInput( + 'Port of loading', FontAwesomeIcons.ship, + controller: _portController), + ) + : Container(), + widget.shipment == null + ? Container( + padding: EdgeInsets.only(top: 15), + child: fcsInput('Final destination', + MaterialCommunityIcons.location_enter, + controller: _destinationController), + ) + : Container(), + widget.shipment == null + ? Container() + : Row( + children: [ + Padding( + padding: + const EdgeInsets.only(top: 15, right: 8.0), + child: Image.asset( + 'assets/status.png', + width: 24, + height: 24, + ), + ), + Expanded(child: statusBox) + ], + ), + widget.shipment == null + ? Container() + : Container( + padding: EdgeInsets.only(top: 15), + child: fcsInput('Remark', MaterialCommunityIcons.note, + controller: _remarkController), + ), + widget.shipment == null ? Container() : commercialBtn, + widget.shipment == null ? Container() : packingBtn, + widget.shipment == null ? Container() : dmsBtn, + widget.shipment == null ? createBtn : updateBtn, + SizedBox(height: 15) + ]), + )), + ], + ), + ), + ), + ); + } +} diff --git a/lib/pages/shipment_list.dart b/lib/pages/shipment_list.dart new file mode 100644 index 0000000..cf041fc --- /dev/null +++ b/lib/pages/shipment_list.dart @@ -0,0 +1,156 @@ +import 'package:fcs/model/shipment_model.dart'; +import 'package:fcs/widget/local_text.dart'; +import 'package:provider/provider.dart'; +import 'package:fcs/pages/search_page.dart'; +import 'package:fcs/vo/buyer.dart'; +import 'package:fcs/widget/localization/app_translations.dart'; + +import 'package:flutter/material.dart'; +import 'package:fcs/widget/progress.dart'; + +import '../theme/theme.dart'; +import 'shipment_editor.dart'; +import 'shipment_list_row.dart'; + +class ShipmentList extends StatefulWidget { + @override + _ShipmentListState createState() => _ShipmentListState(); +} + +class _ShipmentListState extends State { + Buyer buyer; + bool _isLoading = false; + + @override + void initState() { + super.initState(); + } + + @override + void dispose() { + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return LocalProgress( + inAsyncCall: _isLoading, + child: DefaultTabController( + length: 3, + child: Scaffold( + appBar: AppBar( + centerTitle: true, + leading: new IconButton( + icon: new Icon(Icons.close), + onPressed: () => Navigator.of(context).pop(), + ), + backgroundColor: primaryColor, + title: LocalText(context, 'shipment.list.title', + color: Colors.white, fontSize: 20), + actions: [ + IconButton( + icon: Icon( + Icons.search, + color: Colors.white, + ), + iconSize: 30, + onPressed: () => showPlacesSearch(context), + ), + ], + bottom: TabBar( + unselectedLabelColor: Colors.grey, + tabs: [ + Tab( + text: "Upcoming", + ), + Tab(text: "Completed"), + Tab(text: "Canceled"), + ], + ), + ), + floatingActionButton: FloatingActionButton.extended( + onPressed: () { + _newShipment(); + }, + icon: Icon(Icons.add), + label: Text(AppTranslations.of(context).text("shipment.add")), + backgroundColor: primaryColor, + ), + body: TabBarView( + children: [_upComing(), _completed(), _canceled()], + )), + ), + ); + } + + _newShipment() { + Navigator.push( + context, + MaterialPageRoute(builder: (context) => new ShipmentEditor()), + ); + } + + Widget _upComing() { + var shipmentModel = Provider.of(context); + return Column( + children: [ + Expanded( + child: new ListView.separated( + separatorBuilder: (context, index) => Divider( + color: Colors.black, + ), + scrollDirection: Axis.vertical, + padding: EdgeInsets.only(top: 15), + shrinkWrap: true, + itemCount: shipmentModel.upcoming.length, + itemBuilder: (BuildContext context, int index) { + return ShipmentListRow(shipment: shipmentModel.upcoming[index]); + }), + ), + ], + ); + } + + Widget _completed() { + var shipmentModel = Provider.of(context); + return Column( + children: [ + Expanded( + child: new ListView.separated( + separatorBuilder: (context, index) => Divider( + color: Colors.black, + ), + scrollDirection: Axis.vertical, + padding: EdgeInsets.only(top: 15), + shrinkWrap: true, + itemCount: shipmentModel.completed.length, + itemBuilder: (BuildContext context, int index) { + return ShipmentListRow( + shipment: shipmentModel.completed[index]); + }), + ), + ], + ); + } + + Widget _canceled() { + var shipmentModel = Provider.of(context); + return Column( + children: [ + Expanded( + child: new ListView.separated( + separatorBuilder: (context, index) => Divider( + color: Colors.black, + ), + scrollDirection: Axis.vertical, + padding: EdgeInsets.only(top: 15), + shrinkWrap: true, + itemCount: shipmentModel.canceled.length, + itemBuilder: (BuildContext context, int index) { + return ShipmentListRow(shipment: shipmentModel.canceled[index]); + }), + ), + ], + ); + } +} diff --git a/lib/pages/shipment_list_row.dart b/lib/pages/shipment_list_row.dart new file mode 100644 index 0000000..7aca79d --- /dev/null +++ b/lib/pages/shipment_list_row.dart @@ -0,0 +1,97 @@ +import 'package:fcs/theme/theme.dart'; +import 'package:fcs/vo/shipment.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_icons/flutter_icons.dart'; +import 'package:intl/intl.dart'; + +import 'shipment_editor.dart'; +import 'util.dart'; + +class ShipmentListRow extends StatefulWidget { + final Shipment shipment; + const ShipmentListRow({this.shipment}); + + @override + _ShipmentListRowState createState() => _ShipmentListRowState(); +} + +class _ShipmentListRowState extends State { + var dateFormatter = new DateFormat('dd MMM yyyy'); + final double dotSize = 15.0; + Shipment _shipment = new Shipment(); + + @override + void initState() { + super.initState(); + + if (widget.shipment != null) { + _shipment = widget.shipment; + } + } + + @override + Widget build(BuildContext context) { + return Container( + padding: EdgeInsets.only(left: 15, right: 15), + child: InkWell( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => ShipmentEditor(shipment: _shipment)), + ); + }, + child: Row( + children: [ + Expanded( + child: new Padding( + padding: const EdgeInsets.symmetric(vertical: 10.0), + child: new Row( + children: [ + Container( + padding: EdgeInsets.only(left: 5, right: 10), + child: Icon( + Ionicons.ios_airplane, + color: primaryColor, + size: 30, + ), + ), + new Expanded( + child: new Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only(left: 8.0), + child: new Text( + _shipment.shipmentNumber == null + ? '' + : _shipment.shipmentNumber, + style: new TextStyle( + fontSize: 15.0, color: Colors.black), + ), + ), + Padding( + padding: const EdgeInsets.only(left: 10.0, top: 10), + child: new Text( + dateFormatter.format(_shipment.shipDate), + style: new TextStyle( + fontSize: 15.0, color: Colors.grey), + ), + ) + ], + ), + ), + ], + ), + ), + ), + Padding( + padding: const EdgeInsets.all(0), + child: getStatus(_shipment.status), + ), + ], + ), + ), + ); + } +} diff --git a/lib/pages/signin_page.dart b/lib/pages/signin_page.dart index cb6728b..91e6c7c 100644 --- a/lib/pages/signin_page.dart +++ b/lib/pages/signin_page.dart @@ -36,6 +36,11 @@ class _SigninPageState extends State { inAsyncCall: _isLoading, child: new Scaffold( appBar: AppBar( + centerTitle: true, + leading: new IconButton( + icon: new Icon(Icons.close), + onPressed: () => Navigator.of(context).pop(), + ), backgroundColor: primaryColor, ), body: _buildLogin(context), @@ -53,7 +58,7 @@ class _SigninPageState extends State { context, 'login.title', fontSize: 21, - color: secondaryColor, + color: primaryColor, fontWeight: FontWeight.bold, ), ), @@ -89,31 +94,27 @@ class _SigninPageState extends State { ), Flexible( child: Container( - padding: EdgeInsets.only(top: 10, bottom: 10), - child: TextFormField( - autofocus: true, - controller: phonenumberCtl, - cursorColor: primaryColor, - keyboardType: TextInputType.phone, - textAlign: TextAlign.left, - style: TextStyle( - fontSize: 18, - ), - decoration: InputDecoration( - contentPadding: EdgeInsets.all(8.0), - enabledBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(12.0)), + padding: EdgeInsets.only(top: 10, bottom: 10), + child: TextFormField( + controller: phonenumberCtl, + cursorColor: primaryColor, + textAlign: TextAlign.left, + autofocus: true, + keyboardType: TextInputType.phone, + style: TextStyle( + fontSize: 18, + ), + decoration: new InputDecoration( + contentPadding: EdgeInsets.only(top: 8), + enabledBorder: UnderlineInputBorder( borderSide: - BorderSide(color: Colors.grey[400], width: 1), - ), - focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(10.0)), - borderSide: BorderSide( - color: Colors.grey[400], - ), - ), - ), - )), + BorderSide(color: primaryColor, width: 1.0)), + focusedBorder: UnderlineInputBorder( + borderSide: + BorderSide(color: primaryColor, width: 1.0)), + ), + ), + ), ), ], ), @@ -167,7 +168,7 @@ class _SigninPageState extends State { MaterialPageRoute( builder: (context) => CodePage(phoneNumber: phoneNumber))); Navigator.pop(context); - + if (exp != null) throw exp; } catch (e) { showMsgDialog(context, "Error", e.toString()); diff --git a/lib/pages/staff_editor.dart b/lib/pages/staff_editor.dart index 31003c2..568f197 100644 --- a/lib/pages/staff_editor.dart +++ b/lib/pages/staff_editor.dart @@ -10,7 +10,6 @@ import 'package:fcs/vo/user.dart'; import 'package:fcs/widget/local_text.dart'; import 'package:fcs/widget/localization/app_translations.dart'; import 'package:fcs/widget/progress.dart'; -import 'document_log_page.dart'; import 'util.dart'; typedef void FindCallBack(); @@ -112,16 +111,9 @@ class _StaffEditorState extends State { focusedBorder: UnderlineInputBorder( borderSide: BorderSide(color: primaryColor, width: 1.0)), ), - validator: (value) { - if (value.isEmpty) { - return "Please enter phone number"; - } - return null; - }, ), new FlatButton( onPressed: () { - if (!_formKey.currentState.validate()) return; this.isSend = true; findCallBack(); }, @@ -189,9 +181,9 @@ class _StaffEditorState extends State { child: Container( height: 45.0, decoration: BoxDecoration( - color: primaryColor, - shape: BoxShape.rectangle, - borderRadius: BorderRadius.all(Radius.circular(10.0))), + color: primaryColor, + shape: BoxShape.rectangle, + ), child: ButtonTheme( minWidth: 900.0, height: 100.0, @@ -208,25 +200,23 @@ class _StaffEditorState extends State { ), ), ); + final addButton = Container( - padding: EdgeInsets.only( - left: 24.0, - right: 24.0, - ), + padding: EdgeInsets.only(top: 40), child: Container( height: 45.0, - color: primaryColor, + decoration: BoxDecoration( + color: primaryColor, + shape: BoxShape.rectangle, + ), child: ButtonTheme( minWidth: 900.0, height: 100.0, child: FlatButton( - onPressed: () { - if (!_formKey.currentState.validate()) return; - _add(context); - }, + onPressed: () {}, child: LocalText( context, - 'employee.add', + 'staff.add', color: Colors.white, fontSize: 16, fontWeight: FontWeight.bold, @@ -240,6 +230,11 @@ class _StaffEditorState extends State { inAsyncCall: _isLoading, child: Scaffold( appBar: AppBar( + centerTitle: true, + leading: new IconButton( + icon: new Icon(Icons.close), + onPressed: () => Navigator.of(context).pop(), + ), backgroundColor: primaryColor, title: LocalText( context, @@ -276,7 +271,7 @@ class _StaffEditorState extends State { Column( children: showprivilegeList(context, userModel), ), - updateButton, + widget.staff == null ? addButton : updateButton, SizedBox( height: 20, ) @@ -315,8 +310,7 @@ class _StaffEditorState extends State { if (widget.staff == null) return; var employeeModel = Provider.of(context); try { - await employeeModel.updatePrivileges( - widget.staff.docID, privilegesIDs()); + await employeeModel.updatePrivileges(widget.staff.docID, privilegesIDs()); Navigator.pop(context); } catch (e) { showMsgDialog(context, "Error", e.toString()); diff --git a/lib/pages/staff_list.dart b/lib/pages/staff_list.dart index c1708f2..ff6bb55 100644 --- a/lib/pages/staff_list.dart +++ b/lib/pages/staff_list.dart @@ -1,4 +1,6 @@ +import 'package:fcs/widget/localization/app_translations.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_icons/flutter_icons.dart'; import 'package:intl/intl.dart'; import 'package:provider/provider.dart'; @@ -30,58 +32,64 @@ class _StaffListState extends State { inAsyncCall: _isLoading, child: Scaffold( appBar: AppBar( + centerTitle: true, + leading: new IconButton( + icon: new Icon(Icons.close), + onPressed: () => Navigator.of(context).pop(), + ), backgroundColor: primaryColor, title: LocalText( context, - 'staff.title', + 'staff.list.title', color: Colors.white, - fontSize: 18, + fontSize: 20, ), ), - // floatingActionButton: FloatingActionButton( - // backgroundColor: primaryColor, - // child: Icon(Icons.add), - // onPressed: () { - // Navigator.push( - // context, - // MaterialPageRoute(builder: (context) => EmployeeEditor()), - // ); - // }, - // ), - body: new ListView.builder( - padding: EdgeInsets.only(left: 10, right: 10, top: 15), + floatingActionButton: FloatingActionButton.extended( + onPressed: () { + Navigator.push( + context, + MaterialPageRoute(builder: (context) => StaffEditor()), + ); + }, + icon: Icon(Icons.add), + label: Text(AppTranslations.of(context).text("staff.new")), + backgroundColor: primaryColor, + ), + body: new ListView.separated( + separatorBuilder: (context, index) => Divider( + color: Colors.black, + ), + scrollDirection: Axis.vertical, + padding: EdgeInsets.only(left: 15, right: 15, top: 15), shrinkWrap: true, itemCount: employeeModel.employees.length, itemBuilder: (BuildContext context, int index) { - User _user = employeeModel.employees[index]; - return Container( - child: Card( - elevation: 10, - color: Colors.white, - child: InkWell( + User user = employeeModel.employees[index]; + return Stack( + children: [ + InkWell( onTap: () { Navigator.push( context, MaterialPageRoute( - builder: (context) => - StaffEditor(staff: _user)), + builder: (context) => StaffEditor(staff: user)), ); }, child: Row( children: [ Expanded( child: new Padding( - padding: const EdgeInsets.symmetric(vertical: 20.0), + padding: const EdgeInsets.symmetric(vertical: 10.0), child: new Row( children: [ new Padding( padding: new EdgeInsets.symmetric( horizontal: 32.0 - dotSize / 2), - child: Image.asset( - "assets/employee.png", - width: 40, - height: 40, + child: Icon( + SimpleLineIcons.people, color: primaryColor, + size: 40, ), ), new Expanded( @@ -90,16 +98,20 @@ class _StaffListState extends State { CrossAxisAlignment.start, children: [ new Text( - _user.name, + user.name, style: new TextStyle( fontSize: 15.0, - color: secondaryColor), + color: primaryColor), ), - new Text( - _user.phoneNumber, - style: new TextStyle( - fontSize: 13.0, - color: secondaryColor), + Padding( + padding: + const EdgeInsets.only(top: 8.0), + child: new Text( + user.phoneNumber, + style: new TextStyle( + fontSize: 15.0, + color: Colors.grey), + ), ), ], ), @@ -108,20 +120,10 @@ class _StaffListState extends State { ), ), ), - _user.status == null - ? Container() - : Row( - children: [ - Padding( - padding: const EdgeInsets.all(8.0), - child: getStatus(_user.status), - ), - ], - ) ], ), ), - ), + ], ); }), ), diff --git a/lib/pages/user_edit.dart b/lib/pages/user_edit.dart index c7cd89c..08c8ec8 100644 --- a/lib/pages/user_edit.dart +++ b/lib/pages/user_edit.dart @@ -1,9 +1,9 @@ import 'package:fcs/model/shared_pref.dart'; +import 'package:fcs/widget/localization/app_translations.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; -import '../theme/theme.dart'; import '../theme/theme.dart'; import '../widget/local_text.dart'; import '../widget/progress.dart'; @@ -29,6 +29,11 @@ class _UserEditPageState extends State { inAsyncCall: _isLoading, child: new Scaffold( appBar: AppBar( + centerTitle: true, + leading: new IconButton( + icon: new Icon(Icons.close), + onPressed: () => Navigator.of(context).pop(), + ), backgroundColor: primaryColor, ), body: _buildBody(context), @@ -38,7 +43,7 @@ class _UserEditPageState extends State { Widget _buildBody(BuildContext context) { return ListView( - padding: EdgeInsets.only(top: 5, left: 15, right: 15), + padding: EdgeInsets.only(top: 5, left: 10, right: 10), children: [ Container( padding: EdgeInsets.only(top: 40), @@ -46,7 +51,7 @@ class _UserEditPageState extends State { context, 'user_edit.welcome', fontSize: 21, - color: secondaryColor, + color: primaryColor, fontWeight: FontWeight.bold, ), ), @@ -60,28 +65,21 @@ class _UserEditPageState extends State { ), ), Container( - padding: EdgeInsets.only(top: 10, bottom: 10), + padding: EdgeInsets.only(top: 0, bottom: 10), child: TextFormField( - autofocus: true, controller: nameCtl, cursorColor: primaryColor, - keyboardType: TextInputType.text, textAlign: TextAlign.left, + keyboardType: TextInputType.text, + autofocus: true, style: TextStyle( fontSize: 18, ), - decoration: InputDecoration( - contentPadding: EdgeInsets.all(8.0), - enabledBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(12.0)), - borderSide: BorderSide(color: Colors.grey[400], width: 1), - ), - focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(10.0)), - borderSide: BorderSide( - color: Colors.grey[400], - ), - ), + decoration: new InputDecoration( + enabledBorder: UnderlineInputBorder( + borderSide: BorderSide(color: primaryColor, width: 1.0)), + focusedBorder: UnderlineInputBorder( + borderSide: BorderSide(color: primaryColor, width: 1.0)), ), )), SizedBox( diff --git a/lib/pages/util.dart b/lib/pages/util.dart index 8102ea5..2b22822 100644 --- a/lib/pages/util.dart +++ b/lib/pages/util.dart @@ -200,17 +200,9 @@ void showCommentDialog(BuildContext context, commentCallback(comment)) { Widget getStatus(String status) { return status == "Delivered" - ? Chip( - backgroundColor: Colors.green, - avatar: Icon( - Icons.check, - color: Colors.white, - size: 14, - ), - label: Text( - status, - style: TextStyle(color: Colors.white, fontSize: 12), - )) + ? Text(status, + style: TextStyle( + color: primaryColor, fontSize: 18, fontWeight: FontWeight.bold)) : status == "rejected" ? Chip( backgroundColor: Colors.red, @@ -224,17 +216,10 @@ Widget getStatus(String status) { style: TextStyle(color: Colors.white, fontSize: 12), )) : status == "In progress" - ? Chip( - backgroundColor: Colors.red, - avatar: Icon( - Icons.timelapse, - color: Colors.white, - size: 14, - ), - label: Text( - status, - style: TextStyle(color: Colors.white, fontSize: 12), - )) + ? Text( + status, + style: TextStyle(color: Colors.white, fontSize: 12), + ) : status == "Pickuped" ? Text( status, @@ -400,7 +385,7 @@ Widget phoneWidget(BuildContext context, String phone) { } Widget fcsInput(String label, IconData iconData, - {TextEditingController controller,String value}) { + {TextEditingController controller, String value}) { return Row( children: [ Padding( @@ -409,17 +394,17 @@ Widget fcsInput(String label, IconData iconData, ), Expanded( child: Container( - height: 50.0, child: Row(children: [ Expanded( child: TextFormField( - initialValue: value, + initialValue: value, controller: controller, cursorColor: primaryColor, textAlign: TextAlign.left, decoration: new InputDecoration( contentPadding: EdgeInsets.only(top: 8), labelText: label, + labelStyle: TextStyle(fontSize: 14, color: Colors.grey), enabledBorder: UnderlineInputBorder( borderSide: BorderSide(color: primaryColor, width: 1.0)), focusedBorder: UnderlineInputBorder( @@ -473,7 +458,7 @@ Widget _dropDown() { ); } -Widget fcsButton(BuildContext context, String text,{Function callack}) { +Widget fcsButton(BuildContext context, String text, {Function callack}) { return Container( padding: EdgeInsets.only(left: 10, right: 10, top: 10), child: Container( diff --git a/lib/vo/shipment.dart b/lib/vo/shipment.dart index 15be16d..1c3f321 100644 --- a/lib/vo/shipment.dart +++ b/lib/vo/shipment.dart @@ -1,6 +1,25 @@ class Shipment { DateTime shipDate; String shipmentNumber; + DateTime cutoffDate; + String shipType; + DateTime arrivalDate; + DateTime departureDate; + String consignee; + String port; + String destination; String status; - Shipment({this.shipDate, this.shipmentNumber,this.status}); + String remark; + Shipment( + {this.shipDate, + this.shipmentNumber, + this.cutoffDate, + this.shipType, + this.status, + this.arrivalDate, + this.departureDate, + this.consignee, + this.port, + this.destination, + this.remark}); }