2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-02-02 03:14:56 +00:00

[UI] Bug fix for test result table (#11236)

* [UI] Bug fix for test result table

- Do not retain test choices when selecting a new test

* Remove quick-pass action if test has defined choices
This commit is contained in:
Oliver
2026-02-01 21:21:38 +11:00
committed by GitHub
parent 218e492a9d
commit 94be4ebb26
2 changed files with 5 additions and 0 deletions

View File

@@ -1503,6 +1503,10 @@ export function useTestResultFields({
setChoices([]); setChoices([]);
setFieldType('string'); setFieldType('string');
} }
} else {
// No choices defined - this is a free-form text field
setChoices([]);
setFieldType('string');
} }
} }
}, },

View File

@@ -358,6 +358,7 @@ export default function StockItemTestResultTable({
icon: <IconCircleCheck />, icon: <IconCircleCheck />,
hidden: hidden:
!record.templateId || !record.templateId ||
!!record.choices ||
record?.requires_attachment || record?.requires_attachment ||
record?.requires_value || record?.requires_value ||
record.result, record.result,