From 2d6f9e514f017ae006621ce39d6dccce728153e6 Mon Sep 17 00:00:00 2001 From: Gregor Vostrak Date: Tue, 21 Apr 2026 20:44:33 +0200 Subject: [PATCH] add groupSimilarTimeEntries to TimeEntryGroupedTable --- .../src/TimeEntry/TimeEntryGroupedTable.vue | 43 +++++++++++-------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/resources/js/packages/ui/src/TimeEntry/TimeEntryGroupedTable.vue b/resources/js/packages/ui/src/TimeEntry/TimeEntryGroupedTable.vue index 93133a6c..3daac985 100644 --- a/resources/js/packages/ui/src/TimeEntry/TimeEntryGroupedTable.vue +++ b/resources/js/packages/ui/src/TimeEntry/TimeEntryGroupedTable.vue @@ -20,25 +20,30 @@ const selectedTimeEntries = defineModel('selected', { default: [], }); -const props = defineProps<{ - timeEntries: TimeEntry[]; - projects: Project[]; - tasks: Task[]; - tags: Tag[]; - clients: Client[]; - createTag: (name: string) => Promise; - updateTimeEntry: (entry: TimeEntry) => void; - updateTimeEntries: (ids: string[], changes: Partial) => void; - deleteTimeEntries: (entries: TimeEntry[]) => void; - createTimeEntry: (entry: Omit) => void; - createProject: (project: CreateProjectBody) => Promise; - createClient: (client: CreateClientBody) => Promise; - currency: string; - organizationBillableRate: number | null; - enableEstimatedTime: boolean; - canCreateProject: boolean; - groupSimilarTimeEntries: boolean; -}>(); +const props = withDefaults( + defineProps<{ + timeEntries: TimeEntry[]; + projects: Project[]; + tasks: Task[]; + tags: Tag[]; + clients: Client[]; + createTag: (name: string) => Promise; + updateTimeEntry: (entry: TimeEntry) => void; + updateTimeEntries: (ids: string[], changes: Partial) => void; + deleteTimeEntries: (entries: TimeEntry[]) => void; + createTimeEntry: (entry: Omit) => void; + createProject: (project: CreateProjectBody) => Promise; + createClient: (client: CreateClientBody) => Promise; + currency: string; + organizationBillableRate: number | null; + enableEstimatedTime: boolean; + canCreateProject: boolean; + groupSimilarTimeEntries?: boolean; + }>(), + { + groupSimilarTimeEntries: true, + } +); const groupedTimeEntries = computed(() => { const groupedEntriesByDay: Record = {};