diff --git a/src/frontend/src/components/forms/ApiForm.tsx b/src/frontend/src/components/forms/ApiForm.tsx
index c8c999f423..97ee69e2e8 100644
--- a/src/frontend/src/components/forms/ApiForm.tsx
+++ b/src/frontend/src/components/forms/ApiForm.tsx
@@ -1,5 +1,13 @@
import { t } from '@lingui/macro';
-import { Alert, Divider, Modal, ScrollArea, TextInput } from '@mantine/core';
+import {
+ Alert,
+ Checkbox,
+ Divider,
+ Modal,
+ NumberInput,
+ ScrollArea,
+ TextInput
+} from '@mantine/core';
import { Button, Center, Group, Loader, Stack, Text } from '@mantine/core';
import { useForm } from '@mantine/form';
import { IconAlertCircle } from '@tabler/icons-react';
@@ -20,13 +28,12 @@ export type ApiFormFieldType = {
name: string;
label?: string;
value?: any;
- type?: string;
+ fieldType?: string;
required?: boolean;
hidden?: boolean;
disabled?: boolean;
placeholder?: string;
description?: string;
- icon?: ReactNode;
errors?: string[];
error?: any;
};
@@ -59,14 +66,22 @@ function ApiFormField({
return def;
}, [field, definitions]);
- switch (definition.type) {
+ switch (definition.fieldType) {
case 'url':
case 'string':
return ;
+ case 'boolean':
+ return ;
+ case 'integer':
+ case 'decimal':
+ case 'float':
+ case 'number':
+ return ;
default:
return (
- Unknown field type for field '{definition.name}': {definition.type}
+ Unknown field type for field '{definition.name}':{' '}
+ {definition.fieldType}
);
}
@@ -194,10 +209,9 @@ export function ApiForm({
label: field.label,
description: field.help_text,
value: field.value,
- type: field.type,
+ fieldType: field.type,
required: field.required,
- placeholder: field.placeholder,
- icon: field.icon
+ placeholder: field.placeholder
});
}
diff --git a/src/frontend/src/pages/Index/Home.tsx b/src/frontend/src/pages/Index/Home.tsx
index 918890cf05..ba151c1d50 100644
--- a/src/frontend/src/pages/Index/Home.tsx
+++ b/src/frontend/src/pages/Index/Home.tsx
@@ -31,6 +31,9 @@ export default function Home() {
},
{
name: 'virtual'
+ },
+ {
+ name: 'minimum_stock'
}
];