From bd3439bbf6b303ee9f05220aec2fd2e33a23edf5 Mon Sep 17 00:00:00 2001 From: Baptiste Arnaud Date: Fri, 26 Jan 2024 10:38:44 +0100 Subject: [PATCH] :children_crossing: (editor) Remove blocks pointer events only in analytics --- .../analytics/components/AnalyticsGraphContainer.tsx | 2 +- .../graph/components/nodes/block/BlockNode.tsx | 3 ++- .../src/features/graph/providers/GraphProvider.tsx | 4 ++++ packages/scripts/inspectTypebot.ts | 10 ++++++++++ packages/scripts/inspectWorkspace.ts | 4 ++++ 5 files changed, 21 insertions(+), 2 deletions(-) diff --git a/apps/builder/src/features/analytics/components/AnalyticsGraphContainer.tsx b/apps/builder/src/features/analytics/components/AnalyticsGraphContainer.tsx index a8eb5f42e..2fdac6b6a 100644 --- a/apps/builder/src/features/analytics/components/AnalyticsGraphContainer.tsx +++ b/apps/builder/src/features/analytics/components/AnalyticsGraphContainer.tsx @@ -49,7 +49,7 @@ export const AnalyticsGraphContainer = ({ stats }: { stats?: Stats }) => { justifyContent="center" > {publishedTypebot && stats ? ( - + > isReadOnly: boolean + isAnalytics: boolean focusedGroupId?: string setFocusedGroupId: Dispatch> // eslint-disable-next-line @typescript-eslint/ban-ts-comment @@ -44,9 +45,11 @@ const graphContext = createContext<{ export const GraphProvider = ({ children, isReadOnly = false, + isAnalytics = false, }: { children: ReactNode isReadOnly?: boolean + isAnalytics?: boolean }) => { const [graphPosition, setGraphPosition] = useState( graphPositionDefaultValue({ x: 0, y: 0 }) @@ -76,6 +79,7 @@ export const GraphProvider = ({ setFocusedGroupId, setPreviewingBlock, previewingBlock, + isAnalytics, }} > {children} diff --git a/packages/scripts/inspectTypebot.ts b/packages/scripts/inspectTypebot.ts index 807c9d90a..e28a7ec22 100644 --- a/packages/scripts/inspectTypebot.ts +++ b/packages/scripts/inspectTypebot.ts @@ -36,6 +36,16 @@ const inspectTypebot = async () => { id: true, name: true, plan: true, + members: { + select: { + role: true, + user: { + select: { + email: true, + }, + }, + }, + }, }, }, }, diff --git a/packages/scripts/inspectWorkspace.ts b/packages/scripts/inspectWorkspace.ts index 0ab896ba1..d9a437174 100644 --- a/packages/scripts/inspectWorkspace.ts +++ b/packages/scripts/inspectWorkspace.ts @@ -24,7 +24,11 @@ const inspectWorkspace = async () => { }, include: { typebots: { + orderBy: { + updatedAt: 'desc', + }, select: { + updatedAt: true, id: true, name: true, },