diff --git a/personalization-webcomponents/src/ChecklistDetail.ce.vue b/personalization-webcomponents/src/ChecklistDetail.ce.vue index 346cd261..971e8dd9 100644 --- a/personalization-webcomponents/src/ChecklistDetail.ce.vue +++ b/personalization-webcomponents/src/ChecklistDetail.ce.vue @@ -24,6 +24,7 @@ @@ -31,7 +32,8 @@ v-else class="banner" type="success" - >Herzlichen Glückwunsch, Sie haben alle Aufgaben erledigt! Wir + > + Herzlichen Glückwunsch, Sie haben alle Aufgaben erledigt! Wir bewahren diese Checkliste noch bis zum {{ deletionDate }} für Sie auf. Danach wird sie automatisch gelöscht. @@ -40,6 +42,7 @@ Sie haben noch keine erledigten Aufgaben. Haken Sie Aufgaben in + > + Sie haben noch keine erledigten Aufgaben. Haken Sie Aufgaben in der Checkliste ab, um sie als erledigt zu markieren. @@ -78,6 +82,8 @@ import { QUERY_PARAM_CHECKLIST_ID, setAccessToken } from "@/util/Constants.ts"; const checklist = ref(null); const loading = ref(true); +const loadingSort = ref(false); +const loadingCheck = ref(false); const { loggedIn } = useDBSLoginWebcomponentPlugin(_authChangedCallback); @@ -152,7 +158,7 @@ const deletionDate = computed(() => { function onCheckedOpen(serviceID: string) { if (checklist.value) { - loading.value = true; + loadingCheck.value = true; const service = new ChecklistService(); service .checkChecklistentry(checklist.value.id, serviceID) @@ -170,13 +176,13 @@ function onCheckedOpen(serviceID: string) { .catch((err) => { console.debug(err); }) - .finally(() => (loading.value = false)); + .finally(() => (loadingCheck.value = false)); } } function onCheckedClosed(serviceID: string) { if (checklist.value) { - loading.value = true; + loadingCheck.value = true; const service = new ChecklistService(); service .uncheckChecklistentry(checklist.value.id, serviceID) @@ -194,7 +200,7 @@ function onCheckedClosed(serviceID: string) { .catch((err) => { console.debug(err); }) - .finally(() => (loading.value = false)); + .finally(() => (loadingCheck.value = false)); } } @@ -211,7 +217,7 @@ function onSortOpen(evt: { oldIndex: number; newIndex: number }) { return item.serviceID === elementToSort.serviceID; }) as number; if (oldIndex >= 0 && checklist.value) { - loading.value = true; + loadingSort.value = true; const newIndex = oldIndex + (evt.newIndex - evt.oldIndex); const element = checklist.value.checklistItems[oldIndex] as ChecklistItem; @@ -235,7 +241,7 @@ function onSortOpen(evt: { oldIndex: number; newIndex: number }) { .catch((err) => { console.debug(err); }) - .finally(() => (loading.value = false)); + .finally(() => (loadingSort.value = false)); } } diff --git a/personalization-webcomponents/src/components/ChecklistList.vue b/personalization-webcomponents/src/components/ChecklistList.vue index e142d617..8d471830 100644 --- a/personalization-webcomponents/src/components/ChecklistList.vue +++ b/personalization-webcomponents/src/components/ChecklistList.vue @@ -18,7 +18,6 @@ role="listitem" aria-roledescription="sortierbares Listenelement" :class="{ - muted: element.checked !== null, 'keyboard-dragging': draggedIndex === index, }" :aria-grabbed="draggedIndex === index ? 'true' : 'false'" @@ -28,20 +27,36 @@ :key="element.serviceID" @keydown="handleEnterKeyDown" > - onSelectChange(element.serviceID)" + style="margin-left: 8px" + @check="() => onSelectChange(element.serviceID)" /> openDialog(element, evt)" + @keydown=" + (evt) => (evt.keyCode == 32 ? openDialog(element, evt) : null) + " > {{ element.title }} + + - verpflichtend + diff --git a/personalization-webcomponents/src/components/P13nCheckbox.vue b/personalization-webcomponents/src/components/P13nCheckbox.vue new file mode 100644 index 00000000..cecd9c08 --- /dev/null +++ b/personalization-webcomponents/src/components/P13nCheckbox.vue @@ -0,0 +1,101 @@ + + (evt.keyCode == 32 ? emit('check') : null)" + > + + + + + + + +