Showing 52 of 150 total issues
Function exports
has 457 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(grunt) {
// Load grunt tasks automatically
require('load-grunt-tasks')(grunt);
File bundle.js
has 496 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
angular.module('lmisChromeApp')
.config(function($stateProvider) {
$stateProvider
File Gruntfile.js
has 460 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Generated on 2014-03-02 using generator-angular 0.7.1
'use strict';
module.exports = function(grunt) {
File app-config.js
has 458 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
angular.module('lmisChromeApp')
.config(function($stateProvider) {
$stateProvider
Function trackingService
has 116 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
.service('trackingService', function trackingService($q, $log, $window, $rootScope, config, utility, storageService, deviceInfoFactory, appConfigService) {
var tracker = {
sendAppView: function() {},
sendException: function() {},
sendEvent: function() {},
Function controller
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
controller: function($q, $log, mostRecentCount, productProfileFactory, $scope, $window, i18n, storageService, dashboardfactory, inventoryRulesFactory, productTypeFactory, appConfig, appConfigService, cacheService, stockOutList, utility, $rootScope, isStockCountReminderDue, stockCountFactory) {
var keys = [
{
key: 'stockBelowReorder',
File home.js
has 329 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
angular.module('lmisChromeApp')
.config(function($urlRouterProvider, $stateProvider) {
// Initial state
File inventoryrulesfactory.js
has 284 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
angular.module('lmisChromeApp')
.factory('inventoryRulesFactory', function($q, utility, $rootScope, bundleService, storageService, productProfileFactory, stockCountFactory) {
File fixture-loader-service.js
has 277 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
angular.module('lmisChromeApp')
.service('fixtureLoaderService', function($q, $http, locationService, facilityFactory, $rootScope, memoryStorageService, config, storageService, utility, pouchdb, syncService, pouchStorageService) {
Function controller
has 19 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
controller: function($q, $log, mostRecentCount, productProfileFactory, $scope, $window, i18n, storageService, dashboardfactory, inventoryRulesFactory, productTypeFactory, appConfig, appConfigService, cacheService, stockOutList, utility, $rootScope, isStockCountReminderDue, stockCountFactory) {
Function getProductTypeCounts
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var getProductTypeCounts = function($q, $log, inventoryRulesFactory, productTypeFactory, appConfig, appConfigService) {
if (typeof appConfig === 'undefined') {
var productTypeInfo = {};
return $q.when(productTypeInfo);
Function save
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$scope.save = function() {
$scope.isSaving = true;
var saveAndBroadcastStockOut = function(productList) {
Function controller
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
controller: function($q, $log, $scope, i18n, config, pouchdb, localDocs, growl) {
var dbName = 'stock-count',
remote = config.api.url + '/' + dbName;
var updateCounts = function() {
Function controller
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
controller: function ($stateParams, $state, $scope, surveyFactory, growl, appConfig, i18n, alertFactory) {
if(!$stateParams.surveyUUID){
growl.error(i18n('surveyNotFound'), {persistent: true});
return;
Function getStockLevel
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var getStockLevel = function(facility, productType) {
var deferred = $q.defer();
var promises = [];
promises.push(stockCountFactory.get.byFacility(facility));
promises.push(productProfileFactory.getByProductType(productType));
Function finalSave
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$scope.finalSave = function() {
var bundle = angular.copy($scope.bundle);
$scope.isSaving = true;
var successMsg = '';
if ($stateParams.type === logIncoming) {
Function loadAppConfig
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function loadAppConfig() {
//TODO: figure out a better way of knowing if the app has been configured or not.
return storageService.all(storageService.APP_CONFIG)
.then(function(res) {
Function save
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$scope.save = function() {
$scope.isSaving = true;
var productType = JSON.parse($scope.stockOutForm.productType);
var confirmationTitle = i18n('confirmStockOutHeader', productType.code);
var confirmationQuestion = i18n('dialogConfirmationQuestion');
Function controller
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
controller: function($log, $scope, localDocs, config, pouchdb) {
$scope.locals = localDocs.rows.map(function(local) {
return local.id;
});
Function controller
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
controller: function ($scope, $filter, currentFacility, uomList, productTypes, facilities, loggedInUser, programs, $stateParams, $state, ordersFactory) {
$scope.storage = {
uomList: uomList,
productTypes: productTypes,