add home screen and shipping addresses
This commit is contained in:
@@ -26,6 +26,7 @@ class PickUpEditor extends StatefulWidget {
|
||||
|
||||
class _PickUpEditorState extends State<PickUpEditor> {
|
||||
var dateFormatter = new DateFormat('dd MMM yyyy');
|
||||
final numberFormatter = new NumberFormat("#,###");
|
||||
|
||||
TextEditingController _addressEditingController = new TextEditingController();
|
||||
TextEditingController _fromTimeEditingController =
|
||||
@@ -41,6 +42,7 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
||||
TextEditingController _recipientAddressEditingController =
|
||||
new TextEditingController();
|
||||
TextEditingController _pickupDate = new TextEditingController();
|
||||
TextEditingController _handlingFeeController = new TextEditingController();
|
||||
|
||||
PickUp _pickUp;
|
||||
bool _isLoading = false;
|
||||
@@ -59,6 +61,7 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
||||
_noOfPackageEditingController.text = _pickUp.numberOfPackage.toString();
|
||||
_weightEditingController.text = _pickUp.weight.toString();
|
||||
_pickupDate.text = dateFormatter.format(now);
|
||||
_handlingFeeController.text = numberFormatter.format(_pickUp.handlingFee);
|
||||
|
||||
var mainModel = Provider.of<MainModel>(context, listen: false);
|
||||
_recipientNameEditingController.text = mainModel.recipient.name;
|
||||
@@ -294,6 +297,20 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
||||
FontAwesomeIcons.weightHanging,
|
||||
controller: _weightEditingController),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 20.0),
|
||||
child: widget.pickUp == null
|
||||
? fcsInput(
|
||||
"Handling Fee", FontAwesomeIcons.moneyBill,
|
||||
controller: _handlingFeeController)
|
||||
: widget.pickUp.status == 'Pending'
|
||||
? fcsInput(
|
||||
"Handling Fee", FontAwesomeIcons.moneyBill,
|
||||
controller: _handlingFeeController)
|
||||
: fcsInputReadOnly(
|
||||
"Handling Fee", FontAwesomeIcons.moneyBill,
|
||||
controller: _handlingFeeController),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 20.0),
|
||||
child: fcsInput("Remark", MaterialCommunityIcons.note),
|
||||
@@ -301,66 +318,68 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
||||
SizedBox(height: 10.0),
|
||||
],
|
||||
),
|
||||
ExpansionTile(
|
||||
title: Text('Recipient Information'),
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 20.0),
|
||||
child: widget.pickUp == null
|
||||
? fcsInput("Name", FontAwesomeIcons.user,
|
||||
controller: _recipientNameEditingController)
|
||||
: widget.pickUp.status == 'Pending'
|
||||
? fcsInput("Name", FontAwesomeIcons.user,
|
||||
controller:
|
||||
_recipientNameEditingController)
|
||||
: fcsInputReadOnly(
|
||||
"Name", FontAwesomeIcons.user,
|
||||
controller:
|
||||
_recipientNameEditingController)),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 20.0),
|
||||
child: widget.pickUp == null
|
||||
? fcsInput("Phone Number", Icons.phone,
|
||||
controller: _recipientPhoneEditingController)
|
||||
: widget.pickUp.status == 'Pending'
|
||||
? fcsInput("Phone Number", Icons.phone,
|
||||
controller:
|
||||
_recipientPhoneEditingController)
|
||||
: fcsInputReadOnly(
|
||||
"Phone Number", Icons.phone,
|
||||
controller:
|
||||
_recipientPhoneEditingController)),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 20.0),
|
||||
child: widget.pickUp == null
|
||||
? fcsInput("Address", Icons.location_on,
|
||||
controller:
|
||||
_recipientAddressEditingController)
|
||||
: widget.pickUp.status == 'Pending'
|
||||
? fcsInput("Address", Icons.location_on,
|
||||
controller:
|
||||
_recipientAddressEditingController)
|
||||
: fcsInputReadOnly(
|
||||
"Address", Icons.location_on,
|
||||
controller:
|
||||
_recipientAddressEditingController)),
|
||||
],
|
||||
),
|
||||
mainModel.isCustomer()?Container():
|
||||
ExpansionTile(
|
||||
title: Text('For FCS'),
|
||||
children: <Widget>[
|
||||
widget.pickUp != null
|
||||
? widget.pickUp.status == 'Pending'
|
||||
? Padding(
|
||||
padding: const EdgeInsets.only(left: 20.0),
|
||||
child: fcsDropDown("Assigned",
|
||||
MaterialCommunityIcons.worker),
|
||||
)
|
||||
: Container()
|
||||
: Container(),
|
||||
],
|
||||
),
|
||||
// ExpansionTile(
|
||||
// title: Text('Recipient Information'),
|
||||
// children: <Widget>[
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.only(left: 20.0),
|
||||
// child: widget.pickUp == null
|
||||
// ? fcsInput("Name", FontAwesomeIcons.user,
|
||||
// controller: _recipientNameEditingController)
|
||||
// : widget.pickUp.status == 'Pending'
|
||||
// ? fcsInput("Name", FontAwesomeIcons.user,
|
||||
// controller:
|
||||
// _recipientNameEditingController)
|
||||
// : fcsInputReadOnly(
|
||||
// "Name", FontAwesomeIcons.user,
|
||||
// controller:
|
||||
// _recipientNameEditingController)),
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.only(left: 20.0),
|
||||
// child: widget.pickUp == null
|
||||
// ? fcsInput("Phone Number", Icons.phone,
|
||||
// controller: _recipientPhoneEditingController)
|
||||
// : widget.pickUp.status == 'Pending'
|
||||
// ? fcsInput("Phone Number", Icons.phone,
|
||||
// controller:
|
||||
// _recipientPhoneEditingController)
|
||||
// : fcsInputReadOnly(
|
||||
// "Phone Number", Icons.phone,
|
||||
// controller:
|
||||
// _recipientPhoneEditingController)),
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.only(left: 20.0),
|
||||
// child: widget.pickUp == null
|
||||
// ? fcsInput("Address", Icons.location_on,
|
||||
// controller:
|
||||
// _recipientAddressEditingController)
|
||||
// : widget.pickUp.status == 'Pending'
|
||||
// ? fcsInput("Address", Icons.location_on,
|
||||
// controller:
|
||||
// _recipientAddressEditingController)
|
||||
// : fcsInputReadOnly(
|
||||
// "Address", Icons.location_on,
|
||||
// controller:
|
||||
// _recipientAddressEditingController)),
|
||||
// ],
|
||||
// ),
|
||||
mainModel.isCustomer()
|
||||
? Container()
|
||||
: ExpansionTile(
|
||||
title: Text('For FCS'),
|
||||
children: <Widget>[
|
||||
widget.pickUp != null
|
||||
? widget.pickUp.status == 'Pending'
|
||||
? Padding(
|
||||
padding:
|
||||
const EdgeInsets.only(left: 20.0),
|
||||
child: fcsDropDown("Assigned",
|
||||
MaterialCommunityIcons.worker),
|
||||
)
|
||||
: Container()
|
||||
: Container(),
|
||||
],
|
||||
),
|
||||
]),
|
||||
)),
|
||||
widget.pickUp == null
|
||||
|
||||
Reference in New Issue
Block a user