From 28cca99f8da7da81b24b0b233cac50345d24eaaa Mon Sep 17 00:00:00 2001 From: Casey Dyer Date: Wed, 10 Jan 2024 16:07:06 -0800 Subject: [PATCH] feat: add link back to team challenge page --- .storybook/stories/NotifyMe.stories.js | 34 ++++++++++++++++++++++++++ src/components/Thanks/NotifyMe.vue | 19 +++++++++++--- src/graphql/query/thanksPage.graphql | 2 +- src/pages/Thanks/ThanksPage.vue | 5 +++- 4 files changed, 54 insertions(+), 6 deletions(-) create mode 100644 .storybook/stories/NotifyMe.stories.js diff --git a/.storybook/stories/NotifyMe.stories.js b/.storybook/stories/NotifyMe.stories.js new file mode 100644 index 0000000000..a6217695a9 --- /dev/null +++ b/.storybook/stories/NotifyMe.stories.js @@ -0,0 +1,34 @@ +import NotifyMe from '@/components/Thanks/NotifyMe'; + +export default { + title: 'Components/Notify Me', + component: NotifyMe, +}; + +const story = (args = {}) => { + const template = (_args, { argTypes }) => ({ + props: Object.keys(argTypes), + components: { NotifyMe }, + template: '', + }) + template.args = args; + return template; +}; + +const future = new Date(); +future.setDate(future.getDate() + 2); + +const goal = { + endDate: future.toISOString(), + targets: { + totalCount: 2, + values: [ + { status: 'COMPLETE' }, + { status: 'IN_PROGRESS' }, + ] + } +} + +export const Default = story({ goal }); + +export const Team = story({ goal, teamPublicId: 'aplus' }); diff --git a/src/components/Thanks/NotifyMe.vue b/src/components/Thanks/NotifyMe.vue index b659678030..47de293838 100644 --- a/src/components/Thanks/NotifyMe.vue +++ b/src/components/Thanks/NotifyMe.vue @@ -27,7 +27,12 @@