diff --git a/barkmanui/src/features/inventory/AddItem.tsx b/barkmanui/src/features/inventory/AddItem.tsx index 581e430..33be18c 100644 --- a/barkmanui/src/features/inventory/AddItem.tsx +++ b/barkmanui/src/features/inventory/AddItem.tsx @@ -74,7 +74,8 @@ function AddItem() { wrap="wrap"> Add Item - + ; function EditItem() { const params = useParams(); + const navigate = useNavigate(); const editItemForm = useForm({ mode: 'uncontrolled', @@ -54,7 +57,26 @@ function EditItem() { } }); + if (result.ok) { + notifications.show({ + icon: , + color:"teal", + title: "All good!", + message: "Item Updated", + position: 'top-center', + }); + navigate("/inventory"); + + } + if (!result.ok) { + notifications.show({ + icon: , + color:"red", + title: "Bummer!", + message: "Something went wrong", + position: 'top-center', + }); throw new Error('Failed to update inventory item'); }