From c5bb943f2b779749c04477b7cdcd6c3ca4609ef9 Mon Sep 17 00:00:00 2001 From: sansan88 Date: Wed, 26 Jun 2024 11:10:40 +0200 Subject: [PATCH] remove logs --- src/app/services/firebase.service.ts | 26 +++++++++---------- src/app/services/firebase/event.service.ts | 14 +++++----- src/app/services/firebase/helfer.service.ts | 2 +- src/app/services/firebase/training.service.ts | 4 +-- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/app/services/firebase.service.ts b/src/app/services/firebase.service.ts index bf45c8d0..7c2fcc7c 100644 --- a/src/app/services/firebase.service.ts +++ b/src/app/services/firebase.service.ts @@ -59,7 +59,7 @@ export class FirebaseService { if (!user) return of([]); return this.getUserClubRefs(user); }), - tap((clubs) => console.log("Clubs:", clubs)), + // tap((clubs) => console.log("Clubs:", clubs)), mergeMap((clubs) => { if (clubs.length === 0) return of([]); return combineLatest( @@ -73,7 +73,7 @@ export class FirebaseService { map((clubsWithDetails) => clubsWithDetails.filter((club) => club !== null) ), // Filter out null (error cases) - tap((results) => console.log("Final results with all clubs:", results)), + // tap((results) => console.log("Final results with all clubs:", results)), catchError((err) => { console.error("Error in getClubList:", err); return of([]); // Return an empty array on error @@ -90,7 +90,7 @@ export class FirebaseService { if (!user) return of([]); return this.getUserClubAdminRefs(user); }), - tap((clubs) => console.log("Admin Clubs:", clubs)), + // tap((clubs) => console.log("Admin Clubs:", clubs)), mergeMap((clubs) => { if (clubs.length === 0) return of([]); return combineLatest( @@ -104,7 +104,7 @@ export class FirebaseService { map((clubsWithDetails) => clubsWithDetails.filter((club) => club !== null) ), // Filter out null (error cases) - tap((results) => console.log("Final results with all clubs:", results)), + // tap((results) => console.log("Final results with all clubs:", results)), catchError((err) => { console.error("Error in getClubList:", err); return of([]); // Return an empty array on error @@ -122,7 +122,7 @@ export class FirebaseService { if (!user) return of([]); return this.getUserTeamRefs(user); }), - tap((teams) => console.log("Teams:", teams)), + // tap((teams) => console.log("Teams:", teams)), mergeMap((teams) => { if (teams.length === 0) return of([]); return combineLatest( @@ -136,7 +136,7 @@ export class FirebaseService { map((teamsWithDetails) => teamsWithDetails.filter((team) => team !== null) ), // Filter out null (error cases) - tap((results) => console.log("Final results with all teams:", results)), + // tap((results) => console.log("Final results with all teams:", results)), catchError((err) => { console.error("Error in getTeamList:", err); return of([]); // Return an empty array on error @@ -146,7 +146,7 @@ export class FirebaseService { getClubTeamList(clubId) { return this.getClubTeamsRef(clubId).pipe( - tap((teams) => console.log("Teams for club:", teams)), + // /tap((teams) => console.log("Teams for club:", teams)), mergeMap((teams) => { if (teams.length === 0) { console.log("No teams found for club"); @@ -165,10 +165,10 @@ export class FirebaseService { }), map((teamsWithDetails) => { const filteredTeams = teamsWithDetails.filter((team) => team !== null); // Filter out null (error cases) - console.log("Filtered teams:", filteredTeams); + // console.log("Filtered teams:", filteredTeams); return filteredTeams; }), - tap((results) => console.log("Final results with all teams for club:", results)), + // tap((results) => console.log("Final results with all teams for club:", results)), catchError((err) => { console.error("Error in getClubTeamsWithDetails:", err); return of([]); // Return an empty array on error @@ -192,7 +192,7 @@ export class FirebaseService { if (!user) return of([]); return this.getUserTeamAdminRefs(user); }), - tap((teams) => console.log("Teams:", teams)), + // log("Teams:", teams)), mergeMap((teams) => { if (teams.length === 0) return of([]); return combineLatest( @@ -206,7 +206,7 @@ export class FirebaseService { map((teamsWithDetails) => teamsWithDetails.filter((team) => team !== null) ), // Filter out null (error cases) - tap((results) => console.log("Final results with all teams:", results)), + // tap((results) => console.log("Final results with all teams:", results)), catchError((err) => { console.error("Error in getTeamList:", err); return of([]); // Return an empty array on error @@ -258,7 +258,7 @@ export class FirebaseService { } getClubMemberRefs(clubId: string): Observable { - console.log(clubId); + // console.log(clubId); const clubMemberRefList = collection( this.firestore, `club/${clubId}/members` @@ -370,7 +370,7 @@ export class FirebaseService { } approveUserClubRequest(clubId: string, userId: string): Promise { - console.log("club " + clubId, " / userid " + userId); + // console.log("club " + clubId, " / userid " + userId); return setDoc( doc(this.firestore, `/club/${clubId}/requests/${userId}`), { diff --git a/src/app/services/firebase/event.service.ts b/src/app/services/firebase/event.service.ts index 5e979cfe..912cb04b 100644 --- a/src/app/services/firebase/event.service.ts +++ b/src/app/services/firebase/event.service.ts @@ -92,8 +92,8 @@ export class EventService { async setCreateClubEvent(event: Veranstaltung) { const user = this.authService.auth.currentUser; - console.log("event"); - console.log(event); + // console.log("event"); + // console.log(event); return addDoc( collection(this.firestore, `userProfile/${user.uid}/clubEvents`), event @@ -181,17 +181,17 @@ export class EventService { eventId: string, schichtId: string ): Observable { - console.log( + /*console.log( "getClubHelferEventSchichtAttendeesRef", clubId, eventId, schichtId - ); + );*/ const schichtAttendeesListRef = collection( this.firestore, `club/${clubId}/helferEvents/${eventId}/schichten/${schichtId}/attendees` ); - console.log(schichtAttendeesListRef.id, schichtAttendeesListRef.path); + // console.log(schichtAttendeesListRef.id, schichtAttendeesListRef.path); return collectionData(schichtAttendeesListRef, { idField: "id", }) as Observable; @@ -252,8 +252,8 @@ export class EventService { async setCreateHelferEvent(event: HelferEvent) { const user = this.authService.auth.currentUser; - console.log("Helferevent"); - console.log(event); + // console.log("Helferevent"); + // console.log(event); return addDoc( collection(this.firestore, `userProfile/${user.uid}/helferEvents`), event diff --git a/src/app/services/firebase/helfer.service.ts b/src/app/services/firebase/helfer.service.ts index 545653f9..76504ee2 100644 --- a/src/app/services/firebase/helfer.service.ts +++ b/src/app/services/firebase/helfer.service.ts @@ -58,7 +58,7 @@ export class HelferService { }*/ getUserHelferPunkteRefs(userId: any, clubId: string): Observable { - console.log(userId, clubId) + // console.log(userId, clubId) const helferPunkteRefList = collection( this.firestore, `club/${clubId}/helferPunkte` diff --git a/src/app/services/firebase/training.service.ts b/src/app/services/firebase/training.service.ts index c3a18813..0eaafed5 100644 --- a/src/app/services/firebase/training.service.ts +++ b/src/app/services/firebase/training.service.ts @@ -53,8 +53,8 @@ export class TrainingService { async setCreateTraining(training: Training) { const user = this.authService.auth.currentUser; - console.log("training"); - console.log(training); + // console.log("training"); + // console.log(training); return addDoc( collection(this.firestore, `userProfile/${user.uid}/trainings`), training