[permissions] Fixed permission parsing
This commit is contained in:
parent
3db6e0d2d1
commit
9331006db3
|
@ -108,7 +108,7 @@ export default defineComponent({
|
||||||
const calendarRealView = computed(() => (calendarDays.value != 7 ? 'day' : 'week'));
|
const calendarRealView = computed(() => (calendarDays.value != 7 ? 'day' : 'week'));
|
||||||
const calendarDays = computed(() =>
|
const calendarDays = computed(() =>
|
||||||
// <= 1023 is the breakpoint for sm to md
|
// <= 1023 is the breakpoint for sm to md
|
||||||
calendarView.value == 'day' ? 1 : windowWidth.value <= 1023 ? 3 : 7
|
calendarView.value == 'day' ? 1 : (windowWidth.value <= 1023 ? 3 : 7)
|
||||||
);
|
);
|
||||||
const events = ref<Agendas>({});
|
const events = ref<Agendas>({});
|
||||||
const editor = ref<FG.Event | undefined>(undefined);
|
const editor = ref<FG.Event | undefined>(undefined);
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
<EventTypes />
|
<EventTypes />
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
<q-tab-panel name="jobtypes">
|
<q-tab-panel name="jobtypes">
|
||||||
<JobTypes v-if="canEditJobTypes" />
|
<JobTypes />
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
</q-tab-panels>
|
</q-tab-panels>
|
||||||
</q-page>
|
</q-page>
|
||||||
|
@ -58,18 +58,11 @@ export default defineComponent({
|
||||||
name: 'EventManagement',
|
name: 'EventManagement',
|
||||||
components: { EditEvent, EventTypes, JobTypes },
|
components: { EditEvent, EventTypes, JobTypes },
|
||||||
setup() {
|
setup() {
|
||||||
const canEditJobTypes = computed(() => hasPermission(PERMISSIONS.JOB_TYPE));
|
const tabs = computed(() => [
|
||||||
|
|
||||||
interface Tab {
|
|
||||||
name: string;
|
|
||||||
label: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
const tabs: Tab[] = [
|
|
||||||
{ name: 'create', label: 'Veranstaltungen' },
|
{ name: 'create', label: 'Veranstaltungen' },
|
||||||
{ name: 'eventtypes', label: 'Veranstaltungsarten' },
|
...(hasPermission(PERMISSIONS.JOB_TYPE) ? [{ name: 'jobtypes', label: 'Dienstarten' }] : []),
|
||||||
{ name: 'jobtypes', label: 'Dienstarten' },
|
...(hasPermission(PERMISSIONS.EVENT_TYPE) ? [{ name: 'eventtypes', label: 'Veranstaltungsarten' }] : [])
|
||||||
];
|
]);
|
||||||
|
|
||||||
const drawer = ref<boolean>(false);
|
const drawer = ref<boolean>(false);
|
||||||
|
|
||||||
|
@ -85,7 +78,6 @@ export default defineComponent({
|
||||||
const tab = ref<string>('create');
|
const tab = ref<string>('create');
|
||||||
|
|
||||||
return {
|
return {
|
||||||
canEditJobTypes,
|
|
||||||
showDrawer,
|
showDrawer,
|
||||||
tab,
|
tab,
|
||||||
tabs,
|
tabs,
|
||||||
|
|
Loading…
Reference in New Issue