feat(closing-entries): view closure component
Add view closure component to view accounting closure.
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
<div fxLayout="row" fxLayoutAlign="end" fxLayoutGap="2%" fxLayout.lt-md="column" class="container m-b-20">
|
||||
<button mat-raised-button color="warn" (click)="deleteAccountingClosure()">
|
||||
<mat-icon>delete</mat-icon> Delete
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="container" *ngIf="accountingClosure">
|
||||
|
||||
<mat-card>
|
||||
|
||||
<mat-card-content>
|
||||
|
||||
<div fxLayout="row wrap" class="content">
|
||||
|
||||
<div fxFlex="50%" class="header">
|
||||
Office
|
||||
</div>
|
||||
|
||||
<div fxFlex="50%">
|
||||
{{ accountingClosure.officeName }}
|
||||
</div>
|
||||
|
||||
<div fxFlex="50%" class="header">
|
||||
Closure Date
|
||||
</div>
|
||||
|
||||
<div fxFlex="50%">
|
||||
{{ accountingClosure.closingDate }}
|
||||
</div>
|
||||
|
||||
<div fxFlex="50%" class="header">
|
||||
Closed By
|
||||
</div>
|
||||
|
||||
<div fxFlex="50%">
|
||||
{{ accountingClosure.createdByUsername }}
|
||||
</div>
|
||||
|
||||
<div fxFlex="50%" class="header">
|
||||
Updated By
|
||||
</div>
|
||||
|
||||
<div fxFlex="50%">
|
||||
{{ accountingClosure.lastUpdatedByUsername }}
|
||||
</div>
|
||||
|
||||
<div fxFlex="50%" class="header">
|
||||
Updated On
|
||||
</div>
|
||||
|
||||
<div fxFlex="50%">
|
||||
{{ accountingClosure.lastUpdatedDate }}
|
||||
</div>
|
||||
|
||||
<div fxFlex="50%" class="header">
|
||||
Closure Creation Date
|
||||
</div>
|
||||
|
||||
<div fxFlex="50%">
|
||||
{{ accountingClosure.createdDate }}
|
||||
</div>
|
||||
|
||||
<div fxFlex="50%" class="header">
|
||||
Comments
|
||||
</div>
|
||||
|
||||
<div fxFlex="50%">
|
||||
{{ accountingClosure.comments }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
|
||||
</mat-card>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,14 @@
|
||||
.container {
|
||||
max-width: 37rem;
|
||||
}
|
||||
|
||||
.content {
|
||||
div {
|
||||
margin: 1rem 0;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.header {
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ViewClosureComponent } from './view-closure.component';
|
||||
|
||||
describe('ViewClosureComponent', () => {
|
||||
let component: ViewClosureComponent;
|
||||
let fixture: ComponentFixture<ViewClosureComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ ViewClosureComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ViewClosureComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,31 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
|
||||
import { AccountingService } from '../../accounting.service';
|
||||
|
||||
@Component({
|
||||
selector: 'mifosx-view-closure',
|
||||
templateUrl: './view-closure.component.html',
|
||||
styleUrls: ['./view-closure.component.scss']
|
||||
})
|
||||
export class ViewClosureComponent implements OnInit {
|
||||
|
||||
accountingClosureId: number;
|
||||
accountingClosure: any;
|
||||
|
||||
constructor(private accountingService: AccountingService,
|
||||
private route: ActivatedRoute) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.accountingClosureId = Number(this.route.snapshot.paramMap.get('id'));
|
||||
this.getAccountingClosure();
|
||||
}
|
||||
|
||||
getAccountingClosure() {
|
||||
this.accountingService.getAccountingClosure(this.accountingClosureId)
|
||||
.subscribe((accountingClosure: any) => {
|
||||
this.accountingClosure = accountingClosure;
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user