Manual add

This commit is contained in:
portree_kid 2020-03-07 22:12:52 +01:00
parent 2f86bed0bf
commit 76db33a686

View File

@ -14,6 +14,10 @@ const state = {
const mutations = {
'DELETE_INDEXED_DB' () { },
ADD_AIRPORT (state, airports) {
airports.forEach(airport => {
airport.properties.manual = true;
idb.saveAirport(airport);
});
Vue.set(state, 'airports', state.airports.concat(airports));
},
SET_AIRPORTS (state, airports) {
@ -38,7 +42,7 @@ const actions = {
let airports = await idb.getAirports();
context.commit(SET_AIRPORTS, airports
.filter(point => typeof point.geometry.coordinates !== "undefined" )
.filter(point => point.properties.flights > 0 ));
.filter(point => (point.properties.flights > 0 || point.properties.manual)));
} catch (error) {
console.error(error);
}