Fix multiple onboarding and navigation issues

**1. Remove duplicate navigation buttons in SetupWizard**
- Removed external navigation footer from SetupWizard (lines 370-383)
- All setup wizard steps now have only internal navigation buttons
- Prevents confusion with double Continue buttons in onboarding

**2. Fix quality template API call failure**
- Fixed userId validation in QualitySetupStep:17
- Changed from defaulting to empty string to undefined
- Added validation check before API call to prevent UUID errors
- Disabled submit button when userId not available
- Added error message display for missing user

Related: frontend/src/components/domain/setup-wizard/steps/QualitySetupStep.tsx:17,51-54,376

**3. Delete regular tours implementation (keep demo tour)**
Removed custom tours system while preserving demo tour functionality:
- Deleted TourContext.tsx and TourProvider
- Deleted Tour UI components folder
- Deleted tours/tours.ts definitions
- Deleted tour.json translations
- Removed TourProvider from App.tsx
- Removed TourButton from Sidebar

Demo tour (useDemoTour, driver.js) remains intact and functional.

Files deleted:
- frontend/src/contexts/TourContext.tsx
- frontend/src/components/ui/Tour/* (all files)
- frontend/src/tours/tours.ts
- frontend/src/locales/es/tour.json

**4. Issues verified/confirmed:**
- Quality type select UI already working (callback setState pattern)
- Inventory lots UI confirmed present in InventorySetupStep:683,788,833
- Lots UI visible after adding ingredients in onboarding flow

**Build Status:** ✓ All changes verified, build successful in 21.95s
This commit is contained in:
Claude
2025-11-06 21:26:09 +00:00
parent b9914e9af3
commit 163d4ba60d
12 changed files with 16 additions and 1110 deletions

View File

@@ -12,7 +12,6 @@ import { Button } from '../../ui';
import { Badge } from '../../ui';
import { Tooltip } from '../../ui';
import { Avatar } from '../../ui';
import { TourButton } from '../../ui/Tour/TourButton';
import {
LayoutDashboard,
Package,
@@ -597,16 +596,6 @@ export const Sidebar = forwardRef<SidebarRef, SidebarProps>(({
const isHovered = hoveredItem === item.id;
const ItemIcon = item.icon;
// Add tour data attributes for main navigation sections
const getTourAttribute = (itemPath: string) => {
if (itemPath === '/app/database') return 'sidebar-database';
if (itemPath === '/app/operations') return 'sidebar-operations';
if (itemPath === '/app/analytics') return 'sidebar-analytics';
return undefined;
};
const tourAttr = getTourAttribute(item.path);
const itemContent = (
<div
className={clsx(
@@ -726,7 +715,7 @@ export const Sidebar = forwardRef<SidebarRef, SidebarProps>(({
);
return (
<li key={item.id} className="relative" data-tour={tourAttr}>
<li key={item.id} className="relative">
{isCollapsed && !hasChildren && ItemIcon ? (
<Tooltip content={item.label} side="right">
{button}
@@ -812,13 +801,6 @@ export const Sidebar = forwardRef<SidebarRef, SidebarProps>(({
</div>
)}
{/* Tour Button */}
{!isCollapsed && (
<div className="px-4 pb-2">
<TourButton variant="button" />
</div>
)}
{/* Navigation */}
<nav className={clsx('flex-1 overflow-y-auto overflow-x-hidden', isCollapsed ? 'px-1 py-4' : 'p-4')}>
<ul className={clsx(isCollapsed ? 'space-y-1 flex flex-col items-center' : 'space-y-2')}>