feat(system): view, edit, delete code (#380)
- Add view code component - Add edit code component Fixes: #379
This commit is contained in:
committed by
Abhay Chawla
parent
fbb7a1583a
commit
e766a91ecf
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user