Filter accompanying period works in evaluation selector mode

- Add filtering to show only accompanying period works with evaluations in evaluation selector mode
This commit is contained in:
2025-08-13 13:19:41 +02:00
parent 81a858f07a
commit 9b353f4d1b

View File

@@ -94,7 +94,13 @@ const getAccompanyingPeriodWorks = (periodId: number) => {
makeFetch<number, AccompanyingPeriodWork[]>("GET", url) makeFetch<number, AccompanyingPeriodWork[]>("GET", url)
.then((response) => { .then((response) => {
accompanyingPeriodWorks.value = response; if (props.isEvaluationSelector) {
accompanyingPeriodWorks.value = response.filter(
(acpw) => acpw.accompanyingPeriodWorkEvaluations.length > 0,
);
} else {
accompanyingPeriodWorks.value = response;
}
}) })
.catch((error) => { .catch((error) => {
console.log(error); console.log(error);