aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/app/_modals/alert-dialog
diff options
context:
space:
mode:
authorNevena Bojovic <nenabojov@gmail.com>2022-04-04 21:52:26 +0200
committerNevena Bojovic <nenabojov@gmail.com>2022-04-04 21:52:26 +0200
commitcfaf42a42223bc60621ae583e8ac536d980a794a (patch)
treef43987731445ff7c0af42a2a1e014db905f37087 /frontend/src/app/_modals/alert-dialog
parent6ffac0e8f7803e895e411328917f6c49b2520b28 (diff)
parent8077f508fa552b789b669c433776357da1f809eb (diff)
Merge branch 'dev' of http://gitlab.pmf.kg.ac.rs/igrannonica/neuronstellar into dev
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();
+ }
+
+
+}