feat: client notes page
- add notes-tab.component - add edit-note-dialog.coponent fixes: #111
This commit is contained in:
committed by
Abhay Chawla
parent
d84dbf50ed
commit
0cd987cabf
@@ -0,0 +1,31 @@
|
||||
/** Angular Imports */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Resolve, ActivatedRouteSnapshot } from '@angular/router';
|
||||
|
||||
/** rxjs Imports */
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
/** Custom Services */
|
||||
import { ClientsService } from '../clients.service';
|
||||
|
||||
/**
|
||||
* Client Notes resolver.
|
||||
*/
|
||||
@Injectable()
|
||||
export class ClientNotesResolver implements Resolve<Object> {
|
||||
|
||||
/**
|
||||
* @param {ClientsService} ClientsService Clients service.
|
||||
*/
|
||||
constructor(private clientsService: ClientsService) { }
|
||||
|
||||
/**
|
||||
* Returns the Client's Notes.
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
resolve(route: ActivatedRouteSnapshot): Observable<any> {
|
||||
const clientId = route.parent.paramMap.get('clientId');
|
||||
return this.clientsService.getClientNotes(clientId);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user