88 lines
4.5 KiB
PHP
88 lines
4.5 KiB
PHP
@extends('admin.layouts.netgescon')
|
|
|
|
@section('title', 'GESCON Import · Occupazione condomin')
|
|
|
|
@section('breadcrumb')
|
|
<a href="{{ route('admin.gescon-import.index') }}">GESCON Import</a>
|
|
<span>Occupazione</span>
|
|
@endsection
|
|
|
|
@section('content')
|
|
<div class="content-wrapper px-6">
|
|
@include('components.layout.alerts')
|
|
|
|
<div class="netgescon-card p-6 mb-6">
|
|
<div class="flex items-start justify-between gap-4 mb-4">
|
|
<div>
|
|
<h1 class="text-xl font-semibold text-slate-800">Anteprima occupazione</h1>
|
|
<p class="text-sm text-slate-600">Dati letti da <code>gescon_import.condomin</code> per un controllo rapido proprietari/inquilini per stabile.</p>
|
|
</div>
|
|
<a href="{{ route('admin.gescon-import.index') }}" class="netgescon-btn netgescon-btn-outline-secondary">
|
|
<i class="mdi mdi-arrow-left"></i> Torna al pannello Import
|
|
</a>
|
|
</div>
|
|
|
|
@if(!$stagingDisponibile)
|
|
<div class="p-4 bg-red-50 border border-red-200 rounded text-red-700 text-sm">
|
|
Tabella <code>condomin</code> non presente nella connessione <code>gescon_import</code>.
|
|
</div>
|
|
@else
|
|
<form method="get" class="flex flex-wrap items-center gap-3 mb-4">
|
|
<label class="text-sm text-slate-600 flex items-center gap-2">
|
|
<span>Stabile</span>
|
|
<select name="stabile" class="netgescon-input">
|
|
@foreach($stabili as $stab)
|
|
<option value="{{ $stab->cod_stabile }}" @selected($stab->cod_stabile === $selected)>{{ $stab->cod_stabile }}</option>
|
|
@endforeach
|
|
</select>
|
|
</label>
|
|
<label class="text-sm text-slate-600 flex items-center gap-2">
|
|
<span>Limite</span>
|
|
<input type="number" name="limit" value="{{ $limit }}" min="10" max="500" class="netgescon-input w-24" />
|
|
</label>
|
|
<button type="submit" class="netgescon-btn netgescon-btn-primary">Aggiorna</button>
|
|
</form>
|
|
|
|
<div class="overflow-auto">
|
|
<table class="min-w-full text-sm">
|
|
<thead>
|
|
<tr class="border-b text-left text-slate-500">
|
|
<th class="py-2 pr-3">Codice</th>
|
|
<th class="py-2 pr-3">Stabile</th>
|
|
<th class="py-2 pr-3">Cognome</th>
|
|
<th class="py-2 pr-3">Nome</th>
|
|
<th class="py-2 pr-3">Tipo</th>
|
|
<th class="py-2 pr-3">Unità</th>
|
|
<th class="py-2 pr-3">Scala</th>
|
|
<th class="py-2 pr-3">Piano</th>
|
|
<th class="py-2 pr-3">Interno</th>
|
|
<th class="py-2 pr-3">Email</th>
|
|
<th class="py-2 pr-3">Telefono</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@forelse($records as $row)
|
|
<tr class="border-b last:border-0">
|
|
<td class="py-2 pr-3">{{ $row->cod_cond ?? '-' }}</td>
|
|
<td class="py-2 pr-3">{{ $row->cod_stabile ?? '-' }}</td>
|
|
<td class="py-2 pr-3">{{ $row->cognome ?? '-' }}</td>
|
|
<td class="py-2 pr-3">{{ $row->nome ?? '-' }}</td>
|
|
<td class="py-2 pr-3">{{ $row->tipo ?? ($row->tipo_sogg ?? '-') }}</td>
|
|
<td class="py-2 pr-3">{{ $row->cod_unita ?? '-' }}</td>
|
|
<td class="py-2 pr-3">{{ $row->scala ?? '-' }}</td>
|
|
<td class="py-2 pr-3">{{ $row->piano ?? '-' }}</td>
|
|
<td class="py-2 pr-3">{{ $row->interno ?? '-' }}</td>
|
|
<td class="py-2 pr-3">{{ $row->email ?? $row->mail ?? '-' }}</td>
|
|
<td class="py-2 pr-3">{{ $row->telefono ?? $row->cellulare ?? '-' }}</td>
|
|
</tr>
|
|
@empty
|
|
<tr><td colspan="11" class="py-4 text-slate-500">Nessun dato disponibile per questo stabile.</td></tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
@endsection
|