|
|
|
|
@ -177,6 +177,30 @@
@@ -177,6 +177,30 @@
|
|
|
|
|
router.navigate(`/task/${task_id}/view`) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
async function save_bookmark(){ |
|
|
|
|
const user_ids = Object.values(project.members).map(member => member.user.id); |
|
|
|
|
const data = { |
|
|
|
|
url: location.href, |
|
|
|
|
tags: ['Kanban', project.name, filter_input], |
|
|
|
|
comment: `${project.name}: ${filter_input}`, |
|
|
|
|
share: user_ids |
|
|
|
|
} |
|
|
|
|
const url = api('bookmark'); |
|
|
|
|
const resp = await fetch(url,{ |
|
|
|
|
credentials : 'include', |
|
|
|
|
method : 'POST', |
|
|
|
|
body : JSON.stringify(data) |
|
|
|
|
}); |
|
|
|
|
if (resp.ok) { |
|
|
|
|
yikes(); |
|
|
|
|
router.navigate('/bookmark'); |
|
|
|
|
} else { |
|
|
|
|
error(resp); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
console.log(data); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
onMount(load); |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
@ -193,6 +217,9 @@
@@ -193,6 +217,9 @@
|
|
|
|
|
<span class="filter"> |
|
|
|
|
<input type="text" bind:value={filter_input} autofocus /> |
|
|
|
|
{t('filter')} |
|
|
|
|
<button style="visibility:{filter_input ? 'visible' : 'hidden'}" onclick={save_bookmark}> |
|
|
|
|
<span class="symbol"></span> {t('save_object',{object:t('bookmark')})} |
|
|
|
|
</button> |
|
|
|
|
</span> |
|
|
|
|
<div class="head">{t('user')}</div> |
|
|
|
|
{#if project.allowed_states} |
|
|
|
|
|