mirror of
				https://gitlab.com/Chill-Projet/chill-bundles.git
				synced 2025-10-31 17:28:23 +00:00 
			
		
		
		
	FIX [referrer][deselect] allow referrer to be deselected in parcours edit form
This commit is contained in:
		| @@ -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() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user