feat(admin): complete admin management and add edit functionality
This commit is contained in:
@@ -0,0 +1,242 @@
|
||||
<?php $__env->startSection('breadcrumb'); ?>
|
||||
<div>
|
||||
<div>
|
||||
<h1 class="page-title fw-medium fs-18 mb-2">سطل زباله تورها</h1>
|
||||
|
||||
<div>
|
||||
<nav>
|
||||
<ol class="breadcrumb mb-0">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="javascript:void(0);">تورها</a>
|
||||
</li>
|
||||
|
||||
<li class="breadcrumb-item">
|
||||
<a href="<?php echo e(route('admin.tours.index')); ?>">
|
||||
لیست تورها
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="breadcrumb-item active" aria-current="page">
|
||||
سطل زباله تورها
|
||||
</li>
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php $__env->startSection('content'); ?>
|
||||
<div class="container-fluid pt-4">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
<div class="card custom-card">
|
||||
<div class="card-body p-3">
|
||||
<div class="d-flex align-items-center justify-content-between flex-wrap gap-3">
|
||||
|
||||
<div>
|
||||
<h6 class="mb-0 fw-semibold">
|
||||
تورهای حذفشده
|
||||
</h6>
|
||||
</div>
|
||||
|
||||
<div class="d-flex">
|
||||
<a href="<?php echo e(route('admin.tours.index')); ?>"
|
||||
class="btn btn-primary me-2">
|
||||
<i class="ri-arrow-go-back-line me-1 fw-medium align-middle"></i>
|
||||
بازگشت به لیست تورها
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
<div class="card custom-card">
|
||||
<div class="table-responsive">
|
||||
<table class="table text-nowrap table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>تصویر</th>
|
||||
<th>عنوان تور</th>
|
||||
<th>مبدأ</th>
|
||||
<th>مقصد</th>
|
||||
<th>نوع تور</th>
|
||||
<th>محدوده تور</th>
|
||||
<th>تاریخ ایجاد</th>
|
||||
<th>تاریخ حذف</th>
|
||||
<th>عملیات</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php if(session('success')): ?>
|
||||
<tr>
|
||||
<td colspan="9">
|
||||
<span style="color: green">
|
||||
<?php echo e(session('success')); ?>
|
||||
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if(session('error')): ?>
|
||||
<tr>
|
||||
<td colspan="9">
|
||||
<span style="color: red">
|
||||
<?php echo e(session('error')); ?>
|
||||
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($errors->any()): ?>
|
||||
<tr>
|
||||
<td colspan="9">
|
||||
<?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<span class="d-block" style="color: red">
|
||||
<?php echo e($error); ?>
|
||||
|
||||
</span>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $__empty_1 = true; $__currentLoopData = $tours; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tour): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="avatar avatar-md avatar-square bg-light">
|
||||
<?php if($tour->coverImage?->file): ?>
|
||||
<img src="<?php echo e(getFileUrl($tour->coverImage->file_id)); ?>"
|
||||
class="w-100 h-100"
|
||||
alt="<?php echo e($tour->title); ?>">
|
||||
<?php else: ?>
|
||||
<img src="<?php echo e(asset('assets/admin/images/faces/DefaultAvatar.jpg')); ?>"
|
||||
class="w-100 h-100"
|
||||
alt="<?php echo e($tour->title); ?>">
|
||||
<?php endif; ?>
|
||||
</span>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<div class="fw-medium">
|
||||
<?php echo e($tour->title); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php if($tour->summary): ?>
|
||||
<small class="text-muted d-inline-block text-truncate"
|
||||
style="max-width: 180px;">
|
||||
<?php echo e($tour->summary); ?>
|
||||
|
||||
</small>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<?php echo e($tour->originCity?->name ?? '-'); ?>
|
||||
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<?php echo e($tour->city?->name ?? '-'); ?>
|
||||
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<?php if($tour->tour_type): ?>
|
||||
<span class="badge bg-success-transparent">
|
||||
<?php echo e($tour->tour_type->label()); ?>
|
||||
|
||||
</span>
|
||||
<?php else: ?>
|
||||
-
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<?php if($tour->tour_scope): ?>
|
||||
<span class="badge bg-primary-transparent">
|
||||
<?php echo e($tour->tour_scope->label()); ?>
|
||||
|
||||
</span>
|
||||
<?php else: ?>
|
||||
-
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<?php echo e($tour->created_at?->toJalali()->format('H:i Y/m/d') ?? '-'); ?>
|
||||
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<?php echo e($tour->deleted_at?->toJalali()->format('H:i Y/m/d') ?? '-'); ?>
|
||||
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<div class="hstack gap-2 fs-15">
|
||||
|
||||
<form action="<?php echo e(route('admin.tours.trash.restore', $tour->id)); ?>"
|
||||
method="POST">
|
||||
<?php echo csrf_field(); ?>
|
||||
|
||||
<button type="submit"
|
||||
class="btn btn-icon btn-sm btn-success-light"
|
||||
data-bs-toggle="tooltip"
|
||||
data-bs-placement="top"
|
||||
title="بازگردانی تور">
|
||||
<i class="ri-arrow-go-back-line"></i>
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<form action="<?php echo e(route('admin.tours.trash.forceDelete', $tour->id)); ?>"
|
||||
method="POST"
|
||||
onsubmit="return confirm('آیا از حذف دائمی این تور مطمئن هستید؟ این عملیات قابل بازگشت نیست.')">
|
||||
<?php echo csrf_field(); ?>
|
||||
<?php echo method_field('DELETE'); ?>
|
||||
|
||||
<button type="submit"
|
||||
class="btn btn-icon btn-sm btn-danger-light"
|
||||
data-bs-toggle="tooltip"
|
||||
data-bs-placement="top"
|
||||
title="حذف دائمی تور">
|
||||
<i class="ri-delete-bin-6-line"></i>
|
||||
</button>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
|
||||
<tr>
|
||||
<td colspan="9" class="text-center text-muted py-4">
|
||||
توری در سطل زباله وجود ندارد.
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="card-footer d-flex justify-content-center align-items-center">
|
||||
<?php echo e($tours->links()); ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php echo $__env->make('admin.layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\Users\ASUS\Desktop\airline-agency\resources\views/admin/tours/trash.blade.php ENDPATH**/ ?>
|
||||
Reference in New Issue
Block a user