From b2597a460f3e1881f18e018caec48da4a3f3f37a Mon Sep 17 00:00:00 2001 From: Fahim Ahmed <99824146+ahmedfahim21@users.noreply.github.com> Date: Tue, 18 Mar 2025 22:51:04 +0530 Subject: [PATCH] fix: add client notes (#2331) --- .../clients-view/notes-tab/notes-tab.component.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/app/clients/clients-view/notes-tab/notes-tab.component.ts b/src/app/clients/clients-view/notes-tab/notes-tab.component.ts index 600cd356a..240b34ba2 100644 --- a/src/app/clients/clients-view/notes-tab/notes-tab.component.ts +++ b/src/app/clients/clients-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 Components */ @@ -16,7 +16,7 @@ import { AuthenticationService } from 'app/core/authentication/authentication.se templateUrl: './notes-tab.component.html', styleUrls: ['./notes-tab.component.scss'] }) -export class NotesTabComponent { +export class NotesTabComponent implements OnInit { /** Client ID */ entityId: string; /** Username */ @@ -34,9 +34,13 @@ export class NotesTabComponent { private clientsService: ClientsService, private authenticationService: AuthenticationService ) { + this.entityId = this.route.parent.snapshot.params['clientId']; + this.addNote = this.addNote.bind(this); + } + + ngOnInit(): void { const credentials = this.authenticationService.getCredentials(); this.username = credentials.username; - this.entityId = this.route.parent.snapshot.params['clientId']; this.route.data.subscribe((data: { clientNotes: any }) => { this.entityNotes = data.clientNotes; });