feat: metabase auto-registration + ui fixes + migration scripts
- Add metabase.service.ts for automatic DB registration on tenant creation - Hook createTenant, addTenantToOwner and deleteTenant to sync with Metabase - Add environment variables for Metabase integration - Fix dashboard routing for global admin users - Fix CFDI status casing (Vigente vs vigente) - Fix sidebar empty nav crash - Fix KPI null regimen_fiscal values - Fix CFDI type mapping (EMITIDO/RECIBIDO) - Update branding from Horux360 to Horux Despachos - Add legacy migration scripts for central and tenant DBs
This commit is contained in:
@@ -51,13 +51,13 @@ export function TopNav() {
|
||||
const role = user?.role || 'visor';
|
||||
const filteredNav = navigation.filter((item) => {
|
||||
if ('feature' in item && item.feature && !hasFeature(plan, item.feature)) return false;
|
||||
if ('roles' in item && item.roles && !item.roles.includes(role)) return false;
|
||||
if ('roles' in item && item.roles && !item.roles.includes(role as any)) return false;
|
||||
return true;
|
||||
});
|
||||
|
||||
const isGlobalAdmin = isGlobalAdminRfc(user?.tenantRfc, role, user?.platformRoles);
|
||||
const allNavigation = isGlobalAdmin
|
||||
? [...filteredNav.slice(0, -1), ...adminNavigation, filteredNav[filteredNav.length - 1]]
|
||||
? [...filteredNav.slice(0, -1), ...adminNavigation, filteredNav[filteredNav.length - 1]].filter(Boolean)
|
||||
: filteredNav;
|
||||
|
||||
const handleLogout = async () => {
|
||||
@@ -79,7 +79,7 @@ export function TopNav() {
|
||||
<div className="h-8 w-8 rounded-lg bg-primary flex items-center justify-center">
|
||||
<span className="text-primary-foreground font-bold text-lg">H</span>
|
||||
</div>
|
||||
<span className="font-bold text-xl">Horux360</span>
|
||||
<span className="font-bold text-xl">Horux Despachos</span>
|
||||
</Link>
|
||||
|
||||
{/* Navigation */}
|
||||
|
||||
Reference in New Issue
Block a user