kin: KIN-126-frontend_dev

This commit is contained in:
Gros Frumos 2026-03-18 17:34:33 +02:00
parent 4f50c4eb73
commit e33a89c82c
6 changed files with 39 additions and 3 deletions

View file

@ -122,6 +122,7 @@ export interface Task {
feedback?: string | null
created_at: string
updated_at: string
completed_at?: string | null
}
export interface Decision {

View file

@ -221,7 +221,9 @@
"settings_integrations_section": "Integrations",
"settings_execution_mode": "Execution mode",
"settings_autocommit": "Autocommit",
"settings_autocommit_hint": "— git commit after pipeline"
"settings_autocommit_hint": "— git commit after pipeline",
"done_date_from": "From",
"done_date_to": "To"
},
"escalation": {
"watchdog_blocked": "Watchdog: task {task_id} blocked — {reason}",

View file

@ -221,7 +221,9 @@
"settings_integrations_section": "Интеграции",
"settings_execution_mode": "Режим выполнения",
"settings_autocommit": "Автокоммит",
"settings_autocommit_hint": "— git commit после pipeline"
"settings_autocommit_hint": "— git commit после pipeline",
"done_date_from": "От",
"done_date_to": "До"
},
"escalation": {
"watchdog_blocked": "Watchdog: задача {task_id} заблокирована — {reason}",

View file

@ -186,6 +186,8 @@ function initStatusFilter(): string[] {
const selectedStatuses = ref<string[]>(initStatusFilter())
const selectedCategory = ref('')
const taskSearch = ref('')
const dateFrom = ref('')
const dateTo = ref('')
function toggleStatus(s: string) {
const idx = selectedStatuses.value.indexOf(s)
@ -659,6 +661,16 @@ const filteredTasks = computed(() => {
let tasks = searchFilteredTasks.value
if (selectedStatuses.value.length > 0) tasks = tasks.filter(t => selectedStatuses.value.includes(t.status))
if (selectedCategory.value) tasks = tasks.filter(t => t.category === selectedCategory.value)
if ((dateFrom.value || dateTo.value) && selectedStatuses.value.includes('done')) {
tasks = tasks.filter(t => {
if (t.status !== 'done') return true
const dateStr = (t.completed_at || t.updated_at) ?? ''
const d = dateStr.substring(0, 10)
if (dateFrom.value && d < dateFrom.value) return false
if (dateTo.value && d > dateTo.value) return false
return true
})
}
return tasks
})
@ -1077,6 +1089,17 @@ async function addDecision() {
<button v-if="taskSearch" @click="taskSearch = ''"
class="text-gray-600 hover:text-red-400 text-xs px-1"></button>
</div>
<!-- Date filter for done tasks -->
<div v-if="selectedStatuses.includes('done')" class="flex items-center gap-2">
<span class="text-xs text-gray-600">{{ t('projectView.done_date_from') }}</span>
<input type="date" v-model="dateFrom" data-testid="date-from"
class="bg-gray-800 border border-gray-700 rounded px-2 py-0.5 text-xs text-gray-300 focus:border-gray-500 outline-none" />
<span class="text-xs text-gray-600">{{ t('projectView.done_date_to') }}</span>
<input type="date" v-model="dateTo" data-testid="date-to"
class="bg-gray-800 border border-gray-700 rounded px-2 py-0.5 text-xs text-gray-300 focus:border-gray-500 outline-none" />
<button v-if="dateFrom || dateTo" @click="dateFrom = ''; dateTo = ''"
class="text-gray-600 hover:text-red-400 text-xs px-1"></button>
</div>
</div>
<!-- Manual escalation tasks -->
<div v-if="manualEscalationTasks.length" class="mb-4">