diff --git a/app/Enums/BookingStatus.php b/app/Enums/BookingStatus.php new file mode 100644 index 0000000..e13fbe6 --- /dev/null +++ b/app/Enums/BookingStatus.php @@ -0,0 +1,10 @@ + + +
+ + @error('') + {{ $message }} + @enderror + +
+ + + +
+ + @forelse($bookings as $booking) + +
+ +
+ +
+ + @if($booking->flight) + +
+ + + رزرو پرواز + +
+ +
+ {{ $booking->flight->title }} +
+ +

+ قیمت: + {{ number_format($booking->flight->price) }} + تومان +

+ + @if($booking->flight->departureAirport) +

+ مبدا: + {{ $booking->flight->departureAirport->city->name }} +

+ @endif + + @if($booking->flight->arrivalAirport) +

+ مقصد: + {{ $booking->flight->arrivalAirport->city->name }} +

+ @endif + + + + @elseif($booking->tour) + +
+ + + رزرو تور + +
+ +
+ {{ $booking->tour->title }} +
+ +

+ قیمت: + {{ number_format($booking->tour->price) }} + تومان +

+ +

+ مبدا: + {{ $booking->tour->origin }} +

+ +

+ مقصد: + {{ $booking->tour->destination }} +

+ + @endif + + + + + وضعیت رزرو: + + @if($booking->status === \App\Enums\BookingStatus::PENDING) + در انتظار تأیید + + @elseif($booking->status === \App\Enums\BookingStatus::CONFIRMED) + تأیید شده + + @elseif($booking->status === \App\Enums\BookingStatus::CANCELLED) + لغو شده + @endif + + +
+ + + + کد پیگیری: + {{ $booking->tracking_code }} + + +
+ + + + تاریخ رزرو: + {{ $booking->created_at->toJalali()->format('Y/m/d') }} + + +
+ +
+ +
+ + @empty + +
+ +
+ + + +
+ هنوز رزروی ندارید. +
+ +

+ رزروهای پرواز و تور شما در این قسمت نمایش داده می‌شوند. +

+ +
+ +
+ + @endforelse + +
+ + + {{-- Pagination --}} + @if($bookings->hasPages()) + +
+ + {{ $bookings->links() }} + +
+ + @endif + +
+ +
+ + + +@endsection + diff --git a/resources/views/admin/activity-logs/index.blade.php b/resources/views/admin/activity-logs/index.blade.php new file mode 100644 index 0000000..eb1612b --- /dev/null +++ b/resources/views/admin/activity-logs/index.blade.php @@ -0,0 +1,3 @@ +@extends('admin.layouts.app') +@section('breadcrumb')

لاگ تغییرات

ثبت چه کسی، چه زمانی و چه تغییری روی اطلاعات پرواز و تور
@endsection +@section('content')
@forelse(($logs ?? []) as $log)@empty@endforelse
مدیربخشعملیاتشرح تغییرتاریخ
{{ $log->admin->first_name ?? '-' }} {{ $log->admin->last_name ?? '' }}{{ $log->subject_type ?? '-' }}{{ $log->action ?? '-' }}{{ $log->description ?? '-' }}{{ isset($log->created_at) ? $log->created_at->toJalali()->format('Y/m/d H:i') : '-' }}
لاگی برای نمایش وجود ندارد.
{{ ($logs ?? collect())->links() }}
@endsection diff --git a/resources/views/admin/admins/create.blade.php b/resources/views/admin/admins/create.blade.php new file mode 100644 index 0000000..3ac2129 --- /dev/null +++ b/resources/views/admin/admins/create.blade.php @@ -0,0 +1,14 @@ +@extends('admin.layouts.app') +@section('breadcrumb')

ایجاد مدیر

اطلاعات مدیر سامانه
@endsection +@section('content')
@include('admin.partials.errors') +
@csrf @if(isset($admin)) @method('PUT') @endif +
اطلاعات مدیر
+
+
+
+
+
+
+
دسترسی مدیر
جدول فعلی admins ستون دسترسی ندارد. برای فعال‌سازی واقعی دسترسی‌ها باید جدول permissions/roles اضافه شود.
+
+
@endsection diff --git a/resources/views/admin/admins/edit.blade.php b/resources/views/admin/admins/edit.blade.php new file mode 100644 index 0000000..efdaa3a --- /dev/null +++ b/resources/views/admin/admins/edit.blade.php @@ -0,0 +1,14 @@ +@extends('admin.layouts.app') +@section('breadcrumb')

{{ isset($admin) ? 'ویرایش مدیر' : 'ایجاد مدیر' }}

اطلاعات مدیر سامانه
@endsection +@section('content')
@include('admin.partials.errors') +
@csrf @if(isset($admin)) @method('PUT') @endif +
اطلاعات مدیر
+
+
+
+
+
+
+
دسترسی مدیر
جدول فعلی admins ستون دسترسی ندارد. برای فعال‌سازی واقعی دسترسی‌ها باید جدول permissions/roles اضافه شود.
+
+
@endsection diff --git a/resources/views/admin/admins/index.blade.php b/resources/views/admin/admins/index.blade.php new file mode 100644 index 0000000..1366fe4 --- /dev/null +++ b/resources/views/admin/admins/index.blade.php @@ -0,0 +1,10 @@ +@extends('admin.layouts.app') +@section('breadcrumb')

مدیریت مدیران سایت

