gadael/gadael

View on GitHub
schema/Type.js

Summary

Maintainability
B
6 hrs
Test Coverage

Function exports has 80 lines of code (exceeds 25 allowed). Consider refactoring.
Open

exports = module.exports = function(params) {

    var mongoose = params.mongoose;
    var typeSchema = new mongoose.Schema({
        name: { type: String, unique: true },
Severity: Major
Found in schema/Type.js - About 3 hrs to fix

    Function getInitTask has 41 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        typeSchema.statics.getInitTask = function(company) {
    
            let model = this;
    
            const gt = params.app.utility.gettext;
    Severity: Minor
    Found in schema/Type.js - About 1 hr to fix

      Function createDefaults has 36 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              function createDefaults() {
      
      
                  let allTypes = [
                      { _id: '5740adf51cf1a569643cc508' , color: '#303F9F',  name: gt.gettext('Paid annual leave')                , sortkey: 1 },
      Severity: Minor
      Found in schema/Type.js - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status