Compare commits

...

10 Commits

Author SHA1 Message Date
0d95850529 feat: redesign admin panel with modern UI and usability improvements
Some checks failed
Deploy to Coolify / Quality Assurance (push) Failing after 17s
Deploy to Coolify / Deploy to Coolify (push) Has been skipped
- Redesign AdminPanel.vue with color-coded section navigation cards
- Create AdminPageHeader.vue shared component with back-nav and action slot
- Redesign AdminDrivers.vue with modern taxi cards and bottom-sheet modal
- Redesign AdminReports.vue with stats summary and color-coded report cards

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 18:19:36 -05:00
dc007b24ce refactor: replace chip filters with compact dropdown menus in transport section
Filters now occupy a single compact row instead of multiple chip rows,
giving more vertical space to taxi and shuttle cards.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 17:59:40 -05:00
5c1b62f55a 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>
2026-04-04 17:48:23 -05:00
fefaf30f38 fix: correct syntax error in SchedulesView.vue 2026-03-31 18:35:24 -05:00
a60b079d94 fix: prevent Google Translate from breaking Material Icons and fix lang attribute 2026-03-31 18:29:55 -05:00
a9b906099e fix: always include most recent past bus regardless of upcoming count 2026-03-29 09:11:47 -05:00
81e6046357 fix: extend past bus window to 90min and compact card layout 2026-03-29 07:45:31 -05:00
f0cbfe8ae7 feat: show past bus in ETACard and move disclaimer to tooltip 2026-03-28 14:33:07 -05:00
269691c900 Refactor(transporte): remover íconos de filtros y hacerlos más compactos lado a lado 2026-03-22 10:38:53 -05:00
7f5efdacfa Fix: Dimensiones de aspecto y márgenes corregidos en AppImage 2026-03-21 17:56:44 -05:00
51 changed files with 3300 additions and 1976 deletions

View File

@ -0,0 +1,7 @@
{
"permissions": {
"allow": [
"Bash(find /c/Users/2002s/Documents/sibu2.0 -name .cursorrules -o -name *.mdc)"
]
}
}

132
CLAUDE.md Normal file
View File

@ -0,0 +1,132 @@
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Project Overview
SIBU (Sistema de Transporte) is a PWA for public transportation in Panama. It has two main parts:
- **Backend**: FastAPI + SQLModel + PostgreSQL (in `backend/`), managed with `uv`
- **Frontend**: Vue 3 + Vite + TypeScript + Tailwind CSS (in `frontend/`), managed with `bun`
The frontend uses **Supabase** for auth and real-time data, while the backend provides the REST API. Both can be used together or independently.
---
## Commands
### Development
```bash
make dev # Run both backend + frontend concurrently
make dev-backend # Backend only → http://localhost:8000
make dev-frontend # Frontend only → http://localhost:5173
```
### Install
```bash
make setup # Install all deps + instructions
make install-backend # uv sync
make install-frontend # bun install
```
### Migrations
```bash
make migrate-up # Apply all pending
make migrate-down # Rollback last
make migrate-create NAME=nombre # Create new migration
make migrate-history # Show history
```
### Lint & Format
```bash
make lint-backend # ruff check --fix
make format-backend # ruff format
make lint-frontend # bun run build (type-check via vue-tsc)
```
### Tests
```bash
make test-backend # uv run pytest
make test-frontend # bun run test
```
### Database utilities
```bash
make seed # Seed initial data
make db-reset # Drop all tables + recreate (asks for confirmation)
make import-coordinates ROUTE="Boquete>David" # Import coords from Supabase
make import-coordinates ALL=true
```
---
## Package Management Rules
- **Backend**: NEVER edit `pyproject.toml` manually — use `uv add <package>`
- **Frontend**: NEVER edit `package.json` manually — use `bun add <package>`
---
## Environment Variables
### Backend (`backend/.env.development`)
```
DATABASE_URL=postgresql+asyncpg://localhost:5432/sibu_dev
ENVIRONMENT=development
DEBUG=true
```
### Frontend (`frontend/.env.development`)
```
VITE_API_URL=http://localhost:8000
VITE_GOOGLE_MAPS_API_KEY=...
VITE_SUPABASE_URL=...
VITE_SUPABASE_ANON_KEY=...
```
---
## Architecture
### Frontend Architecture
**Auth** is handled by Supabase (`src/supabase.ts`). The `useAuthStore` (Pinia) listens to `onAuthStateChange` and only reloads the user profile on `SIGNED_IN` / `INITIAL_SESSION` events — not on `TOKEN_REFRESHED` — to avoid network hangs on mobile wake.
**User roles**: `PASSENGER` (default), `DRIVER`, `PROMOTER`, `ADMIN`. The router (`src/router/index.ts`) enforces role-based access via `meta.requiresAuth` and `meta.role`. Auth check has a 3-second timeout to avoid blocking the UI.
**State**: Pinia stores in `src/stores/` — one per domain (`auth`, `route`, `busStop`, `map`, `shuttle`, `taxi`, `coupon`, `favorites`, `schedule`, `theme`). State is persisted via `pinia-plugin-persistedstate`.
**Services** (`src/services/`) are thin API clients — one per resource. They call the FastAPI backend or Supabase directly.
**Composables** (`src/composables/`) contain map logic: `useGoogleMaps`, `useMapState`, `useDirectionsRoute`, `useETA`, `useParadaCercana`, `useFlujoPrincipal`.
**Routing structure**:
- `/` — Landing
- `/map` — Main Google Maps view
- `/routes`, `/schedules`, `/bus-stop/:id` — Transit info
- `/transporte/viajes-turisticos` — Tourist shuttles (nested layout)
- `/transporte/taxis-locales` — Local taxis
- `/discover`, `/coupons`, `/favorites`, `/profile` — App features
- `/admin`, `/driver`, `/promoter` — Role-protected dashboards
**PWA**: Configured with `vite-plugin-pwa`. Service worker uses `autoUpdate`. API routes (`/api`, `/rest/v1`) are excluded from navigation fallback to prevent blank screens.
**i18n**: `vue-i18n` with `es` and `en` locales in `src/i18n/locales/`.
### Backend Architecture
```
backend/app/
├── api/ # Route handlers (FastAPI routers)
├── core/ # config.py (pydantic-settings), database.py, seed.py
├── models/ # SQLModel table models
├── schemas/ # Pydantic request/response schemas
└── services/ # Business logic layer
```
Config is loaded from `app/core/config.py` using `pydantic-settings`. Database sessions use async SQLAlchemy via `asyncpg`. All API routes use the `/api/` prefix.
### Vue Component Conventions
- Always use `<script setup>` with TypeScript
- Import paths use the `@/` alias for `src/`
- Components are split: `components/` (reusable), `views/` (full screens)
- Map-related components live in `components/map/`

View File

@ -1,5 +1,5 @@
<!doctype html>
<html lang="en">
<html lang="es">
<head>
<meta charset="UTF-8" />

View File

@ -25,7 +25,7 @@
<div class="sib-header-plain">
<div class="user-profile-optimized">
<div class="user-avatar-main">
<span class="material-icons user-icon-accent">person</span>
<span class="material-icons user-icon-accent notranslate" translate="no">person</span>
<div v-if="authStore.isAuthenticated" class="status-dot-active"></div>
</div>
<div class="user-info-text">
@ -39,11 +39,11 @@
<div v-if="authStore.isAdmin || authStore.isDriver || authStore.isPromoter" class="sidebar-group">
<div class="group-label">{{ t('menu.management') }}</div>
<div v-if="authStore.isAdmin" class="sidebar-link" @click="navigateTo('/admin')">
<span class="material-icons">shield_person</span>
<span class="material-icons notranslate" translate="no">shield_person</span>
<span class="link-text">{{ t('menu.adminPanel') }}</span>
</div>
<div v-if="authStore.isDriver && !authStore.isAdmin" class="sidebar-link" @click="navigateTo('/driver')">
<span class="material-icons">minor_crash</span>
<span class="material-icons notranslate" translate="no">minor_crash</span>
<span class="link-text">{{ t('menu.driverPanel') }}</span>
</div>
</div>
@ -51,24 +51,24 @@
<div v-if="!authStore.isAdmin" class="sidebar-group">
<div class="group-label">{{ t('menu.operations') }}</div>
<div class="sidebar-link" @click="navigateTo('/favorites')">
<span class="material-icons">favorite</span>
<span class="material-icons notranslate" translate="no">favorite</span>
<span class="link-text">{{ t('menu.favorites') }}</span>
</div>
<div class="sidebar-link" @click="toggleLanguage">
<span class="material-icons">translate</span>
<span class="material-icons notranslate" translate="no">translate</span>
<span class="link-text">{{ t('menu.translate') }}</span>
</div>
</div>
<div class="sidebar-link theme-toggle-row" @click="themeStore.toggleDarkMode">
<span class="material-icons">{{ themeStore.isDarkMode ? 'light_mode' : 'dark_mode' }}</span>
<span class="material-icons notranslate" translate="no">{{ themeStore.isDarkMode ? 'light_mode' : 'dark_mode' }}</span>
<span class="link-text">{{ themeStore.isDarkMode ? t('menu.lightMode') : t('menu.darkMode') }}</span>
</div>
<div v-if="!authStore.isAdmin" class="sidebar-group">
<div class="group-label">{{ t('menu.support') }}</div>
<div class="sidebar-link report-link-solid" @click="openReportModal">
<span class="material-icons">report_problem</span>
<span class="material-icons notranslate" translate="no">report_problem</span>
<span class="link-text">{{ t('menu.sendReport') }}</span>
</div>
</div>
@ -76,10 +76,10 @@
<div class="sidebar-footer-fixed">
<button v-if="!authStore.isAuthenticated" class="session-btn login-solid" @click="navigateTo('/login')">
<span class="material-icons">login</span> {{ t('menu.login') }}
<span class="material-icons notranslate" translate="no">login</span> {{ t('menu.login') }}
</button>
<button v-else class="session-btn logout-solid" @click="handleLogout">
<span class="material-icons">logout</span> {{ t('menu.logout') }}
<span class="material-icons notranslate" translate="no">logout</span> {{ t('menu.logout') }}
</button>
<div class="sib-tag-footer">SIB SYSTEM v1.2.0</div>
</div>

View File

