Changes in Events
Changes in Times
This commit is contained in:
@@ -111,6 +111,7 @@ const startTime = async () => {
|
||||
console.log("started")
|
||||
timeInfo.value.user = user.value.id
|
||||
timeInfo.value.start = new Date().toISOString()
|
||||
timeInfo.value.tenant = dataStore.currentTenant
|
||||
|
||||
const {data,error} = await supabase
|
||||
.from("times")
|
||||
@@ -251,7 +252,7 @@ const setState = async (newState) => {
|
||||
</USelectMenu>
|
||||
</template>
|
||||
</UDashboardToolbar>
|
||||
<div v-if="runningTimeInfo.id" class="mt-3">
|
||||
<div v-if="runningTimeInfo.id" class="m-3">
|
||||
|
||||
Start: {{dayjs(runningTimeInfo.start).format("DD.MM.YY HH:mm")}}
|
||||
|
||||
@@ -318,7 +319,6 @@ const setState = async (newState) => {
|
||||
:disabled="configTimeMode === 'create' ? false : itemInfo.state !== 'Entwurf'"
|
||||
/>
|
||||
</UFormGroup>
|
||||
{{itemInfo.state === 'Entwurf'}}{{itemInfo.state}}
|
||||
<UFormGroup
|
||||
label="Ende:"
|
||||
>
|
||||
|
||||
@@ -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