diff --git a/apps/client-ts/src/app/(Dashboard)/b2c/profile/page.tsx b/apps/client-ts/src/app/(Dashboard)/b2c/profile/page.tsx index 6fddc0616..67a372943 100644 --- a/apps/client-ts/src/app/(Dashboard)/b2c/profile/page.tsx +++ b/apps/client-ts/src/app/(Dashboard)/b2c/profile/page.tsx @@ -65,9 +65,9 @@ const Profile = () => {

Connected user

-
+
-
diff --git a/apps/client-ts/src/components/Configuration/Connector/ConnectorDisplay.tsx b/apps/client-ts/src/components/Configuration/Connector/ConnectorDisplay.tsx index 1ac4f283f..4a5894222 100644 --- a/apps/client-ts/src/components/Configuration/Connector/ConnectorDisplay.tsx +++ b/apps/client-ts/src/components/Configuration/Connector/ConnectorDisplay.tsx @@ -94,7 +94,7 @@ export function ConnectorDisplay({ item }: ItemDisplayProps) { function onSubmit(values: z.infer) { const { client_id, client_secret, scope, api_key, secret, username, subdomain } = values; const performUpdate = mappingConnectionStrategies && mappingConnectionStrategies.length > 0; - switch (item?.authStrategy) { + switch (item?.authStrategy.strategy) { case AuthStrategy.oauth2: const needs_subdomain = needsSubdomain(item.name.toLowerCase(), item.vertical!.toLowerCase()); if (client_id === "" || client_secret === "" || scope === "") { @@ -341,11 +341,11 @@ export function ConnectorDisplay({ item }: ItemDisplayProps) { if (mappingConnectionStrategies && mappingConnectionStrategies.length > 0) { fetchCredentials({ type: mappingConnectionStrategies[0].type, - attributes: item?.authStrategy === AuthStrategy.oauth2 ? needsSubdomain(item.name.toLowerCase(), item.vertical!.toLowerCase()) ? ["subdomain", "client_id", "client_secret", "scope"] : ["client_id", "client_secret", "scope"] - : item?.authStrategy === AuthStrategy.api_key ? ["api_key"] : ["username", "secret"] + attributes: item?.authStrategy.strategy === AuthStrategy.oauth2 ? needsSubdomain(item.name.toLowerCase(), item.vertical!.toLowerCase()) ? ["subdomain", "client_id", "client_secret", "scope"] : ["client_id", "client_secret", "scope"] + : item?.authStrategy.strategy === AuthStrategy.api_key ? ["api_key"] : ["username", "secret"] }, { onSuccess(data) { - if (item?.authStrategy === AuthStrategy.oauth2) { + if (item?.authStrategy.strategy === AuthStrategy.oauth2) { let i = 0; if(needsSubdomain(item.name.toLowerCase(), item.vertical!.toLowerCase())){ form.setValue("subdomain", data[i]); @@ -355,10 +355,10 @@ export function ConnectorDisplay({ item }: ItemDisplayProps) { form.setValue("client_secret", data[i + 1]); form.setValue("scope", data[i + 2]); } - if (item?.authStrategy === AuthStrategy.api_key) { + if (item?.authStrategy.strategy === AuthStrategy.api_key) { form.setValue("api_key", data[0]); } - if (item?.authStrategy === AuthStrategy.basic) { + if (item?.authStrategy.strategy === AuthStrategy.basic) { form.setValue("username", data[0]); form.setValue("secret", data[1]); } @@ -435,7 +435,7 @@ export function ConnectorDisplay({ item }: ItemDisplayProps) {
- { item.authStrategy == AuthStrategy.oauth2 && + { item.authStrategy.strategy == AuthStrategy.oauth2 && <> { needsSubdomain(item.name.toLowerCase(), item.vertical!.toLowerCase()) &&
@@ -516,7 +516,7 @@ export function ConnectorDisplay({ item }: ItemDisplayProps) { } { - item.authStrategy == AuthStrategy.api_key && + item.authStrategy.strategy == AuthStrategy.api_key && <>
} { - item.authStrategy == AuthStrategy.basic && + item.authStrategy.strategy == AuthStrategy.basic && <>
} - {item.authStrategy && - - {item.authStrategy} + {item.authStrategy.strategy && + + {item.authStrategy.strategy} }
diff --git a/apps/client-ts/src/components/Connection/ConnectionTable.tsx b/apps/client-ts/src/components/Connection/ConnectionTable.tsx index 13f0aa700..048e26ed8 100644 --- a/apps/client-ts/src/components/Connection/ConnectionTable.tsx +++ b/apps/client-ts/src/components/Connection/ConnectionTable.tsx @@ -125,7 +125,7 @@ export default function ConnectionTable() { } - {ts && } + {ts && }
diff --git a/apps/client-ts/src/components/Connection/columns.tsx b/apps/client-ts/src/components/Connection/columns.tsx index ceb3c965f..e3fca11ac 100644 --- a/apps/client-ts/src/components/Connection/columns.tsx +++ b/apps/client-ts/src/components/Connection/columns.tsx @@ -10,6 +10,8 @@ import { toast } from "sonner" import { getLogoURL } from "@panora/shared" import { formatISODate, truncateMiddle } from "@/lib/utils" import { Button } from "../ui/button" +import { Label } from "../ui/label" +import { Popover, PopoverContent, PopoverTrigger } from "../ui/popover" const connectionTokenComponent = ({row}:{row:any}) => { const handleCopy = async () => { @@ -35,6 +37,70 @@ const connectionTokenComponent = ({row}:{row:any}) => { ) } +const Customizer = ({ + logo, + name, + lastSync, + authStrategy, + linkedUserId, + connectionToken, +}: { + logo: string; + name: string; + lastSync: string; + authStrategy: string; + linkedUserId: string; + connectionToken: string; +}) => { + return ( +
+
+
+
+ +
+ {`${name.substring(0, 1).toUpperCase()}${name.substring(1)}`} + {authStrategy} +
+
+
+
+
+
+ + {lastSync} +
+
+ + {truncateMiddle(connectionToken,6)} +
+
+ + {truncateMiddle(linkedUserId,6)} +
+
+
+ + +
+
+ + ) +} + export const columns: ColumnDef[] = [ { accessorKey: "app", @@ -82,30 +148,6 @@ export const columns: ColumnDef[] = [ enableSorting: false, enableHiding: false, }, - { - accessorKey: "status", - header: ({ column }) => ( - - ), - cell: ({ row }) => { - /*const direction = priorities.find( - (direction) => direction.value === row.getValue("status") - ) - - if (!direction) { - return null - }*/ - - return ( -
- {row.getValue("status")} -
- ) - }, - filterFn: (row, id, value) => { - return value.includes(row.getValue(id)) - }, - }, { accessorKey: "linkedUser", header: ({ column }) => ( @@ -151,5 +193,38 @@ export const columns: ColumnDef[] = [ ), cell: connectionTokenComponent + }, + { + accessorKey: "status", + header: ({ column }) => ( + '' + ), + cell: ({ row }) => { + return ( +
+ + + + + + + + +
+ ) + }, + filterFn: (row, id, value) => { + return value.includes(row.getValue(id)) + }, } -] \ No newline at end of file +]; \ No newline at end of file diff --git a/apps/client-ts/src/components/Events/EventsTable.tsx b/apps/client-ts/src/components/Events/EventsTable.tsx index 88befe029..680d91197 100644 --- a/apps/client-ts/src/components/Events/EventsTable.tsx +++ b/apps/client-ts/src/components/Events/EventsTable.tsx @@ -18,7 +18,7 @@ export default function EventsTable() { error, } = useEvents({ page: pagination.page, - pageSize: pagination.pageSize, + limit: pagination.limit, }); const transformedEvents = events?.map((event: Event) => ({ diff --git a/apps/client-ts/src/components/RootLayout/index.tsx b/apps/client-ts/src/components/RootLayout/index.tsx index 64f90ff34..4ea5f5493 100644 --- a/apps/client-ts/src/components/RootLayout/index.tsx +++ b/apps/client-ts/src/components/RootLayout/index.tsx @@ -97,7 +97,6 @@ export const RootLayout = ({children}:{children:React.ReactNode}) => {
-

Project

Rows per page