Skip to content

Commit c35e78b

Browse files
author
Dominik Grenz
committed
Run lint 🚨
1 parent 6aaaeb1 commit c35e78b

File tree

4 files changed

+62
-55
lines changed

4 files changed

+62
-55
lines changed

personalization-webcomponents/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

personalization-webcomponents/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"private": true,
66
"license": "MIT",
77
"engines": {
8-
"node": ">=22.2 <23"
8+
"node": ">=22.14 <=22"
99
},
1010
"scripts": {
1111
"dev": "vite",

personalization-webcomponents/src/checklist-detail.ce.vue

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5,52 +5,54 @@
55
<!-- eslint-disable-next-line vue/no-v-html -->
66
<div v-html="customIconsSprite" />
77

8-
<div v-if="loading">
9-
<skeleton-loader/>
10-
</div>
11-
<div v-else>
12-
<checklist-header v-if="checklist"
13-
:checklist="checklist"
14-
>
15-
</checklist-header>
16-
</div>
8+
<div v-if="loading">
9+
<skeleton-loader />
10+
</div>
11+
<div v-else>
12+
<checklist-header
13+
v-if="checklist"
14+
:checklist="checklist"
15+
>
16+
</checklist-header>
17+
</div>
1718
</div>
1819
</template>
1920

2021
<script setup lang="ts">
22+
import type DummyChecklist from "@/api/dummyservice/DummyChecklist.ts";
23+
2124
import customIconsSprite from "@muenchen/muc-patternlab-vue/assets/icons/custom-icons.svg?raw";
2225
import mucIconsSprite from "@muenchen/muc-patternlab-vue/assets/icons/muc-icons.svg?raw";
23-
import {onMounted, ref} from "vue";
26+
import { onMounted, ref } from "vue";
2427
25-
26-
import ChecklistHeader from "@/components/ChecklistHeader.vue";
27-
import type DummyChecklist from "@/api/dummyservice/DummyChecklist.ts";
2828
import DummyChecklistService from "@/api/dummyservice/DummyChecklistService.ts";
29+
import ChecklistHeader from "@/components/ChecklistHeader.vue";
2930
import SkeletonLoader from "@/components/common/skeleton-loader.vue";
30-
import {QUERY_PARAM_CHECKLIST_ID} from "@/util/constants.ts";
31+
import { QUERY_PARAM_CHECKLIST_ID } from "@/util/constants.ts";
3132
32-
const checklist = ref<DummyChecklist >();
33+
const checklist = ref<DummyChecklist>();
3334
const loading = ref(true);
3435
35-
3636
onMounted(() => {
3737
loading.value = true;
3838
const dcl = new DummyChecklistService();
39-
dcl.getChecklists()
40-
.then((checklists) => {
41-
const urlParams = new URLSearchParams(window.location.search)
42-
const checklistId = urlParams.get(QUERY_PARAM_CHECKLIST_ID)
43-
const foundChecklist = checklists.find(checklist => checklist.id === checklistId)
44-
45-
if (foundChecklist) {
46-
checklist.value = foundChecklist;
47-
} else {
48-
throw new Error("Checkliste wurde nicht gefunden")
49-
}
50-
})
51-
.finally(() => (loading.value = false));
39+
dcl
40+
.getChecklists()
41+
.then((checklists) => {
42+
const urlParams = new URLSearchParams(window.location.search);
43+
const checklistId = urlParams.get(QUERY_PARAM_CHECKLIST_ID);
44+
const foundChecklist = checklists.find(
45+
(checklist) => checklist.id === checklistId
46+
);
47+
48+
if (foundChecklist) {
49+
checklist.value = foundChecklist;
50+
} else {
51+
throw new Error("Checkliste wurde nicht gefunden");
52+
}
53+
})
54+
.finally(() => (loading.value = false));
5255
});
53-
5456
</script>
5557

5658
<style>
Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,39 @@
11
<template>
2-
<muc-intro tagline="Checkliste" :title="checklist.title" :img="getChecklistIconByTitle(checklist.title)" :imgAlt="checklist.title">
2+
<muc-intro
3+
tagline="Checkliste"
4+
:title="checklist.title"
5+
:img="getChecklistIconByTitle(checklist.title)"
6+
:imgAlt="checklist.title"
7+
>
38
<p style="padding-bottom: 18px">
4-
<b>Erstellungsdatum: </b>{{ props.checklist.lastUpdated.toLocaleString() }}
9+
<b>Erstellungsdatum: </b
10+
>{{ props.checklist.lastUpdated.toLocaleString() }}
511
</p>
612
<p>
713
<b>Aufgaben: </b>
814
<muc-chip
9-
v-if="todoCount"
10-
style="margin-right: 16px"
11-
background-color="#FDD1AC"
15+
v-if="todoCount"
16+
style="margin-right: 16px"
17+
background-color="#FDD1AC"
1218
>
1319
{{ todoCount }} offen
1420
<svg
15-
style="margin-left: 8px; width: 20px; height: 20px"
16-
aria-hidden="true"
17-
class="m-button__icon"
21+
style="margin-left: 8px; width: 20px; height: 20px"
22+
aria-hidden="true"
23+
class="m-button__icon"
1824
>
19-
<use href="#icon-pencil"/>
25+
<use href="#icon-pencil" />
2026
</svg>
2127
</muc-chip>
2228
<muc-chip
23-
v-if="doneCount"
24-
background-color="#B7D2B7"
29+
v-if="doneCount"
30+
background-color="#B7D2B7"
2531
>
2632
{{ doneCount }} erledigt
2733
<svg
28-
style="margin-left: 8px; width: 20px; height: 20px"
29-
aria-hidden="true"
30-
class="m-button__icon"
34+
style="margin-left: 8px; width: 20px; height: 20px"
35+
aria-hidden="true"
36+
class="m-button__icon"
3137
>
3238
<use href="#icon-check" />
3339
</svg>
@@ -37,24 +43,23 @@
3743
</template>
3844

3945
<script setup lang="ts">
40-
4146
import type DummyChecklist from "@/api/dummyservice/DummyChecklist.ts";
42-
import {computed} from "vue";
43-
import MucChip from "@/components/common/muc-chip.vue";
44-
import {getChecklistIconByTitle} from "@/util/constants.ts";
45-
import {MucIntro} from "@muenchen/muc-patternlab-vue";
4647
48+
import { MucIntro } from "@muenchen/muc-patternlab-vue";
49+
import { computed } from "vue";
50+
51+
import MucChip from "@/components/common/muc-chip.vue";
52+
import { getChecklistIconByTitle } from "@/util/constants.ts";
4753
4854
const props = defineProps<{
49-
checklist: DummyChecklist
55+
checklist: DummyChecklist;
5056
}>();
5157
5258
const todoCount = computed(() => {
53-
return props.checklist.items.filter(value => !value.checked).length;
59+
return props.checklist.items.filter((value) => !value.checked).length;
5460
});
5561
5662
const doneCount = computed(() => {
5763
return props.checklist.items.filter((value) => value.checked).length;
5864
});
59-
60-
</script>
65+
</script>

0 commit comments

Comments
 (0)