mirror of
https://github.com/coder/coder.git
synced 2026-09-22 13:10:21 +08:00
fix(site/src/pages/TemplateBuilder): block continuing without base template or module selection (#26626)
Fixes DEVEX-520 The Template Builder wizard allowed users to continue past the base template selection step without selecting a template, and past the module selection step without selecting any modules. Adds `canContinue` validation for the `base-infra` and `module-select` steps in `computeCanContinue()`. The Continue button is now disabled until a base template is selected on the first step and at least one module is selected on the module selection step. > Generated with [Coder Agents](https://coder.com/agents)
This commit is contained in:
@@ -254,6 +254,8 @@ function computeCanContinue(
|
||||
moduleVarMap: Record<string, Record<string, string>>,
|
||||
): boolean {
|
||||
switch (stepId) {
|
||||
case "base-infra":
|
||||
return state.selectedBase !== null;
|
||||
case "base-parameters":
|
||||
return baseParametersComplete(
|
||||
basesData,
|
||||
|
||||
Reference in New Issue
Block a user