Fix js tests

This commit is contained in:
Daniel Egger 2022-09-28 18:06:36 +02:00
parent 3bd604215a
commit 6cf7d97771
5 changed files with 175 additions and 199 deletions

View File

@ -4,9 +4,9 @@ import { Circle } from '../circle'
describe('Circle.parseJson', () => { describe('Circle.parseJson', () => {
it('can parse circle from api response', () => { it('can parse circle from api response', () => {
const cirleData = data.children.find((c) => c.slug === 'unit-test-circle') const cirleData = data.children.find((c) => c.slug === 'test-lehrgang-lp-circle-analyse')
const circle = Circle.fromJson(cirleData, undefined) const circle = Circle.fromJson(cirleData, undefined)
expect(circle.learningSequences.length).toBe(3) expect(circle.learningSequences.length).toBe(3)
expect(circle.flatLearningContents.length).toBe(8) expect(circle.flatLearningContents.length).toBe(7)
}) })
}) })

View File

@ -8,7 +8,7 @@ describe('LearningPath.parseJson', () => {
expect(learningPath.circles.length).toBe(2) expect(learningPath.circles.length).toBe(2)
expect(learningPath.circles[0].title).toBe('Basis') expect(learningPath.circles[0].title).toBe('Basis')
expect(learningPath.circles[1].title).toBe('Unit-Test Circle') expect(learningPath.circles[1].title).toBe('Analyse')
expect(learningPath.topics.length).toBe(2) expect(learningPath.topics.length).toBe(2)
}) })

View File

