Primo commit

This commit is contained in:
Francesco Picone
2026-04-05 19:26:04 +02:00
commit 701f479b7f
135 changed files with 21445 additions and 0 deletions

View File

@@ -0,0 +1,126 @@
<div>
<div class="mb-6 flex items-center justify-between">
<div>
<h1 class="text-2xl font-bold text-gray-900">Territorio <?php echo e($territorio->numero); ?></h1>
<a href="<?php echo e(route('territori.index')); ?>" class="text-sm text-indigo-600 hover:text-indigo-800">← Torna alla lista</a>
</div>
<a href="<?php echo e(route('territori.edit', $territorio)); ?>" class="px-4 py-2 text-sm font-medium text-white bg-indigo-600 rounded-lg hover:bg-indigo-700 transition">Modifica</a>
</div>
<div class="bg-white rounded-xl shadow-sm border border-gray-200 p-6 mb-6">
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4">
<div>
<p class="text-xs font-medium text-gray-500 uppercase">Stato</p>
<?php $stato = $territorio->stato; ?>
<span class="inline-flex items-center mt-1 px-2.5 py-0.5 rounded-full text-xs font-medium
<?php echo e(match($stato) {
'in_reparto' => 'bg-green-100 text-green-800',
'assegnato' => 'bg-blue-100 text-blue-800',
'da_rientrare' => 'bg-red-100 text-red-800',
'inattivo' => 'bg-gray-100 text-gray-600',
default => 'bg-gray-100 text-gray-600'
}); ?>">
<?php echo e(str_replace('_', ' ', ucfirst($stato))); ?>
</span>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($territorio->is_prioritario): ?>
<span class="inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-amber-100 text-amber-800 ml-1">★ Prioritario</span>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
<div>
<p class="text-xs font-medium text-gray-500 uppercase">Zona</p>
<p class="mt-1 text-sm text-gray-900"><?php echo e($territorio->zona?->nome ?? '-'); ?></p>
</div>
<div>
<p class="text-xs font-medium text-gray-500 uppercase">Tipologia</p>
<p class="mt-1 text-sm text-gray-900"><?php echo e($territorio->tipologia?->nome ?? '-'); ?></p>
</div>
<div>
<p class="text-xs font-medium text-gray-500 uppercase">Assegnatario</p>
<p class="mt-1 text-sm text-gray-900"><?php echo e($territorio->assegnatario?->nome_completo ?? 'Nessuno'); ?></p>
</div>
</div>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($territorio->note): ?>
<div class="mt-4 pt-4 border-t">
<p class="text-xs font-medium text-gray-500 uppercase">Note</p>
<p class="mt-1 text-sm text-gray-700"><?php echo e($territorio->note); ?></p>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($territorio->confini): ?>
<div class="mt-4 pt-4 border-t">
<p class="text-xs font-medium text-gray-500 uppercase">Confini</p>
<p class="mt-1 text-sm text-gray-700"><?php echo e($territorio->confini); ?></p>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($territorio->pdf_path): ?>
<div class="bg-white rounded-xl shadow-sm border border-gray-200 p-4 mb-6">
<h3 class="text-sm font-semibold text-gray-700 mb-3">PDF Territorio</h3>
<div class="w-full" style="min-height: 500px;">
<embed src="<?php echo e(asset('storage/' . $territorio->pdf_path)); ?>" type="application/pdf" width="100%" height="500px">
<p class="mt-2 text-sm text-gray-500">
Se il PDF non è visibile:
<a href="<?php echo e(asset('storage/' . $territorio->pdf_path)); ?>" target="_blank" class="text-indigo-600 hover:underline">Scarica PDF</a>
</p>
</div>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<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">Proclamatore</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"><?php echo e($assegnazione->proclamatore?->nome_completo ?? 'N/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">Sì — <?php echo e($assegnazione->campagna?->descrizione); ?></span>
<?php elseif($assegnazione->counted_in_campaign === false): ?>
<span class="text-gray-400">No</span>
<?php else: ?>
<span class="text-gray-300">-</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/territori/territorio-show.blade.php ENDPATH**/ ?>