git add .
git commit "fix(assets): self-host Chart.js instead of loading from CDN"
This commit is contained in:
@@ -28,14 +28,21 @@ class DashboardController extends Controller
|
|||||||
->orderBy('date')
|
->orderBy('date')
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
|
$flightViews=Flight::query()
|
||||||
|
->selectRaw('DATE(created_at) as date,SUM(views) as total')
|
||||||
|
->where('created_at','>=',now()->subDays(9))
|
||||||
|
->groupBy('date')
|
||||||
|
->orderBy('date')
|
||||||
|
->get();
|
||||||
|
|
||||||
$logs = ActivityLog::with('admin')
|
$logs = ActivityLog::with('admin')
|
||||||
->latest()
|
->latest()
|
||||||
->take(5)
|
->take(5)
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
return view('admin.dashboard',compact('adminsCount',
|
return view('admin.dashboard',compact('adminsCount',
|
||||||
'usersCount','toursCount','flightsCount','tourViews'
|
'usersCount','toursCount','flightsCount','tourViews',
|
||||||
,'logs'
|
'flightViews','logs'
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Requests\Admin;
|
||||||
|
|
||||||
|
use Illuminate\Contracts\Validation\ValidationRule;
|
||||||
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
|
|
||||||
|
class CityStoreRequest extends FormRequest
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Determine if the user is authorized to make this request.
|
||||||
|
*/
|
||||||
|
public function authorize(): bool
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the validation rules that apply to the request.
|
||||||
|
*
|
||||||
|
* @return array<string, ValidationRule|array<mixed>|string>
|
||||||
|
*/
|
||||||
|
public function rules(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
//
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Requests\Admin;
|
||||||
|
|
||||||
|
use Illuminate\Contracts\Validation\ValidationRule;
|
||||||
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
|
|
||||||
|
class ProvinceStoreRequest extends FormRequest
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Determine if the user is authorized to make this request.
|
||||||
|
*/
|
||||||
|
public function authorize(): bool
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the validation rules that apply to the request.
|
||||||
|
*
|
||||||
|
* @return array<string, ValidationRule|array<mixed>|string>
|
||||||
|
*/
|
||||||
|
public function rules(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
//
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Services;
|
|
||||||
|
|
||||||
class ExcelServices
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Services;
|
|
||||||
|
|
||||||
class ReportServices
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
return[
|
||||||
|
'title'=>'سامانه آژانس هواپیمایی'
|
||||||
|
];
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -20,8 +20,6 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4>
|
<h4>
|
||||||
{{Auth::user()->first_name}}
|
|
||||||
{{Auth::user()->last_name}}
|
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
<span>
|
<span>
|
||||||
|
|||||||
@@ -8,15 +8,12 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
|
|
||||||
@include('account.layout.app')
|
@include('account.layout.app')
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
|
|
||||||
|
|
||||||
@@ -24,41 +21,28 @@
|
|||||||
|
|
||||||
|
|
||||||
<h2 class="account-title">
|
<h2 class="account-title">
|
||||||
نظرات من 💬
|
نظرات من
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@if($comments->count())
|
@if($comments->count())
|
||||||
|
|
||||||
|
|
||||||
<div class="comments-list">
|
<div class="comments-list">
|
||||||
|
|
||||||
|
|
||||||
@foreach($comments as $comment)
|
@foreach($comments as $comment)
|
||||||
|
|
||||||
|
|
||||||
<div class="comment-card">
|
<div class="comment-card">
|
||||||
|
|
||||||
|
|
||||||
<div class="comment-header">
|
<div class="comment-header">
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
<h4>
|
<h4>
|
||||||
{{ $comment->tour->title ?? 'مورد حذف شده' }}
|
{{ $comment->tour->title ?? 'مورد حذف شده' }}
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
|
|
||||||
<span>
|
<span>
|
||||||
{{ $comment->created_at->format('Y/m/d') }}
|
{{ $comment->created_at->format('Y/m/d') }}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="comment-status">
|
<div class="comment-status">
|
||||||
|
|
||||||
@if($comment->status == 1)
|
@if($comment->status == 1)
|
||||||
|
|
||||||
<span class="approved">
|
<span class="approved">
|
||||||
@@ -66,7 +50,6 @@
|
|||||||
</span>
|
</span>
|
||||||
|
|
||||||
@else
|
@else
|
||||||
|
|
||||||
<span class="pending">
|
<span class="pending">
|
||||||
در انتظار تایید
|
در انتظار تایید
|
||||||
</span>
|
</span>
|
||||||
@@ -75,54 +58,32 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="comment-body">
|
<div class="comment-body">
|
||||||
|
|
||||||
{{ $comment->body }}
|
{{ $comment->body }}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@else
|
@else
|
||||||
|
|
||||||
|
|
||||||
<div class="empty-favorite">
|
<div class="empty-favorite">
|
||||||
|
|
||||||
<i class="fa fa-comments"></i>
|
<i class="fa fa-comments"></i>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
هنوز نظری ثبت نکردهاید.
|
هنوز نظری ثبت نکردهاید.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -8,41 +8,30 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
|
|
||||||
@include('account.layout.app')
|
@include('account.layout.app')
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
|
|
||||||
|
|
||||||
<div class="account-content">
|
<div class="account-content">
|
||||||
|
|
||||||
|
|
||||||
<h2 class="account-title">
|
<h2 class="account-title">
|
||||||
علاقهمندیهای من ❤️
|
علاقهمندیهای من
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
@if($favorites->count())
|
@if($favorites->count())
|
||||||
|
|
||||||
|
|
||||||
<div class="favorite-list">
|
<div class="favorite-list">
|
||||||
|
|
||||||
|
|
||||||
@foreach($favorites as $favorite)
|
@foreach($favorites as $favorite)
|
||||||
|
|
||||||
|
|
||||||
<div class="favorite-card">
|
<div class="favorite-card">
|
||||||
|
|
||||||
|
|
||||||
<div class="favorite-info">
|
<div class="favorite-info">
|
||||||
|
|
||||||
|
|
||||||
@if($favorite->favoritable_type == 'App\Models\Tour')
|
@if($favorite->favoritable_type == 'App\Models\Tour')
|
||||||
|
|
||||||
<h3>
|
<h3>
|
||||||
@@ -52,10 +41,8 @@
|
|||||||
تور
|
تور
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
@elseif($favorite->favoritable_type == 'App\Models\Flight')
|
@elseif($favorite->favoritable_type == 'App\Models\Flight')
|
||||||
|
|
||||||
|
|
||||||
<h3>
|
<h3>
|
||||||
{{ $favorite->favoritable->name }}
|
{{ $favorite->favoritable->name }}
|
||||||
</h3>
|
</h3>
|
||||||
@@ -64,42 +51,29 @@
|
|||||||
پرواز
|
پرواز
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<form action="{{route('users.favorite.destroy',$favorite)}}" method="POST">
|
<form action="{{route('users.favorite.destroy',$favorite)}}" method="POST">
|
||||||
|
|
||||||
@csrf
|
@csrf
|
||||||
@method('DELETE')
|
@method('DELETE')
|
||||||
|
|
||||||
|
|
||||||
<button class="remove-favorite">
|
<button class="remove-favorite">
|
||||||
|
|
||||||
<i class="fa fa-trash"></i>
|
<i class="fa fa-trash"></i>
|
||||||
|
|
||||||
حذف
|
حذف
|
||||||
|
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@else
|
@else
|
||||||
|
|
||||||
<div class="empty-favorite">
|
<div class="empty-favorite">
|
||||||
@@ -112,19 +86,13 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
{{-- Sidebar --}}
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
@@ -17,8 +16,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{{-- Profile --}}
|
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
|
|
||||||
<div class="theme-account">
|
<div class="theme-account">
|
||||||
@@ -35,7 +32,6 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@if(session('success'))
|
@if(session('success'))
|
||||||
<div class="alert alert-success">
|
<div class="alert alert-success">
|
||||||
{{ session('success') }}
|
{{ session('success') }}
|
||||||
@@ -59,8 +55,6 @@
|
|||||||
@csrf
|
@csrf
|
||||||
@method('PUT')
|
@method('PUT')
|
||||||
|
|
||||||
|
|
||||||
{{-- Personal Information --}}
|
|
||||||
<div class="theme-account-box">
|
<div class="theme-account-box">
|
||||||
|
|
||||||
<div class="theme-account-box-header">
|
<div class="theme-account-box-header">
|
||||||
@@ -97,7 +91,6 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -122,7 +115,6 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -147,7 +139,6 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -197,7 +188,6 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -228,8 +218,6 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{{-- Gender & Marital Status --}}
|
|
||||||
<div class="theme-account-box">
|
<div class="theme-account-box">
|
||||||
|
|
||||||
<div class="theme-account-box-header">
|
<div class="theme-account-box-header">
|
||||||
@@ -371,8 +359,6 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{{-- Location --}}
|
|
||||||
<div class="theme-account-box">
|
<div class="theme-account-box">
|
||||||
|
|
||||||
<div class="theme-account-box-header">
|
<div class="theme-account-box-header">
|
||||||
@@ -453,7 +439,6 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{{-- Profile Image --}}
|
|
||||||
<div class="theme-account-box">
|
<div class="theme-account-box">
|
||||||
|
|
||||||
<div class="theme-account-box-header">
|
<div class="theme-account-box-header">
|
||||||
@@ -504,8 +489,6 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{{-- Password --}}
|
|
||||||
<div class="theme-account-box">
|
<div class="theme-account-box">
|
||||||
|
|
||||||
<div class="theme-account-box-header">
|
<div class="theme-account-box-header">
|
||||||
@@ -601,8 +584,6 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{{-- Submit --}}
|
|
||||||
<div class="text-left">
|
<div class="text-left">
|
||||||
|
|
||||||
<button
|
<button
|
||||||
@@ -627,7 +608,6 @@
|
|||||||
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
|
|
||||||
@push('scripts')
|
@push('scripts')
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th>
|
<th>
|
||||||
کاربر
|
مدیر
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th>
|
<th>
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
{{ $log->admin->name ?? '-' }}
|
{{ $log->admin->first_name ?? '-' }}
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -109,7 +109,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th>کاربر</th>
|
<th>مدیر</th>
|
||||||
<th>عملیات</th>
|
<th>عملیات</th>
|
||||||
<th>بخش</th>
|
<th>بخش</th>
|
||||||
<th>تاریخ</th>
|
<th>تاریخ</th>
|
||||||
@@ -124,7 +124,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
{{ $log->admin->name ?? '-' }}
|
{{ $log->admin->first_name ?? '-' }}
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
@@ -164,18 +164,28 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<canvas id="viewsChart" height="100"></canvas>
|
<canvas id="tourViewsChart" height="100"></canvas>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="card-header bg-white fw-bold">
|
||||||
|
|
||||||
|
نمودار بازدید پروازها در ۱۰ روز اخیر
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-body">
|
||||||
|
<canvas id="flightViewsChart" height="100"></canvas>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
<script src="{{asset('assets/js/chart.js')}}"></script>
|
||||||
<script>
|
<script>
|
||||||
const ctx = document.getElementById('viewsChart');
|
const tourChart = document.getElementById('tourViewsChart');
|
||||||
|
|
||||||
new Chart(ctx, {
|
new Chart(tourChart, {
|
||||||
|
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
|
|
||||||
@@ -191,6 +201,42 @@
|
|||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
options: {
|
||||||
|
responsive:true,
|
||||||
|
|
||||||
|
plugins:{
|
||||||
|
|
||||||
|
legend:{
|
||||||
|
|
||||||
|
position:'top'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
scales:{
|
||||||
|
|
||||||
|
y:{
|
||||||
|
beginAtZero:true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const flightChart = document.getElementById('flightViewsChart');
|
||||||
|
|
||||||
|
new Chart(flightChart, {
|
||||||
|
|
||||||
|
type: 'bar',
|
||||||
|
|
||||||
|
data: {
|
||||||
|
labels: @json($flightViews->pluck('date')),
|
||||||
|
|
||||||
|
datasets: [{
|
||||||
|
|
||||||
|
label: 'بازدید پرواز ها',
|
||||||
|
|
||||||
|
data: @json($flightViews->pluck('total')),
|
||||||
|
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
|
||||||
options: {
|
options: {
|
||||||
responsive:true,
|
responsive:true,
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
<script src="{{asset('assets/js/fitvid.js')}}"></script>
|
<script src="{{asset('assets/js/fitvid.js')}}"></script>
|
||||||
<script src="{{asset('assets/js/youtube-bg.js')}}"></script>
|
<script src="{{asset('assets/js/youtube-bg.js')}}"></script>
|
||||||
<script src="{{asset('assets/js/custom.js')}}"></script>
|
<script src="{{asset('assets/js/custom.js')}}"></script>
|
||||||
<script async="" defer="" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDYeBBmgAkyAN_QKjAVOiP_kWZ_eQdadeI&callback=initMap&libraries=places"></script>
|
<script async="" defer="" src="{{asset('assets/js/js.js')}}"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user