Skip to content

Commit

Permalink
Bug fixes & UI polish 💅
Browse files Browse the repository at this point in the history
  • Loading branch information
JhumanJ committed Oct 13, 2023
1 parent f0939f3 commit aebe5f5
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 10 deletions.
16 changes: 10 additions & 6 deletions resources/js/components/open/forms/components/FormSubmissions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
class="my-4 w-full mx-auto">
<h3 class="font-semibold mb-4 text-xl">
Form Submissions
<span v-if="form && !isLoading && tableData.length > 0" class="text-right text-xs uppercase mb-2"> - <a
:href="exportUrl" target="_blank">Export as CSV</a></span>
<span v-if="form && !isLoading && formInitDone" class="float-right text-xs uppercase mb-2"> <a
href="javascript:void(0);" @click="showColumnsModal=true">Display columns</a></span>
</h3>

<!-- Table columns modal -->
Expand Down Expand Up @@ -41,8 +37,16 @@

<loader v-if="!form || isLoading" class="h-6 w-6 text-nt-blue mx-auto"/>
<div v-else>
<div class="m-auto w-64">
<text-input :form="searchForm" name="search" placeholder="Search..." />
<div class="flex flex-wrap items-end">
<div class="flex-grow">
<text-input class="w-64" :form="searchForm" name="search" placeholder="Search..." />
</div>
<div class="font-semibold flex gap-4">
<p v-if="form && !isLoading && formInitDone" class="float-right text-xs uppercase mb-2"> <a
href="javascript:void(0);" class="text-gray-500" @click="showColumnsModal=true">Display columns</a></p>
<p v-if="form && !isLoading && tableData.length > 0" class="text-right text-xs uppercase"><a
:href="exportUrl" target="_blank">Export as CSV</a></p>
</div>
</div>

<scroll-shadow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export default {
}
},
emailSubmissionConfirmationField () {
if (!this.form.properties || !Array.isArray(this.form.properties)) return null
const emailFields = this.form.properties.filter((field) => {
return field.type === 'email' && !field.hidden
})
Expand Down
8 changes: 5 additions & 3 deletions resources/js/components/pages/forms/show/UrlFormPrefill.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div>
<div class="flex">
<v-button
class="w-full"
color="light-gray"
Expand Down Expand Up @@ -27,7 +27,7 @@
<span>Url Form Prefill</span>
</template>

<div class="p-4">
<div class="p-4" ref="content">
<p>
Create dynamic links when sharing your form (whether it's embedded or not), that allows you to prefill
your form fields. You can use this to personalize the form when sending it to multiple contacts for instance.
Expand Down Expand Up @@ -89,7 +89,9 @@ export default {
generateUrl (formData, onFailure) {
this.prefillFormData = formData
this.$nextTick().then(() => {
this.$refs.content.parentElement.parentElement.parentElement.scrollTop = (this.$refs.content.offsetHeight - this.$refs.content.parentElement.parentElement.parentElement.offsetHeight + 50)
if (this.$refs.content) {
this.$refs.content.parentElement.parentElement.parentElement.scrollTop = this.$refs.content.offsetHeight
}
})
}
}
Expand Down
6 changes: 5 additions & 1 deletion resources/js/middleware/check-auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ import * as Sentry from '@sentry/vue'
export function initCrisp (user) {
return new Promise((resolve, reject) => {
const intervalId = window.setInterval(function () {
if (!user) {
resolve()
return
}
if (window.$crisp) {
window.$crisp.push(['set', 'user:email', user.email])
window.$crisp.push(['set', 'user:nickname', user.name])
Expand All @@ -19,7 +23,7 @@ export function initCrisp (user) {
}

export function initSentry (user) {
if (!window.config.sentry_dsn) {
if (!window.config.sentry_dsn || !user) {
return
}
Sentry.configureScope((scope) => {
Expand Down

0 comments on commit aebe5f5

Please sign in to comment.