++ fix permessi e mobile portrait
This commit is contained in:
@@ -101,3 +101,68 @@
|
||||
0%, 100% { opacity: 1; }
|
||||
50% { opacity: 0.7; }
|
||||
}
|
||||
|
||||
/* ─── Responsive list tables ───────────────────────────────────────────────
|
||||
Under 640px (a phone held in portrait; rotate to landscape and the width
|
||||
grows past the breakpoint, restoring the normal table) every table with the
|
||||
`table-cards` class reflows: the header is hidden and each row becomes a
|
||||
card, with each cell shown as "LABEL … value" (the label comes from the
|
||||
cell's data-label attribute). Cells with no data-label (the actions column,
|
||||
marked `.cell-actions`) span the row full width. */
|
||||
@media (max-width: 640px) {
|
||||
table.table-cards,
|
||||
table.table-cards tbody {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
table.table-cards thead {
|
||||
display: none;
|
||||
}
|
||||
table.table-cards tr {
|
||||
display: block;
|
||||
border: 1px solid #e5e7eb;
|
||||
border-radius: 10px;
|
||||
margin-bottom: 12px;
|
||||
padding: 4px 2px;
|
||||
background: #fff;
|
||||
}
|
||||
/* zebra striping would fight the card borders */
|
||||
table.table-cards.table-striped tbody tr:nth-child(even) {
|
||||
background: #fff;
|
||||
}
|
||||
table.table-cards td {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
width: 100%;
|
||||
text-align: right;
|
||||
padding: 6px 12px;
|
||||
border: none !important;
|
||||
}
|
||||
table.table-cards td[data-label]::before {
|
||||
content: attr(data-label);
|
||||
flex: 0 0 auto;
|
||||
margin-right: auto;
|
||||
text-align: left;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
color: #6b7280;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: .3px;
|
||||
}
|
||||
/* Actions row: full width, buttons wrapped to the right */
|
||||
table.table-cards td.cell-actions {
|
||||
justify-content: flex-end;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 2px;
|
||||
padding-top: 10px;
|
||||
border-top: 1px solid #f3f4f6 !important;
|
||||
}
|
||||
/* Cells spanning all columns (empty state, inline edit form) stay full
|
||||
width and block, so their inner layout isn't squeezed by the flex row. */
|
||||
table.table-cards td[colspan] {
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
{{-- Table --}}
|
||||
<div class="bg-white rounded-xl shadow-sm border border-gray-200 overflow-hidden">
|
||||
<div class="overflow-x-auto">
|
||||
<table class="min-w-full divide-y divide-gray-200 text-sm table-striped">
|
||||
<table class="min-w-full divide-y divide-gray-200 text-sm table-striped table-cards">
|
||||
<thead style="background:linear-gradient(180deg,#f9fafb,#f3f4f6)">
|
||||
<tr>
|
||||
<th class="px-3 py-3 text-left text-xs font-semibold text-gray-600 uppercase">Data/Ora</th>
|
||||
@@ -39,9 +39,9 @@
|
||||
<tbody class="divide-y divide-gray-100">
|
||||
@forelse($activities as $activity)
|
||||
<tr class="hover:bg-indigo-50/30 transition-colors">
|
||||
<td class="px-3 py-2 text-xs text-gray-500 whitespace-nowrap">{{ $activity->created_at->format('d/m/Y H:i:s') }}</td>
|
||||
<td class="px-3 py-2 text-xs">{{ $activity->causer?->name ?? data_get($activity->properties, 'causer_name') ?? 'Sistema' }}</td>
|
||||
<td class="px-3 py-2">
|
||||
<td data-label="Data/Ora" class="px-3 py-2 text-xs text-gray-500 whitespace-nowrap">{{ $activity->created_at->format('d/m/Y H:i:s') }}</td>
|
||||
<td data-label="Utente" class="px-3 py-2 text-xs">{{ $activity->causer?->name ?? data_get($activity->properties, 'causer_name') ?? 'Sistema' }}</td>
|
||||
<td data-label="Evento" class="px-3 py-2">
|
||||
<span class="inline-flex px-2 py-0.5 text-xs font-medium rounded-full
|
||||
{{ match($activity->description) {
|
||||
'created' => 'bg-green-100 text-green-800',
|
||||
@@ -56,14 +56,14 @@
|
||||
{{ $activity->description }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="px-3 py-2 text-xs text-gray-600">
|
||||
<td data-label="Soggetto" class="px-3 py-2 text-xs text-gray-600">
|
||||
@if($activity->subject_type)
|
||||
{{ class_basename($activity->subject_type) }} #{{ $activity->subject_id }}
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
<td class="px-3 py-2 text-xs text-gray-500">
|
||||
<td data-label="Dettagli" class="px-3 py-2 text-xs text-gray-500">
|
||||
@if($activity->properties->isNotEmpty())
|
||||
<details>
|
||||
<summary class="cursor-pointer text-indigo-600 hover:text-indigo-800">Mostra</summary>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<div>
|
||||
<div class="mb-6 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4">
|
||||
<h1 class="text-2xl font-bold text-gray-900">Campagne</h1>
|
||||
@can('campagne.manage')
|
||||
@can('settings.manage')
|
||||
<a href="{{ route('campagne.create') }}" class="inline-flex items-center gap-1.5 px-4 py-2 text-sm font-medium text-white rounded-lg transition" style="background:#4f46e5" onmouseover="this.style.background='#4338ca'" onmouseout="this.style.background='#4f46e5'">
|
||||
<svg class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"/></svg>
|
||||
Nuova Campagna
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
<div class="bg-white rounded-xl shadow-sm border border-gray-200 overflow-hidden">
|
||||
<div class="overflow-x-auto">
|
||||
<table class="min-w-full divide-y divide-gray-200 table-striped">
|
||||
<table class="min-w-full divide-y divide-gray-200 table-striped table-cards">
|
||||
<thead style="background:linear-gradient(180deg,#f9fafb,#f3f4f6)">
|
||||
<tr>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold text-gray-600 uppercase">Descrizione</th>
|
||||
@@ -25,10 +25,10 @@
|
||||
<tbody class="divide-y divide-gray-100">
|
||||
@forelse($campagne as $campagna)
|
||||
<tr class="hover:bg-indigo-50/30 transition-colors">
|
||||
<td class="px-4 py-3 text-sm font-medium text-gray-900">{{ $campagna->descrizione }}</td>
|
||||
<td class="px-4 py-3 text-sm text-gray-600">{{ $campagna->start_date->format('d/m/Y') }}</td>
|
||||
<td class="px-4 py-3 text-sm text-gray-600">{{ $campagna->end_date->format('d/m/Y') }}</td>
|
||||
<td class="px-4 py-3 text-sm">
|
||||
<td data-label="Descrizione" class="px-4 py-3 text-sm font-medium text-gray-900">{{ $campagna->descrizione }}</td>
|
||||
<td data-label="Inizio" class="px-4 py-3 text-sm text-gray-600">{{ $campagna->start_date->format('d/m/Y') }}</td>
|
||||
<td data-label="Fine" class="px-4 py-3 text-sm text-gray-600">{{ $campagna->end_date->format('d/m/Y') }}</td>
|
||||
<td data-label="Stato" class="px-4 py-3 text-sm">
|
||||
@if($campagna->is_attiva)
|
||||
<span class="inline-flex px-2 py-0.5 text-xs font-medium rounded-full bg-green-100 text-green-800">Attiva</span>
|
||||
@elseif($campagna->end_date->isPast())
|
||||
@@ -37,7 +37,7 @@
|
||||
<span class="inline-flex px-2 py-0.5 text-xs font-medium rounded-full bg-blue-100 text-blue-800">Futura</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="px-4 py-3 text-sm">
|
||||
<td data-label="% Percorrenza" class="px-4 py-3 text-sm">
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="w-20 bg-gray-200 rounded-full h-2">
|
||||
<div class="bg-indigo-500 h-2 rounded-full" style="width:{{ min($campagna->percentuale_percorrenza, 100) }}%"></div>
|
||||
@@ -45,7 +45,7 @@
|
||||
<span class="text-xs text-gray-600">{{ $campagna->percentuale_percorrenza }}%</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-4 py-3 text-sm text-right">
|
||||
<td class="px-4 py-3 text-sm text-right cell-actions">
|
||||
<div class="flex flex-wrap items-center justify-end gap-1">
|
||||
<a href="{{ route('campagne.show', $campagna) }}" class="btn-action btn-action-indigo" title="Dettaglio">
|
||||
<svg class="h-3.5 w-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"/></svg>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<div class="bg-white rounded-xl shadow-sm border border-gray-200 overflow-hidden">
|
||||
<div class="overflow-x-auto">
|
||||
<table class="min-w-full divide-y divide-gray-200 table-striped">
|
||||
<table class="min-w-full divide-y divide-gray-200 table-striped table-cards">
|
||||
<thead style="background:linear-gradient(180deg,#f9fafb,#f3f4f6)">
|
||||
<tr>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold text-gray-600 uppercase">Nome Completo</th>
|
||||
@@ -20,13 +20,15 @@
|
||||
<tbody class="divide-y divide-gray-200">
|
||||
@forelse($proclamatori as $proclamatore)
|
||||
<tr class="hover:bg-indigo-50/30 transition-colors">
|
||||
<td class="px-4 py-3 text-sm font-semibold text-gray-900">{{ $proclamatore->nome_completo }}</td>
|
||||
<td class="px-4 py-3 text-sm text-gray-600">{{ $proclamatore->deleted_at->format('d/m/Y H:i') }}</td>
|
||||
<td class="px-4 py-3 text-sm text-right">
|
||||
<td data-label="Nome completo" class="px-4 py-3 text-sm font-semibold text-gray-900">{{ $proclamatore->nome_completo }}</td>
|
||||
<td data-label="Eliminato il" class="px-4 py-3 text-sm text-gray-600">{{ $proclamatore->deleted_at->format('d/m/Y H:i') }}</td>
|
||||
<td class="px-4 py-3 text-sm text-right cell-actions">
|
||||
@can('settings.manage')
|
||||
<div class="flex flex-wrap items-center justify-end gap-1">
|
||||
<button wire:click="restore({{ $proclamatore->id }})" class="btn-action btn-action-green">Ripristina</button>
|
||||
<button wire:click="forceDelete({{ $proclamatore->id }})" wire:confirm="Eliminare DEFINITIVAMENTE questo proclamatore? Questa azione è irreversibile." class="btn-action btn-action-red">Elimina</button>
|
||||
</div>
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<div>
|
||||
<div class="mb-6 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4">
|
||||
<h1 class="text-2xl font-bold text-gray-900">Proclamatori</h1>
|
||||
@can('proclamatori.manage')
|
||||
@can('settings.manage')
|
||||
<a href="{{ route('proclamatori.create') }}" class="inline-flex items-center gap-1.5 px-4 py-2 text-sm font-medium text-white rounded-lg transition" style="background:#4f46e5" onmouseover="this.style.background='#4338ca'" onmouseout="this.style.background='#4f46e5'">
|
||||
<svg class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"/></svg>
|
||||
Nuovo Proclamatore
|
||||
@@ -19,7 +19,7 @@
|
||||
<option value="inattivo">Inattivi</option>
|
||||
</select>
|
||||
<div class="text-xs text-gray-500 flex items-center">
|
||||
@can('proclamatori.manage')
|
||||
@can('settings.manage')
|
||||
<a href="{{ route('proclamatori.cestino') }}" class="text-red-500 hover:text-red-700">🗑 Cestino</a>
|
||||
@endcan
|
||||
</div>
|
||||
@@ -29,7 +29,7 @@
|
||||
{{-- Table --}}
|
||||
<div class="bg-white rounded-xl shadow-sm border border-gray-200 overflow-hidden">
|
||||
<div class="overflow-x-auto">
|
||||
<table class="min-w-full divide-y divide-gray-200 table-striped">
|
||||
<table class="min-w-full divide-y divide-gray-200 table-striped table-cards">
|
||||
<thead style="background:linear-gradient(180deg,#f9fafb,#f3f4f6)">
|
||||
<tr>
|
||||
<th wire:click="sortBy('cognome')" class="px-4 py-3 text-left text-xs font-semibold text-gray-600 uppercase cursor-pointer hover:text-gray-800 transition-colors">
|
||||
@@ -46,22 +46,22 @@
|
||||
<tbody class="divide-y divide-gray-100">
|
||||
@forelse($proclamatori as $proclamatore)
|
||||
<tr class="hover:bg-indigo-50/30 transition-colors">
|
||||
<td class="px-4 py-3 text-sm font-medium text-gray-900">{{ $proclamatore->cognome }}</td>
|
||||
<td class="px-4 py-3 text-sm text-gray-700">{{ $proclamatore->nome }}</td>
|
||||
<td class="px-4 py-3 text-sm">
|
||||
<td data-label="Cognome" class="px-4 py-3 text-sm font-medium text-gray-900">{{ $proclamatore->cognome }}</td>
|
||||
<td data-label="Nome" class="px-4 py-3 text-sm text-gray-700">{{ $proclamatore->nome }}</td>
|
||||
<td data-label="Stato" class="px-4 py-3 text-sm">
|
||||
@if($proclamatore->attivo)
|
||||
<span class="inline-flex px-2 py-0.5 text-xs font-medium rounded-full bg-green-100 text-green-800">Attivo</span>
|
||||
@else
|
||||
<span class="inline-flex px-2 py-0.5 text-xs font-medium rounded-full bg-gray-100 text-gray-600">Inattivo</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="px-4 py-3 text-sm text-gray-600">{{ $proclamatore->assegnazioni_aperte_count ?? $proclamatore->assegnazioni()->aperte()->count() }}</td>
|
||||
<td class="px-4 py-3 text-sm text-right">
|
||||
<td data-label="Territori assegnati" class="px-4 py-3 text-sm text-gray-600">{{ $proclamatore->assegnazioni_aperte_count ?? $proclamatore->assegnazioni()->aperte()->count() }}</td>
|
||||
<td class="px-4 py-3 text-sm text-right cell-actions">
|
||||
<div class="flex flex-wrap items-center justify-end gap-1">
|
||||
<a href="{{ route('proclamatori.show', $proclamatore) }}" class="btn-action btn-action-indigo" title="Dettaglio">
|
||||
<svg class="h-3.5 w-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"/></svg>
|
||||
</a>
|
||||
@can('proclamatori.manage')
|
||||
@can('settings.manage')
|
||||
<a href="{{ route('proclamatori.edit', $proclamatore) }}" class="btn-action btn-action-gray" title="Modifica">
|
||||
<svg class="h-3.5 w-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"/></svg>
|
||||
</a>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</a>
|
||||
<h1 class="text-2xl font-bold text-gray-900">{{ $proclamatore->nome_completo }}</h1>
|
||||
</div>
|
||||
@can('proclamatori.manage')
|
||||
@can('settings.manage')
|
||||
<a href="{{ route('proclamatori.edit', $proclamatore) }}" class="btn-action btn-action-indigo" style="padding:8px 16px;font-size:14px;border-radius:8px">
|
||||
<svg class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"/></svg>
|
||||
Modifica
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
{{-- Table --}}
|
||||
<div class="bg-white rounded-xl shadow-sm border border-gray-200 overflow-hidden">
|
||||
<div class="overflow-x-auto">
|
||||
<table class="min-w-full divide-y divide-gray-200 text-sm table-striped">
|
||||
<table class="min-w-full divide-y divide-gray-200 text-sm table-striped table-cards">
|
||||
<thead style="background:linear-gradient(180deg,#f9fafb,#f3f4f6)">
|
||||
<tr>
|
||||
<th wire:click="sortBy('territorio_numero')" class="px-3 py-3 text-left text-xs font-semibold text-gray-600 uppercase cursor-pointer">
|
||||
@@ -67,7 +67,7 @@
|
||||
@forelse($assegnazioni as $a)
|
||||
<tr class="hover:bg-indigo-50/30 transition-colors">
|
||||
@php($temporaryPdfUrl = !$a->returned_at ? $a->shortPdfUrl() : null)
|
||||
<td class="px-3 py-2">
|
||||
<td data-label="Territorio" class="px-3 py-2">
|
||||
<div class="flex items-center gap-2">
|
||||
@if($a->territorio?->thumbnail_path)
|
||||
<img src="{{ asset('storage/' . $a->territorio->thumbnail_path) }}"
|
||||
@@ -80,18 +80,18 @@
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-3 py-2">{{ $a->proclamatore?->nome_completo ?? 'N/A' }}</td>
|
||||
<td class="px-3 py-2">{{ $a->assigned_at->format('d/m/Y') }}</td>
|
||||
<td class="px-3 py-2">
|
||||
<td data-label="Proclamatore" class="px-3 py-2">{{ $a->proclamatore?->nome_completo ?? 'N/A' }}</td>
|
||||
<td data-label="Assegnato" class="px-3 py-2">{{ $a->assigned_at->format('d/m/Y') }}</td>
|
||||
<td data-label="Rientrato" class="px-3 py-2">
|
||||
@if($a->returned_at)
|
||||
{{ $a->returned_at->format('d/m/Y') }}
|
||||
@else
|
||||
<span class="text-amber-600 font-medium text-xs">In corso</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="px-3 py-2">{{ $a->giorni }}</td>
|
||||
<td class="px-3 py-2 text-xs text-gray-500">{{ $a->annoTeocratico?->label }}</td>
|
||||
<td class="px-3 py-2 text-xs">
|
||||
<td data-label="Giorni" class="px-3 py-2">{{ $a->giorni }}</td>
|
||||
<td data-label="Anno" class="px-3 py-2 text-xs text-gray-500">{{ $a->annoTeocratico?->label }}</td>
|
||||
<td data-label="Campagna" class="px-3 py-2 text-xs">
|
||||
@if($a->counted_in_campaign)
|
||||
<span class="text-green-600">{{ $a->campagna?->descrizione }}</span>
|
||||
@else
|
||||
@@ -99,8 +99,8 @@
|
||||
@endif
|
||||
</td>
|
||||
@can('settings.manage')
|
||||
<td class="px-3 py-2 whitespace-nowrap">
|
||||
<div class="flex items-center gap-1">
|
||||
<td class="px-3 py-2 whitespace-nowrap cell-actions">
|
||||
<div class="flex items-center gap-1 flex-wrap">
|
||||
@if($temporaryPdfUrl)
|
||||
<a href="{{ $temporaryPdfUrl }}"
|
||||
target="_blank"
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
<h2 class="text-lg font-semibold text-gray-900 mb-4">Utenti esistenti</h2>
|
||||
|
||||
<div class="overflow-x-auto">
|
||||
<table class="min-w-full divide-y divide-gray-200 text-sm">
|
||||
<table class="min-w-full divide-y divide-gray-200 text-sm table-cards">
|
||||
<thead class="bg-gray-50">
|
||||
<tr>
|
||||
<th class="px-4 py-2 text-left font-medium text-gray-600">Nome</th>
|
||||
@@ -111,9 +111,9 @@
|
||||
</div>
|
||||
</td>
|
||||
@else
|
||||
<td class="px-4 py-2 text-gray-900">{{ $user->name }}</td>
|
||||
<td class="px-4 py-2 text-gray-700">{{ $user->email }}</td>
|
||||
<td class="px-4 py-2">
|
||||
<td data-label="Nome" class="px-4 py-2 text-gray-900">{{ $user->name }}</td>
|
||||
<td data-label="Email" class="px-4 py-2 text-gray-700">{{ $user->email }}</td>
|
||||
<td data-label="Ruoli" class="px-4 py-2">
|
||||
<div class="flex flex-wrap gap-1">
|
||||
@forelse($user->roles as $role)
|
||||
<span class="inline-flex items-center rounded-full bg-indigo-50 px-2 py-0.5 text-xs font-medium text-indigo-700">{{ $role->name }}</span>
|
||||
@@ -122,7 +122,7 @@
|
||||
@endforelse
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<td class="px-4 py-2 cell-actions">
|
||||
<div class="flex gap-2">
|
||||
<button wire:click="startEdit({{ $user->id }})" type="button" class="px-2 py-1 text-xs font-medium text-indigo-700 bg-indigo-50 rounded hover:bg-indigo-100">Modifica</button>
|
||||
<button
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<div class="bg-white rounded-xl shadow-sm border border-gray-200 overflow-hidden">
|
||||
<div class="overflow-x-auto">
|
||||
<table class="min-w-full divide-y divide-gray-200 table-striped">
|
||||
<table class="min-w-full divide-y divide-gray-200 table-striped table-cards">
|
||||
<thead style="background:linear-gradient(180deg,#f9fafb,#f3f4f6)">
|
||||
<tr>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold text-gray-600 uppercase">N°</th>
|
||||
@@ -20,9 +20,9 @@
|
||||
<tbody class="divide-y divide-gray-200">
|
||||
@forelse($territori as $territorio)
|
||||
<tr class="hover:bg-indigo-50/30 transition-colors">
|
||||
<td class="px-4 py-3 text-sm font-semibold text-gray-900">{{ $territorio->numero }}</td>
|
||||
<td class="px-4 py-3 text-sm text-gray-600">{{ $territorio->deleted_at->format('d/m/Y H:i') }}</td>
|
||||
<td class="px-4 py-3 text-sm text-right">
|
||||
<td data-label="N°" class="px-4 py-3 text-sm font-semibold text-gray-900">{{ $territorio->numero }}</td>
|
||||
<td data-label="Eliminato il" class="px-4 py-3 text-sm text-gray-600">{{ $territorio->deleted_at->format('d/m/Y H:i') }}</td>
|
||||
<td class="px-4 py-3 text-sm text-right cell-actions">
|
||||
<div class="flex flex-wrap items-center justify-end gap-1">
|
||||
<button wire:click="restore({{ $territorio->id }})" class="btn-action btn-action-green">Ripristina</button>
|
||||
<button wire:click="forceDelete({{ $territorio->id }})" wire:confirm="Eliminare DEFINITIVAMENTE il territorio {{ $territorio->numero }}? Questa azione è irreversibile." class="btn-action btn-action-red">Elimina</button>
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
{{-- Table --}}
|
||||
<div class="bg-white rounded-xl shadow-sm border border-gray-200 overflow-hidden">
|
||||
<div class="overflow-x-auto">
|
||||
<table class="min-w-full divide-y divide-gray-200 table-striped">
|
||||
<table class="min-w-full divide-y divide-gray-200 table-striped table-cards">
|
||||
<thead style="background:linear-gradient(180deg,#f9fafb,#f3f4f6)">
|
||||
<tr>
|
||||
<th wire:click="sortBy('numero')" class="px-4 py-3 text-left text-xs font-semibold text-gray-600 uppercase cursor-pointer hover:text-gray-800 transition-colors">
|
||||
@@ -105,7 +105,7 @@
|
||||
<tbody class="divide-y divide-gray-100">
|
||||
@forelse($territori as $territorio)
|
||||
<tr class="hover:bg-indigo-50/30 transition-colors">
|
||||
<td class="px-4 py-3 text-sm font-semibold text-gray-900">
|
||||
<td data-label="N°" class="px-4 py-3 text-sm font-semibold text-gray-900">
|
||||
<div class="flex items-center gap-2">
|
||||
@if($territorio->thumbnail_path)
|
||||
<img src="{{ asset('storage/' . $territorio->thumbnail_path) }}"
|
||||
@@ -115,9 +115,9 @@
|
||||
<a href="{{ route('territori.show', $territorio) }}" class="hover:text-indigo-600 transition-colors">{{ $territorio->numero }}</a>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-4 py-3 text-sm text-gray-600">{{ $territorio->zona?->nome ?? '-' }}</td>
|
||||
<td class="px-4 py-3 text-sm text-gray-600">{{ $territorio->tipologia?->nome ?? '-' }}</td>
|
||||
<td class="px-4 py-3 text-sm">
|
||||
<td data-label="Zona" class="px-4 py-3 text-sm text-gray-600">{{ $territorio->zona?->nome ?? '-' }}</td>
|
||||
<td data-label="Tipologia" class="px-4 py-3 text-sm text-gray-600">{{ $territorio->tipologia?->nome ?? '-' }}</td>
|
||||
<td data-label="Stato" class="px-4 py-3 text-sm">
|
||||
@php $stato = $territorio->stato; @endphp
|
||||
<span class="inline-flex items-center gap-1 px-2.5 py-0.5 rounded-full text-xs font-medium
|
||||
{{ match($stato) {
|
||||
@@ -135,10 +135,10 @@
|
||||
</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="px-4 py-3 text-sm text-gray-600">
|
||||
<td data-label="Assegnatario" class="px-4 py-3 text-sm text-gray-600">
|
||||
{{ $territorio->assegnatario?->nome_completo ?? '-' }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-sm">
|
||||
<td class="px-4 py-3 text-sm cell-actions">
|
||||
<div class="flex items-center justify-end gap-1 flex-wrap">
|
||||
{{-- Primary actions: Assegna / Rientra --}}
|
||||
@can('territori.assign')
|
||||
|
||||
Reference in New Issue
Block a user