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

@ -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) => {