@php $company = auth()->user()->company; $moduleAccess = app(\App\Services\Subscription\ModuleAccessService::class); $can = fn (...$modules) => $company && collect($modules)->contains(fn ($module) => $moduleAccess->isEnabled($company, $module)); $settings = [ ['title' => 'Configuración del negocio', 'text' => 'Personaliza logo, datos públicos, contacto, portada y colores.', 'icon' => 'M3 7h18M5 7v11a2 2 0 002 2h10a2 2 0 002-2V7M8 7V5a2 2 0 012-2h4a2 2 0 012 2v2', 'href' => route('tenant.business-settings.index'), 'modules' => []], ['title' => 'Gestión de citas', 'text' => 'Configura disponibilidad, horarios y reglas para reservar.', 'icon' => 'M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2', 'href' => route('tenant.schedules.index'), 'modules' => ['schedules']], ['title' => 'Ventas', 'text' => 'Consulta transacciones, pagos y movimientos diarios.', 'icon' => 'M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z', 'href' => route('tenant.payments.index'), 'modules' => ['payments']], ['title' => 'Caja y administrativo', 'text' => 'Registra ingresos, egresos, métodos de pago y saldos diarios.', 'icon' => 'M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z', 'href' => route('tenant.cash.index'), 'modules' => ['cash_register']], ['title' => 'Clientes', 'text' => 'Gestiona perfiles, historial, etiquetas y datos de contacto.', 'icon' => 'M17 20h5v-2a3 3 0 00-5.356-1.857M9 20H4v-2a3 3 0 015.356-1.857M15 7a3 3 0 11-6 0 3 3 0 016 0z', 'href' => route('tenant.customers.index'), 'modules' => ['customers']], ['title' => 'Facturación', 'text' => 'Configura datos fiscales, numeración y notas de factura.', 'icon' => 'M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z', 'href' => route('tenant.invoicing.index'), 'modules' => ['invoicing']], ['title' => 'Equipo', 'text' => 'Administra profesionales, roles, servicios y estado activo.', 'icon' => 'M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M15 7a3 3 0 11-6 0 3 3 0 016 0z', 'href' => route('tenant.employees.index'), 'modules' => ['employees']], ['title' => 'Formularios', 'text' => 'Consulta historias clínicas, notas y consentimiento de clientes.', 'icon' => 'M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414A1 1 0 0119 9.414V19a2 2 0 01-2 2z', 'href' => route('tenant.clinical-histories.index'), 'modules' => ['customers', 'clinical_history']], ['title' => 'Módulo Clínico', 'text' => 'Activa historia clínica, consentimientos digitales y archivos del paciente.', 'icon' => 'M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414A1 1 0 0119 9.414V19a2 2 0 01-2 2z', 'href' => route('tenant.clinical-settings.index'), 'modules' => []], ['title' => 'Pagos', 'text' => 'Configura métodos, checkout y pagos pendientes.', 'icon' => 'M17 9V7a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2m2 4h10a2 2 0 002-2v-6a2 2 0 00-2-2H9a2 2 0 00-2 2v6a2 2 0 002 2z', 'href' => route('tenant.payments.index'), 'modules' => ['payments']], ]; $presence = [ ['Perfil público', 'Atrae clientes desde tu enlace de reservas.', $company?->publicUrl(), ['public_page']], ['Reservar con Google', 'Prepara la integración para aparecer en búsquedas.', route('tenant.workspace.index'), ['public_page']], ['Reservar con Facebook e Instagram', 'Conecta tus redes sociales con tu agenda.', route('tenant.workspace.index'), ['public_page']], ['Generador de enlaces', 'Comparte enlaces por servicio, profesional o punto.', $company?->publicUrl(), ['public_page']], ['Galería pública', 'Publica fotos del espacio, servicios y resultados.', route('tenant.gallery.index'), ['gallery']], ['Marca y apariencia', 'Ajusta colores, textos y presencia visual del negocio.', route('tenant.branding.index'), ['branding']], ]; $marketing = [ ['Campañas de difusión', 'Comparte ofertas por email, WhatsApp o SMS.', route('tenant.promotions.index'), ['promotions', 'coupons']], ['Automatizaciones', 'Recordatorios y mensajes para fidelizar clientes.', route('tenant.communications.index'), ['reminders', 'notifications', 'whatsapp']], ['Ofertas', 'Códigos, promociones y descuentos activos.', route('tenant.promotions.index'), ['promotions', 'coupons']], ['Precios inteligentes', 'Ajusta precios por demanda y disponibilidad.', route('tenant.services.index'), ['services']], ['Mensajes enviados', 'Configura canales, plantillas y trazabilidad básica.', route('tenant.communications.index'), ['reminders', 'notifications', 'whatsapp']], ['Valoraciones y reseñas', 'Consulta la experiencia después de cada visita.', route('tenant.reports.index'), ['reports']], ]; $others = [ ['Informes', 'Paneles de datos, servicios y desempeño.', route('tenant.reports.index'), ['reports']], ['Sedes', 'Administra sucursales y puntos de atención.', route('tenant.branches.index'), ['multi_branch']], ['PWA', 'Define instalación, colores y comportamiento móvil.', route('tenant.pwa.index'), ['pwa']], ['Agenda avanzada', 'Bloqueos, anticipación y políticas para agenda.', route('tenant.advanced-agenda.index'), ['advanced_agenda']], ]; $visibleSettings = collect($settings)->filter(fn ($item) => empty($item['modules']) || $can(...$item['modules'])); $visiblePresence = collect($presence)->filter(fn ($item) => $can(...$item[3])); $visibleMarketing = collect($marketing)->filter(fn ($item) => $can(...$item[3])); $visibleOthers = collect($others)->filter(fn ($item) => $can(...$item[3])); @endphp
Ajustes @if ($visiblePresence->isNotEmpty()) Presencia online @endif @if ($visibleMarketing->isNotEmpty()) Marketing @endif @if ($visibleOthers->isNotEmpty()) Otros @endif
@foreach ($visibleSettings as $item)

{{ $item['title'] }}

{{ $item['text'] }}

@endforeach
@if ($visiblePresence->isNotEmpty())

Presencia online

@foreach ($visiblePresence as [$title, $text, $href])

{{ $title }}

{{ $text }}

Ver
@endforeach
@endif @if ($visibleMarketing->isNotEmpty())

Marketing

@foreach ($visibleMarketing as [$title, $text, $href])

{{ $title }}

{{ $text }}

Ver
@endforeach
@endif @if ($visibleOthers->isNotEmpty())

Otros

@foreach ($visibleOthers as [$title, $text, $href])

{{ $title }}

{{ $text }}

Ver
@endforeach
@endif