{
return option.name
}).join('\n')
diff --git a/client/components/open/tables/OpenTable.vue b/client/components/open/tables/OpenTable.vue
index 5c086e6..be0c023 100644
--- a/client/components/open/tables/OpenTable.vue
+++ b/client/components/open/tables/OpenTable.vue
@@ -53,8 +53,8 @@
- $emit('deleted',submission)"
+ $emit('deleted',submission)"
@updated="(submission)=>$emit('updated', submission)"/>
|
@@ -91,7 +91,7 @@ import {hash} from "~/lib/utils.js";
export default {
components: {ResizableTh, RecordOperations},
- emits: ["updated", "deleted"],
+ emits: ["updated", "deleted", "resize"],
props: {
columns: {
type: Array,
diff --git a/client/components/pages/forms/create/CreateFormBaseModal.vue b/client/components/pages/forms/create/CreateFormBaseModal.vue
index 66478db..861d5ba 100644
--- a/client/components/pages/forms/create/CreateFormBaseModal.vue
+++ b/client/components/pages/forms/create/CreateFormBaseModal.vue
@@ -145,7 +145,9 @@ export default {
this.fetchGeneratedForm(generationId)
}
}).catch(error => {
- this.useAlert.error(error.data.message)
+ if (error?.data?.message){
+ this.useAlert.error(error.data.message)
+ }
this.state = 'default'
this.loading = false
})
diff --git a/client/composables/useCrisp.js b/client/composables/useCrisp.js
index 90244e4..4efe800 100644
--- a/client/composables/useCrisp.js
+++ b/client/composables/useCrisp.js
@@ -25,7 +25,6 @@ export const useCrisp = () => {
function openAndShowChat(message = null) {
if (!crisp) return
- showChat()
openChat()
if (message) sendTextMessage(message)
}
diff --git a/client/lib/forms/FormLogicConditionChecker.js b/client/lib/forms/FormLogicConditionChecker.js
index bfce0fc..c32eddc 100644
--- a/client/lib/forms/FormLogicConditionChecker.js
+++ b/client/lib/forms/FormLogicConditionChecker.js
@@ -65,7 +65,7 @@ function checkContains (condition, fieldValue) {
function checkListContains (condition, fieldValue) {
if (!fieldValue) return false
-
+
if (Array.isArray(condition.value)) {
return condition.value.every(r => fieldValue.includes(r))
} else {
@@ -74,11 +74,11 @@ function checkListContains (condition, fieldValue) {
}
function checkStartsWith (condition, fieldValue) {
- return fieldValue.startsWith(condition.value)
+ return fieldValue?.startsWith(condition.value)
}
function checkendsWith (condition, fieldValue) {
- return fieldValue && fieldValue.endsWith(condition.value)
+ return fieldValue?.endsWith(condition.value)
}
function checkIsEmpty (condition, fieldValue) {
diff --git a/client/package-lock.json b/client/package-lock.json
index b61c222..27421e3 100644
--- a/client/package-lock.json
+++ b/client/package-lock.json
@@ -28,6 +28,7 @@
"fuse.js": "^6.4.6",
"js-sha256": "^0.10.0",
"libphonenumber-js": "^1.10.44",
+ "lodash.throttle": "^4.1.1",
"nuxt3-notifications": "^1.1.9",
"object-to-formdata": "^4.5.1",
"pinia": "^2.1.7",
@@ -8517,6 +8518,11 @@
"lodash._reinterpolate": "^3.0.0"
}
},
+ "node_modules/lodash.throttle": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz",
+ "integrity": "sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ=="
+ },
"node_modules/lodash.uniq": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz",
diff --git a/client/package.json b/client/package.json
index 4340ba1..d44fab6 100644
--- a/client/package.json
+++ b/client/package.json
@@ -43,6 +43,7 @@
"fuse.js": "^6.4.6",
"js-sha256": "^0.10.0",
"libphonenumber-js": "^1.10.44",
+ "lodash.throttle": "^4.1.1",
"nuxt3-notifications": "^1.1.9",
"object-to-formdata": "^4.5.1",
"pinia": "^2.1.7",
diff --git a/client/pages/forms/[slug]/edit.vue b/client/pages/forms/[slug]/edit.vue
index 1f69865..4559a15 100644
--- a/client/pages/forms/[slug]/edit.vue
+++ b/client/pages/forms/[slug]/edit.vue
@@ -33,7 +33,9 @@ const error = ref(null)
const formInitialHash = ref(null)
function isDirty() {
- return formInitialHash.value && updatedForm.value && formInitialHash.value !== hash(JSON.stringify(updatedForm.value.data() ?? null))
+ return formInitialHash.value &&
+ updatedForm.value &&
+ formInitialHash.value !== hash(JSON.stringify(updatedForm?.value?.data() ?? null))
}
function initUpdatedForm() {
diff --git a/client/pages/settings.vue b/client/pages/settings.vue
index 9badc12..9bf166c 100644
--- a/client/pages/settings.vue
+++ b/client/pages/settings.vue
@@ -71,14 +71,14 @@
}
]
- if (user.value.is_subscribed) {
+ if (user?.value?.is_subscribed) {
tabs.splice(1, 0, {
name: 'Billing',
route: 'settings-billing'
})
}
- if (user.value.admin) {
+ if (user?.value?.admin) {
tabs.push({
name: 'Admin',
route: 'settings-admin'
diff --git a/client/plugins/sentry.js b/client/plugins/sentry.js
index 1542c5c..25ae3ac 100644
--- a/client/plugins/sentry.js
+++ b/client/plugins/sentry.js
@@ -1,16 +1,5 @@
import * as Sentry from "@sentry/vue";
-async function lazyLoadSentryIntegrations() {
- // don't load on server
- if (!process.client) return;
-
- const {Replay} = await import("@sentry/vue");
- Sentry.addIntegration(new Replay({
- maskAllText: false,
- blockAllMedia: false,
- }));
-}
-
function getSentryIntegrations() {
// don't load on server
if (!process.client) return [];
@@ -65,8 +54,5 @@ export default defineNuxtPlugin({
return event;
},
})
-
- // Lazy-load the replay integration to reduce bundle size
- lazyLoadSentryIntegrations()
}
});
diff --git a/client/stores/auth.js b/client/stores/auth.js
index 75c79e4..7e16b76 100644
--- a/client/stores/auth.js
+++ b/client/stores/auth.js
@@ -1,4 +1,5 @@
import {defineStore} from 'pinia'
+import {setUser as sentrySetUser} from "@sentry/vue";
export const useAuthStore = defineStore('auth', {
state: () => {
@@ -65,18 +66,16 @@ export const useAuthStore = defineStore('auth', {
useCrisp().setUser(this.user)
// Init sentry
- // console.log(process)
- // $sentry.configureScope((scope) => {
- // scope.setUser({
- // id: this.user.id,
- // email: this.user.email,
- // subscription: this.user?.is_subscribed
- // })
- // })
+ sentrySetUser({
+ id: this.user.id,
+ email: this.user.email,
+ subscription: this.user?.is_subscribed
+ })
},
logout() {
- opnFetch('logout', {method: 'POST'}).catch((error) => {})
+ opnFetch('logout', {method: 'POST'}).catch((error) => {
+ })
this.user = null
this.setToken(null)
diff --git a/client/stores/working_form.js b/client/stores/working_form.js
index 2a71eb0..94aab8f 100644
--- a/client/stores/working_form.js
+++ b/client/stores/working_form.js
@@ -1,7 +1,5 @@
import { defineStore } from 'pinia'
-
-
export const useWorkingFormStore = defineStore('working_form', {
state: () => ({
content: null,