mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
add validation to accompanying periods
This commit is contained in:
@@ -10,13 +10,13 @@
|
||||
<VueMultiselect
|
||||
name="selectOrigin"
|
||||
label="text"
|
||||
v-bind:custom-label="transText"
|
||||
:custom-label="transText"
|
||||
track-by="id"
|
||||
v-bind:multiple="false"
|
||||
v-bind:searchable="true"
|
||||
v-bind:placeholder="$t('origin.placeholder')"
|
||||
:multiple="false"
|
||||
:searchable="true"
|
||||
:placeholder="$t('origin.placeholder')"
|
||||
v-model="value"
|
||||
v-bind:options="options"
|
||||
:options="options"
|
||||
@select="updateOrigin">
|
||||
</VueMultiselect>
|
||||
|
||||
@@ -47,18 +47,18 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
getOptions() {
|
||||
//console.log('loading origins list');
|
||||
getListOrigins().then(response => new Promise((resolve, reject) => {
|
||||
this.options = response.results;
|
||||
resolve();
|
||||
}));
|
||||
},
|
||||
updateOrigin(value) {
|
||||
//console.log('value', value);
|
||||
console.log('value', value);
|
||||
this.$store.dispatch('updateOrigin', value);
|
||||
},
|
||||
transText ({ text }) {
|
||||
return text.fr //TODO multilang
|
||||
const parsedText = JSON.parse(text);
|
||||
return parsedText.fr;
|
||||
},
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user