File tree Expand file tree Collapse file tree 3 files changed +16
-5
lines changed
app/(use-page-wrapper)/insights/routing
packages/features/insights/components/routing Expand file tree Collapse file tree 3 files changed +16
-5
lines changed Original file line number Diff line number Diff line change 11import { _generateMetadata } from "app/_utils" ;
22
3+ import { prisma } from "@calcom/prisma" ;
4+
35import InsightsRoutingPage from "~/insights/insights-routing-view" ;
46
57import { checkInsightsPagePermission } from "../checkInsightsPagePermission" ;
@@ -14,7 +16,14 @@ export const generateMetadata = async () =>
1416 ) ;
1517
1618export default async function Page ( ) {
17- await checkInsightsPagePermission ( ) ;
19+ const session = await checkInsightsPagePermission ( ) ;
20+
21+ const { timeZone } = await prisma . user . findUniqueOrThrow ( {
22+ where : { id : session ?. user . id ?? - 1 } ,
23+ select : {
24+ timeZone : true ,
25+ } ,
26+ } ) ;
1827
19- return < InsightsRoutingPage /> ;
28+ return < InsightsRoutingPage timeZone = { timeZone } /> ;
2029}
Original file line number Diff line number Diff line change @@ -13,14 +13,14 @@ import {
1313import { InsightsOrgTeamsProvider } from "@calcom/features/insights/context/InsightsOrgTeamsProvider" ;
1414import { useLocale } from "@calcom/lib/hooks/useLocale" ;
1515
16- export default function InsightsRoutingFormResponsesPage ( ) {
16+ export default function InsightsRoutingFormResponsesPage ( { timeZone } : { timeZone : string } ) {
1717 const { t } = useLocale ( ) ;
1818 const pathname = usePathname ( ) ;
1919
2020 if ( ! pathname ) return null ;
2121
2222 return (
23- < DataTableProvider tableIdentifier = { pathname } useSegments = { useSegments } >
23+ < DataTableProvider tableIdentifier = { pathname } useSegments = { useSegments } timeZone = { timeZone } >
2424 < InsightsOrgTeamsProvider >
2525 < div className = "mb-4 space-y-4" >
2626 < RoutingFormResponsesTable />
Original file line number Diff line number Diff line change 11"use client" ;
22
33import { useReactTable , getCoreRowModel , getSortedRowModel } from "@tanstack/react-table" ;
4-
4+ import { TimezoneBadge } from "@calcom/features/insights/components/booking" ;
5+
56import { useMemo , useEffect } from "react" ;
67import { createPortal } from "react-dom" ;
78
@@ -155,6 +156,7 @@ export function RoutingFormResponsesTable() {
155156 < >
156157 < DateRangeFilter column = { createdAtColumn } options = { { convertToTimeZone : true } } />
157158 < RoutingFormResponsesDownload sorting = { sorting } />
159+ < TimezoneBadge />
158160 </ > ,
159161 ctaContainerRef . current
160162 ) }
You can’t perform that action at this time.
0 commit comments