Files
termanager2/storage/framework/views/1ed756a4715c537c3dc5df651fbc8828.php
Francesco Picone 701f479b7f Primo commit
2026-04-05 19:26:04 +02:00

84 lines
7.0 KiB
PHP

<div>
<div class="mb-6 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4">
<h1 class="text-2xl font-bold text-gray-900">Proclamatori</h1>
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('proclamatori.manage')): ?>
<a href="<?php echo e(route('proclamatori.create')); ?>" class="inline-flex items-center px-4 py-2 text-sm font-medium text-white bg-indigo-600 rounded-lg hover:bg-indigo-700 transition">
+ Nuovo Proclamatore
</a>
<?php endif; ?>
</div>
<div class="bg-white rounded-xl shadow-sm border border-gray-200 p-4 mb-4">
<div class="grid grid-cols-1 sm:grid-cols-3 gap-3">
<input wire:model.live.debounce.300ms="search" type="text" placeholder="Cerca nome o cognome..." class="rounded-lg border-gray-300 text-sm focus:ring-indigo-500 focus:border-indigo-500">
<select wire:model.live="filtroStato" class="rounded-lg border-gray-300 text-sm focus:ring-indigo-500 focus:border-indigo-500">
<option value="">Tutti</option>
<option value="attivo">Attivi</option>
<option value="inattivo">Inattivi</option>
</select>
<div class="text-xs text-gray-500 flex items-center">
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('proclamatori.manage')): ?>
<a href="<?php echo e(route('proclamatori.cestino')); ?>" class="text-red-500 hover:text-red-700">🗑 Cestino</a>
<?php endif; ?>
</div>
</div>
</div>
<div class="bg-white rounded-xl shadow-sm border border-gray-200 overflow-hidden">
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th wire:click="sortBy('cognome')" class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase cursor-pointer hover:text-gray-700">
Cognome <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($sortField==='cognome'): ?> <?php echo e($sortDirection==='asc'?'↑':'↓'); ?> <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</th>
<th wire:click="sortBy('nome')" class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase cursor-pointer hover:text-gray-700">
Nome <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($sortField==='nome'): ?> <?php echo e($sortDirection==='asc'?'↑':'↓'); ?> <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Stato</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Territori Assegnati</th>
<th class="px-4 py-3 text-right text-xs font-medium text-gray-500 uppercase">Azioni</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-200">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__empty_1 = true; $__currentLoopData = $proclamatori; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $proclamatore): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
<tr class="hover:bg-gray-50">
<td class="px-4 py-3 text-sm font-medium text-gray-900"><?php echo e($proclamatore->cognome); ?></td>
<td class="px-4 py-3 text-sm text-gray-700"><?php echo e($proclamatore->nome); ?></td>
<td class="px-4 py-3 text-sm">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($proclamatore->attivo): ?>
<span class="inline-flex px-2 py-0.5 text-xs font-medium rounded-full bg-green-100 text-green-800">Attivo</span>
<?php else: ?>
<span class="inline-flex px-2 py-0.5 text-xs font-medium rounded-full bg-gray-100 text-gray-600">Inattivo</span>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</td>
<td class="px-4 py-3 text-sm text-gray-600"><?php echo e($proclamatore->assegnazioni()->aperte()->count()); ?></td>
<td class="px-4 py-3 text-sm text-right space-x-2">
<a href="<?php echo e(route('proclamatori.show', $proclamatore)); ?>" class="text-indigo-600 hover:text-indigo-800 text-xs">Dettaglio</a>
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('proclamatori.manage')): ?>
<a href="<?php echo e(route('proclamatori.edit', $proclamatore)); ?>" class="text-yellow-600 hover:text-yellow-800 text-xs">Modifica</a>
<button wire:click="toggleActive(<?php echo e($proclamatore->id); ?>)" class="text-xs <?php echo e($proclamatore->attivo ? 'text-gray-500 hover:text-gray-700' : 'text-green-600 hover:text-green-800'); ?>">
<?php echo e($proclamatore->attivo ? 'Disattiva' : 'Attiva'); ?>
</button>
<button wire:click="deleteProclamatore(<?php echo e($proclamatore->id); ?>)" wire:confirm="Spostare il proclamatore nel cestino?" class="text-red-500 hover:text-red-700 text-xs">Elimina</button>
<?php endif; ?>
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
<tr>
<td colspan="5" class="px-4 py-8 text-center text-gray-500 text-sm">Nessun proclamatore trovato.</td>
</tr>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</tbody>
</table>
</div>
<div class="px-4 py-3 border-t border-gray-200">
<?php echo e($proclamatori->links()); ?>
</div>
</div>
</div>
<?php /**PATH /var/www/html/resources/views/livewire/proclamatori/proclamatore-index.blade.php ENDPATH**/ ?>