coryhouse / coryhouse/react-restaurant-scriptpro
Add saveFood + deleteFood mutations with invalidation + toast
Open
enhancement
phase-6-admin-forms
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
## Goal
Add `useMutation` hooks for saving (create + update) and deleting a food. On success, invalidate the foods queries and show a toast.
## Acceptance criteria
- [ ] `saveFood` POSTs (create) or PUTs (edit) to the mock API
- [ ] `deleteFood` DELETEs and invalidates the list query
- [ ] Success toast on save and delete
- [ ] Errors show a clear error toast
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.