تعریف مدیر، فعال/غیرفعال‌سازی و مدیریت دسترسی
@endsection +@section('content')
+@include('admin.partials.errors') +
+
+@forelse(($admins ?? []) as $admin) +@empty@endforelse
مدیرایمیلوضعیتآخرین ورودتاریخ ثبتعملیات
{{ $admin->first_name }} {{ $admin->last_name }}
#{{ $admin->id }}
{{ $admin->email }}@if($admin->status)فعال@elseغیرفعال@endif{{ isset($admin->last_login_at) && $admin->last_login_at ? $admin->last_login_at->toJalali()->format('Y/m/d H:i') : '-' }}{{ isset($admin->created_at) ? $admin->created_at->toJalali()->format('Y/m/d H:i') : '-' }}
@csrf @method('DELETE')
مدیری ثبت نشده است.
+{{ ($admins ?? collect())->links() }} +
@endsection diff --git a/resources/views/admin/bookings/index.blade.php b/resources/views/admin/bookings/index.blade.php new file mode 100644 index 0000000..78b7901 --- /dev/null +++ b/resources/views/admin/bookings/index.blade.php @@ -0,0 +1,3 @@ +@extends('admin.layouts.app') +@section('breadcrumb')

مدیریت رزروها

مشاهده و پیگیری رزروهای پرواز و تور
@endsection +@section('content')
@forelse(($bookings ?? []) as $booking)@empty@endforelse
کد رهگیریکاربرنوعتعداد مسافرمبلغوضعیتتاریخ
{{ $booking->tracking_code }}{{ $booking->user->first_name ?? '' }} {{ $booking->user->last_name ?? '' }}{{ $booking->flight_id ? 'پرواز' : 'تور' }}{{ ($booking->adult_count ?? 0)+($booking->child_count ?? 0) }}{{ number_format($booking->total_price) }} تومان{{ $booking->status->name ?? $booking->status }}{{ $booking->created_at?->toJalali()->format('Y/m/d H:i') }}
رزروی ثبت نشده است.
{{ ($bookings ?? collect())->links() }}
@endsection diff --git a/resources/views/admin/categories/create.blade.php b/resources/views/admin/categories/create.blade.php new file mode 100644 index 0000000..e044e2f --- /dev/null +++ b/resources/views/admin/categories/create.blade.php @@ -0,0 +1,71 @@ +@extends('admin.layouts.app') + +@section('content') +
+
+ + +
+
+ @error('general') + {{ $message }} + @enderror + +
+ @csrf +
+
+
ایجاد دسته‌بندی
+
+ +
+ +
+
+ + + @error('name') + {{ $message }} + @enderror +
+ +
+ + + @error('description') + {{ $message }} + @enderror +
+
+ +
+
+ + + @error('image') + {{ $message }} + @enderror +
+
+ +
+ + +
+
+ +
+
+ +
+
+@endsection diff --git a/resources/views/admin/categories/edit.blade.php b/resources/views/admin/categories/edit.blade.php new file mode 100644 index 0000000..5f9a683 --- /dev/null +++ b/resources/views/admin/categories/edit.blade.php @@ -0,0 +1,75 @@ +@extends('admin.layouts.app') + +@section('content') +
+
+ + +
+
+ @error('general') + {{ $message }} + @enderror + +
+ @csrf + @method('PUT') + +
+
ویرایش دسته‌بندی
+
+ +
+ +
+
+ + + @error('name') + {{ $message }} + @enderror +
+
+ + + @error('description') + {{ $message }} + @enderror +
+
+ +
+ +
+ + + @error('image') + {{ $message }} + @enderror + +
+
+ +
+ + + +
+
+ +
+
+ +
+ +@endsection diff --git a/resources/views/admin/categories/index.blade.php b/resources/views/admin/categories/index.blade.php new file mode 100644 index 0000000..401b9c7 --- /dev/null +++ b/resources/views/admin/categories/index.blade.php @@ -0,0 +1,181 @@ +@extends('admin.layouts.app') + +@section('breadcrumb') +
+

لیست دسته بندی ها

+
+ +
+
+@endsection + +@section('content') +
+
+ @error('general') + {{ $message }} + @enderror + + @error('success') + {{ $message }} + @enderror + + +
+
+
+ +
+ +
+
+ + +
+
+ + +
+ + +
+ + + + +
+
+
+
+
+
+ + +
+
+
+
+ + + + + + + + + + + + + @foreach($categories as $category) + + + + + + + + + @endforeach + +
دسته‌بندیتعداد محصولاتوضعیتتاریخ ایجاداقدامات
+
+ + @if($category->image) + {{ $category->name }} + @else + {{ $category->name }} + @endif + + +
+

+ {{ $category->name }} +

+

#{{ $category->id }}

+
+
+
{{ $category->products->count() }} + @if($category->is_active) + + فعال + + @else + + غیر فعال + + @endif + {{ $category->created_at->toJalali()->format('H:i Y-m-d') }} +
+ + + + + + +
+ @csrf + @method('DELETE') + + +
+
+
+
+
+
+
+ + + + {{$categories->links()}} + + +
+
+@endsection diff --git a/resources/views/admin/categories/show.blade.php b/resources/views/admin/categories/show.blade.php new file mode 100644 index 0000000..15eb9c4 --- /dev/null +++ b/resources/views/admin/categories/show.blade.php @@ -0,0 +1,159 @@ +@extends('admin.layouts.app') + +@section('content') +
+
+ + +
+
+ +
+
+
اطلاعات دسته‌بندی
+
+ +
+
+ +
+

{{ $category->name }}

+ +
+
توضیحات:
+
{{ $category->description }}
+
+ +
+
+
+
{{ $category->products->count() }}
+
تعداد محصولات
+
+
+
+
+
+ @if($category->is_active) + + فعال + + @else + + غیر فعال + + @endif + +
+
وضعیت دسته‌بندی
+
+
+ +
+ +
+ +
+
+ +
+ + +
+
+
محصولات دسته‌بندی
+
+ +
+ + + + + + + + + + + + + + + + @foreach($products as $product) + + + + + + + + + + + @endforeach + +
محصولدسته‌بندی فعلیقیمتقیمت تخفیف‌خوردهموجودیوضعیتمنتشر شدهاقدامات
+
+ + @if($product->defaultImage ) + {{ $product->name }} + @else + {{ $product->name }} + @endif + +
+

