forked from xurror/web-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: view financial activity mapping component
Add view financial activity mapping component.
- Loading branch information
1 parent
69161a3
commit 8ebfd61
Showing
10 changed files
with
130 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ppings/create-financial-activity-mapping/create-financial-activity-mapping.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
.container { | ||
width: 37rem; | ||
max-width: 37rem; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
...y-mappings/view-financial-activity-mapping/view-financial-activity-mapping.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 changes: 14 additions & 0 deletions
14
...y-mappings/view-financial-activity-mapping/view-financial-activity-mapping.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.container { | ||
max-width: 37rem; | ||
} | ||
|
||
.content { | ||
div { | ||
margin: 1rem 0; | ||
word-wrap: break-word; | ||
} | ||
|
||
.header { | ||
font-weight: 500; | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
...appings/view-financial-activity-mapping/view-financial-activity-mapping.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 changes: 31 additions & 0 deletions
31
...ity-mappings/view-financial-activity-mapping/view-financial-activity-mapping.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
}); | ||
} | ||
|
||
} |