From fc0b9604fb12155a6725790e0b0229dc6e73f742 Mon Sep 17 00:00:00 2001 From: Hanzo_dev <2002samudiojohan@gmail.com> Date: Mon, 2 Mar 2026 12:34:10 -0500 Subject: [PATCH] =?UTF-8?q?Revertir=20sistema=20de=20paradas:=20eliminar?= =?UTF-8?q?=20apertura=20autom=C3=A1tica=20de=20ETACard=20y=20limpieza=20p?= =?UTF-8?q?or=20falta=20de=20buses;=20restaurar=20interacci=C3=B3n=20manua?= =?UTF-8?q?l=20con=20paradas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/ETACard.vue | 21 +++++++------------ frontend/src/components/map/ArrivalBanner.vue | 2 +- frontend/src/composables/useFlujoPrincipal.ts | 7 +++++-- frontend/src/views/MapView.vue | 17 +++++++++++++-- 4 files changed, 29 insertions(+), 18 deletions(-) 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 >