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() {
}
}
+2
View File
@@ -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,
+4 -1
View File
@@ -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 { }