adds statistics

This commit is contained in:
2026-02-16 19:15:23 +01:00
parent 2311cd8265
commit 9206453394
12 changed files with 613 additions and 58 deletions

View File

@@ -56,6 +56,41 @@ export interface TimeEntryFilters {
limit?: number;
}
export interface StatisticsFilters {
startDate?: string;
endDate?: string;
projectId?: string;
clientId?: string;
}
export interface ProjectStatistics {
projectId: string;
projectName: string;
projectColor: string | null;
totalSeconds: number;
entryCount: number;
}
export interface ClientStatistics {
clientId: string;
clientName: string;
totalSeconds: number;
entryCount: number;
}
export interface TimeStatistics {
totalSeconds: number;
entryCount: number;
byProject: ProjectStatistics[];
byClient: ClientStatistics[];
filters: {
startDate: string | null;
endDate: string | null;
projectId: string | null;
clientId: string | null;
};
}
export interface PaginatedTimeEntries {
entries: TimeEntry[];
pagination: {
@@ -102,4 +137,4 @@ export interface UpdateTimeEntryInput {
endTime?: string;
description?: string;
projectId?: string;
}
}