@ -179,6 +179,30 @@
@@ -179,6 +179,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 >
@ -199,6 +223,9 @@
@@ -199,6 +223,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 }