mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-13 10:45:29 +00:00
Updated dependencies (#255)
* Bump android compile and target version, also flutter dependencies and resolve issues * Remove deprecated splashscreen and added support for new Android 12 version. * Updated workflow action versions and flutter sdk * Resolved linting issues * Resolved test binding issues
This commit is contained in:
@ -54,7 +54,7 @@ class _AttachmentWidgetState extends RefreshableState<AttachmentWidget> {
|
||||
// File upload
|
||||
actions.add(
|
||||
IconButton(
|
||||
icon: FaIcon(FontAwesomeIcons.plusCircle),
|
||||
icon: FaIcon(FontAwesomeIcons.circlePlus),
|
||||
onPressed: () async {
|
||||
FilePickerDialog.pickFile(
|
||||
onPicked: (File file) async {
|
||||
@ -117,7 +117,7 @@ class _AttachmentWidgetState extends RefreshableState<AttachmentWidget> {
|
||||
},
|
||||
child: ListTile(
|
||||
title: Text(L10().delete),
|
||||
leading: FaIcon(FontAwesomeIcons.trashAlt),
|
||||
leading: FaIcon(FontAwesomeIcons.trashCan),
|
||||
)
|
||||
)
|
||||
]
|
||||
@ -187,8 +187,9 @@ class _AttachmentWidgetState extends RefreshableState<AttachmentWidget> {
|
||||
subtitle: Text(attachment.comment),
|
||||
leading: FaIcon(FontAwesomeIcons.link, color: COLOR_CLICK),
|
||||
onTap: () async {
|
||||
if (await canLaunch(attachment.link)) {
|
||||
await launch(attachment.link);
|
||||
var uri = Uri.tryParse(attachment.link.trimLeft());
|
||||
if (uri != null && await canLaunchUrl(uri)) {
|
||||
await launchUrl(uri);
|
||||
}
|
||||
},
|
||||
onLongPress: () {
|
||||
|
@ -43,7 +43,7 @@ class _CategoryDisplayState extends RefreshableState<CategoryDisplayWidget> {
|
||||
if ((widget.category != null) && InvenTreeAPI().checkPermission("part_category", "change")) {
|
||||
actions.add(
|
||||
IconButton(
|
||||
icon: FaIcon(FontAwesomeIcons.edit),
|
||||
icon: FaIcon(FontAwesomeIcons.penToSquare),
|
||||
tooltip: L10().edit,
|
||||
onPressed: () {
|
||||
_editCategoryDialog(context);
|
||||
@ -121,7 +121,7 @@ class _CategoryDisplayState extends RefreshableState<CategoryDisplayWidget> {
|
||||
title: Text(L10().parentCategory),
|
||||
subtitle: Text("${widget.category?.parentPathString}"),
|
||||
leading: FaIcon(
|
||||
FontAwesomeIcons.levelUpAlt,
|
||||
FontAwesomeIcons.turnUp,
|
||||
color: COLOR_CLICK,
|
||||
),
|
||||
onTap: () async {
|
||||
@ -338,7 +338,7 @@ class _CategoryDisplayState extends RefreshableState<CategoryDisplayWidget> {
|
||||
subtitle: Text(
|
||||
L10().permissionAccountDenied,
|
||||
),
|
||||
leading: FaIcon(FontAwesomeIcons.userTimes),
|
||||
leading: FaIcon(FontAwesomeIcons.userXmark),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ class _CompanyDetailState extends RefreshableState<CompanyDetailWidget> {
|
||||
|
||||
actions.add(
|
||||
IconButton(
|
||||
icon: FaIcon(FontAwesomeIcons.edit),
|
||||
icon: FaIcon(FontAwesomeIcons.penToSquare),
|
||||
tooltip: L10().edit,
|
||||
onPressed: () {
|
||||
editCompany(context);
|
||||
@ -203,7 +203,7 @@ class _CompanyDetailState extends RefreshableState<CompanyDetailWidget> {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text(L10().purchaseOrders),
|
||||
leading: FaIcon(FontAwesomeIcons.shoppingCart, color: COLOR_CLICK),
|
||||
leading: FaIcon(FontAwesomeIcons.cartShopping, color: COLOR_CLICK),
|
||||
trailing: Text("${outstandingOrders.length}"),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
@ -246,7 +246,7 @@ class _CompanyDetailState extends RefreshableState<CompanyDetailWidget> {
|
||||
if (widget.company.notes.isNotEmpty) {
|
||||
tiles.add(ListTile(
|
||||
title: Text(L10().notes),
|
||||
leading: FaIcon(FontAwesomeIcons.stickyNote),
|
||||
leading: FaIcon(FontAwesomeIcons.noteSticky),
|
||||
onTap: null,
|
||||
));
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ import "package:inventree/widget/snacks.dart";
|
||||
/*
|
||||
* Display a "confirmation" dialog allowing the user to accept or reject an action
|
||||
*/
|
||||
Future<void> confirmationDialog(String title, String text, {IconData icon = FontAwesomeIcons.questionCircle, String? acceptText, String? rejectText, Function? onAccept, Function? onReject}) async {
|
||||
Future<void> confirmationDialog(String title, String text, {IconData icon = FontAwesomeIcons.circleQuestion, String? acceptText, String? rejectText, Function? onAccept, Function? onReject}) async {
|
||||
|
||||
String _accept = acceptText ?? L10().ok;
|
||||
String _reject = rejectText ?? L10().cancel;
|
||||
@ -63,7 +63,7 @@ Future<void> confirmationDialog(String title, String text, {IconData icon = Font
|
||||
* @description = Simple string description of error
|
||||
* @data = Error response (e.g from server)
|
||||
*/
|
||||
Future<void> showErrorDialog(String title, {String description = "", APIResponse? response, IconData icon = FontAwesomeIcons.exclamationCircle, Function? onDismissed}) async {
|
||||
Future<void> showErrorDialog(String title, {String description = "", APIResponse? response, IconData icon = FontAwesomeIcons.circleExclamation, Function? onDismissed}) async {
|
||||
|
||||
List<Widget> children = [];
|
||||
|
||||
|
@ -96,7 +96,7 @@ class InvenTreeDrawer extends StatelessWidget {
|
||||
context: context,
|
||||
tiles: <Widget>[
|
||||
ListTile(
|
||||
leading: FaIcon(FontAwesomeIcons.home),
|
||||
leading: FaIcon(FontAwesomeIcons.house),
|
||||
title: Text(
|
||||
L10().appTitle,
|
||||
style: TextStyle(fontWeight: FontWeight.bold),
|
||||
@ -110,7 +110,7 @@ class InvenTreeDrawer extends StatelessWidget {
|
||||
),
|
||||
ListTile(
|
||||
title: Text(L10().search),
|
||||
leading: FaIcon(FontAwesomeIcons.search),
|
||||
leading: FaIcon(FontAwesomeIcons.magnifyingGlass),
|
||||
onTap: _search,
|
||||
),
|
||||
ListTile(
|
||||
@ -120,7 +120,7 @@ class InvenTreeDrawer extends StatelessWidget {
|
||||
),
|
||||
ListTile(
|
||||
title: Text(L10().about),
|
||||
leading: FaIcon(FontAwesomeIcons.infoCircle),
|
||||
leading: FaIcon(FontAwesomeIcons.circleInfo),
|
||||
onTap: _about,
|
||||
)
|
||||
]
|
||||
|
@ -80,7 +80,7 @@ class FilePickerDialog {
|
||||
actions.add(
|
||||
SimpleDialogOption(
|
||||
child: ListTile(
|
||||
leading: FaIcon(FontAwesomeIcons.fileUpload),
|
||||
leading: FaIcon(FontAwesomeIcons.fileArrowUp),
|
||||
title: Text(allowFiles ? L10().selectFile : L10().selectImage),
|
||||
),
|
||||
onPressed: () async {
|
||||
|
@ -237,7 +237,7 @@ class _InvenTreeHomePageState extends State<InvenTreeHomePage> {
|
||||
if (!allowed) {
|
||||
showSnackIcon(
|
||||
L10().permissionRequired,
|
||||
icon: FontAwesomeIcons.exclamationCircle,
|
||||
icon: FontAwesomeIcons.circleExclamation,
|
||||
success: false,
|
||||
);
|
||||
|
||||
@ -295,7 +295,7 @@ class _InvenTreeHomePageState extends State<InvenTreeHomePage> {
|
||||
tiles.add(_listTile(
|
||||
context,
|
||||
L10().stock,
|
||||
FontAwesomeIcons.boxes,
|
||||
FontAwesomeIcons.boxesStacked,
|
||||
callback: () {
|
||||
_showStock(context);
|
||||
}
|
||||
@ -306,7 +306,7 @@ class _InvenTreeHomePageState extends State<InvenTreeHomePage> {
|
||||
tiles.add(_listTile(
|
||||
context,
|
||||
L10().purchaseOrders,
|
||||
FontAwesomeIcons.shoppingCart,
|
||||
FontAwesomeIcons.cartShopping,
|
||||
callback: () {
|
||||
_showPurchaseOrders(context);
|
||||
}
|
||||
@ -358,7 +358,7 @@ class _InvenTreeHomePageState extends State<InvenTreeHomePage> {
|
||||
tiles.add(_listTile(
|
||||
context,
|
||||
L10().settings,
|
||||
FontAwesomeIcons.cogs,
|
||||
FontAwesomeIcons.gears,
|
||||
callback: () {
|
||||
_showSettings(context);
|
||||
}
|
||||
@ -377,7 +377,7 @@ class _InvenTreeHomePageState extends State<InvenTreeHomePage> {
|
||||
bool validAddress = serverAddress != null;
|
||||
bool connecting = !InvenTreeAPI().isConnected() && InvenTreeAPI().isConnecting();
|
||||
|
||||
Widget leading = FaIcon(FontAwesomeIcons.exclamationCircle, color: COLOR_DANGER);
|
||||
Widget leading = FaIcon(FontAwesomeIcons.circleExclamation, color: COLOR_DANGER);
|
||||
Widget trailing = FaIcon(FontAwesomeIcons.server, color: COLOR_CLICK);
|
||||
String title = L10().serverNotConnected;
|
||||
String subtitle = L10().profileSelectOrCreate;
|
||||
@ -443,11 +443,11 @@ class _InvenTreeHomePageState extends State<InvenTreeHomePage> {
|
||||
|
||||
List<BottomNavigationBarItem> items = <BottomNavigationBarItem>[
|
||||
BottomNavigationBarItem(
|
||||
icon: FaIcon(FontAwesomeIcons.home),
|
||||
icon: FaIcon(FontAwesomeIcons.house),
|
||||
label: L10().home,
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: FaIcon(FontAwesomeIcons.search),
|
||||
icon: FaIcon(FontAwesomeIcons.magnifyingGlass),
|
||||
label: L10().search,
|
||||
),
|
||||
];
|
||||
|
@ -54,7 +54,7 @@ class _LocationDisplayState extends RefreshableState<LocationDisplayWidget> {
|
||||
if (InvenTreeAPI().supportsMixin("locate")) {
|
||||
actions.add(
|
||||
IconButton(
|
||||
icon: FaIcon(FontAwesomeIcons.searchLocation),
|
||||
icon: FaIcon(FontAwesomeIcons.magnifyingGlassLocation),
|
||||
tooltip: L10().locateLocation,
|
||||
onPressed: () async {
|
||||
_locateStockLocation(context);
|
||||
@ -67,7 +67,7 @@ class _LocationDisplayState extends RefreshableState<LocationDisplayWidget> {
|
||||
if (InvenTreeAPI().checkPermission("stock_location", "change")) {
|
||||
actions.add(
|
||||
IconButton(
|
||||
icon: FaIcon(FontAwesomeIcons.edit),
|
||||
icon: FaIcon(FontAwesomeIcons.penToSquare),
|
||||
tooltip: L10().edit,
|
||||
onPressed: () { _editLocationDialog(context); },
|
||||
)
|
||||
@ -202,7 +202,7 @@ class _LocationDisplayState extends RefreshableState<LocationDisplayWidget> {
|
||||
L10().stockTopLevel,
|
||||
style: TextStyle(fontStyle: FontStyle.italic)
|
||||
),
|
||||
leading: FaIcon(FontAwesomeIcons.boxes),
|
||||
leading: FaIcon(FontAwesomeIcons.boxesStacked),
|
||||
)
|
||||
);
|
||||
} else {
|
||||
@ -211,7 +211,7 @@ class _LocationDisplayState extends RefreshableState<LocationDisplayWidget> {
|
||||
ListTile(
|
||||
title: Text("${location!.name}"),
|
||||
subtitle: Text("${location!.description}"),
|
||||
leading: location!.customIcon ?? FaIcon(FontAwesomeIcons.boxes),
|
||||
leading: location!.customIcon ?? FaIcon(FontAwesomeIcons.boxesStacked),
|
||||
),
|
||||
];
|
||||
|
||||
@ -220,7 +220,7 @@ class _LocationDisplayState extends RefreshableState<LocationDisplayWidget> {
|
||||
ListTile(
|
||||
title: Text(L10().parentLocation),
|
||||
subtitle: Text("${location!.parentPathString}"),
|
||||
leading: FaIcon(FontAwesomeIcons.levelUpAlt, color: COLOR_CLICK),
|
||||
leading: FaIcon(FontAwesomeIcons.turnUp, color: COLOR_CLICK),
|
||||
onTap: () async {
|
||||
|
||||
int parentId = location?.parentId ?? -1;
|
||||
@ -261,7 +261,7 @@ class _LocationDisplayState extends RefreshableState<LocationDisplayWidget> {
|
||||
label: L10().details,
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: FaIcon(FontAwesomeIcons.boxes),
|
||||
icon: FaIcon(FontAwesomeIcons.boxesStacked),
|
||||
label: L10().stock,
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
@ -379,7 +379,7 @@ class _LocationDisplayState extends RefreshableState<LocationDisplayWidget> {
|
||||
title: Text(L10().locationCreate),
|
||||
subtitle: Text(L10().locationCreateDetail),
|
||||
leading: FaIcon(FontAwesomeIcons.sitemap, color: COLOR_CLICK),
|
||||
trailing: FaIcon(FontAwesomeIcons.plusCircle, color: COLOR_CLICK),
|
||||
trailing: FaIcon(FontAwesomeIcons.circlePlus, color: COLOR_CLICK),
|
||||
onTap: () async {
|
||||
_newLocation(context);
|
||||
},
|
||||
@ -390,8 +390,8 @@ class _LocationDisplayState extends RefreshableState<LocationDisplayWidget> {
|
||||
ListTile(
|
||||
title: Text(L10().stockItemCreate),
|
||||
subtitle: Text(L10().stockItemCreateDetail),
|
||||
leading: FaIcon(FontAwesomeIcons.boxes, color: COLOR_CLICK),
|
||||
trailing: FaIcon(FontAwesomeIcons.plusCircle, color: COLOR_CLICK),
|
||||
leading: FaIcon(FontAwesomeIcons.boxesStacked, color: COLOR_CLICK),
|
||||
trailing: FaIcon(FontAwesomeIcons.circlePlus, color: COLOR_CLICK),
|
||||
onTap: () async {
|
||||
_newStockItem(context);
|
||||
},
|
||||
@ -408,7 +408,7 @@ class _LocationDisplayState extends RefreshableState<LocationDisplayWidget> {
|
||||
ListTile(
|
||||
title: Text(L10().barcodeScanItem),
|
||||
subtitle: Text(L10().barcodeScanInItems),
|
||||
leading: FaIcon(FontAwesomeIcons.exchangeAlt, color: COLOR_CLICK),
|
||||
leading: FaIcon(FontAwesomeIcons.rightLeft, color: COLOR_CLICK),
|
||||
trailing: Icon(Icons.qr_code, color: COLOR_CLICK),
|
||||
onTap: () {
|
||||
|
||||
@ -434,7 +434,7 @@ class _LocationDisplayState extends RefreshableState<LocationDisplayWidget> {
|
||||
ListTile(
|
||||
title: Text(L10().transferStockLocation),
|
||||
subtitle: Text(L10().transferStockLocationDetail),
|
||||
leading: FaIcon(FontAwesomeIcons.signInAlt, color: COLOR_CLICK),
|
||||
leading: FaIcon(FontAwesomeIcons.rightToBracket, color: COLOR_CLICK),
|
||||
trailing: Icon(Icons.qr_code, color: COLOR_CLICK),
|
||||
onTap: () {
|
||||
var _loc = location;
|
||||
|
@ -198,7 +198,7 @@ abstract class PaginatedSearchState<T extends PaginatedSearchWidget> extends Sta
|
||||
L10().filteringOptions,
|
||||
"",
|
||||
fields,
|
||||
icon: FontAwesomeIcons.checkCircle,
|
||||
icon: FontAwesomeIcons.circleCheck,
|
||||
onSuccess: (Map<String, dynamic> data) async {
|
||||
|
||||
// Extract data from the processed form
|
||||
@ -417,7 +417,7 @@ abstract class PaginatedSearchState<T extends PaginatedSearchWidget> extends Sta
|
||||
),
|
||||
trailing: GestureDetector(
|
||||
child: FaIcon(
|
||||
searchController.text.isEmpty ? FontAwesomeIcons.search : FontAwesomeIcons.backspace,
|
||||
searchController.text.isEmpty ? FontAwesomeIcons.magnifyingGlass : FontAwesomeIcons.deleteLeft,
|
||||
color: searchController.text.isNotEmpty ? COLOR_DANGER : COLOR_CLICK,
|
||||
),
|
||||
onTap: () {
|
||||
@ -454,7 +454,7 @@ class NoResultsWidget extends StatelessWidget {
|
||||
description,
|
||||
style: TextStyle(fontStyle: FontStyle.italic),
|
||||
),
|
||||
leading: FaIcon(FontAwesomeIcons.exclamationCircle, color: COLOR_WARNING),
|
||||
leading: FaIcon(FontAwesomeIcons.circleExclamation, color: COLOR_WARNING),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
if (InvenTreeAPI().checkPermission("part", "change")) {
|
||||
actions.add(
|
||||
IconButton(
|
||||
icon: FaIcon(FontAwesomeIcons.edit),
|
||||
icon: FaIcon(FontAwesomeIcons.penToSquare),
|
||||
tooltip: L10().edit,
|
||||
onPressed: () {
|
||||
_editPartDialog(context);
|
||||
@ -304,7 +304,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
)
|
||||
),
|
||||
leading: FaIcon(
|
||||
FontAwesomeIcons.exclamationCircle,
|
||||
FontAwesomeIcons.circleExclamation,
|
||||
color: COLOR_DANGER
|
||||
),
|
||||
)
|
||||
@ -395,7 +395,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
ListTile(
|
||||
title: Text(L10().availableStock),
|
||||
subtitle: Text(L10().stockDetails),
|
||||
leading: FaIcon(FontAwesomeIcons.boxes, color: COLOR_CLICK),
|
||||
leading: FaIcon(FontAwesomeIcons.boxesStacked, color: COLOR_CLICK),
|
||||
trailing: Text(
|
||||
part.stockString(),
|
||||
style: TextStyle(
|
||||
@ -418,7 +418,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
ListTile(
|
||||
title: Text(L10().onOrder),
|
||||
subtitle: Text(L10().onOrderDetails),
|
||||
leading: FaIcon(FontAwesomeIcons.shoppingCart),
|
||||
leading: FaIcon(FontAwesomeIcons.cartShopping),
|
||||
trailing: Text("${part.onOrderString}"),
|
||||
onTap: () {
|
||||
// TODO - Order views
|
||||
@ -435,7 +435,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text(L10().billOfMaterials),
|
||||
leading: FaIcon(FontAwesomeIcons.thList, color: COLOR_CLICK),
|
||||
leading: FaIcon(FontAwesomeIcons.tableList, color: COLOR_CLICK),
|
||||
trailing: Text(bomCount.toString()),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
@ -453,7 +453,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text(L10().building),
|
||||
leading: FaIcon(FontAwesomeIcons.tools),
|
||||
leading: FaIcon(FontAwesomeIcons.screwdriverWrench),
|
||||
trailing: Text("${simpleNumberString(part.building)}"),
|
||||
onTap: () {
|
||||
// TODO
|
||||
@ -548,7 +548,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text(L10().parameters),
|
||||
leading: FaIcon(FontAwesomeIcons.thList, color: COLOR_CLICK),
|
||||
leading: FaIcon(FontAwesomeIcons.tableList, color: COLOR_CLICK),
|
||||
trailing: parameterCount > 0 ? Text(parameterCount.toString()) : null,
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
@ -566,7 +566,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text(L10().notes),
|
||||
leading: FaIcon(FontAwesomeIcons.stickyNote, color: COLOR_CLICK),
|
||||
leading: FaIcon(FontAwesomeIcons.noteSticky, color: COLOR_CLICK),
|
||||
trailing: Text(""),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
@ -580,7 +580,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text(L10().attachments),
|
||||
leading: FaIcon(FontAwesomeIcons.fileAlt, color: COLOR_CLICK),
|
||||
leading: FaIcon(FontAwesomeIcons.fileLines, color: COLOR_CLICK),
|
||||
trailing: attachmentCount > 0 ? Text(attachmentCount.toString()) : null,
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
@ -749,11 +749,11 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
onTap: onTabSelectionChanged,
|
||||
items: <BottomNavigationBarItem> [
|
||||
BottomNavigationBarItem(
|
||||
icon: FaIcon(FontAwesomeIcons.infoCircle),
|
||||
icon: FaIcon(FontAwesomeIcons.circleInfo),
|
||||
label: L10().details,
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: FaIcon(FontAwesomeIcons.boxes),
|
||||
icon: FaIcon(FontAwesomeIcons.boxesStacked),
|
||||
label: L10().stock
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
|
@ -47,7 +47,7 @@ class _PartImageState extends RefreshableState<PartImageWidget> {
|
||||
// File upload
|
||||
actions.add(
|
||||
IconButton(
|
||||
icon: FaIcon(FontAwesomeIcons.fileUpload),
|
||||
icon: FaIcon(FontAwesomeIcons.fileArrowUp),
|
||||
onPressed: () async {
|
||||
|
||||
FilePickerDialog.pickFile(
|
||||
|
@ -40,7 +40,7 @@ class _PartNotesState extends RefreshableState<PartNotesWidget> {
|
||||
if (InvenTreeAPI().checkPermission("part", "change")) {
|
||||
actions.add(
|
||||
IconButton(
|
||||
icon: FaIcon(FontAwesomeIcons.edit),
|
||||
icon: FaIcon(FontAwesomeIcons.penToSquare),
|
||||
tooltip: L10().edit,
|
||||
onPressed: () {
|
||||
part.editForm(
|
||||
|
@ -52,7 +52,7 @@ class _PurchaseOrderDetailState extends RefreshableState<PurchaseOrderDetailWidg
|
||||
if (InvenTreeAPI().checkPermission("purchase_order", "change")) {
|
||||
actions.add(
|
||||
IconButton(
|
||||
icon: FaIcon(FontAwesomeIcons.edit),
|
||||
icon: FaIcon(FontAwesomeIcons.penToSquare),
|
||||
tooltip: L10().edit,
|
||||
onPressed: () {
|
||||
editOrder(context);
|
||||
@ -174,7 +174,7 @@ class _PurchaseOrderDetailState extends RefreshableState<PurchaseOrderDetailWidg
|
||||
tiles.add(ListTile(
|
||||
title: Text(L10().issueDate),
|
||||
subtitle: Text(order.issueDate),
|
||||
leading: FaIcon(FontAwesomeIcons.calendarAlt),
|
||||
leading: FaIcon(FontAwesomeIcons.calendarDays),
|
||||
));
|
||||
}
|
||||
|
||||
@ -182,7 +182,7 @@ class _PurchaseOrderDetailState extends RefreshableState<PurchaseOrderDetailWidg
|
||||
tiles.add(ListTile(
|
||||
title: Text(L10().targetDate),
|
||||
subtitle: Text(order.targetDate),
|
||||
leading: FaIcon(FontAwesomeIcons.calendarAlt),
|
||||
leading: FaIcon(FontAwesomeIcons.calendarDays),
|
||||
));
|
||||
}
|
||||
|
||||
@ -190,7 +190,7 @@ class _PurchaseOrderDetailState extends RefreshableState<PurchaseOrderDetailWidg
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text(L10().attachments),
|
||||
leading: FaIcon(FontAwesomeIcons.fileAlt, color: COLOR_CLICK),
|
||||
leading: FaIcon(FontAwesomeIcons.fileLines, color: COLOR_CLICK),
|
||||
trailing: attachmentCount > 0 ? Text(attachmentCount.toString()) : null,
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
@ -250,7 +250,7 @@ class _PurchaseOrderDetailState extends RefreshableState<PurchaseOrderDetailWidg
|
||||
order.receive_url,
|
||||
fields,
|
||||
method: "POST",
|
||||
icon: FontAwesomeIcons.signInAlt,
|
||||
icon: FontAwesomeIcons.rightToBracket,
|
||||
onSuccess: (data) async {
|
||||
showSnackIcon(L10().receivedItem, success: true);
|
||||
refresh(context);
|
||||
@ -293,7 +293,7 @@ class _PurchaseOrderDetailState extends RefreshableState<PurchaseOrderDetailWidg
|
||||
},
|
||||
child: ListTile(
|
||||
title: Text(L10().receiveItem),
|
||||
leading: FaIcon(FontAwesomeIcons.signInAlt),
|
||||
leading: FaIcon(FontAwesomeIcons.rightToBracket),
|
||||
)
|
||||
)
|
||||
);
|
||||
@ -411,11 +411,11 @@ class _PurchaseOrderDetailState extends RefreshableState<PurchaseOrderDetailWidg
|
||||
label: L10().details
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: FaIcon(FontAwesomeIcons.thList),
|
||||
icon: FaIcon(FontAwesomeIcons.tableList),
|
||||
label: L10().lineItems,
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: FaIcon(FontAwesomeIcons.boxes),
|
||||
icon: FaIcon(FontAwesomeIcons.boxesStacked),
|
||||
label: L10().stockItems
|
||||
)
|
||||
],
|
||||
|
@ -75,7 +75,7 @@ abstract class RefreshableState<T extends StatefulWidget> extends State<T> with
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
WidgetsBinding.instance?.addPostFrameCallback((_) => onBuild(_context!));
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) => onBuild(_context!));
|
||||
}
|
||||
|
||||
// Function called after the widget is first build
|
||||
|
@ -263,7 +263,7 @@ class _SearchDisplayState extends RefreshableState<SearchWidget> {
|
||||
),
|
||||
trailing: GestureDetector(
|
||||
child: FaIcon(
|
||||
searchController.text.isEmpty ? FontAwesomeIcons.search : FontAwesomeIcons.backspace,
|
||||
searchController.text.isEmpty ? FontAwesomeIcons.magnifyingGlass : FontAwesomeIcons.deleteLeft,
|
||||
color: searchController.text.isEmpty ? COLOR_CLICK : COLOR_DANGER,
|
||||
),
|
||||
onTap: () {
|
||||
@ -331,7 +331,7 @@ class _SearchDisplayState extends RefreshableState<SearchWidget> {
|
||||
results.add(
|
||||
ListTile(
|
||||
title: Text(L10().stockItems),
|
||||
leading: FaIcon(FontAwesomeIcons.boxes),
|
||||
leading: FaIcon(FontAwesomeIcons.boxesStacked),
|
||||
trailing: Text("${nStockResults}"),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
@ -354,7 +354,7 @@ class _SearchDisplayState extends RefreshableState<SearchWidget> {
|
||||
results.add(
|
||||
ListTile(
|
||||
title: Text(L10().stockLocations),
|
||||
leading: FaIcon(FontAwesomeIcons.mapMarkerAlt),
|
||||
leading: FaIcon(FontAwesomeIcons.locationDot),
|
||||
trailing: Text("${nLocationResults}"),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
@ -402,7 +402,7 @@ class _SearchDisplayState extends RefreshableState<SearchWidget> {
|
||||
results.add(
|
||||
ListTile(
|
||||
title: Text(L10().purchaseOrders),
|
||||
leading: FaIcon(FontAwesomeIcons.shoppingCart),
|
||||
leading: FaIcon(FontAwesomeIcons.cartShopping),
|
||||
trailing: Text("${nPurchaseOrderResults}"),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
@ -424,7 +424,7 @@ class _SearchDisplayState extends RefreshableState<SearchWidget> {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text(L10().searching),
|
||||
leading: FaIcon(FontAwesomeIcons.search),
|
||||
leading: FaIcon(FontAwesomeIcons.magnifyingGlass),
|
||||
trailing: CircularProgressIndicator(),
|
||||
)
|
||||
);
|
||||
@ -437,7 +437,7 @@ class _SearchDisplayState extends RefreshableState<SearchWidget> {
|
||||
L10().queryNoResults,
|
||||
style: TextStyle(fontStyle: FontStyle.italic),
|
||||
),
|
||||
leading: FaIcon(FontAwesomeIcons.searchMinus),
|
||||
leading: FaIcon(FontAwesomeIcons.magnifyingGlassMinus),
|
||||
)
|
||||
);
|
||||
} else {
|
||||
|
@ -32,14 +32,14 @@ void showSnackIcon(String text, {IconData? icon, Function()? onAction, bool? suc
|
||||
|
||||
// Select an icon if we do not have an action
|
||||
if (icon == null && onAction == null) {
|
||||
icon = FontAwesomeIcons.checkCircle;
|
||||
icon = FontAwesomeIcons.circleCheck;
|
||||
}
|
||||
|
||||
} else if (success != null && success == false) {
|
||||
backgroundColor = Colors.deepOrange;
|
||||
|
||||
if (icon == null && onAction == null) {
|
||||
icon = FontAwesomeIcons.exclamationCircle;
|
||||
icon = FontAwesomeIcons.circleExclamation;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
||||
if (InvenTreeAPI().supportsMixin("locate")) {
|
||||
actions.add(
|
||||
IconButton(
|
||||
icon: FaIcon(FontAwesomeIcons.searchLocation),
|
||||
icon: FaIcon(FontAwesomeIcons.magnifyingGlassLocation),
|
||||
tooltip: L10().locateItem,
|
||||
onPressed: () async {
|
||||
InvenTreeAPI().locateItemOrLocation(context, item: widget.item.pk);
|
||||
@ -75,7 +75,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
||||
if (InvenTreeAPI().checkPermission("stock", "change")) {
|
||||
actions.add(
|
||||
IconButton(
|
||||
icon: FaIcon(FontAwesomeIcons.edit),
|
||||
icon: FaIcon(FontAwesomeIcons.penToSquare),
|
||||
tooltip: L10().edit,
|
||||
onPressed: () { _editStockItem(context); },
|
||||
)
|
||||
@ -189,7 +189,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
||||
confirmationDialog(
|
||||
L10().stockItemDelete,
|
||||
L10().stockItemDeleteConfirm,
|
||||
icon: FontAwesomeIcons.trashAlt,
|
||||
icon: FontAwesomeIcons.trashCan,
|
||||
onAccept: () async {
|
||||
final bool result = await widget.item.delete();
|
||||
|
||||
@ -337,7 +337,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
||||
InvenTreeStockItem.addStockUrl(),
|
||||
fields,
|
||||
method: "POST",
|
||||
icon: FontAwesomeIcons.plusCircle,
|
||||
icon: FontAwesomeIcons.circlePlus,
|
||||
onSuccess: (data) async {
|
||||
_stockUpdateMessage(true);
|
||||
refresh(context);
|
||||
@ -378,7 +378,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
||||
InvenTreeStockItem.removeStockUrl(),
|
||||
fields,
|
||||
method: "POST",
|
||||
icon: FontAwesomeIcons.minusCircle,
|
||||
icon: FontAwesomeIcons.circleMinus,
|
||||
onSuccess: (data) async {
|
||||
_stockUpdateMessage(true);
|
||||
refresh(context);
|
||||
@ -527,7 +527,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
||||
title: Text(L10().stockLocation),
|
||||
subtitle: Text("${widget.item.locationPathString}"),
|
||||
leading: FaIcon(
|
||||
FontAwesomeIcons.mapMarkerAlt,
|
||||
FontAwesomeIcons.locationDot,
|
||||
color: COLOR_CLICK,
|
||||
),
|
||||
onTap: () async {
|
||||
@ -549,7 +549,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text(L10().stockLocation),
|
||||
leading: FaIcon(FontAwesomeIcons.mapMarkerAlt),
|
||||
leading: FaIcon(FontAwesomeIcons.locationDot),
|
||||
subtitle: Text(L10().locationNotSet),
|
||||
)
|
||||
);
|
||||
@ -587,7 +587,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text(L10().inProduction),
|
||||
leading: FaIcon(FontAwesomeIcons.tools),
|
||||
leading: FaIcon(FontAwesomeIcons.screwdriverWrench),
|
||||
subtitle: Text(L10().inProductionDetail),
|
||||
onTap: () {
|
||||
// TODO: Click through to the "build order"
|
||||
@ -623,7 +623,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
||||
ListTile(
|
||||
title: Text(L10().lastUpdated),
|
||||
subtitle: Text(widget.item.updatedDateString),
|
||||
leading: FaIcon(FontAwesomeIcons.calendarAlt)
|
||||
leading: FaIcon(FontAwesomeIcons.calendarDays)
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -634,7 +634,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
||||
ListTile(
|
||||
title: Text(L10().lastStocktake),
|
||||
subtitle: Text(widget.item.stocktakeDateString),
|
||||
leading: FaIcon(FontAwesomeIcons.calendarAlt)
|
||||
leading: FaIcon(FontAwesomeIcons.calendarDays)
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -655,7 +655,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text(L10().testResults),
|
||||
leading: FaIcon(FontAwesomeIcons.tasks, color: COLOR_CLICK),
|
||||
leading: FaIcon(FontAwesomeIcons.listCheck, color: COLOR_CLICK),
|
||||
trailing: Text("${widget.item.testResultCount}"),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
@ -686,7 +686,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text(L10().history),
|
||||
leading: FaIcon(FontAwesomeIcons.history, color: COLOR_CLICK),
|
||||
leading: FaIcon(FontAwesomeIcons.clockRotateLeft, color: COLOR_CLICK),
|
||||
trailing: Text("${widget.item.trackingItemCount}"),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
@ -705,7 +705,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text(L10().notes),
|
||||
leading: FaIcon(FontAwesomeIcons.stickyNote, color: COLOR_CLICK),
|
||||
leading: FaIcon(FontAwesomeIcons.noteSticky, color: COLOR_CLICK),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
@ -718,7 +718,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text(L10().attachments),
|
||||
leading: FaIcon(FontAwesomeIcons.fileAlt, color: COLOR_CLICK),
|
||||
leading: FaIcon(FontAwesomeIcons.fileLines, color: COLOR_CLICK),
|
||||
trailing: attachmentCount > 0 ? Text(attachmentCount.toString()) : null,
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
@ -747,7 +747,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text(L10().permissionRequired),
|
||||
leading: FaIcon(FontAwesomeIcons.userTimes)
|
||||
leading: FaIcon(FontAwesomeIcons.userXmark)
|
||||
)
|
||||
);
|
||||
|
||||
@ -765,7 +765,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text(L10().countStock),
|
||||
leading: FaIcon(FontAwesomeIcons.checkCircle, color: COLOR_CLICK),
|
||||
leading: FaIcon(FontAwesomeIcons.circleCheck, color: COLOR_CLICK),
|
||||
onTap: _countStockDialog,
|
||||
trailing: Text(widget.item.quantityString(includeUnits: true)),
|
||||
)
|
||||
@ -774,7 +774,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text(L10().removeStock),
|
||||
leading: FaIcon(FontAwesomeIcons.minusCircle, color: COLOR_CLICK),
|
||||
leading: FaIcon(FontAwesomeIcons.circleMinus, color: COLOR_CLICK),
|
||||
onTap: _removeStockDialog,
|
||||
)
|
||||
);
|
||||
@ -782,7 +782,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text(L10().addStock),
|
||||
leading: FaIcon(FontAwesomeIcons.plusCircle, color: COLOR_CLICK),
|
||||
leading: FaIcon(FontAwesomeIcons.circlePlus, color: COLOR_CLICK),
|
||||
onTap: _addStockDialog,
|
||||
)
|
||||
);
|
||||
@ -792,7 +792,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
||||
ListTile(
|
||||
title: Text(L10().transferStock),
|
||||
subtitle: Text(L10().transferStockDetail),
|
||||
leading: FaIcon(FontAwesomeIcons.exchangeAlt, color: COLOR_CLICK),
|
||||
leading: FaIcon(FontAwesomeIcons.rightLeft, color: COLOR_CLICK),
|
||||
onTap: () { _transferStockDialog(context); },
|
||||
)
|
||||
);
|
||||
@ -802,7 +802,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
||||
ListTile(
|
||||
title: Text(L10().scanIntoLocation),
|
||||
subtitle: Text(L10().scanIntoLocationDetail),
|
||||
leading: FaIcon(FontAwesomeIcons.exchangeAlt, color: COLOR_CLICK),
|
||||
leading: FaIcon(FontAwesomeIcons.rightLeft, color: COLOR_CLICK),
|
||||
trailing: Icon(Icons.qr_code_scanner),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
@ -850,7 +850,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text("Delete Stock Item"),
|
||||
leading: FaIcon(FontAwesomeIcons.trashAlt, color: COLOR_DANGER),
|
||||
leading: FaIcon(FontAwesomeIcons.trashCan, color: COLOR_DANGER),
|
||||
onTap: () {
|
||||
_deleteItem(context);
|
||||
},
|
||||
@ -868,7 +868,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
||||
onTap: onTabSelectionChanged,
|
||||
items: <BottomNavigationBarItem> [
|
||||
BottomNavigationBarItem(
|
||||
icon: FaIcon(FontAwesomeIcons.infoCircle),
|
||||
icon: FaIcon(FontAwesomeIcons.circleInfo),
|
||||
label: L10().details,
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
|
@ -34,7 +34,7 @@ class _StockItemTestResultDisplayState extends RefreshableState<StockItemTestRes
|
||||
List<Widget> getAppBarActions(BuildContext context) {
|
||||
return [
|
||||
IconButton(
|
||||
icon: FaIcon(FontAwesomeIcons.plusCircle),
|
||||
icon: FaIcon(FontAwesomeIcons.circlePlus),
|
||||
onPressed: () {
|
||||
addTestResult(context);
|
||||
}
|
||||
@ -158,7 +158,7 @@ class _StockItemTestResultDisplayState extends RefreshableState<StockItemTestRes
|
||||
String _value = "";
|
||||
String _notes = "";
|
||||
|
||||
FaIcon _icon = FaIcon(FontAwesomeIcons.questionCircle, color: COLOR_BLUE);
|
||||
FaIcon _icon = FaIcon(FontAwesomeIcons.circleQuestion, color: COLOR_BLUE);
|
||||
bool _valueRequired = false;
|
||||
bool _attachmentRequired = false;
|
||||
|
||||
@ -179,11 +179,11 @@ class _StockItemTestResultDisplayState extends RefreshableState<StockItemTestRes
|
||||
}
|
||||
|
||||
if (_result == true) {
|
||||
_icon = FaIcon(FontAwesomeIcons.checkCircle,
|
||||
_icon = FaIcon(FontAwesomeIcons.circleCheck,
|
||||
color: COLOR_SUCCESS,
|
||||
);
|
||||
} else if (_result == false) {
|
||||
_icon = FaIcon(FontAwesomeIcons.timesCircle,
|
||||
_icon = FaIcon(FontAwesomeIcons.circleXmark,
|
||||
color: COLOR_DANGER,
|
||||
);
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ class _StockNotesState extends RefreshableState<StockNotesWidget> {
|
||||
if (InvenTreeAPI().checkPermission("stock", "change")) {
|
||||
actions.add(
|
||||
IconButton(
|
||||
icon: FaIcon(FontAwesomeIcons.edit),
|
||||
icon: FaIcon(FontAwesomeIcons.penToSquare),
|
||||
tooltip: L10().edit,
|
||||
onPressed: () {
|
||||
item.editForm(
|
||||
|
@ -43,7 +43,7 @@ class _SupplierPartDisplayState extends RefreshableState<SupplierPartDetailWidge
|
||||
|
||||
actions.add(
|
||||
IconButton(
|
||||
icon: FaIcon(FontAwesomeIcons.edit),
|
||||
icon: FaIcon(FontAwesomeIcons.penToSquare),
|
||||
tooltip: L10().edit,
|
||||
onPressed: () {
|
||||
editSupplierPart(context);
|
||||
@ -158,8 +158,9 @@ class _SupplierPartDisplayState extends RefreshableState<SupplierPartDetailWidge
|
||||
title: Text(widget.supplierPart.link),
|
||||
leading: FaIcon(FontAwesomeIcons.link),
|
||||
onTap: () async {
|
||||
if (await canLaunch(widget.supplierPart.link)) {
|
||||
await launch(widget.supplierPart.link);
|
||||
var uri = Uri.tryParse(widget.supplierPart.link);
|
||||
if (uri != null && await canLaunchUrl(uri)) {
|
||||
await launchUrl(uri);
|
||||
}
|
||||
},
|
||||
)
|
||||
@ -170,7 +171,7 @@ class _SupplierPartDisplayState extends RefreshableState<SupplierPartDetailWidge
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text(widget.supplierPart.note),
|
||||
leading: FaIcon(FontAwesomeIcons.pencilAlt),
|
||||
leading: FaIcon(FontAwesomeIcons.pencil),
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -224,7 +225,7 @@ class _SupplierPartDisplayState extends RefreshableState<SupplierPartDetailWidge
|
||||
onTap: onTabSelectionChanged,
|
||||
items: [
|
||||
BottomNavigationBarItem(
|
||||
icon: FaIcon(FontAwesomeIcons.infoCircle),
|
||||
icon: FaIcon(FontAwesomeIcons.circle),
|
||||
label: L10().details,
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
|
Reference in New Issue
Block a user