fix(FE): toggle show instance form
This commit is contained in:
parent
56697e6a8b
commit
12eb803a49
1 changed files with 6 additions and 3 deletions
|
@ -40,10 +40,13 @@ const toggleEditMode = () => {
|
|||
editMode.value = !editMode.value;
|
||||
};
|
||||
|
||||
const toggleMenuEditInstance = () => {
|
||||
showInstanceCreateEditMode.value = !showInstanceCreateEditMode.value
|
||||
}
|
||||
|
||||
const contextMenuEditInstance = (showInstanceId: number) => {
|
||||
showInstanceCreateEditMode.value = false;
|
||||
selectedShowInstance.value = showInstances.value[showInstanceId];
|
||||
showInstanceCreateEditMode.value = true;
|
||||
toggleMenuEditInstance()
|
||||
};
|
||||
|
||||
const contextMenuEditShow = async (showInstanceId: number) => {
|
||||
|
@ -77,7 +80,7 @@ const resetItemEdited = () => {
|
|||
<template>
|
||||
<template v-if="showCreateEditMode || showInstanceCreateEditMode">
|
||||
<ShowCreateEditForm v-if="showCreateEditMode" :show="showSelected" @go-back="resetItemEdited" />
|
||||
<ShowInstanceForm v-if="showInstanceCreateEditMode" :showInstance="selectedShowInstance" />
|
||||
<ShowInstanceForm v-if="showInstanceCreateEditMode" :showInstance="selectedShowInstance" @toggle-menu-edit-instance="toggleMenuEditInstance" />
|
||||
</template>
|
||||
<template v-else>
|
||||
<v-row class="ma-4 justify-space-around">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue