improved css, implemented setting task state directly in project tree

This commit is contained in:
2025-07-25 23:40:22 +02:00
parent 3d81ddd3c5
commit fd906dff01
5 changed files with 37 additions and 18 deletions

View File

@@ -2,6 +2,7 @@
import { useTinyRouter } from 'svelte-tiny-router';
import { onMount } from 'svelte';
import { t } from '../../translations.svelte.js';
import { api } from '../../urls.svelte.js';
const router = useTinyRouter();
let error = $state(null);
@@ -12,7 +13,7 @@
let sortedProjects = $derived.by(() => Object.values(projects).sort((a, b) => a.name.localeCompare(b.name)));
async function loadProjects(){
let url = `${location.protocol}//${location.host.replace('5173','8080')}/api/company/list`;
let url = api('company/list');
let resp = await fetch(url,{credentials:'include'});
if (resp.ok){
companies = await resp.json();
@@ -33,7 +34,7 @@
}
async function setState(pid,state_name){
const url = `${location.protocol}//${location.host.replace('5173','8080')}/api/project/${pid}`;
const url = api(`project/${pid}`);
const resp = await fetch(url,{
credentials:'include',
method:'PATCH',