Add New SweetAlert & Notification Components

This commit is contained in:
Aman Upadhyay
2021-04-09 12:35:50 +00:00
committed by Mohit Panjwani
parent 3f7db2793f
commit c3d3e5e35f
78 changed files with 2295 additions and 984 deletions

View File

@ -145,6 +145,7 @@ export default {
},
methods: {
...mapActions('auth', ['login']),
...mapActions('notification', ['showNotification']),
async validateBeforeSubmit() {
axios.defaults.withCredentials = true
@ -158,6 +159,10 @@ export default {
try {
await this.login(this.loginData)
this.$router.push('/admin/dashboard')
this.showNotification({
type: 'success',
message: 'Logged in successfully.',
})
this.isLoading = false
} catch (error) {
this.isLoading = false