summaryrefslogtreecommitdiffstats
path: root/public/src/app/error-dialog
diff options
context:
space:
mode:
Diffstat (limited to 'public/src/app/error-dialog')
-rw-r--r--public/src/app/error-dialog/error-dialog.component.html17
-rw-r--r--public/src/app/error-dialog/error-dialog.component.scss0
-rw-r--r--public/src/app/error-dialog/error-dialog.component.ts17
3 files changed, 34 insertions, 0 deletions
diff --git a/public/src/app/error-dialog/error-dialog.component.html b/public/src/app/error-dialog/error-dialog.component.html
new file mode 100644
index 0000000..7b72d06
--- /dev/null
+++ b/public/src/app/error-dialog/error-dialog.component.html
@@ -0,0 +1,17 @@
+<p-dialog [(visible)]="store.displayErrorDialog" modal="modal" width="500" [responsive]="true" data-tests-id="error-dialog">
+ <p-header>
+ <span style="font-size: 1.3em;">
+ Error
+ </span>
+ </p-header>
+
+ <div *ngFor="let error of store.ErrorContent">
+ {{ error.formattedErrorMessage }}
+ </div>
+
+ <p-footer>
+ <button mat-raised-button color="primary" (click)="closeDialog()" data-tests-id="error-cancel">
+ Cancel
+ </button>
+ </p-footer>
+</p-dialog>
diff --git a/public/src/app/error-dialog/error-dialog.component.scss b/public/src/app/error-dialog/error-dialog.component.scss
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/public/src/app/error-dialog/error-dialog.component.scss
diff --git a/public/src/app/error-dialog/error-dialog.component.ts b/public/src/app/error-dialog/error-dialog.component.ts
new file mode 100644
index 0000000..3e7bfe0
--- /dev/null
+++ b/public/src/app/error-dialog/error-dialog.component.ts
@@ -0,0 +1,17 @@
+import { Component, OnInit } from '@angular/core';
+import { Store } from '../store/store';
+
+@Component({
+ selector: 'app-error-dialog',
+ templateUrl: './error-dialog.component.html',
+ styleUrls: ['./error-dialog.component.scss']
+})
+export class ErrorDialogComponent implements OnInit {
+ constructor(public store: Store) {}
+
+ ngOnInit() {}
+
+ closeDialog() {
+ this.store.displayErrorDialog = false;
+ }
+}