[Hybrid Event] Homepage Enhancement (Categories)
As usual client will receive the event onMounted we’ll trigger do setup data event. Client Event: doSetupData Payload:
{
"city_id": "1",
"latitude": "13.730005", (optional)
"longitude": "100.5770843" (optional)
}
If the client has latitude and longitude, we’ll send it at the beginning. But if not, it’s not a problem.
Hero Banner
Web Event: onBannerClicked
Response:
{
"target_url": "https://web.hungryhub.com/top-10-pattaya?locale=th"
}
In the client, we handle whether this URL goes to a single restaurant, a group landing page, or any other handled deep link URL. This is the same as our current banner-click logic.
Restaurant Search
_20250804134037_Screen_Shot_2023-06-27_at_16.13.29_a6fb4cbb.png)
Web Event: onClickSearchField If search field click will open existing search suggestion, same as logic in search page hybrid.
Select City
Web Event: onSelectedCity Response:
{
"id": "1",
"type": "cities",
"attributes": {
"name": "Bangkok",
"home_description": null,
"icon": {
"url": "https://hh-engineering.my.id/uploads/city/icon/1/Bangkok.png"
},
"country_id": 218,
"is_mini_homepage": false,
"country_icon": {
"url": "https://hh-engineering.my.id/uploads/country/icon/218/th.png"
},
"total_restaurants": 1070
}
}
Recommended Hastags
Web Event: onTagClicked
Response:
{
"id": "6",
"type": "restaurant_tags",
"attributes": {
"cover": {
"url": "https://hh-engineering.my.id/uploads/restaurant_tag/cover/6/cuisine-indian.jpeg"
},
"title": "Indian",
"title_en": "Cuisine:Indian",
"tag_type": "cuisine",
"total_restaurants": 1
}
}
Promotion Banner
Web Event: onBannerClicked
Response:
{
"target_url": "https://web.hungryhub.com/top-10-pattaya?locale=th"
}
For this one we can use the same event as hero banner. Since the data is the same.
Group Card
For this group card if we click will open group landing for section restaurant.
_20250804134037_Screen_Shot_2023-06-28_at_15.52.18_31b4de4d.png)
Web Event: onGroupClicked Response:
{
"target_url": "https://web.hungryhub.com/trending"
}
The target_url must be the full URL (https://web.hungryhub.com/ + slug), not just the slug.
Near Me Restaurant
Web Event: requestUserLocation Client will handle by showing request permission location, after got permission will return latitude and longitude to hybrid. Client Event: sendUserLocation Payload:
{
"latitude": "13.730005",
"longitude": "100.5770843"
}
Restaurant Data
If the restaurant object is “featured_restaurants”
Web Event: onClickFeaturedRestaurant
{
"restaurant_id": 12, (Integer except 0 possible null)
"branch_id": null,
}
If the search object is a “restaurants” Web Event: onClickRestaurant Since the restaurants have some data for clever tap this is the param that we need:
{
"restaurant_id": 12,
"restaurant_link": "",
"restaurant_name": "",
"restaurant_name_en": "",
"restaurant_name_th": "",
"index": 1, // restaurant position
}
Top Cuisines/Location/Amazing Place
Since the data is the same we’ll use same as recommended tags
Web Event: onTagClicked
Response:
{
"id": "6",
"type": "restaurant_tags",
"attributes": {
"cover": {
"url": "https://hh-engineering.my.id/uploads/restaurant_tag/cover/6/cuisine-indian.jpeg"
},
"title": "Indian",
"title_en": "Cuisine:Indian",
"tag_type": "cuisine",
"total_restaurants": 1
}
}
Hungry Hub Special
We have 5 icons for Hungry Hub Special:
- Buy Voucher > search restaurant that sell voucher
- Buy Gift Card card > buy gift card landing page
- Come More Pay Less > https://web.hungryhub.com/trending
- Most Loved by Users > filter by most reviewed
- Accept Offers & Gift Cards > search restaurant that accept offers and gift card
We’ll make it dynamic from API UI admin dashboard: https://hh-engineering.my.id/admin/hh_specials?locale=th API: https://hh-engineering.my.id/api/v5/hungryhub_specials
But for event we can make it simple like this: Web Event: onSpecialClicked
{
"target_url": "https://web.hungryhub.com/9th-anniversary-special-package?locale=en"
}
Update logic dining styles
We also adjust logic in onTagClicked event to handle dining styles. Previously, in doSearch, we used facility_ids, but Team B implemented filtering by dining style. If tag_type is DiningStyle, we use dining_style_ids.
Event: onTagClicked
{
"attributes" : {
"title" : "Buffet New",
"tag_type" : "DiningStyle",
"total_restaurants" : 36,
"cover" : {
"url" : "https:\/\/hh-engineering.my.id\/img\/hh_logo.png"
},
"title_en" : "DiningStyle:Buffet New"
},
"id" : "15",
"type" : "restaurant_tags"
}
Event: doSearch
{
"dining_style_ids": [
{
"id": "18",
"name": "Rooftop"
}
]
}
Client implementation note:
- When
onTagClickedreturnstag_type: "DiningStyle", map that tag todining_style_idsin thedoSearchpayload. - Do not send
facility_idsfor DiningStyle tags. - Keep existing behavior for other tag types.
View All Restaurants
Event: onViewAllRestaurants
{
"target_url": "https://web.hungryhub.com/restaurants/search?city_id=1"
}