diff --git a/barkmanui/src/App.tsx b/barkmanui/src/App.tsx index d901048..9633399 100644 --- a/barkmanui/src/App.tsx +++ b/barkmanui/src/App.tsx @@ -6,6 +6,7 @@ import {createTheme, MantineProvider} from '@mantine/core'; import '@mantine/core/styles.css'; import ItemDetail from "./features/inventory/ItemDetail.tsx"; import EditItem from "./features/inventory/EditItem.tsx"; +import {BarkHeader} from "./common/components/BarkHeader.tsx"; // Create a client const queryClient = new QueryClient() @@ -33,6 +34,7 @@ function App() { return { ( <> + } /> } /> @@ -40,7 +42,6 @@ function App() { } /> - ) }; diff --git a/barkmanui/src/features/inventory/EditItem.tsx b/barkmanui/src/features/inventory/EditItem.tsx index c0c2e23..2755408 100644 --- a/barkmanui/src/features/inventory/EditItem.tsx +++ b/barkmanui/src/features/inventory/EditItem.tsx @@ -1,13 +1,22 @@ -import {NumberInput, Stack, Text, Textarea, TextInput} from "@mantine/core"; -import {BarkHeader} from "../../common/components/BarkHeader.tsx"; +import {Button, Group, TextInput, Text, Textarea, NumberInput} from '@mantine/core'; +import { useForm } from '@mantine/form'; import {useParams} from "react-router"; -import {InventoryItem} from "./types.ts"; import {useQuery} from "@tanstack/react-query"; - - +import {InventoryItem} from "./types.ts"; function EditItem() { - let params = useParams(); + const params = useParams(); + + const form = useForm({ + mode: 'uncontrolled', + initialValues: { + email: '', + termsOfService: false, + }, + + validate: { + }, + }); const { isPending, error, data, isFetching } = useQuery({ queryKey: ['inventory', params.itemId], @@ -26,31 +35,24 @@ function EditItem() { if (error) return 'An error has occurred: ' + error.message - return ( - <> - - - Edit Item -
{isFetching ? 'Updating...' : ''}
- ID: {data.id} - - - - - - - Replacement Cost: ${data.replacementCost} -