mirror of
https://github.com/inventree/InvenTree.git
synced 2026-04-15 07:48:51 +00:00
Display more output information in "build allocated stock" table (#11276)
* Add "install_into_detail" to BuildItem serializer * Enhance the "resolveItem" function * Add "StockColumn" renderer * Fix output column for BuildAllocatedStockTable * Replace column in stock item table * More column refactoring * Bump API version * Add InvenTreeOutputOption descriptions * Prefetch for better API performance * Updated playwright testing
This commit is contained in:
@@ -29,6 +29,11 @@ export function isTrue(value: any): boolean {
|
||||
* Allows for retrieval of nested items in an object.
|
||||
*/
|
||||
export function resolveItem(obj: any, path: string): any {
|
||||
// Return the top-level object if no path is provided
|
||||
if (path == null || path === '') {
|
||||
return obj;
|
||||
}
|
||||
|
||||
const properties = path.split('.');
|
||||
return properties.reduce((prev, curr) => prev?.[curr], obj);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user