71 lines
3.1 KiB
PHP
71 lines
3.1 KiB
PHP
@extends('admin.layout')
|
|
|
|
@section('title', 'Promociones - Admin OnAPB')
|
|
|
|
@section('content')
|
|
<div class="page-header">
|
|
<h2><i class="bi bi-geo-alt-fill"></i> Promociones / Lugares</h2>
|
|
<a href="{{ route('admin.promociones.create') }}" class="btn-admin-primary">
|
|
<i class="bi bi-plus-lg me-2"></i> NUEVA PROMOCIÓN
|
|
</a>
|
|
</div>
|
|
|
|
<div class="admin-card">
|
|
<div class="card-body">
|
|
@if($promociones->isEmpty())
|
|
<div class="empty-state">
|
|
<i class="bi bi-geo-alt"></i>
|
|
<p>No hay promociones registradas.</p>
|
|
</div>
|
|
@else
|
|
<div class="table-responsive">
|
|
<table class="admin-table">
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>Nombre</th>
|
|
<th>Dirección</th>
|
|
<th>Categoría</th>
|
|
<th>QRs</th>
|
|
<th>Acciones</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($promociones as $p)
|
|
<tr>
|
|
<td data-label="ID">{{ $p->id }}</td>
|
|
<td data-label="Nombre">
|
|
<strong>{{ $p->nombre }}</strong>
|
|
@if($p->imagen)
|
|
<br><img src="{{ asset($p->imagen) }}" alt="" style="max-height: 40px; border-radius: 4px; margin-top: 4px;">
|
|
@endif
|
|
</td>
|
|
<td data-label="Dirección">{{ $p->direccion }}</td>
|
|
<td data-label="Categoría">
|
|
<span class="badge bg-info">{{ $p->categoria ?? 'Sin categoría' }}</span>
|
|
</td>
|
|
<td data-label="QRs">
|
|
<span class="badge bg-secondary">{{ $p->promo_qrs_count }}</span>
|
|
</td>
|
|
<td data-label="Acciones">
|
|
<a href="{{ route('admin.promociones.edit', $p->id) }}" class="btn-action edit">
|
|
<i class="bi bi-pencil"></i> Editar
|
|
</a>
|
|
<form action="{{ route('admin.promociones.destroy', $p->id) }}" method="POST" class="delete-form confirm-submit" data-confirm-text="¿Eliminar esta promoción?">
|
|
@csrf
|
|
@method('DELETE')
|
|
<button type="submit" class="btn-action delete">
|
|
<i class="bi bi-trash"></i>
|
|
</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
@endsection
|