fix : fix panel admin blades
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user