mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Translate message on conflict in AccompanyingPeriodWorkEdit App
This commit is contained in:
parent
aa0cadfa84
commit
cc281762b3
@ -351,6 +351,7 @@ const i18n = {
|
|||||||
action: {
|
action: {
|
||||||
save: "Enregistrer"
|
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",
|
action_title: "Action d'accompagnement",
|
||||||
comments: "Commentaire",
|
comments: "Commentaire",
|
||||||
startDate: "Date de début",
|
startDate: "Date de début",
|
||||||
@ -599,8 +600,10 @@ export default {
|
|||||||
},
|
},
|
||||||
submit() {
|
submit() {
|
||||||
this.$store.dispatch('submit').catch((error) => {
|
this.$store.dispatch('submit').catch((error) => {
|
||||||
if (error.name === 'ValidationException' || error.name === 'AccessException' || error.name === 'ConflictHttpException') {
|
if (error.name === 'ValidationException' || error.name === 'AccessException') {
|
||||||
error.violations.forEach((violation) => this.$toast.open({message: violation}));
|
error.violations.forEach((violation) => this.$toast.open({message: violation}));
|
||||||
|
} else if (error.name === 'ConflictHttpException') {
|
||||||
|
this.$toast.open({message: this.$t('conflict_on_save')});
|
||||||
} else {
|
} else {
|
||||||
this.$toast.open({message: 'An error occurred'});
|
this.$toast.open({message: 'An error occurred'});
|
||||||
throw error;
|
throw error;
|
||||||
@ -626,6 +629,8 @@ export default {
|
|||||||
for (let v of error.violations) {
|
for (let v of error.violations) {
|
||||||
this.$toast.open({message: v });
|
this.$toast.open({message: v });
|
||||||
}
|
}
|
||||||
|
} else if (error.name === 'ConflictHttpException') {
|
||||||
|
this.$toast.open({message: this.$t('conflict_on_save')});
|
||||||
} else {
|
} else {
|
||||||
this.$toast.open({message: 'An error occurred'});
|
this.$toast.open({message: 'An error occurred'});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user