import vault
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<%*
|
||||
// event: makes this note a timeline event such as a meeting, decision, incident or worklog.
|
||||
const componentName = "event";
|
||||
const file = tp.file.find_tfile(tp.file.path(true));
|
||||
|
||||
setTimeout(async () => {
|
||||
await tp.app.fileManager.processFrontMatter(file, (frontmatter) => {
|
||||
const components = Array.isArray(frontmatter["components"]) ? frontmatter["components"] : [];
|
||||
if (!components.includes(componentName)) components.push(componentName);
|
||||
|
||||
frontmatter["components"] = components;
|
||||
frontmatter["event_kind"] = frontmatter["event_kind"] ?? "note";
|
||||
frontmatter["event_status"] = frontmatter["event_status"] ?? "occurred";
|
||||
frontmatter["event_location"] = frontmatter["event_location"] ?? "";
|
||||
frontmatter["event_participants"] = frontmatter["event_participants"] ?? [];
|
||||
frontmatter["event_outcome"] = frontmatter["event_outcome"] ?? "";
|
||||
});
|
||||
}, 300)
|
||||
-%>
|
||||
|
||||
## Event
|
||||
|
||||
### Participants
|
||||
|
||||
|
||||
### Notes
|
||||
|
||||
|
||||
### Outcome
|
||||
Reference in New Issue
Block a user