netgescon-day0/resources/views/filament/pages/impostazioni/partials/scheda-amministratore-operativita-accessi.blade.php

131 lines
8.7 KiB
PHP

<div class="space-y-4">
<div class="rounded-lg border border-gray-200 bg-white p-3">
<div class="mb-2 text-sm font-semibold text-gray-700">Centralino studio e interni collaboratori</div>
<div class="mb-3 text-xs text-gray-500">I numeri studio e gli interni PBX/CSTA sono salvati qui. Gli interni condivisi del centralino permettono di instradare popup e chiamate anche quando il PBX espone gruppi giorno/notte invece dell'interno personale.</div>
<div class="grid grid-cols-1 gap-2 md:grid-cols-3">
<input type="text" wire:model.defer="data.impostazioni.centralino.numero_principale" class="rounded-md border-gray-300 text-xs" placeholder="Numero principale centralino" />
<input type="text" wire:model.defer="data.impostazioni.centralino.numero_backup" class="rounded-md border-gray-300 text-xs" placeholder="Numero backup" />
<input type="text" wire:model.defer="data.impostazioni.centralino.numero_emergenza" class="rounded-md border-gray-300 text-xs" placeholder="Numero emergenza" />
<input type="text" wire:model.defer="data.impostazioni.centralino.interno_centralino" class="rounded-md border-gray-300 text-xs" placeholder="Interno centralino, es. 201" />
<input type="text" wire:model.defer="data.impostazioni.centralino.interno_operatore" class="rounded-md border-gray-300 text-xs" placeholder="Interno operatore, es. 205" />
<input type="text" wire:model.defer="data.impostazioni.centralino.interno_amministratore" class="rounded-md border-gray-300 text-xs" placeholder="Interno amministratore, es. 206" />
<input type="text" wire:model.defer="data.impostazioni.centralino.interno_gruppo_giorno" class="rounded-md border-gray-300 text-xs" placeholder="Gruppo giorno, es. 601" />
<input type="text" wire:model.defer="data.impostazioni.centralino.interno_gruppo_notte" class="rounded-md border-gray-300 text-xs" placeholder="Gruppo notte, es. 603" />
<input type="text" wire:model.defer="data.impostazioni.centralino.note_instradamento" class="rounded-md border-gray-300 text-xs md:col-span-3" placeholder="Note instradamento" />
</div>
<div class="mt-3 overflow-x-auto">
<table class="min-w-full border-collapse border text-xs">
<thead>
<tr class="bg-slate-100 text-slate-700">
<th class="border px-2 py-1.5 text-left">Collaboratore</th>
<th class="border px-2 py-1.5 text-left">Email</th>
<th class="border px-2 py-1.5 text-left">Ruoli</th>
<th class="border px-2 py-1.5 text-left">Interno PBX</th>
<th class="border px-2 py-1.5 text-left">Flags PBX</th>
<th class="border px-2 py-1.5 text-left">Azioni</th>
</tr>
</thead>
<tbody>
@forelse($this->collaboratoriCentralinoRows as $row)
<tr class="hover:bg-slate-50">
<td class="border px-2 py-1.5">{{ $row['name'] }}</td>
<td class="border px-2 py-1.5">{{ $row['email'] }}</td>
<td class="border px-2 py-1.5">{{ count($row['ruoli']) > 0 ? implode(', ', $row['ruoli']) : '-' }}</td>
<td class="border px-2 py-1.5">
<input type="text" wire:model.defer="collaboratorePbxExtension.{{ (int) $row['user_id'] }}" class="w-24 rounded-md border-gray-300 text-xs" placeholder="Es. 101" />
</td>
<td class="border px-2 py-1.5">
popup={{ $row['pbx_popup_enabled'] ? 'on' : 'off' }} · click2call={{ $row['pbx_click_to_call_enabled'] ? 'on' : 'off' }}
</td>
<td class="border px-2 py-1.5">
<x-filament::button size="xs" color="gray" type="button" wire:click="salvaInternoCollaboratore({{ (int) $row['user_id'] }})">Salva interno</x-filament::button>
</td>
</tr>
@empty
<tr>
<td colspan="6" class="border px-2 py-3 text-center text-gray-500">Nessun collaboratore assegnato agli stabili di questo amministratore.</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>
<div class="rounded-lg border border-gray-200 bg-white p-3">
<div class="mb-2 text-sm font-semibold text-gray-700">Nuovi utenti da abilitare (risultato controllo)</div>
<div class="overflow-x-auto">
<table class="min-w-full border-collapse border text-xs">
<thead>
<tr class="bg-slate-100 text-slate-700">
<th class="border px-2 py-1.5 text-left">ID</th>
<th class="border px-2 py-1.5 text-left">Email</th>
<th class="border px-2 py-1.5 text-left">Nome</th>
<th class="border px-2 py-1.5 text-left">Ruoli</th>
<th class="border px-2 py-1.5 text-left">Flags</th>
<th class="border px-2 py-1.5 text-left">Creato</th>
</tr>
</thead>
<tbody>
@forelse($this->pendingUsersReviewRows as $row)
<tr class="hover:bg-slate-50">
<td class="border px-2 py-1.5">{{ $row['id'] }}</td>
<td class="border px-2 py-1.5">{{ $row['email'] }}</td>
<td class="border px-2 py-1.5">{{ $row['name'] }}</td>
<td class="border px-2 py-1.5">{{ $row['roles'] }}</td>
<td class="border px-2 py-1.5">{{ $row['flags'] }}</td>
<td class="border px-2 py-1.5">{{ $row['created'] }}</td>
</tr>
@empty
<tr>
<td colspan="6" class="border px-2 py-3 text-center text-gray-500">Nessun dato disponibile. Usa il pulsante "Controlla nuovi utenti".</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>
<div class="rounded-lg border border-gray-200 bg-white p-3">
<div class="mb-2 text-sm font-semibold text-gray-700">Gestione accessi gruppo amministratore</div>
<div class="mb-3 text-xs text-gray-500">Reset password temporanee per utenti del gruppo amministratore.</div>
@if(filled($this->lastGeneratedPassword))
<div class="mb-3 rounded-md border border-amber-300 bg-amber-50 px-3 py-2 text-xs text-amber-900">
Ultima password temporanea generata: <span class="font-mono font-semibold">{{ $this->lastGeneratedPassword }}</span>
</div>
@endif
<div class="mb-4 overflow-x-auto">
<div class="mb-1 text-xs font-semibold text-gray-700">Utenti gruppo amministratore</div>
<table class="min-w-full border-collapse border text-xs">
<thead>
<tr class="bg-slate-100 text-slate-700">
<th class="border px-2 py-1.5 text-left">Nome</th>
<th class="border px-2 py-1.5 text-left">Email</th>
<th class="border px-2 py-1.5 text-left">Ruoli</th>
<th class="border px-2 py-1.5 text-left">Azioni</th>
</tr>
</thead>
<tbody>
@forelse($this->accessoAmministratoreRows as $row)
<tr class="hover:bg-slate-50">
<td class="border px-2 py-1.5">{{ $row['name'] }}</td>
<td class="border px-2 py-1.5">{{ $row['email'] }}</td>
<td class="border px-2 py-1.5">{{ count($row['ruoli']) > 0 ? implode(', ', $row['ruoli']) : '-' }}</td>
<td class="border px-2 py-1.5">
<x-filament::button size="xs" color="warning" type="button" wire:click="resetPasswordUtente({{ (int) $row['user_id'] }})">Reset password</x-filament::button>
</td>
</tr>
@empty
<tr>
<td colspan="4" class="border px-2 py-3 text-center text-gray-500">Nessun utente amministratore trovato.</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>
</div>