fixed alot of bugs in overview
This commit is contained in:
@@ -76,6 +76,10 @@ export function getChartSql({
|
||||
sb.select.count = `countDistinct(profile_id) as count`;
|
||||
}
|
||||
|
||||
if (event.segment === 'session') {
|
||||
sb.select.count = `countDistinct(session_id) as count`;
|
||||
}
|
||||
|
||||
if (event.segment === 'user_average') {
|
||||
sb.select.count = `COUNT(*)::float / COUNT(DISTINCT profile_id)::float as count`;
|
||||
}
|
||||
|
||||
@@ -5,10 +5,11 @@ export type IServiceDashboards = Awaited<
|
||||
ReturnType<typeof getDashboardsByProjectId>
|
||||
>;
|
||||
|
||||
export async function getDashboardById(id: string) {
|
||||
export async function getDashboardById(id: string, projectId: string) {
|
||||
const dashboard = await db.dashboard.findUnique({
|
||||
where: {
|
||||
id,
|
||||
project_id: projectId,
|
||||
},
|
||||
include: {
|
||||
project: true,
|
||||
|
||||
Reference in New Issue
Block a user