Project

General

Profile

1
<div id="page_content" click-outside-or-esc targetId="page_content" (clickOutside)="toggleOpen($event)">
2
  <div class="uk-padding-small md-bg-white" uk-grid>
3
    <div 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 class="uk-flex uk-flex-middle">
5
        <label>Chart Type:</label>
6
        <select class="uk-select uk-form-small uk-margin-small-left"
7
                (ngModelChange)="onChartTypeChange($event)"
8
                [(ngModel)]="chartType">
9
          <option [value]="'all'">All</option>
10
          <option [value]="'pie'">Pie</option>
11
          <option [value]="'table'">Table</option>
12
          <option [value]="'line'">Line</option>
13
          <option [value]="'column'">Column</option>
14
          <option [value]="'bar'">Bar</option>
15
        </select>
16
      </div>
17
      <div class="uk-flex uk-flex-middle">
18
        <label>Privacy:</label>
19
        <select class="uk-select uk-form-small uk-margin-small-left"
20
                (ngModelChange)="onPrivacyChange($event)"
21
                [(ngModel)]="privacy">
22
          <option [value]="'all'">All</option>
23
          <option [value]="'public'">Public</option>
24
          <option [value]="'private'">Private</option>
25
        </select>
26
      </div>
27
      <div class="uk-flex uk-flex-middle">
28
        <label>Status:</label>
29
        <select class="uk-select uk-form-small uk-margin-small-left"
30
                (ngModelChange)="onStatusChange($event)"
31
                [(ngModel)]="status">
32
          <option [value]="'all'">All</option>
33
          <option [value]="'active'">Active</option>
34
          <option [value]="'inactive'">Inactive</option>
35
        </select>
36
      </div>
37
    </div>
38
    <div class="uk-width-expand@m uk-width-1-1 uk-flex uk-flex-middle uk-flex-right">
39
      <div class="uk-inline">
40
        <span class="uk-form-icon uk-form-icon-flip"><i class="material-icons">search</i></span>
41
        <input (ngModelChange)="onKeywordChange($event)"
42
               [(ngModel)]="keyword"
43
               class="uk-input uk-form-small" placeholder="Locate indicator..">
44
      </div>
45
      <div [class.uk-active]="grid" class="uk-margin-small-left">
46
        <a [routerLink]="" class="uk-icon-button" (click)="changeGrid(true)"><i
47
          class="material-icons">view_module</i></a>
48
      </div>
49
      <div [class.uk-active]="!grid" class="uk-margin-small-left">
50
        <a [routerLink]="" class="uk-icon-button" (click)="changeGrid(false)"><i class="material-icons">list</i></a>
51
      </div>
52
    </div>
53
  </div>
54
  <div *ngIf="stakeholder && canEdit" id="page_content_inner">
55
    <div class="uk-child-width-1-2 uk-flex-middle" uk-grid>
56
      <div>
57
        <ul id="breadcrumbs">
58
          <li><span>{{stakeholder.topics[topicIndex].name}}</span></li>
59
          <li>
60
            <span>{{stakeholder.topics[topicIndex].categories[categoryIndex].name}}</span></li>
61
          <li>
62
            <span class="md-color-blue-900 uk-text-bold">
63
              {{stakeholder.topics[topicIndex].categories[categoryIndex].subCategories[subcategoryIndex].name}}
64
            </span>
65
          </li>
66
        </ul>
67
      </div>
68
      <div class="uk-flex uk-flex-right">
69
        <button class="md-btn md-btn-primary">Preview</button>
70
      </div>
71
    </div>
72
    <h4 class="uk-text-bold">Number Indicators</h4>
73
    <div [class.uk-child-width-1-3@m]="grid"
74
         [class.uk-child-width-1-2@s]="grid"
75
         [class.uk-child-width-1-1]="!grid"
76
         class="uk-grid-match uk-grid-small"
77
         [class.list]="!grid"
78
         uk-grid>
79
      <ng-template ngFor [ngForOf]="displayNumbers" let-indicator let-i="index">
80
        <div>
81
          <div class="md-card">
82
            <div class="md-card-toolbar">
83
              <div class="md-card-toolbar-actions" [class.uk-flex-middle]="!grid" [class.uk-flex]="!grid">
84
                <span *ngIf="!grid" class="uk-margin-medium-right uk-flex uk-flex-middle">
85
                  <i
86
                    class="material-icons md-24 uk-margin-small-right">{{indicatorUtils.isPublicIcon.get(indicator.isPublic)}}</i>
