diff --git a/src/back/tests/migrations/__pycache__/0003_testing_is_active.cpython-310.pyc b/src/back/tests/migrations/__pycache__/0003_testing_is_active.cpython-310.pyc new file mode 100644 index 000000000..47edc650d Binary files /dev/null and b/src/back/tests/migrations/__pycache__/0003_testing_is_active.cpython-310.pyc differ diff --git a/src/front/src/components/testing/CatalogTest.vue b/src/front/src/components/testing/CatalogTest.vue index dd0fed109..dbdffd713 100644 --- a/src/front/src/components/testing/CatalogTest.vue +++ b/src/front/src/components/testing/CatalogTest.vue @@ -78,8 +78,13 @@ export default { const search = ref(''); const searchTest = computed(() => { - if (!search.value) return props.testingCard; - return props.testingCard.filter((item) => + let filteredTests = props.testingCard; + // Фильтруем неактивные тесты только во вкладке "Назначенные" + if (props.activeTab === 0) { + filteredTests = props.testingCard.filter((test) => test.is_active); + } + if (!search.value) return filteredTests; + return filteredTests.filter((item) => item.name.toLowerCase().includes(search.value.toLowerCase()), ); }); diff --git a/src/front/src/views/TestHomePage.vue b/src/front/src/views/TestHomePage.vue index 9479714d6..19da999d3 100644 --- a/src/front/src/views/TestHomePage.vue +++ b/src/front/src/views/TestHomePage.vue @@ -168,7 +168,8 @@ export default { }) .finally(() => { if (activeTab.value === 0) { - currentTest.value = getAllTests.value.length; + // Считаем только активные тесты для счётчика + currentTest.value = getAllTests.value.filter(test => test.is_active).length; } }); };