1
|
<div id="page_content">
|
2
|
<div class="uk-padding-small md-bg-white" uk-grid>
|
3
|
<div *ngIf="filters" class="uk-width-2-3@m uk-width-1-1 uk-child-width-1-3@m uk-child-width-1-1" uk-grid>
|
4
|
<div>
|
5
|
<div dashboard-input [formInput]="filters.get('chartType')"
|
6
|
type="select" [options]="[all].concat(indicatorUtils.allChartTypes)"
|
7
|
label="Chart Type"></div>
|
8
|
</div>
|
9
|
<div>
|
10
|
<div dashboard-input [formInput]="filters.get('privacy')"
|
11
|
type="select" [options]="[all].concat(indicatorUtils.isPublic)"
|
12
|
label="Privacy"></div>
|
13
|
</div>
|
14
|
<div>
|
15
|
<div dashboard-input [formInput]="filters.get('status')"
|
16
|
type="select" [options]="[all].concat(indicatorUtils.isActive)"
|
17
|
label="Status"></div>
|
18
|
</div>
|
19
|
</div>
|
20
|
<div class="uk-width-expand@m uk-width-1-1 uk-flex uk-flex-middle uk-flex-right">
|
21
|
<div class="uk-inline uk-width-medium">
|
22
|
<span class="uk-position-center-right"><i class="material-icons">search</i></span>
|
23
|
<div dashboard-input [formInput]="filters.get('keyword')" label="Locate indicator"></div>
|
24
|
</div>
|
25
|
<div [class.uk-active]="grid" class="uk-margin-small-left">
|
26
|
<a [routerLink]="" class="uk-icon-button" (click)="changeGrid(true)"><i
|
27
|
class="material-icons">view_module</i></a>
|
28
|
</div>
|
29
|
<div [class.uk-active]="!grid" class="uk-margin-small-left">
|
30
|
<a [routerLink]="" class="uk-icon-button" (click)="changeGrid(false)"><i class="material-icons">list</i></a>
|
31
|
</div>
|
32
|
</div>
|
33
|
</div>
|
34
|
<div *ngIf="stakeholder && canEdit" id="page_content_inner">
|
35
|
<div class="uk-child-width-1-2 uk-flex-middle" uk-grid>
|
36
|
<div>
|
37
|
<ul id="breadcrumbs">
|
38
|
<li><span>{{stakeholder.topics[topicIndex].name}}</span></li>
|
39
|
<li>
|
40
|
<span>{{stakeholder.topics[topicIndex].categories[categoryIndex].name}}</span></li>
|
41
|
<li>
|
42
|
<span class="md-color-blue-900 uk-text-bold">
|
43
|
{{stakeholder.topics[topicIndex].categories[categoryIndex].subCategories[subcategoryIndex].name}}
|
44
|
</span>
|
45
|
</li>
|
46
|
</ul>
|
47
|
</div>
|
48
|
<div class="uk-flex uk-flex-right">
|
49
|
<a class="md-btn md-btn-primary waves-button waves-effect">
|
50
|
<i class="material-icons uk-margin-small-right">remove_red_eye</i>
|
51
|
Preview
|
52
|
<i class="material-icons uk-margin-small-left">keyboard_arrow_down</i>
|
53
|
</a>
|
54
|
<div #element uk-dropdown="mode: click; pos: bottom-right; offset: 5; delay-hide: 0; flip: false"
|
55
|
class="uk-padding-remove-horizontal">
|
56
|
<ul class="uk-nav uk-dropdown-nav">
|
57
|
<li><a target="_blank" [routerLink]="preview" [queryParams]="{view: 'public'}" (click)="hide(element)">Public</a>
|
58
|
</li>
|
59
|
<li><a target="_blank" [routerLink]="preview" [queryParams]="{view: 'private'}" (click)="hide(element)">Private</a>
|
60
|
</li>
|
61
|
</ul>
|
62
|
</div>
|
63
|
</div>
|
64
|
</div>
|
65
|
<h4 class="uk-text-bold">Number Indicators</h4>
|
66
|
<div *ngIf="numberSections">
|
67
|
<ng-template ngFor [ngForOf]="displayNumbers" let-number let-i="index">
|
68
|
<div [class.list-view]="!grid" [id]="'number-' + number._id" [class.section]="isAdministrator"
|
69
|
class="uk-grid-match uk-grid-small uk-grid uk-margin-top"
|
70
|
uk-sortable="group: number" uk-grid>
|
71
|
<div *ngIf="grid" class="tools disable-sortable uk-sortable-nodrag">
|
72
|
<div *ngIf="isAdministrator" class="md-btn-group">
|
73
|
<button [disabled]="editing" class="md-btn md-btn-mini" (click)="createSection(i, 'number')"
|
74
|
title="Create a new section"><i
|
75
|
class="material-icons">add</i></button>
|
76
|
<!--<button class="md-btn md-btn-mini"><i class="material-icons rotate-90">drag_indicator</i></button>-->
|
77
|
<button [disabled]="editing || number.defaultId " class="md-btn md-btn-mini"
|
78
|
[title]="(number.defaultId?'Default sections cannot be deleted':'Delete section')"
|
79
|
(click)="deleteSectionOpen(number, i, 'number', 'delete')"><i class="material-icons">clear</i>
|
80
|
</button>
|
81
|
<!-- <ng-container *ngIf="!stakeholder.defaultId">-->
|
82
|
<!-- <button [disabled]="editing || number.defaultId " class="md-btn md-btn-mini"-->
|
83
|
<!-- [title]="(number.defaultId?'Default sections cannot be deleted':'Delete all related sections')"-->
|
84
|
<!-- (click)="deleteSectionOpen(number, i, 'number', 'delete')"><i class="material-icons">highlight_off</i>-->
|
85
|
<!-- </button>-->
|
86
|
<!-- <button [disabled]="editing || number.defaultId " class="md-btn md-btn-mini"-->
|
87
|
<!-- [title]="(number.defaultId?'Default sections cannot be deleted':'Delete section and disconnect related')"-->
|
88
|
<!-- (click)="deleteSectionOpen(number, i, 'number', 'disconnect')"><i class="material-icons">link_off</i>-->
|
89
|
<!-- </button>-->
|
90
|
<!-- </ng-container>-->
|
91
|
</div>
|
92
|
</div>
|
93
|
<div *ngIf="grid && numberSections.at(i)"
|
94
|
class="uk-form-row uk-width-1-1 uk-grid-medium uk-flex uk-flex-middle uk-margin-bottom disable-sortable uk-sortable-nodrag"
|
95
|
uk-grid>
|
96
|
<div dashboard-input class="uk-width-2-3 uk-width-1-3@m" [formInput]="numberSections.at(i).get('title')"
|
97
|
label="Add a section title"></div>
|
98
|
<div class="uk-width-expand">
|
99
|
<button *ngIf="numberSections.at(i).dirty" class="md-btn" [disabled]="editing"
|
100
|
(click)="saveSection(numberSections.at(i).value, i, 'number')">
|
101
|
Save
|
102
|
</button>
|
103
|
</div>
|
104
|
</div>
|
105
|
<div *ngIf="!grid && number.title" class="uk-width-1-1 disable-sortable uk-sortable-nodrag">
|
106
|
<h4>{{number.title}}</h4>
|
107
|
</div>
|
108
|
<ng-template ngFor [ngForOf]="number.indicators" let-indicator let-j="index">
|
109
|
<div *ngIf="indicator" [id]="indicator._id"
|
110
|
[class.uk-width-1-5@m]="grid && indicator.width === 'small'"
|
111
|
[class.uk-width-1-3@m]="grid && indicator.width === 'medium'"
|
112
|
[class.uk-width-1-2@m]="!grid || indicator.width === 'large'"
|
113
|
[class.disable-sortable]="!canReorder"
|
114
|
[class.uk-sortable-nodrag]="!canReorder">
|
115
|
<div class="md-card" [class.md-card-hover]="canReorder">
|
116
|
<div class="md-card-toolbar">
|
117
|
<div class="md-card-toolbar-actions" [class.uk-flex-middle]="!grid" [class.uk-flex]="!grid">
|
118
|
<ng-template [ngIf]="!grid">
|
119
|
<div class="uk-margin-medium-right uk-flex uk-flex-middle">
|
120
|
<i class="material-icons md-24 uk-margin-small-right">{{indicatorUtils.isPublicIcon.get(indicator.isPublic)}}</i>
|
121
|
{{(indicator.isPublic) ? 'Public' : 'Private'}}
|
122
|
</div>
|
123
|
<div class="uk-margin-medium-right uk-flex uk-flex-middle">
|
124
|
<i class="material-icons md-24 uk-margin-small-right"
|
125
|
[class.md-color-green-300]="indicator.isActive">{{indicatorUtils.isActiveIcon}}</i>
|
126
|
{{(indicator.isActive) ? 'Active' : 'Inactive'}}
|
127
|
</div>
|
128
|
</ng-template>
|
129
|
<div class="md-card-dropdown uk-inline">
|
130
|
<i class="md-icon material-icons">more_vert</i>
|
131
|
<div #element uk-dropdown="mode: click; pos: bottom-right; delay-hide: 0; flip: false"
|
132
|
class="uk-padding-remove-horizontal">
|
133
|
<ul class="uk-nav uk-dropdown-nav">
|
134
|
<li *ngIf="isAdministrator && !indicator.defaultId && !editing"><a
|
135
|
(click)="editNumberIndicatorOpen(number, indicator._id)">Edit</a></li>
|
136
|
<li *ngIf="!editing"><a (click)="toggleIndicatorStatus(number._id, indicator);hide(element)">
|
137
|
{{indicator.isActive ? 'Inactive' : 'Active'}}</a>
|
138
|
</li>
|
139
|
<li *ngIf="!editing"><a (click)="toggleIndicatorAccess(number._id, indicator);hide(element)">
|
140
|
{{indicator.isPublic ? 'Private' : 'Public'}}</a>
|
141
|
</li>
|
142
|
<hr *ngIf="isAdministrator && !indicator.defaultId" class="uk-nav-divider">
|
143
|
<li *ngIf="isAdministrator && !indicator.defaultId && !editing"><a
|
144
|
(click)="deleteIndicatorOpen(number, indicator._id, 'number', 'delete');hide(element)">Delete</a>
|
145
|
<!-- <ng-container *ngIf="!stakeholder.defaultId">-->
|
146
|
<!-- <a (click)="deleteIndicatorOpen(number, indicator._id, 'number', 'delete');hide(element)">Delete from all profiles</a>-->
|
147
|
<!-- <a (click)="deleteIndicatorOpen(number, indicator._id, 'number', 'disconnect');hide(element)">Delete and disconnect from all profiles</a>-->
|
148
|
<!-- </ng-container>-->
|
149
|
</li>
|
150
|
</ul>
|
151
|
</div>
|
152
|
</div>
|
153
|
</div>
|
154
|
<div class="md-card-toolbar-heading-text">
|
155
|
{{indicator.name ? indicator.name : 'No title available'}}
|
156
|
</div>
|
157
|
</div>
|
158
|
<div *ngIf="grid" class="md-card-content">
|
159
|
<div class="uk-flex uk-flex-center" uk-grid>
|
160
|
<div class="uk-width-1-1">
|
161
|
{{indicator.description}}
|
162
|
</div>
|
163
|
<div class="uk-width-1-2 uk-text-center"
|
164
|
title="{{indicator.isPublic?'Visible to all users':'Visible to members'}}">
|
165
|
<i class="material-icons md-24">{{indicatorUtils.isPublicIcon.get(indicator.isPublic)}}</i>
|
166
|
<div>{{(indicator.isPublic) ? 'Public' : 'Private'}}</div>
|
167
|
</div>
|
168
|
<div class="uk-width-1-2 uk-text-center"
|
169
|
title="{{indicator.isActive?'Included in the indicators list':'Available only through administration dashboard'}}">
|
170
|
<i class="material-icons md-24"
|
171
|
[class.md-color-green-300]="indicator.isActive">{{indicatorUtils.isActiveIcon}}</i>
|
172
|
<div>{{(indicator.isActive) ? 'Active' : 'Inactive'}}</div>
|
173
|
</div>
|
174
|
</div>
|
175
|
</div>
|
176
|
</div>
|
177
|
</div>
|
178
|
</ng-template>
|
179
|
<div *ngIf="isAdministrator" class="disable-sortable uk-sortable-nodrag"
|
180
|
[class.uk-width-1-3@m]="grid"
|
181
|
[class.uk-width-1-1@m]="!grid">
|
182
|
<div class="md-card clickable" (click)="editNumberIndicatorOpen(number)">
|
183
|
<div class="md-card-toolbar">
|
184
|
<div class="md-card-toolbar-heading-text"
|
185
|
[class.uk-flex-middle]="!grid"
|
186
|
[class.uk-flex]="!grid"
|
187
|
[class.uk-flex-center]="!grid">
|
188
|
<i *ngIf="!grid" class="material-icons md-36">add</i>
|
189
|
<span>Create a custom Indicator</span>
|
190
|
</div>
|
191
|
</div>
|
192
|
<div *ngIf="grid" class="md-card-content">
|
193
|
<div uk-grid>
|
194
|
<div class="uk-width-1-1">
|
195
|
Create a new number Indicator
|
196
|
</div>
|
197
|
<div class="uk-width-1-1 uk-flex uk-flex-center">
|
198
|
<i class="material-icons md-48">add</i>
|
199
|
</div>
|
200
|
</div>
|
201
|
</div>
|
202
|
</div>
|
203
|
</div>
|
204
|
</div>
|
205
|
</ng-template>
|
206
|
<div *ngIf="grid && isAdministrator" class="new-section uk-margin-top">
|
207
|
<div class="tools uk-flex uk-flex-middle">
|
208
|
<button class="md-btn uk-margin-small-right" (click)="createSection(-1, 'number')">
|
209
|
<i class="material-icons md-24 md-color-white">add</i>
|
210
|
</button>
|
211
|
<span>Create a new section</span>
|
212
|
</div>
|
213
|
</div>
|
214
|
</div>
|
215
|
<h4 class="uk-text-bold">Chart Indicators</h4>
|
216
|
<div *ngIf="chartSections">
|
217
|
<ng-template ngFor [ngForOf]="displayCharts" let-chart let-i="index">
|
218
|
<div [class.list-view]="!grid" [id]="'chart-' + chart._id"
|
219
|
class="uk-grid-match section uk-grid-small uk-grid uk-margin-top"
|
220
|
uk-sortable="group: chart" uk-grid>
|
221
|
<div *ngIf="grid" class="tools disable-sortable uk-sortable-nodrag">
|
222
|
<div class="md-btn-group">
|
223
|
<button [disabled]="editing" class="md-btn md-btn-mini" (click)="createSection(i)"
|
224
|
title="Create a new section"><i
|
225
|
class="material-icons">add</i></button>
|
226
|
<!--<button class="md-btn md-btn-mini"><i class="material-icons rotate-90">drag_indicator</i></button>-->
|
227
|
<button [disabled]="editing || chart.defaultId "
|
228
|
[title]="(chart.defaultId?'Default sections cannot be deleted':'Delete section')"
|
229
|
class="md-btn md-btn-mini" (click)="deleteSectionOpen(chart, i, 'chart', 'delete')"><i
|
230
|
class="material-icons">clear</i>
|
231
|
</button>
|
232
|
<!-- <ng-container *ngIf="!stakeholder.defaultId">-->
|
233
|
<!-- <button [disabled]="editing || chart.defaultId " class="md-btn md-btn-mini"-->
|
234
|
<!-- [title]="(chart.defaultId?'Default sections cannot be deleted':'Delete all related sections')"-->
|
235
|
<!-- (click)="deleteSectionOpen(chart, i, 'chart', 'delete')"><i class="material-icons">highlight_off</i>-->
|
236
|
<!-- </button>-->
|
237
|
<!-- <button [disabled]="editing || chart.defaultId " class="md-btn md-btn-mini"-->
|
238
|
<!-- [title]="(chart.defaultId?'Default sections cannot be deleted':'Delete section and disconnect related')"-->
|
239
|
<!-- (click)="deleteSectionOpen(chart, i, 'chart', 'disconnect')"><i class="material-icons">link_off</i>-->
|
240
|
<!-- </button>-->
|
241
|
<!-- </ng-container>-->
|
242
|
</div>
|
243
|
</div>
|
244
|
<div *ngIf="grid && chartSections.at(i)"
|
245
|
class="uk-form-row uk-width-1-1 uk-grid-medium uk-flex uk-flex-middle uk-margin-bottom disable-sortable uk-sortable-nodrag"
|
246
|
uk-grid>
|
247
|
<div dashboard-input class="uk-width-2-3 uk-width-1-3@m" [formInput]="chartSections.at(i).get('title')"
|
248
|
label="Add a section title"></div>
|
249
|
<div class="uk-width-expand">
|
250
|
<button *ngIf="chartSections.at(i).dirty" class="md-btn" [disabled]="editing"
|
251
|
(click)="saveSection(chartSections.at(i).value, i)">
|
252
|
Save
|
253
|
</button>
|
254
|
</div>
|
255
|
</div>
|
256
|
<div *ngIf="!grid && chart.title" class="uk-width-1-1 disable-sortable uk-sortable-nodrag">
|
257
|
<h4>{{chart.title}}</h4>
|
258
|
</div>
|
259
|
<ng-template ngFor [ngForOf]="chart.indicators" let-indicator let-j="index">
|
260
|
<div *ngIf="indicator" [id]="indicator._id"
|
261
|
[class.uk-width-1-3@m]="grid && indicator.width === 'small'"
|
262
|
[class.uk-width-1-2@m]="grid && indicator.width === 'medium'"
|
263
|
[class.uk-width-1-1@m]="!grid || indicator.width === 'large'"
|
264
|
[class.disable-sortable]="!canReorder"
|
265
|
[class.uk-sortable-nodrag]="!canReorder">
|
266
|
<div class="md-card" [class.md-card-hover]="canReorder">
|
267
|
<div class="md-card-toolbar">
|
268
|
<div class="md-card-toolbar-actions" [class.uk-flex-middle]="!grid" [class.uk-flex]="!grid">
|
269
|
<ng-template [ngIf]="!grid">
|
270
|
<div *ngFor="let indicatorPath of indicator.indicatorPaths"
|
271
|
class="uk-margin-medium-right uk-text-capitalize uk-flex uk-flex-middle">
|
272
|
<i class="material-icons md-24 uk-margin-small-right">
|
273
|
{{indicatorUtils.chartTypesIcons.get(indicatorPath.type)}}
|
274
|
</i>
|
275
|
{{indicatorPath.type + ' Chart'}}
|
276
|
</div>
|
277
|
</ng-template>
|
278
|
<div *ngIf="!grid" class="uk-margin-medium-right uk-flex uk-flex-middle"
|
279
|
title="{{indicator.isPublic?'Visible to all users':'Visible to members'}}">
|
280
|
<i class="material-icons md-24 uk-margin-small-right">
|
281
|
{{indicatorUtils.isPublicIcon.get(indicator.isPublic)}}
|
282
|
</i>
|
283
|
{{(indicator.isPublic) ? 'Public' : 'Private'}}
|
284
|
</div>
|
285
|
<div *ngIf="!grid" class="uk-margin-medium-right uk-flex uk-flex-middle"
|
286
|
title="{{indicator.isActive?'Included in the indicators list':'Available only through administration dashboard'}}">
|
287
|
<i class="material-icons md-24 uk-margin-small-right"
|
288
|
[class.md-color-green-300]="indicator.isActive">
|
289
|
{{indicatorUtils.isActiveIcon}}
|
290
|
</i>
|
291
|
{{(indicator.isActive) ? 'Active' : 'Inactive'}}
|
292
|
</div>
|
293
|
<div class="md-card-dropdown uk-inline">
|
294
|
<i class="md-icon material-icons">more_vert</i>
|
295
|
<div #element uk-dropdown="mode: click; pos: bottom-right; delay-hide: 0; flip: false"
|
296
|
class="uk-padding-remove-horizontal">
|
297
|
<ul class="uk-nav uk-dropdown-nav">
|
298
|
<li *ngIf="!editing"><a (click)="editChartIndicatorOpen(chart, indicator._id);hide(element)">Edit</a>
|
299
|
</li>
|
300
|
<li *ngIf="!editing"><a (click)="toggleIndicatorStatus(chart._id, indicator);hide(element)">
|
301
|
{{indicator.isActive ? 'Inactive' : 'Active'}}</a>
|
302
|
</li>
|
303
|
<li *ngIf="!editing"><a (click)="toggleIndicatorAccess(chart._id, indicator);hide(element)">
|
304
|
{{indicator.isPublic ? 'Private' : 'Public'}}</a>
|
305
|
</li>
|
306
|
<hr *ngIf="!indicator.defaultId " class="uk-nav-divider">
|
307
|
<li *ngIf="!editing && !indicator.defaultId "><a
|
308
|
(click)="deleteIndicatorOpen(chart, indicator._id, 'chart', 'delete');hide(element)">
|
309
|
Delete</a>
|
310
|
<!-- <a (click)="deleteIndicatorOpen(chart, indicator._id, 'chart', 'delete');hide(element)">Delete from all profiles</a>-->
|
311
|
<!-- <a (click)="deleteIndicatorOpen(chart, indicator._id, 'chart', 'disconnect');hide(element)">Delete and disconnect from all profiles</a>-->
|
312
|
</li>
|
313
|
</ul>
|
314
|
</div>
|
315
|
</div>
|
316
|
</div>
|
317
|
<div class="md-card-toolbar-heading-text">
|
318
|
{{indicator.name}}
|
319
|
</div>
|
320
|
</div>
|
321
|
<div *ngIf="grid" class="md-card-content">
|
322
|
<div class="uk-flex uk-flex-center" uk-grid>
|
323
|
|
324
|
<div class="uk-width-1-3 uk-text-center"
|
325
|
[ngClass]="'uk-child-width-1-' + indicator.indicatorPaths.length" uk-grid>
|
326
|
<div *ngFor="let indicatorPath of indicator.indicatorPaths">
|
327
|
<i class="material-icons md-24">
|
328
|
{{indicatorUtils.chartTypesIcons.get(indicatorPath.type)}}
|
329
|
</i>
|
330
|
<div class="uk-text-capitalize">{{indicatorPath.type + ' Chart'}}</div>
|
331
|
</div>
|
332
|
</div>
|
333
|
<div class="uk-width-1-3 uk-text-center"
|
334
|
title="{{indicator.isPublic?'Visible to all users':'Visible to members'}}">
|
335
|
<i class="material-icons md-24">
|
336
|
{{indicatorUtils.isPublicIcon.get(indicator.isPublic)}}
|
337
|
</i>
|
338
|
<div>{{(indicator.isPublic) ? 'Public' : 'Private'}}</div>
|
339
|
</div>
|
340
|
<div class="uk-width-1-3 uk-text-center"
|
341
|
title="{{indicator.isActive?'Included in the indicators list':'Available only through administration dashboard'}}">
|
342
|
<i class="material-icons md-24" [class.md-color-green-300]="indicator.isActive">
|
343
|
{{indicatorUtils.isActiveIcon}}
|
344
|
</i>
|
345
|
<div>{{(indicator.isActive) ? 'Active' : 'Inactive'}}</div>
|
346
|
</div>
|
347
|
<iframe *ngIf="indicator.indicatorPaths[0] && indicator.indicatorPaths[0].source !== 'image' &&
|
348
|
safeUrls.get(indicatorUtils.getFullUrl(stakeholder, indicator.indicatorPaths[0]))"
|
349
|
[src]="safeUrls.get(indicatorUtils.getFullUrl(stakeholder, indicator.indicatorPaths[0]))"
|
350
|
class="uk-width-1-1 uk-height-medium"></iframe>
|
351
|
<div *ngIf="indicator.indicatorPaths[0] && indicator.indicatorPaths[0].source === 'image'">
|
352
|
<img class="uk-width-1-1 uk-height-medium" [src]="indicator.indicatorPaths[0].url">
|
353
|
</div>
|
354
|
<div class="uk-width-1-1 uk-text-muted uk-text-small">
|
355
|
{{indicator.description ? indicator.description : ''}}
|
356
|
</div>
|
357
|
</div>
|
358
|
</div>
|
359
|
</div>
|
360
|
</div>
|
361
|
</ng-template>
|
362
|
<div class="disable-sortable uk-sortable-nodrag"
|
363
|
[class.uk-width-1-3@m]="grid"
|
364
|
[class.uk-width-1-1@m]="!grid">
|
365
|
<div class="md-card clickable" (click)="editChartIndicatorOpen(chart)">
|
366
|
<div class="md-card-toolbar">
|
367
|
<div class="md-card-toolbar-heading-text"
|
368
|
[class.uk-flex-middle]="!grid"
|
369
|
[class.uk-flex]="!grid"
|
370
|
[class.uk-flex-center]="!grid">
|
371
|
<i *ngIf="!grid" class="material-icons md-36">add</i>
|
372
|
<span>Create a custom Indicator</span>
|
373
|
</div>
|
374
|
</div>
|
375
|
<div *ngIf="grid" class="md-card-content">
|
376
|
<div uk-grid>
|
377
|
<div class="uk-width-1-1">
|
378
|
Use our advance tool to create a custom Indicator that suit the needs of your funding
|
379
|
KPI's.
|
380
|
</div>
|
381
|
<div class="uk-width-1-1 uk-flex uk-flex-center">
|
382
|
<i class="material-icons md-48">add</i>
|
383
|
</div>
|
384
|
</div>
|
385
|
</div>
|
386
|
</div>
|
387
|
</div>
|
388
|
</div>
|
389
|
</ng-template>
|
390
|
<div *ngIf="grid" class="new-section uk-margin-top">
|
391
|
<div class="tools uk-flex uk-flex-middle">
|
392
|
<button [disabled]="editing" class="md-btn uk-margin-small-right" (click)="createSection()">
|
393
|
<i class="material-icons md-24 md-color-white">add</i>
|
394
|
</button>
|
395
|
<span>Create a new section</span>
|
396
|
</div>
|
397
|
</div>
|
398
|
</div>
|
399
|
</div>
|
400
|
</div>
|
401
|
<modal-alert #editNumberModal
|
402
|
[classBody]="'large-modal'"
|
403
|
(alertOutput)="saveIndicator()"
|
404
|
[okDisabled]="numberIndicatorFb && (numberIndicatorFb.invalid || numberIndicatorFb.pristine)">
|
405
|
<div *ngIf="numberIndicatorFb" class="uk-padding-small" [formGroup]="numberIndicatorFb">
|
406
|
<div dashboard-input class="uk-form-row" [formInput]="numberIndicatorFb.get('name')" label="Title"></div>
|
407
|
<div dashboard-input class="uk-form-row" [formInput]="numberIndicatorFb.get('description')"
|
408
|
label="Description" type="textarea">
|
409
|
</div>
|
410
|
<div class="uk-form-row uk-flex uk-flex-middle">
|
411
|
<div dashboard-input class="uk-width-small" [formInput]="numberIndicatorFb.get('isPublic')"
|
412
|
label="Accessibility" [options]="indicatorUtils.isPublic" type="select">
|
413
|
</div>
|
414
|
<div dashboard-input class="uk-margin-small-left uk-width-small" [formInput]="numberIndicatorFb.get('isActive')"
|
415
|
label="Visibility" [options]="indicatorUtils.isActive" type="select">
|
416
|
</div>
|
417
|
<div dashboard-input class="uk-margin-small-left uk-width-small" [formInput]="numberIndicatorFb.get('width')"
|
418
|
type="select" [options]="indicatorUtils.indicatorSizes"
|
419
|
label="Number Size">
|
420
|
</div>
|
421
|
</div>
|
422
|
<h5 class="uk-text-bold uk-margin-top uk-margin-bottom">
|
423
|
Number Settings
|
424
|
</h5>
|
425
|
<div *ngIf="numberIndicatorPaths" formArrayName="indicatorPaths">
|
426
|
<div *ngFor="let indicatorPath of numberIndicatorPaths.controls; let i=index"
|
427
|
[formGroup]="indicatorPath">
|
428
|
<div class="uk-grid-medium uk-form-row uk-flex uk-flex-middle" uk-grid>
|
429
|
<div class="uk-width-2-3@s">
|
430
|
<div dashboard-input [formInput]="indicatorPath.get('url')" type="textarea" rows="3"
|
431
|
label="Number path url"></div>
|
432
|
</div>
|
433
|
<div *ngIf="urlParameterizedMessage.length > 0" class="uk-alert-warning uk-alert">
|
434
|
{{urlParameterizedMessage}}
|
435
|
</div>
|
436
|
<div class="uk-width-1-3@s">
|
437
|
<div dashboard-input [formInput]="indicatorPath.get('source')" label="Source"
|
438
|
type="select" [options]="indicatorUtils.sourceTypes">
|
439
|
</div>
|
440
|
</div>
|
441
|
</div>
|
442
|
<div formArrayName="jsonPath">
|
443
|
<div class="uk-margin-top uk-margin-bottom uk-text-large">
|
444
|
JSON Path
|
445
|
</div>
|
446
|
<div class="uk-grid uk-grid-medium" uk-grid>
|
447
|
<div *ngFor="let jsonPath of getJsonPath(i).controls; let j=index" class="uk-flex uk-flex-middle">
|
448
|
<div dashboard-input class="uk-width-small"
|
449
|
[formInput]="jsonPath"
|
450
|
[label]="'Level ' + +(j + 1)"></div>
|
451
|
<i *ngIf="getJsonPath(i).length !== 1"
|
452
|
class="material-icons md-24 uk-margin-left uk-text-danger clickable" (click)="removeJsonPath(i, j)">close</i>
|
453
|
<div *ngIf="j < (getJsonPath(i).length - 1)" class="uk-text-center uk-margin-left">
|
454
|
<i class="material-icons">arrow_forward</i>
|
455
|
</div>
|
456
|
<div *ngIf="j === (getJsonPath(i).length - 1)" class="uk-margin-left">
|
457
|
<button class="md-btn md-btn-small md-btn-primary" (click)="addJsonPath(i)">Add level</button>
|
458
|
</div>
|
459
|
</div>
|
460
|
</div>
|
461
|
</div>
|
462
|
</div>
|
463
|
</div>
|
464
|
</div>
|
465
|
</modal-alert>
|
466
|
<modal-alert #editChartModal
|
467
|
[classBody]="'large-modal'"
|
468
|
(alertOutput)="saveIndicator()"
|
469
|
[okDisabled]="chartIndicatorFb && (chartIndicatorFb.invalid || chartIndicatorFb.pristine)">
|
470
|
<div *ngIf="chartIndicatorFb" class="uk-padding-small" [formGroup]="chartIndicatorFb">
|
471
|
<div dashboard-input class="uk-form-row" [formInput]="chartIndicatorFb.get('name')" label="Title"></div>
|
472
|
<div dashboard-input class="uk-form-row" [formInput]="chartIndicatorFb.get('description')"
|
473
|
label="Description" type="textarea">
|
474
|
</div>
|
475
|
<div class="uk-form-row uk-flex uk-flex-middle">
|
476
|
<div dashboard-input class="uk-width-small" [formInput]="chartIndicatorFb.get('isPublic')"
|
477
|
label="Accessibility" [options]="indicatorUtils.isPublic" type="select">
|
478
|
</div>
|
479
|
<div dashboard-input class="uk-margin-small-left uk-width-small" [formInput]="chartIndicatorFb.get('isActive')"
|
480
|
label="Visibility" [options]="indicatorUtils.isActive" type="select">
|
481
|
</div>
|
482
|
<div dashboard-input class="uk-margin-small-left uk-width-small" [formInput]="chartIndicatorFb.get('width')"
|
483
|
type="select" [options]="indicatorUtils.indicatorSizes"
|
484
|
label="Chart Size">
|
485
|
</div>
|
486
|
</div>
|
487
|
<h5 class="uk-text-bold uk-margin-top uk-margin-bottom">
|
488
|
Chart Settings
|
489
|
</h5>
|
490
|
<div *ngIf="chartIndicatorPaths" formArrayName="indicatorPaths">
|
491
|
<div *ngFor="let indicatorPath of chartIndicatorPaths.controls; let i=index"
|
492
|
[formGroup]="indicatorPath">
|
493
|
<div dashboard-input class="uk-form-row"
|
494
|
[title]="indicatorPath.get('url').disabled?'Default chart URLs cannot change':''"
|
495
|
[formInput]="indicatorPath.get('url')"
|
496
|
label="Chart Url"></div>
|
497
|
<div *ngIf="urlParameterizedMessage.length > 0" class="uk-alert-warning uk-alert">
|
498
|
{{urlParameterizedMessage}}
|
499
|
</div>
|
500
|
<div formArrayName="parameters">
|
501
|
<div *ngIf="getParameter(i, 'title')" class="uk-form-row">
|
502
|
<div dashboard-input
|
503
|
[formInput]="getParameter(i, 'title').get('value')"
|
504
|
label="Chart Title"></div>
|
505
|
</div>
|
506
|
<div *ngIf="getParameter(i, 'subtitle')" class="uk-form-row">
|
507
|
<div dashboard-input
|
508
|
[formInput]="getParameter(i, 'subtitle').get('value')"
|
509
|
label="Chart Subtitle"></div>
|
510
|
</div>
|
511
|
<div class="uk-grid-medium uk-form-row" uk-grid>
|
512
|
<div *ngIf="!getParameter(i, 'type')" class="uk-width-1-3@s">
|
513
|
<div dashboard-input [formInput]="indicatorPath.get('type')"
|
514
|
type="select"
|
515
|
[options]="(indicatorPath.get('type').value == 'table' && getParameter(i, 'data_title_0'))?indicatorUtils.getChartTypes(indicatorPath.get('type').value):indicatorUtils.allChartTypes"
|
516
|
label="Chart Type"></div>
|
517
|
</div>
|
518
|
<div *ngIf="getParameter(i, 'type')" class="uk-width-1-3@s">
|
519
|
<div dashboard-input [formInput]="getParameter(i, 'type').get('value')"
|
520
|
type="select" [options]="indicatorUtils.getChartTypes(getParameter(i, 'type').get('value').value)"
|
521
|
label="Chart Type"></div>
|
522
|
</div>
|
523
|
<div *ngIf="getParameter(i, 'xAxisTitle')" class="uk-width-1-3@s">
|
524
|
<div dashboard-input [formInput]="getParameter(i, 'xAxisTitle').get('value')"
|
525
|
label="X-Axis Title"></div>
|
526
|
</div>
|
527
|
<div *ngIf="getParameter(i, 'yAxisTitle')" class="uk-width-1-3@s">
|
528
|
<div dashboard-input [formInput]="getParameter(i, 'yAxisTitle').get('value')"
|
529
|
label="Y-Axis Title"></div>
|
530
|
</div>
|
531
|
<div *ngIf="getParameter(i, 'data_title_0')" class="uk-width-1-3@s">
|
532
|
<div dashboard-input [formInput]="getParameter(i, 'data_title_0').get('value')"
|
533
|
label="Data title"></div>
|
534
|
</div>
|
535
|
<div *ngIf="getParameter(i, 'data_title_1')" class="uk-width-1-3@s">
|
536
|
<div dashboard-input [formInput]="getParameter(i, 'data_title_1').get('value')"
|
537
|
label="Data title"></div>
|
538
|
</div>
|
539
|
<div *ngIf="getParameter(i, 'start_year')" class="uk-width-1-3@s">
|
540
|
<div dashboard-input [formInput]="getParameter(i, 'start_year').get('value')"
|
541
|
label="Year (From)"></div>
|
542
|
</div>
|
543
|
<div *ngIf="getParameter(i, 'end_year')" class="uk-width-1-3@s">
|
544
|
<div dashboard-input [formInput]="getParameter(i, 'end_year').get('value')"
|
545
|
label="Year (To)"></div>
|
546
|
</div>
|
547
|
</div>
|
548
|
</div>
|
549
|
<div *ngIf="indicator && indicator.indicatorPaths[i] && indicator.indicatorPaths[i].safeResourceUrl"
|
550
|
class="uk-margin-medium-top uk-position-relative">
|
551
|
<div *ngIf="(hasDifference(i)) && !indicatorPath.invalid"
|
552
|
class="uk-width-1-1 uk-height-medium refresh-iframe">
|
553
|
<div class="uk-position-relative uk-height-1-1">
|
554
|
<div class="uk-position-center md-color-white uk-text-center clickable"
|
555
|
(click)="refreshIndicator()">
|
556
|
<div><i class="material-icons md-color-white">refresh</i></div>
|
557
|
<span>Click to refresh the graph view</span>
|
558
|
</div>
|
559
|
</div>
|
560
|
</div>
|
561
|
<iframe *ngIf="indicator.indicatorPaths[i].source !== 'image'"
|
562
|
[src]="indicator.indicatorPaths[i].safeResourceUrl"
|
563
|
class="uk-width-1-1 uk-height-medium"></iframe>
|
564
|
<div *ngIf="indicator.indicatorPaths[i].source === 'image'">
|
565
|
<img class="uk-width-1-1 uk-height-medium" [src]="indicator.indicatorPaths[i].url">
|
566
|
</div>
|
567
|
</div>
|
568
|
</div>
|
569
|
</div>
|
570
|
</div>
|
571
|
</modal-alert>
|
572
|
<modal-alert #deleteModal (alertOutput)="deleteIndicator()">
|
573
|
You are about to delete <span class="uk-text-bold" *ngIf="indicator && index !== -1">
|
574
|
"{{indicator.name ? indicator.name : indicator.indicatorPaths[0].parameters.title}}"</span> indicator permanently.
|
575
|
<div *ngIf="indicatorChildrenActionOnDelete == 'delete'" class="uk-text-bold">
|
576
|
Indicators of all profiles based on this default indicator, will be deleted as well.
|
577
|
</div>
|
578
|
<!-- <span *ngIf="indicatorChildrenActionOnDelete == 'disconnect'" class="uk-text-bold">-->
|
579
|
<!-- Indicators of all profiles based on this default indicator, will not be marked as copied from default anymore.-->
|
580
|
<!-- </span>-->
|
581
|
Are you sure you want to proceed?
|
582
|
</modal-alert>
|
583
|
<!--<modal-alert #deleteAllModal (alertOutput)="deleteIndicator('delete')">-->
|
584
|
<!-- You are about to delete <span class="uk-text-bold" *ngIf="indicator && index !== -1">-->
|
585
|
<!-- "{{indicator.name ? indicator.name : indicator.indicatorPaths[0].parameters.title}}"</span> indicator permanently.-->
|
586
|
<!-- <span class="uk-text-bold">Indicators of all profiles based on this default indicator, will be deleted as well.</span>-->
|
587
|
<!-- Are you sure you want to proceed?-->
|
588
|
<!--</modal-alert>-->
|
589
|
<!--<modal-alert #deleteAndDisconnectModal (alertOutput)="deleteIndicator('disconnect')">-->
|
590
|
<!-- You are about to delete <span class="uk-text-bold" *ngIf="indicator && index !== -1">-->
|
591
|
<!-- "{{indicator.name ? indicator.name : indicator.indicatorPaths[0].parameters.title}}"</span> indicator permanently.-->
|
592
|
<!-- <span class="uk-text-bold">Indicators of all profiles based on this default indicator, will not be marked as copied from default anymore.</span>-->
|
593
|
<!-- Are you sure you want to proceed?-->
|
594
|
<!--</modal-alert>-->
|
595
|
<modal-alert #deleteSectionModal (alertOutput)="deleteSection()">
|
596
|
You are about to delete this section and its indicators permanently.
|
597
|
<div *ngIf="sectionChildrenActionOnDelete == 'delete' && !stakeholder.defaultId" class="uk-text-bold">
|
598
|
Sections of all profiles based on this default section and their contents, will be deleted as well.
|
599
|
</div>
|
600
|
<!-- <span *ngIf="sectionChildrenActionOnDelete == 'disconnect'" class="uk-text-bold">-->
|
601
|
<!-- Sections of all profiles based on this default section and their contents, will not be marked as copied from default anymore.-->
|
602
|
<!-- </span>-->
|
603
|
Are you sure you want to proceed?
|
604
|
</modal-alert>
|
605
|
<!--<modal-alert #deleteNumberSectionModal (alertOutput)="deleteSection('number')">-->
|
606
|
<!-- You are about to delete this section and its indicators permanently.-->
|
607
|
<!-- Are you sure you want to proceed?-->
|
608
|
<!--</modal-alert>-->
|
609
|
<!--<modal-alert #deleteChartSectionModal (alertOutput)="deleteSection()">-->
|
610
|
<!-- You are about to delete this section and its indicators permanently.-->
|
611
|
<!-- Are you sure you want to proceed?-->
|
612
|
<!--</modal-alert>-->
|