feat: redesign transport section with improved UX, accessibility, and type safety
- Replace native <select> filters with scrollable chip components (TransportFilterChips) - Add skeleton shimmer loaders for taxi and shuttle cards (TaxiSkeletonCard, ShuttleSkeletonCard) - Add search bar to TaxisLocales to filter by driver name - Horizontal card layout on mobile for ViajesTuristicos, vertical on tablet+ - Add ARIA roles (tablist/tab, list/listitem, switch, alert, status) throughout - Apply hover: hover media query so card hover effects don't trigger on touch - Add prefers-reduced-motion support across all animations and transitions - Add clear-filters button in empty states when filters are active - Fix min-height to use 100dvh instead of 100vh for mobile nav bar - Reduce tab slider animation from 0.5s to 0.32s - Fix tsconfig: noUncheckedSideEffectImports false, add vite-plugin-pwa/client types - Fix AppImage unused parameter warning (_e) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@ -44,7 +44,7 @@ function handleLoad() {
|
|||||||
isLoaded.value = true
|
isLoaded.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleError(e: Event) {
|
function handleError(_e: Event) {
|
||||||
isError.value = true
|
isError.value = true
|
||||||
isLoaded.value = true
|
isLoaded.value = true
|
||||||
}
|
}
|
||||||
|
|||||||
167
frontend/src/components/transporte/ShuttleSkeletonCard.vue
Normal file
167
frontend/src/components/transporte/ShuttleSkeletonCard.vue
Normal file
@ -0,0 +1,167 @@
|
|||||||
|
<template>
|
||||||
|
<div class="shuttle-skeleton glass-effect" aria-hidden="true">
|
||||||
|
<!-- image area -->
|
||||||
|
<div class="sk-image"></div>
|
||||||
|
<!-- body -->
|
||||||
|
<div class="sk-body">
|
||||||
|
<div class="sk-route">
|
||||||
|
<div class="sk-line sk-loc"></div>
|
||||||
|
<div class="sk-arrow"></div>
|
||||||
|
<div class="sk-line sk-loc"></div>
|
||||||
|
</div>
|
||||||
|
<div class="sk-tags">
|
||||||
|
<div class="sk-tag"></div>
|
||||||
|
<div class="sk-tag sk-tag--sm"></div>
|
||||||
|
</div>
|
||||||
|
<div class="sk-footer">
|
||||||
|
<div class="sk-price"></div>
|
||||||
|
<div class="sk-btn-circle"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
@keyframes shimmer {
|
||||||
|
0% { background-position: -400px 0; }
|
||||||
|
100% { background-position: 400px 0; }
|
||||||
|
}
|
||||||
|
|
||||||
|
.shimmer {
|
||||||
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
var(--bg-secondary) 25%,
|
||||||
|
var(--border-color) 50%,
|
||||||
|
var(--bg-secondary) 75%
|
||||||
|
);
|
||||||
|
background-size: 800px 100%;
|
||||||
|
animation: shimmer 1.4s infinite linear;
|
||||||
|
border-radius: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.shuttle-skeleton {
|
||||||
|
border-radius: 1.5rem;
|
||||||
|
overflow: hidden;
|
||||||
|
border: 1px solid var(--border-color);
|
||||||
|
background: var(--card-bg);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sk-image {
|
||||||
|
height: 180px;
|
||||||
|
width: 100%;
|
||||||
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
var(--bg-secondary) 25%,
|
||||||
|
var(--border-color) 50%,
|
||||||
|
var(--bg-secondary) 75%
|
||||||
|
);
|
||||||
|
background-size: 800px 100%;
|
||||||
|
animation: shimmer 1.4s infinite linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sk-body {
|
||||||
|
padding: 1.25rem;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sk-route {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.75rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sk-line {
|
||||||
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
var(--bg-secondary) 25%,
|
||||||
|
var(--border-color) 50%,
|
||||||
|
var(--bg-secondary) 75%
|
||||||
|
);
|
||||||
|
background-size: 800px 100%;
|
||||||
|
animation: shimmer 1.4s infinite linear;
|
||||||
|
border-radius: 0.375rem;
|
||||||
|
height: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sk-loc {
|
||||||
|
width: 80px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sk-arrow {
|
||||||
|
width: 20px;
|
||||||
|
height: 12px;
|
||||||
|
border-radius: 3px;
|
||||||
|
background: var(--border-color);
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sk-tags {
|
||||||
|
display: flex;
|
||||||
|
gap: 0.75rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sk-tag {
|
||||||
|
height: 24px;
|
||||||
|
width: 80px;
|
||||||
|
border-radius: 0.5rem;
|
||||||
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
var(--bg-secondary) 25%,
|
||||||
|
var(--border-color) 50%,
|
||||||
|
var(--bg-secondary) 75%
|
||||||
|
);
|
||||||
|
background-size: 800px 100%;
|
||||||
|
animation: shimmer 1.4s infinite linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sk-tag--sm {
|
||||||
|
width: 60px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sk-footer {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding-top: 1rem;
|
||||||
|
border-top: 1px solid var(--border-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sk-price {
|
||||||
|
height: 28px;
|
||||||
|
width: 64px;
|
||||||
|
border-radius: 0.375rem;
|
||||||
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
var(--bg-secondary) 25%,
|
||||||
|
var(--border-color) 50%,
|
||||||
|
var(--bg-secondary) 75%
|
||||||
|
);
|
||||||
|
background-size: 800px 100%;
|
||||||
|
animation: shimmer 1.4s infinite linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sk-btn-circle {
|
||||||
|
width: 44px;
|
||||||
|
height: 44px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
var(--bg-secondary) 25%,
|
||||||
|
var(--border-color) 50%,
|
||||||
|
var(--bg-secondary) 75%
|
||||||
|
);
|
||||||
|
background-size: 800px 100%;
|
||||||
|
animation: shimmer 1.4s infinite linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-reduced-motion: reduce) {
|
||||||
|
.sk-image, .sk-line, .sk-tag, .sk-price, .sk-btn-circle {
|
||||||
|
animation: none;
|
||||||
|
background: var(--bg-secondary);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
139
frontend/src/components/transporte/TaxiSkeletonCard.vue
Normal file
139
frontend/src/components/transporte/TaxiSkeletonCard.vue
Normal file
@ -0,0 +1,139 @@
|
|||||||
|
<template>
|
||||||
|
<div class="taxi-skeleton glass-effect" aria-hidden="true">
|
||||||
|
<div class="sk-top">
|
||||||
|
<div class="sk-avatar"></div>
|
||||||
|
<div class="sk-info">
|
||||||
|
<div class="sk-line sk-name"></div>
|
||||||
|
<div class="sk-line sk-meta"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="sk-chips">
|
||||||
|
<div class="sk-chip"></div>
|
||||||
|
<div class="sk-chip sk-chip--sm"></div>
|
||||||
|
</div>
|
||||||
|
<div class="sk-btn"></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
@keyframes shimmer {
|
||||||
|
0% { background-position: -400px 0; }
|
||||||
|
100% { background-position: 400px 0; }
|
||||||
|
}
|
||||||
|
|
||||||
|
.sk-base {
|
||||||
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
var(--bg-secondary) 25%,
|
||||||
|
var(--border-color) 50%,
|
||||||
|
var(--bg-secondary) 75%
|
||||||
|
);
|
||||||
|
background-size: 800px 100%;
|
||||||
|
animation: shimmer 1.4s infinite linear;
|
||||||
|
border-radius: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.taxi-skeleton {
|
||||||
|
border-radius: 1.5rem;
|
||||||
|
padding: 1.25rem;
|
||||||
|
border: 1px solid var(--border-color);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 1.25rem;
|
||||||
|
background: var(--card-bg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sk-top {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sk-avatar {
|
||||||
|
width: 56px;
|
||||||
|
height: 56px;
|
||||||
|
border-radius: 1rem;
|
||||||
|
flex-shrink: 0;
|
||||||
|
composes: sk-base;
|
||||||
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
var(--bg-secondary) 25%,
|
||||||
|
var(--border-color) 50%,
|
||||||
|
var(--bg-secondary) 75%
|
||||||
|
);
|
||||||
|
background-size: 800px 100%;
|
||||||
|
animation: shimmer 1.4s infinite linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sk-info {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sk-line {
|
||||||
|
border-radius: 0.375rem;
|
||||||
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
var(--bg-secondary) 25%,
|
||||||
|
var(--border-color) 50%,
|
||||||
|
var(--bg-secondary) 75%
|
||||||
|
);
|
||||||
|
background-size: 800px 100%;
|
||||||
|
animation: shimmer 1.4s infinite linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sk-name {
|
||||||
|
height: 16px;
|
||||||
|
width: 60%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sk-meta {
|
||||||
|
height: 12px;
|
||||||
|
width: 40%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sk-chips {
|
||||||
|
display: flex;
|
||||||
|
gap: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sk-chip {
|
||||||
|
height: 28px;
|
||||||
|
width: 90px;
|
||||||
|
border-radius: 0.75rem;
|
||||||
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
var(--bg-secondary) 25%,
|
||||||
|
var(--border-color) 50%,
|
||||||
|
var(--bg-secondary) 75%
|
||||||
|
);
|
||||||
|
background-size: 800px 100%;
|
||||||
|
animation: shimmer 1.4s infinite linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sk-chip--sm {
|
||||||
|
width: 70px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sk-btn {
|
||||||
|
height: 48px;
|
||||||
|
border-radius: 1.125rem;
|
||||||
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
var(--bg-secondary) 25%,
|
||||||
|
var(--border-color) 50%,
|
||||||
|
var(--bg-secondary) 75%
|
||||||
|
);
|
||||||
|
background-size: 800px 100%;
|
||||||
|
animation: shimmer 1.4s infinite linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-reduced-motion: reduce) {
|
||||||
|
.sk-avatar, .sk-line, .sk-chip, .sk-btn {
|
||||||
|
animation: none;
|
||||||
|
background: var(--bg-secondary);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
79
frontend/src/components/transporte/TransportFilterChips.vue
Normal file
79
frontend/src/components/transporte/TransportFilterChips.vue
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
defineProps<{
|
||||||
|
options: { value: string; label: string; icon?: string }[]
|
||||||
|
modelValue: string
|
||||||
|
label?: string
|
||||||
|
}>()
|
||||||
|
|
||||||
|
defineEmits<{ 'update:modelValue': [value: string] }>()
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="filter-chips-group" :aria-label="label">
|
||||||
|
<button
|
||||||
|
v-for="opt in options"
|
||||||
|
:key="opt.value"
|
||||||
|
class="filter-chip"
|
||||||
|
:class="{ 'filter-chip--active': modelValue === opt.value }"
|
||||||
|
:aria-pressed="modelValue === opt.value"
|
||||||
|
@click="$emit('update:modelValue', opt.value)"
|
||||||
|
>
|
||||||
|
<span v-if="opt.icon" class="material-icons notranslate chip-icon" translate="no" aria-hidden="true">{{ opt.icon }}</span>
|
||||||
|
{{ opt.label }}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.filter-chips-group {
|
||||||
|
display: flex;
|
||||||
|
gap: 0.5rem;
|
||||||
|
overflow-x: auto;
|
||||||
|
scroll-snap-type: x mandatory;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
scrollbar-width: none;
|
||||||
|
padding-bottom: 2px; /* prevent clipping active border-bottom */
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-chips-group::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-chip {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.375rem;
|
||||||
|
padding: 0.5rem 1rem;
|
||||||
|
border-radius: 99px;
|
||||||
|
border: 1.5px solid var(--border-color);
|
||||||
|
background: var(--bg-primary);
|
||||||
|
color: var(--text-secondary);
|
||||||
|
font-size: 0.8125rem;
|
||||||
|
font-weight: 700;
|
||||||
|
white-space: nowrap;
|
||||||
|
cursor: pointer;
|
||||||
|
scroll-snap-align: start;
|
||||||
|
transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.15s ease;
|
||||||
|
min-height: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-chip:active {
|
||||||
|
transform: scale(0.95);
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-chip--active {
|
||||||
|
background: var(--active-color);
|
||||||
|
border-color: var(--active-color);
|
||||||
|
color: #101820;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chip-icon {
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-reduced-motion: reduce) {
|
||||||
|
.filter-chip {
|
||||||
|
transition: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -6,7 +6,6 @@ import { useRoute } from 'vue-router'
|
|||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|
||||||
// Solo mostrar el header con tabs en las vistas principales
|
|
||||||
const isMainView = computed(() => {
|
const isMainView = computed(() => {
|
||||||
return route.name === 'TaxisLocales' || route.name === 'ViajesTuristicos'
|
return route.name === 'TaxisLocales' || route.name === 'ViajesTuristicos'
|
||||||
})
|
})
|
||||||
@ -18,7 +17,6 @@ const reloadPage = () => {
|
|||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
try {
|
try {
|
||||||
// Aquí iría cualquier inicialización global del layout si fuera necesaria
|
|
||||||
console.log('Transporte Hub mounted')
|
console.log('Transporte Hub mounted')
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('Error mounting Transporte Hub:', e)
|
console.error('Error mounting Transporte Hub:', e)
|
||||||
@ -31,26 +29,40 @@ onMounted(async () => {
|
|||||||
<div class="taxi-view">
|
<div class="taxi-view">
|
||||||
<header v-if="isMainView" class="header-main">
|
<header v-if="isMainView" class="header-main">
|
||||||
<h1 class="brand-title">{{ t('taxi.title') }}</h1>
|
<h1 class="brand-title">{{ t('taxi.title') }}</h1>
|
||||||
<div class="hub-tabs">
|
<nav class="hub-tabs" role="tablist" :aria-label="t('taxi.title')">
|
||||||
<div class="tabs-background">
|
<div class="tabs-background">
|
||||||
<router-link to="/transporte/taxis" class="hub-tab" active-class="active" exact-active-class="active">
|
<router-link
|
||||||
<span class="material-icons notranslate" translate="no">local_taxi</span>
|
to="/transporte/taxis"
|
||||||
|
class="hub-tab"
|
||||||
|
role="tab"
|
||||||
|
:aria-selected="!route.path.includes('viajes-turisticos')"
|
||||||
|
active-class="active"
|
||||||
|
exact-active-class="active"
|
||||||
|
>
|
||||||
|
<span class="material-icons notranslate" translate="no" aria-hidden="true">local_taxi</span>
|
||||||
{{ t('taxi.tabLocal') }}
|
{{ t('taxi.tabLocal') }}
|
||||||
</router-link>
|
</router-link>
|
||||||
<router-link to="/transporte/viajes-turisticos" class="hub-tab" active-class="active" :class="{ 'active': route.path.includes('viajes-turisticos') }">
|
<router-link
|
||||||
<span class="material-icons notranslate" translate="no">directions_bus</span>
|
to="/transporte/viajes-turisticos"
|
||||||
|
class="hub-tab"
|
||||||
|
role="tab"
|
||||||
|
:aria-selected="route.path.includes('viajes-turisticos')"
|
||||||
|
active-class="active"
|
||||||
|
:class="{ 'active': route.path.includes('viajes-turisticos') }"
|
||||||
|
>
|
||||||
|
<span class="material-icons notranslate" translate="no" aria-hidden="true">directions_bus</span>
|
||||||
{{ t('taxi.tabIntercity') }}
|
{{ t('taxi.tabIntercity') }}
|
||||||
</router-link>
|
</router-link>
|
||||||
<div class="tab-slider" :class="{ 'slide-right': !route.path.includes('taxis') }"></div>
|
<div class="tab-slider" :class="{ 'slide-right': route.path.includes('viajes-turisticos') }" aria-hidden="true"></div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div v-if="mountError" class="error-container">
|
<div v-if="mountError" class="error-container" role="alert">
|
||||||
<span class="material-icons notranslate" translate="no">error_outline</span>
|
<span class="material-icons notranslate" translate="no" aria-hidden="true">error_outline</span>
|
||||||
<p>{{ t('taxi.errorLoading') }}</p>
|
<p>{{ t('taxi.errorLoading') }}</p>
|
||||||
<button @click="reloadPage" class="retry-btn">
|
<button @click="reloadPage" class="retry-btn">
|
||||||
<span class="material-icons notranslate" translate="no">refresh</span>
|
<span class="material-icons notranslate" translate="no" aria-hidden="true">refresh</span>
|
||||||
{{ t('common.retry') }}
|
{{ t('common.retry') }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -67,7 +79,7 @@ onMounted(async () => {
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.taxi-view {
|
.taxi-view {
|
||||||
min-height: 100vh;
|
min-height: 100dvh;
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 0 0 150px;
|
padding: 0 0 150px;
|
||||||
}
|
}
|
||||||
@ -114,7 +126,7 @@ onMounted(async () => {
|
|||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
transition: color 0.3s;
|
transition: color 0.2s;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@ -122,6 +134,13 @@ onMounted(async () => {
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
min-height: 44px;
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hub-tab:focus-visible {
|
||||||
|
outline: 2px solid var(--active-color);
|
||||||
|
outline-offset: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hub-tab::after {
|
.hub-tab::after {
|
||||||
@ -135,7 +154,7 @@ onMounted(async () => {
|
|||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transform: translate(-50%, -50%) scale(0);
|
transform: translate(-50%, -50%) scale(0);
|
||||||
transition: all 0.5s ease;
|
transition: all 0.4s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hub-tab:active::after {
|
.hub-tab:active::after {
|
||||||
@ -162,7 +181,7 @@ onMounted(async () => {
|
|||||||
width: calc(50% - 6px);
|
width: calc(50% - 6px);
|
||||||
background: #FEE715;
|
background: #FEE715;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
|
transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
box-shadow: 0 4px 20px rgba(254, 231, 21, 0.4);
|
box-shadow: 0 4px 20px rgba(254, 231, 21, 0.4);
|
||||||
will-change: transform;
|
will-change: transform;
|
||||||
@ -172,15 +191,31 @@ onMounted(async () => {
|
|||||||
transform: translateX(calc(100% + 4px));
|
transform: translateX(calc(100% + 4px));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (prefers-reduced-motion: reduce) {
|
||||||
|
.tab-slider {
|
||||||
|
transition: none;
|
||||||
|
}
|
||||||
|
.hub-tab {
|
||||||
|
transition: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.fade-enter-active,
|
.fade-enter-active,
|
||||||
.fade-leave-active {
|
.fade-leave-active {
|
||||||
transition: opacity 0.2s ease;
|
transition: opacity 0.18s ease;
|
||||||
}
|
}
|
||||||
.fade-enter-from,
|
.fade-enter-from,
|
||||||
.fade-leave-to {
|
.fade-leave-to {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (prefers-reduced-motion: reduce) {
|
||||||
|
.fade-enter-active,
|
||||||
|
.fade-leave-active {
|
||||||
|
transition: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.error-container {
|
.error-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@ -209,10 +244,16 @@ onMounted(async () => {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
transition: transform 0.2s;
|
transition: transform 0.15s ease;
|
||||||
|
min-height: 44px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.retry-btn:active {
|
.retry-btn:active {
|
||||||
transform: scale(0.95);
|
transform: scale(0.95);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.retry-btn:focus-visible {
|
||||||
|
outline: 2px solid var(--active-color);
|
||||||
|
outline-offset: 2px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -21,7 +21,7 @@ onMounted(async () => {
|
|||||||
cargando.value = true
|
cargando.value = true
|
||||||
const shuttleId = route.params.id as string
|
const shuttleId = route.params.id as string
|
||||||
|
|
||||||
// In a real app we might just get from the store, but directly from Supabase is safe to ensure it always works with Deep Links!
|
// Fetch directly from Supabase to ensure deep links always work
|
||||||
const { data, error: sbError } = await supabase
|
const { data, error: sbError } = await supabase
|
||||||
.from('shuttles')
|
.from('shuttles')
|
||||||
.select('*')
|
.select('*')
|
||||||
@ -39,19 +39,16 @@ onMounted(async () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const parsePrice = (priceVal?: number | string | null): string => {
|
const parsePrice = (priceVal?: number | string | null): string => {
|
||||||
if (!priceVal) return '0.00';
|
if (!priceVal) return '0.00'
|
||||||
const num = typeof priceVal === 'string' ? parseFloat(priceVal) : priceVal;
|
const num = typeof priceVal === 'string' ? parseFloat(priceVal) : priceVal
|
||||||
return Number.isNaN(num) ? '0.00' : num.toFixed(2);
|
return Number.isNaN(num) ? '0.00' : num.toFixed(2)
|
||||||
};
|
}
|
||||||
|
|
||||||
const volver = () => {
|
const volver = () => {
|
||||||
// Leer la ruta padre desde el meta de la ruta actual
|
|
||||||
const rutaPadre = route.meta.padre as string | undefined
|
const rutaPadre = route.meta.padre as string | undefined
|
||||||
|
|
||||||
if (rutaPadre) {
|
if (rutaPadre) {
|
||||||
router.push({ name: rutaPadre })
|
router.push({ name: rutaPadre })
|
||||||
} else {
|
} else {
|
||||||
// Fallback seguro
|
|
||||||
router.push('/transporte/viajes-turisticos')
|
router.push('/transporte/viajes-turisticos')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -65,11 +62,18 @@ const getTripTypeLabel = (type: string) => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="shuttle-detalle-container bg-[var(--bg-primary)] pb-24 min-h-screen relative">
|
<div class="shuttle-detalle bg-[var(--bg-primary)] pb-24 min-h-dvh relative">
|
||||||
<!-- Header con botón volver (Solid background to avoid overlap on scroll) -->
|
<!-- Sticky header -->
|
||||||
<div class="sticky top-0 z-50 bg-[var(--bg-primary)] border-b border-border flex items-center gap-3 px-4 py-3 shadow-md" style="padding-top: max(env(safe-area-inset-top), 12px);">
|
<div
|
||||||
<button @click="volver" class="p-2 rounded-full hover:bg-[var(--hover-bg)] flex items-center justify-center transition">
|
class="sticky top-0 z-50 bg-[var(--bg-primary)] border-b border-[var(--border-color)] flex items-center gap-3 px-4 shadow-sm"
|
||||||
<span class="material-icons text-[var(--text-primary)] notranslate" translate="no">arrow_back</span>
|
style="padding-top: max(env(safe-area-inset-top), 12px); padding-bottom: 12px;"
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
@click="volver"
|
||||||
|
class="back-btn"
|
||||||
|
:aria-label="t('common.back')"
|
||||||
|
>
|
||||||
|
<span class="material-icons notranslate" translate="no" aria-hidden="true">arrow_back</span>
|
||||||
</button>
|
</button>
|
||||||
<h1 class="font-bold text-[var(--text-primary)] text-lg truncate flex-1">
|
<h1 class="font-bold text-[var(--text-primary)] text-lg truncate flex-1">
|
||||||
{{ shuttle?.company_name || t('shuttle.detailTitle') }}
|
{{ shuttle?.company_name || t('shuttle.detailTitle') }}
|
||||||
@ -84,129 +88,158 @@ const getTripTypeLabel = (type: string) => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Loading -->
|
<!-- Loading -->
|
||||||
<div v-if="cargando" class="flex flex-col justify-center items-center h-64 gap-3 w-full">
|
<div v-if="cargando" class="flex flex-col justify-center items-center h-64 gap-3 w-full" aria-busy="true">
|
||||||
<LoadingBranded :message="t('common.loading') || 'Cargando detalle...'" icon="airport_shuttle" />
|
<LoadingBranded :message="t('common.loading') || 'Cargando detalle...'" icon="airport_shuttle" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Error -->
|
<!-- Error -->
|
||||||
<div v-else-if="error" class="flex flex-col items-center justify-center h-64 px-6 text-center">
|
<div v-else-if="error" class="flex flex-col items-center justify-center h-64 px-6 text-center" role="alert">
|
||||||
<span class="material-icons text-red-500 text-5xl mb-3 notranslate" translate="no">error_outline</span>
|
<span class="material-icons text-red-500 text-5xl mb-3 notranslate" translate="no" aria-hidden="true">error_outline</span>
|
||||||
<p class="text-red-500 font-medium">{{ error }}</p>
|
<p class="text-red-500 font-medium">{{ error }}</p>
|
||||||
<button @click="volver" class="mt-6 px-6 py-2 bg-text-primary text-surface font-bold rounded-full shadow hover:opacity-90 transition">
|
<button
|
||||||
|
@click="volver"
|
||||||
|
class="mt-6 px-6 py-3 bg-[var(--text-primary)] text-[var(--bg-primary)] font-bold rounded-full shadow hover:opacity-90 transition active:scale-95 min-h-[44px]"
|
||||||
|
>
|
||||||
{{ t('common.back') }}
|
{{ t('common.back') }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Contenido completo -->
|
<!-- Content -->
|
||||||
<div v-else-if="shuttle" class="px-4 py-4 space-y-4 max-w-lg mx-auto animate-fade-in">
|
<div v-else-if="shuttle" class="px-4 py-4 space-y-4 max-w-lg mx-auto animate-fade-in">
|
||||||
<!-- Imagen -->
|
|
||||||
<div v-if="shuttle.image_url" class="relative w-full h-56 md:h-64 rounded-2xl overflow-hidden shadow-sm">
|
<!-- Hero image -->
|
||||||
|
<div
|
||||||
|
v-if="shuttle.image_url"
|
||||||
|
class="relative w-full rounded-2xl overflow-hidden shadow-sm"
|
||||||
|
style="aspect-ratio: 16/9;"
|
||||||
|
>
|
||||||
<AppImage
|
<AppImage
|
||||||
:src="shuttle.image_url"
|
:src="shuttle.image_url"
|
||||||
type="shuttle"
|
type="shuttle"
|
||||||
:alt="shuttle.company_name"
|
:alt="`Imagen de ${shuttle.company_name || 'shuttle'}`"
|
||||||
imgClass="w-full h-full object-cover"
|
imgClass="w-full h-full object-cover"
|
||||||
/>
|
/>
|
||||||
<div class="absolute bottom-3 left-3 bg-[var(--bg-primary)]/90 backdrop-blur-sm px-3 py-1 rounded-full text-sm font-bold shadow-sm flex items-center gap-1">
|
<div
|
||||||
|
class="absolute bottom-3 left-3 bg-[var(--bg-primary)]/90 backdrop-blur-sm px-3 py-1 rounded-full text-sm font-bold shadow-sm flex items-center gap-1"
|
||||||
|
aria-hidden="true"
|
||||||
|
>
|
||||||
<span class="material-icons text-sm notranslate" style="color: var(--active-color)" translate="no">directions_bus</span>
|
<span class="material-icons text-sm notranslate" style="color: var(--active-color)" translate="no">directions_bus</span>
|
||||||
{{ shuttle.vehicle_type }}
|
{{ shuttle.vehicle_type }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Rutas Origen - Destino prominente -->
|
<!-- Route card -->
|
||||||
<div class="bg-[var(--bg-secondary)] rounded-2xl p-5 shadow-sm space-y-3 border border-border">
|
<div
|
||||||
|
class="bg-[var(--bg-secondary)] rounded-2xl p-5 shadow-sm space-y-3 border border-[var(--border-color)]"
|
||||||
|
:aria-label="`Ruta de ${shuttle.origin} a ${shuttle.destination}`"
|
||||||
|
>
|
||||||
<div class="flex items-center justify-between">
|
<div class="flex items-center justify-between">
|
||||||
<div class="flex flex-col flex-1">
|
<div class="flex flex-col flex-1">
|
||||||
<span class="text-xs text-[var(--text-secondary)] font-semibold mb-1 uppercase tracking-wider">{{ t('shuttle.origin') }}</span>
|
<span class="route-sublabel">{{ t('shuttle.origin') }}</span>
|
||||||
<span class="font-bold text-[var(--text-primary)] text-lg leading-tight break-words">
|
<span class="route-city">{{ shuttle.origin }}</span>
|
||||||
{{ shuttle.origin }}
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex flex-col items-center px-4 shrink-0">
|
<div class="flex flex-col items-center px-4 shrink-0" aria-hidden="true">
|
||||||
<span class="text-xs text-[var(--text-secondary)] font-bold mb-1">{{ shuttle.estimated_duration }}</span>
|
<span class="route-duration">{{ shuttle.estimated_duration }}</span>
|
||||||
<div class="w-16 border-t-2 border-dashed border-border relative my-1">
|
<div class="route-line relative my-1">
|
||||||
<span class="material-icons absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 text-[var(--text-secondary)] bg-[var(--bg-secondary)] px-1 text-sm notranslate" translate="no">east</span>
|
<span class="material-icons route-arrow notranslate" translate="no">east</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex flex-col flex-1 text-right">
|
<div class="flex flex-col flex-1 text-right">
|
||||||
<span class="text-xs text-[var(--text-secondary)] font-semibold mb-1 uppercase tracking-wider">{{ t('shuttle.destination') }}</span>
|
<span class="route-sublabel">{{ t('shuttle.destination') }}</span>
|
||||||
<span class="font-bold text-[var(--text-primary)] text-lg leading-tight break-words">
|
<span class="route-city">{{ shuttle.destination }}</span>
|
||||||
{{ shuttle.destination }}
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Info principal -->
|
<!-- Info card -->
|
||||||
<div class="bg-[var(--bg-secondary)] rounded-2xl p-5 shadow-sm space-y-4 border border-border">
|
<div class="bg-[var(--bg-secondary)] rounded-2xl p-5 shadow-sm space-y-4 border border-[var(--border-color)]">
|
||||||
<div>
|
<div>
|
||||||
<h2 class="text-xl font-bold text-[var(--text-primary)]">{{ shuttle.company_name }}</h2>
|
<h2 class="text-xl font-bold text-[var(--text-primary)]">{{ shuttle.company_name }}</h2>
|
||||||
<p class="text-[var(--text-secondary)] text-sm mt-1 leading-relaxed" v-if="shuttle.description" style="white-space: pre-wrap;">{{ shuttle.description }}</p>
|
<p
|
||||||
|
v-if="shuttle.description"
|
||||||
|
class="text-[var(--text-secondary)] text-sm mt-1 leading-relaxed"
|
||||||
|
style="white-space: pre-wrap;"
|
||||||
|
>{{ shuttle.description }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid grid-cols-2 gap-4 pt-4 border-t border-border">
|
<dl class="grid grid-cols-2 gap-4 pt-4 border-t border-[var(--border-color)]">
|
||||||
<div class="flex flex-col gap-1">
|
<div class="flex flex-col gap-1">
|
||||||
<span class="text-xs text-[var(--text-secondary)] uppercase tracking-wider font-semibold flex items-center gap-1"><span class="material-icons text-sm notranslate" translate="no">schedule</span> {{ t('shuttle.departureTimes') }}</span>
|
<dt class="info-label">
|
||||||
<span class="font-semibold text-[var(--text-primary)] bg-[var(--bg-primary)] p-2 rounded-lg text-sm text-center border border-border">
|
<span class="material-icons text-sm notranslate" translate="no" aria-hidden="true">schedule</span>
|
||||||
{{ shuttle.departure_times }}
|
{{ t('shuttle.departureTimes') }}
|
||||||
</span>
|
</dt>
|
||||||
|
<dd class="info-value">{{ shuttle.departure_times }}</dd>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col gap-1">
|
<div class="flex flex-col gap-1">
|
||||||
<span class="text-xs text-[var(--text-secondary)] uppercase tracking-wider font-semibold flex items-center gap-1"><span class="material-icons text-sm notranslate" translate="no">swap_horiz</span> {{ t('shuttle.tripType') }}</span>
|
<dt class="info-label">
|
||||||
<span class="font-semibold text-[var(--text-primary)] bg-[var(--bg-primary)] p-2 rounded-lg text-sm text-center border border-border">
|
<span class="material-icons text-sm notranslate" translate="no" aria-hidden="true">swap_horiz</span>
|
||||||
{{ getTripTypeLabel(shuttle.trip_type) }}
|
{{ t('shuttle.tripType') }}
|
||||||
</span>
|
</dt>
|
||||||
</div>
|
<dd class="info-value">{{ getTripTypeLabel(shuttle.trip_type) }}</dd>
|
||||||
<div class="flex flex-col gap-1" v-if="shuttle.english_speaking">
|
|
||||||
<span class="text-xs text-[var(--text-secondary)] uppercase tracking-wider font-semibold flex items-center gap-1"><span class="material-icons text-sm notranslate" translate="no">g_translate</span> {{ t('shuttle.languages') }}</span>
|
|
||||||
<span class="font-semibold text-[var(--text-primary)] bg-[var(--bg-primary)] p-2 rounded-lg text-sm text-center border border-border">
|
|
||||||
Español · English
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="shuttle.english_speaking" class="flex flex-col gap-1">
|
||||||
|
<dt class="info-label">
|
||||||
|
<span class="material-icons text-sm notranslate" translate="no" aria-hidden="true">g_translate</span>
|
||||||
|
{{ t('shuttle.languages') }}
|
||||||
|
</dt>
|
||||||
|
<dd class="info-value">Español · English</dd>
|
||||||
</div>
|
</div>
|
||||||
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Precio -->
|
<!-- Price card -->
|
||||||
<div class="rounded-2xl p-6 shadow-sm flex items-center justify-between" style="background-color: var(--active-color); color: #101820;">
|
<div
|
||||||
|
class="rounded-2xl p-6 shadow-sm flex items-center justify-between"
|
||||||
|
style="background-color: var(--active-color); color: #101820;"
|
||||||
|
aria-label="Precios"
|
||||||
|
>
|
||||||
<div class="text-left">
|
<div class="text-left">
|
||||||
<p class="text-sm font-semibold opacity-90 mb-1">{{ t('shuttle.pricePerPerson') }}</p>
|
<p class="text-sm font-semibold opacity-90 mb-1">{{ t('shuttle.pricePerPerson') }}</p>
|
||||||
<div class="flex items-baseline gap-1">
|
<div class="flex items-baseline gap-1">
|
||||||
<span class="text-lg font-bold opacity-80">$</span>
|
<span class="text-lg font-bold opacity-70" aria-hidden="true">$</span>
|
||||||
<span class="text-4xl font-black tracking-tight">{{ parsePrice(shuttle.price_per_person) }}</span>
|
<span class="text-4xl font-black tracking-tight">{{ parsePrice(shuttle.price_per_person) }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-3 rounded-xl bg-black/10 backdrop-blur-sm" v-if="shuttle.price_private_trip">
|
<div
|
||||||
|
v-if="shuttle.price_private_trip"
|
||||||
|
class="p-3 rounded-xl bg-black/10 backdrop-blur-sm"
|
||||||
|
>
|
||||||
<span class="text-xs font-bold uppercase tracking-wider opacity-90 block mb-1">{{ t('shuttle.private') }}</span>
|
<span class="text-xs font-bold uppercase tracking-wider opacity-90 block mb-1">{{ t('shuttle.private') }}</span>
|
||||||
<span class="font-black text-lg">${{ parsePrice(shuttle.price_private_trip) }}</span>
|
<span class="font-black text-lg">${{ parsePrice(shuttle.price_private_trip) }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Contacto -->
|
<!-- Contact card -->
|
||||||
<div class="bg-[var(--bg-secondary)] rounded-2xl p-5 shadow-sm space-y-4 border border-border mb-8">
|
<div class="bg-[var(--bg-secondary)] rounded-2xl p-5 shadow-sm space-y-4 border border-[var(--border-color)] mb-8">
|
||||||
<div>
|
<div>
|
||||||
<h3 class="font-bold text-[var(--text-primary)] text-lg">{{ t('shuttle.bookingInfo') }}</h3>
|
<h3 class="font-bold text-[var(--text-primary)] text-lg">{{ t('shuttle.bookingInfo') }}</h3>
|
||||||
<p class="text-sm text-[var(--text-secondary)] mt-1">{{ t('shuttle.contactOperator') }}</p>
|
<p class="text-sm text-[var(--text-secondary)] mt-1">{{ t('shuttle.contactOperator') }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex flex-col gap-3">
|
<div class="flex flex-col gap-3">
|
||||||
<a v-if="shuttle.contact_whatsapp"
|
<a
|
||||||
:href="`https://wa.me/${shuttle.contact_whatsapp.replace(/\+/g, '')}?text=Hola,%20me%20gustaría%20información%20sobre%20el%20shuttle%20de%20${shuttle.origin}%20a%20${shuttle.destination}`"
|
v-if="shuttle.contact_whatsapp"
|
||||||
|
:href="`https://wa.me/${shuttle.contact_whatsapp.replace(/[^0-9]/g, '')}?text=${encodeURIComponent(`Hola, me gustaría información sobre el shuttle de ${shuttle.origin} a ${shuttle.destination}`)}`"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
class="flex justify-center items-center gap-2 p-3.5 bg-[#25D366] text-white rounded-xl font-bold hover:opacity-90 transition active:scale-95"
|
rel="noopener noreferrer"
|
||||||
|
class="contact-btn contact-btn--whatsapp"
|
||||||
|
:aria-label="`Reservar por WhatsApp con ${shuttle.company_name || 'el operador'}`"
|
||||||
@click="analyticsService.logEvent({ event_name: 'shuttle_contact', entity_type: 'shuttle', entity_id: shuttle.id, entity_name: shuttle.company_name || 'shuttle', properties: { action: 'whatsapp' } })"
|
@click="analyticsService.logEvent({ event_name: 'shuttle_contact', entity_type: 'shuttle', entity_id: shuttle.id, entity_name: shuttle.company_name || 'shuttle', properties: { action: 'whatsapp' } })"
|
||||||
>
|
>
|
||||||
<span class="material-icons notranslate" translate="no">chat</span>
|
<span class="material-icons notranslate" translate="no" aria-hidden="true">chat</span>
|
||||||
{{ t('shuttle.bookWhatsapp') }}
|
{{ t('shuttle.bookWhatsapp') }}
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a v-if="shuttle.phone_number"
|
<a
|
||||||
|
v-if="shuttle.phone_number"
|
||||||
:href="`tel:${shuttle.phone_number}`"
|
:href="`tel:${shuttle.phone_number}`"
|
||||||
class="flex justify-center items-center gap-2 p-3.5 bg-[var(--bg-primary)] text-[var(--text-primary)] rounded-xl font-bold hover:bg-[var(--hover-bg)] transition active:scale-95 border border-border"
|
class="contact-btn contact-btn--call"
|
||||||
|
:aria-label="`Llamar al operador: ${shuttle.phone_number}`"
|
||||||
@click="analyticsService.logEvent({ event_name: 'shuttle_contact', entity_type: 'shuttle', entity_id: shuttle.id, entity_name: shuttle.company_name || 'shuttle', properties: { action: 'call' } })"
|
@click="analyticsService.logEvent({ event_name: 'shuttle_contact', entity_type: 'shuttle', entity_id: shuttle.id, entity_name: shuttle.company_name || 'shuttle', properties: { action: 'call' } })"
|
||||||
>
|
>
|
||||||
<span class="material-icons notranslate" translate="no">phone_in_talk</span>
|
<span class="material-icons notranslate" translate="no" aria-hidden="true">phone_in_talk</span>
|
||||||
{{ t('shuttle.callOperator') }}
|
{{ t('shuttle.callOperator') }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@ -217,20 +250,155 @@ const getTripTypeLabel = (type: string) => {
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.animate-fade-in {
|
.animate-fade-in {
|
||||||
animation: fadeIn 0.3s ease-out forwards;
|
animation: fadeIn 0.25s ease-out forwards;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes fadeIn {
|
@keyframes fadeIn {
|
||||||
from { opacity: 0; transform: translateY(10px); }
|
from { opacity: 0; transform: translateY(8px); }
|
||||||
to { opacity: 1; transform: translateY(0); }
|
to { opacity: 1; transform: translateY(0); }
|
||||||
}
|
}
|
||||||
|
|
||||||
.spin {
|
@media (prefers-reduced-motion: reduce) {
|
||||||
animation: spin 1s infinite linear;
|
.animate-fade-in {
|
||||||
|
animation: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes spin {
|
/* Back button */
|
||||||
from { transform: rotate(0deg); }
|
.back-btn {
|
||||||
to { transform: rotate(360deg); }
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: none;
|
||||||
|
background: transparent;
|
||||||
|
cursor: pointer;
|
||||||
|
color: var(--text-primary);
|
||||||
|
transition: background 0.15s ease;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.back-btn:hover {
|
||||||
|
background: var(--bg-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.back-btn:focus-visible {
|
||||||
|
outline: 2px solid var(--active-color);
|
||||||
|
outline-offset: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Route card */
|
||||||
|
.route-sublabel {
|
||||||
|
font-size: 0.75rem;
|
||||||
|
font-weight: 700;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.06em;
|
||||||
|
color: var(--text-secondary);
|
||||||
|
margin-bottom: 0.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.route-city {
|
||||||
|
font-weight: 800;
|
||||||
|
color: var(--text-primary);
|
||||||
|
font-size: 1rem;
|
||||||
|
line-height: 1.25;
|
||||||
|
word-break: break-words;
|
||||||
|
}
|
||||||
|
|
||||||
|
.route-duration {
|
||||||
|
font-size: 0.75rem;
|
||||||
|
font-weight: 700;
|
||||||
|
color: var(--text-secondary);
|
||||||
|
margin-bottom: 0.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.route-line {
|
||||||
|
width: 64px;
|
||||||
|
border-top: 2px dashed var(--border-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.route-arrow {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
color: var(--text-secondary);
|
||||||
|
background: var(--bg-secondary);
|
||||||
|
padding: 0 4px;
|
||||||
|
font-size: 0.875rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Info labels */
|
||||||
|
.info-label {
|
||||||
|
font-size: 0.75rem;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.05em;
|
||||||
|
font-weight: 700;
|
||||||
|
color: var(--text-secondary);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-value {
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--text-primary);
|
||||||
|
background: var(--bg-primary);
|
||||||
|
padding: 0.5rem 0.75rem;
|
||||||
|
border-radius: 0.625rem;
|
||||||
|
font-size: 0.875rem;
|
||||||
|
text-align: center;
|
||||||
|
border: 1px solid var(--border-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Contact buttons */
|
||||||
|
.contact-btn {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.625rem;
|
||||||
|
padding: 0.875rem;
|
||||||
|
border-radius: 0.875rem;
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 0.9375rem;
|
||||||
|
text-decoration: none;
|
||||||
|
transition: opacity 0.15s ease, transform 0.15s ease;
|
||||||
|
min-height: 52px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contact-btn:active {
|
||||||
|
transform: scale(0.97);
|
||||||
|
}
|
||||||
|
|
||||||
|
.contact-btn:focus-visible {
|
||||||
|
outline: 2px solid var(--active-color);
|
||||||
|
outline-offset: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contact-btn--whatsapp {
|
||||||
|
background: #25D366;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contact-btn--whatsapp:hover {
|
||||||
|
opacity: 0.92;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contact-btn--call {
|
||||||
|
background: var(--bg-primary);
|
||||||
|
color: var(--text-primary);
|
||||||
|
border: 1px solid var(--border-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.contact-btn--call:hover {
|
||||||
|
background: var(--bg-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-reduced-motion: reduce) {
|
||||||
|
.contact-btn, .back-btn {
|
||||||
|
transition: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -7,7 +7,8 @@ import type { Taxi } from '@/types'
|
|||||||
import FavoriteButton from '@/components/FavoriteButton.vue'
|
import FavoriteButton from '@/components/FavoriteButton.vue'
|
||||||
import AppImage from '@/components/AppImage.vue'
|
import AppImage from '@/components/AppImage.vue'
|
||||||
import AuthGuard from '@/components/common/AuthGuard.vue'
|
import AuthGuard from '@/components/common/AuthGuard.vue'
|
||||||
import LoadingBranded from '@/components/common/LoadingBranded.vue'
|
import TaxiSkeletonCard from '@/components/transporte/TaxiSkeletonCard.vue'
|
||||||
|
import TransportFilterChips from '@/components/transporte/TransportFilterChips.vue'
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const taxiStore = useTaxiStore()
|
const taxiStore = useTaxiStore()
|
||||||
@ -15,21 +16,33 @@ const taxiStore = useTaxiStore()
|
|||||||
const selectedZone = ref('all')
|
const selectedZone = ref('all')
|
||||||
const selectedShift = ref('all')
|
const selectedShift = ref('all')
|
||||||
const onlyEnglish = ref(false)
|
const onlyEnglish = ref(false)
|
||||||
|
const searchQuery = ref('')
|
||||||
const corregimientos = ['all', 'Boquete', 'David - Boquete', 'Boquete - David', 'Aeropuerto - Boquete']
|
|
||||||
const shifts = ['all', 'dia', 'tarde', 'noche']
|
|
||||||
|
|
||||||
// Infinite Scroll
|
// Infinite Scroll
|
||||||
const displayLimit = ref(12)
|
const displayLimit = ref(12)
|
||||||
const observerTarget = ref<HTMLElement | null>(null)
|
const observerTarget = ref<HTMLElement | null>(null)
|
||||||
let observer: IntersectionObserver | null = null
|
let observer: IntersectionObserver | null = null
|
||||||
|
|
||||||
|
const zoneOptions = computed(() => [
|
||||||
|
{ value: 'all', label: t('taxi.allZones') },
|
||||||
|
{ value: 'Boquete', label: 'Boquete' },
|
||||||
|
{ value: 'David - Boquete', label: 'David → Boquete' },
|
||||||
|
{ value: 'Boquete - David', label: 'Boquete → David' },
|
||||||
|
{ value: 'Aeropuerto - Boquete', label: 'Aeropuerto → Boquete' },
|
||||||
|
])
|
||||||
|
|
||||||
|
const shiftOptions = computed(() => [
|
||||||
|
{ value: 'all', label: t('common.all'), icon: 'schedule' },
|
||||||
|
{ value: 'dia', label: t('taxi.dayShift'), icon: 'wb_sunny' },
|
||||||
|
{ value: 'tarde', label: t('taxi.afternoonShift'), icon: 'wb_twilight' },
|
||||||
|
{ value: 'noche', label: t('taxi.nightShift'), icon: 'nights_stay' },
|
||||||
|
])
|
||||||
|
|
||||||
function fetchData() {
|
function fetchData() {
|
||||||
taxiStore.loadTaxis()
|
taxiStore.loadTaxis()
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleRefocus() {
|
function handleRefocus() {
|
||||||
// Recarga silenciosa: no congela la UI si ya hay datos
|
|
||||||
taxiStore.silentReload()
|
taxiStore.silentReload()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,7 +50,6 @@ onMounted(async () => {
|
|||||||
analyticsService.logEvent({ event_name: 'screen_view', screen_name: 'TaxisLocales' })
|
analyticsService.logEvent({ event_name: 'screen_view', screen_name: 'TaxisLocales' })
|
||||||
window.addEventListener('app-refocus', handleRefocus)
|
window.addEventListener('app-refocus', handleRefocus)
|
||||||
|
|
||||||
// Infinite Scroll Observer
|
|
||||||
observer = new IntersectionObserver((entries) => {
|
observer = new IntersectionObserver((entries) => {
|
||||||
if (entries[0]?.isIntersecting) {
|
if (entries[0]?.isIntersecting) {
|
||||||
displayLimit.value += 12
|
displayLimit.value += 12
|
||||||
@ -55,28 +67,36 @@ onMounted(async () => {
|
|||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
window.removeEventListener('app-refocus', handleRefocus)
|
window.removeEventListener('app-refocus', handleRefocus)
|
||||||
if (observer) {
|
if (observer) observer.disconnect()
|
||||||
observer.disconnect()
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
watch([selectedZone, selectedShift, onlyEnglish], () => {
|
watch([selectedZone, selectedShift, onlyEnglish, searchQuery], () => {
|
||||||
displayLimit.value = 12
|
displayLimit.value = 12
|
||||||
})
|
})
|
||||||
|
|
||||||
const filteredTaxis = computed(() => {
|
const filteredTaxis = computed(() => {
|
||||||
|
const q = searchQuery.value.trim().toLowerCase()
|
||||||
return taxiStore.taxis.filter(taxi => {
|
return taxiStore.taxis.filter(taxi => {
|
||||||
const matchesZone = selectedZone.value === 'all' || taxi.corregimiento === selectedZone.value
|
const matchesZone = selectedZone.value === 'all' || taxi.corregimiento === selectedZone.value
|
||||||
// Ahora comprueba si el turno seleccionado está en el array de turnos del taxi
|
|
||||||
const matchesShift = selectedShift.value === 'all' || (taxi.shifts && taxi.shifts.includes(selectedShift.value))
|
const matchesShift = selectedShift.value === 'all' || (taxi.shifts && taxi.shifts.includes(selectedShift.value))
|
||||||
const matchesEnglish = !onlyEnglish.value || taxi.english_speaking
|
const matchesEnglish = !onlyEnglish.value || taxi.english_speaking
|
||||||
return matchesZone && matchesShift && matchesEnglish
|
const matchesSearch = !q || taxi.owner_name.toLowerCase().includes(q)
|
||||||
|
return matchesZone && matchesShift && matchesEnglish && matchesSearch
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
const visibleTaxis = computed(() => {
|
const visibleTaxis = computed(() => filteredTaxis.value.slice(0, displayLimit.value))
|
||||||
return filteredTaxis.value.slice(0, displayLimit.value)
|
|
||||||
})
|
const hasActiveFilters = computed(() =>
|
||||||
|
selectedZone.value !== 'all' || selectedShift.value !== 'all' || onlyEnglish.value || searchQuery.value.trim() !== ''
|
||||||
|
)
|
||||||
|
|
||||||
|
function clearFilters() {
|
||||||
|
selectedZone.value = 'all'
|
||||||
|
selectedShift.value = 'all'
|
||||||
|
onlyEnglish.value = false
|
||||||
|
searchQuery.value = ''
|
||||||
|
}
|
||||||
|
|
||||||
const isOnline = (taxi: Taxi) => {
|
const isOnline = (taxi: Taxi) => {
|
||||||
if (!taxi.shifts) return false
|
if (!taxi.shifts) return false
|
||||||
@ -110,83 +130,136 @@ function getShiftLabel(shift: string) {
|
|||||||
return shift
|
return shift
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="taxis-locales">
|
<div class="taxis-locales">
|
||||||
<div class="filters-container">
|
<!-- FILTERS -->
|
||||||
<div class="filter-card glass-effect">
|
<div class="filters-wrap">
|
||||||
<div class="selectors-side">
|
<!-- Search -->
|
||||||
<div class="select-group-premium">
|
<div class="search-bar">
|
||||||
<div class="group-content">
|
<span class="material-icons search-icon notranslate" translate="no" aria-hidden="true">search</span>
|
||||||
<label>{{ t('taxi.allZones') }}</label>
|
<input
|
||||||
<select v-model="selectedZone">
|
v-model="searchQuery"
|
||||||
<option value="all">{{ t('taxi.allZones') }}</option>
|
type="search"
|
||||||
<option v-for="zone in corregimientos.filter(z => z !== 'all')" :key="zone" :value="zone">{{ zone }}</option>
|
:placeholder="t('taxi.allZones') + '...'"
|
||||||
</select>
|
class="search-input"
|
||||||
</div>
|
:aria-label="'Buscar conductor'"
|
||||||
</div>
|
/>
|
||||||
<div class="select-group-premium">
|
<button
|
||||||
<div class="group-content">
|
v-if="searchQuery"
|
||||||
<label>{{ t('taxi.shift') }}</label>
|
class="search-clear"
|
||||||
<select v-model="selectedShift">
|
@click="searchQuery = ''"
|
||||||
<option value="all">{{ t('taxi.shift') }}</option>
|
:aria-label="t('common.clear')"
|
||||||
<option v-for="s in shifts.filter(x => x !== 'all')" :key="s" :value="s">{{ getShiftLabel(s) }}</option>
|
>
|
||||||
</select>
|
<span class="material-icons notranslate" translate="no" aria-hidden="true">close</span>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="lang-toggle-side">
|
|
||||||
<div class="lang-pill" :class="{ 'lang-pill--active': onlyEnglish }" @click="onlyEnglish = !onlyEnglish">
|
|
||||||
<span class="material-icons notranslate" translate="no">{{ onlyEnglish ? 'check_circle' : 'language' }}</span>
|
|
||||||
<span>English</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-if="taxiStore.isLoading" class="state-container">
|
|
||||||
<LoadingBranded :message="t('taxi.loadingTaxis') || 'Cargando taxis...'" icon="local_taxi" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-else-if="taxiStore.error" class="state-container">
|
|
||||||
<span class="material-icons notranslate" translate="no">error_outline</span>
|
|
||||||
<p>{{ taxiStore.error }}</p>
|
|
||||||
<button class="retry-btn" @click="taxiStore.loadTaxis()">
|
|
||||||
<span class="material-icons notranslate" translate="no">refresh</span>
|
|
||||||
{{ t('common.retry') || 'Reintentar' }}
|
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Zone chips -->
|
||||||
|
<div class="filter-section">
|
||||||
|
<span class="filter-label">{{ t('taxi.area') }}</span>
|
||||||
|
<TransportFilterChips
|
||||||
|
v-model="selectedZone"
|
||||||
|
:options="zoneOptions"
|
||||||
|
:label="t('taxi.area')"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Shift chips -->
|
||||||
|
<div class="filter-section">
|
||||||
|
<span class="filter-label">{{ t('taxi.shift') }}</span>
|
||||||
|
<TransportFilterChips
|
||||||
|
v-model="selectedShift"
|
||||||
|
:options="shiftOptions"
|
||||||
|
:label="t('taxi.shift')"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- English toggle -->
|
||||||
|
<div class="filter-section">
|
||||||
|
<button
|
||||||
|
class="lang-pill"
|
||||||
|
:class="{ 'lang-pill--active': onlyEnglish }"
|
||||||
|
role="switch"
|
||||||
|
:aria-checked="onlyEnglish"
|
||||||
|
@click="onlyEnglish = !onlyEnglish"
|
||||||
|
>
|
||||||
|
<span class="material-icons notranslate" translate="no" aria-hidden="true">
|
||||||
|
{{ onlyEnglish ? 'check_circle' : 'language' }}
|
||||||
|
</span>
|
||||||
|
<span>{{ t('taxi.englishSpeakers') }}</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- LOADING SKELETONS -->
|
||||||
|
<div v-if="taxiStore.isLoading" class="taxis-grid" aria-busy="true" aria-label="Cargando conductores...">
|
||||||
|
<TaxiSkeletonCard v-for="n in 6" :key="n" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- ERROR -->
|
||||||
|
<div v-else-if="taxiStore.error" class="state-container" role="alert">
|
||||||
|
<span class="material-icons notranslate state-icon state-icon--error" translate="no" aria-hidden="true">error_outline</span>
|
||||||
|
<p>{{ taxiStore.error }}</p>
|
||||||
|
<button class="retry-btn" @click="taxiStore.loadTaxis()">
|
||||||
|
<span class="material-icons notranslate" translate="no" aria-hidden="true">refresh</span>
|
||||||
|
{{ t('common.retry') }}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- GRID -->
|
||||||
<AuthGuard
|
<AuthGuard
|
||||||
|
v-else
|
||||||
:title="t('discover.auth.title')"
|
:title="t('discover.auth.title')"
|
||||||
:message="t('shuttle.auth.message')"
|
:message="t('shuttle.auth.message')"
|
||||||
>
|
>
|
||||||
<div class="taxis-grid">
|
<div class="taxis-grid" role="list" :aria-label="'Conductores disponibles'">
|
||||||
<div v-for="taxi in visibleTaxis" :key="taxi.id" v-memo="[taxi.id]" class="taxi-card-new glass-effect">
|
<div
|
||||||
|
v-for="taxi in visibleTaxis"
|
||||||
|
:key="taxi.id"
|
||||||
|
v-memo="[taxi.id]"
|
||||||
|
class="taxi-card glass-effect"
|
||||||
|
role="listitem"
|
||||||
|
>
|
||||||
<div class="card-top">
|
<div class="card-top">
|
||||||
<div class="driver-avatar-wrap">
|
<div class="driver-avatar-wrap">
|
||||||
<div class="driver-avatar">
|
<div class="driver-avatar" aria-hidden="true">
|
||||||
<AppImage
|
<AppImage
|
||||||
:src="taxi.image_url"
|
:src="taxi.image_url"
|
||||||
type="taxi"
|
type="taxi"
|
||||||
alt="Driver"
|
alt=""
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="driver-status" :class="{ 'status-online': isOnline(taxi) }"></div>
|
<div
|
||||||
|
class="driver-status"
|
||||||
|
:class="{ 'status-online': isOnline(taxi) }"
|
||||||
|
:aria-label="isOnline(taxi) ? 'Disponible' : 'No disponible'"
|
||||||
|
role="img"
|
||||||
|
></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="driver-info">
|
<div class="driver-info">
|
||||||
<div class="flex items-center gap-2 mb-0.5">
|
<div class="name-row">
|
||||||
<h3 class="driver-name">{{ taxi.owner_name }}</h3>
|
<h3 class="driver-name">{{ taxi.owner_name }}</h3>
|
||||||
<span v-if="taxi.is_accessible" class="material-icons text-blue-500 text-sm notranslate" title="Accesible para personas con discapacidad" translate="no">accessible</span>
|
<span
|
||||||
|
v-if="taxi.is_accessible"
|
||||||
|
class="material-icons accessible-icon notranslate"
|
||||||
|
:title="'Accesible para personas con discapacidad'"
|
||||||
|
translate="no"
|
||||||
|
aria-label="Vehículo accesible"
|
||||||
|
role="img"
|
||||||
|
>accessible</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="driver-meta">
|
<div class="driver-meta">
|
||||||
<div class="rating-stars">
|
<div class="rating-stars" :aria-label="`Calificación ${(taxi.rating || 5).toFixed(1)} de 5`">
|
||||||
<span class="material-icons star-filled notranslate" translate="no">star</span>
|
<span class="material-icons star-filled notranslate" translate="no" aria-hidden="true">star</span>
|
||||||
<span class="rating-value">{{ (taxi.rating || 5).toFixed(1) }}</span>
|
<span class="rating-value">{{ (taxi.rating || 5).toFixed(1) }}</span>
|
||||||
</div>
|
</div>
|
||||||
<span class="meta-dot">·</span>
|
<span class="meta-dot" aria-hidden="true">·</span>
|
||||||
<span class="shift-badge">{{ getShiftsDisplay(taxi) }}</span>
|
<span class="shift-badge">{{ getShiftsDisplay(taxi) }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="fav-icon-wrapper">
|
<div class="fav-icon-wrapper">
|
||||||
<FavoriteButton
|
<FavoriteButton
|
||||||
item-type="taxi"
|
item-type="taxi"
|
||||||
@ -199,22 +272,27 @@ function getShiftLabel(shift: string) {
|
|||||||
|
|
||||||
<div class="card-details">
|
<div class="card-details">
|
||||||
<div class="detail-item" v-if="taxi.corregimiento">
|
<div class="detail-item" v-if="taxi.corregimiento">
|
||||||
<span class="material-icons detail-icon notranslate" translate="no">location_on</span>
|
<span class="material-icons detail-icon notranslate" translate="no" aria-hidden="true">location_on</span>
|
||||||
<span class="detail-text">{{ taxi.corregimiento }}</span>
|
<span class="detail-text">{{ taxi.corregimiento }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="detail-item" v-if="taxi.vehicle_type">
|
<div class="detail-item" v-if="taxi.vehicle_type">
|
||||||
<span class="material-icons detail-icon notranslate" translate="no">local_taxi</span>
|
<span class="material-icons detail-icon notranslate" translate="no" aria-hidden="true">local_taxi</span>
|
||||||
<span class="detail-text">{{ taxi.vehicle_type }}</span>
|
<span class="detail-text">{{ taxi.vehicle_type }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="detail-item" v-if="taxi.english_speaking">
|
<div class="detail-item" v-if="taxi.english_speaking">
|
||||||
<span class="material-icons detail-icon notranslate" translate="no">g_translate</span>
|
<span class="material-icons detail-icon notranslate" translate="no" aria-hidden="true">g_translate</span>
|
||||||
<span class="detail-text">{{ t('taxi.englishLabel') }}</span>
|
<span class="detail-text">{{ t('taxi.englishLabel') }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-actions">
|
<div class="card-actions">
|
||||||
<a :href="`tel:${taxi.phone_number}`" class="call-btn-premium" @click="handleCall(taxi)">
|
<a
|
||||||
<span class="material-icons notranslate" translate="no">phone_in_talk</span>
|
:href="`tel:${taxi.phone_number}`"
|
||||||
|
class="call-btn"
|
||||||
|
:aria-label="`Llamar a ${taxi.owner_name}, ${taxi.phone_number}`"
|
||||||
|
@click="handleCall(taxi)"
|
||||||
|
>
|
||||||
|
<span class="material-icons notranslate" translate="no" aria-hidden="true">phone_in_talk</span>
|
||||||
<div class="btn-content">
|
<div class="btn-content">
|
||||||
<span class="btn-label">{{ t('taxi.callNow') }}</span>
|
<span class="btn-label">{{ t('taxi.callNow') }}</span>
|
||||||
<span class="btn-subtext">{{ taxi.phone_number }}</span>
|
<span class="btn-subtext">{{ taxi.phone_number }}</span>
|
||||||
@ -224,138 +302,169 @@ function getShiftLabel(shift: string) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Infinite Scroll Trigger -->
|
<!-- Infinite Scroll Trigger -->
|
||||||
<div ref="observerTarget" class="h-10 w-full mt-4"></div>
|
<div ref="observerTarget" class="scroll-trigger" aria-hidden="true"></div>
|
||||||
|
|
||||||
<div v-if="filteredTaxis.length === 0" class="empty-state">
|
<!-- EMPTY STATE -->
|
||||||
<span class="material-icons notranslate" translate="no">no_accounts</span>
|
<div v-if="filteredTaxis.length === 0" class="empty-state" role="status">
|
||||||
<p>{{ t('taxi.noTaxisAvailable') }}</p>
|
<span class="material-icons notranslate empty-icon" translate="no" aria-hidden="true">no_accounts</span>
|
||||||
|
<p class="empty-title">{{ t('taxi.noTaxisAvailable') }}</p>
|
||||||
|
<button v-if="hasActiveFilters" class="clear-filters-btn" @click="clearFilters">
|
||||||
|
<span class="material-icons notranslate" translate="no" aria-hidden="true">filter_alt_off</span>
|
||||||
|
{{ t('common.clear') }}
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</AuthGuard>
|
</AuthGuard>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
/* FILTROS PREMIUM */
|
/* FILTERS */
|
||||||
.filters-container {
|
.filters-wrap {
|
||||||
padding: 0 1rem 1.5rem;
|
padding: 0 1rem 1rem;
|
||||||
}
|
|
||||||
|
|
||||||
.filter-card {
|
|
||||||
border-radius: 1rem;
|
|
||||||
padding: 0.75rem 1rem;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 0.75rem;
|
gap: 0.875rem;
|
||||||
border: 1px solid var(--border-color);
|
|
||||||
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
|
|
||||||
background: var(--card-bg);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 640px) {
|
.search-bar {
|
||||||
.filter-card {
|
|
||||||
flex-direction: row;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.selectors-side {
|
|
||||||
flex: 1;
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 1fr 1fr;
|
|
||||||
gap: 0.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.select-group-premium {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
background: var(--bg-primary);
|
background: var(--bg-secondary);
|
||||||
border: 1px solid var(--border-color);
|
border: 1.5px solid var(--border-color);
|
||||||
border-radius: 0.75rem;
|
border-radius: 0.875rem;
|
||||||
padding: 0.5rem 0.75rem;
|
padding: 0 0.875rem;
|
||||||
transition: all 0.3s ease;
|
transition: border-color 0.18s ease;
|
||||||
|
min-height: 48px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select-group-premium:focus-within {
|
.search-bar:focus-within {
|
||||||
border-color: var(--active-color);
|
border-color: var(--active-color);
|
||||||
box-shadow: 0 0 0 3px rgba(254, 231, 21, 0.1);
|
box-shadow: 0 0 0 3px rgba(254, 231, 21, 0.12);
|
||||||
}
|
}
|
||||||
|
|
||||||
.group-content {
|
.search-icon {
|
||||||
flex: 1;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
.group-content label {
|
|
||||||
font-size: 0.65rem;
|
|
||||||
font-weight: 800;
|
|
||||||
text-transform: uppercase;
|
|
||||||
letter-spacing: 0.05em;
|
|
||||||
color: var(--text-secondary);
|
color: var(--text-secondary);
|
||||||
line-height: 1;
|
font-size: 1.25rem;
|
||||||
margin-bottom: 0.25rem;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.group-content select {
|
.search-input {
|
||||||
|
flex: 1;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border: none;
|
border: none;
|
||||||
color: var(--text-primary);
|
|
||||||
font-weight: 700;
|
|
||||||
font-size: 0.9375rem;
|
|
||||||
outline: none;
|
outline: none;
|
||||||
|
color: var(--text-primary);
|
||||||
|
font-size: 0.9375rem;
|
||||||
|
font-weight: 600;
|
||||||
|
padding: 0.75rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-input::placeholder {
|
||||||
|
color: var(--text-secondary);
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-clear {
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
color: var(--text-secondary);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: 0;
|
display: flex;
|
||||||
width: 100%;
|
align-items: center;
|
||||||
|
padding: 4px;
|
||||||
|
border-radius: 50%;
|
||||||
|
min-width: 28px;
|
||||||
|
min-height: 28px;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-clear:hover {
|
||||||
|
background: var(--bg-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-section {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-label {
|
||||||
|
font-size: 0.75rem;
|
||||||
|
font-weight: 800;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.06em;
|
||||||
|
color: var(--text-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.lang-pill {
|
.lang-pill {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.25rem;
|
gap: 0.375rem;
|
||||||
padding: 0.5rem 1rem;
|
padding: 0.5rem 1rem;
|
||||||
background: var(--bg-primary);
|
background: var(--bg-primary);
|
||||||
border: 1px solid var(--border-color);
|
border: 1.5px solid var(--border-color);
|
||||||
border-radius: 0.75rem;
|
border-radius: 99px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
font-size: 0.875rem;
|
font-size: 0.8125rem;
|
||||||
color: var(--text-secondary);
|
color: var(--text-secondary);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.18s ease;
|
||||||
|
min-height: 40px;
|
||||||
|
align-self: flex-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lang-pill--active {
|
.lang-pill--active {
|
||||||
background: rgba(254, 231, 21, 0.1);
|
background: rgba(254, 231, 21, 0.12);
|
||||||
border-color: var(--active-color);
|
border-color: var(--active-color);
|
||||||
color: var(--active-color);
|
color: var(--active-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* GRID Y TARJETAS PREMIUM */
|
.lang-pill:focus-visible {
|
||||||
.taxis-grid {
|
outline: 2px solid var(--active-color);
|
||||||
display: grid;
|
outline-offset: 2px;
|
||||||
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
|
|
||||||
gap: 1.5rem;
|
|
||||||
padding: 1.5rem 1rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.taxi-card-new {
|
/* GRID */
|
||||||
|
.taxis-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
gap: 1rem;
|
||||||
|
padding: 0.5rem 1rem 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 640px) {
|
||||||
|
.taxis-grid {
|
||||||
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 1024px) {
|
||||||
|
.taxis-grid {
|
||||||
|
grid-template-columns: repeat(3, 1fr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* CARD */
|
||||||
|
.taxi-card {
|
||||||
border-radius: 1.5rem;
|
border-radius: 1.5rem;
|
||||||
padding: 1.25rem;
|
padding: 1.25rem;
|
||||||
border: 1px solid var(--border-color);
|
border: 1px solid var(--border-color);
|
||||||
transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 1.25rem;
|
gap: 1.25rem;
|
||||||
background: var(--card-bg);
|
background: var(--card-bg);
|
||||||
|
cursor: default;
|
||||||
}
|
}
|
||||||
|
|
||||||
.taxi-card-new:hover {
|
@media (hover: hover) {
|
||||||
transform: translateY(-8px);
|
.taxi-card:hover {
|
||||||
|
transform: translateY(-6px);
|
||||||
border-color: var(--active-color);
|
border-color: var(--active-color);
|
||||||
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
|
box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-top {
|
.card-top {
|
||||||
@ -401,14 +510,31 @@ function getShiftLabel(shift: string) {
|
|||||||
|
|
||||||
.driver-info {
|
.driver-info {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.name-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.5rem;
|
||||||
|
margin-bottom: 0.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.driver-name {
|
.driver-name {
|
||||||
margin: 0 0 0.25rem;
|
margin: 0;
|
||||||
font-size: 1.125rem;
|
font-size: 1.0625rem;
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
color: var(--text-primary);
|
color: var(--text-primary);
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accessible-icon {
|
||||||
|
font-size: 1.125rem;
|
||||||
|
color: #3b82f6;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.driver-meta {
|
.driver-meta {
|
||||||
@ -446,10 +572,14 @@ function getShiftLabel(shift: string) {
|
|||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fav-icon-wrapper {
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.card-details {
|
.card-details {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
gap: 0.75rem;
|
gap: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.detail-item {
|
.detail-item {
|
||||||
@ -459,7 +589,7 @@ function getShiftLabel(shift: string) {
|
|||||||
background: var(--bg-secondary);
|
background: var(--bg-secondary);
|
||||||
padding: 0.375rem 0.75rem;
|
padding: 0.375rem 0.75rem;
|
||||||
border-radius: 0.75rem;
|
border-radius: 0.75rem;
|
||||||
font-size: 0.75rem;
|
font-size: 0.8125rem;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
color: var(--text-secondary);
|
color: var(--text-secondary);
|
||||||
}
|
}
|
||||||
@ -473,30 +603,38 @@ function getShiftLabel(shift: string) {
|
|||||||
margin-top: auto;
|
margin-top: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.call-btn-premium {
|
.call-btn {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 1rem;
|
gap: 0.875rem;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0.75rem 1.25rem;
|
padding: 0.75rem 1.25rem;
|
||||||
background: var(--active-color);
|
background: var(--active-color);
|
||||||
color: #101820;
|
color: #101820;
|
||||||
border-radius: 1.125rem;
|
border-radius: 1.125rem;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
transition: all 0.3s ease;
|
transition: transform 0.18s ease, box-shadow 0.18s ease;
|
||||||
box-shadow: 0 4px 15px rgba(254, 231, 21, 0.2);
|
box-shadow: 0 4px 15px rgba(254, 231, 21, 0.2);
|
||||||
|
min-height: 52px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.call-btn-premium:hover {
|
.call-btn:focus-visible {
|
||||||
|
outline: 2px solid #101820;
|
||||||
|
outline-offset: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (hover: hover) {
|
||||||
|
.call-btn:hover {
|
||||||
transform: scale(1.02);
|
transform: scale(1.02);
|
||||||
box-shadow: 0 6px 20px rgba(254, 231, 21, 0.35);
|
box-shadow: 0 6px 20px rgba(254, 231, 21, 0.35);
|
||||||
}
|
}
|
||||||
|
|
||||||
.call-btn-premium:active {
|
|
||||||
transform: scale(0.98);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.call-btn-premium .material-icons {
|
.call-btn:active {
|
||||||
|
transform: scale(0.97);
|
||||||
|
}
|
||||||
|
|
||||||
|
.call-btn .material-icons {
|
||||||
font-size: 1.5rem;
|
font-size: 1.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -518,23 +656,53 @@ function getShiftLabel(shift: string) {
|
|||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* STATES */
|
||||||
|
.scroll-trigger {
|
||||||
|
height: 40px;
|
||||||
|
width: 100%;
|
||||||
|
grid-column: 1 / -1;
|
||||||
|
}
|
||||||
|
|
||||||
.empty-state {
|
.empty-state {
|
||||||
grid-column-start: 1;
|
grid-column: 1 / -1;
|
||||||
grid-column-end: -1;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 4rem 2rem;
|
padding: 3.5rem 2rem;
|
||||||
color: var(--text-secondary);
|
color: var(--text-secondary);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
gap: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.empty-state .material-icons {
|
.empty-icon {
|
||||||
font-size: 4rem;
|
font-size: 3.5rem;
|
||||||
margin-bottom: 1rem;
|
opacity: 0.4;
|
||||||
opacity: 0.5;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.empty-state p {
|
.empty-title {
|
||||||
font-size: 1.125rem;
|
font-size: 1rem;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clear-filters-btn {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.5rem;
|
||||||
|
padding: 0.625rem 1.25rem;
|
||||||
|
background: var(--bg-secondary);
|
||||||
|
border: 1.5px solid var(--border-color);
|
||||||
|
border-radius: 99px;
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 0.875rem;
|
||||||
|
color: var(--text-primary);
|
||||||
|
cursor: pointer;
|
||||||
|
transition: border-color 0.18s ease, background 0.18s ease;
|
||||||
|
min-height: 44px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clear-filters-btn:hover {
|
||||||
|
border-color: var(--active-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.state-container {
|
.state-container {
|
||||||
@ -544,17 +712,15 @@ function getShiftLabel(shift: string) {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 4rem 2rem;
|
padding: 4rem 2rem;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.spin {
|
.state-icon {
|
||||||
animation: spin 1s infinite linear;
|
|
||||||
font-size: 3rem;
|
font-size: 3rem;
|
||||||
color: var(--active-color);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes spin {
|
.state-icon--error {
|
||||||
from { transform: rotate(0deg); }
|
color: #ef4444;
|
||||||
to { transform: rotate(360deg); }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.retry-btn {
|
.retry-btn {
|
||||||
@ -568,16 +734,22 @@ function getShiftLabel(shift: string) {
|
|||||||
border-radius: 99px;
|
border-radius: 99px;
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.3s ease;
|
transition: transform 0.15s ease;
|
||||||
|
min-height: 44px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.retry-btn:hover {
|
.retry-btn:active {
|
||||||
transform: scale(1.05);
|
transform: scale(0.97);
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 600px) {
|
@media (prefers-reduced-motion: reduce) {
|
||||||
.taxis-grid {
|
.taxi-card,
|
||||||
grid-template-columns: 1fr;
|
.call-btn,
|
||||||
|
.lang-pill,
|
||||||
|
.search-bar,
|
||||||
|
.retry-btn,
|
||||||
|
.clear-filters-btn {
|
||||||
|
transition: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@ -6,7 +6,8 @@ import { useShuttleStore } from '@/stores/shuttle'
|
|||||||
import AuthGuard from '@/components/common/AuthGuard.vue'
|
import AuthGuard from '@/components/common/AuthGuard.vue'
|
||||||
import AppImage from '@/components/AppImage.vue'
|
import AppImage from '@/components/AppImage.vue'
|
||||||
import { analyticsService } from '@/services/analyticsService'
|
import { analyticsService } from '@/services/analyticsService'
|
||||||
import LoadingBranded from '@/components/common/LoadingBranded.vue'
|
import ShuttleSkeletonCard from '@/components/transporte/ShuttleSkeletonCard.vue'
|
||||||
|
import TransportFilterChips from '@/components/transporte/TransportFilterChips.vue'
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const shuttleStore = useShuttleStore()
|
const shuttleStore = useShuttleStore()
|
||||||
@ -15,6 +16,19 @@ const router = useRouter()
|
|||||||
const shuttleCategoryFilter = ref('all')
|
const shuttleCategoryFilter = ref('all')
|
||||||
const shuttleTypeFilter = ref('all')
|
const shuttleTypeFilter = ref('all')
|
||||||
|
|
||||||
|
const categoryOptions = computed(() => [
|
||||||
|
{ value: 'all', label: t('shuttle.allAreas') || 'Todas', icon: 'grid_view' },
|
||||||
|
{ value: 'local', label: t('shuttle.local') || 'Local', icon: 'place' },
|
||||||
|
{ value: 'interprovincial', label: t('shuttle.interprovincial') || 'Interprovincial', icon: 'route' },
|
||||||
|
])
|
||||||
|
|
||||||
|
const typeOptions = computed(() => [
|
||||||
|
{ value: 'all', label: t('common.all'), icon: 'swap_horiz' },
|
||||||
|
{ value: 'one_way', label: t('shuttle.oneWay'), icon: 'arrow_forward' },
|
||||||
|
{ value: 'round_trip', label: t('shuttle.roundTrip'), icon: 'sync_alt' },
|
||||||
|
{ value: 'both', label: t('shuttle.both'), icon: 'directions' },
|
||||||
|
])
|
||||||
|
|
||||||
const filteredShuttles = computed(() => {
|
const filteredShuttles = computed(() => {
|
||||||
return shuttleStore.shuttles.filter(shuttle => {
|
return shuttleStore.shuttles.filter(shuttle => {
|
||||||
const matchesCategory = shuttleCategoryFilter.value === 'all' || shuttle.category === shuttleCategoryFilter.value
|
const matchesCategory = shuttleCategoryFilter.value === 'all' || shuttle.category === shuttleCategoryFilter.value
|
||||||
@ -23,6 +37,15 @@ const filteredShuttles = computed(() => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const hasActiveFilters = computed(() =>
|
||||||
|
shuttleCategoryFilter.value !== 'all' || shuttleTypeFilter.value !== 'all'
|
||||||
|
)
|
||||||
|
|
||||||
|
function clearFilters() {
|
||||||
|
shuttleCategoryFilter.value = 'all'
|
||||||
|
shuttleTypeFilter.value = 'all'
|
||||||
|
}
|
||||||
|
|
||||||
const verDetalle = (shuttleId: string, shuttleName: string) => {
|
const verDetalle = (shuttleId: string, shuttleName: string) => {
|
||||||
analyticsService.logEvent({
|
analyticsService.logEvent({
|
||||||
event_name: 'view_details',
|
event_name: 'view_details',
|
||||||
@ -30,10 +53,7 @@ const verDetalle = (shuttleId: string, shuttleName: string) => {
|
|||||||
entity_id: shuttleId,
|
entity_id: shuttleId,
|
||||||
entity_name: shuttleName
|
entity_name: shuttleName
|
||||||
})
|
})
|
||||||
router.push({
|
router.push({ name: 'ShuttleDetalle', params: { id: shuttleId } })
|
||||||
name: 'ShuttleDetalle',
|
|
||||||
params: { id: shuttleId }
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function fetchData() {
|
function fetchData() {
|
||||||
@ -41,7 +61,6 @@ function fetchData() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleRefocus() {
|
function handleRefocus() {
|
||||||
// Recarga silenciosa: no congela la UI si ya hay datos
|
|
||||||
shuttleStore.silentReload()
|
shuttleStore.silentReload()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,115 +79,111 @@ onUnmounted(() => {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="viajes-turisticos">
|
<div class="viajes-turisticos">
|
||||||
<!-- FILTROS PREMIUM -->
|
<!-- FILTERS -->
|
||||||
<div class="filters-container">
|
<div class="filters-wrap">
|
||||||
<div class="filter-card glass-effect">
|
<div class="filter-section">
|
||||||
<div class="selectors-side">
|
<span class="filter-label">{{ t('shuttle.category') }}</span>
|
||||||
<!-- Ruta Select -->
|
<TransportFilterChips
|
||||||
<div class="select-group-premium">
|
v-model="shuttleCategoryFilter"
|
||||||
<div class="group-content">
|
:options="categoryOptions"
|
||||||
<label>{{ t('shuttle.category') || 'Categoría' }}</label>
|
:label="t('shuttle.category')"
|
||||||
<select v-model="shuttleCategoryFilter">
|
/>
|
||||||
<option value="all">{{ t('shuttle.allAreas') || 'Todas las áreas' }}</option>
|
</div>
|
||||||
<option value="local">Local</option>
|
<div class="filter-section">
|
||||||
<option value="interprovincial">Interprovincial</option>
|
<span class="filter-label">{{ t('shuttle.tripType') }}</span>
|
||||||
</select>
|
<TransportFilterChips
|
||||||
|
v-model="shuttleTypeFilter"
|
||||||
|
:options="typeOptions"
|
||||||
|
:label="t('shuttle.tripType')"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Tipo de Viaje Select -->
|
<!-- LOADING SKELETONS -->
|
||||||
<div class="select-group-premium">
|
<div v-if="shuttleStore.isLoading" class="shuttles-grid" aria-busy="true" aria-label="Cargando viajes...">
|
||||||
<div class="group-content">
|
<ShuttleSkeletonCard v-for="n in 4" :key="n" />
|
||||||
<label>{{ t('shuttle.tripType') }}</label>
|
|
||||||
<select v-model="shuttleTypeFilter">
|
|
||||||
<option value="all">{{ t('shuttle.tripType') }}</option>
|
|
||||||
<option value="one_way">{{ t('shuttle.oneWay') }}</option>
|
|
||||||
<option value="round_trip">{{ t('shuttle.roundTrip') }}</option>
|
|
||||||
<option value="both">{{ t('shuttle.both') }}</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- ESTADOS -->
|
<!-- ERROR -->
|
||||||
<div v-if="shuttleStore.isLoading" class="state-container">
|
<div v-else-if="shuttleStore.error" class="state-container" role="alert">
|
||||||
<LoadingBranded :message="t('taxi.loadingTaxis') || 'Cargando viajes...'" icon="airport_shuttle" />
|
<span class="material-icons notranslate state-icon state-icon--error" translate="no" aria-hidden="true">error_outline</span>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-else-if="shuttleStore.error" class="state-container">
|
|
||||||
<span class="material-icons notranslate" translate="no">error_outline</span>
|
|
||||||
<p>{{ shuttleStore.error }}</p>
|
<p>{{ shuttleStore.error }}</p>
|
||||||
<button class="retry-btn" @click="shuttleStore.loadShuttles()">
|
<button class="retry-btn" @click="shuttleStore.loadShuttles()">
|
||||||
<span class="material-icons notranslate" translate="no">refresh</span>
|
<span class="material-icons notranslate" translate="no" aria-hidden="true">refresh</span>
|
||||||
{{ t('common.retry') || 'Reintentar' }}
|
{{ t('common.retry') }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- GRID PREMIUM CON AUTHGUARD -->
|
<!-- GRID -->
|
||||||
<AuthGuard
|
<AuthGuard
|
||||||
v-else
|
v-else
|
||||||
:title="t('shuttle.auth.title') || 'Viajes Exclusivos'"
|
:title="t('shuttle.auth.title') || 'Viajes Exclusivos'"
|
||||||
:message="t('shuttle.auth.message') || 'Regístrate para reservar tus viajes, ver horarios detallados y tarifas de grupo.'"
|
:message="t('shuttle.auth.message') || 'Regístrate para reservar tus viajes, ver horarios detallados y tarifas de grupo.'"
|
||||||
>
|
>
|
||||||
<div class="shuttles-grid">
|
<div class="shuttles-grid" role="list" :aria-label="'Viajes disponibles'">
|
||||||
<div
|
<article
|
||||||
v-for="shuttle in filteredShuttles"
|
v-for="shuttle in filteredShuttles"
|
||||||
:key="shuttle.id"
|
:key="shuttle.id"
|
||||||
v-memo="[shuttle.id]"
|
v-memo="[shuttle.id]"
|
||||||
class="shuttle-card-premium glass-effect"
|
class="shuttle-card glass-effect"
|
||||||
|
role="listitem"
|
||||||
|
:aria-label="`${shuttle.origin} a ${shuttle.destination}${shuttle.company_name ? ', ' + shuttle.company_name : ''}`"
|
||||||
@click="verDetalle(shuttle.id, shuttle.company_name || `${shuttle.origin}-${shuttle.destination}`)"
|
@click="verDetalle(shuttle.id, shuttle.company_name || `${shuttle.origin}-${shuttle.destination}`)"
|
||||||
|
@keydown.enter="verDetalle(shuttle.id, shuttle.company_name || `${shuttle.origin}-${shuttle.destination}`)"
|
||||||
|
tabindex="0"
|
||||||
>
|
>
|
||||||
<div class="card-image-wrap">
|
<!-- Image — desktop full, mobile strip -->
|
||||||
|
<div class="card-image-wrap" aria-hidden="true">
|
||||||
<AppImage
|
<AppImage
|
||||||
:src="shuttle.image_url"
|
:src="shuttle.image_url"
|
||||||
type="shuttle"
|
type="shuttle"
|
||||||
imgClass="shuttle-img"
|
imgClass="shuttle-img"
|
||||||
alt="Shuttle"
|
alt=""
|
||||||
/>
|
/>
|
||||||
<div class="company-tag" v-if="shuttle.company_name">
|
<div class="company-tag" v-if="shuttle.company_name">
|
||||||
<span class="material-icons notranslate" translate="no">business</span>
|
<span class="material-icons notranslate" translate="no" aria-hidden="true">business</span>
|
||||||
{{ shuttle.company_name }}
|
{{ shuttle.company_name }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-body-premium">
|
<div class="card-body">
|
||||||
<div class="route-header">
|
<div class="route-header">
|
||||||
<div class="route-main">
|
|
||||||
<span class="location-name">{{ shuttle.origin }}</span>
|
<span class="location-name">{{ shuttle.origin }}</span>
|
||||||
<span class="material-icons separator-icon notranslate" translate="no">east</span>
|
<span class="material-icons separator-icon notranslate" translate="no" aria-hidden="true">east</span>
|
||||||
<span class="location-name">{{ shuttle.destination }}</span>
|
<span class="location-name">{{ shuttle.destination }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card-meta">
|
<div class="card-meta">
|
||||||
<div class="meta-tag">
|
<div class="meta-tag">
|
||||||
<span class="material-icons notranslate" translate="no">directions_bus</span>
|
<span class="material-icons notranslate" translate="no" aria-hidden="true">directions_bus</span>
|
||||||
<span>{{ shuttle.vehicle_type }}</span>
|
<span>{{ shuttle.vehicle_type }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="meta-tag" v-if="shuttle.estimated_duration">
|
<div class="meta-tag" v-if="shuttle.estimated_duration">
|
||||||
<span class="material-icons notranslate" translate="no">schedule</span>
|
<span class="material-icons notranslate" translate="no" aria-hidden="true">schedule</span>
|
||||||
<span>{{ shuttle.estimated_duration }}</span>
|
<span>{{ shuttle.estimated_duration }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-footer-premium">
|
<div class="card-footer">
|
||||||
<div class="price-container">
|
<div class="price-container">
|
||||||
<span class="price-label">{{ t('shuttle.from') || 'Desde' }}</span>
|
<span class="price-label">{{ t('shuttle.from') || 'Desde' }}</span>
|
||||||
<span class="price-val">${{ shuttle.price_per_person }}</span>
|
<span class="price-val" :aria-label="`Precio desde $${shuttle.price_per_person}`">${{ shuttle.price_per_person }}</span>
|
||||||
</div>
|
</div>
|
||||||
<button class="view-details-btn">
|
<div class="view-details-btn" aria-hidden="true">
|
||||||
<span class="material-icons notranslate" translate="no">chevron_right</span>
|
<span class="material-icons notranslate" translate="no">chevron_right</span>
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</article>
|
||||||
|
|
||||||
<!-- EMPTY STATE -->
|
<!-- EMPTY STATE -->
|
||||||
<div v-if="filteredShuttles.length === 0" class="empty-state">
|
<div v-if="filteredShuttles.length === 0" class="empty-state" role="status">
|
||||||
<span class="material-icons notranslate" translate="no">directions_bus_filled</span>
|
<span class="material-icons notranslate empty-icon" translate="no" aria-hidden="true">directions_bus_filled</span>
|
||||||
<p>{{ t('shuttle.noShuttles') }}</p>
|
<p class="empty-title">{{ t('shuttle.noShuttles') }}</p>
|
||||||
|
<button v-if="hasActiveFilters" class="clear-filters-btn" @click="clearFilters">
|
||||||
|
<span class="material-icons notranslate" translate="no" aria-hidden="true">filter_alt_off</span>
|
||||||
|
{{ t('common.clear') }}
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</AuthGuard>
|
</AuthGuard>
|
||||||
@ -180,93 +195,104 @@ onUnmounted(() => {
|
|||||||
padding-bottom: 2rem;
|
padding-bottom: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FILTROS CONSISTENTES */
|
/* FILTERS */
|
||||||
.filters-container {
|
.filters-wrap {
|
||||||
padding: 0 1rem 1.5rem;
|
padding: 0 1rem 1rem;
|
||||||
}
|
|
||||||
|
|
||||||
.filter-card {
|
|
||||||
border-radius: 1rem;
|
|
||||||
padding: 0.75rem 1rem;
|
|
||||||
border: 1px solid var(--border-color);
|
|
||||||
background: var(--card-bg);
|
|
||||||
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
|
|
||||||
}
|
|
||||||
|
|
||||||
.selectors-side {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 1fr 1fr;
|
|
||||||
gap: 0.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.select-group-premium {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 0.5rem;
|
|
||||||
background: var(--bg-primary);
|
|
||||||
border: 1px solid var(--border-color);
|
|
||||||
border-radius: 0.75rem;
|
|
||||||
padding: 0.5rem 0.75rem;
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.select-group-premium:focus-within {
|
|
||||||
border-color: var(--active-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.group-content {
|
|
||||||
flex: 1;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
gap: 0.875rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.group-content label {
|
.filter-section {
|
||||||
font-size: 0.65rem;
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-label {
|
||||||
|
font-size: 0.75rem;
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.06em;
|
||||||
color: var(--text-secondary);
|
color: var(--text-secondary);
|
||||||
margin-bottom: 0.125rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.group-content select {
|
/* GRID — single column on mobile, 2-col on tablet, 3-col on desktop */
|
||||||
background: transparent;
|
|
||||||
border: none;
|
|
||||||
color: var(--text-primary);
|
|
||||||
font-weight: 700;
|
|
||||||
font-size: 0.9375rem;
|
|
||||||
outline: none;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* GRID Y CARDS PREMIUM */
|
|
||||||
.shuttles-grid {
|
.shuttles-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
grid-template-columns: 1fr;
|
||||||
gap: 1.5rem;
|
gap: 1rem;
|
||||||
padding: 0 1rem;
|
padding: 0.5rem 1rem 1.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.shuttle-card-premium {
|
@media (min-width: 640px) {
|
||||||
border-radius: 1.5rem;
|
.shuttles-grid {
|
||||||
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
gap: 1.25rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 1024px) {
|
||||||
|
.shuttles-grid {
|
||||||
|
grid-template-columns: repeat(3, 1fr);
|
||||||
|
gap: 1.5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* CARD — horizontal on mobile, vertical on tablet+ */
|
||||||
|
.shuttle-card {
|
||||||
|
border-radius: 1.25rem;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border: 1px solid var(--border-color);
|
border: 1px solid var(--border-color);
|
||||||
background: var(--card-bg);
|
background: var(--card-bg);
|
||||||
transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
/* Horizontal layout on mobile */
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
|
||||||
|
.shuttle-card:focus-visible {
|
||||||
|
outline: 2px solid var(--active-color);
|
||||||
|
outline-offset: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 480px) {
|
||||||
|
/* Vertical card layout on larger screens */
|
||||||
|
.shuttle-card {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.shuttle-card-premium:hover {
|
|
||||||
transform: translateY(-8px);
|
|
||||||
border-color: var(--active-color);
|
|
||||||
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (hover: hover) {
|
||||||
|
.shuttle-card:hover {
|
||||||
|
transform: translateY(-5px);
|
||||||
|
border-color: var(--active-color);
|
||||||
|
box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
|
||||||
|
}
|
||||||
|
|
||||||
|
.shuttle-card:hover .view-details-btn {
|
||||||
|
background: var(--active-color);
|
||||||
|
color: #101820;
|
||||||
|
border-color: var(--active-color);
|
||||||
|
transform: rotate(-45deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Image: small strip on mobile, full-width on larger */
|
||||||
.card-image-wrap {
|
.card-image-wrap {
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 180px;
|
width: 100px;
|
||||||
|
min-height: 120px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 480px) {
|
||||||
|
.card-image-wrap {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
min-height: unset;
|
||||||
|
height: 170px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.shuttle-img {
|
.shuttle-img {
|
||||||
@ -277,71 +303,101 @@ onUnmounted(() => {
|
|||||||
|
|
||||||
.company-tag {
|
.company-tag {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 1rem;
|
top: 0.75rem;
|
||||||
left: 1rem;
|
left: 0.75rem;
|
||||||
background: rgba(0, 0, 0, 0.7);
|
background: rgba(0, 0, 0, 0.7);
|
||||||
backdrop-filter: blur(8px);
|
backdrop-filter: blur(8px);
|
||||||
padding: 0.375rem 0.75rem;
|
padding: 0.25rem 0.625rem;
|
||||||
border-radius: 0.75rem;
|
border-radius: 0.625rem;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 0.75rem;
|
font-size: 0.7rem;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.5rem;
|
gap: 0.375rem;
|
||||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||||
|
/* Hide on mobile to save space */
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-body-premium {
|
@media (min-width: 480px) {
|
||||||
padding: 1.25rem;
|
.company-tag {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-body {
|
||||||
|
padding: 0.875rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 1rem;
|
gap: 0.625rem;
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.route-main {
|
@media (min-width: 480px) {
|
||||||
|
.card-body {
|
||||||
|
padding: 1.125rem;
|
||||||
|
gap: 0.875rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.route-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.75rem;
|
gap: 0.5rem;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.location-name {
|
.location-name {
|
||||||
font-size: 1.125rem;
|
font-size: 0.9375rem;
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
color: var(--text-primary);
|
color: var(--text-primary);
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
max-width: 80px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 480px) {
|
||||||
|
.location-name {
|
||||||
|
font-size: 1.0625rem;
|
||||||
|
max-width: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.separator-icon {
|
.separator-icon {
|
||||||
color: var(--active-color);
|
color: var(--active-color);
|
||||||
font-size: 1.25rem;
|
font-size: 1.125rem;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-meta {
|
.card-meta {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 1rem;
|
flex-wrap: wrap;
|
||||||
|
gap: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.meta-tag {
|
.meta-tag {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.375rem;
|
gap: 0.25rem;
|
||||||
color: var(--text-secondary);
|
color: var(--text-secondary);
|
||||||
font-size: 0.875rem;
|
font-size: 0.75rem;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
.meta-tag .material-icons {
|
.meta-tag .material-icons {
|
||||||
font-size: 1.125rem;
|
font-size: 1rem;
|
||||||
color: var(--active-color);
|
color: var(--active-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-footer-premium {
|
.card-footer {
|
||||||
margin-top: 0.5rem;
|
margin-top: auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding-top: 1rem;
|
padding-top: 0.625rem;
|
||||||
border-top: 1px solid var(--border-color);
|
border-top: 1px solid var(--border-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -351,21 +407,27 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.price-label {
|
.price-label {
|
||||||
font-size: 0.65rem;
|
font-size: 0.6875rem;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
color: var(--text-secondary);
|
color: var(--text-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.price-val {
|
.price-val {
|
||||||
font-size: 1.5rem;
|
font-size: 1.375rem;
|
||||||
font-weight: 900;
|
font-weight: 900;
|
||||||
color: var(--active-color);
|
color: var(--active-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (min-width: 480px) {
|
||||||
|
.price-val {
|
||||||
|
font-size: 1.5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.view-details-btn {
|
.view-details-btn {
|
||||||
width: 44px;
|
width: 40px;
|
||||||
height: 44px;
|
height: 40px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background: var(--bg-secondary);
|
background: var(--bg-secondary);
|
||||||
border: 1px solid var(--border-color);
|
border: 1px solid var(--border-color);
|
||||||
@ -373,17 +435,11 @@ onUnmounted(() => {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.25s ease;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.shuttle-card-premium:hover .view-details-btn {
|
/* STATES */
|
||||||
background: var(--active-color);
|
|
||||||
color: #101820;
|
|
||||||
border-color: var(--active-color);
|
|
||||||
transform: rotate(-45deg);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ESTADOS */
|
|
||||||
.state-container {
|
.state-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@ -393,15 +449,12 @@ onUnmounted(() => {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.spin {
|
.state-icon {
|
||||||
animation: spin 1s infinite linear;
|
|
||||||
font-size: 3rem;
|
font-size: 3rem;
|
||||||
color: var(--active-color);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes spin {
|
.state-icon--error {
|
||||||
from { transform: rotate(0deg); }
|
color: #ef4444;
|
||||||
to { transform: rotate(360deg); }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.retry-btn {
|
.retry-btn {
|
||||||
@ -415,21 +468,62 @@ onUnmounted(() => {
|
|||||||
border-radius: 99px;
|
border-radius: 99px;
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.3s ease;
|
transition: transform 0.15s ease;
|
||||||
|
min-height: 44px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.retry-btn:active {
|
||||||
|
transform: scale(0.97);
|
||||||
}
|
}
|
||||||
|
|
||||||
.empty-state {
|
.empty-state {
|
||||||
grid-column-start: 1;
|
grid-column: 1 / -1;
|
||||||
grid-column-end: -1;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 4rem 2rem;
|
padding: 3.5rem 2rem;
|
||||||
color: var(--text-secondary);
|
color: var(--text-secondary);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
gap: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.empty-state .material-icons {
|
.empty-icon {
|
||||||
font-size: 4rem;
|
font-size: 3.5rem;
|
||||||
margin-bottom: 1rem;
|
opacity: 0.4;
|
||||||
opacity: 0.5;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.empty-title {
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: 600;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clear-filters-btn {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.5rem;
|
||||||
|
padding: 0.625rem 1.25rem;
|
||||||
|
background: var(--bg-secondary);
|
||||||
|
border: 1.5px solid var(--border-color);
|
||||||
|
border-radius: 99px;
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 0.875rem;
|
||||||
|
color: var(--text-primary);
|
||||||
|
cursor: pointer;
|
||||||
|
transition: border-color 0.18s ease;
|
||||||
|
min-height: 44px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clear-filters-btn:hover {
|
||||||
|
border-color: var(--active-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-reduced-motion: reduce) {
|
||||||
|
.shuttle-card,
|
||||||
|
.view-details-btn,
|
||||||
|
.retry-btn,
|
||||||
|
.clear-filters-btn {
|
||||||
|
transition: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
||||||
"types": ["vite/client", "google.maps"],
|
"types": ["vite/client", "google.maps", "vite-plugin-pwa/client"],
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": ["./src/*"]
|
"@/*": ["./src/*"]
|
||||||
@ -14,7 +14,7 @@
|
|||||||
"noUnusedParameters": true,
|
"noUnusedParameters": true,
|
||||||
"erasableSyntaxOnly": true,
|
"erasableSyntaxOnly": true,
|
||||||
"noFallthroughCasesInSwitch": true,
|
"noFallthroughCasesInSwitch": true,
|
||||||
"noUncheckedSideEffectImports": true
|
"noUncheckedSideEffectImports": false
|
||||||
},
|
},
|
||||||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"]
|
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user