mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-14 03:02:15 +01:00
Enable npm workspaces and update dependencies
This commit is contained in:
@@ -264,17 +264,17 @@ function prefetchProjectMembers(queryClient: QueryClient, projectId: string) {
|
||||
*/
|
||||
function findPrefetcher(url: string): ((queryClient: QueryClient) => void) | undefined {
|
||||
// Extract pathname from URL
|
||||
const pathname = url.startsWith('http') ? new URL(url).pathname : url.split('?')[0];
|
||||
const pathname = url.startsWith('http') ? new URL(url).pathname : url.split('?')[0]!;
|
||||
|
||||
// Try exact match first
|
||||
if (routePrefetchers[pathname]) {
|
||||
if (pathname && routePrefetchers[pathname]) {
|
||||
return routePrefetchers[pathname];
|
||||
}
|
||||
|
||||
// Try pattern matching for dynamic routes like /projects/{id}
|
||||
const projectMatch = pathname.match(/^\/projects\/([^/]+)$/);
|
||||
const projectMatch = pathname?.match(/^\/projects\/([^/]+)$/);
|
||||
if (projectMatch) {
|
||||
const projectId = projectMatch[1];
|
||||
const projectId = projectMatch[1]!;
|
||||
return (queryClient) => {
|
||||
prefetchProjects(queryClient);
|
||||
prefetchTasks(queryClient);
|
||||
|
||||
@@ -349,8 +349,8 @@ export function useCommandPalette() {
|
||||
if (cmd.permission && !cmd.permission()) continue;
|
||||
if (cmd.condition && !cmd.condition()) continue;
|
||||
|
||||
if (grouped[cmd.group]) {
|
||||
grouped[cmd.group].push(cmd);
|
||||
if (grouped[cmd.group] !== undefined) {
|
||||
grouped[cmd.group]!.push(cmd);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ export function useTimeEntriesInfiniteQuery() {
|
||||
if (!lastPage?.data || lastPage.data.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
const latestTimeEntry = lastPage.data[lastPage.data.length - 1];
|
||||
const latestTimeEntry = lastPage.data[lastPage.data.length - 1]!;
|
||||
return dayjs(latestTimeEntry.start).utc().format();
|
||||
},
|
||||
enabled: computed(() => !!organizationId.value),
|
||||
|
||||
Reference in New Issue
Block a user