Skip to content

Commit

Permalink
Merge pull request #437 from BellumGens/groups-matches-refresh
Browse files Browse the repository at this point in the history
feat: adding button to refresh groups and matches
  • Loading branch information
kdinev authored Dec 14, 2024
2 parents 72b2850 + bf1e58d commit 2dbc8bd
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
4 changes: 0 additions & 4 deletions projects/bellumgens/src/app/app.routes.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ export const serverRoutes: ServerRoute[] = [
path: 'bellumgenselite/registration/:tournamentId',
renderMode: RenderMode.Client
},
{
path: 'bellumgenselite/bge-balkan-circuit',
renderMode: RenderMode.Server
},
{
path: 'unauthorized/:message',
renderMode: RenderMode.Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ <h4 i18n>Participants</h4>
[data]="group.participants">
<igx-grid-toolbar>
<igx-grid-toolbar-title>{{group.name}}</igx-grid-toolbar-title>
<igx-grid-toolbar-actions>
<button igxIconButton="flat" igxRipple (click)="refreshGroups()">
<igx-icon>refresh</igx-icon>
</button>
</igx-grid-toolbar-actions>
</igx-grid-toolbar>
<igx-column field="user" i18n-header header="Player">
<div *igxCell="let value">
Expand Down Expand Up @@ -82,6 +87,9 @@ <h4 i18n>Participants</h4>
<igx-grid-toolbar>
<igx-grid-toolbar-title i18n>{{ tournament?.name }} Match Results</igx-grid-toolbar-title>
<igx-grid-toolbar-actions>
<button igxIconButton="flat" igxRipple (click)="refreshMatches()">
<igx-icon>refresh</igx-icon>
</button>
<a href="https://play.toornament.com/en_US/tournaments/8376728902519046144/matches/schedule" target="_blank" rel="noopener" i18n>Weekly Bracket</a>
</igx-grid-toolbar-actions>
</igx-grid-toolbar>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Title, Meta } from '@angular/platform-browser';
import { ActivatedRoute, RouterLink } from '@angular/router';
import { TournamentParticipant, TournamentGroup, TournamentSC2Match, Tournament, ApiTournamentsService, CountrySVGPipe } from '../../../../../common/src/public_api';
import { AsyncPipe, DatePipe } from '@angular/common';
import { IGX_CARD_DIRECTIVES, IgxCircularProgressBarComponent, IgxAvatarComponent, IgxDividerDirective, IGX_GRID_DIRECTIVES, IgxIconComponent, IgxButtonDirective, IGroupingExpression, SortingDirection, DefaultSortingStrategy } from '@infragistics/igniteui-angular';
import { IGX_CARD_DIRECTIVES, IgxCircularProgressBarComponent, IgxAvatarComponent, IgxDividerDirective, IGX_GRID_DIRECTIVES, IgxIconComponent, IgxButtonDirective, IGroupingExpression, SortingDirection, DefaultSortingStrategy, IgxIconButtonDirective } from '@infragistics/igniteui-angular';
import { Observable } from 'rxjs';

@Component({
Expand All @@ -21,6 +21,7 @@ import { Observable } from 'rxjs';
IGX_GRID_DIRECTIVES,
IgxIconComponent,
IgxButtonDirective,
IgxIconButtonDirective,
CountrySVGPipe,
AsyncPipe
],
Expand Down Expand Up @@ -60,4 +61,12 @@ export class BgeBalkanComponent extends BaseDirective {
{ dir: SortingDirection.Desc, fieldName: 'startTime', ignoreCase: false, strategy: DefaultSortingStrategy.instance() }
];
}

public refreshGroups() {
this.groups = this.apiService.getSc2Groups(this.tournamentId);
}

public refreshMatches() {
this.sc2matches = this.apiService.getSc2Matches(this.tournamentId);
}
}
1 change: 1 addition & 0 deletions projects/bellumgens/src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ $include: (
igx-list,
igx-ripple,
igx-icon,
igx-icon-button,
igx-button,
igx-button-group,
igx-dialog,
Expand Down

0 comments on commit 2dbc8bd

Please sign in to comment.