Viewing file: db0eddec8ddac0bb5a1aa2ebfca8f2d1.php (15 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<div> <?php if(!$active_category): ?> <div class="flex justify-center"> <button type="button" wire:click="openModal" class="border border-primary-500 px-3 py-2 rounded-md inline-flex gap-2 items-center shadow-md hover:scale-105 transition-all duration-300 hover:bg-primary-50 bg-transparent"> <img src="<?php echo e(asset('frontend/images/color-category.png')); ?>" alt=""> <span><?php echo e(__('choose_category')); ?></span> </button> </div> <?php endif; ?> <?php if($active_subcategory || $active_category): ?> <div class="flex justify-center gap-2 items-center mt-5"> <span><?php echo e(@$active_category); ?></span> <?php if(@$active_subcategory): ?> <i class="text-primary-500"><?php if (isset($component)) { $__componentOriginalfb582548d33a99a570ca8e146a6d17c2 = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginalfb582548d33a99a570ca8e146a6d17c2 = $attributes; } ?> <?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.svg.chevron-right','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('svg.chevron-right'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginalfb582548d33a99a570ca8e146a6d17c2)): ?> <?php $attributes = $__attributesOriginalfb582548d33a99a570ca8e146a6d17c2; ?> <?php unset($__attributesOriginalfb582548d33a99a570ca8e146a6d17c2); ?> <?php endif; ?> <?php if (isset($__componentOriginalfb582548d33a99a570ca8e146a6d17c2)): ?> <?php $component = $__componentOriginalfb582548d33a99a570ca8e146a6d17c2; ?> <?php unset($__componentOriginalfb582548d33a99a570ca8e146a6d17c2); ?> <?php endif; ?></i> <span><?php echo e(@$active_subcategory); ?></span> <i class="text-primary-500"><?php if (isset($component)) { $__componentOriginalfb582548d33a99a570ca8e146a6d17c2 = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginalfb582548d33a99a570ca8e146a6d17c2 = $attributes; } ?> <?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.svg.chevron-right','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('svg.chevron-right'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginalfb582548d33a99a570ca8e146a6d17c2)): ?> <?php $attributes = $__attributesOriginalfb582548d33a99a570ca8e146a6d17c2; ?> <?php unset($__attributesOriginalfb582548d33a99a570ca8e146a6d17c2); ?> <?php endif; ?> <?php if (isset($__componentOriginalfb582548d33a99a570ca8e146a6d17c2)): ?> <?php $component = $__componentOriginalfb582548d33a99a570ca8e146a6d17c2; ?> <?php unset($__componentOriginalfb582548d33a99a570ca8e146a6d17c2); ?> <?php endif; ?></i> <?php endif; ?>
<button type="button" class="inline-flex gap-2 items-center hover:text-primary-500" wire:click="openModal"> <?php if (isset($component)) { $__componentOriginal517b517e37b9549d06dbae124fb2767e = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginal517b517e37b9549d06dbae124fb2767e = $attributes; } ?> <?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.frontend.icons.edit','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('frontend.icons.edit'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginal517b517e37b9549d06dbae124fb2767e)): ?> <?php $attributes = $__attributesOriginal517b517e37b9549d06dbae124fb2767e; ?> <?php unset($__attributesOriginal517b517e37b9549d06dbae124fb2767e); ?> <?php endif; ?> <?php if (isset($__componentOriginal517b517e37b9549d06dbae124fb2767e)): ?> <?php $component = $__componentOriginal517b517e37b9549d06dbae124fb2767e; ?> <?php unset($__componentOriginal517b517e37b9549d06dbae124fb2767e); ?> <?php endif; ?> <span><?php echo e(__('edit')); ?></span> </button> </div>
<input name="category_id" type="hidden" value="<?php echo e($active_category_id); ?>"> <input name="subcategory_id" type="hidden" value="<?php echo e($active_subcategory_id); ?>"> <?php endif; ?>
<?php if($category_modal): ?> <!-- category modal start --> <div class="fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-50 max-w-4xl w-full"> <div class="bg-white shadow-md px-8 py-6 rounded-xl relative mx-3 max-h-[80vh] overflow-x-hidden overflow-y-auto"> <h2 class="heading-06 text-primary-500 pb-3 border-b border-primary-100 mb-5"><?php echo e(__('select_a_category')); ?></h2> <div class="flex gap-2 items-center"> <div class="flex gap-2 flex-wrap justify-center"> <div class="flex gap-2 flex-wrap justify-center"> <?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <div class="inline-flex max-w-max"> <label wire:click='getSubCategories(<?php echo e(@$item->id); ?>, "<?php echo e(@$item->name); ?>")' for="cat<?php echo e(@$item->id); ?>" class="ad-category <?php echo e(@$item->id == $active_category_id ? 'ad-category-checked' : ''); ?> relative cursor-pointer group flex flex-col gap-1 items-center justify-center px-4 py-3 rounded-md bg-gray-50 border border-transparent transition-all duration-300 hover:border-primary-100 hover:bg-white hover:shadow-md"> <input type="radio" name="category" id="cat<?php echo e(@$item->id); ?>" class="hidden"> <i class="absolute -top-3 left-1/2 -translate-x-1/2 p-1 rounded-full bg-primary-100 text-primary-700"><?php if (isset($component)) { $__componentOriginal21d2b28c467828e300e4204335f4bfb3 = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginal21d2b28c467828e300e4204335f4bfb3 = $attributes; } ?> <?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.frontend.icons.check','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('frontend.icons.check'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginal21d2b28c467828e300e4204335f4bfb3)): ?> <?php $attributes = $__attributesOriginal21d2b28c467828e300e4204335f4bfb3; ?> <?php unset($__attributesOriginal21d2b28c467828e300e4204335f4bfb3); ?> <?php endif; ?> <?php if (isset($__componentOriginal21d2b28c467828e300e4204335f4bfb3)): ?> <?php $component = $__componentOriginal21d2b28c467828e300e4204335f4bfb3; ?> <?php unset($__componentOriginal21d2b28c467828e300e4204335f4bfb3); ?> <?php endif; ?></i> <img class="group-hover:scale-110 transition-all duration-300 w-8" src="<?php echo e(asset(@$item->image)); ?>" alt="<?php echo e(@$item->name); ?>"> <h3 class="body-base-500"><?php echo e(@$item->name); ?></h3> </label> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </div> </div> </div> <div> <h2 class="heading-07 text-primary-500 pb-3 border-b border-primary-100 my-5"><?php echo e(__('select_a_subcategory')); ?></h2> <ul class="flex flex-wrap gap-3" id="subcategory"> <?php $__empty_1 = true; $__currentLoopData = $subCategories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?> <li> <label wire:click='setSubCategory(<?php echo e(@$item->id); ?>, "<?php echo e(@$item->name); ?>")' for="subcat<?php echo e($item->id); ?>" class="ad-subcategory <?php echo e(@$item->id == $active_subcategory_id ? 'ad-subcategory-checked' : ''); ?> relative inline-flex justify-center items-center gap-2 transition-all duration-300 hover:-translate-y-0.5 border border-gray-100 hover:bg-gray-50 rounded-md cursor-pointer hover:text-primary-500 px-4 py-2"> <input class="hidden" type="radio" name="sub_category" id="subcat<?php echo e($item->id); ?>"> <i class="p-0.5 rounded-full bg-primary-100 text-primary-700"><?php if (isset($component)) { $__componentOriginal21d2b28c467828e300e4204335f4bfb3 = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginal21d2b28c467828e300e4204335f4bfb3 = $attributes; } ?> <?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.frontend.icons.check','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('frontend.icons.check'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginal21d2b28c467828e300e4204335f4bfb3)): ?> <?php $attributes = $__attributesOriginal21d2b28c467828e300e4204335f4bfb3; ?> <?php unset($__attributesOriginal21d2b28c467828e300e4204335f4bfb3); ?> <?php endif; ?> <?php if (isset($__componentOriginal21d2b28c467828e300e4204335f4bfb3)): ?> <?php $component = $__componentOriginal21d2b28c467828e300e4204335f4bfb3; ?> <?php unset($__componentOriginal21d2b28c467828e300e4204335f4bfb3); ?> <?php endif; ?></i> <span><?php echo e($item->name); ?></span> </label> </li> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?> <li><?php echo e(__('no_categoy_selected')); ?></li> <?php endif; ?> </ul> </div> <button type="button" class="absolute top-3 right-3 p-2 rounded-full border border-gray-100 bg-white" wire:click="closeModal"> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12" /> </svg> </button> </div> </div> <div x-cloak class="fixed top-0 left-0 w-full h-full bg-black/70 z-20" wire:click="closeModal"></div> <!-- category modal end --> <?php endif; ?>
<script> window.addEventListener('contentChanged', event => {
document.addEventListener('DOMContentLoaded', (event) => {
new Swiper(".choose-category-slider", { slidesPerView: "auto", spaceBetween: 16, modules: [Navigation], navigation: { nextEl: ".choose-category-slider_next", prevEl: ".choose-category-slider_prev", }, }); }); }); </script>
<style> .ad-category i, .ad-subcategory i { display: none; }
.ad-category-checked { background: white; border-color: var(--primary-100); color: var(--primary-500); }
.ad-subcategory-checked { background: var(--gray-50); border-color: var(--primary-100); color: var(--primary-500); }
.ad-category-checked i, .ad-subcategory-checked i { display: inline-block; } </style> </div> <?php /**PATH E:\add listing 8-9-25\addListing\resources\views/livewire/category-subcategory-component.blade.php ENDPATH**/ ?>
|