modifica - da terminare gestioen doc remoti - resto ok

This commit is contained in:
2026-05-28 13:25:47 +02:00
parent f2b0833b90
commit 4a3051faff
122 changed files with 445 additions and 15819 deletions
+1 -1
View File
@@ -1 +1 @@
{"version":2,"defects":{"Tests\\Feature\\ExampleTest::test_the_application_returns_a_successful_response":7,"Tests\\Feature\\CalendarEventsTest::test_generate_settimanale_events_produces_weekly_occurrences":7,"Tests\\Feature\\StorageRepositoryTest::test_can_create_webdav_repository":8,"Tests\\Feature\\StorageRepositoryTest::test_can_create_google_drive_repository":8,"Tests\\Feature\\StorageRepositoryTest::test_requires_nome_and_tipo":8,"Tests\\Feature\\StorageRepositoryTest::test_can_list_repositories_in_settings":8,"Tests\\Feature\\StorageRepositoryTest::test_can_delete_repository_with_no_documents":7,"Tests\\Feature\\StorageRepositoryTest::test_encrypts_sensitive_config_fields":8,"Tests\\Feature\\StorageRepositoryTest::test_tipo_labels":8,"Tests\\Feature\\StorageRepositoryTest::test_tipo_icons":8,"Tests\\Feature\\StorageRepositoryTest::test_can_reorder_repositories":8,"Tests\\Unit\\StorageRepositoryServiceTest::test_encrypts_webdav_password":8,"Tests\\Unit\\StorageRepositoryServiceTest::test_encrypts_google_drive_secrets":8,"Tests\\Unit\\StorageRepositoryServiceTest::test_builds_null_filesystem_for_unknown_tipo":8},"times":{"Tests\\Unit\\ExampleTest::test_that_true_is_true":0,"Tests\\Feature\\ExampleTest::test_the_application_returns_a_successful_response":0.022,"Tests\\Feature\\CalendarEventsTest::test_find_first_sunday_of_june_2026":0.002,"Tests\\Feature\\CalendarEventsTest::test_find_second_saturday_of_june_2026":0.001,"Tests\\Feature\\CalendarEventsTest::test_find_fifth_sunday_returns_null_when_not_in_month":0.001,"Tests\\Feature\\CalendarEventsTest::test_generate_mensile_events_for_all_months":0.015,"Tests\\Feature\\CalendarEventsTest::test_generate_mensile_events_respects_selected_months":0.002,"Tests\\Feature\\CalendarEventsTest::test_generate_annuale_events_produces_correct_dates":0.002,"Tests\\Feature\\CalendarEventsTest::test_generate_settimanale_events_produces_weekly_occurrences":0.004,"Tests\\Unit\\StorageRepositoryServiceTest::test_encrypts_webdav_password":0.021,"Tests\\Unit\\StorageRepositoryServiceTest::test_encrypts_google_drive_secrets":0.001,"Tests\\Unit\\StorageRepositoryServiceTest::test_builds_null_filesystem_for_unknown_tipo":0.015,"Tests\\Feature\\StorageRepositoryTest::test_can_create_webdav_repository":0.012,"Tests\\Feature\\StorageRepositoryTest::test_can_create_google_drive_repository":0.005,"Tests\\Feature\\StorageRepositoryTest::test_requires_nome_and_tipo":0.007,"Tests\\Feature\\StorageRepositoryTest::test_can_delete_repository_with_no_documents":0.008,"Tests\\Feature\\StorageRepositoryTest::test_tipo_labels":0.001,"Tests\\Feature\\StorageRepositoryTest::test_tipo_icons":0.002,"Tests\\Feature\\StorageRepositoryTest::test_can_reorder_repositories":0.008}}
{"version":2,"defects":{"Tests\\Feature\\ExampleTest::test_the_application_returns_a_successful_response":7,"Tests\\Feature\\CalendarEventsTest::test_generate_settimanale_events_produces_weekly_occurrences":7,"Tests\\Feature\\StorageRepositoryTest::test_can_create_webdav_repository":8,"Tests\\Feature\\StorageRepositoryTest::test_can_create_google_drive_repository":8,"Tests\\Feature\\StorageRepositoryTest::test_requires_nome_and_tipo":8,"Tests\\Feature\\StorageRepositoryTest::test_can_list_repositories_in_settings":8,"Tests\\Feature\\StorageRepositoryTest::test_can_delete_repository_with_no_documents":7,"Tests\\Feature\\StorageRepositoryTest::test_encrypts_sensitive_config_fields":8,"Tests\\Feature\\StorageRepositoryTest::test_tipo_labels":8,"Tests\\Feature\\StorageRepositoryTest::test_tipo_icons":8,"Tests\\Feature\\StorageRepositoryTest::test_can_reorder_repositories":8,"Tests\\Unit\\StorageRepositoryServiceTest::test_encrypts_webdav_password":8,"Tests\\Unit\\StorageRepositoryServiceTest::test_encrypts_google_drive_secrets":8,"Tests\\Unit\\StorageRepositoryServiceTest::test_builds_null_filesystem_for_unknown_tipo":8},"times":{"Tests\\Unit\\ExampleTest::test_that_true_is_true":0.001,"Tests\\Feature\\ExampleTest::test_the_application_returns_a_successful_response":0.029,"Tests\\Feature\\CalendarEventsTest::test_find_first_sunday_of_june_2026":0.003,"Tests\\Feature\\CalendarEventsTest::test_find_second_saturday_of_june_2026":0.001,"Tests\\Feature\\CalendarEventsTest::test_find_fifth_sunday_returns_null_when_not_in_month":0.001,"Tests\\Feature\\CalendarEventsTest::test_generate_mensile_events_for_all_months":0.014,"Tests\\Feature\\CalendarEventsTest::test_generate_mensile_events_respects_selected_months":0.001,"Tests\\Feature\\CalendarEventsTest::test_generate_annuale_events_produces_correct_dates":0.001,"Tests\\Feature\\CalendarEventsTest::test_generate_settimanale_events_produces_weekly_occurrences":0.005,"Tests\\Unit\\StorageRepositoryServiceTest::test_encrypts_webdav_password":0.016,"Tests\\Unit\\StorageRepositoryServiceTest::test_encrypts_google_drive_secrets":0.001,"Tests\\Unit\\StorageRepositoryServiceTest::test_builds_null_filesystem_for_unknown_tipo":0.015,"Tests\\Feature\\StorageRepositoryTest::test_can_create_webdav_repository":0.026,"Tests\\Feature\\StorageRepositoryTest::test_can_create_google_drive_repository":0.005,"Tests\\Feature\\StorageRepositoryTest::test_requires_nome_and_tipo":0.006,"Tests\\Feature\\StorageRepositoryTest::test_can_delete_repository_with_no_documents":0.009,"Tests\\Feature\\StorageRepositoryTest::test_tipo_labels":0.001,"Tests\\Feature\\StorageRepositoryTest::test_tipo_icons":0.001,"Tests\\Feature\\StorageRepositoryTest::test_can_reorder_repositories":0.007}}
+87
View File
@@ -5,6 +5,14 @@ Laravel 13 / PHP 8.4 project for parish management (Glastree). Full codebase exi
---
## Issues Open
1. **Drive-Segreteria-ADIM (#3)**: Root ha 0 elementi. Verificare root_folder_id nelle impostazioni repository.
2. **Nextcloud_MB (#4)**: Connessione "Unauthorized" dopo fix authType — credenziali da verificare.
---
## System Status
### ✅ FUNZIONANTE (Stable)
@@ -895,3 +903,82 @@ php artisan route:list --name=email
- `resources/views/documenti/index.blade.php`: 10 onclick con `json_encode` invece di `addslashes`
- `resources/views/documenti/_folder_tree.blade.php`: 3 onclick con `json_encode` invece di `addslashes`
- **Stato**: ✅ 18/19 test pass. `php -l` OK. `php artisan view:cache` OK. JS braces 182/182.
### 28 Maggio 2026 - Fix Google Drive Repository: credenziali mancanti + wipe su update
- **Problema**: Drive-Segreteria (repo #1) mostrava 0 file nonostante l'account Google Drive avesse 2 cartelle e 1 file. Il test connessione diceva "Connessione riuscita. 0 elementi trovati nella root." — falso positivo.
- **Cause** (2 bug):
1. **Credenziali OAuth mancanti**: `client_secret` e `refresh_token` erano entrambi `null` nel DB. La Google API falliva silenziosamente dentro `fetchDirectory()` (catch vuoto → 0 risultati).
2. **Update wipe credenziali**: `StorageRepositoryController@update()` chiamava `encryptSensitiveConfig()` che criptava solo campi NON vuoti. Quando il form edit veniva salvato con `client_secret=''` e `refresh_token=''` (placeholder), i vecchi valori criptati venivano sovrascritti con stringhe vuote.
- **Fix**:
1. `StorageRepositoryService::encryptSensitiveConfig()`: aggiunto parametro `$existingConfig`. Se un campo sensibile è vuoto nel nuovo config ma presente in `$existingConfig`, lo preserva.
2. `StorageRepositoryController@update()`: passa `$storageRepository->config` come existing config a `encryptSensitiveConfig()`.
3. `StorageRepositoryService::buildGoogleDrive()`: validazione esplicita — lancia `InvalidArgumentException` se mancano `client_id`, `client_secret` o `refresh_token`.
4. `testConnection()` e `listContents()`: check preventivo credenziali Google Drive complete prima di chiamare `buildFilesystem()`, con messaggio chiaro.
- **Files modificati**:
- `app/Services/StorageRepositoryService.php`: encryptSensitiveConfig() con existingConfig, buildGoogleDrive() validation, testConnection() credential check, listContents() credential check
- `app/Http/Controllers/StorageRepositoryController.php`: update() passa existing config
- **Per risolvere**: l'utente deve reinserire `client_secret` e `refresh_token` nella modale di modifica del repository (Impostazioni → Repository Remoti → Drive-Segreteria → Modifica). Dopo il fix, questi campi non verranno più persi al prossimo salvataggio.
- **Stato**: ✅ 18/19 test pass (solo ExampleTest pre-esistente). `php -l` OK. `php artisan view:cache` OK.
### 28 Maggio 2026 - OAuth Google Drive integrato nell'app
- **Implementazione**: Flusso OAuth 2.0 completo senza passare dall'OAuth Playground
- **Route nuove**:
- `GET /auth/google-drive/redirect` → reindirizza a Google OAuth
- `GET /auth/google-drive/callback` → riceve il token, lo salva nel repository
- **Controller**: `StorageRepositoryController@oauthRedirect()` e `oauthCallback()`
- **Flusso UX**:
1. Utente seleziona Google Drive → compila Client ID, Client Secret, Nome
2. Click "Autorizza con Google" → reindirizzato a Google
3. Login con account Google e autorizzazione
4. Callback salva automaticamente refresh_token + campi form nella sessione
5. Redirect a `/impostazioni#repository` → modale si riapre con tutti i campi preservati
- **Fix preservazione campi**: `oauthRedirect()` salva in sessione anche `nome`, `is_active`, `root_folder_id`. Il callback li restituisce nel flash `google_drive_new_token`. JS ripristina tutti i campi nel modal (non chiama più `resetRepoForm()` che svuotava tutto).
- **Status visivo**: ✅ badge verde "Autorizzato" se refresh_token presente, ❌ "Non autorizzato" altrimenti
- **Files modificati**:
- `routes/web.php`: 2 nuove route OAuth
- `app/Http/Controllers/StorageRepositoryController.php`: oauthRedirect(), oauthCallback()
- `app/Http/Controllers/ImpostazioniController.php`: passa `$googleDriveNewToken` alla view
- `resources/views/impostazioni/index.blade.php`: pulsante + status + JS auto-ripristino campi
- **Config necessaria una tantum**: aggiungere `{APP_URL}/auth/google-drive/callback` come Authorized Redirect URI in Google Cloud Console
- **Stato**: ✅ 18/19 test pass. `php -l` OK. `php artisan view:cache` OK. JS braces 176/176.
### 28 Maggio 2026 - Fix Google Drive: normalizePath() root path
- **Problema**: Google Drive non visualizzava file e cartelle (repository remoto mostrava 0 elementi).
- **Causa**: `normalizePath('/')` in `StorageRepositoryService.php` restituiva `'/'` invece di `''`. L'adapter `as247/flysystem-google-drive` non accetta `'/'` come root path, causando fallimento silenzioso di `listContents()``[]`.
- **Contraddizione**: MEMORY.md del 28 Maggio documentava `normalizePath()` come "converte `/``''`" ma l'implementazione effettiva a riga 122 faceva `return '/'`.
- **Fix**: Cambiato `return '/'` in `return ''` in `normalizePath()`.
- **Files modificati**:
- `app/Services/StorageRepositoryService.php`: riga 122, `'/'``''`
- **Stato**: ✅ 10/10 StorageRepository test pass. `php -l` OK.
### 28 Maggio 2026 - Fix browseRepo ReferenceError: getRepoIcon inesistente
- **Problema**: Cliccando "Drive-Segreteria" nella sidebar documenti non succedeva nulla (contenuto remoto non caricato).
- **Causa**: `updateRemoteBreadcrumb()` chiamava `getRepoIcon(repoIconFromId(...))` ma `getRepoIcon()` non è mai stata definita. Il `ReferenceError` bloccava l'esecuzione di `browseRepo()` prima che `loadRemoteContents()` venisse chiamato — nessuna fetch AJAX, nessun contenuto caricato.
- **Fix**: Rimossa chiamata a `getRepoIcon()`, `repoIconFromId()` già restituisce il `className` completo (es. `"fab fa-google-drive text-danger"`). Rimosso anche `fab` hardcoded dal template (duplicato).
- **Files modificati**:
- `resources/views/documenti/index.blade.php`: riga 1383, `getRepoIcon(...)` → diretto
- **Stato**: ✅ JS braces 206/206 OK. `php -l` OK. `php artisan view:cache` OK.
### 28 Maggio 2026 - CAUSA RADICE: SweetAlert2 mancante in layout
- **Problema**: Tutte le icone azioni cartelle (Rinomina, Sposta, Elimina) non funzionavano — click senza effetto. Anche il pulsante "+ Nuova cartella" nel modal upload non funzionava.
- **Causa**: SweetAlert2 (`Swal`) **non era incluso nel layout** `adminlte.blade.php`. Le funzioni `renameFolder()`, `moveFolder()`, `deleteFolder()` e il listener `massMoveNewFolderBtn` chiamano `Swal.fire()`, che lanciava `ReferenceError: Swal is not defined`.
- **SweetAlert2 assente**: Non presente né via CDN, né via NPM (`package.json` non ha sweetalert2), né via Vite. L'unica dipendenza JS era jQuery + Bootstrap + AdminLTE via CDN.
- **Perché i fix precedenti sembravano non funzionare**: Anche dopo le correzioni a `getRepoIcon()` e `normalizePath()`, la view cache conteneva ancora il vecchio codice JS. SweetAlert2 mancante bloccava indipendentemente le azioni cartelle.
- **Fix**: Aggiunto CDN SweetAlert2 11 nel layout `adminlte.blade.php` subito dopo AdminLTE JS, prima di `@yield('scripts')`.
- **Files modificati**:
- `resources/views/layouts/adminlte.blade.php`: riga 259, aggiunto `<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>`
- **Stato**: ✅ view cache pulita (`php artisan view:clear`), tutti i file lint OK. `php artisan view:cache` OK.
### 28 Maggio 2026 - Fix authType WebDAV (Nextcloud)
- **Problema**: Test connessione Nextcloud dava "Unsupported operand types: string & int"
- **Causa**: `buildWebDAV()` passava `'authType' => 'basic'` (stringa) a `Sabre\DAV\Client`, che esegue bitwise AND (`'basic' & AUTH_BASIC`) — incompatibile
- **Soluzione**: Convertito stringa → int tramite `match`: `'basic' → WebDAVClient::AUTH_BASIC (1)`, `'digest' → AUTH_DIGEST (2)`, `'ntlm' → AUTH_NTLM (4)`
- **Stato test Nextcloud**: AuthType non dà più errore. Ora fallisce con "Unauthorized" — le credenziali Nextcloud effettive non sono corrette.
- **Drive-Segreteria-ADIM**: Credenziali OK, connessione OK, ma 0 elementi nella root. Verificare `root_folder_id`.
(Last updated: 28 Maggio 2026 - Fix authType WebDAV + verify Drive state)
@@ -3,14 +3,15 @@
namespace App\Http\Controllers;
use App\Models\AppSetting;
use App\Models\Documento;
use App\Models\EmailSetting;
use App\Models\Ruolo;
use App\Models\SenderAccount;
use App\Models\StorageRepository;
use App\Models\TipologiaDocumento;
use App\Models\TipologiaEvento;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Crypt;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Storage;
@@ -27,8 +28,9 @@ class ImpostazioniController extends Controller
$emailSettings = EmailSetting::first() ?? new EmailSetting();
$senderAccounts = SenderAccount::orderBy('email_address')->get();
$repositories = StorageRepository::orderBy('ordine')->get();
$googleDriveNewToken = session('google_drive_new_token');
return view('impostazioni.index', compact('tipologie', 'tipologieEventi', 'ruoli', 'appSettings', 'emailSettings', 'senderAccounts', 'repositories'));
return view('impostazioni.index', compact('tipologie', 'tipologieEventi', 'ruoli', 'appSettings', 'emailSettings', 'senderAccounts', 'repositories', 'googleDriveNewToken'));
}
public function saveAppSettings(Request $request)
@@ -9,6 +9,7 @@ use App\Services\StorageRepositoryService;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\View\View;
use Symfony\Component\HttpFoundation\StreamedResponse;
class StorageRepositoryController extends Controller
@@ -64,7 +65,11 @@ class StorageRepositoryController extends Controller
'ordine' => 'nullable|integer|min:0',
]);
$validated['config'] = $this->repoService->encryptSensitiveConfig($validated['config'], $validated['tipo']);
$validated['config'] = $this->repoService->encryptSensitiveConfig(
$validated['config'],
$validated['tipo'],
$storageRepository->config
);
$storageRepository->update($validated);
@@ -194,4 +199,110 @@ class StorageRepositoryController extends Controller
'Content-Disposition' => 'inline; filename="' . $basename . '"',
]);
}
public function oauthRedirect(Request $request): RedirectResponse
{
$this->authorizeWrite('settings');
$clientId = $request->get('client_id');
$clientSecret = $request->get('client_secret');
$repoId = (int) $request->get('repo_id', 0);
if (empty($clientId) || empty($clientSecret)) {
return redirect('/impostazioni#repository')->with('error', 'Inserisci Client ID e Client Secret prima di autorizzare.');
}
session(['google_drive_oauth' => [
'client_id' => $clientId,
'client_secret' => $clientSecret,
'repo_id' => $repoId,
'nome' => $request->get('nome', ''),
'is_active' => $request->get('is_active', '1'),
'root_folder_id' => $request->get('root_folder_id', 'root'),
]]);
$client = new \Google_Client();
$client->setClientId($clientId);
$client->setClientSecret($clientSecret);
$client->setRedirectUri(url('/auth/google-drive/callback'));
$client->addScope(\Google_Service_Drive::DRIVE);
$client->setAccessType('offline');
$client->setPrompt('consent');
$authUrl = $client->createAuthUrl();
return redirect()->away($authUrl);
}
public function oauthCallback(Request $request): RedirectResponse
{
$this->authorizeWrite('settings');
if ($request->get('error')) {
return redirect('/impostazioni#repository')->with('error', 'Autorizzazione Google Drive annullata o fallita.');
}
$code = $request->get('code');
if (!$code) {
return redirect('/impostazioni#repository')->with('error', 'Codice di autorizzazione mancante.');
}
$oauthData = session('google_drive_oauth');
if (!$oauthData) {
return redirect('/impostazioni#repository')->with('error', 'Sessione scaduta. Riprova l\'autorizzazione.');
}
try {
$client = new \Google_Client();
$client->setClientId($oauthData['client_id']);
$client->setClientSecret($oauthData['client_secret']);
$client->setRedirectUri(url('/auth/google-drive/callback'));
$client->addScope(\Google_Service_Drive::DRIVE);
$token = $client->fetchAccessTokenWithAuthCode($code);
if (isset($token['error'])) {
throw new \Exception($token['error_description'] ?? $token['error']);
}
$refreshToken = $client->getRefreshToken();
if (!$refreshToken) {
throw new \Exception('Refresh token non ricevuto. Assicurati che l\'app OAuth sia configurata con access_type=offline e prompt=consent nella Google Cloud Console.');
}
$repoId = $oauthData['repo_id'];
session()->forget('google_drive_oauth');
if ($repoId > 0) {
$repo = StorageRepository::find($repoId);
if ($repo) {
$config = $repo->config;
$config['client_id'] = $oauthData['client_id'];
$config['client_secret'] = $oauthData['client_secret'];
$config['refresh_token'] = $refreshToken;
$config = $this->repoService->encryptSensitiveConfig($config, 'google_drive');
$repo->update(['config' => $config]);
return redirect('/impostazioni#repository')->with('success', 'Google Drive autorizzato con successo! Refresh token salvato.');
}
return redirect('/impostazioni#repository')->with('error', 'Repository non trovato (ID: ' . $repoId . ').');
}
session()->flash('google_drive_new_token', [
'refresh_token' => $refreshToken,
'client_id' => $oauthData['client_id'],
'client_secret' => $oauthData['client_secret'],
'nome' => $oauthData['nome'] ?? '',
'is_active' => $oauthData['is_active'] ?? '1',
'root_folder_id' => $oauthData['root_folder_id'] ?? 'root',
]);
return redirect('/impostazioni#repository')->with('success', 'Autorizzazione Google Drive completata! Ora completa la creazione del repository e salva.');
} catch (\Exception $e) {
return redirect('/impostazioni#repository')->with('error', 'Errore autorizzazione Google Drive: ' . $e->getMessage());
}
}
}
+41 -11
View File
@@ -33,6 +33,14 @@ class StorageRepositoryService
public function testConnection(StorageRepository $repo): array
{
try {
$config = $repo->getDecryptedConfig();
if ($repo->tipo === 'google_drive') {
if (empty($config['client_id']) || empty($config['client_secret']) || empty($config['refresh_token'])) {
return ['success' => false, 'message' => 'Configurazione incompleta: client_id, client_secret e refresh_token sono necessari per Google Drive.'];
}
}
$filesystem = $this->buildFilesystem($repo);
if (!$filesystem) {
return ['success' => false, 'message' => 'Impossibile costruire il filesystem per questo tipo di repository.'];
@@ -49,12 +57,21 @@ class StorageRepositoryService
public function listContents(StorageRepository $repo, string $path = '/'): array
{
$filesystem = $this->buildFilesystem($repo);
if (!$filesystem) {
return [];
}
try {
$config = $repo->getDecryptedConfig();
if ($repo->tipo === 'google_drive') {
if (empty($config['client_id']) || empty($config['client_secret']) || empty($config['refresh_token'])) {
Log::warning("StorageRepository: listContents failed for repo #{$repo->id} ({$repo->nome}): credenziali Google Drive mancanti");
return [];
}
}
$filesystem = $this->buildFilesystem($repo);
if (!$filesystem) {
return [];
}
$normalizedPath = $this->normalizePath($path);
$items = $filesystem->listContents($normalizedPath, false)->toArray();
$result = [];
@@ -76,7 +93,7 @@ class StorageRepositoryService
}
}
public function encryptSensitiveConfig(array $config, string $tipo): array
public function encryptSensitiveConfig(array $config, string $tipo, array $existingConfig = []): array
{
$sensitiveFields = match ($tipo) {
'webdav' => ['password'],
@@ -87,6 +104,8 @@ class StorageRepositoryService
foreach ($sensitiveFields as $field) {
if (!empty($config[$field]) && !$this->isEncrypted($config[$field])) {
$config[$field] = Crypt::encryptString($config[$field]);
} elseif (empty($config[$field]) && !empty($existingConfig[$field])) {
$config[$field] = $existingConfig[$field];
}
}
@@ -100,7 +119,7 @@ class StorageRepositoryService
return '';
}
if ($path === '/') {
return '/';
return '';
}
return ltrim($path, '/\\');
}
@@ -112,11 +131,18 @@ class StorageRepositoryService
private function buildWebDAV(array $config): ?Filesystem
{
$authType = match ($config['auth_type'] ?? 'basic') {
'basic' => WebDAVClient::AUTH_BASIC,
'digest' => WebDAVClient::AUTH_DIGEST,
'ntlm' => WebDAVClient::AUTH_NTLM,
default => WebDAVClient::AUTH_BASIC,
};
$client = new WebDAVClient([
'baseUri' => rtrim($config['base_uri'] ?? '', '/') . '/',
'userName' => $config['username'] ?? '',
'password' => $config['password'] ?? '',
'authType' => $config['auth_type'] ?? 'basic',
'authType' => $authType,
]);
$root = ltrim($config['root'] ?? '/', '/');
@@ -127,10 +153,14 @@ class StorageRepositoryService
private function buildGoogleDrive(array $config): ?Filesystem
{
if (empty($config['client_id']) || empty($config['client_secret']) || empty($config['refresh_token'])) {
throw new \InvalidArgumentException('Google Drive richiede client_id, client_secret e refresh_token per l\'autenticazione.');
}
$client = new \Google_Client();
$client->setClientId($config['client_id'] ?? '');
$client->setClientSecret($config['client_secret'] ?? '');
$client->refreshToken($config['refresh_token'] ?? '');
$client->setClientId($config['client_id']);
$client->setClientSecret($config['client_secret']);
$client->refreshToken($config['refresh_token']);
$client->addScope(\Google_Service_Drive::DRIVE);
$service = new \Google_Service_Drive($client);
+1 -1
View File
@@ -1380,7 +1380,7 @@ function browseRepo(repoId, repoNome, path) {
function updateRemoteBreadcrumb(nome, path) {
const bc = document.getElementById('remoteBreadcrumb');
const parts = path.replace(/^\/+|\/+$/g, '').split('/').filter(Boolean);
let html = '<i class="fab ' + (currentRepoBrowse && currentRepoBrowse.id ? getRepoIcon(repoIconFromId(currentRepoBrowse.id)) : 'fa-server') + ' mr-1"></i> ' + escHtml(nome);
let html = '<i class="' + (currentRepoBrowse && currentRepoBrowse.id ? repoIconFromId(currentRepoBrowse.id) : 'fa fa-server') + ' mr-1"></i> ' + escHtml(nome);
if (parts.length > 0 && parts[0] !== '') {
html += ' / ' + parts.map(p => escHtml(p)).join(' / ');
}
+96 -10
View File
@@ -1625,6 +1625,7 @@ if (window.location.hash === '#email') {
// ===== REPOSITORY REMOTI =====
let repositories = @json($repositories);
let newToken = @json($googleDriveNewToken);
function resetRepoForm() {
document.getElementById('repoForm').action = '{{ route('storage-repositories.store') }}';
@@ -1633,6 +1634,7 @@ function resetRepoForm() {
document.getElementById('repoForm').reset();
document.getElementById('repoId').value = '';
document.getElementById('repo_is_active').checked = true;
setGdAuthStatus(false, '');
toggleRepoConfigFields();
}
@@ -1640,6 +1642,59 @@ function toggleRepoConfigFields() {
const tipo = document.getElementById('repo_tipo').value;
document.getElementById('webdavFields').style.display = tipo === 'webdav' ? '' : 'none';
document.getElementById('googleDriveFields').style.display = tipo === 'google_drive' ? '' : 'none';
if (tipo === 'google_drive') {
updateGdAuthUrl();
}
}
function setGdAuthStatus(authorized, clientId) {
const statusEl = document.getElementById('gdAuthStatus');
const btn = document.getElementById('gdAuthBtn');
if (authorized) {
statusEl.innerHTML = '<span class="text-success"><i class="fas fa-check-circle mr-1"></i> Autorizzato</span>';
btn.innerHTML = '<i class="fas fa-refresh mr-1"></i> Ri-autorizza con Google';
} else {
statusEl.innerHTML = '<span class="text-muted"><i class="fas fa-circle mr-1"></i> Non autorizzato</span>';
btn.innerHTML = '<i class="fas fa-google mr-1"></i> Autorizza con Google';
}
}
function updateGdAuthUrl() {
const clientId = document.getElementById('gd_client_id').value.trim();
const clientSecret = document.getElementById('gd_client_secret').value.trim();
const repoId = document.getElementById('repoId').value;
const nome = document.getElementById('repo_nome').value.trim();
const isActive = document.getElementById('repo_is_active').checked ? '1' : '0';
const rootFolderId = document.getElementById('gd_root_folder_id').value.trim();
const btn = document.getElementById('gdAuthBtn');
if (clientId && clientSecret) {
const params = new URLSearchParams({
client_id: clientId,
client_secret: clientSecret,
repo_id: repoId || '0',
nome: nome,
is_active: isActive,
root_folder_id: rootFolderId || 'root',
});
btn.href = '{{ route('google-drive.redirect') }}?' + params.toString();
btn.classList.remove('disabled');
} else {
btn.href = '#';
btn.classList.add('disabled');
}
}
function startGdAuth() {
const clientId = document.getElementById('gd_client_id').value.trim();
const clientSecret = document.getElementById('gd_client_secret').value.trim();
if (!clientId || !clientSecret) {
alert('Inserisci Client ID e Client Secret prima di autorizzare.');
return false;
}
// Open in same window (full redirect flow)
updateGdAuthUrl();
window.location.href = document.getElementById('gdAuthBtn').href;
return false;
}
function editRepo(id) {
@@ -1664,10 +1719,11 @@ function editRepo(id) {
document.getElementById('gd_client_id').value = config.client_id || '';
document.getElementById('gd_client_secret').value = '';
document.getElementById('gd_client_secret').placeholder = config.client_secret ? '......' : '';
document.getElementById('gd_refresh_token').value = '';
document.getElementById('gd_refresh_token').placeholder = config.refresh_token ? '......' : '';
document.getElementById('gd_refresh_token').value = config.refresh_token || '';
document.getElementById('gd_root_folder_id').value = config.root_folder_id || 'root';
const hasRefreshToken = !!(config.refresh_token && config.refresh_token !== '');
setGdAuthStatus(hasRefreshToken, config.client_id || '');
toggleRepoConfigFields();
$('#repoModal').modal('show');
}
@@ -1736,6 +1792,25 @@ $(document).ready(function() {
}
});
}
if (newToken && newToken.refresh_token) {
// Auto-open modal after OAuth callback — preserve nome and other fields
document.getElementById('repoForm').action = '{{ route('storage-repositories.store') }}';
document.getElementById('repoMethod').value = 'POST';
document.getElementById('repoModalTitle').textContent = 'Nuovo Repository Remoto';
document.getElementById('repoForm').reset();
document.getElementById('repoId').value = '';
document.getElementById('repo_nome').value = newToken.nome || '';
document.getElementById('repo_tipo').value = 'google_drive';
document.getElementById('repo_is_active').checked = newToken.is_active !== '0';
document.getElementById('gd_client_id').value = newToken.client_id || '';
document.getElementById('gd_client_secret').value = newToken.client_secret || '';
document.getElementById('gd_refresh_token').value = newToken.refresh_token;
document.getElementById('gd_root_folder_id').value = newToken.root_folder_id || 'root';
setGdAuthStatus(true, newToken.client_id || '');
toggleRepoConfigFields();
$('#repoModal').modal('show');
}
});
</script>
@@ -1828,35 +1903,46 @@ $(document).ready(function() {
<div class="col-md-6">
<div class="form-group">
<label for="gd_client_id">Client ID *</label>
<input type="text" name="config[client_id]" id="gd_client_id" class="form-control" placeholder="Google Client ID">
<input type="text" name="config[client_id]" id="gd_client_id" class="form-control" placeholder="Google Client ID" oninput="updateGdAuthUrl()">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="gd_client_secret">Client Secret *</label>
<input type="text" name="config[client_secret]" id="gd_client_secret" class="form-control" placeholder="Google Client Secret">
<input type="password" name="config[client_secret]" id="gd_client_secret" class="form-control" placeholder="Google Client Secret" oninput="updateGdAuthUrl()">
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="gd_refresh_token">Refresh Token *</label>
<input type="text" name="config[refresh_token]" id="gd_refresh_token" class="form-control" placeholder="OAuth Refresh Token">
<input type="hidden" name="config[refresh_token]" id="gd_refresh_token" value="">
<div class="mb-3">
<label class="d-block">Autorizzazione Google</label>
<div id="gdAuthStatus" class="mb-2">
<span class="text-muted"><i class="fas fa-circle mr-1"></i> Non autorizzato</span>
</div>
<a id="gdAuthBtn" href="#" class="btn btn-danger btn-sm" target="_blank" onclick="return startGdAuth()">
<i class="fas fa-google mr-1"></i> Autorizza con Google
</a>
<small class="d-block text-muted mt-1">
Dopo aver cliccato, verrai reindirizzato a Google per autorizzare l'app.
Al termine, il Refresh Token verrà salvato automaticamente.
</small>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="gd_root_folder_id">Root Folder ID</label>
<input type="text" name="config[root_folder_id]" id="gd_root_folder_id" class="form-control" value="root" placeholder="root">
<input type="text" name="config[root_folder_id]" id="gd_root_folder_id" class="form-control" value="root" placeholder="root" oninput="updateGdAuthUrl()">
<small class="text-muted">ID della cartella Google Drive, default: root</small>
</div>
</div>
</div>
<div class="alert alert-info">
<i class="fas fa-info-circle mr-2"></i>
Per ottenere le credenziali OAuth: <a href="https://console.cloud.google.com/" target="_blank">Google Cloud Console</a>
&rarr; API &amp; Services &rarr; Credentials &rarr; Crea OAuth Client ID (Desktop App).
<strong>Prima volta?</strong> Crea il progetto in <a href="https://console.cloud.google.com/" target="_blank">Google Cloud Console</a>
&rarr; API &amp; Services &rarr; Credentials &rarr; Crea OAuth Client ID (Web Application).
Aggiungi <code>{{ url('/auth/google-drive/callback') }}</code> come <strong>Authorized Redirect URI</strong>.
</div>
</div>
</div>
@@ -256,6 +256,7 @@ $appName = \App\Models\AppSetting::getAppName() ?? 'Glastree';
<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>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
@yield('scripts')
</body>
</html>
+4
View File
@@ -194,6 +194,10 @@ Route::post('/storage-repositories/reorder', [StorageRepositoryController::class
Route::get('/storage-repositories/{storage_repository}/download', [StorageRepositoryController::class, 'downloadRemote'])->middleware('auth')->name('storage-repositories.download');
Route::get('/storage-repositories/{storage_repository}/preview', [StorageRepositoryController::class, 'previewRemote'])->middleware('auth')->name('storage-repositories.preview');
// Google Drive OAuth
Route::get('/auth/google-drive/redirect', [StorageRepositoryController::class, 'oauthRedirect'])->middleware('auth')->name('google-drive.redirect');
Route::get('/auth/google-drive/callback', [StorageRepositoryController::class, 'oauthCallback'])->middleware('auth')->name('google-drive.callback');
Route::get('/email/{folder?}', [EmailController::class, 'index'])->middleware('auth')->name('email.index')->defaults('folder', 'inbox');
Route::get('/email/{folder}/{id}', [EmailController::class, 'show'])->middleware('auth')->name('email.show');
Route::get('/email/compose', [EmailController::class, 'compose'])->middleware('auth')->name('email.compose');
@@ -1,76 +0,0 @@
<?php $__env->startSection('title', $data['title'] ?? 'Report'); ?>
<?php $__env->startSection('page_title', $data['title'] ?? 'Risultato Report'); ?>
<?php $__env->startSection('content'); ?>
<div class="card">
<div class="card-header">
<h3 class="card-title"><i class="fas fa-chart-bar mr-2"></i><?php echo e($data['title'] ?? 'Report'); ?></h3>
<div class="card-tools">
<a href="<?php echo e(route('report.index')); ?>" class="btn btn-sm btn-secondary mr-2">
<i class="fas fa-arrow-left mr-1"></i> Torna ai Report
</a>
<?php
$printParams = isset($report) ? ['custom_id' => $report->id] : ['report' => $reportType ?? ''];
$exportParams = isset($report) ? ['custom_id' => $report->id] : ['report' => $reportType ?? ''];
?>
<a href="<?php echo e(route('report.print-preview', $printParams)); ?>" class="btn btn-sm btn-info mr-2" target="_blank">
<i class="fas fa-print mr-1"></i> Stampa Report
</a>
<a href="<?php echo e(route('report.export', $exportParams)); ?>" class="btn btn-sm btn-success">
<i class="fas fa-file-csv mr-1"></i> Esporta CSV
</a>
</div>
</div>
<div class="card-body">
<?php if(!empty($data['summary'])): ?>
<div class="alert alert-info">
<i class="fas fa-info-circle mr-2"></i>
<strong><?php echo e($data['summary']); ?></strong>
</div>
<?php endif; ?>
<?php if(!empty($data['headers']) && !empty($data['rows'])): ?>
<div class="table-responsive">
<table class="table table-bordered table-striped table-hover">
<thead class="thead-light">
<tr>
<?php $__currentLoopData = $data['headers']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $header): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<th><?php echo e($header); ?></th>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tr>
</thead>
<tbody>
<?php $__currentLoopData = $data['rows']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<?php $__currentLoopData = $row; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $cell): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<td><?php echo e(is_array($cell) ? json_encode($cell) : $cell); ?></td>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</table>
</div>
<?php else: ?>
<div class="text-center text-muted py-5">
<i class="fas fa-inbox fa-3x mb-3"></i>
<p>Nessun dato disponibile per questo report.</p>
</div>
<?php endif; ?>
</div>
<div class="card-footer">
<div class="row">
<div class="col-md-6">
<a href="<?php echo e(route('report.index')); ?>" class="btn btn-secondary">
<i class="fas fa-arrow-left mr-1"></i> Torna ai Report
</a>
</div>
<div class="col-md-6 text-right">
<small class="text-muted">Generato il <?php echo e(now()->format('d/m/Y H:i:s')); ?></small>
</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/report/result.blade.php ENDPATH**/ ?>
@@ -1,51 +0,0 @@
<?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**/ ?>
@@ -1,12 +0,0 @@
<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**/ ?>

Before

Width:  |  Height:  |  Size: 1.0 KiB

@@ -1,15 +0,0 @@
<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**/ ?>

Before

Width:  |  Height:  |  Size: 3.9 KiB

@@ -1,37 +0,0 @@
<?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**/ ?>
@@ -1,720 +0,0 @@
<?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">&times;</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**/ ?>
@@ -1,374 +0,0 @@
<?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**/ ?>
@@ -1,4 +0,0 @@
<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**/ ?>

Before

Width:  |  Height:  |  Size: 418 B

@@ -1,54 +0,0 @@
<!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**/ ?>
@@ -1,256 +0,0 @@
<?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(isset($senderAccounts) && $senderAccounts->count() > 0): ?>
<div class="form-group">
<label for="mittente_id">Mittente</label>
<select name="mittente_id" id="mittente_id" class="form-control">
<option value="">Sistema predefinito</option>
<?php $__currentLoopData = $senderAccounts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $sender): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($sender->id); ?>"><?php echo e($sender->email_name ?: $sender->email_address); ?> &lt;<?php echo e($sender->email_address); ?>&gt;</option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
<small class="text-muted">Seleziona un mittente per l'invio. Usa "Sistema predefinito" per inviare con l'account email principale.</small>
</div>
<?php endif; ?>
<?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>&times;</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**/ ?>
@@ -1,65 +0,0 @@
<?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**/ ?>
@@ -1,6 +0,0 @@
<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**/ ?>

Before

Width:  |  Height:  |  Size: 471 B

@@ -1,11 +0,0 @@
<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**/ ?>

Before

Width:  |  Height:  |  Size: 2.1 KiB

@@ -1,418 +0,0 @@
<?php $__env->startSection('title', 'Report'); ?>
<?php $__env->startSection('page_title', 'Report e Statistiche'); ?>
<?php $__env->startSection('styles'); ?>
<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />
<link href="https://cdn.jsdelivr.net/npm/select2-bootstrap4-theme@1.0.0/dist/select2-bootstrap4.min.css" rel="stylesheet" />
<style>
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice {
font-size: 0.8rem;
}
.card-indigo {
border-top: 3px solid #6610f2;
}
.card-indigo .card-title {
color: #6610f2;
}
.accordion .card-header .btn-link {
text-decoration: none;
font-weight: 600;
color: #495057;
}
.accordion .card-header .btn-link:hover {
color: #007bff;
}
.accordion .card-header .btn-link i {
transition: transform 0.2s ease;
width: 20px;
}
.accordion .card-header .btn-link[aria-expanded="true"] i.fa-chevron-right {
transform: rotate(90deg);
}
</style>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<?php if(session('success')): ?>
<div class="alert alert-success alert-dismissible">
<button type="button" class="close" data-dismiss="alert">&times;</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">&times;</button>
<?php echo e(session('error')); ?>
</div>
<?php endif; ?>
<div class="accordion" id="reportAccordion">
<div class="card">
<div class="card-header" id="headingOne">
<h2 class="mb-0">
<button class="btn btn-link btn-block text-left" type="button" data-toggle="collapse" data-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
<i class="fas fa-chevron-down mr-2 text-primary"></i>
<i class="fas fa-chart-bar mr-2 text-primary"></i> Panoramica Database
</button>
</h2>
</div>
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#reportAccordion">
<div class="card-body">
<div class="row">
<div class="col-md-2 col-4 text-center">
<div class="info-box">
<span class="info-box-icon bg-info"><i class="fas fa-users"></i></span>
<div class="info-box-content">
<span class="info-box-text">Individui</span>
<span class="info-box-number"><?php echo e(number_format($stats['individui'])); ?></span>
</div>
</div>
</div>
<div class="col-md-2 col-4 text-center">
<div class="info-box">
<span class="info-box-icon bg-warning"><i class="fas fa-folder"></i></span>
<div class="info-box-content">
<span class="info-box-text">Gruppi</span>
<span class="info-box-number"><?php echo e(number_format($stats['gruppi'])); ?></span>
</div>
</div>
</div>
<div class="col-md-2 col-4 text-center">
<div class="info-box">
<span class="info-box-icon bg-danger"><i class="fas fa-calendar"></i></span>
<div class="info-box-content">
<span class="info-box-text">Eventi</span>
<span class="info-box-number"><?php echo e(number_format($stats['eventi'])); ?></span>
</div>
</div>
</div>
<div class="col-md-2 col-4 text-center">
<div class="info-box">
<span class="info-box-icon bg-secondary"><i class="fas fa-file"></i></span>
<div class="info-box-content">
<span class="info-box-text">Documenti</span>
<span class="info-box-number"><?php echo e(number_format($stats['documenti'])); ?></span>
</div>
</div>
</div>
<div class="col-md-2 col-4 text-center">
<div class="info-box">
<span class="info-box-icon bg-purple"><i class="fas fa-list"></i></span>
<div class="info-box-content">
<span class="info-box-text">Mailing List</span>
<span class="info-box-number"><?php echo e(number_format($stats['mailing_liste'])); ?></span>
</div>
</div>
</div>
<div class="col-md-2 col-4 text-center">
<div class="info-box">
<span class="info-box-icon bg-teal"><i class="fas fa-address-book"></i></span>
<div class="info-box-content">
<span class="info-box-text">Contatti</span>
<span class="info-box-number"><?php echo e(number_format($stats['contatti'])); ?></span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-header" id="headingTwo">
<h2 class="mb-0">
<button class="btn btn-link btn-block text-left collapsed" type="button" data-toggle="collapse" data-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
<i class="fas fa-chevron-right mr-2 text-warning"></i>
<i class="fas fa-chart-pie mr-2 text-warning"></i> Report Predefiniti
<span class="badge badge-warning badge-pill ml-2"><?php echo e(count($prebuiltReports)); ?></span>
</button>
</h2>
</div>
<div id="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-parent="#reportAccordion">
<div class="card-body">
<div class="row">
<?php $__currentLoopData = $prebuiltReports; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $report): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<div class="col-md-4 col-lg-3 mb-3">
<?php
$cardColor = $report['colore'] === 'indigo' ? 'card-indigo' : 'card-' . $report['colore'];
$btnColor = $report['colore'] === 'indigo' ? 'primary' : $report['colore'];
?>
<div class="card <?php echo e($cardColor); ?> card-outline h-100">
<div class="card-body text-center d-flex flex-column">
<i class="fas <?php echo e($report['icona']); ?> fa-3x text-<?php echo e($btnColor); ?> mb-3"></i>
<h5><?php echo e($report['nome']); ?></h5>
<p class="text-muted small mb-3 flex-grow-1"><?php echo e($report['descrizione']); ?></p>
<?php if($report['has_tipologia_filter'] ?? false): ?>
<form action="<?php echo e(route('report.run')); ?>" method="GET" class="mb-2">
<div class="form-group mb-2">
<select name="tipologia_documento" class="form-control form-control-sm select2-tipologia" style="width: 100%;">
<option value="">Tutte le tipologie</option>
<?php $__currentLoopData = $tipologieDocumento; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tipologia): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($tipologia); ?>"><?php echo e(ucfirst($tipologia)); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
</div>
<input type="hidden" name="report" value="<?php echo e($report['id']); ?>">
<div class="btn-group btn-group-sm w-100">
<button type="submit" class="btn btn-sm btn-<?php echo e($btnColor); ?>">
<i class="fas fa-play mr-1"></i> Genera
</button>
<a href="<?php echo e(route('report.export', ['report' => $report['id']])); ?>" class="btn btn-sm btn-outline-<?php echo e($btnColor); ?>">
<i class="fas fa-download mr-1"></i> CSV
</a>
</div>
</form>
<?php else: ?>
<div class="btn-group btn-group-sm w-100">
<a href="<?php echo e(route('report.run', ['report' => $report['id']])); ?>" class="btn btn-sm btn-<?php echo e($btnColor); ?>">
<i class="fas fa-play mr-1"></i> Genera
</a>
<a href="<?php echo e(route('report.export', ['report' => $report['id']])); ?>" class="btn btn-sm btn-outline-<?php echo e($btnColor); ?>">
<i class="fas fa-download mr-1"></i> CSV
</a>
</div>
<?php endif; ?>
</div>
</div>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-header" id="headingThree">
<h2 class="mb-0">
<button class="btn btn-link btn-block text-left collapsed" type="button" data-toggle="collapse" data-target="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
<i class="fas fa-chevron-right mr-2 text-info"></i>
<i class="fas fa-bookmark mr-2 text-info"></i> Report Personalizzati
<span class="badge badge-info badge-pill ml-2"><?php echo e($customReports->count()); ?></span>
</button>
</h2>
</div>
<div id="collapseThree" class="collapse" aria-labelledby="headingThree" data-parent="#reportAccordion">
<div class="card-body">
<div class="row">
<div class="col-md-8">
<?php if($customReports->count() > 0): ?>
<table class="table table-striped mb-0">
<thead>
<tr>
<th>Nome</th>
<th>Tipo</th>
<th>Creato il</th>
<th style="width: 140px;">Azioni</th>
</tr>
</thead>
<tbody>
<?php $__currentLoopData = $customReports; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $report): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td>
<i class="fas fa-chart-line text-primary mr-1"></i>
<?php echo e($report->nome); ?>
</td>
<td><span class="badge badge-info"><?php echo e(ucfirst($report->tipo_report)); ?></span></td>
<td><?php echo e($report->created_at->format('d/m/Y H:i')); ?></td>
<td>
<a href="<?php echo e(route('report.run', ['custom_id' => $report->id])); ?>" class="btn btn-xs btn-success" title="Esegui">
<i class="fas fa-play"></i>
</a>
<a href="<?php echo e(route('report.export', ['custom_id' => $report->id])); ?>" class="btn btn-xs btn-info" title="Esporta CSV">
<i class="fas fa-file-csv"></i>
</a>
<form action="<?php echo e(route('report.destroy-custom', $report->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 report?')" 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-chart-line fa-3x mb-3"></i>
<p>Nessun report personalizzato creato.</p>
</div>
<?php endif; ?>
</div>
<div class="col-md-4">
<div class="card">
<div class="card-header bg-primary">
<h3 class="card-title text-white"><i class="fas fa-plus mr-2"></i>Crea Report Personalizzato</h3>
</div>
<div class="card-body">
<form action="<?php echo e(route('report.store-custom')); ?>" method="POST">
<?php echo csrf_field(); ?>
<div class="form-group">
<label>Nome Report *</label>
<input type="text" name="nome" class="form-control" required placeholder="Es: Individui attivi">
</div>
<div class="form-group">
<label>Descrizione</label>
<textarea name="descrizione" class="form-control" rows="2" placeholder="Descrizione opzionale..."></textarea>
</div>
<div class="form-group">
<label>Tipo Dato *</label>
<select name="tipo_report" id="tipo_report" class="form-control" required>
<option value="">Seleziona...</option>
<?php $__currentLoopData = $columnOptions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $type => $columns): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($type); ?>"><?php echo e(ucfirst($type)); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
</div>
<div class="form-group">
<label>Colonne *</label>
<select name="columns[]" id="columns_select" class="form-control select2-multi" multiple style="width: 100%;">
</select>
<small class="text-muted">Seleziona le colonne da includere nel report</small>
</div>
<div class="form-group">
<label>Ordina per</label>
<select name="sort_by" id="sort_by" class="form-control">
<option value="">Nessun ordinamento</option>
</select>
</div>
<div class="form-group">
<label>Direzione ordinamento</label>
<select name="sort_direction" class="form-control">
<option value="asc">Ascendente (A-Z)</option>
<option value="desc" selected>Discendente (Z-A)</option>
</select>
</div>
<div class="form-group">
<label>Limite risultati</label>
<input type="number" name="limit" class="form-control" placeholder="Es: 100" min="1">
</div>
<button type="submit" class="btn btn-primary btn-block">
<i class="fas fa-save mr-1"></i> Salva Report
</button>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('scripts'); ?>
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
const columnOptions = <?php echo json_encode($columnOptions, 15, 512) ?>;
let columnsSelectInitialized = false;
function initTipologiaSelect2(container) {
$(container).find('.select2-tipologia').select2({
theme: 'bootstrap4',
placeholder: 'Filtra per tipologia...',
allowClear: true,
width: '100%',
});
}
function destroyTipologiaSelect2(container) {
$(container).find('.select2-tipologia').select2('destroy');
}
function initColumnsSelect2() {
if (columnsSelectInitialized) return;
$('#columns_select').select2({
theme: 'bootstrap4',
placeholder: 'Seleziona le colonne...',
allowClear: true,
width: '100%',
});
columnsSelectInitialized = true;
}
function destroyColumnsSelect2() {
if (!columnsSelectInitialized) return;
$('#columns_select').select2('destroy');
columnsSelectInitialized = false;
}
function getSortOptions(tipoReport) {
const cols = columnOptions[tipoReport] || {};
const options = [];
for (const [key, col] of Object.entries(cols)) {
if (col.type !== 'relation') {
options.push({ value: key, label: col.label });
}
}
return options;
}
$('#collapseTwo').on('shown.bs.collapse', function () {
initTipologiaSelect2(this);
}).on('hidden.bs.collapse', function () {
destroyTipologiaSelect2(this);
});
$('#collapseThree').on('shown.bs.collapse', function () {
initColumnsSelect2();
}).on('hidden.bs.collapse', function () {
destroyColumnsSelect2();
});
if ($('#collapseTwo').hasClass('show')) {
initTipologiaSelect2(document);
}
if ($('#collapseThree').hasClass('show')) {
initColumnsSelect2();
}
$('#tipo_report').on('change', function() {
const tipo = this.value;
const $select = $('#columns_select');
if (columnsSelectInitialized) {
$select.empty().trigger('change');
}
$select.empty();
if (tipo && columnOptions[tipo]) {
const cols = columnOptions[tipo];
const fragment = document.createDocumentFragment();
for (const [key, col] of Object.entries(cols)) {
fragment.appendChild(new Option(col.label, key, false, false));
}
$select.append(fragment);
}
if (columnsSelectInitialized) {
$select.trigger('change');
}
const $sortBy = $('#sort_by');
$sortBy.empty();
$sortBy.append(new Option('Nessun ordinamento', '', false, false));
const sortOptions = getSortOptions(tipo);
sortOptions.forEach(function(opt) {
$sortBy.append(new Option(opt.label, opt.value, false, false));
});
});
if ($('#tipo_report').val()) {
$('#tipo_report').trigger('change');
}
});
</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/report/index.blade.php ENDPATH**/ ?>
@@ -1,75 +0,0 @@
<?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**/ ?>
@@ -1,80 +0,0 @@
<?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**/ ?>
@@ -1,122 +0,0 @@
<?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**/ ?>
@@ -1,112 +0,0 @@
<?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="/admin/utenti/<?php echo e($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(old('status', $user->status) === 'active' ? 'selected' : ''); ?>>Attivo</option>
<option value="suspended" <?php echo e(old('status', $user->status) === 'suspended' ? 'selected' : ''); ?>>Sospeso</option>
<option value="pending" <?php echo e(old('status', $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(old('role_preset_id', $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>
<input type="hidden" name="is_admin" value="0">
<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(old('is_admin', $user->isSuperAdmin() ? '1' : '0') === '1' ? '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 = \App\Models\User::MODULES; $__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**/ ?>
@@ -1,69 +0,0 @@
<?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**/ ?>
@@ -1,91 +0,0 @@
<?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">&lsaquo;</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'); ?>">&lsaquo;</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'); ?>">&rsaquo;</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">&rsaquo;</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**/ ?>
@@ -1,4 +0,0 @@
<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**/ ?>
@@ -1,351 +0,0 @@
<?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**/ ?>
@@ -1,28 +0,0 @@
<?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**/ ?>
@@ -1,88 +0,0 @@
<?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**/ ?>
@@ -1,400 +0,0 @@
<!DOCTYPE html>
<html lang="it">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Stampa Report - <?php echo e($data['title'] ?? 'Report'); ?></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;
background: #f5f5f5;
}
.toolbar {
background: #2c3e50;
color: #fff;
padding: 15px 20px;
display: flex;
align-items: center;
justify-content: space-between;
position: sticky;
top: 0;
z-index: 1000;
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.toolbar-left {
display: flex;
align-items: center;
gap: 15px;
}
.toolbar-title {
font-size: 18px;
font-weight: bold;
}
.toolbar-group {
display: flex;
align-items: center;
gap: 8px;
}
.toolbar label {
font-size: 13px;
opacity: 0.9;
}
.toolbar select {
padding: 6px 12px;
border: 1px solid #4a5568;
border-radius: 4px;
background: #4a5568;
color: #fff;
font-size: 13px;
cursor: pointer;
}
.toolbar select:focus {
outline: none;
border-color: #63b3ed;
}
.btn {
padding: 8px 16px;
border: none;
border-radius: 4px;
font-size: 13px;
font-weight: 600;
cursor: pointer;
display: inline-flex;
align-items: center;
gap: 6px;
transition: all 0.2s;
}
.btn-print {
background: #28a745;
color: #fff;
}
.btn-print:hover {
background: #218838;
}
.btn-close {
background: #dc3545;
color: #fff;
}
.btn-close:hover {
background: #c82333;
}
.btn-secondary {
background: #6c757d;
color: #fff;
}
.btn-secondary:hover {
background: #5a6268;
}
.preview-container {
max-width: 210mm;
margin: 20px auto;
background: #fff;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
padding: 20px;
}
.preview-container.portrait {
width: 210mm;
min-height: 297mm;
}
.preview-container.landscape {
width: 297mm;
min-height: 210mm;
}
.report-header {
text-align: center;
margin-bottom: 20px;
padding-bottom: 15px;
border-bottom: 2px solid #2c3e50;
}
.report-header h1 {
font-size: 24px;
color: #2c3e50;
margin-bottom: 5px;
}
.report-header .subtitle {
font-size: 14px;
color: #7f8c8d;
}
.report-summary {
background: #e8f4f8;
padding: 12px 15px;
margin-bottom: 20px;
border-left: 4px solid #17a2b8;
font-size: 13px;
}
.report-table {
width: 100%;
border-collapse: collapse;
margin-bottom: 20px;
font-size: 11px;
}
.report-table th,
.report-table td {
border: 1px solid #ddd;
padding: 8px;
text-align: left;
}
.report-table th {
background: #f8f9fa;
font-weight: bold;
color: #2c3e50;
}
.report-table tr:nth-child(even) {
background: #fafafa;
}
.report-table tr:hover {
background: #f0f0f0;
}
.no-data {
text-align: center;
color: #999;
font-style: italic;
padding: 40px 20px;
}
.no-data i {
font-size: 48px;
margin-bottom: 10px;
display: block;
}
.report-footer {
margin-top: 30px;
padding-top: 15px;
border-top: 1px solid #ddd;
text-align: center;
font-size: 10px;
color: #999;
}
.row-count {
font-size: 12px;
color: #666;
margin-top: 10px;
text-align: right;
}
@page {
margin: 15mm;
}
@media print {
@page portrait {
size: portrait;
}
@page landscape {
size: landscape;
}
.toolbar {
display: none !important;
}
body {
background: #fff;
padding: 0;
}
.preview-container {
margin: 0;
box-shadow: none;
padding: 0;
max-width: none;
width: 100%;
}
.preview-container.portrait {
width: auto;
min-height: auto;
}
.preview-container.landscape {
width: auto;
min-height: auto;
}
.report-table {
page-break-inside: auto;
}
.report-table tr {
page-break-inside: avoid;
page-break-after: auto;
}
.report-table thead {
display: table-header-group;
}
.report-table tfoot {
display: table-footer-group;
}
}
</style>
</head>
<body>
<div class="toolbar" id="toolbar">
<div class="toolbar-left">
<span class="toolbar-title">Anteprima di Stampa</span>
<div class="toolbar-group">
<label for="orientation">Orientamento:</label>
<select id="orientation">
<option value="portrait">Verticale (Portrait)</option>
<option value="landscape">Orizzontale (Landscape)</option>
</select>
</div>
<div class="toolbar-group">
<label for="font-size">Dimensione font:</label>
<select id="font-size">
<option value="10">Piccolo (10px)</option>
<option value="11">Normale (11px)</option>
<option value="12" selected>Medio (12px)</option>
<option value="13">Grande (13px)</option>
</select>
</div>
</div>
<div>
<button class="btn btn-secondary" onclick="window.opener ? window.close() : window.location.href='<?php echo e(route('report.index')); ?>'">
Indietro
</button>
<button class="btn btn-print" onclick="printReport()">
Stampa
</button>
</div>
</div>
<div class="preview-container portrait" id="preview-container">
<div class="report-header">
<h1><?php echo e($data['title'] ?? 'Report'); ?></h1>
<div class="subtitle">Generato il <?php echo e(now()->format('d/m/Y H:i')); ?></div>
</div>
<?php if(!empty($data['summary'])): ?>
<div class="report-summary">
<strong><?php echo e($data['summary']); ?></strong>
</div>
<?php endif; ?>
<?php if(!empty($data['headers']) && !empty($data['rows'])): ?>
<table class="report-table" id="report-table">
<thead>
<tr>
<?php $__currentLoopData = $data['headers']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $header): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<th><?php echo e($header); ?></th>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tr>
</thead>
<tbody>
<?php $__currentLoopData = $data['rows']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<?php $__currentLoopData = $row; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $cell): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<td><?php echo e(is_array($cell) ? json_encode($cell) : $cell); ?></td>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</table>
<div class="row-count">Totale righe: <?php echo e(count($data['rows'])); ?></div>
<?php else: ?>
<div class="no-data">
Nessun dato disponibile per questo report.
</div>
<?php endif; ?>
<div class="report-footer">
<p>Report generato automaticamente - Glastree</p>
</div>
</div>
<script>
const orientationSelect = document.getElementById('orientation');
const fontSizeSelect = document.getElementById('font-size');
const previewContainer = document.getElementById('preview-container');
const reportTable = document.getElementById('report-table');
function printReport() {
window.print();
}
orientationSelect.addEventListener('change', function() {
previewContainer.classList.remove('portrait', 'landscape');
previewContainer.classList.add(this.value);
if (this.value === 'landscape') {
document.body.classList.add('landscape-mode');
} else {
document.body.classList.remove('landscape-mode');
}
});
fontSizeSelect.addEventListener('change', function() {
const size = this.value;
document.body.style.fontSize = size + 'px';
if (reportTable) {
reportTable.style.fontSize = (parseInt(size) - 1) + 'px';
}
});
document.addEventListener('DOMContentLoaded', function() {
const savedOrientation = localStorage.getItem('report-print-orientation');
const savedFontSize = localStorage.getItem('report-print-font-size');
if (savedOrientation) {
orientationSelect.value = savedOrientation;
orientationSelect.dispatchEvent(new Event('change'));
}
if (savedFontSize) {
fontSizeSelect.value = savedFontSize;
fontSizeSelect.dispatchEvent(new Event('change'));
}
});
orientationSelect.addEventListener('change', function() {
localStorage.setItem('report-print-orientation', this.value);
});
fontSizeSelect.addEventListener('change', function() {
localStorage.setItem('report-print-font-size', this.value);
});
</script>
</body>
</html>
<?php /**PATH /var/www/html/glastree/resources/views/report/print-preview.blade.php ENDPATH**/ ?>
@@ -1,104 +0,0 @@
<?php $__env->startSection('title', 'Il Mio Profilo'); ?>
<?php $__env->startSection('page_title', 'Il Mio Profilo'); ?>
<?php $__env->startSection('breadcrumbs'); ?>
<li class="breadcrumb-item"><a href="<?php echo e(route('dashboard')); ?>">Dashboard</a></li>
<li class="breadcrumb-item active">Profilo</li>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<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>Informazioni Account</h3>
</div>
<div class="card-body">
<dl class="row mb-0">
<dt class="col-sm-4">Nome</dt>
<dd class="col-sm-8"><?php echo e(e(Auth::user()->name)); ?></dd>
<dt class="col-sm-4">Email</dt>
<dd class="col-sm-8"><?php echo e(e(Auth::user()->email)); ?></dd>
<dt class="col-sm-4">Membro dal</dt>
<dd class="col-sm-8"><?php echo e(Auth::user()->created_at->format('d/m/Y')); ?></dd>
</dl>
</div>
</div>
</div>
<div class="col-md-6">
<div class="card card-warning">
<div class="card-header">
<h3 class="card-title"><i class="fas fa-key mr-2"></i>Cambia Password</h3>
</div>
<form method="POST" action="<?php echo e(route('profile.password')); ?>">
<?php echo csrf_field(); ?>
<?php echo method_field('PUT'); ?>
<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="form-group">
<label for="current_password">Password attuale *</label>
<input type="password" name="current_password" id="current_password" class="form-control <?php $__errorArgs = ['current_password'];
$__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); ?>" required>
<?php $__errorArgs = ['current_password'];
$__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 for="password">Nuova password *</label>
<input type="password" name="password" id="password" class="form-control <?php $__errorArgs = ['password'];
$__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); ?>" required minlength="8">
<small class="text-muted">Minimo 8 caratteri</small>
<?php $__errorArgs = ['password'];
$__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 for="password_confirmation">Conferma nuova password *</label>
<input type="password" name="password_confirmation" id="password_confirmation" class="form-control" required minlength="8">
</div>
</div>
<div class="card-footer">
<button type="submit" class="btn btn-warning">
<i class="fas fa-save mr-1"></i> Aggiorna Password
</button>
</div>
</form>
</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/auth/profile.blade.php ENDPATH**/ ?>
@@ -1,178 +0,0 @@
<?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(); ?>
<?php if(isset($senderAccounts) && $senderAccounts->count() > 0): ?>
<div class="form-group">
<label for="mittente_id">Mittente</label>
<select name="mittente_id" id="mittente_id" class="form-control">
<option value="">Sistema predefinito</option>
<?php $__currentLoopData = $senderAccounts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $sender): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($sender->id); ?>"><?php echo e($sender->email_name ?: $sender->email_address); ?> &lt;<?php echo e($sender->email_address); ?>&gt;</option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
<small class="text-muted">Seleziona un mittente per l'invio massivo.</small>
</div>
<?php endif; ?>
<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>&times;</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**/ ?>
@@ -1,79 +0,0 @@
<?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**/ ?>
@@ -1,114 +0,0 @@
<?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**/ ?>
@@ -1,6 +0,0 @@
<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**/ ?>

Before

Width:  |  Height:  |  Size: 975 B

@@ -1,5 +0,0 @@
<?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**/ ?>
@@ -1,149 +0,0 @@
<?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**/ ?>
@@ -1,78 +0,0 @@
# <?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**/ ?>
@@ -1,61 +0,0 @@
<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**/ ?>
@@ -1,4 +0,0 @@
<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**/ ?>

Before

Width:  |  Height:  |  Size: 419 B

@@ -1,98 +0,0 @@
<?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**/ ?>
@@ -1,5 +0,0 @@
<?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**/ ?>
@@ -1,170 +0,0 @@
<?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**/ ?>
@@ -1,398 +0,0 @@
<?php $__env->startSection('title', 'Modifica Evento'); ?>
<?php $__env->startSection('page_title', 'Modifica Evento'); ?>
<?php $__env->startSection('content'); ?>
<form action="/eventi/<?php echo e($evento->id); ?>" method="POST" id="mainForm">
<?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-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" value="<?php echo e(old('nome_evento', $evento->nome_evento)); ?>" required>
</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', $evento->descrizione_evento)); ?>">
</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', $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>
<textarea name="descrizione" class="form-control" rows="3"><?php echo e(old('descrizione', $evento->descrizione)); ?></textarea>
</div>
<div class="form-group">
<label>Note</label>
<textarea name="note" class="form-control" rows="2"><?php echo e(old('note', $evento->note)); ?></textarea>
</div>
<div class="form-group">
<label>
<input type="checkbox" name="is_incontro_gruppo" value="1" <?php echo e($evento->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', $evento->tipo_recorrenza) === 'singolo' || old('tipo_recorrenza', $evento->tipo_recorrenza) === null ? 'selected' : ''); ?>>Singolo</option>
<option value="settimanale" <?php echo e(old('tipo_recorrenza', $evento->tipo_recorrenza) === 'settimanale' ? 'selected' : ''); ?>>Settimanale</option>
<option value="mensile" <?php echo e(old('tipo_recorrenza', $evento->tipo_recorrenza) === 'mensile' ? 'selected' : ''); ?>>Mensile</option>
<option value="annuale" <?php echo e(old('tipo_recorrenza', $evento->tipo_recorrenza) === 'annuale' ? 'selected' : ''); ?>>Annuale</option>
<option value="altro" <?php echo e(old('tipo_recorrenza', $evento->tipo_recorrenza) === 'altro' ? 'selected' : ''); ?>>Altro</option>
</select>
</div>
<div id="data_specifica_field" style="<?php echo e(in_array($evento->tipo_recorrenza, [null, 'singolo']) ? '' : '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', $evento->data_specifica?->format('Y-m-d'))); ?>">
</div>
</div>
<div id="settimanale_field" style="<?php echo e($evento->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($evento->giorno_settimana == 0 ? 'selected' : ''); ?>>Domenica</option>
<option value="1" <?php echo e($evento->giorno_settimana == 1 ? 'selected' : ''); ?>>Lunedì</option>
<option value="2" <?php echo e($evento->giorno_settimana == 2 ? 'selected' : ''); ?>>Martedì</option>
<option value="3" <?php echo e($evento->giorno_settimana == 3 ? 'selected' : ''); ?>>Mercoledì</option>
<option value="4" <?php echo e($evento->giorno_settimana == 4 ? 'selected' : ''); ?>>Giovedì</option>
<option value="5" <?php echo e($evento->giorno_settimana == 5 ? 'selected' : ''); ?>>Venerdì</option>
<option value="6" <?php echo e($evento->giorno_settimana == 6 ? 'selected' : ''); ?>>Sabato</option>
</select>
</div>
</div>
<div id="mensile_field" style="<?php echo e($evento->tipo_recorrenza === 'mensile' ? '' : 'display:none;'); ?>">
<div class="form-group">
<label>Occorrenza nel mese</label>
<?php
$occorrenzaSelezionata = old('occorrenza_mese', $evento->occorrenza_mese);
?>
<select name="occorrenza_mese" class="form-control">
<option value="">Seleziona...</option>
<option value="1,1" <?php echo e($occorrenzaSelezionata === '1,1' ? 'selected' : ''); ?>>1° Lunedì</option>
<option value="1,2" <?php echo e($occorrenzaSelezionata === '1,2' ? 'selected' : ''); ?>>1° Martedì</option>
<option value="1,3" <?php echo e($occorrenzaSelezionata === '1,3' ? 'selected' : ''); ?>>1° Mercoledì</option>
<option value="1,4" <?php echo e($occorrenzaSelezionata === '1,4' ? 'selected' : ''); ?>>1° Giovedì</option>
<option value="1,5" <?php echo e($occorrenzaSelezionata === '1,5' ? 'selected' : ''); ?>>1° Venerdì</option>
<option value="1,6" <?php echo e($occorrenzaSelezionata === '1,6' ? 'selected' : ''); ?>>1° Sabato</option>
<option value="1,0" <?php echo e($occorrenzaSelezionata === '1,0' ? 'selected' : ''); ?>>1° Domenica</option>
<option value="2,1" <?php echo e($occorrenzaSelezionata === '2,1' ? 'selected' : ''); ?>>2° Lunedì</option>
<option value="2,2" <?php echo e($occorrenzaSelezionata === '2,2' ? 'selected' : ''); ?>>2° Martedì</option>
<option value="2,3" <?php echo e($occorrenzaSelezionata === '2,3' ? 'selected' : ''); ?>>2° Mercoledì</option>
<option value="2,4" <?php echo e($occorrenzaSelezionata === '2,4' ? 'selected' : ''); ?>>2° Giovedì</option>
<option value="2,5" <?php echo e($occorrenzaSelezionata === '2,5' ? 'selected' : ''); ?>>2° Venerdì</option>
<option value="2,6" <?php echo e($occorrenzaSelezionata === '2,6' ? 'selected' : ''); ?>>2° Sabato</option>
<option value="2,0" <?php echo e($occorrenzaSelezionata === '2,0' ? 'selected' : ''); ?>>2° Domenica</option>
<option value="3,1" <?php echo e($occorrenzaSelezionata === '3,1' ? 'selected' : ''); ?>>3° Lunedì</option>
<option value="3,2" <?php echo e($occorrenzaSelezionata === '3,2' ? 'selected' : ''); ?>>3° Martedì</option>
<option value="3,3" <?php echo e($occorrenzaSelezionata === '3,3' ? 'selected' : ''); ?>>3° Mercoledì</option>
<option value="3,4" <?php echo e($occorrenzaSelezionata === '3,4' ? 'selected' : ''); ?>>3° Giovedì</option>
<option value="3,5" <?php echo e($occorrenzaSelezionata === '3,5' ? 'selected' : ''); ?>>3° Venerdì</option>
<option value="3,6" <?php echo e($occorrenzaSelezionata === '3,6' ? 'selected' : ''); ?>>3° Sabato</option>
<option value="3,0" <?php echo e($occorrenzaSelezionata === '3,0' ? 'selected' : ''); ?>>3° Domenica</option>
<option value="4,1" <?php echo e($occorrenzaSelezionata === '4,1' ? 'selected' : ''); ?>>4° Lunedì</option>
<option value="4,2" <?php echo e($occorrenzaSelezionata === '4,2' ? 'selected' : ''); ?>>4° Martedì</option>
<option value="4,3" <?php echo e($occorrenzaSelezionata === '4,3' ? 'selected' : ''); ?>>4° Mercoledì</option>
<option value="4,4" <?php echo e($occorrenzaSelezionata === '4,4' ? 'selected' : ''); ?>>4° Giovedì</option>
<option value="4,5" <?php echo e($occorrenzaSelezionata === '4,5' ? 'selected' : ''); ?>>4° Venerdì</option>
<option value="4,6" <?php echo e($occorrenzaSelezionata === '4,6' ? 'selected' : ''); ?>>4° Sabato</option>
<option value="4,0" <?php echo e($occorrenzaSelezionata === '4,0' ? 'selected' : ''); ?>>4° Domenica</option>
</select>
</div>
<div class="form-group">
<label>Mesi (multipli)</label>
<?php
$mesiSelezionati = $evento->mesi_recorrenza ? explode(',', $evento->mesi_recorrenza) : [];
?>
<select name="mesi_recorrenza[]" class="form-control" multiple size="4">
<option value="1" <?php echo e(in_array('1', $mesiSelezionati) ? 'selected' : ''); ?>>Gennaio</option>
<option value="2" <?php echo e(in_array('2', $mesiSelezionati) ? 'selected' : ''); ?>>Febbraio</option>
<option value="3" <?php echo e(in_array('3', $mesiSelezionati) ? 'selected' : ''); ?>>Marzo</option>
<option value="4" <?php echo e(in_array('4', $mesiSelezionati) ? 'selected' : ''); ?>>Aprile</option>
<option value="5" <?php echo e(in_array('5', $mesiSelezionati) ? 'selected' : ''); ?>>Maggio</option>
<option value="6" <?php echo e(in_array('6', $mesiSelezionati) ? 'selected' : ''); ?>>Giugno</option>
<option value="7" <?php echo e(in_array('7', $mesiSelezionati) ? 'selected' : ''); ?>>Luglio</option>
<option value="8" <?php echo e(in_array('8', $mesiSelezionati) ? 'selected' : ''); ?>>Agosto</option>
<option value="9" <?php echo e(in_array('9', $mesiSelezionati) ? 'selected' : ''); ?>>Settembre</option>
<option value="10" <?php echo e(in_array('10', $mesiSelezionati) ? 'selected' : ''); ?>>Ottobre</option>
<option value="11" <?php echo e(in_array('11', $mesiSelezionati) ? 'selected' : ''); ?>>Novembre</option>
<option value="12" <?php echo e(in_array('12', $mesiSelezionati) ? '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($evento->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', $evento->mese_annuale) == '1' ? 'selected' : ''); ?>>Gennaio</option>
<option value="2" <?php echo e(old('mese_annuale', $evento->mese_annuale) == '2' ? 'selected' : ''); ?>>Febbraio</option>
<option value="3" <?php echo e(old('mese_annuale', $evento->mese_annuale) == '3' ? 'selected' : ''); ?>>Marzo</option>
<option value="4" <?php echo e(old('mese_annuale', $evento->mese_annuale) == '4' ? 'selected' : ''); ?>>Aprile</option>
<option value="5" <?php echo e(old('mese_annuale', $evento->mese_annuale) == '5' ? 'selected' : ''); ?>>Maggio</option>
<option value="6" <?php echo e(old('mese_annuale', $evento->mese_annuale) == '6' ? 'selected' : ''); ?>>Giugno</option>
<option value="7" <?php echo e(old('mese_annuale', $evento->mese_annuale) == '7' ? 'selected' : ''); ?>>Luglio</option>
<option value="8" <?php echo e(old('mese_annuale', $evento->mese_annuale) == '8' ? 'selected' : ''); ?>>Agosto</option>
<option value="9" <?php echo e(old('mese_annuale', $evento->mese_annuale) == '9' ? 'selected' : ''); ?>>Settembre</option>
<option value="10" <?php echo e(old('mese_annuale', $evento->mese_annuale) == '10' ? 'selected' : ''); ?>>Ottobre</option>
<option value="11" <?php echo e(old('mese_annuale', $evento->mese_annuale) == '11' ? 'selected' : ''); ?>>Novembre</option>
<option value="12" <?php echo e(old('mese_annuale', $evento->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', $evento->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', $evento->ora_inizio?->format('H:i'))); ?>">
</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', $evento->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', $evento->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', $evento->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($evento->gruppi->contains($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($evento->responsabili->contains($i->id) ? '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="mt-3">
<button type="submit" class="btn btn-success">
<i class="fas fa-save mr-1"></i> Salva Modifiche
</button>
<a href="/eventi/<?php echo e($evento->id); ?>" class="btn btn-secondary">
<i class="fas fa-times mr-1"></i> Annulla
</a>
</div>
</form>
<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="/eventi/<?php echo e($evento->id); ?>/documenti" method="POST" enctype="multipart/form-data" class="mb-0">
<?php echo csrf_field(); ?>
<div class="row">
<div class="col-md-4">
<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="programma">Programma</option>
<option value="locandina">Locandina</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-1">
<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($evento->documenti && $evento->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 = $evento->documenti; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $documento): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td>
<i class="fas fa-file text-secondary mr-1"></i>
<?php echo e($documento->nome_file); ?>
</td>
<td><?php echo e(ucfirst($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); ?>)" title="Anteprima">
<i class="fas fa-eye"></i>
</button>
<?php endif; ?>
<form action="/eventi/<?php echo e($evento->id); ?>/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>
<?php $__env->stopSection(); ?>
<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">&times;</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->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';
}
function showDocumentoForm() {
document.getElementById('documento-add-form').style.display = 'block';
}
function hideDocumentoForm() {
document.getElementById('documento-add-form').style.display = 'none';
}
function previewDocumento(id) {
document.getElementById('previewFrame').src = '/documenti/' + id + '/preview';
document.getElementById('previewDownloadBtn').href = '/documenti/' + id + '/download';
$('#previewModal').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/eventi/edit.blade.php ENDPATH**/ ?>
@@ -1,5 +0,0 @@
<?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**/ ?>
File diff suppressed because one or more lines are too long
@@ -1,131 +0,0 @@
<?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); ?> &lt;<?php echo e($message->from_email); ?>&gt;
<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**/ ?>
@@ -1,44 +0,0 @@
<?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 &gt; 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**/ ?>
@@ -1,47 +0,0 @@
<?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">&lsaquo;</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'); ?>">&lsaquo;</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'); ?>">&rsaquo;</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">&rsaquo;</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**/ ?>
@@ -1,350 +0,0 @@
<?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**/ ?>
@@ -1,438 +0,0 @@
<?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">&times;</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">&times;</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>&times;</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>&times;</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**/ ?>
@@ -1,288 +0,0 @@
<?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**/ ?>
@@ -1,12 +0,0 @@
<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**/ ?>

