admin: add button and route to reset some parts

This commit is contained in:
nemunaire 2017-01-29 13:38:39 +01:00 committed by Pierre-Olivier Mercier
parent 7478051425
commit 7597fcfe5b
4 changed files with 65 additions and 0 deletions

View file

@ -280,6 +280,13 @@ angular.module("FICApp")
var f = new Date(ts + 120000 + this.duration * 60000);
this.config.end = f.toISOString();
}
$scope.reset = function(type) {
if (confirm("Êtes-vous sûr ?")) {
$http.post("/api/reset", {"type": type}).success(function(time) {
$location.url("/");
});
}
};
})
.controller("PublicController", function($scope, Scene, Theme, Teams, Exercice) {