Skip to content

Commit fc513a7

Browse files
authored
Merge pull request #109 from it-at-m/MUXDBS-101-adjustments
Muxdbs 101 adjustments
2 parents 5829aa1 + 6dae07d commit fc513a7

File tree

1 file changed

+74
-32
lines changed

1 file changed

+74
-32
lines changed

personalization-webcomponents/src/components/ChecklistHeader.vue

Lines changed: 74 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,50 +3,55 @@
33
tagline="Checkliste"
44
:title="checklist.title"
55
:img="getChecklistIconByTitle(checklist.title)"
6-
:imgAlt="checklist.title"
6+
imgAlt=""
77
>
8-
<p style="padding-bottom: 18px">
8+
<p style="padding-bottom: 16px">
99
<b>Erstellungsdatum: </b
10-
>{{ props.checklist.lastUpdated.toLocaleString() }}
10+
>{{ props.checklist.lastUpdated.toLocaleString().split(",")[0] }}
1111
</p>
12-
<p>
13-
<b>Aufgaben: </b>
14-
<muc-chip
15-
v-if="todoCount"
16-
style="margin-right: 16px"
17-
background-color="#FDD1AC"
18-
>
19-
{{ todoCount }} offen
20-
<svg
21-
style="margin-left: 8px; width: 20px; height: 20px"
22-
aria-hidden="true"
23-
class="m-button__icon"
12+
<div class="taskcontainer">
13+
<div class="task">Aufgaben:</div>
14+
<div class="chip">
15+
<muc-chip
16+
v-if="todoCount"
17+
style="margin-right: 8px"
18+
background-color="#FDD1AC"
2419
>
25-
<use href="#icon-pencil" />
26-
</svg>
27-
</muc-chip>
28-
<muc-chip
29-
v-if="doneCount"
30-
background-color="#B7D2B7"
31-
>
32-
{{ doneCount }} erledigt
33-
<svg
34-
style="margin-left: 8px; width: 20px; height: 20px"
35-
aria-hidden="true"
36-
class="m-button__icon"
20+
{{ todoCount }} offen
21+
<svg
22+
style="margin-left: 8px; width: 20px; height: 20px"
23+
aria-hidden="true"
24+
class="m-button__icon"
25+
>
26+
<use href="#icon-pencil" />
27+
</svg>
28+
</muc-chip>
29+
</div>
30+
31+
<div class="chip">
32+
<muc-chip
33+
v-if="doneCount"
34+
background-color="#B7D2B7"
3735
>
38-
<use href="#icon-check" />
39-
</svg>
40-
</muc-chip>
41-
</p>
36+
{{ doneCount }} erledigt
37+
<svg
38+
style="margin-left: 8px; width: 20px; height: 20px"
39+
aria-hidden="true"
40+
class="m-button__icon"
41+
>
42+
<use href="#icon-check" />
43+
</svg>
44+
</muc-chip>
45+
</div>
46+
</div>
4247
</muc-intro>
4348
</template>
4449

4550
<script setup lang="ts">
4651
import type DummyChecklist from "@/api/dummyservice/DummyChecklist.ts";
4752
4853
import { MucIntro } from "@muenchen/muc-patternlab-vue";
49-
import { computed } from "vue";
54+
import { computed, onMounted } from "vue";
5055
5156
import MucChip from "@/components/common/muc-chip.vue";
5257
import { getChecklistIconByTitle } from "@/util/constants.ts";
@@ -55,6 +60,15 @@ const props = defineProps<{
5560
checklist: DummyChecklist;
5661
}>();
5762
63+
onMounted(() => {
64+
const element = document.querySelector(
65+
'[data-fragment-placeholder="breadcrumb-label"]'
66+
);
67+
if (element) {
68+
element.innerHTML = props.checklist.title;
69+
}
70+
});
71+
5872
const todoCount = computed(() => {
5973
return props.checklist.items.filter((value) => !value.checked).length;
6074
});
@@ -63,3 +77,31 @@ const doneCount = computed(() => {
6377
return props.checklist.items.filter((value) => value.checked).length;
6478
});
6579
</script>
80+
<style>
81+
.muc-divider {
82+
margin-top: 0 !important;
83+
margin-bottom: 32px !important;
84+
}
85+
86+
.m-intro-vertical__title {
87+
margin-bottom: 8px !important;
88+
}
89+
90+
.taskcontainer {
91+
display: grid;
92+
grid-template-columns: 90px 100px 100px;
93+
gap: 8px;
94+
}
95+
96+
.task {
97+
padding-top: 3px;
98+
text-align: left;
99+
font-weight: bold;
100+
}
101+
102+
@media (max-width: 450px) {
103+
.chip:nth-child(3) {
104+
grid-column: 2;
105+
}
106+
}
107+
</style>

0 commit comments

Comments
 (0)