{{ $product->name}}

+

{{ $product->description }}

+
+
+
{{ $product->productCategory->name }}{{number_format($product->price)}} تومان + {{ number_format(discount($product->price , $product->discount)) }}تومان + {{ $product->qty }} + @switch($product->status) + @case(\App\Enums\ProductStatus::DISABLE) + غیر فعال + @break + @case(\App\Enums\ProductStatus::DRAFT) + پیش نویس + @break + @case(\App\Enums\ProductStatus::PUBLISHED) + منتشر شده + @break + @case(\App\Enums\ProductStatus::ENABLE) + فعال + @break + @endswitch + {{ $category->created_at->toJalali()->format('H:i Y-F-d') }} +
+ + + + + + + +
+
+
+ +
+ +
+
+ +
+
+@endsection diff --git a/resources/views/admin/cities/index.blade.php b/resources/views/admin/cities/index.blade.php new file mode 100644 index 0000000..4413741 --- /dev/null +++ b/resources/views/admin/cities/index.blade.php @@ -0,0 +1,3 @@ +@extends('admin.layouts.app') +@section('breadcrumb')

مدیریت شهرها

@endsection +@section('content')
@include('admin.partials.errors')
@forelse(($cities ?? []) as $city)@empty@endforelse
#شهراستانعملیات
{{ $city->id }}{{ $city->name }}{{ $city->province->name ?? '-' }}ویرایش
@csrf @method('DELETE')
شهری ثبت نشده است.
{{ ($cities ?? collect())->links() }}
@endsection diff --git a/resources/views/admin/dashboard.blade.php b/resources/views/admin/dashboard.blade.php new file mode 100644 index 0000000..9ac9b5e --- /dev/null +++ b/resources/views/admin/dashboard.blade.php @@ -0,0 +1,42 @@ +@extends('admin.layouts.app') + +@section('breadcrumb') +

داشبورد مدیریت

نمای کلی سامانه هواپیمایی و تور
+@endsection + +@section('content') +
+
+ @php($cards = [ + ['title'=>'کاربران ثبت‌نام‌شده','value'=>$usersCount ?? 0,'icon'=>'ri-group-line','class'=>'primary'], + ['title'=>'پروازهای فعال','value'=>$flightsCount ?? 0,'icon'=>'ri-flight-takeoff-line','class'=>'success'], + ['title'=>'تورهای فعال','value'=>$toursCount ?? 0,'icon'=>'ri-map-2-line','class'=>'warning'], + ['title'=>'رزروهای در انتظار','value'=>$pendingBookings ?? 0,'icon'=>'ri-calendar-check-line','class'=>'danger'], + ]) + @foreach($cards as $card) +
{{ $card['title'] }}
{{ number_format($card['value']) }}
+ @endforeach +
+ +
+
تعداد بازدید سایت در ۱۰ روز اخیر
+
آخرین فعالیت‌ها
+ @forelse(($latestLogs ?? []) as $log) +
{{ $log->action ?? 'تغییر اطلاعات' }}{{ isset($log->created_at) ? $log->created_at->toJalali()->format('Y/m/d H:i') : '-' }}
{{ $log->description ?? '' }}
+ @empty +
فعالیتی برای نمایش وجود ندارد.
+ @endforelse +
+
+
+@endsection + +@push('scripts') + + +@endpush diff --git a/resources/views/admin/flights/create.blade.php b/resources/views/admin/flights/create.blade.php new file mode 100644 index 0000000..39c4771 --- /dev/null +++ b/resources/views/admin/flights/create.blade.php @@ -0,0 +1,18 @@ +@extends('admin.layouts.app') +@section('breadcrumb')

درج پرواز

اطلاعات مورد نیاز سفر
@endsection +@section('content')
@include('admin.partials.errors') +
@csrf @if(isset($flight)) @method('PUT') @endif +
اطلاعات پرواز
+
+
+
+
+
+
تاریخ حرکت نباید قبل از امروز باشد.
+
+
+
+
+
تصویر سفر
تصویر اختیاری است.
+
@endsection +@push('scripts')@endpush diff --git a/resources/views/admin/flights/edit.blade.php b/resources/views/admin/flights/edit.blade.php new file mode 100644 index 0000000..4f81a43 --- /dev/null +++ b/resources/views/admin/flights/edit.blade.php @@ -0,0 +1,18 @@ +@extends('admin.layouts.app') +@section('breadcrumb')

{{ isset($flight) ? 'ویرایش پرواز' : 'درج پرواز' }}

اطلاعات مورد نیاز سفر
@endsection +@section('content')
@include('admin.partials.errors') +
@csrf @if(isset($flight)) @method('PUT') @endif +
اطلاعات پرواز
+
+
+
+
+
+
تاریخ حرکت نباید قبل از امروز باشد.
+
+
+
+
+
تصویر سفر
تصویر اختیاری است.
+
@endsection +@push('scripts')@endpush diff --git a/resources/views/admin/flights/index.blade.php b/resources/views/admin/flights/index.blade.php new file mode 100644 index 0000000..2f5917f --- /dev/null +++ b/resources/views/admin/flights/index.blade.php @@ -0,0 +1,5 @@ +@extends('admin.layouts.app') +@section('breadcrumb')

مدیریت پروازها

