feat: Add pause/resume functionality to time tracking
Add pausedAt and pausedDuration columns to time_entries table. New pause/resume endpoints with audit logging. Duration calculations now correctly exclude paused time across start, stop, auto-stop, and edit flows. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -30,6 +30,20 @@ router.post(
|
||||
timeTrackingController.stopTimeEntry
|
||||
);
|
||||
|
||||
// Pause running time entry
|
||||
router.post(
|
||||
'/:entryId/pause',
|
||||
validateParams(z.object({ entryId: z.string().uuid() })),
|
||||
timeTrackingController.pauseTimeEntry
|
||||
);
|
||||
|
||||
// Resume paused time entry
|
||||
router.post(
|
||||
'/:entryId/resume',
|
||||
validateParams(z.object({ entryId: z.string().uuid() })),
|
||||
timeTrackingController.resumeTimeEntry
|
||||
);
|
||||
|
||||
// Get running time entry
|
||||
router.get('/running', timeTrackingController.getRunningTimeEntry);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user