2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-03-12 07:03:36 +00:00

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

* [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

(cherry picked from commit 94be4ebb26)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
github-actions[bot]
2026-02-01 22:02:06 +11:00
committed by GitHub
parent 704c77ff61
commit e3fcb83dc9
2 changed files with 5 additions and 0 deletions

View File

@@ -1478,6 +1478,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,