Skip to content

Commit bfb8b62

Browse files
committed
💄 add placeholder icon for checklists
1 parent 4f91b3d commit bfb8b62

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed
2.43 KB
Loading

personalization-webcomponents/src/components/ChecklistCard.vue

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@
55
>
66
<template #headerPrefix>
77
<div
8-
style="padding-right: 16px; font-size: 32px;"
8+
class="card-header-icon"
99
>
10-
<img src="https://assets.muenchen.de/mde/1.0.10/assets/svg/pictograms/pictogram-cash.svg" alt="cash-icon"></img>
10+
<img
11+
width="56px"
12+
height="56px"
13+
:src="getChecklistIconByTitle(checklist.title)"
14+
alt="checklist-icon"
15+
></img>
1116
</div>
1217
</template>
1318
<template #content>
@@ -70,6 +75,7 @@ import type DummyChecklist from "@/api/dummyservice/DummyChecklist.ts";
7075
import MucChip from "@/components/common/muc-chip.vue";
7176
import {computed} from "vue";
7277
import ChecklistitemListitem from "@/components/checklistitem-listitem.vue";
78+
import {CHECKLIST_TITLE_TO_ICON_MAP, getChecklistIconByTitle} from "@/util/constants.ts";
7379
7480
const props = defineProps<{
7581
checklist: DummyChecklist;
@@ -90,10 +96,17 @@ const firstThreeItemsSortedByChecked = computed(() => {
9096
9197
</script>
9298

93-
<style>
99+
<style scoped>
100+
.card-header-icon {
101+
margin-right: 16px;
102+
border: 1px solid var(--color-neutrals-blue);
103+
border-radius: 56px;
104+
}
105+
94106
.pt-8 {
95107
padding-top: 8px;
96108
}
109+
97110
.pb-8 {
98111
padding-bottom: 8px;
99112
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
11
export const FIRSTNAME_DEFAULT = "World";
2+
3+
export function getChecklistIconByTitle(checklistTitle: string) {
4+
return {
5+
"Ich habe wenig Geld.": "./assets/img/placeholder_checklist_icon.png",
6+
"Ich will umziehen.": "./assets/img/placeholder_checklist_icon.png",
7+
"Ich manage eine Familie.": "./assets/img/placeholder_checklist_icon.png"
8+
}[checklistTitle];
9+
}

0 commit comments

Comments
 (0)