[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 client have latitude and longitude we'll send it in the beginning. But if not not problem.
Hero Banner
Web Event: onBannerClicked
Response:
{
"target_url": "https://web.hungryhub.com/top-10-pattaya?locale=th"
}
In client we handle is this URL goes single restaurant, group landing page or any handled deeplink URL. Same as our current logic in banner click.
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://hhstaging.hungryhub.com/uploads/city/icon/1/Bangkok.png"
},
"country_id": 218,
"is_mini_homepage": false,
"country_icon": {
"url": "https://hhstaging.hungryhub.com/uploads/country/icon/218/th.png"
},
"total_restaurants": 1070
}
}
Recommended Hastags
Web Event: onTagClicked
Response:
{
"id": "6",
"type": "restaurant_tags",
"attributes": {
"cover": {
"url": "https://hhstaging.hungryhub.com/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"
}
Please put this https://web.hungryhub.com/+slug instead slug only
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://hhstaging.hungryhub.com/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 icon for hungryhub special:
- Buy Voucher > search restaurant that sell voucher
- Buy Gift Card card > buy gift card landing page
- Come More Pay Less > which group landing page?
- 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://hhstaging.hungryhub.com/admin/hh_specials?locale=th API: https://hhstaging.hungryhub.com/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. Previously on doSearch we're using facility_ids but since team B implement filter by dining style. So, if tag_type DiningStyle we'll use dining_style_ids. Event: onTagClicked
{
"attributes" : {
"title" : "Buffet New",
"tag_type" : "DiningStyle",
"total_restaurants" : 36,
"cover" : {
"url" : "https:\/\/hhstaging.hungryhub.com\/img\/hh_logo.png"
},
"title_en" : "DiningStyle:Buffet New"
},
"id" : "15",
"type" : "restaurant_tags"
}
Event: doSearch
{
"dining_style_ids": [
{
"id": "18",
"name": "Rooftop"
}
]
}
View All Restaurants
Event: onViewAllRestaurants
{
"target_url": "https://web.hungryhub.com/restaurants/search?city_id=1"
}