From 36371f94e8b497fc29bba1b00761afdb12484109 Mon Sep 17 00:00:00 2001 From: flfeders Date: Wed, 6 Dec 2023 22:26:36 +0100 Subject: [PATCH] Some Changes in TimeTracking and boosting Mobile View --- spaces/pages/timetracking.vue | 85 +++++++++++++++++++++++------------ spaces/stores/data.ts | 6 ++- 2 files changed, 62 insertions(+), 29 deletions(-) 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"}} - - + +
+ - - - + + + + + + + + + + + + +
+ + + +
+ - - - {{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