- Replace all AppDrawer with MalioDrawer across 10 drawer components - Replace native <button> with MalioButton/MalioButtonIcon in all pages and components - Fix TimeTrackingExportDrawer: use MalioSelectCheckbox for multi-select filters - Add Malio design system colors (m-btn-*, m-disabled, m-surface) to tailwind.config.ts - Align toggle button heights with MalioButton (h-[40px]) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
94 lines
2.9 KiB
Vue
94 lines
2.9 KiB
Vue
<template>
|
|
<Teleport v-if="modelValue" to="body">
|
|
<Transition name="modal" appear>
|
|
<div class="fixed inset-0 z-50 flex items-center justify-center">
|
|
<div class="absolute inset-0 bg-black/30" @click="cancel" />
|
|
<div class="relative z-10 w-full max-w-md rounded-lg bg-white p-6 shadow-xl">
|
|
<h3 class="text-lg font-bold text-neutral-900">{{ $t('taskStatuses.deleteStatus', { label: statusLabel }) }}</h3>
|
|
|
|
<p class="mt-3 text-sm text-neutral-600">
|
|
{{ taskCount > 1 ? $t('taskStatuses.linkedTasksPlural', { count: taskCount }) : $t('taskStatuses.linkedTasks', { count: taskCount }) }}
|
|
</p>
|
|
|
|
<div class="mt-4">
|
|
<MalioSelect
|
|
v-model="targetStatusId"
|
|
:options="targetOptions"
|
|
:label="$t('taskStatuses.moveTo')"
|
|
:empty-option-label="$t('taskStatuses.backlog')"
|
|
min-width="w-full"
|
|
/>
|
|
</div>
|
|
|
|
<div class="mt-6 flex justify-end gap-3">
|
|
<MalioButton
|
|
variant="tertiary"
|
|
:label="$t('common.cancel')"
|
|
button-class="w-auto px-4"
|
|
@click="cancel"
|
|
/>
|
|
<MalioButton
|
|
variant="danger"
|
|
:label="$t('common.delete')"
|
|
button-class="w-auto px-4"
|
|
:disabled="isProcessing"
|
|
@click="confirm"
|
|
/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</Transition>
|
|
</Teleport>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import type { TaskStatus } from '~/services/dto/task-status'
|
|
|
|
const props = defineProps<{
|
|
modelValue: boolean
|
|
statusLabel: string
|
|
taskCount: number
|
|
availableStatuses: TaskStatus[]
|
|
}>()
|
|
|
|
const emit = defineEmits<{
|
|
(e: 'update:modelValue', value: boolean): void
|
|
(e: 'confirm', targetStatusId: number | null): void
|
|
}>()
|
|
|
|
const targetStatusId = ref<number | null>(null)
|
|
const isProcessing = ref(false)
|
|
|
|
const targetOptions = computed(() =>
|
|
props.availableStatuses.map(s => ({ label: s.label, value: s.id }))
|
|
)
|
|
|
|
watch(() => props.modelValue, (open) => {
|
|
if (open) {
|
|
targetStatusId.value = null
|
|
isProcessing.value = false
|
|
}
|
|
})
|
|
|
|
function cancel() {
|
|
emit('update:modelValue', false)
|
|
}
|
|
|
|
function confirm() {
|
|
isProcessing.value = true
|
|
emit('confirm', targetStatusId.value)
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
.modal-enter-active,
|
|
.modal-leave-active {
|
|
transition: opacity 0.2s ease;
|
|
}
|
|
|
|
.modal-enter-from,
|
|
.modal-leave-to {
|
|
opacity: 0;
|
|
}
|
|
</style>
|