fix : fix panel admin blades
This commit is contained in:
@@ -1,253 +1,252 @@
|
||||
@extends('admin.layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="main-content app-content">
|
||||
<div class="container-fluid pt-4">
|
||||
<div class="container-fluid pt-4">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
|
||||
<form action="{{ route('admin.tours.store') }}" method="POST" enctype="multipart/form-data">
|
||||
<form action="{{ route('admin.tours.store') }}" method="POST" enctype="multipart/form-data">
|
||||
|
||||
@csrf
|
||||
@csrf
|
||||
|
||||
@error('general')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
@error('general')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
|
||||
<div class="card custom-card">
|
||||
<div class="card custom-card">
|
||||
|
||||
<div class="card-header">
|
||||
<div class="card-title">
|
||||
ایجاد تور
|
||||
</div>
|
||||
<div class="card-header">
|
||||
<div class="card-title">
|
||||
ایجاد تور
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body pt-0">
|
||||
<div class="card-body pt-0">
|
||||
|
||||
<div class="row gy-3">
|
||||
<div class="row gy-3">
|
||||
|
||||
<!-- Title -->
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">عنوان تور</label>
|
||||
<!-- Title -->
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">عنوان تور</label>
|
||||
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="title"
|
||||
placeholder="عنوان تور را وارد کنید"
|
||||
value="{{ old('title') }}"
|
||||
>
|
||||
|
||||
@error('title')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Origin -->
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">مبدأ</label>
|
||||
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="origin"
|
||||
placeholder="مبدأ تور را وارد کنید"
|
||||
value="{{ old('origin') }}"
|
||||
>
|
||||
|
||||
@error('origin')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Destination -->
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">مقصد</label>
|
||||
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="destination"
|
||||
placeholder="مقصد تور را وارد کنید"
|
||||
value="{{ old('destination') }}"
|
||||
>
|
||||
|
||||
@error('destination')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<!-- Departure Time -->
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">تاریخ و زمان حرکت</label>
|
||||
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="departure_time_jalali"
|
||||
id="departure_time_jalali"
|
||||
data-jdp
|
||||
data-jdp-target-value-input="#departure_time_gregorian"
|
||||
data-jdp-target-value-type="gregorian"
|
||||
autocomplete="off"
|
||||
placeholder="مثلاً 1403/05/29 14:30"
|
||||
value="{{ old('departure_time_jalali') }}"
|
||||
>
|
||||
|
||||
<input
|
||||
type="hidden"
|
||||
name="departure_time"
|
||||
id="departure_time_gregorian"
|
||||
value="{{ old('departure_time') }}"
|
||||
>
|
||||
|
||||
@error('departure_time')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<!-- Duration -->
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">مدت تور</label>
|
||||
|
||||
<input
|
||||
type="number"
|
||||
class="form-control"
|
||||
name="duration"
|
||||
placeholder="مدت تور را وارد کنید"
|
||||
value="{{ old('duration') }}"
|
||||
>
|
||||
|
||||
@error('duration')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Price -->
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">قیمت</label>
|
||||
|
||||
<input
|
||||
type="number"
|
||||
class="form-control"
|
||||
name="price"
|
||||
placeholder="قیمت تور را وارد کنید"
|
||||
value="{{ old('price') }}"
|
||||
>
|
||||
|
||||
@error('price')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Status -->
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">وضعیت</label>
|
||||
|
||||
<select class="form-control" name="status">
|
||||
|
||||
<option
|
||||
value="0"
|
||||
@selected(old('status') == '0')
|
||||
>
|
||||
غیرفعال
|
||||
</option>
|
||||
|
||||
<option
|
||||
value="1"
|
||||
@selected(old('status', '1') == '1')
|
||||
>
|
||||
فعال
|
||||
</option>
|
||||
|
||||
</select>
|
||||
|
||||
@error('status')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Summary -->
|
||||
<div class="col-xl-12">
|
||||
<label class="form-label">خلاصه</label>
|
||||
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="summary"
|
||||
placeholder="خلاصهای از تور"
|
||||
value="{{ old('summary') }}"
|
||||
>
|
||||
|
||||
@error('summary')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Description -->
|
||||
<div class="col-xl-12">
|
||||
<label class="form-label">توضیحات</label>
|
||||
|
||||
<textarea
|
||||
class="form-control"
|
||||
name="description"
|
||||
rows="4"
|
||||
placeholder="توضیحات تور را وارد کنید"
|
||||
>{{ old('description') }}</textarea>
|
||||
|
||||
@error('description')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Image -->
|
||||
<div class="col-xl-12">
|
||||
|
||||
<label class="form-label">تصویر تور</label>
|
||||
|
||||
<input
|
||||
type="file"
|
||||
class="form-control"
|
||||
name="image"
|
||||
accept=".jpg,.jpeg,.png,.webp"
|
||||
>
|
||||
|
||||
@error('image')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
|
||||
</div>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="title"
|
||||
placeholder="عنوان تور را وارد کنید"
|
||||
value="{{ old('title') }}"
|
||||
>
|
||||
|
||||
@error('title')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card-footer text-end">
|
||||
<!-- Origin -->
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">مبدأ</label>
|
||||
|
||||
<button type="submit" class="btn btn-primary">
|
||||
ایجاد تور
|
||||
</button>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="origin"
|
||||
placeholder="مبدأ تور را وارد کنید"
|
||||
value="{{ old('origin') }}"
|
||||
>
|
||||
|
||||
@error('origin')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Destination -->
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">مقصد</label>
|
||||
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="destination"
|
||||
placeholder="مقصد تور را وارد کنید"
|
||||
value="{{ old('destination') }}"
|
||||
>
|
||||
|
||||
@error('destination')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<!-- Departure Time -->
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">تاریخ و زمان حرکت</label>
|
||||
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="departure_time_jalali"
|
||||
id="departure_time_jalali"
|
||||
data-jdp
|
||||
data-jdp-target-value-input="#departure_time_gregorian"
|
||||
data-jdp-target-value-type="gregorian"
|
||||
autocomplete="off"
|
||||
placeholder="مثلاً 1403/05/29 14:30"
|
||||
value="{{ old('departure_time_jalali') }}"
|
||||
>
|
||||
|
||||
<input
|
||||
type="hidden"
|
||||
name="departure_time"
|
||||
id="departure_time_gregorian"
|
||||
value="{{ old('departure_time') }}"
|
||||
>
|
||||
|
||||
@error('departure_time')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<!-- Duration -->
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">مدت تور</label>
|
||||
|
||||
<input
|
||||
type="number"
|
||||
class="form-control"
|
||||
name="duration"
|
||||
placeholder="مدت تور را وارد کنید"
|
||||
value="{{ old('duration') }}"
|
||||
>
|
||||
|
||||
@error('duration')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Price -->
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">قیمت</label>
|
||||
|
||||
<input
|
||||
type="number"
|
||||
class="form-control"
|
||||
name="price"
|
||||
placeholder="قیمت تور را وارد کنید"
|
||||
value="{{ old('price') }}"
|
||||
>
|
||||
|
||||
@error('price')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Status -->
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">وضعیت</label>
|
||||
|
||||
<select class="form-control" name="status">
|
||||
|
||||
<option
|
||||
value="0"
|
||||
@selected(old('status') == '0')
|
||||
>
|
||||
غیرفعال
|
||||
</option>
|
||||
|
||||
<option
|
||||
value="1"
|
||||
@selected(old('status', '1') == '1')
|
||||
>
|
||||
فعال
|
||||
</option>
|
||||
|
||||
</select>
|
||||
|
||||
@error('status')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Summary -->
|
||||
<div class="col-xl-12">
|
||||
<label class="form-label">خلاصه</label>
|
||||
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="summary"
|
||||
placeholder="خلاصهای از تور"
|
||||
value="{{ old('summary') }}"
|
||||
>
|
||||
|
||||
@error('summary')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Description -->
|
||||
<div class="col-xl-12">
|
||||
<label class="form-label">توضیحات</label>
|
||||
|
||||
<textarea
|
||||
class="form-control"
|
||||
name="description"
|
||||
rows="4"
|
||||
placeholder="توضیحات تور را وارد کنید"
|
||||
>{{ old('description') }}</textarea>
|
||||
|
||||
@error('description')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Image -->
|
||||
<div class="col-xl-12">
|
||||
|
||||
<label class="form-label">تصویر تور</label>
|
||||
|
||||
<input
|
||||
type="file"
|
||||
class="form-control"
|
||||
name="image"
|
||||
accept=".jpg,.jpeg,.png,.webp"
|
||||
>
|
||||
|
||||
@error('image')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<div class="card-footer text-end">
|
||||
|
||||
<button type="submit" class="btn btn-primary">
|
||||
ایجاد تور
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<link rel="stylesheet" href="https://unpkg.com/@majidh1/jalalidatepicker/dist/jalalidatepicker.min.css">
|
||||
<script src="https://unpkg.com/@majidh1/jalalidatepicker/dist/jalalidatepicker.min.js"></script>
|
||||
|
||||
|
||||
@@ -1,264 +1,263 @@
|
||||
@extends('admin.layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="main-content app-content">
|
||||
<div class="container-fluid pt-4">
|
||||
<div class="container-fluid pt-4">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
|
||||
@error('error')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
@error('error')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
|
||||
|
||||
<form action="{{ route('admin.tours.update', $tour) }}" method="POST" enctype="multipart/form-data">
|
||||
@csrf
|
||||
@method('put')
|
||||
<form action="{{ route('admin.tours.update', $tour) }}" method="POST" enctype="multipart/form-data">
|
||||
@csrf
|
||||
@method('put')
|
||||
|
||||
<div class="card custom-card">
|
||||
<div class="card custom-card">
|
||||
|
||||
<div class="card-header">
|
||||
<div class="card-title">
|
||||
ویرایش تور
|
||||
</div>
|
||||
<div class="card-header">
|
||||
<div class="card-title">
|
||||
ویرایش تور
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body pt-0">
|
||||
<div class="card-body pt-0">
|
||||
|
||||
<div class="row gy-3">
|
||||
<div class="row gy-3">
|
||||
|
||||
<!-- Title -->
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">عنوان تور</label>
|
||||
<!-- Title -->
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">عنوان تور</label>
|
||||
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="title"
|
||||
placeholder="عنوان تور را وارد کنید"
|
||||
value="{{ old('title', $tour->title) }}"
|
||||
>
|
||||
|
||||
@error('title')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Origin -->
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">مبدأ</label>
|
||||
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="origin"
|
||||
placeholder="مبدأ تور را وارد کنید"
|
||||
value="{{ old('origin', $tour->origin) }}"
|
||||
>
|
||||
|
||||
@error('origin')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Destination -->
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">مقصد</label>
|
||||
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="destination"
|
||||
placeholder="مقصد تور را وارد کنید"
|
||||
value="{{ old('destination', $tour->destination) }}"
|
||||
>
|
||||
|
||||
@error('destination')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<!-- Departure Time -->
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">تاریخ و زمان حرکت</label>
|
||||
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="departure_time_jalali"
|
||||
id="departure_time_jalali"
|
||||
data-jdp
|
||||
data-jdp-target-value-input="#departure_time_gregorian"
|
||||
data-jdp-target-value-type="gregorian"
|
||||
autocomplete="off"
|
||||
placeholder="مثلاً 1403/05/29 14:30"
|
||||
value="{{ old('departure_time_jalali', $tour->departure_time ? verta($tour->departure_time)->format('Y/m/d H:i') : '') }}"
|
||||
>
|
||||
|
||||
<input
|
||||
type="hidden"
|
||||
name="departure_time"
|
||||
id="departure_time_gregorian"
|
||||
value="{{ old('departure_time', optional($tour->departure_time)->format('Y-m-d H:i:s')) }}"
|
||||
>
|
||||
|
||||
@error('departure_time')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Duration -->
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">مدت تور</label>
|
||||
|
||||
<input
|
||||
type="number"
|
||||
class="form-control"
|
||||
name="duration"
|
||||
placeholder="مدت تور را وارد کنید"
|
||||
value="{{ old('duration', $tour->duration) }}"
|
||||
>
|
||||
|
||||
@error('duration')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Price -->
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">قیمت</label>
|
||||
|
||||
<input
|
||||
type="number"
|
||||
class="form-control"
|
||||
name="price"
|
||||
placeholder="قیمت تور را وارد کنید"
|
||||
value="{{ old('price', $tour->price) }}"
|
||||
>
|
||||
|
||||
@error('price')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Status -->
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">وضعیت</label>
|
||||
|
||||
<select class="form-control" name="status">
|
||||
|
||||
<option
|
||||
value="0"
|
||||
@selected(old('status', $tour->status) == 0)
|
||||
>
|
||||
غیرفعال
|
||||
</option>
|
||||
|
||||
<option
|
||||
value="1"
|
||||
@selected(old('status', $tour->status) == 1)
|
||||
>
|
||||
فعال
|
||||
</option>
|
||||
|
||||
</select>
|
||||
|
||||
@error('status')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Summary -->
|
||||
<div class="col-xl-12">
|
||||
<label class="form-label">خلاصه</label>
|
||||
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="summary"
|
||||
placeholder="خلاصهای از تور"
|
||||
value="{{ old('summary', $tour->summary) }}"
|
||||
>
|
||||
|
||||
@error('summary')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Description -->
|
||||
<div class="col-xl-12">
|
||||
<label class="form-label">توضیحات</label>
|
||||
|
||||
<textarea
|
||||
class="form-control"
|
||||
name="description"
|
||||
rows="4"
|
||||
placeholder="توضیحات تور را وارد کنید"
|
||||
>{{ old('description', $tour->description) }}</textarea>
|
||||
|
||||
@error('description')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Image -->
|
||||
<div class="col-xl-12">
|
||||
<label class="form-label">تصویر تور</label>
|
||||
|
||||
<input
|
||||
type="file"
|
||||
class="form-control"
|
||||
name="image"
|
||||
accept=".jpg,.jpeg,.png,.webp"
|
||||
>
|
||||
|
||||
@error('image')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
|
||||
@if($tour->file)
|
||||
<div class="mt-3">
|
||||
<img
|
||||
src="{{ getFileUrl($tour->file->id) }}"
|
||||
alt="{{ $tour->title }}"
|
||||
style="width:150px;height:150px;object-fit:cover;border-radius:8px;"
|
||||
>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="title"
|
||||
placeholder="عنوان تور را وارد کنید"
|
||||
value="{{ old('title', $tour->title) }}"
|
||||
>
|
||||
|
||||
@error('title')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card-footer text-end">
|
||||
<!-- Origin -->
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">مبدأ</label>
|
||||
|
||||
<button type="submit" class="btn btn-primary">
|
||||
ذخیره تغییرات
|
||||
</button>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="origin"
|
||||
placeholder="مبدأ تور را وارد کنید"
|
||||
value="{{ old('origin', $tour->origin) }}"
|
||||
>
|
||||
|
||||
@error('origin')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Destination -->
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">مقصد</label>
|
||||
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="destination"
|
||||
placeholder="مقصد تور را وارد کنید"
|
||||
value="{{ old('destination', $tour->destination) }}"
|
||||
>
|
||||
|
||||
@error('destination')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<!-- Departure Time -->
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">تاریخ و زمان حرکت</label>
|
||||
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="departure_time_jalali"
|
||||
id="departure_time_jalali"
|
||||
data-jdp
|
||||
data-jdp-target-value-input="#departure_time_gregorian"
|
||||
data-jdp-target-value-type="gregorian"
|
||||
autocomplete="off"
|
||||
placeholder="مثلاً 1403/05/29 14:30"
|
||||
value="{{ old('departure_time_jalali', $tour->departure_time ? verta($tour->departure_time)->format('Y/m/d H:i') : '') }}"
|
||||
>
|
||||
|
||||
<input
|
||||
type="hidden"
|
||||
name="departure_time"
|
||||
id="departure_time_gregorian"
|
||||
value="{{ old('departure_time', optional($tour->departure_time)->format('Y-m-d H:i:s')) }}"
|
||||
>
|
||||
|
||||
@error('departure_time')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Duration -->
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">مدت تور</label>
|
||||
|
||||
<input
|
||||
type="number"
|
||||
class="form-control"
|
||||
name="duration"
|
||||
placeholder="مدت تور را وارد کنید"
|
||||
value="{{ old('duration', $tour->duration) }}"
|
||||
>
|
||||
|
||||
@error('duration')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Price -->
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">قیمت</label>
|
||||
|
||||
<input
|
||||
type="number"
|
||||
class="form-control"
|
||||
name="price"
|
||||
placeholder="قیمت تور را وارد کنید"
|
||||
value="{{ old('price', $tour->price) }}"
|
||||
>
|
||||
|
||||
@error('price')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Status -->
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">وضعیت</label>
|
||||
|
||||
<select class="form-control" name="status">
|
||||
|
||||
<option
|
||||
value="0"
|
||||
@selected(old('status', $tour->status) == 0)
|
||||
>
|
||||
غیرفعال
|
||||
</option>
|
||||
|
||||
<option
|
||||
value="1"
|
||||
@selected(old('status', $tour->status) == 1)
|
||||
>
|
||||
فعال
|
||||
</option>
|
||||
|
||||
</select>
|
||||
|
||||
@error('status')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Summary -->
|
||||
<div class="col-xl-12">
|
||||
<label class="form-label">خلاصه</label>
|
||||
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="summary"
|
||||
placeholder="خلاصهای از تور"
|
||||
value="{{ old('summary', $tour->summary) }}"
|
||||
>
|
||||
|
||||
@error('summary')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Description -->
|
||||
<div class="col-xl-12">
|
||||
<label class="form-label">توضیحات</label>
|
||||
|
||||
<textarea
|
||||
class="form-control"
|
||||
name="description"
|
||||
rows="4"
|
||||
placeholder="توضیحات تور را وارد کنید"
|
||||
>{{ old('description', $tour->description) }}</textarea>
|
||||
|
||||
@error('description')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Image -->
|
||||
<div class="col-xl-12">
|
||||
<label class="form-label">تصویر تور</label>
|
||||
|
||||
<input
|
||||
type="file"
|
||||
class="form-control"
|
||||
name="image"
|
||||
accept=".jpg,.jpeg,.png,.webp"
|
||||
>
|
||||
|
||||
@error('image')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
|
||||
@if($tour->file)
|
||||
<div class="mt-3">
|
||||
<img
|
||||
src="{{ getFileUrl($tour->file->id) }}"
|
||||
alt="{{ $tour->title }}"
|
||||
style="width:150px;height:150px;object-fit:cover;border-radius:8px;"
|
||||
>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<div class="card-footer text-end">
|
||||
|
||||
<button type="submit" class="btn btn-primary">
|
||||
ذخیره تغییرات
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<link rel="stylesheet" href="https://unpkg.com/@majidh1/jalalidatepicker/dist/jalalidatepicker.min.css">
|
||||
<script src="https://unpkg.com/@majidh1/jalalidatepicker/dist/jalalidatepicker.min.js"></script>
|
||||
|
||||
|
||||
@@ -19,161 +19,160 @@
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="main-content app-content">
|
||||
<div class="container-fluid pt-4">
|
||||
<div class="container-fluid pt-4">
|
||||
|
||||
@error('success')
|
||||
<span class="text-success">{{ $message }}</span>
|
||||
@enderror
|
||||
@error('success')
|
||||
<span class="text-success">{{ $message }}</span>
|
||||
@enderror
|
||||
|
||||
@error('errors')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
@error('errors')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
<div class="card custom-card">
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
<div class="card custom-card">
|
||||
|
||||
<div class="card-body p-3">
|
||||
<div class="card-body p-3">
|
||||
|
||||
<form method="GET">
|
||||
<form method="GET">
|
||||
|
||||
<div class="d-flex align-items-center justify-content-between flex-wrap gap-3">
|
||||
<div class="d-flex align-items-center justify-content-between flex-wrap gap-3">
|
||||
|
||||
<div class="d-flex flex-wrap gap-1 project-list-main align-items-center">
|
||||
<div class="d-flex flex-wrap gap-1 project-list-main align-items-center">
|
||||
|
||||
<div class="d-flex me-2">
|
||||
<div class="d-flex me-2">
|
||||
|
||||
<input
|
||||
class="form-control me-2"
|
||||
type="search"
|
||||
name="search"
|
||||
placeholder="جستجو تور"
|
||||
value="{{ request()->input('search') }}"
|
||||
aria-label="جستجو"
|
||||
>
|
||||
|
||||
<button class="btn btn-light" type="submit">
|
||||
جستجو
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
<select
|
||||
id="choices-single-default"
|
||||
class="form-control"
|
||||
name="sort"
|
||||
<input
|
||||
class="form-control me-2"
|
||||
type="search"
|
||||
name="search"
|
||||
placeholder="جستجو تور"
|
||||
value="{{ request()->input('search') }}"
|
||||
aria-label="جستجو"
|
||||
>
|
||||
|
||||
<option value="" selected>
|
||||
مرتبسازی بر اساس
|
||||
</option>
|
||||
|
||||
<option
|
||||
value="created_at"
|
||||
@selected(request()->input('sort') == 'created_at')
|
||||
>
|
||||
جدیدترین
|
||||
</option>
|
||||
|
||||
<option
|
||||
value="price_asc"
|
||||
@selected(request()->input('sort') == 'price_asc')
|
||||
>
|
||||
قیمت (کم به زیاد)
|
||||
</option>
|
||||
|
||||
<option
|
||||
value="price_desc"
|
||||
@selected(request()->input('sort') == 'price_desc')
|
||||
>
|
||||
قیمت (زیاد به کم)
|
||||
</option>
|
||||
|
||||
<option
|
||||
value="duration_asc"
|
||||
@selected(request()->input('sort') == 'duration_asc')
|
||||
>
|
||||
مدت زمان (کم به زیاد)
|
||||
</option>
|
||||
|
||||
<option
|
||||
value="duration_desc"
|
||||
@selected(request()->input('sort') == 'duration_desc')
|
||||
>
|
||||
مدت زمان (زیاد به کم)
|
||||
</option>
|
||||
|
||||
</select>
|
||||
<button class="btn btn-light" type="submit">
|
||||
جستجو
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
<select
|
||||
id="choices-single-default"
|
||||
class="form-control"
|
||||
name="sort"
|
||||
>
|
||||
|
||||
@if(auth('admin')->user()->permission?->tour_create)
|
||||
<option value="" selected>
|
||||
مرتبسازی بر اساس
|
||||
</option>
|
||||
|
||||
<div class="d-flex">
|
||||
<option
|
||||
value="created_at"
|
||||
@selected(request()->input('sort') == 'created_at')
|
||||
>
|
||||
جدیدترین
|
||||
</option>
|
||||
|
||||
<a
|
||||
href="{{ route('admin.tours.create') }}"
|
||||
class="btn btn-primary me-2"
|
||||
>
|
||||
<i class="ri-add-line me-1 fw-medium align-middle"></i>
|
||||
ایجاد تور
|
||||
</a>
|
||||
<option
|
||||
value="price_asc"
|
||||
@selected(request()->input('sort') == 'price_asc')
|
||||
>
|
||||
قیمت (کم به زیاد)
|
||||
</option>
|
||||
|
||||
</div>
|
||||
<option
|
||||
value="price_desc"
|
||||
@selected(request()->input('sort') == 'price_desc')
|
||||
>
|
||||
قیمت (زیاد به کم)
|
||||
</option>
|
||||
|
||||
@endif
|
||||
<option
|
||||
value="duration_asc"
|
||||
@selected(request()->input('sort') == 'duration_asc')
|
||||
>
|
||||
مدت زمان (کم به زیاد)
|
||||
</option>
|
||||
|
||||
<option
|
||||
value="duration_desc"
|
||||
@selected(request()->input('sort') == 'duration_desc')
|
||||
>
|
||||
مدت زمان (زیاد به کم)
|
||||
</option>
|
||||
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
@if(auth('admin')->user()->permission?->tour_create)
|
||||
|
||||
<div class="d-flex">
|
||||
|
||||
<a
|
||||
href="{{ route('admin.tours.create') }}"
|
||||
class="btn btn-primary me-2"
|
||||
>
|
||||
<i class="ri-add-line me-1 fw-medium align-middle"></i>
|
||||
ایجاد تور
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Tours Table -->
|
||||
<div class="row">
|
||||
<!-- Tours Table -->
|
||||
<div class="row">
|
||||
|
||||
<div class="col-xl-12">
|
||||
<div class="col-xl-12">
|
||||
|
||||
<div class="card custom-card">
|
||||
<div class="card custom-card">
|
||||
|
||||
<div class="table-responsive">
|
||||
<div class="table-responsive">
|
||||
|
||||
<table class="table text-nowrap table-bordered">
|
||||
<table class="table text-nowrap table-bordered">
|
||||
|
||||
<thead>
|
||||
<thead>
|
||||
|
||||
<tr>
|
||||
<th>عکس</th>
|
||||
<th>عنوان</th>
|
||||
<th>مبدا</th>
|
||||
<th>مقصد</th>
|
||||
<th>زمان حرکت</th>
|
||||
<th>مدت زمان</th>
|
||||
<th>قیمت</th>
|
||||
<th>وضعیت</th>
|
||||
<th>تاریخ ثبت</th>
|
||||
<th>تاریخ ویرایش</th>
|
||||
<th>عملیات</th>
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
|
||||
|
||||
<tbody>
|
||||
|
||||
@foreach($tours as $tour)
|
||||
|
||||
<tr>
|
||||
<th>عکس</th>
|
||||
<th>عنوان</th>
|
||||
<th>مبدا</th>
|
||||
<th>مقصد</th>
|
||||
<th>زمان حرکت</th>
|
||||
<th>مدت زمان</th>
|
||||
<th>قیمت</th>
|
||||
<th>وضعیت</th>
|
||||
<th>تاریخ ثبت</th>
|
||||
<th>تاریخ ویرایش</th>
|
||||
<th>عملیات</th>
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
|
||||
|
||||
<tbody>
|
||||
|
||||
@foreach($tours as $tour)
|
||||
|
||||
<tr>
|
||||
|
||||
{{-- Image --}}
|
||||
<td>
|
||||
{{-- Image --}}
|
||||
<td>
|
||||
|
||||
<span class="avatar avatar-md avatar-square bg-light">
|
||||
|
||||
@@ -197,117 +196,116 @@
|
||||
|
||||
</span>
|
||||
|
||||
</td>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<td>
|
||||
|
||||
<span class="fw-semibold">
|
||||
{{ $tour->title }}
|
||||
</span>
|
||||
|
||||
</td>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ $tour->origin }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $tour->origin }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ $tour->destination }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $tour->destination }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ $tour->departure_time->toJalali()->format('H:i Y-m-d') }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $tour->departure_time->toJalali()->format('H:i Y-m-d') }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ $tour->duration }} روز
|
||||
</td>
|
||||
<td>
|
||||
{{ $tour->duration }} روز
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<td>
|
||||
|
||||
{{ number_format($tour->price) }}
|
||||
تومان
|
||||
{{ number_format($tour->price) }}
|
||||
تومان
|
||||
|
||||
</td>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<td>
|
||||
|
||||
@if($tour->status == \App\Enums\TourStatus::ENABLE)
|
||||
<span class="badge bg-primary-transparent">فعال</span>
|
||||
@elseif($tour->status == \App\Enums\TourStatus::DISABLE)
|
||||
<span class="badge bg-warning-transparent">غیرفعال</span>
|
||||
@endif
|
||||
|
||||
</td>
|
||||
<td>{{ $tour->created_at->toJalali()->format('H:i Y-m-d') }}</td>
|
||||
<td>{{ $tour->updated_at->toJalali()->format('H:i Y-m-d') }}</td>
|
||||
|
||||
|
||||
{{-- Actions --}}
|
||||
<td>
|
||||
|
||||
<div class="hstack gap-2 fs-15">
|
||||
|
||||
@if(auth('admin')->user()->permission?->tour_edit)
|
||||
|
||||
<a
|
||||
href="{{ route('admin.tours.edit', $tour->id) }}"
|
||||
class="btn btn-secondary-light btn-icon btn-sm"
|
||||
data-bs-toggle="tooltip"
|
||||
data-bs-placement="top"
|
||||
title="ویرایش"
|
||||
>
|
||||
<i class="ti ti-pencil"></i>
|
||||
</a>
|
||||
|
||||
@if($tour->status == \App\Enums\TourStatus::ENABLE)
|
||||
<span class="badge bg-primary-transparent">فعال</span>
|
||||
@elseif($tour->status == \App\Enums\TourStatus::DISABLE)
|
||||
<span class="badge bg-warning-transparent">غیرفعال</span>
|
||||
@endif
|
||||
|
||||
</td>
|
||||
<td>{{ $tour->created_at->toJalali()->format('H:i Y-m-d') }}</td>
|
||||
<td>{{ $tour->updated_at->toJalali()->format('H:i Y-m-d') }}</td>
|
||||
|
||||
@if(auth('admin')->user()->permission?->tour_delete)
|
||||
|
||||
{{-- Actions --}}
|
||||
<td>
|
||||
<form
|
||||
action="{{ route('admin.tours.destroy', $tour->id) }}"
|
||||
method="POST"
|
||||
onsubmit="return confirm('آیا از حذف این تور مطمئن هستید؟')"
|
||||
>
|
||||
|
||||
<div class="hstack gap-2 fs-15">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
|
||||
@if(auth('admin')->user()->permission?->tour_edit)
|
||||
|
||||
<a
|
||||
href="{{ route('admin.tours.edit', $tour->id) }}"
|
||||
class="btn btn-secondary-light btn-icon btn-sm"
|
||||
data-bs-toggle="tooltip"
|
||||
data-bs-placement="top"
|
||||
title="ویرایش"
|
||||
<button
|
||||
type="submit"
|
||||
class="btn btn-icon btn-sm btn-danger-light"
|
||||
title="حذف"
|
||||
>
|
||||
<i class="ti ti-pencil"></i>
|
||||
</a>
|
||||
<i class="ri-delete-bin-line"></i>
|
||||
</button>
|
||||
|
||||
@endif
|
||||
</form>
|
||||
|
||||
@endif
|
||||
|
||||
@if(auth('admin')->user()->permission?->tour_delete)
|
||||
</div>
|
||||
|
||||
<form
|
||||
action="{{ route('admin.tours.destroy', $tour->id) }}"
|
||||
method="POST"
|
||||
onsubmit="return confirm('آیا از حذف این تور مطمئن هستید؟')"
|
||||
>
|
||||
</td>
|
||||
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
</tr>
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
class="btn btn-icon btn-sm btn-danger-light"
|
||||
title="حذف"
|
||||
>
|
||||
<i class="ri-delete-bin-line"></i>
|
||||
</button>
|
||||
@endforeach
|
||||
|
||||
</form>
|
||||
</tbody>
|
||||
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
{{ $tours->links() }}
|
||||
|
||||
</div>
|
||||
|
||||
{{ $tours->links() }}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user