aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Hackl <hackl@data-quest.de>2026-01-23 12:59:24 +0100
committerThomas Hackl <hackl@data-quest.de>2026-03-17 09:01:06 +0100
commit064680de4b505d93c1eef9ee8f6ebffdd1573fd4 (patch)
treefc94e2196ef35eae0224a5ec7f0d1d1c37ec02e7
parent529259be12d09ce9171169a1801bb8a6772c36a3 (diff)
remove sidebar and add id to step data
-rw-r--r--lib/classes/WizardPart.php1
-rw-r--r--resources/vue/apps/StudipWizard.vue36
2 files changed, 11 insertions, 26 deletions
diff --git a/lib/classes/WizardPart.php b/lib/classes/WizardPart.php
index abf3144..0127e2c 100644
--- a/lib/classes/WizardPart.php
+++ b/lib/classes/WizardPart.php
@@ -87,6 +87,7 @@ final class WizardPart implements Stringable, JsonSerializable
public function jsonSerialize(): mixed
{
return [
+ 'id' => $this->id,
'type' => $this->type,
'title' => $this->title,
'icon' => $this->iconShape,
diff --git a/resources/vue/apps/StudipWizard.vue b/resources/vue/apps/StudipWizard.vue
index 1ee82c8..cbc4a91 100644
--- a/resources/vue/apps/StudipWizard.vue
+++ b/resources/vue/apps/StudipWizard.vue
@@ -49,25 +49,6 @@
</button>
</footer>
</div>
- <Teleport to="#wizard-sidebar">
- <sidebar-widget id="wizard-widget"
- :title="$gettext('Assistent')">
- <template #content>
- <ul class="widget-list widget-links sidebar-views">
- <li v-for="(step, index) in visibleSteps"
- :key="index"
- :class="{active: index === currentStep}"
- >
- <button class="undecorated" @click.prevent="jumpToStep(index)"
- :title="step.title ? step.title : ($gettext('Schritt ') + (index + 1))"
- >
- {{ step.title ? step.title : ($gettext('Schritt ') + (index + 1)) }}
- </button>
- </li>
- </ul>
- </template>
- </sidebar-widget>
- </Teleport>
</template>
<script setup>
@@ -75,7 +56,6 @@ import {nextTick, onMounted, ref} from 'vue';
import {$gettext} from '@/assets/javascripts/lib/gettext';
import {useWizardStore} from '@/vue/store/pinia/wizardStore';
import {useFormsStore} from '@/vue/store/pinia/formsStore';
-import SidebarWidget from '@/vue/components/SidebarWidget';
const props = defineProps({
steps: {
@@ -102,24 +82,28 @@ const visibleSteps = ref(props.showAllSteps ? props.steps : [props.steps[0]]);
const store = useWizardStore();
const formsStore = useFormsStore();
+const checkValidity = () => {
+ if (currentStepType.value === 'form') {
+ STUDIP.Vue.emit('form.submit', currentStep.value.id);
+ }
+};
+
const jumpToStep = (number) => {
+ checkValidity();
- if (currentStepType.value === 'form') {
- STUDIP.Vue.emit('form.submit', 'userdata');
+ if (mountedApp !== null) {
+ mountedApp.unmount();
}
/*if (!visibleSteps.value.includes(props.steps[number])) {
visibleSteps.value[number] = props.steps[number];
}
- if (mountedApp !== null) {
- mountedApp.unmount();
- }
currentStep.value = number;
initializeContent(number);*/
};
const finishWizard = () => {
- alert('The wizard will rest now.');
+ checkValidity();
};
const initializeContent = async (stepNumber) => {