mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 12:11:08 -04:00
Add New SweetAlert & Notification Components
This commit is contained in:
committed by
Mohit Panjwani
parent
3f7db2793f
commit
c3d3e5e35f
@ -720,6 +720,8 @@ export default {
|
||||
|
||||
...mapActions('customFields', ['fetchCustomFields']),
|
||||
|
||||
...mapActions('notification', ['showNotification']),
|
||||
|
||||
selectFixed() {
|
||||
if (this.newEstimate.discount_type === 'fixed') {
|
||||
return
|
||||
@ -921,7 +923,10 @@ export default {
|
||||
.then((res) => {
|
||||
if (res.data) {
|
||||
this.$router.push(`/admin/estimates/${res.data.estimate.id}/view`)
|
||||
window.toastr['success'](this.$t('estimates.created_message'))
|
||||
this.showNotification({
|
||||
type: 'success',
|
||||
message: this.$t('estimates.created_message'),
|
||||
})
|
||||
}
|
||||
|
||||
this.isLoading = false
|
||||
@ -937,7 +942,10 @@ export default {
|
||||
this.isLoading = false
|
||||
if (res.data) {
|
||||
this.$router.push(`/admin/estimates/${res.data.estimate.id}/view`)
|
||||
window.toastr['success'](this.$t('estimates.updated_message'))
|
||||
this.showNotification({
|
||||
type: 'success',
|
||||
message: this.$t('estimates.updated_message'),
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
|
||||
Reference in New Issue
Block a user