minor fixes

This commit is contained in:
Jagad R R
2025-01-02 18:21:03 +07:00
parent 8255a530af
commit 0c052f379a
8 changed files with 935 additions and 913 deletions
@@ -33,50 +33,52 @@
<div class="clearfix"></div>
<div class="data-tables">
@include('backend.layouts.partials.messages')
<table id="dataTable" class="text-center">
<thead class="bg-light text-capitalize">
<tr>
<th width="5%">{{ __('User') }}</th>
<th width="5%">{{ __('Ip Address') }}</th>
<th width="5%">{{ __('Action') }}</th>
<th width="15%">{{ __('Activity') }}</th>
<th width="5%">Browser</th>
<th width="15%">User Agent</th>
<th width="5%">Tanggal</th>
<th width="5%">Waktu</th>
</tr>
</thead>
<tbody>
@foreach ($data as $item)
<div class="table-responsive">
<table id="dataTable" class="text-center">
<thead class="bg-light text-capitalize">
<tr>
<td>
{{ $item->user ? $item->user->username : preg_replace('/\).*$/', '', explode('(', $item->activity)[1]) }}
</td>
<td>{{ $item->ip_address }}</td>
<td>
@php
$color = 'info';
if ($item->action == 'Create') {
$color = 'success';
} elseif ($item->action == 'Update') {
$color = 'warning';
} elseif ($item->action == 'Delete') {
$color = 'danger';
}
@endphp
<div class="badge badge-{{ $color }} text-white">
{{ $item->action }}
</div>
</td>
<td>{{ $item->activity }}</td>
<td>{{ $item->browser }}</td>
<td>{{ $item->user_agent }}</td>
<td>{{ $item->created_at }}</td>
<td>{{ $item->created_at->diffForHumans() }}</td>
<th width="5%">{{ __('User') }}</th>
<th width="5%">{{ __('Ip Address') }}</th>
<th width="5%">{{ __('Action') }}</th>
<th width="15%">{{ __('Activity') }}</th>
<th width="5%">Browser</th>
<th width="15%">User Agent</th>
<th width="5%">Tanggal</th>
<th width="5%">Waktu</th>
</tr>
@endforeach
</tbody>
</table>
</thead>
<tbody>
@foreach ($data as $item)
<tr>
<td>
{{ $item->user ? $item->user->username : preg_replace('/\).*$/', '', explode('(', $item->activity)[1]) }}
</td>
<td>{{ $item->ip_address }}</td>
<td>
@php
$color = 'info';
if ($item->action == 'Create') {
$color = 'success';
} elseif ($item->action == 'Update') {
$color = 'warning';
} elseif ($item->action == 'Delete') {
$color = 'danger';
}
@endphp
<div class="badge badge-{{ $color }} text-white">
{{ $item->action }}
</div>
</td>
<td>{{ $item->activity }}</td>
<td>{{ $item->browser }}</td>
<td>{{ $item->user_agent }}</td>
<td>{{ $item->created_at }}</td>
<td>{{ $item->created_at->diffForHumans() }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
@@ -91,7 +93,7 @@
$(document).ready(function () {
if ($('#dataTable').length) {
$('#dataTable').DataTable({
responsive: true,
responsive: false,
dom: 'Bfrtip',
buttons: [
'excel', 'pdf', 'print'