mirror of
https://github.com/inventree/inventree-app.git
synced 2025-10-29 20:40:35 +00:00
SalesOrderShipment (#697)
* Add detail widget for SalesOrderShipment * Support editing of shipment details * Rearrange SalesOrderDetail page * Add support for attachments against shipment model * refactoring * Add shipment details page * Add user actions for shipments: - Check / uncheck - Take photo * Placeholder action to send shipment * Send shipment from app * Display pending shipments on the home screen * Improve rending for shipments list * Add class definition for SalesOrderAllocation * Display list of items allocated against SalesOrderShipment * Bump release notse * Click through to stock item * Bump version number * dart format * cleanup * Remove unused imports
This commit is contained in:
@@ -14,6 +14,7 @@ import "package:inventree/preferences.dart";
|
||||
import "package:inventree/l10.dart";
|
||||
import "package:inventree/settings/select_server.dart";
|
||||
import "package:inventree/user_profile.dart";
|
||||
import "package:inventree/widget/order/so_shipment_list.dart";
|
||||
|
||||
import "package:inventree/widget/part/category_display.dart";
|
||||
import "package:inventree/widget/drawer.dart";
|
||||
@@ -55,6 +56,7 @@ class _InvenTreeHomePageState extends State<InvenTreeHomePage>
|
||||
|
||||
bool homeShowPo = false;
|
||||
bool homeShowSo = false;
|
||||
bool homeShowShipments = false;
|
||||
bool homeShowSubscribed = false;
|
||||
bool homeShowManufacturers = false;
|
||||
bool homeShowCustomers = false;
|
||||
@@ -112,6 +114,20 @@ class _InvenTreeHomePageState extends State<InvenTreeHomePage>
|
||||
);
|
||||
}
|
||||
|
||||
void _showPendingShipments(BuildContext context) {
|
||||
if (!InvenTreeAPI().checkConnection()) return;
|
||||
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => SOShipmentListWidget(
|
||||
title: L10().shipmentsPending,
|
||||
filters: {"order_outstanding": "true", "shipped": "false"},
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void _showSuppliers(BuildContext context) {
|
||||
if (!InvenTreeAPI().checkConnection()) return;
|
||||
|
||||
@@ -167,6 +183,11 @@ class _InvenTreeHomePageState extends State<InvenTreeHomePage>
|
||||
homeShowSo =
|
||||
await InvenTreeSettingsManager().getValue(INV_HOME_SHOW_SO, true)
|
||||
as bool;
|
||||
|
||||
homeShowShipments =
|
||||
await InvenTreeSettingsManager().getValue(INV_HOME_SHOW_SHIPMENTS, true)
|
||||
as bool;
|
||||
|
||||
homeShowManufacturers =
|
||||
await InvenTreeSettingsManager().getValue(
|
||||
INV_HOME_SHOW_MANUFACTURERS,
|
||||
@@ -325,6 +346,19 @@ class _InvenTreeHomePageState extends State<InvenTreeHomePage>
|
||||
);
|
||||
}
|
||||
|
||||
if (homeShowShipments && InvenTreeSalesOrderShipment().canView) {
|
||||
tiles.add(
|
||||
_listTile(
|
||||
context,
|
||||
L10().shipmentsPending,
|
||||
TablerIcons.cube_send,
|
||||
callback: () {
|
||||
_showPendingShipments(context);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// Suppliers
|
||||
if (homeShowSuppliers && InvenTreePurchaseOrder().canView) {
|
||||
tiles.add(
|
||||
|
||||
Reference in New Issue
Block a user