Before

Width:  |  Height:  |  Size: 788 B

@@ -1,35 +0,0 @@
<!DOCTYPE html>
<html lang="it">
<head>
<meta charset="utf-8">
<style>
body { font-family: 'Segoe UI', Tahoma, sans-serif; line-height: 1.6; color: #333; }
.container { max-width: 600px; margin: 0 auto; padding: 20px; }
.header { background: #28a745; color: white; padding: 20px; text-align: center; border-radius: 5px 5px 0 0; }
.body { padding: 30px; background: #f9f9f9; border: 1px solid #ddd; }
.button { display: inline-block; padding: 12px 30px; background: #28a745; color: white; text-decoration: none; border-radius: 5px; font-weight: bold; }
.footer { margin-top: 20px; font-size: 12px; color: #999; text-align: center; }
</style>
</head>
<body>
<div class="container">
<div class="header">
<h2><?php echo e(e($appName)); ?></h2>
</div>
<div class="body">
<p>Ciao <strong><?php echo e(e($user->name)); ?></strong>,</p>
<p>Hai richiesto il reset della password per il tuo account.</p>
<p style="text-align: center; margin: 30px 0;">
<a href="<?php echo e($resetUrl); ?>" class="button">Reimposta Password</a>
</p>
<p>Se non hai richiesto tu il reset, ignora questa email.</p>
<p>Il link è valido per 60 minuti.</p>
</div>
<div class="footer">
&copy; <?php echo e(date('Y')); ?> <?php echo e(e($appName)); ?>
</div>
</div>
</body>
</html>
<?php /**PATH /var/www/html/glastree/resources/views/auth/emails/reset-password.blade.php ENDPATH**/ ?>
@@ -1,85 +0,0 @@
<?php
use App\Models\AppSetting;
$appName = AppSetting::getAppName() ?? 'Glastree';
?>
<!DOCTYPE html>
<html lang="it">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Reimposta Password - <?php echo e(e($appName)); ?></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">
</head>
<body class="hold-transition login-page">
<div class="login-box">
<div class="login-logo">
<a href="/"><b><?php echo e(e($appName)); ?></b></a>
</div>
<div class="card">
<div class="card-body login-card-body">
<p class="login-box-msg">Scegli una nuova password</p>
<?php $__errorArgs = ['email'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
<div class="alert alert-danger"><?php echo e($message); ?></div>
<?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
<form action="<?php echo e(route('password.update')); ?>" method="POST">
<?php echo csrf_field(); ?>
<input type="hidden" name="token" value="<?php echo e($token); ?>">
<div class="input-group mb-3">
<input type="email" name="email" class="form-control" placeholder="Email" required value="<?php echo e(old('email')); ?>">
<div class="input-group-append">
<div class="input-group-text"><span class="fas fa-envelope"></span></div>
</div>
</div>
<div class="input-group mb-3">
<input type="password" name="password" class="form-control <?php $__errorArgs = ['password'];
$__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); ?>" placeholder="Nuova password" required minlength="8">
<div class="input-group-append">
<div class="input-group-text"><span class="fas fa-lock"></span></div>
</div>
<?php $__errorArgs = ['password'];
$__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="input-group mb-3">
<input type="password" name="password_confirmation" class="form-control" placeholder="Conferma password" required minlength="8">
<div class="input-group-append">
<div class="input-group-text"><span class="fas fa-lock"></span></div>
</div>
</div>
<div class="row">
<div class="col-12">
<button type="submit" class="btn btn-success btn-block">Reimposta Password</button>
</div>
</div>
</form>
</div>
</div>
</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>
</body>
</html>
<?php /**PATH /var/www/html/glastree/resources/views/auth/reset-password.blade.php ENDPATH**/ ?>
@@ -1,117 +0,0 @@
<!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**/ ?>
@@ -1,57 +0,0 @@
<?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**/ ?>
@@ -1,215 +0,0 @@
<?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**/ ?>
@@ -1,78 +0,0 @@
<?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**/ ?>
@@ -1,63 +0,0 @@
<?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**/ ?>
@@ -1,362 +0,0 @@
<?php $__env->startSection('title', $evento->nome_evento); ?>
<?php $__env->startSection('page_title', 'Dettaglio Evento'); ?>
<?php $__env->startSection('breadcrumbs'); ?>
<li class="breadcrumb-item"><a href="/eventi">Eventi</a></li>
<li class="breadcrumb-item active"><?php echo e($evento->nome_evento); ?></li>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<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>
<?php echo e($evento->nome_evento); ?>
</h3>
</div>
<div class="card-body">
<?php if($evento->descrizione_evento): ?>
<p class="lead"><?php echo e($evento->descrizione_evento); ?></p>
<?php endif; ?>
<?php if($evento->descrizione): ?>
<div class="mt-3">
<h5>Descrizione Completa</h5>
<p><?php echo nl2br(e($evento->descrizione)); ?></p>
</div>
<?php endif; ?>
<?php if($evento->is_incontro_gruppo): ?>
<div class="alert alert-success mt-3">
<i class="fas fa-info-circle mr-1"></i>
<strong>Evento di incontro gruppo</strong>
</div>
<?php endif; ?>
</div>
</div>
<div class="card mt-3">
<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">
<table class="table table-sm table-borderless mb-0">
<tr>
<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>
<?php else: ?>
<span class="badge badge-secondary">Singolo</span>
<?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>
<td><?php echo e($evento->giorno_settimana_label); ?></td>
</tr>
<?php elseif($evento->tipo_recorrenza === 'mensile'): ?>
<tr>
<td><strong>Occorrenza:</strong></td>
<td><?php echo e($evento->occorrenza_mensile_label); ?></td>
</tr>
<tr>
<td><strong>Mesi:</strong></td>
<td><?php echo e($evento->mesi_recorrenza_label); ?></td>
</tr>
<?php elseif($evento->tipo_recorrenza === 'annuale'): ?>
<tr>
<td><strong>Mese:</strong></td>
<td><?php echo e($evento->mese_annuale_label); ?></td>
</tr>
<?php elseif($evento->tipo_recorrenza === 'altro'): ?>
<tr>
<td><strong>Giorno:</strong></td>
<td><?php echo e($evento->giorno_settimana_label); ?></td>
</tr>
<?php else: ?>
<tr>
<td><strong>Data:</strong></td>
<td><?php echo e($evento->data_specifica?->format('d/m/Y') ?: '-'); ?></td>
</tr>
<?php endif; ?>
<?php if($evento->ora_inizio): ?>
<tr>
<td><strong>Ora Inizio:</strong></td>
<td><?php echo e($evento->ora_inizio->format('H:i')); ?></td>
</tr>
<?php endif; ?>
<?php if($evento->durata_minuti): ?>
<tr>
<td><strong>Durata:</strong></td>
<td><?php echo e($evento->durata_minuti); ?> minuti</td>
</tr>
<?php endif; ?>
</table>
</div>
</div>
<?php if($evento->luogo_indirizzo || $evento->luogo_url_maps): ?>
<div class="card mt-3">
<div class="card-header"><h3 class="card-title"><i class="fas fa-map-marker-alt mr-2"></i>Luogo</h3></div>
<div class="card-body">
<?php if($evento->luogo_indirizzo): ?>
<p class="mb-2"><i class="fas fa-location-dot text-danger mr-1"></i> <strong><?php echo e($evento->luogo_indirizzo); ?></strong></p>
<?php endif; ?>
<?php if($evento->luogo_url_maps): ?>
<div class="mb-2">
<a href="<?php echo e($evento->luogo_url_maps); ?>" target="_blank" class="btn btn-sm btn-outline-primary">
<i class="fas fa-external-link-alt mr-1"></i> Apri in Google Maps
</a>
</div>
<iframe
src="https://www.google.com/maps?q=<?php echo e(urlencode($evento->luogo_indirizzo ?: $evento->luogo_url_maps)); ?>&output=embed"
width="100%" height="200" style="border:0; border-radius: 8px;" allowfullscreen loading="lazy">
</iframe>
<?php endif; ?>
</div>
</div>
<?php endif; ?>
</div>
<div class="col-md-4">
<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 p-0">
<?php if($evento->gruppi->count() > 0): ?>
<table class="table table-sm mb-0">
<tbody>
<?php $__currentLoopData = $evento->gruppi; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $gruppo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td>
<a href="/gruppi/<?php echo e($gruppo->id); ?>">
<i class="fas fa-folder text-warning mr-1"></i>
<?php echo e($gruppo->nome); ?>
</a>
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</table>
<?php else: ?>
<div class="text-center text-muted py-3 mb-0">
<span>Nessun gruppo associato</span>
</div>
<?php endif; ?>
</div>
</div>
<div class="card mt-3">
<div class="card-header"><h3 class="card-title"><i class="fas fa-user-tie mr-2"></i>Responsabili</h3></div>
<div class="card-body p-0">
<?php if($evento->responsabili->count() > 0): ?>
<table class="table table-sm mb-0">
<thead>
<tr>
<th>Nome</th>
<th>Contatto</th>
</tr>
</thead>
<tbody>
<?php $__currentLoopData = $evento->responsabili; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $resp): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td>
<a href="/individui/<?php echo e($resp->id); ?>">
<i class="fas fa-user text-info mr-1"></i>
<?php echo e($resp->cognome); ?> <?php echo e($resp->nome); ?>
</a>
</td>
<td>
<?php if($resp->telefono_primario): ?>
<small class="text-success"><?php echo e($resp->telefono_primario); ?></small>
<?php else: ?>
<span class="text-muted">-</span>
<?php endif; ?>
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</table>
<?php else: ?>
<div class="text-center text-muted py-3 mb-0">
<span>Nessun responsabile</span>
</div>
<?php endif; ?>
</div>
</div>
<?php if($evento->note): ?>
<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">
<p class="mb-0"><?php echo nl2br(e($evento->note)); ?></p>
</div>
</div>
<?php endif; ?>
</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="/eventi/<?php echo e($evento->id); ?>/documenti" method="POST" enctype="multipart/form-data" class="mb-0">
<?php echo csrf_field(); ?>
<div class="row">
<div class="col-md-4">
<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="programma">Programma</option>
<option value="locandina">Locandina</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-1">
<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($evento->documenti && $evento->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 = $evento->documenti; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $documento): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td>
<i class="fas fa-file text-secondary mr-1"></i>
<?php echo e($documento->nome_file); ?>
</td>
<td><?php echo e(ucfirst($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); ?>)" title="Anteprima">
<i class="fas fa-eye"></i>
</button>
<?php endif; ?>
<form action="/eventi/<?php echo e($evento->id); ?>/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">
<a href="/eventi/<?php echo e($evento->id); ?>/edit" class="btn btn-warning">
<i class="fas fa-edit mr-1"></i> Modifica
</a>
<form action="/eventi/<?php echo e($evento->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($evento->nome_evento); ?>?')">
<i class="fas fa-trash mr-1"></i> Elimina
</button>
</form>
<a href="/eventi/<?php echo e($evento->id); ?>/export-ics" class="btn btn-success">
<i class="fas fa-calendar-plus mr-1"></i> Esporta ICS
</a>
<a href="/eventi" class="btn btn-secondary">
<i class="fas fa-arrow-left mr-1"></i> Torna all'elenco
</a>
</div>
<?php $__env->stopSection(); ?>
<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">&times;</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->startSection('scripts'); ?>
<script>
function showDocumentoForm() {
document.getElementById('documento-add-form').style.display = 'block';
}
function hideDocumentoForm() {
document.getElementById('documento-add-form').style.display = 'none';
}
function previewDocumento(id) {
document.getElementById('previewFrame').src = '/documenti/' + id + '/preview';
document.getElementById('previewDownloadBtn').href = '/documenti/' + id + '/download';
$('#previewModal').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/eventi/show.blade.php ENDPATH**/ ?>
@@ -1,674 +0,0 @@
<?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">&times;</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**/ ?>
@@ -1,4 +0,0 @@
<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**/ ?>

Before

Width:  |  Height:  |  Size: 763 B

@@ -1,220 +0,0 @@
<?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**/ ?>
@@ -1,79 +0,0 @@
<?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**/ ?>
@@ -1,5 +0,0 @@
<?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**/ ?>
@@ -1,6 +0,0 @@
<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**/ ?>

Before

Width:  |  Height:  |  Size: 889 B

@@ -1,5 +0,0 @@
<?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**/ ?>
@@ -1,47 +0,0 @@
<?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">&lsaquo;</span>
</li>
<?php else: ?>
<li>
<a href="<?php echo e($paginator->previousPageUrl()); ?>" rel="prev" aria-label="<?php echo app('translator')->get('pagination.previous'); ?>">&lsaquo;</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'); ?>">&rsaquo;</a>
</li>
<?php else: ?>
<li class="disabled" aria-disabled="true" aria-label="<?php echo app('translator')->get('pagination.next'); ?>">
<span aria-hidden="true">&rsaquo;</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**/ ?>
@@ -1,8 +0,0 @@
<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**/ ?>
@@ -1,5 +0,0 @@
<?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**/ ?>
@@ -1390,7 +1390,7 @@ function browseRepo(repoId, repoNome, path) {
function updateRemoteBreadcrumb(nome, path) {
const bc = document.getElementById('remoteBreadcrumb');
const parts = path.replace(/^\/+|\/+$/g, '').split('/').filter(Boolean);
let html = '<i class="fab ' + (currentRepoBrowse && currentRepoBrowse.id ? getRepoIcon(repoIconFromId(currentRepoBrowse.id)) : 'fa-server') + ' mr-1"></i> ' + escHtml(nome);
let html = '<i class="' + (currentRepoBrowse && currentRepoBrowse.id ? repoIconFromId(currentRepoBrowse.id) : 'fa fa-server') + ' mr-1"></i> ' + escHtml(nome);
if (parts.length > 0 && parts[0] !== '') {
html += ' / ' + parts.map(p => escHtml(p)).join(' / ');
}
@@ -1,713 +0,0 @@
<?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>
<a href="#mittenti" class="list-group-item list-group-item-action" data-toggle="tab">
<i class="nav-icon fas fa-user-plus"></i> Mittenti Aggiuntivi
</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 class="tab-pane" id="mittenti">
<div class="card card-primary">
<div class="card-header">
<h3 class="card-title">Mittenti Aggiuntivi</h3>
<div class="card-tools">
<button type="button" class="btn btn-sm btn-success" data-toggle="modal" data-target="#senderModal" onclick="resetSenderForm()">
<i class="fas fa-plus mr-1"></i> Nuovo Mittente
</button>
</div>
</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; ?>
<?php if($senderAccounts->count() > 0): ?>
<div class="table-responsive">
<table class="table table-bordered table-hover table-sm">
<thead>
<tr>
<th>Email</th>
<th>Nome</th>
<th>SMTP</th>
<th>Reply-To</th>
<th>Verify</th>
<th>Stato</th>
<th style="width: 160px;">Azioni</th>
</tr>
</thead>
<tbody>
<?php $__currentLoopData = $senderAccounts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $sender): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td><strong><?php echo e($sender->email_address); ?></strong></td>
<td><?php echo e($sender->email_name ?: '-'); ?></td>
<td><small><?php echo e($sender->smtp_host ?: '-'); ?>:<?php echo e($sender->smtp_port ?: '-'); ?></small></td>
<td><small class="text-muted"><?php echo e($sender->reply_to ?: '-'); ?></small></td>
<td><small class="text-muted"><?php echo e($sender->verify_email ?: '-'); ?></small></td>
<td>
<?php if($sender->is_active): ?>
<span class="badge badge-success">Attivo</span>
<?php else: ?>
<span class="badge badge-secondary">Disattivo</span>
<?php endif; ?>
</td>
<td>
<button type="button" class="btn btn-xs btn-info" onclick="editSender(<?php echo e($sender->id); ?>)" title="Modifica">
<i class="fas fa-edit"></i>
</button>
<button type="button" class="btn btn-xs btn-success" onclick="testSenderSmtp(<?php echo e($sender->id); ?>)" title="Test SMTP">
<i class="fas fa-paper-plane"></i>
</button>
<form action="<?php echo e(route('impostazioni.sender.destroy', $sender->id)); ?>" method="POST" class="d-inline" onsubmit="return confirm('Eliminare il mittente <?php echo e($sender->email_address); ?>?')">
<?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
<button type="submit" class="btn btn-xs btn-danger" title="Elimina">
<i class="fas fa-trash"></i>
</button>
</form>
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</table>
</div>
<?php else: ?>
<div class="text-center text-muted py-4">
<i class="fas fa-user-plus fa-2x mb-2"></i>
<p class="mb-0">Nessun mittente aggiuntivo configurato.</p>
<p class="mb-0">Usa il pulsante "Nuovo Mittente" per aggiungere un account di invio dedicato (es. Newsletter).</p>
</div>
<?php endif; ?>
</div>
</div>
<?php if($senderAccounts->count() > 0): ?>
<div class="card card-secondary">
<div class="card-header">
<h3 class="card-title"><i class="fas fa-info-circle mr-2"></i>Come funziona</h3>
</div>
<div class="card-body">
<ul class="mb-0">
<li>I mittenti aggiuntivi sono account <strong>solo invio</strong> (SMTP) senza IMAP.</li>
<li>Puoi selezionarli nel <strong>compose email</strong> o negli <strong>invii mailing</strong>.</li>
<li>Il campo <strong>Reply-To</strong> imposta l'indirizzo di risposta (es. <code>no-reply@parrocchia.it</code>).</li>
<li>Il campo <strong>Verify Email</strong> riceve un report di riepilogo dopo ogni invio massivo con l'esito (ok/falliti).</li>
<li>Se Reply-To non è impostato, viene usato Verify Email come fallback.</li>
</ul>
</div>
</div>
<?php endif; ?>
</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(); ?>
<div class="modal fade" id="senderModal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<form id="senderForm" method="POST" action="<?php echo e(route('impostazioni.sender.store')); ?>">
<?php echo csrf_field(); ?>
<input type="hidden" name="_method" id="senderMethod" value="POST">
<input type="hidden" name="id" id="senderId" value="">
<div class="modal-header bg-primary">
<h5 class="modal-title" id="senderModalTitle"><i class="fas fa-user-plus mr-2"></i>Nuovo Mittente</h5>
<button type="button" class="close text-white" data-dismiss="modal">&times;</button>
</div>
<div class="modal-body">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="sender_email">Email *</label>
<input type="email" name="email_address" id="sender_email" class="form-control" required placeholder="newsletter@parrocchia.it">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="sender_name">Nome visualizzato</label>
<input type="text" name="email_name" id="sender_name" class="form-control" placeholder="Newsletter Parrocchiale">
</div>
</div>
</div>
<hr>
<h6>Configurazione SMTP</h6>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="sender_smtp_host">Host SMTP</label>
<input type="text" name="smtp_host" id="sender_smtp_host" class="form-control" placeholder="smtp.gmail.com">
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label for="sender_smtp_port">Porta</label>
<input type="number" name="smtp_port" id="sender_smtp_port" class="form-control" value="587">
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label for="sender_smtp_encryption">Crittografia</label>
<select name="smtp_encryption" id="sender_smtp_encryption" class="form-control">
<option value="tls">TLS</option>
<option value="ssl">SSL</option>
<option value="none">Nessuna</option>
</select>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="sender_smtp_username">Username SMTP</label>
<input type="text" name="smtp_username" id="sender_smtp_username" class="form-control" placeholder="Lascia vuoto per usare l'email">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="sender_smtp_password">Password SMTP</label>
<input type="password" name="smtp_password" id="sender_smtp_password" class="form-control" placeholder="......">
<small class="text-muted">Lascia vuoto per non cambiare</small>
</div>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="sender_reply_to">Reply-To <small class="text-muted">(no-reply)</small></label>
<input type="email" name="reply_to" id="sender_reply_to" class="form-control" placeholder="no-reply@parrocchia.it">
<small class="text-muted">Indirizzo di risposta per le email inviate</small>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="sender_verify_email">Verify Email <small class="text-muted">(report)</small></label>
<input type="email" name="verify_email" id="sender_verify_email" class="form-control" placeholder="verifica@parrocchia.it">
<small class="text-muted">Riceve report riepilogo dopo invii massivi</small>
</div>
</div>
</div>
<div class="form-group">
<label for="sender_note">Nota interna</label>
<textarea name="note" id="sender_note" class="form-control" rows="2" placeholder="Es. Newsletter settimanale"></textarea>
</div>
<div class="form-group">
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="sender_is_active" name="is_active" value="1" checked>
<label class="custom-control-label" for="sender_is_active">Mittente attivo</label>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Annulla</button>
<button type="submit" class="btn btn-primary">
<i class="fas fa-save mr-1"></i> Salva Mittente
</button>
</div>
</form>
</div>
</div>
</div>
<?php $__env->startSection('scripts'); ?>
<script>
let senderAccounts = <?php echo json_encode($senderAccounts, 15, 512) ?>;
function resetSenderForm() {
document.getElementById('senderForm').action = '<?php echo e(route('impostazioni.sender.store')); ?>';
document.getElementById('senderMethod').value = 'POST';
document.getElementById('senderModalTitle').textContent = 'Nuovo Mittente';
document.getElementById('senderForm').reset();
document.getElementById('senderId').value = '';
document.getElementById('sender_is_active').checked = true;
document.getElementById('sender_smtp_password').placeholder = '';
document.getElementById('sender_smtp_password').required = false;
}
function editSender(id) {
const sender = senderAccounts.find(s => s.id === id);
if (!sender) return;
document.getElementById('senderForm').action = '<?php echo e(route('impostazioni.sender.update', '')); ?>/' + id;
document.getElementById('senderMethod').value = 'PUT';
document.getElementById('senderModalTitle').textContent = 'Modifica Mittente - ' + sender.email_address;
document.getElementById('senderId').value = sender.id;
document.getElementById('sender_email').value = sender.email_address;
document.getElementById('sender_name').value = sender.email_name || '';
document.getElementById('sender_smtp_host').value = sender.smtp_host || '';
document.getElementById('sender_smtp_port').value = sender.smtp_port || 587;
document.getElementById('sender_smtp_encryption').value = sender.smtp_encryption || 'tls';
document.getElementById('sender_smtp_username').value = sender.smtp_username || '';
document.getElementById('sender_smtp_password').value = '';
document.getElementById('sender_smtp_password').placeholder = '......';
document.getElementById('sender_smtp_password').required = false;
document.getElementById('sender_reply_to').value = sender.reply_to || '';
document.getElementById('sender_verify_email').value = sender.verify_email || '';
document.getElementById('sender_note').value = sender.note || '';
document.getElementById('sender_is_active').checked = sender.is_active;
$('#senderModal').modal('show');
}
function testSenderSmtp(id) {
const email = prompt('Inserisci l\'indirizzo email a cui inviare il test:');
if (!email || !email.includes('@')) return;
const btn = event.target;
btn.disabled = true;
btn.innerHTML = '<i class="fas fa-spinner fa-spin"></i>';
$.ajax({
url: '<?php echo e(route('impostazioni.sender.test', '')); ?>/' + id,
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"></i>';
alert(response.success ? '✅ ' + response.message : '❌ ' + response.message);
},
error: function(xhr) {
btn.disabled = false;
btn.innerHTML = '<i class="fas fa-paper-plane"></i>';
const msg = xhr.responseJSON?.message || 'Errore di connessione';
alert('❌ ' + msg);
}
});
}
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**/ ?>
@@ -1,70 +0,0 @@
<?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**/ ?>
@@ -1,31 +0,0 @@
<?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**/ ?>
File diff suppressed because one or more lines are too long
@@ -1,30 +0,0 @@
<?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**/ ?>
@@ -1,35 +0,0 @@
<?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**/ ?>
@@ -1,98 +0,0 @@
<?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**/ ?>
@@ -1,115 +0,0 @@
<?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**/ ?>
@@ -1,178 +0,0 @@
<?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" enctype="multipart/form-data">
<?php echo csrf_field(); ?>
<?php if($senderAccounts->count() > 0): ?>
<div class="form-group">
<label for="mittente_id">Da (mittente)</label>
<select name="mittente_id" id="mittente_id" class="form-control">
<option value="0">Sistema — <?php echo e(optional(\App\Models\EmailSetting::getActive())->email_address ?? 'Configura email'); ?></option>
<?php $__currentLoopData = $senderAccounts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $sender): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($sender->id); ?>"><?php echo e($sender->email_name ?: $sender->email_address); ?> &lt;<?php echo e($sender->email_address); ?>&gt;</option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
<small class="text-muted">Seleziona un mittente alternativo per l'invio. Lascia "Sistema" per usare l'account predefinito.</small>
</div>
<?php endif; ?>
<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**/ ?>
@@ -1,180 +0,0 @@
<?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">&times;</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>&times;</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**/ ?>
@@ -1,167 +0,0 @@
<?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**/ ?>
@@ -1,310 +0,0 @@
<!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**/ ?>
@@ -1,260 +0,0 @@
<?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**/ ?>
@@ -1,103 +0,0 @@
<?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>
<form action="<?php echo e(route('eventi.export-selected-ics')); ?>" method="POST" class="d-inline">
<?php echo csrf_field(); ?>
<button type="submit" class="btn btn-success btn-sm">
<i class="fas fa-calendar-plus mr-1"></i> Esporta ICS
</button>
</form>
</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**/ ?>
@@ -1,162 +0,0 @@
<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>&times;</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**/ ?>
@@ -1,180 +0,0 @@
<?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**/ ?>
@@ -1,4 +0,0 @@
<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**/ ?>

Before

Width:  |  Height:  |  Size: 362 B

@@ -1,75 +0,0 @@
<?php
use App\Models\AppSetting;
$appLogo = AppSetting::getLogoUrl();
$appName = AppSetting::getAppName() ?? 'Glastree';
?>
<!DOCTYPE html>
<html lang="it">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Reset Password - <?php echo e(e($appName)); ?></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">
</head>
<body class="hold-transition login-page">
<div class="login-box">
<div class="login-logo">
<a href="/">
<?php if($appLogo): ?>
<img src="<?php echo e($appLogo); ?>" alt="Logo" style="max-height: 80px; max-width: 200px;">
<?php else: ?>
<i class="fas fa-tree text-success"></i> <b><?php echo e(e($appName)); ?></b>
<?php endif; ?>
</a>
</div>
<div class="card">
<div class="card-body login-card-body">
<p class="login-box-msg">Password dimenticata? Inserisci la tua email e ti invieremo il link per reimpostarla.</p>
<?php if(session('success')): ?>
<div class="alert alert-success"><?php echo e(session('success')); ?></div>
<?php endif; ?>
<form action="<?php echo e(route('password.email')); ?>" method="POST">
<?php echo csrf_field(); ?>
<div class="input-group mb-3">
<input type="email" name="email" class="form-control <?php $__errorArgs = ['email'];
$__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); ?>" placeholder="Email" required value="<?php echo e(old('email')); ?>">
<div class="input-group-append">
<div class="input-group-text"><span class="fas fa-envelope"></span></div>
</div>
<?php $__errorArgs = ['email'];
$__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="row">
<div class="col-12">
<button type="submit" class="btn btn-success btn-block">Invia link reset</button>
</div>
</div>
</form>
<p class="mb-0 text-center mt-3">
<a href="<?php echo e(route('login')); ?>">Torna al login</a>
</p>
</div>
</div>
</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>
</body>
</html>
<?php /**PATH /var/www/html/glastree/resources/views/auth/forgot-password.blade.php ENDPATH**/ ?>
@@ -1,28 +0,0 @@
<?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**/ ?>
@@ -1,5 +0,0 @@
<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**/ ?>

Before

Width:  |  Height:  |  Size: 519 B

@@ -1,151 +0,0 @@
<?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-primary">
<div class="inner">
<h3><?php echo e($stats['documenti']); ?></h3>
<p>Documenti</p>
</div>
<div class="icon">
<i class="fas fa-file"></i>
</div>
<a href="/documenti" 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-danger">
<div class="inner">
<h3><?php echo e($stats['eventi']); ?></h3>
<p>Eventi</p>
</div>
<div class="icon">
<i class="fas fa-calendar"></i>
</div>
<a href="/eventi" class="small-box-footer">Visualizza <i class="fas fa-arrow-circle-right"></i></a>
</div>
</div>
</div>
<div class="row">
<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 class="col-lg-3 col-6">
<div class="small-box bg-secondary">
<div class="inner">
<h3><?php echo e($stats['email_nuove']); ?></h3>
<p>Nuove Email</p>
</div>
<div class="icon">
<i class="fas fa-envelope"></i>
</div>
<a href="/email" 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-dark">
<div class="inner">
<h3><?php echo e($stats['mailing_liste']); ?></h3>
<p>Mailing List</p>
</div>
<div class="icon">
<i class="fas fa-list-alt"></i>
</div>
<a href="/mailing-liste" 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**/ ?>
@@ -1,77 +0,0 @@
<?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**/ ?>
@@ -1625,6 +1625,7 @@ if (window.location.hash === '#email') {
// ===== REPOSITORY REMOTI =====
let repositories = <?php echo json_encode($repositories, 15, 512) ?>;
let newToken = <?php echo json_encode($googleDriveNewToken, 15, 512) ?>;
function resetRepoForm() {
document.getElementById('repoForm').action = '<?php echo e(route('storage-repositories.store')); ?>';
@@ -1633,6 +1634,7 @@ function resetRepoForm() {
document.getElementById('repoForm').reset();
document.getElementById('repoId').value = '';
document.getElementById('repo_is_active').checked = true;
setGdAuthStatus(false, '');
toggleRepoConfigFields();
}
@@ -1640,6 +1642,59 @@ function toggleRepoConfigFields() {
const tipo = document.getElementById('repo_tipo').value;
document.getElementById('webdavFields').style.display = tipo === 'webdav' ? '' : 'none';
document.getElementById('googleDriveFields').style.display = tipo === 'google_drive' ? '' : 'none';
if (tipo === 'google_drive') {
updateGdAuthUrl();
}
}
function setGdAuthStatus(authorized, clientId) {
const statusEl = document.getElementById('gdAuthStatus');
const btn = document.getElementById('gdAuthBtn');
if (authorized) {
statusEl.innerHTML = '<span class="text-success"><i class="fas fa-check-circle mr-1"></i> Autorizzato</span>';
btn.innerHTML = '<i class="fas fa-refresh mr-1"></i> Ri-autorizza con Google';
} else {
statusEl.innerHTML = '<span class="text-muted"><i class="fas fa-circle mr-1"></i> Non autorizzato</span>';
btn.innerHTML = '<i class="fas fa-google mr-1"></i> Autorizza con Google';
}
}
function updateGdAuthUrl() {
const clientId = document.getElementById('gd_client_id').value.trim();
const clientSecret = document.getElementById('gd_client_secret').value.trim();
const repoId = document.getElementById('repoId').value;
const nome = document.getElementById('repo_nome').value.trim();
const isActive = document.getElementById('repo_is_active').checked ? '1' : '0';
const rootFolderId = document.getElementById('gd_root_folder_id').value.trim();
const btn = document.getElementById('gdAuthBtn');
if (clientId && clientSecret) {
const params = new URLSearchParams({
client_id: clientId,
client_secret: clientSecret,
repo_id: repoId || '0',
nome: nome,
is_active: isActive,
root_folder_id: rootFolderId || 'root',
});
btn.href = '<?php echo e(route('google-drive.redirect')); ?>?' + params.toString();
btn.classList.remove('disabled');
} else {
btn.href = '#';
btn.classList.add('disabled');
}
}
function startGdAuth() {
const clientId = document.getElementById('gd_client_id').value.trim();
const clientSecret = document.getElementById('gd_client_secret').value.trim();
if (!clientId || !clientSecret) {
alert('Inserisci Client ID e Client Secret prima di autorizzare.');
return false;
}
// Open in same window (full redirect flow)
updateGdAuthUrl();
window.location.href = document.getElementById('gdAuthBtn').href;
return false;
}
function editRepo(id) {
@@ -1664,10 +1719,11 @@ function editRepo(id) {
document.getElementById('gd_client_id').value = config.client_id || '';
document.getElementById('gd_client_secret').value = '';
document.getElementById('gd_client_secret').placeholder = config.client_secret ? '......' : '';
document.getElementById('gd_refresh_token').value = '';
document.getElementById('gd_refresh_token').placeholder = config.refresh_token ? '......' : '';
document.getElementById('gd_refresh_token').value = config.refresh_token || '';
document.getElementById('gd_root_folder_id').value = config.root_folder_id || 'root';
const hasRefreshToken = !!(config.refresh_token && config.refresh_token !== '');
setGdAuthStatus(hasRefreshToken, config.client_id || '');
toggleRepoConfigFields();
$('#repoModal').modal('show');
}
@@ -1736,6 +1792,25 @@ $(document).ready(function() {
}
});
}
if (newToken && newToken.refresh_token) {
// Auto-open modal after OAuth callback — preserve nome and other fields
document.getElementById('repoForm').action = '<?php echo e(route('storage-repositories.store')); ?>';
document.getElementById('repoMethod').value = 'POST';
document.getElementById('repoModalTitle').textContent = 'Nuovo Repository Remoto';
document.getElementById('repoForm').reset();
document.getElementById('repoId').value = '';
document.getElementById('repo_nome').value = newToken.nome || '';
document.getElementById('repo_tipo').value = 'google_drive';
document.getElementById('repo_is_active').checked = newToken.is_active !== '0';
document.getElementById('gd_client_id').value = newToken.client_id || '';
document.getElementById('gd_client_secret').value = newToken.client_secret || '';
document.getElementById('gd_refresh_token').value = newToken.refresh_token;
document.getElementById('gd_root_folder_id').value = newToken.root_folder_id || 'root';
setGdAuthStatus(true, newToken.client_id || '');
toggleRepoConfigFields();
$('#repoModal').modal('show');
}
});
</script>
@@ -1828,35 +1903,46 @@ $(document).ready(function() {
<div class="col-md-6">
<div class="form-group">
<label for="gd_client_id">Client ID *</label>
<input type="text" name="config[client_id]" id="gd_client_id" class="form-control" placeholder="Google Client ID">
<input type="text" name="config[client_id]" id="gd_client_id" class="form-control" placeholder="Google Client ID" oninput="updateGdAuthUrl()">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="gd_client_secret">Client Secret *</label>
<input type="text" name="config[client_secret]" id="gd_client_secret" class="form-control" placeholder="Google Client Secret">
<input type="password" name="config[client_secret]" id="gd_client_secret" class="form-control" placeholder="Google Client Secret" oninput="updateGdAuthUrl()">
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="gd_refresh_token">Refresh Token *</label>
<input type="text" name="config[refresh_token]" id="gd_refresh_token" class="form-control" placeholder="OAuth Refresh Token">
<input type="hidden" name="config[refresh_token]" id="gd_refresh_token" value="">
<div class="mb-3">
<label class="d-block">Autorizzazione Google</label>
<div id="gdAuthStatus" class="mb-2">
<span class="text-muted"><i class="fas fa-circle mr-1"></i> Non autorizzato</span>
</div>
<a id="gdAuthBtn" href="#" class="btn btn-danger btn-sm" target="_blank" onclick="return startGdAuth()">
<i class="fas fa-google mr-1"></i> Autorizza con Google
</a>
<small class="d-block text-muted mt-1">
Dopo aver cliccato, verrai reindirizzato a Google per autorizzare l'app.
Al termine, il Refresh Token verrà salvato automaticamente.
</small>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="gd_root_folder_id">Root Folder ID</label>
<input type="text" name="config[root_folder_id]" id="gd_root_folder_id" class="form-control" value="root" placeholder="root">
<input type="text" name="config[root_folder_id]" id="gd_root_folder_id" class="form-control" value="root" placeholder="root" oninput="updateGdAuthUrl()">
<small class="text-muted">ID della cartella Google Drive, default: root</small>
</div>
</div>
</div>
<div class="alert alert-info">
<i class="fas fa-info-circle mr-2"></i>
Per ottenere le credenziali OAuth: <a href="https://console.cloud.google.com/" target="_blank">Google Cloud Console</a>
&rarr; API &amp; Services &rarr; Credentials &rarr; Crea OAuth Client ID (Desktop App).
<strong>Prima volta?</strong> Crea il progetto in <a href="https://console.cloud.google.com/" target="_blank">Google Cloud Console</a>
&rarr; API &amp; Services &rarr; Credentials &rarr; Crea OAuth Client ID (Web Application).
Aggiungi <code><?php echo e(url('/auth/google-drive/callback')); ?></code> come <strong>Authorized Redirect URI</strong>.
</div>
</div>
</div>
@@ -1,83 +0,0 @@
<?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**/ ?>

Some files were not shown because too many files have changed in this diff Show More