Add POI feature and imporve the overall backend implementation

This commit is contained in:
Urtzi Alfaro
2025-11-12 15:34:10 +01:00
parent e8096cd979
commit 5783c7ed05
173 changed files with 16862 additions and 9078 deletions

View File

@@ -588,6 +588,14 @@ export const Sidebar = forwardRef<SidebarRef, SidebarProps>(({
);
};
// Get tour attribute for navigation item
const getTourAttribute = (path: string): string | undefined => {
if (path === '/app/database') return 'sidebar-database';
if (path === '/app/operations') return 'sidebar-operations';
if (path === '/app/analytics') return 'sidebar-analytics';
return undefined;
};
// Render navigation item
const renderItem = (item: NavigationItem, level = 0) => {
const isActive = location.pathname === item.path || location.pathname.startsWith(item.path + '/');
@@ -595,6 +603,7 @@ export const Sidebar = forwardRef<SidebarRef, SidebarProps>(({
const hasChildren = item.children && item.children.length > 0;
const isHovered = hoveredItem === item.id;
const ItemIcon = item.icon;
const tourAttr = getTourAttribute(item.path);
const itemContent = (
<div
@@ -676,6 +685,7 @@ export const Sidebar = forwardRef<SidebarRef, SidebarProps>(({
onClick={() => handleItemClick(item)}
disabled={item.disabled}
data-path={item.path}
data-tour={tourAttr}
onMouseEnter={() => {
if (isCollapsed && hasChildren && level === 0 && item.children && item.children.length > 0) {
setHoveredItem(item.id);