-
Notifications
You must be signed in to change notification settings - Fork 260
/
Copy pathcommon.js
93 lines (89 loc) · 1.95 KB
/
common.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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
92
93
export default {
namespaced: true,
state () {
return {
user: null,
notificationSystem: {
options: {
info: {
position: 'topRight'
},
success: {
position: 'topRight'
},
warning: {
position: 'topRight'
},
error: {
position: 'topRight'
}
}
},
pickUpLocations: [
{
id: 1,
name: 'Microsoft Corporate Office',
latitude: 47.6423354,
longitude: -122.1391189
},
{
id: 2,
name: 'Hyatt Regency Bellevue',
latitude: 47.618282,
longitude: -122.201035
},
{
id: 3,
name: 'Space Needle',
latitude: 47.62053,
longitude: -122.3493
}
],
destinationLocations: [
{
id: 1,
name: 'Seattle, Washington',
latitude: 47.6131746,
longitude: -122.4821466
},
{
id: 2,
name: 'Bellevue, Washington',
latitude: 47.5963256,
longitude: -122.1928181
},
{
id: 3,
name: 'Redmond, Washington',
latitude: 47.6721228,
longitude: -122.1356409
}
]
}
},
getters: {
user: state => state.user,
notificationSystem: state => state.notificationSystem,
pickUpLocations: state => state.pickUpLocations,
destinationLocations: state => state.destinationLocations
},
mutations: {
user (state, value) {
state.user = value
},
notificationSystem (state, value) {
state.notificationSystem = value
},
pickUpLocations (state, value) {
state.pickUpLocations = value
},
destinationLocations (state, value) {
state.destinationLocations = value
}
},
actions: {
setUser ({ commit }, value) {
commit('user', value)
}
}
}