@ -1,314 +1,297 @@
{ {
"id": 409, "id": 372,
"title": "Unit-Test Lernpfad", "title": "Test Lernpfad",
"slug": "unit-test-lernpfad", "slug": "test-lehrgang-lp",
"type": "learnpath.LearningPath", "type": "learnpath.LearningPath",
"translation_key": "9f50de84-036c-4986-ab3e-1a83a374910a", "translation_key": "42e559ca-970f-4a08-9e5e-63860585ee1e",
"children": [ "children": [
{ {
"id": 410, "id": 373,
"title": "Basis", "title": "Basis",
"slug": "basis-1", "slug": "test-lehrgang-lp-topic-basis",
"type": "learnpath.Topic", "type": "learnpath.Topic",
"translation_key": "fbc1431c-46b0-4f77-93ee-4f10e0e59c03", "translation_key": "d68c1544-cf22-4a59-a81c-8cb977440cd0",
"is_visible": false "is_visible": false
}, },
{ {
"id": 411, "id": 374,
"title": "Basis", "title": "Basis",
"slug": "basis-2", "slug": "test-lehrgang-lp-circle-basis",
"type": "learnpath.Circle", "type": "learnpath.Circle",
"translation_key": "d30cb8f8-6bb5-4e7a-8123-a370b7668a85", "translation_key": "ec62a2af-6f74-4031-b971-c3287bbbc573",
"children": [ "children": [
{ {
"id": 412, "id": 375,
"title": "Starten", "title": "Starten",
"slug": "starten", "slug": "test-lehrgang-lp-circle-basis-ls-starten",
"type": "learnpath.LearningSequence", "type": "learnpath.LearningSequence",
"translation_key": "1c5cd2a1-a39e-496e-b856-342f34d2b21c", "translation_key": "c5fdada9-036d-4516-a50f-6656a1c6b009",
"icon": "it-icon-ls-start" "icon": "it-icon-ls-start"
}, },
{ {
"id": 413, "id": 376,
"title": "Einleitung Circle \"Basis\"", "title": "Einf\u00fchrung",
"slug": "einleitung-circle-basis-1", "slug": "test-lehrgang-lp-circle-basis-lc-einf\u00fchrung",
"type": "learnpath.LearningContent", "type": "learnpath.LearningContent",
"translation_key": "48d4ace9-b0cf-4e23-98d2-012c1b91100e", "translation_key": "01de5131-28ce-4b1f-805f-8643384bfd6b",
"minutes": 15, "minutes": 15,
"contents": [ "contents": [
{ {
"type": "video", "type": "document",
"value": { "value": {
"description": "Basis Video", "description": "Beispiel Dokument",
"url": "https://www.youtube.com/embed/qhPIfxS2hvI" "url": null
}, },
"id": "ee431ded-edc4-4984-9dd8-ab1d869d82ae" "id": "bd05f721-3e9d-4a11-8fe2-7c04e2365f52"
} }
] ]
}, },
{ {
"id": 414, "id": 377,
"title": "Beenden", "title": "Beenden",
"slug": "beenden", "slug": "test-lehrgang-lp-circle-basis-ls-beenden",
"type": "learnpath.LearningSequence", "type": "learnpath.LearningSequence",
"translation_key": "eaeaf0c7-b2b7-41a9-a77f-b392f83291eb", "translation_key": "128c0162-025f-41be-9842-60016a77cdbc",
"icon": "it-icon-ls-end" "icon": "it-icon-ls-end"
}, },
{ {
"id": 415, "id": 378,
"title": "Kompetenzprofil anschauen", "title": "Jetzt kann es losgehen!",
"slug": "kompetenzprofil-anschauen-8", "slug": "test-lehrgang-lp-circle-basis-lc-jetzt-kann-es-losgehen",
"type": "learnpath.LearningContent", "type": "learnpath.LearningContent",
"translation_key": "784772fc-d2ac-4df2-8ca1-61a45fbfe001", "translation_key": "271896b9-6082-4fd4-9d70-6093ec9cc6ea",
"minutes": 30, "minutes": 30,
"contents": [ "contents": [
{ {
"type": "document", "type": "document",
"value": { "value": {
"description": "Beispiel Kompetenz" "description": "Beispiel Dokument",
"url": null
}, },
"id": "09acb23d-cb20-4d0f-963b-61db9ac0b037" "id": "204fc13b-a9ae-40de-8e09-f1e922c4fdd9"
}
]
},
{
"id": 416,
"title": "Circle \"Analyse\" abschliessen",
"slug": "circle-analyse-abschliessen-8",
"type": "learnpath.LearningContent",
"translation_key": "e1bf9081-cf6b-4426-a16d-8213aba9795e",
"minutes": 30,
"contents": [
{
"type": "document",
"value": {
"description": "Beispiel Kompetenz"
},
"id": "fa835da9-6238-40fb-a718-2d21d420926f"
} }
] ]
} }
], ],
"description": "Basis von Unit-Test Lernpfad", "description": "Basis",
"job_situations": [], "job_situations": [],
"goals": [], "goals": [],
"experts": [] "experts": []
}, },
{ {
"id": 417, "id": 379,
"title": "Gewinnen von Kunden", "title": "Beraten der Kunden",
"slug": "gewinnen-von-kunden-1", "slug": "test-lehrgang-lp-topic-beraten-der-kunden",
"type": "learnpath.Topic", "type": "learnpath.Topic",
"translation_key": "4b2aa669-4cd9-43f1-9605-8575e5e7e760", "translation_key": "91918780-75f8-4db3-8fb8-91b63f08b9b9",
"is_visible": true "is_visible": true
}, },
{ {
"id": 418, "id": 380,
"title": "Unit-Test Circle", "title": "Analyse",
"slug": "unit-test-circle", "slug": "test-lehrgang-lp-circle-analyse",
"type": "learnpath.Circle", "type": "learnpath.Circle",
"translation_key": "8433f8fe-7074-4c8a-a93a-b62e042f06ca", "translation_key": "50f11be3-a56d-412d-be25-3d272fb5df40",
"children": [ "children": [
{ {
"id": 419, "id": 381,
"title": "Starten", "title": "Starten",
"slug": "starten", "slug": "test-lehrgang-lp-circle-analyse-ls-starten",
"type": "learnpath.LearningSequence", "type": "learnpath.LearningSequence",
"translation_key": "065ab931-122a-4e4d-a570-f8e6352a0550", "translation_key": "07ac0eb9-3671-4b62-8053-1d0c43a1f0fb",
"icon": "it-icon-ls-start" "icon": "it-icon-ls-start"
}, },
{ {
"id": 420, "id": 382,
"title": "Einleitung Circle \"Unit-Test Circle\"", "title": "Einleitung Circle \"Analyse\"",
"slug": "einleitung-circle-unit-test-circle", "slug": "test-lehrgang-lp-circle-analyse-lc-einleitung-circle-analyse",
"type": "learnpath.LearningContent", "type": "learnpath.LearningContent",
"translation_key": "ec97ed44-a2ee-46b4-b6ba-3cce4c6f627e", "translation_key": "00ed0ab2-fdb0-4ee6-a7d2-42a219b849a8",
"minutes": 15, "minutes": 15,
"contents": [ "contents": [
{ {
"type": "video", "type": "document",
"value": { "value": {
"description": "In dieser Circle zeigt dir ein Fachexperte anhand von Kundensituationen, wie du erfolgreichden Kundenbedarf ermitteln, analysieren, priorisieren und anschliessend zusammenfassen kannst.", "description": "Beispiel Dokument",
"url": "https://www.youtube.com/embed/qhPIfxS2hvI" "url": null
}, },
"id": "01ed1388-e82f-49a4-aafc-2d24891ec64a" "id": "892a9a4a-8e1e-4f7e-8c35-9bf3bbe5371b"
} }
] ]
}, },
{ {
"id": 421, "id": 383,
"title": "Beobachten", "title": "Beobachten",
"slug": "beobachten", "slug": "test-lehrgang-lp-circle-analyse-ls-beobachten",
"type": "learnpath.LearningSequence", "type": "learnpath.LearningSequence",
"translation_key": "8fed5f78-2d39-4a78-9dfc-f65551a81a7b", "translation_key": "4cb08bc2-d101-43cc-b006-8f2bbb1a0579",
"icon": "it-icon-ls-watch" "icon": "it-icon-ls-watch"
}, },
{ {
"id": 422, "id": 384,
"title": "Absicherung der Familie", "title": "Fahrzeug",
"slug": "absicherung-der-familie", "slug": "test-lehrgang-lp-circle-analyse-lu-fahrzeug",
"type": "learnpath.LearningUnit", "type": "learnpath.LearningUnit",
"translation_key": "fe50e509-b679-40f8-bddf-844c473e1e8a", "translation_key": "8f4afa40-c27e-48f7-a2d7-0e713479a55e",
"course_category": {
"id": 15,
"title": "Fahrzeug",
"general": false
},
"children": [ "children": [
{ {
"id": 423, "id": 397,
"title": "Ich bin in der Lage, mit geeigneten Fragestellungen die Deckung von Versicherungen zu erfassen.", "title": "Innerhalb des Handlungsfelds \u00abFahrzeug\u00bb bin ich f\u00e4hig, die Ziele und Pl\u00e4ne des Kunden zu ergr\u00fcnden (SOLL).",
"slug": "ich-bin-in-der-lage-mit-geeigneten-fragestellungen-die-deckung-von-versicherungen-zu-erfassen", "slug": "test-lehrgang-competence-crit-y13-fahrzeug",
"type": "learnpath.LearningUnitQuestion", "type": "competence.PerformanceCriteria",
"translation_key": "7a1631e9-56b2-48fd-b9ff-1eafba9f96da" "translation_key": "e9d49552-7d18-418a-94b6-ebb4ee6bf187",
"competence_id": "Y1.3"
}, },
{ {
"id": 424, "id": 398,
"title": "Zweite passende Frage zu 'Absicherung der Familie'", "title": "Innerhalb des Handlungsfelds \u00abFahrzeug\u00bb bin ich f\u00e4hig, die IST-Situation des Kunden mit der geeigneten Gespr\u00e4chs-/Fragetechnik zu erfassen.",
"slug": "zweite-passende-frage-zu-absicherung-der-familie", "slug": "test-lehrgang-competence-crit-y21-fahrzeug",
"type": "learnpath.LearningUnitQuestion", "type": "competence.PerformanceCriteria",
"translation_key": "f5aea045-f428-4b06-8b51-1857626250a8" "translation_key": "5f257b35-c6ca-49e4-9401-a5d02d53926d",
"competence_id": "Y2.1"
} }
] ]
}, },
{ {
"id": 425, "id": 385,
"title": "Ermittlung des Kundenbedarfs", "title": "Rafael Fasel wechselt sein Auto",
"slug": "ermittlung-des-kundenbedarfs-14", "slug": "test-lehrgang-lp-circle-analyse-lc-rafael-fasel-wechselt-sein-auto",
"type": "learnpath.LearningContent", "type": "learnpath.LearningContent",
"translation_key": "ffd613f5-830c-4bc0-860b-fc194e2d7d1c", "translation_key": "fda4f870-9307-414d-b07f-eea607a9afb7",
"minutes": 30, "minutes": 30,
"contents": [ "contents": [
{ {
"type": "podcast", "type": "online_training",
"value": { "value": {
"description": "Die Ermittlung des Kundenbedarfs muss in einem eingehenden Gespr\u00e4ch herausgefunden werden. H\u00f6re dazu auch diesen Podcast an.", "description": "In diesem Online-Training lernst du, wie du den Kundenbedarf ermittelst.",
"url": "https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/325190984&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=true" "url": ""
}, },
"id": "642c0906-3bd3-4030-be3f-8b1acce08930" "id": "700a0f64-0892-4fa5-9e08-3bd34e99edeb"
} }
] ]
}, },
{ {
"id": 426, "id": 386,
"title": "Kundenbed\u00fcrfnisse erkennen", "title": "Fachcheck Fahrzeug",
"slug": "kundenbed\u00fcrfnisse-erkennen-7", "slug": "test-lehrgang-lp-circle-analyse-lc-fachcheck-fahrzeug",
"type": "learnpath.LearningContent", "type": "learnpath.LearningContent",
"translation_key": "b36bd615-053c-4054-a5be-080005140a98", "translation_key": "dce0847f-4593-4bba-bd0c-a09c71eb0344",
"minutes": 30, "minutes": 30,
"contents": [ "contents": [
{ {
"type": "competence", "type": "test",
"value": { "value": {
"description": "Beispiel Kompetenz" "description": "Beispiel Test",
"url": null
}, },
"id": "6b85361b-cc27-4454-aa20-72b31ad92a3f" "id": "9f674aaa-ebf0-4a01-adcc-c0c46394fb10"
} }
] ]
}, },
{ {
"id": 427, "id": 387,
"title": "Was braucht eine Familie?", "title": "Reisen",
"slug": "was-braucht-eine-familie-7", "slug": "test-lehrgang-lp-circle-analyse-lu-reisen",
"type": "learnpath.LearningUnit",
"translation_key": "c3f6d33f-8dbc-4d88-9a81-3c602c4f9cc8",
"course_category": {
"id": 16,
"title": "Reisen",
"general": false
},
"children": [
{
"id": 399,
"title": "Innerhalb des Handlungsfelds \u00abReisen\u00bb bin ich f\u00e4hig, die Ziele und Pl\u00e4ne des Kunden zu ergr\u00fcnden (SOLL).",
"slug": "test-lehrgang-competence-crit-y13-reisen",
"type": "competence.PerformanceCriteria",
"translation_key": "1e488b69-8a3e-4acc-9547-48c103e0d038",
"competence_id": "Y1.3"
}
]
},
{
"id": 388,
"title": "Reiseversicherung",
"slug": "test-lehrgang-lp-circle-analyse-lc-reiseversicherung",
"type": "learnpath.LearningContent", "type": "learnpath.LearningContent",
"translation_key": "b4d2ec6c-12b3-48bc-b159-f5b9e06637cf", "translation_key": "ff513aae-efe1-4974-b67f-7a292b8aef86",
"minutes": 60, "minutes": 240,
"contents": [ "contents": [
{ {
"type": "exercise", "type": "exercise",
"value": { "value": {
"description": "Beispiel Aufgabe", "description": "Beispiel \u00dcbung",
"url": "/static/media/web_based_trainings/story-01-a-01-patrizia-marco-sichern-sich-ab-einstieg/scormcontent/index.html" "url": null
}, },
"id": "b7e661b1-9e39-4482-8b23-c24dad1ef648" "id": "f35f213e-1a33-49fe-97c5-26e15161719f"
} }
] ]
}, },
{ {
"id": 428, "id": 389,
"title": "Reisen", "title": "Emma und Ayla campen durch Amerika",
"slug": "reisen", "slug": "test-lehrgang-lp-circle-analyse-lc-emma-und-ayla-campen-durch-amerika",
"type": "learnpath.LearningUnit",
"translation_key": "07a52671-a50e-46fc-b685-947aadb3e4d4",
"children": [
{
"id": 429,
"title": "Passende Frage zu \"Reisen\"",
"slug": "passende-frage-zu-reisen",
"type": "learnpath.LearningUnitQuestion",
"translation_key": "00491fd6-f1f5-4a52-b13d-0197bc875296"
}
]
},
{
"id": 430,
"title": "Reiseversicherung",
"slug": "reiseversicherung-7",
"type": "learnpath.LearningContent", "type": "learnpath.LearningContent",
"translation_key": "08dacac1-1853-4e07-8a6d-b7e2ee610398", "translation_key": "a77b0f9d-9a70-47bd-8e62-7580d70a4306",
"minutes": 240,
"contents": [
{
"type": "competence",
"value": {
"description": "Beispiel Kompetenz"
},
"id": "6532e206-8737-45d9-9c2a-3ad44c372449"
}
]
},
{
"id": 431,
"title": "Sorgenfrei reisen",
"slug": "sorgenfrei-reisen-7",
"type": "learnpath.LearningContent",
"translation_key": "d8e9ec02-cae6-4494-91e0-707591456afb",
"minutes": 120, "minutes": 120,
"contents": [ "contents": [
{ {
"type": "exercise", "type": "exercise",
"value": { "value": {
"description": "Beispiel Aufgabe", "description": "Beispiel \u00dcbung",
"url": "/static/media/web_based_trainings/story-06-a-01-emma-und-ayla-campen-durch-amerika-einstieg/scormcontent/index.html" "url": "/static/media/web_based_trainings/story-06-a-01-emma-und-ayla-campen-durch-amerika-einstieg/scormcontent/index.html"
}, },
"id": "87333833-ad07-4c86-a846-46232668e8e1" "id": "60f087ff-fa3a-4da2-820f-4fcdf449f70d"
} }
] ]
}, },
{ {
"id": 432, "id": 390,
"title": "Beenden", "title": "Beenden",
"slug": "beenden", "slug": "test-lehrgang-lp-circle-analyse-ls-beenden",
"type": "learnpath.LearningSequence", "type": "learnpath.LearningSequence",
"translation_key": "a3ee459e-ab98-483f-95c9-ba85eb10c105", "translation_key": "06f1e998-b827-41cc-8129-d72d731719c1",
"icon": "it-icon-ls-end" "icon": "it-icon-ls-end"
}, },
{ {
"id": 433, "id": 391,
"title": "Kompetenzprofil anschauen", "title": "Kompetenzprofil anschauen",
"slug": "kompetenzprofil-anschauen-9", "slug": "test-lehrgang-lp-circle-analyse-lc-kompetenzprofil-anschauen",
"type": "learnpath.LearningContent", "type": "learnpath.LearningContent",
"translation_key": "0e16dd46-14cf-43ac-888f-f03beded7fa1", "translation_key": "6cc47dc1-a74f-4cbf-afa6-23885891c82f",
"minutes": 30, "minutes": 30,
"contents": [ "contents": [
{ {
"type": "document", "type": "document",
"value": { "value": {
"description": "Beispiel Kompetenz" "description": "Beispiel Dokument",
"url": null
}, },
"id": "4b729c72-aee8-4944-b5fb-d0bfd317a339" "id": "3f685055-4e3e-4ca9-93af-bac19236931d"
} }
] ]
}, },
{ {
"id": 434, "id": 392,
"title": "Circle \"Analyse\" abschliessen", "title": "Circle \"Analyse\" abschliessen",
"slug": "circle-analyse-abschliessen-9", "slug": "test-lehrgang-lp-circle-analyse-lc-circle-analyse-abschliessen",
"type": "learnpath.LearningContent", "type": "learnpath.LearningContent",
"translation_key": "53703784-c71f-4bad-a3e7-e014f0fded12", "translation_key": "9b32e2cd-1368-4885-a79b-906b45ba04bc",
"minutes": 30, "minutes": 30,
"contents": [ "contents": [
{ {
"type": "document", "type": "document",
"value": { "value": {
"description": "Beispiel Kompetenz" "description": "Beispiel Dokument",
"url": null
}, },
"id": "8bc53dfd-bb9b-4ae5-bd3c-74b7eef0eafd" "id": "650b7b15-b522-4df7-ac5b-6a654f12334f"
} }
] ]
} }
@ -317,25 +300,25 @@
"job_situations": [ "job_situations": [
{ {
"type": "job_situation", "type": "job_situation",
"value": "Absicherung der Familie", "value": "Autoversicherung",
"id": "f715a46f-53df-4205-8257-30cff62f337c" "id": "c5a6b365-0a18-47d5-b6e1-6cb8b8ec7d35"
}, },
{ {
"type": "job_situation", "type": "job_situation",
"value": "Reisen", "value": "Autokauf",
"id": "f2174789-eab4-4059-961d-699b3c333110" "id": "e969d2a2-b383-482c-a721-88552af086a6"
} }
], ],
"goals": [ "goals": [
{ {
"type": "goal", "type": "goal",
"value": "... die heutige Versicherungssituation von Privat- oder Gesch\u00e4ftskunden einzusch\u00e4tzen.", "value": "... die heutige Versicherungssituation von Privat- oder Gesch\u00e4ftskunden einzusch\u00e4tzen.",
"id": "41acaebc-38de-4929-a4af-aaed43a1e5f3" "id": "d9ad8aed-d7d6-42c7-b6d4-65102c8ddf10"
}, },
{ {
"type": "goal", "type": "goal",
"value": "... deinem Kunden seine optimale L\u00f6sung aufzuzeigen", "value": "... deinem Kunden seine optimale L\u00f6sung aufzuzeigen",
"id": "cb1d556b-dac1-4edc-a3e5-97307b49c55c" "id": "2506950c-45cb-474f-acb9-45e83e9ebe1b"
} }
], ],
"experts": [ "experts": [
@ -348,9 +331,14 @@
"photo": null, "photo": null,
"biography": "" "biography": ""
}, },
"id": "479878e7-2d30-46a4-8d6b-bfe77268bbae" "id": "b7b0ff2e-f840-4d74-99c1-c7a5ee6dc14e"
} }
] ]
} }
] ],
} "course": {
"id": -1,
"title": "Test Lerngang",
"category_name": "Handlungsfeld"
}
}

