fix: recarga total de mapa, corregir 400 bus_stops y flicker de mensaje de buses
This commit is contained in:
@ -13,7 +13,7 @@
|
|||||||
{{ hasActiveBuses ? t('map.arrivalTime') : t('common.notice') }}
|
{{ hasActiveBuses ? t('map.arrivalTime') : t('common.notice') }}
|
||||||
</span>
|
</span>
|
||||||
<span class="trigger-text-compact truncate leading-tight">
|
<span class="trigger-text-compact truncate leading-tight">
|
||||||
{{ hasActiveBuses ? stopName : t('map.noBusesAvailable') }}
|
{{ hasActiveBuses ? stopName : (isLoading ? t('common.loading') : t('map.noBusesAvailable')) }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -5,14 +5,14 @@ import type { BusStop, Route } from '@/types'
|
|||||||
export const busStopsService = {
|
export const busStopsService = {
|
||||||
/** Get all bus stops */
|
/** Get all bus stops */
|
||||||
async getAllBusStops(): Promise<BusStop[]> {
|
async getAllBusStops(): Promise<BusStop[]> {
|
||||||
const { data, error } = await supabase.from('bus_stops').select('id, name, latitude, longitude, city, address, parent_id, side, stop_type, has_shelter, has_seating, is_accessible, created_at, updated_at')
|
const { data, error } = await supabase.from('bus_stops').select('id, name, latitude, longitude, city, address, stop_type, has_shelter, has_seating, is_accessible, created_at, updated_at')
|
||||||
if (error) throw new Error(error.message)
|
if (error) throw new Error(error.message)
|
||||||
return data as BusStop[]
|
return data as BusStop[]
|
||||||
},
|
},
|
||||||
|
|
||||||
/** Get a single bus stop by ID */
|
/** Get a single bus stop by ID */
|
||||||
async getBusStopById(id: string): Promise<BusStop> {
|
async getBusStopById(id: string): Promise<BusStop> {
|
||||||
const { data, error } = await supabase.from('bus_stops').select('id, name, latitude, longitude, city, address, parent_id, side, stop_type, has_shelter, has_seating, is_accessible, created_at, updated_at').eq('id', id).single()
|
const { data, error } = await supabase.from('bus_stops').select('id, name, latitude, longitude, city, address, stop_type, has_shelter, has_seating, is_accessible, created_at, updated_at').eq('id', id).single()
|
||||||
if (error) throw new Error(error.message)
|
if (error) throw new Error(error.message)
|
||||||
return data as BusStop
|
return data as BusStop
|
||||||
},
|
},
|
||||||
|
|||||||
@ -27,8 +27,6 @@ export interface BusStop {
|
|||||||
longitude: number
|
longitude: number
|
||||||
city?: string
|
city?: string
|
||||||
address?: string
|
address?: string
|
||||||
parent_id?: string
|
|
||||||
side?: string
|
|
||||||
stop_type: StopType
|
stop_type: StopType
|
||||||
has_shelter: boolean
|
has_shelter: boolean
|
||||||
has_seating: boolean
|
has_seating: boolean
|
||||||
|
|||||||
@ -74,13 +74,9 @@ function closeUberSearch() {
|
|||||||
|
|
||||||
function animateAndReload() {
|
function animateAndReload() {
|
||||||
isBannerClosing.value = true;
|
isBannerClosing.value = true;
|
||||||
// Limpiar mapa inmediatamente para feedback visual instantáneo
|
routeStore.clearSelection();
|
||||||
clearMapMarkers();
|
// Solución anterior: Recargar para mapa limpio
|
||||||
setTimeout(() => {
|
window.location.href = window.location.origin + window.location.pathname;
|
||||||
routeStore.clearSelection();
|
|
||||||
isBannerClosing.value = false;
|
|
||||||
router.replace({ query: {} });
|
|
||||||
}, 450);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function handlePromoClick(promo: any) {
|
function handlePromoClick(promo: any) {
|
||||||
|
|||||||
Reference in New Issue
Block a user