Many Changes
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
<script setup>
|
||||
import * as dayjs from "dayjs";
|
||||
|
||||
definePageMeta({
|
||||
middleware: "auth"
|
||||
})
|
||||
@@ -7,7 +9,7 @@ const supabase = useSupabaseClient()
|
||||
const user = useSupabaseUser()
|
||||
const toast = useToast()
|
||||
|
||||
const {times, projects} = storeToRefs(useDataStore())
|
||||
const {times, projects, profiles} = storeToRefs(useDataStore())
|
||||
const {fetchTimes, getTimeTypes} = useDataStore()
|
||||
const timeTypes = getTimeTypes
|
||||
const timeInfo = ref({
|
||||
@@ -212,7 +214,7 @@ const selectStartedTime = () => {
|
||||
|
||||
<div class="mt-3">
|
||||
Aktuelle gestarteter Eintrag:
|
||||
{{runningTimeInfo.id ? runningTimeInfo : "Keine Zeit gewählt"}}
|
||||
{{runningTimeInfo.id ? runningTimeInfo : "Keine Zeit gestartet"}}
|
||||
|
||||
|
||||
|
||||
@@ -268,7 +270,18 @@ const selectStartedTime = () => {
|
||||
v-if="times && user"
|
||||
:columns="columns"
|
||||
:rows="times.filter(time => time.user === user.id)"
|
||||
/>
|
||||
>
|
||||
<template #user-data="{row}">
|
||||
{{profiles.find(profile => profile.id === row.user) ? profiles.find(profile => profile.id === row.user).firstName + " " + profiles.find(profile => profile.id === row.user).lastName : row.user }}
|
||||
</template>
|
||||
|
||||
<template #start-data="{row}">
|
||||
{{dayjs(row.start).format("DD.MM.YY HH:mm")}}
|
||||
</template>
|
||||
<template #end-data="{row}">
|
||||
{{dayjs(row.end).format("DD.MM.YY HH:mm")}}
|
||||
</template>
|
||||
</UTable>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user