Skip to content

Commit

Permalink
remove logs
Browse files Browse the repository at this point in the history
  • Loading branch information
sansan88 committed Jun 26, 2024
1 parent f0352c5 commit c5bb943
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
26 changes: 13 additions & 13 deletions src/app/services/firebase.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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
Expand All @@ -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(
Expand All @@ -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
Expand All @@ -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(
Expand All @@ -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
Expand All @@ -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");
Expand All @@ -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
Expand All @@ -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(
Expand All @@ -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
Expand Down Expand Up @@ -258,7 +258,7 @@ export class FirebaseService {
}

getClubMemberRefs(clubId: string): Observable<Profile[]> {
console.log(clubId);
// console.log(clubId);
const clubMemberRefList = collection(
this.firestore,
`club/${clubId}/members`
Expand Down Expand Up @@ -370,7 +370,7 @@ export class FirebaseService {
}

approveUserClubRequest(clubId: string, userId: string): Promise<any> {
console.log("club " + clubId, " / userid " + userId);
// console.log("club " + clubId, " / userid " + userId);
return setDoc(
doc(this.firestore, `/club/${clubId}/requests/${userId}`),
{
Expand Down
14 changes: 7 additions & 7 deletions src/app/services/firebase/event.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -181,17 +181,17 @@ export class EventService {
eventId: string,
schichtId: string
): Observable<any[]> {
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<any[]>;
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/app/services/firebase/helfer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export class HelferService {
}*/

getUserHelferPunkteRefs(userId: any, clubId: string): Observable<any[]> {
console.log(userId, clubId)
// console.log(userId, clubId)
const helferPunkteRefList = collection(
this.firestore,
`club/${clubId}/helferPunkte`
Expand Down
4 changes: 2 additions & 2 deletions src/app/services/firebase/training.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c5bb943

Please sign in to comment.