feat: add create survey component (#579)

Fixes: #185
This commit is contained in:
punwai
2020-08-13 08:24:06 +05:30
committed by GitHub
parent 2f3005cab8
commit 6f3b6c40e7
14 changed files with 496 additions and 7 deletions
@@ -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() {
}
}