mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 21:08:12 +00:00
fix
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
||||
Group,
|
||||
Modal,
|
||||
NumberInput,
|
||||
Radio,
|
||||
Select,
|
||||
MultiSelect,
|
||||
SimpleGrid,
|
||||
@@ -293,6 +294,26 @@ const FleetFormDialog = ({
|
||||
// only by verification and never hand-edited.
|
||||
const isDisabled = Boolean(field.disabled || field.faydaLocked);
|
||||
|
||||
if (field.type === "radio") {
|
||||
return (
|
||||
<Radio.Group
|
||||
key={field.name}
|
||||
label={field.label}
|
||||
value={value == null ? "" : String(value)}
|
||||
onChange={(next) =>
|
||||
setValues((current) => ({ ...current, [field.name]: next }))
|
||||
}
|
||||
error={error}
|
||||
>
|
||||
<Group gap="lg" mt={6}>
|
||||
{(field.options ?? []).map((o) => (
|
||||
<Radio key={o.value} value={o.value} label={o.label} disabled={isDisabled} />
|
||||
))}
|
||||
</Group>
|
||||
</Radio.Group>
|
||||
);
|
||||
}
|
||||
|
||||
if (field.type === "select") {
|
||||
return (
|
||||
<Select
|
||||
|
||||
Reference in New Issue
Block a user