Dynamic Multi-Stage Manufacturing Progress Tracker
Lenskart's custom lens manufacturing process involves several precise and sequential stages, from initial design to final dispatch. To provide real-time visibility and ensure efficient operations for our internal teams, we need a robust UI component that accurately tracks the progress of a specific lens order through its entire manufacturing pipeline. This problem challenges you to build a dynamic, multi-stage progress bar component that clearly reflects the current status of an order, handles updates efficiently, and provides intuitive visual feedback.
ManufacturingProgressTracker React component: This component will be the core of your solution.stages as a prop. Each stage object will contain an id, name (e.g., "Lens Cutting"), and status (e.g., inProgress, completed, failed, pending).stages prop changes (e.g., when a stage's status changes from pending to inProgress).App.tsx provides buttons to simulate advanceProgress, failCurrentStage, and resetProgress. Your component should correctly respond to these state changes.name.pending, inProgress, completed, failed) must be visually distinguishable (e.g., using different background colors, border styles, or icons).inProgress stage should feature a subtle, active visual indicator or animation (e.g., a pulsating effect, a continuous stripe animation).completed.ManufacturingProgressTracker component renders correctly with initial stage data.inProgress stage displays an active visual indicator or animation.completed stages and displayed prominently.stages prop (e.g., status changes via the provided buttons) are reflected dynamically and smoothly in the UI.aria-valuenow, aria-valuemin, aria-valuemax, aria-label) are applied to the main progress bar and individual stage elements for accessibility.Constraints
name (string) and status (enum: pending, inProgress, completed, failed).inProgress at any given time.completed stage cannot revert to pending or inProgress. A failed stage will remain failed unless reset.failed state.ManufacturingProgressTracker component is structured, its reusability, and efficient handling of dynamic prop updates.Loading editor...