درج، ویرایش، حذف و جستجوی پروازهای داخلی، خارجی و چارتر
@endsection +@section('content')
@include('admin.partials.errors') +
+
@forelse(($flights ?? []) as $flight)@empty@endforelse
عنوان سفرنوعتاریخ حرکتقیمتظرفیتبازدیدوضعیتعملیات
{{ $flight->title }}
#{{ $flight->id }}
@switch((int)$flight->flight_type) @case(1) داخلی @break @case(2) خارجی @break @case(3) چارتر @break @default - @endswitch{{ isset($flight->departure_time) ? $flight->departure_time->toJalali()->format('Y/m/d H:i') : '-' }}{{ number_format($flight->price) }} تومان{{ number_format($flight->capacity) }}{{ number_format($flight->views ?? 0) }}@if($flight->status)فعال@elseغیرفعال@endif
@csrf @method('DELETE')
پروازی ثبت نشده است.
{{ ($flights ?? collect())->links() }}
@endsection diff --git a/resources/views/admin/flights/show.blade.php b/resources/views/admin/flights/show.blade.php new file mode 100644 index 0000000..d057d5f --- /dev/null +++ b/resources/views/admin/flights/show.blade.php @@ -0,0 +1,3 @@ +@extends('admin.layouts.app') +@section('breadcrumb')

جزئیات پرواز

مشاهده اطلاعات ثبت‌شده و سابقه تغییرات
@endsection +@section('content')

{{ $flight->title }}

{{ $flight->summary }}

نوع: {{ [1=>'داخلی',2=>'خارجی',3=>'چارتر'][$flight->flight_type] ?? '-' }}
قیمت: {{ number_format($flight->price) }} تومان
ظرفیت: {{ number_format($flight->capacity) }}
بازدید: {{ number_format($flight->views ?? 0) }}
تاریخ حرکت: {{ $flight->departure_time?->toJalali()->format('Y/m/d H:i') }}
@endsection diff --git a/resources/views/admin/layouts/app.blade.php b/resources/views/admin/layouts/app.blade.php new file mode 100644 index 0000000..a5efccc --- /dev/null +++ b/resources/views/admin/layouts/app.blade.php @@ -0,0 +1,194 @@ + + + + + + + + + + + پنل مدیریت + @isset($title) + | + {{$title}} + @endisset + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + isset($rawLayout)])> + + +
+ +
+ + + +
+ @includeUnless(isset($rawLayout), 'admin.layouts.header') + + @includeUnless(isset($rawLayout), 'admin.layouts.sidebar') + + + + +
!isset($rawLayout)])> + @yield('content') +
+ + + @includeUnless(isset($rawLayout), 'admin.layouts.footer') + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@stack('scripts') + + + diff --git a/resources/views/admin/layouts/footer.blade.php b/resources/views/admin/layouts/footer.blade.php new file mode 100644 index 0000000..3fa45dc --- /dev/null +++ b/resources/views/admin/layouts/footer.blade.php @@ -0,0 +1,11 @@ + + + diff --git a/resources/views/admin/layouts/header.blade.php b/resources/views/admin/layouts/header.blade.php new file mode 100644 index 0000000..99bf994 --- /dev/null +++ b/resources/views/admin/layouts/header.blade.php @@ -0,0 +1,137 @@ + diff --git a/resources/views/admin/layouts/sidebar.blade.php b/resources/views/admin/layouts/sidebar.blade.php new file mode 100644 index 0000000..15c42f9 --- /dev/null +++ b/resources/views/admin/layouts/sidebar.blade.php @@ -0,0 +1,38 @@ + diff --git a/resources/views/admin/login.blade.php b/resources/views/admin/login.blade.php new file mode 100644 index 0000000..987b31e --- /dev/null +++ b/resources/views/admin/login.blade.php @@ -0,0 +1,31 @@ +@extends('admin.layouts.app') + +@section('content') +
+
+
+
+
+

ورود به پنل مدیریت

+

برای ورود به پنل مدیریت اطلاعات حساب مدیر را وارد کنید.

+ @error('general')
{{ $message }}
@enderror +
+ @csrf + + + @error('email') {{ $message }} @enderror +
+ + + @error('password') {{ $message }} @enderror +
+
+ +
+
+
+
+
+
+
+@endsection diff --git a/resources/views/admin/orders/edit.blade.php b/resources/views/admin/orders/edit.blade.php new file mode 100644 index 0000000..8977129 --- /dev/null +++ b/resources/views/admin/orders/edit.blade.php @@ -0,0 +1,65 @@ +@extends('admin.layouts.app') + +@section('content') +
+
+ +
+
+ + @error('status') + {{ $message }} + @enderror + +
+ @csrf + @method('PATCH') + +
+ + + +
+ + + + +
+ +
+
+ +
+
+@endsection diff --git a/resources/views/admin/orders/index.blade.php b/resources/views/admin/orders/index.blade.php new file mode 100644 index 0000000..b6b9e16 --- /dev/null +++ b/resources/views/admin/orders/index.blade.php @@ -0,0 +1,170 @@ +@extends('admin.layouts.app') + +@section('breadcrumb') +
+

لیست سفارشات

