fix dashbord & using FROM_MAIL_ADDRESS issues

This commit is contained in:
raishvaria
2020-01-27 13:43:48 +05:30
parent 22e7e96dfa
commit ca170f5a87
7 changed files with 38 additions and 65 deletions

View File

@ -13,13 +13,13 @@ export const loadData = ({ commit, dispatch, state }, params) => {
})
}
export const getChart = ({ commit, dispatch, state }) => {
return new Promise((resolve, reject) => {
window.axios.get(`/api/dashboard/expense/chart`).then((response) => {
commit(types.SET_INITIAL_DATA, response.data)
resolve(response)
}).catch((err) => {
reject(err)
})
})
}
// export const getChart = ({ commit, dispatch, state }) => {
// return new Promise((resolve, reject) => {
// window.axios.get(`/api/dashboard/expense/chart`).then((response) => {
// commit(types.SET_INITIAL_DATA, response.data)
// resolve(response)
// }).catch((err) => {
// reject(err)
// })
// })
// }

View File

@ -398,7 +398,6 @@ export default {
}
},
created () {
this.loadChart()
this.loadData()
},
methods: {
@ -422,11 +421,6 @@ export default {
'markEstimateAsSent': 'markAsSent'
}),
async loadChart () {
await this.$store.dispatch('dashboard/getChart')
this.isLoaded = true
},
async loadData (params) {
await this.$store.dispatch('dashboard/loadData', params)
this.isLoaded = true
@ -434,7 +428,7 @@ export default {
async removeEstimate (id) {
this.id = id
swal({
window.swal({
title: this.$t('general.are_you_sure'),
text: this.$tc('estimates.confirm_delete', 1),
icon: '/assets/icon/trash-solid.svg',
@ -462,7 +456,7 @@ export default {
},
async convertInToinvoice (id) {
swal({
window.swal({
title: this.$t('general.are_you_sure'),
text: this.$t('estimates.confirm_conversion'),
icon: '/assets/icon/file-alt-solid.svg',
@ -483,7 +477,7 @@ export default {
},
async onMarkAsSent (id) {
swal({
window.swal({
title: this.$t('general.are_you_sure'),
text: this.$t('estimates.confirm_mark_as_sent'),
icon: '/assets/icon/check-circle-solid.svg',
@ -505,7 +499,7 @@ export default {
async removeInvoice (id) {
this.id = id
swal({
window.swal({
title: this.$t('general.are_you_sure'),
text: this.$tc('invoices.confirm_delete'),
icon: '/assets/icon/trash-solid.svg',
@ -525,7 +519,7 @@ export default {
},
async sendInvoice (id) {
swal({
window.swal({
title: this.$t('general.are_you_sure'),
text: this.$t('invoices.confirm_send'),
icon: '/assets/icon/paper-plane-solid.svg',
@ -552,7 +546,7 @@ export default {
},
async sentInvoice (id) {
swal({
window.swal({
title: this.$t('general.are_you_sure'),
text: this.$t('invoices.invoice_mark_as_sent'),
icon: '/assets/icon/check-circle-solid.svg',
@ -573,7 +567,7 @@ export default {
},
async onMarkAsAccepted (id) {
swal({
window.swal({
title: this.$t('general.are_you_sure'),
text: this.$t('estimates.confirm_mark_as_accepted'),
icon: '/assets/icon/check-circle-solid.svg',
@ -595,7 +589,7 @@ export default {
},
async onMarkAsRejected (id) {
swal({
window.swal({
title: this.$t('general.are_you_sure'),
text: this.$t('estimates.confirm_mark_as_rejected'),
icon: '/assets/icon/times-circle-solid.svg',
@ -617,7 +611,7 @@ export default {
},
async sendEstimate (id) {
swal({
window.swal({
title: this.$t('general.are_you_sure'),
text: this.$t('estimates.confirm_send_estimate'),
icon: '/assets/icon/paper-plane-solid.svg',