305 lines
17 KiB
PHP
Executable File
305 lines
17 KiB
PHP
Executable File
<!-- Tab Dati Generali - NetGescon Tailwind -->
|
|
<div class="space-y-6">
|
|
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
|
|
<!-- Informazioni Principali -->
|
|
<div class="bg-blue-50 dark:bg-blue-900/20 p-6 rounded-lg">
|
|
<h4 class="text-lg font-medium text-gray-900 dark:text-gray-100 mb-4">
|
|
<i class="fas fa-building mr-2 text-blue-600"></i>
|
|
Informazioni Generali
|
|
</h4>
|
|
@php
|
|
$mostraRiscaldamento = (bool) data_get($stabile->configurazione_avanzata, 'mostra_riscaldamento', false);
|
|
@endphp
|
|
<dl class="space-y-3">
|
|
<div>
|
|
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">ID Stabile:</dt>
|
|
<dd class="text-sm text-gray-900 dark:text-gray-100 font-mono">{{ $stabile->id_stabile }}</dd>
|
|
</div>
|
|
<div>
|
|
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">Denominazione:</dt>
|
|
<dd class="text-sm text-gray-900 dark:text-gray-100 font-bold">{{ $stabile->denominazione }}</dd>
|
|
</div>
|
|
<div>
|
|
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">Codice Fiscale:</dt>
|
|
<dd class="text-sm text-gray-900 dark:text-gray-100 font-mono">{{ $stabile->codice_fiscale ?? '-' }}</dd>
|
|
</div>
|
|
<div>
|
|
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">CF Amministratore:</dt>
|
|
<dd class="text-sm text-gray-900 dark:text-gray-100 font-mono">{{ $stabile->cod_fisc_amministratore ?? '-' }}</dd>
|
|
</div>
|
|
<div>
|
|
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">Stato:</dt>
|
|
<dd class="text-sm">
|
|
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium
|
|
{{ $stabile->stato === 'attivo' ? 'bg-green-100 text-green-800 dark:bg-green-800 dark:text-green-100' : 'bg-red-100 text-red-800 dark:bg-red-800 dark:text-red-100' }}">
|
|
<i class="fas fa-circle mr-1 text-xs"></i>
|
|
{{ ucfirst($stabile->stato) }}
|
|
</span>
|
|
</dd>
|
|
</div>
|
|
<div>
|
|
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">Riscaldamento:</dt>
|
|
<dd class="text-sm">
|
|
<button
|
|
type="button"
|
|
wire:click="toggleMostraRiscaldamento"
|
|
wire:loading.attr="disabled"
|
|
class="inline-flex items-center gap-2 px-3 py-1.5 rounded-full text-xs font-semibold transition border
|
|
{{ $mostraRiscaldamento ? 'bg-amber-100 text-amber-900 border-amber-200 dark:bg-amber-900/40 dark:text-amber-100 dark:border-amber-700' : 'bg-gray-100 text-gray-700 border-gray-200 dark:bg-gray-800 dark:text-gray-200 dark:border-gray-700' }}"
|
|
aria-pressed="{{ $mostraRiscaldamento ? 'true' : 'false' }}"
|
|
>
|
|
<span class="inline-flex h-2 w-2 rounded-full {{ $mostraRiscaldamento ? 'bg-amber-500' : 'bg-gray-400' }}"></span>
|
|
Riscaldamento: {{ $mostraRiscaldamento ? 'Attivo' : 'Disattivo' }}
|
|
</button>
|
|
</dd>
|
|
</div>
|
|
</dl>
|
|
</div>
|
|
|
|
<div class="bg-green-50 dark:bg-green-900/20 p-6 rounded-lg">
|
|
<h4 class="text-lg font-medium text-gray-900 dark:text-gray-100 mb-4">
|
|
<i class="fas fa-map-marker-alt mr-2 text-green-600"></i>
|
|
Indirizzo Completo
|
|
</h4>
|
|
<dl class="space-y-3">
|
|
<div>
|
|
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">Indirizzo:</dt>
|
|
<dd class="text-sm text-gray-900 dark:text-gray-100">{{ $stabile->indirizzo }}</dd>
|
|
</div>
|
|
<div>
|
|
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">Città:</dt>
|
|
<dd class="text-sm text-gray-900 dark:text-gray-100">{{ $stabile->citta }}</dd>
|
|
</div>
|
|
<div class="grid grid-cols-2 gap-4">
|
|
<div>
|
|
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">CAP:</dt>
|
|
<dd class="text-sm text-gray-900 dark:text-gray-100 font-mono">{{ $stabile->cap }}</dd>
|
|
</div>
|
|
<div>
|
|
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">Provincia:</dt>
|
|
<dd class="text-sm text-gray-900 dark:text-gray-100 font-mono">{{ $stabile->provincia ?? '-' }}</dd>
|
|
</div>
|
|
</div>
|
|
<div class="pt-2 border-t border-green-200 dark:border-green-700">
|
|
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">Indirizzo Completo:</dt>
|
|
<dd class="text-sm text-gray-900 dark:text-gray-100 bg-white dark:bg-gray-800 p-2 rounded border">
|
|
{{ $stabile->indirizzo_completo }}
|
|
</dd>
|
|
</div>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Dati Catastali UNIFICATI qui come richiesto -->
|
|
<div class="bg-yellow-50 dark:bg-yellow-900/20 p-6 rounded-lg">
|
|
@php
|
|
$catasto = collect($stabile->dati_catastali ?? [])->map(function ($value) {
|
|
return ($value === null || $value === '') ? null : $value;
|
|
});
|
|
$codiceComuneCatasto = $catasto->get('codice_comune');
|
|
$foglioCatasto = $catasto->get('foglio');
|
|
$particellaCatasto = $catasto->get('particella');
|
|
$subalternoCatasto = $catasto->get('subalterno');
|
|
$sezioneCatasto = $catasto->get('sezione');
|
|
$categoriaCatasto = $catasto->get('categoria');
|
|
$classeCatasto = $catasto->get('classe');
|
|
$consistenzaCatasto = $catasto->get('consistenza');
|
|
$renditaCatasto = $catasto->get('rendita');
|
|
$superficieCatasto = $catasto->get('superficie');
|
|
$renditaFormatted = $renditaCatasto !== null ? number_format((float)$renditaCatasto, 2, ',', '.') : null;
|
|
$superficieFormatted = $superficieCatasto !== null ? number_format((float)$superficieCatasto, 2, ',', '.') : null;
|
|
@endphp
|
|
<h4 class="text-lg font-medium text-gray-900 dark:text-gray-100 mb-4">
|
|
<i class="fas fa-map mr-2 text-yellow-600"></i>
|
|
Dati Catastali e Amministrativi
|
|
</h4>
|
|
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
|
|
<!-- Dati Catastali -->
|
|
<div class="bg-white dark:bg-gray-800 p-4 rounded-lg border border-yellow-200 dark:border-yellow-700">
|
|
<h5 class="font-medium text-gray-900 dark:text-gray-100 mb-3">
|
|
<i class="fas fa-landmark mr-2 text-yellow-600"></i>
|
|
Catasto
|
|
</h5>
|
|
<dl class="grid grid-cols-1 sm:grid-cols-2 gap-x-4 gap-y-2 text-sm">
|
|
<div>
|
|
<dt class="text-xs font-medium text-gray-500 dark:text-gray-400">Codice Comune:</dt>
|
|
<dd class="text-sm text-gray-900 dark:text-gray-100">{{ $codiceComuneCatasto ?? '-' }}</dd>
|
|
</div>
|
|
<div>
|
|
<dt class="text-xs font-medium text-gray-500 dark:text-gray-400">Foglio:</dt>
|
|
<dd class="text-sm text-gray-900 dark:text-gray-100">{{ $foglioCatasto ?? '-' }}</dd>
|
|
</div>
|
|
<div>
|
|
<dt class="text-xs font-medium text-gray-500 dark:text-gray-400">Particella:</dt>
|
|
<dd class="text-sm text-gray-900 dark:text-gray-100">{{ $particellaCatasto ?? '-' }}</dd>
|
|
</div>
|
|
<div>
|
|
<dt class="text-xs font-medium text-gray-500 dark:text-gray-400">Subalterno:</dt>
|
|
<dd class="text-sm text-gray-900 dark:text-gray-100">{{ $subalternoCatasto ?? '-' }}</dd>
|
|
</div>
|
|
<div>
|
|
<dt class="text-xs font-medium text-gray-500 dark:text-gray-400">Sezione:</dt>
|
|
<dd class="text-sm text-gray-900 dark:text-gray-100">{{ $sezioneCatasto ?? '-' }}</dd>
|
|
</div>
|
|
<div>
|
|
<dt class="text-xs font-medium text-gray-500 dark:text-gray-400">Categoria:</dt>
|
|
<dd class="text-sm text-gray-900 dark:text-gray-100">{{ $categoriaCatasto ?? '-' }}</dd>
|
|
</div>
|
|
<div>
|
|
<dt class="text-xs font-medium text-gray-500 dark:text-gray-400">Classe:</dt>
|
|
<dd class="text-sm text-gray-900 dark:text-gray-100">{{ $classeCatasto ?? '-' }}</dd>
|
|
</div>
|
|
<div>
|
|
<dt class="text-xs font-medium text-gray-500 dark:text-gray-400">Consistenza:</dt>
|
|
<dd class="text-sm text-gray-900 dark:text-gray-100">{{ $consistenzaCatasto ?? '-' }}</dd>
|
|
</div>
|
|
<div>
|
|
<dt class="text-xs font-medium text-gray-500 dark:text-gray-400">Rendita:</dt>
|
|
<dd class="text-sm text-gray-900 dark:text-gray-100">{{ $renditaFormatted ? '€ '.$renditaFormatted : '-' }}</dd>
|
|
</div>
|
|
<div>
|
|
<dt class="text-xs font-medium text-gray-500 dark:text-gray-400">Superficie:</dt>
|
|
<dd class="text-sm text-gray-900 dark:text-gray-100">{{ $superficieFormatted ? $superficieFormatted . ' m²' : '-' }}</dd>
|
|
</div>
|
|
</dl>
|
|
</div>
|
|
|
|
<!-- Dati INPS -->
|
|
<div class="bg-white dark:bg-gray-800 p-4 rounded-lg border border-yellow-200 dark:border-yellow-700">
|
|
<h5 class="font-medium text-gray-900 dark:text-gray-100 mb-3">
|
|
<i class="fas fa-id-card mr-2 text-yellow-600"></i>
|
|
INPS/Contributi
|
|
</h5>
|
|
<dl class="space-y-2">
|
|
<div>
|
|
<dt class="text-xs font-medium text-gray-500 dark:text-gray-400">Posizione INPS:</dt>
|
|
<dd class="text-sm text-gray-900 dark:text-gray-100 font-mono">{{ $stabile->pos_inps ?? '-' }}</dd>
|
|
</div>
|
|
<div>
|
|
<dt class="text-xs font-medium text-gray-500 dark:text-gray-400">N. Contribuente:</dt>
|
|
<dd class="text-sm text-gray-900 dark:text-gray-100 font-mono">{{ $stabile->n_contribuente ?? '-' }}</dd>
|
|
</div>
|
|
<div class="pt-2 border-t border-yellow-100 dark:border-yellow-800">
|
|
<dt class="text-xs font-medium text-gray-500 dark:text-gray-400">Codice Destinatario SDI:</dt>
|
|
<dd class="text-sm text-gray-900 dark:text-gray-100 font-mono">{{ $stabile->codice_destinatario_sdi ?? '-' }}</dd>
|
|
</div>
|
|
<div>
|
|
<dt class="text-xs font-medium text-gray-500 dark:text-gray-400">PEC Condominio:</dt>
|
|
<dd class="text-sm text-gray-900 dark:text-gray-100">{{ $stabile->pec_condominio ?? '-' }}</dd>
|
|
</div>
|
|
</dl>
|
|
</div>
|
|
|
|
<!-- Statistiche Stabile -->
|
|
<div class="bg-white dark:bg-gray-800 p-4 rounded-lg border border-yellow-200 dark:border-yellow-700">
|
|
<h5 class="font-medium text-gray-900 dark:text-gray-100 mb-3">
|
|
<i class="fas fa-chart-bar mr-2 text-yellow-600"></i>
|
|
Statistiche
|
|
</h5>
|
|
<dl class="space-y-2">
|
|
<div>
|
|
<dt class="text-xs font-medium text-gray-500 dark:text-gray-400">N. Condomini:</dt>
|
|
<dd class="text-sm text-gray-900 dark:text-gray-100 font-bold">{{ $stabile->num_condomini ?? '0' }}</dd>
|
|
</div>
|
|
<div>
|
|
<dt class="text-xs font-medium text-gray-500 dark:text-gray-400">N. Scale:</dt>
|
|
<dd class="text-sm text-gray-900 dark:text-gray-100 font-bold">{{ $stabile->num_scale ?? '0' }}</dd>
|
|
</div>
|
|
<div>
|
|
<dt class="text-xs font-medium text-gray-500 dark:text-gray-400">Unità Immobiliari:</dt>
|
|
<dd class="text-sm text-gray-900 dark:text-gray-100 font-bold">
|
|
{{ $stabile->unitaImmobiliari?->count() ?? '0' }}
|
|
</dd>
|
|
</div>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Note -->
|
|
@if($stabile->note)
|
|
<div class="bg-gray-50 dark:bg-gray-700 p-6 rounded-lg">
|
|
<h4 class="text-lg font-medium text-gray-900 dark:text-gray-100 mb-4">
|
|
<i class="fas fa-sticky-note mr-2 text-gray-600"></i>
|
|
Note
|
|
</h4>
|
|
<div class="bg-white dark:bg-gray-800 p-4 rounded border border-gray-200 dark:border-gray-600">
|
|
<p class="text-sm text-gray-900 dark:text-gray-100 whitespace-pre-line">{{ $stabile->note }}</p>
|
|
</div>
|
|
</div>
|
|
@endif
|
|
|
|
<!-- Informazioni Sistema -->
|
|
<div class="bg-gray-50 dark:bg-gray-700 p-6 rounded-lg">
|
|
<h4 class="text-lg font-medium text-gray-900 dark:text-gray-100 mb-4">
|
|
<i class="fas fa-cogs mr-2 text-gray-600"></i>
|
|
Informazioni Sistema
|
|
</h4>
|
|
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
|
|
<div class="bg-white dark:bg-gray-800 p-4 rounded border">
|
|
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400 mb-1">Creato il:</dt>
|
|
<dd class="text-sm text-gray-900 dark:text-gray-100">
|
|
<i class="fas fa-calendar mr-1"></i>
|
|
{{ $stabile->created_at->format('d/m/Y') }}
|
|
</dd>
|
|
<dd class="text-xs text-gray-500 dark:text-gray-400">
|
|
<i class="fas fa-clock mr-1"></i>
|
|
{{ $stabile->created_at->format('H:i') }}
|
|
</dd>
|
|
</div>
|
|
<div class="bg-white dark:bg-gray-800 p-4 rounded border">
|
|
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400 mb-1">Ultimo aggiornamento:</dt>
|
|
<dd class="text-sm text-gray-900 dark:text-gray-100">
|
|
<i class="fas fa-calendar mr-1"></i>
|
|
{{ $stabile->updated_at->format('d/m/Y') }}
|
|
</dd>
|
|
<dd class="text-xs text-gray-500 dark:text-gray-400">
|
|
<i class="fas fa-clock mr-1"></i>
|
|
{{ $stabile->updated_at->format('H:i') }}
|
|
</dd>
|
|
</div>
|
|
@if($stabile->old_id)
|
|
<div class="bg-white dark:bg-gray-800 p-4 rounded border">
|
|
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400 mb-1">ID Sistema Precedente:</dt>
|
|
<dd class="text-sm text-gray-900 dark:text-gray-100 font-mono">
|
|
<i class="fas fa-database mr-1"></i>
|
|
{{ $stabile->old_id }}
|
|
</dd>
|
|
<dd class="text-xs text-gray-500 dark:text-gray-400">Legacy ID</dd>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Quick Actions -->
|
|
<div class="bg-blue-50 dark:bg-blue-900/20 p-6 rounded-lg border-l-4 border-blue-500">
|
|
<h4 class="text-lg font-medium text-gray-900 dark:text-gray-100 mb-4">
|
|
<i class="fas fa-bolt mr-2 text-blue-600"></i>
|
|
Azioni Rapide
|
|
</h4>
|
|
<div class="grid grid-cols-1 md:grid-cols-4 gap-4">
|
|
<a href="{{ route('admin.stabili.edit', $stabile) }}"
|
|
class="flex items-center justify-center px-4 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors">
|
|
<i class="fas fa-edit mr-2"></i>
|
|
Modifica Stabile
|
|
</a>
|
|
<a href="#" onclick="loadUnitaImmobiliari({{ $stabile->id }}); return false;"
|
|
class="flex items-center justify-center px-4 py-3 bg-green-600 text-white rounded-lg hover:bg-green-700 transition-colors">
|
|
<i class="fas fa-home mr-2"></i>
|
|
Unità Immobiliari
|
|
</a>
|
|
<a href="{{ route('admin.contabilita.index', ['stabile_id' => $stabile->id]) }}"
|
|
class="flex items-center justify-center px-4 py-3 bg-purple-600 text-white rounded-lg hover:bg-purple-700 transition-colors">
|
|
<i class="fas fa-calculator mr-2"></i>
|
|
Contabilità
|
|
</a>
|
|
<a href="{{ route('admin.bilanci.index', ['stabile_id' => $stabile->id]) }}"
|
|
class="flex items-center justify-center px-4 py-3 bg-orange-600 text-white rounded-lg hover:bg-orange-700 transition-colors">
|
|
<i class="fas fa-chart-line mr-2"></i>
|
|
Bilanci
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|