diff --git a/src/app/app.component.html b/src/app/app.component.html index 0396b0a..8d42434 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -23,7 +23,7 @@
-
+
play_circle_filled Hide Controls
diff --git a/src/app/manageStakeholders/manageStakeholders.component.ts b/src/app/manageStakeholders/manageStakeholders.component.ts index d811e2b..5fc07fa 100644 --- a/src/app/manageStakeholders/manageStakeholders.component.ts +++ b/src/app/manageStakeholders/manageStakeholders.component.ts @@ -175,6 +175,7 @@ export class ManageStakeholdersComponent implements OnInit, OnDestroy { this.stakeholders.filter(stakeholder => stakeholder.alias !== this.stakeholder.alias) )] ), + isDefault: this.fb.control(isDefault), isPublic: this.fb.control(this.stakeholder.isPublic), isActive: this.fb.control(this.stakeholder.isActive), type: this.fb.control(this.stakeholder.type, Validators.required), @@ -207,15 +208,16 @@ export class ManageStakeholdersComponent implements OnInit, OnDestroy { public saveStakeholder() { if (this.index === -1) { - if (this.stakeholderFb.value.defaultId) { - // TODO set defaultId from default profile - // this.stakeholderFb.setValue(this.stakeholderUtils. - // createFunderFromDefaultProfile(this.stakeholderFb.value, - // this.defaultStakeholders.find( value => value.type === this.stakeholderFb.value.type).topics)); - this.stakeholderFb.setValue(this.stakeholderUtils.createFunderFromDefaultProfile(this.stakeholderFb.value, StakeholderCreator.createFunderDefaultProfile().topics)); - }/* else { - this.stakeholderFb.setValue(StakeholderCreator.createFunderDefaultProfile()); - }*/ + if (!this.stakeholderFb.value.isDefault) { + let stakeholder = this.defaultStakeholders.find(value => value.type === this.stakeholderFb.value.type); + this.stakeholderFb.get('defaultId').setValue(stakeholder._id); + this.stakeholderFb.setValue(this.stakeholderUtils.createFunderFromDefaultProfile(this.stakeholderFb.value, + stakeholder.topics)); + /* this.stakeholderFb.setValue(this.stakeholderUtils.createFunderFromDefaultProfile(this.stakeholderFb.value, + StakeholderCreator.createFunderDefaultProfile().topics));*/ + } else { + this.stakeholderFb.setValue(StakeholderCreator.createFunderDefaultProfile()); + } this.stakeholderService.buildStakeholder(this.properties.monitorServiceAPIURL, this.stakeholderFb.value).subscribe(stakeholder => { if (stakeholder.defaultId === null) { this.defaultStakeholders.push(stakeholder); diff --git a/src/app/topic/indicators.component.html b/src/app/topic/indicators.component.html index 84f6118..dcdd103 100644 --- a/src/app/topic/indicators.component.html +++ b/src/app/topic/indicators.component.html @@ -51,10 +51,10 @@

Number Indicators

-
+

{{number.title}}

@@ -63,19 +63,22 @@ [class.uk-width-1-3@m]="grid && indicator.width === 'small'" [class.uk-width-1-2@m]="grid && indicator.width === 'medium'" [class.uk-width-1-1@m]="!grid || indicator.width === 'large'" + [class.disable-sortable]="!canReorder" [class.uk-sortable-nodrag]="!canReorder">
- + +
{{indicatorUtils.isPublicIcon.get(indicator.isPublic)}} {{(indicator.isPublic) ? 'Public' : 'Private'}} - - +
+
{{indicatorUtils.isActiveIcon}} {{(indicator.isActive) ? 'Active' : 'Inactive'}} - +
+
more_vert
-
+

Chart Indicators

- -
-
-

{{chart.title}}

-
- -
-
-
-
- - - - {{indicatorUtils.chartTypesIcons.get(indicatorPath.type)}} - - {{indicatorPath.type + ' Chart'}} - - - - - {{indicatorUtils.isPublicIcon.get(indicator.isPublic)}} - - {{(indicator.isPublic) ? 'Public' : 'Private'}} - - - - {{indicatorUtils.isActiveIcon}} - - {{(indicator.isActive) ? 'Active' : 'Inactive'}} - -
- more_vert -
- +
+ +
+
+
+ +
+
+
+

{{chart.title}}

+
+ +
+
+
+
+ +
+ + {{indicatorUtils.chartTypesIcons.get(indicatorPath.type)}} + + {{indicatorPath.type + ' Chart'}} +
+
+
+ + {{indicatorUtils.isPublicIcon.get(indicator.isPublic)}} + + {{(indicator.isPublic) ? 'Public' : 'Private'}} +
+
+ + {{indicatorUtils.isActiveIcon}} + + {{(indicator.isActive) ? 'Active' : 'Inactive'}} +
+ +
+
+ {{indicator.name ? indicator.name : indicator.indicatorPaths[0].parameters['title']}} +
+
+
+
+
+ {{indicator.description ? indicator.description : ''}} +
+
+
+ + {{indicatorUtils.chartTypesIcons.get(indicatorPath.type)}} + +
{{indicatorPath.type + ' Chart'}}
+
+
+
+ + {{indicatorUtils.isPublicIcon.get(indicator.isPublic)}} + +
{{(indicator.isPublic) ? 'Public' : 'Private'}}
+
+
+ + {{indicatorUtils.isActiveIcon}} + +
{{(indicator.isActive) ? 'Active' : 'Inactive'}}
-
- {{indicator.name ? indicator.name : indicator.indicatorPaths[0].parameters['title']}} +
+
+ +
+
+
+
+ add + Create a custom Indicator
-
+
- {{indicator.description ? indicator.description : ''}} + Use our advance tool to create a custom Indicator that suit the needs of your funding + KPI's.
-
-
- - {{indicatorUtils.chartTypesIcons.get(indicatorPath.type)}} - -
{{indicatorPath.type + ' Chart'}}
-
-
-
- - {{indicatorUtils.isPublicIcon.get(indicator.isPublic)}} - -
{{(indicator.isPublic) ? 'Public' : 'Private'}}
-
-
- - {{indicatorUtils.isActiveIcon}} - -
{{(indicator.isActive) ? 'Active' : 'Inactive'}}
+
+ add
- -
-
-
-
- add - Create a custom Indicator -
-
-
-
-
- Use our advance tool to create a custom Indicator that suit the needs of your funding - KPI's. -
-
- add -
-
-
-
-
-
- +
+
+