@@ -0,0 +1,8 @@
|
||||
<h1 mat-dialog-title>Cancel</h1>
|
||||
<div mat-dialog-content>
|
||||
<p>Are you sure you want to leave this page and lose all inputted data?</p>
|
||||
</div>
|
||||
<mat-dialog-actions align="end">
|
||||
<button mat-raised-button mat-dialog-close>No</button>
|
||||
<button mat-raised-button color="warn" [mat-dialog-close]="{ cancel: true }">Yes</button>
|
||||
</mat-dialog-actions>
|
||||
@@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { CancelDialogComponent } from './cancel-dialog.component';
|
||||
|
||||
describe('CancelDialogComponent', () => {
|
||||
let component: CancelDialogComponent;
|
||||
let fixture: ComponentFixture<CancelDialogComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ CancelDialogComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(CancelDialogComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,23 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, Inject } from '@angular/core';
|
||||
import { MatDialogRef } from '@angular/material';
|
||||
|
||||
/**
|
||||
* Cancel dialog component.
|
||||
*/
|
||||
@Component({
|
||||
selector: 'mifosx-cancel-dialog',
|
||||
templateUrl: './cancel-dialog.component.html',
|
||||
styleUrls: ['./cancel-dialog.component.scss']
|
||||
})
|
||||
export class CancelDialogComponent implements OnInit {
|
||||
|
||||
/**
|
||||
* @param {MatDialogRef} dialogRef Component reference to dialog.
|
||||
*/
|
||||
constructor(public dialogRef: MatDialogRef<CancelDialogComponent>) { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user