123 lines
7.3 KiB
PHP
123 lines
7.3 KiB
PHP
<x-filament-widgets::widget>
|
|
<x-filament::section>
|
|
<x-slot name="heading">Google Workspace</x-slot>
|
|
<x-slot name="description">
|
|
Stato collegamento, eventi calendario e anteprima rubrica Google.
|
|
</x-slot>
|
|
|
|
<div class="space-y-4">
|
|
<div class="rounded-lg border border-gray-200 bg-gray-50 p-3 text-sm">
|
|
<div class="font-semibold text-gray-800">Account collegato</div>
|
|
<div class="text-gray-700">{{ $connectionLabel }}</div>
|
|
<div class="mt-2 flex flex-wrap gap-2">
|
|
<a href="{{ $this->getCalendarioUrl() }}" class="inline-flex items-center rounded-md bg-primary-600 px-3 py-1.5 text-xs font-medium text-white hover:bg-primary-500">
|
|
Apri calendario interno
|
|
</a>
|
|
<a href="{{ $this->getRubricaUrl() }}" class="inline-flex items-center rounded-md bg-gray-700 px-3 py-1.5 text-xs font-medium text-white hover:bg-gray-600">
|
|
Apri rubrica interna
|
|
</a>
|
|
<button type="button" wire:click="importContactsToRubrica" class="inline-flex items-center rounded-md bg-emerald-600 px-3 py-1.5 text-xs font-medium text-white hover:bg-emerald-500">
|
|
Importa in Rubrica NetGescon
|
|
</button>
|
|
<button type="button" wire:click="exportRubricaToGoogle" class="inline-flex items-center rounded-md bg-blue-700 px-3 py-1.5 text-xs font-medium text-white hover:bg-blue-600">
|
|
Esporta Rubrica NetGescon su Google
|
|
</button>
|
|
<button type="button" wire:click="provaSincronizzazioneCalendarioTicket" class="inline-flex items-center rounded-md bg-amber-600 px-3 py-1.5 text-xs font-medium text-white hover:bg-amber-500">
|
|
Prova Sync Ticket -> Calendar
|
|
</button>
|
|
<button type="button" wire:click="sincronizzaCalendarioTicket" class="inline-flex items-center rounded-md bg-emerald-700 px-3 py-1.5 text-xs font-medium text-white hover:bg-emerald-600">
|
|
Sincronizza Ticket su Calendar
|
|
</button>
|
|
<a href="{{ $this->getTicketApertiUrl() }}" class="inline-flex items-center rounded-md bg-rose-700 px-3 py-1.5 text-xs font-medium text-white hover:bg-rose-600">
|
|
Ticket Aperti (Filament)
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
@if(filled($errorMessage))
|
|
<div class="rounded-lg border border-amber-300 bg-amber-50 p-3 text-sm text-amber-800">
|
|
{{ $errorMessage }}
|
|
</div>
|
|
@endif
|
|
|
|
<div class="grid gap-4 lg:grid-cols-2">
|
|
<div class="rounded-lg border border-gray-200 p-3">
|
|
<div class="mb-2 text-sm font-semibold text-gray-800">
|
|
Prossimi eventi ({{ $calendarId }})
|
|
</div>
|
|
|
|
@if(count($calendarEvents) === 0)
|
|
<div class="text-sm text-gray-500">Nessun evento trovato nei prossimi giorni.</div>
|
|
@else
|
|
<div class="space-y-2">
|
|
@foreach($calendarEvents as $event)
|
|
<div class="rounded-md border border-gray-100 bg-gray-50 px-3 py-2">
|
|
<div class="text-sm font-medium text-gray-800">{{ $event['title'] }}</div>
|
|
<div class="text-xs text-gray-600">{{ $event['start'] }}</div>
|
|
@if(!empty($event['location']))
|
|
<div class="text-xs text-gray-500">{{ $event['location'] }}</div>
|
|
@endif
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
@endif
|
|
</div>
|
|
|
|
<div class="rounded-lg border border-gray-200 p-3">
|
|
<div class="mb-2 text-sm font-semibold text-gray-800">Anteprima rubrica Google</div>
|
|
|
|
@if(count($contacts) === 0)
|
|
<div class="text-sm text-gray-500">Nessun contatto disponibile o permesso non ancora concesso.</div>
|
|
@else
|
|
<div class="space-y-2">
|
|
@foreach($contacts as $contact)
|
|
<div class="rounded-md border border-gray-100 bg-gray-50 px-3 py-2">
|
|
<div class="text-sm font-medium text-gray-800">{{ $contact['name'] }}</div>
|
|
@if(!empty($contact['email']))
|
|
<div class="text-xs text-gray-600">{{ $contact['email'] }}</div>
|
|
@endif
|
|
@if(!empty($contact['phone']))
|
|
<div class="text-xs text-gray-500">{{ $contact['phone'] }}</div>
|
|
@endif
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
@endif
|
|
</div>
|
|
|
|
<div class="rounded-lg border border-gray-200 p-3">
|
|
<div class="mb-2 text-sm font-semibold text-gray-800">Ticket aperti (operativi)</div>
|
|
|
|
@if(count($openTickets) === 0)
|
|
<div class="text-sm text-gray-500">Nessun ticket aperto al momento.</div>
|
|
@else
|
|
<div class="space-y-2">
|
|
@foreach($openTickets as $ticket)
|
|
<div class="rounded-md border border-gray-100 bg-gray-50 px-3 py-2">
|
|
<div class="text-sm font-medium text-gray-800">#{{ $ticket['id'] }} - {{ $ticket['titolo'] }}</div>
|
|
<div class="text-xs text-gray-600">{{ $ticket['stabile'] }}</div>
|
|
<div class="text-xs text-gray-500">Stato: {{ $ticket['stato'] }} · Priorita: {{ $ticket['priorita'] }}</div>
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
@endif
|
|
</div>
|
|
|
|
<div class="rounded-lg border border-gray-200 p-3 lg:col-span-2">
|
|
<div class="mb-2 text-sm font-semibold text-gray-800">Template Cartelle Drive Condominio</div>
|
|
<div class="mb-2 text-xs text-gray-500">Struttura base replicabile per ogni stabile (allineata alla tua organizzazione in Drive).</div>
|
|
@if(count($driveTemplateFolders) === 0)
|
|
<div class="text-sm text-gray-500">Template non configurato.</div>
|
|
@else
|
|
<div class="grid gap-2 sm:grid-cols-2 lg:grid-cols-3">
|
|
@foreach($driveTemplateFolders as $folder)
|
|
<div class="rounded-md border border-gray-100 bg-gray-50 px-3 py-2 text-xs text-gray-700">{{ $folder }}</div>
|
|
@endforeach
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</x-filament::section>
|
|
</x-filament-widgets::widget>
|