frontend: display issues related to the team
This commit is contained in:
parent
7bec409ab8
commit
a3ffdeae17
12 changed files with 238 additions and 12 deletions
|
@ -1133,13 +1133,26 @@ angular.module("FICApp")
|
|||
$scope.changeState = function(state) {
|
||||
this.claim.state = state;
|
||||
if (this.claim.id)
|
||||
this.saveClaim(false);
|
||||
this.saveClaim(state == "invalid" || state == "closed");
|
||||
}
|
||||
$scope.assignToMe = function() {
|
||||
this.claim.id_assignee = $scope.whoami;
|
||||
if (this.claim.id)
|
||||
this.saveClaim(false);
|
||||
}
|
||||
$scope.updateDescription = function(description) {
|
||||
$http({
|
||||
url: "/api/claims/" + $scope.claim.id + "/descriptions",
|
||||
method: "PUT",
|
||||
data: description
|
||||
}).then(function(response) {
|
||||
$scope.claim = Claim.get({ claimId: $routeParams.claimId }, function(v) {
|
||||
v.id_team = "" + v.id_team;
|
||||
if (!v.priority)
|
||||
v.priority = "medium";
|
||||
});
|
||||
});
|
||||
}
|
||||
$scope.saveDescription = function() {
|
||||
$http({
|
||||
url: "/api/claims/" + $scope.claim.id,
|
||||
|
@ -1152,7 +1165,7 @@ angular.module("FICApp")
|
|||
$location.url("/claims/" + $scope.claim.id + "/");
|
||||
});
|
||||
}
|
||||
$scope.saveClaim = function(backToList) {
|
||||
$scope.saveClaim = function(backToList) {
|
||||
if (this.claim.id_team) {
|
||||
this.claim.id_team = parseInt(this.claim.id_team, 10);
|
||||
} else {
|
||||
|
|
Reference in a new issue