* refactoring of repository layer to represent booleans as true/false instead of 1/0

* show list of inherited attributes, fixes #136
* properly work with inheritance
This commit is contained in:
azivner
2018-08-07 11:38:00 +02:00
parent d3e44b37e9
commit 5f36856571
14 changed files with 127 additions and 45 deletions

View File

@@ -62,7 +62,7 @@ function RelationsModel() {
const relationData = relation();
if (relationData) {
relationData.isDeleted = 1;
relationData.isDeleted = true;
relation(relationData);
@@ -115,7 +115,7 @@ function RelationsModel() {
};
function addLastEmptyRow() {
const relations = self.relations().filter(attr => attr().isDeleted === 0);
const relations = self.relations().filter(attr => !attr().isDeleted);
const last = relations.length === 0 ? null : relations[relations.length - 1]();
if (!last || last.name.trim() !== "" || last.targetNoteId !== "") {
@@ -123,8 +123,8 @@ function RelationsModel() {
relationId: '',
name: '',
targetNoteId: '',
isInheritable: 0,
isDeleted: 0,
isInheritable: false,
isDeleted: false,
position: 0
}));
}