feat: view financial activity mapping component
Add view financial activity mapping component.
This commit is contained in:
+40
@@ -0,0 +1,40 @@
|
||||
<div fxLayout="row" fxLayoutAlign="end" fxLayoutGap="2%" class="container m-b-20">
|
||||
<button mat-raised-button color="primary">
|
||||
<mat-icon>edit</mat-icon> Edit
|
||||
</button>
|
||||
<button mat-raised-button color="warn">
|
||||
<mat-icon>delete</mat-icon> Delete
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
|
||||
<mat-card>
|
||||
|
||||
<mat-card-content>
|
||||
|
||||
<div fxLayout="row wrap" class="content">
|
||||
|
||||
<div fxFlex="50%" class="header">
|
||||
Financial Activity
|
||||
</div>
|
||||
|
||||
<div fxFlex="50%">
|
||||
{{ financialActivityAccountData?.financialActivityData.name }}
|
||||
</div>
|
||||
|
||||
<div fxFlex="50%" class="header">
|
||||
Account Name
|
||||
</div>
|
||||
|
||||
<div fxFlex="50%">
|
||||
{{ financialActivityAccountData?.glAccountData.name }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
|
||||
</mat-card>
|
||||
|
||||
</div>
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
.container {
|
||||
max-width: 37rem;
|
||||
}
|
||||
|
||||
.content {
|
||||
div {
|
||||
margin: 1rem 0;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.header {
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ViewFinancialActivityMappingComponent } from './view-financial-activity-mapping.component';
|
||||
|
||||
describe('ViewFinancialActivityMappingComponent', () => {
|
||||
let component: ViewFinancialActivityMappingComponent;
|
||||
let fixture: ComponentFixture<ViewFinancialActivityMappingComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ ViewFinancialActivityMappingComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ViewFinancialActivityMappingComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { AccountingService } from '../../accounting.service';
|
||||
|
||||
@Component({
|
||||
selector: 'mifosx-view-financial-activity-mapping',
|
||||
templateUrl: './view-financial-activity-mapping.component.html',
|
||||
styleUrls: ['./view-financial-activity-mapping.component.scss']
|
||||
})
|
||||
export class ViewFinancialActivityMappingComponent implements OnInit {
|
||||
|
||||
financialActivityAccountId: any;
|
||||
financialActivityAccountData: any;
|
||||
|
||||
constructor(private route: ActivatedRoute,
|
||||
private accountingService: AccountingService) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.financialActivityAccountId = this.route.snapshot.paramMap.get('id');
|
||||
this.getFinancialActivityAccount();
|
||||
}
|
||||
|
||||
getFinancialActivityAccount() {
|
||||
this.accountingService.getFinancialActivityAccount(this.financialActivityAccountId)
|
||||
.subscribe((financialActivityAccountData: any) => {
|
||||
this.financialActivityAccountData = financialActivityAccountData;
|
||||
console.log(financialActivityAccountData);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user