Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Preview Package on Admin

The goal for this project is to make admin/operation team can preview their package before deliver to user. So, we add a checkbox on setting package when assign to the restaurant like this:

Backend

Backend should handle is_preview package in 2 APIs:

  1. On the restaurant detail page: {{base_api}}/restaurant_packages.json
  2. On find available package by date time {{base_api}}/restaurants/{res_id}/find_available_packages.json API need to hide that package or don't give data to the user unless client sends an additional parameter is_preview = true.

Frontend

Frontend need to handle send is_preview = true if user login user email @hungryhub.com on those 2 APIs. For the default, don't send any is_preview parameter.