diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue index e50b42c2c..07b735dee 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue @@ -351,6 +351,7 @@ const i18n = { action: { save: "Enregistrer" }, + conflict_on_save: "Désolé, cette action d'accompagnement a été modifiée dans une autre fenêtre ou par un autre utilisateur. Rechargez la page pour voir ses changements.", action_title: "Action d'accompagnement", comments: "Commentaire", startDate: "Date de début", @@ -599,8 +600,10 @@ export default { }, submit() { this.$store.dispatch('submit').catch((error) => { - if (error.name === 'ValidationException' || error.name === 'AccessException' || error.name === 'ConflictHttpException') { - error.violations.forEach((violation) => this.$toast.open({message: violation})); + if (error.name === 'ValidationException' || error.name === 'AccessException') { + error.violations.forEach((violation) => this.$toast.open({message: violation})); + } else if (error.name === 'ConflictHttpException') { + this.$toast.open({message: this.$t('conflict_on_save')}); } else { this.$toast.open({message: 'An error occurred'}); throw error; @@ -626,8 +629,10 @@ export default { for (let v of error.violations) { this.$toast.open({message: v }); } + } else if (error.name === 'ConflictHttpException') { + this.$toast.open({message: this.$t('conflict_on_save')}); } else { - this.$toast.open({message: 'An error occurred'}); + this.$toast.open({message: 'An error occurred'}); } }) },