first
This commit is contained in:
36
resources/views/admin/audit/index.blade.php
Normal file
36
resources/views/admin/audit/index.blade.php
Normal file
@@ -0,0 +1,36 @@
|
||||
@extends('layouts.app')
|
||||
@section('title', 'Audit Trail')
|
||||
|
||||
@section('content')
|
||||
<form class="mb-3" method="GET">
|
||||
<div class="input-group" style="max-width:360px;">
|
||||
<select name="action" class="form-select">
|
||||
<option value="">Semua Tindakan</option>
|
||||
@foreach($actions as $a)<option value="{{ $a }}" @selected($action===$a)>{{ $a }}</option>@endforeach
|
||||
</select>
|
||||
<button class="btn btn-teal"><i class="bi bi-funnel"></i></button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="card"><div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-koipb table-hover align-middle">
|
||||
<thead><tr><th>Masa</th><th>Pengguna</th><th>Tindakan</th><th>Keterangan</th><th>IP</th></tr></thead>
|
||||
<tbody>
|
||||
@forelse($logs as $log)
|
||||
<tr>
|
||||
<td><small>{{ $log->created_at->format('d/m/Y H:i:s') }}</small></td>
|
||||
<td>{{ $log->user?->name ?? 'Sistem' }}</td>
|
||||
<td><span class="badge bg-dark2">{{ $log->action }}</span></td>
|
||||
<td>{{ $log->description }}</td>
|
||||
<td><small class="text-muted">{{ $log->ip_address ?? '-' }}</small></td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr><td colspan="5" class="text-center text-muted py-4">Tiada rekod audit.</td></tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{ $logs->links() }}
|
||||
</div></div>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user