Fix bug where summary page was displayed together with extra points page

This commit is contained in:
Patrick Müller 2022-09-26 17:45:17 +02:00
parent 5f256e1983
commit 13aa2c29b0
Signed by: Paddy
GPG Key ID: 37ABC11275CAABCE
2 changed files with 20 additions and 2 deletions

View File

@ -61,9 +61,9 @@
<p id="foxes-warn" *ngIf="!checkTotalFoxPoints()">Please check the number of caught foxes!</p>
<button (click)="switchToNextPage()" [disabled]="!checkAllExtraPoints()">Next</button>
</div>
<div id="summary" class="visible-{{this.currentPage === 5}}">
<div id="summary" class="visible-{{this.currentPage === 6}}">
<p>Game Summary</p>
<button>Save Game</button>
<button (click)="saveGame()">Save Game</button>
</div>
</div>
<div id="scores">

View File

@ -702,4 +702,22 @@ export class AddGameComponent implements OnInit {
checkAllExtraPoints(): boolean {
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();
}
}