2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-27 19:16: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:
Chris Thorn 2024-11-11 22:48:16 +00:00 committed by GitHub
parent ff81cb61f2
commit e7cfb4c3c0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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

View File

@ -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();
});

View File

@ -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');