diff --git a/lib/create-api-client.ts b/lib/create-api-client.ts index 257b9d7..3e4c114 100644 --- a/lib/create-api-client.ts +++ b/lib/create-api-client.ts @@ -36,15 +36,15 @@ const GroupedRelations = z.object({ salary: z.array(SimplifiedRelation).optional(), }); const Reference = z.object({ - pages_start: z.string(), - pages_end: z.string(), - folio: z.string(), + pages_start: z.string().nullable(), + pages_end: z.string().nullable(), + folio: z.string().nullable(), bibtex: z.object({ - id: z.string(), - type: z.string(), - title: z.string(), - archive: z.string(), - archive_location: z.string(), + id: z.string().nullable(), + type: z.string().nullable(), + title: z.string().nullable(), + archive: z.string().nullable(), + archive_location: z.string().nullable(), }), }); const Event = z diff --git a/messages/de.json b/messages/de.json index f38461e..abb2293 100644 --- a/messages/de.json +++ b/messages/de.json @@ -125,6 +125,7 @@ "start_date": "Von", "end_date": "Bis", "type": "Typ", + "repetition_type": "Wiederholungen", "alternative_label": "Alternativer Name" } } diff --git a/messages/en.json b/messages/en.json index 6daab2b..a96ed42 100644 --- a/messages/en.json +++ b/messages/en.json @@ -125,6 +125,7 @@ "start_date": "From", "end_date": "To", "type": "Type", + "repetition_type": "Repetition", "alternative_label": "Alternative name" } } diff --git a/pages/detail/salary/[id].vue b/pages/detail/salary/[id].vue index 47f1b5b..486ac0e 100644 --- a/pages/detail/salary/[id].vue +++ b/pages/detail/salary/[id].vue @@ -22,17 +22,6 @@ const { data, isLoading } = useQuery({ queryFn: () => endpoint({ params: { id } }), }); -const maxFunctionCount = 3; -const functionNames = computed(() => { - if (isLoading.value) return []; - const fNames = [...new Set(data.value?.relations.function?.map((f) => f.to.name))]; - if (fNames.length <= maxFunctionCount) return fNames; - const truncatedFunctionNames = [ - ...fNames.slice(0, maxFunctionCount), - t("DetailPage.andOthers", { count: fNames.length - maxFunctionCount }), - ]; - return truncatedFunctionNames; -}); const flattenedRelations = computed(() => { if (isLoading.value) return []; const res = Object.entries(data.value?.relations as Record>) @@ -56,14 +45,23 @@ const flattenedRelations = computed(() => { {{ data?.first_name }} {{ data?.name }}
- {{ f }} + {{ data?.repetitionType }}