| Current Path : /var/www/html/dev/reddsis-dev/storage/framework/views/ |
| Current File : /var/www/html/dev/reddsis-dev/storage/framework/views/a5ae3308b7cabdccb6f8db842492fd40.php |
<?php $__env->startSection('title', \App\Http\Helpers\MenuHelper::getPageTitle()); ?>
<?php $__env->startSection('content'); ?>
<div x-data="{ pageName: <?php echo \Illuminate\Support\Js::from(\App\Http\Helpers\MenuHelper::getPageTitle())->toHtml() ?> }" class="mb-6">
<div class="mb-6 flex flex-wrap items-center justify-between gap-3">
<h2 class="text-xl font-semibold text-gray-800 dark:text-white/90" x-text="pageName"></h2>
<nav>
<ol class="flex items-center gap-1.5">
<li>
<a class="inline-flex items-center gap-1.5 text-sm text-gray-500 dark:text-gray-400" href="<?php echo e(route('admin.dashboard')); ?>">
Home
<svg class="stroke-current" width="17" height="16" viewBox="0 0 17 16" fill="none">
<path d="M6.0765 12.667L10.2432 8.50033L6.0765 4.33366" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" />
</svg>
</a>
</li>
<li class="text-sm text-gray-800 dark:text-white/90" x-text="pageName"></li>
</ol>
</nav>
</div>
</div>
<div class="space-y-5 sm:space-y-6">
<div class="rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03]">
<div class="px-5 py-4 sm:px-6 sm:py-5">
<div class="mb-6 flex flex-wrap items-center justify-between gap-3">
<h3 class="text-lg font-semibold text-gray-800 dark:text-white/90">All Frontend Menu Data</h3>
<a href="<?php echo e(route('frontend-menu.create')); ?>" class="inline-flex items-center gap-2 rounded-lg border border-gray-300 bg-white px-4 py-2.5 text-theme-sm font-medium text-gray-700 shadow-theme-xs hover:bg-gray-50 hover:text-gray-800 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:hover:bg-white/[0.03] dark:hover:text-gray-200">
<svg class="fill-current" width="18" height="18" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path d="M10 3a1 1 0 0 1 1 1v5h5a1 1 0 1 1 0 2h-5v5a1 1 0 1 1-2 0v-5H4a1 1 0 1 1 0-2h5V4a1 1 0 0 1 1-1Z" />
</svg>
Create New Frontend Menu
</a>
</div>
<div class="rounded-xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.02]">
<div class="p-5">
<form method="GET" action="<?php echo e(route('frontend-menu.index')); ?>" id="search-form" class="mb-4 flex items-center justify-end gap-3">
<input type="text" name="search" value="<?php echo e($search ?? ''); ?>" placeholder="Search name or link..." oninput="debounceSearch(this)" class="dark:bg-dark-900 shadow-theme-xs focus:border-brand-300 focus:ring-brand-500/10 dark:focus:border-brand-800 h-10 w-full max-w-xs rounded-lg border border-gray-300 bg-transparent px-4 py-2 text-sm text-gray-800 placeholder:text-gray-400 focus:ring-3 focus:outline-hidden dark:border-gray-700 dark:bg-gray-900 dark:text-white/90 dark:placeholder:text-white/30">
</form>
<script>
let searchTimer;
function debounceSearch(el) {
clearTimeout(searchTimer);
searchTimer = setTimeout(() => el.form.submit(), 400);
}
</script>
<div class="max-w-full overflow-x-auto">
<div class="min-w-[800px]">
<table class="w-full">
<thead>
<tr class="border-b border-gray-100 dark:border-gray-800">
<th class="px-5 py-3 text-left"><span class="text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-400">No</span></th>
<th class="px-5 py-3 text-left"><span class="text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-400">Name</span></th>
<th class="px-5 py-3 text-left"><span class="text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-400">Link</span></th>
<th class="px-5 py-3 text-left"><span class="text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-400">Class/Icon</span></th>
<th class="px-5 py-3 text-left"><span class="text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-400">Parent</span></th>
<th class="px-5 py-3 text-left"><span class="text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-400">Status</span></th>
<th class="px-5 py-3 text-right"><span class="text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-400">Actions</span></th>
</tr>
</thead>
<tbody class="divide-y divide-gray-100 dark:divide-gray-800">
<?php $__empty_1 = true; $__currentLoopData = $menus; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $menu): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
<tr class="transition-colors hover:bg-gray-50 dark:hover:bg-gray-800/50">
<td class="px-5 py-4"><span class="block text-sm font-medium text-gray-800 dark:text-white/90"><?php echo e(($menus->currentPage() - 1) * $menus->perPage() + $loop->iteration); ?></span></td>
<td class="px-5 py-4"><span class="block text-sm font-medium text-gray-700 dark:text-gray-300"><?php echo e($menu->menu_name); ?></span></td>
<td class="px-5 py-4"><span class="block text-sm text-gray-600 dark:text-gray-400"><?php echo e($menu->menu_link ?: '-'); ?></span></td>
<td class="px-5 py-4"><span class="block text-sm text-gray-600 dark:text-gray-400"><?php echo e($menu->menu_class ?: '-'); ?></span></td>
<td class="px-5 py-4"><span class="block text-sm text-gray-600 dark:text-gray-400"><?php echo e($menu->menu_parent_id ? ($parentNames[$menu->menu_parent_id] ?? '-') : '-'); ?></span></td>
<td class="px-5 py-4">
<span class="inline-flex items-center rounded-md px-2 py-1 text-xs font-medium <?php echo e($menu->menu_status ? 'bg-success-50 text-success-600 dark:bg-success-500/10 dark:text-success-400' : 'bg-gray-100 text-gray-600 dark:bg-gray-800 dark:text-gray-400'); ?>">
<?php echo e($menu->menu_status ? 'Active' : 'Inactive'); ?>
</span>
</td>
<td class="px-5 py-4">
<div class="flex items-center justify-end gap-2">
<a href="<?php echo e(route('frontend-menu.edit', $menu->menu_id)); ?>" class="inline-flex items-center justify-center rounded-lg bg-warning-50 p-2 text-warning-500 hover:bg-warning-100 dark:bg-warning-500/10 dark:text-warning-400 dark:hover:bg-warning-500/20" title="Edit Frontend Menu">
<svg class="fill-current" width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M13.5 2.5L15.5 4.5L5 15H3V13L13.5 2.5ZM14.5 1.5L12.5 3.5L14.5 5.5L16.5 3.5L14.5 1.5Z" fill=""></path></svg>
</a>
<form action="<?php echo e(route('frontend-menu.destroy', $menu->menu_id)); ?>" method="POST" class="inline delete-form">
<?php echo csrf_field(); ?>
<?php echo method_field('DELETE'); ?>
<button type="submit" class="inline-flex items-center justify-center rounded-lg bg-error-50 p-2 text-error-500 hover:bg-error-100 dark:bg-error-500/10 dark:text-error-400 dark:hover:bg-error-500/20" title="Delete Frontend Menu">
<svg class="fill-current" width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M6 2.5H12L13 3.5H16V5H2V3.5H5L6 2.5ZM3.5 6H14.5L14 15.5H4L3.5 6ZM6.5 8.5H8V13.5H6.5V8.5ZM10 8.5H11.5V13.5H10V8.5Z" fill=""></path></svg>
</button>
</form>
</div>
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
<tr>
<td colspan="7" class="px-5 py-12 text-center">
<div class="mx-auto max-w-md">
<h4 class="mb-1 text-base font-medium text-gray-700 dark:text-gray-300">No frontend menu data found</h4>
<p class="text-sm text-gray-500 dark:text-gray-500">Click the "Create New Frontend Menu" button to add your first entry.</p>
</div>
</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
</div>
<div class="mt-6 border-t border-gray-100 pt-5 dark:border-gray-800">
<?php echo e($menus->appends(request()->query())->links('vendor.pagination.custom')); ?>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<script>
document.addEventListener('DOMContentLoaded', function () {
document.querySelectorAll('.delete-form').forEach(form => {
form.addEventListener('submit', function (e) {
e.preventDefault();
Swal.fire({
title: 'Are you sure?',
text: "You won't be able to revert this!",
icon: 'warning',
showCancelButton: true,
confirmButtonColor: '#ef4444',
cancelButtonColor: '#6b7280',
confirmButtonText: 'Yes, delete it!',
width: '380px',
padding: '1.25em'
}).then((result) => {
if (result.isConfirmed) form.submit();
});
});
});
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('backend.layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\laragon\www\dynaweb4\reddsis-dev\resources\views/backend/module/menu/frontend/index.blade.php ENDPATH**/ ?>