feat: add view, edit roles and permission component (#632)

- Add view roles and permission
- Edit roles and permission
- Edit role description

Fixes: #176
This commit is contained in:
Muskan Khedia
2020-05-31 13:05:52 +05:30
committed by GitHub
parent ab3bef463d
commit 28b3f730f0
23 changed files with 864 additions and 8 deletions
@@ -0,0 +1,8 @@
<h1 mat-dialog-title>Enable</h1>
<div mat-dialog-content>
<p>Are you sure you want to enable {{ data.enableContext }} ?</p>
</div>
<mat-dialog-actions align="end">
<button mat-raised-button mat-dialog-close>Cancel</button>
<button mat-raised-button color="warn" [mat-dialog-close]="{ enable: true }">Confirm</button>
</mat-dialog-actions>
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { EnableDialogComponent } from './enable-dialog.component';
describe('EnableDialogComponent', () => {
let component: EnableDialogComponent;
let fixture: ComponentFixture<EnableDialogComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ EnableDialogComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(EnableDialogComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -0,0 +1,25 @@
/** Angular Imports */
import { Component, OnInit, Inject } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
/**
* Enable dialog component.
*/
@Component({
selector: 'mifosx-enable-dialog',
templateUrl: './enable-dialog.component.html',
styleUrls: ['./enable-dialog.component.scss']
})
export class EnableDialogComponent implements OnInit {
/**
* @param {MatDialogRef} dialogRef Component reference to dialog.
* @param {any} data Provides a enableContext.
*/
constructor(public dialogRef: MatDialogRef<EnableDialogComponent>,
@Inject(MAT_DIALOG_DATA) public data: any) { }
ngOnInit() {
}
}