KI-AGENT: Projekte in der Plantafel nach Zeitraum filtern
This commit is contained in:
@@ -990,16 +990,23 @@ async function loadPlanningBoard() {
|
|||||||
absenceForm.userId = profileOptions.value[0]?.value || ""
|
absenceForm.userId = profileOptions.value[0]?.value || ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const planningEvents = buildEvents({
|
||||||
|
rawEvents: rawEvents || [],
|
||||||
|
projectsById
|
||||||
|
})
|
||||||
|
const visibleProjectResourceIds = new Set(
|
||||||
|
planningEvents.flatMap((event) =>
|
||||||
|
(event.resourceIds || []).filter((resourceId) => resourceId.startsWith("PRJ-"))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
resources.value = buildResources({
|
resources.value = buildResources({
|
||||||
profiles: profiles.value,
|
profiles: profiles.value,
|
||||||
inventoryitems: inventoryitems.value,
|
inventoryitems: inventoryitems.value,
|
||||||
projects: projects.value
|
projects: projects.value.filter((project) => visibleProjectResourceIds.has(`PRJ-${project.id}`))
|
||||||
})
|
})
|
||||||
|
|
||||||
events.value = buildEvents({
|
events.value = planningEvents.concat(buildAbsenceEvents(absenceSpansByUserId))
|
||||||
rawEvents: rawEvents || [],
|
|
||||||
projectsById
|
|
||||||
}).concat(buildAbsenceEvents(absenceSpansByUserId))
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("loadPlanningBoard failed", error)
|
console.error("loadPlanningBoard failed", error)
|
||||||
toast.add({
|
toast.add({
|
||||||
|
|||||||
Reference in New Issue
Block a user