mirror of
https://github.com/fleetdm/fleet
synced 2026-05-16 13:38:43 +00:00
Closes: #17958 Changes: - Updated the primary and secondary CTAs site-wide - Updated the /start page to have a multi-stage form that users can fill out to personalize their onboarding experience - Updated the signup action to not set a `primaryBuyingSituation` on new user records (This will now be set when users progress through the /start form) - Added two new attributes to the `User` model: `currentGetStartedQuestionnarieStep` and `getStartedQuestionnarieAnswers` that save user's progress in the /start form. Before this PR can be merged we will need to: - [x] Update the Zapier webhook that runs when new users sign up to no longer expect a `primaryBuyingSituation` value - [ ] Update the User table in the website's database - [ ] Migrate the existing user records
33 lines
638 B
JavaScript
Vendored
33 lines
638 B
JavaScript
Vendored
module.exports = {
|
|
|
|
|
|
friendlyName: 'View start',
|
|
|
|
|
|
description: 'Display "Start" page.',
|
|
|
|
|
|
exits: {
|
|
|
|
success: {
|
|
viewTemplatePath: 'pages/start'
|
|
}
|
|
|
|
},
|
|
|
|
|
|
fn: async function () {
|
|
if(this.req.me.lastSubmittedGetStartedQuestionnaireStep && !_.isEmpty(this.req.me.getStartedQuestionnaireAnswers)){
|
|
let currentStep = this.req.me.lastSubmittedGetStartedQuestionnaireStep;
|
|
let previouslyAnsweredQuestions = this.req.me.getStartedQuestionnaireAnswers;
|
|
// Respond with view.
|
|
return {currentStep, previouslyAnsweredQuestions};
|
|
} else {
|
|
// Respond with view.
|
|
return;
|
|
}
|
|
|
|
}
|
|
|
|
|
|
};
|