mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
when passed option uniq, suggestions are with radio button, not checkbox
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="modal-body" v-if="checkUniq === 'checkbox'">
|
||||
<div class="count">
|
||||
<span>
|
||||
<a v-if="suggestedCounter > 2" @click="selectAll">
|
||||
@@ -57,6 +57,7 @@
|
||||
v-bind:key="itemKey(item)"
|
||||
v-bind:item="item"
|
||||
v-bind:search="search"
|
||||
v-bind:type="checkUniq"
|
||||
@updateSelected="updateSelected">
|
||||
</person-suggestion>
|
||||
|
||||
@@ -71,7 +72,6 @@
|
||||
@click.prevent="$emit('addNewPersons', { selected, modal })">
|
||||
<i class="fa fa-plus fa-fw"></i>{{ $t('action.add')}}
|
||||
</button>
|
||||
{{ $t(checkUniq) }}
|
||||
</template>
|
||||
|
||||
</modal>
|
||||
@@ -148,10 +148,10 @@ export default {
|
||||
return this.options;
|
||||
},
|
||||
checkUniq() {
|
||||
if (this.options.uniq === true && this.selectedCounter > 1) {
|
||||
return "error_only_one_person";
|
||||
if (this.options.uniq === true) {
|
||||
return 'radio';
|
||||
}
|
||||
return '';
|
||||
return 'checkbox';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -180,6 +180,7 @@ export default {
|
||||
}, this);
|
||||
},
|
||||
updateSelected(value) {
|
||||
console.log('value', value);
|
||||
this.search.selected = value;
|
||||
},
|
||||
resetSearch() {
|
||||
|
Reference in New Issue
Block a user