Changes in Events
Changes in Times
This commit is contained in:
@@ -26,10 +26,12 @@ const resourceToAdd = ref(dataStore.activeProfile.id)
|
||||
}*/
|
||||
|
||||
|
||||
const setupPage = () => {
|
||||
const setupPage = async () => {
|
||||
if(mode.value === "show"){
|
||||
itemInfo.value = await useSupabaseSelectSingle("events",useRoute().params.id,"*, project(id,name)")
|
||||
} else if(mode.value === "edit") {
|
||||
itemInfo.value = await useSupabaseSelectSingle("events",useRoute().params.id,"*")
|
||||
|
||||
if(mode.value === "show" || mode.value === "edit"){
|
||||
itemInfo.value = dataStore.getEventById(Number(useRoute().params.id)) || {resources: [], start: new Date(), end: new Date(), type: dataStore.getEventTypes[0].label}
|
||||
}
|
||||
|
||||
if(route.query.start) itemInfo.value.start = new Date(route.query.start.replace(" ", "+"))
|
||||
@@ -91,7 +93,17 @@ setupPage()
|
||||
<template #item="{item}">
|
||||
<UCard class="mt-5">
|
||||
<div v-if="item.label === 'Informationen'">
|
||||
{{itemInfo}}
|
||||
<div class="truncate" >
|
||||
<p>Titel: {{itemInfo.title ? itemInfo.title : ''}}</p>
|
||||
<p>Typ: {{itemInfo.type? itemInfo.type : ''}}</p>
|
||||
<p>Start: {{dayjs(itemInfo.start).format("DD.MM.YY HH:mm")}}</p>
|
||||
<p>Ende: {{dayjs(itemInfo.end).format("DD.MM.YY HH:mm")}}</p>
|
||||
<p>Projekt: {{itemInfo.project ? itemInfo.project.name : ''}}</p>
|
||||
<p>Link: <a v-if="itemInfo.link" :href="itemInfo.link">{{itemInfo.link }}</a></p>
|
||||
<p>Resources: {{itemInfo.resources.map((x) => `${x.type} - ${x.title}`).join(",")}}</p>
|
||||
<p>Notizen: {{itemInfo.notes ? itemInfo.notes : ''}}</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-if="item.label === 'Logbuch'">
|
||||
<HistoryDisplay
|
||||
|
||||
Reference in New Issue
Block a user