Skip to content

Commit

Permalink
May issues (#118)
Browse files Browse the repository at this point in the history
resolves #112
resolves #114
resolves #117
resolves #99

---------

Co-authored-by: kaggl <[email protected]>
  • Loading branch information
kaggl and kaggl authored May 6, 2024
1 parent beaad1a commit 82096bc
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 28 deletions.
2 changes: 1 addition & 1 deletion components/hierarchy-link-button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ defineProps<{
<template>
<NuxtLink
:to="{ path: localePath('hierarchy'), query: { id, label, model } }"
class="rounded-full hover:bg-slate-200 active:bg-slate-300"
class="rounded-full transition hover:bg-slate-200 active:bg-slate-300"
>
<span class="sr-only">Go to Hierarchy view</span>
<Network class="m-2 h-6 w-6 shrink-0" />
Expand Down
7 changes: 4 additions & 3 deletions locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
},
"generic": {
"name": "Name",
"start_date": "Start",
"start_date": "Beginn",
"end_date": "Ende",
"folio": "Folio",
"kind": "Art",
Expand Down Expand Up @@ -147,7 +147,7 @@
"alternative_first_names": "Vorname",
"alternative_last_names": "Nachname",
"alternativenames": "Alternative Namensschreibweisen",
"honorary_titles": "Adelstand und Auszeichnungen",
"honorary_titles": "Adelsstand und Auszeichnungen",
"academic_titles": "Akademische Titel",
"download": "Download und Zitierweise",
"court_functions": "Funktionen am Hof",
Expand All @@ -160,7 +160,8 @@
"functions": "Funktion",
"institutions": "Institution",
"allowance": "Zahlungen",
"same_as": "Onlineressourcen"
"same_as": "Onlineressourcen",
"confession": "Konfession"
},
"viecpro_courts": {
"model": "Modell",
Expand Down
3 changes: 2 additions & 1 deletion locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@
"functions": "Function",
"institutions": "Institution",
"allowance": "Allowance",
"same_as": "Online resources"
"same_as": "Online resources",
"confession": "Confession"
},
"viecpro_courts": {
"model": "Model",
Expand Down
59 changes: 36 additions & 23 deletions pages/detail/persons/[id].vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
import { useQuery, useQueryClient } from "@tanstack/vue-query";
import { isEmpty } from "lodash-es";
import { ExternalLink, Info } from "lucide-vue-next";
import { BookOpenText, ExternalLink, Info } from "lucide-vue-next";
import type { SearchResponse } from "typesense/lib/Typesense/Documents";
import { useRoute } from "vue-router";
Expand Down Expand Up @@ -106,7 +106,7 @@ useHead({
/>
<InfoMenu>
<template #button>
<button class="rounded-full hover:bg-slate-200 active:bg-slate-300">
<button class="rounded-full transition hover:bg-slate-200 active:bg-slate-300">
<span class="sr-only">Show Infos</span>
<Info class="m-2 h-6 w-6 shrink-0" />
</button>
Expand All @@ -122,6 +122,31 @@ useHead({
</div>
</template>
</InfoMenu>
<InfoMenu>
<template #button>
<button class="rounded-full transition hover:bg-slate-200 active:bg-slate-300">
<span class="sr-only">{{ t("collection-keys.viecpro_courts.sources") }}</span>
<BookOpenText class="m-2 h-6 w-6 shrink-0" />
</button>
</template>
<template #content>
<div v-if="data.refs.data" class="w-fit text-base">
<template
v-for="({ document: reference }, i) in data.refs.data.hits"
:key="reference.id"
>
<div v-if="i !== 0" class="my-1 border" />
<div class="flex flex-col gap-1 p-2">
<h3 class="border-b">
{{ reference.title || reference.shortTitle }}
</h3>
<span>{{ reference.folio }}</span>
<span class="text-sm text-gray-400">{{ reference.id }}</span>
</div>
</template>
</div>
</template>
</InfoMenu>
<DownloadMenu detail :data="data" :collection="collection" />
</div>
</div>
Expand Down Expand Up @@ -188,6 +213,14 @@ useHead({
<span>{{ t("collection-keys.viecpro_persons.gender") }}:</span>
<span v-if="!loading.entity">{{ data.entity.data?.gender }}</span>
<span v-else class="animate-pulse">{{ t("ui.loading") }}</span>
<div class="col-span-2 my-1 border-t"></div>
<span>{{ t("collection-keys.viecpro_persons.confession") }}:</span>
<span v-if="!loading.details">
<div v-for="confession in data.details.data?.confession" :key="confession">
{{ confession }}
</div>
</span>
<span v-else class="animate-pulse">{{ t("ui.loading") }}</span>
</template>
<template #left>
<div v-if="data.details.data" class="flex flex-col gap-3">
Expand Down Expand Up @@ -251,26 +284,6 @@ useHead({
grid-class="grid-cols-3"
collection-name="generic"
/>
<GenericDisclosure
:title="t('collection-keys.viecpro_courts.sources')"
:disabled="!data.refs.data || isEmpty(data.refs.data.hits)"
>
<div v-if="data.refs.data">
<template
v-for="({ document: reference }, i) in data.refs.data.hits"
:key="reference.id"
>
<div v-if="i !== 0" class="my-1 border" />
<div class="flex flex-col gap-1 p-2">
<h3 class="border-b">
{{ reference.title || reference.shortTitle }}
</h3>
<span>{{ reference.folio }}</span>
<span class="text-sm text-gray-400">{{ reference.id }}</span>
</div>
</template>
</div>
</GenericDisclosure>
<!-- <DetailDisclosure
title="Download und Zitierweise"
:rels="[]"
Expand Down Expand Up @@ -324,7 +337,7 @@ useHead({
:rels="data.details.data.other_relations_court"
:headers="labelCols"
grid-class="grid-cols-3"
:collection-name="collection"
collection-name="generic"
/>
<GenericDisclosure
:title="t('collection-keys.viecpro_persons.allowance')"
Expand Down

0 comments on commit 82096bc

Please sign in to comment.