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:
@@ -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(){
|
||||
|
||||
Reference in New Issue
Block a user