Admin Dashboard
The Admin Dashboard features a form for adding items to the restaurant's menu. The form collects input from the user and creates a menu item object. The object is sent to the University-provided API via an AJAX Fetch request, using the POST method. The page also features a table with current menu items, which is updated by pulling the menu item objects down from the API using an AJAX Fetch request. I used a JavaScript function to create a table to display the menu items in table form and added a delete link, which uses an AJAX Fetch call with a DELETE method to delete individual objects from the menu. When the user clicks the Log Out button, the user object is removed from session storage, the Admin Dashboard gets hidden, and the Admin Login form displays.