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 {
|
} else {
|
||||||
if ("domain" in option.data) {
|
if (option.id === "entity") {
|
||||||
if (option.id === "entity") {
|
if ("domain" in option.data) {
|
||||||
return (
|
return (
|
||||||
<InputEntity
|
<InputEntity
|
||||||
value={value}
|
value={value}
|
||||||
|
|||||||
@@ -152,9 +152,7 @@ export const ServiceEditor: FC<ServiceEditorProps> = ({
|
|||||||
if (newField) {
|
if (newField) {
|
||||||
setAdditionalFields({
|
setAdditionalFields({
|
||||||
...additionalFields,
|
...additionalFields,
|
||||||
[newField.type]: additionalFields[newField.type].concat([
|
field: additionalFields.field.concat([newField.id]),
|
||||||
newField.id,
|
|
||||||
]),
|
|
||||||
optionalList: additionalFields.optionalList.filter(
|
optionalList: additionalFields.optionalList.filter(
|
||||||
(opt) =>
|
(opt) =>
|
||||||
!(opt.type === newField.type && opt.id === newField.id)
|
!(opt.type === newField.type && opt.id === newField.id)
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ interface SelectorColorTemp {
|
|||||||
interface SelectorNumber {
|
interface SelectorNumber {
|
||||||
min: number;
|
min: number;
|
||||||
max: number;
|
max: number;
|
||||||
unit_of_measurement?: UnitOfMeasurement;
|
unit_of_measurement?: string;
|
||||||
mode?: Mode;
|
mode?: Mode;
|
||||||
step?: number;
|
step?: number;
|
||||||
}
|
}
|
||||||
@@ -57,14 +57,6 @@ enum Mode {
|
|||||||
Box = "box",
|
Box = "box",
|
||||||
}
|
}
|
||||||
|
|
||||||
enum UnitOfMeasurement {
|
|
||||||
Days = "days",
|
|
||||||
Empty = "%",
|
|
||||||
K = "K",
|
|
||||||
Seconds = "seconds",
|
|
||||||
Times = "times",
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SelectorSelect {
|
interface SelectorSelect {
|
||||||
options: OptionElement[];
|
options: OptionElement[];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user