87
                  {{(indicator.isPublic) ? 'Public' : 'Private'}}
88
                </span>
89
                <span *ngIf="!grid" class="uk-margin-medium-right uk-flex uk-flex-middle">
90
                  <i class="material-icons md-24 uk-margin-small-right"
91
                     [class.md-color-green-300]="indicator.isActive">{{indicatorUtils.isActiveIcon}}</i>
92
                  {{(indicator.isActive) ? 'Active' : 'Inactive'}}
93
                </span>
94
                <i class="md-icon material-icons">more_vert</i>
95
              </div>
96
              <div class="md-card-toolbar-heading-text">{{indicator.name}}</div>
97
            </div>
98
            <div *ngIf="grid" class="md-card-content">
99
              <div class="uk-flex uk-flex-center" uk-grid>
100
                <div class="uk-width-1-1">
101
                  {{indicator.description}}
102
                </div>
103
                <div class="uk-width-1-2 uk-text-center">
104
                  <i class="material-icons md-24">{{indicatorUtils.isPublicIcon.get(indicator.isPublic)}}</i>
105
                  <div>{{(indicator.isPublic) ? 'Public' : 'Private'}}</div>
106
                </div>
107
                <div class="uk-width-1-2 uk-text-center">
108
                  <i class="material-icons md-24"
109
                     [class.md-color-green-300]="indicator.isActive">{{indicatorUtils.isActiveIcon}}</i>
110
                  <div>{{(indicator.isActive) ? 'Active' : 'Inactive'}}</div>
111
                </div>
112
              </div>
113
            </div>
114
          </div>
115
        </div>
116
      </ng-template>
117
    </div>
118
    <h4 class="uk-text-bold">Chart Indicators</h4>
119
    <div [class.uk-child-width-1-3@m]="grid"
120
         [class.uk-child-width-1-2@s]="grid"
121
         [class.uk-child-width-1-1]="!grid"
122
         [class.list]="!grid"
123
         class="uk-grid-match uk-grid-small"
124
         uk-grid>
125
      <ng-template ngFor [ngForOf]="displayCharts" let-indicator let-i="index">
126
        <div>
127
          <div class="md-card">
128
            <div class="md-card-toolbar">
129
              <div class="md-card-toolbar-actions" [class.uk-flex-middle]="!grid" [class.uk-flex]="!grid">
130
                <ng-template [ngIf]="!grid">
131
                  <span *ngFor="let indicatorPath of indicator.indicatorPaths"
132
                        class="uk-margin-medium-right uk-text-capitalize uk-flex uk-flex-middle">
133
                    <i class="material-icons md-24 uk-margin-small-right">
134
                      {{indicatorUtils.chartTypes.get(indicatorPath.type)}}
135
                    </i>
136
                    {{indicatorPath.type + ' Chart'}}
137
                  </span>
138
                </ng-template>
139
                <span *ngIf="!grid" class="uk-margin-medium-right uk-flex uk-flex-middle">
140
                  <i class="material-icons md-24 uk-margin-small-right">
141
                    {{indicatorUtils.isPublicIcon.get(indicator.isPublic)}}
142
                  </i>
143
                  {{(indicator.isPublic) ? 'Public' : 'Private'}}
144
                </span>
145
                <span *ngIf="!grid" class="uk-margin-medium-right uk-flex uk-flex-middle">
146
                  <i class="material-icons md-24 uk-margin-small-right"
147
                     [class.md-color-green-300]="indicator.isActive">
148
                    {{indicatorUtils.isActiveIcon}}
149
                  </i>
150
                  {{(indicator.isActive) ? 'Active' : 'Inactive'}}
151
                </span>
152
                <i class="md-icon material-icons">more_vert</i>
153
              </div>
154
              <div class="md-card-toolbar-heading-text">{{indicator.name}}</div>
155
            </div>
156
            <div *ngIf="grid" class="md-card-content">
157
              <div class="uk-flex uk-flex-center" uk-grid>
158
                <div class="uk-width-1-1">
159
                  {{indicator.description ? indicator.description : ''}}
160
                </div>
161
                <div class="uk-width-1-3 uk-text-center"
162
                     [ngClass]="'uk-child-width-1-' + indicator.indicatorPaths.length" uk-grid>
163
                  <div *ngFor="let indicatorPath of indicator.indicatorPaths">
164
                    <i class="material-icons md-24">
165
                      {{indicatorUtils.chartTypes.get(indicatorPath.type)}}
166
                    </i>
167
                    <div class="uk-text-capitalize">{{indicatorPath.type + ' Chart'}}</div>
