Corrección sistema de paradas: Activar clic en ArrivalBanner para abrir ETACard y ocultar paradas; asegurar visibilidad de pestaña inferior
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
<div
|
||||
v-if="isVisible"
|
||||
class="best-stop-banner-compact"
|
||||
@click="$emit('click')"
|
||||
>
|
||||
<div class="banner-icon-bg">
|
||||
<span class="material-icons text-white text-[16px]">directions_bus</span>
|
||||
@ -45,7 +46,7 @@ const props = defineProps<{
|
||||
etaValue: number | string
|
||||
}>()
|
||||
|
||||
defineEmits(['close'])
|
||||
defineEmits(['close', 'click'])
|
||||
|
||||
const { t } = useI18n()
|
||||
</script>
|
||||
|
||||
@ -102,6 +102,7 @@ async function animateAndReload() {
|
||||
|
||||
// Limpiar mapa sin recargar
|
||||
clearMapMarkers();
|
||||
showETACard.value = false;
|
||||
|
||||
// Recentrar en el usuario si está disponible (soft-reset)
|
||||
if (userCoords.value) {
|
||||
@ -410,6 +411,14 @@ watch([etaCargando, () => busesActivos.value.length], ([loading, count]) => {
|
||||
});
|
||||
*/
|
||||
|
||||
function handleBannerClick() {
|
||||
showETACard.value = true;
|
||||
// Desaparecer las paradas:
|
||||
routeStore.clearSelection();
|
||||
router.replace({ query: {} });
|
||||
clearMapMarkers();
|
||||
}
|
||||
|
||||
// Watch for route selection changes
|
||||
watch(() => routeStore.selectedRouteId, (routeId) => {
|
||||
if (routeId) {
|
||||
@ -423,7 +432,7 @@ watch(() => routeStore.selectedRouteId, (routeId) => {
|
||||
}
|
||||
} else {
|
||||
clearMapMarkers();
|
||||
showETACard.value = false;
|
||||
// showETACard.value = false; // REVERTED: Mantener ETACard abierta aunque se limpie el mapa (petición de usuario)
|
||||
}
|
||||
});
|
||||
|
||||
@ -511,7 +520,7 @@ watch([() => authStore.userProfile?.auto_location, isLoaded], ([canLocate, loade
|
||||
:has-active-buses="busesActivos.length > 0"
|
||||
:eta-value="busesActivos[0]?.etaMinutos ?? 0"
|
||||
@close="animateAndReload"
|
||||
@click="showETACard = true"
|
||||
@click="handleBannerClick"
|
||||
/>
|
||||
</template>
|
||||
</SearchOverlay>
|
||||
|
||||
Reference in New Issue
Block a user