diff --git a/packages/dui3/lib/common/generated/gql/graphql.ts b/packages/dui3/lib/common/generated/gql/graphql.ts index 2c5ae39c3..6aa317754 100644 --- a/packages/dui3/lib/common/generated/gql/graphql.ts +++ b/packages/dui3/lib/common/generated/gql/graphql.ts @@ -2002,6 +2002,8 @@ export type Project = { * real or fake (e.g., with a foo/bar model, it will be nested under foo even if such a model doesn't actually exist) */ modelsTree: ModelsTreeItemCollection; + /** Returns information about the potential effects of moving a project to a given workspace. */ + moveToWorkspaceDryRun: ProjectMoveToWorkspaceDryRun; name: Scalars['String']['output']; object?: Maybe; /** Pending project access requests */ @@ -2100,6 +2102,11 @@ export type ProjectModelsTreeArgs = { }; +export type ProjectMoveToWorkspaceDryRunArgs = { + workspaceId: Scalars['String']['input']; +}; + + export type ProjectObjectArgs = { id: Scalars['String']['input']; }; @@ -2416,6 +2423,17 @@ export enum ProjectModelsUpdatedMessageType { Updated = 'UPDATED' } +export type ProjectMoveToWorkspaceDryRun = { + __typename?: 'ProjectMoveToWorkspaceDryRun'; + addedToWorkspace: Array; + addedToWorkspaceTotalCount: Scalars['Int']['output']; +}; + + +export type ProjectMoveToWorkspaceDryRunAddedToWorkspaceArgs = { + limit?: InputMaybe; +}; + export type ProjectMutations = { __typename?: 'ProjectMutations'; /** Access request related mutations */ @@ -4326,7 +4344,6 @@ export type Workspace = { invitedTeam?: Maybe>; /** Logo image as base64-encoded string */ logo?: Maybe; - membersByRole?: Maybe; name: Scalars['String']['output']; permissions: WorkspacePermissionChecks; plan?: Maybe; @@ -4337,12 +4354,12 @@ export type Workspace = { role?: Maybe; /** Active user's seat type for this workspace. `null` if request is not authenticated, or the workspace is not explicitly shared with you. */ seatType?: Maybe; - seatsByType?: Maybe; slug: Scalars['String']['output']; /** Information about the workspace's SSO configuration and the current user's SSO session, if present */ sso?: Maybe; subscription?: Maybe; team: WorkspaceCollaboratorCollection; + teamByRole: WorkspaceTeamByRole; updatedAt: Scalars['DateTime']['output']; }; @@ -4434,6 +4451,8 @@ export type WorkspaceCollection = { export type WorkspaceCreateInput = { description?: InputMaybe; + /** Add this domain to the workspace as a verified domain and enable domain discoverability */ + enableDomainDiscoverabilityForDomain?: InputMaybe; /** Logo image as base64-encoded string */ logo?: InputMaybe; name: Scalars['String']['input']; @@ -4583,13 +4602,6 @@ export enum WorkspaceJoinRequestStatus { Pending = 'pending' } -export type WorkspaceMembersByRole = { - __typename?: 'WorkspaceMembersByRole'; - admins?: Maybe; - guests?: Maybe; - members?: Maybe; -}; - export type WorkspaceMutations = { __typename?: 'WorkspaceMutations'; addDomain: Workspace; @@ -4893,18 +4905,25 @@ export type WorkspaceSubscription = { updatedAt: Scalars['DateTime']['output']; }; +export type WorkspaceSubscriptionSeatCount = { + __typename?: 'WorkspaceSubscriptionSeatCount'; + /** Total number of seats in use by workspace users */ + assigned: Scalars['Int']['output']; + /** Total number of seats purchased and available in the current subscription cycle */ + available: Scalars['Int']['output']; +}; + export type WorkspaceSubscriptionSeats = { __typename?: 'WorkspaceSubscriptionSeats'; - /** Number assigned seats in the current billing cycle */ - assigned: Scalars['Int']['output']; - /** @deprecated No longer supported */ - guest: Scalars['Int']['output']; - /** @deprecated No longer supported */ - plan: Scalars['Int']['output']; - /** Total number of seats purchased and available in the current subscription cycle */ - totalCount: Scalars['Int']['output']; - /** Number of viewer seats currently assigned in the workspace */ - viewersCount: Scalars['Int']['output']; + editors: WorkspaceSubscriptionSeatCount; + viewers: WorkspaceSubscriptionSeatCount; +}; + +export type WorkspaceTeamByRole = { + __typename?: 'WorkspaceTeamByRole'; + admins?: Maybe; + guests?: Maybe; + members?: Maybe; }; export type WorkspaceTeamFilter = { diff --git a/packages/frontend-2/components/pricingTable/Plan.vue b/packages/frontend-2/components/pricingTable/Plan.vue index 978a33579..8184bca5f 100644 --- a/packages/frontend-2/components/pricingTable/Plan.vue +++ b/packages/frontend-2/components/pricingTable/Plan.vue @@ -117,7 +117,7 @@ const props = defineProps<{ }>() const slots: SetupContext['slots'] = useSlots() -const { pricesNew } = useWorkspacePlanPrices() +const { prices } = useWorkspacePlanPrices() const { upgradePlan, redirectToCheckout } = useBillingActions() const isYearlyIntervalSelected = ref(props.yearlyIntervalSelected) @@ -126,7 +126,7 @@ const planFeatures = computed(() => WorkspacePlanConfigs[props.plan].features) const planPrice = computed(() => { if (props.plan === WorkspacePlans.Team || props.plan === WorkspacePlans.Pro) { return formatPrice( - pricesNew.value?.[props.plan]?.[WorkspacePlanBillingIntervals.Monthly] + prices.value?.[props.plan]?.[WorkspacePlanBillingIntervals.Monthly] ) } diff --git a/packages/frontend-2/components/settings/workspaces/billing/Summary.vue b/packages/frontend-2/components/settings/workspaces/billing/Summary.vue index 89955aaf3..f34c0c7b2 100644 --- a/packages/frontend-2/components/settings/workspaces/billing/Summary.vue +++ b/packages/frontend-2/components/settings/workspaces/billing/Summary.vue @@ -20,7 +20,7 @@

- {{ totalCostFormatted }} + TODO per {{ billingInterval }}

import { useWorkspacePlan } from '~~/lib/workspaces/composables/plan' import { useBillingActions } from '~/lib/billing/composables/actions' -import type { MaybeNullOrUndefined } from '@speckle/shared' +import { type MaybeNullOrUndefined, WorkspacePlanStatuses } from '@speckle/shared' import { formatName } from '~/lib/billing/helpers/plan' defineProps<{ @@ -72,10 +72,12 @@ const { billingPortalRedirect } = useBillingActions() const route = useRoute() const slug = computed(() => (route.params.slug as string) || '') -const { plan, isPurchasablePlan, isActivePlan, totalCostFormatted, billingInterval } = - useWorkspacePlan(slug.value) +const { plan, isPurchasablePlan, billingInterval } = useWorkspacePlan(slug.value) const showBillingPortalLink = computed( - () => isActivePlan.value && isPurchasablePlan.value + () => + plan.value?.status === WorkspacePlanStatuses.Valid || + plan.value?.status === WorkspacePlanStatuses.PaymentFailed || + plan.value?.status === WorkspacePlanStatuses.CancelationScheduled ) diff --git a/packages/frontend-2/components/settings/workspaces/billing/UpgradeDialog.vue b/packages/frontend-2/components/settings/workspaces/billing/UpgradeDialog.vue index b51575834..c1edf0836 100644 --- a/packages/frontend-2/components/settings/workspaces/billing/UpgradeDialog.vue +++ b/packages/frontend-2/components/settings/workspaces/billing/UpgradeDialog.vue @@ -28,7 +28,6 @@ import { import { useBillingActions } from '~/lib/billing/composables/actions' import { startCase } from 'lodash' import type { PaidWorkspacePlansOld } from '@speckle/shared' -import { Roles } from '@speckle/shared' import { isPaidPlan } from '~/lib/billing/helpers/types' import { useWorkspacePlanPrices } from '~/lib/billing/composables/prices' import { formatPrice } from '~/lib/billing/helpers/plan' @@ -46,7 +45,7 @@ const { prices } = useWorkspacePlanPrices() const seatPrice = computed(() => { if (isPaidPlan(props.plan)) { const planPrices = prices.value?.[props.plan] - const price = planPrices?.[props.billingInterval]?.[Roles.Workspace.Member] + const price = planPrices?.[props.billingInterval] return formatPrice(price) } diff --git a/packages/frontend-2/components/settings/workspaces/billing/Usage.vue b/packages/frontend-2/components/settings/workspaces/billing/Usage.vue index f03e2dab0..1318accd2 100644 --- a/packages/frontend-2/components/settings/workspaces/billing/Usage.vue +++ b/packages/frontend-2/components/settings/workspaces/billing/Usage.vue @@ -8,13 +8,17 @@

Editor seats

-

4

- 2 unused +

+ {{ seats?.editors.assigned }} +

+ {{ seats?.editors.available }} Unused

Viewer seats

-

4

+

+ {{ seats?.viewers.assigned }} +

@@ -32,25 +36,35 @@ >

Projects

-

- {{ formatUsageText(10, 100, 'project') }} + +

+ {{ projectCount }}

-

Models

-

- {{ formatUsageText(10, 100, 'model') }} + +

+ {{ modelCount }}

-
@@ -67,11 +81,18 @@ diff --git a/packages/frontend-2/components/settings/workspaces/members/GuestsTable.vue b/packages/frontend-2/components/settings/workspaces/members/GuestsTable.vue index 037c04842..d504497bb 100644 --- a/packages/frontend-2/components/settings/workspaces/members/GuestsTable.vue +++ b/packages/frontend-2/components/settings/workspaces/members/GuestsTable.vue @@ -22,11 +22,12 @@ :columns="[ { id: 'name', header: 'Name', classes: 'col-span-4' }, { id: 'seat', header: 'Seat', classes: 'col-span-2' }, - { id: 'joined', header: 'Joined', classes: 'col-span-4' }, + { id: 'joined', header: 'Joined', classes: 'col-span-3' }, + { id: 'projects', header: 'Projects', classes: 'col-span-2' }, { id: 'actions', header: '', - classes: 'col-span-2 flex items-center justify-end' + classes: 'col-span-1 flex items-center justify-end' } ]" :items="guests" @@ -62,79 +63,70 @@ {{ formattedFullDate(item.joinDate) }} + +
diff --git a/packages/frontend-2/components/settings/workspaces/members/actions/LeaveWorkspaceDialog.vue b/packages/frontend-2/components/settings/workspaces/members/actions/LeaveWorkspaceDialog.vue index 21c834f0e..6da9f92b9 100644 --- a/packages/frontend-2/components/settings/workspaces/members/actions/LeaveWorkspaceDialog.vue +++ b/packages/frontend-2/components/settings/workspaces/members/actions/LeaveWorkspaceDialog.vue @@ -14,18 +14,13 @@ diff --git a/packages/frontend-2/components/settings/workspaces/members/actions/RemoveFromWorkspaceDialog.vue b/packages/frontend-2/components/settings/workspaces/members/actions/RemoveFromWorkspaceDialog.vue index da5605de2..786483eaa 100644 --- a/packages/frontend-2/components/settings/workspaces/members/actions/RemoveFromWorkspaceDialog.vue +++ b/packages/frontend-2/components/settings/workspaces/members/actions/RemoveFromWorkspaceDialog.vue @@ -6,12 +6,12 @@
- {{ user.name }} + {{ user.user.name }}
@@ -26,20 +26,16 @@ diff --git a/packages/frontend-2/components/settings/workspaces/members/actions/UpdateSeatTypeDialog.vue b/packages/frontend-2/components/settings/workspaces/members/actions/UpdateSeatTypeDialog.vue index b46ed6305..eb99a22fd 100644 --- a/packages/frontend-2/components/settings/workspaces/members/actions/UpdateSeatTypeDialog.vue +++ b/packages/frontend-2/components/settings/workspaces/members/actions/UpdateSeatTypeDialog.vue @@ -2,15 +2,15 @@
-

Confirm {{ user.name }}'s new seat.

+

Confirm {{ user.user.name }}'s new seat.

@@ -29,7 +29,6 @@