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 allow the admin/operation team to preview their package before delivering it to users. A checkbox was added on the package settings when assigning to a restaurant:

Backend

The backend should handle is_preview packages 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

The API must hide the package (not return data to the client) unless the client sends the additional parameter is_preview=true.

Frontend

The frontend needs to send is_preview=true when a user is logged in with an @hungryhub.com email on those 2 APIs. By default, the is_preview parameter should not be sent.