diff --git a/src/app/app.component.html b/src/app/app.component.html index d3fc5b4..bebefc3 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -202,14 +202,20 @@

Competitors & group/task assignments

- + + + + + + + - + @@ -227,7 +233,7 @@

Competitors & group/task assignments

matTooltipClass="tooltip" #tooltip="matTooltip" [matTooltipPosition]="'right'" - matTooltip="C|J|R|S is short for Competitors|Judges|Runners|Scramblers. The numbers will be updated when you make a change to the assignments."> + matTooltip="C|J|R|S is short for Competitors| Judges| Runners| Scramblers. The numbers will be updated when you make a change to the assignments."> C|J|R|S Group {{i + 1}} {{ event.configuration.skip || ! event.groupCounters || event.groupCounters.length === 0 ? '' : event.groupCounters[i] }} diff --git a/src/app/app.component.ts b/src/app/app.component.ts index b1e862f..f74859c 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -217,6 +217,10 @@ export class AppComponent { Helpers.sortCompetitorsByGroupInEvent(this.wcif(), event.id); } + handleSortBySpeedInEvent(event) { + Helpers.sortCompetitorsBySpeedInEvent(this.wcif(), event.id, false); + } + handleSortCompetitorsByName() { Helpers.sortCompetitorsByName(this.wcif()); } diff --git a/src/common/helpers.ts b/src/common/helpers.ts index deec65f..a37fcca 100644 --- a/src/common/helpers.ts +++ b/src/common/helpers.ts @@ -4,6 +4,8 @@ import {Room} from '@wca/helpers/lib/models/room'; export class Helpers { + private static readonly _minimumAgeRequiredToRun = 14; + static sortCompetitorsByGroupInEvent(wcif: Wcif, eventId: string) { wcif.persons = wcif.persons.sort(function(a, b) { let textA = a[eventId].group; @@ -262,7 +264,7 @@ export class Helpers { const staffPerson: StaffPerson = new StaffPerson(); staffPerson.name = p.name; staffPerson.wcaId = p.wcaId; - staffPerson.isAllowedTo = !p.age || p.age > 12 ? ['run'] : []; + staffPerson.isAllowedTo = !p.age || p.age >= this._minimumAgeRequiredToRun ? ['run'] : []; return staffPerson; }); } diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index 182d724..6a8263a 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -7,7 +7,7 @@ export const environment = { wcaAppId : 'd9db39d5fd0195bcdc212ead360c748592cd1fd1409b040dd790281da91ef10d', wcaSecret : '305623ae24dd7c0789e811e7ae8b364f19e9109c976c0e5ba1c8add1a1773159', - version: '1.2.014', + version: '1.2.015', testMode: false, offlineMode: false };