From df2f2e6603dec870e5c5d946c992e4c541a95aee Mon Sep 17 00:00:00 2001 From: raizasafeel <89463672+raizasafeel@users.noreply.github.com> Date: Mon, 2 Feb 2026 16:21:31 +0530 Subject: [PATCH 1/2] fix(courses): use constant value for filter instead of translated label --- frontend/src/pages/Courses/Courses.vue | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/frontend/src/pages/Courses/Courses.vue b/frontend/src/pages/Courses/Courses.vue index 0bd81158..f111efb3 100644 --- a/frontend/src/pages/Courses/Courses.vue +++ b/frontend/src/pages/Courses/Courses.vue @@ -147,7 +147,7 @@ const currentCategory = ref(null) const title = ref('') const certification = ref(false) const filters = ref({}) -const currentTab = ref('Live') +const currentTab = ref('live') const { brand } = sessionStore() const courseCount = ref(0) const router = useRouter() @@ -267,35 +267,35 @@ const updateTabFilter = () => { delete filters.value['published_on'] delete filters.value['upcoming'] - if (currentTab.value == 'Enrolled' && user.data?.is_student) { + if (currentTab.value == 'enrolled' && user.data?.is_student) { filters.value['enrolled'] = 1 delete filters.value['published'] } else { delete filters.value['published'] delete filters.value['enrolled'] - if (currentTab.value == 'Live') { + if (currentTab.value == 'live') { filters.value['published'] = 1 filters.value['upcoming'] = 0 filters.value['live'] = 1 - } else if (currentTab.value == 'Upcoming') { + } else if (currentTab.value == 'upcoming') { filters.value['upcoming'] = 1 - } else if (currentTab.value == 'New') { + } else if (currentTab.value == 'new') { filters.value['published'] = 1 filters.value['published_on'] = [ '>=', dayjs().add(-3, 'month').format('YYYY-MM-DD'), ] - } else if (currentTab.value == 'Created') { + } else if (currentTab.value == 'created') { filters.value['created'] = 1 - } else if (currentTab.value == 'Unpublished') { + } else if (currentTab.value == 'unpublished') { filters.value['published'] = 0 } } } const updateStudentFilter = () => { - if (!user.data || (user.data?.is_student && currentTab.value != 'Enrolled')) { + if (!user.data || (user.data?.is_student && currentTab.value != 'enrolled')) { filters.value['published'] = 1 } } @@ -345,12 +345,15 @@ const courseTabs = computed(() => { let tabs = [ { label: __('Live'), + value: 'live', }, { label: __('New'), + value: 'new', }, { label: __('Upcoming'), + value: 'upcoming', }, ] if ( @@ -358,10 +361,10 @@ const courseTabs = computed(() => { user.data?.is_instructor || user.data?.is_evaluator ) { - tabs.push({ label: __('Created') }) - tabs.push({ label: __('Unpublished') }) + tabs.push({ label: __('Created'), value: 'created' }) + tabs.push({ label: __('Unpublished'), value: 'unpublished' }) } else if (user.data) { - tabs.push({ label: __('Enrolled') }) + tabs.push({ label: __('Enrolled'), value: 'enrolled' }) } return tabs }) From be76268c7010e8aa6e8ebd5c5a6803596d7adbb5 Mon Sep 17 00:00:00 2001 From: raizasafeel <89463672+raizasafeel@users.noreply.github.com> Date: Mon, 2 Feb 2026 16:22:37 +0530 Subject: [PATCH 2/2] fix(batches): use constant value for filter instead of translated label --- frontend/src/pages/Batches.vue | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/frontend/src/pages/Batches.vue b/frontend/src/pages/Batches.vue index b9821622..43cc71de 100644 --- a/frontend/src/pages/Batches.vue +++ b/frontend/src/pages/Batches.vue @@ -155,7 +155,7 @@ const title = ref('') const certification = ref(false) const filters = ref({}) const is_student = computed(() => user.data?.is_student) -const currentTab = ref(is_student.value ? 'All' : 'Upcoming') +const currentTab = ref(is_student.value ? 'all' : 'upcoming') const orderBy = ref('start_date') const readOnlyMode = window.read_only_mode const router = useRouter() @@ -245,7 +245,7 @@ const updateTabFilter = () => { if (!user.data) { return } - if (currentTab.value == 'Enrolled' && is_student.value) { + if (currentTab.value == 'enrolled' && is_student.value) { filters.value['enrolled'] = 1 delete filters.value['start_date'] delete filters.value['published'] @@ -256,20 +256,20 @@ const updateTabFilter = () => { delete filters.value['start_date'] delete filters.value['published'] orderBy.value = 'start_date desc' - if (currentTab.value == 'Upcoming') { + if (currentTab.value == 'upcoming') { filters.value['start_date'] = ['>=', dayjs().format('YYYY-MM-DD')] filters.value['published'] = 1 orderBy.value = 'start_date' - } else if (currentTab.value == 'Archived') { + } else if (currentTab.value == 'archived') { filters.value['start_date'] = ['<=', dayjs().format('YYYY-MM-DD')] - } else if (currentTab.value == 'Unpublished') { + } else if (currentTab.value == 'unpublished') { filters.value['published'] = 0 } } } const updateStudentFilter = () => { - if (!user.data || (is_student.value && currentTab.value != 'Enrolled')) { + if (!user.data || (is_student.value && currentTab.value != 'enrolled')) { filters.value['start_date'] = ['>=', dayjs().format('YYYY-MM-DD')] filters.value['published'] = 1 } @@ -319,6 +319,7 @@ const batchTabs = computed(() => { let tabs = [ { label: __('All'), + value: 'all', }, ] @@ -327,11 +328,11 @@ const batchTabs = computed(() => { user.data?.is_instructor || user.data?.is_evaluator ) { - tabs.push({ label: __('Upcoming') }) - tabs.push({ label: __('Archived') }) - tabs.push({ label: __('Unpublished') }) + tabs.push({ label: __('Upcoming'), value: 'upcoming' }) + tabs.push({ label: __('Archived'), value: 'archived' }) + tabs.push({ label: __('Unpublished'), value: 'unpublished' }) } else if (user.data) { - tabs.push({ label: __('Enrolled') }) + tabs.push({ label: __('Enrolled'), value: 'enrolled' }) } return tabs })