adding show/edit links (prepare modal) + save button

This commit is contained in:
2021-04-28 13:59:37 +02:00
parent 4bb3eadf91
commit 94e494361f
6 changed files with 64 additions and 21 deletions

View File

@@ -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>

View File

@@ -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');
}
}
}