feat(system): view, edit, delete code (#380)

- Add view code component
- Add edit code component

Fixes: #379
This commit is contained in:
Chirag Gupta
2019-05-21 20:19:41 +05:30
committed by Abhay Chawla
parent fbb7a1583a
commit e766a91ecf
16 changed files with 625 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 { SystemService } from '../../system.service';
/**
* Code Values data resolver.
*/
@Injectable()
export class CodeValuesResolver implements Resolve<Object> {
/**
* @param {SystemService} systemService System service.
*/
constructor(private systemService: SystemService) {}
/**
* Returns the Code Values data.
* @returns {Observable<any>}
*/
resolve(route: ActivatedRouteSnapshot): Observable<any> {
const codeId = route.paramMap.get('id');
return this.systemService.getCodeValues(codeId);
}
}