Refactor onboarding user vars to be absent when user is fully onboarded (#6531)
In this PR: - take feedbacks from: https://github.com/twentyhq/twenty/pull/6530 / https://github.com/twentyhq/twenty/pull/6529 / https://github.com/twentyhq/twenty/pull/6526 / https://github.com/twentyhq/twenty/pull/6512 - refactor onboarding uservars to be absent when the user is fully onboarded: isStepComplete ==> isStepIncomplete - introduce a new workspace.activationStatus: CREATION_ONGOING I'm retesting the whole flow: - with/without BILLING - sign in with/without SSO - sign up with/without SSO - another workspaceMembers join the team - subscriptionCanceled - access to billingPortal
This commit is contained in:
@ -102,6 +102,7 @@ export const useGenerateCombinedFindManyRecordsQuery = ({
|
||||
}
|
||||
pageInfo {
|
||||
hasNextPage
|
||||
hasPreviousPage
|
||||
startCursor
|
||||
endCursor
|
||||
}
|
||||
|
||||
@ -29,8 +29,6 @@ import { ShowPageContainer } from '@/ui/layout/page/ShowPageContainer';
|
||||
import { ShowPageLeftContainer } from '@/ui/layout/show-page/components/ShowPageLeftContainer';
|
||||
import { ShowPageRightContainer } from '@/ui/layout/show-page/components/ShowPageRightContainer';
|
||||
import { ShowPageSummaryCard } from '@/ui/layout/show-page/components/ShowPageSummaryCard';
|
||||
import { ShowPageRecoilScopeContext } from '@/ui/layout/states/ShowPageRecoilScopeContext';
|
||||
import { RecoilScope } from '@/ui/utilities/recoil-scope/components/RecoilScope';
|
||||
import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';
|
||||
import {
|
||||
FieldMetadataType,
|
||||
@ -302,27 +300,25 @@ export const RecordShowContainer = ({
|
||||
);
|
||||
|
||||
return (
|
||||
<RecoilScope CustomRecoilScopeContext={ShowPageRecoilScopeContext}>
|
||||
<ShowPageContainer>
|
||||
<ShowPageLeftContainer forceMobile={isInRightDrawer}>
|
||||
{!isMobile && summaryCard}
|
||||
{!isMobile && fieldsBox}
|
||||
</ShowPageLeftContainer>
|
||||
<ShowPageRightContainer
|
||||
targetableObject={{
|
||||
id: objectRecordId,
|
||||
targetObjectNameSingular: objectMetadataItem?.nameSingular,
|
||||
}}
|
||||
timeline
|
||||
tasks
|
||||
notes
|
||||
emails
|
||||
isInRightDrawer={isInRightDrawer}
|
||||
summaryCard={isMobile ? summaryCard : <></>}
|
||||
fieldsBox={fieldsBox}
|
||||
loading={isPrefetchLoading || loading || recordLoading}
|
||||
/>
|
||||
</ShowPageContainer>
|
||||
</RecoilScope>
|
||||
<ShowPageContainer>
|
||||
<ShowPageLeftContainer forceMobile={isInRightDrawer}>
|
||||
{!isMobile && summaryCard}
|
||||
{!isMobile && fieldsBox}
|
||||
</ShowPageLeftContainer>
|
||||
<ShowPageRightContainer
|
||||
targetableObject={{
|
||||
id: objectRecordId,
|
||||
targetObjectNameSingular: objectMetadataItem?.nameSingular,
|
||||
}}
|
||||
timeline
|
||||
tasks
|
||||
notes
|
||||
emails
|
||||
isInRightDrawer={isInRightDrawer}
|
||||
summaryCard={isMobile ? summaryCard : <></>}
|
||||
fieldsBox={fieldsBox}
|
||||
loading={isPrefetchLoading || loading || recordLoading}
|
||||
/>
|
||||
</ShowPageContainer>
|
||||
);
|
||||
};
|
||||
|
||||
@ -5,7 +5,6 @@ import { useNavigate, useParams, useSearchParams } from 'react-router-dom';
|
||||
import { useSetRecoilState } from 'recoil';
|
||||
|
||||
import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataItem';
|
||||
import { generateDepthOneRecordGqlFields } from '@/object-record/graphql/utils/generateDepthOneRecordGqlFields';
|
||||
import { useFindManyRecords } from '@/object-record/hooks/useFindManyRecords';
|
||||
import { lastShowPageRecordIdState } from '@/object-record/record-field/states/lastShowPageRecordId';
|
||||
import { useRecordIdsFromFindManyCacheRootQuery } from '@/object-record/record-show/hooks/useRecordIdsFromFindManyCacheRootQuery';
|
||||
@ -37,10 +36,6 @@ export const useRecordShowPagePagination = (
|
||||
|
||||
const { objectMetadataItem } = useObjectMetadataItem({ objectNameSingular });
|
||||
|
||||
const recordGqlFields = generateDepthOneRecordGqlFields({
|
||||
objectMetadataItem,
|
||||
});
|
||||
|
||||
const { filter, orderBy } =
|
||||
useQueryVariablesFromActiveFieldsOfViewOrDefaultView({
|
||||
objectMetadataItem,
|
||||
@ -55,7 +50,7 @@ export const useRecordShowPagePagination = (
|
||||
orderBy,
|
||||
limit: 1,
|
||||
objectNameSingular,
|
||||
recordGqlFields,
|
||||
recordGqlFields: { id: true },
|
||||
});
|
||||
|
||||
const cursorFromRequest = currentRecordsPageInfo?.endCursor;
|
||||
@ -77,7 +72,7 @@ export const useRecordShowPagePagination = (
|
||||
}
|
||||
: undefined,
|
||||
objectNameSingular,
|
||||
recordGqlFields,
|
||||
recordGqlFields: { id: true },
|
||||
onCompleted: (_, pagination) => {
|
||||
setTotalCountBefore(pagination?.totalCount ?? 0);
|
||||
},
|
||||
@ -97,7 +92,7 @@ export const useRecordShowPagePagination = (
|
||||
}
|
||||
: undefined,
|
||||
objectNameSingular,
|
||||
recordGqlFields,
|
||||
recordGqlFields: { id: true },
|
||||
onCompleted: (_, pagination) => {
|
||||
setTotalCountAfter(pagination?.totalCount ?? 0);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user