88 lines
6.9 KiB
PHP
88 lines
6.9 KiB
PHP
<div>
|
|
<div class="mb-6 flex items-center justify-between">
|
|
<div>
|
|
<h1 class="text-2xl font-bold text-gray-900"><?php echo e($proclamatore->nome_completo); ?></h1>
|
|
<a href="<?php echo e(route('proclamatori.index')); ?>" class="text-sm text-indigo-600 hover:text-indigo-800">← Torna alla lista</a>
|
|
</div>
|
|
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('proclamatori.manage')): ?>
|
|
<a href="<?php echo e(route('proclamatori.edit', $proclamatore)); ?>" class="px-4 py-2 text-sm font-medium text-white bg-indigo-600 rounded-lg hover:bg-indigo-700 transition">Modifica</a>
|
|
<?php endif; ?>
|
|
</div>
|
|
|
|
|
|
<div class="grid grid-cols-1 sm:grid-cols-3 gap-4 mb-6">
|
|
<div class="bg-white rounded-xl shadow-sm border border-gray-200 p-4">
|
|
<p class="text-xs font-medium text-gray-500 uppercase">Stato</p>
|
|
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($proclamatore->attivo): ?>
|
|
<span class="inline-flex mt-1 px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800">Attivo</span>
|
|
<?php else: ?>
|
|
<span class="inline-flex mt-1 px-2.5 py-0.5 rounded-full text-xs font-medium bg-gray-100 text-gray-600">Inattivo</span>
|
|
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
|
</div>
|
|
<div class="bg-white rounded-xl shadow-sm border border-gray-200 p-4">
|
|
<p class="text-xs font-medium text-gray-500 uppercase">Territori Attualmente</p>
|
|
<p class="mt-1 text-2xl font-bold text-indigo-600"><?php echo e($stats['attualmente_assegnati']); ?></p>
|
|
</div>
|
|
<div class="bg-white rounded-xl shadow-sm border border-gray-200 p-4">
|
|
<p class="text-xs font-medium text-gray-500 uppercase">Media Giorni Trattenuta</p>
|
|
<p class="mt-1 text-2xl font-bold text-gray-900"><?php echo e($stats['media_giorni']); ?> gg</p>
|
|
<p class="text-xs text-gray-500">su <?php echo e($stats['totale_assegnazioni']); ?> assegnazioni totali</p>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="bg-white rounded-xl shadow-sm border border-gray-200 p-6">
|
|
<h3 class="text-lg font-semibold text-gray-900 mb-4">Storico Assegnazioni</h3>
|
|
|
|
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__empty_1 = true; $__currentLoopData = $assegnazioniPerAnno; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $annoLabel => $assegnazioni): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
|
|
<div class="mb-6">
|
|
<h4 class="text-sm font-semibold text-indigo-600 mb-2">Anno Teocratico <?php echo e($annoLabel); ?></h4>
|
|
<div class="overflow-x-auto">
|
|
<table class="min-w-full divide-y divide-gray-200 text-sm">
|
|
<thead class="bg-gray-50">
|
|
<tr>
|
|
<th class="px-3 py-2 text-left text-xs font-medium text-gray-500">Territorio</th>
|
|
<th class="px-3 py-2 text-left text-xs font-medium text-gray-500">Assegnato</th>
|
|
<th class="px-3 py-2 text-left text-xs font-medium text-gray-500">Rientrato</th>
|
|
<th class="px-3 py-2 text-left text-xs font-medium text-gray-500">Giorni</th>
|
|
<th class="px-3 py-2 text-left text-xs font-medium text-gray-500">Campagna</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-gray-100">
|
|
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $assegnazioni; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $assegnazione): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
|
<tr>
|
|
<td class="px-3 py-2">
|
|
<a href="<?php echo e(route('territori.show', $assegnazione->territorio_id)); ?>" class="text-indigo-600 hover:underline">
|
|
<?php echo e($assegnazione->territorio?->numero ?? 'N/A'); ?>
|
|
|
|
</a>
|
|
</td>
|
|
<td class="px-3 py-2"><?php echo e($assegnazione->assigned_at->format('d/m/Y')); ?></td>
|
|
<td class="px-3 py-2">
|
|
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($assegnazione->returned_at): ?>
|
|
<?php echo e($assegnazione->returned_at->format('d/m/Y')); ?>
|
|
|
|
<?php else: ?>
|
|
<span class="text-amber-600 font-medium">In corso</span>
|
|
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
|
</td>
|
|
<td class="px-3 py-2"><?php echo e($assegnazione->giorni); ?></td>
|
|
<td class="px-3 py-2">
|
|
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($assegnazione->counted_in_campaign): ?>
|
|
<span class="text-green-600"><?php echo e($assegnazione->campagna?->descrizione); ?></span>
|
|
<?php else: ?>
|
|
<span class="text-gray-400">-</span>
|
|
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
|
|
<p class="text-gray-500 text-sm">Nessuna assegnazione registrata.</p>
|
|
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
|
</div>
|
|
</div>
|
|
<?php /**PATH /var/www/html/resources/views/livewire/proclamatori/proclamatore-show.blade.php ENDPATH**/ ?>
|