1
0

fix(view): correctly resolve label for filtered views or buckets

(cherry picked from commit 5a7c3927f39fc6b677fd5a76452e1b658d5cf84f)
This commit is contained in:
kolaente 2024-09-13 19:14:54 +02:00
parent 614f70db36
commit 6b850c56f7
No known key found for this signature in database
GPG Key ID: F40E70337AB24C9B

View File

@ -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