Date
@@ -83,7 +91,7 @@
{{if .Document.ProcessedAt}}
Processed
- {{formatDate .Document.ProcessedAt}}
+ {{formatDateTime .Document.ProcessedAt}}
{{end}}
{{if .Document.OriginalFile}}
@@ -380,14 +388,19 @@
document.getElementById('edit-modal').classList.toggle('hidden');
}
+ const _docMeta = {
+ id: "{{.Document.ID}}",
+ title: "{{.Document.Title}}",
+ notes: "{{.Document.Notes}}"
+ };
async function inlineUpdateCategory(newCategory) {
- const res = await fetch('/api/document/{{.Document.ID}}', {
+ const res = await fetch('/api/document/' + _docMeta.id, {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
- title: '{{.Document.Title}}',
+ title: _docMeta.title,
category: newCategory,
- notes: `{{.Document.Notes}}`
+ notes: _docMeta.notes
})
});
if (res.ok) {