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

View File

@ -20,6 +20,8 @@ export class CompetitionDetailComponent extends AppComponentBase implements OnIn
public competition: CompetitionDto = null; public competition: CompetitionDto = null;
public competitionDetailAreaId: string = 'competition-detail-area'; public competitionDetailAreaId: string = 'competition-detail-area';
public mode = 'detail';
constructor( constructor(
injector: Injector, injector: Injector,
private route: ActivatedRoute, 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() { public ngOnDestroy() {
if (this.paramSubscription) { if (this.paramSubscription) {
this.paramSubscription.unsubscribe(); this.paramSubscription.unsubscribe();