diff --git a/src/app/topic/indicators.component.html b/src/app/topic/indicators.component.html
index a3acced..ca03a4d 100644
--- a/src/app/topic/indicators.component.html
+++ b/src/app/topic/indicators.component.html
@@ -80,9 +80,9 @@
{{indicator.isActive ? 'Deactivate' : 'Activate'}}
-
+
Delete
@@ -157,9 +157,9 @@
{{indicator.isActive ? 'Deactivate' : 'Activate'}}
-
+
Delete
diff --git a/src/app/topic/indicators.component.ts b/src/app/topic/indicators.component.ts
index 6d8d260..87bf037 100644
--- a/src/app/topic/indicators.component.ts
+++ b/src/app/topic/indicators.component.ts
@@ -468,8 +468,22 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.subcategoryIndex]._id,
indicator._id
];
- this.stakeholderService.toggleStatus(this.properties.monitorServiceAPIURL, path).subscribe(status => {
- indicator.isActive = status;
+ this.stakeholderService.toggleStatus(this.properties.monitorServiceAPIURL, path).subscribe(isActive => {
+ indicator.isActive = isActive;
+ this.stakeholderService.setStakeholder(this.stakeholder);
+ });
+ }
+
+ toggleIndicatorAccess(indicator: Indicator) {
+ let path = [
+ this.stakeholder._id,
+ this.stakeholder.topics[this.topicIndex]._id,
+ this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex]._id,
+ this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.subcategoryIndex]._id,
+ indicator._id
+ ];
+ this.stakeholderService.toggleAccess(this.properties.monitorServiceAPIURL, path).subscribe(isPublic => {
+ indicator.isPublic = isPublic;
this.stakeholderService.setStakeholder(this.stakeholder);
});
}