-
Notifications
You must be signed in to change notification settings - Fork 1
Backend
the backend uses Express.js and the Node.js framework in order to communicate with a PSQL database
Post request Handles queries for the LLM of panda bot. pass in a query param as a string and will recieve a string in JSON
Get request home of manager
Get request gets a list all employee data, returned as a JSON array Example: [{"employeeid":12,"full_name":"Victoria Garcia","email":"[email protected]","phone_number":"625-817-203","hourly_wage":"20.00","position":"Employee"},{"employeeid":13,"full_name":"Joseph Maynard","email":"[email protected]","phone_number":"504-677-338","hourly_wage":"20.00","position":"Employee"}]
Get request gets a list of the 5 most recent orders submitted today (according to system time) returned as a JSON Example:[{"date_time_ordered":"2024-12-07T20:54:13.000Z","order_number":97438,"price":"11.30"},{"date_time_ordered":"2024-12-07T20:51:19.000Z","order_number":97514,"price":"1.00"},{"date_time_ordered":"2024-12-07T20:48:52.000Z","order_number":97599,"price":"5.20"},{"date_time_ordered":"2024-12-07T20:45:56.000Z","order_number":97585,"price":"9.80"},{"date_time_ordered":"2024-12-07T20:42:06.000Z","order_number":97406,"price":"19.30"}]
Get request gets a list of the number of each combo ordered today (according to system time) as a JSON Example: {"bowl":30,"plate":46,"bigger plate":45,"a la carte":148,"family meal":2,"panda cub meal":0,"party platter":9}
Get request gets a list of all menu items as a JSON array Example: [{"item_serial_number":1,"item_name":"Chow Mein","item_type":"Sides","availability":true},{"item_serial_number":2,"item_name":"Fried Rice","item_type":"Sides","availability":true},{"item_serial_number":5,"item_name":"Hot Ones Blazing Bourbon Chicken","item_type":"Entrees","availability":true},{"item_serial_number":7,"item_name":"Black Pepper Sirloin Steak","item_type":"Entrees","availability":true},{"item_serial_number":8,"item_name":"Honey Walnut Shrimp","item_type":"Entrees","availability":true}]
Get request gets a list of the names of all the menu items as a JSON array Example: [{"item_name":"Chow Mein"},{"item_name":"Fried Rice"},{"item_name":"Hot Ones Blazing Bourbon Chicken"},{"item_name":"Black Pepper Sirloin Steak"},{"item_name":"Honey Walnut Shrimp"}]
Get request gets the price of the cheapest item of a given menu option as a array Example:[8.3,9.8,11.3,5.2,8.5,11.2,43,6.6,41,108,154,194,4.4,5.4]
Get request gets the employee name given the ID number in params
Get request gets the ID of the employee given the name of the employee in params
Post request adds a new employee to the database given a JSON of the attributes in body Example: {"employeeid":12,"full_name":"Victoria Garcia","email":"[email protected]","phone_number":"625-817 203","hourly_wage":"20.00","position":"Employee"}
Delete request deletes an employee given the id of the employee in params
Put request updates the employee's name given the id in params of the employee and the new name in body
Put request updates the employee's email given the id in params of the employee and the new email in body
Put request updates the employee's phone number given the id in params of the employee and the new phone number in body
Put request updates the employee's wage given the id in params of the employee and the new wage in body
Put request updates the employee's position given the id in params of the employee and the new position in body
Get request gets all the ingredients used given the type of combo and the item ordered in query Example: {ingredient_serial_number : ingred_serial, ingredient_servings : ingred_servings, utinsels : servs}
Get request creates a zReport given the start and end times in params Example: {"11 AM":201.6,"12 PM":427.6,"1 PM":761.8,"2 PM":979.3,"3 PM":1340.6999999999998,"4 PM":1692.4999999999998,"5 PM":1909.2999999999997,"6 PM":2175.8999999999996,"7 PM":2444.7999999999997,"8 PM":2737.6699999999996,"9 PM":2924.6699999999996}
Get request creates a xReport for the current day Example: [{"start_time":"10:00 AM","end_time":"10:59 AM","total_orders":"20","total_cost":"201.60","total_items":45},{"start_time":"11:00 AM","end_time":"11:59 AM","total_orders":"23","total_cost":"226.00","total_items":68},{"start_time":"12:00 PM","end_time":"12:59 PM","total_orders":"24","total_cost":"334.20","total_items":70},{"start_time":"01:00 PM","end_time":"01:59 PM","total_orders":"17","total_cost":"217.50","total_items":53},{"start_time":"02:00 PM","end_time":"02:59 PM","total_orders":"20","total_cost":"361.40","total_items":65},{"start_time":"03:00 PM","end_time":"03:59 PM","total_orders":"24","total_cost":"351.80","total_items":57},{"start_time":"04:00 PM","end_time":"04:59 PM","total_orders":"20","total_cost":"216.80","total_items":64},{"start_time":"05:00 PM","end_time":"05:59 PM","total_orders":"13","total_cost":"266.60","total_items":33},{"start_time":"06:00 PM","end_time":"06:59 PM","total_orders":"17","total_cost":"268.90","total_items":61},{"start_time":"07:00 PM","end_time":"07:59 PM","total_orders":"22","total_cost":"292.87","total_items":85},{"start_time":"08:00 PM","end_time":"08:59 PM","total_orders":"18","total_cost":"187.00","total_items":49}]
Get request adds menu item given params
Get request adds an ingredient entry to the database given params
Get request changes the price of an item given params
Get request gets the inventory usage given a time range in query Example usage: startTime : "00:00:00" endTime : "11:11:11"
Get request gets the sales report list of items given a time range in query Example usage: startTime : "00:00:00" endTime : "11:11:11"
home of submit order
Post request submits an order given the cart in body Example usage: types = ['bowl', 'plate'] -> options items = 'mushroom chicken','chow mein'] ,['orange chicken', 'fried rice', 'super greens' -> items asscoiated with each option
Get request gets the total price of the order given params in query Example usage: types = ['bowl', 'plate'] -> options items = 'mushroom chicken','chow mein'] ,['orange chicken', 'fried rice', 'super greens' -> items asscoiated with each option