ucsb-cs156-f24 / proj-dining-f24-14

https://ucsb-cs156-f24.github.io/proj-dining-f24-14/
0 stars 0 forks source link

EPIC: Dining Commons Menus displayed instead of placeholder #2

Open github-actions[bot] opened 1 day ago

github-actions[bot] commented 1 day ago

This epic interacts with #4 so read through that one first.

Having said that, these can be worked on in parallel.

The idea of this epic is to take the placeholder page described in Epic #4 and flesh it out with the menu items for a diningcommons.

User Story

Details

Proceed as follows

Backend 1: endpoint for meals

Create a service that will get all of the meals served in a particular dining commons on a particular date

Using the api endpoint described here: https://developer.ucsb.edu/apis/dining/dining-menu

Then build a controller endpoint /api/diningcommons/:date-time/:dining-commons-code the returns this information.

Backend 2: endpoint for menus

Create a service that will get all of the menu items served in a particular dining commons for a particular meal on a particular date

Using the api endpoint described here: https://developer.ucsb.edu/apis/dining/dining-menu

Then build a controller endpoint GET /api/diningcommons/:date-time/:dining-commons-code/:mealthat returns this information.

Backend 3: modify endpoint for menus

Modify the endpoint that retrieves menu items to so that each time a menu item is retreived, a record for that menu item is stored in a new database table with these fields:

Ensure that there are no duplicates in this table; every combination of DiningCommonsCode, Meal, Item Name and Station should be unique.

This id number will form the basis of efficient retrieval of reviews for particular menu items later.

Modify the endpoint so that the id is returned along with each menu item. This may require a data transfer object (ask for details, or look up DTOs.)

Frontend 1: table for meals (MealsTable)

Build a table that can display meals as returned by the GET /api/diningcommons/:date-time/:dining-commons-code endpoint. Each meal should link to a page /diningcommons/:date-time/:dining-commons-code/:meal

Frontend 2: table for menu items (MenuItemsTable)

Build a table that can display menu items as returned by the GET /api/diningcommons/:date-time/:dining-commons-code/:meal endpoint. Include a column with a button called "Review this item" which for now just brings up a `window.alert("Feature coming soon!") message.

The table should have columns for DiningCommonsCode, Meal, Item, Station, and id (the id from the MenuItems table)

Frontend 3 New placeholder page that will display menu items eventually.

Route is /diningcommons/:date-time/:dining-commons-code/:meal

Frontend 4: On placeholder page for /diningCommons/:dining-commons-code placeholder page created in #2 add date-time selector

Add a date-time selector that defaults to the current date and time.

Retrieve the meals from the endpoint GET /api/diningcommons/:date-time/:dining-commons-code and display those meals in a MealsTable

Have a button that allows the user to update the meals if/when the date is changed.

Each line in the meals table should go to the page /diningcommons/:date-time/:dining-commons-code/:meal which should be the placeholder created in Frontend 3 above.

Frontend 5: On the placeholder page /diningcommons/:date-time/:dining-commons-code/:meal , retreive the meal items, and display them in a MealTable.

Also display the name of the meal, and the date.

amanpdesai commented 11 hours ago

Progress on EPIC 2

Backend (Oviya)

Frontend (Aman)