diff --git a/src/app/notifier.service.ts b/src/app/notifier.service.ts index 83faa42..95c8d9b 100644 --- a/src/app/notifier.service.ts +++ b/src/app/notifier.service.ts @@ -9,7 +9,7 @@ export class NotifierService { constructor(private snackBar:MatSnackBar) { } - showNotification(displayMessage:string, buttonText: string, messageType: 'error' | 'success') { + showNotification(displayMessage:string, buttonText: string, messageType: 'error' | 'success' | 'warning') { this.snackBar.openFromComponent(NotifierComponent, { data: { message: displayMessage, @@ -19,7 +19,16 @@ export class NotifierService { duration: 4000, verticalPosition: 'top', panelClass: [messageType] - }) + }); + this.playSound(); + } + + playSound() { + console.log('Play sound called...'); + let audio = new Audio(); + audio.src = '../assets/notifier.mp3'; + audio.load(); + audio.play(); } } diff --git a/src/app/notifier/notifier..wav b/src/app/notifier/notifier..wav new file mode 100644 index 0000000..4cf0e09 Binary files /dev/null and b/src/app/notifier/notifier..wav differ diff --git a/src/app/notifier/notifier.component.css b/src/app/notifier/notifier.component.css index 072ab95..22d2b82 100644 --- a/src/app/notifier/notifier.component.css +++ b/src/app/notifier/notifier.component.css @@ -29,3 +29,9 @@ background: whitesmoke; color: black; } + +::ng-deep .mat-snack-bar-container.warning { + background: antiquewhite; + color: #fdebd0; + +} diff --git a/src/app/notifier/notifier.component.html b/src/app/notifier/notifier.component.html index 6aaf969..faf7bff 100644 --- a/src/app/notifier/notifier.component.html +++ b/src/app/notifier/notifier.component.html @@ -1,3 +1,4 @@ +
{{ data.type | titlecase }} diff --git a/src/app/settings/settings.component.html b/src/app/settings/settings.component.html index bfd676e..b053167 100644 --- a/src/app/settings/settings.component.html +++ b/src/app/settings/settings.component.html @@ -79,17 +79,6 @@ style="align-items: center;">
-
-
- - Account Code - -
@@ -142,6 +131,18 @@ +
+
+ + Account Code + + +
diff --git a/src/app/settings/settings.component.ts b/src/app/settings/settings.component.ts index 80341c0..1509f30 100644 --- a/src/app/settings/settings.component.ts +++ b/src/app/settings/settings.component.ts @@ -112,7 +112,7 @@ export class SettingsComponent implements OnInit { closeIntegration() { if ( this.xeroAccCod == '' ) this.notifierService - .showNotification("Warning: Payment confirmation disabled","Close",'success'); + .showNotification("Payment confirmation disabled!!","Close",'warning'); this.dialogRef.close(); } diff --git a/src/assets/notifier.mp3 b/src/assets/notifier.mp3 new file mode 100644 index 0000000..f8bec44 Binary files /dev/null and b/src/assets/notifier.mp3 differ