mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 23:23:51 +00:00
adding show/edit links (prepare modal) + save button
This commit is contained in:
@@ -11,14 +11,16 @@
|
||||
<td>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<button class="sc-button bt-show"
|
||||
<a class="sc-button bt-show" target="_blank"
|
||||
:href="url.show"
|
||||
:title="$t('action.show')">
|
||||
</button>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<button class="sc-button bt-update"
|
||||
<a class="sc-button bt-update" target="_blank"
|
||||
:href="url.edit"
|
||||
:title="$t('action.edit')">
|
||||
</button>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<button class="sc-button bt-delete"
|
||||
@@ -35,6 +37,14 @@
|
||||
export default {
|
||||
name: 'PersonItem',
|
||||
props: ['participation'],
|
||||
data() {
|
||||
return {
|
||||
url: {
|
||||
show: '/fr/person/' + this.participation.person.id + '/general',
|
||||
edit: '/fr/person/' + this.participation.person.id + '/general/edit'
|
||||
}
|
||||
}
|
||||
},
|
||||
emits: ['remove']
|
||||
}
|
||||
</script>
|
||||
|
@@ -27,9 +27,13 @@
|
||||
{{ $t('persons_associated.addPerson') }}
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button class="sc-button orange" @click="savePersons">
|
||||
{{ $t('action.save') }}
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -49,6 +53,7 @@ export default {
|
||||
}),
|
||||
methods: {
|
||||
addPerson() {
|
||||
console.log('[wip] opening add persons modal');
|
||||
this.$store.commit('addParticipation', {
|
||||
id: SimpsonId++,
|
||||
person: { firstName: "Lisa", lastName: "Simpson", id: SimpsonId },
|
||||
@@ -58,6 +63,9 @@ export default {
|
||||
},
|
||||
removePerson(item) {
|
||||
this.$store.commit('removeParticipation', item)
|
||||
},
|
||||
savePersons() {
|
||||
console.log('[wip] saving persons');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user