diff --git a/ee/tabby-ui/app/(dashboard)/activities/components/activity.tsx b/ee/tabby-ui/app/(dashboard)/activities/components/activity.tsx index 27a4550a20c7..3dacaae937d2 100644 --- a/ee/tabby-ui/app/(dashboard)/activities/components/activity.tsx +++ b/ee/tabby-ui/app/(dashboard)/activities/components/activity.tsx @@ -1,13 +1,13 @@ 'use client' import React from 'react' +import { capitalize } from 'lodash-es' import moment from 'moment' import { useTheme } from 'next-themes' import { DateRange } from 'react-day-picker' import ReactJson from 'react-json-view' import { toast } from 'sonner' import { useQuery } from 'urql' -import { capitalize } from 'lodash-es' import { DEFAULT_PAGE_SIZE } from '@/lib/constants' import { graphql } from '@/lib/gql/generates' @@ -144,141 +144,148 @@ export default function Activity() {

- View a log of code completion events. Tracing the progression from initiation to final insertion. + View a log of code completion events. Tracing the progression + from initiation to final insertion.

{!fetching && (
- + +
+
+ +
-
- - - - All members - {members.map(member => ( - - {member.email} + + + + + All members - ))} - - - + {members.map(member => ( + + {member.email} + + ))} + + + - -
+ + )} - <> - - {(!data?.userEvents.edges || - data?.userEvents.edges.length === 0) && ( - - -

- No data available for the chosen dates -

-

- Please try a different date range -

-
- )} - - {data?.userEvents.edges && data?.userEvents.edges.length > 0 && ( - <> - - - - - Event - User - Time - - - - {userEvents?.edges - .sort( - (a, b) => - new Date(b.node.createdAt).getTime() - - new Date(a.node.createdAt).getTime() - ) - .map(userEvent => ( - - ))} - -
+ + {(!data?.userEvents.edges || + data?.userEvents.edges.length === 0) && ( + + +

+ No data available for the chosen dates +

+

+ Please try a different date range +

- - )} -
+ )} - {(data?.userEvents.pageInfo?.hasNextPage || - data?.userEvents.pageInfo?.hasPreviousPage) && ( -
-
- {' '} - Page {page} -
-
- - + {data?.userEvents.edges && + data?.userEvents.edges.length > 0 && ( + <> + + + + + + Event + + + User + + + Time + + + + + {userEvents?.edges + .sort( + (a, b) => + new Date(b.node.createdAt).getTime() - + new Date(a.node.createdAt).getTime() + ) + .map(userEvent => ( + + ))} + +
+
+ + )} + + + {(data?.userEvents.pageInfo?.hasNextPage || + data?.userEvents.pageInfo?.hasPreviousPage) && ( +
+
+ {' '} + Page {page} +
+
+ + +
-
- )} + )} - -
diff --git a/ee/tabby-ui/components/date-range-picker.tsx b/ee/tabby-ui/components/date-range-picker.tsx index 7e1a3cc0f28c..14e66172a28c 100644 --- a/ee/tabby-ui/components/date-range-picker.tsx +++ b/ee/tabby-ui/components/date-range-picker.tsx @@ -148,7 +148,7 @@ export default function DateRangePicker({ onOpenChange={onDateFilterOpenChange} > setShowDateFilter(!showDateFilter)} >