Skip to content

Commit

Permalink
Add order reference to app bar
Browse files Browse the repository at this point in the history
(cherry picked from commit 260bfb56a225cb653d630a81098142b80569e302)
  • Loading branch information
SchrodingersGat committed Dec 11, 2024
1 parent 2141c64 commit d016a66
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
10 changes: 9 additions & 1 deletion lib/widget/order/purchase_order_detail.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,15 @@ class _PurchaseOrderDetailState extends RefreshableState<PurchaseOrderDetailWidg
bool supportProjectCodes = false;

@override
String getAppBarTitle() => L10().purchaseOrder;
String getAppBarTitle() {
String title = L10().purchaseOrder;

if (widget.order.reference.isNotEmpty) {
title += " - ${widget.order.reference}";
}

return title;
}

@override
List<Widget> appBarActions(BuildContext context) {
Expand Down
10 changes: 9 additions & 1 deletion lib/widget/order/sales_order_detail.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,15 @@ class _SalesOrderDetailState extends RefreshableState<SalesOrderDetailWidget> {
int attachmentCount = 0;

@override
String getAppBarTitle() => L10().salesOrder;
String getAppBarTitle() {
String title = L10().salesOrder;

if (widget.order.reference.isNotEmpty) {
title += " - ${widget.order.reference}";
}

return title;
}

@override
List<Widget> appBarActions(BuildContext context) {
Expand Down

0 comments on commit d016a66

Please sign in to comment.