mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 13:15:43 +00:00 
			
		
		
		
	use LABEL_DEFAULT_PRINTER user setting to pre-select plugin in label printing forms (#8330)
This commit is contained in:
		| @@ -11,6 +11,7 @@ import { extractAvailableFields } from '../../functions/forms'; | ||||
| import { useCreateApiFormModal } from '../../hooks/UseForm'; | ||||
| import { apiUrl } from '../../states/ApiState'; | ||||
| import { useLocalState } from '../../states/LocalState'; | ||||
| import { useUserSettingsState } from '../../states/SettingsState'; | ||||
| import { ApiFormFieldSet } from '../forms/fields/ApiFormField'; | ||||
| import { ActionDropdown } from '../items/ActionDropdown'; | ||||
|  | ||||
| @@ -29,6 +30,8 @@ export function PrintingActions({ | ||||
| }) { | ||||
|   const { host } = useLocalState.getState(); | ||||
|  | ||||
|   const userSettings = useUserSettingsState(); | ||||
|  | ||||
|   const enabled = useMemo(() => items.length > 0, [items]); | ||||
|  | ||||
|   const [pluginKey, setPluginKey] = useState<string>(''); | ||||
| @@ -74,6 +77,7 @@ export function PrintingActions({ | ||||
|  | ||||
|     fields['plugin'] = { | ||||
|       ...fields['plugin'], | ||||
|       value: userSettings.getSetting('LABEL_DEFAULT_PRINTER'), | ||||
|       filters: { | ||||
|         active: true, | ||||
|         mixin: 'labels' | ||||
|   | ||||
		Reference in New Issue
	
	Block a user