Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<template>
<b-tab :title="'Invited (' + registrations.length + ')'" :title-link-class="{ 'd-none': registrations.length === 0 }">
<table class="table b-table table-striped table-hover" v-if="registrations">
<thead>
<tr>
<th>Email</th>
<th>Permission</th>
<th>Submitted at</th>
<th></th>
</tr>
</thead>
<tbody>
<tr v-for="(reg, index) in registrations" v-bind:key="index">
<td>{{reg.email}}</td>
<td>{{reg.permission}}</td>
<td>{{reg.creationTime}}</td>
<td>
<a href="#" v-on:click.stop="openConfirmDeleteInvitedModal(reg)" class="text-danger" title="Remove permission">
<font-awesome-icon icon="trash"></font-awesome-icon>
</a>
</td>
</tr>
</tbody>
</table>
<ConfirmDeleteInvitedModal ref="confirmDeleteInvitedModal" />
</b-tab>
</template>
<script>
import ConfirmDeleteInvitedModal from './modals/ConfirmDeleteInvitedModal.vue';
export default {
name: 'InvitedRegistrationPanel',
components: {
ConfirmDeleteInvitedModal
},
computed: {
registrations() {
return this.$store.state.model.invitedRegistrations === null ? [] : this.$store.state.model.invitedRegistrations;
}
},
methods: {
openConfirmDeleteInvitedModal(reg) {
let breadcrumbs = this.$store.state.model.breadcrumbs;
let currentGroupId = breadcrumbs[breadcrumbs.length - 1].groupId;
this.$refs.confirmDeleteInvitedModal.openConfirmDeleteInvitedModal(reg, currentGroupId);
}
}
}
</script>