feat(chart-of-accounts): view GL Account component

Add view GL Account component.
This commit is contained in:
Abhay Chawla
2018-08-04 22:09:54 +05:30
parent 787c3b66d3
commit 1707c2742c
11 changed files with 217 additions and 18 deletions
@@ -1,5 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
import { Router } from '@angular/router';
import { AccountingService } from '../../accounting.service';
@Component({
@@ -17,7 +19,8 @@ export class CreateGlAccountComponent implements OnInit {
tagData: any;
constructor(private formBuilder: FormBuilder,
private accountingService: AccountingService) { }
private accountingService: AccountingService,
private router: Router) { }
ngOnInit() {
this.createGlAccountForm();
@@ -69,8 +72,8 @@ export class CreateGlAccountComponent implements OnInit {
}
submit() {
this.accountingService.createGlAccount(this.glAccountForm.value).subscribe(response => {
console.log(response);
this.accountingService.createGlAccount(this.glAccountForm.value).subscribe((response: any) => {
this.router.navigate(['/accounting/chart-of-accounts/gl-accounts/view', response.resourceId]);
});
}