Skip to content

Commit

Permalink
Update work pool toggle permission check
Browse files Browse the repository at this point in the history
  • Loading branch information
pleek91 committed Aug 27, 2024
1 parent 7d521b1 commit 4296dd1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/components/WorkPoolToggle.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<template>
<p-tooltip text="Pause or resume this work pool">
<p-toggle v-if="workPool.can.update" v-model="internalValue" />
</p-tooltip>
<template v-if="workPool.can.update">
<p-tooltip text="Pause or resume this work pool">
<p-toggle v-model="internalValue" />
</p-tooltip>
</template>
</template>

<script lang="ts" setup>
import { PToggle, showToast } from '@prefecthq/prefect-design'
import { computed } from 'vue'
import { useCan, useWorkspaceApi } from '@/compositions'
import { useWorkspaceApi } from '@/compositions'
import { localization } from '@/localization'
import { WorkPool } from '@/models'
import { getApiErrorMessage } from '@/utilities/errors'
Expand All @@ -20,7 +22,6 @@
(event: 'update'): void,
}>()
const can = useCan()
const api = useWorkspaceApi()
const internalValue = computed({
Expand Down

0 comments on commit 4296dd1

Please sign in to comment.