Feature/amiriis azmayesh

This commit is contained in:
AmirHossein Mahmoodi
2024-12-25 11:37:01 +00:00
parent fe7e504917
commit 6c5e9506bf
9 changed files with 234 additions and 114 deletions

View File

@@ -9,13 +9,16 @@ const InputType = ({ itemInfo, defaultValues, setDefaultValues }) => {
[itemInfo.id]: value,
}));
};
console.log(itemInfo);
const label = itemInfo.unit ? `${itemInfo.name} (${itemInfo.unit})` : itemInfo.name
return (
<FormControl size="small" fullWidth variant="outlined">
<InputLabel htmlFor={itemInfo.id}>{itemInfo.name}</InputLabel>
<InputLabel htmlFor={itemInfo.id}>{label}</InputLabel>
<OutlinedInput
id={itemInfo.id}
label={itemInfo.name}
label={label}
autoComplete="off"
size="small"
fullWidth

View File

@@ -9,15 +9,15 @@ const SelectType = ({ itemInfo, defaultValues, setDefaultValues }) => {
[itemInfo.id]: newValue,
}));
};
const label = itemInfo.unit ? `${itemInfo.name} (${itemInfo.unit})` : itemInfo.name
return (
<FormControl size="small" fullWidth variant="outlined">
<InputLabel id={itemInfo.id}>{itemInfo.name}</InputLabel>
<InputLabel id={itemInfo.id}>{label}</InputLabel>
<Select
labelId={itemInfo.id}
id={itemInfo.id}
value={defaultValues[itemInfo.id] || ""}
label={itemInfo.name}
label={label}
onChange={handleChange}
>
<MenuItem value="">{itemInfo.name}</MenuItem>