🐛 (transaction) fix notif in transactions
This commit is contained in:
@@ -242,8 +242,9 @@ import transactionService from '@/services/TransactionService'
|
|||||||
import formatDate from '@/utils/format-date'
|
import formatDate from '@/utils/format-date'
|
||||||
import queueNotifService from '@/services/QueueNotifService'
|
import queueNotifService from '@/services/QueueNotifService'
|
||||||
import { money } from '@/utils/filters'
|
import { money } from '@/utils/filters'
|
||||||
import { confirmation, alertMessage, findContrastColor } from '@/utils'
|
import { findContrastColor } from '@/utils'
|
||||||
import ILocation from '@/models/ILocation'
|
import ILocation from '@/models/ILocation'
|
||||||
|
import notif from '@/utils/notif'
|
||||||
import MapService from '../services/MapService'
|
import MapService from '../services/MapService'
|
||||||
|
|
||||||
const today: Date = new Date()
|
const today: Date = new Date()
|
||||||
@@ -350,18 +351,18 @@ export default class TransactionCreate extends Vue {
|
|||||||
name: 'transaction',
|
name: 'transaction',
|
||||||
params: { id: this.transaction._id || '' }
|
params: { id: this.transaction._id || '' }
|
||||||
})
|
})
|
||||||
confirmation('Dépense mise à jour.')
|
notif.success('Dépense mise à jour.')
|
||||||
} else {
|
} else {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: 'account',
|
name: 'account',
|
||||||
params: { id: this.account._id || '' }
|
params: { id: this.account._id || '' }
|
||||||
})
|
})
|
||||||
confirmation('Dépense créée.')
|
notif.success('Dépense créée.')
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// tslint:disable-next-line:no-console
|
// tslint:disable-next-line:no-console
|
||||||
console.warn(response)
|
console.warn(response)
|
||||||
alertMessage(`Une erreur s'est produite à la création d'une transaction.`)
|
notif.error(`Une erreur s'est produite à la création d'une transaction.`)
|
||||||
}
|
}
|
||||||
finish()
|
finish()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user