feat: edit and delete financial activity mapping
Add edit financial activity component and delete dialog component.
This commit is contained in:
@@ -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() {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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 { }
|
||||
|
||||
Reference in New Issue
Block a user