vhp-mongo-models 2.1.93 → 2.1.95

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,26 +1,33 @@
1
- let attachment = {
2
- type: { type: String, default: '' }, // 'contract' || ?
3
- ref: { type: String, default: '' }
1
+ /*
2
+ {
3
+ type: { type: String, default: '' },// 'contract' | 'project' | 'service'
4
+ ref: { type: String, default: '' }
4
5
  }
6
+ */
5
7
 
6
8
  module.exports = [{
7
- id:{type:String,default:''},
8
- board:{type:String,default:''},
9
- coid:{type:String,default:''}, //required
10
- dept:{type:String,default:''}, //would like to require
11
- hhid:{type:String,default:''}, //
12
- type: { type: String, default: '' }, //'consult' || 'install' || 'service'
13
- title: { type: String, default: '' },
14
- status: { type: String, default: '' }, //
15
- dates: { type: Array, default: [] }, // array of date objects. dates[0]=start dates[1]=end
16
- lead: {type: String, default:''}, //to tie to the lead
17
- workRef: { type: String, default: '' }, // refrence to work can only be tied to one piece of work
18
- workType: {type:String, default:''}, // the type of work refrenced
9
+ id: { type: String, default: '' },
10
+ board: { type: String, default: '' },
11
+ coid: { type: String, default: '' }, //required
12
+ dept: { type: String, default: '' }, //would like to require
13
+ hhid: { type: String, default: '' }, //
19
14
 
20
- ref:{type:String, default:''}, //was the connection to projects - can be moved to workRef
21
- wonum: { type: String, default: '' },//do not need -> was the refrerence the wo
15
+ type: { type: String, default: '' }, // 'follow-up' | 'consultation' | 'install' | 'meeting' | 'special
16
+ title: { type: String, default: '' },
17
+ descriptions: {type:String, default:''},
18
+ status: { type: String, default: '' }, //un-scheduled | scheduled | pastdue | inprogress | complete
19
+
20
+ dates: { type: Array, default: [] }, // array of date objects. dates[0]=start dates[...]=other dates
21
+
22
+ lead: { type: String, default: '' }, //to tie to the lead
23
+ workref: { type: String, default: '' }, // refrence to work can only be tied to one piece of work
24
+ worktype: { type: String, default: '' }, // the type of work refrenced
22
25
 
23
- attendees: { type: Array, default: [] }, // array of user names
24
- attachments: { type: Array, default: [] }, // array of 'attachment's
25
- notes: { type: String, default: '' },
26
- }]
26
+ attendees: { type: Array, default: [] }, // array of user names
27
+ attachments: { type: Array, default: [] }, // array of 'attachment's
28
+ notes: { type: String, default: '' },
29
+
30
+ //
31
+ ref: { type: String, default: '' }, //was the connection to projects - can be moved to workRef
32
+ wonum: { type: String, default: '' }//do not need -> was the refrerence the wo
33
+ }]
@@ -0,0 +1,10 @@
1
+ /*
2
+ blocks = [{start,end}]
3
+ */
4
+ module.exports = [{
5
+ name: { type: String, default: '' },
6
+ able:{type:Number,default:1},
7
+ buffer:{type:Number,default:0},
8
+ minout:{type:Number,default:0},
9
+ blocks:{type:Array,default:[]}
10
+ }]
@@ -8,6 +8,10 @@ module.exports = [
8
8
  {
9
9
  id: { type: String, default: '' },
10
10
  hhid: { type: String, default: '' },
11
+
12
+ callid: {type:String, default:''},
13
+ callresult: {type:String, default:''},
14
+
11
15
  phone: { type: String, default: '' }, //this will replace custid
12
16
  phone2: { type: String, default: '' },
13
17
  email: { type: String, default: '' },
@@ -30,10 +34,9 @@ module.exports = [
30
34
  revenue: { type: Number, default: 0 },
31
35
 
32
36
  salesRep: { type: String, default: '' },
33
- techs: { type: Array, default: [] },
34
37
  tags: { type: Array, default: [] },
35
38
  result: { type: String, default: 'NEW' },//ACTIVE (when converted) | SOLD | CANCELED | NOBUY | REMOVED
36
-
39
+
37
40
  takenBy: { type: String, default: '' },
38
41
  takenDate: { type: Date, default: Date.now },
39
42
  callTypes: { type: Array, default: [] }, //[{type:String, sub:String}]
@@ -49,15 +52,17 @@ module.exports = [
49
52
  workinfo: { type: Object, default: {} }, //content depending on lead.type
50
53
  desc: { type: String, default: '' },
51
54
  notes: { type: Array, default: [] },
52
-
55
+
53
56
  apptid: { type: String, default: '' },// if an appointment is offically made
54
57
  apptdate: { type: Date, default: Date.now },// desired to be serviced/consulted
55
-
58
+
56
59
  time: { type: String, default: '' }, //time of day
57
60
  prstdate: { type: Date, default: '' },
58
61
  carryover: { type: Date, default: '' },
59
62
  prstvia: { type: String, default: '' },
60
- rewards: { type: Boolean, default: false }
63
+ rewards: { type: Boolean, default: false },
64
+
65
+ techs: { type: Array, default: [] },//remove
61
66
  },
62
67
  { minimize: false }
63
68
  ]
@@ -8,7 +8,8 @@ module.exports = [
8
8
  quantity: { type: Number, default: 1 }, //optional qty
9
9
  notes: { type: Array, default: [] },// for better history {tech:'',date:'',ticketId:''}
10
10
  tags: { type: Array, default: [] },
11
-
11
+ about: {type: String, default: ''},
12
+
12
13
  //JONAS props
13
14
  id: { type: String, default: '' }, //must have an id, should match JONAS "lineNumberUnique"
14
15
  linenum: { type: String, default: '' },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vhp-mongo-models",
3
- "version": "2.1.93",
3
+ "version": "2.1.95",
4
4
  "productName": "VHP Mongo Models",
5
5
  "description": "Mongo Models library to setup Mongoose Schemas",
6
6
  "author": "VHPim",