Skip to content

Commit

Permalink
ItemView: Add tab for mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
stefandesu committed Jun 28, 2024
1 parent f9dacb4 commit 6d91888
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/client/views/ItemView.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script setup>
import config from "@/config.js"
import * as jskos from "jskos-tools"
import { AutoLink } from "jskos-vue"
import { Tab } from "jskos-vue-tabs"
import { schemes, registry, loadTop, loadNarrower, loadConcept, loadAncestors, saveConcept } from "@/store.js"
import { computed, ref, watch } from "vue"
Expand Down Expand Up @@ -146,6 +147,19 @@ const topConcepts = computed(() => {
:longitude="concept.location.coordinates[0]"
:latitude="concept.location.coordinates[1]" />
</tab>
<tab
v-if="concept?.mappings?.length"
title="Mappings">
<p
v-for="(mapping, index) in concept.mappings"
:key="index">
{{ (jskos.mappingTypeByType(mapping.type) || jskos.defaultMappingType).notation[0] }}
<auto-link
v-for="c in jskos.conceptsOfMapping(mapping)"
:key="c?.uri"
:href="c?.uri" />
</p>
</tab>
<tab
v-if="config.env === 'development'"
title="JSKOS">
Expand Down

0 comments on commit 6d91888

Please sign in to comment.