Merge branch 'module/timetracking'

This commit is contained in:
2025-08-28 22:52:36 +02:00
10 changed files with 176 additions and 123 deletions

View File

@@ -2,10 +2,11 @@
import { onMount } from 'svelte';
import { useTinyRouter } from 'svelte-tiny-router';
import { dragged } from './dragndrop.svelte.js';
import { api } from '../../urls.svelte.js';
import { t } from '../../translations.svelte.js';
import { timetrack } from '../../user.svelte.js';
import { dragged } from './dragndrop.svelte';
import { api } from '../../urls.svelte';
import { t } from '../../translations.svelte';
import { timetrack } from '../../user.svelte';
import { now } from '../../time.svelte';
import TaskList from './TaskList.svelte';
import LineEditor from '../../Components/LineEditor.svelte';
@@ -29,7 +30,11 @@
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
const resp = await fetch(url,{
credentials : 'include',
method : 'POST',
body : now()
}); // create new time or return time with assigned tasks
if (resp.ok) {
const track = await resp.json();
timetrack.running = track;