feat: edit and delete financial activity mapping

Add edit financial activity component and delete dialog component.
This commit is contained in:
abhay_1806
2018-07-28 20:18:01 +05:30
committed by Abhay Chawla
parent 8ebfd61aa3
commit ff8e878e9a
15 changed files with 279 additions and 38 deletions
@@ -0,0 +1,8 @@
<h1 mat-dialog-title>Delete</h1>
<div mat-dialog-content>
<p>Are you sure you want to delete {{ data.deleteContext }} ?</p>
</div>
<mat-dialog-actions align="end">
<button mat-button mat-dialog-close>Cancel</button>
<button mat-button [mat-dialog-close]="{ delete: true }">Confirm</button>
</mat-dialog-actions>
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { DeleteDialogComponent } from './delete-dialog.component';
describe('DeleteDialogComponent', () => {
let component: DeleteDialogComponent;
let fixture: ComponentFixture<DeleteDialogComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ DeleteDialogComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(DeleteDialogComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -0,0 +1,17 @@
import { Component, OnInit, Inject } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
@Component({
selector: 'mifosx-delete-dialog',
templateUrl: './delete-dialog.component.html',
styleUrls: ['./delete-dialog.component.scss']
})
export class DeleteDialogComponent implements OnInit {
constructor(public dialogRef: MatDialogRef<DeleteDialogComponent>,
@Inject(MAT_DIALOG_DATA) public data: any) { }
ngOnInit() {
}
}
+6 -1
View File
@@ -4,6 +4,7 @@ import { CommonModule } from '@angular/common';
import { LoaderComponent } from './loader/loader.component';
import { FileUploadComponent } from './file-upload/file-upload.component';
import { CoreModule } from '../core/core.module';
import { DeleteDialogComponent } from './delete-dialog/delete-dialog.component';
@NgModule({
imports: [
@@ -12,11 +13,15 @@ import { CoreModule } from '../core/core.module';
],
declarations: [
LoaderComponent,
FileUploadComponent
FileUploadComponent,
DeleteDialogComponent
],
exports: [
LoaderComponent,
FileUploadComponent
],
entryComponents: [
DeleteDialogComponent
]
})
export class SharedModule { }