fix(FE): show dashboard
This commit is contained in:
parent
3fe144cb19
commit
9291183a22
1 changed files with 5 additions and 3 deletions
|
@ -2,7 +2,7 @@
|
|||
import CalendarShowEvent from "@/components/content/partials/CalendarShowEvent.vue";
|
||||
import {computed, onMounted, type Ref, ref} from "vue";
|
||||
import {useAuthStore} from "@/stores/auth.store.ts";
|
||||
import ShowCreateEditForm from "@partials/ShowCreateEditForm.vue";
|
||||
import ShowCreateEditForm from "@partials/show/ShowCreateEditForm.vue";
|
||||
import {baseShow, deleteShow} from "@models/show/show.ts";
|
||||
import type {Show} from "@models/show/show";
|
||||
import type {calendarShowEvent} from "@models/misc/calendarShowEvent.ts";
|
||||
|
@ -10,6 +10,7 @@ import type { PropType} from "vue";
|
|||
|
||||
import {baseShowInstance, getShowInstances, type ShowInstance} from "@models/show/showInstance.ts";
|
||||
import {setShowInstancesForCalendar} from "@/composables/content/dashboard_page.ts";
|
||||
import {baseShowDays, getShowDays} from "@models/show/showDays.ts";
|
||||
|
||||
const auth = useAuthStore();
|
||||
const userRole = auth.userData.user.role;
|
||||
|
@ -44,8 +45,9 @@ const contextMenuEditInstance = (showInstanceId: number) => {
|
|||
showInstanceCreateEditMode.value = true;
|
||||
};
|
||||
|
||||
const contextMenuEditShow = (showInstanceId: number) => {
|
||||
const contextMenuEditShow = async (showInstanceId: number) => {
|
||||
showSelected.value = showInstances.value[showInstanceId].show;
|
||||
showSelected.value.showDays = await getShowDays({showId: showSelected.value.id, flattenShowDays: true});
|
||||
showCreateEditMode.value = true;
|
||||
};
|
||||
|
||||
|
@ -59,6 +61,7 @@ const contextMenuDeleteShow = (showInstanceId: number) => {
|
|||
|
||||
const createShow = () => {
|
||||
showSelected.value = baseShow();
|
||||
showSelected.value.showDays = baseShowDays();
|
||||
showCreateEditMode.value = true;
|
||||
};
|
||||
|
||||
|
@ -98,5 +101,4 @@ const saveShow = () => {
|
|||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
Loading…
Add table
Add a link
Reference in a new issue