fixed up unit of measure
This commit is contained in:
1 parent
529b5599e4
commit
596c3363e7
3 files changed
+4
-14
No files matched your search
@@ -73,8 +73,8 @@ export const ServiceEditorField: FC<ServiceEditorFieldProps> = ({
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
if ("domain" in option.data) {
|
||||
if (option.id === "entity") {
|
||||
if (option.id === "entity") {
|
||||
if ("domain" in option.data) {
|
||||
return (
|
||||
<InputEntity
|
||||
value={value}
|
||||
|
||||
@@ -152,9 +152,7 @@ export const ServiceEditor: FC<ServiceEditorProps> = ({
|
||||
if (newField) {
|
||||
setAdditionalFields({
|
||||
...additionalFields,
|
||||
[newField.type]: additionalFields[newField.type].concat([
|
||||
newField.id,
|
||||
]),
|
||||
field: additionalFields.field.concat([newField.id]),
|
||||
optionalList: additionalFields.optionalList.filter(
|
||||
(opt) =>
|
||||
!(opt.type === newField.type && opt.id === newField.id)
|
||||
|
||||
@@ -48,7 +48,7 @@ interface SelectorColorTemp {
|
||||
interface SelectorNumber {
|
||||
min: number;
|
||||
max: number;
|
||||
unit_of_measurement?: UnitOfMeasurement;
|
||||
unit_of_measurement?: string;
|
||||
mode?: Mode;
|
||||
step?: number;
|
||||
}
|
||||
@@ -57,14 +57,6 @@ enum Mode {
|
||||
Box = "box",
|
||||
}
|
||||
|
||||
enum UnitOfMeasurement {
|
||||
Days = "days",
|
||||
Empty = "%",
|
||||
K = "K",
|
||||
Seconds = "seconds",
|
||||
Times = "times",
|
||||
}
|
||||
|
||||
interface SelectorSelect {
|
||||
options: OptionElement[];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user