public/js/services/absence-edit.js
File absence-edit.js
has 448 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
define(['angular', 'services/request-edit'], function(angular, loadRequestEdit) {
'use strict';
return function(gettextCatalog) {
var RequestEdit = loadRequestEdit(gettextCatalog);
Function createDistribution
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createDistribution(renewals, periods, accountRights, matchQuantity) {
var totalSeconds = 0;
var totalDays = 0;
Function getNextButtonJob
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getNextButtonJob($scope, user, accountRights) {
return function() {
// hide the period selection
$scope.periodSelection = false;
Function distributionWatch
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function distributionWatch(distribution, $scope) {
/**
* Browse the rights appliquable for distribution
* @param {function} action function to call on each rights
*
Function setConsumedQuantities
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function setConsumedQuantities($scope, consumption, user) {
var renewals = $scope.distribution.renewal;
var periods = $scope.selection.periods;
var distribution;
Avoid too many return
statements within this function. Open
Open
return 'has-warning';
Avoid too many return
statements within this function. Open
Open
return 'has-success';