1212 <GInput id =" tagger-name" type =" text" v-model =" taggerFilter" placeholder =" Tagger name" ></GInput >
1313 </fieldset >
1414
15- <fieldset >
16- <label for =" tagset-select" >Select tagset</label >
17- <MultiSelect
18- id =" tagset-select"
19- v-model =" tagsetFilter"
20- :options =" tagsets"
21- placeholder =" Tagset"
22- />
23- </fieldset >
24-
2515 <fieldset >
2616 <label for =" annotation-select" >Select annotation</label >
2717 <MultiSelect
5848 <template v-slot :cell-actions =" d : TableData < Job > " >
5949 <GButton plain @click =" jobId = d.item.tagger.id" >View & ; Tag</GButton >
6050 </template >
51+
52+ <!-- annotations cell -->
53+ <template #cell-annotations =" d : TableData < Job > " >
54+ <AnnotationItemsViewer :items =" d.item.tagger.annotations" >
55+ <template #title >Annotations and principles of {{ d.item.tagger.id }}</template >
56+ </AnnotationItemsViewer >
57+ </template >
6158 </GTable >
6259
6360 <!-- job modal -->
@@ -71,6 +68,7 @@ import type { Job, Progress } from "@/types/jobs"
7168import type { Column , TableData } from " @/types/ui/table"
7269import { formatDate } from " @/ts/utils"
7370import MultiSelect from " primevue/multiselect"
71+ import AnnotationItemsViewer from " @/components/modals/metadata/AnnotationItemsViewer.vue"
7472
7573// #stores
7674const { canWrite } = storeToRefs (stores .useUser ())
@@ -89,8 +87,9 @@ const annotationFilter = ref<string[]>([])
8987
9088// #computed
9189// select options
92- const tagsets = computed <string []>(() => [... new Set (taggerJobs .value .flatMap ((j : Job ) => j .tagger .tagset ))])
93- const annotations = computed <string []>(() => [... new Set (taggerJobs .value .flatMap ((j : Job ) => j .tagger .annotations ))])
90+ const annotations = computed <string []>(() => [
91+ ... new Set (taggerJobs .value .flatMap ((j : Job ) => j .tagger .annotations .flatMap ((a ) => a .annotation ))),
92+ ])
9493// table data
9594const items = computed (() =>
9695 taggerJobs .value
@@ -107,18 +106,13 @@ const items = computed(() =>
107106)
108107const columns = computed <Column <Job >[]>((): Column <Job >[] => [
109108 { key: " id" , label: " tagger" , sortOn : (j : Job ): string => j .tagger .id , align: " left" },
110- { key: " tagset" , sortOn : (j : Job ): string => j .tagger .tagset , format : (j : Job ): string => j .tagger .tagset },
111109 { key: " language" , sortOn : (j : Job ): string => j .tagger .language , format : (j : Job ): string => j .tagger .language },
112110 {
113111 key: " period" ,
114- sortOn : (j : Job ): string => ` ${j .tagger .eraFrom } ${j .tagger .eraTo } ` ,
115- format : (j : Job ): string => ` ${j .tagger .eraFrom } – ${j .tagger .eraTo } ` ,
116- },
117- {
118- key: " annotations" ,
119- format : (j : Job ): string => j .tagger .annotations .join (" , " ),
120- sortOn : (j : Job ): string => j .tagger .annotations .join (),
112+ sortOn : (j : Job ): string => ` ${j .tagger .period .from } ${j .tagger .period .to } ` ,
113+ format : (j : Job ): string => ` ${j .tagger .period .from } – ${j .tagger .period .to } ` ,
121114 },
115+ { key: " annotations" , sortOn : (j : Job ): string => j .tagger .annotations .map ((a ) => a .annotation ).join () },
122116 {
123117 key: " summary" ,
124118 label: " tokens" ,
0 commit comments