feat(frontend): replace all name concatenation with displayName
- Add displayName default method to PersonSummaryDTO - Update native SQL queries to include title, person_type columns - Add getInitials() utility to personFormat.ts - Update abbreviateName/abbreviateCompact for nullable firstName - Replace firstName+lastName concatenation with displayName in all person-displaying components and server load files - Regenerate API types with displayName on Person and PersonSummaryDTO Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -8,8 +8,9 @@ let {
|
||||
}: {
|
||||
person: {
|
||||
id: string;
|
||||
firstName: string;
|
||||
firstName?: string | null;
|
||||
lastName: string;
|
||||
displayName: string;
|
||||
alias?: string | null;
|
||||
birthYear?: number | null;
|
||||
deathYear?: number | null;
|
||||
@@ -29,14 +30,13 @@ let {
|
||||
<div
|
||||
class="flex h-16 w-16 items-center justify-center rounded-full bg-primary font-serif text-xl font-bold text-primary-fg"
|
||||
>
|
||||
{person.firstName[0]}{person.lastName[0]}
|
||||
{person.firstName ? person.firstName[0] : person.lastName[0]}{person.lastName[0]}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Name — centered, serif -->
|
||||
<h1 class="mb-1 text-center font-serif text-xl font-bold text-ink">
|
||||
{person.firstName}
|
||||
{person.lastName}
|
||||
{person.displayName}
|
||||
</h1>
|
||||
|
||||
<!-- Alias — centered, italic -->
|
||||
|
||||
Reference in New Issue
Block a user