Skip to content

Commit 849bcdb

Browse files
authored
Feature/aggregate report (#129)
* scoring for user and team, base aggregate report done * report swaps between user and team * add user and team names to report
1 parent a3b7104 commit 849bcdb

26 files changed

+1125
-254
lines changed

angular.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
{
5959
"type": "initial",
6060
"maximumWarning": "2mb",
61-
"maximumError": "5mb"
61+
"maximumError": "6mb"
6262
},
6363
{
6464
"type": "anyComponentStyle",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cite-ui",
3-
"version": "1.7.2",
3+
"version": "1.8.0",
44
"scripts": {
55
"ng": "ng",
66
"start": "ng serve",

src/app/app.module.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ import { AdminTeamEditDialogComponent } from './components/admin/admin-team-edit
8181
import { AdminTeamTypesComponent } from './components/admin/admin-teamtypes/admin-teamtypes.component';
8282
import { AdminTeamUsersComponent } from './components/admin/admin-team-users/admin-team-users.component';
8383
import { AdminUsersComponent } from './components/admin/admin-users/admin-users.component';
84+
import { AggregateComponent } from './components/aggregate/aggregate.component';
8485
import { DashboardComponent } from './components/dashboard/dashboard.component';
8586
import { HomeAppComponent } from './components/home-app/home-app.component';
8687
import { EvaluationInfoComponent } from './components/evaluation-info/evaluation-info.component';
@@ -119,6 +120,7 @@ export function getBasePath(settingsSvc: ComnSettingsService) {
119120
EvaluationInfoComponent,
120121
ScoreSummaryComponent,
121122
ScoresheetComponent,
123+
AggregateComponent,
122124
ReportComponent,
123125
SystemMessageComponent,
124126
ConfirmDialogComponent,

src/app/components/admin/admin-scoring-model-edit-dialog/admin-scoring-model-edit-dialog.component.html

Lines changed: 76 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -45,78 +45,85 @@
4545
</mat-form-field>
4646
</div>
4747
</div>
48-
<div class="add-margin">
49-
<div>
50-
<mat-checkbox [(ngModel)]="data.scoringModel.useUserScore">Use Individual User Scoring</mat-checkbox>
48+
<div>
49+
<b>Scoring Options</b>
50+
<div class="scoring-option">
51+
<div>
52+
<mat-checkbox [(ngModel)]="data.scoringModel.useUserScore">Use Individual User Scoring</mat-checkbox>
53+
</div>
54+
</div>
55+
<div class="scoring-option">
56+
<div>
57+
<mat-checkbox [(ngModel)]="data.scoringModel.useTeamScore">Use Team Scoring</mat-checkbox>
58+
</div>
59+
</div>
60+
<div class="scoring-option">
61+
<div>
62+
<mat-checkbox [(ngModel)]="data.scoringModel.useOfficialScore">Use Official Scoring</mat-checkbox>
63+
</div>
64+
</div>
65+
<div class="scoring-option">
66+
<div>
67+
<mat-checkbox [(ngModel)]="data.scoringModel.useTeamAverageScore" [disabled]="!data.scoringModel.useUserScore">Use Team Average Scoring</mat-checkbox>
68+
</div>
69+
</div>
70+
<div class="scoring-option">
71+
<div>
72+
<mat-checkbox [(ngModel)]="data.scoringModel.useTypeAverageScore" [disabled]="!data.scoringModel.useTeamScore">Use Type Average Scoring</mat-checkbox>
73+
</div>
5174
</div>
5275
</div>
5376
<div class="add-margin">
54-
<div>
55-
<mat-checkbox [(ngModel)]="data.scoringModel.useTeamScore">Use Team Scoring</mat-checkbox>
56-
</div>
57-
</div>
58-
<div class="add-margin">
59-
<div>
60-
<mat-checkbox [(ngModel)]="data.scoringModel.useOfficialScore">Use Official Scoring</mat-checkbox>
61-
</div>
62-
</div>
63-
<div class="add-margin">
64-
<div>
65-
<mat-checkbox [(ngModel)]="data.scoringModel.useTeamAverageScore" [disabled]="!data.scoringModel.useUserScore">Use Team Average Scoring</mat-checkbox>
66-
</div>
67-
</div>
68-
<div class="add-margin">
69-
<div>
70-
<mat-checkbox [(ngModel)]="data.scoringModel.useTypeAverageScore" [disabled]="!data.scoringModel.useTeamScore">Use Type Average Scoring</mat-checkbox>
71-
</div>
72-
</div>
73-
<div class="add-margin">
74-
<div>
75-
<mat-checkbox [(ngModel)]="data.scoringModel.useSubmit">Use Submit</mat-checkbox>
76-
</div>
77-
</div>
78-
<div class="add-margin">
79-
<div>
80-
<mat-checkbox [(ngModel)]="data.scoringModel.hideScoresOnScoreSheet">Hide Scores On Scoresheet</mat-checkbox>
81-
</div>
82-
</div>
83-
<div class="add-margin">
84-
<div>
85-
<mat-checkbox [(ngModel)]="data.scoringModel.displayCommentTextBoxes">Display Comments as Textboxes</mat-checkbox>
86-
</div>
87-
</div>
88-
<div class="add-margin">
89-
<div>
90-
<mat-checkbox [(ngModel)]="data.scoringModel.displayScoringModelByMoveNumber">Display Scoring Categories by Move Number</mat-checkbox>
91-
</div>
92-
</div>
93-
<div class="add-margin">
94-
<div>
95-
<mat-checkbox [(ngModel)]="data.scoringModel.showPastSituationDescriptions">Show Past Situation Descriptions</mat-checkbox>
96-
</div>
97-
</div>
98-
<div class="add-margin">
99-
<div>
100-
<mat-form-field class="description-field full-width">
101-
<mat-label>Right Side Display</mat-label>
102-
<mat-select placeholder="Select a Right Side Display Option" [(ngModel)]="data.scoringModel.rightSideDisplay">
103-
<mat-option *ngFor="let item of data.rightSideDisplays" [value]="item">
104-
{{ item }}
105-
</mat-option>
106-
</mat-select>
107-
</mat-form-field>
108-
</div>
109-
</div>
110-
<div class="add-margin" *ngIf="data.scoringModel.rightSideDisplay === 'HtmlBlock'">
111-
<mat-label class="gray">Right Side HTML Block</mat-label>
112-
<angular-editor [placeholder]="'Enter content here...'" [(ngModel)]="data.scoringModel.rightSideHtmlBlock" [config]="editorConfig"></angular-editor>
113-
</div>
114-
<div class="add-margin" *ngIf="data.scoringModel.rightSideDisplay === 'EmbeddedUrl'">
115-
<div>
116-
<mat-form-field class="description-field full-width">
117-
<mat-label>Right Side URL</mat-label>
118-
<input matInput [(ngModel)]="data.scoringModel.rightSideEmbeddedUrl" />
119-
</mat-form-field>
77+
<b>Display Options</b>
78+
<div class="scoring-option">
79+
<div>
80+
<mat-checkbox [(ngModel)]="data.scoringModel.useSubmit">Use Submit Button for Submissions</mat-checkbox>
81+
</div>
82+
</div>
83+
<div class="scoring-option">
84+
<div>
85+
<mat-checkbox [(ngModel)]="data.scoringModel.hideScoresOnScoreSheet">Hide Option Values On Scoresheet</mat-checkbox>
86+
</div>
87+
</div>
88+
<div class="scoring-option">
89+
<div>
90+
<mat-checkbox [(ngModel)]="data.scoringModel.displayCommentTextBoxes">Display Comments as Textboxes</mat-checkbox>
91+
</div>
92+
</div>
93+
<div class="scoring-option">
94+
<div>
95+
<mat-checkbox [(ngModel)]="data.scoringModel.displayScoringModelByMoveNumber">Use Different Scoring Categories by Move Number</mat-checkbox>
96+
</div>
97+
</div>
98+
<div class="scoring-option">
99+
<div>
100+
<mat-checkbox [(ngModel)]="data.scoringModel.showPastSituationDescriptions">Show Past Situation Descriptions on Dashboard</mat-checkbox>
101+
</div>
102+
</div>
103+
<div class="add-margin"> &nbsp;</div>
104+
<div class="scoring-option">
105+
<div>
106+
<mat-form-field class="description-field full-width">
107+
<mat-label>Right Side Display</mat-label>
108+
<mat-select placeholder="Select a Right Side Display Option" [(ngModel)]="data.scoringModel.rightSideDisplay">
109+
<mat-option *ngFor="let item of data.rightSideDisplays" [value]="item">
110+
{{ item }}
111+
</mat-option>
112+
</mat-select>
113+
</mat-form-field>
114+
</div>
115+
</div>
116+
<div class="scoring-option" *ngIf="data.scoringModel.rightSideDisplay === 'HtmlBlock'">
117+
<mat-label class="gray">Right Side HTML Block</mat-label>
118+
<angular-editor [placeholder]="'Enter content here...'" [(ngModel)]="data.scoringModel.rightSideHtmlBlock" [config]="editorConfig"></angular-editor>
119+
</div>
120+
<div class="scoring-option" *ngIf="data.scoringModel.rightSideDisplay === 'EmbeddedUrl'">
121+
<div>
122+
<mat-form-field class="description-field full-width">
123+
<mat-label>Right Side URL</mat-label>
124+
<input matInput [(ngModel)]="data.scoringModel.rightSideEmbeddedUrl" />
125+
</mat-form-field>
126+
</div>
120127
</div>
121128
</div>
122129
<div class="cssLayoutRowStartCenter bottom-button">

src/app/components/admin/admin-scoring-model-edit-dialog/admin-scoring-model-edit-dialog.component.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@
3232
margin-bottom: 8px;
3333
}
3434

35+
.scoring-option {
36+
margin-left: 20px;
37+
}
38+
3539
.bottom-button {
3640
margin-bottom: 10px;
3741
margin-top: 10px;
@@ -68,4 +72,3 @@
6872
margin-left: 10px;
6973
margin-right: 0;
7074
}
71-

src/app/components/admin/admin-team-users/admin-team-users.component.html

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142

143143
<ng-container matColumnDef="isObserver">
144144
<mat-header-cell *matHeaderCellDef mat-sort-header
145-
>Observer</mat-header-cell
145+
>Observe</mat-header-cell
146146
>
147147
<mat-cell *matCellDef="let element">
148148
<mat-checkbox
@@ -155,7 +155,7 @@
155155

156156
<ng-container matColumnDef="canManageTeam">
157157
<mat-header-cell *matHeaderCellDef mat-sort-header
158-
>Manager</mat-header-cell
158+
>Manage</mat-header-cell
159159
>
160160
<mat-cell *matCellDef="let element">
161161
<mat-checkbox
@@ -168,7 +168,7 @@
168168

169169
<ng-container matColumnDef="canIncrementMove">
170170
<mat-header-cell *matHeaderCellDef mat-sort-header
171-
>Incrementer</mat-header-cell
171+
>Advance</mat-header-cell
172172
>
173173
<mat-cell *matCellDef="let element">
174174
<mat-checkbox
@@ -179,27 +179,27 @@
179179
</mat-cell>
180180
</ng-container>
181181

182-
<ng-container matColumnDef="canModify">
182+
<ng-container matColumnDef="canSubmit">
183183
<mat-header-cell *matHeaderCellDef mat-sort-header
184-
>Modfier</mat-header-cell
184+
>Submit</mat-header-cell
185185
>
186186
<mat-cell *matCellDef="let element">
187187
<mat-checkbox
188-
[checked]="element.canModify"
189-
(change)="setModifierValue(element.id, $event.checked)"
188+
[checked]="element.canSubmit"
189+
(change)="setSubmitterValue(element.id, $event.checked)"
190190
[disabled]="noChanges"
191191
></mat-checkbox>
192192
</mat-cell>
193193
</ng-container>
194194

195-
<ng-container matColumnDef="canSubmit">
195+
<ng-container matColumnDef="canModify">
196196
<mat-header-cell *matHeaderCellDef mat-sort-header
197-
>Submitter</mat-header-cell
197+
>Modify</mat-header-cell
198198
>
199199
<mat-cell *matCellDef="let element">
200200
<mat-checkbox
201-
[checked]="element.canSubmit"
202-
(change)="setSubmitterValue(element.id, $event.checked)"
201+
[checked]="element.canModify"
202+
(change)="setModifierValue(element.id, $event.checked)"
203203
[disabled]="noChanges"
204204
></mat-checkbox>
205205
</mat-cell>

src/app/components/admin/admin-team-users/admin-team-users.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export class AdminTeamUsersComponent implements OnDestroy, OnInit {
3434
otherTeamUsers: TeamUser[] = [];
3535
teamList: Team[] = [];
3636
displayedUserColumns: string[] = ['name', 'id'];
37-
displayedTeamUserColumns: string[] = ['name', 'isObserver', 'canManageTeam', 'canIncrementMove', 'canModify', 'canSubmit', 'id'];
37+
displayedTeamUserColumns: string[] = ['name', 'isObserver', 'canManageTeam', 'canIncrementMove', 'canSubmit', 'canModify', 'id'];
3838
displayedTeamColumns: string[] = ['name', 'user'];
3939
userDataSource = new MatTableDataSource<User>(new Array<User>());
4040
teamUserDataSource = new MatTableDataSource<TeamUser>(new Array<TeamUser>());

0 commit comments

Comments
 (0)