implemented time tracking by clicking symbol at task.

next: stop running time, display running time in header

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2025-08-26 21:13:55 +02:00
parent 1ddb6af280
commit 72375b82cf
10 changed files with 79 additions and 59 deletions

View File

@@ -26,8 +26,15 @@
router.navigate(`/task/${task.id}/add_subtask`);
}
function addTime(){
router.navigate(`/time/add_task/${task.id}`);
async function addTime(){
const url = api(`time/track_task/${task.id}`);
const resp = await fetch(url,{credentials:'include'}); // create new time or return time with assigned tasks
if (resp.ok) {
const track = await resp.json();
console.log(track);
} else {
error = await resp.text();
}
}
async function deleteTask(){