Skip to content

Scheduling infrastructure for absolutely everyone.

fix: Only able to create one webhook per event type (#14922)

Amit Sharma2f5768b74fb8
diff --git a/apps/web/components/eventtype/EventWebhooksTab.tsx b/apps/web/components/eventtype/EventWebhooksTab.tsx
index 2d6dec9246f..095a5020c48 100644
--- a/apps/web/components/eventtype/EventWebhooksTab.tsx
+++ b/apps/web/components/eventtype/EventWebhooksTab.tsx
@@ -122,10 +122,21 @@ export const EventWebhooksTab = ({ eventType }: Pick<EventTypeSetupProps, "event
{webhooks.length ? (
<>
<div className="border-subtle mb-2 rounded-md border p-8">
- <div className="text-default text-sm font-semibold">{t("webhooks")}</div>
- <p className="text-subtle max-w-[280px] break-words text-sm sm:max-w-[500px]">
- {t("add_webhook_description", { appName: APP_NAME })}
- </p>
+ <div className="flex justify-between">
+ <div>
+ <div className="text-default text-sm font-semibold">{t("webhooks")}</div>
+ <p className="text-subtle max-w-[280px] break-words text-sm sm:max-w-[500px]">
+ {t("add_webhook_description", { appName: APP_NAME })}
+ </p>
+ </div>
+ {isChildrenManagedEventType && !isManagedEventType ? (
+ <Button StartIcon="lock" color="secondary" disabled>
+ {t("locked_by_team_admin")}
+ </Button>
+ ) : (
+ <NewWebhookButton />
+ )}
+ </div>
<div className="border-subtle my-8 rounded-md border">
{webhooks.map((webhook, index) => {