Add break time feature to time entries
- Add breakMinutes field to TimeEntry model and database migration - Users can now add break duration (minutes) to time entries - Break time is subtracted from total tracked duration - Validation ensures break time cannot exceed total entry duration - Statistics and client target balance calculations account for breaks - Frontend UI includes break time input in TimeEntryFormModal - Duration displays show break time deduction (e.g., '7h (−1h break)') - Both project/client statistics and weekly balance calculations updated
This commit is contained in:
@@ -31,6 +31,7 @@ export const UpdateProjectSchema = z.object({
|
||||
export const CreateTimeEntrySchema = z.object({
|
||||
startTime: z.string().datetime(),
|
||||
endTime: z.string().datetime(),
|
||||
breakMinutes: z.number().int().min(0).optional(),
|
||||
description: z.string().max(1000).optional(),
|
||||
projectId: z.string().uuid(),
|
||||
});
|
||||
@@ -38,6 +39,7 @@ export const CreateTimeEntrySchema = z.object({
|
||||
export const UpdateTimeEntrySchema = z.object({
|
||||
startTime: z.string().datetime().optional(),
|
||||
endTime: z.string().datetime().optional(),
|
||||
breakMinutes: z.number().int().min(0).optional(),
|
||||
description: z.string().max(1000).optional(),
|
||||
projectId: z.string().uuid().optional(),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user