-
+
View Scoreboard
diff --git a/projects/gameboard-ui/src/app/prac/components/practice-challenge-state-summary/practice-challenge-state-summary.component.html b/projects/gameboard-ui/src/app/prac/components/practice-challenge-state-summary/practice-challenge-state-summary.component.html
index c0e11368..ba980080 100644
--- a/projects/gameboard-ui/src/app/prac/components/practice-challenge-state-summary/practice-challenge-state-summary.component.html
+++ b/projects/gameboard-ui/src/app/prac/components/practice-challenge-state-summary/practice-challenge-state-summary.component.html
@@ -36,7 +36,7 @@
-
+
msPerHour"
@@ -48,6 +48,12 @@
End Session
+
+
+ {{ (userSettings$ | async)?.useStickyChallengePanel ? "Turn off" : "Turn on" }} the Sticky Challenge
+ Panel
+
diff --git a/projects/gameboard-ui/src/app/prac/components/practice-challenge-state-summary/practice-challenge-state-summary.component.scss b/projects/gameboard-ui/src/app/prac/components/practice-challenge-state-summary/practice-challenge-state-summary.component.scss
index da443517..c9892368 100644
--- a/projects/gameboard-ui/src/app/prac/components/practice-challenge-state-summary/practice-challenge-state-summary.component.scss
+++ b/projects/gameboard-ui/src/app/prac/components/practice-challenge-state-summary/practice-challenge-state-summary.component.scss
@@ -1,3 +1,8 @@
a:hover {
- text-decoration: none;
+ text-decoration: none;
+}
+
+table,
+thead {
+ border-top-width: 0;
}
diff --git a/projects/gameboard-ui/src/app/prac/components/practice-challenge-state-summary/practice-challenge-state-summary.component.ts b/projects/gameboard-ui/src/app/prac/components/practice-challenge-state-summary/practice-challenge-state-summary.component.ts
index 17a6cfa6..2fab9e45 100644
--- a/projects/gameboard-ui/src/app/prac/components/practice-challenge-state-summary/practice-challenge-state-summary.component.ts
+++ b/projects/gameboard-ui/src/app/prac/components/practice-challenge-state-summary/practice-challenge-state-summary.component.ts
@@ -8,6 +8,7 @@ import { ActiveChallengesRepo } from '@/stores/active-challenges.store';
import { slug } from '@/../tools/functions';
import { TeamService } from '@/api/team.service';
import { ToastService } from '@/utility/services/toast.service';
+import { UserSettingsService } from '@/services/user-settings.service';
@Component({
selector: 'app-practice-challenge-state-summary',
@@ -23,11 +24,13 @@ export class PracticeChallengeStateSummaryComponent {
protected isChangingSessionEnd = false;
protected fa = fa;
protected slug = slug;
+ protected userSettings$ = this.userSettings.updated$;
constructor(
activeChallengesRepo: ActiveChallengesRepo,
private teamService: TeamService,
- private toastService: ToastService) {
+ private toastService: ToastService,
+ private userSettings: UserSettingsService) {
this.activeChallenge$ = activeChallengesRepo.activePracticeChallenge$;
}
@@ -48,12 +51,8 @@ export class PracticeChallengeStateSummaryComponent {
this.isChangingSessionEnd = false;
}
- private getExtendTooltip(msRemaining: number) {
- if (msRemaining < this.msPerHour) {
- return "If you want more time to practice, you can extend your session. Sessions extend to a maximum remaining time of 60 minutes.";
- }
-
- return "You can't extend your practice session because you have more than 60 minutes remaining.";
+ protected handleToggleStickyPanel(enable: boolean) {
+ this.userSettings.updated$.next({ useStickyChallengePanel: enable });
}
private showExtensionToast(sessionEnd: DateTime, isAutomatic = false) {
diff --git a/projects/gameboard-ui/src/app/reports/components/reports/enrollment-report/enrollment-report.models.ts b/projects/gameboard-ui/src/app/reports/components/reports/enrollment-report/enrollment-report.models.ts
index 420dcd83..6fe6e0d1 100644
--- a/projects/gameboard-ui/src/app/reports/components/reports/enrollment-report/enrollment-report.models.ts
+++ b/projects/gameboard-ui/src/app/reports/components/reports/enrollment-report/enrollment-report.models.ts
@@ -70,7 +70,7 @@ export interface EnrollmentReportByGameSponsor {
id: string;
name: string;
logoFileName: string;
- playerCount: string;
+ playerCount: number;
}
export interface EnrollmentReportStatSummary {
diff --git a/projects/gameboard-ui/src/app/scoreboard/components/scoreboard-page/scoreboard-page.component.html b/projects/gameboard-ui/src/app/scoreboard/components/scoreboard-page/scoreboard-page.component.html
new file mode 100644
index 00000000..3fe4d1f9
--- /dev/null
+++ b/projects/gameboard-ui/src/app/scoreboard/components/scoreboard-page/scoreboard-page.component.html
@@ -0,0 +1,15 @@
+
+
+ Scoreboard
+
+
+
+
+
+
+
+
+ Loading the score...
+
diff --git a/projects/gameboard-ui/src/app/scoreboard/components/scoreboard-page/scoreboard-page.component.scss b/projects/gameboard-ui/src/app/scoreboard/components/scoreboard-page/scoreboard-page.component.scss
new file mode 100644
index 00000000..e69de29b
diff --git a/projects/gameboard-ui/src/app/scoreboard/components/scoreboard-page/scoreboard-page.component.ts b/projects/gameboard-ui/src/app/scoreboard/components/scoreboard-page/scoreboard-page.component.ts
new file mode 100644
index 00000000..33c43026
--- /dev/null
+++ b/projects/gameboard-ui/src/app/scoreboard/components/scoreboard-page/scoreboard-page.component.ts
@@ -0,0 +1,35 @@
+import { ActivatedRoute } from '@angular/router';
+import { firstValueFrom } from 'rxjs';
+import { GameService } from '@/api/game.service';
+import { SimpleEntity } from '@/api/models';
+import { AppTitleService } from '@/services/app-title.service';
+import { UnsubscriberService } from '@/services/unsubscriber.service';
+import { Component } from '@angular/core';
+
+@Component({
+ selector: 'app-scoreboard-page',
+ providers: [UnsubscriberService],
+ templateUrl: './scoreboard-page.component.html',
+ styleUrls: ['./scoreboard-page.component.scss']
+})
+export class ScoreboardPageComponent {
+ protected game?: SimpleEntity;
+
+ constructor(
+ private appTitle: AppTitleService,
+ private gameService: GameService,
+ private route: ActivatedRoute,
+ private unsub: UnsubscriberService) {
+ this.unsub.add(this.route.params.subscribe(async params => this.loadGame(params.gameId)));
+ }
+
+ private async loadGame(gameId: string) {
+ if (!gameId) {
+ this.game = undefined;
+ return;
+ }
+
+ this.game = await firstValueFrom(this.gameService.retrieve(gameId));
+ this.appTitle.set(`Scoreboard | ${this.game.name}`);
+ }
+}
diff --git a/projects/gameboard-ui/src/app/scoreboard/components/scoreboard/scoreboard.component.html b/projects/gameboard-ui/src/app/scoreboard/components/scoreboard/scoreboard.component.html
index 9aee2063..e51b9d49 100644
--- a/projects/gameboard-ui/src/app/scoreboard/components/scoreboard/scoreboard.component.html
+++ b/projects/gameboard-ui/src/app/scoreboard/components/scoreboard/scoreboard.component.html
@@ -1,5 +1,5 @@
-
+
This game is still being played. Check back after the round ends
({{ scoreboardData.game.isLiveUntil?.toJSDate() | friendlyDateAndTime }})
to see who came out on top and view complete score breakdowns for
diff --git a/projects/gameboard-ui/src/app/scoreboard/scoreboard.module.ts b/projects/gameboard-ui/src/app/scoreboard/scoreboard.module.ts
index 18e12569..de1ee7a1 100644
--- a/projects/gameboard-ui/src/app/scoreboard/scoreboard.module.ts
+++ b/projects/gameboard-ui/src/app/scoreboard/scoreboard.module.ts
@@ -7,6 +7,7 @@ import { ScoreboardComponent } from './components/scoreboard/scoreboard.componen
import { ScoreboardTeamDetailModalComponent } from './components/scoreboard-team-detail-modal/scoreboard-team-detail-modal.component';
import { ScoreToTooltipPipe } from './pipes/score-to-tooltip.pipe';
import { SpinnerComponent } from '@/standalone/core/components/spinner/spinner.component';
+import { ScoreboardPageComponent } from './components/scoreboard-page/scoreboard-page.component';
const PUBLIC_DECLARATIONS = [
ScoreboardComponent,
@@ -17,7 +18,8 @@ const PUBLIC_DECLARATIONS = [
@NgModule({
declarations: [
...PUBLIC_DECLARATIONS,
- ChallengeBonusesToTooltip
+ ChallengeBonusesToTooltip,
+ ScoreboardPageComponent
],
imports: [
CommonModule,
diff --git a/projects/gameboard-ui/src/app/services/user-settings.service.ts b/projects/gameboard-ui/src/app/services/user-settings.service.ts
new file mode 100644
index 00000000..a6c804e7
--- /dev/null
+++ b/projects/gameboard-ui/src/app/services/user-settings.service.ts
@@ -0,0 +1,8 @@
+import { UserAppSettings } from "@/users/users.models";
+import { Injectable } from "@angular/core";
+import { BehaviorSubject } from "rxjs";
+
+@Injectable({ providedIn: 'root' })
+export class UserSettingsService {
+ public updated$ = new BehaviorSubject({ useStickyChallengePanel: false });
+}
diff --git a/projects/gameboard-ui/src/app/services/window.service.ts b/projects/gameboard-ui/src/app/services/window.service.ts
index 9b7ac62b..b4b2964b 100644
--- a/projects/gameboard-ui/src/app/services/window.service.ts
+++ b/projects/gameboard-ui/src/app/services/window.service.ts
@@ -37,6 +37,8 @@ export class WindowService implements OnDestroy {
}
scrollToBottom() {
- this.document.defaultView?.scrollTo(0, this.document.body.scrollHeight);
+ setTimeout(() => {
+ this.document.defaultView?.scrollTo(0, this.document.body.scrollHeight);
+ }, 500);
}
}
diff --git a/projects/gameboard-ui/src/app/standalone/games/components/challenge-questions/challenge-questions.component.html b/projects/gameboard-ui/src/app/standalone/games/components/challenge-questions/challenge-questions.component.html
index 9410aeb1..0b55bf66 100644
--- a/projects/gameboard-ui/src/app/standalone/games/components/challenge-questions/challenge-questions.component.html
+++ b/projects/gameboard-ui/src/app/standalone/games/components/challenge-questions/challenge-questions.component.html
@@ -120,7 +120,12 @@ {{ context.section.name |
formControlName="s{{ context.index }}q{{ questionIndex }}" [readOnly]="question.isCorrect"
placeholder="Enter your answer for question {{ questionIndex + 1 }} here">
- e.g. {{question.example}}
+