change the way themes are stored in stats

This commit is contained in:
nemunaire 2017-01-24 02:17:21 +01:00 committed by Pierre-Olivier Mercier
parent 17f51f5e7b
commit 4fe641a9f5
2 changed files with 13 additions and 6 deletions

View file

@ -480,7 +480,11 @@ angular.module("FICApp")
$scope.teamstats = TeamStats.get({ teamId: $routeParams.teamId });
$scope.teamstats.$promise.then(function(res) {
solvedByLevelPie("#pieLevels", res.levels);
solvedByThemesPie("#pieThemes", res.themes);
var themes = [];
angular.forEach(res.themes, function(theme, tid) {
themes.push(theme);
})
solvedByThemesPie("#pieThemes", themes);
});
})
.controller("TeamExercicesController", function($scope, Teams, Themes, TeamMy, Exercice, $routeParams) {