implemented storing of tasks

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2025-07-23 23:28:05 +02:00
parent 9cbcfb3b7f
commit d2776bd3b0
7 changed files with 97 additions and 14 deletions

View File

@@ -3,6 +3,7 @@
import { api } from '../../urls.svelte.js';
import { user } from '../../user.svelte.js';
import { onMount } from 'svelte';
import { useTinyRouter } from 'svelte-tiny-router';
import MarkdownEditor from '../../Components/MarkdownEditor.svelte';
import MemberEditor from '../../Components/MemberEditor.svelte';
@@ -15,6 +16,7 @@
description : { source : '', rendered : '' },
members : {}
});
let router = useTinyRouter();
function load(){
if (project_id) loadProject();
@@ -34,7 +36,7 @@
const resp = await fetch(url,{credentials:'include'});
if (resp.ok){
project = await resp.json();
task.project_id = project_id;
task.project_id = +project_id;
task.members = JSON.parse(JSON.stringify(project.members)); // deep copy
error = null;
} else {
@@ -96,7 +98,7 @@
{t('description')}
</th>
<td>
<MarkdownEditor bind:value={task.description} start_open={true}/>
<MarkdownEditor bind:value={task.description} simple={true}/>
</td>
</tr>
<tr>