Loading games...
diff --git a/projects/gameboard-ui/src/app/home/landing/landing.component.ts b/projects/gameboard-ui/src/app/home/landing/landing.component.ts
index 7a4cda3b..1c288f5e 100644
--- a/projects/gameboard-ui/src/app/home/landing/landing.component.ts
+++ b/projects/gameboard-ui/src/app/home/landing/landing.component.ts
@@ -18,6 +18,7 @@ import { GameService } from '../../api/game.service';
export class LandingComponent implements OnInit {
refresh$ = new BehaviorSubject
(true);
featured$: Observable;
+ ongoing$: Observable;
past$: Observable;
present$: Observable;
future$: Observable;
@@ -38,22 +39,26 @@ export class LandingComponent implements OnInit {
) {
this.featured$ = this.refresh$.pipe(
debounceTime(400),
- switchMap(() => api.list({ isFeatured: true, filter: [], term: this.searchText })),
+ switchMap(() => api.list({ isFeatured: true, term: this.searchText })),
tap(g => { if (g.length > 0) { this.showSearchBar = true; } }),
);
- this.past$ = this.refresh$.pipe(
+ this.ongoing$ = this.refresh$.pipe(
debounceTime(400),
- switchMap(() => api.listGrouped({ filter: ['past', "competitive"], term: this.searchText })),
- tap(g => { if (g.length > 0) { this.showSearchBar = true; } }),
- );
+ switchMap(() => api.list({ isOngoing: true, term: this.searchText }))
+ ),
+ this.past$ = this.refresh$.pipe(
+ debounceTime(400),
+ switchMap(() => api.listGrouped({ filter: ['past', "competitive"], isOngoing: false, term: this.searchText })),
+ tap(g => { if (g.length > 0) { this.showSearchBar = true; } }),
+ );
this.present$ = this.refresh$.pipe(
debounceTime(200),
- switchMap(() => api.list({ filter: ["present", "competitive"], term: this.searchText })),
+ switchMap(() => api.list({ filter: ["present", "competitive"], isOngoing: false, term: this.searchText })),
tap(g => { if (g.length > 0) { this.showSearchBar = true; } })
);
this.future$ = this.refresh$.pipe(
debounceTime(300),
- switchMap(() => api.listGrouped({ filter: ['future', "competitive"], term: this.searchText })),
+ switchMap(() => api.listGrouped({ filter: ['future', "competitive"], isOngoing: false, term: this.searchText })),
tap(g => { if (g.length > 0) { this.showSearchBar = true; } })
);
}
diff --git a/projects/gameboard-ui/src/app/services/router.service.ts b/projects/gameboard-ui/src/app/services/router.service.ts
index 6696f48f..176dc18b 100644
--- a/projects/gameboard-ui/src/app/services/router.service.ts
+++ b/projects/gameboard-ui/src/app/services/router.service.ts
@@ -60,7 +60,7 @@ export class RouterService implements OnDestroy {
}
public getObserveChallengeUrl(gameId: string, challengeId: string) {
- return `/admin/observer/challenges/${gameId}?search=${challengeId}`;
+ return `admin/observer/challenges/${gameId}?search=${challengeId}`;
}
public getObserveTeamsUrl(gameId: string, teamId: string) {
diff --git a/projects/gameboard-ui/src/app/support/components/ticket-support-tools/ticket-support-tools.component.ts b/projects/gameboard-ui/src/app/support/components/ticket-support-tools/ticket-support-tools.component.ts
index 368380e2..eb590165 100644
--- a/projects/gameboard-ui/src/app/support/components/ticket-support-tools/ticket-support-tools.component.ts
+++ b/projects/gameboard-ui/src/app/support/components/ticket-support-tools/ticket-support-tools.component.ts
@@ -8,6 +8,7 @@ export interface TicketSupportToolsContext {
challenge?: SimpleEntity;
player?: SimpleEntity;
game?: SimpleEntity;
+ timeTilSessionEndMs?: number;
team: {
id: string,
name: string,
@@ -20,7 +21,7 @@ export interface TicketSupportToolsContext {
styleUrls: ['./ticket-support-tools.component.scss'],
template: `
- -
+
-
Observe
-
@@ -72,6 +73,7 @@ export class TicketSupportToolsComponent implements OnInit {
protected hasGameContext = false;
protected challengeStateUrl?: string;
protected gameboardUrl?: string;
+ protected isActiveSession = false;
protected observeChallengeUrl?: string;
protected observeTeamUrl?: string;
protected playerAdminUrl?: string;
@@ -100,6 +102,7 @@ export class TicketSupportToolsComponent implements OnInit {
}
}
+ this.isActiveSession = !!this.context?.timeTilSessionEndMs && this.context.timeTilSessionEndMs > 0;
this.hasGameContext = hasGame || !!this.challengeStateUrl || !!this.gameboardUrl || !!this.playerAdminUrl;
}
diff --git a/projects/gameboard-ui/src/app/support/ticket-details/ticket-details.component.ts b/projects/gameboard-ui/src/app/support/ticket-details/ticket-details.component.ts
index 3d0780fd..f9561766 100644
--- a/projects/gameboard-ui/src/app/support/ticket-details/ticket-details.component.ts
+++ b/projects/gameboard-ui/src/app/support/ticket-details/ticket-details.component.ts
@@ -135,6 +135,7 @@ export class TicketDetailsComponent implements AfterViewInit, OnDestroy {
challenge: t.challenge ? { id: t.challengeId, name: t.challenge?.name } : undefined,
game: hasGame ? { id: t.player!.gameId, name: t.player!.gameName } : undefined,
player: hasPlayer ? { id: t.playerId, name: t.player!.approvedName } : undefined,
+ timeTilSessionEndMs: t.timeTilSessionEndMs,
team: {
id: t.teamId,
name: t.teamName,