From bcb0b013243f6645bf4ae854b299ae08e3209cb1 Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Mon, 8 Dec 2025 13:30:11 +0100 Subject: [PATCH] Enhance child management features in Falukant module - Added new translations for gender, baptism status, and child details in both German and English localization files, improving user experience. - Integrated ChildDetailsDialog component into FamilyView for displaying detailed information about children. - Updated the showChildDetails method to utilize the new dialog for better user interaction. - Modified button styles for improved visual feedback when setting heirs. --- .../dialogues/falukant/ChildDetailsDialog.vue | 141 ++++++++++++++++++ frontend/src/i18n/locales/de/falukant.json | 9 +- frontend/src/i18n/locales/en/falukant.json | 9 +- frontend/src/views/falukant/FamilyView.vue | 11 +- 4 files changed, 164 insertions(+), 6 deletions(-) create mode 100644 frontend/src/dialogues/falukant/ChildDetailsDialog.vue diff --git a/frontend/src/dialogues/falukant/ChildDetailsDialog.vue b/frontend/src/dialogues/falukant/ChildDetailsDialog.vue new file mode 100644 index 0000000..d6fd02a --- /dev/null +++ b/frontend/src/dialogues/falukant/ChildDetailsDialog.vue @@ -0,0 +1,141 @@ + + + + + + diff --git a/frontend/src/i18n/locales/de/falukant.json b/frontend/src/i18n/locales/de/falukant.json index 7b95168..2586e5d 100644 --- a/frontend/src/i18n/locales/de/falukant.json +++ b/frontend/src/i18n/locales/de/falukant.json @@ -405,8 +405,10 @@ "title": "Kinder", "name": "Name", "age": "Alter", + "gender": "Geschlecht", "heir": "Erbe", "isHeir": "Erbe", + "notHeir": "Nicht Erbe", "setAsHeir": "Als Erben festlegen", "heirSetSuccess": "Das Kind wurde erfolgreich als Erbe festgelegt.", "heirSetError": "Fehler beim Festlegen des Erben.", @@ -414,7 +416,12 @@ "none": "Keine Kinder vorhanden.", "detailButton": "Details anzeigen", "addChild": "Kind hinzufügen", - "baptism": "Taufen" + "baptism": "Taufen", + "notBaptized": "Noch nicht getauft", + "baptismNotice": "Dieses Kind wurde noch nicht getauft und hat daher noch keinen Namen.", + "details": { + "title": "Kind-Details" + } }, "lovers": { "title": "Liebhaber", diff --git a/frontend/src/i18n/locales/en/falukant.json b/frontend/src/i18n/locales/en/falukant.json index 93eb587..bbfafa3 100644 --- a/frontend/src/i18n/locales/en/falukant.json +++ b/frontend/src/i18n/locales/en/falukant.json @@ -207,8 +207,10 @@ "title": "Children", "name": "Name", "age": "Age", + "gender": "Gender", "heir": "Heir", "isHeir": "Heir", + "notHeir": "Not Heir", "setAsHeir": "Set as Heir", "heirSetSuccess": "The child has been successfully set as heir.", "heirSetError": "Error setting heir.", @@ -216,7 +218,12 @@ "none": "No children available.", "detailButton": "Show Details", "addChild": "Add Child", - "baptism": "Baptize" + "baptism": "Baptize", + "notBaptized": "Not yet baptized", + "baptismNotice": "This child has not been baptized yet and therefore has no name.", + "details": { + "title": "Child Details" + } } } } diff --git a/frontend/src/views/falukant/FamilyView.vue b/frontend/src/views/falukant/FamilyView.vue index 13d2d45..62842c1 100644 --- a/frontend/src/views/falukant/FamilyView.vue +++ b/frontend/src/views/falukant/FamilyView.vue @@ -168,6 +168,7 @@ + @@ -175,6 +176,7 @@ import StatusBar from '@/components/falukant/StatusBar.vue' import MessageDialog from '@/dialogues/standard/MessageDialog.vue' import ErrorDialog from '@/dialogues/standard/ErrorDialog.vue' +import ChildDetailsDialog from '@/dialogues/falukant/ChildDetailsDialog.vue' import apiClient from '@/utils/axios.js' import { mapState } from 'vuex' @@ -184,7 +186,8 @@ export default { components: { StatusBar, MessageDialog, - ErrorDialog + ErrorDialog, + ChildDetailsDialog }, data() { return { @@ -245,7 +248,7 @@ export default { }, showChildDetails(child) { - console.log('Show details for child:', child); + this.$refs.childDetailsDialog?.open(child); }, async setAsHeir(child) { @@ -494,7 +497,7 @@ h2 { .set-heir-button { padding: 4px 8px; - background-color: #2196F3; + background-color: #28a745; color: white; border: none; border-radius: 4px; @@ -503,6 +506,6 @@ h2 { } .set-heir-button:hover { - background-color: #1976D2; + background-color: #218838; } \ No newline at end of file