feat(LOY-55): Add FilterRewardsModal * feat(LOY-55): Add rewards filtering functionality - Implement dynamic rewards filtering by category and membership level - Create FilterRewardsModal component for filtering rewards - Add useFilteredRewards hook to handle filtering logic - Update rewards schema and constants to support new filtering features - Remove hardcoded page size and replace with constant * fix(LOY-55): reuse existing tier to friend map * refactor(LOY-55): fix checkbox onChange type safety * refactor(LOY-55): Improve rewards filtering type safety and validation * refactor(LOY-55): Update filter modal border color using design token Approved-by: Christian Andolf
58 lines
1.5 KiB
TypeScript
58 lines
1.5 KiB
TypeScript
export const REWARD_IDS = {
|
|
// Food & Beverage
|
|
TenPercentFood: "tier_10_percent_food_tier",
|
|
TwoForOneBreakfast: "tier_2_for_one_breakfast",
|
|
FifteenPercentFood: "tier_15_percent_food",
|
|
FreeKidsDrink: "tier_free_kids_drink",
|
|
FreeBreakfast: "tier_free_breakfast",
|
|
|
|
// Monetary Vouchers
|
|
Bonus50SEK: "tier_50_SEK_bonus_voucher",
|
|
Bonus75SEK: "tier_75_SEK_bonus_voucher",
|
|
Bonus100SEK: "tier_100_SEK_bonus_voucher",
|
|
Bonus150SEK: "tier_150_SEK_bonus_voucher",
|
|
Bonus200SEK: "tier_200_SEK_bonus_voucher",
|
|
|
|
// Hotel Perks
|
|
EarlyCheckin: "tier_early_checkin_tier",
|
|
LateCheckout: "tier_late_checkout",
|
|
FreeUpgrade: "tier_free_upgrade",
|
|
RoomGuarantee48H: "tier_48_h_room_guarantee",
|
|
// GymAccess: "tier_gym_access",
|
|
|
|
// Earning & Points
|
|
EarnRate25Percent: "tier_25_percent_earn_rate",
|
|
EarnRate50Percent: "tier_50_percent_earn_rate",
|
|
StayBoostForKids: "tier_stay_boost_for_kids",
|
|
MemberRate: "tier_member_rate",
|
|
|
|
// Special
|
|
YearlyExclusiveGift: "tier_yearly_exclusive_gift",
|
|
} as const
|
|
|
|
export const RESTAURANT_REWARD_IDS = [
|
|
REWARD_IDS.TenPercentFood,
|
|
REWARD_IDS.TwoForOneBreakfast,
|
|
REWARD_IDS.FifteenPercentFood,
|
|
REWARD_IDS.FreeKidsDrink,
|
|
REWARD_IDS.FreeBreakfast,
|
|
] as const
|
|
|
|
export const COUPON_REWARD_TYPES = [
|
|
"Surprise",
|
|
"Campaign",
|
|
"Member-voucher",
|
|
] as const
|
|
|
|
export const REWARD_TYPES = [...COUPON_REWARD_TYPES, "Tier"] as const
|
|
|
|
export const REWARDS_PER_PAGE = 6
|
|
|
|
export const REWARD_CATEGORIES = [
|
|
"Restaurants",
|
|
"Bar",
|
|
"Voucher",
|
|
"Services and rooms",
|
|
"Spa and gym",
|
|
] as const
|