89 lines
4.6 KiB
PHP
89 lines
4.6 KiB
PHP
@extends('administrator.layout.master')
|
|
|
|
@section('content')
|
|
<div class="d-flex justify-content-between align-items-center flex-wrap grid-margin">
|
|
<div>
|
|
<h4 class="mb-3 mb-md-0">{{ $title ?? 'System Activity Log' }}</h4>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-12 grid-margin stretch-card">
|
|
@if (auth()->guard('admins')->user()->can('manager system log'))
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<div class="table-responsive">
|
|
<table class="table table-bordered table-hover">
|
|
<colgroup>
|
|
<col width="15%">
|
|
<col width="45%">
|
|
<col width="20%">
|
|
<col width="10%">
|
|
<col width="10%">
|
|
</colgroup>
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">Date</th>
|
|
<th scope="col">Description</th>
|
|
<th scope="col">Customer</th>
|
|
<th scope="col">Username</th>
|
|
<th scope="col">Client IP</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@if (count($logs) > 0)
|
|
@foreach ($logs->all() as $item)
|
|
<tr>
|
|
<td>
|
|
{{ $item->created_at }}
|
|
</td>
|
|
<td class="text-wrap">
|
|
{{ $item->description }}
|
|
</td>
|
|
<td>
|
|
@if ($item->Customer)
|
|
<a href="{{ route('customer.info', ['userid' => $item->customer_id]) }}">
|
|
Customer Code {{ $item->customer_id }}
|
|
</a>
|
|
<br>
|
|
<small class="text-muted">{{ $item->customer->email }}</small>
|
|
@else
|
|
<span class="text-muted">None</span>
|
|
@endif
|
|
</td>
|
|
<td class="text-center">
|
|
{{ $item->username }}
|
|
</td>
|
|
<td class="text-center">
|
|
{{ $item->client_ip }}
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
@else
|
|
<tr>
|
|
<td colspan="5" class="text-center py-4">
|
|
No Records Found
|
|
</td>
|
|
</tr>
|
|
@endif
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="card-footer">
|
|
{{ $logs->withQueryString()->links() }}
|
|
</div>
|
|
</div>
|
|
@else
|
|
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
|
<div class="d-flex align-items-center">
|
|
<i data-lucide="ban" class="me-2"></i>
|
|
<h5 class="mb-0">Access Denied - You are not assigned to System Log</h5>
|
|
</div>
|
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
@endsection
|