mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
FIX [referrer][deselect] allow referrer to be deselected in parcours edit form
This commit is contained in:
parent
896b4cdfe3
commit
4a30f310b8
@ -59,6 +59,7 @@
|
||||
:placeholder="$t('referrer.placeholder')"
|
||||
v-model="value"
|
||||
@select="updateReferrer"
|
||||
@remove="removeReferrer"
|
||||
:options="users"
|
||||
:select-label="$t('multiselect.select_label')"
|
||||
:deselect-label="$t('multiselect.deselect_label')"
|
||||
@ -194,6 +195,17 @@ export default {
|
||||
});
|
||||
this.toggleModal()
|
||||
},
|
||||
removeReferrer() {
|
||||
console.log('remove option')
|
||||
this.$store.dispatch('updateReferrer', null)
|
||||
.catch(({name, violations}) => {
|
||||
if (name === 'ValidationException' || name === 'AccessException') {
|
||||
violations.forEach((violation) => this.$toast.open({message: violation}));
|
||||
} else {
|
||||
this.$toast.open({message: 'An error occurred'})
|
||||
}
|
||||
});
|
||||
},
|
||||
cancelChange() {
|
||||
this.value = this.$store.state.accompanyingCourse.user
|
||||
this.toggleModal()
|
||||
|
Loading…
x
Reference in New Issue
Block a user