vhp-mongo-models 2.1.992 → 2.1.993

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.
@@ -14,7 +14,7 @@ module.exports = [{
14
14
 
15
15
  board: { type: String, default: '' },
16
16
  type: { type: String, default: '' }, // 'follow-up' | 'consultation' | 'install' | 'meeting' | 'special
17
- tags: { type: Array, default: [] },
17
+ tags: { type: Array, default: [] }, //basically categories would either align with the JONAS categories OR be add to the portal ie 'Consult'
18
18
 
19
19
  title: { type: String, default: '' },
20
20
  descr: { type: String, default: '' },
@@ -2,48 +2,48 @@ const { Schema } = require('mongoose')
2
2
  const { aaddress, acontact } = require('../../core-models.js');
3
3
 
4
4
  let pvmaint = {
5
- contractNum: { type: String, default: '' },
6
- rewardNum: { type: String, default: '' },
7
- jobref: { type: String, default: '' },
8
- custCode: { type: String, default: '' },
9
- custName: { type: String, default: '' },
10
- street: { type: String, default: '' },
11
- city: { type: String, default: '' },
12
- state: { type: String, default: '' },
13
- zip: { type: String, default: '' },
14
- visits: { type: Array, default: [] }
5
+ contractNum: { type: String, default: '' },
6
+ rewardNum: { type: String, default: '' },
7
+ jobref: { type: String, default: '' },
8
+ custCode: { type: String, default: '' },
9
+ custName: { type: String, default: '' },
10
+ street: { type: String, default: '' },
11
+ city: { type: String, default: '' },
12
+ state: { type: String, default: '' },
13
+ zip: { type: String, default: '' },
14
+ visits: { type: Array, default: [] }
15
15
  }
16
16
  let pvvisit = {
17
- type: { type: String }, //Cooling | Heating
18
- date: { type: Date },
19
- check: { type: Boolean },
20
- notes: { type: String },
21
- photos: { type: Boolean },
22
- scheduled: { type: Boolean }
17
+ type: { type: String }, //Cooling | Heating
18
+ date: { type: Date },
19
+ check: { type: Boolean },
20
+ notes: { type: String },
21
+ photos: { type: Boolean },
22
+ scheduled: { type: Boolean }
23
23
  }
24
24
  let lead = {
25
- id:{type:String,default:''}, //sync with lead
26
- apptdate: { type: Date, default: '' }, //sync with lead
27
- type: { type: String, default: '' },
28
- prstdate: { type: Date, default: '' },
29
- callTypes:{type:Array,default:[]},
30
- time: { type: String, default: '' },
31
- carryover: { type: Date, default: '' },
32
- prstvia: { type: String, default: '' },
33
- rewards: { type: Boolean, default: false }, //sync with lead
34
- source: { type: String, default: '' }, //sync with lead
35
- generator: { type: String, default: '' }, //sync with lead
36
-
37
- soldAmount: { type: Number, default: 0 }, //remove? would use bid
38
- paid: { type: Date, default: '' } //remove? would use bid
25
+ id: { type: String, default: '' }, //sync with lead
26
+ apptdate: { type: Date, default: '' }, //sync with lead
27
+ type: { type: String, default: '' },
28
+ prstdate: { type: Date, default: '' },
29
+ callTypes: { type: Array, default: [] },
30
+ time: { type: String, default: '' },
31
+ carryover: { type: Date, default: '' },
32
+ prstvia: { type: String, default: '' },
33
+ rewards: { type: Boolean, default: false }, //sync with lead
34
+ source: { type: String, default: '' }, //sync with lead
35
+ generator: { type: String, default: '' }, //sync with lead
36
+
37
+ soldAmount: { type: Number, default: 0 }, //remove? would use bid
38
+ paid: { type: Date, default: '' } //remove? would use bid
39
39
  }
40
40
  let info = {
41
- pkids: { type: Array, default: [] },
42
- spaces: { type: Array, default: [] },
43
- summary: { type: Object, default: {} },
44
- quotes: { type: Object, default: {} },
45
- joblog: { type: Object, default: {} },
46
- pvmaint: pvmaint,
41
+ pkids: { type: Array, default: [] },
42
+ spaces: { type: Array, default: [] },
43
+ summary: { type: Object, default: {} },
44
+ quotes: { type: Object, default: {} },
45
+ joblog: { type: Object, default: {} },
46
+ pvmaint: pvmaint,
47
47
  }
48
48
 
49
49
  /** Projects Schema
@@ -57,38 +57,38 @@ let info = {
57
57
  * - id - {unique:true,name:"id"}
58
58
  */
59
59
  module.exports = [
60
- {
61
- cleanTag: {type:Object,default:{}},
62
- id: { type: String, default: '' },
63
- name: { type: String, default: '' },
64
- coid: { type: String, default: '' },
65
- jobnum: { type: String, default: '' },
66
- hhid: { type: String, default: '' },
67
- ...acontact,
68
- estimator: { type: String, default: 'unassigned' },
69
- schedule: { type: Array, default: [] },
70
- dept: { type: String, default: '' },
71
- stage: { type: String, default: 'quote' },
72
- status: { type: String, default: 'active' },
73
- opendate: { type: Date, default: Date.now() },
74
- lastdate: { type: Date, default: Date.now() },
75
- closedate: { type: Date, default: '' },
76
- datelog: { type: Array, default: [] },
77
- info: info,
78
- contracts: { type: Array, default: [] },
79
- lead: lead,
80
- refs: { type: Array, default: [] }, //do we need?
81
- froot: { type: String, default: '' },
82
- //joblog to be added to flat
83
-
84
- ...aaddress, //remove
85
- // ref: { type: String, default: '' },
86
- },
87
- {
88
- toJSON: { virtuals: true },
89
- toObject: { virtuals: true },
90
- minimize: false
91
- }
60
+ {
61
+ cleanTag: { type: Object, default: {} },
62
+ id: { type: String, default: '' },
63
+ name: { type: String, default: '' },
64
+ coid: { type: String, default: '' },
65
+ jobnum: { type: String, default: '' },
66
+ hhid: { type: String, default: '' },
67
+ ...acontact,
68
+ estimator: { type: String, default: 'unassigned' },
69
+ schedule: { type: Array, default: [] },
70
+ dept: { type: String, default: '' },
71
+ stage: { type: String, default: 'quote' },
72
+ status: { type: String, default: 'active' },
73
+ opendate: { type: Date, default: Date.now() },
74
+ lastdate: { type: Date, default: Date.now() },
75
+ closedate: { type: Date, default: '' },
76
+ datelog: { type: Array, default: [] },
77
+ info: info,
78
+ contracts: { type: Array, default: [] },
79
+ lead: lead,
80
+ refs: { type: Array, default: [] }, //do we need?
81
+ froot: { type: String, default: '' },
82
+ //joblog to be added to flat
83
+
84
+ ...aaddress, //remove
85
+ // ref: { type: String, default: '' },
86
+ },
87
+ {
88
+ toJSON: { virtuals: true },
89
+ toObject: { virtuals: true },
90
+ minimize: false
91
+ }
92
92
  ]
93
93
  /**
94
94
  * schedule = [{
@@ -0,0 +1,14 @@
1
+ module.exports = [{
2
+ ticket:{type:String,default:''},
3
+ hhid:{type:String,default:''},
4
+ date:{type:Date,default:''},
5
+ task:{type:String,default:''},
6
+ descr:{type:String,default:''},
7
+ price:{type:Number,default:0},
8
+ pl:{type:String,default:''},
9
+ appr:{type:String,default:''},
10
+ qty:{type:Number,default:1},
11
+ tagid:{type:String,default:''},
12
+ returnfor:{type:Boolean,default:false},
13
+ done:{type:Boolean,default:false}
14
+ },{minimize:false}]
@@ -8,5 +8,6 @@ module.exports = {
8
8
  ChecklistForm:new Schema(...require('./schemas/checklistform.js')),
9
9
  ChecklistField:new Schema(...require('./schemas/checklistfield.js')),
10
10
  ChecklistCalc:new Schema(...require('./schemas/checklistcalc.js')),
11
- Membership:new Schema(...require('./schemas/membership.js'))
11
+ Membership:new Schema(...require('./schemas/membership.js')),
12
+ Repair:new Schema(...require('./schemas/repairs.js'))
12
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vhp-mongo-models",
3
- "version": "2.1.992",
3
+ "version": "2.1.993",
4
4
  "productName": "VHP Mongo Models",
5
5
  "description": "Mongo Models library to setup Mongoose Schemas",
6
6
  "author": "VHPim",
package/Untitled DELETED
@@ -1 +0,0 @@
1
-