feat: add centers action (assign and unassign staff) (#1091)
Fixes: #1090
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
<h1 mat-dialog-title>{{data.heading}}</h1>
|
||||
<div mat-dialog-content>
|
||||
<p>{{ data.dialogContext }} ?</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]="{ confirm: true }">Confirm</button>
|
||||
</mat-dialog-actions>
|
||||
@@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ConfirmationDialogComponent } from './confirmation-dialog.component';
|
||||
|
||||
describe('ConfirmationDialogComponent', () => {
|
||||
let component: ConfirmationDialogComponent;
|
||||
let fixture: ComponentFixture<ConfirmationDialogComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ ConfirmationDialogComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ConfirmationDialogComponent);
|
||||
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';
|
||||
|
||||
/**
|
||||
* Delete dialog component.
|
||||
*/
|
||||
@Component({
|
||||
selector: 'mifosx-confirmation-dialog',
|
||||
templateUrl: './confirmation-dialog.component.html',
|
||||
styleUrls: ['./confirmation-dialog.component.scss']
|
||||
})
|
||||
export class ConfirmationDialogComponent implements OnInit {
|
||||
|
||||
/**
|
||||
* @param {MatDialogRef} dialogRef Component reference to dialog.
|
||||
* @param {any} data Provides a deleteContext.
|
||||
*/
|
||||
constructor(public dialogRef: MatDialogRef<ConfirmationDialogComponent>,
|
||||
@Inject(MAT_DIALOG_DATA) public data: any) { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -14,6 +14,7 @@ import { ThemePickerComponent } from './theme-picker/theme-picker.component';
|
||||
import { ChangePasswordDialogComponent } from './change-password-dialog/change-password-dialog.component';
|
||||
import { EnableDialogComponent } from './enable-dialog/enable-dialog.component';
|
||||
import { DisableDialogComponent } from './disable-dialog/disable-dialog.component';
|
||||
import { ConfirmationDialogComponent } from './confirmation-dialog/confirmation-dialog.component';
|
||||
|
||||
/** Custom Modules */
|
||||
import { IconsModule } from './icons.module';
|
||||
@@ -41,7 +42,8 @@ import { MaterialModule } from './material.module';
|
||||
ThemePickerComponent,
|
||||
ChangePasswordDialogComponent,
|
||||
EnableDialogComponent,
|
||||
DisableDialogComponent
|
||||
DisableDialogComponent,
|
||||
ConfirmationDialogComponent
|
||||
],
|
||||
exports: [
|
||||
FileUploadComponent,
|
||||
@@ -59,7 +61,8 @@ import { MaterialModule } from './material.module';
|
||||
DeleteDialogComponent,
|
||||
ChangePasswordDialogComponent,
|
||||
EnableDialogComponent,
|
||||
DisableDialogComponent
|
||||
DisableDialogComponent,
|
||||
ConfirmationDialogComponent
|
||||
]
|
||||
})
|
||||
export class SharedModule { }
|
||||
|
||||
Reference in New Issue
Block a user