2024-03-14 15:28:23 +00:00
|
|
|
module.exports = {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
friendlyName: 'View start',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
description: 'Display "Start" page.',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
exits: {
|
|
|
|
|
|
|
|
|
|
success: {
|
|
|
|
|
viewTemplatePath: 'pages/start'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fn: async function () {
|
2024-04-04 16:13:53 +00:00
|
|
|
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;
|
|
|
|
|
}
|
2024-03-14 15:28:23 +00:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
};
|