change time entries requests to always filter on user_id

This commit is contained in:
Gregor Vostrak
2024-04-17 00:15:34 +02:00
parent fffa3639d3
commit 0b90407303
2 changed files with 4 additions and 1 deletions

View File

@@ -60,6 +60,7 @@ export const useCurrentTimeEntryStore = defineStore('currentTimeEntry', () => {
api.getTimeEntries({
queries: {
active: 'true',
user_id: getCurrentUserId(),
},
params: {
organization: organizationId,

View File

@@ -1,5 +1,5 @@
import { defineStore } from 'pinia';
import { getCurrentOrganizationId } from '@/utils/useUser';
import { getCurrentOrganizationId, getCurrentUserId } from '@/utils/useUser';
import { api } from '../../../openapi.json.client';
import { reactive, ref } from 'vue';
import type { TimeEntry } from '@/utils/api';
@@ -21,6 +21,7 @@ export const useTimeEntriesStore = defineStore('timeEntries', () => {
},
queries: {
only_full_dates: 'true',
user_id: getCurrentUserId(),
},
}),
undefined,
@@ -46,6 +47,7 @@ export const useTimeEntriesStore = defineStore('timeEntries', () => {
},
queries: {
only_full_dates: 'true',
user_id: getCurrentUserId(),
before: dayjs(latestTimeEntry.start).utc().format(),
},
}),