Mini Homepage
Document Feature
Title
Homepage for the city with less than 100 Partners (Apply mini homepage to cities)
Description / Background
As we are expanding to more cities, the initial stage of Partner acquisition is usually at a slow pace. The main page (Bangkok) aims to present as many choices as possible for the users but for new cities, we aim to fill up the space with the Partners at hand plus the promotions.
Objectives
- Can switch between cities using the City Dropdown
- Can see the Partners located for each city (determined by the Primary location)
- Can see the correct currency based of the Partners location
- Once logged in, can see the survey to determine the initial preference for Recommended for you section
- Can see the available Service Type shortcuts
- Can see the promotions tagged to that City
- Can see the City’s
- Trending outlets
- Top cuisines
- Near me outlets (if location service is turned on)
- Book Again outlets (if the user has past bookings)
- Gift Card banner
Scope
- All platforms
Sequence Diagram / Flow
ERD

DB Schema / Database Migration
| Column Name | Data Type | Description |
|---|---|---|
| record_guests | boolean | change all data record_guest to false |
| city service type | new table | add new CityServiceType table |
| service type | new table | add new service type table (type_code, logo) |
API Blueprint
| Method | Path | URL | Description | Payload |
|---|---|---|---|---|
| GET | /api/v5/cities.json | https://hhstaging.hungryhub.com/api/v5/cities.json | add total_restaurants params on attributes | |
New Query
https://github.com/hungryhub-team/hh-server/pull/4056/files
Add new worker run after commit on package_raits and restaurant_package:
after_commit :update_restaurant_earn_point
def update_restaurant_earn_point
HhPackage::EarnPointRestaurantWorker.perform_async(restaurant_packages.map(&:restaurant_id).uniq)
end
on restaurant_package:
after_commit :update_restaurant_earn_point
def update_restaurant_earn_point
HhPackage::EarnPointRestaurantWorker.perform_async(restaurant_id)
end
Add earn_point to fetured_restaurant_serializer and restaurant_serializer
Notes, Constraint & Assumptions
TODO / Task List / Action Items
References
https://docs.google.com/document/d/1Z5ge467Eyty4Sq_aSd00PX97odzeL09wbkXmJV4VM2c/edit
https://www.figma.com/file/P3Ca3Jp1HaFKm6jEbe5Wbs/Mini-Homepage?node-id=0%3A1&t=2ZLRRVdqigeErgD1-0
Change History
| NO | Date Time | What Chaged | Description |
|---|---|---|---|
| 1 | 16 Feb 2023 | - | Initial Document |