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
@@ -13,6 +13,7 @@ import CategoryBadge from "@/componentss/shared/badge/badges/CategoryBadge.vue";
import TagBadge from "@/componentss/shared/badge/badges/TagBadge.vue";
import SortingByBadge from "@/componentss/shared/badge/badges/SortingByBadge.vue";
import IsOnlineBadge from "@/componentss/shared/badge/badges/IsOnlineBadge.vue";
import EduBudgetBadge from "@/componentss/shared/badge/badges/EduBudgetBadge.vue";
export default {
name: "BasicListBadge",
components: {
@@ -21,7 +22,8 @@ export default {
CategoryBadge,
TagBadge,
SortingByBadge,
IsOnlineBadge
IsOnlineBadge,
EduBudgetBadge
},
data() {
return {
@@ -34,7 +36,8 @@ export default {
category: 'CategoryBadge',
tag: 'TagBadge',
sort: 'SortingByBadge',
is_online: 'IsOnlineBadge'
is_online: 'IsOnlineBadge',
budget: 'EduBudgetBadge'
};
return componentMap[type] || null;
},
@@ -0,0 +1,48 @@
<template>
<span v-if="filter.value !== null" class="inline-flex items-center gap-x-1.5 py-1.5 ps-3 pe-2 rounded-full text-xs font-medium bg-blue-100 text-blue-800">
{{ BudgetEducation.fromName(filter.value).label }}
<button @click.prevent="clearFilter" type="button" class="shrink-0 size-4 inline-flex items-center justify-center rounded-full hover:bg-primary-lighter focus:outline-none focus:bg-blue-200 focus:text-blue-500">
<span class="sr-only">Remove badge</span>
<svg class="shrink-0 size-3" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M18 6 6 18"></path>
<path d="m6 6 12 12"></path>
</svg>
</button>
</span>
</template>
<script>
import {Link} from "@inertiajs/vue3";
import slugify from "slugify";
import BudgetEducation from "@/Enum/BudgetEducation.js";
export default {
name: "EduBudgetBadge",
components: {Link},
computed: {
BudgetEducation() {
return BudgetEducation
}
},
methods: {
clearFilter() {
let url = new URL(window.location.href);
url.searchParams.delete(this.filter.param);
let newUrl = url.toString();
this.$inertia.visit(newUrl,{
method: 'get',
});
},
},
props: {
filter: {
type: Object,
},
},
}
</script>
<style scoped>
</style>