mirror of
https://github.com/inventree/inventree-app.git
synced 2026-04-25 19:03:25 +00:00
Build Order (#673)
* WIP * Remove debug msg * Add required roles * More roles * Fix refresh for BuildDetail widget * Add attachments widget * Translated text * Further updates * More translations * Form field updates * Cleanup * Code formatting * Fix duplicate import * formatting * Remove duplicate switch case * Update to match modern app * Improved required parts list * Filtering for build outputs * Display list of allocated stock items * Display source and destination locations * Fix typo * Add build orders to drawer * Fix hard-coded string * Set default filter value * Tweak build fields (remove "notes") * Fixes * Add "start_date" to build edit form * Disable editing of build line * Tweak build item / build detail views * Remove unused func * Remove unused import --------- Co-authored-by: Asterix\Oliver <oliver@currawongeng.com> Co-authored-by: Oliver Walters <oliver.henry.walters@gmail.com>
This commit is contained in:
+27
-1
@@ -4,12 +4,14 @@ import "package:flutter_tabler_icons/flutter_tabler_icons.dart";
|
||||
|
||||
import "package:inventree/api.dart";
|
||||
import "package:inventree/app_colors.dart";
|
||||
import "package:inventree/inventree/build.dart";
|
||||
import "package:inventree/inventree/part.dart";
|
||||
import "package:inventree/inventree/purchase_order.dart";
|
||||
import "package:inventree/inventree/sales_order.dart";
|
||||
import "package:inventree/inventree/stock.dart";
|
||||
import "package:inventree/l10.dart";
|
||||
import "package:inventree/settings/settings.dart";
|
||||
import "package:inventree/widget/build/build_list.dart";
|
||||
import "package:inventree/widget/order/sales_order_list.dart";
|
||||
import "package:inventree/widget/part/category_display.dart";
|
||||
import "package:inventree/widget/notifications.dart";
|
||||
@@ -70,7 +72,7 @@ class ThemeSelectionDialog extends StatelessWidget {
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: Text("Cancel"),
|
||||
child: Text(L10().cancel),
|
||||
),
|
||||
],
|
||||
);
|
||||
@@ -155,6 +157,20 @@ class InvenTreeDrawer extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
|
||||
// Load "build orders" page
|
||||
void _buildOrders() {
|
||||
_closeDrawer();
|
||||
|
||||
if (_checkConnection()) {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => BuildOrderListWidget(filters: {}),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Load notifications screen
|
||||
void _notifications() {
|
||||
_closeDrawer();
|
||||
@@ -226,6 +242,16 @@ class InvenTreeDrawer extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
if (InvenTreeBuildOrder().canView) {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text(L10().buildOrders),
|
||||
leading: Icon(TablerIcons.building_factory, color: COLOR_ACTION),
|
||||
onTap: _buildOrders,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
if (InvenTreePurchaseOrder().canView) {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
|
||||
Reference in New Issue
Block a user