fixing search module, and schedule module

This commit is contained in:
F4ilji
2025-04-14 19:24:18 +05:00
parent c27c1c36c1
commit cac319fa81
25 changed files with 470 additions and 257 deletions
@@ -1,37 +1,35 @@
<template>
<Link v-if="item.tag === 'Page' && item.data.is_url == false" data-hs-overlay="#hs-basic-modal" :href="route('page.view', item.data.path) + '/'" class="my-1 flex gap-3 px-2 py-2 items-center hover:bg-[#F2F2F2] rounded-lg">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5 flex-shrink-0">
<path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z" />
</svg>
<span class="text-sm">{{ item.data.title }}</span>
</Link>
<a v-if="item.tag === 'Page' && item.data.is_url == true" data-hs-overlay="#hs-basic-modal" :href="item.data.path" class="my-1 flex gap-3 px-2 py-2 items-center hover:bg-[#F2F2F2] rounded-lg">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5 flex-shrink-0">
<path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z" />
</svg>
<span class="text-sm">{{ item.data.title }}</span>
</a>
<!-- <div v-if="item.matches.length !== 0" class="">-->
<!-- <template v-for="match in item.matches.slice(0,3)">-->
<!-- <div class="flex gap-3 px-2 items-center hover:bg-[#F2F2F2] rounded-lg">-->
<!-- <div class="ml-[8px] flex h-12 w-full items-center gap-2 overflow-hidden border-l border-gray-200 px-4 pl-[22px] text-sm text-gray-900 md:h-10">-->
<!-- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5 flex-shrink-0">-->
<!-- <path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12H12m-8.25 5.25h16.5" />-->
<!-- </svg>-->
<!-- <p class="truncate">{{ match }}</p>-->
<!-- </div>-->
<!-- </div>-->
<!-- </template>-->
<!-- </div>-->
<div class="border-b w-full">
<a v-if="item.tag === 'Page' && item.data.is_url == false" :href="route('page.view', item.data.path) + '/'" target="_blank" class="rounded-lg hover:bg-[#F2F2F2] my-1 px-4 w-full flex items-center">
<BasicIcon name="page_search" class="w-5 h-5 flex-shrink-0 text-gray-500" />
<div class="px-4 space-y-1 py-2">
<p class="text-sm">{{ item.data.title }}</p>
<div v-if="item.matches.length !== 0" class="">
<p class="truncate text-[13px] text-gray-500">{{ item.matches[0] }}</p>
</div>
</div>
</a>
<a v-if="item.tag === 'Page' && item.data.is_url == true" :href="item.data.path" target="_blank" class="rounded-lg hover:bg-[#F2F2F2] my-1 px-4 w-full flex items-center">
<BasicIcon name="page_search" class="w-5 h-5 flex-shrink-0 text-gray-500" />
<div class="px-4 space-y-1 py-2">
<p class="text-sm">{{ item.data.title }}</p>
<div v-if="item.matches.length !== 0" class="">
<p class="truncate text-[13px] text-gray-500">{{ item.matches[0] }}</p>
</div>
</div>
</a>
</div>
</template>
<script>
import {Link} from "@inertiajs/vue3";
import BasicIcon from "@/componentss/ui/icons/BasicIcon.vue";
export default {
name: "ResultPageItem",
components: {Link},
components: {BasicIcon, Link},
data() {
return {
selectedCategory: 'All',