mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-29 20:51:09 -04:00
Add New SweetAlert & Notification Components
This commit is contained in:
committed by
Mohit Panjwani
parent
3f7db2793f
commit
c3d3e5e35f
@ -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
|
||||
|
||||
Reference in New Issue
Block a user