From cea740ceb75f06e646e64376547e738c69582522 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Fri, 15 Dec 2023 15:20:48 +0530 Subject: [PATCH] feat: new onboarding URL --- app/javascript/dashboard/constants/globals.js | 1 + .../v3/views/auth/signup/components/Signup/Form.vue | 4 ++-- app/javascript/v3/views/routes.js | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/javascript/dashboard/constants/globals.js b/app/javascript/dashboard/constants/globals.js index d0e00dbe7..8d9c8d9f4 100644 --- a/app/javascript/dashboard/constants/globals.js +++ b/app/javascript/dashboard/constants/globals.js @@ -44,3 +44,4 @@ export default { EXAMPLE_WEBHOOK_URL: 'https://example/api/webhook', }; export const DEFAULT_REDIRECT_URL = '/app/'; +export const ONBOARDING_START_URL = '/app/start/setup-profile'; diff --git a/app/javascript/v3/views/auth/signup/components/Signup/Form.vue b/app/javascript/v3/views/auth/signup/components/Signup/Form.vue index f2c1c3e95..9496edfc2 100644 --- a/app/javascript/v3/views/auth/signup/components/Signup/Form.vue +++ b/app/javascript/v3/views/auth/signup/components/Signup/Form.vue @@ -61,7 +61,7 @@ import { required, minLength, email } from 'vuelidate/lib/validators'; import { mapGetters } from 'vuex'; import globalConfigMixin from 'shared/mixins/globalConfigMixin'; import alertMixin from 'shared/mixins/alertMixin'; -import { DEFAULT_REDIRECT_URL } from 'dashboard/constants/globals'; +import { ONBOARDING_START_URL } from 'dashboard/constants/globals'; import VueHcaptcha from '@hcaptcha/vue-hcaptcha'; import FormInput from '../../../../../components/Form/Input.vue'; import SubmitButton from '../../../../../components/Button/SubmitButton.vue'; @@ -149,7 +149,7 @@ export default { this.isSignupInProgress = true; try { await register(this.credentials); - window.location = DEFAULT_REDIRECT_URL; + window.location = ONBOARDING_START_URL; } catch (error) { let errorMessage = error?.message || this.$t('REGISTER.API.ERROR_MESSAGE'); diff --git a/app/javascript/v3/views/routes.js b/app/javascript/v3/views/routes.js index d73db1c62..e0c2338f5 100644 --- a/app/javascript/v3/views/routes.js +++ b/app/javascript/v3/views/routes.js @@ -57,17 +57,17 @@ export default [ component: ResetPassword, }, { - path: frontendURL('auth/start/setup-profile'), + path: frontendURL('start/setup-profile'), name: 'onboarding_setup_profile', component: SetupProfile, }, { - path: frontendURL('auth/start/setup-company'), + path: frontendURL('start/setup-company'), name: 'onboarding_setup_company', component: SetupCompany, }, { - path: frontendURL('auth/start/founders-note'), + path: frontendURL('start/founders-note'), name: 'onboarding_founders_note', component: FounderNote, },