Commit awal: prototipe UI SIAKAD Untan
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
@php
|
||||
$tgl = fn (string $w): string => \Illuminate\Support\Carbon::parse($w)->locale('id')->isoFormat('D MMM, HH.mm');
|
||||
@endphp
|
||||
|
||||
<x-layouts.app title="Sesi aktif">
|
||||
<x-ui.page-header title="Sesi aktif" description="Perangkat yang sedang masuk ke SIAKAD. Akhiri sesi yang tidak dikenali.">
|
||||
<x-slot:actions>
|
||||
<x-ui.confirm
|
||||
:action="route('superuser.sesi-aktif.akhiri-semua')"
|
||||
method="DELETE"
|
||||
title="Akhiri semua sesi lain?"
|
||||
message="Semua pengguna selain Anda akan keluar dan harus masuk kembali."
|
||||
trigger-label="Akhiri semua sesi lain"
|
||||
confirm-label="Ya, akhiri semua"
|
||||
tone="danger"
|
||||
variant="secondary"
|
||||
icon="x-mark"
|
||||
/>
|
||||
</x-slot:actions>
|
||||
</x-ui.page-header>
|
||||
|
||||
<x-glass.panel padding="none">
|
||||
<x-ui.table label="Daftar sesi login aktif">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Pengguna</th>
|
||||
<th scope="col">Perangkat</th>
|
||||
<th scope="col">Alamat IP</th>
|
||||
<th scope="col">Mulai</th>
|
||||
<th scope="col">Aktivitas terakhir</th>
|
||||
<th scope="col" class="table__actions"><span class="visually-hidden">Aksi</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($sesi as $s)
|
||||
<tr>
|
||||
<td>
|
||||
<span class="table__title">{{ $s['nama'] }}</span>
|
||||
<span class="table__meta block">{{ $s['username'] }} ({{ $s['role'] }})</span>
|
||||
</td>
|
||||
<td>{{ $s['perangkat'] }}</td>
|
||||
<td>{{ $s['ip'] }}@if ($s['lokasi'] !== '-'), {{ $s['lokasi'] }}@endif</td>
|
||||
<td>{{ $tgl($s['mulai']) }}</td>
|
||||
<td>{{ $tgl($s['terakhir']) }}</td>
|
||||
<td class="table__actions">
|
||||
@if ($s['saat_ini'] ?? false)
|
||||
<x-ui.badge tone="success">Sesi ini</x-ui.badge>
|
||||
@else
|
||||
<x-ui.confirm
|
||||
class="inline-flex"
|
||||
:action="route('superuser.sesi-aktif.destroy', $s['id'])"
|
||||
method="DELETE"
|
||||
title="Akhiri sesi ini?"
|
||||
:message="$s['nama'].' akan keluar dari '.$s['perangkat'].'.'"
|
||||
trigger-label="Akhiri"
|
||||
confirm-label="Ya, akhiri"
|
||||
tone="danger"
|
||||
icon="x-mark"
|
||||
/>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</x-ui.table>
|
||||
</x-glass.panel>
|
||||
</x-layouts.app>
|
||||
Reference in New Issue
Block a user