Skip to content

Commit

Permalink
Make removing parent relationship more convenient
Browse files Browse the repository at this point in the history
The parent relationship of a project can be removed in the frontend by
selecting the currently selected parent for a second time.
To make this removal more convenient, the ProjectDetailsModal now
preloads the parent selection with the selected parent instead of an
empty list, where you'd have to search for the parent to remove it.

Signed-off-by: RBickert <rbt@mm-software.com>
  • Loading branch information
rbt-mm committed Feb 21, 2023
1 parent 45b4910 commit 5f88200
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/views/portfolio/projects/ProjectDetailsModal.vue
Expand Up @@ -197,6 +197,7 @@
if (!this.retrievedParents && this.project.parent) {
this.parent = (await this.axios.get(`${this.$api.BASE_URL}/${this.$api.URL_PROJECT}/${this.project.parent.uuid}`)).data
this.selectedParent = this.parent
this.availableParents = this.parent ? [this.parent] : []
this.retrievedParents = true
}
this.$root.$emit("bv::show::modal", "projectDetailsModal")
Expand Down Expand Up @@ -275,15 +276,15 @@
if (response.data) {
this.availableParents = response.data
} else {
this.availableParents = []
this.availableParents = this.parent ? [this.parent] : []
}
this.isLoading = false
})
}
},
resetValues: function () {
this.selectedParent = this.parent
this.availableParents = []
this.availableParents = this.parent ? [this.parent] : []
}
}
}
Expand Down

0 comments on commit 5f88200

Please sign in to comment.