WIP Business
This commit is contained in:
@@ -16,7 +16,10 @@
|
||||
can still create workspaces.
|
||||
</p>
|
||||
</div>
|
||||
<div v-tippy="!isWorkspaceAdmin ? 'You must be a workspace admin' : undefined">
|
||||
<div
|
||||
v-if="props.workspace?.permissions?.canMakeWorkspaceExclusive.authorized"
|
||||
v-tippy="!isWorkspaceAdmin ? 'You must be a workspace admin' : undefined"
|
||||
>
|
||||
<FormSwitch
|
||||
v-model="isExclusive"
|
||||
name="workspace-exclusive"
|
||||
@@ -24,6 +27,14 @@
|
||||
:show-label="false"
|
||||
/>
|
||||
</div>
|
||||
<FormButton
|
||||
v-else
|
||||
:to="settingsWorkspaceRoutes.billing.route(workspace.slug)"
|
||||
size="sm"
|
||||
color="outline"
|
||||
>
|
||||
Upgrade to Business
|
||||
</FormButton>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -36,6 +47,7 @@ import { graphql } from '~/lib/common/generated/gql'
|
||||
import type { SettingsWorkspacesSecurityWorkspaceCreation_WorkspaceFragment } from '~/lib/common/generated/gql/graphql'
|
||||
import { useMixpanel } from '~/lib/core/composables/mp'
|
||||
import { workspaceUpdateExclusiveMutation } from '~/lib/workspaces/graphql/mutations'
|
||||
import { settingsWorkspaceRoutes } from '~/lib/common/helpers/route'
|
||||
|
||||
graphql(`
|
||||
fragment SettingsWorkspacesSecurityWorkspaceCreation_Workspace on Workspace {
|
||||
@@ -43,6 +55,11 @@ graphql(`
|
||||
slug
|
||||
role
|
||||
isExclusive
|
||||
permissions {
|
||||
canMakeWorkspaceExclusive {
|
||||
authorized
|
||||
}
|
||||
}
|
||||
}
|
||||
`)
|
||||
|
||||
@@ -84,8 +101,7 @@ const isExclusive = computed({
|
||||
} else {
|
||||
triggerNotification({
|
||||
type: ToastNotificationType.Danger,
|
||||
title: 'Failed to update workspace creation restriction',
|
||||
description: 'Please try again later'
|
||||
title: 'Failed to update workspace creation restriction'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ type Documents = {
|
||||
"\n fragment SettingsWorkspacesSecurityDomainProtection_Workspace on Workspace {\n id\n slug\n role\n domainBasedMembershipProtectionEnabled\n hasAccessToDomainBasedSecurityPolicies: hasAccessToFeature(\n featureName: domainBasedSecurityPolicies\n )\n domains {\n id\n }\n }\n": typeof types.SettingsWorkspacesSecurityDomainProtection_WorkspaceFragmentDoc,
|
||||
"\n fragment SettingsWorkspacesSecurityDomainRemoveDialog_WorkspaceDomain on WorkspaceDomain {\n id\n domain\n }\n": typeof types.SettingsWorkspacesSecurityDomainRemoveDialog_WorkspaceDomainFragmentDoc,
|
||||
"\n fragment SettingsWorkspacesSecurityDomainRemoveDialog_Workspace on Workspace {\n id\n domains {\n ...SettingsWorkspacesSecurityDomainRemoveDialog_WorkspaceDomain\n }\n }\n": typeof types.SettingsWorkspacesSecurityDomainRemoveDialog_WorkspaceFragmentDoc,
|
||||
"\n fragment SettingsWorkspacesSecurityWorkspaceCreation_Workspace on Workspace {\n id\n slug\n role\n isExclusive\n }\n": typeof types.SettingsWorkspacesSecurityWorkspaceCreation_WorkspaceFragmentDoc,
|
||||
"\n fragment SettingsWorkspacesSecurityWorkspaceCreation_Workspace on Workspace {\n id\n slug\n role\n isExclusive\n permissions {\n canMakeWorkspaceExclusive {\n authorized\n }\n }\n }\n": typeof types.SettingsWorkspacesSecurityWorkspaceCreation_WorkspaceFragmentDoc,
|
||||
"\n fragment SettingsWorkspacesSecuritySsoWrapper_Workspace on Workspace {\n id\n role\n slug\n sso {\n provider {\n id\n name\n clientId\n issuerUrl\n }\n }\n hasAccessToSSO: hasAccessToFeature(featureName: oidcSso)\n }\n": typeof types.SettingsWorkspacesSecuritySsoWrapper_WorkspaceFragmentDoc,
|
||||
"\n fragment ModelPageProject on Project {\n id\n createdAt\n name\n visibility\n workspace {\n id\n slug\n name\n role\n }\n embedOptions {\n hideSpeckleBranding\n }\n hasAccessToFeature(featureName: hideSpeckleBranding)\n ...ViewerLimitsDialog_Project\n }\n": typeof types.ModelPageProjectFragmentDoc,
|
||||
"\n fragment ViewerCommentThreadData on Comment {\n id\n permissions {\n canArchive {\n ...FullPermissionCheckResult\n }\n }\n }\n": typeof types.ViewerCommentThreadDataFragmentDoc,
|
||||
@@ -594,7 +594,7 @@ const documents: Documents = {
|
||||
"\n fragment SettingsWorkspacesSecurityDomainProtection_Workspace on Workspace {\n id\n slug\n role\n domainBasedMembershipProtectionEnabled\n hasAccessToDomainBasedSecurityPolicies: hasAccessToFeature(\n featureName: domainBasedSecurityPolicies\n )\n domains {\n id\n }\n }\n": types.SettingsWorkspacesSecurityDomainProtection_WorkspaceFragmentDoc,
|
||||
"\n fragment SettingsWorkspacesSecurityDomainRemoveDialog_WorkspaceDomain on WorkspaceDomain {\n id\n domain\n }\n": types.SettingsWorkspacesSecurityDomainRemoveDialog_WorkspaceDomainFragmentDoc,
|
||||
"\n fragment SettingsWorkspacesSecurityDomainRemoveDialog_Workspace on Workspace {\n id\n domains {\n ...SettingsWorkspacesSecurityDomainRemoveDialog_WorkspaceDomain\n }\n }\n": types.SettingsWorkspacesSecurityDomainRemoveDialog_WorkspaceFragmentDoc,
|
||||
"\n fragment SettingsWorkspacesSecurityWorkspaceCreation_Workspace on Workspace {\n id\n slug\n role\n isExclusive\n }\n": types.SettingsWorkspacesSecurityWorkspaceCreation_WorkspaceFragmentDoc,
|
||||
"\n fragment SettingsWorkspacesSecurityWorkspaceCreation_Workspace on Workspace {\n id\n slug\n role\n isExclusive\n permissions {\n canMakeWorkspaceExclusive {\n authorized\n }\n }\n }\n": types.SettingsWorkspacesSecurityWorkspaceCreation_WorkspaceFragmentDoc,
|
||||
"\n fragment SettingsWorkspacesSecuritySsoWrapper_Workspace on Workspace {\n id\n role\n slug\n sso {\n provider {\n id\n name\n clientId\n issuerUrl\n }\n }\n hasAccessToSSO: hasAccessToFeature(featureName: oidcSso)\n }\n": types.SettingsWorkspacesSecuritySsoWrapper_WorkspaceFragmentDoc,
|
||||
"\n fragment ModelPageProject on Project {\n id\n createdAt\n name\n visibility\n workspace {\n id\n slug\n name\n role\n }\n embedOptions {\n hideSpeckleBranding\n }\n hasAccessToFeature(featureName: hideSpeckleBranding)\n ...ViewerLimitsDialog_Project\n }\n": types.ModelPageProjectFragmentDoc,
|
||||
"\n fragment ViewerCommentThreadData on Comment {\n id\n permissions {\n canArchive {\n ...FullPermissionCheckResult\n }\n }\n }\n": types.ViewerCommentThreadDataFragmentDoc,
|
||||
@@ -1447,7 +1447,7 @@ export function graphql(source: "\n fragment SettingsWorkspacesSecurityDomainRe
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
export function graphql(source: "\n fragment SettingsWorkspacesSecurityWorkspaceCreation_Workspace on Workspace {\n id\n slug\n role\n isExclusive\n }\n"): (typeof documents)["\n fragment SettingsWorkspacesSecurityWorkspaceCreation_Workspace on Workspace {\n id\n slug\n role\n isExclusive\n }\n"];
|
||||
export function graphql(source: "\n fragment SettingsWorkspacesSecurityWorkspaceCreation_Workspace on Workspace {\n id\n slug\n role\n isExclusive\n permissions {\n canMakeWorkspaceExclusive {\n authorized\n }\n }\n }\n"): (typeof documents)["\n fragment SettingsWorkspacesSecurityWorkspaceCreation_Workspace on Workspace {\n id\n slug\n role\n isExclusive\n permissions {\n canMakeWorkspaceExclusive {\n authorized\n }\n }\n }\n"];
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user