diff --git a/backend/services/falukantService.js b/backend/services/falukantService.js index c512545..a0a88f3 100644 --- a/backend/services/falukantService.js +++ b/backend/services/falukantService.js @@ -4776,8 +4776,9 @@ ORDER BY r.id`, const character = falukantUser.character; const firstName = character.definedFirstName?.name ?? ''; const lastName = character.definedLastName?.name ?? ''; - const title = character.nobleTitle?.labelTr ?? ''; - const characterName = [title, firstName, lastName].filter(Boolean).join(' ') || '—'; + const titleLabelTr = character.nobleTitle?.labelTr ?? ''; + const nameWithoutTitle = [firstName, lastName].filter(Boolean).join(' ') || '—'; + const characterName = titleLabelTr ? [titleLabelTr, firstName, lastName].filter(Boolean).join(' ') : nameWithoutTitle; const age = character.birthdate ? calcAge(character.birthdate) : null; const [unreadNotificationsCount, childrenCount] = await Promise.all([ @@ -4794,6 +4795,8 @@ ORDER BY r.id`, return { characterName, + titleLabelTr: titleLabelTr || null, + nameWithoutTitle, gender: character.gender ?? null, age, money: Number(falukantUser.money ?? 0), diff --git a/frontend/src/components/DashboardWidget.vue b/frontend/src/components/DashboardWidget.vue index d0d3a97..76754b4 100644 --- a/frontend/src/components/DashboardWidget.vue +++ b/frontend/src/components/DashboardWidget.vue @@ -25,7 +25,7 @@