diff --git a/spaces/pages/timetracking.vue b/spaces/pages/timetracking.vue
index 2a59f28..3b82d50 100644
--- a/spaces/pages/timetracking.vue
+++ b/spaces/pages/timetracking.vue
@@ -9,14 +9,15 @@ const toast = useToast()
console.log(user)
const {times, projects} = storeToRefs(useDataStore())
-const {fetchTimes} = useDataStore()
-
+const {fetchTimes, getTimeTypes} = useDataStore()
+const timeTypes = getTimeTypes
const timeInfo = ref({
user: "",
start: "",
end: null,
notes: null,
- projectId: null
+ projectId: null,
+ type: null
})
const runningTimeInfo = ref({
@@ -87,6 +88,7 @@ const selectStartedTime = () => {
Stop
@@ -99,38 +101,65 @@ const selectStartedTime = () => {
- Aktuelle gestarteter Eintrag:
- {{runningTimeInfo}}
-
-
-
+
+ Aktuelle gestarteter Eintrag:
+ {{runningTimeInfo.id ? runningTimeInfo : "Keine Zeit gewählt"}}
-
-
+
+
+
-
- {{ projects.find(project => project.id === runningTimeInfo.projectId) ? projects.find(project => project.id === runningTimeInfo.projectId).name : "" }}
-
-
-
+
+
+
+
+
+
+ {{ projects.find(project => project.id === runningTimeInfo.projectId) ? projects.find(project => project.id === runningTimeInfo.projectId).name : "" }}
+ Projekt auswählen
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
- {{timeInfo}}
+
diff --git a/spaces/stores/data.ts b/spaces/stores/data.ts
index 0c20fc3..ad8bafa 100644
--- a/spaces/stores/data.ts
+++ b/spaces/stores/data.ts
@@ -11,6 +11,9 @@ export const useDataStore = defineStore('data', {
ownTenant: {
calendarConfig: {
eventTypes: [] as any[]
+ },
+ timeConfig: {
+ timeTypes: [] as any[]
}
},
profiles: [] as any[],
@@ -150,6 +153,7 @@ export const useDataStore = defineStore('data', {
}),
]
},
- getEventTypes: (state) => state.ownTenant.calendarConfig.eventTypes
+ getEventTypes: (state) => state.ownTenant.calendarConfig.eventTypes,
+ getTimeTypes: (state) => state.ownTenant.timeConfig.timeTypes
}
})
\ No newline at end of file