68 lines
4.6 KiB
PHP
Executable File
68 lines
4.6 KiB
PHP
Executable File
@extends('admin.layouts.app')
|
|
|
|
@section('title', '
|
|
{{ __(\'Gestione Anagrafiche\') }}
|
|
')
|
|
|
|
@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">
|
|
<div class="p-6 text-gray-900 dark:text-gray-100">
|
|
@if (session('success'))
|
|
<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') }}
|
|
</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">Nominativo/Rag. Sociale</th>
|
|
<th scope="col" class="px-4 py-3 text-left text-xs font-medium text-muted dark:text-gray-300 uppercase tracking-wider">CF/P.IVA</th>
|
|
<th scope="col" class="px-4 py-3 text-left text-xs font-medium text-muted dark:text-gray-300 uppercase tracking-wider">Email</th>
|
|
<th scope="col" class="px-4 py-3 text-left text-xs font-medium text-muted dark:text-gray-300 uppercase tracking-wider">Tipo</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 ($anagrafiche as $anagrafica)
|
|
<tr>
|
|
<td class="px-4 py-3 text-nowrap text-sm font-medium text-gray-900 dark:text-gray-100">
|
|
<a href="{{ route('admin.anagrafiche.show', $anagrafica) }}" class="text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-200">
|
|
{{ $anagrafica->ragione_sociale ?: ($anagrafica->cognome . ' ' . $anagrafica->nome) }}
|
|
</a>
|
|
</td>
|
|
<td class="px-4 py-3 text-nowrap text-sm text-muted dark:text-gray-300">{{ $anagrafica->codice_fiscale ?: $anagrafica->partita_iva ?: '-' }}</td>
|
|
<td class="px-4 py-3 text-nowrap text-sm text-muted dark:text-gray-300">{{ $anagrafica->email ?: '-' }}</td>
|
|
<td class="px-4 py-3 text-nowrap text-sm text-muted dark:text-gray-300">{{ ucfirst($anagrafica->tipo) }}</td>
|
|
<td class="px-4 py-3 text-nowrap text-sm font-medium">
|
|
<a href="{{ route('admin.anagrafiche.edit', $anagrafica) }}" 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.anagrafiche.destroy', $anagrafica) }}" method="POST" class="inline-block" onsubmit="return confirm('Sei sicuro di voler eliminare questa anagrafica?');">
|
|
@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 anagrafica trovata.</td>
|
|
</tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="mt-4">
|
|
{{ $anagrafiche->appends(request()->query())->links() }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@endsection |