feat(results): remove incomplete results limitation
This commit is contained in:
@ -5,7 +5,6 @@ import { NextApiRequest, NextApiResponse } from 'next'
|
||||
import { canReadTypebot, canWriteTypebot } from 'services/api/dbRules'
|
||||
import { deleteFiles } from 'services/api/storage'
|
||||
import { getAuthenticatedUser } from 'services/api/utils'
|
||||
import { isFreePlan } from 'services/workspace'
|
||||
import {
|
||||
badRequest,
|
||||
forbidden,
|
||||
@ -38,7 +37,6 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
|
||||
where: {
|
||||
typebot: canReadTypebot(typebotId, user),
|
||||
answers: { some: {} },
|
||||
isCompleted: isFreePlan(workspace) ? true : undefined,
|
||||
},
|
||||
orderBy: {
|
||||
createdAt: 'desc',
|
||||
|
@ -10,7 +10,6 @@ import { useWorkspace } from 'contexts/WorkspaceContext'
|
||||
import { AnalyticsContent } from 'components/analytics/AnalyticsContent'
|
||||
import { useRouter } from 'next/router'
|
||||
import { useStats } from 'services/analytics'
|
||||
import { isFreePlan } from 'services/workspace'
|
||||
import { useToast } from 'components/shared/hooks/useToast'
|
||||
import { ResultsProvider } from 'contexts/ResultsProvider'
|
||||
|
||||
@ -35,6 +34,7 @@ const ResultsPage = () => {
|
||||
stats: { ...stats, totalStarts: stats.totalStarts - total },
|
||||
})
|
||||
}
|
||||
|
||||
return (
|
||||
<Flex overflow="hidden" h="100vh" flexDir="column">
|
||||
<Seo
|
||||
@ -87,11 +87,6 @@ const ResultsPage = () => {
|
||||
workspaceId={workspace.id}
|
||||
typebotId={publishedTypebot.typebotId}
|
||||
totalResults={stats?.totalStarts ?? 0}
|
||||
totalHiddenResults={
|
||||
isFreePlan(workspace)
|
||||
? (stats?.totalStarts ?? 0) - (stats?.totalCompleted ?? 0)
|
||||
: undefined
|
||||
}
|
||||
onDeleteResults={handleDeletedResults}
|
||||
>
|
||||
<ResultsContent />
|
||||
|
Reference in New Issue
Block a user