+
+ +
+
+@endsection + +@section('content') +
+
+ + +
+
+
+
+
+
+ + +
+ +
+ + + + +
+
+
+
+
+
+ + +
+
+
+
+ + + + + + + + + + + + + + @foreach($orders as $order) + + + + + + + + + + @endforeach + + +
شناسهمشتریمبلغوضعیتتاریخ ثبتعملیات
+
+
+ #{{ $order->id }} +
+
+
+ {{ getUserFullName($order->user) }} + + {{ number_format($order->total_price )}} + تومان + + + @switch($order->status) + @case(\App\Enums\OrderStatus::PENDING) + در انتظار پرداخت + @break + @case(\App\Enums\OrderStatus::PROCESSING) + در حال پردازش + @break + @case(\App\Enums\OrderStatus::SENT) + ارسال شده + @break + @case(\App\Enums\OrderStatus::DELIVERED) + تحویل شده + @break + @case(\App\Enums\OrderStatus::CANCELLED) + لغو شده + @break + @endswitch + + {{$order->created_at->toJalali()->format('Y/m/d H:i')}} +
+ + + + + + + + + + +
+
+
+
+
+
+ + {{$orders->links()}} + +
+
+@endsection diff --git a/resources/views/admin/orders/show.blade.php b/resources/views/admin/orders/show.blade.php new file mode 100644 index 0000000..6b8bcaa --- /dev/null +++ b/resources/views/admin/orders/show.blade.php @@ -0,0 +1,184 @@ +@extends('admin.layouts.app') + +@section('content') +
+
+ + +
+
+
+
+ +
+
+
خلاصه سفارش
+
شناسه: {{ $order->id }}
+
+
+ + + + + + + + + + + + + + + + + + + +
+
تعداد کالا:
+
{{ $order->total_products }}
+
وضعیت سفارش:
+
+ + @switch($order->status) + @case(\App\Enums\OrderStatus::PENDING) + در انتظار پرداخت + @break + @case(\App\Enums\OrderStatus::PROCESSING) + در حال پردازش + @break + @case(\App\Enums\OrderStatus::SENT) + ارسال شده + @break + @case(\App\Enums\OrderStatus::DELIVERED) + تحویل شده + @break + @endswitch + +
+
مبلغ کل:
+
+ + {{number_format($order->total_price) }} + تومان + +
+
توضیحات:
+
{{ $order->description }}
+
+
+
+ + +
+
+
+
آدرس تحویل
+
+
+

+ آدرس: + {{ $order->user_address }} +

+

+ شماره تماس: + {{ $order->user_mobile }} +

+

+ کد پستی: + {{ $order->user_postal_code }} +

+
+
+
+
+
+ + +
+ + +
+
+
مشخصات کاربر
+
+
+

نام:{{ getUserFullName($order->user) }}

+

ایمیل: {{$order->user->email}}

+

موبایل: {{ $order->user_mobile }}

+
+
+ +
+
+ +
+
+ +
+
+
+ محصولات سفارش +
+
+ + تاریخ سفارش: + {{$order->created_at->toJalali()->format('H:i Y/m/d')}} + +
+
+ +
+
+ + + + + + + + + + + @foreach ($order->orderItems as $orderItem) + + + + + + + @endforeach + +
محصولقیمتتعدادمبلغ نهایی
+
+
+
+ + + + {{$orderItem->product->name}} + | + {{$orderItem->product->en_name}} + + + +
+
+
+
+ {{ $orderItem->product->price }} + تومان + {{ $orderItem->qty }} + {{ number_format(discountPrice($orderItem->unit_price, $orderItem->unit_discount) * $orderItem->qty) }} + تومان +
+
+
+ +
+
+
+
+
+@endsection diff --git a/resources/views/admin/partials/errors.blade.php b/resources/views/admin/partials/errors.blade.php new file mode 100644 index 0000000..74a4768 --- /dev/null +++ b/resources/views/admin/partials/errors.blade.php @@ -0,0 +1,4 @@ +@if($errors->any()) +
+@endif +@if(session('success'))
{{ session('success') }}
@endif diff --git a/resources/views/admin/products/create.blade.php b/resources/views/admin/products/create.blade.php new file mode 100644 index 0000000..609db57 --- /dev/null +++ b/resources/views/admin/products/create.blade.php @@ -0,0 +1,141 @@ +@extends('admin.layouts.app') + +@section('content') +
+
+ +
+
+
+ @csrf + @error('general') + {{ $message }} + @enderror +
+
+
+ ایجاد محصول +
+
+ +
+ + +
+ +
+ + + @error('name') + {{ $message }} + @enderror +
+ + +
+ + + @error('en_name') + {{ $message }} + @enderror +
+ + +
+ + +
+ + +
+ + + @error('price') + {{ $message }} + @enderror +
+ + +
+ + + @error('discount') + {{ $message }} + @enderror +
+ + +
+ + + @error('qty') + {{ $message }} + @enderror +
+ + +
+ + + @error('description') + {{ $message }} + @enderror +
+
+ + +
+ + +
+ +
+ + +
+
+
+
+ +
+
+@endsection diff --git a/resources/views/admin/products/edit.blade.php b/resources/views/admin/products/edit.blade.php new file mode 100644 index 0000000..7f1b236 --- /dev/null +++ b/resources/views/admin/products/edit.blade.php @@ -0,0 +1,171 @@ +@extends('admin.layouts.app') + +@section('content') +
+
+ +
+
+ @error('error') + {{ $message }} + @enderror +
+ @csrf + @method('put') +
+
+
+ ویرایش محصول +
+
+ +
+ + +
+ +
+ + + @error('name') + {{ $message }} + @enderror +
+ + +
+ + + @error('en_name') + {{ $message }} + @enderror +
+ + +
+ + + @error('category_id') + {{ $message }} + @enderror +
+ + +
+ + + @error('price') + {{ $message }} + @enderror +
+ + +
+ + + @error('discount') + {{ $message }} + @enderror +
+ + +
+ + + @error('qty') + {{ $message }} + @enderror +
+ + +
+ + + + @error('description') + {{ $message }} + @enderror +
+
+ + +
+ @foreach($product->productImages as $image) + +
+ {{ $product->name }} + + + × + +
+ + @endforeach + + + +
+ +
+ + +
+
+ +
+
+ +
+
+@endsection diff --git a/resources/views/admin/products/index.blade.php b/resources/views/admin/products/index.blade.php new file mode 100644 index 0000000..10c9287 --- /dev/null +++ b/resources/views/admin/products/index.blade.php @@ -0,0 +1,179 @@ +@extends('admin.layouts.app') + +@section('breadcrumb') +
+

لیست محصولات

