-
-
Notifications
You must be signed in to change notification settings - Fork 192
Description
When sourcing parts based on the BOM of a project, it might be useful to sort the BOM based on the entry in the field of instockAmount to quickly see all parts with an amount of "0". Also sorting by storageLocations might help in quickly source all parts. The manufacturing_status is also missing as a column to sort the BOM. This might help in quickly getting an overview about critical parts with status "End of Life" or "NRND".
Maybe also make mountnames a sortable column.
In https://github.com/Part-DB/Part-DB-server/blob/master/src/DataTables/ProjectBomEntriesDataTable.php the columns in question need a attribute 'orderField'. For example, 'orderField' => 'NATSORT(manufacturer.name)',
Consider that fields with multiple values (one-to-many relations) like storageLocations and mountnames, might not be sortable.
Have a look in https://github.com/Part-DB/Part-DB-server/tree/master/src/DataTables/PartsDataTable.php how it's done there for these types of columns. For example, 'orderField' => 'NATSORT(MIN(_storelocations.name))',