fix(views): transform bucket configurations
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This fixes a bug where filter buckets would not be editable because the bucket configuration was a read-only entry from the watcher.
This commit is contained in:
parent
c47d8c6dbe
commit
755e53af70
@ -23,13 +23,20 @@ const projectStore = useProjectStore()
|
||||
watch(
|
||||
() => modelValue,
|
||||
newValue => {
|
||||
|
||||
const transform = filterString => transformFilterStringFromApi(
|
||||
filterString,
|
||||
labelId => labelStore.getLabelById(labelId)?.title,
|
||||
projectId => projectStore.projects[projectId]?.title || null,
|
||||
)
|
||||
|
||||
const transformed = {
|
||||
...newValue,
|
||||
filter: transformFilterStringFromApi(
|
||||
newValue.filter,
|
||||
labelId => labelStore.getLabelById(labelId)?.title,
|
||||
projectId => projectStore.projects[projectId]?.title || null,
|
||||
),
|
||||
filter: transform(newValue.filter),
|
||||
bucketConfiguration: newValue.bucketConfiguration.map(bc => ({
|
||||
title: bc.title,
|
||||
filter: transform(bc.filter),
|
||||
})),
|
||||
}
|
||||
|
||||
if (JSON.stringify(view.value) !== JSON.stringify(transformed)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user