fix mailing an email
This commit is contained in:
@@ -26,7 +26,7 @@ $canDeleteGruppi = Auth::user()->canDelete('gruppi');
|
||||
</div>
|
||||
@endif
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-12">
|
||||
<div class="card card-success">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">
|
||||
@@ -35,52 +35,113 @@ $canDeleteGruppi = Auth::user()->canDelete('gruppi');
|
||||
</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table table-sm table-borderless">
|
||||
<tr>
|
||||
<td style="width: 130px;"><strong>Path:</strong></td>
|
||||
<td class="text-muted small">{{ $gruppo->full_path }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Gruppo Padre:</strong></td>
|
||||
<td>
|
||||
@if($gruppo->parent)
|
||||
<a href="{{ route('gruppi.show', $gruppo->parent->id) }}">{{ $gruppo->parent->nome }}</a>
|
||||
@else
|
||||
<span class="badge badge-success">Gruppo radice</span>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<table class="table table-sm table-borderless mb-0">
|
||||
<tr>
|
||||
<td style="width: 130px;"><strong>Path:</strong></td>
|
||||
<td class="text-muted small">{{ $gruppo->full_path }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Gruppo Padre:</strong></td>
|
||||
<td>
|
||||
@if($gruppo->parent)
|
||||
<a href="{{ route('gruppi.show', $gruppo->parent->id) }}">{{ $gruppo->parent->nome }}</a>
|
||||
@else
|
||||
<span class="badge badge-success">Gruppo radice</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Diocesi:</strong></td>
|
||||
<td>
|
||||
@if($gruppo->diocesi->count() > 0)
|
||||
@foreach($gruppo->diocesi as $diocesi)
|
||||
<span class="badge badge-secondary mr-1">{{ $diocesi->nome }}</span>
|
||||
@endforeach
|
||||
@else
|
||||
<span class="text-muted">-</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<table class="table table-sm table-borderless mb-0">
|
||||
<tr>
|
||||
<td style="width: 130px;"><strong>Responsabili:</strong></td>
|
||||
<td>
|
||||
@php $responsabili = $gruppo->getResponsabili() @endphp
|
||||
@if($responsabili->count() > 0)
|
||||
@foreach($responsabili as $resp)
|
||||
<a href="{{ route('individui.show', $resp->id) }}">
|
||||
<i class="fas fa-user text-info mr-1"></i>
|
||||
{{ $resp->nome_completo }}
|
||||
</a><br>
|
||||
@endforeach
|
||||
@else
|
||||
<span class="text-muted">-</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Email:</strong></td>
|
||||
<td>{{ $gruppo->email_primaria ?? '-' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Telefono:</strong></td>
|
||||
<td>{{ $gruppo->telefono_primario ?? '-' }}</td>
|
||||
</tr>
|
||||
@if($gruppo->gruppoContatti->count() > 0)
|
||||
<tr>
|
||||
<td><strong>Altri Contatti:</strong></td>
|
||||
<td>
|
||||
@foreach($gruppo->gruppoContatti as $contatto)
|
||||
@if(!$contatto->is_primary || ($contatto->tipo !== 'email' && $contatto->tipo !== 'telefono' && $contatto->tipo !== 'cellulare'))
|
||||
<div>
|
||||
@if($contatto->etichetta)<small class="text-muted">{{ $contatto->etichetta }}:</small>@endif
|
||||
<span>{{ $contatto->valore }}</span>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Diocesi:</strong></td>
|
||||
<td>{{ $gruppo->diocesi?->nome ?? '-' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Responsabili:</strong></td>
|
||||
<td>
|
||||
@php $responsabili = $gruppo->getResponsabili() @endphp
|
||||
@if($responsabili->count() > 0)
|
||||
@foreach($responsabili as $resp)
|
||||
<a href="{{ route('individui.show', $resp->id) }}">
|
||||
<i class="fas fa-user text-info mr-1"></i>
|
||||
{{ $resp->nome_completo }}
|
||||
</a><br>
|
||||
@endforeach
|
||||
@else
|
||||
<span class="text-muted">-</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="card">
|
||||
</div>
|
||||
|
||||
@php $incontroEvento = $gruppo->eventi->where('is_incontro_gruppo', true)->first(); @endphp
|
||||
|
||||
<div class="row mt-3">
|
||||
<div class="col-md-3">
|
||||
<div class="card h-100">
|
||||
<div class="card-header"><h3 class="card-title"><i class="fas fa-chart-pie mr-2"></i>Statistiche</h3></div>
|
||||
<div class="card-body d-flex align-items-center">
|
||||
<div class="row text-center w-100">
|
||||
<div class="col-6">
|
||||
<h2 class="mb-0 text-primary">{{ $gruppo->individui->count() }}</h2>
|
||||
<small class="text-muted">Membri</small>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<h2 class="mb-0 text-warning">{{ $gruppo->children->count() }}</h2>
|
||||
<small class="text-muted">Sottogruppi</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="card h-100">
|
||||
<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">
|
||||
<table class="table table-sm table-borderless mb-0">
|
||||
<tr>
|
||||
<td style="width: 100px;"><strong>Indirizzo:</strong></td>
|
||||
<td style="width: 80px;"><strong>Indirizzo:</strong></td>
|
||||
<td>{{ $gruppo->indirizzo_incontro ?: '-' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -94,34 +155,78 @@ $canDeleteGruppi = Auth::user()->canDelete('gruppi');
|
||||
</table>
|
||||
@if($gruppo->mappa_posizione)
|
||||
<a href="{{ $gruppo->mappa_posizione }}" target="_blank" class="btn btn-sm btn-outline-primary mt-2">
|
||||
<i class="fas fa-external-link-alt mr-1"></i> Visualizza su mappa
|
||||
<i class="fas fa-external-link-alt mr-1"></i> Mappa
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="card">
|
||||
<div class="card-header"><h3 class="card-title"><i class="fas fa-chart-pie mr-2"></i>Statistiche</h3></div>
|
||||
@if($incontroEvento)
|
||||
<div class="col-md-3">
|
||||
<div class="card card-success h-100">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">
|
||||
<i class="fas fa-calendar-check mr-2"></i>
|
||||
Giorno di Incontro
|
||||
</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row text-center">
|
||||
<div class="col-6">
|
||||
<div class="border-right">
|
||||
<h2 class="mb-0 text-primary">{{ $gruppo->individui->count() }}</h2>
|
||||
<small class="text-muted">Membri</small>
|
||||
</div>
|
||||
<table class="table table-sm table-borderless mb-0">
|
||||
<tr>
|
||||
<td style="width: 70px;"><strong>Evento:</strong></td>
|
||||
<td>{{ $incontroEvento->nome_evento }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Quando:</strong></td>
|
||||
<td>
|
||||
@if($incontroEvento->tipo_recorrenza === 'settimanale')
|
||||
{{ $incontroEvento->giorno_settimana_label }}
|
||||
<span class="badge badge-info ml-1">Sett.</span>
|
||||
@elseif($incontroEvento->tipo_recorrenza === 'mensile')
|
||||
{{ $incontroEvento->occorrenza_mensile_label }}
|
||||
<span class="badge badge-info ml-1">Mens.</span>
|
||||
@elseif($incontroEvento->tipo_recorrenza === 'annuale')
|
||||
{{ $incontroEvento->mese_annuale_label }}
|
||||
<span class="badge badge-info ml-1">Ann.</span>
|
||||
@elseif($incontroEvento->tipo_recorrenza === 'altro')
|
||||
{{ $incontroEvento->giorno_settimana_label }}
|
||||
<span class="badge badge-info ml-1">Altro</span>
|
||||
@else
|
||||
{{ $incontroEvento->data_specifica?->format('d/m/Y') ?: '-' }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@if($incontroEvento->ora_inizio)
|
||||
<tr>
|
||||
<td><strong>Ora:</strong></td>
|
||||
<td>ore {{ $incontroEvento->ora_inizio->format('H:i') }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
@if($incontroEvento->responsabili->count() > 0)
|
||||
<hr>
|
||||
<small class="text-muted"><strong>Resp.:</strong></small>
|
||||
@foreach($incontroEvento->responsabili as $resp)
|
||||
<div class="mt-1">
|
||||
<i class="fas fa-user text-info mr-1"></i>
|
||||
<a href="/individui/{{ $resp->id }}">{{ $resp->cognome }} {{ $resp->nome }}</a>
|
||||
@if($resp->telefono_primario)
|
||||
<br><small class="text-success ml-3">{{ $resp->telefono_primario }}</small>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<h2 class="mb-0 text-warning">{{ $gruppo->children->count() }}</h2>
|
||||
<small class="text-muted">Sottogruppi</small>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
<div class="mt-2">
|
||||
<a href="/eventi/{{ $incontroEvento->id }}" class="btn btn-xs btn-outline-primary">
|
||||
<i class="fas fa-eye mr-1"></i> Vedi
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="card">
|
||||
@endif
|
||||
<div class="col-md-3">
|
||||
<div class="card h-100">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><i class="fas fa-camera mr-2"></i>Avatar</h3>
|
||||
</div>
|
||||
@@ -130,113 +235,38 @@ $canDeleteGruppi = Auth::user()->canDelete('gruppi');
|
||||
<img src="{{ $gruppo->avatar_url }}"
|
||||
alt="{{ $gruppo->nome }}"
|
||||
class="img-thumbnail mb-2"
|
||||
style="max-width: 120px; max-height: 120px; object-fit: cover; border-radius: 50%;">
|
||||
style="max-width: 100px; max-height: 100px; object-fit: cover; border-radius: 50%;">
|
||||
<br>
|
||||
<form id="remove-avatar-form" class="d-inline">
|
||||
<button type="button" class="btn btn-danger btn-sm" onclick="removeAvatar()">
|
||||
<i class="fas fa-trash mr-1"></i>Rimuovi
|
||||
<i class="fas fa-trash mr-1"></i>
|
||||
</button>
|
||||
</form>
|
||||
@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-folder fa-4x text-white"></i>
|
||||
<div class="bg-secondary d-flex align-items-center justify-content-center mx-auto mb-3"
|
||||
style="width: 100px; height: 100px; border-radius: 50%;">
|
||||
<i class="fas fa-folder fa-3x text-white"></i>
|
||||
</div>
|
||||
@endif
|
||||
<form id="avatar-upload-form" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<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,image/webp">
|
||||
<label class="custom-file-label" for="avatar-input">Scegli immagine...</label>
|
||||
<label class="custom-file-label" for="avatar-input">Scegli...</label>
|
||||
</div>
|
||||
<button type="button" class="btn btn-primary btn-sm" onclick="uploadAvatar()">
|
||||
<i class="fas fa-upload mr-1"></i>Carica
|
||||
<i class="fas fa-upload mr-1"></i> Carica
|
||||
</button>
|
||||
</form>
|
||||
<div id="avatar-message" class="mt-2"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@php
|
||||
$incontroEvento = $gruppo->eventi->where('is_incontro_gruppo', true)->first();
|
||||
@endphp
|
||||
@if($incontroEvento)
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="card card-success">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">
|
||||
<i class="fas fa-calendar-check mr-2"></i>
|
||||
Giorno di Incontro
|
||||
</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table table-sm table-borderless mb-0">
|
||||
<tr>
|
||||
<td style="width: 100px;"><strong>Evento:</strong></td>
|
||||
<td>{{ $incontroEvento->nome_evento }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Quando:</strong></td>
|
||||
<td>
|
||||
@if($incontroEvento->tipo_recorrenza === 'settimanale')
|
||||
{{ $incontroEvento->giorno_settimana_label }}
|
||||
<span class="badge badge-info ml-1">Settimanale</span>
|
||||
@elseif($incontroEvento->tipo_recorrenza === 'mensile')
|
||||
{{ $incontroEvento->occorrenza_mensile_label }}
|
||||
@if($incontroEvento->mesi_recorrenza)
|
||||
<small class="text-muted">({{ $incontroEvento->mesi_recorrenza_label }})</small>
|
||||
@endif
|
||||
<span class="badge badge-info ml-1">Mensile</span>
|
||||
@elseif($incontroEvento->tipo_recorrenza === 'annuale')
|
||||
{{ $incontroEvento->mese_annuale_label }}
|
||||
@if($incontroEvento->giorno_mese)
|
||||
, giorno {{ $incontroEvento->giorno_mese }}
|
||||
@endif
|
||||
<span class="badge badge-info ml-1">Annuale</span>
|
||||
@elseif($incontroEvento->tipo_recorrenza === 'altro')
|
||||
{{ $incontroEvento->giorno_settimana_label }}
|
||||
<span class="badge badge-info ml-1">Altro</span>
|
||||
@else
|
||||
{{ $incontroEvento->data_specifica?->format('d/m/Y') ?: '-' }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@if($incontroEvento->ora_inizio)
|
||||
<tr>
|
||||
<td><strong>Ora:</strong></td>
|
||||
<td>ore {{ $incontroEvento->ora_inizio->format('H:i') }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
@if($incontroEvento->responsabili->count() > 0)
|
||||
<hr>
|
||||
<small class="text-muted"><strong>Responsabili:</strong></small>
|
||||
@foreach($incontroEvento->responsabili as $resp)
|
||||
<div class="mt-1">
|
||||
<i class="fas fa-user text-info mr-1"></i>
|
||||
<a href="/individui/{{ $resp->id }}">{{ $resp->cognome }} {{ $resp->nome }}</a>
|
||||
@if($resp->telefono_primario)
|
||||
<br><small class="text-success ml-3">{{ $resp->telefono_primario }}</small>
|
||||
@endif
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
<div class="mt-2">
|
||||
<a href="/eventi/{{ $incontroEvento->id }}" class="btn btn-xs btn-outline-primary">
|
||||
<i class="fas fa-eye mr-1"></i> Vedi evento
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if($gruppo->descrizione)
|
||||
@if($gruppo->descrizione)
|
||||
<div class="row mt-3">
|
||||
<div class="col-md-8">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header"><h3 class="card-title"><i class="fas fa-align-left mr-2"></i>Descrizione</h3></div>
|
||||
<div class="card-body">
|
||||
@@ -413,7 +443,7 @@ $canDeleteGruppi = Auth::user()->canDelete('gruppi');
|
||||
{{ $child->nome }}
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ $child->diocesi?->nome ?? '-' }}</td>
|
||||
<td>@if($child->diocesi->count() > 0)@foreach($child->diocesi as $dio)<span class="badge badge-secondary mr-1">{{ $dio->nome }}</span>@endforeach @else <span class="text-muted">-</span>@endif</td>
|
||||
<td>{{ $child->getResponsabili()->isNotEmpty() ? $child->getResponsabili()->first()->nome_completo : '-' }}</td>
|
||||
<td class="text-center">
|
||||
@if($child->individui()->count() > 0)
|
||||
|
||||
Reference in New Issue
Block a user