mirror of
https://github.com/faiztyanirh/clqms-shadcn-v1.git
synced 2026-04-26 19:06:33 +07:00
continue dict test refnum
This commit is contained in:
parent
a54e1b9d23
commit
10b6e5bda3
@ -25,7 +25,7 @@ export const testInitialForm = {
|
|||||||
ReqQtyUnit: "",
|
ReqQtyUnit: "",
|
||||||
CollReq: "",
|
CollReq: "",
|
||||||
Method: "",
|
Method: "",
|
||||||
ExpectedTXT: "",
|
ExpectedTAT: "",
|
||||||
SeqScr: "",
|
SeqScr: "",
|
||||||
SeqRpt: "",
|
SeqRpt: "",
|
||||||
VisibleScr: "",
|
VisibleScr: "",
|
||||||
@ -229,7 +229,7 @@ export const testFormFields = [
|
|||||||
key: "ExpectedTAT",
|
key: "ExpectedTAT",
|
||||||
label: "Expected TAT",
|
label: "Expected TAT",
|
||||||
required: false,
|
required: false,
|
||||||
type: "select",
|
type: "text",
|
||||||
fullWidth: false
|
fullWidth: false
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|||||||
@ -179,7 +179,7 @@
|
|||||||
<Tabs.Content value="reference">
|
<Tabs.Content value="reference">
|
||||||
<div class="w-full h-full flex items-start">
|
<div class="w-full h-full flex items-start">
|
||||||
{#if refComponent === 'numeric'}
|
{#if refComponent === 'numeric'}
|
||||||
<RefNum {refNumState} {refNumFormFields} />
|
<RefNum {refNumState} {refNumFormFields} refType={formState.form.RefType}/>
|
||||||
{:else if refComponent === 'text'}
|
{:else if refComponent === 'text'}
|
||||||
<RefTxt {formState} />
|
<RefTxt {formState} />
|
||||||
{:else}
|
{:else}
|
||||||
|
|||||||
@ -6,6 +6,21 @@
|
|||||||
import { Badge } from "$lib/components/ui/badge/index.js";
|
import { Badge } from "$lib/components/ui/badge/index.js";
|
||||||
|
|
||||||
let props = $props();
|
let props = $props();
|
||||||
|
|
||||||
|
let disabledSign = $derived.by(() => {
|
||||||
|
const refType = props.refType;
|
||||||
|
|
||||||
|
if (refType === "RANGE") return true;
|
||||||
|
if (refType === "THOLD") return false;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
$effect(() => {
|
||||||
|
if (props.refType) {
|
||||||
|
props.refNumState.form.NumRefType = props.refType;
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="flex flex-col gap-4 w-full">
|
<div class="flex flex-col gap-4 w-full">
|
||||||
@ -13,6 +28,7 @@
|
|||||||
<DictionaryFormRenderer
|
<DictionaryFormRenderer
|
||||||
formState={props.refNumState}
|
formState={props.refNumState}
|
||||||
formFields={props.refNumFormFields}
|
formFields={props.refNumFormFields}
|
||||||
|
{disabledSign}
|
||||||
/>
|
/>
|
||||||
<Button
|
<Button
|
||||||
size="sm"
|
size="sm"
|
||||||
@ -43,8 +59,20 @@
|
|||||||
<Table.Cell>Whole Blood</Table.Cell>
|
<Table.Cell>Whole Blood</Table.Cell>
|
||||||
<Table.Cell class="font-medium">Female</Table.Cell>
|
<Table.Cell class="font-medium">Female</Table.Cell>
|
||||||
<Table.Cell class="">1Y 0M 0D - 10Y 0M 0D</Table.Cell>
|
<Table.Cell class="">1Y 0M 0D - 10Y 0M 0D</Table.Cell>
|
||||||
<Table.Cell class="text-muted-foreground">Reference Range</Table.Cell>
|
<Table.Cell class="text-muted-foreground"><Badge>Range</Badge></Table.Cell>
|
||||||
<Table.Cell class="font-medium"><Badge>Range</Badge></Table.Cell>
|
<Table.Cell class="font-medium">4 - 10</Table.Cell>
|
||||||
|
<Table.Cell class="font-medium">L</Table.Cell>
|
||||||
|
<Table.Cell class="font-medium">Interpretation</Table.Cell>
|
||||||
|
<Table.Cell class="font-medium">Testing</Table.Cell>
|
||||||
|
</Table.Row>
|
||||||
|
<Table.Row
|
||||||
|
class="cursor-pointer hover:bg-muted/50"
|
||||||
|
>
|
||||||
|
<Table.Cell>Whole Blood</Table.Cell>
|
||||||
|
<Table.Cell class="font-medium">Male</Table.Cell>
|
||||||
|
<Table.Cell class="">1Y 0M 0D - 10Y 0M 0D</Table.Cell>
|
||||||
|
<Table.Cell class="text-muted-foreground"><Badge>Threshold</Badge></Table.Cell>
|
||||||
|
<Table.Cell class="font-medium">10</Table.Cell>
|
||||||
<Table.Cell class="font-medium">L</Table.Cell>
|
<Table.Cell class="font-medium">L</Table.Cell>
|
||||||
<Table.Cell class="font-medium">Interpretation</Table.Cell>
|
<Table.Cell class="font-medium">Interpretation</Table.Cell>
|
||||||
<Table.Cell class="font-medium">Testing</Table.Cell>
|
<Table.Cell class="font-medium">Testing</Table.Cell>
|
||||||
|
|||||||
@ -9,8 +9,6 @@
|
|||||||
|
|
||||||
const { masterDetail, formFields, formActions, schema } = props.context;
|
const { masterDetail, formFields, formActions, schema } = props.context;
|
||||||
|
|
||||||
let test = $derived(masterDetail?.selectedItem?.data);
|
|
||||||
$inspect(test)
|
|
||||||
const handlers = {
|
const handlers = {
|
||||||
editTest: () => masterDetail.enterEdit("data"),
|
editTest: () => masterDetail.enterEdit("data"),
|
||||||
};
|
};
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
mode = 'create',
|
mode = 'create',
|
||||||
disabledResultTypes = [],
|
disabledResultTypes = [],
|
||||||
disabledReferenceTypes = [],
|
disabledReferenceTypes = [],
|
||||||
...props
|
disabledSign = false,
|
||||||
} = $props();
|
} = $props();
|
||||||
|
|
||||||
let searchQuery = $state({});
|
let searchQuery = $state({});
|
||||||
@ -87,6 +87,7 @@
|
|||||||
validateFieldAsync(key, mode, originalData?.[key]);
|
validateFieldAsync(key, mode, originalData?.[key]);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
readonly={key === "NumRefType"}
|
||||||
/>
|
/>
|
||||||
{:else if type === "email"}
|
{:else if type === "email"}
|
||||||
<Input
|
<Input
|
||||||
@ -312,7 +313,7 @@
|
|||||||
{#snippet child({ props })}
|
{#snippet child({ props })}
|
||||||
<InputGroup.Button
|
<InputGroup.Button
|
||||||
{...props}
|
{...props}
|
||||||
variant="ghost"
|
variant="ghost" disabled={disabledSign}
|
||||||
>
|
>
|
||||||
{formState.selectOptions?.[key]?.find(
|
{formState.selectOptions?.[key]?.find(
|
||||||
opt => opt.value === formState.form[key]
|
opt => opt.value === formState.form[key]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user