diff --git a/projects/gameboard-ui/src/app/admin/admin.module.ts b/projects/gameboard-ui/src/app/admin/admin.module.ts index 912dbcba3..63b187a08 100644 --- a/projects/gameboard-ui/src/app/admin/admin.module.ts +++ b/projects/gameboard-ui/src/app/admin/admin.module.ts @@ -88,6 +88,8 @@ import { ToSupportCodePipe } from '@/standalone/core/pipes/to-support-code.pipe' import { IfHasPermissionDirective } from '@/standalone/directives/if-has-permission.directive'; import { FeedbackTemplatePickerComponent } from "../feedback/components/feedback-template-picker/feedback-template-picker.component"; import { UserPickerComponent } from '@/standalone/users/user-picker/user-picker.component'; +import { CertificateTemplatePickerComponent } from '@/certificates/components/certificate-template-picker/certificate-template-picker.component'; +import { CertificatePreviewerComponent } from '@/certificates/components/certificate-previewer/certificate-previewer.component'; @NgModule({ declarations: [ @@ -160,6 +162,7 @@ import { UserPickerComponent } from '@/standalone/users/user-picker/user-picker. RouterModule.forChild([ { path: '', component: AdminPageComponent, title: "Admin", children: [ + { path: "certificates/templates/:templateId/preview", component: CertificatePreviewerComponent, title: "Certificate Template Preview" }, { path: '', pathMatch: 'full', redirectTo: 'dashboard' }, { path: 'dashboard', component: DashboardComponent }, { @@ -225,6 +228,8 @@ import { UserPickerComponent } from '@/standalone/users/user-picker/user-picker. SafeUrlPipe, SpinnerComponent, ToSupportCodePipe, + CertificatePreviewerComponent, + CertificateTemplatePickerComponent, FeedbackTemplatePickerComponent, UserPickerComponent, ] diff --git a/projects/gameboard-ui/src/app/admin/components/game-center/game-center-settings/game-center-settings.component.html b/projects/gameboard-ui/src/app/admin/components/game-center/game-center-settings/game-center-settings.component.html index 5589c676b..7b2a05580 100644 --- a/projects/gameboard-ui/src/app/admin/components/game-center/game-center-settings/game-center-settings.component.html +++ b/projects/gameboard-ui/src/app/admin/components/game-center/game-center-settings/game-center-settings.component.html @@ -147,6 +147,7 @@
+

Player Feedback

@@ -157,46 +158,14 @@
-
- - - design with HTML and inline/internal CSS; use a 11:8.5 aspect ratio - -
-

- Insert dynamic content by referring to a property with double-curly syntax - {{"\{\{game_name\}\}"}}. For example, - <h1>{{"\{\{leaderboard_name\}\}"}}</h1>.
- The following properties will get replaced when a player certificate renders: -

-
-      game_name — Name of this game
-      competition — Competition type of this game
-      season — Season of this game
-      round — Round of this game
-      track — Track of this game
-      user_name — Individual user's approved name
-      score — Total player score for this game
-      rank — Final leaderboard ranking of the player
-      leaderboard_name — Approved name for either team or individual
-      date — Date player's session ended for this game
-      player_count — Number of players who participated in this game
-      team_count — Number of teams who participated in this game
-

- Tip: Create an outer div with fixed height and width and position: relative. - Create inner - divs with position: absolute; text-align: center; and set textbox width and X/Y - position with - top: __px; left: __px; width: __px;. - To add a background image, use - background-size: 100% 100%; background-image: url('URL_HERE'); -

-
-
+

Completion Certificates

+ +
diff --git a/projects/gameboard-ui/src/app/admin/components/game-center/game-center-settings/game-center-settings.component.ts b/projects/gameboard-ui/src/app/admin/components/game-center/game-center-settings/game-center-settings.component.ts index e7e51f939..243ca0ac5 100644 --- a/projects/gameboard-ui/src/app/admin/components/game-center/game-center-settings/game-center-settings.component.ts +++ b/projects/gameboard-ui/src/app/admin/components/game-center/game-center-settings/game-center-settings.component.ts @@ -10,6 +10,7 @@ import { UnsubscriberService } from '@/services/unsubscriber.service'; import { ToastService } from '@/utility/services/toast.service'; import { ActivatedRoute } from '@angular/router'; import { FeedbackTemplateView } from '@/feedback/feedback.models'; +import { CertificateTemplateView } from '@/certificates/certificates.models'; export type SelectedSubTab = "settings" | "modes" | "registration"; @@ -86,6 +87,24 @@ export class GameCenterSettingsComponent implements AfterViewInit { } } + protected async handleCertificateTemplateChanged(template?: CertificateTemplateView) { + if (!this.game) { + throw new Error("Game is required"); + } + + this.game.certificateTemplateId = template?.id; + await firstValueFrom(this.gameService.update(this.game)); + } + + protected async handlePracticeCertificateTemplateChanged(template?: CertificateTemplateView) { + if (!this.game) { + throw new Error("Game is required"); + } + + this.game.practiceCertificateTemplateId = template?.id; + await firstValueFrom(this.gameService.update(this.game)); + } + protected async handleChallengesFeedbackTemplateChanged(template?: FeedbackTemplateView) { if (!this.game) { throw new Error("Game is required"); diff --git a/projects/gameboard-ui/src/app/admin/components/game-center/game-center-team-detail/game-center-team-detail.component.html b/projects/gameboard-ui/src/app/admin/components/game-center/game-center-team-detail/game-center-team-detail.component.html index 54dad34b0..f5abcbf41 100644 --- a/projects/gameboard-ui/src/app/admin/components/game-center/game-center-team-detail/game-center-team-detail.component.html +++ b/projects/gameboard-ui/src/app/admin/components/game-center/game-center-team-detail/game-center-team-detail.component.html @@ -15,48 +15,49 @@
Score
-

Team Management

-
-