mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-19 05:32:16 +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({
|
api.getTimeEntries({
|
||||||
queries: {
|
queries: {
|
||||||
active: 'true',
|
active: 'true',
|
||||||
|
user_id: getCurrentUserId(),
|
||||||
},
|
},
|
||||||
params: {
|
params: {
|
||||||
organization: organizationId,
|
organization: organizationId,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { defineStore } from 'pinia';
|
import { defineStore } from 'pinia';
|
||||||
import { getCurrentOrganizationId } from '@/utils/useUser';
|
import { getCurrentOrganizationId, getCurrentUserId } from '@/utils/useUser';
|
||||||
import { api } from '../../../openapi.json.client';
|
import { api } from '../../../openapi.json.client';
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import type { TimeEntry } from '@/utils/api';
|
import type { TimeEntry } from '@/utils/api';
|
||||||
@@ -21,6 +21,7 @@ export const useTimeEntriesStore = defineStore('timeEntries', () => {
|
|||||||
},
|
},
|
||||||
queries: {
|
queries: {
|
||||||
only_full_dates: 'true',
|
only_full_dates: 'true',
|
||||||
|
user_id: getCurrentUserId(),
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
undefined,
|
undefined,
|
||||||
@@ -46,6 +47,7 @@ export const useTimeEntriesStore = defineStore('timeEntries', () => {
|
|||||||
},
|
},
|
||||||
queries: {
|
queries: {
|
||||||
only_full_dates: 'true',
|
only_full_dates: 'true',
|
||||||
|
user_id: getCurrentUserId(),
|
||||||
before: dayjs(latestTimeEntry.start).utc().format(),
|
before: dayjs(latestTimeEntry.start).utc().format(),
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
|||||||
Reference in New Issue
Block a user