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 67a372943..6fddc0616 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 4a5894222..1ac4f283f 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.strategy) { + switch (item?.authStrategy) { 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.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"] + 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"] }, { onSuccess(data) { - if (item?.authStrategy.strategy === AuthStrategy.oauth2) { + if (item?.authStrategy === 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.strategy === AuthStrategy.api_key) { + if (item?.authStrategy === AuthStrategy.api_key) { form.setValue("api_key", data[0]); } - if (item?.authStrategy.strategy === AuthStrategy.basic) { + if (item?.authStrategy === AuthStrategy.basic) { form.setValue("username", data[0]); form.setValue("secret", data[1]); } @@ -435,7 +435,7 @@ export function ConnectorDisplay({ item }: ItemDisplayProps) {
- { item.authStrategy.strategy == AuthStrategy.oauth2 && + { item.authStrategy == AuthStrategy.oauth2 && <> { needsSubdomain(item.name.toLowerCase(), item.vertical!.toLowerCase()) &&
@@ -516,7 +516,7 @@ export function ConnectorDisplay({ item }: ItemDisplayProps) { } { - item.authStrategy.strategy == AuthStrategy.api_key && + item.authStrategy == AuthStrategy.api_key && <>
} { - item.authStrategy.strategy == AuthStrategy.basic && + item.authStrategy == AuthStrategy.basic && <>
} - {item.authStrategy.strategy && - - {item.authStrategy.strategy} + {item.authStrategy && + + {item.authStrategy} }
diff --git a/apps/client-ts/src/components/Connection/ConnectionTable.tsx b/apps/client-ts/src/components/Connection/ConnectionTable.tsx index 048e26ed8..13f0aa700 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 e3fca11ac..ceb3c965f 100644 --- a/apps/client-ts/src/components/Connection/columns.tsx +++ b/apps/client-ts/src/components/Connection/columns.tsx @@ -10,8 +10,6 @@ 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 () => { @@ -37,70 +35,6 @@ 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", @@ -148,6 +82,30 @@ 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 }) => ( @@ -193,38 +151,5 @@ 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 680d91197..88befe029 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, - limit: pagination.limit, + pageSize: pagination.pageSize, }); 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 4ea5f5493..64f90ff34 100644 --- a/apps/client-ts/src/components/RootLayout/index.tsx +++ b/apps/client-ts/src/components/RootLayout/index.tsx @@ -97,6 +97,7 @@ export const RootLayout = ({children}:{children:React.ReactNode}) => {
+

Project

Rows per page