File tree Expand file tree Collapse file tree 6 files changed +23
-6
lines changed
personalization-webcomponents Expand file tree Collapse file tree 6 files changed +23
-6
lines changed Original file line number Diff line number Diff line change 36
36
</ strong >
37
37
</ noscript >
38
38
< div >
39
- < my-checklists first-name ="Fabi " />
39
+ < my-checklists
40
+ checklist-detail-url ="./index-checklist-detail.html "
41
+ > </ my-checklists >
40
42
</ div >
41
43
</ body >
42
44
</ html >
Original file line number Diff line number Diff line change 1
1
import type DummyChecklistItem from "@/api/dummyservice/DummyChecklistItem.ts" ;
2
2
3
3
export default interface DummyChecklist {
4
- title : string ;
5
- lhmExtId : string ;
6
- items : DummyChecklistItem [ ] ;
7
- lastUpdated : Date ;
4
+ id : string ;
5
+ title : string ;
6
+ lhmExtId : string ;
7
+ items : DummyChecklistItem [ ] ;
8
+ lastUpdated : Date ;
8
9
}
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import type DummyChecklist from "@/api/dummyservice/DummyChecklist.ts";
3
3
export default class DummyChecklistService {
4
4
dummyResponse : DummyChecklist [ ] = [
5
5
{
6
+ id : "1111" ,
6
7
title : "Ich habe wenig Geld." ,
7
8
lhmExtId : "111" ,
8
9
lastUpdated : new Date ( ) ,
@@ -45,6 +46,7 @@ export default class DummyChecklistService {
45
46
] ,
46
47
} ,
47
48
{
49
+ id : "2222" ,
48
50
title : "Ich will umziehen." ,
49
51
lhmExtId : "111" ,
50
52
lastUpdated : new Date ( ) ,
@@ -122,6 +124,7 @@ export default class DummyChecklistService {
122
124
] ,
123
125
} ,
124
126
{
127
+ id : "3333" ,
125
128
title : "Ich manage eine Familie." ,
126
129
lhmExtId : "111" ,
127
130
lastUpdated : new Date ( ) ,
Original file line number Diff line number Diff line change 2
2
<muc-card
3
3
:title =" checklist.title"
4
4
tagline =" Checkliste"
5
+ @click =" gotoChecklist(checklist.id!)"
5
6
>
6
7
<template #headerPrefix >
7
8
<div class =" card-header-icon" >
@@ -72,10 +73,11 @@ import { computed } from "vue";
72
73
73
74
import ChecklistitemListitem from " @/components/checklistitem-listitem.vue" ;
74
75
import MucChip from " @/components/common/muc-chip.vue" ;
75
- import { getChecklistIconByTitle } from " @/util/constants.ts" ;
76
+ import {getChecklistIconByTitle , QUERY_PARAM_CHECKLIST_ID } from " @/util/constants.ts" ;
76
77
77
78
const props = defineProps <{
78
79
checklist: DummyChecklist ;
80
+ checklistDetailUrl: string ;
79
81
}>();
80
82
81
83
const todoCount = computed (() => {
@@ -92,6 +94,11 @@ const firstThreeItemsSortedByChecked = computed(() => {
92
94
);
93
95
return sortedItems .slice (0 , 3 );
94
96
});
97
+
98
+
99
+ function gotoChecklist(checklistId : string ) {
100
+ location .href = ` ${props .checklistDetailUrl }?${QUERY_PARAM_CHECKLIST_ID }=${checklistId } ` ;
101
+ }
95
102
</script >
96
103
97
104
<style scoped>
Original file line number Diff line number Diff line change 27
27
>
28
28
</checklist-card >
29
29
</div >
30
+ :checklist-detail-url="checklistDetailUrl"
31
+ >
30
32
</muc-card-container >
31
33
</main >
32
34
</template >
Original file line number Diff line number Diff line change 1
1
export const FIRSTNAME_DEFAULT = "World" ;
2
2
3
+ export const QUERY_PARAM_CHECKLIST_ID = "cl-id" ;
4
+
3
5
export function getChecklistIconByTitle ( checklistTitle : string ) {
4
6
return {
5
7
"Ich habe wenig Geld." : "./assets/img/placeholder_checklist_icon.png" ,
You can’t perform that action at this time.
0 commit comments