-
Pierre-Jean CHANCELLIER authoredPierre-Jean CHANCELLIER authored
List.vue 829 B
<template>
<div class="list-group">
<NuxtLink :to="'/hash/'+getNeighbor(certif).hash" class="list-group-item list-group-item-action" v-for="certif in certifs" :key="getNeighbor(certif).uid">
{{ getNeighbor(certif).uid }}
<small class="text-muted">Expire le {{ certif.expires_on | formatDate }}</small>
</NuxtLink>
</div>
</template>
<script>
export default {
props : {
certifs : Array,
type : {
type: String,
required: true,
validator: function (value) {
const types = ['recieved','sent']
return types.indexOf(value) !== -1
}
}
},
methods : {
getNeighbor(certif) {
return this.type == "recieved" ? certif.from : certif.to
}
}
}
</script>
<style>
</style>