fix(registratura): replace parentheses with en-dash in contact display
"Name – Company" instead of "Name (Company)" for sender/recipient. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -86,11 +86,11 @@ import {
|
|||||||
} from "../services/deadline-service";
|
} from "../services/deadline-service";
|
||||||
import { getDeadlineType } from "../services/deadline-catalog";
|
import { getDeadlineType } from "../services/deadline-catalog";
|
||||||
|
|
||||||
/** Format a contact for display: "Name (Company)" / "Company" / "Name" */
|
/** Format a contact for display: "Name – Company" / "Company" / "Name" */
|
||||||
function formatContactLabel(c: { name: string; company: string }): string {
|
function formatContactLabel(c: { name: string; company: string }): string {
|
||||||
const name = c.name?.trim();
|
const name = c.name?.trim();
|
||||||
const company = c.company?.trim();
|
const company = c.company?.trim();
|
||||||
if (name && company) return `${name} (${company})`;
|
if (name && company) return `${name} – ${company}`;
|
||||||
return name || company || "";
|
return name || company || "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,11 +39,11 @@ import { DEFAULT_DOC_TYPE_LABELS, EXTERNAL_STATUS_LABELS } from "../types";
|
|||||||
import { getOverdueDays } from "../services/registry-service";
|
import { getOverdueDays } from "../services/registry-service";
|
||||||
import { cn } from "@/shared/lib/utils";
|
import { cn } from "@/shared/lib/utils";
|
||||||
|
|
||||||
/** Format a contact for display: "Name (Company)" / "Company" / "Name" */
|
/** Format a contact for display: "Name – Company" / "Company" / "Name" */
|
||||||
function formatContactLabel(c: { name?: string; company?: string }): string {
|
function formatContactLabel(c: { name?: string; company?: string }): string {
|
||||||
const name = (c.name ?? "").trim();
|
const name = (c.name ?? "").trim();
|
||||||
const company = (c.company ?? "").trim();
|
const company = (c.company ?? "").trim();
|
||||||
if (name && company) return `${name} (${company})`;
|
if (name && company) return `${name} – ${company}`;
|
||||||
return name || company || "";
|
return name || company || "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user