fix: [AH-885]: disable toggle for internal webhooks (#3565)

* fix: [AH-885]: disable toggle for internal webhooks
main
Shivanand Sonnad 2025-03-18 07:37:16 +00:00 committed by Harness
parent 1fca95942f
commit 527b6dc58f
1 changed files with 2 additions and 2 deletions

View File

@ -46,7 +46,7 @@ export const WebhookNameCell: Renderer<{
row: Row<Webhook>
column: ColumnInstance<Webhook> & WebhookListColumnActions
}> = ({ row, column }) => {
const { name, enabled, identifier } = row.original
const { name, enabled, identifier, internal } = row.original
const { readonly } = column
const [isEnabled, setIsEnabled] = useState(enabled)
const registryRef = useGetSpaceRef()
@ -75,7 +75,7 @@ export const WebhookNameCell: Renderer<{
<Layout.Horizontal spacing="small" flex={{ alignItems: 'center', justifyContent: 'flex-start' }}>
<Icon name="code-webhook" size={24} />
<Container onClick={killEvent}>
<Toggle disabled={readonly} checked={isEnabled} onToggle={handleUpdateToggle} />
<Toggle disabled={readonly || internal} checked={isEnabled} onToggle={handleUpdateToggle} />
</Container>
<Text lineClamp={1} font={{ variation: FontVariation.BODY }} color={Color.PRIMARY_7}>
{name}