feat: Add backward navigation and comprehensive i18n support
- Implement backward navigation in onboarding wizard with state persistence - Add comprehensive setup wizard translations (Spanish, English, Basque) - Add configuration widget translations for dashboard - Support for Suppliers, Recipes, Quality, and Team setup steps New translation files: - setup_wizard.json for all 3 languages (es, en, eu) - Added config section to dashboard.json files Key improvements: - Users can now navigate backwards through wizard steps - All setup wizard steps now have proper i18n support - Configuration progress widget fully translated
This commit is contained in:
@@ -409,6 +409,16 @@ const OnboardingWizardContent: React.FC = () => {
|
||||
}
|
||||
};
|
||||
|
||||
const handleGoToPrevious = () => {
|
||||
if (currentStepIndex > 0) {
|
||||
const previousStep = VISIBLE_STEPS[currentStepIndex - 1];
|
||||
console.log(`⬅️ Going back from "${currentStep.id}" to "${previousStep.id}"`);
|
||||
setCurrentStepIndex(currentStepIndex - 1);
|
||||
} else {
|
||||
console.warn('⚠️ Already at first step, cannot go back');
|
||||
}
|
||||
};
|
||||
|
||||
// Show loading state
|
||||
if (!isNewTenant && (isLoadingProgress || !isInitialized)) {
|
||||
return (
|
||||
@@ -518,7 +528,7 @@ const OnboardingWizardContent: React.FC = () => {
|
||||
<CardBody padding="md">
|
||||
<StepComponent
|
||||
onNext={() => {}}
|
||||
onPrevious={() => {}}
|
||||
onPrevious={handleGoToPrevious}
|
||||
onComplete={handleStepComplete}
|
||||
onUpdate={handleStepUpdate}
|
||||
isFirstStep={currentStepIndex === 0}
|
||||
|
||||
Reference in New Issue
Block a user