mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 20:21:10 -04:00
Add New SweetAlert & Notification Components
This commit is contained in:
committed by
Mohit Panjwani
parent
3f7db2793f
commit
c3d3e5e35f
@ -208,13 +208,17 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
...mapActions('user', ['uploadAvatar']),
|
||||
...mapActions('notification', ['showNotification']),
|
||||
onUploadHandler(cropper) {
|
||||
this.previewAvatar = cropper
|
||||
.getCroppedCanvas()
|
||||
.toDataURL(this.cropperOutputMime)
|
||||
},
|
||||
onHandleUploadError() {
|
||||
window.toastr['error']('Oops! Something went wrong...')
|
||||
this.showNotification({
|
||||
type: 'error',
|
||||
message: 'Oops! Something went wrong...',
|
||||
})
|
||||
},
|
||||
onChange(file) {
|
||||
this.cropperOutputMime = file.type
|
||||
|
||||
Reference in New Issue
Block a user