fix: TypeScript build errors in frontend
- Fix CFDI type errors (ivaTraslado, tipoCambio, id types) - Fix sidebar navigation type errors (Role vs literal tuples) - Fix user invite type errors (UserInvite['role']) - Fix login page PlatformRole type cast
This commit is contained in:
@@ -21,9 +21,9 @@ import {
|
||||
import { useAuthStore } from '@/stores/auth-store';
|
||||
import { logout } from '@/lib/api/auth';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { hasFeature, isGlobalAdminRfc, type Plan } from '@horux/shared';
|
||||
import { hasFeature, isGlobalAdminRfc, type Plan, type Role } from '@horux/shared';
|
||||
|
||||
const navigation = [
|
||||
const navigation: { name: string; href: string; icon: React.ElementType; feature?: string; roles?: Role[] }[] = [
|
||||
{ name: 'Dashboard', href: '/dashboard', icon: LayoutDashboard, roles: ['owner', 'contador'] },
|
||||
{ name: 'CFDI', href: '/cfdi', icon: FileText },
|
||||
{ name: 'Impuestos', href: '/impuestos', icon: Calculator },
|
||||
@@ -34,7 +34,7 @@ const navigation = [
|
||||
{ name: 'Facturación', href: '/facturacion', icon: Send, roles: ['owner', 'contador'] },
|
||||
{ name: 'Usuarios', href: '/usuarios', icon: Users, roles: ['owner'] },
|
||||
{ name: 'Config', href: '/configuracion', icon: Settings, roles: ['owner'] },
|
||||
] as const;
|
||||
];
|
||||
|
||||
const adminNavigation = [
|
||||
{ name: 'Clientes', href: '/clientes', icon: Building2 },
|
||||
|
||||
Reference in New Issue
Block a user