modifiche siderbar e correzioni
@@ -21,7 +21,7 @@ Laravel 13 / PHP 8.4 project for parish management (Glastree). Full codebase exi
|
||||
|
||||
### ⚠️ IN COMPLETAMENTO
|
||||
- Sistema Email: funziona al 95%, SMTP potrebbe necessitare credenziali corrette
|
||||
- Nuova implementazione: avatar gruppi, event types, email sync logging
|
||||
- Nuova implementazione: email sync logging
|
||||
|
||||
---
|
||||
|
||||
@@ -516,4 +516,36 @@ php artisan route:list --name=email
|
||||
- `resources/views/gruppi/show.blade.php`: avatar nella header card
|
||||
- `resources/views/gruppi/create.blade.php` e `edit.blade.php`: upload avatar
|
||||
|
||||
(Last updated: 25 Maggio 2026 - Fix gruppi hierarchy, group avatar support)
|
||||
### 26 Maggio 2026 - Event Types System (Tipologie Eventi)
|
||||
- **Nuova tabella**: `tipologie_eventi` con migration + seed dati default (catechesi, liturgia, animazione, formazione, incontro, riunione, festa, altro)
|
||||
- **Nuovo modello**: `App\Models\TipologiaEvento` — identico pattern a `TipologiaDocumento` e `Ruolo`:
|
||||
- `$fillable`: nome, descrizione, ordine, attiva
|
||||
- Metodi: `eventi()` (hasMany), `attive()`, `opzioni()`
|
||||
- FK via `nome` (string) → `eventi.tipo_evento` (stesso pattern Documento.tipologia → TipologiaDocumento.nome)
|
||||
- **Admin CRUD**: 4 nuovi metodi in `ImpostazioniController`: `tipologieEventiStore()`, `tipologieEventiUpdate()`, `tipologieEventiDestroy()`, `tipologieEventiReorder()`
|
||||
- **Routes** (5 nuove): `/impostazioni/tipologie-eventi/*`
|
||||
- **Impostazioni view**: Nuovo tab `#tipologie-eventi` con tabella sortabile, modali add/edit, stessi pattern esistenti
|
||||
- **Sidebar**: Nuovo link "Tipologie Eventi" sotto Impostazioni (solo superadmin)
|
||||
- **Evento model**: Aggiunta relazione `tipologiaEvento()` (BelongsTo via 'nome')
|
||||
- **EventoController**: Validazione cambiata da `nullable|string|max:100` a `nullable|exists:tipologie_eventi,nome` in store() e update(); create/edit passano `$tipologieEventi` alla view
|
||||
- **Views eventi**:
|
||||
- `create.blade.php`: Dropdown "Tipo Evento" dopo Descrizione Breve
|
||||
- `edit.blade.php`: Text libero → dropdown; fallback per vecchi valori non presenti
|
||||
- `show.blade.php`: Badge "Tipologia" nella sezione Data e Orario; colonna rinominata "Ricorrenza"
|
||||
- `index.blade.php`: Nuova colonna sortabile "Tipologia" con badge; colonna "Tipo" → "Ricorrenza"; colspan 8→9
|
||||
- **Files creati**:
|
||||
- `database/migrations/2026_05_26_000001_create_tipologie_eventi_table.php`
|
||||
- `app/Models/TipologiaEvento.php`
|
||||
- **Files modificati**:
|
||||
- `app/Http/Controllers/ImpostazioniController.php`
|
||||
- `app/Http/Controllers/EventoController.php`
|
||||
- `app/Models/Evento.php`
|
||||
- `routes/web.php`
|
||||
- `resources/views/impostazioni/index.blade.php`
|
||||
- `resources/views/layouts/adminlte.blade.php`
|
||||
- `resources/views/eventi/create.blade.php`
|
||||
- `resources/views/eventi/edit.blade.php`
|
||||
- `resources/views/eventi/show.blade.php`
|
||||
- `resources/views/eventi/index.blade.php`
|
||||
|
||||
(Last updated: 26 Maggio 2026 - Event Types system)
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace App\Http\Controllers;
|
||||
use App\Models\Evento;
|
||||
use App\Models\Gruppo;
|
||||
use App\Models\Individuo;
|
||||
use App\Models\TipologiaEvento;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class EventoController extends Controller
|
||||
@@ -28,7 +29,7 @@ class EventoController extends Controller
|
||||
|
||||
$sortBy = $request->get('sort', 'created_at');
|
||||
$sortDir = $request->get('direction', 'desc');
|
||||
$allowedSorts = ['nome_evento', 'descrizione_evento', 'tipo_recorrenza', 'data_specifica', 'created_at'];
|
||||
$allowedSorts = ['nome_evento', 'descrizione_evento', 'tipo_evento', 'tipo_recorrenza', 'data_specifica', 'created_at'];
|
||||
|
||||
if ($sortBy === 'gruppi') {
|
||||
$query->withCount('gruppi')->orderBy('gruppi_count', $sortDir === 'asc' ? 'asc' : 'desc');
|
||||
@@ -52,8 +53,9 @@ class EventoController extends Controller
|
||||
$gruppi = Gruppo::orderBy('nome')->get();
|
||||
$individui = Individuo::orderBy('cognome')->orderBy('nome')->get();
|
||||
$selectedGruppo = $request->query('gruppo_id') ? Gruppo::find($request->query('gruppo_id')) : null;
|
||||
$tipologieEventi = TipologiaEvento::attive();
|
||||
|
||||
return view('eventi.create', compact('gruppi', 'individui', 'selectedGruppo'));
|
||||
return view('eventi.create', compact('gruppi', 'individui', 'selectedGruppo', 'tipologieEventi'));
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
@@ -62,7 +64,7 @@ class EventoController extends Controller
|
||||
$data = $request->validate([
|
||||
'nome_evento' => 'required|string|max:255',
|
||||
'descrizione_evento' => 'nullable|string|max:255',
|
||||
'tipo_evento' => 'nullable|string|max:100',
|
||||
'tipo_evento' => 'nullable|exists:tipologie_eventi,nome',
|
||||
'tipo_recorrenza' => 'nullable|in:singolo,settimanale,mensile,annuale,altro',
|
||||
'giorno_settimana' => 'nullable|integer|min:0|max:6',
|
||||
'giorno_mese' => 'nullable|integer|min:1|max:31',
|
||||
@@ -128,8 +130,9 @@ class EventoController extends Controller
|
||||
$evento = Evento::with(['gruppi', 'responsabili', 'documenti'])->findOrFail($evento);
|
||||
$gruppi = Gruppo::orderBy('nome')->get();
|
||||
$individui = Individuo::orderBy('cognome')->orderBy('nome')->get();
|
||||
$tipologieEventi = TipologiaEvento::attive();
|
||||
|
||||
return view('eventi.edit', compact('evento', 'gruppi', 'individui'));
|
||||
return view('eventi.edit', compact('evento', 'gruppi', 'individui', 'tipologieEventi'));
|
||||
}
|
||||
|
||||
public function update(Request $request, $evento)
|
||||
@@ -140,7 +143,7 @@ class EventoController extends Controller
|
||||
$data = $request->validate([
|
||||
'nome_evento' => 'required|string|max:255',
|
||||
'descrizione_evento' => 'nullable|string|max:255',
|
||||
'tipo_evento' => 'nullable|string|max:100',
|
||||
'tipo_evento' => 'nullable|exists:tipologie_eventi,nome',
|
||||
'tipo_recorrenza' => 'nullable|in:singolo,settimanale,mensile,annuale,altro',
|
||||
'giorno_settimana' => 'nullable|integer|min:0|max:6',
|
||||
'giorno_mese' => 'nullable|integer|min:1|max:31',
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace App\Http\Controllers;
|
||||
use App\Models\AppSetting;
|
||||
use App\Models\Ruolo;
|
||||
use App\Models\TipologiaDocumento;
|
||||
use App\Models\TipologiaEvento;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
@@ -15,10 +16,11 @@ class ImpostazioniController extends Controller
|
||||
$this->authorizeWrite('viste');
|
||||
|
||||
$tipologie = TipologiaDocumento::orderBy('ordine')->get();
|
||||
$tipologieEventi = TipologiaEvento::orderBy('ordine')->get();
|
||||
$ruoli = Ruolo::orderBy('ordine')->get();
|
||||
$appSettings = AppSetting::first();
|
||||
|
||||
return view('impostazioni.index', compact('tipologie', 'ruoli', 'appSettings'));
|
||||
return view('impostazioni.index', compact('tipologie', 'tipologieEventi', 'ruoli', 'appSettings'));
|
||||
}
|
||||
|
||||
public function saveAppSettings(Request $request)
|
||||
@@ -185,6 +187,72 @@ class ImpostazioniController extends Controller
|
||||
return response()->json(['success' => true]);
|
||||
}
|
||||
|
||||
public function tipologieEventiStore(Request $request)
|
||||
{
|
||||
$this->authorizeWrite('viste');
|
||||
|
||||
$validated = $request->validate([
|
||||
'nome' => 'required|string|max:50|unique:tipologie_eventi,nome',
|
||||
'descrizione' => 'nullable|string|max:255',
|
||||
]);
|
||||
|
||||
$maxOrdine = TipologiaEvento::max('ordine') ?? 0;
|
||||
|
||||
TipologiaEvento::create([
|
||||
'nome' => $validated['nome'],
|
||||
'descrizione' => $validated['descrizione'] ?? null,
|
||||
'ordine' => $maxOrdine + 1,
|
||||
'attiva' => true,
|
||||
]);
|
||||
|
||||
return redirect('/impostazioni#tipologie-eventi')->with('success', 'Tipologia evento aggiunta.');
|
||||
}
|
||||
|
||||
public function tipologieEventiUpdate(Request $request, $id)
|
||||
{
|
||||
$this->authorizeWrite('viste');
|
||||
|
||||
$tipologia = TipologiaEvento::findOrFail($id);
|
||||
|
||||
$validated = $request->validate([
|
||||
'nome' => 'required|string|max:50|unique:tipologie_eventi,nome,' . $id,
|
||||
'descrizione' => 'nullable|string|max:255',
|
||||
'attiva' => 'boolean',
|
||||
]);
|
||||
|
||||
$tipologia->update($validated);
|
||||
|
||||
return redirect('/impostazioni#tipologie-eventi')->with('success', 'Tipologia evento aggiornata.');
|
||||
}
|
||||
|
||||
public function tipologieEventiDestroy($id)
|
||||
{
|
||||
$this->authorizeDelete('viste');
|
||||
$tipologia = TipologiaEvento::findOrFail($id);
|
||||
|
||||
$count = $tipologia->eventi()->count();
|
||||
if ($count > 0) {
|
||||
return redirect('/impostazioni#tipologie-eventi')->with('error', 'Impossibile eliminare: ' . $count . ' eventi associati.');
|
||||
}
|
||||
|
||||
$tipologia->delete();
|
||||
|
||||
return redirect('/impostazioni#tipologie-eventi')->with('success', 'Tipologia evento eliminata.');
|
||||
}
|
||||
|
||||
public function tipologieEventiReorder(Request $request)
|
||||
{
|
||||
$this->authorizeWrite('viste');
|
||||
|
||||
$order = $request->input('order', []);
|
||||
|
||||
foreach ($order as $index => $id) {
|
||||
TipologiaEvento::where('id', $id)->update(['ordine' => $index]);
|
||||
}
|
||||
|
||||
return response()->json(['success' => true]);
|
||||
}
|
||||
|
||||
public function uploadLogo(Request $request)
|
||||
{
|
||||
$this->authorizeWrite('viste');
|
||||
|
||||
@@ -38,6 +38,11 @@ class Evento extends Model
|
||||
'is_incontro_gruppo' => 'boolean',
|
||||
];
|
||||
|
||||
public function tipologiaEvento(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(TipologiaEvento::class, 'tipo_evento', 'nome');
|
||||
}
|
||||
|
||||
public function tenant(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Tenant::class);
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class TipologiaEvento extends Model
|
||||
{
|
||||
protected $table = 'tipologie_eventi';
|
||||
|
||||
protected $fillable = ['nome', 'descrizione', 'ordine', 'attiva'];
|
||||
|
||||
protected $casts = [
|
||||
'attiva' => 'boolean',
|
||||
'ordine' => 'integer',
|
||||
];
|
||||
|
||||
public function eventi(): HasMany
|
||||
{
|
||||
return $this->hasMany(Evento::class, 'tipo_evento', 'nome');
|
||||
}
|
||||
|
||||
public static function attive(): \Illuminate\Database\Eloquent\Collection
|
||||
{
|
||||
return static::where('attiva', true)->orderBy('ordine')->get();
|
||||
}
|
||||
|
||||
public static function opzioni(): array
|
||||
{
|
||||
return static::attive()->pluck('nome')->toArray();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('tipologie_eventi', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('nome', 50)->unique();
|
||||
$table->string('descrizione', 255)->nullable();
|
||||
$table->integer('ordine')->default(0);
|
||||
$table->boolean('attiva')->default(true);
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
DB::table('tipologie_eventi')->insert([
|
||||
['nome' => 'catechesi', 'descrizione' => 'Catechesi', 'ordine' => 0, 'attiva' => true],
|
||||
['nome' => 'liturgia', 'descrizione' => 'Liturgia', 'ordine' => 1, 'attiva' => true],
|
||||
['nome' => 'animazione', 'descrizione' => 'Animazione', 'ordine' => 2, 'attiva' => true],
|
||||
['nome' => 'formazione', 'descrizione' => 'Formazione', 'ordine' => 3, 'attiva' => true],
|
||||
['nome' => 'incontro', 'descrizione' => 'Incontro', 'ordine' => 4, 'attiva' => true],
|
||||
['nome' => 'riunione', 'descrizione' => 'Riunione', 'ordine' => 5, 'attiva' => true],
|
||||
['nome' => 'festa', 'descrizione' => 'Festa / Sagra', 'ordine' => 6, 'attiva' => true],
|
||||
['nome' => 'altro', 'descrizione' => 'Altro', 'ordine' => 7, 'attiva' => true],
|
||||
]);
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('tipologie_eventi');
|
||||
}
|
||||
};
|
||||
@@ -23,6 +23,17 @@
|
||||
<label>Descrizione Breve</label>
|
||||
<input type="text" name="descrizione_evento" class="form-control" value="{{ old('descrizione_evento') }}" placeholder="Breve descrizione">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Tipo Evento</label>
|
||||
<select name="tipo_evento" class="form-control">
|
||||
<option value="">Seleziona tipo...</option>
|
||||
@foreach($tipologieEventi as $tipo)
|
||||
<option value="{{ $tipo->nome }}" {{ old('tipo_evento') === $tipo->nome ? 'selected' : '' }}>
|
||||
{{ $tipo->descrizione ?: $tipo->nome }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Descrizione Completa</label>
|
||||
<textarea name="descrizione" class="form-control" rows="3">{{ old('descrizione') }}</textarea>
|
||||
|
||||
@@ -22,7 +22,19 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Tipo Evento</label>
|
||||
<input type="text" name="tipo_evento" class="form-control" value="{{ old('tipo_evento', $evento->tipo_evento) }}" placeholder="es. Catechesi, Liturgia, Animazione">
|
||||
<select name="tipo_evento" class="form-control">
|
||||
<option value="">Seleziona tipo...</option>
|
||||
@foreach($tipologieEventi as $tipo)
|
||||
<option value="{{ $tipo->nome }}" {{ old('tipo_evento', $evento->tipo_evento) === $tipo->nome ? 'selected' : '' }}>
|
||||
{{ $tipo->descrizione ?: $tipo->nome }}
|
||||
</option>
|
||||
@endforeach
|
||||
@if($evento->tipo_evento && !\App\Models\TipologiaEvento::where('nome', $evento->tipo_evento)->exists())
|
||||
<option value="{{ $evento->tipo_evento }}" selected>
|
||||
{{ $evento->tipo_evento }} (disattivato)
|
||||
</option>
|
||||
@endif
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Descrizione Completa</label>
|
||||
|
||||
@@ -98,9 +98,19 @@ $canDeleteEventi = Auth::user()->canDelete('eventi');
|
||||
@endif
|
||||
</a>
|
||||
</th>
|
||||
<th>
|
||||
<a href="{{ request()->fullUrlWithQuery(['sort' => 'tipo_evento', 'direction' => request('sort') === 'tipo_evento' && request('direction') === 'asc' ? 'desc' : 'asc']) }}" class="text-dark">
|
||||
Tipologia
|
||||
@if(request('sort') === 'tipo_evento')
|
||||
<i class="fas fa-sort-{{ request('direction') === 'asc' ? 'up' : 'down' }} ml-1"></i>
|
||||
@else
|
||||
<i class="fas fa-sort ml-1 text-muted"></i>
|
||||
@endif
|
||||
</a>
|
||||
</th>
|
||||
<th>
|
||||
<a href="{{ request()->fullUrlWithQuery(['sort' => 'tipo_recorrenza', 'direction' => request('sort') === 'tipo_recorrenza' && request('direction') === 'asc' ? 'desc' : 'asc']) }}" class="text-dark">
|
||||
Tipo
|
||||
Ricorrenza
|
||||
@if(request('sort') === 'tipo_recorrenza')
|
||||
<i class="fas fa-sort-{{ request('direction') === 'asc' ? 'up' : 'down' }} ml-1"></i>
|
||||
@else
|
||||
@@ -162,6 +172,20 @@ $canDeleteEventi = Auth::user()->canDelete('eventi');
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ Str::limit($evento->descrizione_evento, 50) ?: '-' }}</td>
|
||||
<td>
|
||||
@if($evento->tipo_evento)
|
||||
@php
|
||||
$tipologiaEvento = \App\Models\TipologiaEvento::where('nome', $evento->tipo_evento)->first();
|
||||
@endphp
|
||||
@if($tipologiaEvento)
|
||||
<span class="badge badge-primary">{{ $tipologiaEvento->descrizione ?: $tipologiaEvento->nome }}</span>
|
||||
@else
|
||||
<span class="badge badge-secondary">{{ $evento->tipo_evento }}</span>
|
||||
@endif
|
||||
@else
|
||||
<span class="text-muted">-</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if($evento->tipo_recorrenza && $evento->tipo_recorrenza !== 'singolo')
|
||||
<span class="badge badge-info">{{ $evento->periodicita_label }}</span>
|
||||
@@ -211,7 +235,7 @@ $canDeleteEventi = Auth::user()->canDelete('eventi');
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="8" class="text-center text-muted py-4">
|
||||
<td colspan="9" class="text-center text-muted py-4">
|
||||
<i class="fas fa-calendar fa-2x mb-2"></i>
|
||||
<p class="mb-0">Nessun evento trovato</p>
|
||||
</td>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<div class="card-body">
|
||||
<table class="table table-sm table-borderless mb-0">
|
||||
<tr>
|
||||
<td style="width: 150px;"><strong>Tipo:</strong></td>
|
||||
<td style="width: 150px;"><strong>Ricorrenza:</strong></td>
|
||||
<td>
|
||||
@if($evento->tipo_recorrenza && $evento->tipo_recorrenza !== 'singolo')
|
||||
<span class="badge badge-info">{{ $evento->periodicita_label }}</span>
|
||||
@@ -52,6 +52,21 @@
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@if($evento->tipo_evento)
|
||||
<tr>
|
||||
<td><strong>Tipologia:</strong></td>
|
||||
<td>
|
||||
@php
|
||||
$tipologia = \App\Models\TipologiaEvento::where('nome', $evento->tipo_evento)->first();
|
||||
@endphp
|
||||
@if($tipologia)
|
||||
<span class="badge badge-primary">{{ $tipologia->descrizione ?: $tipologia->nome }}</span>
|
||||
@else
|
||||
<span class="badge badge-secondary">{{ $evento->tipo_evento }}</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@if($evento->tipo_recorrenza === 'settimanale')
|
||||
<tr>
|
||||
<td><strong>Giorno:</strong></td>
|
||||
|
||||
@@ -29,6 +29,9 @@
|
||||
<a href="#ruoli" class="list-group-item list-group-item-action" data-toggle="tab">
|
||||
<i class="nav-icon fas fa-users-cog mr-2"></i> Tipi di Ruolo
|
||||
</a>
|
||||
<a href="#tipologie-eventi" class="list-group-item list-group-item-action" data-toggle="tab">
|
||||
<i class="nav-icon fas fa-calendar mr-2"></i> Tipologie Eventi
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -315,6 +318,80 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="tipologie-eventi">
|
||||
<div class="card card-primary">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Tipologie Eventi</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p class="text-muted">Gestisci le tipologie disponibili per gli eventi del calendario.</p>
|
||||
|
||||
@if(session('success'))
|
||||
<div class="alert alert-success">{{ session('success') }}</div>
|
||||
@endif
|
||||
@if(session('error'))
|
||||
<div class="alert alert-danger">{{ session('error') }}</div>
|
||||
@endif
|
||||
|
||||
<div class="mb-3">
|
||||
<button type="button" class="btn btn-success btn-sm" data-toggle="modal" data-target="#addTipologiaEventoModal">
|
||||
<i class="fas fa-plus"></i> Nuova Tipologia
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<table class="table table-bordered table-striped" id="tipologie-eventi-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 40px;">Ordine</th>
|
||||
<th>Nome</th>
|
||||
<th>Descrizione</th>
|
||||
<th style="width: 100px;">Stato</th>
|
||||
<th style="width: 150px;">Azioni</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tipologie-eventi-sortable">
|
||||
@foreach($tipologieEventi as $tipologia)
|
||||
<tr data-id="{{ $tipologia->id }}">
|
||||
<td class="text-center">
|
||||
<i class="fas fa-arrows-alt handle" style="cursor: grab;"></i>
|
||||
</td>
|
||||
<td>
|
||||
<span class="tipologia-evento-nome">{{ $tipologia->nome }}</span>
|
||||
</td>
|
||||
<td>{{ $tipologia->descrizione ?? '-' }}</td>
|
||||
<td>
|
||||
@if($tipologia->attiva)
|
||||
<span class="badge badge-success">Attiva</span>
|
||||
@else
|
||||
<span class="badge badge-secondary">Disattivata</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-xs btn-warning" onclick="editTipologiaEvento({{ $tipologia->id }}, '{{ addslashes($tipologia->nome) }}', '{{ addslashes($tipologia->descrizione ?? '') }}', {{ $tipologia->attiva ? 'true' : 'false' }})">
|
||||
<i class="fas fa-edit"></i>
|
||||
</button>
|
||||
@if($tipologia->eventi()->count() == 0)
|
||||
<form method="POST" action="{{ route('impostazioni.tipologie-eventi.destroy', $tipologia->id) }}" style="display: inline;">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button type="submit" class="btn btn-xs btn-danger" onclick="return confirm('Eliminare questa tipologia?')">
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
</form>
|
||||
@else
|
||||
<button type="button" class="btn btn-xs btn-danger" disabled title="Eventi associati: {{ $tipologia->eventi()->count() }}">
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -446,11 +523,93 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="addTipologiaEventoModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<form method="POST" action="{{ route('impostazioni.tipologie-eventi.store') }}">
|
||||
@csrf
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Nuova Tipologia Evento</h4>
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label for="tipologia_evento_nome">Nome *</label>
|
||||
<input type="text" name="nome" id="tipologia_evento_nome" class="form-control" required maxlength="50" placeholder="es. catechesi">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="tipologia_evento_descrizione">Descrizione</label>
|
||||
<input type="text" name="descrizione" id="tipologia_evento_descrizione" class="form-control" maxlength="255" placeholder="es. Catechesi">
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Annulla</button>
|
||||
<button type="submit" class="btn btn-primary">Salva</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="editTipologiaEventoModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<form method="POST" action="" id="editTipologiaEventoForm">
|
||||
@csrf
|
||||
@method('PUT')
|
||||
<input type="hidden" name="id" id="edit_tipologia_evento_id">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Modifica Tipologia Evento</h4>
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label for="edit_tipologia_evento_nome">Nome *</label>
|
||||
<input type="text" name="nome" id="edit_tipologia_evento_nome" class="form-control" required maxlength="50">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="edit_tipologia_evento_descrizione">Descrizione</label>
|
||||
<input type="text" name="descrizione" id="edit_tipologia_evento_descrizione" class="form-control" maxlength="255">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-switch">
|
||||
<input type="checkbox" class="custom-control-input" id="edit_tipologia_evento_attiva" name="attiva" value="1">
|
||||
<label class="custom-control-label" for="edit_tipologia_evento_attiva">Attiva</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Annulla</button>
|
||||
<button type="submit" class="btn btn-primary">Salva</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script src="https://cdn.jsdelivr.net/npm/sortablejs@1.15.0/Sortable.min.js"></script>
|
||||
<script>
|
||||
function activateTabFromHash() {
|
||||
var hash = window.location.hash;
|
||||
if (hash) {
|
||||
var tabLink = document.querySelector('.list-group a[href="' + hash + '"]');
|
||||
if (tabLink) {
|
||||
$(tabLink).tab('show');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
activateTabFromHash();
|
||||
});
|
||||
|
||||
$(window).on('hashchange', function() {
|
||||
activateTabFromHash();
|
||||
});
|
||||
|
||||
function editTipologia(id, nome, descrizione, attiva) {
|
||||
$('#edit_tipologia_id').val(id);
|
||||
$('#edit_tipologia_nome').val(nome);
|
||||
@@ -469,6 +628,15 @@ function editRuolo(id, nome, descrizione, attiva) {
|
||||
$('#editRuoloModal').modal('show');
|
||||
}
|
||||
|
||||
function editTipologiaEvento(id, nome, descrizione, attiva) {
|
||||
$('#edit_tipologia_evento_id').val(id);
|
||||
$('#edit_tipologia_evento_nome').val(nome);
|
||||
$('#edit_tipologia_evento_descrizione').val(descrizione);
|
||||
$('#edit_tipologia_evento_attiva').prop('checked', attiva);
|
||||
$('#editTipologiaEventoForm').attr('action', '/impostazioni/tipologie-eventi/' + id);
|
||||
$('#editTipologiaEventoModal').modal('show');
|
||||
}
|
||||
|
||||
var sortableTipologie = Sortable.create(document.getElementById('tipologie-sortable'), {
|
||||
handle: '.handle',
|
||||
animation: 150,
|
||||
@@ -509,11 +677,34 @@ var sortableRuoli = Sortable.create(document.getElementById('ruoli-sortable'), {
|
||||
}
|
||||
});
|
||||
|
||||
var sortableTipologieEventi = Sortable.create(document.getElementById('tipologie-eventi-sortable'), {
|
||||
handle: '.handle',
|
||||
animation: 150,
|
||||
onEnd: function(evt) {
|
||||
var order = [];
|
||||
$('#tipologie-eventi-sortable tr').each(function() {
|
||||
order.push($(this).data('id'));
|
||||
});
|
||||
|
||||
fetch('{{ route('impostazioni.tipologie-eventi.reorder') }}', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': '{{ csrf_token() }}',
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({ order: order })
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
|
||||
var target = $(e.target).attr('href');
|
||||
if (target === '#ruoli') {
|
||||
sortableRuoli.refresh();
|
||||
}
|
||||
if (target === '#tipologie-eventi') {
|
||||
sortableTipologieEventi.refresh();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -204,23 +204,11 @@ $appName = \App\Models\AppSetting::getAppName() ?? 'Glastree';
|
||||
@endif
|
||||
@if(Auth::user()->isSuperAdmin())
|
||||
<li class="nav-item has-treeview">
|
||||
<a href="#" class="nav-link">
|
||||
<a href="/impostazioni" class="nav-link">
|
||||
<i class="nav-icon fas fa-cog"></i>
|
||||
<p>Impostazioni <i class="right fas fa-angle-left"></i></p>
|
||||
</a>
|
||||
<ul class="nav nav-treeview">
|
||||
<li class="nav-item">
|
||||
<a href="/impostazioni#tipologie" class="nav-link">
|
||||
<i class="nav-icon fas fa-file"></i>
|
||||
<p>Tipologie Documenti</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="/impostazioni#ruoli" class="nav-link">
|
||||
<i class="nav-icon fas fa-users-cog"></i>
|
||||
<p>Tipi di Ruolo</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="/impostazioni/email" class="nav-link">
|
||||
<i class="nav-icon fas fa-envelope"></i>
|
||||
|
||||
@@ -144,6 +144,10 @@ Route::post('/impostazioni/ruoli', [ImpostazioniController::class, 'ruoliStore']
|
||||
Route::put('/impostazioni/ruoli/{id}', [ImpostazioniController::class, 'ruoliUpdate'])->middleware('auth')->name('impostazioni.ruoli.update');
|
||||
Route::delete('/impostazioni/ruoli/{id}', [ImpostazioniController::class, 'ruoliDestroy'])->middleware('auth')->name('impostazioni.ruoli.destroy');
|
||||
Route::post('/impostazioni/ruoli/reorder', [ImpostazioniController::class, 'ruoliReorder'])->middleware('auth')->name('impostazioni.ruoli.reorder');
|
||||
Route::post('/impostazioni/tipologie-eventi', [ImpostazioniController::class, 'tipologieEventiStore'])->middleware('auth')->name('impostazioni.tipologie-eventi.store');
|
||||
Route::put('/impostazioni/tipologie-eventi/{id}', [ImpostazioniController::class, 'tipologieEventiUpdate'])->middleware('auth')->name('impostazioni.tipologie-eventi.update');
|
||||
Route::delete('/impostazioni/tipologie-eventi/{id}', [ImpostazioniController::class, 'tipologieEventiDestroy'])->middleware('auth')->name('impostazioni.tipologie-eventi.destroy');
|
||||
Route::post('/impostazioni/tipologie-eventi/reorder', [ImpostazioniController::class, 'tipologieEventiReorder'])->middleware('auth')->name('impostazioni.tipologie-eventi.reorder');
|
||||
Route::post('/impostazioni/logo', [ImpostazioniController::class, 'uploadLogo'])->middleware('auth')->name('impostazioni.logo.upload');
|
||||
Route::post('/impostazioni/logo/remove', [ImpostazioniController::class, 'removeLogo'])->middleware('auth')->name('impostazioni.logo.remove');
|
||||
Route::post('/impostazioni/app-settings', [ImpostazioniController::class, 'saveAppSettings'])->middleware('auth')->name('impostazioni.app-settings.save');
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;
|
||||
|
||||
$__newAttributes = [];
|
||||
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames((['frame', 'direction' => 'ltr']));
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (in_array($__key, $__propNames)) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
} else {
|
||||
$__newAttributes[$__key] = $__value;
|
||||
}
|
||||
}
|
||||
|
||||
$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);
|
||||
|
||||
unset($__propNames);
|
||||
unset($__newAttributes);
|
||||
|
||||
foreach (array_filter((['frame', 'direction' => 'ltr']), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
}
|
||||
|
||||
$__defined_vars = get_defined_vars();
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (array_key_exists($__key, $__defined_vars)) unset($$__key);
|
||||
}
|
||||
|
||||
unset($__defined_vars, $__key, $__value); ?>
|
||||
|
||||
<?php
|
||||
$file = $frame->file();
|
||||
$line = $frame->line();
|
||||
?>
|
||||
|
||||
<div
|
||||
<?php echo e($attributes->merge(['class' => 'truncate font-mono text-xs text-neutral-500 dark:text-neutral-400'])); ?>
|
||||
|
||||
dir="<?php echo e($direction); ?>"
|
||||
>
|
||||
<span data-tippy-content="<?php echo e($file); ?>:<?php echo e($line); ?>">
|
||||
<?php if(config('app.editor')): ?>
|
||||
<a href="<?php echo e($frame->editorHref()); ?>" @click.stop>
|
||||
<span class="hover:underline decoration-neutral-400"><?php echo e($file); ?></span><span class="text-neutral-500">:<?php echo e($line); ?></span>
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<?php echo e($file); ?><span class="text-neutral-500">:<?php echo e($line); ?></span>
|
||||
<?php endif; ?>
|
||||
</span>
|
||||
</div>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/resources/exceptions/renderer/components/file-with-line.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,12 @@
|
||||
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" <?php echo e($attributes); ?>>
|
||||
<g clip-path="url(#clip0_14732_6211)">
|
||||
<path d="M1.75 5.25V2.75C1.75 1.922 2.422 1.25 3.25 1.25H4.202C4.808 1.25 5.381 1.525 5.761 1.998L6.364 2.75H8.25C9.355 2.75 10.25 3.645 10.25 4.75V5.25" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M2.46801 5.25H9.53101C10.44 5.25 11.14 6.052 11.017 6.953L10.735 9.021C10.6 10.012 9.75301 10.751 8.75301 10.751H3.24601C2.24601 10.751 1.39901 10.012 1.26401 9.021L0.982011 6.953C0.859011 6.052 1.55901 5.25 2.46801 5.25Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_14732_6211">
|
||||
<rect width="12" height="12" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/resources/exceptions/renderer/components/icons/folder-open.blade.php ENDPATH**/ ?>
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,15 @@
|
||||
<svg fill="currentColor" viewBox="0 0 1268 308" xmlns="http://www.w3.org/2000/svg">
|
||||
<defs>
|
||||
<path id="a" d="m0 0v-0.49449h1.7215v-4.3497l-1.6849-0.00916v-0.40291c1.3278 0 1.6849-0.22893 1.8131-1.1538h0.43954v5.9155h1.7399v0.49449h-4.0292z"/>
|
||||
<path id="b" d="m0 0c-1.3186 0-2.1062-1.227-2.1062-3.2965 0-2.0696 0.78752-3.2966 2.1062-3.2966s2.1062 1.227 2.1062 3.2966c0 2.0695-0.78752 3.2965-2.1062 3.2965zm0-3.8918c0.3205 0 0.56774 0.2473 0.56774 0.5678 0 0.3113-0.24724 0.5677-0.56774 0.5677-0.31134 0-0.56775-0.2564-0.56775-0.5677 0-0.3205 0.25641-0.5678 0.56775-0.5678zm0 3.3973c0.99813 0 1.5567-1.0164 1.5567-2.802 0-1.7857-0.55859-2.8021-1.5567-2.8021s-1.5567 1.0164-1.5567 2.8021c0 1.7856 0.55859 2.802 1.5567 2.802z"/>
|
||||
</defs>
|
||||
</svg>
|
||||
<script>
|
||||
(()=>{
|
||||
const d="10A212.9A|AB2AB2AB2A212.2AB2AB2AB|6AB3A212.4AB4A|2ABAB3ABA212.AB4AB2A|10A212.3AB4AB|AB2ABAB3A212.AB3AB3A|8ABA212.7ABA|ABAB2AB3A212.2ABAB4A|10A212.6AB2A|2AB2ABAB2A32.9A61.9A73.9A19.AB2AB4A|9AB28.5AB2AB2AB4A3.10A6.25A10.5AB2AB2AB4A4.9A4.9A20.11A9.5AB2AB2AB5A15.7ABA|ABABAB4A25.4ABAB9AB4A.2AB3AB2AB6.2AB2AB2ABAB2AB2ABAB2AB3A7.4ABAB9AB5A.2AB2AB2AB4.2AB2AB2ABA18.2AB2AB2AB2A7.4AB11AB2AB3A12.ABABAB3A|7AB2A23.3AB7ABABABAB3AB8AB3A6.4AB10AB7ABA5.3AB7ABABAB4AB2AB5AB4A5.5AB4A17.7AB2A6.3AB4ABABABABAB10A10.8AB|2AB2AB3AB21.3AB3AB2AB14ABABAB4ABA6.AB4AB2ABABAB4ABAB4A3.3AB3AB2AB8AB7ABAB3AB2A6.AB5ABA16.2ABABAB3A6.2AB3AB13AB2ABAB4A8.2AB3AB2A|10A20.2AB10AB7.ABAB7AB4A6.3AB12AB5AB2A2.2AB10AB7.2ABAB10AB6.3AB6A14.11A4.10AB11.7AB3A7.4AB4A|ABAB2ABABA19.6ABABAB14.3AB2AB3AB2A6.AB3ABAB2A16.6ABABAB14.3AB2ABAB4A7.4ABAB3A13.ABAB2AB2AB4.2ABABABABA15.AB2AB2AB2A6.AB5ABA|10A19.AB2AB5A16.12A6.9AB15.2AB2AB5A16.9AB2A8.AB5AB2A11.10A4.10A17.10A5.3AB2AB2A|2ABABAB3A18.4AB3ABA18.AB2ABAB2ABA6.2ABAB2AB2A15.4AB3ABA18.ABAB2AB3AB8.4AB5A10.2AB2ABABABA4.ABAB2AB3A18.AB2ABAB2A5.AB7A|8ABA17.2AB4AB3A19.10A6.10A15.AB4AB2A20.10A9.AB3AB2ABA9.10A4.9AB27AB5.4AB2ABA|AB2AB5A17.4AB5A20.AB2ABABABA6.AB2ABAB2AB14.4AB5A20.2AB2ABAB2A10.10A7.2ABAB2AB2A5.AB2ABAB4AB2AB2AB2ABAB2ABABABABAB5A4.2AB6A|6ABABA17.AB4AB2AB20.10A6.10A14.2AB4AB2A21.8AB11.ABABAB2AB6.11A5.8AB7AB18AB3A4.4ABAB2A|ABAB6A17.3AB6A20.2ABAB2AB2A6.ABAB2ABABA14.5AB4A20.2ABAB2AB2A11.10A4.2ABAB2ABABA6.2AB2AB4ABABAB3AB2ABAB2AB2AB2AB4ABA4.AB6AB|5AB2ABA18.4AB2AB2A19.10A6.10A15.AB4AB2A20.10A12.2AB2AB2ABA3.10A7.7AB2A33.3AB2AB2A|2AB7A18.AB8A18.2AB2ABABABA6.2AB2AB2ABA15.3AB4ABA18.2AB2ABAB2AB12.11A.2AB2ABAB2A9.ABAB6A32.AB7A|4ABAB3A19.2ABABAB4A15.2AB9A6.10A15.5AB6A15.2AB9A13.ABABAB2AB5AB5AB9.5ABAB3A17.4A10.4AB2ABA|AB6ABA19.8AB4A11.2AB3AB2AB3AB6.ABABABAB2A16.AB4AB2AB3A10.3AB4AB2ABABA14.9ABAB4AB2A11.2AB5AB2A14.3AB5A7.2AB6A|3AB2AB20A3.2AB2AB3AB7A.16AB2A6.10A17.2AB7AB5A2.10AB8A14.3ABAB8AB3A13.4AB8A8.4AB3AB5A5.5ABABA|AB7AB2ABAB2AB2ABAB2ABA5.8ABAB2AB3AB2ABAB2AB2ABAB4A6.2AB2AB2ABA19.2ABAB5AB2AB3AB2ABAB5ABAB2ABA15.6ABAB2AB5A15.4AB2ABAB10AB8ABA7.ABAB5A|4AB2AB11AB7A6.2ABAB9AB11AB5ABA6.10A20.5ABAB15ABAB8A16.AB11ABA17.AB8AB2AB2AB4ABABAB2A9.6AB2A|2AB6ABAB2ABAB5ABAB2A9.8AB2ABABABABA2.5ABAB2A6.ABAB2ABABA22.8AB2ABABABAB3A2.4ABAB2A16.3ABAB2AB2AB2A20.2ABAB8AB2AB7A11.2AB5AB|5ABAB10AB8A12.7AB6A4.AB5AB2A6.10A26.AB12A5.2AB6A17.9AB3A24.2AB2ABAB6ABA15.4ABAB2A",
|
||||
s=document.currentScript.previousElementSibling,
|
||||
ns="http://www.w3.org/2000/svg";
|
||||
const ox=0.32415,oy=7.3223,cw=5.4907,rh=10.0,zx=1.923,zy=0.0915;
|
||||
d.split("|").forEach((r,ri)=>{const g=document.createElementNS(ns,"g");g.setAttribute("transform","translate(0,"+(oy+ri*rh)+")");let col=0;for(let i=0;i<r.length;i++){let c=r[i],n=1;if(c>="0"&&c<="9"){n=c;while(i+1<r.length&&r[i+1]>="0"&&r[i+1]<="9")n+=r[++i];n=+n;c=r[++i];}if(c==="."){col+=n;continue;}for(let j=0;j<n;j++){const u=document.createElementNS(ns,"use");u.setAttribute("href",c==="A"?"#a":"#b");u.setAttribute("x",ox+col*cw+(c==="B"?zx:0));if(c==="B")u.setAttribute("y",zy);g.appendChild(u);col++;}}s.appendChild(g);});
|
||||
})();
|
||||
</script><?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/resources/exceptions/renderer/components/icons/laravel-ascii.blade.php ENDPATH**/ ?>
|
||||
|
After Width: | Height: | Size: 3.9 KiB |
@@ -0,0 +1,37 @@
|
||||
<?php if($paginator->hasPages()): ?>
|
||||
<div class="ui pagination menu" role="navigation">
|
||||
|
||||
<?php if($paginator->onFirstPage()): ?>
|
||||
<a class="icon item disabled" aria-disabled="true" aria-label="<?php echo app('translator')->get('pagination.previous'); ?>"> <i class="left chevron icon"></i> </a>
|
||||
<?php else: ?>
|
||||
<a class="icon item" href="<?php echo e($paginator->previousPageUrl()); ?>" rel="prev" aria-label="<?php echo app('translator')->get('pagination.previous'); ?>"> <i class="left chevron icon"></i> </a>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php $__currentLoopData = $elements; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $element): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
|
||||
<?php if(is_string($element)): ?>
|
||||
<a class="icon item disabled" aria-disabled="true"><?php echo e($element); ?></a>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php if(is_array($element)): ?>
|
||||
<?php $__currentLoopData = $element; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $page => $url): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<?php if($page == $paginator->currentPage()): ?>
|
||||
<a class="item active" href="<?php echo e($url); ?>" aria-current="page"><?php echo e($page); ?></a>
|
||||
<?php else: ?>
|
||||
<a class="item" href="<?php echo e($url); ?>"><?php echo e($page); ?></a>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
|
||||
|
||||
<?php if($paginator->hasMorePages()): ?>
|
||||
<a class="icon item" href="<?php echo e($paginator->nextPageUrl()); ?>" rel="next" aria-label="<?php echo app('translator')->get('pagination.next'); ?>"> <i class="right chevron icon"></i> </a>
|
||||
<?php else: ?>
|
||||
<a class="icon item disabled" aria-disabled="true" aria-label="<?php echo app('translator')->get('pagination.next'); ?>"> <i class="right chevron icon"></i> </a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Pagination/resources/views/semantic-ui.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,720 @@
|
||||
<?php $__env->startSection('title', 'Modifica Individuo'); ?>
|
||||
<?php $__env->startSection('page_title', 'Modifica Individuo'); ?>
|
||||
|
||||
<?php $__env->startSection('content'); ?>
|
||||
<form action="/individui/<?php echo e($individuo->id); ?>" method="POST" id="main-form">
|
||||
<?php echo csrf_field(); ?>
|
||||
<?php echo method_field('PUT'); ?>
|
||||
<input type="hidden" name="individuo_id" value="<?php echo e($individuo->id); ?>">
|
||||
<input type="hidden" name="_avatar_token" value="<?php echo e(csrf_token()); ?>">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="card card-primary">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><i class="fas fa-user mr-2"></i>Dati Anagrafici</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label>Codice ID</label>
|
||||
<input type="text" class="form-control" value="<?php echo e($individuo->codice_id); ?>" disabled>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Cognome *</label>
|
||||
<input type="text" name="cognome" class="form-control" value="<?php echo e($individuo->cognome); ?>" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Nome *</label>
|
||||
<input type="text" name="nome" class="form-control" value="<?php echo e($individuo->nome); ?>" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Data di nascita</label>
|
||||
<input type="date" name="data_nascita" class="form-control" value="<?php echo e($individuo->data_nascita?->format('Y-m-d')); ?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Genere</label>
|
||||
<select name="genere" class="form-control">
|
||||
<option value="">Seleziona...</option>
|
||||
<option value="M" <?php echo e($individuo->genere === 'M' ? 'selected' : ''); ?>>Maschio</option>
|
||||
<option value="F" <?php echo e($individuo->genere === 'F' ? 'selected' : ''); ?>>Femmina</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="card card-secondary">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><i class="fas fa-camera mr-2"></i>Avatar</h3>
|
||||
</div>
|
||||
<div class="card-body text-center">
|
||||
<?php if($individuo->avatar): ?>
|
||||
<img src="/individui/<?php echo e($individuo->id); ?>/avatar"
|
||||
alt="Avatar"
|
||||
class="img-thumbnail mb-2"
|
||||
style="max-width: 120px; max-height: 120px; object-fit: cover; border-radius: 50%;">
|
||||
<br>
|
||||
<button type="button" class="btn btn-danger btn-sm" onclick="deleteAvatar()">
|
||||
<i class="fas fa-trash mr-1"></i>Rimuovi
|
||||
</button>
|
||||
<?php else: ?>
|
||||
<div class="bg-secondary d-flex align-items-center justify-content-center mb-3"
|
||||
style="width: 120px; height: 120px; margin: 0 auto; border-radius: 50%;">
|
||||
<i class="fas fa-user fa-4x text-white"></i>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="custom-file mb-2">
|
||||
<input type="file" class="custom-file-input" id="avatar-input" name="avatar" accept="image/jpeg,image/png,image/gif">
|
||||
<label class="custom-file-label" for="avatar-input">Scegli immagine...</label>
|
||||
</div>
|
||||
<button type="button" class="btn btn-primary btn-sm" onclick="uploadAvatar()">
|
||||
<i class="fas fa-upload mr-1"></i>Carica Avatar
|
||||
</button>
|
||||
<div id="avatar-message" class="mt-2"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header"><h3 class="card-title"><i class="fas fa-map-marker-alt mr-2"></i>Residenza</h3></div>
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label>Indirizzo</label>
|
||||
<input type="text" name="indirizzo" class="form-control" value="<?php echo e($individuo->indirizzo); ?>">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label>CAP</label>
|
||||
<input type="text" name="cap" class="form-control" value="<?php echo e($individuo->cap); ?>">
|
||||
</div>
|
||||
<div class="form-group col-md-5">
|
||||
<label>Città</label>
|
||||
<input type="text" name="città" class="form-control" value="<?php echo e($individuo->città); ?>">
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label>Provincia</label>
|
||||
<input type="text" name="sigla_provincia" class="form-control" maxlength="2" value="<?php echo e($individuo->sigla_provincia); ?>">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header"><h3 class="card-title"><i class="fas fa-id-card mr-2"></i>Documento di identità</h3></div>
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label>Tipo documento</label>
|
||||
<select name="tipo_documento" class="form-control">
|
||||
<option value="">Seleziona...</option>
|
||||
<option value="carta_identita" <?php echo e($individuo->tipo_documento === 'carta_identita' ? 'selected' : ''); ?>>Carta d'Identità</option>
|
||||
<option value="patente" <?php echo e($individuo->tipo_documento === 'patente' ? 'selected' : ''); ?>>Patente</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Numero documento</label>
|
||||
<input type="text" name="numero_documento" class="form-control" value="<?php echo e($individuo->numero_documento); ?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Scadenza documento</label>
|
||||
<input type="date" name="scadenza_documento" class="form-control" value="<?php echo e($individuo->scadenza_documento?->format('Y-m-d')); ?>">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header"><h3 class="card-title"><i class="fas fa-sticky-note mr-2"></i>Note</h3></div>
|
||||
<div class="card-body">
|
||||
<div class="form-group mb-0">
|
||||
<textarea name="note" class="form-control" rows="4"><?php echo e($individuo->note); ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><i class="fas fa-address-book mr-2"></i>Contatti</h3>
|
||||
<button type="button" class="btn btn-xs btn-success float-right" onclick="aggiungiRigaContatto()">
|
||||
<i class="fas fa-plus mr-1"></i> Aggiungi
|
||||
</button>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
<table class="table table-bordered mb-0" id="contatti-table">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th style="width: 20%;">Tipo</th>
|
||||
<th style="width: 30%;">Valore</th>
|
||||
<th style="width: 20%;">Etichetta</th>
|
||||
<th style="width: 10%;">Primario</th>
|
||||
<th style="width: 50px;"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="contatti-tbody">
|
||||
<?php $__currentLoopData = $individuo->contatti; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $contatto): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<tr>
|
||||
<td>
|
||||
<select name="contatti[<?php echo e($loop->index); ?>][tipo]" class="form-control">
|
||||
<option value="telefono" <?php echo e($contatto->tipo === 'telefono' ? 'selected' : ''); ?>>Telefono</option>
|
||||
<option value="cellulare" <?php echo e($contatto->tipo === 'cellulare' ? 'selected' : ''); ?>>Cellulare</option>
|
||||
<option value="email" <?php echo e($contatto->tipo === 'email' ? 'selected' : ''); ?>>Email</option>
|
||||
<option value="fax" <?php echo e($contatto->tipo === 'fax' ? 'selected' : ''); ?>>Fax</option>
|
||||
<option value="web" <?php echo e($contatto->tipo === 'web' ? 'selected' : ''); ?>>Web</option>
|
||||
<option value="telegram" <?php echo e($contatto->tipo === 'telegram' ? 'selected' : ''); ?>>Telegram</option>
|
||||
<option value="whatsapp" <?php echo e($contatto->tipo === 'whatsapp' ? 'selected' : ''); ?>>WhatsApp</option>
|
||||
<option value="altro" <?php echo e($contatto->tipo === 'altro' ? 'selected' : ''); ?>>Altro</option>
|
||||
</select>
|
||||
</td>
|
||||
<td><input type="text" name="contatti[<?php echo e($loop->index); ?>][valore]" class="form-control" value="<?php echo e($contatto->valore); ?>"></td>
|
||||
<td><input type="text" name="contatti[<?php echo e($loop->index); ?>][etichetta]" class="form-control" value="<?php echo e($contatto->etichetta); ?>"></td>
|
||||
<td class="text-center"><input type="checkbox" name="contatti[<?php echo e($loop->index); ?>][is_primary]" value="1" <?php echo e($contatto->is_primary ? 'checked' : ''); ?>></td>
|
||||
<td><button type="button" class="btn btn-danger btn-xs" onclick="this.closest('tr').remove()"><i class="fas fa-trash"></i></button></td>
|
||||
</tr>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if($individuo->contatti->isEmpty()): ?>
|
||||
<div id="no-contatti-msg" class="text-center text-muted py-4">
|
||||
<p class="mb-0">Nessun contatto. Clicca su "Aggiungi" per aggiungerne uno.</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><i class="fas fa-folder mr-2"></i>Gruppi</h3>
|
||||
<button type="button" class="btn btn-xs btn-success float-right" onclick="showGruppoForm()">
|
||||
<i class="fas fa-plus mr-1"></i> Aggiungi
|
||||
</button>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
|
||||
<?php if($individuo->gruppi->count() > 0): ?>
|
||||
<table class="table table-bordered table-hover table-striped mb-0">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th>Nome</th>
|
||||
<th>Diocesi</th>
|
||||
<th style="width: 130px;">Ruolo</th>
|
||||
<th style="width: 110px;">Data Adesione</th>
|
||||
<th style="width: 80px;">Azioni</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $__currentLoopData = $individuo->gruppi; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $gruppo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<tr id="gruppo-row-<?php echo e($gruppo->id); ?>">
|
||||
<td>
|
||||
<i class="fas fa-folder text-warning mr-1"></i>
|
||||
<a href="/gruppi/<?php echo e($gruppo->id); ?>"><?php echo e($gruppo->nome); ?></a>
|
||||
</td>
|
||||
<td><?php echo e($gruppo->diocesi?->nome ?: '-'); ?></td>
|
||||
<td>
|
||||
<?php $ruoliIndividuo = $individuo->getRuoliForGruppo($gruppo->id) ?>
|
||||
<?php if($ruoliIndividuo->count() > 0): ?>
|
||||
<?php $__currentLoopData = $ruoliIndividuo; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ruolo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<span class="badge badge-info mr-1"><?php echo e($ruolo->nome); ?></span>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
<?php else: ?>
|
||||
-
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?php echo e($gruppo->pivot->data_adesione ? \Carbon\Carbon::parse($gruppo->pivot->data_adesione)->format('d/m/Y') : '-'); ?></td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-xs btn-warning" onclick="editGruppoInline(<?php echo e($gruppo->id); ?>)" title="Modifica">
|
||||
<i class="fas fa-edit"></i>
|
||||
</button>
|
||||
<form action="/individui/<?php echo e($individuo->id); ?>/gruppi/<?php echo e($gruppo->id); ?>" method="POST" class="mb-0">
|
||||
<?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
|
||||
<button type="submit" class="btn btn-xs btn-danger" onclick="return confirm('Rimuovere da questo gruppo?')" title="Rimuovi">
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="gruppo-edit-<?php echo e($gruppo->id); ?>" style="display:none;">
|
||||
<td colspan="5">
|
||||
<form action="/individui/<?php echo e($individuo->id); ?>/gruppi/<?php echo e($gruppo->id); ?>" method="POST" class="mb-0">
|
||||
<?php echo csrf_field(); ?> <?php echo method_field('PUT'); ?>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<input type="text" class="form-control form-control-sm" value="<?php echo e($gruppo->nome); ?>" disabled>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<select name="ruolo_ids[]" class="form-control form-control-sm" multiple size="3">
|
||||
<?php $selectedRuoliIds = $individuo->getRuoloIdsForGruppo($gruppo->id) ?>
|
||||
<?php $__currentLoopData = \App\Models\Ruolo::attive(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ruolo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<option value="<?php echo e($ruolo->id); ?>" <?php echo e(in_array($ruolo->id, $selectedRuoliIds) ? 'selected' : ''); ?>><?php echo e($ruolo->nome); ?></option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<input type="date" name="data_adesione" class="form-control form-control-sm" value="<?php echo e($gruppo->pivot->data_adesione); ?>">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<button type="submit" class="btn btn-xs btn-success"><i class="fas fa-check mr-1"></i>Salva</button>
|
||||
<button type="button" class="btn btn-xs btn-secondary" onclick="cancelEditGruppo(<?php echo e($gruppo->id); ?>)"><i class="fas fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php else: ?>
|
||||
<div class="text-center text-muted py-4">
|
||||
<i class="fas fa-users fa-2x mb-2"></i>
|
||||
<p class="mb-0">Nessun gruppo associato</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><i class="fas fa-file mr-2"></i>Documenti</h3>
|
||||
<button type="button" class="btn btn-xs btn-success float-right" onclick="showDocumentoForm()">
|
||||
<i class="fas fa-plus mr-1"></i> Carica
|
||||
</button>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
<div id="documento-add-form" style="display:none;" class="p-3 bg-light border-bottom">
|
||||
<form action="/documenti" method="POST" enctype="multipart/form-data" class="mb-0">
|
||||
<?php echo csrf_field(); ?>
|
||||
<input type="hidden" name="_redirect" value="<?php echo e(url()->current()); ?>">
|
||||
<input type="hidden" name="visibilita" value="individuo">
|
||||
<input type="hidden" name="visibilita_target_id" value="<?php echo e($individuo->id); ?>">
|
||||
<input type="hidden" name="visibilita_target_type" value="App\Models\Individuo">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<input type="text" name="nome_file" class="form-control form-control-sm" placeholder="Nome documento" required>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<select name="tipologia" class="form-control form-control-sm" required>
|
||||
<option value="">Tipologia...</option>
|
||||
<option value="documento">Documento</option>
|
||||
<option value="avatar">Avatar</option>
|
||||
<option value="galleria">Galleria</option>
|
||||
<option value="statuto">Statuto</option>
|
||||
<option value="altro">Altro</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<input type="file" name="file" class="form-control form-control-sm" required>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<button type="submit" class="btn btn-xs btn-success"><i class="fas fa-upload mr-1"></i>Carica</button>
|
||||
<button type="button" class="btn btn-xs btn-secondary" onclick="hideDocumentoForm()"><i class="fas fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php if($individuo->documenti->count() > 0): ?>
|
||||
<table class="table table-bordered table-hover table-striped mb-0">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th>Nome</th>
|
||||
<th style="width: 120px;">Tipologia</th>
|
||||
<th style="width: 80px;">Dimensione</th>
|
||||
<th style="width: 130px;">Data Upload</th>
|
||||
<th style="width: 80px;">Azioni</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $__currentLoopData = $individuo->documenti; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $documento): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="#" onclick="event.preventDefault(); previewDocumento(<?php echo e($documento->id); ?>, '<?php echo e($documento->mime_type); ?>');">
|
||||
<i class="fas fa-file text-secondary mr-1"></i>
|
||||
<?php echo e($documento->nome_file); ?>
|
||||
|
||||
</a>
|
||||
</td>
|
||||
<td><?php echo e(ucfirst(str_replace('_', ' ', $documento->tipologia))); ?></td>
|
||||
<td><?php echo e(number_format($documento->dimensione / 1024, 1)); ?> KB</td>
|
||||
<td><?php echo e($documento->created_at->format('d/m/Y')); ?></td>
|
||||
<td>
|
||||
<?php if($documento->file_path): ?>
|
||||
<button type="button" class="btn btn-xs btn-primary" onclick="previewDocumento(<?php echo e($documento->id); ?>, '<?php echo e($documento->mime_type); ?>')" title="Anteprima">
|
||||
<i class="fas fa-eye"></i>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
<form action="/documenti/<?php echo e($documento->id); ?>" method="POST" class="d-inline">
|
||||
<?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
|
||||
<button type="submit" class="btn btn-xs btn-danger" onclick="return confirm('Eliminare questo documento?')" title="Elimina">
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php else: ?>
|
||||
<div class="text-center text-muted py-4">
|
||||
<i class="fas fa-file fa-2x mb-2"></i>
|
||||
<p class="mb-0">Nessun documento</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-3 mb-4">
|
||||
<button type="button" class="btn btn-success btn-lg" id="save-all-btn" onclick="submitMainForm()">
|
||||
<i class="fas fa-save mr-2"></i> Salva Tutte le Modifiche
|
||||
</button>
|
||||
<a href="/individui/<?php echo e($individuo->id); ?>" class="btn btn-secondary btn-lg ml-2">
|
||||
<i class="fas fa-times mr-1"></i> Annulla
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="card mt-3" id="gruppo-add-card" style="display:none; background-color: #fff3cd; border-color: #ffc107;">
|
||||
<div class="card-header bg-warning">
|
||||
<h3 class="card-title"><i class="fas fa-folder-plus mr-2"></i>Aggiungi a Gruppo</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<select id="new-gruppo-id" class="form-control form-control-sm">
|
||||
<option value="">Seleziona gruppo...</option>
|
||||
<?php $__currentLoopData = \App\Models\Gruppo::orderBy('nome')->get(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $g): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<?php if(!$individuo->gruppi->contains($g->id)): ?>
|
||||
<option value="<?php echo e($g->id); ?>"><?php echo e($g->full_path); ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<select id="new-gruppo-ruolo" class="form-control form-control-sm" multiple size="3">
|
||||
<?php $__currentLoopData = \App\Models\Ruolo::attive(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ruolo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<option value="<?php echo e($ruolo->id); ?>"><?php echo e($ruolo->nome); ?></option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
<small class="text-muted">Ctrl+click per selezionare più ruoli</small>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<input type="date" id="new-gruppo-data" class="form-control form-control-sm">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<button type="button" class="btn btn-success btn-sm" onclick="submitGruppoForm()">
|
||||
<i class="fas fa-check mr-1"></i> Associa
|
||||
</button>
|
||||
<button type="button" class="btn btn-secondary btn-sm" onclick="hideGruppoForm()">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="previewModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog modal-lg" role="document" style="max-width: 90vw;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><i class="fas fa-file mr-2"></i><span id="previewModalTitle">Anteprima</span></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Chiudi">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body text-center p-0" style="min-height: 400px;">
|
||||
<iframe id="previewFrame" src="" style="width: 100%; height: 70vh; border: none;"></iframe>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a id="previewDownloadBtn" href="#" class="btn btn-primary" download>
|
||||
<i class="fas fa-download mr-1"></i> Scarica
|
||||
</a>
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Chiudi</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php $__env->startSection('scripts'); ?>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
console.log('All form fields:');
|
||||
var form = document.getElementById('main-form');
|
||||
var fields = form.querySelectorAll('input, textarea, select');
|
||||
fields.forEach(function(f) {
|
||||
console.log(f.name + ' [' + f.type + ']: value="' + f.value.substring(0,30) + '" disabled=' + f.disabled);
|
||||
});
|
||||
|
||||
// Debug note field specifically
|
||||
var noteField = form.querySelector('[name="note"]');
|
||||
console.log('Note field found:', !!noteField);
|
||||
if (noteField) {
|
||||
console.log('Note value:', noteField.value);
|
||||
}
|
||||
|
||||
var saveBtn = document.getElementById('save-btn');
|
||||
if (saveBtn) {
|
||||
saveBtn.addEventListener('click', function() {
|
||||
console.log('=== SAVE CLICKED ===');
|
||||
var note = form.querySelector('[name="note"]');
|
||||
console.log('Note at save time:', note ? note.value : 'NOT FOUND');
|
||||
});
|
||||
}
|
||||
|
||||
form.addEventListener('submit', function(e) {
|
||||
console.log('=== FORM SUBMIT ===');
|
||||
var note = form.querySelector('[name="note"]');
|
||||
console.log('Note at submit:', note ? note.value : 'NOT FOUND');
|
||||
|
||||
var contattiFields = form.querySelectorAll('[name^="contatti"]');
|
||||
console.log('Contatti fields count:', contattiFields.length);
|
||||
contattiFields.forEach(function(f, i) {
|
||||
console.log('Contatto field ' + i + ':', f.name, '=', f.value);
|
||||
});
|
||||
|
||||
var formData = new FormData(form);
|
||||
console.log('FormData contatti:', formData.getAll('contatti'));
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
function submitMainForm() {
|
||||
var form = document.getElementById('main-form');
|
||||
console.log('=== DEBUG SUBMIT ===');
|
||||
|
||||
var contattiFields = form.querySelectorAll('[name^="contatti"]');
|
||||
console.log('Contatti fields found:', contattiFields.length);
|
||||
contattiFields.forEach(function(f, i) {
|
||||
console.log('Field ' + i + ': name=' + f.name + ', value=' + f.value);
|
||||
});
|
||||
|
||||
form.action = '/individui/<?php echo e($individuo->id); ?>';
|
||||
var methodInput = form.querySelector('input[name="_method"]');
|
||||
if (!methodInput) {
|
||||
var m = document.createElement('input');
|
||||
m.type = 'hidden';
|
||||
m.name = '_method';
|
||||
m.value = 'PUT';
|
||||
form.appendChild(m);
|
||||
}
|
||||
var csrfInput = form.querySelector('input[name="_token"]');
|
||||
if (!csrfInput) {
|
||||
var c = document.createElement('input');
|
||||
c.type = 'hidden';
|
||||
c.name = '_token';
|
||||
c.value = '<?php echo e(csrf_token()); ?>';
|
||||
form.appendChild(c);
|
||||
}
|
||||
|
||||
var formData = new FormData(form);
|
||||
console.log('FormData contatti keys:');
|
||||
for (var pair of formData.entries()) {
|
||||
if (pair[0].startsWith('contatti')) {
|
||||
console.log(' ' + pair[0] + ' = ' + pair[1]);
|
||||
}
|
||||
}
|
||||
|
||||
form.submit();
|
||||
}
|
||||
|
||||
let contattoIndex = <?php echo e($individuo->contatti->count()); ?>;
|
||||
|
||||
function aggiungiRigaContatto() {
|
||||
const tbody = document.getElementById('contatti-tbody');
|
||||
const noMsg = document.getElementById('no-contatti-msg');
|
||||
if (noMsg) noMsg.style.display = 'none';
|
||||
|
||||
const row = document.createElement('tr');
|
||||
row.innerHTML = `
|
||||
<td>
|
||||
<select name="contatti[${contattoIndex}][tipo]" class="form-control">
|
||||
<option value="">Seleziona...</option>
|
||||
<option value="telefono">Telefono</option>
|
||||
<option value="cellulare">Cellulare</option>
|
||||
<option value="email">Email</option>
|
||||
<option value="fax">Fax</option>
|
||||
<option value="web">Web</option>
|
||||
<option value="telegram">Telegram</option>
|
||||
<option value="whatsapp">WhatsApp</option>
|
||||
<option value="altro">Altro</option>
|
||||
</select>
|
||||
</td>
|
||||
<td><input type="text" name="contatti[${contattoIndex}][valore]" class="form-control" placeholder="Valore"></td>
|
||||
<td><input type="text" name="contatti[${contattoIndex}][etichetta]" class="form-control" placeholder="Etichetta"></td>
|
||||
<td class="text-center"><input type="checkbox" name="contatti[${contattoIndex}][is_primary]" value="1"></td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-success btn-xs" title="Salva" onclick="submitMainForm()">
|
||||
<i class="fas fa-save"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-danger btn-xs" title="Elimina" onclick="this.closest('tr').remove()">
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
</td>
|
||||
`;
|
||||
tbody.appendChild(row);
|
||||
contattoIndex++;
|
||||
}
|
||||
|
||||
function showGruppoForm() {
|
||||
var card = document.getElementById('gruppo-add-card');
|
||||
if (card) {
|
||||
card.style.display = 'block';
|
||||
card.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
||||
}
|
||||
}
|
||||
|
||||
function hideGruppoForm() {
|
||||
var card = document.getElementById('gruppo-add-card');
|
||||
if (card) {
|
||||
card.style.display = 'none';
|
||||
}
|
||||
}
|
||||
|
||||
function submitGruppoForm() {
|
||||
var gruppoId = document.getElementById('new-gruppo-id').value;
|
||||
var ruoloSelect = document.getElementById('new-gruppo-ruolo');
|
||||
var dataAdesione = document.getElementById('new-gruppo-data').value;
|
||||
|
||||
if (!gruppoId) {
|
||||
alert('Seleziona un gruppo');
|
||||
return;
|
||||
}
|
||||
|
||||
var formData = new URLSearchParams();
|
||||
formData.append('gruppo_id', gruppoId);
|
||||
|
||||
var selectedRuoli = Array.from(ruoloSelect.selectedOptions).map(opt => opt.value).filter(v => v);
|
||||
selectedRuoli.forEach(function(ruoloId) {
|
||||
formData.append('ruolo_ids[]', ruoloId);
|
||||
});
|
||||
|
||||
formData.append('data_adesione', dataAdesione);
|
||||
|
||||
fetch('/individui/<?php echo e($individuo->id); ?>/gruppi', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': '<?php echo e(csrf_token()); ?>',
|
||||
'Accept': 'application/json',
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
body: formData
|
||||
})
|
||||
.then(response => {
|
||||
if (!response.ok) {
|
||||
return response.text().then(text => { throw new Error(text); });
|
||||
}
|
||||
return response.json();
|
||||
})
|
||||
.then(data => {
|
||||
if (data.success) {
|
||||
hideGruppoForm();
|
||||
window.location.reload();
|
||||
} else {
|
||||
alert(data.error || 'Errore');
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
alert('Errore: ' + error.message);
|
||||
});
|
||||
}
|
||||
|
||||
function editGruppoInline(id) {
|
||||
document.getElementById('gruppo-row-' + id).style.display = 'none';
|
||||
document.getElementById('gruppo-edit-' + id).style.display = 'table-row';
|
||||
}
|
||||
|
||||
function cancelEditGruppo(id) {
|
||||
document.getElementById('gruppo-row-' + id).style.display = 'table-row';
|
||||
document.getElementById('gruppo-edit-' + id).style.display = 'none';
|
||||
}
|
||||
|
||||
function showDocumentoForm() {
|
||||
document.getElementById('documento-add-form').style.display = 'block';
|
||||
}
|
||||
|
||||
function hideDocumentoForm() {
|
||||
document.getElementById('documento-add-form').style.display = 'none';
|
||||
}
|
||||
|
||||
function previewDocumento(id, mimeType) {
|
||||
var previewUrl = '/documenti/' + id + '/preview';
|
||||
var downloadUrl = '/documenti/' + id + '/download';
|
||||
|
||||
document.getElementById('previewFrame').src = previewUrl;
|
||||
document.getElementById('previewDownloadBtn').href = downloadUrl;
|
||||
document.getElementById('previewModalTitle').textContent = 'Anteprima';
|
||||
|
||||
if (mimeType && mimeType.startsWith('image/')) {
|
||||
document.getElementById('previewDownloadBtn').style.display = 'inline-block';
|
||||
} else {
|
||||
document.getElementById('previewDownloadBtn').style.display = 'none';
|
||||
}
|
||||
|
||||
$('#previewModal').modal('show');
|
||||
}
|
||||
|
||||
document.getElementById('avatar-input').addEventListener('change', function(e) {
|
||||
var fileName = e.target.files[0]?.name || 'Scegli file...';
|
||||
e.target.nextElementSibling.textContent = fileName;
|
||||
});
|
||||
|
||||
function uploadAvatar() {
|
||||
var input = document.getElementById('avatar-input');
|
||||
if (!input.files[0]) {
|
||||
document.getElementById('avatar-message').innerHTML = '<span class="text-danger">Seleziona un\'immagine</span>';
|
||||
return;
|
||||
}
|
||||
|
||||
var formData = new FormData();
|
||||
formData.append('avatar', input.files[0]);
|
||||
formData.append('_token', '<?php echo e(csrf_token()); ?>');
|
||||
|
||||
document.getElementById('avatar-message').innerHTML = '<span class="text-info"><i class="fas fa-spinner fa-spin"></i> Caricamento...</span>';
|
||||
|
||||
fetch('/individui/<?php echo e($individuo->id); ?>/avatar', {
|
||||
method: 'POST',
|
||||
body: formData
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data.success) {
|
||||
document.getElementById('avatar-message').innerHTML = '<span class="text-success">Avatar caricato!</span>';
|
||||
setTimeout(function() { window.location.reload(); }, 500);
|
||||
} else {
|
||||
document.getElementById('avatar-message').innerHTML = '<span class="text-danger">' + (data.message || 'Errore') + '</span>';
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
document.getElementById('avatar-message').innerHTML = '<span class="text-danger">Errore: ' + error + '</span>';
|
||||
});
|
||||
}
|
||||
|
||||
function deleteAvatar() {
|
||||
if (!confirm('Rimuovere l\'avatar?')) return;
|
||||
|
||||
fetch('/individui/<?php echo e($individuo->id); ?>/avatar', {
|
||||
method: 'DELETE',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': '<?php echo e(csrf_token()); ?>',
|
||||
'Accept': 'application/json'
|
||||
}
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data.success) {
|
||||
window.location.reload();
|
||||
} else {
|
||||
alert(data.message || 'Errore');
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
alert('Errore: ' + error);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php echo $__env->make('layouts.adminlte', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/glastree/resources/views/individui/edit.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,374 @@
|
||||
<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;
|
||||
|
||||
$__newAttributes = [];
|
||||
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames((['queries']));
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (in_array($__key, $__propNames)) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
} else {
|
||||
$__newAttributes[$__key] = $__value;
|
||||
}
|
||||
}
|
||||
|
||||
$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);
|
||||
|
||||
unset($__propNames);
|
||||
unset($__newAttributes);
|
||||
|
||||
foreach (array_filter((['queries']), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
}
|
||||
|
||||
$__defined_vars = get_defined_vars();
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (array_key_exists($__key, $__defined_vars)) unset($$__key);
|
||||
}
|
||||
|
||||
unset($__defined_vars, $__key, $__value); ?>
|
||||
|
||||
<div
|
||||
<?php echo e($attributes->merge(['class' => "flex flex-col gap-2.5 bg-neutral-50 dark:bg-white/1 border border-neutral-200 dark:border-neutral-800 rounded-xl p-2.5 shadow-xs"])); ?>
|
||||
|
||||
x-data="{
|
||||
totalQueries: <?php echo e(min(count($queries), 100)); ?>,
|
||||
currentPage: 1,
|
||||
perPage: 10,
|
||||
get totalPages() {
|
||||
return Math.ceil(this.totalQueries / this.perPage);
|
||||
},
|
||||
get hasPrevious() {
|
||||
return this.currentPage > 1;
|
||||
},
|
||||
get hasNext() {
|
||||
return this.currentPage < this.totalPages;
|
||||
},
|
||||
goToPage(page) {
|
||||
if (page >= 1 && page <= this.totalPages) {
|
||||
this.currentPage = page;
|
||||
}
|
||||
},
|
||||
first() {
|
||||
this.currentPage = 1;
|
||||
},
|
||||
last() {
|
||||
this.currentPage = this.totalPages;
|
||||
},
|
||||
previous() {
|
||||
if (this.hasPrevious) {
|
||||
this.currentPage--;
|
||||
}
|
||||
},
|
||||
next() {
|
||||
if (this.hasNext) {
|
||||
this.currentPage++;
|
||||
}
|
||||
},
|
||||
get visiblePages() {
|
||||
const total = this.totalPages;
|
||||
const current = this.currentPage;
|
||||
const pages = [];
|
||||
|
||||
if (total <= 7) {
|
||||
for (let i = 1; i <= total; i++) {
|
||||
pages.push({ type: 'page', value: i });
|
||||
}
|
||||
} else {
|
||||
if (current <= 4) {
|
||||
for (let i = 1; i <= 5; i++) {
|
||||
pages.push({ type: 'page', value: i });
|
||||
}
|
||||
if (total > 6) {
|
||||
pages.push({ type: 'ellipsis', value: '...', id: 'end' });
|
||||
pages.push({ type: 'page', value: total });
|
||||
}
|
||||
} else if (current > total - 4) {
|
||||
pages.push({ type: 'page', value: 1 });
|
||||
if (total > 6) {
|
||||
pages.push({ type: 'ellipsis', value: '...', id: 'start' });
|
||||
}
|
||||
for (let i = Math.max(total - 4, 2); i <= total; i++) {
|
||||
pages.push({ type: 'page', value: i });
|
||||
}
|
||||
} else {
|
||||
pages.push({ type: 'page', value: 1 });
|
||||
pages.push({ type: 'ellipsis', value: '...', id: 'start' });
|
||||
for (let i = current - 1; i <= current + 1; i++) {
|
||||
pages.push({ type: 'page', value: i });
|
||||
}
|
||||
pages.push({ type: 'ellipsis', value: '...', id: 'end' });
|
||||
pages.push({ type: 'page', value: total });
|
||||
}
|
||||
}
|
||||
return pages;
|
||||
}
|
||||
}"
|
||||
>
|
||||
<div class="flex items-center justify-between p-2">
|
||||
<div class="flex items-center gap-2.5">
|
||||
<div class="bg-white dark:bg-neutral-800 border border-neutral-200 dark:border-white/5 rounded-md w-6 h-6 flex items-center justify-center p-1">
|
||||
<?php if (isset($component)) { $__componentOriginal9e277ab5ada333d718192209049fcff4 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginal9e277ab5ada333d718192209049fcff4 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.icons.database','data' => ['class' => 'w-2.5 h-2.5 text-blue-500 dark:text-emerald-500']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::icons.database'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['class' => 'w-2.5 h-2.5 text-blue-500 dark:text-emerald-500']); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginal9e277ab5ada333d718192209049fcff4)): ?>
|
||||
<?php $attributes = $__attributesOriginal9e277ab5ada333d718192209049fcff4; ?>
|
||||
<?php unset($__attributesOriginal9e277ab5ada333d718192209049fcff4); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginal9e277ab5ada333d718192209049fcff4)): ?>
|
||||
<?php $component = $__componentOriginal9e277ab5ada333d718192209049fcff4; ?>
|
||||
<?php unset($__componentOriginal9e277ab5ada333d718192209049fcff4); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<h3 class="text-base font-semibold">Queries</h3>
|
||||
</div>
|
||||
<div x-show="totalQueries > 0" class="text-sm text-neutral-500 dark:text-neutral-400 flex items-center gap-2">
|
||||
<span x-text="`${((currentPage - 1) * perPage) + 1}-${Math.min(currentPage * perPage, totalQueries)} of ${totalQueries}`"></span>
|
||||
<?php if(count($queries) > 100): ?>
|
||||
<?php if (isset($component)) { $__componentOriginalc6e888149e09c77971305ebbddaee753 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginalc6e888149e09c77971305ebbddaee753 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.icons.info','data' => ['class' => 'w-3 h-3 text-blue-500 dark:text-emerald-500','dataTippyContent' => 'Only the first 100 queries are shown']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::icons.info'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['class' => 'w-3 h-3 text-blue-500 dark:text-emerald-500','data-tippy-content' => 'Only the first 100 queries are shown']); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginalc6e888149e09c77971305ebbddaee753)): ?>
|
||||
<?php $attributes = $__attributesOriginalc6e888149e09c77971305ebbddaee753; ?>
|
||||
<?php unset($__attributesOriginalc6e888149e09c77971305ebbddaee753); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginalc6e888149e09c77971305ebbddaee753)): ?>
|
||||
<?php $component = $__componentOriginalc6e888149e09c77971305ebbddaee753; ?>
|
||||
<?php unset($__componentOriginalc6e888149e09c77971305ebbddaee753); ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col gap-1">
|
||||
<?php $__empty_1 = true; $__currentLoopData = array_slice($queries, 0, 100); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => ['connectionName' => $connectionName, 'sql' => $sql, 'time' => $time]): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
|
||||
<div
|
||||
class="border border-neutral-200 dark:border-none bg-white dark:bg-white/[3%] rounded-md h-10 flex items-center justify-between gap-4 px-4 text-xs font-mono shadow-xs"
|
||||
x-show="Math.floor(<?php echo e($index); ?> / perPage) === (currentPage - 1)"
|
||||
>
|
||||
<div class="flex items-center gap-2 truncate">
|
||||
<div class="flex items-center gap-2">
|
||||
<?php if (isset($component)) { $__componentOriginal9e277ab5ada333d718192209049fcff4 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginal9e277ab5ada333d718192209049fcff4 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.icons.database','data' => ['class' => 'w-3 h-3 text-neutral-500 dark:text-neutral-400']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::icons.database'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['class' => 'w-3 h-3 text-neutral-500 dark:text-neutral-400']); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginal9e277ab5ada333d718192209049fcff4)): ?>
|
||||
<?php $attributes = $__attributesOriginal9e277ab5ada333d718192209049fcff4; ?>
|
||||
<?php unset($__attributesOriginal9e277ab5ada333d718192209049fcff4); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginal9e277ab5ada333d718192209049fcff4)): ?>
|
||||
<?php $component = $__componentOriginal9e277ab5ada333d718192209049fcff4; ?>
|
||||
<?php unset($__componentOriginal9e277ab5ada333d718192209049fcff4); ?>
|
||||
<?php endif; ?>
|
||||
<span class="text-neutral-500 dark:text-neutral-400"><?php echo e($connectionName); ?></span>
|
||||
</div>
|
||||
<?php if (isset($component)) { $__componentOriginal12cb286571f553eebcbe98210b217f94 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginal12cb286571f553eebcbe98210b217f94 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.syntax-highlight','data' => ['code' => $sql,'language' => 'sql','truncate' => true,'class' => 'min-w-0','dataTippyContent' => ''.e(nl2br($sql)).'']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::syntax-highlight'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['code' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($sql),'language' => 'sql','truncate' => true,'class' => 'min-w-0','data-tippy-content' => ''.e(nl2br($sql)).'']); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginal12cb286571f553eebcbe98210b217f94)): ?>
|
||||
<?php $attributes = $__attributesOriginal12cb286571f553eebcbe98210b217f94; ?>
|
||||
<?php unset($__attributesOriginal12cb286571f553eebcbe98210b217f94); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginal12cb286571f553eebcbe98210b217f94)): ?>
|
||||
<?php $component = $__componentOriginal12cb286571f553eebcbe98210b217f94; ?>
|
||||
<?php unset($__componentOriginal12cb286571f553eebcbe98210b217f94); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="text-neutral-500 dark:text-neutral-200 text-right flex-shrink-0"><?php echo e($time); ?>ms</div>
|
||||
</div>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
|
||||
<?php if (isset($component)) { $__componentOriginal612ffe32146e3bd2ac6ba6076cca9520 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginal612ffe32146e3bd2ac6ba6076cca9520 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.empty-state','data' => ['message' => 'No queries executed']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::empty-state'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['message' => 'No queries executed']); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginal612ffe32146e3bd2ac6ba6076cca9520)): ?>
|
||||
<?php $attributes = $__attributesOriginal612ffe32146e3bd2ac6ba6076cca9520; ?>
|
||||
<?php unset($__attributesOriginal612ffe32146e3bd2ac6ba6076cca9520); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginal612ffe32146e3bd2ac6ba6076cca9520)): ?>
|
||||
<?php $component = $__componentOriginal612ffe32146e3bd2ac6ba6076cca9520; ?>
|
||||
<?php unset($__componentOriginal612ffe32146e3bd2ac6ba6076cca9520); ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<!-- Pagination Controls -->
|
||||
<div x-cloak x-show="totalPages > 1" class="flex items-center justify-center gap-1 py-4 font-mono">
|
||||
<!-- First Button -->
|
||||
<button
|
||||
@click="first()"
|
||||
class="cursor-pointer flex items-center justify-center w-8 h-8 rounded-md transition-colors"
|
||||
:disabled="!hasPrevious"
|
||||
:class="hasPrevious ? 'text-neutral-500 dark:text-neutral-300 hover:bg-neutral-200 hover:dark:text-white hover:dark:bg-white/5' : 'text-neutral-600 cursor-not-allowed!'"
|
||||
>
|
||||
<?php if (isset($component)) { $__componentOriginal935198b948cf7048e898f42ce9f720b5 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginal935198b948cf7048e898f42ce9f720b5 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.icons.chevrons-left','data' => ['class' => 'w-3 h-3']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::icons.chevrons-left'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['class' => 'w-3 h-3']); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginal935198b948cf7048e898f42ce9f720b5)): ?>
|
||||
<?php $attributes = $__attributesOriginal935198b948cf7048e898f42ce9f720b5; ?>
|
||||
<?php unset($__attributesOriginal935198b948cf7048e898f42ce9f720b5); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginal935198b948cf7048e898f42ce9f720b5)): ?>
|
||||
<?php $component = $__componentOriginal935198b948cf7048e898f42ce9f720b5; ?>
|
||||
<?php unset($__componentOriginal935198b948cf7048e898f42ce9f720b5); ?>
|
||||
<?php endif; ?>
|
||||
</button>
|
||||
|
||||
<!-- Previous Button -->
|
||||
<button
|
||||
@click="previous()"
|
||||
class="cursor-pointer flex items-center justify-center w-8 h-8 rounded-md transition-colors"
|
||||
:class="hasPrevious ? 'text-neutral-500 dark:text-neutral-300 hover:bg-neutral-200 hover:dark:text-white hover:dark:bg-white/5' : 'text-neutral-600 cursor-not-allowed!'"
|
||||
:disabled="!hasPrevious"
|
||||
>
|
||||
<?php if (isset($component)) { $__componentOriginalb1a2603ab360710208f4e8402894d933 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginalb1a2603ab360710208f4e8402894d933 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.icons.chevron-left','data' => ['class' => 'w-3 h-3']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::icons.chevron-left'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['class' => 'w-3 h-3']); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginalb1a2603ab360710208f4e8402894d933)): ?>
|
||||
<?php $attributes = $__attributesOriginalb1a2603ab360710208f4e8402894d933; ?>
|
||||
<?php unset($__attributesOriginalb1a2603ab360710208f4e8402894d933); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginalb1a2603ab360710208f4e8402894d933)): ?>
|
||||
<?php $component = $__componentOriginalb1a2603ab360710208f4e8402894d933; ?>
|
||||
<?php unset($__componentOriginalb1a2603ab360710208f4e8402894d933); ?>
|
||||
<?php endif; ?>
|
||||
</button>
|
||||
|
||||
<!-- Page Numbers -->
|
||||
<template x-for="(page, index) in visiblePages" :key="`page-${page.type}-${page.value}-${page.id || index}`">
|
||||
<div>
|
||||
<template x-if="page.type === 'ellipsis'">
|
||||
<span class="flex items-center justify-center w-8 h-8 text-neutral-500">...</span>
|
||||
</template>
|
||||
<template x-if="page.type === 'page'">
|
||||
<button
|
||||
@click="goToPage(page.value)"
|
||||
class="cursor-pointer flex items-center justify-center w-8 h-8 rounded-md text-sm font-medium transition-colors"
|
||||
:class="currentPage === page.value ? 'bg-blue-600 text-white' : 'text-neutral-500 dark:text-neutral-300 hover:bg-neutral-200 hover:dark:text-white hover:dark:bg-white/5'"
|
||||
x-text="page.value"
|
||||
></button>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- Next Button -->
|
||||
<button
|
||||
@click="next()"
|
||||
class="cursor-pointer flex items-center justify-center w-8 h-8 rounded-md transition-colors"
|
||||
:class="hasNext ? 'text-neutral-500 dark:text-neutral-300 hover:bg-neutral-200 hover:dark:text-white hover:dark:bg-white/5' : 'text-neutral-600 cursor-not-allowed!'"
|
||||
:disabled="!hasNext"
|
||||
>
|
||||
<?php if (isset($component)) { $__componentOriginalb7b593bedd3add356eaada0571956b3f = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginalb7b593bedd3add356eaada0571956b3f = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.icons.chevron-right','data' => ['class' => 'w-3 h-3']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::icons.chevron-right'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['class' => 'w-3 h-3']); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginalb7b593bedd3add356eaada0571956b3f)): ?>
|
||||
<?php $attributes = $__attributesOriginalb7b593bedd3add356eaada0571956b3f; ?>
|
||||
<?php unset($__attributesOriginalb7b593bedd3add356eaada0571956b3f); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginalb7b593bedd3add356eaada0571956b3f)): ?>
|
||||
<?php $component = $__componentOriginalb7b593bedd3add356eaada0571956b3f; ?>
|
||||
<?php unset($__componentOriginalb7b593bedd3add356eaada0571956b3f); ?>
|
||||
<?php endif; ?>
|
||||
</button>
|
||||
|
||||
<!-- Last Button -->
|
||||
<button
|
||||
@click="last()"
|
||||
class="cursor-pointer flex items-center justify-center w-8 h-8 rounded-md transition-colors"
|
||||
:class="hasNext ? 'text-neutral-500 dark:text-neutral-300 hover:bg-neutral-200 hover:dark:text-white hover:dark:bg-white/5' : 'text-neutral-600 cursor-not-allowed!'"
|
||||
:disabled="!hasNext"
|
||||
>
|
||||
<?php if (isset($component)) { $__componentOriginalbb91e7976582fbddcedcde197cd5dca1 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginalbb91e7976582fbddcedcde197cd5dca1 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.icons.chevrons-right','data' => ['class' => 'w-3 h-3']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::icons.chevrons-right'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['class' => 'w-3 h-3']); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginalbb91e7976582fbddcedcde197cd5dca1)): ?>
|
||||
<?php $attributes = $__attributesOriginalbb91e7976582fbddcedcde197cd5dca1; ?>
|
||||
<?php unset($__attributesOriginalbb91e7976582fbddcedcde197cd5dca1); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginalbb91e7976582fbddcedcde197cd5dca1)): ?>
|
||||
<?php $component = $__componentOriginalbb91e7976582fbddcedcde197cd5dca1; ?>
|
||||
<?php unset($__componentOriginalbb91e7976582fbddcedcde197cd5dca1); ?>
|
||||
<?php endif; ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/resources/exceptions/renderer/components/query.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,4 @@
|
||||
<svg width="6" height="10" viewBox="0 0 6 10" fill="none" xmlns="http://www.w3.org/2000/svg" <?php echo e($attributes); ?>>
|
||||
<path d="M5.125 0.75L0.875 5L5.125 9.25" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/resources/exceptions/renderer/components/icons/chevron-left.blade.php ENDPATH**/ ?>
|
||||
|
After Width: | Height: | Size: 418 B |
@@ -0,0 +1,54 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<title><?php echo $__env->yieldContent('title'); ?></title>
|
||||
|
||||
<!-- Styles -->
|
||||
<style>
|
||||
html, body {
|
||||
background-color: #fff;
|
||||
color: #636b6f;
|
||||
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
font-weight: 100;
|
||||
height: 100vh;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.full-height {
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.flex-center {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.position-ref {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.content {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 36px;
|
||||
padding: 20px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="flex-center position-ref full-height">
|
||||
<div class="content">
|
||||
<div class="title">
|
||||
<?php echo $__env->yieldContent('message'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/layout.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,243 @@
|
||||
<?php $__env->startSection('title', 'Nuovo Messaggio'); ?>
|
||||
<?php $__env->startSection('page_title', 'Nuovo Messaggio Email'); ?>
|
||||
|
||||
<?php $__env->startSection('content'); ?>
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="card card-primary">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><i class="fas fa-envelope mr-2"></i>Componi Messaggio</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="<?php echo e(route('mailing.invia')); ?>" method="POST" enctype="multipart/form-data">
|
||||
<?php echo csrf_field(); ?>
|
||||
|
||||
<?php if($individui->count() > 0): ?>
|
||||
<div class="form-group" id="destinatari-form-group">
|
||||
<label>Destinatari selezionati</label>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Codice</th>
|
||||
<th>Nome</th>
|
||||
<th>Email</th>
|
||||
<th style="width: 50px;"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="destinatari-tbody">
|
||||
<?php $__currentLoopData = $individui; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ind): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<tr id="dest-<?php echo e($ind->id); ?>">
|
||||
<td><span class="badge badge-secondary"><?php echo e($ind->codice_id); ?></span></td>
|
||||
<td><strong><?php echo e($ind->cognito); ?></strong> <?php echo e($ind->nome); ?></td>
|
||||
<td><?php echo e($ind->contatti->where('tipo', 'email')->first()?->valore ?: 'Nessuna email'); ?></td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-xs btn-outline-danger" onclick="removeDestinatario(<?php echo e($ind->id); ?>)" title="Rimuovi">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<input type="hidden" name="destinatari_ids" id="destinatari_ids" value="<?php echo e($individui->pluck('id')->join(',')); ?>">
|
||||
<small class="text-muted" id="destinatari-count"><?php echo e($individui->count()); ?> destinatari</small>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="form-group">
|
||||
<label for="lista_id">Lista Destinatari</label>
|
||||
<select name="lista_id" id="lista_id" class="form-control">
|
||||
<option value="">Seleziona lista...</option>
|
||||
<?php $__empty_1 = true; $__currentLoopData = $liste; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $lista): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
|
||||
<option value="<?php echo e($lista->id); ?>"><?php echo e($lista->nome); ?></option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
|
||||
<option value="">Nessuna lista disponibile</option>
|
||||
<?php endif; ?>
|
||||
</select>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="oggetto">Oggetto *</label>
|
||||
<input type="text" name="oggetto" id="oggetto" class="form-control" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="corpo">Messaggio *</label>
|
||||
<textarea name="corpo" id="corpo" class="form-control" rows="10" required></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Allegati</label>
|
||||
<div class="border rounded p-3">
|
||||
<div class="mb-3">
|
||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#documentiModal">
|
||||
<i class="fas fa-folder-open mr-1"></i> Seleziona da Documenti
|
||||
</button>
|
||||
<label class="btn btn-sm btn-success mb-0">
|
||||
<i class="fas fa-upload mr-1"></i> Carica nuovo file
|
||||
<input type="file" name="allegato" id="allegato" class="d-none" onchange="handleFileUpload(this)">
|
||||
</label>
|
||||
</div>
|
||||
<div id="allegati-list">
|
||||
<?php if(!empty($documentiSelezionati)): ?>
|
||||
<?php $__currentLoopData = $documentiSelezionati; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $doc): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<div class="d-flex align-items-center justify-content-between bg-light p-2 mb-2 rounded" id="allegato-<?php echo e($doc->id); ?>">
|
||||
<span><i class="fas fa-file mr-2"></i><?php echo e($doc->nome_file); ?></span>
|
||||
<button type="button" class="btn btn-xs btn-danger" onclick="removeAllegato(<?php echo e($doc->id); ?>)">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<input type="hidden" name="documenti_selezionati" id="documenti_selezionati" value="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<i class="fas fa-paper-plane mr-1"></i> Invia
|
||||
</button>
|
||||
<a href="<?php echo e(route('individui.index')); ?>" class="btn btn-secondary">
|
||||
Annulla
|
||||
</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="documentiModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><i class="fas fa-folder-open mr-2"></i>Seleziona Documenti</h5>
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php if($documenti->count() > 0): ?>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 40px;"></th>
|
||||
<th>Nome File</th>
|
||||
<th>Tipologia</th>
|
||||
<th>Data</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $__currentLoopData = $documenti; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $doc): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input doc-checkbox" id="doc-<?php echo e($doc->id); ?>" value="<?php echo e($doc->id); ?>" data-nome="<?php echo e($doc->nome_file); ?>">
|
||||
<label class="custom-control-label" for="doc-<?php echo e($doc->id); ?>"></label>
|
||||
</div>
|
||||
</td>
|
||||
<td><?php echo e($doc->nome_file); ?></td>
|
||||
<td><span class="badge badge-info"><?php echo e($doc->tipologia ?: $doc->tipo); ?></span></td>
|
||||
<td><?php echo e($doc->created_at->format('d/m/Y')); ?></td>
|
||||
</tr>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<p class="text-muted">Nessun documento disponibile.</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Annulla</button>
|
||||
<button type="button" class="btn btn-primary" onclick="aggiungiDocumenti()">
|
||||
<i class="fas fa-plus mr-1"></i> Aggiungi
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php $__env->startSection('scripts'); ?>
|
||||
<script>
|
||||
let allegatiSelezionati = [];
|
||||
|
||||
function removeDestinatario(id) {
|
||||
const row = document.getElementById('dest-' + id);
|
||||
if (!row) return;
|
||||
|
||||
row.remove();
|
||||
|
||||
const input = document.getElementById('destinatari_ids');
|
||||
if (input) {
|
||||
let ids = input.value.split(',').filter(function(i) {
|
||||
return i && parseInt(i) !== id;
|
||||
});
|
||||
input.value = ids.join(',');
|
||||
|
||||
const countEl = document.getElementById('destinatari-count');
|
||||
if (countEl) {
|
||||
countEl.textContent = ids.length + ' destinatari';
|
||||
}
|
||||
|
||||
if (ids.length === 0) {
|
||||
document.getElementById('destinatari-form-group').style.display = 'none';
|
||||
document.getElementById('lista-form-group').style.display = 'block';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function aggiungiDocumenti() {
|
||||
const checkboxes = document.querySelectorAll('.doc-checkbox:checked');
|
||||
checkboxes.forEach(function(cb) {
|
||||
const id = parseInt(cb.value);
|
||||
const nome = cb.dataset.nome;
|
||||
|
||||
if (!allegatiSelezionati.includes(id)) {
|
||||
allegatiSelezionati.push(id);
|
||||
|
||||
const container = document.getElementById('allegati-list');
|
||||
const div = document.createElement('div');
|
||||
div.className = 'd-flex align-items-center justify-content-between bg-light p-2 mb-2 rounded';
|
||||
div.id = 'allegato-' + id;
|
||||
div.innerHTML = '<span><i class="fas fa-file mr-2"></i>' + nome + '</span>' +
|
||||
'<button type="button" class="btn btn-xs btn-danger" onclick="removeAllegato(' + id + ')">' +
|
||||
'<i class="fas fa-times"></i></button>';
|
||||
container.appendChild(div);
|
||||
}
|
||||
|
||||
cb.checked = false;
|
||||
});
|
||||
|
||||
document.getElementById('documenti_esistenti').value = allegatiSelezionati.join(',');
|
||||
$('#documentiModal').modal('hide');
|
||||
}
|
||||
|
||||
function removeAllegato(id) {
|
||||
allegatiSelezionati = allegatiSelezionati.filter(function(a) { return a !== id; });
|
||||
const el = document.getElementById('allegato-' + id);
|
||||
if (el) el.remove();
|
||||
document.getElementById('documenti_selezionati').value = allegatiSelezionati.join(',');
|
||||
}
|
||||
|
||||
function handleFileUpload(input) {
|
||||
if (input.files && input.files[0]) {
|
||||
const file = input.files[0];
|
||||
const container = document.getElementById('allegati-list');
|
||||
const div = document.createElement('div');
|
||||
div.className = 'd-flex align-items-center justify-content-between bg-light p-2 mb-2 rounded';
|
||||
div.id = 'allegato-upload';
|
||||
div.innerHTML = '<span><i class="fas fa-file mr-2"></i>' + file.name + ' (' + (file.size / 1024).toFixed(1) + ' KB)</span>' +
|
||||
'<button type="button" class="btn btn-xs btn-danger" onclick="this.parentElement.remove(); input.value=\'\';">' +
|
||||
'<i class="fas fa-times"></i></button>';
|
||||
container.appendChild(div);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<?php $__env->stopSection(); ?>
|
||||
<?php echo $__env->make('layouts.adminlte', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/glastree/resources/views/mailing/nuovo.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,65 @@
|
||||
<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;
|
||||
|
||||
$__newAttributes = [];
|
||||
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames((['frame']));
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (in_array($__key, $__propNames)) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
} else {
|
||||
$__newAttributes[$__key] = $__value;
|
||||
}
|
||||
}
|
||||
|
||||
$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);
|
||||
|
||||
unset($__propNames);
|
||||
unset($__newAttributes);
|
||||
|
||||
foreach (array_filter((['frame']), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
}
|
||||
|
||||
$__defined_vars = get_defined_vars();
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (array_key_exists($__key, $__defined_vars)) unset($$__key);
|
||||
}
|
||||
|
||||
unset($__defined_vars, $__key, $__value); ?>
|
||||
|
||||
<?php
|
||||
$class = $frame->class();
|
||||
$operator = $frame->operator();
|
||||
$callable = $frame->callable();
|
||||
|
||||
if ($class && $operator) {
|
||||
$source = $class.$operator.$callable.'('.implode(', ', $frame->args()).')';
|
||||
} elseif ($callable !== 'throw') {
|
||||
$source = $callable.'('.implode(', ', $frame->args()).')';
|
||||
} else {
|
||||
$source = $frame->source();
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if (isset($component)) { $__componentOriginal12cb286571f553eebcbe98210b217f94 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginal12cb286571f553eebcbe98210b217f94 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.syntax-highlight','data' => ['code' => $source,'language' => 'php','truncate' => true,'class' => 'text-xs min-w-0','dataTippyContent' => ''.e($source).'']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::syntax-highlight'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['code' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($source),'language' => 'php','truncate' => true,'class' => 'text-xs min-w-0','data-tippy-content' => ''.e($source).'']); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginal12cb286571f553eebcbe98210b217f94)): ?>
|
||||
<?php $attributes = $__attributesOriginal12cb286571f553eebcbe98210b217f94; ?>
|
||||
<?php unset($__attributesOriginal12cb286571f553eebcbe98210b217f94); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginal12cb286571f553eebcbe98210b217f94)): ?>
|
||||
<?php $component = $__componentOriginal12cb286571f553eebcbe98210b217f94; ?>
|
||||
<?php unset($__componentOriginal12cb286571f553eebcbe98210b217f94); ?>
|
||||
<?php endif; ?>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/resources/exceptions/renderer/components/formatted-source.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" <?php echo e($attributes); ?>>
|
||||
<circle cx="12" cy="12" r="10"/>
|
||||
<path d="M12 16v-4"/>
|
||||
<path d="M12 8h.01"/>
|
||||
</svg>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/resources/exceptions/renderer/components/icons/info.blade.php ENDPATH**/ ?>
|
||||
|
After Width: | Height: | Size: 471 B |
@@ -0,0 +1,11 @@
|
||||
<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg" <?php echo e($attributes); ?>>
|
||||
<g clip-path="url(#clip0_14732_6105)">
|
||||
<path d="M9.87466 7.8287L5.92654 0.549947C5.82917 0.369362 5.68068 0.221523 5.49966 0.124947C5.25374 -0.00665839 4.9658 -0.0358401 4.69847 0.0437494C4.43115 0.123339 4.20606 0.305262 4.07216 0.549947L0.124664 7.8287C0.0383472 7.98887 -0.00481098 8.16875 -0.000569449 8.35066C0.00367208 8.53256 0.0551674 8.71024 0.148856 8.86622C0.242546 9.0222 0.375205 9.15112 0.533798 9.24031C0.692391 9.32951 0.871462 9.37591 1.05341 9.37495H8.94591C9.12031 9.37495 9.29203 9.33202 9.44591 9.24995C9.56783 9.18524 9.67572 9.09703 9.76338 8.99041C9.85104 8.8838 9.91672 8.76088 9.95663 8.62876C9.99655 8.49663 10.0099 8.35791 9.99595 8.22059C9.98199 8.08328 9.94036 7.95009 9.87466 7.8287ZM4.99966 8.12495C4.87605 8.12495 4.75521 8.08829 4.65243 8.01962C4.54965 7.95094 4.46954 7.85333 4.42224 7.73912C4.37493 7.62492 4.36256 7.49925 4.38667 7.37802C4.41079 7.25678 4.47031 7.14541 4.55772 7.05801C4.64513 6.9706 4.75649 6.91107 4.87773 6.88696C4.99897 6.86284 5.12464 6.87522 5.23884 6.92252C5.35304 6.96983 5.45066 7.04993 5.51933 7.15272C5.58801 7.2555 5.62466 7.37633 5.62466 7.49995C5.62466 7.66571 5.55882 7.82468 5.44161 7.94189C5.3244 8.0591 5.16542 8.12495 4.99966 8.12495ZM5.62466 5.93745C5.62466 6.02033 5.59174 6.09981 5.53313 6.15842C5.47453 6.21702 5.39504 6.24995 5.31216 6.24995H4.68716C4.60428 6.24995 4.5248 6.21702 4.46619 6.15842C4.40759 6.09981 4.37466 6.02033 4.37466 5.93745V3.43745C4.37466 3.35457 4.40759 3.27508 4.46619 3.21648C4.5248 3.15787 4.60428 3.12495 4.68716 3.12495H5.31216C5.39504 3.12495 5.47453 3.15787 5.53313 3.21648C5.59174 3.27508 5.62466 3.35457 5.62466 3.43745V5.93745Z" fill="currentColor" />
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_14732_6105">
|
||||
<rect width="10" height="10" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/resources/exceptions/renderer/components/icons/alert.blade.php ENDPATH**/ ?>
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
$children = $gruppo->children()->with(['diocesi', 'individui'])->orderBy('nome')->get();
|
||||
$hasChildren = $children->count() > 0;
|
||||
$canWriteGruppi = Auth::user()->canManage('gruppi');
|
||||
$responsabili = $gruppo->getResponsabili();
|
||||
?>
|
||||
|
||||
<div class="tree-item" style="margin-left: <?php echo e($gruppo->depth ?? 0); ?>px;">
|
||||
<div class="tree-label">
|
||||
<?php if($hasChildren): ?>
|
||||
<span class="tree-toggle" onclick="toggleItem(<?php echo e($gruppo->id); ?>)">
|
||||
<i id="icon-<?php echo e($gruppo->id); ?>" class="fas fa-chevron-right text-muted"></i>
|
||||
</span>
|
||||
<?php else: ?>
|
||||
<span style="width: 22px; display: inline-block;"></span>
|
||||
<?php endif; ?>
|
||||
<i class="fas fa-<?php echo e($hasChildren ? 'folder' : 'folder-open'); ?> text-<?php echo e($gruppo->depth == 0 ? 'warning' : 'secondary'); ?> mr-1"></i>
|
||||
<a href="<?php echo e(route('gruppi.show', $gruppo->id)); ?>" class="<?php echo e(($gruppo->depth ?? 0) == 0 ? 'font-weight-bold' : ''); ?>">
|
||||
<?php echo e($gruppo->nome); ?>
|
||||
|
||||
</a>
|
||||
<span class="badge badge-<?php echo e(($gruppo->depth ?? 0) == 0 ? 'primary' : 'secondary'); ?> badge-level"><?php echo e($gruppo->depth ?? 0); ?></span>
|
||||
<small class="text-muted ml-2">
|
||||
<?php echo e($gruppo->diocesi?->nome ?? ''); ?>
|
||||
|
||||
<?php if($responsabili->count() > 0): ?>
|
||||
· <i class="fas fa-user text-info"></i> <?php echo e($responsabili->pluck('cognome')->implode(', ')); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
</small>
|
||||
<span class="ml-auto">
|
||||
<?php if($gruppo->individui_count > 0): ?>
|
||||
<span class="badge badge-info"><?php echo e($gruppo->individui_count); ?> membri</span>
|
||||
<?php endif; ?>
|
||||
<?php if($hasChildren): ?>
|
||||
<span class="badge badge-warning"><?php echo e($children->count()); ?> figli</span>
|
||||
<?php endif; ?>
|
||||
</span>
|
||||
<span class="ml-2">
|
||||
<a href="<?php echo e(route('gruppi.show', $gruppo->id)); ?>" class="btn btn-xs btn-info" title="Visualizza">
|
||||
<i class="fas fa-eye"></i>
|
||||
</a>
|
||||
<?php if($canWriteGruppi): ?>
|
||||
<a href="<?php echo e(url('/gruppi/' . $gruppo->id . '/edit')); ?>" class="btn btn-xs btn-warning" title="Modifica">
|
||||
<i class="fas fa-edit"></i>
|
||||
</a>
|
||||
<?php
|
||||
$isParent = $hasChildren;
|
||||
$isSuperAdmin = Auth::user()->isSuperAdmin();
|
||||
$canDelete = !$isParent || $isSuperAdmin;
|
||||
?>
|
||||
<?php if($canDelete): ?>
|
||||
<form action="<?php echo e(url('/gruppi/' . $gruppo->id)); ?>" method="POST" class="d-inline">
|
||||
<?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
|
||||
<button type="submit" class="btn btn-xs btn-danger" onclick="return confirm('Confermi l\'eliminazione? Verranno eliminati anche tutti i sottogruppi.')" title="Elimina">
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
</form>
|
||||
<?php else: ?>
|
||||
<button type="button" class="btn btn-xs btn-danger disabled" title="Solo il superamministratore può eliminare gruppi con sottogruppi">
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if($hasChildren): ?>
|
||||
<div id="group-<?php echo e($gruppo->id); ?>" class="tree-children" style="display: none;">
|
||||
<?php $__currentLoopData = $children; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $child): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<?php echo $__env->make('gruppi.partials.tree-item', ['gruppo' => $child], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</div>
|
||||
<?php endif; ?><?php /**PATH /var/www/html/glastree/resources/views/gruppi/partials/tree-item.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,80 @@
|
||||
<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;
|
||||
|
||||
$__newAttributes = [];
|
||||
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames((['frame']));
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (in_array($__key, $__propNames)) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
} else {
|
||||
$__newAttributes[$__key] = $__value;
|
||||
}
|
||||
}
|
||||
|
||||
$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);
|
||||
|
||||
unset($__propNames);
|
||||
unset($__newAttributes);
|
||||
|
||||
foreach (array_filter((['frame']), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
}
|
||||
|
||||
$__defined_vars = get_defined_vars();
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (array_key_exists($__key, $__defined_vars)) unset($$__key);
|
||||
}
|
||||
|
||||
unset($__defined_vars, $__key, $__value); ?>
|
||||
|
||||
<div class="grid gap-3 p-4 bg-neutral-50 dark:bg-transparent overflow-x-auto rounded-lg">
|
||||
<?php if($frame->previous()): ?>
|
||||
<div class="flex">
|
||||
<?php if (isset($component)) { $__componentOriginalc33171fb5f34409a0ad661ae1625dcb2 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginalc33171fb5f34409a0ad661ae1625dcb2 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.formatted-source','data' => ['frame' => $frame,'className' => 'text-xs']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::formatted-source'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['frame' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($frame),'className' => 'text-xs']); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginalc33171fb5f34409a0ad661ae1625dcb2)): ?>
|
||||
<?php $attributes = $__attributesOriginalc33171fb5f34409a0ad661ae1625dcb2; ?>
|
||||
<?php unset($__attributesOriginalc33171fb5f34409a0ad661ae1625dcb2); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginalc33171fb5f34409a0ad661ae1625dcb2)): ?>
|
||||
<?php $component = $__componentOriginalc33171fb5f34409a0ad661ae1625dcb2; ?>
|
||||
<?php unset($__componentOriginalc33171fb5f34409a0ad661ae1625dcb2); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<span class="font-mono text-xs leading-3 text-neutral-500">Entrypoint</span>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (isset($component)) { $__componentOriginalfe2bc8d0a6d110d41fdc8740012cee8d = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginalfe2bc8d0a6d110d41fdc8740012cee8d = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.file-with-line','data' => ['frame' => $frame,'class' => 'text-xs']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::file-with-line'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['frame' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($frame),'class' => 'text-xs']); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginalfe2bc8d0a6d110d41fdc8740012cee8d)): ?>
|
||||
<?php $attributes = $__attributesOriginalfe2bc8d0a6d110d41fdc8740012cee8d; ?>
|
||||
<?php unset($__attributesOriginalfe2bc8d0a6d110d41fdc8740012cee8d); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginalfe2bc8d0a6d110d41fdc8740012cee8d)): ?>
|
||||
<?php $component = $__componentOriginalfe2bc8d0a6d110d41fdc8740012cee8d; ?>
|
||||
<?php unset($__componentOriginalfe2bc8d0a6d110d41fdc8740012cee8d); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/resources/exceptions/renderer/components/vendor-frame.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,122 @@
|
||||
<?php if($paginator->hasPages()): ?>
|
||||
<nav role="navigation" aria-label="<?php echo e(__('Pagination Navigation')); ?>">
|
||||
|
||||
<div class="flex gap-2 items-center justify-between sm:hidden">
|
||||
|
||||
<?php if($paginator->onFirstPage()): ?>
|
||||
<span class="inline-flex items-center px-4 py-2 text-sm font-medium text-gray-600 bg-white border border-gray-300 cursor-not-allowed leading-5 rounded-md dark:text-gray-300 dark:bg-gray-700 dark:border-gray-600">
|
||||
<?php echo __('pagination.previous'); ?>
|
||||
|
||||
</span>
|
||||
<?php else: ?>
|
||||
<a href="<?php echo e($paginator->previousPageUrl()); ?>" rel="prev" class="inline-flex items-center px-4 py-2 text-sm font-medium text-gray-800 bg-white border border-gray-300 leading-5 rounded-md hover:text-gray-700 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-800 transition ease-in-out duration-150 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-200 dark:focus:border-blue-700 dark:active:bg-gray-700 dark:active:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-900 dark:hover:text-gray-200">
|
||||
<?php echo __('pagination.previous'); ?>
|
||||
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($paginator->hasMorePages()): ?>
|
||||
<a href="<?php echo e($paginator->nextPageUrl()); ?>" rel="next" class="inline-flex items-center px-4 py-2 text-sm font-medium text-gray-800 bg-white border border-gray-300 leading-5 rounded-md hover:text-gray-700 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-800 transition ease-in-out duration-150 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-200 dark:focus:border-blue-700 dark:active:bg-gray-700 dark:active:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-900 dark:hover:text-gray-200">
|
||||
<?php echo __('pagination.next'); ?>
|
||||
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<span class="inline-flex items-center px-4 py-2 text-sm font-medium text-gray-600 bg-white border border-gray-300 cursor-not-allowed leading-5 rounded-md dark:text-gray-300 dark:bg-gray-700 dark:border-gray-600">
|
||||
<?php echo __('pagination.next'); ?>
|
||||
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="hidden sm:flex-1 sm:flex sm:gap-2 sm:items-center sm:justify-between">
|
||||
|
||||
<div>
|
||||
<p class="text-sm text-gray-700 leading-5 dark:text-gray-600">
|
||||
<?php echo __('Showing'); ?>
|
||||
|
||||
<?php if($paginator->firstItem()): ?>
|
||||
<span class="font-medium"><?php echo e($paginator->firstItem()); ?></span>
|
||||
<?php echo __('to'); ?>
|
||||
|
||||
<span class="font-medium"><?php echo e($paginator->lastItem()); ?></span>
|
||||
<?php else: ?>
|
||||
<?php echo e($paginator->count()); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
<?php echo __('of'); ?>
|
||||
|
||||
<span class="font-medium"><?php echo e($paginator->total()); ?></span>
|
||||
<?php echo __('results'); ?>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span class="inline-flex rtl:flex-row-reverse shadow-sm rounded-md">
|
||||
|
||||
|
||||
<?php if($paginator->onFirstPage()): ?>
|
||||
<span aria-disabled="true" aria-label="<?php echo e(__('pagination.previous')); ?>">
|
||||
<span class="inline-flex items-center px-2 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-not-allowed rounded-l-md leading-5 dark:bg-gray-700 dark:border-gray-600 dark:text-gray-400" aria-hidden="true">
|
||||
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path fill-rule="evenodd" d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<?php else: ?>
|
||||
<a href="<?php echo e($paginator->previousPageUrl()); ?>" rel="prev" class="inline-flex items-center px-2 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 rounded-l-md leading-5 hover:text-gray-400 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-500 transition ease-in-out duration-150 dark:bg-gray-800 dark:border-gray-600 dark:active:bg-gray-700 dark:focus:border-blue-800 dark:text-gray-300 dark:hover:bg-gray-900 dark:hover:text-gray-300" aria-label="<?php echo e(__('pagination.previous')); ?>">
|
||||
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path fill-rule="evenodd" d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php $__currentLoopData = $elements; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $element): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
|
||||
<?php if(is_string($element)): ?>
|
||||
<span aria-disabled="true">
|
||||
<span class="inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-700 bg-white border border-gray-300 cursor-default leading-5 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-300"><?php echo e($element); ?></span>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php if(is_array($element)): ?>
|
||||
<?php $__currentLoopData = $element; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $page => $url): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<?php if($page == $paginator->currentPage()): ?>
|
||||
<span aria-current="page">
|
||||
<span class="inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-700 bg-gray-200 border border-gray-300 cursor-default leading-5 dark:bg-gray-700 dark:border-gray-600 dark:text-gray-300"><?php echo e($page); ?></span>
|
||||
</span>
|
||||
<?php else: ?>
|
||||
<a href="<?php echo e($url); ?>" class="inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-700 bg-white border border-gray-300 leading-5 hover:text-gray-700 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-700 transition ease-in-out duration-150 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-300 dark:hover:text-gray-300 dark:active:bg-gray-700 dark:focus:border-blue-800 hover:bg-gray-100 dark:hover:bg-gray-900" aria-label="<?php echo e(__('Go to page :page', ['page' => $page])); ?>">
|
||||
<?php echo e($page); ?>
|
||||
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
|
||||
|
||||
<?php if($paginator->hasMorePages()): ?>
|
||||
<a href="<?php echo e($paginator->nextPageUrl()); ?>" rel="next" class="inline-flex items-center px-2 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 rounded-r-md leading-5 hover:text-gray-400 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-500 transition ease-in-out duration-150 dark:bg-gray-800 dark:border-gray-600 dark:active:bg-gray-700 dark:focus:border-blue-800 dark:text-gray-300 dark:hover:bg-gray-900 dark:hover:text-gray-300" aria-label="<?php echo e(__('pagination.next')); ?>">
|
||||
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<span aria-disabled="true" aria-label="<?php echo e(__('pagination.next')); ?>">
|
||||
<span class="inline-flex items-center px-2 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-not-allowed rounded-r-md leading-5 dark:bg-gray-700 dark:border-gray-600 dark:text-gray-400" aria-hidden="true">
|
||||
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Pagination/resources/views/tailwind.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,111 @@
|
||||
<?php $__env->startSection('title', 'Modifica Utente'); ?>
|
||||
<?php $__env->startSection('page_title', 'Modifica Utente: ' . $user->name); ?>
|
||||
|
||||
<?php $__env->startSection('breadcrumbs'); ?>
|
||||
<li class="breadcrumb-item"><a href="/admin/utenti">Admin</a></li>
|
||||
<li class="breadcrumb-item"><a href="/admin/utenti">Utenti</a></li>
|
||||
<li class="breadcrumb-item active"><?php echo e($user->name); ?></li>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php $__env->startSection('content'); ?>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Dati Utente</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form method="POST" action="<?php echo e(url('/admin/utenti/' . $user->id)); ?>">
|
||||
<?php echo csrf_field(); ?> <?php echo method_field('PUT'); ?>
|
||||
<div class="form-group">
|
||||
<label>Nome *</label>
|
||||
<input type="text" name="name" class="form-control" required value="<?php echo e(old('name', $user->name)); ?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Email *</label>
|
||||
<input type="email" name="email" class="form-control" required value="<?php echo e(old('email', $user->email)); ?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Nuova Password <small>(lascia vuoto per non cambiare)</small></label>
|
||||
<input type="password" name="password" class="form-control" minlength="8">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Conferma Password</label>
|
||||
<input type="password" name="password_confirmation" class="form-control" minlength="8">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Stato</label>
|
||||
<select name="status" class="form-control" required>
|
||||
<option value="active" <?php echo e($user->status === 'active' ? 'selected' : ''); ?>>Attivo</option>
|
||||
<option value="suspended" <?php echo e($user->status === 'suspended' ? 'selected' : ''); ?>>Sospeso</option>
|
||||
<option value="pending" <?php echo e($user->status === 'pending' ? 'selected' : ''); ?>>In attesa</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Ruolo Predefinito</label>
|
||||
<select name="role_preset_id" class="form-control" id="rolePresetSelect">
|
||||
<option value="">Personalizzato</option>
|
||||
<?php $__currentLoopData = $rolePresets; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $preset): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<option value="<?php echo e($preset->id); ?>" <?php echo e($user->role_preset_id == $preset->id ? 'selected' : ''); ?>>
|
||||
<?php echo e($preset->name); ?> - <?php echo e($preset->description); ?>
|
||||
|
||||
</option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-switch">
|
||||
<input type="checkbox" class="custom-control-input" id="isAdmin" name="is_admin" value="1" <?php echo e($user->isSuperAdmin() ? 'checked' : ''); ?>>
|
||||
<label class="custom-control-label" for="isAdmin">Superadmin (bypass ACL)</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="permissionsSection" class="mt-4">
|
||||
<h5>Permessi Granulari</h5>
|
||||
<table class="table table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Modulo</th>
|
||||
<th>Nessuno</th>
|
||||
<th>Lettura</th>
|
||||
<th>Completo</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $__currentLoopData = ['individui', 'gruppi', 'eventi', 'documenti', 'mailing', 'viste']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $module): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<tr>
|
||||
<td><strong><?php echo e(ucfirst($module)); ?></strong></td>
|
||||
<td><input type="radio" name="permissions[<?php echo e($module); ?>]" value="0" <?php echo e(($user->permissions[$module] ?? 0) == 0 ? 'checked' : ''); ?>></td>
|
||||
<td><input type="radio" name="permissions[<?php echo e($module); ?>]" value="1" <?php echo e(($user->permissions[$module] ?? 0) == 1 ? 'checked' : ''); ?>></td>
|
||||
<td><input type="radio" name="permissions[<?php echo e($module); ?>]" value="2" <?php echo e(($user->permissions[$module] ?? 0) == 2 ? 'checked' : ''); ?>></td>
|
||||
</tr>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="mt-4">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<i class="fas fa-save"></i> Salva
|
||||
</button>
|
||||
<a href="/admin/utenti" class="btn btn-secondary">Annulla</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php $__env->startSection('scripts'); ?>
|
||||
<script>
|
||||
$('#rolePresetSelect').change(function() {
|
||||
if ($(this).val()) {
|
||||
$('#permissionsSection').hide();
|
||||
} else {
|
||||
$('#permissionsSection').show();
|
||||
}
|
||||
}).trigger('change');
|
||||
</script>
|
||||
<?php $__env->stopSection(); ?>
|
||||
<?php echo $__env->make('admin.layout', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/glastree/resources/views/admin/utenti/edit.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,69 @@
|
||||
<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;
|
||||
|
||||
$__newAttributes = [];
|
||||
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames((['routing']));
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (in_array($__key, $__propNames)) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
} else {
|
||||
$__newAttributes[$__key] = $__value;
|
||||
}
|
||||
}
|
||||
|
||||
$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);
|
||||
|
||||
unset($__propNames);
|
||||
unset($__newAttributes);
|
||||
|
||||
foreach (array_filter((['routing']), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
}
|
||||
|
||||
$__defined_vars = get_defined_vars();
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (array_key_exists($__key, $__defined_vars)) unset($$__key);
|
||||
}
|
||||
|
||||
unset($__defined_vars, $__key, $__value); ?>
|
||||
|
||||
<div class="flex flex-col gap-3">
|
||||
<h2 class="text-lg font-semibold">Routing</h2>
|
||||
<div class="flex flex-col">
|
||||
<?php $__empty_1 = true; $__currentLoopData = $routing; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
|
||||
<div class="flex max-w-full items-baseline gap-2 h-10 text-sm font-mono">
|
||||
<div class="uppercase text-neutral-500 dark:text-neutral-400 shrink-0"><?php echo e($key); ?></div>
|
||||
<div class="min-w-6 grow h-3 border-b-2 border-dotted border-neutral-300 dark:border-white/20"></div>
|
||||
<div class="truncate text-neutral-900 dark:text-white">
|
||||
<span data-tippy-content="<?php echo e($value); ?>">
|
||||
<?php echo e($value); ?>
|
||||
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
|
||||
<?php if (isset($component)) { $__componentOriginal612ffe32146e3bd2ac6ba6076cca9520 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginal612ffe32146e3bd2ac6ba6076cca9520 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.empty-state','data' => ['message' => 'No routing context']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::empty-state'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['message' => 'No routing context']); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginal612ffe32146e3bd2ac6ba6076cca9520)): ?>
|
||||
<?php $attributes = $__attributesOriginal612ffe32146e3bd2ac6ba6076cca9520; ?>
|
||||
<?php unset($__attributesOriginal612ffe32146e3bd2ac6ba6076cca9520); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginal612ffe32146e3bd2ac6ba6076cca9520)): ?>
|
||||
<?php $component = $__componentOriginal612ffe32146e3bd2ac6ba6076cca9520; ?>
|
||||
<?php unset($__componentOriginal612ffe32146e3bd2ac6ba6076cca9520); ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/resources/exceptions/renderer/components/routing.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,91 @@
|
||||
<?php if($paginator->hasPages()): ?>
|
||||
<nav class="d-flex justify-items-center justify-content-between">
|
||||
<div class="d-flex justify-content-between flex-fill d-sm-none">
|
||||
<ul class="pagination">
|
||||
|
||||
<?php if($paginator->onFirstPage()): ?>
|
||||
<li class="page-item disabled" aria-disabled="true">
|
||||
<span class="page-link"><?php echo app('translator')->get('pagination.previous'); ?></span>
|
||||
</li>
|
||||
<?php else: ?>
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="<?php echo e($paginator->previousPageUrl()); ?>" rel="prev"><?php echo app('translator')->get('pagination.previous'); ?></a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php if($paginator->hasMorePages()): ?>
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="<?php echo e($paginator->nextPageUrl()); ?>" rel="next"><?php echo app('translator')->get('pagination.next'); ?></a>
|
||||
</li>
|
||||
<?php else: ?>
|
||||
<li class="page-item disabled" aria-disabled="true">
|
||||
<span class="page-link"><?php echo app('translator')->get('pagination.next'); ?></span>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="d-none flex-sm-fill d-sm-flex align-items-sm-center justify-content-sm-between">
|
||||
<div class="small text-muted">
|
||||
<?php echo __('Showing'); ?>
|
||||
|
||||
<span class="fw-semibold"><?php echo e($paginator->firstItem()); ?></span>
|
||||
<?php echo __('to'); ?>
|
||||
|
||||
<span class="fw-semibold"><?php echo e($paginator->lastItem()); ?></span>
|
||||
<?php echo __('of'); ?>
|
||||
|
||||
<span class="fw-semibold"><?php echo e($paginator->total()); ?></span>
|
||||
<?php echo __('results'); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<ul class="pagination">
|
||||
|
||||
<?php if($paginator->onFirstPage()): ?>
|
||||
<li class="page-item disabled" aria-disabled="true" aria-label="<?php echo app('translator')->get('pagination.previous'); ?>">
|
||||
<span class="page-link" aria-hidden="true">‹</span>
|
||||
</li>
|
||||
<?php else: ?>
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="<?php echo e($paginator->previousPageUrl()); ?>" rel="prev" aria-label="<?php echo app('translator')->get('pagination.previous'); ?>">‹</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php $__currentLoopData = $elements; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $element): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
|
||||
<?php if(is_string($element)): ?>
|
||||
<li class="page-item disabled" aria-disabled="true"><span class="page-link"><?php echo e($element); ?></span></li>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php if(is_array($element)): ?>
|
||||
<?php $__currentLoopData = $element; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $page => $url): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<?php if($page == $paginator->currentPage()): ?>
|
||||
<li class="page-item active" aria-current="page"><span class="page-link"><?php echo e($page); ?></span></li>
|
||||
<?php else: ?>
|
||||
<li class="page-item"><a class="page-link" href="<?php echo e($url); ?>"><?php echo e($page); ?></a></li>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
|
||||
|
||||
<?php if($paginator->hasMorePages()): ?>
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="<?php echo e($paginator->nextPageUrl()); ?>" rel="next" aria-label="<?php echo app('translator')->get('pagination.next'); ?>">›</a>
|
||||
</li>
|
||||
<?php else: ?>
|
||||
<li class="page-item disabled" aria-disabled="true" aria-label="<?php echo app('translator')->get('pagination.next'); ?>">
|
||||
<span class="page-link" aria-hidden="true">›</span>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Pagination/resources/views/bootstrap-5.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,4 @@
|
||||
<div <?php echo e($attributes->merge(['class' => "h-0 w-full relative"])); ?>>
|
||||
<div class="absolute top-[-1px] left-0 right-0 bottom-0 border-t border-dashed border-neutral-300 dark:border-white/[9%]"></div>
|
||||
</div>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/resources/exceptions/renderer/components/separator.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,351 @@
|
||||
<?php $__env->startSection('title', 'Modifica Mailing List'); ?>
|
||||
<?php $__env->startSection('page_title', 'Modifica Mailing List'); ?>
|
||||
|
||||
<?php $__env->startSection('content'); ?>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><i class="fas fa-edit mr-2"></i>Modifica Mailing List</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="<?php echo e(url('/mailing-liste/' . $mailingList->id)); ?>" method="POST" id="ml-form">
|
||||
<?php echo csrf_field(); ?> <?php echo method_field('PUT'); ?>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>Nome *</label>
|
||||
<input type="text" name="nome" class="form-control" value="<?php echo e($mailingList->nome); ?>" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-checkbox mt-4">
|
||||
<input type="checkbox" class="custom-control-input" id="attiva" name="attiva" value="1" <?php echo e($mailingList->attiva ? 'checked' : ''); ?>>
|
||||
<label class="custom-control-label" for="attiva">Lista attiva</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Descrizione</label>
|
||||
<textarea name="descrizione" class="form-control" rows="2"><?php echo e($mailingList->descrizione); ?></textarea>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>Seleziona Gruppi</label>
|
||||
<select name="gruppi[]" id="gruppi-select" class="form-control" multiple size="6">
|
||||
</select>
|
||||
<small class="text-muted">Seleziona con Ctrl/Cmd (ogni membro del gruppo sarà aggiunto)</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>Seleziona Individui</label>
|
||||
<select name="individui[]" id="individui-select" class="form-control" multiple size="6">
|
||||
</select>
|
||||
<small class="text-muted">Seleziona con Ctrl/Cmd</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<button type="button" class="btn btn-primary" onclick="caricaSelezionati()">
|
||||
<i class="fas fa-search mr-1"></i> Carica contatti
|
||||
</button>
|
||||
<button type="button" class="btn btn-secondary" onclick="selezionaTutti()">
|
||||
<i class="fas fa-check-square mr-1"></i> Seleziona tutti
|
||||
</button>
|
||||
<button type="button" class="btn btn-warning" onclick="deselezionaTutti()">
|
||||
<i class="fas fa-square mr-1"></i> Deseleziona tutti
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Contatti da includere (<span id="contatti-count"><?php echo e($mailingList->contatti->count()); ?></span>)</label>
|
||||
<div class="table-responsive" style="max-height: 400px; overflow-y: auto;">
|
||||
<table class="table table-bordered table-sm">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th style="width: 40px;">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input" id="select-all" onchange="toggleSelectAll(this)">
|
||||
<label class="custom-control-label" for="select-all"></label>
|
||||
</div>
|
||||
</th>
|
||||
<th>Codice</th>
|
||||
<th>Cognome</th>
|
||||
<th>Nome</th>
|
||||
<th>Email</th>
|
||||
<th>Stato</th>
|
||||
<th style="width: 50px;"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="contatti-tbody">
|
||||
<?php $__currentLoopData = $mailingList->contatti; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $contact): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<?php if($contact->individuo): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input contatto-checkbox" id="contatto-<?php echo e($contact->id); ?>" value="<?php echo e($contact->individuo->id); ?>" data-email="<?php echo e($contact->individuo->contatti->where('tipo', 'email')->first()?->valore); ?>" checked>
|
||||
<label class="custom-control-label" for="contatto-<?php echo e($contact->id); ?>"></label>
|
||||
</div>
|
||||
</td>
|
||||
<td><span class="badge badge-secondary"><?php echo e($contact->individuo->codice_id); ?></span></td>
|
||||
<td><?php echo e($contact->individuo->cognome); ?></td>
|
||||
<td><?php echo e($contact->individuo->nome); ?></td>
|
||||
<td><?php echo e($contact->individuo->contatti->where('tipo', 'email')->first()?->valore ?: '-'); ?></td>
|
||||
<td>
|
||||
<?php if($contact->opt_in): ?>
|
||||
<span class="badge badge-success">Iscritto</span>
|
||||
<?php else: ?>
|
||||
<span class="badge badge-danger">Disiscritto</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-xs btn-outline-danger" onclick="rimuoviContatto(this)">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<small class="text-muted">Deseleziona le righe che non vuoi includere nella lista</small>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-success">
|
||||
<i class="fas fa-save mr-1"></i> Salva
|
||||
</button>
|
||||
<a href="<?php echo e(route('mailing-liste.index')); ?>" class="btn btn-secondary">Annulla</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php $__env->startSection('scripts'); ?>
|
||||
<script>
|
||||
let contattiCaricati = [];
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const csrfToken = document.querySelector('meta[name="csrf-token"]')?.content || '';
|
||||
|
||||
fetch('/gruppi/all', {
|
||||
credentials: 'include',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': csrfToken,
|
||||
'Accept': 'application/json'
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
if (!response.ok) throw new Error('HTTP ' + response.status);
|
||||
return response.json();
|
||||
})
|
||||
.then(data => {
|
||||
const select = document.getElementById('gruppi-select');
|
||||
console.log('Gruppi caricati:', data.length);
|
||||
data.forEach(function(g) {
|
||||
const option = document.createElement('option');
|
||||
option.value = g.id;
|
||||
option.textContent = g.full_path || g.nome;
|
||||
select.appendChild(option);
|
||||
});
|
||||
})
|
||||
.catch(function(err) {
|
||||
console.error('Errore gruppi:', err);
|
||||
});
|
||||
|
||||
fetch('/individui/all', {
|
||||
credentials: 'include',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': csrfToken,
|
||||
'Accept': 'application/json'
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
if (!response.ok) throw new Error('HTTP ' + response.status);
|
||||
return response.json();
|
||||
})
|
||||
.then(data => {
|
||||
const select = document.getElementById('individui-select');
|
||||
console.log('Individui caricati:', data.length);
|
||||
data.forEach(function(ind) {
|
||||
const option = document.createElement('option');
|
||||
option.value = ind.id;
|
||||
option.textContent = ind.codice_id + ' - ' + ind.cognome + ' ' + ind.nome;
|
||||
select.appendChild(option);
|
||||
});
|
||||
})
|
||||
.catch(function(err) {
|
||||
console.error('Errore individui:', err);
|
||||
});
|
||||
|
||||
contattiCaricati = Array.from(document.querySelectorAll('.contatto-checkbox')).map(cb => ({
|
||||
individuo_id: parseInt(cb.value),
|
||||
email: cb.dataset.email,
|
||||
existing: true
|
||||
}));
|
||||
});
|
||||
|
||||
const csrfToken = document.querySelector('meta[name="csrf-token"]')?.content || '';
|
||||
|
||||
function caricaSelezionati() {
|
||||
const gruppiIds = Array.from(document.getElementById('gruppi-select').selectedOptions).map(opt => parseInt(opt.value));
|
||||
const individuiIds = Array.from(document.getElementById('individui-select').selectedOptions).map(opt => parseInt(opt.value));
|
||||
|
||||
if (gruppiIds.length === 0 && individuiIds.length === 0) {
|
||||
alert('Seleziona almeno un gruppo o un individuo');
|
||||
return;
|
||||
}
|
||||
|
||||
const promises = [];
|
||||
|
||||
gruppiIds.forEach(function(gruppoId) {
|
||||
promises.push(
|
||||
fetch('/gruppi/' + gruppoId + '/individui-email', {
|
||||
credentials: 'include',
|
||||
headers: { 'X-CSRF-TOKEN': csrfToken }
|
||||
})
|
||||
.then(response => {
|
||||
if (!response.ok) throw new Error('HTTP ' + response.status);
|
||||
return response.json();
|
||||
})
|
||||
.then(data => {
|
||||
data.forEach(function(ind) {
|
||||
if (ind.emails && ind.emails.length > 0) {
|
||||
if (!contattiCaricati.find(c => c.individuo_id === ind.id)) {
|
||||
contattiCaricati.push({
|
||||
individuo_id: ind.id,
|
||||
codice_id: ind.codice_id,
|
||||
cognome: ind.cogname,
|
||||
nome: ind.nome,
|
||||
email: ind.emails[0],
|
||||
origini: ['Gruppo']
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
if (individuiIds.length > 0) {
|
||||
promises.push(
|
||||
fetch('/individui/email-list?ids=' + individuiIds.join(','), {
|
||||
credentials: 'include',
|
||||
headers: { 'X-CSRF-TOKEN': csrfToken }
|
||||
})
|
||||
.then(response => {
|
||||
if (!response.ok) throw new Error('HTTP ' + response.status);
|
||||
return response.json();
|
||||
})
|
||||
.then(data => {
|
||||
data.forEach(function(ind) {
|
||||
if (ind.emails && ind.emails.length > 0) {
|
||||
if (!contattiCaricati.find(c => c.individuo_id === ind.id)) {
|
||||
contattiCaricati.push({
|
||||
individuo_id: ind.id,
|
||||
codice_id: ind.codice_id,
|
||||
cognome: ind.cogname,
|
||||
nome: ind.nome,
|
||||
email: ind.emails[0],
|
||||
origini: [' Individuo']
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
Promise.all(promises).then(function() {
|
||||
renderContattiTable();
|
||||
}).catch(function() {
|
||||
alert('Errore caricamento contatti');
|
||||
});
|
||||
}
|
||||
|
||||
function renderContattiTable() {
|
||||
const tbody = document.getElementById('contatti-tbody');
|
||||
tbody.innerHTML = '';
|
||||
|
||||
contattiCaricati.forEach(function(c, index) {
|
||||
const tr = document.createElement('tr');
|
||||
tr.innerHTML = `
|
||||
<td>
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input contatto-checkbox" id="contatto-${index}" value="${c.individuo_id}" data-email="${c.email}" checked>
|
||||
<label class="custom-control-label" for="contatto-${index}"></label>
|
||||
</div>
|
||||
</td>
|
||||
<td><span class="badge badge-secondary">${c.codice_id || ''}</span></td>
|
||||
<td>${c.cognome || ''}</td>
|
||||
<td>${c.nome || ''}</td>
|
||||
<td>${c.email || ''}</td>
|
||||
<td><small class="text-muted">${c.origini ? c.origini.join(', ') : 'Esistente'}</small></td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-xs btn-outline-danger" onclick="rimuoviContatto(this)">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</td>
|
||||
`;
|
||||
tbody.appendChild(tr);
|
||||
});
|
||||
|
||||
document.getElementById('contatti-count').textContent = contattiCaricati.length;
|
||||
}
|
||||
|
||||
function rimuoviContatto(btn) {
|
||||
btn.closest('tr').remove();
|
||||
const count = document.querySelectorAll('.contatto-checkbox').length;
|
||||
document.getElementById('contatti-count').textContent = count;
|
||||
}
|
||||
|
||||
function toggleSelectAll(source) {
|
||||
document.querySelectorAll('.contatto-checkbox').forEach(function(cb) {
|
||||
cb.checked = source.checked;
|
||||
});
|
||||
}
|
||||
|
||||
function selezionaTutti() {
|
||||
document.querySelectorAll('.contatto-checkbox').forEach(function(cb) {
|
||||
cb.checked = true;
|
||||
});
|
||||
document.getElementById('select-all').checked = true;
|
||||
}
|
||||
|
||||
function deselezionaTutti() {
|
||||
document.querySelectorAll('.contatto-checkbox').forEach(function(cb) {
|
||||
cb.checked = false;
|
||||
});
|
||||
document.getElementById('select-all').checked = false;
|
||||
}
|
||||
|
||||
document.getElementById('ml-form').addEventListener('submit', function(e) {
|
||||
const selected = [];
|
||||
document.querySelectorAll('.contatto-checkbox:checked').forEach(function(cb) {
|
||||
selected.push({
|
||||
individuo_id: parseInt(cb.value),
|
||||
email: cb.dataset.email
|
||||
});
|
||||
});
|
||||
|
||||
if (selected.length === 0) {
|
||||
e.preventDefault();
|
||||
alert('Seleziona almeno un contatto con email');
|
||||
return;
|
||||
}
|
||||
|
||||
const input = document.createElement('input');
|
||||
input.type = 'hidden';
|
||||
input.name = 'contatti_json';
|
||||
input.value = JSON.stringify(selected);
|
||||
this.appendChild(input);
|
||||
});
|
||||
</script>
|
||||
<?php $__env->stopSection(); ?>
|
||||
<?php echo $__env->make('layouts.adminlte', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/glastree/resources/views/mailing-liste/edit.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php use \Illuminate\Foundation\Exceptions\Renderer\Renderer; ?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover">
|
||||
|
||||
<title><?php echo e(config('app.name', 'Laravel')); ?></title>
|
||||
|
||||
<link
|
||||
rel="icon" type="image/svg+xml"
|
||||
href="data:image/svg+xml,%3Csvg viewBox='0 -.11376601 49.74245785 51.31690859' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m49.626 11.564a.809.809 0 0 1 .028.209v10.972a.8.8 0 0 1 -.402.694l-9.209 5.302v10.509c0 .286-.152.55-.4.694l-19.223 11.066c-.044.025-.092.041-.14.058-.018.006-.035.017-.054.022a.805.805 0 0 1 -.41 0c-.022-.006-.042-.018-.063-.026-.044-.016-.09-.03-.132-.054l-19.219-11.066a.801.801 0 0 1 -.402-.694v-32.916c0-.072.01-.142.028-.21.006-.023.02-.044.028-.067.015-.042.029-.085.051-.124.015-.026.037-.047.055-.071.023-.032.044-.065.071-.093.023-.023.053-.04.079-.06.029-.024.055-.05.088-.069h.001l9.61-5.533a.802.802 0 0 1 .8 0l9.61 5.533h.002c.032.02.059.045.088.068.026.02.055.038.078.06.028.029.048.062.072.094.017.024.04.045.054.071.023.04.036.082.052.124.008.023.022.044.028.068a.809.809 0 0 1 .028.209v20.559l8.008-4.611v-10.51c0-.07.01-.141.028-.208.007-.024.02-.045.028-.068.016-.042.03-.085.052-.124.015-.026.037-.047.054-.071.024-.032.044-.065.072-.093.023-.023.052-.04.078-.06.03-.024.056-.05.088-.069h.001l9.611-5.533a.801.801 0 0 1 .8 0l9.61 5.533c.034.02.06.045.09.068.025.02.054.038.077.06.028.029.048.062.072.094.018.024.04.045.054.071.023.039.036.082.052.124.009.023.022.044.028.068zm-1.574 10.718v-9.124l-3.363 1.936-4.646 2.675v9.124l8.01-4.611zm-9.61 16.505v-9.13l-4.57 2.61-13.05 7.448v9.216zm-36.84-31.068v31.068l17.618 10.143v-9.214l-9.204-5.209-.003-.002-.004-.002c-.031-.018-.057-.044-.086-.066-.025-.02-.054-.036-.076-.058l-.002-.003c-.026-.025-.044-.056-.066-.084-.02-.027-.044-.05-.06-.078l-.001-.003c-.018-.03-.029-.066-.042-.1-.013-.03-.03-.058-.038-.09v-.001c-.01-.038-.012-.078-.016-.117-.004-.03-.012-.06-.012-.09v-21.483l-4.645-2.676-3.363-1.934zm8.81-5.994-8.007 4.609 8.005 4.609 8.006-4.61-8.006-4.608zm4.164 28.764 4.645-2.674v-20.096l-3.363 1.936-4.646 2.675v20.096zm24.667-23.325-8.006 4.609 8.006 4.609 8.005-4.61zm-.801 10.605-4.646-2.675-3.363-1.936v9.124l4.645 2.674 3.364 1.937zm-18.422 20.561 11.743-6.704 5.87-3.35-8-4.606-9.211 5.303-8.395 4.833z' fill='%23ff2d20'/%3E%3C/svg%3E"
|
||||
/>
|
||||
|
||||
<?php echo Renderer::css(); ?>
|
||||
|
||||
</head>
|
||||
<body class="font-sans antialiased overflow-x-hidden bg-neutral-50 dark:bg-neutral-900 dark:text-white scheme-light-dark">
|
||||
<div class="min-h-dvh">
|
||||
<?php echo e($slot); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php echo Renderer::js(); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/resources/exceptions/renderer/components/layout.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,88 @@
|
||||
<?php $__env->startSection('title', 'Viste Report'); ?>
|
||||
<?php $__env->startSection('page_title', 'Viste e Report Salvati'); ?>
|
||||
|
||||
<?php $__env->startSection('content'); ?>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><i class="fas fa-table mr-2"></i>Le Tue Viste</h3>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
<?php if($viste->count() > 0): ?>
|
||||
<table class="table table-bordered table-hover table-striped mb-0">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th>Nome</th>
|
||||
<th style="width: 120px;">Tipo</th>
|
||||
<th style="width: 100px;">Colonne</th>
|
||||
<th style="width: 150px;">Creata il</th>
|
||||
<th style="width: 120px;">Azioni</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $__currentLoopData = $viste; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $vista): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<tr>
|
||||
<td>
|
||||
<?php if($vista->is_default): ?>
|
||||
<i class="fas fa-star text-warning mr-1" title="Predefinita"></i>
|
||||
<?php else: ?>
|
||||
<i class="fas fa-file-alt text-primary mr-1"></i>
|
||||
<?php endif; ?>
|
||||
<?php echo e($vista->nome); ?>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<span class="badge badge-<?php echo e($vista->tipo === 'individui' ? 'info' : ($vista->tipo === 'gruppi' ? 'warning' : ($vista->tipo === 'documenti' ? 'success' : 'primary'))); ?>">
|
||||
<?php echo e(ucfirst($vista->tipo)); ?>
|
||||
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<?php if($vista->colonne_visibili): ?>
|
||||
<span class="badge badge-secondary"><?php echo e(count($vista->colonne_visibili)); ?></span>
|
||||
<?php else: ?>
|
||||
<span class="text-muted">Tutte</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?php echo e($vista->created_at->format('d/m/Y H:i')); ?></td>
|
||||
<td>
|
||||
<a href="<?php echo e(url('/' . $vista->tipo . '?vista_id=' . $vista->id)); ?>" class="btn btn-xs btn-primary" title="Applica">
|
||||
<i class="fas fa-play"></i>
|
||||
</a>
|
||||
<?php if(!$vista->is_default): ?>
|
||||
<form action="<?php echo e(url('/viste/' . $vista->id . '/default')); ?>" method="POST" class="d-inline">
|
||||
<?php echo csrf_field(); ?> <?php echo method_field('PATCH'); ?>
|
||||
<button type="submit" class="btn btn-xs btn-warning" title="Imposta predefinita">
|
||||
<i class="fas fa-star"></i>
|
||||
</button>
|
||||
</form>
|
||||
<?php else: ?>
|
||||
<span class="btn btn-xs btn-secondary" title="Predefinita">
|
||||
<i class="fas fa-check"></i>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
<form action="<?php echo e(url('/viste/' . $vista->id)); ?>" method="POST" class="d-inline">
|
||||
<?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
|
||||
<button type="submit" class="btn btn-xs btn-danger" onclick="return confirm('Eliminare questa vista?')" title="Elimina">
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php else: ?>
|
||||
<div class="text-center text-muted py-4">
|
||||
<i class="fas fa-table fa-2x mb-2"></i>
|
||||
<p class="mb-0">Nessuna vista salvata.<br>Configura una tabella e salva la vista.</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-3 text-muted small">
|
||||
<i class="fas fa-info-circle mr-1"></i>
|
||||
Per salvare una vista, configura le colonne, i filtri e l'ordinamento in una delle pagine elenco (Individui, Gruppi, Documenti, Eventi) e clicca su "Salva Vista".
|
||||
</div>
|
||||
<?php $__env->stopSection(); ?>
|
||||
<?php echo $__env->make('layouts.adminlte', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/glastree/resources/views/viste/index.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,165 @@
|
||||
<?php $__env->startSection('title', 'Invio Mailing'); ?>
|
||||
<?php $__env->startSection('page_title', 'Invio Mailing'); ?>
|
||||
|
||||
<?php $__env->startSection('content'); ?>
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="card card-primary">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><i class="fas fa-paper-plane mr-2"></i>Composizione Messaggio</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="<?php echo e(route('mailing.invio.elabora')); ?>" method="POST" enctype="multipart/form-data">
|
||||
<?php echo csrf_field(); ?>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Liste Destinatari *</label>
|
||||
<select name="liste[]" id="liste" class="form-control" multiple required size="4">
|
||||
<?php $__empty_1 = true; $__currentLoopData = $liste; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $lista): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
|
||||
<option value="<?php echo e($lista->id); ?>"><?php echo e($lista->nome); ?> (<?php echo e($lista->contatti->count()); ?> contatti)</option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
|
||||
<option value="">Nessuna lista disponibile</option>
|
||||
<?php endif; ?>
|
||||
</select>
|
||||
<small class="text-muted">Seleziona una o più liste (tieni premuto Ctrl per selezioni multiple)</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="oggetto">Oggetto *</label>
|
||||
<input type="text" name="oggetto" id="oggetto" class="form-control" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="corpo">Messaggio *</label>
|
||||
<textarea name="corpo" id="corpo" class="form-control" rows="12" required></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Allegati</label>
|
||||
<div class="border rounded p-3 bg-light">
|
||||
<div class="mb-3">
|
||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#documentiModal">
|
||||
<i class="fas fa-folder-open mr-1"></i> Seleziona da Documenti
|
||||
</button>
|
||||
<label class="btn btn-sm btn-success mb-0">
|
||||
<i class="fas fa-upload mr-1"></i> Carica nuovo file
|
||||
<input type="file" name="allegato" id="allegato" class="d-none" onchange="handleFileUpload(this)">
|
||||
</label>
|
||||
</div>
|
||||
<div id="allegati-list"></div>
|
||||
<input type="hidden" name="documenti_selezionati" id="documenti_selezionati" value="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<i class="fas fa-paper-plane mr-1"></i> Prepara Invio
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="documentiModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><i class="fas fa-folder-open mr-2"></i>Seleziona Documenti</h5>
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php if($documenti->count() > 0): ?>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 40px;"></th>
|
||||
<th>Nome File</th>
|
||||
<th>Tipologia</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $__currentLoopData = $documenti; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $doc): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input doc-checkbox" id="doc-<?php echo e($doc->id); ?>" value="<?php echo e($doc->id); ?>" data-nome="<?php echo e($doc->nome_file); ?>">
|
||||
<label class="custom-control-label" for="doc-<?php echo e($doc->id); ?>"></label>
|
||||
</div>
|
||||
</td>
|
||||
<td><?php echo e($doc->nome_file); ?></td>
|
||||
<td><span class="badge badge-info"><?php echo e($doc->tipologia ?: $doc->tipo); ?></span></td>
|
||||
</tr>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<p class="text-muted">Nessun documento disponibile.</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Annulla</button>
|
||||
<button type="button" class="btn btn-primary" onclick="aggiungiDocumenti()">
|
||||
<i class="fas fa-plus mr-1"></i> Aggiungi
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php $__env->startSection('scripts'); ?>
|
||||
<script>
|
||||
let allegatiSelezionati = [];
|
||||
|
||||
function aggiungiDocumenti() {
|
||||
const checkboxes = document.querySelectorAll('.doc-checkbox:checked');
|
||||
checkboxes.forEach(function(cb) {
|
||||
const id = parseInt(cb.value);
|
||||
const nome = cb.dataset.nome;
|
||||
|
||||
if (!allegatiSelezionati.includes(id)) {
|
||||
allegatiSelezionati.push(id);
|
||||
|
||||
const container = document.getElementById('allegati-list');
|
||||
const div = document.createElement('div');
|
||||
div.className = 'd-flex align-items-center justify-content-between bg-white p-2 mb-2 rounded';
|
||||
div.id = 'allegato-' + id;
|
||||
div.innerHTML = '<span><i class="fas fa-file mr-2"></i>' + nome + '</span>' +
|
||||
'<button type="button" class="btn btn-xs btn-danger" onclick="removeAllegato(' + id + ')">' +
|
||||
'<i class="fas fa-times"></i></button>';
|
||||
container.appendChild(div);
|
||||
}
|
||||
|
||||
cb.checked = false;
|
||||
});
|
||||
|
||||
document.getElementById('documenti_selezionati').value = allegatiSelezionati.join(',');
|
||||
$('#documentiModal').modal('hide');
|
||||
}
|
||||
|
||||
function removeAllegato(id) {
|
||||
allegatiSelezionati = allegatiSelezionati.filter(function(a) { return a !== id; });
|
||||
const el = document.getElementById('allegato-' + id);
|
||||
if (el) el.remove();
|
||||
document.getElementById('documenti_selezionati').value = allegatiSelezionati.join(',');
|
||||
}
|
||||
|
||||
function handleFileUpload(input) {
|
||||
if (input.files && input.files[0]) {
|
||||
const file = input.files[0];
|
||||
const container = document.getElementById('allegati-list');
|
||||
const div = document.createElement('div');
|
||||
div.className = 'd-flex align-items-center justify-content-between bg-white p-2 mb-2 rounded';
|
||||
div.innerHTML = '<span><i class="fas fa-file mr-2"></i>' + file.name + ' (' + (file.size / 1024).toFixed(1) + ' KB)</span>' +
|
||||
'<button type="button" class="btn btn-xs btn-danger" onclick="this.parentElement.remove(); input.value=\'\';">' +
|
||||
'<i class="fas fa-times"></i></button>';
|
||||
container.appendChild(div);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<?php $__env->stopSection(); ?>
|
||||
<?php echo $__env->make('layouts.adminlte', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/glastree/resources/views/mailing/invio.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,79 @@
|
||||
<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;
|
||||
|
||||
$__newAttributes = [];
|
||||
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames((['body']));
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (in_array($__key, $__propNames)) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
} else {
|
||||
$__newAttributes[$__key] = $__value;
|
||||
}
|
||||
}
|
||||
|
||||
$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);
|
||||
|
||||
unset($__propNames);
|
||||
unset($__newAttributes);
|
||||
|
||||
foreach (array_filter((['body']), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
}
|
||||
|
||||
$__defined_vars = get_defined_vars();
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (array_key_exists($__key, $__defined_vars)) unset($$__key);
|
||||
}
|
||||
|
||||
unset($__defined_vars, $__key, $__value); ?>
|
||||
|
||||
<div class="flex flex-col gap-3">
|
||||
<h2 class="text-lg font-semibold">Body</h2>
|
||||
<?php if($body): ?>
|
||||
<div class="bg-white dark:bg-white/[2%] border border-neutral-200 dark:border-neutral-800 rounded-md overflow-x-auto p-5 text-sm font-mono shadow-xs">
|
||||
<?php if (isset($component)) { $__componentOriginal12cb286571f553eebcbe98210b217f94 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginal12cb286571f553eebcbe98210b217f94 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.syntax-highlight','data' => ['code' => $body,'language' => 'json']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::syntax-highlight'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['code' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($body),'language' => 'json']); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginal12cb286571f553eebcbe98210b217f94)): ?>
|
||||
<?php $attributes = $__attributesOriginal12cb286571f553eebcbe98210b217f94; ?>
|
||||
<?php unset($__attributesOriginal12cb286571f553eebcbe98210b217f94); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginal12cb286571f553eebcbe98210b217f94)): ?>
|
||||
<?php $component = $__componentOriginal12cb286571f553eebcbe98210b217f94; ?>
|
||||
<?php unset($__componentOriginal12cb286571f553eebcbe98210b217f94); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<?php if (isset($component)) { $__componentOriginal612ffe32146e3bd2ac6ba6076cca9520 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginal612ffe32146e3bd2ac6ba6076cca9520 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.empty-state','data' => ['message' => 'No request body']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::empty-state'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['message' => 'No request body']); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginal612ffe32146e3bd2ac6ba6076cca9520)): ?>
|
||||
<?php $attributes = $__attributesOriginal612ffe32146e3bd2ac6ba6076cca9520; ?>
|
||||
<?php unset($__attributesOriginal612ffe32146e3bd2ac6ba6076cca9520); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginal612ffe32146e3bd2ac6ba6076cca9520)): ?>
|
||||
<?php $component = $__componentOriginal612ffe32146e3bd2ac6ba6076cca9520; ?>
|
||||
<?php unset($__componentOriginal612ffe32146e3bd2ac6ba6076cca9520); ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/resources/exceptions/renderer/components/request-body.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,114 @@
|
||||
<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;
|
||||
|
||||
$__newAttributes = [];
|
||||
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames((['exception']));
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (in_array($__key, $__propNames)) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
} else {
|
||||
$__newAttributes[$__key] = $__value;
|
||||
}
|
||||
}
|
||||
|
||||
$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);
|
||||
|
||||
unset($__propNames);
|
||||
unset($__newAttributes);
|
||||
|
||||
foreach (array_filter((['exception']), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
}
|
||||
|
||||
$__defined_vars = get_defined_vars();
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (array_key_exists($__key, $__defined_vars)) unset($$__key);
|
||||
}
|
||||
|
||||
unset($__defined_vars, $__key, $__value); ?>
|
||||
|
||||
<div class="flex flex-col gap-2.5 bg-neutral-50 dark:bg-white/1 border border-neutral-200 dark:border-neutral-800 rounded-xl p-2.5 shadow-xs">
|
||||
<div class="flex items-center gap-2.5 p-2">
|
||||
<div class="bg-white dark:bg-neutral-800 border border-neutral-200 dark:border-white/5 rounded-md w-6 h-6 flex items-center justify-center p-1">
|
||||
<?php if (isset($component)) { $__componentOriginalebc8ec9a834a8051f56913d6745a7050 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginalebc8ec9a834a8051f56913d6745a7050 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.icons.alert','data' => ['class' => 'w-2.5 h-2.5 text-blue-500 dark:text-emerald-500']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::icons.alert'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['class' => 'w-2.5 h-2.5 text-blue-500 dark:text-emerald-500']); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginalebc8ec9a834a8051f56913d6745a7050)): ?>
|
||||
<?php $attributes = $__attributesOriginalebc8ec9a834a8051f56913d6745a7050; ?>
|
||||
<?php unset($__attributesOriginalebc8ec9a834a8051f56913d6745a7050); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginalebc8ec9a834a8051f56913d6745a7050)): ?>
|
||||
<?php $component = $__componentOriginalebc8ec9a834a8051f56913d6745a7050; ?>
|
||||
<?php unset($__componentOriginalebc8ec9a834a8051f56913d6745a7050); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<h3 class="text-base font-semibold text-neutral-900 dark:text-white">Exception trace</h3>
|
||||
<?php if($exception->previousExceptions()->isNotEmpty()): ?>
|
||||
<a href="#previous-exceptions" class="ml-auto text-sm text-neutral-500 dark:text-neutral-400 hover:text-blue-500 dark:hover:text-emerald-500 transition-colors">
|
||||
<?php echo e($exception->previousExceptions()->count()); ?> previous <?php echo e(\Illuminate\Support\Str::plural('exception', $exception->previousExceptions()->count())); ?>
|
||||
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col gap-1.5">
|
||||
<?php $__currentLoopData = $exception->frameGroups(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $group): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<?php if($group['is_vendor']): ?>
|
||||
<?php if (isset($component)) { $__componentOriginal449787012edfba29f0e80f325065fad5 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginal449787012edfba29f0e80f325065fad5 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.vendor-frames','data' => ['frames' => $group['frames']]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::vendor-frames'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['frames' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($group['frames'])]); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginal449787012edfba29f0e80f325065fad5)): ?>
|
||||
<?php $attributes = $__attributesOriginal449787012edfba29f0e80f325065fad5; ?>
|
||||
<?php unset($__attributesOriginal449787012edfba29f0e80f325065fad5); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginal449787012edfba29f0e80f325065fad5)): ?>
|
||||
<?php $component = $__componentOriginal449787012edfba29f0e80f325065fad5; ?>
|
||||
<?php unset($__componentOriginal449787012edfba29f0e80f325065fad5); ?>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php $__currentLoopData = $group['frames']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $frame): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<?php if (isset($component)) { $__componentOriginalc7c58c6d16fe849872fb25ad6e9b8407 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginalc7c58c6d16fe849872fb25ad6e9b8407 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.frame','data' => ['frame' => $frame]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::frame'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['frame' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($frame)]); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginalc7c58c6d16fe849872fb25ad6e9b8407)): ?>
|
||||
<?php $attributes = $__attributesOriginalc7c58c6d16fe849872fb25ad6e9b8407; ?>
|
||||
<?php unset($__attributesOriginalc7c58c6d16fe849872fb25ad6e9b8407); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginalc7c58c6d16fe849872fb25ad6e9b8407)): ?>
|
||||
<?php $component = $__componentOriginalc7c58c6d16fe849872fb25ad6e9b8407; ?>
|
||||
<?php unset($__componentOriginalc7c58c6d16fe849872fb25ad6e9b8407); ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/resources/exceptions/renderer/components/trace.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,6 @@
|
||||
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" <?php echo e($attributes); ?>>
|
||||
<path d="M5.99996 10.6876C7.10936 10.6876 8.00871 8.58896 8.00871 6.00012C8.00871 3.41129 7.10936 1.31262 5.99996 1.31262C4.89056 1.31262 3.99121 3.41129 3.99121 6.00012C3.99121 8.58896 4.89056 10.6876 5.99996 10.6876Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M1.3125 6.00012H10.6875" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M6 10.6876C8.58883 10.6876 10.6875 8.58896 10.6875 6.00012C10.6875 3.41129 8.58883 1.31262 6 1.31262C3.41117 1.31262 1.3125 3.41129 1.3125 6.00012C1.3125 8.58896 3.41117 10.6876 6 10.6876Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/resources/exceptions/renderer/components/icons/globe.blade.php ENDPATH**/ ?>
|
||||
|
After Width: | Height: | Size: 975 B |
@@ -0,0 +1,5 @@
|
||||
<?php $__env->startSection('title', __('Too Many Requests')); ?>
|
||||
<?php $__env->startSection('code', '429'); ?>
|
||||
<?php $__env->startSection('message', __('Too Many Requests')); ?>
|
||||
|
||||
<?php echo $__env->make('errors::minimal', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/429.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,149 @@
|
||||
<?php $__env->startSection('title', 'Modifica Documento'); ?>
|
||||
<?php $__env->startSection('page_title', 'Modifica Documento'); ?>
|
||||
|
||||
<?php $__env->startSection('content'); ?>
|
||||
<form action="/documenti/<?php echo e($documento->id); ?>" method="POST">
|
||||
<?php echo csrf_field(); ?> <?php echo method_field('PUT'); ?>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="card card-primary">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><i class="fas fa-file mr-2"></i>Dati Documento</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label>Nome *</label>
|
||||
<input type="text" name="nome_file" class="form-control" value="<?php echo e(old('nome_file', $documento->nome_file)); ?>" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Tipologia *</label>
|
||||
<select name="tipologia" class="form-control" required>
|
||||
<?php $__currentLoopData = $tipologie; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tip): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<option value="<?php echo e($tip->nome); ?>" <?php echo e($documento->tipologia === $tip->nome ? 'selected' : ''); ?>><?php echo e($tip->descrizione ?? ucfirst($tip->nome)); ?></option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Contesto *</label>
|
||||
<select name="contesto_tipo" id="contesto_tipo" class="form-control" onchange="aggiornaTarget()">
|
||||
<option value="">Seleziona tipo...</option>
|
||||
<option value="individuo" <?php echo e($documento->visibilita === 'individuo' ? 'selected' : ''); ?>>Individuo</option>
|
||||
<option value="gruppo" <?php echo e($documento->visibilita === 'gruppo' ? 'selected' : ''); ?>>Gruppo</option>
|
||||
<option value="evento" <?php echo e($documento->visibilita === 'evento' ? 'selected' : ''); ?>>Evento</option>
|
||||
<option value="mailing" <?php echo e($documento->visibilita === 'mailing' ? 'selected' : ''); ?>>Mailing List</option>
|
||||
</select>
|
||||
<input type="hidden" name="visibilita" id="visibilita" value="<?php echo e($documento->visibilita); ?>">
|
||||
</div>
|
||||
<div class="form-group" id="target_container" style="<?php echo e(in_array($documento->visibilita, ['individuo', 'gruppo', 'evento', 'mailing']) ? '' : 'display:none;'); ?>">
|
||||
<label>Riferimento *</label>
|
||||
<select name="visibilita_target_id" id="visibilita_target_id" class="form-control">
|
||||
<?php if($documento->visibilita === 'individuo'): ?>
|
||||
<?php $__currentLoopData = $individui; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ind): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<option value="<?php echo e($ind->id); ?>" <?php echo e($documento->visibilita_target_id == $ind->id ? 'selected' : ''); ?>><?php echo e($ind->cognome); ?> <?php echo e($ind->nome); ?></option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
<?php elseif($documento->visibilita === 'gruppo'): ?>
|
||||
<?php $__currentLoopData = $gruppi; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $grp): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<option value="<?php echo e($grp->id); ?>" <?php echo e($documento->visibilita_target_id == $grp->id ? 'selected' : ''); ?>><?php echo e($grp->nome); ?></option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
<?php elseif($documento->visibilita === 'evento'): ?>
|
||||
<?php $__currentLoopData = $eventi; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $evt): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<option value="<?php echo e($evt->id); ?>" <?php echo e($documento->visibilita_target_id == $evt->id ? 'selected' : ''); ?>><?php echo e($evt->nome_evento); ?></option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
<?php elseif($documento->visibilita === 'mailing'): ?>
|
||||
<?php $__currentLoopData = $mailingLists; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ml): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<option value="<?php echo e($ml->id); ?>" <?php echo e($documento->visibilita_target_id == $ml->id ? 'selected' : ''); ?>><?php echo e($ml->nome); ?></option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
<?php endif; ?>
|
||||
</select>
|
||||
<input type="hidden" name="visibilita_target_type" id="visibilita_target_type" value="">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Note</label>
|
||||
<textarea name="note" class="form-control" rows="3"><?php echo e(old('note', $documento->note)); ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><i class="fas fa-info-circle mr-2"></i>Informazioni</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table table-sm table-borderless">
|
||||
<tr>
|
||||
<td style="width: 100px;"><strong>File:</strong></td>
|
||||
<td><?php echo e($documento->file_path); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Tipo MIME:</strong></td>
|
||||
<td><?php echo e($documento->mime_type ?? '-'); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Dimensione:</strong></td>
|
||||
<td><?php echo e($documento->dimensione ? number_format($documento->dimensione / 1024, 1) . ' KB' : '-'); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Creato:</strong></td>
|
||||
<td><?php echo e($documento->created_at->format('d/m/Y H:i')); ?></td>
|
||||
</tr>
|
||||
<?php if($documento->user): ?>
|
||||
<tr>
|
||||
<td><strong>Utente:</strong></td>
|
||||
<td><?php echo e($documento->user->name); ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<?php if($documento->file_path): ?>
|
||||
<hr>
|
||||
<a href="/documenti/<?php echo e($documento->id); ?>/download" class="btn btn-primary btn-block">
|
||||
<i class="fas fa-download mr-1"></i> Scarica
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-3">
|
||||
<button type="submit" class="btn btn-success">
|
||||
<i class="fas fa-save mr-1"></i> Salva Modifiche
|
||||
</button>
|
||||
<a href="/documenti" class="btn btn-secondary">
|
||||
<i class="fas fa-arrow-left mr-1"></i> Torna all'elenco
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function aggiornaTarget() {
|
||||
var tipo = document.getElementById('contesto_tipo').value;
|
||||
var container = document.getElementById('target_container');
|
||||
var targetSelect = document.getElementById('visibilita_target_id');
|
||||
var visibilita = document.getElementById('visibilita');
|
||||
var targetType = document.getElementById('visibilita_target_type');
|
||||
|
||||
visibilita.value = tipo;
|
||||
targetType.value = '';
|
||||
|
||||
if (tipo) {
|
||||
container.style.display = 'block';
|
||||
targetSelect.innerHTML = '<option value="">Caricamento...</option>';
|
||||
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', '/documenti/options?tipo=' + tipo, true);
|
||||
xhr.onload = function() {
|
||||
if (xhr.status === 200) {
|
||||
targetSelect.innerHTML = '<option value="">Seleziona...</option>' + xhr.responseText;
|
||||
}
|
||||
};
|
||||
xhr.send();
|
||||
} else {
|
||||
container.style.display = 'none';
|
||||
targetSelect.innerHTML = '<option value="">Seleziona prima il tipo...</option>';
|
||||
targetSelect.value = '';
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<?php $__env->stopSection(); ?>
|
||||
<?php echo $__env->make('layouts.adminlte', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/glastree/resources/views/documenti/edit.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,78 @@
|
||||
# <?php echo e($exception->class()); ?> - <?php echo $exception->title(); ?>
|
||||
|
||||
|
||||
<?php echo $exception->message(); ?>
|
||||
|
||||
|
||||
PHP <?php echo e(PHP_VERSION); ?>
|
||||
|
||||
Laravel <?php echo e(app()->version()); ?>
|
||||
|
||||
<?php echo e($exception->request()->httpHost()); ?>
|
||||
|
||||
|
||||
## Stack Trace
|
||||
|
||||
<?php $__currentLoopData = $exception->frames(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $frame): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<?php echo e($index); ?> - <?php echo e($frame->file()); ?>:<?php echo e($frame->line()); ?>
|
||||
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
|
||||
<?php if($exception->previousExceptions()->isNotEmpty()): ?>
|
||||
## Previous <?php echo e(\Illuminate\Support\Str::plural('exception', $exception->previousExceptions()->count())); ?>
|
||||
|
||||
<?php $__currentLoopData = $exception->previousExceptions(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $previous): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
|
||||
### <?php echo e($index + 1); ?>. <?php echo e($previous->class()); ?>
|
||||
|
||||
|
||||
<?php echo $previous->message(); ?>
|
||||
|
||||
|
||||
<?php $__currentLoopData = $previous->frames(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $frame): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<?php echo e($index); ?> - <?php echo e($frame->file()); ?>:<?php echo e($frame->line()); ?>
|
||||
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
## Request
|
||||
|
||||
<?php echo e($exception->request()->method()); ?> <?php echo e(\Illuminate\Support\Str::start($exception->request()->path(), '/')); ?>
|
||||
|
||||
|
||||
## Headers
|
||||
|
||||
<?php $__empty_1 = true; $__currentLoopData = $exception->requestHeaders(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
|
||||
* **<?php echo e($key); ?>**: <?php echo $value; ?>
|
||||
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
|
||||
No header data available.
|
||||
<?php endif; ?>
|
||||
|
||||
## Route Context
|
||||
|
||||
<?php $__empty_1 = true; $__currentLoopData = $exception->applicationRouteContext(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $name => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
|
||||
<?php echo e($name); ?>: <?php echo $value; ?>
|
||||
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
|
||||
No routing data available.
|
||||
<?php endif; ?>
|
||||
|
||||
## Route Parameters
|
||||
|
||||
<?php if($routeParametersContext = $exception->applicationRouteParametersContext()): ?>
|
||||
<?php echo $routeParametersContext; ?>
|
||||
|
||||
<?php else: ?>
|
||||
No route parameter data available.
|
||||
<?php endif; ?>
|
||||
|
||||
## Database Queries
|
||||
|
||||
<?php $__empty_1 = true; $__currentLoopData = $exception->applicationQueries(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as ['connectionName' => $connectionName, 'sql' => $sql, 'time' => $time]): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
|
||||
* <?php echo e($connectionName); ?> - <?php echo $sql; ?> (<?php echo e($time); ?> ms)
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
|
||||
No database queries detected.
|
||||
<?php endif; ?>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/resources/exceptions/renderer/markdown.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,61 @@
|
||||
<div
|
||||
class="relative text-neutral-400 dark:text-neutral-400"
|
||||
x-data="{ spotlight: { x: 0, y: 0 } }"
|
||||
@mousemove="const rect = $el.getBoundingClientRect(); spotlight = { x: $event.clientX - rect.left, y: $event.clientY - rect.top }">
|
||||
<div
|
||||
class="absolute w-full text-neutral-800 dark:text-neutral-100"
|
||||
x-data="{ isDark: window.matchMedia('(prefers-color-scheme: dark)').matches || document.documentElement.classList.contains('dark') }"
|
||||
:style="
|
||||
'mask-image: radial-gradient(circle at ' +
|
||||
spotlight.x +
|
||||
'px ' +
|
||||
spotlight.y +
|
||||
'px, black 0%, transparent ' + (isDark ? '150px' : '120px') + '); -webkit-mask-image: radial-gradient(circle at ' +
|
||||
spotlight.x +
|
||||
'px ' +
|
||||
spotlight.y +
|
||||
'px, black 0%, transparent ' + (isDark ? '600px' : '400px') + ');'
|
||||
">
|
||||
<?php if (isset($component)) { $__componentOriginal2a45ee13943eadc15ee63d255f492356 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginal2a45ee13943eadc15ee63d255f492356 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.icons.laravel-ascii','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::icons.laravel-ascii'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes([]); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginal2a45ee13943eadc15ee63d255f492356)): ?>
|
||||
<?php $attributes = $__attributesOriginal2a45ee13943eadc15ee63d255f492356; ?>
|
||||
<?php unset($__attributesOriginal2a45ee13943eadc15ee63d255f492356); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginal2a45ee13943eadc15ee63d255f492356)): ?>
|
||||
<?php $component = $__componentOriginal2a45ee13943eadc15ee63d255f492356; ?>
|
||||
<?php unset($__componentOriginal2a45ee13943eadc15ee63d255f492356); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php if (isset($component)) { $__componentOriginal2a45ee13943eadc15ee63d255f492356 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginal2a45ee13943eadc15ee63d255f492356 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.icons.laravel-ascii','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::icons.laravel-ascii'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes([]); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginal2a45ee13943eadc15ee63d255f492356)): ?>
|
||||
<?php $attributes = $__attributesOriginal2a45ee13943eadc15ee63d255f492356; ?>
|
||||
<?php unset($__attributesOriginal2a45ee13943eadc15ee63d255f492356); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginal2a45ee13943eadc15ee63d255f492356)): ?>
|
||||
<?php $component = $__componentOriginal2a45ee13943eadc15ee63d255f492356; ?>
|
||||
<?php unset($__componentOriginal2a45ee13943eadc15ee63d255f492356); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/resources/exceptions/renderer/components/laravel-ascii-spotlight.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,4 @@
|
||||
<svg width="6" height="10" viewBox="0 0 6 10" fill="none" xmlns="http://www.w3.org/2000/svg" <?php echo e($attributes); ?>>
|
||||
<path d="M0.875 9.25L5.125 5L0.875 0.75" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/resources/exceptions/renderer/components/icons/chevron-right.blade.php ENDPATH**/ ?>
|
||||
|
After Width: | Height: | Size: 419 B |
@@ -0,0 +1,98 @@
|
||||
<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;
|
||||
|
||||
$__newAttributes = [];
|
||||
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames(([
|
||||
'code',
|
||||
'language',
|
||||
'editor' => false,
|
||||
'startingLine' => 1,
|
||||
'highlightedLine' => null,
|
||||
'truncate' => false,
|
||||
]));
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (in_array($__key, $__propNames)) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
} else {
|
||||
$__newAttributes[$__key] = $__value;
|
||||
}
|
||||
}
|
||||
|
||||
$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);
|
||||
|
||||
unset($__propNames);
|
||||
unset($__newAttributes);
|
||||
|
||||
foreach (array_filter(([
|
||||
'code',
|
||||
'language',
|
||||
'editor' => false,
|
||||
'startingLine' => 1,
|
||||
'highlightedLine' => null,
|
||||
'truncate' => false,
|
||||
]), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
}
|
||||
|
||||
$__defined_vars = get_defined_vars();
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (array_key_exists($__key, $__defined_vars)) unset($$__key);
|
||||
}
|
||||
|
||||
unset($__defined_vars, $__key, $__value); ?>
|
||||
|
||||
<?php
|
||||
$fallback = $truncate ? '<pre class="truncate"><code>' : '<pre><code>';
|
||||
|
||||
if ($editor) {
|
||||
$lines = explode("\n", $code);
|
||||
|
||||
foreach ($lines as $index => $line) {
|
||||
$lineNumber = $startingLine + $index;
|
||||
$highlight = $highlightedLine === $index;
|
||||
$lineClass = implode(' ', [
|
||||
'block px-4 py-1 h-7 even:bg-white odd:bg-white/2 even:dark:bg-white/2 odd:dark:bg-white/4',
|
||||
$highlight ? 'bg-rose-200! dark:bg-rose-900!' : '',
|
||||
]);
|
||||
$lineNumberClass = implode(' ', [
|
||||
'mr-6 text-neutral-500! dark:text-neutral-600!',
|
||||
$highlight ? 'dark:text-white!' : '',
|
||||
]);
|
||||
|
||||
$fallback .= '<span class="' . $lineClass . '">';
|
||||
$fallback .= '<span class="' . $lineNumberClass . '">' . $lineNumber . '</span>';
|
||||
$fallback .= htmlspecialchars($line);
|
||||
$fallback .= '</span>';
|
||||
}
|
||||
|
||||
} else {
|
||||
$fallback .= htmlspecialchars($code);
|
||||
}
|
||||
|
||||
$fallback .= '</code></pre>';
|
||||
?>
|
||||
|
||||
<div
|
||||
x-data="{ highlightedCode: null }"
|
||||
x-init="
|
||||
highlightedCode = window.highlight(
|
||||
<?php echo e(Illuminate\Support\Js::from($code)); ?>,
|
||||
<?php echo e(Illuminate\Support\Js::from($language)); ?>,
|
||||
<?php echo e(Illuminate\Support\Js::from($truncate)); ?>,
|
||||
<?php echo e(Illuminate\Support\Js::from($editor)); ?>,
|
||||
<?php echo e(Illuminate\Support\Js::from($startingLine)); ?>,
|
||||
<?php echo e(Illuminate\Support\Js::from($highlightedLine)); ?>
|
||||
|
||||
);
|
||||
"
|
||||
<?php echo e($attributes); ?>
|
||||
|
||||
>
|
||||
<div
|
||||
x-cloak
|
||||
x-html="highlightedCode"
|
||||
></div>
|
||||
<div x-show="!highlightedCode"><?php echo $fallback; ?></div>
|
||||
</div>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/resources/exceptions/renderer/components/syntax-highlight.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php $__env->startSection('title', __('Service Unavailable')); ?>
|
||||
<?php $__env->startSection('code', '503'); ?>
|
||||
<?php $__env->startSection('message', __('Service Unavailable')); ?>
|
||||
|
||||
<?php echo $__env->make('errors::minimal', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/503.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,170 @@
|
||||
<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;
|
||||
|
||||
$__newAttributes = [];
|
||||
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames((['frames']));
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (in_array($__key, $__propNames)) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
} else {
|
||||
$__newAttributes[$__key] = $__value;
|
||||
}
|
||||
}
|
||||
|
||||
$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);
|
||||
|
||||
unset($__propNames);
|
||||
unset($__newAttributes);
|
||||
|
||||
foreach (array_filter((['frames']), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
}
|
||||
|
||||
$__defined_vars = get_defined_vars();
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (array_key_exists($__key, $__defined_vars)) unset($$__key);
|
||||
}
|
||||
|
||||
unset($__defined_vars, $__key, $__value); ?>
|
||||
|
||||
<?php use \Illuminate\Support\Str; ?>
|
||||
|
||||
<div
|
||||
x-data="{ expanded: false }"
|
||||
class="group rounded-lg border border-neutral-200 dark:border-white/5"
|
||||
:class="{
|
||||
'bg-white dark:bg-white/5 shadow-xs': expanded,
|
||||
'border-dashed border-neutral-300 bg-neutral-50 opacity-90 dark:border-white/10 dark:bg-white/1': !expanded,
|
||||
}"
|
||||
>
|
||||
<div
|
||||
class="flex h-11 cursor-pointer items-center gap-3 rounded-lg pr-2.5 pl-4 hover:bg-white/50 dark:hover:bg-white/2"
|
||||
@click="expanded = !expanded"
|
||||
>
|
||||
<?php if (isset($component)) { $__componentOriginal6936650fa23142238a13a0689c4bfe24 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginal6936650fa23142238a13a0689c4bfe24 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.icons.folder','data' => ['class' => 'w-3 h-3 text-neutral-400','xShow' => '!expanded','xCloak' => true]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::icons.folder'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['class' => 'w-3 h-3 text-neutral-400','x-show' => '!expanded','x-cloak' => true]); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginal6936650fa23142238a13a0689c4bfe24)): ?>
|
||||
<?php $attributes = $__attributesOriginal6936650fa23142238a13a0689c4bfe24; ?>
|
||||
<?php unset($__attributesOriginal6936650fa23142238a13a0689c4bfe24); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginal6936650fa23142238a13a0689c4bfe24)): ?>
|
||||
<?php $component = $__componentOriginal6936650fa23142238a13a0689c4bfe24; ?>
|
||||
<?php unset($__componentOriginal6936650fa23142238a13a0689c4bfe24); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($component)) { $__componentOriginal94e6c9aa0eb2b7a85f88307a3371880e = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginal94e6c9aa0eb2b7a85f88307a3371880e = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.icons.folder-open','data' => ['class' => 'w-3 h-3 text-blue-500 dark:text-emerald-500','xShow' => 'expanded']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::icons.folder-open'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['class' => 'w-3 h-3 text-blue-500 dark:text-emerald-500','x-show' => 'expanded']); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginal94e6c9aa0eb2b7a85f88307a3371880e)): ?>
|
||||
<?php $attributes = $__attributesOriginal94e6c9aa0eb2b7a85f88307a3371880e; ?>
|
||||
<?php unset($__attributesOriginal94e6c9aa0eb2b7a85f88307a3371880e); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginal94e6c9aa0eb2b7a85f88307a3371880e)): ?>
|
||||
<?php $component = $__componentOriginal94e6c9aa0eb2b7a85f88307a3371880e; ?>
|
||||
<?php unset($__componentOriginal94e6c9aa0eb2b7a85f88307a3371880e); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="flex-1 font-mono text-xs leading-3 text-neutral-900 dark:text-neutral-400">
|
||||
<?php echo e(count($frames)); ?> vendor <?php echo e(Str::plural('frame', count($frames))); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<button
|
||||
x-cloak
|
||||
type="button"
|
||||
class="flex h-6 w-6 cursor-pointer items-center justify-center rounded-md dark:border dark:border-white/8 group-hover:text-blue-500 group-hover:dark:text-emerald-500"
|
||||
:class="{
|
||||
'text-blue-500 dark:text-emerald-500 dark:bg-white/5': expanded,
|
||||
'text-neutral-500 dark:text-neutral-500 dark:bg-white/3': !expanded,
|
||||
}"
|
||||
>
|
||||
<?php if (isset($component)) { $__componentOriginal4400c4a71d3ea90a0e0b846e7d689a28 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginal4400c4a71d3ea90a0e0b846e7d689a28 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.icons.chevrons-down-up','data' => ['xShow' => 'expanded']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::icons.chevrons-down-up'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['x-show' => 'expanded']); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginal4400c4a71d3ea90a0e0b846e7d689a28)): ?>
|
||||
<?php $attributes = $__attributesOriginal4400c4a71d3ea90a0e0b846e7d689a28; ?>
|
||||
<?php unset($__attributesOriginal4400c4a71d3ea90a0e0b846e7d689a28); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginal4400c4a71d3ea90a0e0b846e7d689a28)): ?>
|
||||
<?php $component = $__componentOriginal4400c4a71d3ea90a0e0b846e7d689a28; ?>
|
||||
<?php unset($__componentOriginal4400c4a71d3ea90a0e0b846e7d689a28); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($component)) { $__componentOriginal7348bb70f498d75e0a91acc6a707f136 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginal7348bb70f498d75e0a91acc6a707f136 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.icons.chevrons-up-down','data' => ['xShow' => '!expanded']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::icons.chevrons-up-down'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['x-show' => '!expanded']); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginal7348bb70f498d75e0a91acc6a707f136)): ?>
|
||||
<?php $attributes = $__attributesOriginal7348bb70f498d75e0a91acc6a707f136; ?>
|
||||
<?php unset($__attributesOriginal7348bb70f498d75e0a91acc6a707f136); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginal7348bb70f498d75e0a91acc6a707f136)): ?>
|
||||
<?php $component = $__componentOriginal7348bb70f498d75e0a91acc6a707f136; ?>
|
||||
<?php unset($__componentOriginal7348bb70f498d75e0a91acc6a707f136); ?>
|
||||
<?php endif; ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div x-cloak class="flex flex-col rounded-b-lg divide-y divide-neutral-200 border-t border-neutral-200 dark:divide-white/5 dark:border-white/5" x-show="expanded">
|
||||
<?php $__currentLoopData = $frames; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $frame): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<div class="flex flex-col divide-y divide-neutral-200 dark:divide-white/5">
|
||||
<?php if (isset($component)) { $__componentOriginal96f0b6f4219e16dc62468d91b0335b32 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginal96f0b6f4219e16dc62468d91b0335b32 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.vendor-frame','data' => ['frame' => $frame]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::vendor-frame'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['frame' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($frame)]); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginal96f0b6f4219e16dc62468d91b0335b32)): ?>
|
||||
<?php $attributes = $__attributesOriginal96f0b6f4219e16dc62468d91b0335b32; ?>
|
||||
<?php unset($__attributesOriginal96f0b6f4219e16dc62468d91b0335b32); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginal96f0b6f4219e16dc62468d91b0335b32)): ?>
|
||||
<?php $component = $__componentOriginal96f0b6f4219e16dc62468d91b0335b32; ?>
|
||||
<?php unset($__componentOriginal96f0b6f4219e16dc62468d91b0335b32); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/resources/exceptions/renderer/components/vendor-frames.blade.php ENDPATH**/ ?>
|
||||
@@ -21,7 +21,20 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Tipo Evento</label>
|
||||
<input type="text" name="tipo_evento" class="form-control" value="<?php echo e(old('tipo_evento', $evento->tipo_evento)); ?>" placeholder="es. Catechesi, Liturgia, Animazione">
|
||||
<select name="tipo_evento" class="form-control">
|
||||
<option value="">Seleziona tipo...</option>
|
||||
<?php $__currentLoopData = $tipologieEventi; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tipo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<option value="<?php echo e($tipo->nome); ?>" <?php echo e(old('tipo_evento', $evento->tipo_evento) === $tipo->nome ? 'selected' : ''); ?>>
|
||||
<?php echo e($tipo->descrizione ?: $tipo->nome); ?>
|
||||
|
||||
</option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
<?php if($evento->tipo_evento && !\App\Models\TipologiaEvento::where('nome', $evento->tipo_evento)->exists()): ?>
|
||||
<option value="<?php echo e($evento->tipo_evento); ?>" selected>
|
||||
<?php echo e($evento->tipo_evento); ?> (disattivato)
|
||||
</option>
|
||||
<?php endif; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Descrizione Completa</label>
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php $__env->startSection('title', __('Not Found')); ?>
|
||||
<?php $__env->startSection('code', '404'); ?>
|
||||
<?php $__env->startSection('message', __('Not Found')); ?>
|
||||
|
||||
<?php echo $__env->make('errors::minimal', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/404.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,131 @@
|
||||
<?php $__env->startSection('title', $message->subject ?: 'Email'); ?>
|
||||
<?php $__env->startSection('page_title', 'Visualizza Email'); ?>
|
||||
|
||||
<?php $__env->startSection('content'); ?>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="card card-primary">
|
||||
<div class="card-body p-0">
|
||||
<div class="list-group list-group-flush">
|
||||
<a href="<?php echo e(route('email.compose')); ?>" class="list-group-item list-group-item-action">
|
||||
<i class="fas fa-plus"></i> Nuova Email
|
||||
</a>
|
||||
<?php $__currentLoopData = $folders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $f): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<a href="<?php echo e(route('email.index', $f->type)); ?>"
|
||||
class="list-group-item list-group-item-action <?php echo e($folder === $f->type ? 'active' : ''); ?>">
|
||||
<i class="fas <?php echo e($f->icon); ?>"></i> <?php echo e($f->name); ?>
|
||||
|
||||
</a>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-9">
|
||||
<div class="card card-primary card-outline">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?php echo e($message->subject ?: '(senza oggetto)'); ?></h3>
|
||||
<div class="card-tools">
|
||||
<?php if($message->is_starred): ?>
|
||||
<button class="btn btn-xs btn-warning" onclick="toggleStar(<?php echo e($message->id); ?>)">
|
||||
<i class="fas fa-star"></i>
|
||||
</button>
|
||||
<?php else: ?>
|
||||
<button class="btn btn-xs btn-default" onclick="toggleStar(<?php echo e($message->id); ?>)">
|
||||
<i class="far fa-star"></i>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
<a href="<?php echo e(route('email.compose', ['reply_to' => $message->id])); ?>" class="btn btn-xs btn-default">
|
||||
<i class="fas fa-reply"></i> Rispondi
|
||||
</a>
|
||||
<a href="<?php echo e(route('email.compose', ['forward' => $message->id])); ?>" class="btn btn-xs btn-default">
|
||||
<i class="fas fa-forward"></i> Inoltra
|
||||
</a>
|
||||
<form method="POST" action="<?php echo e(route('email.destroy', $message->id)); ?>" class="d-inline">
|
||||
<?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
|
||||
<button type="submit" class="btn btn-xs btn-danger" onclick="return confirm('Sposta nel cestino?')">
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="mailbox-read-info">
|
||||
<h6>
|
||||
<strong>Da:</strong> <?php echo e($message->from_name); ?> <<?php echo e($message->from_email); ?>>
|
||||
<span class="mailbox-read-time float-right">
|
||||
<?php if($message->received_at): ?>
|
||||
<?php echo e($message->received_at->format('d/m/Y H:i')); ?>
|
||||
|
||||
<?php elseif($message->sent_at): ?>
|
||||
<?php echo e($message->sent_at->format('d/m/Y H:i')); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
</span>
|
||||
</h6>
|
||||
<h6>
|
||||
<strong>A:</strong> <?php echo e($message->to_email); ?>
|
||||
|
||||
<?php if($message->cc): ?>
|
||||
<br><strong>CC:</strong> <?php echo e($message->cc); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
</h6>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="mailbox-read-message">
|
||||
<?php echo $message->body_for_display; ?>
|
||||
|
||||
</div>
|
||||
<?php if($message->attachments->count() > 0): ?>
|
||||
<hr>
|
||||
<div class="mailbox-attachments">
|
||||
<h4>Allegati:</h4>
|
||||
<ul class="mailbox-attachments-links">
|
||||
<?php $__currentLoopData = $message->attachments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $attachment): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<li>
|
||||
<span class="mailbox-attachment-icon">
|
||||
<i class="fas <?php echo e($attachment->icon); ?>"></i>
|
||||
</span>
|
||||
<div class="mailbox-attachment-info">
|
||||
<a href="<?php echo e(route('email.attachment.download', $attachment->id)); ?>" class="mailbox-attachment-name">
|
||||
<i class="fas fa-paperclip"></i> <?php echo e($attachment->filename); ?>
|
||||
|
||||
</a>
|
||||
<span class="mailbox-attachment-size">
|
||||
<?php echo e(number_format($attachment->size / 1024, 1)); ?> KB
|
||||
</span>
|
||||
<?php if(!$attachment->is_saved_to_documenti): ?>
|
||||
<form method="POST" action="<?php echo e(route('email.attachment.save', [$message->id, $attachment->id])); ?>" class="d-inline">
|
||||
<?php echo csrf_field(); ?>
|
||||
<button type="submit" class="btn btn-xs btn-success" onclick="return confirm('Salvare allegato nei documenti?')">
|
||||
<i class="fas fa-save"></i> Salva in Documenti
|
||||
</button>
|
||||
</form>
|
||||
<?php else: ?>
|
||||
<span class="badge badge-success"><i class="fas fa-check"></i> Salvato</span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</li>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php $__env->startSection('scripts'); ?>
|
||||
<script>
|
||||
function toggleStar(id) {
|
||||
fetch('/email/' + id + '/star', {
|
||||
method: 'POST',
|
||||
headers: { 'X-CSRF-TOKEN': '<?php echo e(csrf_token()); ?>' }
|
||||
}).then(() => location.reload());
|
||||
}
|
||||
</script>
|
||||
<?php $__env->stopSection(); ?>
|
||||
<?php echo $__env->make('layouts.adminlte', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/glastree/resources/views/email/show.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php $__env->startSection('title', 'Nuova Mailing List'); ?>
|
||||
<?php $__env->startSection('page_title', 'Nuova Mailing List'); ?>
|
||||
|
||||
<?php $__env->startSection('content'); ?>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><i class="fas fa-plus mr-2"></i>Crea Mailing List</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="<?php echo e(route('mailing-liste.store')); ?>" method="POST">
|
||||
<?php echo csrf_field(); ?>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>Nome *</label>
|
||||
<input type="text" name="nome" class="form-control" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-checkbox mt-4">
|
||||
<input type="checkbox" class="custom-control-input" id="attiva" name="attiva" value="1" checked>
|
||||
<label class="custom-control-label" for="attiva">Lista attiva</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Descrizione</label>
|
||||
<textarea name="descrizione" class="form-control" rows="2"></textarea>
|
||||
</div>
|
||||
<div class="alert alert-info">
|
||||
<i class="fas fa-info-circle mr-1"></i>
|
||||
<strong>Come aggiungere contatti:</strong> vai su <em>Individui</em>, seleziona le righe desired, e usa il menu <em>Azioni > Crea Mailing List</em> per creare una lista dai contatti selezionati.
|
||||
</div>
|
||||
<button type="submit" class="btn btn-success">
|
||||
<i class="fas fa-save mr-1"></i> Salva Lista
|
||||
</button>
|
||||
<a href="<?php echo e(route('mailing-liste.index')); ?>" class="btn btn-secondary">Annulla</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php $__env->stopSection(); ?>
|
||||
<?php echo $__env->make('layouts.adminlte', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/glastree/resources/views/mailing-liste/create.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php if($paginator->hasPages()): ?>
|
||||
<nav>
|
||||
<ul class="pagination">
|
||||
|
||||
<?php if($paginator->onFirstPage()): ?>
|
||||
<li class="page-item disabled" aria-disabled="true" aria-label="<?php echo app('translator')->get('pagination.previous'); ?>">
|
||||
<span class="page-link" aria-hidden="true">‹</span>
|
||||
</li>
|
||||
<?php else: ?>
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="<?php echo e($paginator->previousPageUrl()); ?>" rel="prev" aria-label="<?php echo app('translator')->get('pagination.previous'); ?>">‹</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php $__currentLoopData = $elements; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $element): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
|
||||
<?php if(is_string($element)): ?>
|
||||
<li class="page-item disabled" aria-disabled="true"><span class="page-link"><?php echo e($element); ?></span></li>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php if(is_array($element)): ?>
|
||||
<?php $__currentLoopData = $element; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $page => $url): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<?php if($page == $paginator->currentPage()): ?>
|
||||
<li class="page-item active" aria-current="page"><span class="page-link"><?php echo e($page); ?></span></li>
|
||||
<?php else: ?>
|
||||
<li class="page-item"><a class="page-link" href="<?php echo e($url); ?>"><?php echo e($page); ?></a></li>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
|
||||
|
||||
<?php if($paginator->hasMorePages()): ?>
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="<?php echo e($paginator->nextPageUrl()); ?>" rel="next" aria-label="<?php echo app('translator')->get('pagination.next'); ?>">›</a>
|
||||
</li>
|
||||
<?php else: ?>
|
||||
<li class="page-item disabled" aria-disabled="true" aria-label="<?php echo app('translator')->get('pagination.next'); ?>">
|
||||
<span class="page-link" aria-hidden="true">›</span>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Pagination/resources/views/bootstrap-4.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,350 @@
|
||||
<?php $__env->startSection('title', 'Email - ' . ucfirst($folder)); ?>
|
||||
<?php $__env->startSection('page_title', 'Email'); ?>
|
||||
|
||||
<?php
|
||||
$currentFolder = $folders->firstWhere('type', $folder);
|
||||
?>
|
||||
|
||||
<?php $__env->startSection('content'); ?>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><i class="fas fa-envelope mr-2"></i>Email</h3>
|
||||
<div class="card-tools">
|
||||
<div class="btn-group mr-2">
|
||||
<?php $__currentLoopData = $folders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $f): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<a href="<?php echo e(route('email.index', $f->type)); ?>"
|
||||
class="btn btn-xs <?php echo e($folder === $f->type ? 'btn-primary' : 'btn-default'); ?>">
|
||||
<i class="fas <?php echo e($f->icon); ?>"></i>
|
||||
<?php echo e($f->name); ?>
|
||||
|
||||
<?php if($f->type === 'inbox' && $messages->where('is_read', false)->count() > 0): ?>
|
||||
<span class="badge badge-light"><?php echo e($messages->where('is_read', false)->count()); ?></span>
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</div>
|
||||
<a href="<?php echo e(route('email.compose')); ?>" class="btn btn-success btn-xs">
|
||||
<i class="fas fa-plus"></i> Nuova Email
|
||||
</a>
|
||||
<button class="btn btn-primary btn-xs" onclick="syncEmails()" id="syncBtn">
|
||||
<i class="fas fa-sync"></i> Ricevi/Invia
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
<div class="card-header pb-0">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-md-6">
|
||||
<div class="form-inline">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input" id="selectAll" onchange="toggleAll(this)">
|
||||
<label class="custom-control-label" for="selectAll">Seleziona tutto</label>
|
||||
</div>
|
||||
<span class="ml-3 text-muted" id="selectedCount">0 selezionati</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="input-group input-group-sm float-right" style="width: 220px;">
|
||||
<select class="form-control" id="bulkAction">
|
||||
<option value="">Azioni di massa...</option>
|
||||
<?php if($folder !== 'trash'): ?>
|
||||
<option value="mark_read">Marca come letto</option>
|
||||
<option value="mark_unread">Marca come non letto</option>
|
||||
<option value="star">Aggiungi a preferiti</option>
|
||||
<option value="unstar">Rimuovi da preferiti</option>
|
||||
<option value="move_trash">Sposta nel cestino</option>
|
||||
<?php else: ?>
|
||||
<option value="empty_trash">Svuota cestino</option>
|
||||
<?php endif; ?>
|
||||
</select>
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-secondary" type="button" onclick="executeBulkAction()">Applica</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 30px;"></th>
|
||||
<th style="width: 30px;"></th>
|
||||
<th style="width: 150px;">
|
||||
<?php $sort = request('sort'); $dir = request('direction'); ?>
|
||||
<?php if($folder === 'sent' || $folder === 'inviate'): ?>
|
||||
<a href="<?php echo e(request()->fullUrlWithQuery(['sort' => 'to_email', 'direction' => $sort === 'to_email' && $dir === 'asc' ? 'desc' : 'asc'])); ?>" class="text-dark text-decoration-none">
|
||||
Destinatario <?php echo $sort === 'to_email' ? ($dir === 'asc' ? '▲' : '▼') : ''; ?>
|
||||
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<a href="<?php echo e(request()->fullUrlWithQuery(['sort' => 'from_email', 'direction' => $sort === 'from_email' && $dir === 'asc' ? 'desc' : 'asc'])); ?>" class="text-dark text-decoration-none">
|
||||
Mittente <?php echo $sort === 'from_email' ? ($dir === 'asc' ? '▲' : '▼') : ''; ?>
|
||||
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</th>
|
||||
<th>
|
||||
<a href="<?php echo e(request()->fullUrlWithQuery(['sort' => 'subject', 'direction' => $sort === 'subject' && $dir === 'asc' ? 'desc' : 'asc'])); ?>" class="text-dark text-decoration-none">
|
||||
Oggetto <?php echo $sort === 'subject' ? ($dir === 'asc' ? '▲' : '▼') : ''; ?>
|
||||
|
||||
</a>
|
||||
</th>
|
||||
<th style="width: 120px;">
|
||||
<a href="<?php echo e(request()->fullUrlWithQuery(['sort' => 'received_at', 'direction' => $sort === 'received_at' && $dir === 'asc' ? 'desc' : 'asc'])); ?>" class="text-dark text-decoration-none">
|
||||
Data <?php echo $sort === 'received_at' ? ($dir === 'asc' ? '▲' : '▼') : ''; ?>
|
||||
|
||||
</a>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $__empty_1 = true; $__currentLoopData = $messages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $message): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
|
||||
<tr class="<?php echo e($message->is_read ? '' : 'font-weight-bold'); ?>">
|
||||
<td style="width: 30px;" onclick="event.stopPropagation()">
|
||||
<input type="checkbox" class="email-checkbox" value="<?php echo e($message->id); ?>" onchange="updateCount()">
|
||||
</td>
|
||||
<td style="width: 30px;" onclick="event.stopPropagation(); window.location='<?php echo e(route('email.show', [$folder, $message->id])); ?>'">
|
||||
<?php if($message->is_starred): ?>
|
||||
<i class="fas fa-star text-warning"></i>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td onclick="window.location='<?php echo e(route('email.show', [$folder, $message->id])); ?>'">
|
||||
<?php echo e($message->is_sent ? 'A: ' . $message->to_email : ($message->from_name ?: $message->from_email)); ?>
|
||||
|
||||
</td>
|
||||
<td onclick="window.location='<?php echo e(route('email.show', [$folder, $message->id])); ?>'">
|
||||
<?php echo e($message->subject ?? '(senza oggetto)'); ?>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<?php if($message->received_at): ?>
|
||||
<?php echo e($message->received_at->format('d/m/Y')); ?>
|
||||
|
||||
<?php elseif($message->sent_at): ?>
|
||||
<?php echo e($message->sent_at->format('d/m/Y')); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
|
||||
<tr>
|
||||
<td colspan="5" class="text-center text-muted py-4">
|
||||
<i class="fas fa-inbox fa-2x mb-2"></i>
|
||||
<p>Nessuna email</p>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<?php echo e($messages->withQueryString()->links('vendor.pagination.simple-bootstrap-4')); ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php $__env->startPush('styles'); ?>
|
||||
<style>
|
||||
/* Bootstrap 4 Pagination override */
|
||||
.pagination {
|
||||
display: flex !important;
|
||||
padding-left: 0;
|
||||
list-style: none;
|
||||
border-radius: 0.25rem;
|
||||
margin: 0;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.page-item {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.page-link {
|
||||
position: relative;
|
||||
display: block;
|
||||
padding: 0.5rem 0.75rem;
|
||||
margin-left: -1px;
|
||||
line-height: 1.25;
|
||||
color: #007bff;
|
||||
background-color: #fff;
|
||||
border: 1px solid #dee2e6;
|
||||
text-decoration: none;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.page-item.active .page-link {
|
||||
z-index: 3;
|
||||
color: #fff;
|
||||
background-color: #007bff;
|
||||
border-color: #007bff;
|
||||
}
|
||||
|
||||
.page-item.disabled .page-link {
|
||||
color: #6c757d;
|
||||
pointer-events: none;
|
||||
background-color: #fff;
|
||||
border-color: #dee2e6;
|
||||
}
|
||||
|
||||
.page-link:hover {
|
||||
color: #0056b3;
|
||||
background-color: #e9ecef;
|
||||
border-color: #dee2e6;
|
||||
}
|
||||
|
||||
/* Icons as text characters */
|
||||
.pagination .page-link::before,
|
||||
.pagination .page-link::after {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<?php $__env->stopPush(); ?>
|
||||
|
||||
<?php if($syncInterval > 0 && $folder === 'inbox'): ?>
|
||||
<?php $__env->startPush('scripts'); ?>
|
||||
<script>
|
||||
let syncInterval = <?php echo e($syncInterval * 60 * 1000); ?>;
|
||||
let syncTimeout;
|
||||
|
||||
function autoSync() {
|
||||
fetch('<?php echo e(url('email/sync/quick')); ?>', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': '<?php echo e(csrf_token()); ?>',
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
}).then(() => {
|
||||
console.log('Auto sync completed');
|
||||
}).catch(() => {
|
||||
console.log('Auto sync failed');
|
||||
});
|
||||
}
|
||||
|
||||
function startAutoSync() {
|
||||
if (syncInterval > 0) {
|
||||
syncTimeout = setInterval(autoSync, syncInterval);
|
||||
}
|
||||
}
|
||||
|
||||
function stopAutoSync() {
|
||||
if (syncTimeout) {
|
||||
clearInterval(syncTimeout);
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
startAutoSync();
|
||||
|
||||
document.addEventListener('visibilitychange', function() {
|
||||
if (document.hidden) {
|
||||
stopAutoSync();
|
||||
} else {
|
||||
startAutoSync();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php $__env->stopPush(); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $__env->startSection('scripts'); ?>
|
||||
<script>
|
||||
function toggleAll(checkbox) {
|
||||
const checkboxes = document.querySelectorAll('.email-checkbox');
|
||||
checkboxes.forEach(function(cb) {
|
||||
cb.checked = checkbox.checked;
|
||||
});
|
||||
updateCount();
|
||||
}
|
||||
|
||||
function updateCount() {
|
||||
const checkboxes = document.querySelectorAll('.email-checkbox:checked');
|
||||
document.getElementById('selectedCount').textContent = checkboxes.length + ' selezionati';
|
||||
}
|
||||
|
||||
function executeBulkAction() {
|
||||
const select = document.getElementById('bulkAction');
|
||||
const action = select.value;
|
||||
if (!action) {
|
||||
alert('Seleziona un\'azione');
|
||||
return;
|
||||
}
|
||||
|
||||
if (action === 'empty_trash') {
|
||||
if (!confirm('Sei sicuro di voler svuotare il cestino? Questa azione non è reversibile.')) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
const checkboxes = document.querySelectorAll('.email-checkbox:checked');
|
||||
if (action !== 'empty_trash' && checkboxes.length === 0) {
|
||||
alert('Seleziona almeno una email');
|
||||
return;
|
||||
}
|
||||
|
||||
let ids = [];
|
||||
if (action !== 'empty_trash') {
|
||||
ids = Array.from(checkboxes).map(function(cb) {
|
||||
return cb.value;
|
||||
});
|
||||
}
|
||||
|
||||
fetch('<?php echo e(route('email.bulk')); ?>', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': '<?php echo e(csrf_token()); ?>',
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({ ids: ids, action: action })
|
||||
}).then(function(response) {
|
||||
return response.json();
|
||||
}).then(function(data) {
|
||||
if (data.success) {
|
||||
// Reset checkboxes before reload to avoid ghost selection
|
||||
document.querySelectorAll('.email-checkbox').forEach(function(cb) {
|
||||
cb.checked = false;
|
||||
});
|
||||
document.getElementById('selectAll').checked = false;
|
||||
updateCount();
|
||||
window.location.href = window.location.href;
|
||||
} else {
|
||||
alert(data.message || 'Errore');
|
||||
}
|
||||
}).catch(function() {
|
||||
alert('Errore');
|
||||
});
|
||||
}
|
||||
|
||||
function syncEmails() {
|
||||
const btn = document.getElementById('syncBtn');
|
||||
btn.disabled = true;
|
||||
btn.innerHTML = '<i class="fas fa-spinner fa-spin"></i> Sincronizzazione...';
|
||||
|
||||
fetch('<?php echo e(url('email/sync/quick')); ?>', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': '<?php echo e(csrf_token()); ?>',
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
}).then(function(response) {
|
||||
return response.json();
|
||||
}).then(function(data) {
|
||||
if (data.success) {
|
||||
location.reload();
|
||||
} else {
|
||||
alert(data.message || 'Errore durante la sincronizzazione');
|
||||
btn.disabled = false;
|
||||
btn.innerHTML = '<i class="fas fa-sync"></i> Ricevi/Invia';
|
||||
}
|
||||
}).catch(function(error) {
|
||||
alert('Errore di connessione');
|
||||
btn.disabled = false;
|
||||
btn.innerHTML = '<i class="fas fa-sync"></i> Ricevi/Invia';
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<?php $__env->stopSection(); ?>
|
||||
<?php echo $__env->make('layouts.adminlte', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/glastree/resources/views/email/index.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,438 @@
|
||||
<?php $__env->startSection('title', 'Gruppi'); ?>
|
||||
<?php $__env->startSection('page_title', 'Elenco Gruppi'); ?>
|
||||
|
||||
<?php
|
||||
$canWriteGruppi = Auth::user()->canManage('gruppi');
|
||||
$canDeleteGruppi = Auth::user()->canDelete('gruppi');
|
||||
$columnLabels = [
|
||||
'nome' => 'Nome',
|
||||
'descrizione' => 'Descrizione',
|
||||
'diocesi' => 'Diocesi',
|
||||
'livello' => 'Livello',
|
||||
'padre' => 'Gruppo Padre',
|
||||
'membri' => 'Membri',
|
||||
'responsabili' => 'Responsabili',
|
||||
'indirizzo' => 'Indirizzo',
|
||||
'citta' => 'Città',
|
||||
'telefono' => 'Telefono',
|
||||
'email' => 'Email',
|
||||
];
|
||||
$vistaDefaultJson = $vista ? $vista->toJson() : 'null';
|
||||
$allColumnsJson = json_encode($allColumns);
|
||||
$visibleColumnsJson = json_encode($visibleColumns);
|
||||
?>
|
||||
|
||||
<?php $__env->startSection('content'); ?>
|
||||
|
||||
<?php if(session('success')): ?>
|
||||
<div class="alert alert-success alert-dismissible">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<?php echo e(session('success')); ?>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if(session('error')): ?>
|
||||
<div class="alert alert-danger alert-dismissible">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<?php echo e(session('error')); ?>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><i class="fas fa-sitemap mr-2"></i>Elenco Gruppi</h3>
|
||||
<div class="card-tools">
|
||||
<div class="btn-group mr-2">
|
||||
<button type="button" class="btn btn-sm btn-outline-primary <?php echo e($viewMode === 'table' ? 'active' : ''); ?>" onclick="switchView('table')" id="btn-table-view">
|
||||
<i class="fas fa-table mr-1"></i> Tabella
|
||||
</button>
|
||||
<button type="button" class="btn btn-sm btn-outline-primary <?php echo e($viewMode === 'tree' ? 'active' : ''); ?>" onclick="switchView('tree')" id="btn-tree-view">
|
||||
<i class="fas fa-sitemap mr-1"></i> Albero
|
||||
</button>
|
||||
</div>
|
||||
<button type="button" class="btn btn-primary btn-sm mr-1" onclick="showSaveVistaModal()">
|
||||
<i class="fas fa-save mr-1"></i> Salva Vista
|
||||
</button>
|
||||
<?php if($canWriteGruppi): ?>
|
||||
<a href="<?php echo e(route('gruppi.create')); ?>" class="btn btn-success btn-sm">
|
||||
<i class="fas fa-plus"></i> Nuovo Gruppo
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if($viewMode === 'table'): ?>
|
||||
<div class="card-body p-0">
|
||||
<table class="table table-bordered table-hover table-striped mb-0" id="gruppi-table">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<?php if(in_array('nome', $visibleColumns)): ?>
|
||||
<th data-sortable="true" onclick="sortTable('nome')" style="cursor:pointer;">Nome <i class="fas fa-sort float-right text-muted"></i></th>
|
||||
<?php endif; ?>
|
||||
<?php if(in_array('descrizione', $visibleColumns)): ?>
|
||||
<th data-sortable="true" onclick="sortTable('descrizione')" style="cursor:pointer;">Descrizione <i class="fas fa-sort float-right text-muted"></i></th>
|
||||
<?php endif; ?>
|
||||
<?php if(in_array('diocesi', $visibleColumns)): ?>
|
||||
<th>Diocesi</th>
|
||||
<?php endif; ?>
|
||||
<?php if(in_array('livello', $visibleColumns)): ?>
|
||||
<th style="width: 80px;">Livello</th>
|
||||
<?php endif; ?>
|
||||
<?php if(in_array('padre', $visibleColumns)): ?>
|
||||
<th>Gruppo Padre</th>
|
||||
<?php endif; ?>
|
||||
<?php if(in_array('membri', $visibleColumns)): ?>
|
||||
<th style="width: 100px;">Membri</th>
|
||||
<?php endif; ?>
|
||||
<?php if(in_array('responsabili', $visibleColumns)): ?>
|
||||
<th>Responsabili</th>
|
||||
<?php endif; ?>
|
||||
<?php if(in_array('indirizzo', $visibleColumns)): ?>
|
||||
<th>Indirizzo</th>
|
||||
<?php endif; ?>
|
||||
<?php if(in_array('citta', $visibleColumns)): ?>
|
||||
<th>Città</th>
|
||||
<?php endif; ?>
|
||||
<?php if(in_array('telefono', $visibleColumns)): ?>
|
||||
<th>Telefono</th>
|
||||
<?php endif; ?>
|
||||
<?php if(in_array('email', $visibleColumns)): ?>
|
||||
<th>Email</th>
|
||||
<?php endif; ?>
|
||||
<th style="width: 120px;">Azioni</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="table-body">
|
||||
<?php $__currentLoopData = $gruppi; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $gruppo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<tr data-id="<?php echo e($gruppo->id); ?>">
|
||||
<?php if(in_array('nome', $visibleColumns)): ?>
|
||||
<td>
|
||||
<span style="padding-left: <?php echo e(($gruppo->depth ?? 0) * 20); ?>px;">
|
||||
<i class="fas fa-<?php echo e($gruppo->children->count() > 0 ? 'folder' : 'folder-open'); ?> text-<?php echo e(($gruppo->depth ?? 0) == 0 ? 'warning' : 'secondary'); ?> mr-1"></i>
|
||||
<a href="<?php echo e(route('gruppi.show', $gruppo->id)); ?>"><?php echo e($gruppo->nome); ?></a>
|
||||
</span>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
<?php if(in_array('descrizione', $visibleColumns)): ?>
|
||||
<td><?php echo e(Str::limit($gruppo->descrizione, 50) ?: '-'); ?></td>
|
||||
<?php endif; ?>
|
||||
<?php if(in_array('diocesi', $visibleColumns)): ?>
|
||||
<td><?php echo e($gruppo->diocesi?->nome ?? '-'); ?></td>
|
||||
<?php endif; ?>
|
||||
<?php if(in_array('livello', $visibleColumns)): ?>
|
||||
<td><span class="badge badge-<?php echo e(($gruppo->depth ?? 0) == 0 ? 'primary' : 'secondary'); ?>"><?php echo e($gruppo->depth ?? 0); ?></span></td>
|
||||
<?php endif; ?>
|
||||
<?php if(in_array('padre', $visibleColumns)): ?>
|
||||
<td><?php echo e($gruppo->parent?->nome ?? '-'); ?></td>
|
||||
<?php endif; ?>
|
||||
<?php if(in_array('membri', $visibleColumns)): ?>
|
||||
<td><span class="badge badge-info"><?php echo e($gruppo->individui->count()); ?></span></td>
|
||||
<?php endif; ?>
|
||||
<?php if(in_array('responsabili', $visibleColumns)): ?>
|
||||
<td>
|
||||
<?php $resp = $gruppo->getResponsabili() ?>
|
||||
<?php if($resp->count() > 0): ?>
|
||||
<?php echo e($resp->pluck('cognome')->implode(', ')); ?>
|
||||
|
||||
<?php else: ?>
|
||||
-
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
<?php if(in_array('indirizzo', $visibleColumns)): ?>
|
||||
<td><?php echo e($gruppo->indirizzo_incontro ?: '-'); ?></td>
|
||||
<?php endif; ?>
|
||||
<?php if(in_array('citta', $visibleColumns)): ?>
|
||||
<td><?php echo e($gruppo->città_incontro ?: '-'); ?></td>
|
||||
<?php endif; ?>
|
||||
<?php if(in_array('telefono', $visibleColumns)): ?>
|
||||
<td>-</td>
|
||||
<?php endif; ?>
|
||||
<?php if(in_array('email', $visibleColumns)): ?>
|
||||
<td>-</td>
|
||||
<?php endif; ?>
|
||||
<td>
|
||||
<a href="<?php echo e(route('gruppi.show', $gruppo->id)); ?>" class="btn btn-xs btn-info" title="Visualizza">
|
||||
<i class="fas fa-eye"></i>
|
||||
</a>
|
||||
<?php if($canWriteGruppi): ?>
|
||||
<a href="<?php echo e(url('/gruppi/' . $gruppo->id . '/edit')); ?>" class="btn btn-xs btn-warning" title="Modifica">
|
||||
<i class="fas fa-edit"></i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php if($canDeleteGruppi): ?>
|
||||
<form action="<?php echo e(url('/gruppi/' . $gruppo->id)); ?>" method="POST" class="d-inline">
|
||||
<?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
|
||||
<button type="submit" class="btn btn-xs btn-danger" onclick="return confirm('Confermi l\'eliminazione?')" title="Elimina">
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="card-body p-0">
|
||||
<div class="tree-view" style="padding: 15px;">
|
||||
<?php $rootGruppi = $gruppi->filter(fn($g) => $g->parent_id === null) ?>
|
||||
<?php $__empty_1 = true; $__currentLoopData = $rootGruppi; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $gruppo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
|
||||
<?php echo $__env->make('gruppi.partials.tree-item', ['gruppo' => $gruppo, 'isRoot' => true], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
|
||||
<div class="text-center text-muted py-4">
|
||||
<i class="fas fa-folder-open fa-2x mb-2"></i>
|
||||
<p>Nessun gruppo presente.
|
||||
<?php if($canWriteGruppi): ?>
|
||||
<a href="<?php echo e(route('gruppi.create')); ?>">Crea il primo gruppo</a>
|
||||
<?php endif; ?>
|
||||
</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="saveVistaModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><i class="fas fa-save mr-2"></i>Salva Vista</h5>
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label>Nome Vista *</label>
|
||||
<input type="text" id="vista-nome" class="form-control" placeholder="Es. Elenco gruppi attivi">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Colonne visibili</label>
|
||||
<div class="row" id="colonne-checkboxes">
|
||||
<?php $__currentLoopData = $allColumns; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $col): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<div class="col-md-4 mb-2">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input col-checkbox" id="col-<?php echo e($col); ?>" value="<?php echo e($col); ?>" <?php echo e(in_array($col, $visibleColumns) ? 'checked' : ''); ?>>
|
||||
<label class="custom-control-label" for="col-<?php echo e($col); ?>"><?php echo e($columnLabels[$col] ?? $col); ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input" id="vista-default">
|
||||
<label class="custom-control-label" for="vista-default">Imposta come vista predefinita</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Annulla</button>
|
||||
<button type="button" class="btn btn-primary" onclick="saveVista()">
|
||||
<i class="fas fa-save mr-1"></i> Salva
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="vistaListModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><i class="fas fa-bookmark mr-2"></i>Viste Salvate</h5>
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php
|
||||
$visteSalvate = \App\Models\VistaReport::where('user_id', Auth::id())
|
||||
->where('tipo', 'gruppi')
|
||||
->orderBy('is_default', 'desc')
|
||||
->orderBy('nome')
|
||||
->get();
|
||||
?>
|
||||
<?php if($visteSalvate->count() > 0): ?>
|
||||
<div class="list-group">
|
||||
<?php $__currentLoopData = $visteSalvate; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $v): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<div class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<a href="?vista_id=<?php echo e($v->id); ?>"><?php echo e($v->nome); ?></a>
|
||||
<?php if($v->is_default): ?>
|
||||
<span class="badge badge-success ml-1">Predefinita</span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<form action="<?php echo e(route('gruppi.delete-vista', $v->id)); ?>" method="POST" class="d-inline">
|
||||
<?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
|
||||
<button type="submit" class="btn btn-xs btn-danger" onclick="return confirm('Eliminare questa vista?')">
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<p class="text-muted text-center">Nessuna vista salvata</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php $__env->startSection('scripts'); ?>
|
||||
<script>
|
||||
function switchView(mode) {
|
||||
window.location.href = '?view=' + mode;
|
||||
}
|
||||
|
||||
function toggleItem(id) {
|
||||
const el = document.getElementById('group-' + id);
|
||||
const icon = document.getElementById('icon-' + id);
|
||||
if (el.style.display === 'none') {
|
||||
el.style.display = 'block';
|
||||
icon.classList.remove('fa-chevron-right');
|
||||
icon.classList.add('fa-chevron-down');
|
||||
} else {
|
||||
el.style.display = 'none';
|
||||
icon.classList.remove('fa-chevron-down');
|
||||
icon.classList.add('fa-chevron-right');
|
||||
}
|
||||
}
|
||||
|
||||
function toggleAllGroups() {
|
||||
const collapsed = document.querySelectorAll('.tree-children[style*="display: none"]').length > 0;
|
||||
document.querySelectorAll('.tree-children').forEach(el => {
|
||||
el.style.display = collapsed ? 'block' : 'none';
|
||||
});
|
||||
document.querySelectorAll('.tree-toggle i').forEach(icon => {
|
||||
if (collapsed) {
|
||||
icon.classList.remove('fa-chevron-right');
|
||||
icon.classList.add('fa-chevron-down');
|
||||
} else {
|
||||
icon.classList.remove('fa-chevron-down');
|
||||
icon.classList.add('fa-chevron-right');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
let sortDirection = {};
|
||||
|
||||
function sortTable(column) {
|
||||
const tbody = document.getElementById('table-body');
|
||||
const rows = Array.from(tbody.querySelectorAll('tr'));
|
||||
|
||||
sortDirection[column] = sortDirection[column] === 'asc' ? 'desc' : 'asc';
|
||||
const dir = sortDirection[column];
|
||||
|
||||
rows.sort(function(a, b) {
|
||||
const cellA = a.querySelector(`td:nth-child(${getColumnIndex(column)})`)?.textContent.trim() || '';
|
||||
const cellB = b.querySelector(`td:nth-child(${getColumnIndex(column)})`)?.textContent.trim() || '';
|
||||
|
||||
if (dir === 'asc') {
|
||||
return cellA.localeCompare(cellB, 'it');
|
||||
}
|
||||
return cellB.localeCompare(cellA, 'it');
|
||||
});
|
||||
|
||||
rows.forEach(row => tbody.appendChild(row));
|
||||
|
||||
document.querySelectorAll('th i.fa-sort').forEach(icon => {
|
||||
icon.className = 'fas fa-sort float-right text-muted';
|
||||
});
|
||||
const th = document.querySelector(`th[data-sortable][onclick="sortTable('${column}')"] i`);
|
||||
if (th) {
|
||||
th.className = `fas fa-sort-${dir === 'asc' ? 'up' : 'down'} float-right`;
|
||||
}
|
||||
}
|
||||
|
||||
function getColumnIndex(column) {
|
||||
const th = document.querySelector(`th[onclick="sortTable('${column}')"]`);
|
||||
if (th) {
|
||||
return Array.from(th.parentNode.children).indexOf(th) + 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
function showSaveVistaModal() {
|
||||
document.getElementById('vista-nome').value = '';
|
||||
document.getElementById('vista-default').checked = false;
|
||||
$('#saveVistaModal').modal('show');
|
||||
}
|
||||
|
||||
function saveVista() {
|
||||
const nome = document.getElementById('vista-nome').value.trim();
|
||||
if (!nome) {
|
||||
alert('Inserisci un nome per la vista');
|
||||
return;
|
||||
}
|
||||
|
||||
const colonneVisibili = Array.from(document.querySelectorAll('.col-checkbox:checked')).map(cb => cb.value);
|
||||
const isDefault = document.getElementById('vista-default').checked;
|
||||
|
||||
fetch('/gruppi/save-vista', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': document.querySelector('meta[name="csrf-token"]').content,
|
||||
'Content-Type': 'application/json',
|
||||
'Accept': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({
|
||||
nome: nome,
|
||||
colonne_visibili: colonneVisibili,
|
||||
is_default: isDefault,
|
||||
})
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data.success) {
|
||||
$('#saveVistaModal').modal('hide');
|
||||
window.location.reload();
|
||||
} else {
|
||||
alert('Errore nel salvataggio della vista');
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
alert('Errore: ' + error.message);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.tree-item { margin-bottom: 5px; }
|
||||
.tree-children {
|
||||
margin-left: 25px;
|
||||
border-left: 1px dashed #dee2e6;
|
||||
padding-left: 10px;
|
||||
}
|
||||
.tree-toggle {
|
||||
cursor: pointer;
|
||||
padding: 3px 8px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.tree-toggle:hover {
|
||||
background-color: #f8f9fa;
|
||||
}
|
||||
.tree-label {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
.badge-level {
|
||||
font-size: 0.7em;
|
||||
padding: 2px 5px;
|
||||
}
|
||||
.btn-group .btn.active {
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
border-color: #007bff;
|
||||
}
|
||||
</style>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php echo $__env->make('layouts.adminlte', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/glastree/resources/views/gruppi/index.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,288 @@
|
||||
<?php $__env->startSection('title', 'Nuovo Evento'); ?>
|
||||
<?php $__env->startSection('page_title', 'Nuovo Evento'); ?>
|
||||
|
||||
<?php $__env->startSection('content'); ?>
|
||||
<form action="/eventi" method="POST">
|
||||
<?php echo csrf_field(); ?>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="card card-primary">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><i class="fas fa-calendar mr-2"></i>Dati Evento</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label>Nome Evento *</label>
|
||||
<input type="text" name="nome_evento" class="form-control <?php $__errorArgs = ['nome_evento'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>" value="<?php echo e(old('nome_evento')); ?>" required>
|
||||
<?php $__errorArgs = ['nome_evento'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="invalid-feedback"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Descrizione Breve</label>
|
||||
<input type="text" name="descrizione_evento" class="form-control" value="<?php echo e(old('descrizione_evento')); ?>" placeholder="Breve descrizione">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Tipo Evento</label>
|
||||
<select name="tipo_evento" class="form-control">
|
||||
<option value="">Seleziona tipo...</option>
|
||||
<?php $__currentLoopData = $tipologieEventi; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tipo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<option value="<?php echo e($tipo->nome); ?>" <?php echo e(old('tipo_evento') === $tipo->nome ? 'selected' : ''); ?>>
|
||||
<?php echo e($tipo->descrizione ?: $tipo->nome); ?>
|
||||
|
||||
</option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Descrizione Completa</label>
|
||||
<textarea name="descrizione" class="form-control" rows="3"><?php echo e(old('descrizione')); ?></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>
|
||||
<input type="checkbox" name="is_incontro_gruppo" value="1" <?php echo e(old('is_incontro_gruppo') ? 'checked' : ''); ?>>
|
||||
Questo evento è il giorno di incontro del gruppo
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="card">
|
||||
<div class="card-header"><h3 class="card-title"><i class="fas fa-clock mr-2"></i>Data e Orario</h3></div>
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label>Tipo Ricorrenza</label>
|
||||
<select name="tipo_recorrenza" id="tipo_recorrenza" class="form-control" onchange="toggleRicorrenza()">
|
||||
<option value="singolo" <?php echo e(old('tipo_recorrenza', 'singolo') === 'singolo' ? 'selected' : ''); ?>>Singolo</option>
|
||||
<option value="settimanale" <?php echo e(old('tipo_recorrenza') === 'settimanale' ? 'selected' : ''); ?>>Settimanale</option>
|
||||
<option value="mensile" <?php echo e(old('tipo_recorrenza') === 'mensile' ? 'selected' : ''); ?>>Mensile</option>
|
||||
<option value="annuale" <?php echo e(old('tipo_recorrenza') === 'annuale' ? 'selected' : ''); ?>>Annuale</option>
|
||||
<option value="altro" <?php echo e(old('tipo_recorrenza') === 'altro' ? 'selected' : ''); ?>>Altro</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div id="data_specifica_field" style="<?php echo e(old('tipo_recorrenza') === 'singolo' || old('tipo_recorrenza') === null ? '' : 'display:none;'); ?>">
|
||||
<div class="form-group">
|
||||
<label>Data Evento</label>
|
||||
<input type="date" name="data_specifica" class="form-control" value="<?php echo e(old('data_specifica')); ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="settimanale_field" style="<?php echo e(old('tipo_recorrenza') === 'settimanale' ? '' : 'display:none;'); ?>">
|
||||
<div class="form-group">
|
||||
<label>Giorno della Settimana</label>
|
||||
<select name="giorno_settimana" class="form-control">
|
||||
<option value="">Seleziona...</option>
|
||||
<option value="0" <?php echo e(old('giorno_settimana') === '0' ? 'selected' : ''); ?>>Domenica</option>
|
||||
<option value="1" <?php echo e(old('giorno_settimana') == '1' ? 'selected' : ''); ?>>Lunedì</option>
|
||||
<option value="2" <?php echo e(old('giorno_settimana') == '2' ? 'selected' : ''); ?>>Martedì</option>
|
||||
<option value="3" <?php echo e(old('giorno_settimana') == '3' ? 'selected' : ''); ?>>Mercoledì</option>
|
||||
<option value="4" <?php echo e(old('giorno_settimana') == '4' ? 'selected' : ''); ?>>Giovedì</option>
|
||||
<option value="5" <?php echo e(old('giorno_settimana') == '5' ? 'selected' : ''); ?>>Venerdì</option>
|
||||
<option value="6" <?php echo e(old('giorno_settimana') == '6' ? 'selected' : ''); ?>>Sabato</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="mensile_field" style="<?php echo e(old('tipo_recorrenza') === 'mensile' ? '' : 'display:none;'); ?>">
|
||||
<div class="form-group">
|
||||
<label>Occorrenza nel mese</label>
|
||||
<select name="occorrenza_mese" class="form-control">
|
||||
<option value="">Seleziona...</option>
|
||||
<option value="1,1" <?php echo e(old('occorrenza_mese') === '1,1' ? 'selected' : ''); ?>>1° Lunedì</option>
|
||||
<option value="1,2" <?php echo e(old('occorrenza_mese') === '1,2' ? 'selected' : ''); ?>>1° Martedì</option>
|
||||
<option value="1,3" <?php echo e(old('occorrenza_mese') === '1,3' ? 'selected' : ''); ?>>1° Mercoledì</option>
|
||||
<option value="1,4" <?php echo e(old('occorrenza_mese') === '1,4' ? 'selected' : ''); ?>>1° Giovedì</option>
|
||||
<option value="1,5" <?php echo e(old('occorrenza_mese') === '1,5' ? 'selected' : ''); ?>>1° Venerdì</option>
|
||||
<option value="1,6" <?php echo e(old('occorrenza_mese') === '1,6' ? 'selected' : ''); ?>>1° Sabato</option>
|
||||
<option value="1,0" <?php echo e(old('occorrenza_mese') === '1,0' ? 'selected' : ''); ?>>1° Domenica</option>
|
||||
<option value="2,1" <?php echo e(old('occorrenza_mese') === '2,1' ? 'selected' : ''); ?>>2° Lunedì</option>
|
||||
<option value="2,2" <?php echo e(old('occorrenza_mese') === '2,2' ? 'selected' : ''); ?>>2° Martedì</option>
|
||||
<option value="2,3" <?php echo e(old('occorrenza_mese') === '2,3' ? 'selected' : ''); ?>>2° Mercoledì</option>
|
||||
<option value="2,4" <?php echo e(old('occorrenza_mese') === '2,4' ? 'selected' : ''); ?>>2° Giovedì</option>
|
||||
<option value="2,5" <?php echo e(old('occorrenza_mese') === '2,5' ? 'selected' : ''); ?>>2° Venerdì</option>
|
||||
<option value="2,6" <?php echo e(old('occorrenza_mese') === '2,6' ? 'selected' : ''); ?>>2° Sabato</option>
|
||||
<option value="2,0" <?php echo e(old('occorrenza_mese') === '2,0' ? 'selected' : ''); ?>>2° Domenica</option>
|
||||
<option value="3,1" <?php echo e(old('occorrenza_mese') === '3,1' ? 'selected' : ''); ?>>3° Lunedì</option>
|
||||
<option value="3,2" <?php echo e(old('occorrenza_mese') === '3,2' ? 'selected' : ''); ?>>3° Martedì</option>
|
||||
<option value="3,3" <?php echo e(old('occorrenza_mese') === '3,3' ? 'selected' : ''); ?>>3° Mercoledì</option>
|
||||
<option value="3,4" <?php echo e(old('occorrenza_mese') === '3,4' ? 'selected' : ''); ?>>3° Giovedì</option>
|
||||
<option value="3,5" <?php echo e(old('occorrenza_mese') === '3,5' ? 'selected' : ''); ?>>3° Venerdì</option>
|
||||
<option value="3,6" <?php echo e(old('occorrenza_mese') === '3,6' ? 'selected' : ''); ?>>3° Sabato</option>
|
||||
<option value="3,0" <?php echo e(old('occorrenza_mese') === '3,0' ? 'selected' : ''); ?>>3° Domenica</option>
|
||||
<option value="4,1" <?php echo e(old('occorrenza_mese') === '4,1' ? 'selected' : ''); ?>>4° Lunedì</option>
|
||||
<option value="4,2" <?php echo e(old('occorrenza_mese') === '4,2' ? 'selected' : ''); ?>>4° Martedì</option>
|
||||
<option value="4,3" <?php echo e(old('occorrenza_mese') === '4,3' ? 'selected' : ''); ?>>4° Mercoledì</option>
|
||||
<option value="4,4" <?php echo e(old('occorrenza_mese') === '4,4' ? 'selected' : ''); ?>>4° Giovedì</option>
|
||||
<option value="4,5" <?php echo e(old('occorrenza_mese') === '4,5' ? 'selected' : ''); ?>>4° Venerdì</option>
|
||||
<option value="4,6" <?php echo e(old('occorrenza_mese') === '4,6' ? 'selected' : ''); ?>>4° Sabato</option>
|
||||
<option value="4,0" <?php echo e(old('occorrenza_mese') === '4,0' ? 'selected' : ''); ?>>4° Domenica</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Mesi (multipli)</label>
|
||||
<select name="mesi_recorrenza[]" class="form-control" multiple size="4">
|
||||
<option value="1" <?php echo e(is_array(old('mesi_recorrenza')) && in_array('1', old('mesi_recorrenza')) ? 'selected' : ''); ?>>Gennaio</option>
|
||||
<option value="2" <?php echo e(is_array(old('mesi_recorrenza')) && in_array('2', old('mesi_recorrenza')) ? 'selected' : ''); ?>>Febbraio</option>
|
||||
<option value="3" <?php echo e(is_array(old('mesi_recorrenza')) && in_array('3', old('mesi_recorrenza')) ? 'selected' : ''); ?>>Marzo</option>
|
||||
<option value="4" <?php echo e(is_array(old('mesi_recorrenza')) && in_array('4', old('mesi_recorrenza')) ? 'selected' : ''); ?>>Aprile</option>
|
||||
<option value="5" <?php echo e(is_array(old('mesi_recorrenza')) && in_array('5', old('mesi_recorrenza')) ? 'selected' : ''); ?>>Maggio</option>
|
||||
<option value="6" <?php echo e(is_array(old('mesi_recorrenza')) && in_array('6', old('mesi_recorrenza')) ? 'selected' : ''); ?>>Giugno</option>
|
||||
<option value="7" <?php echo e(is_array(old('mesi_recorrenza')) && in_array('7', old('mesi_recorrenza')) ? 'selected' : ''); ?>>Luglio</option>
|
||||
<option value="8" <?php echo e(is_array(old('mesi_recorrenza')) && in_array('8', old('mesi_recorrenza')) ? 'selected' : ''); ?>>Agosto</option>
|
||||
<option value="9" <?php echo e(is_array(old('mesi_recorrenza')) && in_array('9', old('mesi_recorrenza')) ? 'selected' : ''); ?>>Settembre</option>
|
||||
<option value="10" <?php echo e(is_array(old('mesi_recorrenza')) && in_array('10', old('mesi_recorrenza')) ? 'selected' : ''); ?>>Ottobre</option>
|
||||
<option value="11" <?php echo e(is_array(old('mesi_recorrenza')) && in_array('11', old('mesi_recorrenza')) ? 'selected' : ''); ?>>Novembre</option>
|
||||
<option value="12" <?php echo e(is_array(old('mesi_recorrenza')) && in_array('12', old('mesi_recorrenza')) ? 'selected' : ''); ?>>Dicembre</option>
|
||||
</select>
|
||||
<small class="form-text text-muted">Ctrl+clic per selezionare più mesi</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="annuale_field" style="<?php echo e(old('tipo_recorrenza') === 'annuale' ? '' : 'display:none;'); ?>">
|
||||
<div class="form-group">
|
||||
<label>Mese</label>
|
||||
<select name="mese_annuale" class="form-control">
|
||||
<option value="">Seleziona mese...</option>
|
||||
<option value="1" <?php echo e(old('mese_annuale') == '1' ? 'selected' : ''); ?>>Gennaio</option>
|
||||
<option value="2" <?php echo e(old('mese_annuale') == '2' ? 'selected' : ''); ?>>Febbraio</option>
|
||||
<option value="3" <?php echo e(old('mese_annuale') == '3' ? 'selected' : ''); ?>>Marzo</option>
|
||||
<option value="4" <?php echo e(old('mese_annuale') == '4' ? 'selected' : ''); ?>>Aprile</option>
|
||||
<option value="5" <?php echo e(old('mese_annuale') == '5' ? 'selected' : ''); ?>>Maggio</option>
|
||||
<option value="6" <?php echo e(old('mese_annuale') == '6' ? 'selected' : ''); ?>>Giugno</option>
|
||||
<option value="7" <?php echo e(old('mese_annuale') == '7' ? 'selected' : ''); ?>>Luglio</option>
|
||||
<option value="8" <?php echo e(old('mese_annuale') == '8' ? 'selected' : ''); ?>>Agosto</option>
|
||||
<option value="9" <?php echo e(old('mese_annuale') == '9' ? 'selected' : ''); ?>>Settembre</option>
|
||||
<option value="10" <?php echo e(old('mese_annuale') == '10' ? 'selected' : ''); ?>>Ottobre</option>
|
||||
<option value="11" <?php echo e(old('mese_annuale') == '11' ? 'selected' : ''); ?>>Novembre</option>
|
||||
<option value="12" <?php echo e(old('mese_annuale') == '12' ? 'selected' : ''); ?>>Dicembre</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Giorno del Mese</label>
|
||||
<select name="giorno_mese" class="form-control">
|
||||
<option value="">Seleziona giorno...</option>
|
||||
<?php for($d = 1; $d <= 31; $d++): ?>
|
||||
<option value="<?php echo e($d); ?>" <?php echo e(old('giorno_mese') == $d ? 'selected' : ''); ?>><?php echo e($d); ?></option>
|
||||
<?php endfor; ?>
|
||||
</select>
|
||||
<small class="form-text text-muted">Se il giorno non esiste nel mese selezionato, verrà usato l'ultimo giorno disponibile</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Ora Inizio</label>
|
||||
<input type="time" name="ora_inizio" class="form-control" value="<?php echo e(old('ora_inizio')); ?>">
|
||||
</div>
|
||||
<div class="form-group mb-0">
|
||||
<label>Durata (minuti)</label>
|
||||
<input type="number" name="durata_minuti" class="form-control" value="<?php echo e(old('durata_minuti', 60)); ?>" min="1">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mt-3">
|
||||
<div class="card-header"><h3 class="card-title"><i class="fas fa-map-marker-alt mr-2"></i>Dove</h3></div>
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label>Indirizzo</label>
|
||||
<input type="text" name="luogo_indirizzo" class="form-control" value="<?php echo e(old('luogo_indirizzo')); ?>" placeholder="Via, numero civico, CAP, città">
|
||||
</div>
|
||||
<div class="form-group mb-0">
|
||||
<label>URL Google Maps</label>
|
||||
<input type="url" name="luogo_url_maps" class="form-control" value="<?php echo e(old('luogo_url_maps')); ?>" placeholder="https://maps.google.com/...">
|
||||
<small class="form-text text-muted">Incolla il link di Google Maps per attivare l'anteprima</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header"><h3 class="card-title"><i class="fas fa-folder mr-2"></i>Gruppi</h3></div>
|
||||
<div class="card-body">
|
||||
<div class="form-group mb-0">
|
||||
<select name="gruppi[]" class="form-control" multiple size="8">
|
||||
<?php $__currentLoopData = $gruppi; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $g): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<option value="<?php echo e($g->id); ?>" <?php echo e((old('gruppi') && in_array($g->id, old('gruppi'))) || ($selectedGruppo && $selectedGruppo->id == $g->id) ? 'selected' : ''); ?>>
|
||||
<?php echo e($g->full_path); ?>
|
||||
|
||||
</option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
<small class="form-text text-muted">Tieni premuto Ctrl per selezionare più gruppi</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header"><h3 class="card-title"><i class="fas fa-user mr-2"></i>Responsabili</h3></div>
|
||||
<div class="card-body">
|
||||
<div class="form-group mb-0">
|
||||
<select name="responsabili[]" class="form-control" multiple size="8">
|
||||
<?php $__currentLoopData = $individui; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $i): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<option value="<?php echo e($i->id); ?>" <?php echo e(old('responsabili') && in_array($i->id, old('responsabili')) ? 'selected' : ''); ?>>
|
||||
<?php echo e($i->cognome); ?> <?php echo e($i->nome); ?>
|
||||
|
||||
<?php if($i->telefono_primario): ?>
|
||||
(<?php echo e($i->telefono_primario); ?>)
|
||||
<?php endif; ?>
|
||||
</option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
<small class="form-text text-muted">Tieni premuto Ctrl per selezionare più responsabili</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mt-3">
|
||||
<div class="card-header"><h3 class="card-title"><i class="fas fa-sticky-note mr-2"></i>Note</h3></div>
|
||||
<div class="card-body">
|
||||
<textarea name="note" class="form-control" rows="2"><?php echo e(old('note')); ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-3">
|
||||
<button type="submit" class="btn btn-success">
|
||||
<i class="fas fa-save mr-1"></i> Salva
|
||||
</button>
|
||||
<a href="/eventi" class="btn btn-secondary">
|
||||
<i class="fas fa-times mr-1"></i> Annulla
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php $__env->startSection('scripts'); ?>
|
||||
<script>
|
||||
function toggleRicorrenza() {
|
||||
var tipo = document.getElementById('tipo_recorrenza').value;
|
||||
document.getElementById('data_specifica_field').style.display = tipo === 'singolo' ? 'block' : 'none';
|
||||
document.getElementById('settimanale_field').style.display = tipo === 'settimanale' ? 'block' : 'none';
|
||||
document.getElementById('mensile_field').style.display = tipo === 'mensile' ? 'block' : 'none';
|
||||
document.getElementById('annuale_field').style.display = tipo === 'annuale' ? 'block' : 'none';
|
||||
}
|
||||
</script>
|
||||
<?php $__env->stopSection(); ?>
|
||||
<?php echo $__env->make('layouts.adminlte', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/glastree/resources/views/eventi/create.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,12 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="8" height="12" viewBox="0 0 8 12" fill="none" <?php echo e($attributes); ?>>
|
||||
<g clip-path="url(#clip0_14550_6168)">
|
||||
<path d="M6.75 11.0001L4 8.25012L1.25 11.0001" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M6.75 1.50012L4 4.25012L1.25 1.50012" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_14550_6168">
|
||||
<rect width="8" height="11" fill="white" style="fill:white;fill-opacity:1;" transform="translate(0 0.500122)"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/resources/exceptions/renderer/components/icons/chevrons-down-up.blade.php ENDPATH**/ ?>
|
||||
|
After Width: | Height: | Size: 788 B |
@@ -0,0 +1,117 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="it">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title><?php echo $__env->yieldContent('title', 'Admin'); ?> - Glastree</title>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/admin-lte@3.2/dist/css/adminlte.min.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
||||
<?php echo $__env->yieldContent('styles'); ?>
|
||||
</head>
|
||||
<body class="hold-transition sidebar-mini layout-fixed">
|
||||
<div class="wrapper">
|
||||
<nav class="main-header navbar navbar-expand navbar-white navbar-light">
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-widget="pushmenu" href="#"><i class="fas fa-bars"></i></a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo e(route('dashboard')); ?>">
|
||||
<i class="fas fa-home"></i> Torna al Sito
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link" data-toggle="dropdown" href="#">
|
||||
<i class="fas fa-user"></i> <?php echo e(Auth::user()->name); ?>
|
||||
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<form method="POST" action="<?php echo e(route('logout')); ?>">
|
||||
<?php echo csrf_field(); ?>
|
||||
<button type="submit" class="dropdown-item">
|
||||
<i class="fas fa-sign-out-alt mr-2"></i> Esci
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<aside class="main-sidebar sidebar-dark-primary elevation-4">
|
||||
<a href="<?php echo e(route('dashboard')); ?>" class="brand-link">
|
||||
<i class="fas fa-shield-alt brand-image ml-3 mr-2"></i>
|
||||
<span class="brand-text font-weight-light">Admin</span>
|
||||
</a>
|
||||
|
||||
<div class="sidebar">
|
||||
<nav class="mt-2">
|
||||
<ul class="nav nav-pills nav-sidebar flex-column">
|
||||
<li class="nav-item">
|
||||
<a href="/admin/utenti" class="nav-link <?php echo e(request()->is('admin/utenti*') ? 'active' : ''); ?>">
|
||||
<i class="nav-icon fas fa-users"></i>
|
||||
<p>Utenti</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="/admin/ruoli" class="nav-link <?php echo e(request()->is('admin/ruoli*') ? 'active' : ''); ?>">
|
||||
<i class="nav-icon fas fa-user-tag"></i>
|
||||
<p>Ruoli</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="/admin/activity-logs" class="nav-link <?php echo e(request()->is('admin/activity-logs*') ? 'active' : ''); ?>">
|
||||
<i class="nav-icon fas fa-history"></i>
|
||||
<p>Log Attività</p>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<div class="content-header">
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1 class="m-0"><?php echo $__env->yieldContent('page_title', 'Admin'); ?></h1>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="<?php echo e(route('dashboard')); ?>">Dashboard</a></li>
|
||||
<?php echo $__env->yieldContent('breadcrumbs'); ?>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<div class="container-fluid">
|
||||
<?php if(session('success')): ?>
|
||||
<div class="alert alert-success"><?php echo e(session('success')); ?></div>
|
||||
<?php endif; ?>
|
||||
<?php if(session('error')): ?>
|
||||
<div class="alert alert-danger"><?php echo e(session('error')); ?></div>
|
||||
<?php endif; ?>
|
||||
<?php echo $__env->yieldContent('content'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="main-footer">
|
||||
<strong><?php echo e(\App\Models\AppSetting::getFooterText()); ?></strong>
|
||||
<?php if(\App\Models\AppSetting::shouldShowVersion() && \App\Models\AppSetting::getAppVersion()): ?>
|
||||
<span class="ml-2">v<?php echo e(\App\Models\AppSetting::getAppVersion()); ?></span>
|
||||
<?php endif; ?>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/admin-lte@3.2/dist/js/adminlte.min.js"></script>
|
||||
<?php echo $__env->yieldContent('scripts'); ?>
|
||||
</body>
|
||||
</html><?php /**PATH /var/www/html/glastree/resources/views/admin/layout.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,57 @@
|
||||
<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;
|
||||
|
||||
$__newAttributes = [];
|
||||
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames((['code', 'highlightedLine']));
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (in_array($__key, $__propNames)) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
} else {
|
||||
$__newAttributes[$__key] = $__value;
|
||||
}
|
||||
}
|
||||
|
||||
$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);
|
||||
|
||||
unset($__propNames);
|
||||
unset($__newAttributes);
|
||||
|
||||
foreach (array_filter((['code', 'highlightedLine']), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
}
|
||||
|
||||
$__defined_vars = get_defined_vars();
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (array_key_exists($__key, $__defined_vars)) unset($$__key);
|
||||
}
|
||||
|
||||
unset($__defined_vars, $__key, $__value); ?>
|
||||
|
||||
<div
|
||||
class="text-sm rounded-b-lg bg-neutral-50 border-t border-neutral-100 dark:bg-neutral-900 dark:border-white/10"
|
||||
<?php echo e($attributes); ?>
|
||||
|
||||
>
|
||||
<?php if (isset($component)) { $__componentOriginal12cb286571f553eebcbe98210b217f94 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginal12cb286571f553eebcbe98210b217f94 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.syntax-highlight','data' => ['code' => $code,'language' => 'php','editor' => true,'startingLine' => max(1, $highlightedLine - 5),'highlightedLine' => min(5, $highlightedLine - 1),'class' => 'overflow-x-auto']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::syntax-highlight'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['code' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($code),'language' => 'php','editor' => true,'starting-line' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(max(1, $highlightedLine - 5)),'highlighted-line' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(min(5, $highlightedLine - 1)),'class' => 'overflow-x-auto']); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginal12cb286571f553eebcbe98210b217f94)): ?>
|
||||
<?php $attributes = $__attributesOriginal12cb286571f553eebcbe98210b217f94; ?>
|
||||
<?php unset($__attributesOriginal12cb286571f553eebcbe98210b217f94); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginal12cb286571f553eebcbe98210b217f94)): ?>
|
||||
<?php $component = $__componentOriginal12cb286571f553eebcbe98210b217f94; ?>
|
||||
<?php unset($__componentOriginal12cb286571f553eebcbe98210b217f94); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/resources/exceptions/renderer/components/frame-code.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,215 @@
|
||||
<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;
|
||||
|
||||
$__newAttributes = [];
|
||||
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames((['exception']));
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (in_array($__key, $__propNames)) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
} else {
|
||||
$__newAttributes[$__key] = $__value;
|
||||
}
|
||||
}
|
||||
|
||||
$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);
|
||||
|
||||
unset($__propNames);
|
||||
unset($__newAttributes);
|
||||
|
||||
foreach (array_filter((['exception']), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
}
|
||||
|
||||
$__defined_vars = get_defined_vars();
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (array_key_exists($__key, $__defined_vars)) unset($$__key);
|
||||
}
|
||||
|
||||
unset($__defined_vars, $__key, $__value); ?>
|
||||
|
||||
<div id="previous-exceptions" class="flex flex-col gap-2.5 bg-neutral-50 dark:bg-white/1 border border-neutral-200 dark:border-neutral-800 rounded-xl p-2.5 shadow-xs">
|
||||
<div class="flex items-center gap-2.5 p-2">
|
||||
<div class="bg-white dark:bg-neutral-800 border border-neutral-200 dark:border-white/5 rounded-md w-6 h-6 flex items-center justify-center p-1">
|
||||
<?php if (isset($component)) { $__componentOriginalebc8ec9a834a8051f56913d6745a7050 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginalebc8ec9a834a8051f56913d6745a7050 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.icons.alert','data' => ['class' => 'w-2.5 h-2.5 text-blue-500 dark:text-emerald-500']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::icons.alert'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['class' => 'w-2.5 h-2.5 text-blue-500 dark:text-emerald-500']); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginalebc8ec9a834a8051f56913d6745a7050)): ?>
|
||||
<?php $attributes = $__attributesOriginalebc8ec9a834a8051f56913d6745a7050; ?>
|
||||
<?php unset($__attributesOriginalebc8ec9a834a8051f56913d6745a7050); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginalebc8ec9a834a8051f56913d6745a7050)): ?>
|
||||
<?php $component = $__componentOriginalebc8ec9a834a8051f56913d6745a7050; ?>
|
||||
<?php unset($__componentOriginalebc8ec9a834a8051f56913d6745a7050); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<h3 class="text-base font-semibold text-neutral-900 dark:text-white">Previous <?php echo e(\Illuminate\Support\Str::plural('exception', $exception->previousExceptions()->count())); ?></h3>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col">
|
||||
<?php $__currentLoopData = $exception->previousExceptions(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $previous): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<div class="flex gap-2.5 px-2">
|
||||
|
||||
<?php if($exception->previousExceptions()->count() > 1): ?>
|
||||
<div class="flex flex-col items-center w-6 flex-shrink-0 self-stretch">
|
||||
<?php if($index > 0): ?>
|
||||
<div class="h-[23.5px] w-px border-l border-dashed border-emerald-900"></div>
|
||||
<?php else: ?>
|
||||
<div class="h-[23.5px]"></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="size-[9px] flex-shrink-0 rounded-full bg-emerald-800"></div>
|
||||
|
||||
<?php if($index < $exception->previousExceptions()->count() - 1): ?>
|
||||
<div class="flex-1 w-px border-l border-dashed border-emerald-900"></div>
|
||||
<?php else: ?>
|
||||
<div class="flex-1"></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<div
|
||||
x-data="{ expanded: false }"
|
||||
class="group/exception flex-1 min-w-0 rounded-lg my-1.5"
|
||||
:class="{
|
||||
'border border-neutral-200 bg-white/50 dark:bg-white/2 dark:border-white/5': expanded,
|
||||
<?php if($exception->previousExceptions()->count() === 1): ?>
|
||||
'border border-neutral-200 dark:border-transparent dark:bg-white/2': !expanded,
|
||||
<?php else: ?>
|
||||
'hover:border hover:border-neutral-200 dark:hover:border-none': !expanded,
|
||||
<?php endif; ?>
|
||||
}"
|
||||
>
|
||||
|
||||
<div
|
||||
class="flex gap-2.5 p-3 cursor-pointer rounded-lg"
|
||||
:class="{ 'hover:bg-white/50 dark:hover:bg-white/2': !expanded }"
|
||||
@click="expanded = !expanded"
|
||||
>
|
||||
<div
|
||||
class="flex-1 min-w-0"
|
||||
:class="expanded ? 'flex flex-col' : 'flex items-baseline gap-2'"
|
||||
>
|
||||
<h4 class="font-mono text-sm font-medium text-neutral-900 dark:text-white flex-shrink-0 max-w-full truncate"><?php echo e($previous->class()); ?></h4>
|
||||
<p
|
||||
class="text-sm text-neutral-500 dark:text-neutral-400"
|
||||
:class="expanded ? 'mt-1 break-words' : 'truncate'"
|
||||
><?php echo e($previous->message()); ?></p>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
class="flex h-6 w-6 flex-shrink-0 cursor-pointer items-center justify-center rounded-md border border-neutral-200 dark:border-white/8 group-hover/exception:text-blue-500 group-hover/exception:dark:text-emerald-500"
|
||||
:class="{
|
||||
'text-blue-500 dark:text-emerald-500 dark:bg-white/5': expanded,
|
||||
'text-neutral-500 dark:text-neutral-500 dark:bg-white/3': !expanded,
|
||||
}"
|
||||
>
|
||||
<?php if (isset($component)) { $__componentOriginal4400c4a71d3ea90a0e0b846e7d689a28 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginal4400c4a71d3ea90a0e0b846e7d689a28 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.icons.chevrons-down-up','data' => ['xShow' => 'expanded']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::icons.chevrons-down-up'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['x-show' => 'expanded']); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginal4400c4a71d3ea90a0e0b846e7d689a28)): ?>
|
||||
<?php $attributes = $__attributesOriginal4400c4a71d3ea90a0e0b846e7d689a28; ?>
|
||||
<?php unset($__attributesOriginal4400c4a71d3ea90a0e0b846e7d689a28); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginal4400c4a71d3ea90a0e0b846e7d689a28)): ?>
|
||||
<?php $component = $__componentOriginal4400c4a71d3ea90a0e0b846e7d689a28; ?>
|
||||
<?php unset($__componentOriginal4400c4a71d3ea90a0e0b846e7d689a28); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($component)) { $__componentOriginal7348bb70f498d75e0a91acc6a707f136 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginal7348bb70f498d75e0a91acc6a707f136 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.icons.chevrons-up-down','data' => ['xShow' => '!expanded','xCloak' => true]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::icons.chevrons-up-down'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['x-show' => '!expanded','x-cloak' => true]); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginal7348bb70f498d75e0a91acc6a707f136)): ?>
|
||||
<?php $attributes = $__attributesOriginal7348bb70f498d75e0a91acc6a707f136; ?>
|
||||
<?php unset($__attributesOriginal7348bb70f498d75e0a91acc6a707f136); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginal7348bb70f498d75e0a91acc6a707f136)): ?>
|
||||
<?php $component = $__componentOriginal7348bb70f498d75e0a91acc6a707f136; ?>
|
||||
<?php unset($__componentOriginal7348bb70f498d75e0a91acc6a707f136); ?>
|
||||
<?php endif; ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div x-show="expanded" x-cloak class="flex flex-col gap-1.5 p-3">
|
||||
<?php $__currentLoopData = $previous->frameGroups(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $group): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<?php if($group['is_vendor']): ?>
|
||||
<?php if (isset($component)) { $__componentOriginal449787012edfba29f0e80f325065fad5 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginal449787012edfba29f0e80f325065fad5 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.vendor-frames','data' => ['frames' => $group['frames']]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::vendor-frames'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['frames' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($group['frames'])]); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginal449787012edfba29f0e80f325065fad5)): ?>
|
||||
<?php $attributes = $__attributesOriginal449787012edfba29f0e80f325065fad5; ?>
|
||||
<?php unset($__attributesOriginal449787012edfba29f0e80f325065fad5); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginal449787012edfba29f0e80f325065fad5)): ?>
|
||||
<?php $component = $__componentOriginal449787012edfba29f0e80f325065fad5; ?>
|
||||
<?php unset($__componentOriginal449787012edfba29f0e80f325065fad5); ?>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php $__currentLoopData = $group['frames']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $frame): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<?php if (isset($component)) { $__componentOriginalc7c58c6d16fe849872fb25ad6e9b8407 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginalc7c58c6d16fe849872fb25ad6e9b8407 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.frame','data' => ['frame' => $frame]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::frame'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['frame' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($frame)]); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginalc7c58c6d16fe849872fb25ad6e9b8407)): ?>
|
||||
<?php $attributes = $__attributesOriginalc7c58c6d16fe849872fb25ad6e9b8407; ?>
|
||||
<?php unset($__attributesOriginalc7c58c6d16fe849872fb25ad6e9b8407); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginalc7c58c6d16fe849872fb25ad6e9b8407)): ?>
|
||||
<?php $component = $__componentOriginalc7c58c6d16fe849872fb25ad6e9b8407; ?>
|
||||
<?php unset($__componentOriginalc7c58c6d16fe849872fb25ad6e9b8407); ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/resources/exceptions/renderer/components/previous-exceptions.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,78 @@
|
||||
<?php $__env->startSection('title', 'Importa Individui'); ?>
|
||||
<?php $__env->startSection('page_title', 'Importa Individui da CSV'); ?>
|
||||
|
||||
<?php $__env->startSection('content'); ?>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><i class="fas fa-upload mr-2"></i>Carica file CSV</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="<?php echo e(route('individui.import.store')); ?>" method="POST" enctype="multipart/form-data">
|
||||
<?php echo csrf_field(); ?>
|
||||
<div class="form-group">
|
||||
<label for="file">Seleziona file CSV *</label>
|
||||
<input type="file" name="file" id="file" class="form-control" accept=".csv,.txt" required>
|
||||
<small class="form-text text-muted">
|
||||
Il file deve essere in formato CSV con separatore virgola.
|
||||
</small>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<i class="fas fa-upload mr-1"></i> Importa
|
||||
</button>
|
||||
<a href="<?php echo e(route('individui.index')); ?>" class="btn btn-secondary ml-2">
|
||||
Annulla
|
||||
</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="card">
|
||||
<div class="card-header bg-info">
|
||||
<h3 class="card-title text-white"><i class="fas fa-download mr-2"></i>Template</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p>Scarica il template CSV per l'importazione:</p>
|
||||
<a href="<?php echo e(route('individui.template')); ?>" class="btn btn-success btn-block">
|
||||
<i class="fas fa-file-csv mr-1"></i> Scarica Template
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><i class="fas fa-info-circle mr-2"></i>Formato CSV</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<h6>Campi obbligatori:</h6>
|
||||
<ul>
|
||||
<li><code>cognome</code></li>
|
||||
<li><code>nome</code></li>
|
||||
</ul>
|
||||
<h6>Campi opzionali:</h6>
|
||||
<ul>
|
||||
<li><code>data_nascita</code> (formato YYYY-MM-DD)</li>
|
||||
<li><code>indirizzo</code></li>
|
||||
<li><code>cap</code></li>
|
||||
<li><code>città</code></li>
|
||||
<li><code>sigla_provincia</code> (2 lettere)</li>
|
||||
<li><code>genere</code> (M o F)</li>
|
||||
<li><code>tipo_documento</code> (carta_identita, patente)</li>
|
||||
<li><code>numero_documento</code></li>
|
||||
<li><code>scadenza_documento</code> (YYYY-MM-DD)</li>
|
||||
<li><code>note</code></li>
|
||||
</ul>
|
||||
<h6>Contatti (fino a 2):</h6>
|
||||
<ul>
|
||||
<li><code>contatto_1_tipo</code> (email, telefono, cellulare)</li>
|
||||
<li><code>contatto_1_valore</code></li>
|
||||
<li><code>contatto_1_etichetta</code> (personale, lavoro)</li>
|
||||
<li><code>contatto_2_*</code> (secondo contatto)</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php $__env->stopSection(); ?>
|
||||
<?php echo $__env->make('layouts.adminlte', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/glastree/resources/views/individui/import.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,63 @@
|
||||
<?php $__env->startSection('title', 'Crea Ruolo'); ?>
|
||||
<?php $__env->startSection('page_title', 'Crea Nuovo Ruolo'); ?>
|
||||
|
||||
<?php $__env->startSection('breadcrumbs'); ?>
|
||||
<li class="breadcrumb-item"><a href="/admin/ruoli">Admin</a></li>
|
||||
<li class="breadcrumb-item"><a href="/admin/ruoli">Ruoli</a></li>
|
||||
<li class="breadcrumb-item active">Nuovo</li>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php $__env->startSection('content'); ?>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Nuovo Ruolo</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form method="POST" action="/admin/ruoli">
|
||||
<?php echo csrf_field(); ?>
|
||||
<div class="form-group">
|
||||
<label>Nome *</label>
|
||||
<input type="text" name="name" class="form-control" required maxlength="50" placeholder="es. Segretario">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Descrizione</label>
|
||||
<input type="text" name="description" class="form-control" maxlength="255" placeholder="es. Accesso per segretari">
|
||||
</div>
|
||||
|
||||
<h5 class="mt-4">Permessi</h5>
|
||||
<table class="table table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Modulo</th>
|
||||
<th>Nessuno</th>
|
||||
<th>Lettura</th>
|
||||
<th>Completo</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $__currentLoopData = ['individui', 'gruppi', 'eventi', 'documenti', 'mailing', 'viste']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $module): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<tr>
|
||||
<td><strong><?php echo e(ucfirst($module)); ?></strong></td>
|
||||
<td class="text-center"><input type="radio" name="permissions[<?php echo e($module); ?>]" value="0" checked></td>
|
||||
<td class="text-center"><input type="radio" name="permissions[<?php echo e($module); ?>]" value="1"></td>
|
||||
<td class="text-center"><input type="radio" name="permissions[<?php echo e($module); ?>]" value="2"></td>
|
||||
</tr>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="mt-4">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<i class="fas fa-save"></i> Salva
|
||||
</button>
|
||||
<a href="/admin/ruoli" class="btn btn-secondary">Annulla</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php $__env->stopSection(); ?>
|
||||
<?php echo $__env->make('admin.layout', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/glastree/resources/views/admin/ruoli/create.blade.php ENDPATH**/ ?>
|
||||
@@ -43,7 +43,7 @@
|
||||
<div class="card-body">
|
||||
<table class="table table-sm table-borderless mb-0">
|
||||
<tr>
|
||||
<td style="width: 150px;"><strong>Tipo:</strong></td>
|
||||
<td style="width: 150px;"><strong>Ricorrenza:</strong></td>
|
||||
<td>
|
||||
<?php if($evento->tipo_recorrenza && $evento->tipo_recorrenza !== 'singolo'): ?>
|
||||
<span class="badge badge-info"><?php echo e($evento->periodicita_label); ?></span>
|
||||
@@ -52,6 +52,21 @@
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if($evento->tipo_evento): ?>
|
||||
<tr>
|
||||
<td><strong>Tipologia:</strong></td>
|
||||
<td>
|
||||
<?php
|
||||
$tipologia = \App\Models\TipologiaEvento::where('nome', $evento->tipo_evento)->first();
|
||||
?>
|
||||
<?php if($tipologia): ?>
|
||||
<span class="badge badge-primary"><?php echo e($tipologia->descrizione ?: $tipologia->nome); ?></span>
|
||||
<?php else: ?>
|
||||
<span class="badge badge-secondary"><?php echo e($evento->tipo_evento); ?></span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php if($evento->tipo_recorrenza === 'settimanale'): ?>
|
||||
<tr>
|
||||
<td><strong>Giorno:</strong></td>
|
||||
|
||||
@@ -0,0 +1,674 @@
|
||||
<?php $__env->startSection('title', 'Dettaglio Individuo'); ?>
|
||||
<?php $__env->startSection('page_title', 'Dettaglio Individuo'); ?>
|
||||
|
||||
<?php $__env->startSection('breadcrumbs'); ?>
|
||||
<li class="breadcrumb-item"><a href="<?php echo e(route('individui.index')); ?>">Individui</a></li>
|
||||
<li class="breadcrumb-item active"><?php echo e($individuo->nome_completo); ?></li>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php $__env->startSection('content'); ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="card card-success">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><i class="fas fa-user mr-2"></i><?php echo e($individuo->nome_completo); ?></h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p><strong>Codice:</strong> <span class="badge badge-secondary"><?php echo e($individuo->codice_id); ?></span></p>
|
||||
<p><strong>Data di nascita:</strong> <?php echo e($individuo->data_nascita?->format('d/m/Y') ?: '-'); ?></p>
|
||||
<p><strong>Genere:</strong> <?php echo e($individuo->genere === 'M' ? 'Maschio' : ($individuo->genere === 'F' ? 'Femmina' : '-')); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="card card-secondary">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><i class="fas fa-camera mr-2"></i>Avatar</h3>
|
||||
</div>
|
||||
<div class="card-body text-center">
|
||||
<?php if($individuo->avatar): ?>
|
||||
<img src="<?php echo e(url('/individui/' . $individuo->id . '/avatar')); ?>"
|
||||
alt="Avatar"
|
||||
class="img-thumbnail mb-2"
|
||||
style="max-width: 120px; max-height: 120px; object-fit: cover; border-radius: 50%;">
|
||||
<br>
|
||||
<button type="button" class="btn btn-danger btn-sm" onclick="deleteAvatar()">
|
||||
<i class="fas fa-trash mr-1"></i>Rimuovi
|
||||
</button>
|
||||
<?php else: ?>
|
||||
<div class="bg-secondary d-flex align-items-center justify-content-center mb-3"
|
||||
style="width: 120px; height: 120px; margin: 0 auto; border-radius: 50%;">
|
||||
<i class="fas fa-user fa-4x text-white"></i>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<form id="avatar-upload-form" enctype="multipart/form-data">
|
||||
<?php echo csrf_field(); ?>
|
||||
<div class="custom-file mb-2">
|
||||
<input type="file" class="custom-file-input" id="avatar-input" name="avatar" accept="image/jpeg,image/png,image/gif">
|
||||
<label class="custom-file-label" for="avatar-input">Scegli immagine...</label>
|
||||
</div>
|
||||
<button type="button" class="btn btn-primary btn-sm" onclick="uploadAvatar()">
|
||||
<i class="fas fa-upload mr-1"></i>Carica
|
||||
</button>
|
||||
</form>
|
||||
<div id="avatar-message" class="mt-2"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header"><h3 class="card-title"><i class="fas fa-map-marker-alt mr-2"></i>Residenza</h3></div>
|
||||
<div class="card-body">
|
||||
<p><strong>Indirizzo:</strong> <?php echo e($individuo->indirizzo ?: '-'); ?></p>
|
||||
<p><strong>CAP:</strong> <?php echo e($individuo->cap ?: '-'); ?></p>
|
||||
<p><strong>Città:</strong> <?php echo e($individuo->città ?: '-'); ?></p>
|
||||
<p><strong>Provincia:</strong> <?php echo e($individuo->sigla_provincia ?: '-'); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header"><h3 class="card-title"><i class="fas fa-id-card mr-2"></i>Documento di identità</h3></div>
|
||||
<div class="card-body">
|
||||
<p><strong>Tipo:</strong> <?php echo e($individuo->tipo_documento ? ucfirst(str_replace('_', ' ', $individuo->tipo_documento)) : '-'); ?></p>
|
||||
<p><strong>Numero:</strong> <?php echo e($individuo->numero_documento ?: '-'); ?></p>
|
||||
<p><strong>Scadenza:</strong> <?php echo e($individuo->scadenza_documento?->format('d/m/Y') ?: '-'); ?></p>
|
||||
<?php if($individuo->hasDocumentoScaduto()): ?>
|
||||
<p><span class="badge badge-danger"><i class="fas fa-exclamation-triangle mr-1"></i> Documento scaduto da <?php echo e($individuo->giorni_scadenza_documento); ?> giorni</span></p>
|
||||
<?php elseif($individuo->hasDocumentoScadeEntroGiorni(30)): ?>
|
||||
<p><span class="badge badge-warning"><i class="fas fa-exclamation-circle mr-1"></i> Scade tra <?php echo e($individuo->giorni_scadenza_documento); ?> giorni</span></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if($individuo->note): ?>
|
||||
<div class="row mt-3">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
<div class="card-header"><h3 class="card-title"><i class="fas fa-sticky-note mr-2"></i>Note</h3></div>
|
||||
<div class="card-body">
|
||||
<p class="mb-0"><?php echo nl2br(e($individuo->note)); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><i class="fas fa-address-book mr-2"></i>Contatti</h3>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
<?php if($individuo->contatti->count() > 0): ?>
|
||||
<table class="table table-bordered table-hover table-striped mb-0">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th style="width: 20%;">Tipo</th>
|
||||
<th style="width: 30%;">Valore</th>
|
||||
<th style="width: 20%;">Etichetta</th>
|
||||
<th style="width: 10%;">Primario</th>
|
||||
<th style="width: 80px;">Azioni</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $__currentLoopData = $individuo->contatti; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $contatto): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<?php
|
||||
$protocols = ['http://', 'https://', 'ftp://', 'ssh://', 'sftp://', 'telnet://'];
|
||||
$isUrl = false;
|
||||
if (in_array($contatto->tipo, ['web', 'telegram'])) {
|
||||
foreach ($protocols as $p) {
|
||||
if (str_starts_with(strtolower($contatto->valore), $p)) {
|
||||
$isUrl = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<tr id="contatto-row-<?php echo e($contatto->id); ?>">
|
||||
<td><span class="text-capitalize"><?php echo e($contatto->tipo); ?></span></td>
|
||||
<td>
|
||||
<?php if($contatto->tipo === 'email'): ?>
|
||||
<a href="mailto:<?php echo e($contatto->valore); ?>"><?php echo e($contatto->valore); ?></a>
|
||||
<?php elseif(in_array($contatto->tipo, ['telefono', 'cellulare', 'whatsapp'])): ?>
|
||||
<a href="tel:<?php echo e($contatto->valore); ?>"><?php echo e($contatto->valore); ?></a>
|
||||
<?php elseif($isUrl): ?>
|
||||
<a href="<?php echo e($contatto->valore); ?>" target="_blank"><?php echo e($contatto->valore); ?></a>
|
||||
<?php else: ?>
|
||||
<?php echo e($contatto->valore); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?php echo e($contatto->etichetta ?: '-'); ?></td>
|
||||
<td>
|
||||
<?php if($contatto->is_primary): ?>
|
||||
<span class="badge badge-success"><i class="fas fa-check mr-1"></i> Sì</span>
|
||||
<?php else: ?>
|
||||
<span class="text-muted">No</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-xs btn-warning" onclick="editContattoInline(<?php echo e($contatto->id); ?>)" title="Modifica">
|
||||
<i class="fas fa-edit"></i>
|
||||
</button>
|
||||
<form action="<?php echo e(url('/contatti/' . $contatto->id)); ?>" method="POST" class="d-inline">
|
||||
<?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
|
||||
<input type="hidden" name="_redirect" value="<?php echo e(url('/individui/' . $individuo->id)); ?>">
|
||||
<button type="submit" class="btn btn-xs btn-danger" onclick="return confirm('Eliminare questo contatto?')" title="Elimina">
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="contatto-edit-<?php echo e($contatto->id); ?>" style="display:none;">
|
||||
<td colspan="5">
|
||||
<form action="<?php echo e(url('/contatti/' . $contatto->id)); ?>" method="POST" class="mb-0">
|
||||
<?php echo csrf_field(); ?> <?php echo method_field('PUT'); ?>
|
||||
<input type="hidden" name="_redirect" value="<?php echo e(url('/individui/' . $individuo->id)); ?>">
|
||||
<input type="hidden" name="individuo_id" value="<?php echo e($individuo->id); ?>">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<select name="tipo" class="form-control form-control-sm" required>
|
||||
<option value="telefono" <?php echo e($contatto->tipo === 'telefono' ? 'selected' : ''); ?>>Telefono</option>
|
||||
<option value="cellulare" <?php echo e($contatto->tipo === 'cellulare' ? 'selected' : ''); ?>>Cellulare</option>
|
||||
<option value="email" <?php echo e($contatto->tipo === 'email' ? 'selected' : ''); ?>>Email</option>
|
||||
<option value="fax" <?php echo e($contatto->tipo === 'fax' ? 'selected' : ''); ?>>Fax</option>
|
||||
<option value="web" <?php echo e($contatto->tipo === 'web' ? 'selected' : ''); ?>>Web</option>
|
||||
<option value="telegram" <?php echo e($contatto->tipo === 'telegram' ? 'selected' : ''); ?>>Telegram</option>
|
||||
<option value="whatsapp" <?php echo e($contatto->tipo === 'whatsapp' ? 'selected' : ''); ?>>WhatsApp</option>
|
||||
<option value="altro" <?php echo e($contatto->tipo === 'altro' ? 'selected' : ''); ?>>Altro</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<input type="text" name="valore" class="form-control form-control-sm" value="<?php echo e($contatto->valore); ?>" required>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<input type="text" name="etichetta" class="form-control form-control-sm" value="<?php echo e($contatto->etichetta); ?>" placeholder="Etichetta">
|
||||
</div>
|
||||
<div class="col-md-1 text-center">
|
||||
<input type="checkbox" name="is_primary" value="1" <?php echo e($contatto->is_primary ? 'checked' : ''); ?>>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<button type="submit" class="btn btn-xs btn-success"><i class="fas fa-check mr-1"></i>Salva</button>
|
||||
<button type="button" class="btn btn-xs btn-secondary" onclick="cancelEditContatto(<?php echo e($contatto->id); ?>)"><i class="fas fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php else: ?>
|
||||
<div class="text-center text-muted py-4">
|
||||
<i class="fas fa-address-book fa-2x mb-2"></i>
|
||||
<p class="mb-0">Nessun contatto</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><i class="fas fa-folder mr-2"></i>Gruppi</h3>
|
||||
<button type="button" class="btn btn-xs btn-success float-right" onclick="showGruppoForm()">
|
||||
<i class="fas fa-plus mr-1"></i> Aggiungi
|
||||
</button>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
|
||||
<?php if($individuo->gruppi->count() > 0): ?>
|
||||
<table class="table table-bordered table-hover table-striped mb-0">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th>Nome</th>
|
||||
<th>Diocesi</th>
|
||||
<th>Responsabile</th>
|
||||
<th style="width: 130px;">Ruolo</th>
|
||||
<th style="width: 110px;">Data Adesione</th>
|
||||
<th style="width: 80px;">Azioni</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $__currentLoopData = $individuo->gruppi; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $gruppo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<tr id="gruppo-row-<?php echo e($gruppo->id); ?>">
|
||||
<td>
|
||||
<i class="fas fa-folder text-warning mr-1"></i>
|
||||
<a href="<?php echo e(url('/gruppi/' . $gruppo->id)); ?>"><?php echo e($gruppo->nome); ?></a>
|
||||
</td>
|
||||
<td><?php echo e($gruppo->diocesi?->nome ?: '-'); ?></td>
|
||||
<td><?php echo e($gruppo->getResponsabili()->isNotEmpty() ? $gruppo->getResponsabili()->first()->nome_completo : '-'); ?></td>
|
||||
<td>
|
||||
<?php
|
||||
$ruoloIds = $gruppo->pivot->ruolo_ids ? json_decode($gruppo->pivot->ruolo_ids, true) : [];
|
||||
$ruoli = \App\Models\Ruolo::findByIds($ruoloIds);
|
||||
?>
|
||||
<?php if($ruoli->count() > 0): ?>
|
||||
<?php $__currentLoopData = $ruoli; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ruolo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<span class="badge badge-info mr-1"><?php echo e($ruolo->nome); ?></span>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
<?php else: ?>
|
||||
<span class="text-muted">-</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?php echo e($gruppo->pivot->data_adesione ? \Carbon\Carbon::parse($gruppo->pivot->data_adesione)->format('d/m/Y') : '-'); ?></td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-xs btn-warning" onclick="editGruppoInline(<?php echo e($gruppo->id); ?>)" title="Modifica ruolo">
|
||||
<i class="fas fa-edit"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-xs btn-danger" onclick="deleteGruppo(<?php echo e($gruppo->id); ?>)" title="Rimuovi">
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="gruppo-edit-<?php echo e($gruppo->id); ?>" style="display:none;">
|
||||
<td colspan="6">
|
||||
<form action="<?php echo e(url('/individui/' . $individuo->id . '/gruppi/' . $gruppo->id)); ?>" method="POST" class="mb-0">
|
||||
<?php echo csrf_field(); ?> <?php echo method_field('PUT'); ?>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<input type="text" class="form-control form-control-sm" value="<?php echo e($gruppo->nome); ?>" disabled>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<select name="ruolo_ids[]" class="form-control form-control-sm" multiple size="3">
|
||||
<?php $selectedRuoliIds = $gruppo->pivot->ruolo_ids ? json_decode($gruppo->pivot->ruolo_ids, true) : [] ?>
|
||||
<?php $__currentLoopData = \App\Models\Ruolo::attive(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ruolo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<option value="<?php echo e($ruolo->id); ?>" <?php echo e(in_array($ruolo->id, $selectedRuoliIds) ? 'selected' : ''); ?>><?php echo e($ruolo->nome); ?></option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<input type="date" name="data_adesione" class="form-control form-control-sm" value="<?php echo e($gruppo->pivot->data_adesione); ?>">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<button type="submit" class="btn btn-xs btn-success"><i class="fas fa-check mr-1"></i>Salva</button>
|
||||
<button type="button" class="btn btn-xs btn-secondary" onclick="cancelEditGruppo(<?php echo e($gruppo->id); ?>)"><i class="fas fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php else: ?>
|
||||
<div class="text-center text-muted py-4">
|
||||
<i class="fas fa-users fa-2x mb-2"></i>
|
||||
<p class="mb-0">Nessun gruppo associato</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mt-3" id="gruppo-add-card" style="display:none; background-color: #fff3cd; border-color: #ffc107;">
|
||||
<div class="card-header bg-warning">
|
||||
<h3 class="card-title"><i class="fas fa-folder-plus mr-2"></i>Aggiungi a Gruppo</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<select id="new-gruppo-id" class="form-control form-control-sm">
|
||||
<option value="">Seleziona gruppo...</option>
|
||||
<?php $__currentLoopData = \App\Models\Gruppo::orderBy('nome')->get(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $g): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<?php if(!$individuo->gruppi->contains($g->id)): ?>
|
||||
<option value="<?php echo e($g->id); ?>"><?php echo e($g->full_path); ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<select id="new-gruppo-ruolo" class="form-control form-control-sm" multiple size="3">
|
||||
<?php $__currentLoopData = \App\Models\Ruolo::attive(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ruolo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<option value="<?php echo e($ruolo->id); ?>"><?php echo e($ruolo->nome); ?></option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
<small class="text-muted">Ctrl+click per selezionare più ruoli</small>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<input type="date" id="new-gruppo-data" class="form-control form-control-sm">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<button type="button" class="btn btn-success btn-sm" onclick="submitGruppoForm()">
|
||||
<i class="fas fa-check mr-1"></i> Associa
|
||||
</button>
|
||||
<button type="button" class="btn btn-secondary btn-sm" onclick="hideGruppoForm()">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><i class="fas fa-file mr-2"></i>Documenti</h3>
|
||||
<button type="button" class="btn btn-xs btn-success float-right" onclick="showDocumentoForm()">
|
||||
<i class="fas fa-plus mr-1"></i> Carica
|
||||
</button>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
<div id="documento-add-form" style="display:none;" class="p-3 bg-light border-bottom">
|
||||
<form action="/documenti" method="POST" enctype="multipart/form-data" class="mb-0">
|
||||
<?php echo csrf_field(); ?>
|
||||
<input type="hidden" name="visibilita" value="individuo">
|
||||
<input type="hidden" name="visibilita_target_id" value="<?php echo e($individuo->id); ?>">
|
||||
<input type="hidden" name="visibilita_target_type" value="App\Models\Individuo">
|
||||
<input type="hidden" name="redirect_to" value="<?php echo e(url('/individui/' . $individuo->id)); ?>">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<input type="text" name="nome_file" class="form-control form-control-sm" placeholder="Nome documento" required>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<select name="tipologia" class="form-control form-control-sm" required>
|
||||
<option value="">Tipologia...</option>
|
||||
<option value="documento">Documento</option>
|
||||
<option value="avatar">Avatar</option>
|
||||
<option value="galleria">Galleria</option>
|
||||
<option value="statuto">Statuto</option>
|
||||
<option value="altro">Altro</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<input type="file" name="file" class="form-control form-control-sm" required>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<button type="submit" class="btn btn-xs btn-success"><i class="fas fa-upload mr-1"></i>Carica</button>
|
||||
<button type="button" class="btn btn-xs btn-secondary" onclick="hideDocumentoForm()"><i class="fas fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php if($individuo->documenti->count() > 0): ?>
|
||||
<table class="table table-bordered table-hover table-striped mb-0">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th>Nome</th>
|
||||
<th style="width: 120px;">Tipologia</th>
|
||||
<th style="width: 80px;">Dimensione</th>
|
||||
<th style="width: 130px;">Data Upload</th>
|
||||
<th style="width: 80px;">Azioni</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $__currentLoopData = $individuo->documenti; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $documento): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="#" onclick="event.preventDefault(); previewDocumento(<?php echo e($documento->id); ?>, '<?php echo e($documento->mime_type); ?>');">
|
||||
<i class="fas fa-file text-secondary mr-1"></i>
|
||||
<?php echo e($documento->nome_file); ?>
|
||||
|
||||
</a>
|
||||
</td>
|
||||
<td><?php echo e(ucfirst(str_replace('_', ' ', $documento->tipologia))); ?></td>
|
||||
<td><?php echo e(number_format($documento->dimensione / 1024, 1)); ?> KB</td>
|
||||
<td><?php echo e($documento->created_at->format('d/m/Y')); ?></td>
|
||||
<td>
|
||||
<?php if($documento->file_path): ?>
|
||||
<button type="button" class="btn btn-xs btn-primary" onclick="previewDocumento(<?php echo e($documento->id); ?>, '<?php echo e($documento->mime_type); ?>')" title="Anteprima">
|
||||
<i class="fas fa-eye"></i>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
<form action="<?php echo e(url('/documenti/' . $documento->id)); ?>" method="POST" class="d-inline">
|
||||
<?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
|
||||
<input type="hidden" name="_redirect" value="<?php echo e(url('/individui/' . $individuo->id)); ?>">
|
||||
<button type="submit" class="btn btn-xs btn-danger" onclick="return confirm('Eliminare questo documento?')" title="Elimina">
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php else: ?>
|
||||
<div class="text-center text-muted py-4">
|
||||
<i class="fas fa-file fa-2x mb-2"></i>
|
||||
<p class="mb-0">Nessun documento</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-3">
|
||||
<a href="<?php echo e(url('/individui/' . $individuo->id . '/edit')); ?>" class="btn btn-warning">
|
||||
<i class="fas fa-edit mr-1"></i> Modifica
|
||||
</a>
|
||||
<form action="<?php echo e(url('/individui/' . $individuo->id)); ?>" method="POST" class="d-inline">
|
||||
<?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
|
||||
<button type="submit" class="btn btn-danger" onclick="return confirm('Confermi l\'eliminazione di <?php echo e($individuo->nome_completo); ?>?')">
|
||||
<i class="fas fa-trash mr-1"></i> Elimina
|
||||
</button>
|
||||
</form>
|
||||
<a href="<?php echo e(route('individui.index')); ?>" class="btn btn-secondary">
|
||||
<i class="fas fa-arrow-left mr-1"></i> Torna all'elenco
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="previewModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog modal-lg" role="document" style="max-width: 90vw;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><i class="fas fa-file mr-2"></i><span id="previewModalTitle">Anteprima</span></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Chiudi">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body text-center p-0" style="min-height: 400px;">
|
||||
<iframe id="previewFrame" src="" style="width: 100%; height: 70vh; border: none;"></iframe>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a id="previewDownloadBtn" href="#" class="btn btn-primary" download>
|
||||
<i class="fas fa-download mr-1"></i> Scarica
|
||||
</a>
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Chiudi</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php $__env->startSection('scripts'); ?>
|
||||
<script>
|
||||
function editContattoInline(id) {
|
||||
document.getElementById('contatto-row-' + id).style.display = 'none';
|
||||
document.getElementById('contatto-edit-' + id).style.display = 'table-row';
|
||||
}
|
||||
|
||||
function cancelEditContatto(id) {
|
||||
document.getElementById('contatto-row-' + id).style.display = 'table-row';
|
||||
document.getElementById('contatto-edit-' + id).style.display = 'none';
|
||||
}
|
||||
|
||||
function showGruppoForm() {
|
||||
var card = document.getElementById('gruppo-add-card');
|
||||
if (card) {
|
||||
card.style.display = 'block';
|
||||
card.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
||||
}
|
||||
}
|
||||
|
||||
function hideGruppoForm() {
|
||||
var card = document.getElementById('gruppo-add-card');
|
||||
if (card) {
|
||||
card.style.display = 'none';
|
||||
}
|
||||
}
|
||||
|
||||
function submitGruppoForm() {
|
||||
var gruppoId = document.getElementById('new-gruppo-id').value;
|
||||
var ruoloSelect = document.getElementById('new-gruppo-ruolo');
|
||||
var dataAdesione = document.getElementById('new-gruppo-data').value;
|
||||
|
||||
if (!gruppoId) {
|
||||
alert('Seleziona un gruppo');
|
||||
return;
|
||||
}
|
||||
|
||||
var formData = new URLSearchParams();
|
||||
formData.append('gruppo_id', gruppoId);
|
||||
|
||||
var selectedRuoli = Array.from(ruoloSelect.selectedOptions).map(opt => opt.value).filter(v => v);
|
||||
selectedRuoli.forEach(function(ruoloId) {
|
||||
formData.append('ruolo_ids[]', ruoloId);
|
||||
});
|
||||
|
||||
formData.append('data_adesione', dataAdesione);
|
||||
|
||||
fetch('<?php echo e(url('/individui/' . $individuo->id . '/gruppi')); ?>', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': '<?php echo e(csrf_token()); ?>',
|
||||
'Accept': 'application/json',
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
body: formData
|
||||
})
|
||||
.then(response => {
|
||||
if (!response.ok) {
|
||||
return response.text().then(text => { throw new Error(text); });
|
||||
}
|
||||
return response.json();
|
||||
})
|
||||
.then(data => {
|
||||
if (data.success) {
|
||||
hideGruppoForm();
|
||||
window.location.reload();
|
||||
} else {
|
||||
alert(data.error || 'Errore');
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
alert('Errore: ' + error.message);
|
||||
});
|
||||
}
|
||||
|
||||
function editGruppoInline(id) {
|
||||
document.getElementById('gruppo-row-' + id).style.display = 'none';
|
||||
document.getElementById('gruppo-edit-' + id).style.display = 'table-row';
|
||||
}
|
||||
|
||||
function cancelEditGruppo(id) {
|
||||
document.getElementById('gruppo-row-' + id).style.display = 'table-row';
|
||||
document.getElementById('gruppo-edit-' + id).style.display = 'none';
|
||||
}
|
||||
|
||||
function deleteGruppo(gruppoId) {
|
||||
if (!confirm('Rimuovere da questo gruppo?')) return;
|
||||
|
||||
fetch('<?php echo e(url('/individui/' . $individuo->id . '/gruppi')); ?>/' + gruppoId, {
|
||||
method: 'DELETE',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': '<?php echo e(csrf_token()); ?>',
|
||||
'Accept': 'application/json'
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
if (!response.ok) {
|
||||
return response.text().then(text => { throw new Error(text); });
|
||||
}
|
||||
return response.json();
|
||||
})
|
||||
.then(data => {
|
||||
if (data.success) {
|
||||
window.location.reload();
|
||||
} else {
|
||||
alert(data.error || 'Errore');
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
alert('Errore: ' + error.message);
|
||||
});
|
||||
}
|
||||
|
||||
function showDocumentoForm() {
|
||||
document.getElementById('documento-add-form').style.display = 'block';
|
||||
}
|
||||
|
||||
function hideDocumentoForm() {
|
||||
document.getElementById('documento-add-form').style.display = 'none';
|
||||
}
|
||||
|
||||
function previewDocumento(id, mimeType) {
|
||||
var previewUrl = '/documenti/' + id + '/preview';
|
||||
var downloadUrl = '/documenti/' + id + '/download';
|
||||
|
||||
document.getElementById('previewFrame').src = previewUrl;
|
||||
document.getElementById('previewDownloadBtn').href = downloadUrl;
|
||||
document.getElementById('previewModalTitle').textContent = 'Anteprima';
|
||||
|
||||
if (mimeType && mimeType.startsWith('image/')) {
|
||||
document.getElementById('previewDownloadBtn').style.display = 'inline-block';
|
||||
} else {
|
||||
document.getElementById('previewDownloadBtn').style.display = 'none';
|
||||
}
|
||||
|
||||
$('#previewModal').modal('show');
|
||||
}
|
||||
|
||||
document.getElementById('avatar-input').addEventListener('change', function(e) {
|
||||
var fileName = e.target.files[0]?.name || 'Scegli file...';
|
||||
e.target.nextElementSibling.textContent = fileName;
|
||||
});
|
||||
|
||||
function uploadAvatar() {
|
||||
var input = document.getElementById('avatar-input');
|
||||
if (!input.files[0]) {
|
||||
document.getElementById('avatar-message').innerHTML = '<span class="text-danger">Seleziona un\'immagine</span>';
|
||||
return;
|
||||
}
|
||||
|
||||
var formData = new FormData();
|
||||
formData.append('avatar', input.files[0]);
|
||||
formData.append('_token', '<?php echo e(csrf_token()); ?>');
|
||||
|
||||
document.getElementById('avatar-message').innerHTML = '<span class="text-info"><i class="fas fa-spinner fa-spin"></i> Caricamento...</span>';
|
||||
|
||||
fetch('<?php echo e(url('/individui/' . $individuo->id . '/avatar')); ?>', {
|
||||
method: 'POST',
|
||||
body: formData
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data.success) {
|
||||
document.getElementById('avatar-message').innerHTML = '<span class="text-success">Avatar caricato!</span>';
|
||||
setTimeout(function() { window.location.reload(); }, 500);
|
||||
} else {
|
||||
document.getElementById('avatar-message').innerHTML = '<span class="text-danger">' + (data.message || 'Errore') + '</span>';
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
document.getElementById('avatar-message').innerHTML = '<span class="text-danger">Errore: ' + error + '</span>';
|
||||
});
|
||||
}
|
||||
|
||||
function deleteAvatar() {
|
||||
if (!confirm('Rimuovere l\'avatar?')) return;
|
||||
|
||||
fetch('<?php echo e(url('/individui/' . $individuo->id . '/avatar')); ?>', {
|
||||
method: 'DELETE',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': '<?php echo e(csrf_token()); ?>',
|
||||
'Accept': 'application/json'
|
||||
}
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data.success) {
|
||||
window.location.reload();
|
||||
} else {
|
||||
alert(data.message || 'Errore');
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
alert('Errore: ' + error);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php echo $__env->make('layouts.adminlte', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/glastree/resources/views/individui/show.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,4 @@
|
||||
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" <?php echo e($attributes); ?>>
|
||||
<path d="M9.75 2.56944C9.75 3.29815 8.07107 3.88889 6 3.88889C3.92893 3.88889 2.25 3.29815 2.25 2.56944M9.75 2.56944C9.75 1.84074 8.07107 1.25 6 1.25C3.92893 1.25 2.25 1.84074 2.25 2.56944M9.75 2.56944V9.43056C9.75 10.1593 8.07107 10.75 6 10.75C3.92893 10.75 2.25 10.1593 2.25 9.43056V2.56944M9.75 5.94434C9.75 6.67304 8.07107 7.26378 6 7.26378C3.92893 7.26378 2.25 6.67304 2.25 5.94434" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/resources/exceptions/renderer/components/icons/database.blade.php ENDPATH**/ ?>
|
||||
|
After Width: | Height: | Size: 763 B |
@@ -0,0 +1,220 @@
|
||||
<?php $__env->startSection('title', 'Nuovo Individuo'); ?>
|
||||
<?php $__env->startSection('page_title', 'Nuovo Individuo'); ?>
|
||||
|
||||
<?php $__env->startSection('content'); ?>
|
||||
<form action="/individui" method="POST">
|
||||
<?php echo csrf_field(); ?>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="card card-primary">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><i class="fas fa-user mr-2"></i>Dati Anagrafici</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label>Codice ID</label>
|
||||
<input type="text" class="form-control" value="sarà generato automaticamente" disabled>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Cognome *</label>
|
||||
<input type="text" name="cognome" class="form-control <?php $__errorArgs = ['cognome'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>" value="<?php echo e(old('cognome')); ?>" required>
|
||||
<?php $__errorArgs = ['cognome'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="invalid-feedback"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Nome *</label>
|
||||
<input type="text" name="nome" class="form-control <?php $__errorArgs = ['nome'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>" value="<?php echo e(old('nome')); ?>" required>
|
||||
<?php $__errorArgs = ['nome'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="invalid-feedback"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Data di nascita</label>
|
||||
<input type="date" name="data_nascita" class="form-control" value="<?php echo e(old('data_nascita')); ?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Genere</label>
|
||||
<select name="genere" class="form-control">
|
||||
<option value="">Seleziona...</option>
|
||||
<option value="M" <?php echo e(old('genere') === 'M' ? 'selected' : ''); ?>>Maschio</option>
|
||||
<option value="F" <?php echo e(old('genere') === 'F' ? 'selected' : ''); ?>>Femmina</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header"><h3 class="card-title"><i class="fas fa-map-marker-alt mr-2"></i>Residenza</h3></div>
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label>Indirizzo</label>
|
||||
<input type="text" name="indirizzo" class="form-control" value="<?php echo e(old('indirizzo')); ?>">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label>CAP</label>
|
||||
<input type="text" name="cap" class="form-control" value="<?php echo e(old('cap')); ?>">
|
||||
</div>
|
||||
<div class="form-group col-md-5">
|
||||
<label>Città</label>
|
||||
<input type="text" name="città" class="form-control" value="<?php echo e(old('città')); ?>">
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label>Provincia</label>
|
||||
<input type="text" name="sigla_provincia" class="form-control" maxlength="2" value="<?php echo e(old('sigla_provincia')); ?>">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-3">
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header"><h3 class="card-title"><i class="fas fa-id-card mr-2"></i>Documento di identità</h3></div>
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label>Tipo documento</label>
|
||||
<select name="tipo_documento" class="form-control">
|
||||
<option value="">Seleziona...</option>
|
||||
<option value="carta_identita" <?php echo e(old('tipo_documento') === 'carta_identita' ? 'selected' : ''); ?>>Carta d'Identità</option>
|
||||
<option value="patente" <?php echo e(old('tipo_documento') === 'patente' ? 'selected' : ''); ?>>Patente</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Numero documento</label>
|
||||
<input type="text" name="numero_documento" class="form-control" value="<?php echo e(old('numero_documento')); ?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Scadenza documento</label>
|
||||
<input type="date" name="scadenza_documento" class="form-control" value="<?php echo e(old('scadenza_documento')); ?>">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header"><h3 class="card-title"><i class="fas fa-sticky-note mr-2"></i>Note</h3></div>
|
||||
<div class="card-body">
|
||||
<div class="form-group mb-0">
|
||||
<textarea name="note" class="form-control" rows="4"><?php echo e(old('note')); ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><i class="fas fa-address-book mr-2"></i>Contatti</h3>
|
||||
<button type="button" class="btn btn-xs btn-success float-right" onclick="aggiungiRigaContatto()">
|
||||
<i class="fas fa-plus mr-1"></i> Aggiungi
|
||||
</button>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
<table class="table table-bordered mb-0" id="contatti-table">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th style="width: 20%;">Tipo</th>
|
||||
<th style="width: 30%;">Valore</th>
|
||||
<th style="width: 20%;">Etichetta</th>
|
||||
<th style="width: 10%;">Primario</th>
|
||||
<th style="width: 50px;"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="contatti-tbody">
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="no-contatti-msg" class="text-center text-muted py-4">
|
||||
<p class="mb-0">Nessun contatto. Clicca su "Aggiungi" per aggiungerne uno.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-3">
|
||||
<button type="submit" class="btn btn-success">
|
||||
<i class="fas fa-save mr-1"></i> Salva
|
||||
</button>
|
||||
<a href="/individui" class="btn btn-secondary">
|
||||
<i class="fas fa-times mr-1"></i> Annulla
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php $__env->startSection('scripts'); ?>
|
||||
<script>
|
||||
let contattoIndex = 0;
|
||||
|
||||
function aggiungiRigaContatto() {
|
||||
const tbody = document.getElementById('contatti-tbody');
|
||||
const noMsg = document.getElementById('no-contatti-msg');
|
||||
if (noMsg) noMsg.style.display = 'none';
|
||||
|
||||
const row = document.createElement('tr');
|
||||
row.innerHTML = `
|
||||
<td>
|
||||
<select name="contatti[${contattoIndex}][tipo]" class="form-control">
|
||||
<option value="">Seleziona...</option>
|
||||
<option value="telefono">Telefono</option>
|
||||
<option value="cellulare">Cellulare</option>
|
||||
<option value="email">Email</option>
|
||||
<option value="fax">Fax</option>
|
||||
<option value="web">Web</option>
|
||||
<option value="telegram">Telegram</option>
|
||||
<option value="whatsapp">WhatsApp</option>
|
||||
<option value="altro">Altro</option>
|
||||
</select>
|
||||
</td>
|
||||
<td><input type="text" name="contatti[${contattoIndex}][valore]" class="form-control" placeholder="Valore"></td>
|
||||
<td><input type="text" name="contatti[${contattoIndex}][etichetta]" class="form-control" placeholder="Etichetta"></td>
|
||||
<td class="text-center"><input type="checkbox" name="contatti[${contattoIndex}][is_primary]" value="1"></td>
|
||||
<td><button type="button" class="btn btn-danger btn-xs" onclick="rimuoviRiga(this)"><i class="fas fa-trash"></i></button></td>
|
||||
`;
|
||||
tbody.appendChild(row);
|
||||
contattoIndex++;
|
||||
}
|
||||
|
||||
function rimuoviRiga(btn) {
|
||||
const row = btn.closest('tr');
|
||||
row.remove();
|
||||
if (document.getElementById('contatti-tbody').children.length === 0) {
|
||||
const noMsg = document.getElementById('no-contatti-msg');
|
||||
if (noMsg) noMsg.style.display = 'block';
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php echo $__env->make('layouts.adminlte', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/glastree/resources/views/individui/create.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,79 @@
|
||||
<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;
|
||||
|
||||
$__newAttributes = [];
|
||||
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames((['routeParameters']));
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (in_array($__key, $__propNames)) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
} else {
|
||||
$__newAttributes[$__key] = $__value;
|
||||
}
|
||||
}
|
||||
|
||||
$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);
|
||||
|
||||
unset($__propNames);
|
||||
unset($__newAttributes);
|
||||
|
||||
foreach (array_filter((['routeParameters']), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
}
|
||||
|
||||
$__defined_vars = get_defined_vars();
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (array_key_exists($__key, $__defined_vars)) unset($$__key);
|
||||
}
|
||||
|
||||
unset($__defined_vars, $__key, $__value); ?>
|
||||
|
||||
<div class="flex flex-col gap-3">
|
||||
<h2 class="text-lg font-semibold">Routing parameters</h2>
|
||||
<?php if($routeParameters): ?>
|
||||
<div class="bg-white dark:bg-white/[2%] border border-neutral-200 dark:border-neutral-800 rounded-md overflow-x-auto p-5 text-sm font-mono shadow-xs">
|
||||
<?php if (isset($component)) { $__componentOriginal12cb286571f553eebcbe98210b217f94 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginal12cb286571f553eebcbe98210b217f94 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.syntax-highlight','data' => ['code' => $routeParameters,'language' => 'json']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::syntax-highlight'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['code' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($routeParameters),'language' => 'json']); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginal12cb286571f553eebcbe98210b217f94)): ?>
|
||||
<?php $attributes = $__attributesOriginal12cb286571f553eebcbe98210b217f94; ?>
|
||||
<?php unset($__attributesOriginal12cb286571f553eebcbe98210b217f94); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginal12cb286571f553eebcbe98210b217f94)): ?>
|
||||
<?php $component = $__componentOriginal12cb286571f553eebcbe98210b217f94; ?>
|
||||
<?php unset($__componentOriginal12cb286571f553eebcbe98210b217f94); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<?php if (isset($component)) { $__componentOriginal612ffe32146e3bd2ac6ba6076cca9520 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginal612ffe32146e3bd2ac6ba6076cca9520 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.empty-state','data' => ['message' => 'No routing parameters']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::empty-state'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['message' => 'No routing parameters']); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginal612ffe32146e3bd2ac6ba6076cca9520)): ?>
|
||||
<?php $attributes = $__attributesOriginal612ffe32146e3bd2ac6ba6076cca9520; ?>
|
||||
<?php unset($__attributesOriginal612ffe32146e3bd2ac6ba6076cca9520); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginal612ffe32146e3bd2ac6ba6076cca9520)): ?>
|
||||
<?php $component = $__componentOriginal612ffe32146e3bd2ac6ba6076cca9520; ?>
|
||||
<?php unset($__componentOriginal612ffe32146e3bd2ac6ba6076cca9520); ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/resources/exceptions/renderer/components/routing-parameter.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php $__env->startSection('title', __('Page Expired')); ?>
|
||||
<?php $__env->startSection('code', '419'); ?>
|
||||
<?php $__env->startSection('message', __('Page Expired')); ?>
|
||||
|
||||
<?php echo $__env->make('errors::minimal', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/419.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,6 @@
|
||||
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" <?php echo e($attributes); ?>>
|
||||
<path d="M2.75 2.75H5.614L5.316 2.114C5.069 1.587 4.54 1.25 3.958 1.25H2.25C1.422 1.25 0.75 1.922 0.75 2.75V4.75C0.75 3.645 1.645 2.75 2.75 2.75Z" />
|
||||
<path d="M0.75 4.75V2.75C0.75 1.922 1.422 1.25 2.25 1.25H3.958C4.54 1.25 5.069 1.587 5.316 2.114L5.614 2.75" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M2.75 2.75H9.25C10.355 2.75 11.25 3.645 11.25 4.75V8.25C11.25 9.355 10.355 10.25 9.25 10.25H2.75C1.645 10.25 0.75 9.355 0.75 8.25V4.75C0.75 3.645 1.645 2.75 2.75 2.75Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/resources/exceptions/renderer/components/icons/folder.blade.php ENDPATH**/ ?>
|
||||
|
After Width: | Height: | Size: 889 B |
@@ -0,0 +1,5 @@
|
||||
<?php $__env->startSection('title', __('Unauthorized')); ?>
|
||||
<?php $__env->startSection('code', '401'); ?>
|
||||
<?php $__env->startSection('message', __('Unauthorized')); ?>
|
||||
|
||||
<?php echo $__env->make('errors::minimal', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/401.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php if($paginator->hasPages()): ?>
|
||||
<nav>
|
||||
<ul class="pagination">
|
||||
|
||||
<?php if($paginator->onFirstPage()): ?>
|
||||
<li class="disabled" aria-disabled="true" aria-label="<?php echo app('translator')->get('pagination.previous'); ?>">
|
||||
<span aria-hidden="true">‹</span>
|
||||
</li>
|
||||
<?php else: ?>
|
||||
<li>
|
||||
<a href="<?php echo e($paginator->previousPageUrl()); ?>" rel="prev" aria-label="<?php echo app('translator')->get('pagination.previous'); ?>">‹</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php $__currentLoopData = $elements; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $element): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
|
||||
<?php if(is_string($element)): ?>
|
||||
<li class="disabled" aria-disabled="true"><span><?php echo e($element); ?></span></li>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php if(is_array($element)): ?>
|
||||
<?php $__currentLoopData = $element; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $page => $url): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<?php if($page == $paginator->currentPage()): ?>
|
||||
<li class="active" aria-current="page"><span><?php echo e($page); ?></span></li>
|
||||
<?php else: ?>
|
||||
<li><a href="<?php echo e($url); ?>"><?php echo e($page); ?></a></li>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
|
||||
|
||||
<?php if($paginator->hasMorePages()): ?>
|
||||
<li>
|
||||
<a href="<?php echo e($paginator->nextPageUrl()); ?>" rel="next" aria-label="<?php echo app('translator')->get('pagination.next'); ?>">›</a>
|
||||
</li>
|
||||
<?php else: ?>
|
||||
<li class="disabled" aria-disabled="true" aria-label="<?php echo app('translator')->get('pagination.next'); ?>">
|
||||
<span aria-hidden="true">›</span>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Pagination/resources/views/bootstrap-3.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,8 @@
|
||||
<section
|
||||
<?php echo e($attributes->merge(['class' => "w-full max-w-7xl mx-auto p-4 sm:p-14 border-x border-dashed border-neutral-300 dark:border-white/[9%]"])); ?>
|
||||
|
||||
>
|
||||
<?php echo e($slot); ?>
|
||||
|
||||
</section>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/resources/exceptions/renderer/components/section-container.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php $__env->startSection('title', __('Payment Required')); ?>
|
||||
<?php $__env->startSection('code', '402'); ?>
|
||||
<?php $__env->startSection('message', __('Payment Required')); ?>
|
||||
|
||||
<?php echo $__env->make('errors::minimal', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/402.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,631 @@
|
||||
<?php $__env->startSection('title', 'Documenti'); ?>
|
||||
<?php $__env->startSection('page_title', 'Gestione Documenti'); ?>
|
||||
|
||||
<?php
|
||||
$canWriteDocumenti = Auth::user()->canManage('documenti');
|
||||
$canDeleteDocumenti = Auth::user()->canDelete('documenti');
|
||||
?>
|
||||
|
||||
<?php $__env->startSection('content'); ?>
|
||||
<div class="card card-primary card-outline">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">
|
||||
<i class="fas fa-file mr-2"></i>Elenco Documenti
|
||||
</h3>
|
||||
<?php if($canWriteDocumenti): ?>
|
||||
<button type="button" class="btn btn-sm btn-success float-right" onclick="$('#uploadModal').modal('show')">
|
||||
<i class="fas fa-plus mr-1"></i> Nuovo Documento
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
<form id="massForm" method="POST">
|
||||
<?php echo csrf_field(); ?>
|
||||
<input type="hidden" name="_method" id="formMethod" value="POST">
|
||||
<?php if($canDeleteDocumenti): ?>
|
||||
<div class="p-3 bg-light border-bottom d-flex align-items-center flex-wrap gap-2">
|
||||
<span class="font-weight-bold mr-2">Azioni di massa:</span>
|
||||
<button type="button" class="btn btn-sm btn-danger" onclick="massAction('delete')">
|
||||
<i class="fas fa-trash mr-1"></i> Elimina selezionati
|
||||
</button>
|
||||
<?php if($canWriteDocumenti): ?>
|
||||
<button type="button" class="btn btn-sm btn-warning" onclick="$('#associateModal').modal('show')">
|
||||
<i class="fas fa-link mr-1"></i> Associa a...
|
||||
</button>
|
||||
<button type="button" class="btn btn-sm btn-info" onclick="$('#updateModal').modal('show')">
|
||||
<i class="fas fa-edit mr-1"></i> Cambia tipo/contesto
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
<span class="ml-auto text-muted small" id="selectedCount">0 selezionati</span>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<table class="table table-bordered table-hover table-striped mb-0">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th style="width: 40px;">
|
||||
<?php if($canDeleteDocumenti): ?>
|
||||
<input type="checkbox" id="selectAll" onchange="toggleAll(this)">
|
||||
<?php endif; ?>
|
||||
</th>
|
||||
<th style="width: 200px;">Nome</th>
|
||||
<th style="width: 180px;">Nome File</th>
|
||||
<th style="width: 100px;">Tipologia</th>
|
||||
<th style="width: 100px;">Visibilità</th>
|
||||
<th>Riferimento</th>
|
||||
<th style="width: 130px;">Data Inserimento</th>
|
||||
<th style="width: 120px;">Inserito da</th>
|
||||
<th style="width: 130px;">Azioni</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $__empty_1 = true; $__currentLoopData = $documenti; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $documento): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
|
||||
<tr>
|
||||
<td>
|
||||
<?php if($canDeleteDocumenti): ?>
|
||||
<input type="checkbox" name="ids[]" value="<?php echo e($documento->id); ?>" class="doc-checkbox" onchange="updateCount()">
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>
|
||||
<i class="fas fa-file text-secondary mr-1"></i>
|
||||
<?php echo e($documento->nome_file); ?>
|
||||
|
||||
</td>
|
||||
<td class="small text-muted"><?php echo e($documento->file_path); ?></td>
|
||||
<td>
|
||||
<span class="badge badge-<?php echo e($documento->tipologia === 'avatar' ? 'primary' : ($documento->tipologia === 'galleria' ? 'success' : 'secondary')); ?>">
|
||||
<?php echo e(ucfirst($documento->tipologia)); ?>
|
||||
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<?php switch($documento->visibilita):
|
||||
case ('individuo'): ?>
|
||||
<span class="badge badge-info">Individuo</span>
|
||||
<?php break; ?>
|
||||
<?php case ('gruppo'): ?>
|
||||
<span class="badge badge-success">Gruppo</span>
|
||||
<?php break; ?>
|
||||
<?php case ('evento'): ?>
|
||||
<span class="badge badge-warning">Evento</span>
|
||||
<?php break; ?>
|
||||
<?php case ('pubblico'): ?>
|
||||
<span class="badge badge-light">Pubblico</span>
|
||||
<?php break; ?>
|
||||
<?php case ('associazione'): ?>
|
||||
<span class="badge badge-dark">Associazione</span>
|
||||
<?php break; ?>
|
||||
<?php case ('federazione'): ?>
|
||||
<span class="badge badge-purple">Federazione</span>
|
||||
<?php break; ?>
|
||||
<?php default: ?>
|
||||
<span class="text-muted">-</span>
|
||||
<?php endswitch; ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if($documento->target): ?>
|
||||
<?php if($documento->target instanceof \App\Models\Individuo): ?>
|
||||
<a href="/individui/<?php echo e($documento->target->id); ?>">
|
||||
<i class="fas fa-user text-info mr-1"></i>
|
||||
<?php echo e($documento->target->cognome); ?> <?php echo e($documento->target->nome); ?>
|
||||
|
||||
</a>
|
||||
<?php elseif($documento->target instanceof \App\Models\Gruppo): ?>
|
||||
<a href="/gruppi/<?php echo e($documento->target->id); ?>">
|
||||
<i class="fas fa-folder text-warning mr-1"></i>
|
||||
<?php echo e($documento->target->nome); ?>
|
||||
|
||||
</a>
|
||||
<?php elseif($documento->target instanceof \App\Models\Evento): ?>
|
||||
<a href="/eventi/<?php echo e($documento->target->id); ?>">
|
||||
<i class="fas fa-calendar text-primary mr-1"></i>
|
||||
<?php echo e($documento->target->nome_evento); ?>
|
||||
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<span class="text-muted">-</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?php echo e($documento->created_at->format('d/m/Y H:i')); ?></td>
|
||||
<td>
|
||||
<?php if($documento->user): ?>
|
||||
<?php echo e($documento->user->name); ?>
|
||||
|
||||
<?php else: ?>
|
||||
<span class="text-muted">-</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if($documento->file_path): ?>
|
||||
<button type="button" class="btn btn-xs btn-primary" onclick="previewDoc(<?php echo e($documento->id); ?>, '<?php echo e($documento->mime_type); ?>')" title="Anteprima">
|
||||
<i class="fas fa-eye"></i>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
<?php if($canWriteDocumenti): ?>
|
||||
<a href="/documenti/<?php echo e($documento->id); ?>/edit" class="btn btn-xs btn-warning" title="Modifica">
|
||||
<i class="fas fa-edit"></i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php if($canDeleteDocumenti): ?>
|
||||
<form action="/documenti/<?php echo e($documento->id); ?>" method="POST" class="d-inline">
|
||||
<?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
|
||||
<button type="button" class="btn btn-xs btn-danger" onclick="deleteDocumento(<?php echo e($documento->id); ?>, '<?php echo e(e($documento->nome_file)); ?>')" title="Elimina">
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
|
||||
<tr>
|
||||
<td colspan="9" class="text-center text-muted py-4">
|
||||
<i class="fas fa-file fa-2x mb-2"></i>
|
||||
<p class="mb-0">Nessun documento presente</p>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<div class="p-3 border-top">
|
||||
<?php echo e($documenti->links()); ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="associateModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><i class="fas fa-link mr-2"></i>Associa a</h5>
|
||||
<button type="button" class="close" onclick="$('#associateModal').modal('hide')">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="associateForm" method="POST" action="/documenti/mass-associate">
|
||||
<?php echo csrf_field(); ?>
|
||||
<div class="form-group">
|
||||
<label>Tipo collegamento</label>
|
||||
<select name="target_type" class="form-control" required onchange="loadTargets(this.value)">
|
||||
<option value="">Seleziona...</option>
|
||||
<option value="individuo">Individuo</option>
|
||||
<option value="gruppo">Gruppo</option>
|
||||
<option value="evento">Evento</option>
|
||||
<option value="mailing">Mailing List</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Riferimento</label>
|
||||
<select name="target_id" class="form-control" required id="targetSelect">
|
||||
<option value="">Seleziona prima il tipo...</option>
|
||||
</select>
|
||||
</div>
|
||||
<input type="hidden" name="ids" id="associateIds">
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" onclick="$('#associateModal').modal('hide')">Annulla</button>
|
||||
<button type="button" class="btn btn-primary" onclick="submitAssociate()">Associa</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="updateModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><i class="fas fa-edit mr-2"></i>Cambia tipo/contesto</h5>
|
||||
<button type="button" class="close" onclick="$('#updateModal').modal('hide')">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="updateForm" method="POST" action="/documenti/mass-update">
|
||||
<?php echo csrf_field(); ?>
|
||||
<div class="form-group">
|
||||
<label>Nuova tipologia</label>
|
||||
<select name="tipologia" class="form-control">
|
||||
<option value="">Non modificare</option>
|
||||
<?php $__currentLoopData = $tipologie; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tip): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<option value="<?php echo e($tip->nome); ?>"><?php echo e($tip->descrizione ?? ucfirst($tip->nome)); ?></option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Nuovo contesto</label>
|
||||
<select name="visibilita" class="form-control">
|
||||
<option value="">Non modificare</option>
|
||||
<option value="pubblico">Pubblico</option>
|
||||
<option value="individuo">Individuo</option>
|
||||
<option value="gruppo">Gruppo</option>
|
||||
<option value="evento">Evento</option>
|
||||
<option value="associazione">Associazione</option>
|
||||
<option value="federazione">Federazione</option>
|
||||
<option value="mailing">Mailing List</option>
|
||||
</select>
|
||||
</div>
|
||||
<input type="hidden" name="ids" id="updateIds">
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" onclick="$('#updateModal').modal('hide')">Annulla</button>
|
||||
<button type="button" class="btn btn-primary" onclick="submitUpdate()">Aggiorna</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="previewModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog modal-lg" style="max-width: 90vw;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><i class="fas fa-eye mr-2"></i>Anteprima</h5>
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body p-0" style="min-height: 400px;">
|
||||
<iframe id="previewFrame" src="" style="width: 100%; height: 70vh; border: none;"></iframe>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a id="previewDownloadBtn" href="#" class="btn btn-primary" download>
|
||||
<i class="fas fa-download mr-1"></i> Scarica
|
||||
</a>
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Chiudi</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="uploadModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><i class="fas fa-upload mr-2"></i>Carica Nuovo Documento</h5>
|
||||
<button type="button" class="close" onclick="$('#uploadModal').modal('hide')">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
<form action="/documenti" method="POST" enctype="multipart/form-data">
|
||||
<?php echo csrf_field(); ?>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label>Nome *</label>
|
||||
<input type="text" name="nome_file" class="form-control" placeholder="Nome del documento" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Tipologia *</label>
|
||||
<select name="tipologia" class="form-control" required>
|
||||
<?php $__currentLoopData = $tipologie; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tip): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<option value="<?php echo e($tip->nome); ?>"><?php echo e($tip->descrizione ?? ucfirst($tip->nome)); ?></option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Visibilità *</label>
|
||||
<select name="visibilita" class="form-control" required id="uploadVisibilita" onchange="loadUploadTargets()">
|
||||
<option value="">Seleziona...</option>
|
||||
<option value="pubblico">Pubblico</option>
|
||||
<option value="individuo">Individuo</option>
|
||||
<option value="gruppo">Gruppo</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group" id="uploadTargetGroup" style="display:none;">
|
||||
<label>Riferimento</label>
|
||||
<select name="visibilita_target_id" class="form-control" id="uploadTargetId">
|
||||
<option value="">Seleziona...</option>
|
||||
</select>
|
||||
<input type="hidden" name="visibilita_target_type" id="uploadTargetType">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>File *</label>
|
||||
<input type="file" name="file" class="form-control" required>
|
||||
<small class="text-muted">Max 10MB</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" onclick="$('#uploadModal').modal('hide')">Annulla</button>
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<i class="fas fa-upload mr-1"></i> Carica
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="deleteConfirmModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header bg-danger text-white">
|
||||
<h5 class="modal-title"><i class="fas fa-exclamation-triangle mr-2"></i>Conferma Eliminazione</h5>
|
||||
<button type="button" class="close text-white" onclick="$('#deleteConfirmModal').modal('hide')">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p id="deleteConfirmMessage"></p>
|
||||
<div id="deleteConfirmLinks" class="mt-3"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" onclick="$('#deleteConfirmModal').modal('hide')">Annulla</button>
|
||||
<button type="button" class="btn btn-danger" id="confirmDeleteBtn">
|
||||
<i class="fas fa-trash mr-1"></i> Elimina comunque
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="massDeleteConfirmModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header bg-danger text-white">
|
||||
<h5 class="modal-title"><i class="fas fa-exclamation-triangle mr-2"></i>Conferma Eliminazione Multipla</h5>
|
||||
<button type="button" class="close text-white" onclick="$('#massDeleteConfirmModal').modal('hide')">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Stai per eliminare <strong id="massDeleteCount">0</strong> documenti.</p>
|
||||
<div id="massDeleteLinks" class="mt-3"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" onclick="$('#massDeleteConfirmModal').modal('hide')">Annulla</button>
|
||||
<button type="button" class="btn btn-danger" id="confirmMassDeleteBtn">
|
||||
<i class="fas fa-trash mr-1"></i> Elimina comunque
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php $__env->startSection('scripts'); ?>
|
||||
<script>
|
||||
const individui = <?php echo json_encode($individui->map(fn($i) => ['id' => $i->id, 'label' => $i->cognome . ' ' . $i->nome]), 512) ?>;
|
||||
const gruppi = <?php echo json_encode($gruppi->map(fn($g) => ['id' => $g->id, 'label' => $g->nome]), 512) ?>;
|
||||
const eventi = <?php echo json_encode($eventi->map(fn($e) => ['id' => $e->id, 'label' => $e->nome_evento]), 512) ?>;
|
||||
const mailingLists = <?php echo json_encode($mailingLists ?? [], 15, 512) ?>;
|
||||
|
||||
function toggleAll(source) {
|
||||
document.querySelectorAll('.doc-checkbox').forEach(cb => cb.checked = source.checked);
|
||||
updateCount();
|
||||
}
|
||||
|
||||
function updateCount() {
|
||||
const count = document.querySelectorAll('.doc-checkbox:checked').length;
|
||||
document.getElementById('selectedCount').textContent = count + ' selezionati';
|
||||
}
|
||||
|
||||
function getSelectedIds() {
|
||||
return Array.from(document.querySelectorAll('.doc-checkbox:checked')).map(cb => cb.value);
|
||||
}
|
||||
|
||||
let pendingMassDeleteIds = [];
|
||||
|
||||
function massAction(action) {
|
||||
const ids = getSelectedIds();
|
||||
if (ids.length === 0) {
|
||||
alert('Seleziona almeno un documento');
|
||||
return;
|
||||
}
|
||||
|
||||
if (action === 'delete') {
|
||||
fetch('/documenti/check-links', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': '<?php echo e(csrf_token()); ?>',
|
||||
'Content-Type': 'application/json',
|
||||
'Accept': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({ ids: ids })
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
pendingMassDeleteIds = ids;
|
||||
document.getElementById('massDeleteCount').textContent = ids.length;
|
||||
|
||||
if (data.linked_count > 0) {
|
||||
let linksHtml = '<div class="alert alert-warning mb-0"><p><strong>Attenzione:</strong> ' + data.linked_count + ' documento(i) sono collegati a elementi nel database:</p><ul class="mb-0">';
|
||||
data.links.forEach(function(link) {
|
||||
if (link.url) {
|
||||
linksHtml += '<li><a href="' + link.url + '" target="_blank">' + link.name + '</a></li>';
|
||||
} else {
|
||||
linksHtml += '<li>' + link.name + '</li>';
|
||||
}
|
||||
});
|
||||
linksHtml += '</ul></div>';
|
||||
document.getElementById('massDeleteLinks').innerHTML = linksHtml;
|
||||
} else {
|
||||
document.getElementById('massDeleteLinks').innerHTML = '<div class="alert alert-info mb-0">Nessun documento risulta collegato.</div>';
|
||||
}
|
||||
|
||||
document.getElementById('confirmMassDeleteBtn').onclick = function() { performMassDelete(); };
|
||||
$('#massDeleteConfirmModal').modal('show');
|
||||
})
|
||||
.catch(error => {
|
||||
alert('Errore controllo collegamenti: ' + error.message);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function performMassDelete() {
|
||||
const ids = pendingMassDeleteIds;
|
||||
$('#massDeleteConfirmModal').modal('hide');
|
||||
|
||||
fetch('/documenti/mass-destroy', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': '<?php echo e(csrf_token()); ?>',
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
body: 'ids=' + ids.join(',')
|
||||
})
|
||||
.then(response => {
|
||||
if (response.redirected) {
|
||||
window.location.href = response.url;
|
||||
} else {
|
||||
window.location.reload();
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
alert('Errore: ' + error.message);
|
||||
});
|
||||
}
|
||||
|
||||
function deleteDocumento(id, nomeFile) {
|
||||
fetch('/documenti/' + id + '/check-links', {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': '<?php echo e(csrf_token()); ?>',
|
||||
'Accept': 'application/json',
|
||||
}
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data.has_links) {
|
||||
let linksHtml = '<div class="alert alert-warning mb-0"><p class="mb-2"><strong>Attenzione:</strong> Questo documento è collegato a:</p><ul class="mb-0">';
|
||||
data.links.forEach(function(link) {
|
||||
if (link.url) {
|
||||
linksHtml += '<li><a href="' + link.url + '" target="_blank">' + link.name + '</a></li>';
|
||||
} else {
|
||||
linksHtml += '<li>' + link.name + '</li>';
|
||||
}
|
||||
});
|
||||
linksHtml += '</ul></div>';
|
||||
document.getElementById('deleteConfirmLinks').innerHTML = linksHtml;
|
||||
document.getElementById('deleteConfirmMessage').textContent = 'Eliminare il documento "' + nomeFile + '"?';
|
||||
document.getElementById('confirmDeleteBtn').onclick = function() { performDelete(id); };
|
||||
$('#deleteConfirmModal').modal('show');
|
||||
} else {
|
||||
if (confirm('Eliminare il documento "' + nomeFile + '"?')) {
|
||||
performDelete(id);
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
alert('Errore: ' + error.message);
|
||||
});
|
||||
}
|
||||
|
||||
function performDelete(id) {
|
||||
fetch('/documenti/' + id, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': '<?php echo e(csrf_token()); ?>',
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
body: '_method=DELETE'
|
||||
})
|
||||
.then(response => {
|
||||
if (response.redirected) {
|
||||
window.location.href = response.url;
|
||||
} else {
|
||||
window.location.reload();
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
alert('Errore: ' + error.message);
|
||||
});
|
||||
}
|
||||
|
||||
function previewDoc(id, mimeType) {
|
||||
document.getElementById('previewFrame').src = '/documenti/' + id + '/preview';
|
||||
document.getElementById('previewDownloadBtn').href = '/documenti/' + id + '/download';
|
||||
$('#previewModal').modal('show');
|
||||
}
|
||||
|
||||
function loadUploadTargets() {
|
||||
const visibilita = document.getElementById('uploadVisibilita').value;
|
||||
const group = document.getElementById('uploadTargetGroup');
|
||||
const select = document.getElementById('uploadTargetId');
|
||||
const type = document.getElementById('uploadTargetType');
|
||||
|
||||
if (visibilita === 'pubblico') {
|
||||
group.style.display = 'none';
|
||||
select.innerHTML = '<option value="">Seleziona...</option>';
|
||||
type.value = '';
|
||||
return;
|
||||
}
|
||||
|
||||
group.style.display = 'block';
|
||||
let data = [];
|
||||
if (visibilita === 'individuo') {
|
||||
data = individui;
|
||||
type.value = 'individuo';
|
||||
} else if (visibilita === 'gruppo') {
|
||||
data = gruppi;
|
||||
type.value = 'gruppo';
|
||||
}
|
||||
|
||||
select.innerHTML = '<option value="">Seleziona...</option>';
|
||||
data.forEach(item => {
|
||||
const opt = document.createElement('option');
|
||||
opt.value = item.id;
|
||||
opt.textContent = item.label;
|
||||
select.appendChild(opt);
|
||||
});
|
||||
}
|
||||
|
||||
function loadTargets(type) {
|
||||
const select = document.getElementById('targetSelect');
|
||||
select.innerHTML = '<option value="">Caricamento...</option>';
|
||||
|
||||
let data = [];
|
||||
if (type === 'individuo') data = individui;
|
||||
else if (type === 'gruppo') data = gruppi;
|
||||
else if (type === 'evento') data = eventi;
|
||||
else if (type === 'mailing') data = mailingLists;
|
||||
|
||||
select.innerHTML = '<option value="">Seleziona...</option>';
|
||||
data.forEach(item => {
|
||||
const opt = document.createElement('option');
|
||||
opt.value = item.id;
|
||||
opt.textContent = item.label;
|
||||
select.appendChild(opt);
|
||||
});
|
||||
}
|
||||
|
||||
function submitAssociate() {
|
||||
const ids = getSelectedIds();
|
||||
if (ids.length === 0) {
|
||||
alert('Seleziona almeno un documento');
|
||||
return;
|
||||
}
|
||||
const targetType = document.querySelector('#associateForm select[name="target_type"]').value;
|
||||
const targetId = document.getElementById('targetSelect').value;
|
||||
if (!targetType || !targetId) {
|
||||
alert('Seleziona tipo e riferimento');
|
||||
return;
|
||||
}
|
||||
document.getElementById('associateIds').value = ids.join(',');
|
||||
document.getElementById('associateForm').submit();
|
||||
}
|
||||
|
||||
function submitUpdate() {
|
||||
const ids = getSelectedIds();
|
||||
console.log('Selected IDs:', ids);
|
||||
if (ids.length === 0) {
|
||||
alert('Seleziona almeno un documento');
|
||||
return;
|
||||
}
|
||||
const tipologia = document.querySelector('#updateForm select[name="tipologia"]').value;
|
||||
const visibilita = document.querySelector('#updateForm select[name="visibilita"]').value;
|
||||
console.log('Tipologia:', tipologia, 'Visibilita:', visibilita);
|
||||
if (!tipologia && !visibilita) {
|
||||
alert('Seleziona almeno una tipologia o un contesto da modificare');
|
||||
return;
|
||||
}
|
||||
document.getElementById('updateIds').value = ids.join(',');
|
||||
console.log('Form submitting with IDs:', document.getElementById('updateIds').value);
|
||||
document.getElementById('updateForm').submit();
|
||||
}
|
||||
</script>
|
||||
<?php $__env->stopSection(); ?>
|
||||
<?php echo $__env->make('layouts.adminlte', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/glastree/resources/views/documenti/index.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,444 @@
|
||||
<?php $__env->startSection('title', 'Impostazioni Email'); ?>
|
||||
<?php $__env->startSection('page_title', 'Configurazione Email'); ?>
|
||||
|
||||
<?php $__env->startSection('breadcrumbs'); ?>
|
||||
<li class="breadcrumb-item"><a href="<?php echo e(route('dashboard')); ?>">Dashboard</a></li>
|
||||
<li class="breadcrumb-item"><a href="/impostazioni">Impostazioni</a></li>
|
||||
<li class="breadcrumb-item active">Email Settings</li>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php $__env->startSection('content'); ?>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="card card-secondary">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Sezioni</h3>
|
||||
</div>
|
||||
<div class="list-group list-group-flush">
|
||||
<a href="#imap" class="list-group-item list-group-item-action active" data-toggle="tab">
|
||||
<i class="nav-icon fas fa-server"></i> Server IMAP
|
||||
</a>
|
||||
<a href="#smtp" class="list-group-item list-group-item-action" data-toggle="tab">
|
||||
<i class="nav-icon fas fa-paper-plane"></i> Server SMTP (Invio)
|
||||
</a>
|
||||
<a href="#account" class="list-group-item list-group-item-action" data-toggle="tab">
|
||||
<i class="nav-icon fas fa-user"></i> Account
|
||||
</a>
|
||||
<a href="#sync" class="list-group-item list-group-item-action" data-toggle="tab">
|
||||
<i class="nav-icon fas fa-sync"></i> Sincronizzazione
|
||||
</a>
|
||||
<a href="#signature" class="list-group-item list-group-item-action" data-toggle="tab">
|
||||
<i class="nav-icon fas fa-signature"></i> Firma
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<form method="POST" action="<?php echo e(route('impostazioni.email.save')); ?>">
|
||||
<?php echo csrf_field(); ?>
|
||||
<input type="hidden" name="id" value="<?php echo e($settings->id ?? 1); ?>">
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="imap">
|
||||
<div class="card card-primary">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Configurazione Server IMAP</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<?php if(session('success')): ?>
|
||||
<div class="alert alert-success"><?php echo e(session('success')); ?></div>
|
||||
<?php endif; ?>
|
||||
<?php if(session('error')): ?>
|
||||
<div class="alert alert-danger"><?php echo e(session('error')); ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="imap_host">Host IMAP</label>
|
||||
<input type="text" name="imap_host" id="imap_host" class="form-control"
|
||||
value="<?php echo e($settings->imap_host ?? 'imap.gmail.com'); ?>"
|
||||
placeholder="es. imap.gmail.com">
|
||||
<small class="text-muted">Gmail: imap.gmail.com | Outlook: outlook.office365.com</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="imap_port">Porta</label>
|
||||
<input type="number" name="imap_port" id="imap_port" class="form-control"
|
||||
value="<?php echo e($settings->imap_port ?? 993); ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="imap_encryption">Crittografia</label>
|
||||
<select name="imap_encryption" id="imap_encryption" class="form-control">
|
||||
<option value="ssl" <?php echo e(($settings->imap_encryption ?? 'ssl') == 'ssl' ? 'selected' : ''); ?>>SSL</option>
|
||||
<option value="tls" <?php echo e(($settings->imap_encryption ?? '') == 'tls' ? 'selected' : ''); ?>>TLS</option>
|
||||
<option value="none" <?php echo e(($settings->imap_encryption ?? '') == 'none' ? 'selected' : ''); ?>>Nessuna</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="smtp">
|
||||
<div class="card card-primary">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Configurazione Server SMTP (per invio email)</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="alert alert-info">
|
||||
<i class="fas fa-info-circle"></i>
|
||||
<strong>Nota:</strong> Per inviare email devi configurare il server SMTP.
|
||||
Per Gmail, usa <code>smtp.gmail.com</code> sulla porta <code>587</code> con TLS
|
||||
e genera una <a href="https://support.google.com/accounts/answer/185833" target="_blank">App Password</a>.
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="smtp_host">Host SMTP</label>
|
||||
<input type="text" name="smtp_host" id="smtp_host" class="form-control"
|
||||
value="<?php echo e($settings->smtp_host ?? 'smtp.gmail.com'); ?>"
|
||||
placeholder="es. smtp.gmail.com">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="smtp_port">Porta</label>
|
||||
<input type="number" name="smtp_port" id="smtp_port" class="form-control"
|
||||
value="<?php echo e($settings->smtp_port ?? 587); ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="smtp_encryption">Crittografia</label>
|
||||
<select name="smtp_encryption" id="smtp_encryption" class="form-control">
|
||||
<option value="tls" <?php echo e(($settings->smtp_encryption ?? 'tls') == 'tls' ? 'selected' : ''); ?>>TLS</option>
|
||||
<option value="ssl" <?php echo e(($settings->smtp_encryption ?? '') == 'ssl' ? 'selected' : ''); ?>>SSL</option>
|
||||
<option value="none" <?php echo e(($settings->smtp_encryption ?? '') == 'none' ? 'selected' : ''); ?>>Nessuna</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="smtp_username">Username SMTP</label>
|
||||
<input type="text" name="smtp_username" id="smtp_username" class="form-control"
|
||||
value="<?php echo e($settings->smtp_username ?? ''); ?>"
|
||||
placeholder="lascia vuoto per usare l'account IMAP">
|
||||
<small class="text-muted">Generalmente uguale all'account email</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="smtp_password">Password SMTP / App Password</label>
|
||||
<input type="password" name="smtp_password" id="smtp_password" class="form-control"
|
||||
placeholder="<?php echo e($settings->smtp_password ? '••••••••' : ''); ?>">
|
||||
<small class="text-muted">Lascia vuoto per usare la password IMAP</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="account">
|
||||
<div class="card card-primary">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Credenziali Account</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="imap_username">Username/Email</label>
|
||||
<input type="text" name="imap_username" id="imap_username" class="form-control"
|
||||
value="<?php echo e($settings->imap_username ?? ''); ?>"
|
||||
placeholder="es. tuo@gmail.com">
|
||||
<small class="text-muted">Per Gmail usa l'indirizzo completo</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="imap_password">Password / App Password</label>
|
||||
<input type="password" name="imap_password" id="imap_password" class="form-control"
|
||||
placeholder="">
|
||||
<small class="text-muted">
|
||||
<a href="https://support.google.com/accounts/answer/185833" target="_blank">
|
||||
Per Gmail: genera una App Password
|
||||
</a>
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="email_address">Email Indirizzo</label>
|
||||
<input type="email" name="email_address" id="email_address" class="form-control"
|
||||
value="<?php echo e($settings->email_address ?? ''); ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="email_name">Nome Visualizzato</label>
|
||||
<input type="text" name="email_name" id="email_name" class="form-control"
|
||||
value="<?php echo e($settings->email_name ?? ''); ?>"
|
||||
placeholder="es. Nome Cognome">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="reply_to">Email Risposta (Reply-To)</label>
|
||||
<input type="email" name="reply_to" id="reply_to" class="form-control"
|
||||
value="<?php echo e($settings->reply_to ?? ''); ?>">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="sync">
|
||||
<div class="card card-primary">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Sincronizzazione</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="sync_interval_minutes">Intervallo Sync (minuti)</label>
|
||||
<select name="sync_interval_minutes" id="sync_interval_minutes" class="form-control">
|
||||
<option value="1" <?php echo e(($settings->sync_interval_minutes ?? 5) == 1 ? 'selected' : ''); ?>>1 minuto</option>
|
||||
<option value="5" <?php echo e(($settings->sync_interval_minutes ?? 5) == 5 ? 'selected' : ''); ?>>5 minuti</option>
|
||||
<option value="15" <?php echo e(($settings->sync_interval_minutes ?? 5) == 15 ? 'selected' : ''); ?>>15 minuti</option>
|
||||
<option value="30" <?php echo e(($settings->sync_interval_minutes ?? 5) == 30 ? 'selected' : ''); ?>>30 minuti</option>
|
||||
<option value="60" <?php echo e(($settings->sync_interval_minutes ?? 5) == 60 ? 'selected' : ''); ?>>1 ora</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>Stato Connessione</label>
|
||||
<div class="mt-2">
|
||||
<?php if($settings->last_sync_at): ?>
|
||||
<span class="badge badge-success">
|
||||
<i class="fas fa-check-circle"></i> Ultimo sync: <?php echo e($settings->last_sync_at->format('d/m/Y H:i')); ?>
|
||||
|
||||
</span>
|
||||
<?php else: ?>
|
||||
<span class="badge badge-secondary">
|
||||
<i class="fas fa-clock"></i> Mai sincronizzato
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-switch">
|
||||
<input type="checkbox" class="custom-control-input" id="is_active"
|
||||
name="is_active" value="1" <?php echo e(($settings->is_active ?? false) ? 'checked' : ''); ?>>
|
||||
<label class="custom-control-label" for="is_active">Account Email Attivo</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="signature">
|
||||
<div class="card card-primary">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Firma Email</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-switch">
|
||||
<input type="checkbox" class="custom-control-input" id="signature_enabled"
|
||||
name="signature_enabled" value="1" <?php echo e(($settings->signature_enabled ?? true) ? 'checked' : ''); ?>>
|
||||
<label class="custom-control-label" for="signature_enabled">Attiva firma automatica</label>
|
||||
</div>
|
||||
<small class="text-muted">Quando attivo, la firma verrà aggiunta in fondo a ogni email inviata</small>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="form-group">
|
||||
<label for="signature">Testo Firma (formato HTML)</label>
|
||||
<div id="signature-editor" style="height: 200px;"></div>
|
||||
<input type="hidden" name="signature" id="signature_input" value="<?php echo e($settings->signature ?? ''); ?>">
|
||||
<small class="text-muted">Usa il riquadro sopra per comporre la tua firma. HTML supportato.</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-footer">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<i class="fas fa-save mr-1"></i> Salva Impostazioni
|
||||
</button>
|
||||
<button type="button" class="btn btn-info ml-2" onclick="testConnection()">
|
||||
<i class="fas fa-plug mr-1"></i> Test Connessione IMAP
|
||||
</button>
|
||||
<button type="button" class="btn btn-success ml-2" onclick="testSmtp()">
|
||||
<i class="fas fa-paper-plane mr-1"></i> Test Invio Email (SMTP)
|
||||
</button>
|
||||
<a href="<?php echo e(route('impostazioni.email.sync')); ?>" class="btn btn-warning ml-2">
|
||||
<i class="fas fa-sync mr-1"></i> Sincronizza Ora
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php $__env->startSection('scripts'); ?>
|
||||
<script>
|
||||
function testConnection() {
|
||||
$.ajax({
|
||||
url: '<?php echo e(route('impostazioni.email.test')); ?>',
|
||||
method: 'POST',
|
||||
headers: { 'X-CSRF-TOKEN': '<?php echo e(csrf_token()); ?>' },
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
alert('✅ ' + response.message);
|
||||
} else {
|
||||
alert('❌ ' + response.message);
|
||||
}
|
||||
},
|
||||
error: function() {
|
||||
alert('❌ Errore nella richiesta');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function testSmtp() {
|
||||
var email = prompt('Inserisci l\'indirizzo email a cui inviare il test:');
|
||||
if (!email) return;
|
||||
|
||||
if (!email.includes('@')) {
|
||||
alert('⚠️ Indirizzo email non valido');
|
||||
return;
|
||||
}
|
||||
|
||||
var btn = event.target;
|
||||
btn.disabled = true;
|
||||
btn.innerHTML = '<i class="fas fa-spinner fa-spin"></i> Invio...';
|
||||
|
||||
$.ajax({
|
||||
url: '<?php echo e(route('impostazioni.email.testSmtp')); ?>',
|
||||
method: 'POST',
|
||||
headers: { 'X-CSRF-TOKEN': '<?php echo e(csrf_token()); ?>' },
|
||||
data: { email: email },
|
||||
timeout: 30000,
|
||||
success: function(response) {
|
||||
btn.disabled = false;
|
||||
btn.innerHTML = '<i class="fas fa-paper-plane mr-1"></i> Test Invio Email (SMTP)';
|
||||
if (response.success) {
|
||||
alert('✅ ' + response.message);
|
||||
} else {
|
||||
alert('❌ ' + response.message);
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
btn.disabled = false;
|
||||
btn.innerHTML = '<i class="fas fa-paper-plane mr-1"></i> Test Invio Email (SMTP)';
|
||||
if (xhr.responseJSON && xhr.responseJSON.message) {
|
||||
alert('❌ ' + xhr.responseJSON.message);
|
||||
} else {
|
||||
alert('❌ Errore: ' + status + ' - ' + error);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function createEditor() {
|
||||
var container = document.querySelector('#signature-editor');
|
||||
if (!container || container.querySelector('.ql-toolbar')) return;
|
||||
|
||||
var quill = new Quill('#signature-editor', {
|
||||
theme: 'snow',
|
||||
modules: {
|
||||
toolbar: [
|
||||
['bold', 'italic', 'underline'],
|
||||
[{ 'color': [] }, { 'background': [] }],
|
||||
[{ 'header': 1 }, { 'header': 2 }, { 'header': 3 }],
|
||||
[{ 'align': [] }],
|
||||
[{ 'list': 'ordered'}, { 'list': 'bullet' }],
|
||||
['link', 'image'],
|
||||
['clean', 'code']
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
var signatureInput = document.getElementById('signature_input');
|
||||
var isEditingHtml = false;
|
||||
|
||||
quill.getModule('toolbar').addHandler('code', function() {
|
||||
if (!isEditingHtml) {
|
||||
var textarea = document.createElement('textarea');
|
||||
textarea.className = 'ql-editor';
|
||||
textarea.style.cssText = 'font-family: monospace; min-height: 150px; width: 100%;';
|
||||
textarea.value = signatureInput.value;
|
||||
quill.root.innerHTML = '';
|
||||
quill.root.appendChild(textarea);
|
||||
textarea.focus();
|
||||
isEditingHtml = true;
|
||||
} else {
|
||||
var textarea = quill.root.querySelector('textarea');
|
||||
if (textarea) {
|
||||
signatureInput.value = textarea.value;
|
||||
quill.root.innerHTML = textarea.value;
|
||||
}
|
||||
isEditingHtml = false;
|
||||
}
|
||||
});
|
||||
|
||||
if (signatureInput.value) {
|
||||
quill.root.innerHTML = signatureInput.value;
|
||||
}
|
||||
|
||||
quill.on('text-change', function() {
|
||||
if (!isEditingHtml) {
|
||||
signatureInput.value = quill.root.innerHTML;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function initSignatureEditor() {
|
||||
if (document.querySelector('#signature-editor .ql-toolbar')) return;
|
||||
|
||||
if (typeof Quill === 'undefined') {
|
||||
var script = document.createElement('script');
|
||||
script.src = 'https://cdn.quilljs.com/1.3.7/quill.min.js';
|
||||
script.onload = createEditor;
|
||||
document.head.appendChild(script);
|
||||
|
||||
var link = document.createElement('link');
|
||||
link.rel = 'stylesheet';
|
||||
link.href = 'https://cdn.quilljs.com/1.3.7/quill.snow.css';
|
||||
document.head.appendChild(link);
|
||||
} else {
|
||||
createEditor();
|
||||
}
|
||||
}
|
||||
|
||||
$('a[data-toggle="tab"]').on('shown.bs.tab', function(e) {
|
||||
if ($(e.target).attr('href') === '#signature') {
|
||||
setTimeout(initSignatureEditor, 100);
|
||||
}
|
||||
});
|
||||
|
||||
if ($('#signature').hasClass('active')) {
|
||||
initSignatureEditor();
|
||||
}
|
||||
</script>
|
||||
<?php $__env->stopSection(); ?>
|
||||
<?php echo $__env->make('layouts.adminlte', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/glastree/resources/views/admin/email-settings/index.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php $__env->startSection('title', 'Gestione Ruoli'); ?>
|
||||
<?php $__env->startSection('page_title', 'Gestione Ruoli'); ?>
|
||||
|
||||
<?php $__env->startSection('breadcrumbs'); ?>
|
||||
<li class="breadcrumb-item active">Admin</li>
|
||||
<li class="breadcrumb-item active">Ruoli</li>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php $__env->startSection('content'); ?>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Ruoli Predefiniti</h3>
|
||||
<a href="/admin/ruoli/create" class="btn btn-success btn-sm float-right">
|
||||
<i class="fas fa-plus"></i> Nuovo Ruolo
|
||||
</a>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nome</th>
|
||||
<th>Descrizione</th>
|
||||
<th>Utenti</th>
|
||||
<th>Permessi</th>
|
||||
<th style="width: 100px;">Azioni</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $__currentLoopData = $ruoli; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ruolo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<tr>
|
||||
<td><strong><?php echo e($ruolo->name); ?></strong></td>
|
||||
<td><?php echo e($ruolo->description); ?></td>
|
||||
<td><span class="badge badge-info"><?php echo e($ruolo->users_count); ?></span></td>
|
||||
<td>
|
||||
<?php $__currentLoopData = $ruolo->permissions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $module => $level): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<span class="badge badge-<?php echo e($level == 2 ? 'success' : ($level == 1 ? 'info' : 'secondary')); ?>">
|
||||
<?php echo e(ucfirst($module)); ?>: <?php echo e($level == 2 ? 'Full' : ($level == 1 ? 'Read' : 'None')); ?>
|
||||
|
||||
</span>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?php echo e(url('/admin/ruoli/' . $ruolo->id . '/edit')); ?>" class="btn btn-xs btn-warning">
|
||||
<i class="fas fa-edit"></i>
|
||||
</a>
|
||||
<?php if($ruolo->users_count == 0): ?>
|
||||
<form method="POST" action="<?php echo e(url('/admin/ruoli/' . $ruolo->id)); ?>" style="display: inline;">
|
||||
<?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
|
||||
<button type="submit" class="btn btn-xs btn-danger" onclick="return confirm('Eliminare questo ruolo?')">
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
</form>
|
||||
<?php else: ?>
|
||||
<button type="button" class="btn btn-xs btn-secondary" disabled title="Utenti associati: <?php echo e($ruolo->users_count); ?>">
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php $__env->stopSection(); ?>
|
||||
<?php echo $__env->make('admin.layout', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/glastree/resources/views/admin/ruoli/index.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php if($paginator->hasPages()): ?>
|
||||
<nav role="navigation" aria-label="<?php echo __('Pagination Navigation'); ?>">
|
||||
<ul class="pagination">
|
||||
|
||||
<?php if($paginator->onFirstPage()): ?>
|
||||
<li class="page-item disabled" aria-disabled="true">
|
||||
<span class="page-link"><?php echo __('pagination.previous'); ?></span>
|
||||
</li>
|
||||
<?php else: ?>
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="<?php echo e($paginator->previousPageUrl()); ?>" rel="prev">
|
||||
<?php echo __('pagination.previous'); ?>
|
||||
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php if($paginator->hasMorePages()): ?>
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="<?php echo e($paginator->nextPageUrl()); ?>" rel="next"><?php echo __('pagination.next'); ?></a>
|
||||
</li>
|
||||
<?php else: ?>
|
||||
<li class="page-item disabled" aria-disabled="true">
|
||||
<span class="page-link"><?php echo __('pagination.next'); ?></span>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Pagination/resources/views/simple-bootstrap-5.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php if($paginator->hasPages()): ?>
|
||||
<nav role="navigation" aria-label="<?php echo e(__('Pagination Navigation')); ?>" class="flex gap-2 items-center justify-between">
|
||||
|
||||
<?php if($paginator->onFirstPage()): ?>
|
||||
<span class="inline-flex items-center px-4 py-2 text-sm font-medium text-gray-600 bg-white border border-gray-300 cursor-not-allowed leading-5 rounded-md dark:text-gray-300 dark:bg-gray-700 dark:border-gray-600">
|
||||
<?php echo __('pagination.previous'); ?>
|
||||
|
||||
</span>
|
||||
<?php else: ?>
|
||||
<a href="<?php echo e($paginator->previousPageUrl()); ?>" rel="prev" class="inline-flex items-center px-4 py-2 text-sm font-medium text-gray-800 bg-white border border-gray-300 leading-5 rounded-md hover:text-gray-700 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-800 transition ease-in-out duration-150 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-200 dark:focus:border-blue-700 dark:active:bg-gray-700 dark:active:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-900 dark:hover:text-gray-200">
|
||||
<?php echo __('pagination.previous'); ?>
|
||||
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($paginator->hasMorePages()): ?>
|
||||
<a href="<?php echo e($paginator->nextPageUrl()); ?>" rel="next" class="inline-flex items-center px-4 py-2 text-sm font-medium text-gray-800 bg-white border border-gray-300 leading-5 rounded-md hover:text-gray-700 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-800 transition ease-in-out duration-150 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-200 dark:focus:border-blue-700 dark:active:bg-gray-700 dark:active:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-900 dark:hover:text-gray-200">
|
||||
<?php echo __('pagination.next'); ?>
|
||||
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<span class="inline-flex items-center px-4 py-2 text-sm font-medium text-gray-600 bg-white border border-gray-300 cursor-not-allowed leading-5 rounded-md dark:text-gray-300 dark:bg-gray-700 dark:border-gray-600">
|
||||
<?php echo __('pagination.next'); ?>
|
||||
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Pagination/resources/views/simple-tailwind.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;
|
||||
|
||||
$__newAttributes = [];
|
||||
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames((['message']));
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (in_array($__key, $__propNames)) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
} else {
|
||||
$__newAttributes[$__key] = $__value;
|
||||
}
|
||||
}
|
||||
|
||||
$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);
|
||||
|
||||
unset($__propNames);
|
||||
unset($__newAttributes);
|
||||
|
||||
foreach (array_filter((['message']), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
}
|
||||
|
||||
$__defined_vars = get_defined_vars();
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (array_key_exists($__key, $__defined_vars)) unset($$__key);
|
||||
}
|
||||
|
||||
unset($__defined_vars, $__key, $__value); ?>
|
||||
|
||||
<div class="bg-white/[2%] border border-neutral-200 dark:border-neutral-800 rounded-md w-full p-5 uppercase text-sm text-center font-mono shadow-xs text-neutral-600 dark:text-neutral-400">
|
||||
<span class="text-neutral-400 dark:text-neutral-600">// </span><?php echo e($message); ?>
|
||||
|
||||
</div>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/resources/exceptions/renderer/components/empty-state.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,98 @@
|
||||
<?php $__env->startSection('title', 'Log Attività'); ?>
|
||||
<?php $__env->startSection('page_title', 'Log Attività'); ?>
|
||||
|
||||
<?php $__env->startSection('breadcrumbs'); ?>
|
||||
<li class="breadcrumb-item active">Admin</li>
|
||||
<li class="breadcrumb-item active">Log Attività</li>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php $__env->startSection('content'); ?>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Attività di Sistema</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form method="GET" class="mb-3">
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<select name="user_id" class="form-control">
|
||||
<option value="">Tutti gli utenti</option>
|
||||
<?php $__currentLoopData = $users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $u): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<option value="<?php echo e($u->id); ?>" <?php echo e(request('user_id') == $u->id ? 'selected' : ''); ?>><?php echo e($u->name); ?></option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<select name="module" class="form-control">
|
||||
<option value="">Tutti i moduli</option>
|
||||
<?php $__currentLoopData = $modules; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $module): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<option value="<?php echo e($module); ?>" <?php echo e(request('module') == $module ? 'selected' : ''); ?>><?php echo e($module); ?></option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<select name="action" class="form-control">
|
||||
<option value="">Tutte le azioni</option>
|
||||
<option value="create" <?php echo e(request('action') == 'create' ? 'selected' : ''); ?>>Create</option>
|
||||
<option value="update" <?php echo e(request('action') == 'update' ? 'selected' : ''); ?>>Update</option>
|
||||
<option value="delete" <?php echo e(request('action') == 'delete' ? 'selected' : ''); ?>>Delete</option>
|
||||
<option value="login" <?php echo e(request('action') == 'login' ? 'selected' : ''); ?>>Login</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<input type="date" name="from" class="form-control" value="<?php echo e(request('from')); ?>" placeholder="Da">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<input type="date" name="to" class="form-control" value="<?php echo e(request('to')); ?>" placeholder="A">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<button type="submit" class="btn btn-primary">Filtra</button>
|
||||
<a href="/admin/activity-logs" class="btn btn-secondary">Reset</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Data/Ora</th>
|
||||
<th>Utente</th>
|
||||
<th>Azione</th>
|
||||
<th>Modulo</th>
|
||||
<th>Descrizione</th>
|
||||
<th>IP</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $__empty_1 = true; $__currentLoopData = $logs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $log): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
|
||||
<tr>
|
||||
<td><small><?php echo e($log->created_at->format('d/m/Y H:i:s')); ?></small></td>
|
||||
<td><?php echo e($log->user->name ?? 'Sistema'); ?></td>
|
||||
<td>
|
||||
<span class="badge badge-<?php echo e($log->action == 'delete' ? 'danger' : ($log->action == 'create' ? 'success' : ($log->action == 'login' ? 'info' : 'warning'))); ?>">
|
||||
<?php echo e($log->action); ?>
|
||||
|
||||
</span>
|
||||
</td>
|
||||
<td><?php echo e($log->module); ?></td>
|
||||
<td><?php echo e($log->description); ?></td>
|
||||
<td><small><?php echo e($log->ip_address); ?></small></td>
|
||||
</tr>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
|
||||
<tr>
|
||||
<td colspan="6" class="text-center">Nessun log presente</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<?php echo e($logs->links()); ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php $__env->stopSection(); ?>
|
||||
<?php echo $__env->make('admin.layout', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/glastree/resources/views/admin/activity-logs/index.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,115 @@
|
||||
<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;
|
||||
|
||||
$__newAttributes = [];
|
||||
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames((['title', 'markdown']));
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (in_array($__key, $__propNames)) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
} else {
|
||||
$__newAttributes[$__key] = $__value;
|
||||
}
|
||||
}
|
||||
|
||||
$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);
|
||||
|
||||
unset($__propNames);
|
||||
unset($__newAttributes);
|
||||
|
||||
foreach (array_filter((['title', 'markdown']), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
}
|
||||
|
||||
$__defined_vars = get_defined_vars();
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (array_key_exists($__key, $__defined_vars)) unset($$__key);
|
||||
}
|
||||
|
||||
unset($__defined_vars, $__key, $__value); ?>
|
||||
|
||||
<script>
|
||||
const markdown = <?php echo e(Illuminate\Support\Js::from($markdown)); ?>
|
||||
|
||||
</script>
|
||||
|
||||
<div
|
||||
class="flex items-center justify-between"
|
||||
x-data="{
|
||||
copied: false,
|
||||
async copyToClipboard() {
|
||||
try {
|
||||
await window.copyToClipboard(markdown);
|
||||
this.copied = true;
|
||||
setTimeout(() => { this.copied = false }, 3000);
|
||||
} catch (err) {
|
||||
console.error('Failed to copy the markdown: ', err);
|
||||
}
|
||||
}
|
||||
}"
|
||||
>
|
||||
<div class="flex items-center gap-2 h-[56px]">
|
||||
<div class="w-[18px] h-[18px] flex items-center justify-center bg-rose-500 rounded-md">
|
||||
<svg width="2" height="10" class="text-white" viewBox="0 0 2 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M1.00006 6.3188C1.41416 6.3188 1.75006 5.98295 1.75006 5.56885V1.43115C1.75006 1.01705 1.41416 0.681152 1.00006 0.681152C0.585961 0.681152 0.250061 1.01705 0.250061 1.43115V5.56885C0.250061 5.98295 0.585961 6.3188 1.00006 6.3188Z" fill="currentColor" />
|
||||
<path d="M1.00006 9.41699C1.55235 9.41699 2.00007 8.96929 2.00007 8.41699C2.00007 7.86469 1.55235 7.41699 1.00006 7.41699C0.447781 7.41699 6.10352e-05 7.86469 6.10352e-05 8.41699C6.10352e-05 8.96929 0.447781 9.41699 1.00006 9.41699Z" fill="currentColor "/>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="font-medium text-sm text-neutral-900 dark:text-white">
|
||||
<?php echo e($title); ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button
|
||||
x-cloak
|
||||
class="<?php echo \Illuminate\Support\Arr::toCssClasses([
|
||||
"text-sm rounded-md border px-3 h-8 flex items-center gap-2 transition-colors duration-200 ease-in-out cursor-pointer shadow-xs",
|
||||
"text-neutral-600 dark:text-neutral-400 bg-white/5 border-neutral-200 hover:bg-neutral-100 dark:bg-white/5 dark:border-white/10 dark:hover:bg-white/10",
|
||||
]); ?>"
|
||||
@click="copyToClipboard()"
|
||||
>
|
||||
<?php if (isset($component)) { $__componentOriginal8894ff2e6e6bd543865d608162806b35 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginal8894ff2e6e6bd543865d608162806b35 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.icons.copy','data' => ['class' => 'w-3 h-3','xShow' => '!copied']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::icons.copy'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['class' => 'w-3 h-3','x-show' => '!copied']); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginal8894ff2e6e6bd543865d608162806b35)): ?>
|
||||
<?php $attributes = $__attributesOriginal8894ff2e6e6bd543865d608162806b35; ?>
|
||||
<?php unset($__attributesOriginal8894ff2e6e6bd543865d608162806b35); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginal8894ff2e6e6bd543865d608162806b35)): ?>
|
||||
<?php $component = $__componentOriginal8894ff2e6e6bd543865d608162806b35; ?>
|
||||
<?php unset($__componentOriginal8894ff2e6e6bd543865d608162806b35); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($component)) { $__componentOriginal394a4f59b8774713925fcf456ba90b57 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginal394a4f59b8774713925fcf456ba90b57 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.icons.check','data' => ['class' => 'w-3 h-3 text-emerald-500','xShow' => 'copied']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::icons.check'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['class' => 'w-3 h-3 text-emerald-500','x-show' => 'copied']); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginal394a4f59b8774713925fcf456ba90b57)): ?>
|
||||
<?php $attributes = $__attributesOriginal394a4f59b8774713925fcf456ba90b57; ?>
|
||||
<?php unset($__attributesOriginal394a4f59b8774713925fcf456ba90b57); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginal394a4f59b8774713925fcf456ba90b57)): ?>
|
||||
<?php $component = $__componentOriginal394a4f59b8774713925fcf456ba90b57; ?>
|
||||
<?php unset($__componentOriginal394a4f59b8774713925fcf456ba90b57); ?>
|
||||
<?php endif; ?>
|
||||
<span x-text="copied ? 'Copied to clipboard' : 'Copy as Markdown'"></span>
|
||||
</button>
|
||||
</div>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/resources/exceptions/renderer/components/topbar.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,165 @@
|
||||
<?php $__env->startSection('title', 'Nuova Email'); ?>
|
||||
<?php $__env->startSection('page_title', 'Composizione Email'); ?>
|
||||
|
||||
<?php $__env->startSection('content'); ?>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card card-primary">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><i class="fas fa-edit mr-2"></i>Nuova Email</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form method="POST" action="<?php echo e(route('email.send')); ?>" id="emailForm">
|
||||
<?php echo csrf_field(); ?>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Destinatari *</label>
|
||||
<div class="mb-2">
|
||||
<select name="destinatario_tipo" id="destinatario_tipo" class="form-control" onchange="toggleDestinatari()">
|
||||
<option value="manuale">Email Manuale</option>
|
||||
<option value="individui">Singoli Individui</option>
|
||||
<option value="gruppo">Membri di un Gruppo</option>
|
||||
<option value="mailing_list">Mailing List</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div id="manual-input" class="destinatari-section">
|
||||
<input type="text" name="to" id="to_manual" class="form-control"
|
||||
placeholder="destinatario@email.it" value="<?php echo e($prefill['to'] ?? ''); ?>">
|
||||
</div>
|
||||
|
||||
<div id="individui-input" class="destinatari-section" style="display: none;">
|
||||
<select name="individui[]" id="individui-select" class="form-control" multiple size="5">
|
||||
<?php $__currentLoopData = $individui; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ind): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<option value="<?php echo e($ind->id); ?>"><?php echo e($ind->cognito); ?> <?php echo e($ind->nome); ?> (<?php echo e($ind->email_primaria ?? 'senza email'); ?>)</option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
<small class="text-muted">Tieni premuto Ctrl per selezionare più individui</small>
|
||||
</div>
|
||||
|
||||
<div id="gruppo-input" class="destinatari-section" style="display: none;">
|
||||
<select name="gruppo_id" id="gruppo-select" class="form-control mb-2" onchange="loadGruppiContatti()">
|
||||
<option value="">Seleziona gruppo...</option>
|
||||
<?php $__currentLoopData = $gruppi; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $gruppo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<option value="<?php echo e($gruppo->id); ?>"><?php echo e($gruppo->nome); ?></option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
<div id="gruppo-contatti" class="border rounded p-2" style="max-height: 150px; overflow-y: auto;">
|
||||
<em class="text-muted">Seleziona un gruppo per vedere i contatti</em>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="mailing-list-input" class="destinatari-section" style="display: none;">
|
||||
<select name="mailing_list_id" id="mailing-list-select" class="form-control">
|
||||
<option value="">Seleziona mailing list...</option>
|
||||
<?php $__currentLoopData = $mailingLists; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $list): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<option value="<?php echo e($list->id); ?>"><?php echo e($list->nome); ?> (<?php echo e($list->contatti->count()); ?> contatti)</option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="subject">Oggetto *</label>
|
||||
<input type="text" name="subject" id="subject" class="form-control"
|
||||
value="<?php echo e($prefill['subject'] ?? ''); ?>" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="body">Messaggio *</label>
|
||||
<textarea name="body" id="body" class="form-control" rows="15" required><?php echo e($prefill['body'] ?? ''); ?></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Allegati</label>
|
||||
<div class="border rounded p-3 bg-light">
|
||||
<label class="btn btn-sm btn-success mb-0">
|
||||
<i class="fas fa-upload mr-1"></i> Carica file
|
||||
<input type="file" name="allegati[]" multiple class="d-none">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<i class="fas fa-paper-plane mr-1"></i> Invia
|
||||
</button>
|
||||
<button type="button" class="btn btn-secondary ml-2" onclick="saveDraft()">
|
||||
<i class="fas fa-save mr-1"></i> Salva Bozze
|
||||
</button>
|
||||
<a href="<?php echo e(route('email.index')); ?>" class="btn btn-default ml-2">
|
||||
Annulla
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php $__env->startSection('scripts'); ?>
|
||||
<script>
|
||||
function toggleDestinatari() {
|
||||
const tipo = document.getElementById('destinatario_tipo').value;
|
||||
|
||||
document.querySelectorAll('.destinatari-section').forEach(el => el.style.display = 'none');
|
||||
|
||||
if (tipo === 'manuale') {
|
||||
document.getElementById('manual-input').style.display = 'block';
|
||||
} else if (tipo === 'individui') {
|
||||
document.getElementById('individui-input').style.display = 'block';
|
||||
} else if (tipo === 'gruppo') {
|
||||
document.getElementById('gruppo-input').style.display = 'block';
|
||||
} else if (tipo === 'mailing_list') {
|
||||
document.getElementById('mailing-list-input').style.display = 'block';
|
||||
}
|
||||
}
|
||||
|
||||
function loadGruppiContatti() {
|
||||
const gruppoId = document.getElementById('gruppo-select').value;
|
||||
const container = document.getElementById('gruppo-contatti');
|
||||
|
||||
if (!gruppoId) {
|
||||
container.innerHTML = '<em class="text-muted">Seleziona un gruppo per vedere i contatti</em>';
|
||||
return;
|
||||
}
|
||||
|
||||
fetch('/gruppi/' + gruppoId + '/individui-email')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data.length === 0) {
|
||||
container.innerHTML = '<em class="text-muted">Nessun contatto email nel gruppo</em>';
|
||||
return;
|
||||
}
|
||||
|
||||
let html = '';
|
||||
data.forEach(ind => {
|
||||
if (ind.email) {
|
||||
html += `<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="gruppo_emails[]" value="${ind.email}" id="email-${ind.id}">
|
||||
<label class="form-check-label" for="email-${ind.id}">${ind.cogname} ${ind.nome} - ${ind.email}</label>
|
||||
</div>`;
|
||||
}
|
||||
});
|
||||
container.innerHTML = html || '<em class="text-muted">Nessun contatto email nel gruppo</em>';
|
||||
});
|
||||
}
|
||||
|
||||
function saveDraft() {
|
||||
const form = document.getElementById('emailForm');
|
||||
const formData = new FormData(form);
|
||||
|
||||
fetch('<?php echo e(route('email.draft')); ?>', {
|
||||
method: 'POST',
|
||||
headers: { 'X-CSRF-TOKEN': '<?php echo e(csrf_token()); ?>' },
|
||||
body: formData
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
alert('Bozza salvata!');
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<?php $__env->stopSection(); ?>
|
||||
<?php echo $__env->make('layouts.adminlte', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/glastree/resources/views/email/compose.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,180 @@
|
||||
<?php $__env->startSection('title', 'Mailing Lists'); ?>
|
||||
<?php $__env->startSection('page_title', 'Mailing Lists'); ?>
|
||||
|
||||
<?php
|
||||
$canWriteMailing = Auth::user()->canManage('mailing');
|
||||
$canDeleteMailing = Auth::user()->canDelete('mailing');
|
||||
?>
|
||||
|
||||
<?php $__env->startSection('content'); ?>
|
||||
|
||||
<?php if(session('success')): ?>
|
||||
<div class="alert alert-success alert-dismissible">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<?php echo e(session('success')); ?>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><i class="fas fa-list mr-2"></i>Elenco Mailing Lists</h3>
|
||||
<div class="card-tools">
|
||||
<?php if($canDeleteMailing): ?>
|
||||
<div class="btn-group mr-2">
|
||||
<button type="button" class="btn btn-sm btn-danger" onclick="deleteSelected()">
|
||||
<i class="fas fa-trash mr-1"></i> Elimina Selezionati
|
||||
</button>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if($canWriteMailing): ?>
|
||||
<a href="<?php echo e(route('mailing-liste.create')); ?>" class="btn btn-success btn-sm">
|
||||
<i class="fas fa-plus mr-1"></i> Nuova Lista
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
<?php if($mailingLists->count() > 0): ?>
|
||||
<table class="table table-bordered table-hover table-striped mb-0">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th style="width: 40px;">
|
||||
<?php if($canDeleteMailing): ?>
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input" id="select-all" onchange="toggleSelectAll(this)">
|
||||
<label class="custom-control-label" for="select-all"></label>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</th>
|
||||
<th>Nome</th>
|
||||
<th>Descrizione</th>
|
||||
<th style="width: 100px;">Contatti</th>
|
||||
<th style="width: 100px;">Stato</th>
|
||||
<th style="width: 130px;">Creata il</th>
|
||||
<th style="width: 100px;">Azioni</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $__currentLoopData = $mailingLists; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $lista): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<tr data-id="<?php echo e($lista->id); ?>">
|
||||
<td>
|
||||
<?php if($canDeleteMailing): ?>
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input row-checkbox" id="row-checkbox-<?php echo e($lista->id); ?>" value="<?php echo e($lista->id); ?>">
|
||||
<label class="custom-control-label" for="row-checkbox-<?php echo e($lista->id); ?>"></label>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?php echo e(route('mailing-liste.show', $lista->id)); ?>"><?php echo e($lista->nome); ?></a>
|
||||
</td>
|
||||
<td><?php echo e($lista->descrizione ?: '-'); ?></td>
|
||||
<td>
|
||||
<span class="badge badge-info"><?php echo e($lista->contatti->count()); ?></span>
|
||||
</td>
|
||||
<td>
|
||||
<?php if($lista->attiva): ?>
|
||||
<span class="badge badge-success">Attiva</span>
|
||||
<?php else: ?>
|
||||
<span class="badge badge-secondary">Disattiva</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?php echo e($lista->created_at->format('d/m/Y')); ?></td>
|
||||
<td>
|
||||
<a href="<?php echo e(route('mailing-liste.show', $lista->id)); ?>" class="btn btn-xs btn-info" title="Visualizza">
|
||||
<i class="fas fa-eye"></i>
|
||||
</a>
|
||||
<?php if($canWriteMailing): ?>
|
||||
<a href="<?php echo e(route('mailing-liste.edit', $lista->id)); ?>" class="btn btn-xs btn-warning" title="Modifica">
|
||||
<i class="fas fa-edit"></i>
|
||||
</a>
|
||||
<form action="<?php echo e(route('mailing-liste.destroy', $lista->id)); ?>" method="POST" class="d-inline">
|
||||
<?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
|
||||
<button type="submit" class="btn btn-xs btn-danger" onclick="return confirm('Eliminare questa lista?')" title="Elimina">
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php else: ?>
|
||||
<div class="text-center text-muted py-4">
|
||||
<i class="fas fa-list fa-3x mb-3"></i>
|
||||
<p>Nessuna mailing list</p>
|
||||
<?php if($canWriteMailing): ?>
|
||||
<a href="<?php echo e(route('mailing-liste.create')); ?>" class="btn btn-success">Crea la prima lista</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog">
|
||||
<?php if($canDeleteMailing): ?>
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header bg-danger">
|
||||
<h5 class="modal-title text-white"><i class="fas fa-trash-alt mr-2"></i>Conferma Eliminazione</h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Stai per eliminare <strong id="delete-count">0</strong> mailing list selezionate.</p>
|
||||
<p class="text-muted small">Verranno eliminati anche tutti i contatti associati.</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Annulla</button>
|
||||
<button type="button" class="btn btn-danger" onclick="confirmDelete()">Elimina</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php $__env->startSection('scripts'); ?>
|
||||
<script>
|
||||
function toggleSelectAll(source) {
|
||||
document.querySelectorAll('.row-checkbox').forEach(cb => cb.checked = source.checked);
|
||||
}
|
||||
|
||||
function getSelectedIds() {
|
||||
return Array.from(document.querySelectorAll('.row-checkbox:checked')).map(cb => cb.value);
|
||||
}
|
||||
|
||||
function deleteSelected() {
|
||||
const selectedIds = getSelectedIds();
|
||||
if (selectedIds.length === 0) {
|
||||
alert('Seleziona almeno una mailing list');
|
||||
return;
|
||||
}
|
||||
|
||||
document.getElementById('delete-count').textContent = selectedIds.length;
|
||||
|
||||
document.querySelector('#deleteModal .btn-danger').onclick = function() {
|
||||
const form = document.createElement('form');
|
||||
form.method = 'POST';
|
||||
form.action = '/mailing-liste/mass-elimina';
|
||||
|
||||
const csrfToken = document.querySelector('meta[name="csrf-token"]')?.content || '<?php echo e(csrf_token()); ?>';
|
||||
|
||||
let html = `<input type="hidden" name="_token" value="${csrfToken}">`;
|
||||
selectedIds.forEach(function(id) {
|
||||
html += `<input type="hidden" name="ids[]" value="${id}">`;
|
||||
});
|
||||
|
||||
form.innerHTML = html;
|
||||
document.body.appendChild(form);
|
||||
form.submit();
|
||||
};
|
||||
|
||||
$('#deleteModal').modal('show');
|
||||
}
|
||||
</script>
|
||||
<?php $__env->stopSection(); ?>
|
||||
<?php echo $__env->make('layouts.adminlte', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/glastree/resources/views/mailing-liste/index.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,167 @@
|
||||
<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;
|
||||
|
||||
$__newAttributes = [];
|
||||
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames((['exception', 'request']));
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (in_array($__key, $__propNames)) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
} else {
|
||||
$__newAttributes[$__key] = $__value;
|
||||
}
|
||||
}
|
||||
|
||||
$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);
|
||||
|
||||
unset($__propNames);
|
||||
unset($__newAttributes);
|
||||
|
||||
foreach (array_filter((['exception', 'request']), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
}
|
||||
|
||||
$__defined_vars = get_defined_vars();
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (array_key_exists($__key, $__defined_vars)) unset($$__key);
|
||||
}
|
||||
|
||||
unset($__defined_vars, $__key, $__value); ?>
|
||||
|
||||
<div
|
||||
x-data="{
|
||||
copied: false,
|
||||
async copyToClipboard() {
|
||||
try {
|
||||
await window.copyToClipboard('<?php echo e($request->fullUrl()); ?>');
|
||||
this.copied = true;
|
||||
setTimeout(() => { this.copied = false }, 3000);
|
||||
} catch (err) {
|
||||
console.error('Failed to copy the requestURL: ', err);
|
||||
}
|
||||
}
|
||||
}"
|
||||
<?php echo e($attributes->merge(['class' => "bg-white dark:bg-[#1a1a1a] border border-neutral-200 dark:border-white/10 rounded-lg flex items-center justify-between h-10 px-2 shadow-xs"])); ?>
|
||||
|
||||
>
|
||||
<div class="flex items-center gap-3 w-full">
|
||||
<?php if (isset($component)) { $__componentOriginal0bc865510ef3ecddbe48edc4e8cc9ddb = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginal0bc865510ef3ecddbe48edc4e8cc9ddb = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.badge','data' => ['type' => 'error','variant' => 'solid']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::badge'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['type' => 'error','variant' => 'solid']); ?>
|
||||
<?php if (isset($component)) { $__componentOriginalebc8ec9a834a8051f56913d6745a7050 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginalebc8ec9a834a8051f56913d6745a7050 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.icons.alert','data' => ['class' => 'w-2.5 h-2.5']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::icons.alert'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['class' => 'w-2.5 h-2.5']); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginalebc8ec9a834a8051f56913d6745a7050)): ?>
|
||||
<?php $attributes = $__attributesOriginalebc8ec9a834a8051f56913d6745a7050; ?>
|
||||
<?php unset($__attributesOriginalebc8ec9a834a8051f56913d6745a7050); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginalebc8ec9a834a8051f56913d6745a7050)): ?>
|
||||
<?php $component = $__componentOriginalebc8ec9a834a8051f56913d6745a7050; ?>
|
||||
<?php unset($__componentOriginalebc8ec9a834a8051f56913d6745a7050); ?>
|
||||
<?php endif; ?>
|
||||
<?php echo e($exception->httpStatusCode()); ?>
|
||||
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginal0bc865510ef3ecddbe48edc4e8cc9ddb)): ?>
|
||||
<?php $attributes = $__attributesOriginal0bc865510ef3ecddbe48edc4e8cc9ddb; ?>
|
||||
<?php unset($__attributesOriginal0bc865510ef3ecddbe48edc4e8cc9ddb); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginal0bc865510ef3ecddbe48edc4e8cc9ddb)): ?>
|
||||
<?php $component = $__componentOriginal0bc865510ef3ecddbe48edc4e8cc9ddb; ?>
|
||||
<?php unset($__componentOriginal0bc865510ef3ecddbe48edc4e8cc9ddb); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($component)) { $__componentOriginal5131cdd8ffd44ce9fe7ed2c3030dd413 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginal5131cdd8ffd44ce9fe7ed2c3030dd413 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.http-method','data' => ['method' => ''.e($request->method()).'']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::http-method'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['method' => ''.e($request->method()).'']); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginal5131cdd8ffd44ce9fe7ed2c3030dd413)): ?>
|
||||
<?php $attributes = $__attributesOriginal5131cdd8ffd44ce9fe7ed2c3030dd413; ?>
|
||||
<?php unset($__attributesOriginal5131cdd8ffd44ce9fe7ed2c3030dd413); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginal5131cdd8ffd44ce9fe7ed2c3030dd413)): ?>
|
||||
<?php $component = $__componentOriginal5131cdd8ffd44ce9fe7ed2c3030dd413; ?>
|
||||
<?php unset($__componentOriginal5131cdd8ffd44ce9fe7ed2c3030dd413); ?>
|
||||
<?php endif; ?>
|
||||
<div class="flex-1 text-sm font-light truncate text-neutral-950 dark:text-white">
|
||||
<span data-tippy-content="<?php echo e($request->fullUrl()); ?>">
|
||||
<?php echo e($request->fullUrl()); ?>
|
||||
|
||||
</span>
|
||||
</div>
|
||||
<button
|
||||
x-cloak
|
||||
@click="copyToClipboard()"
|
||||
class="<?php echo \Illuminate\Support\Arr::toCssClasses([
|
||||
"rounded-md w-6 h-6 flex flex-shrink-0 items-center justify-center cursor-pointer border transition-colors duration-200 ease-in-out",
|
||||
"bg-white/5 border-neutral-200 hover:bg-neutral-100 dark:bg-white/5 dark:border-white/10 dark:hover:bg-white/10",
|
||||
]); ?>"
|
||||
>
|
||||
<?php if (isset($component)) { $__componentOriginal8894ff2e6e6bd543865d608162806b35 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginal8894ff2e6e6bd543865d608162806b35 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.icons.copy','data' => ['class' => 'w-3 h-3 text-neutral-400','xShow' => '!copied']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::icons.copy'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['class' => 'w-3 h-3 text-neutral-400','x-show' => '!copied']); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginal8894ff2e6e6bd543865d608162806b35)): ?>
|
||||
<?php $attributes = $__attributesOriginal8894ff2e6e6bd543865d608162806b35; ?>
|
||||
<?php unset($__attributesOriginal8894ff2e6e6bd543865d608162806b35); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginal8894ff2e6e6bd543865d608162806b35)): ?>
|
||||
<?php $component = $__componentOriginal8894ff2e6e6bd543865d608162806b35; ?>
|
||||
<?php unset($__componentOriginal8894ff2e6e6bd543865d608162806b35); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($component)) { $__componentOriginal394a4f59b8774713925fcf456ba90b57 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginal394a4f59b8774713925fcf456ba90b57 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.icons.check','data' => ['class' => 'w-3 h-3 text-emerald-500','xShow' => 'copied']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::icons.check'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['class' => 'w-3 h-3 text-emerald-500','x-show' => 'copied']); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginal394a4f59b8774713925fcf456ba90b57)): ?>
|
||||
<?php $attributes = $__attributesOriginal394a4f59b8774713925fcf456ba90b57; ?>
|
||||
<?php unset($__attributesOriginal394a4f59b8774713925fcf456ba90b57); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginal394a4f59b8774713925fcf456ba90b57)): ?>
|
||||
<?php $component = $__componentOriginal394a4f59b8774713925fcf456ba90b57; ?>
|
||||
<?php unset($__componentOriginal394a4f59b8774713925fcf456ba90b57); ?>
|
||||
<?php endif; ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/resources/exceptions/renderer/components/request-url.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,310 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="it">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Report Individui Multipli - <?php echo e(now()->format('d/m/Y')); ?></title>
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
body {
|
||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||
font-size: 12px;
|
||||
line-height: 1.4;
|
||||
color: #333;
|
||||
padding: 20px;
|
||||
}
|
||||
.header {
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
padding-bottom: 15px;
|
||||
border-bottom: 2px solid #2c3e50;
|
||||
}
|
||||
.header h1 {
|
||||
font-size: 24px;
|
||||
color: #2c3e50;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.header .subtitle {
|
||||
font-size: 14px;
|
||||
color: #7f8c8d;
|
||||
}
|
||||
.individuo-block {
|
||||
margin-bottom: 30px;
|
||||
page-break-after: always;
|
||||
}
|
||||
.individuo-block:last-child {
|
||||
page-break-after: avoid;
|
||||
}
|
||||
.section {
|
||||
margin-bottom: 15px;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
.section-title {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
background: #2c3e50;
|
||||
padding: 8px 12px;
|
||||
margin-bottom: 8px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
th, td {
|
||||
border: 1px solid #ddd;
|
||||
padding: 6px 8px;
|
||||
text-align: left;
|
||||
}
|
||||
th {
|
||||
background: #f8f9fa;
|
||||
font-weight: bold;
|
||||
width: 150px;
|
||||
}
|
||||
.badge {
|
||||
display: inline-block;
|
||||
padding: 3px 8px;
|
||||
background: #6c757d;
|
||||
color: #fff;
|
||||
border-radius: 3px;
|
||||
font-size: 11px;
|
||||
}
|
||||
.badge-success { background: #28a745; }
|
||||
.badge-warning { background: #ffc107; color: #333; }
|
||||
.badge-danger { background: #dc3545; }
|
||||
.badge-info { background: #17a2b8; }
|
||||
.info-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 8px;
|
||||
}
|
||||
.info-item {
|
||||
border: 1px solid #ddd;
|
||||
padding: 8px;
|
||||
}
|
||||
.info-item label {
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
color: #666;
|
||||
font-size: 10px;
|
||||
text-transform: uppercase;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
.empty {
|
||||
color: #999;
|
||||
font-style: italic;
|
||||
}
|
||||
.footer {
|
||||
margin-top: 30px;
|
||||
padding-top: 15px;
|
||||
border-top: 1px solid #ddd;
|
||||
text-align: center;
|
||||
font-size: 10px;
|
||||
color: #999;
|
||||
}
|
||||
.totale {
|
||||
background: #f8f9fa;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
border: 2px solid #2c3e50;
|
||||
font-weight: bold;
|
||||
}
|
||||
@media print {
|
||||
body { padding: 0; }
|
||||
.individuo-block { page-break-after: always; }
|
||||
.individuo-block:last-child { page-break-after: avoid; }
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<h1>Report Individui Multipli</h1>
|
||||
<div class="subtitle">Totale: <?php echo e($individui->count()); ?> individui</div>
|
||||
</div>
|
||||
|
||||
<div class="totale">
|
||||
Report generato il <?php echo e(now()->format('d/m/Y H:i')); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php $__currentLoopData = $individui; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ind): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<div class="individuo-block">
|
||||
<div class="section">
|
||||
<div class="section-title">
|
||||
<?php if($ind->avatar): ?>
|
||||
<img src="<?php echo e(url('/individui/' . $ind->id . '/avatar')); ?>"
|
||||
alt="Avatar"
|
||||
style="width: 30px; height: 30px; object-fit: cover; border-radius: 50%; margin-right: 8px; vertical-align: middle;">
|
||||
<?php endif; ?>
|
||||
<?php echo e($ind->cognome); ?> <?php echo e($ind->nome); ?> - Codice: <?php echo e($ind->codice_id); ?>
|
||||
|
||||
</div>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Codice</th>
|
||||
<td><span class="badge"><?php echo e($ind->codice_id); ?></span></td>
|
||||
<th>Genere</th>
|
||||
<td><?php echo e($ind->genere === 'M' ? 'Maschile' : ($ind->genere === 'F' ? 'Femminile' : '-')); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Data di nascita</th>
|
||||
<td><?php echo e($ind->data_nascita ? $ind->data_nascita->format('d/m/Y') : '-'); ?></td>
|
||||
<th>Luogo di nascita</th>
|
||||
<td><?php echo e($ind->città ?: '-'); ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<div class="section-title">Residenza</div>
|
||||
<div class="info-grid">
|
||||
<div class="info-item">
|
||||
<label>Indirizzo</label>
|
||||
<?php echo e($ind->indirizzo ?: '-'); ?>
|
||||
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<label>CAP</label>
|
||||
<?php echo e($ind->cap ?: '-'); ?>
|
||||
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<label>Città</label>
|
||||
<?php echo e($ind->città ?: '-'); ?>
|
||||
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<label>Provincia</label>
|
||||
<?php echo e($ind->sigla_provincia ?: '-'); ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<div class="section-title">Documento di Identità</div>
|
||||
<?php if($ind->tipo_documento || $ind->numero_documento): ?>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Tipo</th>
|
||||
<td>
|
||||
<?php if($ind->tipo_documento === 'carta_identita'): ?>
|
||||
<span class="badge badge-info">Carta d'Identità</span>
|
||||
<?php elseif($ind->tipo_documento === 'patente'): ?>
|
||||
<span class="badge badge-warning">Patente</span>
|
||||
<?php else: ?>
|
||||
<?php echo e($ind->tipo_documento); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<th>Numero</th>
|
||||
<td><?php echo e($ind->numero_documento); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Scadenza</th>
|
||||
<td>
|
||||
<?php if($ind->scadenza_documento): ?>
|
||||
<?php if($ind->scadenza_documento->isPast()): ?>
|
||||
<span class="badge badge-danger">SCADUTO</span>
|
||||
<?php else: ?>
|
||||
<?php echo e($ind->scadenza_documento->format('d/m/Y')); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
-
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<th></th>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php else: ?>
|
||||
<p class="empty">Nessun documento registrato</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<div class="section-title">Contatti (<?php echo e($ind->contatti->count()); ?>)</div>
|
||||
<?php if($ind->contatti->count() > 0): ?>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Tipo</th>
|
||||
<th>Valore</th>
|
||||
<th>Etichetta</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $__currentLoopData = $ind->contatti; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $contatto): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<tr>
|
||||
<td>
|
||||
<?php switch($contatto->tipo):
|
||||
case ('email'): ?>
|
||||
<span class="badge badge-info">Email</span>
|
||||
<?php break; ?>
|
||||
<?php case ('telefono'): ?>
|
||||
<span class="badge">Telefono</span>
|
||||
<?php break; ?>
|
||||
<?php case ('cellulare'): ?>
|
||||
<span class="badge badge-success">Cellulare</span>
|
||||
<?php break; ?>
|
||||
<?php default: ?>
|
||||
<?php echo e($contatto->tipo); ?>
|
||||
|
||||
<?php endswitch; ?>
|
||||
</td>
|
||||
<td><?php echo e($contatto->valore); ?></td>
|
||||
<td><?php echo e($contatto->etichetta ?: '-'); ?></td>
|
||||
</tr>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php else: ?>
|
||||
<p class="empty">Nessun contatto registrato</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<div class="section-title">Gruppi di Appartenenza (<?php echo e($ind->gruppi->count()); ?>)</div>
|
||||
<?php if($ind->gruppi->count() > 0): ?>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Gruppo</th>
|
||||
<th>Ruolo</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $__currentLoopData = $ind->gruppi; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $gruppo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<tr>
|
||||
<td><?php echo e($gruppo->nome); ?></td>
|
||||
<td><?php echo e($gruppo->pivot->ruolo_nel_gruppo ?: '-'); ?></td>
|
||||
</tr>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php else: ?>
|
||||
<p class="empty">Nessun gruppo associato</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
|
||||
<div class="footer">
|
||||
<p>Glastree - Report generato automaticamente</p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
window.onload = function() {
|
||||
window.print();
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html><?php /**PATH /var/www/html/glastree/resources/views/individui/report-multiplo.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,260 @@
|
||||
<?php $__env->startSection('title', 'Nuovo Gruppo'); ?>
|
||||
<?php $__env->startSection('page_title', 'Nuovo Gruppo'); ?>
|
||||
|
||||
<?php $__env->startSection('content'); ?>
|
||||
<form action="/gruppi" method="POST">
|
||||
<?php echo csrf_field(); ?>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="card card-primary">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><i class="fas fa-folder mr-2"></i>Dati Gruppo</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label>Nome *</label>
|
||||
<input type="text" name="nome" class="form-control <?php $__errorArgs = ['nome'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>" value="<?php echo e(old('nome')); ?>" required>
|
||||
<?php $__errorArgs = ['nome'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="invalid-feedback"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Gruppo Padre</label>
|
||||
<select name="parent_id" class="form-control">
|
||||
<option value="">Nessuno (gruppo radice)</option>
|
||||
<?php $__currentLoopData = $allGruppi; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $g): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<option value="<?php echo e($g->id); ?>" <?php echo e(old('parent_id') == $g->id || ($selectedParent && $selectedParent->id == $g->id) ? 'selected' : ''); ?>>
|
||||
<?php echo e($g->full_path); ?>
|
||||
|
||||
</option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
<?php if($selectedParent): ?>
|
||||
<small class="form-text text-muted">
|
||||
Verrà creato come sottogruppo di: <strong><?php echo e($selectedParent->nome); ?></strong>
|
||||
</small>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Diocesi</label>
|
||||
<select name="diocesi_id" class="form-control">
|
||||
<option value="">Seleziona...</option>
|
||||
<?php $__currentLoopData = $diocesi; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $d): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<option value="<?php echo e($d->id); ?>" <?php echo e(old('diocesi_id') == $d->id ? 'selected' : ''); ?>><?php echo e($d->nome); ?></option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Responsabili</label>
|
||||
<select name="responsabile_ids[]" class="form-control" multiple size="4" id="responsabile-select">
|
||||
<option value="">-- Nessuno --</option>
|
||||
</select>
|
||||
<small class="text-muted">Ctrl+click per selezionare più responsabili</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Descrizione</label>
|
||||
<textarea name="descrizione" class="form-control" rows="3"><?php echo e(old('descrizione')); ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header"><h3 class="card-title"><i class="fas fa-map-marker-alt mr-2"></i>Luogo Incontro</h3></div>
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label>Indirizzo</label>
|
||||
<input type="text" name="indirizzo_incontro" class="form-control" value="<?php echo e(old('indirizzo_incontro')); ?>">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label>CAP</label>
|
||||
<input type="text" name="cap_incontro" class="form-control" value="<?php echo e(old('cap_incontro')); ?>">
|
||||
</div>
|
||||
<div class="form-group col-md-5">
|
||||
<label>Città</label>
|
||||
<input type="text" name="città_incontro" class="form-control" value="<?php echo e(old('città_incontro')); ?>">
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label>Provincia</label>
|
||||
<input type="text" name="sigla_provincia_incontro" class="form-control" maxlength="2" value="<?php echo e(old('sigla_provincia_incontro')); ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-0">
|
||||
<label>URL Mappa</label>
|
||||
<input type="url" name="mappa_posizione" class="form-control" value="<?php echo e(old('mappa_posizione')); ?>" placeholder="https://...">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><i class="fas fa-users mr-2"></i>Membri</h3>
|
||||
<button type="button" class="btn btn-xs btn-success float-right" onclick="aggiungiMembro()">
|
||||
<i class="fas fa-plus mr-1"></i> Aggiungi Membro
|
||||
</button>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
<table class="table table-bordered mb-0" id="membri-table">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th style="width: 30%;">Individuo</th>
|
||||
<th>Codice</th>
|
||||
<th>Contatti</th>
|
||||
<th style="width: 20%;">Ruolo</th>
|
||||
<th style="width: 100px;">Data Adesione</th>
|
||||
<th style="width: 50px;"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="membri-tbody">
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="no-membri-msg" class="text-center text-muted py-4">
|
||||
<p class="mb-0">Nessun membro aggiunto. Clicca su "Aggiungi Membro" per iniziare.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-3">
|
||||
<button type="submit" class="btn btn-success">
|
||||
<i class="fas fa-save mr-1"></i> Salva
|
||||
</button>
|
||||
<a href="/gruppi" class="btn btn-secondary">
|
||||
<i class="fas fa-times mr-1"></i> Annulla
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php $__env->startSection('scripts'); ?>
|
||||
<script>
|
||||
let membriIndex = 0;
|
||||
const membriResponsabiliMap = new Map();
|
||||
|
||||
function aggiungiMembro() {
|
||||
const tbody = document.getElementById('membri-tbody');
|
||||
const noMsg = document.getElementById('no-membri-msg');
|
||||
if (noMsg) noMsg.style.display = 'none';
|
||||
|
||||
const row = document.createElement('tr');
|
||||
row.innerHTML = `
|
||||
<td>
|
||||
<select name="individui[${membriIndex}][individuo_id]" class="form-control" onchange="updateMembroInfo(this); updateResponsabiliFromMembri();" required>
|
||||
<option value="">Seleziona...</option>
|
||||
<?php $__currentLoopData = $individui; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $i): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<option value="<?php echo e($i->id); ?>" data-codice="<?php echo e($i->codice_id); ?>" data-email="<?php echo e($i->email_primaria); ?>" data-telefono="<?php echo e($i->telefono_primario); ?>">
|
||||
<?php echo e($i->cognome); ?> <?php echo e($i->nome); ?>
|
||||
|
||||
</option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
</td>
|
||||
<td><span class="text-muted membro-codice">-</span></td>
|
||||
<td><small class="text-muted membro-contatti">-</small></td>
|
||||
<td><input type="text" name="individui[${membriIndex}][ruolo_nel_gruppo]" class="form-control" placeholder="Es. Membro"></td>
|
||||
<td><input type="date" name="individui[${membriIndex}][data_adesione]" class="form-control"></td>
|
||||
<td><button type="button" class="btn btn-danger btn-xs" onclick="rimuoviMembro(this); updateResponsabiliFromMembri();"><i class="fas fa-trash"></i></button></td>
|
||||
`;
|
||||
tbody.appendChild(row);
|
||||
membriIndex++;
|
||||
}
|
||||
|
||||
function updateMembroInfo(select) {
|
||||
const row = select.closest('tr');
|
||||
const option = select.options[select.selectedIndex];
|
||||
const codice = option.dataset.codice || '-';
|
||||
const email = option.dataset.email || '';
|
||||
const telefono = option.dataset.telefono || '';
|
||||
|
||||
row.querySelector('.membro-codice').textContent = codice;
|
||||
|
||||
let contatti = [];
|
||||
if (email) contatti.push('<span class="text-primary">'+email+'</span>');
|
||||
if (telefono) contatti.push('<span class="text-success">'+telefono+'</span>');
|
||||
row.querySelector('.membro-contatti').innerHTML = contatti.length ? contatti.join(' | ') : '-';
|
||||
}
|
||||
|
||||
function rimuoviMembro(btn) {
|
||||
const row = btn.closest('tr');
|
||||
row.remove();
|
||||
if (document.getElementById('membri-tbody').children.length === 0) {
|
||||
document.getElementById('no-membri-msg').style.display = 'block';
|
||||
}
|
||||
}
|
||||
|
||||
function updateResponsabiliFromMembri() {
|
||||
const respSelect = document.getElementById('responsabile-select');
|
||||
const currentSelected = Array.from(respSelect.selectedOptions).map(o => o.value);
|
||||
const tbody = document.getElementById('membri-tbody');
|
||||
const rows = tbody.querySelectorAll('tr');
|
||||
|
||||
const membroIds = new Set();
|
||||
const membroNames = new Map();
|
||||
|
||||
rows.forEach(row => {
|
||||
const select = row.querySelector('select[name*="individuo_id"]');
|
||||
if (select && select.value) {
|
||||
membroIds.add(select.value);
|
||||
const option = select.options[select.selectedIndex];
|
||||
membroNames.set(select.value, option.text);
|
||||
}
|
||||
});
|
||||
|
||||
respSelect.innerHTML = '';
|
||||
|
||||
if (membroIds.size === 0) {
|
||||
const opt = document.createElement('option');
|
||||
opt.value = '';
|
||||
opt.textContent = '-- Aggiungi prima dei membri --';
|
||||
opt.disabled = true;
|
||||
respSelect.appendChild(opt);
|
||||
} else {
|
||||
membroIds.forEach(id => {
|
||||
const opt = document.createElement('option');
|
||||
opt.value = id;
|
||||
opt.textContent = membroNames.get(id);
|
||||
if (currentSelected.includes(id)) opt.selected = true;
|
||||
respSelect.appendChild(opt);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
const respSelect = document.getElementById('responsabile-select');
|
||||
const individuiList = <?php echo json_encode($individui->map(fn($i) => ['id' => $i->id, 'text' => $i->cognome . ' ' . $i->nome]), 512) ?>;
|
||||
const initialResponsabili = <?php echo json_encode(old('responsabile_ids', []), 512) ?>;
|
||||
|
||||
const optPlaceholder = document.createElement('option');
|
||||
optPlaceholder.value = '';
|
||||
optPlaceholder.textContent = '-- Aggiungi prima dei membri --';
|
||||
optPlaceholder.disabled = true;
|
||||
respSelect.appendChild(optPlaceholder);
|
||||
|
||||
initialResponsabili.forEach(id => {
|
||||
const match = individuiList.find(i => i.id == id);
|
||||
if (match) {
|
||||
const opt = document.createElement('option');
|
||||
opt.value = match.id;
|
||||
opt.textContent = match.text;
|
||||
opt.selected = true;
|
||||
respSelect.appendChild(opt);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<?php $__env->stopSection(); ?>
|
||||
<?php echo $__env->make('layouts.adminlte', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/glastree/resources/views/gruppi/create.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,97 @@
|
||||
<?php $__env->startSection('title', 'Calendario Eventi'); ?>
|
||||
<?php $__env->startSection('page_title', 'Calendario Eventi'); ?>
|
||||
|
||||
<?php $__env->startSection('content'); ?>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card card-primary">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">
|
||||
<i class="fas fa-calendar-alt mr-2"></i>Calendario Eventi
|
||||
</h3>
|
||||
<div class="card-tools">
|
||||
<a href="<?php echo e(route('eventi.index')); ?>" class="btn btn-secondary btn-sm">
|
||||
<i class="fas fa-list mr-1"></i> Elenco Eventi
|
||||
</a>
|
||||
<a href="<?php echo e(route('eventi.create')); ?>" class="btn btn-success btn-sm">
|
||||
<i class="fas fa-plus mr-1"></i> Nuovo Evento
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div id="calendar"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php $__env->startSection('styles'); ?>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/fullcalendar@6.1.10/index.global.min.css">
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php $__env->startSection('scripts'); ?>
|
||||
<script src="https://cdn.jsdelivr.net/npm/fullcalendar@6.1.10/index.global.min.js"></script>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
var calendarEl = document.getElementById('calendar');
|
||||
|
||||
var calendar = new FullCalendar.Calendar(calendarEl, {
|
||||
initialView: 'dayGridMonth',
|
||||
locale: 'it',
|
||||
headerToolbar: {
|
||||
left: 'prev,next today',
|
||||
center: 'title',
|
||||
right: 'dayGridMonth,timeGridWeek,listWeek'
|
||||
},
|
||||
buttonText: {
|
||||
today: 'Oggi',
|
||||
month: 'Mese',
|
||||
week: 'Settimana',
|
||||
list: 'Lista'
|
||||
},
|
||||
eventSources: [
|
||||
{
|
||||
url: '/eventi/calendar/events',
|
||||
method: 'GET',
|
||||
extraParams: function() {
|
||||
return {
|
||||
_token: document.querySelector('meta[name="csrf-token"]')?.content || ''
|
||||
};
|
||||
},
|
||||
startParam: 'start',
|
||||
endParam: 'end',
|
||||
success: function(response) {
|
||||
console.log('Eventi caricati:', response.length, response);
|
||||
},
|
||||
failure: function(error) {
|
||||
console.error('Errore:', error);
|
||||
console.log('XHR:', error.xhr);
|
||||
alert('Errore nel caricamento degli eventi. Controlla la console per dettagli.');
|
||||
}
|
||||
}
|
||||
],
|
||||
eventClick: function(info) {
|
||||
info.jsEvent.preventDefault();
|
||||
window.location.href = info.event.url;
|
||||
},
|
||||
eventDisplay: 'block',
|
||||
displayEventTime: true,
|
||||
displayEventEnd: true,
|
||||
nowIndicator: true,
|
||||
height: 'auto',
|
||||
expandRows: true,
|
||||
stickyHeaderDates: true,
|
||||
dayMaxEvents: true,
|
||||
eventTimeFormat: {
|
||||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
hour12: false
|
||||
}
|
||||
});
|
||||
|
||||
calendar.render();
|
||||
});
|
||||
</script>
|
||||
<?php $__env->stopSection(); ?>
|
||||
<?php echo $__env->make('layouts.adminlte', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/glastree/resources/views/eventi/calendar.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,162 @@
|
||||
<div class="modal fade" id="table-settings-modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><i class="fas fa-cog mr-2"></i>Impostazioni Tabella</h5>
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<ul class="nav nav-tabs" id="settings-tabs" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" id="columns-tab" data-toggle="tab" href="#columns-panel" role="tab">
|
||||
<i class="fas fa-columns mr-1"></i> Colonne
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="filters-tab" data-toggle="tab" href="#filters-panel" role="tab">
|
||||
<i class="fas fa-filter mr-1"></i> Filtri
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="search-tab" data-toggle="tab" href="#search-panel" role="tab">
|
||||
<i class="fas fa-search mr-1"></i> Ricerca
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="export-tab" data-toggle="tab" href="#export-panel" role="tab">
|
||||
<i class="fas fa-download mr-1"></i> Esporta
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content p-3">
|
||||
<div class="tab-pane fade show active" id="columns-panel" role="tabpanel">
|
||||
<h6>Seleziona le colonne da visualizzare:</h6>
|
||||
<div class="row">
|
||||
<?php $__currentLoopData = $tableColumns; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $col): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<div class="col-md-4">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input column-toggle"
|
||||
id="col-<?php echo e($col['key']); ?>" data-column="<?php echo e($col['key']); ?>"
|
||||
<?php echo e(($col['visible'] ?? true) ? 'checked' : ''); ?>>
|
||||
<label class="custom-control-label" for="col-<?php echo e($col['key']); ?>">
|
||||
<?php echo e($col['label']); ?>
|
||||
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="filters-panel" role="tabpanel">
|
||||
<h6>Aggiungi filtri:</h6>
|
||||
<div id="filters-container">
|
||||
<div class="filter-row mb-2">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<select class="form-control form-control-sm filter-column">
|
||||
<option value="">Seleziona colonna...</option>
|
||||
<?php $__currentLoopData = $tableColumns; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $col): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<option value="<?php echo e($col['key']); ?>"><?php echo e($col['label']); ?></option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<select class="form-control form-control-sm filter-operator">
|
||||
<option value="contains">Contiene</option>
|
||||
<option value="equals">Uguale a</option>
|
||||
<option value="starts">Inizia con</option>
|
||||
<option value="ends">Finisce con</option>
|
||||
<option value="gt">Maggiore di</option>
|
||||
<option value="lt">Minore di</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<input type="text" class="form-control form-control-sm filter-value" placeholder="Valore">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="btn btn-xs btn-success mt-2" onclick="addFilterRow()">
|
||||
<i class="fas fa-plus"></i> Aggiungi filtro
|
||||
</button>
|
||||
<button type="button" class="btn btn-xs btn-primary mt-2" id="apply-filters-btn">
|
||||
<i class="fas fa-check"></i> Applica filtri
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="search-panel" role="tabpanel">
|
||||
<div class="form-group">
|
||||
<label>cerca in tutte le colonne:</label>
|
||||
<input type="text" id="table-search" class="form-control" placeholder="Testo da cercare...">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="export-panel" role="tabpanel">
|
||||
<h6>Esporta i dati visualizzati:</h6>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-success" id="export-csv-btn">
|
||||
<i class="fas fa-file-csv mr-1"></i> Esporta CSV
|
||||
</button>
|
||||
<button type="button" class="btn btn-danger" id="export-pdf-btn">
|
||||
<i class="fas fa-file-pdf mr-1"></i> Esporta PDF
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="mr-auto">
|
||||
<input type="text" id="vista-nome" class="form-control form-control-sm" placeholder="Nome vista..." style="display: inline-block; width: auto;">
|
||||
<button type="button" class="btn btn-primary btn-sm" id="save-vista-btn">
|
||||
<i class="fas fa-save mr-1"></i> Salva Vista
|
||||
</button>
|
||||
</div>
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Chiudi</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function addFilterRow() {
|
||||
const container = document.getElementById('filters-container');
|
||||
const columns = <?php echo json_encode($tableColumns, 15, 512) ?>;
|
||||
const options = columns.map(c => `<option value="${c.key}">${c.label}</option>`).join('');
|
||||
|
||||
const div = document.createElement('div');
|
||||
div.className = 'filter-row mb-2';
|
||||
div.innerHTML = `
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<select class="form-control form-control-sm filter-column">
|
||||
<option value="">Seleziona colonna...</option>
|
||||
${options}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<select class="form-control form-control-sm filter-operator">
|
||||
<option value="contains">Contiene</option>
|
||||
<option value="equals">Uguale a</option>
|
||||
<option value="starts">Inizia con</option>
|
||||
<option value="ends">Finisce con</option>
|
||||
<option value="gt">Maggiore di</option>
|
||||
<option value="lt">Minore di</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<input type="text" class="form-control form-control-sm filter-value" placeholder="Valore">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<button type="button" class="btn btn-danger btn-sm" onclick="this.closest('.filter-row').remove()">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
container.appendChild(div);
|
||||
}
|
||||
</script><?php /**PATH /var/www/html/glastree/resources/views/partials/table-settings.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,180 @@
|
||||
<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;
|
||||
|
||||
$__newAttributes = [];
|
||||
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames((['frame']));
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (in_array($__key, $__propNames)) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
} else {
|
||||
$__newAttributes[$__key] = $__value;
|
||||
}
|
||||
}
|
||||
|
||||
$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);
|
||||
|
||||
unset($__propNames);
|
||||
unset($__newAttributes);
|
||||
|
||||
foreach (array_filter((['frame']), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
}
|
||||
|
||||
$__defined_vars = get_defined_vars();
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (array_key_exists($__key, $__defined_vars)) unset($$__key);
|
||||
}
|
||||
|
||||
unset($__defined_vars, $__key, $__value); ?>
|
||||
|
||||
<div
|
||||
x-data="{
|
||||
expanded: <?php echo e($frame->isMain() ? 'true' : 'false'); ?>,
|
||||
hasCode: <?php echo e($frame->snippet() ? 'true' : 'false'); ?>
|
||||
|
||||
}"
|
||||
class="group rounded-lg border border-neutral-200 dark:border-white/10 overflow-hidden shadow-xs"
|
||||
:class="{ 'dark:border-white/5': expanded }"
|
||||
>
|
||||
<div
|
||||
class="flex h-11 items-center gap-3 bg-white pr-2.5 pl-4 overflow-x-auto dark:bg-white/3"
|
||||
:class="{
|
||||
'cursor-pointer hover:bg-white/50 dark:hover:bg-white/5 hover:[&_svg]:stroke-emerald-500': hasCode,
|
||||
'dark:bg-white/5 rounded-t-lg': expanded,
|
||||
'dark:bg-white/3 rounded-lg': !expanded
|
||||
}"
|
||||
@click="hasCode && (expanded = !expanded)"
|
||||
>
|
||||
|
||||
<div class="flex size-3 items-center justify-center flex-shrink-0">
|
||||
<div
|
||||
class="size-2 rounded-full"
|
||||
:class="{
|
||||
'bg-rose-500 dark:bg-neutral-400': expanded,
|
||||
'bg-rose-200 dark:bg-neutral-700': !expanded
|
||||
}"
|
||||
></div>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-1 items-center justify-between gap-6 min-w-0">
|
||||
<?php if (isset($component)) { $__componentOriginalc33171fb5f34409a0ad661ae1625dcb2 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginalc33171fb5f34409a0ad661ae1625dcb2 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.formatted-source','data' => ['frame' => $frame]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::formatted-source'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['frame' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($frame)]); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginalc33171fb5f34409a0ad661ae1625dcb2)): ?>
|
||||
<?php $attributes = $__attributesOriginalc33171fb5f34409a0ad661ae1625dcb2; ?>
|
||||
<?php unset($__attributesOriginalc33171fb5f34409a0ad661ae1625dcb2); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginalc33171fb5f34409a0ad661ae1625dcb2)): ?>
|
||||
<?php $component = $__componentOriginalc33171fb5f34409a0ad661ae1625dcb2; ?>
|
||||
<?php unset($__componentOriginalc33171fb5f34409a0ad661ae1625dcb2); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($component)) { $__componentOriginalfe2bc8d0a6d110d41fdc8740012cee8d = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginalfe2bc8d0a6d110d41fdc8740012cee8d = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.file-with-line','data' => ['frame' => $frame,'direction' => 'rtl']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::file-with-line'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['frame' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($frame),'direction' => 'rtl']); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginalfe2bc8d0a6d110d41fdc8740012cee8d)): ?>
|
||||
<?php $attributes = $__attributesOriginalfe2bc8d0a6d110d41fdc8740012cee8d; ?>
|
||||
<?php unset($__attributesOriginalfe2bc8d0a6d110d41fdc8740012cee8d); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginalfe2bc8d0a6d110d41fdc8740012cee8d)): ?>
|
||||
<?php $component = $__componentOriginalfe2bc8d0a6d110d41fdc8740012cee8d; ?>
|
||||
<?php unset($__componentOriginalfe2bc8d0a6d110d41fdc8740012cee8d); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="flex-shrink-0">
|
||||
<button
|
||||
x-cloak
|
||||
type="button"
|
||||
class="flex h-6 w-6 cursor-pointer items-center justify-center rounded-md dark:border dark:border-white/8 group-hover:text-blue-500 group-hover:dark:text-emerald-500"
|
||||
:class="{
|
||||
'text-blue-500 dark:text-emerald-500 dark:bg-white/5': expanded,
|
||||
'text-neutral-500 dark:text-neutral-500 dark:bg-white/3': !expanded,
|
||||
}"
|
||||
>
|
||||
<?php if (isset($component)) { $__componentOriginal4400c4a71d3ea90a0e0b846e7d689a28 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginal4400c4a71d3ea90a0e0b846e7d689a28 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.icons.chevrons-down-up','data' => ['xShow' => 'expanded']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::icons.chevrons-down-up'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['x-show' => 'expanded']); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginal4400c4a71d3ea90a0e0b846e7d689a28)): ?>
|
||||
<?php $attributes = $__attributesOriginal4400c4a71d3ea90a0e0b846e7d689a28; ?>
|
||||
<?php unset($__attributesOriginal4400c4a71d3ea90a0e0b846e7d689a28); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginal4400c4a71d3ea90a0e0b846e7d689a28)): ?>
|
||||
<?php $component = $__componentOriginal4400c4a71d3ea90a0e0b846e7d689a28; ?>
|
||||
<?php unset($__componentOriginal4400c4a71d3ea90a0e0b846e7d689a28); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($component)) { $__componentOriginal7348bb70f498d75e0a91acc6a707f136 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginal7348bb70f498d75e0a91acc6a707f136 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.icons.chevrons-up-down','data' => ['xShow' => '!expanded']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::icons.chevrons-up-down'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['x-show' => '!expanded']); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginal7348bb70f498d75e0a91acc6a707f136)): ?>
|
||||
<?php $attributes = $__attributesOriginal7348bb70f498d75e0a91acc6a707f136; ?>
|
||||
<?php unset($__attributesOriginal7348bb70f498d75e0a91acc6a707f136); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginal7348bb70f498d75e0a91acc6a707f136)): ?>
|
||||
<?php $component = $__componentOriginal7348bb70f498d75e0a91acc6a707f136; ?>
|
||||
<?php unset($__componentOriginal7348bb70f498d75e0a91acc6a707f136); ?>
|
||||
<?php endif; ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if($snippet = $frame->snippet()): ?>
|
||||
<?php if (isset($component)) { $__componentOriginala7df34c267a7ce6efa01f63b793ef234 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginala7df34c267a7ce6efa01f63b793ef234 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.frame-code','data' => ['code' => $snippet,'highlightedLine' => $frame->line(),'xShow' => 'expanded','xCloak' => !$frame->isMain()]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::frame-code'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['code' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($snippet),'highlightedLine' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($frame->line()),'x-show' => 'expanded','x-cloak' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(!$frame->isMain())]); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginala7df34c267a7ce6efa01f63b793ef234)): ?>
|
||||
<?php $attributes = $__attributesOriginala7df34c267a7ce6efa01f63b793ef234; ?>
|
||||
<?php unset($__attributesOriginala7df34c267a7ce6efa01f63b793ef234); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginala7df34c267a7ce6efa01f63b793ef234)): ?>
|
||||
<?php $component = $__componentOriginala7df34c267a7ce6efa01f63b793ef234; ?>
|
||||
<?php unset($__componentOriginala7df34c267a7ce6efa01f63b793ef234); ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/resources/exceptions/renderer/components/frame.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,4 @@
|
||||
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" <?php echo e($attributes); ?>>
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path>
|
||||
</svg>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/resources/exceptions/renderer/components/icons/check.blade.php ENDPATH**/ ?>
|
||||
|
After Width: | Height: | Size: 362 B |
@@ -0,0 +1,28 @@
|
||||
<?php if($paginator->hasPages()): ?>
|
||||
<nav>
|
||||
<ul class="pagination">
|
||||
|
||||
<?php if($paginator->onFirstPage()): ?>
|
||||
<li class="page-item disabled" aria-disabled="true">
|
||||
<span class="page-link"><?php echo app('translator')->get('pagination.previous'); ?></span>
|
||||
</li>
|
||||
<?php else: ?>
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="<?php echo e($paginator->previousPageUrl()); ?>" rel="prev"><?php echo app('translator')->get('pagination.previous'); ?></a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php if($paginator->hasMorePages()): ?>
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="<?php echo e($paginator->nextPageUrl()); ?>" rel="next"><?php echo app('translator')->get('pagination.next'); ?></a>
|
||||
</li>
|
||||
<?php else: ?>
|
||||
<li class="page-item disabled" aria-disabled="true">
|
||||
<span class="page-link"><?php echo app('translator')->get('pagination.next'); ?></span>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Pagination/resources/views/simple-bootstrap-4.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,5 @@
|
||||
<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg" <?php echo e($attributes); ?>>
|
||||
<path d="M4.75 1L0.75 5L4.75 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M9.25 1L5.25 5L9.25 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/resources/exceptions/renderer/components/icons/chevrons-left.blade.php ENDPATH**/ ?>
|
||||
|
After Width: | Height: | Size: 519 B |
@@ -0,0 +1,100 @@
|
||||
<?php $__env->startSection('title', 'Dashboard'); ?>
|
||||
<?php $__env->startSection('page_title', 'Dashboard'); ?>
|
||||
|
||||
<?php $__env->startSection('content'); ?>
|
||||
<div class="row">
|
||||
<div class="col-lg-3 col-6">
|
||||
<div class="small-box bg-info">
|
||||
<div class="inner">
|
||||
<h3><?php echo e($stats['individui']); ?></h3>
|
||||
<p>Individui</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fas fa-users"></i>
|
||||
</div>
|
||||
<a href="<?php echo e(route('individui.index')); ?>" class="small-box-footer">Visualizza <i class="fas fa-arrow-circle-right"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 col-6">
|
||||
<div class="small-box bg-success">
|
||||
<div class="inner">
|
||||
<h3><?php echo e($stats['gruppi']); ?></h3>
|
||||
<p>Gruppi</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fas fa-folder"></i>
|
||||
</div>
|
||||
<a href="<?php echo e(route('gruppi.index')); ?>" class="small-box-footer">Visualizza <i class="fas fa-arrow-circle-right"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 col-6">
|
||||
<div class="small-box bg-warning">
|
||||
<div class="inner">
|
||||
<h3><?php echo e($stats['notifiche']); ?></h3>
|
||||
<p>Notifiche</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fas fa-bell"></i>
|
||||
</div>
|
||||
<a href="#" class="small-box-footer">Visualizza <i class="fas fa-arrow-circle-right"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><i class="fas fa-bell"></i> Ultime Notifiche</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<?php if($notifiche->count() > 0): ?>
|
||||
<ul class="todo-list" data-widget="todo-list">
|
||||
<?php $__currentLoopData = $notifiche; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $notifica): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<li>
|
||||
<span class="text"><?php echo e($notifica->titolo); ?></span>
|
||||
<small class="badge badge-info"><i class="far fa-clock"></i> <?php echo e($notifica->created_at->diffForHumans()); ?></small>
|
||||
</li>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</ul>
|
||||
<?php else: ?>
|
||||
<p class="text-muted">Nessuna notifica</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><i class="fas fa-info-circle"></i> Benvenuto</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<?php
|
||||
$appName = \App\Models\AppSetting::getAppName() ?? 'Glastree';
|
||||
$orgName = \App\Models\AppSetting::getOrgName();
|
||||
$welcome = \App\Models\AppSetting::getDashboardWelcome();
|
||||
?>
|
||||
<?php if($welcome): ?>
|
||||
<p><?php echo nl2br(e($welcome)); ?></p>
|
||||
<?php else: ?>
|
||||
<p>Benvenuto in <strong><?php echo e(e($appName)); ?></strong><?php echo e($orgName ? ', ' . e($orgName) : ''); ?>.</p>
|
||||
<?php endif; ?>
|
||||
<p>Dal menu laterale puoi navigare tra le sezioni:</p>
|
||||
<ul>
|
||||
<li><strong>Individui</strong>: Gestione delle persone registrate</li>
|
||||
<li><strong>Gruppi</strong>: Gestione della struttura organizzativa</li>
|
||||
<li><strong>Documenti</strong>: Archivio documentale</li>
|
||||
<li><strong>Eventi</strong>: Calendario eventi</li>
|
||||
<li><strong>Mailing</strong>: Comunicazioni email</li>
|
||||
</ul>
|
||||
<?php if(Auth::user()->is_admin): ?>
|
||||
<div class="alert alert-success mt-3">
|
||||
<i class="fas fa-crown"></i> <strong>Amministratore</strong>: Hai accesso completo al sistema.
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php $__env->stopSection(); ?>
|
||||
<?php echo $__env->make('layouts.adminlte', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/glastree/resources/views/home/dashboard.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,77 @@
|
||||
<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;
|
||||
|
||||
$__newAttributes = [];
|
||||
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames((['type' => 'default', 'variant' => 'soft']));
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (in_array($__key, $__propNames)) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
} else {
|
||||
$__newAttributes[$__key] = $__value;
|
||||
}
|
||||
}
|
||||
|
||||
$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);
|
||||
|
||||
unset($__propNames);
|
||||
unset($__newAttributes);
|
||||
|
||||
foreach (array_filter((['type' => 'default', 'variant' => 'soft']), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
}
|
||||
|
||||
$__defined_vars = get_defined_vars();
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (array_key_exists($__key, $__defined_vars)) unset($$__key);
|
||||
}
|
||||
|
||||
unset($__defined_vars, $__key, $__value); ?>
|
||||
|
||||
<?php
|
||||
$baseClasses = 'inline-flex w-fit shrink-0 items-center justify-center gap-1 font-mono leading-3 uppercase transition-colors dark:border [&_svg]:size-2.5 h-6 min-w-5 rounded-md px-1.5 text-xs/none';
|
||||
|
||||
$types = [
|
||||
'default' => [
|
||||
'soft' => 'bg-black/8 text-neutral-900 dark:border-neutral-700 dark:bg-white/10 dark:text-neutral-100',
|
||||
'solid' => 'bg-neutral-600 text-neutral-100 dark:border-neutral-500 dark:bg-neutral-600',
|
||||
],
|
||||
'success' => [
|
||||
'soft' => 'bg-emerald-200 text-emerald-900 dark:border-emerald-600 dark:bg-emerald-900/70 dark:text-emerald-400',
|
||||
'solid' => 'bg-emerald-600 dark:border-emerald-500 dark:bg-emerald-600',
|
||||
],
|
||||
'primary' => [
|
||||
'soft' => 'bg-blue-100 text-blue-900 dark:border-blue-800 dark:bg-blue-950 dark:text-blue-300',
|
||||
'solid' => 'bg-blue-700 dark:border-blue-600 dark:bg-blue-700',
|
||||
],
|
||||
'error' => [
|
||||
'soft' => 'bg-rose-200 text-rose-900 dark:border-rose-900 dark:bg-rose-950 dark:text-rose-100 dark:[&_svg]:!text-white',
|
||||
'solid' => 'bg-rose-600 dark:border-rose-500 dark:bg-rose-600',
|
||||
],
|
||||
'alert' => [
|
||||
'soft' => 'bg-amber-200 text-amber-900 dark:border-amber-800 dark:bg-amber-950 dark:text-amber-300',
|
||||
'solid' => 'bg-amber-600 dark:border-amber-500 dark:bg-amber-600',
|
||||
],
|
||||
'white' => [
|
||||
'soft' => 'bg-white text-neutral-900 dark:border-neutral-700 dark:bg-neutral-800 dark:text-neutral-100',
|
||||
'solid' => 'bg-black/10 text-neutral-900 dark:text-neutral-900 dark:bg-white',
|
||||
],
|
||||
];
|
||||
|
||||
$variants = [
|
||||
'soft' => '',
|
||||
'solid' => 'text-white dark:text-white [&_svg]:!text-white',
|
||||
];
|
||||
|
||||
$typeClasses = $types[$type][$variant] ?? $types['default']['soft'];
|
||||
$variantClasses = $variants[$variant] ?? $variants['soft'];
|
||||
|
||||
$classes = implode(' ', [$baseClasses, $typeClasses, $variantClasses]);
|
||||
|
||||
?>
|
||||
|
||||
<div <?php echo e($attributes->merge(['class' => $classes])); ?>>
|
||||
<?php echo e($slot); ?>
|
||||
|
||||
</div>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/resources/exceptions/renderer/components/badge.blade.php ENDPATH**/ ?>
|
||||
@@ -27,6 +27,9 @@
|
||||
<a href="#ruoli" class="list-group-item list-group-item-action" data-toggle="tab">
|
||||
<i class="nav-icon fas fa-users-cog mr-2"></i> Tipi di Ruolo
|
||||
</a>
|
||||
<a href="#tipologie-eventi" class="list-group-item list-group-item-action" data-toggle="tab">
|
||||
<i class="nav-icon fas fa-calendar mr-2"></i> Tipologie Eventi
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -313,6 +316,80 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="tipologie-eventi">
|
||||
<div class="card card-primary">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Tipologie Eventi</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p class="text-muted">Gestisci le tipologie disponibili per gli eventi del calendario.</p>
|
||||
|
||||
<?php if(session('success')): ?>
|
||||
<div class="alert alert-success"><?php echo e(session('success')); ?></div>
|
||||
<?php endif; ?>
|
||||
<?php if(session('error')): ?>
|
||||
<div class="alert alert-danger"><?php echo e(session('error')); ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="mb-3">
|
||||
<button type="button" class="btn btn-success btn-sm" data-toggle="modal" data-target="#addTipologiaEventoModal">
|
||||
<i class="fas fa-plus"></i> Nuova Tipologia
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<table class="table table-bordered table-striped" id="tipologie-eventi-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 40px;">Ordine</th>
|
||||
<th>Nome</th>
|
||||
<th>Descrizione</th>
|
||||
<th style="width: 100px;">Stato</th>
|
||||
<th style="width: 150px;">Azioni</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tipologie-eventi-sortable">
|
||||
<?php $__currentLoopData = $tipologieEventi; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tipologia): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<tr data-id="<?php echo e($tipologia->id); ?>">
|
||||
<td class="text-center">
|
||||
<i class="fas fa-arrows-alt handle" style="cursor: grab;"></i>
|
||||
</td>
|
||||
<td>
|
||||
<span class="tipologia-evento-nome"><?php echo e($tipologia->nome); ?></span>
|
||||
</td>
|
||||
<td><?php echo e($tipologia->descrizione ?? '-'); ?></td>
|
||||
<td>
|
||||
<?php if($tipologia->attiva): ?>
|
||||
<span class="badge badge-success">Attiva</span>
|
||||
<?php else: ?>
|
||||
<span class="badge badge-secondary">Disattivata</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-xs btn-warning" onclick="editTipologiaEvento(<?php echo e($tipologia->id); ?>, '<?php echo e(addslashes($tipologia->nome)); ?>', '<?php echo e(addslashes($tipologia->descrizione ?? '')); ?>', <?php echo e($tipologia->attiva ? 'true' : 'false'); ?>)">
|
||||
<i class="fas fa-edit"></i>
|
||||
</button>
|
||||
<?php if($tipologia->eventi()->count() == 0): ?>
|
||||
<form method="POST" action="<?php echo e(route('impostazioni.tipologie-eventi.destroy', $tipologia->id)); ?>" style="display: inline;">
|
||||
<?php echo csrf_field(); ?>
|
||||
<?php echo method_field('DELETE'); ?>
|
||||
<button type="submit" class="btn btn-xs btn-danger" onclick="return confirm('Eliminare questa tipologia?')">
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
</form>
|
||||
<?php else: ?>
|
||||
<button type="button" class="btn btn-xs btn-danger" disabled title="Eventi associati: <?php echo e($tipologia->eventi()->count()); ?>">
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -444,11 +521,93 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="addTipologiaEventoModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<form method="POST" action="<?php echo e(route('impostazioni.tipologie-eventi.store')); ?>">
|
||||
<?php echo csrf_field(); ?>
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Nuova Tipologia Evento</h4>
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label for="tipologia_evento_nome">Nome *</label>
|
||||
<input type="text" name="nome" id="tipologia_evento_nome" class="form-control" required maxlength="50" placeholder="es. catechesi">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="tipologia_evento_descrizione">Descrizione</label>
|
||||
<input type="text" name="descrizione" id="tipologia_evento_descrizione" class="form-control" maxlength="255" placeholder="es. Catechesi">
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Annulla</button>
|
||||
<button type="submit" class="btn btn-primary">Salva</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="editTipologiaEventoModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<form method="POST" action="" id="editTipologiaEventoForm">
|
||||
<?php echo csrf_field(); ?>
|
||||
<?php echo method_field('PUT'); ?>
|
||||
<input type="hidden" name="id" id="edit_tipologia_evento_id">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Modifica Tipologia Evento</h4>
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label for="edit_tipologia_evento_nome">Nome *</label>
|
||||
<input type="text" name="nome" id="edit_tipologia_evento_nome" class="form-control" required maxlength="50">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="edit_tipologia_evento_descrizione">Descrizione</label>
|
||||
<input type="text" name="descrizione" id="edit_tipologia_evento_descrizione" class="form-control" maxlength="255">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-switch">
|
||||
<input type="checkbox" class="custom-control-input" id="edit_tipologia_evento_attiva" name="attiva" value="1">
|
||||
<label class="custom-control-label" for="edit_tipologia_evento_attiva">Attiva</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Annulla</button>
|
||||
<button type="submit" class="btn btn-primary">Salva</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php $__env->startSection('scripts'); ?>
|
||||
<script src="https://cdn.jsdelivr.net/npm/sortablejs@1.15.0/Sortable.min.js"></script>
|
||||
<script>
|
||||
function activateTabFromHash() {
|
||||
var hash = window.location.hash;
|
||||
if (hash) {
|
||||
var tabLink = document.querySelector('.list-group a[href="' + hash + '"]');
|
||||
if (tabLink) {
|
||||
$(tabLink).tab('show');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
activateTabFromHash();
|
||||
});
|
||||
|
||||
$(window).on('hashchange', function() {
|
||||
activateTabFromHash();
|
||||
});
|
||||
|
||||
function editTipologia(id, nome, descrizione, attiva) {
|
||||
$('#edit_tipologia_id').val(id);
|
||||
$('#edit_tipologia_nome').val(nome);
|
||||
@@ -467,6 +626,15 @@ function editRuolo(id, nome, descrizione, attiva) {
|
||||
$('#editRuoloModal').modal('show');
|
||||
}
|
||||
|
||||
function editTipologiaEvento(id, nome, descrizione, attiva) {
|
||||
$('#edit_tipologia_evento_id').val(id);
|
||||
$('#edit_tipologia_evento_nome').val(nome);
|
||||
$('#edit_tipologia_evento_descrizione').val(descrizione);
|
||||
$('#edit_tipologia_evento_attiva').prop('checked', attiva);
|
||||
$('#editTipologiaEventoForm').attr('action', '/impostazioni/tipologie-eventi/' + id);
|
||||
$('#editTipologiaEventoModal').modal('show');
|
||||
}
|
||||
|
||||
var sortableTipologie = Sortable.create(document.getElementById('tipologie-sortable'), {
|
||||
handle: '.handle',
|
||||
animation: 150,
|
||||
@@ -507,11 +675,34 @@ var sortableRuoli = Sortable.create(document.getElementById('ruoli-sortable'), {
|
||||
}
|
||||
});
|
||||
|
||||
var sortableTipologieEventi = Sortable.create(document.getElementById('tipologie-eventi-sortable'), {
|
||||
handle: '.handle',
|
||||
animation: 150,
|
||||
onEnd: function(evt) {
|
||||
var order = [];
|
||||
$('#tipologie-eventi-sortable tr').each(function() {
|
||||
order.push($(this).data('id'));
|
||||
});
|
||||
|
||||
fetch('<?php echo e(route('impostazioni.tipologie-eventi.reorder')); ?>', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': '<?php echo e(csrf_token()); ?>',
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({ order: order })
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
|
||||
var target = $(e.target).attr('href');
|
||||
if (target === '#ruoli') {
|
||||
sortableRuoli.refresh();
|
||||
}
|
||||
if (target === '#tipologie-eventi') {
|
||||
sortableTipologieEventi.refresh();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;
|
||||
|
||||
$__newAttributes = [];
|
||||
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames((['method']));
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (in_array($__key, $__propNames)) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
} else {
|
||||
$__newAttributes[$__key] = $__value;
|
||||
}
|
||||
}
|
||||
|
||||
$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);
|
||||
|
||||
unset($__propNames);
|
||||
unset($__newAttributes);
|
||||
|
||||
foreach (array_filter((['method']), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
}
|
||||
|
||||
$__defined_vars = get_defined_vars();
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (array_key_exists($__key, $__defined_vars)) unset($$__key);
|
||||
}
|
||||
|
||||
unset($__defined_vars, $__key, $__value); ?>
|
||||
|
||||
<?php
|
||||
$type = match ($method) {
|
||||
'GET', 'OPTIONS', 'ANY' => 'default',
|
||||
'POST' => 'success',
|
||||
'PUT', 'PATCH' => 'primary',
|
||||
'DELETE' => 'error',
|
||||
default => 'default',
|
||||
};
|
||||
?>
|
||||
|
||||
<?php if (isset($component)) { $__componentOriginal0bc865510ef3ecddbe48edc4e8cc9ddb = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginal0bc865510ef3ecddbe48edc4e8cc9ddb = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.badge','data' => ['type' => ''.e($type).'']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::badge'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['type' => ''.e($type).'']); ?>
|
||||
<?php if (isset($component)) { $__componentOriginalba2eecb54ab69c011eea9820c76048d8 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginalba2eecb54ab69c011eea9820c76048d8 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.icons.globe','data' => ['class' => 'w-2.5 h-2.5']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('laravel-exceptions-renderer::icons.globe'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['class' => 'w-2.5 h-2.5']); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginalba2eecb54ab69c011eea9820c76048d8)): ?>
|
||||
<?php $attributes = $__attributesOriginalba2eecb54ab69c011eea9820c76048d8; ?>
|
||||
<?php unset($__attributesOriginalba2eecb54ab69c011eea9820c76048d8); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginalba2eecb54ab69c011eea9820c76048d8)): ?>
|
||||
<?php $component = $__componentOriginalba2eecb54ab69c011eea9820c76048d8; ?>
|
||||
<?php unset($__componentOriginalba2eecb54ab69c011eea9820c76048d8); ?>
|
||||
<?php endif; ?>
|
||||
<?php echo e($method); ?>
|
||||
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginal0bc865510ef3ecddbe48edc4e8cc9ddb)): ?>
|
||||
<?php $attributes = $__attributesOriginal0bc865510ef3ecddbe48edc4e8cc9ddb; ?>
|
||||
<?php unset($__attributesOriginal0bc865510ef3ecddbe48edc4e8cc9ddb); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginal0bc865510ef3ecddbe48edc4e8cc9ddb)): ?>
|
||||
<?php $component = $__componentOriginal0bc865510ef3ecddbe48edc4e8cc9ddb; ?>
|
||||
<?php unset($__componentOriginal0bc865510ef3ecddbe48edc4e8cc9ddb); ?>
|
||||
<?php endif; ?>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/resources/exceptions/renderer/components/http-method.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,87 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="it">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Anteprima non disponibile</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 100vh;
|
||||
margin: 0;
|
||||
background-color: #f4f6f9;
|
||||
color: #333;
|
||||
}
|
||||
.fallback-container {
|
||||
text-align: center;
|
||||
padding: 40px;
|
||||
background: white;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
|
||||
max-width: 400px;
|
||||
}
|
||||
.fallback-icon {
|
||||
font-size: 64px;
|
||||
color: #6c757d;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.fallback-title {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.fallback-message {
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
.fallback-file-info {
|
||||
background: #f8f9fa;
|
||||
padding: 12px;
|
||||
border-radius: 4px;
|
||||
margin-bottom: 24px;
|
||||
font-size: 13px;
|
||||
}
|
||||
.fallback-file-info strong {
|
||||
display: block;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.download-btn {
|
||||
display: inline-block;
|
||||
padding: 10px 24px;
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
border-radius: 4px;
|
||||
font-weight: 500;
|
||||
transition: background-color 0.2s;
|
||||
}
|
||||
.download-btn:hover {
|
||||
background-color: #0056b3;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="fallback-container">
|
||||
<div class="fallback-icon">📄</div>
|
||||
<div class="fallback-title">Anteprima non disponibile</div>
|
||||
<div class="fallback-message">
|
||||
Questo tipo di file non può essere visualizzato nell'anteprima.
|
||||
Scarica il file per visualizzarlo con l'applicazione appropriata.
|
||||
</div>
|
||||
<div class="fallback-file-info">
|
||||
<strong><?php echo e($documento->nome_file); ?></strong>
|
||||
<?php echo e(strtoupper(pathinfo($documento->file_path, PATHINFO_EXTENSION))); ?> ·
|
||||
<?php echo e(number_format($documento->dimensione / 1024, 1)); ?> KB
|
||||
</div>
|
||||
<a href="/documenti/<?php echo e($documento->id); ?>/download" class="download-btn">
|
||||
⬇️ Scarica File
|
||||
</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<?php /**PATH /var/www/html/glastree/resources/views/documenti/preview-fallback.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php $__env->startSection('title', __('Server Error')); ?>
|
||||
<?php $__env->startSection('code', '500'); ?>
|
||||
<?php $__env->startSection('message', __('Server Error')); ?>
|
||||
|
||||
<?php echo $__env->make('errors::minimal', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/500.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;
|
||||
|
||||
$__newAttributes = [];
|
||||
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames((['headers']));
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (in_array($__key, $__propNames)) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
} else {
|
||||
$__newAttributes[$__key] = $__value;
|
||||
}
|
||||
}
|
||||
|
||||
$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);
|
||||
|
||||
unset($__propNames);
|
||||
unset($__newAttributes);
|
||||
|
||||
foreach (array_filter((['headers']), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
}
|
||||
|
||||
$__defined_vars = get_defined_vars();
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (array_key_exists($__key, $__defined_vars)) unset($$__key);
|
||||
}
|
||||
|
||||
unset($__defined_vars, $__key, $__value); ?>
|
||||
|
||||
<div class="flex flex-col gap-3">
|
||||
<h2 class="text-lg font-semibold text-neutral-900 dark:text-white">Headers</h2>
|
||||
<div class="flex flex-col">
|
||||
<?php $__currentLoopData = $headers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<div class="flex max-w-full items-baseline gap-2 h-10 text-sm font-mono">
|
||||
<div class="uppercase text-neutral-500 dark:text-neutral-400 shrink-0"><?php echo e($key); ?></div>
|
||||
<div class="min-w-6 grow h-3 border-b-2 border-dotted border-neutral-300 dark:border-white/20"></div>
|
||||
<div class="truncate text-neutral-900 dark:text-white">
|
||||
<span data-tippy-content="<?php echo e($value); ?>">
|
||||
<?php echo e($value); ?>
|
||||
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php /**PATH /var/www/html/glastree/vendor/laravel/framework/src/Illuminate/Foundation/resources/exceptions/renderer/components/request-header.blade.php ENDPATH**/ ?>
|
||||