+
+ +
+
+@endsection + +@section('content') +
+
+ +
+
+
+ @error('success') + {{ $message }} + @enderror +
+ +
+
+ +
+
+ + +
+ + +
+ + + + +
+
+
+
+
+
+ + +
+
+
+
+ + + + + + + + + + + + + + @foreach($products as $product) + + + + + + + + + + + @endforeach + +
نامدسته‌ بندیقیمتتخفیفموجودیتاریخ ثبتعملیات
+
+ + @if($product->defaultImage ) + {{ $product->name }} + @else + {{ $product->name }} + @endif + + +
+
{{ $product->productCategory->name }} + {{ number_format($product->price) }} + تومان + + {{ $product->discount }} % + + {{ $product->qty }} + {{ $product->created_at->toJalali()->format('H:i Y-m-d') }} +
+ + + + + + +
+ @csrf + @method('delete') + +
+
+
+
+
+ +
+
+ + + + +
+
+@endsection diff --git a/resources/views/admin/products/show.blade.php b/resources/views/admin/products/show.blade.php new file mode 100644 index 0000000..778fe20 --- /dev/null +++ b/resources/views/admin/products/show.blade.php @@ -0,0 +1,104 @@ +@extends('admin.layouts.app') + +@section('content') +
+
+ + +
+
+
+
+ + +
+
+ @if($product->defaultImage) + {{ $product->name }} + @else + {{ $product->name }} + @endif +
+
+ +
+
+ نام محصول: +

{{ $product->name }}

+
+ + +
+ دسته‌بندی: +

{{ $product->productCategory->name }}

+
+ +
+ قیمت: +

+ {{ number_format($product->price) }} + تومان +

+
+ +
+ قیمت تخفیفی: +

+ {{ number_format(discount($product->price, $product->discount)) }} + تومان +

+
+ +
+ موجودی: +

{{ $product->qty }}

+
+ +
+ وضعیت: +

+ @switch($product->status) + @case(\App\Enums\ProductStatus::DISABLE) + غیر فعال + @break + @case(\App\Enums\ProductStatus::DRAFT) + پیش نویس + @break + @case(\App\Enums\ProductStatus::PUBLISHED) + منتشر شده + @break + @case(\App\Enums\ProductStatus::ENABLE) + فعال + @break + @endswitch +

+
+ +
+ توضیحات: +

{{ $product->description }}

+
+
+ +
+ + +
+
+
+ +
+
+@endsection diff --git a/resources/views/admin/provinces/index.blade.php b/resources/views/admin/provinces/index.blade.php new file mode 100644 index 0000000..3fd90bc --- /dev/null +++ b/resources/views/admin/provinces/index.blade.php @@ -0,0 +1,3 @@ +@extends('admin.layouts.app') +@section('breadcrumb')

مدیریت استان‌ها

@endsection +@section('content')
@include('admin.partials.errors')
@forelse(($provinces ?? []) as $province)@empty@endforelse
#استانعملیات
{{ $province->id }}{{ $province->name }}ویرایش
@csrf @method('DELETE')
استانی ثبت نشده است.
{{ ($provinces ?? collect())->links() }}
@endsection diff --git a/resources/views/admin/settings/edit.blade.php b/resources/views/admin/settings/edit.blade.php new file mode 100644 index 0000000..1c7157b --- /dev/null +++ b/resources/views/admin/settings/edit.blade.php @@ -0,0 +1,53 @@ +@extends('admin.layouts.app') + +@section('content') +
+
+ + +
+
+ @error('general') + {{ $message }} + @enderror + +
+ @csrf + @method('PUT') + +
+
ویرایش اطلاعات
+
+ +
+ +
+ +
+
+ + + @error('value') + {{ $message }} + @enderror +
+
+ + +
+ + + +
+
+ +
+
+ +
+ +@endsection diff --git a/resources/views/admin/settings/index.blade.php b/resources/views/admin/settings/index.blade.php new file mode 100644 index 0000000..ac5028d --- /dev/null +++ b/resources/views/admin/settings/index.blade.php @@ -0,0 +1,117 @@ +@extends('admin.layouts.app') + +@section('breadcrumb') +
+

لیست اطلاعات

+
+ +
+
+@endsection + +@section('content') +
+ + @error('success') + {{ $message }} + @enderror + +
+ + + +
+
+
+
+
+
+ + +
+
+ + +
+
+ +
+
+
+
+
+
+ + +
+
+
+
+ + + + + + + + + + + + + @foreach($settings as $setting) + + + + + + + + + + @endforeach + + +
شناسهناممقدارآپدیتعملیات
+ + {{ $setting->title }}{{ $setting-> value }}{{ $setting->updated_at->toJalali()->format('H:i Y-m-d') }} +
+ + + +
+
+
+
+ {{$settings->links()}} +
+
+ + + +
+
+@endsection diff --git a/resources/views/admin/tours/create.blade.php b/resources/views/admin/tours/create.blade.php new file mode 100644 index 0000000..c68541e --- /dev/null +++ b/resources/views/admin/tours/create.blade.php @@ -0,0 +1,17 @@ +@extends('admin.layouts.app') +@section('breadcrumb')

درج تور

فیلدهای مورد نیاز سفر
@endsection +@section('content')
@include('admin.partials.errors')
@csrf @if(false) @method('PUT') @endif +
اطلاعات تور
+
+
+
+
+
+
+
+
+
تصویر تور
تصویر اختیاری است.
+
+@if(false)
تاریخ‌های تور
@csrf

