Skip to content
Snippets Groups Projects
Commit 84b339ca authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Merge branch '669-deleting-persons-is-too-easy' into 'master'

Resolve "Deleting persons is too easy"

Closes #669

See merge request !1357
parents 60f0e5b5 c5338ed1
No related branches found
No related tags found
1 merge request!1357Resolve "Deleting persons is too easy"
Pipeline #159305 failed
......@@ -48,6 +48,7 @@ Fixed
* Nav submenu items could not be distinguished from regular ones.
* Special printouts included a blank white page at the end.
* Collapse icon on the progress drawer was the wrong way around.
* Deleting persons now requires confirmation.
Removed
~~~~~~~
......
......@@ -68,14 +68,11 @@
<v-list-item
v-if="person.canDeletePerson"
:to="{
name: 'core.deletePerson',
params: { id: person.id },
}"
@click="showDeleteConfirm = true"
class="error--text"
>
<v-list-item-icon>
<v-icon color="error">mdi-delete</v-icon>
<v-icon color="error">$deleteContent</v-icon>
</v-list-item-icon>
<v-list-item-content>
<v-list-item-title>
......@@ -85,14 +82,30 @@
</v-list-item>
</button-menu>
</template>
<confirm-dialog
v-model="showDeleteConfirm"
@confirm="
$router.push({
name: 'core.deletePerson',
params: { id: person.id },
})
"
@cancel="showDeleteConfirm = false"
>
<template #title>
{{ $t("person.confirm_delete") }}
</template>
</confirm-dialog>
</div>
</template>
<script>
import gqlPersonActions from "./personActions.graphql";
import ConfirmDialog from "../generic/dialogs/ConfirmDialog.vue";
export default {
name: "PersonActions",
components: { ConfirmDialog },
props: {
id: {
type: String,
......@@ -109,6 +122,11 @@ export default {
},
},
},
data() {
return {
showDeleteConfirm: false,
};
},
};
</script>
......
......@@ -271,6 +271,7 @@
"avatar": "Avatar",
"children": "Kinder",
"delete": "Löschen",
"confirm_delete": "Wollen Sie wirklich diese Person löschen?",
"details": "Kontaktdaten",
"guardians": "Erziehungsberechtigte / Eltern",
"home": "Festnetz",
......
......@@ -255,6 +255,7 @@
"avatar": "Avatar",
"children": "Children",
"delete": "Delete",
"confirm_delete": "Do you really want to delete this person?",
"details": "Contact details",
"guardians": "Guardians / Parents",
"home": "home phone",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment