Selection Editable Objects
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
const state = {
|
||||
type: 'none',
|
||||
data: Object
|
||||
index: 'none',
|
||||
data: {airports: {}, parking: {}, arc: {}}
|
||||
}
|
||||
|
||||
const SET_EDIT_AIRPORT = 'SET_EDIT_AIRPORT'
|
||||
@@ -9,15 +10,17 @@ const SET_EDIT_ARC = 'SET_EDIT_ARC'
|
||||
|
||||
const mutations = {
|
||||
SET_EDIT_AIRPORT (state, airport) {
|
||||
state.data = airport
|
||||
state.data.airports[airport.icao] = airport
|
||||
state.index = airport.icao
|
||||
state.type = 'airport'
|
||||
},
|
||||
SET_EDIT_PARKING (state, parking) {
|
||||
state.data = parking
|
||||
state.data.parking[parking.index] = parking
|
||||
state.index = parking.index
|
||||
state.type = 'parking'
|
||||
},
|
||||
SET_EDIT_ARC (state, arc) {
|
||||
state.data = arc
|
||||
state.data.arc = arc
|
||||
state.type = 'arc'
|
||||
},
|
||||
'SET_EDIT_PARKING_NAME' (state, parkingName) {
|
||||
|
||||
Reference in New Issue
Block a user