100 lines
7.0 KiB
PHP
Executable File
100 lines
7.0 KiB
PHP
Executable File
@extends('admin.layouts.app')
|
|
|
|
@section('title', '
|
|
{{ __(\'Dettaglio Condominio: \') }} {{ $condominio->nome }}
|
|
')
|
|
|
|
@section('content')
|
|
|
|
|
|
|
|
<div class="py-5">
|
|
<div class="container-fluid mx-auto sm:px-4 lg:px-8">
|
|
<div class="bg-white dark:bg-dark overflow-hidden shadow-sm rounded mb-6">
|
|
<div class="p-6 text-gray-900 dark:text-gray-100">
|
|
<h3 class="text-lg font-medium leading-6 text-gray-900 dark:text-gray-100">Informazioni Condominio</h3>
|
|
<dl class="mt-5 grid row gap-x-4 gap-y-8 sm:row">
|
|
<div class="sm:col-md-12">
|
|
<dt class="text-sm font-medium text-muted dark:text-gray-400">Nome</dt>
|
|
<dd class="mt-1 text-sm text-gray-900 dark:text-gray-100">{{ $condominio->nome }}</dd>
|
|
</div>
|
|
<div class="sm:col-md-12">
|
|
<dt class="text-sm font-medium text-muted dark:text-gray-400">Codice Fiscale</dt>
|
|
<dd class="mt-1 text-sm text-gray-900 dark:text-gray-100">{{ $condominio->codice_fiscale ?: '-' }}</dd>
|
|
</div>
|
|
<div class="sm:col-span-2">
|
|
<dt class="text-sm font-medium text-muted dark:text-gray-400">Indirizzo</dt>
|
|
<dd class="mt-1 text-sm text-gray-900 dark:text-gray-100">{{ $condominio->indirizzo }}, {{ $condominio->cap }} {{ $condominio->citta }} ({{ $condominio->provincia }})</dd>
|
|
</div>
|
|
<div class="sm:col-md-12">
|
|
<dt class="text-sm font-medium text-muted dark:text-gray-400">CF Amministratore (del condominio)</dt>
|
|
<dd class="mt-1 text-sm text-gray-900 dark:text-gray-100">{{ $condominio->cod_fisc_amministratore ?: '-' }}</dd>
|
|
</div>
|
|
<div class="sm:col-md-12">
|
|
<dt class="text-sm font-medium text-muted dark:text-gray-400">ID Vecchio Gestionale</dt>
|
|
<dd class="mt-1 text-sm text-gray-900 dark:text-gray-100">{{ $condominio->old_id ?: '-' }}</dd>
|
|
</div>
|
|
<div class="sm:col-span-2">
|
|
<dt class="text-sm font-medium text-muted dark:text-gray-400">Note</dt>
|
|
<dd class="mt-1 text-sm text-gray-900 dark:text-gray-100">{{ $condominio->note ?: '-' }}</dd>
|
|
</div>
|
|
</dl>
|
|
<div class="mt-6">
|
|
<a href="{{ route('admin.condomini.edit', $condominio) }}" class="text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-200">Modifica Condominio</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="bg-white dark:bg-dark overflow-hidden shadow-sm rounded">
|
|
<div class="p-6 text-gray-900 dark:text-gray-100">
|
|
<h3 class="text-lg font-medium leading-6 text-gray-900 dark:text-gray-100 mb-4">Unità Immobiliari</h3>
|
|
@if (session('success_unita'))
|
|
<div class="mb-4 p-4 text-sm text-green-700 bg-green-100 rounded-lg dark:bg-green-200 dark:text-green-800" role="alert">
|
|
{{ session('success_unita') }}
|
|
</div>
|
|
@endif
|
|
<div class="overflow-x-auto">
|
|
<table class="table table-bordered dark:divide-gray-700">
|
|
<thead class="bg-light dark:bg-gray-700">
|
|
<tr>
|
|
<th scope="col" class="px-4 py-3 text-left text-xs font-medium text-muted dark:text-gray-300 uppercase tracking-wider">Scala</th>
|
|
<th scope="col" class="px-4 py-3 text-left text-xs font-medium text-muted dark:text-gray-300 uppercase tracking-wider">Interno</th>
|
|
<th scope="col" class="px-4 py-3 text-left text-xs font-medium text-muted dark:text-gray-300 uppercase tracking-wider">Piano</th>
|
|
<th scope="col" class="px-4 py-3 text-left text-xs font-medium text-muted dark:text-gray-300 uppercase tracking-wider">Millesimi</th>
|
|
<th scope="col" class="px-4 py-3 text-left text-xs font-medium text-muted dark:text-gray-300 uppercase tracking-wider">Azioni</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="bg-white dark:bg-dark table-bordered dark:divide-gray-700">
|
|
@forelse ($unitaImmobiliari as $unita)
|
|
<tr>
|
|
<td class="px-4 py-3 text-nowrap text-sm text-muted dark:text-gray-300">{{ $unita->scala ?: '-' }}</td>
|
|
<td class="px-4 py-3 text-nowrap text-sm text-muted dark:text-gray-300">{{ $unita->interno ?: '-' }}</td>
|
|
<td class="px-4 py-3 text-nowrap text-sm text-muted dark:text-gray-300">{{ $unita->piano ?: '-' }}</td>
|
|
<td class="px-4 py-3 text-nowrap text-sm text-muted dark:text-gray-300">{{ number_format($unita->millesimi_proprieta, 4, ',', '.') }}</td>
|
|
<td class="px-4 py-3 text-nowrap text-sm font-medium">
|
|
<a href="{{ route('admin.unitaImmobiliari.edit', $unita) }}" class="text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-200 mr-2">Modifica</a>
|
|
<form action="{{ route('admin.unitaImmobiliari.destroy', $unita) }}" method="POST" class="inline-block" onsubmit="return confirm('Sei sicuro di voler eliminare questa unità immobiliare?');">
|
|
@csrf
|
|
@method('DELETE')
|
|
<button type="submit" class="text-danger dark:text-red-400 hover:text-red-900 dark:hover:text-red-200">Elimina</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<td colspan="5" class="px-4 py-3 text-nowrap text-sm text-muted dark:text-gray-300 text-center">Nessuna unità immobiliare trovata per questo condominio.</td>
|
|
</tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="mt-4">
|
|
{{ $unitaImmobiliari->links() }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@endsection |