This commit is contained in:
natib21
2026-07-06 12:23:25 +00:00
parent 6b0db45be2
commit fb4ffa5d67
7 changed files with 75 additions and 1 deletions

View File

@@ -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