New setting delegated_qa to store QA managers
This commit is contained in:
parent
e000778696
commit
d2f409db7a
11 changed files with 148 additions and 20 deletions
|
|
@ -538,6 +538,13 @@ angular.module("FICApp")
|
|||
$scope.monitor = Monitor.get();
|
||||
})
|
||||
|
||||
.controller("AllTeamAssociationsController", function($scope, $http) {
|
||||
$scope.allAssociations = [];
|
||||
$http.get("api/teams-associations.json").then(function(response) {
|
||||
$scope.allAssociations = response.data;
|
||||
})
|
||||
})
|
||||
|
||||
.controller("SettingsController", function($scope, $rootScope, NextSettings, Settings, SettingsChallenge, $location, $http, $interval) {
|
||||
$scope.nextsettings = NextSettings.query();
|
||||
$scope.erase = false;
|
||||
|
|
@ -591,7 +598,30 @@ angular.module("FICApp")
|
|||
$scope.config.disablesubmitbutton = "";
|
||||
};
|
||||
|
||||
$scope.saveChallengeInfo = function() {
|
||||
$scope.newdqa = "";
|
||||
$scope.addDelegatedQA = function() {
|
||||
if ($scope.newdqa.length) {
|
||||
if (!$scope.config.delegated_qa)
|
||||
$scope.config.delegated_qa = [];
|
||||
|
||||
$scope.config.delegated_qa.push($scope.newdqa);
|
||||
$scope.saveSettings();
|
||||
$scope.newdqa = "";
|
||||
}
|
||||
}
|
||||
$scope.dropDelegatedQA = function(member) {
|
||||
if ($scope.config.delegated_qa) {
|
||||
$scope.config.delegated_qa = [];
|
||||
|
||||
angular.forEach($scope.config.delegated_qa, function(m, k) {
|
||||
if (member == m)
|
||||
$scope.config.delegated_qa.splice(k, 1);
|
||||
});
|
||||
$scope.saveSettings();
|
||||
}
|
||||
}
|
||||
|
||||
$scope.saveChallengeInfo = function() {
|
||||
this.challenge.duration = $scope.duration;
|
||||
this.challenge.$update(function(response) {
|
||||
$scope.addToast('success', 'Infos du challenge mises à jour avec succès !');
|
||||
|
|
|
|||
|
|
@ -264,6 +264,35 @@
|
|||
</div>
|
||||
</form>
|
||||
|
||||
<form ng-submit="addDelegatedQA()" class="card my-3">
|
||||
<div class="card-header">
|
||||
<h3>Managers QA</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<ul>
|
||||
<li ng-repeat="m in config.delegated_qa">
|
||||
{{ m }}
|
||||
<button class="btn btn-sm btn-danger" type="button" ng-click="dropDelegatedQA(m)">
|
||||
<span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
|
||||
</button>
|
||||
</li>
|
||||
<li class="row">
|
||||
<div class="col" ng-controller="AllTeamAssociationsController">
|
||||
<select class="form-control form-control-sm" ng-model="newdqa">
|
||||
<option ng-repeat="(i,m) in allAssociations" ng-value="m">{{ m }}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col input-group">
|
||||
<input type="text" class="form-control form-control-sm" ng-model="newdqa" placeholder="Nouveau manager QA">
|
||||
<span class="input-group-append">
|
||||
<button class="btn btn-sm btn-success" ng-disabled="!newdqa.length"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span></button>
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form ng-submit="saveChallengeInfo()" class="card my-3">
|
||||
<div class="card-header">
|
||||
<button type="submit" class="btn btn-success float-right" title="Enregistrer les modifications aux infos du challenge"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span></button>
|
||||
|
|
|
|||
Reference in a new issue