mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-22 15:43:51 +00:00
rename all interlocutor in resource
This commit is contained in:
@@ -35,13 +35,13 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'InterlocutorItem',
|
||||
name: 'ResourceItem',
|
||||
props: ['resource'],
|
||||
data() {
|
||||
return {
|
||||
url: {
|
||||
show: 'show', //'/fr/person/' + this.interlocutor.person.id + '/general',
|
||||
edit: 'edit' //'/fr/person/' + this.interlocutor.person.id + '/general/edit'
|
||||
show: 'show', //'/fr/person/' + this.resource.person.id + '/general',
|
||||
edit: 'edit' //'/fr/person/' + this.resource.person.id + '/general/edit'
|
||||
}
|
||||
}
|
||||
},
|
@@ -1,32 +1,32 @@
|
||||
<template>
|
||||
<div class="vue-component">
|
||||
|
||||
<h3>{{ $t('interlocutors.title')}}</h3>
|
||||
<h3>{{ $t('resources.title')}}</h3>
|
||||
|
||||
<label>{{ $tc('interlocutors.counter', counter) }}</label>
|
||||
<label>{{ $tc('resources.counter', counter) }}</label>
|
||||
<table class="rounded">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="chill-orange">{{ $t('interlocutors.firstname') }}</th>
|
||||
<th class="chill-orange">{{ $t('interlocutors.lastname') }}</th>
|
||||
<th class="chill-orange">{{ $t('resources.firstname') }}</th>
|
||||
<th class="chill-orange">{{ $t('resources.lastname') }}</th>
|
||||
<th>3</th>
|
||||
<th>4</th>
|
||||
<th class="chill-orange">{{ $t('action.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<interlocutor-item
|
||||
<resource-item
|
||||
v-for="resource in resources"
|
||||
v-bind:resource="resource"
|
||||
v-bind:key="resource.id"
|
||||
@remove="removeInterlocutor">
|
||||
</interlocutor-item>
|
||||
@remove="removeResource">
|
||||
</resource-item>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<add-persons
|
||||
buttonTitle="interlocutors.add_interlocutors"
|
||||
modalTitle="interlocutors.add_interlocutors"
|
||||
buttonTitle="resources.add_resources"
|
||||
modalTitle="resources.add_resources"
|
||||
v-bind:key="addPersons.key"
|
||||
v-bind:options="addPersons.options"
|
||||
@addNewPersons="addNewPersons"
|
||||
@@ -39,18 +39,18 @@
|
||||
<script>
|
||||
import { mapState } from 'vuex';
|
||||
import AddPersons from 'ChillPersonAssets/vuejs/_components/AddPersons.vue';
|
||||
import InterlocutorItem from './InterlocutorItem.vue';
|
||||
import ResourceItem from './ResourceItem.vue';
|
||||
|
||||
export default {
|
||||
name: 'Interlocutors',
|
||||
name: 'Resources',
|
||||
components: {
|
||||
AddPersons,
|
||||
InterlocutorItem
|
||||
ResourceItem
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
addPersons: {
|
||||
key: 'interlocutors',
|
||||
key: 'resources',
|
||||
options: {
|
||||
type: ['person', 'thirdparty'],
|
||||
priority: null,
|
||||
@@ -64,14 +64,14 @@ export default {
|
||||
counter: state => state.accompanyingCourse.resources.length
|
||||
}),
|
||||
methods: {
|
||||
removeInterlocutor(item) {
|
||||
console.log('@@ CLICK remove interlocutor: item', item);
|
||||
this.$store.dispatch('removeInterlocutor', item);
|
||||
removeResource(item) {
|
||||
console.log('@@ CLICK remove resource: item', item);
|
||||
this.$store.dispatch('removeResource', item);
|
||||
},
|
||||
addNewPersons({ selected, modal }) {
|
||||
console.log('@@@ CLICK button addNewPersons', selected);
|
||||
selected.forEach(function(item) {
|
||||
this.$store.dispatch('addInterlocutor', item);
|
||||
this.$store.dispatch('addResource', item);
|
||||
}, this
|
||||
);
|
||||
this.$refs.addPersons.resetSearch(); // to cast child method
|
Reference in New Issue
Block a user