SKE-59 add solve competition button

This commit is contained in:
Przemysław Stawujak 2019-01-02 14:10:18 +01:00
parent 4337a5eff5
commit 5274208b60
2 changed files with 10 additions and 0 deletions

View File

@ -7,6 +7,9 @@
<div class="description">
<div class="section-color">Nagrody:</div> {{competition.prize}}
</div>
<button type="button" style="margin-top: 20px" [disabled]="mode==='quiz'" class="btn btn-success" (click)="solveCompetition()">
{{l("Start")}}
</button>
<hr />
</div>
</div>

View File

@ -20,6 +20,8 @@ export class CompetitionDetailComponent extends AppComponentBase implements OnIn
public competition: CompetitionDto = null;
public competitionDetailAreaId: string = 'competition-detail-area';
public mode = 'detail';
constructor(
injector: Injector,
private route: ActivatedRoute,
@ -49,6 +51,11 @@ export class CompetitionDetailComponent extends AppComponentBase implements OnIn
});
}
public solveCompetition(): void {
console.log('Solve Competition');
this.mode = 'quiz';
}
public ngOnDestroy() {
if (this.paramSubscription) {
this.paramSubscription.unsubscribe();