add pagination for invoice and update ui for material 3
This commit is contained in:
@@ -25,11 +25,11 @@ import 'package:fcs/pages/rates/model/shipment_rate_model.dart';
|
||||
import 'package:fcs/pages/shipment/model/shipment_model.dart';
|
||||
import 'package:fcs/pages/widgets/display_text.dart';
|
||||
import 'package:fcs/pages/widgets/fcs_icons.dart';
|
||||
import 'package:fcs/pages/widgets/local_app_bar.dart';
|
||||
import 'package:fcs/pages/widgets/local_button.dart';
|
||||
import 'package:fcs/pages/widgets/local_dropdown.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';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -249,22 +249,23 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
|
||||
],
|
||||
popupMenuCallback: (p) async {
|
||||
if (p.id == 1) {
|
||||
CustomDuty customDuty = await Navigator.of(context).push(
|
||||
CargoType? customDuty = await Navigator.of(context).push(
|
||||
CupertinoPageRoute(
|
||||
builder: (context) => CustomList(selected: true)));
|
||||
_addCustom(customDuty);
|
||||
if (customDuty == null) return;
|
||||
// _addCustom(customDuty);
|
||||
} else if (p.id == 2) {
|
||||
Shipment shipment = await Navigator.of(context).push(
|
||||
Shipment? shipment = await Navigator.of(context).push(
|
||||
CupertinoPageRoute(
|
||||
builder: (context) =>
|
||||
InvoiceHandlingFeeList(shipments: _invoice!.shipments)));
|
||||
if (shipment == null) return;
|
||||
_addShipment(shipment);
|
||||
} else if (p.id == 3) {
|
||||
Discount? discount =
|
||||
await Navigator.of(context).push(CupertinoPageRoute(
|
||||
builder: (context) => InvoiceDiscountList(
|
||||
discounts: discounts,
|
||||
)));
|
||||
Discount? discount = await Navigator.of(context).push(
|
||||
CupertinoPageRoute(
|
||||
builder: (context) =>
|
||||
InvoiceDiscountList(discounts: discounts)));
|
||||
if (discount != null) {
|
||||
setState(() {
|
||||
_invoice!.discount = discount;
|
||||
@@ -314,19 +315,11 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
|
||||
return LocalProgress(
|
||||
inAsyncCall: _isLoading,
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
centerTitle: true,
|
||||
leading: new IconButton(
|
||||
icon: new Icon(CupertinoIcons.back, color: primaryColor),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
),
|
||||
backgroundColor: Colors.white,
|
||||
shadowColor: Colors.transparent,
|
||||
title: LocalText(context, 'invoice.form.title',
|
||||
color: primaryColor, fontSize: 20),
|
||||
),
|
||||
appBar: LocalAppBar(
|
||||
labelKey: 'invoice.form.title',
|
||||
backgroundColor: Colors.white,
|
||||
labelColor: primaryColor,
|
||||
arrowColor: primaryColor),
|
||||
body: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: ListView(
|
||||
@@ -336,10 +329,7 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
|
||||
_isNew ? Container() : statusBox,
|
||||
_showCartons ? cartonTable : Container(),
|
||||
_showCartons
|
||||
? Divider(
|
||||
color: primaryColor,
|
||||
thickness: 2,
|
||||
)
|
||||
? Divider(color: primaryColor, thickness: 2)
|
||||
: Container(),
|
||||
invoiceTableBox,
|
||||
SizedBox(
|
||||
|
||||
Reference in New Issue
Block a user