Skip to content

Commit

Permalink
feat update teamlist
Browse files Browse the repository at this point in the history
  • Loading branch information
sansan88 committed Jan 23, 2024
1 parent a5eaf79 commit 05e728a
Show file tree
Hide file tree
Showing 11 changed files with 94 additions and 65 deletions.
1 change: 1 addition & 0 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ const routes: Routes = [
(m) => m.NotFoundPageModule
),
},

];

@NgModule({
Expand Down
2 changes: 2 additions & 0 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand All @@ -75,6 +76,7 @@ import { TeamAdminListPage } from "./pages/team-admin-list/team-admin-list.page"
ClubPage,
ClubMemberListPage,
ClubAdminListPage,
ClubTeamListPage,

TeamPage,
TeamMemberListPage,
Expand Down
17 changes: 17 additions & 0 deletions src/app/pages/club-team-list/club-team-list-routing.module.ts
Original file line number Diff line number Diff line change
@@ -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 {}
20 changes: 20 additions & 0 deletions src/app/pages/club-team-list/club-team-list.module.ts
Original file line number Diff line number Diff line change
@@ -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 {}
13 changes: 13 additions & 0 deletions src/app/pages/club-team-list/club-team-list.page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<ion-header [translucent]="true">
<ion-toolbar>
<ion-title>club-team-list</ion-title>
</ion-toolbar>
</ion-header>

<ion-content [fullscreen]="true">
<ion-header collapse="condense">
<ion-toolbar>
<ion-title size="large">club-team-list</ion-title>
</ion-toolbar>
</ion-header>
</ion-content>
Empty file.
17 changes: 17 additions & 0 deletions src/app/pages/club-team-list/club-team-list.page.spec.ts
Original file line number Diff line number Diff line change
@@ -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<ClubTeamListPage>;

beforeEach(async(() => {
fixture = TestBed.createComponent(ClubTeamListPage);
component = fixture.componentInstance;
fixture.detectChanges();
}));

it('should create', () => {
expect(component).toBeTruthy();
});
});
15 changes: 15 additions & 0 deletions src/app/pages/club-team-list/club-team-list.page.ts
Original file line number Diff line number Diff line change
@@ -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() {
}

}
12 changes: 6 additions & 6 deletions src/app/pages/club/club.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@
<ion-list-header>
<ion-label> {{ "common.Mitgliederverwaltung" | translate}} </ion-label>
</ion-list-header>

<ion-item>
<ion-icon name="stats-chart-outline" slot="start"></ion-icon>
<ion-label> {{"common.average__age" | translate}} </ion-label>
<ion-note slot="end"> {{club.averageAge}}</ion-note>
</ion-item>
<ion-item detail="true" (click)="openMemberList()">
<ion-icon name="people-circle-outline" slot="start"></ion-icon>
<ion-label> Mitglieder </ion-label>
Expand All @@ -64,11 +68,7 @@
<ion-label> Administratoren </ion-label>
<ion-note slot="end">{{club['clubAdmins'].length}}</ion-note>
</ion-item>
<ion-item>
<ion-icon name="stats-chart-outline" slot="start"></ion-icon>
<ion-label> {{"common.average__age" | translate}} </ion-label>
<ion-note slot="end"> {{club.averageAge}}</ion-note>
</ion-item>

<ion-item detail="true" (click)="openTeamList()">
<ion-icon name="people-outline" slot="start"></ion-icon>
<ion-label> Teams </ion-label>
Expand Down
5 changes: 3 additions & 2 deletions src/app/pages/club/club.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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();
Expand Down
57 changes: 0 additions & 57 deletions src/app/pages/team-list/team-list.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
*/
}
}

0 comments on commit 05e728a

Please sign in to comment.