vhp-mongo-models 1.3.2 → 1.3.4
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/Company/schemas/device.js +2 -1
- package/Company/schemas/employee.js +12 -9
- package/Service/schemas/completeticket.js +2 -2
- package/Service/schemas/subs/final.js +3 -2
- package/Systems/schemas/subs/userAppSettings.js +52 -0
- package/Systems/schemas/userprofile.js +3 -4
- package/Systems/schemas/usersetting.js +21 -5
- package/package.json +1 -1
|
@@ -14,7 +14,8 @@ module.exports=[
|
|
|
14
14
|
model: { type: String, default: '' },
|
|
15
15
|
group: {type:String,default:''},
|
|
16
16
|
serial: { type: String, default: '' },
|
|
17
|
-
|
|
17
|
+
line: { type:String, default:'' },
|
|
18
|
+
simRef: { type: String, default: '' }, //relace with line
|
|
18
19
|
imei:{type:String,default:''},
|
|
19
20
|
userName: { type: String, default: '' },
|
|
20
21
|
userLock: { type: String, default: '' },
|
|
@@ -7,24 +7,27 @@
|
|
|
7
7
|
module.exports=[
|
|
8
8
|
{
|
|
9
9
|
empID: { type: String, default: '' },
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
active:{ type: Boolean,default:true},
|
|
11
|
+
|
|
12
12
|
fName: { type: String, default: '' },
|
|
13
13
|
lName: { type: String, default: '' },
|
|
14
|
-
|
|
14
|
+
|
|
15
|
+
coid: { type: String, default: '' },
|
|
15
16
|
dept: {type:String,default:''},
|
|
16
|
-
title: { type: String, default: '' },
|
|
17
|
-
type: { type: String, default: '' },
|
|
18
17
|
repTo: { type: String, default: '' }, // empID
|
|
18
|
+
title: { type: String, default: '' },
|
|
19
|
+
type: { type: String, default: '' }, //remove
|
|
19
20
|
jobDesc: { type: String, default: '' },
|
|
20
|
-
|
|
21
|
-
bday: { type: Date, default: '' },
|
|
21
|
+
|
|
22
22
|
skills: { type: String, default: '' },
|
|
23
|
-
interest: { type: String, default: '' },
|
|
24
23
|
tasks: { type: Array,default:[] },
|
|
25
|
-
active:{ type: Boolean,default:true},
|
|
26
24
|
goals: { type: Array,default:[] },
|
|
25
|
+
|
|
26
|
+
joined: { type: Date, default: '' },
|
|
27
|
+
bday: { type: Date, default: '' },
|
|
28
|
+
interest: { type: String, default: '' },
|
|
27
29
|
picture: { type: String, default: '' },
|
|
30
|
+
contact: { type: String, default:'' }
|
|
28
31
|
}, {
|
|
29
32
|
toJSON: { virtuals: true },
|
|
30
33
|
toObject: { virtuals: true },
|
|
@@ -25,8 +25,8 @@ module.exports = [
|
|
|
25
25
|
salesrep:{type:String,default:''},
|
|
26
26
|
sitems: { type: Array, default: [] },
|
|
27
27
|
wo: wo,
|
|
28
|
-
todo:{type:Object, default: {}},
|
|
29
|
-
office: { type:
|
|
28
|
+
todo:{type:Object, default: {}}, //remove
|
|
29
|
+
office: { type: Array, default: [] },
|
|
30
30
|
logs:{type:Array,default:[]}
|
|
31
31
|
}
|
|
32
32
|
]
|
|
@@ -21,8 +21,9 @@ let ticketFinal = new Schema({
|
|
|
21
21
|
invoice:ticketInvoice,
|
|
22
22
|
signature:{type:String,default:''},
|
|
23
23
|
emailed:{type:Boolean,default:false},
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
officeSubmit:{type:String,default:''},
|
|
25
|
+
paymentMethod:{type:String,default:''},
|
|
26
|
+
returnVisit:{type:String,default:false},
|
|
26
27
|
returnNotes:{type:String,default:''},
|
|
27
28
|
addlDetails:{type:String,default:''},
|
|
28
29
|
serviceReferral:{type:Boolean,default:false},
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
|
|
2
|
+
const appsetup = {
|
|
3
|
+
access:{type:Array,default:[]}, //list of available apps
|
|
4
|
+
apps:{type:Object,default:{}}, //object of available views
|
|
5
|
+
|
|
6
|
+
settings:{type:Object,default:{
|
|
7
|
+
system:{
|
|
8
|
+
defaultApp:'VHPportal',
|
|
9
|
+
defaultView:'',
|
|
10
|
+
canCreateUsers:false,
|
|
11
|
+
canEditUsers:false,
|
|
12
|
+
canRemoveUsers:false,
|
|
13
|
+
enableNotifications:false,
|
|
14
|
+
},
|
|
15
|
+
company:{
|
|
16
|
+
companies:[],
|
|
17
|
+
departments:[],
|
|
18
|
+
canCreateEmployee:false,
|
|
19
|
+
canEditEmployee:false,
|
|
20
|
+
canEditDevices:false,
|
|
21
|
+
canEditAccounts:false,
|
|
22
|
+
canEditContacts:false,
|
|
23
|
+
canRemoveEmployee:false
|
|
24
|
+
},
|
|
25
|
+
households:{
|
|
26
|
+
canCreate:false,
|
|
27
|
+
canEdit:false,
|
|
28
|
+
canRemove:false,
|
|
29
|
+
canEditContacts:false,
|
|
30
|
+
canTakeLeads:false,
|
|
31
|
+
canTransferHomes:false,
|
|
32
|
+
canChangeClientID:false,
|
|
33
|
+
canContactClient:false
|
|
34
|
+
},
|
|
35
|
+
projects:{
|
|
36
|
+
canCreate:false,
|
|
37
|
+
canEdit:false,
|
|
38
|
+
canRemove:false,
|
|
39
|
+
canApprove:false,
|
|
40
|
+
canQuote:false,
|
|
41
|
+
canPayCommission:false
|
|
42
|
+
},
|
|
43
|
+
service:{
|
|
44
|
+
isTech:false,
|
|
45
|
+
canRemove:false,
|
|
46
|
+
canInvoice:false,
|
|
47
|
+
canEditServiceItems:false
|
|
48
|
+
}
|
|
49
|
+
}}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
module.exports = appsetup
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
+
const settings = require('./subs/userAppSettings.js');
|
|
2
|
+
|
|
1
3
|
module.exports = [
|
|
2
4
|
{
|
|
3
5
|
type:{type:String,default:''},
|
|
4
|
-
|
|
5
|
-
departments:{type:Array,default:[]},
|
|
6
|
-
apps:{type:Object,default:{}},
|
|
7
|
-
access:{type:Array,default:[]}
|
|
6
|
+
...settings
|
|
8
7
|
},
|
|
9
8
|
{
|
|
10
9
|
//toJSON: { virtuals: true },
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
|
|
2
|
+
const userSetup = require('./subs/userAppSettings.js')
|
|
2
3
|
/**
|
|
3
4
|
* User settings are the base for a user. Types can be included to pre set the settings based on a profile. After creation
|
|
4
5
|
* the settings can be changed, but reset to the type at any time.
|
|
@@ -8,12 +9,27 @@ module.exports=[
|
|
|
8
9
|
{
|
|
9
10
|
empID:{type:String,default:''},
|
|
10
11
|
user:{type:String,defaullt:''},
|
|
11
|
-
companies:{type:Array,default:[]},
|
|
12
|
-
profile:{type:String,default:''},//optional to connect to a UserProfile
|
|
13
|
-
apps:{type:Object,default:{}},
|
|
14
12
|
admin:{type:Boolean,default:false},
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
profile:{type:String,default:''},//optional to connect to a UserProfile
|
|
14
|
+
|
|
15
|
+
...userSetup, //holds all lists and switchs. can be overwritten by profile
|
|
16
|
+
|
|
17
|
+
preferences:{type:Object,default:{//to hold items "tweakable" from the portal
|
|
18
|
+
system:{
|
|
19
|
+
darkMode:false,
|
|
20
|
+
defaultApp:'',
|
|
21
|
+
defaultView:''
|
|
22
|
+
},
|
|
23
|
+
company:{
|
|
24
|
+
companies:[],
|
|
25
|
+
departments:[]
|
|
26
|
+
},
|
|
27
|
+
home:{
|
|
28
|
+
favorites:[],
|
|
29
|
+
links:[],
|
|
30
|
+
carousel:[]
|
|
31
|
+
}
|
|
32
|
+
}}
|
|
17
33
|
},
|
|
18
34
|
{
|
|
19
35
|
//toJSON: { virtuals: true },
|