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

fix: always allow users to show timeslot detail in calendar

parent e04e669e
No related branches found
No related tags found
No related merge requests found
Pipeline #7800 passed
...@@ -141,13 +141,7 @@ import { useRoute, useRouter } from 'vue-router' ...@@ -141,13 +141,7 @@ import { useRoute, useRouter } from 'vue-router'
import { useI18n } from '@/i18n' import { useI18n } from '@/i18n'
import { usePretty } from '@/mixins/prettyDate.js' import { usePretty } from '@/mixins/prettyDate.js'
import { import { useRRuleStore, useScheduleStore, useShowStore, useTimeSlotStore } from '@/stores'
useAuthStore,
useRRuleStore,
useScheduleStore,
useShowStore,
useTimeSlotStore,
} from '@/stores'
import { useHasUserPermission } from '@/stores/auth' import { useHasUserPermission } from '@/stores/auth'
import { import {
calculateDurationSeconds, calculateDurationSeconds,
...@@ -180,7 +174,6 @@ const rruleStore = useRRuleStore() ...@@ -180,7 +174,6 @@ const rruleStore = useRRuleStore()
const timeslotStore = useTimeSlotStore() const timeslotStore = useTimeSlotStore()
const scheduleStore = useScheduleStore() const scheduleStore = useScheduleStore()
const showStore = useShowStore() const showStore = useShowStore()
const authStore = useAuthStore()
const { locale, t } = useI18n() const { locale, t } = useI18n()
const { prettyDate } = usePretty() const { prettyDate } = usePretty()
...@@ -397,8 +390,6 @@ async function eventSelected({ event }) { ...@@ -397,8 +390,6 @@ async function eventSelected({ event }) {
else { else {
const selectedTimeslotId = event.extendedProps.id const selectedTimeslotId = event.extendedProps.id
const timeslot = timeslots.value.find((slot) => slot.id === selectedTimeslotId) const timeslot = timeslots.value.find((slot) => slot.id === selectedTimeslotId)
const show = await showStore.retrieve(timeslot.showId, { useCached: true })
if (!authStore.isOwner(show.ownerIds)) return
await EditSchedule.start(timeslot) await EditSchedule.start(timeslot)
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment