[Monitor Dashboard | Trunk]: Fix a bug with delete topic

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-monitor-portal/trunk/monitor_dashboard@60094 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
Konstantinos Triantafyllou 2020-12-08 10:09:15 +00:00
parent 00f01abd59
commit 94424a8317
1 changed files with 4 additions and 4 deletions

View File

@ -234,15 +234,15 @@ export class TopicComponent implements OnInit, OnDestroy, IDeactivateComponent {
this.deleteOpen(childrenAction);
}
public deleteTopic(index = this.topicIndex) {
public deleteTopic() {
let path: string[] = [
this.stakeholder._id,
this.stakeholder.topics[index]._id
this.stakeholder.topics[this.index]._id
];
let callback = (): void => {
this.stakeholder.topics.splice(index, 1);
this.stakeholder.topics.splice(this.index, 1);
};
this.delete('Topic has been successfully be deleted', path, callback, true);
this.delete('Topic has been successfully be deleted', path, callback, (this.topicIndex === this.index));
}
public toggleCategory(index: number) {