File: /var/www/vhost/disk-apps/alq-cali.bikenow.co/resources/views/web_experiences/detail/index.blade.php
<?php
$availableSlots = 0;
if ($experience->plan_scheme == 1) {
$availableSlots = $experience->available_slots;
} else {
$availableSlots = $experience->plans->sum('available_slots');
}
function cleanPlatformName($name)
{
// Quitar emojis usando una expresión regular
$name = preg_replace('/[\x{1F600}-\x{1F64F}' . // Emoticonos
'\x{1F300}-\x{1F5FF}' . // Símbolos y pictogramas
'\x{1F680}-\x{1F6FF}' . // Transporte y mapas
'\x{1F1E0}-\x{1F1FF}' . // Banderas
'\x{2600}-\x{26FF}' . // Símbolos misceláneos
'\x{2700}-\x{27BF}]+' . // Símbolos Dingbats
'/u', '', $name);
// Quitar caracteres no imprimibles y signos de interrogación repetidos (como ??)
$name = preg_replace('/[\x00-\x1F\x7F\?]+/', '', $name);
// Eliminar espacios extra (dobles, al inicio o final)
$name = trim(preg_replace('/\s+/', ' ', $name));
return $name;
}
?>
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<title>Experiencias {{ $corporateIdentity->platform_name }} | Sports Crowd</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@include('web_experiences.detail.css')
</head>
<body>
<div class="container">
<div class="header">
<h1 onclick="window.location.href='/web_experiences'">Experiencias {{ cleanPlatformName($corporateIdentity->platform_name) }}</h1>
</div>
<div class="main">
<button class="back-button" onclick="location.href='/web_experiences'"><i class="fas fa-arrow-left"></i> Volver</button>
<div class="experience-card">
<!-- Imagen superior -->
<div class="experience-image">
@if ($experience->image)
<img src="{{ $experience->image }}" alt="{{ $experience->name }}">
@else
<img src="{{ asset('img/card-media.png') }}" alt="{{ $experience->name }}">
@endif
<!-- Título y subtítulo -->
<div class="experience-header">
<h1>{{ $experience->name }}</h1>
<p>{!! $experience->short_description ?? $experience->description !!}</p>
</div>
</div>
<!-- Cuerpo principal -->
<div class="experience-body">
<!-- Detalles -->
<div class="experience-details">
<h2 class="experience-section-title">Detalles de la Experiencia</h2>
@if($experience->start_datetime)
<div class="info-item">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-calendar w-4 h-4 mr-2" style="min-width: 24px; min-height: 24px;">
<path d="M8 2v4"></path>
<path d="M16 2v4"></path>
<rect width="18" height="18" x="3" y="4" rx="2"></rect>
<path d="M3 10h18"></path>
</svg>
{{ \Carbon\Carbon::parse($experience->start_datetime)->format('j/n/Y') ?? '' }}
</div>
@endif
@if($experience->event_place)
<div class="info-item">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-map-pin w-4 h-4 mr-2" style="min-width: 24px; min-height: 24px;">
<path d="M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z"></path>
<circle cx="12" cy="10" r="3"></circle>
</svg>
{!! $experience->event_place ?? '' !!}
</div>
@endif
<div class="info-item">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-users w-4 h-4 mr-2" style="min-width: 24px; min-height: 24px;">
<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"></path>
<circle cx="9" cy="7" r="4"></circle>
<path d="M22 21v-2a4 4 0 0 0-3-3.87"></path>
<path d="M16 3.13a4 4 0 0 1 0 7.75"></path>
</svg>
{{ $availableSlots }} cupos disponibles
</div>
@if($experience->apply_to)
<div class="info-item" style="line-height: 1.5rem;">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-target w-5 h-5 mr-3" style="min-width: 24px; min-height: 24px;">
<circle cx="12" cy="12" r="10"></circle>
<circle cx="12" cy="12" r="6"></circle>
<circle cx="12" cy="12" r="2"></circle>
</svg>
{!! $experience->apply_to !!}
</div>
@endif
<h3 class="experience-section-title" style="margin-top: 20px;">Incluye</h3>
<div class="info-item" style="line-height: 1.5rem; flex-flow: column;">{!! $experience->includes !!}</div>
</div>
<!-- Planes -->
<div class="experience-plans">
<h2 class="experience-plans-title">Planes Disponibles</h2>
<p class="experience-plans-subtitle">Por favor selecciona tu plan preferido de la experiencia:</p>
<!-- Plan Individual -->
@foreach($experience->plans as $plan)
@foreach($plan->prices as $planPrice)
@include('web_experiences.detail.card-plan', ['plan' => $plan, 'planPrice' => $planPrice])
@endforeach
@endforeach
<input type="hidden" name="experience_id" id="experienceId" value="{{ $experience->id }}">
<button class="register-btn" disabled>Continuar con el Registro</button>
</div>
</div>
</div>
</div>
</div>
</body>
@include('web_experiences.detail.js')
</html>