diff --git a/app/javascript/dashboard/i18n/locale/en/signup.json b/app/javascript/dashboard/i18n/locale/en/signup.json index f6e3143ac..5353cddb5 100644 --- a/app/javascript/dashboard/i18n/locale/en/signup.json +++ b/app/javascript/dashboard/i18n/locale/en/signup.json @@ -41,7 +41,7 @@ "SUBMIT": "Create account", "HAVE_AN_ACCOUNT": "Already have an account?" }, - "ONBOARDING": { + "START_ONBOARDING": { "PROFILE": { "INTRO": "Welcome, let’s get started.", "TITLE": "Set up profile", diff --git a/app/javascript/v3/components/Form/Input.vue b/app/javascript/v3/components/Form/Input.vue index 753157ab0..787b89d8d 100644 --- a/app/javascript/v3/components/Form/Input.vue +++ b/app/javascript/v3/components/Form/Input.vue @@ -28,7 +28,7 @@ 'px-3 py-2 mb-0': spacing === 'compact', 'pl-9': icon, }" - class="block w-full border-none shadow-sm appearance-none rounded-xl outline outline-1 focus:outline-2 text-slate-900 dark:text-slate-100 placeholder:text-slate-400 sm:text-sm sm:leading-6 dark:bg-slate-800" + class="block w-full border-none shadow-sm appearance-none rounded-xl outline outline-1 focus:outline focus:outline-2 text-slate-900 dark:text-slate-100 placeholder:text-slate-400 sm:text-sm sm:leading-6 dark:bg-slate-800" @input="onInput" @blur="$emit('blur')" /> diff --git a/app/javascript/v3/views/auth/signup/Index.vue b/app/javascript/v3/views/auth/signup/Index.vue index 52580f664..2075cec97 100644 --- a/app/javascript/v3/views/auth/signup/Index.vue +++ b/app/javascript/v3/views/auth/signup/Index.vue @@ -19,7 +19,7 @@ @@ -29,10 +29,10 @@ class="flex w-full h-full relative z-50 items-center justify-center overflow-auto" >
diff --git a/app/javascript/v3/views/onboarding/FoundersNote.vue b/app/javascript/v3/views/onboarding/FoundersNote.vue index a56e7d06c..012b4bc05 100644 --- a/app/javascript/v3/views/onboarding/FoundersNote.vue +++ b/app/javascript/v3/views/onboarding/FoundersNote.vue @@ -59,7 +59,7 @@
diff --git a/app/javascript/v3/views/onboarding/InviteTeam.vue b/app/javascript/v3/views/onboarding/InviteTeam.vue index 81830189b..045e0dab5 100644 --- a/app/javascript/v3/views/onboarding/InviteTeam.vue +++ b/app/javascript/v3/views/onboarding/InviteTeam.vue @@ -6,12 +6,12 @@

- {{ $t('ONBOARDING.INVITE_TEAM.TITLE') }} + {{ $t('START_ONBOARDING.INVITE_TEAM.TITLE') }}

- {{ $t('ONBOARDING.INVITE_TEAM.BODY') }} + {{ $t('START_ONBOARDING.INVITE_TEAM.BODY') }}

@@ -21,7 +21,7 @@ name="email" spacing="compact" class="flex-grow" - :placeholder="$t('ONBOARDING.INVITE_TEAM.PLACEHOLDER')" + :placeholder="$t('START_ONBOARDING.INVITE_TEAM.PLACEHOLDER')" @keyup.enter="pushEmail" /> - {{ $t('ONBOARDING.INVITE_TEAM.ADD') }} + {{ $t('START_ONBOARDING.INVITE_TEAM.ADD') }}

- {{ $t('ONBOARDING.INVITE_TEAM.LIST_EMPTY') }} + {{ $t('START_ONBOARDING.INVITE_TEAM.LIST_EMPTY') }}

@@ -80,7 +80,7 @@ is-expanded @click="skipToFoundersNote" > - {{ $t('ONBOARDING.INVITE_TEAM.SKIP') }} + {{ $t('START_ONBOARDING.INVITE_TEAM.SKIP') }}
@@ -114,23 +114,29 @@ export default { this.emailsToInvite = [...new Set(this.emailsToInvite)]; this.emailToAdd = ''; }, - skipToFoundersNote() { + async skipToFoundersNote() { + try { + await AgentAPI.bulkInvite({ emails: [] }); + this.$router.push({ name: 'onboarding_founders_note' }); + } catch (error) { + this.showAlert(this.$t('START_ONBOARDING.INVITE_TEAM.SUBMIT.ERROR')); + } this.$router.push({ name: 'onboarding_founders_note' }); }, async onSubmit() { if (this.emailsToInvite.length === 0) { this.showAlert( - this.$t('ONBOARDING.INVITE_TEAM.SUBMIT.NO_MEMBER_ERROR') + this.$t('START_ONBOARDING.INVITE_TEAM.SUBMIT.NO_MEMBER_ERROR') ); return; } try { await AgentAPI.bulkInvite({ emails: this.emailsToInvite }); - this.showAlert(this.$t('ONBOARDING.INVITE_TEAM.SUBMIT.SUCCESS')); + this.showAlert(this.$t('START_ONBOARDING.INVITE_TEAM.SUBMIT.SUCCESS')); this.$router.push({ name: 'onboarding_founders_note' }); } catch (error) { - this.showAlert(this.$t('ONBOARDING.INVITE_TEAM.SUBMIT.ERROR')); + this.showAlert(this.$t('START_ONBOARDING.INVITE_TEAM.SUBMIT.ERROR')); } }, }, diff --git a/app/javascript/v3/views/onboarding/RouteLayout.vue b/app/javascript/v3/views/onboarding/RouteLayout.vue index 99fcd534e..f543632b7 100644 --- a/app/javascript/v3/views/onboarding/RouteLayout.vue +++ b/app/javascript/v3/views/onboarding/RouteLayout.vue @@ -2,7 +2,9 @@
+
@@ -43,7 +45,7 @@ class="relative w-7/12 py-[88px] flex justify-center overflow-hidden h-fit" >
{ this.showIntroHeader = true; }, 10); }, + accountDetails() { + this.navigateToSavedStep(); + }, }, }, mounted() { this.showIntroHeader = true; + this.showLoading = true; + this.navigateToSavedStep(); }, beforeDestroy() { this.showIntroHeader = false; }, + methods: { + navigateToSavedStep() { + if (!this.accountDetails) return; + const { custom_attributes: { onboarding_step: savedStep } = {} } = + this.accountDetails; + + const stepName = API_ONBOARDING_STEP_ROUTE[savedStep]; + if (stepName !== this.currentStep) { + this.showLoading = false; + this.$router.replace({ name: stepName }); + } + }, + }, };