git add .

git commit "feat: implement activity logging for tours and flights"
This commit is contained in:
2026-08-19 14:59:26 +03:30
parent 7cf68cc02f
commit 4d8839e802
9 changed files with 326 additions and 3 deletions
@@ -0,0 +1,182 @@
@extends('admin.layouts.app')
@section('breadcrumb')
<span>
گزارش فعالیت‌ها
</span>
@endsection
@section('content')
<div class="container mt-4">
<div class="card shadow">
<div class="card-body">
<h5 class="mb-4">
گزارش تغییرات سیستم
</h5>
<div class="table-responsive">
<table class="table table-bordered text-center align-middle">
<thead class="table-light">
<tr>
<th>
شناسه
</th>
<th>
کاربر
</th>
<th>
عملیات
</th>
<th>
بخش
</th>
<th>
شناسه مورد
</th>
<th>
توضیحات
</th>
<th>
تاریخ
</th>
</tr>
</thead>
<tbody>
@forelse($logs as $log)
<tr>
<td>
{{ $loop->iteration }}
</td>
<td>
{{ $log->admin->name ?? '-' }}
</td>
<td>
@switch($log->action)
@case('create')
<span class="badge bg-success">
ایجاد
</span>
@break
@case('update')
<span class="badge bg-warning">
ویرایش
</span>
@break
@case('delete')
<span class="badge bg-danger">
حذف
</span>
@break
@default
{{ $log->action }}
@endswitch
</td>
<td>
@if($log->model == 'Flight')
پرواز
@elseif($log->model == 'Tour')
تور
@else
{{ $log->model }}
@endif
</td>
<td>
{{ $log->model_id }}
</td>
<td>
{{ $log->description }}
</td>
<td>
{{ $log->created_at->toJalali()->format('Y/m/d H:i') }}
</td>
</tr>
@empty
<tr>
<td colspan="7">
موردی یافت نشد
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
{{ $logs->links() }}
</div>
</div>
</div>
@endsection
@@ -70,6 +70,16 @@
</li>
<li class="nav-item mb-2">
<a href="{{ route('admin.activity-logs.index') }}"
class="nav-link text-white">
گزارش فعالیت ها
</a>
</li>