vhp-mongo-models 2.1.992 → 2.1.994
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.
- package/HouseHolds/schemas/appointment.js +1 -1
- package/Replacement/schemas/projects.js +68 -68
- package/Service/schemas/repairs.js +15 -0
- package/Service/service.js +2 -1
- package/package.json +1 -1
- package/Untitled +0 -1
|
@@ -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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
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,15 @@
|
|
|
1
|
+
module.exports = [{
|
|
2
|
+
ticket: { type: String, default: '' },
|
|
3
|
+
hhid: { type: String, default: '' },
|
|
4
|
+
date: { type: Date, default: '' },
|
|
5
|
+
orderdate: { type: Date, default: '' },
|
|
6
|
+
task: { type: String, default: '' },
|
|
7
|
+
descr: { type: String, default: '' },
|
|
8
|
+
price: { type: Number, default: 0 },
|
|
9
|
+
pl: { type: String, default: '' },
|
|
10
|
+
appr: { type: String, default: '' },
|
|
11
|
+
qty: { type: Number, default: 1 },
|
|
12
|
+
tagid: { type: String, default: '' },
|
|
13
|
+
returnfor: { type: Boolean, default: false },
|
|
14
|
+
done: { type: Boolean, default: false }
|
|
15
|
+
}, { minimize: false }]
|
package/Service/service.js
CHANGED
|
@@ -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
package/Untitled
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|