Skip to content
Snippets Groups Projects
Commit fc1b9e76 authored by Konrad Mohrfeldt's avatar Konrad Mohrfeldt :koala:
Browse files

feat: allow users to show inactive schedules

refs #246
parent 386fde9d
No related branches found
No related tags found
No related merge requests found
Pipeline #7225 failed
<template>
<ASection :title="t('showSchedules.title')">
<template #header>
<div class="tw-ml-auto">
<RadioGroup
v-model="scheduleSelection"
:choices="[
{ value: 'all', label: t('showSchedules.selection.all') },
{ value: 'relevant', label: t('showSchedules.selection.relevant') },
]"
name="display-mode"
/>
</div>
</template>
<div class="aura-table-wrapper tw-mb-0">
<table class="aura-table">
<thead>
......@@ -53,6 +66,7 @@ import { useQuery } from '@/util'
import ASection from '@/components/generic/ASection.vue'
import ScheduleRow from './ScheduleRow.vue'
import RadioGroup from '@/components/generic/RadioGroup.vue'
import Pagination from '@/components/generic/Pagination.vue'
import PaginationRange from '@/components/generic/PaginationRange.vue'
......@@ -65,10 +79,11 @@ const props = defineProps<{
const { t } = useI18n()
const scheduleStore = useScheduleStore()
const page = ref(1)
const scheduleSelection = ref<'all' | 'relevant'>('relevant')
const { result } = usePaginatedList(scheduleStore.listIsolated, page, 100, {
query: useQuery(() => ({
showIds: props.show.id,
excludeInactive: '1',
excludeInactive: scheduleSelection.value === 'relevant' ? '1' : undefined,
})),
})
</script>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment