Abhinav kitchen inventory management create backend api endpoints to get events to the calendar#2082
Open
abhinav-TB wants to merge 3 commits intodevelopmentfrom
Conversation
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Description
Implements backend API endpoints for the Kitchen Inventory Calendar feature. These endpoints allow the frontend calendar to retrieve, create, and delete events across Garden, Orchard, Animals, and Kitchen modules, filtered by month/year and optional module.
Implements # Kitchen Inventory Management - Create Backend API endpoints to get events to the calendar
Related PRs (if any):
This is a backend-only PR.
Main changes explained:
/and DELETE on/:id/api/kitchenandinventory/calendarHow to test:
Abhinav-Kitchen-Inventory-Management-Create-Backend-API-endpoints-to-get-events-to-the-calendarnpm installandnpm run devPOST /api/loginwith admin credentials to get a JWT tokenAuthorizationheader with the token for all following requestsPOST /api/kitchenandinventory/calendar Body: { "title": "Strawberry Seeding", "module": "garden", "event_type": "seeding", "scheduled_date": "2026-03-15", "description": "Plant strawberry seeds in greenhouse", "assigned_to": "Garden Team", "related_item": "Strawberry Seeds" } Verify 201 response with the created event
GET /api/kitchenandinventory/calendar?month=3&year=2026— verify the event appears in the responseGET /api/kitchenandinventory/calendar?month=3&year=2026&module=garden— verify only garden events are returnedDELETE /api/kitchenandinventory/calendar/<event_id>— use the_idfrom step 5, verify 200 responseGET /api/kitchenandinventory/calendar(no params) — verify 400 errorGET /api/kitchenandinventory/calendar?month=3&year=2026&module=invalid— verify 400 errorScreenshots or videos of changes: