admin: Fix summary table on home page
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
nemunaire 2022-06-01 13:25:58 +02:00
parent b7a36f906c
commit 595318e7b1
2 changed files with 16 additions and 20 deletions

View file

@ -452,6 +452,9 @@ angular.module("FICApp")
.run(function($rootScope, $http, $interval, Settings, $location) {
$rootScope.$location = $location;
$rootScope.Utils = {
keys : Object.keys
};
function refresh() {
$http.get("api/settings.json").then(function(response) {
response.data.start = new Date(response.data.start);
@ -1720,8 +1723,14 @@ angular.module("FICApp")
}
})
.controller("ExercicesStatsController", function($scope, ExercicesStats) {
$scope.exercices = ExercicesStats.query();
.controller("ExercicesStatsController", function($scope, Themes, ExercicesStats) {
$scope.themes = Themes.get();
$scope.exercices = {};
ExercicesStats.query().$promise.then(function (exs) {
exs.forEach(function (ex) {
$scope.exercices[ex.id_exercice] = ex;
})
});
})
.controller("ExerciceStatsController", function($scope, ExerciceStats, $routeParams) {