feat:add veriyfying email

This commit is contained in:
2026-08-22 14:09:44 +03:30
parent 47cfa0c1b0
commit 62a470d77d
3 changed files with 207 additions and 8 deletions
@@ -0,0 +1,163 @@
@extends('admin.layouts.app')
@section('breadcrumb')
<div>
<p class="fw-medium fs-18 mb-0">
تاریخچه‌ی تغییرات
</p>
<p class="fs-13 text-muted mb-0">
مشاهده‌ی کلیه‌ی تغییرات ثبت‌شده روی تورها و پروازها
</p>
</div>
@endsection
@section('content')
<div class="container-fluid pt-4">
<div class="card custom-card">
<div class="card-header">
<div class="card-title">
فهرست تغییرات
</div>
</div>
<div class="card-body">
{{-- فرم فیلتر --}}
<form method="GET" class="row gy-2 mb-3">
<div class="col-xl-3">
<select name="model_type" class="form-control" onchange="this.form.submit()">
<option value="">همه‌ی موارد</option>
<option value="App\Models\Tour" @selected(request('model_type') === 'App\Models\Tour')>
تور
</option>
<option value="App\Models\Flight" @selected(request('model_type') === 'App\Models\Flight')>
پرواز
</option>
</select>
</div>
<div class="col-xl-3">
<select name="action" class="form-control" onchange="this.form.submit()">
<option value="">همه‌ی عملیات</option>
<option value="created" @selected(request('action') === 'created')>
ایجاد
</option>
<option value="updated" @selected(request('action') === 'updated')>
ویرایش
</option>
</select>
</div>
@if(request()->filled('model_type') || request()->filled('action'))
<div class="col-xl-2">
<a href="{{ route('admin.activity-logs.index') }}" class="btn btn-light w-100">
حذف فیلتر
</a>
</div>
@endif
</form>
<div class="table-responsive">
<table class="table table-bordered">
<thead>
<tr>
<th>نوع</th>
<th>عنوان</th>
<th>عملیات</th>
<th>کاربر</th>
<th>تاریخ</th>
<th>تغییرات</th>
</tr>
</thead>
<tbody>
@forelse($logs as $log)
<tr>
<td>
<span class="badge bg-secondary">
{{ $log->model_label }}
</span>
</td>
<td>
@if($log->model_edit_route)
<a href="{{ $log->model_edit_route }}">
{{ $log->model_title }}
</a>
@else
{{ $log->model_title }}
@endif
</td>
<td>
@if($log->action === 'created')
<span class="badge bg-success">ایجاد</span>
@else
<span class="badge bg-primary">ویرایش</span>
@endif
</td>
<td>
{{ $log->admin?->first_name }}
{{ $log->admin?->last_name }}
</td>
<td>
{{ $log->created_at->format('Y-m-d H:i') }}
</td>
<td>
@if($log->action === 'updated' && is_array($log->changes))
<ul class="mb-0 ps-3 fs-12">
@foreach($log->changes as $field => $value)
<li>
<strong>{{ $field }}:</strong>
{{ $value['old'] }}
←
{{ $value['new'] }}
</li>
@endforeach
</ul>
@else
ایجاد رکورد جدید
@endif
</td>
</tr>
@empty
<tr>
<td colspan="6" class="text-center">
هیچ تغییری ثبت نشده است.
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
{{ $logs->links() }}
</div>
</div>
</div>
@endsection