fix(frontend): disable the Slack and Teams handler controls without a license

Matches the workspace error handler, which greys out its built-in destinations
and hides the test button on an unlicensed instance. The custom destination stays
editable: unlike the error handler, the variable expiration handler itself is not
an EE feature.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
AlexRV12
2026-09-24 15:54:49 +02:00
co-authored by Claude Opus 5.5
parent 62ec7a818c
commit 37f694c69d
@@ -47,7 +47,7 @@
import type { Schema, SupportedLanguage } from '$lib/common'
import { base } from '$lib/base'
import { workspaceStore } from '$lib/stores'
import { enterpriseLicense, workspaceStore } from '$lib/stores'
import { emptySchema, emptyString, sendUserToast, tryEvery } from '$lib/utils'
import {
FlowService,
@@ -301,7 +301,7 @@
{#if workspaceConnectedToSlack}
<Toggle
disabled={!isEditable}
disabled={!$enterpriseLicense || !isEditable}
checked={isSlackHandler}
options={{ right: 'Notify a Slack channel when a variable is about to expire' }}
on:change={async (e) => {
@@ -316,7 +316,7 @@
<Loader2 class="animate-spin" />
{:then Module}
<Module.default
disabled={!isEditable}
disabled={!$enterpriseLicense || !isEditable}
schema={slackHandlerSchema}
hiddenArgs={['slack']}
schemaFieldTooltip={{
@@ -341,7 +341,7 @@
{#if workspaceConnectedToTeams}
<Toggle
disabled={!isEditable}
disabled={!$enterpriseLicense || !isEditable}
checked={isTeamsHandler}
options={{ right: 'Notify a Teams channel when a variable is about to expire' }}
on:change={async (e) => {
@@ -378,7 +378,7 @@
{/if}
{/if}
{#if (isSlackHandler || isTeamsHandler) && isEditable}
{#if (isSlackHandler || isTeamsHandler) && isEditable && $enterpriseLicense}
<div class="flex flex-col gap-2">
<Button
disabled={emptyString(handlerExtraArgs[CHANNEL_KEY])}