feat: userProfile

This commit is contained in:
Michael 2025-07-18 14:10:37 +02:00
parent 8f24453eff
commit 13a3de9709
16 changed files with 492 additions and 284 deletions

View file

@ -91,29 +91,31 @@ onDeactivated(() => {
</script>
<template>
<template v-if="showCreateEditMode || showInstanceCreateEditMode">
<ShowForm v-if="showCreateEditMode" :showId="showSelected" @go-back="goBack"/>
<ShowInstanceForm v-if="showInstanceCreateEditMode" :showInstance="selectedShowInstance"
@toggle-menu-edit-instance="goBack"/>
</template>
<template v-else>
<v-row class="ma-4 justify-space-around">
<template v-if="userRole && (userRole == 'admin' || userRole == 'editor')">
<v-btn color="primary" @click="createShow">Crea show</v-btn>
<v-btn color="secondary" @click="toggleEditMode">
{{ editMode ? 'Disabilita modifica calendario' : 'Abilita modifica calendario' }}
</v-btn>
</template>
</v-row>
<CalendarShowEvent
:edit-mode="editMode"
:shows="shows"
@contextMenuEditInstance="contextMenuEditInstance"
@contextMenuEditShow="contextMenuEditShow"
@contextMenuDeleteInstance="contextMenuDeleteInstance"
@contextMenuDeleteShow="contextMenuDeleteShow"
/>
</template>
<div>
<template v-if="showCreateEditMode || showInstanceCreateEditMode">
<ShowForm v-if="showCreateEditMode" :showId="showSelected" @go-back="goBack"/>
<ShowInstanceForm v-if="showInstanceCreateEditMode" :showInstance="selectedShowInstance"
@toggle-menu-edit-instance="goBack"/>
</template>
<template v-else>
<v-row class="ma-4 justify-space-around">
<template v-if="userRole && (userRole == 'admin' || userRole == 'editor')">
<v-btn color="primary" @click="createShow">Crea show</v-btn>
<v-btn color="secondary" @click="toggleEditMode">
{{ editMode ? 'Disabilita modifica calendario' : 'Abilita modifica calendario' }}
</v-btn>
</template>
</v-row>
<CalendarShowEvent
:edit-mode="editMode"
:shows="shows"
@contextMenuEditInstance="contextMenuEditInstance"
@contextMenuEditShow="contextMenuEditShow"
@contextMenuDeleteInstance="contextMenuDeleteInstance"
@contextMenuDeleteShow="contextMenuDeleteShow"
/>
</template>
</div>
</template>
<style scoped>