Renamed admin profile & initials

X-Lovable-Edit-ID: edt-09e617f0-0e5b-429e-bcf8-edeaf1495111
Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
gpt-engineer-app[bot]
2026-04-19 20:10:30 +00:00
co-authored by renee-png
2 changed files with 8 additions and 5 deletions
+3 -4
View File
@@ -403,15 +403,14 @@ export async function downloadInvoicePdf(input: InvoicePdfInput, filename: strin
const descMaxW = colQtyR - colDescX - 14;
const descLines = wrap(pdf, item.description || (item.kind === "expense" ? "Expense" : ""), descMaxW);
const lineHeight = 12;
const blockH = Math.max(lineHeight * descLines.length + 14, item.user_name ? 32 : 26);
const blockH = Math.max(lineHeight * descLines.length + 14, item.user_initials ? 32 : 26);
ensure(blockH + 4);
setFont(pdf, { size: 9, color: TEXT });
pdf.text(fmtDateShort(item.work_date), colDateX, y + 12);
if (item.user_name) {
if (item.user_initials) {
setFont(pdf, { size: 7.5, color: MUTED });
const nameLines = wrap(pdf, item.user_name, colKindX - colDateX - 4);
pdf.text(nameLines[0], colDateX, y + 23);
pdf.text(item.user_initials, colDateX, y + 23);
}
setFont(pdf, { size: 9, color: MUTED });
+5 -1
View File
@@ -445,7 +445,11 @@ function InvoiceDetail() {
) : (
<div className="min-w-0">
<div className={`whitespace-pre-wrap break-words ${!sub.billable ? "italic" : ""}`}>{it.description}</div>
{it.user?.full_name && <div className="text-[11px] text-muted-foreground italic">{it.user.full_name}</div>}
{(() => {
const nm: string = it.user?.full_name || it.user?.email || "";
const init = nm.trim().split(/\s+/).map((p: string) => p[0]).filter(Boolean).slice(0, 3).join("").toUpperCase();
return init ? <div className="text-[11px] text-muted-foreground italic">{init}</div> : null;
})()}
</div>
)}
</td>