[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:
parent
00f01abd59
commit
94424a8317
|
@ -234,15 +234,15 @@ export class TopicComponent implements OnInit, OnDestroy, IDeactivateComponent {
|
||||||
this.deleteOpen(childrenAction);
|
this.deleteOpen(childrenAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
public deleteTopic(index = this.topicIndex) {
|
public deleteTopic() {
|
||||||
let path: string[] = [
|
let path: string[] = [
|
||||||
this.stakeholder._id,
|
this.stakeholder._id,
|
||||||
this.stakeholder.topics[index]._id
|
this.stakeholder.topics[this.index]._id
|
||||||
];
|
];
|
||||||
let callback = (): void => {
|
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) {
|
public toggleCategory(index: number) {
|
||||||
|
|
Loading…
Reference in New Issue