mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-22 07:33:50 +00:00
fetch post resource
This commit is contained in:
@@ -1,14 +1,10 @@
|
||||
<template>
|
||||
<tr>
|
||||
|
||||
<td>{{ interlocutor.key }}</td>
|
||||
<td>{{ interlocutor.result.text }}</td>
|
||||
<td><span >
|
||||
</span>
|
||||
</td>
|
||||
<td><span >
|
||||
</span>
|
||||
</td>
|
||||
<td>{{ resource.resource.text }}</td>
|
||||
<td>{{ resource.resource.type }} {{ resource.resource.id }}</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
|
||||
<td>
|
||||
<ul class="record_actions">
|
||||
@@ -28,7 +24,7 @@
|
||||
<button
|
||||
class="sc-button bt-remove"
|
||||
:title="$t('action.remove')"
|
||||
@click.prevent="$emit('remove', interlocutor)">
|
||||
@click.prevent="$emit('remove', resource)">
|
||||
</button>
|
||||
|
||||
</li>
|
||||
@@ -40,7 +36,7 @@
|
||||
<script>
|
||||
export default {
|
||||
name: 'InterlocutorItem',
|
||||
props: ['interlocutor'],
|
||||
props: ['resource'],
|
||||
data() {
|
||||
return {
|
||||
url: {
|
||||
|
@@ -16,9 +16,9 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<interlocutor-item
|
||||
v-for="interlocutor in interlocutors"
|
||||
v-bind:interlocutor="interlocutor"
|
||||
v-bind:key="interlocutor.id"
|
||||
v-for="resource in resources"
|
||||
v-bind:resource="resource"
|
||||
v-bind:key="resource.id"
|
||||
@remove="removeInterlocutor">
|
||||
</interlocutor-item>
|
||||
</tbody>
|
||||
@@ -37,6 +37,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex';
|
||||
import AddPersons from 'ChillPersonAssets/vuejs/_components/AddPersons.vue';
|
||||
import InterlocutorItem from './InterlocutorItem.vue';
|
||||
|
||||
@@ -58,15 +59,14 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
accompanyingCourse() {
|
||||
return this.$store.state.accompanyingCourse;
|
||||
}
|
||||
},
|
||||
computed: mapState({
|
||||
resources: state => state.accompanyingCourse.resources,
|
||||
counter: state => state.accompanyingCourse.resources.length
|
||||
}),
|
||||
methods: {
|
||||
removeInterlocutor() {
|
||||
console.log('@@ CLICK remove interlocutor: item');
|
||||
this.$store.dispatch('removeInterlocutor');
|
||||
removeInterlocutor(item) {
|
||||
console.log('@@ CLICK remove interlocutor: item', item);
|
||||
this.$store.dispatch('removeInterlocutor', item);
|
||||
},
|
||||
addNewPersons({ selected, modal }) {
|
||||
console.log('@@@ CLICK button addNewPersons', selected);
|
||||
|
Reference in New Issue
Block a user