add break time entries and simplified time tracker ui

This commit is contained in:
Gregor Vostrak
2026-07-21 16:48:37 +02:00
parent c07c62bfab
commit 64ca1e9115
128 changed files with 6252 additions and 437 deletions

View File

@@ -16,6 +16,7 @@ export type Invitation = InvitationsIndexResponse['data'][0];
export type TimeEntryResponse = ZodiosResponseByAlias<SolidTimeApi, 'getTimeEntries'>;
export type TimeEntry = TimeEntryResponse['data'][0];
export type TimeEntryType = TimeEntry['type'];
export type CreateTimeEntryBody = ZodiosBodyByAlias<SolidTimeApi, 'createTimeEntry'>;

View File

@@ -319,6 +319,7 @@ const OrganizationResource = z
employees_can_see_billable_rates: z.boolean(),
employees_can_manage_tasks: z.boolean(),
prevent_overlapping_time_entries: z.boolean(),
breaks_enabled: z.boolean(),
currency: z.string(),
currency_symbol: z.string(),
number_format: NumberFormat,
@@ -336,6 +337,7 @@ const OrganizationUpdateRequest = z
employees_can_see_billable_rates: z.boolean(),
employees_can_manage_tasks: z.boolean(),
prevent_overlapping_time_entries: z.boolean(),
breaks_enabled: z.boolean(),
number_format: NumberFormat,
currency_format: CurrencyFormat,
date_format: DateFormat,
@@ -420,6 +422,7 @@ const TimeEntryAggregationType = z.enum([
'billable',
'description',
'tag',
'type',
]);
const TimeEntryAggregationTypeInterval = z.enum(['day', 'week', 'month', 'year']);
const Weekday = z.enum([
@@ -479,6 +482,7 @@ const DetailedReportResource = z
active: z.union([z.boolean(), z.null()]),
member_ids: z.union([z.array(z.string()), z.null()]),
billable: z.union([z.boolean(), z.null()]),
time_entry_type: z.union([z.enum(['work', 'break']), z.null()]),
client_ids: z.union([z.array(z.string()), z.null()]),
project_ids: z.union([z.array(z.string()), z.null()]),
tag_ids: z.union([z.array(z.string()), z.null()]),
@@ -631,6 +635,7 @@ const TaskUpdateRequest = z
.passthrough();
const start = z.union([z.string(), z.null()]).optional();
const rounding_minutes = z.union([z.number(), z.null()]).optional();
const TimeEntryType = z.enum(['work', 'break']);
const TimeEntryResource = z
.object({
id: z.string(),
@@ -644,6 +649,7 @@ const TimeEntryResource = z
user_id: z.string(),
tags: z.array(z.string()),
billable: z.boolean(),
type: TimeEntryType,
})
.passthrough();
const TimeEntryStoreRequest = z
@@ -654,6 +660,7 @@ const TimeEntryStoreRequest = z
start: z.string(),
end: z.union([z.string(), z.null()]).optional(),
billable: z.boolean(),
type: TimeEntryType.optional(),
description: z.union([z.string(), z.null()]).optional(),
tags: z.union([z.array(z.string()), z.null()]).optional(),
})
@@ -667,6 +674,7 @@ const TimeEntryUpdateMultipleRequest = z
project_id: z.union([z.string(), z.null()]),
task_id: z.union([z.string(), z.null()]),
billable: z.boolean(),
type: TimeEntryType,
description: z.union([z.string(), z.null()]),
tags: z.union([z.array(z.string()), z.null()]),
})
@@ -682,6 +690,7 @@ const TimeEntryUpdateRequest = z
start: z.string(),
end: z.union([z.string(), z.null()]),
billable: z.boolean(),
type: TimeEntryType,
description: z.union([z.string(), z.null()]),
tags: z.union([z.array(z.string()), z.null()]),
})
@@ -774,6 +783,7 @@ export const schemas = {
TaskUpdateRequest,
start,
rounding_minutes,
TimeEntryType,
TimeEntryResource,
TimeEntryStoreRequest,
TimeEntryUpdateMultipleRequest,
@@ -3736,6 +3746,11 @@ Users with the permission &#x60;time-entries:view:own&#x60; can only use this en
type: 'Query',
schema: z.enum(['true', 'false']).optional(),
},
{
name: 'type',
type: 'Query',
schema: TimeEntryType.optional(),
},
{
name: 'limit',
type: 'Query',
@@ -3895,7 +3910,9 @@ Users with the permission &#x60;time-entries:view:own&#x60; can only use this en
schema: z.string(),
},
],
response: z.object({ success: z.string(), error: z.string() }).passthrough(),
response: z
.object({ success: z.array(z.string()), error: z.array(z.string()) })
.passthrough(),
errors: [
{
status: 401,
@@ -4085,6 +4102,7 @@ If the group parameters are all set to &#x60;null&#x60; or are all missing, the
'billable',
'description',
'tag',
'type',
])
.optional(),
},
@@ -4104,6 +4122,7 @@ If the group parameters are all set to &#x60;null&#x60; or are all missing, the
'billable',
'description',
'tag',
'type',
])
.optional(),
},
@@ -4137,6 +4156,11 @@ If the group parameters are all set to &#x60;null&#x60; or are all missing, the
type: 'Query',
schema: z.enum(['true', 'false']).optional(),
},
{
name: 'type',
type: 'Query',
schema: TimeEntryType.optional(),
},
{
name: 'fill_gaps_in_time_groups',
type: 'Query',
@@ -4277,6 +4301,7 @@ If the group parameters are all set to &#x60;null&#x60; or are all missing, the
'billable',
'description',
'tag',
'type',
]),
},
{
@@ -4294,6 +4319,7 @@ If the group parameters are all set to &#x60;null&#x60; or are all missing, the
'billable',
'description',
'tag',
'type',
]),
},
{
@@ -4331,6 +4357,11 @@ If the group parameters are all set to &#x60;null&#x60; or are all missing, the
type: 'Query',
schema: z.enum(['true', 'false']).optional(),
},
{
name: 'type',
type: 'Query',
schema: TimeEntryType.optional(),
},
{
name: 'fill_gaps_in_time_groups',
type: 'Query',
@@ -4459,6 +4490,11 @@ If the group parameters are all set to &#x60;null&#x60; or are all missing, the
type: 'Query',
schema: z.enum(['true', 'false']).optional(),
},
{
name: 'type',
type: 'Query',
schema: TimeEntryType.optional(),
},
{
name: 'limit',
type: 'Query',