aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/app/_modals/alert-dialog
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/app/_modals/alert-dialog')
-rw-r--r--frontend/src/app/_modals/alert-dialog/alert-dialog.component.css0
-rw-r--r--frontend/src/app/_modals/alert-dialog/alert-dialog.component.html7
-rw-r--r--frontend/src/app/_modals/alert-dialog/alert-dialog.component.spec.ts25
-rw-r--r--frontend/src/app/_modals/alert-dialog/alert-dialog.component.ts28
4 files changed, 60 insertions, 0 deletions
diff --git a/frontend/src/app/_modals/alert-dialog/alert-dialog.component.css b/frontend/src/app/_modals/alert-dialog/alert-dialog.component.css
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/frontend/src/app/_modals/alert-dialog/alert-dialog.component.css
diff --git a/frontend/src/app/_modals/alert-dialog/alert-dialog.component.html b/frontend/src/app/_modals/alert-dialog/alert-dialog.component.html
new file mode 100644
index 00000000..82365193
--- /dev/null
+++ b/frontend/src/app/_modals/alert-dialog/alert-dialog.component.html
@@ -0,0 +1,7 @@
+<h2 mat-dialog-title class="text-muted">{{data.title}}</h2>
+<div mat-dialog-content class="mt-4" style="color: rgb(81, 76, 76);">
+ {{data.message}}
+</div>
+<div mat-dialog-actions class="d-flex justify-content-center mt-4">
+ <button mat-button cdkFocusInitial (click)="onOkClick()" style="background-color: lightgray;">OK</button>
+</div> \ No newline at end of file
diff --git a/frontend/src/app/_modals/alert-dialog/alert-dialog.component.spec.ts b/frontend/src/app/_modals/alert-dialog/alert-dialog.component.spec.ts
new file mode 100644
index 00000000..a93fc493
--- /dev/null
+++ b/frontend/src/app/_modals/alert-dialog/alert-dialog.component.spec.ts
@@ -0,0 +1,25 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { AlertDialogComponent } from './alert-dialog.component';
+
+describe('AlertDialogComponent', () => {
+ let component: AlertDialogComponent;
+ let fixture: ComponentFixture<AlertDialogComponent>;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [ AlertDialogComponent ]
+ })
+ .compileComponents();
+ });
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(AlertDialogComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/frontend/src/app/_modals/alert-dialog/alert-dialog.component.ts b/frontend/src/app/_modals/alert-dialog/alert-dialog.component.ts
new file mode 100644
index 00000000..e15f3c6f
--- /dev/null
+++ b/frontend/src/app/_modals/alert-dialog/alert-dialog.component.ts
@@ -0,0 +1,28 @@
+import { Component, OnInit } from '@angular/core';
+import { Inject} from '@angular/core';
+import { MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
+
+interface DialogData {
+ title: string;
+ message: string;
+}
+
+@Component({
+ selector: 'app-alert-dialog',
+ templateUrl: './alert-dialog.component.html',
+ styleUrls: ['./alert-dialog.component.css']
+})
+export class AlertDialogComponent {
+
+ constructor(
+ public dialogRef: MatDialogRef<AlertDialogComponent>,
+ @Inject(MAT_DIALOG_DATA) public data: DialogData,
+ //public dialog: MatDialog
+ ) {}
+
+ onOkClick(): void {
+ this.dialogRef.close();
+ }
+
+
+}