Added Frontend
This commit is contained in:
27
frontend/components/columnRenderings/profiles.vue
Normal file
27
frontend/components/columnRenderings/profiles.vue
Normal file
@@ -0,0 +1,27 @@
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
row: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: {}
|
||||
},
|
||||
inShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
|
||||
const profileStore = useProfileStore()
|
||||
|
||||
const profiles = computed(() => props.row.profiles.map(id => profileStore.getProfileById(id).fullName).join(', '))
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div v-if="props.row.profiles">
|
||||
<div v-if="props.inShow">
|
||||
<nuxt-link v-for="(profileId, index) in props.row.profiles" :to="`/profiles/show/${profileId}`">{{profileStore.getProfileById(profileId).fullName}}{{index < props.row.profiles.length - 1 ? "," : ""}}</nuxt-link>
|
||||
</div>
|
||||
<span v-else>{{props.row.profiles ? profiles : ''}}</span>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user