mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-29 12:41:10 -04:00
Add New SweetAlert & Notification Components
This commit is contained in:
committed by
Mohit Panjwani
parent
3f7db2793f
commit
c3d3e5e35f
@ -264,6 +264,8 @@ export default {
|
||||
|
||||
...mapActions(['fetchLanguages']),
|
||||
|
||||
...mapActions('notification', ['showNotification']),
|
||||
|
||||
onUploadHandler(cropper) {
|
||||
this.previewAvatar = cropper
|
||||
.getCroppedCanvas()
|
||||
@ -271,7 +273,10 @@ export default {
|
||||
},
|
||||
|
||||
onHandleUploadError() {
|
||||
window.toastr['error']('Oops! Something went wrong...')
|
||||
this.showNotification({
|
||||
type: 'error',
|
||||
message: 'Oops! Something went wrong...',
|
||||
})
|
||||
},
|
||||
|
||||
onChange(file) {
|
||||
@ -348,10 +353,10 @@ export default {
|
||||
|
||||
this.uploadAvatar(avatarData)
|
||||
}
|
||||
|
||||
window.toastr['success'](
|
||||
this.$t('settings.account_settings.updated_message')
|
||||
)
|
||||
this.showNotification({
|
||||
type: 'success',
|
||||
message: this.$t('settings.account_settings.updated_message'),
|
||||
})
|
||||
|
||||
this.formData.password = ''
|
||||
this.formData.confirm_password = ''
|
||||
|
||||
Reference in New Issue
Block a user