Skip to content

Commit 5976342

Browse files
authored
Merge pull request #111 from it-at-m/MUXDBS-101-adjustments
Remove checklist breadcrumb
2 parents fc543a1 + d84e18d commit 5976342

File tree

1 file changed

+61
-46
lines changed

1 file changed

+61
-46
lines changed

personalization-webcomponents/src/components/ChecklistHeader.vue

Lines changed: 61 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -5,45 +5,45 @@
55
:img="getChecklistIconByTitle(checklist.title)"
66
imgAlt=""
77
>
8-
<p style="padding-bottom: 16px">
8+
<div style="padding-bottom: 16px; padding-left: 3px">
99
<b>Erstellungsdatum: </b
1010
>{{ props.checklist.lastUpdated.toLocaleString().split(",")[0] }}
11-
</p>
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"
19-
>
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"
35-
>
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>
4611
</div>
12+
<table>
13+
<tr>
14+
<td class="task">Aufgaben:</td>
15+
<td>
16+
<div class="chips-container">
17+
<muc-chip
18+
v-if="todoCount"
19+
background-color="#FDD1AC"
20+
>
21+
{{ todoCount }} offen
22+
<svg
23+
style="margin-left: 8px; width: 20px; height: 20px"
24+
aria-hidden="true"
25+
class="m-button__icon"
26+
>
27+
<use href="#icon-pencil" />
28+
</svg>
29+
</muc-chip>
30+
<muc-chip
31+
v-if="doneCount"
32+
background-color="#B7D2B7"
33+
>
34+
{{ doneCount }} erledigt
35+
<svg
36+
style="margin-left: 8px; width: 20px; height: 20px"
37+
aria-hidden="true"
38+
class="m-button__icon"
39+
>
40+
<use href="#icon-check" />
41+
</svg>
42+
</muc-chip>
43+
</div>
44+
</td>
45+
</tr>
46+
</table>
4747
</muc-intro>
4848
</template>
4949

@@ -67,6 +67,18 @@ onMounted(() => {
6767
if (element) {
6868
element.innerHTML = props.checklist.title;
6969
}
70+
71+
// Don't show breadcrump "Checkliste"
72+
const removeChecklist = document.querySelector(
73+
".m-breadcrumb__list-item-current"
74+
);
75+
if (removeChecklist) {
76+
removeChecklist.childNodes.forEach((node) => {
77+
if (node.nodeType === 3) {
78+
node.textContent = "";
79+
}
80+
});
81+
}
7082
});
7183
7284
const todoCount = computed(() => {
@@ -87,21 +99,24 @@ const doneCount = computed(() => {
8799
margin-bottom: 8px !important;
88100
}
89101
90-
.taskcontainer {
91-
display: grid;
92-
grid-template-columns: 90px 100px 100px;
93-
gap: 8px;
94-
}
95-
96102
.task {
97-
padding-top: 3px;
98-
text-align: left;
99103
font-weight: bold;
104+
vertical-align: baseline;
105+
padding-right: 8px;
106+
white-space: nowrap;
107+
}
108+
109+
.chips-container {
110+
display: flex;
111+
gap: 8px;
112+
flex-wrap: nowrap;
100113
}
101114
102115
@media (max-width: 450px) {
103-
.chip:nth-child(3) {
104-
grid-column: 2;
116+
.chips-container {
117+
flex-wrap: wrap;
118+
flex-direction: column;
119+
gap: 8px;
105120
}
106121
}
107122
</style>

0 commit comments

Comments
 (0)