diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index dd298170..a685a2ba 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -144,6 +144,7 @@ const routes: Routes = [ (m) => m.NotFoundPageModule ), }, + ]; @NgModule({ diff --git a/src/app/app.module.ts b/src/app/app.module.ts index d95a30a7..2c0cac7f 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -53,6 +53,7 @@ import { ClubMemberListPage } from "./pages/club-member-list/club-member-list.pa import { TeamMemberListPage } from "./pages/team-member-list/team-member-list.page"; import { ClubAdminListPage } from "./pages/club-admin-list/club-admin-list.page"; import { TeamAdminListPage } from "./pages/team-admin-list/team-admin-list.page"; +import { ClubTeamListPage } from "./pages/club-team-list/club-team-list.page"; @NgModule({ declarations: [ @@ -75,6 +76,7 @@ import { TeamAdminListPage } from "./pages/team-admin-list/team-admin-list.page" ClubPage, ClubMemberListPage, ClubAdminListPage, + ClubTeamListPage, TeamPage, TeamMemberListPage, diff --git a/src/app/pages/club-team-list/club-team-list-routing.module.ts b/src/app/pages/club-team-list/club-team-list-routing.module.ts new file mode 100644 index 00000000..75508255 --- /dev/null +++ b/src/app/pages/club-team-list/club-team-list-routing.module.ts @@ -0,0 +1,17 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +import { ClubTeamListPage } from './club-team-list.page'; + +const routes: Routes = [ + { + path: '', + component: ClubTeamListPage + } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule], +}) +export class ClubTeamListPageRoutingModule {} diff --git a/src/app/pages/club-team-list/club-team-list.module.ts b/src/app/pages/club-team-list/club-team-list.module.ts new file mode 100644 index 00000000..f30652a0 --- /dev/null +++ b/src/app/pages/club-team-list/club-team-list.module.ts @@ -0,0 +1,20 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; + +import { IonicModule } from '@ionic/angular'; + +import { ClubTeamListPageRoutingModule } from './club-team-list-routing.module'; + +import { ClubTeamListPage } from './club-team-list.page'; + +@NgModule({ + imports: [ + CommonModule, + FormsModule, + IonicModule, + ClubTeamListPageRoutingModule + ], + declarations: [ClubTeamListPage] +}) +export class ClubTeamListPageModule {} diff --git a/src/app/pages/club-team-list/club-team-list.page.html b/src/app/pages/club-team-list/club-team-list.page.html new file mode 100644 index 00000000..16cee105 --- /dev/null +++ b/src/app/pages/club-team-list/club-team-list.page.html @@ -0,0 +1,13 @@ + + + club-team-list + + + + + + + club-team-list + + + diff --git a/src/app/pages/club-team-list/club-team-list.page.scss b/src/app/pages/club-team-list/club-team-list.page.scss new file mode 100644 index 00000000..e69de29b diff --git a/src/app/pages/club-team-list/club-team-list.page.spec.ts b/src/app/pages/club-team-list/club-team-list.page.spec.ts new file mode 100644 index 00000000..3f9a1c8c --- /dev/null +++ b/src/app/pages/club-team-list/club-team-list.page.spec.ts @@ -0,0 +1,17 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { ClubTeamListPage } from './club-team-list.page'; + +describe('ClubTeamListPage', () => { + let component: ClubTeamListPage; + let fixture: ComponentFixture; + + beforeEach(async(() => { + fixture = TestBed.createComponent(ClubTeamListPage); + component = fixture.componentInstance; + fixture.detectChanges(); + })); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/pages/club-team-list/club-team-list.page.ts b/src/app/pages/club-team-list/club-team-list.page.ts new file mode 100644 index 00000000..ab17d9cb --- /dev/null +++ b/src/app/pages/club-team-list/club-team-list.page.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-club-team-list', + templateUrl: './club-team-list.page.html', + styleUrls: ['./club-team-list.page.scss'], +}) +export class ClubTeamListPage implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/src/app/pages/club/club.page.html b/src/app/pages/club/club.page.html index 78822c64..66b8ae80 100644 --- a/src/app/pages/club/club.page.html +++ b/src/app/pages/club/club.page.html @@ -52,7 +52,11 @@ {{ "common.Mitgliederverwaltung" | translate}} - + + + {{"common.average__age" | translate}} + {{club.averageAge}} + Mitglieder @@ -64,11 +68,7 @@ Administratoren {{club['clubAdmins'].length}} - - - {{"common.average__age" | translate}} - {{club.averageAge}} - + Teams diff --git a/src/app/pages/club/club.page.ts b/src/app/pages/club/club.page.ts index 17395b94..9fd9ab10 100644 --- a/src/app/pages/club/club.page.ts +++ b/src/app/pages/club/club.page.ts @@ -31,6 +31,7 @@ import { MemberPage } from "../member/member.page"; import { ClubMemberListPage } from "../club-member-list/club-member-list.page"; import { ClubAdminListPage } from "../club-admin-list/club-admin-list.page"; import { TeamListPage } from "../team-list/team-list.page"; +import { ClubTeamListPage } from "../club-team-list/club-team-list.page"; @Component({ selector: "app-club", @@ -255,12 +256,12 @@ async openAdminList(){ async openTeamList(){ console.log("open TEam List"); const modal = await this.modalCtrl.create({ - component: TeamListPage, + component: ClubTeamListPage, presentingElement: await this.modalCtrl.getTop(), canDismiss: true, showBackdrop: true, componentProps: { - clubId: this.club.id + clubId: this.club.id, }, }); modal.present(); diff --git a/src/app/pages/team-list/team-list.page.ts b/src/app/pages/team-list/team-list.page.ts index b359c777..693b9815 100644 --- a/src/app/pages/team-list/team-list.page.ts +++ b/src/app/pages/team-list/team-list.page.ts @@ -63,61 +63,4 @@ export class TeamListPage implements OnInit { } } - async joinTeamAlert() { - /* - let _inputs = []; - - if (this.teamList.length > 0) { - for (let team of this.availableTeamList) { - _inputs.push({ - label: team.liga + " " + team.name, - type: "radio", - value: team.id, - }); - } - } else { - for (let team of this.availableTeamList) { - _inputs.push({ - label: team.liga + " " + team.name, - type: "radio", - value: team.id, - }); - } - } - _inputs = _inputs.sort((a, b) => Number(a.id) - Number(b.id)); - _inputs = [...new Set(_inputs)]; - - const alert = await this.alertController.create({ - header: "Wähle dein Team aus:", - buttons: [ - { - text: "auswählen", - role: "confirm", - handler: async (data: any) => { - // console.log(data); - this.fbService.setTeamRequest(data, this.user.uid); - const toast = await this.toastController.create({ - message: "Anfrage an Team gesendet", - color: "primary", - duration: 1500, - position: "bottom", - }); - - await toast.present(); - }, - }, - { - text: "abbrechen", - role: "cancel", - handler: () => { - console.log("abbrechen"); - }, - }, - ], - inputs: _inputs, - }); - - await alert.present(); - */ - } }