This commit is contained in:
Peter Maquiran
2021-06-16 15:58:44 +01:00
parent 629db09c62
commit e2b38761c2
17 changed files with 131 additions and 41 deletions
+18 -6
View File
@@ -25,7 +25,7 @@ export class ToastService {
async successMessage(message?: any, callback?) {
let notification = document.createElement('div')
notification.id = 'notification'
notification.className = 'notification'
notification.innerHTML = `
<div class="main-content width-100 pa-20">
@@ -43,15 +43,21 @@ export class ToastService {
if (callback) {
callback()
}
notification.remove()
},7000)
notification.style.right = "-100%"
setTimeout(()=>{
notification.remove()
},1000)
},6000)
}
async badRequest(message?: string, callback?) {
let notification = document.createElement('div')
notification.id = 'notification'
notification.className = 'notification'
notification.innerHTML = `
<div class="main-content width-100 pa-20">
@@ -69,8 +75,14 @@ export class ToastService {
if (callback) {
callback()
}
notification.remove()
},7000)
notification.style.right = "-100%"
setTimeout(()=>{
notification.remove()
},1000)
},6000)
}