mirror of
https://github.com/inventree/inventree-app.git
synced 2026-09-09 03:10:14 +00:00
Add extra filtering options for supplier parts (#868)
* Add extra filtering options for supplier parts * Update release notes * Allow edit of "primary" field
This commit is contained in:
@@ -182,6 +182,21 @@ class _SupplierPartDisplayState
|
||||
);
|
||||
}
|
||||
|
||||
if (api.supportsSupplierPartPrimaryField) {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text(L10().primary),
|
||||
leading: Icon(TablerIcons.star, color: COLOR_ACTION),
|
||||
trailing: Text(
|
||||
widget.supplierPart.primary ? L10().yes : L10().no,
|
||||
style: widget.supplierPart.primary
|
||||
? TextStyle(color: COLOR_SUCCESS)
|
||||
: null,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// Stock levels associated with this SupplierPart
|
||||
tiles.add(
|
||||
ListTile(
|
||||
|
||||
@@ -65,6 +65,14 @@ class _PaginatedSupplierPartListState
|
||||
};
|
||||
}
|
||||
|
||||
if (InvenTreeAPI().supportsSupplierPartPrimaryField) {
|
||||
filters["primary"] = {
|
||||
"label": L10().filterPrimary,
|
||||
"help_text": L10().filterPrimaryDetail,
|
||||
"tristate": true,
|
||||
};
|
||||
}
|
||||
|
||||
return filters;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user