Skip to content

Commit

Permalink
fix: fixing progress indicator navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
paulushcgcj committed Sep 8, 2023
1 parent 9963acd commit 6744845
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions frontend/src/pages/FormBCeIDPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ const stateIcon = (index: number) => {
const checkStepValidity = (stepNumber: number): boolean => {
progressData.forEach((step: any) => {
if (step.step <= stepNumber) {
step.valid = validate(step.fields, formData);
step.valid = validate(step.fields, formData, true);
}
});
return progressData[stepNumber].valid;
Expand All @@ -229,12 +229,9 @@ const endAndLogOut = ref<boolean>(false);
const mailAndLogOut = ref<boolean>(false);
const goToStep = (index: number) => {
if (checkStepValidity(index)) currentTab.value = index;
if (index <= currentTab.value && checkStepValidity(index)) currentTab.value = index;
};
const goToStep2 = (index: number) => {
console.log(index,'bling')
}
const onNext = () => {
if (currentTab.value + 1 < progressData.length) {
Expand Down Expand Up @@ -318,7 +315,7 @@ generalErrorBus.on((event: string) => (globalErrorMessage.value = event));
:secondary-label="item.subtitle"
:state="item.step <= currentTab ? item.step < currentTab ? 'complete' : 'current' : 'incomplete'"
:class="item.step <= currentTab ? 'step-active' : 'step-inactive'"
v-on:click="goToStep2(item.step)"
v-on:click="goToStep(item.step)"
>
<span class="cds--progress-label">{{ item.title }}</span>
</cds-progress-step>
Expand Down

0 comments on commit 6744845

Please sign in to comment.