diff --git a/webapp/src/components/modalComponents/calibrationWizardComponents/csmSteps/runCsmStep.vue b/webapp/src/components/modalComponents/calibrationWizardComponents/csmSteps/runCsmStep.vue index 50f5a93a..d73eb7a1 100644 --- a/webapp/src/components/modalComponents/calibrationWizardComponents/csmSteps/runCsmStep.vue +++ b/webapp/src/components/modalComponents/calibrationWizardComponents/csmSteps/runCsmStep.vue @@ -17,7 +17,7 @@ @update:task-status="taskStatus = $event" @update:log="log = $event" @task-started="$emit('prevent-navigation', true)" - @finished="$emit('prevent-navigation', false)" + @finished="csmFinished" /> @@ -52,10 +52,26 @@ export default { }, methods: { + /** + * Check is camera stage mapping is calibrated and emit the result to awaiting-user. + * + * "awaiting-user" is used to signal that the user should perform an action before + * continuing. In practice it changes the next button to "skip". + */ async checkCalibrationState() { const needsCal = await this.readThingProperty("camera_stage_mapping", "calibration_required"); this.$emit("awaiting-user", needsCal); }, + /** + * Tuns whenever CSM finishes re-enable navigation and check calibration state. + * + * This happens if the action is cancelled, errors, or completes successfully as it + * is triggered by `finished`. + */ + async csmFinished() { + this.$emit("prevent-navigation", false); + await this.checkCalibrationState(); + }, }, };