From 285865d5b26a830e7b164e9a7d096bab09067558 Mon Sep 17 00:00:00 2001 From: Fahim Ahmed <99824146+ahmedfahim21@users.noreply.github.com> Date: Fri, 7 Mar 2025 00:37:01 +0530 Subject: [PATCH] fix: add group notes (#2305) LGTM --- .../groups-view/notes-tab/notes-tab.component.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/app/groups/groups-view/notes-tab/notes-tab.component.ts b/src/app/groups/groups-view/notes-tab/notes-tab.component.ts index c35a28431..ebee56aa7 100644 --- a/src/app/groups/groups-view/notes-tab/notes-tab.component.ts +++ b/src/app/groups/groups-view/notes-tab/notes-tab.component.ts @@ -1,5 +1,5 @@ /** Angular Imports */ -import { Component } from '@angular/core'; +import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; /** Custom Services */ @@ -16,7 +16,7 @@ import { GroupsService } from '../../groups.service'; templateUrl: './notes-tab.component.html', styleUrls: ['./notes-tab.component.scss'] }) -export class NotesTabComponent { +export class NotesTabComponent implements OnInit { /** Group ID */ entityId: string; /** Username */ @@ -35,9 +35,13 @@ export class NotesTabComponent { private authenticationService: AuthenticationService, private groupsService: GroupsService ) { + this.entityId = this.route.parent.snapshot.params['groupId']; + this.addNote = this.addNote.bind(this); + } + + ngOnInit() { const savedCredentials = this.authenticationService.getCredentials(); this.username = savedCredentials.username; - this.entityId = this.route.parent.snapshot.params['groupId']; this.route.data.subscribe((data: { groupNotes: any }) => { this.entityNotes = data.groupNotes; });