From 4f2644dfdb11d4cce22ea2665202879caa90ad33 Mon Sep 17 00:00:00 2001 From: Lera24 Date: Thu, 23 May 2024 10:40:55 +0300 Subject: [PATCH] hotfix: change error code and condition return to previous step[WTEL-4563] --- src/components/auth/login/the-login.vue | 4 +++- src/components/auth/the-auth.vue | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/auth/login/the-login.vue b/src/components/auth/login/the-login.vue index 35689018..ae31c2d3 100644 --- a/src/components/auth/login/the-login.vue +++ b/src/components/auth/login/the-login.vue @@ -137,7 +137,9 @@ export default { watch: { isBackPrevStep: { handler(value) { - if(value && this.activeStep === 3) this.backPrevStep(); + if(value && this.activeStep === 3) + this.backPrevStep(); + this.$emit('change-is-back-prev-step'); } } } diff --git a/src/components/auth/the-auth.vue b/src/components/auth/the-auth.vue index 82c530dd..d3466e82 100644 --- a/src/components/auth/the-auth.vue +++ b/src/components/auth/the-auth.vue @@ -18,6 +18,7 @@ :is-back-prev-step="isBackPrevStepInLogin" @change-tab="currentTab = $event" @submit="authorization(currentTab.value)" + @change-is-back-prev-step="changeIsBackPrevStepInLogin" /> @@ -119,8 +120,11 @@ export default { try { await this.submitAuth(tab) } catch (err) { - if(tab === 'login' && err.code === 400) this.isBackPrevStepInLogin = true; + if(tab === 'login' && err.code === 419) this.isBackPrevStepInLogin = true; } + }, + changeIsBackPrevStepInLogin() { + this.isBackPrevStepInLogin = false; } }, created() {