admin: claims now reference exercices
This commit is contained in:
parent
56b79cae2d
commit
2e3f7c6894
6 changed files with 76 additions and 20 deletions
|
@ -1056,24 +1056,26 @@ angular.module("FICApp")
|
|||
$location.url("/claims/" + id);
|
||||
};
|
||||
})
|
||||
.controller("ClaimController", function($scope, Claim, ClaimAssignee, Teams, $routeParams, $location, $http) {
|
||||
.controller("ClaimController", function($scope, Claim, ClaimAssignee, Teams, Exercice, $routeParams, $location, $http) {
|
||||
$scope.claim = Claim.get({ claimId: $routeParams.claimId }, function(v) {
|
||||
v.id_team = "" + v.id_team;
|
||||
if (!v.priority)
|
||||
v.priority = "medium";
|
||||
});
|
||||
if ($routeParams.claimId == "new")
|
||||
$scope.fields = ["id_team", "subject", "priority", "id_assignee"];
|
||||
$scope.fields = ["id_team", "subject", "priority", "id_exercice", "id_assignee"];
|
||||
else
|
||||
$scope.fields = ["state", "subject", "priority", "id_assignee", "id_team", "creation"];
|
||||
$scope.fields = ["state", "subject", "priority", "id_exercice", "id_assignee", "id_team", "creation"];
|
||||
$scope.assignees = ClaimAssignee.query();
|
||||
$scope.whoami = Math.floor(getCookie("myassignee"));
|
||||
$scope.teams = Teams.get();
|
||||
$scope.namedFields = {
|
||||
$scope.exercices = Exercice.query();
|
||||
$scope.namedFields = {
|
||||
"subject": "Objet",
|
||||
"id_assignee": "Assigné a",
|
||||
"state": "État",
|
||||
"id_team": "Équipe",
|
||||
"id_exercice": "Challenge",
|
||||
"creation": "Création",
|
||||
"priority": "Priorité",
|
||||
"description": "Description",
|
||||
|
|
Reference in a new issue