Fixed most of the form/show pages

This commit is contained in:
Julien Nahum
2023-12-20 18:38:43 +01:00
parent af5656ce81
commit bab8517879
19 changed files with 317 additions and 335 deletions

View File

@@ -162,7 +162,7 @@ export default {
helpUrl: () => this.config.links.help_url,
form () {
if (this.$route.name && this.$route.name.startsWith('forms.show_public')) {
return this.formsStore.getBySlug(this.$route.params.slug)
return this.formsStore.getByKey(this.$route.params.slug)
}
return null
},

View File

@@ -80,13 +80,13 @@ export default {
switchWorkspace (workspace) {
this.workspacesStore.setCurrentId(workspace.id)
this.formsStore.resetState()
this.formsStore.load(workspace.id)
this.formsStore.loadAll(workspace.id)
const router = useRouter()
const route = useRoute()
if (route.name !== 'home') {
router.push({ name: 'home' })
}
this.formsStore.load(workspace.id)
this.formsStore.loadAll(workspace.id)
},
isUrl (str) {
try {