From babccf8a360d4c7a3688b5059d7dd2ff54ece73b Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 21 Apr 2022 16:46:31 -0500 Subject: [PATCH] License dispenser query strings (#5321) Co-authored-by: Tim Kern --- website/api/controllers/customers/view-new-license.js | 2 +- website/assets/js/pages/customers/new-license.page.js | 2 +- website/assets/js/pages/entrance/login.page.js | 2 +- website/assets/js/pages/entrance/signup.page.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/website/api/controllers/customers/view-new-license.js b/website/api/controllers/customers/view-new-license.js index 52753171bd..2a42d0193e 100644 --- a/website/api/controllers/customers/view-new-license.js +++ b/website/api/controllers/customers/view-new-license.js @@ -31,7 +31,7 @@ module.exports = { // If the user has a license key, we'll redirect them to the customer dashboard. let userHasExistingSubscription = await Subscription.findOne({user: this.req.me.id}); if (userHasExistingSubscription) { - throw {redirect: '/customers/dashboard'}; + throw {redirect: '/customers/dashboard?login'}; } // Respond with view. diff --git a/website/assets/js/pages/customers/new-license.page.js b/website/assets/js/pages/customers/new-license.page.js index 53aa0c9929..9ee937c9cc 100644 --- a/website/assets/js/pages/customers/new-license.page.js +++ b/website/assets/js/pages/customers/new-license.page.js @@ -58,7 +58,7 @@ parasails.registerPage('new-license', { clickGoToDashboard: async function() { this.syncing = true; - window.location = '/customers/dashboard'; + window.location = '/customers/dashboard?order-complete'; }, submittedQuoteForm: async function(quote) { diff --git a/website/assets/js/pages/entrance/login.page.js b/website/assets/js/pages/entrance/login.page.js index 7b6c9433ca..a04bc8827e 100644 --- a/website/assets/js/pages/entrance/login.page.js +++ b/website/assets/js/pages/entrance/login.page.js @@ -46,7 +46,7 @@ parasails.registerPage('login', { // > (Note that we re-enable the syncing state here. This is on purpose-- // > to make sure the spinner stays there until the page navigation finishes.) this.syncing = true; - window.location = '/customers/new-license'; + window.location = '/customers/new-license?login'; }, } diff --git a/website/assets/js/pages/entrance/signup.page.js b/website/assets/js/pages/entrance/signup.page.js index 79979da3dd..2c042f46ef 100644 --- a/website/assets/js/pages/entrance/signup.page.js +++ b/website/assets/js/pages/entrance/signup.page.js @@ -61,7 +61,7 @@ parasails.registerPage('signup', { // > (Note that we re-enable the syncing state here. This is on purpose-- // > to make sure the spinner stays there until the page navigation finishes.) this.syncing = true; - window.location = '/customers/new-license'; + window.location = '/customers/new-license?signup'; }