diff --git a/frontend/src/business/components/api/automation/scenario/component/ApiComponent.vue b/frontend/src/business/components/api/automation/scenario/component/ApiComponent.vue index 2fc6e2f559..d4c6f9c59d 100644 --- a/frontend/src/business/components/api/automation/scenario/component/ApiComponent.vue +++ b/frontend/src/business/components/api/automation/scenario/component/ApiComponent.vue @@ -214,16 +214,19 @@ }, isCustomizeReq() { if (this.request.referenced == undefined || this.request.referenced === 'Created') { - return true + return true; } return false; }, isDeletedOrRef() { if (this.request.referenced != undefined && this.request.referenced === 'Deleted' || this.request.referenced === 'REF') { - return true + return true; } return false; }, + projectId() { + return this.$store.state.projectId; + }, }, methods: { getEnvironments() { @@ -351,8 +354,11 @@ }) }, getProjectName(id) { - const project = this.projectList.find(p => p.id === id); - return project ? project.name : ""; + if (this.projectId !== id) { + const project = this.projectList.find(p => p.id === id); + return project ? project.name : ""; + } + } } } diff --git a/frontend/src/business/components/api/automation/scenario/component/ApiScenarioComponent.vue b/frontend/src/business/components/api/automation/scenario/component/ApiScenarioComponent.vue index af47b66f4f..bef0594fbd 100644 --- a/frontend/src/business/components/api/automation/scenario/component/ApiScenarioComponent.vue +++ b/frontend/src/business/components/api/automation/scenario/component/ApiScenarioComponent.vue @@ -98,10 +98,13 @@ computed: { isDeletedOrRef() { if (this.scenario.referenced != undefined && this.scenario.referenced === 'Deleted' || this.scenario.referenced === 'REF') { - return true + return true; } return false; - } + }, + projectId() { + return this.$store.state.projectId; + }, }, methods: { remove() { @@ -155,8 +158,11 @@ } }, getProjectName(id) { - const project = this.projectList.find(p => p.id === id); - return project ? project.name : ""; + if (this.projectId !== id) { + const project = this.projectList.find(p => p.id === id); + return project ? project.name : ""; + } + } } }