@@ -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() {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
/** Angular Imports */
|
||||
import { NgModule } from '@angular/core';
|
||||
import { LayoutModule } from '@angular/cdk/layout';
|
||||
import { DragDropModule } from '@angular/cdk/drag-drop';
|
||||
import { STEPPER_GLOBAL_OPTIONS } from '@angular/cdk/stepper';
|
||||
import { FlexLayoutModule } from '@angular/flex-layout';
|
||||
import {
|
||||
@@ -48,6 +49,7 @@ import {
|
||||
*/
|
||||
@NgModule({
|
||||
exports: [
|
||||
DragDropModule,
|
||||
FlexLayoutModule,
|
||||
LayoutModule,
|
||||
MatAutocompleteModule,
|
||||
|
||||
@@ -7,6 +7,7 @@ import { ReactiveFormsModule, FormsModule } from '@angular/forms';
|
||||
import { FormfieldComponent } from './form-dialog/formfield/formfield.component';
|
||||
import { FormDialogComponent } from './form-dialog/form-dialog.component';
|
||||
import { DeleteDialogComponent } from './delete-dialog/delete-dialog.component';
|
||||
import { CancelDialogComponent } from './cancel-dialog/cancel-dialog.component';
|
||||
import { FileUploadComponent } from './file-upload/file-upload.component';
|
||||
import { FooterComponent } from './footer/footer.component';
|
||||
import { LanguageSelectorComponent } from './language-selector/language-selector.component';
|
||||
@@ -37,6 +38,7 @@ import { MaterialModule } from './material.module';
|
||||
FormfieldComponent,
|
||||
FormDialogComponent,
|
||||
DeleteDialogComponent,
|
||||
CancelDialogComponent,
|
||||
FileUploadComponent,
|
||||
FooterComponent,
|
||||
LanguageSelectorComponent,
|
||||
@@ -65,7 +67,8 @@ import { MaterialModule } from './material.module';
|
||||
EnableDialogComponent,
|
||||
DisableDialogComponent,
|
||||
ConfirmationDialogComponent,
|
||||
KeyboardShortcutsDialogComponent
|
||||
KeyboardShortcutsDialogComponent,
|
||||
CancelDialogComponent
|
||||
]
|
||||
})
|
||||
export class SharedModule { }
|
||||
|
||||
Reference in New Issue
Block a user