@forelse(($tour->tourDates ?? []) as $date)@empty@endforelse
شروعپایانقیمتظرفیتوضعیت
{{ $date->start_date->toJalali()->format('Y/m/d') }}{{ $date->end_date->toJalali()->format('Y/m/d') }}{{ number_format($date->price) }}{{ $date->capacity }}{{ $date->status ? 'فعال':'غیرفعال' }}
@csrf @method('DELETE')
تاریخی برای این تور ثبت نشده است.
@endif +
@endsection +@push('scripts')@endpush diff --git a/resources/views/admin/tours/edit.blade.php b/resources/views/admin/tours/edit.blade.php new file mode 100644 index 0000000..9d750e2 --- /dev/null +++ b/resources/views/admin/tours/edit.blade.php @@ -0,0 +1,17 @@ +@extends('admin.layouts.app') +@section('breadcrumb')

{{ isset($tour) ? 'ویرایش تور' : 'درج تور' }}

فیلدهای مورد نیاز سفر
@endsection +@section('content')
@include('admin.partials.errors')
@csrf @if(isset($tour)) @method('PUT') @endif +
اطلاعات تور
+
+
+
+
+
+
+
+
+
تصویر تور
تصویر اختیاری است.
+
+@if(isset($tour))
تاریخ‌های تور
@csrf

@forelse(($tour->tourDates ?? []) as $date)@empty@endforelse
شروعپایانقیمتظرفیتوضعیت
{{ $date->start_date->toJalali()->format('Y/m/d') }}{{ $date->end_date->toJalali()->format('Y/m/d') }}{{ number_format($date->price) }}{{ $date->capacity }}{{ $date->status ? 'فعال':'غیرفعال' }}
@csrf @method('DELETE')
تاریخی برای این تور ثبت نشده است.
@endif +
@endsection +@push('scripts')@endpush diff --git a/resources/views/admin/tours/index.blade.php b/resources/views/admin/tours/index.blade.php new file mode 100644 index 0000000..25c9e53 --- /dev/null +++ b/resources/views/admin/tours/index.blade.php @@ -0,0 +1,3 @@ +@extends('admin.layouts.app') +@section('breadcrumb')

مدیریت تورها

درج، ویرایش، حذف و مدیریت تورهای داخلی و خارجی
@endsection +@section('content')
@include('admin.partials.errors')
@forelse(($tours ?? []) as $tour)@empty@endforelse
عنوان تورمسیرمدتقیمتبازدیدوضعیتعملیات
{{ $tour->title }}
#{{ $tour->id }}
{{ $tour->origin }} ← {{ $tour->destination }}{{ $tour->duration }} روز{{ number_format($tour->price ?? 0) }} تومان{{ number_format($tour->views ?? 0) }}@if($tour->status)فعال@elseغیرفعال@endif
@csrf @method('DELETE')
توری ثبت نشده است.
{{ ($tours ?? collect())->links() }}
@endsection diff --git a/resources/views/admin/tours/show.blade.php b/resources/views/admin/tours/show.blade.php new file mode 100644 index 0000000..4804a34 --- /dev/null +++ b/resources/views/admin/tours/show.blade.php @@ -0,0 +1,3 @@ +@extends('admin.layouts.app') +@section('breadcrumb')

جزئیات تور

مشاهده اطلاعات تور و تاریخ‌های قابل رزرو
@endsection +@section('content')

{{ $tour->title }}

{{ $tour->summary }}

مسیر: {{ $tour->origin }} ← {{ $tour->destination }}
مدت: {{ $tour->duration }} روز
قیمت: {{ number_format($tour->price ?? 0) }} تومان
توضیحات:
{!! nl2br(e($tour->descriptions)) !!}
@endsection diff --git a/resources/views/admin/users/edit.blade.php b/resources/views/admin/users/edit.blade.php new file mode 100644 index 0000000..75ea8f0 --- /dev/null +++ b/resources/views/admin/users/edit.blade.php @@ -0,0 +1,89 @@ +@extends('admin.layouts.app') +@section('content') +
+
+ +
+
+ +
+ @csrf + @method('PUT') + +
+
+
ویرایش کاربر
+
+ +
+ + + +
+
+ + + @error('first_name') + {{ $message }} + @enderror +
+
+ + + @error('last_name') + {{ $message }} + @enderror +
+
+ + + @error('email') + {{ $message }} + @enderror +
+
+ + + @error('mobile') + {{ $message }} + @enderror +
+
+ + + @error('password') + {{ $message }} + @enderror +
+
+
+ + +
+
+
+
+ +
+
+@endsection + diff --git a/resources/views/admin/users/index.blade.php b/resources/views/admin/users/index.blade.php new file mode 100644 index 0000000..e1fa362 --- /dev/null +++ b/resources/views/admin/users/index.blade.php @@ -0,0 +1,5 @@ +@extends('admin.layouts.app') +@section('breadcrumb')

ثبت‌نام‌های سایت

