mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
remove from multiselect when adding social issues + disable accompanyingcourse issues loading
This commit is contained in:
parent
3a81124e04
commit
e06aded1ec
@ -15,12 +15,17 @@
|
||||
@updateSelected="updateSelected">
|
||||
</check-social-issue>
|
||||
|
||||
<div class="mt-4">
|
||||
<div class="mt-3">
|
||||
<VueMultiselect
|
||||
name="otherIssues"
|
||||
label="text"
|
||||
track-by="id"
|
||||
open-direction="bottom"
|
||||
v-bind:close-on-select="true"
|
||||
v-bind:preserve-search="false"
|
||||
v-bind:reset-after="true"
|
||||
v-bind:hide-selected="true"
|
||||
v-bind:taggable="false"
|
||||
v-bind:multiple="false"
|
||||
v-bind:searchable="true"
|
||||
v-bind:allow-empty="true"
|
||||
@ -30,9 +35,12 @@
|
||||
v-model="value"
|
||||
@select="updateSocialIssuesList"
|
||||
>
|
||||
|
||||
<template v-slot:selection="{ values, search, isOpen }"><!-- {{ values.length }} {{ isOpen }} -->
|
||||
<span v-if="values.length > 0" class="multiselect__single"></span>
|
||||
</template>
|
||||
|
||||
</VueMultiselect>
|
||||
<!--
|
||||
-->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -86,29 +94,30 @@ export default {
|
||||
})
|
||||
},
|
||||
mounted() {
|
||||
this.loadSocialIssues();
|
||||
//this.loadSocialIssues();
|
||||
this.loadOthersSocialIssues();
|
||||
},
|
||||
methods: {
|
||||
loadSocialIssues() {
|
||||
console.log('when mounted load socialIssues');
|
||||
this.socialIssues.list = this.accompanyingCourseSocialIssues;
|
||||
// TODO ajouter les issues déjà liées à activity
|
||||
},
|
||||
loadOthersSocialIssues() {
|
||||
getSocialIssues().then(response => new Promise((resolve, reject) => {
|
||||
console.log('load others issues in multiselect');
|
||||
this.otherIssues = response.results;
|
||||
// TODO remove double checkbox results from select
|
||||
resolve();
|
||||
}));
|
||||
},
|
||||
updateSocialIssuesList(value) {
|
||||
console.log('updateSocialIssuesList', value);
|
||||
// TODO ajouter la valeur cochée dans les checkbox
|
||||
//this.socialIssues.list.push(value); !?? l'ajoute dans vuex le store !!?
|
||||
//this.socialIssues.selected.push(value);
|
||||
this.socialIssues.list.push(value);
|
||||
this.socialIssues.selected.push(value);
|
||||
this.otherIssues = this.otherIssues.filter(item => item !== value);
|
||||
},
|
||||
updateSelected(value) {
|
||||
console.log('updateSelected', value);
|
||||
console.log('updateSelected issue', value);
|
||||
this.socialIssues.selected = value;
|
||||
}
|
||||
}
|
||||
@ -116,5 +125,8 @@ export default {
|
||||
</script>
|
||||
|
||||
<style src="vue-multiselect/dist/vue-multiselect.css"></style>
|
||||
<style lang="scss" scoped>
|
||||
<style lang="scss">
|
||||
span.multiselect__single {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
|
@ -5,7 +5,7 @@ const appMessages = {
|
||||
activity: {
|
||||
//
|
||||
social_issues: "Problématiques sociales",
|
||||
choose_other_social_issue: "sélectionner une nouvelle problématique sociale...",
|
||||
choose_other_social_issue: "ajouter une nouvelle problématique sociale...",
|
||||
accompanying_actions: "Actions d'accompagnement",
|
||||
//
|
||||
add_persons: "Ajouter des personnes concernées",
|
||||
|
Loading…
x
Reference in New Issue
Block a user