insert invoice pages
This commit is contained in:
@@ -88,7 +88,7 @@ class _ShipmentEditorState extends State<ShipmentEditor> {
|
||||
_shipmentNumberController.text,
|
||||
style: TextStyle(
|
||||
color: Colors.black87,
|
||||
fontSize: 16,
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.bold),
|
||||
),
|
||||
),
|
||||
@@ -155,24 +155,6 @@ class _ShipmentEditorState extends State<ShipmentEditor> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var shipmentModel = Provider.of<ShipmentModel>(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<MainModel>(context);
|
||||
|
||||
final commercialBtn = Container(
|
||||
@@ -183,7 +165,7 @@ class _ShipmentEditorState extends State<ShipmentEditor> {
|
||||
child: Container(
|
||||
width: 250,
|
||||
child: FlatButton(
|
||||
child: Text('Download commercial invoice'),
|
||||
child: Text('Download Commercial Invoice'),
|
||||
color: primaryColor,
|
||||
textColor: Colors.white,
|
||||
onPressed: () {
|
||||
@@ -201,7 +183,7 @@ class _ShipmentEditorState extends State<ShipmentEditor> {
|
||||
child: Container(
|
||||
width: 250,
|
||||
child: FlatButton(
|
||||
child: Text('Download packing list'),
|
||||
child: Text('Download Packing List'),
|
||||
color: primaryColor,
|
||||
textColor: Colors.white,
|
||||
onPressed: () {
|
||||
@@ -237,7 +219,7 @@ class _ShipmentEditorState extends State<ShipmentEditor> {
|
||||
child: Container(
|
||||
width: 250,
|
||||
child: FlatButton(
|
||||
child: Text('Create'),
|
||||
child: Text('Create Shipment'),
|
||||
color: primaryColor,
|
||||
textColor: Colors.white,
|
||||
onPressed: () {
|
||||
@@ -254,7 +236,7 @@ class _ShipmentEditorState extends State<ShipmentEditor> {
|
||||
child: Container(
|
||||
width: 250,
|
||||
child: FlatButton(
|
||||
child: Text('Update'),
|
||||
child: Text('Update Shipment'),
|
||||
color: primaryColor,
|
||||
textColor: Colors.white,
|
||||
onPressed: () {
|
||||
@@ -282,76 +264,117 @@ class _ShipmentEditorState extends State<ShipmentEditor> {
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: ListView(children: <Widget>[
|
||||
_showCustomerData(mainModel.customer),
|
||||
// _showCustomerData(mainModel.customer),
|
||||
widget.shipment == null
|
||||
? fcsInput('Shipment number', Icons.text_rotation_none,
|
||||
? fcsInput('Shipment Number', Icons.text_rotation_none,
|
||||
controller: _shipmentNumberController)
|
||||
: Container(),
|
||||
: Container(
|
||||
child: TextFormField(
|
||||
controller: _shipmentNumberController,
|
||||
readOnly: true,
|
||||
decoration: InputDecoration(
|
||||
fillColor: Colors.white,
|
||||
labelText: 'Shipment Number',
|
||||
labelStyle:
|
||||
TextStyle(fontSize: 16, color: Colors.grey),
|
||||
filled: true,
|
||||
enabledBorder: InputBorder.none,
|
||||
focusedBorder: InputBorder.none,
|
||||
icon: Icon(
|
||||
Icons.text_rotation_none,
|
||||
color: Colors.grey,
|
||||
),
|
||||
)),
|
||||
),
|
||||
widget.shipment == null
|
||||
? Container(
|
||||
padding: EdgeInsets.only(top: 15),
|
||||
child: fcsInput('Cutoff date', Icons.date_range,
|
||||
padding: EdgeInsets.only(top: 5),
|
||||
child: fcsInput('Cutoff Date', Icons.date_range,
|
||||
controller: _cutoffDateController),
|
||||
)
|
||||
: Container(),
|
||||
widget.shipment == null
|
||||
? Container(
|
||||
padding: EdgeInsets.only(top: 15),
|
||||
child: showShipmentTypes(context, shipmentModel))
|
||||
padding: EdgeInsets.only(top: 5),
|
||||
child: DropdownButtonFormField(
|
||||
decoration: InputDecoration(
|
||||
fillColor: Colors.white,
|
||||
labelText: 'Shipment Type',
|
||||
icon: Icon(Icons.pages)),
|
||||
items: shipmentModel.shipmentType
|
||||
.map((e) =>
|
||||
DropdownMenuItem(child: Text(e), value: e))
|
||||
.toList(),
|
||||
onChanged: (selected) => {
|
||||
setState(() {
|
||||
_currentShipment = selected;
|
||||
})
|
||||
},
|
||||
),
|
||||
)
|
||||
: Container(),
|
||||
Container(
|
||||
padding: EdgeInsets.only(top: 15),
|
||||
child: fcsInput('Arrival date', Icons.date_range,
|
||||
padding:
|
||||
EdgeInsets.only(top: widget.shipment == null ? 5 : 0),
|
||||
child: fcsInput('Arrival Date', Icons.date_range,
|
||||
controller: _arrivalDateController),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.only(top: 15),
|
||||
child: fcsInput('Departure date', Icons.date_range,
|
||||
padding: EdgeInsets.only(top: 5),
|
||||
child: fcsInput('Departure Date', Icons.date_range,
|
||||
controller: _departureDateControler),
|
||||
),
|
||||
widget.shipment == null
|
||||
? Container(
|
||||
padding: EdgeInsets.only(top: 15),
|
||||
padding: EdgeInsets.only(top: 5),
|
||||
child: fcsInput('Consignee', Icons.work,
|
||||
controller: _consigneeController),
|
||||
)
|
||||
: Container(),
|
||||
widget.shipment == null
|
||||
? Container(
|
||||
padding: EdgeInsets.only(top: 15),
|
||||
padding: EdgeInsets.only(top: 5),
|
||||
child: fcsInput(
|
||||
'Port of loading', FontAwesomeIcons.ship,
|
||||
'Port of Loading', FontAwesomeIcons.ship,
|
||||
controller: _portController),
|
||||
)
|
||||
: Container(),
|
||||
widget.shipment == null
|
||||
? Container(
|
||||
padding: EdgeInsets.only(top: 15),
|
||||
child: fcsInput('Final destination',
|
||||
padding: EdgeInsets.only(top: 5),
|
||||
child: fcsInput('Final Destination',
|
||||
MaterialCommunityIcons.location_enter,
|
||||
controller: _destinationController),
|
||||
)
|
||||
: Container(),
|
||||
widget.shipment == null
|
||||
? Container()
|
||||
: Row(
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsets.only(top: 15, right: 8.0),
|
||||
child: Image.asset(
|
||||
'assets/status.png',
|
||||
width: 24,
|
||||
height: 24,
|
||||
),
|
||||
),
|
||||
Expanded(child: statusBox)
|
||||
],
|
||||
: Container(
|
||||
padding: EdgeInsets.only(top: 5),
|
||||
child: TextFormField(
|
||||
controller: _statusController,
|
||||
cursorColor: primaryColor,
|
||||
decoration: InputDecoration(
|
||||
fillColor: Colors.white,
|
||||
labelText: 'Status',
|
||||
filled: true,
|
||||
labelStyle:
|
||||
TextStyle(fontSize: 16, color: Colors.grey),
|
||||
focusedBorder: UnderlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: Colors.grey, width: 1.0)),
|
||||
icon: Image.asset(
|
||||
'assets/status.png',
|
||||
width: 24,
|
||||
height: 24,
|
||||
color: Colors.grey[700],
|
||||
),
|
||||
)),
|
||||
),
|
||||
widget.shipment == null
|
||||
? Container()
|
||||
: Container(
|
||||
padding: EdgeInsets.only(top: 15),
|
||||
padding: EdgeInsets.only(top: 5),
|
||||
child: fcsInput('Remark', MaterialCommunityIcons.note,
|
||||
controller: _remarkController),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user