Add cancel (discard) timer feature
Allows users to discard a running timer without creating a time entry.
A trash icon in the timer widget reveals a confirmation step ('Discard / Keep')
to prevent accidental data loss. Backend exposes a new DELETE /api/timer
endpoint that simply deletes the ongoingTimer row.
This commit is contained in:
@@ -30,4 +30,8 @@ export const timerApi = {
|
||||
});
|
||||
return data;
|
||||
},
|
||||
|
||||
cancel: async (): Promise<void> => {
|
||||
await apiClient.delete('/timer');
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user