src/app/planning/delivery-round/delivery-round.service.js
File delivery-round.service.js
has 342 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict'
angular.module('planning')
.service('deliveryRoundService', function (
dbService,
Function collateRows
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function collateRows (rows) {
var index = rows.length
var workingCCETotal = 0
var roundReport = _this.getDefaultReport()
roundReport.total = rows.length
Function getColor
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getColor (status) {
var str = status.toLowerCase()
var darkGreen = '#008548'
var lightGreen = '#00a65a'
Function zoneReportToArray
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function zoneReportToArray (roundReport) {
var collatedZones = []
var statusByZone = []
var statusReport
for (var status in roundReport.status) {
Avoid too many return
statements within this function. Open
Open
return lightOrange
Avoid too many return
statements within this function. Open
Open
return 'A_week_late'
Avoid too many return
statements within this function. Open
Open
return 'More_than_a_week_late'
Avoid too many return
statements within this function. Open
Open
return darkOrange
Avoid too many return
statements within this function. Open
Open
return black // unknown or unexpected status
Avoid too many return
statements within this function. Open
Open
return orange
Avoid too many return
statements within this function. Open
Open
return darkRed
Avoid too many return
statements within this function. Open
Open
return red
Avoid too many return
statements within this function. Open
Open
return lightRed
Avoid too many return
statements within this function. Open
Open
return 'A_day_late'