+
@@ -17,6 +48,8 @@ export const Filters = () => {
+
+
{/* @NOTE: To be released in next iteration */}
{/*
diff --git a/packages/features/insights/server/trpc-router.ts b/packages/features/insights/server/trpc-router.ts
index 286bc5a5f6..ca0c924a0d 100644
--- a/packages/features/insights/server/trpc-router.ts
+++ b/packages/features/insights/server/trpc-router.ts
@@ -377,7 +377,6 @@ export const insightsRouter = router({
};
if (userId) {
- delete whereConditional.eventType;
whereConditional["userId"] = userId;
}
@@ -707,6 +706,12 @@ export const insightsRouter = router({
}
const eventTypes = await ctx.prisma.eventType.findMany({
+ select: {
+ id: true,
+ slug: true,
+ teamId: true,
+ title: true,
+ },
where: {
teamId: input.teamId,
},
diff --git a/packages/features/shell/Shell.tsx b/packages/features/shell/Shell.tsx
index 8c8d1be32d..2a618f9afc 100644
--- a/packages/features/shell/Shell.tsx
+++ b/packages/features/shell/Shell.tsx
@@ -536,7 +536,7 @@ const navigation: NavigationItemType[] = [
icon: FiZap,
},
{
- name: "Insights",
+ name: "insights",
href: "/insights",
icon: FiBarChart,
},
diff --git a/packages/prisma/migrations/20230329000000_add_insights_feature_flag/migration.sql b/packages/prisma/migrations/20230329000000_add_insights_feature_flag/migration.sql
new file mode 100644
index 0000000000..da81554c85
--- /dev/null
+++ b/packages/prisma/migrations/20230329000000_add_insights_feature_flag/migration.sql
@@ -0,0 +1,10 @@
+-- Insert initial feature flags with their default values
+INSERT INTO
+ "Feature" (slug, enabled, description, "type")
+VALUES
+ (
+ 'insights',
+ true,
+ 'Enable insights for this instance',
+ 'OPERATIONAL'
+ ) ON CONFLICT (slug) DO NOTHING;
diff --git a/packages/prisma/package.json b/packages/prisma/package.json
index 4bd768baa4..3bf672969b 100644
--- a/packages/prisma/package.json
+++ b/packages/prisma/package.json
@@ -17,7 +17,7 @@
"post-install": "yarn generate-schemas",
"seed-app-store": "ts-node --transpile-only ./seed-app-store.ts",
"delete-app": "ts-node --transpile-only ./delete-app.ts",
- "seed-analytics": "ts-node --transpile-only ./seed-analytics.ts"
+ "seed-insights": "ts-node --transpile-only ./seed-insights.ts"
},
"devDependencies": {
"npm-run-all": "^4.1.5"
diff --git a/packages/prisma/seed-analytics.ts b/packages/prisma/seed-insights.ts
similarity index 100%
rename from packages/prisma/seed-analytics.ts
rename to packages/prisma/seed-insights.ts
diff --git a/yarn.lock b/yarn.lock
index 529e02f735..1d820b1b53 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -4084,7 +4084,6 @@ __metadata:
"@calcom/ui": "*"
"@headlessui/react": ^1.5.0
"@heroicons/react": ^1.0.6
- "@next/font": ^13.1.6
"@prisma/client": ^4.11.0
"@tailwindcss/forms": ^0.5.2
"@types/node": 16.9.1
@@ -4094,7 +4093,7 @@ __metadata:
client-only: ^0.0.1
eslint: ^8.34.0
next: ^13.2.1
- next-auth: ^4.18.8
+ next-auth: ^4.20.1
next-i18next: ^11.3.0
postcss: ^8.4.18
prisma: ^4.11.0
@@ -4102,7 +4101,7 @@ __metadata:
react: ^18.2.0
react-chartjs-2: ^4.0.1
react-dom: ^18.2.0
- react-hook-form: ^7.34.2
+ react-hook-form: ^7.43.3
react-live-chat-loader: ^2.7.3
swr: ^1.2.2
tailwindcss: ^3.2.1
@@ -7943,13 +7942,6 @@ __metadata:
languageName: node
linkType: hard
-"@next/font@npm:^13.1.6":
- version: 13.2.4
- resolution: "@next/font@npm:13.2.4"
- checksum: f5319c895b6a6633b181f1c17d52dd98753dd7706db27644bf12383e0fa164f5223b8c5c70eb28edb9b9a113cdfb04a995accc16dba1655b850c9db8a05036b7
- languageName: node
- linkType: hard
-
"@next/swc-android-arm-eabi@npm:13.2.3":
version: 13.2.3
resolution: "@next/swc-android-arm-eabi@npm:13.2.3"
@@ -29242,7 +29234,7 @@ __metadata:
languageName: node
linkType: hard
-"next-auth@npm:^4.18.8, next-auth@npm:^4.20.1":
+"next-auth@npm:^4.20.1":
version: 4.20.1
resolution: "next-auth@npm:4.20.1"
dependencies:
@@ -32723,15 +32715,6 @@ __metadata:
languageName: node
linkType: hard
-"react-hook-form@npm:^7.34.2":
- version: 7.43.8
- resolution: "react-hook-form@npm:7.43.8"
- peerDependencies:
- react: ^16.8.0 || ^17 || ^18
- checksum: 1042b68950e1756dd907e7eb904c6efdf04f126a48797b25e8793705d930f7bbff2cc07f0ec7ea4c52272e808a359ae157742c551defa3b3fd0952ff414bd3e3
- languageName: node
- linkType: hard
-
"react-hook-form@npm:^7.43.3":
version: 7.43.3
resolution: "react-hook-form@npm:7.43.3"