feat(frontend): Refactor organization, fixed several organization bugs
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user