From a717b1256a7d93652dc759a79c41b911127c1dd4 Mon Sep 17 00:00:00 2001 From: Ben Stein <115497763+sei-bstein@users.noreply.github.com> Date: Mon, 16 Dec 2024 15:39:16 -0500 Subject: [PATCH] v3.26.3 (#213) * Add game session availability warning and enrollment trend by game * Allow viewing of the game screen for practice mode games * Improve performance of enrollment trend line * Fix link rendering in markdown * Fix onn-dismissible notification creation --- .../src/app/admin/admin.module.ts | 2 - .../feedback-editor.component.html | 14 ---- .../feedback-editor.component.ts | 62 ----------------- .../game-center-settings.component.html | 17 +++-- .../game-center-settings.component.ts | 4 +- .../src/app/api/feedback.service.ts | 9 ++- .../gameboard-ui/src/app/api/game-models.ts | 8 +++ .../gameboard-ui/src/app/api/game.service.ts | 6 +- projects/gameboard-ui/src/app/app.module.ts | 7 ++ .../src/app/core/config/marked.config.ts | 4 ++ .../gameboard-ui/src/app/core/core.module.ts | 15 +---- .../feedback-submission-form.component.html | 15 +++-- .../feedback-submission-form.component.ts | 7 +- .../feedback-template-picker.component.html | 8 ++- .../feedback-template-picker.component.ts | 3 +- ...ession-availability-warning.component.html | 18 +++++ ...ssion-availability-warning.component.scss} | 0 ...-session-availability-warning.component.ts | 41 ++++++++++++ .../gameboard-ui/src/app/game/game.module.ts | 4 +- .../pages/game-page/game-page.component.html | 54 ++++++++++----- .../pages/game-page/game-page.component.ts | 2 + .../app/home/landing/landing.component.html | 2 +- .../src/app/home/landing/landing.component.ts | 6 +- .../enrollment-report-trend.component.html | 7 ++ .../enrollment-report-trend.component.ts | 67 ++++++++++++++++--- .../enrollment-report.models.ts | 34 +++++++--- .../enrollment-report.service.ts | 27 ++++++-- .../error-div/error-div.component.ts | 2 - ...dit-system-notification-modal.component.ts | 1 + 29 files changed, 288 insertions(+), 158 deletions(-) delete mode 100644 projects/gameboard-ui/src/app/admin/components/feedback-editor/feedback-editor.component.html delete mode 100644 projects/gameboard-ui/src/app/admin/components/feedback-editor/feedback-editor.component.ts create mode 100644 projects/gameboard-ui/src/app/game/components/game-session-availability-warning/game-session-availability-warning.component.html rename projects/gameboard-ui/src/app/{admin/components/feedback-editor/feedback-editor.component.scss => game/components/game-session-availability-warning/game-session-availability-warning.component.scss} (100%) create mode 100644 projects/gameboard-ui/src/app/game/components/game-session-availability-warning/game-session-availability-warning.component.ts diff --git a/projects/gameboard-ui/src/app/admin/admin.module.ts b/projects/gameboard-ui/src/app/admin/admin.module.ts index 635365db0..912dbcba3 100644 --- a/projects/gameboard-ui/src/app/admin/admin.module.ts +++ b/projects/gameboard-ui/src/app/admin/admin.module.ts @@ -34,7 +34,6 @@ import { ExternalGameAdminTeamContextMenuComponent } from './components/external import { ExternalGameAdminComponent } from './components/external-game-admin/external-game-admin.component'; import { ExternalGameHostPickerComponent } from './components/external-game-host-picker/external-game-host-picker.component'; import { ExternalHostEditorComponent } from './components/external-host-editor/external-host-editor.component'; -import { FeedbackEditorComponent } from './components/feedback-editor/feedback-editor.component'; import { GameBonusesConfigComponent } from './components/game-bonuses-config/game-bonuses-config.component'; import { GameCenterObserveComponent } from './components/game-center/game-center-observe/game-center-observe.component'; import { GameCenterPracticePlayerDetailComponent } from './components/game-center/game-center-practice-player-detail/game-center-practice-player-detail.component'; @@ -141,7 +140,6 @@ import { UserPickerComponent } from '@/standalone/users/user-picker/user-picker. SiteOverviewStatsComponent, AdminOverviewComponent, SupportSettingsComponent, - FeedbackEditorComponent, ExtendTeamsModalComponent, ActiveTeamsModalComponent, AdminEnrollTeamModalComponent, diff --git a/projects/gameboard-ui/src/app/admin/components/feedback-editor/feedback-editor.component.html b/projects/gameboard-ui/src/app/admin/components/feedback-editor/feedback-editor.component.html deleted file mode 100644 index fa727cf1b..000000000 --- a/projects/gameboard-ui/src/app/admin/components/feedback-editor/feedback-editor.component.html +++ /dev/null @@ -1,14 +0,0 @@ -
${quote}`; }; diff --git a/projects/gameboard-ui/src/app/core/core.module.ts b/projects/gameboard-ui/src/app/core/core.module.ts index 1fc22fb16..ffe38ee76 100644 --- a/projects/gameboard-ui/src/app/core/core.module.ts +++ b/projects/gameboard-ui/src/app/core/core.module.ts @@ -1,4 +1,4 @@ -import { NgModule } from '@angular/core'; +import { ModuleWithProviders, NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { HTTP_INTERCEPTORS, HttpClient, HttpClientModule } from '@angular/common/http'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; @@ -19,7 +19,6 @@ import { TypeaheadModule } from 'ngx-bootstrap/typeahead'; // other 3rd party modules import { FontAwesomeModule } from '@fortawesome/angular-fontawesome'; -import { MarkdownModule, MarkedOptions } from 'ngx-markdown'; import { NgChartsModule } from 'ng2-charts'; // import luxon adapter for chartjs import 'chartjs-adapter-luxon'; @@ -120,9 +119,9 @@ import { ObserverConsoleComponent } from './components/observer-console/observer import { TicketLabelPickerComponent } from './components/ticket-label-picker/ticket-label-picker.component'; import { GameMapImageUrlPipe } from './pipes/game-map-image-url.pipe'; import { SpinnerComponent } from '@/standalone/core/components/spinner/spinner.component'; -import { ErrorDivComponent } from '@/standalone/core/components/error-div/error-div.component'; import { IfHasPermissionDirective } from '@/standalone/directives/if-has-permission.directive'; import { ToSupportCodePipe } from '@/standalone/core/pipes/to-support-code.pipe'; +import { MarkdownModule } from 'ngx-markdown'; const PUBLIC_DECLARATIONS = [ AbsoluteValuePipe, @@ -260,19 +259,11 @@ const RELAYED_MODULES = [ HttpClientModule, ProgressbarModule, TooltipModule, - MarkdownModule.forRoot({ - loader: HttpClient, - markedOptions: { - provide: MarkedOptions, - useFactory: markedOptionsFactory, - }, - }), PopoverModule.forRoot(), TypeaheadModule.forRoot(), ...RELAYED_MODULES, // standalones - ErrorDivComponent, IfHasPermissionDirective, SpinnerComponent, ToSupportCodePipe @@ -281,7 +272,7 @@ const RELAYED_MODULES = [ CommonModule, ...RELAYED_MODULES, ...PUBLIC_DECLARATIONS, - IfHasPermissionDirective, + IfHasPermissionDirective ] }) export class CoreModule { } diff --git a/projects/gameboard-ui/src/app/feedback/components/feedback-submission-form/feedback-submission-form.component.html b/projects/gameboard-ui/src/app/feedback/components/feedback-submission-form/feedback-submission-form.component.html index 3edfde1fe..0952a5a8c 100644 --- a/projects/gameboard-ui/src/app/feedback/components/feedback-submission-form/feedback-submission-form.component.html +++ b/projects/gameboard-ui/src/app/feedback/components/feedback-submission-form/feedback-submission-form.component.html @@ -63,7 +63,8 @@ [disabled]="feedbackForm.submitted! || isPreview" id="check-{{q.id}}-{{option}}" [name]="q.id" [value]="option"> - {{option}}{{q.specify && q.specify.key == + + {{q.specify && q.specify.key == option ? ": " + (q.specify.prompt ? q.specify.prompt : "") : "" }} @@ -87,10 +88,10 @@ [checked]="q.answer && q.answer!.indexOf(option) > -1" [disabled]="feedbackForm.submitted!" id="check-{{q.id}}-{{option}}" [name]="option" [value]="option"> - +