2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-10-03 15:52:51 +00:00

[UI] Top level text (#10406)

* Adjust top-level parts page

* Adjust top level stock page

* Fix playwright tests

* Tweak playwright test
This commit is contained in:
Oliver
2025-09-27 17:10:43 +10:00
committed by GitHub
parent 230e1edc00
commit 922827227c
3 changed files with 6 additions and 6 deletions

View File

@@ -264,7 +264,7 @@ export default function CategoryDetail() {
}, },
{ {
name: 'subcategories', name: 'subcategories',
label: t`Subcategories`, label: id ? t`Subcategories` : t`Part Categories`,
icon: <IconSitemap />, icon: <IconSitemap />,
content: <PartCategoryTable parentId={id} /> content: <PartCategoryTable parentId={id} />
}, },
@@ -340,7 +340,7 @@ export default function CategoryDetail() {
selectedId={category?.pk} selectedId={category?.pk}
/> />
<PageDetail <PageDetail
title={category?.name ?? t`Part Category`} title={(category?.name ?? id) ? t`Part Category` : t`Parts`}
subtitle={category?.description} subtitle={category?.description}
icon={category?.icon && <ApiIcon name={category?.icon} />} icon={category?.icon && <ApiIcon name={category?.icon} />}
breadcrumbs={breadcrumbs} breadcrumbs={breadcrumbs}

View File

@@ -173,7 +173,7 @@ export default function Stock() {
}, },
{ {
name: 'sublocations', name: 'sublocations',
label: t`Stock Locations`, label: id ? t`Sublocations` : t`Stock Locations`,
icon: <IconSitemap />, icon: <IconSitemap />,
content: <StockLocationTable parentId={id} /> content: <StockLocationTable parentId={id} />
}, },
@@ -417,7 +417,7 @@ export default function Stock() {
selectedId={location?.pk} selectedId={location?.pk}
/> />
<PageDetail <PageDetail
title={location?.name ?? t`Stock Location`} title={(location?.name ?? id) ? t`Stock Location` : t`Stock`}
subtitle={location?.description} subtitle={location?.description}
icon={location?.icon && <ApiIcon name={location?.icon} />} icon={location?.icon && <ApiIcon name={location?.icon} />}
actions={locationActions} actions={locationActions}

View File

@@ -25,7 +25,7 @@ test('Stock - Basic Tests', async ({ browser }) => {
await loadTab(page, 'Stock Locations'); await loadTab(page, 'Stock Locations');
await page.getByRole('cell', { name: 'Electronics Lab' }).first().click(); await page.getByRole('cell', { name: 'Electronics Lab' }).first().click();
await loadTab(page, 'Default Parts'); await loadTab(page, 'Default Parts');
await loadTab(page, 'Stock Locations'); await loadTab(page, 'Sublocations');
await loadTab(page, 'Stock Items'); await loadTab(page, 'Stock Items');
await loadTab(page, 'Location Details'); await loadTab(page, 'Location Details');
@@ -350,7 +350,7 @@ test('Stock - Location', async ({ browser }) => {
await loadTab(page, 'Default Parts'); await loadTab(page, 'Default Parts');
await loadTab(page, 'Stock Items'); await loadTab(page, 'Stock Items');
await loadTab(page, 'Stock Locations'); await loadTab(page, 'Sublocations');
await loadTab(page, 'Location Details'); await loadTab(page, 'Location Details');
await page.getByLabel('action-menu-barcode-actions').click(); await page.getByLabel('action-menu-barcode-actions').click();