order & limit implementation WIP

This commit is contained in:
zadam
2020-05-25 00:25:47 +02:00
parent b5627b138a
commit a1a744bb00
11 changed files with 470 additions and 77 deletions

View File

@@ -107,6 +107,18 @@ class Note {
return this.attributes.find(attr => attr.type === type && attr.name === name);
}
getLabelValue(name) {
const label = this.attributes.find(attr => attr.type === 'label' && attr.name === name);
return label ? label.value : null;
}
getRelationTarget(name) {
const relation = this.attributes.find(attr => attr.type === 'relation' && attr.name === name);
return relation ? relation.targetNote : null;
}
get isArchived() {
return this.hasAttribute('label', 'archived');
}