Handle project delete in detailsview. (#11197)

This commit is contained in:
Abhisar Sinha 2025-08-04 16:26:37 +05:30 committed by GitHub
parent 58484fb44d
commit 626f3de69a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 23 deletions

View File

@ -72,7 +72,7 @@ public class ListProjectRolesCmd extends BaseListCmd {
@Override
public void execute() {
List<ProjectRole> projectRoles;
List<ProjectRole> projectRoles = new ArrayList<>();
if (getProjectId() != null && getProjectRoleId() != null) {
projectRoles = Collections.singletonList(projRoleService.findProjectRole(getProjectRoleId(), getProjectId()));
} else if (StringUtils.isNotBlank(getRoleName())) {

View File

@ -157,17 +157,6 @@ export default {
this.fetchData()
},
inject: ['parentFetchData'],
watch: {
resource: {
deep: true,
handler (newItem) {
if (!newItem || !newItem.id) {
return
}
this.fetchData()
}
}
},
methods: {
fetchData () {
const params = {}
@ -175,6 +164,7 @@ export default {
params.page = this.page
params.pageSize = this.pageSize
this.updateProjectApi = this.$store.getters.apis.updateProject
if (!this.resource.id) return
this.fetchUsers()
this.fetchProjectAccounts(params)
if (this.isProjectRolesSupported()) {

View File

@ -173,17 +173,6 @@ export default {
mounted () {
this.fetchData()
},
watch: {
resource: {
deep: true,
handler (newItem) {
if (!newItem || !newItem.id) {
return
}
this.fetchData()
}
}
},
methods: {
initForm () {
this.formRef = ref()
@ -192,6 +181,7 @@ export default {
},
fetchData () {
this.loading = true
if (!this.resource.id) return
api('listProjectRoles', { projectid: this.resource.id }).then(json => {
const projectRoles = json.listprojectrolesresponse.projectrole
if (!projectRoles || projectRoles.length === 0) {