feat(onboarding): choose modules at first login (Lightweight / Advanced / Custom)#202
Merged
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
… (Structure) and Issues/reason codes (Maintenance) so Lightweight hides them
… -> Maintenance, net-requirements -> Structure) so Lightweight keeps only Work Order History
…Reports/Structure/Maintenance)
…ngs + backward-compat backfill
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a module-selection step to the first-login onboarding wizard so a new admin turns on only the feature areas they need, instead of the full menu. Verified end-to-end in a running instance.
What it does
The wizard now opens with a "Choose your modules" step (step 1 of 5: Modules → Line → Product → Process → Work Order). Three one-click choices:
Core areas (Dashboard, Orders, Production, Admin) are always on. Changeable anytime in Settings → System → Modules.
Reuse, not reinvent
Writes the selection to the existing
system_settings.enabled_modulesviaModuleRegistry— the same mechanism the Settings page andTabAccessMiddleware/TabRegistryalready use. So disabled areas are hidden from the nav and their routes 404, with no new storage, migration, or gating.Changes
ModuleRegistry:PRESETSconst +modulesForPreset()helper.OnboardingController:modules()/storeModules();index()→ modules step; step props renumbered (1→2…).Pages/onboarding/Modules.jsx;OnboardingLayoutstepper (5 steps); step-label fixes.Tests / verification
OnboardingWizardTestextended: 20 cases (index→modules redirect; light/advanced/custom presets save the right set; invalid preset/module → 422; empty custom disables all; non-admin forbidden).enabled_modules=['reports']→ dashboard nav shows only core + Reports (6 modules hidden) →/admin/connectivity→ 404.