fix(favorites): adjust favorite button visibility and functionality

- removed favorite button from Discover cards

- added call button for taxis in Favorites view

- added favorite button in Shuttle details

- added Shuttles category in Favorites view
This commit is contained in:
2026-03-04 16:34:47 -05:00
parent ef5955cea2
commit 35e2a6d632
6 changed files with 94 additions and 31 deletions

View File

@ -5,7 +5,7 @@ import { supabase } from '@/supabase'
export interface Favorite {
id: string
user_id: string
item_type: 'coupon' | 'business' | 'taxi' | 'route' | 'stop'
item_type: 'coupon' | 'business' | 'taxi' | 'route' | 'stop' | 'shuttle'
item_id: string
item_name?: string
item_image?: string
@ -21,6 +21,7 @@ export const useFavoritesStore = defineStore('favorites', () => {
const taxis = computed(() => favorites.value.filter(f => f.item_type === 'taxi'))
const routes = computed(() => favorites.value.filter(f => f.item_type === 'route'))
const stops = computed(() => favorites.value.filter(f => f.item_type === 'stop'))
const shuttles = computed(() => favorites.value.filter(f => f.item_type === 'shuttle'))
async function loadFavorites() {
isLoading.value = true
@ -50,7 +51,7 @@ export const useFavoritesStore = defineStore('favorites', () => {
}
async function addFavorite(
itemType: 'coupon' | 'business' | 'taxi' | 'route' | 'stop',
itemType: 'coupon' | 'business' | 'taxi' | 'route' | 'stop' | 'shuttle',
itemId: string,
itemName?: string,
itemImage?: string
@ -97,7 +98,7 @@ export const useFavoritesStore = defineStore('favorites', () => {
}
async function toggleFavorite(
itemType: 'coupon' | 'business' | 'taxi' | 'route' | 'stop',
itemType: 'coupon' | 'business' | 'taxi' | 'route' | 'stop' | 'shuttle',
itemId: string,
itemName?: string,
itemImage?: string
@ -121,7 +122,7 @@ export const useFavoritesStore = defineStore('favorites', () => {
}
return {
favorites, isLoading, coupons, businesses, taxis, routes, stops,
favorites, isLoading, coupons, businesses, taxis, routes, stops, shuttles,
loadFavorites, addFavorite, removeFavorite, toggleFavorite, isFavorite
}
})