vhp-mongo-models 1.7.0 → 1.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,13 @@
1
- /*
2
- work = [{
3
- id:{type:String,default:''},
4
- type:{type:String,default:''} //project | service
5
- }]
6
- */
7
1
  module.exports = [{
8
- id:{type:String,default:''}, //what checklist was used
2
+ id:{type:String,default:''}, //unique for THIS checklist
9
3
  hhid:{type:String,default:''},
10
- name:{type:String,default:''}, //optional name for THIS checklist
11
- work:{type:Array,default:[]},
12
- sitems:{type:Array,default:[]},//of service item ids
13
- checks:{type:Object,default:{}} //to hold all of the checklist values
14
- }]
4
+ work:{type:String,default:""}, //just an array of work.id
5
+ custcode:{type:String,default:''},
6
+ name:{type:String,default:''}, //what checklist was used
7
+ sitems:{type:Array,default:[]}, //of service item ["ids"]
8
+ scoring:{
9
+ list:{type:Object,default:{}},
10
+ score:{type:Object,default:{}},
11
+ },
12
+ fields:{type:Object,default:{}} //to hold all of the checklist values
13
+ },{minimize:false}]
@@ -70,5 +70,6 @@ module.exports = [
70
70
  },
71
71
  spaces:{type:Array,default:[]},
72
72
  froot:{type:String,default:''}
73
- }
73
+ },
74
+ {minimize:false}
74
75
  ]
@@ -1,3 +1,11 @@
1
+ /*
2
+ notes = [{
3
+ tech:{type:String,default:''},
4
+ date:{type:Date,default:null},
5
+ work:{type:String,default:''},
6
+ note:{type:String,default:''}
7
+ }]
8
+ */
1
9
  module.exports = [
2
10
  {
3
11
  //VHP ADD fields
@@ -12,8 +20,8 @@ module.exports = [
12
20
  //JONAS props
13
21
  id:{type:String,default:''}, //must have an id, should match JONAS "lineNumber"
14
22
  custcode:{type:String,default:''}, //linked custcode in JONAS
23
+ type:{type:String,default:''},//FU CU C etc
15
24
  tagid:{type:String,default:''},
16
- type:{type:String,default:''},//understand what this is in jonas
17
25
  descr:{type:String,default:''},
18
26
  status:{type:String,default:''},//should be 'A' for active. Need to find other codes. Match JONAS
19
27
  insdate:{type:Date,default:''},
@@ -43,5 +51,6 @@ module.exports = [
43
51
  filt2q:{type:String,default:'0'},
44
52
  filt3:{type:String,default:''},
45
53
  filt3q:{type:String,default:''}
46
- }
54
+ },
55
+ {minimize:false}
47
56
  ]
@@ -80,6 +80,7 @@ module.exports=[
80
80
  },
81
81
  {
82
82
  toJSON: { virtuals: true },
83
- toObject: { virtuals: true }
83
+ toObject: { virtuals: true },
84
+ minimize:false
84
85
  }
85
86
  ]
@@ -0,0 +1,40 @@
1
+
2
+ /*
3
+ input = { /GOOD
4
+ inputType:{type:String,default:''},
5
+ type:{type:String,default:''},
6
+ options:{type:Object,default:{}}
7
+ }
8
+
9
+ scoring = { /Good
10
+ cat:{type:Object,default:{}},
11
+ total:{type:Number,default:0},
12
+ type:{type:String,default:''},
13
+ points:{type:Array,default:[]}
14
+ }
15
+
16
+ calc = { /Good
17
+ id:{type:Array,default:[]},
18
+ depends:{type:Array,default:[]}
19
+ }
20
+
21
+
22
+ */
23
+ module.export=[{
24
+ id:{type:String,default:''},
25
+ title:{type:String,default:''},
26
+ desc:{type:String,default:''},
27
+ building:{type:String,default:''}, // COM | RES
28
+ input:{type:Object,default:{}},
29
+ //class:{type:String,default:''}, //remove is now id
30
+ group:{type:String,default:''},
31
+ subgroup:{type:String,default:''},
32
+ category:{type:String,default:''},
33
+ scoring:{type:Object,default:{}},
34
+ type:{type:Object,default:{}},
35
+ notes:{type:Object,default:{}},
36
+ required:{type:Boolean,default:true},
37
+ rewards:{type:Boolean,default:false},
38
+ present:{type:Boolean,default:true},
39
+ calc:{type:Object,default:{}}
40
+ },{minimize:false}]
@@ -0,0 +1,14 @@
1
+ module.exports = [{
2
+ name:{type:String,default:''},
3
+ title:{type:String,default:''},
4
+ desc:{type:String,default:''},
5
+ sitemTags:{type:Array,default:[]},
6
+ included:{type:Array,default:[]},
7
+ categories:{type:Array,default:[]},
8
+ grades:{type:Array,default:[]},
9
+ scored:{type:Boolean,default:false},
10
+ color:{type:String,default:''},
11
+ rewards:{type:Boolean,default:false},
12
+ enabled:{type:Boolean,default:true},
13
+ present:{type:Boolean,default:true}
14
+ }]
@@ -4,5 +4,7 @@ module.exports = {
4
4
  ActiveTicket:new Schema(...require('./schemas/activeticket.js')),
5
5
  CompleteTicket:new Schema(...require('./schemas/completeticket.js')),
6
6
  Spiff:new Schema(...require('./schemas/spiff.js')),
7
- SpiffReport:new Schema(...require('./schemas/spiffreport.js'))
7
+ SpiffReport:new Schema(...require('./schemas/spiffreport.js')),
8
+ ChecklistForm:new Schema(...require('./schemas/checklistform.js')),
9
+ ChecklistField:new Schema(...require('./schemas/checklistfield.js'))
8
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vhp-mongo-models",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "productName": "VHP Mongo Models",
5
5
  "description": "Mongo Models library to setup Mongoose Schemas",
6
6
  "author": "VHPim",