Add backend routes

This commit is contained in:
2025-01-17 16:07:31 -05:00
parent 48c7ab9134
commit 118344b730
2 changed files with 658 additions and 388 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,23 +1 @@
/**
* Format a number as currency with the specified locale and currency code
* @param value - The number to format
* @param locale - The locale to use for formatting (defaults to 'en-US')
* @param currency - The currency code to use (defaults to 'USD')
* @returns Formatted currency string
*/
export function formatCurrency(
value: number | null | undefined,
locale: string = 'en-US',
currency: string = 'USD'
): string {
if (value === null || value === undefined) {
return '$0.00';
}
return new Intl.NumberFormat(locale, {
style: 'currency',
currency: currency,
minimumFractionDigits: 2,
maximumFractionDigits: 2,
}).format(value);
}