feat(closing-entries): view closure component

Add view closure component to view accounting closure.
This commit is contained in:
Abhay Chawla
2018-08-04 23:03:39 +05:30
parent df3f9c7b8a
commit fcb8dce131
9 changed files with 166 additions and 5 deletions
@@ -1,5 +1,6 @@
import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { Router } from '@angular/router';
import { AccountingService } from '../../accounting.service';
@@ -18,7 +19,8 @@ export class CreateClosureComponent implements OnInit {
officeData: any;
constructor(private formBuilder: FormBuilder,
private accountingService: AccountingService) { }
private accountingService: AccountingService,
private router: Router) { }
ngOnInit() {
this.createAccountingClosureForm();
@@ -45,8 +47,8 @@ export class CreateClosureComponent implements OnInit {
accountingClosure.locale = 'en';
accountingClosure.dateFormat = 'dd MMMM yyyy';
accountingClosure.closingDate = '4 August 2018';
this.accountingService.createAccountingClosure(accountingClosure).subscribe(response => {
console.log(response);
this.accountingService.createAccountingClosure(accountingClosure).subscribe((response: any) => {
this.router.navigate(['/accounting/closing-entries/view', response.resourceId]);
});
}