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,8 +159,8 @@
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,6 +117,8 @@
.then((response) => {
console.log("Caches: " + this.caches);
this.caches = response.data;
}).catch((error) => {
this.$store.commit('dialog/NEW_MESSAGE_DIALOG', { message: error })
})
},
addCache() {
@ -129,6 +131,8 @@
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) {
@ -147,6 +151,8 @@
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,6 +127,8 @@
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,7 +85,11 @@
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 })
});
}
}