Skip to content

Commit

Permalink
Apply changes
Browse files Browse the repository at this point in the history
  • Loading branch information
madassdev committed Oct 2, 2024
1 parent 71513d3 commit 8431ad4
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions client/components/open/forms/components/FirstSubmissionModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,23 @@
</div>

<div class="flex gap-2 items-center max-w-full">
<p class="text-sm w-48 text-gray-500">
Share form URL:
</p>
<ShareFormUrl
class="flex-grow my-4"
:form="form"
/>
</div>
<div class="flex py-2 items-center max-w-full">
<p class="text-sm w-48 text-gray-500">
Check your submissions:
</p>
<UButton
v-track.form_first_submission_modal_open_db_click
color="white"
icon="i-heroicons-document"
:to="{ name: 'forms-slug-show-submissions',
params: { slug: form.slug }
}"
target="_blank"
@click="trackOpenDbClick"
>
See Submissions
</UButton>
Expand Down Expand Up @@ -72,6 +77,7 @@ const props = defineProps({
const emit = defineEmits(['close'])
const confetti = useConfetti()
const crisp = useCrisp()
const amplitude = useAmplitude()
watch(() => props.show, () => {
if (props.show) {
confetti.play()
Expand All @@ -97,4 +103,11 @@ const helpLinks = computed(() => {
},
]
})
const trackOpenDbClick = () => {
const submissionsUrl = `/forms/${props.form.slug}/submissions`
window.open(submissionsUrl, '_blank')
amplitude.logEvent('form_first_submission_modal_open_db_click')
}
</script>

0 comments on commit 8431ad4

Please sign in to comment.