preparing to render document
This commit is contained in:
@@ -79,6 +79,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
async function render(){
|
||||
const url = `${location.protocol}//${location.host.replace('5173','8080')}/api/document/${doc.id}/pdf`;
|
||||
const resp = fetch(url,{credentials:'include'});
|
||||
if (resp.ok){
|
||||
error = null;
|
||||
} else {
|
||||
error = await resp.text();
|
||||
}
|
||||
}
|
||||
|
||||
onMount(loadDoc);
|
||||
</script>
|
||||
|
||||
@@ -199,6 +209,7 @@
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{t('document.actions')}</legend>
|
||||
<button onclick={render}>{t('document.create_pdf')}</button>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>TODO</legend>
|
||||
|
||||
Reference in New Issue
Block a user