New setting delegated_qa to store QA managers

This commit is contained in:
nemunaire 2023-07-25 09:04:31 +02:00
parent e000778696
commit d2f409db7a
11 changed files with 148 additions and 20 deletions

View file

@ -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 !');