mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-15 03:32:15 +01:00
change time entries requests to always filter on user_id
This commit is contained in:
@@ -60,6 +60,7 @@ export const useCurrentTimeEntryStore = defineStore('currentTimeEntry', () => {
|
||||
api.getTimeEntries({
|
||||
queries: {
|
||||
active: 'true',
|
||||
user_id: getCurrentUserId(),
|
||||
},
|
||||
params: {
|
||||
organization: organizationId,
|
||||
|
||||
@@ -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(),
|
||||
},
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user