Skip to content

Commit

Permalink
Release 1.7.0
Browse files Browse the repository at this point in the history
Release 1.7.0
  • Loading branch information
benoitdemaegdt authored Nov 20, 2019
2 parents 7e786c7 + 3980cab commit 7b9e829
Show file tree
Hide file tree
Showing 22 changed files with 820 additions and 452 deletions.
1 change: 1 addition & 0 deletions client/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module.exports = {
extends: [
'plugin:vue/essential',
'plugin:prettier/recommended',
'eslint:recommended',
'@vue/prettier'
],
rules: {
Expand Down
277 changes: 204 additions & 73 deletions client/package-lock.json

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "maxplorateur-client",
"version": "1.6.0",
"version": "1.7.0",
"private": true,
"scripts": {
"serve": "node_modules/.bin/vue-cli-service serve",
Expand All @@ -11,11 +11,11 @@
},
"dependencies": {
"axios": "^0.19.0",
"core-js": "^3.4.0",
"core-js": "^3.4.1",
"register-service-worker": "^1.6.2",
"vue": "^2.6.10",
"vue-router": "^3.1.3",
"vuetify": "^2.1.9",
"vuetify": "^2.1.10",
"vuex": "^3.1.2"
},
"devDependencies": {
Expand All @@ -24,22 +24,22 @@
"@vue/cli-plugin-eslint": "^4.0.5",
"@vue/cli-plugin-pwa": "^4.0.5",
"@vue/cli-service": "^4.0.5",
"@vue/eslint-config-prettier": "^5.0.0",
"@vue/eslint-config-prettier": "^6.0.0",
"@vue/test-utils": "^1.0.0-beta.29",
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^10.0.3",
"babel-jest": "^24.9.0",
"eslint": "^5.16.0",
"eslint": "^6.6.0",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-vue": "^6.0.0",
"eslint-plugin-vue": "^6.0.1",
"jest": "^24.9.0",
"prettier": "^1.19.1",
"sass": "^1.23.3",
"sass": "^1.23.7",
"sass-loader": "^7.1.0",
"vue-cli-plugin-vuetify": "^2.0.2",
"vue-jest": "^3.0.5",
"vue-template-compiler": "^2.6.10",
"vuetify-loader": "^1.2.2"
"vuetify-loader": "^1.3.1"
},
"postcss": {
"plugins": {
Expand Down
19 changes: 0 additions & 19 deletions client/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,6 @@ export default Vue.extend({
name: 'App',
components: {
Navigation
},
created() {
/**
* if jwt is expired : logout
*/
this.$http.interceptors.response.use(undefined, err => {
const errorResponse = err.response;
if (
errorResponse.status === 401 &&
errorResponse.config &&
!errorResponse.config.__isRetryRequest &&
errorResponse.data &&
errorResponse.data.message === 'jwt expired'
) {
this.$store.dispatch('logout');
this.$router.push('/');
}
throw err;
});
}
});
</script>
Expand Down
41 changes: 37 additions & 4 deletions client/src/components/AlertDeletion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,21 @@

<v-card-text class="cardText mt-3">
Êtes-vous sûr de vouloir supprimer cette alerte ?
<div class="text-center">
<v-progress-circular
v-show="loading"
indeterminate
color="primary"
></v-progress-circular>
<p v-if="error" class="subtitle-2 red--text mt-2 mb-0">
{{ this.errorMessage }}
</p>
</div>
</v-card-text>

<v-divider></v-divider>

<v-card-actions>
<v-card-actions class="justify-center">
<v-btn class="closeBtn" color="#616161" text @click="closeDialog()">
Annuler
</v-btn>
Expand All @@ -24,13 +34,36 @@
<script>
export default {
name: 'alert-deletion',
props: {
alert: Object
},
data() {
return {
loading: false,
error: false,
errorMessage: ''
};
},
methods: {
deleteTravelAlert() {
this.$emit('delete:travelAlert');
this.closeDialog();
async deleteTravelAlert() {
try {
this.clearState();
this.loading = true;
await this.$store.dispatch('deleteAlert', this.alert);
this.loading = false;
this.closeDialog();
} catch (err) {
this.loading = false;
this.error = true;
this.errorMessage = err.message;
}
},
closeDialog() {
this.$emit('close:dialog');
},
clearState() {
this.error = false;
this.errorMessage = '';
}
}
};
Expand Down
Loading

0 comments on commit 7b9e829

Please sign in to comment.