1
0
Fork 0
mirror of https://github.com/s-frick/effigenix.git synced 2026-03-28 06:39:34 +01:00
effigenix/frontend/apps/scanner/src/components/StepIndicator.tsx
Sebastian Frick bf09e3b747 feat(scanner): Mobile Scanner App mit echten Produktionsaufträgen
Scanner-App  Tauri v2 Android App mit
Login, Barcode-Scanner, Consume/Move/Book-Flows und Aufgabenliste.

TasksPage lädt echte RELEASED/IN_PROGRESS Produktionsaufträge via API,
Consume-Flow nutzt den konkreten Auftrag für korrekte Rezept-Skalierung
statt blind den ersten IN_PROGRESS-Auftrag zu nehmen.

Backend: FindStockByBatchId Use Case + REST-Endpoint für Stock-Lookup
per Chargennummer.
2026-03-27 15:25:17 +01:00

56 lines
1.7 KiB
TypeScript

import { Check } from 'lucide-react';
import { cn } from '@effigenix/ui';
export interface Step {
label: string;
state: 'done' | 'active' | 'pending';
}
interface StepIndicatorProps {
steps: Step[];
}
export function StepIndicator({ steps }: StepIndicatorProps) {
return (
<div className="px-8 mb-2">
<div className="flex items-center gap-0 mb-1">
{steps.map((step, i) => (
<div key={i} className="contents">
<div
className={cn(
'w-8 h-8 rounded-full flex items-center justify-center text-xs font-bold transition-all',
step.state === 'done' && 'bg-success-100 text-success-700',
step.state === 'active' && 'bg-brand-600 text-white shadow-brand',
step.state === 'pending' && 'bg-warm-200 text-warm-500'
)}
>
{step.state === 'done' ? <Check className="w-3.5 h-3.5" /> : i + 1}
</div>
{i < steps.length - 1 && (
<div
className={cn(
'flex-1 h-0.5 transition-colors',
step.state === 'done' ? 'bg-success-300' : 'bg-warm-200'
)}
/>
)}
</div>
))}
</div>
<div className="flex justify-between text-2xs font-semibold uppercase px-0.5">
{steps.map((step, i) => (
<span
key={i}
className={cn(
step.state === 'done' && 'text-success-600',
step.state === 'active' && 'text-brand-600',
step.state === 'pending' && 'text-warm-500'
)}
>
{step.label}
</span>
))}
</div>
</div>
);
}