Skip to content

Commit

Permalink
parts of the grade results
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Green committed Jun 9, 2016
1 parent 7b84f80 commit 7dcb5fd
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
15 changes: 6 additions & 9 deletions app/pages/competition/grade/grade.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import {CompetitorResult} from "../../templates/competitor.results";
<StackLayout class="inset">
<nx-list>
<competitor-result *ngFor="let item of list; #i = index" [competitor]="item"></competitor-result>
</nx-list>
</StackLayout>
<material-fab text="face" vertical-align="top" horizontal-align="right"></material-fab>
Expand All @@ -55,7 +54,6 @@ export class GradeCompetitorsPage implements OnInit {
}

public list: Models.ICompetitor[] = [];
public groups: number = 0; //if more than one group change the label

//action to
public gradeSearch($event: any) {
Expand All @@ -65,24 +63,23 @@ export class GradeCompetitorsPage implements OnInit {
}

public ngOnInit() {
this.logger.Notify("grade-list-page ngOnInit");
this.logger.Notify("grade-page ngOnInit");
//time to load the data

this.loadDetail();
}

public loadDetail() {
let obseravable = this.competitorService.ListGradeCompetitors(this.context.CompetitionId, this.context.GradeId);
let obseravable = this.competitorService
.ListGradeCompetitors(this.context.CompetitionId, this.context.GradeId);

//this.logger.NotifyResponse(obseravable);

obseravable.map(e => e.json()).subscribe(e => {
obseravable.map(e => e.json()).subscribe((e : Models.ICompetitor[]) => {
this.list = e;
let max = Rx.Observable.from(this.list).map(e => e.StartGroup).max();
//let max = Rx.Observable.from(this.list).map(e => e.StartGroup).max();

max.subscribe(m => {
this.groups = m;
});

});

return obseravable;
Expand Down
4 changes: 2 additions & 2 deletions app/pages/templates/competitor.results.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ GridLayout {
margin-right: 10;
}
GridLayout Label {

padding: 5;
}

Expand All @@ -19,10 +18,11 @@ GridLayout.header Label {
GridLayout.result Label {
font-size: 14;
color: #37474F;

}
GridLayout.result Label.invalid {
color: #90A4AE;
text-decoration: line-through;
}

.blue { color: #2196F3; }
Expand Down
2 changes: 1 addition & 1 deletion app/pages/templates/competitor.results.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {CompetitorResultRow, CompetitorResultRowHeader} from "./competitor.resul
<Label class='note' [text]="person.Total | number:'3.3-3'" textWrap="true"></Label>
</StackLayout>
</nx-item>
<nx-item *ngIf="expanded">
<nx-item *ngIf="expanded" (tap)="ShowHideResults()">
<StackLayout full-item>
<competitor-result-row-header></competitor-result-row-header>
<competitor-result-row *ngIf="person.Pass1" [scoreline]="person.Pass1"></competitor-result-row>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7dcb5fd

Please sign in to comment.