Fix bug where summary page was displayed together with extra points page
This commit is contained in:
parent
5f256e1983
commit
13aa2c29b0
|
@ -61,9 +61,9 @@
|
||||||
<p id="foxes-warn" *ngIf="!checkTotalFoxPoints()">Please check the number of caught foxes!</p>
|
<p id="foxes-warn" *ngIf="!checkTotalFoxPoints()">Please check the number of caught foxes!</p>
|
||||||
<button (click)="switchToNextPage()" [disabled]="!checkAllExtraPoints()">Next</button>
|
<button (click)="switchToNextPage()" [disabled]="!checkAllExtraPoints()">Next</button>
|
||||||
</div>
|
</div>
|
||||||
<div id="summary" class="visible-{{this.currentPage === 5}}">
|
<div id="summary" class="visible-{{this.currentPage === 6}}">
|
||||||
<p>Game Summary</p>
|
<p>Game Summary</p>
|
||||||
<button>Save Game</button>
|
<button (click)="saveGame()">Save Game</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="scores">
|
<div id="scores">
|
||||||
|
|
|
@ -702,4 +702,22 @@ export class AddGameComponent implements OnInit {
|
||||||
checkAllExtraPoints(): boolean {
|
checkAllExtraPoints(): boolean {
|
||||||
return this.checkTotalFoxPoints();
|
return this.checkTotalFoxPoints();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* _____
|
||||||
|
* / ___/__ ______ ___ ____ ___ ____ ________ __
|
||||||
|
* \__ \/ / / / __ `__ \/ __ `__ \/ __ `/ ___/ / / /
|
||||||
|
* ___/ / /_/ / / / / / / / / / / / /_/ / / / /_/ /
|
||||||
|
* /____/\__,_/_/ /_/ /_/_/ /_/ /_/\__,_/_/ \__, /
|
||||||
|
* /____/
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sends the game stats to the API to be saved
|
||||||
|
*/
|
||||||
|
saveGame(): void {
|
||||||
|
//TODO implement
|
||||||
|
// call api method, then return to gameNight page / close modal or sth like that
|
||||||
|
window.location.reload();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user