From 1b1cf36839e04a8a3ddefe040cec3d2795c4104c Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Thu, 25 Sep 2025 10:30:02 +0300 Subject: [PATCH] fix verification step --- .../submission_form/verification_step.vue | 29 +++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/app/javascript/submission_form/verification_step.vue b/app/javascript/submission_form/verification_step.vue index 39da2419..1f711c5e 100644 --- a/app/javascript/submission_form/verification_step.vue +++ b/app/javascript/submission_form/verification_step.vue @@ -14,7 +14,7 @@
{{ t('complete_all_required_fields_to_proceed_with_identity_verification') }} @@ -100,6 +100,9 @@ export default { } }, computed: { + isRequiredFieldEmpty () { + return this.emptyValueRequiredStep && this.emptyValueRequiredStep[0] !== this.field + }, countryCode () { const browserTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone const browserTz = browserTimeZone.split('/')[1] @@ -131,17 +134,19 @@ export default { } }, async mounted () { - this.isLoading = true + if (!this.isRequiredFieldEmpty) { + this.isLoading = true - if (new URLSearchParams(window.location.search).get('submit') === 'true') { - this.$emit('submit') - } else { - Promise.all([ - import('@eid-easy/eideasy-widget'), - this.start() - ]).finally(() => { - this.isLoading = false - }) + if (new URLSearchParams(window.location.search).get('submit') === 'true') { + this.$emit('submit') + } else { + Promise.all([ + import('@eid-easy/eideasy-widget'), + this.start() + ]).finally(() => { + this.isLoading = false + }) + } } }, methods: { @@ -170,7 +175,7 @@ export default { redirectUrl.searchParams.append('lang', this.locale) this.redirectUrl = redirectUrl.toString() - } else { + } else if (this.$refs.widgetContainer) { const eidEasyWidget = document.createElement('eideasy-widget') for (const key in this.widgetSettings) {