2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-10-30 04:45:39 +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:
Oliver
2025-10-24 13:36:10 +11:00
committed by GitHub
parent 6b67cc9e50
commit 624655ec6b
22 changed files with 858 additions and 79 deletions

View File

@@ -7,6 +7,35 @@ import "package:inventree/widget/paginator.dart";
import "package:inventree/inventree/model.dart";
import "package:inventree/l10.dart";
import "package:inventree/widget/refreshable_state.dart";
class SOShipmentListWidget extends StatefulWidget {
const SOShipmentListWidget({
this.title = "",
this.filters = const {},
Key? key,
}) : super(key: key);
final Map<String, String> filters;
final String title;
@override
_SOShipmentListWidgetState createState() => _SOShipmentListWidgetState();
}
class _SOShipmentListWidgetState
extends RefreshableState<SOShipmentListWidget> {
_SOShipmentListWidgetState();
@override
String getAppBarTitle() => widget.title;
@override
Widget getBody(BuildContext context) {
return PaginatedSOShipmentList(widget.filters);
}
}
class PaginatedSOShipmentList extends PaginatedSearchWidget {
const PaginatedSOShipmentList(Map<String, String> filters)
@@ -51,15 +80,21 @@ class _PaginatedSOShipmentListState
Widget buildItem(BuildContext context, InvenTreeModel model) {
InvenTreeSalesOrderShipment shipment = model as InvenTreeSalesOrderShipment;
InvenTreeSalesOrder? order = shipment.order;
return ListTile(
title: Text(shipment.reference),
subtitle: Text(shipment.tracking_number),
leading: shipment.shipped
title: Text(
"${order?.reference ?? L10().salesOrder} - ${shipment.reference}",
),
subtitle: Text(order?.description ?? L10().description),
onTap: () async {
shipment.goToDetailPage(context);
},
leading: shipment.isShipped
? Icon(TablerIcons.calendar_check, color: COLOR_SUCCESS)
: Icon(TablerIcons.calendar_cancel, color: COLOR_WARNING),
trailing: shipment.shipped
trailing: shipment.isShipped
? LargeText(shipment.shipment_date ?? "")
: null,
: LargeText(L10().pending),
);
}
}