Initial commit: proyecto ContabilidadSaPolar completo

This commit is contained in:
root
2026-08-19 21:30:23 +00:00
commit 0d5c6f9512
232 changed files with 26730 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
import { useNavigate } from 'react-router-dom';
export type EntityType = 'PROPERTY' | 'TENANT' | 'CONTRACT' | 'INCOME' | 'EXPENSE' | 'INCIDENT' | 'PROPERTY_GROUP' | 'DOCUMENT' | 'BANK_ACCOUNT';
const ROUTES: Record<EntityType, string> = {
PROPERTY: '/properties',
PROPERTY_GROUP: '/property-groups',
TENANT: '/tenants',
CONTRACT: '/contracts',
INCOME: '/incomes',
EXPENSE: '/expenses',
INCIDENT: '/incidents',
DOCUMENT: '/documents',
BANK_ACCOUNT: '/bank-accounts',
};
export function useEntityNavigation() {
const navigate = useNavigate();
const navigateToEntity = (entityType: EntityType, entityId: number) => {
const route = ROUTES[entityType];
if (route) {
navigate(route, { state: { openDetailId: entityId } });
}
};
return { navigateToEntity };
}