fix(view): correctly resolve label for filtered views or buckets
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
kolaente 2024-09-13 19:14:54 +02:00
parent f425d98b4d
commit 5a7c3927f3
Signed by: konrad
GPG Key ID: F40E70337AB24C9B

@ -30,7 +30,7 @@ const projectStore = useProjectStore()
onBeforeMount(() => {
const transform = (filterString: string) => transformFilterStringFromApi(
filterString,
labelId => labelStore.getLabelById(labelId)?.title,
labelId => labelStore.getLabelById(labelId)?.title || null,
projectId => projectStore.projects[projectId]?.title || null,
)
@ -51,7 +51,7 @@ onBeforeMount(() => {
function save() {
const transformFilter = (filterQuery: string) => transformFilterStringForApi(
filterQuery,
labelTitle => labelStore.filterLabelsByQuery([], labelTitle)[0]?.id || null,
labelTitle => labelStore.getLabelByExactTitle(labelTitle)?.id || null,
projectTitle => {
const found = projectStore.findProjectByExactname(projectTitle)
return found?.id || null