vhp-mongo-models 2.1.79 → 2.1.81

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.
@@ -4,6 +4,6 @@ module.exports=[
4
4
  name: { type: String, default: '' },
5
5
  coid: { type: String, default: '' },
6
6
  types: {type:Array,default:[]},
7
- building: {type:Array,default:[]}
7
+ building: {type:Array,default:[]} //RES | COM
8
8
  }
9
9
  ]
@@ -17,7 +17,7 @@ module.exports=[
17
17
  repTo: { type: String, default: '' }, // empID
18
18
  title: { type: String, default: '' },
19
19
  type:{type:String,default:''},
20
- teams: { type: Array, default: '' }, //remove
20
+ teams: { type: Array, default: [] }, //remove
21
21
  jobDesc: { type: String, default: '' },
22
22
 
23
23
  skills: { type: String, default: '' },
@@ -4,7 +4,7 @@ module.exports = [{
4
4
  title:{type:String,default:''},
5
5
  coid:{type:String,default:''},
6
6
  hhid:{type:String,default:''},
7
- work:{type:String,default:''}, //just an array of work.id
7
+ work:{type:String,default:''}, //work.id
8
8
  sitems:{type:Array,default:[]}, //of service item ["ids"]
9
9
  scoring:{
10
10
  list:{type:Object,default:{}},
@@ -11,7 +11,12 @@ module.exports = [
11
11
  custid:{type: String, default:''},//person calling in, could be the occupant
12
12
  clientfirst:{type:String, default:''},
13
13
  clientlast:{type:String, default:''},
14
-
14
+ street:{type:String,default:''},
15
+ unit:{type:String,default:''},
16
+ city:{type:String,default:''},
17
+ state:{type:String,default:''},
18
+ zip:{type:String,default:''},
19
+
15
20
  status:{type:String,default:'PARENT'}, //PARENT | CHILD
16
21
  parent:{type:String,default:''},
17
22
  children:{type:Array,default:[]},
@@ -27,7 +32,7 @@ module.exports = [
27
32
  result:{type: String, default:'NEW'},//ACTIVE (when converted) | SOLD | CANCELED | NOBUY | REMOVED
28
33
 
29
34
  takenBy:{type:String, default:''},
30
- takenDate:{type:String, default:Date.now},
35
+ takenDate:{type:Date, default:Date.now},
31
36
  generator:{type: String, default: '' },//step 1 (SELF | CUSTOMER | SERVICE | REPLACEMENT REFERALS)
32
37
  source:{type: String, default: '' }, //optional (user | billboard)
33
38
  custref:{type:String,default:''}, //when (SELF | CUSTOMER REFERALS) phone number of refer whether or not they are a customer
@@ -35,6 +35,7 @@ module.exports=[
35
35
  amntAmeren:{type:Number,default:0},
36
36
  amntManf:{type:Number,default:0},
37
37
  amntSpecial:{type:Number,default:0},
38
+ miscTotal:{type:Number,defautl:0},//the total = amntTotal - sumItems
38
39
 
39
40
  sold:{type:Date,default:''},
40
41
  invoiced:{type:Date,default:''},
@@ -45,7 +45,8 @@ let info = {
45
45
  }
46
46
 
47
47
  /** Projects Schema
48
- *{
48
+ *
49
+ {
49
50
  "dept": 1,
50
51
  "hhid": 1,
51
52
  "status": 1
@@ -10,11 +10,13 @@ let repairEstimate = {
10
10
  techCount:{type:Number,default:0},
11
11
  revenuePer:{type:Number,default:0}, //was revenuePerEstimate
12
12
  completionTime:{type:String,default:''}
13
+
13
14
  //revenuePerEstimate:{type:Number,default:0},
14
15
  //revenuePer:{type:Number,default:0},//moved to ticketTime
15
16
  }
16
17
 
17
18
  let ticketTime = {
19
+ crossLaborRate:{type:Number,default:0},
18
20
  techs:{type:Number,default:0},
19
21
  driving:{type:Number,default:0},
20
22
  labor:{type:Number,default:0},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vhp-mongo-models",
3
- "version": "2.1.79",
3
+ "version": "2.1.81",
4
4
  "productName": "VHP Mongo Models",
5
5
  "description": "Mongo Models library to setup Mongoose Schemas",
6
6
  "author": "VHPim",