Merge branch 'feature/easy-complete' into dev
Build Docker Image / Docker-Build (push) Successful in 2m52s
Build Docker Image / Clean-Registry (push) Successful in 6s

This commit is contained in:
2026-05-19 16:06:22 +02:00
2 changed files with 70 additions and 75 deletions
+68 -74
View File
@@ -1,7 +1,7 @@
<script>
import { useTinyRouter } from 'svelte-tiny-router';
import { api } from '../../urls.svelte.js';
import { api, post } from '../../urls.svelte.js';
import { error, yikes } from '../../warn.svelte';
import { t } from '../../translations.svelte.js';
@@ -21,13 +21,9 @@
});
async function onsubmit(ev){
ev.preventDefault();
if (ev) ev.preventDefault();
const url = api('project');
var resp = await fetch(url,{
credentials : 'include',
method : 'POST',
body : JSON.stringify(project)
});
var resp = await post(url,project);
if (resp.ok){
var newProject = await resp.json();
router.navigate(`/project/${newProject.id}/view`);
@@ -50,72 +46,70 @@
label{ display: block }
</style>
<form {onsubmit}>
<fieldset>
<legend>
{t('create_new_project')}
</legend>
<fieldset>
<legend>
{t('create_new_project')}
</legend>
<fieldset>
<legend>{t('basic_data')}</legend>
<table>
<tbody>
<tr>
<th>
{t('company_optional')}
</th>
<td>
<CompanySelector caption={t('no_company')} {onselect} />
</td>
</tr>
<tr>
<th>
{t('Name')}
</th>
<td>
<input type="text" bind:value={project.name}/>
</td>
</tr>
<tr>
<th>
{t('description')}
</th>
<td>
<MarkdownEditor bind:value={project.description} simple={true} />
</td>
</tr>
{#if showSettings}
<tr>
<th>
{t('settings')}
</th>
<td>
<label>
<input type="checkbox" bind:checked={project.settings.show_closed} />
{t('display_closed_tasks')}
</label>
</td>
</tr>
{:else}
<tr>
<th>
{t('settings')}
</th>
<td>
<button onclick={toggleSettings} >{t('extended_settings')}</button>
</td>
</tr>
{/if}
<tr>
<th>
{t('tags')}
</th>
<td>
<Tags module="project" bind:tags={project.tags} />
</td>
</tr>
</tbody>
</table>
</fieldset>
<button type="submit" disabled={!ready}>{t('create')}</button>
<legend>{t('basic_data')}</legend>
<table>
<tbody>
<tr>
<th>
{t('company_optional')}
</th>
<td>
<CompanySelector caption={t('no_company')} {onselect} />
</td>
</tr>
<tr>
<th>
{t('Name')}
</th>
<td>
<input type="text" bind:value={project.name}/>
</td>
</tr>
<tr>
<th>
{t('description')}
</th>
<td>
<MarkdownEditor bind:value={project.description} simple={true} />
</td>
</tr>
{#if showSettings}
<tr>
<th>
{t('settings')}
</th>
<td>
<label>
<input type="checkbox" bind:checked={project.settings.show_closed} />
{t('display_closed_tasks')}
</label>
</td>
</tr>
{:else}
<tr>
<th>
{t('settings')}
</th>
<td>
<button onclick={toggleSettings} >{t('extended_settings')}</button>
</td>
</tr>
{/if}
<tr>
<th>
{t('tags')}
</th>
<td>
<Tags module={null} bind:tags={project.tags} onEmptyCommit={onsubmit} />
</td>
</tr>
</tbody>
</table>
</fieldset>
</form>
<button onclick={onsubmit} disabled={!ready}>{t('create')}</button>
</fieldset>
+2 -1
View File
@@ -79,6 +79,7 @@
task.members[assignee] = project.members[assignee];
task.members[assignee].permission = { name : "ASSIGNEE", code : 3 }
}
if (task.taks.length < 1) task.tags = project.tags;
yikes();
} else {
error(resp);
@@ -154,7 +155,7 @@
</div>
<div>{t('tags')}</div>
<div>
<Tags module="task" bind:tags={task.tags} />
<Tags module={null} bind:tags={task.tags} onEmptyCommit={saveTask} />
</div>
{#if extendedSettings}