fix: Fix error handler token injection (#2598)

* fix: Fix error handler token injection

* Add frontend
This commit is contained in:
Guillaume Bouvignies
2023-11-09 11:58:45 +01:00
committed by GitHub
parent 198e282566
commit aefa43dcaf
6 changed files with 24 additions and 29 deletions
@@ -218,7 +218,8 @@
<span class="w-full flex mb-3">
<Toggle
disabled={!$enterpriseLicense || !isEditable}
checked={handlerPath === slackHandlerScriptPath}
checked={handlerPath?.startsWith('hub/') &&
handlerPath?.endsWith('/workspace-or-schedule-error-handler-slack')}
options={{ right: slackToggleText }}
on:change={async (e) => {
handlerPath = e.detail ? slackHandlerScriptPath : undefined
@@ -238,7 +239,7 @@
class="text-xs"
/>
{/if}
{#if handlerPath === slackHandlerScriptPath && enterpriseLicense}
{#if enterpriseLicense && handlerPath?.startsWith('hub/') && handlerPath?.endsWith('/workspace-or-schedule-error-handler-slack')}
{#if !workspaceConnectedToSlack}
<Alert type="error" title="Workspace not connected to Slack">
<div class="flex flex-row gap-x-1 w-full items-center">