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
Binary file not shown.
@@ -78,8 +78,13 @@ export default {
|
|||||||
const search = ref('');
|
const search = ref('');
|
||||||
|
|
||||||
const searchTest = computed(() => {
|
const searchTest = computed(() => {
|
||||||
if (!search.value) return props.testingCard;
|
let filteredTests = props.testingCard;
|
||||||
return props.testingCard.filter((item) =>
|
// Фильтруем неактивные тесты только во вкладке "Назначенные"
|
||||||
|
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()),
|
item.name.toLowerCase().includes(search.value.toLowerCase()),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -168,7 +168,8 @@ export default {
|
|||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
if (activeTab.value === 0) {
|
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