feat: track current tab in batches and courses page

This commit is contained in:
Hussain Nagaria
2025-03-12 14:08:25 +05:30
parent 2a59d9ff04
commit 5b3c0685ac
2 changed files with 4 additions and 2 deletions

View File

@@ -105,6 +105,7 @@ import {
Select,
TabButtons,
} from 'frappe-ui'
import { useRouteQuery } from '@vueuse/router'
import { computed, inject, onMounted, ref, watch } from 'vue'
import { BookOpen, Plus } from 'lucide-vue-next'
import { updateDocumentTitle } from '@/utils'
@@ -119,7 +120,7 @@ const currentCategory = ref(null)
const title = ref('')
const certification = ref(false)
const filters = ref({})
const currentTab = ref(user.data?.is_student ? 'All' : 'Upcoming')
const currentTab = useRouteQuery('tab', user.data?.is_student ? 'All' : 'Upcoming')
const orderBy = ref('start_date')
onMounted(() => {

View File

@@ -105,6 +105,7 @@ import {
Select,
TabButtons,
} from 'frappe-ui'
import { useRouteQuery } from '@vueuse/router'
import { computed, inject, onMounted, ref, watch } from 'vue'
import { BookOpen, Plus } from 'lucide-vue-next'
import { updateDocumentTitle } from '@/utils'
@@ -119,7 +120,7 @@ const currentCategory = ref(null)
const title = ref('')
const certification = ref(false)
const filters = ref({})
const currentTab = ref('Live')
const currentTab = useRouteQuery('tab', 'Live')
onMounted(() => {
setFiltersFromQuery()