156 lines
10 KiB
PHP
156 lines
10 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 sono salvati nella scheda amministratore. Gli interni PBX dei collaboratori sono usati per instradamento SMDR/post-it.</div>
|
|
|
|
<div class="grid grid-cols-1 gap-2 md:grid-cols-4">
|
|
<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.note_instradamento" class="rounded-md border-gray-300 text-xs" 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">Operazioni distribuzione, backup e sincronizzazione</div>
|
|
<div class="flex flex-wrap items-center gap-2">
|
|
<x-filament::button type="button" color="warning" wire:click="runProductionUpgrade">Aggiorna produzione</x-filament::button>
|
|
<x-filament::button type="button" color="primary" wire:click="runBuildProdUpdatePackage">Crea pacchetto aggiornamento</x-filament::button>
|
|
<x-filament::button type="button" color="gray" wire:click="downloadLastUpdatePackage">Scarica ultimo pacchetto</x-filament::button>
|
|
<x-filament::button type="button" color="gray" wire:click="reviewUsersToEnable">Controlla nuovi utenti</x-filament::button>
|
|
<x-filament::button type="button" color="success" wire:click="runBackupProductionData">Backup produzione</x-filament::button>
|
|
<x-filament::button type="button" color="success" wire:click="runBackupModifiedDataToGdrive">Backup incrementale dati su Drive</x-filament::button>
|
|
<x-filament::button type="button" color="info" wire:click="runGoogleDriveCheck">Verifica Google Drive</x-filament::button>
|
|
<x-filament::button type="button" color="info" wire:click="runRestoreDataNonDistruttivo">Restore dati non distruttivo</x-filament::button>
|
|
<x-filament::button type="button" color="primary" wire:click="runSyncProdUpdate">Sync aggiornamenti + archivi</x-filament::button>
|
|
<x-filament::button type="button" color="success" wire:click="connectGoogle">Collega Google</x-filament::button>
|
|
<x-filament::button type="button" color="danger" wire:click="disconnectGoogle">Scollega Google</x-filament::button>
|
|
</div>
|
|
|
|
@if(filled($this->lastUpdatePackageName))
|
|
<div class="mt-3 rounded-lg border border-primary-200 bg-primary-50 p-3 text-sm text-primary-700">
|
|
Ultimo pacchetto aggiornamento: <strong>{{ $this->lastUpdatePackageName }}</strong>
|
|
</div>
|
|
@endif
|
|
|
|
@if(filled($this->opsLastOutput))
|
|
<div class="mt-3 rounded-lg border border-gray-200 bg-gray-50 p-3">
|
|
<div class="mb-2 text-sm font-semibold text-gray-700">Output operazioni</div>
|
|
<pre class="max-h-72 overflow-auto whitespace-pre-wrap text-xs text-gray-800">{{ $this->opsLastOutput }}</pre>
|
|
</div>
|
|
@endif
|
|
</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>
|