Fix: Solucionados problemas de permisos en Docker y agregada gestion de Webhook de Telegram

This commit is contained in:
2026-04-19 19:23:25 -06:00
parent 249c997257
commit c4bd4b62e3
13 changed files with 615 additions and 98 deletions

View File

@@ -60,7 +60,7 @@
</div>
<div class="col-md-4">
<div class="card">
<div class="card mb-4">
<div class="card-header">
<h5 class="mb-0">Información</h5>
</div>
@@ -73,6 +73,64 @@
</ul>
</div>
</div>
<div class="card shadow-sm border-primary">
<div class="card-header bg-primary text-white">
<h5 class="mb-0"><i class="bi bi-robot"></i> Gestión Webhook</h5>
</div>
<div class="card-body">
@if(isset($webhookInfo['ok']) && $webhookInfo['ok'])
@php $info = $webhookInfo['result']; @endphp
<div class="mb-3">
<label class="small fw-bold text-muted d-block">Estado:</label>
@if(!empty($info['url']))
<span class="badge bg-success">Configurado</span>
@else
<span class="badge bg-warning text-dark">No configurado</span>
@endif
</div>
@if(!empty($info['url']))
<div class="mb-3">
<label class="small fw-bold text-muted d-block">URL Webhook:</label>
<code class="small break-all" style="word-break: break-all;">{{ $info['url'] }}</code>
</div>
<div class="mb-3 small">
<label class="small fw-bold text-muted d-block">Pendientes:</label>
{{ $info['pending_update_count'] ?? 0 }} mensajes
</div>
@endif
<div class="d-grid gap-2">
<form action="{{ route('telegram.setup-webhook') }}" method="POST">
@csrf
<button type="submit" class="btn btn-sm btn-outline-primary w-100">
<i class="bi bi-gear-fill"></i> {{ empty($info['url']) ? 'Configurar Webhook' : 'Actualizar Webhook' }}
</button>
</form>
@if(!empty($info['url']))
<form action="{{ route('telegram.delete-webhook') }}" method="POST">
@csrf
<button type="submit" class="btn btn-sm btn-outline-danger w-100" onclick="return confirm('¿Seguro que deseas borrar el webhook?')">
<i class="bi bi-trash-fill"></i> Borrar Webhook
</button>
</form>
@endif
</div>
@else
<div class="alert alert-danger small">
<i class="bi bi-exclamation-triangle"></i> Error al conectar con Telegram API.
@if(isset($webhookInfo['description']))
<br><small>{{ $webhookInfo['description'] }}</small>
@endif
</div>
@endif
</div>
<div class="card-footer bg-light">
<small class="text-muted italic">Basado en APP_URL: {{ config('app.url') }}</small>
</div>
</div>
</div>
</div>
@endsection