fix(views): set correct default view
This commit is contained in:
parent
24fa3b206f
commit
3f8c5a5feb
@ -22,7 +22,6 @@ export default class ProjectViewModel extends AbstractModel<IProjectView> implem
|
||||
super()
|
||||
this.assignData(data)
|
||||
|
||||
|
||||
if (!this.bucketConfiguration) {
|
||||
this.bucketConfiguration = []
|
||||
}
|
||||
|
@ -39,7 +39,11 @@ async function createView() {
|
||||
}
|
||||
|
||||
try {
|
||||
newView.value.bucketConfigurationMode = newView.value.viewKind === 'kanban'
|
||||
? newView.value.bucketConfigurationMode
|
||||
: 'none'
|
||||
newView.value.projectId = projectId
|
||||
|
||||
const result: IProjectView = await projectViewService.value.create(newView.value)
|
||||
success({message: t('project.views.createSuccess')})
|
||||
showCreateForm.value = false
|
||||
@ -66,6 +70,9 @@ async function deleteView() {
|
||||
}
|
||||
|
||||
async function saveView() {
|
||||
if (viewToEdit.value?.viewKind !== 'kanban') {
|
||||
viewToEdit.value.bucketConfigurationMode = 'none'
|
||||
}
|
||||
const result = await projectViewService.value.update(viewToEdit.value)
|
||||
projectStore.setProjectView(result)
|
||||
viewToEdit.value = null
|
||||
|
Loading…
x
Reference in New Issue
Block a user