added first error dialogs w/o any error specification

This commit is contained in:
rchrist 2019-04-18 18:04:40 +02:00
parent deb50cad9c
commit ddd21915c8
4 changed files with 21 additions and 9 deletions

View File

@ -159,9 +159,9 @@
console.log("POST api/createCache: " + response.statusText);
this.$store.commit('cacheCollector/RESET_NEW_CACHE');
this.$router.push({ path: '/overview' });
})
.catch((error) => {
});
}).catch((error) => {
this.$store.commit('dialog/NEW_MESSAGE_DIALOG', { message: error })
});
} else {
// TODO update existing Cache
}

View File

@ -117,7 +117,9 @@
.then((response) => {
console.log("Caches: " + this.caches);
this.caches = response.data;
})
}).catch((error) => {
this.$store.commit('dialog/NEW_MESSAGE_DIALOG', { message: error })
})
},
addCache() {
this.$router.push({path: `/cache`})
@ -129,7 +131,9 @@
this.$axios.delete('/api/deleteCache', {params: {cacheID: id}})
.then((response) => {
this.fetchAllCaches()
})
}).catch((error) => {
this.$store.commit('dialog/NEW_MESSAGE_DIALOG', { message: error })
})
},
startCache(cacheID) {
const userToken = JSON.parse(localStorage.getItem('userToken')).token;
@ -147,7 +151,9 @@
console.log(stationID);
//this.$router.push({path: `/station/${stationID}`})
this.$router.push({path: `/station/${cacheID}/${stationID}`})
})
}).catch((error) => {
this.$store.commit('dialog/NEW_MESSAGE_DIALOG', { message: error })
})
}
}
}

View File

@ -127,7 +127,9 @@
this.$axios.get('/api/getMyCaches', { params: {token}} )
.then((response) => {
this.startedCaches = response.data;
});
}).catch((error) => {
this.$store.commit('dialog/NEW_MESSAGE_DIALOG', { message: error })
});
},
continueCache(cacheID) {
}

View File

@ -85,8 +85,12 @@
const stationView = response.data.find(station => station.id === Number(this.$route.params.id));
console.log(JSON.stringify(stationView));
this.data.station = stationView;
});
});
}).catch((error) => {
this.$store.commit('dialog/NEW_MESSAGE_DIALOG', { message: error })
});
}).catch((error) => {
this.$store.commit('dialog/NEW_MESSAGE_DIALOG', { message: error })
});
}
}
}