diff --git a/frontend/app/scripts/controllers/case/CaseListCtrl.js b/frontend/app/scripts/controllers/case/CaseListCtrl.js index c1037d1723..5b646e6d03 100644 --- a/frontend/app/scripts/controllers/case/CaseListCtrl.js +++ b/frontend/app/scripts/controllers/case/CaseListCtrl.js @@ -72,10 +72,10 @@ loadAll: false, pageSize: self.filtering.context.pageSize, filter: this.filtering.buildQuery(), - withStats: true, operations: [ {'_name': 'listCase'} - ] + ], + extraData: ["observableStats", "taskStats", "isOwner", "shareCount"] }); }; diff --git a/frontend/app/scripts/services/common/data/PaginatedQuerySrv.js b/frontend/app/scripts/services/common/data/PaginatedQuerySrv.js index bae8409b1f..250c0f83df 100644 --- a/frontend/app/scripts/services/common/data/PaginatedQuerySrv.js +++ b/frontend/app/scripts/services/common/data/PaginatedQuerySrv.js @@ -28,6 +28,7 @@ this.streamObjectType = options.skipStream || options.objectType; this.guard = options.guard || undefined; this.withStats = options.withStats || undefined; + this.extraData = options.extraData || undefined; this.operations = options.operations; @@ -78,7 +79,7 @@ return _.extend({ from: from, to: to - }, self.withStats ? {withStats: true} : {}); + }, self.extraData ? {extraData: self.extraData} : {}); }; /* @@ -101,7 +102,7 @@ if (angular.isFunction(self.onUpdate)) { self.onUpdate(updates); } - } + } }); // get the total if not cached diff --git a/frontend/app/views/partials/case/case.list.html b/frontend/app/views/partials/case/case.list.html index 05143b5a11..73e4d7acc7 100644 --- a/frontend/app/views/partials/case/case.list.html +++ b/frontend/app/views/partials/case/case.list.html @@ -56,9 +56,9 @@

List of cases ({{$vm.list.total || 0}} of {{$vm.caseStats.
- - #{{currentCase.number}} - {{currentCase.title}}
@@ -82,18 +82,16 @@

List of cases ({{$vm.list.total || 0}} of {{$vm.caseStats. - TODO - - + ({{currentCase.extraData.shareCount || 0}}) +
@@ -101,18 +99,14 @@

List of cases ({{$vm.list.total || 0}} of {{$vm.caseStats.

- TODO - - + - TODO - - + {{currentCase.extraData.observableStats.count}} @@ -128,6 +122,7 @@

List of cases ({{$vm.list.total || 0}} of {{$vm.caseStats. +