feat(ui): padroniza avatares e paleta visual da interface

This commit is contained in:
Felipe Coutinho
2026-03-17 17:08:54 +00:00
parent 7064c0b0bc
commit 272e90aef9
32 changed files with 316 additions and 314 deletions

View File

@@ -296,6 +296,23 @@ export function addMonthsToDate(value: Date, offset: number): Date {
// DATE FORMATTING
// ============================================================================
/**
* Formats a UTC date/datetime to short display format (weekday + day + month), capitalized.
* Use this for timestamps stored as UTC (e.g. transaction dates from the DB).
* @example
* formatTransactionDate("2024-11-14T00:00:00Z") // "Qui 14 nov"
*/
export function formatTransactionDate(date: Date | string): string {
const d = date instanceof Date ? date : new Date(date);
const formatted = new Intl.DateTimeFormat("pt-BR", {
weekday: "short",
day: "2-digit",
month: "short",
timeZone: "UTC",
}).format(d);
return formatted.charAt(0).toUpperCase() + formatted.slice(1);
}
/**
* Formats a date value to short display format
* @example