From 9fffe11fdb96e807c10b52cd8f03d0de254d29ce Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Fri, 30 Dec 2022 15:42:13 +0000 Subject: [PATCH] Connecting sources and services is working --- .../integrations/ConnectionSelector.tsx | 16 +++++-- .../integrations/WorkflowConnections.tsx | 6 ++- .../routes/resources/services/$serviceId.ts | 42 +++++++++++++++++++ 3 files changed, 58 insertions(+), 6 deletions(-) create mode 100644 apps/webapp/app/routes/resources/services/$serviceId.ts diff --git a/apps/webapp/app/components/integrations/ConnectionSelector.tsx b/apps/webapp/app/components/integrations/ConnectionSelector.tsx index 50b8af3cf..08b1bb3bd 100644 --- a/apps/webapp/app/components/integrations/ConnectionSelector.tsx +++ b/apps/webapp/app/components/integrations/ConnectionSelector.tsx @@ -5,10 +5,12 @@ import classNames from "classnames"; import type { CatalogIntegration } from "internal-catalog"; import { Fragment } from "react"; import type { APIConnection } from "~/models/apiConnection.server"; -import { BasicConnectButton, ConnectButton } from "./ConnectButton"; +import { BasicConnectButton } from "./ConnectButton"; +import { IntegrationIcon } from "./IntegrationIcon"; type Props = { - sourceId: string; + type: "source" | "service"; + sourceServiceId: string; organizationId: string; integration: CatalogIntegration; connections: Pick[]; @@ -16,7 +18,8 @@ type Props = { }; export function ConnectionSelector({ - sourceId, + type, + sourceServiceId, integration, connections, selectedConnectionId, @@ -30,6 +33,8 @@ export function ConnectionSelector({ key={integration.slug} integration={integration} organizationId={organizationId} + sourceId={type === "source" ? sourceServiceId : undefined} + serviceId={type === "service" ? sourceServiceId : undefined} /> ); } @@ -80,7 +85,9 @@ export function ConnectionSelector({ return ( + {connectionSlots.source.integration.name} {slot.integration?.name}