delete note fixes

This commit is contained in:
zadam
2021-05-08 23:31:20 +02:00
parent 84246fd197
commit 9afea492db
9 changed files with 46 additions and 45 deletions

View File

@@ -551,6 +551,17 @@ class Note extends AbstractEntity {
}
}
/**
* @returns {Attribute} attribute belonging to this specific note (excludes inherited attributes)
*
* This method can be significantly faster than the getAttribute()
*/
getOwnedAttribute(type, name) {
const attrs = this.getOwnedAttributes(type, name);
return attrs.length > 0 ? attrs[0] : null;
}
get isArchived() {
return this.hasAttribute('label', 'archived');
}
@@ -773,6 +784,10 @@ class Note extends AbstractEntity {
return this.ancestorCache;
}
getTargetRelations() {
return this.targetRelations;
}
/** @return {Note[]} - returns only notes which are templated, does not include their subtrees
* in effect returns notes which are influenced by note's non-inheritable attributes */
get templatedNotes() {