feat: add edit client page (#1147)

Fixes: #1146
This commit is contained in:
Karan Takalkar
2020-07-20 19:27:47 +05:30
committed by GitHub
parent 7aa26c64b2
commit 1587dcfe5d
9 changed files with 455 additions and 3 deletions
@@ -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';
/**
* Clients data and template resolver.
*/
@Injectable()
export class ClientDataAndTemplateResolver implements Resolve<Object> {
/**
* @param {ClientsService} ClientsService Clients service.
*/
constructor(private clientsService: ClientsService) { }
/**
* Returns the Clients data and template.
* @returns {Observable<any>}
*/
resolve(route: ActivatedRouteSnapshot): Observable<any> {
const clientId = route.paramMap.get('clientId');
return this.clientsService.getClientDataAndTemplate(clientId);
}
}