schema/Type.js
Function exports
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
exports = module.exports = function(params) {
var mongoose = params.mongoose;
var typeSchema = new mongoose.Schema({
name: { type: String, unique: true },
Function getInitTask
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
typeSchema.statics.getInitTask = function(company) {
let model = this;
const gt = params.app.utility.gettext;
Function createDefaults
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createDefaults() {
let allTypes = [
{ _id: '5740adf51cf1a569643cc508' , color: '#303F9F', name: gt.gettext('Paid annual leave') , sortkey: 1 },