feat: fase 3 - frontend next.js setup
- Next.js 15 + TypeScript + Bootstrap 5 + FontAwesome - Layout replica SAM.Master (sidebar collapsable + header) - Sidebar, Header, LoadingSpinner, ModalConfirmacion components - Login page with RUT validation - Dashboard page with summary cards - AuthContext + JWT auth with cookies - api.ts centralized HTTP client - useInactividad hook (30min timeout) - validarRut.ts + utils.ts migrated - Original CSS + images copied from project - Dockerfile multi-stage build
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
export function formatCurrency(amount: number): string {
|
||||
return new Intl.NumberFormat('es-CL', { style: 'currency', currency: 'CLP', maximumFractionDigits: 0 }).format(amount);
|
||||
}
|
||||
|
||||
export function formatDate(date: string | Date): string {
|
||||
const d = typeof date === 'string' ? new Date(date) : date;
|
||||
return d.toLocaleDateString('es-CL', { day: '2-digit', month: '2-digit', year: 'numeric' });
|
||||
}
|
||||
|
||||
export function classNames(...classes: (string | boolean | undefined)[]): string {
|
||||
return classes.filter(Boolean).join(' ');
|
||||
}
|
||||
Reference in New Issue
Block a user