diff --git a/.storybook/stories/AnimatedSparkles.stories.js b/.storybook/stories/AnimatedSparkles.stories.js new file mode 100644 index 0000000000..3d817cb3cd --- /dev/null +++ b/.storybook/stories/AnimatedSparkles.stories.js @@ -0,0 +1,19 @@ +import AnimatedSparkles from '@/components/Thanks/AnimatedSparkles.vue'; + +export default { + title: 'Components/AnimatedSparkles', + component: AnimatedSparkles, +}; + +const Template = (args, { argTypes }) => ({ + props: Object.keys(argTypes), + components: { AnimatedSparkles }, + template: '
', +}); + +export const Default = Template.bind({}); +Default.args = { + // Define your default args here. For example: + // color: 'blue', + // size: 'large', +}; diff --git a/server/vue-middleware.js b/server/vue-middleware.js index 88366eac31..848ce876a7 100644 --- a/server/vue-middleware.js +++ b/server/vue-middleware.js @@ -56,13 +56,16 @@ module.exports = function createMiddleware({ const userAgent = req.get('user-agent'); const device = userAgent ? Bowser.getParser(userAgent).parse().parsedResult : null; + // Set the first user visit to the web + req.session.firstPage = !req.session?.firstPage ? req.url : req.session.firstPage; + const context = { url: req.url, - config: config.app, + config: { ...config.app, firstPage: req.session?.firstPage }, cookies, user: req.user || {}, locale: req.locale, - device + device, }; // set html response headers diff --git a/src/assets/images/thanks-page/hi-five.svg b/src/assets/images/thanks-page/hi-five.svg new file mode 100644 index 0000000000..bfb37c5822 --- /dev/null +++ b/src/assets/images/thanks-page/hi-five.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/images/thanks-page/paper-plane.svg b/src/assets/images/thanks-page/paper-plane.svg new file mode 100644 index 0000000000..b798181843 --- /dev/null +++ b/src/assets/images/thanks-page/paper-plane.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/components/Forms/GuestAccountCreation.vue b/src/components/Forms/GuestAccountCreation.vue index 4dcedbebd0..77e8561475 100644 --- a/src/components/Forms/GuestAccountCreation.vue +++ b/src/components/Forms/GuestAccountCreation.vue @@ -70,6 +70,14 @@ export default { type: Array, default: () => [], }, + eventCategory: { + type: String, + default: 'post-checkout' + }, + eventLabel: { + type: String, + default: 'create-guest-account' + }, }, data() { return { @@ -83,7 +91,7 @@ export default { this.serverError = false; this.$v.$touch(); if (!this.$v.$invalid) { - this.$kvTrackEvent('post-checkout', 'click', 'create-guest-account'); + this.$kvTrackEvent(this.eventCategory, 'click', this.eventLabel); // will end up redirecting to password reset page. this.apollo.mutate({ diff --git a/src/components/Thanks/AnimatedSparkles.vue b/src/components/Thanks/AnimatedSparkles.vue new file mode 100644 index 0000000000..b8908ce896 --- /dev/null +++ b/src/components/Thanks/AnimatedSparkles.vue @@ -0,0 +1,99 @@ + + + + diff --git a/src/components/Thanks/LoanNextSteps.vue b/src/components/Thanks/LoanNextSteps.vue new file mode 100644 index 0000000000..e92c5592c8 --- /dev/null +++ b/src/components/Thanks/LoanNextSteps.vue @@ -0,0 +1,115 @@ + + + + + diff --git a/src/components/Thanks/WhatIsNextTemplate.vue b/src/components/Thanks/WhatIsNextTemplate.vue new file mode 100644 index 0000000000..158dce9772 --- /dev/null +++ b/src/components/Thanks/WhatIsNextTemplate.vue @@ -0,0 +1,513 @@ + + + + + diff --git a/src/graphql/query/thanksPage.graphql b/src/graphql/query/thanksPage.graphql index c801c46d3c..b07f9ae269 100644 --- a/src/graphql/query/thanksPage.graphql +++ b/src/graphql/query/thanksPage.graphql @@ -74,6 +74,7 @@ query checkoutReceipt($checkoutId: Int!, $visitorId: String) { city country { name + isoCode } } loanAmount @@ -132,6 +133,9 @@ query checkoutReceipt($checkoutId: Int!, $visitorId: String) { loans { totalCount } + communicationSettings { + lenderNews + } } general { shareAskCopy: uiExperimentSetting(key: "share_ask_copy") { @@ -146,6 +150,10 @@ query checkoutReceipt($checkoutId: Int!, $visitorId: String) { key value } + newThanksPageEnabled: featureSetting(key: "new_thanks_page.enabled") { + key + value + } } mySubscriptions(includeDisabled: false) { values { diff --git a/src/pages/Thanks/ThanksPage.vue b/src/pages/Thanks/ThanksPage.vue index eab0ad59b1..09fe3f9104 100644 --- a/src/pages/Thanks/ThanksPage.vue +++ b/src/pages/Thanks/ThanksPage.vue @@ -1,10 +1,21 @@