update shipment rate
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import 'package:fcs/model/main_model.dart';
|
||||
import 'package:fcs/model/pickup_model.dart';
|
||||
import 'package:fcs/pages/util.dart';
|
||||
import 'package:fcs/vo/cargo.dart';
|
||||
import 'package:fcs/vo/pickup.dart';
|
||||
import 'package:fcs/widget/fcs_text_field.dart';
|
||||
import 'package:fcs/widget/fcs_text_field_readonly.dart';
|
||||
@@ -70,6 +71,12 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
||||
mainModel.recipient.shippingAddress;
|
||||
} else {
|
||||
isNew = true;
|
||||
List<Cargo> _cargoTypes = [
|
||||
Cargo(type: 'General Cargo', weight: 25),
|
||||
Cargo(type: 'Medicine', weight: 20),
|
||||
Cargo(type: 'Dangerous Cargo', weight: 30)
|
||||
];
|
||||
_pickUp = PickUp(cargoTypes: _cargoTypes);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -319,50 +326,56 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
||||
],
|
||||
),
|
||||
// ExpansionTile(
|
||||
// title: Text('Recipient Information'),
|
||||
// title: Text('Box 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)),
|
||||
// SizedBox(height: 10.0),
|
||||
// ],
|
||||
// ),
|
||||
ExpansionTile(
|
||||
title: Text('Shipping Address'),
|
||||
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(
|
||||
@@ -421,7 +434,7 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
||||
child: Container(
|
||||
width: 250,
|
||||
child: FlatButton(
|
||||
child: Text('Update'),
|
||||
child: Text('Assign'),
|
||||
color: primaryColor,
|
||||
textColor: Colors.white,
|
||||
onPressed: () {
|
||||
@@ -429,6 +442,20 @@ class _PickUpEditorState extends State<PickUpEditor> {
|
||||
},
|
||||
),
|
||||
))),
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Center(
|
||||
child: Container(
|
||||
width: 250,
|
||||
child: FlatButton(
|
||||
child: Text('Complete Pickup '),
|
||||
color: primaryColor,
|
||||
textColor: Colors.white,
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
))),
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Center(
|
||||
|
||||
Reference in New Issue
Block a user