fix [P-227]: "is_active": false не отрисовываем
This commit is contained in:
1 parent
ba1b3d3724
commit
755b5d98ce
3 files changed
+9
-3
No files matched your search
@@ -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()),
|
||||
);
|
||||
});
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user