mirror of
https://github.com/inventree/InvenTree.git
synced 2026-07-05 06:32:55 +00:00
Machine fixes (#12154)
* Handle missing machine location - e.g. if location PK is invalid or has been deleted * Add spotlight action for machine management panel * Add unit test for code change
This commit is contained in:
@@ -2,6 +2,7 @@ import { t } from '@lingui/core/macro';
|
||||
import type { SpotlightActionData } from '@mantine/spotlight';
|
||||
import {
|
||||
IconBarcode,
|
||||
IconDevicesPc,
|
||||
IconLink,
|
||||
IconPlug,
|
||||
IconPointer,
|
||||
@@ -234,6 +235,16 @@ export function getActions(navigate: NavigateFunction) {
|
||||
leftSection: <IconPlug size='1.2rem' />
|
||||
});
|
||||
|
||||
staff &&
|
||||
user?.hasViewPermission(ModelType.pluginconfig) &&
|
||||
_actions.push({
|
||||
id: 'machine-management',
|
||||
label: t`Machines`,
|
||||
description: t`Manage machines and machine types`,
|
||||
onClick: () => navigate('/settings/admin/machine'),
|
||||
leftSection: <IconDevicesPc size='1.2rem' />
|
||||
});
|
||||
|
||||
staff &&
|
||||
user?.hasViewPermission(ModelType.reporttemplate) &&
|
||||
_actions.push({
|
||||
|
||||
Reference in New Issue
Block a user