Добавление в Архив + Фронт
1. Переписал модуль выпадающего слева меню 2. Добавил механику Архивации задач 3. Запоминания выбранного отдела
This commit is contained in:
@@ -19,6 +19,14 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<button
|
||||
v-if="canArchive"
|
||||
class="btn-archive-card"
|
||||
@click.stop="handleArchive"
|
||||
title="В архив"
|
||||
>
|
||||
<i data-lucide="archive"></i>
|
||||
</button>
|
||||
<span v-if="card.files && card.files.length" class="files-indicator" :title="card.files.length + ' изображений'">
|
||||
<i data-lucide="image-plus"></i>
|
||||
</span>
|
||||
@@ -69,7 +77,7 @@ const props = defineProps({
|
||||
}
|
||||
})
|
||||
|
||||
// defineEmits(['delete']) - будет при раскрытии карточки
|
||||
const emit = defineEmits(['archive'])
|
||||
|
||||
const refreshIcons = () => {
|
||||
if (window.lucide) {
|
||||
@@ -146,6 +154,15 @@ const daysLeftText = computed(() => {
|
||||
const isAvatarUrl = (value) => {
|
||||
return value && (value.startsWith('http://') || value.startsWith('https://') || value.startsWith('/'))
|
||||
}
|
||||
|
||||
// Можно ли архивировать (только если колонка 4)
|
||||
const canArchive = computed(() => {
|
||||
return Number(props.columnId) === 4
|
||||
})
|
||||
|
||||
const handleArchive = () => {
|
||||
emit('archive', props.card.id)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@@ -279,4 +296,33 @@ const isAvatarUrl = (value) => {
|
||||
.due-date.overdue {
|
||||
color: var(--red);
|
||||
}
|
||||
|
||||
.btn-archive-card {
|
||||
display: none;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
color: var(--text-muted);
|
||||
cursor: pointer;
|
||||
transition: all 0.15s;
|
||||
}
|
||||
|
||||
.btn-archive-card i,
|
||||
.btn-archive-card svg {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.card:hover .btn-archive-card {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.btn-archive-card:hover {
|
||||
background: var(--orange);
|
||||
color: #000;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user