File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed
Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 11<script setup lang="ts">
22const { field, routePath } = defineProps <{
3- field: { id: string ; name: string };
3+ field: { id: string ; name: string ; identifiers ? : { shortIdentifier : string } };
44 routePath: string ;
55}>();
66
77const id = field .id ;
88const link = ` /${routePath }?id=${encodeURIComponent (id )} ` ;
9+ const label = field .identifiers ?.shortIdentifier
10+ ? ` ${field .identifiers .shortIdentifier } - ${field .name || field .id } `
11+ : field .name || field .id ;
912 </script >
1013
1114<template >
1215 <p >
1316 <el-link type =" primary" >
1417 <router-link :to =" link" >
15- {{ field.name || field.id }}
18+ {{ label }}
1619 </router-link >
1720 </el-link >
1821 </p >
Original file line number Diff line number Diff line change @@ -33,6 +33,11 @@ type BaseEntityType = {
3333 id : string ;
3434 name : string ;
3535 description ?: string ;
36+ identifiers ?: {
37+ collectionIdentifier : string ;
38+ itemIdentifier : string ;
39+ shortIdentifier : string ;
40+ } ;
3641 memberOf ?: {
3742 id : string ;
3843 name ?: string ;
Original file line number Diff line number Diff line change @@ -330,7 +330,7 @@ fetchdata();
330330 <ul class =" mt-4 space" >
331331 <li v-for =" d of membersFiltered" :key =" d.id" >
332332 <p v-if =" d.id === route.query.id" class =" font-bold" >
333- {{ d.name || d.id }}
333+ {{ d.identifiers?.shortIdentifier ? `${d.identifiers.shortIdentifier} - ${d.name || d.id}` : d. name || d.id }}
334334 </p >
335335 <CollectionItem v-else :field =" d" routePath =" object" />
336336 </li >
You can’t perform that action at this time.
0 commit comments