View File

@ -16,7 +16,7 @@ def main():
) )
response = client.get( response = client.get(
'http://localhost:8000/api/course/page/unit-test-lernpfad/', 'http://localhost:8000/api/course/page/test-lehrgang-lp/',
) )
print(response.status_code) print(response.status_code)
print(response.json()) print(response.json())

View File

@ -1,6 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import HandlungsfeldLayout from "@/views/HandlungsfeldLayout.vue"; import HandlungsfeldLayout from '@/views/HandlungsfeldLayout.vue'
import MediaLink from "@/components/mediacenter/MediaLink.vue"; import MediaLink from '@/components/mediacenter/MediaLink.vue'
const data = { const data = {
title: 'Fahrzeug: Lernmedien', title: 'Fahrzeug: Lernmedien',
@ -11,7 +11,7 @@ const data = {
iconUrl: '/static/icons/demo/icon-hf-book.png', iconUrl: '/static/icons/demo/icon-hf-book.png',
linkText: 'PDF anzeigen', linkText: 'PDF anzeigen',
link: '/static/media/documents/01a_Motorfahrzeughaftpflicht.pdf', link: '/static/media/documents/01a_Motorfahrzeughaftpflicht.pdf',
openWindow: true openWindow: true,
}, },
{ {
title: 'Die Motorfahrzeughaftpflicht', title: 'Die Motorfahrzeughaftpflicht',
@ -19,7 +19,7 @@ const data = {
description: 'Buch «Sach- und Vermögensversicherungen» Kapitel 16', description: 'Buch «Sach- und Vermögensversicherungen» Kapitel 16',
linkText: 'PDF anzeigen', linkText: 'PDF anzeigen',
link: '/static/media/documents/01a_Motorfahrzeughaftpflicht.pdf', link: '/static/media/documents/01a_Motorfahrzeughaftpflicht.pdf',
openWindow: true openWindow: true,
}, },
{ {
title: 'Die Motorfahrzeughaftpflicht', title: 'Die Motorfahrzeughaftpflicht',
@ -27,7 +27,7 @@ const data = {
description: 'Buch «Sach- und Vermögensversicherungen» Kapitel 16', description: 'Buch «Sach- und Vermögensversicherungen» Kapitel 16',
linkText: 'PDF anzeigen', linkText: 'PDF anzeigen',
link: '/static/media/documents/01a_Motorfahrzeughaftpflicht.pdf', link: '/static/media/documents/01a_Motorfahrzeughaftpflicht.pdf',
openWindow: true openWindow: true,
}, },
{ {
title: 'Die Motorfahrzeughaftpflicht', title: 'Die Motorfahrzeughaftpflicht',
@ -35,7 +35,7 @@ const data = {
description: 'Buch «Sach- und Vermögensversicherungen» Kapitel 16', description: 'Buch «Sach- und Vermögensversicherungen» Kapitel 16',
linkText: 'PDF anzeigen', linkText: 'PDF anzeigen',
link: '/static/media/documents/01a_Motorfahrzeughaftpflicht.pdf', link: '/static/media/documents/01a_Motorfahrzeughaftpflicht.pdf',
openWindow: true openWindow: true,
}, },
{ {
title: 'Die Motorfahrzeughaftpflicht', title: 'Die Motorfahrzeughaftpflicht',
@ -43,45 +43,33 @@ const data = {
description: 'Buch «Sach- und Vermögensversicherungen» Kapitel 16', description: 'Buch «Sach- und Vermögensversicherungen» Kapitel 16',
linkText: 'PDF anzeigen', linkText: 'PDF anzeigen',
link: '/static/media/documents/01a_Motorfahrzeughaftpflicht.pdf', link: '/static/media/documents/01a_Motorfahrzeughaftpflicht.pdf',
openWindow: true openWindow: true,
}, },
] ],
} }
</script> </script>
<template> <template>
<Teleport to="body"> <Teleport to="body">
<HandlungsfeldLayout> <HandlungsfeldLayout>
<template #header> <template #header>
<h1 class="mb-4">{{data.title}}</h1> <h1 class="mb-4">{{ data.title }}</h1>
</template> </template>
<template #body> <template #body>
<section class="mb-20"> <section class="mb-20">
<ul class="border-t"> <ul class="border-t">
<li <li v-for="item in data.items" :key="item.link" class="flex items-center justify-between border-b py-4">
v-for="item in data.items"
:key="item.link"
class="flex items-center justify-between border-b py-4">
<div class="flex items-center justify-between"> <div class="flex items-center justify-between">
<div v-if="item.iconUrl"> <div v-if="item.iconUrl">
<img <img class="mr-6 max-h-[70px]" :src="item.iconUrl" />
class="mr-6 max-h-[70px]"
:src="item.iconUrl" />
</div> </div>
<div> <div>
<h4 class="text-bold">{{item.title}}</h4> <h4 class="text-bold">{{ item.title }}</h4>
<p <p v-if="item.description" class="mb-2">{{ item.description }}</p>
v-if="item.description"
class="mb-2">{{item.description}}</p>
</div> </div>
</div> </div>
<div class=""> <div class="">
<media-link <media-link :to="item.link" :blank="item.openWindow" class="link">{{ item.linkText }}</media-link>
:to="item.link"
:blank="item.openWindow"
class="link">{{item.linkText}}</media-link>
</div> </div>
</li> </li>
</ul> </ul>
@ -93,7 +81,7 @@ const data = {
<style scoped> <style scoped>
.it-icon-hf { .it-icon-hf {
color: blue color: blue;
} }
.it-icon-hf > * { .it-icon-hf > * {
@apply m-auto; @apply m-auto;