diff --git a/client/src/collections/note.js b/client/src/collections/note.js index 9d1ea45c48..2c58d18eae 100644 --- a/client/src/collections/note.js +++ b/client/src/collections/note.js @@ -29,6 +29,20 @@ Espo.define('collections/note', 'collection', function (Dep) { return Dep.extend({ + parse: function (response, params) { + var total = this.total; + var list = Dep.prototype.parse.call(this, response, params); + + if (params.data && params.data.after) { + if (total >= 0 && response.total >= 0) { + this.total = total + response.total; + } else { + this.total = total; + } + } + return list; + }, + fetchNew: function (options) { var options = options || {}; options.data = options.data || {};