diff --git a/src/ECER.Clients.RegistryPortal/ecer.clients.registryportal.client/src/components/WorkExperienceReferenceProgressBar.vue b/src/ECER.Clients.RegistryPortal/ecer.clients.registryportal.client/src/components/WorkExperienceReferenceProgressBar.vue
index af583dfe6..b286a62eb 100644
--- a/src/ECER.Clients.RegistryPortal/ecer.clients.registryportal.client/src/components/WorkExperienceReferenceProgressBar.vue
+++ b/src/ECER.Clients.RegistryPortal/ecer.clients.registryportal.client/src/components/WorkExperienceReferenceProgressBar.vue
@@ -37,7 +37,6 @@ export default defineComponent({
},
totalHours(): number {
return this.referenceList.reduce((acc, reference) => {
-
return acc + (reference.hours as number);
}, 0);
},
diff --git a/src/ECER.Clients.RegistryPortal/ecer.clients.registryportal.client/src/components/inputs/EceCertificationTypePreview.vue b/src/ECER.Clients.RegistryPortal/ecer.clients.registryportal.client/src/components/inputs/EceCertificationTypePreview.vue
index 9b16dc2f4..fbeaedd60 100644
--- a/src/ECER.Clients.RegistryPortal/ecer.clients.registryportal.client/src/components/inputs/EceCertificationTypePreview.vue
+++ b/src/ECER.Clients.RegistryPortal/ecer.clients.registryportal.client/src/components/inputs/EceCertificationTypePreview.vue
@@ -6,7 +6,7 @@
@@ -81,6 +81,7 @@
import { defineComponent } from "vue";
import PreviewCard from "@/components/PreviewCard.vue";
+import { useApplicationStore } from "@/store/application";
import { useWizardStore } from "@/store/wizard";
import type { EcePreviewProps } from "@/types/input";
import type { Components } from "@/types/openapi";
@@ -98,9 +99,10 @@ export default defineComponent({
},
setup: () => {
const wizardStore = useWizardStore();
-
+ const applicationStore = useApplicationStore();
return {
wizardStore,
+ applicationStore,
};
},
computed: {
@@ -108,5 +110,11 @@ export default defineComponent({
return this.wizardStore.wizardData[this.wizardStore.wizardConfig.steps.education.form.inputs.educationList.id];
},
},
+ methods: {
+ setWizard(stage: Components.Schemas.PortalStage) {
+ this.wizardStore.setCurrentStep(stage);
+ this.applicationStore.draftApplication.stage = this.wizardStore.currentStepStage;
+ },
+ },
});
diff --git a/src/ECER.Clients.RegistryPortal/ecer.clients.registryportal.client/src/components/inputs/EceWorkExperienceReferencePreview.vue b/src/ECER.Clients.RegistryPortal/ecer.clients.registryportal.client/src/components/inputs/EceWorkExperienceReferencePreview.vue
index b969d151d..2926211e4 100644
--- a/src/ECER.Clients.RegistryPortal/ecer.clients.registryportal.client/src/components/inputs/EceWorkExperienceReferencePreview.vue
+++ b/src/ECER.Clients.RegistryPortal/ecer.clients.registryportal.client/src/components/inputs/EceWorkExperienceReferencePreview.vue
@@ -6,7 +6,7 @@
Work Experience References
-
+
@@ -49,6 +49,7 @@
import { defineComponent } from "vue";
import PreviewCard from "@/components/PreviewCard.vue";
+import { useApplicationStore } from "@/store/application";
import { useWizardStore } from "@/store/wizard";
import type { EcePreviewProps } from "@/types/input";
import type { Components } from "@/types/openapi";
@@ -66,9 +67,11 @@ export default defineComponent({
},
setup: () => {
const wizardStore = useWizardStore();
+ const applicationStore = useApplicationStore();
return {
wizardStore,
+ applicationStore,
};
},
computed: {
@@ -76,5 +79,11 @@ export default defineComponent({
return this.wizardStore.wizardData[this.wizardStore.wizardConfig.steps.workReference.form.inputs.referenceList.id];
},
},
+ methods: {
+ setWizard(stage: Components.Schemas.PortalStage) {
+ this.wizardStore.setCurrentStep(stage);
+ this.applicationStore.draftApplication.stage = this.wizardStore.currentStepStage;
+ },
+ },
});
diff --git a/src/ECER.Clients.RegistryPortal/ecer.clients.registryportal.client/src/components/inputs/EceWorkExperienceReferences.vue b/src/ECER.Clients.RegistryPortal/ecer.clients.registryportal.client/src/components/inputs/EceWorkExperienceReferences.vue
index 2584f70f8..792518c7b 100644
--- a/src/ECER.Clients.RegistryPortal/ecer.clients.registryportal.client/src/components/inputs/EceWorkExperienceReferences.vue
+++ b/src/ECER.Clients.RegistryPortal/ecer.clients.registryportal.client/src/components/inputs/EceWorkExperienceReferences.vue
@@ -216,7 +216,7 @@ export default defineComponent({
lastName: this.lastName,
emailAddress: this.email,
phoneNumber: this.phoneNumber,
- hours: parseInt(this.hours),
+ hours: parseInt(this.hours!.toString()),
};
// see if we already have a clientId (which is edit), if not use the newClientId (which is add)
diff --git a/src/ECER.Clients.RegistryPortal/ecer.clients.registryportal.client/src/store/wizard.ts b/src/ECER.Clients.RegistryPortal/ecer.clients.registryportal.client/src/store/wizard.ts
index c889446f3..e56b9df83 100644
--- a/src/ECER.Clients.RegistryPortal/ecer.clients.registryportal.client/src/store/wizard.ts
+++ b/src/ECER.Clients.RegistryPortal/ecer.clients.registryportal.client/src/store/wizard.ts
@@ -5,7 +5,6 @@ import type { Components } from "@/types/openapi";
import type { Step, Wizard } from "@/types/wizard";
import { useUserStore } from "./user";
-
export interface WizardData {
[key: string]: any;
}
@@ -101,6 +100,10 @@ export const useWizardStore = defineStore("wizard", {
setWizardData(wizardData: WizardData): void {
this.wizardData = { ...this.wizardData, ...wizardData };
},
+ setCurrentStep(stage: Components.Schemas.PortalStage): void {
+ const item = Object.values(this.wizardConfig.steps).findIndex((step) => step.stage === stage) + 1;
+ this.step = item;
+ },
incrementStep(): void {
if (this.step < Object.keys(this.wizardConfig.steps).length) {
this.step += 1;