168
                  </div>
169
                </div>
170
                <div class="uk-width-1-3 uk-text-center">
171
                  <i class="material-icons md-24">
172
                    {{indicatorUtils.isPublicIcon.get(indicator.isPublic)}}
173
                  </i>
174
                  <div>{{(indicator.isPublic) ? 'Public' : 'Private'}}</div>
175
                </div>
176
                <div class="uk-width-1-3 uk-text-center">
177
                  <i class="material-icons md-24" [class.md-color-green-300]="indicator.isActive">
178
                    {{indicatorUtils.isActiveIcon}}
179
                  </i>
180
                  <div>{{(indicator.isActive) ? 'Active' : 'Inactive'}}</div>
181
                </div>
182
              </div>
183
            </div>
184
          </div>
185
        </div>
186
      </ng-template>
187
      <div>
188
        <div class="md-card clickable" (click)="createIndicatorOpen()">
189
          <div class="md-card-toolbar">
190
            <div class="md-card-toolbar-heading-text"
191
                 [class.uk-flex-middle]="!grid"
192
                 [class.uk-flex]="!grid"
193
                 [class.uk-flex-center]="!grid">
194
              <i *ngIf="!grid" class="material-icons md-36">add</i>
195
              <span>Create a custom Indicator</span>
196
            </div>
197
          </div>
198
          <div *ngIf="grid" class="md-card-content">
199
            <div class="uk-flex uk-flex-center" uk-grid>
200
              <div class="uk-width-1-1">
201
                Use our advance tool to create a custom Indicator that suit the needs of your funding KPI's.
202
              </div>
203
            </div>
204
            <div class="uk-flex uk-flex-center uk-margin-top">
205
              <i class="material-icons md-48">add</i>
206
            </div>
207
          </div>
208
        </div>
209
      </div>
210
    </div>
211
  </div>
212
</div>
213
<modal-alert #createIndicatorModal
214
             (alertOutput)="createIndicator()"
215
             [okDisabled]="indicatorFb && indicatorFb.invalid">
216
  <div *ngIf="indicatorFb" class="uk-form-stacked" [formGroup]="indicatorFb">
217
    <label class="uk-form-label">Name</label>
218
    <div class="uk-form-controls" formArrayName="name">
219
      <input class="uk-input"
220
             [class.uk-form-danger]="indicatorFb.get('name').invalid && indicatorFb.get('name').dirty"
221
             [formControl]="indicatorFb.get('name')">
222
    </div>
223
    <label class="uk-form-label">Description</label>
224
    <div class="uk-form-controls" formArrayName="urls">
225
      <textarea class="uk-textarea" rows="3"
226
                [formControl]="indicatorFb.get('description')"></textarea>
227
    </div>
228
    <label class="uk-form-label">Chart url</label>
229
    <div class="uk-form-controls" formArrayName="urls">
230
      <input class="uk-input"
231
             [class.uk-form-danger]="chartUrl.invalid && chartUrl.dirty"
232
             *ngFor="let chartUrl of urls.controls;"
233
             [formControl]="chartUrl">
234
    </div>
235
  </div>
236
</modal-alert>
237
<!--<modal-alert #editIndicatorModal
238
             (alertOutput)="saveIndicator()"
239
             [okDisabled]="editIndicatorFb && (editIndicatorFb.invalid || !editIndicatorFb.dirty)">
240
  <div *ngIf="editIndicatorFb" class="uk-form-stacked" [formGroup]="editIndicatorFb">
241
    <label class="uk-form-label">Name</label>
242
    <div class="uk-form-controls" formArrayName="name">
243
      <input class="uk-input"
244
             [class.uk-form-danger]="indicatorFb.get('name').status === 'INVALID' && indicatorFb.get('name').dirty"
245
             [formControl]="indicatorFb.get('name')">
246
    </div>
247
    <label class="uk-form-label">Description</label>
248
    <div class="uk-form-controls" formArrayName="urls">
249
      <textarea class="uk-textarea" rows="3"
250
                [formControl]="indicatorFb.get('description')"></textarea>
251
    </div>
252
    <label class="uk-form-label">Chart url</label>
253
    <div class="uk-form-controls" formArrayName="urls">
254
      <input class="uk-input"
255
             [class.uk-form-danger]="chartUrl.status === 'INVALID' && chartUrl.dirty"
256
             *ngFor="let chartUrl of urls.controls;"
257
             [formControl]="chartUrl">
258
    </div>
259
  </div>
260
</modal-alert>-->
(1-1/6)