@ -44,7 +44,7 @@ function handleLoad() {
isLoaded.value = true
}
function handleError(e: Event) {
function handleError(_e: Event) {
isError.value = true
isLoaded.value = true
}
@ -54,10 +54,12 @@ function handleError(e: Event) {
.app-image-wrapper {
position: relative;
overflow: hidden;
display: inline-flex;
display: flex;
justify-content: center;
align-items: center;
background-color: transparent;
width: 100%;
height: 100%;
}
.app-image-wrapper.is-loading {
background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);

View File

@ -78,7 +78,7 @@ onUnmounted(() => {
:class="{ active: isActive(item.path) }"
@click.stop="navigateTo(item.path)"
>
<span class="material-icons">{{ item.icon }}</span>
<span class="material-icons notranslate" translate="no">{{ item.icon }}</span>
<span class="nav-label">{{ t('navigation.' + item.name) }}</span>
</div>
</nav>

View File

@ -35,7 +35,7 @@
Lat: {{ formData.latitude.toFixed(6) }}, Lon: {{ formData.longitude.toFixed(6) }}
</div>
<button @click="getCurrentLocation" class="gps-button" :disabled="isLoadingGps">
<span class="material-icons">my_location</span>
<span class="material-icons notranslate" translate="no">my_location</span>
{{ isLoadingGps ? 'Localizando...' : 'Usar GPS Preciso' }}
</button>
</div>

View File

@ -90,27 +90,27 @@ watch(() => props.isOpen, async (isOpen) => {
/>
</div>
<p v-if="busStop.address" class="stop-address">
<span class="material-icons text-sm">location_on</span>
<span class="material-icons text-sm notranslate" translate="no">location_on</span>
{{ busStop.address }}
</p>
</div>
<button class="close-btn" @click="emit('close')">
<span class="material-icons">close</span>
<span class="material-icons notranslate" translate="no">close</span>
</button>
</div>
<!-- Amenities Chips -->
<div v-if="busStop" class="amenities-container">
<div v-if="busStop.has_shelter" class="amenity-chip" title="Shelter available">
<span class="material-icons md-16">roofing</span>
<span class="material-icons md-16 notranslate" translate="no">roofing</span>
<span>Cubierta</span>
</div>
<div v-if="busStop.has_seating" class="amenity-chip" title="Seating available">
<span class="material-icons md-16">event_seat</span>
<span class="material-icons md-16 notranslate" translate="no">event_seat</span>
<span>Asientos</span>
</div>
<div v-if="busStop.is_accessible" class="amenity-chip" title="Wheelchair accessible">
<span class="material-icons md-16">accessible</span>
<span class="material-icons md-16 notranslate" translate="no">accessible</span>
<span>Accesible</span>
</div>
</div>
@ -121,13 +121,13 @@ watch(() => props.isOpen, async (isOpen) => {
<div class="arrivals-header">
<h4 class="section-title">Próximos Buses</h4>
<div v-if="!isLoading" class="gps-badge" :class="hasGps ? 'gps-on' : 'gps-off'">
<span class="material-icons md-16">{{ hasGps ? 'gps_fixed' : 'gps_off' }}</span>
<span class="material-icons md-16 notranslate" translate="no">{{ hasGps ? 'gps_fixed' : 'gps_off' }}</span>
<span>{{ hasGps ? 'Tiempo real' : 'Horario' }}</span>
</div>
</div>
<div v-if="isLoading" class="loading-state">
<span class="material-icons spin">refresh</span>
<span class="material-icons spin notranslate" translate="no">refresh</span>
<p>Obteniendo horarios...</p>
</div>
@ -139,7 +139,7 @@ watch(() => props.isOpen, async (isOpen) => {
:style="{ animationDelay: `${index * 0.07}s` }"
>
<div class="route-info">
<span class="material-icons bus-icon">directions_bus</span>
<span class="material-icons bus-icon notranslate" translate="no">directions_bus</span>
<div class="route-texts">
<span class="route-name">{{ arrival.routeName }}</span>
<span class="departure-hint">Sale: {{ formatTo12Hour(arrival.departureTime) }}</span>
@ -162,7 +162,7 @@ watch(() => props.isOpen, async (isOpen) => {
</div>
<div v-else class="empty-state">
<span class="material-icons">schedule</span>
<span class="material-icons notranslate" translate="no">schedule</span>
<p>Sin servicio disponible en este momento</p>
<span class="empty-hint">Prueba más tarde o revisa el horario completo</span>
</div>
@ -171,11 +171,11 @@ watch(() => props.isOpen, async (isOpen) => {
<!-- Footer / Actions -->
<div class="modal-footer">
<button class="action-btn secondary" @click="startInternalNavigation">
<span class="material-icons md-18">navigation</span>
<span class="material-icons md-18 notranslate" translate="no">navigation</span>
Cómo llegar
</button>
<button class="action-btn primary" @click="loadArrivals">
<span class="material-icons md-18">refresh</span>
<span class="material-icons md-18 notranslate" translate="no">refresh</span>
Actualizar
</button>
</div>

View File

@ -5,7 +5,7 @@
@click.stop="handleToggle"
:title="isFavorited ? 'Quitar de favoritos' : 'Agregar a favoritos'"
>
<span class="material-icons heart-icon">
<span class="material-icons heart-icon notranslate" translate="no">
{{ isFavorited ? 'favorite' : 'favorite_border' }}
</span>
</button>

View File

@ -4,11 +4,11 @@
<div class="modal-container glass-effect">
<div class="modal-header">
<div class="title-with-icon">
<span class="material-icons report-icon">report_problem</span>
<span class="material-icons report-icon notranslate" translate="no">report_problem</span>
<h2>{{ t('report.title') }}</h2>
</div>
<button class="close-btn" @click="close">
<span class="material-icons">close</span>
<span class="material-icons notranslate" translate="no">close</span>
</button>
</div>

View File

@ -0,0 +1,112 @@
<script setup lang="ts">
import { useRouter } from 'vue-router'
const props = defineProps<{
title: string
subtitle?: string
backTo?: string
}>()
const router = useRouter()
function goBack() {
router.push(props.backTo ?? '/admin')
}
</script>
<template>
<header class="page-header">
<button class="back-btn" @click="goBack" aria-label="Volver al panel">
<span class="material-icons notranslate" translate="no" aria-hidden="true">arrow_back</span>
<span class="back-label">Panel</span>
</button>
<div class="header-content">
<h1 class="header-title">{{ title }}</h1>
<p v-if="subtitle" class="header-sub">{{ subtitle }}</p>
</div>
<div class="header-actions">
<slot />
</div>
</header>
</template>
<style scoped>
.page-header {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 1rem 1rem 1.25rem;
border-bottom: 1px solid var(--border-color);
margin-bottom: 1.5rem;
flex-wrap: wrap;
}
.back-btn {
display: inline-flex;
align-items: center;
gap: 0.375rem;
padding: 0.5rem 0.875rem 0.5rem 0.625rem;
background: var(--bg-secondary);
border: 1px solid var(--border-color);
border-radius: 99px;
color: var(--text-secondary);
font-size: 0.8125rem;
font-weight: 700;
cursor: pointer;
transition: border-color 0.15s ease, color 0.15s ease;
flex-shrink: 0;
min-height: 36px;
}
.back-btn:focus-visible {
outline: 2px solid var(--active-color);
outline-offset: 2px;
}
@media (hover: hover) {
.back-btn:hover {
border-color: var(--active-color);
color: var(--text-primary);
}
}
.back-btn .material-icons {
font-size: 1rem;
}
.header-content {
flex: 1;
min-width: 0;
}
.header-title {
font-size: clamp(1.25rem, 4vw, 1.75rem);
font-weight: 900;
color: var(--text-primary);
letter-spacing: -0.03em;
margin: 0;
line-height: 1.2;
}
.header-sub {
font-size: 0.8125rem;
color: var(--text-secondary);
font-weight: 500;
margin: 0.125rem 0 0;
}
.header-actions {
display: flex;
align-items: center;
gap: 0.5rem;
flex-shrink: 0;
}
@media (prefers-reduced-motion: reduce) {
.back-btn {
transition: none;
}
}
</style>

View File

@ -58,7 +58,7 @@ const handleLogin = async () => {
<div class="field-container">
<label>{{ t('auth.emailLabel') }}</label>
<div class="input-inner">
<span class="material-icons i-icon">mail_outline</span>
<span class="material-icons i-icon notranslate" translate="no">mail_outline</span>
<input
v-model="email"
type="email"
@ -73,7 +73,7 @@ const handleLogin = async () => {
<label>{{ t('auth.passLabel') }}</label>
</div>
<div class="input-inner">
<span class="material-icons i-icon">lock_outline</span>
<span class="material-icons i-icon notranslate" translate="no">lock_outline</span>
<input
v-model="password"
:type="showPassword ? 'text' : 'password'"
@ -81,7 +81,7 @@ const handleLogin = async () => {
required
/>
<button type="button" class="eye-btn" @click="showPassword = !showPassword">
<span class="material-icons">{{ showPassword ? 'visibility_off' : 'visibility' }}</span>
<span class="material-icons notranslate" translate="no">{{ showPassword ? 'visibility_off' : 'visibility' }}</span>
</button>
</div>
</div>
@ -98,7 +98,7 @@ const handleLogin = async () => {
<!-- Error UI -->
<Transition name="shake">
<div v-if="errorMessage" class="error-toast">
<span class="material-icons">warning_amber</span>
<span class="material-icons notranslate" translate="no">warning_amber</span>
<span>{{ errorMessage }}</span>
</div>
</Transition>
@ -106,7 +106,7 @@ const handleLogin = async () => {
<button type="submit" class="submit-action" :disabled="isLoading">
<span v-if="isLoading" class="loader-white"></span>
<span v-else>{{ t('auth.loginTab') }}</span>
<span v-if="!isLoading" class="material-icons">arrow_forward</span>
<span v-if="!isLoading" class="material-icons notranslate" translate="no">arrow_forward</span>
</button>
<div class="switch-footer">

View File

@ -58,7 +58,7 @@ const handleRegister = async () => {
<div class="register-form-content">
<div v-if="isSuccess" class="success-wrap">
<div class="glow-circle">
<span class="material-icons">check_circle</span>
<span class="material-icons notranslate" translate="no">check_circle</span>
</div>
<h2>¡Bienvenido!</h2>
<p>Tu cuenta ha sido creada exitosamente.</p>
@ -77,7 +77,7 @@ const handleRegister = async () => {
<div class="field-container">
<label>{{ t('auth.fullNameLabel') }}</label>
<div class="input-inner">
<span class="material-icons i-icon">badge</span>
<span class="material-icons i-icon notranslate" translate="no">badge</span>
<input
v-model="fullName"
type="text"
@ -90,7 +90,7 @@ const handleRegister = async () => {
<div class="field-container">
<label>{{ t('auth.emailLabel') }}</label>
<div class="input-inner">
<span class="material-icons i-icon">mail_outline</span>
<span class="material-icons i-icon notranslate" translate="no">mail_outline</span>
<input
v-model="email"
type="email"
@ -103,7 +103,7 @@ const handleRegister = async () => {
<div class="field-container">
<label>{{ t('auth.passLabel') }}</label>
<div class="input-inner">
<span class="material-icons i-icon">lock_outline</span>
<span class="material-icons i-icon notranslate" translate="no">lock_outline</span>
<input
v-model="password"
:type="showPassword ? 'text' : 'password'"
@ -112,7 +112,7 @@ const handleRegister = async () => {
minlength="8"
/>
<button type="button" class="eye-btn" @click="showPassword = !showPassword">
<span class="material-icons">{{ showPassword ? 'visibility_off' : 'visibility' }}</span>
<span class="material-icons notranslate" translate="no">{{ showPassword ? 'visibility_off' : 'visibility' }}</span>
</button>
</div>
</div>
@ -129,7 +129,7 @@ const handleRegister = async () => {
<!-- Error UI -->
<Transition name="shake">
<div v-if="errorMessage" class="error-toast">
<span class="material-icons">warning_amber</span>
<span class="material-icons notranslate" translate="no">warning_amber</span>
<span>{{ errorMessage }}</span>
</div>
</Transition>
@ -137,7 +137,7 @@ const handleRegister = async () => {
<button type="submit" class="submit-action" :disabled="isLoading">
<span v-if="isLoading" class="loader-white"></span>
<span v-else>{{ t('auth.registerTab') }}</span>
<span v-if="!isLoading" class="material-icons">person_add_alt</span>
<span v-if="!isLoading" class="material-icons notranslate" translate="no">person_add_alt</span>
</button>
<div class="switch-footer">

View File

@ -48,7 +48,7 @@ function goToLogin() {
>
<div class="auth-card glass-effect">
<div class="auth-icon-circle">
<span class="material-icons">lock</span>
<span class="material-icons notranslate" translate="no">lock</span>
</div>
<h3 class="auth-title">{{ props.title }}</h3>
@ -56,7 +56,7 @@ function goToLogin() {
<div class="auth-actions">
<button class="primary-btn" @click="goToRegister">
<span class="material-icons">person_add</span>
<span class="material-icons notranslate" translate="no">person_add</span>
{{ props.actionLabel }}
</button>
<button class="secondary-btn" @click="goToLogin">

View File

@ -17,7 +17,7 @@ defineProps({
<div class="loading-branded-container">
<div class="loading-pulse-ring">
<div class="loading-icon-wrap">
<span class="material-icons loading-icon">{{ icon }}</span>
<span class="material-icons loading-icon notranslate" translate="no">{{ icon }}</span>
</div>
</div>
<div class="loading-text-wrap">

View File

@ -8,7 +8,7 @@ defineProps<{
<div class="offers-container" :class="{ 'is-close': isClose }">
<div class="loader">
<div class="box">
<span class="material-icons offer-icon">{{ isClose ? 'close' : 'local_offer' }}</span>
<span class="material-icons offer-icon notranslate" translate="no">{{ isClose ? 'close' : 'local_offer' }}</span>
</div>
<!-- Anillos de energía flotantes -->
<div class="energy-ring"></div>

View File

@ -6,7 +6,7 @@
@click="$emit('click')"
>
<div class="banner-icon-bg">
<span class="material-icons text-white text-[16px]">directions_bus</span>
<span class="material-icons text-white text-[16px] notranslate" translate="no">directions_bus</span>
</div>
<div class="flex flex-col flex-1 truncate ml-2" style="min-width: 0;">
@ -32,7 +32,7 @@
@click.stop="$emit('close')"
class="ml-2 shrink-0 flex items-center gap-1 px-2.5 py-1 rounded-full bg-red-50 dark:bg-red-900/30 text-red-500 dark:text-red-400 text-[11px] font-bold hover:bg-red-100 dark:hover:bg-red-900/50 transition-colors"
>
<span class="material-icons" style="font-size:14px">close</span>
<span class="material-icons notranslate" style="font-size:14px" translate="no">close</span>
Cerrar ruta
</button>
</div>

View File

@ -7,7 +7,7 @@
<!-- Bottom Sheet container -->
<div
ref="sheetRef"
class="relative bg-white dark:bg-gray-900 rounded-t-3xl shadow-2xl p-5 transform flex flex-col gap-4 max-h-[85vh] overflow-y-auto"
class="relative bg-white dark:bg-gray-900 rounded-t-3xl shadow-2xl p-5 transform flex flex-col gap-4 max-h-[92vh] overflow-y-auto"
:style="{
transform: `translateY(${dragY}px)`,
transition: isDragging ? 'none' : 'transform 0.3s ease-out'
@ -27,10 +27,41 @@
Desliza hacia abajo para minimizar
</p>
<!-- Tooltip informativo en la esquina superior derecha -->
<div class="absolute top-4 right-5 z-20">
<button
@click="showTooltip = !showTooltip"
class="flex items-center justify-center w-8 h-8 rounded-full bg-gray-100 dark:bg-gray-800 text-gray-500 hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors"
>
<span class="material-icons text-xl notranslate" translate="no">info</span>
</button>
<!-- Contenido del Tooltip -->
<Transition name="fade">
<div
v-if="showTooltip"
class="absolute top-10 right-0 w-64 p-4 bg-gray-900/95 dark:bg-white/95 text-white dark:text-gray-900 rounded-2xl shadow-2xl backdrop-blur-sm text-[11px] leading-relaxed border border-white/20 dark:border-gray-200 pointer-events-auto"
>
<div class="flex items-start gap-2 mb-2">
<span class="material-icons text-yellow-400 text-sm notranslate" translate="no">warning</span>
<span class="font-bold uppercase tracking-wider text-[10px]">Información de horarios</span>
</div>
<p class="opacity-90">
Este es un tiempo estimado basado en la velocidad promedio. <strong>No existe rastreo GPS en tiempo real.</strong>
</p>
<p class="mt-2 opacity-90">
El tráfico y paradas intermedias pueden alterar el tiempo de llegada dramáticamente.
</p>
<!-- Flecha del tooltip -->
<div class="absolute -top-1.5 right-3.5 w-3 h-3 bg-gray-900/95 dark:bg-white/95 rotate-45 border-l border-t border-white/20 dark:border-gray-200"></div>
</div>
</Transition>
</div>
<!-- Cabecera de la parada -->
<div v-if="stopName && !isLoading" class="mt-4 flex items-start gap-4 pb-4 border-b border-gray-100 dark:border-gray-800">
<div class="bg-blue-100 dark:bg-blue-900/40 p-3 rounded-2xl flex-shrink-0">
<span class="material-icons text-blue-600 dark:text-blue-400 text-3xl">place</span>
<span class="material-icons text-blue-600 dark:text-blue-400 text-3xl notranslate" translate="no">place</span>
</div>
<div class="flex-1">
<h3 class="text-sm font-bold text-gray-500 dark:text-gray-400 uppercase tracking-wider mb-1">Tu parada asignada</h3>
@ -38,7 +69,7 @@
{{ stopName }}
</h2>
<div class="flex items-center gap-2 mt-2 text-sm text-gray-600 dark:text-gray-300 font-medium">
<span class="material-icons text-sm text-gray-400">directions_walk</span>
<span class="material-icons text-sm text-gray-400 notranslate" translate="no">directions_walk</span>
A {{ Math.round(walkDuration / 60) }} min caminando
<span class="text-gray-300 dark:text-gray-600"></span>
{{ Math.round(walkDistance) }} metros
@ -47,7 +78,7 @@
</div>
<!-- Contenido de buses -->
<div class="flex flex-col gap-3 py-2">
<div class="flex flex-col gap-2 py-1">
<!-- Estado de carga -->
<div v-if="isLoading" class="flex flex-col items-center justify-center py-8">
<div class="w-10 h-10 border-4 border-blue-500 border-t-transparent rounded-full animate-spin"></div>
@ -58,69 +89,77 @@
<!-- Sin servicio -->
<div v-else-if="buses.length === 0" class="p-6 text-center">
<span class="material-icons text-4xl text-gray-300 mb-2">event_busy</span>
<span class="material-icons text-4xl text-gray-300 mb-2 notranslate" translate="no">event_busy</span>
<p class="text-gray-500 dark:text-gray-400 font-medium italic">
{{ t('schedules.noSchedules') }}
</p>
</div>
<!-- Lista de llegadas (Max 2) -->
<!-- Lista de llegadas (Próximos + Pasado) -->
<template v-else>
<div
v-for="(bus, index) in buses.slice(0, 2)"
v-for="bus in displayBuses"
:key="bus.horario_id"
class="group bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-2xl p-4 flex items-center justify-between"
:class="{ 'ring-2 ring-green-500/50 dark:ring-green-400/50 bg-green-50/30 dark:bg-green-900/10': bus.estado === 'en_camino' }"
class="group bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-2xl p-3 flex items-center justify-between transition-all"
:class="{
'ring-2 ring-green-500/50 dark:ring-green-400/50 bg-green-50/30 dark:bg-green-900/10': bus.estado === 'en_camino',
'opacity-55 grayscale': bus.estado === 'pasó'
}"
>
<div class="flex items-center gap-4">
<div class="flex items-center gap-3">
<!-- Icono dinámico según estado -->
<div
class="w-12 h-12 rounded-full flex items-center justify-center text-white shrink-0"
class="w-10 h-10 rounded-full flex items-center justify-center text-white shrink-0"
:class="{
'bg-green-500': bus.estado === 'en_camino',
'bg-blue-500': bus.estado === 'próximo',
'bg-gray-400 dark:bg-gray-600': bus.estado === 'pasó'
}"
>
<span class="material-icons">{{ bus.estado === 'pasó' ? 'history' : 'directions_bus' }}</span>
<span class="material-icons text-[20px] notranslate" translate="no">{{ bus.estado === 'pasó' ? 'history' : 'directions_bus' }}</span>
</div>
<div class="flex flex-col">
<span class="text-sm font-bold text-gray-900 dark:text-white line-clamp-1">
{{ index === 0 ? 'Bus más cercano' : 'Siguiente bus' }}
<span class="text-xs font-bold text-gray-900 dark:text-white line-clamp-1">
{{ bus.label }}
</span>
<div class="flex flex-col mt-0.5 gap-0.5">
<span class="text-xs font-semibold text-gray-500 dark:text-gray-400 flex items-center gap-1">
<span class="material-icons" style="font-size: 14px">schedule</span>
{{ (bus.estado === 'en_camino' || bus.estado === 'pasó') ? 'Salió a las' : 'Sale a las' }} {{ bus.hora_salida }}
<div class="flex flex-col gap-0">
<span class="text-[11px] font-semibold text-gray-500 dark:text-gray-400 flex items-center gap-1">
<span class="material-icons notranslate" style="font-size: 12px" translate="no">schedule</span>
{{ (bus.estado === 'en_camino' || bus.estado === 'pasó') ? 'Salió' : 'Sale' }} {{ bus.hora_salida }}
</span>
<span class="text-[11px] font-medium text-gray-500 dark:text-gray-400 pl-4">
<span v-if="bus.estado === 'pasó'">Pasó por tu parada a las</span>
<span v-else>Llega a tu parada ~</span>
<span class="text-[10px] font-medium text-gray-500 dark:text-gray-400 pl-4">
<span v-if="bus.estado === 'pasó'">Pasó ~</span>
<span v-else>Llega ~</span>
{{ bus.horaLlegadaParada }}
</span>
</div>
</div>
</div>
<div class="flex flex-col items-end text-right shrink-0 ml-4">
<!-- ETA gigante -->
<div v-if="bus.estado !== 'pasó'" class="text-2xl font-black text-gray-900 dark:text-white flex items-baseline gap-1" :class="{ 'text-green-600 dark:text-green-400': bus.estado === 'en_camino' }">
<div class="flex flex-col items-end text-right shrink-0 ml-2">
<!-- ETA -->
<div v-if="bus.estado !== 'pasó'" class="text-xl font-black text-gray-900 dark:text-white flex items-baseline gap-0.5" :class="{ 'text-green-600 dark:text-green-400': bus.estado === 'en_camino' }">
<span>~{{ formatDurationMinutes(bus.etaMinutos) }}</span>
<span class="text-sm font-bold text-gray-500 dark:text-gray-400">min</span>
<span class="text-xs font-bold text-gray-500 dark:text-gray-400">min</span>
</div>
<!-- Para pasó: mostrar cuántos minutos hace -->
<div v-else class="text-xl font-black text-gray-400 dark:text-gray-500 flex items-baseline gap-0.5">
<span>{{ Math.abs(bus.etaMinutos) }}</span>
<span class="text-xs font-bold text-gray-400 dark:text-gray-500">min</span>
</div>
<!-- Badges de estado -->
<div class="mt-1">
<span v-if="bus.estado === 'en_camino'" class="inline-flex items-center gap-1.5 px-2.5 py-1 rounded-lg bg-green-100 dark:bg-green-900/40 text-green-700 dark:text-green-400 text-[10px] font-black uppercase tracking-wider">
<div class="mt-0.5">
<span v-if="bus.estado === 'en_camino'" class="inline-flex items-center gap-1 px-2 py-0.5 rounded-lg bg-green-100 dark:bg-green-900/40 text-green-700 dark:text-green-400 text-[9px] font-black uppercase tracking-wider">
<span class="w-1.5 h-1.5 bg-green-500 rounded-full animate-ping"></span>
En Vía
</span>
<span v-else-if="bus.estado === 'próximo'" class="inline-flex px-2.5 py-1 rounded-lg bg-blue-100 dark:bg-blue-900/40 text-blue-700 dark:text-blue-400 text-[10px] font-black uppercase tracking-wider">
<span v-else-if="bus.estado === 'próximo'" class="inline-flex px-2 py-0.5 rounded-lg bg-blue-100 dark:bg-blue-900/40 text-blue-700 dark:text-blue-400 text-[9px] font-black uppercase tracking-wider">
Programado
</span>
<span v-else class="inline-flex px-2.5 py-1 rounded-lg bg-gray-100 dark:bg-gray-800 text-gray-500 dark:text-gray-400 text-[10px] font-black uppercase tracking-wider line-through">
Ya pasó
<span v-else class="inline-flex px-2 py-0.5 rounded-lg bg-gray-100 dark:bg-gray-800 text-gray-400 dark:text-gray-500 text-[9px] font-black uppercase tracking-wider">
Hace poco
</span>
</div>
</div>
@ -128,28 +167,21 @@
</template>
</div>
<!-- Legal Disclaimer Intocable -->
<div v-if="stopName" class="mt-2 p-3 bg-yellow-50 dark:bg-yellow-900/20 rounded-xl flex items-start gap-3 border border-yellow-100 dark:border-yellow-900/50">
<span class="material-icons text-yellow-600 dark:text-yellow-500 text-lg mt-0.5 shrink-0">info</span>
<p class="text-[11px] leading-snug text-yellow-800 dark:text-yellow-600/90 font-medium">
<strong>Aviso:</strong> Este es un tiempo estimado basado en la velocidad promedio de las unidades en la ciudad. No existe rastreo GPS en tiempo real.
El tráfico y paradas intermedias pueden alterar el tiempo de llegada dramáticamente.
</p>
</div>
<!-- Disclaimer removed from bottom and moved to tooltip bubble -->
</div>
</div>
</Transition>
</template>
<script setup lang="ts">
import { ref, onMounted, onUnmounted } from 'vue';
import { ref, computed, onMounted, onUnmounted } from 'vue';
import { useI18n } from 'vue-i18n';
import type { BusETA } from '@/composables/useETA';
import { formatDurationMinutes } from '@/utils/durationFormatter';
const { t } = useI18n();
defineProps<{
const props = defineProps<{
isOpen: boolean;
stopName: string;
walkDistance: number;
@ -163,6 +195,27 @@ const emit = defineEmits<{
(e: 'refresh'): void;
}>();
// Tooltip state
const showTooltip = ref(false);
// Categorización de buses
const upcomingBuses = computed(() => props.buses.filter(b => b.estado !== 'pasó'));
const lastPastBus = computed(() => {
const pastBuses = props.buses.filter(b => b.estado === 'pasó');
// useETA ordena pasó descendente (más reciente primero), tomamos [0]
return pastBuses.length > 0 ? pastBuses[0] : null;
});
const displayBuses = computed(() => {
const result = [];
// Agregamos los dos próximos
if (upcomingBuses.value[0]) result.push({ ...upcomingBuses.value[0], label: 'Bus más cercano' });
if (upcomingBuses.value[1]) result.push({ ...upcomingBuses.value[1], label: 'Siguiente bus' });
// Agregamos el que ya pasó
if (lastPastBus.value) result.push({ ...lastPastBus.value, label: 'Bus anterior' });
return result;
});
// ── DRAG TO DISMISS ──────────────────────────────────
const sheetRef = ref<HTMLElement | null>(null);
const dragY = ref(0); // desplazamiento actual del drag
@ -244,4 +297,16 @@ onUnmounted(() => {
.fixed.inset-0 {
transition: opacity 0.4s ease;
}
/* Transición para el Tooltip */
.fade-enter-active,
.fade-leave-active {
transition: all 0.2s ease-out;
}
.fade-enter-from,
.fade-leave-to {
opacity: 0;
transform: translateY(10px) scale(0.95);
}
</style>

View File

@ -7,7 +7,7 @@
<span class="sheet-title">Actividades </span>
</div>
<button class="sheet-close" @click="$emit('close')">
<span class="material-icons">close</span>
<span class="material-icons notranslate" translate="no">close</span>
</button>
</div>
@ -18,7 +18,7 @@
>
<div class="sheet-card-area">
<button class="sheet-nav" @click="$emit('prev')" :disabled="coupons.length < 2">
<span class="material-icons">chevron_left</span>
<span class="material-icons notranslate" translate="no">chevron_left</span>
</button>
<Transition name="carousel-slide" mode="out-in">
@ -45,7 +45,7 @@
</Transition>
<button class="sheet-nav" @click="$emit('next')" :disabled="coupons.length < 2">
<span class="material-icons">chevron_right</span>
<span class="material-icons notranslate" translate="no">chevron_right</span>
</button>
</div>
</AuthGuard>

View File

@ -9,7 +9,7 @@
@click="$emit('open')"
:title="t('map.search')"
>
<span class="material-icons">search</span>
<span class="material-icons notranslate" translate="no">search</span>
</div>
<!-- Normal Trigger -->
@ -18,7 +18,7 @@
class="uber-search-trigger-compact"
@click="$emit('open')"
>
<span class="material-icons search-icon">directions_bus</span>
<span class="material-icons search-icon notranslate" translate="no">directions_bus</span>
<span class="trigger-label">{{ t('map.viewRoutes') }}</span>
</div>
@ -31,13 +31,13 @@
<div v-if="showPanel" class="uber-search-panel">
<div class="uber-search-header">
<button class="back-btn" @click="$emit('close')">
<span class="material-icons">arrow_back</span>
<span class="material-icons notranslate" translate="no">arrow_back</span>
</button>
<div class="search-title">{{ t('map.availableRoutes') }}</div>
</div>
<!-- Search Input -->
<div class="search-input-wrapper">
<span class="material-icons search-field-icon">search</span>
<span class="material-icons search-field-icon notranslate" translate="no">search</span>
<input
v-model="searchQuery"
type="text"
@ -57,13 +57,13 @@
@click="$emit('select-route', route)"
>
<div class="result-icon">
<span class="material-icons">directions_bus</span>
<span class="material-icons notranslate" translate="no">directions_bus</span>
</div>
<div class="result-content">
<div class="result-name">{{ route.name }}</div>
<div class="result-address">{{ t('map.busRoute') }}</div>
</div>
<span class="material-icons check-icon">
<span class="material-icons check-icon notranslate" translate="no">
{{ route.id === selectedRouteId ? 'check_circle' : 'chevron_right' }}
</span>
</div>

View 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>

View 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>

View 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>

View File

@ -0,0 +1,208 @@
<script setup lang="ts">
import { ref, computed, onMounted, onUnmounted } from 'vue'
const props = defineProps<{
options: { value: string; label: string; icon?: string }[]
modelValue: string
placeholder?: string
}>()
const emit = defineEmits<{ 'update:modelValue': [value: string] }>()
const open = ref(false)
const root = ref<HTMLElement | null>(null)
const selected = computed(() => props.options.find(o => o.value === props.modelValue))
const isFiltered = computed(() => props.modelValue !== props.options[0]?.value)
function select(value: string) {
emit('update:modelValue', value)
open.value = false
}
function onOutsideClick(e: MouseEvent) {
if (root.value && !root.value.contains(e.target as Node)) {
open.value = false
}
}
onMounted(() => document.addEventListener('mousedown', onOutsideClick))
onUnmounted(() => document.removeEventListener('mousedown', onOutsideClick))
</script>
<template>
<div class="filter-select" ref="root">
<button
class="filter-trigger"
:class="{ 'filter-trigger--active': isFiltered, 'filter-trigger--open': open }"
:aria-expanded="open"
aria-haspopup="listbox"
@click="open = !open"
>
<span
v-if="selected?.icon"
class="material-icons notranslate trigger-icon"
translate="no"
aria-hidden="true"
>{{ selected.icon }}</span>
<span class="trigger-label">{{ selected?.label ?? placeholder }}</span>
<span class="material-icons notranslate chevron" translate="no" aria-hidden="true">expand_more</span>
</button>
<Transition name="drop">
<ul v-if="open" class="dropdown" role="listbox">
<li
v-for="opt in options"
:key="opt.value"
class="dropdown-item"
:class="{ 'dropdown-item--selected': modelValue === opt.value }"
role="option"
:aria-selected="modelValue === opt.value"
@mousedown.prevent="select(opt.value)"
>
<span
v-if="opt.icon"
class="material-icons notranslate item-icon"
translate="no"
aria-hidden="true"
>{{ opt.icon }}</span>
{{ opt.label }}
<span
v-if="modelValue === opt.value"
class="material-icons notranslate check-icon"
translate="no"
aria-hidden="true"
>check</span>
</li>
</ul>
</Transition>
</div>
</template>
<style scoped>
.filter-select {
position: relative;
flex-shrink: 0;
}
.filter-trigger {
display: inline-flex;
align-items: center;
gap: 0.25rem;
padding: 0 0.75rem;
height: 38px;
border-radius: 99px;
border: 1.5px solid var(--border-color);
background: var(--bg-secondary);
color: var(--text-secondary);
font-size: 0.8125rem;
font-weight: 700;
cursor: pointer;
white-space: nowrap;
transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.filter-trigger--active {
border-color: var(--active-color);
background: rgba(254, 231, 21, 0.1);
color: var(--text-primary);
}
.filter-trigger--open {
border-color: var(--active-color);
}
.filter-trigger:focus-visible {
outline: 2px solid var(--active-color);
outline-offset: 2px;
}
.trigger-icon {
font-size: 0.9375rem;
color: var(--active-color);
}
.chevron {
font-size: 1rem;
transition: transform 0.2s ease;
}
.filter-trigger--open .chevron {
transform: rotate(180deg);
}
/* Dropdown */
.dropdown {
position: absolute;
top: calc(100% + 6px);
left: 0;
min-width: 160px;
background: var(--card-bg);
border: 1px solid var(--border-color);
border-radius: 1rem;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
list-style: none;
margin: 0;
padding: 0.375rem;
z-index: 50;
overflow: hidden;
}
.dropdown-item {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.625rem 0.75rem;
border-radius: 0.625rem;
font-size: 0.875rem;
font-weight: 600;
color: var(--text-secondary);
cursor: pointer;
transition: background 0.12s ease, color 0.12s ease;
}
.dropdown-item:hover {
background: var(--bg-secondary);
color: var(--text-primary);
}
.dropdown-item--selected {
color: var(--text-primary);
font-weight: 700;
}
.item-icon {
font-size: 1rem;
color: var(--active-color);
flex-shrink: 0;
}
.check-icon {
font-size: 1rem;
color: var(--active-color);
margin-left: auto;
}
/* Transition */
.drop-enter-active,
.drop-leave-active {
transition: opacity 0.15s ease, transform 0.15s ease;
}
.drop-enter-from,
.drop-leave-to {
opacity: 0;
transform: translateY(-6px);
}
@media (prefers-reduced-motion: reduce) {
.filter-trigger,
.chevron,
.dropdown-item {
transition: none;
}
.drop-enter-active,
.drop-leave-active {
transition: none;
}
}
</style>

View File

@ -153,13 +153,15 @@ export function useETA() {
if (etaMinutos > 5) {
estado = busYaSalio ? 'en_camino' : 'próximo';
} else {
} else if (etaMinutos >= 0) {
estado = 'en_camino';
} else {
estado = 'pasó';
}
// Filtrar buses que ya pasaron (ETA < 0)
// Solo mostramos buses a los que el usuario tiene posibilidad de llegar
if (etaMinutos < 0) continue;
// Conservar buses que pasaron en la última hora y media
// para que el usuario siempre vea el bus anterior
if (etaMinutos < -90) continue;
resultados.push({
horario_id: h.id,
@ -170,13 +172,20 @@ export function useETA() {
});
}
resultados.sort((a, b) => {
const prioridad = { 'en_camino': 0, 'próximo': 1, 'pasó': 2 };
if (prioridad[a.estado] !== prioridad[b.estado]) return prioridad[a.estado] - prioridad[b.estado];
return a.etaMinutos - b.etaMinutos;
});
// Ordenar: en_camino primero, luego próximo, luego pasó
// Dentro de cada grupo: por etaMinutos asc (salvo pasó que va desc = más reciente primero)
const upcoming = resultados
.filter(r => r.estado !== 'pasó')
.sort((a, b) => a.etaMinutos - b.etaMinutos);
busesActivos.value = resultados.slice(0, 5);
const pastBuses = resultados
.filter(r => r.estado === 'pasó')
.sort((a, b) => b.etaMinutos - a.etaMinutos); // desc → [0] es el más reciente
// CRÍTICO: siempre incluir el bus más reciente que pasó (independientemente
// de cuántos buses próximos haya). Máx 4 próximos + 1 pasado.
const mostRecentPast: BusETA[] = pastBuses.length > 0 ? [pastBuses[0] as BusETA] : [];
busesActivos.value = [...upcoming.slice(0, 4), ...mostRecentPast];
} catch (e) {
console.error('SIB | Error calculando ETA:', e);
} finally {

View File

@ -4,7 +4,7 @@
<button class="back-link" @click="router.push('/admin')">&larr; Volver al Panel</button>
<h1>Gestionar Paradas</h1>
<button class="add-button" @click="openCreate">
<span class="material-icons">add</span> Nueva Parada
<span class="material-icons notranslate" translate="no">add</span> Nueva Parada
</button>
</div>
@ -24,10 +24,10 @@
</div>
<div class="stop-actions">
<button class="icon-btn edit" @click="openEdit(stop)">
<span class="material-icons">edit</span>
<span class="material-icons notranslate" translate="no">edit</span>
</button>
<button class="icon-btn delete" @click="confirmDelete(stop)">
<span class="material-icons">delete</span>
<span class="material-icons notranslate" translate="no">delete</span>
</button>
</div>
</div>

View File

@ -204,7 +204,7 @@ const catEmoji = computed(() => CATEGORY_EMOJI[businessForm.value.category || ''
<div class="admin-editor-view">
<div class="nexus-admin-header">
<button class="back-btn" @click="router.back()">
<span class="material-icons">arrow_back</span>
<span class="material-icons notranslate" translate="no">arrow_back</span>
</button>
<h1>{{ isEditing ? 'Editar Actividad' : 'Nueva Actividad' }}</h1>
</div>
@ -213,7 +213,7 @@ const catEmoji = computed(() => CATEGORY_EMOJI[businessForm.value.category || ''
<!-- FORM PANEL -->
<section class="form-panel nexus-glass">
<div class="section-title">
<span class="material-icons">storefront</span>
<span class="material-icons notranslate" translate="no">storefront</span>
<h2>Datos de la Actividad</h2>
</div>
@ -228,7 +228,7 @@ const catEmoji = computed(() => CATEGORY_EMOJI[businessForm.value.category || ''
<div class="file-upload-wrapper">
<input type="file" @change="handleImageChange" accept="image/*" id="file-input">
<label for="file-input" class="file-label">
<span class="material-icons">cloud_upload</span>
<span class="material-icons notranslate" translate="no">cloud_upload</span>
{{ selectedFileName || 'SELECCIONAR FOTO' }}
</label>
</div>
@ -360,7 +360,7 @@ const catEmoji = computed(() => CATEGORY_EMOJI[businessForm.value.category || ''
@change="handleGalleryFiles"
>
<label for="gallery-input" class="gallery-upload-label">
<span class="material-icons" style="font-size:36px">add_photo_alternate</span>
<span class="material-icons notranslate" style="font-size:36px" translate="no">add_photo_alternate</span>
<span>Agregar fotos a la galería</span>
<span style="font-size:0.75rem; color: #fee715; margin-top: 4px;">
💡 <strong>Mejor visual:</strong> Usa formato horizontal / apaisado (16:9) como <strong>1200x675px</strong>.
@ -378,7 +378,7 @@ const catEmoji = computed(() => CATEGORY_EMOJI[businessForm.value.category || ''
>
<img :src="src" alt="Foto galeria" />
<button class="thumb-remove" @click="removeGalleryItem(idx)" type="button">
<span class="material-icons">close</span>
<span class="material-icons notranslate" translate="no">close</span>
</button>
</div>
</div>
@ -386,7 +386,7 @@ const catEmoji = computed(() => CATEGORY_EMOJI[businessForm.value.category || ''
</div>
<button class="deploy-btn" :disabled="isLoading" @click="saveBusiness">
<span class="material-icons">{{ isLoading ? 'sync' : 'save' }}</span>
<span class="material-icons notranslate" translate="no">{{ isLoading ? 'sync' : 'save' }}</span>
{{ isLoading ? 'GUARDANDO...' : 'GUARDAR ACTIVIDAD' }}
</button>
@ -397,7 +397,7 @@ const catEmoji = computed(() => CATEGORY_EMOJI[businessForm.value.category || ''
<!-- PREVIEW PANEL -->
<section class="preview-panel">
<div class="section-title white">
<span class="material-icons">visibility</span>
<span class="material-icons notranslate" translate="no">visibility</span>
<h2>Visualización en App</h2>
</div>
@ -418,9 +418,9 @@ const catEmoji = computed(() => CATEGORY_EMOJI[businessForm.value.category || ''
</section>
<div class="pills-row-preview">
<div class="pill" v-if="businessForm.area"><span class="material-icons">location_on</span> {{ businessForm.area }}</div>
<div class="pill" v-if="businessForm.schedule"><span class="material-icons">schedule</span> {{ businessForm.schedule }}</div>
<div class="pill" v-if="businessForm.phone"><span class="material-icons">phone</span> {{ businessForm.phone }}</div>
<div class="pill" v-if="businessForm.area"><span class="material-icons notranslate" translate="no">location_on</span> {{ businessForm.area }}</div>
<div class="pill" v-if="businessForm.schedule"><span class="material-icons notranslate" translate="no">schedule</span> {{ businessForm.schedule }}</div>
<div class="pill" v-if="businessForm.phone"><span class="material-icons notranslate" translate="no">phone</span> {{ businessForm.phone }}</div>
</div>
<section class="biz-section">
@ -458,17 +458,17 @@ const catEmoji = computed(() => CATEGORY_EMOJI[businessForm.value.category || ''
<!-- Social links -->
<div class="social-links mt-4">
<button class="social-btn social-wa" v-if="businessForm.whatsapp">
<span class="material-icons">chat</span> WhatsApp
<span class="material-icons notranslate" translate="no">chat</span> WhatsApp
</button>
<button class="social-btn social-ig" v-if="businessForm.instagram">
<span class="material-icons">photo_camera</span> Instagram
<span class="material-icons notranslate" translate="no">photo_camera</span> Instagram
</button>
</div>
</section>
<!-- Sticky CTA -->
<div class="cta-bar">
<button class="cta-map"><span class="material-icons">near_me</span> Ver en el Mapa</button>
<button class="cta-map"><span class="material-icons notranslate" translate="no">near_me</span> Ver en el Mapa</button>
</div>
</div>
</div>

File diff suppressed because it is too large Load Diff

View File

@ -1,288 +1,284 @@
<script setup lang="ts">
import { useRouter } from 'vue-router'
const router = useRouter()
const sections = [
{
id: 'intel',
label: 'Inteligencia y Control',
icon: 'monitoring',
items: [
{ icon: 'analytics', label: 'Análisis', desc: 'Métricas en tiempo real', route: '/admin/analytics', accent: '#fee715' },
{ icon: 'report_problem', label: 'Reportes', desc: 'Incidencias de usuarios', route: '/admin/reports', accent: '#f87171' },
]
},
{
id: 'infra',
label: 'Infraestructura',
icon: 'hub',
items: [
{ icon: 'navigation', label: 'Rutas', desc: 'Gestión de trayectos', route: '/admin/routes', accent: '#60a5fa' },
{ icon: 'location_on', label: 'Paradas', desc: 'Puntos de abordaje', route: '/admin/bus-stops', accent: '#34d399' },
{ icon: 'schedule', label: 'Horarios', desc: 'Frecuencias y salidas', route: '/admin/schedules', accent: '#a78bfa' },
]
},
{
id: 'fleet',
label: 'Flota y Servicios',
icon: 'directions_bus',
items: [
{ icon: 'airport_shuttle', label: 'Shuttles', desc: 'Viajes turísticos', route: '/admin/shuttles', accent: '#fb923c' },
{ icon: 'local_taxi', label: 'Taxis', desc: 'Directorio de conductores', route: '/admin/drivers', accent: '#fee715' },
]
},
{
id: 'commercial',
label: 'Ecosistema Comercial',
icon: 'store',
items: [
{ icon: 'storefront', label: 'Negocios', desc: 'Promos y locales', route: '/promoter', accent: '#f472b6' },
{ icon: 'local_activity', label: 'Actividades', desc: 'Experiencias y tours', route: '/promoter', accent: '#fb923c' },
]
},
]
</script>
<template>
<div class="admin-panel">
<div class="header-section">
<div class="badge">SISTEMA CENTRAL</div>
<!-- Header -->
<header class="panel-header">
<div class="header-badge">
<span class="material-icons notranslate" translate="no" aria-hidden="true">admin_panel_settings</span>
SISTEMA CENTRAL
</div>
<h1>Panel de Control</h1>
<p class="subtitle">Ecosistema Administrativo SIB</p>
</div>
<p class="header-sub">SIBU Administración</p>
</header>
<div class="dashboard-sections">
<!-- Sector: Inteligencia y Control -->
<section class="admin-section">
<div class="section-header">
<span class="material-icons">insights</span>
<h2>Inteligencia y Control</h2>
<!-- Sections -->
<div class="sections">
<section
v-for="section in sections"
:key="section.id"
class="section"
>
<div class="section-label">
<span class="material-icons notranslate section-icon" translate="no" aria-hidden="true">{{ section.icon }}</span>
{{ section.label }}
</div>
<div class="category-grid">
<div class="action-card" @click="router.push('/admin/analytics')">
<div class="card-icon"><span class="material-icons">analytics</span></div>
<div class="card-content">
<h3>Análisis</h3>
<p>Métricas en tiempo real.</p>
</div>
</div>
<div class="action-card" @click="router.push('/admin/reports')">
<div class="card-icon"><span class="material-icons">report_problem</span></div>
<div class="card-content">
<h3>Reportes</h3>
<p>Incidencias de usuarios.</p>
</div>
</div>
</div>
</section>
<!-- Sector: Infraestructura de Transporte -->
<section class="admin-section">
<div class="section-header">
<span class="material-icons">settings_input_component</span>
<h2>Infraestructura</h2>
</div>
<div class="category-grid">
<div class="action-card" @click="router.push('/admin/routes')">
<div class="card-icon"><span class="material-icons">navigation</span></div>
<div class="card-content">
<h3>Rutas</h3>
<p>Gestión de trayectos.</p>
<div class="cards-grid" role="list">
<button
v-for="item in section.items"
:key="item.route + item.label"
class="nav-card"
role="listitem"
:aria-label="item.label + ': ' + item.desc"
@click="router.push(item.route)"
>
<div class="card-icon-wrap" :style="{ '--card-accent': item.accent }">
<span class="material-icons notranslate" translate="no" aria-hidden="true">{{ item.icon }}</span>
</div>
</div>
<div class="action-card" @click="router.push('/admin/bus-stops')">
<div class="card-icon"><span class="material-icons">location_on</span></div>
<div class="card-content">
<h3>Paradas</h3>
<p>Puntos de abordaje.</p>
<div class="card-text">
<span class="card-title">{{ item.label }}</span>
<span class="card-desc">{{ item.desc }}</span>
</div>
</div>
<div class="action-card" @click="router.push('/admin/schedules')">
<div class="card-icon"><span class="material-icons">schedule</span></div>
<div class="card-content">
<h3>Horarios</h3>
<p>Frecuencias y salidas.</p>
</div>
</div>
</div>
</section>
<!-- Sector: Flota y Servicios -->
<section class="admin-section">
<div class="section-header">
<span class="material-icons">delivery_dining</span>
<h2>Flota y Servicios</h2>
</div>
<div class="category-grid">
<div class="action-card" @click="router.push('/admin/shuttles')">
<div class="card-icon"><span class="material-icons">airport_shuttle</span></div>
<div class="card-content">
<h3>Shuttles</h3>
<p>Viajes turísticos.</p>
</div>
</div>
<div class="action-card" @click="router.push('/admin/drivers')">
<div class="card-icon"><span class="material-icons">badge</span></div>
<div class="card-content">
<h3>Conductores</h3>
<p>Gestión de personal.</p>
</div>
</div>
</div>
</section>
<!-- Sector: Comercial -->
<section class="admin-section">
<div class="section-header">
<span class="material-icons">hub</span>
<h2>Ecosistema Comercial</h2>
</div>
<div class="category-grid">
<div class="action-card promoter-card" @click="router.push('/promoter')">
<div class="card-icon"><span class="material-icons">storefront</span></div>
<div class="card-content">
<h3>Negocios</h3>
<p>Promos y locales.</p>
</div>
</div>
<div class="action-card promoter-card" @click="router.push('/promoter')">
<div class="card-icon"><span class="material-icons">local_activity</span></div>
<div class="card-content">
<h3>Actividades</h3>
<p>Experiencias y tours.</p>
</div>
</div>
<span class="material-icons notranslate card-chevron" translate="no" aria-hidden="true">chevron_right</span>
</button>
</div>
</section>
</div>
</div>
</template>
<script setup lang="ts">
import { useRouter } from 'vue-router'
const router = useRouter()
</script>
<style scoped>
.admin-panel {
padding: 60px 24px 120px;
max-width: 1200px;
padding: 1.5rem 1rem 7rem;
max-width: 700px;
margin: 0 auto;
min-height: 100vh;
}
.header-section {
/* ── Header ── */
.panel-header {
text-align: center;
margin-bottom: 60px;
padding: 1.5rem 0 2.5rem;
}
.badge {
display: inline-block;
padding: 6px 14px;
background: rgba(254, 231, 21, 0.1);
.header-badge {
display: inline-flex;
align-items: center;
gap: 0.375rem;
padding: 0.3rem 0.875rem;
background: rgba(254, 231, 21, 0.08);
color: var(--active-color);
border-radius: 100px;
font-size: 0.75rem;
font-weight: 800;
letter-spacing: 0.15em;
margin-bottom: 16px;
border: 1px solid rgba(254, 231, 21, 0.2);
border-radius: 99px;
font-size: 0.6875rem;
font-weight: 800;
letter-spacing: 0.12em;
text-transform: uppercase;
margin-bottom: 1rem;
}
.header-badge .material-icons {
font-size: 0.9375rem;
}
h1 {
font-size: clamp(2.2rem, 5vw, 3.2rem);
font-size: clamp(1.75rem, 5vw, 2.5rem);
font-weight: 900;
color: var(--text-primary);
letter-spacing: -0.04em;
margin: 0;
margin: 0 0 0.25rem;
}
.subtitle {
.header-sub {
color: var(--text-secondary);
font-size: 1rem;
font-size: 0.875rem;
font-weight: 500;
margin-top: 6px;
letter-spacing: 0.05em;
}
.dashboard-sections {
display: flex;
flex-direction: column;
gap: 56px;
}
.admin-section {
display: flex;
flex-direction: column;
gap: 24px;
align-items: center; /* Centra el contenido de la sección */
}
.section-header {
display: flex;
align-items: center;
gap: 12px;
color: var(--active-color);
padding: 0 20px 12px;
border-bottom: 1px solid var(--border-color);
width: 100%;
max-width: 800px; /* Línea de división elegante y no tan larga */
justify-content: center;
}
.section-header .material-icons {
font-size: 1.2rem;
}
.section-header h2 {
font-size: 0.85rem;
text-transform: uppercase;
letter-spacing: 0.12em;
font-weight: 800;
letter-spacing: 0.06em;
margin: 0;
color: var(--text-secondary);
text-transform: uppercase;
}
.category-grid {
/* ── Sections ── */
.sections {
display: flex;
flex-wrap: wrap;
justify-content: center; /* ESTO CENTRA LAS TARJETAS */
gap: 24px;
width: 100%;
flex-direction: column;
gap: 2rem;
}
.action-card {
background: var(--card-bg);
backdrop-filter: blur(12px);
border-radius: 24px;
padding: 24px 28px;
border: 1px solid var(--border-color);
cursor: pointer;
.section {
display: flex;
flex-direction: column;
gap: 0.625rem;
}
.section-label {
display: flex;
align-items: center;
gap: 20px;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
width: 340px; /* Ancho fijo para mantener la simetría */
min-height: 110px;
gap: 0.5rem;
font-size: 0.6875rem;
font-weight: 800;
text-transform: uppercase;
letter-spacing: 0.1em;
color: var(--text-secondary);
padding: 0 0.25rem;
}
.action-card:hover {
transform: translateY(-5px);
border-color: var(--active-color);
background: rgba(254, 231, 21, 0.03);
box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
.section-icon {
font-size: 0.9375rem;
color: var(--active-color);
}
.card-icon {
width: 52px;
height: 52px;
background: var(--bg-secondary);
border-radius: 16px;
/* ── Cards ── */
.cards-grid {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.nav-card {
display: flex;
align-items: center;
gap: 1rem;
padding: 0.875rem 1rem;
background: var(--card-bg);
border: 1px solid var(--border-color);
border-radius: 1rem;
cursor: pointer;
text-align: left;
width: 100%;
transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
min-height: 64px;
}
.nav-card:focus-visible {
outline: 2px solid var(--active-color);
outline-offset: 2px;
}
@media (hover: hover) {
.nav-card:hover {
border-color: var(--card-accent, var(--active-color));
background: color-mix(in srgb, var(--card-accent, var(--active-color)) 6%, var(--card-bg));
transform: translateX(3px);
}
.nav-card:hover .card-chevron {
color: var(--card-accent, var(--active-color));
transform: translateX(3px);
}
.nav-card:hover .card-icon-wrap {
background: var(--card-accent, var(--active-color));
color: #101820;
}
}
.nav-card:active {
transform: scale(0.98);
}
.card-icon-wrap {
width: 42px;
height: 42px;
border-radius: 10px;
background: color-mix(in srgb, var(--card-accent, var(--active-color)) 12%, var(--bg-secondary));
color: var(--card-accent, var(--active-color));
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
transition: all 0.3s;
transition: background 0.18s ease, color 0.18s ease;
}
.action-card:hover .card-icon {
background: var(--active-color);
transform: rotate(-10deg);
.card-icon-wrap .material-icons {
font-size: 1.25rem;
}
.card-icon .material-icons {
font-size: 24px;
color: var(--active-color);
.card-text {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 0.125rem;
}
.action-card:hover .card-icon .material-icons {
color: #101820;
}
.card-content h3 {
margin: 0 0 4px;
font-size: 1.15rem;
font-weight: 800;
.card-title {
font-size: 0.9375rem;
font-weight: 700;
color: var(--text-primary);
line-height: 1.2;
}
.card-content p {
margin: 0;
.card-desc {
font-size: 0.8125rem;
color: var(--text-secondary);
font-size: 0.85rem;
line-height: 1.4;
font-weight: 500;
}
.promoter-card {
background: linear-gradient(135deg, rgba(254, 231, 21, 0.05) 0%, rgba(30, 41, 59, 0.2) 100%);
.card-chevron {
font-size: 1.125rem;
color: var(--text-secondary);
flex-shrink: 0;
transition: color 0.18s ease, transform 0.18s ease;
}
@media (max-width: 600px) {
.admin-panel { padding: 30px 16px 120px; }
.category-grid {
flex-direction: column;
align-items: center;
/* ── Desktop: 2-col grid ── */
@media (min-width: 560px) {
.cards-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 0.625rem;
}
.action-card {
width: 100%;
max-width: 340px;
}
@media (prefers-reduced-motion: reduce) {
.nav-card,
.card-chevron,
.card-icon-wrap {
transition: none;
}
.header-section { text-align: center; padding: 0; }
}
</style>

View File

@ -1,70 +1,80 @@
<template>
<div class="admin-reports">
<div class="header">
<button class="back-link" @click="$router.push('/admin')">
<span class="material-icons">arrow_back</span> Volver al Panel
</button>
<h1>Reportes de Usuarios</h1>
</div>
<AdminPageHeader title="Reportes" subtitle="Incidencias de usuarios" />
<div v-if="isLoading" class="loading">
<!-- Loading -->
<div v-if="isLoading" class="state-center" aria-busy="true" aria-label="Cargando reportes">
<LoadingBranded message="Cargando reportes..." icon="assignment" />
</div>
<div v-else-if="reports.length > 0" class="reports-container">
<div class="stats-overview">
<!-- Has reports -->
<div v-else-if="reports.length > 0" class="reports-wrap">
<!-- Stats -->
<div class="stats-row" role="region" aria-label="Resumen de reportes">
<div class="stat-card">
<span class="stat-value">{{ reports.length }}</span>
<span class="stat-label">Total Reportes</span>
<span class="stat-val">{{ reports.length }}</span>
<span class="stat-label">Total</span>
</div>
<div class="stat-card pending">
<span class="stat-value">{{ reports.filter(r => r.status === 'pending').length }}</span>
<div class="stat-card stat-card--warn">
<span class="stat-val">{{ pending }}</span>
<span class="stat-label">Pendientes</span>
</div>
</div>
<div class="reports-grid">
<div v-for="report in sortedReports" :key="report.id" class="report-card" :class="report.status">
<div class="report-header">
<div class="user-info">
<span class="material-icons">account_circle</span>
<div>
<h3>{{ report.user_name || 'Usuario Anónimo' }}</h3>
<span class="date">{{ formatDate(report.created_at) }}</span>
</div>
</div>
<div class="status-badge" :class="report.status">
{{ statusDisplay(report.status) }}
</div>
</div>
<div class="report-body">
<p>{{ report.message }}</p>
</div>
<div class="report-actions">
<button
v-if="report.status === 'pending'"
@click="handleUpdateStatus(report.id, 'resolved')"
class="btn-resolve"
>
<span class="material-icons">check_circle</span> Marcar como Resuelto
</button>
<button
v-else-if="report.status === 'resolved'"
@click="handleUpdateStatus(report.id, 'archived')"
class="btn-archive"
>
<span class="material-icons">archive</span> Archivar
</button>
</div>
<div class="stat-card stat-card--ok">
<span class="stat-val">{{ resolved }}</span>
<span class="stat-label">Resueltos</span>
</div>
</div>
<!-- Report list -->
<ul class="report-list" aria-label="Lista de reportes">
<li
v-for="report in sortedReports"
:key="report.id"
class="report-card"
:class="`report-card--${report.status}`"
>
<div class="report-top">
<div class="report-user">
<span class="material-icons notranslate icon-filled user-avatar" translate="no" aria-hidden="true">account_circle</span>
<div>
<p class="user-name">{{ report.user_name || 'Usuario anónimo' }}</p>
<time class="report-date" :datetime="report.created_at">{{ formatDate(report.created_at) }}</time>
</div>
</div>
<span class="status-badge" :class="`status-badge--${report.status}`" :aria-label="`Estado: ${statusDisplay(report.status)}`">
{{ statusDisplay(report.status) }}
</span>
</div>
<p class="report-msg">{{ report.message }}</p>
<div class="report-actions">
<button
v-if="report.status === 'pending'"
class="action-btn action-btn--resolve"
@click="handleUpdateStatus(report.id, 'resolved')"
>
<span class="material-icons notranslate" translate="no" aria-hidden="true">check_circle</span>
Marcar resuelto
</button>
<button
v-else-if="report.status === 'resolved'"
class="action-btn action-btn--archive"
@click="handleUpdateStatus(report.id, 'archived')"
>
<span class="material-icons notranslate" translate="no" aria-hidden="true">archive</span>
Archivar
</button>
</div>
</li>
</ul>
</div>
<div v-else class="no-results">
<span class="material-icons">info</span>
<p>No hay reportes nuevos en este momento.</p>
<!-- Empty -->
<div v-else class="state-center" role="status">
<span class="material-icons notranslate empty-icon" translate="no" aria-hidden="true">mark_email_read</span>
<p class="empty-title">Sin reportes pendientes</p>
<p class="empty-sub">Todo está en orden por ahora.</p>
</div>
</div>
</template>
@ -73,25 +83,24 @@
import { ref, onMounted, computed } from 'vue'
import { reportsService, type Report } from '@/services/reportsService'
import LoadingBranded from '@/components/common/LoadingBranded.vue'
import AdminPageHeader from '@/components/admin/AdminPageHeader.vue'
const reports = ref<Report[]>([])
const isLoading = ref(true)
const sortedReports = computed(() => {
return [...reports.value].sort((a, b) =>
new Date(b.created_at).getTime() - new Date(a.created_at).getTime()
)
})
const sortedReports = computed(() =>
[...reports.value].sort((a, b) => new Date(b.created_at).getTime() - new Date(a.created_at).getTime())
)
onMounted(async () => {
await fetchReports()
})
const pending = computed(() => reports.value.filter(r => r.status === 'pending').length)
const resolved = computed(() => reports.value.filter(r => r.status === 'resolved').length)
onMounted(fetchReports)
async function fetchReports() {
isLoading.value = true
try {
const data = await reportsService.getReports()
reports.value = data || []
reports.value = (await reportsService.getReports()) || []
} catch (e) {
console.error('Error fetching reports:', e)
} finally {
@ -103,155 +112,205 @@ async function handleUpdateStatus(id: string, status: string) {
try {
await reportsService.updateReportStatus(id, status)
await fetchReports()
} catch (e) {
alert('Error al actualizar el estado del reporte')
} catch {
alert('Error al actualizar el reporte')
}
}
function formatDate(dateStr: string) {
return new Date(dateStr).toLocaleString('es-ES', {
day: '2-digit',
month: 'short',
hour: '2-digit',
minute: '2-digit'
day: '2-digit', month: 'short', hour: '2-digit', minute: '2-digit'
})
}
function statusDisplay(status: string) {
const mapping: Record<string, string> = {
'pending': 'Pendiente',
'resolved': 'Resuelto',
'archived': 'Archivado'
}
return mapping[status] || status
const m: Record<string, string> = { pending: 'Pendiente', resolved: 'Resuelto', archived: 'Archivado' }
return m[status] || status
}
</script>
<style scoped>
.admin-reports {
padding: 48px 24px;
max-width: 1000px;
margin: 0 auto;
padding-bottom: 5rem;
}
.header {
margin-bottom: 40px;
}
.back-link {
background: transparent;
border: none;
color: var(--text-secondary);
cursor: pointer;
/* States */
.state-center {
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
font-weight: 600;
margin-bottom: 16px;
transition: color 0.3s;
padding: 4rem 1.5rem;
gap: 0.75rem;
text-align: center;
color: var(--text-secondary);
}
.back-link:hover {
color: var(--active-color);
.empty-icon {
font-size: 3rem;
opacity: 0.35;
}
h1 {
font-size: 2.5rem;
font-weight: 900;
background: linear-gradient(135deg, #fee715 0%, #facc15 100%);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
.empty-title {
font-size: 1rem;
font-weight: 700;
color: var(--text-primary);
margin: 0;
}
.stats-overview {
.empty-sub {
font-size: 0.875rem;
margin: 0;
}
/* Reports wrap */
.reports-wrap {
padding: 0 1rem;
display: flex;
gap: 24px;
margin-bottom: 32px;
flex-direction: column;
gap: 1.25rem;
}
/* Stats row */
.stats-row {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 0.625rem;
}
.stat-card {
background: var(--card-bg);
padding: 24px;
border-radius: 20px;
border: 1px solid var(--border-color);
flex: 1;
border-radius: 1rem;
padding: 0.875rem 1rem;
display: flex;
flex-direction: column;
gap: 0.125rem;
}
.stat-value {
font-size: 2rem;
font-weight: 900;
color: var(--active-color);
.stat-card--warn {
border-color: rgba(251, 146, 60, 0.3);
background: rgba(251, 146, 60, 0.05);
}
.stat-card--ok {
border-color: rgba(52, 211, 153, 0.3);
background: rgba(52, 211, 153, 0.05);
}
.stat-val {
font-size: 1.75rem;
font-weight: 900;
color: var(--text-primary);
letter-spacing: -0.03em;
line-height: 1;
}
.stat-card--warn .stat-val { color: #fb923c; }
.stat-card--ok .stat-val { color: #34d399; }
.stat-label {
color: var(--text-secondary);
font-size: 0.9rem;
font-weight: 600;
font-size: 0.6875rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.06em;
color: var(--text-secondary);
}
.reports-grid {
display: grid;
gap: 20px;
/* Report list */
.report-list {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.report-card {
background: var(--card-bg);
backdrop-filter: blur(12px);
border-radius: 24px;
padding: 24px;
border: 1px solid var(--border-color);
transition: all 0.3s ease;
border-radius: 1.125rem;
padding: 1rem;
display: flex;
flex-direction: column;
gap: 0.75rem;
transition: border-color 0.15s ease;
}
.report-card:hover {
border-color: rgba(254, 231, 21, 0.3);
transform: translateY(-4px);
.report-card--pending {
border-left: 3px solid #fb923c;
}
.report-header {
.report-card--resolved {
border-left: 3px solid #34d399;
}
.report-card--archived {
opacity: 0.6;
}
.report-top {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 20px;
gap: 0.75rem;
}
.user-info {
.report-user {
display: flex;
gap: 12px;
align-items: center;
gap: 0.625rem;
}
.user-info h3 {
margin: 0;
font-size: 1.1rem;
}
.user-info .date {
font-size: 0.8rem;
.user-avatar {
font-size: 2rem;
color: var(--text-secondary);
}
.status-badge {
padding: 4px 12px;
border-radius: 100px;
font-size: 0.75rem;
font-weight: 800;
text-transform: uppercase;
.user-name {
font-size: 0.9375rem;
font-weight: 700;
color: var(--text-primary);
margin: 0 0 0.125rem;
}
.status-badge.pending { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.status-badge.resolved { background: rgba(34, 197, 94, 0.1); color: #22c55e; }
.status-badge.archived { background: var(--bg-secondary); color: var(--text-secondary); }
.report-date {
font-size: 0.75rem;
color: var(--text-secondary);
font-weight: 500;
}
.report-body {
margin-bottom: 24px;
line-height: 1.6;
/* Status badges */
.status-badge {
padding: 0.2rem 0.625rem;
border-radius: 99px;
font-size: 0.6875rem;
font-weight: 800;
text-transform: uppercase;
letter-spacing: 0.06em;
flex-shrink: 0;
}
.status-badge--pending {
background: rgba(251, 146, 60, 0.12);
color: #fb923c;
}
.status-badge--resolved {
background: rgba(52, 211, 153, 0.12);
color: #34d399;
}
.status-badge--archived {
background: var(--bg-secondary);
color: var(--text-secondary);
}
.report-msg {
font-size: 0.9375rem;
color: var(--text-primary);
line-height: 1.6;
margin: 0;
}
.report-actions {
@ -259,61 +318,58 @@ h1 {
justify-content: flex-end;
}
.btn-resolve, .btn-archive {
display: flex;
.action-btn {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 10px 20px;
border-radius: 12px;
gap: 0.375rem;
padding: 0.5rem 1rem;
border-radius: 99px;
font-size: 0.8125rem;
font-weight: 700;
cursor: pointer;
transition: all 0.3s;
min-height: 36px;
transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-resolve {
.action-btn:focus-visible {
outline: 2px solid var(--active-color);
outline-offset: 2px;
}
.action-btn .material-icons {
font-size: 1rem;
}
.action-btn--resolve {
background: var(--active-color);
color: #101820;
border: none;
}
.btn-resolve:hover {
transform: scale(1.05);
box-shadow: 0 4px 15px rgba(254, 231, 21, 0.3);
@media (hover: hover) {
.action-btn--resolve:hover {
box-shadow: 0 4px 12px rgba(254, 231, 21, 0.3);
transform: translateY(-1px);
}
}
.btn-archive {
.action-btn--archive {
background: transparent;
border: 1px solid var(--border-color);
border: 1.5px solid var(--border-color);
color: var(--text-secondary);
}
.btn-archive:hover {
border-color: var(--text-secondary);
color: var(--text-primary);
@media (hover: hover) {
.action-btn--archive:hover {
border-color: var(--text-secondary);
color: var(--text-primary);
}
}
.no-results, .loading {
text-align: center;
padding: 80px 24px;
color: var(--text-secondary);
}
.spinner {
width: 40px;
height: 40px;
border: 3px solid rgba(254, 231, 21, 0.1);
border-top-color: var(--active-color);
border-radius: 50%;
animation: spin 1s linear infinite;
margin: 0 auto 16px;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
@media (max-width: 600px) {
.admin-reports { padding: 24px 16px; }
.stats-overview { flex-direction: column; }
@media (prefers-reduced-motion: reduce) {
.report-card,
.action-btn {
transition: none;
}
}
</style>

View File

@ -4,7 +4,7 @@
<button class="back-link" @click="handleBack">&larr; Volver</button>
<h1>Gestión de Rutas</h1>
<button v-if="!selectedRoute" class="add-button" @click="createRoute">
<span class="material-icons">add</span> Nueva Ruta
<span class="material-icons notranslate" translate="no">add</span> Nueva Ruta
</button>
</div>
@ -13,7 +13,7 @@
<div v-if="selectedRoute" class="map-container">
<div id="route-map" class="route-map"></div>
<div class="map-hint">
<span class="material-icons">info</span>
<span class="material-icons notranslate" translate="no">info</span>
Haz clic en el mapa para crear una nueva parada en las coordenadas seleccionadas. Puedes añadir paradas registradas desde la lista a la derecha.
</div>
</div>
@ -25,7 +25,7 @@
<!-- Create Form (Simplified) -->
<div v-if="isCreating" class="create-route-form nexus-glass">
<div class="form-header">
<span class="material-icons">route</span>
<span class="material-icons notranslate" translate="no">route</span>
<h3>Nueva Ruta</h3>
</div>
@ -47,7 +47,7 @@
<div class="form-footer">
<button class="cancel-btn" @click="isCreating = false">Cancelar</button>
<button class="save-btn" :disabled="!isFormValid" @click="confirmCreateRoute">
<span class="material-icons">save</span> Guardar Ruta
<span class="material-icons notranslate" translate="no">save</span> Guardar Ruta
</button>
</div>
</div>
@ -59,7 +59,7 @@
<p>{{ route.origin_city }} &rarr; {{ route.destination_city }}</p>
<div class="status" :class="route.status">{{ translateStatus(route.status) }}</div>
</div>
<span class="material-icons">chevron_right</span>
<span class="material-icons notranslate" translate="no">chevron_right</span>
</div>
<div v-if="routes.length === 0 && !isCreating" class="empty-state">No hay rutas registradas.</div>
</div>
@ -112,7 +112,7 @@
<div class="origin-dest-row">
<div class="form-group origin-stop-group">
<label>
<span class="material-icons md-16">trip_origin</span>
<span class="material-icons md-16 notranslate" translate="no">trip_origin</span>
Parada de Inicio (donde sale el bus)
</label>
<select v-model="selectedRoute.origin_stop_id" @change="updateRouteDetails">
@ -124,7 +124,7 @@
</div>
<div class="form-group dest-stop-group">
<label>
<span class="material-icons md-16">place</span>
<span class="material-icons md-16 notranslate" translate="no">place</span>
Parada de Fin (destino final)
</label>
<select v-model="selectedRoute.destination_stop_id" @change="updateRouteDetails">
@ -176,13 +176,13 @@
</div>
<div class="stop-controls">
<button class="move-btn" @click="moveStop(stop, index, -1)" :disabled="index === 0">
<span class="material-icons">expand_less</span>
<span class="material-icons notranslate" translate="no">expand_less</span>
</button>
<button class="move-btn" @click="moveStop(stop, index, 1)" :disabled="index === routeStops.length - 1">
<span class="material-icons">expand_more</span>
<span class="material-icons notranslate" translate="no">expand_more</span>
</button>
<button class="remove-btn" @click="removeStop(stop)">
<span class="material-icons">close</span>
<span class="material-icons notranslate" translate="no">close</span>
</button>
</div>
</div>

View File

@ -3,7 +3,7 @@
<div class="glass-container">
<div class="header">
<button class="back-link" @click="router.push('/admin')">
<span class="material-icons">arrow_back</span>
<span class="material-icons notranslate" translate="no">arrow_back</span>
Volver al Panel
</button>
<h1 class="premium-title">Gestión de Horarios</h1>
@ -12,7 +12,7 @@
<!-- Route Selection -->
<div class="selection-card glass-morphism">
<div class="input-w-icon">
<span class="material-icons">route</span>
<span class="material-icons notranslate" translate="no">route</span>
<select v-model="selectedRouteId" @change="loadSchedules" class="premium-select">
<option value="">-- Selecciona una ruta para gestionar --</option>
<option v-for="route in routes" :key="route.id" :value="route.id">
@ -26,7 +26,7 @@
<div class="actions-header">
<h2 class="section-title">Horarios Configurados</h2>
<button class="add-btn premium-btn" @click="showAddForm = true">
<span class="material-icons">add</span> Nuevo Horario
<span class="material-icons notranslate" translate="no">add</span> Nuevo Horario
</button>
</div>
@ -38,21 +38,21 @@
<div class="form-group">
<label>Hora de Salida</label>
<div class="input-wrapper">
<span class="material-icons">schedule</span>
<span class="material-icons notranslate" translate="no">schedule</span>
<input v-model="form.departure_time" type="time" required>
</div>
</div>
<div class="form-group">
<label>Frecuencia (min)</label>
<div class="input-wrapper">
<span class="material-icons">update</span>
<span class="material-icons notranslate" translate="no">update</span>
<input v-model.number="form.frequency_minutes" type="number" placeholder="30">
</div>
</div>
<div class="form-group">
<label>Tipo de Día</label>
<div class="input-wrapper">
<span class="material-icons">calendar_today</span>
<span class="material-icons notranslate" translate="no">calendar_today</span>
<select v-model="form.schedule_type">
<option value="weekday">Día de Semana</option>
<option value="weekend">Fin de Semana</option>
@ -83,11 +83,11 @@
<!-- Schedules List -->
<div class="schedules-list">
<div v-if="isLoadingSchedules" class="loader-container">
<span class="material-icons spin">refresh</span>
<span class="material-icons spin notranslate" translate="no">refresh</span>
<p>Cargando horarios...</p>
</div>
<div v-else-if="schedules.length === 0" class="empty-state glass-morphism">
<span class="material-icons">event_busy</span>
<span class="material-icons notranslate" translate="no">event_busy</span>
<p>No hay horarios configurados para esta ruta.</p>
</div>
<div v-else class="grid-container">
@ -111,10 +111,10 @@
</div>
<div class="action-buttons">
<button class="icon-btn edit-btn" @click="editSchedule(schedule)" title="Editar">
<span class="material-icons">edit</span>
<span class="material-icons notranslate" translate="no">edit</span>
</button>
<button class="icon-btn delete-btn" @click="handleDelete(schedule.id)" title="Eliminar">
<span class="material-icons">delete</span>
<span class="material-icons notranslate" translate="no">delete</span>
</button>
</div>
</div>
@ -125,7 +125,7 @@
<div v-else class="no-selection-state">
<div class="icon-circle">
<span class="material-icons">list_alt</span>
<span class="material-icons notranslate" translate="no">list_alt</span>
</div>
<h3>Gestión de Despachos</h3>
<p>Selecciona una ruta del menú superior para administrar los horarios de salida y frecuencia.</p>

View File

@ -104,7 +104,7 @@ async function saveShuttle() {
<div class="admin-shuttles-view">
<div class="nexus-admin-header">
<button class="back-btn" @click="router.push('/admin')">
<span class="material-icons">arrow_back</span>
<span class="material-icons notranslate" translate="no">arrow_back</span>
</button>
<h1>Generador de Shuttles Turísticos</h1>
<div class="header-status">ID: SHUTTLE-MARK-I</div>
@ -114,7 +114,7 @@ async function saveShuttle() {
<!-- FORM PANEL -->
<section class="form-panel nexus-glass">
<div class="section-title">
<span class="material-icons">edit_note</span>
<span class="material-icons notranslate" translate="no">edit_note</span>
<h2>Datos del Servicio</h2>
</div>
@ -129,7 +129,7 @@ async function saveShuttle() {
<div class="file-upload-wrapper">
<input type="file" @change="handleImageChange" accept="image/*" id="file-input" />
<label for="file-input" class="file-label">
<span class="material-icons">cloud_upload</span>
<span class="material-icons notranslate" translate="no">cloud_upload</span>
{{ selectedFileName || 'SELECCIONAR IMAGEN' }}
</label>
<p class="upload-hint">Recomendado: 1200x900px (4:3)</p>
@ -211,7 +211,7 @@ async function saveShuttle() {
<div class="form-group">
<label class="toggle-container">
<div class="toggle-text">
<span class="material-icons">translate</span>
<span class="material-icons notranslate" translate="no">translate</span>
<span>¿Habla Inglés? (Bilingüe)</span>
</div>
<div class="nexus-switch">
@ -222,7 +222,7 @@ async function saveShuttle() {
</div>
<button class="deploy-btn" :disabled="isLoading" @click="saveShuttle">
<span class="material-icons">{{ isLoading ? 'sync' : 'rocket_launch' }}</span>
<span class="material-icons notranslate" translate="no">{{ isLoading ? 'sync' : 'rocket_launch' }}</span>
{{ isLoading ? 'PROCESANDO...' : 'PUBLICAR EN SIB' }}
</button>
@ -233,7 +233,7 @@ async function saveShuttle() {
<!-- PREVIEW PANEL -->
<section class="preview-panel">
<div class="section-title white">
<span class="material-icons">visibility</span>
<span class="material-icons notranslate" translate="no">visibility</span>
<h2>Previsualización en Directo</h2>
</div>
@ -244,7 +244,7 @@ async function saveShuttle() {
<div class="shuttle-main-info">
<div class="shuttle-header-mini">
<div class="company-badge">
<span class="material-icons">business</span>
<span class="material-icons notranslate" translate="no">business</span>
{{ shuttleForm.company_name }}
</div>
<div class="price-pill">
@ -256,17 +256,17 @@ async function saveShuttle() {
<div class="shuttle-route-compact">
<span class="route-text">{{ shuttleForm.origin }}</span>
<span class="material-icons route-arrow">arrow_forward</span>
<span class="material-icons route-arrow notranslate" translate="no">arrow_forward</span>
<span class="route-text">{{ shuttleForm.destination }}</span>
</div>
<div class="shuttle-tags">
<div class="vehicle-tag-mini">
<span class="material-icons">directions_bus</span>
<span class="material-icons notranslate" translate="no">directions_bus</span>
{{ shuttleForm.vehicle_type }}
</div>
<div class="expand-indicator">
<span class="material-icons">expand_less</span>
<span class="material-icons notranslate" translate="no">expand_less</span>
</div>
</div>
</div>
@ -277,21 +277,21 @@ async function saveShuttle() {
<div class="shuttle-body">
<div class="info-row">
<span class="material-icons">schedule</span>
<span class="material-icons notranslate" translate="no">schedule</span>
<div>
<p class="label">DURACIÓN ESTIMADA</p>
<p class="value">{{ shuttleForm.estimated_duration }}</p>
</div>
</div>
<div class="info-row">
<span class="material-icons">event</span>
<span class="material-icons notranslate" translate="no">event</span>
<div>
<p class="label">SALIDAS</p>
<p class="value">{{ shuttleForm.departure_times }}</p>
</div>
</div>
<div class="info-row" v-if="shuttleForm.english_speaking">
<span class="material-icons">g_translate</span>
<span class="material-icons notranslate" translate="no">g_translate</span>
<div>
<p class="label">IDIOMA</p>
<p class="value">Español · English</p>
@ -311,7 +311,7 @@ async function saveShuttle() {
<span class="price-label-big">por persona</span>
</div>
<div class="price-row-secondary" v-if="shuttleForm.price_private_trip">
<span class="material-icons price-icon-secondary">directions_car</span>
<span class="material-icons price-icon-secondary notranslate" translate="no">directions_car</span>
<span class="price-amount-secondary">${{ shuttleForm.price_private_trip }}</span>
<span class="price-label-secondary">viaje privado</span>
</div>
@ -320,7 +320,7 @@ async function saveShuttle() {
<!-- Botones de contacto -->
<div class="contact-buttons-preview">
<button class="btn-whatsapp-preview">
<span class="material-icons">chat</span>
<span class="material-icons notranslate" translate="no">chat</span>
WhatsApp
</button>
</div>

View File

@ -37,7 +37,7 @@ const toggleAuth = () => {
<!-- Top Navigation -->
<nav class="auth-nav">
<button @click="router.push('/map')" class="glass-btn back-btn">
<span class="material-icons">arrow_back</span>
<span class="material-icons notranslate" translate="no">arrow_back</span>
<span>{{ t('auth.back') }}</span>
</button>
</nav>
@ -50,15 +50,15 @@ const toggleAuth = () => {
<p class="brand-tagline">{{ t('auth.brandingSubtitle') }}</p>
<div class="brand-features">
<div class="feature-item">
<span class="material-icons">directions_bus</span>
<span class="material-icons notranslate" translate="no">directions_bus</span>
<span>Rutas en tiempo real</span>
</div>
<div class="feature-item">
<span class="material-icons">payments</span>
<span class="material-icons notranslate" translate="no">payments</span>
<span>Ofertas exclusivas</span>
</div>
<div class="feature-item">
<span class="material-icons">location_on</span>
<span class="material-icons notranslate" translate="no">location_on</span>
<span>Paradas inteligentes</span>
</div>
</div>

View File

@ -169,11 +169,11 @@ const hasSocials = computed(() =>
<!-- ERROR -->
<div v-else-if="fetchError" class="state-full">
<span class="material-icons state-icon">wifi_off</span>
<span class="material-icons state-icon notranslate" translate="no">wifi_off</span>
<h3 class="state-title">{{ t('business.offlineTitle') }}</h3>
<p class="state-sub">{{ t('business.offlineDesc') }}</p>
<button class="btn-retry" @click="fetchData">
<span class="material-icons">refresh</span>
<span class="material-icons notranslate" translate="no">refresh</span>
{{ t('common.retry') }}
</button>
</div>
@ -196,7 +196,7 @@ const hasSocials = computed(() =>
<!-- Top controls -->
<button class="hero-btn hero-back" @click="goBack" :aria-label="t('common.back')">
<span class="material-icons">arrow_back</span>
<span class="material-icons notranslate" translate="no">arrow_back</span>
</button>
<div class="hero-fav">
<FavoriteButton
@ -238,7 +238,7 @@ const hasSocials = computed(() =>
:target="pill.href ? '_blank' : undefined"
:rel="pill.href ? 'noopener noreferrer' : undefined"
>
<span class="material-icons pill-icon">{{ pill.icon }}</span>
<span class="material-icons pill-icon notranslate" translate="no">{{ pill.icon }}</span>
<span class="pill-text">{{ pill.text }}</span>
</a>
</div>
@ -275,10 +275,10 @@ const hasSocials = computed(() =>
<!-- Nav arrows (only if >1 image) -->
<template v-if="galleryImages.length > 1">
<button class="car-arrow car-arrow-left" @click="prevSlide" :aria-label="t('business.previous')">
<span class="material-icons">chevron_left</span>
<span class="material-icons notranslate" translate="no">chevron_left</span>
</button>
<button class="car-arrow car-arrow-right" @click="nextSlide" :aria-label="t('business.next')">
<span class="material-icons">chevron_right</span>
<span class="material-icons notranslate" translate="no">chevron_right</span>
</button>
<!-- Dots -->
@ -353,7 +353,7 @@ const hasSocials = computed(() =>
class="social-btn social-maps"
@click="openMaps"
>
<span class="material-icons social-maps-icon">place</span>
<span class="material-icons social-maps-icon notranslate" translate="no">place</span>
<span class="social-label">Google Maps</span>
</button>
@ -399,7 +399,7 @@ const hasSocials = computed(() =>
class="cta-map"
@click="openMaps"
>
<span class="material-icons">near_me</span>
<span class="material-icons notranslate" translate="no">near_me</span>
{{ t('business.viewMap') }}
</button>
<button
@ -407,7 +407,7 @@ const hasSocials = computed(() =>
class="cta-call"
@click="callPhone"
>
<span class="material-icons">phone</span>
<span class="material-icons notranslate" translate="no">phone</span>
{{ t('business.call') }}
</button>
</div>

View File

@ -83,10 +83,10 @@ function getCategoryIcon(category?: string | null) {
<div class="coupons-view">
<header class="mobile-header">
<button class="icon-btn-back" @click="$router.back()">
<span class="material-icons">arrow_back</span>
<span class="material-icons notranslate" translate="no">arrow_back</span>
</button>
<div class="header-center">
<span class="material-icons brand-icon">local_offer</span>
<span class="material-icons brand-icon notranslate" translate="no">local_offer</span>
<h1>{{ t('coupons.title') }}</h1>
</div>
<div class="header-right"></div>
@ -94,7 +94,7 @@ function getCategoryIcon(category?: string | null) {
<div class="search-section">
<div class="search-bar-rounded">
<span class="material-icons search-icon">search</span>
<span class="material-icons search-icon notranslate" translate="no">search</span>
<input
v-model="searchQuery"
type="text"
@ -103,7 +103,7 @@ function getCategoryIcon(category?: string | null) {
>
</div>
<button class="filter-btn-square" @click="showFilterSheet = true">
<span class="material-icons">tune</span>
<span class="material-icons notranslate" translate="no">tune</span>
</button>
</div>
@ -113,17 +113,17 @@ function getCategoryIcon(category?: string | null) {
</div>
<div v-if="couponStore.isLoading" class="loading-container">
<span class="material-icons spin">refresh</span>
<span class="material-icons spin notranslate" translate="no">refresh</span>
<p>{{ t('coupons.loadingCoupons') }}</p>
</div>
<div v-else-if="couponStore.error" class="error-container">
<span class="material-icons">error_outline</span>
<span class="material-icons notranslate" translate="no">error_outline</span>
<p>{{ t('common.error') }}: {{ couponStore.error }}</p>
</div>
<div v-else-if="filteredCoupons.length === 0" class="empty-container">
<span class="material-icons">search_off</span>
<span class="material-icons notranslate" translate="no">search_off</span>
<p>{{ t('coupons.noResults') }}</p>
</div>
@ -143,7 +143,7 @@ function getCategoryIcon(category?: string | null) {
<div class="offer-image-wrapper">
<AppImage :src="coupon.image_url" :alt="coupon.title" type="coupon" imgClass="offer-img" />
<div class="status-badge" :class="{ 'tmr': coupon.title.toLowerCase().includes('mañana') || (coupon.description?.toLowerCase().includes('mañana') ?? false) }">
<span class="material-icons">schedule</span>
<span class="material-icons notranslate" translate="no">schedule</span>
{{ coupon.title.toLowerCase().includes('mañana') ? t('coupons.tomorrow') : t('coupons.active') }}
</div>
<div class="favorite-button-wrapper">
@ -173,9 +173,9 @@ function getCategoryIcon(category?: string | null) {
</div>
<div class="sheet-body">
<div v-for="cat in CATEGORIES" :key="cat.value" class="filter-option" @click="selectedCategory = cat.value; showFilterSheet = false">
<span class="material-icons">{{ getCategoryIcon(cat.value) }}</span>
<span class="material-icons notranslate" translate="no">{{ getCategoryIcon(cat.value) }}</span>
<span>{{ cat.label }}</span>
<span v-if="selectedCategory === cat.value" class="material-icons check">check_circle</span>
<span v-if="selectedCategory === cat.value" class="material-icons check notranslate" translate="no">check_circle</span>
</div>
</div>
<div class="sheet-footer">
@ -192,7 +192,7 @@ function getCategoryIcon(category?: string | null) {
<div class="modal-header-new">
<h3>{{ t('coupons.offerDetails') }}</h3>
<button class="close-btn-round" @click="showRedeemModal = false">
<span class="material-icons">close</span>
<span class="material-icons notranslate" translate="no">close</span>
</button>
</div>
@ -205,13 +205,13 @@ function getCategoryIcon(category?: string | null) {
<h2 class="modal-business-title">{{ selectedCoupon.business?.name }}</h2>
<div class="benefit-highlight-box">
<span class="material-icons icon-label">local_offer</span>
<span class="material-icons icon-label notranslate" translate="no">local_offer</span>
<span>{{ selectedCoupon.title }}</span>
</div>
<div class="info-block">
<div class="block-header">
<span class="material-icons icon-desc">description</span>
<span class="material-icons icon-desc notranslate" translate="no">description</span>
<h4>{{ t('coupons.description') }}</h4>
</div>
<p class="block-text">{{ selectedCoupon.description || t('coupons.noDescription') }}</p>
@ -219,7 +219,7 @@ function getCategoryIcon(category?: string | null) {
<div class="info-block">
<div class="block-header">
<span class="material-icons icon-date">calendar_today</span>
<span class="material-icons icon-date notranslate" translate="no">calendar_today</span>
<h4>{{ t('coupons.validity') }}</h4>
</div>
<div class="validity-badge">
@ -229,7 +229,7 @@ function getCategoryIcon(category?: string | null) {
<div v-if="selectedCoupon.category" class="info-block">
<div class="block-header">
<span class="material-icons icon-cat">category</span>
<span class="material-icons icon-cat notranslate" translate="no">category</span>
<h4>{{ t('coupons.category') }}</h4>
</div>
<div class="category-badge-simple">
@ -241,7 +241,7 @@ function getCategoryIcon(category?: string | null) {
<div class="modal-footer-new">
<button class="location-btn-green" @click="handleDirections">
<span class="material-icons">place</span>
<span class="material-icons notranslate" translate="no">place</span>
{{ t('coupons.viewLocation') }}
</button>
</div>

View File

@ -163,7 +163,7 @@ function resetFilters() {
<!-- Búsqueda -->
<div class="search-wrap">
<span class="material-icons search-icon">search</span>
<span class="material-icons search-icon notranslate" translate="no">search</span>
<input
v-model="searchQuery"
type="text"
@ -171,7 +171,7 @@ function resetFilters() {
:placeholder="t('discover.searchPlaceholder')"
/>
<button v-if="searchQuery" class="search-clear" @click="searchQuery = ''">
<span class="material-icons">close</span>
<span class="material-icons notranslate" translate="no">close</span>
</button>
</div>
</header>
@ -181,24 +181,24 @@ function resetFilters() {
<div class="filters-row">
<!-- Filtro Categoría -->
<div class="filter-select-wrap">
<span class="material-icons filter-icon">category</span>
<span class="material-icons filter-icon notranslate" translate="no">category</span>
<select v-model="selectedCategory" class="filter-select">
<option v-for="cat in categories" :key="cat" :value="cat">
{{ catEmoji(cat) }} {{ catName(cat) }}
</option>
</select>
<span class="material-icons select-arrow">expand_more</span>
<span class="material-icons select-arrow notranslate" translate="no">expand_more</span>
</div>
<!-- Filtro Área -->
<div class="filter-select-wrap">
<span class="material-icons filter-icon">location_on</span>
<span class="material-icons filter-icon notranslate" translate="no">location_on</span>
<select v-model="selectedArea" class="filter-select">
<option v-for="area in areas" :key="area" :value="area">
{{ area === 'Todas' ? t('discover.allAreas') : area }}
</option>
</select>
<span class="material-icons select-arrow">expand_more</span>
<span class="material-icons select-arrow notranslate" translate="no">expand_more</span>
</div>
</div>
</div>
@ -209,10 +209,10 @@ function resetFilters() {
</div>
<div v-else-if="error" class="state-center">
<span class="material-icons error-icon">error_outline</span>
<span class="material-icons error-icon notranslate" translate="no">error_outline</span>
<p class="error-text">{{ error }}</p>
<button class="cta-btn" @click="loadBusinesses()">
<span class="material-icons">refresh</span>
<span class="material-icons notranslate" translate="no">refresh</span>
{{ t('common.retry') }}
</button>
</div>
@ -227,7 +227,7 @@ function resetFilters() {
{{ t('discover.results', { count: filteredBusinesses.length }) }}
</span>
<button class="reset-btn" @click="resetFilters">
<span class="material-icons">refresh</span>
<span class="material-icons notranslate" translate="no">refresh</span>
{{ t('common.clear') }}
</button>
</div>
@ -253,7 +253,7 @@ function resetFilters() {
</div>
<div v-else class="empty-state">
<span class="material-icons empty-icon">search_off</span>
<span class="material-icons empty-icon notranslate" translate="no">search_off</span>
<h2 class="empty-title">{{ t('discover.noResults') }}</h2>
<p class="empty-sub">{{ t('discover.noResultsDesc') }}</p>
</div>
@ -300,7 +300,7 @@ function resetFilters() {
</div>
<div v-if="businesses.length === 0" class="empty-state">
<span class="material-icons empty-icon">storefront</span>
<span class="material-icons empty-icon notranslate" translate="no">storefront</span>
<h2 class="empty-title">{{ t('discover.empty') }}</h2>
<p class="empty-sub">{{ t('discover.emptyDesc') }}</p>
</div>

View File

@ -10,7 +10,7 @@
<!-- Verification Status Banner -->
<div v-if="!isVerified" class="status-banner pending">
<span class="material-icons">hourglass_empty</span>
<span class="material-icons notranslate" translate="no">hourglass_empty</span>
<div class="banner-text">
<h3>Tu cuenta está pendiente de verificación</h3>
<p>Un administrador revisará tus documentos pronto. Mientras tanto, algunas funciones están limitadas.</p>
@ -18,7 +18,7 @@
</div>
<div v-else class="status-banner verified">
<span class="material-icons">verified</span>
<span class="material-icons notranslate" translate="no">verified</span>
<div class="banner-text">
<h3>Cuenta Verificada</h3>
<p>¡Felicidades! Tu cuenta está activa y puedes operar en el sistema.</p>
@ -62,12 +62,12 @@
:class="isInService ? 'service-btn stop' : 'service-btn start'"
:disabled="!isVerified || isLocating"
>
<span class="material-icons">{{ isInService ? 'location_off' : 'location_on' }}</span>
<span class="material-icons notranslate" translate="no">{{ isInService ? 'location_off' : 'location_on' }}</span>
{{ isInService ? 'Detener Servicio' : 'Iniciar Servicio' }}
</button>
<div v-if="isLocating" class="locating-spinner">
<span class="material-icons spin">refresh</span>
<span class="material-icons spin notranslate" translate="no">refresh</span>
Obteniendo ubicación...
</div>
</div>

View File

@ -104,7 +104,7 @@ const hasVisibleItems = computed(() =>
:class="{ 'chip--active': selectedFilter === f.key }"
@click="selectedFilter = f.key"
>
<span class="material-icons chip-icon">{{ f.icon }}</span>
<span class="material-icons chip-icon notranslate" translate="no">{{ f.icon }}</span>
{{ f.label }}
</button>
</div>
@ -129,14 +129,14 @@ const hasVisibleItems = computed(() =>
<h2 class="empty-title">{{ t('favorites.empty.title') }}</h2>
<p class="empty-sub">{{ t('favorites.empty.description') }}</p>
<button class="cta-btn" @click="router.push('/map')">
<span class="material-icons">explore</span>
<span class="material-icons notranslate" translate="no">explore</span>
{{ t('favorites.cta.exploreNow') }}
</button>
</div>
<!-- Empty de categoría -->
<div v-else-if="!hasVisibleItems" class="empty-state empty-state--sm">
<span class="material-icons empty-cat-icon">search_off</span>
<span class="material-icons empty-cat-icon notranslate" translate="no">search_off</span>
<p class="empty-sub">{{ t('favorites.empty.noResultsCategory') }}</p>
</div>
@ -146,7 +146,7 @@ const hasVisibleItems = computed(() =>
<!-- RUTAS -->
<section v-if="visibleRoutes.length > 0" class="fav-section">
<div class="section-label">
<span class="material-icons">directions_bus</span>
<span class="material-icons notranslate" translate="no">directions_bus</span>
<span>{{ t('favorites.tabs.routes') }}</span>
</div>
<div class="card-list">
@ -157,14 +157,14 @@ const hasVisibleItems = computed(() =>
@click="navigateToItem(item)"
>
<div class="card-thumb card-thumb--yellow">
<span class="material-icons">directions_bus</span>
<span class="material-icons notranslate" translate="no">directions_bus</span>
</div>
<div class="card-info">
<p class="card-name">{{ item.item_name }}</p>
<p class="card-sub">{{ t('favorites.viewSchedules') }}</p>
</div>
<button class="heart-btn heart-btn--active" @click.stop="removeFavorite($event, item.item_type, item.item_id)" :title="t('favorites.removeTitle')">
<span class="material-icons">favorite</span>
<span class="material-icons notranslate" translate="no">favorite</span>
</button>
</div>
</div>
@ -173,7 +173,7 @@ const hasVisibleItems = computed(() =>
<!-- TAXIS -->
<section v-if="visibleTaxis.length > 0" class="fav-section">
<div class="section-label">
<span class="material-icons">local_taxi</span>
<span class="material-icons notranslate" translate="no">local_taxi</span>
<span>{{ t('favorites.tabs.taxis') }}</span>
</div>
<div class="card-list">
@ -197,10 +197,10 @@ const hasVisibleItems = computed(() =>
@click.stop
title="Llamar ahora"
>
<span class="material-icons">phone_in_talk</span>
<span class="material-icons notranslate" translate="no">phone_in_talk</span>
</a>
<button class="heart-btn heart-btn--active" @click.stop="removeFavorite($event, item.item_type, item.item_id)" :title="t('favorites.removeTitle')">
<span class="material-icons">favorite</span>
<span class="material-icons notranslate" translate="no">favorite</span>
</button>
</div>
</div>
@ -209,7 +209,7 @@ const hasVisibleItems = computed(() =>
<!-- SHUTTLES -->
<section v-if="visibleShuttles.length > 0" class="fav-section">
<div class="section-label">
<span class="material-icons">airport_shuttle</span>
<span class="material-icons notranslate" translate="no">airport_shuttle</span>
<span>Viajes Turísticos</span>
</div>
<div class="card-list">
@ -227,7 +227,7 @@ const hasVisibleItems = computed(() =>
<p class="card-sub">Ver detalles</p>
</div>
<button class="heart-btn heart-btn--active" @click.stop="removeFavorite($event, item.item_type, item.item_id)">
<span class="material-icons">favorite</span>
<span class="material-icons notranslate" translate="no">favorite</span>
</button>
</div>
</div>
@ -236,7 +236,7 @@ const hasVisibleItems = computed(() =>
<!-- NEGOCIOS -->
<section v-if="visibleBusinesses.length > 0" class="fav-section">
<div class="section-label">
<span class="material-icons">store</span>
<span class="material-icons notranslate" translate="no">store</span>
<span>{{ t('favorites.tabs.businesses') }}</span>
</div>
<div class="biz-grid">
@ -249,7 +249,7 @@ const hasVisibleItems = computed(() =>
<div class="biz-img">
<AppImage :src="item.item_image" type="business" :alt="item.item_name" />
<button class="heart-btn heart-btn--active heart-btn--overlay" @click.stop="removeFavorite($event, item.item_type, item.item_id)">
<span class="material-icons">favorite</span>
<span class="material-icons notranslate" translate="no">favorite</span>
</button>
<span class="biz-badge">{{ t('favorites.tabs.businesses') }}</span>
</div>
@ -264,7 +264,7 @@ const hasVisibleItems = computed(() =>
<!-- EVENTOS / CUPONES -->
<section v-if="visibleCoupons.length > 0" class="fav-section">
<div class="section-label">
<span class="material-icons">confirmation_number</span>
<span class="material-icons notranslate" translate="no">confirmation_number</span>
<span>{{ t('favorites.tabs.coupons') }}</span>
</div>
<div class="card-list">
@ -276,14 +276,14 @@ const hasVisibleItems = computed(() =>
>
<div class="card-thumb card-thumb--event">
<AppImage v-if="item.item_image" :src="item.item_image" type="coupon" class="thumb-img" />
<span v-else class="material-icons">local_activity</span>
<span v-else class="material-icons notranslate" translate="no">local_activity</span>
</div>
<div class="card-info">
<p class="card-name">{{ item.item_name }}</p>
<span class="badge-avail">{{ t('favorites.tabs.coupons') }}</span>
</div>
<button class="heart-btn heart-btn--active" @click.stop="removeFavorite($event, item.item_type, item.item_id)" :title="t('favorites.removeTitle')">
<span class="material-icons">favorite</span>
<span class="material-icons notranslate" translate="no">favorite</span>
</button>
</div>
</div>
@ -292,7 +292,7 @@ const hasVisibleItems = computed(() =>
<!-- PARADAS -->
<section v-if="visibleStops.length > 0" class="fav-section">
<div class="section-label">
<span class="material-icons">location_on</span>
<span class="material-icons notranslate" translate="no">location_on</span>
<span>{{ t('navigation.routes') }}</span>
</div>
<div class="card-list">
@ -303,14 +303,14 @@ const hasVisibleItems = computed(() =>
@click="navigateToItem(item)"
>
<div class="card-thumb card-thumb--blue">
<span class="material-icons">location_on</span>
<span class="material-icons notranslate" translate="no">location_on</span>
</div>
<div class="card-info">
<p class="card-name">{{ item.item_name }}</p>
<span class="badge-avail">{{ t('favorites.saved') }}</span>
</div>
<button class="heart-btn heart-btn--active" @click.stop="removeFavorite($event, item.item_type, item.item_id)">
<span class="material-icons">favorite</span>
<span class="material-icons notranslate" translate="no">favorite</span>
</button>
</div>
</div>

View File

@ -13,7 +13,7 @@
</button>
<button class="btn-glow" @click="launchApp">
<span>Abrir app</span>
<span class="material-icons">arrow_forward</span>
<span class="material-icons notranslate" translate="no">arrow_forward</span>
</button>
</div>
</div>
@ -45,11 +45,11 @@
<div class="hero__btns fade-in-up" style="animation-delay: 0.4s;">
<button class="btn-primary" @click="launchApp">
<span class="material-icons">directions_bus</span>
<span class="material-icons notranslate" translate="no">directions_bus</span>
Rastrear mi bus
</button>
<button class="btn-secondary" @click="scrollToInstall">
<span class="material-icons">help_outline</span>
<span class="material-icons notranslate" translate="no">help_outline</span>
Instalación
</button>
</div>
@ -62,7 +62,7 @@
<div class="feature-card reveal">
<div class="feature-card__icon-wrap cyan-glow">
<span class="material-icons feature-card__icon">my_location</span>
<span class="material-icons feature-card__icon notranslate" translate="no">my_location</span>
</div>
<h3 class="feature-card__title">Monitoreo Exacto</h3>
<p class="feature-card__desc">Conoce la ubicación exacta de cada unidad y el tiempo real que tardará en llegar a tu parada. Se acabaron las esperas a ciegas.</p>
@ -70,7 +70,7 @@
<div class="feature-card reveal" style="transition-delay: 0.1s;">
<div class="feature-card__icon-wrap yellow-glow">
<span class="material-icons feature-card__icon">local_offer</span>
<span class="material-icons feature-card__icon notranslate" translate="no">local_offer</span>
</div>
<h3 class="feature-card__title">Ofertas Locales</h3>
<p class="feature-card__desc">Descubre negocios cerca de tu ruta y accede a descuentos exclusivos mientras esperas o viajas.</p>
@ -78,7 +78,7 @@
<div class="feature-card reveal" style="transition-delay: 0.2s;">
<div class="feature-card__icon-wrap pink-glow">
<span class="material-icons feature-card__icon">bolt</span>
<span class="material-icons feature-card__icon notranslate" translate="no">bolt</span>
</div>
<h3 class="feature-card__title">Acceso Instantáneo</h3>
<p class="feature-card__desc">Nuestra tecnología PWA la instala directo en tu pantalla de inicio en segundos, sin pasar por los molestos registros de la App Store.</p>
@ -121,11 +121,11 @@
</li>
<li>
<div class="icard__step-num">2</div>
<div>Toca el botón <strong>Compartir</strong> <span class="material-icons step-inline-icon">ios_share</span></div>
<div>Toca el botón <strong>Compartir</strong> <span class="material-icons step-inline-icon notranslate" translate="no">ios_share</span></div>
</li>
<li>
<div class="icard__step-num">3</div>
<div>Selecciona <strong>Agregar a inicio</strong> <span class="material-icons step-inline-icon">add_box</span></div>
<div>Selecciona <strong>Agregar a inicio</strong> <span class="material-icons step-inline-icon notranslate" translate="no">add_box</span></div>
</li>
</ol>
</div>
@ -134,7 +134,7 @@
<div class="icard reveal" style="transition-delay: 0.15s;">
<div class="icard__header">
<div class="icard__icon icard__icon--android">
<span class="material-icons">android</span>
<span class="material-icons notranslate" translate="no">android</span>
</div>
<div>
<h3 class="icard__device">Android</h3>
@ -161,7 +161,7 @@
<div class="install__footer reveal">
<button class="btn-primary btn-primary--large" @click="launchApp">
<span class="material-icons">directions_bus</span>
<span class="material-icons notranslate" translate="no">directions_bus</span>
Continuar a la Aplicación
</button>
</div>

View File

@ -612,7 +612,7 @@ watch([() => authStore.userProfile?.auto_location, isLoaded], ([canLocate, loade
<div class="map-floating-controls">
<button v-if="isLoaded && !showPromos && featuredActivities.length > 0" class="activities-fab pulse" @click="showPromos = true">
<span class="material-icons">local_activity</span>
<span class="material-icons notranslate" translate="no">local_activity</span>
<span v-if="featuredActivities.length > 0" class="activities-badge">{{ featuredActivities.length }}</span>
</button>
@ -625,7 +625,7 @@ watch([() => authStore.userProfile?.auto_location, isLoaded], ([canLocate, loade
@click="locateUser"
>
<div class="btn-content">
<span class="material-icons">my_location</span>
<span class="material-icons notranslate" translate="no">my_location</span>
<span v-if="isMapMoved" class="btn-text">Volver a Mi Ubicación</span>
</div>
</button>

View File

@ -127,10 +127,10 @@ const getFullUrl = (path: string) => getImageUrl(path)
<div class="avatar-container">
<div v-if="userPhoto" class="avatar-img" :style="{ backgroundImage: `url(${getFullUrl(userPhoto)})` }"></div>
<div v-else class="avatar-placeholder">
<span class="material-icons">person</span>
<span class="material-icons notranslate" translate="no">person</span>
</div>
<button class="edit-badge" @click="showEditModal = true">
<span class="material-icons">edit</span>
<span class="material-icons notranslate" translate="no">edit</span>
</button>
</div>
@ -140,7 +140,7 @@ const getFullUrl = (path: string) => getImageUrl(path)
<div class="badge-row">
<span class="role-badge">{{ userRole }}</span>
<span v-if="autoLocation" class="smart-badge">
<span class="material-icons">gps_fixed</span>
<span class="material-icons notranslate" translate="no">gps_fixed</span>
Smart Location
</span>
</div>
@ -148,7 +148,7 @@ const getFullUrl = (path: string) => getImageUrl(path)
<div class="header-actions">
<button class="logout-icon-btn" @click="handleLogout" :title="t('profile.logoutTitle')">
<span class="material-icons">logout</span>
<span class="material-icons notranslate" translate="no">logout</span>
</button>
</div>
</div>
@ -162,7 +162,7 @@ const getFullUrl = (path: string) => getImageUrl(path)
<div v-if="couponStore.myCoupons.length === 0" class="empty-coupons">
<div class="empty-icon-circle">
<span class="material-icons">confirmation_number</span>
<span class="material-icons notranslate" translate="no">confirmation_number</span>
</div>
<h3>{{ t('profile.emptyCoupons') }}</h3>
<p>{{ t('profile.exploreOffers') }}</p>
@ -189,7 +189,7 @@ const getFullUrl = (path: string) => getImageUrl(path)
class="btn-use"
@click="showQR(userCoupon.redemption_code, userCoupon.coupon?.title || '')"
>
<span class="material-icons">qr_code_2</span>
<span class="material-icons notranslate" translate="no">qr_code_2</span>
{{ t('profile.viewCode') }}
</button>
</div>
@ -207,7 +207,7 @@ const getFullUrl = (path: string) => getImageUrl(path)
<div class="modal-header">
<h2>{{ t('profile.editProfile') }}</h2>
<button class="close-btn" @click="showEditModal = false">
<span class="material-icons">close</span>
<span class="material-icons notranslate" translate="no">close</span>
</button>
</div>
@ -216,10 +216,10 @@ const getFullUrl = (path: string) => getImageUrl(path)
<div class="photo-preview-container">
<div v-if="photoPreview" class="preview-img" :style="{ backgroundImage: `url(${getFullUrl(photoPreview)})` }"></div>
<div v-else class="preview-placeholder">
<span class="material-icons">person</span>
<span class="material-icons notranslate" translate="no">person</span>
</div>
<label for="photo-input" class="photo-label">
<span class="material-icons">photo_camera</span>
<span class="material-icons notranslate" translate="no">photo_camera</span>
</label>
</div>
<input id="photo-input" type="file" @change="handlePhotoChange" accept="image/*" hidden>
@ -248,7 +248,7 @@ const getFullUrl = (path: string) => getImageUrl(path)
<div class="modal-actions">
<button type="button" class="btn-cancel" @click="showEditModal = false">{{ t('profile.cancel') }}</button>
<button type="submit" class="btn-save" :disabled="isUpdating">
<span v-if="isUpdating" class="material-icons spin">refresh</span>
<span v-if="isUpdating" class="material-icons spin notranslate" translate="no">refresh</span>
{{ isUpdating ? t('profile.saving') : t('profile.save') }}
</button>
</div>
@ -260,17 +260,17 @@ const getFullUrl = (path: string) => getImageUrl(path)
<div v-if="showQRModal" class="modal-overlay" @click.self="showQRModal = false">
<div class="qr-modal">
<button class="close-modal" @click="showQRModal = false">
<span class="material-icons">close</span>
<span class="material-icons notranslate" translate="no">close</span>
</button>
<div class="qr-header">
<span class="material-icons">verified</span>
<span class="material-icons notranslate" translate="no">verified</span>
<h3>{{ t('profile.qrTitle') }}</h3>
</div>
<p class="promo-title">{{ selectedTitle }}</p>
<div class="qr-content">
<div class="qr-placeholder">
<span class="material-icons">qr_code_2</span>
<span class="material-icons notranslate" translate="no">qr_code_2</span>
</div>
<div class="redemption-box">
<p>{{ t('profile.qrCode') }}</p>

View File

@ -322,11 +322,11 @@ async function toggleCouponStatus(coupon: Coupon) {
<button v-if="activeTab === 'businesses'" class="primary-btn" @click="openCreateBusinessModal">
<span class="material-icons">add</span>
<span class="material-icons notranslate" translate="no">add</span>
Crear Actividad / Negocio
</button>
<button v-if="activeTab === 'shuttles'" class="primary-btn" @click="$router.push('/admin/shuttles')">
<span class="material-icons">rocket_launch</span>
<span class="material-icons notranslate" translate="no">rocket_launch</span>
Nuevo Shuttle
</button>
</div>
@ -335,11 +335,11 @@ async function toggleCouponStatus(coupon: Coupon) {
<!-- Global Search Bar (Visible in Promos/Businesses) -->
<div class="search-filter-bar">
<div class="search-box">
<span class="material-icons">search</span>
<span class="material-icons notranslate" translate="no">search</span>
<input v-model="searchQuery" type="text" :placeholder="activeTab === 'businesses' ? 'Buscar negocio o actividad...' : 'Buscar shuttle...'">
</div>
<div class="filter-box">
<span class="material-icons">filter_alt</span>
<span class="material-icons notranslate" translate="no">filter_alt</span>
<select v-model="categoryFilter">
<option v-for="cat in categories" :key="cat" :value="cat">{{ cat }}</option>
</select>
@ -349,12 +349,12 @@ async function toggleCouponStatus(coupon: Coupon) {
<div v-if="activeTab === 'promotions'">
<div class="coupons-section">
<div v-if="isLoading" class="loading-state">
<span class="material-icons spin">refresh</span>
<span class="material-icons spin notranslate" translate="no">refresh</span>
Cargando promociones...
</div>
<div v-else-if="coupons.length === 0" class="empty-state">
<span class="material-icons">sentiment_dissatisfied</span>
<span class="material-icons notranslate" translate="no">sentiment_dissatisfied</span>
<p>No hay cupones creados aún.</p>
</div>
@ -378,7 +378,7 @@ async function toggleCouponStatus(coupon: Coupon) {
<div>
<strong>{{ coupon.title }}</strong>
<div class="business-tag">
<span class="material-icons">store</span>
<span class="material-icons notranslate" translate="no">store</span>
{{ coupon.business?.name || 'Comercio Local' }}
</div>
</div>
@ -402,10 +402,10 @@ async function toggleCouponStatus(coupon: Coupon) {
<td class="text-center">
<div class="action-buttons justify-center">
<button class="icon-btn edit" @click="openEditModal(coupon)">
<span class="material-icons">edit</span>
<span class="material-icons notranslate" translate="no">edit</span>
</button>
<button class="icon-btn delete" @click="deleteCoupon(coupon.id)">
<span class="material-icons">delete</span>
<span class="material-icons notranslate" translate="no">delete</span>
</button>
</div>
</td>
@ -419,7 +419,7 @@ async function toggleCouponStatus(coupon: Coupon) {
<!-- Businesses Tab -->
<div v-if="activeTab === 'businesses'">
<div v-if="businesses.length === 0" class="empty-state">
<span class="material-icons">store_front</span>
<span class="material-icons notranslate" translate="no">store_front</span>
<p>Aún no has registrado ningún negocio local o actividad.</p>
</div>
<div v-else class="table-card">
@ -448,18 +448,18 @@ async function toggleCouponStatus(coupon: Coupon) {
<td class="text-center"><span class="badge area-badge">{{ biz.area }}</span></td>
<td class="text-center">
<div class="contact-info align-center">
<span v-if="biz.phone"><span class="material-icons">phone</span> {{ biz.phone }}</span>
<span v-if="biz.social_media" class="social-tag"><span class="material-icons">share</span> {{ biz.social_media }}</span>
<span v-if="biz.phone"><span class="material-icons notranslate" translate="no">phone</span> {{ biz.phone }}</span>
<span v-if="biz.social_media" class="social-tag"><span class="material-icons notranslate" translate="no">share</span> {{ biz.social_media }}</span>
</div>
</td>
<td class="address-cell text-center">{{ biz.address }}</td>
<td class="text-center">
<div class="action-buttons justify-center">
<button class="icon-btn edit" @click="openEditBusinessModal(biz)">
<span class="material-icons">edit</span>
<span class="material-icons notranslate" translate="no">edit</span>
</button>
<button class="icon-btn delete" @click="deleteBusiness(biz.id)">
<span class="material-icons">delete</span>
<span class="material-icons notranslate" translate="no">delete</span>
</button>
</div>
</td>
@ -472,7 +472,7 @@ async function toggleCouponStatus(coupon: Coupon) {
<!-- Shuttles Tab -->
<div v-if="activeTab === 'shuttles'">
<div v-if="shuttles.length === 0" class="empty-state">
<span class="material-icons">directions_bus</span>
<span class="material-icons notranslate" translate="no">directions_bus</span>
<p>No hay shuttles turísticos registrados.</p>
</div>
<div v-else class="table-card">
@ -495,7 +495,7 @@ async function toggleCouponStatus(coupon: Coupon) {
<div>
<strong>{{ shuttle.route_name }}</strong>
<div class="business-tag">
<span class="material-icons">business</span>
<span class="material-icons notranslate" translate="no">business</span>
{{ shuttle.company_name }}
</div>
</div>
@ -517,7 +517,7 @@ async function toggleCouponStatus(coupon: Coupon) {
<td class="text-center">
<div class="action-buttons justify-center">
<button class="icon-btn delete" @click="deleteShuttle(shuttle.id)">
<span class="material-icons">delete</span>
<span class="material-icons notranslate" translate="no">delete</span>
</button>
</div>
</td>
@ -535,7 +535,7 @@ async function toggleCouponStatus(coupon: Coupon) {
<div class="modal-header">
<h2>{{ isEditing ? 'Editar Cupón' : 'Nuevo Cupón' }}</h2>
<button class="close-btn" @click="showModal = false">
<span class="material-icons">close</span>
<span class="material-icons notranslate" translate="no">close</span>
</button>
</div>

View File

@ -83,7 +83,7 @@ const correlimientos = computed(() => {
<!-- Header -->
<div class="px-6 pt-12 pb-4 flex items-center justify-between sticky top-0 z-50 bg-white/80 dark:bg-background-dark/80 backdrop-blur-md">
<button @click="router.back()" class="size-10 flex items-center justify-center rounded-full bg-slate-100 dark:bg-card-dark text-slate-600 dark:text-gray-300 active:scale-95 transition-transform">
<span class="material-icons text-[20px]">arrow_back</span>
<span class="material-icons text-[20px] notranslate" translate="no">arrow_back</span>
</button>
<h1 class="text-xl font-extrabold tracking-tight text-primary uppercase italic">SIB</h1>
<div class="size-10"></div>
@ -97,7 +97,7 @@ const correlimientos = computed(() => {
class="flex-1 py-3 px-4 rounded-[2rem] flex items-center justify-center gap-2 text-sm font-bold transition-all"
:class="activeTab === 'routes' ? 'bg-primary shadow-lg text-slate-900' : 'bg-transparent text-slate-500 dark:text-gray-500'"
>
<span class="material-icons text-lg">directions_bus</span>
<span class="material-icons text-lg notranslate" translate="no">directions_bus</span>
{{ t('routesView.busTab') }}
</button>
<button
@ -105,7 +105,7 @@ const correlimientos = computed(() => {
class="flex-1 py-3 px-4 rounded-[2rem] flex items-center justify-center gap-2 text-sm font-bold transition-all"
:class="activeTab === 'taxis' ? 'bg-primary shadow-lg text-slate-900' : 'bg-transparent text-slate-500 dark:text-gray-500'"
>
<span class="material-icons text-lg">local_taxi</span>
<span class="material-icons text-lg notranslate" translate="no">local_taxi</span>
{{ t('routesView.taxiTab') }}
</button>
</div>
@ -115,7 +115,7 @@ const correlimientos = computed(() => {
<div v-if="activeTab === 'routes'" class="space-y-4">
<div class="relative group">
<div class="flex items-center gap-3 px-4 h-14 rounded-2xl border border-slate-200 dark:border-white/10 bg-white dark:bg-input-dark">
<span class="material-icons text-primary font-bold">location_on</span>
<span class="material-icons text-primary font-bold notranslate" translate="no">location_on</span>
<input
v-model="originSearch"
@keyup.enter="handleBusSearch"
@ -126,7 +126,7 @@ const correlimientos = computed(() => {
</div>
<div class="relative group">
<div class="flex items-center gap-3 px-4 h-14 rounded-2xl border border-slate-200 dark:border-white/10 bg-white dark:bg-input-dark">
<span class="material-icons text-primary font-bold">flag</span>
<span class="material-icons text-primary font-bold notranslate" translate="no">flag</span>
<input
v-model="destinationSearch"
@keyup.enter="handleBusSearch"
@ -144,7 +144,7 @@ const correlimientos = computed(() => {
<div class="flex-1 space-y-4">
<div class="relative">
<div class="flex items-center gap-3 px-4 h-14 rounded-2xl border border-slate-200 dark:border-white/10 bg-white dark:bg-input-dark">
<span class="material-icons text-primary font-bold">near_me</span>
<span class="material-icons text-primary font-bold notranslate" translate="no">near_me</span>
<select
v-model="selectedCorregimiento"
@change="handleTaxiFilter"
@ -153,7 +153,7 @@ const correlimientos = computed(() => {
<option value="">{{ t('routesView.allCorregimientos') }}</option>
<option v-for="c in correlimientos" :key="c" :value="c">{{ c }}</option>
</select>
<span class="material-icons ml-auto text-gray-500 text-sm">unfold_more</span>
<span class="material-icons ml-auto text-gray-500 text-sm notranslate" translate="no">unfold_more</span>
</div>
</div>
</div>
@ -164,7 +164,7 @@ const correlimientos = computed(() => {
class="size-10 rounded-lg border-2 border-primary flex items-center justify-center bg-transparent cursor-pointer transition-colors"
:class="englishOnly ? 'bg-primary' : ''"
>
<span class="material-icons text-slate-900" v-if="englishOnly">check</span>
<span class="material-icons text-slate-900 notranslate" v-if="englishOnly" translate="no">check</span>
</div>
</div>
</div>
@ -197,7 +197,7 @@ const correlimientos = computed(() => {
<div class="flex justify-between items-center">
<div class="flex items-center gap-4">
<div class="size-14 rounded-2xl bg-primary/10 flex items-center justify-center text-primary">
<span class="material-icons text-[32px]">directions_bus</span>
<span class="material-icons text-[32px] notranslate" translate="no">directions_bus</span>
</div>
<div>
<div class="flex items-center gap-2">
@ -243,7 +243,7 @@ const correlimientos = computed(() => {
<div class="flex items-center gap-4">
<div class="size-14 rounded-2xl bg-primary/10 flex items-center justify-center text-primary overflow-hidden">
<img v-if="taxi.image_url" :src="taxi.image_url" loading="lazy" decoding="async" class="w-full h-full object-cover">
<span v-else class="material-icons text-[32px]">local_taxi</span>
<span v-else class="material-icons text-[32px] notranslate" translate="no">local_taxi</span>
</div>
<div>
<div class="flex items-center gap-2">

View File

@ -233,13 +233,13 @@ onUnmounted(() => {
>
<div class="trigger-left">
<div class="trigger-icon">
<span class="material-icons">directions_bus</span>
<span class="material-icons notranslate" translate="no">directions_bus</span>
</div>
<span class="trigger-text" :class="{ 'trigger-text--selected': hasLocalSelection }">
{{ routeStore.isLoadingRoutes ? t('schedules.loadingRoutes') : (localSelectedRouteName || t('schedules.placeholder')) }}
</span>
</div>
<span class="material-icons trigger-arrow" :class="{ 'trigger-arrow--up': dropdownOpen }">
<span class="material-icons trigger-arrow notranslate" :class="{ 'trigger-arrow--up': dropdownOpen }" translate="no">
expand_more
</span>
</button>
@ -262,9 +262,9 @@ onUnmounted(() => {
:class="{ 'dropdown-item--active': r.id === localSelectedRouteId }"
@click.stop="pickRoute(r.id, r.name)"
>
<span class="material-icons dropdown-item-icon">directions_bus</span>
<span class="material-icons dropdown-item-icon notranslate" translate="no">directions_bus</span>
<span class="dropdown-item-name">{{ r.name }}</span>
<span v-if="r.id === localSelectedRouteId" class="material-icons dropdown-item-check">check</span>
<span v-if="r.id === localSelectedRouteId" class="material-icons dropdown-item-check notranslate" translate="no">check</span>
</button>
<div v-if="routeStore.allRoutes.length === 0" class="dropdown-empty">
{{ t('schedules.noRoutesAvailable') }}
@ -315,7 +315,7 @@ onUnmounted(() => {
<!-- Sin resultados en el filtro -->
<div v-else-if="filteredSchedules.length === 0" class="empty-state empty-state--sm">
<span class="material-icons empty-cat-icon">schedule</span>
<span class="material-icons empty-cat-icon notranslate" translate="no">schedule</span>
<p class="empty-sub">{{ t('schedules.noSchedules') }}</p>
<button class="chip-link" @click="dayFilter = 'all'">{{ t('schedules.viewAll') || 'Ver todos los horarios' }}</button>
</div>
@ -347,14 +347,14 @@ onUnmounted(() => {
</div>
<p class="route-name">{{ localSelectedRouteName }}</p>
<p class="card-detail">
<span class="material-icons card-detail-icon">schedule</span>
<span class="material-icons card-detail-icon notranslate" translate="no">schedule</span>
{{ DAY_TYPES[schedule.schedule_type] || schedule.schedule_type }}
</p>
</div>
<!-- Badge estado -->
<div class="status-badge" :class="dayFilter === 'today' ? `status-badge--${getBusStatus(schedule.departure_time)}` : 'status-badge--upcoming'">
<span class="material-icons status-icon">
<span class="material-icons status-icon notranslate" translate="no">
{{ (dayFilter === 'today' && getBusStatus(schedule.departure_time) === 'departing') ? 'directions_run' :
(dayFilter === 'today' && getBusStatus(schedule.departure_time) === 'ontime') ? 'check_circle' :
(dayFilter === 'today' && getBusStatus(schedule.departure_time) === 'passed') ? 'history' : 'access_time' }}

View File

@ -3,7 +3,7 @@
<div class="header-section">
<div class="top-row">
<button class="download-btn" @click="generateReport">
<span class="material-icons">description</span>
<span class="material-icons notranslate" translate="no">description</span>
Descargar Informe
</button>
<div class="badge">INTELIGENCIA ESTRATÉGICA</div>
@ -19,7 +19,7 @@
:class="{ active: activeTab === 'overview' }"
@click="activeTab = 'overview'"
>
<span class="material-icons">dashboard</span>
<span class="material-icons notranslate" translate="no">dashboard</span>
Visión General
</button>
<button
@ -27,7 +27,7 @@
:class="{ active: activeTab === 'transport' }"
@click="activeTab = 'transport'"
>
<span class="material-icons">directions_bus</span>
<span class="material-icons notranslate" translate="no">directions_bus</span>
Logística de Transporte
</button>
<button
@ -35,13 +35,13 @@
:class="{ active: activeTab === 'commerce' }"
@click="activeTab = 'commerce'"
>
<span class="material-icons">storefront</span>
<span class="material-icons notranslate" translate="no">storefront</span>
Inteligencia Comercial
</button>
</div>
<div v-if="loading" class="loading-state">
<span class="material-icons spin">sync</span>
<span class="material-icons spin notranslate" translate="no">sync</span>
<p>Sincronizando con la red...</p>
</div>
@ -52,14 +52,14 @@
<div class="main-content">
<div class="kpi-grid">
<div class="kpi-card user-active">
<div class="kpi-icon"><span class="material-icons">person</span></div>
<div class="kpi-icon"><span class="material-icons notranslate" translate="no">person</span></div>
<div class="kpi-data">
<span class="kpi-value">{{ stats.users?.registered_active || 0 }}</span>
<span class="kpi-label">Usuarios Registrados Activos</span>
</div>
</div>
<div class="kpi-card">
<div class="kpi-icon"><span class="material-icons">analytics</span></div>
<div class="kpi-icon"><span class="material-icons notranslate" translate="no">analytics</span></div>
<div class="kpi-data">
<span class="kpi-value">{{ totalInteractionCount }}</span>
<span class="kpi-label">Interacciones Totales Hoy</span>
@ -69,7 +69,7 @@
<section class="analysis-section mini">
<div class="section-header">
<span class="material-icons">schedule</span>
<span class="material-icons notranslate" translate="no">schedule</span>
<h2>Mapa de Calor Horario</h2>
</div>
<div class="chart-container large">
@ -79,7 +79,7 @@
</div>
<aside class="side-info">
<div class="info-box">
<span class="material-icons">groups</span>
<span class="material-icons notranslate" translate="no">groups</span>
<h4>Control de Tráfico</h4>
<p>Esta sección muestra la salud general de la app. Si la línea de invitados supera por mucho a la de registrados, es momento de lanzar una campaña de fidelización.</p>
</div>
@ -94,7 +94,7 @@
<!-- RUTAS -->
<section class="analysis-section">
<div class="section-header">
<span class="material-icons">bar_chart</span>
<span class="material-icons notranslate" translate="no">bar_chart</span>
<h2>Rutas Turísticas más Consultadas</h2>
</div>
<div class="chart-container">
@ -105,7 +105,7 @@
<!-- CASETAS -->
<section class="analysis-section">
<div class="section-header">
<span class="material-icons">location_on</span>
<span class="material-icons notranslate" translate="no">location_on</span>
<h2>Puntos de Interés: Casetas (Paradas)</h2>
</div>
<div class="data-table-wrapper">
@ -135,7 +135,7 @@
<!-- RENDIMIENTO SHUTTLES -->
<section class="analysis-section">
<div class="section-header">
<span class="material-icons">trending_up</span>
<span class="material-icons notranslate" translate="no">trending_up</span>
<h2>Tasa de Reservación (Shuttles)</h2>
</div>
<div class="data-table-wrapper">
@ -154,8 +154,8 @@
<td>{{ data.views }}</td>
<td>
<div style="display:flex; gap: 12px; align-items:center;">
<span title="WhatsApp" style="display:flex; align-items:center; gap:2px;"><span class="material-icons" style="font-size:14px; color:#25D366;">chat</span> {{ data.whatsapp }}</span>
<span title="Llamadas" style="display:flex; align-items:center; gap:2px;"><span class="material-icons" style="font-size:14px; color:#cbd5e1;">phone</span> {{ data.calls }}</span>
<span title="WhatsApp" style="display:flex; align-items:center; gap:2px;"><span class="material-icons notranslate" style="font-size:14px; color:#25D366;" translate="no">chat</span> {{ data.whatsapp }}</span>
<span title="Llamadas" style="display:flex; align-items:center; gap:2px;"><span class="material-icons notranslate" style="font-size:14px; color:#cbd5e1;" translate="no">phone</span> {{ data.calls }}</span>
</div>
</td>
<td>
@ -172,7 +172,7 @@
</div>
<aside class="side-info">
<div class="info-box accent">
<span class="material-icons">local_shipping</span>
<span class="material-icons notranslate" translate="no">local_shipping</span>
<h4>Optimización de Logística</h4>
<p>Identifique paradas saturadas para coordinar con los conductores. Las rutas con conversión mayor al 15% son candidatas para ser rutas 'Express'.</p>
</div>
@ -186,14 +186,14 @@
<div class="main-content">
<div class="kpi-grid">
<div class="kpi-card">
<div class="kpi-icon promo"><span class="material-icons">confirmation_number</span></div>
<div class="kpi-icon promo"><span class="material-icons notranslate" translate="no">confirmation_number</span></div>
<div class="kpi-data">
<span class="kpi-value">{{ stats.summary?.total_promo_clicks || 0 }}</span>
<span class="kpi-label">Cupones Activados</span>
</div>
</div>
<div class="kpi-card">
<div class="kpi-icon biz"><span class="material-icons">storefront</span></div>
<div class="kpi-icon biz"><span class="material-icons notranslate" translate="no">storefront</span></div>
<div class="kpi-data">
<span class="kpi-value">{{ stats.summary?.total_biz_views || 0 }}</span>
<span class="kpi-label">Visitas a Negocios</span>
@ -203,7 +203,7 @@
<section class="analysis-section">
<div class="section-header">
<span class="material-icons">ads_click</span>
<span class="material-icons notranslate" translate="no">ads_click</span>
<h2>Impacto de Aliados Comerciales</h2>
</div>
<div class="business-list">
@ -211,11 +211,11 @@
<!-- Business Header -->
<div class="business-header">
<div class="business-title-info">
<div class="biz-icon-box"><span class="material-icons">storefront</span></div>
<div class="biz-icon-box"><span class="material-icons notranslate" translate="no">storefront</span></div>
<h3>{{ name }}</h3>
</div>
<div class="business-total-badge">
<span class="material-icons">data_exploration</span>
<span class="material-icons notranslate" translate="no">data_exploration</span>
<span><b>{{ data.views + data.social + data.calls + data.location + data.promos + data.favs }}</b> Interacciones</span>
</div>
</div>
@ -223,35 +223,35 @@
<!-- Details Grid -->
<div class="business-details-grid">
<div class="detail-item">
<span class="material-icons" style="color:#cbd5e1">visibility</span>
<span class="material-icons notranslate" style="color:#cbd5e1" translate="no">visibility</span>
<div class="detail-info">
<span class="detail-value">{{ data.views }}</span>
<span class="detail-label">Vistas del Local</span>
</div>
</div>
<div class="detail-item">
<span class="material-icons" style="color:#25D366">chat</span>
<span class="material-icons notranslate" style="color:#25D366" translate="no">chat</span>
<div class="detail-info">
<span class="detail-value">{{ data.social }}</span>
<span class="detail-label">Redes / WP</span>
</div>
</div>
<div class="detail-item">
<span class="material-icons" style="color:#f87171">phone</span>
<span class="material-icons notranslate" style="color:#f87171" translate="no">phone</span>
<div class="detail-info">
<span class="detail-value">{{ data.calls }}</span>
<span class="detail-label">Llamadas Directas</span>
</div>
</div>
<div class="detail-item">
<span class="material-icons" style="color:#60a5fa">place</span>
<span class="material-icons notranslate" style="color:#60a5fa" translate="no">place</span>
<div class="detail-info">
<span class="detail-value">{{ data.location }}</span>
<span class="detail-label">Usos del Mapa</span>
</div>
</div>
<div class="detail-item">
<span class="material-icons" style="color:#e91e63">favorite</span>
<span class="material-icons notranslate" style="color:#e91e63" translate="no">favorite</span>
<div class="detail-info">
<span class="detail-value">{{ data.favs }}</span>
<span class="detail-label">Veces Favorito</span>
@ -263,7 +263,7 @@
<div class="business-coupons-section" :class="{ 'has-coupons': Object.keys(data.coupons || {}).length > 0 }">
<div class="coupons-header">
<div style="display:flex; align-items:center; gap: 8px;">
<span class="material-icons" style="color:#fee715">confirmation_number</span>
<span class="material-icons notranslate" style="color:#fee715" translate="no">confirmation_number</span>
<h4>Tráfico por Promociones</h4>
</div>
<div class="status-pill-wrap">
@ -276,18 +276,18 @@
<div v-if="Object.keys(data.coupons || {}).length > 0" class="coupon-list">
<div v-for="(couponData, couponName) in data.coupons" :key="couponName" class="coupon-item">
<div class="coupon-name-box">
<span class="material-icons" style="font-size:14px; color:var(--text-secondary)">local_offer</span>
<span class="material-icons notranslate" style="font-size:14px; color:var(--text-secondary)" translate="no">local_offer</span>
<span class="coupon-name">{{ couponName }}</span>
</div>
<div class="coupon-stats">
<span class="stat" title="Clicks a la promo"><span class="material-icons">visibility</span> {{ couponData.views }}</span>
<span class="stat" title="Clicks al mapa desde promo"><span class="material-icons">place</span> {{ couponData.location }}</span>
<span class="stat" title="Clicks a la promo"><span class="material-icons notranslate" translate="no">visibility</span> {{ couponData.views }}</span>
<span class="stat" title="Clicks al mapa desde promo"><span class="material-icons notranslate" translate="no">place</span> {{ couponData.location }}</span>
</div>
</div>
</div>
<div v-else class="no-coupons">
<span class="material-icons">info</span> No hay promociones generadas.
<span class="material-icons notranslate" translate="no">info</span> No hay promociones generadas.
</div>
</div>
@ -297,7 +297,7 @@
</div>
<aside class="side-info">
<div class="info-box">
<span class="material-icons">shopping_bag</span>
<span class="material-icons notranslate" translate="no">shopping_bag</span>
<h4>Retorno Comercial</h4>
<p>Analice qué negocios están monetizando mejor el tráfico de SIB. Use estos datos para ofrecer espacios publicitarios premium a los negocios con salud 'Baja'.</p>
</div>

View File

@ -6,7 +6,6 @@ import { useRoute } from 'vue-router'
const { t } = useI18n()
const route = useRoute()
// Solo mostrar el header con tabs en las vistas principales
const isMainView = computed(() => {
return route.name === 'TaxisLocales' || route.name === 'ViajesTuristicos'
})
@ -18,7 +17,6 @@ const reloadPage = () => {
onMounted(async () => {
try {
// Aquí iría cualquier inicialización global del layout si fuera necesaria
console.log('Transporte Hub mounted')
} catch (e) {
console.error('Error mounting Transporte Hub:', e)
@ -31,30 +29,44 @@ onMounted(async () => {
<div class="taxi-view">
<header v-if="isMainView" class="header-main">
<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">
<router-link to="/transporte/taxis" class="hub-tab" active-class="active" exact-active-class="active">
<span class="material-icons">local_taxi</span>
<router-link
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') }}
</router-link>
<router-link to="/transporte/viajes-turisticos" class="hub-tab" active-class="active" :class="{ 'active': route.path.includes('viajes-turisticos') }">
<span class="material-icons">directions_bus</span>
<router-link
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') }}
</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>
</nav>
</header>
<div v-if="mountError" class="error-container">
<span class="material-icons">error_outline</span>
<div v-if="mountError" class="error-container" role="alert">
<span class="material-icons notranslate" translate="no" aria-hidden="true">error_outline</span>
<p>{{ t('taxi.errorLoading') }}</p>
<button @click="reloadPage" class="retry-btn">
<span class="material-icons">refresh</span>
<span class="material-icons notranslate" translate="no" aria-hidden="true">refresh</span>
{{ t('common.retry') }}
</button>
</div>
<router-view v-else v-slot="{ Component }">
<transition name="fade" mode="out-in">
<keep-alive>
@ -67,21 +79,21 @@ onMounted(async () => {
<style scoped>
.taxi-view {
min-height: 100vh;
min-height: 100dvh;
position: relative;
padding: 0 0 150px;
}
.header-main {
padding: 24px 16px;
text-align: center;
padding: 24px 16px;
text-align: center;
}
.brand-title {
color: var(--header-text);
font-size: 1.5rem;
font-weight: 800;
margin: 0;
color: var(--header-text);
font-size: 1.5rem;
font-weight: 800;
margin: 0;
}
/* Transport Hub Tabs */
@ -114,7 +126,7 @@ onMounted(async () => {
font-size: 0.9rem;
cursor: pointer;
z-index: 2;
transition: color 0.3s;
transition: color 0.2s;
display: flex;
align-items: center;
justify-content: center;
@ -122,6 +134,13 @@ onMounted(async () => {
text-decoration: none;
overflow: hidden;
position: relative;
min-height: 44px;
border-radius: 12px;
}
.hub-tab:focus-visible {
outline: 2px solid var(--active-color);
outline-offset: 2px;
}
.hub-tab::after {
@ -135,7 +154,7 @@ onMounted(async () => {
border-radius: 50%;
opacity: 0;
transform: translate(-50%, -50%) scale(0);
transition: all 0.5s ease;
transition: all 0.4s ease;
}
.hub-tab:active::after {
@ -162,7 +181,7 @@ onMounted(async () => {
width: calc(50% - 6px);
background: #FEE715;
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;
box-shadow: 0 4px 20px rgba(254, 231, 21, 0.4);
will-change: transform;
@ -172,15 +191,31 @@ onMounted(async () => {
transform: translateX(calc(100% + 4px));
}
@media (prefers-reduced-motion: reduce) {
.tab-slider {
transition: none;
}
.hub-tab {
transition: none;
}
}
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.2s ease;
transition: opacity 0.18s ease;
}
.fade-enter-from,
.fade-leave-to {
opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
.fade-enter-active,
.fade-leave-active {
transition: none;
}
}
.error-container {
display: flex;
flex-direction: column;
@ -209,10 +244,16 @@ onMounted(async () => {
display: flex;
align-items: center;
gap: 8px;
transition: transform 0.2s;
transition: transform 0.15s ease;
min-height: 44px;
}
.retry-btn:active {
transform: scale(0.95);
}
.retry-btn:focus-visible {
outline: 2px solid var(--active-color);
outline-offset: 2px;
}
</style>

View File

@ -21,7 +21,7 @@ onMounted(async () => {
cargando.value = true
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
.from('shuttles')
.select('*')
@ -39,19 +39,16 @@ onMounted(async () => {
})
const parsePrice = (priceVal?: number | string | null): string => {
if (!priceVal) return '0.00';
const num = typeof priceVal === 'string' ? parseFloat(priceVal) : priceVal;
return Number.isNaN(num) ? '0.00' : num.toFixed(2);
};
if (!priceVal) return '0.00'
const num = typeof priceVal === 'string' ? parseFloat(priceVal) : priceVal
return Number.isNaN(num) ? '0.00' : num.toFixed(2)
}
const volver = () => {
// Leer la ruta padre desde el meta de la ruta actual
const rutaPadre = route.meta.padre as string | undefined
if (rutaPadre) {
router.push({ name: rutaPadre })
} else {
// Fallback seguro
router.push('/transporte/viajes-turisticos')
}
}
@ -65,11 +62,18 @@ const getTripTypeLabel = (type: string) => {
</script>
<template>
<div class="shuttle-detalle-container bg-[var(--bg-primary)] pb-24 min-h-screen relative">
<!-- Header con botón volver (Solid background to avoid overlap on scroll) -->
<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);">
<button @click="volver" class="p-2 rounded-full hover:bg-[var(--hover-bg)] flex items-center justify-center transition">
<span class="material-icons text-[var(--text-primary)]">arrow_back</span>
<div class="shuttle-detalle bg-[var(--bg-primary)] pb-24 min-h-dvh relative">
<!-- Sticky header -->
<div
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"
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>
<h1 class="font-bold text-[var(--text-primary)] text-lg truncate flex-1">
{{ shuttle?.company_name || t('shuttle.detailTitle') }}
@ -84,129 +88,158 @@ const getTripTypeLabel = (type: string) => {
</div>
<!-- Loading -->
<div v-if="cargando" class="flex flex-col justify-center items-center h-64 gap-3 w-full">
<LoadingBranded :message="t('common.loading') || 'Cargando detalle...'" icon="airport_shuttle" />
<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" />
</div>
<!-- Error -->
<div v-else-if="error" class="flex flex-col items-center justify-center h-64 px-6 text-center">
<span class="material-icons text-red-500 text-5xl mb-3">error_outline</span>
<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" aria-hidden="true">error_outline</span>
<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') }}
</button>
</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">
<!-- Imagen -->
<div v-if="shuttle.image_url" class="relative w-full h-56 md:h-64 rounded-2xl overflow-hidden shadow-sm">
<AppImage
<!-- Hero image -->
<div
v-if="shuttle.image_url"
class="relative w-full rounded-2xl overflow-hidden shadow-sm"
style="aspect-ratio: 16/9;"
>
<AppImage
:src="shuttle.image_url"
type="shuttle"
:alt="shuttle.company_name"
imgClass="w-full h-full object-cover"
:alt="`Imagen de ${shuttle.company_name || 'shuttle'}`"
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">
<span class="material-icons text-sm" style="color: var(--active-color)">directions_bus</span>
{{ shuttle.vehicle_type }}
<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>
{{ shuttle.vehicle_type }}
</div>
</div>
<!-- Rutas Origen - Destino prominente -->
<div class="bg-[var(--bg-secondary)] rounded-2xl p-5 shadow-sm space-y-3 border border-border">
<div class="flex items-center justify-between">
<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="font-bold text-[var(--text-primary)] text-lg leading-tight break-words">
{{ shuttle.origin }}
</span>
</div>
<div class="flex flex-col items-center px-4 shrink-0">
<span class="text-xs text-[var(--text-secondary)] font-bold mb-1">{{ shuttle.estimated_duration }}</span>
<div class="w-16 border-t-2 border-dashed border-border 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">east</span>
</div>
</div>
<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="font-bold text-[var(--text-primary)] text-lg leading-tight break-words">
{{ shuttle.destination }}
</span>
</div>
</div>
<!-- Route card -->
<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 flex-col flex-1">
<span class="route-sublabel">{{ t('shuttle.origin') }}</span>
<span class="route-city">{{ shuttle.origin }}</span>
</div>
<div class="flex flex-col items-center px-4 shrink-0" aria-hidden="true">
<span class="route-duration">{{ shuttle.estimated_duration }}</span>
<div class="route-line relative my-1">
<span class="material-icons route-arrow notranslate" translate="no">east</span>
</div>
</div>
<div class="flex flex-col flex-1 text-right">
<span class="route-sublabel">{{ t('shuttle.destination') }}</span>
<span class="route-city">{{ shuttle.destination }}</span>
</div>
</div>
</div>
<!-- Info principal -->
<div class="bg-[var(--bg-secondary)] rounded-2xl p-5 shadow-sm space-y-4 border border-border">
<!-- Info card -->
<div class="bg-[var(--bg-secondary)] rounded-2xl p-5 shadow-sm space-y-4 border border-[var(--border-color)]">
<div>
<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 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">
<span class="text-xs text-[var(--text-secondary)] uppercase tracking-wider font-semibold flex items-center gap-1"><span class="material-icons text-sm">schedule</span> {{ t('shuttle.departureTimes') }}</span>
<span class="font-semibold text-[var(--text-primary)] bg-[var(--bg-primary)] p-2 rounded-lg text-sm text-center border border-border">
{{ shuttle.departure_times }}
</span>
<dt class="info-label">
<span class="material-icons text-sm notranslate" translate="no" aria-hidden="true">schedule</span>
{{ t('shuttle.departureTimes') }}
</dt>
<dd class="info-value">{{ shuttle.departure_times }}</dd>
</div>
<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">swap_horiz</span> {{ t('shuttle.tripType') }}</span>
<span class="font-semibold text-[var(--text-primary)] bg-[var(--bg-primary)] p-2 rounded-lg text-sm text-center border border-border">
{{ getTripTypeLabel(shuttle.trip_type) }}
</span>
<dt class="info-label">
<span class="material-icons text-sm notranslate" translate="no" aria-hidden="true">swap_horiz</span>
{{ t('shuttle.tripType') }}
</dt>
<dd class="info-value">{{ getTripTypeLabel(shuttle.trip_type) }}</dd>
</div>
<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">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 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>
<!-- Precio -->
<div class="rounded-2xl p-6 shadow-sm flex items-center justify-between" style="background-color: var(--active-color); color: #101820;">
<!-- Price card -->
<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">
<p class="text-sm font-semibold opacity-90 mb-1">{{ t('shuttle.pricePerPerson') }}</p>
<div class="flex items-baseline gap-1">
<span class="text-lg font-bold opacity-80">$</span>
<span class="text-4xl font-black tracking-tight">{{ parsePrice(shuttle.price_per_person) }}</span>
</div>
<p class="text-sm font-semibold opacity-90 mb-1">{{ t('shuttle.pricePerPerson') }}</p>
<div class="flex items-baseline gap-1">
<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>
</div>
</div>
<div class="p-3 rounded-xl bg-black/10 backdrop-blur-sm" v-if="shuttle.price_private_trip">
<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>
<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="font-black text-lg">${{ parsePrice(shuttle.price_private_trip) }}</span>
</div>
</div>
<!-- Contacto -->
<div class="bg-[var(--bg-secondary)] rounded-2xl p-5 shadow-sm space-y-4 border border-border mb-8">
<!-- Contact card -->
<div class="bg-[var(--bg-secondary)] rounded-2xl p-5 shadow-sm space-y-4 border border-[var(--border-color)] mb-8">
<div>
<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>
</div>
<div class="flex flex-col gap-3">
<a v-if="shuttle.contact_whatsapp"
: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}`"
<a
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"
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' } })"
>
<span class="material-icons">chat</span>
<span class="material-icons notranslate" translate="no" aria-hidden="true">chat</span>
{{ t('shuttle.bookWhatsapp') }}
</a>
<a v-if="shuttle.phone_number"
<a
v-if="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' } })"
>
<span class="material-icons">phone_in_talk</span>
<span class="material-icons notranslate" translate="no" aria-hidden="true">phone_in_talk</span>
{{ t('shuttle.callOperator') }}
</a>
</div>
@ -217,20 +250,155 @@ const getTripTypeLabel = (type: string) => {
<style scoped>
.animate-fade-in {
animation: fadeIn 0.3s ease-out forwards;
animation: fadeIn 0.25s ease-out forwards;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: translateY(0); }
}
.spin {
animation: spin 1s infinite linear;
@media (prefers-reduced-motion: reduce) {
.animate-fade-in {
animation: none;
}
}
@keyframes spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
/* Back button */
.back-btn {
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>

View File

@ -7,7 +7,8 @@ import type { Taxi } from '@/types'
import FavoriteButton from '@/components/FavoriteButton.vue'
import AppImage from '@/components/AppImage.vue'
import AuthGuard from '@/components/common/AuthGuard.vue'
import LoadingBranded from '@/components/common/LoadingBranded.vue'
import TaxiSkeletonCard from '@/components/transporte/TaxiSkeletonCard.vue'
import TransportFilterSelect from '@/components/transporte/TransportFilterSelect.vue'
const { t } = useI18n()
const taxiStore = useTaxiStore()
@ -15,68 +16,87 @@ const taxiStore = useTaxiStore()
const selectedZone = ref('all')
const selectedShift = ref('all')
const onlyEnglish = ref(false)
const corregimientos = ['all', 'Boquete', 'David - Boquete', 'Boquete - David', 'Aeropuerto - Boquete']
const shifts = ['all', 'dia', 'tarde', 'noche']
const searchQuery = ref('')
// Infinite Scroll
const displayLimit = ref(12)
const observerTarget = ref<HTMLElement | 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() {
taxiStore.loadTaxis()
}
function handleRefocus() {
// Recarga silenciosa: no congela la UI si ya hay datos
taxiStore.silentReload()
}
onMounted(async () => {
analyticsService.logEvent({ event_name: 'screen_view', screen_name: 'TaxisLocales' })
window.addEventListener('app-refocus', handleRefocus)
analyticsService.logEvent({ event_name: 'screen_view', screen_name: 'TaxisLocales' })
window.addEventListener('app-refocus', handleRefocus)
// Infinite Scroll Observer
observer = new IntersectionObserver((entries) => {
if (entries[0]?.isIntersecting) {
displayLimit.value += 12
}
}, { rootMargin: '400px' })
if (observerTarget.value && observer) {
observer.observe(observerTarget.value)
observer = new IntersectionObserver((entries) => {
if (entries[0]?.isIntersecting) {
displayLimit.value += 12
}
}, { rootMargin: '400px' })
if(taxiStore.taxis.length === 0) {
await fetchData()
}
if (observerTarget.value && observer) {
observer.observe(observerTarget.value)
}
if (taxiStore.taxis.length === 0) {
await fetchData()
}
})
onUnmounted(() => {
window.removeEventListener('app-refocus', handleRefocus)
if (observer) {
observer.disconnect()
}
window.removeEventListener('app-refocus', handleRefocus)
if (observer) observer.disconnect()
})
watch([selectedZone, selectedShift, onlyEnglish], () => {
watch([selectedZone, selectedShift, onlyEnglish, searchQuery], () => {
displayLimit.value = 12
})
const filteredTaxis = computed(() => {
const q = searchQuery.value.trim().toLowerCase()
return taxiStore.taxis.filter(taxi => {
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 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(() => {
return filteredTaxis.value.slice(0, displayLimit.value)
})
const visibleTaxis = computed(() => 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) => {
if (!taxi.shifts) return false
@ -89,12 +109,12 @@ const getShiftsDisplay = (taxi: Taxi) => {
}
const handleCall = (taxi: Taxi) => {
analyticsService.logEvent({
event_name: 'taxi_click',
analyticsService.logEvent({
event_name: 'taxi_click',
entity_type: 'taxi',
entity_id: taxi.id,
entity_name: taxi.owner_name,
properties: {
properties: {
action: 'call',
taxi_id: taxi.id,
plate: taxi.license_plate
@ -110,93 +130,126 @@ function getShiftLabel(shift: string) {
return shift
}
</script>
<template>
<div class="taxis-locales">
<div class="filters-container">
<div class="filter-card glass-effect">
<div class="selectors-side">
<div class="select-group-premium">
<div class="group-icon">
<span class="material-icons">location_on</span>
</div>
<div class="group-content">
<label>{{ t('taxi.allZones') }}</label>
<select v-model="selectedZone">
<option value="all">{{ t('taxi.allZones') }}</option>
<option v-for="zone in corregimientos.filter(z => z !== 'all')" :key="zone" :value="zone">{{ zone }}</option>
</select>
</div>
</div>
<div class="select-group-premium">
<div class="group-icon">
<span class="material-icons">schedule</span>
</div>
<div class="group-content">
<label>{{ t('taxi.shift') }}</label>
<select v-model="selectedShift">
<option value="all">{{ t('taxi.shift') }}</option>
<option v-for="s in shifts.filter(x => x !== 'all')" :key="s" :value="s">{{ getShiftLabel(s) }}</option>
</select>
</div>
</div>
</div>
<div class="lang-toggle-side">
<div class="lang-pill" :class="{ 'lang-pill--active': onlyEnglish }" @click="onlyEnglish = !onlyEnglish">
<span class="material-icons">{{ 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">error_outline</span>
<p>{{ taxiStore.error }}</p>
<button class="retry-btn" @click="taxiStore.loadTaxis()">
<span class="material-icons">refresh</span>
{{ t('common.retry') || 'Reintentar' }}
<!-- FILTERS -->
<div class="filters-wrap">
<!-- Search -->
<div class="search-bar">
<span class="material-icons search-icon notranslate" translate="no" aria-hidden="true">search</span>
<input
v-model="searchQuery"
type="search"
placeholder="Buscar conductor..."
class="search-input"
aria-label="Buscar conductor"
/>
<button
v-if="searchQuery"
class="search-clear"
@click="searchQuery = ''"
:aria-label="t('common.clear')"
>
<span class="material-icons notranslate" translate="no" aria-hidden="true">close</span>
</button>
</div>
<AuthGuard
:title="t('discover.auth.title')"
:message="t('shuttle.auth.message')"
>
<div class="taxis-grid">
<div v-for="taxi in visibleTaxis" :key="taxi.id" v-memo="[taxi.id]" class="taxi-card-new glass-effect">
<!-- Dropdowns row -->
<div class="dropdowns-row">
<TransportFilterSelect
v-model="selectedZone"
:options="zoneOptions"
/>
<TransportFilterSelect
v-model="selectedShift"
:options="shiftOptions"
/>
<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">language</span>
EN
</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
v-else
:title="t('discover.auth.title')"
:message="t('shuttle.auth.message')"
>
<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 glass-effect"
role="listitem"
>
<div class="card-top">
<div class="driver-avatar-wrap">
<div class="driver-avatar">
<AppImage
:src="taxi.image_url"
<div class="driver-avatar" aria-hidden="true">
<AppImage
:src="taxi.image_url"
type="taxi"
alt="Driver"
alt=""
/>
</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 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>
<span v-if="taxi.is_accessible" class="material-icons text-blue-500 text-sm" title="Accesible para personas con discapacidad">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 class="driver-meta">
<div class="rating-stars">
<span class="material-icons star-filled">star</span>
<div class="rating-stars" :aria-label="`Calificación ${(taxi.rating || 5).toFixed(1)} de 5`">
<span class="material-icons star-filled notranslate" translate="no" aria-hidden="true">star</span>
<span class="rating-value">{{ (taxi.rating || 5).toFixed(1) }}</span>
</div>
<span class="meta-dot">·</span>
<span class="meta-dot" aria-hidden="true">·</span>
<span class="shift-badge">{{ getShiftsDisplay(taxi) }}</span>
</div>
</div>
<div class="fav-icon-wrapper">
<FavoriteButton
item-type="taxi"
:item-id="taxi.id"
<FavoriteButton
item-type="taxi"
:item-id="taxi.id"
:item-name="taxi.owner_name"
:item-image="taxi.image_url || undefined"
/>
@ -205,22 +258,27 @@ function getShiftLabel(shift: string) {
<div class="card-details">
<div class="detail-item" v-if="taxi.corregimiento">
<span class="material-icons detail-icon">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>
</div>
<div class="detail-item" v-if="taxi.vehicle_type">
<span class="material-icons detail-icon">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>
</div>
<div class="detail-item" v-if="taxi.english_speaking">
<span class="material-icons detail-icon">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>
</div>
</div>
<div class="card-actions">
<a :href="`tel:${taxi.phone_number}`" class="call-btn-premium" @click="handleCall(taxi)">
<span class="material-icons">phone_in_talk</span>
<a
: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">
<span class="btn-label">{{ t('taxi.callNow') }}</span>
<span class="btn-subtext">{{ taxi.phone_number }}</span>
@ -230,155 +288,162 @@ function getShiftLabel(shift: string) {
</div>
<!-- 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">
<span class="material-icons">no_accounts</span>
<p>{{ t('taxi.noTaxisAvailable') }}</p>
<!-- EMPTY STATE -->
<div v-if="filteredTaxis.length === 0" class="empty-state" role="status">
<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>
</AuthGuard>
</div>
</AuthGuard>
</div>
</template>
<style scoped>
/* FILTROS PREMIUM */
.filters-container {
padding: 0 1rem 1.5rem;
}
.filter-card {
border-radius: 1.5rem;
padding: 1.25rem;
/* FILTERS */
.filters-wrap {
padding: 0 1rem 0.75rem;
display: flex;
flex-direction: column;
gap: 1.25rem;
border: 1px solid var(--border-color);
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
background: var(--card-bg);
gap: 0.625rem;
}
@media (min-width: 640px) {
.filter-card {
flex-direction: row;
align-items: center;
justify-content: space-between;
}
}
.selectors-side {
flex: 1;
display: grid;
grid-template-columns: 1fr;
gap: 1rem;
}
@media (min-width: 480px) {
.selectors-side {
grid-template-columns: 1fr 1fr;
}
}
.select-group-premium {
.search-bar {
display: flex;
align-items: center;
gap: 0.875rem;
background: var(--bg-primary);
border: 1px solid var(--border-color);
border-radius: 1rem;
padding: 0.625rem 0.875rem;
transition: all 0.3s ease;
}
.select-group-premium:focus-within {
border-color: var(--active-color);
box-shadow: 0 0 0 3px rgba(254, 231, 21, 0.1);
}
.group-icon {
display: flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
gap: 0.5rem;
background: var(--bg-secondary);
border-radius: 0.75rem;
color: var(--active-color);
border: 1.5px solid var(--border-color);
border-radius: 0.875rem;
padding: 0 0.875rem;
transition: border-color 0.18s ease;
min-height: 44px;
}
.group-content {
flex: 1;
display: flex;
flex-direction: column;
.search-bar:focus-within {
border-color: var(--active-color);
box-shadow: 0 0 0 3px rgba(254, 231, 21, 0.12);
}
.group-content label {
font-size: 0.65rem;
font-weight: 800;
text-transform: uppercase;
letter-spacing: 0.05em;
.search-icon {
color: var(--text-secondary);
line-height: 1;
margin-bottom: 0.25rem;
font-size: 1.25rem;
flex-shrink: 0;
}
.group-content select {
.search-input {
flex: 1;
background: transparent;
border: none;
color: var(--text-primary);
font-weight: 700;
font-size: 0.9375rem;
outline: none;
color: var(--text-primary);
font-size: 0.9375rem;
font-weight: 600;
padding: 0.625rem 0;
}
.search-input::placeholder {
color: var(--text-secondary);
font-weight: 500;
}
.search-clear {
background: none;
border: none;
color: var(--text-secondary);
cursor: pointer;
padding: 0;
width: 100%;
display: flex;
align-items: center;
padding: 4px;
border-radius: 50%;
min-width: 28px;
min-height: 28px;
justify-content: center;
}
.search-clear:hover {
background: var(--bg-primary);
}
.dropdowns-row {
display: flex;
align-items: center;
gap: 0.5rem;
flex-wrap: wrap;
}
.lang-pill {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.625rem 1.25rem;
background: var(--bg-primary);
border: 1px solid var(--border-color);
border-radius: 1rem;
gap: 0.25rem;
padding: 0 0.75rem;
height: 38px;
background: var(--bg-secondary);
border: 1.5px solid var(--border-color);
border-radius: 99px;
font-weight: 700;
font-size: 0.875rem;
font-size: 0.8125rem;
color: var(--text-secondary);
cursor: pointer;
transition: all 0.3s ease;
transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
white-space: nowrap;
}
.lang-pill--active {
background: rgba(254, 231, 21, 0.1);
border-color: var(--active-color);
color: var(--active-color);
color: var(--text-primary);
}
/* GRID Y TARJETAS PREMIUM */
.lang-pill:focus-visible {
outline: 2px solid var(--active-color);
outline-offset: 2px;
}
/* GRID */
.taxis-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
gap: 1.5rem;
padding: 1.5rem 1rem;
grid-template-columns: 1fr;
gap: 1rem;
padding: 0.5rem 1rem 1.5rem;
}
.taxi-card-new {
@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;
padding: 1.25rem;
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;
flex-direction: column;
gap: 1.25rem;
background: var(--card-bg);
cursor: default;
}
.taxi-card-new:hover {
transform: translateY(-8px);
border-color: var(--active-color);
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
@media (hover: hover) {
.taxi-card:hover {
transform: translateY(-6px);
border-color: var(--active-color);
box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
}
}
.card-top {
@ -424,14 +489,31 @@ function getShiftLabel(shift: string) {
.driver-info {
flex: 1;
min-width: 0;
}
.name-row {
display: flex;
align-items: center;
gap: 0.5rem;
margin-bottom: 0.25rem;
}
.driver-name {
margin: 0 0 0.25rem;
font-size: 1.125rem;
margin: 0;
font-size: 1.0625rem;
font-weight: 800;
color: var(--text-primary);
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 {
@ -469,10 +551,14 @@ function getShiftLabel(shift: string) {
text-transform: capitalize;
}
.fav-icon-wrapper {
flex-shrink: 0;
}
.card-details {
display: flex;
flex-wrap: wrap;
gap: 0.75rem;
gap: 0.5rem;
}
.detail-item {
@ -482,7 +568,7 @@ function getShiftLabel(shift: string) {
background: var(--bg-secondary);
padding: 0.375rem 0.75rem;
border-radius: 0.75rem;
font-size: 0.75rem;
font-size: 0.8125rem;
font-weight: 700;
color: var(--text-secondary);
}
@ -496,30 +582,38 @@ function getShiftLabel(shift: string) {
margin-top: auto;
}
.call-btn-premium {
.call-btn {
display: flex;
align-items: center;
gap: 1rem;
gap: 0.875rem;
width: 100%;
padding: 0.75rem 1.25rem;
background: var(--active-color);
color: #101820;
border-radius: 1.125rem;
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);
min-height: 52px;
}
.call-btn-premium:hover {
transform: scale(1.02);
box-shadow: 0 6px 20px rgba(254, 231, 21, 0.35);
.call-btn:focus-visible {
outline: 2px solid #101820;
outline-offset: 2px;
}
.call-btn-premium:active {
transform: scale(0.98);
@media (hover: hover) {
.call-btn:hover {
transform: scale(1.02);
box-shadow: 0 6px 20px rgba(254, 231, 21, 0.35);
}
}
.call-btn-premium .material-icons {
.call-btn:active {
transform: scale(0.97);
}
.call-btn .material-icons {
font-size: 1.5rem;
}
@ -541,23 +635,53 @@ function getShiftLabel(shift: string) {
opacity: 0.7;
}
/* STATES */
.scroll-trigger {
height: 40px;
width: 100%;
grid-column: 1 / -1;
}
.empty-state {
grid-column-start: 1;
grid-column-end: -1;
grid-column: 1 / -1;
text-align: center;
padding: 4rem 2rem;
padding: 3.5rem 2rem;
color: var(--text-secondary);
display: flex;
flex-direction: column;
align-items: center;
gap: 1rem;
}
.empty-state .material-icons {
font-size: 4rem;
margin-bottom: 1rem;
opacity: 0.5;
.empty-icon {
font-size: 3.5rem;
opacity: 0.4;
}
.empty-state p {
font-size: 1.125rem;
.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, background 0.18s ease;
min-height: 44px;
}
.clear-filters-btn:hover {
border-color: var(--active-color);
}
.state-container {
@ -567,17 +691,15 @@ function getShiftLabel(shift: string) {
justify-content: center;
padding: 4rem 2rem;
gap: 1rem;
text-align: center;
}
.spin {
animation: spin 1s infinite linear;
.state-icon {
font-size: 3rem;
color: var(--active-color);
}
@keyframes spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
.state-icon--error {
color: #ef4444;
}
.retry-btn {
@ -591,16 +713,22 @@ function getShiftLabel(shift: string) {
border-radius: 99px;
font-weight: 800;
cursor: pointer;
transition: all 0.3s ease;
transition: transform 0.15s ease;
min-height: 44px;
}
.retry-btn:hover {
transform: scale(1.05);
.retry-btn:active {
transform: scale(0.97);
}
@media (max-width: 600px) {
.taxis-grid {
grid-template-columns: 1fr;
}
@media (prefers-reduced-motion: reduce) {
.taxi-card,
.call-btn,
.lang-pill,
.search-bar,
.retry-btn,
.clear-filters-btn {
transition: none;
}
}
</style>
</style>

View File

@ -6,7 +6,8 @@ import { useShuttleStore } from '@/stores/shuttle'
import AuthGuard from '@/components/common/AuthGuard.vue'
import AppImage from '@/components/AppImage.vue'
import { analyticsService } from '@/services/analyticsService'
import LoadingBranded from '@/components/common/LoadingBranded.vue'
import ShuttleSkeletonCard from '@/components/transporte/ShuttleSkeletonCard.vue'
import TransportFilterSelect from '@/components/transporte/TransportFilterSelect.vue'
const { t } = useI18n()
const shuttleStore = useShuttleStore()
@ -15,6 +16,19 @@ const router = useRouter()
const shuttleCategoryFilter = 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(() => {
return shuttleStore.shuttles.filter(shuttle => {
const matchesCategory = shuttleCategoryFilter.value === 'all' || shuttle.category === shuttleCategoryFilter.value
@ -23,158 +37,145 @@ 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) => {
analyticsService.logEvent({
event_name: 'view_details',
entity_type: 'shuttle',
entity_id: shuttleId,
entity_name: shuttleName
})
router.push({
name: 'ShuttleDetalle',
params: { id: shuttleId }
})
analyticsService.logEvent({
event_name: 'view_details',
entity_type: 'shuttle',
entity_id: shuttleId,
entity_name: shuttleName
})
router.push({ name: 'ShuttleDetalle', params: { id: shuttleId } })
}
function fetchData() {
shuttleStore.loadShuttles()
shuttleStore.loadShuttles()
}
function handleRefocus() {
// Recarga silenciosa: no congela la UI si ya hay datos
shuttleStore.silentReload()
shuttleStore.silentReload()
}
onMounted(async () => {
analyticsService.logEvent({ event_name: 'screen_view', screen_name: 'ViajesTuristicos' })
window.addEventListener('app-refocus', handleRefocus)
if(shuttleStore.shuttles.length === 0) {
await fetchData()
}
analyticsService.logEvent({ event_name: 'screen_view', screen_name: 'ViajesTuristicos' })
window.addEventListener('app-refocus', handleRefocus)
if (shuttleStore.shuttles.length === 0) {
await fetchData()
}
})
onUnmounted(() => {
window.removeEventListener('app-refocus', handleRefocus)
window.removeEventListener('app-refocus', handleRefocus)
})
</script>
<template>
<div class="viajes-turisticos">
<!-- FILTROS PREMIUM -->
<div class="filters-container">
<div class="filter-card glass-effect">
<div class="selectors-side">
<!-- Ruta Select -->
<div class="select-group-premium">
<div class="group-icon">
<span class="material-icons">route</span>
</div>
<div class="group-content">
<label>{{ t('shuttle.category') || 'Categoría' }}</label>
<select v-model="shuttleCategoryFilter">
<option value="all">{{ t('shuttle.allAreas') || 'Todas las áreas' }}</option>
<option value="local">Local</option>
<option value="interprovincial">Interprovincial</option>
</select>
</div>
</div>
<!-- Tipo de Viaje Select -->
<div class="select-group-premium">
<div class="group-icon">
<span class="material-icons">sync_alt</span>
</div>
<div class="group-content">
<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>
<!-- FILTERS -->
<div class="filters-wrap">
<TransportFilterSelect
v-model="shuttleCategoryFilter"
:options="categoryOptions"
/>
<TransportFilterSelect
v-model="shuttleTypeFilter"
:options="typeOptions"
/>
</div>
<!-- ESTADOS -->
<div v-if="shuttleStore.isLoading" class="state-container">
<LoadingBranded :message="t('taxi.loadingTaxis') || 'Cargando viajes...'" icon="airport_shuttle" />
<!-- LOADING SKELETONS -->
<div v-if="shuttleStore.isLoading" class="shuttles-grid" aria-busy="true" aria-label="Cargando viajes...">
<ShuttleSkeletonCard v-for="n in 4" :key="n" />
</div>
<div v-else-if="shuttleStore.error" class="state-container">
<span class="material-icons">error_outline</span>
<!-- ERROR -->
<div v-else-if="shuttleStore.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>{{ shuttleStore.error }}</p>
<button class="retry-btn" @click="shuttleStore.loadShuttles()">
<span class="material-icons">refresh</span>
{{ t('common.retry') || 'Reintentar' }}
<span class="material-icons notranslate" translate="no" aria-hidden="true">refresh</span>
{{ t('common.retry') }}
</button>
</div>
<!-- GRID PREMIUM CON AUTHGUARD -->
<!-- GRID -->
<AuthGuard
v-else
: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.'"
>
<div class="shuttles-grid">
<div
v-for="shuttle in filteredShuttles"
:key="shuttle.id"
<div class="shuttles-grid" role="list" :aria-label="'Viajes disponibles'">
<article
v-for="shuttle in filteredShuttles"
:key="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}`)"
@keydown.enter="verDetalle(shuttle.id, shuttle.company_name || `${shuttle.origin}-${shuttle.destination}`)"
tabindex="0"
>
<div class="card-image-wrap">
<AppImage
:src="shuttle.image_url"
<!-- Image desktop full, mobile strip -->
<div class="card-image-wrap" aria-hidden="true">
<AppImage
:src="shuttle.image_url"
type="shuttle"
imgClass="shuttle-img"
alt="Shuttle"
alt=""
/>
<div class="company-tag" v-if="shuttle.company_name">
<span class="material-icons">business</span>
<span class="material-icons notranslate" translate="no" aria-hidden="true">business</span>
{{ shuttle.company_name }}
</div>
</div>
<div class="card-body-premium">
<div class="card-body">
<div class="route-header">
<div class="route-main">
<span class="location-name">{{ shuttle.origin }}</span>
<span class="material-icons separator-icon">east</span>
<span class="location-name">{{ shuttle.destination }}</span>
</div>
<span class="location-name">{{ shuttle.origin }}</span>
<span class="material-icons separator-icon notranslate" translate="no" aria-hidden="true">east</span>
<span class="location-name">{{ shuttle.destination }}</span>
</div>
<div class="card-meta">
<div class="meta-tag">
<span class="material-icons">directions_bus</span>
<span class="material-icons notranslate" translate="no" aria-hidden="true">directions_bus</span>
<span>{{ shuttle.vehicle_type }}</span>
</div>
<div class="meta-tag" v-if="shuttle.estimated_duration">
<span class="material-icons">schedule</span>
<span class="material-icons notranslate" translate="no" aria-hidden="true">schedule</span>
<span>{{ shuttle.estimated_duration }}</span>
</div>
</div>
<div class="card-footer-premium">
<div class="card-footer">
<div class="price-container">
<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 class="view-details-btn" aria-hidden="true">
<span class="material-icons notranslate" translate="no">chevron_right</span>
</div>
<button class="view-details-btn">
<span class="material-icons">chevron_right</span>
</button>
</div>
</div>
</div>
</article>
<!-- EMPTY STATE -->
<div v-if="filteredShuttles.length === 0" class="empty-state">
<span class="material-icons">directions_bus_filled</span>
<p>{{ t('shuttle.noShuttles') }}</p>
<div v-if="filteredShuttles.length === 0" class="empty-state" role="status">
<span class="material-icons notranslate empty-icon" translate="no" aria-hidden="true">directions_bus_filled</span>
<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>
</AuthGuard>
@ -186,110 +187,91 @@ onUnmounted(() => {
padding-bottom: 2rem;
}
/* FILTROS CONSISTENTES */
.filters-container {
padding: 0 1rem 1.5rem;
/* FILTERS */
.filters-wrap {
padding: 0 1rem 0.75rem;
display: flex;
flex-direction: row;
gap: 0.5rem;
flex-wrap: wrap;
}
.filter-card {
border-radius: 1.5rem;
padding: 1.25rem;
border: 1px solid var(--border-color);
background: var(--card-bg);
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
.selectors-side {
/* GRID — single column on mobile, 2-col on tablet, 3-col on desktop */
.shuttles-grid {
display: grid;
grid-template-columns: 1fr;
gap: 1rem;
padding: 0.5rem 1rem 1.5rem;
}
@media (min-width: 640px) {
.selectors-side {
grid-template-columns: 1fr 1fr;
.shuttles-grid {
grid-template-columns: repeat(2, 1fr);
gap: 1.25rem;
}
}
.select-group-premium {
display: flex;
align-items: center;
gap: 0.875rem;
background: var(--bg-primary);
border: 1px solid var(--border-color);
border-radius: 1rem;
padding: 0.625rem 0.875rem;
transition: all 0.3s ease;
@media (min-width: 1024px) {
.shuttles-grid {
grid-template-columns: repeat(3, 1fr);
gap: 1.5rem;
}
}
.select-group-premium:focus-within {
border-color: var(--active-color);
}
.group-icon {
display: flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
background: var(--bg-secondary);
border-radius: 0.75rem;
color: var(--active-color);
}
.group-content {
flex: 1;
display: flex;
flex-direction: column;
}
.group-content label {
font-size: 0.65rem;
font-weight: 800;
text-transform: uppercase;
color: var(--text-secondary);
margin-bottom: 0.125rem;
}
.group-content select {
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 {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 1.5rem;
padding: 0 1rem;
}
.shuttle-card-premium {
border-radius: 1.5rem;
/* CARD — horizontal on mobile, vertical on tablet+ */
.shuttle-card {
border-radius: 1.25rem;
overflow: hidden;
border: 1px solid var(--border-color);
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;
/* Horizontal layout on mobile */
display: flex;
flex-direction: column;
flex-direction: row;
}
.shuttle-card-premium:hover {
transform: translateY(-8px);
border-color: var(--active-color);
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
.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;
}
}
@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 {
position: relative;
height: 180px;
width: 100%;
width: 100px;
min-height: 120px;
flex-shrink: 0;
}
@media (min-width: 480px) {
.card-image-wrap {
width: 100%;
min-height: unset;
height: 170px;
}
}
.shuttle-img {
@ -300,71 +282,101 @@ onUnmounted(() => {
.company-tag {
position: absolute;
top: 1rem;
left: 1rem;
top: 0.75rem;
left: 0.75rem;
background: rgba(0, 0, 0, 0.7);
backdrop-filter: blur(8px);
padding: 0.375rem 0.75rem;
border-radius: 0.75rem;
padding: 0.25rem 0.625rem;
border-radius: 0.625rem;
color: #fff;
font-size: 0.75rem;
font-size: 0.7rem;
font-weight: 700;
display: flex;
align-items: center;
gap: 0.5rem;
gap: 0.375rem;
border: 1px solid rgba(255, 255, 255, 0.2);
/* Hide on mobile to save space */
display: none;
}
.card-body-premium {
padding: 1.25rem;
@media (min-width: 480px) {
.company-tag {
display: flex;
}
}
.card-body {
padding: 0.875rem;
display: flex;
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;
align-items: center;
gap: 0.75rem;
gap: 0.5rem;
flex-wrap: wrap;
}
.location-name {
font-size: 1.125rem;
font-size: 0.9375rem;
font-weight: 800;
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 {
color: var(--active-color);
font-size: 1.25rem;
font-size: 1.125rem;
flex-shrink: 0;
}
.card-meta {
display: flex;
gap: 1rem;
flex-wrap: wrap;
gap: 0.5rem;
}
.meta-tag {
display: flex;
align-items: center;
gap: 0.375rem;
gap: 0.25rem;
color: var(--text-secondary);
font-size: 0.875rem;
font-size: 0.75rem;
font-weight: 600;
}
.meta-tag .material-icons {
font-size: 1.125rem;
font-size: 1rem;
color: var(--active-color);
}
.card-footer-premium {
margin-top: 0.5rem;
.card-footer {
margin-top: auto;
display: flex;
justify-content: space-between;
align-items: center;
padding-top: 1rem;
padding-top: 0.625rem;
border-top: 1px solid var(--border-color);
}
@ -374,21 +386,27 @@ onUnmounted(() => {
}
.price-label {
font-size: 0.65rem;
font-size: 0.6875rem;
font-weight: 700;
text-transform: uppercase;
color: var(--text-secondary);
}
.price-val {
font-size: 1.5rem;
font-size: 1.375rem;
font-weight: 900;
color: var(--active-color);
}
@media (min-width: 480px) {
.price-val {
font-size: 1.5rem;
}
}
.view-details-btn {
width: 44px;
height: 44px;
width: 40px;
height: 40px;
border-radius: 50%;
background: var(--bg-secondary);
border: 1px solid var(--border-color);
@ -396,17 +414,11 @@ onUnmounted(() => {
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease;
transition: all 0.25s ease;
flex-shrink: 0;
}
.shuttle-card-premium:hover .view-details-btn {
background: var(--active-color);
color: #101820;
border-color: var(--active-color);
transform: rotate(-45deg);
}
/* ESTADOS */
/* STATES */
.state-container {
display: flex;
flex-direction: column;
@ -416,15 +428,12 @@ onUnmounted(() => {
text-align: center;
}
.spin {
animation: spin 1s infinite linear;
.state-icon {
font-size: 3rem;
color: var(--active-color);
}
@keyframes spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
.state-icon--error {
color: #ef4444;
}
.retry-btn {
@ -438,21 +447,62 @@ onUnmounted(() => {
border-radius: 99px;
font-weight: 800;
cursor: pointer;
transition: all 0.3s ease;
transition: transform 0.15s ease;
min-height: 44px;
}
.retry-btn:active {
transform: scale(0.97);
}
.empty-state {
grid-column-start: 1;
grid-column-end: -1;
grid-column: 1 / -1;
text-align: center;
padding: 4rem 2rem;
padding: 3.5rem 2rem;
color: var(--text-secondary);
display: flex;
flex-direction: column;
align-items: center;
gap: 1rem;
}
.empty-state .material-icons {
font-size: 4rem;
margin-bottom: 1rem;
opacity: 0.5;
.empty-icon {
font-size: 3.5rem;
opacity: 0.4;
}
.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>

View File

@ -2,7 +2,7 @@
"extends": "@vue/tsconfig/tsconfig.dom.json",
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"types": ["vite/client", "google.maps"],
"types": ["vite/client", "google.maps", "vite-plugin-pwa/client"],
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
@ -14,7 +14,7 @@
"noUnusedParameters": true,
"erasableSyntaxOnly": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true
"noUncheckedSideEffectImports": false
},
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"]
}