add fcs shipment info
This commit is contained in:
@@ -252,14 +252,17 @@ class _ShipmentBoxEditorState extends State<ShipmentBoxEditor> {
|
||||
cells: [
|
||||
MyDataCell(Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: Text("Total",
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
)),
|
||||
child: LocalText(
|
||||
context,
|
||||
"shipment.cargo.total",
|
||||
color: Colors.black87,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
|
||||
)),
|
||||
MyDataCell(
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 45.0),
|
||||
padding: const EdgeInsets.only(right: 48.0),
|
||||
child: Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: Text(total.toString(),
|
||||
|
||||
@@ -181,6 +181,13 @@ class _ShipmentEditorState extends State<ShipmentEditor> {
|
||||
selectedValue: _selectedPickupType,
|
||||
values: pickupModel.pickupTypes,
|
||||
);
|
||||
final createBtn = LocalButton(
|
||||
textKey: "shipment.create",
|
||||
);
|
||||
|
||||
final updateBtn = LocalButton(
|
||||
textKey: "shipment.update",
|
||||
);
|
||||
|
||||
return LocalProgress(
|
||||
inAsyncCall: _isLoading,
|
||||
@@ -245,9 +252,7 @@ class _ShipmentEditorState extends State<ShipmentEditor> {
|
||||
Column(
|
||||
children: getBoxList(context, boxModel.boxes),
|
||||
),
|
||||
LocalButton(
|
||||
textKey: "shipment.new",
|
||||
),
|
||||
_isNew ? createBtn : updateBtn,
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -2,6 +2,8 @@ import 'package:fcs/helpers/theme.dart';
|
||||
import 'package:fcs/localization/app_translations.dart';
|
||||
import 'package:fcs/pages/shipment/model/shipment_model.dart';
|
||||
import 'package:fcs/pages/widgets/bottom_up_page_route.dart';
|
||||
import 'package:fcs/pages/widgets/local_popup_menu_button.dart';
|
||||
import 'package:fcs/pages/widgets/local_popupmenu.dart';
|
||||
import 'package:fcs/pages/widgets/local_text.dart';
|
||||
import 'package:fcs/pages/widgets/progress.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
@@ -19,6 +21,7 @@ class ShipmentList extends StatefulWidget {
|
||||
|
||||
class _ShipmentListState extends State<ShipmentList> {
|
||||
bool _isLoading = false;
|
||||
bool _showDelivered = false;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@@ -33,6 +36,16 @@ class _ShipmentListState extends State<ShipmentList> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var pickupModel = Provider.of<ShipmentModel>(context);
|
||||
final popupMenu = LocalPopupMenuButton(
|
||||
popmenus: [
|
||||
LocalPopupMenu(
|
||||
id: 1, textKey: "shipment.popupmenu.active", selected: true),
|
||||
LocalPopupMenu(id: 2, textKey: "shipment.popupmenu.delivered")
|
||||
],
|
||||
popupMenuCallback: (p) => this.setState(() {
|
||||
_showDelivered = p.id == 2;
|
||||
}),
|
||||
);
|
||||
return LocalProgress(
|
||||
inAsyncCall: _isLoading,
|
||||
child: DefaultTabController(
|
||||
@@ -56,6 +69,7 @@ class _ShipmentListState extends State<ShipmentList> {
|
||||
iconSize: 30,
|
||||
// onPressed: () => showPlacesSearch(context),
|
||||
),
|
||||
popupMenu
|
||||
],
|
||||
),
|
||||
floatingActionButton: FloatingActionButton.extended(
|
||||
|
||||
Reference in New Issue
Block a user