Treat suspended workspace as workspaces that need to be synced (#9669)
In this PR: - migrate WorkspaceActivationStatus to twenty-shared (and update case to make FE and BE consistent) - introduce isWorkspaceActiveOrSuspended in twenty-shared - refactor the code to use it (when we fetch data on the FE, we want to keep SUSPENDED workspace working + when we sync workspaces we want it too)
This commit is contained in:
@ -16,7 +16,7 @@ import {
|
||||
const currentWorkspace = {
|
||||
id: '1',
|
||||
currentBillingSubscription: { status: SubscriptionStatus.Incomplete },
|
||||
activationStatus: WorkspaceActivationStatus.Active,
|
||||
activationStatus: WorkspaceActivationStatus.ACTIVE,
|
||||
allowImpersonation: true,
|
||||
} as CurrentWorkspace;
|
||||
|
||||
|
||||
@ -6,6 +6,6 @@ import { WorkspaceActivationStatus } from '~/generated/graphql';
|
||||
export const useIsWorkspaceActivationStatusSuspended = (): boolean => {
|
||||
const currentWorkspace = useRecoilValue(currentWorkspaceState);
|
||||
return (
|
||||
currentWorkspace?.activationStatus === WorkspaceActivationStatus.Suspended
|
||||
currentWorkspace?.activationStatus === WorkspaceActivationStatus.SUSPENDED
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user