111 lines
5.7 KiB
PHP
Executable File
111 lines
5.7 KiB
PHP
Executable File
@extends('admin.layouts.netgescon')
|
|
|
|
@section('breadcrumb')
|
|
<span>
|
|
<i class="fas fa-university mr-2"></i>
|
|
Dati Bancari
|
|
</span>
|
|
@endsection
|
|
|
|
@section('content')
|
|
<div class="space-y-6">
|
|
<div class="flex items-center justify-between">
|
|
<div>
|
|
<h1 class="text-2xl font-bold text-gray-900">Dati Bancari</h1>
|
|
<p class="text-gray-600 mt-1">Elenco conti/casse gestiti nel sistema.</p>
|
|
</div>
|
|
<div>
|
|
<a href="{{ route('admin.dati-bancari.create') }}" class="netgescon-btn netgescon-btn-primary">
|
|
<i class="fas fa-plus mr-2"></i>
|
|
Nuovo conto
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
@if(session('success'))
|
|
<div class="p-4 rounded-lg bg-green-50 border border-green-200 text-green-800">
|
|
<i class="fas fa-check-circle mr-2"></i>
|
|
{{ session('success') }}
|
|
</div>
|
|
@endif
|
|
|
|
@if(session('error'))
|
|
<div class="p-4 rounded-lg bg-red-50 border border-red-200 text-red-800">
|
|
<i class="fas fa-times-circle mr-2"></i>
|
|
{{ session('error') }}
|
|
</div>
|
|
@endif
|
|
|
|
<div class="bg-white rounded-lg shadow-sm border overflow-hidden">
|
|
<div class="overflow-x-auto">
|
|
<table class="min-w-full divide-y divide-gray-200">
|
|
<thead class="bg-gray-50">
|
|
<tr>
|
|
<th class="px-4 py-3 text-left text-xs font-semibold text-gray-500 uppercase tracking-wider">Stabile</th>
|
|
<th class="px-4 py-3 text-left text-xs font-semibold text-gray-500 uppercase tracking-wider">Banca</th>
|
|
<th class="px-4 py-3 text-left text-xs font-semibold text-gray-500 uppercase tracking-wider">IBAN</th>
|
|
<th class="px-4 py-3 text-left text-xs font-semibold text-gray-500 uppercase tracking-wider">Tipo</th>
|
|
<th class="px-4 py-3 text-left text-xs font-semibold text-gray-500 uppercase tracking-wider">Stato</th>
|
|
<th class="px-4 py-3 text-right text-xs font-semibold text-gray-500 uppercase tracking-wider">Azioni</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="bg-white divide-y divide-gray-100">
|
|
@forelse($datiBancari as $conto)
|
|
<tr class="hover:bg-gray-50 transition-colors">
|
|
<td class="px-4 py-3">
|
|
<div class="font-medium text-gray-900">{{ $conto->stabile->denominazione ?? '—' }}</div>
|
|
@if(!empty($conto->stabile?->codice_stabile))
|
|
<div class="text-xs text-gray-500">Codice: {{ $conto->stabile->codice_stabile }}</div>
|
|
@endif
|
|
</td>
|
|
<td class="px-4 py-3">
|
|
<div class="text-gray-900 font-medium">{{ $conto->denominazione_banca }}</div>
|
|
<div class="text-xs text-gray-500">{{ $conto->intestazione_conto }}</div>
|
|
</td>
|
|
<td class="px-4 py-3">
|
|
<code class="text-sm">{{ $conto->iban }}</code>
|
|
</td>
|
|
<td class="px-4 py-3">
|
|
<span class="netgescon-badge">{{ ucfirst($conto->tipo_conto) }}</span>
|
|
</td>
|
|
<td class="px-4 py-3">
|
|
@php($badge = $conto->stato_conto === 'attivo' ? 'netgescon-badge-success' : ($conto->stato_conto === 'sospeso' ? 'netgescon-badge-info' : 'netgescon-badge-secondary'))
|
|
<span class="netgescon-badge {{ $badge }}">{{ ucfirst($conto->stato_conto) }}</span>
|
|
</td>
|
|
<td class="px-4 py-3 text-right whitespace-nowrap">
|
|
<a href="{{ route('admin.dati-bancari.show', $conto) }}" class="netgescon-btn netgescon-btn-outline-secondary netgescon-btn-sm">
|
|
<i class="fas fa-eye"></i>
|
|
</a>
|
|
<a href="{{ route('admin.dati-bancari.edit', $conto) }}" class="netgescon-btn netgescon-btn-outline-primary netgescon-btn-sm">
|
|
<i class="fas fa-edit"></i>
|
|
</a>
|
|
<form action="{{ route('admin.dati-bancari.destroy', $conto) }}" method="POST" class="inline" onsubmit="return confirm('Eliminare questo conto?')">
|
|
@csrf
|
|
@method('DELETE')
|
|
<button type="submit" class="netgescon-btn netgescon-btn-outline-dark netgescon-btn-sm">
|
|
<i class="fas fa-trash"></i>
|
|
</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<td colspan="6" class="px-4 py-10 text-center text-gray-500">
|
|
<i class="fas fa-university text-3xl mb-3"></i>
|
|
<div>Nessun conto/cassa presente.</div>
|
|
</td>
|
|
</tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
@if(method_exists($datiBancari, 'links'))
|
|
<div class="px-4 py-3 border-t bg-white">
|
|
{{ $datiBancari->links() }}
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
@endsection
|