diff --git a/frontend/src/components/ETACard.vue b/frontend/src/components/ETACard.vue index 1eb2718..5aa5148 100644 --- a/frontend/src/components/ETACard.vue +++ b/frontend/src/components/ETACard.vue @@ -27,8 +27,8 @@ Desliza hacia abajo para cerrar

- -
+ +
place
@@ -54,15 +54,10 @@ Calculando satélites...
- -
-
- no_bus -
-

- {{ t('map.noBusesAvailable') }} -

-

+ +

+ event_busy +

{{ t('schedules.noSchedules') }}

@@ -131,8 +126,8 @@
- -
+ +
info

Aviso: Este es un tiempo estimado basado en la velocidad promedio de las unidades en la ciudad. No existe rastreo GPS en tiempo real. diff --git a/frontend/src/components/map/ArrivalBanner.vue b/frontend/src/components/map/ArrivalBanner.vue index abcf2b5..4dce60f 100644 --- a/frontend/src/components/map/ArrivalBanner.vue +++ b/frontend/src/components/map/ArrivalBanner.vue @@ -13,7 +13,7 @@ {{ hasActiveBuses ? t('map.arrivalTime') : t('common.notice') }} - {{ hasActiveBuses ? stopName : (isLoading ? t('common.loading') : t('map.noBusesAvailable')) }} + {{ isLoading ? t('common.loading') : stopName }}

diff --git a/frontend/src/composables/useFlujoPrincipal.ts b/frontend/src/composables/useFlujoPrincipal.ts index 646edab..e01b829 100644 --- a/frontend/src/composables/useFlujoPrincipal.ts +++ b/frontend/src/composables/useFlujoPrincipal.ts @@ -30,7 +30,8 @@ export const useFlujoPrincipal = () => { paradas: BusStop[], map: google.maps.Map | undefined, addCleanMarker: Function, - skipGuidedZoom = false + skipGuidedZoom = false, + onStopClick?: (stop: BusStop) => void ) => { if (!map) return @@ -104,7 +105,9 @@ export const useFlujoPrincipal = () => { p.nombre, esCercana ? 'cercana' : (esPasada ? 'pasada' : 'normal'), () => { - console.log(`Click en parada: ${p.nombre}`); + if (onStopClick && paradas[i]) { + onStopClick(paradas[i]); + } } ); }); diff --git a/frontend/src/views/MapView.vue b/frontend/src/views/MapView.vue index 3a592ea..61b9bfd 100644 --- a/frontend/src/views/MapView.vue +++ b/frontend/src/views/MapView.vue @@ -239,7 +239,17 @@ async function updateMapMarkers(skipZoom = false) { } const selectedRouteObj = routeStore.allRoutes.find(r => r.id === currentRequestRouteId) || { id: currentRequestRouteId, short_name: currentRequestRouteId }; - await procesarSeleccionDeRuta(selectedRouteObj, stops as BusStop[], map.value, addCleanMarker, skipZoom); + await procesarSeleccionDeRuta( + selectedRouteObj, + stops as BusStop[], + map.value, + addCleanMarker, + skipZoom, + (stop: BusStop) => { + paradaCercana.value = stop; + showETACard.value = true; + } + ); reDrawUserMarker(); if (routeStore.selectedRouteId !== currentRequestRouteId) return; @@ -378,6 +388,8 @@ const sonarHtml = ` // Watch for route selection changes // Watch for ETA loading to automatically show ETACard if no buses are available +// REVERTED: Stop automatic opening and clearing +/* watch([etaCargando, () => busesActivos.value.length], ([loading, count]) => { if (!loading && count === 0 && routeStore.selectedRouteId && routeStore.wasSelectedFromMap) { showETACard.value = true; @@ -396,6 +408,7 @@ watch([etaCargando, () => busesActivos.value.length], ([loading, count]) => { }, 300); } }); +*/ // Watch for route selection changes watch(() => routeStore.selectedRouteId, (routeId) => { @@ -492,7 +505,7 @@ watch([() => authStore.userProfile?.auto_location, isLoaded], ([canLocate, loade >