feat(closing-entries): view closure component
Add view closure component to view accounting closure.
This commit is contained in:
@@ -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]);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user