Skip to content
Snippets Groups Projects
Commit 6c63b811 authored by Konrad Mohrfeldt's avatar Konrad Mohrfeldt :koala:
Browse files

refactor: rename function to align with functionality

parent bb87a09b
No related branches found
No related tags found
No related merge requests found
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</div> </div>
</FormGroup> </FormGroup>
<ConfirmDeactivation v-slot="{ resolve }"> <ConfirmDeletion v-slot="{ resolve }">
<AConfirmDialog <AConfirmDialog
:title="t('show.editor.deletion.label')" :title="t('show.editor.deletion.label')"
:confirm-label="t('show.editor.deletion.confirm.confirmLabel', { show: sanitizedShowName })" :confirm-label="t('show.editor.deletion.confirm.confirmLabel', { show: sanitizedShowName })"
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
sanitize-preset="inline-noninteractive" sanitize-preset="inline-noninteractive"
/> />
</AConfirmDialog> </AConfirmDialog>
</ConfirmDeactivation> </ConfirmDeletion>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { createTemplatePromise } from '@vueuse/core' import { createTemplatePromise } from '@vueuse/core'
...@@ -54,7 +54,7 @@ const { t } = useI18n() ...@@ -54,7 +54,7 @@ const { t } = useI18n()
const router = useRouter() const router = useRouter()
const showStore = useShowStore() const showStore = useShowStore()
const ConfirmDeactivation = createTemplatePromise<boolean>() const ConfirmDeletion = createTemplatePromise<boolean>()
const sanitizedShowName = computed(() => sanitizeHTML(props.show.name)) const sanitizedShowName = computed(() => sanitizeHTML(props.show.name))
const { const {
...@@ -64,7 +64,7 @@ const { ...@@ -64,7 +64,7 @@ const {
} = useAsyncFunction(() => showStore.remove(props.show.id)) } = useAsyncFunction(() => showStore.remove(props.show.id))
async function confirmDeleteShow() { async function confirmDeleteShow() {
if (await ConfirmDeactivation.start()) { if (await ConfirmDeletion.start()) {
try { try {
await deleteShow() await deleteShow()
await router.push({ name: 'shows' }) await router.push({ name: 'shows' })
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment