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
|
<div
|
||||||
v-if="isVisible"
|
v-if="isVisible"
|
||||||
class="best-stop-banner-compact"
|
class="best-stop-banner-compact"
|
||||||
|
@click="$emit('click')"
|
||||||
>
|
>
|
||||||
<div class="banner-icon-bg">
|
<div class="banner-icon-bg">
|
||||||
<span class="material-icons text-white text-[16px]">directions_bus</span>
|
<span class="material-icons text-white text-[16px]">directions_bus</span>
|
||||||
@ -45,7 +46,7 @@ const props = defineProps<{
|
|||||||
etaValue: number | string
|
etaValue: number | string
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
defineEmits(['close'])
|
defineEmits(['close', 'click'])
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -102,6 +102,7 @@ async function animateAndReload() {
|
|||||||
|
|
||||||
// Limpiar mapa sin recargar
|
// Limpiar mapa sin recargar
|
||||||
clearMapMarkers();
|
clearMapMarkers();
|
||||||
|
showETACard.value = false;
|
||||||
|
|
||||||
// Recentrar en el usuario si está disponible (soft-reset)
|
// Recentrar en el usuario si está disponible (soft-reset)
|
||||||
if (userCoords.value) {
|
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 for route selection changes
|
||||||
watch(() => routeStore.selectedRouteId, (routeId) => {
|
watch(() => routeStore.selectedRouteId, (routeId) => {
|
||||||
if (routeId) {
|
if (routeId) {
|
||||||
@ -423,7 +432,7 @@ watch(() => routeStore.selectedRouteId, (routeId) => {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
clearMapMarkers();
|
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"
|
:has-active-buses="busesActivos.length > 0"
|
||||||
:eta-value="busesActivos[0]?.etaMinutos ?? 0"
|
:eta-value="busesActivos[0]?.etaMinutos ?? 0"
|
||||||
@close="animateAndReload"
|
@close="animateAndReload"
|
||||||
@click="showETACard = true"
|
@click="handleBannerClick"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</SearchOverlay>
|
</SearchOverlay>
|
||||||
|
|||||||
Reference in New Issue
Block a user