mirror of
https://github.com/inventree/InvenTree.git
synced 2026-05-30 21:25:36 +00:00
[UI] Spotlight actions (#12049)
* [UI] error log shortcut Add spotlight action to jump to error logs * Add 'transfer orders' action
This commit is contained in:
@@ -124,6 +124,17 @@ export function getActions(navigate: NavigateFunction) {
|
|||||||
leftSection: <IconLink size='1.2rem' />
|
leftSection: <IconLink size='1.2rem' />
|
||||||
});
|
});
|
||||||
|
|
||||||
|
globalSettings.isSet('TRANSFERORDER_ENABLED') &&
|
||||||
|
user?.hasViewRole(UserRoles.transfer_order) &&
|
||||||
|
_actions.push({
|
||||||
|
id: 'transfer-orders',
|
||||||
|
label: t`Transfer Orders`,
|
||||||
|
description: t`Go to Transfer Orders`,
|
||||||
|
onClick: () =>
|
||||||
|
navigate(ModelInformationDict['transferorder'].url_overview!),
|
||||||
|
leftSection: <IconLink size='1.2rem' />
|
||||||
|
});
|
||||||
|
|
||||||
globalSettings.isSet('RETURNORDER_ENABLED') &&
|
globalSettings.isSet('RETURNORDER_ENABLED') &&
|
||||||
user?.hasViewRole(UserRoles.return_order) &&
|
user?.hasViewRole(UserRoles.return_order) &&
|
||||||
_actions.push({
|
_actions.push({
|
||||||
@@ -172,6 +183,17 @@ export function getActions(navigate: NavigateFunction) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
staff &&
|
staff &&
|
||||||
|
user?.hasViewPermission(ModelType.error) &&
|
||||||
|
_actions.push({
|
||||||
|
id: 'error-logs',
|
||||||
|
label: t`Error Logs`,
|
||||||
|
description: t`View error logs for this instance`,
|
||||||
|
onClick: () => navigate('/settings/admin/errors'),
|
||||||
|
leftSection: <IconReport size='1.2rem' />
|
||||||
|
});
|
||||||
|
|
||||||
|
staff &&
|
||||||
|
user?.hasViewPermission(ModelType.pluginconfig) &&
|
||||||
_actions.push({
|
_actions.push({
|
||||||
id: 'plugin-settings',
|
id: 'plugin-settings',
|
||||||
label: t`Plugins`,
|
label: t`Plugins`,
|
||||||
|
|||||||
Reference in New Issue
Block a user