-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added By Game tab to the enrollment report. resolves GBAPI#308.
- Loading branch information
1 parent
6b5dce4
commit c21312a
Showing
7 changed files
with
89 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
...rt-sponsor-player-count-modal/enrollment-report-sponsor-player-count-modal.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<div class="sponsor-challenge-performance-component" *ngIf="context; else loading"> | ||
<div class="modal-header"> | ||
<div class="modal-title pull-left d-flex align-items-center"> | ||
|
||
<div> | ||
<h2>{{ context.game.name }}</h2> | ||
<h4>Players per Sponsor</h4> | ||
</div> | ||
</div> | ||
<button type="button" class="btn-close close pull-right" aria-label="Close" (click)="close()"> | ||
<span aria-hidden="true" class="visually-hidden">×</span> | ||
</button> | ||
</div> | ||
<div class="modal-body container d-flex flex-wrap"> | ||
<div class="d-flex flex-column align-items-center mr-3 sponsor-container" | ||
*ngFor=" let sponsor of context.sponsors"> | ||
<app-player-avatar-legacy [avatarUri]="sponsor.logoFileName | relativeImage" | ||
[tooltip]="sponsor.name"></app-player-avatar-legacy> | ||
<span class="d-block">{{sponsor.name}}</span> | ||
<span class="subtle-info"> | ||
{{ sponsor.playerCount }} {{ "player" | pluralizer:sponsor.playerCount }} | ||
</span> | ||
</div> | ||
</div> | ||
<div class="modal-footer"> | ||
<button type="button" class="btn btn-info" (click)="close()">OK</button> | ||
</div> | ||
</div> | ||
|
||
<ng-template #loading> | ||
<app-spinner>Loading sponsor info...</app-spinner> | ||
</ng-template> |
Empty file.
26 changes: 26 additions & 0 deletions
26
...port-sponsor-player-count-modal/enrollment-report-sponsor-player-count-modal.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { SimpleEntity } from '@/api/models'; | ||
import { IModalReady } from '@/core/components/modal/modal.models'; | ||
import { Component } from '@angular/core'; | ||
import { BsModalRef } from 'ngx-bootstrap/modal'; | ||
import { EnrollmentReportByGameSponsor } from '../../enrollment-report.models'; | ||
|
||
export interface EnrollmentReportSponsorPlayerCountModalContext { | ||
game: SimpleEntity; | ||
sponsors: EnrollmentReportByGameSponsor[] | ||
} | ||
|
||
@Component({ | ||
selector: 'app-enrollment-report-sponsor-player-count-modal', | ||
templateUrl: './enrollment-report-sponsor-player-count-modal.component.html', | ||
styleUrls: ['./enrollment-report-sponsor-player-count-modal.component.scss'] | ||
}) | ||
export class EnrollmentReportSponsorPlayerCountModalComponent implements IModalReady<EnrollmentReportSponsorPlayerCountModalContext> { | ||
context!: EnrollmentReportSponsorPlayerCountModalContext; | ||
|
||
constructor(private modalRef: BsModalRef) { } | ||
|
||
protected close() { | ||
if (this.modalRef) | ||
this.modalRef.hide(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters