mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
moving selected counter + cleaning code
This commit is contained in:
@@ -23,11 +23,6 @@
|
||||
</table>
|
||||
<add-persons></add-persons>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<!--button class="sc-button bt-create" @click="addPerson">
|
||||
{{ $t('persons_associated.addPerson') }}
|
||||
</button-->
|
||||
</li>
|
||||
<li>
|
||||
<button class="sc-button orange" @click="savePersons">
|
||||
{{ $t('action.save') }}
|
||||
@@ -42,8 +37,6 @@ import { mapState } from 'vuex';
|
||||
import PersonItem from "./PersonItem.vue"
|
||||
import AddPersons from 'ChillPersonAssets/vuejs/_components/AddPersons.vue'
|
||||
|
||||
//let SimpsonId = 10000
|
||||
|
||||
export default {
|
||||
name: 'PersonsAssociated',
|
||||
components: {
|
||||
@@ -55,15 +48,6 @@ export default {
|
||||
counter: state => state.accompanying_course.participations.length
|
||||
}),
|
||||
methods: {
|
||||
//addPerson() {
|
||||
// console.log('[wip] opening add persons modal');
|
||||
// this.$store.dispatch('addParticipation', {
|
||||
// id: SimpsonId++,
|
||||
// person: { firstName: "Lisa", lastName: "Simpson", id: SimpsonId },
|
||||
// startDate: { datetime: "1975-09-15T00:00:00+0100" },
|
||||
// endDate: { datetime: "1975-09-28T00:00:00+0100" },
|
||||
// })
|
||||
//},
|
||||
removePerson(item) {
|
||||
this.$store.dispatch('removeParticipation', item)
|
||||
},
|
||||
|
@@ -38,8 +38,11 @@ let getDataPromise = getAccompanyingCourse(id)
|
||||
//console.log('q=', query);
|
||||
state.add_persons = Object.assign({}, state.add_persons, query);
|
||||
},
|
||||
loadSuggestions(state, suggestions) {
|
||||
state.add_persons.suggested = suggestions;
|
||||
loadSuggestions(state, suggested) {
|
||||
console.log('suggested', suggested);
|
||||
// doublons si on ré-affiche des suggestions avec certains selected
|
||||
//suggested.results.filter(selected => selected !== suggested.results);
|
||||
state.add_persons.suggested = suggested;
|
||||
},
|
||||
updateSelected(state, value) {
|
||||
console.log('update value', value);
|
||||
|
Reference in New Issue
Block a user