feat(frontend): Refactor organization, fixed several organization bugs

This commit is contained in:
2025-08-17 09:28:26 +02:00
parent b7b6d02cf2
commit 6090d543c1
14 changed files with 279 additions and 221 deletions

View File

@@ -34,13 +34,11 @@
<script setup lang="ts">
import * as z from 'zod'
import { useBetterAuth } from '~/composables/useBetterAuth'
const emit = defineEmits<{
(e: 'organizationCreated', id: string | undefined): void
}>()
const { createOrganization } = useBetterAuth()
const { createOrganization } = useOrganizationStore()
const open = ref(false)
const loading = ref(false)
const isSlugEdited = ref(false)

View File

@@ -51,7 +51,7 @@
<script setup lang="ts">
import type { CommentDto, FormElementDto, FormOptionDto } from '~/.api-client'
import { useComment } from '~/composables/comment/useComment'
import { useCommentTextarea } from '~/composables/comment/useCommentTextarea'
import { resolveComponent } from 'vue'
const props = defineProps<{
@@ -69,7 +69,7 @@ const commentStore = useCommentStore()
const { load: loadComments } = commentStore
const { comments } = storeToRefs(commentStore)
const commentActions = useComment(props.applicationFormId)
const commentActions = useCommentTextarea(props.applicationFormId)
const {
submitComment,
updateEditComment,

View File

@@ -44,7 +44,7 @@
import { ROLES, type LegalRole } from '~/server/utils/permissions'
const { canInviteMembers } = usePermissions()
const { inviteMember } = useBetterAuth()
const { inviteMember } = useOrganizationStore()
const open = ref(false)
const loading = ref(false)
@@ -114,7 +114,6 @@ async function handleSubmit() {
try {
await inviteMember(form.value.email, form.value.role)
open.value = false
useToast().add({ title: 'Einladung gesendet', color: 'success' })
} finally {
loading.value = false
}