migrate select/multiselect components to Radix Vue primitives

This commit is contained in:
Gregor Vostrak
2026-02-02 00:56:06 +01:00
parent 3707f2469c
commit 756b423295
24 changed files with 615 additions and 930 deletions

View File

@@ -0,0 +1,29 @@
import { useQuery } from '@tanstack/vue-query';
import { api, type AggregatedTimeEntriesQueryParams, type ReportingResponse } from '@/packages/api/src';
import { getCurrentOrganizationId } from '@/utils/useUser';
import { computed, type ComputedRef, unref } from 'vue';
export function useAggregatedTimeEntriesQuery(
queryKeyPrefix: string,
filterParams: ComputedRef<AggregatedTimeEntriesQueryParams>
) {
const query = useQuery<ReportingResponse>({
queryKey: computed(() => [
'aggregatedTimeEntries',
queryKeyPrefix,
getCurrentOrganizationId(),
unref(filterParams),
]),
queryFn: () =>
api.getAggregatedTimeEntries({
params: {
organization: getCurrentOrganizationId() || '',
},
queries: unref(filterParams),
}),
enabled: computed(() => !!getCurrentOrganizationId()),
staleTime: 1000 * 30,
});
return query;
}