Skip to content

Commit c6bc71f

Browse files
authored
Merge pull request #20224 from jmchilton/bug_fix_wizard
Bug fixes around wizard usage.
2 parents 29ea0cf + 65f1100 commit c6bc71f

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

client/src/components/Collections/BuildFileSetWizard.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { attemptCreate, type CollectionCreatorComponent } from "@/components/Col
77
import { rawToTable } from "@/components/Collections/tables";
88
import { useWizard } from "@/components/Common/Wizard/useWizard";
99
import { useToolRouting } from "@/composables/route";
10+
import localize from "@/utils/localization";
1011
1112
import { type RemoteFile, type RulesCreatingWhat, type RulesSourceFrom } from "./wizard/types";
1213
import { useFileSetSources } from "./wizard/useFileSetSources";
@@ -34,6 +35,7 @@ interface Props {
3435
3536
const props = defineProps<Props>();
3637
38+
const title = localize("Rule Based Data Import");
3739
const ruleState = ref(false);
3840
const creatingWhat = ref<RulesCreatingWhat>("datasets");
3941
const creatingWhatTitle = computed(() => {
@@ -181,7 +183,7 @@ function onRuleCreate() {
181183
</script>
182184

183185
<template>
184-
<GenericWizard :use="wizard" :submit-button-label="importButtonLabel" @submit="submit">
186+
<GenericWizard :use="wizard" :submit-button-label="importButtonLabel" :title="title" @submit="submit">
185187
<div v-if="wizard.isCurrent('select-what')">
186188
<CreatingWhat :creating-what="creatingWhat" @onChange="setCreatingWhat" />
187189
</div>

client/src/components/Common/Wizard/GenericWizard.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ interface Props {
2121
*
2222
* This is displayed at the top of the wizard.
2323
*
24-
* The default component can be replaced by a slot named `header`.
24+
* The default component can be replaced by a slot named `header` or it can be excluded
25+
* as a property to skip the wizard all together.
2526
*
26-
* @default "Generic Wizard"
27+
* @default ""
2728
*/
2829
title?: string;
2930
@@ -65,7 +66,7 @@ interface Props {
6566
6667
const props = withDefaults(defineProps<Props>(), {
6768
use: undefined,
68-
title: "Generic Wizard",
69+
title: undefined,
6970
description: undefined,
7071
submitButtonLabel: "Submit",
7172
isBusy: false,
@@ -171,7 +172,7 @@ const bodyStyle = computed(() => {
171172
<template>
172173
<component :is="props.containerComponent" class="wizard-container">
173174
<slot name="header">
174-
<BCardTitle>
175+
<BCardTitle v-if="title">
175176
<h2>{{ title }}</h2>
176177
</BCardTitle>
177178
</slot>

0 commit comments

Comments
 (0)