596312ab0e
* ProjectsAdd wrapper * WorkspaceMoveProject wrapper added * move wrapper finalized * passing through location * more cleanup * model add wrapper * permissions cleanup * add invite wrapper * vue-tippy bugfix * ViewerLimitsDialog prep * upgrade limit alert prep * limit alerts * movemanager fix * new add flow * slug update fix * add model flow * invites? * some extra fixes * move unmount fix? * more fixes * vue-tsc update * style: remove h-32 for smaller screens * vue-tsc parser fix * prep for new viewer limits dialog * updated viewer dialogs * comment variant cleanup * CR comments --------- Co-authored-by: michalspeckle <michal@speckle.systems>
50 lines
1.4 KiB
Vue
50 lines
1.4 KiB
Vue
<template>
|
|
<div>
|
|
<template v-if="project">
|
|
<InviteDialogProject v-model:open="openDefault" :project="project" />
|
|
<WorkspaceMoveProject
|
|
v-model:open="openPersonalProjectsLimited"
|
|
:project="project"
|
|
location="invite_add"
|
|
show-intro
|
|
@done="open = false"
|
|
/>
|
|
</template>
|
|
</div>
|
|
</template>
|
|
<script setup lang="ts">
|
|
import { PersonalProjectsLimitedError } from '@speckle/shared/authz'
|
|
import { useMultipleDialogBranching } from '~/lib/common/composables/dialog'
|
|
import { graphql } from '~/lib/common/generated/gql'
|
|
import type { ProjectInviteAdd_ProjectFragment } from '~/lib/common/generated/gql/graphql'
|
|
import { useCanInviteToProject } from '~/lib/projects/composables/permissions'
|
|
|
|
graphql(`
|
|
fragment ProjectInviteAdd_Project on Project {
|
|
id
|
|
...InviteDialogProject_Project
|
|
...UseCanInviteToProject_Project
|
|
...WorkspaceMoveProject_Project
|
|
}
|
|
`)
|
|
|
|
const props = defineProps<{
|
|
project: ProjectInviteAdd_ProjectFragment
|
|
}>()
|
|
const open = defineModel<boolean>('open', { required: true })
|
|
const canInviteToProject = useCanInviteToProject({
|
|
project: computed(() => props.project)
|
|
})
|
|
|
|
const { openDefault, openPersonalProjectsLimited } = useMultipleDialogBranching({
|
|
open,
|
|
conditions: {
|
|
personalProjectsLimited: computed(
|
|
() =>
|
|
canInviteToProject.cantClickInviteCode.value ===
|
|
PersonalProjectsLimitedError.code
|
|
)
|
|
}
|
|
})
|
|
</script>
|