mirror of
https://github.com/inventree/inventree-app.git
synced 2025-04-29 14:06:47 +00:00
Add 'tests' button for part
This commit is contained in:
parent
952f98d78b
commit
687b5ed8c7
@ -98,6 +98,8 @@ class InvenTreePart extends InvenTreeModel {
|
|||||||
|
|
||||||
bool get isVirtual => jsondata['virtual'] ?? false;
|
bool get isVirtual => jsondata['virtual'] ?? false;
|
||||||
|
|
||||||
|
bool get isTrackable => jsondata['trackable'] ?? false;
|
||||||
|
|
||||||
// Get the IPN (internal part number) for the Part instance
|
// Get the IPN (internal part number) for the Part instance
|
||||||
String get IPN => jsondata['IPN'] as String ?? '';
|
String get IPN => jsondata['IPN'] as String ?? '';
|
||||||
|
|
||||||
|
@ -215,6 +215,16 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (part.isTrackable) {
|
||||||
|
tiles.add(ListTile(
|
||||||
|
title: Text("Required Tests"),
|
||||||
|
leading: FaIcon(FontAwesomeIcons.tasks),
|
||||||
|
trailing: Text(""),
|
||||||
|
onTap: null,
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// Notes field?
|
// Notes field?
|
||||||
if (part.notes.isNotEmpty) {
|
if (part.notes.isNotEmpty) {
|
||||||
tiles.add(
|
tiles.add(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user