From f8a20380030d6d11f1a478fa2827ddf73eaa4eda Mon Sep 17 00:00:00 2001 From: keeganbcgov Date: Mon, 31 Jul 2023 14:52:37 -0700 Subject: [PATCH] EDX-1148: SDC progress stepper styling. --- .../components/common/StepperComponent.vue | 49 +++++++++++++------ .../sdcCollection/SDCCollectionView.vue | 1 - frontend/src/store/modules/sdcCollection.js | 9 ++-- frontend/src/utils/institute/SdcSteps.js | 5 ++ 4 files changed, 44 insertions(+), 20 deletions(-) diff --git a/frontend/src/components/common/StepperComponent.vue b/frontend/src/components/common/StepperComponent.vue index 8aeee70da..9abececfe 100644 --- a/frontend/src/components/common/StepperComponent.vue +++ b/frontend/src/components/common/StepperComponent.vue @@ -4,15 +4,15 @@
{{ step.name }}
@@ -21,7 +21,7 @@ class="wrapper" cols="3" > -
+
mdi-check @@ -80,16 +80,19 @@ export default { methods: { ...mapActions(useSdcCollectionStore, ['setCurrentStepInCollectionProcess']), onStepClick(step) { + if (step.index >= this.currentStepInCollectionProcess.index) { + return; + } this.setCurrentStepInCollectionProcess(step); this.$router.push({name: step.route}); }, moveToNextStep() { const currentIndex = this.currentStepInCollectionProcess.index; - if(!this.steps[currentIndex].isComplete) { + if (!this.steps[currentIndex].isComplete) { this.markStepComplete(currentIndex); } this.$emit('on-navigation-complete'); - if(currentIndex < (this.steps.length - 1)) { + if (currentIndex < (this.steps.length - 1)) { this.setNextStepInProgressAndNavigate(currentIndex); } }, @@ -99,6 +102,7 @@ export default { }, setNextStepInProgressAndNavigate(currentIndex) { let nextStep = this.steps[currentIndex + 1]; + nextStep.isStarted = true; this.setCurrentStepInCollectionProcess(nextStep); this.$router.push({name: nextStep.route}); }, @@ -113,18 +117,26 @@ export default {