2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-17 20:45:44 +00:00

Test result table tweaks (#7290)

* Update initialData for new build output

* Table updates
This commit is contained in:
Oliver
2024-05-22 09:30:14 +10:00
committed by GitHub
parent acdf7f5ec0
commit 8df04cb916
3 changed files with 7 additions and 7 deletions

View File

@ -114,7 +114,8 @@ export default function BuildOutputTable({ build }: { build: any }) {
title: t`Add Build Output`,
fields: buildOutputFields,
initialData: {
batch_code: build.batch
batch_code: build.batch,
location: build.destination ?? build.part_detail?.default_location
},
table: table
});

View File

@ -126,16 +126,14 @@ export default function StockItemTestResultTable({
switchable: false,
sortable: true,
render: (record: any) => {
let required = record.required ?? record.template_detail?.required;
let enabled = record.enabled ?? record.template_detail?.enabled;
let installed =
const enabled = record.enabled ?? record.template_detail?.enabled;
const installed =
record.stock_item != undefined && record.stock_item != itemId;
return (
<Group justify="space-between">
<Group justify="space-between" wrap="nowrap">
<Text
style={{ fontStyle: installed ? 'italic' : undefined }}
fw={required && 700}
c={enabled ? undefined : 'red'}
>
{!record.templateId && '- '}