diff --git a/src/ReportCard.js b/src/ReportCard.js index 1f6316f..899250c 100644 --- a/src/ReportCard.js +++ b/src/ReportCard.js @@ -22,7 +22,7 @@ class ReportCard extends BaseEntity { colour: "string", voided: {type: "bool", default: false}, nested: {type: "bool", default: false, optional: true}, - initCountOfCards: {type: "int", default: 1, optional: true}, //Used only by nested ReportCards + countOfCards: {type: "int", default: 1, optional: true}, //Used only by nested ReportCards }, }; @@ -78,12 +78,12 @@ class ReportCard extends BaseEntity { this.that.nested = x; } - get initCountOfCards() { - return this.that.initCountOfCards; + get countOfCards() { + return this.that.countOfCards; } - set initCountOfCards(x) { - this.that.initCountOfCards = x; + set countOfCards(x) { + this.that.countOfCards = x; } get iconName() { @@ -117,7 +117,7 @@ class ReportCard extends BaseEntity { static fromResource(resource, entityService) { const reportCard = General.assignFields(resource, new ReportCard(), - ["uuid", "name", "query", "description", "colour", "voided", "nested", "initCountOfCards"]); + ["uuid", "name", "query", "description", "colour", "voided", "nested", "countOfCards"]); reportCard.standardReportCardType = entityService.findByKey( "uuid", ResourceUtil.getUUIDFor(resource, "standardReportCardUUID"), diff --git a/src/Schema.js b/src/Schema.js index 36d8607..7e4e053 100644 --- a/src/Schema.js +++ b/src/Schema.js @@ -815,7 +815,7 @@ function createRealmConfig() { if (oldDB.schemaVersion < 182) { _.forEach(newDB.objects(ReportCard.schema.name), (rc) => { rc.nested = false; - rc.initCountOfCards = 1; + rc.countOfCards = 1; }); } if (newDB.schemaVersion < 183) {