Merged in feat/LOY-55-Filter-Modal (pull request #1509)
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
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import {
|
||||
RESTAURANT_REWARD_IDS,
|
||||
REWARD_CATEGORIES,
|
||||
REWARD_IDS,
|
||||
REWARD_TYPES,
|
||||
} from "@/constants/rewards"
|
||||
@@ -9,6 +10,7 @@ import type { Dayjs } from "dayjs"
|
||||
|
||||
import type {
|
||||
RestaurantRewardId,
|
||||
RewardCategory,
|
||||
RewardId,
|
||||
RewardType,
|
||||
} from "@/types/components/myPages/rewards"
|
||||
@@ -23,6 +25,7 @@ export {
|
||||
isOnSiteTierReward,
|
||||
isRestaurantOnSiteTierReward,
|
||||
isRestaurantReward,
|
||||
isRewardCategory,
|
||||
isTierType,
|
||||
isValidRewardId,
|
||||
redeemLocationIsOnSite,
|
||||
@@ -36,6 +39,10 @@ function isRestaurantReward(rewardId: string): rewardId is RestaurantRewardId {
|
||||
return RESTAURANT_REWARD_IDS.some((id) => id === rewardId)
|
||||
}
|
||||
|
||||
function isRewardCategory(value: string): value is RewardCategory {
|
||||
return REWARD_CATEGORIES.some((category) => category === value)
|
||||
}
|
||||
|
||||
function redeemLocationIsOnSite(
|
||||
location: RewardWithRedeem["redeemLocation"]
|
||||
): location is "On-site" {
|
||||
|
||||
Reference in New Issue
Block a user