2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-05-30 21:25:36 +00:00

[UI] Part create fields (#12039)

* [UI] Part form adjustments

- Extract initial values from global settings
- Closes https://github.com/inventree/InvenTree/issues/11118

* update playwright

Ref: https://github.com/microsoft/playwright/issues/40998
This commit is contained in:
Oliver
2026-05-30 20:45:38 +10:00
committed by GitHub
parent 3a34b54ac2
commit 09f733f3fb
3 changed files with 22 additions and 16 deletions
+1 -1
View File
@@ -115,7 +115,7 @@
"@lingui/babel-plugin-lingui-macro": "^5.9.2",
"@lingui/cli": "^5.9.2",
"@lingui/macro": "^5.9.2",
"@playwright/test": "^1.58.2",
"@playwright/test": "^1.16.0",
"@types/node": "^25.5.0",
"@types/qrcode": "^1.5.5",
"@types/react": "^19.2.14",
+7 -1
View File
@@ -1,7 +1,7 @@
import type { ApiFormFieldSet } from '@lib/types/Forms';
import { t } from '@lingui/core/macro';
import { IconBuildingStore, IconCopy, IconPackages } from '@tabler/icons-react';
import { useMemo, useState } from 'react';
import { useEffect, useMemo, useState } from 'react';
import { useGlobalSettingsState } from '../states/SettingsStates';
/**
@@ -23,6 +23,12 @@ export function usePartFields({
undefined
);
// Set the initial state for the tracked fields based on the global settings
useEffect(() => {
setVirtual(globalSettings.isSet('PART_VIRTUAL'));
setPurchaseable(globalSettings.isSet('PART_PURCHASEABLE'));
}, [partId, create]);
return useMemo(() => {
const fields: ApiFormFieldSet = {
category: {
+14 -14
View File
@@ -1405,12 +1405,12 @@
dependencies:
"@octokit/openapi-types" "^24.2.0"
"@playwright/test@^1.58.2":
version "1.58.2"
resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.58.2.tgz#b0ad585d2e950d690ef52424967a42f40c6d2cbd"
integrity sha512-akea+6bHYBBfA9uQqSYmlJXn61cTa+jbO87xVLCWbTqbWadRVmhxlXATaOjOgcBaWU4ePo0wB41KMFv3o35IXA==
"@playwright/test@^1.16.0":
version "1.60.0"
resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.60.0.tgz#e696c31427e8882851235cd556dc2490c3206d97"
integrity sha512-O71yZIbAh/PxDMNGns37GHBIfrVkEVyn+AXyIa5dOTfb4/xNvRWV+Vv/NMbNCtODB/pO7vLlF2OTmMVLhmr7Ag==
dependencies:
playwright "1.58.2"
playwright "1.60.0"
"@reduxjs/toolkit@^1.9.0 || 2.x.x":
version "2.11.2"
@@ -4195,17 +4195,17 @@ pkg-types@^2.3.0:
exsolve "^1.0.7"
pathe "^2.0.3"
playwright-core@1.58.2:
version "1.58.2"
resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.58.2.tgz#ac5f5b4b10d29bcf934415f0b8d133b34b0dcb13"
integrity sha512-yZkEtftgwS8CsfYo7nm0KE8jsvm6i/PTgVtB8DL726wNf6H2IMsDuxCpJj59KDaxCtSnrWan2AeDqM7JBaultg==
playwright-core@1.60.0:
version "1.60.0"
resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.60.0.tgz#24e0d9cc4730713db5dffcace29b5e4696b1907a"
integrity sha512-9bW6zvX/m0lEbgTKJ6YppOKx8H3VOPBMOCFh2irXFOT4BbHgrx5hPjwJYLT40Lu+4qtD36qKc/Hn56StUW57IA==
playwright@1.58.2:
version "1.58.2"
resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.58.2.tgz#afe547164539b0bcfcb79957394a7a3fa8683cfd"
integrity sha512-vA30H8Nvkq/cPBnNw4Q8TWz1EJyqgpuinBcHET0YVJVFldr8JDNiU9LaWAE1KqSkRYazuaBhTpB5ZzShOezQ6A==
playwright@1.60.0:
version "1.60.0"
resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.60.0.tgz#89710863a51f21112633ef8b6b182594d3bfd7b5"
integrity sha512-hheHdokM8cdqCb0lcE3s+zT4t4W+vvjpGxsZlDnikarzx8tSzMebh3UiFtgqwFwnTnjYQcsyMF8ei2mCO/tpeA==
dependencies:
playwright-core "1.58.2"
playwright-core "1.60.0"
optionalDependencies:
fsevents "2.3.2"