feat: split alcohol and urine test into separate fields
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -38,6 +38,7 @@ export function InvestigationForm({ incidentId, existingInvestigationId }: Props
|
||||
const [findingsText, setFindingsText] = useState('')
|
||||
const [rootCause, setRootCause] = useState('')
|
||||
const [alcoholTest, setAlcoholTest] = useState('')
|
||||
const [urineTest, setUrineTest] = useState('')
|
||||
const [witnessRefs, setWitnessRefs] = useState<string[]>([''])
|
||||
const [complete, setComplete] = useState(false)
|
||||
const [saving, setSaving] = useState(false)
|
||||
@@ -95,6 +96,7 @@ export function InvestigationForm({ incidentId, existingInvestigationId }: Props
|
||||
findings_text: findingsText || null,
|
||||
root_cause_summary: rootCause || null,
|
||||
alcohol_test_result: alcoholTest || null,
|
||||
urine_test_result: urineTest || null,
|
||||
witness_statement_refs: witnessRefs.map(w => w.trim()).filter(Boolean),
|
||||
five_why_steps: method === 'five_why' ? fiveWhy.filter(s => s.answer) : null,
|
||||
fishbone_categories: method === 'fishbone'
|
||||
@@ -211,19 +213,35 @@ export function InvestigationForm({ incidentId, existingInvestigationId }: Props
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-gray-700 mb-1">Alcohol / Urine Test Result</label>
|
||||
<select
|
||||
value={alcoholTest}
|
||||
onChange={e => setAlcoholTest(e.target.value)}
|
||||
className="w-full rounded-lg border border-gray-300 px-3 py-2 text-sm"
|
||||
>
|
||||
<option value="">Not applicable / not conducted</option>
|
||||
<option value="negative">Negative</option>
|
||||
<option value="positive">Positive</option>
|
||||
<option value="refused">Refused</option>
|
||||
<option value="pending">Result pending</option>
|
||||
</select>
|
||||
<div className="grid grid-cols-2 gap-3">
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-gray-700 mb-1">Alcohol Test Result</label>
|
||||
<select
|
||||
value={alcoholTest}
|
||||
onChange={e => setAlcoholTest(e.target.value)}
|
||||
className="w-full rounded-lg border border-gray-300 px-3 py-2 text-sm"
|
||||
>
|
||||
<option value="">Not conducted</option>
|
||||
<option value="negative">Negative</option>
|
||||
<option value="positive">Positive</option>
|
||||
<option value="refused">Refused</option>
|
||||
<option value="pending">Result pending</option>
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-gray-700 mb-1">Urine Test Result</label>
|
||||
<select
|
||||
value={urineTest}
|
||||
onChange={e => setUrineTest(e.target.value)}
|
||||
className="w-full rounded-lg border border-gray-300 px-3 py-2 text-sm"
|
||||
>
|
||||
<option value="">Not conducted</option>
|
||||
<option value="negative">Negative</option>
|
||||
<option value="positive">Positive</option>
|
||||
<option value="refused">Refused</option>
|
||||
<option value="pending">Result pending</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user