@ -49,9 +49,9 @@ export const ResultsProvider = ({
|
||||
const resultHeader = useMemo(
|
||||
() =>
|
||||
publishedTypebot
|
||||
? parseResultHeader(publishedTypebot, linkedTypebots, flatResults)
|
||||
? parseResultHeader(publishedTypebot, linkedTypebots)
|
||||
: [],
|
||||
[flatResults, linkedTypebots, publishedTypebot]
|
||||
[linkedTypebots, publishedTypebot]
|
||||
)
|
||||
|
||||
const tableData = useMemo(
|
||||
|
@ -50,6 +50,7 @@ export const getResultsProcedure = authenticatedProcedure
|
||||
where: {
|
||||
typebotId: typebot.id,
|
||||
hasStarted: true,
|
||||
isArchived: false,
|
||||
},
|
||||
orderBy: {
|
||||
createdAt: 'desc',
|
||||
|
@ -23,17 +23,20 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
|
||||
prisma.result.count({
|
||||
where: {
|
||||
typebotId: typebot.id,
|
||||
isArchived: false,
|
||||
},
|
||||
}),
|
||||
prisma.result.count({
|
||||
where: {
|
||||
typebotId: typebot.id,
|
||||
isArchived: false,
|
||||
hasStarted: true,
|
||||
},
|
||||
}),
|
||||
prisma.result.count({
|
||||
where: {
|
||||
typebotId: typebot.id,
|
||||
isArchived: false,
|
||||
isCompleted: true,
|
||||
},
|
||||
}),
|
||||
|
Reference in New Issue
Block a user