mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-27 11:06:44 +00:00
Add level indicators and path to stock location and part category dropdowns (#8366)
* Add level indicators and path to stock location dropdown * Add level indicators and path to part category dropdown * Updated stock location string to include location path * Fix PUI form test (set location) --------- Co-authored-by: Matthias Mair <code@mjmair.com>
This commit is contained in:
parent
ff81cb61f2
commit
e7cfb4c3c0
@ -63,11 +63,11 @@ export function RenderPartCategory(
|
||||
tooltip={instance.pathstring}
|
||||
prefix={
|
||||
<>
|
||||
<div style={{ width: 10 * (instance.level || 0) }}></div>
|
||||
{instance.level > 0 && `${'- '.repeat(instance.level)}`}
|
||||
{instance.icon && <ApiIcon name={instance.icon} />}
|
||||
</>
|
||||
}
|
||||
primary={instance.name}
|
||||
primary={instance.pathstring}
|
||||
secondary={instance.description}
|
||||
url={
|
||||
props.link
|
||||
|
@ -21,11 +21,11 @@ export function RenderStockLocation(
|
||||
tooltip={instance.pathstring}
|
||||
prefix={
|
||||
<>
|
||||
<div style={{ width: 10 * (instance.level || 0) }}></div>
|
||||
{instance.level > 0 && `${'- '.repeat(instance.level)}`}
|
||||
{instance.icon && <ApiIcon name={instance.icon} />}
|
||||
</>
|
||||
}
|
||||
primary={instance.name}
|
||||
primary={instance.pathstring}
|
||||
secondary={instance.description}
|
||||
url={
|
||||
props.link
|
||||
|
@ -73,7 +73,7 @@ test('Scanning (StockLocation)', async ({ page }) => {
|
||||
await defaultScanTest(page, '{"stocklocation": 3}');
|
||||
|
||||
// stocklocation: 3
|
||||
await page.getByText('Storage Room B', { exact: true }).waitFor();
|
||||
await page.getByText('Factory/Storage Room B', { exact: true }).waitFor();
|
||||
await page.getByText('Storage Room B (green door)').waitFor();
|
||||
await page.getByRole('cell', { name: 'stocklocation' }).waitFor();
|
||||
});
|
||||
|
@ -39,7 +39,7 @@ test('Forms - Stock Item Validation', async ({ page }) => {
|
||||
|
||||
// Set location
|
||||
await page.getByLabel('related-field-location').click();
|
||||
await page.getByRole('option', { name: /Electronics Lab/ }).click();
|
||||
await page.getByText('Electronics production facility').click();
|
||||
|
||||
// Create the stock item
|
||||
await page.getByLabel('number-field-quantity').fill('123');
|
||||
|
Loading…
x
Reference in New Issue
Block a user