جستجو، مشاهده، ویرایش، حذف و مدیریت کاربران
@endsection +@section('content')
@include('admin.partials.errors') +
+
@forelse(($users ?? []) as $user)@empty@endforelse
کاربرایمیلموبایلتاریخ ثبت‌نامعملیات
{{ trim(($user->first_name ?? '').' '.($user->last_name ?? '')) ?: '-' }}{{ $user->email }}{{ $user->mobile ?? '-' }}{{ isset($user->created_at) ? $user->created_at->toJalali()->format('Y/m/d H:i') : '-' }}
@csrf @method('DELETE')
کاربری یافت نشد.
{{ ($users ?? collect())->links() }}
@endsection diff --git a/resources/views/admin/users/show.blade.php b/resources/views/admin/users/show.blade.php new file mode 100644 index 0000000..c53ba04 --- /dev/null +++ b/resources/views/admin/users/show.blade.php @@ -0,0 +1,123 @@ +@extends('admin.layouts.app') + +@section('content') +
+
+ + + +
+
+
اطلاعات کاربر
+
+ +
+
+
+
نام کامل:
+
{{ getUserFullName($user) }}
+ +
ایمیل:
+
{{ $user->email }}
+ +
شماره تلفن:
+
{{ $user->mobile }}
+ +
تاریخ ثبت‌نام:
+
{{ $user->created_at->toJalali()->format('H:i Y/m/d') }}
+
+
+
+
+ + +
+
+
+
+
سفارشات اخیر کاربر
+
+
+ + + + + + + + + + + + @foreach($userOrders as $order) + + + + + + + + @endforeach + +
شناسهمبلغوضعیتتاریخ ثبتعملیات
+
+
+ #{{ $order->id }} +
+
+
+ {{ number_format($order->total_price )}} + تومان + + + @switch($order->status) + @case(\App\Enums\OrderStatus::PENDING) + در انتظار پرداخت + @break + @case(\App\Enums\OrderStatus::PROCESSING) + در حال پردازش + @break + @case(\App\Enums\OrderStatus::SENT) + ارسال شده + @break + @case(\App\Enums\OrderStatus::DELIVERED) + تحویل شده + @break + @endswitch + {{$order->created_at->toJalali()->format('Y/m/d')}} +
+ + + + + + + + + + +
+
+
+
+
+
+ +
+
+@endsection + diff --git a/routes/admin.php b/routes/admin.php new file mode 100644 index 0000000..ec00c6f --- /dev/null +++ b/routes/admin.php @@ -0,0 +1,85 @@ +name('admin.')->group(function () { + Route::get('/', fn () => redirect()->route('admin.dashboard.index'))->name('index'); + + Route::prefix('auth')->name('auth.')->group(function () { + Route::middleware('guest:admin')->prefix('login')->name('login.')->group(function () { + Route::get('/', 'App\\Http\\Controllers\\Admin\\AuthController@login')->name('index'); + Route::post('/', 'App\\Http\\Controllers\\Admin\\AuthController@loginPost')->name('post'); + }); + Route::get('logout', 'App\\Http\\Controllers\\Admin\\AuthController@logout')->middleware('auth:admin')->name('logout'); + }); + + Route::middleware('auth:admin')->group(function () { + Route::get('dashboard', 'App\\Http\\Controllers\\Admin\\DashboardController@index')->name('dashboard.index'); + + Route::prefix('users')->name('users.')->controller('App\\Http\\Controllers\\Admin\\UserController')->group(function () { + Route::get('/', 'index')->name('index'); + Route::get('{user}/show', 'show')->name('show'); + Route::get('{user}/edit', 'edit')->name('edit'); + Route::put('{user}/update', 'update')->name('update'); + Route::delete('{user}/destroy', 'destroy')->name('destroy'); + }); + + Route::prefix('admins')->name('admins.')->controller('App\\Http\\Controllers\\Admin\\AdminController')->group(function () { + Route::get('/', 'index')->name('index'); + Route::get('create', 'create')->name('create'); + Route::post('store', 'store')->name('store'); + Route::get('{admin}/edit', 'edit')->name('edit'); + Route::put('{admin}/update', 'update')->name('update'); + Route::delete('{admin}/destroy', 'destroy')->name('destroy'); + }); + + Route::prefix('flights')->name('flights.')->controller('App\\Http\\Controllers\\Admin\\FlightController')->group(function () { + Route::get('/', 'index')->name('index'); + Route::get('create', 'create')->name('create'); + Route::post('store', 'store')->name('store'); + Route::get('{flight}/show', 'show')->name('show'); + Route::get('{flight}/edit', 'edit')->name('edit'); + Route::put('{flight}/update', 'update')->name('update'); + Route::delete('{flight}/destroy', 'destroy')->name('destroy'); + }); + + Route::prefix('tours')->name('tours.')->controller('App\\Http\\Controllers\\Admin\\TourController')->group(function () { + Route::get('/', 'index')->name('index'); + Route::get('create', 'create')->name('create'); + Route::post('store', 'store')->name('store'); + Route::get('{tour}/show', 'show')->name('show'); + Route::get('{tour}/edit', 'edit')->name('edit'); + Route::put('{tour}/update', 'update')->name('update'); + Route::delete('{tour}/destroy', 'destroy')->name('destroy'); + }); + + Route::post('tours/{tour}/dates', 'App\\Http\\Controllers\\Admin\\TourDateController@store')->name('tour-dates.store'); + Route::delete('tour-dates/{tourDate}', 'App\\Http\\Controllers\\Admin\\TourDateController@destroy')->name('tour-dates.destroy'); + + Route::prefix('bookings')->name('bookings.')->controller('App\\Http\\Controllers\\Admin\\BookingController')->group(function () { + Route::get('/', 'index')->name('index'); + Route::get('{booking}/show', 'show')->name('show'); + Route::patch('{booking}/update', 'update')->name('update'); + }); + + Route::prefix('provinces')->name('provinces.')->controller('App\\Http\\Controllers\\Admin\\ProvinceController')->group(function () { + Route::get('/', 'index')->name('index'); + Route::get('create', 'create')->name('create'); + Route::post('store', 'store')->name('store'); + Route::get('{province}/edit', 'edit')->name('edit'); + Route::put('{province}/update', 'update')->name('update'); + Route::delete('{province}/destroy', 'destroy')->name('destroy'); + }); + + Route::prefix('cities')->name('cities.')->controller('App\\Http\\Controllers\\Admin\\CityController')->group(function () { + Route::get('/', 'index')->name('index'); + Route::get('create', 'create')->name('create'); + Route::post('store', 'store')->name('store'); + Route::get('{city}/edit', 'edit')->name('edit'); + Route::put('{city}/update', 'update')->name('update'); + Route::delete('{city}/destroy', 'destroy')->name('destroy'); + }); + + Route::get('activity-logs', 'App\\Http\\Controllers\\Admin\\ActivityLogController@index')->name('activity-logs.index'); + }); +});