update query keys to include org id, preventing stale data after organization switch

This commit is contained in:
Gregor Vostrak
2026-02-18 12:53:22 +01:00
parent 1afc16573a
commit 0fc325363d
9 changed files with 15 additions and 15 deletions

View File

@@ -37,7 +37,7 @@ const pageLimit = 15;
const currentPage = ref(1);
const { data: reportsResponse } = useQuery<ReportIndexResponse>({
queryKey: ['reports', currentPage],
queryKey: computed(() => ['reports', getCurrentOrganizationId(), currentPage.value]),
enabled: !!getCurrentOrganizationId(),
queryFn: () =>
api.getReports({