diff --git a/apps/webapp/app/routes/__app/orgs/$organizationSlug/workflows/$workflowSlug/index.tsx b/apps/webapp/app/routes/__app/orgs/$organizationSlug/workflows/$workflowSlug/index.tsx index 4233ce188..964865b25 100644 --- a/apps/webapp/app/routes/__app/orgs/$organizationSlug/workflows/$workflowSlug/index.tsx +++ b/apps/webapp/app/routes/__app/orgs/$organizationSlug/workflows/$workflowSlug/index.tsx @@ -1,8 +1,9 @@ import { EventRule } from ".prisma/client"; import { Disclosure } from "@headlessui/react"; -import { BeakerIcon } from "@heroicons/react/20/solid"; +import { BeakerIcon, CheckCircleIcon } from "@heroicons/react/20/solid"; import { ArrowsRightLeftIcon, + CheckIcon, ChevronDownIcon, Cog6ToothIcon, InformationCircleIcon, @@ -243,8 +244,7 @@ export default function Page() { ) : ( <> )} - {workflow.status === "CREATED" && - eventRule && + {eventRule && eventRule.trigger.type === "WEBHOOK" && workflow.externalSourceConfig?.type === "manual" && ( @@ -253,7 +253,11 @@ export default function Page() {
- Register your webhook + {workflow.status === "CREATED" ? ( + Register your webhook + ) : ( + Webhook details + )}
@@ -268,97 +272,105 @@ export default function Page() {
- {workflow.status === "CREATED" && ( - <> - {eventRule && - eventRule.trigger.type === "WEBHOOK" && - workflow.externalSourceConfig?.type === "manual" ? ( -
- {workflow.externalSourceConfig.data.success ? ( - <> + <> + {eventRule && + eventRule.trigger.type === "WEBHOOK" && + workflow.externalSourceConfig?.type === "manual" ? ( +
+ {workflow.externalSourceConfig.data.success ? ( + <> + {workflow.status === "CREATED" ? ( Use these details to register your webhook. This usually involves logging in to the developer section of the service. -
+ ) : ( +
+ + + Your webhook has been registered. + +
+ )} + +
+
+ + URL + +
+ + +
+
+ {workflow.externalSourceConfig.data + .secret && (
- URL + Secret
- {workflow.externalSourceConfig.data - .secret && ( -
- - Secret - -
- - -
-
- )} -
- - ) : ( -
- - Your custom webhook event is incorrectly - formatted. See the error below - - + )}
- )} -
- ) : ( - - )} - - )} + + ) : ( +
+ + Your custom webhook event is incorrectly + formatted. See the error below + + +
+ )} +
+ ) : ( + + )} +
)}